Discover and read the best of Twitter Threads about #pythonprogramming

Most recents (22)

How to Find Factorial in Three Effective Ways

🧵Step by Step Solution

#Python #pythonprogramming #DataScience #DataAnalytics #Data #MachineLearning #Python


Write a program which can compute the factorial of a given number.

Suppose the following input is supplied to the program:
Then, the output should be:

In case of input data being supplied to the question, it should be assumed to be a console input.

💡Concept of Factorial

- Factorial of 5 = 1 x 2 x 3 x 4 x 5 = 120
- Factorial of 0 = 1
- Factorial of 1 = 1
- Factorial of 2 = 1 x 2 = 2
- Factorial of -1 = Does not exist

👇🏻 Image
Read 9 tweets
Ever wondered what algorithm can sum a list/array the fastest in Python? Here's a surface level overview

A Thread 🧵👇

#python3 #pythonic #pythonprogramming #programming #Algorithms #DataScience Image
First of we generated a random list of "1000000" numbers to feed all the algorithms.

This very first algorithm uses the built-in sum method. Its the easiest one to implement. Image
Second algorithm is just the traditional approach of creating a variable and then using a for loop to add the sum into it. Image
Read 8 tweets
A #Thread 🧵 on all the python libraries which are used in trading.

Save it for later.

#python #trading #stockmarket #trader #pythonprogramming #pythonlibraries #numpy #pandas #coding #Blog
Read 6 tweets
🔴 Computer Vision Tutorial 4️⃣: Edge detection
🟡 Jupyter Notebook 📒 in second tweet.

Check this out 👇

#programming #MachineLearning #DataScience #pythonprogramming #CodeNewbie #pythoncode #100daysofcode #pythontricks #pythonprojects #100daysofcodechallenge #python #opencv
🔵 Find Jupyter Notebook 📒 ⬇️…
Hope you enjoyed reading!! 📖

Follow me if you are interested in:
✅ Python 🐍
✅ Machine learning 🤖
✅ Computer Vision 🎥
✅ MlOps ⚒️

Retweet 🔁 the first tweet 🐥 .
Cheers!! 🍻
Read 3 tweets
Following tips may boost model performance across different network structures with up to 5% (mAP or mean Average Precision) without increasing computational costs in any way.

#computervision #pytorch #deeplearning #deeplearningai #100daysofmlcode #neuralnetworks #AI
Visually Coherent Image Mix-up for Object Detection. This has already been proven to be successful in lessening adversarial fears in network classification after testing it on COCO 2017 and PASCAL datasets with YOLOv3 models.
#computervision #pytorch
Read 13 tweets
Preparing for a technical interview for a #DataScience position? These are some of the questions that typically allow me as an interviewer to quickly distinguish between juniors and mediors, including some quick tips 🧵. #Python #pythonprogramming #DataScientist #Jobs
All questions about SQL. Not the hardest thing to learn, but many #DataScientists only start to learn the value of SQL when they actually become part of a dev team. I’m not only talking about SELECT * FROM table, but also about joins, truncates, partitions and constraints.
Interacting with an API. Make sure you know your requests (GET, POST, PUT, DELETE, PATCH), as well as the #Python requests library.
Read 10 tweets
#DataScientist in a software dev team and #pythonprogramming code for production pipelines? You should think carefully about scalability and integration. One of the things to consider is datatypes, here are some helpful tips 🧵
#Python is a dynamically typed language, but that doesn't mean you shouldn't care about types. Know you dtypes, from "str" to "bool" to "int8" to "float64", and understand their memory footprint and restrictions. Especially when working with larger objects, choose wisely.
Loose the strings. 9/10 times strings can be replaced by categoricals (Pandas) or even better by Enums (…). This can reduce memory footprint of large dataframes with >30%, and improves performance.
Read 8 tweets
Top 10 Github Repositories to Learn Python

🧵 thread ↓

#python #pythonprogramming #pythonlearning #github
1. The Algorithms

The Algorithms/Python repo is one of the most starred and forked Python GitHub repo on and there’s a good reason behind its popularity.…
2. vinta/awesome-python

The Awesome Python repo is the second entry in our list of top GitHub Repos for learning Python to feature such crazy high statistics.…
Read 12 tweets
Do you know #Python "Data Classes"

They are a great Python feature that can help you write less code

