Skip to content

Instantly share code, notes, and snippets.

Emrah Er emraher

Block or report user

Report or block emraher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rgithub.R
# Load "github" library
library("github")
# Load github oauth
# load("~/my_oauth/my_oauth_github")
# Get starred by user emraher
starred.by.emrah <- get.repositories.starred.by.user("emraher")
# Find index of "rgithub"
View TourismConvert
setwd("~/Dropbox/Tourism/csv")
rm(list=ls())
# Libraries ====================================================================
library("plyr")
library("reshape2")
library("zoo")
# Functions ====================================================================
# Delete incomplete cases
# http://stackoverflow.com/a/11258247
View TourismMerge
setwd("~/Dropbox/Tourism/Rdata")
rm(list=ls())
# Libraries ====================================================================
library("plyr")
library("reshape2")
# Start Merge ==================================================================
# See the following
# [1] http://goo.gl/9IojH8
# [2] http://goo.gl/IP1wa9
@emraher
emraher / TBMM.R
Last active Aug 29, 2015
TBMMGenelKurulu Twitter
View TBMM.R
rm(list=ls())
# Load required libraries
library(RCurl)
library(stringr)
library(tm)
library(wordcloud)
library(RColorBrewer)
library(twitteR)
library(streamR)
View coefficent_plot_walkthrough.R
doInstall <- TRUE
toInstall <- c("ggplot2")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
ANES <- read.csv("http://www.oberlin.edu/faculty/cdesante/assets/downloads/ANES.csv")
ANES <- ANES[ANES$year == 2008, -c(1, 11, 17)] # Limit to just 2008 respondents,
head(ANES) # remove some non-helpful variables
# Fit several models with the same DV:
View GIF-Screencast-OSX.md

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@emraher
emraher / osx-for-hackers.sh
Created Oct 22, 2015 — forked from matthewmueller/osx-for-hackers.sh
OSX for Hackers (Mavericks/Yosemite)
View osx-for-hackers.sh
# 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
@emraher
emraher / brew-update-notifier.sh
Created Oct 23, 2015 — forked from SimonSimCity/brew-update-notifier.sh
Extended the script, written by @streeter to exclude the pinned formulae in the list of formulas to update.
View brew-update-notifier.sh
#!/bin/bash
#
# Notify of Homebrew updates via Notification Center on Mac OS X
#
# Author: Chris Streeter http://www.chrisstreeter.com
# Requires: terminal-notifier. Install with:
# brew install terminal-notifier
TERM_APP='/Applications/Terminal.app'
BREW_EXEC='/usr/local/bin/brew'
View findsimilar.py
from whoosh.index import open_dir
from whoosh.index import create_in
from whoosh.fields import *
from whoosh.qparser import QueryParser
import glob
import os
# USER SET PARAMETERS ############
@emraher
emraher / unzip.sh
Created Mar 19, 2016
Recursively unzip
View unzip.sh
#
# I used this command to recursively unzip the files I downloaded from PRISM.
# Data is structured as
#
# tmin
# -- 1981
# ----xxx.zip
# ----xxy.zip
# -- 1982
# ----xxx.zip
You can’t perform that action at this time.