Kornia
Elixir-Code-Smells
Our great sponsors
Kornia | Elixir-Code-Smells | |
---|---|---|
11 | 8 | |
9,227 | 1,403 | |
1.6% | - | |
9.4 | 5.7 | |
5 days ago | 3 months ago | |
Python | Elixir | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Kornia
- [P] Kornia: Differential Computer Vision
-
Hacker News top posts: May 10, 2022
Kornia: Differential Computer Vision\ (3 comments)
- Kornia: Differential Computer Vision
-
Top 5 Python libraries for Computer vision
Kornia - Kornia is a differentiable computer vision library for PyTorch. It consists of a set of routines and differentiable modules to solve generic computer vision problems. At its core, the package uses PyTorch as its main backend both for efficiency and to take advantage of the reverse-mode auto-differentiation to define and compute the gradient of complex functions.
-
[P] Using PyTorch + NumPy? A bug that plagues thousands of open-source ML projects.
Use kornia.augmentation where this problem is solved doing the augmentations in batch outside the dataloader. https://github.com/kornia/kornia
-
SpaCy v3.0 Released (Python Natural Language Processing)
I haven't had a situation to use it, but I think Kornia looks cool: https://github.com/kornia/kornia
Elixir-Code-Smells
-
Code Smells in Elixir
Results can be found in: https://github.com/lucasvegi/Elixir-Code-Smells
-
Hacker News top posts: May 10, 2022
Catalog of Elixir-specific code smells\ (21 comments)
-
Catalog of Elixir-specific code smells
Generally speaking, code smells are also context-sensitive structures. This means that a smell will not always represent pain in a specific project. It is just a possibility that must be analyzed in each context. It is a warning, not a judgment.
We are interested in knowing Elixir's community opinion about these code smells. Collaborations can be made via GitHub issues (https://github.com/lucasvegi/Elixir-Code-Smells/issues) or Pull Requests in our repo!
I agree. If I'm jumping into unfamiliar code or code I haven't read in a while, I strongly prefer to see what gets pattern-matched out of the incoming struct in as few places as possible. Jumping back and forth between a lot of small helper functions that could have been lines in a pattern match is rough.
In this specific case, I suspect the x_error_api_response would end up becoming half a dozen different functions and understanding what get_customer returned based on the Env struct would require quite a few trips back and forth.
It's a much smaller nit, but I also found the fix for "complex extraction clauses" slightly less readable than the original: https://github.com/lucasvegi/Elixir-Code-Smells#complex-extr...
I've been doing elixir professionally for 6 years. I realize I'm in the minority, but as someone who _reads_ a lot of code, I feel that the strong emphasis (and in some cases, requirement) to extract functions seriously hurts readability.
Quickly glancing through this, I see the Complex Branching case as an example (https://github.com/lucasvegi/Elixir-Code-Smells#complex-bran...). It makes my brain need to act like the runtime, storing the stack of the current function in my head, jumping to the function call, then returning back to the original function and restoring the stack (to be clear, I'm not talking about the actual execution, I'm talking about what my brain goes through reading this).
In a complex codebase, the jumping can be far (physically and figuratively), especially since there's a strong preference for pattern matching in function parameters (so in the given example, there might be 4 `success_api_response/2`.
Inline code is _often_ easier to read and reason about, even when you aren't concerned about a function mutating a parameter (as in the case with elixir).
What are some alternatives?
OpenCV - Open Source Computer Vision Library
Face Recognition - The world's simplest facial recognition api for Python and the command line
EasyOCR - Ready-to-use OCR with 80+ supported languages and all popular writing scripts including Latin, Chinese, Arabic, Devanagari, Cyrillic and etc.
SimpleCV - The Open Source Framework for Machine Vision
multi-object-tracker - Multi-object trackers in Python
gaps - A Genetic Algorithm-Based Solver for Jigsaw Puzzles :cyclone:
tesserocr - A Python wrapper for the tesseract-ocr API
pytesseract - A Python wrapper for Google Tesseract
Pytorch - Tensors and Dynamic neural networks in Python with strong GPU acceleration
duckling - Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings.
ivy - The Unified AI Framework
Dlib - A toolkit for making real world machine learning and data analysis applications in C++