Below is the output of time
when for reading 250,000 MARC records with pymarc.
import pymarc
count = 0
for rec in pymarc.MARCReader(open('part01.dat', 'rb')):
Below is the output of time
when for reading 250,000 MARC records with pymarc.
import pymarc
count = 0
for rec in pymarc.MARCReader(open('part01.dat', 'rb')):
#!/usr/bin/env python | |
""" | |
This script will filter tweets that contain links to paywalled TimesMachine content | |
which you can pass on to the utils/wall.py script to generate a wall of tweets. | |
Get twarc: | |
git clone https://github.com/edsu/twarc.git | |
cd twarc |
{ | |
"features": [ | |
{ | |
"geometry": { | |
"coordinates": [ | |
-77.03098, | |
39.018909999999998 | |
], | |
"type": "Point" |
<!-- Uses both the "Book" and "Product" item types to support Offer relationships --> | |
<div vocab="http://schema.org/" resource="#record" typeof="Book Product"> | |
<h3 property="name">Le concerto</h3> | |
<table summary="Bibliographic Details"> | |
<tr> | |
<th>Main Author: </th> | |
<td property="author">Ferchault, Guy</td> | |
</tr> | |
<tr> | |
<th>Published: </th> |
20c20 | |
< <tr vocab="http://schema.org/" typeof="Offer"> | |
--- | |
> <tr property="offers" typeof="Offer"> | |
32c32 | |
< <tr vocab="http://schema.org/" typeof="Offer"> | |
--- | |
> <tr property="offers" typeof="Offer"> | |
44c44 | |
< <tr vocab="http://schema.org/" typeof="Offer"> |
TGM | |
Abstract works | |
Abstract drawings | |
Abstract paintings | |
Abstract photographs | |
Abstract prints | |
Activities | |
Arrivals & departures | |
{Departures} |
% telnet example.com 25 | |
Trying 93.184.216.119... | |
telnet: connect to address 93.184.216.119: Connection refused | |
Trying 2606:2800:220:6d:26bf:1447:1097:aa7... | |
telnet: connect to address 2606:2800:220:6d:26bf:1447:1097:aa7: No route to host | |
telnet: Unable to connect to remote host |
test with gist command line |
17040571 function calls (14811410 primitive calls) in 26.762 CPU seconds | |
Ordered by: standard name | |
ncalls tottime percall cumtime percall filename:lineno(function) | |
1 0.000 0.000 31.490 31.490 <string>:1(<module>) | |
10147 0.017 0.000 30.591 0.003 __init__.py:270(loads) | |
1 0.001 0.001 0.010 0.010 __init__.py:98(<module>) | |
389265 0.798 0.000 1.967 0.000 decoder.py:152(JSONString) | |
70008/10144 9.118 0.000 30.346 0.003 decoder.py:162(JSONObject) |
http = require('http'); | |
u1 = 'http://www.yahoo.com/'; | |
u2 = 'http://www.msn.com/'; | |
u3 = 'http://www.cnn.com/'; | |
http.get(u1, function(r1) { | |
console.log(1); | |
http.get(u2, function(r2) { | |
console.log(2); |