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
#!/bin/python3 | |
import sys | |
import json | |
data = sys.stdin.readlines() | |
args = [] | |
for line in data: | |
line = line.replace("\\", "").strip().split(" ") | |
args.extend(line) |
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
#/bin/bash | |
# Install: | |
# - zsh (requires sudo) | |
# - oh-my-zsh | |
# - zsh-autosuggestions plugin | |
# - conda-zsh-completion plugin | |
# - custom themes | |
# - custom zshrc and styles |
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
#!/bin/bash | |
# If a requirements.txt file is supplied, it will be updated with the latest versions of each package. | |
# If a pyproject.toml is required, package upgrades will just be printed. | |
echo "Careful:" >&2 | |
echo " - Virtual Env is required" >&2 | |
echo " - If any of your PYPY packages contain the strin 'http', it is possible that it gets astray, manually inspect it" >&2 | |
def_deps_key="dependencies" |
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
#!/bin/bash | |
# Intended usage: | |
# - You run a super long script with fancy tqdm progress bars in a remote server as usual: | |
# | |
# nohup python super_long_script.py > super_long.log & | |
# # monitor as long as you want | |
# tail -f super_long.log |
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
#!/usr/bin/env python3 | |
import argparse | |
from glob import glob | |
from typing import List, Tuple, Union, Iterable, Optional | |
from pathlib import Path | |
from itertools import combinations | |
from dataclasses import dataclass |
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 | |
class Singleton(object): | |
def __new__(cls): | |
if not hasattr(cls, "instance"): | |
cls.instance = super(Singleton, cls).__new__(cls) | |
return cls.instance |
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
"""Generate __init__.py for a given folder | |
Very naive generator, just parses the AST of every subfile in the provided folder to get the list of exported variables. | |
ToDo := | |
- Recursively parse subfolders and previous __init__.py files | |
- Improve pkg base adding | |
""" | |
import os | |
import ast |
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
#!/bin/bash | |
# If a requirements.txt file is supplied, it will be updated with the latest versions of each package. | |
# If a pyproject.toml is required, package upgrades will just be printed. | |
echo "Careful:" | |
echo " - Conda is required" | |
echo " - If any of your PYPY packages contain the strin 'http', it is possible that it gets astray, manually inspect it" | |
env_name="pkgs_upgrade" |
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
#!/bin/env python | |
import argparse | |
from pathlib import Path | |
from shutil import rmtree | |
from typing import Any, List, Optional | |
# You must override this value! | |
PROJS_BASE = None | |
DEF_FILES = ["index", "readme", "todo", "meetings"] | |
FILES_W_CONTEXT = ["todo", "meetings"] |
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
# requires: zmq | |
import sys | |
import zmq | |
import threading | |
from time import sleep | |
from filelock import FileLock, Timeout | |
NewerOlder