Skip to content

Instantly share code, notes, and snippets.

Avatar

Christoph Deil cdeil

View GitHub Profile
View pycharm_interpreter_settings_output.txt
/Users/cdeil/opt/anaconda3/envs/hpred/bin/python /Users/cdeil/code/hc/hpred/python_interpreter_info.py
{'PATH': ['/Users/cdeil/opt/anaconda3/envs/hpred/bin',
'/Users/cdeil/opt/anaconda3/condabin',
'/usr/local/opt/node@12/bin',
'/usr/local/bin',
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin',
'/usr/local/share/dotnet',
View orion_on_schedule.py
"""Prefect scheduling example in Orion"""
import datetime
import subprocess
from prefect import task, flow
from prefect.client import OrionClient
from prefect.deployments import DeploymentSpec, create_deployment_from_spec
from prefect.orion.services.scheduler import Scheduler
from prefect.orion.schemas.schedules import IntervalSchedule
View conda_list.txt
% conda list
# packages in environment at /Users/cdeil/opt/anaconda3/envs/prefect-tutorial:
#
# Name Version Build Channel
_anaconda_depends 2021.11 py39_0
alabaster 0.7.12 pyhd3eb1b0_0
anaconda custom py39_1
anaconda-client 1.9.0 py39hecd8cb5_0
anaconda-project 0.10.2 pyhd3eb1b0_0
anyio 2.2.0 py39hecd8cb5_1
View flow_decorator.py
from prefect import task, Flow, Parameter
@task
def print_plus_one(x):
print(x + 1)
def flow(name):
def inner(fn):
View influxdb_ingest.py
import click
import pandas as pd
import urllib3
from influxdb_client import InfluxDBClient
from influxdb_client import WriteOptions
def read_parquet_file(plant_id: str, tag: str):
path = f"{plant_id}/parquet/{tag}.parquet"
print(f"importing {path}")
View gist:8f2c59b57082ee5845357059df1cc235
% pip freeze
aiohttp @ file:///Users/runner/miniforge3/conda-bld/aiohttp_1605734434303/work
aliyun-python-sdk-core @ file:///Users/runner/miniforge3/conda-bld/aliyun-python-sdk-core_1606717052129/work
aliyun-python-sdk-kms @ file:///home/conda/feedstock_root/build_artifacts/aliyun-python-sdk-kms_1606460652868/work
ansi2html @ file:///Users/runner/miniforge3/conda-bld/ansi2html_1605638367911/work
appdirs @ file:///home/conda/feedstock_root/build_artifacts/appdirs_1603108395799/work
appnope @ file:///Users/runner/miniforge3/conda-bld/appnope_1606850125884/work
argcomplete @ file:///home/conda/feedstock_root/build_artifacts/argcomplete_1606202836286/work
argon2-cffi @ file:///Users/runner/miniforge3/conda-bld/argon2-cffi_1605217150745/work
async-generator==1.10
View test123.py
print("hello azure jobs")
View donkeynet.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View hcem-example-run.txt
% time python evaluate.py opt
Date range: 2018-04-01 00:00:00 to 2018-04-15 00:00:00
intervals: 1439
mills: 1
cements: 5
silos: 7
Using license file /Users/cdeil/gurobi.lic
Set parameter TokenServer to value Christophs-MacBook-Pro.local
Changed value of parameter NormAdjust to 0
Prev: -1 Min: -1 Max: 3 Default: -1
View gist:4655776820758e73a5c673b56257a7b6
(hcem) cdeil@Christophs-MacBook-Pro or-tools % make test_package_python
cp lib/libortools.dylib temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libgflags* temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libglog* temp_python3.7/ortools/ortools/.libs
cp -R /Users/cdeil/code/oss/or-tools/dependencies/install/lib/libproto* temp_python3.7/ortools/ortools/.libs
cp -R /Users/cdeil/code/oss/or-tools/dependencies/install/lib//libabsl* temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libCbc* temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libCgl* temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libClp* temp_python3.7/ortools/ortools/.libs
cp -R dependencies/install/lib*/libOsi* temp_python3.7/ortools/ortools/.libs