Create an account


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,184
» Latest member: novalisha11
» Forum threads: 21,886
» Forum posts: 22,773

Full Statistics

Online Users
There are currently 902 online users.
» 1 Member(s) | 895 Guest(s)
Applebot, Baidu, Bing, DuckDuckGo, Google, Yandex, novalisha11

 
  News - Heaven Dust Brings Resident Evil-Inspired Zombie Horror To Switch This Month
Posted by: xSicKxBot - 02-11-2020, 07:49 AM - Forum: Nintendo Discussion - No Replies

Heaven Dust Brings Resident Evil-Inspired Zombie Horror To Switch This Month


The Switch is about to get another dose of zombie-based survival horror in the form of Heaven Dust, a game inspired by genre star Resident Evil.

The game has you waking up in a strange mansion full of zombies and deadly traps, leaving you to go on the hunt for helpful items and solve puzzles. You can expect plenty of zombie fights, too, all presented in a top-down view (as seen in the trailer above).

Here’s the game’s official blurb and a feature list:

In 1970, a scientific investigation team found a new virus in the blood samples from a primitive tribe called “Torkue” in New Guinea. Some scientists think it will help to reveal the secret of immortality and they called it “Heaven Dust”. However, it turns out that it’s not really a gift from Heaven, it opens the gate to hell instead.

After the research center in New Guinea was destroyed in an accident related to the mutant virus, they brought “Heaven Dust” to the USA, then the research was carried out entirely by their subsidiary company StarDust. A disaster is just unfolding…

Features:
– Thrilling and immersive exploration-horror experience!
– Challenging story-integrated puzzles!
– A hopeless story with different endings. Maybe there is a good one.

Heaven Dust screenshots

The game has been developed by Chinese indie dev One Gruel Studio and will launch on Switch on 27th February.

As ever, make sure to share your thoughts on this one in the comments below.



https://www.sickgaming.net/blog/2020/02/...his-month/

Print this item

  Xbox Wire - TERA: Justice, Injustice, and Tiny Tales of Woe
Posted by: xSicKxBot - 02-11-2020, 07:49 AM - Forum: Xbox Discussion - No Replies

TERA: Justice, Injustice, and Tiny Tales of Woe

It’s no secret that I love playing brawlers in TERA. And with the release of the Fists of Justice content update, I get to add another race/class combo to my stable of fighters—the popori brawler—and I’ll be punching like mad to get him up to max level to take on one of my favorite dungeons: Antaroth’s Abyss.

TERA

Spoiler Alert: In my previous Xbox Wire article, I talked about the Red Refuge and its complicated web of relationships and TERA lore. Antaroth’s Abyss picks up minutes after you report to your superiors about what you saw while cleaning out the refuge, and in a completely unexpected turn, you find yourself accused of the very wrong you just righted!

TERA

You’re ordered to report to Antaroth’s Abyss to be judged for your “crime.” And while this is a completely optional assignment, the opportunity to punch some big bosses and clear your name (including a final encounter with some particularly brutal tactics) isn’t one you’ll want to miss.

TERA

It’s actually the dungeon’s second boss, Kalioth the Executioner, that really sells Antaroth’s Abyss for me. As a brawler, you’re always in the thick of things, and can take hits no other class can. My popori lancer has spent a lot of time staring at huge BAM feet in his career, and my new popori brawler will need to widen his focus to accommodate the Kalioth’s complex left-and-right attack patterns. Guessing wrong could mean game over for you and your group, but the many defensive options in the brawler’s attack set give you a little more leeway than other tanking classes.

Xbox LiveXbox Live

TERA


En Masse Entertainment, Inc.

326

