Model: Shuu12121/CodeSearch-ModernBERT-Owl-ph2
Author: Shuu12121
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, modernbert, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:799680, loss:MultipleNegativesRankingLoss, arxiv:1908.10084, arxiv:1705.00652, base_model:Shuu12121/CodeModernBERT-Owl-v1, base_model:finetune:Shuu12121/CodeModernBERT-Owl-v1, text-embeddings-inference, endpoints_compatible, region:us
Base models (finetune): id: Shuu12121/CodeModernBERT-Owl-v1
Card metadata: tags: sentence-transformers, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:799680, loss:MultipleNegativesRankingLoss
base_model: Shuu12121/CodeModernBERT-Owl-v1
widget: source_sentence: Disconnects the pool.

Does everything that +clear+ does, except if the pool is closed
this method does nothing but +clear+ would raise PoolClosedError.

@since 2.1.0
@api private
sentences: def disconnect!(options = nil)
        do_clear(options)
      rescue Error::PoolClosedError
        # The "disconnected" state is between closed and paused.
        # When we are trying to disconnect the pool, permit the pool to be
        # already closed.
      end, func TestNamedTupleWithEscapedColumns(t *testing.T) {
	TestProtocols(t, func(t *testing.T, protocol clickhouse.Protocol) {
		conn, err := GetNativeConnection(t, protocol, nil, nil, nil)
		ctx := context.Background()
		require.NoError(t, err)
		// https://github.com/ClickHouse/ClickHouse/pull/36544
		if !CheckMinServerServerVersion(conn, 22, 5, 0) {
			t.Skip(fmt.Errorf("unsupported clickhouse version"))
			return
		}
		const ddl = "CREATE TABLE test_tuple (Col1 Tuple(`56` String, `a22\\`` Int64)) Engine MergeTree() ORDER BY tuple()"
		defer func() {
			conn.Exec(ctx, "DROP TABLE IF EXISTS test_tuple")
		}()
		require.NoError(t, conn.Exec(ctx, ddl))
		batch, err := conn.PrepareBatch(ctx, "INSERT INTO test_tuple")
		require.NoError(t, err)
		var (
			col1Data = map[string]any{"56": "A", "a22`": int64(1)}
		)
		require.NoError(t, batch.Append(col1Data))
		require.Equal(t, 1, batch.Rows())
		require.NoError(t, batch.Send())
		var col1 map[string]any
		require.NoError(t, conn.QueryRow(ctx, "SELECT * FROM test_tuple").Scan(&col1))
		assert.Equal(t, col1Data, col1)
	})
}, def parse_region(url)
            parts = URI.parse(url).host.split('.')
            parts.each_with_index do |part, index|
              if part == 'sqs'
                # assume region is the part right after the 'sqs' part
                return parts[index + 1]
              end
            end
            nil # no region found
          end, source_sentence: Cancel a running workflow by sync job ID.

        This will search for workflows with IDs matching the pattern sync-{sync_job_id}-*
        and cancel them. The workflow will catch the CancelledError and update the
        sync job status to CANCELLED.

        Args:
            sync_job_id: The sync job ID to cancel

        Returns:
            True if a workflow was found and cancelled, False otherwise
