Skip to content

Instantly share code, notes, and snippets.

View adamkal's full-sized avatar
🏀

Adam Kaliński adamkal

🏀
View GitHub Profile
@adamkal
adamkal / keybase.md
Created August 3, 2022 07:32
keybase.md

Keybase proof

I hereby claim:

  • I am adamkal on github.
  • I am adamkal (https://keybase.io/adamkal) on keybase.
  • I have a public key ASCcE8Nxae1kdFcbzS1K3ekXsdZXop8x_ESkxyJh9d2XlAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am adamkal on github.
  • I am adamkal (https://keybase.io/adamkal) on keybase.
  • I have a public key ASB4DkyHfVipWyYpDLMDT5OJB49wk7qsQ_YfQpzzyUgiCAo

To claim this, I am signing this object:

@adamkal
adamkal / test.json
Created February 8, 2018 14:18
mailing example
{"args": [[{"tracking": {"utm_campaign": "wereldspecial", "uuid": "5aa989c4-1d55-4607-b45d-79951ce148fa", "utm_content": "TB-20160517-TEST", "utm_source": "tb-admin-bulk-builder", "test_group": "Test", "test_name": "test"}, "modules": [{"type": "offers", "offer_ids": [104856, 89845, 105442, 105657, 103300, 98699, 104986, 91553]}, {"type": "categories", "category_ids": [854, 115, 39, 3936]}], "subscription_uuid": "5aa989c4-1d55-4607-b45d-79951ce148fa", "theme": "", "recipient": "adam@travelbird.com", "subject": "Special: De wereld rond met TravelBird!"}, {"tracking": {"utm_campaign": "wereldspecial", "uuid": "5aa989c4-1d55-4607-b45d-79951ce148fa", "utm_content": "TB-20160517-TEST", "utm_source": "tb-admin-bulk-builder", "test_group": "Test", "test_name": "test"}, "modules": [{"offer_ids": [104856, 89845, 105442, 105657, 103300, 98699, 104986, 91553], "type": "offers"}, {"type": "categories", "category_ids": [854, 115, 39, 3936]}], "subscription_uuid": "5aa989c4-1d55-4607-b45d-79951ce148fa", "theme": "", "recip
@adamkal
adamkal / pff_feed_test.xml
Last active January 22, 2016 14:11
ongage_feed_test.xml
<feed>
<mailing>
<variables>
<variable>
<key>content</key>
<value>
<![CDATA[
Bekijk onze dagaanbiedingen, speciaal voor jou geselecteerd!
@adamkal
adamkal / gist:1c992b92fe6590076116
Created December 31, 2014 13:43
Date comparison in JavaScript o_0
var d1 = new Date(0),
d2 = new Date(0),
d3 = new Date(5);
d1 < d3
// true
d3 < d2
// false
@adamkal
adamkal / namedtuple_performance.ipynb
Last active August 29, 2015 13:56
namedtuple performance tests
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
echo "Cleaning *.pyc (root: `pwd`)"
find . -name "*.pyc" -exec rm '{}' ';'
@adamkal
adamkal / parser.py
Last active December 29, 2015 00:58
coding dojo
from itertools import *
def split_to_parts(arr, size):
i = 0
for x in range(9):
yield arr[x*size:x*size+3]
cmp = [9, 158, 155, 57, 179, 183, 137, 191, 251]
def parse_file(file_name):
@adamkal
adamkal / context1.py
Last active December 20, 2015 12:09
Funny context stuff
outer = "outer"
def function():
print outer
@adamkal
adamkal / context.py
Last active December 16, 2015 19:19
context issue.
def forced_params(*params):
def outer(fn):
params = [fn.__name__] + params
def inner(*args):
args = params + args
return fn(*args)
return inner
return outer
@forced_params('lemon')