Skip to content

Instantly share code, notes, and snippets.

View springle's full-sized avatar

Sam Pringle springle

View GitHub Profile
import random
from TwitterAPI import TwitterAPI
api = TwitterAPI('consumer_key', 'consumer_secret', 'access_token', 'access_token_secret')
twitterData = api.request('lists/statuses', {'owner_screen_name':'samisjewish', 'slug':'TMcelebrities', 'count':'10'})
class Game:
def __init__(self, users, tweets):
self.users = users
self.tweets = tweets
self.correct_guesses = 0
@springle
springle / dist_tf.py
Last active June 29, 2017 21:09
Example Distributed TensorFlow Program in Python (from TF docs)
import argparse
import sys
import tensorflow as tf
import numpy as np
FLAGS = None
def main(_):
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
def main(server):
# Import data
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
def train(server, log_dir):
# Import data
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,

Keybase proof

I hereby claim:

  • I am springle on github.
  • I am springle (https://keybase.io/springle) on keybase.
  • I have a public key ASDCIrKWvfEp7BXX6rWVPDfDVSefvVYnOwRKsEg3ZBKgvgo

To claim this, I am signing this object:

@springle
springle / .vimrc
Last active March 24, 2018 14:30
" VUNDLE
let g:vundle_default_git_proto = 'git'
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'liuchengxu/space-vim-dark'
Plugin 'junegunn/goyo.vim'
flags = [
'x',
'c',
'-I.',
]
def FlagsForFile( filename, **kwargs ):
return {
'flags': flags
}
@springle
springle / .tmux.conf
Created November 2, 2017 18:02
A configuration for tmux
bind-key k select-pane -U
bind-key j select-pane -D
bind-key h select-pane -L
bind-key l select-pane -R
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
@springle
springle / .tmux.conf
Last active July 31, 2018 17:52
SamTmux
# VI-like navigation.
bind h select-pane -L
bind l select-pane -R
bind k select-pane -U
bind j select-pane -D
setw -g mode-keys vi
# Pane resizing.
bind -n M-j resize-pane -D 1
bind -n M-h resize-pane -L 1