Skip to content

Instantly share code, notes, and snippets.

View adrianrocamora's full-sized avatar
🔬
Gentleman Scientist

Adrian Rocamora adrianrocamora

🔬
Gentleman Scientist
View GitHub Profile
#include <BleGamepad.h>
BleGamepad bleGamepad;
int btn_last = 0;
int btn_pin = 4;
int poti_pin = 34;
int con = 0;
void setup()
{
@ggerganov
ggerganov / iss-docking.js
Created May 16, 2020 12:30
Automatic ISS Docking in Javascript
// Auto-pilot for docking with the International Space Station
//
// The program uses Artificial Intelligence and Decision Trees (i.e. basic kinematics and a bunch of if statements)
// to perform docking with the ISS from any starting position.
//
// To use it:
// - open the SpaceX simulation website: https://iss-sim.spacex.com/
// - open the Developer's console and paste the contents of this file
//
// Demo: https://youtu.be/jWQQH2_UGLw
import matplotlib.pyplot as plt
from PyQt5 import QtCore
import numpy as np
import time
import math
class VisualiseFrequency(QtCore.QThread):
def __init__(self, song, canvas, player):
@morrismukiri
morrismukiri / superset-admin-password-reset.sh
Created January 17, 2019 17:11
Apache Superset reset admin password
# activate the virtualenv
source /home/superset/.virtualenvs/superset/bin/activate
fabmanager reset-password --app superset --username admin --password enteryournewpassword
@LoganGray
LoganGray / chromeinstall_ubu16.sh
Last active June 6, 2023 14:35
this worked to install selenium and google chrome on my Ubuntu 16 server.
#!/usr/bin/env bash
# used to install offical chrome and selenium on Ubuntu 16.04.1 LTS, 18.04, 20.04.1 LTS desktop, Jan 2021
# also tested and works on Elem OS 5.1 :)
#
# make sure script is run as root or sudo
if [[ $(whoami) != "root" ]] ; then
echo ; echo "This script, $0, SHOULD be run as ROOT. " ; echo
exit 1
fi
#
@eliashussary
eliashussary / metabase-postgres.docker-compose.yml
Created December 11, 2018 16:45
A docker-compose file for metabase with postgres.
version: "3"
services:
postgres-db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
@StephenSorriaux
StephenSorriaux / install-kubernetes-archlinux.md
Created October 25, 2018 18:47
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@gatopeich
gatopeich / install_Jupyter.sh
Last active March 29, 2024 22:10
Install Jupyter iPython Notebook on Android via Termux
pkg upgrade
# Install runtime deps
pkg install python libzmq libcrypt
# Add build deps
pkg install python-dev libzmq-dev libcrypt-dev clang
pip3 install -U pip
pip3 install pyzmq --install-option="--zmq=/usr/lib"
pip3 install jupyter
@ElToro1966
ElToro1966 / r_ubuntu_18_04.sh
Last active October 1, 2023 18:29 — forked from pachadotdev/r_ubuntu_17_10.sh
Install R and RStudio on Ubuntu 18.04 with essential libraries for data science. Based on pachamaltese/r_ubuntu_17_10.sh (for Ubuntu 17.10). Note: You need to make sure the default library location - /usr/local/lib/R/site-packages - is writable .
# Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev
# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5001-amd64.deb
sudo gdebi rstudio-1.2.5001-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile
@myleshk
myleshk / Setup edX notes steps.md
Last active March 25, 2019 02:54
edx notes api setup
  1. Goto https://<your-lms-url>/admin. On the admin page, go to "Oath2" and click "Add" by "Clients". Fill out the following fields.
Item Value
User <leave blank>
Name edx-notes
Url https://<your-notesserver-url>
Redirect uri https://<your-notesserver-url>/complete/edx-oidc/
Client id <generated>
Client secret <generated>