Skip to content

Instantly share code, notes, and snippets.

View ahsan-ikram's full-sized avatar
🌐
Building a world where ethical intelligent systems uplift human potential.

Ahsan Ikram ahsan-ikram

🌐
Building a world where ethical intelligent systems uplift human potential.
View GitHub Profile

Python naming conventions

This document gives coding conventions example for the Python code. This style guide evolves over time as additional conventions are identified and past conventions are rendered obsolete by changes in the language itself.

1. General

  • Avoid using names that are too general or too wordy. Strike a good balance between the two.
    • Bad: data_structure, my_list, info_map, dictionary_for_the_purpose_of_storing_data_representing_word_definitions
    • Good: user_profile, menu_options, word_definitions
  • Never use the characters as single character variable names:
  • “l“ : lowercase letter el
@ahsan-ikram
ahsan-ikram / how-to-add-image-to-gist.md
Created September 7, 2020 19:33 — forked from mroderick/how-to-add-image-to-gist.md
How to add an image to a gist

How to add an image to a gist

  1. Create a gist if you haven't already.
  2. Clone your gist:
    # make sure to replace `<hash>` with your gist's hash
    git clone https://gist.github.com/<hash>.git # with https
    git clone [email protected]:<hash>.git     # or with ssh
1. The Law of the Lid: Leadership Ability Determines a Person’s Level of Effectiveness
2. The Law of Influence: The True Measure of Leadership Is Influence – Nothing More, Nothing Less
3. The Law of Process: Leadership Develops Daily, Not in a Day
4. The Law of Navigation: Anyone Can Steer the Ship, But It Takes a Leader to Chart the Course
5. The Law of Addition: Anyone either add value or subtract value. Leaders are adders.
6. The Law of Solid Ground: Trust Is the Foundation of Leadership
7. The Law of Respect: People Naturally Follow Leaders Stronger Than Themselves
8. The Law of Intuition: Leaders Evaluate Everything with a Leadership Bias
9. The Law of Magnetism: Who You Are Is Who You Attract
10. The Law of Connection: Leaders Touch a Heart Before They Ask for a Hand
@ahsan-ikram
ahsan-ikram / slack-messages-by-user.py
Created January 2, 2019 09:52 — forked from demmer/slack-messages-by-user.py
count slack messages posted to a channel by user
#!/usr/bin/python
'''
Script to count messages by user posted to a channel for a given date range.
Install:
# sudo pip install slackclient
Also you will need to obtain a slack API token:
https://api.slack.com/docs/oauth-test-tokens
@ahsan-ikram
ahsan-ikram / pipenv_cheat_sheet.md
Created January 1, 2019 18:48 — forked from bradtraversy/pipenv_cheat_sheet.md
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@ahsan-ikram
ahsan-ikram / braking.md
Created January 10, 2018 22:53
Fahrschule