Hi everybody it's Sam, it makes that growl. Thank you for watching my tutorial today. This is a really cool, very tall curved closed gift box. I don't really know what this is. I done it with my smaller curved closed gift box, that's what I called it. I guess I need to come up with a name for this design and yeah I'd done that design a while ago, I think it's about nine months ago now and absolutely loved it. So I have done it again at this time in a taller box. So it's using the whole length of A4, so in the UK that's 11 and 5 eighths of an inch or 11 and 3 quarters. I know that for others you may have letter paper which is 8 and a half by 11. You can still make this because I'm using 8 and a quarter in width so you could just cut yours down to 8 and a quarter and use the 11 inch length it would just mean yours is just that slightly bit shorter. So yeah this is what we got, it's a really nice size, it measures I think it was four by four, yeah it was four by four and then in height was nine inches I believe and then basically it just does up with this here and these all interlock. You lift one up at a time and then it opens up to a really big box but I don't want to open it all again now you'll see it as I'm making it. The papers I'm using are from Simply Creative by Trimcraft and again I'll show you those packs in a minute but let's go. So these are the paper packs so for the one that I showed you before I used this one here so like I said Simply Creative and this is their Tropicana and 12 by 12 pad, 20 sheets 15 designs and five of them are double-sided and they're 200 gsm so nice strong pieces. I used the Puffin or Pelican or Toucan whatever it is and these stripes here they looked really good and then the one I'm using today is this one and I'm using this pattern like checkered one here. I'm not going to do anything like this on it I'm going to leave it blank because I don't know what I'm going to use it for, it'll be there ready for to give to someone but you get the idea that all that is is just a fussy cut little creature there and then I've just mounted it on two circle framelets okay it's really simple. Right so you are going to need that bit's already done so you need two pieces like I said mine is 18 1⁄4 by 11 and 5 1⁄8 11 and 3⁄4 it's always in between that so you need two pieces of that size or you will have two pieces of letter paper you will need to bring your letter paper into 18 1⁄4 but keep your 11 inches okay. Then you are going to need four pieces of pattern paper this measures 3 and 3⁄4 by 9 and 5⁄8 of an inch. Now if you are using obviously 11 inch card I would say you need to bring this up so what is the difference there so we've got a difference of what is it 11 by 11 and a half no sorry no yours is 11 so we've got a difference of about three quarters of an inch so I would say you need to bring yours up let me get to it and then do it I'm trying to figure that out in my head and I can't think of it right this minute so once we get to that point I'll tell you what measurement you're going to need but you need four pieces of that okay so with your face piece you need a piece of 5 and a half by 5 and a half what you want to do is just pull the card out ever so slightly so you're just revealing a little bit of the bottom of your scoreboard and you want to score it 3⁄4 of an inch you want to do that on each side so rotate pull it out a little bit 3⁄4 of an inch you're not pulling it right out to that 1⁄8 of an inch score line that first notch you just kind of put it in between there again rotate it and put it right in and then pulling it out a little bit 3⁄4 of an inch and again pull it out a little bit 3⁄4 of an inch okay by doing that it allows us to fit the box inside okay so my scoring is exactly the same for when you're using the 11 inches as well because all of the stuff we're doing is along the 8⁄⁄4 inch side so first of all you want to score it 4 and then 8 then rotate it so you've got this small 1⁄4 inch side now facing the top and you want to score it 1 inch all the way down then rotate back again so this 1 inch piece is at the top and you want to score it 1⁄2 to the first score line 2⁄2 to the first score line 5⁄2 to the first score line and 6⁄2 to the first score line okay then what you want to do is pop it back again along the longer side and from that 1 inch score line you want to come down to 3 inches and you just want to put a little notch like so flip it over and notch again okay then just fold that one in half and again just put a little marker at 3 because basically we're going to be connecting all of these little notched marks together okay repeat that on your second piece keep your stylus because we're now going to need that to do the next bit and what you want to do so like I said I'm going to just go and pop in some little pencil marks just so you can see it better because I'm working on white card so all I'm doing is putting a little cross just where all these little markers are okay so just put pencil mark basically um you've got that 1 inch score line along your short side coming down from that you've done those little score lines at the bottom of each one I've just put a little pencil mark if you want to do that as well just so it's easy for you to see then I've just put a little pencil marks over those two inch little notches that we created okay then what you want to do is grab a mug this is just a normal household mug it's a pretty standard size I'm sure of it and it's diameter I mean the inner circle there is just under three three it's three and one eighth of an inch the full width of the mug it's just a normal I think I'm doing it yeah it's just a normal mug but you want anything you use circle um uh what you call it circle dies you could use tape but I'm just using a mug here the all it will do is if you've got more of a larger circle or an oval kind of shape it would just mean that this may come up slightly higher or or slightly lower depending on that curve so if you imagine that curve is longer it's going to come up higher okay so what you want to do is grab your mug and grab your stylus and first of all I'm going to put my stylus on this little cross here okay so at the bottom you've got this square one inch square bottom left hand side of that square put my stylus down first pop the mug in make sure the mug comes down to then this two inch little cross and you're going to then join those two up now this is exactly the same way that I've done that smaller one and many other boxes so I will share all those links and those of you that have done them will know exactly what you're doing here now if I bring that up can you see I've created this curve score line okay then turn this and then do the next one so again popping my stylus down in that two inch little cross there and lining up my uh my mug to the bottom of this little one inch square so it's in line with that other cross make sure you do really want to make sure that you get these exact do spend time on it if you've got the pencil mark there just makes it a bit easier so now if I bring that one up you can see I've created this kind of perfume kind of neck shape okay so again onto the next one put this time you've got the bottom you've got that other one and a one inch square just there bring the mug down till it sits next to that other one just bring that one around so the last one okay make sure you really do leave a good impression because you are going to be obviously curving all of this and now you can see all of those score lines okay so I'm just going to grab my rubber just go over now and rubble that out and basically you want to go and repeat that on your second page okay so just go along now and burnish you've done the big middle one do that little quarter inch tab like so and just that top one then with this um end facing you so where we've done all that scoring first of all you're going to cut down this first score line here okay and then you're going to cut along and just take that whole piece out like so then cut down the next one like so miss the middle main score line that goes right down the middle and go right over to the next one okay and then you're going to remove that whole middle section you want to kind of remove you want to remove the score line so I'm just kind of cutting a little bit under there just so I can take out the bulk of that okay then go along to the next score line cut down and then remove that whole piece like so so now you'll be left with these two one by one squares which are at the top of your score lines both of these score lines there so repeat that on your second piece okay and then you just want to just very gently just push down you want to just start to create these little curved score lines you just want to start bringing them to life and you can see there I've got that's I've got all that score line hanging over so I'm just going to remove that bit there and then again just very gently like so once you start putting the box together they will all help each other but now if you were to bring it onto its side and start bringing it all down once they sit perfectly together you can already see you're getting one of those corners okay so again do that on the other one then with all of your pieces here so you'll have four of these what you want to do just pop that to one side grab a pencil and a ruler and you want to come down two inches from the top just put a pencil mark then two inches on the other side and put a pencil mark then along the top you want to come in at one and a half and again one and a half from this side you're basically creating that same kind of shape so now with our our mug again this time with my pencil I'm just going to hold my pencil at the top of one of those pencil marks and then just trace around the mug and then again put my pencil down first and trace around and that is you can see there the two pencil marks connecting so just like we did on the white card but this time we're using the pencil and now you want to cut cut that out so just really neatly right through the pencil mark you can rub out anything you really want to make sure you get a really nice curve so try and do it in you know in as little cuts as possible so you're getting quite consistent see I'm using the whole kind of cut there before I start again and that way you'll just get nice flow hopefully a nice curve okay and then get rid of that much feeling like I've got cup of tea and just rub that out so you want to do that on all four of your I've got these here and then you want to stick these over the top here okay now this is when I can tell you the measurement there you go so yours your pieces need to be nine by three and three quarters okay that's if you're using letter paper right now just get these two stuck down I'm just using my wet paper I've already just stuck that one down but for this one here all you want to do is just come away from all of your score lines these the main score lines the side and those curved score lines by about one eighth of an inch just under a quarter of an inch and it'll give you that nice little border okay so if I just bring one up you can see where the score line is there and then where they come in okay so bring it down yeah like I said about one eighth of an inch and then stick it down okay so while that is just all setting we can do our base like I said you want to do that so you'll now have two now go back to this it should all be nice and stuck I might have to roll that a little bit I think I've gone a bit too heavy with the glue and it's just walked it over slightly but a little tip with this is just run it through your it's fine it does lie completely flat but I can feel it a little bit it's just run it through your um die machine so I'm going to stick this together with my um red tape so I'm just going to run along the little tab here and this all the way up I shouldn't use those scissors but oops quickly I've got my other ones there I forgot okay just make sure that's all this tape's a little bit thinner than the tab but it will be fine and then grab your other piece and you want to just make sure that you line up the bottom there I don't want to get my head in shot so let's bring it around that way there we go all right you should be making sure that the score lines there curve score lines meet up and obviously your pattern paper as well okay I need to get my eraser on some of this okay and then again on this last one here just run okay then bring this one over bring this one over actually take that off first and then this one and it should all match up if it doesn't just kind of you can pull it across a little bit like this one I can see is already about a millimeter off turning it all the way around start from down here instead there we go like so I'm a little bit out of the top though which is weird obviously see this what I mean some of the card is um which call it three uh three eleven and five eighths of an inch and eleven and three quarters that's slightly out there so I'm just going to have to pop it down here just show you what I would quickly do just trim that bit like so and then I can just my bigger ones here it's hard to get them in just trying to work my way around to this side and then I can just straighten that out I've got a bit of a score line there still I can remove like so there go that's just straighten that all off again now okay so this is what you will have keep it flat and then with your hole punch you basically just want to put a little dot in the middle I'm just eyeballing it but if you want to obviously put a cross through there and measure it properly and then just hole punch through both of them because that way you know that you're getting your holes in nice and even okay and then what you can do is where you obviously squash those sides do it again now it's now they're all together you might need to help the ones where you've joined obviously your um card together you might need a little bit help now if we squeeze them all across you'll see you get a little bit more we can just burnish all of those score lines then we just need to do a little bit of cutting so you just want to cut up each of these those two like so okay then rotate and again cut up like so then I'm just going to grab some of my wet glue just pop it on the outside there this card's cracking a little bit which is not very good and then bring that side and just pull it right up there if you get anything overhanging you can just trim it like so you can see there I've got a nice right angle to rub that glue out in a minute okay and again see where I've got the crack in there what I'm going to do is I'll just run some glue along that and it will just secure it but the it's only on that one side which is a shame and again I'm just going to bring that one over and bring up the sides and there you can see got a nice little corner just repeat that on the other side and just make sure that each of those are stuck down you can see oh no I've just um just gone right through with my bone tool oh no I'm not I'm not wasting that that's going to be fine do you know well once a bit of glue is put on there and it's put in it it would be okay I'm not redoing it again I'm just taking off that's a glue with this rubber and there we go oh I can't believe I've done that okay when you do that be really really careful don't do what I just did it's because I've made it soft this is obviously a crappy card blaming my mum we've just got out of her stash anyway you'll be using a better card than I will be it's just that little bit there I'm going to have to be careful with that okay so now what we want to do in fact I'm not having much luck with this because I like to edit this video because the other one I done the measurement was obviously out and I wasn't concentrating I had to rip it off the bottom of this box so you can see there where I've tipped had to tear everything off so fortunately I've got another one and now this one should sit perfectly inside which it does and then that's all going to stick down and hide it anyway so what you want to do now is just grab again your wet glue just pop it on the bottom here but don't go any higher than three quarters of an inch so maybe just do half an inch and then you can just when we stick it all together you can kind of when you put pressure on it with like the ruler and stuff it will it will kind of spread out that glue right up to the edge so I'm just kind of I know I'm covering all of this horrible paper so you can still save projects like I said this is starting to stick and I thought this doesn't look right I've gone wrong and I followed my own tutorial right so what you want to do is just get the bottom and push it in like this okay and then pop it on your little tray let it go you can see because I've edited I've already done this bit because I've already done it now I need to undo that so I can get inside of it but you can see how this all goes together once you put the ribbon in okay pop it all open then pop it on its side and then get your ruler just go in make sure you don't put it out like I just did and just push that all down on each side get your hand in there and you can feel the bottom of the box here just make sure your card's coming right up to the bottom there okay when you've done that one side make sure obviously it's nice and it's stuck down flip the whole thing over and just bring that card down to the other side and just keep working your way around then do the other side and so on until that glue is completely stuck to all of your edges okay so I've gone around there you can see now where it all sticks nicely to the bottom I'm just being careful not to go through make sure I can get that hole fixed which I think I've hidden I think it's okay just make sure all of your corners are all nicely joined and that's why it's good to use the wet glue because you can obviously spend time moving it around if you had used red tape now I think you'd be in a bit of a mess but you can see there how nice it is and I've managed to cover up and save my box so now you will have some ribbon for this you will need what I say it was 12 inches 11 or 12 inches of it tie it in a knot and then basically start from one of these sides pop it in like so and obviously pop all them down then go across to your opposite side if you wanted to look at a different way of closing it check out the curved one and the other tutorials that I've put up alongside this one because I think I've got about two other alternative ways to close it um so yeah you might want to you know you might prefer one of those and um I think I stuck the base down to the other one a different way as well um it's all the same measurements that was a four by four as well it's just this one is taller and then that one goes on top there you go so there is the box super strong perfect for you know a small bottle of wine a nice bottle of beer um big candles all sorts of stuff so that's that one and then I put the other one over the other side that was that one as well just to give you an idea obviously in terms of decoration but yeah I'm really really pleased with these you can hear they are solid this one's still got to set a bit and I think I've saved that hole but uh yeah there you go try and cover it all up not going to hide anything so I hope you've enjoyed this tutorial please give me a thumbs up if you have and subscribe to my channel to see more thanks for watching bye


