Guest User

Untitled

a guest
Jun 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.27 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": 1,
  6. "metadata": {
  7. "collapsed": true
  8. },
  9. "outputs": [],
  10. "source": [
  11. "import subprocess\n",
  12. "gitspec = subprocess.check_output(['git', 'describe', '--all', '--dirty', '--long']).strip()"
  13. ]
  14. },
  15. {
  16. "cell_type": "code",
  17. "execution_count": 2,
  18. "metadata": {},
  19. "outputs": [
  20. {
  21. "name": "stdout",
  22. "output_type": "stream",
  23. "text": [
  24. "This notebook was run on git revision heads/master-0-gd645d81-dirty\n"
  25. ]
  26. }
  27. ],
  28. "source": [
  29. "print('This notebook was run on git revision ' + str(gitspec, 'utf-8'))"
  30. ]
  31. }
  32. ],
  33. "metadata": {
  34. "celltoolbar": "Raw Cell Format",
  35. "kernelspec": {
  36. "display_name": "Python 3",
  37. "language": "python",
  38. "name": "python3"
  39. },
  40. "language_info": {
  41. "codemirror_mode": {
  42. "name": "ipython",
  43. "version": 3
  44. },
  45. "file_extension": ".py",
  46. "mimetype": "text/x-python",
  47. "name": "python",
  48. "nbconvert_exporter": "python",
  49. "pygments_lexer": "ipython3",
  50. "version": "3.6.2"
  51. }
  52. },
  53. "nbformat": 4,
  54. "nbformat_minor": 2
  55. }
Add Comment
Please, Sign In to add comment