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
| # General Information | |
| # * High-level programming language | |
| # * General-purpose (vs. domain specific) | |
| # * Created by Guido van Rossum (1991) | |
| # * Emphasizes: | |
| # * Code readability | |
| # * Highly-expressive syntax | |
| # | |
| # | |
| # Some specifics |
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 __future__ import annotations | |
| import os | |
| import sys | |
| import json | |
| import pprint | |
| import sqlite3 | |
| import argparse | |
| from pathlib import Path | |
| from typing import cast, List, NewType, Tuple, TypedDict, Generator, Union |
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 | |
| import sys | |
| import time | |
| import hashlib | |
| import pathlib as pt | |
| import subprocess as sp | |
| from watchdog.observers import Observer | |
| from watchdog.events import PatternMatchingEventHandler |
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 asyncio | |
| import functools | |
| import threading | |
| from contextlib import asynccontextmanager, contextmanager | |
| from typing import Any, Callable | |
| @contextmanager | |
| def my_cont_mgr(tag: str): | |
| print(f"{tag}: f entering!") |
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
| """An alternative API for st.session_state using a class decorator. | |
| So instead of doing this... | |
| if "run_counter" in st.session_state: | |
| st.session_state.run_counter = 0 | |
| st.session_state.run_counter += 1 | |
| st.write("Number of reruns:", st.session_state.run_counter) |
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 python | |
| # encoding: utf-8 | |
| import os | |
| import collections | |
| import math | |
| class Histogram(collections.Counter): | |
| """Stores an histogram with the word frequency of a txt document""" |
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 | |
| """ | |
| Advanced Data Processing and Analytics Pipeline | |
| Features: ETL operations, data validation, statistical analysis | |
| """ | |
| import pandas as pd | |
| import numpy as np | |
| from typing import Dict, List, Tuple, Optional, Any | |
| from dataclasses import dataclass |
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 | |
| import sys | |
| import subprocess | |
| from pathlib import Path | |
| import shutil | |
| import stat | |
| import time | |
| from dataclasses import dataclass | |
| import multiprocessing |
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 | |
| # Copyright (c) 2020 Kolja Glogowski | |
| # | |
| # Permission is hereby granted, free of charge, to any person | |
| # obtaining a copy of this software and associated documentation | |
| # files (the "Software"), to deal in the Software without | |
| # restriction, including without limitation the rights to use, | |
| # copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the |
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
| """Walk through the filesystem, store in sqlite db | |
| Utility script for walking a filesystem, and storing file information in a sqlite | |
| database. | |
| Goals/Design Notes: | |
| - [x] Pure standard library | |
| - [x] Name, Path as seprate columns | |
| - [x] Store the datetime that a file pth was inserted | |
| - [x] Implement fulltext search of both filenames and paths |
NewerOlder