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,139
» Latest member: demble8888
» Forum threads: 21,967
» Forum posts: 22,838

Full Statistics

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

 
  News - Hideo Kojima Marks The 8-Year Anniversary Of PT
Posted by: xSicKxBot - 08-14-2022, 05:49 PM - Forum: Lounge - No Replies

Hideo Kojima Marks The 8-Year Anniversary Of PT

Hideo Kojima has marked the eighth anniversary of PT with a quick tweet, posting an image of the cover art from the secret Silent Hill game that was canceled in its prime. Hollywood director Guillermo del Toro also added a quicker and possibly saltier response to Kojima's tweet. Del Toro's tweet, consisting of just the letters "FK," is likely meant to convey his disdain for Konami and its decisions at the time.

Originally directed by Kojima when he was still employed at Konami, PT is a first-person horror game in which players have to navigate a haunted house. A small showcase of spooky supernatural disturbances, cryptic puzzles, and running for your life whenever you encountered a malevolent ghost named Lisa, PT was eventually revealed to be a playable teaser for a new game in the Silent Hill series, Silent Hills.

The original plan was for Kojima and del Toro to helm the Kojima Productions project, which also featured a protagonist portrayed by Walking Dead star Norman Reedus. Kojima wanted to create a unique atmosphere in which to scare people with PT--an idea that was enhanced by famed horror manga artist Junji Ito's contributions--and as fans discovered, the model of Lisa was cleverly tethered directly behind the protagonist once they discovered the flashlight and explained how she was able to constantly shock players.

Continue Reading at GameSpot

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

Print this item

  PC - Hard West 2
Posted by: xSicKxBot - 08-14-2022, 05:49 PM - Forum: New Game Releases - No Replies

Hard West 2



Hard West 2 is a journey to the heart of darkness in the American West. Take control of a supernatural posse and catch the mysterious Ghost Train. Outsmart, outcheat and outgun your enemies in this turn-based tactics game set in a Wild West world where nothing is as it seems.

Publisher: Good Shepherd Entertainment

Release Date: Aug 04, 2022




https://www.metacritic.com/game/pc/hard-west-2

Print this item

  [Tut] How to Convert Tab-Delimited File to CSV in Python?
Posted by: xSicKxBot - 08-14-2022, 01:12 AM - Forum: Python - No Replies

How to Convert Tab-Delimited File to CSV in Python?

5/5 – (1 vote)

The easiest way to convert a tab-delimited values (TSV) file to a comma-separated values (CSV) file is to use the following three lines of code:

  1. import pandas as pd
  2. df = pd.read_csv('my_file.txt', sep='\t', header=None)
  3. df.to_csv('my_file.csv', header=None)

We’ll explain this and other approaches in more detail next—scroll down to Method 3 for this exact method.

Problem Formulation


Given a tab-delimited file with one tab character '\t' between two values in a given column.

Input: 'my_file.tsv'

Figure: File 'my_file.tsv' with tab '\t' separated values.

Alice	DataScience	$100000
Bob Programmer $90000
Carl Manager $122000
Dave Freelancer $144000

How to convert the tab-delimited values (TSV) to a comma-separated values (CSV) file?

Output: 'my_file.csv'

0,Alice,DataScience,$100000
1,Bob,Programmer,$90000
2,Carl,Manager,$122000
3,Dave,Freelancer,$144000

We’ll also look at slight variations of this problem. Let’s go!

Method 1: String Replace Single Tab


The most straightforward way to convert a tab-delimited (TSV) to a comma-separated (CSV) file in Python is to replace each tabular character '\t' with a comma ',' character using the string.replace() method. This works if two values are separated by exactly one tabular character.

Here’s an example input file 'my_file.tsv':


Here’s an example of some code to convert the tab-delimited file to the CSV file:

with open('my_file.tsv') as f: # Read space-delimited file and replace all empty spaces by commas data = f.read().replace('\t', ',') # Write the CSV data in the output file print(data, file=open('my_file.csv', 'w'))

Output file 'my_file.csv':


If you have any doubts, feel free to dive into our related tutorials:

Method 2: Regex Replace Arbitrary Tabs


To replace one '\t' or more tabs '\t\t\t' between two column values with a comma ',' and obtain a CSV, use the regular expressions operation re.sub('[\t]+', ',', data) on the space-separated data.

If you have any doubts, feel free to dive into our related tutorials:

Here’s an example input file 'my_file.tsv', notice the additional tabular characters that may separate two column values:


Here’s an example of some code to convert the TSV to the CSV file:

import re with open('my_file.txt') as infile: # Read space-delimited file and replace all empty spaces by commas data = re.sub('[ ]+', ',', infile.read()) # Write the CSV data in the output file print(data, file=open('my_file.csv', 'w'))

Output file 'my_file.csv':


Method 3: Pandas read_csv() and to_csv()


To convert a tab-delimited file to a CSV, first read the file into a Pandas DataFrame using pd.read_csv(filename, sep='\t+', header=None) and then write the DataFrame to a file using df.to_csv(outfilename, header=None).

Here’s an example input file 'my_file.tsv':


Here’s an example of some code to convert the tab-delimited file to the CSV file:

import pandas as pd # Read space-delimited file
df = pd.read_csv('my_file.tsv', sep='\t+', header=None) # Write DataFrame to file
df.to_csv('my_file.csv', header=None)

Output file 'my_file.csv':


You can also use the simpler sep='\t' if you are sure that only a single tabular character separates two column values.

If you have any doubts, feel free to dive into our related tutorials:

Summary


We examined three great ways to convert a space-delimited to a comma-separated CSV file:

Thanks for taking the time to read this article, my friend! ??


Regex Humor


Wait, forgot to escape a space. Wheeeeee[taptaptap]eeeeee. (source)



https://www.sickgaming.net/blog/2022/08/...in-python/

Print this item

  News - Elden Ring Modder Obtained Pre-Release Build And Streamed It
Posted by: xSicKxBot - 08-14-2022, 01:12 AM - Forum: Lounge - No Replies

Elden Ring Modder Obtained Pre-Release Build And Streamed It

Streamer and video game modder Lance McDonald has somehow obtained a pre-release version of Elden Ring and recently streamed it on Twitch.

On a now deleted Tweet, McDonald claimed that the pre-release version has "HEAPS of unfinished stuff, different items, enemies, mechanics, character names, and full debug camera mode." The version comes from around two months before release, according to McDonald. While this version may contain some cut content, it is also clearly unfinished. McDonald noted on the stream that some weapons have incorrect movesets, and that some NPC questlines don't activate properly. McDonald is a prolific modder and content creator, probably best known for creating a 60fps patch for Bloodborne.

Though From Software has not commented on how Elden Ring has changed over development, several other hackers and modders have found abandoned mechanics or ideas by digging in the game's source test and network test build. For example, McDonald contributed to finding a cut dream capturing questline. YouTuber Zellie the Witch unearthed that Torrent used to have an attack. The discovery of this pre-release build might yet reveal more previously unknown secrets. Because there is such a dedicated community for From Software games, we can get a fascinatingly incomplete understanding of what the game was like during development and what it might have been in an alternate world.

Continue Reading at GameSpot

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

Print this item

  PC - Hooked on You: A Dead by Daylight Dating Sim
Posted by: xSicKxBot - 08-14-2022, 01:12 AM - Forum: New Game Releases - No Replies

Hooked on You: A Dead by Daylight Dating Sim



Welcome to Murderer’s Island. Your companions: four dead-sexy Killers who, underneath their murderous exteriors, just want a little romance. Flirt your way into their hearts, uncovering dark twists along the way. Will you find true love, forge friendships… or get hacked to death?

Publisher: Behaviour Interactive Inc.

Release Date: Aug 03, 2022




https://www.metacritic.com/game/pc/hooke...dating-sim

Print this item

  [Tut] How to Convert a List of Dicts to a CSV File in Python [4 Ways]
Posted by: xSicKxBot - 08-13-2022, 04:32 AM - Forum: Python - No Replies

How to Convert a List of Dicts to a CSV File in Python [4 Ways]

5/5 – (1 vote)

Problem: How to convert a list of dictionaries to a csv file?

Example: Given is a list of dicts—for example salary data of employees in a given company:

salary = [{'Name':'Alice', 'Job':'Data Scientist', 'Salary':122000}, {'Name':'Bob', 'Job':'Engineer', 'Salary':77000}, {'Name':'Carl', 'Job':'Manager', 'Salary':119000}]

Your goal is to write the content of the list of dicts into a comma-separated-values (CSV) file format. Your out file should look like this:

