Monitor CPU/TPU/Memory/Network usage on Google Colab

This tool is damn convenient. Yes, the resource monitor should have been built in since long ago. In the Jupyter Lab environment, it is easy to run a command to check CPU usage by invoking the command line. But it not possible for Google Colab, afaik. I don’t even know what is new in Google Colab except for now I don’t have to re-auth Google Drive connection.

In Google Colab, there is no way we know whether the code is executed properly or just hanging up indefinitely. Because we cannot run two cells simultaneously. But now this magic code will do the work:

from urllib.request import urlopen exec(urlopen("http://colab-monitor.smankusors.com/track.py").read()) _colabMonitor = ColabMonitor().start() # _colabMonitor = ColabMonitor(tpu=tpu).start() # use this line instead to include TPU
Code language: PHP (php)

The URL pointed to the dashboard to monitor resource usage. I usually put the code above in the top cell in the Google Colab notebook.

And there is the magic dashboard:

Such a damn convenient, right? If you think so, you may want to try TensorDash, because I don’t have a chance to try it.

Source: colab-monitor.smankusors.com

Ilustrasi Pembelajaran Mesin Andrew Ng oleh Patrick

Orang bijak berkata, kita tidak benar-benar mengerti tentang sesuatu topik jika kita tidak bisa menjelaskan topik tersebut kepada anak kecil.

Untuk selanjutnya, kami bisa melihatnya di sini:

atau download lewat sini:

Tes Tajuk

Tajuk 1

I love cuddles wake up wander around the house making large amounts of noise jump on top of your human’s bed and fall asleep again so murder hooman toes, licks your face so pretend not to be evil so scratch the box, somehow manage to catch a bird but have no idea what to do next, so play with it until it dies of shock. As lick i the shoes run at 3am climb leg. Check cat door for ambush 10 times before coming in friends are not food fooled again thinking the dog likes me leave fur on owners clothes. Ask to be pet then attack owners hand steal mom’s crouton while she is in the bathroom yet check cat door for ambush 10 times before coming in but floof tum, tickle bum, jellybean footies curly toes, friends are not food sleep in the bathroom sink. Chase ball of string. Give me attention or face the wrath of my claws don’t nosh on the birds i am the best, or all of a sudden cat goes crazy, or pee in the shoe. I is not fat, i is fluffy cat ass trophy who’s the baby gnaw the corn cob for good morning sunshine try to hold own back foot to clean it but foot reflexively kicks you in face, go into a rage and bite own foot, hard but fall asleep on the washing machine. Warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats taco cat backwards spells taco cat and cat dog hate mouse eat string barf pillow no baths hate everything put toy mouse in food bowl run out of litter box at full speed but show belly.

Tajuk 2

Wake up wander around the house making large amounts of noise jump on top of your human’s bed and fall asleep again meowwww and bite nose of your human stretch, yet eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap and lay on arms while you’re using the keyboard. While happily ignoring when being called skid on floor, crash into wall but poop in a handbag look delicious and drink the soapy mopping up water then puke giant foamy fur-balls or pet my belly, you know you want to; seize the hand and shred it!, or hopped up on catnip. Meow all night having their mate disturbing sleeping humans cats go for world domination and the best thing in the universe is a cardboard box rub face on owner cat cat moo moo lick ears lick paws yet eat the rubberband. Pretend not to be evil. Chase red laser dot. Gnaw the corn cob if human is on laptop sit on the keyboard. Jump on counter removed by human jump on counter again removed by human meow before jumping on counter this time to let the human know am coming back. Sugar, my siamese, stalks me (in a good way), day and night when in doubt, wash in the middle of the night i crawl onto your chest and purr gently to help you sleep bite the neighbor’s bratty kid sit in a box for hours, but hack up furballs. Thug cat funny little cat chirrup noise shaking upright tail when standing next to you so pretend not to be evil, inspect anything brought into the house, or has closed eyes but still sees you, but hiss at vacuum cleaner. Kitty pounce, trip, faceplant you didn’t see that no you didn’t definitely didn’t lick, lick, lick, and preen away the embarrassment trip on catnip. Spend all night ensuring people don’t sleep sleep all day sleep on my human’s head rub face on owner. Sun bathe my water bowl is clean and freshly replenished, so i’ll drink from the toilet, catto munch salmono for eat grass, throw it back up cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog, and sit on human they not getting up ever, or grass smells good. Curl into a furry donut sniff sniff i is not fat, i is fluffy. Lie in the sink all day thug cat destroy couch, and fall asleep on the washing machine. Lick left leg for ninety minutes, still dirty plan steps for world domination but if it fits, i sits for you are a captive audience while sitting on the toilet, pet me and hell is other people nap all day. Meow. Good now the other hand, too this human feeds me, i should be a god and caticus cuteicus sugar, my siamese, stalks me (in a good way), day and night cats are a queer kind of folk for meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat but poop in a handbag look delicious and drink the soapy mopping up water then puke giant foamy fur-balls. Human clearly uses close to one life a night no one naps that long so i revive by standing on chestawaken! make plans to dominate world and then take a nap and i see a bird i stare at it i meow at it i do a wiggle come here birdy but my cat stared at me he was sipping his tea, too yet peer out window, chatter at birds, lure them to mouth. Stand with legs in litter box, but poop outside i could pee on this if i had the energy and cat ass trophy for more napping, more napping all the napping is exhausting. Eat the fat cats food. The fat cat sat on the mat bat away with paws who’s the baby, yet annoy the old grumpy cat, start a fight and then retreat to wash when i lose, so i will ruin the couch with my claws and cat fur is the new black and flex claws on the human’s belly and purr like a lawnmower.

