• Developing and deploying Python for secured environments with Kushal Das

      Here is the translated Russian version of this interview.

      The company of speakers at Moscow Python Conf++ 2020 is great, and it's not a good luck but thorough Program Committee's work. But who cares about achievements, it's much more interesting what the speaker thinks about our own questions. Conferences suits good to find it out, get insider information or advice from an experienced developer. But I got an advantage of being in Program Committee so I already asked our speaker Kushal Das some questions.

      A unique feature of Kushal's speeches is that he often unveils «secret» ways to break Python code and then shows how to write code so that the NSA can't hack it. At our conference Kushal will tell you how to safely develop and deploy Python code. Of course I asked him about security.

      Read more →
    • GitHub repositories tracker and its «for convenience» tricks

      Work in several GitHub repositories (repos) brings inconveniences. Repos are separated from each other, open and closed issues live in different lists, linked pull requests (PRs) can't be seen until opening an issue — our team works in more than 70 repos, so I learned that hard. And started to write repos tracker on Python. It's close to the final, I'd like to share it (it's completely free), and few tricks I used in progress.

      What is that


      Scraper tracks several GitHub repos in a single Google Sheet (GS) table. You can see all of the opened and done issues, related PRs, priorities, your teammates comments, use coloring, filtering, sorting and other GS functions. That's a good integration, here is how it looks:

      image

      How does it work, shortly


      There is Spreadsheet() class which contain several Sheet() objects, each of which have it's own configurations, described in config.py. When Scraper updates a sheet, it loads configurations, sees list of repos to track, requests info from GitHub, builds a table and sends it to GS service. Sounds easy, but there were several tough to deal with things, which I've solved mostly with support of my work experience in Google projects, and which I consider as good patterns. Take a pen.
      Read more →
    • Python-Celery in Windows with Docker managing

      • Tutorial
      To 'adequately' debug Celery under Windows, there are several ways such as:

      > celery worker --app=demo_app.core --pool=solo --loglevel=INFO

      But in fact for normal development, you need a Unix system. If you do not have the opportunity to use it as a native, then it is worth considering...) Well, to be honest, there is always a way out and this is Docker and WSL. If you use such “cool” IDEs like PyCharm, then everything becomes more complicated, because using the WSL interpreter, installing the package with pip, you will have to manually update the project skeleton due to indexing problems.
      Read more →
    • Objects without reference cycles and cyclic GC

        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 →
      • Node.js VS Python: Which is Better?

          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 →
        • AdBlock has stolen the banner, but banners are not teeth — they will be back

          More
          Ads
        • PHP vs Python vs Ruby on Rails: Detailed Comparison

          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 →
          • –12
          • 1.2k
          • 5
        • Tips and tricks from my Telegram-channel @pythonetc, December 2019



            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 →
          • Python in Visual Studio Code – January 2020 Release

              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 →
            • Python or R: Which Is A Better Choice For Data Science?



                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 →
              • Testing Water Melon using Neural Networks: Full Dev. Cycle from prototyping to the App. at Google Play

                • 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 →
              • Tips and tricks from my Telegram-channel @pythonetc, November 2019


                  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 →
                • Faster ENUM

                    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 →
                  • How to Write a Smart Contract with Python on Ontology? Part 5: Native API

                    • 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 →
                  • Python for AI: A match made in heaven

                      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 →
                    • Top 5 Software Development Practices to Follow in 2020



                        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.

                        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 →
                      • .NET Core with Jupyter Notebooks Preview 1

                          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 →