Skip to content

Instantly share code, notes, and snippets.

% LaTeX Curriculum Vitae Template
%
% Copyright (C) 2004-2009 Jason Blevins <[email protected]>
% http://jblevins.org/projects/cv-template/
%
% You may use use this document as a template to create your own CV
% and you may redistribute the source code freely. No attribution is
% required in any resulting documents. I do ask that you please leave
% this notice and the above URL in the source code if you choose to
% redistribute this file.
import bpy
import bmesh
from mathutils import Vector
bl_info = {
'name': 'MoveStuff',
'description': 'Two operators: Move Origin to Lowest Point and Set Location.',
'author': 'Paolo Čerić',
'version': (1, 0),
'blender': (4, 0, 0),
int seed = detail(1, "iteration", 0);
vector rand_axis = set(0, 0, 0);
int rand_int = 0;
vector bbox_size = getbbox_size(0);
seed += int(bbox_size[0]*100) + int(bbox_size[1]*100) + int(bbox_size[2]*100);
if(rand(@class+seed+3113) < 1.5){
if (bbox_size.x > bbox_size.y && bbox_size.x > bbox_size.z) {
rand_axis = set(1, 0, 0);
rand_int = 0;
var rects = [];
function setup() {
createCanvas(800, 800);
noLoop();
var iterations = 6; // the number of times we'll do the split
rects.push([30, 30, width-30*2, width-30*2]); // initial square
for(var i = 0; i < iterations; i++){ // this can be done with recursion, but it's simple enough this way
var l1, l2;
function setup() {
createCanvas(400, 400);
l1 = createGraphics(width, height);
l2 = createGraphics(width, height);
}
function draw() {
var particles = [];
var maxVel = 4;
var drugi;
function setup() {
createCanvas(400, 400);
drugi = createGraphics(400, 400);
drugi.background(222);
@patakk
patakk / code.c
Created September 28, 2021 00:29
// choose initial point indices and radius
int O_ind = 3;
int P_ind = 2;
int Q_ind = 6;
float r = max(chf("r"), 0.05);
// get their positions
vector O = point(0, "P", O_ind);
vector P = point(0, "P", P_ind);
vector Q = point(0, "P", Q_ind);
import numpy as np
import noise
import cv2
WIDTH = 600
HEIGHT = 600
FREQUENCY = 0.001
def generate_noise_map(
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.*;
Robot robot;
void setup() {
size(600, 600);
@patakk
patakk / Oreo ispit
Last active November 27, 2017 13:03
I. STOL
Vlasnik diže psa na stol. Zatim psu prilazi strana osoba, upoznaje se s njim, daje mu kolačić, prelazi rukom po čitavom tijelu psa (grudi, vrat, glava, ramena, leđa, sapi), podiže psu jednu po jednu prednju šapu i na kraju mu pregledava zube. Nakon pregleda strana osoba nagrađuje psa, a vlasnik ga spušta sa stola.
• dok strana osoba pregledava psa, vlasnik stoji kraj stola i drži povodnik opušteno
• vlasnik prije pregleda strane osobe može psu dati naredbu da zauzme određeni položaj ili da se smiri, ali u toku pregleda ne smije verbalno ili fizički utjecati na psa da bude miran i da ostane na stolu
• za vrijeme pregleda na stolu pas može zauzimati bilo koji položaj, a prilikom dizanja na stol i pregleda ne smije grickati, skakati na ljude, otimati se pri nošenju, izbjegavati dodir ili pokazati agresiju u bilo kojem obliku
II. DOĐI
Vlasnik daje psu naredbu da sjedne i čeka i zatim se, cijelo vrijeme leđima okrenut od psa, udaljava 10 m. Okreće se prema psu, pričeka znak suca i onda poziva psa. Pas