Skip to content

Instantly share code, notes, and snippets.

View anseljh's full-sized avatar

Ansel Halliburton anseljh

View GitHub Profile
(llm-experiments-py3.9) (base) anseljh@Reckoner LLM-experiments % /Users/anseljh/Library/Caches/pypoetry/virtualenvs/llm-experiments-C4hRgssD-py3.9/bin/python /Users/anseljh/Code/LLM-experiments/complaint.py
****************************** Get complaint document from CourtListener ******************************
89575
****************************** Citation extraction (eyecite) ******************************
Found 45 citations.
# Add a Digital Ocean storage Volume and move your whole Mastodon directory into it!
# Ansel Halliburton
# https://github.com/anseljh
# Unmount the volume's current mountpoint
# /dev/sda on /mnt/masty_vol_1 type ext4 (rw,noatime,discard)
umount /dev/sda
# Stop services
# We keep nginx up so it can at least serve a 500 error.

Code:

from os import environ
import certifi

def print_env():
    print(f"REQUESTS_CA_CERT is {environ.get('REQUESTS_CA_CERT')}")

def set_env():
@anseljh
anseljh / opinion-annotations.csv
Created October 17, 2017 21:49
Potential annotations, mostly from Pro Publica reporting on Supreme Court errors (https://www.propublica.org/article/supreme-court-errors-are-not-hard-to-find)
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
Case title,CL opinion ID,Source name,Source URL,Concern Type,Concern Detail,Quotation,Notes
NASA v. Nelson,182990,ProPublica,https://www.propublica.org/article/supreme-court-errors-are-not-hard-to-find,Factual error,Relies on false fact from amicus brief,(“[M]ore than 88% of U. S. companies . . . perform background checks on their em ployees”),
Arizona v. U.S.,803270,ProPublica,https://www.propublica.org/article/supreme-court-errors-are-not-hard-to-find,Factual error,Relies on unsupported statistic in report by Center for Immigration Studies,"in the State’s most populous county, these aliens are reported to be responsible for a disproportionate share of serious crime",
U.S. v. Windsor,945737,ProPublica,https://www.propublica.org/article/supreme-court-errors-are-not-hard-to-find,Factual error,Understates number of states that prohibit marriages between first cousins,"Likewise the permissible degree of consanguinity can vary (most States permit first cousins to marry, but a handful—such as Iowa and Washington,
@anseljh
anseljh / Privacy-by-Design.md
Last active February 8, 2018 22:42
Enhancing Alert App User Privacy by Design

SMS and Privacy

There are a few problems with delivering alerts via SMS, but they mostly boil down to this: SMS is not very private.

For vulnerable audiences, it’s preferable to not collect any subscriber information at all. This isn’t possible with SMS, because you have to know the recipient’s phone number to deliver a message. Unless you’re talking about burners—which most people won’t have—that phone number is tied to a real identity. This is a vulnerability in at least these scenarios:

  • If the alerting app itself gets targeted (whether by LE or other malicious actors), user-identifying information could be leaked.
  • Phone companies cooperate with LE, through legal process (subpoenas) or otherwise, to find out which phone subscribers are receiving SMS alerts.
  • LE , IC, or well-resourced hackers snoop on the SMS network.
@anseljh
anseljh / .bashrc
Created August 12, 2016 21:39
Grep colors that don't suck (too much)
# Grep colors!
# Colors: http://www.termsys.demon.co.uk/vtansi.htm#colors
# Parameters: http://blog.amit-agarwal.co.in/2011/03/06/grep_colors-change-the-colors-in-the-grep-output/
# export GREP_OPTIONS='--color=auto'
export GREP_COLORS="fn=32:ln=2;32:sl=37:mt=31:cx=2"
@anseljh
anseljh / erroneous.py
Created March 10, 2016 08:16
SSL error
>>> r = requests.get("https://www.krinternetlaw.com/", verify=False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/requests/api.py", line 67, in get
return request('get', url, params=params, **kwargs)
File "/Library/Python/2.7/site-packages/requests/api.py", line 53, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Python/2.7/site-packages/requests/sessions.py", line 576, in send
Using worker: worker-linux-docker-e364140a.prod.travis-ci.org:travis-linux-5
Build system information
Build language: node_js
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
@anseljh
anseljh / gist:c5ceaca532643ac81f5a
Created September 4, 2015 23:42
Test failures
Using worker: worker-linux-docker-89b3c360.prod.travis-ci.org:travis-linux-1
Build system information
Build language: node_js
Build image provisioning date and time
Thu Feb 5 15:09:33 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04.5 LTS
Release: 12.04
@anseljh
anseljh / keybase.md
Created May 22, 2015 00:36
keybase.md

Keybase proof

I hereby claim:

  • I am anseljh on github.
  • I am anseljh (https://keybase.io/anseljh) on keybase.
  • I have a public key whose fingerprint is 6099 C6CA EBE5 627D A5D4 EDD2 1249 A230 FE3F 0BC3

To claim this, I am signing this object: