prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_form = code_str[17 - code_len:21]
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_form = code_str[16 - code_len:21]
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_form = code_str[15 - code_len:21]
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_form = code_str[14 - code_len:21]
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_seq = self.pool.get('ir.sequence').get(self._cr, self._uid, 'clv_insured.code') vals['code'] = format_code(code_seq)
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_seq = self.pool.get('ir.sequence').get(self._cr, self._uid, 'clv_insured.code') vals['code'] = format_code(code_seq)
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
format_code
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
create
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
write
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
copy
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
""" Lasso model fit with Lars using BIC or AIC for model selection """ info = {'problemtype':'regression', 'normalize':False} def __init__(self): """ Constructor that will appropriately initialize a supervised learning object @ In, None @ Out, None """ super().__init__() i...
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
""" Constructor that will appropriately initialize a supervised learning object @ In, None @ Out, None """ super().__init__() import sklearn import sklearn.linear_model self.model = sklearn.linear_model.LassoLarsIC
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
""" Method to get a reference to a class that specifies the input data for class cls. @ In, cls, the class for which we are retrieving the specification @ Out, inputSpecification, InputData.ParameterInput, class to use for specifying input of cls. """ specs = super(LassoLarsI...
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
""" Function to handle the common parts of the distribution parameter input. @ In, paramInput, ParameterInput, the already parsed input. @ Out, None """ super()._handleInput(paramInput) settings, notFound = paramInput.findNodesAndExtractValues(['fit_intercept','max_iter', 'normalize', ...
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
__init__
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
getInputSpecification
<|file_name|>LassoLarsIC.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # 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.org/licenses/LICE...
_handleInput
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck:<|fim▁hole|> select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as table_oid, index_class.r...
unique_indexes_query = """
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: <|fim_middle|> <|fim▁end|>
unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as table_oid, index_class.relname as index_name, table_class.relname as table_name, unnest(pg_index.indkey) as column_index fr...
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
self.violated_segments_query = """ select distinct(gp_segment_id) from ( (select gp_segment_id, %s from gp_dist_random('%s') where (%s) is not null group by gp_segment_id, %s having count(*) > 1) union ...
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
unique_indexes = db_connection.query(self.unique_indexes_query).getresult() violations = [] for (table_oid, index_name, table_name, column_names) in unique_indexes: column_names = ",".join(column_names) sql = self.get_violated_segments_query(table_name, column_names) ...
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
return self.violated_segments_query % ( column_names, table_name, column_names, column_names, column_names, table_name, column_names, column_names )
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
violations.append(dict(table_oid=table_oid, table_name=table_name, index_name=index_name, column_names=column_names, violated_segments=[row[0] for r...
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
__init__
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
runCheck
<|file_name|>unique_index_violation_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class UniqueIndexViolationCheck: unique_indexes_query = """ select table_oid, index_name, table_name, array_agg(attname) as column_names from pg_attribute, ( select pg_index.indrelid as tabl...
get_violated_segments_query
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2015-2018 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from . import mass_reconcile<|fim▁hole|>from . import advanced_reconciliation<|fim▁end|>
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.descr...
sys.path.append('icd9') from icd9 import ICD9
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): <|fim_middle|> def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.description) for c in t.children: traverse(c, ...
txt = ''.join(filter(lambda c: c in printable, txt)) return txt
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): <|fim_middle|> def getEdges(t, outfile): ...
print>>outfile, sanitize(t.code+'\t'+t.description) for c in t.children: traverse(c, outfile)
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.descr...
for c in t.children: print >>outfile, sanitize(t.code+'\t'+c.code) getEdges(c, outfile)
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def <|fim_middle|>(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t...
sanitize
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def <|fim_middle|>(t, outfile): print>>outfile, sanitize(t.code+'\t'+t...
traverse
<|file_name|>load_ICD9_structure.py<|end_file_name|><|fim▁begin|>import sys import os import subprocess import string printable = set(string.printable) def sanitize(txt): txt = ''.join(filter(lambda c: c in printable, txt)) return txt def traverse(t, outfile): print>>outfile, sanitize(t.code+'\t'+t.descr...
getEdges
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
print(e) return { 'description': 'Failed to update message.'
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
@api.expect(message) @api.response(204, 'Message successfully received.') def post(self): req_parse = reqparse.RequestParser(bundle_errors=True) req_parse.add_argument('email', type=str, required=True, help='No email provided', lo...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
req_parse = reqparse.RequestParser(bundle_errors=True) req_parse.add_argument('email', type=str, required=True, help='No email provided', location='json') req_parse.add_argument('content', type=str, required=True, ...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
if not current_identity and not app.config.get('TESTING'): return {'message': 'User not authenticated'}, 401 if app.config.get('TESTING') \ or current_identity.role.role_name == "ADMIN": messages = dict() for message_row in Message.query.filter_by(done...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
@api.expect(message_id) @api.response(204, 'Message successfully updated.') def post(self): req_parse = reqparse.RequestParser(bundle_errors=True) req_parse.add_argument('id', type=int, required=True, help='No id provided', locati...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
req_parse = reqparse.RequestParser(bundle_errors=True) req_parse.add_argument('id', type=int, required=True, help='No id provided', location='json') args = req_parse.parse_args() id = args.get('id') if id == 0: ...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': {'email': 'No email provided'}}, 400
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': {'email': 'Invalid email provided'}}, 400
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': {'content': 'No content provided'}}, 400
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': 'User not authenticated'}, 401
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
messages = dict() for message_row in Message.query.filter_by(done=False).all(): messages[message_row.id] = { "email": message_row.email, "time": message_row.time.isoformat(), "content": message_row.content ...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': 'Not authorised'}, 401
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
return {'message': {'id': 'No id provided'}}, 400
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
post
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
get
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>import re from datetime import datetime from flask import current_app as app from flask_jwt import current_identity from flask_restplus import Namespace, Resource, fields, reqparse from sqlalchemy.exc import IntegrityError from packr.models import Message api = Na...
post
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os ADMINS = ( # ('Eduardo Lopez', 'eduardo.biagi@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': ...
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
<|file_name|>test_tf_nn_moments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Author: violinsolo # Created on 08/03/2018 import tensorflow as tf import numpy as np x_shape = [5, 3, 3, 2] x = np.arange(reduce(lambda t, s: t*s, list(x_shape), 1)) print x x = x.reshape([5, 3, 3, -1]) pri...
print(sess.run(m, feed_dict={X: x})) # print(sess.run(m, feed_dict={X: x}))
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return self.enum_cls._fields[value] class Playlist(APIObject):
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
def __init__(self, enum_cls, help=None): self.help = help self.enum_cls = enum_cls def to_python(self, value): for i, field in enumerate(self.enum_cls._fields): if i == value: return field raise Exception('Invalid Enum: %s' % value) def from_pyth...
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
self.help = help self.enum_cls = enum_cls
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
for i, field in enumerate(self.enum_cls._fields): if i == value: return field raise Exception('Invalid Enum: %s' % value)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return self.enum_cls._fields[value]
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_fields = ['name', 'type', 'season', 'week', 'query'] type = EnumField(PlaylistTypeEnum) def __repr__(self): return '<Playlist name=\'{0}\'>'.format(self.name)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return '<Playlist name=\'{0}\'>'.format(self.name)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_fields = ['showName', 'channelName', 'videoLink', 'mobileLink', 'logo', 'fanart', 'playlists'] channelName = EnumField(ChannelNameEnum) playlists = ListField(Playlist) def __repr__(self): return '<Show name=\'{0}\'>'.format(self.showName)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return '<Show name=\'{0}\'>'.format(self.showName)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_fields = ['defaultURL', 'audioOnly', 'mediaDeliveryType', 'encodingRate', 'frameHeight', 'frameWidth', 'size', 'videoCodec', 'videoContainer'] mediaDeliveryType = EnumNumField(MediaDeliveryEnum) def __repr__(self): return '<Rendition bitrate=\'{0}\' type=\'{1}\' frameSize=\'{2...
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return '<Rendition bitrate=\'{0}\' type=\'{1}\' frameSize=\'{2}x{3}\'>'.format(self.encodingRate, self.mediaDeliveryType, self.frameWidth, self.frameHeight)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_item_class = Show items = ListField(Show)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_item_class = Playlist items = ListField(Playlist)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
_item_class = AMFRendition items = ListField(AMFRendition)
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
return field
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
__init__
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
to_python
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
from_python
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
__repr__
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
__repr__
<|file_name|>objects.py<|end_file_name|><|fim▁begin|># # NineMSN CatchUp TV Video API Library # # This code is forked from Network Ten CatchUp TV Video API Library # Copyright (c) 2013 Adam Malcontenti-Wilson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software ...
__repr__
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
self.cat_comparator = CategoricalComparator([0,1])
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : <|fim_middle|> <|fim▁end|>
type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(CategoricalType, self ).__init__(definition) self.cat_comparator = CategoricalComparator([0,1]) self.higher_vars = [] for higher_var in self.cat_comparator.dummy_names : ...
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : <|fim_middle...
super(CategoricalType, self ).__init__(definition) self.cat_comparator = CategoricalComparator([0,1]) self.higher_vars = [] for higher_var in self.cat_comparator.dummy_names : dummy_var = DerivedType({'name' : higher_var, 'type...
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
if field_1 and field_2 : return self.cat_comparator(1, 1) elif field_1 or field_2 : return self.cat_comparator(0, 1) else : return self.cat_comparator(0, 0)
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
return self.cat_comparator(1, 1)
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
return self.cat_comparator(0, 1)
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
return self.cat_comparator(0, 0)
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def <|fim_middle|>(self, definition) : super(...
__init__
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
comparator
<|file_name|>general_script_L1_PACS.py<|end_file_name|><|fim▁begin|>### This script fetches level-1 PACS imaging data, using a list generated by the ### archive (in the CSV format), attaches sky coordinates and masks to them ### (by calling the convertL1ToScanam task) and save them to disk in the correct ### format for...
<|file_name|>general_script_L1_PACS.py<|end_file_name|><|fim▁begin|>### This script fetches level-1 PACS imaging data, using a list generated by the ### archive (in the CSV format), attaches sky coordinates and masks to them ### (by calling the convertL1ToScanam task) and save them to disk in the correct ### format for...
os.system('mkdir '+dir_out) ##
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
def __init__(self): ApiCli.__init__(self) self.path = "v1/account/sources/" self.method = "GET" def getDescription(self): return "Lists the sources in a Boundary account"
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
ApiCli.__init__(self) self.path = "v1/account/sources/" self.method = "GET"
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
return "Lists the sources in a Boundary account"
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
__init__
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|># # Copyright 2014-2015 Boundary, Inc. # # 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.org/licenses/LICENSE-...
getDescription
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
pass
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
"""can look up email addresses and realnames for contacts. .. note:: This is an abstract class that leaves :meth:`get_contacts` unspecified. See :class:`AbookAddressBook` and :class:`ExternalAddressbook` for implementations. """ __metaclass__ = abc.ABCMeta def __init__(se...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
self.reflags = re.IGNORECASE if ignorecase else 0
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
"""list all contacts tuples in this abook as (name, email) tuples""" return []
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
"""looks up all contacts where name or address match query""" res = [] query = re.compile('.*%s.*' % query, self.reflags) for name, email in self.get_contacts(): if query.match(name) or query.match(email): res.append((name, email)) return res
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
res.append((name, email))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
__init__
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2015 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file from __future__ import absolute_import import re import abc class AddressbookE...
get_contacts