Skip to content

Instantly share code, notes, and snippets.

View zigapk's full-sized avatar

Žiga Patačko Koderman zigapk

View GitHub Profile
@zigapk
zigapk / README.md
Created August 2, 2024 14:52
A bash script for running lighthouse multiple times using CPU slowdown and printing the average metrices.

Usage instructions

Save the file below as run_lighthouse.sh, then make it executable with

chmod +x run_lighthouse.sh

Use like this:

def get_coordinates(point, new_r):
x = ratio(new_r, np.sin(point[4]) * (r_planet + point[1]))
y = ratio(new_r, np.cos(point[4]) * (r_planet + point[1]))
return x, y
def ratio(new_r, x):
return (x * new_r) / r_planet
def draw_scheme(data, view, new_r=9, size=(15, 15)):
# draw planet and atmosphere
def movement(parametres, t):
x, h, v, b, phi = parametres
dxdt = v * np.cos(b)
dhdt = -v * np.sin(b)
dvdt = sim.g(h) * np.sin(b) - sim.rho(h) * sim.capsule['k'] * v ** 2
dbdt = sim.g(h) * np.cos(b) / v - v * np.cos(b) / sim.planet['r']
if not sim.ignore_buoyancy:
dbdt -= sim.rho(h) * v * sim.capsule['k'] * sim.capsule['l2d']
@zigapk
zigapk / designer.html
Last active August 29, 2015 14:18
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
@zigapk
zigapk / Gimvic-suplenceProject_.gitignore
Created November 8, 2013 21:02
gimvic suplence source
.gradle
/local.properties
/.idea/workspace.xml
.DS_Store