Skip to content

Instantly share code, notes, and snippets.

@zaxtax
zaxtax / EXAMPLE.service
Created April 25, 2024 00:40 — forked from fcangialosi/EXAMPLE.service
Automatically start long-running script on boot and keep it running with systemd
[Unit]
Description=Description of this service
[Service]
Type=simple
ExecStart=/usr/bin/nohup /path/to/server.sh
Restart=always
RestartSec=30
StandardOutput=/path/to/log
StandardError=/path/to/log
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zaxtax
zaxtax / reading-list.rst
Created December 19, 2021 23:44 — forked from alexjc/reading-list.rst
Reading List on Texture Synthesis
@zaxtax
zaxtax / README.md
Created March 1, 2021 23:27 — forked from lmullen/README.md
Getting the Ace editor to work with gitit

The file page.st goes in the templates/ directory in the Gitit wiki home directory. You'll put the Ace JavaScript and CSS files in static/.

{-# LANGUAGE FlexibleInstances #-}
-- | An implementation of Section 3, Local Type Argument Synthesis, from the
-- paper /Local Type Inference/ by Pierce and Turner.
module Infer where
import Control.Monad (foldM, join, zipWithM)
import Data.Function (on)
import Data.List (foldl', groupBy, intercalate, intersect, nub)
class BayesianModel(object):
samples = 2000
def __init__(self, cache_model=True):
self.cached_model = None
self.cached_start = None
self.cached_sampler = None
self.shared_vars = {}
def cache_model(self, **inputs):
self.shared_vars = self._create_shared_vars(**inputs)
@zaxtax
zaxtax / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Created March 2, 2017 07:54 — forked from whizzzkid/XPS-15 9560 Getting Nvidia To Work on KDE Neon
Making Nvidia Drivers + CUDA 8 + Bumblebee work together on XPS 15 Early 2017 9560 kabylake.
# Update to 4.9 kernel do not delete the old kernel as it will be your failsafe if something happens to this one
# Install KabyLake graphics patches
cd /tmp;
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kbldmcver101.tar.bz2;
tar xjvf kbldmcver101.tar.bz2; cd kbl_dmc_ver1_01/; sudo ./install.sh
cd /tmp;
wget https://01.org/sites/default/files/downloads/intelr-graphics-linux/kblgucver914.tar.gz;
tar xvzf kblgucver914.tar.gz; cd firmware/kbl/guc/kbl_guc_ver/; sudo ./install.sh
@zaxtax
zaxtax / ProgrammaticNotebook.ipynb
Created February 23, 2017 02:28 — forked from fperez/ProgrammaticNotebook.ipynb
Creating an IPython Notebook programatically
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zaxtax
zaxtax / xor.py
Created February 12, 2017 03:39 — forked from stewartpark/xor.py
Simple XOR learning with keras
from keras.models import Sequential
from keras.layers.core import Dense, Dropout, Activation
from keras.optimizers import SGD
import numpy as np
X = np.array([[0,0],[0,1],[1,0],[1,1]])
y = np.array([[0],[1],[1],[0]])
model = Sequential()
model.add(Dense(8, input_dim=2))
@zaxtax
zaxtax / DDP Regression.ipynb
Created September 27, 2016 20:27 — forked from AustinRochford/DDP Regression.ipynb
Dependent Dirichlet Process Regression
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.