Skip to content

Instantly share code, notes, and snippets.

View hyounggyu's full-sized avatar

Kim Hyounggyu hyounggyu

View GitHub Profile
#!/usr/bin/python
import sys, getopt, zipfile, shutil, os
import os.path as osp
f = "cp949"
t = "utf-8"
def usage():
print sys.argv[0] + " -f shift-jis -t utf-8 <filename>"
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NationalInstruments.Vision;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using NationalInstruments.Vision;
using NationalInstruments.Vision.Acquisition.Imaq;
namespace StroboR3
#
# Data type.
#
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy as np
def getAll(fstr, ncol):
return [ [ float(val.split()[ncol]) for val in d.strip().split('\n') ] for d in fstr.strip().split('\n\n') ]
var net = require('net');
var fs = require('fs');
var tmp;
fs.readdir('/', function (err, files) {
//files.forEach(function (file) {
//});
tmp = JSON.stringify(files);
});
/* https://gist.github.com/creationix/707146 */
var net = require('net');
var server = net.createServer(function (socket) {
socket.on('data', function (data) {
var message;
try {
message = JSON.parse(data);
} catch (e) {
/**cc -oreadtiff -L/usr/lib/ -ltiff readtiff.c **/
/**cc -oreadtiff -ltiff readtiff.c **/
#include <tiffio.h>
#include <stdlib.h>
uint32 w,h,*raster;
size_t npixels;
int main(int argc, char* argv[])
{
#!/bin/sh
# Unknown Author.
HOSTLISTFILE="$HOME/.hosts"
#Error display function
Error_Show() {
case "$1" in
1) echo 'Usage : psh node[,node] command';;
2) echo "psh:Hostlist file not exist";;
#
# http://stackoverflow.com/questions/519633/lazy-method-for-reading-big-file-in-python
#
def readline_in_chunks(file_object, chunk_size=1024):
buf = ''
while True:
data = file_object.read(chunk_size)
if not data:
break
#
# Data Type:
# x y z vx vy vz particle_id
#
# References:
# http://www.vtk.org/Wiki/VTK/Examples/Python/GeometricObjects/Display/Point
# http://stackoverflow.com/questions/7591204/how-to-display-point-cloud-in-vtk-in-different-colors
# http://stackoverflow.com/questions/519633/lazy-method-for-reading-big-file-in-python
import vtk