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,978
» Forum posts: 22,945

Full Statistics

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

Latest Threads
[WoW Retail News] Stat Sq...
Forum: World of Warcraft
Last Post: xSicKxBot

» Replies: 0
» Views: 7
BO6 & Warzone devs promis...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 9
I Thought Block Blast Was...
Forum: Lounge
Last Post: starfishmil

» Replies: 0
» Views: 11
[PS.Blog] Silent Hill: To...
Forum: Sony Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 8
[Steam Release] Good Comp...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 11
[DevBlog MS] Performance ...
Forum: C#, Visual Basic, & .Net Frameworks
Last Post: xSicKxBot

» Replies: 0
» Views: 18
[WoW Retail News] Over 20...
Forum: World of Warcraft
Last Post: xSicKxBot

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

» Replies: 0
» Views: 21
[Steam Release] Raft, 15%...
Forum: New Game Releases
Last Post: xSicKxBot

» Replies: 0
» Views: 17
Marvel Rivals Ace icon ex...
Forum: PC Discussion
Last Post: xSicKxBot

» Replies: 0
» Views: 21

 
  [Tut] Spectacular Titles: An Easy Python Project Generating Catchy Titles
Posted by: xSicKxBot - 01-01-2023, 12:21 PM - Forum: Python - No Replies

Spectacular Titles: An Easy Python Project Generating Catchy Titles

5/5 – (1 vote)

? Project Goal: Create a small Python script that automatically creates catchy titles similar to the one you just read, given a certain topic.

A Story on Creating Catchy Titles with Python



Once upon a time, there lived a small business owner who was looking for a new way to make their business stand out from the competition. They had heard about the power of using titles to grab attention and draw in customers, but they weren’t sure how to create titles that were both effective and memorable.

That’s when the small business owner heard about Python. They decided that using a Python script to generate titles would be the perfect solution. With a Python script, they could easily create titles with all the elements they wanted while still keeping their content fresh and unique.

? Recommended: 3 Habits That Can Make You Rich as a Python Freelancer

The small business owner was excited to try out Python and soon discovered that it was much easier and faster to generate titles than they ever thought possible. They were also able to customize their titles with different words, phrases, and symbols to make them even more eye-catching.

The small business owner was so pleased with their new titles that they started to see a huge increase in their customer base. From then on, they used Python to generate titles for all their marketing materials and campaigns, and the results were impressive.

And that’s the story of why the small business owner decided to create titles using a Python script.

(Well, most likely I won’t use it a lot — but it was fun anyways.)

Python Random Title Generator


To create a function that generates titles randomly, you can start by defining the function with four parameters – topics, words, adjectives, and verbs. Inside the function, randomly select one item from each of the four provided lists and combine them into a title. Return the generated title — and voilà, your title generator is ready!

# import relevant libraries
import random # create a list of topics
topics = ['Sports', 'Messi', 'Football', 'Soccer', 'Basketball', 'Tennis', 'Golf', 'Hockey'] # create a list of words
words = ['Incredible', 'Unbelievable', 'Spectacular', 'Mind-Blowing', 'Staggering', 'Incredulous', 'Astonishing', 'Breathtaking'] # create a list of adjectives
adjectives = ['Amazing', 'Astounding', 'Extraordinary', 'Stunning', 'Remarkable', 'Fascinating', 'Stupendous', 'Striking'] # create a list of verbs
verbs = ['Journey', 'Adventure', 'Voyage', 'Expedition', 'Journey', 'Quest', 'Pilgrimage', 'Quest'] # define a function to generate the titles
def generate_title(topics, words, adjectives, verbs): # choose a random topic topic = random.choice(topics) # choose a random word word = random.choice(words) # choose a random adjective adjective = random.choice(adjectives) # choose a random verb verb = random.choice(verbs) # generate the title title = '{} {} {}: A {} of {}'.format(adjective, word, topic, verb, topic) # return the title return title

This code snippet is used to generate random titles with a specific topic. It imports the random library which is used to choose words from the lists of topics, words, adjectives, and verbs.

The generate_title() function takes the lists as parameters and chooses a random entry from each list. It then creates a title with the chosen words and returns it.

Here’s an example output run:

for i in range(20): # call the function to generate a title title = generate_title(topics, words, adjectives, verbs) # print the title print(title)

The for loop calls the function 20 times and prints the generated titles.

Output:

Amazing Spectacular Hockey: A Adventure of Hockey
Remarkable Breathtaking Basketball: A Expedition of Basketball
Stupendous Mind-Blowing Golf: A Expedition of Golf
Stunning Mind-Blowing Football: A Quest of Football
Extraordinary Spectacular Hockey: A Adventure of Hockey
Amazing Unbelievable Hockey: A Journey of Hockey
Astounding Staggering Hockey: A Adventure of Hockey
Astounding Mind-Blowing Basketball: A Journey of Basketball
Remarkable Incredible Tennis: A Voyage of Tennis
Astounding Incredible Hockey: A Journey of Hockey
Astounding Spectacular Messi: A Journey of Messi
Stupendous Breathtaking Sports: A Journey of Sports
Fascinating Mind-Blowing Tennis: A Quest of Tennis
Amazing Astonishing Football: A Journey of Football
Amazing Mind-Blowing Sports: A Journey of Sports
Extraordinary Breathtaking Tennis: A Quest of Tennis
Extraordinary Astonishing Football: A Journey of Football
Astounding Spectacular Messi: A Expedition of Messi
Stupendous Mind-Blowing Messi: A Quest of Messi
Striking Spectacular Soccer: A Voyage of Soccer

I would certainly click. Wouldn’t you? ?




https://www.sickgaming.net/blog/2022/12/...hy-titles/

Print this item

  (Indie Deal) Massive Royalty-Free Music Bundle, Soundtrack Giveaways, 505 Games
Posted by: xSicKxBot - 01-01-2023, 12:20 PM - Forum: Deals or Specials - No Replies

Massive Royalty-Free Music Bundle, Soundtrack Giveaways, 505 Games

Massive Music Bundle ?| 10 Royalty-Free Albums | 98% OFF
[www.indiegala.com]
Soundtracks to score your projects. Make it big with entire packs of songs and beats for your games, films, and video projects with this massive bundle of royalty-free music! The Arcade Origins Music Pack brings a variety of genres with the volumes focusing on: Action, Cyberpunk, Casual, Thriller, Sci-Fi, Dark Fantasy, Epic, Military, Peplum and more.

Soundtrack Giveaways
[www.indiegala.com]
https://www.youtube.com/watch?v=0NNV4AcFV04
505 Games & PQube Sales
[www.indiegala.com]
Don't forget you may get up to 3 extra BONUS games with each purchase. Read more here[www.indiegala.com].
https://www.youtube.com/watch?v=H73-V8jS11w


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

Print this item

  (Free Game Key) Severed Steel - 24 hours only - Epic Games
Posted by: xSicKxBot - 01-01-2023, 12:20 PM - Forum: Deals or Specials - No Replies

Severed Steel - 24 hours only - Epic Games

Severed Steel - 24 hours only

To grab the game for free:
- Go to the store page of Severed Steel
- https://store.epicgames.com/p/severed-steel
- Click on the GET Button
- Verify that the price is zero
- Click on the Place Order Button
- That's it, the game will be added to you Epic Games Account

This game is free to keep if claimed by December 27, 2022 5:00 PM or in a day


We are welcoming everyone to join our discord[discord.gg]. We are more active there on finding giveaways, small or large, and there are daily raffles you can participate.

?GrabFreeGames.com ?Twitter ?Steam Curator ?Facebook[fb.me]?Discord[discord.gg]
❤️Support us: HumbleBundle Partner[www.humblebundle.com] Fanatical Affiliate[www.fanatical.com]


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

Print this item

  PC - Blacktail
Posted by: xSicKxBot - 01-01-2023, 12:20 PM - Forum: New Game Releases - No Replies

Blacktail



Create the myth of Baba Yaga by living out the origins of this classic Slavic folk story in BLACKTAIL, the first-person action-adventure from THE PARASIGHT. Experience a one-of-a-kind blend of intense archery combat and dark storytelling set in a vibrant fairy tale world. Choose your path to become either the guardian of the woods or the terror nightmares are made of.

You play as Yaga, a 16-year-old girl accused of witchcraft and expelled from an early medieval Slavic settlement. When living memories of her past return as foul, walking spirits, Yaga is faced with no other option than to hunt them down in hopes of unravelling her own mystery.

Publisher: Focus Home Interactive

Release Date: Dec 15, 2022




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

Print this item

  [Oracle Blog] GraalVM Enterprise helps save energy when running Java applications
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: Java Language, JVM, and the JRE - No Replies

GraalVM Enterprise helps save energy when running Java applications

GraalVM Enterprise executes applications faster, uses fewer compute resources and saves energy


https://blogs.oracle.com/java/post/graal...plications

Print this item

  [Tut] Python Generate HTML – 3 Easy Ways
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: Python - No Replies

Python Generate HTML – 3 Easy Ways

5/5 – (4 votes)

? Problem Statement: How to generate HTML documents in Python?

One of the advantages of opting for Python as your programming language is that it is one of the most versatile languages, as it emphasizes code readability with extensive use of white space. It supports a large collection of libraries that serves various purposes, which include generating HTML documents in Python.

Before we dive into the libraries, let us learn how we can actually write to an HTML file in Python.

How to Write to an HTML File in Python?


You can create and save HTML files with the help of a few simple steps:

  1. Use the open() file function to create the HTML file.
  2. Add input data in HTML format into the file with the help of the write() function.
  3. Finally, save and close the file.

Example:

# Creating the HTML file
file_html = open("demo.html", "w") # Adding the input data to the HTML file
file_html.write('''<html>
<head>
<title>HTML File</title>
</head> <body>
<h1>Welcome Finxters</h1> <p>Example demonstrating How to generate HTML Files in Python</p> </body>
</html>''') # Saving the data into the HTML file
file_html.close()

Output: Here’s how the demo.html file looks like. ?

<html>
<head>
<title>HTML File</title>
</head> <body>
<h1>Welcome Finxters</h1> <p>Example demonstrating How to generate HTML Files in Python</p> </body>
</html>

When you open it in the browser, it looks like this:


Method 1: Using the Airium Library


Airium is a bidirectional HTML-Python translator that uses the DOM structure and is represented by the Python indentation with context managers.

We need to install the airium module using the Python package installer by running the following code in the terminal:

pip install airium == 0.2.5

The biggest advantage of using the Airium library in Python is that it also has a reverse translator. This translator helps to build the Python code out of the HTML string.

Example: The following example demonstrates how we can generate HTML docs using Airium.

# Importing the airium library
from airium import Airium a = Airium() # Generating HTML file
a('<!DOCTYPE html>') with a.html(lang="pl"): with a.head(): a.meta(charset="utf-8") a.title(_t="Example: How to use Airium library") with a.body(): with a.h1(id="id23345225", kclass='main_header'): a("Hello Finxters") # Casting the file to a string to extract the value
html = str(a) # Casting the file to UTF-8 encoded bytes:
html_bytes = bytes(a) print(html)

Output:

<!DOCTYPE html>
<html lang="pl"> <head> <meta charset="utf-8" /> <title>Example: How to use Airium library</title> </head> <body> <h1 id="id23345225" kclass="main_header"> Hello Finxters </h1> </body>
</html>

You can also store this document as a file using the following code:

with open('file.html', 'wb') as f: f.write(bytes(html, encoding='utf8'))

Method 2 – Using Yattag Library


Yattag is a Python library used to generate HTML or XML documents in a Pythonic way. If we are using the Yattag library, we don’t have to use the closing tag in HTML. It considers all the templates as the piece of code in Python. We can even render the HTML forms easily with default values and error messages.

Before we dive into the solution, let us have a quick look at a few basics.

How does the yattag.Doc class work?

Yattag.Doc works similarly to the join() method of the string. When we create a Doc instance, it uses its method to append the content to it, like the text() method is used to append the text, whereas the tag() method appends the HTML tag. Lastly, the getvalue() method is used to return the whole HTML content as a large string. 

What is the tag() method?

In Python, a tag() method is an object that is used inside a with statement. It is used to return a context manager. The context managers have __enter__() and __exit__() methods where the __enter__ method is called at the starting of the with block and the __exit__ method is called when leaving the with block.

The line tag('h1') is used to create a <h1> tag.

Example:

# Importing the Yattag library
from yattag import Doc doc, tag, text = Doc().tagtext() with tag('html'): with tag('body'): with tag('p', id = 'main'): text('We can write any text here') with tag('a', href = '/my-link'): text('We can insert any link here') result = doc.getvalue()
print(result)

Output:

<html><body><p id="main">We can write any text here</p><a href="/my-link">We can insert any link here</a></body></html>

It is easier and more readable to generate dynamic HTML documents with the Yattag library than to write static HTML docs. 

However, most of the time, when you are generating HTML documents, most of the tag nodes will contain only text. Hence, we can use the following line method to write these more concisely.

Example:

doc, tag, text, line = Doc().ttl()
with tag('ul', id = 'To-dos'): line('li', 'Clean up the dishes', kclass = "priority") line('li', 'Call for appointment') line('li', 'Complete the paper')

Output:

<ul id = 'To-dos'> <li class = "priority"> Clean up the dishes </li> <li> Call for appointment </li> <li> Complete the paper </li>
</ul>

Method 3: Using xml.etree


We can use the XML.etree package to generate some low-level HTML documents in Python. The XML.etree is a standard python package, and we need to import it into the program before utilizing it.

XML follows the hierarchical data format and is usually represented in the form of an element tree. The element tree also has two classes for this purpose.

  • The first one is the ElementTree that represents the whole XML document as a tree and interacts with the whole document (reading and writing to and from the files.)
  • The second class is the Element that represents a single node in this tree that interacts with a single XML element and its sub-elements.

Example:

# Importing the XML package and the sys module
import sys
from xml.etree import ElementTree as ET html = ET.Element('html')
body = ET.Element('body')
html.append(body)
div = ET.Element('div', attrib={'class': 'foo'})
body.append(div)
span = ET.Element('span', attrib={'class': 'bar'})
div.append(span)
span.text = "Hello Finxters. This article explains how to generate HTML documents in Python." # Here, the code checks the Python version.
if sys.version_info < (3, 0, 0): # If the Python version is less than 2.0 ET.ElementTree(html).write(sys.stdout, encoding='utf-8', method='html')
else: # For versions Python 3 and above ET.ElementTree(html).write(sys.stdout, encoding='unicode', method='html')

Output:

<html><body><div class="foo"><span class="bar">Hello Finxters. This article explains how to generate HTML documents in Python.</span></div></body></html>

Conclusion


That’s all about generating HTML documents in Python. I hope you found this article helpful. Please stay tuned and subscribe for more such interesting articles. Happy learning!

Authors: Rashi Agarwal and Shubham Sayon

Recommended Read: How to Get an HTML Page from a URL in Python?


Web Scraping with BeautifulSoup


One of the most sought-after skills on Fiverr and Upwork is web scraping .

Make no mistake: extracting data programmatically from web sites is a critical life-skill in today’s world that’s shaped by the web and remote work.

This course teaches you the ins and outs of Python’s BeautifulSoup library for web scraping.



https://www.sickgaming.net/blog/2022/12/...easy-ways/

Print this item

  (Free Game Key) Worms Revolution Gold Edition - Free GOG Game
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: Deals or Specials - No Replies

Worms Revolution Gold Edition - Free GOG Game

How to grab Worms Revolution Gold Edition
- Go to the home page of https://www.gog.com/#giveaway
- Login and Register
- Go to the home page again
- Wait for 10 seconds then start searching for Worms Revolution Gold Edition
- on the home page look for "Deal of the Day" (above it there should be a banner)
- on the banner there is a button "Yes, and claim the game" click it
- Thats it


GOG Store link: https://www.gog.com/game/Worms_Revolution
Auto-claim link: https://www.gog.com/giveaway/claim

We are welcoming everyone to join our discord[discord.gg]. We are more active there on finding giveaways, small or large, and there are daily raffles you can participate.

?GrabFreeGames.com ?Twitter ?Steam Curator ?Facebook[fb.me]?Discord[discord.gg]
❤️Support us: HumbleBundle Partner[www.humblebundle.com] Fanatical Affiliate[www.fanatical.com]


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

Print this item

  (Indie Deal) Festive Giveaways, Disney Deals, Last Of Us coming to PC
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: Deals or Specials - No Replies

Festive Giveaways, Disney Deals, Last Of Us coming to PC

Winter Sales Top Deals
[www.indiegala.com]
Don't forget you may get up to 3 extra BONUS games with each purchase. Read more here[www.indiegala.com].
[www.indiegala.com]
The Last of Us™ Part I coming to PC
[www.indiegala.com]
https://www.youtube.com/watch?v=LW5NwaUXgIA
Festive Giveaways
[www.indiegala.com]
https://www.youtube.com/watch?v=-fZVwrT4uaM


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

Print this item

  PC - Potion Craft: Alchemist Simulator
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: New Game Releases - No Replies

Potion Craft: Alchemist Simulator



Potion Craft is an alchemist simulator where you physically interact with your tools and ingredients to brew potions. You're in full control of the whole shop: invent new recipes, attract customers and experiment to your heart's content. Just remember: the whole town is counting on you.

Every day customers will come to your store looking for solutions to their problems. You will face consequences depending on what you decide to sell them. Attract guilds, befriend notable figures (or feud with them), gain riches and influence - and one day, you may even decide the fate of the whole town.

Publisher: niceplay games

Release Date: Dec 13, 2022




https://www.metacritic.com/game/pc/potio...-simulator

Print this item

  News - Elden Ring: Where To Get Great Glintstone Shard
Posted by: xSicKxBot - 12-31-2022, 02:12 PM - Forum: Lounge - No Replies

Elden Ring: Where To Get Great Glintstone Shard

Are you on a quest to obtain every Elden Ring spell? Well, if so, you'll need to make sure you get your hands on Great Glintstone Shard, even if it's not the most efficient spell to add to your arsenal. Getting it doesn't take too much effort, luckily, but we'll walk you through the necessary steps in this guide.

Great Glintstone Shard explained

Great Glintstone Shard is a sorcery that requires 16 Intelligence to cast. It fires a large projectile that can kill many smaller enemies in a single hit, but due to its high FP cost, it's rarely worth using it over something more efficient like Glintstone Pebble.

Great Glintstone Shard's item description reads:

Continue Reading at GameSpot

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

Print this item