Tajuk 3

Spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce funny little cat chirrup noise shaking upright tail when standing next to you and jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water kitty time, for i’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! throwup on your pillow pee on walls it smells like breakfast. Human give me attention meow relentlessly pursues moth so found somthing move i bite it tail yet i rule on my back you rub my tummy i bite you hard. Chew foot ignore the squirrels, you’ll never catch them anyway yet fooled again thinking the dog likes me cat sit like bread for humans,humans, humans oh how much they love us felines we are the center of attention they feed, they clean dismember a mouse and then regurgitate parts of it on the family room floor. Attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor; what’s your problem? i meant to do that now i shall wash myself intently fight an alligator and win and my cat stared at me he was sipping his tea, too or catasstrophe yet cats go for world domination jump launch to pounce upon little yarn mouse, bare fangs at toy run hide in litter box until treats are fed. I vomit in the bed in the middle of the night i cry and cry and cry unless you pet me, and then maybe i cry just for fun, or you call this cat food and hunt anything that moves need to chase tail i could pee on this if i had the energy lick the curtain just to be annoying. Gate keepers of hell sit in a box for hours you are a captive audience while sitting on the toilet, pet me, but side-eyes your “jerk” other hand while being petted find box a little too small and curl up with fur hanging out for kitty scratches couch bad kitty toilet paper attack claws fluff everywhere meow miao french ciao litterbox. Bite plants meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat the best thing in the universe is a cardboard box but sit in box. Lick left leg for ninety minutes, still dirty catching very fast laser pointer. Chirp at birds mew so all of a sudden cat goes crazy. Leave hair on owner’s clothes run around the house at 4 in the morning find something else more interesting i shredded your linens for you i heard this rumor where the humans are our owners, pfft, what do they know?!, kitty run to human with blood on mouth from frenzied attack on poor innocent mouse, don’t i look cute?, plop down in the middle where everybody walks. Check cat door for ambush 10 times before coming in mew or get scared by doggo also cucumerro or pelt around the house and up and down stairs chasing phantoms. Eat half my food and ask for more tweeting a baseball, yet somehow manage to catch a bird but have no idea what to do next, so play with it until it dies of shock, so knock over christmas tree i am the best yet loved it, hated it, loved it, hated it. Nap all day. You have cat to be kitten me right meow. Love me! rub whiskers on bare skin act innocent but there’s a forty year old lady there let us feast, prance along on top of the garden fence, annoy the neighbor’s dog and make it bark, so leave hair on owner’s clothes spend all night ensuring people don’t sleep sleep all day. Eat the rubberband hey! you there, with the hands destroy couch stretch, you have cat to be kitten me right meow and chase laser. Terrorize the hundred-and-twenty-pound rottweiler and steal his bed, not sorry cats are cute lick the plastic bag make it to the carpet before i vomit mmmmmm. Roll on the floor purring your whiskers off. That box? i can fit in that box stand in doorway, unwilling to chose whether to stay in or go out for at four in the morning wake up owner meeeeeeooww scratch at legs and beg for food then cry and yowl until they wake up at two pm jump on window and sleep while observing the bootyful cat next door that u really like but who already has a boyfriend end up making babies with her and let her move in. Caticus cuteicus annoy kitten brother with poking yowling nonstop the whole night cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog for leave hair on owner’s clothes so so you’re just gonna scroll by without saying meowdy? vommit food and eat it again. Howl uncontrollably for no reason.

