#Replace directories with : with - https://askubuntu.com/questions/227410/replace-all-colons-from-filenames-with-terminal For directories: find . -type d -readable -writable -exec rename 's|:|-|g' {} ; And then files: find . -type f -readable -writable -exec rename 's|:|-|g' {} ; – user8290
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
%useLatestDescriptors | |
%use lets-plot | |
%use krangl | |
val m = mapOf<String,List<Int>>("x" to listOf(1,2,3), "y" to listOf(3,4,3)) | |
val p = letsPlot(m) + theme(axisTitleX="blank") | |
val plot = p + | |
geomBar(color="#579673", stat = Stat.identity) { | |
x = "x" | |
y = "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
resource "kubernetes_namespace" "cattle-system" { | |
metadata { | |
name = "cattle-system" | |
} | |
} | |
resource "kubernetes_secret" "tls-ca-additional" { | |
metadata { | |
name = "tls-ca-additional" | |
namespace = kubernetes_namespace.cattle-system.metadata[0].name |
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
#%% | |
# Made the following example work in python 3 | |
# https://github.com/mellertson/talib-macd-example/blob/master/talib-macd-matplotlib-example.py | |
# | |
# To get it working do the following: | |
# use anaconda 3 https://www.anaconda.com/download/#linux | |
# if using manjaro linux install TA-lib from the package manager otherwise lookup instructions on how to install TA-lib on your system | |
# cd ~/anaconda3/bin; ./pip install pandas_datareader | |
# cd ~/anaconda3/bin; ./pip install TA-Lib | |
# cd ~/anaconda3/bin; ./pip install https://github.com/matplotlib/mpl_finance/archive/master.zip |
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
# Download Anaconda https://www.anaconda.com/download/ | |
# Anaconda is a standalone python environment that doesn't mess with your system python and comes with useful libraries pre-installed | |
# execute anaconda | |
# cd ~/Downloads | |
# bash Anaconda3-5.3.1-Linux-x86_64.sh | |
# rm Anaconda3-5.3.1-Linux-x86_64.sh | |
# download visual studio code and start it up | |
# go to extensions tab (win linux: ctrl+shift+x) | |
# search for and download python extension for vscode | |
# search for and download jupyter extension for vscode |
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
group 'com.example' | |
version '1.0-SNAPSHOT' | |
buildscript { | |
ext.kotlin_version = '1.3.0' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" |
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
data class User(val id: String, val email: String, val title: String) | |
val sortedById = {u : User -> u.id} | |
val sortedByEmail = {u : User -> u.email} | |
val sortOrder = listOf("id", "email") | |
val transformedSortOrderListToComparable = sortOrder.map { | |
when (it) { | |
"id" -> sortedById //Can inline |
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
buildscript { | |
ext.kotlin_version = '1.2.31' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} |
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 org.springframework.jdbc.core.JdbcTemplate; | |
import java.util.List; | |
public class CreateMonsterRepositorySql implements CreateMonsterRepository { | |
private final JdbcTemplate jdbcTemplate; | |
public CreateMonsterRepositorySql(JdbcTemplate jdbcTemplate) { | |
this.jdbcTemplate = jdbcTemplate; |
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
#!/bin/bash | |
# Nice mappings for FL Studio 12 and my M-Audio Axiom air 32 mini | |
# aseqdump -l | |
# aseqdump -p "Axiom A.I.R. Mini32" | |
# sudo apt install xdotool | |
aseqdump -p "Axiom A.I.R. Mini32" | \ | |
while IFS=" ," read src ev1 ev2 ch label1 data1 label2 data2 rest; do | |
#echo "$srsc $ev1 $ev2 $ch $label1 $data1 $label2 $data2 $rest" | |
case "$ev1 $ev2 $data1 $data2" in | |
"Control change 17 127" ) xdotool key space ;; |
NewerOlder