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,154
» Latest member: tomen8
» Forum threads: 21,823
» Forum posts: 22,698

Full Statistics

Online Users
There are currently 961 online users.
» 0 Member(s) | 955 Guest(s)
Applebot, Baidu, Bing, DuckDuckGo, Google, Yandex

 
  PC - Tiny Tina's Wonderlands
Posted by: xSicKxBot - 04-17-2022, 11:30 AM - Forum: New Game Releases - No Replies

Tiny Tina's Wonderlands



Embark on an epic adventure full of whimsy, wonder, and high-powered weaponry! Bullets, magic, and broadswords collide across this chaotic fantasy world brought to life by the unpredictable Tiny Tina, who makes the rules, changes the world on the fly, and guides players on their journey. Customize your own multiclass hero and loot, shoot, slash, and cast your way through outlandish monsters and treasure-filled dungeons on a quest to stop the tyrannical Dragon Lord. Everyone's welcome, so join the party, throw on your adventuring boots, and be Chaotic Great!

Publisher: 2K Games

Release Date: Mar 25, 2022




https://www.metacritic.com/game/pc/tiny-...onderlands

Print this item

  [Oracle Blog] The arrival of Java 12!
Posted by: xSicKxBot - 04-16-2022, 03:53 PM - Forum: Java Language, JVM, and the JRE - No Replies

The arrival of Java 12!

Follow OpenJDK on Twitter After the release of Java 9 in 2017, the Java platform release cadence has shifted away from a major release every 3+ years to a feature release every six-months. It provides developers more predictable access to continued enhancements. Feature releases now reliably occur i...

https://blogs.oracle.com/java/post/the-a...of-java-12

Print this item

  [Tut] How to Count the Occurrences of a List Element
Posted by: xSicKxBot - 04-16-2022, 03:53 PM - Forum: Python - No Replies

How to Count the Occurrences of a List Element

In this article, you’ll learn how to count the occurrences of a selected List element in Python.

To make it more fun, we have the following running scenario:

A Teacher from Orchard Elementary would like a script created for the 4th-grade students called “Count-Me“. She would like this script to do the following:

  • First, generate and display 10 random numbers on a single line.
  • Next, generate and display one (1) random number to find.
  • Prompt for the total occurrences found.
  • Display a message validating the solution.

? Question: How would we write the Python code to accomplish this task?

We can accomplish this task by one of the following options:

  • Method 1: Use NumPy and count()
  • Method 2: Use operator countOf()
  • Method 3: Use a For Loop
  • Method 4: Use a Counter()

Preparation


Before any data manipulation can occur, one (1) new library will require installation.

  • The NumPy library supports multi-dimensional arrays and matrices in addition to a collection of mathematical functions.

To install this library, navigate to an IDE terminal. At the command prompt ($), execute the code below. For the terminal used in this example, the command prompt is a dollar sign ($). Your terminal prompt may be different.

$ pip install numpy

Hit the <Enter> key on the keyboard to start the installation process.

If the installation was successful, a message displays in the terminal indicating the same.


Feel free to view the PyCharm installation guide for the required library.


Add the following code to the top of each code snippet. This snippet will allow the code in this article to run error-free.

import numpy as np
import random
import operator
from collections import Counter

? Note: The counter and collections libraries are built-in to Python and do not require installation.


Method 1: Use NumPy and count()


To count the total occurrences of an element inside a List, this example will use NumPy and the count() function.

the_list = list(np.random.choice(20, 20))
dup_num = the_list[random.randint(0, 19)]
dup_count = the_list.count(dup_num) try: print(the_list) check = int(input(f'How man times does the number {dup_num} appear in the list? ')) if check == dup_count: print(f'Correct! The answer is {check}.') else: print(f'Sorry! Try again!')
except ValueError: print(f'Incorrect value. Bye')

The previous code snippet performs the following steps:

  • Our first line generates and saves 20 random numbers to the_list.
  • Next, dup_num is created by generating and saving one (1) random number from the_list.
  • Finally, we determine how many occurrences of dup_num were found using count().
  • The result saves to dup_count.

Inside the try statement, the_list is output to the terminal.

The user is prompted to enter the total number of occurrences. To confirm, the user presses the <Enter> key. The value entered is then compared to dup_count, and a message indicates the outcome.

? Note: Click here for details on the try/except statement.


Method 2: Use operator countOf()


To count the total occurrences of a specified element inside a List, this example will use the countOf() function.

