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 sys | |
import base64 | |
import requests | |
import string | |
STANDARD_ALPHABET = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' | |
CUSTOM_ALPHABET = 'gx74KW1roM9qwzPFVOBLSlYaeyncdNbI=JfUCQRHtj2+Z05vshXi3GAEuT/m8Dpk6' | |
def encode(data): | |
table = data.maketrans(STANDARD_ALPHABET, CUSTOM_ALPHABET) |
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
# Inspired from: https://create.arduino.cc/projecthub/jrance/super-mario-theme-song-w-piezo-buzzer-and-arduino-1cc2e4 | |
from gpiozero import TonalBuzzer | |
from gpiozero.tones import Tone | |
import time | |
music = { | |
"recipe":["overworld", "overworld", "underworld"], | |
"overworld": [ | |
("E5", 12), ("E5", 12), (None, 12), ("E5", 12), |
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
# encoding:utf-8 | |
import gpiozero | |
import time | |
import sys | |
class Broadcast: | |
def __init__(self, gpio): | |
self.buzzer = gpiozero.Buzzer(gpio) | |
self.unit = 0.04 | |
self.breath = self.unit * 0.5 |
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 | |
# encoding: utf-8 | |
import time | |
import requests | |
import os | |
import difflib | |
from notify_run import Notify | |
''' |
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 glob | |
import os | |
folders = glob.glob("./*/*") | |
cwd = os.getcwd() | |
for folder in folders: | |
os.chdir("{}{}".format(cwd, folder)) | |
command = "zip -9r {}.zip .".format(os.getcwd()) | |
print(command) |
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 win32process | |
import win32gui | |
def list_windows_active(): | |
processes = list_processes() | |
windows = {} | |
def callback(hwnd, process): | |
if win32gui.IsWindowVisible(hwnd) and win32process.GetWindowThreadProcessId(hwnd)[1] == process.pid: | |
text = win32gui.GetWindowText(hwnd) | |
if text != "": |
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
__pycache__ | |
config.py |
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 requests | |
base_urls = { | |
"6": "https://s3.ananas.chaoxing.com/doc/a7/8c/7b/8311edb8d337c6d0ddd0dfbd72de8950/thumb/", | |
"7": "https://s3.ananas.chaoxing.com/doc/97/0c/e2/6a2fc3a5c34560dc387803e06a0c2abd/thumb", | |
"8": "https://s3.ananas.chaoxing.com/doc/28/3b/47/efbdfc0ba48a5247668a9b64600a03c8/thumb/", | |
"9": "https://s3.ananas.chaoxing.com/doc/9e/8a/23/d6f06ae6ef23810ef6d50a15cf733e1b/thumb/", | |
"10": "https://s3.ananas.chaoxing.com/doc/6a/1e/47/3c5f134cea0eab8edb11653e23f02ebb/thumb/", |
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
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
"profiles": { | |
"defaults": { | |
// Put settings here that you want to apply to all profiles | |
"acrylicOpacity" : 0.5, | |
"cursorShape" : "filledBox", |
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
\documentclass{beamer} | |
% import packages | |
\usepackage{minted} | |
\usepackage{bookmark} | |
% set theme and corlor theme | |
\usetheme{Rochester} | |
\usecolortheme{seahorse} |