Skip to content

Instantly share code, notes, and snippets.

View betapictoris's full-sized avatar

betapictoris

View GitHub Profile
@betapictoris
betapictoris / histogram.py
Last active September 7, 2023 20:33
Python Histogram
import matplotlib.pyplot as plt
# If you want to move the data into a CSV file you can use Pandas:
#import pandas as pd
#
#df = pd.read_csv('histogram.csv', sep=',', header=None)
#data = df.values
# Otherwise a Python array works
data = [2.8, 7, 15.1, 3.8, 27.2, 10.3, 12.9, 8.1, 18.9, 9.2, 16.3]
@betapictoris
betapictoris / docker-setup.sh
Created August 25, 2023 21:00
Automated Ripping Machine - Arch Linux Install
#!/usr/bin/env bash
set -eo pipefail
RED='\033[1;31m'
NC='\033[0m' # No Color
FORK=automaticrippingmachine
TAG=latest
function usage() {
echo -e "\nUsage: docker_setup.sh [OPTIONS]"
echo -e " -f <fork>\tSpecify the fork to pull from on DockerHub. \n\t\tDefault is \"$FORK\""
@betapictoris
betapictoris / regression.ipynb
Created May 10, 2023 19:24
Linear regression with Numpy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@betapictoris
betapictoris / config.conf
Created February 25, 2022 16:38 — forked from mokshchaudhary/config.conf
Neofetch Configuration
# See this wiki page for more info:
# https://github.com/dylanaraps/neofetch/wiki/Customizing-Info
print_info() {
#info title
#info underline
info "OS\t\t" distro
info "Host\t" model
#info "Kernel" kernel
info "Uptime\t" uptime
@betapictoris
betapictoris / battery.py
Created January 30, 2022 21:16
Displays battery % (python)
#!/usr/bin/python3
# Battery
# Shows battery status
import psutil
battery = psutil.sensors_battery()
icons = {
'charging': {
'0': '',
@betapictoris
betapictoris / example.c
Created December 21, 2021 22:21
Patched Dino Vision test (from Sweep SDK)
// Make use of the CMake build system or compile manually, e.g. with:
// gcc -std=c99 example.c -lsweep
#include <assert.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include sweep.h
@betapictoris
betapictoris / webserver.js
Created November 18, 2021 05:38
Simple web server written in JavaScript.
// CONFIGURATION
var host = 'localhost';
var port = 8080;
var httpRoot = './http';
// -------------------------------------------------- //
const http = require('http');
const fs = require('fs');
const url = require('url');
import threading
import platform, subprocess, random
crazyMode = True
def ip():
DETACHED_PROCESS = 0x00000008
def myping(host):
parameter = '-n' if platform.system().lower()=='windows' else '-c'
@betapictoris
betapictoris / lib.jl
Created June 21, 2021 20:31
Julia code
function clear()
print("\033[H\033[2J")
end
function add(a, b)
return a + b
end
@betapictoris
betapictoris / rick.1.gif
Last active May 12, 2021 01:52 — forked from ADeltaX/rick.1.gif
give you up.
rick.1.gif