$ uname -r
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import json | |
import os | |
from datetime import datetime | |
from multiprocessing import Pool, cpu_count | |
from pathlib import Path | |
import pandas as pd | |
from PIL import Image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A higher level module for using sockets (or Windows named pipes) | |
# | |
# multiprocessing/connection.py | |
# | |
# Copyright (c) 2006-2008, R Oudkerk | |
# Licensed to PSF under a Contributor Agreement. | |
# | |
__all__ = [ 'Client', 'Listener', 'Pipe', 'wait' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# A higher level module for using sockets (or Windows named pipes) | |
# | |
# multiprocessing/connection.py | |
# | |
# Copyright (c) 2006-2008, R Oudkerk | |
# Licensed to PSF under a Contributor Agreement. | |
# | |
__all__ = [ 'Client', 'Listener', 'Pipe', 'wait' ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
df = pd.DataFrame({"purchase_time": ["19-09-1995 12:14:00.000","12/09/2018 15:34"]}) | |
df['Timestamp'] = pd.to_datetime(df.purchase_time, format='%d/%m/%Y %H:%M', errors='coerce') | |
mask = df.Timestamp.isnull() | |
df.loc[mask, 'Timestamp'] = pd.to_datetime(df[mask]['purchase_time'], format='%d-%m-%Y %H:%M:%S.%f', errors='coerce') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
pip install scrapy | |
pip install pandas | |
scrapy runspider scraper/scraper.py -s LOG_ENABLED=False | |
""" | |
import scrapy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import json | |
import pandas as pd | |
from db.oracle_client import get_oracle_conn | |
file_name = "data.csv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import multiprocessing | |
from functools import partial | |
# Manager to create shared object. | |
manager = multiprocessing.Manager() | |
# Create a global variable. | |
dictionary = manager.dict() | |
NewerOlder