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
| @book {Arbib-Manes:75, | |
| AUTHOR = "Arbib, M. and Manes, L.", | |
| TITLE = "Arrows, Structures and Functors: | |
| The Categorical Imperative", | |
| NOTE = "Home library", | |
| PUBLISHER = "Academic Press", | |
| YEAR = 1975} | |
| @incollection{Backus-etal:90, | |
| AUTHOR = "J.W. Backus and J. Williams and E.W. Wimmers", | |
| TITLE = "An Introduction to the programming Language {FL}", |
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/zsh | |
| PID_FILE="$HOME/.boundary_session_ttcp_BRTTDbGBAK" | |
| connect() { | |
| echo "Inititating a boundary session to k8s..." | |
| TMP_FILE=$(mktemp) | |
| nohup -- boundary connect -target-id ttcp_BRTTDbGBAK -format json &> $TMP_FILE & | |
| CONNECT_PID=$! |
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 soundfile as sf | |
| import torch | |
| from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor | |
| from torch.utils.mobile_optimizer import optimize_for_mobile | |
| model_name_or_path = "m3hrdadfi/wav2vec2-large-xlsr-persian-v2" | |
| # tokenizer = Wav2Vec2Tokenizer.from_pretrained(model_name_or_path) | |
| processor = Wav2Vec2Processor.from_pretrained(model_name_or_path) | |
| model = Wav2Vec2ForCTC.from_pretrained(model_name_or_path) |
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
| let | |
| nixpkgs-src = builtins.fetchTarball { | |
| # master of 2021-01-05. | |
| url = "https://github.com/NixOS/nixpkgs/archive/1a57d96edd156958b12782e8c8b6a374142a7248.tar.gz"; | |
| sha256 = "1qdh457apmw2yxbpi1biwl5x5ygaw158ppff4al8rx7gncgl10rd"; | |
| }; | |
| pkgs = import nixpkgs-src { | |
| config = { | |
| # allowUnfree may be necessary for some packages, but in general you should not need it. |
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
| // Requirements: a NSLocationWhenInUseUsageDescription entry in Info.plist | |
| // Usage: @State var locator = CLLocationManager.publishLocation() | |
| // and | |
| // .onReceive(locator) { location in | |
| // Improvements needed: Move requestWhenInUseAuthorization into its own publisher and perhaps have a combineLatest pipeline for both authorized and valid location. | |
| // A configuration param to init(), e.g. so each manager can have the same distanceFilter. | |
| import Foundation | |
| import Combine | |
| import CoreLocation |
See stackoverflow and https://ipython.readthedocs.io/en/stable/install/kernel_install.html
In your project folder:
pipenv install ipykernel
pipenv shellThis will bring up a terminal in your virtualenv like this:
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
| """ | |
| Author: Awni Hannun | |
| This is an example CTC decoder written in Python. The code is | |
| intended to be a simple example and is not designed to be | |
| especially efficient. | |
| The algorithm is a prefix beam search for a model trained | |
| with the CTC loss function. |
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
| (* | |
| Interactive approach | |
| -------------------- | |
| You can copy-paste code into `utop`, provided you load the lwt.unix | |
| package: | |
| #use "topfind";; | |
| #thread;; (* only needed in the plain `ocaml` toplevel, not in `utop`. *) | |
| #require "lwt.unix";; |
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
| // Playground - noun: a place where people can play | |
| // I wouldn't want a pair of birds that were... too demonstrative. | |
| func idiot<A>(a : A) -> A { | |
| return a | |
| } | |
| func kestrel<A, B>(a : A) -> B -> A { | |
| return { _ in a } |
NewerOlder