sentences: async def cancel_sync_job_workflow(self, sync_job_id: str) -> bool:
        """
        """
        try:
            client = await temporal_client.get_client()

            # List workflows to find the one matching our sync job
            # Note: In production, you might want to store the workflow ID
            # when starting it for direct lookup
            workflows = []
            async for workflow in client.list_workflows(
                query=f'WorkflowId STARTS_WITH "sync-{sync_job_id}-"'
            ):
                workflows.append(workflow)

            if not workflows:
                logger.warning(f"No running workflow found for sync job {sync_job_id}")
                return False

            # Cancel the workflow(s)
            for workflow in workflows:
                handle = client.get_workflow_handle(workflow.id)
                await handle.cancel()
                logger.info(
                    f"Successfully cancelled workflow {workflow.id} for sync job {sync_job_id}"
                )

            return True

        except Exception as e:
            logger.error(f"Failed to cancel workflow for sync job {sync_job_id}: {e}")
            raise, def __init__(name, account):
        """
        
        """, renderRows = async (
  table,
  viewname,
  { columns, layout },
  extra,
  rows,
  state
) => {
  //console.log(columns);
  //console.log(layout);
  if (!columns || !layout) return "View not yet built";

  const fields = table.getFields();

  const role = extra.req.user ? extra.req.user.role_id : 100;
  var views = {};
  const getView = async (name, relation) => {
    if (views[name]) return views[name];
    const view_select = parse_view_select(name, relation);
    const view = View.findOne({ name: view_select.viewname });
    if (!view) return false;
    if (view.table_id === table.id) view.table = table;
    else view.table = Table.findOne({ id: view.table_id });
    view.view_select = view_select;
    views[name] = view;
    return view;
  };
  await set_load_actions_join_fieldviews({
    table,
    layout,
    fields,
    req: extra.req,
    res: extra.res,
  });

  const owner_field = await table.owner_fieldname();
  const subviewExtra = { ...extra };
  if (extra.req?.generate_email) {
    // no mjml markup for for nested subviews, only for the top view
    subviewExtra.req = { ...extra.req, isSubView: true };
  }
  return await asyncMap(rows, async (row) => {
    await eachView(layout, async (segment) => {
      // do all the parsing with data here? make a factory
      const view = await getView(segment.view, segment.relation);
      if (!view)
        throw new InvalidConfiguration(
          `View ${viewname} incorrectly configured: cannot find view ${segment.view}`
        );
      view.check_viewtemplate();
      if (view.viewtemplateObj.renderRows && view.view_select.type === "Own") {
        segment.contents = (
          await view.viewtemplateObj.renderRows(
            view.table,
            view.name,
            view.configuration,
            subviewExtra,
            [row],
            state
          )
        )[0];
      } else {
        let state1 = {};
        const pk_name = table.pk_name;
        const get_row_val = (k) => {
          //handle expanded joinfields
          if (row[k] === null) return null;
          if (row[k]?.id === null) return null;
          return row[k]?.id || row[k];
        };
        const get_user_id = () => (extra.req.user ? extra.req.user.id : 0);
        if (view.view_select.type === "RelationPath" && view.table_id) {
          const targetTbl = Table.findOne({ id: view.table_id });
          const relation = new Relation(
            segment.relation,
            targetTbl.name,
            displayType(await view.get_state_fields())
          );
          state1 = pathToState(
            relation,
            relation.isFixedRelation() ? get_user_id : get_row_val
          );
        } else {
          switch (view.view_select.type) {
            case "Own":
              state1 = { [pk_name]: get_row_val(pk_name) };
              break;
            case "Independent":
              state1 = {};
              break;
            case "ChildList":
            case "OneToOneShow":
              state1 = {
                [view.view_select.through
                  ? `${view.view_select.throughTable}.${view.view_select.through}.${view.view_select.table_name}.${view.view_select.field_name}`
                  : view.view_select.field_name]: get_row_val(pk_name),
              };
              break;
            case "ParentShow":
              //todo set by pk name of parent tablr
              state1 = {
                id: get_row_val(view.view_select.field_name),
              };
              break;
          }
        }
        const extra_state = segment.extra_state_fml
          ? eval_expression(
              segment.extra_state_fml,
              {
                ...dollarizeObject(state),
                session_id: getSessionId(extra.req),
                ...row,
              },
              extra.req.user,
              `Extra state formula for view ${view.name}`
            )
          : {};
        const { id, ...outerState } = state;
        //console.log(segment);
        if (segment.state === "local") {
          const state2 = { ...state1, ...extra_state };
          const qs = stateToQueryString(state2, true);
          if (
            view.name === viewname &&
            JSON.stringify(state) === JSON.stringify(state2)
          )
            throw new InvalidConfiguration(
              `View ${view.name} embeds itself with same state; inifinite loop detected`
            );
          segment.contents = div(
            {
              class: "d-inline",
              "data-sc-embed-viewname": view.name,
              "data-sc-local-state": `/view/${view.name}${qs}`,
            },
            await view.run(state2, subviewExtra, view.isRemoteTable())
          );
        } else {
          const state2 = { ...outerState, ...state1, ...extra_state };
          const qs = stateToQueryString(state2, true);

          if (
            view.name === viewname &&
            JSON.stringify(state) === JSON.stringify(state2)
          )
            throw new InvalidConfiguration(
              `View ${view.name} embeds itself with same state; inifinite loop detected`
            );
          segment.contents = div(
            {
              class: "d-inline",
              "data-sc-embed-viewname": view.name,
              "data-sc-view-source": `/view/${view.name}${qs}`,
            },
            await view.run(state2, subviewExtra, view.isRemoteTable())
          );
        }
      }
    });
    const user_id = extra.req.user ? extra.req.user.id : null;

    const is_owner =
      table.ownership_formula && user_id && role > table.min_role_read
        ? await table.is_owner(extra.req.user, row)
        : owner_field && user_id && row[owner_field] === user_id;

    return render(
      row,
      fields,
      layout,
      viewname,
      table,
      role,
      extra.req,
      is_owner,
      state,
      extra
    );
  });
}, source_sentence: AddFlags adds flags related to NodeLifecycleController for controller manager to the specified FlagSet.
sentences: func (o *NodeLifecycleControllerOptions) AddFlags(fs *pflag.FlagSet) {
	if o == nil {
		return
	}

	fs.DurationVar(&o.NodeStartupGracePeriod.Duration, "node-startup-grace-period", o.NodeStartupGracePeriod.Duration,
		"Amount of time which we allow starting Node to be unresponsive before marking it unhealthy.")
	fs.DurationVar(&o.NodeMonitorGracePeriod.Duration, "node-monitor-grace-period", o.NodeMonitorGracePeriod.Duration,
		"Amount of time which we allow running Node to be unresponsive before marking it unhealthy. "+
			"Must be N times more than kubelet's nodeStatusUpdateFrequency, "+
			"where N means number of retries allowed for kubelet to post node status. "+
			"This value should also be greater than the sum of HTTP2_PING_TIMEOUT_SECONDS and HTTP2_READ_IDLE_TIMEOUT_SECONDS")
	fs.Float32Var(&o.NodeEvictionRate, "node-eviction-rate", 0.1, "Number of nodes per second on which pods are deleted in case of node failure when a zone is healthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters.")
	fs.Float32Var(&o.SecondaryNodeEvictionRate, "secondary-node-eviction-rate", 0.01, "Number of nodes per second on which pods are deleted in case of node failure when a zone is unhealthy (see --unhealthy-zone-threshold for definition of healthy/unhealthy). Zone refers to entire cluster in non-multizone clusters. This value is implicitly overridden to 0 if the cluster size is smaller than --large-cluster-size-threshold.")
	fs.Int32Var(&o.LargeClusterSizeThreshold, "large-cluster-size-threshold", 50, fmt.Sprintf("Number of nodes from which %s treats the cluster as large for the eviction logic purposes. --secondary-node-eviction-rate is implicitly overridden to 0 for clusters this size or smaller. Notice: If nodes reside in multiple zones, this threshold will be considered as zone node size threshold for each zone to determine node eviction rate independently.", names.NodeLifecycleController))
	fs.Float32Var(&o.UnhealthyZoneThreshold, "unhealthy-zone-threshold", 0.55, "Fraction of Nodes in a zone which needs to be not Ready (minimum 3) for zone to be treated as unhealthy. ")
}, func (v Value) IsNull() bool {
	return v.Val == nil || v.Typ == querypb.Type_NULL_TYPE
}, public function response(array $errors)
    {
        if ($this->ajax() || $this->wantsJson()) {
            return new JsonResponse($errors, 422);
        }

        return $this->redirector->to($this->getRedirectUrl())
                                        ->withInput($this->except($this->dontFlash))
                                        ->withErrors($errors, $this->errorBag);
    }, source_sentence: Count of all the processing errors in this task and its subtasks.

