Skip to content

Instantly share code, notes, and snippets.

View mwatts's full-sized avatar

Mark Watts mwatts

View GitHub Profile
"""Use Whisper and llama3 to transcribe and summarize a podcast.
"""
import os
from pathlib import Path
import modal
from modal import Image, App, method
LOCAL_OUT = REMOTE_OUT = "./out/podcast_summarize"
"""Use Whisper and llama3 to transcribe and summarize a podcast.
"""
import os
from pathlib import Path
import modal
from modal import Image, App, method
LOCAL_OUT = REMOTE_OUT = "./out/podcast_summarize"
@mwatts
mwatts / JDatalog.java
Created September 2, 2022 10:58 — forked from wernsey/JDatalog.java
Java Datalog Engine and Interpreter
/*
Java Datalog Engine with Stratified Negation
Copyright 2016 Werner Stoop
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@mwatts
mwatts / mosh-macos.md
Created February 13, 2022 01:36 — forked from chrisdiana/mosh-macos.md
Getting mosh server running on macOS Catalina

Running into this error message when trying to run a mosh server on macOS Catalina? The steps below should solve the problem which is most likely either a $PATH and/or firewall issues.

command not found: mosh-server
Connection to X.X.X.X closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

1. Install Mosh

@mwatts
mwatts / README.md
Created July 1, 2021 00:15 — forked from mrkpatchaa/README.md
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for ' |.*' and replace by empty.

use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
use std::rc::Rc;
/*
Types
*/
@mwatts
mwatts / gist:c10c36db58d2d440d0174fd5d611aafc
Created May 30, 2020 20:12 — forked from benoitsan/gist:6278485
Export to Devonthink from Prizmo
-- Export to Devonthink without extra OCR within Devonthink (Script written by Benjamin Zeiss)
on run argv
if (count of argv) is greater than 0 then
repeat with theItem in argv
tell application id "com.devon-technologies.thinkpro2" to launch
try
set thePath to theItem as text
tell application id "com.devon-technologies.thinkpro2"
set theRecord to import thePath to incoming group
end tell
@mwatts
mwatts / readme.md
Created March 15, 2020 01:54 — forked from Aaronontheweb/readme.md
Building Your First Whiskey Collection

Building Your First Whiskey Collection

I got really into Scotch when I turned 30 years old and took a father-son trip through England and Scotland. Since then it's been one of my favorite hobbies and I've built a great collection over the past few years that I enjoy sharing with my friends and family.

A lot of the people in my circle have expressed interest in learning whiskey and how to build their own collection - so I put this together as a short guide to help explain how to build a tasty, diverse, and affordable "Starter Whiskey Collection." Enjoy!

A Beginner's Palette

Tasting whiskey or any hard liquor can be a challenge at first, because the alcohol flavor overwhelms the sugars, esters, and other residues from the fermentation and aging process. We want to be able to taste the stuff in the latter category without being perturbed by the former.

This guide is designed to help steer readers towards whiskeys that are easy to drink: ones with a naturally sweet or slightly berry flavor. As you start

@mwatts
mwatts / learn.md
Created November 9, 2019 16:34 — forked from rylev/learn.md
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@mwatts
mwatts / rust-in-large-organizations-notes.md
Last active May 26, 2020 14:30 — forked from rylev/rust-in-large-organizations-notes.md
Rust in Large Organizations Notes

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support