Pull to refresh
212.6
Rating

Python *

Interpreted high-level programming language for general-purpose programming

Show first
  • New
  • Top
Rating limit
  • All
  • ≥0
  • ≥10
  • ≥25
  • ≥50
  • ≥100

Objects without reference cycles and cyclic GC

Python *

Each instance of a class in CPython created using the class syntax is involved in a cyclic GC mechanism. This increases the memory footprint of each instance and can create memory problems in heavily loaded systems.


Is it possible to use only basic reference counting mechanism when necessary?

Let's analyze one approach based on recordclass library that will help to create classes whose instances will only be deleted using the reference counting mechanism.


Note: this is translation from original post (in russian).

Read more →
Total votes 3: ↑3 and ↓0 +3
Views 912
Comments 0

Node.js VS Python: Which is Better?

Web design *Website development *Python *Programming *Node.JS *
image

If you are landing on this page you might be looking for several questions like:

– NodeJS or Python: which is the right choice for my next web app development project?

– Which programming language cost me less?

– Which programming language is suitable for which industry?

– Which programming language is suitable for small business or large scale enterprises?

– Which programming language is scalable, high performing and secure?

In this blog post, I’m going to answer all these questions AND MORE THAN THAT! So, continue reading this blog post:
Read more →
Total votes 3: ↑0 and ↓3 -3
Views 25K
Comments 0

PHP vs Python vs Ruby on Rails: Detailed Comparison

Website development *Ruby *PHP *Python *Ruby on Rails *
Sandbox
image

Which is the best programming technology for web app development in the year 2020? This is one of the most debated questions among web programmers, students and companies (wanted to develop their own website). Actually, every language has its own pros, cons or advantages, disadvantages. It totally depends on your requirements for website development.

In this blog post, I am going to clear your many doubts related to these programming languages or technologies, so that you can choose the best language according to your specific needs and requirements. Here, I’ll do a detailed and comprehensive comparison between these three most popular programming technologies viz. PHP vs Python vs Ruby (RoR). The comparison is on the basis of various stats and data on different parameters. So, let’s start the battle of most popular programming languages ie: PHP vs Python vs Ruby (RoR).
Read more →
Total votes 12: ↑0 and ↓12 -12
Views 5.4K
Comments 5

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

VK corporate blog Python *Programming *


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

Previous publications.


Different asyncio tasks obviously have different stacks. You can view at all of them at any moment using asyncio.all_tasks() to get all currently running tasks and task.get_stack() to get a stack for each task.
Read more →
Total votes 27: ↑26 and ↓1 +25
Views 1K
Comments 0

Python in Visual Studio Code – January 2020 Release

Microsoft corporate blog Python *Programming *Visual Studio *
We are pleased to announce that the January 2020 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.  

Read more →
Total votes 2: ↑2 and ↓0 +2
Views 1.5K
Comments 0

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

Website development *Python *R *


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
Views 2.5K
Comments 6

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

Python *Java *Machine learning *Artificial Intelligence
Tutorial

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 →
Rating 0
Views 448
Comments 0

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

VK corporate blog Python *Programming *

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
Views 1.9K
Comments 1

Faster ENUM

Qrator Labs corporate blog Open source *Python *

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
Views 1.4K
Comments 0

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

Python *DevOps *
Tutorial
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 →
Rating 0
Views 289
Comments 0

Python for AI: A match made in heaven

Python *Machine learning *Software Artificial Intelligence AR and VR
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 →
Rating 0
Views 4.5K
Comments 0

Top 5 Software Development Practices to Follow in 2020

PHP *Python *JavaScript *Java *.NET *


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
Views 9.2K
Comments 0

.NET Core with Jupyter Notebooks Preview 1

Microsoft corporate blog Python *Programming *.NET *R *
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
Views 1.4K
Comments 0

Complexity Waterfall and Architecture on Demand

Website development *Python *Programming *Perfect code *

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
Views 1.2K
Comments 0

Announcing Support for Native Editing of Jupyter Notebooks in VS Code

Microsoft corporate blog Python *Programming *.NET *Visual Studio *
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
Views 1K
Comments 0

Python in Visual Studio Code – October 2019 Release

Microsoft corporate blog Python *Programming *Visual Studio *
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
Views 1.9K
Comments 0

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

Cryptography *Python *DevOps *Distributed systems *Cryptocurrencies
Tutorial
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
Views 1.1K
Comments 0

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

Website development *Python *JavaScript *Programming *Django *
Sandbox


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
Views 20K
Comments 3

Authors' contribution