This file contains hidden or 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
| jA0ECQMCRTFoVvAhkXn/0sCbARw2yE8YLkhoqthpR23JV48SciLiivb3nRIx/MQY | |
| 7bsNa3BOvctvkcmTDLKDaED+UjGNdXMaX2/EwRf05kpeJn4E4ONA5BYR04uIKzW4 | |
| kvpBItpjLa20ioLdFgMt/UnjnEEBzQXCQtr9+mYG/ZDKv+z71hZ2t7bV1iYA9KmD | |
| M2JCqmp2TAYj5KTiKo+2e3b5E43g1kGjvlpW/iKu39KzqP8ReYPDF1Z0GXfZKeuf | |
| Cy4Ji8WmL3ZHNoVfOo5tp2OLfLBZqgSOflXM5kvEVR4vjXEoRSB0ft9NZXOn/SmI | |
| II4kz7jw/cfl9j908VGnlQjd/9lRPCn+TaZNF5HsTtoL5ItyPPxbtR3WmhIi9OJL | |
| PiJ2PoIXLx1g3JLvv82Fx8Wr5t4uNxs+cK6BtnJDB1VdGWi9ymtk9fMJyslieVOy | |
| pelY/Ylvt7Rb7Z/P/FkXMM5Cg2VPgENnW19Qq6g= | |
| =ZzAW |
This file contains hidden or 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 ctypes | |
| import uuid | |
| from ctypes import ( | |
| windll, | |
| wintypes | |
| ) | |
| # Pre-Vista CSIDL | |
| CSIDL_COMMON_DOCUMENTS = 46 |
This file contains hidden or 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 argparse | |
| import json | |
| import sys | |
| def configure_args(args): | |
| parser = argparse.ArgumentParser( | |
| usage="%(prog)s [--remove-pandas-kwargs | --add-pandas-kwargs] <filename>", | |
| epilog="", | |
| description="Updates Pywr model `pandas_kwargs` syntax. A new file containing updated syntax is created." |
This file contains hidden or 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
| #include <vector> | |
| #include <iostream> | |
| #include <iomanip> | |
| #include <numeric> | |
| #include <cmath> | |
| static const int PTERMS = 3; | |
| /* Construct b vector of Ax=b */ | |
| double *build_bproduct(const std::vector<double>& xs, const std::vector<double>& ys) |
This file contains hidden or 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
| """ | |
| Second-degree polynomial fit of f(xseries) => yseries | |
| by Choleskification and Ly=b, L^x=y | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| """ | |
| # Test series: y=x^2 | |
| xseries = [0, 0.5, 1.0, 1.5, 2.0, 2.5] |
This file contains hidden or 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
| def atan_ts(z): | |
| """ ___ oo (-1)^2n+1 * x^(2n+1) | |
| atan(z) = \ -------------------- | |
| /__ n=0 2n+1 | |
| """ | |
| a = 0 | |
| for n in range(17): | |
| q = 2.0*n+1 | |
| a += (-1)**n * z**q / q |
This file contains hidden or 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 | |
| """ | |
| Bitmap glyph-to-include codec | |
| ..####.. ..####.. | |
| .#.##.#. .#.##.#. | |
| ##.##.## -d ##.##.## | |
| ######## => 60,90,219,255,129,66,60,0 ==> ######## | |
| #......# #......# | |
| .#....#. .#....#. |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include "b64.h" | |
| const char *const base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | |
| const char pad = '='; | |
| char *b64_encode(const unsigned char *src, size_t src_len) | |
| { |
This file contains hidden or 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
| """ | |
| Generates full set of planet names across all galaxies | |
| in the Elite series of games. | |
| Original name generation algorithm by David Braben and Ian Bell. | |
| Leestian Evil Juice also to Christian Pinder and the Oolite crew. | |
| Usage: | |
| $ python ./elitenames.py <galaxy> |
This file contains hidden or 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 copy | |
| class Parent(object): | |
| def __init__(self): | |
| self.children = [] | |
| def addChild(self, child): | |
| self.children.append(child) |
NewerOlder