Skip to content

Instantly share code, notes, and snippets.

View damienstanton's full-sized avatar

Damien Stanton damienstanton

View GitHub Profile
@damienstanton
damienstanton / pixel_2xl_abi.md
Last active September 5, 2019 20:54
Rust + Android notes
  • arm64-v8a
  • armeabi-v7a
  • armeabi
@damienstanton
damienstanton / estimator.go
Created September 5, 2019 19:09
cocomo notes
package processor
import (
"math"
)
// EstimateCost calculates the cost in dollars applied using generic COCOMO2 weighted values based
// on the average yearly wage
func EstimateCost(effortApplied float64, averageWage int64) float64 {
return effortApplied * float64(averageWage/12) * float64(1.8)

ReasonML + ReactNative

Add ReasonML bindings to RN

npm i -g react-native react-native-cli
react-native init  --template reason-react-native-template
@damienstanton
damienstanton / androidmain_log.kt
Created August 23, 2019 20:49
Kotlin cross platform minimal example
package com.github.jeremyrempel.unsplash
import android.util.Log
actual fun log(level: LogLevel, tag: String, message: String, error: Throwable) {
when (level) {
is LogLevel.DEBUG -> Log.d(tag, message, error)
is LogLevel.INFO -> Log.i(tag, message, error)
is LogLevel.WARN -> Log.w(tag, message, error)
./configure --with-features=huge --enable-python3interp=yes --with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu
libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev
pip install --user jupyter jupyterlab ipython numpy matplotlib pandas scikit-learn scikit-image opencv-python firebase-admin tensorflow-gpu tensorflowjs
@damienstanton
damienstanton / Makefile
Created October 1, 2018 19:06
dsa makefile
name := $(shell basename $(CURDIR))
default: build
build:
@echo "Compiling..."
@g++ -pipe -O2 -std=c++14 *.cpp -lm -o $(name)
@echo "Done. Executable: $(name)"
clean:
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: