Skip to content

Instantly share code, notes, and snippets.

View NickShargan's full-sized avatar

Mykola Sharhan NickShargan

  • Canada, Toronto
View GitHub Profile

Ubuntu 22.04 for Deep Learning

In the name of God

This gist contains steps to setup Ubuntu 22.04 for deep learning.


Install Ubuntu 22.04

@NickShargan
NickShargan / MainActivity.kt
Created April 25, 2018 11:31 — forked from akirasosa/MainActivity.kt
Benchmark tensorflow model in Android.
package tfexample.myapp.com.myapplication
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import org.tensorflow.contrib.android.TensorFlowInferenceInterface
import kotlin.system.measureTimeMillis
val modelName = "file:///android_asset/mobile_unet_160_100_100.pb"
@NickShargan
NickShargan / coco.m
Created March 25, 2018 13:46
Convert MS COCO Annotation to Pascal VOC format
function coco(n, k, note, dotrainval, testyear)
% Train and evaluate a model.
% pascal(n, note, dotrainval, testyear)
%
% The model will be a mixture of n star models, each of which
% has 2 latent orientations.
%
% Arguments
% n Number of aspect ratio clusters to use
% (The final model has 2*n components)
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!
@NickShargan
NickShargan / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Created March 13, 2018 13:04 — forked from IamAdiSri/Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py