Skip to content

Instantly share code, notes, and snippets.

View morisy's full-sized avatar

Michael Morisy morisy

View GitHub Profile
@morisy
morisy / gist:1356643
Created November 10, 2011 23:41
Sample Privacy Policy
PRIVACY POLICY
Welcome to the Muckrock.com web-site (the “Site”)! Muckrock is committed to protecting your privacy and trust and will only use your data as set forth in this Privacy Policy and any amendments hereto. This Privacy Policy discloses the privacy practices for the Site and explains how Muckrock (“us” or “we”) collect information and how we use the information that we collect.
Please read this information carefully before accessing the Site. The privacy statement may be amended at any time, with or without notice to users. You should periodically visit this page to review the then current Privacy Policy. Your use of the Site constitutes your consent and agreement to abide by this Privacy Policy and your consent to the use of the information that we collection, including personally identifiable information, as set forth in this Privacy Policy. Please regularly consult this Privacy Policy in order to be aware of updated practices.
Should you not wish Muckrock to collect and use your person
@morisy
morisy / Get-Uptime.ps1
Created May 30, 2016 13:36
Getting Computer Uptime Using PowerShell
#requires -version 2
<#
.SYNOPSIS
Outputs the last bootup time and uptime for one or more computers.
.DESCRIPTION
Outputs the last bootup time and uptime for one or more computers.
.PARAMETER ComputerName
@morisy
morisy / Deputy Project Editor.md
Created June 19, 2017 19:53
Deputy Project Editor Opening

Deputy Project Editor – The Boston Globe Boston Globe Media Partners – Boston, MA

The Boston Globe is looking for an experienced journalist with strong editing and organizational skills to help direct the Globe’s investigative reporting and other long form projects, including the work of the Spotlight Team. This is a new position created as part of an expansion of the Globe’s long form journalism commitment, including additional investigative reporters and a new narrative desk. The deputy projects editor will directly supervise some investigative reporters and share oversight of projects throughout the newsroom. Candidates should have an excellent ability to visualize ambitious stories and to help guide reporters through the many challenges of project journalism, including fights over public records, data analysis and shaping the narrative. Please send a resume, cover letter and links to at least three projects you’ve worked on to Scott Allen, AME for Projects, at scott.allen@globe.com.

@morisy
morisy / delete_tweets.py
Created January 9, 2017 05:15 — forked from smortime/delete_tweets.py
Script to delete all of your tweets. Requires Python 3.x, Twython, and API keys.
#Schuyler Mortimer
from twython import Twython
import sys
#get from twitter developer site
APP_KEY = ''
APP_SECRET = ''
TOKEN = ''
TOKEN_SECRET = ''
@morisy
morisy / Sample Output.json
Created August 28, 2019 18:53
Sample output from GovLens
{
"id": 2,
"name": "Traffic, Parking & Transportation",
"Website": "https: //www.cambridgema.gov/traffic",
"profile": {
"security_and_privacy": {
"https": {
"met_criteria": True,
"info": None
},
@morisy
morisy / Reset-LocalAccountPassword.ps1
Created March 8, 2017 01:54
This article presents a new script, Reset-LocalAccountPassword.ps1, which makes it easier and more secure to reset local account passwords on computers.
# Reset-LocalAccountPassword.ps1
# Written by Bill Stewart (bstewart@iname.com)
#requires -version 2
<#
.SYNOPSIS
Resets the built-in Administrator account or a named local account password on one or more computers.
.DESCRIPTION
@morisy
morisy / export_notes.py
Created March 19, 2021 15:05
Export notes from a given DocumentCloud document into a spreadsheet
import requests
import csv
from documentcloud import DocumentCloud # https://documentcloud.readthedocs.io/en/latest/gettingstarted.html#installation
# Install DocumentCloud Python Wrapper first: https://documentcloud.readthedocs.io/en/latest/index.html
USERNAME = input('Username: ')
PASSWORD = input('Password: ')
client = DocumentCloud(USERNAME, PASSWORD)
#!/usr/bin/env python2
# -- coding: utf-8 --
import requests
import json
import csv
# Step 1: Create a file "file_with_agencies.csv" and add the agency IDs you want to file with in it, one per line. You can use 248 and 21983 as test agencies. You do not normally need to modify the following line. Filing with test agencies will deduct requests from your account, but if you reach out we can refund those requests or you can cancel them yourself within 30 minutes.
with open('file_with_agencies.csv', 'rb') as f:
"""
file: proj_get_doc_urls.py
what: script to download all the PDFs from a specified project
To use, install the python DocumentCloud wrapper (often using `pip install documentcloud` from the command line will do), and then run this script from the directory you want to save your files to.
Read more about the DocumentCloud Python Wrapper here:
https://documentcloud.readthedocs.io/en/latest/index.html
"""

Solr Database Expert to Help Optimize and Implement New Feature

Background

We are a non-profit organization that helps newsrooms, researchers, and public interest organizations host and share primary source documents. On the backend, we currently have 7.8 million documents, 131 million pages of searchable text, and 600 thousand individual shared notes in our database on production.

Each document has a somewhat complex permission system, which allows a document be set to private (only the owner can see it), shared (other members of their organization can see it), or public (publicly viewable and searchable), as well as a secondary set of permissions that allow documents to be added to project collections that also can grant access.

Users can put in a search on a centralized search bar that will parse through all of our documents and return matches that the user has permission to (if a person is not logged in, they can search through all public documents and get relevant results).