Skip to content

Instantly share code, notes, and snippets.

View TheVoxcraft's full-sized avatar

Jonas TheVoxcraft

  • University i Oslo (USIT)
View GitHub Profile
@epicfilemcnulty
epicfilemcnulty / 2safetensors.py
Created September 13, 2023 20:21
convert pytorch weights to safetensors
import json
import os
import sys
from collections import defaultdict
from tqdm import tqdm
import argparse
import torch
from safetensors.torch import load_file, save_file
boolean trykketRiktig;
long startTid;
int G1=2;
int G2=3;
int G3=4;
int R1=5;
int G4=6;
int G5=7;
int G6=8;
void keyPressed() { //Controls
//println(keyCode);
if (key == CODED) {
if (keyCode == UP) {
direction = "up";
accelerate = true;
} if (keyCode == DOWN) {
direction = "down";
@TheVoxcraft
TheVoxcraft / name_generator.py
Last active August 29, 2015 14:19
Name Generator with interchanging system for vowels and consonants. Review 1
import random
import re
alphabet1 = ("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
alphabet2 = ("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","z")
alphabet3 = ("a","e","i","o","u","y")
length = 7 # Length of word.
c_length = 0
@TheVoxcraft
TheVoxcraft / terrain - v2.py
Last active August 29, 2015 14:10
ASCII Terrain Generation Version 2.0 Advanced. Made by VOX
#Made by VOX, on gist. (TheVoxcraft)
#Still has a few bugs.
#Python 2.7
print("Loading...\n\n")
import random
line1=""
line2=""
line3=""
@TheVoxcraft
TheVoxcraft / guess_it.py
Last active August 29, 2015 14:10
2 Player Guessing Game. The player nearest to random number wins. Local
import random
#To do: Make it multiplayer LAN version!
print("\n"*50)
print("Welcome to guess the it!")
print("")
print("")
player1name=raw_input("Enter your name player 1: ")
@TheVoxcraft
TheVoxcraft / ascii_art_generator.py
Last active August 29, 2015 14:10
Final version of ASCII ART GENERATOR
# by TheVoxcraft, on github now.
print(r"Welcome to TheVoxcraft's ASCII ART GENERATOR!")
word = raw_input("Type in a word: ")
current_letter = ""
current_count = 0
line1 = ""
line2 = ""
line3 = ""
line4 = ""
@TheVoxcraft
TheVoxcraft / main.py
Created December 3, 2014 11:33
The Smart Test! Using DBs. Original by Mikkel
print('Welcome to Smart Test!')
print("Made by VOX.")
print("Adapted from Downy Test created Mikkel helped by VOX.")
print("\n"*3)
print("Loading...")
import time
import os
import random