Pull to refresh
399.97

Python *

Interpreted high-level programming language for general-purpose programming

Show first
Rating limit
Level of difficulty

Python or R: Which Is A Better Choice For Data Science?

Reading time6 min
Views3.2K


Data science is going to revolutionize this world completely in the coming years. The tough question among data scientists is that which programming language plays the most important role in data science? There are many programming languages used in data science including R, C++, Python.

In this blog, we are going to discuss two important programming languages namely Python and R. This will help you choose the best-fit language for your next data science project.

Python is an open-source, flexible, object-oriented and easy-to-use programming language. It has a large community base and consists of a rich set of libraries & tools. It is, in fact, the first choice of every data scientist.
Read more →
Total votes 3: ↑3 and ↓0+3
Comments4

Testing Water Melon using Neural Networks: Full Dev. Cycle from prototyping to the App. at Google Play

Reading time7 min
Views701

The beginning


It all started when I found an app. on Apple market, that supposedly was able to determine the ripeness of a water mellon. A program was… strange. Just think about it: instead of knocking using your knuckles, you were supposed to hit the water mellon with your iPhone! Nevertheless, I have decided to repeate that functionality on an Andtoid platform.
Read more →
Rating0
Comments0

Tips and tricks from my Telegram-channel @pythonetc, November 2019

Reading time3 min
Views2.7K

Tips and tricks from my Telegram-channel @pythonetc, November 2019

It is a new selection of tips and tricks about Python and programming from my Telegram-channel @pythonetc.

Previous publications.



PATH is an environment variable that stores paths where executables are looked for. When you ask your shell to run ls, the shell looks for the ls executable file across all paths that are presented in PATH.
Read more →
Total votes 31: ↑30 and ↓1+29
Comments1

Faster ENUM

Reading time9 min
Views2.3K

tl;dr


github.com/QratorLabs/fastenum
pip install fast-enum

What are enums


(If you think you know that — scroll down to the “Enums in Standard Library” section).

Imagine that you need to describe a set of all possible states for the entities in your database model. You'll probably use a bunch of constants defined as module-level attributes:
# /path/to/package/static.py:
INITIAL = 0
PROCESSING = 1
PROCESSED = 2
DECLINED = 3
RETURNED = 4
...

...or as class-level attributes defined in their own class:
class MyModelStates:
  INITIAL = 0
  PROCESSING = 1
  PROCESSED = 2
  DECLINED = 3
  RETURNED = 4

That helps you refer to those states by their mnemonic names, while they persist in your storage as simple integers. By this, you get rid of magic numbers scattered through your code and make it more readable and self-descriptive.

But, both the module-level constant and the class with the static attributes suffer from the inherent nature of python objects: they are all mutable. You may accidentally assign a value to your constant at runtime, and that is a mess to debug and rollback your broken entities. So, you might want to make your set of constants immutable, which means both the number of constants declared and the values they are mapped to must not be modified at runtime.
Read more →
Total votes 28: ↑28 and ↓0+28
Comments0

How to Write a Smart Contract with Python on Ontology? Part 5: Native API

Reading time3 min
Views485
image

In the previous Python tutorial posts, I have introduced the Ontology Smart Contract in
Part 1: Blockchain & Block API and
Part 2: Storage API
Part 3: Runtime API
Part 4: Native API and described how to use smart contracts for ONT / ONG transfer.

Today we will talk about how to use Upgrade API to upgrade smart contract. There are 2 APIs: Destroy and Migrate.
Read more →
Rating0
Comments0

Python for AI: A match made in heaven

Reading time4 min
Views6.4K
The artificial intelligence global market is expected to reach $190 billion by 2025. The bright future of this technology allures every entrepreneur. In fact, when we think about the technologies that are going to rule in the future, the one name that comes to our minds is ~ Artificial intelligence.

AI along with its subsets like machine learning and deep learning is making such things possible which were unimaginable by humankind a few years back. It is affecting the realities and sometimes changing reality completely.



The power of AI is well acknowledged by businesses as 84% of respondents in a study voted that they believe artificial intelligence will allow them to enjoy a competitive edge over competitors.

Although entrepreneurs have an idea about AI but what most of them lack is proper implementation. The use of optimum programming tools for a complex technology like AI can create wonders for the world of business.