TERA is a new breed of MMO, blending True Action Combat with the vast game world and deep social interactions of a role-playing game. In TERA, you aim, dodge, and time your attacks for an intense and rewarding tactical combat experience. TERA’s expansive content is totally free to play, from character creation all the way to level 65 and beyond. True. Action. Combat—Experience an MMO with non-stop, pulse pounding action. In TERA, it’s your skill and positioning that determine whether you live or die in battle. Epic Encounters—Team up with friends to take down Big-Ass Monsters in menacing dungeons and open world hunting zones, or put your PvP skills to the test against other players in one of the many battlegrounds TERA has to offer. Vast Fantasy World—With seven character races and ten playable classes, you can customize your character to match your individual playstyle. You’ll embark on thousands of quests in a game world rich in history and lore, fighting a myriad of monster types across a variety of landscapes such as arid deserts, icy tundras, sweltering jungles, and many, many more. No Restrictions— TERA offers a truly free-to-play experience, with no artificial cap on classes, zones, what you can do, or how good you can be—all the content in the game can be experienced without paying a single penny. To support the continued development of TERA, we offer account services, cosmetic items, costumes, accessories, weapon skins, mounts, and more for purchase from an in-game store. A World of Fellow Players—Whether you fight as part of a guild or are content to make friends (and enemies) along the way, being part of TERA’s vibrant community means there is always someone to share your adventures. Retooled for Consoles— Featuring an interface redesigned and optimized for game controllers, TERA offers an immersive MMO experience from the comfort of your living room couch!

There are a few more things to unpack in this update, but being able to combine my “most fun” options like this has me really excited to play a new character. I just hope I can get his ears to flop the right way…



https://www.sickgaming.net/blog/2020/01/...es-of-woe/

Print this item

  News - Video: Indexing and iterating design space permutations in game dev
Posted by: xSicKxBot - 02-11-2020, 07:49 AM - Forum: Lounge - No Replies

Video: Indexing and iterating design space permutations in game dev

In this 2016 GDC session, programmer Nathan Sturtevant covers the mathematics of counting with combinations and permutations, and how game devs can employ it in their own projects.

It was a rich, technical talk that delved deep into key topics like how to compute perfect hash functions (rankings and unrankings) that allow programmers to convert to and from the index of a permutation/combination and an actual game state.

If you’re a game programmer or you just have a passion for math, take advantage of the fact that Sturtevant’s talks is now available to watch for free via the official GDC YouTube channel!

In addition to this presentation, the GDC Vault and its accompanying YouTube channel offers numerous other free videos, audio recordings, and slides from many of the recent Game Developers Conference events, and the service offers even more members-only content for GDC Vault subscribers.

Those who purchased All Access passes to recent events like GDC or VRDC already have full access to GDC Vault, and interested parties can apply for the individual subscription via a GDC Vault subscription page. Group subscriptions are also available: game-related schools and development studios who sign up for GDC Vault Studio Subscriptions can receive access for their entire office or company by contacting staff via the GDC Vault group subscription page.



https://www.sickgaming.net/blog/2020/02/...-game-dev/

Print this item

  News - Poll: Box Art Brawl #29 – International Superstar Soccer 64
Posted by: xSicKxBot - 02-10-2020, 11:48 PM - Forum: Nintendo Discussion - No Replies

Poll: Box Art Brawl #29 – International Superstar Soccer 64

Main

Welcome back to Box Art Brawl, the series where we throw a rosette and a bunch of regional box art variants into a pit and see which one emerges victorious with the bloodied prize pinned to its chest.

Last week we watched as Mario Bros. battled for your amusement and pleasure. In a shocking turn of events, the sneaky reissued European version triumphed over the classic North American box which left the Famicom port of the arcade game in third place. We honestly thought the pixel art cover had that one wrapped up, but it wasn’t to be. A valiant attempt, but thwarted.

This week we’re jumping two generations forward to the Nintendo 64 and one of the best digital interpretations of the beautiful game ever made with Konami’s ISS 64. This game is a particular favourite at the Nintendo Life office that we fire up on a regular basis not only for its silky gameplay, but also for the exquisite delivery of its excitable commentator. The commentary jumps hilariously from calm to INCREDIBLY ANIMATED at the drop of a hat – usually mid-sentence – as the lines are hastily wedged in between your play. Team names are a particular highlight, especially when “GREECE!” or “BRAZIL!” are on the pitch. It’s priceless and we wouldn’t have it any other way.

