Skip to content

Instantly share code, notes, and snippets.

View quiye's full-sized avatar
🏠
Working from home

Ishida Yuya quiye

🏠
Working from home
  • LY Corporation
  • Kanagawa, Japan
  • 15:23 (UTC +09:00)
View GitHub Profile
#include<iostream>
#include<fstream>
#include<sstream>
#include <k2hash/k2hash.h>
#include <k2hash/k2hshm.h>
using namespace std;
int main(){
K2HShm k;
cout << k.GetSystemPageSize() << endl;
@quiye
quiye / a.scala
Created March 4, 2018 01:40
自分自身を出力するscalaスクリプト
import scala.io.Source
for (line <- Source.fromFile("a.scala").getLines())
println(line)
@quiye
quiye / odict.py
Last active February 26, 2018 13:48
OrderedDictの継承
# -*- coding: utf-8 -*-
num=0
from collections import OrderedDict
class TestExtends(OrderedDict):
def __init__(self):
OrderedDict.__init__(self)
def append(self,key,value):
global num
self[key]=value
@quiye
quiye / pipeline.scala
Last active February 18, 2018 13:21
scalaでパイプライン演算子(repl (amm) )
@ val nijo = (x:Int) => x*x
nijo: Int => Int = ammonite.$sess.cmd2$$$Lambda$1945/330224683@51ed2f68
@ val minus10 = (x:Int) => x-10
minus10: Int => Int = ammonite.$sess.cmd3$$$Lambda$1949/497232815@a80a896
@ 4 |> nijo |> minus10
res4: Int = 6
@ val hoge = 4 |> nijo |> minus10
@quiye
quiye / average.py
Last active February 12, 2018 12:54
平均を0にする正規化のやり方
import numpy as np
from numpy.random import *
m = 5
n = 3
a = rand(m,n)
v = np.full((n,n),1)
u = np.full((m,m),1)
print('a => 入力の行列')
print(a)
@quiye
quiye / face.zshrc
Created November 5, 2017 21:31
promptに顔文字
PROMPT="%(?.%{${fg[green]}%}😉.%{${fg[white]}%}%{${bg[red]}%}😨)[%n@%m]%(?.😉%{${reset_color}%} %~.😨 %~%{${reset_color}%})
%# "
@quiye
quiye / hoge.html
Created October 16, 2017 15:20
chart.jsで横の積み重ねの練習
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.0/Chart.js"></script>
<p>