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 re | |
from elementtree import ElementTree as etree | |
def get_text_element(tree): | |
for i in tree.getiterator(): | |
if 'text' in i.tag and 'text-' not in i.tag: | |
return i | |
def return_the_text(element): | |
string = etree.tostring(element) |
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
//deve ser inserido no metodo createStatechartModel da classe FactoryUtils | |
//path: org.yakindu.sct.ui.editor/src/org/yakindu/sct/ui/editor/factories/FactoryUtils.java | |
public static void createStatechartModel(Resource resource, | |
PreferencesHint preferencesHint) { | |
// Create a statechart | |
Statechart statechart = SGraphFactory.eINSTANCE.createStatechart(); | |
statechart.setSpecification("interface light:\nvar on:boolean\nvar off:boolean\n\ninterface thermostat:\nvar minimum:boolean\nvar maximum:boolean\n\ninterface:\nin event open\nin event close"); | |
String lastSegment = resource.getURI().lastSegment(); | |
String statechartName = lastSegment.substring(0, |
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 os.path import join, basename, dirname | |
from nltk.util import clean_html | |
from nltk.corpus.reader import PlaintextCorpusReader | |
from os import system | |
import re | |
class EisParser(object): | |
def __init__(self, path): | |
self._name = basename(path) |
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
Considerações: | |
“writes a report”: o evento de escrever um relatório, se utiliza de uma operação humana e | |
portanto deve ser classificado como um Transformation(Movement) e não como um Operation(Resource). |
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
>>> questions = ['name', 'quest', 'favorite color'] | |
>>> answers = ['lancelot', 'the holy grail', 'blue'] | |
>>> for q, a in zip(questions, answers): | |
... print 'What is your {0}? It is {1}.'.format(q, a) | |
... | |
What is your name? It is lancelot. | |
What is your quest? It is the holy grail. | |
What is your favorite color? It is blue. | |
for tag in tags: |
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
1 - Download the lastest Eclipse Juno version; | |
2 - Open the Eclipse, go to "Help" then "Install New Software"; | |
3 - Set the "Work with" entry field to "Juno" and select | |
[x] Collaboration -> Subversive SVN Team Provider and | |
[x] Modeling -> XText SDK.enter at the label ; | |
4 - Choose the newest SVN adapter; | |
5 - Import a "Project from SVN" set the link http://svn.codespot.com/a/eclipselabs.org/yakindu/SCT2/trunk/releng on the URL field and download the releng; | |
6 - Click on "Set as target platform" on the upper right; | |
7 - To get all required plugins, select "Import Project Set" from the context menu of projectSet.psf and select all working sets; | |
8 - When you have imported all projects, you may need to rebuild the |
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
rm /usr/local/var/postgres/postmaster.pid | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist |