This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import struct | |
import os | |
import re | |
def gb2312_offset(char, size): | |
gb = char.encode('gb2312') | |
area = gb[0] - 0xA1 | |
index = gb[1] - 0xA1 | |
bytes_per_char = size * size // 8 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var l1, l2; | |
function setup() { | |
createCanvas(400, 400); | |
l1 = createGraphics(width, height); | |
l2 = createGraphics(width, height); | |
} | |
function draw() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var particles = []; | |
var maxVel = 4; | |
var drugi; | |
function setup() { | |
createCanvas(400, 400); | |
drugi = createGraphics(400, 400); | |
drugi.background(222); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import noise | |
import cv2 | |
WIDTH = 600 | |
HEIGHT = 600 | |
FREQUENCY = 0.001 | |
def generate_noise_map( |
NewerOlder