Enough of this banter, let’s kick things off.

“Welcome to this live broadcast. This is glorious football weather.”

Europe


EU

First half kicks off…”

Forgoing the usual black border of the European PAL boxes, ISS 64 starts strong with a mixed international team on the cover. The logo has an old-school Sky Sports feel to it with plenty of colour and impact. The image itself is dynamic and really puts you on the field, seemingly in the boots of the goalkeeper as this bunch of bleeding-edge renders drive play towards you.

Throw in a packed stadium and this team has the makings of a great one. The red ‘KONAMI’ on the left gets a bit lost, but Europe has come out fighting with this effort.

“YES! Wonderful cover! Will he take a shot? He’s hit it first TIME!!!”

Japan


JP

“Consummate skill, there!”

Heading to Japan, here we have the original Jikkyou J.League Perfect Striker, the game released in December 1996 and formed the basis for the ISS 64 we know and love before it was adapted for the west. Now, it should be noted that ISS 64 went back to Japan in the form of Jikkyou World Soccer 3 which released two months after the western version in September 1997, with international teams replacing the original’s Japanese League teams.

So, in a very real sense Japan has two versions of ISS 64, the lucky so-and-sos . We’ve chosen to go with the original Perfect Striker because 1) the players from this officially-licensed J.League cover were simply re-skinned for the European release, so that sets up a nice parallel, and 2) we find the faces of the players on the Jikkyou World Soccer 3 cover even more unnerving than these automatons. Please feel free to register any complaints or concerns about editorial bias sullying the integrity of this hallowed video game box contest in the comments. They shall be diligently filed with the ones from last week.

“THE REFEREE SAYS PLAY ON!”

Once again we get players from different teams together on the pitch, although the dark night sky here was traded for blue in the west and while the black helps contrast against the logo, a floodlight or a few stars might have livened things up. Despite sitting on a dark background, the title still gets a little lost. The ‘KONAMI’ is white this time and punches out a bit more, though. Overall, it’s another decent effort, but has it done enough to see off the competition?

“This COULD be a chance! He’s looking around for openings…”

North America


NA

“It sails to the… Right.”

Ah! The North American cover is nothing if not succinct and to-the-point. It’s got a soccer ball on it and you’re not going to miss the title on this one. You get the standard red strip down the right side of the cover and the peeled-back corner with the ‘Only For Nintendo 64’ logo. It’s easy to overlook, but this one does in fact feature a player as part of the Nintendo Sports logo in the top left corner.

Not much else to say, really. It’s not our favourite, but we’re not the ones voting, are we?

“WHAT A HOWLER!”


“He has players waiting for the cross! He centres the high ball. WHAT AN OPPORTUNITY!”

So, three different covers for one of the best football games ever, but which one gets your vote? Click your pick below and hit the ‘Vote’ button:

“Let’s see that again…”

“And there it is! Full time has been blown! A stunning victory for…” We’ll catch you next week for Box Art Brawl #30.



https://www.sickgaming.net/blog/2020/02/...soccer-64/

Print this item

  (Free Game Key) Princess Lili - 丽丽公主 - free steam game
Posted by: xSicKxBot - 02-10-2020, 10:35 PM - Forum: Deals or Specials - No Replies

Princess Lili - 丽丽公主 - free steam game

This is a limited time chance to register the game on your steam account for free. Ends February 17th.

Cons

- No English support (may change in the future)
- Currently profile limited status (may change in the future)

Visit the steam store and click the green button to add it to your account.
https://store.steampowered.com/app/876850/Princess_Lili/


https://steamcommunity.com/groups/GrabFr...9235722916

Print this item

  (Indie Deal) GalaQuiz, Die Young Crackerjack, nDreams Sale, Graffiti Games Sale
Posted by: xSicKxBot - 02-10-2020, 10:35 PM - Forum: Deals or Specials - No Replies

GalaQuiz, Die Young Crackerjack, nDreams Sale, Graffiti Games Sale

