Extract the checkpoints and store in self.tracking_data
775016
def Extract_Checkpoints(self):
		'''
			
		'''

		# Make sure page is available
		if self.page is None:
			raise Exception("The HTML data was not fetched due to some reasons")

		soup = BeautifulSoup(self.page,'html.parser')

		invalid_tracking_no = soup.find('span',{'id':'ctl00_ContentPlaceHolder1_lblsMsg','class':'ErrorMessage','style':'font-family:Calibri;font-size:9pt;font-weight:bold;','name':'lblsMsg'})
		if invalid_tracking_no is not None:
			raise ValueError('The Tracking number is invalid')

		# Assign the current status of the shipment

		if 'Delivered' in self.page:
			self.status = 'C'
		else:											 # The shipment is in Transit
			self.status = 'T'						

		# Checkpoints extraction begins here 
		
		rows = soup.findAll('tr',{'class':'gridItem'}) + soup.findAll('tr',{'class':'gridAltItem'})

		for row in rows:

			'''
				Each row will have 4 columns: Date--Time--Status--Location
				Merge column one and two and format it. 
				Append to tracking_data list
			'''
			row_cells = row.findAll('td')

			date = row_cells[0].string.strip()
			time = row_cells[1].string.strip()
			date_time = ' '.join([date,time])
			date_time_format = "%d %b %Y %H:%M"
			date_time = datetime.strptime(date_time,date_time_format)
			status = row_cells[2].string.strip()
			location = row_cells[3].string.strip()
			
			self.tracking_data.append({'status':status,'date':date_time,'location':location})

		# Sort the checkpoints based on Date and Time --- this is important
		self.tracking_data = sorted(self.tracking_data, key=lambda k: k['date'])
792754
synchronized void captureCheckpointManagedObjects()
    {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this,
                        cclass,
                        "captureCheckpointManagedObjectsremove"
                            );

        // Now that we are synchronized check that we have not captured the checkpoint sets already. 
        if (checkpointManagedObjectsToWrite == null) {
            // Take the tokens to write first, if we miss a delete we will catch it next time. 
            // The managedObjectsToWrite and tokensToDelete sets are volatile so users of the store will move to them 
            // promptly.
            checkpointManagedObjectsToWrite = managedObjectsToWrite;
            managedObjectsToWrite = new ConcurrentHashMap(concurrency);
            checkpointTokensToDelete = tokensToDelete;
            tokensToDelete = new ConcurrentHashMap(concurrency);
        }

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this,
                       cclass,
                       "captureCheckpointManagedObjects");
    }
85343
def _track_stack_pointers(self):
        

        regs = {self.project.arch.sp_offset}
        if hasattr(self.project.arch, 'bp_offset') and self.project.arch.bp_offset is not None:
            regs.add(self.project.arch.bp_offset)
        spt = self.project.analyses.StackPointerTracker(self.function, regs, track_memory=self._sp_tracker_track_memory)
        if spt.inconsistent_for(self.project.arch.sp_offset):
            l.warning("Inconsistency found during stack pointer tracking. Decompilation results might be incorrect.")
        return spt
293297
def export_graph(checkpoint_path, output_nodes):
    
    if not tf.gfile.Exists(checkpoint_path):
        raise AssertionError(
            "Export directory doesn't exists. Please specify an export "
            "directory: %s" % checkpoint_path)

    if not output_nodes:
        print("You need to supply the name of a node to --output_node_names.")
        return -1

        # We retrieve our checkpoint fullpath
    checkpoint = tf.train.get_checkpoint_state(checkpoint_path)
    input_checkpoint = checkpoint.model_checkpoint_path

    # We precise the file fullname of our freezed graph
    output_graph = checkpoint_path + "/frozen_model.pb"

    # We clear devices to allow TensorFlow to control on which device it will load operations
    clear_devices = True

    # We start a session using a temporary fresh Graph
    with tf.Session(graph=tf.Graph()) as sess:
        # We import the meta graph in the current default Graph
        saver = tf.train.import_meta_graph(input_checkpoint + '.meta', clear_devices=clear_devices)

        # We restore the weights
        saver.restore(sess, input_checkpoint)

        # We use a built-in TF helper to export variables to constants
        output_graph_def = tf.graph_util.convert_variables_to_constants(
            sess,  # The session is used to retrieve the weights
            tf.get_default_graph().as_graph_def(),  # The graph_def is used to retrieve the nodes
            output_nodes  # The output node names are used to select the useful nodes
        )

        # Finally we serialize and dump the output graph to the filesystem
        with tf.gfile.GFile(output_graph, "wb") as f:
            f.write(output_graph_def.SerializeToString())
        print("%d ops in the final graph." % len(output_graph_def.node))

    return output_graph_def
