Skip to content

Instantly share code, notes, and snippets.

Nebuta nebuta

  • Japan
Block or report user

Report or block nebuta

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 data.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 52 columns, instead of 44. in line 6.
import csv
import numpy as np
from scipy import stats
import matplotlib.pyplot as plt
import matplotlib
from matplotlib import rc
font = {'family':'IPAexGothic'}
rc('font', **font)
nebuta /
Last active Feb 10, 2019
HaskellでWebスクレイピング - Haskell Advent Calendar 2012


この記事はHaskell Advent Calendar 2012の26日目の記事です。Haskell Advent Calendar初参加です。コメントなどお待ちしております。

前提知識 - Haskellでの文字列処理

HaskellではString([Char]の別名)が文字列の基本型で、これはリストであるためにパターンマッチ・再帰やPreludeやData.Listにあるリスト用の関数を使って処理ができるという利点があります。ただし、実用上はパフォーマンスが低いため、TextByteStringが代わりに用いられます。Textはいわゆるユニコード文字列、ByteStringはバイト列という区別です。この使い分けに関してはちょうどAdvent Calendarの@brain_appleさんのこの記事で解説されました。StackOverflowでの質問も参考になります。



nebuta / reverse.purs
Last active Jan 9, 2018
PureScript string reverse test
View reverse.purs
-- Type PureScript code here and click 'Compile' ...
-- Or select an example from the list at the top right of the page
module Main where
foreign import reverse "function reverse(s) { return function() { return s.split('').reverse().join(''); }; }" :: String -> String
a :: String
a = reverse "Hello"
nebuta / d3-geo.html
Created Jan 20, 2014
D3.js TopoJSON drawing example (map of Japan)
View d3-geo.html
<!DOCTYPE html>
Fetch file:
Shape data
To view data: Use QGIS software. Install matplotlib, FreeType library, etc in advance.
nebuta / copipe.cpp
Last active Jan 3, 2016
Is (´・_・`((´・_・`)´・_・`)) a copy-and-paste of (´・_・`)?
View copipe.cpp
#include <vector>
#include <iostream>
using namespace std;
bool failed = false;
int pos = 0;
string s;
string seq = "ABCDCba";
nebuta /
Created Dec 16, 2013


これはHaskell Advent Calendar 2013の16日目の記事です。突っ込み・コメントなど歓迎します。




nebuta / tree-test.hs
Last active Dec 29, 2015
Tree breadcrumb interconversion test
View tree-test.hs
{-# LANGUAGE FlexibleInstances #-}
import Data.Tree
import Test.QuickCheck
import Control.Applicative
import Data.List
import Data.Function
import Control.Monad
import Data.Maybe
nebuta / category.hs
Created Sep 19, 2013
Example of Category instance?
View category.hs
{-# LANGUAGE OverloadedStrings, GADTs, NoImplicitPrelude #-}
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Control.Monad.Writer
import Prelude hiding ((.),id)
import Control.Category
nebuta / js-graph.hs
Last active Dec 23, 2015
Haskell to D3.js binding simple prototype
View js-graph.hs
{-# LANGUAGE OverloadedStrings, GADTs, NoImplicitPrelude, ExistentialQuantification, FlexibleInstances #-}
module JSGraph where
import Data.List
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Prelude hiding ((.),id)
You can’t perform that action at this time.