Skip to content

Instantly share code, notes, and snippets.

View nodakai's full-sized avatar

NODA Kai nodakai

View GitHub Profile
f0HyahfZhN83rQ34uH3XjVg1m/bR11XWK73mCweJ2x4=
open System
let f(os: Option<string>) =
match os with Some(s) -> s.AsSpan()
| None -> raise(Exception())
ReadOnlySpan.Empty
let g(os: Option<string>) =
let s = match os with Some(s) -> s
open System
let spanOfOptString(os: Option<string>) =
match os with Some(s) -> s.AsSpan()
| None -> raise(Exception())
ReadOnlySpan.Empty
module Logger =
open System
open System.IO
open System.Text
type LogLevel = TRACE | DEBUG | INFO
type Logger0(writer: TextWriter) =
member x.Log (fmt: PrintfFormat<'Printer, _, _, _>): 'Printer =
Printf.fprintfn writer fmt
#!/bin/bash
set -eu
set -x
docker build -t deno-cent7 .
$ { git co phantom-type-in-projectbuilder && git co HEAD^ } &> /dev/null&& for k in {1..5}; do time cargo test --no-run &> /dev/null && git co phantom-type-in-projectbuilder > /dev/null&& time cargo test --no-run &> /dev/null && git co HEAD^ > /dev/null; done
cargo test --no-run &> /dev/null 297.70s user 28.12s system 415% cpu 1:18.37 total
Previous HEAD position was 47783c15... Auto merge of #4305 - nodakai:fix-4278-tests-on-empty-ld_library_path, r=matklad
Switched to branch 'phantom-type-in-projectbuilder'
cargo test --no-run &> /dev/null 294.68s user 19.88s system 467% cpu 1:07.23 total
Note: checking out 'HEAD^'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
// src/test/scala/LibrarySuite.scala
import org.scalatest.FunSuite
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
@RunWith(classOf[JUnitRunner])
class LibrarySuite extends FunSuite {
test("test01 is always true") {
assert(sqpt.qqj.QFAdaptor.test01)
@nodakai
nodakai / stdout_wrapper.py
Created November 1, 2016 10:21
Wrap stdout to add timestamps
n = datetime.datetime.now
class Wrapper(object):
def __init__(self, out, severity):
self.out = out
self.severity = severity
self.remaining = None
self.remaining_ts = None
def _write(self, t, line):
library(ggplot2)
dat_10621_10001 <- read.table(file="bw-10621-10001.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10622_10002 <- read.table(file="bw-10622-10002.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10623_10003 <- read.table(file="bw-10623-10003.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10624_10004 <- read.table(file="bw-10624-10004.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_10822_2 <- read.table(file="bw-10822-2.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_17033_33 <- read.table(file="bw-17033-33.csv", colClasses=c(NA, NA, rep("NULL",2)), col.names=c("Time", "Bandwidth", NA, NA), header=FALSE, sep=",")
dat_17043_43 <- read.table(file="bw-17043-43.csv", colClasses=c(NA
#!/bin/sh
rpm -q --qf "$(rpm --querytags | while read line; do echo "$line: %{$line}"; done)" -p $1