Skip to content

Instantly share code, notes, and snippets.

View PatWie's full-sized avatar
💭
waiting for the end of the AI hype

Patrick Wieschollek PatWie

💭
waiting for the end of the AI hype
View GitHub Profile
@PatWie
PatWie / nvml.py
Created February 8, 2018 23:56
NVML for Python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Patrick Wieschollek <[email protected]>
"""
A Python2 + Python3 wrapper for NVML
"""
from ctypes import *
import threading
@PatWie
PatWie / c.txt
Created January 6, 2018 20:13
c.txt
A B C D E F
A B C D E H
A B C D E I
A B C D E K
A B C D E L
A B C D E M
A B C D E O
A B C D F H
A B C D F I
A B C D F K
@PatWie
PatWie / foot.txt
Last active January 6, 2018 15:41
shhot foot
TASK: To shoot yourself in the foot...
C
You shoot yourself in the foot.
C++
You accidentally create a dozen instances of yourself and shoot them all in the foot.
Providing emergency medical care is impossible since you can't tell which are bitwise
copies and which are just pointing at others and saying, "That's me over there."
@PatWie
PatWie / test.cu
Created December 1, 2017 14:13
test nvidia-smi
// compile me by nvcc copy.cu -o test
#include <iostream>
int main(int argc, char const *argv[])
{
const size_t MB = 10;
const size_t len = MB*256;
float *d_ptr, *h_ptr;
@PatWie
PatWie / wide_face.py
Last active October 5, 2017 03:55
wide_face
# Patrick Wieschollek <[email protected]>
from zipfile import ZipFile
import cv2
import numpy as np
import scipy.io as sio
from tensorpack import *
import argparse
"""
@PatWie
PatWie / TheNumericsOfGANs.ipynb
Created September 16, 2017 01:23 — forked from LMescheder/TheNumericsOfGANs.ipynb
This notebook contains the code for the toy experiment in the paper The Numerics of GANs.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PatWie
PatWie / settings.py
Created August 2, 2017 13:49
Sublime Text Settings Side-by-Side in an Active Window
"""
Add `"open_settings_in_new_window": false,` to the `Preferences.sublime-settings`.
"""
import os.path
import sublime
import sublime_plugin
starting in with black's turn
------ START internal representation ------------------
WHITE (O) vs BLACK (X)
x 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8
A B C D E F G H J K L M N O P Q R S T y
19 . o x . . . . . . . . . . . . . . . . 19 0
18 . x o x . . . . . . . . . . . . . . . 18 1
@PatWie
PatWie / decode.py
Last active July 3, 2017 11:17
decode.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import cv2
import argparse
import numpy as np
from tensorpack import *
"""
@PatWie
PatWie / README.md
Created June 16, 2017 20:01 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements