Skip to content

Instantly share code, notes, and snippets.

@nasrulhazim
nasrulhazim / dowload-files-from-ftp-server-using-python3.md
Last active May 6, 2024 09:45
Download Files From FTP Server using Python3
from ftplib import FTP
from datetime import datetime

start = datetime.now()
ftp = FTP('your-ftp-domain-or-ip')
ftp.login('your-username','your-password')

# Get All Files
files = ftp.nlst()
@kingfischer16
kingfischer16 / get_sas_as_dask.py
Created May 2, 2019 17:41
Functionality to read SAS data from a SAS server (or locally) and return dask.dataframe.
"""
GET_SAS_AS_DASK.PY
2019-05-02
kingfischer16
Functionality to read SAS data from a SAS server (or locally) and return
dask.dataframe.
General idea: Using SASPY, build a list of pandas.DataFrames that are blocks
called via a SAS session. These blocks then make up the dask.DataFrame. Helper
@l1x
l1x / merge.parquet.py
Last active March 2, 2024 05:16
Merging Parquet files with Python
import os
import pyarrow.parquet as pq
#
# Warning!!!
# Suffers from the same problem as the parquet-tools merge function
#
#parquet-tools merge:
#Merges multiple Parquet files into one. The command doesn't merge row groups,
#just places one after the other. When used to merge many small files, the