Skip to content

Instantly share code, notes, and snippets.

View dvschultz's full-sized avatar

Derrick Schultz (he/him) dvschultz

View GitHub Profile
@dvschultz
dvschultz / gist:2934e7062df72bfd6d1b7fcaa624ac9d
Created April 9, 2024 18:46
There Will Be Blood, but rom com
# Generating 50 sentences of scenes for a romcom based on "There Will Be Blood", tailored for an Academy Award-winning script.
scenes = [
"Opening with a picturesque sunset over the California hills, we see a charming, small oil town bustling with life.",
"Eli, now a charismatic but struggling actor, practices his lines in front of a rickety mirror, his dreams bigger than his apartment.",
"Daniel Plainview, reimagined as a successful but lonely olive oil magnate, surveys his estate, longing for a connection he can't drill for.",
"A chance encounter at the local diner, where Eli spills coffee on Daniel, marking their first, awkward introduction.",
"Daniel and Eli, debating over the best method to extract olive oil, find themselves unexpectedly laughing over an inside joke.",
"A montage of Daniel and Eli working together, turning the struggling olive farm into a burgeoning success.",
"Under the starlit sky, Daniel teaches Eli how to find the 'sweet spot' for planting olive trees, th
@dvschultz
dvschultz / gist:5377a41497b00c38d8173f5f269bcd51
Last active April 1, 2024 05:06
Something-Something V2 labels
0: Approaching something with your camera
1: Attaching something to something
2: Bending something so that it deforms
3: Bending something until it breaks
4: Burying something in something
5: Closing something
6: Covering something with something
7: Digging something out of something
8: Dropping something behind something
9: Dropping something in front of something
@dvschultz
dvschultz / gist:bcb3732ec84ae8c35d318397864b7b2e
Last active January 6, 2022 22:18
Algorithm (Gordon, 1977)
Prior to the release of her now-classic 1983 feature Variety, Bette Gordon made a series of short films in the 1970s, variously influenced by structural filmmaking and feminist theories of cinema. Among them was An Algorithm, a visually hypnotic reworking of three images of a female diver arcing into a swimming pool. Gordon interlaces each of the sequences frame-by-frame, optically printing them in either positive or negative, and calculating the total number of frames according to the following formula:
A (pos.) = 160
B (neg.) = 140
C (pos.) = 120
A (neg.) = 160
B (neg.) = 140
C (neg.) = 120
def slerp(t, v0, v1, DOT_THRESHOLD=0.9995):
'''
Spherical linear interpolation
Args:
t (float/np.ndarray): Float value between 0.0 and 1.0
v0 (np.ndarray): Starting vector
v1 (np.ndarray): Final vector
DOT_THRESHOLD (float): Threshold for considering the two vectors as
colineal. Not recommended to alter this.
Returns:
import numpy as np
import scipy.ndimage as nd
import tensorflow as tf
from PIL import Image
import lucid.modelzoo.vision_models as models
from lucid.misc.io import show
import lucid.optvis.objectives as objectives
import lucid.optvis.param as param
import lucid.optvis.render as render
@dvschultz
dvschultz / instructions.txt
Last active January 22, 2019 23:15
How to make a pull request
//navigate to your repos folder (make one if you don’t have it)
git clone https://github.com/dvschultz/PSD-WAMD-SP19.git
cd PSD-WAMD-SP19
//make changes/add your name to the students.html file
git status
//make sure your changes have been recorded
git commit -am "I added my name"
git push origin master
//if you didn’t get any errors you did it
//if you did get errors try to fix them (edit the file or do the following)
IN;FS6;VS20;SP1;PA2580,6255,PM0;PD2578,6260,2576,6266,2574,6272,2572,6277,2573,6299,2570,6320,2566,6340,2561,6361,2556,6420,2557,6478,2568,6534,2590,6588,2634,6670,2684,6748,2743,6820,2814,6883,2846,6902,2880,6915,2915,6923,2951,6925,2990,6922,3029,6916,3068,6907,3108,6899,3108,6899,3108,6898,3108,6897,3108,6897,3075,6869,3042,6841,3010,6812,2982,6779,2951,6725,2935,6669,2932,6609,2943,6548,2935,6530,2933,6512,2934,6494,2938,6475,2952,6429,2969,6385,2989,6342,3013,6301,3057,6233,3105,6168,3159,6109,3223,6058,3244,6038,3265,6018,3288,6000,3313,5986,3329,5973,3345,5962,3362,5952,3380,5944,3481,5907,3585,5879,3690,5856,3795,5833,3857,5823,3911,5828,3956,5853,3994,5902,4006,5926,4018,5950,4029,5975,4041,5999,4106,6118,4181,6229,4265,6335,4354,6437,4403,6491,4451,6547,4496,6605,4537,6666,4560,6711,4575,6757,4577,6805,4565,6853,4542,6897,4515,6939,4483,6979,4449,7015,4449,7018,4449,7022,4449,7025,4449,7028,4454,7031,4458,7034,4462,7038,4465,7043,4466,7046,4468,7048,4470,7050,4472,7052,4496,7026,4532,7016,4573,7021,
@dvschultz
dvschultz / gist:d27a86d3363effd4edd3
Created October 8, 2014 17:47
PHP implementation for em dash wrapping
/* no-wrap around em dashes */
if (preg_match("/[a-zA-Z0-9\&\#\;]{1,}?\&mdash\;/", $html)) {
$html = preg_replace("/[a-zA-Z0-9\&\#\;]{1,}?\&mdash\;/", '<span style="white-space: nowrap;">$0</span>', $html);
}
@dvschultz
dvschultz / gist:e760cb048357bd859351
Last active August 29, 2015 14:06
story splitter that skips modal and assumes you want split before :)
/*
---------------------------------------------------------------------- --------------------------------------------
StorySplitter
---------------------------------------------------------------------- --------------------------------------------
An InDesign CS/CS2/CS3 JavaScript by FourAces
© The Final Touch 2006
Version 3.0.0
Splits the selected Story to separate Text Frames, while maintaining their contents.
@dvschultz
dvschultz / unused_styles.jsx
Created September 8, 2014 21:18
run checkForUnusedStyles() and it will remove all unused styles in your documents
function checkForUnusedStyles() {
var currDoc = app.activeDocument;
var myParStyles = currDoc.paragraphStyles;
for (i = myParStyles.length-1; i >= 2; i-- ){
removeUnusedStyle('paragraph',myParStyles[i])
}
var myCharStyles = currDoc.characterStyles;
for (i = myCharStyles.length-1; i >= 2; i-- ){
removeUnusedStyle('character',myCharStyles[i])