Skip to content

Instantly share code, notes, and snippets.

View s-c-p's full-sized avatar
🍄

S C P s-c-p

🍄
  • India
View GitHub Profile
@s-c-p
s-c-p / ac.py
Created November 23, 2023 15:54
"""
Commit with message "yo"
never commit untracked files
`git add` is user's responsibility. once added to tracker
has 2 settings
commitEvery=1 # minute
uploadEvery=10 # minute
singleDeveloper=True # default
works only when a `whatamIdoing` file exists and if not singleDeveloper then branch != main
"""
@s-c-p
s-c-p / wgcf.py
Created June 9, 2021 09:56 — forked from oskar456/wgcf.py
Cloudflare WARP linux client (using wg-quick for actual tunnel setup)
#!/usr/bin/env python3
import subprocess
import json
import os
from pathlib import Path
import requests
from requests.compat import urljoin
@s-c-p
s-c-p / algebraic_data_type.py
Created August 9, 2020 05:43 — forked from apua/algebraic_data_type.py
A practice of Algebraic Data Type implementation in Python
# python3.6 -m doctest algebraic_data_type.py
"""
A practice that implement algebraic data type in Python.
> data Maybe a = Just a | Nothing
Usage of `Maybe`:
>>> Just(3)
import trunklucator
import json
#You can change this format in frontend part.
#Current format - (label text, returning value, key code for shortcut)
META = {"buttons":[('Cat (A)', 1, 65), ('Dog (X)', 0, 88), ('Skip (Enter)', -1, 13)]}
sys_stdin = [
'{"html":"<img src=\\"/data/10005.jpg\\">", "file":"10005.jpg"}',
'{"html":"<img src=\\"/data/10006.jpg\\">", "file":"10006.jpg"}',
@s-c-p
s-c-p / id.txt
Created July 31, 2018 11:31
Slack identities
zcnave
zcnave
Ritz
bull.bull
from urllib.request import urlretrieve
title = ""
with open("youtube-urls.txt", mode='rt') as i:
for url in i:
urlretrieve(url, "temp.txt")
with open("temp.txt", mode="rt") as t:
con = t.read()
kv = con.split("&")
import copy
import hashlib
from lesspass__renderPwd import render_password
DEFAULT_PROFILE = {
"site": "",
"login": "",
"options": {
"uppercase": True,
import shutil
import inspect
prompt = lambda: input('debug>>> ')
disp_width = shutil.get_terminal_size().columns
def words_gen(lst, chunk):
ans = list()
while True:
try:
# code from snarky.ca, making my own debugger cuz pdb doesn't halt time
from debugger import db # see gist named debugger.py
import datetime
import heapq
import types
import time
import websockets as faker