Skip to content

Instantly share code, notes, and snippets.

View adelevie's full-sized avatar

Alan deLevie adelevie

View GitHub Profile
@adelevie
adelevie / legal-text-summarization.md
Last active April 23, 2024 11:20
Saving a few results from my searches for research on legal text summarization.
[{"value":1,"text":"See, e.g., National Arts and Cultural Organizations Comments at 3 (“[B]roadband Internet service has inspired tremendous innovation, which has in turn enabled individual artists and arts organizations to reach new audiences, cultivate patrons and supporters, collaborate with peers, stimulate local economies and enrich cultural and civic discourse.”); Common Cause Comments at 3-8 (arguing that the open Internet promotes free speech and civic engagement); Letter from Lauren M. Wilson, Policy Counsel, Free Press to Marlene H. Dortch, Secretary, FCC, GN Docket Nos. 14-28, 10-127 (filed Jan. 13, 2015) (Free Press et al. Jan. 13, 2015 Ex Parte Letter) (describing the important role the open Internet plays in the work of public interest, social justice, and activist groups); Higher Education and Libraries Comments at ii (“Libraries and institutions of higher education depend upon an open Internet to carry out their missions and to serve their communities.”); Engine Advocacy Comments at 3-13 (argu
@adelevie
adelevie / courtlistener.sh
Last active May 16, 2019 17:18
Download and unzip court opinions from Courtlistener
for jurisdiction in scotus ca1 ca2 ca3 ca4 ca5 ca6 ca7 ca8 ca9 ca10 ca11 cadc cafc; do
for i in {1980..2012}; do
if [ -f $jurisdiction-$i.xml ];
then
echo "File already exists. Skipping download."
else
echo "Downloading..."
curl -o $jurisdiction-$i.xml.gz -L https://www.courtlistener.com/dump-api/$i/$jurisdiction.xml.gz
fi
done
@adelevie
adelevie / web.lua
Created December 11, 2012 06:11
Using webscript.io's API to build a Sinatra-like web framework
[[
This is a proof of concept that you can run locally to upload scripts to webscript.io. It provides a simple Sinatra-like API (in Lua) for defining URL routes and their corresponding actions.
To run on your own, you'll need your own webscript account (and api key) and Lua installation.
Just copy the script locally, fill in your own values in the `app` table below, cd into the directory and run `lua yourfilename.lua`.
Then log into webscript.io to make sure everything is there!
This is clearly highly experimental, probably broken in many ways, and only supports GET requests. Use at your own risk. Also, I'm totally new to Lua, so feel free to point out any egregious mistakes.
### Keybase proof
I hereby claim:
* I am adelevie on github.
* I am adelevie (https://keybase.io/adelevie) on keybase.
* I have a public key ASAWiVCpiWVcnyRlxiHEQOgWRveydKoWI2oHaWJXhPQEtAo
To claim this, I am signing this object:
@adelevie
adelevie / account-controller.js
Last active December 2, 2017 13:11
Parse.com + Angular.js + Login (+ OAuth.js)
'use strict';
/**
* AccountController allows the User to change settings, link with their GitHub accounts, etc
*/
skeletonApp.controller('AccountController', [
'$scope', '$location', '$rootScope', 'OAuthService', 'ParseService', function($scope, $location, $rootScope, OAuthService, ParseService) {
// redirect to "/login" if user is not logged in
@adelevie
adelevie / .travis.yml
Created April 9, 2015 18:15
Automated accessibility testing using Travis-CI and pa11y
before_script:
- npm install -g http-server
- npm install -g pa11y
- npm install -g pa11y-reporter-ci
script:
- nohup http-server -p 8080 >/dev/null 2>&1 &
- pa11y localhost:8080/index.html -r ci -s WCAG2AAA
require 'sinatra'
require 'active_record'
ActiveRecord::Base.establish_connection(
:adapter => 'mysql',
:encoding => 'utf8',
:database => 'foo',
:username => 'bar',
:password => 'baz',
:host => 'localhost'
{
"auctions": [
{
"bids": [
{
"amount": 987,
"auction_id": 38,
"bidder_id": 184,
"created_at": "2016-11-17T00:41:43+00:00",
"id": 407,
alias curl='docker run --rm appropriate/curl'
alias jq='docker run -i pinterb/jq:0.0.15'
alias python='docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python'
alias ruby='docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp ruby:2.1 ruby'
curl 'https://api.github.com/repos/stedolan/jq/commits' | jq '.'
python -c "print('hello from python')"
ruby -e "puts 'hello from ruby'"