prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
s = "usage: help <command> [public|private] / help module <module>" self.send(target, s)
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
args.pop(0) if not args: self.send(target, "usage: help module <module>") else: help_item = index['modules'].get(args[0]) if help_item: self.send(target, help_item['summary']) else: ...
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.send(target, "usage: help module <module>")
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
help_item = index['modules'].get(args[0]) if help_item: self.send(target, help_item['summary']) else: self.send(target, _("No help for %s"), args[0])
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.send(target, help_item['summary'])
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.send(target, _("No help for %s"), args[0])
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
args.append("") cmd = args.pop(0) cmd_type = args.pop(0) if 'pu' in cmd_type or self.target.startswith('#'): cmd_type = 'public' elif 'pr' in cmd_type or not self.target.startswith('#'): cmd_type = 'private' else: ...
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
cmd_type = 'public'
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
cmd_type = 'private'
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.logger.error("cmd_list") return
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.send(target, index[cmd_type][cmd]['summary'])
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
self.send(target, _("No help for %s"), cmd)
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def <|fim_middle|>(self, argument): """List c...
cmd_list
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
cmd_modules
<|file_name|>help.py<|end_file_name|><|fim▁begin|># Author: Nick Raptis <airscorp@gmail.com> """ Module for listing commands and help. """ from basemodule import BaseModule, BaseCommandContext from alternatives import _ class HelpContext(BaseCommandContext): def cmd_list(self, argument): """List command...
cmd_help
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from bluebottle.projects.serializers import ProjectPreviewSerializer from bluebottle.quotes.serializers import QuoteSerializer from bluebottle.slides.serializers import SlideSerializer from bluebottle.statistics.serializers import StatisticSerializer from rest_fr...
statistics = StatisticSerializer(many=True) projects = ProjectPreviewSerializer(many=True)
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from bluebottle.projects.serializers import ProjectPreviewSerializer from bluebottle.quotes.serializers import QuoteSerializer from bluebottle.slides.serializers import SlideSerializer from bluebottle.statistics.serializers import StatisticSerializer from rest_fr...
id = serializers.CharField() quotes = QuoteSerializer(many=True) slides = SlideSerializer(many=True) statistics = StatisticSerializer(many=True) projects = ProjectPreviewSerializer(many=True)
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.apps import AppConfig<|fim▁hole|> name = 'RFHistory'<|fim▁end|>
class RfhistoryConfig(AppConfig):
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.apps import AppConfig class RfhistoryConfig(AppConfig): <|fim_middle|> <|fim▁end|>
name = 'RFHistory'
<|file_name|>CCipher.py<|end_file_name|><|fim▁begin|><|fim▁hole|>Single Round Match 147 Round 1 - Division II, Level One """ class CCipher: def decode(self, cipherText, shift): a = ord('A') decoder = [a + (c - shift if c >= shift else c - shift + 26) for c in range(26)] plain = [chr(decode...
""" http://community.topcoder.com/stat?c=problem_statement&pm=1667
<|file_name|>CCipher.py<|end_file_name|><|fim▁begin|>""" http://community.topcoder.com/stat?c=problem_statement&pm=1667 Single Round Match 147 Round 1 - Division II, Level One """ class CCipher: <|fim_middle|> <|fim▁end|>
def decode(self, cipherText, shift): a = ord('A') decoder = [a + (c - shift if c >= shift else c - shift + 26) for c in range(26)] plain = [chr(decoder[ord(c) - a]) for c in cipherText] return ''.join(plain)
<|file_name|>CCipher.py<|end_file_name|><|fim▁begin|>""" http://community.topcoder.com/stat?c=problem_statement&pm=1667 Single Round Match 147 Round 1 - Division II, Level One """ class CCipher: def decode(self, cipherText, shift): <|fim_middle|> <|fim▁end|>
a = ord('A') decoder = [a + (c - shift if c >= shift else c - shift + 26) for c in range(26)] plain = [chr(decoder[ord(c) - a]) for c in cipherText] return ''.join(plain)
<|file_name|>CCipher.py<|end_file_name|><|fim▁begin|>""" http://community.topcoder.com/stat?c=problem_statement&pm=1667 Single Round Match 147 Round 1 - Division II, Level One """ class CCipher: def <|fim_middle|>(self, cipherText, shift): a = ord('A') decoder = [a + (c - shift if c >= shift else...
decode
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
response = GetLogs(region, stream_name, log_group, token) events = response['events'] token = response['nextForwardToken']
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Class representing a CloudWatch log group.""" def __init__(self, region, name, retention_in_days=7): super(LogGroup, self).__init__() self.region = region self.name = name self.retention_in_days = retention_in_days def _Create(self): """Create the log group.""" create_cmd = util.AWS_P...
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
super(LogGroup, self).__init__() self.region = region self.name = name self.retention_in_days = retention_in_days
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Create the log group.""" create_cmd = util.AWS_PREFIX + [ '--region', self.region, 'logs', 'create-log-group', '--log-group-name', self.name ] vm_util.IssueCommand(create_cmd)
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Delete the log group.""" delete_cmd = util.AWS_PREFIX + [ '--region', self.region, 'logs', 'delete-log-group', '--log-group-name', self.name ] vm_util.IssueCommand(delete_cmd, raise_on_failure=False)
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Returns True if the log group exists.""" describe_cmd = util.AWS_PREFIX + [ '--region', self.region, 'logs', 'describe-log-groups', '--log-group-name-prefix', self.name, '--no-paginate' ] stdout, _, _ = vm_util.IssueCommand(describe_cmd) log_groups = json.loads(std...
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Set the retention policy.""" put_cmd = util.AWS_PREFIX + [ '--region', self.region, 'logs', 'put-retention-policy', '--log-group-name', self.name, '--retention-in-days', str(self.retention_in_days) ] vm_util.IssueCommand(put_cmd)
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Fetches the JSON formatted log stream starting at the token.""" get_cmd = util.AWS_PREFIX + [ '--region', region, 'logs', 'get-log-events', '--start-from-head', '--log-group-name', group_name, '--log-stream-name', stream_name, ] if token: get_cmd.extend(['--next-token', toke...
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
"""Returns the messages of the log stream as a string.""" log_lines = [] token = None events = [] while token is None or events: response = GetLogs(region, stream_name, log_group, token) events = response['events'] token = response['nextForwardToken'] for event in events: log_lines.appen...
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
get_cmd.extend(['--next-token', token])
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
__init__
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
_Create
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
_Delete
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
Exists
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
_PostCreate
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
GetLogs
<|file_name|>aws_logs.py<|end_file_name|><|fim▁begin|># Copyright 2018 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache...
GetLogStreamAsString
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
def test_plot_experiment(self): """ Tests the plot_experiment method. """
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
def test_plot_experiment(self): """ Tests the plot_experiment method. """ datasets = [self.datafile("bolts.arff"), self.datafile("bodyfat.arff"), self.datafile("autoPrice.arff")] cls = [ classifiers.Classifier("weka.classifiers.trees.REPTree"), classif...
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
""" Tests the plot_experiment method. """ datasets = [self.datafile("bolts.arff"), self.datafile("bodyfat.arff"), self.datafile("autoPrice.arff")] cls = [ classifiers.Classifier("weka.classifiers.trees.REPTree"), classifiers.Classifier("weka.classifiers.fu...
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
""" Returns the test suite. :return: the test suite :rtype: unittest.TestSuite """ return unittest.TestLoader().loadTestsFromTestCase(TestExperiments)
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
jvm.start() unittest.TextTestRunner().run(suite()) jvm.stop()
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
test_plot_experiment
<|file_name|>experiments.py<|end_file_name|><|fim▁begin|># This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This progr...
suite
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess<|fim▁hole|>import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = F...
import os
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
rev, repo, user = virtual_host_parse(virtual_host) except Exception: abort(404) vhost = {'rev': rev, 'repo': repo, 'user': user, 'full': virtual_host} redirect_url = '//{}.{}/'.format(virtual_host, app.config['BASE_DOMAIN']) return render_template('index.html', vhost=vhost, ...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
rev, repo, user = virtual_host_parse(virtual_host) except Exception: abort(404) m = Molt(rev, repo, user, app.config['BASE_DOMAIN'], app.config['GITHUB_USER'], app.config['GITHUB_TOKEN']) r = redis.StrictRedis(host=app.config['REDIS_HOST'], port=app.config[...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
ジ の情報取得・設定をする """ # コマンド群の実行 try: for row in m.molt(): row = row.decode() data = row.split('\r')[-1] # CRのみの行は保留されるので取り除く yield event_stream_parser(data) except MoltError as e: yield event_stream_p...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
req = request.json if even
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
in {"opened", "synchronize"}: return "ok", 200 pr = req["pull_request"] pr_url = pr["comments_url"] pr_sha = pr["head"]["sha"][:7] pr_reponame = pr
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
]["owner"]["login"] payload = { "event": "COMMENT", "body": "Launched the preview environment!\nhttp://{}.{}.{}.{}\ ".format(pr_sha, pr_reponame, pr_owner, app.config["BASE_DOMAIN"]), } headers = { "Accept": "application/vnd.github.v3+json", "Content-Type": "appl...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
data, event=None, id=None, retry=None): """Server-Sent Event 形式へのパーサ.""" event_stream = '' if event: event_stream += 'event: {}\n'.format(event) event_stream += 'data: {}\n'.format(data) if id: event_stream += 'id: {}\n'.format(id) if retry: event_stream += 'retry: {}...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
v('USER') ssh_key_path = os.path.expanduser("~")+"/.ssh/molt_deploy_key" if not os.path.exists(ssh_key_path): command = 'ssh-keygen -t rsa -N "" -f {}'.format(ssh_key_path) command = shlex.split(command) subprocess.Popen(command) # Dockerネットワークの作成 clinet = docker.from_env() ...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
e: cfg_file = 'con
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
p.cfg' if not os.path.exists(cf
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
せん".format(cfg_file)) sys.exit(1) app.config.from_pyfile(cfg_file, silen
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
"""Staticファイルを呼び出す際のドメインを指定する.""" return '//' + app.config['BASE_DOMAIN'] + ':' + str(app.config['PORT']) + \
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
vironment!\nhttp
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
p.config["BASE_D
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
path.exists(ssh_key_path): command
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
mand = shlex.split(command) s
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
) # Dockerネットワークの作成 clinet = do
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
ork in networks]: command = 'docker network create --subnet=172.31.255.0/24 \ --ip-range=172.31.255.0/24 --gateway=172.31.255.254 \ -o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \ molt-network' command = shlex.split(command) subprocess.Popen(c...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
.255.254 \ -o "com.docker.network.bridge.host_binding_ipv4"="0.0.0.0" \ molt-network' command = shlex.s
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
ーするペー
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
I)."
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
連の処理のSTD
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
itHub-E
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
00 elif req["a
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
ead"
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
oup('user') def
<|file_name|>molt_app.py<|end_file_name|><|fim▁begin|>"""Molt Web API with Interface.""" import re import redis import docker import subprocess import os import shlex import requests import sys import argparse from flask import Flask, Response, render_template, abort, request from molt import Molt, MoltError app = Fl...
m if __name__ ==
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f):<|fim▁hole|> :param f: :return: """ def inner(*args, **kwargs): warn('`raise_for_error` is deprecated and will not process any response content.') ...
""" Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered.
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): <|fim_middle|> def raise_response_for_error(f): """ Wrapper method to parse a response object and raise the ErrorResponse instance if an error is encountere...
""" Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args, **kwargs): warn('`raise_for_error` is deprecated and will not process any response content.') return f(*args, **kwargs) ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args...
warn('`raise_for_error` is deprecated and will not process any response content.') return f(*args, **kwargs) # e = ErrorResponse.load(content) # e.raise_for_error() # return content
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args...
""" Wrapper method to parse a response object and raise the ErrorResponse instance if an error is encountered in the response body. :param f: :return: """ def inner(*args, **kwargs): warn('`raise_response_for_error` is deprecated and will not process any response content.') ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args...
warn('`raise_response_for_error` is deprecated and will not process any response content.') return f(*args, **kwargs)
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def <|fim_middle|>(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args,...
raise_for_error
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def <|fim_middl...
inner
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args...
raise_response_for_error
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from ..parsers.errors import ErrorResponse from warnings import warn def raise_for_error(f): """ Wrapper method to parse any error response and raise the ErrorResponse instance if an error is encountered. :param f: :return: """ def inner(*args...
inner
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for nykampweb project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os <|fim▁hole|> application = get_wsgi...
from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nykampweb.settings")
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
if a[2] == 9: r.stop() flag_A = 0
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
lock[it] = lock[it] - 1
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
ag_A = 0 flag_C = 0 if a[0] == 1 or a[0] == 5 or a[0] == 6: r.A.run_forever(r.S/slowdown) elif a[0] == 2 or a[0] == 7 or a[0] == 8: r.A.run_forever(-r.S/slowdown) else: r.A.stop() if a[0] == 3 or a[0] == 5 or a[0] == 7: r.C....
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
A.run_forever(r.S/slowdown)
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
A.run_forever(-r.S/slowdown)
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
A.stop()
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
C.run_forever(r.S/slowdown)
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
C.run_forever(-r.S/slowdown)
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
C.stop()
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
a[1] == 1 and i is not run: # kontrolka prawa: ciągła r.changestate(state[i]-state[i-1]) i = i-1 time.sleep(0.5) # (state[i]-state[i-1])/r.S if i is run: slowdown = 1 elif a[1] == 2 and i is not write: ...
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
angestate(state[i]-state[i-1]) i = i-1 time.sleep(0.5) # (state[i]-state[i-1])/r.S if i is run: slowdown = 1
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
down = 1
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
angestate(state[i]-state[i+1]) i = i+1 slowdown = 5 time.sleep(0.5) # (state[i+1]-state[i])/r.S
<|file_name|>pilot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from modules import Robot import time r = Robot.Robot() state = [0, 1000, 1500] (run, move, write) = range(3) i = run slowdown = 1 flag_A = 0 flag_C = 0 lock = [0, 0, 0, 0] while(True): a = r.Read() for it in range(len(lock)): ...
run_forever(r.S)