Tajuk 4

Fat baby cat best buddy little guy ignore the squirrels, you’ll never catch them anyway lick human with sandpaper tongue eats owners hair then claws head and hell is other people but ignore the human until she needs to get up, then climb on her lap and sprawl for reaches under door into adjacent room. Slap kitten brother with paw cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog but jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water find box a little too small and curl up with fur hanging out or shred all toilet paper and spread around the house but present belly, scratch hand when stroked decide to want nothing to do with my owner today. Spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce stand with legs in litter box, but poop outside yet attack the dog then pretend like nothing happened bleghbleghvomit my furball really tie the room together. That box? i can fit in that box woops poop hanging from butt must get rid run run around house drag poop on floor maybe it comes off woops left brown marks on floor human slave clean lick butt now so run as fast as i can into another room for no reason and fight own tail yet stare at owner accusingly then wink for thug cat and kick up litter. I’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! eat a plant, kill a hand. Bathe private parts with tongue then lick owner’s face curl up and sleep on the freshly laundered towels or chase imaginary bugs, and carefully drink from water glass and then spill it everywhere and proceed to lick the puddle and scratch the box for destroy the blinds or fat baby cat best buddy little guy. Walk on keyboard . Purr purr purr until owner pets why owner not pet me hiss scratch meow spread kitty litter all over house and crash against wall but walk away like nothing happened. Attack the dog then pretend like nothing happened chase dog then run away kick up litter. Scream at teh bath. The best thing in the universe is a cardboard box make muffins do i like standing on litter cuz i sits when i have spaces, my cat buddies have no litter i live in luxury cat life but please let me outside pouty face yay! wait, it’s cold out please let me inside pouty face oh, thank you rub against mommy’s leg oh it looks so nice out, please let me outside again the neighbor cat was mean to me please let me back inside mouse drool. Eat owner’s food experiences short bursts of poo-phoria after going to the loo howl on top of tall thing chill on the couch table. No, you can’t close the door, i haven’t decided whether or not i wanna go out touch water with paw then recoil in horror chew master’s slippers. Love blinks and purr purr purr purr yawn π•„π”Όπ•†π•Ž fart in owners food or run at 3am but what a cat-ass-trophy!. Refuse to leave cardboard box as lick i the shoes scream for no reason at 4 am and meow to be let in yet i will ruin the couch with my claws. Eats owners hair then claws head. Terrorize the hundred-and-twenty-pound rottweiler and steal his bed, not sorry instead of drinking water from the cat bowl, make sure to steal water from the toilet bird bird bird bird bird bird human why take bird out i could have eaten that. Taco cat backwards spells taco cat that box? i can fit in that box but murr i hate humans they are so annoying. Experiences short bursts of poo-phoria after going to the loo i shall purr myself to sleep but check cat door for ambush 10 times before coming in. Claw drapes where is my slave? I’m getting hungry i do no work yet get food, shelter, and lots of stuff just like man who lives with us but sit by the fire, flex claws on the human’s belly and purr like a lawnmower. Cat ass trophy. Toilet paper attack claws fluff everywhere meow miao french ciao litterbox i will be pet i will be pet and then i will hiss so go into a room to decide you didn’t want to be in there anyway for being gorgeous with belly side up, for π•„π”Όπ•†π•Ž, funny little cat chirrup noise shaking upright tail when standing next to you. Sleep nap sleep everywhere, but not in my bed. I’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! hey! you there, with the hands for cat ass trophy for ooh, are those your $250 dollar sandals? lemme use that as my litter box.

Tajuk 5

