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
apiVersion: traefik.containo.us/v1alpha1 | |
kind: IngressRoute | |
metadata: | |
name: vald-ing | |
spec: | |
routes: | |
- kind: Rule | |
match: Host(`localhost`) && Headers(`Content-Type`, `application/grpc`) | |
priority: 10 | |
services: |
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
;; https://github.com/vdaas/vald-client-python | |
(import grpc) | |
(import [vald.v1.vald [insert_pb2_grpc | |
search_pb2_grpc | |
update_pb2_grpc | |
remove_pb2_grpc]]) | |
(import [vald.v1.payload [payload_pb2]]) | |
(setv channel (grpc.insecure-channel "localhost:8080")) |
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 bash | |
cmd=$1 | |
chart=$2 | |
env=$3 | |
dir=${chart}-kustomize | |
chart=${chart/.\//} | |
build() { |
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
package main | |
import ( | |
"archive/tar" | |
"bytes" | |
"compress/gzip" | |
"fmt" | |
"io" | |
"os" | |
"path/filepath" |
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
(ns polydact.core | |
(:import (clojure.lang IFn) | |
(org.graalvm.polyglot Context Value) | |
(org.graalvm.polyglot.proxy ProxyArray ProxyExecutable ProxyObject))) | |
(set! *warn-on-reflection* true) | |
(comment | |
(do | |
(def context |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.15686275064945221</real> |
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
extern crate rand; | |
use std::f64; | |
use rand::Rng; | |
struct MCInput { | |
np: u64, | |
tau: f64, | |
sal: f64, | |
omg: f64, |
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.Vector.Unboxed as VU | |
-- linear algebra | |
-- add | |
(<+>) :: Vector Double -> Vector Double -> Vector Double | |
(<+>) x y = VU.zipWith (+) x y | |
-- sub | |
(<->) :: Vector Double -> Vector Double -> Vector Double | |
(<->) x y = VU.zipWith (-) x 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
import System.Random.Mersenne | |
import Control.Parallel.Strategies hiding (parMap) | |
nt = 4 -- number of thread | |
np = 1000000 -- number of photon | |
tau = 1.0 -- cloud optical thickness | |
sal = 0.5 -- surface albedo | |
omg = 1.0 -- single scattering albedo |
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 System.Random.Mersenne | |
np = 1000000 | |
tau = 1.0 -- cloud optical thickness | |
sal = 0.5 -- surface albedo | |
omg = 1.0 -- single scattering albedo | |
zu = tau -- atmosphere upper boundary | |
zb = 0.0 -- atmosphere lower boundary |
NewerOlder