id stringlengths 11 16 | language stringclasses 2
values | question stringlengths 13 844 | answer stringlengths 1 900 | code stringlengths 162 27.4k | code_original stringlengths 162 26k | code_word_count int64 51 5.96k |
|---|---|---|---|---|---|---|
python-test-4460 | python | How do 3 dimensions represent in a heatmap chart ? | using x | def Heat Map data x None y None values None stat 'count' xgrid False ygrid False hover tool True hover text None **kw kw['x'] xkw['y'] ykw['values'] valueskw['stat'] statchart create and build Heat Map Builder data xgrid xgrid ygrid ygrid **kw if hover tool tooltip build agg tooltip hover text hover text aggregated col... | def HeatMap data x None y None values None stat 'count' xgrid False ygrid False hover_tool True hover_text None **kw kw['x'] xkw['y'] ykw['values'] valueskw['stat'] statchart create_and_build HeatMapBuilder data xgrid xgrid ygrid ygrid **kw if hover_tool tooltip build_agg_tooltip hover_text hover_text aggregated_col va... | 63 |
python-test-4461 | python | What does the code get ? | the names and default values of a functions arguments return list | def getargtxt obj one arg per line True args getargs obj if args sep ' 'textlist Nonefor i arg arg in enumerate args if textlist is None textlist ['']textlist[ -1 ] + argif i arg < len args - 1 textlist[ -1 ] + sepif len textlist[ -1 ] > 32 or one arg per line textlist append '' if inspect isclass obj or inspect ismeth... | def getargtxt obj one_arg_per_line True args getargs obj if args sep ' 'textlist Nonefor i_arg arg in enumerate args if textlist is None textlist ['']textlist[ -1 ] + argif i_arg < len args - 1 textlist[ -1 ] + sepif len textlist[ -1 ] > 32 or one_arg_per_line textlist append '' if inspect isclass obj or inspect ismeth... | 85 |
python-test-4467 | python | What does the code restart ? | the current server configuration for the specified app | def restart app id restart False force True ret {'restarted' None}if not restart ret['restarted'] Falsereturn rettry response salt utils http query '{ 0 }/v 2 /apps/{ 1 }/restart?force {2 }' format base url app id id force method 'POST' decode type 'json' decode True header dict {' Content- Type' 'application/json' ' A... | def restart_app id restart False force True ret {'restarted' None}if not restart ret['restarted'] Falsereturn rettry response salt utils http query '{0}/v2/apps/{1}/restart?force {2}' format _base_url _app_id id force method 'POST' decode_type 'json' decode True header_dict {'Content-Type' 'application/json' 'Accept' '... | 78 |
python-test-4468 | python | What did the code set ? | the available pm sensors | def setup platform hass config add devices discovery info None from pmsensor import serial pm as pmtry coll pm PM Data Collector config get CONF SERIAL DEVICE pm SUPPORTED SENSORS[config get CONF BRAND ] except Key Error LOGGER error ' Brand%snotsupported\nsupportedbrands %s' config get CONF BRAND pm SUPPORTED SENSORS ... | def setup_platform hass config add_devices discovery_info None from pmsensor import serial_pm as pmtry coll pm PMDataCollector config get CONF_SERIAL_DEVICE pm SUPPORTED_SENSORS[config get CONF_BRAND ] except KeyError _LOGGER error 'Brand%snotsupported\nsupportedbrands %s' config get CONF_BRAND pm SUPPORTED_SENSORS key... | 105 |
python-test-4469 | python | What does the code detect ? | the number of cpus on a system | def num cpus if hasattr os 'sysconf' if 'SC NPROCESSORS ONLN' in os sysconf names ncpus os sysconf 'SC NPROCESSORS ONLN' if isinstance ncpus int and ncpus > 0 return ncpuselse return int read stdout ['sysctl' '-n' 'hw ncpu'] or 1 if 'NUMBER OF PROCESSORS' in os environ ncpus int os environ['NUMBER OF PROCESSORS'] if nc... | def num_cpus if hasattr os 'sysconf' if 'SC_NPROCESSORS_ONLN' in os sysconf_names ncpus os sysconf 'SC_NPROCESSORS_ONLN' if isinstance ncpus int and ncpus > 0 return ncpuselse return int _read_stdout ['sysctl' '-n' 'hw ncpu'] or 1 if 'NUMBER_OF_PROCESSORS' in os environ ncpus int os environ['NUMBER_OF_PROCESSORS'] if n... | 61 |
python-test-4470 | python | What does the code create ? | a url to hook into social auth endpoints | def get url view name backend name auth entry None redirect url None extra params None url params None url params url params or {} url params['backend'] backend nameurl reverse view name kwargs url params query params Ordered Dict if auth entry query params[AUTH ENTRY KEY] auth entryif redirect url query params[AUTH RE... | def _get_url view_name backend_name auth_entry None redirect_url None extra_params None url_params None url_params url_params or {} url_params['backend'] backend_nameurl reverse view_name kwargs url_params query_params OrderedDict if auth_entry query_params[AUTH_ENTRY_KEY] auth_entryif redirect_url query_params[AUTH_RE... | 73 |
python-test-4474 | python | How does information extract from the given dbms banner ? | based upon the data in xml file | def banner Parser banner xmlfile Noneif Backend is Dbms DBMS MSSQL xmlfile paths MSSQL XM Lelif Backend is Dbms DBMS MYSQL xmlfile paths MYSQL XM Lelif Backend is Dbms DBMS ORACLE xmlfile paths ORACLE XM Lelif Backend is Dbms DBMS PGSQL xmlfile paths PGSQL XM Lif not xmlfile returnif Backend is Dbms DBMS MSSQL handler ... | def bannerParser banner xmlfile Noneif Backend isDbms DBMS MSSQL xmlfile paths MSSQL_XMLelif Backend isDbms DBMS MYSQL xmlfile paths MYSQL_XMLelif Backend isDbms DBMS ORACLE xmlfile paths ORACLE_XMLelif Backend isDbms DBMS PGSQL xmlfile paths PGSQL_XMLif not xmlfile returnif Backend isDbms DBMS MSSQL handler MSSQLBanne... | 101 |
python-test-4475 | python | What does this function call a class ? | to extract information from the given dbms banner based upon the data in xml file | def banner Parser banner xmlfile Noneif Backend is Dbms DBMS MSSQL xmlfile paths MSSQL XM Lelif Backend is Dbms DBMS MYSQL xmlfile paths MYSQL XM Lelif Backend is Dbms DBMS ORACLE xmlfile paths ORACLE XM Lelif Backend is Dbms DBMS PGSQL xmlfile paths PGSQL XM Lif not xmlfile returnif Backend is Dbms DBMS MSSQL handler ... | def bannerParser banner xmlfile Noneif Backend isDbms DBMS MSSQL xmlfile paths MSSQL_XMLelif Backend isDbms DBMS MYSQL xmlfile paths MYSQL_XMLelif Backend isDbms DBMS ORACLE xmlfile paths ORACLE_XMLelif Backend isDbms DBMS PGSQL xmlfile paths PGSQL_XMLif not xmlfile returnif Backend isDbms DBMS MSSQL handler MSSQLBanne... | 101 |
python-test-4476 | python | What does the code verify re - loading an assembly cause ? | the new type to show up | @skip 'silverlight' 'multiple execute' 'win 32 ' def test c1 cs if not has csc returnc 1 cs get local filename 'c 1 cs' outp sys exec prefixcompile And Ref 'c 1 ' c1 cs '/d BAR 1 ' import Fooclass c1 Child Foo Bar passo c1 Child Are Equal o Method ' Inbar 1 ' compile And Ref 'c 1 b' c1 cs import Fooclass c2 Child Foo B... | @skip 'silverlight' 'multiple_execute' 'win32' def test_c1cs if not has_csc returnc1cs get_local_filename 'c1 cs' outp sys exec_prefixcompileAndRef 'c1' c1cs '/d BAR1' import Fooclass c1Child Foo Bar passo c1Child AreEqual o Method 'Inbar1' compileAndRef 'c1_b' c1cs import Fooclass c2Child Foo Bar passo c2Child AreEqua... | 81 |
python-test-4477 | python | What causes the new type to show up ? | the code verify re - loading an assembly | @skip 'silverlight' 'multiple execute' 'win 32 ' def test c1 cs if not has csc returnc 1 cs get local filename 'c 1 cs' outp sys exec prefixcompile And Ref 'c 1 ' c1 cs '/d BAR 1 ' import Fooclass c1 Child Foo Bar passo c1 Child Are Equal o Method ' Inbar 1 ' compile And Ref 'c 1 b' c1 cs import Fooclass c2 Child Foo B... | @skip 'silverlight' 'multiple_execute' 'win32' def test_c1cs if not has_csc returnc1cs get_local_filename 'c1 cs' outp sys exec_prefixcompileAndRef 'c1' c1cs '/d BAR1' import Fooclass c1Child Foo Bar passo c1Child AreEqual o Method 'Inbar1' compileAndRef 'c1_b' c1cs import Fooclass c2Child Foo Bar passo c2Child AreEqua... | 81 |
python-test-4478 | python | What does the code verify ? | re - loading an assembly | @skip 'silverlight' 'multiple execute' 'win 32 ' def test c1 cs if not has csc returnc 1 cs get local filename 'c 1 cs' outp sys exec prefixcompile And Ref 'c 1 ' c1 cs '/d BAR 1 ' import Fooclass c1 Child Foo Bar passo c1 Child Are Equal o Method ' Inbar 1 ' compile And Ref 'c 1 b' c1 cs import Fooclass c2 Child Foo B... | @skip 'silverlight' 'multiple_execute' 'win32' def test_c1cs if not has_csc returnc1cs get_local_filename 'c1 cs' outp sys exec_prefixcompileAndRef 'c1' c1cs '/d BAR1' import Fooclass c1Child Foo Bar passo c1Child AreEqual o Method 'Inbar1' compileAndRef 'c1_b' c1cs import Fooclass c2Child Foo Bar passo c2Child AreEqua... | 81 |
python-test-4482 | python | How does the code update the settings for each store defined in the given module_store_setting settings ? | with the given doc store configuration and options | def update module store settings module store setting doc store settings None module store options None xml store options None default store None mappings None for store in module store setting['default']['OPTIONS']['stores'] if store['NAME'] 'xml' xml store options and store['OPTIONS'] update xml store options else mo... | def update_module_store_settings module_store_setting doc_store_settings None module_store_options None xml_store_options None default_store None mappings None for store in module_store_setting['default']['OPTIONS']['stores'] if store['NAME'] 'xml' xml_store_options and store['OPTIONS'] update xml_store_options else mo... | 113 |
python-test-4483 | python | What does the code update with the given doc store configuration and options ? | the settings for each store defined in the given module_store_setting settings | def update module store settings module store setting doc store settings None module store options None xml store options None default store None mappings None for store in module store setting['default']['OPTIONS']['stores'] if store['NAME'] 'xml' xml store options and store['OPTIONS'] update xml store options else mo... | def update_module_store_settings module_store_setting doc_store_settings None module_store_options None xml_store_options None default_store None mappings None for store in module_store_setting['default']['OPTIONS']['stores'] if store['NAME'] 'xml' xml_store_options and store['OPTIONS'] update xml_store_options else mo... | 113 |
python-test-4485 | python | What do the given plugin clone ? | into our plugin directory | def clone plugin plugin dirname os path join plugin cache dir os path basename plugin print ' Cloning%s->%s' % plugin dirname if os path exists dirname print ' Skipcloningof%s Alreadythere ' % plugin returncreate directory dirname subprocess call ['git' 'clone' '--recursive' '--depth' '1 ' 'https //github com/%s' % plu... | def clone_plugin plugin dirname os path join plugin_cache_dir os path basename plugin print 'Cloning%s->%s' % plugin dirname if os path exists dirname print 'Skipcloningof%s Alreadythere ' % plugin returncreate_directory dirname subprocess call ['git' 'clone' '--recursive' '--depth' '1' 'https //github com/%s' % plugin... | 68 |
python-test-4486 | python | What does the code delete ? | an elasticsearch repository | @repo mgr cli command 'delete' @click option '--repository' required True help ' Repositoryname' type str @click option '--yes' is flag True callback delete callback expose value False prompt ' Areyousureyouwanttodeletetherepository?' @click pass contextdef delete ctx repository client get client **ctx obj['client args... | @repo_mgr_cli command 'delete' @click option '--repository' required True help 'Repositoryname' type str @click option '--yes' is_flag True callback delete_callback expose_value False prompt 'Areyousureyouwanttodeletetherepository?' @click pass_contextdef _delete ctx repository client get_client **ctx obj['client_args'... | 77 |
python-test-4488 | python | What does a higher - order function wrap in order to add retry functionality ? | an arbitrary asynchronous function | def Call With Retry Async retry policy func *args **kwargs inner callback kwargs get 'callback' None assert 'callback' in kwargs ' Call With Retry Asyncrequiresanamed"callback"argumentthatisnot None 'retry manager retry policy Create Manager def On Completed Call *callback args **callback kwargs ' Calledwhentheoperatio... | def CallWithRetryAsync retry_policy func *args **kwargs inner_callback kwargs get 'callback' None assert 'callback' in kwargs 'CallWithRetryAsyncrequiresanamed"callback"argumentthatisnotNone 'retry_manager retry_policy CreateManager def _OnCompletedCall *callback_args **callback_kwargs 'Calledwhentheoperationhascomplet... | 129 |
python-test-4489 | python | What wraps an arbitrary asynchronous function in order to add retry functionality ? | a higher - order function | def Call With Retry Async retry policy func *args **kwargs inner callback kwargs get 'callback' None assert 'callback' in kwargs ' Call With Retry Asyncrequiresanamed"callback"argumentthatisnot None 'retry manager retry policy Create Manager def On Completed Call *callback args **callback kwargs ' Calledwhentheoperatio... | def CallWithRetryAsync retry_policy func *args **kwargs inner_callback kwargs get 'callback' None assert 'callback' in kwargs 'CallWithRetryAsyncrequiresanamed"callback"argumentthatisnotNone 'retry_manager retry_policy CreateManager def _OnCompletedCall *callback_args **callback_kwargs 'Calledwhentheoperationhascomplet... | 129 |
python-test-4490 | python | For what purpose does a higher - order function wrap an arbitrary asynchronous function ? | in order to add retry functionality | def Call With Retry Async retry policy func *args **kwargs inner callback kwargs get 'callback' None assert 'callback' in kwargs ' Call With Retry Asyncrequiresanamed"callback"argumentthatisnot None 'retry manager retry policy Create Manager def On Completed Call *callback args **callback kwargs ' Calledwhentheoperatio... | def CallWithRetryAsync retry_policy func *args **kwargs inner_callback kwargs get 'callback' None assert 'callback' in kwargs 'CallWithRetryAsyncrequiresanamed"callback"argumentthatisnotNone 'retry_manager retry_policy CreateManager def _OnCompletedCall *callback_args **callback_kwargs 'Calledwhentheoperationhascomplet... | 129 |
python-test-4492 | python | What does the code paste on the first image ? | the second image | @cli command 'paste' @click option '-l' '--left' default 0 help ' Offsetfromleft ' @click option '-r' '--right' default 0 help ' Offsetfromright ' @processordef paste cmd images left right imageiter iter images image next imageiter None to paste next imageiter None if to paste is None if image is not None yield image r... | @cli command 'paste' @click option '-l' '--left' default 0 help 'Offsetfromleft ' @click option '-r' '--right' default 0 help 'Offsetfromright ' @processordef paste_cmd images left right imageiter iter images image next imageiter None to_paste next imageiter None if to_paste is None if image is not None yield image ret... | 100 |
python-test-4493 | python | Where does the code paste the second image ? | on the first image | @cli command 'paste' @click option '-l' '--left' default 0 help ' Offsetfromleft ' @click option '-r' '--right' default 0 help ' Offsetfromright ' @processordef paste cmd images left right imageiter iter images image next imageiter None to paste next imageiter None if to paste is None if image is not None yield image r... | @cli command 'paste' @click option '-l' '--left' default 0 help 'Offsetfromleft ' @click option '-r' '--right' default 0 help 'Offsetfromright ' @processordef paste_cmd images left right imageiter iter images image next imageiter None to_paste next imageiter None if to_paste is None if image is not None yield image ret... | 100 |
python-test-4496 | python | What do a string represent ? | the object hash | def encode missing object hash ts data ts meta None ts ctype None msg '%s%s' % urllib parse quote object hash urllib parse quote ts data internal if ts meta and ts meta ts data delta ts meta raw - ts data raw msg '%sm %x' % msg delta if ts ctype and ts ctype ts data delta ts ctype raw - ts data raw msg '%s t %x' % msg ... | def encode_missing object_hash ts_data ts_meta None ts_ctype None msg '%s%s' % urllib parse quote object_hash urllib parse quote ts_data internal if ts_meta and ts_meta ts_data delta ts_meta raw - ts_data raw msg '%sm %x' % msg delta if ts_ctype and ts_ctype ts_data delta ts_ctype raw - ts_data raw msg '%s t %x' % msg ... | 74 |
python-test-4499 | python | What does this function return ? | a numpy array that stores the audio samples of a specified wav of aiff file | def read Audio File path extension os path splitext path [1 ]try if extension lower ' wav' [ Fs x] wavfile read path elif extension lower ' aif' or extension lower ' aiff' s aifc open path 'r' nframes s getnframes strsig s readframes nframes x numpy fromstring strsig numpy short byteswap Fs s getframerate else print ' ... | def readAudioFile path extension os path splitext path [1]try if extension lower ' wav' [Fs x] wavfile read path elif extension lower ' aif' or extension lower ' aiff' s aifc open path 'r' nframes s getnframes strsig s readframes nframes x numpy fromstring strsig numpy short byteswap Fs s getframerate else print 'Error... | 80 |
python-test-4500 | python | What does a numpy array store ? | the audio samples of a specified wav of aiff file | def read Audio File path extension os path splitext path [1 ]try if extension lower ' wav' [ Fs x] wavfile read path elif extension lower ' aif' or extension lower ' aiff' s aifc open path 'r' nframes s getnframes strsig s readframes nframes x numpy fromstring strsig numpy short byteswap Fs s getframerate else print ' ... | def readAudioFile path extension os path splitext path [1]try if extension lower ' wav' [Fs x] wavfile read path elif extension lower ' aif' or extension lower ' aiff' s aifc open path 'r' nframes s getnframes strsig s readframes nframes x numpy fromstring strsig numpy short byteswap Fs s getframerate else print 'Error... | 80 |
python-test-4501 | python | What do an array meet ? | the desired ndims and array | def assert nD array ndim arg name 'image' array np asanyarray array msg incorrect dim ' Theparameter`%s`mustbea%s-dimensionalarray'msg empty array ' Theparameter`%s`cannotbeanemptyarray'if isinstance ndim int ndim [ndim]if array size 0 raise Value Error msg empty array % arg name if not array ndim in ndim raise Value E... | def assert_nD array ndim arg_name 'image' array np asanyarray array msg_incorrect_dim 'Theparameter`%s`mustbea%s-dimensionalarray'msg_empty_array 'Theparameter`%s`cannotbeanemptyarray'if isinstance ndim int ndim [ndim]if array size 0 raise ValueError msg_empty_array % arg_name if not array ndim in ndim raise ValueError... | 61 |
python-test-4502 | python | What does the code verify ? | an array meets the desired ndims and array | def assert nD array ndim arg name 'image' array np asanyarray array msg incorrect dim ' Theparameter`%s`mustbea%s-dimensionalarray'msg empty array ' Theparameter`%s`cannotbeanemptyarray'if isinstance ndim int ndim [ndim]if array size 0 raise Value Error msg empty array % arg name if not array ndim in ndim raise Value E... | def assert_nD array ndim arg_name 'image' array np asanyarray array msg_incorrect_dim 'Theparameter`%s`mustbea%s-dimensionalarray'msg_empty_array 'Theparameter`%s`cannotbeanemptyarray'if isinstance ndim int ndim [ndim]if array size 0 raise ValueError msg_empty_array % arg_name if not array ndim in ndim raise ValueError... | 61 |
python-test-4503 | python | What does the code evaluate ? | the floor of an interval | def floor x np import module 'numpy' if isinstance x int float return interval np floor x elif isinstance x interval if x is valid is False return interval - np inf np inf is valid False else start np floor x start end np floor x end if start end return interval start end is valid x is valid else return interval start ... | def floor x np import_module 'numpy' if isinstance x int float return interval np floor x elif isinstance x interval if x is_valid is False return interval - np inf np inf is_valid False else start np floor x start end np floor x end if start end return interval start end is_valid x is_valid else return interval start ... | 73 |
python-test-4505 | python | What do an array contain ? | mcmc samples qlist : tuple or list a list of desired quantiles ( defaults to ) transform : callable function to transform data | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except Index Error log warning ' Toofewelementsforquantilecalculation' | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except IndexError _log warning 'Toofewelementsforquantilecalculation' | 60 |
python-test-4506 | python | What list a list of desired quantiles ( defaults to ) ? | mcmc samples | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except Index Error log warning ' Toofewelementsforquantilecalculation' | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except IndexError _log warning 'Toofewelementsforquantilecalculation' | 60 |
python-test-4507 | python | For what purpose do callable function transform ? | to transform data | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except Index Error log warning ' Toofewelementsforquantilecalculation' | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except IndexError _log warning 'Toofewelementsforquantilecalculation' | 60 |
python-test-4508 | python | What do mcmc samples list ? | a list of desired quantiles ( defaults to ) | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except Index Error log warning ' Toofewelementsforquantilecalculation' | @statfuncdef quantiles x qlist 2 5 25 50 75 97 5 transform lambda x x x transform x copy if x ndim > 1 sx np sort x T Telse sx np sort x try quants [sx[int len sx * q / 100 0 ] for q in qlist]return dict zip qlist quants except IndexError _log warning 'Toofewelementsforquantilecalculation' | 60 |
python-test-4509 | python | What does the code create ? | the post states snapshot | def snapper post opts jid pre num try if not opts['test'] and opts get 'snapper states' and pre num salt ['snapper create snapshot'] config opts get 'snapper states config' 'root' snapshot type 'post' pre number pre num description ' Salt Staterunforjid{ 0 }' format jid pub jid jid except Exception log error ' Failedto... | def _snapper_post opts jid pre_num try if not opts['test'] and __opts__ get 'snapper_states' and pre_num __salt__['snapper create_snapshot'] config __opts__ get 'snapper_states_config' 'root' snapshot_type 'post' pre_number pre_num description 'SaltStaterunforjid{0}' format jid __pub_jid jid except Exception log error ... | 58 |
python-test-4511 | python | What does the code provide in bytes ? | the total physical memory on the system | @lru cache def physical memory start time parameter time time 'systemphysicalmemory' mem total line get line '/proc/meminfo' ' Mem Total ' parameter try result int mem total line split [1 ] * 1024 log runtime parameter '/proc/meminfo[ Mem Total]' start time return resultexcept exc IO Error 'unabletoparsethe/proc/meminf... | @lru_cache def physical_memory start_time parameter time time 'systemphysicalmemory' mem_total_line _get_line '/proc/meminfo' 'MemTotal ' parameter try result int mem_total_line split [1] * 1024 _log_runtime parameter '/proc/meminfo[MemTotal]' start_time return resultexcept exc IOError 'unabletoparsethe/proc/meminfoMem... | 60 |
python-test-4515 | python | For what purpose will all the hooks rerun ? | to create a clean state | def Test Init global INIT RA Nif stats STATS is None stats STATS stats Stats Collector flags FLAGS config config lib Resource Filter 'install data/etc/grr-server yaml' flags FLAGS secondary configs [config lib Resource Filter 'test data/grr test yaml@grr-response-test' ]extra test config config lib CONFIG[' Test additi... | def TestInit global INIT_RANif stats STATS is None stats STATS stats StatsCollector flags FLAGS config config_lib Resource Filter 'install_data/etc/grr-server yaml' flags FLAGS secondary_configs [config_lib Resource Filter 'test_data/grr_test yaml@grr-response-test' ]extra_test_config config_lib CONFIG['Test additional... | 100 |
python-test-4520 | python | What does the code make ? | a type that can not be constructed and see if _ _ clrtype _ _ still gets called | def test neg type new args global calledcalled Falseclass My Type type def new self passdef clrtype self global calledcalled Truereturn super My Type self clrtype try class X object metaclass My Type Fail 'type new signatureiswrong' except Type Error as e Are Equal e message ' new takesexactly 1 argument 4given ' final... | def test_neg_type___new___args global calledcalled Falseclass MyType type def __new__ self passdef __clrtype__ self global calledcalled Truereturn super MyType self __clrtype__ try class X object __metaclass__ MyTypeFail 'type __new__signatureiswrong' except TypeError as e AreEqual e message '__new__ takesexactly1argum... | 58 |
python-test-4522 | python | What can we show then ? | relevant messages about the user | @never cachedef unsubscribe request hash None token None perm setting None assert hash is not None and token is not None user Nonetry email Unsubscribe Code parse token hash user User Profile objects get email email except Value Error User Profile Does Not Exist passperm settings []if user is not None unsubscribed True... | @never_cachedef unsubscribe request hash None token None perm_setting None assert hash is not None and token is not None user Nonetry email UnsubscribeCode parse token hash user UserProfile objects get email email except ValueError UserProfile DoesNotExist passperm_settings []if user is not None unsubscribed Trueif not... | 110 |
python-test-4523 | python | For what purpose did the code pull from django contrib ? | so that we can add user into the form so then we can show relevant messages about the user | @never cachedef unsubscribe request hash None token None perm setting None assert hash is not None and token is not None user Nonetry email Unsubscribe Code parse token hash user User Profile objects get email email except Value Error User Profile Does Not Exist passperm settings []if user is not None unsubscribed True... | @never_cachedef unsubscribe request hash None token None perm_setting None assert hash is not None and token is not None user Nonetry email UnsubscribeCode parse token hash user UserProfile objects get email email except ValueError UserProfile DoesNotExist passperm_settings []if user is not None unsubscribed Trueif not... | 110 |
python-test-4524 | python | What flags empty fields also also as errors ? | checks for valid dna characters in barcode field | def check dna chars bcs header mapping data errors has barcodes True valid dna chars DNA Sequence iupac standard characters header fields to check []if has barcodes header fields to check append ' Barcode Sequence' check indices []for curr field in range len header if header[curr field] in header fields to check check ... | def check_dna_chars_bcs header mapping_data errors has_barcodes True valid_dna_chars DNASequence iupac_standard_characters header_fields_to_check []if has_barcodes header_fields_to_check append 'BarcodeSequence' check_indices []for curr_field in range len header if header[curr_field] in header_fields_to_check check_ind... | 137 |
python-test-4528 | python | What does the code update to a specific version ? | a powershell module | def update name maximum version None required version None flags [ u' Name' name ]if maximum version is not None flags append u' Maximum Version' maximum version if required version is not None flags append u' Required Version' required version params u''for flag value in flags params + u'-{ 0 }{ 1 }' format flag value... | def update name maximum_version None required_version None flags [ u'Name' name ]if maximum_version is not None flags append u'MaximumVersion' maximum_version if required_version is not None flags append u'RequiredVersion' required_version params u''for flag value in flags params + u'-{0}{1}' format flag value cmd u'Up... | 72 |
python-test-4529 | python | What allows in manufacture / repack type stock entry ? | same serial nos for raw materials and finished goods | def allow serial nos with different item sle serial no sle allow serial nos Falseif sle voucher type u' Stock Entry' and sle actual qty > 0 stock entry frappe get doc u' Stock Entry' sle voucher no if stock entry purpose in u' Repack' u' Manufacture' for d in stock entry get u'items' if d serial no and d s warehouse if... | def allow_serial_nos_with_different_item sle_serial_no sle allow_serial_nos Falseif sle voucher_type u'StockEntry' and sle actual_qty > 0 stock_entry frappe get_doc u'StockEntry' sle voucher_no if stock_entry purpose in u'Repack' u'Manufacture' for d in stock_entry get u'items' if d serial_no and d s_warehouse if sle i... | 94 |
python-test-4530 | python | Where does same serial nos for raw materials and finished goods allow ? | in manufacture / repack type stock entry | def allow serial nos with different item sle serial no sle allow serial nos Falseif sle voucher type u' Stock Entry' and sle actual qty > 0 stock entry frappe get doc u' Stock Entry' sle voucher no if stock entry purpose in u' Repack' u' Manufacture' for d in stock entry get u'items' if d serial no and d s warehouse if... | def allow_serial_nos_with_different_item sle_serial_no sle allow_serial_nos Falseif sle voucher_type u'StockEntry' and sle actual_qty > 0 stock_entry frappe get_doc u'StockEntry' sle voucher_no if stock_entry purpose in u'Repack' u'Manufacture' for d in stock_entry get u'items' if d serial_no and d s_warehouse if sle i... | 94 |
python-test-4532 | python | What does the code calculate ? | the score at a given percentile of the input sequence | def scoreatpercentile a per limit interpolation method 'fraction' axis None a np asarray a if a size 0 if np isscalar per return np nanelse return np ones np asarray per shape dtype np float 64 * np nan if limit a a[ limit[ 0 ] < a & a < limit[ 1 ] ]sorted np sort a axis axis if axis is None axis 0return compute qth pe... | def scoreatpercentile a per limit interpolation_method 'fraction' axis None a np asarray a if a size 0 if np isscalar per return np nanelse return np ones np asarray per shape dtype np float64 * np nan if limit a a[ limit[0] < a & a < limit[1] ]sorted np sort a axis axis if axis is None axis 0return _compute_qth_percen... | 74 |
python-test-4533 | python | What is this function used ? | to create and configure | def easyxf strg to parse '' num format str None field sep ' ' line sep ' ' intro sep ' ' esc char '\\' debug False xfobj XF Style if num format str is not None xfobj num format str num format strif strg to parse parse strg to obj strg to parse xfobj xf dict field sep field sep line sep line sep intro sep intro sep esc ... | def easyxf strg_to_parse '' num_format_str None field_sep ' ' line_sep ' ' intro_sep ' ' esc_char '\\' debug False xfobj XFStyle if num_format_str is not None xfobj num_format_str num_format_strif strg_to_parse _parse_strg_to_obj strg_to_parse xfobj xf_dict field_sep field_sep line_sep line_sep intro_sep intro_sep esc_... | 77 |
python-test-4536 | python | Where do an event fire ? | on the local minion event bus | def fire data tag try event salt utils event get event 'minion' sock dir opts ['sock dir'] transport opts ['transport'] opts opts listen False return event fire event data tag except Exception exc type exc value exc traceback sys exc info lines traceback format exception exc type exc value exc traceback log debug lines... | def fire data tag try event salt utils event get_event 'minion' sock_dir __opts__['sock_dir'] transport __opts__['transport'] opts __opts__ listen False return event fire_event data tag except Exception exc_type exc_value exc_traceback sys exc_info lines traceback format_exception exc_type exc_value exc_traceback log d... | 56 |
python-test-4537 | python | What is the code emits only if there is no current event transaction type ? | a problem submitted event | def emit problem submitted event kwargs root type get event transaction type if not root type root id get event transaction id if not root id root id create new event transaction id set event transaction type PROBLEM SUBMITTED EVENT TYPE tracker emit unicode PROBLEM SUBMITTED EVENT TYPE {'user id' unicode kwargs['user ... | def _emit_problem_submitted_event kwargs root_type get_event_transaction_type if not root_type root_id get_event_transaction_id if not root_id root_id create_new_event_transaction_id set_event_transaction_type PROBLEM_SUBMITTED_EVENT_TYPE tracker emit unicode PROBLEM_SUBMITTED_EVENT_TYPE {'user_id' unicode kwargs['user... | 90 |
python-test-4538 | python | When do an input image preprocess ? | before processing by the caffe module | def preprocess image img img img astype np float 32 img imresize img 224 224 img img[ [2 1 0]]img img * 255 mean np array [103 939 116 779 123 68 ] for i in range 0 3 img[ i] img[ i] - mean[i] img np transpose img [2 0 1] return img | def preprocess_image img img img astype np float32 img imresize img 224 224 img img[ [2 1 0]]img img * 255 mean np array [103 939 116 779 123 68] for i in range 0 3 img[ i] img[ i] - mean[i] img np transpose img [2 0 1] return img | 54 |
python-test-4545 | python | For what purpose did useful information need ? | to solve the pell equation | def P Qa P 0 Q 0 D A i 2 B i 1 0A i 1 B i 2 1G i 2 - P 0 G i 1 Q 0P i P 0Q i Q 0while 1 a i floor P i + sqrt D / Q i A i a i * A i 1 + A i 2 B i a i * B i 1 + B i 2 G i a i * G i 1 + G i 2 yield P i Q i a i A i B i G i A i 1 A i 2 A i A i 1 B i 1 B i 2 B i B i 1 G i 1 G i 2 G i G i 1 P i a i * Q i - P i Q i D - P i ** ... | def PQa P_0 Q_0 D A_i_2 B_i_1 0A_i_1 B_i_2 1G_i_2 - P_0 G_i_1 Q_0P_i P_0Q_i Q_0while 1 a_i floor P_i + sqrt D / Q_i A_i a_i * A_i_1 + A_i_2 B_i a_i * B_i_1 + B_i_2 G_i a_i * G_i_1 + G_i_2 yield P_i Q_i a_i A_i B_i G_i A_i_1 A_i_2 A_i A_i_1 B_i_1 B_i_2 B_i B_i_1 G_i_1 G_i_2 G_i G_i_1 P_i a_i * Q_i - P_i Q_i D - P_i ** 2... | 152 |
python-test-4555 | python | How do the status of a mysql server return ? | using the output from the show status query | def status **connection args dbc connect **connection args if dbc is None return {}cur dbc cursor qry 'SHOWSTATUS'try execute cur qry except My SQ Ldb Operational Error as exc err ' My SQL Error{ 0 } {1 }' format *exc context ['mysql error'] errlog error err return {}ret {}for in range cur rowcount row cur fetchone ret... | def status **connection_args dbc _connect **connection_args if dbc is None return {}cur dbc cursor qry 'SHOWSTATUS'try _execute cur qry except MySQLdb OperationalError as exc err 'MySQLError{0} {1}' format *exc __context__['mysql error'] errlog error err return {}ret {}for _ in range cur rowcount row cur fetchone ret[r... | 63 |
python-test-4558 | python | What does the code equalize ? | the number of trials in multiple epoch instances | def equalize epoch counts epochs list method 'mintime' if not all isinstance e Base Epochs for e in epochs list raise Value Error ' Allinputsmustbe Epochsinstances' for e in epochs list if not e bad dropped e drop bad event times [e events[ 0] for e in epochs list]indices get drop indices event times method for e inds ... | def equalize_epoch_counts epochs_list method 'mintime' if not all isinstance e BaseEpochs for e in epochs_list raise ValueError 'AllinputsmustbeEpochsinstances' for e in epochs_list if not e _bad_dropped e drop_bad event_times [e events[ 0] for e in epochs_list]indices _get_drop_indices event_times method for e inds in... | 69 |
python-test-4559 | python | What does the principal purpose of this view be ? | to allow the automated testing of multiple clients connected to the server at once | @render to 'distributed/loadtesting/load test html' def load test request nusers None username uuid uuid 4 hex[ 12 ]if not Facility objects count fac Facility objects create name 'fac' fac Facility objects all [0 ] user Facility User get or initialize username username facility fac user set password username user save ... | @render_to 'distributed/loadtesting/load_test html' def load_test request nusers None username uuid uuid4 hex[ 12]if not Facility objects count fac Facility objects create name 'fac' fac Facility objects all [0] user _ FacilityUser get_or_initialize username username facility fac user set_password username user save re... | 62 |
python-test-4560 | python | What is to allow the automated testing of multiple clients connected to the server at once ? | the principal purpose of this view | @render to 'distributed/loadtesting/load test html' def load test request nusers None username uuid uuid 4 hex[ 12 ]if not Facility objects count fac Facility objects create name 'fac' fac Facility objects all [0 ] user Facility User get or initialize username username facility fac user set password username user save ... | @render_to 'distributed/loadtesting/load_test html' def load_test request nusers None username uuid uuid4 hex[ 12]if not Facility objects count fac Facility objects create name 'fac' fac Facility objects all [0] user _ FacilityUser get_or_initialize username username facility fac user set_password username user save re... | 62 |
python-test-4563 | python | What does the code handle ? | a separator other than t | def test space separator d iso 8601 parse date '2007 - 06 - 2306 40 34 00 Z' assert d year 2007 assert d month 6 assert d day 23 assert d hour 6 assert d minute 40 assert d second 34 assert d microsecond 0 assert d tzinfo iso 8601 UTC | def test_space_separator d iso8601 parse_date '2007-06-2306 40 34 00Z' assert d year 2007 assert d month 6 assert d day 23 assert d hour 6 assert d minute 40 assert d second 34 assert d microsecond 0 assert d tzinfo iso8601 UTC | 52 |
python-test-4564 | python | What unions on the block structure ? | a set field | def collect unioned set field block structure transformer merged field name filter by for block key in block structure topological traversal result set {block key} if filter by block key else set for parent in block structure get parents block key result set block structure get transformer block field parent transforme... | def collect_unioned_set_field block_structure transformer merged_field_name filter_by for block_key in block_structure topological_traversal result_set {block_key} if filter_by block_key else set for parent in block_structure get_parents block_key result_set block_structure get_transformer_block_field parent transforme... | 69 |
python-test-4565 | python | Where do a set field union recursively ? | on the block structure | def collect unioned set field block structure transformer merged field name filter by for block key in block structure topological traversal result set {block key} if filter by block key else set for parent in block structure get parents block key result set block structure get transformer block field parent transforme... | def collect_unioned_set_field block_structure transformer merged_field_name filter_by for block_key in block_structure topological_traversal result_set {block_key} if filter_by block_key else set for parent in block_structure get_parents block_key result_set block_structure get_transformer_block_field parent transforme... | 69 |
python-test-4569 | python | What does the code shuffle ? | a list of flags | def get api servers api servers []for api server in FLAGS glance api servers if '//' not in api server api server 'http //' + api server url urlparse urlparse api server port url port or 80 host url netloc split ' ' 1 [0 ]use ssl url scheme 'https' api servers append host port use ssl random shuffle api servers return ... | def get_api_servers api_servers []for api_server in FLAGS glance_api_servers if '//' not in api_server api_server 'http //' + api_server url urlparse urlparse api_server port url port or 80 host url netloc split ' ' 1 [0]use_ssl url scheme 'https' api_servers append host port use_ssl random shuffle api_servers return i... | 66 |
python-test-4570 | python | What does the code downsample ? | the surface if isomorphic to a subdivided icosahedron | def ico downsample surf dest grade n tri surf['ntri']found -1 bad msg ' Asurfacewith%dtrianglescannotbeisomorphicwithasubdividedicosahedron ' % surf['ntri'] if n tri % 20 0 raise Runtime Error bad msg n tri n tri // 20 found int round np log n tri / np log 4 if n tri 4 ** found raise Runtime Error bad msg del n triif d... | def _ico_downsample surf dest_grade n_tri surf['ntri']found -1 bad_msg 'Asurfacewith%dtrianglescannotbeisomorphicwithasubdividedicosahedron ' % surf['ntri'] if n_tri % 20 0 raise RuntimeError bad_msg n_tri n_tri // 20 found int round np log n_tri / np log 4 if n_tri 4 ** found raise RuntimeError bad_msg del n_triif des... | 132 |
python-test-4571 | python | What does the code calculate ? | the transitive closure of a directed graph | def transitive closure graph reflexive False if reflexive base set lambda k set [k] else base set lambda k set agenda graph dict k graph[k] copy for k in graph closure graph dict k base set k for k in graph for i in graph agenda agenda graph[i]closure closure graph[i]while agenda j agenda pop closure add j closure clos... | def transitive_closure graph reflexive False if reflexive base_set lambda k set [k] else base_set lambda k set agenda_graph dict k graph[k] copy for k in graph closure_graph dict k base_set k for k in graph for i in graph agenda agenda_graph[i]closure closure_graph[i]while agenda j agenda pop closure add j closure clos... | 78 |
python-test-4572 | python | What does the code make ? | packing list for product bundle item | def make packing list doc if doc get u' action' and doc action u'update after submit' returnparent items []for d in doc get u'items' if frappe db get value u' Product Bundle' {u'new item code' d item code} for i in get product bundle items d item code update packing list item doc i item code flt i qty * flt d qty d i d... | def make_packing_list doc if doc get u'_action' and doc _action u'update_after_submit' returnparent_items []for d in doc get u'items' if frappe db get_value u'ProductBundle' {u'new_item_code' d item_code} for i in get_product_bundle_items d item_code update_packing_list_item doc i item_code flt i qty * flt d qty d i de... | 90 |
python-test-4573 | python | What does the code take as input ? | the environment spec for which the rollout is to be generated | def update rollout dict spec rollout dict if should skip env spec for tests spec logger info u' Skippingtestsfor{}' format spec id return Falseif spec nondeterministic logger info u' Skippingtestsfornondeterministicenv{}' format spec id return Falselogger info u' Generatingrolloutfor{}' format spec id try observations ... | def update_rollout_dict spec rollout_dict if should_skip_env_spec_for_tests spec logger info u'Skippingtestsfor{}' format spec id return Falseif spec nondeterministic logger info u'Skippingtestsfornondeterministicenv{}' format spec id return Falselogger info u'Generatingrolloutfor{}' format spec id try observations_has... | 127 |
python-test-4574 | python | What does the code remove from site ? | app and linked modules | @click command u'uninstall-app' @click argument u'app' @click option u'--yes' u'-y' help u' Tobypassconfirmationpromptforuninstallingtheapp' is flag True default False multiple True @click option u'--dry-run' help u' Listalldoctypesthatwillbedeleted' is flag True default False @pass contextdef uninstall context app dry... | @click command u'uninstall-app' @click argument u'app' @click option u'--yes' u'-y' help u'Tobypassconfirmationpromptforuninstallingtheapp' is_flag True default False multiple True @click option u'--dry-run' help u'Listalldoctypesthatwillbedeleted' is_flag True default False @pass_contextdef uninstall context app dry_r... | 67 |
python-test-4577 | python | What did core data structures convert ? | to blaze expression core data structure representations created by to_tree | def from tree expr namespace None if isinstance expr dict op args expr[u'op'] expr[u'args'] if op u'slice' return expr utils slice *[from tree arg namespace for arg in args] if hasattr blaze expr op cls getattr blaze expr op else cls expression from name op if cls is Symbol cls symbolchildren [from tree arg namespace f... | def from_tree expr namespace None if isinstance expr dict op args expr[u'op'] expr[u'args'] if op u'slice' return expr_utils _slice *[from_tree arg namespace for arg in args] if hasattr blaze expr op cls getattr blaze expr op else cls expression_from_name op if cls is Symbol cls symbolchildren [from_tree arg namespace ... | 86 |
python-test-4579 | python | What does the code perform ? | an asof merge | def merge asof left right on None left on None right on None left index False right index False by None left by None right by None suffixes ' x' ' y' tolerance None allow exact matches True direction 'backward' op As Of Merge left right on on left on left on right on right on left index left index right index right ind... | def merge_asof left right on None left_on None right_on None left_index False right_index False by None left_by None right_by None suffixes '_x' '_y' tolerance None allow_exact_matches True direction 'backward' op _AsOfMerge left right on on left_on left_on right_on right_on left_index left_index right_index right_inde... | 92 |
python-test-4591 | python | What does a modulename internally incorporate ? | the cffi version | def create modulename cdef sources source sys version key '\x 00 ' join [sys version[ 3] source cdef sources] key key encode 'utf- 8 ' k1 hex binascii crc 32 key[ 0 2] & 4294967295 k1 k1 lstrip '0 x' rstrip 'L' k2 hex binascii crc 32 key[ 1 2] & 4294967295 k2 k2 lstrip '0 ' rstrip 'L' return ' Cryptography cffi {0 }{ 1... | def _create_modulename cdef_sources source sys_version key '\x00' join [sys_version[ 3] source cdef_sources] key key encode 'utf-8' k1 hex binascii crc32 key[0 2] & 4294967295 k1 k1 lstrip '0x' rstrip 'L' k2 hex binascii crc32 key[1 2] & 4294967295 k2 k2 lstrip '0' rstrip 'L' return '_Cryptography_cffi_{0}{1}' format k... | 70 |
python-test-4592 | python | What creates a modulename internally that incorporates the cffi version ? | cffi | def create modulename cdef sources source sys version key '\x 00 ' join [sys version[ 3] source cdef sources] key key encode 'utf- 8 ' k1 hex binascii crc 32 key[ 0 2] & 4294967295 k1 k1 lstrip '0 x' rstrip 'L' k2 hex binascii crc 32 key[ 1 2] & 4294967295 k2 k2 lstrip '0 ' rstrip 'L' return ' Cryptography cffi {0 }{ 1... | def _create_modulename cdef_sources source sys_version key '\x00' join [sys_version[ 3] source cdef_sources] key key encode 'utf-8' k1 hex binascii crc32 key[0 2] & 4294967295 k1 k1 lstrip '0x' rstrip 'L' k2 hex binascii crc32 key[1 2] & 4294967295 k2 k2 lstrip '0' rstrip 'L' return '_Cryptography_cffi_{0}{1}' format k... | 70 |
python-test-4593 | python | What does cffi create ? | a modulename internally that incorporates the cffi version | def create modulename cdef sources source sys version key '\x 00 ' join [sys version[ 3] source cdef sources] key key encode 'utf- 8 ' k1 hex binascii crc 32 key[ 0 2] & 4294967295 k1 k1 lstrip '0 x' rstrip 'L' k2 hex binascii crc 32 key[ 1 2] & 4294967295 k2 k2 lstrip '0 ' rstrip 'L' return ' Cryptography cffi {0 }{ 1... | def _create_modulename cdef_sources source sys_version key '\x00' join [sys_version[ 3] source cdef_sources] key key encode 'utf-8' k1 hex binascii crc32 key[0 2] & 4294967295 k1 k1 lstrip '0x' rstrip 'L' k2 hex binascii crc32 key[1 2] & 4294967295 k2 k2 lstrip '0' rstrip 'L' return '_Cryptography_cffi_{0}{1}' format k... | 70 |
python-test-4594 | python | What incorporates the cffi version ? | a modulename internally | def create modulename cdef sources source sys version key '\x 00 ' join [sys version[ 3] source cdef sources] key key encode 'utf- 8 ' k1 hex binascii crc 32 key[ 0 2] & 4294967295 k1 k1 lstrip '0 x' rstrip 'L' k2 hex binascii crc 32 key[ 1 2] & 4294967295 k2 k2 lstrip '0 ' rstrip 'L' return ' Cryptography cffi {0 }{ 1... | def _create_modulename cdef_sources source sys_version key '\x00' join [sys_version[ 3] source cdef_sources] key key encode 'utf-8' k1 hex binascii crc32 key[0 2] & 4294967295 k1 k1 lstrip '0x' rstrip 'L' k2 hex binascii crc32 key[1 2] & 4294967295 k2 k2 lstrip '0' rstrip 'L' return '_Cryptography_cffi_{0}{1}' format k... | 70 |
python-test-4595 | python | Where can a dictionary be stored ? | in zendesk custom fields | def get zendesk custom field context request context {}course id request POST get 'course id' if not course id return contextcontext['course id'] course idif not request user is authenticated return contextenrollment Course Enrollment get enrollment request user Course Key from string course id if enrollment and enroll... | def _get_zendesk_custom_field_context request context {}course_id request POST get 'course_id' if not course_id return contextcontext['course_id'] course_idif not request user is_authenticated return contextenrollment CourseEnrollment get_enrollment request user CourseKey from_string course_id if enrollment and enrollm... | 54 |
python-test-4604 | python | What has at least three pieces of data associated with it ? | every event | def make events add nulls def gen date interleavings for e1 e2 t1 t2 in product * [critical dates] * 4 if e1 < e2 yield e1 e2 t1 t2 event frames []for sid e1 e2 t1 t2 in enumerate gen date interleavings event frames append make events for sid sid [e 1 e2 ] [t 1 t2 ] if add nulls for date in critical dates event frames ... | def make_events add_nulls def gen_date_interleavings for e1 e2 t1 t2 in product * [critical_dates] * 4 if e1 < e2 yield e1 e2 t1 t2 event_frames []for sid e1 e2 t1 t2 in enumerate gen_date_interleavings event_frames append make_events_for_sid sid [e1 e2] [t1 t2] if add_nulls for date in critical_dates event_frames appe... | 90 |
python-test-4605 | python | What does every event have ? | at least three pieces of data associated with it | def make events add nulls def gen date interleavings for e1 e2 t1 t2 in product * [critical dates] * 4 if e1 < e2 yield e1 e2 t1 t2 event frames []for sid e1 e2 t1 t2 in enumerate gen date interleavings event frames append make events for sid sid [e 1 e2 ] [t 1 t2 ] if add nulls for date in critical dates event frames ... | def make_events add_nulls def gen_date_interleavings for e1 e2 t1 t2 in product * [critical_dates] * 4 if e1 < e2 yield e1 e2 t1 t2 event_frames []for sid e1 e2 t1 t2 in enumerate gen_date_interleavings event_frames append make_events_for_sid sid [e1 e2] [t1 t2] if add_nulls for date in critical_dates event_frames appe... | 90 |
python-test-4609 | python | What does the code remove for a report ? | a filter on a given field | @treeio login required@handle response formatdef report filter remove request report id field name filter index response format 'html' report get object or 404 Report pk report id if not request user profile has permission report mode 'w' return user denied request message " Youdon'thavewriteaccesstothis Report" model ... | @treeio_login_required@handle_response_formatdef report_filter_remove request report_id field_name filter_index response_format 'html' report get_object_or_404 Report pk report_id if not request user profile has_permission report mode 'w' return user_denied request message "Youdon'thavewriteaccesstothisReport" model lo... | 82 |
python-test-4610 | python | For what purpose does the code remove a filter on a given field ? | for a report | @treeio login required@handle response formatdef report filter remove request report id field name filter index response format 'html' report get object or 404 Report pk report id if not request user profile has permission report mode 'w' return user denied request message " Youdon'thavewriteaccesstothis Report" model ... | @treeio_login_required@handle_response_formatdef report_filter_remove request report_id field_name filter_index response_format 'html' report get_object_or_404 Report pk report_id if not request user profile has_permission report mode 'w' return user_denied request message "Youdon'thavewriteaccesstothisReport" model lo... | 82 |
python-test-4611 | python | What does the code run ? | the download and conversion operation | def run dataset dir if not tf gfile Exists dataset dir tf gfile Make Dirs dataset dir if dataset exists dataset dir print ' Datasetfilesalreadyexist Exitingwithoutre-creatingthem ' returndataset utils download and uncompress tarball DATA URL dataset dir photo filenames class names get filenames and classes dataset dir ... | def run dataset_dir if not tf gfile Exists dataset_dir tf gfile MakeDirs dataset_dir if _dataset_exists dataset_dir print 'Datasetfilesalreadyexist Exitingwithoutre-creatingthem ' returndataset_utils download_and_uncompress_tarball _DATA_URL dataset_dir photo_filenames class_names _get_filenames_and_classes dataset_dir... | 135 |
python-test-4612 | python | Where does the code click the action button ? | in the datatable | def dt action row 1 action None column 1 table ID 'datatable' config current test configbrowser config browserif action button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a[contains text '%s' ]" % table ID row column action else button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a" % table ID row column giveup 0 0sleeptime 0 2while gi... | def dt_action row 1 action None column 1 tableID 'datatable' config current test_configbrowser config browserif action button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a[contains text '%s' ]" % tableID row column action else button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a" % tableID row column giveup 0 0sleeptime 0 2while giveu... | 87 |
python-test-4613 | python | What does the code click in the datatable ? | the action button | def dt action row 1 action None column 1 table ID 'datatable' config current test configbrowser config browserif action button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a[contains text '%s' ]" % table ID row column action else button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a" % table ID row column giveup 0 0sleeptime 0 2while gi... | def dt_action row 1 action None column 1 tableID 'datatable' config current test_configbrowser config browserif action button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a[contains text '%s' ]" % tableID row column action else button " //*[@id '%s']/tbody/tr[%s]/td[%s]/a" % tableID row column giveup 0 0sleeptime 0 2while giveu... | 87 |
python-test-4622 | python | How did polynomials represent ? | with coefficients | def polyder p m if m 0 result pelse n len p if n < m result np zeros like p[ 1 ] else dp p[ - m ] copy for k in range m rng np arange n - k - 1 m - k - 1 -1 dp * rng reshape n - m + 1 * p ndim - 1 result dpreturn result | def _polyder p m if m 0 result pelse n len p if n < m result np zeros_like p[ 1 ] else dp p[ - m ] copy for k in range m rng np arange n - k - 1 m - k - 1 -1 dp * rng reshape n - m + 1 * p ndim - 1 result dpreturn result | 66 |
python-test-4625 | python | What did the code read from bti head shape file ? | index points and dig points | def process bti headshape fname convert True use hpi True idx points dig points read head shape fname if convert ctf head t get ctf head to head t idx points else ctf head t Transform 'ctf head' 'ctf head' if dig points is not None all points np r [ idx points dig points ]else all points idx pointsif convert all points... | def _process_bti_headshape fname convert True use_hpi True idx_points dig_points _read_head_shape fname if convert ctf_head_t _get_ctf_head_to_head_t idx_points else ctf_head_t Transform 'ctf_head' 'ctf_head' if dig_points is not None all_points np r_[ idx_points dig_points ]else all_points idx_pointsif convert all_poi... | 87 |
python-test-4626 | python | Where does the code find expressions ? | in a call to _ transient_function | def extract expressions node if isinstance node nodes Call Func and isinstance node func nodes Name and node func name TRANSIENT FUNCTION real expr node args[ 0 ]real expr parent node parentfor name in node parent astroid fields child getattr node parent name if isinstance child list tuple for idx compound child in enu... | def _extract_expressions node if isinstance node nodes CallFunc and isinstance node func nodes Name and node func name _TRANSIENT_FUNCTION real_expr node args[0]real_expr parent node parentfor name in node parent _astroid_fields child getattr node parent name if isinstance child list tuple for idx compound_child in enu... | 90 |
python-test-4631 | python | How do an indefinite integral of f compute ? | by rewriting it as a g function | def meijerint indefinite f x from sympy import hyper meijergresults []for a in sorted find splitting points f x {S 0 } key default sort key res meijerint indefinite 1 f subs x x + a x if not res continueres res subs x x - a if has res hyper meijerg results append res else return resif f has Hyperbolic Function debug ' ... | def meijerint_indefinite f x from sympy import hyper meijergresults []for a in sorted _find_splitting_points f x {S 0 } key default_sort_key res _meijerint_indefinite_1 f subs x x + a x if not res continueres res subs x x - a if _has res hyper meijerg results append res else return resif f has HyperbolicFunction _debug... | 100 |
python-test-4639 | python | What does the code get ? | ip address of client | def get real ip request if KEY REAL IP in request return request[KEY REAL IP]if request app[KEY USE X FORWARDED FOR] and HTTP HEADER X FORWARDED FOR in request headers request[KEY REAL IP] ip address request headers get HTTP HEADER X FORWARDED FOR split ' ' [0 ] else peername request transport get extra info 'peername'... | def get_real_ip request if KEY_REAL_IP in request return request[KEY_REAL_IP]if request app[KEY_USE_X_FORWARDED_FOR] and HTTP_HEADER_X_FORWARDED_FOR in request headers request[KEY_REAL_IP] ip_address request headers get HTTP_HEADER_X_FORWARDED_FOR split ' ' [0] else peername request transport get_extra_info 'peername' ... | 74 |
python-test-4640 | python | What does the code get ? | container stats | def head container url token container http conn None headers None service token None if http conn parsed conn http connelse parsed conn http connection url path '%s/%s' % parsed path quote container method 'HEAD'req headers {'X- Auth- Token' token}if service token req headers['X- Service- Token'] service tokenif heade... | def head_container url token container http_conn None headers None service_token None if http_conn parsed conn http_connelse parsed conn http_connection url path '%s/%s' % parsed path quote container method 'HEAD'req_headers {'X-Auth-Token' token}if service_token req_headers['X-Service-Token'] service_tokenif headers r... | 112 |
python-test-4641 | python | What converts to a dict of data cmdoutput ? | rabbitmqctl output | def output to dict cmdoutput values mapper None if isinstance cmdoutput dict if cmdoutput['retcode'] 0 or cmdoutput['stderr'] raise Command Execution Error ' Rabbit M Qcommandfailed {0 }' format cmdoutput['stderr'] cmdoutput cmdoutput['stdout']ret {}if values mapper is None values mapper lambda string string split ' DC... | def _output_to_dict cmdoutput values_mapper None if isinstance cmdoutput dict if cmdoutput['retcode'] 0 or cmdoutput['stderr'] raise CommandExecutionError 'RabbitMQcommandfailed {0}' format cmdoutput['stderr'] cmdoutput cmdoutput['stdout']ret {}if values_mapper is None values_mapper lambda string string split ' DCTB ' ... | 89 |
python-test-4642 | python | What do rabbitmqctl output convert ? | to a dict of data cmdoutput | def output to dict cmdoutput values mapper None if isinstance cmdoutput dict if cmdoutput['retcode'] 0 or cmdoutput['stderr'] raise Command Execution Error ' Rabbit M Qcommandfailed {0 }' format cmdoutput['stderr'] cmdoutput cmdoutput['stdout']ret {}if values mapper is None values mapper lambda string string split ' DC... | def _output_to_dict cmdoutput values_mapper None if isinstance cmdoutput dict if cmdoutput['retcode'] 0 or cmdoutput['stderr'] raise CommandExecutionError 'RabbitMQcommandfailed {0}' format cmdoutput['stderr'] cmdoutput cmdoutput['stdout']ret {}if values_mapper is None values_mapper lambda string string split ' DCTB ' ... | 89 |
python-test-4644 | python | What uses to check for a handshake ? | cowpatty | def has handshake cowpatty target capfile nonstrict True if not program exists 'cowpatty' return Falsecmd ['cowpatty' '-r' capfile '-s' target ssid '-c']if nonstrict cmd append '- 2 ' proc Popen cmd stdout PIPE stderr DN proc wait response proc communicate [0 ]if response find 'incompletefour-wayhandshakeexchange' -1 r... | def has_handshake_cowpatty target capfile nonstrict True if not program_exists 'cowpatty' return Falsecmd ['cowpatty' '-r' capfile '-s' target ssid '-c']if nonstrict cmd append '-2' proc Popen cmd stdout PIPE stderr DN proc wait response proc communicate [0]if response find 'incompletefour-wayhandshakeexchange' -1 retu... | 65 |
python-test-4645 | python | What does the code build ? | a cyclic network with 4 modules : key recurrent | def build Cyclic Network recurrent Network Recurrent Network if recurrent else Feed Forward Network N Network 'cyc' a Linear Layer 1 name 'a' b Linear Layer 2 name 'b' c Linear Layer 3 name 'c' d Linear Layer 4 name 'd' N add Input Module a N add Module b N add Module d N add Output Module c N add Connection Full Conne... | def buildCyclicNetwork recurrent Network RecurrentNetwork if recurrent else FeedForwardNetwork N Network 'cyc' a LinearLayer 1 name 'a' b LinearLayer 2 name 'b' c LinearLayer 3 name 'c' d LinearLayer 4 name 'd' N addInputModule a N addModule b N addModule d N addOutputModule c N addConnection FullConnection a b N addCo... | 103 |
python-test-4649 | python | Where are players represented properly prior to any matches being reported ? | in standings | def test Standings Before Matches delete Matches delete Players register Player ' Melpomene Murray' register Player ' Randy Schwartz' standings player Standings if len standings < 2 raise Value Error ' Playersshouldappearinplayer Standingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise Value Error ' O... | def testStandingsBeforeMatches deleteMatches deletePlayers registerPlayer 'MelpomeneMurray' registerPlayer 'RandySchwartz' standings playerStandings if len standings < 2 raise ValueError 'PlayersshouldappearinplayerStandingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise ValueError 'Onlyregisteredplay... | 123 |
python-test-4650 | python | What are represented in standings ? | players | def test Standings Before Matches delete Matches delete Players register Player ' Melpomene Murray' register Player ' Randy Schwartz' standings player Standings if len standings < 2 raise Value Error ' Playersshouldappearinplayer Standingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise Value Error ' O... | def testStandingsBeforeMatches deleteMatches deletePlayers registerPlayer 'MelpomeneMurray' registerPlayer 'RandySchwartz' standings playerStandings if len standings < 2 raise ValueError 'PlayersshouldappearinplayerStandingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise ValueError 'Onlyregisteredplay... | 123 |
python-test-4651 | python | When are players represented in standings properly ? | prior to any matches being reported | def test Standings Before Matches delete Matches delete Players register Player ' Melpomene Murray' register Player ' Randy Schwartz' standings player Standings if len standings < 2 raise Value Error ' Playersshouldappearinplayer Standingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise Value Error ' O... | def testStandingsBeforeMatches deleteMatches deletePlayers registerPlayer 'MelpomeneMurray' registerPlayer 'RandySchwartz' standings playerStandings if len standings < 2 raise ValueError 'PlayersshouldappearinplayerStandingsevenbeforetheyhaveplayedanymatches ' elif len standings > 2 raise ValueError 'Onlyregisteredplay... | 123 |
python-test-4660 | python | What does the code extract ? | a proxyconfig | def Extract Proxy proxy yaml key proxy config data proxy Nonetry if proxy yaml key in proxy config data proxy data proxy config data get proxy yaml key original proxy keys list proxy data keys proxy Proxy Config Proxy proxy data['host'] proxy data['port'] username proxy data get 'username' password proxy data get 'pass... | def _ExtractProxy proxy_yaml_key proxy_config_data proxy Nonetry if proxy_yaml_key in proxy_config_data proxy_data proxy_config_data get proxy_yaml_key original_proxy_keys list proxy_data keys proxy ProxyConfig Proxy proxy_data['host'] proxy_data['port'] username proxy_data get 'username' password proxy_data get 'passw... | 76 |
python-test-4662 | python | How do the git commit i d and timestamp get ? | by calling git | def git str subprocess gitpath if not os path isdir os path join gitpath ' git' return Nonetry cid subprocess check output ['git' 'describe' '--tags' '--dirty' '--always'] cwd gitpath decode 'UTF- 8 ' strip date subprocess check output ['git' 'show' '-s' '--format %ci' 'HEAD'] cwd gitpath decode 'UTF- 8 ' strip return ... | def _git_str_subprocess gitpath if not os path isdir os path join gitpath ' git' return Nonetry cid subprocess check_output ['git' 'describe' '--tags' '--dirty' '--always'] cwd gitpath decode 'UTF-8' strip date subprocess check_output ['git' 'show' '-s' '--format %ci' 'HEAD'] cwd gitpath decode 'UTF-8' strip return '{}... | 67 |
python-test-4663 | python | What does py2 handle the way ? | date format strings | def strftime date date format def strip zeros x return x lstrip u' 0 ' or u' 0 ' c89 directives u'a Ab Bcdf H Ijm Mp S Uw Wx Xy Yz Z%'format options u'%[-]? 'candidates re findall format options date format template re sub format options u'%s' date format lang code enc locale getlocale locale LC TIME formatted candidat... | def strftime date date_format def strip_zeros x return x lstrip u'0' or u'0' c89_directives u'aAbBcdfHIjmMpSUwWxXyYzZ%'format_options u'%[-]? 'candidates re findall format_options date_format template re sub format_options u'%s' date_format lang_code enc locale getlocale locale LC_TIME formatted_candidates []for candid... | 132 |
python-test-4664 | python | What handles date format strings the way ? | py2 | def strftime date date format def strip zeros x return x lstrip u' 0 ' or u' 0 ' c89 directives u'a Ab Bcdf H Ijm Mp S Uw Wx Xy Yz Z%'format options u'%[-]? 'candidates re findall format options date format template re sub format options u'%s' date format lang code enc locale getlocale locale LC TIME formatted candidat... | def strftime date date_format def strip_zeros x return x lstrip u'0' or u'0' c89_directives u'aAbBcdfHIjmMpSUwWxXyYzZ%'format_options u'%[-]? 'candidates re findall format_options date_format template re sub format_options u'%s' date_format lang_code enc locale getlocale locale LC_TIME formatted_candidates []for candid... | 132 |
python-test-4665 | python | Why is this necessary ? | because of the way py2 handles date format strings | def strftime date date format def strip zeros x return x lstrip u' 0 ' or u' 0 ' c89 directives u'a Ab Bcdf H Ijm Mp S Uw Wx Xy Yz Z%'format options u'%[-]? 'candidates re findall format options date format template re sub format options u'%s' date format lang code enc locale getlocale locale LC TIME formatted candidat... | def strftime date date_format def strip_zeros x return x lstrip u'0' or u'0' c89_directives u'aAbBcdfHIjmMpSUwWxXyYzZ%'format_options u'%[-]? 'candidates re findall format_options date_format template re sub format_options u'%s' date_format lang_code enc locale getlocale locale LC_TIME formatted_candidates []for candid... | 132 |
python-test-4667 | python | What does the code convert into a tuple of boundaries ? | a range string | def range boundaries range string m ABSOLUTE RE match range string min col min row sep max col max row m groups min col column index from string min col min row int min row if max col is None or max row is None max col min colmax row min rowelse max col column index from string max col max row int max row return min co... | def range_boundaries range_string m ABSOLUTE_RE match range_string min_col min_row sep max_col max_row m groups min_col column_index_from_string min_col min_row int min_row if max_col is None or max_row is None max_col min_colmax_row min_rowelse max_col column_index_from_string max_col max_row int max_row return min_co... | 74 |
python-test-4675 | python | What does the code remove from the lines of a multiline text ? | a common space prefix | def Cut Common Space Prefix text text lines text splitlines while text lines and not text lines[ -1 ] text lines text lines[ -1 ]if text lines if text lines[ 0 ] and text lines[ 0 ][ 0 ] isspace text first line []else text first line [text lines pop 0 ]common prefix os path commonprefix [line for line in text lines if ... | def CutCommonSpacePrefix text text_lines text splitlines while text_lines and not text_lines[ -1 ] text_lines text_lines[ -1 ]if text_lines if text_lines[0] and text_lines[0][0] isspace text_first_line []else text_first_line [text_lines pop 0 ]common_prefix os path commonprefix [line for line in text_lines if line] spa... | 106 |
python-test-4677 | python | What does the code try ? | to only take days worked into account | def add days worked start days step get step start weeks plus divmod days 5 end start + weeks * 7 + plus * step if weekday end > 5 end + 2 * step end + len [x for x in get national holidays start end + step if weekday x < 5 ] * step if weekday end > 5 end + 2 * step return end | def add_days_worked start days step get_step start weeks plus divmod days 5 end start + weeks * 7 + plus * step if weekday end > 5 end + 2 * step end + len [x for x in get_national_holidays start end + step if weekday x < 5 ] * step if weekday end > 5 end + 2 * step return end | 69 |
python-test-4678 | python | What does the code unquot into unicode using utf-8 ? | a uri portion from a byte string | def urlunquote byte string remap None preserve None if byte string is None return byte stringbyte string unquote to bytes byte string if preserve replacements [u'\x 1 a' u'\x 1 c' u'\x 1 d' u'\x 1 e' u'\x 1 f']preserve unmap {}for char in remap replacement replacements pop 0 preserve unmap[replacement] charbyte string ... | def _urlunquote byte_string remap None preserve None if byte_string is None return byte_stringbyte_string unquote_to_bytes byte_string if preserve replacements [u'\x1a' u'\x1c' u'\x1d' u'\x1e' u'\x1f']preserve_unmap {}for char in remap replacement replacements pop 0 preserve_unmap[replacement] charbyte_string byte_stri... | 110 |
python-test-4681 | python | What does the code save the register ? | to msgpack files | def save reg data reg dir reg dir regfile os path join reg dir 'register' try if not os path exists os makedirs reg dir except OS Error as exc if exc errno errno EEXIST passelse raisetry with salt utils fopen regfile 'a' as fh msgpack dump data fh fh close except log error ' Couldnotwritetomsgpackfile{ 0 }' format opts... | def save_reg data reg_dir _reg_dir regfile os path join reg_dir 'register' try if not os path exists os makedirs reg_dir except OSError as exc if exc errno errno EEXIST passelse raisetry with salt utils fopen regfile 'a' as fh_ msgpack dump data fh_ fh_ close except log error 'Couldnotwritetomsgpackfile{0}' format __op... | 62 |
python-test-4682 | python | What did the code read into a dictionary ? | a denoiser mapping file | def parse denoiser mapping denoiser map result {}for line in denoiser map line line strip split ' DCTB ' denoised id line[ 0 ] rstrip ' ' original ids [denoised id] + line[ 1 ] if denoised id in result raise Value Error ' Duplicatedidentifiersindenoisermappingfile areyousureyoumergedthecorrectfiles?' else result[denois... | def parse_denoiser_mapping denoiser_map result {}for line in denoiser_map line line strip split ' DCTB ' denoised_id line[0] rstrip ' ' original_ids [denoised_id] + line[1 ] if denoised_id in result raise ValueError 'Duplicatedidentifiersindenoisermappingfile areyousureyoumergedthecorrectfiles?' else result[denoised_id... | 52 |
python-test-4683 | python | How does the html writer write multidimensional columns ? | with correctly replaced fill_values | def test multicolumn table html fill values col 1 [1 2 3]col 2 [ 1 0 1 0 2 0 2 0 3 0 3 0 ]col 3 [ 'a' 'a' 'a' 'b' 'b' 'b' 'c' 'c' 'c' ]buffer output String IO t Table [col 1 col 2 col 3 ] names 'C 1 ' 'C 2 ' 'C 3 ' ascii write t buffer output fill values 'a' 'z' format 'html' col 1 [1 2 3]col 2 [ 1 0 1 0 2 0 2 0 3 0 3 ... | def test_multicolumn_table_html_fill_values col1 [1 2 3]col2 [ 1 0 1 0 2 0 2 0 3 0 3 0 ]col3 [ 'a' 'a' 'a' 'b' 'b' 'b' 'c' 'c' 'c' ]buffer_output StringIO t Table [col1 col2 col3] names 'C1' 'C2' 'C3' ascii write t buffer_output fill_values 'a' 'z' format 'html' col1 [1 2 3]col2 [ 1 0 1 0 2 0 2 0 3 0 3 0 ]col3 [ 'z' 'z... | 142 |
python-test-4687 | python | What does the code get if it does ? | the y intersection inside the y segment | def get Y Intersection Inside Y Segment segment First Y segment Second Y begin Complex end Complex x y Intersection euclidean get Y Intersection If Exists begin Complex end Complex x if y Intersection None return Noneif y Intersection < min segment First Y segment Second Y return Noneif y Intersection < max segment Fir... | def getYIntersectionInsideYSegment segmentFirstY segmentSecondY beginComplex endComplex x yIntersection euclidean getYIntersectionIfExists beginComplex endComplex x if yIntersection None return Noneif yIntersection < min segmentFirstY segmentSecondY return Noneif yIntersection < max segmentFirstY segmentSecondY return ... | 63 |
python-test-4694 | python | For what purpose do the users wishlists form add to the template context ? | so it can be rendered | @register tag name 'wishlists containing product' def do basket form parse token tokens token split contents if len tokens 5 raise template Template Syntax Error '%rtagusesthefollowingsyntax {%%wishlists containing productwishlistsproductasctx var%%}' % tokens[ 0 ] wishlists var product var name var tokens[ 1 ] tokens[... | @register tag name 'wishlists_containing_product' def do_basket_form parse token tokens token split_contents if len tokens 5 raise template TemplateSyntaxError '%rtagusesthefollowingsyntax {%%wishlists_containing_productwishlistsproductasctx_var%%}' % tokens[0] wishlists_var product_var name_var tokens[1] tokens[2] tok... | 59 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.