Open SoccerCashUK opened 6 months ago
Hi James,
Thanks!
Yes, unfortunately is not a cronjob yet, so I run it every week to update the results.
There are also some parts on the code that is refering to my local machine. I still need to improve this
Alan
From: SoccerCashUK @.> Sent: Tuesday, December 12, 2023 1:30 PM To: alanhassan/soccerprediction @.> Cc: Subscribed @.***> Subject: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi great application Do I have to run update.py as well
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMPELQFKOU4K4PYQ263YJCBCFAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGAZTQMJUGU3TMNQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi thanks for the reply So apart from running update.py and main.py Is that all I need to do
James
Actually there are 4 scripts:
main.py -> the main code for the application update.py -> get the last results of the matches performance.py -> run after update.py to get which predictions were right and which were wrong update_odds.py -> run after performance.py to get the odds and bet suggestions for the games in the next 7 days
From: SoccerCashUK @.> Sent: Wednesday, December 13, 2023 3:25 PM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi thanks for the reply So apart from running update.py and main.py Is that all I need to do
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1854494630, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMNZXZ2XESJGGNDR5GLYJHXIVAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJUGQ4TINRTGA. You are receiving this because you commented.Message ID: @.***>
Hi thanks for the reply. When is best to run files to get tips, as I see the last day with tips is the 17/12/2023
James
I usually run it on mondays or tuesdays.
I want to add 2nd division championships as well, so we can have more games during the week and dont need to wait until weekend.
Alan
From: SoccerCashUK @.> Sent: Saturday, December 16, 2023 5:31 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi thanks for the reply. When is best to run files to get tips, as I see the last day with tips is the 17/12/2023
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1858761308, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMP3RAYZBPNJLP3BQMDYJVL4TAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJYG43DCMZQHA. You are receiving this because you commented.
Hi yeah I like to see leagues like Denmark Sweden Norway Poland Turkey
James
Hi I see there are matches for today so I ran the programs but still showing matches fro 15th to 17th, are you getting the same ?
James
Hi still the same tried so many times today There are matches for today but not getting a them
Hey!
I am updating it now, running the code update_odds.py.
Did you run the codes update.py, then performance.py then update_odds.py? Did you get any error when running them?
From: SoccerCashUK @.> Sent: Monday, December 18, 2023 3:24 PM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi still the same tried so many times today There are matches for today but not getting a them
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1861262464, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMJJAORQUVEFLCCYZQ3YKCC5JAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRGI3DENBWGQ. You are receiving this because you commented.
Yeah I ran all 3 but keep getting error for update_odds.py
When it gets to 100% then i get this
[1218/132723.376:INFO:CONSOLE(0)] "The resource https://cdn.cookielaw.org/vendorlist/iab2Data.json was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as
value and it is preloaded intentionally.", source: https://www.flashscore.com/match/00Ih7Jfq/#/match-summary (0)
Traceback (most recent call last):
File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update_odds.py", line 348, in
I believe the error is because of this:
OSError: Cannot save file into a non-existent directory: 'C:\Users\alan.hassan\Desktop\github\soccerprediction'
In the code, the result is being saved in my local machine. But since you dont have access to it, the result is the error above.
I am changing it so it doesn't rely on my local machine, but I don't know when it will be solved. Maybe you can change this part so it is saved on your local machine, or something like that.
Anyway, I am finishing updating the odds, in some minutes it will be updated
From: SoccerCashUK @.> Sent: Monday, December 18, 2023 3:30 PM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Yeah I ran all 3 but keep getting error for update_odds.py
[1218/132723.376:INFO:CONSOLE(0)] "The resource https://cdn.cookielaw.org/vendorlist/iab2Data.json was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it has an appropriate as value and it is preloaded intentionally.", source: https://www.flashscore.com/match/00Ih7Jfq/#/match-summary (0) Traceback (most recent call last): File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update_odds.py", line 348, in df_odds.to_excel('C:/Users/alan.hassan/Desktop/github/soccerprediction/df_odds.xlsx') File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\generic.py", line 2345, in to_excel formatter.write( File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\io\formats\excel.py", line 888, in write writer = ExcelWriter( # type: ignore[abstract] File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\io\excel_xlsxwriter.py", line 191, in init super().init( File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\io\excel_base.py", line 1106, in init self.handles = get_handle( File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\io\common.py", line 694, in get_handle check_parent_directory(str(handle)) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\io\common.py", line 568, in check_parent_directory raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'") OSError: Cannot save file into a non-existent directory: 'C:\Users\alan.hassan\Desktop\github\soccerprediction'
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1861276303, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMPDL3HG3VAUVGDFPRDYKCDTRAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRRGI3TMMZQGM. You are receiving this because you commented.
Hi ok I wait for updates to be done, I`m guessing you still be updating fixtures and putting files on here
Hi downloaded all files again i run update.py now i get error
Traceback (most recent call last):
File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update.py", line 425, in
Hey!
I have just run the code and it worked for me... maybe try again and see if it works
Alan
From: SoccerCashUK @.> Sent: Sunday, December 24, 2023 6:10 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi downloaded all files again i run update.py now i get error
Traceback (most recent call last): File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update.py", line 425, in grouped_result = grouped_result.droplevel(['team', 'opponent']).sort_index() File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\generic.py", line 861, in droplevel new_labels = labels.droplevel(level) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 2069, in droplevel levnums = sorted(self._get_level_number(lev) for lev in level)[::-1] File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 2069, in levnums = sorted(self._get_level_number(lev) for lev in level)[::-1] File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 1944, in _get_level_number self._validate_index_level(level) File "C:\Users\Acer\AppData\Roaming\Python\Python39\site-packages\pandas\core\indexes\base.py", line 1939, in _validate_index_level raise KeyError( KeyError: 'Requested level (team) does not match index name (None)'
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1868469660, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMMQ6YKADZP3XXM4GZDYK7WOTAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGQ3DSNRWGA. You are receiving this because you commented.
Hi Iran It again now got this
Traceback (most recent call last):
File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update.py", line 547, in
Do I need to rum main.py first then update.py
James
Hmmm, thats because Ive changed the code so it doesn’t rely on my local machine anymore. This creds.py contains my token for uploading files to my github. I think that if you want to run the files on your own, you need to create a copy of all the files that are on my folder and create a “creds.py” file containig your github token.
On 24 Dec 2023, at 13:03, SoccerCashUK @.***> wrote:
Hi Iran It again now got this Traceback (most recent call last): File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update.py", line 547, in push_dataframe_to_github(df_rolling, 'df_rolling.csv', repository) File "C:\Users\Acer\Desktop\soccerprediction-main\soccerprediction-main\update.py", line 509, in push_dataframe_to_github headers_get = {'Authorization': f'token {creds.token}'} AttributeError: module 'creds' has no attribute 'token'
Do I need to rum main.py first then update.py
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1868548364, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMN4YMV4NKYYTCCJELDYLBG3LAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGU2DQMZWGQ. You are receiving this because you commented.Message ID: @.***>
Hi as it's boxing day there is football today is the matches been updated
James
Hi! it is updated, is not appearing to you?
[cid:095220ba-9adc-4797-bfad-f0bb7166a0e4]
From: SoccerCashUK @.> Sent: Tuesday, December 26, 2023 6:31 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi as it's boxing day there is football today is the matches been updated
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1869404616, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMOHIG3ZT2BYJNUXDJ3YLKKP7AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGQYDINRRGY. You are receiving this because you commented.Message ID: @.***>
Hi! it is updated, is not appearing to you? [cid:095220ba-9adc-4797-bfad-f0bb7166a0e4] … ____ From: SoccerCashUK @.> Sent: Tuesday, December 26, 2023 6:31 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1) Hi as it's boxing day there is football today is the matches been updated James — Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMOHIG3ZT2BYJNUXDJ3YLKKP7AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRZGQYDINRRGY. You are receiving this because you commented.Message ID: @.***>
Hi yeah it as I meant to message you to let you know Cheers James
github token
Hi how easy is it to to do github token as I got no expertise in this can you help please in any way Then I be able to run the updates
James
Hi!
Is not too hard.
first you need to create your github token, which you can find it here: https://github.com/settings/tokens
then, create this "creds.py" file, with the token you have created
[cid:cba861b5-b357-4aac-8031-e1464e7678ea]
I think after this you will be able to run the files as well
Is important not to upload your token to your github, so just put it in the gitignore file.
this video shows this last part: https://www.youtube.com/watch?v=CJjSOzb0IYs [https://www.bing.com/th?id=OVP.alx-BGMkuSpxlYsoDi6bZgHgFo&pid=Api]https://www.youtube.com/watch?v=CJjSOzb0IYs How to HIDE Your API Keys in Python Projectshttps://www.youtube.com/watch?v=CJjSOzb0IYs Never commit your API keys or other sensitive data to github again! Keep it neat and tidy by hiding your api key using one of these 2 methods. Both work and have their uses, but I'd lean towards using the .env file to store your own environment variables. It's easy to recreate this file on your server or anywhere else you need to run your ... www.youtube.com
Also, I have used A LOT of chatgpt to help me with the code. So is also a good idea if you are stuck.
Alan
From: SoccerCashUK @.> Sent: Wednesday, December 27, 2023 4:45 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
github token
Hi how easy is it to to do github token as I got no expertise in this can you help please in any way Then I be able to run the updates
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1870038609, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMO6FUGFM5GDV2762LLYLPGZ7AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGAZTQNRQHE. You are receiving this because you commented.Message ID: @.***>
Hi I see spreadsheets have been updated but still no games from today onwards, Have they been done yet
James
Hi not seeing ant matches for today and onwards
James
Hi
Yeah, I had a problem on the update_odds code, but now its there
From: SoccerCashUK @.> Sent: Saturday, January 20, 2024 2:13 PM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi not seeing ant matches for today and onwards
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1902179067, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMKRNIVPC7GOAJNQCE3YPP3K3AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGE3TSMBWG4. You are receiving this because you commented.Message ID: @.***>
That's great cheers
Hi! Is not too hard. first you need to create your github token, which you can find it here: https://github.com/settings/tokens then, create this "creds.py" file, with the token you have created [cid:cba861b5-b357-4aac-8031-e1464e7678ea] I think after this you will be able to run the files as well Is important not to upload your token to your github, so just put it in the gitignore file. this video shows this last part: https://www.youtube.com/watch?v=CJjSOzb0IYs [https://www.bing.com/th?id=OVP.alx-BGMkuSpxlYsoDi6bZgHgFo&pid=Api]https://www.youtube.com/watch?v=CJjSOzb0IYs How to HIDE Your API Keys in Python Projectshttps://www.youtube.com/watch?v=CJjSOzb0IYs Never commit your API keys or other sensitive data to github again! Keep it neat and tidy by hiding your api key using one of these 2 methods. Both work and have their uses, but I'd lean towards using the .env file to store your own environment variables. It's easy to recreate this file on your server or anywhere else you need to run your ... www.youtube.com Also, I have used A LOT of chatgpt to help me with the code. So is also a good idea if you are stuck. Alan … ____ From: SoccerCashUK @.> Sent: Wednesday, December 27, 2023 4:45 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1) github token Hi how easy is it to to do github token as I got no expertise in this can you help please in any way Then I be able to run the updates James — Reply to this email directly, view it on GitHub<#1 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMO6FUGFM5GDV2762LLYLPGZ7AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGAZTQNRQHE. You are receiving this because you commented.Message ID: @.***>
Hi do you think you can setup this for me please I can make a small donation to you, as I like to run the application whenever I like
James
Hi!
Currently I am using this script to update the odds for the next 7 days
Basically you need to run it and you'll get the games for the next 7 days in a dataframe.
Regards
From: SoccerCashUK @.> Sent: Saturday, February 3, 2024 8:45 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1)
Hi! Is not too hard. first you need to create your github token, which you can find it here: https://github.com/settings/tokens then, create this "creds.py" file, with the token you have created [cid:cba861b5-b357-4aac-8031-e1464e7678ea] I think after this you will be able to run the files as well Is important not to upload your token to your github, so just put it in the gitignore file. this video shows this last part: https://www.youtube.com/watch?v=CJjSOzb0IYs [https://www.bing.com/th?id=OVP.alx-BGMkuSpxlYsoDi6bZgHgFo&pid=Api]https://www.youtube.com/watch?v=CJjSOzb0IYs How to HIDE Your API Keys in Python Projectshttps://www.youtube.com/watch?v=CJjSOzb0IYs Never commit your API keys or other sensitive data to github again! Keep it neat and tidy by hiding your api key using one of these 2 methods. Both work and have their uses, but I'd lean towards using the .env file to store your own environment variables. It's easy to recreate this file on your server or anywhere else you need to run your ... www.youtube.comhttp://www.youtube.com Also, I have used A LOT of chatgpt to help me with the code. So is also a good idea if you are stuck. Alan … ____ From: SoccerCashUK @.> Sent: Wednesday, December 27, 2023 4:45 AM To: alanhassan/soccerprediction @.> Cc: alanhassan @.>; Comment @.> Subject: Re: [alanhassan/soccerprediction] Soccer (Issue #1https://github.com/alanhassan/soccerprediction/issues/1) github token Hi how easy is it to to do github token as I got no expertise in this can you help please in any way Then I be able to run the updates James — Reply to this email directly, view it on GitHub<#1 (comment)https://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1870038609>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMO6FUGFM5GDV2762LLYLPGZ7AVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZQGAZTQNRQHE. You are receiving this because you commented.Message ID: @.***>
Hi do you think you can setup this for me please I can make a small donation to you, as I like to run the application whenever I like
James
— Reply to this email directly, view it on GitHubhttps://github.com/alanhassan/soccerprediction/issues/1#issuecomment-1925295692, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASD3TMMCODKDRS7ZS2ZE5PLYRYPORAVCNFSM6AAAAABARYHZYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVGI4TKNRZGI. You are receiving this because you commented.Message ID: @.***>
Hi great application Do I have to run update.py as well
James