Skip to content

Instantly share code, notes, and snippets.

View aphoenix's full-sized avatar

Andrew aphoenix

View GitHub Profile
@aphoenix
aphoenix / Output
Created January 31, 2019 19:31 — forked from macournoyer/Output
A Neural Network framework in 25 LOC
$ python xor.py
Training:
Epoch 0 MSE: 1.765
Epoch 100 MSE: 0.015
Epoch 200 MSE: 0.005
* Target MSE reached *
Evaluating:
1 XOR 0 = 1 ( 0.904) Error: 0.096
0 XOR 1 = 1 ( 0.908) Error: 0.092
1 XOR 1 = 0 (-0.008) Error: 0.008
import praw
import time
from random import choice
from collections import Counter
from praw.helpers import submissions_between
try:
import creds
except ImportError:
print("Must have creds.py with valid reddit login credentials. uid pw")
exit()
/* LinkFlair Stuff */
.title > .linkflairlabel {
background: url(%%armorsprite%%) no-repeat;
display:block;
height:36px;
width:36px;
padding:0;
margin:0 25px;
text-indent:-999px;
@aphoenix
aphoenix / gist:6554053
Last active December 23, 2015 00:29
index.php
<?php get_header(); ?>
<div class="content-wrap">
<hr class="internal-line" />
<?php if(have_posts() ) : ?>
<?php while(have_posts() ) : the_post(); ?>
<div class="home-content-1">
/* Fugly Search fixes */
.searchpane.raisedbox {min-height:6em;}
.searchpane.raisedbox form > * {display:none;}
.searchpane.raisedbox form {display:block;}
.searchpane.raisedbox:hover form > * {display:block;}
.searchpane.raisedbox form > input:first-child {display:block;}
@aphoenix
aphoenix / gist:6498281
Created September 9, 2013 16:44
.linkinfo styles
.linkinfo {
background-color: #0B0721;
text-align: center;
font-size: 11px;
padding: 5px 0 2px;
border: 3px double #2C180D;
border-radius: 3px;
border-radius: 5px;
color:white;
width:280px;
import urllib2, html5lib, re, sys
from bs4 import BeautifulSoup
page = urllib2.urlopen('http://www.ft.dk/Folketinget/searchResults.aspx?letter=ALLE&pageSize=100').read()
soup = BeautifulSoup(page)
thenames = []
for anchor in soup.findAll('a', href=re.compile('^/Folketinget/findMedlem/')):
newpage = urllib2.urlopen('http://www.ft.dk' + anchor["href"])
stew = BeautifulSoup(newpage)
print (stew.findAll('h1') + stew.findAll('a', href=re.compile('^mailto:')))

Rules of /r/WoW

Protection of Personal Information

  • In posts and comments, blur out names of players, where appropriate, to keep them anonymous. Do not post personal information. This is not a forum to call out specific players.

Posting Rules

@aphoenix
aphoenix / URL to QR Bookmarklet - jQuery
Created June 11, 2012 19:40 — forked from vladocar/URL to QR Bookmarklet - jQuery
URL to QR Bookmarklet - jQuery
$("body").append("<div id='qrcode' style='position:absolute; top:0; left:0; z-index:99993; width:550px; height:550px;background-color:#fff; padding:49px; border:1px solid #ccc'><img src='http://chart.apis.google.com/chart?cht=qr&chs=500x500&choe=UTF-8&chld=H&chl="+window.location+"' /></div>");
@aphoenix
aphoenix / stupid.html
Created December 6, 2011 18:55
Actually this is what I was working with
<div class="ul">
<div class="li">
List item 1
</div>
<div class="li">
List item 2
</div>
<div class="li">
List item 3
</div>