Skip to content

Instantly share code, notes, and snippets.

View jimapps's full-sized avatar

Jim Liu jimapps

View GitHub Profile
@jimapps
jimapps / POMS.csl
Last active February 19, 2021 20:44
Production and Operations Management Society (POMS)
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Production and Operations Management</title>
<id>http://www.zotero.org/styles/production-and-operations-management</id>
<link rel="self" href="http://www.zotero.org/styles/production-and-operations-management"/>
<link href="http://www.poms.org/journal/author_instructions/" rel="documentation"/>
<link href="http://onlinelibrary.wiley.com/doi/10.1111/poms.12393/abstract" rel="documentation"/>
<author>
@jimapps
jimapps / gar_fun.r
Last active August 29, 2015 14:22 — forked from fawda123/gar_fun.r
gar.fun<-function(out.var,mod.in,bar.plot=T,struct=NULL,x.lab=NULL,
y.lab=NULL, wts.only = F){
require(ggplot2)
require(plyr)
# function works with neural networks from neuralnet, nnet, and RSNNS package
# manual input vector of weights also okay
#sanity checks
plot.nnet<-function(mod.in,nid=T,all.out=T,all.in=T,bias=T,wts.only=F,rel.rsc=5,
circle.cex=5,node.labs=T,var.labs=T,x.lab=NULL,y.lab=NULL,
line.stag=NULL,struct=NULL,cex.val=1,alpha.val=1,
circle.col='lightblue',pos.col='black',neg.col='grey',
bord.col='lightblue', max.sp = F,...){
require(scales)
#sanity checks
if('mlp' %in% class(mod.in)) warning('Bias layer not applicable for rsnns object')
#!/usr/bin/perl
# Copyright (c) 2015, Paul Ford, ford@ftrain.com
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
@jimapps
jimapps / get_patent_zip_file.R
Last active August 29, 2015 14:19
Download patent files from google
## 0.1 get the zip file list
get_zip_file_list <- function(url="http://www.google.com/googlebooks/uspto-patents-grants-text.html"){
library(XML)
library(RCurl)
baseURL <- getURL(url)
xmltext <- htmlParse(baseURL, encoding='UTF-8')
link.list0 <- getNodeSet(xmltext, "//a")
link.list <- sapply(link.list0, xmlGetAttr, "href")