This file contains 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 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 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 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 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 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 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> | |
<head> | |
<style> | |
form { | |
background-color: #eee; | |
padding: 20px; | |
margin: 0 auto; | |
width: 540px; |
This file contains 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
with open(__file__) as f: | |
print(f.read()) |
This file contains 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 java.io.*; | |
public class Quine{ | |
public static void main(String[] args) throws IOException { | |
try(BufferedReader br = new BufferedReader(new FileReader("Quine.java"))) { | |
StringBuilder sb = new StringBuilder(); | |
String line; | |
while ((line = br.readLine()) != null) { | |
sb.append(line).append(System.lineSeparator()); | |
} | |
System.out.print(sb.toString()); |
This file contains 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"?> | |
<classpath> | |
<classpathentry kind="src" output="target/classes" path="src/main/java"> | |
<attributes> | |
<attribute name="optional" value="true"/> | |
<attribute name="maven.pomderived" value="true"/> | |
</attributes> | |
</classpathentry> | |
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | |
<attributes> |