Skip to content

Instantly share code, notes, and snippets.

View vfulco's full-sized avatar

Vincent C Fulco vfulco

  • Weisisheng Corporate Management Consulting (Shanghai) Ltd.
  • Shanghai, China
View GitHub Profile
@peterhurford
peterhurford / r-pkgs.md
Created July 6, 2015 22:39
Notes on Hadley's "R Packages"

Notes from reading through R Packages by Hadley Wickham. This is meant to review, not replace, a thorough readthrough. I mainly wrote this as a personal review, since writing summaries and attempting to teach others are some of the best ways to learn things.

Introduction

  • Packages are used to organize code together so that it can be used repeatedly and shared with others.

  • A lot of work with packages is done via the devtools package.

@MarkEdmondson1234
MarkEdmondson1234 / combineCSVfiles.R
Created August 10, 2015 08:04
combine all csv files in a folder
## assuming you have a folder full of .csv's to merge
## csv's must all have identical column names.
folder <- "./path/to/csv/files"
filenames <- list.files(folder)
all_files <- Reduce(rbind, lapply(filenames, read.csv))
@henrik
henrik / dokku_on_digital_ocean.md
Last active May 12, 2022 14:38
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku

@MickaelBergem
MickaelBergem / owncloud-docker-compose.yml
Last active August 15, 2024 15:15
Docker Compose file for setting up an ownCloud server using a PostgreSQL database
# Composition of the containers
owncloud:
image: owncloud
ports:
- 80:80
volumes_from:
- owncloud-data
links:
- postgres:owncloud-db
@vfulco
vfulco / InstallationStack.md
Last active September 22, 2015 03:57 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
@vfulco
vfulco / text-cleaning+word2vec-gensim.py
Created November 27, 2015 02:15 — forked from a-paxton/text-cleaning+word2vec-gensim.py
Cleaning Text Data and Creating 'word2vec' Model with Gensim
# preliminaries
from pymongo import MongoClient
from nltk.corpus import stopwords
from string import ascii_lowercase
import pandas as pd
import gensim, os, re, pymongo, itertools, nltk, snowballstemmer
# set the location where we'll save our model
savefolder = '/data'
@vfulco
vfulco / signed_url.py
Created January 25, 2016 06:47 — forked from richarvey/signed_url.py
Generate signed URL's for S3 objects from the command line (requires .boto file for credentials)
#!/usr/bin/python
import boto, argparse
parser = argparse.ArgumentParser()
parser.add_argument('-b','--bucket', help='Name of your S3 Bucket', required=True)
parser.add_argument('-o','--object', help='Name of the object + prefix in your bucket', required=True)
parser.add_argument('-t','--time', type=int, help='Expirery in seconds Default = 60', default=60)
args = vars(parser.parse_args())
@jbryer
jbryer / Login.R
Last active September 24, 2020 10:35
# This script is modified by Jason Bryer ([email protected]) from Huidong Tian's
# original script. The blog post describing the method is here:
# http://withr.me/authentication-of-shiny-server-application-using-a-simple-method/
# The original R script is located here: https://gist.github.com/withr/9001831
#
# This script adds two new features: 1. Render a logout button, and 2. provide
# the ability for visitors to create a new account.
#
# Within your server.R file, be sure to use:
#
@kmctown
kmctown / dokku_on_do.md
Created February 22, 2016 00:20
Dokku Setup on DigitalOcean

Running Dokku on DigitalOcean

Notes on spinning up a new dokku server on DO. Inspired by this blog post by Bryan Kennedy.

Spin up

Pick a droplet

Choose the Dokku 1-click app