Skip to content

Instantly share code, notes, and snippets.

View pamoroso's full-sized avatar
💻
Committed to committing

Paolo Amoroso pamoroso

💻
Committed to committing
View GitHub Profile
@chongchonghe
chongchonghe / solar_system.py
Last active February 4, 2024 02:53
Python solar system (a file in this repo https://github.com/chongchonghe/Python-solar-system )
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from astropy.time import Time
from astroquery.jplhorizons import Horizons
sim_start_date = "2018-01-01" # simulating a solar system starting from this date
sim_duration = 2 * 365 # (int) simulation duration in days
m_earth = 5.9722e24 / 1.98847e30 # Mass of Earth relative to mass of the sun
@pakLebah
pakLebah / ansiCRT.pas
Last active May 1, 2024 05:13
ANSI code unit and demo program using Free Pascal.
unit ansiCRT;
(******************************************************************************
This unit is emulating classic Pascal's CRT unit text color management and
cursor movement using ANSI Escape Code sequence. Keyboard input handling &
screen windowing is not possible. For keyboard input, better use the FPC's
Keyboard unit.
ANSI Escape Code list taken from:
https://en.wikipedia.org/wiki/ANSI_escape_code
@natanaeljr
natanaeljr / escape_code.h
Last active October 16, 2022 18:53
Some ANSI Escape Codes for controlling a terminal, (CSI - Control Sequence Introducer), originaly made to work with ESP32
#ifndef _ESCAPE_CODE_H_
#define _ESCAPE_CODE_H_
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#define ESC "\033"
#define ESC_CSI ESC "["