The following snippets can be used to build a cross platform script to manage a local Anaconda environment by anyone.
conda create -y -p ./.env python=3.9 && conda activate ./.env
conda deactivate
#==================== | |
# Settings | |
#==================== | |
$superSampling = 2 | |
$urlTemplate = "https://picsum.photos/{width}/{height}?grayscale" | |
#==================== | |
# Await connection | |
#==================== | |
$null = $urlTemplate -match "^https?://([^/]*)/" |
#!/usr/bin/python3 | |
import time, hashlib, hmac, base64 | |
secret = 'q5ma qo4x irgv cm6k auai kjyv ak57 5keu' | |
T_0 = 0 | |
X = 30 | |
d = 6 | |
K = base64.b32decode(secret.upper().replace(' ', '')) |
#!/usr/bin/python3 | |
import os, sys, requests, re, html | |
banner = ''' | |
#================================================== | |
# A script to process youtube playlist takeout | |
#================================================== | |
''' | |
print(banner) |
function pollNESController() { | |
const gamepads = navigator.getGamepads ? navigator.getGamepads() : (navigator.webkitGetGamepads ? navigator.webkitGetGamepads : []); | |
const controllerInput = { | |
isPresent: false, | |
dpad: '', | |
select: 0, | |
start: 0, | |
a: 0, | |
b: 0 | |
}; |
# Based on https://www.tensorflow.org/datasets/keras_example | |
# Requires numpy, pygame, tensorflow and tensorflow-datasets | |
NUMBER_OF_EPOCHS = 8 | |
import numpy as np | |
import pygame | |
pygame.init() | |
pygame.display.set_caption('MNIST digits') |
#!/usr/bin/env python3 | |
import os, re, random, copy, sys, atexit | |
clear = lambda: os.system('cls' if os.name == 'nt' else 'clear') | |
def print_header(): | |
print(' _____ _ _____ _____ ') | |
print(' |_ _(_)_|_ _|_ _ _|_ _|__ ___ ') | |
print(' | | | / _|| |/ _` / _|| |/ _ \/ -_)') |
#!/usr/bin/env python3 | |
import os, re, random | |
clear = lambda: os.system('cls' if os.name == 'nt' else 'clear') | |
def print_header(): | |
print(' _____ _ _____ _____ ') | |
print(' |_ _(_)_|_ _|_ _ _|_ _|__ ___ ') | |
print(' | | | / _|| |/ _` / _|| |/ _ \/ -_)') |
// ==UserScript== | |
// @name 2xYT | |
// @version 0.1 | |
// @description Automatically sets the playback speed to 2x on YouTube.com | |
// @match *://www.youtube.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; |
import socket | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-m', '--mode', choices=['sender', 'receiver'], required=True) | |
arguments = parser.parse_args() | |
is_sender = arguments.mode == 'sender' | |
receiver_port = 1234 | |
receive_size = 1024 |