my_file.csv:

Name,Job,Salary
Alice,Data Scientist,122000
Bob,Engineer,77000
Ann,Manager,119000

Solution: There are four simple ways to convert a list of dicts to a CSV file in Python.

  1. Pandas: Import the pandas library, create a Pandas DataFrame, and write the DataFrame to a file using the DataFrame method DataFrame.to_csv('my_file.csv').
  2. CSV: Import the csv module in Python, create a CSV DictWriter object, and write the list of dicts to the file in using the writerows() method on the writer object.
  3. Python: Use a pure Python implementation that doesn’t require any library by using the Python file I/O functionality.
  4. Reduce Problem: You can first convert the list of dicts to a list of lists and then use our related tutorial’s methods to write the list of lists to the CSV.

My preference is Method 1 (Pandas) because it’s simplest to use, concise, and most robust for different input types (numerical or textual).

Method 1: Pandas DataFrame to_csv()


You can convert a list of lists to a Pandas DataFrame that provides you with powerful capabilities such as the to_csv() method. This is the easiest method and it allows you to avoid importing yet another library (I use Pandas in many Python projects anyways).

salary = [{'Name':'Alice', 'Job':'Data Scientist', 'Salary':122000}, {'Name':'Bob', 'Job':'Engineer', 'Salary':77000}, {'Name':'Carl', 'Job':'Manager', 'Salary':119000}] # Method 1
import pandas as pd
df = pd.DataFrame(salary)
df.to_csv('my_file.csv', index=False, header=True)

Output:

Name,Job,Salary
Alice,Data Scientist,122000
Bob,Engineer,77000
Carl,Manager,119000

You create a Pandas DataFrame—which is Python’s default representation of tabular data. Think of it as an Excel spreadsheet within your code (with rows and columns).

The DataFrame is a very powerful data structure that allows you to perform various methods. One of those is the to_csv() method that allows you to write its contents into a CSV file.

  • You set the index argument of the to_csv() method to False because Pandas, per default, adds integer row and column indices 0, 1, 2, …. Again, think of them as the row and column indices in your Excel spreadsheet. You don’t want them to appear in the CSV file so you set the arguments to False.
  • You set the and header argument to True because you want the dict keys to be used as headers of the CSV.

If you want to customize the CSV output, you’ve got a lot of special arguments to play with. Check out this article for a comprehensive list of all arguments.


? Related article: Pandas Cheat Sheets to Pin to Your Wall

Method 2: Python CSV Module DictWriter


You can convert a list of dicts to a CSV file in Python easily—by using the csv library. This is the most customizable of all four methods.

Here are the six easy steps to convert a list of dicts to a CSV with header row:

  1. Import the CSV library with import csv.
  2. Open the CSV file using the expression open('my_file.csv', 'w', newline=''). You need the newline argument because otherwise, you may see blank lines between the rows in Windows.
  3. Create a csv.DictWriter() object passing the file and the fieldnames argument.
  4. Set the fieldnames argument to the first dictionary’s keys using the expression salary[0].keys().
  5. Write the header using writer.writeheader()
  6. Write the list of dicts using writer.writerows()

Here’s the full code for copy&paste:

salary = [{'Name':'Alice', 'Job':'Data Scientist', 'Salary':122000}, {'Name':'Bob', 'Job':'Engineer', 'Salary':77000}, {'Name':'Carl', 'Job':'Manager', 'Salary':119000}] # Method 2
import csv
with open('my_file.csv', 'w', newline='') as f: writer = csv.DictWriter(f, fieldnames=salary[0].keys()) writer.writeheader() writer.writerows(salary)

Output file named 'my_file.csv' and located in the same folder:

Name,Job,Salary
Alice,Data Scientist,122000
Bob,Engineer,77000
Carl,Manager,119000 

You can customize the CSV writer in its constructor (e.g., by modifying the delimiter from a comma ',' to a whitespace ' ' character). Have a look at the specification to learn about advanced modifications.

Method 3: Pure Python Without External Dependencies


If you don’t want to import any library and still convert a list of dicts into a CSV file, you can use standard Python implementation as well: it’s not complicated and very efficient.

