the path is to customize /opt/tljh/hub/share/jupyterhub/templates/login.html
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
from flask import Flask, request, abort, render_template | |
app = Flask(__name__, template_folder='.') | |
import gspread | |
import textwrap | |
gc = gspread.oauth( | |
credentials_filename='credentials.json', |
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
{"installed":{"client_id":"258409864674-jcqkeivqrd8dcb2gv5egl76g384vflld.apps.googleusercontent.com","project_id":"scopus-review","auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://oauth2.googleapis.com/token","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","client_secret":"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","redirect_uris":["http://localhost"]}} |
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
from flask import Flask, g, request, render_template_string, redirect, url_for | |
from werkzeug.middleware.proxy_fix import ProxyFix | |
import sqlite3 | |
import pathlib | |
app = Flask(__name__) | |
app.url_map.strict_slashes = False | |
app.wsgi_app = ProxyFix( | |
app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_prefix=1 | |
) |
This file has been truncated, but you can view the full file.
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
[ | |
{ | |
"id": 10259, | |
"cuisine": "greek", | |
"ingredients": [ | |
"romaine lettuce", | |
"black olives", | |
"grape tomatoes", | |
"garlic", | |
"pepper", |
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
from mip import * | |
import string, collections | |
a = string.ascii_uppercase | |
item_clusters, cluster_size = {}, collections.Counter() | |
for ci,c in enumerate([a[:6],a[:3],a[3:6],a[6:10],a[10:12]]): | |
for i in c: | |
name = 'c'+str(ci) | |
cluster_size[name] += 1 | |
item_clusters.setdefault(i, set()).add( name ) | |
print(item_clusters, cluster_size) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
BEGIN TRANSACTION; | |
CREATE TABLE categorylinks ( | |
cl_from integer NOT NULL DEFAULT '0' | |
, cl_to blob NOT NULL DEFAULT '' | |
, cl_sortkey blob NOT NULL DEFAULT '' | |
, cl_timestamp timestamp NOT NULL DEFAULT current_timestamp | |
, cl_sortkey_prefix blob NOT NULL DEFAULT '' | |
, cl_collation blob NOT NULL DEFAULT '' | |
, cl_type text NOT NULL DEFAULT 'page' | |
, PRIMARY KEY (cl_from,cl_to) |
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
import collections, itertools | |
import fitz | |
def is_inside(inner, outer): | |
return ( | |
(inner['x2'] >= outer['x1']) and | |
(inner['y2'] >= outer['y1']) and | |
(outer['x2'] >= inner['x1']) and | |
(outer['y2'] >= inner['y1']) | |
) |
NewerOlder