Skip to content

Instantly share code, notes, and snippets.

View henryiii's full-sized avatar
👨‍🍼
New baby

Henry Schreiner henryiii

👨‍🍼
New baby
View GitHub Profile
@henryiii
henryiii / git-all.py
Last active July 26, 2017 10:02
Fast repository status for repos in git folder, Python Rewrite.
#!/usr/bin/env python3
from plumbum import local, cli, FG, BG, TF, ProcessExecutionError, colors
from plumbum.cmd import tput, git
from contextlib import contextmanager
from functools import partial
# This can be hard coded to a repo location, or cwd, etc.
# REPOLOC = local.path(__file__) / '..'
REPOLOC = local.env.home / 'git'
@henryiii
henryiii / landau.cpp
Created November 17, 2017 19:07
Simple example of PyBind11 landau binding
// Taken from LCG ROOT MathLib
// License info:
// Authors: Andras Zsenei & Lorenzo Moneta 06/2005
/**********************************************************************
* *
* Copyright (c) 2005 , LCG ROOT MathLib Team *
* *
* *
**********************************************************************/
@henryiii
henryiii / hist.py
Last active April 22, 2019 09:04 — forked from jpivarski/hist.py
Functional histogram slice proposal
import numbers
import math
import numpy
class Binning:
"Abstract superclass of all binning types. Only Regular is implemented."
def __init__(self, *args, **kwargs):
raise NotImplementedError
@henryiii
henryiii / pypi_counter.ipynb
Created April 26, 2019 12:41
PyPI counter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
from argparse import ArgumentParser
from pathlib import Path
from textwrap import indent
import curses
import unicodedata
FOLDER_OPEN = unicodedata.lookup('Open File Folder')
FOLDER_CLOSED = unicodedata.lookup('File Folder')
@henryiii
henryiii / 04_runge_kutta.ipynb
Created January 23, 2020 06:09
RungeKutta Example
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@henryiii
henryiii / issue.md
Created June 4, 2020 01:12
pip issue description

Environment

  • pip version: latest
  • Python version: 3.5.4
  • OS: Windows

This happens when using nuget to get Python, and only on Python 3.5. Python 2.7 and 3.6-3.8 are just fine. I have only seen this problem on Windows. This is breaking cibuildwheel, which uses this setup. See pypa/cibuildwheel#358 - there you can see the logs. This may be true with any portable install, I'm not sure.

Description The surrounding environment is used when making a PEP 518 build, rather than the new one created for the build. When building with -v, it is making the environment, but it is not being used.

@henryiii
henryiii / NextTry.py
Last active December 10, 2020 18:14
MyPy and Vectors
from __future__ import annotations # type: ignore
from typing import Protocol, TypeVar, Generic
T = TypeVar("T")
U = TypeVar("U")
V = TypeVar("V")
W = TypeVar("W")
# Run inside https://github.com/mayeut/manylinux-timeline
#
# Example nox file for those too lazy to set up a venv:
#
# import nox
#
# @nox.session(reuse_venv=True)
# def run(session):
# session.install("hist[plot]", "pandas")
# session.run("python", "make_hist.py")