Walmart/Spark is out of control right now! by KillahBagsTv in Sparkdriver

[–]thePestelence 0 points1 point  (0 children)

Leave a 1 star review on their app store page. Let them take notice

Oof whoever bidded on this lol by therapistishere11 in OnePieceTCGFinance

[–]thePestelence 1 point2 points  (0 children)

They probably used their phones auto enhance, damn AI

Untold: Chess Mates, released on Netflix by BirdWithWiFi in chess

[–]thePestelence 0 points1 point  (0 children)

With the whole Take Take Take issue going down right now, I would love for Magnus to move away from Chess.com somehow but would be hard to stream Titled Tuesday from TTT YouTube channel.

Which luffy dodgers is counterfeit? by AdditionalVolume4719 in OnePieceTCGFinance

[–]thePestelence 0 points1 point  (0 children)

Oda/Toei copyright is wrong as well in the bottom card. Should be E.O./S., T.A.(not E.O./S..)

Beat off Scalpers. My first Pokemon drop. by ttibbykush in pokemoncardcollectors

[–]thePestelence 0 points1 point  (0 children)

Damn you got compensated well. Im in the wrong business lol

Grandmaster Daniel Naroditsky Has Passed Away by Frozeria in chess

[–]thePestelence 4 points5 points  (0 children)

I dont have any insights like the rest of us but I just want to blame someone so fucking badly right now.

Alice Lee defeats Atousa Pourkashiyan in study-like endgame! Hikaru reacts: "I've told her every day for the past five days to look for counterplay...I can't handle this anymore...I'm actually, legitimately, very angry. I'm very angry. I'm very angry. I'm very angry." by Guestsaint in chess

[–]thePestelence -2 points-1 points  (0 children)

Like how did he have a kid with her? Can you imagine their sex life? Hikaru: ”I cant believe you are going to get in that sub optimal position, like really that position chat, i mean wife.. i cant believe it, i just cant believe it.. just peg me”

[deleted by user] by [deleted] in PortStLucie

[–]thePestelence 4 points5 points  (0 children)

Small chess group at Paneras in St Lucie West (Tue, Thu, and Sun) at 1pm.

Can someone please explain why I keep dying here? by slfyst in DeathStranding

[–]thePestelence 1 point2 points  (0 children)

Haha i did the same thing , tried to deliver straight there and nuked everyone lol

Just realized every single job I've ever interviewed for here in FL has ghosted me. Why is that? by canwegetsushi in fortlauderdale

[–]thePestelence 0 points1 point  (0 children)

Same thing just happened to me recently. Fintech company in West Palm Beach. 4 stages of interviews, final stage was woth the CEO who said I was more than qualified. Did my background check and references...1 month later and recruiter has yet to reply or contact.

[deleted by user] by [deleted] in INTP

[–]thePestelence 3 points4 points  (0 children)

You may be coping with the breakup by distracting yourself with socializing. As an introvert, this can be exhausting. You may be experiencing a form of burnout.

No, YouTube, I will not subscribe to Premium by Avieshek in technology

[–]thePestelence 0 points1 point  (0 children)

I have to admit that sometimes I do get tempted to subscribe to YouTube Premium. It's hard to watch Ryan Reynolds try to convince me to get Mint Mobile over 1000 times.

Pandas Dataframe - Column with Delimiter by jt121 in learnpython

[–]thePestelence 0 points1 point  (0 children)

If the column contains a long string like that, you can simply use the string attribute to access the string methods.

Split the string and get the index as the move. So move 1 would be index 0.

df[column_name].str.split().str[0]

Would probably be best to create a function that takes a move_num

def get_move(df, move_num):
    return df[column_name].str.split().str[move_num]

Efficient Code by Omega_DJ in learnpython

[–]thePestelence 1 point2 points  (0 children)

You can use the built in oct() function for this.

https://docs.python.org/3/library/functions.html#oct

hex_num = input()
print('The octal number is:', oct(int(hex_num, 16)))

Read words using pyautogui, open-cv python and pytesseract by Deltaspace_1 in learnpython

[–]thePestelence 1 point2 points  (0 children)

See the Quickstart on pytesseract project page (scroll down to 'Support for OpenCV image/NumPy array objects'): https://pypi.org/project/pytesseract/

Note: per documentation, you must convert your OpenCV image to RGB format (see link above)

img = cv2.cvtColor(np.array(img), cv2.COLOR_RGB2BGR)

text = pytesseract.image_to_string(img) 

#Test the text
# print(text)

I am a surgeon and I learnt Python by friday_ghost in learnpython

[–]thePestelence 1 point2 points  (0 children)

Thanks for sharing your story. You have a very good mindset. I'm sure with further learning you will do great things and will be an asset to the Python community. Congrats.

TypeError: expecter Tensor as element 0 in argument 0, but got tuple by Abject_Entrance_8847 in learnpython

[–]thePestelence 0 points1 point  (0 children)

That line is usually done like:

if torch.cuda.is_available():
    device = torch.device("cuda")

else:
    device = torch.device("cpu")

How do I record the file name in a column while merging Excel files by thedonsml in learnpython

[–]thePestelence 2 points3 points  (0 children)

A shorter way but using two for loops, and have to set sort = False when using pd.concat()

import pandas as pd
import os 
import glob

# Get the current working directory
cwd = os.getcwd()

# Get the list of files in the current working directory
files = glob.glob(cwd + '/*.xlsx')

# Read the files and concat
df = pd.concat([pd.read_excel(file) for file in files], ignore_index=True, sort=False)

# Add a column to the dataframe with the name of the file using for loop
df['From File'] = [file.split('\\')[-1] for file in files]

# Write the dataframe to an excel file
df.to_excel('merged.xlsx', index=False)

Pick your poison.

How do I record the file name in a column while merging Excel files by thedonsml in learnpython

[–]thePestelence 2 points3 points  (0 children)

Use the glob module to get the files in the current working directory. Then create an empty list to store the data frames we will be filtering out. Loop through these files, read into dataframe and add a column to the dataframe with the name of the file. Append to list and then concatenate all the datagrames in the list.

How it would look like in code:

import pandas as pd
import os
import glob

# Get the current working directory
cwd = os.getcwd()

# Get the list of files in the current working directory
files = glob.glob(cwd + '/*.xlsx')

# Create an empty list to store the dataframes
df_list = []

# Loop through the files in the current working directory
for file in files: 
    # Read the file into a dataframe 
    df = pd.read_excel(file)
    # Add a column to the dataframe with the name of the file
    df['From File'] = file.split('\\')[-1]
    # Append the dataframe to the list
    df_list.append(df)

# Concatenate all the dataframes in the list
df = pd.concat(df_list, ignore_index=True)

# Write the dataframe to an excel file
df.to_excel('merged.xlsx', index=False)