Die Young | Explore. Survive. Escape!
[www.indiegala.com]
The Crackerjack Deal brings the newest historical low since its full release.
https://youtu.be/wJRHKah1S-w
nDreams VR Publisher Sale, all titles -45%
[www.indiegala.com]
Graffiti Games Publisher Sale, up to -80%
[www.indiegala.com]
The 133rd GalaQuiz will be LIVE soon, win up to $25:dollars: in GalaCredit!
[www.indiegala.com]
The GalaQuiz will take place in less than 15 minutes from this announcement
Today's GalaQuiz[www.indiegala.com] hints are up. The theme will be Leprosy.

Happy Hour
Today's Happy Hour is LIVE for Mystery Rain Bundle[www.indiegala.com]!

Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


https://steamcommunity.com/groups/indieg...7986009541

Print this item

  Microsoft - CVP Sarah Bond on Black History Month: Building a better future together
Posted by: xSicKxBot - 02-10-2020, 05:18 PM - Forum: Windows - No Replies

CVP Sarah Bond on Black History Month: Building a better future together

Gladys Hall and granddaughter
At left Gladys Hall in 1939; at right, Gladys Hall and Sarah Bond in 1999.

Gladys Hall was born on March 19, 1925, in Atmore, Alabama, at a time when her prospects and those of her family were inextricably linked to the circumstances of her birth and race. Her father worked tirelessly to provide for his family. He ran a dry cleaning business from their home, where Gladys started working as a girl. She would meet customers out at their cars and carry their clothes up the hilly driveway back into the shop. One routine Saturday, men dressed in white robes and hooded masks pulled up in their car and asked 12-year-old Gladys where her father was. She quickly concocted a story about him being away and then ran up the driveway to warn him. Her father immediately fled out of the back of their home, in fear for his life, for simply the unchangeable fact that his skin was black.

That man was my great-grandfather. Gladys was my grandmother. She could have taken that early experience – and all the other obstacles she encountered growing up – and allowed it to build hate and resentment in her heart. But instead, she chose to focus on building a better future for herself and for others. Her life spanned a time when there were great advancements in civil rights, making it possible for her to achieve things beyond what her father could have ever imagined. At the age of 45, Gladys Hall achieved her lifelong dream of attending college, graduating with a master’s degree in education – and she became a teacher.

‘Progress is not inevitable, but driven by the choices that we make as individuals’


Black History Month is a reminder for us all to reflect on the richness of our history and the lessons it has taught us. Each year it helps us move forward a little further together, as one. The origin of Black History Month came as a response to black people being largely left out of the history books, despite the many significant roles they played. Since first being celebrated in 1976, February is now recognized around the world as a month to pay tribute to the accomplishments and contributions of generations of people who may otherwise have been forgotten. For me, it’s also a reminder that progress is not inevitable, but driven by the choices that we make as individuals. Choices like the ones my grandmother made.

This is one of the reasons why, for me, Microsoft is special. Our chosen mission is to empower every person and organization on the planet to achieve more. Diversity and inclusion are core tenants of our culture and integral to achieving that mission. It is only when we empower everyone to realize their full potential – no matter the circumstances – that we reach our full potential as a society.

‘It is only when we empower everyone to realize their full potential – no matter their circumstances – that we reach our full potential as a society’


We kicked off Black History Month with our Blacks at Microsoft chapter ringing the Nasdaq closing bell on Wall Street for the third consecutive year. Throughout the month, Microsoft Stores around the globe will host Black History Month events, and if you live near one, I would encourage you to attend.

We have the power to choose how we think, how we speak, and how we act – and we can choose to treat each other with dignity, respect and inclusion as our path forward. I celebrate Black History Month by reflecting on this lesson that my grandmother – the teacher – taught me. It’s my hope that this is a lesson Black History Month can teach us all.

Tags: , , ,



https://www.sickgaming.net/blog/2020/02/...-together/

Print this item

  News - Halo Infinite: See How They Captured The Weapon Sounds
Posted by: xSicKxBot - 02-10-2020, 05:17 PM - Forum: Lounge - No Replies

Halo Infinite: See How They Captured The Weapon Sounds

