Archive

Posts Tagged ‘github’

Bash-Utils updated

January 9, 2017 Leave a comment

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.

Advertisements
Categories: python Tags: , ,

vulture is available in neomake

May 29, 2016 1 comment

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:

Without vulture:
vulture_without

With vulture:
vulture_with

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
" }}}

Links
Pull requests #420 and #440.

Categories: python Tags: , , , ,

find out a github user’s (hidden) email address

January 11, 2016 Leave a comment

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.

Categories: python Tags: ,

trending Python repositories on GitHub

August 9, 2015 Leave a comment

https://github.com/trending?l=python

Find what repositories the GitHub community is most excited about today.

Categories: python Tags: ,

Top 400 Python Projects on Github

August 11, 2013 Leave a comment
Categories: python Tags: , ,

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.

Categories: fun, python Tags: ,

Install a package with pip from a github repository

December 27, 2012 Leave a comment

Problem
You want to install a package from a GitHub repository via pip.

Solution
Let’s take an example. Say you want to install requests whose github address is https://github.com/kennethreitz/requests.

With pip you can istall it like this:

sudo pip install -U https://github.com/kennethreitz/requests/zipball/master
Categories: python Tags: ,