1302163
def _load_track_estimates(track, estimates_dir, output_dir):
    """"""
    user_results = {}
    track_estimate_dir = os.path.join(
        estimates_dir,
        track.subset,
        track.name
    )
    for target in glob.glob(
        track_estimate_dir + '/*.wav'
    ):

        target_name = op.splitext(
            os.path.basename(target)
        )[0]
        try:
            target_audio, _ = sf.read(
                target,
                always_2d=True
            )
            user_results[target_name] = target_audio
        except RuntimeError:
            pass

    if user_results:
        eval_mus_track(
            track,
            user_results,
            output_dir=output_dir
        )

    return None
411930
def run_track(track,
              result_hosts=None,
              crate_root=None,
              output_fmt=None,
              logfile_info=None,
              logfile_result=None,
              failfast=False,
              sample_mode='reservoir'):
    """"""
    with Logger(output_fmt=output_fmt,
                logfile_info=logfile_info,
                logfile_result=logfile_result) as log:
        executor = Executor(
            track_dir=os.path.dirname(track),
            log=log,
            result_hosts=result_hosts,
            crate_root=crate_root,
            fail_fast=failfast,
            sample_mode=sample_mode
        )
        error = executor.execute(toml.load(track))
        if error:
            sys.exit(1)
1078537
def store(self):
        '''
        
        '''
        for var_name in self.track_vars:
            value_now = getattr(self,var_name)
            getattr(self,var_name + '_hist').append(value_now)
1036087
def next_undecoded_checkpoint(model_dir, timeout_mins=240):
  """"""
  last_ckpt = None
  last_step = 0
  while True:
    # Get the latest checkpoint.
    last_ckpt = tf.contrib.training.wait_for_new_checkpoint(
        model_dir, last_ckpt, seconds_to_sleep=60, timeout=60 * timeout_mins)
    # Get all the checkpoint from the model dir.
    ckpt_path = tf.train.get_checkpoint_state(model_dir)
    all_model_checkpoint_paths = ckpt_path.all_model_checkpoint_paths
    ckpt_step = np.inf
    next_ckpt = None
    # Find the next checkpoint to eval based on last_step.
    for ckpt in all_model_checkpoint_paths:
      step = int(os.path.basename(ckpt).split("-")[1])
      if step > last_step and step < ckpt_step:
        ckpt_step = step
        next_ckpt = ckpt

    # If all the checkpoints have been evaluated.
    if last_ckpt is None and next_ckpt is None:
      tf.logging.info(
          "Eval timeout: no new checkpoints within %dm" % timeout_mins)
      break

    if next_ckpt is not None:
      last_step = ckpt_step
      last_ckpt = next_ckpt

    yield last_ckpt
188080
def build_callbacks(self):
        ''''''
        # checkpoint
        filepath = os.path.join(CHECKPOINT_DIR, 'weights.best.hdf5')
        checkpoint = ModelCheckpoint(filepath, monitor='val_loss', verbose=1, save_best_only=True, mode='auto')
                                
                                
        self.callbacks = [checkpoint]
1360415
def checkpoint(self, message, header=None, delay=0, **kwargs):
        
        if not self.transport:
            raise ValueError(
                "This RecipeWrapper object does not contain "
                "a reference to a transport object."
            )

        if not self.recipe_step:
            raise ValueError(
                "This RecipeWrapper object does not contain "
                "a recipe with a selected step."
            )

        kwargs["delay"] = delay

        self._send_to_destination(
            self.recipe_pointer, header, message, kwargs, add_path_step=False
        )
358057
def _extract_traceback(start):
    
    tb = sys.exc_info()[2]
    for i in range(start):
        tb = tb.tb_next
    return _parse_traceback(tb)
87754
def get_checkpoint_files(self):
    
    checkpoint_files = list(self.__checkpoint_files)
    if isinstance(self.job(), CondorDAGJob):
        checkpoint_files = checkpoint_files + self.job().get_checkpoint_files()
    return checkpoint_files
410180
@Override
	public CheckpointData getCheckpointData(CheckpointDataKey key) {
		logger.entering(CLASSNAME, "getCheckpointData", key==null ? "<null>" : key);
		CheckpointData checkpointData = queryCheckpointData(key.getCommaSeparatedKey());
		logger.exiting(CLASSNAME, "getCheckpointData", checkpointData==null ? "<null>" : checkpointData);
		return checkpointData;
	}
370564
def track_list(self,*args):
        '''
        
        '''
        noargs = len(args) == 0
        return np.unique(self.track) if noargs else np.unique(self.track.compress(args[0]))
370169
def get_tracks(self):
        """"""

        return _extract_tracks(
            self._request(self.ws_prefix + ".getInfo", cacheable=True), self.network
        )
820551
def advance_to_checkpoint(self, checkpoint):
        
        if checkpoint in self._checkpoints:
            for cp in self._checkpoints:
                self.insert(cp)
                if cp == checkpoint:
                    return cp
        else:
            raise InvalidCheckpointError(checkpoint)
529461
def _tracker(self, _observer_, _self_, *args, **kwds):
        
        self.track_object(_self_,
                          name=_observer_.name,
                          resolution_level=_observer_.detail,
                          keep=_observer_.keep,
                          trace=_observer_.trace)
        _observer_.init(_self_, *args, **kwds)