Skip to content

Instantly share code, notes, and snippets.

View XReyRobert's full-sized avatar
😜

XRR XReyRobert

😜
View GitHub Profile
@XReyRobert
XReyRobert / dialog.md
Created October 12, 2024 00:19
Solar System generation Qwen32 quantized 29GB

USER

I want a realistic solar system simulation written in javascript. You will code all in a single Html page. respect the distances, the sizes, and allow zoom in zoom out. It's an heliocentric view seen from above

ASSISTANT

Sure! Below is a simplified but functional example of a solar system simulation in JavaScript embedded within an HTML file. This example uses basic HTML, CSS, and JavaScript to create a heliocentric view seen from above. The sizes and distances are scaled down for visual clarity.

<!DOCTYPE html>
<html lang="en">
<head>
@XReyRobert
XReyRobert / ssacli_to_json.py
Created February 28, 2024 21:56
ssacli_to_json.py
#!/usr/bin/env python3
import sys
import json
def parse_value(value):
try:
# Try converting to integer
return int(value)
except ValueError:
try:
#!/bin/bash
# Check if three arguments are passed to the script
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <REMOTE_HOST> <VOLUME_NAME> <ARCHIVE_PATH>"
exit 1
fi
REMOTE_HOST=$1
VOLUME_NAME=$2
@XReyRobert
XReyRobert / applesoft_basic_chat.bas
Created April 8, 2023 21:28
AppleSoft BASIC Chat-Like Dialog for Apple //e
10 PRINT "HELLO! WHAT IS YOUR NAME?"
20 INPUT N$
30 PRINT "NICE TO MEET YOU, " + N$ + "!"
40 PRINT "HOW ARE YOU DOING TODAY? (GOOD/BAD)"
50 INPUT A$
60 IF A$ = "GOOD" THEN GOTO 80
70 IF A$ = "BAD" THEN GOTO 90
75 PRINT "I DIDN'T UNDERSTAND. PLEASE ANSWER WITH 'GOOD' OR 'BAD'."
76 GOTO 40
80 PRINT "I'M GLAD TO HEAR THAT, " + N$ + "!"
@XReyRobert
XReyRobert / ExampleResource.java
Created April 8, 2023 17:46
Quarkus Hello World Application
package com.example;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class ExampleResource {
@XReyRobert
XReyRobert / cpuset.sh
Last active April 7, 2023 11:36
A shell function to use/extend cpuctl with cpu ranges on macosUsage: cpuset { offline | online } <start_cpu1>-<end_cpu1> [ <start_cpu2>-<end_cpu2>... ]
# A shell function to manage multiple CPUs using cpuctl on macos
# XRR 2023
# Usage: cpuset { offline | online } <start_cpu1>-<end_cpu1> [ <start_cpu2>-<end_cpu2>... ]
cpuset() {
action=$1
shift
if [ "$action" != "offline" ] && [ "$action" != "online" ]; then
echo "Invalid action: $action"
@XReyRobert
XReyRobert / LYWSD03MMC.py
Last active January 18, 2020 11:54
LYWSD03MMC to Vera quick hack
#!/usr/bin/python3
from bluepy import btle
import argparse
import os
import re
import requests
import time
veraip = "192.168.1.39"
@XReyRobert
XReyRobert / kapre_testing_colab_bench_issue61.ipynb
Last active November 26, 2019 13:42
kapre_testing_colab_bench_Issue61.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@XReyRobert
XReyRobert / kapre_testing_colab_bench.ipynb
Last active November 26, 2019 13:19
Kapre_Testing_Colab_Bench.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@XReyRobert
XReyRobert / gist:e2ab1e0838dc080eac23feccabf67c94
Created December 27, 2018 22:23
AppleMonitorII_Condensateurs_Capacitors_ElectrolytiC
C101 22 uF 450 001590532
C102 220 uF 001475974
C104 22 uF 16 001325871
C108 220 uF 50 000422056
C109 10 uF 25 001325870
C110 470 uF 001328832
C113 10 uF 25 001325870
C203 100 UF 25 001301761
C205 220 uF 001475974
C209 1 uF 50 001280690