I hereby claim:
- I am calebdre on github.
- I am calebdre (https://keybase.io/calebdre) on keybase.
- I have a public key ASCuuw9-7KA-CgARuTOVXnPIE10Lk0m_IuRf7wYsGGHqBQo
To claim this, I am signing this object:
#misc aliases | |
alias ..="cd .." | |
alias ...="cd ../../" | |
alias ebash="vim ~/.bash_profile" | |
alias sbash="source ~/.bash_profile" | |
alias sub="sublime ." | |
alias pip="pip3" | |
alias python="python3" | |
#vagrant aliases |
# Path to your oh-my-zsh installation. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="sorin" | |
# Uncomment the following line to enable command auto-correction. |
def serialize(query): | |
# we wantto transform a sqlalchemy query set into something that can be turned into json | |
serialized = [] | |
for result in query: | |
# Strategy: get all the columns on the model and put them in a dictionary. | |
# Then get the relation models and do the same thing, adding them to the master dictionary | |
s = {} | |
relations = result.__mapper__.relationships._data.keys() | |
columns = result.__table__.columns._data.keys() | |
table = result.__table__.name |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.support.v4.view.ViewCompat; | |
import android.support.v7.recyclerview.BuildConfig; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.Log; | |
import android.view.View; | |
import java.lang.reflect.Field; |
public class ExampleActivity{ | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
SongSearch search = new SongSearch(); | |
HarmanController hc = new HarmanController(); | |
List<Song> songs = search.searchSongs(this, "your term"); | |
if(hc.initialize()){ | |
hc.addDeviceToSession(hc.getConnectedDevices().get(0)); | |
hc.playSong(songs.get(0).uri); |
require 'json' | |
require "net/http" | |
require "uri" | |
response = Net::HTTP.get_response(URI.parse(ARGV[0])) | |
data_hash = JSON.parse(response.body) | |
request_times = {"fastest" => {}, "slowest" => {}} | |
entries = data_hash['log']['entries'] |
require 'json' | |
require "net/http" | |
require "uri" | |
class HarFetcher | |
def get url | |
response = Net::HTTP.get_response(URI.parse(url)) | |
return JSON.parse(response.body) | |
end | |
end |
import java.io.*; | |
import java.util.*; | |
public class CSVWriter { | |
private final String fullPath; | |
private HashMap<String, TreeSet<String>> fieldsMap; | |
private boolean hasHeader = false; | |
public CSVWriter(String filename, String path) { | |
fullPath = path + File.separator + filename; |
I hereby claim:
To claim this, I am signing this object:
import torch.nn as nn | |
class PokeAgent(nn.Module): | |
def __init__(self, vocab_size, num_choices): | |
super(PokeAgent, self).__init__() | |
self.embedding = nn.Embedding(vocab_size, 32) | |
self.linear = nn.Linear(32, 32) | |
self.activation = nn.ReLU() | |
self.out = nn.Linear(32, num_choices) |