Loading
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
\documentclass{article} | |
\usepackage{pgffor} | |
\usepackage{pgfkeys} | |
\usepackage{ifthen} | |
\pgfkeys{ | |
/contributions/.cd, | |
1/.initial=Conceptualization, | |
2/.initial=Methodology, |
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 time import sleep, time | |
from datetime import timedelta | |
import requests | |
from requests.adapters import HTTPAdapter, Retry | |
API_URL = 'https://api.github.com/' # or 'https://api.github.com/graphql' or others | |
API_TOKEN = '' # You will need that | |
TIMEOUT = 10 |
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
\documentclass[margin=1cm]{standalone} | |
\usepackage{tikz} | |
\definecolor{ACMYellow}{RGB}{255, 214, 0} | |
\definecolor{ACMOrange}{RGB}{252, 146, 0} | |
\definecolor{ACMRed}{RGB}{253, 27, 20} | |
\definecolor{ACMLightBlue}{RGB}{131, 206, 226} | |
\definecolor{ACMGreen}{RGB}{166, 188, 9} | |
\definecolor{ACMPurple}{RGB}{101, 1, 107} | |
\definecolor{ACMDarkBlue}{RGB}{9, 53, 122} |
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 pathlib import Path | |
lines_not_200 = [] | |
log_file_dir = '.' | |
for log_file in Path(log_file_dir).glob('*.log'): | |
with open(log_file, 'r') as f: | |
for line in f.readlines(): | |
if not line.startswith('INFO:root:HTTP status 200'): | |
lines_not_200 += [line] |
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 timeit | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# measuring | |
numpy_results = {} | |
python_results = {} | |
config = {'number': 100, 'repeat': 100} |
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 bz2 | |
import orjson | |
from requests.adapters import HTTPAdapter, Retry | |
from requests_cache import CachedSession, SerializerPipeline, Stage, serializers | |
from requests_futures.sessions import FuturesSession | |
SERIALIZER = SerializerPipeline([ | |
serializers.preconf.orjson_preconf_stage, | |
orjson, |
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 shutil | |
from pathlib import Path | |
data_dir = './data' # please speficy the data dir | |
for path in Path(data_dir).rglob('timeline'): | |
print(path) | |
shutil.rmtree(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
# pylint: disable=locally-disabled, multiple-statements, line-too-long, missing-module-docstring, no-member, missing-class-docstring, missing-function-docstring | |
import argparse | |
from pathlib import Path | |
import hashlib | |
import bz2 | |
import logging | |
from datetime import datetime | |
import orjson |
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
# pylint: disable=locally-disabled, multiple-statements, line-too-long, missing-module-docstring, no-member, missing-class-docstring, missing-function-docstring | |
import argparse | |
from pathlib import Path | |
from datetime import datetime | |
import logging | |
import bz2 | |
from concurrent.futures import as_completed | |
from urllib.parse import urlparse, parse_qs |
NewerOlder