Use carefully to reset the episode count to 0.
343449
def reinit(self):
        """"""
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.server, self.port))
        self._hello(sock)

        comms.send_message(sock, ("<Init>" + self._get_token() + "</Init>").encode())
        reply = comms.recv_message(sock)
        sock.close()
        ok, = struct.unpack('!I', reply)
        return ok != 0
766648
public final void reset() {
    numCoupons = 0;
    mergeFlag = false;
    fiCol = 0;

    windowOffset = 0;
    slidingWindow = null;
    pairTable = null;

    kxp = 1 << lgK;
    hipEstAccum = 0;
  }
115201
def _start_new_episode(self):
        

        # flush any data left over from the previous episode if any interactions have happened
        if self.has_interaction:
            self._flush()

        # timesteps in current episode
        self.t = 0
        self.has_interaction = False
893876
def delete_episode(db, aid, episode):
    """"""
    db.cursor().execute(
        'DELETE FROM episode WHERE aid=:aid AND type=:type AND number=:number',
        {
            'aid': aid,
            'type': episode.type,
            'number': episode.number,
        })
236451
def reset(self):
        """"""
        self.filename = None
        self.dataset = None

        # about the recordings
        self.idx_filename.setText('Open Recordings...')
        self.idx_s_freq.setText('')
        self.idx_n_chan.setText('')
        self.idx_start_time.setText('')
        self.idx_end_time.setText('')

        # about the visualization
        self.idx_scaling.setText('')
        self.idx_distance.setText('')
        self.idx_length.setText('')
        self.idx_start.setText('')
1242602
public void reset()
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        { // 306998.15
            Tr.debug(tc, "reset");
        }
        out = null;
        // obs = null;
        count = 0;
        total = 0L;
        limit = -1L;
        length = -1L;
        committed = false;
        _hasWritten = false;
        _hasFlushed = false;
        response = null;
    }
816809
def reset(self):
        
        if getattr(self, 'num', None) is None:
            self.num_inst = 0
            self.sum_metric = 0.0
        else:
            self.num_inst = [0] * self.num
            self.sum_metric = [0.0] * self.num
1119043
def _reset_non_empty(self, indices):
    
    reset_video_op = tf.cond(
        self._video_condition,
        lambda: tf.py_func(self._video_reset_writer, [], []),
        tf.no_op)
    with tf.control_dependencies([reset_video_op]):
      inc_op = tf.assign_add(self._episode_counter, 1)
      with tf.control_dependencies([self.history_buffer.reset(indices),
                                    inc_op]):
        initial_frame_dump_op = tf.cond(
            self._video_condition,
            lambda: tf.py_func(self._video_dump_frames,  # pylint: disable=g-long-lambda
                               [self.history_buffer.get_all_elements()], []),
            tf.no_op)
        observ_assign_op = self._observ.assign(
            self.history_buffer.get_all_elements()[:, -1, ...])
        with tf.control_dependencies([observ_assign_op, initial_frame_dump_op]):
          reset_model_op = tf.assign(self._reset_model, tf.constant(1.0))
          with tf.control_dependencies([reset_model_op]):
            return tf.gather(self._observ.read_value(), indices)
789889
def reset(self):
        """"""
        self.buffer.clear()
        self._count = 0
        self._scanned = 0
        self._exhausted = False
        self.request.pop("ExclusiveStartKey", None)
494786
def reset(self):
        
        self.prevframe = None
        self.wasmoving = False
        self.t0 = 0
        self.ismoving = False
1191445
def reset(self):
        '''
        '''
        for index in range(self.counts_len):
            self.counts[index] = 0
        self.total_count = 0
        self.min_value = sys.maxsize
        self.max_value = 0
        self.start_time_stamp_msec = sys.maxsize
        self.end_time_stamp_msec = 0
1087337
private function deleteOriginalIfConfigured() {
        $episode = $this->oktolab_media->getEpisode($this->args['uniqID']);
        if (!$this->getContainer()->getParameter('oktolab_media.keep_original')) {
            $this->logbook->info(
                'oktolab_media.episode_encode_remove_old_media',
                [],
                $this->args['uniqID']
            );
            if (count($episode->getMedia())) {
                // check if any media is incomplete.
                $all_media_ok = true;
                foreach ($episode->getMedia() as $media) {
                    if ($media->getProgress() < 100) {
                        $all_media_ok = false;
                    }
                }
                if ($all_media_ok) { // if all media ok, replace original file
                    $this->getContainer()->get('oktolab_media_helper')->deleteVideo($episode);
                    $best_media = $episode->getMedia()[0];
                    foreach ($episode->getMedia() as $media) {
                        if ($media->getSortNumber() > $best_media->getSortNumber()) {
                            $best_media = $media;
                        }
                    }
                    $episode->setVideo($best_media->getAsset());
                } else { // some media were not okay. keep original for further encoding.
                    $episode->setTechnicalStatus(Episode::STATE_PROGRESS_FAILED);
                    $this->logbook->info(
                        'oktolab_media.episode_encode_media_failed',
                        [],
                        $this->args['uniqID']
                    );
                }
                $this->em->persist($episode);
                $this->em->flush();
            }
        }
    }
253258
private void reset() {
    size = 0;
    qualifier_index = 0;
    value_index = 0;
    base_time = Long.MIN_VALUE;
    last_timestamp = Long.MIN_VALUE;
  }
711100
def reset(self):
        ''''''
        if self.__row_number > self.__sample_size:
            self.__parser.reset()
            self.__extract_sample()
            self.__extract_headers()
        self.__row_number = 0
1372675
def begin_episode(self, agent_indices):
    
    with tf.name_scope('begin_episode/'):
      if self._last_state is None:
        reset_state = tf.no_op()
      else:
        reset_state = utility.reinit_nested_vars(
            self._last_state, agent_indices)
      reset_buffer = self._current_episodes.clear(agent_indices)
      with tf.control_dependencies([reset_state, reset_buffer]):
        return tf.constant('')
796763
public void reset() {
        if (debug) LogD("Count reset");
        editor.putInt(KEY_COUNT, 0);
        editor.putBoolean(KEY_CLICKED, false);
        editor.putLong(KEY_LAST_CRASH, 0L);
        commitEditor();
    }
873659
def reset(self):
    """"""
    self._frame_counter = 0
    ob_real = self.real_env.reset()
    # Initialize simulated environment with frames from real one.
    self.sim_env.add_to_initial_stack(ob_real)
    for _ in range(3):
      ob_real, _, _, _ = self.real_env.step(self.name_to_action_num["NOOP"])
      self.sim_env.add_to_initial_stack(ob_real)
    ob_sim = self.sim_env.reset()
    assert np.all(ob_real == ob_sim)
    self._last_step_tuples = self._pack_step_tuples((ob_real, 0, False, {}),
                                                    (ob_sim, 0, False, {}))
    self.set_zero_cumulative_rewards()
    ob, _, _, _ = self._player_step_tuple(self._last_step_tuples)
    return ob