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
""" | |
Implementation of the beta-geometric/NBD (BG/NBD) model from '"Counting Your Customers" the Easy Way: An Alternative to | |
the Pareto/NBD Model' (Fader, Hardie and Lee 2005) http://brucehardie.com/papers/018/fader_et_al_mksc_05.pdf and | |
accompanying technical note http://www.brucehardie.com/notes/004/ | |
Apache 2 License | |
""" | |
from math import log, exp | |
import numpy as np |
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
""" | |
Implementation of the shifted beta geometric (sBG) model from "How to Project Customer Retention" (Fader and Hardie 2006) | |
http://www.brucehardie.com/papers/021/sbg_2006-05-30.pdf | |
Apache 2 License | |
""" | |
from math import log |
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
burp:~ jd$ curl --referer http://t.co/ -is i.imgur.com/7RsFUmL.jpg | |
HTTP/1.1 302 Moved Temporarily | |
Server: cloudflare-nginx | |
Date: Wed, 14 Aug 2013 18:58:01 GMT | |
Content-Type: text/html | |
Content-Length: 165 | |
Connection: keep-alive | |
Location: http://imgur.com/7RsFUmL | |
CF-RAY: 9dfdfc465cb0707 |
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
6An | |
80P | |
2lf | |
1c6 | |
7zS | |
1U6 | |
2de | |
2yZ | |
2a2 | |
6I8 |
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
just write something funny, dufus. |
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
The token system is ridiculous because it makes security weaker, by offering a | |
larger surface area for attack. | |
If I had to guess, Salesforce is concerned that users are embedding their | |
passwords into scripts which could be stolen and used outside the company for | |
other purposes. Why are users putting their passwords in scripts? I imagine | |
it's because of the web-centric oauth flow coupled with short oauth token | |
expiration intervals but THATS a different story. | |
So *within* an authorized set of IP addresses, the regular password works. |
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
<?php | |
// … | |
/** | |
* Default, shared method for authenticating a connection to AWS. | |
* | |
* @param string $operation (Required) Indicates the operation to perform. | |
* @param array $payload (Required) An associative array of parameters for authenticating. See the individual methods for allowed keys. | |
* @return CFResponse Object containing a parsed HTTP response. | |
*/ | |
public function authenticate($operation, $payload) |
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
import logging | |
log = logging.getLogger('socrates') | |
from Queue import Empty, Full, Queue | |
from riak.transports import RiakPbcTransport | |
from riak.transports.transport import RiakTransport | |
class PbcPoolTransport(RiakTransport): |
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
# of keys: 10,000,000 | |
size of key: 60bytes (40bytes bitcask + 20bytes for name) | |
bounded size of each value: 1k | |
# of active items (usually per day): 1,000,000 (of course how you determine this number is up for grabs, I suggest measuring) | |
RF: 3 | |
130% * (1k * 1mm * 3) / 1024**3 ~= 4GB for filesystem cache | |
130% * (10mm * 60b * 3) / 1024**3 ~= 2GB+ for key space | |
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
from riak import RiakError | |
class Bucket(object): | |
"""Wrap up retries and conflict resolution""" | |
def __init__(self, client, name, resolve, retries=5): | |
self.client = client | |
self.name = name | |
self.bucket = client.bucket(name) # base bucket | |
self.resolve = resolve | |
self.retries = retries |