Halo Infinite is one of 2020's most anticipated games, but information about it largely remains a mystery. Microsoft hasn't shared many details about the story or multiplayer, but the company has been slowly revealing details about the process of recording the game's sounds.

This continued recently, as developer 343 Industries posted another behind-the-scenes look at how the team captured some of the game's weapon sounds. A new Instagram video from the Halo account shows members of the audio team firing a variety of weapons--including pistols, rifles, and shotguns. The video also shows the audio team capturing the sounds of various explosions.

A second video, which you can see further down the page, shows the Halo Infinite audio team capturing vehicle sounds using a 1972 Chevy El Camino SS.

Halo Infinite Weapon Sounds

These are just the latest behind-the-scenes videos from 343. In 2019, the developer shared a video of a cute little pug whose snuffs and scruff sounds will be put into Halo Infinite.

Halo Infinite releases in Holiday 2020 as a launch title for Microsoft's next-generation console, Xbox Series X, as well as PC. The game will also be playable on Xbox One as well as the other variations of the next-generation Xbox that might be coming.

Halo Infinite Car Sounds


https://www.gamespot.com/articles/halo-i...0-6473530/

Print this item

  [Tut] Python cProfile – A Helpful Guide with Prime Example
Posted by: xSicKxBot - 02-10-2020, 09:38 AM - Forum: Python - No Replies

Python cProfile – A Helpful Guide with Prime Example

Python comes with different profilers. If you’re new to performance optimization, you may ask: what’s a profiler anyway?

A performance profiler allows you to monitor your application more closely. If you just run a Python script in your shell, you see nothing but the output produced by your program. But you don’t see how much bytes were consumed by your program. You don’t see how long each function runs. You don’t see the data structures that caused most memory overhead.

Without those things, you cannot know what’s the bottleneck of your application. And, as you’ve already learned above, you cannot possibly start optimizing your code. Why? Because else you were complicit in “premature optimization”—one of the deadly sins in programming.

Instrumenting profilers insert special code at the beginning and end of each routine to record when the routine starts and when it exits. With this information, the profiler aims to measure the actual time taken by the routine on each call. This type of profiler may also record which other routines are called from a routine. It can then display the time for the entire routine and also break it down into time spent locally and time spent on each call to another routine.

Fundamentals Profiling

Fortunately, there are a lot of profilers. In the remaining article, I’ll give you an overview of the most important profilers in Python and how to use them. Each comes with a reference for further reading.

Python cProfile


The most popular Python profiler is called cProfile. You can import it much like any other library by using the statement:

import cProfile

A simple statement but nonetheless a powerful tool in your toolbox.

Let’s write a Python script which you can profile. Say, you come up with this (very) raw Python script to find 100 random prime numbers between 2 and 1000 which you want to optimize:

import random def guess(): ''' Returns a random number ''' return random.randint(2, 1000) def is_prime(x): ''' Checks whether x is prime ''' for i in range(x): for j in range(x): if i * j == x: return False return True def find_primes(num): primes = [] for i in range(num): p = guess() while not is_prime(p): p = guess() primes += [p] return primes print(find_primes(100)) '''
[733, 379, 97, 557, 773, 257, 3, 443, 13, 547, 839, 881, 997,
431, 7, 397, 911, 911, 563, 443, 877, 269, 947, 347, 431, 673,
467, 853, 163, 443, 541, 137, 229, 941, 739, 709, 251, 673, 613,
23, 307, 61, 647, 191, 887, 827, 277, 389, 613, 877, 109, 227,
701, 647, 599, 787, 139, 937, 311, 617, 233, 71, 929, 857, 599,
2, 139, 761, 389, 2, 523, 199, 653, 577, 211, 601, 617, 419, 241,
179, 233, 443, 271, 193, 839, 401, 673, 389, 433, 607, 2, 389,
571, 593, 877, 967, 131, 47, 97, 443] '''

The program is slow (and you sense that there are many optimizations). But where to start?

As you’ve already learned, you need to know the bottleneck of your script. Let’s use the cProfile module to find it! The only thing you need to do is to add the following two lines to your script:

