This file contains 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
const gps = { | |
type: "gps", | |
long: 234, | |
lat: 344 | |
}; | |
const kmm = { | |
type: "kmm", | |
km: 34, | |
m: { |
This file contains 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
from itertools import repeat | |
import pandas as pd | |
df = pd.DataFrame( | |
{ | |
'accountData': [ | |
[{'key': 'name' ,'value': 'jim'}, {'key': 'schlong' ,'value': '27' }], | |
[{'key': 'name' ,'value': 'cnagy'}, {'key': 'schlong' ,'value': '26' }], |
This file contains 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 bash | |
COMMAND=$@ | |
set -x | |
command -v poetry > /dev/null || (echo missing poetry && exit 3) | |
if [[ -v ${COMMAND} ]]; then | |
poetry shell | |
else | |
bash -c ". .venv/bin/activate && $(printf ' %q' "$@")" |
This file contains 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 threading | |
import time | |
import schedule | |
import json | |
import requests | |
def start_updater(): | |
def _f(): | |
while True: |
This file contains 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
Lets have a Discord hangout! | |
I've added so that anyone can create a voice channel and break out into the discussions | |
you feel are interesting. See it as if it was happening at a cafe, use common sense. | |
We'll try to share screens and show of what we are working on or have got stuck on, | |
or why not discuss why you think U-Net is the only network you'll ever need for segmentation? | |
I have no clue how this is going to turn out, but I'm optimistic that we'll make it work and | |
make it a bit better foreach run. |
This file contains 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
from random import seed, randint | |
seed(1337) | |
import asyncio | |
def poll_keyboard(): | |
if randint(1, 5) > 2: | |
return 0 # nothing pushed | |
else: | |
return randint(1, 32) # 1 is enter |
This file contains 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 bash | |
set -ex | |
input_image=$1 | |
output_image=$2 | |
## Example usage: ./convert_to_favicon.sh icon.svg favicon.ico | |
for d in 16 32; do | |
convert -resize ${d}x${d} -flatten -colors 256 ${input_image} /tmp/favicon-${d}.ico | |
done |
This file contains 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
addEventListener('fetch', event => { | |
event.respondWith( | |
fetch(event.request.url, event.request) | |
) | |
}) |
This file contains 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 python2 | |
from __future__ import print_function, division | |
from itertools import ( | |
ifilter, | |
islice, | |
imap, | |
) | |
from functools import partial | |
import operator |
This file contains 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 | |
from itertools import ( | |
starmap, | |
) | |
import sys | |
import subprocess | |
import shlex |
NewerOlder