function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def __init__(self, fitID, itemIDs): wx.Command.__init__(self, True, 'Remove Cargos') self.internalHistory = InternalCommandHistory() self.fitID = fitID self.itemIDs = itemIDs
DarkFenX/Pyfa
[ 1401, 374, 1401, 265, 1370894453 ]
def cloudfare(url,quality,nyaa_c): web = BrowseUrl(url,quality,nyaa_c)
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def __init__(self,tmp): self.hdr = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0' self.tmp_dir = tmp self.cookie_file = os.path.join(tmp,'nyaa.txt') if not os.path.exists(self.cookie_file): f = open(self.cookie_file,'w') f.close()
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def getOptions(self): criteria = ['Date','Seeders','Leechers','Downloads','History','LocalStreaming'] return criteria
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def ccurlN(self,url): content = ccurl(url+'#-b#'+self.cookie_file) #print(content) if 'checking_browser' in content: if os.path.exists(self.cookie_file): os.remove(self.cookie_file) cloudfare(url,'',self.cookie_file) content = ccurl(url+'#-b#'+self.cookie_file) return content
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def process_page(self,url): content = self.ccurlN(url) soup = BeautifulSoup(content,'lxml') #print(soup.prettify()) unit_element = soup.findAll('td',{'colspan':'2'}) #print(unit_element[0]) s = [] for i in unit_element: try: element = i.findAll('a') for index in element: et = index['href']...
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def search(self,name): strname = str(name) print(strname) url = "https://nyaa.si/?f=0&c=1_2&s=seeders&o=desc&q="+str(strname) m = self.process_page(url) return m
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def getCompleteList(self,opt,genre_num,ui,tmp_dir,hist_folder): global tmp_working_dir instr = "Press . or > for next page -1" tmp_working_dir = tmp_dir if opt == 'Date': url = 'https://nyaa.si/?c=1_2' elif opt == 'Seeders': url = 'https://nyaa.si/?c=1_2&s=seeders&o=desc' elif opt == 'Leechers': ur...
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def getEpnList(self,name,opt,depth_list,extra_info,siteName,category): if extra_info == '-1': arr = [] return (arr,'Instructions','No.jpg',False,depth_list) else: print(extra_info) name_id = (re.search('id=[^|]*',extra_info).group()).split('=')[1] url = "https://nyaa.si/download/" + name_id + '.torre...
abhishek-archlinux/AnimeWatch
[ 22, 1, 22, 2, 1457414237 ]
def _load_dynamic_env_data(bld): bldnode = bld.bldnode.make_node('modules/ChibiOS') tmp_str = bldnode.find_node('include_dirs').read() tmp_str = tmp_str.replace(';\n','') tmp_str = tmp_str.replace('-I','') #remove existing -I flags # split, coping with separator idirs = re.split('; ', tmp_str) ...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def ch_dynamic_env(self): # The generated files from configuration possibly don't exist if it's just # a list command (TODO: figure out a better way to address that). if self.bld.cmd == 'list': return if not _dynamic_env_data: _load_dynamic_env_data(self.bld) self.use += ' ch' s...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def run(self): upload_tools = self.env.get_flat('UPLOAD_TOOLS') src = self.inputs[0] return self.exec_command("python '{}/px_uploader.py' '{}'".format(upload_tools, src))
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "Uploading"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "apj_tool"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "Generating"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "apj_gen"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "Generating"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def keyword(self): return "Generating"
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def chibios_firmware(self): self.link_task.always_run = True link_output = self.link_task.outputs[0] bin_target = self.bld.bldnode.find_or_declare('bin/' + link_output.change_ext('.bin').name) apj_target = self.bld.bldnode.find_or_declare('bin/' + link_output.change_ext('.apj').name) generate_bin...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def setup_can_build(cfg): '''enable CAN build. By doing this here we can auto-enable CAN in the build based on the presence of CAN pins in hwdef.dat''' env = cfg.env env.AP_LIBRARIES += [ 'AP_UAVCAN', 'modules/uavcan/libuavcan/src/**/*.cpp', 'modules/uavcan/libuavcan_drivers/stm3...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def configure(cfg): cfg.find_program('make', var='MAKE') #cfg.objcopy = cfg.find_program('%s-%s'%(cfg.env.TOOLCHAIN,'objcopy'), var='OBJCOPY', mandatory=True) cfg.find_program('arm-none-eabi-objcopy', var='OBJCOPY') env = cfg.env bldnode = cfg.bldnode.make_node(cfg.variant) def srcpath(path): ...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def build(bld): bld( # build hwdef.h from hwdef.dat. This is needed after a waf clean source=bld.path.ant_glob(bld.env.HWDEF), rule="python '${AP_HAL_ROOT}/hwdef/scripts/chibios_hwdef.py' -D '${BUILDROOT}' '%s' %s" % (bld.env.HWDEF, bld.env.BOOTLOADER_OPTION), group='dynamic_sources'...
yonahbox/ardupilot
[ 4, 2, 4, 1, 1485155198 ]
def proxyConfig(host, port): r = requests.get("http://{0}:{1}/config".format(host, port)) return r.json()
FaradayRF/Faraday-Software
[ 43, 19, 43, 53, 1473224429 ]
def initializeFaradayConfig(): ''' Initialize Faraday radio configuration file from faraday_config.sample.ini :return: None, exits program ''' faradayHelper.initializeConfig(faradayTruthFile, faradayFile) sys.exit(0)
FaradayRF/Faraday-Software
[ 43, 19, 43, 53, 1473224429 ]
def displayConfig(faradayConfigPath): ''' Prints out the Faraday Configuration file :param faradayConfigPath: path to faraday configuration file :return: None ''' with open(faradayConfigPath, 'r') as configFile: print configFile.read() sys.exit(0)
FaradayRF/Faraday-Software
[ 43, 19, 43, 53, 1473224429 ]
def configureDeviceConfiguration(args, faradayConfigPath): ''' Configure device configuration configuration file from command line :param args: argparse arguments :return: None ''' config = ConfigParser.RawConfigParser() config.read(deviceConfigPath) fconfig = ConfigParser.RawConfigPa...
FaradayRF/Faraday-Software
[ 43, 19, 43, 53, 1473224429 ]
def unitconfig(): """ This function is called when the RESTful API GET or POST call is made to the '/' of the operating port. Querying a GET will command the local and queried unit's device configuration in Flash memory and return the information as a JSON dictionary. Issuing a POST will cause the local...
FaradayRF/Faraday-Software
[ 43, 19, 43, 53, 1473224429 ]
def read(relpath): """ Return string containing the contents of the file at *relpath* relative to this file. """ cwd = os.path.dirname(__file__) abspath = os.path.join(cwd,os.path.normpath(relpath)) with open(abspath) as f: return f.read()
libcrack/iker
[ 18, 5, 18, 1, 1436373960 ]
def setUp(self): super().setUp() self.student = UserFactory.create() self.request = RequestFactory().request() self.request.session = {} self.request.user = self.student MessageMiddleware().process_request(self.request)
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def test_message_escaping(self, message, expected_message_html): """ Verifies that a user message is escaped correctly. """ PageLevelMessages.register_user_message(self.request, UserMessageType.INFO, message) messages = list(PageLevelMessages.user_messages(self.request)) ...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def test_message_icon(self, message_type, expected_css_class, expected_icon_class): """ Verifies that a user message returns the correct CSS and icon classes. """ PageLevelMessages.register_user_message(self.request, message_type, TEST_MESSAGE) messages = list(PageLevelMessages.u...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def test_message_type(self, register_message_function, expected_message_type): """ Verifies that each user message function returns the correct type. """ register_message_function(self.request, TEST_MESSAGE) messages = list(PageLevelMessages.user_messages(self.request)) a...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def test_global_message_off_by_default(self): """Verifies feature toggle.""" with self.settings( GLOBAL_NOTICE_ENABLED=False, GLOBAL_NOTICE_MESSAGE="I <3 HTML-escaping", GLOBAL_NOTICE_TYPE='WARNING' ): # Missing when feature disabled as...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def test_global_message_error_isolation(self): """Verifies that any setting errors don't break the page, or other messages.""" with self.settings( GLOBAL_NOTICE_ENABLED=True, GLOBAL_NOTICE_MESSAGE=ThrowingMarkup(), # force an error GLOBAL_NOTICE_TYPE='invalid' ...
eduNEXT/edx-platform
[ 5, 3, 5, 6, 1390926698 ]
def awakeFromNib(self): self.color_index = alphaIndex
albertz/music-player
[ 483, 61, 483, 16, 1345772141 ]
def setClearColor_(self, sender): self.color_index = sender.tag() self.setNeedsDisplay_(True)
albertz/music-player
[ 483, 61, 483, 16, 1345772141 ]
def testConstants(self): self.assertEqual(NSXMLNodeOptionsNone, 0) self.assertEqual(NSXMLNodeIsCDATA, 1 << 0) self.assertEqual(NSXMLNodeExpandEmptyElement, 1 << 1) self.assertEqual(NSXMLNodeCompactEmptyElement, 1 << 2) self.assertEqual(NSXMLNodeUseSingleQuotes, 1 << 3) s...
albertz/music-player
[ 483, 61, 483, 16, 1345772141 ]
def SetExpectationImplementation(impl): global Expectation assert issubclass(impl, BaseExpectation) Expectation = impl
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def SetBuildStatsImplementation(impl): global BuildStats assert issubclass(impl, BaseBuildStats) BuildStats = impl
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __init__(self, test, tags, expected_results, bug=None): self.test = test self.tags = frozenset(tags) self.bug = bug or '' if isinstance(expected_results, str): self.expected_results = frozenset([expected_results]) else: self.expected_results = frozenset(expected_results) # We're...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __ne__(self, other): return not self.__eq__(other)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def _CompareWildcard(self, result_test_name): return fnmatch.fnmatch(result_test_name, self.test)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def AppliesToResult(self, result): """Checks whether this expectation should have applied to |result|. An expectation applies to a result if the test names match (including wildcard expansion) and the expectation's tags are a subset of the result's tags. Args: result: A Result instance to ch...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __init__(self, test, tags, actual_result, step, build_id): """ Args: test: A string containing the name of the test. tags: An iterable containing the typ tags for the result. actual_result: The actual result of the test as a string. step: A string containing the name of the step on t...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __ne__(self, other): return not self.__eq__(other)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __init__(self): self.passed_builds = 0 self.total_builds = 0 self.failure_links = frozenset()
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def failed_builds(self): return self.total_builds - self.passed_builds
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def did_fully_pass(self): return self.passed_builds == self.total_builds
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def did_never_pass(self): return self.failed_builds == self.total_builds
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def AddFailedBuild(self, build_id): self.total_builds += 1 build_link = BuildLinkFromBuildId(build_id) self.failure_links = frozenset([build_link]) | self.failure_links
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def NeverNeededExpectation(self, expectation): # pylint:disable=unused-argument """Returns whether the results tallied in |self| never needed |expectation|. Args: expectation: An Expectation object that |stats| is located under. Returns: True if all the results tallied in |self| would have pa...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __eq__(self, other): return (isinstance(other, BuildStats) and self.passed_builds == other.passed_builds and self.total_builds == other.total_builds and self.failure_links == other.failure_links)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def BuildLinkFromBuildId(build_id): return 'http://ci.chromium.org/b/%s' % build_id
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __init__(self, *args, **kwargs): # pylint:disable=super-init-not-called self.update(*args, **kwargs)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def setdefault(self, key, value=None): if key not in self: self[key] = value return self[key]
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def IterToValueType(self, value_type): """Recursively iterates over contents until |value_type| is found. Used to get rid of nested loops, instead using a single loop that automatically iterates through all the contents at a certain depth. Args: value_type: The type to recurse to and then iterat...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __setitem__(self, key, value): assert IsStringType(key) assert isinstance(value, ExpectationBuilderMap) super(BaseTestExpectationMap, self).__setitem__(key, value)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def IterBuilderStepMaps(self): """Iterates over all BuilderStepMaps contained in the map. Returns: A generator yielding tuples in the form (expectation_file (str), expectation (Expectation), builder_map (BuilderStepMap)) """ return self.IterToValueType(BuilderStepMap)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def _AddGroupedResults(self, grouped_results, builder, expectation_files): """Adds all results in |grouped_results| to |self|. Args: grouped_results: A dict mapping test name (str) to a list of data_types.Result objects for that test. builder: A string containing the name of the builder |...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def SplitByStaleness(self): """Separates stored data based on expectation staleness. Returns: Three TestExpectationMaps (stale_dict, semi_stale_dict, active_dict). All three combined contain the information of |self|. |stale_dict| contains entries for expectations that are no longer being hel...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __setitem__(self, key, value): assert isinstance(key, BaseExpectation) assert isinstance(value, self._value_type()) super(ExpectationBuilderMap, self).__setitem__(key, value)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __setitem__(self, key, value): assert IsStringType(key) assert isinstance(value, self._value_type()) super(BuilderStepMap, self).__setitem__(key, value)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def SplitBuildStatsByPass(self, expectation): """Splits the underlying BuildStats data by passing-ness. Args: expectation: The Expectation that this BuilderStepMap is located under. Returns: A dict mapping builder name to a tuple (fully_passed, never_passed, partially_passed). Each *_pas...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __setitem__(self, key, value): assert IsStringType(key) assert isinstance(value, self._value_type()) super(StepBuildStatsMap, self).__setitem__(key, value)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def IsStringType(s): return isinstance(s, six.string_types)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def do_latest(): print(_FILE_VERSION)
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def main(): ap = argparse.ArgumentParser() sub = ap.add_subparsers() latest = sub.add_parser("latest") latest.set_defaults(func=lambda _opts: do_latest()) download = sub.add_parser("get_url") download.set_defaults( func=lambda _opts: get_download_url(os.environ['_3PP_VERSION'])) o...
nwjs/chromium.src
[ 136, 133, 136, 45, 1453904223 ]
def __init__(self, base, obj, msg=None): if not msg: try: base.class_mapper(type(obj)) name = _safe_cls_name(type(obj)) msg = ( "Class %r is mapped, but this instance lacks " "instrumentation. This occurs when t...
gltn/stdm
[ 26, 29, 26, 55, 1401777923 ]
def __init__(self, cls, msg=None): if not msg: msg = _default_unmapped(cls) UnmappedError.__init__(self, msg)
gltn/stdm
[ 26, 29, 26, 55, 1401777923 ]
def __init__(self, base, state, msg=None): if not msg: msg = ( "Instance '%s' has been deleted, or its " "row is otherwise not present." % base.state_str(state) ) sa_exc.InvalidRequestError.__init__(self, msg)
gltn/stdm
[ 26, 29, 26, 55, 1401777923 ]
def __init__( self, applied_to_property_type, requesting_property, applies_to, actual_strategy_type, strategy_key,
gltn/stdm
[ 26, 29, 26, 55, 1401777923 ]
def _safe_cls_name(cls): try: cls_name = ".".join((cls.__module__, cls.__name__)) except AttributeError: cls_name = getattr(cls, "__name__", None) if cls_name is None: cls_name = repr(cls) return cls_name
gltn/stdm
[ 26, 29, 26, 55, 1401777923 ]
def edit(self, spec, prefix): # libquadmath is only available x86_64 and powerle # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85440 if self.spec.target.family not in ['x86_64', 'ppc64le']: comps = join_path('amrex', 'Tools', 'GNUMake', 'comps') maks = [ ...
LLNL/spack
[ 3244, 1839, 3244, 2847, 1389172932 ]
def step_fn(x): return x * 2
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __init__(self, device): """Creates a `OneDeviceStrategy`. Args: device: Device string identifier for the device on which the variables should be placed. See class docs for more details on how the device is used. Examples: "/cpu:0", "/gpu:0", "/device:CPU:0", "/device:GPU:0" """ ...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def distribute_datasets_from_function( self, dataset_fn, # pylint: disable=useless-super-delegation options=None): """Distributes `tf.data.Dataset` instances created by calls to `dataset_fn`. `dataset_fn` will be called once for each worker in the strategy. In this case, we only have one...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def run(self, fn, args=(), kwargs=None, options=None): # pylint: disable=useless-super-delegation """Run `fn` on each replica, with the given arguments. In `OneDeviceStrategy`, `fn` is simply called within a device scope for the given device, with the provided arguments. Args: fn: The function ...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def scope(self): # pylint: disable=useless-super-delegation """Returns a context manager selecting this Strategy as current. Inside a `with strategy.scope():` code block, this thread will use a variable creator set by `strategy`, and will enter its "cross-replica context". In `OneDeviceStrategy`,...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __init__(self, device): super(OneDeviceStrategyV1, self).__init__(OneDeviceExtended(self, device)) distribute_lib.distribution_strategy_gauge.get_cell("V1").set( "OneDeviceStrategy")
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __init__(self, container_strategy, device): super(OneDeviceExtended, self).__init__(container_strategy) self._device = device_util.resolve(device) self._input_device = device_util.get_host_for_device(self._device)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _input_workers(self): return self._input_workers_with_options()
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _validate_colocate_with_variable(self, colocate_with_variable): distribute_utils.validate_colocate(colocate_with_variable, self)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _make_input_fn_iterator( self, input_fn, replication_mode=distribute_lib.InputReplicationMode.PER_WORKER): return input_lib_v1.InputFunctionIterator(input_fn, self._input_workers, [distribute_lib.InputContext()], ...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _broadcast_to(self, tensor, destinations): del destinations return tensor
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _distribute_datasets_from_function(self, dataset_fn, options): if (options and options.experimental_replication_mode == distribute_lib.InputReplicationMode.PER_REPLICA): raise NotImplementedError( "InputReplicationMode.PER_REPLICA " "is only supported in " "`experimen...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _experimental_run_steps_on_iterator(self, fn, iterator, iterations, initial_loop_values=None): if initial_loop_values is None: initial_loop_values = {} initial_loop_values = nest.flatten(initial_loop_values) ctx = input_lib.MultiStepContext() def body...
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _reduce_to(self, reduce_op, value, destinations, options): del reduce_op, destinations, options return value
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _update(self, var, fn, args, kwargs, group): # The implementations of _update() and _update_non_slot() are identical # except _update() passes `var` as the first argument to `fn()`. return self._update_non_slot(var, fn, (var,) + tuple(args), kwargs, group)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def read_var(self, replica_local_var): """Read the aggregate value of a replica-local variable.""" return array_ops.identity(replica_local_var)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def value_container(self, value): return value
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _num_replicas_in_sync(self): return 1
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def worker_devices(self): return (self._device,)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def parameter_devices(self): return (self._device,)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def experimental_should_init(self): return True
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def experimental_between_graph(self): return False
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def should_checkpoint(self): return True
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def should_save_summary(self): return True
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _global_batch_size(self): """Global and per-replica batching are equivalent for OneDeviceStrategy.""" return True
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def _support_per_replica_values(self): return False
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]
def __init__(self, strategy): distribute_lib.ReplicaContext.__init__( self, strategy, replica_id_in_sync_group=0)
tensorflow/tensorflow
[ 171949, 87931, 171949, 2300, 1446859160 ]