Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

tar dataset

import tarfile

#simple function to extract the train data
#tar_file : the path to the .tar file
#path : the path where it will be extracted
def extract(tar_file, path):
    opened_tar = tarfile.open(tar_file)
     
    if tarfile.is_tarfile(tar_file):
        opened_tar.extractall(path)
    else:
        print("The tar file you entered is not a tar file")
Comment

PREVIOUS NEXT
Code Example
Python :: python cast number to between 0 and 1 
Python :: message to dict protobuf 
Python :: Access python http.server on google colab 
Python :: get the creating date of files ftp python 
Python :: pysimplegui start value 
Python :: error:pip.subprocessor:command errored out with exit status 1: 
Python :: python float to int 
Python :: Python how to use __add__ 
Python :: scipy.optimize.curve_fit 3D 
Python :: bell number python 
Python :: List get both index and value. 
Python :: how to create image folder in numpy aray 
Python :: merge two list of dictionaries python with string 
Python :: reverse a string or number in python 
Python :: s=0 def sum(x,y): n=int(input("enter no. of terms") for i in range(n): l=int(input("enter no.")) s=s+l print(s) sum() 
Python :: stores number in set using input in python 
Python :: standard streams with python3 
Python :: python n range num list 
Python :: NumPy left_shift Syntax 
Python :: how to call a class from another class python? 
Python :: scapy get packet source ip address python 
Python :: pandas data frame from part of excel 
Python :: insert value in string python 
Python :: save standard output in variable python 
Python :: if any number python 
Python :: django http response 204 
Python :: python venv 
Python :: pandas most and least occurrence value 
Python :: a softmax function 
Python :: python open file check error 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =