I hereby claim:
- I am dterei on github.
- I am davidt (https://keybase.io/davidt) on keybase.
- I have a public key whose fingerprint is 2828 4DE0 0626 E0E8 7065 3EE5 1578 48A4 9FB4 2839
To claim this, I am signing this object:
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <arpa/inet.h> | |
#include <netinet/ether.h> | |
#include <netinet/ip.h> | |
#include <netinet/udp.h> |
#!/bin/sh | |
curl -vi https://platform-api.newrelic.com/platform/v1/metrics \ | |
-H "X-License-Key: $1" \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ | |
-X POST -d '{ | |
"agent": { | |
"host": "cluster.memcachier.com" | |
"pid": 1111, |
import os | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_queue.settings") | |
# Fix django closing connection to MemCachier after every request (#11331) | |
from django.core.cache.backends.memcached import BaseMemcachedCache | |
BaseMemcachedCache.close = lambda self, **kwargs: None | |
from django.core.wsgi import get_wsgi_application | |
application = get_wsgi_application() |
# Fix django closing connection to MemCachier after every request (#11331) | |
from django.core.cache.backends.memcached import BaseMemcachedCache | |
BaseMemcachedCache.close = lambda self, **kwargs: None |
/* | |
* Test that libmemcached is built with SASL support. | |
*/ | |
#include <stdio.h> | |
#include <libmemcached/memcached.h> | |
const char* key = "abc"; | |
const char* value = "value"; | |
// test basic get/set operation works. |
I hereby claim:
To claim this, I am signing this object:
""" | |
This is taken wholesale from JohnnyCache except instead of overriding | |
_get_memcache_timeout in the Django pylibmc backend, we use the Pylibmc | |
backend from django_pylibmc which supports SASL | |
""" | |
from django_pylibmc.memcached import PyLibMCCache | |
class JohnnyPyLibMCCache(PyLibMCCache): | |
""" |
# BB#24: # %nujB | |
# in Loop: Header=BB257_1 Depth=1 | |
addl 84(%esi), %edi | |
movl 20(%esi), %ebx | |
movsd 32(%ebp), %xmm0 | |
addl 80(%esi), %edx | |
movsd 8(%ebp), %xmm1 | |
addl 76(%esi), %ecx | |
addl 72(%esi), %eax | |
subsd 8(%ebx,%edi,8), %xmm0 |
nujB: ; preds = %ctTU | |
%nujF = load i32* %nujE ; <i32> [#uses=1] | |
%nujK = add i32 %nujs, %nujF ; <i32> [#uses=1] | |
%nujO = load i32* %nujN ; <i32> [#uses=1] | |
%nujR = shl i32 %nujK, 3 ; <i32> [#uses=1] | |
%nujP = add i32 %nujO, 8 ; <i32> [#uses=1] | |
%nujS = add i32 %nujP, %nujR ; <i32> [#uses=1] | |
%nujT = inttoptr i32 %nujS to double* ; <double*> [#uses=1] | |
%nujU = load double* %nujT ; <double> [#uses=1] | |
%nujY = load double* %nuiL ; <double> [#uses=1] |
import Data.Word | |
collatzLen :: Int -> Word32 -> Int | |
collatzLen c 1 = c | |
collatzLen c n = collatzLen (c+1) $ if n `mod` 2 == 0 then n `div` 2 else 3*n+1 | |
pmax x n = x `max` (collatzLen 1 n, n) | |
main = print . solve $ 1000000 | |
where solve xs = foldl pmax (1,1) [2..xs-1] |