This file contains 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 random | |
def chat(speech, speed): | |
slist = list(speech) | |
mouth = bpy.data.objects['Mouth'] | |
face = bpy.data.objects['Face'] | |
f = 1 | |
for x in slist: | |
if (x=="a") or (x=="e") or (x=="i") or (x=="o") or (x=="u") or (x=="y"): |
This file contains 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
Sub Scrape() | |
'Create an array of movie names | |
Dim Movies() | |
Movies = Array("Alien", "Avatar", "Blade-Runner", "Gattaca", "Ghostbusters", "Jurassic-Park", "Looper", "Lost-in-Space", "Sphere", "Signs", "Spider-Man", "Terminator", "V-for-Vendetta") | |
'Loop through each item in the movie array | |
For x = LBound(Movies) To UBound(Movies) | |
ActiveDocument.StoryRanges(wdMainTextStory).Delete |
This file contains 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 year = 0; | |
int y = 0; | |
int spacing = 50; | |
void setup(){ | |
size(500,800); | |
background(0); | |
textSize(25); | |
fill(255,255,255); | |
for (int i = year; i<2018; i=i+25){ |
This file contains 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
void setup() { | |
size(600,600); | |
int step = 2; | |
int imgx = 0; | |
int imgy = 0; | |
int rand = 0; | |
PImage Poltergeist = loadImage("Poltergeist.png"); | |
PImage Img = createImage(width,height,ARGB); | |
Poltergeist.loadPixels(); | |
for (int x = 0; x<width;x++) { |
This file contains 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
void setup() { | |
size(600,600); | |
PImage Garbled = loadImage("Message.png"); | |
PImage Message = createImage(width,height,ARGB); | |
Garbled.loadPixels(); | |
for (int x = 0; x<width;x++) { | |
for (int y = 0; y <height; y++) { | |
int loc = x + y*width; | |
float r = red(Garbled.pixels[loc]); | |
float g = green(Garbled.pixels[loc]); |
This file contains 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 year = 0; | |
int y = 0; | |
int spacing = 50; | |
PImage[] imgs = new PImage[11]; | |
String[] dates= new String[11]; | |
String[] desc = new String [11]; | |
void setup(){ | |
String path = sketchPath(); | |
String[] filenames = listFileNames(path); |
This file contains 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 | |
im = Image.open('C:\\Users\\Desktop\\HexTest.png') | |
pix = im.load() | |
width = im.size[0] | |
height = im.size[1] | |
new_im = Image.new('RGB', (width,height), "white") | |
new_pix = new_im.load() |
This file contains 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 random | |
def confetti(MatCol,r,g,b): | |
bpy.ops.mesh.primitive_plane_add() | |
bpy.ops.transform.resize(value=(.1,.1,.1)) | |
#Resize to fit the scene | |
bpy.data.objects['Plane'].name = MatCol | |
#Rename the planes as the 1st paramater above | |
mat_name = MatCol |
This file contains 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 os | |
def imageLoad(imgpath): | |
z=0 | |
files = os.listdir(imgpath) | |
#Get the names of the files in the provided folder | |
for x in range(len(files)): | |
imagename = files[x][0:20] | |
if files[x].endswith('.jpg'): |
This file contains 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
IntList numbers; | |
void setup () { | |
numbers = new IntList(); | |
String abc = ". abcdefghijklmnopqrstuvwxyz"; | |
String message = "there is a place where the sidewalk ends and before the street begins and there the grass grows soft and white and there the sun burns crimson bright and there the moon bird rests from his flight to cool in the peppermint wind"; | |
int n = 0; | |
for (int i=0; i<message.length();i++) { | |
String letter = str(message.charAt(i)); | |
numbers.append(abc.indexOf(letter)); |
OlderNewer