This method is best if you won’t or cannot use external dependencies.

  • Open the file f in writing mode using the standard open() function.
  • Write the first dictionary’s keys in the file using the one-liner expression f.write(','.join(salary[0].keys())).
  • Iterate over the list of dicts and write the values in the CSV using the expression f.write(','.join(str(x) for x in row.values())).

Here’s the concrete code example:

salary = [{'Name':'Alice', 'Job':'Data Scientist', 'Salary':122000}, {'Name':'Bob', 'Job':'Engineer', 'Salary':77000}, {'Name':'Carl', 'Job':'Manager', 'Salary':119000}] # Method 3
with open('my_file.csv','w') as f: f.write(','.join(salary[0].keys())) f.write('\n') for row in salary: f.write(','.join(str(x) for x in row.values())) f.write('\n')

Output:

Name,Job,Salary
Alice,Data Scientist,122000
Bob,Engineer,77000
Carl,Manager,119000

In the code, you first open the file object f. Then you iterate over each row and each element in the row and write the element to the file—one by one. After each element, you place the comma to generate the CSV file format. After each row, you place the newline character '\n'.

Note: to get rid of the trailing comma, you can check if the element x is the last element in the row within the loop body and skip writing the comma if it is.

? Finxter Recommended: Join the Finxter community and download your 8+ Python cheat sheets to refresh your code understanding.

Method 4: Converting to List of Lists First


A simple approach to convert a list of dicts to a CSV file is to first convert the list of dicts to a list of lists and then use the approaches discussed in the following article (code block given).

salary = [['Alice', 'Data Scientist', 122000], ['Bob', 'Engineer', 77000], ['Ann', 'Manager', 119000]] # Method 1
import csv
with open('file.csv', 'w', newline='') as f: writer = csv.writer(f) writer.writerows(salary) # Method 2
import pandas as pd
df = pd.DataFrame(salary)
df.to_csv('file2.csv', index=False, header=False) # Method 3
a = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] import numpy as np
a = np.array(a)
np.savetxt('file3.csv', a, delimiter=',') # Method 4
with open('file4.csv','w') as f: for row in salary: for x in row: f.write(str(x) + ',') f.write('\n')

? Related Tutorial: How to Convert a List to a CSV File in Python [5 Ways]

Where to Go From Here?


Enough theory. Let’s get some practice!

Coders get paid six figures and more because they can solve problems more effectively using machine intelligence and automation.

To become more successful in coding, solve more real problems for real people. That’s how you polish the skills you really need in practice. After all, what’s the use of learning theory that nobody ever needs?

You build high-value coding skills by working on practical coding projects!

Do you want to stop learning with toy projects and focus on practical code projects that earn you money and solve real problems for people?

? If your answer is YES!, consider becoming a Python freelance developer! It’s the best way of approaching the task of improving your Python skills—even if you are a complete beginner.

If you just want to learn about the freelancing opportunity, feel free to watch my free webinar “How to Build Your High-Income Skill Python” and learn how I grew my coding business online and how you can, too—from the comfort of your own home.

Join the free webinar now!



https://www.sickgaming.net/blog/2022/08/...on-4-ways/

Print this item

  (Indie Deal) Night Light Bundle & Super Robot Wars 30 Ultimate Deal
Posted by: xSicKxBot - 08-13-2022, 04:32 AM - Forum: Deals or Specials - No Replies

Night Light Bundle & Super Robot Wars 30 Ultimate Deal

Night Light Bundle | 6 Steam Games | 95% OFF
[www.indiegala.com]
?Drive, drift, drag, fast cars, fast life, from morning until night, but racing has no stop light, speed will keep you awake until sunrise, with racing video games like: Strange Night, iREC, CrashMetal Cyberpunk, Drift Horizon Online, Drive for Your Life & JetX VR

https://www.youtube.com/watch?v=XhoFlz_NLsc
Super Robot Wars 30 Ultimate Edition Historical Deal
[www.indiegala.com]
The Digital Ultimate Edition includes the Super Robot Wars 30 full game, Season Pass, Bonus Mission Pack, and Premium Sound & Data Pack. Includes 31 anime themes and soundtracks, 15 original songs, and 51 reference images


