Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 React, { useState } from 'react'; | |
| import { useModel } from 'umi'; | |
| import { Avatar, Button, Col, Modal, Row, Statistic } from 'antd'; | |
| import Loader from '../../utils/loader'; | |
| import type Paginate from '@/interfaces/Paginate'; | |
| import type { WalletError } from '@/components/WalletConnect/WalletErrors'; |
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 |