This file contains hidden or 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 requests | |
from datetime import datetime | |
import pandas as pd | |
BREST = (48.39029, -4.4833) | |
NANTES = (47.218371, -1.553621) | |
DFLT_START = datetime(2018, 1, 1) | |
DFLT_END = datetime.today() |
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 hidden or 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
digraph unpackAI_progression { | |
rankdir="LR"; | |
graph [fontname = "Handlee"]; | |
node [fontname = "Handlee"]; | |
edge [fontname = "Handlee"]; | |
bgcolor=transparent; | |
subgraph cluster_ml { |
This file contains hidden or 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 cmd import Cmd | |
from glob import glob | |
import pickle | |
import re | |
from time import time | |
from typing import Dict, List | |
fields = ["first_name", "last_name", "email"] |
This file contains hidden or 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 defaultdict, namedtuple | |
from datetime import datetime | |
import pandas as pd # type: ignore # "No library stub" for pandas | |
import re | |
import sys | |
from timeit import timeit | |
from typing import Any, Callable, Dict, Iterator, List, Tuple | |
DictLog = Dict[str, str] | |
ListLogs = List[DictLog] |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import solution | |
logfilename = "mini-access-log.txt" | |
def test_read_logs(): | |
log_list = solution.logtolist(logfilename) | |
assert len(log_list) == 206 |
This file contains hidden or 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
#!/usr/bin/env python3 | |
import solution | |
import pytest | |
list_test_inputs = [ | |
(10,), | |
(10, 20), | |
(20, 10), |
This file contains hidden or 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 | |
from typing import Dict, Generator, List | |
Range3 = Generator[int, None, None] | |
def myrange3(start: int, stop: int = None, step: int = 1) -> Range3: | |
if stop is None: | |
current, stop = 0, start |
This file contains hidden or 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
#!/python | |
from collections import defaultdict, Counter | |
# BONUS: fuzzy logic when entering countries and cities | |
try: | |
from fuzzywuzzy import fuzz | |
FUZZY_ENABLED = True | |
print("") | |
except ImportError as e: |
This file contains hidden or 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
#!python | |
import os | |
import re | |
import sys | |
import subprocess | |
''' | |
svn_revert_clean.py - script to remove unversioned files and perform svn revert |
NewerOlder