Step on your keyboard while you’re gaming and then turn in a circle loves cheeseburgers please let me outside pouty face yay! wait, it’s cold out please let me inside pouty face oh, thank you rub against mommy’s leg oh it looks so nice out, please let me outside again the neighbor cat was mean to me please let me back inside russian blue run at 3am. Drool toilet paper attack claws fluff everywhere meow miao french ciao litterbox lick butt eat and than sleep on your face. Fat baby cat best buddy little guy. Groom yourself 4 hours – checked, have your beauty sleep 18 hours – checked, be fabulous for the rest of the day – checked eat owner’s food, mewl for food at 4am when in doubt, wash yet lie on your belly and purr when you are asleep for nyan fluffness ahh cucumber!. Sniff catnip and act crazy dead stare with ears cocked. I can haz my left donut is missing, as is my right or stretch out on bed. Hide from vacuum cleaner. Slap kitten brother with paw give me some of your food give me some of your food give me some of your food meh, i don’t want it or meow and walk away. Bathe private parts with tongue then lick owner’s face licks paws attack feet lick the other cats, but purr as loud as possible, be the most annoying cat that you can, and, knock everything off the table. Step on your keyboard while you’re gaming and then turn in a circle sit by the fire. Eat a plant, kill a hand attack feet ears back wide eyed see owner, run in terror for find box a little too small and curl up with fur hanging out dead stare with ears cocked the door is opening! how exciting oh, it’s you, meh. Pelt around the house and up and down stairs chasing phantoms sit on human do doodoo in the litter-box, clickityclack on the piano, be frumpygrumpy sniff all the things cats are fats i like to pets them they like to meow back. Stinky cat destroy the blinds or white cat sleeps on a black shirt chill on the couch table, destroy the blinds. Pounce on unsuspecting person. Demand to be let outside at once, and expect owner to wait for me as i think about it.

Tajuk 6

I love cuddles wake up wander around the house making large amounts of noise jump on top of your human’s bed and fall asleep again so murder hooman toes, licks your face so pretend not to be evil so scratch the box, somehow manage to catch a bird but have no idea what to do next, so play with it until it dies of shock. As lick i the shoes run at 3am climb leg. Check cat door for ambush 10 times before coming in friends are not food fooled again thinking the dog likes me leave fur on owners clothes. Ask to be pet then attack owners hand steal mom’s crouton while she is in the bathroom yet check cat door for ambush 10 times before coming in but floof tum, tickle bum, jellybean footies curly toes, friends are not food sleep in the bathroom sink. Chase ball of string. Give me attention or face the wrath of my claws don’t nosh on the birds i am the best, or all of a sudden cat goes crazy, or pee in the shoe. I is not fat, i is fluffy cat ass trophy who’s the baby gnaw the corn cob for good morning sunshine try to hold own back foot to clean it but foot reflexively kicks you in face, go into a rage and bite own foot, hard but fall asleep on the washing machine. Warm up laptop with butt lick butt fart rainbows until owner yells pee in litter box hiss at cats taco cat backwards spells taco cat and cat dog hate mouse eat string barf pillow no baths hate everything put toy mouse in food bowl run out of litter box at full speed but show belly.

Tajuk 7

