This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt update | |
sudo apt -y install build-essential cmake | |
# Install Nvidia driver | |
sudo apt -y install nvidia-384 | |
# Install git | |
sudo apt -y install git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chmod a+x startup-script.sh | |
# chmod 777 startup-script.sh | |
# sudo cp ./startup-script.sh /etc/init.d/ | |
# sudo ln -s /etc/init.d/startup-script.sh /etc/rc5.d/ | |
# --- Microsoft Classic Intellimouse --- | |
# Fix mouse sensitivity | |
xinput --set-prop 8 282 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import theano | |
import theano.tensor as T | |
import numpy as np | |
import cPickle | |
import random | |
import matplotlib.pyplot as plt | |
class RNN(object): | |
def __init__(self, nin, n_hidden, nout): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
#include <gdk/gdkscreen.h> | |
#include <cairo.h> | |
#include <gdk-pixbuf/gdk-pixbuf.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
/* | |
* This program shows you how to create semi-transparent windows, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
#include <gdk/gdkscreen.h> | |
#include <cairo.h> | |
#include <gdk-pixbuf/gdk-pixbuf.h> | |
#include <stdlib.h> | |
/* | |
* This program shows you how to create semi-transparent windows, | |
* without any of the historical screenshot hacks. It requires | |
* a modern system, with a compositing manager. I use xcompmgr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
#include <gdk/gdkscreen.h> | |
#include <cairo.h> | |
/* | |
* This program shows you how to create semi-transparent windows, | |
* without any of the historical screenshot hacks. It requires | |
* a modern system, with a compositing manager. I use xcompmgr | |
* and the nvidia drivers with RenderAccel, and it works well. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
#include <gdk/gdkscreen.h> | |
#include <cairo.h> | |
/* | |
* This program shows you how to create semi-transparent windows, | |
* without any of the historical screenshot hacks. It requires | |
* a modern system, with a compositing manager. I use xcompmgr | |
* and the nvidia drivers with RenderAccel, and it works well. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* compile with: | |
* gcc $(pkg-config xext x11 cairo-xlib-xrender --cflags --libs) cairo-xshape-example.c | |
* https://github.com/jordansissel/experiments/blob/master/randomcode/cairo-xshape-example.c | |
*/ | |
#include <cairo-xlib.h> | |
#include <X11/Xlib.h> | |
#include <X11/Xutil.h> | |
#include <stdio.h> | |
#include <X11/extensions/shape.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile for transregion | |
CFLAGS = -g | |
LDFLAGS = -L/usr/X11R6/lib -lXpm -lXext -lX11 -lm | |
all: transregion | |
transregion: transregion.o | |
$(CC) -o transregion transregion.o $(LDFLAGS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nltk | |
nltk.download('punkt') | |
nltk.download('averaged_perceptron_tagger') | |
import wikipedia | |
page = wikipedia.page(wikipedia.search('albert einstein')[0]) | |
sentences = nltk.sent_tokenize(page.content) | |
print nltk.word_tokenize(sentences[0]) | |
print nltk.pos_tag(sentences[0]) |