prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
self.data['h']= (self.data[time_column])*24 + self.data[time_column].shift(1) self.data['h'].fillna(0,inplace=True)
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
new_name = column_name + ' ' + 'mg/L'
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
wn.warn('Strong change in pH during experiment!')
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
self.delta_ph = dph
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
for column in columns: ax.plot(self.time,self.data[column],marker='o')
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
for column in columns: ax.plot(self.data[time_column],self.data[column],marker='o')
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
__init__
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
hours
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
add_conc
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
check_ph
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
in_out
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
removal
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
calc_slope
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
plot
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
_print_removed_output
<|file_name|>Class_LabExperimBased.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Class_LabExperimBased provides functionalities for data handling of data obtained in lab experiments in the field of (waste)water treatment. Copyright (C) 2016 Chaim De Mulder This program is free software: you can redistrib...
_log_removed_output
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Profil(models.Model): awal = '' PILIHAN_JENJANG = ( (awal, '----'), ('Pertama', 'Perekayasa Pertama'), ('Muda', 'Perekayasa Muda'), ('Madya', 'Perekayasa Madya'), ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Profil(models.Model): <|fim_middle|> <|fim▁end|>
awal = '' PILIHAN_JENJANG = ( (awal, '----'), ('Pertama', 'Perekayasa Pertama'), ('Muda', 'Perekayasa Muda'), ('Madya', 'Perekayasa Madya'), ('Utama', 'Perekayasa Utama'), ) nip = models.CharField(max_length=50, verbose_name='NIP') pendidikan = models.CharFie...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Profil(models.Model): awal = '' PILIHAN_JENJANG = ( (awal, '----'), ('Pertama', 'Perekayasa Pertama'), ('Muda', 'Perekayasa Muda'), ('Madya', 'Perekayasa Madya'), ...
verbose_name_plural = 'Profil'
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Profil(models.Model): awal = '' PILIHAN_JENJANG = ( (awal, '----'), ('Pertama', 'Perekayasa Pertama'), ('Muda', 'Perekayasa Muda'), ('Madya', 'Perekayasa Madya'), ...
return self.nip
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Profil(models.Model): awal = '' PILIHAN_JENJANG = ( (awal, '----'), ('Pertama', 'Perekayasa Pertama'), ('Muda', 'Perekayasa Muda'), ('Madya', 'Perekayasa Madya'), ...
__str__
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
fig.transFigure._boxout = _boxout fig.transFigure.invalidate()
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
""" Temporarily adjust the figure so that only the specified area (bbox_inches) is saved. It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function which restores the original val...
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
return pos
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
for ax, asp, loc in zip(fig.axes, asp_list, locator_list): ax.set_aspect(asp) ax.set_axes_locator(loc) fig.bbox = origBbox fig.bbox_inches = origBboxInches fig.transFigure._boxout = _boxout fig.transFigure.invalidate() fig.patch.set_bounds(0, 0, 1...
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
""" This need to be called when figure dpi changes during the drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with the new dpi. """ bbox_inches, restore_bbox = bbox_inches_restore restore_bbox() r = adjust_bbox(figure, bbox_inches, fixed_dpi) return bbox_inches, ...
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
tr = Affine2D().scale(fixed_dpi) dpi_scale = fixed_dpi / fig.dpi
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
tr = Affine2D().scale(fig.dpi) dpi_scale = 1.
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
adjust_bbox
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
_l
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
restore_bbox
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
process_figure_for_rasterizing
<|file_name|>implicitgrant.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from .grant import Grant from ..endpoint import AuthorizationEndpoint class ImplicitGrant(Grant): """ The implicit grant type is used to obtain access tokens (it does not support the issuance of refresh tokens) and is optim...
Note: The lines illustrating steps (A) and (B) are broken into two parts as they pass through the user-agent.
<|file_name|>implicitgrant.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from .grant import Grant from ..endpoint import AuthorizationEndpoint class ImplicitGrant(Grant): <|fim_middle|> <|fim▁end|>
""" The implicit grant type is used to obtain access tokens (it does not support the issuance of refresh tokens) and is optimized for public clients known to operate a particular redirection URI. These clients are typically implemented in a browser using a scripting language such as JavaScript....
<|file_name|>implicitgrant.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from .grant import Grant from ..endpoint import AuthorizationEndpoint class ImplicitGrant(Grant): """ The implicit grant type is used to obtain access tokens (it does not support the issuance of refresh tokens) and is optim...
self._authorization_endpoint = AuthorizationEndpoint(self._server, self._request, self._client) return self._authorization_endpoint.implicit(expires_in)
<|file_name|>implicitgrant.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- from .grant import Grant from ..endpoint import AuthorizationEndpoint class ImplicitGrant(Grant): """ The implicit grant type is used to obtain access tokens (it does not support the issuance of refresh tokens) and is optim...
get_redirection_uri
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError:<|fim▁hole|>e...
pass
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
def _setup(self): from admin_sso import default_settings self._wrapped = Settings(default_settings)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
from admin_sso import default_settings self._wrapped = Settings(default_settings)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
def __init__(self, settings_module): for setting in dir(settings_module): if setting == setting.upper(): setattr(self, setting, getattr(settings_module, setting))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
for setting in dir(settings_module): if setting == setting.upper(): setattr(self, setting, getattr(settings_module, setting))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
class LazySettings(LazyObject): def _setup(self): from admin_sso import default_settings self._wrapped = Settings(default_settings) class Settings(object): def __init__(self, settings_module): for setting in dir(settings_module): if setting ==...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
setattr(self, setting, getattr(settings_module, setting))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
_setup
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>VERSION = (1, 0, 0,) __version__ = '.'.join(map(str, VERSION)) default_app_config = 'admin_sso.apps.AdminSSOConfig' # Do not use Django settings at module level as recommended try: from django.utils.functional import LazyObject except ImportError: pass els...
__init__
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org<|fim▁hole|>from ...worksheet import Worksheet class TestWriteWorksheet(unittest.Te...
# import unittest from ...compatibility import StringIO
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Wo...
""" Test the Worksheet _write_worksheet() method. """ def setUp(self): self.fh = StringIO() self.worksheet = Worksheet() self.worksheet._set_filehandle(self.fh) def test_write_worksheet(self): """Test the _write_worksheet() method""" self.worksheet._write_...
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Wo...
self.fh = StringIO() self.worksheet = Worksheet() self.worksheet._set_filehandle(self.fh)
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Wo...
"""Test the _write_worksheet() method""" self.worksheet._write_worksheet() exp = """<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">""" got = self.fh.getvalue() self.asse...
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Wo...
setUp
<|file_name|>test_write_worksheet.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ...worksheet import Wo...
test_write_worksheet
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django_pgjson.fields import django.utils.timezone import django.db.models.deletion import djorm_pgarray.fields impor...
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import django_pgjson.fields import django.utils.timezone import django.db.models.deletion import djorm_pgarray.fields impor...
dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('users', '0002_auto_20140903_0916'), ] operations = [ migrations.CreateModel( name='Membership', fields=[ ('id', models.AutoField(serialize=False, primary_key=True, a...
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = []<|fim▁hole|> self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/sym" self.__lo...
self.__patterns_sym = []
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): <|fim_middle|> <|fim▁end|>
name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/sym" self.__load_num_patterns(msp_num) self.__load_sym_patterns(msp_sym) print 'load...
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): <|fim_middle|> def __load_num_patterns(self, input_dir): paths = hp.get_paths(input_dir) self.__patterns_num = [hp.get_gray_image(input_dir, ...
self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/sym" self.__load_num_patterns(msp_num) self.__load_sym_patterns(msp_sym) print 'loading MSP...'
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
paths = hp.get_paths(input_dir) self.__patterns_num = [hp.get_gray_image(input_dir, path) for path in paths] self.__labels_num = [hp.get_test(path, "num")[0] for path in paths]
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
paths = hp.get_paths(input_dir) self.__patterns_sym = [hp.get_gray_image(input_dir, path) for path in paths] self.__labels_sym = [hp.get_test(path, "sym")[0] for path in paths]
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
if mode == "num": return self.__labels_num, self.__patterns_num elif mode == "sym": return self.__labels_sym, self.__patterns_sym
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
tmp_max, tmp, rec = sys.maxint, 0, 0 labels, patterns = self.__get_mode(mode) for pattern, label in zip(patterns, labels): tmp = cv2.countNonZero(pattern - img) if tmp < tmp_max: tmp_max, rec = tmp, label return rec
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
return self.__labels_num, self.__patterns_num
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
return self.__labels_sym, self.__patterns_sym
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
tmp_max, rec = tmp, label
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def <|fim_middle|>(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num",...
__init__
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
__load_num_patterns
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
__load_sym_patterns
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
__get_mode
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys import cv2 import helper as hp class MSP(): name = "MSP" def __init__(self): self.__patterns_num = [] self.__patterns_sym = [] self.__labels_num = [] self.__labels_sym = [] msp_num, msp_sym = "msp/num", "msp/...
rec
<|file_name|>0012_auto_20150422_2019.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('managers', '0011_auto_20150422_2018'), ] <|fim▁hole|> fie...
operations = [ migrations.AlterField( model_name='managerprofile', name='picture',
<|file_name|>0012_auto_20150422_2019.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): <|fim_middle|> <|fim▁end|>
dependencies = [ ('managers', '0011_auto_20150422_2018'), ] operations = [ migrations.AlterField( model_name='managerprofile', name='picture', field=models.ImageField(default=b'/static/assets/admin/layout/img/avatar.jpg', upload_to=b'profiles'), ...
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
def test_pure_relative(self): with self.root() as root: self.assertEquals(os.path.join(root, 'a'), expand_path('a')) def test_dot_relative(self): with self.root() as root: self.assertEquals(os.path.join(root, 'a'), expand_path('./a')) def test_absolute(self): self.assertEquals('/tmp/jake...
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
with self.root() as root: self.assertEquals(os.path.join(root, 'a'), expand_path('a'))
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
with self.root() as root: self.assertEquals(os.path.join(root, 'a'), expand_path('./a'))
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
self.assertEquals('/tmp/jake/bob', expand_path('/tmp/jake/bob'))
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
with environment_as(HOME='/tmp/jake'): self.assertEquals('/tmp/jake/bob', expand_path('~/bob'))
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
with self.root() as root: with environment_as(A='B', C='D'): self.assertEquals(os.path.join(root, 'B/D/E'), expand_path('$A/${C}/E'))
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
with temporary_dir() as root: # Avoid OSX issues where tmp dirs are reported as symlinks. real_root = os.path.realpath(root) with pushd(real_root): yield real_root
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
test_pure_relative
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
test_dot_relative
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
test_absolute
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
test_user_expansion
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
test_env_var_expansion
<|file_name|>test_expand_path.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
root
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header <|fim▁hole|> p...
def send(self,string):
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: <|fim_middle|> class Console: ''' Allows user to enter commands ''' def __init__(self,prompt='[$] '): self._prompt = prompt sel...
''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self,string): print(self._header+string)
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): <|fim_middle|> def send(self,strin...
self._header = header
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
print(self._header+string)
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
''' Allows user to enter commands ''' def __init__(self,prompt='[$] '): self._prompt = prompt self._at = '' def poll(self,wait_s=None,uid=None): try: prompt = str(self._at)+str(self._prompt) msg = raw_input(prompt) if msg == '': self._at = '' return [] if msg[0] == '@': self._at = msg....
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
self._prompt = prompt self._at = ''
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
try: prompt = str(self._at)+str(self._prompt) msg = raw_input(prompt) if msg == '': self._at = '' return [] if msg[0] == '@': self._at = msg.split()[0]+' ' else: msg = self._at+msg return [msg] except Exception as e: print(repr(e)) return []
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
pass
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
''' Runs a script passed as a list, default frequency = 1000Hz ''' def __init__(self,msgs): self._msgs = msgs self._index = 0 self._period = 0.001 self._pid = 'SCRIPT' def poll(self,wait_s=None,uid=None): period = self._period if wait_s is None else wait_s time.sleep(period) try: msg = self._msgs[...
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
self._msgs = msgs self._index = 0 self._period = 0.001 self._pid = 'SCRIPT'
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
period = self._period if wait_s is None else wait_s time.sleep(period) try: msg = self._msgs[self._index] print(self._pid+' SEND > '+msg) self._index += 1 return [msg] except IndexError: return []
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
for uid in uids: if uid is not None: if uid[0] is '@': assert uid[1:] in get_attr(Uid) else: assert uid in get_attr(Uid) return self
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
self._msgs += msg_array return self
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
self._period = period return self
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
t = threading.current_thread() self._pid = str(t.ident)+' '+str(t.name) while len(self.poll()) > 0: pass
<|file_name|>connectors_local.py<|end_file_name|><|fim▁begin|>import time from threading import Thread import threading from wtfj_ids import * from wtfj_utils import * class Printer: ''' Opens a new output window and prints messages sent to it ''' def __init__(self,header=''): self._header = header def send(self...
Thread(target=self.run).start()