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

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,946
» Latest member: blackopsdlc
» Forum threads: 21,996
» Forum posts: 22,963

Full Statistics

Online Users
There are currently 1437 online users.
» 0 Member(s) | 1431 Guest(s)
Applebot, Baidu, Bing, Facebook, Google, Yandex

Latest Threads
[Steam Release] Cowbots a...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 0
[Dev News] September Free...
Forum: Game Development
Last Post: xSicKxBot

» Replies: 0
» Views: 0
Marvel Rivals Venom guide...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 7
[WoW Retail News] Midnigh...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 10
[Steam Release] Kodon
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 16
[WoW Retail News] Downloa...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 16
[PS.Blog] (For Southeast ...
Forum: Sony Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 15
[Steam Release] RAILGRADE...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 19
Fortnite Winterfest 2024 ...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 19
[WoW Retail News] World o...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 18

 
  News - Elden Ring: Where To Get The Coil Shield
Posted by: xSicKxBot - 12-13-2022, 06:04 AM - Forum: Lounge - No Replies

Elden Ring: Where To Get The Coil Shield

Though you can technically use them to deal damage, most shields in Elden Ring are, well, meant for doing things shields tend to do, like blocking and parrying. In the case of the Coil Shield, though, there's a very special skill attached that can be a lot of fun for poison-based builds--and it looks cool to boot. If that sounds fun to you, read on to find out where you can pick it up.

The Coil Shield explained

The Coil Shield is a small shield that requires 10 Strength and 10 Dexterity to wield. Its unique weapon skill is Viper Bite, which can be activated to deal a bit of damage and inflict poison buildup on enemies, making it a truly unique shield.

The Coil Shield's item description reads:

Continue Reading at GameSpot

https://www.gamespot.com/articles/elden-...01-10abi2f

Print this item

  PC - Soccer Story
Posted by: xSicKxBot - 12-13-2022, 06:04 AM - Forum: New Game Releases - No Replies

Soccer Story



It's been a year since The Calamity tore apart the very foundations of soccer as we know it, and since then, Soccer Inc. has made dang well sure that not a soul has been allowed to even look at a soccer ball, let alone kick it.

Soccer may have been banned across the world... but now there is hope! A magical soccer ball has chosen you, our Savior of Soccer!

Soccer Story is a physics-driven adventure RPG, where every problem can be solved with your trusty magic ball. Along the way, you'll need to best bad guys in 1v1s, compete in a range of different sports (with your soccer ball, of course), and sometimes use your brain just as much as your balls

In a world that has long forgotten The Beautiful Game, can you remind them why soccer is top of the table, and best the most formidable teams, including the local toddlers and a group of sharks?

Publisher: No More Robots

Release Date: Nov 29, 2022




https://www.metacritic.com/game/pc/soccer-story

Print this item

  [Tut] How to Split a Multi-line String into Multiple Lines?
Posted by: xSicKxBot - 12-12-2022, 09:10 AM - Forum: Python - No Replies

How to Split a Multi-line String into Multiple Lines?

Rate this post

Summary: Use given_string.splitlines() to split a given multiline string into multiple lines.

Minimal Example:

text = 'Python\nJava\nC#'
print(text.splitlines())
# Output: ['Python', 'Java', 'C#']

Problem Formulation


?Problem: Given a string, How will you split the string into a list of words using newline as a separator/delimiter?

Example:


# Input
text = """abc
def
ghi """
# Expected Output
['abc', 'def', 'ghi']

Let’s dive into the different ways of solving the given problem.

Method 1: Using splitlines


Approach: The most convenient and easiest way to split a given multiline string into multiple strings is to use the splitlines() method, i.e., simply use – 'given_string'.splitlines().

NOTE: splitlines() is a built-in method in Python that splits a string at line breaks such as '\n' and returns a split list of substrings (i.e., lines). For example, 'finxter\nis\ncool'.splitlines() will return the following list: ['finxter', 'is', 'cool'].

Code:

# Input
text = """Python is an Object Oriented programming language.
COBOL is an Object Oriented programming language.
F# is an Object Oriented programming language.""" print(text.splitlines()) # Output: ['Python is an Object Oriented programming language.', 'COBOL is an Object Oriented programming language.', 'F# is an Object Oriented programming language.']

?Related Read: Python String splitlines()

Method 2: Using split()


Approach: Use 'given_string'.split('\n') to split the given multiline string at line breaks.

Code:

# Input
text = """Python is an Object Oriented programming language.
COBOL is an Object Oriented programming language.
F# is an Object Oriented programming language.""" print(text.split('\n')) # Output: ['Python is an Object Oriented programming language.', 'COBOL is an Object Oriented programming language.', 'F# is an Object Oriented programming language.']

Using “\n” ensures that whenever a new line occurs, the string is split.

?Related Read: Python String split()

Method 3: Using re.split in a List Comprehension


Another way to solve the given problem is to use the split method of the regex module. You can split the string at every line break by passing “\n” as the pattern within the re.split function. To ensure that there are no leading or trailing extra whitespaces in the resultant list you can use a list comprehension that stores the split strings only and eliminates whitespace characters. This can be done with the help of an if statement within the list comprehension as shown in the solution below.

Code:

import re text = """Python is an Object Oriented programming language.
COBOL is an Object Oriented programming language.
F# is an Object Oriented programming language.""" print([x for x in re.split("\n", text) if x!='']) # Output: ['Python is an Object Oriented programming language.', 'COBOL is an Object Oriented programming language.', 'F# is an Object Oriented programming language.']

NOTE: The re.split(pattern, string) method matches all occurrences of the pattern in the string and divides the string along the matches resulting in a list of strings between the matches. For example, re.split('a', 'bbabbbab') results in the list of strings ['bb', 'bbb', 'b'].

?Read more here – Python Regex Split

List Comprehension: “A list comprehension consists of brackets containing an expression followed by a for clause, then zero or more for or if clauses. The result will be a new list resulting from evaluating the expression in the context of the for and if clauses which follow it.”

?Read more here: List Comprehension in Python — A Helpful Illustrated Guide


Do you want to master the regex superpower? Check out my new book The Smartest Way to Learn Regular Expressions in Python with the innovative 3-step approach for active learning: (1) study a book chapter, (2) solve a code puzzle, and (3) watch an educational chapter video.

Conclusion


We have successfully solved the given problem using three different approaches. I hope you this article answered all your queries. Please subscribe and stay tuned for more interesting articles!

Happy coding! ?

Related Reads:
⦿ Python | Split String by Newline
⦿ Python | Split String by Whitespace
⦿ Python | Split String into Characters


Python Regex Course


Google engineers are regular expression masters. The Google search engine is a massive text-processing engine that extracts value from trillions of webpages.  

Facebook engineers are regular expression masters. Social networks like Facebook, WhatsApp, and Instagram connect humans via text messages

Amazon engineers are regular expression masters. Ecommerce giants ship products based on textual product descriptions.  Regular expressions ​rule the game ​when text processing ​meets computer science. 

If you want to become a regular expression master too, check out the most comprehensive Python regex course on the planet:




https://www.sickgaming.net/blog/2022/12/...ple-lines/

Print this item

  (Indie Deal) FREE Gravity Den, Horizon Zero Dawn, Game Awards Sale ending soon
Posted by: xSicKxBot - 12-12-2022, 09:10 AM - Forum: Deals or Specials - No Replies

FREE Gravity Den, Horizon Zero Dawn, Game Awards Sale ending soon

Gravity Den FREEbie
[freebies.indiegala.com]
Change the gravity on the ground & help Dan reach the lost ship.

https://www.youtube.com/watch?v=76O5KaJHEA0
The Game Awards Sale ending soon
[www.indiegala.com]
https://youtu.be/ODwLA7qgv-U
[www.indiegala.com]


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

Print this item

  News - Armored Core 6: Fires Of Rubicon Announced At The Game Awards
Posted by: xSicKxBot - 12-12-2022, 09:10 AM - Forum: Lounge - No Replies

Armored Core 6: Fires Of Rubicon Announced At The Game Awards

A new From Software game was announced at this year's Game Awards, but it's not another iteration of the Soulsbornes we've come to expect from the studio. Instead From is going back to its roots with a new entry in its mecha shooter series, called Armored Core VI: Fires of Rubicon.

The brief teaser trailer showed a ruined world followed by some glamor shots of big stompy robots, as well as other giant mechanized behemoths, which is what you would want from a mecha game.


https://www.gamespot.com/articles/armore...01-10abi2f

Print this item

  PC - Gungrave G.O.R.E
Posted by: xSicKxBot - 12-12-2022, 09:10 AM - Forum: New Game Releases - No Replies

Gungrave G.O.R.E



In Gungrave G.O.R.E, play the gun-wielding badass anti-hero of your dreams as you mow down tons of enemies in a gory ballet of bullets and experience a story of vengeance, love and loyalty, all in a beautiful third-person action shooter, combining the best that Eastern and Western game design have to offer.

As the titular Gunslinger of Resurrection, you become the badass anti-hero of your dreams, an ultimate killing machine, brutalising your foes without mercy. Taking cover and retreating is not an option for Grave, he only ever goes full steam ahead, preferably right through his enemies.

Stylish third-person shooting meets close-range martial arts, creating seamlessly flowing action as you crush your enemies in a gory ballet of bullets. Utilise your unlimited ammo Cerberus pistols and your transformable EVO-coffin to unleash devastating combos in pursuit of maximum damage and style.

Publisher: Prime Matter

Release Date: Nov 22, 2022




https://www.metacritic.com/game/pc/gungrave-gore

Print this item

  [Oracle Blog] Apache Spark—Lightning fast on GraalVM Enterprise
Posted by: xSicKxBot - 12-11-2022, 12:17 PM - Forum: Java Language, JVM, and the JRE - No Replies

Apache Spark—Lightning fast on GraalVM Enterprise

Discover how Apache Spark runs faster and uses less memory with GraalVM Enterprise.


https://blogs.oracle.com/java/post/apach...enterprise

Print this item

  [Tut] Python | Split String into List of Substrings
Posted by: xSicKxBot - 12-11-2022, 12:17 PM - Forum: Python - No Replies

Python | Split String into List of Substrings

Rate this post

?Summary: Use Python’s built-in split function to split a given string into a list substrings. Other methods include using the regex library and the map function.

Minimal Example


text = "Python Java Golang" # Method 1
print(text.split()) # Method 2
import re
print(re.split('\s+',text)) # Method 2.1
print(re.findall('\S+', text)) # Method 3
li = list(map(str.strip, text.split()))
res = []
for i in li: for j in i.split(): res.append(j)
print(res) # OUTPUTS: ['Python', 'Java', 'Golang']

Problem Formulation


?Problem: Given a string containing numerous substrings. How will you split the string into a list of substrings?

Let’s understand the problem with the help of an example.

Example


# Input
text = "word1 word2 word3 word4 word5" # Output
['word1', 'word2', 'word3', 'word4', 'word5']

Method 1: Using strip


Approach: Use the split("sep") function where sep is the specified separator. In our case the separator is a space. Hence, you do not need to pass any separator to the function as whitespaces are considered to be default separators for the split function. Therefore, whenever a space occurs the string will be split and the substring will be stored in a list.

Code:

text = "word1 word2 word3 word4 word5"
print(text.split()) # ['word1', 'word2', 'word3', 'word4', 'word5']

Method 2: Using re.split


The re.split(pattern, string) method matches all occurrences of the pattern in the string and divides the string along the matches resulting in a list of strings between the matches. For example, re.split('a', 'bbabbbab') results in the list of strings ['bb', 'bbb', 'b'].

Approach: Use thr re.split('\s+',text) method, where text is the given string and ‘\s+‘ returns a match whenever it finds a space in the string.Therefore, on every occurrence of a space the string will be split.

Code:

import re text = "word1 word2 word3 word4 word5"
print(re.split('\s+',text)) # ['word1', 'word2', 'word3', 'word4', 'word5']

?Related Read: Python Regex Split

Method 3: Using re.findall


The re.findall(pattern, string) method scans string from left to right, searching for all non-overlapping matches of the pattern. It returns a list of strings in the matching order when scanning the string from left to right.

?Related Read: Python re.findall() – Everything You Need to Know

Approach: Use thr re.findall('\S+',text) method, where text is the given string and ‘\S+‘ returns a match whenever it finds a normal character in the string except whitespace. Therefore, all the non-whitespace characters will be grouped together until the script encounters a space. On the occurrence of a space, the string will be split and the next group of characters that do not include a space will be searched.

Code:

import re text = "word1 word2 word3 word4 word5"
print(re.findall('\S+', text)) # ['word1', 'word2', 'word3', 'word4', 'word5']

Do you want to master the regex superpower? Check out my new book The Smartest Way to Learn Regular Expressions in Python with the innovative 3-step approach for active learning: (1) study a book chapter, (2) solve a code puzzle, and (3) watch an educational chapter video.

Method 4: Using map


Prerequisite: The map() function transforms one or more iterables into a new one by applying a “transformator function” to the i-th elements of each iterable. The arguments are the transformator function object and one or more iterables. If you pass n iterables as arguments, the transformator function must be an n-ary function taking n input arguments. The return value is an iterable map object of transformed, and possibly aggregated, elements.

?Related Read: Python map() — Finally Mastering the Python Map Function [+Video]

Approach: Use the map function such that the iterable is the split list of substrings. This is the second argument of the map method. Now each item of this list will be passed to the strip method which eliminates the trailing spaces if any and then returns a map object containing the split substrings. You can convert this map object to a list using the list constructor.

Code:

text = "word1 word2 word3 word4 word5"
li = list(map(str.strip, text.split()))
res = []
for i in li: for j in i.split(): res.append(j)
print(res) # ['word1', 'word2', 'word3', 'word4', 'word5']

Exercise


Problem: Given a string containing numerous substrings separated by commas and spaces. How will you extract the substrings and store them in a list? Note that you have to eliminate the whitespaces as well as the commas.

# Input
text = "One, Two, Three"
# Output
['One', 'Two', 'Three']

?Hint: Python | Split String by Comma and Whitespace

Solution:

text = "One, Two, Three"
print([x.strip() for x in text.split(',')])
# ['One', 'Two', 'Three']

Conclusion


With that, we come to the end of this tutorial. I hope the methods discussed in this article have helped you and answered your queries. Please stay tuned and subscribe for more solutions and discussions in the future.

Happy learning!?


But before we move on, I’m excited to present you my 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!


The book was released in 2020 with the world-class programming book publisher NoStarch Press (San Francisco).

Link: https://nostarch.com/pythononeliners



https://www.sickgaming.net/blog/2022/12/...ubstrings/

Print this item

  (Indie Deal) Cyber Whale Bundle 2, Cashback, Devil in Me's out
Posted by: xSicKxBot - 12-11-2022, 12:17 PM - Forum: Deals or Specials - No Replies

Cyber Whale Bundle 2, Cashback, Devil in Me's out

Cyber Whale Bundle 2 | 6 Steam Games | 96% OFF
[www.indiegala.com]
Add to your collection & get a selection of games made with heart and mind brought to you by Whale Rock Games for the passionate gamers: Synthwave Burnout, NeuraGun, Inquisitor's Heart and Soul, Cybernetic Fault, Cyberpunk SFX, Euphoria: Supreme Mechanics.

https://www.youtube.com/watch?v=p6_hzXmQt3A
Blackfriday Cashback Sale
[www.indiegala.com]
For a limited time, any purchase made on IndieGala, be it store deals or bundles, will be rewarding you instantly and handsomely, directly into your IndieGala account, ready to be used!
[www.indiegala.com]
https://www.youtube.com/watch?v=wAw5RROD3ZI


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

Print this item

  News - Cyberpunk 2077's Phantom Liberty Expansion Features Idris Elba
Posted by: xSicKxBot - 12-11-2022, 12:17 PM - Forum: Lounge - No Replies

Cyberpunk 2077's Phantom Liberty Expansion Features Idris Elba

Cyberpunk 2077's Phantom Liberty expansion will feature actor Idris Elba. CD Projekt Red announced during The Game Awards that the Luther and The Wire actor will appear in the expansion as Solomon Reed, an FIA agent for the NUSA.

The expansion is themed around espionage and survival, and it takes players to a new part of Night City. The add-on launches in 2023 for PC, PS5, and Xbox Series X|S. You can check out the teaser reveal in the video below.

Phantom Liberty will not be released for PS4/Xbox One because CD Projekt Red is ending new updates for those platforms. The expansion will also feature Keanu Reeves' Johnny Silverhand.

Continue Reading at GameSpot

https://www.gamespot.com/articles/cyberp...01-10abi2f

Print this item