I hereby claim:
- I am bartdag on github.
- I am bartdag (https://keybase.io/bartdag) on keybase.
- I have a public key whose fingerprint is EA6F 2C05 04A4 4379 8BD3 7E9A 7632 0A1B 9015 10C4
To claim this, I am signing this object:
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
import py4j.GatewayServer; | |
public class OperatorExample { | |
// To prevent integer overflow | |
private final static int MAX = 1000; |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
/** | |
* Main application/strategy | |
*/ | |
public class Application { |
import sys | |
import enchant | |
from multiprocessing import Pool | |
if sys.version_info[0] < 3: | |
range = xrange | |
else: | |
range = range |
package p1; | |
import py4j.GatewayServer; | |
public class MyApplication { | |
public static void main(String[] args) { | |
GatewayServer server = new GatewayServer(null); | |
// This will start the Py4J server and now, the JVM is ready to receive Python commands. |
export CFLAGS="-Os -w -pipe -march=core2 -msse4 -arch x86_64" | |
export LDFLAGS="-arch x86_64" | |
pip install uwsgi-1.2-rc1.tar.gz |
#!/usr/bin/python | |
import pstats | |
import sys | |
stats = pstats.Stats(sys.argv[1]) | |
newstats = stats.sort_stats('time') | |
newstats.print_stats(100) |
#!/usr/bin/python | |
import argparse | |
from collections import namedtuple | |
import pstats | |
FunctionStats = namedtuple('FunctionStats', ['calls', 'tottime', 'cumtime', | |
'path', 'function_name', 'line_number', 'stat']) |
*.po merge=pofile | |
*.pot merge=pofile |
I hereby claim:
To claim this, I am signing this object:
from rest_framework import authentication | |
from rest_framework import exceptions | |
class TokenParameterAuthentication(authentication.TokenAuthentication): | |
def authenticate(self, request): | |
token = request.GET.get('token') | |
if token == "": | |
msg = "Invalid token parameter. No credentials provided." | |
raise exceptions.AuthenticationFailed(msg) | |
elif not token: |