Python scripts and YAML config samples to make deployment to Bintray from Travis CI and AppVeyor easier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env wish8.6 | |
set intervalms 1 | |
variable theclock | |
proc setclock {} { | |
global intervalms theclock | |
set micros [clock microseconds] | |
set epoch [expr $micros / 1000000] | |
set micros [format "%06d" [expr $micros % 1000000]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Automate preparation of files for deployment to Bintray from CI. | |
Currently works with: | |
- Travis CI | |
- AppVeyor | |
""" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Some code causing strange behavior in Pylint.""" | |
import enum | |
import itertools | |
import logging | |
import re | |
import typing as t | |
import packaging.version | |
import pkg_resources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# solution for: | |
# https://stackoverflow.com/questions/12544056/how-to-i-get-the-current-ipython-notebook-name | |
# | |
# aimed at: | |
# IPython 4.2.0 and Python 3.5 | |
import json | |
import os | |
import urllib.request | |
import ipykernel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Hmmm, but typing.Sequence is subscriptable! | |
""" | |
import typing | |
T = typing.Sequence[int] # Value 'typing.Sequence' is unsubscriptable | |
print(T) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Testing metaclass support in Pylint. | |
Inspired by http://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python | |
""" | |
import typing | |
class MyMetaclass(type): | |
""" This is my metaclass. """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# attempt for: | |
# http://stackoverflow.com/q/30193945/4973698 | |
# | |
# Do `pip install pyreadline` and run this script. | |
# | |
# Unfortunately, it does not work! | |
import readline | |
def input_def2(prompt, default=''): |