When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}
""" | |
Try to sclambre wrods itno the msot porbable wrooddis *not* in the | |
lexcion. We optimize the priblitaboy unsig hlil-cimbling wtih random | |
restrat. The ruselt: pettry asuming. The pragrom: pettry solw. | |
""" | |
import collections | |
import operator | |
import random | |
import re |
""" | |
A minimal implementation of Monte Carlo tree search (MCTS) in Python 3 | |
Luke Harold Miles, July 2019, Public Domain Dedication | |
See also https://en.wikipedia.org/wiki/Monte_Carlo_tree_search | |
https://gist.github.com/qpwo/c538c6f73727e254fdc7fab81024f6e1 | |
""" | |
from abc import ABC, abstractmethod | |
from collections import defaultdict | |
import math |
### JHW 2018 | |
import numpy as np | |
import umap | |
# This code from the excellent module at: | |
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module | |
import random |
import sys | |
def j(lineno): | |
frame = sys._getframe().f_back | |
called_from = frame | |
def hook(frame, event, arg): | |
if event == 'line' and frame == called_from: | |
try: | |
frame.f_lineno = lineno |
from astropy.coordinates import EarthLocation,SkyCoord | |
from astropy.time import Time | |
from astropy import units as u | |
from astropy.coordinates import AltAz | |
observing_location = EarthLocation(lat='52.2532', lon='351.63910339111703', height=100*u.m) | |
observing_time = Time('2017-02-05 20:12:18') | |
aa = AltAz(location=observing_location, obstime=observing_time) | |
coord = SkyCoord('4h42m', '-38d6m50.8s') |
#!/usr/bin/python | |
# turn lisp statements into an AST | |
# going off a super basic grammar: | |
# - atoms are numbers or symbols | |
Number = (int, float) | |
Symbol = str | |
Atom = (Number, Symbol) |
import axios from 'axios'; | |
// You can use any cookie library or whatever | |
// library to access your client storage. | |
import cookie from 'cookie-machine'; | |
axios.interceptors.request.use(function(config) { | |
const token = cookie.get(__TOKEN_KEY__); | |
if ( token != null ) { | |
config.headers.Authorization = `Bearer ${token}`; |
/* | |
Foundation Tip Contract | |
Address: 0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359 | |
Bitcoin Shapeshift Address: 1GyczDXWjFbmhx2Qau4ham3zJqNEP8UcEG (if transaction fails it is sent to 39BaMQCphFXyYAvcoGpeKtnptLJ9v6cdFY instead) | |
Interface: [{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"proposals","outputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"},{"name":"description","type":"string"},{"name":"votingDeadline","type":"uint256"},{"name":"executed","type":"bool"},{"name":"proposalPassed","type":"bool"},{"name":"numberOfVotes","type":"uint256"},{"name":"currentResult","type":"int256"},{"name":"proposalHash","type":"bytes32"}],"type":"function"},{"constant":false,"inputs":[{"name":"proposalNumber","type":"uint256"},{"name":"transactionBytecode","type":"bytes"}],"name":"executeProposal","outputs":[{"name":"result","type":"int256"}],"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"memberId","outputs":[{"name":"","type":"uint |
# -*- coding: utf-8 -*- | |
#test on python 3.4 ,python of lower version has different module organization. | |
import http.server | |
from http.server import HTTPServer, BaseHTTPRequestHandler | |
import socketserver | |
PORT = 8080 | |
Handler = http.server.SimpleHTTPRequestHandler |