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
| def alphabet_position(character): | |
| alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
| lower = character.lower() | |
| return alphabet.index(lower) | |
| def rotate_string_13(text): | |
| rotated = '' | |
| alphabet = 'abcdefghijklmnopqrstuvwxyz' |
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
| # Using indexed placeholders | |
| markup = """ | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>{0}</title> | |
| </head> | |
| <body> | |
| <h1>{0}</h1> |
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> | |
| <html> | |
| <body> | |
| <style> | |
| br {margin-bottom: 20px;} | |
| </style> | |
| <form method='POST'> |
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 flask import Flask, request | |
| app = Flask(__name__) | |
| app.config['DEBUG'] = True | |
| @app.route("/form-inputs") | |
| def display_form_inputs(): | |
| return """ | |
| <style> |
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 sys | |
| from html.entities import html5 as html5Entities | |
| from html.parser import HTMLParser | |
| from py_w3c.validators.html.validator import HTMLValidator | |
| class bcolors: | |
| HEADER = '\033[95m' |
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 slackclient import SlackClient | |
| BOT_NAME = 'bot_name_without_at_sign' | |
| slack_client = SlackClient('BOT_TOKEN_GOES_HERE') | |
| if __name__ == "__main__": | |
| api_call = slack_client.api_call("users.list") |
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
| spring.datasource.driver-class-name=org.h2.Driver | |
| spring.datasource.url=jdbc:h2:mem:test | |
| spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.H2Dialect | |
| spring.jpa.hibernate.ddl-auto=update |
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
| POSTGRES_USER=zika_app_user | |
| POSTGRES_PASS=somethingsensible | |
| POSTGRES_DBNAME=zika | |
| ALLOW_IP_RANGE=<0.0.0.0/0> |
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
| { | |
| "version": 8, | |
| "name": "OSM Bright", | |
| "metadata": { | |
| "mapbox:type": "template", | |
| "mapbox:groups": { | |
| "1444849364238.8171": { | |
| "collapsed": true, | |
| "name": "Buildings" | |
| }, |
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
| curl -XPOST 'localhost:9200/twitter/tweets/1' -H 'Content-type:application/json' -d ' | |
| { | |
| "date" : "2014-09-13", | |
| "name" : "Mary Jones", | |
| "tweet" : "Relational databases are so yesterday", | |
| "user_id" : 2, | |
| "likes": 1 | |
| } | |
| ' |