I think this year's UK Daily Service Dissertation Prize was a huge success. We had 33 submissions from 16 institutions across the UK, from a whole variety of social science backgrounds from economics to local science to sociology and criminology. I managed three ways of this cottage climbing justice survey together, so from 2008 to 2011. I definitely think winning the prize has given me a lot of confidence because although you get your grade back, it's nice to have that recognition externally as well. I used the data from the Dissertation Prize 11 in the Scottish Census in addition to GP data from the Scottish Quality Outcomes framework. It has been a really good experience, but doing the executive summary I think really helped me to pass my knowledge of my dissertation. It is a great opportunity for them in terms of their CV, and also that can increase employability as well, which students are always seeking to do in a highly competitive job market. I used the British Election Study from 1964 to late 2015. It was brilliant on the CV, obviously, first and foremost. A social science-quantified student can really be up there with people who have come from more, perhaps, hard science-quantified backgrounds. I saved the UK labour force early from 1993 to 2008, so covered 16 years. Seeing that my work is, I think, a good standard for people who can read and look at what you've done. I think the Dissertation Prize will give students the opportunity to demonstrate that they do use quantitative analysis in a research capacity, but also demonstrate to others outside of universities and then within different organisations what the UK data service is and what the UK data service can actually provide.


Menstruation is surrounded by stigma and shame, which has been perpetuated through public policies. These policies have the potential to either reinforce or combat stigma, depending on their content. In our study, we found that while some policies addressed menstrual stigma, others failed to do so. This was due to the fact that policymakers were constrained by the same stigma they sought to tackle, leading to hesitation and missed opportunities. Policies could raise awareness about menstruation, but also emphasized bodily management and control, instead of promoting agency and autonomy. To truly break the silence around menstruation, we must first recognize the invisible power of stigma and its impacts in all areas of life. Only then will we be able to actively challenge, dismantle, and redefine it. This article was authored by Mary M. Olson, Ne Alhulu, Purvaja Escavador, and others.


