This tutorial shows how to compile and run RISC-V assembler code on Debian Linux systems, which are not running on a RISC-V system (e.g. x86_64).
sudo apt-get install qemu qemu-system-misc qemu-user gcc-riscv64-unknown-elf
Save this as hello.s:
# Audio loudness calculation and normalization. | |
# The LUFS calculations here are all based on: | |
# ITU documentation: https://www.itu.int/dms_pubrec/itu-r/rec/bs/R-REC-BS.1770-4-201510-I!!PDF-E.pdf | |
# EBU documentation: https://tech.ebu.ch/docs/tech/tech3341.pdf | |
# pyloudnorm by csteinmetz1: https://github.com/csteinmetz1/pyloudnorm | |
# loudness.py by BrechtDeMan: https://github.com/BrechtDeMan/loudness.py | |
# Special thanks to these authors! | |
# I just rewrote some codes to enable short-term and momentary loudness calculations and normalizations for more convinent batch processing of audio files. | |
import numpy as np |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define PLAYERS 5 | |
uint8_t pos[PLAYERS]; | |
int random2to12() { | |
return (rand() % 11) + 2; |
#!/usr/bin/env python3 | |
# | |
# Test script for the uncensored WizardLM model: | |
# https://huggingface.co/TheBloke/WizardLM-7B-uncensored-GGML | |
# | |
# Tested on Mac Mini M1, with 16 GB RAM. Needs some libraries: | |
# | |
# pip install torch transformers accelerate bitsandbytes | |
# CT_METAL=1 pip install ctransformers --no-binary ctransformers | |
# |
This tutorial shows how to compile and run RISC-V assembler code on Debian Linux systems, which are not running on a RISC-V system (e.g. x86_64).
sudo apt-get install qemu qemu-system-misc qemu-user gcc-riscv64-unknown-elf
Save this as hello.s:
# ChatGPT result of this question: | |
# write a Python script, where the user can move a sprite with cursor keys, using PyGame | |
import pygame | |
# Initialize PyGame | |
pygame.init() | |
# Set up the screen (width, height, caption) | |
size = (700, 500) |
(ns test | |
(:require [clojure.string :refer [split-lines]]) | |
(:require [clojure.set :refer [intersection]])) | |
(def rucksacks "vJrwpWtwJgWrhcsFMMfFFhFp | |
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL | |
PmmdzqPrVvPwwTWBwg | |
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn | |
ttgJtRGJQctTZtZT | |
CrZsJsPPZsGzwwsLwLmpwMDw") |
#include <assert.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <execinfo.h> | |
/* | |
compile this program like this: | |
gcc -Wall -O0 -g -fsanitize=address -fno-omit-frame-pointer -finstrument-functions test.c -o test |
# library installation: | |
# pip3 install -U selenium | |
# pip3 install webdriver-manager | |
# | |
# usage: | |
# first start Chrome in debug mode: | |
# google-chrome --remote-debugging-port=1234 | |
# then: | |
# - sign in to MetaMask and select right network and account | |
# - connect to OpenSea |
#include <conio.h> | |
#include <time.h> | |
#include <stdlib.h> | |
extern void waitvsync(); | |
extern unsigned short setvideomode(); | |
extern void restorevideomode(unsigned short old); | |
extern void setcolor(unsigned short farbe); | |
extern void setpixel(unsigned short x,unsigned short y); |