Skip to content

Instantly share code, notes, and snippets.

@MadcowD
MadcowD / femtogpt.py
Created December 10, 2024 01:16
femtogpt.py
"""Copyright (c) 2024, William Guss"""
import math,random,torch,shutil,sys,time
from torch import nn
from torch.nn import functional as F
from typing import Optional
class AddPositionalEncoding(nn.Module):
def __init__(self,l):super().__init__();self.l=l
def forward(self,x):
u=torch.arange(x.size(1),device=x.device)[:,None]
@ismyrnow
ismyrnow / mac-clear-icon-cache.sh
Created May 5, 2017 19:28
Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
@vitorgalvao
vitorgalvao / Get Title and URL.applescript
Last active December 10, 2024 01:34
AppleScript and JavaScript for Automation to get frontmost tab’s url and title of various browsers.
-- AppleScript --
-- This example is meant as a simple starting point to show how to get the information in the simplest available way.
-- Keep in mind that when asking for a `return` after another, only the first one will be output.
-- This method is as good as its JXA counterpart.
-- Webkit variants include "Safari", "Webkit", "Orion".
-- Specific editions are valid, including "Safari Technology Preview".
-- "Safari" Example:
tell application "Safari" to return name of front document
@AminulBD
AminulBD / amazon-domains.json
Last active December 10, 2024 01:30
Amazon operating domains by country.
{
"us": "https://www.amazon.com",
"uk": "https://www.amazon.co.uk",
"ca": "https://www.amazon.ca",
"de": "https://www.amazon.de",
"es": "https://www.amazon.es",
"fr": "https://www.amazon.fr",
"it": "https://www.amazon.it",
"jp": "https://www.amazon.co.jp",
"in": "https://www.amazon.in",
@jinjier
jinjier / javdb-top250.md
Last active December 10, 2024 01:26
JavDB top 250 movies list. [Updated on 2024/11]
====| ROLES |====
「 👑 」sᴇʀᴠᴇʀ ᴏᴡɴᴇʀ
「 ❗ 」ᴀᴅᴍɪɴɪsᴛʀᴀᴛᴏʀ
「 ❓ 」ᴍᴏᴅᴇʀᴀᴛᴏʀ
「📸」ᴄᴏɴᴛᴇɴᴛ ᴄʀᴇᴀᴛᴏʀ
「🤖」 ʙᴏᴛ ᴀᴅᴍɪɴ
「🤖」 ʙᴏᴛ ᴍᴜsɪᴄ
「🤖」 ʙᴏᴛ ɢᴀᴍᴇ
=================
@disler
disler / README.md
Last active December 10, 2024 01:22
Use Meta Prompting to rapidly generate results in the GenAI Age

Meta Prompting

In the Generative AI Age your ability to generate prompts is your ability to generate results.

Guide

Claude 3.5 Sonnet and o1 series models are recommended for meta prompting.

Replace {{user-input}} with your own input to generate prompts.

Use mp_*.txt as example user-inputs to see how to generate high quality prompts.

@lab313ru
lab313ru / password.bin
Last active December 10, 2024 00:45
USB Password fuse generator for Amlogic A113X (AXG)
password12345678