This is stock number 11246. We're here at Summit Automotive in Fond du Lac, Wisconsin. You're new and used heavy-duty truck headquarters. Today we are checking out this super clean 2013 Ford F-250 Super cab six and a half foot short box. This truck has the 6.7 liter power stroke diesel It has been fully safe and inspected by our service shop has a fresh oil and filter change All the fluids have been checked and topped off. It has four brand new tires, and this truck is 100% ready to go Pale adobe Metallic is the color we shoot all of our videos in 1080p 60 frames per second So if you have HD capabilities on your computer tablet or smartphone device Turn them on right now because it is definitely your best way to check out the quality and condition of the truck before seeing it in Person and if you'd like to check out all the photos on this truck in the upper right hand part of your screen Is a link to our website click that and check us out there comes with the 20 inch painted and polished aluminum rims Pretty nice condition on those rims, and it has brand new Goodyear Wrangler trail runner LT 275 65 are 20 tires. They are brand new tires. We put those on in our safety inspection You can still see the little wear Knob on there from being new has the FX4 off-road suspension package so you get the Rancho shocks on there front fender and hood is in excellent shape Headlight lenses are nice and clear front bumper is in great condition I didn't see any dents or dings on that and the lower valance is in really nice shape as well Factory fog lights the hood is very clean. I didn't see any dents or dings on there, and you do get that chrome-trimmed grill Passenger side front fender is in excellent shape as well no dents or dings on there and the passenger side rim is In really nice shape. I didn't see any scuffs or scrapes or corrosion on it That tire is brand new too and as you go down this side of the truck take note of how clean the body is how reflective and mirror like that paint is We take these HD videos So if you are far away or even if you're close by and you just cannot make the trip down You can still see the truck hear the truck here and have confidence in the vehicle that you're looking at before even get here So that when you do get here There's absolutely no surprises and that is why we offer the summit auto fast pass option in the upper right hand party Screening a link right to our website where you can apply for financing Get pre-approved see a payment quote even appraise a trade all from the comfort of your own home Back room is in nice shape. Looks like we did brand new brakes in the back and the back tires are brand new as well frame into underbody very corrosion-free Really nice Has all the remaining factory exhaust so it hasn't been altered in any way and the lower rockers all look really good I didn't see any corrosion on them You do get the chrome tipped exhaust Chrome rockers your bumpers in pretty nice shape It does have the backup parking sensors Full towing package which includes a receiver hitch four pin and seven pin wiring the tailgate is in really nice shape as well Didn't see any dents or dings on that it does come with a leer color match topper Also has a sprain bed liner Bed mat and then these rails are for the Thule Roof rack that's on the top of this cap But the beds in really nice shape nice and clean back there Tailgate shuts nice and solidly The cap is in pretty nice shape as well And as you go down the driver's side just as clean as that passenger side No major dents or dings on the box here and for full disclosure this back rim is in excellent shape as well Down the rest of the side of the truck looks really good It does have the door code entry which we have the code for has the power scope mirrors They power fold in power Telescope out they're heated and have built-in directional signals does come with the chrome step bars Inside the larry package gives you the tan leather interior There are no rips or tears on the seats. It does come with side current airbags and Power driver seat and passenger seat whether tech floor mats throughout does have auto headlamps and power pedals power windows power locks power mirrors and Memory driver seat now. I think you got to have the accessory power on for the telescoping to work But I do like showing that the power fold-in feature is working As we hop inside the vehicle here You can see that this one has 46,195 miles Before we get too far on that I want to show you that the telescoping is working once you have the accessory Power on then those do work Anyways instrument cluster is very nice and clean 46,195 miles has the leather wrapped steering wheel Bluetooth and audio controls on the right cruise controls and information center controls on the left It does come with the my Ford touch radio. You get your heated and cooled seat buttons right there This one does not have nav on it But this is where your backup camera shows up You do get the stability control downhill assist control turned out four-wheel drive dual climate controls AM FM and Sirius XM radio capabilities on this truck and it does come with the factory brake controller a hundred ten volt hundred fifty while plug-in Passing aside weather tech format and seat are in excellent condition No rips or tears the headliner is in really nice shape And you do get home link buttons for your garage door security systems and lighting systems Map lights and power sliding rear window We'll take a quick look at the back seats and then we'll start it up and check out under the hood Back seats are in great condition as well. No rips or tears back here It does have that power sliding rear window with the built-in rear defrost And it does come with a factory subwoofer underneath these back seats Or underneath the driver side back seat factory floor mats back here You do get another hundred ten volt hundred fifty watt plug-in and then these seats do fold up for extra storage Obviously this subwoofer is right here, but the other side has more storage under there And we'll start it up and take a quick look under the hood. I Would personally like to thank you for checking out the video today and hopefully from this HD video You will have been able to tell just how clean this truck is all the way around Inside and out under the hood be a six-point seven-meter And you base very clean runs very smooth This truck has been fully safety and inspected by our server shop as a fresh oil and filter change All the fluids have been checked and topped off Has four brand new tires truck has been gone through mechanically 100% has brand new And this truck is 100% ready to go I would highly recommend it from a quality and condition standpoint and to see more pictures of this truck or one of rather 450 new and used cars trucks SUVs minivans wranglers half tons three quarter tons one tons you name it We got it go to our website www.summitauto.com full pictures and descriptions of every single vehicle from two locations all at summit auto.com And if you'd like to check out more HD videos You can go to youtube.com slash summit auto remember to like subscribe and share on this video and all the videos that you see there Fact any second you will see a link to subscribe to our YouTube channel on your left it links more 250 videos like this one on your right if you've not been to our website on the bottom a link to this vehicle on our website Click those check us out. We really look forward to helping with this super clean 2013 Ford F 250 super cab short box in pale Adobe Mattel. Thanks for checking out the video


