I hereby claim:
- I am gmgauthier on github.
- I am gmgauthier (https://keybase.io/gmgauthier) on keybase.
- I have a public key whose fingerprint is 6997 765A 36D0 A846 E77A 9BF7 E375 6E3A D4FE 0489
To claim this, I am signing this object:
#/usr/bin/env zsh | |
MEDIADIR="/media/gmgauthier" | |
format=0 # Don't format disk images that already exist | |
# get name of freshly created blank disk, or create one | |
echo ">>> NEW DISK IS BEING CREATED..." | |
if [ $# -eq 0 ]; then | |
PREFIX="floppy" | |
RANDO=$(od -An -N4 -i < /dev/urandom|sed 's/[ -]//g') |
#/usr/bin/env sh | |
MEDIADIR="/media/gmgauthier" | |
format=0 # Don't format disk images that already exist | |
# get name of freshly created blank disk, or create one | |
if [ $# -eq 0 ]; then | |
echo ">>> NEW DISK IS BEING CREATED..." | |
PREFIX="floppy" | |
RANDO=$(od -An -N4 -i < /dev/urandom|sed 's/[ -]//g') |
#!/usr/bin/env sh | |
if [ $# -eq 0 ] | |
then | |
PREFIX="floppy" | |
RANDO=$(od -An -N4 -i < /dev/urandom|sed 's/[ -]//g') | |
NAME="$PREFIX$RANDO" | |
else | |
NAME=$1 | |
fi |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# cta bus checker | |
import requests | |
from xml.etree import ElementTree as et | |
from geopy.distance import great_circle | |
def truncstr(longstring, length=25): | |
newstring = (longstring[:length - 3] + '...') \ | |
if len(longstring) > length else longstring.ljust(length) | |
return newstring |
def truncstr(longstring, length=25): | |
newstring = (longstring[:length - 3] + '...') \ | |
if len(longstring) > length else longstring.ljust(length) | |
return newstring |
#!/usr/bin/env python | |
"""A library of simply rexx-to-python analogy functions. The idea is to make them behave as | |
much like rexx as possible. | |
""" | |
import difflib | |
# Direct Rexx analogies of string handling functions | |
def center(string, length, pad=" "): | |
"""Returns a string of length length with string centered in it and with pad |
from string import ascii_letters, digits | |
from secrets import choice | |
print(''.join(choice(ascii_letters + digits) for i in range(64))) |
public class StringToArray{ | |
/** | |
* stringToIntArray | |
* @param numbers a string list of numbers separated by spaces | |
* @return int[] a proper integer array | |
* | |
*/ | |
public int[] stringToIntArray(final String numbers){ | |
String[] parts = numbers.split(" "); | |
int[] n1 = new int[parts.length]; |