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
- hosts: all | |
name: "Let's encrypt" | |
tasks: | |
- name: Add certbot to crontab | |
cron: name="Letsencrypt certificates" month="*/2" minute=5 hour=0 | |
cron_file="letsencrypt-autoupdate" | |
user="root" | |
job="/usr/bin/docker run -t --rm --name certbot \ | |
-v '/etc/letsencrypt/:/etc/letsencrypt' \ | |
-v '/var/lib/letsencrypt:/var/lib/letsencrypt' \ |
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 glob | |
import json | |
def process_file(f): | |
print(json.load(f.read()) | |
for f in glob.glob('semeval/*.json'): | |
""" Find every file in the semeval folder that matches **.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
cls = self.__class__ | |
property_names=[] | |
for p in dir(cls): | |
if isinstance(getattr(cls, p), property): | |
property_names.append(p) | |
logging.debug('property names: {}'.format(property_names)) | |
for p in property_names: | |
ser['@%s' % p] = getattr(cls, p).fget(self) |
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
swagger: "2.0" | |
info: | |
version: 0.1.0 | |
title: SCANER API | |
license: | |
name: MIT | |
url: http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT | |
securityDefinitions: {} | |
consumes: | |
- application/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 __future__ import print_function | |
import csv | |
from jinja2 import Template | |
with open('PC Members.tsv') as f: | |
contacts = csv.DictReader(f, delimiter='\t') | |
with open('index.j2') as templatefile: | |
template = Template(templatefile.read()) |
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
SCL - D1 | |
SDA - D2 |
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
# Block out any script trying to base64_encode data within the URL. | |
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR] | |
# Block out any script that includes a <script> tag in URL. | |
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR] | |
# Block out any script trying to set a PHP GLOBALS variable via URL. | |
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR] | |
# Block out any script trying to modify a _REQUEST variable via URL. |
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 matplotlib.pyplot import cm | |
color=cm.rainbow(np.linspace(0,1,len(emotions))) | |
color = dict(zip(emotions, color)) | |
color |
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 nginx | |
EXPOSE 80 | |
ADD . /usr/share/nginx/html/ |
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 configuration for a possible web application. See the | |
# full configuration options online. | |
# | |
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt | |
# | |
#--------------------------------------------------------------------- | |
global | |
log 127.0.0.1 local2 |