Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
# Here are a few methods for getting text from PDF files. Do read through | |
# the instructions carefully! NOte that this code is written for Windows 7, | |
# slight adjustments may be needed for other OSs | |
# Tell R what folder contains your 1000s of PDFs | |
dest <- "G:/somehere/with/many/PDFs" | |
# make a vector of PDF file names | |
myfiles <- list.files(path = dest, pattern = "pdf", full.names = TRUE) |
#!/bin/bash | |
# Default Variable Declarations | |
DEFAULT="Default.txt" | |
FILEEXT=".ovpn" | |
CRT=".crt" | |
KEY=".3des.key" | |
CA="ca.crt" | |
TA="ta.key" | |
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
#!/bin/bash | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# and here | |
# https://gist.github.com/brandonb927/3195465 | |
# Set the colours you can use | |
black='\033[0;30m' |
#!/bin/bash | |
# Requires: brew install imagemagick --with-little-cms --with-little-cms2 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
echo "" | |
echo "" | |
echo "" | |
echo "" | |
echo "All the images in the following folder will be changes: " |
#' Get a PubMed search index | |
#' @param query a PubMed search string | |
#' @return the XML declaration of the search | |
#' @example | |
#' # Which articles discuss the WHO FCTC? | |
#' pubmed_ask("FCTC OR 'Framework Convention on Tobacco Control'") | |
pubmed_ask <- function(query) { | |
# change spaces to + and single-quotes to URL-friendly %22 in query | |
query = gsub("'", "%22", gsub(" ", "+", query)) |
# Implementation of a simple MLP network with one hidden layer. Tested on the iris data set. | |
# Requires: numpy, sklearn, theano | |
# NOTE: In order to make the code simple, we rewrite x * W_1 + b_1 = x' * W_1' | |
# where x' = [x | 1] and W_1' is the matrix W_1 appended with a new row with elements b_1's. | |
# Similarly, for h * W_2 + b_2 | |
import theano | |
from theano import tensor as T | |
import numpy as np | |
from sklearn import datasets |
# Example code to demonstrate parallel for loop implementation using joblib | |
from joblib import Parallel, delayed | |
import multiprocessing | |
# Vars | |
my_list = range(10) | |
squares = [] | |
# Function to parallelize | |
def find_square(i): |