All right, welcome to the stream It's Friday I have a bit of a cold so I might sound a bit nasal. Oh That's okay We're gonna be doing We're gonna be doing days six and seven Apparently they're not that hard as day five and maybe even day eight. We'll see how it goes All right, let's get started. How is everyone doing today? So I got my editor open Right here So everything is ready. Let's see what we're gonna do today. Hi little Annie We'll book day six Indeed All right, so we are now going to island island And We're trying to make it snow again. That was our goal Huh, okay. Let's just go directly to the task Uh, you can shift your paper That lists the time allowed for each race and also the best distance ever according to that race Okay, there's a boat race going on. Okay Um to guarantee you win the grand prize You need to be make sure you go farther in each race than the current record holder The organizer brings you over to the area where the boat races are held Uh Boats, okay toy boats big button And holding on the button charges the boat And releasing the button allows the boat to move Boats move faster if their button is a longer But time spent holding the button counts against the total race time uh-huh right You can only hold the button at the start of the race and both don't move until the boat button is released So, uh, the first race lasts seven milliseconds. The record distance in this race is nine millimeters Second race lasts 50 milliseconds at a 40 and 30 Your toy boat has the starting speed of zero millimeters per millisecond For each whole millisecond you spend at the beginning of the race holding down the button The boat speed increases by one millimeter per millisecond. Okay Hello orphan of cthulhu How are you today? Okay, so we're gonna hold it down So it's like an optimization problem basically Aha Determine the number of ways you can beat the record In each race Okay So it's not just about finding something that works. We have to find everything that works Let's see So this is the example module main where Example Equals and then Pump it in and now We have to parse it. Let's grab our parsing code From here Let's see parse seeds, right? um So you can split that length Okay, so we just need to split on function again and let's see we're just going to keep it as a list of pars takes a list of strings And we're just going to keep it as pair of lists or maybe Let's do a list of pairs Okay, uh, let's see. We don't need this So pars strings Uh, let me see what the actual input looks like Okay It's just different numbers Not like A lot more Let's just do this here. Um Oh nice shirt. Thanks a little any Times Equals, okay, so we're going to uh Time split at length Time times and then we are going to uh Drop pile Is space import data.char Is space and we're going to need this digit also Okay, and then we are just going to uh T and s is going to be split on Okay, so these are all going to be Okay, so we're going to drop while is space Let's just do like this. Um Let's uh See what this returns I don't want to spend time on this. Let's just uh Let's just say here example equals Seven nine 15 40 3200 and the input Let's just check it out input It's gonna be uh 56 334 71 71 1335 79 1350 And 99 2430 So for the first one, I think we just uh We don't need this then So if we hold down Let's say total distance So if we if we um So okay total distance Uh, so Hold down time Time And total time Is equal to uh Total time minus hold down time times Okay, let's see Where this is right here this The difference is uh this times So this is how long we Part of the time that we didn't hold down for and then we're just going to multiply that by Hold down time Okay, now let's see do So, um Let's go to hold down time a little bit change with not this one Hold on time. So let's just see what happens Print a map dist So total time here is nine over uh The range we can hold down for zero We can hold up to nine GTO Day six that hs ah, sorry Day six that hs o day six Time day six day six gotta be in the right directory so, uh If we so because the first oh the first race last seven milliseconds Okay, so the total time here is Seven right, so let me get a six 10 12 12 10 6 Okay, now we got to solve some a linear equations um So the derivative So let's write again dist yx is equal to uh y minus x times x Uh, which is equal to this is yx minus x squared And the derivative here dist prime yx is equal to y minus 2x right so We have to solve the equation um So we're gonna now map Let's print that again. So print map This seven just prime zero to seven uh, it's two two times x So this is like the slope, right? Uh, I would be better at this with the pen and paper uh, okay, so dist y x Is equal to zero if and only if and only if a y is equal to 2x if and only if x is equal to y divided by two And we can see that here, right? So it's a zero one two three And then 3.5 right zero And then 4 5 6 7 so um And let's now see dist yx is equal to What was this? This was a y minus x times x um So let's see a dist yx Is equal to zero ah, no, so So now we have the other Is equal to d if and only if y minus x Times x is equal to d if and only if a x squared minus one times x squared plus yx a minus d is equal to zero So now we are solving the quadratic quadratic occasion quadratic quadratic equation And I think this is a b divided by squared of two Something like that a quadratic It's been very very long since I solved this Yes Minus b plus minus Okay, let's copy paste this So we want a b squared minus 4ac Larger than zero for two solutions b times square 4ac equal to zero one solution And if it's less than zero There is no solution and then x is equal to um Minus b plus minus squared of b squared minus 4ac all of that Divided by two times a So I I assume that for all of these This equation works So it's gonna be like a parabola, right? So let's say solve x yd is equal to uh Let's see So the b here is y So it's minus Minus y So we're getting two solutions plus square root of y times y minus four So it's going to be plus 4ac because a is plus 4 times d And then this is all divided by minus two So we're actually going to have a y minus All of this divided by two And that's one of the solutions And the other solution is going to be at uh, okay Now let's uh I think it's curry, right? Oh, so let's just uncurry this function print uncurry solve x Uh map uncurry solve x over example Okay And now it's just complaining that it's uh that it's um These are all integers Let's just say y i di Where y is equal to from integral Uh yi And d is equal to from integral di int load float Okay, I think I might be missing something up um It is minus b plus minus square dot b square Minus four times ac divided by two a Okay, let's write it out again Okay, let's see Uh, it's minus d Uh, it's not plus d Okay, so now we have to be So let's see We have to round up So let's do here c ceiling And floor It doesn't like this Because we want just the positive numbers Okay, and then I think part one Takes in a pair And returns a pair so part one is equal to Where t comma t comma f Is equal to uh solve x p p F minus t Uh, it's gonna be total time and distance So total time and distance print Map part one example Three seven and ten Do we have three seven and ten options? Okay, so first we could go Let's see 10 12 12 10 Let's see I think we're out by one So we get we're supposed to be getting four eight and nine. We're getting three seven and ten We are close though Let's see. We're supposed to just get ceiling here Uh, why do we need the quadratic formula because we want to figure out the total of number of ways, right? What is the distance? No, sorry, this is supposed to be 30 and this is supposed to be 200 No, this is the total time here is 30 And then we just go up to 30 So here we have Exactly 200 Uh, okay, I think it's just in So we're supposed to take the ceiling in both places Uh, but we have an off by one error In case there are inter integral solutions so Exactly. Yeah, we could do that, but we can do this in o one if we have the quadratic formula, right? Uh, which is what we want so, um, let's just do D prime F prime is equal to so x f t t d And epsilon b now we're just going to say L is equal to F minus t so if Yeah, but so what you're saying, right? Orphan is that we should generate all the elements and then check them, right? But we don't need to generate any elements. We we know by the quadratic formula Exactly where it's going to happen, right? Let me see if Let's just plug it in directly, right? If so we have the two solutions here Now, let's see if test t t f Is equal to d then um I don't need this then That plus one else Oh Because then there's like one extra point No, okay, let me just see So we're gonna check we're not gonna check this we're gonna check, um D t is equal to this t t t D f is equal to this t t f Um I think I was correct actually I think we should be taking the ceiling here the floor here um So now we're just gonna see This is the so this is the first element. It stops being that. Okay Yeah, okay If dt equals d So it's gonna be uh f minus t The thing is that a If dt is equal to df then f minus t minus one else f minus t So because they're not different solutions. They are the same solution I think that's the trick So 489 Yeah, exactly Let's uh Let's just see if we are Correct here And I think we might have an off by one error, but I'm not sure Can we We might as well check All right, we did it So the problem was that um You could hold the button for at least 11 milliseconds And no more than 19 milliseconds But that's not really true. So you can you can hold it for 10 milliseconds Ah to to beat it Right, okay So the thing that I missed Is that a We found the solution And where it's exactly 200 but we have to go more than 200, right? Um, so then we don't count It's really just if dt Is equal to d That's the that was the thing, right? So it's not if they're the same It's just if they are Um Because we want to go we have to go further than the distance, right? I agree that the time complexity is better in your solution, but for so small ranges It won't make a significant difference Uh, I mean, that's true But uh Yeah, okay These are not huge elements, right? But I feel like this is the way to solve it. I don't know Because we just have an equation for it, right? We don't need to uh Okay, anyway, we did a part one Took us 40 minutes though But uh, okay As a result of that realize piece of it with a race times record distances Just has really bad kerning. There's really only one race Uh-huh Ignore the space between the numbers on each line Okay See Now it was good to use an equation Example Two So this is going to be seven one five three zero Nine Four zero two hundred It's gonna put a five six Seven one Seven nine Ninety nine Three three four one one three five One three Let me actually just grab it from here Uh, the example one is correct But for the input We should make sure it's correct. Okay So Back to your point. What is it with the time complexity here? Well This is going to take no time at all right print part one example two Because we just used the quadratic formula, right? seven one five three Exactly Now I want to ask you Kuzulu How long did your Part two solution run for And it was it four milliseconds So but you know we have an o of one solution, right?  Well, we did part One part two day six. Ah, that was quite easy And we we did have to revisit the formula We did some calculus But cool Let's move on right away to day seven We are trying to get to day eight today And then we will have been maybe we will have catched up dot. It just Do do do do do Let's see Okay Let me go to We check one thing Do I think it's feasible in cock? a Agdalene. Yeah, I mean It's feasible, but uh, so I'm I'm I'm at Chalmers, right? So I did the Course called types for programs and proofs and it's basically just the agda people That write the agda right under sabel Uh Peter db. All uh, you know, yes, but it was there An oulf norel, right? And he's like, I'm going to show you how to program in agda, right? So we had been doing lots of proofs, but I was going to show us how to program The first thing it does is like, let me turn off the termination check Oh So you can definitely do it, but you have to I mean, you're not You want to be able to run programs that don't terminate or you have to provide fuel or But it takes a lot longer But haskell is the golden median road where Almost every type is inferrable But uh It's still very powerful, right? So you don't have to do You have to don't have to annotate everything wait. All right.  At least someone is paying attention To the grammar, uh, let me see Did you bring the parts a large camel? I was riding a camel in India Like a week ago good times um Let's see Very large rock elf explains rocks desert island normally big machines Receiving the parts Now we're playing camel cards Let's see Wow, don't let the camel people hear you say that uh It is Like an ml variant. They have a nice module system A everything is eager so you don't have to deal with laziness But you also don't get easy laziness everywhere And you have objects. I mean they like it. I don't know When you would chose a camel over haskell But uh You know like jane street That was advertising here earlier. They make a lot of money And it's all written in a camel or a lot of it. So It's practical They like to tease us the haskell paper because we use dollar signs everywhere to to to say You know evaluate everything after this dollar And they're like, why are they putting dollars if we're not making money? Well The thing with haskell is that you don't know that it's haskell because it never crashes. So you don't get this Oh haskell crashed error message But there's haskell at facebook at google at Uh Like uh, ahrefs is there mercurial is there cardano. It's all haskell There's a lot of haskell out there in the wild, but uh Yeah, we like doing more fun stuff Anyway, let's get to it So you get a list of hands and then we build our base of strength Five cards label akqjt 98765432 Okay, a is the highest and two is the lowest Let me just card types equals let me uh okay, so this is a string and Strength takes a char things is equal to So i'm just gonna do a very silly thing find index Sorry, let's not do it this way Cardano gets one update a year because no one knows how to program haskell Well, they are learning I don't know Is it worth it to learn to Program in haskell and then you don't lose millions of dollars on some bug? maybe Let's just write it out to Is equal to zero three two three four five six seven eight nine There's a better way to do this, but uh, I think this will be the fastest t t j q so I could like look up in the string and then find the index all the time But I okay, this might be pretty much your optimum position Bear with me How's the audio quality by the way? Is it okay? I used to have a better setup with like a noise gate and stuff, but It's not working. Let's see. Maybe we can get it working at some point Okay, uh, every hand is exactly One type from the strongest week is they are five of a kind four of a kind full house three of a kind One pair and a high card Okay This seems like a long description but let's see so five of a kind is um Let's do here for data that's set now, let's say Hand to type takes in a string and returns Hand type is equal to five of a kind or four of a kind or Let's actually order it in the opposite way. Ah Yeah high card one pair two pair three of a kind Let's see. So this is just the So hand to type. Let's just say that this is going to be hit hand to type is true is equal to set dot from list string set dot size And it doesn't like this because I already took in the string here so, uh, the idea is that so a If the set size is one like there's only one it's going to be all of them are the same, right? If uh, all of them except one are the same it's going to be The set size is going to be four No, set size is going to be two Uh, but the set size might be like a Okay, we can't do it. It's not that easy but it's it would be nice if we had Let's just do then sort So we sort it and then we we group it and then we We do maximum by Let's see here. Okay, uh compare on No, you have to import data.function On So we can take the length of the maximum by compare on. Okay.  Okay sort by Um, let's do here k sort by of So if it's a map things I think I'm over complicating this a lot, but whatever So if we have a five data hand type Back to the hand types a high card one pair two pair three of a kind full house five of a kind deriving eq show four So if we have this if it's just one group everything is the same. It's five of eight sorted equal sort string right hand to type hand type So this is if I have a kind four of a kind It's going to be four comma one full house is Three two Okay, three of a kind is going to be three one one and two pairs going to be two one and One pair is going to be two one one one and then one one one one one high card Okay, so now let's write and data hand is equal to hand string hand type Deriving eq show So now we're doing instance board hand where compare h1 h2 is equal to hand s s1 t1 hand s2 t2 is equal to t1 is equal to t2 then Can you compare lists? Let's see. Um Okay, you can just compare the list then compare map else Let's see. Um Let's see equals compare t1 t2 in if case compare t1 t2 of eq Let's see if any of this even compiles Okay compiles. Let's see because uh t hand type so if I compare high card with two pair Then I get that high card is less than two pair, right? because The derived or instance is just makes so that first ones are less than the latter ones Okay, uh and hand string Now let's write in the example here and let's just pair us Some parsing again Actually, I think we should parse Because I'm guessing the input is a lot longer a lot more hands Sometimes this happens. I don't know. I think the editor gets caught up in some wrong state okay, and far as example it's gonna take three is gonna be taking a string to hand comma bit int parse entry as stir is equal to uh hand comma bit split at five equals to two hand instance read hand where read and I forgot how to do the read instance. Who go read instance read say read at hand Let's set the right language here uh print print do print map parse entry example Okay, we parse the hands Now let's see what we are supposed to do But at least we know how to compare hands as well five hands, okay Each hand is followed by a bit amount each hand wins an amount equals to this bit multiplied by its rank weakest hand gets rank one secondly gets rank two Okay, so let's say sort by compare on first So three two are first KT JJT gets rank one rank two and KK 677 gets rank three and Okay, so it's in the right It's in the right order Okay, so part one is equal to um sort by compare on first dot map parse entry Okay, and then we are going to uh sip sip with one Okay, so if we can take the id and we can take that we don't care about the hand We care about the bit So now this is going to be the uh list of numbers And then we sum it up right 6440 nice Let's make an input file Let's see Read file input To print dot part one at our lines Okay nice Day seven part one is there Now to finish part two Let's see what happens Okay, the elf and it is one additional rule. No j-cars are jokers While cards I can act like whatever card Would make this hand the hand the strongest type possible Oh j-cars another weakest Okay, let's just re-implement this card strength two three four five six seven eight nine Okay, so now to get the hand type We're gonna have to We're gonna have to mix it up a bit more a hand to type two Okay, so if they are all the same There is nothing We can do so first of all where So let's just make some cases based on the number of a number of jacks In it. I think that's easiest where Let's see Where nj is Is equal to filter is equal to j length stir What is that function because not span it's the Partition right not j's and j's is equal to partition and um J's is equal to length j's Okay And now we are going to say ht Non-j Groups okay String okay case Num js is equal to zero is equal to case non-j groups of Okay, if Mjs is equal to five It is simply um Gonna be five of a kind if numjs is equal to So these are the base cases right now if there's one Then we're just going to do like this It's gonna be Four so if there's four of anything It's gonna be five of kind There's three of anything it's gonna be four of a kind If it's two we can add the jack to either of them to make a full house If it's two one one it's going to be three of a kind um And there is no high card Okay, so if it's a one one one we can add one one one one then we can have a Hmm Let me see If there is a j We're always going to be better than a high card So yeah, so we would never make a two pair because We could always make a three of a kind here Okay, that's for the two k one case So for the two if we have three we can have five of a kind We have two we can have four of a kind And if we have one one one we can get three of a kind And that's always the best, right? We're never going to get a full house because then we would have done Uh, we would have done four of a kind So three Again, if we have two of it, it's going to be five of a kind If there's one one We're going to make four of a kind Okay, uh if it's five or four It's going to be five of a kind Okay, I think this will work now, um Now we have to do the compare again compare two Takes a Sting to a string it's going to take a hand String comma hand Hand type string comma Hand type to Ordering Compared to is equal to a s1 s1 t1 s2 t2 We have the same thing again, uh case compare t1 t2 off eq Compare compare map card strength to t1 no s1 map card strength to card strength to s2 Otherwise, it's just x2x now, uh, then mop So we're gonna we're gonna parse it a bit differently We're not gonna say read in that hand. We're just gonna say, uh hand hand hand to And then this is going to be enter type two hand and here we're parsing at two okay, and And now we're going to say sort by compare two on first map parse entry two Let's see a hand print part two Okay, non-exhausted patterns in case Let's see Now we're putting debug dot trace Okay, so here we're in that two case and it's a trace show Oh, sorry This is This is supposed to be njs. Oh, okay I just messed it up here. This is non-js Trace show id link j sort non-js Okay, now it's correct. This is how I debug has to go by the way. I usually just Pop in a trace show id in there And uh Unless you're working on really big code bases it it works quite well Let's see boom Day seven done Not bad One and a half hour for two days That's uh That's good so let's See and move on right let's see if how far we get with two days Admin of code, but give me a break. I'm gonna have a little sip of Water I'll be back in two minutes We got some water Let's do day eight We're on a roll Okay, you're still riding a camel across desert island when it's but a sandstorm Okay ghosts Interesting uh one on camel's pouch is labeled maps. Oh my god This is gonna take a while Um And how to navigate a desert at least pretty sure that's what they are One of the documents contains a list of left right instructions the rest of them seem to describe some kind of network of labeled notes It seems like you're meant to use the left right instructions to navigate the network Perhaps if you have the camel follow the same instructions, you can escape the haunted wasteland A and Z Okay, so a You look up the next element based on the next left right instruction your input Start with a and go right By choosing the right element of a C Then l means to choose the left element of c z So then you choose said Of course, you might not find zed zed right away If you run out of left right instructions Uh repeat the whole sequence of instructions as necessary rl really means Here's a situation that takes six steps to reach said zed zed Starting at a How many steps are required to reach said Okay We got a lot of input if you get at the 700 s day eight Eight touch the eight dodges Touch input Okay, let's just paste the input and let's Example one and let's make Example two Okay, what do you mean? Paris, let's just have the example here On the side To read so parse It's going to take a string Don't list the strings And it's going to return something we don't know yet parse, okay, so first is the path And then empty and then the rest path empty notes So the path We are just going to It's going to be a list of booleans and the notes are just going to be Um string Actually, I'm just going to be clever right away. I'm just going to say int Incoma int so First one here is just going to be map fc kc of l True. No r is true l is horse path And then where notes equals main io do print read file Example one Into print dot parse Dot lines Let's see. Okay. So we parse the first one. So the notes um So for the notes we are going to parse node parse node stir So we saw from the input that they're all they're all three of length three So we are just going to count on that and we're going to say, um uh node and rest is going to be split at three string then we are going to jump over the this part split at three rest Actually, this is all this part and then we're going to say so the left node And then the right node but in between is going to be I'm going to take these two equals uh and l n and then Okay, we're going to say map uh map PS parse results is going to be map parse node nodes Okay, now We are going to say, um I I just want to I want them to be integers import qualified data dot map as map import data dot map So now I'm going to say a Key map is going to be hot from list sip map first PS And then I'm just going to map look up all of them and l n all right So it's going to be key map key map Okay, it doesn't seem to work Uh because this is actually four characters Okay, now I have the list of nodes and then I want um I want to know where a set set set is And I want to know where AAA is Okay, so you're just getting some messages Okay, so now we have the instructions we have the map This should actually be a an int map It's just easier that way And then we can just um Look it up directly So now let's say, um Part one so, um So path Uh nodes AAA Is equal to uh parts Okay So let's see, um There's a function called cycle Where we can just actually We just say go cycle Path And we're just going to say the current one So go So this is the p in the ps and it's never going to run out Because we cycled it current node is equal to And we're going to say zero current steps so case a current node is equal to set set set It's equal to current steps otherwise otherwise Is equal to if p then So p was Ah, we want to take the I want to take the first one. So I'm going to have it left and right here If p Let's see So then we're going to say, um mapim.bang current node Helen Okay, if p then um Go ps steps plus one left node and I should really uh I should add bang patterns here Because I really don't want this to build up Okay, uh ln if p then ln else all right read file for example one Some haldi milk It's good for health So what's going to happen is that there's going to be loops And It's going to take hell along if I'm going to follow all our loops so print dot So what we want to do is we want to figure out the length of a loop um And then kind of jump over that in the stream But let's see I wonder if we're in a loop Yeah, anyway Let's see what happens So two steps six steps Let's just test with the input, but I think you know, we're gonna probably need some cleverness here Okay, maybe not for part one all right day eight Part one done No cleverness needed. We just made sure to Do it efficiently within maps So haldi milk is this indian thing I think it's a turmeric And milk it's warm It's good. Let me see. Okay day eight Okay, let's see You had the camel follow the instructions, but you barely left your starting position Oh no, you start at every note that ends with a Let's see This is gonna be a pain But let's see if we can make it work um So now we are gonna We're gonna do the same parts But instead of just returning these two, we're gonna return the list of all a notes And list of all b notes or said notes And it's gonna be A list of ints And this will be a list of ints Okay, and Let's see, um No names Is it gonna be filter? let's see Okay, so this is gonna be a notes map key map parts two dot lines Let's see So there's zero and one three. Okay So these are correct I'm actually gonna make this a set an int set And then for part two So the trick is we don't actually need to Like so maybe for some of them we're gonna end up Being at the same places at the same time So what we're really really doing is So uh cur steps pps cur notes That's our cur nodes Uh, so we just want to check if these are the same set Oh, no, we want to check if all of them basically if if I remove All the empty nodes If I remove all the set notes from cur nodes, I want an empty set otherwise They should also be paying So not go is just doing the same except it's transforming a set instead of I want to map the set I don't think there's a way to do that directly Okay if p then We want to take all the left nodes if p then uh cur nodes iris hot map let's see if p Then I want to take so I'm gonna take in the key here and if p Then I am dot bang nodes Cur node Let me see So I think I can write it like this I am I am dot bang nodes and dot and then if p then fsd else snd Let's see Okay works for the example Let's see if it works on the input Yeah, there's gonna be some looping stuff and It's probably gonna be a case that Like some of them will be in a loop So we don't have to do them Let me check the memory use I was not leaking memory. So It's just doing its thing Let me see Cur nodes prime It's like this How is aoc going? It's going great Eric wassel you are the creator, right? I'm trying to solve day eight now I started a bit late So I did day one two and three then day four and five And today I did six and seven but now I'm done day eight part two and The brute force solution is not working Even though it's quite Efficient Haskell Yeah, there's gonna be some loops and stuff. I'm trying to do like a whole set of numbers at the same thing time And it's It's not doing the thing So Let me just see how many nodes am I doing at the same time Trace show Is that size Cur nodes prime This should be Let's see So I'm not just doing six nodes at the same time So it's not that there's a huge number of nodes Maybe I should Yeah, I need to Bug in ghc Do you remember who it was? Because that's funny. They must have been doing like Some type level stuff Let me copy the address look at it while it runs Hey, that is Ah in the standard lib running a password data format integers Ah That's funny I didn't run into this because I uh I split it Definitely Very nice Yeah, this is like the the read instance is just Ah Very cool. It's fun too I would have thought like, um You would have think you would have thought that something like this would have been found way earlier, right? But I guess that like all the production people they don't use the Read instance, right? They will use like a proper parser like mega parser or something like that So It hasn't showed up Yet Okay, let me Delete this Should not be printing anything out Yeah, okay, so So this checks if all of them are set nodes At the same time And we're mapping like six There are six a nodes and then we're mapping them all We're mapping them all at the same time Yeah, I'm not but I think it's it's been a very fun Advertisement code this year Like day five part two was a bit hard Because I mean it wasn't like It wasn't like oh, I need a good data structure here.  So it just works quite fast but And day seven was nice also But day eight part two is currently Stepping me Yeah, I'm Looking forward to the rest It's been fun. I remember a couple of years ago It was very hard at Haskell because you You made this puzzle where you had like a Virtual machine or something and you were constantly running code and instructions on the machine And then you would have the machine Modify. Yeah, exactly endcode. It would like modify the code itself Yes, 2019 and It was very hard in Haskell because you had to like To make it deficient you needed to use like the state monad to kind of be able to Mutate the data structure efficiently, right because you couldn't just copy the whole thing With a one change in it Uh And I had a lot of fun with it, right because there was a lot of Like efficiency hacking in Haskell So far, uh, this year it's been very Like there's no like oh, this is super hard in Haskell would have been easy in other languages But I'm excited to see Where it takes us I like the The lore this time is a bit funny. No We're trying to get snow. So then we went to get sand Then we took an airplane Surprisingly easy in Haskell I mean some of these are very nice in Haskell like, um Like day seven for instance, right? So after I put it in the right kind of data structure You know the actual solution is just You know sorting on the right operator and then multiplying And then taking the sum and that you know, I always like it when it kind of comes down to a very simple one-liner like the actual solution after you Put it into the right data structure but So the thing is that I don't solve them in other languages in Haskell so I don't I don't know how easy things would have been like oh, this would have been super hard in python But I like it It's a lot of fun to be able to also play around with Haskell right because it's also a perfect It's the perfect size of a project to play around with right because you're not going to be writing 10,000 lines of code for one solution right you're writing like a thousand lines of code at the most usually like 200 or 300 And Haskell is a great language for exactly that length exactly No, but it's been a it's been a lot of fun And I've streamed since 2020 every year I stream Advent of code in Haskell I think I've never finished though because I usually so I live in Sweden, but I go I when I'm from Iceland So I go home to Iceland around the 20th or something like that and it's it's very hard to Stream and keep up because at that point also you're not spending like an hour you're spending like three or four hours usually for me and that's just It's a long stream right it's a long time to just be sitting there programming and looking into a camera and I think it's It's been very successful. I think everyone's having fun um Especially in the fb community. There's a lot of people doing it in Haskell A lot of people Doing it in okamal But I think it's because we like these Simple problems because you can kind of make it very elegant But you can also make it And like you're not You don't have to deal with like factory factories and kind of stuff that crops up when you have to do huge programs, right? Yes Well, let's say I think I need to do something different here It is for sure Not finishing the good thing is that it's not eating No, I it's not eating up memory. So if I keep running this it will finish eventually Yeah, I'm doing part two of day eight Right now um So part one was quite nice You just follow the instructions, right? The title loop And then I thought ah Maybe I can do the exact same thing in part two But use This set right so instead of saying Uh map this number and then check if you're at the other number I say, uh You know map this set of nodes And see if you reach the other set of nodes And the nice thing about that is that if at some point the set gets smaller Then you know, so we might be running like a hundred a nodes at once and then they kind of coalesce And they could get into the same nodes And then it should be smaller and then it should just work But uh it's not It's not fast enough It's been running now for Yeah, five minutes 10 minutes Now exactly that's but you know, so you had this discussion with the because we don't talk too much to the Like the object oriented community like the fp community and the object oriented community are not They don't talk too much together And But there's things that we could share right like things like Like where do you put a function right so in the object oriented world? You just put it in the object any kind of works But for Haskell, you know, you see you think like do I put it in this module? Or do I put it next to the data definition or do I put it next to the use site? Um And in object oriented Like in the object oriented world they have long dialogues about this and like the sign Patterns and stuff like that, but for us we have we don't we don't have that discussion so But we are starting to have it so it's going to go good. Let me see Okay, 10 minutes. It didn't work Common denominator Yeah, that was a little bit of a spoiler But let's see A Uh-huh, okay, so you can see here in the first one that So 11a it just goes 11a And then uh-huh Now I get it Thank you Eric. Thank you so much for making it. I see but I figured this out. This is the Chinese modulo theorem You need to figure out the length of all the paths and then You take the module off the here stuff Ah, that's good And Okay, let's see so Part one Let's see then. Okay, so let's change this up Because now I'm like simulating it until I hit the thing but Yeah, the common denominator is a good Good way to do it So let's see part two I'm just going to copy that part one go again Okay, and Let's see So Okay ALs x equal to And map go Path zero ALs IS dot member Let's see what this one does two and three And what is it for the input? Okay So the least common denominator between all of these So the so I think if I have it correctly, right? So I'm going to finish it and then see what happens But I think the idea is that so so Let me just check the least common denominator Chinese remainder theorem Do do do do do do do do do So how how does it work? Okay, so the idea is that Like for this one It gets into a loop right so One two one two one One two one two one two, okay And then so but they don't match up here, right? So it's easy if you have two numbers You just multiply them together But I think you need like the Chinese remainder theorem for more than So you need to find a number That is a multiple of all of these numbers Find a number that is a multiple of many numbers Yeah, so this is the LCM and So it's the least common multiple at least common multiple Yeah, so the okay exactly Hmm. How do I need to factor? all these numbers let's see factor int factor n Is equal to So I'm just going to make a super slow version Haskell has LCM in base Right, but this is not the Go so go of empty is equal to n Go of Factor factors is equal to if n mod F then F d F factor qj e d8 else go of us factor 21 factor 30 Okay Let's see I think 307 is the least common multiple here Yeah, it works That's exactly the point orphan is the same as with the quadratic thing, right? It It's not wrong It's just not It's not Yeah, it doesn't work well enough So here I think now we can take the Factor each number and express it as a product prime number powers Okay Let's see Product times 307 Let me see We finished day eight Yeah, so that's the thing right the solution here is It's not wrong Right, it's that is it's not the case that is wrong It's just not efficient enough right because we're Looking looking looking looking looking And this number here is quite big It is a 12 trillion That is crazy big So the trick is here that let me see LCM of a list of numbers LCM is equal to Okay, so here we're gonna first so we map the factors and then we Okay The highest power Of each prime number together Okay, so we have the factors and then we need to We group the factors DDD Now this is gonna be Multiplying the highest Is that is that it? Ah, okay Apparently you don't need to factor or anything like that. You can just Fold our LCM Which makes sense. You find the least common multiple between two numbers and then That number and lists. Yeah, so you just keep going Okay, cool. You don't even need to know the base case, right? But all right, so Now we've done We've done everything there is so far I push the code to GitHub you check it out there and I kind of like this solution I went with the naive one first Uh, it's way too slow because it's like 12 trillion Operations, but I kept saying uh You know, there's going to be some loops, right? So but then P cook or the I don't know how to pronounce that username Uh, suggest that the least common multiple and It worked and it makes sense, right? Because you they're all going to be in a loop because the Instructions are cycling anyway, right? and then you just kind of figure out um When like how many steps would you have to take so that they all happen to be in said at the same time? so one thing that I think messes it up a little bit is that um so the the the The reason this works is that I think they're all going to different Seds Right, so for instance if I if this said here Would link to this said here that would then link to this said here again, right then After you've taken a certain amount of steps You would just be looping between sets, right? You would not be going back to the start Uh and going around around there, right? Especially like, you know if if you take enough steps and then one of them just stays in said, right? Um, then you don't have to find the least common multiple for that one because that one is always going to be in said afterwards It just so happens that they're all kind of looping and I think it's because Eric who showed up the creator of the code You know, he makes it so that you can't do these things to make it work but I I'm not I think we should read the um I think so I think it I think it would be messed up If you could if you had these weird kind of notes, right? But we didn't have that this time So the least common multiple works Okay, thanks for showing up um The video for day four and five is live right now I set it for 11 This one will be a live live In 24 hours And I thank you for joining. Thank you for Helping out. I probably would have worked two way too hard on this least common multiple thing And uh, yeah, see you tomorrow when we do day nine On day nine of vitality code. All right. Thanks for today. Okay Bye. Bye