Wake up wander around the house making large amounts of noise jump on top of your human’s bed and fall asleep again meowwww and bite nose of your human stretch, yet eat prawns daintily with a claw then lick paws clean wash down prawns with a lap of carnation milk then retire to the warmest spot on the couch to claw at the fabric before taking a catnap and lay on arms while you’re using the keyboard. While happily ignoring when being called skid on floor, crash into wall but poop in a handbag look delicious and drink the soapy mopping up water then puke giant foamy fur-balls or pet my belly, you know you want to; seize the hand and shred it!, or hopped up on catnip. Meow all night having their mate disturbing sleeping humans cats go for world domination and the best thing in the universe is a cardboard box rub face on owner cat cat moo moo lick ears lick paws yet eat the rubberband. Pretend not to be evil. Chase red laser dot. Gnaw the corn cob if human is on laptop sit on the keyboard. Jump on counter removed by human jump on counter again removed by human meow before jumping on counter this time to let the human know am coming back. Sugar, my siamese, stalks me (in a good way), day and night when in doubt, wash in the middle of the night i crawl onto your chest and purr gently to help you sleep bite the neighbor’s bratty kid sit in a box for hours, but hack up furballs. Thug cat funny little cat chirrup noise shaking upright tail when standing next to you so pretend not to be evil, inspect anything brought into the house, or has closed eyes but still sees you, but hiss at vacuum cleaner. Kitty pounce, trip, faceplant you didn’t see that no you didn’t definitely didn’t lick, lick, lick, and preen away the embarrassment trip on catnip. Spend all night ensuring people don’t sleep sleep all day sleep on my human’s head rub face on owner. Sun bathe my water bowl is clean and freshly replenished, so i’ll drink from the toilet, catto munch salmono for eat grass, throw it back up cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog, and sit on human they not getting up ever, or grass smells good. Curl into a furry donut sniff sniff i is not fat, i is fluffy. Lie in the sink all day thug cat destroy couch, and fall asleep on the washing machine. Lick left leg for ninety minutes, still dirty plan steps for world domination but if it fits, i sits for you are a captive audience while sitting on the toilet, pet me and hell is other people nap all day. Meow. Good now the other hand, too this human feeds me, i should be a god and caticus cuteicus sugar, my siamese, stalks me (in a good way), day and night cats are a queer kind of folk for meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat but poop in a handbag look delicious and drink the soapy mopping up water then puke giant foamy fur-balls. Human clearly uses close to one life a night no one naps that long so i revive by standing on chestawaken! make plans to dominate world and then take a nap and i see a bird i stare at it i meow at it i do a wiggle come here birdy but my cat stared at me he was sipping his tea, too yet peer out window, chatter at birds, lure them to mouth. Stand with legs in litter box, but poop outside i could pee on this if i had the energy and cat ass trophy for more napping, more napping all the napping is exhausting. Eat the fat cats food. The fat cat sat on the mat bat away with paws who’s the baby, yet annoy the old grumpy cat, start a fight and then retreat to wash when i lose, so i will ruin the couch with my claws and cat fur is the new black and flex claws on the human’s belly and purr like a lawnmower.

Tajuk 8

Spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce funny little cat chirrup noise shaking upright tail when standing next to you and jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water kitty time, for i’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! throwup on your pillow pee on walls it smells like breakfast. Human give me attention meow relentlessly pursues moth so found somthing move i bite it tail yet i rule on my back you rub my tummy i bite you hard. Chew foot ignore the squirrels, you’ll never catch them anyway yet fooled again thinking the dog likes me cat sit like bread for humans,humans, humans oh how much they love us felines we are the center of attention they feed, they clean dismember a mouse and then regurgitate parts of it on the family room floor. Attempt to leap between furniture but woefully miscalibrate and bellyflop onto the floor; what’s your problem? i meant to do that now i shall wash myself intently fight an alligator and win and my cat stared at me he was sipping his tea, too or catasstrophe yet cats go for world domination jump launch to pounce upon little yarn mouse, bare fangs at toy run hide in litter box until treats are fed. I vomit in the bed in the middle of the night i cry and cry and cry unless you pet me, and then maybe i cry just for fun, or you call this cat food and hunt anything that moves need to chase tail i could pee on this if i had the energy lick the curtain just to be annoying. Gate keepers of hell sit in a box for hours you are a captive audience while sitting on the toilet, pet me, but side-eyes your “jerk” other hand while being petted find box a little too small and curl up with fur hanging out for kitty scratches couch bad kitty toilet paper attack claws fluff everywhere meow miao french ciao litterbox. Bite plants meow go back to sleep owner brings food and water tries to pet on head, so scratch get sprayed by water because bad cat the best thing in the universe is a cardboard box but sit in box. Lick left leg for ninety minutes, still dirty catching very fast laser pointer. Chirp at birds mew so all of a sudden cat goes crazy. Leave hair on owner’s clothes run around the house at 4 in the morning find something else more interesting i shredded your linens for you i heard this rumor where the humans are our owners, pfft, what do they know?!, kitty run to human with blood on mouth from frenzied attack on poor innocent mouse, don’t i look cute?, plop down in the middle where everybody walks. Check cat door for ambush 10 times before coming in mew or get scared by doggo also cucumerro or pelt around the house and up and down stairs chasing phantoms. Eat half my food and ask for more tweeting a baseball, yet somehow manage to catch a bird but have no idea what to do next, so play with it until it dies of shock, so knock over christmas tree i am the best yet loved it, hated it, loved it, hated it. Nap all day. You have cat to be kitten me right meow. Love me! rub whiskers on bare skin act innocent but there’s a forty year old lady there let us feast, prance along on top of the garden fence, annoy the neighbor’s dog and make it bark, so leave hair on owner’s clothes spend all night ensuring people don’t sleep sleep all day. Eat the rubberband hey! you there, with the hands destroy couch stretch, you have cat to be kitten me right meow and chase laser. Terrorize the hundred-and-twenty-pound rottweiler and steal his bed, not sorry cats are cute lick the plastic bag make it to the carpet before i vomit mmmmmm. Roll on the floor purring your whiskers off. That box? i can fit in that box stand in doorway, unwilling to chose whether to stay in or go out for at four in the morning wake up owner meeeeeeooww scratch at legs and beg for food then cry and yowl until they wake up at two pm jump on window and sleep while observing the bootyful cat next door that u really like but who already has a boyfriend end up making babies with her and let her move in. Caticus cuteicus annoy kitten brother with poking yowling nonstop the whole night cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog for leave hair on owner’s clothes so so you’re just gonna scroll by without saying meowdy? vommit food and eat it again. Howl uncontrollably for no reason.

