Skip to content

Instantly share code, notes, and snippets.

Parallel Training Methods

Sam Foreman
2024-11-05

📑 Outline

Table of Contents
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple

Migrate from blogdown to quarto

As mentioned on my blog, it is helpful to process blog posts to get maximum benefit out of quarto when migrating from blogdown.

This is the script I used. Feel free to use it, modify it and so on.

(c) 2023 Dan Mackinlay

Released under the terms of the MIT license

@garrett361
garrett361 / launch_torchrun.sh
Last active May 16, 2024 12:41
torchrun Sunspot
#!/bin/bash -l
# Minimal torchrun-based launch script
# See https://docs.alcf.anl.gov/aurora/data-science/frameworks/pytorch for more recommendations.
# Usage:
#
# # qsub -v SCRIPT_PATH=your_script_path] [ARGS=...] [NPROC_PER_NODE=...] launch_torch.sh
#!python
import shutil
import os
import sys
import subprocess
from datetime import date
import re
body {
/* for some reason, this is needed to avoid
* the first checkbox not colouring.... */
}
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="x"],
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="X"],
ul > li.task-list-item[data-task="x"],
ul > li.task-list-item[data-task="X"] {
text-decoration: none;
@sharanry
sharanry / hmc.ipynb
Created June 6, 2018 01:15
Using tensorflow_probability's HMC sampler with pymc4
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@timsutton
timsutton / gist:2c38c1fb90383e8093bec3d90b88929b
Last active May 26, 2021 17:26
Spotify Mac executable modes in 1.0.50 vs. 1.0.49
# In 1.0.50, no user besides the one who installed Spotify will be able to execute it. This means either other users on the system,
# or, if Spotify was deployed using any mass-deployment tool or installer package, and is owned by the root user, Spotify will not
# launch for anyone.
# Dir listing comparisons courtesy of https://github.com/poundbangbash
# 1.0.50
$ ls -l /Volumes/Spotify/Spotify.app/Contents/MacOS/
total 63160
-rwxr--r-- 1 homeadmin staff 30076384 Mar 1 13:36 Spotify
@huytd
huytd / PowerLineBottomURL.css
Last active February 15, 2020 01:31
Mod for Firefox
@namespace html url(http://www.w3.org/1999/xhtml);
@namespace xul url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
/*
Author: Twily
Description: Minimal flat styled tabs for Australis
Compitability: Firefox Nightly v31.0a1 - v32.0a1 (Australis)
CSS Variables were introduced to Firefox in v29.0a1
Website: http://twily.info/
License: CC BY-NC-SA
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active December 4, 2025 01:35
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se