Skip to content

Instantly share code, notes, and snippets.

IQ1 AdC 16 日目

アカデミックライティングの訓練をしてこなかった人間(me)がさびしい英語力で何とか英語で論文を書いてきたときに使っていたサービスやツールを挙げていきます。

  • Hyper Collocation https://hypcol.marutank.net
    • 先に現れる/後に続く単語をarXivの論文の中から検索できるサービスです。
    • 前置詞や接続詞のどれが正しいか調べるのはもとより、この表現は widely accepted な表現かどうかを確かめるといった用途にも役立ちます (ちなみに今 "widely accepted" という表現が widely accepted かどうかを調べました)
    • 欠点としては、たまに(ノンネイティブの)間違った英語もarXivに乗っていることがあります。
  • Do people say? https://dopeoplesay.com
  • Reddit の書き込みから例文を検索するシステムです。
from PIL import Image
from multiprocessing import Pool
import glob
LIMIT = 1920
def resize(file):
im = Image.open(file)
(ow, oh) = im.size
@45deg
45deg / main.cpp
Created September 26, 2018 07:16
RayTracer for M5Stack
#include <M5Stack.h>
#include "vec3.h"
#define IW 320
#define IH 240
const float F_EPS = 0.0001;
const vec3 LDR = vec3(0.577);
struct ray {
ray(vec3 o, vec3 d) : origin(o), direction(d) {};
  1. Update to the latest version of OCaml
  2. opam install reason merlin
  3. Add this to the settings
"reason.path.ocamlmerlin": "[USER]/.opam/system/bin/ocamlmerlin"
@45deg
45deg / list_transfer.js
Created May 25, 2018 11:43
Transfer twitter lists to another account
var Twitter = require('twitter')
var readline = require('readline')
var process = require('process')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
})
function ask(what){
type prop =
True |
Var of char |
And of prop * prop |
Not of prop |
N of prop |
U of prop * prop
(* slow! *)
let eventually p = U (True, p)
@45deg
45deg / genfrp.py
Last active March 19, 2018 06:54
An experiment code for kalman filtering in emfrp (Functional Reactive Languages for Embedded Systems)
# Requirements: Python (with matplotlib / numpy), gcc, emfrp (https://github.com/psg-titech/emfrp)
# Execute: python gencode.py Kalman 0.4 6
import matplotlib.pyplot as plt
import numpy as np
from string import Template
import subprocess
import sys
import tempfile
import os
@45deg
45deg / gen.py
Last active March 20, 2024 13:17
Generating Spiral Dataset for Classifying in Python
import numpy as np
from numpy import pi
# import matplotlib.pyplot as plt
N = 400
theta = np.sqrt(np.random.rand(N))*2*pi # np.linspace(0,2*pi,100)
r_a = 2*theta + pi
data_a = np.array([np.cos(theta)*r_a, np.sin(theta)*r_a]).T
x_a = data_a + np.random.randn(N,2)
.dark-border {
border: 1px solid rgb(228, 232, 234);
}
.dark-border-top {
border-top: 1px solid rgb(228, 232, 234);
}
html.dark {
color: rgb(228, 232, 234);
}
html.dark .is-inverted-dark .stream-item {
window.addEventListener('load', function(){
var timer = document.createElement('div');
timer.style.position = 'fixed';
timer.style.left = '50%';
timer.style.transform = 'translateX(-50%)';
timer.style.backgroundColor = '#000';
timer.style.fontSize = '24px';
timer.style.padding = '0 5px';
timer.style.color = '#FFF';
timer.style.fontFamily = '"MS Gothic", monospace';