- Ukraine
- 12:25
(UTC +01:00) - uriyyo.github.io
- in/uriyyo
Can you help me learnHaskell
?
My OOP mind struggles every time I attempt to learn it 😢
fibs=0:1:zipWith(+) fibs (tail fibs)
I am a Software Engineer who mostly works withPython
but used to work withC/C++
andJava
a long time ago.Hope one day I will be able to understandHaskell
(I have a dream to learn functional programming).
PEP 505 None-aware operators
is a feature that I miss the most inPython
.
I?.really?.want?.this?.feature??"Or not?"
If you are usingFastAPI
and use function return type annotation asresponse_model
you should know -I am the one who implemented it 😄(FastAPI #1436).
fromfastapiimportFastAPIfrompydanticimportBaseModelapp=FastAPI(title="Bio")classBio(BaseModel):name:streducation:strlanguages:set[str]@app.get("/me")asyncdefget_bio()->Bio:returnBio(name="Yurii",education="Master's degree in Computer Engineering",languages={"Ukrainian","English","Polish","German (a bit)"}, )
Also, I have createdfastapi-pagination
package that helps you to paginate things (obviously) usingFastAPI
📖.Another thing that I currently work on isfastapi-filters
package.Hope one day it will be useful for someone asfastapi-pagination
is 🍸.
I have several contributions toPython
itself (commits).The most interesting one is(#23316 Store func annotations as a tuple).This optimization reduces memory footprint and improves performance of loading modules having many func annotations.
>>>sys.getsizeof({"a":"int","b":"int","return":"int"})232>>>sys.getsizeof(("a","int","b","int","return","int"))88
The tuple is converted intodict
on the fly whenfunc.__annotations__
is accessed first.
I have created a plugin (pycharm-evaluate-async-code)for PyCharm that helps you evaluate async code the usingEvaluate Expression
window.This is really useful when you are debugging your code and want to check some async stuff.I guess it's my favorite project that I have ever done (because I used it every day and it really saved me a lot of time).
PinnedLoading
- pycharm-evaluate-async-code
pycharm-evaluate-async-code PublicFinally, you can use await in evaluate expression 💪
If the problem persists, check theGitHub status page orcontact support.