This file contains 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
# To test these progress bars you will have to | |
# install the following packages | |
# pipenv install click progress progressbar2 tqdm clint | |
import string | |
# progress bars | |
import time | |
import click | |
from tqdm import tqdm |
This file contains 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 pickle | |
dictionary_a = {'string_1': 1, 'string_2': 2.2, 'string_3': True} | |
# Pickling (serializing) dictionary A into a file | |
with open('saved_object.pickle', 'wb') as filename: | |
pickle.dump(dictionary_a, filename) | |
# Unpickling (de-serializing) dictionary A into B | |
with open('saved_object.pickle', 'rb') as filename: |
This file contains 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 | |
if (!isset($_SERVER['argc']) || $_SERVER['argc'] < 1) { | |
die("Usage: cli <action> <options>"); | |
} | |
$argc = $_SERVER['argc']; | |
$argv = $_SERVER['argv']; | |
switch ($argv[1]) { | |
case "ls": | |
echo "Listing directory"; |