import cProfile
cProfile.run('print(find_primes(100))')

It’s really that simple. First, you write your script. Second, you call the cProfile.run() method to analyze its performance. Of course, you need to replace the execution command with your specific code you want to analyze. For example, if you want to test function f42(), you need to type in cProfile.run('f42()').

Here’s the output of the previous code snippet (don’t panic yet):

[157, 773, 457, 317, 251, 719, 227, 311, 167, 313, 521, 307, 367, 827, 317, 443, 359, 443, 887, 241, 419, 103, 281, 151, 397, 433, 733, 401, 881, 491, 19, 401, 661, 151, 467, 677, 719, 337, 673, 367, 53, 383, 83, 463, 269, 499, 149, 619, 101, 743, 181, 269, 691, 193, 7, 883, 449, 131, 311, 547, 809, 619, 97, 997, 73, 13, 571, 331, 37, 7, 229, 277, 829, 571, 797, 101, 337, 5, 17, 283, 449, 31, 709, 449, 521, 821, 547, 739, 113, 599, 139, 283, 317, 373, 719, 977, 373, 991, 137, 797] 3908 function calls in 1.614 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 1.614 1.614 <string>:1(<module>) 535 1.540 0.003 1.540 0.003 code.py:10(is_prime) 1 0.000 0.000 1.542 1.542 code.py:19(find_primes) 535 0.000 0.000 0.001 0.000 code.py:5(guess) 535 0.000 0.000 0.001 0.000 random.py:174(randrange) 535 0.000 0.000 0.001 0.000 random.py:218(randint) 535 0.000 0.000 0.001 0.000 random.py:224(_randbelow) 21 0.000 0.000 0.000 0.000 rpc.py:154(debug) 3 0.000 0.000 0.072 0.024 rpc.py:217(remotecall) 3 0.000 0.000 0.000 0.000 rpc.py:227(asynccall) 3 0.000 0.000 0.072 0.024 rpc.py:247(asyncreturn) 3 0.000 0.000 0.000 0.000 rpc.py:253(decoderesponse) 3 0.000 0.000 0.072 0.024 rpc.py:291(getresponse) 3 0.000 0.000 0.000 0.000 rpc.py:299(_proxify) 3 0.000 0.000 0.072 0.024 rpc.py:307(_getresponse) 3 0.000 0.000 0.000 0.000 rpc.py:329(newseq) 3 0.000 0.000 0.000 0.000 rpc.py:333(putmessage) 2 0.000 0.000 0.047 0.023 rpc.py:560(__getattr__) 3 0.000 0.000 0.000 0.000 rpc.py:57(dumps) 1 0.000 0.000 0.047 0.047 rpc.py:578(__getmethods) 2 0.000 0.000 0.000 0.000 rpc.py:602(__init__) 2 0.000 0.000 0.026 0.013 rpc.py:607(__call__) 2 0.000 0.000 0.072 0.036 run.py:354(write) 6 0.000 0.000 0.000 0.000 threading.py:1206(current_thread) 3 0.000 0.000 0.000 0.000 threading.py:216(__init__) 3 0.000 0.000 0.072 0.024 threading.py:264(wait) 3 0.000 0.000 0.000 0.000 threading.py:75(RLock) 3 0.000 0.000 0.000 0.000 {built-in method _struct.pack} 3 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock} 6 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} 1 0.000 0.000 1.614 1.614 {built-in method builtins.exec} 6 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 9 0.000 0.000 0.000 0.000 {built-in method builtins.len} 1 0.000 0.000 0.072 0.072 {built-in method builtins.print} 3 0.000 0.000 0.000 0.000 {built-in method select.select} 3 0.000 0.000 0.000 0.000 {method '_acquire_restore' of '_thread.RLock' objects} 3 0.000 0.000 0.000 0.000 {method '_is_owned' of '_thread.RLock' objects} 3 0.000 0.000 0.000 0.000 {method '_release_save' of '_thread.RLock' objects} 3 0.000 0.000 0.000 0.000 {method 'acquire' of '_thread.RLock' objects} 6 0.071 0.012 0.071 0.012 {method 'acquire' of '_thread.lock' objects} 3 0.000 0.000 0.000 0.000 {method 'append' of 'collections.deque' objects} 535 0.000 0.000 0.000 0.000 {method 'bit_length' of 'int' objects} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} 3 0.000 0.000 0.000 0.000 {method 'dump' of '_pickle.Pickler' objects} 2 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} 553 0.000 0.000 0.000 0.000 {method 'getrandbits' of '_random.Random' objects} 3 0.000 0.000 0.000 0.000 {method 'getvalue' of '_io.BytesIO' objects} 3 0.000 0.000 0.000 0.000 {method 'release' of '_thread.RLock' objects} 3 0.000 0.000 0.000 0.000 {method 'send' of '_socket.socket' objects} 

