This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'George Pamfilis' | |
import numpy as np | |
from itertools import combinations | |
from scipy.misc import comb | |
class Coupon(object): | |
def __init__(self, game_odds, game_system): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-6"> | |
<div><H1>{{title1}}</H1> | |
<form action="/plot"> | |
<select name="feature_name1"> | |
{% for feature in feature_names1 %} | |
{% if feature == current_feature_name1 %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
table = $('#example').DataTable({ | |
"ajax":{ | |
"url": "/get_data", | |
"dataSrc" :"items"} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@main.route('/', methods=['GET', 'POST']) | |
def index(): | |
assets_img = os.path.join(os.path.sep, basedir, 'app', 'static', 'assets', 'img') | |
image_urls = os.listdir(assets_img) | |
im = [os.path.join(os.path.sep, 'static', 'assets', 'img', img) for img in image_urls] | |
return render_template('index.html', | |
image_urls=im) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel"> | |
<ol class="carousel-indicators"> | |
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li> | |
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li> | |
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li> | |
</ol> | |
<div class="carousel-inner"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container-fluid"> | |
<div class="gallery-pt"> | |
<div class="row"> | |
<div class="col-md-12"> | |
<h1 class="text-center">Project Gallery</h1> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-12 gallery-pt--filter-container"> | |
<ul class="list-inline filters"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gallery(location='static/img/gallery'): | |
gallery_categories = os.path.join(os.path.sep, basedir, 'app', *location.split('/')) | |
categories = os.listdir(gallery_categories) | |
images_full_path = [] | |
for category in categories: | |
images = os.path.join(os.path.sep, basedir, 'app', *location.split('/'), category) | |
for image in os.listdir(images): | |
image_path = os.path.join(*location.split('/'), category, image) | |
images_full_path.append([category, image_path]) | |
return categories, images_full_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Place this file in your assets folder and finito. | |
*/ | |
/* https://stackoverflow.com/questions/57293843/adjusting-the-maxheight-of-a-table-in-dash-tables-python */ | |
/* высота таблицы Dash DataTable*/ | |
.dash-spreadsheet.dash-freeze-top, .dash-spreadsheet.dash-virtualized | |
{ max-height: inherit !important; } | |
.dash-table-container {max-height: calc(100vh - 10px);} | |
/*makes the height of the DashTable 10 pix less then the 100% screen */ |