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
(py3k) USATLBRRAYMB:src brray$ git clone https://github.com/ian-r-rose/jupyterlab-google-drive.git ian_rose | |
Cloning into 'ian_rose'... | |
remote: Counting objects: 2025, done. | |
remote: Compressing objects: 100% (25/25), done. | |
remote: Total 2025 (delta 23), reused 35 (delta 18), pack-reused 1982 | |
Receiving objects: 100% (2025/2025), 1.31 MiB | 563.00 KiB/s, done. | |
Resolving deltas: 100% (1346/1346), done. | |
(py3k) USATLBRRAYMB:src brray$ cd ian_rose/ | |
(py3k) USATLBRRAYMB:ian_rose brray$ jupyter labextension install . | |
> node node-version-check.js |
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
(py3k) USATLBRRAYMB:ER_admission brray$ jupyter labextension uninstall @jupyterlab/google-drive | |
No labextension named "@jupyterlab/google-drive" installed | |
(py3k) USATLBRRAYMB:ER_admission brray$ jupyter labextension install @jupyterlab/google-drive | |
> node node-version-check.js | |
> npm pack @jupyterlab/google-drive | |
jupyterlab-google-drive-0.8.0.tgz | |
> node node-version-check.js | |
> npm install | |
WARN engine webpack@2.7.0: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current: {"node":"4.2.6","npm":"2.14.12"}) | |
npm WARN peerDependencies The peer dependency react@^15.6.1 included from @nteract/transform-vdom will no |
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
(py3k) USATLBRRAYMB:ER_admission brray$ jupyter labextension uninstall @jupyterlab/google-drive | |
Uninstalling @jupyterlab/google-drive from /Users/brray/anaconda2/anaconda/envs/py3k/share/jupyter/lab/extensions | |
> node node-version-check.js | |
> npm install | |
WARN engine webpack@2.7.0: wanted: {"node":">=4.3.0 <5.0.0 || >=5.10"} (current: {"node":"4.2.6","npm":"2.14.12"}) | |
npm WARN peerDependencies The peer dependency react@^15.6.1 included from @nteract/transform-vdom will no | |
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency | |
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly. | |
npm WARN peerDependencies The peer dependency react@^15.0.0 included from react-json-tree will no | |
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 transition_skip(fsm_obj): | |
pass | |
def transition_new_group(fsm_obj): | |
fsm_obj.group_current_level += 1 | |
fsm_obj.current_group = RuleGroup(fsm_obj.current_group, | |
fsm_obj.group_current_level, | |
None) |
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
class Rule_Parse_FSM: | |
def __init__(self, input_str): | |
self.input_str = input_str | |
self.current_state = S_NEW_GROUP | |
self.group_current_level = 0 | |
self.current_group = RuleGroup(None, self.group_current_level, None) | |
self.current_char = '' |
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
class RuleGroup: | |
def __init__(self, parent, level, op): | |
self.op = op | |
self.parent = parent | |
self.level = level | |
self.rule_count = 1 | |
self.rules = [Rule(), ] | |
def __repr__(self): | |
return "<RuleGroup: {}>".format(self.__dict__) |
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
FSM_MAP = ( | |
# {'src':, 'dst':, 'condition':, 'callback': }, | |
{'src': S_NEW_GROUP, | |
'dst': S_PRE, | |
'condition': "[A-Za-z|+|-|\d]", | |
'callback': T_APPEND_CHAR_PRE}, # 1 | |
{'src': S_PRE, | |
'dst': S_PRE, | |
'condition': "[A-Za-z|+|-|\d]", | |
'callback': T_APPEND_CHAR_PRE}, # 2 |
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
class Rule: | |
def __init__(self): | |
self.prefix = "" | |
self.subject = "" | |
self.op = None | |
def __repr__(self): | |
op = self.op | |
if not op: | |
op = '' |
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
# Brian Ray <brianhray@gmail.com> | |
# @brianray | |
# https://medium.com/@brianray_7981/ | |
# parser for POSH Syntax http://brianray.github.io/posh-syntax/ | |
import re | |
def transition_skip(fsm_obj): | |
pass |