Skip to content

Instantly share code, notes, and snippets.

View wdv4758h's full-sized avatar

Chiu-Hsiang Hsu wdv4758h

  • Taipei, Taiwan
View GitHub Profile
#include <wiringPi.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
/*
execute with "sudo ./turn 800 1" where 800 is number of steps and 1 is rotation direction.
This will turn a full revolution in 3.2 seconds, adjust delayMicrosenconds to speed up or slow down. Low torque motors may not be able to turn this fast. A 3 stack, NEMA 23 should be able to handle this speed if your load is not huge.
@wdv4758h
wdv4758h / imb.log
Created May 31, 2015 07:56
Intel MPI Benchmark result
#------------------------------------------------------------
# Intel (R) MPI Benchmarks 4.0 Update 1, MPI-1 part
#------------------------------------------------------------
# Date : Sun May 31 15:54:04 2015
# Machine : x86_64
# System : Linux
# Release : 3.10.0-229.4.2.el7.x86_64
# Version : #1 SMP Tue May 12 12:10:40 CDT 2015
# MPI Version : 3.0
# MPI Thread Environment:
@wdv4758h
wdv4758h / sleep_sort.cpp
Created May 5, 2015 15:03
Sleep Sort with OpenMP
// version 1, just print it
#include <cstdio>
#include <vector>
#include <unistd.h> // sleep
void sleep_sort(std::vector<unsigned long long> &data) {
const auto length = data.size();

http://scp-wiki.wdfiles.com/local--files/scp-427/scp427locket.JPG

項目編號 :SCP-427

項目等級 :Euclid

@wdv4758h
wdv4758h / rc.lua
Created December 19, 2014 11:40
.config/awesome/rc.lua
-- Need
-- transset-df
--
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")

Remote Access System

A rsh-like access system

This is my homework of Network Programming (for graduate student) in 2014.

Spec

@wdv4758h
wdv4758h / roadmap.rst
Created October 24, 2014 18:41
各種 roadmap
# 路過玩玩 XD
# 以下都以 Python 3 為考量,而且以 zip 為出發點來解這個問題。
'''
如果是一個完整 n x m 的資料,
類似的工作可以用 zip 就完成。
'''
data = [range(10) for i in range(8)]