Skip to content

Instantly share code, notes, and snippets.

logworthy

Block or report user

Report or block logworthy

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
@logworthy
logworthy / gist:c896b77a51168ebb8338ee78740180d8
Created Aug 13, 2019
Removing a program via powershell
View gist:c896b77a51168ebb8338ee78740180d8
Install-Module -Name PowerShellCookbook
$app = Get-InstalledSoftware | Where-Object { $_.Publisher -like '*Anaconda*' }
$app.UninstallString
View install_tex_packages.sh
export TEXLIB=/usr/share/texlive/texmf-dist/
export packagename=tabu
wget http://mirrors.ctan.org/macros/latex/contrib/$packagename.zip
unzip $packagename.zip
cd $packagename
latex *.ins
sudo mkdir $TEXLIB/tex/latex/$packagename
sudo cp *.sty $TEXLIB/tex/latex/$packagename
cd ..
View RSetup.R
# To get setup quickly just run the below line:
# (note that it changes with revisions to the file... will try to keep it up to date)
# source('https://gist.githubusercontent.com/logworthy/695f037e79ca4a2c49f2bdbe3502a0c5/raw/459be6d79c7e2762cae9b5c981a18dfde24da4ba/RSetup.R')
# set up R with desired pacakges and load them by default
# install packages
packages_required <- c(
'data.table',
'RODBC',
View linear programming example
/*****
EXAMPLE OF A LINEAR PROGRAMMING PROBLEM
*****/
/* classes of things */
set CATEGORIES;
/* function discretised over these points */
set POINTS;
@logworthy
logworthy / Logistic Simulations
Created May 6, 2015
Simulation of how simple logistic regresion can fail to model binomial response when the underlying function is more complicated.
View Logistic Simulations
# Simulation of how simple logistic regression can fail to model
# binomial response when the underlying function is more complicated
install.packages(c('data.table', 'plyr', 'ggplot2', 'drc'))
library(data.table)
library(plyr)
library(ggplot2)
library(drc)
# Generalised logistic function
logistic_function <- function(x) {
View BikeShare CSV Import With R
df <- read.csv("stations.csv", nrows=1000000, colClasses=c("integer","NULL","POSIXct", "NULL","NULL","NULL","NULL","integer","NULL","NULL","NULL","NULL","integer","NULL","NULL","NULL"))
View parking event copying
create table parking_events (
id integer,
areaname text,
streetname text,
betweenstreet1 text,
betweenstreet2 text,
sideofstreet text,
streetmarker text,
arrivaltime timestamp,
You can’t perform that action at this time.