Relevant Links:
Python Functional Programming HOWTO
Python's itertools module
Python Sorting Wiki
| A | |
| abactinally | |
| Abassieh | |
| Abbottstown | |
| Abe | |
| abevacuation | |
| abiogenesist | |
| ablauts | |
| aboideaus | |
| Aboukir |
| """ | |
| Suppress double-spaced output in Python 3 by specifying `lineterminator="\n"` | |
| to csv.writer instance. | |
| """ | |
| import csv | |
| fsrc_pth = "src_pth" | |
| fdst_pth = "dst_pth" | |
| with open(fdst_pth, 'w') as f1: |
| DATE | TICKER | CLOSE | |
|---|---|---|---|
| 20161125 | GE | 31.440001 | |
| 20161123 | GE | 31.34 | |
| 20161122 | GE | 31.18 | |
| 20161121 | GE | 30.870001 | |
| 20161118 | GE | 30.67 | |
| 20161117 | GE | 30.790001 | |
| 20161116 | GE | 30.74 | |
| 20161115 | GE | 30.75 | |
| 20161114 | GE | 30.51 |
| cd && dircolors -p > .dircolors |
| CLAIM_ID | EXPOSURE_ID | STATE | BLD_VALUE | BLD_AGE | CLAIM_AMT | |
|---|---|---|---|---|---|---|
| 695433 | POL0004653 | IL | 1337609 | 7 | 1337609 | |
| 621498 | POL0002262 | TN | 509477 | 35 | 509477 | |
| 818474 | POL0009754 | CT | 953878 | 38 | 953878 | |
| 785806 | POL0002506 | OR | 106964 | 55 | 106964 | |
| 799534 | POL0002989 | IL | 469804 | 108 | 469804 | |
| 729094 | POL0005797 | TN | 894399 | 35 | 100000 | |
| 610517 | POL0005640 | CT | 532730 | 60 | 532730 | |
| 888963 | POL0005099 | OR | 1255253 | 34 | 1255253 | |
| 607409 | POL0003997 | IL | 688008 | 64 | 100000 |
| import math | |
| def is_prime(n): | |
| """Determine if `n` is prime.""" | |
| if (n%2==0 or n%3==0): return(False) | |
| threshold = math.floor(math.sqrt(n)) | |
| # all primes are of the form 6k+/-1 => | |
| plus_tst = any(n%i for i in | |
| (6*k+1 for k in |
| import numpy as np | |
| fpath = "challenger.csv" | |
| # Setting dtype to `None` forces genfromtxt to determine | |
| # the datatypes of each column => | |
| res = np.genfromtxt(fname=fpath, | |
| dtype=None, | |
| delimiter=",", | |
| autostrip=True, |