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
| # to set it up you can follow this guide http://alexamods.com/guide-install-ask-google-alexa-skill/ | |
| # but in step 12 paste this code instead of uploading zip file | |
| # you also need to enable encryption helpers and set up | |
| # dropbox access token as env variable named "dropbox_token" | |
| # of course you can use different name than "google" | |
| # I'm using "write" | |
| from base64 import b64decode | |
| from datetime import datetime | |
| from urllib import request, parse, error | |
| import boto3 |
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
| # to set it up you can follow this guide http://alexamods.com/guide-install-ask-google-alexa-skill/ | |
| # but in step 12 paste this code instead of uploading zip file | |
| # you also need to enable encryption helpers and set up | |
| # dropbox access token as env variable named "dropbox_token" | |
| # of course you can use different name than "google" | |
| # I'm using "notes" | |
| from base64 import b64decode | |
| from urllib import request | |
| import difflib | |
| import json |
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
| from urllib.request import urlopen | |
| from urllib.parse import urlencode | |
| import json | |
| url_base = """https://www.googleapis.com/customsearch/v1?num=1&""" | |
| # provide google api key from https://code.google.com/apis/console/ | |
| # project needs to have custom search api enabled | |
| key = | |
| pl_cse = '009341357436794688484:bi6ngbl4mvk' |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>author</key> | |
| <string>Piotrek Wilczyński (procrastinationlog.com)</string> | |
| <key>name</key> | |
| <string>Mini Dark</string> | |
| <key>semanticClass</key> | |
| <string>mini.dark</string> |
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 os | |
| import re | |
| import colors | |
| PROFILE_PATH = os.path.expanduser('~/.profile') | |
| def show_aliases(): | |
| for alias, command in find_aliases().items(): | |
| prefix = '' |
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
| """ | |
| Example: | |
| class State(NamedEnum): | |
| SUCCESS = En() | |
| ERROR = En(u'co poszlo nie tak') | |
| FU = En(u'FFFFUUUUUUUU-') | |
| print State.SUCCESS | |
| print State.ERROR |
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
| """ | |
| Module contains: | |
| 1. Constants like RED, BLUE, ON_RED, RED_ON_BLUE, GREEN_ON_BLUE | |
| that are ANSI codes in text that can be used to make terminal output | |
| colorful. | |
| >>> print colors.RED + 'this will be red' | |
| 2. Functions like red(text), blue(text), on_red(text), red_on_blue(text), green_on_blue(text). |