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
import csv | |
from pathlib import Path | |
from typing import Optional, Union, Sequence, List, Literal | |
import pandas as pd | |
from tqdm import tqdm | |
def read_csv( | |
file: Path, |
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
<table role="grid" aria-rowcount="250"> | |
<thead role="rowgroup" class="v-grid-header"> | |
<tr class="v-grid-row" role="rowheader" style="width: 1445.62px;"> | |
<th style="height: 30px; width: 361.367px;" class="v-grid-cell sortable sort-asc" role="columnheader" colspan="1" aria-sort="ascending"> | |
<div class="v-grid-column-header-content v-grid-column-default-header-content">English short name</div> | |
</th> | |
<th style="height: 30px; width: 401.983px;" class="v-grid-cell sortable" role="columnheader" colspan="1" aria-sort="none"> | |
<div class="v-grid-column-header-content v-grid-column-default-header-content">French short name</div> | |
</th> | |
<th style="height: 30px; width: 236.717px;" class="v-grid-cell sortable" role="columnheader" colspan="1" aria-sort="none"> |
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
z | |
ak | |
al | |
fl | |
fm | |
gi | |
gu | |
gv | |
hj | |
hk |
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
# -*- coding: utf-8 -*- | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.animation import FuncAnimation, PillowWriter | |
# initialize the figure | |
fig, ax = plt.subplots() | |
fig.set_tight_layout(True) | |
ax.set_xlim(0, 2 * np.pi) | |
ax.set_ylim(-1, 1) |
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 typing import Tuple | |
def quadkey_to_xy(quadkey: str) -> Tuple[int, int]: | |
x, y = (0, 0) | |
level = len(quadkey) | |
for i in range(level): | |
bit = level - i | |
mask = 1 << (bit - 1) | |
if quadkey[level - bit] == '1': | |
x |= mask |
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 itertools import cycle | |
from lxml import html | |
from requests import Response, Session | |
class RotatingProxySession(Session): | |
def __init__(self) -> None: | |
super().__init__() |
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
# coding: utf-8 | |
from itertools import cycle | |
from pathlib import Path | |
from typing import Optional | |
from lxml import html | |
from requests import Response, Session | |
class RotatingUASession(Session): |
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 os | |
from concurrent.futures import Future, ThreadPoolExecutor | |
from functools import partial | |
from itertools import repeat | |
from typing import Any, Dict, List, Optional, Union | |
from requests import Response, Session | |
class ConcurrentSession(Session): |
NewerOlder