Skip to content

Instantly share code, notes, and snippets.

View fiskurgit's full-sized avatar
🌑
...

öppenteknikstudio fiskurgit

🌑
...
View GitHub Profile

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 January 7, 2020 09:47
Using Qt in Python via QML (instead of inline code) with the Material Design style
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']
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):
// 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);
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);
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;
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
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
PShape box;
int vertexCount;
float xRotation;
float yRotation;
float zRotation;
ArrayList<PVector> coords = new ArrayList();
boolean mouseRotate = true;
PShape sphere;
int sphereDetail = 8;
int vertexCount;
float xRotation;
float yRotation;
float zRotation;
ArrayList<PVector> coords = new ArrayList();