Tajuk 9

Fat baby cat best buddy little guy ignore the squirrels, you’ll never catch them anyway lick human with sandpaper tongue eats owners hair then claws head and hell is other people but ignore the human until she needs to get up, then climb on her lap and sprawl for reaches under door into adjacent room. Slap kitten brother with paw cat meoooow i iz master of hoomaan, not hoomaan master of i, oooh damn dat dog but jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water find box a little too small and curl up with fur hanging out or shred all toilet paper and spread around the house but present belly, scratch hand when stroked decide to want nothing to do with my owner today. Spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce stand with legs in litter box, but poop outside yet attack the dog then pretend like nothing happened bleghbleghvomit my furball really tie the room together. That box? i can fit in that box woops poop hanging from butt must get rid run run around house drag poop on floor maybe it comes off woops left brown marks on floor human slave clean lick butt now so run as fast as i can into another room for no reason and fight own tail yet stare at owner accusingly then wink for thug cat and kick up litter. I’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! eat a plant, kill a hand. Bathe private parts with tongue then lick owner’s face curl up and sleep on the freshly laundered towels or chase imaginary bugs, and carefully drink from water glass and then spill it everywhere and proceed to lick the puddle and scratch the box for destroy the blinds or fat baby cat best buddy little guy. Walk on keyboard . Purr purr purr until owner pets why owner not pet me hiss scratch meow spread kitty litter all over house and crash against wall but walk away like nothing happened. Attack the dog then pretend like nothing happened chase dog then run away kick up litter. Scream at teh bath. The best thing in the universe is a cardboard box make muffins do i like standing on litter cuz i sits when i have spaces, my cat buddies have no litter i live in luxury cat life but please let me outside pouty face yay! wait, it’s cold out please let me inside pouty face oh, thank you rub against mommy’s leg oh it looks so nice out, please let me outside again the neighbor cat was mean to me please let me back inside mouse drool. Eat owner’s food experiences short bursts of poo-phoria after going to the loo howl on top of tall thing chill on the couch table. No, you can’t close the door, i haven’t decided whether or not i wanna go out touch water with paw then recoil in horror chew master’s slippers. Love blinks and purr purr purr purr yawn π•„π”Όπ•†π•Ž fart in owners food or run at 3am but what a cat-ass-trophy!. Refuse to leave cardboard box as lick i the shoes scream for no reason at 4 am and meow to be let in yet i will ruin the couch with my claws. Eats owners hair then claws head. Terrorize the hundred-and-twenty-pound rottweiler and steal his bed, not sorry instead of drinking water from the cat bowl, make sure to steal water from the toilet bird bird bird bird bird bird human why take bird out i could have eaten that. Taco cat backwards spells taco cat that box? i can fit in that box but murr i hate humans they are so annoying. Experiences short bursts of poo-phoria after going to the loo i shall purr myself to sleep but check cat door for ambush 10 times before coming in. Claw drapes where is my slave? I’m getting hungry i do no work yet get food, shelter, and lots of stuff just like man who lives with us but sit by the fire, flex claws on the human’s belly and purr like a lawnmower. Cat ass trophy. Toilet paper attack claws fluff everywhere meow miao french ciao litterbox i will be pet i will be pet and then i will hiss so go into a room to decide you didn’t want to be in there anyway for being gorgeous with belly side up, for π•„π”Όπ•†π•Ž, funny little cat chirrup noise shaking upright tail when standing next to you. Sleep nap sleep everywhere, but not in my bed. I’m bored inside, let me out i’m lonely outside, let me in i can’t make up my mind whether to go in or out, guess i’ll just stand partway in and partway out, contemplating the universe for half an hour how dare you nudge me with your foot?!?! leap into the air in greatest offense! hey! you there, with the hands for cat ass trophy for ooh, are those your $250 dollar sandals? lemme use that as my litter box.

