Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#define N 10
int cmp(const void *a, const void *b) {
int *aptr = (int*) a;
int *bptr = (int*) b;
if(*aptr < *bptr) return -1;
#!/bin/bash
YEAR=10
echo -ne "================\n IMSLab $YEAR "
printf "\xE9\x80\xB1\xE5\xB9\xB4\n\n"
printf " \xE6\x95\x99\xE5\xB8\xAB\xE7\xAF\x80"
printf "\xE5\xBF\xAB\xE6\xA8\x82\xEF\xBC\x81\n"
echo "================"
@HMKRL
HMKRL / .vimrc
Created September 16, 2020 17:52
Basic .vimrc
set nocompatible
filetype plugin indent on
set encoding=utf-8
set term=xterm-256color
set tabstop=4
set ai
set shiftwidth=4
syntax on
@HMKRL
HMKRL / trace.py
Last active October 16, 2018 15:44
Mite tracing use OpenCV
import os
import sys
import cv2
import math
import numpy as np
def distance_delta(x, y, px, py):
return round(math.sqrt((px - x) ** 2 + (py - y) ** 2), 2)
def detect(filename):
@HMKRL
HMKRL / pH.ino
Created February 12, 2018 02:47
#define VOLTAGE 5.00 //system voltage
#define OFFSET 12 //orp zero drift voltage
#define LED 13 //operating instructions
#define SensorPin A0 //pH meter Analog output to Arduino Analog Input 0
#define orpPin A5 //orp meter output,connect to Arduino controller ADC pin
#define Offset 0.00 //deviation compensate
#define LED 13
#define samplingInterval 20