Skip to content

Instantly share code, notes, and snippets.

View ericholscher's full-sized avatar

Eric Holscher ericholscher

View GitHub Profile
@ericholscher
ericholscher / gym.py
Created September 29, 2021 18:32 — forked from Alir3z4/gym.py
import os
import pickle
import warnings
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from tensorflow.keras.callbacks import EarlyStopping
from tensorflow.keras.layers import Dense
from tensorflow.keras.layers import Dropout
@ericholscher
ericholscher / cfp-outreach.md
Last active January 17, 2019 12:05
Call for Proposals outreach for Write the Docs Portland 2019

Hi there!

The Call for Proposals for Write the Docs Portland 2019 is now open at http://www.writethedocs.org/conf/portland/2019/cfp/ and it would be awesome if you could share this news with your members! Our CFP is open until January 31st.

Write the Docs is a community conference all about software documentation, with 500 attendees in Portland, Oregon. We bring everyone who writes the docs together in the same room: Programmers, Tech Writers, Support, Designers, Developer Advocates, Community Managers, Scientists, and more.

We have always been committed to making Write the Docs an inclusive space as much as possible. We're working really hard to make sure we're a community that actively welcomes members of underrepresented groups in tech, and would be grateful for your help in that mission.

@ericholscher
ericholscher / board.rst
Last active May 30, 2017 17:00
PSF Board 2017 Candidates

(A rendered version of https://wiki.python.org/moin/PythonSoftwareFoundation/BoardCandidates2017 which works well on mobile)

Candidates for the 2017 PSF Board of Directors

The following people have been nominated as Directors of the Python Software Foundation for the term beginning in June 2017. Their self-written summaries follow. The specific dates of relevance to the election are:

  • Open call for Board Director Nominations: May 1, 2017
@ericholscher
ericholscher / gist:f560d339c452c5a010da
Created December 2, 2015 23:23
A basic extension that parses the RST as a jinja template before rendering as RST
def on_source_read(app, docname, source):
src = source[0]
if hasattr(app.builder, 'globalcontext'):
app.info('Using global context')
source[0] = app.builder.templates.render_string(src, app.builder.globalcontext)
else:
source[0] = app.builder.templates.render_string(src, {})
def setup(app):

Keybase proof

I hereby claim:

  • I am ericholscher on github.
  • I am ericholscher (https://keybase.io/ericholscher) on keybase.
  • I have a public key whose fingerprint is 0D29 F949 2B36 4106 16E5 2339 E626 C012 4530 3A50

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/readthedocs/projects/tasks.py", line 345, in update_imported_docs
tags = version_repo.tags
File "/home/docs/checkouts/readthedocs.org/readthedocs/vcs_support/backends/bzr.py", line 46, in tags
return self.parse_tags(stdout)
File "/home/docs/checkouts/readthedocs.org/readthedocs/vcs_support/backends/bzr.py", line 60, in parse_tags
for name, commit in raw_tags:
ValueError: too many values to unpack

Bash:

export PS1="<\[\033[0;32m\]\h\[\033[0m\]:\[\033[0;37m\]\u\[\033[0m\]> \w \[\033[0;36m\]\$(vcprompt)\[\033[0m\]\n-> "

Requires:

  • vcprompt

Output:

@ericholscher
ericholscher / UAPhonegap.js
Created August 9, 2012 17:18
Urban Airship Phonegap Example
push = window.pushNotification;
// Callback for when a device has registered with Urban Airship.
// https://docs.urbanairship.com/display/DOCS/Server%3A+Android+Push+API#ServerAndroidPushAPI-Registration
push.registerEvent('registration', function (id) {
console.log("Registered with ID: " + id);
};
// Callback for when the app is running, and recieves a push.
push.registerEvent('push', function (push) {
import inspect
frame = inspect.currentframe()
name = inspect.getframeinfo(frame)[2]
func = globals()[name]
#import ipdb; ipdb.set_trace()
cmd = '!%s ' % string.lower(func.__name__)