Found 10805 Articles for Python

Python library PyTube to download youtube videos

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

370 Views

You know “youtube” right? Yes that most famous video sharing website especially in india . Most of the time, you like some videos and you try to download that video so as to check it later/offline. Then you come across “youtube-downloader” app to download youtube videos from the youtube website. But most of the apps comes with some restriction (if you are using it for free) or cost you money. But have you ever think of creating our own program to download youtube videos? If not you, then you should try as its very simply to do using the python ... Read More

Keyed-Hashing for Message Authentication in python

Samual Sam
Updated on 30-Jul-2019 22:30:24

563 Views

Message authentication using cryptographic hash functions in python can be achieved through the HMAC mechanism. We can use HMAC with multiple iterable hash functions such as MD5, SHA-1 in combination with a secret shared key.The basic idea is to secure our data, by generating a cryptographic hash of the actual data combined with a shared secret key. The final result is sent without the secret key but the resulting hash can be used to check the transmitted or stored message.Syntaxhmac.new(key, msg = None, digestmod = None)Returns a generate new hmac object.Where −Key – The shared secret key here.Msg – the ... Read More

Website Blocker Using Python

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

1K+ Views

If you are working in a big IT company then you may notice that their couple of websites are blocked especially social networking sites like facebook, youtube, Instagram etc.Instead of using third-party applications to blocks certain website, we can develop our own custom application which will block websites of our choice and developing a website blocker in python is not so difficult too. That’s what we going to do- develop a python script which will block the website we want.Prerequisite:Python 3.x installedBasic knowledge of PythonWhat we are going to do:We are going to develop python application which will block a ... Read More

Design a Keylogger in Python

Samual Sam
Updated on 30-Jul-2019 22:30:24

4K+ Views

Here we are going to develop a keylogger using python. But before that, what is a keylogger? Keylogger is a program with which we monitor keystrokes. These keystrokes will be stored in a log file. We can record sensitive information like username and password using this keystroke.To create a keylogger we are going to use the pynput module. As its not the standard library of python, we might need to install it.Installing pyxhook module −I’m going to use pip to install pynput −pip install pynput Requirement already satisfied: pynput in c:\python\python361\lib\site-packages (1.4) Requirement already satisfied: six in c:\python\python361\lib\site-packages (from pynput) ... Read More

Develop Notepad using Tkinter in python

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

2K+ Views

Tkinter is a GUI library from python from which we can create multiple GUI apps. Here, using tkinter we will develop a notepad like text editor. This notepad will have the menu where we can create new file, open existing file, save the file, editing, cut and paste, all functionality will there.PrerequisitePython installed.Tkinter installed.Note: tkinter comes as a standard library with python 3.x.Adding menu items:Our notepad will have four main menu items: File, Edit, Commands & Help. Our file menu item will have four sub-items- New, Open, Save & Exit.Our edit menu item will have three sub-items- cut, copy & ... Read More

Generating random Id’s in Python

Samual Sam
Updated on 30-Jun-2020 09:19:37

2K+ Views

We use to generate a random number in our project for a sample data, which later can be used for testing, filled empty columns or for many other purposes, the key thing is we need to generate random data. In python, there are numerous ways to generate random data and we're going to explore some of them here in this article −Python random() moduleOne of the important library, what comes with python is random and we are going to use it throughout in our code.To use this module in your code, you just need to import it, that’s it and ... Read More

SHA encoding using Python?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

740 Views

One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data.What is HashHash is a function which takes variable length sequence of bytes as input and converts it to a fixed length sequence. However, to get your original data(input bytes) back is not easy. For example, x is your input and f is the f is the hashing function, then calculating f(x) is quick and easy but trying to obtain x again is a very time-consuming job.The return value from a hash function is called ... Read More

MD5 hash encoding using Python?

Samual Sam
Updated on 30-Jun-2020 09:23:44

3K+ Views

One of the major concern of all IT companies in the security of there data. Multiple hashing techniques are there to project and check our data.What is HashHash is a function which takes variable length sequence of bytes as input and converts it to a fixed length sequence. However, to get your original data(input bytes) back is not easy. For example, x is your input and f is the f is the hashing function, then calculating f(x) is quick and easy but trying to obtain x again is a very time-consuming job.The return value from a hash function is called ... Read More

Python Pickling

Samual Sam
Updated on 30-Jul-2019 22:30:24

14K+ Views

Python pickle module is used for serializing and de-serializing python object structures. The process to converts any kind of python objects (list, dict, etc.) into byte streams (0s and 1s) is called pickling or serialization or flattening or marshalling. We can converts the byte stream (generated through pickling) back into python objects by a process called as unpickling.Why Pickle?: In real world sceanario, the use pickling and unpickling are widespread as they allow us to easily transfer data from one server/system to another and then store it in a file or database.Precaution: It is advisable not to unpickle data received ... Read More

Print Colors of terminal in Python

karthikeya Boyini
Updated on 30-Jul-2019 22:30:24

585 Views

In the terminal, if you want to make some texts appears in colored mode, there are numerous ways in python programming to achieve it.Using python modules1.termcolor module: It is the ANSII Color formatting for output in the terminal.import sys from termcolor import colored, cprint text1 = colored('Hello, Tutorialspoint!', 'blue', attrs=['reverse', 'blink']) print(text1) cprint('Hello, Python!', 'blue', 'on_white') print_red_on_blue = lambda x: cprint(x, 'red', 'on_blue') print_red_on_blue('Hello, from Data Science!') print_red_on_blue('Hello, Python!') for i in range(10):    cprint(i, 'green', end=' ') cprint("Attention!", 'blue', attrs=['bold'], file=sys.stderr)ResultRead More

Advertisements