Coding Train Late Night 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Music] [Music] [Music] [Music] [Music] [Applause] [Music] [Music] oh hello and good evening good night how are you oh my voice is so scratchy what's going on good thing I have a nice cup of herbal ginger tea here I don't know how the lighting is going here if you can see me this is an experiment welcome to the coding train late night show curmudgeonly alright well here I am embarking on a new experiment like just resetting the coding train these days first I was like I got a new studio I'm working at at NYU then I've got a new studio it's not really a studio it's a room in my home where I'm trying to livestream and then I kind of fell off the map there and now I'm back because I would really like to give you some very important information today I am announcing breaking coding trade dude trying to stream at night and see what happens my kids are well they're probably not asleep are you all asleep go to bed probably it actually might be waking up I'm seeing all these nice messages in the chat which is why whenever I look over here I'm looking at the chat so um here's the deal um I'm gonna try a new experiment which I'm going to stream I'm gonna have a coding train late night show which is what you're watching right now I may in fact next week have a coded train warnings show because I was thinking about all the the people who for whom it is 4 a.m. or 5 a.m. or 3 a.m. or 6 a.m. this oddly might be a more convenient time for many of you I might have some first-time viewers here which oh my goodness if I have some first time boy am i sorry because I am not at all prepared basically I just got it together to turn all of the equipment on and be here talking to you and I do have some ginger tea but you know as those of you who are boy that slurping sound might be kind of annoying maybe I should mute my microphone whenever I do that those of you who have watched the coding train before no I like to get started with a reading from the coding train book well it's not the coding train book but it's one of my favorite books a million random duh digits it'd be nice if I could talk I was having so much regret about 9:15 p.m. tonight I was like oh I could just be like getting into my pajamas these bright lights on and microphone this and that hmm I'm the pleased to hear I just saw in the chat that it's 8:30 a.m. in India which is thrilling to me because I typically most of my livestream times I think actually have been in the middle of the night in in India and that part other other countries and areas in the world there at that same time zone I think Europe is really getting kind of the short end of the stick here alright so let's go and let's all just get settled in get get cozy if you're that night with your cup of tea and under the covers and have your like mobile device pressed against your eyes turn it off the light is bad for you go meditate breathe listen to some music actually let's see if I can manage to play this without getting a copyright strike well I don't get a copyright strike but a copyright claim or whatever it is that YouTube does when you play music but I have these wonderful Gold Goldberg Variations that I am going to play here it might be kind of loud let's turn the volume down a little bit with music judge amigos asking how do I skip a live stream to the next subject here's my suggestion to you right now become I probably don't come back tomorrow and watch it but at least if you come back tomorrow and watch it I will hopefully have some time codes in the description you could skip ahead to if I even get around to doing anything seventy-three thousand one hundred and ninety one thirty four thousand six hundred and seventy-six sixty-nine thousand two hundred and four ninety six thousand one hundred and seventy six by the way the new late-night coding train show is brought to you by the members of the coding train and if you would like to join with a membership today these lights behind me will blink we'll see we'll see if that works twelve thousand three hundred and eighty eight forty seven thousand eight hundred and seventy Oh nope that's the wrong number oh boy forty-seven thousand eight hundred and ninety four did you notice that i got like i like i took a shower i like cone my hair i even attempted to do some beard trimming grooming ooh that sort of thing didn't go very well ninety six thousand one hundred and thirty nine fifty four thousand and sixty nine sixty one thousand and sixty six ninety nine thousand three hundred and nineteen okay deep breath let us transition know what we try this again oh there we go why did this button not work weird my stream deck is broken but it's fine this works this works this works alright okay now moving along here at precisely midnight I will turn into a pumpkin I know I know I know I know I know not actually a pumpkin I gonna have to work on this a lot more what so instead of having marathon long live streams I'm hoping to work on a variety of projects piece by piece over a period of time so it's my intention to livestream I'm I've got a Monday through Thursday show going on here Monday Tuesday Wednesday Thursday 11:00 p.m. yesterday was a holiday here in the United States and I couldn't get myself together to stream so today is the first one I'll be back tomorrow at experience day at this time then I will be taking the weekend off to do other things and I'll be back the next week possibly with the coding train morning show where I will have a caffeinated beverage I do not have a caffeinated beverage I have a nice delicious warm cup of ginger tea now something I have to manage to do my live stream now with this news coding trade late-night theme it's not waste so much time because I'm only gonna here be here till midnight I've got to get started so the way that I'm going to get started and I'm gonna take things slow this is gonna be a slow easy going brother really it's sadly it's gonna be a horrible thing when tomorrow I'm like sorry the coding train late next show was canceled good it could really easily get cancelled there's so many ways it could get canceled but I'm gonna really try to see if I could keep this going you know basically like my days are filled with tea homeschooling my wonderful beautiful children that I spent every waking living look one hour of late night time which is quite peaceful to myself to be with you the people of the internet not wasting time talking and rambling and trying to log into various accounts no no I'm gonna get started with doing some stuff but I am gonna take things slow and the very first thing I'm going to do is I'm just gonna open up this wonderful little web browser here and go over to here and we'll now move on to variation number two up beat all the balances can you hear me over the music well yeah this is too upbeat okay it's fine this is gonna get me moving so now [Music] I want to make a new repository where's my new repository button it left there's usually is it because oh is it over here ah no shrink well look the lights are blinking because cringy seven year old so first of all cringy seven year old if that's really your real name and I would say you are not cringy I don't know if you're seven your name says you're seven if you're seven go to bed my goodness it's way past your bedtime and I will read you a random number to thank you boys I'm not gonna get through very much stuff here your random number for today is no I by the way I didn't prepare for this by looking at code examples or signing it to any accounts or getting anything set up on this computer no I spent my brief amount of time preparing looking for music tracks and sound effects and that sort of thing no no wrong wrong one Thank You cringy seven-year-old while it really is time for you to go to bed and I hope that you get a good night's sleep your body needs it and you're taking care of yourself before you're watching YouTube live streams about coding I thank you for your super chat which is a really ridiculous thing if you think about it why are you paying me money I don't really deserve that money I mean it's helpful I guess I mean I appreciate it oh but I'm gonna pick a random number for you everybody forty-five thousand five hundred for that cringey seven-year-old is your random member alright this is the music I need for creating my new github repo we're gonna make this encoding train late night late at night oh you can barely see it I'm gonna I'm gonna oh lucky llama lucky llama I I don't know if I can I can do this can I take a break every time no no the wrong button lucky llama what does it mean to be a llama and especially in 2020 I mean we're all hopefully staying safe and quarantined at home but are the llamas at home I heard something about llamas and antibodies and I'm not my area of expertise I shouldn't be talking about it I should just be thanking lucky llama for the super chat which now it seems that if I'm gonna do this thing for the super chance I hope this is discouraging people from giving me super chance cuz it's really really not a thing you should be doing definitely not a thing but your random number oh god oh god Pedro stop stop everybody Oh night shift or true tone is on thank you David kick I will fix that that is such useful information thirty two thousand nine hundred fifty eight is for you lucky llama and I think it was Pedro I believe it was Pedro was the name my joke Joe Paris Oh Joe Paris stop it everybody it's very kind your message is very sweet it's yellow I wish the lights would blink yellow but you all get a random number I hope you can see this but on this page is the R and number eight eight eight eight eight 88888 is for you lucky llama seven thousand seven or fifty two is for you Pedro and Joe Paris Joe Bali Mona me oh boy if only I could read the number in French that would have been so good Vale's eise got dolls sorry everybody I apologize to anyone who speaks French for that terrible messed up number that probably didn't make any sense and also in a terrible French accent okay so I have this really loud the music in my ear I hope the volume is fine for you these are the projects I want to do I want to create oh and I mean okay first well alright System Preferences let me see if I can turn off this what Oh hold on a second let me try to turn off this true tone nonsense which is really driving me crazy that I believe is in displays I am looking at my system preferences right now how it's taken me a very long time if I'd displays and color where is that silly true tone in color I thought it was under color ooh USB capture built-in retina ah true tone off hopefully this fixes it yeah yeah that fixed it alright okay true tone is off I believe that's correct I would like this to be a little bit bigger and so I want to do excuse me just have some more ginger tea I am going to do a countdown I'm going to do a heart firework and a midnight pumpkin alarm so when I say overly is over time not that I could speak during the day when I say overlays one of the things I've always wanted to have is things that pop up and appear in real time that are software-based in the live stream and this is something I can do because I'm using open broadcast studio and I can have a web page being elements and open across caps open broadcast studio that's over top of me and I can send signals to it by all sorts of networking fancy things so eventually I'm gonna get this hooked up as a discord bot and we can create fireworks I mean if you want to see what I'm to us so that's one for the things I want to work on I want to do lots of weird AI stuff this is by the way my summer plan I'm just forget about it like all of that stuff where I was making tutorials that made sense that were sequenced that you could follow in a curriculum like you were a student at a university who had to suddenly go home and you couldn't be in class anymore and you had to do all of your learning over the internet I'm done with that I thought a lot of that I'm just gonna be here every night at 11:00 p.m. keeping my children awake because I talk really loud although where they're sleeping is is quite far away I mean it's in the same home here in Brooklyn where I live I'm really excited by the way if it rains one of these nights if it rained I think the rain will be very loud where I am deep breath okay I believe that I got a new member I'm being told by my breaking news there is a new member of the coding train and that new member is arrest a Marcelino and I will say two rest day Marcelino you have one with your membership a random number from page 31 33 1798 and someday I will send you in the mail some stickers it will take me a long time to send them to you but I will send them to you eventually I hope I mean definitely please ask me about the stickers I got to get those out okay hmm so I want to do weird AI stuff so I want to train a GPT to model on all of my YouTube transcripts I want to train a style gain model on I don't know all of my YouTube thumbnails I could probably come up with a better idea there maybe I so those are some things I want to do I want to do some discord bot stuff which is related I want to do some a hue lights stuff I also want to do some vinyl cutting and plotter stuff you'll see that's coming Oh Pedro Pedro what are you doing to me here Pedro with your coding trade membership on the passenger's level you have won a the ability to like unlock some channels in our discord well my discord button work the discord is free and open to everybody there are way too many people watching this right now that's insane throw the fact that I'm basically doing nothing just sitting here and talking and feeling incredibly awkward and like uncomfortable I made these lights that are on me way too bright I just curiosity and maybe in the discord a live chat I might be helpful to hear do I look okay like I feel ridiculous that I'm wearing this tie but you know basically I live in my jogging shorts and t-shirts and I just feel like I don't know it's 10:30 at night why don't I take a shower and get rest up I am wearing I should say though I mean pajama pants because I mean of course my kids got a real kick out of that they're like um why are you wearing a tie and pajama pants I mean I'm kind of a weirdo on the internet but I'm actually you can believe that looks great says Alka thank you I do by the way have a green screen and the ability to key myself out but I want to do stuff with the hue lights so while I have the hue lights behind me I'm going to do that can I do beard jokes if somebody could feed me in the in the discord Live members chat could feed me a joke I need a writer could I get like got some joke writers so I can come on jokes I actually asked my kids to write me some jokes and I didn't get anything good I mean I could go with the like why is is 8 the one that's afraid of 7 or 7 afraid of 8 I think 8 is afraid of 7 because 7 ate 9 yeah thank you thank you I think this is more appropriate I made it too quiet now I can't hear my sound effects alright so hue lights discord bot control overlays oh I want a pole overlay live pole overlay I saw three blue one brown who was doing these on live sessions math lessons like basically and this is like internet weirdo just wasting time and three blue Browns live sessions was like inject this math knowledge directly into my brain someday I maybe I can achieve that kind of wonderfulness just court control overlays control hue lights and chat with Schiffman bots and this is at TBD and control from p5.js so this is what I planning to do and oh six is Afraid of seven six is the one Afraid of seven yeah eight not afraid of seven because say eight is that one of the people who eats I mean it's not a person it's a number nobody should give me a boot like by the way I have one two three four five different laughs sound effects and only one boo and then I realized the only thing appropriate for me to press is the boo let's try some more Goldberg Variations all right this is good so I think what would be good to do in the next half an hour before I turn into a pumpkin actually let's make the midnight pumpkin alarm I think if I can manage to make the midnight pumpkin alarm then I can have that be the overlay and it will go off at midnight so let's commit these and by the way this is a sincere invitation for everybody watching here to participate in this read me I'm not reading this github repository so the code that I'm doing will be in here maybe we can figure out a way that people can make variations of the overlays that I can use that up or I shall take contributions to them frankly to make them better because these are just projects that I'm working on that's a thing I mean I really should be streaming on do you think if I say that I should be streaming on Twitch tripe I should I got I should probably go get some aluminum foil or something because I don't know all right um so let's go to the P 5 editor we're getting slow start here I got a login coding tree excuse me while I look up my password opening up my generic password manager application you're welcome to sponsor me I might have some sponsors eventually for this I haven't alerted my I sort of like I said the coronavirus hit NYU semester was super busy I had to move all my equipment home I was like that no more sponsors please I cannot deal with this stress but maybe we'll see if this goes well it's helpful it's helpful every little bit counts what was I doing looking up a password oh okay editor seriously oh there it is here it is alright oh boy this is gonna this is gonna take me a bit fp1 seven eight exclamation point C M capital Q capital nine it's no such thing as a capital number this is not actually my password I'm saying random stuff as I'm typing and there we go yeah why not let's just go crazy here okay so I believe that at one point in my life I made a video tutorial oh boy the lights are the lights are blinking aren't they they're blinking they're blinking they're blinking no it's the other one a it just says a to me I'm sure you have a large longer name than a but in the view of my chat over here on the left your message is gone and it's highlighted at the top with the letter A and so as a is the first letter in the alphabet I will read you the first random number in this random number book really it's random number zero but a is not the zero number of the alphabet let a is a letter not a number my brain by the way does not work past 9:00 p.m. at night and this whole thing was terrible idea ten thousand and ninety seven all right okay so I made a tutorial a JavaScript timer or coding train and if I go here there were a couple of community contributions that you can see right over here and um thank you William and who says love your working love your work love your work know love your work I love your work oh I love your work yeah we all love each other's work isn't that nice all right let's get serious here so let's maybe start with this code and I'm gonna go to the web editor it's it's interesting it is using Dom elements you know what let's not start with this code let's make a full screen overlay here let's do it with canvas let's go canvassing so we're gonna do pumpkin alarm timer and first let's see can we in p5 very easily just get the current time that's probably an easy thing to do I think the functions to do that are hour and minute and second so let's see if I can say let our equal our know that can't possibly be right first of all it's giving me this really so hey you know it's bad so because if there is a function named our called our and p5 that's a global function I just named a variable called our and I'm totally just you know let's go to the reference so by the way if you've never seen p5 before hello here's the p5 website p5 is a JavaScript library for creative coding that's a it's a way to describe it but I would say it's it's much more than that it is really a community of friendly welcome people who like to be creative and express themselves through code and if you're a beginner it's a great place for you to start so I'm gonna go to the reference I'm going to sort of search to see if I can find our indeed I was right let H equals our this would be a perhaps a better thing Oh a is the monetary unit sorry uh okay so the name of the the kind contribution was LX u VI a a dollar sign which must be some other is the is the monetary unit okay so let's go with let H equals our and I'm not in this sketch we're going to do that do you hear that there's there's a there's a wild animal in my house it's not a wild animal it's a cat its domesticated and her name is Greta Greta maybe she'll company I do have a dog cam but the dog is not there there's a nice little bed under here so if Gloria decides to I mean she's probably just totally conked out somewhere but maybe we can get her to say hello let m equal minute I can only assume it's minute let s equals second second second second minute second minute okay and now I'm just gonna close that sketch let's just see if I can get these on the street now one thing that I absolutely love one of my favorite things in life it's really a sad sad state of affairs in my life that I'm about to say this is a thing called a string literal and so I can make a what but this is I could say the time I could display the time by using a back tic and then I can have the value of a variable with dollar sign and these curly brackets then I can put in any other text that I want so I could say : dollar sign minute : dollar sign second oh here comes the cat this is a really exciting moment I never comes to me oh no I got you I think she is I guess I should go back to the full camera here so this is Greta she is a rescue kitten if that's a thing but a colleague of mine at NYU rescued a cat who gave birth to her and all the kittens were put up for adoption and Greta and her sister Evy came to live with us so she was born less than a year ago and I am getting template literal it's called a template am I even the thing that I love so much I'm saying the wrong name thank you to a new member oh my god so many new members I'm met maybe maybe the chat the members who are watching in discord could just collect the names and I'll do a kind of round of thanking at the end because I think it's sort of like a fun bit that I've got going on here but it kind of interrupts the flow I've got to stay within the blow template literal so this now if I say text time and I'm going to say text align Center Center oh oh I have a coding train color palette I have to look that up later I don't know where it is so I need to have that on hand so somebody to remind me so this is good so I can file the other thing people can do is help me file issues of things to remember so coding train color palette I need that on hand oh you're don't see my you don't see me coding sorry I need that on hand for easy access while streaming alrighty alrighty then is that a big is it back no it's not it's not I was thinking of having a contest for a coding train catch phrase which will not be alrighty then definitely not that okay there we go so back to here so here's my template literal I'm gonna write text align Center Center I know I know I know see the problem with the chat is you're way behind me I've already fixed it um recent member names Thank You Alka I might need those at the end I by the way I'm just gonna call it string literal because I think of it as a string literal but do you know maybe template literal makes sense because this is a template from which to make the string I don't know who cares we're going to say with / - height / - Phil 255 background 0 text size text size 128 and let's see what we got here there we go oh boy look at this I got a clock so now how do I get this to be an overlay on my live stream right now oh boy this is super exciting also I this is really bothering me I need to number format these so I should say a number format I think it's 2 comma 0 like I don't want any decimal places so I want it always to be 2 digits but no decimal places I think that's what I want so let's do that to all these I really miss having my music going so let's see here well we're gonna have to wait until it gets to 0 oh wait I got nowhere to be I've got 21 minutes you know maybe the late night show should be in at 90 minutes yeah okay it worked excellent all right now how do I make this an overlay so first of all I can make this a transparent background by saying clear so in the draw loop if I call clear that is erasing resetting the background but setting it entirely transparent so whatever is behind on the webpage will be viewable so for example now if I go to file share and I think I want well full mode is a nice one to look at because now I can see this is my sketch Thank You Dustin welcome new member the lights are blinking I don't know it's the music too distracting I don't know so that's what's a little bit distracting for me this variation 3 oh ma I love variation for so good so so this is a thing I can now make happen in open broadcast studio so let's give me a moment and I'm gonna make that happen for you and for me what have I not played yet let's try this one all right everybody we're gonna get our first overlay all right so I have to go over here to this computer which you can't see unfortunately I should be able to wet I should figure out a way to bring my open oh I mmm I could bring my open broadcast studio in I'll do that another time so I am now going to go to my web browser and go to the p5 web editor login as coding train ah caps lock caps lock try to enter in by pet my master password for my password manager three times now and I can't seem to get it I got it try okay I'm in there let me get the URL I'm gonna open that sketch pumpkin alarm Tyner what a strange name for a sketch let me get the present full so this full mode is a nice idea you're about to see it going to add a browser pumpkin call this one pumpkin oh did you see that there you go see I've just so now you see so this is something I could do an open broadcast studio which I can add a browser source so now I'm gonna put in this page and I am going to say okay and there it is you can see it there it is now here's the thing and I want to like look at it so here it is this view of the p5 web editor has oh and I don't have any of the chats up right now because I messed everything up by going to the web browser so this this view of the web editor actually has a white background so the page itself is not transparent that is no good so what I really want is to look at and if I go back to this here what I really want to look at is not the full view but present so present view for the web editor just actually you can't see it because it's entirely white that was a bad idea but this actually just displays the web page with nothing the entire web page itself is transparent so that's the view that I want an open broadcast studio so I will now go over there and I'm going to hit edit what happened to the music okay and here we go up up I see some blinking lights by the way I never have this is a much higher viewership that I usually have which is a little bit insane to me let's go to properties we're going to change it to the present view there we go so now you see I have my overlay I can eat it that was weird and probably not a thing I should have done and would be good to end it out of this video which I can't because I'm live-streaming alright so now we know is the music too quiet so now we know now what out what should I do with this so now that I have the overlay and I guess I should put the overlay on this layout here so let's put the overlay in here to put in what was this a browser source add existing pumpkin by the way I spelled pumpkin pump pump Clin so here's the timer no bells and whistles here no frills but what I really need is I need to have something go nuts on the screen when it's midnight I need the screen to be full of pumpkins so I know that I have to go maybe I should turn into something that's not I'm not a pumpkin what would be a thing that I would turn into that's the equivalent if I were soda Cinderella turn into a pumpkin no the carriage turns into a pumpkin I don't know you only have 14 minutes here I did make a good list of interesting stuff to try we've already had the clock on the MacBook yeah but let's make the let's make it do some more interesting stuff so actually so now that I have this here let's let's let's make it fancier so let's do something like let's first figure out to make something happen when it's midnight if our equals 24 actually that's all I need to check right once it's 24 then I need pumpkin madness to happen I could Oh should we fire up runway and we could get a style gain model make us like an AI generated pumpkin can we do that in 13 minutes no like why not try okay hold on I got to do some I got to get how do I get a collection I think I'm gonna have to save this time but we could just start clock takes over the screen with Perlin noise well one thing that could one thing that might be nice to actually look at right now is how to do some image scraping which I have done before Google Image Python if I'd done this with node oh I'm gonna have to have an API key no thank you you know it would be good if only we're was a web series about web scraping here it is so this is a work in progress guide to web scraping as an artistic and critical practice created by Sam Levine you can sign up for this letter and you can also go through all these tutorials I might have to look at this and come back to it alright let's let's not worry about training our own machine learning model oh wait I have an idea let's open up runway oh I'm gonna have to log in here [Music] h equals zero [Music] i'd like to do some weird stuff so i should probably explain more what runway is alright alright everybody let's get my password again this is the worst i think it'll keep me logged in after today how do I find it search which one is it I have two accounts that's not good did that work all right browse models let's look for attention Gann so a runway is browse models browse models whoa oh I've heard about this model ok let's turn this music off here these so we're gonna have to do some we're gonna have to try a lot of these models because this stuff is pretty insane so runway is a an application that allows you to run a variety of recent machine learning models and connect those models with all sorts of other creative tools and applications thank you again and so I I should I should say that you know I'm not entirely showing this to you out of the goodness of my own heart I do enjoy and love runway I happen to be an advisor to the company and so it's a project that I have that I feel invested in personally and that I that I use for my teaching but I want to browse models and I want to go to attention Gann text to image generation so let's let's let's try this I don't know what workspace I'm in here but I'm just going to put in a little text here and I'm going to type in the word pumpkin so what attention Gann what the machine attention Gann model does is it uses something called a generative adversarial network or Gann and it it's trained with images that are tied to different to words so it's been trained all these the late the training data was images that are labeled so now if you feed it a a word it you can have it generate an image related to that word so let's see what happens if I run this model and I should have seven minutes and I don't I have a coupon code for people to use runway I need to get that is it is it going pumpkin pumpkin patch wha hmm Oh Oh Thomas Atkins is so right it's a string and I'm comparing it why is this not working I'm not very satisfied it's do I need to just type more stuff there are a bunch I see oh yeah I see a lot of pumpkins I guess I need a sentence law Oh oh it's got this is gonna give us nightmares this is a very bad idea happy pumpkins are delicious I guess it wants sentences so by the way you know I it's one thing to just Oh God play around and enjoy machine learning models and and just like experiment and have fun and that's really what I'm doing here but I would say that you know if I wanted to be if I didn't have this like time work above my head I don't want to be more thoughtful about this I'd probably want to go back to the the attention Gann model and we should really know how to use runway and I want to learn more so the attention can model I can here take a look at the attributions I can read a little paragraph about it there's usually a paper the link to with the paper for the model yeah here we go github repository and the research paper or down here so those would be those would be good let's let's see I have an idea so this would be much more fun if like I could get something from like the YouTube chat late night pumpkin party is a pretty good from Yosh in the chat so let's go back to runway a workspaces no training exports hosted mouse I need to host a model yes yes so I need to host this model attention Gann to no tension again no I let's get rid of this one delete let's go back to attention Gantt yeah yeah yeah now we're gonna try pumpkin late night pumpkin party on the coding train minutes oh well anyway so we see that this works now how do I deploy this model Network host this model this is exactly what I want to do so I'm gonna click host this model no cancel okay so this is something if I were recording a proper video tutorial I would do some post-production and and now the thing is I believe it costs something like 0.0001 cent for every query on the model don't quote me on that it's like 0-0 want something like that small amount and I don't want you to have the endpoint for this model because you could flood it and I would end up spending a large amount of money so did I spell pumpkin incorrectly it doesn't matter right now so the point is I'm going to here in my fancy system go over to here and now you can't see my screen so I'm now gonna go to hosting the model subdue did it change it can I can change it ah so all right good luck guessing this good luck guessing the end point I created for this host model it's private and oh you already saw some other oh I have to read hold on I gotta edit something Oh actually I could also just deactivate it later alright so let's get this model I've got the endpoint for the model I'm gonna go back to my workspace I'm sorry that you can't see what I'm doing and I'm going to get some JavaScript code and here we go Oh little boy okay got it alright so I've got my code and I'm gonna go back so you can see what I'm coding Here I am going to get a get pumpkin function called get pumpkin we're not who's not happening people but if I get this done by 1:00 a.m. it'll still work and I know this needs to say like this basically now which is super annoying but I'll just leave it that way you'll all improve this for me let's add a function called get pumpkin and for right now what I'm going to do in runway is I'm actually just gonna run the model the models running locally so I can test this locally and when I change the code I can put in my private secret endpoint so let's put this in here and see what I've got here now what this is doing is it is basically I have a caption that I'm gonna send to the model which is like late night pumpkin party on the coding train exclamation point then I'm going to use the fetch function I have a whole set of videos about fetch if you've never heard of that function it allows me to fetch data from a server runway which is this application running on machine is actually running on a server if you're a beginner I've really apologized I could give you like a whole playlist of things to watch to like sort of fill in all the gaps of like the stuff that I'm just sort of like stitching together right now but actually I think what I want to do which I think would be a little bit friendlier is use HTTP POST which is a function that's in p5 so I'm going to go back to p5 reference feel so feel so so quiet we're gonna go to the p5 reference yes the reference here we are the reference I'm gonna go to HTTP POST and I'm going to see what it looks like so I remember how this works I need a URL I need to say I'm sending JSON you'll know know and the data so let's do this I'm going to post to the URL which is this and I am going to post to that URL JSON I'm gonna post the inputs that's the data and then I have a got image so I can get rid of all this code which uses a sink and a weight or promises or who knows what it's using fancy arrow functions and I could just have this nice p5 HTTP POST function which says hey this URL that's the runway server that's running locally on my computer right here right now because this thing is going and this is the caption I'm sending it to it I'm sending the data this data with JSON format and when it's done got image should have the results let's just console.log the results let's so let's see if this works oh but actually in set setup let's just call get pumpkin pumpkin I kind of wish my dog's name was pumpkin because then I could do some kind of joke ya know okay let's see what happens all right awesome this is a really good sign look at all this insanity beautiful beautiful so what is this this is a base64 encoded image oh oh so much to explain and talk about it might be actually a little bit easier for me to see it in the javascript console oh it's doing it it's midnight and good night everybody sorry that's all we got to today I gotta go no I'm gonna stick this one out I mean some I feel like I I like I like rules and systems and I like following those rules and I like knowing what the rules are and I like knowing what the systems are and how to deal with we'd like to have a rule that come midnight I'm out of here but let's let's see if we can get this a little bit more so the result is an object that actually has a property called result so maybe I don't want to call it result and that's the base64 encoded image so I don't want to look at the console right now I don't want it to do this over and over again let's comment this out get pumpkin let's put it in here I just want to do it once at the start can you see what I'm doing here my probably I really should do my whole green screening thing and I looks like XD out of the corner of my eye some blinking lights thank you to Singapore wow so this is runway let's just call this message reply I can't figure out what to call it JSON reply and I think if I just say create image this is a function in p5 that creates a Dom element but I buy that like so there's a canvas in p5 which is a Dom element document object model that's what Dom stands for as all the things are on the webpage and but I don't I want to draw that image be able to the canvas but I just want to see it right now on the web page so this I think will work if I now say JSON reply dot result and let's make this just 400 by 400 just briefly there so here it is there is the late-night coding train party pumpkin party we've got the image there so I think what I want to do is there's probably a better way of doing this but let's just create a variable called pumpkin Park this is not what I intended to make tonight pumpkin party is false so if H is 0 then that pumpkin party is true pumpkin party equals true and then so as long as it's that and not pumpkin party this will ensure that we only do it once then I get the pumpkin so now I'm gonna take this out of setup because the time is midnight right now this should work right we've got the O create image was expecting at least two arguments but received only one I don't know what I don't know what to tell you I do want to do this though pumpkin image oh no no no no I see I see what I want to do image ready so I'm gonna create so when the image is ready must have a callback I assume I want to say this must be the Dom oh no no no yeah oh really let's do this let image equal create image and then oh this is bad so I was going to I had this idea that I would just put all the creepy pumpkin images all over the screen yeah I could use absolute positioning that's what I could do so let's do that let's leave them as Dom elements and we'll do a position which is a random with random Haight and then we're going to get another pumpkin so we're gonna do this over and over again until I turn it off so this is a the p5 Dom library allows you to position Dom elements let's go back to a window width and window height and let me just move this over here so we have more room to see and I think what this should do syntax error you can't really see that after line 17 let me just let you should see the entire laptop right now I'm missing a parenthesis here let's try this where are my pumpkins all right let's let's debug this let's get rid of this image ready a console.log image am I getting that Dom element oh yeah whoa oh boy whoa oh it's always gonna be the same image okay so there's an issue here I like I think I should by the way set timeout get pumpkin 500 like let's not let's not have the pumpkins go crazy so now that this is not that exciting because it's the same pumpkin image every time so I think what I need to do is let's go look at the model so is there is there like a random C I don't think so that's not this is not really like a latent space where I could kind of just tweak some values or a seed I'm not I think it's this is like every text input is going to have an exact fixed output so I think what I need to do is generate the text so the text is different every time why don't we do that as let's just do that as let's create word let's let's just make word salad pumpkin pajamas party late night coding trained so let's take this array and shuffle it so if I say console.log words in setup it's gonna give me oh why is it giving me this I guess it really wants a callback let's look at the reference for create image reference create image oh oh I am so wrong about this that second argument is really important and really should be required so that's the alt text so a web page is not accessible to people who use a screen reader to browse the Internet to browse web pages if there's not alt Texel or turn on alternative text for images so if you can't see the image you can hear a description of it so that's actually really really important to include and I deeply apologize for just kind of and I'm so glad that p5 gives that error message just as a reminder so I am now it's 12:10 a.m. I really need to go to bed don't let the tie mislead you that I like awake and I'm having a good time I'm here on the internet with all of my friends yeah alright a JSON reply result and so this could be the caption so let's say let caption is so let me let me comment out this get pumpkin for a second so one of the things I want to see is how do i quickly shuffle this array line 18 I've got an error and I'm sorry I've got to get my system better here so I'm gonna put in a second argument in a minute so that's the array down here if if I shuffle the array is there a is there a JavaScript function that shuffles an array like can I say words dot shuffle it's not function let's do javascript array methods and let me come back in here I like to look at this page so there really isn't like one of these isn't uh just shuffle it I I'm having like a total deja basically my life is just is just destined to repeat the same discussion in every single video and live stream that I do so I mean I get easily right well I don't want to cut myself on that you know cheek too much but you know I could write my own shuffle algorithm let's do that I'm sure one of you watching this especially if you do those like coding game challenge it's good right for me in one line of code but I'm going to take it slow and we have another new member this is pretty amazing I'm gonna take it slow here and I'm gonna write a function call it shuffle it's gonna receive an array and I'm just gonna do a swap I'm gonna say I'm totally done this so many times I really should keep a library functions that I reuse so I want a to be and I want B so I'm picking two indices into the array ik I'm not guaranteeing that they're not the same but you know it'll good enough for now so two indices into the array I want to take the value a and store it because I want a to be what B is and I want B to be what a is and now this array is shuffled thousand shuffles is plenty I'm sure way more than I need for ran musician and now I could say shuffle words and if I run the sketch pumpkin pajamas party late mmm that didn't seem to work if I've had shuffle possibly because your code is already using that name as a variable huh scramble ooh no that's not right that's not right Oh No so the whole point of this is I need this DB temp so the point of this with the swap was to save what's in a put that in B and then because now that a is what B is I got to go back to what I saved to put that back in hang okay yes and making a new array and returning it all those things could make more sense okay so then so caption could equal words dot join let's just join all the words with a space I don't know let's add a period at the end and then I'm gonna do this every single time actually I should just do it and get pumpkin so this can be a local variable I don't need a global variable caption I don't need to do this here so basically every time I want to get a pumpkin I scramble the words I mean there's only so many possibilities like how many ways can you shuffle an array with one two three four five six what seven things in it that would be 7 factorial right which is others 5,000 ways so that's pretty good I think that my math is right there because there's seven things seven possibilities and six possibilities and five possibilities and four so seven times five yeah alright so now let's see what happens if I get pumpkin again fail to fetch why oh well first of all this should be this type error failed to fetch Oh am I not running the model anymore oh yeah it's not running so I think runway because running the runway runs these machine learning models in the cloud you can sometimes run them locally and there's a fee for running them in the cloud so I think runway if you haven't used it after like 10 minutes it shuts it off okay so now let's try and let's see what we get all right late night pumpkin party I kind of want I should probably like use some CSS to set these like slightly transparent and like do cool stuff with them but I think I'm gonna pause for right now so now all I need to do is I need to go back to here and I need to well first of all so and I need to change so I'm gonna go let me show you so I need to change this too now I deploy runway allows me to take the model that I'm running locally on my computer and deploy it to a server and then there's a fee for every query to it and so I am going to change this from localhost to the endpoint of my model but I don't want you to see the endpoint so I'm gonna do that while I'm just in the camera view so bear with me for a second I download all this new music I don't know where any of it is alright got some suspense going on here am I going to be able to get this to work all right stopping running the model locally hosted models gonna copy my endpoint I'm just replacing again whoops all I'm doing is replacing this right here with the endpoint that I'm getting from runway and then I'm going to test to make sure it works work what did I miss error hold on let's look at the air [Music] all right I'm gonna let you in on the air here comes the air ah there's the point there it is well here's my end point I couldn't get it to work anyway I'm gonna change the end point now that you all see it by the way I think there's some breaking news right here on the coding train coming to you live I hear from Jeff that p5.js has a function coach which is why I couldn't name my variable shuffle and I didn't have to write my own function call shuffle because it shuffles it anyway okay now we can see it on the website oh yeah of course there's no way I'm hiding this from you this was a failed attempt at hiding my eyes this is the very failed attempt at hiding I don't really care right now good luck I mean I can I can turn it off but like why error unauthorized I must have to do something what did I forget that's weird well thank you very much for tuning in to this live stream let me at least deactivate it I will resolve this issue well I just want to see some pumpkin images show up on the overlay this is so sad alright let's make it do something else I'm gonna resolve this other issue I've got too many thing issues which one is like I can't get it to work two is actually I could just run it locally on the Oh this is all very silly so I can't get it to work I also can't figure out how to like do this without everybody having access to the endpoint oh I need a token right credentials oh I've gotten I've done this before okay hold on give me a second everybody as you were of course they need the credentials so silly so silly I'm gonna get those credentials I know how to do it I forgot so I need headers and the headers have I'm looking at the wrong one I'm gonna show this to you while not showing you the authorization so so this here is actually if I go in the runway interface and I go to the cloud hosted model the code includes headers so I need to have a token under authorization and it's a secret code in order for me to access it which I could hide that code in an environment variable or sakis file if I were running a node server and doing all this stuff correctly but I'm just gonna get it to work and all you hack errs out there you're gonna get that code but it doesn't matter to me shut it death suits it worked the first time around shut this I'm gonna pull this train over to the side of the road which would probably be very dangerous to do that with a train alright okay everybody you can't see that you can't see it but I can see it and I'm grabbing it I'm going into p5 I'm narrating what I'm doing and I'm in my get pumpkin function and I am putting in some new code and I'm going to say give me a second here okay activating my model this is I think this is worth it okay good shape here okay give me a second here everybody [Music] but I think I don't like its refresh browser and scene becomes active okay here we go everybody uh yeah wait hold on okay thank you everyone for watching this episode we stopped this year of the coding train it's midnight and we're having a pumpkin party here end this thank you all for watching the coding train here moves the time update to the bottom of the loop here I am okay wait I have to fit wherever okay so thank you for watching this I will be back to continue this insanity that I'm on and I appreciate you get into the fetal position and dry I know the time should appear on top right I'm trying to get to and tomorrow today we finished oh wait hold on so if I could just manage to edit this I think just to check things work and to read me this is so exciting does this work oh I need still need the bullets [Music] oh not the pumpkin syrup here look feel the accomplishment bask in the glory that is the checkmark on the midnight pumpkin alarm thank you once again for watching I hope you enjoy these AI created strange things I'm going to switch to my end animation which oh and I know I know first of all let me just come back here for a second and say I'm going to now recreate a moment here I am going to click the button commit to master directly pretend I'm doing that right now I click it and your reaction is yes I know and by the way that should basically be your reaction for this entire livestream which was apparently 90 minutes now so maybe the late night coding train show goes from 11:00 p.m. to 12:30 a.m. I'm apt to wake up pretty early in the morning have you know and I don't have an easy definite enjoy tomorrow so much because I'm going to have I think every time I switch it resets yeah I'm going to enjoy tomorrow so much because I'm going to have known that I did the livestream the night before and I'll just keep making stuff but I want to thank does anybody does anybody have the list of members for me to thank with random numbers we had so many new members join and I was gonna read you some random numbers to all the new members to all you new members out there I don't know why you joined I will give you a refund I absolutely will happily give you a refund if you want to cancel your membership just let me know me IM sami rights in the coding train discord member chat it did seem like a live stream of bad security and code maintenance practices and i would say thank you that is actually the coding train tag line late night with the coding train bad security and code maintenance practices and apparently we have some breaking news so first of all I'm shutting down I'm shutting down the my deployed model because I don't want any trouble I don't want the runway people to be calling me in the morning why did you destroy our servers and I am going to come back here and give you some breaking news hello this is Dan shipment with the coding train I'm drinking ginger tea apparently already there is a coding train color palette here are the colors and CJ coding garden with CJ this is where I would love to plug all of the other streaming content creation coding funtime party channels you should watch check out coding garden with CJ I think mostly now on Twitch but I think if you just search using your preferred search engine for a coding garden with CJ you will find everything you need oh I love this this is the greatest thing ever here's the coding train color palette use use at however you like wherever you like always hmm thank you for that breaking news and now I don't have the list of all the new members I do actually I think I might have a way of woops I don't know what that is this is the pump looking to put it up here I do have a way of I believe finding all the new members so if you will bear with me for a second I will thank them whoa ha [Music] [Applause] [Music] we're perfect [Music] all right [Music] now I will thank all the new members join the coding training this one goes out to you William seventy thousand two hundred eighty or last a fifty six thousand six hundred twenty-five Pedro fifty two thousand four hundred thirteen Karthik forty thousand one hundred and eighteen ninety nine thousand something it lost my place ninety nine thousand eight hundred sixty two and Dustin Thank You Dustin forty six thousand seven forty-nine and Marcos Thank You Marcos thirty seven thousand five hundred seventeen thanks everybody thanks for watching I do have a secret overlay for you that I will now bring up I love you all I thank you so much for joining me on this strange Lazaro ride and I will see you all tomorrow night this very time 11:00 p.m. and late night with the coding training [Music] as always I always forget [Music] [Music] [Music] stop stop I'm gonna do this this stop this dog the starter this start song never forget the Vista but somebody composed that song for me back just for a minute because amazingly they set up the dog camp put a camera on the dog's bed underneath Oh [Music] [Music] [Music] so peacefully by auto-tune and the internet will fix that for me coordinates [Music] so this is random this is noise Perley noise that is in the core random algorithm the actual random algorithm itself those numbers aren't related at all you pick like I'm picking random numbers between zero and ten nine two seven six one nine four eight nine to one thirty I think nine a lot apparently but with Pearlie noise I might pick numbers like this two three four three four five six five four five six seven five six seven five six seven eight nine eight seven six this is like Berlin noise performance part [Music] 89 to 139 1 2 3 4 3 4 5 6 5 he was like pearls and noise performance apart with curly noise I might pick numbers like this by purling noise that is Hurley no this is Hurley noise and it's Hurley noises this is Hurley noise that in Berlin oh so this is Hurley noise that is her pearling know her purling noise but with pearly noise I might pick numbers like this [Music] [Music] well this is like Perlin noise performance part unicorns and rainbows and cupcakes what else is there yes kids thank you very much kittens and rainbows and cupcakes notice that look what I get I'm really losing my mind okay [Music] again [Music] [Music] [Music] I feel just sort of like a nice feeling of relaxation everything's gonna be okay today dream is not broken it has not frozen this isn't this is a wonderful thing okay we're gonna do it I'm really getting to something I need my sound [Music] okay what else [Music] that was invalid syntax i forgotten i will use continuously over and over again all sorts of text generation analysis things that I will use continuously over and over again to do [Music]
Info
Channel: The Coding Train
Views: 36,246
Rating: undefined out of 5
Keywords:
Id: wKGKYAnlyRQ
Channel Id: undefined
Length: 104min 14sec (6254 seconds)
Published: Tue May 26 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.