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 | |
import argparse | |
import re | |
import secrets | |
import sys | |
WORDS = 7 | |
# Can also use e.g. https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases | |
WORDLIST = 'diceware.wordlist.asc' |
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 | |
import argparse | |
import random | |
import sys | |
DEFAULT_PERCENTAGE = 40 | |
def randcaps(text: str, percentage: float = DEFAULT_PERCENTAGE) -> str: |
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
# Copyright (C) 2019 Chris Lawrence | |
# You may freely modify, copy, and reuse this software under the terms of the MIT License. | |
def test_bitmask(value: int, mask: str) -> bool: | |
mask = mask.replace("_", "") | |
testval: int = 1 | |
for bit in reversed(mask): | |
if bit == '1' and not (value & testval): | |
return False | |
elif bit == '0' and (value & testval): |
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
-- Tested on macOS 10.14.5 | |
use scripting additions | |
using terms from application "Mail" | |
on perform mail action with messages messageList -- in mailboxes mbox for rule aRule | |
-- Must be in your Downloads folder or a subfolder in recent macOS versions | |
set destinationPath to (POSIX file "/Users/quango/Downloads/enrollment/") as string | |
tell application "Mail" |
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 | |
# Get 'fdkaac' from https://github.com/nu774/fdkaac (or Homebrew etc.) | |
import glob | |
import subprocess | |
import sys | |
import os | |
def convert_file(filename, trackcount): |
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 | |
# Dirty tiles in a specified area in OpenStreetMap | |
import argparse | |
import datetime | |
import decimal | |
import email.utils | |
import math | |
import re |
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
library(ggmap) | |
library(plyr) | |
library(sp) | |
library(geosphere) | |
library(doMC) | |
registerDoMC() | |
allcells <- data.frame() | |
for(cell in list.files(pattern="^cellinfolte.*[.]csv$")) { |
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.6 | |
import string | |
import secrets | |
while True: | |
password = secrets.randbelow(100000000000000000) | |
if password >= 100000000000: | |
break |
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 | |
import sys | |
import subprocess | |
import json | |
import os | |
# Supported by Chrome OS according to https://www.chromium.org/audio-video | |
ACCEPTABLE_VIDEO=('theora', 'vp8', 'vp9', 'h264', 'mpeg4') |
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
library(stringr) | |
mga.students <- read.csv('MGA POLS 1101 Student Profile Survey (Responses) - Form Responses 1.csv') | |
## Checkbox items | |
varlist <- c('Based.on.what.you.know.off.the.top.of.your.head..without.looking.it.up...which.of.the.following.statements.about.Middle.Georgia.State.College.do.you.believe.to.be.true..You.can.mark.more.than.one.response.', | |
'Which.of.the.following.statements.reflect.s..why.you.are.planning.to.transfer...You.may.select.more.than.one.answer..', | |
'Which.of.the.following..if.any..would.make.you.more.excited.about.pursuing.your.education.at.Middle.Georgia.State.' | |
) |
NewerOlder