I hereby claim:
- I am mingrammer on github.
- I am mingrammer (https://keybase.io/mingrammer) on keybase.
- I have a public key ASCozwJWH7JP75YzsTAPDo-5h-mAz5CqxIhs-TVmQU--xgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from typing import List | |
from .core.cards import Card | |
from .core.madehands import evaluate | |
from .player import Other | |
def bet( | |
my_chips: int, | |
my_cards: List[Card], |
function createCSV(data) { | |
var lineDelimiter = '\n'; | |
var csv = { | |
'title': '', | |
'head': '', | |
'body': '' | |
}; | |
csv.title = 'csv-title.csv'; | |
csv.head = '...'; // make your own csv head |
import math | |
from pprint import pprint | |
import elasticsearch as es | |
import numpy as np | |
# Constants | |
INDEX_NAME = 'seoul-metro-2014' | |
THRESHOLD = 10 | |
CHUNK_SIZE = 5000 |
### without elif, else | |
if cond == 'one': | |
# something | |
return # or break | |
if cond == 'two': | |
# something | |
return # or break | |
# something | |
return # or break |
numbers = [1, 2, 3, 4, 5, 6] | |
# The left side of unpacking should be list or tuple. | |
*a, = numbers | |
# a = [1, 2, 3, 4, 5, 6] | |
*a, b = numbers | |
# a = [1, 2, 3, 4, 5] | |
# b = 6 |
headers = { | |
'Accept': 'text/plain', | |
'Content-Length': 348, | |
'Host': 'http://mingrammer.com' | |
} | |
def pre_process(**headers): | |
content_length = headers['Content-Length'] | |
print('content length: ', content_length) | |
from functools import reduce | |
primes = [2, 3, 5, 7, 11, 13] | |
def product(*numbers): | |
p = reduce(lambda x, y: x * y, numbers) | |
return p | |
product(*primes) | |
# 30030 |
def save_ranking(**kwargs, *args): | |
... |
def save_ranking(*args, **kwargs): | |
print(args) | |
print(kwargs) | |
save_ranking('ming', 'alice', 'tom', fourth='wilson', fifth='roy') | |
# ('ming', 'alice', 'tom') | |
# {'fourth': 'wilson', 'fifth': 'roy'} |