Skip to content

Instantly share code, notes, and snippets.

@arosh
arosh / hotbath.ipynb
Last active January 2, 2022 05:55
hotbath
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arosh
arosh / main.c
Last active December 8, 2020 04:56
hwpoison
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/mman.h>
const int SIZE = 4096;
int main(void) {
int *addr = malloc(sizeof(int)*SIZE);
posix_memalign(&addr, 4096, sizeof(int)*SIZE);
import 'dart:typed_data';
import 'package:flutter/material.dart';
import 'package:mlkit/mlkit.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@arosh
arosh / Bayes.md
Created October 8, 2018 12:04
楽しいベイズモデリングの誤植?
  • p.16 $\hat{R}&gt;1.1$$\hat{R}&lt;1.1$ の間違い?
@arosh
arosh / off.html
Created February 27, 2018 07:04
Spring Seminar
<form action="on.html"><button type="submit" style="padding: 0.5em 1em; font-size: 18px; background-color: #4CAF50; color: #FFF; border: none;">OFF -&gt; ON</button></form>
@arosh
arosh / nginx.conf
Last active November 25, 2017 00:46
Nginx WebDAV
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 10240;
}
http {
sendfile on;
@arosh
arosh / README.md
Last active June 26, 2017 16:24
ACM-ICPC OB/OG の会 2017年度 模擬国内予選
@arosh
arosh / simple.ipynb
Created April 17, 2017 12:17
stan-aoj (1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def stanfit_to_dataframe(fit, pars=None):
"""
Parameters
==========
fit : pystan.StanFit4model
"""
import pandas
summary = fit.summary(pars=pars)
columns = summary['summary_colnames']
index = summary['summary_rownames']
@arosh
arosh / hello.js
Last active March 14, 2017 02:37
Promise sleep
function wait () {
return new Promise((resolve, reject) => {
setTimeout(resolve, 1000)
})
}
function foo (i) {
return new Promise((resolve, reject) => {
console.log(i)
resolve()