Skip to content

Instantly share code, notes, and snippets.

View mdagost's full-sized avatar

Michelangelo D'Agostino mdagost

View GitHub Profile
# coding=UTF-8
import nltk
from nltk.corpus import brown
# This is a fast and simple noun phrase extractor (based on NLTK)
# Feel free to use it, just keep a link back to this post
# http://thetokenizer.com/2013/05/09/efficient-way-to-extract-the-main-topics-of-a-sentence/
# Create by Shlomi Babluki
# May, 2013
# load required packages
library(shiny)
library(shinyIncubator)
library(googleVis)
library(ggplot2)
library(stringr)
library(plyr)
library(XML)
library(httr)
library(Hmisc)
#!/usr/bin/php
<?php
/**
* Checks a list of domains and outputs any that use Google.
*
* usage: php ./googlecheck.php filewithdomains
*
*/
stream_set_blocking(STDIN, 0);
#! /bin/sh
### BEGIN INIT INFO
# Provides: shiny-server
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: shiny Server
# Description: shiny server deploys R shiny applications
### END INIT INFO
## See http://gettinggeneticsdone.blogspot.com/2013/06/customize-rprofile.html
## Load packages
library(BiocInstaller)
## Don't show those silly significanct stars
options(show.signif.stars=FALSE)
## Do you want to automatically convert strings to factor variables in a data.frame?
## WARNING!!! This makes your code less portable/reproducible.
@mdagost
mdagost / scala.rb
Last active December 29, 2015 03:18 — forked from JoshRosen/scala.rb
require 'formula'
class ScalaDocs < Formula
homepage 'http://www.scala-lang.org/'
url 'http://www.scala-lang.org/files/archive/scala-docs-2.9.3.zip'
sha1 '5bf44bd04b2b37976bde5d4a4c9bb6bcdeb10eb2'
end
class ScalaCompletion < Formula
homepage 'http://www.scala-lang.org/'
// Predict from Gaussian Process
// All data parameters must be passed as a list to the Stan call
// Based on original file from https://code.google.com/p/stan/source/browse/src/models/misc/gaussian-process/
data {
int<lower=1> N1;
vector[N1] x1;
vector[N1] y1;
int<lower=1> N2;
vector[N2] x2;
@mdagost
mdagost / jiggle.sh
Created March 16, 2014 23:38
Applescript to make a window jiggle back and forth at a configurable amplitude and frequency
#!/bin/bash
#the amount of time in between shakes in seconds
pause=$1
#amplitude is the amount of horizontal diplacement
amp=$2
window_width=800
#calculate the position of the right side of the window
x_pos_2=`expr $window_width + $amp`
@mdagost
mdagost / vw_compile.sh
Created March 25, 2014 19:47
Compiling vowpal wabbit from source on a Mac
./autogen.sh
./configure
make