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 |
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
| # Example ssh config file. Usually located in ~/.ssh/config (user) or /etc/ssh/ssh_config (system) | |
| # This works on both linux and MacOS | |
| # Basic ssh commands converted to ssh/config file format | |
| # Simplest format | |
| # Run with: "ssh blog" => (equivalent to: "ssh [email protected]" and "ssh -i ~/.ssh/id_rsa -p 22 [email protected]") | |
| Host blog |
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
| Option Explicit | |
| Public Sub PasteTableToMail() | |
| Dim appOl As Object 'Outlook.Application | |
| On Error Resume Next | |
| Set appOl = GetObject(, "Outlook.Application") | |
| On Error GoTo 0 | |
| If appOl Is Nothing Then Exit Sub | |
| Dim itm As Object 'Outlook.MailItem |
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
| Option Explicit | |
| Public Sub Sample() | |
| With CreateObject("Selenium.EdgeDriver") | |
| .Get "https://www.ka-net.org/blog/" | |
| Dim elm As Object 'Selenium.WebElement | |
| Set elm = .FindElementByXPath("/html/body/div[1]/div/a/span") | |
| .ExecuteScript "arguments[0].setAttribute('style', 'background-color:cyan')", elm | |
| Stop |
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
| @echo off | |
| cd /d %~dp0 | |
| PowerShell -NoProfile -ExecutionPolicy Bypass -File .\CustomizeNotepadSettings.ps1 |