Skip to content

Instantly share code, notes, and snippets.

View an-empty-string's full-sized avatar
🏳️‍⚧️

Tris Emmy Wilson an-empty-string

🏳️‍⚧️
View GitHub Profile
# visit https://www.mlb.com/redsox/schedule/downloadable-schedule to get new schedule
URL = "https://www.ticketing-client.com/ticketing-client/csv/GameTicketPromotionPrice.tiksrv?team_id=111&home_team_id=111&display_in=singlegame&ticket_category=Tickets&site_section=Default%E2%8A%82category=Default&leave_empty_games=true&event_type=T&year=2023&begin_date=20230201"
LOCATION = "Fenway Park"
PUSHOVER_KEY = "(pushover API key)"
PUSHOVER_USER = "(pushover user key)"
import csv
import arrow
import requests
#!/usr/bin/env python3
import functools
import json
import os
import shlex
import subprocess
import sys
from typing import List
PATH = os.path.expanduser("~/.clipboard")
@an-empty-string
an-empty-string / pomodoro.py
Created February 8, 2021 04:14
pomodoro.py
from asyncio_mqtt import Client
import json
import asyncio
from collections import namedtuple
from pathlib import Path
from dataclasses import dataclass
from enum import Enum
from typing import NamedTuple
@an-empty-string
an-empty-string / pomodoro.py
Created February 8, 2021 04:13
pomodoro service
from asyncio_mqtt import Client
import json
import asyncio
from collections import namedtuple
from pathlib import Path
from dataclasses import dataclass
from enum import Enum
from typing import NamedTuple
@an-empty-string
an-empty-string / keybase.md
Created September 11, 2020 03:45
keybase.md

Keybase proof

I hereby claim:

  • I am an-empty-string on github.
  • I am an_empty_string (https://keybase.io/an_empty_string) on keybase.
  • I have a public key ASDFlBhZ6k0be6OGH1WMk3-0e-DztpYUXpJuk2l8a5OEUgo

To claim this, I am signing this object:

@an-empty-string
an-empty-string / dump_sections.py
Created June 29, 2017 07:03
schedule data converter
"""Schedule-to-JSON converter.
Usage:
dump_sections.py <term> [-i] [-o <filename>]
dump_sections.py (-h | --help)
Options:
-i --include-canceled Include canceled courses in the data.
-o --output=<filename> Send JSON output to a file.
tt = 0
n = 0
import time
input()
while True:
a = time.time()
input()
n += 1
tt += time.time() - a
print((n / tt) * 60)

Keybase proof

I hereby claim:

  • I am fwilson42 on github.
  • I am fwilson (https://keybase.io/fwilson) on keybase.
  • I have a public key whose fingerprint is C751 1F5E 5650 CB9A 5246 37FF 42F2 7EB2 73DD D719

To claim this, I am signing this object:

@an-empty-string
an-empty-string / sso.py
Created May 29, 2015 19:11
Intranet2 SSO
"""
A wrapper for Intranet2's single sign-on system.
Here's a brief overview of how Iodine SSO works:
- you make a request token (with generate_token)
- you redirect the user to a URL containing that request token
- when the user allows access, they are redirected back to your application
with an access token in the "sso" parameter
- you verify the access token (with check_access_token_validity)
- if you need to, you can start a session to access the API and such
@an-empty-string
an-empty-string / identify-msg-check.py
Last active July 17, 2024 19:15
identify-msg checkmark for weechat
# Copyright 2014-2015, nyuszika7h <[email protected]> (and fwilson, maybe. <[email protected]>)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in