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
class RecursiveDict(UserDict): | |
def __getitem__(self, k): | |
if not isinstance(k, Iterable): | |
return self.data[k] | |
dest = self.data | |
for j in k: | |
dest = dest[j] | |
return dest |
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
xdg-settings set default-web-browser chromium.desktop |
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
NEUTRAL = 0 | |
INFECTED = 1 | |
class ControlModelM2(BaseBehaviour): | |
NEUTRAL = 0 | |
INFECTED = 1 | |
def step(self, now): | |
if self.state['id'] == NEUTRAL: | |
self.neutral_behaviour() | |
elif self.state['id'] == INFECTED: |
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.
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
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] |
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 |