Skip to content

Instantly share code, notes, and snippets.

View MishraKhushbu's full-sized avatar

KHUSHBU KUMARI MishraKhushbu

  • Bangalore
View GitHub Profile
@MishraKhushbu
MishraKhushbu / regex.py
Last active June 22, 2022 06:58
Regular expression
,Regex summary and examples
. - any charcter except newline
\d - Digit(0-9)
\D - Not a digit(0-9)
\w - word charcter(a-z, A-Z,0-9,_)
\W- not a word charcter
\s - whitespace(space , tab, newline)
\S - not a whitespace(space , tab , newline)
@MishraKhushbu
MishraKhushbu / mock_response_server.py
Created June 3, 2020 11:06
Web Page To Display Directory Structure in sha format
from bottle import *
import os
import File_Folder_Flask
# Server startup message
@route("/", methods=['POST', 'GET'])
def home():
return (
"Welcome! To the homepage")
@MishraKhushbu
MishraKhushbu / CPS.py
Created December 23, 2019 10:39
CISCO POLICY SUITE
In this project I am showing CPS alarm and resync feature.
https://www.cisco.com/c/en/us/td/docs/wireless/quantum-policy-suite/R19-4-0/CPS19-4-0SNMPAlarmsandClearingProceduresGuide/CPS13-0-0SNMPAlarmsandClearingProceduresGuide_chapter_01.html
@MishraKhushbu
MishraKhushbu / SANDISk_Interview.py
Last active October 3, 2019 11:39
SanDisk Interview
How to access doc string of of function.
Doc string for any function can be accessed using funvtion.__doc__
e.g
>>> def my_func():
... """ i am happy and i only want to use doc string"""
... sum = a+b
... print(sum)
...
>>> my_func.__doc__
@MishraKhushbu
MishraKhushbu / 1*List1_1.py
Last active September 30, 2019 11:41
google python class day1
#!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic list exercises
# Fill in the code for the functions below. main() is already set up
@MishraKhushbu
MishraKhushbu / ROBOT_FRAMEWORK.py
Last active September 16, 2019 10:16
ROBOT_FRAMEWORK
Why Robot Framework??
It is for acceptance testing like when we know the functionality and to check. at that time it's automation can be done using this framwork.Minimal
programming knowledge is required. It's keyword driven means functions are akready written only arguments needs to be given.
It's clean code which means different sections for each type
for e.g
*****Settings****
*****Test Cases****
*****Keywords******
@MishraKhushbu
MishraKhushbu / Threading_Python.py
Last active September 6, 2019 06:46
Threading Module
Multiprocessing Vs Multithreading :
Multiprocessing is when the part of program can be executed by separated processes.
The cost of multiprocessing is really high.
MultiThreading:
The main program is divided into sub threads.
Here to decide the number of thread is a big challenge , taking more number of threads can deduce ur latency since
thread concurrency has limit , after a limit it slows down the process.
@MishraKhushbu
MishraKhushbu / Data_structure.py
Last active September 5, 2019 06:25
Data Structures/29Jan2018
http://res.cloudinary.com/dyd911kmh/image/upload/c_scale,f_auto,q_auto:best,w_700/v1512740202/Template_2_oxrskq.png
Data structures(list,tuple,strings,dictionary,sets)
===========================================================
Diff between tuple and sets
tuple:Immutable type,can contain dubplicates also defined in() whereas indexed
Sets:Mutable type,cannot contain dubplicates and defined in {}
empty set has to define like
@MishraKhushbu
MishraKhushbu / PYTHON_DICTIONARY.py
Created September 5, 2019 05:49
PYTHON_DICTIONARY
Dictionary Methods
Python has a set of built-in methods that you can use on dictionaries.
url : https://www.w3schools.com/python/python_dictionaries.asp
Method Description
clear() ===>Removes all the elements from the dictionary e
copy() ====>Returns a copy of the dictionary
fromkeys()===>Returns a dictionary with the specified keys and values
get() ====>Returns the value of the specified key
@MishraKhushbu
MishraKhushbu / JSON2XML.py
Last active August 7, 2019 10:50
JSON_TO_XML
import json
def json2xml(str_json): # function to convert json to xml
global my_str_startswith
global my_str_endswith
global mid_str_list
for items in str_json: