When you nest values in yaml like
server:
spec:
cpu: 0.5
You use it in helm as {{ .Values.server.spec.cpu | default 0.5 }}
, which works fine till you try the values as not defined
e.g
When you nest values in yaml like
server:
spec:
cpu: 0.5
You use it in helm as {{ .Values.server.spec.cpu | default 0.5 }}
, which works fine till you try the values as not defined
e.g
#!/usr/bin/env bash | |
echo "ingress deployments services statefulset" | \ | |
xargs -n 1 -I ktype \ | |
sh -c 'kubectl get ktype | tail -n+2 | awk '\''{print $1}'\'' | xargs -t -P 2 -I resource sh -c '\''kubectl get ktype resource -o yaml > resource.yml'\''' | |
# echo "ingress deployments services statefulset" | xargs -n 1 -I ktype sh -c | |
# ^^ runs a command for each ingress deployments etc.. the -I parameter is string substitution, i.e where ever it sees ktype it will put the ingress deployments etc read from stdin. | |
# kubectl get ktype | tail -n+2 | awk '{print $1}' | xargs -t -P 2 -I resource sh -c 'kubectl get ktype resource -o yaml > resource.yml' |
(use 'clojure.core.async) | |
;this is the function you want to use | |
(defn lazy-channels [chs] | |
(lazy-seq (cons (let [ [v _] (alts!! chs)] v) (lazy-channels chs)))) | |
;now for the tesging | |
(def chs [ (chan) (chan) (chan) ]) ; the channels can come from anywhere, here we are using three channels for testing |
(ns lcm.core) | |
;; Finding the least common multiplier for a list of numbers | |
;; Reference material | |
;; https://en.wikipedia.org/wiki/Least_common_multiple | |
;; https://en.wikipedia.org/wiki/Euclidean_algorithm | |
;; https://lemire.me/blog/2013/12/26/fastest-way-to-compute-the-greatest-common-divisor/ | |
;; https://octave.sourceforge.io/octave/function/lcm.html | |
(defn bigint-gcd ^long [^long a ^long b] | |
(.longValue (.gcd (BigInteger/valueOf a) (BigInteger/valueOf b)))) |
(comment | |
This is the easiest and most concise way of calling an external process in Java. The inheritIO methods causes the command to output stdout and errout to the same place as your current process (which most of the times is the console), no need to create mechanisms for reading asynchronously from input streams to get at the information. | |
http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html | |
) | |
(def ret (.waitFor (-> (ProcessBuilder. ["gzip" "-t" "g.txt.gz"]) .inheritIO .start))) | |
(ns pseidon.core.ds.ftp | |
(:require [pseidon.core.conf :refer [get-conf get-conf2] ] | |
) | |
(:use clojure.tools.logging | |
)) | |
(import | |
'(org.apache.commons.vfs2 FileContent FileObject FileSystemManager FileSystemOptions VFS Selectors) |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.LongSummaryStatistics; | |
import java.util.Map; | |
import java.util.stream.Collectors; | |
class Averages { | |
public static void main(String[] args) { | |
List<Map<String, Long>> data = List.of( | |
Map.of("age", 18L, "rate", 30L), |
#!/usr/bin/env python3 | |
# pip3 install matplotlib | |
# pip3 install numpy | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import sys | |
file = sys.argv[1] | |
with open(file, 'rb') as io: |
#!/usr/bin/env python3 | |
# pip3 install sounddevice --user | |
# pip3 install numpy | |
# pip3 install scipy | |
import sounddevice as sd | |
import numpy as np | |
fs=44100 | |
duration = 5 # seconds |