Skip to content

Instantly share code, notes, and snippets.

View autosquid's full-sized avatar

mightu autosquid

  • HangZhou, ZheJiang, China.
View GitHub Profile
@autosquid
autosquid / Install NVIDIA Driver and CUDA.md
Created April 15, 2018 16:26 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS

trick

if you create a new wget child process "wget http://foo.bar", but redirect child stdin and stdout to the same pipe, wget will give you something like this

  0K .......... .......... .......... .......... ..........  0%  105K 2h1m
 50K .......... .......... .......... .......... ..........  0%  158K 1h41m
100K .......... .......... .......... .......... ..........  0%  302K 81m58s
@autosquid
autosquid / git_submodules.md
Created May 12, 2017 07:52 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@autosquid
autosquid / tmux-cheatsheet.markdown
Created April 20, 2017 03:55 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@autosquid
autosquid / README.md
Created March 25, 2017 11:25 — forked from amroamroamro/README.md
[Python] Fitting plane/surface to a set of data points

Python version of the MATLAB code in this Stack Overflow post: http://stackoverflow.com/a/18648210/97160

The example shows how to determine the best-fit plane/surface (1st or higher order polynomial) over a set of three-dimensional points.

Implemented in Python + NumPy + SciPy + matplotlib.

quadratic_surface

conda install pyqt=4
conda install -c https://conda.binstar.org/menpo opencv
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@autosquid
autosquid / samuels_python3_setup.md
Created February 17, 2016 09:44 — forked from samueljohn/samuels_python3_setup.md
For my own reference. Brewed Python3, numpy, scipy and the rest goes in a pyvenv.

Samuel's Python3 setup for Mac:

This document describes in which way, what packages, and from where are installed on my Macs to get a decent Python 3.x, scipy/numpy & Co setup.

Note, I switched to Python's 3.x pyvenv from virtualenv in order to handle my pip-installable packages. Also thanks to Anaconda, the whole setup is so simple now that I use this document just to remember which additional packages I like.


@autosquid
autosquid / preprocessor_fun.h
Created December 21, 2015 08:57 — forked from aras-p/preprocessor_fun.h
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@autosquid
autosquid / tls_samp.cpp
Last active August 29, 2015 14:07 — forked from kumagi/tls_samp.cpp
#include <boost/thread.hpp>
#include <boost/thread/tss.hpp>
#include <boost/bind.hpp>
#include <iostream>
class del{
public:
int dat;
del(int i):dat(i){}