Skip to content

Instantly share code, notes, and snippets.

View Subzidion's full-sized avatar
🌧️

Carl Hiltbrunner Subzidion

🌧️
View GitHub Profile

Privacy Policy version 1.0 for the ElectionDrop iOS app

The ElectionDrop iOS app does not collect any user data of any kind. It just presents Election Results.

If you wish to verify this for yourself, see the source code at https://github.com/Subzidion/ElectionDrop

@Subzidion
Subzidion / gist:6f0e1c5a11d64c53d18bf0e8e03b838a
Created August 7, 2024 06:44
King County Election scraper
subzidion@mizithra ~/w/elections> cat checker.sh
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
β”‚ File: checker.sh
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 β”‚ while true; do RESULT=$(curl -s "https://aqua.kingcounty.gov/elections/2024/aug-primary/webresults.csv" | awk -F ',' '{ if(substr($5, 0, 32) == "Legislative District N
β”‚ o. 43" && substr($11, 0, 8) != "Write-in") print $13 }' | awk '{s+=$1} END {print s}');
2 β”‚ if [ "$RESULT" -eq "0" ]; then
3 β”‚ echo "Still no updates... Sleeping 5 seconds" && sleep 5; else
4 β”‚ echo "-----" && ./election-results.sh && ffplay -v 0 -nodisp -autoexit its-happening.mp3 && exit;
5 β”‚ fi; done;
{"lastUpload":"2020-06-27T07:56:42.035Z","extensionVersion":"v3.4.3"}
grades = {}
for cl in s_classes:
while True:
try:
a = int(input("What did you get in {}: ".format(cl)))
print("Registered for {}.".format(cl))
grades[cl] = a
break
except ValueError:
print("Please give a valid integer")
[subzidion@lodestone ~]$ docker run -i -t --entrypoint /bin/bash rpl-debian
root@cf176649766e:/# cd /opt/rosie/ffi/librosie/
root@cf176649766e:/opt/rosie/ffi/librosie# make
make librosie.so librosie.a SYSCFLAGS="-DLUA_USE_LINUX -D_GNU_SOURCE=1 -fPIC" SYSLIBS="-Wl,-E -ldl -lreadline"
make[1]: Entering directory '/opt/rosie/ffi/librosie'
Generating librosie C functions and headers
echo 'api = require "api"; api.write_C_FILES();' | "/opt/rosie/bin/rosie" -D >/dev/null
This is Rosie v0.99k
gcc -o librosie.o -c librosie.c -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX -D_GNU_SOURCE=1 -fPIC -I/opt/rosie/submodules/lua/include
librosie.c: In function 'print_stringArray':
@Subzidion
Subzidion / errors.txt
Created February 2, 2017 19:55
Compiling librosie failures
############
## Fedora ##
############
[subzidion@lodestone ~]$ docker run -i -t --entrypoint /bin/bash rpl-fedora
[root@c5d753f2eb2e /]# cd /opt/rosie/ffi/librosie/
[root@c5d753f2eb2e librosie]# make
make librosie.so SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[1]: Entering directory '/opt/rosie/ffi/librosie'
Generating librosie C functions and headers