the_list = [random.randrange(0, 20) for num in range(20)]
dup_num = the_list[random.randint(0, 19)]
dup_count = operator.countOf(the_list, dup_num) try: print(the_list) check = int(input(f'How man times does the number {dup_num} appear in the list? ')) if check == dup_count: print(f'Correct! The answer is {check}.') else: print(f'Sorry! Try again!')
except ValueError: print(f'Incorrect value. Bye')

This code snippet performs the following steps:

  • Our first line generates and saves 20 random numbers to the_list.
  • Next, dup_num is created by generating and saving one (1) random number from the_list.
  • Finally, we determine how many occurrences of dup_num were found using operator.countOf().
  • The result saves to dup_count.

Inside the try statement, the_list is output to the terminal.

The user is prompted to enter the total number of occurrences. To confirm, the user presses the <Enter> key.

The value entered is then compared to dup_count, and a message indicates the outcome.


Method 3: Use a For Loop


To count the total occurrences of a specified element inside a List, this example will use the For Loop.

the_list = [random.randrange(0, 20) for num in range(20)]
dup_num = the_list[random.randint(0, 19)] dup_count = 0
for i in the_list: if i == dup_num: dup_count += 1 try: print(the_list) check = int(input(f'How man times does the number {dup_num} appear in the list? ')) if check == dup_count: print(f'Correct! The answer is {check}.') else: print(f'Sorry! Try again!')
except ValueError: print(f'Incorrect value. Bye')

The previous code snippet performs the following steps:

  • Our first line generates and saves 20 random numbers to the_list.
  • Next, dup_num is created by generating and saving one (1) random number from the_list.
  • Finally, a For Loop is instantiated. Upon each Loop, the element is matched against dup_num.
  • If found, dup_count is increased by one (1).

Inside the try statement, the_list is output to the terminal.

The user is prompted to enter the total number of occurrences. To confirm, the user presses the <Enter> key.

The value entered is then compared to dup_count, and a message indicates the outcome.


Method 4: Counter()


To count the total occurrences of a specified element inside a List, this example will use the Counter() initializer method.

the_list = [random.randrange(0, 20) for num in range(20)]
dup_num = the_list[random.randint(0, 19)]
d = Counter(the_list)
dup_count = d[dup_num] try: print(the_list) check = int(input(f'How man times does the number {dup_num} appear in the list? ')) if check == dup_count: print(f'Correct! The answer is {check}.') else: print(f'Sorry! Try again!')
except ValueError: print(f'Incorrect value. Bye')

The previous code snippet performs the following steps:

  • Our first line generates and saves 20 random numbers to the_list.
  • Next, dup_num is created by generating and saving one (1) random number from the_list.
  • Finally, a For Loop is instantiated. Upon each Loop, an element is matched against dup_num.
  • If found, dup_count is increased by one (1).

Inside the try statement, the_list is output to the terminal.

The user is prompted to enter the total number of occurrences. To confirm, the user presses the <Enter> key.

The value entered is then compared to dup_count, and a message indicates the outcome.


Summary


These four (4) methods of counting occurrences of a specified element inside a List should give you enough information to select the best one for your coding requirements.

Good Luck & Happy Coding!




https://www.sickgaming.net/blog/2022/04/...t-element/

Print this item

  (Indie Deal) Sniper Giveaways, Microids Sales
Posted by: xSicKxBot - 04-16-2022, 03:53 PM - Forum: Deals or Specials - No Replies

Sniper Giveaways, Microids Sales

Sniper Giveaways
[www.indiegala.com]

Pre-purchase Lila’s Sky Ark
[www.indiegala.com]
https://www.youtube.com/watch?v=8lxQfX8Io5c
Microids Publisher Sale, up to 93% OFF
[www.indiegala.com]
Stay Inside, Stay Safe and Enjoy Good Games.
Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


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

Print this item

  News - Best Weapons In Elden Ring
Posted by: xSicKxBot - 04-16-2022, 03:53 PM - Forum: Lounge - No Replies

Best Weapons In Elden Ring

Weapons in Elden Ring are what makes a character build go. They're the focal point for any player trying to make their way through the Lands Between with as few deaths as possible. While the weapons players can use will depend on the points they put into each Attribute, they can always respec their points after defeating Rennala, Queen of the Full Moon.

Whether players want a weapon for the long haul or simply want to try out different methods of combat, we've compiled a list of the top weapons in Elden Ring. This list is categorized by weapon type, with each category containing one or two weapons. Not every weapon category available in the game will be present, though.

