Skip to content

Instantly share code, notes, and snippets.

View horitaku1124's full-sized avatar

Horimatsu Takuya horitaku1124

  • Tokyo
View GitHub Profile
gcc -O2 -mavx512f vector.c -fopt-info-vec-all -S -o vector.s
gcc -O2 -mavx512f vector.c -fopt-info-vec-all -c  -o vector
gcc -O0 -mavx512f test3.c -fopt-info-vec-all -o test3 vector
import jdk.incubator.vector.*;
/*
javac14 src/main/java/VectorTest.java \
--add-modules jdk.incubator.vector \
-d out/
java14 -cp out/ VectorTest
@see http://cr.openjdk.java.net/~kkharbas/vector-api/CSR/javadoc.02/jdk.incubator.vector/jdk/incubator/vector/package-summary.html
# docker build -f Dockerfile . -t wasm-builder
# docker run -it -v `pwd`:/root/wasm wasm-builder bash
FROM ubuntu:latest
RUN apt update
RUN apt install -y llvm git python vim libxml2
WORKDIR /root
RUN git clone https://github.com/emscripten-core/emsdk.git
set tabstop=4
set shiftwidth=4
set expandtab
@horitaku1124
horitaku1124 / cpu_regression.py
Created January 7, 2020 12:07
multiple regression
# -*- coding: utf-8 -*-
import statsmodels.api as sm
import pandas as pd
from matplotlib import pyplot as plt
def main():
# 過去の案件データの取り込み(診断工数、画面数、診断員の経験値、Webサーバのレスポンス速度)
data = pd.read_csv('cpu_scores.csv', skiprows=1, names=['cores', 'threads', 'base_clock', 'boost_clock', 'L1_cache', 'L2_cache', 'L3_cache', 'CinebenchR20'], encoding='UTF_8')
# 画面数、診断員の経験値、Webサーバのレスポンス速度を説明変数として定義
@horitaku1124
horitaku1124 / RemoteTest.kt
Last active February 7, 2020 15:05
Setup selenium grid
import org.junit.After
import org.junit.Before
import org.junit.Test
import org.openqa.selenium.OutputType
import org.openqa.selenium.TakesScreenshot
import org.openqa.selenium.WebDriver
import org.openqa.selenium.chrome.ChromeOptions
import org.openqa.selenium.firefox.FirefoxOptions
import org.openqa.selenium.remote.RemoteWebDriver
import java.io.File
@horitaku1124
horitaku1124 / minikube.Vagrantfile
Last active February 20, 2020 10:33
minikube setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-19.10"
config.vm.provider "virtualbox" do |vb|
vb.cpus = "2"
end
config.vm.network "private_network", ip: "192.168.33.100"
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
/**
* http://www.file-recovery.com/mp4-signature-format.htm
*/
public class IsoFileReader {
public static void main(String[] args) throws IOException {
File file = new File("test1.mp4");
import java.io.IOException;
import java.io.InputStream;
import static java.lang.Thread.sleep;
public class MemoryLimit {
private static final int TRY_COUNT = 5;
public static void main(String[] args) throws IOException, InterruptedException {
double memory = 10_000_000;
double lastSuccessMemory = memory;
package com.example.alternate;
import java.sql.*;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.Executor;
public class OConnection implements Connection {
private Connection altConn;
public OConnection(Connection alternateConnection) {