temporal
This commit is contained in:
parent
ccfbbe3cdb
commit
2fff09b244
2 changed files with 27 additions and 9 deletions
30
Dockerfile
30
Dockerfile
|
|
@ -1,17 +1,35 @@
|
|||
# Use an official Python runtime as a parent image
|
||||
# Use Python 3.12-slim as the base image
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the current directory contents into the container at /usr/src/app
|
||||
COPY . .
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install any needed packages specified in requirements.txt
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy requirements file
|
||||
COPY requirements.txt requirements.txt
|
||||
|
||||
# Upgrade pip and install dependencies
|
||||
RUN pip install --no-cache-dir -U pip && pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Create a fake sudo command to bypass sudo errors
|
||||
RUN echo '#!/bin/sh\nexec "$@"' > /usr/bin/sudo && chmod +x /usr/bin/sudo
|
||||
|
||||
# Clone and install TemporalLib
|
||||
RUN git clone --depth 1 https://github.com/TheRandonauts/temporal.git /app/temporal \
|
||||
&& cd /app/temporal \
|
||||
&& ./make.sh \
|
||||
&& rm -rf /app/temporal
|
||||
|
||||
# Copy application files
|
||||
COPY . .
|
||||
|
||||
# Expose Streamlit's default port
|
||||
EXPOSE 8501
|
||||
|
||||
# Command to run the app
|
||||
# Run the application
|
||||
CMD ["streamlit", "run", "main.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
||||
6
main.py
6
main.py
|
|
@ -1,7 +1,7 @@
|
|||
import streamlit as st
|
||||
import streamlit.components.v1 as components
|
||||
from lyagushka import Lyagushka
|
||||
from randonautentropy import rndo
|
||||
from randonautentropy import temporal
|
||||
import json
|
||||
import time
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ def generate_random_data(size=1024, max_value=100):
|
|||
mod_cutoff = max_int_for_bytes - (max_int_for_bytes % max_value) - 1
|
||||
|
||||
while len(random_data) < size:
|
||||
hex_data = rndo.get(length=max_value_bytes * size)
|
||||
hex_data = temporal.get(length=max_value_bytes * size)
|
||||
for i in (hex_data[j:j + 2 * max_value_bytes] for j in range(0, len(hex_data), 2 * max_value_bytes)):
|
||||
num = int(i, 16)
|
||||
if num <= mod_cutoff:
|
||||
|
|
@ -75,7 +75,7 @@ st.write(description)
|
|||
num_lotto_balls = st.number_input("Amount of balls to draw:", min_value=1, max_value=20, value=5)
|
||||
highest_number = st.number_input("Amount of balls in the lottery:", min_value=1, max_value=100, value=70)
|
||||
highest_extra_ball = st.number_input("Amount of balls in the extra draw:", min_value=1, max_value=50, value=25)
|
||||
z_score_threshold = st.number_input("Minimum Z-Score Threshold:", min_value=1.0, max_value=5.0, value=3.0)
|
||||
z_score_threshold = st.number_input("Minimum Z-Score Threshold:", min_value=1.0, max_value=5.0, value=2.22)
|
||||
|
||||
if st.button("Generate Lottery Numbers"):
|
||||
st.subheader("Generating Lottery Numbers...")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue