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
# /// script | |
# dependencies = [ | |
# "torch", | |
# "numpy", | |
# ] | |
# /// | |
import torch | |
import torch.nn as nn | |
import numpy as np |
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
# /// script | |
# dependencies = [ | |
# "torch", | |
# "numpy", | |
# ] | |
# /// | |
import torch | |
import torch.nn as nn | |
import numpy as np |
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
# /// script | |
# dependencies = [ | |
# "torch", | |
# "numpy", | |
# ] | |
# /// | |
import torch | |
import torch.nn as nn | |
import numpy as np |
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
#!/usr/bin/env -S uv run python | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "requests", | |
# "rich", | |
# ] | |
# /// | |
""" |
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 os | |
import modal | |
image = ( | |
modal.Image.debian_slim() | |
.apt_install("git") | |
.run_commands( | |
"pip install --upgrade pip", | |
"pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu126 --upgrade", | |
"git clone --depth 1 https://github.com/KellerJordan/modded-nanogpt /opt/modded-nanogpt", |
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
#include <ctype.h> | |
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct { | |
const char* input; | |
size_t index; |
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 | |
from torch.utils.data import Dataset, DataLoader | |
import numpy as np | |
from typing import List, Dict, Tuple, Optional, Union | |
import random | |
from datetime import datetime, timedelta | |
class PinnerFormerDataset(Dataset): | |
""" |
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 math | |
p = 0.9 # success rate | |
np = 1 - p | |
new_cards = 40 | |
ease = 2.5 | |
max_days = 365 | |
queue = [{"base_days": 5, "factor": 1}] | |
total = 0 |
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
a = "global" | |
try: | |
def showA(): | |
print(a) | |
showA() # prints "global" | |
a = "block" | |
showA() # prints "block" | |
except: | |
... |
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
""" | |
A python program to retreive recrods from ArXiv.org in given | |
categories and specific date range. | |
based off of https://github.com/Mahdisadjadi/arxivscraper | |
""" | |
from __future__ import print_function | |
import xml.etree.ElementTree as ET | |
import datetime | |
import time |