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
# get actual name of file before extension | |
file = 'my.report.txt' | |
print file.rsplit('.', 1)[0] | |
# list of comprehension | |
words = [w.replace('[br]', '<br />') for w in words] | |
# get intersection of list | |
def intersection(lst1, lst2): | |
temp = set(lst2) |
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
# Get amount of directories and files | |
tree <FOLDER_NAME>/ | tail -1 | |
# get amount of file | |
find . | wc -l | |
# zip file | |
zip -r output_file.zip file1 folder1 | |
# add -q for quiet operation | |
zip -q -r output_file.zip file1 folder1 |
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 os, random, shutil | |
#Prompting user to enter number of files to select randomly along with directory | |
source=input("Enter the Source Directory : ") | |
dest=input("Enter the Destination Directory : ") | |
no_of_files=int(input("Enter The Number of Files To Select : ")) | |
print("%"*25+"{ Details Of Transfer }"+"%"*25) | |
print("\n\nList of Files Moved to %s :-"%(dest)) |
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
<?php | |
include 'config.php'; | |
use GuzzleHttp\Client; | |
require 'vendor/autoload.php'; | |
$client = new Client(); |
NewerOlder