We've also taken the point in Elden Ring when players can unlock these weapons into consideration. As an example, the Sacred Relic Sword is a fantastic weapon but players can only unlock it after defeating the final boss. Players who don't want to take on Journey 2 in New Game Plus won't be able to make use of that weapon in Elden Ring. The weapons on this list will be usable at some point before the final boss fight.

Continue Reading at GameSpot

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

Print this item

  PC - ITORAH
Posted by: xSicKxBot - 04-16-2022, 03:53 PM - Forum: New Game Releases - No Replies

ITORAH



Guide Itorah through a fantastic world inhabited by strange masked beings.

Mankind has vanished and Itorah seems to be the last of her kind! To uncover her past she will have to pick up her loud-mouthed axe and fight her way through lush forests, dangerous temples, stormy cliffs and more hand-painted biomes.

Their innocent quest for knowledge quickly turns into a mission to save this strange new world from its biggest threat: A mysterious plague that threatens to consume everything.

Publisher: Grimbart Tales

Release Date: Mar 21, 2022




https://www.metacritic.com/game/pc/itorah

Print this item

  [Tut] How to Create Word Clouds Using Python?
Posted by: xSicKxBot - 04-15-2022, 08:19 PM - Forum: Python - No Replies

How to Create Word Clouds Using Python?

You may have already learned how to analyze quantitative data using graphs such as bar charts and histograms.

But do you know how to study textual data?

One way to analyze textual information is by using a word cloud:

Figure 0: Word cloud you’ll learn how to create in this article.

There are many ways to create word clouds, but we will use the WordCloud library in this blog post. WordCloud is a Python library that makes word clouds from text files.

What Are Word Clouds?


? Definition: A word cloud (also known as a tag cloud) is a visual representation of the words that appear most frequently in a given text. They can be used to summarize large bodies of text or to visualize the sentiment of a document.

A word cloud is a graphical representation of text data in which the size of each word is proportional to the number of times it appears in the text.

They can be used to visualize the most critical words in a document quickly or to get an overview of the sentiment of a piece of text.

There are word clouds apps such as Wordle, but in this blog post, we will show how to create word clouds using the Python library WordCloud.

What’s the WordCloud Library in Python?


The WordCloud library is open source and easy to use to create word clouds in Python.

It allows you to create word clouds in various formats, including PDF, SVG, and image files.

In addition, it provides several options for customizing your word clouds, including the ability to control the font, color, and layout.

You can install it using the following command in your terminal (without the $ symbol):

$ pip install wordcloud

Related Article:

Where Are Word Clouds Used?


Word clouds are a fun and easy way to visualize data.

By displaying the most common words in a given text, they can provide insights into the overall themes and tone of the text.

  • Word clouds can be used for various purposes, from educational to marketing.
  • They can use word clouds for vocabulary building and text analysis in the classroom.
  • You can also use word clouds to generate leads or track customer sentiment.
  • For businesses, word clouds can be used to create marketing materials, such as blog posts, infographics, and social media content.
  • Word clouds can also monitor customer feedback or identify negative sentiment.
  • Students can also use word Clouds to engage in an analysis of a piece of text. By visually highlighting the most important words, Word Clouds can help students to identify the main ideas and make connections between different concepts.

Pros of Word Clouds


The advantages of using word clouds are:

First, you can use them to summarize a large body of text quickly and easily. Identifying the most frequently used words in a text can provide a quick overview of the main points.

Second, with word clouds, you can quickly visualize the sentiment in a document. The size and placement of words in the Word Cloud can give you insights into the overall tone of the document. This tool is handy when analyzing a large body of text, such as customer feedback or reviews.

Third, word clouds can be a valuable tool for identifying the most critical keywords in a text. By analyzing the distribution of words, you can quickly identify which terms are most prominent. The word clouds can be beneficial when monitoring changing trends or assessing the overall importance.

Fourth, word clouds can be used to create designs that incorporate both visual and textual elements. By blending words and images, word clouds can add another layer of meaning to an already exciting design.

How to Create Word Clouds in Python?


We will be using Disneyland reviews downloaded from Kaggle to create a word cloud data visualization.

You can download the file from here.

In this file, we will be focussing on the Review_Text column for creating a word cloud. You can ignore other columns.

First, you have to install the WordCloud Python library. You can do this by running the following command in a terminal:

pip install wordcloud

Once you have installed WordCloud, you must import pandas, matplotlib.pyplot, and wordcloud libraries.

import pandas as pd
from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt

The pandas library reads the Disneyland reviews CSV file into a data frame.

We will show you the use of STOPWORDS in the upcoming section.

The data frame variable “df” stores the data from the disneylandreviews.csv file with the following command.

df = pd.read_csv("/Users/mohamedthoufeeq/Downloads/DisneylandReviews.csv")

Now run the program and see the output.

You get the following Unicode decode error.

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf4 in position 121844: invalid continuation byte

The Unicode decode error means that the string could not be properly decoded into UTF-8. This can happen when a file is downloaded from the Kaggle, and it is not in the correct encoding format.

To solve this problem, you need to specify the encoding format for the file. You can type the following command in a terminal:

df = pd.read_csv("/Users/mohamedthoufeeq/Downloads/DisneylandReviews.csv",encoding='ISO-8859-1')

The encoding = 'ISO-8859-1' tells pandas that the file is in the ISO-8859-1 encoding format.

Next, create a word cloud using the WordCloud Python library.

wordcloud = WordCloud().generate(['Review_Text'])

In this above code, WordCloud().generate() is used to create a word cloud object.

The generate() function takes a list of strings as input. The list we are interested in is Review_Text which contains reviews about Disney Land. The words from the review you want to appear in your word cloud.

Go ahead and run the code.

You get again following error.

TypeError: expected string or bytes-like object

The type error means that the word cloud object expects a string or a bytes-like object. But the data type is Pandas series.

To solve this, You have to type following command

wordcloud = WordCloud().generate(' '.join(df['Review_Text']))

The above command converts the series to strings data type.

plt.imshow(wordcloud)

The plt.imshow() call will create a word cloud image in 2D.

Then remove the axis with the following command:

plt.axis("off")

The "off" parameter removes the axis from the plot.

Finally, the below commands displays the image of the word cloud.

plt.show()

Once run the program you will see a word cloud image as shown below:

Figure 1. 

The word "Park" is bigger, representing that this word appears more in reviews.

But there are words such as "Disneyland", "went", "will", "park", "go", "day", and "One" that are unrelated for analysis.

So we can exclude them from the word cloud with the following command using the stopwords parameter.

