# stage all modified files being tracked
git add -u
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
framework 'Foundation' | |
class NSIndexSet | |
def each | |
i = firstIndex | |
while i != NSNotFound | |
yield i | |
i = indexGreaterThanIndex(i) | |
end | |
end |
#!/usr/local/bin/macruby | |
framework 'Foundation' | |
include Dispatch | |
#``O_EVTONLY`` is defined as ``0x8000`` in the OS X header files. | |
# instead of RDONLY flag I use the O_EVTONLY flag to open() the file, otherwise we'll prevent the | |
# volume that the file is on from being unmounted. | |
O_EVTONLY = 0x8000 |
Submitting to the App Store
First, install Developer certs from Apple's Developer portal
To Build the Application:
- Select "Your App" from your Scheme menu, NOT "Deployment"
- Select Product > Archive to build for Release
- Once completed, the Organizer window will open
- Select your recent build and press the "Validate" button - make sure this passes!
# Gist to go with http://www.austinrochford.com/posts/2013-10-28-median-of-medians.html | |
# Chad Brewbaker 10/28/2013 | |
# https://news.ycombinator.com/item?id=6628474 | |
def median_5(list, i = list.length/2) | |
return list.sort[i] | |
end | |
def median(list, i = list.length/2) | |
if (list.length <= 5) |
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
# This script has to be run as a root user | |
echo "* Updating system" | |
apt-get update | |
apt-get -y upgrade | |
echo "* Installing packages" | |
apt-get -y install build-essential libmagickcore-dev imagemagick libmagickwand-dev libxml2-dev libxslt1-dev git-core nginx redis-server curl nodejs htop | |
id -u deploy &> /dev/null | |
if [ $? -ne 0 ] |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
This is a list of hacks gathered primarily from prior experiences as well as online sources (most notably Stanford's CS231n course notes) on how to troubleshoot the performance of a convolutional neural network . We will focus mainly on supervised learning using deep neural networks. While this guide assumes the user is coding in Python3.6 using tensorflow (TF), it can still be helpful as a language agnostic guide.
Suppose we are given a convolutional neural network to train and evaluate and assume the evaluation results are worse than expected. The following are steps to troubleshoot and potentially improve performance. The first section corresponds to must-do's and generally good practices before you start troubleshooting. Every subsequent section header corresponds to a problem and the section is devoted to solving it. The sections are ordered to reflect "more common" issues first and under each header the "most-eas