background preloader

Python

Facebook Twitter

Enhance your Python Project Code with Classes. Before you create the class, we suggest you import the necessary libraries.

Enhance your Python Project Code with Classes

For our class, we will be using the following libraries in order to format the new dating profile: import pandas as pdfrom sklearn.feature_extraction.text import CountVectorizerfrom sklearn.preprocessing import MinMaxScaler To begin, in order to create a class object, all you have to do is type the following: class CreateProfile: Within the class, tab over to start defining our first function. Class CreateProfile: def __init__(self): Python 3 - Tuples - Tutorialspoint. A tuple is a collection of objects which ordered and immutable.

Python 3 - Tuples - Tutorialspoint

Tuples are sequences, just like lists. The main difference between the tuples and the lists is that the tuples cannot be changed unlike lists. Tuples use parentheses, whereas lists use square brackets. Creating a tuple is as simple as putting different comma-separated values. Optionally, you can put these comma-separated values between parentheses also. Tup1 = ('physics', 'chemistry', 1997, 2000) tup2 = (1, 2, 3, 4, 5 ) tup3 = "a", "b", "c", "d" The empty tuple is written as two parentheses containing nothing − tup1 = (); Tuples in Python. A Tuple is a collection of Python objects separated by commas.

Tuples in Python

In someways a tuple is similar to a list in terms of indexing, nested objects and repetition but a tuple is immutable unlike lists which are mutable. Creating Tuples Output: Output. How to Make a Network Scanner using Scapy in 5 Minutes - Python Code. There is now a comment section below, check it out!

How to Make a Network Scanner using Scapy in 5 Minutes - Python Code

Abdou Rockikz · 4 min read · Updated oct 2019 · Ethical Hacking · Packet Manipulation Using Scapy A network scanner is an important element for a network administrator as well as a penetration tester. It allows the user to map the network to find devices that are connected to the same network. In this tutorial, you will learn how to build a simple network scanner using scapy library in Python.

I will assume you already have it installed, If it isn't the case, feel free to check my previous tutorial, or check the scapy's official documentation for installation. There are many ways out there to scan computers in a single network, but we are going to use one of the popular ways which is using ARP requests. First, we gonna need to import essential methods from scapy:

How to Access Wikipedia in Python - Python Code. There is now a comment section below, check it out!

How to Access Wikipedia in Python - Python Code

Abdou Rockikz · 3 min read · Web Scraping Wikipedia is no doubt the largest and most popular general reference work on the internet, it is one of the most popular websites. It features exclusively free content. Top 8 Python Libraries For Data Scientists and Machine Learning Engineers - Python Code. There is now a comment section below, check it out!

Top 8 Python Libraries For Data Scientists and Machine Learning Engineers - Python Code

Abdou Rockikz · 7 min read · Updated sep 2019 · Machine Learning As you may already know, Python is a programming language that lets you work quickly and integrate systems more effectively. NumPy — NumPy. How to Build a Text Generator using Keras in Python - Python Code. There is now a comment section below, check it out!

How to Build a Text Generator using Keras in Python - Python Code

Abdou Rockikz · 9 min read · Machine Learning · Natural Language Processing Recurrent Neural Networks (RNNs) are very powerful sequence models for classification problems. However, in this tutorial, we will use RNNs as generative models, which means they can learn the sequences of a problem and then generate entirely a new sequence for the problem domain. After reading this tutorial, you will learn how to build a LSTM model that can generate text (character by character) using Keras in Python. In text generation, we show the model many training examples so it can learn a pattern between the input and output. Getting Started Let's install the required dependencies for this tutorial: pip3 install tensorflow==1.13.1 keras numpy requests Importing everything: Preparing the Dataset We are going to use a free downloadable book as the dataset: Alice’s Adventures in Wonderland by Lewis Carroll. How to Encrypt and Decrypt Files in Python - Python Code.

There is now a comment section below, check it out!

How to Encrypt and Decrypt Files in Python - Python Code

Abdou Rockikz · 5 min read · Updated oct 2019 · Ethical Hacking Encryption is the process of encoding an information in such a way that only authorized parties can access it. It is critically important because it allows you to securely protect data that you don't want anyone to see or access. In this tutorial, you will learn how to use Python to encrypt files or any byte object (also string objects) using cryptography library. We will be using symmetric encryption, which means the same key we used to encrypt data, is also usable for decryption. How to Extract Weather Data from Google in Python - Python Code. There is now a comment section below, check it out!

How to Extract Weather Data from Google in Python - Python Code

Abdou Rockikz · 8 min read · Web Scraping As you may know, Web scraping is essentially extracting data from websites. How to Download Files in Python - Python Code. There is now a comment section below, check it out!

How to Download Files in Python - Python Code

Abdou Rockikz · 3 min read · Updated oct 2019 · General Python Topics Downloading files from the Internet is one of the most common daily tasks to perform on the Web. Also, it is important due to the fact that a lot of successful softwares allow their users to download files from the Internet. ReceptiveFields. 01_notebook. Index. Python Programming - Wikibooks, open books for an open world. Python Programming From Wikibooks, open books for an open world Jump to: navigation, search This book describes Python, an open-source general-purpose interpreted programming language available for a broad range of operating systems. There are currently three major implementations: the standard implementation written in C, Jython written in Java, and IronPython written in C# for the .NET environment. There are two common versions currently in use: 2.x and 3.x.

Welcome to Python.org. Announcements — IPython. Python. In ancient Greece[edit] In computing[edit] In media and entertainment[edit] In roller coasters[edit] In weaponry[edit] Colt Python, a .357 Magnum caliber revolverPython missile, a series of Israeli air-to-air missiles In other uses[edit] See also[edit] Pyton, a Norwegian adult humour magazine. Books — IPython. Install · Docs · Videos · News · Cite · Sponsors · Donate Versions Stable 2.3 – October 2014 Install. IPython Books - IPython Cookbook. IPython Interactive Computing and Visualization Cookbook This advanced-level book covers a wide range of methods for data science with Python: Interactive computing in the IPython notebook High-performance computing with Python Statistics, machine learning, data mining Signal processing and mathematical modeling Highlights 500+ pages100+ recipes15 chaptersEach recipe illustrates one method on one real-world exampleCode for Python 3 (but works fine on Python 2.7)All of the code freely available on GitHubContribute with issues and pull requests on GitHub This is an advanced-level book: basic knowledge of IPython, NumPy, pandas, matplotlib is required.

Featured recipes A selection of free recipes from the book: Part I: Advanced High-Performance Interactive Computing Part I (chapters 1-6) covers advanced methods in interactive numerical computing, high-performance computing, and data visualization. IPython Books - IPython Minibook.