Skip to content

Instantly share code, notes, and snippets.

View SSARCandy's full-sized avatar
🔭
💤

Andy Hsu SSARCandy

🔭
💤
View GitHub Profile
head [] --Head error
tail [] --Tail error
3 : 5 --Cons error
head (5 : (tail (1 : 2 : []))) --5
tail (1 : 2 : 3 : []) -- [2,3]
tail (1 : []) -- []
1 + 2 : 3 * 4 : 5 : 6 : [] --[3,12,5,6]
(2, 2) --(2, 2)
(1 + 2 : 3 * 4 : 5 : 6 : [], [], True, 0) --([3,12,5,6], [], True, 0)
@SSARCandy
SSARCandy / PL-key-point.md
Last active August 29, 2015 14:23
key point of PL

程式語言三面向:

  • Syntax
  • Semantics
  • Implementation

FP and Haskell:

  • Basics (tail-recursion, higher-order functions)
  • Closure
  • No free-variable

參與畢業生拯救計畫的大家!久等了!
您的會員帳號已進入審核,待一天後即可登入囉!歡迎加入 Dcard : )

請記得您的「自介」、「生日」與「照片」必須在登入後進行上傳填寫修正完整,否則將無法使用抽卡功能喔!

新加入成員必讀基本使用須知:

@SSARCandy
SSARCandy / snakeToCamel.js
Created January 28, 2016 11:15
Converting snake_case to camelCase
/**
* Converting snake_case to camelCase
* usage: node snakeToCamel.js <src> <dst>
*
* 2015/01/28 by SSARCandy
*/
const fs = require('fs');
function snakeToCamel(s) {

API adjustment

  • 第二階段填完,要直接更新redis (member/status
  • 未開放學校填完第二階段
  • 寄安慰他的驗證信
  • 安慰他的驗證信文案
  • 未開放學校驗證後,啟用like (也要有標記的在 member/status user.schoolValidated
  • 學校開放後自動升級那些驗證過的人到二階

Test case

視訊訊號處理與深度學習應用

image

Computer Vision

  • character recognizer
  • image & vedio
  • photosynth
@SSARCandy
SSARCandy / opencv_with_cmake.md
Last active April 15, 2024 02:25
Setting up OpenCV(+extra modules) with Cmake step by step tutorial

Setting up OpenCV with Cmake GUI

  1. Download OpenCV and Cmake
  2. Build opencv with cmake image
  • Press configure, choose visual studio 2015, finish
  • Then press generate
  1. Open OpenCV.sln under build/
  2. Build it using Debug, Release
    image
const input = "251521 011805 1805010425 011404 01021205 2015 0415 020501212009062112 200809140719 0914 20080919 2315181204 011404 0106200518 251521 23011211 20081815210708 2008151905 0415151819 2015040125 251521 23091212 15141225 05220518 08012205 202315 03081509030519 12152205 1518 06050118 030815151905 12152205 011404 041514 20 05220518 120520 06050118 20211814 251521 01070109141920 25152118 16120125062112 0805011820 100913 030118180525";
function decoder(str) {
return (str.length > 2)
? charMap(str.slice(0,2)) + decoder(str.slice(2))
: charMap(str);
}
function charMap(str) {
return "abcdefghijklmnopqrstuvwxyz"[parseInt(str)-1];
@SSARCandy
SSARCandy / interpolation_comparsion.ipynb
Last active April 12, 2017 14:26
python opencv shrink interpolation comparsion
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@SSARCandy
SSARCandy / gpu-occupy-status.sh
Last active August 26, 2021 17:18
Show GPU occupying status in dgx-1 (using nvidia-smi)
#!/bin/bash
function show_gpu_user {
pid=$(pstree -sg $1 | grep -Eo 'bash\([0-9]*\)' | head -1 | grep -Eo '[0-9]*');
docker ps -q | xargs docker inspect --format "{{.Name}} {{.State.Pid}}" | grep $pid | awk '{printf "%-24s", $1}';
ps aux | grep $1 | grep -v grep | awk '{ for(i=1;i<=NF;i++) {if ( i >= 11 ) printf $i" "}; printf "\n" }';
}
echo " ";