Skip to content

Instantly share code, notes, and snippets.

@hhromic
hhromic / pypi.md
Last active October 25, 2018 12:48
Publishing to PyPi

Publishing to PyPi

  1. Update code
  2. Update version number in setup.py or setup.cfg
  3. Commit all changes: git commit -a
  4. Tag the current state with version number: git tag X.Y.Z
  5. Push changes to remote: git push --tags
  6. Build source distribution: python setup.py sdist bdist_wheel
  7. Release to PyPi: twine upload dist/*
  8. Update GitHub release with notes and other stuff
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0(default) on Sun Feb 21 02:54:40 2016
#
# contributed by http://github.com/hhromic
#
# brand: Dell
# model no. of remote control: Dell Travel Remote NU-851
@hhromic
hhromic / python-time.md
Last active January 15, 2021 10:41
Time Data Manipulations in Python

Cheat Sheet for Python Time Data

Note: These snippets are tested with Python 3, which has better datetime object support than Python 2.

Textual Time to datetime Object

from datetime import datetime

# example Twitter "created_at" field time format