This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function perf(a=1.0, N=1000; n=100) | |
srand(98765) | |
X = rand(N, N) | |
Y = rand(N, N) | |
println("N=$N") | |
print(" BLAS: ") | |
gc_enable(false) | |
gc() | |
@time for i in 1:n |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <mutex> | |
#include <pcl/io/openni2_grabber.h> | |
#include <pcl/visualization/pcl_visualizer.h> | |
typedef pcl::PointXYZ T; | |
class SimpleOpenNIViewer { | |
public: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
julia> using ProgressMeter | |
julia> cxx""" | |
#include <iostream> | |
#include <cmath> | |
double FooBar(size_t N) { | |
double result = 0.0; | |
$:(global progress_meter = Progress(icxx"return N;", 1); nothing); | |
for (size_t i = 0; i < N; ++i) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import numpy as np | |
import cv2 | |
from pylibfreenect2 import Freenect2, FrameMap, SyncMultiFrameListener | |
from pylibfreenect2 import FrameType, Registration, Frame | |
from pylibfreenect2 import OpenGLPacketPipeline, CpuPacketPipeline | |
fn = Freenect2() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <pcl/io/pcd_io.h> | |
#include <pcl/visualization/pcl_visualizer.h> | |
#include <vtkActor.h> | |
#include <vtkPNGWriter.h> | |
#include <vtkPolyData.h> | |
#include <vtkPolyDataMapper.h> | |
#include <vtkRenderWindow.h> | |
#include <vtkRenderer.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pylibfreenect2 import Freenect2, SyncMultiFrameListener | |
from pylibfreenect2 import FrameType, Registration, Frame | |
import sys | |
import numpy as np | |
import cv2 | |
try: | |
from pylibfreenect2 import OpenGLPacketPipeline | |
pipeline = OpenGLPacketPipeline() | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by ryuyamamoto on 2016/10/07. | |
*/ | |
import java.util.Random | |
fun computeDistance(x1: DoubleArray, x2: DoubleArray): Double { | |
var distance: Double = 0.0 | |
for (d in x1.indices) { | |
distance += (x1[d] - x2[d]) * (x1[d] - x2[d]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPL_RESULT=$(kotlinc << EOF | |
import java.time.* | |
println(OffsetDateTime.now().toString()) | |
EOF) | |
TIME_STR=$(echo $REPL_RESULT | sed -e 's/\(.*\)println(OffsetDateTime.now().toString())\(.*\) >>>/\2/g' | awk '{print $1}') | |
echo $TIME_STR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ulbw 監視スクリプト | |
set -e | |
app_path="/Users/Shared/wlbw/wlbw_ir.app" | |
tlb_cmd_stop=$(cat << EOS | |
ps ax | grep $app_path | grep -v grep | awk {'print \"kill\", \$1'} | sh | |
EOS) |