This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#### | |
# ./dedup FROM TO | |
# | |
# move duplicate emails from FROM to TO | |
#### | |
duplicates=$(grep --no-filename -rE "^To:\s[[:alpha:]]+" $1 | sort | uniq -c | \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
>>> root = etree.Element('foo') | |
>>> el = get_path('bar/baz', root).text = 'foobaz' | |
>>> etree.tostring(root) | |
'<foo><bar><baz>foobaz</baz></bar></foo>' | |
>>> get_path('bar/gaz', root).text = 'foogaz' | |
>>> etree.tostring(root) | |
'<foo><bar><baz>foobaz</baz><gaz>foogaz</gaz></bar></foo>' | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head><meta charset="utf-8" /> | |
<title>Python 2</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
<style type="text/css"> | |
/*! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Unicode and Strings in Python 2\n", | |
"\n", | |
"When dealing with strings and unicode in most languages there are few rules to live by. This is no different in python, regardless of whether you are talking about 2 or 3.\n", | |
"\n", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Queue = function() { | |
var reqs = [], | |
dfds = []; | |
function run() { | |
var next = reqs.shift(); | |
if (next) { | |
$.ajax(next); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
######################## | |
# | |
# @TODO: Location field in current Solr index has both libRecord and mapRecord - | |
# should there be both or just libRecord? | |
# | |
######################## | |
from lxml import etree | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import fileinput | |
import sys | |
import json | |
import apachelog | |
parser = apachelog.parser(apachelog.formats['extended']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import json | |
import sys | |
from datetime import timedelta, datetime | |
from random import randint, choice | |
countries = ('US', 'GB', 'FR', 'DE',) | |
dlc = ('CSAIL', 'DUSP', 'Lincoln Lab',) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import fileinput | |
import json | |
from datetime import datetime | |
import time | |
from pymongo import MongoClient | |
def get_collection(conn=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Rivitzz!!~</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> | |
</head> | |
<body> |
OlderNewer