Skip to content

Instantly share code, notes, and snippets.

View jowagner's full-sized avatar

Joachim Wagner jowagner

View GitHub Profile
@jsbueno
jsbueno / unpikle_to_text.py
Created January 5, 2019 02:05
Python script to read a pickle-file to print its contents with as few side-effects (importing, instantiating) as possible
import re, pickle, pprint, sys
from types import ModuleType
from collections.abc import Sequence, Mapping, Set
from contextlib import contextmanager
def pythonize(obj):
if isinstance(obj, (str, bytes)):
return obj
@ljaraque
ljaraque / tensorflow-gpu-ubuntu.md
Last active March 12, 2022 10:32
Install tensorflow-gpu in ubuntu

Install tensorflow-gpu1.8 in ubuntu18.04 with CUDA9.2, cuDNN7.2.1 and NVIDIA Driver 396

[email protected]

Overview

This is a summary of the process I lived in order to enable my system with CUDA9.2, cuDNN7.2.1, Tensorflow1.8 and NVIDIA GEFORCE GTX860M GPU. You can just skip the steps marked with FAILED. I decided to keep them there in order to be useful for others who tried those paths too.

FAILED (Next section is successfull) Install NVIDIA driver (FAILED, THIS WILL INSTALL DRIVER 390 which is not compatible with CUDA9.2):

ubuntu-drivers devices
@Fleshgrinder
Fleshgrinder / gpg.sh
Last active May 17, 2021 10:00
Create GPG Key for GitHub Commit Signing
#!/bin/sh
set -eu
#
# Commands for generating a new GPG key for GitHub commit signing.
#
# https://help.github.com/articles/generating-a-new-gpg-key/
#
gpg --full-gen-key
@shodanshok
shodanshok / blocksync.py
Last active April 25, 2023 13:23 — forked from rcoup/blocksync.py
Block device sync between remote hosts. Based off http://www.bouncybouncy.net/programs/blocksync.py
#!/usr/bin/env python
"""
Synchronise block devices over the network
Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net>
Copyright 2011 Robert Coup <robert@coup.net.nz>
License: GPL
Getting started:
@chrishokamp
chrishokamp / 5_word2vec.ipynb
Created May 13, 2016 15:11
Example solution to Udacity Deep Learning course assignment 5 -- W2V CBOW
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alopresto
alopresto / gpg_git_signing.md
Last active September 10, 2024 17:07
Steps to enable GPG signing of git commits.

If anyone is interested in setting up their system to automatically (or manually) sign their git commits with their GPG key, here are the steps:

  1. Generate and add your key to GitHub
  2. $ git config --global commit.gpgsign true ([OPTIONAL] every commit will now be signed)
  3. $ git config --global user.signingkey ABCDEF01 (where ABCDEF01 is the fingerprint of the key to use)
  4. $ git config --global alias.logs "log --show-signature" (now available as $ git logs)
  5. $ git config --global alias.cis "commit -S" (optional if global signing is false)
  6. $ echo "Some content" >> example.txt
  7. $ git add example.txt
  8. $ git cis -m "This commit is signed by a GPG key." (regular commit will work if global signing is enabled)
@karpathy
karpathy / min-char-rnn.py
Last active November 18, 2024 15:04
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@ramcq
ramcq / blocksync.py
Last active July 6, 2021 15:03 — forked from rcoup/blocksync.py
#!/usr/bin/env python
"""
Synchronise block devices over the network
Copyright 2006-2008 Justin Azoff <[email protected]>
Copyright 2011 Robert Coup <[email protected]>
Copyright 2012 Holger Ernst <[email protected]>
Copyright 2014 Robert McQueen <[email protected]>
License: GPL
@blackfalcon
blackfalcon / git-feature-workflow.md
Last active November 5, 2024 19:53
Git basics - a general workflow

Git-workflow vs feature branching

When working with Git, there are two prevailing workflows are Git workflow and feature branches. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the atlassian.com Git Workflow article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on setting up GIT Bash autocompletion. This tool will assist you to better visualize the state of a branc

@tkuchiki
tkuchiki / new_gist_file_0
Created January 10, 2014 09:55
iscsi over ssh tunnel
$ autossh -M 33333 -N -f -L 13260:10.150.1.26:3260 sg
$ yum install -y iscsi-initiator-utils
$ iscsiadm -m discovery -t sendtargets -p 127.0.0.1:13260
$ vim /var/lib/iscsi/send_targets/127.0.0.1\,13260/iqn.1997-05.com.amazon\:myvolume\,10.150.1.26\,3260\,1\,default/default
#node.conn[0].address = 10.150.1.26
#node.conn[0].port = 3260
node.conn[0].address = 127.0.0.1