Search Gists

Find Gists & Code Snippets

You don't have to remmeber a code snippet anymore, search and find a code snippets for your coding question.

# Updating package info
sudo apt-get update

# Downloading all upgrades
sudo apt-get upgrade

#Reinstalling pip
sudo apt-get install python3-pip
When do you use Performance Testing?
Performance testing is done to check the performance
of website servers, database, and network.
If you are adopting waterfall methodology,
then it is important for you to check each time
release of a new version. However, 
if you are using the agile software development approach,
then you need to test application continuously.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, $proxy); // $proxy is ip of proxy server
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);

$httpCode = curl_getinfo($ch , CURLINFO_HTTP_CODE); // this results 0 every time
$response = curl_exec($ch);

if ($response === false) 
    $response = curl_error($ch);

echo stripslashes($response);

Continuous Delivery is a software development discipline where you build software in such a way that the software can be released to production at any time.
Continuous Delivery
import json
a = [1,2,3]
with open('test.txt', 'w') as f:

#Now read the file back into a Python list object
with open('test.txt', 'r') as f:
    a = json.loads(
# To convert .ui file to .py using pyqt5 module
>> pyuic5 -x main.ui -o # pyQt5 version
>> pyuic4 -x main.ui -o # pyQt4 version
fruits = ['apple', 'banana', 'mango', 'cherry']

for fruit in fruits:
Python Lists
# Dictionaries in Python

ages = {"John": 43, "Bob": 24, "Ruth": 76} # Marked by { at beginning and a } at end

# ^^^ Has sets of keys and values, like the 'John' and 43 set. These two values must be seperated by a colon

# ^^^ Sets of values seperated by commas.

Dictionary In Python
Python is a high-leval programming language Which is easy to use and simple and 
is one of the open sourse programming language is used is many applications 
such as Uber,Dropbox,Google and etc for your knowledge Guido van Rossum is 
the creator of python.
In JSON, each element in an array may be of a different type. 
In Python, "array" is analogous to a list or tuple type, 
  depending on usage. However, the json module in the Python 
  standard library will always use Python lists to represent JSON arrays.