This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nodeResolve from '@rollup/plugin-node-resolve'; | |
import babel from '@rollup/plugin-babel'; | |
import commonjs from '@rollup/plugin-commonjs'; | |
import replace from '@rollup/plugin-replace'; | |
import {terser} from 'rollup-plugin-terser'; | |
//Common JS Configurations | |
const commonJsConfigs = ['development', 'production'].map(mode => ({ | |
input: 'src/Recoil_index.js', | |
output: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@dynamicCallable | |
class GFun<T,R> { | |
var versions: [(([T]) -> Bool, (([T]) -> R))] = [] | |
func dynamicallyCall(withArguments args: [T]) -> R { | |
return versions.first { (entry) -> Bool in | |
return entry.0(args) | |
}!.1(args) | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fontName: "Go Mono" | |
fontSize: 12 | |
autoIndent: true | |
expandTab: true | |
fileTypes: | |
- path: "^.*\.go$" | |
expandTab: false | |
- path: Makefile | |
expandTab: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'nokogiri' | |
if ARGV.count != 1 | |
puts "Please specify gakufu.me url" | |
exit 1 | |
end | |
#url = 'http://gakufu.me/song/178834/' | |
url = ARGV[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
#include <queue> | |
using namespace std; | |
struct vect2 { | |
int x; | |
int y; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# In[5]: | |
from PIL import Image, ImageDraw | |
from matplotlib.pyplot import imshow | |
import numpy as np | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageDraw | |
import photos | |
import console | |
base = photos.capture_image() | |
w = base.size[0] | |
h = base.size[1] | |
paris = Image.new(base.mode, base.size, "white") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Data.List | |
data L = L (Maybe L) Int deriving (Eq) | |
instance Show L where | |
show (L Nothing l1) = show l1 | |
show (L (Just p) l1) = (show p) ++ "." ++ (show l1) | |
instance Ord L where | |
(L Nothing l1) `compare` (L Nothing l2) = l1 `compare` l2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(`forloop', | |
`pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')') | |
define(`_forloop', | |
`ifelse(eval($1 < `$3'), 1, | |
`$4`'define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(`forloop', | |
`pushdef(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')popdef(`$1')') | |
define(`_forloop', | |
`$4`'ifelse($1, `$3', , | |
`define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')') | |
forloop(`i', 1, 1000, | |
`ifelse(eval(i % 15 == 0), 1, FizzBuzz | |
,ifelse(eval(i % 5 == 0), 1, Fizz | |
,ifelse(eval(i % 3 == 0), 1, Buzz |
NewerOlder