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
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
- 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
begin | |
button = KEY_5 | |
prog = irexec | |
config = /home/balkian/octo.sh home | |
repeat = 0 | |
delay = 3 | |
end | |
begin | |
button = KEY_1 | |
prog = irexec |
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 json | |
from senpy import Client | |
client = Client('http://senpy.cluster.gsi.dit.upm.es') | |
with open('madrid.json', 'r') as f: | |
for line in f: | |
tweet = json.loads(line.strip()) | |
results = client.analyse(input=tweet['text'], algorithm='sentiText') | |
tweet['sentiment'] = results.entries[0].sentiments[0] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 selenium import webdriver | |
from selenium.webdriver.support.ui import Select | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
#import selenium.webdriver.firefox.webdriver as fwb | |
import selenium.webdriver.chrome as cwd | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
import os |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
\usepackage{adjustbox} | |
\usepackage{array} | |
\newcolumntype{R}[2]{% | |
>{\adjustbox{angle=#1,lap=\width-(#2)}\bgroup}% | |
l% | |
<{\egroup}% | |
} | |
\newcommand*\rot{\multicolumn{1}{R{45}{1em}}}% no optional argument here, please! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.