Sales, sales and more sales
Pre-Order Keys now available for Spider-Man![www.indiegala.com]
https://www.youtube.com/watch?v=1E051WtpyWg
[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...4759739904

Print this item

  PC - South of the Circle
Posted by: xSicKxBot - 08-13-2022, 04:32 AM - Forum: New Game Releases - No Replies

South of the Circle



Antarctica, 1964.

A crashed aircraft, tail to the sky.

Cambridge academic Peter stumbles from the wreckage in search of help, fighting the cold. As his attempts to escape the ice grow more desperate, the lines between his past and present begin to blur.

A love story between colleagues Peter and Clara, set against the backdrop of the Cold War, South of the Circle is a narrative adventure game about memory, survival, and the consequences of not dealing with the past.

Publisher: 11 bit studios

Release Date: Aug 03, 2022




https://www.metacritic.com/game/pc/south-of-the-circle

Print this item

  News - Select Google Users Can Now Play Cloud Games Right From Their Search Results
Posted by: xSicKxBot - 08-13-2022, 04:32 AM - Forum: Lounge - No Replies

Select Google Users Can Now Play Cloud Games Right From Their Search Results

Google Stadia and other streaming game services are being promoted in a new way, as it looks like searching for certain games presents you with a new button that can boot it up and play instantly, though this isn't yet available for everyone.

As spotted by Bryant Chappel on Twitter, searching for games that are available on Stadia can now have a "Play" button that when pressed boots you straight into the game. Chappel used Control Ultimate Edition as an example of the feature, getting all the way to the title screen without much problem.

In follow-up tweets, Chappel also found that similar buttons could be found for Amazon Luna and Xbox Cloud Gaming. While the Play button for Stadia games brings you straight into the game, it should be noted that it looks like Luna and Xbox Cloud Gaming games first bring you to the game's page, before allowing you to actually play the it.

Continue Reading at GameSpot

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

Print this item

  [Tut] 3 Simple Steps to Convert calendar.ics to CSV/Excel in Python
Posted by: xSicKxBot - 08-12-2022, 01:58 AM - Forum: Python - No Replies

3 Simple Steps to Convert calendar.ics to CSV/Excel in Python

Rate this post

Step 1: Install csv-ical Module with PIP


Run the following command in your command line or PowerShell (Windows) or shell or terminal (macOS, Linux, Ubuntu) to install the csv-ical library:

pip install csv-ical

In some instances, you need to modify this command a bit to make it work. If you need more assistance installing the library, check out my detailed guide.

? Full Guide: How to install a library/module in Python?

Step 2: Prepare files


Create a new Python code file with the extension .py or a Jupyter Notebook with the file extension .ipynb. This creates a Python script or Jupyter Notebook that can run the code in Step 3 to conver the .ics.

Now, put the .ics file to be converted in the same folder as the newly-created Python script.

Use Jupyter Notebook to create a new .ipynb file

Step 3: Convert


This step consists of running the code doing these three things:

  • Create and initialize a Convert object
  • Read the .ics file
  • Create the CSV object and save it at the specified location

Here’s the full code:

from csv_ical import Convert # Create and initialize a Convert object
convert = Convert()
convert.CSV_FILE_LOCATION = 'my_file.csv'
convert.SAVE_LOCATION = 'my_file.ics' # Read the .ics file
convert.read_ical(convert.SAVE_LOCATION) # Create the CSV object and save it at the specified location
convert.make_csv()
convert.save_csv(convert.CSV_FILE_LOCATION)

Thanks for going through the whole tutorial! <3




https://www.sickgaming.net/blog/2022/08/...in-python/

Print this item

 
Latest Threads
Kod Temu Nowy Użytkownik ...
Last Post: demble8888
51 minutes ago
Kod Promocyjny Temu [ald9...
Last Post: demble8888
52 minutes ago
Temu Kupon Zniżkowy [ald9...
Last Post: demble8888
54 minutes ago
Darmowy Kod Do Temu [ald9...
Last Post: demble8888
55 minutes ago
Kod Rabatowy Temu [ald911...
Last Post: demble8888
57 minutes ago
Temu Kupon Rabatowy [ald9...
Last Post: demble8888
59 minutes ago
Temu Polska Kod Rabatowy ...
Last Post: demble8888
1 hour ago
Aktywny Kod Temu [ald9115...
Last Post: demble8888
1 hour ago
50% Discount Temu Coupon ...
Last Post: anniket986
2 hours ago
40% Off Temu Coupon Code ...
Last Post: anniket986
2 hours ago

Forum software by © MyBB Theme © iAndrew 2016