- Run >
sudo crontab -e - Append >
0 0 */2 * * /home/mamun/bin/install_discord.sh
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
| from typing import Dict, Union | |
| from huggingface_hub import get_safetensors_metadata | |
| import argparse | |
| import sys | |
| # Example: | |
| # python get_gpu_memory.py Qwen/Qwen2.5-7B-Instruct | |
| # Dictionary mapping dtype strings to their byte sizes | |
| bytes_per_dtype: Dict[str, float] = { |
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 torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| # Generate some sample data | |
| torch.manual_seed(0) | |
| X = torch.rand((100, 2)) # 100 samples, 2 features | |
| y = (X[:, 0] + X[:, 1] > 1).float().unsqueeze(1) # Binary target based on a simple rule | |
| # Define a simple neural network |
/etc/ufw/applications.d/plexmediaserver
[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp
[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
A list of useful commands for the ffmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
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
| # aproducer.py | |
| # | |
| # Async Producer-consumer problem. | |
| # Challenge: How to implement the same functionality, but no threads. | |
| import time | |
| from collections import deque | |
| import heapq | |
| class Scheduler: |
Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.
Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.
The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.
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
| // Logiops (Linux driver) configuration for Logitech MX Master 3. | |
| // Includes gestures, smartshift, DPI. | |
| // Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro | |
| // What's working: | |
| // 1. Window snapping using Gesture button (Thumb) | |
| // 2. Forward Back Buttons | |
| // 3. Top button (Ratchet-Free wheel) | |
| // What's not working: | |
| // 1. Thumb scroll (H-scroll) | |
| // 2. Scroll button |
NewerOlder