It’s only a matter of days until the totally adorable LEGO Super Mario sets hit the streets in Europe and North America, but lucky Japanese LEGO fans have had a chance to pick these sets up sooner and we’re already seeing some great photos of what can be done with these kits.
One of our favourite uses of LEGO Super Mario so far is by Crownavy on Twitter, who has given Mario his own chunky mech suit, not unlike the Hulkbuster armour as seen in The Avengers. Bowser better watch out now!
We really love what Crownavy has accomplished here – let us know if you’d buy one of these kits if LEGO was to sell them in the future, or are you merely content to use your imagination to try and make your own?
SNK’s Samurai Shodown has been a worthy addition to the collection of fighters currently on the Nintendo Switch, so it’s great to see the company supporting the game with ongoing free DLC.
As teased on Twitter recently, SNK will be bringing over one of the characters from Tencent’s Honor of Kings to give good old Haohmaru a run for his money.
All we get at the moment is a silhouette as shown in the tweet to indicate which character this might be:
Let us know who you think this might be in a comment below.
During the Xbox Series X Showcase, 343 showed off a new gameplay trailer for Halo Infinite. At a hefty nine minutes, the trailer provides some pretty solid insights on what to expect from the upcoming Halo title, including its fancy new grappling hook. But it was a much smaller detail that captured the attention of both audiences and 343’s Community Director, Brian Jarrard.
At about 3:53 in the gameplay demo, we see Master Chief taking on some Brutes that have been deployed in his path. The first he dispatches easily with a few shots and a well-placed explosive. The second manages to run up to Chief before being taken out, but not before we get a glimpse of his hilariously deadpan expression.
It’s no surprise that memelords took the dearly departed Brute’s goofy face and ran with it, but the reaction from Jarrard has been equally enthusiastic. He put out a tweet deciding the Brute’s name is officially Craig, and has asked fans to send any Craig content they create his way. From the looks of that thread, he won’t be disappointed.
Posted by: xSicKxBot - 07-25-2020, 07:34 AM - Forum: Python
- No Replies
Python One Line While Loop [A Simple Tutorial]
Python is powerful — you can condense many algorithms into a single line of Python code. So the natural question arises: can you write a while loop in a single line of code? This article explores this mission-critical question in all detail.
How to Write a While Loop in a Single Line of Python Code?
There are three ways of writing a one-liner while loop:
Method 1: If the loop body consists of one statement, write this statement into the same line: while True: print('hi'). This prints the string 'hi' to the shell for as long as you don’t interfere or your operating system forcefully terminates the execution.
Method 2: If the loop body consists of multiple statements, use the semicolon to separate them: while True: print('hi'), print('bye'). This runs the statements one after the other within the while loop.
Method 3: If the loop body consists nested compound statements, replace the inner compound structures with the ternary operator: while True: print('hi') if condition else print('bye').
Exercise: Run the code. What do you observe? Try to fix the infinite loop!
Next, you’ll dive deep into each of these methods and become a better coder in the process.
Before we move on, I’m excited to present you my brand-new Python book Python One-Liners (Amazon Link).
If you like one-liners, you’ll LOVE the book. It’ll teach you everything there is to know about a single line of Python code. But it’s also an introduction to computer science, data science, machine learning, and algorithms. The universe in a single line of Python!
But enough promo, let’s dive into the first method—the profane…
Method 1: Single-Statement While Loop One-Liner
Just writing the while loop into a single line of code is the most direct way of accomplishing the task. Say, you want to write the following infinite while loop in a single line of code:
while True: print('hi') '''
hi
hi
... '''
You can easily get this done by writing the command in a single line of code:
# Method 1: Single-Line While Loop
while True: print('hi')
While this answer seems straightforward, the interesting question is: can we write a more complex while loop that has a longer loop body in a single line?
Related Article: If you’re interested in compressing whole algorithms into a single line of code, check out this article with 10 Python one-liners that fit into a single tweet.
Let’s explore an alternative Python trick that’s very popular among Python masters:
Method 2: Multi-Statement While Loop One-Liner
As it turns out, you can also use the semicolon to separate multiple independent statements and express them in a single line. The statement expression1; expression2 reads “first execute expression1, then execute expression2“.
Here’s an example how you can run a while loop until a counter variable c reaches the threshold c == 10:
This way, you can easily compress “flat” loop bodies in a single line of Python code.
But what if the loop body is not flat but nested in a hierarchical manner—how to express those nested while loops in a single line?
Method 3: Nested Compound Statements While Loop One-Liner
You often want to use compound statements in Python that are statements that require an indented block such as if statements or while loops.
In the previous methods, you’ve seen simple while loop one-liners with one loop body statement, as well as multiple semicolon-separated loop body statements.
Problem: But what if you want to use a compound statement within a simple while loop—in a single line of code?
Example: The following statement works just fine:
# YES:
if expression: print('hi')
You can also add multiple statements like this:
# YES:
if expression: print('hi'); print('ho')
But you cannot use nested compound statements in a while loop one-liner:
# NO:
while expression1: if expression2: print('hi')
Python throws an error does not work because both the while and if statements are compound.
However, there’s an easy fix to make this work. You can replace the if expression2: print('hi') part with a ternary operator and use an expression rather than a compound statement:
# Method 3: One-Line While Loop + Ternary Operator
while True: print('yes') if True else print('no')
Knowing small Python one-liner tricks such as the list comprehension and single-line for loops is vital for your success in the Python language. Every expert coder knows them by heart—after all, this is what makes them very productive.
If you want to learn the language Python by heart, join my free Python email course. It’s 100% based on free Python cheat sheets and Python lessons. It’s fun, easy, and you can leave anytime.
Python One-Liners Book
Python programmers will improve their computer science skills with these useful one-liners.
Python One-Linerswill teach you how to read and write “one-liners”: concise statements of useful functionality packed into a single line of code. You’ll learn how to systematically unpack and understand any line of Python code, and write eloquent, powerfully compressed Python like an expert.
The book’s five chapters cover tips and tricks, regular expressions, machine learning, core data science topics, and useful algorithms. Detailed explanations of one-liners introduce key computer science concepts and boost your coding and analytical skills. You’ll learn about advanced Python features such as list comprehension, slicing, lambda functions, regular expressions, map and reduce functions, and slice assignments. You’ll also learn how to:
• Leverage data structures to solve real-world problems, like using Boolean indexing to find cities with above-average pollution • Use NumPy basics such as array, shape, axis, type, broadcasting, advanced indexing, slicing, sorting, searching, aggregating, and statistics • Calculate basic statistics of multidimensional data arrays and the K-Means algorithms for unsupervised learning • Create more advanced regular expressions using grouping and named groups, negative lookaheads, escaped characters, whitespaces, character sets (and negative characters sets), and greedy/nongreedy operators • Understand a wide range of computer science topics, including anagrams, palindromes, supersets, permutations, factorials, prime numbers, Fibonacci numbers, obfuscation, searching, and algorithmic sorting
By the end of the book, you’ll know how to write Python at its most refined, and create concise, beautiful pieces of “Python art” in merely a single line.
Commander Doom Bundle, Beyond a Steel Sky and more
Commander Doom Bundle | 9 Steam Games | 95% OFF
[www.indiegala.com] Take command of your inner doom, make the dark dull times go boom. Save an extra 30% when using crypto. Make sure you do not miss special 24h launch price
New Release: Beyond a Steel Sky
https://youtu.be/1-ZYLdsRnYY Join our Crypto Sale, and get an EXTRA 30% OFF on all bundles and 15% OFF on all store deals when paying with a supported cryptocurrency! (ends on 24 July)
Posted by: xSicKxBot - 07-25-2020, 07:33 AM - Forum: Lounge
- No Replies
Destiny 2 Coming to Xbox Game Pass
Today, Bungie and Xbox announced that they are joining
forces to bring Destiny 2 to Xbox Game Pass this fall.
With an active Xbox Game Pass subscription, players will
have access to the standard edition (seasonal content sold separately) of each
expansion, beginning with Forsaken and Shadowkeep (available September 2020) and
Beyond Light (available beginning on November 10, 2020).
Later this year we will be releasing a version of Destiny 2
that will be optimized for Xbox Series X, including 4K resolution and running
at 60 frames per second. Players who already own Destiny 2 on Xbox One will be
able to transfer their game to Xbox Series X for free via Smart Delivery. In addition, for Xbox Game Pass Ultimate subscribers, players will be able to stream Destiny 2 on their Android mobile devices via xCloud.
FAQ
Q: Does this partnership with Xbox mean that Destiny 2
content is launching on Xbox first? A: All content on Destiny 2 remains available to all
players, on any platform, and is going to be available at the same time – there
are no content exclusives on any platform.
Q: Is seasonal content included as part of Game Pass? A: No. With an active Xbox Game Pass subscription, players
will have access to the standard edition of the Forsaken and Shadowkeep
expansions beginning in September 2020, and the standard edition of the Beyond
Light expansion beginning on November 10, 2020. Seasonal content is available
for separate purchase.
Q: What happens if I have already pre-ordered Beyond Light on Xbox?
A: Those Xbox Game Pass subscribers who purchase any edition of
Beyond Light will still have access to the expansion and its associated content
if Beyond Light leaves Game Pass or their Game Pass subscription expires.
Q: What will happen
to my expansions when/if Destiny 2 leaves Xbox Game Pass?
A: Players have access
to the Destiny 2 expansions while they have an active Game Pass subscription.
If Destiny 2 expansions leave Game Pass, players will need to purchase the expansions to
continue playing expansion content.
Q: Are the Beyond
Light pre-order bonuses available via Xbox Game Pass?
A: No. In order to get access to pre-order items and digital
bonuses, you must purchase Beyond Light.
Q: What happens to my current Xbox Destiny 2 expansions? A: Destiny
2 and its associated expansions will continue to work as normal outside of Xbox
Game Pass.
Posted by: xSicKxBot - 07-25-2020, 07:33 AM - Forum: Lounge
- No Replies
Video: ILMxLab’s perspective on pioneering immersive entertainment
In this GDC 2018 developers Mohen Leo, David Collins, Judah Graham and Camille Cellucci discuss the future potential in immersive entertainment, including in-home and location-based experiences being developed at ILMxLAB.
It was an intriguing discussion with lots of practical examples from the speakers’ careers, most notably The Void immersive experience Star Wars: Secrets of the Empire that opened in 2018.
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.
Posted by: xSicKxBot - 07-25-2020, 07:33 AM - Forum: Lounge
- No Replies
Xbox’s cross-gen pledge might not apply to every upcoming first-party game
Going into the next console generation, Xbox has led with the promise that its first-party studios won’t lean into next-generation exclusives right away to avoid making players feel pressured to jump from One to Series X.
But, as spotted by The Verge, it looks like that pledge might not cover every first-party release headed to the Xbox Series X over the next few years as previously thought.
During today’s Xbox Game Showcase, a couple of first-party reveals only noted future Xbox Series X and Windows PC releases, leaving out any mention of the current generation Xbox One. Forza Motorsport, Fable, and others lacked an Xbox One mention on their title cards, while other first-party games like Halo Infinite and Psychonauts listed all three of Microsoft’s platforms.
A simple explanation could be that those Xbox Series X and Windows only titles are launching further down the line, and wouldn’t fall under the rough “next couple of years” window Microsoft has previously toted for a cross-gen first-party lineup.
In a vaguely worded statement sent to The Verge on the disconnect, a Microsoft spokesperson said that platform compatibility could vary from game to game, but doesn’t explicitly mention its first-party studios.
“Our future Xbox Game Studios titles are being developed natively for Xbox Series X. We will continue to invest in tools for devs to scale across consoles,” reads that statement. “Which consoles each Studio/game can support will be based on what’s best for their game and their community at launch.”
The issue is made all the more confusing by the fact that Xbox reiterated its plans for cross generation launches as recently as last week, and in no uncertain terms. From last week’s Xbox Wire post: “We want every Xbox player to play all the new games from Xbox Game Studios. That’s why Xbox Game Studios titles we release in the next couple of years—like Halo Infinite—will be available and play great on Xbox Series X and Xbox One. We won’t force you to upgrade to Xbox Series X at launch to play Xbox exclusives.”
Today Epic Games announced an update to their ongoing Epic MegaGrants program, a series of grants to better the world of game development, media creation and open source technologies that have supported such products as Godot and Blender. They are approaching the halfway mark with 600 recipients representing a total of $42M USD in grants thus far. As part of the announcement they also revealed a new partnership with AMD:
Just over one year ago, we launched Epic MegaGrants, a $100 million program to globally accelerate the work of talented teams and individuals working with Unreal Engine, 3D graphics tools, and open source software. Today, we are pleased to reveal that Epic Games has issued $42 million in total financial support to more than 600 remarkable recipients to date as part of the Epic MegaGrants program.
This announcement follows a record initial round of support, which saw Epic MegaGrants extended to more than 200 recipients, surpassing the four-year distributed total of the initiative’s predecessor, Unreal Dev Grants, in only eight months.
In addition to this news, we are happy to share that AMD has introduced their support to Epic MegaGrants with the generous contribution of 200 AMD Ryzen™ 7 3800X desktop processors eligible for giveaway to new and existing recipients. There is no deadline to apply, and hardware is available on a first-come, first-served basis, based on project merit. We welcome creators across games, entertainment, architecture, and many other industries to apply now via online submission for an AMD Ryzen™ 7 3800X desktop processor.
You can learn more about the status of the MegaGrants program on the Unreal Engine blog or by watching the video below.
Apple employees granted paid time off to vote in US election
Apple is offering retail and hourly employees time off to vote in the U.S. election in November, according to a report on Friday.
Apple SVP of retail and staff Deidre O’Brien announced the policy in a memo circulated this week, reports Bloomberg.
“For retail team members and hourly workers across the company, if you’re scheduled to work this Election Day, we’ll be providing up to four hours of paid time off if you need it to get to the polls,” O’Brien said. “If they choose, our teams can also use this time to volunteer as an election worker at one of your local polling stations.”
The company is allowing up to four hours of paid leave on Election Day, which falls on Nov. 3.
Apple joins a number of major tech companies including Lyft, Twitter and Uber to offer employees time off to vote. Like previous election seasons, big firms from a variety of U.S. industries are allowing workers to take time off to cast their ballots.