Skip to content

Instantly share code, notes, and snippets.

View hemanth22's full-sized avatar

Hemanth B hemanth22

View GitHub Profile
from selenium import webdriver
from tabulate import tabulate
# setting up driver and loading URL
driver = webdriver.Chrome('path/to/chromedriver')
driver.get('https://www.worldometers.info/coronavirus/')
Country_name = input('Enter Country Name: ') # asking user for country
# getting table out
@zhangzhhz
zhangzhhz / common_MariaDB_commands.md
Last active November 29, 2021 04:37
Common Useful MySQL / MariaDB Commands
@hemanth22
hemanth22 / MSCloudConnections.md
Created February 21, 2020 07:47 — forked from Skatterbrainz/MSCloudConnections.md
Microsoft Cloud Connections Summary

Microsoft Cloud Connections

Some of these can be tied together using a common credential object, but I seem to have trouble with the SharePoint Online connection using the -Credential parameter (pukes up the "the DTD is prohibited" error).

$creds = Get-Credential -Message "Cloud Credentials" -UserName "you@contoso.com"
@guimou
guimou / oc_delete_items.sh
Last active December 4, 2021 13:45
[OC delete items in one line] Deletes OpenShift item in one line
# Delete Running pods
for pod in $(oc get pods | grep Running | awk '{print $1}'); do oc delete pod ${pod} --grace-period=1;done
# Delete Secrets
for secret in $(oc get secrets | awk '{if (NR!=1){print $1}}'); do oc delete secret ${secret};done
Complete credit to http://Learn.SharjeelSayed.com //copied for myself.
Curated Self Study Guide for Computer Science and DevOps/SRE/SysAdmin
https://github.com/docker-training/orchestration-workshop
An always updated copy of this document can be found at http://Learn.SharjeelSayed.com
Fork this at https://github.com/SharjeelSayed/SharjeelSayed.github.io
Reach me at http://SharjeelSayed.com
@hemanth22
hemanth22 / ChromeDriverTest.java
Created January 4, 2020 08:23 — forked from marcinfkns/ChromeDriverTest.java
Selenium + Firefoxes and other browsers
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class ChromeDriverTest {
// Configuration (CHANGE IT!):
private static final String ChromeDriverPath = "/Users/marcinf/bin/chromedriver/2.35/chromedriver"; // https://chromedriver.storage.googleapis.com/2.35/chromedriver_mac64.zip
private static final String ChromePath = "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome";
@ryanemerson
ryanemerson / Dockerfile
Created November 28, 2019 13:33
OC Docker image
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
USER root
RUN microdnf install tar gzip && \
cd /tmp && \
curl -SL -o client.tar.gz https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \
tar --strip-components 1 -C /bin -xzf client.tar.gz openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit/oc
@amitrani6
amitrani6 / PostgreSQL__Initialization_Configuration_Pandas.py
Created November 7, 2019 23:18
A Python script that connects to a PostgreSQL database with an initialization and configuration file to create a Pandas data frame.
# This Python script connects to a PostgreSQL database and utilizes Pandas to obtain data and create a data frame
# A initialization and configuration file is used to protect the author's login credentials
import psycopg2
import pandas as pd
# Import the 'config' funtion from the config.py file
from config import config
# Establish a connection to the database by creating a cursor object
@amitrani6
amitrani6 / postgresql_config.py
Last active March 13, 2020 03:24
A PostgreSQL configuration file that parses the parameter values stored in an initialization file.
# This file was adapted from http://www.postgresqltutorial.com/postgresql-python/connect/
# The following config() function reads in the database.ini file and returns the connection
# parameters as a dictionary. This function will be imported in to the main python script:
#!/usr/bin/python
from configparser import ConfigParser
def config(filename='database.ini', section='postgresql'):
# create a parser