Skip to content

Instantly share code, notes, and snippets.

View LastZactionHero's full-sized avatar

Zach LastZactionHero

View GitHub Profile
require 'selenium-webdriver'
require 'selenium/client'
#system 'java -jar ~/Downloads/selenium-2.37.0/selenium-server-standalone-2.37.0.jar &'
browser = Selenium::Client::Driver.new \
:host => "localhost",
:port => 4444,
:browser => "*firefox",
:url => "http://www.pictage.com",
:timeout_in_second => 60
//------------------------------------------------------------------------------
// Download Langauges
//
// VITLanguage: An individual language, name ("English", "Spanish") and code
// ("en", "es")
//
// VITLanguageManager: Download an array of VITLanguages from API
//
//------------------------------------------------------------------------------
@LastZactionHero
LastZactionHero / gist:cd3ac6998a94a06c37ad
Last active March 9, 2018 08:33
My Fake Coffee Shop -or- Local Audience Twitter Favoriting

Today I made the decision to shut down King's Cross Coffee, the potentially-popular coffee shop that existed only in the hearts and minds of coffee-drinking Ann Arborites. I decided to shut it down because people were actually going there. It didn't seem fair, and I'd proved my point.

I'd been experimenting with the concept of automatically favoriting tweets from a local audience as a way of driving traffic. I set up a product called LocalFavorite which takes a search term and location range and favorites 3 tweets each hour.

The Experiment

Can a brand with no real-world presence build a legitimate following by Twitter favorites alone?

To control my variables, I created the Twitter account @KingsCrossCafe, a realistic-looking coffee shop in Ann Arbor, MI. I gave it a few photos, a real address, a bit.ly link, and posted a few tweets. Then I began automatically favoriting anyone in the Ann Arbor area that mentions 'coffee' or being 'tired'.

### THE SCRIPT
#!/usr/bin/env ruby
dump = `ps -ef | grep zeus`
processes = dump.split("\n")
processes.each do |process|
process_id = process.scan(/[0-9]+/)[1]
`sudo kill -9 #{process_id}`
end
import tflearn
from tflearn.data_preprocessing import ImagePreprocessing
from tflearn.data_augmentation import ImageAugmentation
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_1d, max_pool_1d
from tflearn.layers.estimator import regression
img_prep = ImagePreprocessing()
img_prep.add_featurewise_zero_center()
from sklearn import linear_model
Y = np.array(Y) # array of training answers, 1 or 0
X = np.array([]) # array of image brightness
for filename in filenames:
# load the images
image = misc.imread(constants.IMAGE_64_PATH + '/' + filename, mode='L')
avg_brightness = np.matrix(image).mean()
X = np.append(X, avg_brightness)
import tflearn
from tflearn.data_preprocessing import ImagePreprocessing
from tflearn.data_augmentation import ImageAugmentation
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_1d, max_pool_1d
from tflearn.layers.estimator import regression
img_prep = ImagePreprocessing()
img_prep.add_featurewise_zero_center()
img_prep.add_featurewise_stdnorm()
@LastZactionHero
LastZactionHero / technical_skills_list.txt
Created November 26, 2016 18:58
Technical Skills List
.NET
360-degree video
3D Animation
3D Design
3D Model Maker
3D Modelling
3D Printing
3D Rendering
3ds Max
4D
@LastZactionHero
LastZactionHero / .bash_profile
Last active November 17, 2017 16:40
Bash Profile
# Git
# https://gist.github.com/n0n0x/7be453ff18f58020bafe
source ~/.git_bash_completion
# Go
export GOPATH=$HOME/development/go
export GOSRC=$GOPATH/src/github.com/LastZactionHero
export GOBIN=$GOPATH/bin
PATH=$PATH:$GOBIN
PATH=$PATH:/usr/local/go/bin