Let’s deconstruct it to properly understand the meaning of the output. The filename of your script is ‘code.py’. Here’s the first part:

>>>import cProfile
>>>cProfile.run('print(find_primes(100))')
[157, 773, 457, 317, 251, 719, 227, 311, 167, 313, 521, 307, 367, 827, 317, 443, 359, 443, 887, 241, 419, 103, 281, 151, 397, 433, 733, 401, 881, 491, 19, 401, 661, 151, 467, 677, 719, 337, 673, 367, 53, 383, 83, 463, 269, 499, 149, 619, 101, 743, 181, 269, 691, 193, 7, 883, 449, 131, 311, 547, 809, 619, 97, 997, 73, 13, 571, 331, 37, 7, 229, 277, 829, 571, 797, 101, 337, 5, 17, 283, 449, 31, 709, 449, 521, 821, 547, 739, 113, 599, 139, 283, 317, 373, 719, 977, 373, 991, 137, 797]
...

It still gives you the output to the shell—even if you didn’t execute the code directly, the cProfile.run() function did. You can see the list of the 100 random prime numbers here.

The next part prints some statistics to the shell:

 3908 function calls in 1.614 seconds

Okay, this is interesting: the whole program took 1.614 seconds to execute. In total, 3908 function calls have been executed. Can you figure out which?

  • The print() function once.
  • The find_primes(100) function once.
  • The find_primes() function executes the for loop 100 times.
  • In the for loop, we execute the range(), guess(), and is_prime() functions. The program executes the guess() and is_prime() functions multiple times per loop iteration until it correctly guessed the next prime number.
  • The guess() function executes the randint(2,1000) method once.

The next part of the output shows you the detailed stats of the function names ordered by the function name (not its performance):

 Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 1.614 1.614 <string>:1(<module>) 535 1.540 0.003 1.540 0.003 code.py:10(is_prime) 1 0.000 0.000 1.542 1.542 code.py:19(find_primes) ...

Each line stands for one function. For example the second line stands for the function is_prime. You can see that is_prime() had 535 executions with a total time of 1.54 seconds.

Wow! You’ve just found the bottleneck of the whole program: is_prime(). Again, the total execution time was 1.614 seconds and this one function dominates 95% of the total execution time!

So, you need to ask yourself the following questions: Do you need to optimize the code at all? If you do, how can you mitigate the bottleneck?

There are two basic ideas:

  • call the function is_prime() less frequently, and
  • optimize performance of the function itself.

You know that the best way to optimize code is to look for more efficient algorithms. A quick search reveals a much more efficient algorithm (see function is_prime2()).

import random def guess(): ''' Returns a random number ''' return random.randint(2, 1000) def is_prime(x): ''' Checks whether x is prime ''' for i in range(x): for j in range(x): if i * j == x: return False return True def is_prime2(x): ''' Checks whether x is prime ''' for i in range(2,int(x**0.5)+1): if x % i == 0: return False return True def find_primes(num): primes = [] for i in range(num): p = guess() while not is_prime2(p): p = guess() primes += [p] return primes import cProfile
cProfile.run('print(find_primes(100))')

What do you think: is our new prime checker faster? Let’s study the output of our code snippet:

