Archive
Getting started with PyQt5
I made a GitHub repository where I collected some simple PyQt5 examples: https://github.com/jabbalaci/GUI-Dev-with-Python . I provide some examples written manually and you can also find an example that was made with Qt Designer.
Bash-Utils updated
I have several projects on GitHub (link) but some of them are either abandoned or outdated. So I want to review and update all of them.
I started this process with Bash-Utils. The Python 2 codebase was moved entirely to Python 3. The old Python 2 source is tagged and available under the “release” link, but I won’t touch that anymore. Only the current version (Python 3) will be updated. The README file is converted to Markdown, and new scripts are also documented.
Today I added a script called “rep.py” that allows you to execute a bash command several times. Example:
$ rep 3 echo hello hello hello hello
It will execute “echo hello” three times.
vulture is available in neomake
Recently I started to use neovim (here is my story). I mainly edit Python codes so I looked around and collected some useful plugins (here is my init.vim file). One of these plugins is neomake, an asynchronous :make
using Neovim’s job-control functionality (it also works in ordinary vim, but without the asynchronous benefits).
I had a little contribution to neomake and that’s what I want to write about in this post. I sent a pull request to include vulture as a Python maker. Vulture finds unused classes, functions and variables in your code. Let’s see two screenshots without and with vulture:
init.vim settings
Here is my corresponding settings that enables vulture too:
Plug 'neomake/neomake' " {{{ " neomake is async => it doesn't block the editor " It's a syntastic alternative. Syntastic was slow for me on python files. " $ sudo pip2/pip3 install flake8 -U " $ sudo pip2/pip3 install vulture -U let g:neomake_python_enabled_makers = ['flake8', 'pep8', 'vulture'] " let g:neomake_python_enabled_makers = ['flake8', 'pep8'] " E501 is line length of 80 characters let g:neomake_python_flake8_maker = { 'args': ['--ignore=E115,E266,E501'], } let g:neomake_python_pep8_maker = { 'args': ['--max-line-length=100', '--ignore=E115,E266'], } " run neomake on the current file on every write: autocmd! BufWritePost * Neomake " }}}
find out a github user’s (hidden) email address
Problem
You want to contact someone on GitHub but (s)he doesn’t indicate his/her email on the profile page. What to do?
Solution
Figure it out :) The manual steps are indicated here. I made a Python script of it that can be found here: https://github.com/jabbalaci/Bash-Utils/blob/master/github_user_email.py .
Usage example:
$ ./github_user_email.py Github info (username or repo. link): https://github.com/jabbalaci/Bash-Utils jabba.laci@gmail.com
If you want to hide your email address, then here are some tips.
trending Python repositories on GitHub
https://github.com/trending?l=python
“Find what repositories the GitHub community is most excited about today.“
Top 400 Python Projects on Github
[ found here ]
Get yourself analyzed on GitHub
If you have a GitHub account, you can get yourself analyzed with The Open Source Report Card.
Here is my report for instance. Scroll down to the bottom and try it with your username.
It will also list users whose activity is similar to yours.