- A 12 - 20 GB partition for the OS,which gets mounted as /(called "root").
- maximum of 20 GB for root partition should always be enough even if you install a ton of software.
- Most distributions of Linux use either ext3 or ext4 as their file system nowadays, which has a built-in “self-cleaning” mechanism so you don’t have to defrag.
- In order for this to work best, though, there should be free space for between 25-35% of the partition. (20% x 20 = 4GB) (35% x 20 = 7GB)
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 requests | |
import json | |
import csv | |
token = '' | |
program_id = '' | |
def get_auth_token(token,program_id): | |
endpoint = 'https://xxx.mycompany.yy/auth/login' | |
payload = { |
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 requests | |
import names | |
import random | |
import json | |
token = '' | |
#program_id = '' | |
program_id = '2ba0d47c-dea6-11e8-b2b3-06f77de3a7f0' # Test Program | |
location_id = '09942cd5-f100-42c3-a175-cd620cd3bc7c' # Kilimani |
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
from bs4 import BeautifulSoup | |
import requests | |
r = requests.get("https://aws.amazon.com/whitepapers/") | |
data = r.text | |
soup = BeautifulSoup(data,"lxml") | |
for link in soup.findAll('a',href=True): | |
#skip all other liks except pdf ones | |
if not link['href'].endswith('pdf'): |
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 fileinput | |
#Read in the file | |
with open('aws-whitepapers.txt','r') as file: | |
filedata=file.read() | |
#Replace the target string | |
filedata = filedata.replace('//','https://') | |
#Write the file out again |
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
""" | |
__author_ = "Josphat Mutuku" | |
__date__ ="2019-07-03" | |
""" | |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.common.exceptions import NoSuchElementException | |
import unittest |
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
const lodash = require('lodash') | |
pm.test("Validate Response to be 200 OK", function () { | |
pm.response.to.have.status(200); | |
}); | |
pm.test("Validate Response Time to be less than 200ms", function () { | |
pm.expect(pm.response.responseTime).to.be.below(200); | |
}); |
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
""" | |
__author_ = "Josphat Mutuku" | |
__date__ ="2019-07-03" | |
""" | |
import requests | |
import unittest | |
import json | |
import ijson |
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 requests | |
from requests.auth import HTTPBasicAuth | |
import json | |
import csv | |
import logging | |
import sys | |
from logging.handlers import TimedRotatingFileHandler | |
FORMATTER = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") | |
LOG_FILE = 'my_app.log' |
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 json | |
import sys | |
from flatten_json import flatten | |
import pandas as pd | |
#check if you pass the input file | |
if sys.argv[1] is not None: | |
fileInput = sys.argv[1] | |
inputFile = open(fileInput) #open json file |
OlderNewer