Wel i chi'n gwybod y TV oedd yw'r reisio cystrym ym Mhysgol Palais 2, Everton 3, yw ychwanegau gwirioneddau i Everton i'r ddechrau. Mae'r wyng o'r cyflwyng ar Everton. Si'n siŵr, a'r llunau yma, a'r llunau'r ë7 yn y Llywodraeth Prif Weinidog, ond ac yn gyffredig, a'r llunau'r llunau byddwn i'r ystyried i'r Llywodraeth. Ond mae'r llunau'n ffordd i ddweud, yn fwy o'r llunau'n llunau, a llunau'n llunau'n llunau, ond mae'n ddweud o'r llunau, ond mae'n llunau a'r llunau a'r llunau'n ddydd i'r llunau. ac yn enwedig o'i ddweud y byddai i'ch gweld cyfaint, a mae'n cael gweithio'r cydweith. Ac mae'n teimlo'n gwell i gael! Mae'n gwell i'w gwell i gael. Mae'n gwell i gael am y dyfodol, a mae'n gweithio'r ffitnessau ysgol. Felly mae'n gweithio'r ffitnessau'r gweithio ar gyfer drysgannau gweithio, mae'n credu'n gweithio ar gyfer hwn. A mae'n cerddol i bod ymddangos cyfotzir. Mae'r gweithio'r gweithio ar gyfer hynny, Jack Harrison, great ball across, and Vitaly Michalenco in the right place to plant a heather past Sam Johnston and give Everton the lead, his second goal in two games for Everton, incredible. A brilliant start and it was can we build on it and my mind at that moment switched to brightening away, thinking always it's going to be one of those days, but no Everton had the palace got on the front foot immediately, and I run into our box and shlup dived, Tarkovsky went in with him and he ends up diving, with the referee really should have had a word with him for, but it was a lead off for Everton was how quick they attacked the box and it was a warning we didn't heed, I've had a minute later as he gets the ball, goes past some of our plays far too easily and goes into the box and Jarrod Brantwick really, the first bit of inexperience defending. I think I've seen from him since he got in the side today and since he got back in, you know coming back in the Everton side dangles a leg out and as he doesn't need much encouragement to go over the leg let's leave it at that, but he did, he connected with him, I still, this is where I struggle with the IR, this is why I was delighted with our teters out based when I've seen what happens in Everton games, like last week against Brighton we were manhandled twice in the penalty area and we didn't get a penalty and today as he, a little bit of contact and he goes down, but listen if the contact was there the ref chose to give it and the IR backed him up, as he stepped up and pick for the move, he just put it in the corner, it was one one, and then it was a case of can we hang on or can we dig in, can we get back on the front foot and I think it knocked us side with a little bit in that first half, certainly that first 20, we did start having our moments again, we'd given the ball up a little bit to Palace but we had no issue with that and we had moments where we got in good areas and once again Dwight McNeill had a volley which was straight at Johnson and he calls him any problems, Dom looked like he might get on the end of another Harrison Cross could defend him from Ward and we just didn't, we just couldn't get any real, real rhythm going in and around the penalty area, we were going forward, we were trying to carve opportunities, they were on the front foot very much so, but Everton, Everton done quite well and Palace almost well thought he'd had a second penalty again as he, brilliant say in cent own arm of the team, he came back inside and then did dive over Brantwight and tried to win his team another penalty, he was booked on this occasion correctly, but went in at one one, neither side had really tested the goalkeeper to any kind of level, it came out second half on Palace, I thought, you know, Everton made the change or he had the break, I'm going to do it now and I went off, Adrisha Garnagay came on, but I thought Palace got on the front foot straight from the kick off, Everton, I think we can see the too much of the ball, too dymelion, in that, but we did break and we did get in front and we had the ball on wide and come back to Adrisha Garnagay, I want to say it's a tremendous clipped pass to Michel Enco, he passed it to Michel Enco, it's even there, Michel Enco struck a good shot which unfortunately hit the inside of the post and comes back, but Adelaide Acoreo, I didn't think it was having a very good game at all, up until that point is on hand to do, the thing he does better than anything else he does was on hand to side foot Everton back in front, the thing with Acoreo is, and we've seen it a few times, he's awkward on the ball at times, he makes, sometimes he makes the simple thing look difficult to do, yet he does work, he works incredibly hard for the team, he's obviously, he's an important player for Everton, there's no doubt about that, his goals are huge for us and he come up with a big goal there and put us back in front, and then Palace did what you would expect, they got back on the front foot, Everton, I think at one stage in that second half, we had given, they had 80%, that 80% figure again, we did have to dig in, and we had a couple of moments, there was one across which he did it again, it hit him on the shin I think, and went towards our goal, Joven Pickford made a good save to keep it out, but Palace did get level, a ball, and a knock hubus ball there, he back into the box, and James Tarkowski normally deals with stuff like this straight forward, normally will just plant the header away, there's some reason, he just let the ball go, and Otterson Edward, who we'd singled out as the danger man this week, on the matter preview came in behind him, and just took a touch and put it past Joven Pickford, and at first I thought Pickford must have shouted for Tarkowski to just leave it, but Joven Pickford's reaction to me said that he didn't shout, he sold Tarky, he wasn't best pleased, and again, the real frustration in that, and this was that, we'd worked hard to get in front, and we just handed them a goal, the same as what we did obviously in the first couple of minutes, we got in front and then just handed them a lifeline with a poor decision, and our centre backs are being outstanding for weeks, but two big errors from them today had got Palace 2-2, and I'll be honest at this stage, I did feel like the momentum had gone the other way, and we may well end up losing this game, I think just Evan have been so fragile for so long, but the one thing Sean Dyche, Ian Wong, Steve Stone are doing, is building a stronger mentality, the quality's not always there with us, but the work rate and the effort is, I couldn't have a go with any player for not putting the shift in, and we went again, and we got an absolutely, it was a brilliant goal from Patricia Garnagay, the move was brilliant, and Gay picked it up, a ball, a nice little ball inside, picked it up, plays it off, to add the line of the corner, he slides it back into Patricia Garnagay inside the box, takes a touch across the defender, knits it back into the other corner, to give Evan a 3-2 lead again, third time he led, and then it was a case of can we hang on, we get to the 90 minute mark, and the referee, or the fourth official Anthony Taylor, who somehow is still around, it puts up the ball for eight minutes, which is obviously no nail time, isn't it? And we had to dig deep and be resoluting that, and Pallas did, he did put us under pressure, but we had a great opportunity to kill the game, and Beto got played in, and he's fired it across the keyboard to the far post, he should have really scored, or he would have been lovely had he had scored to just kill it. Pallas Dent still had time to win a free kick in a dangerous position, but luckily for Evan, Alicia Skyrd, it was a terrible free kick in a dangerous position, basically the last kick of the game, and it was out, and Evan had won the game 3-2, we saw a late sub from Nathan Patterson, he got on in the 90th minute, I think it was, Beto just mentioned he came on earlier for Dominic Calvertloon, but a big win, a huge win, Evan, now just two points off, ninth place at the time of recording this show, you know, they've got a gap now, I think it's eight points from the bottom three, and it's a case of starting to look up, there's obviously the independent commission, I think we might hear from that this week about what Evan's punishment, if any, if they've been found guilty is to be, but Evan have put themselves in a really good position, and it's time we started looking up, big win today, maen nhw'n ddim atio mi, Vitaly Michalenco, I thought Tarkovsky had a really good game, but the mistake, I can't allow for that mistake, it was really poor, but Michalenco to, you know, second goal, and we thought he stuck to the task, worked really hard, he obviously hit the post for Evan's second goal as well, so he is my man of the match. Right, that's it from me, thank you for watching, make sure you give the video a thumbs up, subscribe if you haven't, have a great weekend, see you later.