[887, 347, 397, 743, 751, 19, 337, 983, 269, 547, 823, 239, 97, 137, 563, 757, 941, 331, 449, 883, 107, 271, 709, 337, 439, 443, 383, 563, 127, 541, 227, 929, 127, 173, 383, 23, 859, 593, 19, 647, 487, 827, 311, 101, 113, 139, 643, 829, 359, 983, 59, 23, 463, 787, 653, 257, 797, 53, 421, 37, 659, 857, 769, 331, 197, 443, 439, 467, 223, 769, 313, 431, 179, 157, 523, 733, 641, 61, 797, 691, 41, 751, 37, 569, 751, 613, 839, 821, 193, 557, 457, 563, 881, 337, 421, 461, 461, 691, 839, 599] 4428 function calls in 0.074 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.073 0.073 <string>:1(<module>) 610 0.002 0.000 0.002 0.000 code.py:19(is_prime2) 1 0.001 0.001 0.007 0.007 code.py:27(find_primes) 610 0.001 0.000 0.004 0.000 code.py:5(guess) 610 0.001 0.000 0.003 0.000 random.py:174(randrange) 610 0.001 0.000 0.004 0.000 random.py:218(randint) 610 0.001 0.000 0.001 0.000 random.py:224(_randbelow) 21 0.000 0.000 0.000 0.000 rpc.py:154(debug) 3 0.000 0.000 0.066 0.022 rpc.py:217(remotecall)

Crazy – what a performance improvement! With the old bottleneck, the code takes 1.6 seconds. Now, it takes only 0.074 seconds—a 95% runtime performance improvement!

That’s the power of bottleneck analysis.

The cProfile method has many more functions and parameters but this simple method cProfile.run() is already enough to resolve many performance bottlenecks. If you want to learn more, study the official documentation.

Where to Go From Here?


You’ve learned how to use the cProfile module in Python to find the bottleneck of your application.

If you’re already optimizing performance of your Python apps, chances are that you can already earn six figures by selling your Python skills. Would you like to learn how?

Join the free webinar that shows you how to become a thriving coding business owner online!

[Webinar] Are You a Six-Figure Freelance Developer?

Join us. It’s fun! ?



https://www.sickgaming.net/blog/2020/02/...e-example/

Print this item

  (Indie Deal) Blasphemous Crackerjack Deal & Microids Sale
Posted by: xSicKxBot - 02-10-2020, 09:38 AM - Forum: Deals or Specials - No Replies

Blasphemous Crackerjack Deal & Microids Sale

Blasphemous at a sinful 52% discount
[www.indiegala.com]
Explore this nightmarish world of twisted religion and discover its many secrets hidden deep inside.

Microids Publisher Sale, up to -90%
[www.indiegala.com]
Start your week with Garfield Kart, Chariot, Home Design 3D, Syberia, the Dracula Trilogy and more Microids titles.

Happy Hour
Today's Happy Hour is LIVE for Lunar Voyage Bundle[www.indiegala.com]!

Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


https://steamcommunity.com/groups/indieg...7982694913

Print this item

 
Latest Threads
Latest Ibotta Invite Code...
Last Post: novalisha11
13 minutes ago
Ibotta Registration Bonus...
Last Post: novalisha11
15 minutes ago
Ibotta Welcome Bonus Guid...
Last Post: novalisha11
16 minutes ago
Ibotta New Account Bonus ...
Last Post: novalisha11
17 minutes ago
Ibotta Referral Link Bonu...
Last Post: novalisha11
18 minutes ago
Ibotta Sign-Up Offer [STG...
Last Post: novalisha11
19 minutes ago
Ibotta Referral Bonus 202...
Last Post: novalisha11
20 minutes ago
Ibotta for Grocery Shoppe...
Last Post: novalisha11
21 minutes ago
Insta360 Promo Codes | IN...
Last Post: nivex33
31 minutes ago
Insta360 Coupon Code 2026...
Last Post: nivex33
32 minutes ago

Forum software by © MyBB Theme © iAndrew 2016