Genera video per la rubrica Guess the Song, di EarthBound Cafรฉ. Lo script funziona su Linux e WSL.
- Installare le dipendenze:
| { | |
| "200": { | |
| "name": "Thunderstorm", | |
| "description": "thunderstorm with light rain", | |
| "icon": "11" | |
| }, | |
| "201": { | |
| "name": "Thunderstorm", | |
| "description": "thunderstorm with rain", | |
| "icon": "11" |
Genera video per la rubrica Guess the Song, di EarthBound Cafรฉ. Lo script funziona su Linux e WSL.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
sudo apt update -y && sudo apt dist-upgrade -y
| from itertools import product | |
| from collections import Counter | |
| def hamming(x: int, y: int): | |
| return (x ^ y).bit_count() | |
| def get_distance(code: list[int], verbose=False): | |
| c = list(dict.fromkeys(code)) # remove repetitions | |
| distances = [hamming(x, y) for x, y in product(c, repeat=2)] # compute distances | |
| counts = sorted(Counter(distances).items()) # count and sort distances |
| [{"char":"๐","name":"grinning face"},{"char":"๐","name":"grinning face with big eyes"},{"char":"๐","name":"grinning face with smiling eyes"},{"char":"๐","name":"beaming face with smiling eyes"},{"char":"๐","name":"grinning squinting face"},{"char":"๐ ","name":"grinning face with sweat"},{"char":"๐คฃ","name":"rolling on the floor laughing"},{"char":"๐","name":"face with tears of joy"},{"char":"๐","name":"slightly smiling face"},{"char":"๐","name":"upside-down face"},{"char":"๐ซ ","name":"melting face"},{"char":"๐","name":"winking face"},{"char":"๐","name":"smiling face with smiling eyes"},{"char":"๐","name":"smiling face with halo"},{"char":"๐ฅฐ","name":"smiling face with hearts"},{"char":"๐","name":"smiling face with heart-eyes"},{"char":"๐คฉ","name":"star-struck"},{"char":"๐","name":"face blowing a kiss"},{"char":"๐","name":"kissing face"},{"char":"โบ๏ธ","name":"smiling face"},{"char":"โบ","name":"smiling face"},{"char":"๐","name":"kissing face with closed eyes"},{"char":"๐","name":"kissing face with smiling eyes"},{"ch |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class Conductor : MonoBehaviour | |
| { | |
| public float bpm = 120; | |
| public float secPerBeat; | |
| public float songPosition; |
| #include <stdio.h> | |
| void main(int argc, char **argv){ | |
| if(argc > 1){ | |
| printf("You are now farming hours.\n\nOriginal command:\n"); | |
| int i; | |
| for(i=1; i < argc; i++) { | |
| printf("%s ", argv[i]); | |
| } |
| <html> | |
| <head> | |
| <style> | |
| .pixel-table { | |
| border: 0; | |
| border-spacing: 0; | |
| } | |
| .pixel-height { | |
| height: 7px; |