prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
self.process_in_queue_data(data)
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
self.config_changed = True
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
__init__
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
update_config
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
send_ping
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
exit_gracefully
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
unload
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
unload_callback
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
run
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
main
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
in_queue_handling
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
process_in_queue_data
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
log
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
set_config
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
__init__
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): <|fim_middle|> def test_list_of_values_representation(): with given: sch = schema.list(schema.int(1)) w...
with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: assert res == "schema.list(schema.bool)"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.int(1)) with when: res = represent(sch) with then: assert res == "schema.list(schema.int(1))"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.str("banana")) with when: res = represent(sch) with then: assert res == "schema.list(schema.str('banana'))"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.int).len(10) with when: res = represent(sch) with then: assert res == "schema.list(schema.int).len(10)"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.int).len(1, ...) with when: res = represent(sch) with then: assert res == "schema.list(schema.int).len(1, ...)"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.int).len(..., 10) with when: res = represent(sch) with then: assert res == "schema.list(schema.int).len(..., 10)"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
with given: sch = schema.list(schema.int).len(1, 10) with when: res = represent(sch) with then: assert res == "schema.list(schema.int).len(1, 10)"
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def <|fim_middle|>(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: assert res == "s...
test_list_of_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_values_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_repr_values_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_len_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_min_len_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_max_len_representation
<|file_name|>test_list_of_representation.py<|end_file_name|><|fim▁begin|>from baby_steps import given, then, when from district42 import represent, schema def test_list_of_representation(): with given: sch = schema.list(schema.bool) with when: res = represent(sch) with then: ass...
test_list_of_min_max_len_representation
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
self.client = None self.is_super_user = True
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
def __init__(self): super(KanboardShell, self).__init__( description='Kanboard Command Line Client', version=app_version.VersionInfo('kanboard_cli').version_string(), command_manager=commandmanager.CommandManager('kanboard.cli'), deferred_help=True) se...
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
super(KanboardShell, self).__init__( description='Kanboard Command Line Client', version=app_version.VersionInfo('kanboard_cli').version_string(), command_manager=commandmanager.CommandManager('kanboard.cli'), deferred_help=True) self.client = None ...
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
parser = super(KanboardShell, self).build_option_parser( description, version, argparse_kwargs=argparse_kwargs) parser.add_argument( '--url', metavar='<api url>', help='Kanboard API URL', ) parser.add_argument( '--username', ...
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
client_manager = client.ClientManager(self.options) self.client = client_manager.get_client() self.is_super_user = client_manager.is_super_user() self.command_manager.add_command('app version', application.ShowVersion) self.command_manager.add_command('app timezone', application...
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
return KanboardShell().run(argv)
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
sys.exit(main(sys.argv[1:]))
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
__init__
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
build_option_parser
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
initialize_app
<|file_name|>shell.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # # Copyright (c) 2016 Frederic Guillot # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, inclu...
main
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
labels = {
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ssages=error_messages) password = forms.CharField( required=True, label='Құпиясөз', error_messages=error_messages, widget=forms.PasswordInput) class Meta: model = User fields = ('email', 'password') labels = { 'email': 'Email', ...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
labels = { 'email': 'Email', 'password': 'Құпиясөз', } class UserCreateForm(UserCreationForm): email = forms.Ema
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
sages) full_name = forms.CharField(required=True, label='Есіміңіз', error_messages=error_messages) password1 = forms.CharField(required=True, label='Құпиясөз', widget=forms.PasswordInput, error_messages=error_messages) password2 = forms.CharField(required=True, label='Құп...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ommit=True): user = super(UserCreateForm, self).save(commit=False)
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
] user.username = user.email user.is_active = 0 hash = '%s%s' % (user.email, time.time()) if commit: user.save() user.contributor = Contributor(user_id=user, full_name=self.cleaned_data["full_name"], activation_c...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
_data.get('email') user = User.obje
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
if user: raise forms.ValidationError("Бұл email-мен колднушы тіркелген.") return email def clean_password2(self): password1 = self.cleaned_data.get('password1') password2 = self.cleaned_da
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ord2: raise forms.ValidationError("Құпиясөзді растаңыз") if password1 != password2: raise forms.ValidationError("Құпиясөздер бір біріне сәйкес емес. Қайта теріңіз") if len(password2) < 6: raise forms.ValidationError('Кемінде 6 символ') return super(U...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ta: model = Contributor fields = ('full_name', 'text_status') labels = { 'full_name': 'Есіміңіз', 'text_status': 'Сайттағы статусыңыз (250 символ)', } error_messages = { 'full_name': error_messages } class OfferPoemFrom(forms.Mode...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
{ 'full_name': error_messages } class OfferPoemFrom(forms.ModelForm): theme = forms.MultipleChoiceField( label="Тақырып", widget=forms.SelectMultiple, error_messages=error_messages, choices=Theme.objects.values_list('id', 'name').all() )
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
elds = ('author', 'title', 'content', 'theme',) labels = { 'author': 'Автор', 'title': 'Шығарма аты', 'content': 'Текст', } error_messages = { 'author': error_messages, 'title': error_messages, 'content': error_messages,...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ges, 'title': error_messages, 'content': error_messages, 'theme': error_messages }
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ll_name"], activation_code=hashlib.md5(hash.encode('utf-8')).hexdigest()) user.contributor.save() group = self.get_user_group() user.groups.add(group) else: pass return user def get_user_group(se...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
-use
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
n_password2(self): password1 = self.cleaned_data.get('password1') passw
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
or("Құпиясөздер бір біріне сәйкес емес. Қайта теріңіз") if
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
dationError('Кемінде 6 символ') return super(UserCreateForm, self).clean_password2() class UserEditForm(forms.M
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
widget=forms.Textarea(attrs={'rows': 5, 'cols': 100
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
emai
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
: emai
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
(email=emai
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib, time from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from poetry.models import Poem, Theme from user.models import Contributor...
ssword2')
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
"""Prints the env_setup banner for cmd.exe. This is done from Python as activating colors and printing ASCII art are not easy to do in cmd.exe. Activated colors also don't persist in the parent
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
Color.green( ' On Windows, this stage is extremely slow (~10 minutes).\n')) else: print( Color.green( '\n ACTIVATOR! This sets your console environment variables.\n' )) if no_shell_file: print(Color.bold_red('Error!\n')) ...
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
*vars(parse())) if __name__ == '__main__': sys.exit(main())
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
your console environment variables.\n' )) if no_shell_file: print(Color.bold_red('Error!\n')) print( Color.red(' Your Pigweed environment does not seem to be'
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
print(Color.red(' Run bootstrap.bat to perform initial setup.')) return 0 def parse(): """Parse command-line arguments.""" parser = argparse.ArgumentParser() parser.add_argument('--bootstrap', action='store_true') parser.add_argument('--no-shell-file', action='store_true') ...
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
ArgumentParser() parser.add_argument('--bootstrap', action='store_true') parser.add_argument('--no-shell-file', action='store_true') return parser.parse_args() def main(): """Script entry point.""" if os.name != 'nt':
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
ase be patie
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
rint_
<|file_name|>windows_env_start.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 The Pigweed Authors # # 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 # # https://ww...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
def __init__(self): pass def get_html(self, url, method='GET', **kwargs): resp = request(method, url, **kwargs) if resp.status_code != 200: raise HtmlError({'msg': 'external_request_fail', 'url': url}) return resp.content def fetch_manga_seed_page(self, url, **k...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
pass
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
resp = request(method, url, **kwargs) if resp.status_code != 200: raise HtmlError({'msg': 'external_request_fail', 'url': url}) return resp.content
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
return self.get_html(url, **kwargs)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
return self.get_html(url, **kwargs)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
return self.get_html(url, **kwargs)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
""" Return list of chapter dicts whose keys are: name url site This should be specifically implemented in each Site subclass. If not, this method will be used which returns an empty list. """ return []
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
netloc = urlparse.urlparse(url).netloc for site in available_sites: if netloc in site.netlocs: return site return None
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
raise HtmlError({'msg': 'external_request_fail', 'url': url})
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
return site
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
__init__
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
get_html
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
fetch_manga_seed_page
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
fetch_chapter_seed_page
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
fetch_page_image
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
search_by_author
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
get_site
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): def test_buildPaths(self): recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0],...
assert findTxt(repPaths["ListWindowReport"][0], "base") assert findTxt(repPaths["ExpensesList"][0], "StdPy")
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): <|fim_middle|> def test_suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(TestFuncs)) return suite if __name__ == '__main__': unittest.main(d...
def test_buildPaths(self): recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0], "base") assert findTxt(recPaths["Department"][0], "StdPy") assert findTxt(recPaths["Department"][1], "standard") ...
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): def test_buildPaths(self): <|fim_middle|> def test_recordInheritance(self): recf, recd = getRecordInheritance("Invoice") assert all([f1 in recf for f1...
recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0], "base") assert findTxt(recPaths["Department"][0], "StdPy") assert findTxt(recPaths["Department"][1], "standard") assert findTxt(repPaths["Lis...
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): def test_buildPaths(self): recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0],...
recf, recd = getRecordInheritance("Invoice") assert all([f1 in recf for f1 in ("SalesMan", "InvoiceDate", "CustCode", "Currency", "ShiftDate", "OriginNr", "SerNr", "attachFlag")]) assert all([d in recd for d in ("CompoundItemCosts", "Payments", "Items", "Taxes", "Installs")]) recf, recd...
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): def test_buildPaths(self): recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0],...
recf, recd = getRecordsInfo("Department", RECORD) assert recf["Department"]["AutoCashCancel"] == "integer" #From StdPy assert recf["Department"]["DeptName"] == "string" #From standard assert recf["Department"]["Closed"] == "Boolean" #From Master assert recf["Departm...
<|file_name|>test_funcs.py<|end_file_name|><|fim▁begin|>import unittest from libs.funcs import * class TestFuncs(unittest.TestCase): def test_buildPaths(self): recPaths, repPaths, rouPaths, corePaths = buildPaths() findTxt = lambda x, y: x.find(y) > -1 assert findTxt(recPaths["Task"][0],...
attr, meth = getClassInfo("Invoice") assert attr["DEBITNOTE"] == 2 assert attr["ATTACH_NOTE"] == 3 assert attr["rowNr"] == 0 assert attr["ParentInvoice"] == "SuperClass" assert isinstance(attr["DocTypes"], list) assert isinstance(attr["Origin"], dict...