Hello Le Wagon 👋
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 threading import RLock | |
| from collections import namedtuple | |
| _CacheInfo = namedtuple("CacheInfo", ["hits", "misses", "maxsize", "currsize"]) | |
| ################################################################################ | |
| ### update_wrapper() and wraps() decorator | |
| ################################################################################ |
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 os | |
| from itertools import chain | |
| from pathlib import Path | |
| from bs4 import BeautifulSoup | |
| from git import RemoteProgress | |
| from git.repo.base import Repo | |
| from tqdm import tqdm | |
| BASE_DIR = Path(__file__).resolve().parent |
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
| """ | |
| Descriptive HTTP status codes, for code readability. | |
| See RFC 2616 - https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html | |
| And RFC 6585 - https://tools.ietf.org/html/rfc6585 | |
| And RFC 4918 - https://tools.ietf.org/html/rfc4918 | |
| """ | |
| def is_informational(code): |
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
| # Eulerian Path is a path in graph that visits every edge exactly once. | |
| # Eulerian Circuit is an Eulerian Path which starts and ends on the same | |
| # vertex. | |
| # time complexity is O(V+E) | |
| # space complexity is O(VE) | |
| # using dfs for finding eulerian path traversal | |
| def dfs(u, graph, visited_edge, path=None): | |
| path = (path or []) + [u] |
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 logging | |
| from pathlib import Path | |
| from string import Template | |
| import click | |
| from googletrans import Translator | |
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
| # p10k.zsh configuration file | |
| # | |
| # Author: Thomas Bendler <[email protected]> | |
| # Date: Sun Jan 12 17:54:00 CET 2020 | |
| # | |
| # Based on romkatv/powerlevel10k/config/p10k-lean.zsh, checksum 551. | |
| # For more information see https://github.com/romkatv/powerlevel10k | |
| # | |
| # Apply configiguration changes without restarting zsh. | |
| # Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. |
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 threading, zipfile | |
| class AsyncZip(threading.Thread): | |
| def __init__(self, infile, outfile): | |
| threading.Thread.__init__(self) | |
| self.infile = infile | |
| self.outfile = outfile | |
| def run(self): |
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
| { | |
| "theme": "serika_dark", | |
| "customTheme": false, | |
| "customThemeColors": [ | |
| "#323437", | |
| "#e2b714", | |
| "#e2b714", | |
| "#646669", | |
| "#d1d0c5", | |
| "#ca4754", |
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
| ''' | |
| author: yusufadell | |
| Name: collatz-conj.py | |
| Purpose: Find the number of steps it takes to reach one using the following process: | |
| If n is even, divide it by 2. If n is odd, multiply it by 3 and add 1. | |
| Author: Yusuf Adel (y8l) | |
| Algorithm: Collatz conjecture | |
| License: MIT |