Skip to content

Instantly share code, notes, and snippets.

@nozma
nozma / 4-4-4-5.ipynb
Created August 1, 2018 12:11
4.4から4.5あたり
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# -*- coding:utf-8 -*-
import re
import os
import requests
import pandas as pd
from bs4 import BeautifulSoup
from urllib.parse import urljoin
# 農薬登録情報速報(http://www.acis.famic.go.jp/searchF/index/index.html)をスクレイピングする
# ※FAMICの免責事項に従ってください(https://www.acis.famic.go.jp/index_kensaku.htm)
@nozma
nozma / custom_css.css
Created April 30, 2018 07:11
custom css for discord.app
.message-group .comment .markup {
/* for Japanese language */
/* require IPAexGothic font */
font-family: 'IPAexGothic';
line-height: 1.6;
}
@nozma
nozma / main.py
Created April 22, 2018 13:35
my first discord bot
import os
import random
import numpy as np
from discord.ext import commands
BOT_PREFIX = ("?", "!")
client = commands.Bot(command_prefix=BOT_PREFIX)
@nozma
nozma / 01_intro.md
Created April 13, 2018 22:49
第1章 イントロダクション

第1章 イントロダクション

This is introduction!

本書の構成

  • 第1部: まず入門だ!
  • 第2部: OOPだ!
  • 第3部: ツールの話だ!
  • 第4部: サイエンスだ!
@nozma
nozma / Dockerfile
Last active March 18, 2018 00:15
ローカルのRStudioの設定をDockerコンテナ上のRStudio Serverに反映する ref: https://qiita.com/nozma/items/cae323708ff60cc2f67a
FROM rocker/rstudio
RUN mkdir -p /home/rstudio/.rstudio/monitored/user-settings/
RUN chown -R rstudio:rstudio /home/rstudio/.rstudio
@nozma
nozma / file0.r
Last active December 28, 2017 13:18
Rでフロイドの循環検出法を可視化する ref: https://qiita.com/nozma/items/bfa3e089cd432b74c10d
## フロイドの循環検出法を可視化する ----
library(dplyr)
library(igraph)
library(ggplot2)
library(GGally)
library(ggnetwork)
#devtools::install_github("dill/emoGG")
library(emoGG)
make_rho_graph <- function(lambda, mu, type = "network"){
" general
set autoupdategist " gistの設定を自動反映
let scrollstep = 150
let fullpagescrollpercent = 100
set smoothscroll
set noautofocus " サイトを開いた時に入力欄にフォーカスが奪われるのを抑止
let searchlimit = 20
let barposition = "bottom"
@nozma
nozma / Main.py
Last active August 28, 2017 13:56
# coding: utf-8
import random
def gen_typo(S):
return ' '.join(
s
# 長さ4以下の単語はそのまま返す
if len(s) <= 4
# 長さ5以上の単語は1文字目と2文字目を残してシャッフル
@nozma
nozma / Main.py
Last active August 17, 2017 13:13
# coding: utf-8
def cipher(S):
return ''.join(chr(219 - ord(c)) if c.islower() else c for c in S)
S = "abcDe"
print(cipher(S))
print(cipher(cipher(S)))