Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
19 -> for cycle in nx.simple_cycles(c): | |
20 print 'found cycle, length: %s' % len(cycle) | |
21 all_cycles.append(cycle) | |
22 if len(all_cycles) % 10 == 0 and do_pdb: | |
23 import pdb;pdb.set_trace() | |
24 return all_cycles | |
(Pdb) pp cycle | |
[u'Baroque_sites_of_Lazio', | |
u'Rome', | |
u'Ancient_Rome', |
"""Markov Chain. | |
Pass input to stdin. | |
Usage: | |
markov <len> [-n <n>] [-p <p>] [-c] [-s <s>] | |
markov -h | --help | |
Options: | |
<len> The length (in tokens) of the output to generate |
MariaDB [enwiki_p]> SELECT rc_title, AVG(rc_new_len - rc_old_len) FROM recentchanges WHERE rc_namespace = 0 AND rc_timestamp > 20131203000000 GROUP BY rc_title ORDER BY AVG(rc_new_len - rc_old_len) DESC LIMIT 10; | |
+---------------------------------------------------------------------------------+------------------------------+ | |
| rc_title | AVG(rc_new_len - rc_old_len) | | |
+---------------------------------------------------------------------------------+------------------------------+ | |
| Richard_Helms,_early_career | 145301.0000 | | |
| List_of_Scheduled_prehistoric_Monuments_in_Pembrokeshire_(domestic_and_defence) | 75804.0000 | | |
| Opinion_polling_for_the_German_federal_election,_2013 | 53762.0000 | | |
| Taikyoku_shogi | 52598.0000 | | |
| 1998 |
#!/usr/bin/python | |
import serial | |
import sys | |
latestByte = ('c') | |
lastByte = ('c') | |
inPacket = False | |
myPacket = [] | |
PLENGTH = 0 |
#!/bin/bash | |
# | |
# _ _ __ | |
# __ _ __ _ _ __| |__ (_)/ _|_ _ | |
# / _` |/ _` | '__| '_ \| | |_| | | | | |
#| (_| | (_| | | | |_) | | _| |_| | | |
# \__, |\__,_|_| |_.__/|_|_| \__, | | |
# |___/ |___/ | |
# | |
# |
#!/usr/bin/env python | |
""" | |
print rudimentary stats about the revisions to a Wikipedia article on the command line | |
""" | |
MAX_ARTICLES = 10000 # some bots have edited millions of articles | |
import sys | |
import json |
<!-- | |
This is a sample application that shows how to use the Pageview API. | |
Read more here: https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageview_API | |
The most important code is inside the updateChart function, towards the end of the file. | |
The rest of the code is just html, css and input setup. | |
Disclaimer: This is just sample code, it has not been tested in all browsers/devices. | |
Distributed under the Unlicense: http://unlicense.org/ | |
--> |
--- | |
# This document is the YAML version of: https://docs.python.org/devguide/developers.html | |
initials: | |
TGP: Tim Peters | |
GFB: Georg Brandl | |
BAC: Brett Cannon | |
NCN: Neal Norowitz | |
DJG: David Goodger | |
MvL: Martin van Loewis | |
GvR: Guido van Rossum |
LOG_LEVEL: info | |
TOR_ADDRESS: 127.0.0.1 | |
TOR_PORT: 9055 | |
REFRESH_INTERVAL: 600 | |
PUBLISH_CHECK_INTERVAL: 300 | |
INITIAL_DELAY: 60 | |
STATUS_SOCKET_LOCATION: /Users/alecm/src/eotk/onionbalance.d/ob-status.sock | |
DESCRIPTOR_VALIDITY_PERIOD: 86400 | |
DESCRIPTOR_OVERLAP_PERIOD: 3600 | |
DESCRIPTOR_UPLOAD_PERIOD: 3600 |