🧵Let's find out more👇
1️⃣ dataclass decorator adds generated methods
- __init__
- __repr__
- __eq__

to the class and returns the same class it was given. This module provides a deco...
2️⃣ Generated __init__ method takes all fields as function parameters. Their values are set to instance attributes with the same names.

Fields are defined as type annotated class attributes.

For example, you can define User with fields id and name.👇 A dataclass is a Python mod...
Read 9 tweets
Today, I'm starting to learn Python 🐍 (finally).
So I want to share with you this killer websites to learn this Powerful Language 🔥

Thread 🧵

#DEVCommunity #Python #coding #Programming #pythonprogramming #100DaysOfCode
1️⃣ Tutorialspoint.
Read 9 tweets
Our topic of today is a "PRINT FUNCTION" in python.

#SSOT #PYTHON #pythonlearning #Python #pythonprogramming #CyberSecurity #softwaredevelopment
In Python, the command print tells the program to display words or numbers on the screen. Here's a line of code that tells Python to display the words “Hello, World!”

print("Hello, World!")
print is a keyword—that is, a word that has special meaning for Python. It means, "Display what’s inside the parentheses." Note that print isn't capitalized. If you capitalize it, the program won’t run.
Read 9 tweets
Today we are going to talk about "DATA TYPES IN PYTHON"
Just follow the thread till the end.

#pythonprogramming #pythonlearning #SSOT #python
What is data type in python programming?

In python programming, a data type is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data.
In python programming, data type is an important concept.

Variables can store data of different types, and different types can do different things.

Python has the following data types built-in by default, in these categories:
Read 12 tweets
Find the median and the quarts parts of a statistic sequence in #pythonprogramming: a thread
1/ First write an median function which find the half indice of a list using n = len(list) (lenght of list) means (n-1)/2 if n is odd and between n/2 - 1 and n/2 if n is even.
In this function, we particularly use % for design arithmetic rest and int operator to convert float to integer. NB: we suppose that at the beginning, list is range by increase order.
2/ Afterwards we define a new function using same logic, but in more take an list of notes,
create a new list knowing that value of first list list[i] design students number who have been the note i. And send the median of the new list.
Read 6 tweets
Hi Reader, I hope you are having a good day and will have a great life from now on.

Day 8 of #100DaysOfCode.

Type 2 of itertools
remember you have to import them using
from itertools import name_of_itertool
Take values from iterable while the predicate function remains true,once predicate function returns false it will no
longer take values.
lis_even=list(takewhile(lambda x:x % 2 == 0,lis))
returns lis_even=[2,4]
Returns a running total of values in iterable.
returns lis_new=[0,1,3,6]
Read 7 tweets
#Learn 🧠🐍#python: Sometimes when programming in python they're situations when you want to copy the contents of an existing list into another. Python has several ways of achieving that. In this thread you will learn different ways of achieving that with the help of examples. Image
1) Using the equal (=) sign operator:
Using = operator you can copy the contents of an existing list onto another/new list. But there's a problem with this method which I will explain on the next section. Image
The problem with the above method is that if you modify the new copied_fruits list the original list (fruits) is modified too, this is because the copied list (copied_fruits) is referencing/ pointing to same fruits list in memory.
Read 17 tweets
Hi Reader, I hope you are having a good day and will have a great life from now on.

Day 7 of #100DaysOfCode.

1)Recursive Functions:
Every recursive function has a base case that stops it from going into the fourth dimension(that's what I like to think 😅).
Example 1: Image
Recursive functions can be implemented with more than one function. Here's an example for checking even and odd numbers
Example 2: Image
Read 8 tweets
Starting a video thread!! 🧵👇

In this video thread you will find 8 #python videos explaining the basics in python for beginners!

Every video is about 100 seconds :)

quick disclaimer it's obviously not covering everything about python ;)
1/8 Variables
Variables is a method to store information:
2/8 Lists

Lists is a type of variable. Lists allow you to store multiple pieces of information individually:
#100DaysOfCode #100DaysOfPython
Read 10 tweets
Flask or Django?

Read thread...
If you've a bit of Python experience, yu know exactly what yu want, & its a fairly standard web application that involves displaying some content, storing some stuff in a database, having users register, & having administrators b able to control what's on the website: use Django.
If you are a Python beginner: use Flask.
Read 7 tweets

Related hashtags

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!