Skip to content

Instantly share code, notes, and snippets.

@NelsonMinar
NelsonMinar / Sigmoid hidden layer.ipynb
Created January 6, 2018 02:17
TensorFlow MNIST sigmoid recognizer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NelsonMinar
NelsonMinar / scrape.ipynb
Created November 28, 2017 00:21
Demo of using IPython with BeautifulSoup
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.
@NelsonMinar
NelsonMinar / Pandas-MultiIndex-slicing-demo.ipynb
Created September 17, 2016 19:32
Pandas MultiIndex slicing demo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NelsonMinar
NelsonMinar / winrates.ipynb
Created September 16, 2016 00:31
League of Legends win rates by tier
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.
@NelsonMinar
NelsonMinar / close.py
Created March 30, 2016 00:35
Demo program for a small bug with discord.py closing sessions
# Demo of a bug in discord.py 0.10.0-alpha (tested with 53a240e)
# This program causes the following error to be printed when Python exits
# Unclosed client session
# client_session: <aiohttp.client.ClientSession object at 0x7f3bd7a83358>
import discord
c = discord.Client()
c.close()
.bail on
begin transaction;
update globals set value=4 where name='dbSchemaVersion';
-- remove lastGamesSince
delete from globals where name = 'lastGamesSince';
-- add a processed column and fill it with a value
#!/usr/bin/env python3
"A simple discord.py program to log in and receive and post messages"
# Configure these for a valid Discord account to log in as
email = FILL IN EMAIL
password = FILL IN PASSWORD
# Logging configuration. Go to DEBUG level if you want much more detail
import logging
@NelsonMinar
NelsonMinar / python-json-types.py
Created January 10, 2016 23:07
Testing various dict wrappers for Python JSON
"""
Various options for a JSON type for Python.
My best effort at using these libraries naturally for reading and writing JSON.
https://nelsonslog.wordpress.com/2016/01/08/a-better-python-object-for-json/
"""
import json, copy
import dotmap, attrdict, easydict, addict