- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>author</key> | |
<string>Lars H. Nielsen (translated by Tony Kemp)</string> | |
<key>name</key> | |
<string>Wombat</string> | |
<key>settings</key> | |
<array> |
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 | |
""" | |
A script to query the Amazon Web Services usage reports programmatically. | |
Ideally this wouldn't exist, and Amazon would provide an API we can use | |
instead, but hey - that's life. | |
Basically takes your AWS account username and password, logs into the | |
website as you, and grabs the data out. Always gets the 'All Usage Types' |
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
set thePath to (path to desktop as Unicode text) & "ThingsToDo.txt" | |
set thingsToDoFile to (open for access file thePath with write permission) | |
set eof of thingsToDoFile to 0 | |
set cr to ASCII character 10 | |
tell application "Things" | |
-- Export to-dos from Inbox | |
write "Inbox:" & return to thingsToDoFile as «class utf8» | |
repeat with td in to dos of list "Inbox" |
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
# Optimized for writes, sort on read | |
# LVC | |
redis.hset("bonds|1", "bid_price", 96.01) | |
redis.hset("bonds|1", "ask_price", 97.53) | |
redis.hset("bonds|2", "bid_price", 95.50) | |
redis.hset("bonds|2", "ask_price", 98.25) | |
redis.sadd("bond_ids", 1) | |
redis.sadd("bond_ids", 2) |
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
/* sample aggregate command queries */ | |
// make sure we're using the right db; this is the same as "use mydb;" in shell | |
db = db.getSisterDB("aggdb"); | |
// just passing through fields | |
var p1 = db.runCommand( | |
{ aggregate : "article", pipeline : [ | |
{ $project : { | |
tags : 1, | |
pageViews : 1 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
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
########################################################## | |
# How to NEVER use Lambdas. An inneficient and yet educa-# | |
# tonal guide to the proper misuse of the lambda constru-# | |
# ct in Python 2.x. [DO NOT USE ANY OF THIS EVER] # | |
# by: e000 (13/6/11) # | |
########################################################## | |
## Part 1. Basic LAMBDA Introduction ## | |
# Well, it's worth diving straight into what lambdas are. | |
# Lambdas are pretty much anonymous "one line" functions |
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/local/bin/python | |
import urllib | |
import urllib2 | |
import re | |
import json | |
import htmlentitydefs | |
import cookielib | |
LOGIN,PASSWD = "[email protected]", "yourpassword" |
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 | |
import redis | |
import random | |
import pylibmc | |
import sys | |
r = redis.Redis(host = 'localhost', port = 6389) | |
mc = pylibmc.Client(['localhost:11222']) |
OlderNewer