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 collections import Counter, defaultdict | |
from pathlib import Path | |
from typing import List, Mapping, Tuple | |
from aocd.models import Puzzle | |
from dotenv import load_dotenv | |
load_dotenv() # API key in .env | |
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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
plt.rcParams["figure.dpi"] = 250 | |
delta_r0 = 1.2 | |
omicron_r0 = 1.35 | |
hosp_fraction = 0.05 | |
icu_fraction = 0.30 |
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
marshmallow: | |
Installed: 2.19.5 | |
Newest: 3.0.0b8 | |
Newer: 3.0.0b8 | |
matplotlib: | |
Installed: 3.0.3 | |
Newest: 3.1.0 | |
Newer: 3.1.0 | |
sip: | |
Installed: 4.19.8 |
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
// ==UserScript== | |
// @name Make Medium Readable Userscript | |
// @namespace http://make.medium.readable.again | |
// @version 0.1 | |
// @description https://github.com/thebaer/MMRA | |
// @author luke3butler (Credits to Matt Baer) | |
// @match *://*/* | |
// @grant none | |
// ==/UserScript== |
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 pandas as pd | |
import Helpers | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
def ReduceListSeries(a: pd.Series, *, diff=0, rangeOnly=False): | |
"""Given a pd.Series of integers, this function returns a list of tuples | |
where each pair consists of the indexes of the boundaries (1st inclusive, 2nd exclusive [, 1st value]) |
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
drop extension if exists tablefunc; | |
drop table if exists texts; | |
drop table if exists langs; | |
-- load tablefunc extension for crosstab | |
create extension tablefunc; | |
-- crosstab only allows single column - define int and varchar tuples for this purpose | |
DROP TYPE IF EXISTS intT; | |
CREATE TYPE intT AS (module int, id int ); |
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
# https://techdevguide.withgoogle.com/resources/compress-decompression/#! | |
def decomp(s,i = None): | |
i = [0] if i is None else i | |
number = 0 | |
out = [] | |
while i[0] < len(s): | |
c = s[i[0]] | |
i[0] += 1 | |
if c == ']': | |
return out |
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 java.io.PrintWriter | |
// import java.util | |
import org.apache.spark.sql.DataFrame | |
// import org.apache.spark.sql.types.{LongType, StructField, StructType} | |
import org.apache.spark.sql.Row | |
import scala.collection.mutable | |
// import spark.implicits._ | |
def fileWSL(n : String) = "/mnt/c/linking/git/Linkability/xmr_data/csv/chronologic_rings_" + n + ".csv" // from WSL use this path |
We can't make this file beautiful and searchable because it's too large.
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
time,block,txhash,pubk | |
2014-09-02 13:39:59,200382,86c73c157e6fe10aa98c78f25d5a42dbc531e697cd8a366b1292e71cf372b33b,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:00:19,200401,1a24eea7554d5d2e8f2d5c4fdbbb00bb5ec4ba4718681dd46f0718675d1a5efc,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:02:57,200403,4830bc5494495da0cfca8c7d458056db2ac19bee90f5a005570413b89f707eb7,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:03:46,200404,171a1f15220686c237fbed2cfa3fdafdb4ae110958af8bdf2b82f3401a6d1581,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:05:03,200405,91bc31697eff09bbe33502b416233d262500631878bbdc6aa1d21845c475255d,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:05:28,200406,47b96d7e064fdf58097848c6876c82e17a942030a4f42ff0701ca82f2dc954a1,9b2e4c0281c0b02e7c53291a94d1d0cbff8883f8024f5142ee494ffbbd088071 | |
2014-09-02 14:06:01,200407,f274841ea2590bdc5471447fc8ac8f26 |
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
// ==UserScript== | |
// @name Lichess Pieces: Go | |
// @namespace http://userstyles.org | |
// @description Go stones instead of chess pieces. Choose CANVAS board theme to activate the style. | |
// @author oerpli | |
// @homepage https://userstyles.org/styles/135471 | |
// @include http://lichess.org/* | |
// @include https://lichess.org/* | |
// @include http://*.lichess.org/* | |
// @include https://*.lichess.org/* |
NewerOlder