Skip to content

Instantly share code, notes, and snippets.

View maccam912's full-sized avatar

Matthew Koski maccam912

View GitHub Profile
apt-get update && apt-get install curl wget build-essential cmake ninja-build unzip -y && wget https://github.com/oobabooga/text-generation-webui/releases/download/installers/oobabooga_linux.zip && unzip oobabooga_linux.zip && cd oobabooga_linux && echo "D" | bash start_linux.sh
### A Pluto.jl notebook ###
# v0.17.1
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local iv = try Base.loaded_modules[Base.PkgId(Base.UUID("6e696c72-6542-2067-7265-42206c756150"), "AbstractPlutoDingetjes")].Bonds.initial_value catch; b -> missing; end
@maccam912
maccam912 / matrix-setup-fedora.sh
Last active May 13, 2021 14:21
It might not work as is, but I'm trying to remember what I did to get homeserver running on fedora 34.
pip install --upgrade pip virtualenv six packaging appdirs
pip install --upgrade setuptools
pip install matrix-synapse
mkdir ~/synapse
pushd ~/synapse
python -m synapse.app.homeserver --server-name matrix.koski.co --config-path homeserver.yaml --generate-config --report-stats=yes
# Edit ~/synapse/homeserver.yaml
def check_for_dependencies():
# Dependency on python should be good if we make it this far. Python 3.7+ required for this script.
all_good = True
try:
# Check for requests, which this script uses
import requests
print("Found requests")
except:
print("Please install requests python library, `pip install requests`.")
all_good = False
0xe05F58C77860217dC073F45b12cB8238C14C58dB
import nltk
from nltk.collocations import *
import re, string, time, operator
start_time = time.time()
bigram_measures = nltk.collocations.BigramAssocMeasures()
test = "word"
corpus = nltk.corpus.PlaintextCorpusReader('/data/', '.*')
rawtext = corpus.words('biuw.txt')
#!/bin/bash
# Run this on This AMI on AWS:
# https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-b36981d8
# You should get yourself a fully working GPU enabled tensorflow installation.
cd ~
# grab cuda 7.0
/**
* Created by maccam912 on 11/9/15.
*/
import org.apache.spark
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
import org.apache.spark.rdd.RDD
import org.apache.spark.
@maccam912
maccam912 / gist:9589b37c65439416ec68
Last active November 17, 2015 15:53
Packages needed to build tensorflow on ubuntu
apt-get install git curl wget python-dev python-virtualenv gfortran libc-bin build-essential unzip zlib1g-dev zip oracle-java8-installer python-numpy swig python-dev
@maccam912
maccam912 / hostssetterupper.sh
Last active August 29, 2015 14:26
Used as a post-install script in openstack to set the correct hostname
#!/bin/sh
set -e -x
sed -i 's/^127.0.1.1.*$//g' /etc/hosts
echo "$(curl icanhazip.com) $(hostname)" >> /etc/hosts