Skip to content

Instantly share code, notes, and snippets.

@lawlesst
lawlesst / clean_nbs.py
Last active May 21, 2020 11:28 — forked from cmoscardi/clean_nbs.py
Jupyter Notebook Output Cleaning Script
import io
import sys
from nbformat import read, write
# Handle either stdin or a filename
if __name__ == '__main__':
for filename in sys.argv[1:]:
print(filename, file=sys.stderr)
@lawlesst
lawlesst / wos.php
Created January 23, 2014 19:51 — forked from domoritz/wos.php
<?php
$auth_url = "http://search.isiknowledge.com/esti/wokmws/ws/WOKMWSAuthenticate?wsdl";
$auth_client = @new SoapClient($auth_url);
$auth_response = $auth_client->authenticate();
$search_url = "http://search.isiknowledge.com/esti/wokmws/ws/WokSearchLite?wsdl";
$search_client = @new SoapClient($search_url);
$search_client->__setCookie('SID',$auth_response->return);
$search_array = array(
prefix publisher journals dois
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9
@lawlesst
lawlesst / rdfalchemy_test_dbpedia2.py
Created November 16, 2012 12:19 — forked from tatiana/rdfalchemy_test_dbpedia2.py
Trying to replace SPARQL query using RDFAlchemy's rdfSubject
"""
See RDFAlchemy-dev list discussion:
https://groups.google.com/forum/?hl=en&fromgroups=#!topic/rdfalchemy-dev/D1AyXQwmOuw
"""
from rdfalchemy import rdfSingle, rdfSubject
from rdfalchemy.sparql import SPARQLGraph
@lawlesst
lawlesst / gist:2184245
Created March 24, 2012 15:23 — forked from anonymous/gist:2184239
Hot dog pricing data
hotdog_years = ["2011", "2010", "2009"]
hotdog_data = [{"Team":"Boston Red Sox","TeamID":"redsox","2011":4.5,"2010":4.5,"2009":4.5},
{"Team":"New York Yankees","TeamID":"yankees","2011":3,"2010":3,"2009":3},
{"Team":"Chicago Cubs","TeamID":"cubs","2011":4.5,"2010":4.25,"2009":3},
{"Team":"Chicago White Sox","TeamID":"whitesox","2011":3.5,"2010":3.25,"2009":3.25},
{"Team":"New York Mets","TeamID":"mets","2011":5,"2010":5,"2009":4.75},
{"Team":"Philadelphia Phillies","TeamID":"phillies","2011":3.75,"2010":3.75,"2009":3.75},
{"Team":"Los Angeles Dodgers","TeamID":"dodgers","2011":5,"2010":5,"2009":5},
{"Team":"St. Louis Cardinals","TeamID":"cardinals","2011":4.25,"2010":4,"2009":4},
{"Team":"Houston Astros","TeamID":"astros","2011":4.75,"2010":4.75,"2009":4.75},