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
-- --------------------------------------------------------------------------------------------------------------------- | |
-- MOCK INTERFEJSU DOSTĘPNEGO NA APPCE | |
-- --------------------------------------------------------------------------------------------------------------------- | |
os = require "os" | |
local android = {} | |
function android.send(self, x) | |
print("ANDROID:SEND:", x) | |
end | |
function android.sleep(self, t) | |
print("ANDROID:SLEEP:", t) |
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
-- ===================================================================================================================== | |
-- MOCK INTERFEJSU DOSTĘPNEGO NA APPCE | |
-- Dzięki temu można "ot tak" wrzucić kod w interpreter i będzie działać | |
-- --------------------------------------------------------------------------------------------------------------------- | |
local android = {} | |
function android.send(self, x) | |
print("ANDROID:SEND:", x) | |
end | |
function android.sleep(self, t) | |
print("ANDROID:SLEEP:", t) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import re | |
import lxml | |
import lxml.html | |
from itertools import count | |
def clipboard_to_cells(): |
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
#!/usr/bin/env python | |
# coding=utf-8 | |
import os | |
from bs4 import BeautifulSoup | |
import requests | |
import time | |
import itertools | |
url = ("http://www.eventim.pl/Bilety-sonisphere-warszawa.html?affiliate=LNP&fun=evdetail" |
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 contextlib import contextmanager | |
from functools import wraps | |
from inspect import signature | |
from itertools import chain | |
class TypoDynoMismatch(Exception): | |
pass | |
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
[1 of 1] Compiling Main ( bench.hs, bench.o ) | |
==================== Tidy Core ==================== | |
Result size of Tidy Core = {terms: 85, types: 57, coercions: 30} | |
lvl_r2PK :: Type.Integer | |
lvl_r2PK = __integer 0 | |
main11 :: Type.Integer |
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
{-# LANGUAGE ExistentialQuantification #-} | |
data Point = Point { x :: Int, y :: Int } deriving (Show) | |
data Rect = Rect { a :: Point, b :: Point, c :: Point, d :: Point } deriving (Show) | |
data Lens s a = Lens { get :: s -> a, set :: s -> a -> s} | |
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
{-# LANGUAGE RankNTypes #-} | |
import Data.Functor.Identity | |
import Control.Applicative | |
data Point = Point { _x :: Int, _y :: Int } deriving (Show) | |
data Rect = Rect { _a :: Point, _b :: Point, _c :: Point, _d :: Point} deriving (Show) | |
type Lens s a = forall f. Functor f => (a -> f a) -> s -> f s |
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
-module(example). | |
-export(sort/1). | |
-export(spawnedsort/3, merge/3). % publishing internal funs | |
% only for debugging | |
sort(X) -> | |
ChunkLen = length(X) div 2, | |
{L1, L2} = lists:split(ChunkLen, X), % pattern matching example 1 |
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
#!/usr/bin/env python | |
class CQ(object): | |
bla = None | |
"""CQ Instance Object""" | |
def __init__(self, port, path, init): | |
self.port = port | |
self.path = path | |
self.init = init |