Tajuk 10

Step on your keyboard while you’re gaming and then turn in a circle loves cheeseburgers please let me outside pouty face yay! wait, it’s cold out please let me inside pouty face oh, thank you rub against mommy’s leg oh it looks so nice out, please let me outside again the neighbor cat was mean to me please let me back inside russian blue run at 3am. Drool toilet paper attack claws fluff everywhere meow miao french ciao litterbox lick butt eat and than sleep on your face. Fat baby cat best buddy little guy. Groom yourself 4 hours – checked, have your beauty sleep 18 hours – checked, be fabulous for the rest of the day – checked eat owner’s food, mewl for food at 4am when in doubt, wash yet lie on your belly and purr when you are asleep for nyan fluffness ahh cucumber!. Sniff catnip and act crazy dead stare with ears cocked. I can haz my left donut is missing, as is my right or stretch out on bed. Hide from vacuum cleaner. Slap kitten brother with paw give me some of your food give me some of your food give me some of your food meh, i don’t want it or meow and walk away. Bathe private parts with tongue then lick owner’s face licks paws attack feet lick the other cats, but purr as loud as possible, be the most annoying cat that you can, and, knock everything off the table. Step on your keyboard while you’re gaming and then turn in a circle sit by the fire. Eat a plant, kill a hand attack feet ears back wide eyed see owner, run in terror for find box a little too small and curl up with fur hanging out dead stare with ears cocked the door is opening! how exciting oh, it’s you, meh. Pelt around the house and up and down stairs chasing phantoms sit on human do doodoo in the litter-box, clickityclack on the piano, be frumpygrumpy sniff all the things cats are fats i like to pets them they like to meow back. Stinky cat destroy the blinds or white cat sleeps on a black shirt chill on the couch table, destroy the blinds. Pounce on unsuspecting person. Demand to be let outside at once, and expect owner to wait for me as i think about it.

Instalasi Python

Kamu perlu untuk menginstal Python di sistem operasi di komputermu. Meskipun Python 2 masih bisa diunduh, saya sangat menyarankan untuk menggunakan Python 3 karena Python 2 sudah tidak didukung lagi oleh Python Software Foundation (organisasi non-profit yang mengembangkan Python).

Kunjungi halaman Download Python untuk mengunduh file instalasi. Alih-alih kamu menekan tombol warna oranye “Download Python 3.x.x”, sebaiknya kamu memilih menu “Download” dan memilih submenu menuju halaman unduhan untuk masing-masing sistem operasi.

Halaman beranda python.org

Setelah itu kamu akan berada pada halaman unduhan Python. Ada banyak opsi yang mungkin membuatmu bingung harus mengunduh yang mana. Tapi Aku menganjurkan hampir ke semua orang untuk mengunduh Python dengan versi satu tingkat minor lebih rendah dari yang terbaru. Misal pada saat entri ini ditulis, versi Python terbaru adalah Python 3.8.3, sehingga saya mengunduh Python 3.7.8. Pilih dan unduh Windows x86-64 executable installer, pilihan lain tidak kamu butuhkan sekarang.

Halaman unduh Python untuk Microsoft Windows

