I hereby claim:
- I am jmitchell on github.
- I am jmitchell (https://keybase.io/jmitchell) on keybase.
- I have a public key whose fingerprint is A969 0865 30E3 CC01 BF2A 819C 503E 6BF1 7E66 8311
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
1 patch for repository http://code.haskell.org/cpphs: | |
patch 38e413b90da67cc984b4d6873a9d1f5047df2afc | |
Author: [email protected] | |
Date: Sat Feb 18 00:23:36 Coordinated Universal Time 2017 | |
* Windows path support | |
New patches: | |
[Windows path support |
#!/usr/bin/env python | |
import csv | |
from collections import namedtuple | |
PriceRecord = namedtuple("PriceRecord", "date open high low close volume adjusted_close") | |
def parse_date(ymd): | |
return map(int, ymd.split('-')) |
#!/usr/bin/env python | |
import xml.etree.ElementTree as ET | |
tree = ET.parse("senators_cfm.xml") | |
root = tree.getroot() | |
for member in root.findall("member"): | |
first_name = member.find("first_name").text | |
last_name = member.find("last_name").text | |
state = member.find("state").text | |
phone = member.find("phone").text |
I hereby claim:
To claim this, I am signing this object:
No. | Time | Source | Destination | Protocol | Length | Info | |
---|---|---|---|---|---|---|---|
1 | 0.000000000 | 192.168.0.34 | 46.43.42.146 | TCP | 56 | 39138 > 443 [ACK] Seq=1 Ack=1 Win=525 Len=0 | |
2 | 0.165215788 | 46.43.42.146 | 192.168.0.34 | TCP | 62 | [TCP ACKed unseen segment] 443 > 39138 [ACK] Seq=1 Ack=2 Win=65535 Len=0 | |
3 | 0.168022779 | 192.168.0.34 | 46.43.42.146 | TCP | 56 | 39142 > 443 [ACK] Seq=1 Ack=1 Win=1452 Len=0 | |
4 | 0.334212939 | 46.43.42.146 | 192.168.0.34 | TCP | 62 | [TCP ACKed unseen segment] 443 > 39142 [ACK] Seq=1 Ack=2 Win=65535 Len=0 | |
5 | 6.928455772 | 192.168.0.34 | 46.43.42.146 | TLSv1.2 | 781 | Application Data | |
6 | 7.095766941 | 46.43.42.146 | 192.168.0.34 | TLSv1.2 | 125 | Application Data | |
7 | 7.095906094 | 192.168.0.34 | 46.43.42.146 | TCP | 56 | 39146 > 443 [ACK] Seq=726 Ack=70 Win=1452 Len=0 | |
8 | 7.095987261 | 46.43.42.146 | 192.168.0.34 | TLSv1.2 | 173 | Application Data | |
9 | 7.096027984 | 192.168.0.34 | 46.43.42.146 | TCP | 56 | 39146 > 443 [ACK] Seq=726 Ack=187 Win=1452 Len=0 |
Require Import Vector. | |
Import VectorNotations. | |
Set Implicit Arguments. | |
Inductive tuple : forall {n : nat}, Vector.t Set n -> Type := | |
| unit : tuple [] | |
| push : forall {T : Set} (x : T) | |
{n : nat} {ts : Vector.t Set n}, | |
tuple ts -> tuple (T :: ts). |
# Monoids | |
Basic description of Monoid; Types with an associative binary operation and an identity element; typeclass-doc monoid | |
Monoid typeclass methods?; "mempty :: a | |
mappend :: a -> a -> a | |
mconcat :: [a] -> a"; typeclass-methods monoid | |
Monoid inherits from?; Nothing; typeclass-inherits-from monoid | |
typeclass of mempty?; Monoid; method-type monoid |
module Main | |
import Effect.Random | |
import Effect.StdIO | |
import Effect.System | |
getSeed : { [SYSTEM] } Eff Integer | |
getSeed = do case index' 1 !getArgs of | |
Nothing => pure $ cast !time | |
Just t => pure $ cast t |
setInsert : Eq a => Vect n a -> a -> Either (Vect n a) (Vect (S n) a) | |
setInsert xs x = if elem x xs | |
then Left xs | |
else Right (x :: xs) |