PyNotes
259 subscribers
125 photos
7 videos
1 file
60 links
**Code is communication**
admin: @Xojarbu
https://t.me/solutions_py for problem solutions
Download Telegram
PyNotes
Title: Namespaces A namespace is a system that has a unique name for each and every object in Python. An object might be a variable or a method. There are 3 types of namespaces: built-in namespaces global namespaces local namespaces e.g var1 = 5 # global…
Namespaces have different lifetimes, because they are often created at different points in time.

πŸ“Œ The namespace containing the built-in names is created when the Python interpreter starts up, and is never deleted.

πŸ“Œ The global namespace of a module is generated when the module is read in. Module namespaces normally last until the script ends, i.e. the interpreter quits.
πŸ“Œ When a function is called, a local namespace is created for this function. This namespace is deleted either if the function ends, i.e. returns, or if the function raises an exception, which is not dealt with within the function.

source
Title: Scope

A scope (visibility of name) refers to a region of a program where a namespace can be directly accessed. Scopes are defined statically, but they are used dynamically.

e.g
var1 = 5 # global scope
def some_func(): # global scope
var2 = 6 # local scope

Python scope concept follows a rule known as the LEGB (Local, Enclosing, Global, and Built-in scopes).

When we call a name, Python starts searching it from local scopes and ends in built-is scopes. If it cannot find, you get a NameError.
#testing
Types of testing. (short notes)

Manual testing: testing is done without using any tools
βž–Time consuming
βž–Boring
βž–Repetitive
βž• Lower cost in the short term
βž• Adaptable
βž• Flexible
βž• Easy to identify defects that automation tools may miss

Automated testing: testing is done by using a set of automated tools.

βž– Those tools can have limitations
βž– Can be expensive for an organization
βž–Heavy reliance on tools

βž• Tests can be executed in parallel
βž•Repeatable
βž• Quick and creative

Functional testing - tests whether or not the system is working properly. It can include both functional and automated testing.

Non-functional testing: Tests how well the system meets the requirements (performance, usability, reliability, etc.)
#class #constructor
In python every class has a constructor, but its not required to explicitly define it.

the __init__() method is a constructor and is always called when an object is created.

There are two types of constructors:
Default constructor - a simple constructor which doesn’t accept any arguments.

Parameterized constructor - a constructor with arguments.

Source1, Source2
issubclass()

Python issubclass() is built-in function used to check if a class is a subclass of another class or not. This function returns True if the given class is the subclass of given class or any element of the tuple, otherwise False.

It receives two arguments:

issubclass(object, classinfo)
object: class to be checked
classinfo: class, types or a tuple of classes and types
#exceptions

Checking several Exception errors in one line using tuple
Toptal(afzalliklari va kamchiliklari), Toptalga ishga kirish jarayoni va keyingi bosqichlar haqida do'stimiz Vohidjon_Karimjonov ko'p so'ralgan savollarga javob sifatida o'zbek/ingliz tillarida foydali maqola tayyorlagan.

Toptal interview haqida bosqichma-bosqich, tushunarli guide berilgan.

Maqola so'ngida referral linkini ham topasizπŸ˜‰

πŸ‘‰ https://vovopap.com/2021/12/25/hammasi-toptal-haqida.html
#python
when we import a module(python file), python interpretator searches for that module name in sys.modules.
If it returns False, it will create a new module object and add to sys.modules and then code inside module is executed.

πŸ“Œ Therefore, when we import the same module several times in one file, it is executed only once.
#big_o

Big O Notation

Have collected some notes related to Big O notation: Link

Will leave it here as well πŸ™‚

Additional source: https://stepik.org/lesson/26053/step/3?unit=8085
πŸ‘6🀩1
Do'stimiz o'zlarini ko'p yillik tajribalaridan kelib chiqib barchamiz bir kun duch keladigan holat ya'ni Ish joyimizni muvaffaqiyatli tark etish mavzusida post yozibti. SIzlarga ham ulashmoqchiman ))

Shaxsan o'zimni ish faoliyatimda bunga bir necha marta duch kelganman va tan olaman bu oson protses emas. Chunki yaxshi ko'rgan, birga uzoq muddat ishlagan, oiladek bo'lib qolgan jamoani tark etish, keyingi etapda nima bo'lishini aniq bilmasdan tavakkal qilish doim ham oson emas. Hayotimizda shunday burilishlar paytida chiroyli usul qo'llashimiz juda ham muhim hisoblanadi.

πŸ‘‰ https://vovopap.com/2022/01/06/ishni-muvaffaqiyatli-tark-etish.html

Original English version is here: Link
πŸ‘9
πŸ“ŒπŸ“ŒAnother good opportunity for those who want to get a job offer or offer for internship at Epam Systems (Uzbekistan).

There is a new training sarting in March : Link
Don't miss the chance πŸ™ƒ
Qiziq algoritmik oΚ»yinπŸ˜ƒ
Can be out of topic but I was waiting for this day to share this news with you allπŸ˜ƒπŸ˜ƒ

Now we have one more Googler 😎😎 from UzbekistanπŸ‡ΊπŸ‡Ώ, and we will have even more in the future InshaAlloh

Link
πŸ”₯13πŸ‘4
Esingizda bo'lsa Google ga ishga qabul qilingan do'stimiz haqida aytgan edik, bugun ular tomonidan FAANG kompaniyalariga topshirgan intervyulari haqida post larini ulashmoqchimiz.

πŸ“ŒπŸ“Œ Link

Bunda siz nafaqat Google balki Amazon, Facebook, Uber, Spotify bilan o'tgan intervyular qanday tarzda bo'lganligi va tayyorlanishni boshlamoqchi bo'lganlar uchun o'z tajribalaridan kelib chiqib hayotiy tavsiyalarni ham o'qishingiz mumkin.
-----
Ushbu maqoladagi eng menga yoqqan fraza bu "Never lie" (Hech qachon yolg'on gapirmang)
Rostdan ham intervyu jarayonida interviewerni alday olaman deb harakat qilmang bu sizning eng katta xatoyingiz bo'ladi. Ular baribir sizni rol o'ynayotganingizni sezib qolishadi. Aksincha bilmagan narsangizni bilmasligingizni tan olish bilan birga o'zingizni qanchalik yangi narsalarni tez o'rgana olishga qobiliyatingiz borligini ko'rsata olsangiz siz yutdingiz hisob ✊✊ Ular ham qachondir sizning o'rningizda bo'lgan sizni yaxshi tushunishadi va qo'llab quvvatlashga harakat qilishadi.
πŸ‘11
Xadra, Azon kitoblar do'konida o'zbek tilida PYTHON ga oid kitoblarni ko'rib ko'zlar quvondi😊😊
πŸ‘6πŸ”₯1
Forwarded from Hojarbu's Corner🌱
Assalamu alaykum
Bugun uzoq safarga yo'l olyapmiz. Insha'Allah safarimiz manfaatli va foydali bo'lsin va sizlar bilan ko'rgan va o'rgangan narsalarimni ulashishga astoydil harakat qilaman😊😊
πŸ‘17πŸ”₯3🀩3
Arrived eventually πŸ₯³πŸ₯³πŸ₯³
πŸ‘18🀩7πŸ”₯4
Companies in San Francisco
πŸ‘27