Skip to content

Instantly share code, notes, and snippets.

View Bomberus's full-sized avatar

Pascal Maximilian Bremer Bomberus

  • Sinsheim, Germany
View GitHub Profile
@Bomberus
Bomberus / w2v
Created April 24, 2017 18:21
w2v Validation
stopwords:
'too','was','where','just','how','have','so','this','has','into','or','what','now', 'about', 'when', 'their','will','some','off','all','can','your','his','you','over', 'no','out','more','not','who','its', 'up','it','be', 'after','that','are','by','but', 'from','an', 'as', 'at','with', 'is','on','and','for','of','to','in','a','the'
labels:
['Arts' 'Business' 'Health' 'Opinion' 'Politics' 'Science' 'Sports' 'Style' 'Technology']
Title (min 35 Character) :
Train : 7204
@Bomberus
Bomberus / notebook_importing.py
Last active November 30, 2016 20:52
Notebook Importing Python 3.5 compatible
"""
Module directly collated from
http://nbviewer.ipython.org/github/adrn/ipython/blob/1.x/examples/notebooks/Importing%20Notebooks.ipynb
"""
import io, os, sys, types
from nbformat import current
from IPython.core.interactiveshell import InteractiveShell
def find_notebook(fullname, path=None):
"""find a notebook, given its fully qualified name and an optional path
@Bomberus
Bomberus / windows.sh
Created October 12, 2016 16:20
QEMU KVM - Windows 10 GPU Passthrough
# Get the memory consumed by cache (memory used by the cache cannot be used for hugepages)
free -m | awk 'NR==2{print $6}'
# Free Cache Memory
sync && echo 3 > /proc/sys/vm/drop_caches
@Bomberus
Bomberus / gpuswitch.sh
Created October 12, 2016 08:14
GPU Switcher NVIDIA <--> Nouveau <--> VFIO-PCI
#!/bin/sh
# Switch GPU Drivers
# Script by Pascal Maximilian Bremer
# === Functions ===
# Read GPUs in System
lspci -v | perl -ne '/VGA/../^$/ and /VGA|Kern/ and print'
# Read name of selected GPU