query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Test user cannot login with false credentials.
def test_login_login_inexisting_user_false(self): logins = { "Email": "user@example.com", "Password": "pass1234" } resp = self.client().post('/api/v1/auth/login', data=logins) self.assertEqual(resp.status_code, 400) resp = resp.get_json() self.asse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_login_without_registration_false(self):\n logins = {\"email\": \"esta@x.com\", \"Password\": \"pass234\"}\n res = self.client().post('/api/v1/auth/login', data=logins)\n self.assertTrue(res.status_code, 403)", "def test_login_not_activated(self):\n self.user.is_active = False...
[ "0.7740368", "0.7639016", "0.76264775", "0.76168483", "0.75738686", "0.7567786", "0.75407547", "0.7465455", "0.7397349", "0.7359804", "0.7315044", "0.72931474", "0.72864354", "0.72805965", "0.7274088", "0.7274088", "0.7274088", "0.7274088", "0.72592396", "0.7255341", "0.72375...
0.7207248
29
Adds an address to self.addresses_to_validate.
def add_address(self, address_item): self.addresses_to_validate.append(address_item)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def add_address(self, **kwargs):\n addressitem = AddressItem(**kwargs)\n self.addresses.append(addressitem)\n # TODO check uniqueness of email addresses", "def add_addressitem(self, addressitem):\n self.addresses.append(addressitem)", "def set_address(self, new_address, ):\n ...
[ "0.75070703", "0.6629237", "0.6582427", "0.6538738", "0.650575", "0.6394503", "0.62945956", "0.6055489", "0.5976876", "0.5976876", "0.5976876", "0.59633166", "0.59536946", "0.587711", "0.5821384", "0.5784477", "0.57757807", "0.57609737", "0.57591546", "0.57525367", "0.5724552...
0.84128225
0
Test shipment tracking. Query for a tracking number and make sure the first (and hopefully only) result matches up.
def test_track(self): track = FedexTrackRequest(CONFIG_OBJ) track.TrackPackageIdentifier.Type = 'TRACKING_NUMBER_OR_DOORTAG' track.TrackPackageIdentifier.Value = '798114182456' track.send_request() for match in track.response.TrackDetails: # This s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_shipment(self):\n pass", "def test_hit(self):\n ship = Ship(self.location)\n self.assertEqual(self.location, ship.location)\n self.assertEqual(1, ship.check_hit(self.hit))\n self.assertEqual(1, len(ship.location))", "def set_tracking(tracking_var):\n if tracki...
[ "0.55826724", "0.54747754", "0.53721327", "0.5337122", "0.5121344", "0.5106199", "0.5029972", "0.4995647", "0.49535227", "0.49362063", "0.49153", "0.48969743", "0.48785692", "0.4874546", "0.48586926", "0.4853946", "0.4811662", "0.48112896", "0.4808128", "0.48029983", "0.47835...
0.7057333
0
registers a not callable route factory as application url rule class. it should raise an error.
def test_register_route_factory_not_callable(): with pytest.raises(InvalidRouteFactoryTypeError): application_services.register_route_factory(1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def register_route(self, route, app):\n assert route not in self.routes\n self.routes[route] = app", "def test_add_url_rule():\n\n application_services.add_url_rule('/tests/application/rule', view_func=mock_view_function,\n methods=HTTPMethodEnum.GET)", "def regist...
[ "0.6571724", "0.6256299", "0.62177974", "0.61561006", "0.6130585", "0.6058839", "0.60064656", "0.59873474", "0.598041", "0.5962258", "0.5917312", "0.5888131", "0.58698696", "0.58618045", "0.5860116", "0.5773616", "0.5761011", "0.57417417", "0.5694137", "0.5653748", "0.5644261...
0.67660105
0
gets the application main package path.
def test_get_application_main_package_path(): application_root_path = application_services.get_application_root_path() main_package_path = os.path.abspath(os.path.join(application_root_path, 'unit')) assert application_services.get_application_main_package_path() == main_package_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def app_package_path(self) -> str:\n return self._app_package_path", "def get_appdir():\n\n return APP_PATH", "def GetPackageDirectory():\n return os.path.dirname(__file__)", "def get_package_path():\n package_name = get_package_name()\n return package_name.replace('.', '/')", "def get_p...
[ "0.8144051", "0.8080803", "0.77359366", "0.77107537", "0.7678832", "0.7590347", "0.75856656", "0.75267607", "0.73919415", "0.73645943", "0.7335023", "0.7170783", "0.708203", "0.70586056", "0.7018191", "0.7000291", "0.6978738", "0.6962034", "0.6962034", "0.6915582", "0.6915582...
0.71501434
12
gets the pyrin main package path.
def test_get_pyrin_main_package_path(): pyrin_root_path = application_services.get_pyrin_root_path() pyrin_main_package_path = os.path.abspath(os.path.join(pyrin_root_path, 'pyrin')) assert application_services.get_pyrin_main_package_path() == pyrin_main_package_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_package_dir():\n return Path(__file__).parent", "def GetPackageDirectory():\n return os.path.dirname(__file__)", "def package_dir(self):\r\n return \".\"", "def get_package_path():\n package_name = get_package_name()\n return package_name.replace('.', '/')", "def sublime_haskell_pack...
[ "0.77470183", "0.7397907", "0.725305", "0.7232669", "0.7057447", "0.6989911", "0.6905846", "0.6693411", "0.6690754", "0.6668755", "0.66590077", "0.6640892", "0.6614566", "0.6595516", "0.6547557", "0.652488", "0.6508098", "0.6506141", "0.64741975", "0.6465193", "0.6460535", ...
0.75912905
1
gets the application settings path.
def test_get_settings_path(): root_path = application_services.get_application_main_package_path() settings_path = os.path.abspath(os.path.join(root_path, 'settings')) assert application_services.get_settings_path() == settings_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getPath(self):\n path = os.path.dirname(os.path.realpath(__file__)) #Finds the path of the application\n path =(os.path.dirname(os.path.realpath(__file__))+ '\\\\Enigma Settings') #Adds to the directory to create a folder\n \n return path #Returns the folders directory", "def settingsFil...
[ "0.7374936", "0.7370214", "0.73550117", "0.73357975", "0.71443975", "0.68394446", "0.6820747", "0.67448306", "0.6722355", "0.670312", "0.6699407", "0.6698678", "0.66839635", "0.66730154", "0.6666475", "0.66420746", "0.66308963", "0.658334", "0.65573967", "0.6546411", "0.65454...
0.68922305
5
gets the application default settings path.
def test_get_default_settings_path(): root_path = application_services.get_pyrin_main_package_path() default_settings_path = os.path.abspath(os.path.join(root_path, 'settings', 'default')) assert application_services.get_default_settings_path() == default_settings_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def default_config_file(self):\n return DEFAULT_CONFIG_FILEPATH", "def default_path():\n return os.path.join(os.environ.get('OVERRIDE_ETC', '/etc'), 'auth')", "def get_default_config_path():\n if os.name == 'posix':\n config_path = os.path.join(os.path.expanduser(\"~\"), '.fpdb')\n elif ...
[ "0.7397172", "0.71934676", "0.7138593", "0.70448667", "0.69684124", "0.69425774", "0.6935014", "0.6873008", "0.6794685", "0.67900157", "0.67863894", "0.6753575", "0.67474246", "0.67212665", "0.6717926", "0.67078924", "0.66955435", "0.6686656", "0.66486245", "0.66471404", "0.6...
0.7257083
1
gets the application locale path.
def test_get_locale_path(): root_path = application_services.get_application_main_package_path() locale_path = os.path.abspath(os.path.join(root_path, 'locale')) assert application_services.get_locale_path() == locale_path
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_messages_dir(self, locale):\r\n return LOCALE_DIR.joinpath(locale, 'LC_MESSAGES')", "def get_current_locale(self) -> str:\n return self.locale", "def get_locale():\n return \"he\"", "def _get_locale() -> str:\n languages = flask.current_app.config['LANGUAGES'].keys()\n locale =...
[ "0.73434955", "0.6769153", "0.66997445", "0.66620433", "0.65536964", "0.6522882", "0.63761246", "0.6342175", "0.62665373", "0.62421596", "0.6203889", "0.61800617", "0.6179803", "0.6128163", "0.6116531", "0.6116011", "0.61024076", "0.608253", "0.60615224", "0.6060297", "0.5907...
0.74564075
0
gets the application's scripting mode status.
def test_is_scripting_mode(): assert application_services.is_scripting_mode() is False
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_status(self):\n\n return self._system", "def status(self):\n self.scion_sh('status')", "def runtime_status(self):\n try:\n return self.yarn_api.state(self.app_id)\n except:\n return \"NONE\"", "def getStatus(self):\r\n return self.controller.ge...
[ "0.63518834", "0.62555605", "0.6248268", "0.6164632", "0.61582375", "0.6114564", "0.6043988", "0.6019414", "0.6013364", "0.59927875", "0.59441346", "0.5869891", "0.58678323", "0.586621", "0.5864054", "0.5864054", "0.5864054", "0.5864054", "0.5864054", "0.5864054", "0.5864054"...
0.5928385
11
gets the application class name.
def test_get_class_name(): assert application_services.get_class_name() == 'PyrinUnitTestApplication'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_app_name(self):\n return getattr(self, '_app_name', None)", "def app_name(self) -> str:\n return self._app_name", "def app_name(self):\n module_filepath = inspect.getfile(type(self))\n parent_dir = os.path.dirname\n app_dirpath = parent_dir(parent_dir(parent_dir(modul...
[ "0.791041", "0.78156585", "0.78115284", "0.7796134", "0.7739188", "0.7709", "0.768708", "0.76849437", "0.7616571", "0.7349154", "0.73471004", "0.73321366", "0.73225236", "0.73225236", "0.71789473", "0.71246165", "0.70750266", "0.7036576", "0.7025467", "0.70247996", "0.7014344...
0.6653003
41
Return item on index.
def __getitem__(self, index): # type: (int) -> Any items = list.__getitem__(self, index) return type(self)(self._values(items)) if isinstance(index, slice) else self.value(items)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_item(self, index: int) -> _T:\n return self.index_to_item[index]", "def __getitem__(self, index):\n item = self.data[index]\n return item", "def __getitem__(self, index):\r\n return self._items[index]", "def __getitem__(self, index: int) -> object:\n return self.get...
[ "0.872835", "0.84079087", "0.8303135", "0.817491", "0.816508", "0.8051659", "0.7992799", "0.7922477", "0.7847689", "0.78455865", "0.78270614", "0.78153145", "0.7812507", "0.7797635", "0.7797635", "0.7781319", "0.7781319", "0.77412856", "0.7664785", "0.7660576", "0.7655296", ...
0.706431
77
Insert item at the specific index.
def insert(self, index, item): # type: (int, Any) -> None return list.insert(self, index, self.ref(item))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def insert(self, index, item):\n if index > len(self):\n raise IndexError\n elif index == 0:\n self.insert_first(item)\n else:\n self._rest.insert(index-1, item)", "def insert(self, index: int, item: Any) -> None:\n self.contents.insert(index, item)\n ...
[ "0.8900415", "0.8778978", "0.86274433", "0.84056276", "0.8348985", "0.8238325", "0.82201", "0.8142528", "0.81412184", "0.81316394", "0.79395247", "0.79122573", "0.7905083", "0.78771377", "0.7873035", "0.7857927", "0.76369935", "0.7632073", "0.75076234", "0.74568415", "0.73923...
0.86035734
3
Add items to the end of the WeakList.
def extend(self, items): # type: (Iterable[Any]) -> None return list.extend(self, self._refs(items))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append(self, items):\n self.__add__(items)", "def __append_to_item_list(self):\n Item.get_item_list().append(self)", "def append(self, item):\n tmpNode = Node(item)\n self.tail.next = tmpNode\n self.tail = tmpNode\n self._size += 1", "def append(self, item):\n ...
[ "0.6879408", "0.6218221", "0.62042254", "0.61626637", "0.6159904", "0.6085338", "0.59537274", "0.59258544", "0.5821097", "0.58152246", "0.5783216", "0.577965", "0.57600063", "0.57208824", "0.5710376", "0.57071316", "0.5663233", "0.5661378", "0.5661167", "0.5651998", "0.564410...
0.5835919
8
Convert a continued fraction to a Fraction
def cfrac_to_fraction(cfrac, limit_denom=None): terms = cfrac[:] assert limit_denom is None or limit_denom >= 1 ans = Fraction(terms.pop(0)) if terms: ans = ans + (Fraction(1) / cfrac_to_fraction(terms)) if ( (limit_denom is not None) and (ans.denominator > limit_denom) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cont2frac(cont):\n\tif cont == [0]:\n\t\treturn None\n\tfrac = Fraction(0, 1)\n\tfor p in cont[::-1]:\n\t\tfrac = 1 / (frac + p)\n\treturn 1 / frac", "def fraction_to_proper_fraction(rational):\n assert isinstance(rational, Fraction), repr(rational)\n quotient = int(rational)\n residue = rational - ...
[ "0.72981626", "0.7058992", "0.68837315", "0.66788733", "0.6654091", "0.6638684", "0.65485704", "0.6487339", "0.6427174", "0.6420491", "0.64027303", "0.6388466", "0.63763237", "0.6342004", "0.6264377", "0.6239982", "0.62387484", "0.6223573", "0.6215358", "0.62048393", "0.61958...
0.7168212
1
Calculates the total number of rows minus the header
def calc_total_rows(self): #total_rows = len(self.file_list) - 1 # Minus header print('Total number of rows: ' + str(self.tot_rows)) results.append('Total number of rows: ' + str(self.tot_rows))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNumRows(self) -> int:\n ...", "def row_count(self):\n return self.well_count // self.col_count", "def number_of_rows(self):\n if self.number_of_columns():\n return self._number_of_rows\n else:\n return 0", "def getRowCount(self) -> int:\n ...", ...
[ "0.7527993", "0.73961246", "0.72024125", "0.7188455", "0.70076984", "0.69623005", "0.69623005", "0.68645376", "0.68641365", "0.6838018", "0.68046564", "0.67844284", "0.67678696", "0.6755261", "0.6750416", "0.6748567", "0.67388254", "0.6733685", "0.6724359", "0.66987246", "0.6...
0.7786344
0
Calculates the total number of null fields
def calc_null(self): null = 0 for x in range(0, self.tot_col): for y in range(1, self.tot_rows + 1): if self.file_list[y][x].lower() == 'null': null += 1 print('Total number of null fields: ' + str(null)) results.append('Total number of nul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def count_null(self): \n print('Null Counts:', self.X.isnull().sum()[self.X.isnull().sum() > 0])", "def null_count(df):\n return df.isnull().sum().sum()", "def reportnulls(self):\n self.null_counts = self.df.isnull().sum().sort_values(ascending=False)\n\n # return count of null value...
[ "0.7737157", "0.726865", "0.7256995", "0.71706116", "0.7010953", "0.64551276", "0.6404239", "0.6275014", "0.6253207", "0.6195468", "0.6155574", "0.6099089", "0.6084338", "0.6071967", "0.60519236", "0.60493773", "0.6026919", "0.59850645", "0.5980233", "0.595715", "0.59542024",...
0.8438629
0
Create and configure a new self.app instance for each test.
def setUp(self): # create a temporary file to isolate the database for each test # create the self.app with common test config self.app = Flask(__name__) @self.app.route('/', methods=['GET', 'POST']) @forward_or_dispatch() def hello(): return {'msg': 'default...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_app(self):\n app.config.from_object('config.TestingConfig')\n return app", "def create_app(self):\n\n app = create_app()\n app.config.from_object('project.config.TestingConfig')\n return app", "def app():\n print('creating app with test vars')\n\n app = creat...
[ "0.8010354", "0.786906", "0.77860427", "0.77587456", "0.7698968", "0.7698968", "0.7698968", "0.756765", "0.75359654", "0.7535422", "0.749434", "0.7418919", "0.7400675", "0.73952365", "0.73559517", "0.7347912", "0.73465014", "0.7344261", "0.73345166", "0.7330918", "0.73142916"...
0.69763833
48
Test that a user can view all user profiles
def test_view_all_users_profiles(self): self.authorize_user(self.user_login_details) response = self.client.get(self.profiles_url) self.assertEqual(response.status_code, status.HTTP_200_OK)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_view_a_user_profile(self):\n self.authorize_user(self.user_login_details)\n url = self.profiles_url + \\\n '{}'.format(self.user['user']['username']) + \"/\"\n response = self.client.get(url)\n self.assertEqual(response.status_code, status.HTTP_200_OK)", "def test_...
[ "0.7554263", "0.75427", "0.7459747", "0.7245815", "0.7214107", "0.7208865", "0.720439", "0.71139777", "0.70920175", "0.70764077", "0.7070349", "0.70695615", "0.7032603", "0.70119697", "0.70089734", "0.69782305", "0.697717", "0.69603777", "0.69472766", "0.6889597", "0.68776006...
0.87810063
0
Tests the edit profile functionality
def test_that_a_user_can_edit_their_profile(self): self.authorize_user(self.user_login_details) url = self.profiles_url + \ '{}'.format(self.user['user']['username']) + "/" response = self.client.patch(url, data=self.user_bio) self.assertEqual(response.data['bio'], "You are a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_editProfile(self):\n\t\turl = \"/profiles/1/\"\n\t\tdata = { \"name\" : \"testName\", \"surname\" : \"testSurname\" }\n\t\tresponse = self.client.patch(url, data, format='json')\n\t\tself.assertEqual(response.status_code, status.HTTP_200_OK)\n\t\tself.assertEqual(response.data[\"name\"], \"testName\")\n\t...
[ "0.843871", "0.8264688", "0.81665623", "0.7462617", "0.74389017", "0.7427411", "0.7414894", "0.7382416", "0.73075765", "0.72861266", "0.72685134", "0.71807826", "0.71641606", "0.71431524", "0.7122211", "0.71018666", "0.7089516", "0.7044515", "0.7009662", "0.69550914", "0.6931...
0.83145934
1
Tests that a user can only edit their profile
def test_that_a_user_cannot_edit_another_users_profile(self): self.authorize_user(self.user_login_details) self.register_user(self.user2) url = self.profiles_url + \ '{}'.format(self.user2['user']['username']) + "/" response = self.client.patch(url, data=self.user_bio) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_that_a_user_can_edit_their_profile(self):\n self.authorize_user(self.user_login_details)\n url = self.profiles_url + \\\n '{}'.format(self.user['user']['username']) + \"/\"\n response = self.client.patch(url, data=self.user_bio)\n self.assertEqual(response.data['bio'...
[ "0.7936445", "0.7774556", "0.7662968", "0.74516404", "0.7358222", "0.72147715", "0.720744", "0.7192766", "0.7098005", "0.70854264", "0.70595926", "0.705665", "0.6991822", "0.6988194", "0.69669694", "0.68825734", "0.6868114", "0.685556", "0.68272036", "0.6753934", "0.6732646",...
0.8076196
0
Returns filename for parsed file.
def filename(self): return self._filename
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_file_name(self):\n return str(self.get_file())", "def get_name_from_file(filename):\n return filename.split(\".\")[0]", "def get_file_name(self):\n return self.path.name[6:]", "def filename(self):\n filename, ext = os.path.splitext(self.file.name)\n return filename.spli...
[ "0.7693016", "0.7645446", "0.7610212", "0.75880194", "0.75802994", "0.7561182", "0.7553622", "0.7511493", "0.74929005", "0.7439984", "0.74399483", "0.74279565", "0.74228334", "0.7406717", "0.7406717", "0.7406717", "0.7406717", "0.7406717", "0.74054", "0.74044955", "0.74033886...
0.72062343
36
Returns generator of blocks available in parsed AST.
def blocks(self): if self._ast: for block in self._ast[2]: yield block
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_blocks(self) -> list:\n self.clingo = ClingoBridge() # reset clingo\n\n base = ('base', '')\n self.clingo.add_file('initial-states.lp')\n self.clingo.run([base], n=1)\n output = self.clingo.output[0]\n\n blocks = []\n for atom in output:\n if ato...
[ "0.66929805", "0.6476219", "0.64008844", "0.63524127", "0.6239264", "0.61740375", "0.6160887", "0.609532", "0.60927385", "0.60304904", "0.59549314", "0.59396493", "0.59125745", "0.5909018", "0.59024304", "0.5850683", "0.5824664", "0.58123404", "0.572938", "0.56783503", "0.564...
0.82298094
0
Removes any trailing/leading single/double quotes from a string. Noops if the given object is not a string or otherwise does not have a .strip() method.
def _Unquote(s): if not hasattr(s, 'strip'): return s # Repeated to handle both "'foo'" and '"foo"' return s.strip("\"'")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _Unquote(s):\n if not hasattr(s, 'strip'):\n return s\n # Repeated to handle both \"'foo'\" and '\"foo\"'\n return s.strip(\"'\").strip('\"').strip(\"'\")", "def _strip(obj):\n return obj.translate(None, STRIP_CHARS)", "def _strip(value):\n if isinstance(value, basestring):\n value = val...
[ "0.70761806", "0.69179165", "0.68233347", "0.6799103", "0.664705", "0.6586794", "0.64764214", "0.64638007", "0.6436928", "0.64118946", "0.63776684", "0.6367695", "0.6345045", "0.6226098", "0.6226098", "0.6226098", "0.62177795", "0.62173396", "0.62173396", "0.62173396", "0.621...
0.72688997
0
Calculates the cdf of a distribution. Given a distribution, calculates (and stores) the cdf for quick sampling.
def get_cdf(dist): cdf = [] total = 0 for i in range(len(dist)): total += dist[i] cdf.append(total) return cdf
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __calculate_cdf(self):\n \n for (f, dist) in self.__dists.iteritems():\n for dict in self.__queries:\n dict['rss_lower_cdf']=(dict[qs.QRY_LRSS]/self.__db_size)\n dict['rss_upper_cdf']=(dict[qs.QRY_URSS]/self.__db_size)", "def cdf(self, value):\n ret...
[ "0.73391473", "0.71462095", "0.7006065", "0.69178534", "0.69055283", "0.6881722", "0.6864015", "0.6864015", "0.6862247", "0.68180513", "0.6813792", "0.6715437", "0.6625051", "0.66062456", "0.65804577", "0.6534922", "0.6516298", "0.64982605", "0.648897", "0.6406971", "0.637842...
0.71330476
2
Plots a distribution as a bar graph. Given a distribution, plots a bar graph. Each bar is an element in the distribution, and its value is the element's probability.
def plot_dist(types, color='b', labels=None, bottom=0): offset = 0 width = 0.01 if labels == None: labels = range(len(types)) for type in types: bar(offset, type, width, bottom, color=color) offset += width xticks(np.arange(width / 2, width * len(types), .01), labels)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bar_plot(seed, node_list, count):\n\n # Plot a the figure number 2\n plt.figure(2, figsize=(14, 14), dpi=80)\n # Put all colors in a list\n all_colors = list(plt.cm.colors.cnames.keys())\n\n color_list = []\n # For each node select a random color in the color list and put it in a list of colo...
[ "0.7011719", "0.68404543", "0.6731194", "0.67013913", "0.6591898", "0.6589037", "0.6559891", "0.65171975", "0.65157646", "0.6504573", "0.64428306", "0.63401145", "0.6327261", "0.63131106", "0.6287873", "0.6282978", "0.62766796", "0.6259058", "0.6258457", "0.6254589", "0.62418...
0.5657716
96
Create and save a User with the given email and password.
def _create_user(self, email, password, fullname, **extra_fields): if not email: raise ValueError('Users must have an email address') email = self.normalize_email(email) user = self.model( email=email, fullname=fullname, **ext...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _create_user(self, email, password, **extra_fields):\n if not email:\n raise ValueError('The given email must be set')\n email = self.normalize_email(email)\n user = self.model(email=email, **extra_fields)\n user.set_password(password)\n user.save(using=self._db)\n return user", "def...
[ "0.8545239", "0.85126233", "0.8508934", "0.85035056", "0.8503207", "0.8490302", "0.8490302", "0.84895617", "0.84895617", "0.84895617", "0.84866524", "0.84778446", "0.8476501", "0.84760785", "0.84760785", "0.84760785", "0.84760785", "0.84760785", "0.84760785", "0.84760785", "0...
0.0
-1
Return recipe detail url
def detail_url(recipe_id): return reverse('recipe:recipe-detail', args=[recipe_id])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_detail_URL(recipe_id):\n return reverse('recipeapp:recipe-detail', args=[recipe_id])", "def detail_url(recipe_id):\n return reverse('recipe:recipe-detail',args=[recipe_id])", "def recipe_detail_url(recipe_id):\n return reverse('recipes:recipe-detail', args=[recipe_id])", "def detail_url(reci...
[ "0.85386336", "0.85175234", "0.84858227", "0.8466619", "0.7962691", "0.79424065", "0.72023", "0.6733893", "0.66201544", "0.66163296", "0.65666264", "0.65615374", "0.65453696", "0.6516477", "0.65069574", "0.6500082", "0.64466596", "0.6443456", "0.64333117", "0.6418631", "0.639...
0.85159665
3
Test retrieving a list of recipes
def test_retrieving_recipes(self): sample_recipe(user=self.user) sample_recipe(user=self.user) res = self.client.get(RECIPES_URL) recipes = Recipe.objects.all().order_by('-id') serializer = RecipeSerializer(recipes, many=True) self.assertEqual(res.status_code, status.H...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_recipe_information_bulk(self):\n pass", "def test_retrieve_recipes(self):\n sample_recipe(name=\"Avocado toast\")\n sample_recipe(name='Baklava')\n\n res = self.client.get(RECIPES_URL)\n\n recipes = Recipe.objects.all()\n serializer = RecipeSerializer(recipe...
[ "0.81033486", "0.79853475", "0.79804796", "0.79704607", "0.78925663", "0.78374314", "0.76769125", "0.767323", "0.74180543", "0.73952913", "0.73141986", "0.72933966", "0.7182399", "0.71717864", "0.7072997", "0.70101357", "0.6926858", "0.6895275", "0.689", "0.6882748", "0.68770...
0.7895004
4
Test retrieving recipes for user
def test_recipe_limited_to_user(self): user2 = get_user_model().objects.create_user( 'mail@mail2.com', 'password2' ) sample_recipe(user=user2) sample_recipe(user=self.user) res = self.client.get(RECIPES_URL) recipes = Recipe.objects.filter(user=se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_recipe_limited_to_user(self):\n user2 = get_user_model().objects.create_user(\n 'test@gmail.com',\n 'password3456',\n )\n sample_recipe(self.user)\n sample_recipe(user2)\n\n res = self.client.get(RECIPE_URL)\n\n recipes = Recipe.objects.filte...
[ "0.79962987", "0.78909904", "0.7686372", "0.76844823", "0.766791", "0.7650961", "0.7636704", "0.7540283", "0.7539435", "0.749229", "0.74120104", "0.7214055", "0.71653247", "0.7129724", "0.7051907", "0.69681185", "0.68797475", "0.6866076", "0.67936826", "0.672394", "0.670457",...
0.7819746
2
Test Creating a recipe with Ingredients
def test_creating_recipe_with_ingredients(self): ingredient1 = sample_ingredients(user=self.user, name='Prawns') ingredient2 = sample_ingredients(user=self.user, name='Garlic') payload = { 'title': 'Avocado lime cheesecake', 'time_minutes': 20, 'price': 500.0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_create_recipe_with_ingredients(self):\n\n payload = {\n 'name': 'Gnocchi',\n 'description': 'A detailed description of a yummy recipe!',\n 'ingredients': [\n {'name': 'Potatoes'},\n {'name': 'Flour'},\n {'name': 'Nutmeg'}...
[ "0.7435472", "0.7306502", "0.73014474", "0.72546405", "0.72504383", "0.72450966", "0.71308315", "0.70590734", "0.7017446", "0.6990571", "0.69603884", "0.68847513", "0.68638974", "0.6861624", "0.6839728", "0.6830482", "0.68147767", "0.6796431", "0.67788494", "0.6767727", "0.66...
0.8058879
0
Test Updating a recipe wih PATCH
def test_partial_update_recipe(self): recipe = sample_recipe(user=self.user) recipe.tags.add(sample_tags(user=self.user)) new_tag = sample_tags(user=self.user, name='Cabbage') payload = {'title': 'Salad', 'tags': [new_tag.id]} url = detail_url(recipe_id=recipe.id) self.c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_partial_update_recipe(self):\n recipe = sample_recipe()\n original_description = recipe.description\n payload = {'name': 'Panqueques con dulce de leche'}\n\n url = recipe_detail_url(recipe.id)\n res = self.client.patch(url, payload)\n\n recipe.refresh_from_db()\n\...
[ "0.79635304", "0.77334744", "0.76064444", "0.7596639", "0.7582088", "0.75529766", "0.75453115", "0.749836", "0.7494745", "0.7404295", "0.73764396", "0.73736304", "0.7263446", "0.70860815", "0.7060144", "0.703189", "0.7026684", "0.7026684", "0.7026684", "0.70013833", "0.697262...
0.75036746
7
Test Updating a Recipe with PUT
def test_full_update_recipe(self): recipe = sample_recipe(user=self.user) recipe.tags.add(sample_tags(user=self.user)) payload = { 'title': 'Jollof Spaghetti', 'time_minutes': 30, 'price': 5.00, 'currency': 'USD', } url = detail_url...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_full_update_recipe(self):\n recipe = sample_recipe()\n recipe.ingredients.create(name='Eggs')\n original_description = recipe.description\n\n payload = {\n 'name': 'Vegan gnocchi',\n 'ingredients': [{'name': 'Vegegg'}]\n }\n url = recipe_deta...
[ "0.8200113", "0.81581455", "0.80666184", "0.7990861", "0.7876192", "0.78545535", "0.7793649", "0.77829695", "0.7719755", "0.77065945", "0.76817685", "0.7676181", "0.7503309", "0.7501862", "0.74332076", "0.74304295", "0.73751813", "0.73424405", "0.73108435", "0.73088115", "0.7...
0.8113046
2
Tokenize incoming paragpraphs and questions in incoming datsets using provided tokenizer withing the processes of the provided multiprocessing pool
def _tokenize_data(train_dataset, dev_dataset, use_spacy, pool): tokenizer = SQuADDataTokenizer(use_spacy) tic = time.time() print('Train examples [{}] transformation started.'.format(len(train_dataset))) train_examples = list(tqdm.tqdm(tokenizer.run_async(pool, train_dataset), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _multiprocess_tokenize(self, num_workers: int):\n\n # While displaying progress bar through tqdm, specify total number of\n # sequences to tokenize, because tqdm won't know in case of pool.imap\n with mp.Pool(num_workers) as pool:\n print(f\"[{self._split}] Tokenizing questions....
[ "0.752821", "0.7522907", "0.6978738", "0.68086016", "0.62752366", "0.57433325", "0.5711743", "0.56495637", "0.55571073", "0.5535484", "0.55320907", "0.55145967", "0.55133253", "0.54781127", "0.5421294", "0.54107183", "0.54017127", "0.5399693", "0.5365439", "0.53506297", "0.53...
0.67569166
4
Default tokenization method that uses Spacy. Called only if not overridden by providing base_tokenizer to SQuADDataTokenizer.__init__
def _word_tokenize_spacy(sent): tokens = SQuADDataTokenizer._spacy_tokenizer(sent) return tokens
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def custom_tokenizer(self, nlp):\n # nlp.tokenizer = custom_tokenizer(nlp)\n return Tokenizer(\n nlp.vocab,\n prefix_search=regex.PREFIX_RE.search,\n suffix_search=regex.SUFFIX_RE.search,\n infix_finditer=regex.INFIX_RE.finditer,\n token_match=re...
[ "0.66095513", "0.6420098", "0.6417358", "0.641559", "0.63314205", "0.6327315", "0.60804147", "0.60193455", "0.59580755", "0.59226805", "0.5903216", "0.58203423", "0.57830936", "0.5780088", "0.5729757", "0.56663615", "0.5653834", "0.56291157", "0.5614867", "0.5585794", "0.5580...
0.5655807
16
Tokenization method that uses NLTK.
def _word_tokenize_nltk(sent): tokens = [] splitters = ('-', '\u2212', '\u2014', '\u2013', '/', '~', '"', '\'', '\u201C', '\u2019', '\u201D', '\u2018', '\u00B0') sample = sent.replace('\n', ' ').replace(u'\u000A', '').replace(u'\u00A0', '') temp_tokens = [token.repl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tokenize(sentence):\n return nltk.word_tokenize(sentence)", "def preprocess_sent(sent):\n #tokenized = word_tokenize(sent.lower())\n tokenizer = Tok()\n tokenized = tokenizer.tokenize(sent.lower())\n return tokenized", "def tokenize(text):\n \n #regular expression to avoid pucntuations...
[ "0.69791055", "0.6976752", "0.69643337", "0.69643337", "0.6929117", "0.68856335", "0.68723303", "0.68478847", "0.68289804", "0.68223864", "0.6819807", "0.6725499", "0.67234063", "0.67135733", "0.6692591", "0.6679258", "0.6676705", "0.6667132", "0.6651791", "0.66321486", "0.66...
0.0
-1
Create a list of tuples that contains tokens character inidices. By using this output it is possible to find characterbased indices of token start and end
def _get_token_spans(text, tokens): current = 0 spans = [] for token in tokens: current = text.find(token, current) if current < 0: print('Token {} cannot be found'.format(token)) raise Exception() spans.append((current, current...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_tokens(self):\n\t\treturn self.get_starttokens() + self.get_endtokens()", "def charIdx_to_tokenIdx(spans, ans_text, ans_start): \n # Convert answer 'char idxs' to 'token idxs' for one single record\n if ans_start != -999:\n ans_end = ans_start + len(ans_text) - 1 \n ...
[ "0.6924564", "0.67462957", "0.6734555", "0.66898674", "0.6655099", "0.66470623", "0.65974945", "0.6583948", "0.6540002", "0.6454151", "0.6446", "0.6389111", "0.6388628", "0.63437796", "0.6343732", "0.63313913", "0.6306694", "0.6298151", "0.6285726", "0.6262397", "0.62466955",...
0.59140086
51
Get example by index in the original list
def __getitem__(self, idx): return self._data[idx]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_from_list(self,list_,index):\r\n\r\n\r\n try:\r\n return list_[self._index_to_int(index)]\r\n except IndexError:\r\n self._index_error(list_,index)", "def __getitem__(self, index):\n\t\tassert(index in self.srcList + self.tgtList)\n\t\tif index in self.srcList:\n\t\t\t...
[ "0.6972344", "0.67426074", "0.66760504", "0.6660779", "0.64334595", "0.6415755", "0.63705075", "0.63438606", "0.63063115", "0.6299336", "0.6291812", "0.62533486", "0.6216637", "0.6203075", "0.61932534", "0.6191692", "0.6191692", "0.6182433", "0.61802197", "0.61801744", "0.616...
0.0
-1
Backpropagation of [{affinerelu} X (L1) affine] layers
def _AffRelu_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format(self.num...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backprop1_6(self, x, y):\r\n \r\n nabla_b = [np.zeros(b.shape) for b in self.biases]\r\n nabla_w = [np.zeros(w.shape) for w in self.weights]\r\n # feedforward\r\n activation = x\r\n activations = [x] # list to store all the activations, layer by layer\r\n zs = [...
[ "0.7334947", "0.7271408", "0.7087032", "0.70587635", "0.70463985", "0.70454603", "0.7044662", "0.69329476", "0.6903483", "0.6882318", "0.68813974", "0.68605685", "0.6860089", "0.6829408", "0.6806591", "0.6806393", "0.6797931", "0.6784202", "0.6776123", "0.6769274", "0.6764737...
0.6393368
90
Backpropagation of [{affineBatchnormrelu} X (L1) affine] layers
def _AffBatchRelu_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format(sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def affine_batchnorm_relu_forward(x, w, b, gamma, beta, bn_param):\n fc_out, fc_cache = affine_forward(x, w, b)\n norm_out, norm_cache = batchnorm_forward(fc_out, gamma, beta, bn_param)\n out, relu_cache = relu_forward(norm_out)\n cache = (fc_cache, norm_cache, relu_cache)\n return out, cache", "def affine_...
[ "0.6920229", "0.6886688", "0.68736726", "0.6730314", "0.6702237", "0.6667154", "0.665565", "0.665391", "0.6643063", "0.664079", "0.66239345", "0.66159266", "0.65999824", "0.65624213", "0.65503204", "0.65467316", "0.6546333", "0.654587", "0.6536962", "0.6521854", "0.65180135",...
0.6442974
28
Backpropagation of [{affineLayernormrelu} X (L1) affine] layers
def _AffLayerRelu_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format(sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backprop1_6(self, x, y):\r\n \r\n nabla_b = [np.zeros(b.shape) for b in self.biases]\r\n nabla_w = [np.zeros(w.shape) for w in self.weights]\r\n # feedforward\r\n activation = x\r\n activations = [x] # list to store all the activations, layer by layer\r\n zs = [...
[ "0.69142854", "0.6878209", "0.68589616", "0.6824361", "0.6824361", "0.6824361", "0.6824361", "0.6746486", "0.66870296", "0.6658566", "0.66440153", "0.66100353", "0.66100353", "0.66100353", "0.66100353", "0.65899754", "0.6588263", "0.6587529", "0.65645367", "0.6556511", "0.655...
0.6438123
31
Backpropagation of [{affinerelu} X (L1) affine] layers
def _AffReluDrop_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format(self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backprop1_6(self, x, y):\r\n \r\n nabla_b = [np.zeros(b.shape) for b in self.biases]\r\n nabla_w = [np.zeros(w.shape) for w in self.weights]\r\n # feedforward\r\n activation = x\r\n activations = [x] # list to store all the activations, layer by layer\r\n zs = [...
[ "0.73340297", "0.7270577", "0.7087228", "0.7058865", "0.70458573", "0.7045784", "0.70447105", "0.6933765", "0.6903025", "0.688203", "0.68805736", "0.68600017", "0.68591815", "0.68289584", "0.68074834", "0.6807095", "0.6797719", "0.6784449", "0.677648", "0.6769011", "0.6765209...
0.0
-1
Backpropagation of [{affineBatchnormrelu} X (L1) affine] layers
def _AffBatchReluDrop_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def affine_batchnorm_relu_forward(x, w, b, gamma, beta, bn_param):\n fc_out, fc_cache = affine_forward(x, w, b)\n norm_out, norm_cache = batchnorm_forward(fc_out, gamma, beta, bn_param)\n out, relu_cache = relu_forward(norm_out)\n cache = (fc_cache, norm_cache, relu_cache)\n return out, cache", "def affine_...
[ "0.69180644", "0.68846136", "0.68734074", "0.67301595", "0.6700155", "0.6664957", "0.66540027", "0.6651772", "0.6642744", "0.6638054", "0.6623889", "0.6614704", "0.6599634", "0.65607965", "0.65495235", "0.65462357", "0.6545814", "0.6543723", "0.65349954", "0.65204054", "0.651...
0.0
-1
Backpropagation of [{affineLayernormrelu} X (L1) affine] layers
def _AffLayerReluDrop_Backprop(self, dscores, cache): grads = {} loss = None #Last Softmax Layer ##Add L2 Regularization loss loss = 0.5 * self.reg * np.sum(self.params['W{0}'.format(self.num_layers)]**2) ##Calculate grads for last Affine dhid, grads['W{0}'.format...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def backprop1_6(self, x, y):\r\n \r\n nabla_b = [np.zeros(b.shape) for b in self.biases]\r\n nabla_w = [np.zeros(w.shape) for w in self.weights]\r\n # feedforward\r\n activation = x\r\n activations = [x] # list to store all the activations, layer by layer\r\n zs = [...
[ "0.6916064", "0.6876363", "0.6860976", "0.6822891", "0.6822891", "0.6822891", "0.6822891", "0.67481303", "0.66882914", "0.66600937", "0.6642598", "0.6608266", "0.6608266", "0.6608266", "0.6608266", "0.6589974", "0.65897703", "0.6588626", "0.65655214", "0.65549284", "0.6554016...
0.0
-1
Return the subject with that id, or `None` if not found.
def find_subject(subject_id: SubjectID) -> Optional[Subject]: subject = DbSubject.query.get(subject_id) if subject is None: return None return _db_entity_to_subject(subject)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def find_by_id(self, subject_id: str) -> any:\n pass", "def get_subject(self, idattr):\n return self.get_node('//Subject[@id=\"%s\"]' % idattr)", "def _subject_get(context, subject_id, session=None, force_show_deleted=False):\n _check_subject_id(subject_id)\n session = session or get_sessio...
[ "0.7567824", "0.7427449", "0.69236785", "0.66693205", "0.64604026", "0.6380868", "0.63477516", "0.62530357", "0.61870086", "0.6151596", "0.61167896", "0.60527897", "0.5951011", "0.5897312", "0.58863294", "0.5867446", "0.58573145", "0.5849579", "0.584935", "0.5794439", "0.5744...
0.83431035
0
Initialize this dataset class.
def __init__(self, opt): BaseDataset.__init__(self, opt) rgbdir = os.path.join(opt.dataroot, 'rgb_256') if opt.do_upsampling: rgbdir = os.path.join(opt.dataroot, 'rgb_512') uvdir = os.path.join(opt.dataroot, 'iuv') self.image_paths = sorted(make_dataset(rgbdir, opt.ma...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n self.__dataset = None", "def __init__(self, dataset):\n self._dataset = dataset", "def __init__(self, dataset: Dataset):\n self.dataset = dataset", "def __init__(self, config):\n logger.info(f\"{self.__class__.__name__}: Dataset initializing ...\")\n s...
[ "0.816631", "0.81641185", "0.8013762", "0.76137954", "0.7422038", "0.7393049", "0.7352237", "0.73437655", "0.7111143", "0.71019876", "0.7099074", "0.7096382", "0.70223516", "0.696418", "0.6961817", "0.6889772", "0.6879775", "0.68740934", "0.68599087", "0.68520594", "0.6842619...
0.0
-1
Return a data point and its metadata information.
def __getitem__(self, index): # Read the target image. image_path = self.image_paths[index] target_image = self.load_and_process_image(image_path) # Read the layer IUVs and convert to network inputs. people_layers = [self.load_and_process_iuv(self.iuv_paths[l - 1][index], index)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def point(self):\n return self.x, self.y, self.z", "def to_data(self):\n point = {\n 'point': [self.pt[0], self.pt[1], self.pt[2]],\n 'layer_height': self.layer_height,\n\n 'mesh_normal': self.mesh_normal.to_data(),\n 'up_vector': self.up_vector.to_data()...
[ "0.6607296", "0.6599758", "0.65745145", "0.6535129", "0.65202826", "0.63402396", "0.6291092", "0.6291092", "0.61568433", "0.61515397", "0.6138252", "0.6133588", "0.6116883", "0.60677505", "0.6049698", "0.60260797", "0.5992455", "0.59917825", "0.59876746", "0.59777427", "0.596...
0.0
-1
Return data for background layer at 'index'.
def get_background_inputs(self, index, w, h): uv = self.get_background_uv(index, w, h) # normalize to correct range, of full texture atlas uv[0] /= self.opt.n_textures uv = uv * 2 - 1 # [0,1] -> [-1,1] uv = torch.clamp(uv, -1, 1) mask = -torch.ones(*uv.shape[1:]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __getitem__(self, index):\n # Generate indexes of the batch\n indexes = self.indexes[index*self.batch_size:(index+1)*self.batch_size]\n\n # Find list of dirs\n image_mask_dirs = [(self.images_fps[k], self.masks_fps[k]) for k in indexes]\n\n # Generate data\n return sel...
[ "0.6195252", "0.6064508", "0.60579544", "0.5930999", "0.58945185", "0.5891219", "0.5796596", "0.5789899", "0.57834405", "0.5763333", "0.5757943", "0.57095826", "0.5695302", "0.5671208", "0.5665044", "0.5662884", "0.56491274", "0.5649056", "0.5632678", "0.5630101", "0.55944407...
0.58162284
6
Return background layer UVs at 'index' (output range [0, 1]).
def get_background_uv(self, index, w, h): ramp_u = torch.linspace(0, 1, steps=w).unsqueeze(0).repeat(h, 1) ramp_v = torch.linspace(0, 1, steps=h).unsqueeze(-1).repeat(1, w) ramp = torch.stack([ramp_u, ramp_v], 0) if hasattr(self, 'homographies'): # scale to [0, orig width/hei...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_background_inputs(self, index, w, h):\n uv = self.get_background_uv(index, w, h)\n # normalize to correct range, of full texture atlas\n uv[0] /= self.opt.n_textures\n uv = uv * 2 - 1 # [0,1] -> [-1,1]\n uv = torch.clamp(uv, -1, 1)\n\n mask = -torch.ones(*uv.shape...
[ "0.66819304", "0.59625036", "0.56188124", "0.5587817", "0.5566034", "0.5448151", "0.5296764", "0.52550274", "0.52393156", "0.52147776", "0.51499367", "0.5134664", "0.51122403", "0.5064289", "0.5061784", "0.5048141", "0.5022437", "0.5021725", "0.50198066", "0.50198066", "0.501...
0.63253844
1
Determines the color by comparing the given score to the overall avg score. If the score is lower than 5% of the avg score we return red, 5% higher green else yellow
def determine_color(score=be.df["score"].mean()): avg_score = int(round(be.df["score"].mean(), 0)) if score < avg_score * 0.95: return "red" elif score > avg_score * 1.05: return "green" else: return "yellow"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_score(self, red_score, blue_score):\n if red_score < blue_score:\n return 0\n elif red_score > blue_score:\n return 1\n else:\n return 0.5", "def evaluate_score(self, color: int) -> float:\n # We want to judge how good the board is for color\n ...
[ "0.73206854", "0.7182423", "0.70368475", "0.68882424", "0.6273562", "0.61950713", "0.6188213", "0.6164787", "0.6149692", "0.61416227", "0.6112432", "0.61113834", "0.60182965", "0.59457064", "0.5880278", "0.5815145", "0.58025086", "0.57769483", "0.5766813", "0.5740006", "0.566...
0.8818103
0
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterID2ID2
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterID2ID2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageFilterIF2IUS2 *\":\n return _itkScalarImageKmeansImageFilterPython.itkScalarImageKmeansImageFilterIF2IUS2_cast(obj)", "def itkScalarImageKmeansImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageFilterIF2IUS2 *\":\n ...
[ "0.73674166", "0.7351846", "0.7338906", "0.73352176", "0.72968054", "0.72395796", "0.7187338", "0.7174629", "0.71680075", "0.7156923", "0.71447515", "0.7133062", "0.7123325", "0.7122951", "0.7122257", "0.7117528", "0.71120644", "0.70982015", "0.7096677", "0.70798934", "0.7079...
0.6935093
35
New() > itkContourDirectedMeanDistanceImageFilterID2ID2 Create a new object of the class itkContourDirectedMeanDistanceImageFilterID2ID2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects ...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterID2ID2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF2IF2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL2IUL2.__New_orig__()\n ...
[ "0.7843004", "0.756608", "0.7402692", "0.73556745", "0.7154007", "0.7030864", "0.70169413", "0.7006551", "0.69577754", "0.6866225", "0.68452936", "0.6832932", "0.6818293", "0.6765758", "0.6764642", "0.6760551", "0.6734477", "0.67323494", "0.67202073", "0.66947323", "0.6688645...
0.81049377
0
itkContourDirectedMeanDistanceImageFilterID2ID2_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterID2ID2
def itkContourDirectedMeanDistanceImageFilterID2ID2_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterID2ID2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(*args):\n return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(*args)", "def itkBinaryContourImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF2IF2 *\":\n return _itk...
[ "0.80967426", "0.7804836", "0.77632034", "0.7734208", "0.77262133", "0.7716987", "0.771046", "0.7647265", "0.76357824", "0.7613571", "0.7582488", "0.75505304", "0.7491089", "0.7489547", "0.74883884", "0.74860555", "0.74827206", "0.7481732", "0.74675155", "0.74426335", "0.7429...
0.8093452
1
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterID3ID3
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterID3ID3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIF3IF3_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryC...
[ "0.75042593", "0.7456921", "0.7432028", "0.74226487", "0.7372879", "0.7358228", "0.732901", "0.73281753", "0.7318115", "0.7306239", "0.72364134", "0.72214425", "0.7218832", "0.72124296", "0.7211523", "0.7206354", "0.7204585", "0.72021884", "0.71923774", "0.7145507", "0.714169...
0.6991114
40
New() > itkContourDirectedMeanDistanceImageFilterID3ID3 Create a new object of the class itkContourDirectedMeanDistanceImageFilterID3ID3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects ...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterID3ID3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL3IUL3.__New_orig__()\n ...
[ "0.79375315", "0.7673494", "0.75286025", "0.752816", "0.7331138", "0.724037", "0.7032968", "0.69922364", "0.6966364", "0.6966246", "0.6947546", "0.69342375", "0.6912044", "0.6908972", "0.6897235", "0.6892714", "0.6882021", "0.6877882", "0.68740153", "0.6853126", "0.68454045",...
0.8115161
0
itkContourDirectedMeanDistanceImageFilterID3ID3_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterID3ID3
def itkContourDirectedMeanDistanceImageFilterID3ID3_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterID3ID3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(*args):\n return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(*args)", "def itkBinaryContourImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itk...
[ "0.81513554", "0.7968449", "0.7936146", "0.7877049", "0.7855863", "0.7830745", "0.7825602", "0.7814971", "0.7782484", "0.7759748", "0.7741985", "0.7729245", "0.77120477", "0.7690271", "0.7689016", "0.7679357", "0.76681715", "0.76569355", "0.7630017", "0.7624548", "0.76226825"...
0.8150968
1
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIF2IF2
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF2IF2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIF2IF2_cast(obj)", "def itkBinaryContourImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF2IF2 *\":\n return _itkBinaryContour...
[ "0.74058515", "0.73848563", "0.7293874", "0.72272915", "0.7207768", "0.7159681", "0.71328306", "0.71022934", "0.70993924", "0.70806617", "0.7062649", "0.70589703", "0.7046632", "0.7043143", "0.70243144", "0.7001023", "0.69721043", "0.6952872", "0.69499385", "0.69376725", "0.6...
0.6843175
25
New() > itkContourDirectedMeanDistanceImageFilterIF2IF2 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIF2IF2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects ...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIF2IF2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterID2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL2IUL2.__New_orig__()\n ...
[ "0.7898657", "0.7603035", "0.744693", "0.7391862", "0.71861124", "0.7174739", "0.6974345", "0.6946808", "0.6891785", "0.6829103", "0.6796211", "0.6793514", "0.6778187", "0.6762796", "0.67392933", "0.6736228", "0.6719841", "0.67074805", "0.66961586", "0.6684782", "0.66788906",...
0.8045272
0
itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIF2IF2
def itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF2IF2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIF2IF2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF2IF2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIF2IF2_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF2IF2 *\":\n return _itkBinaryContour...
[ "0.798397", "0.7873469", "0.7696058", "0.7654771", "0.7643927", "0.76381177", "0.7638021", "0.75938123", "0.7569999", "0.75438416", "0.7532916", "0.75188726", "0.7489935", "0.74866295", "0.7474094", "0.747117", "0.7456541", "0.7442782", "0.74300086", "0.74122995", "0.7346516"...
0.8176946
0
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIF3IF3
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIF3IF3_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContour...
[ "0.7567067", "0.7561154", "0.73804915", "0.73672324", "0.7350426", "0.7329044", "0.7287003", "0.7285743", "0.7234177", "0.71839535", "0.71823186", "0.7181908", "0.70700216", "0.705795", "0.70577276", "0.70501465", "0.7024701", "0.7015903", "0.69927806", "0.6988092", "0.697785...
0.69289136
31
New() > itkContourDirectedMeanDistanceImageFilterIF3IF3 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIF3IF3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new objects ...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIF3IF3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterID3ID3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL3IUL3.__New_orig__()\n ...
[ "0.7858061", "0.7666886", "0.7607762", "0.74680775", "0.72022825", "0.71239245", "0.7109208", "0.7076101", "0.70640457", "0.7002779", "0.69947785", "0.69742274", "0.6950929", "0.69335043", "0.6910761", "0.690362", "0.6892751", "0.6872522", "0.6848104", "0.6842803", "0.6832511...
0.810081
0
itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIF3IF3
def itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIF3IF3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIF3IF3_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContour...
[ "0.8185553", "0.80060333", "0.7893559", "0.78755987", "0.78642595", "0.78136146", "0.77839816", "0.77742743", "0.77264154", "0.77184844", "0.7716225", "0.77137226", "0.77114695", "0.7662429", "0.76083547", "0.759521", "0.75762504", "0.75756323", "0.75360096", "0.74835885", "0...
0.8239398
0
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUC2IUC2
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUC2IUC2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC2IUC2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUC2IUC2_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC2IUC2 *\":\n return _itkBinar...
[ "0.7554362", "0.75298023", "0.7425578", "0.740174", "0.738046", "0.735931", "0.73576486", "0.7338061", "0.73374945", "0.7335499", "0.73229814", "0.7283505", "0.7272276", "0.7260192", "0.7255266", "0.7254314", "0.72486794", "0.724112", "0.72351396", "0.7233202", "0.72119856", ...
0.68183833
76
New() > itkContourDirectedMeanDistanceImageFilterIUC2IUC2 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUC2IUC2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUC2IUC2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkBinaryContourImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkScalarConnectedComponentImageFilterIUC2IUC2.__New_orig__()\n import itkTemp...
[ "0.763724", "0.7625183", "0.7603956", "0.75702506", "0.7459984", "0.7416266", "0.738168", "0.7298644", "0.7295903", "0.7271402", "0.72652805", "0.7263077", "0.7261553", "0.72146136", "0.7208914", "0.7194359", "0.71865493", "0.71328866", "0.71228063", "0.71019286", "0.7087679"...
0.8027081
0
itkContourDirectedMeanDistanceImageFilterIUC2IUC2_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUC2IUC2
def itkContourDirectedMeanDistanceImageFilterIUC2IUC2_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUC2IUC2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC2IUC2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUC2IUC2_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC2IUC2 *\":\n return _itkBinar...
[ "0.84209675", "0.8175403", "0.8115857", "0.79957455", "0.7980428", "0.79779524", "0.7965647", "0.7950908", "0.7931126", "0.7927591", "0.7855896", "0.78324246", "0.7821177", "0.77841216", "0.7780016", "0.77788526", "0.7774436", "0.7773744", "0.77689654", "0.77609766", "0.77574...
0.8118097
2
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUC3IUC3
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUC3IUC3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC3IUC3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUC3IUC3_cast(obj)", "def itkBinaryContourImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC3IUC3 *\":\n return _itkBinar...
[ "0.76616293", "0.7651305", "0.757189", "0.750734", "0.7492525", "0.74776787", "0.7403006", "0.7363625", "0.7345154", "0.7336349", "0.7333209", "0.7329005", "0.72901475", "0.7287172", "0.7246503", "0.72447276", "0.7243622", "0.7229772", "0.72085583", "0.7199715", "0.719857", ...
0.68851405
98
New() > itkContourDirectedMeanDistanceImageFilterIUC3IUC3 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUC3IUC3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUC3IUC3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkScalarConnectedComponentImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL3IUL3.__New_orig__()\n ...
[ "0.7716074", "0.7714875", "0.7673995", "0.7644272", "0.762125", "0.75526905", "0.7501168", "0.7483528", "0.74691373", "0.7449738", "0.7445074", "0.7432448", "0.7423367", "0.7402458", "0.7402444", "0.73679125", "0.73436004", "0.73074394", "0.7303663", "0.72715324", "0.72533435...
0.8112241
0
itkContourDirectedMeanDistanceImageFilterIUC3IUC3_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUC3IUC3
def itkContourDirectedMeanDistanceImageFilterIUC3IUC3_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUC3IUC3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC3IUC3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUC3IUC3_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC3IUC3 *\":\n return _itkBinar...
[ "0.8470785", "0.81799656", "0.81504047", "0.8118851", "0.80922055", "0.7978578", "0.79428077", "0.79388934", "0.7934837", "0.79325336", "0.78800255", "0.7861533", "0.7837299", "0.78350854", "0.78342533", "0.7815876", "0.7802271", "0.77933484", "0.7762652", "0.7753984", "0.775...
0.81590223
2
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUL2IUL2
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUL2IUL2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS2IUS2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS2IUS2_cast(obj)", "def itkScalarImageKmeansImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageFilterIF2IUS2 *\":\n return _it...
[ "0.72141075", "0.7190717", "0.7174283", "0.71705574", "0.7150024", "0.71442217", "0.71055937", "0.7104549", "0.70609486", "0.70542365", "0.705046", "0.70409197", "0.7037919", "0.6994975", "0.6985765", "0.6979306", "0.697704", "0.6975679", "0.6971775", "0.6962148", "0.6957118"...
0.65801305
90
New() > itkContourDirectedMeanDistanceImageFilterIUL2IUL2 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUL2IUL2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUL2IUL2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF2IF2.__New_orig__()\n ...
[ "0.7760888", "0.7654121", "0.7619023", "0.75020546", "0.7321353", "0.7211317", "0.7048642", "0.7025519", "0.6995508", "0.6973538", "0.69637626", "0.6937987", "0.69191056", "0.69089687", "0.6899606", "0.6843733", "0.68198794", "0.6815485", "0.6813386", "0.68107796", "0.6803489...
0.79598725
0
itkContourDirectedMeanDistanceImageFilterIUL2IUL2_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUL2IUL2
def itkContourDirectedMeanDistanceImageFilterIUL2IUL2_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUL2IUL2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS2IUS2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS2IUS2_cast(obj)", "def itkBinaryContourImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUC...
[ "0.77278143", "0.77258086", "0.76212794", "0.7613304", "0.7600908", "0.7591797", "0.75739473", "0.75459176", "0.7544008", "0.7532522", "0.7528624", "0.7504338", "0.7490267", "0.7477176", "0.74719256", "0.74348164", "0.74257606", "0.7423064", "0.74183756", "0.7415771", "0.7414...
0.7901712
0
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUL3IUL3
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUL3IUL3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS3IUS3_cast(obj)", "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF3 *\":\n return _itkBinaryContourImageFilterPython.itkBinar...
[ "0.7438358", "0.7402471", "0.7359004", "0.733848", "0.7325399", "0.73080325", "0.72257864", "0.72163546", "0.71542394", "0.7146743", "0.713746", "0.71210915", "0.7120498", "0.7080351", "0.70749223", "0.7062798", "0.70624554", "0.70501506", "0.70469505", "0.7044809", "0.703213...
0.0
-1
New() > itkContourDirectedMeanDistanceImageFilterIUL3IUL3 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUL3IUL3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUL3IUL3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUC3IUC3.__New_orig__()\n ...
[ "0.7906613", "0.787673", "0.77839", "0.76731753", "0.7353198", "0.72324693", "0.712594", "0.71114427", "0.7107954", "0.7039034", "0.7029687", "0.702636", "0.7021291", "0.7019491", "0.7012508", "0.7011074", "0.7002512", "0.6982648", "0.69776314", "0.69726455", "0.69633895", ...
0.8033835
0
itkContourDirectedMeanDistanceImageFilterIUL3IUL3_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUL3IUL3
def itkContourDirectedMeanDistanceImageFilterIUL3IUL3_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUL3IUL3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS3IUS3_cast(obj)", "def itkBinaryContourImageFilterIF3IF3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIF3IF...
[ "0.7958093", "0.79443645", "0.7942779", "0.7809377", "0.7804755", "0.7784085", "0.77627593", "0.7752108", "0.77360326", "0.7644376", "0.7615933", "0.76028335", "0.75992763", "0.7576208", "0.7576169", "0.75686294", "0.7556564", "0.75548893", "0.75407183", "0.75308305", "0.7525...
0.7985443
0
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUS2IUS2
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUS2IUS2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS2IUS2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS2IUS2_cast(obj)", "def itkScalarImageKmeansImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageFilterIF2IUS2 *\":\n return _it...
[ "0.75840646", "0.7566823", "0.7529528", "0.7518513", "0.7514658", "0.7435452", "0.73319304", "0.73128134", "0.724339", "0.72267973", "0.7195973", "0.7192092", "0.7178485", "0.7165474", "0.7157971", "0.7151845", "0.7097325", "0.7073733", "0.70350134", "0.70341873", "0.7033676"...
0.67073816
46
New() > itkContourDirectedMeanDistanceImageFilterIUS2IUS2 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUS2IUS2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUS2IUS2.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterID2ID2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF2IF2.__New_orig__()\n i...
[ "0.7742995", "0.77114195", "0.76828545", "0.75612867", "0.733799", "0.7330411", "0.7283008", "0.7207773", "0.7207414", "0.7168091", "0.7032139", "0.70306367", "0.6918694", "0.6897295", "0.68907946", "0.6828203", "0.67991626", "0.6782685", "0.67650133", "0.6714279", "0.6710453...
0.81027746
0
itkContourDirectedMeanDistanceImageFilterIUS2IUS2_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUS2IUS2
def itkContourDirectedMeanDistanceImageFilterIUS2IUS2_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUS2IUS2_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUS2IUS2_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS2IUS2 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS2IUS2_cast(obj)", "def itkScalarImageKmeansImageFilterIF2IUS2_cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageFi...
[ "0.8182697", "0.8094649", "0.8080188", "0.8067173", "0.79298574", "0.7909698", "0.7859259", "0.78128695", "0.77657104", "0.77339095", "0.7673264", "0.76680887", "0.76636714", "0.7657574", "0.75977725", "0.7580709", "0.75787973", "0.75738186", "0.75495976", "0.7540116", "0.751...
0.7989599
4
cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUS3IUS3
def cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUS3IUS3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS3IUS3_cast(obj)", "def itkBinaryContourImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinar...
[ "0.75963145", "0.75140136", "0.7390372", "0.737128", "0.73050004", "0.7284721", "0.72727406", "0.72542286", "0.725286", "0.72492874", "0.7240719", "0.72146213", "0.71989334", "0.7160091", "0.71561474", "0.7143116", "0.71414226", "0.713678", "0.7117377", "0.70833546", "0.70761...
0.69355744
37
New() > itkContourDirectedMeanDistanceImageFilterIUS3IUS3 Create a new object of the class itkContourDirectedMeanDistanceImageFilterIUS3IUS3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new obje...
def New(*args, **kargs): obj = itkContourDirectedMeanDistanceImageFilterIUS3IUS3.__New_orig__() import itkTemplate itkTemplate.New(obj, *args, **kargs) return obj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj", "def New(*args, **kargs):\n obj = itkContourDirectedMeanDistanceImageFilterIUL3IUL3.__New_orig__()\n ...
[ "0.78955114", "0.78246856", "0.78195554", "0.7736221", "0.73703015", "0.73467124", "0.72994477", "0.727629", "0.7252874", "0.7215812", "0.7189422", "0.71561843", "0.7106852", "0.7089567", "0.69754153", "0.69424033", "0.6863734", "0.6851019", "0.6822753", "0.6809343", "0.67956...
0.8152182
0
itkContourDirectedMeanDistanceImageFilterIUS3IUS3_cast(itkLightObject obj) > itkContourDirectedMeanDistanceImageFilterIUS3IUS3
def itkContourDirectedMeanDistanceImageFilterIUS3IUS3_cast(*args): return _itkContourDirectedMeanDistanceImageFilterPython.itkContourDirectedMeanDistanceImageFilterIUS3IUS3_cast(*args)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def itkBinaryContourImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkBinaryContourImageFilterIUS3IUS3 *\":\n return _itkBinaryContourImageFilterPython.itkBinaryContourImageFilterIUS3IUS3_cast(obj)", "def itkScalarImageKmeansImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkScalarImageKmeansImageF...
[ "0.81320643", "0.79691285", "0.795807", "0.7931418", "0.79287326", "0.78995854", "0.78576577", "0.7784631", "0.77792966", "0.7774936", "0.77270806", "0.7720119", "0.7678453", "0.7671758", "0.7652967", "0.76422274", "0.76055104", "0.75550747", "0.75521165", "0.7545439", "0.753...
0.8147714
0
Estimate the quaternions given all data. Attributes ``acc`` and ``mag`` must contain data. It is assumed that these attributes have the same shape (M, 3), where M is the number of observations. The full estimation is vectorized, to avoid the use of a timewasting loop.
def _compute_all(self, acc: np.ndarray, mag: np.ndarray) -> np.ndarray: _assert_numerical_iterable(acc, 'Gravitational acceleration vector') _assert_numerical_iterable(mag, 'Geomagnetic field vector') acc, mag = np.copy(acc), np.copy(mag) self._assert_observations(acc, mag) if ac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def updateMARG(self, q: np.ndarray, gyr: np.ndarray, acc: np.ndarray, mag: np.ndarray, dt: float = None) -> np.ndarray:\n _assert_numerical_iterable(q, 'Quaternion')\n _assert_numerical_iterable(gyr, 'Tri-axial gyroscope sample')\n _assert_numerical_iterable(acc, 'Tri-axial accelerometer sampl...
[ "0.6728746", "0.58889836", "0.5806711", "0.5755074", "0.56899434", "0.5558311", "0.5509878", "0.5476582", "0.5447906", "0.53611404", "0.5354155", "0.5311137", "0.52955765", "0.52711564", "0.5245638", "0.5242394", "0.5230899", "0.5223255", "0.5208487", "0.5198637", "0.5185356"...
0.678242
0
Iterator for 'preceding' reverse axis.
def iter_preceding(self) -> Iterator[Union[DocumentNode, ChildNodeType]]: ancestors: Set[Union[ElementNode, DocumentNode]] item: XPathNode parent: Union[None, ElementNode, DocumentNode] if not isinstance(self.item, XPathNode) or self.item is self.root: return parent...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __backward(self):\n if self.is_empty():\n raise StopIteration\n\n current = self._tail\n yield current._data\n while current._previ:\n current = current._previ\n yield current._data", "def __traverse_backward(self):\n work = list(reversed(se...
[ "0.7015542", "0.6807303", "0.6705238", "0.65672857", "0.63479286", "0.63256276", "0.6314614", "0.6274104", "0.62299", "0.61679757", "0.61580646", "0.5828633", "0.58162844", "0.5811279", "0.5716449", "0.5715321", "0.56955665", "0.56897795", "0.56768084", "0.56554836", "0.56390...
0.0
-1
Get the column of given 'binary' code of a seat
def get_seat_column(bin_code_column): return decode_seat(bin_code_column, LIST_OF_SEAT_COLUMNS)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_seat_row(bin_code_row):\n return decode_seat(bin_code_row, LIST_OF_SEAT_ROWS)", "def find_seat(seat_string):\n\n row = int(''.join([{'F':'0', 'B':'1'}[r] for r in seat_string[:7]]),2)\n col = int(''.join([{'L':'0', 'R':'1'}[c] for c in seat_string[7:]]),2)\n\n return row * 8 + col", "def _g...
[ "0.6274126", "0.6264334", "0.6118332", "0.6114061", "0.6078279", "0.606296", "0.6029328", "0.60117054", "0.5996006", "0.5992672", "0.5865324", "0.58276385", "0.57577515", "0.57577515", "0.5644514", "0.5610883", "0.5602843", "0.55969924", "0.558438", "0.55838585", "0.55823344"...
0.7714665
0
Retourne True uniquement si le choix de j1 est gagnant
def bat(j1, j2): return (j1 == CISEAUX and j2 == FEUILLE) or\ (j1 == FEUILLE and j2 == PIERRE) or\ (j1 == PIERRE and j2 == CISEAUX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ganhou():\n global JOGADOR\n return ((TAB[6] == JOGADOR and TAB[7] == JOGADOR and TAB[8] == JOGADOR) or # Linha horizontal baixa\n (TAB[3] == JOGADOR and TAB[4] == JOGADOR and TAB[5] == JOGADOR) or # Linha horizontal meio\n (TAB[0] == JOGADOR and TAB[1] == JOGADOR and TAB[2] == JOGADOR) or # Linha ...
[ "0.6558021", "0.6252049", "0.6025789", "0.59513074", "0.592444", "0.5910446", "0.5674706", "0.5622175", "0.55981344", "0.5584316", "0.5567837", "0.55442405", "0.55317956", "0.55119586", "0.55018044", "0.5489085", "0.5444039", "0.5392327", "0.5330774", "0.5313561", "0.5308084"...
0.5843973
6
Test posting a movie with missing attribute
def test_post_movie_422(self): res = self.client().post('/movies/create', json=partial_movie, headers=executive_producer) data = json.loads(res.data) self.assertEqual(res.status_code, 422) self.assertFalse(data["success"]) self.assertEqual(data["message"], "unprocessable e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_post_movie_without_data(self):\n\n r = self.client.post(reverse('movieapi:movies'))\n self.assertJSONEqual(\n r.content,\n '{\"error\": \"Please provide a movie title\"}'\n )\n self.assertEqual(r.status_code, 400)", "def test_post_movie_not_exist_in_api(...
[ "0.74751407", "0.7123864", "0.66013867", "0.6567335", "0.6564916", "0.6517094", "0.64931697", "0.6488122", "0.64372236", "0.63580114", "0.6328547", "0.6153686", "0.6151862", "0.60637355", "0.60537314", "0.6038477", "0.6021266", "0.599391", "0.5970064", "0.59567696", "0.595676...
0.63812464
9
Test updating a movie with invalid movie_id
def test_patch_movie_400(self): res = self.client().patch('/movies/8080', json=partial_movie, headers=executive_producer) data = json.loads(res.data) self.assertEqual(res.status_code, 400) self.assertFalse(data["success"]) self.assertEqual(data["message"], "bad request")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_movies_422(self):\n movie_id = random.choice(Movie.query.all()).id\n\n res = self.client().patch(\n '/api/movies/' +\n str(movie_id),\n json={\n 'actors': [9000]})\n self.assertEqual(res.status_code, 422)", "def test_update_movi...
[ "0.77966297", "0.74376774", "0.72990113", "0.72534543", "0.72030693", "0.69962466", "0.69245017", "0.6918135", "0.69062406", "0.6887905", "0.68473387", "0.6781219", "0.6748699", "0.66799265", "0.66181916", "0.6573853", "0.6563159", "0.65386516", "0.6536929", "0.650865", "0.65...
0.6715393
13
Test getting movies with no valid JWT
def test_get_movies_401(self): res = self.client().get('/movies', headers=invalid_jwt) data = json.loads(res.data) self.assertEqual(res.status_code, 401) self.assertFalse(data["success"]) self.assertEqual(data["message"], "unauthorized")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_get_movies(self):\n # insert a movie so there is one to be found -- need executive producer\n # token\n res = self.client().post('/movies', headers={\n 'Authorization': \"Bearer {}\".format(self.executive_producer_token)\n }, json=self.VALID_NEW_MOVIE)\n # fin...
[ "0.7447087", "0.7358927", "0.7212441", "0.7171832", "0.7141631", "0.689574", "0.6764278", "0.6715252", "0.67041296", "0.66976845", "0.66956675", "0.6695278", "0.6687508", "0.66839236", "0.6679206", "0.6665217", "0.6616281", "0.6610413", "0.66067994", "0.6606738", "0.6581153",...
0.8134267
0
Test that directors cannot delete actors
def test_post_movie_director_permissions_500(self): # director cannot post movies res = self.client().post('/actors/create', headers=casting_director) data = json.loads(res.data) self.assertEqual(res.status_code, 500) self.assertFalse(data["success"]) self.assertEqual(dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_actor(self):\n actor_to_delete = random.choice(Actor.query.all())\n movie_ids = [movie.id for movie in actor_to_delete.movies]\n\n res = self.client().delete('/api/actors/' + str(actor_to_delete.id))\n self.assertEqual(res.status_code, 200)\n self.assertFalse(Acto...
[ "0.6949381", "0.6796798", "0.6753998", "0.66932636", "0.66729873", "0.6631463", "0.6624856", "0.6540613", "0.65286344", "0.62909514", "0.61811686", "0.6174251", "0.61688906", "0.61398697", "0.61299014", "0.6108795", "0.61075544", "0.610616", "0.6095939", "0.60665315", "0.6053...
0.5600454
89
Test that directors cannot delete movies
def test_delete_movie_director_permissions_500(self): # director cannot delete movies res = self.client().delete('/movies/1/delete', headers=casting_director) data = json.loads(res.data) self.assertEqual(res.status_code, 500) self.assertFalse(data["success"]) self.assertE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_delete_movie(self):\n movie_to_delete = random.choice(Movie.query.all())\n actor_ids = [actor.id for actor in movie_to_delete.actors]\n\n res = self.client().delete('/api/movies/' + str(movie_to_delete.id))\n self.assertEqual(res.status_code, 200)\n self.assertFalse(Movi...
[ "0.7510972", "0.7325942", "0.7188534", "0.7134763", "0.6945958", "0.6834205", "0.6754946", "0.6622947", "0.6598177", "0.6533336", "0.64246756", "0.63846684", "0.6378317", "0.6341839", "0.63122326", "0.63037217", "0.6290093", "0.6279488", "0.6238325", "0.6227958", "0.6211404",...
0.7285737
2
Plot a 2by2 bar plot showing stay probability over common/uncommon and reward/unrewarded trials
def plot_stay_prob(ax, stay_prob): mean_stay_prob = np.mean(stay_prob, 2) std_stay_prob = sem(stay_prob, 2) # set width of bar bar_width = 0.25 # Set position of bar on X axis r1 = np.arange(2) r2 = [x + bar_width for x in r1] ax.bar(r1, mean_stay_prob[0, :], yerr=std_stay_prob[0, :], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def barPlot2():\n n = 10\n X = np.arange(n)\n Y1 = (1-X/float(n)) * np.random.uniform(0.5,1.0,n)\n plt.bar(X, +Y1, facecolor='#9999ff', edgecolor='white')\n\n for x,y in zip(X,Y1):\n plt.text(x+0.2, y+0.05, '%.2f' % y, ha='center', va= 'bottom')\n\n plt.ylim(0,1.25)\n plt.show()", "de...
[ "0.64407253", "0.6251317", "0.6234548", "0.6171434", "0.6086251", "0.6034449", "0.6021434", "0.59808666", "0.59795165", "0.5964505", "0.5899775", "0.5895341", "0.58613575", "0.585715", "0.5835357", "0.5810356", "0.5806737", "0.57959276", "0.57928246", "0.5769863", "0.5769501"...
0.72283053
0
Return the name of this camera.
def name(self): return self.ezvizService.name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n friendly_camera_name = self._cam_name.replace('_', ' ')\n return f\"{friendly_camera_name} {self._obj_name}\".title()", "def name(self) -> str:\n return self.camera_info[\"device_name\"]", "def name(self):\n return self._scene_name", "def name(self):\n\t\treturn ...
[ "0.86631787", "0.8536238", "0.7493173", "0.7183577", "0.71381986", "0.7096534", "0.70536137", "0.703101", "0.70261574", "0.70229435", "0.70229435", "0.70229435", "0.7022467", "0.7017471", "0.70168525", "0.70163584", "0.7012957", "0.7012957", "0.7012957", "0.7011892", "0.70003...
0.0
-1
Compute the learning rate and logs it onto TensorBoard. epoch Current training epoch lr Learning rate
def __call__(self, epoch): # Compute the new dynamic learning rate, log in onto TensorBoard and # return the result for the training process learning_rate = self.schedule(epoch) tf.summary.scalar('learning rate', data=learning_rate, step=epoch) return learning_rate
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def learning_rate(epoch):\n self.lr = self.lr / 1.00000001\n return self.lr", "def lr_schedule(epoch,lr):\r\n learning_rate = lr\r\n if epoch > 10:\r\n learning_rate *= 0.1\r\n if epoch > 20:\r\n learning_rate *= 0.1\r\n if epoch > 50:\r\n learning_rate *= 0.01\r\n\r\n # tf.su...
[ "0.8362742", "0.82161343", "0.7864036", "0.77985066", "0.77888143", "0.77888143", "0.7748441", "0.7721155", "0.77149504", "0.7691838", "0.7671356", "0.7671356", "0.7671356", "0.7671356", "0.767118", "0.75714815", "0.75418866", "0.75077695", "0.74212205", "0.7383739", "0.73634...
0.8450324
0
Plots the log magnitude spectrogram.
def plt_spectrogram(X,win_length, hop_size, sample_rate, zoom_x=None, zoom_y=None,tick_labels='time-freq'): # Find the size of stft Nf,Nt=np.shape(X) # Compute the log magnitude spectrogram X=20*np.log10(np.abs(X)) # Extract the first half of the spectrum for each time frame X=X[0:Nf/2] #...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def plotSpect(spec, sr):\r\n fig, ax = plt.subplots()\r\n img = librosa.display.specshow(spec, x_axis='time', y_axis='mel', sr=sr, fmax=8000, ax=ax) \r\n fig.colorbar(img, ax=ax, format='%+2.0f dB') \r\n ax.set(title='Mel-frequency spectrogram')", "def visualize_spectrogram(path, duration=None...
[ "0.7090428", "0.6706615", "0.66378623", "0.6470512", "0.6388558", "0.6377152", "0.6376956", "0.63124615", "0.63116235", "0.62854576", "0.61867267", "0.6179902", "0.61678827", "0.6142288", "0.612765", "0.60700125", "0.6069447", "0.6065949", "0.6059885", "0.60545707", "0.605155...
0.739484
0
Takes a ``list_of_data``, modifies each item, and returns the ``new_list`` with the modified items.
def bulk_transform(self, list_of_data): new_list = [] for item in list_of_data: new_list.append(self.transform(item)) return new_list
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mutate_list_2(lst):\r\n elem = lst[0]\r\n lst.remove(elem)\r\n lst.append(elem)\r\n return lst", "def list_copy(l: List[Any]) -> List[Any]:\n return [item for item in l]", "def list_replace(list_arg: list, old_value, new_value, *, replace_in_place: bool = True) -> list:\n ...
[ "0.6294112", "0.6258454", "0.62527627", "0.6039791", "0.60374975", "0.5956202", "0.5951183", "0.59296775", "0.5832488", "0.5777517", "0.5689803", "0.5658461", "0.5623545", "0.5616464", "0.5589565", "0.5562819", "0.5549579", "0.55494386", "0.5532686", "0.552917", "0.55036974",...
0.67663246
0
This view shows a list of all committees
def committee_list(request): committees = Committee.objects.all().order_by("name") context = {"committees": committees} template = "jurycore/committee_list.html" return render(request, template, context)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def committees(request):\n # Test Comment\n assert isinstance(request, HttpRequest)\n return render(\n request,\n 'committees.html',\n context_instance=RequestContext(request, {})\n )", "def printing_view(request):\n committees = Committee.objects.all().order_by(\"name\")\n\n ...
[ "0.76333547", "0.65912956", "0.5946952", "0.59253", "0.59035504", "0.58082765", "0.5773923", "0.5740203", "0.56641954", "0.55802155", "0.5553349", "0.55459726", "0.55418724", "0.5531402", "0.5501873", "0.549757", "0.54891056", "0.5486004", "0.5469453", "0.5429754", "0.5425322...
0.79200333
0
Initialize a TagService entry using the With the provided pymongo.MongoClient instance, the
def __init__(self, client, db_name=None, root_catalog=None): if db_name is None: db_name = 'tagging' self._db = client[db_name] self._collection_tagger_sets = self._db.tagger_sets self._collection_tagging_events = self._db.tagging_events self._collection_asset_tags = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, host=\"localhost\", port=27017):\n self._client = MongoClient(host, port)", "def __init__(self):\n client = MongoClient(\n settings.MONGODB_SERVER,\n settings.MONGODB_PORT\n )\n db = client[settings.MONGODB_DB]\n self.collection = db[set...
[ "0.588591", "0.5802813", "0.5719867", "0.5580699", "0.5557124", "0.55402184", "0.54991484", "0.54614645", "0.54338545", "0.5416778", "0.5399268", "0.53826374", "0.53452104", "0.5310407", "0.52960044", "0.5282134", "0.5267754", "0.52672094", "0.52433205", "0.52295285", "0.5179...
0.6616641
0
Enables to set the name
def setName(self, name): self.name = name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setName(self, name):\n self.name = str(name)", "def set_name(self, name):\n\t\tself.name_ = name", "def start_name(self, attributes):\n self.name = True", "def set_name(self,name):\r\n self._name = __name", "def set_name(self, newname=\"\"):\n self.name = newname", "def se...
[ "0.7974705", "0.7955243", "0.7899372", "0.7896583", "0.781945", "0.77876586", "0.7738481", "0.7738481", "0.7738481", "0.7738481", "0.7738481", "0.77306366", "0.77306366", "0.77253515", "0.7701839", "0.767422", "0.7668667", "0.7667246", "0.76339716", "0.76339716", "0.76339716"...
0.8032346
1
Gets the units of each column of the table.
def getColumnUnits(self): return self.columnUnits
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def units(self):\n return self._units", "def units(self):\n return self._units", "def units(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['OneDashboardPageWidgetTableUnitArgs']]]]:\n return pulumi.get(self, \"units\")", "def units(self):\n pass", "def unitsofmeasure(self)...
[ "0.6644529", "0.6644529", "0.6523472", "0.642767", "0.64029497", "0.63861024", "0.636235", "0.634903", "0.6300748", "0.6286739", "0.6274999", "0.6256934", "0.62519354", "0.62444204", "0.6230245", "0.62296057", "0.6215831", "0.6202672", "0.6198527", "0.61794335", "0.61701864",...
0.81721973
0
Calculate the cumulate table of the current table on the first
def cumulate(self): name = self.getName() + '_Cumulated' c_names = self.getColumnNames() # create the new table an add the first column to it t_cumulate = DataTable(name) time = self.getColumn(0) t_cumulate.addColumn(c_names[0],time) # for each other column, cumul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cummulative_return(df):\n cumm_daily_return=(df[-1]/df[0])-1\n \n return cumm_daily_return", "def cum_matrix(output_from_matrix_tabelle,AnzHist):\r\n import pandas as pd\r\n vert_5=output_from_matrix_tabelle\r\n #sum each matrix\r\n names=['0','1','2','3','4','5','6','7','8','9',\\\...
[ "0.6564712", "0.62195903", "0.6157976", "0.61527634", "0.60184646", "0.5869741", "0.5787355", "0.5739563", "0.5683697", "0.56524104", "0.56099373", "0.5600499", "0.55924433", "0.55915916", "0.55493265", "0.5497833", "0.5475756", "0.54300076", "0.54000247", "0.53975993", "0.53...
0.77919585
0
Converts created time to iso timestamp.
def __update_data_record(self, obj): if obj.content_type == 'None': return {'subdir': obj.get_name()} response = {'bytes': obj.get_size(), 'hash': obj.get_etag(), \ 'name': obj.get_name(), \ 'content_type': obj.content_type} last_modified = datet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def creation_time_str(self):\n return \"%Y/%m/%d %I:%M:%S\".format(self.creation_time)", "def format_time(self, created):\n return time.strftime(\n '%Y-%m-%d %H:%M:%S',\n time.localtime(created)\n )", "def created_time_utc(self) -> str:\n return pulumi.get(self...
[ "0.718391", "0.71804255", "0.71294135", "0.7013305", "0.69385296", "0.69292045", "0.6913846", "0.6867205", "0.6867205", "0.6867205", "0.68115276", "0.67945", "0.6793933", "0.67770404", "0.6764846", "0.6764846", "0.6764846", "0.6749774", "0.6749774", "0.67445153", "0.67445153"...
0.0
-1