Skip to content

draperjames/awesome-python-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Snippets

An Atom Package - Atom.io : Github

Shorthand snippets for Python.

Whats Included?

Misc

  • fileheader -> # -*- coding: utf-8 -*-'
  • shebang -> #!/usr/bin/env python
  • ipdb -> import ipdb; ipdb.set_trace() # noqa
  • ifname -> if __name__ == "__main__":

Imports

  • imr -> import re
  • imnp -> import numpy as np
  • impd -> import pandas as pd
  • imbs -> from bs4 import BeautifulSoup
  • immpl -> from matplotlib import pyplot as pl
  • imdt -> from datetime import datetime
  • imreq -> import requests

For loops

  • fori -> basic for loop template.
  • forr -> for loop in range length.
  • foro -> one-liner for loop.

Functions

  • func -> basic function template.

Classes

  • mainclass -> creates a class template.
  • subclass -> creates a subclass template.

More coming soon...

Notes

Issues, Pull Requests, and suggestion are welcome.

To do list

[ ] Add fancy gifs. [ ] Add contributers list.

About

Awesome Python Snippets for Atom Editor

Resources

License

Stars

Watchers

Forks

Packages

No packages published