STOPWORDS.update(['Disneyland', 'went','will,'go',"park", "day","one"])
wordcloud = WordCloud(stopwords = STOPWORDS).generate(' '.join(df['Review_Text']))

STOPWORDS will remove all the defined words from the text before creating the word cloud. The word cloud function inserts the STOPWORDS parameter.

Now re-run the program, and you will get the following word cloud image.

Figure 2. 

Before we can analyze the words, let us see how to customize the words’ appearance.

You can also customize the appearance of your word cloud by changing the font size and background color.

The maximum font size can be set with the max_font_size option, and the minimum font size can be set with the min_font_size option. The background color of the word cloud can be set with the background_color option.

wordcloud = WordCloud(min_font_size = 10, max_font_size = 70, stopwords = STOPWORDS, background_color="white").generate(' '.join(df['Review_Text']))

The code sets the font size to a minimum of 10 points and a maximum of 70 points, and the background color to white.

Re-run the program, and you will get the following word cloud image.

Figure 3. 

Also, you can set the maximum amount of words to be generated using the max_words parameter.

wordcloud = WordCloud(min_font_size = 5, max_font_size = 100, max_words = 1000, stopwords = STOPWORDS, background_color="white").generate(' '.join(df['Review_Text']))

The above code sets the maximum number of words generated in the word cloud to 1000. Also, change the font size to 5 and 100.

Re-run the program, and you will get the following word cloud.

Figure 4. 

As you can see, when you increase the number of words to 1000, the words that are repeated more in the reviews are shown in a larger size.

This makes it easier to find out which words are prominent. In this word cloud, you can see that "ride" is the largest word.

You set width and height  of the word cloud image.

wordcloud = WordCloud(width=350, height=350, min_font_size=5, max_font_size=100, max_words=1000, stopwords=STOPWORDS, background_color="white").generate(' '.join(df['Review_Text']))

The above code sets the width and height of the word cloud to 350.

Re-run the program, and you will get the following word cloud image.

Figure 5. 

Now let’s analyze the word cloud to get some insights.

The word "ride" appears large in the word cloud as it is the most frequent word in the text. Most people like to ride in Disneyland, which is reflected in the word cloud. 

Next, the word "attraction" is also popular. It shows that people are attracted to the rides and attractions in Disneyland. 

Also, the word "time" appears frequently. The word indicates that people spend a lot of time in Disneyland. 

Staffs of Disney land were very lovely. It is reflected in the word cloud as the word "nice" appears frequently. From the reviews, we can see that there are more queues and people are waiting for a long time, which is also reflected in the word cloud.

The words "lines" and "queue" are also more prominent words in the text.

But the word "hotel" is not popular in the text and represents that people do not prefer to stay in the hotel and go back home after spending the whole day in Disneyland.

? Exercise: You can get more insights by analyzing the word cloud data. Try it out!

Summary


Word clouds are a great way to summarize large bodies of text or visualize a document’s sentiment.

Word clouds are a great way to understand large bodies of text and can be used for various purposes.

This blog post showed how to create word clouds using the Python library WordCloud.

We also discussed how to customize the appearance of the word cloud and analyzed the word cloud data to get insights into the text.

What do you use?




https://www.sickgaming.net/blog/2022/04/...ng-python/

Print this item

  [Oracle Blog] Java Magazine on Lightweight Frameworks
Posted by: xSicKxBot - 04-15-2022, 08:19 PM - Forum: Java Language, JVM, and the JRE - No Replies

Java Magazine on Lightweight Frameworks

By Java Magazine Editor Andrew Binstock Running Fast and Light Without All the Baggage The emergence of microservices as the new architecture for applications has led to a fundamental change in the way we use frameworks. Previously, frameworks offered an omnibus scaffolding that handled most needs o...

https://blogs.oracle.com/java/post/java-...frameworks

Print this item

  (Indie Deal) Power Concept Bundle, GameMill Nickelodeon Deals
Posted by: xSicKxBot - 04-15-2022, 08:18 PM - Forum: Deals or Specials - No Replies

Power Concept Bundle, GameMill Nickelodeon Deals

Power Concept Bundle | 6 Steam Games | 92% OFF
[www.indiegala.com]
Get a powerful game selection, that both in concept and in practice is ready for you to play, including: Dead Event, Suits: Absolute Power, Devious Dungeon 2, Concept Destruction, Mekabolt, Random Heroes: Gold Edition.

GameMill Entertainment Sale, up to 90% OFF
[www.indiegala.com]
https://www.youtube.com/watch?v=NJXmermA7uY
Stay Inside, Stay Safe and Enjoy Good Games.
Check out IndieGala on Twitter, YouTube & Facebook[www.facebook.com]


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

Print this item

  News - The Secrets Of Dumbledore Should Close The Book On Fantastic Beasts
Posted by: xSicKxBot - 04-15-2022, 08:18 PM - Forum: Lounge - No Replies

The Secrets Of Dumbledore Should Close The Book On Fantastic Beasts

The third installment of the Fantastic Beasts series of films, The Secrets of Dumbledore, is in theaters now. The film, which follows 2018's The Crimes of Grindelwald, makes for a proper ending to this particular offshoot of the Wizarding World of Harry Potter films. With that in mind, perhaps it's time to close the book on the adventures of Newt Scamander.

Warning: The following contains spoilers for the film Fantastic Beasts: The Secrets of Dumbledore. If you haven't seen the film and don't want to be spoiled, stop reading now.

In the 21 years since the first Harry Potter movie debuted back in 2021, many things have changed. The fanbase has grown up--and in many cases moved on. But more than that, a lot of the magic has seemingly been lost. There are a number of reasons for that, some of which are rather simple. The characters of the Fantastic Beasts movies aren't as engaging or well-crafted as those fans loved in the Harry Potter films or books.

Continue Reading at GameSpot

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

Print this item

 
Latest Threads
Insta360 Sale USA – Get F...
Last Post: tomen8
1 hour ago
Insta360 USA Coupon [INRS...
Last Post: tomen8
1 hour ago
Insta360 USA Coupon [INRS...
Last Post: tomen8
1 hour ago
Insta360 X5 Deal – Free S...
Last Post: tomen8
1 hour ago
Insta360 July 2026 Offer ...
Last Post: tomen8
1 hour ago
Save 5% on Insta360 Produ...
Last Post: tomen8
1 hour ago
Insta360 Offer Code [INRS...
Last Post: tomen8
1 hour ago
Insta360 Camera 20% Off C...
Last Post: tomen8
1 hour ago
Insta360 Coupon Code – [I...
Last Post: nivex000
1 hour ago
Exclusive Insta360 Coupon...
Last Post: nivex000
1 hour ago

Forum software by © MyBB Theme © iAndrew 2016