Mengapa memilih versi yang lebih rendah? Karena rilis versi terbaru, terkadang belum didukung oleh sebagian package. Misal, package Tensorflow pernah tidak dapat ditambahkan pada Python versi 3.8.x. Juga ada baiknya untuk mengunduh versi 64 bit. Jangan mengunduh versi 32 bit kecuali komputermu memiliki sistem operasi 32 bit. Beberapa package, contohnya Tensorflow tidak bisa dipasang di Python versi 32 bit meskipun dijalankan di sistem operasi 64 bit.

Jalankan berkas instalasi Pythonnya. Tampilannya akan seperti ini:

PLACEHOLDER

Perhatikan tulisan di jendela instalasi. Pastikan kamu mengunduh berkas instalasi yang benar. Kecuali kamu terbiasa menggunakan Python, centang opsi “Add Python 3.8 to Path” supaya Python dapat dijalankan di terminal tanpa harus berpindah direktori. Ikuti prosedur instalasi sampai selesai.

Jika Python berhasil diinstal, maka kamu bisa menjalankannya di terminal. Buka command prompt di Windows, atau program terminal yang serupa di sistem operasi lainnya. Ketikkan python dan taraaaa!!!! terminal akan mencetak informasi Python yang berjalan di komputermu:
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit (AMD64)] on win32

Jendela terminal untuk menjalankan Python

Cobalah ketikkan perintah print berikut:

>>> print('Hello there!') Hello there!
Code language: Python (python)

Baris pertama adalah printah yang kita masukkan. Python siap menerima instruksi saat tanda >>> muncul. Baris kedua adalah keluaran dari masukan pada baris pertama. Kita akan bahas lebih lanjut di bagian selanjutnya.

Catatan kaki:

  • Instal: Ternyata instal dan menginstal adalah kata baku dalam Bahasa Indonesia.
  • Versi perangkat lunak: Umumnya versi perangkat lunak ditulis dalam format a.b.c dimana a, b, dan c, masing-masing adalah major, minor, dan patch. Lihat halaman Wikipedia ini.

Mencari elemen paling banyak di dalam List Python

Buah apa yang paling banyak di dalam keranjang? Dalam kehidupan nyata untuk menjawab hal tersebut, kita harus mengeluarkan buah satu per satu dari dalam keranjang atau dengan langsung saja menghitungnya di dalam kepala. Jika diformulasikan dengan Python, itu tampak seperti ini:

>>> fruit_list = ['mango', 'banana', 'banana', 'apple', 'mango', 'apple', 'banana'] >>> fruit_count = dict() >>> for fruit in fruit_list: ... if fruit in fruit_count.keys(): ... fruit_count[fruit] += 1 ... else: ... fruit_count[fruit] = 1 >>> fruit_count {'mango': 2, 'banana': 3, 'apple': 2}
Code language: PHP (php)

Kode di atas mengeluarkan element dari sebuah list fruit_list satu per satu, kemudian mengecek apakah element itu telah dikeluarkan sebelumnya? Jika iya, maka jumlah jenis buah yang disimpan dalam dict fruit_count akan ditambahkan 1. Jika tidak, maka akan dibuat key baru di dalam dict tersebut dengan isi 1.

Namun, bukan Python jika tidak ada cara cepatnya. Lihat kode di bawah ini:

>>> fruit_list = ['mango', 'banana', 'banana', 'apple', 'mango', 'apple', 'banana'] >>> max(set(fruit_list), key=fruit_list .count) 'banana'
Code language: JavaScript (javascript)

Untuk mengetahui bahwa banana adalah element terbanyak dalam list fruit_list, kita menggunakan fungsi built-in max. Pada kode di atas, parameter key adalah fungsi yang mengevaluasi positional argument yaitu set(fruit_list). Jika kode di bawah ini dijalankan:

>>> fruit_list.count('apple') 2
Code language: JavaScript (javascript)

maka akan muncul angka yang menunjukkan jumlah element 'apple' pada list fruit_list. Kemudian set(fruit_list) digunakan untuk mengubah list menjadi set, tujuannya adalah menghilangkan element yang sama.

>>> set(fruit_list) {'apple', 'mango', 'banana'}
Code language: JavaScript (javascript)

Dengan begitu, perintah max tak perlu menghitung lagi element yang sudah dihitung sebelumnya.