Skip to content

Instantly share code, notes, and snippets.

@alecmuffett
alecmuffett / urls.txt
Created November 23, 2017 17:02
Wikipedia Onion Experiment URLs
https://www.qgssno7jk2xcr2sj.onion/hello-onion/
https://en.qgssno7jk2xcr2sj.onion/hello-onion/
https://ceb.qgssno7jk2xcr2sj.onion/hello-onion/
https://sv.qgssno7jk2xcr2sj.onion/hello-onion/
https://de.qgssno7jk2xcr2sj.onion/hello-onion/
https://fr.qgssno7jk2xcr2sj.onion/hello-onion/
https://nl.qgssno7jk2xcr2sj.onion/hello-onion/
https://ru.qgssno7jk2xcr2sj.onion/hello-onion/
https://it.qgssno7jk2xcr2sj.onion/hello-onion/
https://es.qgssno7jk2xcr2sj.onion/hello-onion/
@alecmuffett
alecmuffett / config.yaml
Last active November 27, 2017 23:31
Sample EOTK Output for Wikipedia
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
@mahmoud
mahmoud / python_dev_permissions_history.yaml
Created June 7, 2016 06:29
A structured version of all the developer permission grants and drops since the year 2000, as documented by https://docs.python.org/devguide/developers.html
---
# 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
<!--
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/
-->
#!/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
#!/bin/bash
#
# _ _ __
# __ _ __ _ _ __| |__ (_)/ _|_ _
# / _` |/ _` | '__| '_ \| | |_| | | |
#| (_| | (_| | | | |_) | | _| |_| |
# \__, |\__,_|_| |_.__/|_|_| \__, |
# |___/ |___/
#
#
@zatarra
zatarra / brain.py
Last active April 30, 2024 09:49
Python script to parse data from Mindflex headband and convert it into a powerfull EEG device
#!/usr/bin/python
import serial
import sys
latestByte = ('c')
lastByte = ('c')
inPacket = False
myPacket = []
PLENGTH = 0
@slaporte
slaporte / averages
Last active December 31, 2015 00:09
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
"""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
@mahmoud
mahmoud / cycle_finding.py
Last active December 28, 2015 15:39
goddamnit cycles
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',