Skip to content

Instantly share code, notes, and snippets.

View patharanordev's full-sized avatar
🤝
Focusing

PatharaNor patharanordev

🤝
Focusing
View GitHub Profile
@patharanordev
patharanordev / issue_ssl_cert_verify_failed.md
Last active February 14, 2021 02:54
Correct way to solve "CERTIFICATE_VERIFY_FAILED" issue

Solved SSL:CERTIFICATE_VERIFY_FAILED in Python

... [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
import ssl

ssl._create_default_https_context = ssl._create_unverified_context
@patharanordev
patharanordev / write-dataframe2csv.py
Created October 6, 2020 16:09
Write DataFrame from pandas to CSV file
production_fname = '{}/production.csv'.format(os.getcwd())
def write_prodfile(production_df):
if os.path.isfile(production_fname):
# Remove if exists
os.remove(production_fname)
production_df.to_csv(r'{}'.format(production_fname), index = False)
@patharanordev
patharanordev / download-kaggle-file.py
Last active October 12, 2020 13:57
Download file from Kaggle via Kaggle own credential
from zipfile import ZipFile
from google.colab import files
!rm -rf kaggle.json
!rm -rf /root/.kaggle/kaggle.json
'''
If you found an error "TypeError: Cannot read property '_uploadFiles' of undefined",
please check cookie mode. You need to allow all cookie
'''
files.upload() #upload kaggle.json