Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Web scraper not populating .txt with scraped data
Post: RE: Web scraper not populating .txt with scraped d...

So I was able to figure it out. This is how I accomplished it: # Write the winning numbers to a file with open('winning_numbers.txt', 'w') as f: count = 0 for winner in winning_numbers: ...
BlackHeart Web Scraping & Web Development 5 1,520 Apr-02-2023, 07:04 PM
    Thread: Web scraper not populating .txt with scraped data
Post: RE: Web scraper not populating .txt with scraped d...

**smile** Thank you! That helped a lot, and that was such a great tip. I actually got it to work here is my code: import requests from bs4 import BeautifulSoup from urllib.parse import urljoin # S...
BlackHeart Web Scraping & Web Development 5 1,520 Apr-02-2023, 04:15 PM
    Thread: Web scraper not populating .txt with scraped data
Post: Web scraper not populating .txt with scraped data

Hey everyone, I was wondering if I could get you guys to help me out a little. I'm attempting to make a web scraper to scrape a site for some strings of numbers. I'm first trying to scrape a list of ...
BlackHeart Web Scraping & Web Development 5 1,520 Apr-01-2023, 07:08 PM
    Thread: Getting int from file instead of randomgenerator
Post: RE: Getting int from file instead of randomgenerat...

(Jan-25-2018, 06:07 AM)j.crater Wrote: If your text file only has one string (the integer you want), then this will suffice: x = 0 with open('key.txt', 'r') as file: number = file.readline().rst...
BlackHeart General Coding Help 10 5,739 Jan-25-2018, 07:00 AM
    Thread: Getting int from file instead of randomgenerator
Post: RE: Getting int from file instead of randomgenerat...

This person created exactly what I'm trying to create basically.here I could just use theirs, but I'd like to make my own. Also I can't get PyQt5 to work correctly for me so its kinda useless for me a...
BlackHeart General Coding Help 10 5,739 Jan-25-2018, 04:12 AM
    Thread: Getting int from file instead of randomgenerator
Post: RE: Getting int from file instead of randomgenerat...

(Jan-24-2018, 09:59 PM)j.crater Wrote: Assuming your file is a collection of numbers, each in its own line, you'd be better off with: x = [] with open('key.txt', 'r') as file: for line in file:...
BlackHeart General Coding Help 10 5,739 Jan-24-2018, 10:17 PM
    Thread: Getting int from file instead of randomgenerator
Post: RE: Getting int from file instead of randomgenerat...

Is it because I need to get the string from the file and convert it to an integer? I just don't want it to be a random seed. I'm trying to get it to use a seed of my choosing. Instead of having the ra...
BlackHeart General Coding Help 10 5,739 Jan-24-2018, 09:38 PM
    Thread: Getting int from file instead of randomgenerator
Post: RE: Getting int from file instead of randomgenerat...

What if I don't want it to be a random integer. It works fairly fine if I get rid of the rand=SystemRandom() # create strong random number generator and replace it with rand = open('key.txt', 'r'). Th...
BlackHeart General Coding Help 10 5,739 Jan-24-2018, 07:10 PM
    Thread: Getting int from file instead of randomgenerator
Post: Getting int from file instead of randomgenerator

So this is some code I got off the net. What I'm trying to do is simple I think. What this is, is a Elliptic Curve Cryptography using the BitCoin curve, SECG secp256k1. I'm trying to make it encrypt a...
BlackHeart General Coding Help 10 5,739 Jan-24-2018, 09:27 AM
    Thread: Google Cloud App Deployment Help..
Post: Google Cloud App Deployment Help..

Been trying to figure out how to run my python script on the Google cloud platform.. I'm not sure if this is the right section for this. I was directed to the Google quick start guide here. Honestly I...
BlackHeart General Coding Help 1 2,988 Nov-13-2017, 09:24 PM
    Thread: Tutorial Requests
Post: RE: Tutorial Requests

(Nov-12-2017, 06:56 PM)nilamo Wrote: (Nov-10-2017, 06:45 AM)BlackHeart Wrote: Could someone post up a tutorial on how to run python scripts through Google cloud using a engine compute virtual mach...
BlackHeart Tutorial Requests and Submissions 60 294,186 Nov-13-2017, 09:14 PM
    Thread: Tutorial Requests
Post: RE: Tutorial Requests

Could someone post up a tutorial on how to run python scripts through Google cloud using a engine compute virtual machine??
BlackHeart Tutorial Requests and Submissions 60 294,186 Nov-10-2017, 06:45 AM
    Thread: ValueError: could not convert string to float: Close??
Post: RE: ValueError: could not convert string to float:...

(Oct-27-2017, 04:45 PM)Larz60+ Wrote: what is the name of your program? The error was generated in validation.py, line 433, but what caused it will be the last line mentioned with your program name ...
BlackHeart Data Science 3 27,577 Oct-27-2017, 07:52 PM
    Thread: ValueError: could not convert string to float: Close??
Post: ValueError: could not convert string to float: Clo...

Honestly, I don't even understand what the issue is here... Could you guys help me out please? It may be referring to one of my columns in my dataset.csv file named 'Close' Error message: File "/ho...
BlackHeart Data Science 3 27,577 Oct-27-2017, 12:09 PM
    Thread: Panda.read_cvs Issues Reading Certain Columns
Post: RE: Panda.read_cvs Issues Reading Certain Columns

Thanks for the response Larz. It took me a little while reading over all of that, but I figured it out. This is what I ended up with. # load dataset dataframe = pandas.read_csv("PTNprice.csv", delim_...
BlackHeart Data Science 5 6,169 Oct-27-2017, 10:50 AM
    Thread: Panda.read_cvs Issues Reading Certain Columns
Post: RE: Panda.read_cvs Issues Reading Certain Columns

Connected to pydev debugger (build 172.3968.37) /usr/bin/python2.7 /home/b/pycharm-community-2017.2.3/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 39687 --file /home...
BlackHeart Data Science 5 6,169 Oct-27-2017, 04:54 AM
    Thread: Panda.read_cvs Issues Reading Certain Columns
Post: Panda.read_cvs Issues Reading Certain Columns

Hey guys. I'm trying to get Panda.read_cvs to read certain columns in my dataset. It says that the 'high' column is not in the list... I'm trying to get it to read only the 'open', 'high', 'low', 'cl...
BlackHeart Data Science 5 6,169 Oct-27-2017, 02:48 AM
    Thread: Possible Scikit-Learn Import Issue?
Post: Possible Scikit-Learn Import Issue?

I keep getting an error when I run this code. I'm thinking it may be because my packages (scikit-learn) are not current enough. I hope this isn't the case, because I've tried everything to update them...
BlackHeart Data Science 2 7,190 Oct-26-2017, 08:11 AM
    Thread: Numpy Help
Post: RE: Numpy Help

(Oct-24-2017, 01:10 AM)metulburr Wrote: Quote:I just used Anaconda because it seemed like it had all the tools I needed. To be honest i would just use the default python install or install python3.x...
BlackHeart Web Scraping & Web Development 6 5,074 Oct-24-2017, 01:57 AM
    Thread: Numpy Help
Post: RE: Numpy Help

Honestly I just used Anaconda because it seemed like it had all the tools I needed. Maybe I should just uninstall it and use the native python that Ubuntu comes with. Conda list does give me a list i...
BlackHeart Web Scraping & Web Development 6 5,074 Oct-24-2017, 12:12 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020