Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
"""Store pandas data in an SQL(ite) BLOB field using the Parquet format. | |
© 2024 Paul Natsuo Kishimoto <[email protected]>. | |
Licensed under the GNU GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html. | |
""" | |
import sqlite3 | |
from dataclasses import dataclass | |
from io import BytesIO |
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
Capacity|Transportation|Aviation|Freight | |
Capacity|Transportation|Aviation|Passenger | |
Capacity|Transportation|Maritime|Freight | |
Capacity|Transportation|Maritime|Passenger | |
Capacity|Transportation|Rail|Freight | |
Capacity|Transportation|Rail|Passenger | |
Capacity|Transportation|Road|Freight | |
Capacity|Transportation|Road|Passenger | |
Discount rate|Economy | |
Discount rate|Electricity |
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
"""Crude Sphinx extension for inline documentation. | |
© 2019 Paul Natsuo Kishimoto <[email protected]> | |
Licensed under the GNU GPLv3: https://www.gnu.org/licenses/gpl-3.0.html | |
Star: https://gist.github.com/khaeru/3185679f4dd83b16a0648f6036fb000e | |
Enable by adding to conf.py:: | |
sys.path.append('path/to/this/file') | |
extensions.append('inline') |
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
"""Reporting using a directed acyclic graph (DAG). | |
2019-01-24 Paul Natsuo Kishimoto <[email protected]> | |
This is a demo of one possible pattern for a reporting architecture for ixmp | |
/MESSAGE. It uses a directed acyclic graph (DAG) where the nodes are operations | |
and edges are data. Calling get(…) on the graph causes a node's output, and all | |
its dependencies, to be retrieved. | |
This is implemented using dask: |
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
def geom_partial(name, aes, **geom_kwargs): | |
"""Like partial(), for plotnine geoms. | |
*name* refers to a geom, e.g. 'point' for p9.geom_point. *geom_kwargs* are | |
optional keyword arguments for the geom. *aes* is a dict() with keys that | |
match the geom's aesthetics, and values that are format strings. | |
Returns a callable object. When called, the arguments are passed to | |
str.format() for each entry in *aes*, and a plotnine geom is returned with | |
the resulting aesthetics and kwargs. |
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
"""Vehicle Acronyms | |
Usage: | |
1. Clone https://github.com/tabatkins/railroad-diagrams | |
2. Drop this file in. | |
3. $ python3 acronyms.py | |
Some sources: | |
- https://en.wikipedia.org/wiki/Automotive_acronyms_and_abbreviations | |
- http://www.chicagotribune.com/classified/automotive/ |
NewerOlder