Skip to content

Instantly share code, notes, and snippets.

@padeoe
padeoe / README_hfd.md
Last active April 25, 2024 01:50
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active April 25, 2024 01:50
Remove obsolete GPG key from DNF (Fedora)
@umputun
umputun / safari-summary.sh
Last active April 25, 2024 01:49
Raycast script for Safari's page summary
#!/bin/sh
# @raycast.schemaVersion 1
# @raycast.title Summarize Safari page
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon ✨
#
# @raycast.packageName Things
@Pulimet
Pulimet / AdbCommands
Last active April 25, 2024 01:46
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@wakagomo
wakagomo / TransparentWindow.cs
Created February 8, 2019 13:19
Transparent Window for Unity
///
/// Copyright (c) 2019 wakagomo
///
/// This source code is released under the MIT License.
/// http://opensource.org/licenses/mit-license.php
///
using UnityEngine;
using System;
@arshednabeel
arshednabeel / animate_flock.py
Created April 24, 2024 08:35
Animate collective movement of flocks from trajectories.
'''
A simple animation function to animate collective movement of flocks, given trajectory data.
(c) Arshed Nabeel, 2024
'''
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation
@arshednabeel
arshednabeel / vicsek.py
Last active April 25, 2024 01:44
A minimal implementation of the Vicsek model in ~50 lines of code
import numpy as np
from tqdm import trange
def get_neighbour_matrix(x, L, R):
dx = np.subtract.outer(x[:, 0], x[:, 0])
dy = np.subtract.outer(x[:, 1], x[:, 1])
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2
pair_dist = dx ** 2 + dy ** 2
Section "Monitor"
Identifier "Monitor0"
HorizSync 28.0-80.0
VertRefresh 48.0-75.0
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
# Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
# 1280x720 @ 60.00 Hz (GTF) hsync: 44.76 kHz; pclk: 74.48 MHz
# Modeline "1280x720_60.00" 74.48 1280 1336 1472 1664 720 721 724 746 -HSync +Vsync
# 1368x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 85.86 MHz
# Modeline "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
@SavageCore
SavageCore / 1-readme.md
Last active April 25, 2024 01:42 — forked from cdleveille/Install⁄Update Xone
Install or update xone driver for Steam Deck (desktop shortcut and bash script)

Enjoying this script? Consider buying me a beer/coffee!

ko-fi

First time setting up your Deck? You may enjoy my setup guide. It'll get you started on Emulation.

Improvements

Main changes at initial release versus cdleveille's original script:

  • Added zenity for a basic "GUI"
@gjrdiesel
gjrdiesel / README.md
Last active April 25, 2024 01:42
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part