Skip to content

Instantly share code, notes, and snippets.

@MtShan
MtShan / ReadMe.txt
Last active February 9, 2016 08:03 — forked from belltailjp/simd.cpp
========================================================================
CONSOLE APPLICATION : ConsoleApplication1 Project Overview
========================================================================
AppWizard has created this ConsoleApplication1 application for you.
This file contains a summary of what you will find in each of the files that
make up your ConsoleApplication1 application.
@y-yu
y-yu / mp.py
Last active January 3, 2022 11:43
from charm.toolbox.integergroup import IntegerGroupQ
from charm.core.math.integer import toInt
import random
from functools import reduce
group = IntegerGroupQ()
group.paramgen(512)
cards = 52
@y-yu
y-yu / mental_mahjong.md
Last active March 14, 2018 00:02
Mental Mahjong

Mental Mahjong

Mental Mahjongとは?

Mental MahjongとはP2Pの仕組みを用いて、不誠実な(不正をするかもしれない)プレイヤー同士で、 第三者的の公平なジャッジサーバーを用いずに公平なゲームをする方法です。 Mental Pokerという ゲームを参考に僕(@yyu)と @shincbl@re_Ord@linerlock@mimizunohimono

@GraxRabble
GraxRabble / sodium_demo.c
Last active October 28, 2018 03:33
This c file demostrates how to use each libsodium functions and lets you play with them to see their outputs.
/*
* GraxRabble
* 04 MAY 2014
* Note this was created for the 4.5 version of libSodium.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sodium.h" /* library header */
@douglas-vaz
douglas-vaz / gmp.pc.in
Created November 10, 2013 11:58
pkg-config file for GMP
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: gmp
Description: GNU Multiple Precision Arithmetic Library
URL: http://gmplib.org
Version: @PACKAGE_VERSION@
Libs: -L${libdir} -lgmp
@iboard
iboard / .tmux.conf
Last active January 20, 2019 08:02
My .tmux-config for Mac OS X, iTerm2
set-window-option -g utf8 on
set -g mode-mouse on
set -g mouse-resize-pane on
set -g mouse-select-pane on
set -g mouse-select-window on
set-option -g prefix C-q
set -g history-limit 50000
unbind-key C-b
bind-key q send-prefix
set -g base-index 1
@mashiro
mashiro / message.hpp
Last active June 15, 2023 09:54
zeromq + msgpack
#include <string>
#include <ctime>
#include <msgpack.hpp>
struct message
{
std::string tag;
std::time_t time;
std::string text;
MSGPACK_DEFINE(tag, time, text);
@repeatedly
repeatedly / msgpack_issue_121.md
Last active November 30, 2021 02:09
MessagePackが文字列とバイナリをわけないのは問題?

MessagePackが文字列とバイナリをわけないのは問題?

msgpack/msgpack#121

Objective Cの実装使ってるとある問題にぶちあたった.なので,文字列をちゃんとバイナリ(Raw)と分けるべき,という提案

(*) 俺は熟読したわけではないので,中身が気になる人はちゃんと本スレを読みましょう

そもそもMessagePackとは

@sky-y
sky-y / jlatexdiff.sh
Last active June 3, 2016 08:10
jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
#!/bin/bash
# jlatexdiff: latexdiffを日本語LaTeX文書でうまく扱えるようにする
# 参考:http://blogs.yahoo.co.jp/pentainformation/28571072.html
# 実行時に指定された引数の数、つまり変数 $# の値が 2 でなければエラー終了
if [ $# -ne 2 ]; then
echo "指定された引数は$#個です." 1>&2
echo "実行するには2個の引数が必要です." 1>&2
echo "jlatexdiff [old file name] [new file name]" 1>&2
@belltailjp
belltailjp / simd.cpp
Created January 28, 2013 07:38
SSE,AVX組み込み関数を用いたベクトルの内積計算高速化の実験コード
#include <iostream>
#include <random>
#include <algorithm>
#include <boost/format.hpp>
#include <xmmintrin.h>
#include <immintrin.h>
#include <osakana/stopwatch.hpp>