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
| ▶ ipython | |
| Python 3.7.3 (default, Dec 13 2019, 19:58:14) | |
| Type 'copyright', 'credits' or 'license' for more information | |
| IPython 7.14.0 -- An enhanced Interactive Python. Type '?' for help. | |
| In [1]: def outer(): | |
| ...: message = 'hi' | |
| ...: | |
| In [2]: def outer(): |
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
| { | |
| "case_created_at":"{{case.created_at}}", | |
| "Link":"{{case.direct_url}}", | |
| "email": "{{customer.email}}", | |
| "labels":"{{case.labels}}", | |
| "body":"{{case.interactions.last.interactionable.body}}" | |
| } |
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
| // Make API call to darksky to get weather temp and description | |
| $.ajax({ | |
| method: 'GET', | |
| dataType: 'jsonp', | |
| url: 'https://api.darksky.net/forecast/[KEY]/' + coordinates, | |
| data: { | |
| exclude: '[minutely,daily,alerts,flags]' | |
| }, | |
| units: '[si]', | |
| }) |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <!-- | |
| ========================================================================== | |
| ____ ___ __ __ | |
| /\ _`\ __ /\_ \ /\ \/\ \ __ | |
| \ \ \L\ \\_\ __ _ __\//\ \ \ \ \ \ \ ___ /\_\ ___ ___ | |
| \ \ ,__//\ \/\ \/'\ /'__`\\ \ \ \ \ \ \ \ /' _ `\/\ \ / __`\/' _ `\ | |
| \ \ \/ \ \ \/> <//\ __/ \_\ \_ \ \ \_\ \/\ \/\ \ \ \/\ \L\ \\ \/\ \ |
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 requests | |
| import json | |
| case_list = ['251756', '251755'] | |
| for case_id in case_list: | |
| url = 'https://disqus.desk.com/api/v2/cases/'+str(case_id) | |
| headers = {'Content-Type': 'application/json', 'Accept': 'application/json'} | |
| # this requires that the agent enters Task in issue_ticket and label feild so that no context is lost |
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 | |
| from flask import Flask | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def hello(): | |
| return 'Hello World | |
| @app.route('/') |
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
| <HTML> | |
| <head> | |
| </head> | |
| <body> | |
| <div id="disqus_thread"></div> | |
| <script type="text/javascript"> | |
| /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ | |
| var disqus_shortname = 'EXAMPLE'; // required: replace example with your forum shortname | |
| /* * * DON'T EDIT BELOW THIS LINE * * */ |
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 random import randint | |
| board = [] | |
| for x in range(5): | |
| board.append(["O"] * 5) | |
| def print_board(board): | |
| for row in board: | |
| print " ".join(row) |
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
| pyg = 'ay' | |
| print "Welcome to the Pyg Latin Translator" | |
| original = raw_input('Enter a word to be translated:') | |
| if len(original) > 0 and original.isalpha(): | |
| word = original.lower() | |
| first = word[0] | |
| if first in ["a","e","i","o","u"]: | |
| new_word = word+pyg |