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
#!/bin/bash | |
# ------------------------------------------------------------------------------------------------- | |
# Author: Thomas Pintaric <[email protected]> | |
# Version: 1.0.0 | |
# SPDX-License-Identifier: 0BSD | |
# ------------------------------------------------------------------------------------------------- | |
# USAGE: ./derive_cardano_wallet_keys.sh [flags] args | |
# flags: | |
# -r,--recovery_phrase: text file containing your wallet's recovery phrase (default: 'recovery-phrase.txt') | |
# -n,--[no]new_mnemonic: generate new 24-word mnemonic (default: false) |
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
#!/usr/bin/env bb | |
(require '[babashka.http-client :as http]) | |
(require '[cheshire.core :as json]) ;; | |
(defn build-headers | |
[auth-token] | |
{"Content-Type" "application/json" | |
"Accept" "application/json" | |
"Authorization" (str "bearer " auth-token)}) |
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
(ns astanova.recursive-splitter | |
"implementation of LangChain's recursive code splitter" | |
(:require [clojure.string :as s])) | |
(defonce java-splitters [#"class " #"public " #"protected " | |
#"private " #"static " #"if" | |
#"for" #"while" #"switch" | |
#"case" #"\r\n" #"\t\t"]) | |
(defonce js-splitters [#"function " #"const " #"let " |
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
(:require [tech.v3.datatype.functional :as func]) | |
(defn cosine-similarity | |
[v1 v2] | |
(/ (func/dot-product v1 v2) | |
(Math/sqrt (* (func/magnitude-squared v1) (func/magnitude-squared v2))))) | |
;; Maybe, we don't really need to divide by magnitudes product. | |
;; it looks like embeddings coming from openai are already normalized. |
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
<!DOCYTPE html> | |
<html> | |
<head> | |
<title>Simple audio recording demo</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
</head> | |
<body> | |
<input type="button" class="btn" value="click and hold to record" /> | |
<script type="text/javascript"> |
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
(ns scottdw.feip.core | |
(:import [java.awt Image] | |
[java.awt.image BufferedImage] | |
[org.imgscalr Scalr] | |
[org.jtransforms.fft DoubleFFT_2D RealFFTUtils_2D]) | |
(:require [mikera.image.core :as img] | |
[mikera.image.colours :as ic] | |
[clojure.core.matrix :as mat])) | |
(defn gen-p-img [] |
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
#!/usr/bin/env bb | |
(require '[babashka.process :refer [shell process exec]]) | |
(require '[clojure.string :as s]) | |
(require '[cheshire.core :as json]) | |
(import 'java.time.format.DateTimeFormatter | |
'java.time.LocalDateTime) | |
(defn search | |
[q offset] | |
(-> |
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
#!/usr/bin/env bb | |
(require '[babashka.curl :as curl]) | |
(require '[clojure.string :as s]) | |
(require '[cheshire.core :as json]) | |
(defn query-variant-drug-links | |
[rsid] | |
(-> | |
(curl/get |
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 matplotlib.pyplot as plt | |
from fbprophet import Prophet | |
from datetime import datetime | |
import psycopg2 | |
from sqlalchemy import create_engine | |
#Read the Parquet file | |
#df = pd.read_parquet('./BTCUSD-dec12-may21-volume-bars.parquet') |
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
(ns astanova.clj-playground | |
(:require [clojure.tools.deps.alpha.repl :refer [add-libs]])) | |
(comment | |
;; alternatevly, we can require add-libs in comment | |
;; (require '[clojure.tools.deps.alpha.repl :refer [add-libs]]) | |
(add-libs '{hiccup/hiccup {:mvn/version "2.0.0-alpha2"}}) | |
(require '[hiccup.core :as hiccup]) |