Skip to content

Instantly share code, notes, and snippets.

View damienstanton's full-sized avatar

Damien Stanton damienstanton

View GitHub Profile
error[E0119]: conflicting implementations of trait `python::IntoPyDictPointer` for type `(_, _)`:
--> /Users/damien/.cargo/registry/src/github.com-1ecc6299db9ec823/pyo3-0.3.2/src/objects/dict.rs:246:1
|
231 | / impl <K, V, I> IntoPyDictPointer for I
232 | | where
233 | | K: ToPyObject,
234 | | V: ToPyObject,
... |
243 | | }
244 | | }
@damienstanton
damienstanton / README.md
Last active July 26, 2018 20:50
Easily merge master branch onto feature branch

Let's say you are working on feature branch F, but you notice that origin/master M has been updated with commits that you want to merge onto your feature branch.

The synchronize function does this in a sensible manner.

Going from:

--*--*--*--*(M)
\--*(F)

to:

@damienstanton
damienstanton / teals_2.md
Created July 14, 2018 19:07
TEALS session 2 notes

TEALS training #2

  • Hook
    • Get the student engaged
  • Do
    • Get the student involved in the activity (in this case writing on the board)
// Sample program: Count1000.java
public class Count1000 {
@damienstanton
damienstanton / app.c
Created March 5, 2018 15:58
subtype poly in C
#include "common.h"
#include "a.h"
#include "my_app.h"
static void * _init(MyApp * this, void * (constructor)()) {
return constructor();
}
static int _run(MyApp * this, void * client) {
A * a = ((AAccessor*) client)->ancestor;
{
"configurations": [
{
"name": "Mac",
"C_Cpp.intelliSenseEngine": "Default",
"includePath": [
"${workspaceRoot}/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include"
],
"intelliSenseMode": "clang-x64",
@damienstanton
damienstanton / cuda.sh
Last active February 27, 2018 22:36
darknet
#!/bin/bash
sudo apt update
sudo apt install -y build-essential
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt update
sudo apt install cuda -y
@damienstanton
damienstanton / requirements.txt
Last active March 1, 2018 02:05
python script
# macOS DL bundle
pylint
yapf
jupyterlab
numpy
scipy
scikit-image
scikit-learn
pillow
matplotlib
@damienstanton
damienstanton / requirements.txt
Last active February 20, 2018 16:02
modern lab notebook
# prelims
jupyterlab
ipython
flask
yapf
pylint
# cv and ml
numpy
scikit-image
@damienstanton
damienstanton / warnings.log
Created February 19, 2018 06:19
eogmaneo warnings for swig java build
λ [Java/build] on  master ✔
→ make [924ea77]
Scanning dependencies of target EOgmaNeo
[ 11%] Building CXX object CMakeFiles/EOgmaNeo.dir/Users/damien/oss/eogmaneo/source/eogmaneo/Hierarchy.cpp.o
[ 22%] Building CXX object CMakeFiles/EOgmaNeo.dir/Users/damien/oss/eogmaneo/source/eogmaneo/Layer.cpp.o
[ 33%] Building CXX object CMakeFiles/EOgmaNeo.dir/Users/damien/oss/eogmaneo/source/eogmaneo/Preprocessing.cpp.o
[ 44%] Building CXX object CMakeFiles/EOgmaNeo.dir/Users/damien/oss/eogmaneo/source/eogmaneo/ThreadPool.cpp.o
[ 55%] Building CXX object CMakeFiles/EOgmaNeo.dir/Users/damien/oss/eogmaneo/source/optional/OpenCVInterop.cpp.o
[ 66%] Linking CXX static library libEOgmaNeo.a
[ 66%] Built target EOgmaNeo
@damienstanton
damienstanton / searchcommits.sh
Created January 30, 2018 22:33
search commits
#!/bin/bash
git log --pretty=format:"%h - %an, %ar : %s" --grep "$@"