Skip to content

Instantly share code, notes, and snippets.

View Realitian's full-sized avatar
focusing

Infinite Reality Solution Realitian

focusing
View GitHub Profile
@Realitian
Realitian / multiple_ssh_setting.md
Created September 28, 2022 14:53 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@Realitian
Realitian / clean_code.md
Created October 13, 2021 14:09 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@Realitian
Realitian / UpdatePreferences.kt
Created June 3, 2021 06:21 — forked from adammagana/UpdatePreferences.kt
An Android SharedPreferences function extension that simplifies the edit-and-apply flow
import android.content.SharedPreferences
/**
* Simple extension to remove the need to call `SharedPreferences.edit()` and `SharedPreference.Editor.apply()` for
* every preferences change.
*/
fun SharedPreferences.update(updateBlock: SharedPreferences.Editor.() -> Unit) {
val editor = edit()
updateBlock(editor)
@Realitian
Realitian / sugh.sh
Created May 14, 2021 15:55 — forked from erdincay/sugh.sh
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
//
// LiveFrameCaptureViewController.swift
// SCNKit2Video
//
// Created by Lacy Rhoades on 11/29/16
// Revised 7/19/17
// Copyright © 2017 Lacy Rhoades. All rights reserved.
//
import Foundation
echo
echo "This installation sets up a P2 instance on AWS (Ubuntu 14.04 only), installs all necessary packages"
echo "which are required for CUDA, TensorFlow, Keras, Caffe and Torch."
echo
# Install dependencies
sudo apt-get update
sudo apt-get --assume-yes upgrade
sudo apt-get install -y build-essential git python-pip libfreetype6-dev libxft-dev libncurses-dev libopenblas-dev gfortran python-matplotlib libblas-dev liblapack-dev libatlas-base-dev python-dev python-pydot linux-headers-generic linux-image-extra-virtual unzip python-numpy swig python-pandas python-sklearn zip
sudo pip install -U pip
@Realitian
Realitian / DeepLearningFaces.md
Created July 4, 2017 14:03 — forked from jdsgomes/DeepLearningFaces.md
Deep Learning for Face Recognition

Deep Learning for Face Recognition (May 2016)

Popular architectures

  • FaceNet (Google)
    • They use a triplet loss with the goal of keeping the L2 intra-class distances low and inter-class distances high
  • DeepID (Hong Kong University)
    • They use verification and identification signals to train the network. Afer each convolutional layer there is an identity layer connected to the supervisory signals in order to train each layer closely (on top of normal backprop)
  • DeepFace (Facebook)
    • Convs followed by locally connected, followed by fully connected