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
{-# Language GADTs #-} | |
module Main where | |
import Control.Monad.Cont | |
data Proper = John | Mary -- Proper -> john | mary | |
data Det = A | The -- DET -> a | the | |
data N = Man | Woman -- N -> man | woman | |
data NP = NP0 Det N | NP1 Proper -- NP -> Det N | Proper | |
data VI = Sleeps | Walks -- VI -> sleeps | walks | |
data VT = Loves -- VT -> loves |
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
function makeZako(n){ | |
return {hp: 20, mp:20, name:"zako" + n}; | |
} | |
var enemies = [makeZako(0), makeZako(1), makeZako(2), makeZako(3)]; | |
var player = {hp: 20, mp:20, name:"yuusya"}; | |
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
function Maou(){ | |
this.hp = 100; | |
this.name = "魔王"; | |
} | |
Maou.prototype.attack = function(aite) { | |
// 魔王の攻撃 | |
alert(aite + "に魔王が二重攻撃!!"); | |
}; | |
function Cribou(){ |
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
{-# LANGUAGE TupleSections #-} | |
module Lib | |
( someFunc | |
) where | |
import Text.Parsec | |
import System.IO | |
import Data.List | |
import Graphics.Gnuplot.Simple | |
import Control.Monad.Reader |
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
module Main exposing (main) | |
import Browser | |
import Browser.Events exposing (onAnimationFrameDelta) | |
import Canvas exposing (rect, shapes) | |
import Canvas.Settings exposing (fill) | |
import Canvas.Settings.Advanced exposing (rotate, transform, translate) | |
import Color | |
import Html exposing (Html, div) | |
import Html.Attributes exposing (style) |
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 mathcomp Require Import all_ssreflect. | |
Set Implicit Arguments. | |
Lemma eq (p q r : Prop): (p <-> q) -> ((p -> r) <-> (q -> r)). | |
Proof. | |
move => [pq qp]. | |
split. | |
move => pr q0. | |
apply pr. | |
apply qp. |
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.Monoid (Sum(Sum)) | |
-- i をインクリメントする処理を分離できないか | |
--https://atcoder.jp/contests/abc162/tasks/abc162_d の間違った(TLEする)実装 | |
syouhi0 :: (Monoid m, Eq a) => Int -> (Int -> Int -> Int -> m) -> [a] -> m | |
syouhi0 i f [x,y] = mempty | |
syouhi0 i f (x:xs) = (syouhi1 (i+1) (f i) 0 x xs) `mappend` (syouhi0 (i+1) f xs) | |
syouhi1 :: (Monoid m, Eq a) => Int -> (Int -> Int -> m) -> Int -> a -> [a] -> m |
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 datetime import datetime | |
#print(datetime.now().time().second) | |
kisyo = int(input("起床時刻: ")) | |
# 朝ご飯 | |
print("朝ご飯:",(kisyo+1)%24, "時") |
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
[Unit] | |
Description=Disable devices as wakeup | |
[Service] | |
ExecStart=/usr/local/bin/disable_auto_resume_of_suspend.sh | |
Type=oneshot | |
[Install] | |
WantedBy=multi-user.target |
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
#!/usr/bin/env python2 | |
# -*- coding: utf-8- -*- | |
# URLを受けとってはてなブックマークの情報を返す | |
import urllib2 | |
import argparse | |
import json | |
def bukome(args): |