Skip to content

Instantly share code, notes, and snippets.

K.-Michael Aye michaelaye

  • LASP
  • Boulder, CO, United States
Block or report user

Report or block michaelaye

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View isis3VarInit.py
#!/usr/bin/env python
"""
This program builds shell scripts that define ISIS3 environment variables during
conda environment activation and deactivation, and creates some directories.
"""
import argparse
import os
import sys
View vega_lite_bug_report.md

Please:

  • Check for duplicate issues. Please file separate requests as separate issues on GitHub.
  • Describe how to reproduce the bug / the goal of the feature request.
  • Use the latest versions of Vega and Vega-Lite.
  • Provide an example spec in JSON, wrapped by triple backticks like this:

Reproduce using altair in Python:

View vega_lite_buggy_spec.json
"{\n \"$schema\": \"https://vega.github.io/schema/vega-lite/v3.3.0.json\",\n \"config\": {\n \"mark\": {\n \"tooltip\": null\n },\n \"view\": {\n \"height\": 300,\n \"width\": 400\n }\n },\n \"data\": {\n \"name\": \"data-856a37508df4691ee92109908a3a0a63\"\n },\n \"datasets\": {\n \"data-856a37508df4691ee92109908a3a0a63\": [\n {\n \"age\": 15,\n \"people\": 4566154,\n \"sex\": 1,\n \"year\": 1910\n },\n {\n \"age\": 80,\n \"people\": 211110,\n \"sex\": 2,\n \"year\": 1920\n },\n {\n \"age\": 45,\n \"people\": 1065973,\n \"sex\": 1,\n \"year\": 1880\n },\n {\n \"age\": 30,\n \"people\": 8705835,\n \"sex\": 1,\n \"year\": 1980\n },\n {\n \"age\": 90,\n \"people\": 6569,\n \"sex\": 2,\n \"year\": 1850\n },\n {\n \"age\": 55,\n \"people\": 4981670,\n \"sex\": 1,\
View file_reading.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View standard_py3_conda_packages.txt
advbumpversion
astropy
autopep8
black
bokeh
cartopy
cython
dask
datashader
fastparquet
@michaelaye
michaelaye / raytracing.py
Created Mar 14, 2019 — forked from rossant/raytracing.py
Very simple ray tracing engine in (almost) pure Python. Depends on NumPy and Matplotlib. Diffuse and specular lighting, simple shadows, reflections, no refraction. Purely sequential algorithm, slow execution.
View raytracing.py
"""
MIT License
Copyright (c) 2017 Cyrille Rossant
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@michaelaye
michaelaye / crash.txt
Created Feb 5, 2019
Crash report of Findings.app
View crash.txt
Process: Findings [25603]
Path: /Applications/Findings.app/Contents/MacOS/Findings
Identifier: com.findings.Findings
Version: 2.1 [5648.9acf5aba] (5648)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Findings [25603]
User ID: 273771
Date/Time: 2019-02-05 14:40:55.981 -0700
@michaelaye
michaelaye / some.py
Created Feb 5, 2019
Some plotting code
View some.py
for region in all_regions[:2]:
fig, axes = plt.subplots(
ncols=3, figsize=(10, 3), constrained_layout=True, sharey=False
)
fig.suptitle(region)
df1 = data.loc[data["region_name"] == region]
max_fraction = df1.fraction.max()
min_fraction = df1.fraction.min()
max_nobs = df1.n_objects.max()
min_nobs = df1.n_objects.min()
View gist:9b7f08155ae9b589e18bf900b6c1463a
# packages in environment at /Users/klay6683/miniconda3:
#
# Name Version Build Channel
asn1crypto 0.24.0 py37_0 defaults
beautifulsoup4 4.7.1 py37_1 defaults
bzip2 1.0.6 h1de35cc_5 defaults
ca-certificates 2018.12.5 0 defaults
certifi 2018.11.29 py37_0 defaults
cffi 1.11.5 py37h6174b99_1 defaults
chardet 3.0.4 py37_1 defaults
@michaelaye
michaelaye / gist:8b5df9fddbb421d752de3bc668973432
Last active Jan 25, 2019
How to plot data against locale time of day only.
View gist:8b5df9fddbb421d752de3bc668973432
from matplotlib.dates import DateFormatter
from matplotlib.dates import HourLocator
from matplotlib.dates import date2num
times = pd.date_range("now", periods=24, freq="2h")
data = np.arange(len(times))
df = pd.DataFrame({"datetime": times, "data": data})
You can’t perform that action at this time.