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
"use strict"; | |
// from http://stackoverflow.com/a/11454049/309483 | |
var combine = function (m, n) { | |
var a = m.length, c = '', count = 0, i; | |
for (i = 0; i < a; i++) { | |
if (m[i] === n[i]) { | |
c += m[i]; | |
} else if (m[i] !== n[i]) { |
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
import re | |
import sys | |
import os.path | |
import ifcopenshell | |
import itertools | |
import json | |
def chunks2(iterable,size,filler=None): | |
it = itertools.chain(iterable,itertools.repeat(filler,size-1)) | |
chunk = tuple(itertools.islice(it,size)) |
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
#N canvas 571 147 693 605 10; | |
#X obj -28 347 shell; | |
#X obj 59 -59 adc~; | |
#X obj 59 2 - 100; | |
#X floatatom 80 39 5 0 0 0 - - -; | |
#X obj 167 98 vu 15 120 empty empty -1 -8 0 10 -66577 -1 1 0; | |
#X floatatom -29 233 5 0 0 0 - - -; | |
#X obj -29 254 select 1; | |
#X obj -28 453 shell; | |
#X obj -4 157 &&; |
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
*Main Data.Tree Data.Tree.Lens Control.Lens> let l = partsOf (traversed.(filtered ((==[]).subForest))) | |
*Main Data.Tree Data.Tree.Lens Control.Lens| | |
*Main Data.Tree Data.Tree.Lens Control.Lens> Node 1 [Node 2 [], Node 3 []] & l .~ [5,6] | |
<interactive>:7:1: error: | |
• Non type-variable argument in the constraint: Num (Tree a) | |
(Use FlexibleContexts to permit this) | |
• When checking the inferred type | |
it :: forall a. (Num (Tree a), Eq a) => Tree (Tree a) |
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
Theorem add_le_cases : forall (n: nat) (m: nat) (p: nat) (q: nat), | |
n + m <= p + q -> n <= p \/ m <= q. | |
Proof. | |
intros. | |
generalize dependent p. | |
induction n. | |
- simpl. | |
intros. | |
apply or_introl. | |
apply le_0_n. |
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
import operator | |
import functools | |
import itertools | |
import os | |
import json | |
import struct | |
#import math | |
import bitarray |
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 typing import Protocol | |
class InterfaceAB(Protocol): | |
def method_a(self) -> None: ... | |
def method_b(self) -> None: ... | |
class ClassA: | |
def method_a(self) -> None: | |
print("a") |
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
(ns hello-test (:require [secp256k1.core :as secp256k1] [clojure.test :as test])) | |
(def rs-pub | |
(secp256k1/public-key "028d7500dd4c12685d1f568b4c2b5048e8534b873319f3a8daa612b469132ec7f7") ) | |
(def ls-priv | |
(secp256k1/private-key (hello/fromhex "1111111111111111111111111111111111111111111111111111111111111111"))) | |
(= (seq (.getEncoded (secp256k1/public-key ls-priv) true)) | |
(seq (hello/fromhex "01034f355bdcb7cc0af728ef3cceb9615d90684bb5b2ca5f859ab0f0b704075871aa"))) |
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
import threading | |
import asyncio | |
import time | |
import json | |
import subprocess | |
import colorama | |
import os | |
from utils import BitcoinRpc | |
from electrumutils import ElectrumX, ElectrumNode |
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 php | |
<?php | |
define("type","BBC"); | |
#define("type","DMI"); | |
//define("PLACE",35); //copenhagen | |
define("PLACE",52); //frankfurt | |
ob_start(); |
NewerOlder