Good morning, John. We're gonna do Nuance today. It's the internet, so I don't know how this is gonna go. I recently had a tweet go viral. No, not that one. Or that one! I've had a lot of tweets go on viral lately. This one, it's a quote tweet of a tweet that referenced an infographic of coal use in the UK over the last eight years. That was the sentence. And my response to this, like, very good-looking news was, like, we can do this! Except slightly more vulgar than that, because it's Twitter. And when you've only got 240 characters to work with, you have to be more attention-grabbing, one might say, maybe a little more vulgar, more outraged. But that's a topic for another video. My point is that we're facing a climate crisis, and a lot of people talk about how, like, the solutions are impractical or impossible, but we can do this! Like, look, the UK used to be, like, the center of the universe of coal, and now there are some days when they don't produce any coal-fired power at all. So we can do this, or can we? Here's another graph. What really hit coal in the nuts in the UK was natural gas. And this is great because natural gas is a cleaner fuel, and it also produces less carbon dioxide per megawatt of energy produced. Like, we would produce way more carbon dioxide in the US if there weren't suddenly a bunch of cheap natural gas. That's kind of putting coal out of business. Now, obviously renewables like wind and solar are part of this as well, but natural gas is a really important bet. And the reason that natural gas got cost competitive compared to coal is hydraulic fracturing, or what we call fracking, which is in environmental circles considered to be universally a bad thing. And, like, it is bad. It's bad for local environments, it uses a huge amount of water, it comes with the risk of spills, it impacts wildlife, there are potential health hazards, and if done poorly, methane gets released into the atmosphere, and methane is itself a greenhouse gas. But then again, natural gas is also a really good complement to renewables like wind and solar that don't necessarily track their power production into when the power is needed.  In the long term, there are other ways that we might solve this problem, but right now, natural gas is a really good way to solve it, and it makes the transition to renewables much easier. Now, there are regulations that can decrease the potential negative effects of fracking, but there are no ways to completely eliminate the negative effects. It's just not a possible thing.  The ways that we're going to mitigate that problem are going to, in themselves, have environmental impacts. And that's not necessarily a super comfortable thing to think about or talk about. Of course, in a form and a video, I'm not going to decide whether fracking is, like, ultimately good or ultimately bad. I think that that depends on how and where it's done. And it's also obviously not a long-term solution. It's a bridge to get us to the future we need to be in. I just think it is far too easy to create a villain that is, like, sort of standing in the way of some magical solution that isn't really there. But this transition, while it's going to take a long time, has to be done as fast as possible. And the fact that coal, in the last ten years, has become an economically unviable way of making power, at least in America, is huge. It is very good news. And it is something that was largely brought to us, not entirely, but largely brought to us by hydraulic fracturing. That's something that I, the guy who is often, you know, like, mad at all fossil fuels, have to think about. And, like, include in my worldview and in my imagining of the path forward out of this mess. John, I'll see you on Tuesday.


Well, Bill, we would just want to thank you again for really an inspiring and insightful presentation and for the great discussion afterwards. And I think there's just an enormous amount, I think, what we'll be seeing the community doing on the basis of cancer genomics efforts, like these. And then Ilia and I really want to thank, again, everybody who's contributed to make this meeting possible, first, the speakers and the people giving posters at the meeting, the work of the TCGA program staff, Brad Ozenberger and Ken Isha and Julia Zhang for her work on the meeting. Special thanks to capital consulting, to Josh Shapiro and colleagues, and to the excellent AV support from River West. Thanks to everyone in TCGA for their hard work on the project, and I think, as Dr. Varma said, people really putting aside their egos and their personal interest to really advance this project for the community, thanks to the leadership of the National Cancer Institute and National Human Junior Research Institute, both now and over the years in conceiving and continuing the project. And then finally, thanks to all those cancer patients who've participated in this study by sharing their tissues with the whole community for the advancement of cancer research. So again, thanks for your participation, and we now close the meeting.