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
using System; | |
using System.Collections.Generic; | |
class Calc{ | |
static double Run(string[] ops, int idx){ | |
Dictionary<string, Func<double, double, double>> funcs = new Dictionary<string, Func<double, double, double>>(){ | |
{"+", (l, r) => l + r}, | |
{"-", (l, r) => l - r}, | |
{"*", (l, r) => l * r}, |
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
<!doctype html> | |
<html> | |
<head> | |
<title>TRIZ的なやつ</title> | |
<style> | |
html { | |
background-color: #ddd; | |
height: 100%; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
* { | |
overflow: hidden; | |
margin: 0; | |
padding: 0; | |
} | |
html { |
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
<!doctype html> | |
<html> | |
<head> | |
<title>LinuxClub</title> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width,initial-scale=1.0"> | |
<style> | |
body { | |
padding: 0; |
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
set -g prefix C-q | |
bind C-q send-prefix | |
bind C-k select-pane -U | |
bind C-j select-pane -D | |
bind C-l select-pane -R | |
bind C-h select-pane -L | |
unbind l | |
bind k resize-pane -U 3 |
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 sklearn.base import BaseEstimator, TransformerMixin | |
import numpy | |
class SOM(BaseEstimator, TransformerMixin): | |
def __init__(self, mapsize, input_dim, ini=None, fin=1, coefficient=0.005, verbose=False): | |
self.input_dim = input_dim | |
self.mapsize = numpy.array(list(mapsize)) | |
self.mapdim = len(self.mapsize) | |
self.idx = numpy.mgrid[[slice(x) for x in self.mapsize]].swapaxes(0, self.mapdim).swapaxes(0, 1) |
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
import cv2 | |
import numpy | |
cam = cv2.VideoCapture(0) | |
cam.set(cv2.CAP_PROP_FRAME_WIDTH, 1280) | |
cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 720) | |
mog = cv2.createBackgroundSubtractorMOG2() |
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
#define func(name, expression, ...) int name(__VA_ARGS__){ return expression; } | |
int PutC(char c){ char*t=&c; asm("mov $1,%%rax\nmov $1,%%rdi\nmov %0,%%rsi\nmov $1,%%rdx\nsyscall" :: "m"(t)); return 0; } | |
func(PutS, *string && PutC(*string) & PutS(string + 1), char* string); | |
func(EndL, PutC(0x0a)); | |
func(Fizz, PutS((char*)__func__)); |
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 <iterator> | |
#include <memory> | |
namespace funnycounter { | |
namespace item { | |
namespace interface { | |
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 <set> | |
class Position { | |
const int x, y; | |
public: | |
Position(int x, int y) : x(x), y(y) { } |