Skip to content

Instantly share code, notes, and snippets.

View idoushiki's full-sized avatar

Idoushiki idoushiki

  • Japan
View GitHub Profile
@idoushiki
idoushiki / gausu.js
Created December 3, 2017 12:26
ガウスルジャンドル Javascript
<html>
<script>
function printf(ms){
document.write(ms,"<br>");
}
var aa=0;
@idoushiki
idoushiki / Cookie.js
Last active December 5, 2017 10:41
本、参考
@idoushiki
idoushiki / pi.py
Last active December 7, 2017 10:27
import math
from decimal import *
import numpy as np
def getp(prec=1000, v=True):
prec = prec+2
import math
from decimal import *
#桁数
keta=1000
N = 2*math.ceil(math.log2(keta))
getcontext().prec = keta
@idoushiki
idoushiki / gazo.html
Last active January 3, 2018 01:58
画像が切り替わる何か
<html>
<head>
<script src="anime.js"></script>
<script>
var animation=new ImageLoop("loop",["a.png","b.png","c.png","d.png","e.png","f.png","g.png"]);
animation.start();
</script>
</head>
<?php
require_once("phpQuery-onefile.php"); //phpQuery-onefile.phpのファイルを配置した場所を指定する。
$html=file_get_contents("http://idoushiki.hatenablog.com"); //スクレイピングしたいサイトのURLを指定する。
echo phpQuery::newDocument($html)->find("body")->text();//
?>
<html>
<script>
max=6;
for(p=1;p<=max;p++){
for(h=1;h<=max;h++){
for(a=1;a<=max;a++){
for(b=1;b<=max;b++){
class Bread:
def __init__(self,menu="cheese "):
self.menu=menu
self.amount=0
def br(self,g):
self.amount+=g
msg=self.menu+str(self.amount)
print(msg)
amount=0
def bread(menu,am):
global amount
amount=amount+am
msg=menu+str(amount)
print(msg)
bread("greentea",20)
fp=open("words.txt","r")
msg = fp.read().lower()
counter = {}
for c in msg:
if not c in counter:
counter[c] = 1