Skip to content

Instantly share code, notes, and snippets.

@teekayarezee
teekayarezee / compress.py
Last active January 11, 2020 20:27
tkrzCompressor - Simple Python audio compressor
from pathlib import Path
from pydub import AudioSegment
from concurrent.futures import ThreadPoolExecutor, as_completed
OUTPUT_FOLDER_NAME = 'outputFiles'
OUTPUT_FOLDER = Path(OUTPUT_FOLDER_NAME)
OUTPUT_EXTENSION = 'mp3'
OUTPUT_BITRATE = '320k'
@teekayarezee
teekayarezee / compress.py
Created January 11, 2020 20:26
tkrzCompressor - Audio compressor
from pathlib import Path
from pydub import AudioSegment
from concurrent.futures import ThreadPoolExecutor, as_completed
OUTPUT_FOLDER_NAME = 'outputFiles'
OUTPUT_FOLDER = Path(OUTPUT_FOLDER_NAME)
OUTPUT_EXTENSION = 'mp3'
OUTPUT_BITRATE = '320k'
@teekayarezee
teekayarezee / transpose.js
Last active December 11, 2018 03:50
Functional JS Columnar transposition cipher
const transposeEncryptMessage = (string, col) => [...Array(col)].map((_, i) => [...Array(Math.ceil(string.length / col))].reduce((acc, _, n) => {
if (n * col + i < string.length)
acc += string[n * col + i]
return acc;
}, [])).join('');
col = 8;
string = "Cenoonommstmme oo snnio. s s c";
len = string.length;
rows = Math.ceil(len / col);
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
var filePath = "rndImg.png";
var width = 1920;
var height = 1080;
var bmp = new Bitmap(width, height);
@teekayarezee
teekayarezee / getHTML.py
Last active January 7, 2018 03:20
download arg specified url
#!/usr/bin/python
# _____ _ _____ | Desc: Get HTML contents of URL & output to file
# |_ _| | ___ _|__ / | Author: TkrZ
# | | | |/ / '__|/ / | Usage: 'getHTML.py URL FILE*' | * = optional parameter
# | | | <| | / /_ | i.e 'getHTML.py http://google.com' | output defaults to 'output.txt'
# |_| |_|\_\_| /____| | or 'getHTML.py http://google.com file.txt' |
import sys, urllib.request
o = 'output.txt'
@teekayarezee
teekayarezee / FizzBuzz.cs
Last active January 7, 2018 03:20
Smallest CSharp FizzBuzz Program
class P{static void Main(){for(int i=0;i++<100;)System.Console.Write($"{(i%3*i%5<1?0:i):#}{i%3:;;Fizz}{i%5:;;Buzz}\n");}}