Skip to content

Instantly share code, notes, and snippets.

/c/ympfh cympfh

Block or report user

Report or block cympfh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View web.listening.you.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Speech-to-Text</title>
<script>
function echo(text) {
var style = 'color: #884488; font-weight: bold; font-size: 20px; \
text-shadow: #dddddd 2px 0px, #dddddd -2px 0px, #dddddd 0px -2px, \
View sqrt.tch.rs
extern crate tch; // https://github.com/LaurentMazare/tch-rs
use tch::{Tensor, no_grad};
fn sqrt(v: f64) -> f64 {
let mut x = Tensor::from(v / 2.0).set_requires_grad(true);
let lambda = 0.01;
for _ in 0..100 {
let y = &x * &x - v;
let loss = &y * &y;
x.zero_grad();
View neoki.sh
#!/bin/bash
URL=http://s.cympfh.cc/cympfh/sleep
OUT=./neoki.png
last_status=NONE
datfile=$(mktemp)
curl -s $URL | while read t status; do
date_ymd=$(date -d "$t" "+%Y%m%d")
View cors-anywhere.sh
#!/bin/bash
HEADER=$(mktemp)
BODY=$(mktemp)
REQ=$(mktemp)
FIFO=/tmp/fifo.$$
mkfifo $FIFO
trap "rm -f $HEADER $BODY $REQ $FIFO; exit" INT
View magic-bingo.js
function iota(n, begin=0, step=1) {
var xs = [];
while (xs.length < n) {
if (xs.length == 0) {
xs.push(begin);
} else {
xs.push(xs[xs.length - 1] + step);
}
}
return xs
View zshrc.pyenv.zsh
pyenv-init() {
if [ -d ~/.pyenv ]; then
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$HOME/.pyenv/bin:$PATH"
[ -d $PYENV_ROOT ] && eval "$(pyenv init -)"
fi
}
python() {
unfunction python
unfunction pip
View tabelog.de.ミシュランガイド.de.kensakushita.txt
https://tabelog.com/tokyo/A1301/A130101/13002260/
https://tabelog.com/tokyo/A1301/A130101/13002322/
https://tabelog.com/tokyo/A1301/A130101/13002374/
https://tabelog.com/tokyo/A1301/A130101/13002573/
https://tabelog.com/tokyo/A1301/A130101/13004993/
https://tabelog.com/tokyo/A1301/A130101/13005014/
https://tabelog.com/tokyo/A1301/A130101/13005683/
https://tabelog.com/tokyo/A1301/A130101/13007587/
https://tabelog.com/tokyo/A1301/A130101/13009543/
https://tabelog.com/tokyo/A1301/A130101/13010470/
View jupyter-notebook-template.md

A template for jupyter-notebook

%load_ext autoreload
%autoreload 2
import numpy
from PIL import Image
from IPython.display import display
View xterm-256colors.sh
#!/bin/bash
for i in $(seq 0 15); do
for j in $(seq 0 15); do
C=$(( i * 16 + j ))
printf "\e[48;5;${C}m %03x " "${C}"
done
printf "\e[0m\n" # reset & newline
done
View adv-web-2017.md

これは次の11日のための記事です。

Webスクレイピング Advent Calendar 2017 https://adventar.org/calendars/2105

intro

普通に生きていると生活上の要請から必要になることがあります. 私の場合、2017年で最も役に立ったのは、スイッチの再販の監視でした. ところであれは、時間少し前からスマホからのアクセスだけ妙に重たくなったのだが、意図的なものだったのだろうか.

You can’t perform that action at this time.