Every custom web developer knows that a python is an apt tool for building AI-enabled -applications. The language has been used to create 126,424 websites so far. Since its launch in the late 1980s, python has seen remarkable growth not only in users but in applications too.

Python is the favorite language for software developers to create applications that have artificial intelligence, machine learning, etc features embedded in them. But there are reasons behind everything.

This blog is written with the intent to unveil these reasons. Let’s explore why python is extensively used in AI-enabled software development services.
Read more →
Rating0
Comments0

Top 5 Software Development Practices to Follow in 2020

Reading time6 min
Views9.7K


Though it seems we are just a few months away from reaching 2020, these months are also important in the field of software development. Here in this article, we will see how the coming year 2020 will change the lives of software developers!

Future Software Development Is Here!


Traditional software development is about developing software by writing code and following some fixed rules. But the present-day software development witnessed a paradigm shift with advances in Artificial Intelligence, Machine Learning, and Deep Learning. With the integration of these three technologies, developers will be able to build software solutions that learn the instructions and add extra features and patterns in data that are needed for the desired outcome.

Also read: How Blockchain is helping the healthcare sector?

Let’s Try Out With Some Code


Over time, the neural network software development systems have become more complex in terms of integrations as well as layers of functionality and interfaces. Developers can build a very simple neural network with Python 3.6. Here’s an example of a program that does binary classification with 1 or 0.

Of course, we can start by creating a neural network class:


import numpy as np
X=np.array([[0,1,1,0],[0,1,1,1],[1,0,0,1]])
y=np.array([[0],[1],[1]])


Applying the Sigmoid function:

def sigmoid ():
   return 1/(1 + np.exp(-x))
def derivatives_sigmoid ():
   return x * (1-x)


Training the Model With Initial Weights and Biases:
epoch=10000
lr=0.1
inputlayer_neurons = X.shape[1]
hiddenlayer_neurons = 3
output_neurons = 1

wh=np.random.uniform(size=(inputlayer_neurons,hiddenlayer_neurons))
bh=np.random.uniform(size=(1,hiddenlayer_neurons))
wout=np.random.uniform(size=(hiddenlayer_neurons,output_neurons))
bout=np.random.uniform(size=(1,output_neurons))


For beginners, if you need help regarding neural networks, you can get in touch with top software development company.Or, you can hire AI/ML developers to work on your project.
Read more →
Total votes 8: ↑7 and ↓1+6
Comments0

.NET Core with Jupyter Notebooks Preview 1

Reading time3 min
Views1.8K
When you think about Jupyter Notebooks, you probably think about writing your code in Python, R, Julia, or Scala and not .NET. Today we are excited to announce you can write .NET code in Jupyter Notebooks.

Try .NET has grown to support more interactive experiences across the web with runnable code snippets, interactive documentation generator for .NET core with dotnet try global tool, and now .NET in Jupyter Notebooks.

Read more →
Total votes 7: ↑7 and ↓0+7
Comments0

Complexity Waterfall and Architecture on Demand

Reading time10 min
Views1.7K

Logo


When talking about "bad code" people almost certainly mean "complex code" among other popular problems. The thing about complexity is that it comes out of nowhere. One day you start your fairly simple project, the other day you find it in ruins. And no one knows how and when did it happen.


But, this ultimately happens for a reason! Code complexity enters your codebase in two possible ways: with big chunks and incremental additions. And people are bad at reviewing and finding both of them.

Read more →
Total votes 5: ↑5 and ↓0+5
Comments0

Announcing Support for Native Editing of Jupyter Notebooks in VS Code

Reading time3 min
Views1.7K
With October release of the Python extension, we’re excited to announce the support of native editing of Jupyter notebooks inside Visual Studio Code! You can now directly edit .ipynb files and get the interactivity of Jupyter notebooks with all of the power of VS Code.

You can manage source control, open multiple files, and leverage productivity features like IntelliSense, Git integration, and multi-file management, offering a brand-new way for data scientists and developers to experiment and work with data efficiently. You can try out this experience today by downloading the latest version of the Python extension and creating/opening a Jupyter Notebook inside VS Code.



Since the initial release of our data science experience in VS Code, one of the top features that users have requested has been a more notebook-like layout to edit their Jupyter notebooks inside VS Code. In the rest of this post we’ll take a look at the new capabilities this offers.
Read more →
Total votes 9: ↑9 and ↓0+9
Comments0

