This file contains hidden or 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
a: public(int128) | |
b: public(address) | |
@public | |
def execute(_to: address, _data: bytes[4096]): | |
raw_call( | |
_to, | |
_data, | |
gas=msg.gas, | |
outsize=0, |
This file contains hidden or 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
.build/evm-semantics/kevm prove specs/plasma-mvp/getNextExit-spec.k --z3-impl-timeout 500 --verbose | |
Parse command line options = 19 | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/././specs/plasma-mvp/getNextExit-spec.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/specs/plasma-mvp/getNextExit-spec.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/specs/plasma-mvp/abstract-semantics.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/specs/plasma-mvp/verification.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/.build/evm-semantics/.build/java/edsl.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/.build/evm-semantics/.build/java/evm.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/.build/evm-semantics/.build/java/data.k) | |
Importing: Source(/mydir/layerx/verified-plasma-contracts/.build/evm-semantics/.build/java/krypto.k) |
This file contains hidden or 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
# airflow 1.9 required | |
from datetime import datetime | |
from airflow import DAG | |
from airflow.contrib.operators.dataproc_operator import DataProcSparkOperator | |
TASK_ID = 'dataproc_spark_submit' | |
MAIN_JAR = 'gs://your-bucket/path/test-job.jar' | |
JOB_NAME = 'hello' | |
CLUSTER_NAME = 'test-cluster' |
This file contains hidden or 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 UIKit | |
import SnapKit | |
func setScrollView(content: UIView) { | |
// called in ViewController | |
self.edgesForExtendedLayout = [] | |
let scrollView = UIScrollView() | |
let wrapper = UIView() | |
This file contains hidden or 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 Control.Applicative | |
import Control.Monad | |
import Data.List | |
main = do | |
s <- getLine | |
ind <- (map read . words) <$> getLine | |
putStrLn $ solve s ind | |
solve :: String -> [Int] -> String |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
class Anova: | |
@classmethod | |
def two_way(self, stack): | |
""" | |
(対応のない)二元配置分散分析を行う。 | |
Anova.two_way(pd.DataFrame( |
This file contains hidden or 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 pandas as pd | |
import numpy as np | |
class DataFormatter: | |
""" | |
データを読み込んで整形して返すクラスです。 | |
""" | |
__NALimit = 3 | |
@classmethod |
This file contains hidden or 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
ps = [[1,2,3,4],[5,6,7,8],[9,10,11,12]] | |
mapVer = unlines $ map (unwords . map show) ps | |
monadVer = unlines $ map unwords $ ps >>= return . map show | |
listComprehensionVer = unlines $ map unwords [map show x | x <- ps] | |
{- | |
1 2 3 4 | |
5 6 7 8 | |
9 10 11 12 |
This file contains hidden or 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 Gold (search, example) where | |
f :: Double -> Double | |
f x = (x - 1.0) * (x - 1.0) | |
golden_ratio :: Double | |
golden_ratio = ( 1 + sqrt(5) ) / 2 | |
data Interval = Interval {lb :: Double, ub :: Double} deriving Show | |
data PointValue2 = PointValue2 {x1 :: Double, f1 ::Double, x2 :: Double, f2 :: Double} deriving Show |