Skip to content

Instantly share code, notes, and snippets.

Avatar
🌑
...

öppenteknikstudio fiskurgit

🌑
...
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am fiskurgit on github.
  • I am fiskfamilj (https://keybase.io/fiskfamilj) on keybase.
  • I have a public key ASDKKMTTMqhjfFwDRUfgOuSMFqVDIpvXMeL0XEoYRWuIHgo

To claim this, I am signing this object:

@fiskurgit
fiskurgit / material_qt.py
Last active Jan 7, 2020
Using Qt in Python via QML (instead of inline code) with the Material Design style
View material_qt.py
import sys
from PySide2.QtQml import QQmlApplicationEngine
from PySide2.QtWidgets import QApplication
from PySide2.QtCore import Qt, QCoreApplication
if __name__ == "__main__":
sys_argv = sys.argv
sys_argv += ['--style', 'Material']
View Dither.py
from PIL import Image
from pathlib import Path
import random
def gray_value(r, g, b):
return 0.2989 * r + 0.5870 * g + 0.1140 * b
def filter_2x2_bayer(image_file, threshold):
View nd_lemniscate.pde
// ND Lemniscate rainbow curve in Processing: https://processing.org/
int iterations = 360;
int alphaDelta = 40;
int saturation = 170;
void setup(){
size(800, 600);
noStroke();
colorMode(HSB);
View Hexagrams.pde
import processing.pdf.*;
int VERTEXES = 6;
int columns = 24;
int rows = 24;
final float RADS = TWO_PI/VERTEXES;
PFont font;
PVector h1 = new PVector(0.0, 100.0);
View Sparsno.pde
import processing.pdf.*;
float angleVarianzPIDivider = 3; //PI is divided by this number to define the variance in branching angles
float radius = 170; //randius of the snowflake
float endLength = random(1, 10);
float reduce = random(1.5, 2.5);
float randAngle = 0;
boolean single = true;
boolean record = false;
View Sparsno.kt
import org.openrndr.PresentationMode
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.math.Vector2
import kotlin.math.PI
import kotlin.random.Random
import org.openrndr.draw.Drawer
var angleVarianzPIDivider = 3f
View FiskDialog.kt
import android.app.Activity
import android.app.Dialog
import android.content.DialogInterface
import android.graphics.Color
import android.graphics.Point
import android.graphics.drawable.ColorDrawable
import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.support.design.widget.BottomSheetBehavior
import android.support.design.widget.CoordinatorLayout
View BoxMesh.pde
PShape box;
int vertexCount;
float xRotation;
float yRotation;
float zRotation;
ArrayList<PVector> coords = new ArrayList();
boolean mouseRotate = true;
View SphereMesh.pde
PShape sphere;
int sphereDetail = 8;
int vertexCount;
float xRotation;
float yRotation;
float zRotation;
ArrayList<PVector> coords = new ArrayList();