Skip to content

Instantly share code, notes, and snippets.

Reed Jessen ReedJessen

Block or report user

Report or block ReedJessen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5abb06f78c045573d93c7c570e887e4b
from django.http import HttpResponse
import pandas as pd
def foo():
your_dataframe = pd.Dataframe()
response = HttpResponse(content_type='text/csv')
response['Content-Disposition'] = 'attachment; filename=filename.csv'
View reddit-unsubscribe-all-subreddits.js
// Visit and run the following in console (browser dev tools)
// Wait until all the buttons have visibly toggled, refresh page to confirm.
$('.fancy-toggle-button .remove').each(function(i, elem) { setTimeout(function(){ $(elem).trigger('click'); }, i*500) });
View Reddit Unsave all posts and comments
Open up browser console, for Chrome, hit F12 and copy-paste and enter this
$("a").filter(function(index){return $(this).text()==="unsave"}).click();setTimeout(function(){location.reload();},500);
Repeat until all items are unsaved.
View Blockstack Verification
Verifying my Blockstack ID is secured with the address 1j7jdHTvQFD3Lq9PywG43oRRg1mYZbkee
ReedJessen /
Created Dec 30, 2016
Query what patent's Rony Abovitz is not an inventor on
MATCH (a:Person)-[r:Invented]->(b:Patent)
MATCH (u:Person {full_name:'Abovitz, Rony'})
WHERE  not (u)-[:Invented]-(b) 
ReedJessen /
Created Dec 30, 2016
Query to determine how many Patents are in the dataset
MATCH (n:Patent) RETURN count(n)
ReedJessen /
Created Dec 30, 2016
Get all the patents invented by Rony Abovitz
MATCH (a:Person {full_name: 'Abovitz, Rony'}) -[r]-> (b:Patent)
MATCH(a:Person {full_name: "Jon Doe"})
MATCH(b:Patent {grant_number: "7477713"}) 
MERGE(a)-[:Invented {priority_date:"2004-03-02"}]->(b)
ReedJessen /
Created Dec 30, 2016
Methods for writing relationships between two nodes in Neo4j
class Neo4jWriter():
    def __init__(self):
        config = configparser.ConfigParser()'config.ini')

        user_name = config.get('neo4j credentials', 'user_name')
        password = config.get('neo4j credentials', 'password')
ReedJessen /
Last active Jan 6, 2017
Runtime for building an Neo4j graph from IP Street Patent Data
from neo4j_writer import Neo4jWriter
from entity_models import Person, Patent, Company
from IPStreet import client, query

if __name__ == '__main__':
You can’t perform that action at this time.