Generated from protobuf field <code>int32 total_processing_error_count = 21;</code>
@return int
sentences: fn add_helper(&self, msg: SignedMessage) -> Result<(), Error> {
        let from = msg.from();
        let cur_ts = self.cur_tipset.lock().clone();
        add_helper(
            self.api.as_ref(),
            self.bls_sig_cache.as_ref(),
            self.pending.as_ref(),
            msg,
            self.get_state_sequence(&from, &cur_ts)?,
        )
    }, public function getTotalProcessingErrorCount()
    {
        return $this->total_processing_error_count;
    }, def datetime_utc_to_local(dt):
	"""
	
	"""
	dt = dt.replace(tzinfo=dateutil.tz.tzutc())
	dt = dt.astimezone(dateutil.tz.tzlocal())
	return dt.replace(tzinfo=None), source_sentence: Computes the absolute value of each element retrieved from a strided input array `x` via a callback function and assigns each result to an element in a strided output array `y`.

@param {NonNegativeInteger} N - number of indexed elements
@param {Collection} x - input array/collection
@param {integer} strideX - `x` stride length
@param {NonNegativeInteger} offsetX - starting `x` index
@param {Collection} y - destination array/collection
@param {integer} strideY - `y` stride length
@param {NonNegativeInteger} offsetY - starting `y` index
@param {Callback} clbk - callback
@param {*} [thisArg] - callback execution context
@returns {Collection} `y`

@example
function accessor( v ) {
    return v * 2.0;
}

var x = [ 1.0, -2.0, 3.0, -4.0, 5.0 ];
var y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];

absBy( x.length, x, 1, 0, y, 1, 0, accessor );

console.log( y );
// => [ 2.0, 4.0, 6.0, 8.0, 10.0 ]
sentences: public ArrayList<Skyline> findSkyline(int start, int end) {
        // Base case: only one building, return its skyline.
        if (start == end) {
            ArrayList<Skyline> list = new ArrayList<>();
            list.add(new Skyline(building[start].left, building[start].height));
            list.add(new Skyline(building[end].right, 0)); // Add the end of the building
            return list;
        }

        int mid = (start + end) / 2;

        ArrayList<Skyline> sky1 = this.findSkyline(start, mid); // Find the skyline of the left half
        ArrayList<Skyline> sky2 = this.findSkyline(mid + 1, end); // Find the skyline of the right half
        return this.mergeSkyline(sky1, sky2); // Merge the two skylines
    }, def get_supported_systems_info
          request(
            :expects    => 200,
            :idempotent => true,
            :method     => 'GET',
            :parser     => Fog::ToHashDocument.new,
            :path       => 'supportedSystemsInfo'
          )
        end, function absBy( N, x, strideX, offsetX, y, strideY, offsetY, clbk, thisArg ) {
	return mapBy( N, x, strideX, offsetX, y, strideY, offsetY, abs, clbk, thisArg ); // eslint-disable-line max-len
}
pipeline_tag: sentence-similarity
library_name: sentence-transformers
Likes: 0 | All-time downloads: 100
Created: 2025-07-25 03:43:33