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
| import sys | |
| import os | |
| import py_compile | |
| import logging | |
| logger = logging.getLogger( | |
| os.path.splitext(os.path.basename(__file__))[0]) | |
| def precompile(path='.'): | |
| """ |
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
| """A script to get a YouTube thumbnail image. | |
| Examples | |
| -------- | |
| ``$ python get_youtube_thumbnails.py --video_id <TARGET_YOUTUBE_VIDEO_ID> -c 'get_thumbnail(**kwargs)'`` | |
| """ | |
| import sys | |
| import os |
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
| """ | |
| Utilities for Object. | |
| """ | |
| def object_to_path(obj, path=''): | |
| new_obj = {} | |
| for key, value in obj.items(): | |
| if isinstance(value, dict): | |
| new_obj.update(object_to_path(value, path + key + '.')) |
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
| <ul> | |
| <p>burningtree/awesome-json: A curated list of awesome JSON libraries and resources. - https://github.com/burningtree/awesome-json</p> | |
| <li><a href="http://jmespath.org/">JMESPath</a> - A query language for JSON.</li> | |
| <li><a href="https://github.com/nemtsov/json-mask">JSON Mask</a> - Tiny language and engine for selecting specific parts of a JS object, hiding the rest. (Javascript)</li> | |
| <li><a href="http://www.jsoniq.org/">JSONiq</a> - The JSON Query Language.</li> | |
| <li><a href="http://objectpath.org/">ObjectPath</a> - The agile query language for semi-structured data. (Python)</li> | |
| <li><a href="http://www.defiantjs.com/">DefiantJS</a> - Lightning-fast searches using XPath expressions, and transform using XSL. (Javascript)</li> | |
| <li><a href="https://github.com/lloyd/JSONSelect">JSONSelect</a> - CSS-like selectors. (Javascript)</li> | |
| <li><a href="http://goessner.net/articles/JsonPath/">JSONPath</a> - XPath implementation. (Javascript/PHP)</li> | |
| <li><a href="https://github.com/deitch/searchjs">searchjs</a> - A |
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
| import sys | |
| import os | |
| import csv | |
| import tensorflow as tf | |
| import inspect | |
| import numpy | |
| import ast | |
| import importlib | |
| dest = sys.argv[2] | |
| target_module = importlib.import_module(sys.argv[1]) |
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
| test |
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
| _foo() | |
| { | |
| local cur prev opts | |
| COMPREPLY=() | |
| cur="${COMP_WORDS[COMP_CWORD]}" | |
| prev="${COMP_WORDS[COMP_CWORD-1]}" | |
| opts="--help --verbose --version" | |
| if [[ ${cur} == -* ]] ; then | |
| COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
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 python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| """ | |
| import os | |
| import sys | |
| import sysconfig | |
| import site | |
| import argparse | |
| import logging |
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 python | |
| # -*- coding: utf-8 -*- | |
| """A simple script to note something. | |
| ### Usage | |
| - Insert: $ nnn.py -i "TEXT_TO_SAVE" | |
| - Select: $ nnn.py -s "%KEY_WORD%" | |
| - Delete: $ nnn.py -d "ID" |
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 python | |
| # -*- coding: utf-8 -*- | |
| """A simple script to note something. | |
| ### Usage | |
| - Insert: $ nnn.py -i "TEXT_TO_SAVE" | |
| - Select: $ nnn.py -s "%KEY_WORD%" | |
| - Delete: $ nnn.py -d "ID" |