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 re | |
import json | |
import csv | |
JSON_data="C:/Users/JSON FILE PATH.txt" | |
CSV_file="C:/Users/CSV FILE PATH.csv" | |
with open(JSON_data) as f: | |
data = json.load(f) | |
csv_f=open(CSV_file, 'w') |
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 csv | |
CSVfile = 'C:/Users/The CSV to Parse' | |
condCSVpath = 'C:/Users/The New CSV to Save' | |
#the .reader function returns a parsed list of rows | |
#Function counts number of rows | |
def HowManyRows(fp): | |
f = open(fp, encoding='utf8') | |
csv_f = csv.reader(f) |
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
function Multicolor() { | |
var doc = DocumentApp.getActiveDocument(); | |
var body = doc.getBody(); | |
//This Loops Through All Paragraphs | |
for(var i=0; i<body.getNumChildren(); i++) { | |
var par = body.getChild(i); | |
//This Loops Through Paragraph Children |
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
function myFunction() { | |
var doc = DocumentApp.getActiveDocument(); | |
var body = doc.getBody(); | |
var paragraph = body.getChild(0); | |
var txt = paragraph.asParagraph().getChild(0); //This returns the text in the first paragraph. | |
var len = txt.asText().getText().length; //This returns the number of characters in the first paragraph. | |
Logger.log(len); | |
var red = 250; | |
var green = 250; |
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 requests | |
import bs4 | |
import openpyxl | |
#Functions to remove empty spaces and make a dictionary of listing names/URLs | |
def strip(txt): | |
ret="" | |
for l in txt.split("\n"): | |
if l.strip()!='': | |
ret += l + "\n" |
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
bl_info = { | |
"name": "Fireflies", | |
"author": "GifGuide2Code", | |
"version": (1,0,0), | |
"category": "Object", | |
} | |
import bpy | |
import random |
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(); | |
size(400, 317); | |
PImage Original = loadImage("Starry Night.jpg"); | |
PImage Encoded = loadImage("Encoded.png"); | |
Original.loadPixels(); | |
Encoded.loadPixels(); | |
for (int x=0; x<width;x++) { | |
for (int y=0;y<height;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
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)); |
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'): |
NewerOlder