Python in Visual Studio Code – October 2019 Release

Reading time3 min
Views2.9K
We are pleased to announce that the October 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about  Python support in Visual Studio Code in the documentation.  

In this release we addressed 97 issues, including native editing of Jupyter Notebooks, a button to run a Python file in the terminal, and linting and import improvements with the Python Language Server. The full list of enhancements is listed in our changelog

Read more →
Total votes 8: ↑8 and ↓0+8
Comments0

How to Write a Smart Contract with Python on Ontology? Part 4: Native API

Reading time4 min
Views1.7K
image

Earlier, I have introduced the Ontology Smart Contract in
Part 1: Blockchain & Block API and
Part 2: Storage API
Part 3: Runtime API
Today, let’s talk about how to invoke an Ontology native smart contract through the Native API. One of the most typical functions of invoking native contract is asset transfer.
Read more →
Total votes 5: ↑5 and ↓0+5
Comments0

Python vs JavaScript: Which One Can Benefit You The Most?

Reading time10 min
Views23K


The web development arena is moving at a fast pace and has reached an advanced stage today. Python and Javascript making some significant contributions for almost three decades. Now, being a developer or a business if you are planning to pick one of these, then it’s going to be tough just because both are too good to avoid. Hence, this brings up the topic ‘Python vs JavaScript: Which One Can Benefit You The Most?’

These two languages are supported by various trending web frameworks and libraries which are the real game-changers. The introduction of these frameworks and libraries to the web ecosystem has brought new paradigms, traditional notions, and standards of software development.
Read more →
Total votes 12: ↑10 and ↓2+8
Comments3

How to Write a Smart Contract with Python on Ontology? Part 3: Runtime API

Reading time3 min
Views1.3K
image

Introduction


Earlier, I have introduced the Ontology Smart Contract in
Part 1: Blockchain & Block API and
Part 2: Storage API
Now when you have an idea about how to call the relevant API for persistent storage when developing Python smart contract on Ontology, let’s go on to Runtime API (Contract Execution API). The Runtime API has 8 related APIs that provide common interfaces for contract execution and help developers get, convert, and validate data. Here’s a brief description of these 8 APIs:
Read more →
Rating0
Comments0

How to Write a Smart Contract with Python on Ontology? Part 2: Storage API

Reading time3 min
Views1.3K
image
This is an official tutorial published earlier on Ontology Medium blog
Excited to publish it for Habr readers. Feel free to ask any related questions and suggest a better format for tutorial materials

Foreword


Earlier, in Part 1, we introduced the Blockchain & Block API of Ontology’s smart contract. Today we will discuss how to use the second module: Storage API. The Storage API has five related APIs that enable addition, deletion, and changes to persistent storage in blockchain smart contracts. Here’s a brief description of the five APIs:
Read more →
Rating0
Comments0

Machine Learning for your flat hunt. Part 2

Reading time9 min
Views1.6K


Have you thought about the influence of the nearest metro to the price of your flat? 
What about several kindergartens around your apartment? Are you ready to plunge in the world of geo-spatial data?


The world provides so much information…



Read more →
Total votes 4: ↑4 and ↓0+4
Comments0

A new video series for beginners to learn Python programming

Reading time2 min
Views1.4K
Probably the largest hurdle when learning any new programming language is simply knowing where to get started. What’s important? What do I need to know to be proficient? It’s hard to follow docs when you’re not even sure what you’re reading.

You might be taking a look at Python. Maybe you’re drawn because of its popularity. Maybe you’re drawn to its flexibility. With Python you can create solutions of all shapes and sizes. You can dig into web development. Simplify your life through automation. Or maybe begin building the future with machine learning.

Picking up a new language is a common situation for modern-day developers. The days of going your entire career focused on one language are long since gone.

Fortunately, concepts typically don’t change as you move from one programming language to the next. Sure, the syntax might be different, but an if statement is still an if statement even when it’s written using { } or End If. So, we don’t need to learn how to program, but rather how to program in a new language.

This is why Susan and I created this series of videos! You might know how to write code, for example in JavaScript, Java or C# (or COBOL, or Bash, or… it doesn’t matter, really). Maybe you learned in a college course, online, or reading a book. So, you don’t need to be taught what an if statement is, but rather what an if statement looks like in Python.

Read more →
Total votes 7: ↑6 and ↓1+5
Comments0

Authors' contribution