Model: Shuu12121/CodeSearch-ModernBERT-Crow-v1.1-Plus
Author: Shuu12121
Pipeline: sentence-similarity
Library: sentence-transformers
Tags: sentence-transformers, safetensors, modernbert, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:2392064, loss:CachedMultipleNegativesSymmetricRankingLoss, arxiv:1908.10084, base_model:Shuu12121/CodeModernBERT-Crow-v1.1, base_model:finetune:Shuu12121/CodeModernBERT-Crow-v1.1, text-embeddings-inference, endpoints_compatible, region:us
Base models (finetune): id: Shuu12121/CodeModernBERT-Crow-v1.1
Card metadata: tags: sentence-transformers, sentence-similarity, feature-extraction, dense, generated_from_trainer, dataset_size:2392064, loss:CachedMultipleNegativesSymmetricRankingLoss
base_model: Shuu12121/CodeModernBERT-Crow-v1.1
widget: source_sentence: Encapsulates the work with test rules.
@param {array} aRules The test rules
@constructor
@private
sentences: createImageResizer = (width, height) => (source) => {
  const resized = new PNG({ width, height, fill: true });
  PNG.bitblt(source, resized, 0, 0, source.width, source.height, 0, 0);
  return resized;
}, TestRules = function (aRules) {
			this._aRules = aRules;
		}, function addEventTypeNameToConfig(_ref, isInteractive) {
  var topEvent = _ref[0],
      event = _ref[1];

  var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
  var onEvent = 'on' + capitalizedEvent;

  var type = {
    phasedRegistrationNames: {
      bubbled: onEvent,
      captured: onEvent + 'Capture'
    },
    dependencies: [topEvent],
    isInteractive: isInteractive
  };
  eventTypes$4[event] = type;
  topLevelEventsToDispatchConfig[topEvent] = type;
}, source_sentence: Check if a value has one or more properties and that value is not undefined.
@param {any} obj The value to check.
@returns {boolean} `true` if `obj` has one or more properties that value is not undefined.
sentences: calci = function(hashbuf, sig, pubkey) {
  for (var i = 0; i < 4; i++) {
    var Qprime;
    try {
      Qprime = getPublicKey(hashbuf, sig, i);
    } catch (e) {
      console.error(e);
      continue;
    }

    if (Qprime.point.eq(pubkey.point)) {
      sig.i = i;
      sig.compressed = pubkey.compressed;
      return sig;
    }
  }

  throw new Error('Unable to find valid recovery factor');
}, function hasDefinedProperty(obj) {
	if (typeof obj === "object" && obj !== null) {
		for (const key in obj) {
			if (typeof obj[key] !== "undefined") {
				return true;
			}
		}
	}
	return false;
}, function joinSequenceDiffsByShifting(sequence1, sequence2, sequenceDiffs) {
    if (sequenceDiffs.length === 0) {
        return sequenceDiffs;
    }
    const result = [];
    result.push(sequenceDiffs[0]);
    // First move them all to the left as much as possible and join them if possible
    for (let i = 1; i < sequenceDiffs.length; i++) {
        const prevResult = result[result.length - 1];
        let cur = sequenceDiffs[i];
        if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) {
            const length = cur.seq1Range.start - prevResult.seq1Range.endExclusive;
            let d;
            for (d = 1; d <= length; d++) {
                if (sequence1.getElement(cur.seq1Range.start - d) !== sequence1.getElement(cur.seq1Range.endExclusive - d) ||
                    sequence2.getElement(cur.seq2Range.start - d) !== sequence2.getElement(cur.seq2Range.endExclusive - d)) {
                    break;
                }
            }
            d--;
            if (d === length) {
                // Merge previous and current diff
                result[result.length - 1] = new SequenceDiff(new OffsetRange(prevResult.seq1Range.start, cur.seq1Range.endExclusive - length), new OffsetRange(prevResult.seq2Range.start, cur.seq2Range.endExclusive - length));
                continue;
            }
            cur = cur.delta(-d);
        }
        result.push(cur);
    }
    const result2 = [];
    // Then move them all to the right and join them again if possible
    for (let i = 0; i < result.length - 1; i++) {
        const nextResult = result[i + 1];
        let cur = result[i];
        if (cur.seq1Range.isEmpty || cur.seq2Range.isEmpty) {
            const length = nextResult.seq1Range.start - cur.seq1Range.endExclusive;
            let d;
            for (d = 0; d < length; d++) {
                if (!sequence1.isStronglyEqual(cur.seq1Range.start + d, cur.seq1Range.endExclusive + d) ||
                    !sequence2.isStronglyEqual(cur.seq2Range.start + d, cur.seq2Range.endExclusive + d)) {
                    break;
                }
            }
            if (d === length) {
                // Merge previous and current diff, write to result!
                result[i + 1] = new SequenceDiff(new OffsetRange(cur.seq1Range.start + length, nextResult.seq1Range.endExclusive), new OffsetRange(cur.seq2Range.start + length, nextResult.seq2Range.endExclusive));
                continue;
            }
            if (d > 0) {
                cur = cur.delta(d);
            }
        }
        result2.push(cur);
    }
    if (result.length > 0) {
        result2.push(result[result.length - 1]);
    }
    return result2;
}, source_sentence: Adds two vec2's after scaling the second operand by a scalar value

@param {vec2} out the receiving vector
@param {ReadonlyVec2} a the first operand
@param {ReadonlyVec2} b the second operand
@param {Number} scale the amount to scale b by before adding
@returns {vec2} out
sentences: async forceStripeSubscriptionToProduct(data, options) {
        if (!this._stripeAPIService.configured) {
            throw new DataImportError({
                message: tpl(messages.noStripeConnection, {action: 'force subscription to product'})
            });
        }

        // Retrieve customer's existing subscription information
        const stripeCustomer = await this._stripeAPIService.getCustomer(data.customer_id);

        // Subscription can only be forced if the customer exists
        if (!stripeCustomer) {
            throw new DataImportError({message: tpl(messages.forceNoCustomer)});
        }

        // Subscription can only be forced if the customer has an existing subscription
        if (stripeCustomer.subscriptions.data.length === 0) {
            throw new DataImportError({message: tpl(messages.forceNoExistingSubscription)});
        }

        // Subscription can only be forced if the customer does not have multiple subscriptions
        if (stripeCustomer.subscriptions.data.length > 1) {
            throw new DataImportError({message: tpl(messages.forceTooManySubscriptions)});
        }

        const stripeSubscription = stripeCustomer.subscriptions.data[0];

        // Subscription can only be forced if the existing subscription does not have multiple items
        if (stripeSubscription.items.data.length > 1) {
            throw new DataImportError({message: tpl(messages.forceTooManySubscriptionItems)});
        }

        const stripeSubscriptionItem = stripeSubscription.items.data[0];
        const stripeSubscriptionItemPrice = stripeSubscriptionItem.price;
        const stripeSubscriptionItemPriceCurrency = stripeSubscriptionItemPrice.currency;
        const stripeSubscriptionItemPriceAmount = stripeSubscriptionItemPrice.unit_amount;
        const stripeSubscriptionItemPriceType = stripeSubscriptionItemPrice.type;
        const stripeSubscriptionItemPriceInterval = stripeSubscriptionItemPrice.recurring?.interval || null;

        // Subscription can only be forced if the existing subscription has a recurring interval
        if (!stripeSubscriptionItemPriceInterval) {
            throw new DataImportError({message: tpl(messages.forceExistingSubscriptionNotRecurring)});
        }

        // Retrieve Ghost product
        let ghostProduct = await this._productRepository.get(
            {id: data.product_id},
            {...options, withRelated: ['stripePrices', 'stripeProducts']}
        );

        if (!ghostProduct) {
            throw new DataImportError({message: tpl(messages.productNotFound, {id: data.product_id})});
        }

        // If there is not a Stripe product associated with the Ghost product, ensure one is created before continuing
        if (!ghostProduct.related('stripeProducts').first()) {
            // Even though we are not updating any information on the product, calling `ProductRepository.update`
            // will ensure that the product gets created in Stripe
            ghostProduct = await this._productRepository.update({
                id: data.product_id,
                name: ghostProduct.get('name'),
                // Providing the pricing details will ensure the relevant prices for the Ghost product are created
                // on the Stripe product
                monthly_price: {
                    amount: ghostProduct.get('monthly_price'),
                    currency: ghostProduct.get('currency')
                },
                yearly_price: {
                    amount: ghostProduct.get('yearly_price'),
                    currency: ghostProduct.get('currency')
                }
            }, options);
        }

        // Find price on Ghost product matching stripe subscription item price details
        const ghostProductPrice = ghostProduct.related('stripePrices').find((price) => {
            return price.get('currency') === stripeSubscriptionItemPriceCurrency &&
                price.get('amount') === stripeSubscriptionItemPriceAmount &&
                price.get('type') === stripeSubscriptionItemPriceType &&
                price.get('interval') === stripeSubscriptionItemPriceInterval;
        });

        let stripePriceId;
        let isNewStripePrice = false;

        if (!ghostProductPrice) {
            // If there is not a matching price, create one on the associated Stripe product using the existing
            // subscription item price details and update the stripe subscription to use it
            const stripeProduct = ghostProduct.related('stripeProducts').first();

            const newStripePrice = await this._stripeAPIService.createPrice({
                product: stripeProduct.get('stripe_product_id'),
                active: true,
                nickname: stripeSubscriptionItemPriceInterval === 'month' ? 'Monthly' : 'Yearly',
                currency: stripeSubscriptionItemPriceCurrency,
                amount: stripeSubscriptionItemPriceAmount,
                type: stripeSubscriptionItemPriceType,
                interval: stripeSubscriptionItemPriceInterval
            });

            await this._stripeAPIService.updateSubscriptionItemPrice(
                stripeSubscription.id,
                stripeSubscriptionItem.id,
                newStripePrice.id,
                {prorationBehavior: 'none'}
            );

            stripePriceId = newStripePrice.id;
            isNewStripePrice = true;
        } else {
            // If there is a matching price, and the subscription is not already using it,
            // update the subscription to use it
            stripePriceId = ghostProductPrice.get('stripe_price_id');

            if (stripeSubscriptionItem.price.id !== stripePriceId) {
                await this._stripeAPIService.updateSubscriptionItemPrice(
                    stripeSubscription.id,
                    stripeSubscriptionItem.id,
                    stripePriceId,
                    {prorationBehavior: 'none'}
                );
            }
        }

        // If there is a matching price, and the subscription is already using it, nothing else needs to be done

        return {
            stripePriceId,
            isNewStripePrice
        };
    }, getPrefetchedVariantTrack() {
    if (!this.prefetchedVariant_) {
      return null;
    }
    return shaka.util.StreamUtils.variantToTrack(this.prefetchedVariant_);
  }, function scaleAndAdd(out, a, b, scale) {
    out[0] = a[0] + b[0] * scale;
    out[1] = a[1] + b[1] * scale;
    return out;
  }, source_sentence: @returns Has this player been spotted by any others?
sentences: function includes7d( x, value ) {
	var xbuf;
	var dx0;
	var dx1;
	var dx2;
	var dx3;
	var dx4;
	var dx5;
	var dx6;
	var sh;
	var S0;
	var S1;
	var S2;
	var S3;
	var S4;
	var S5;
	var S6;
	var sx;
	var ix;
	var i0;
	var i1;
	var i2;
	var i3;
	var i4;
	var i5;
	var i6;

	// Note on variable naming convention: S#, dx#, dy#, i# where # corresponds to the loop number, with `0` being the innermost loop...

	// Extract loop variables for purposes of loop interchange: dimensions and loop offset (pointer) increments...
	sh = x.shape;
	sx = x.strides;
	if ( strides2order( sx ) === 1 ) {
		// For row-major ndarrays, the last dimensions have the fastest changing indices...
		S0 = sh[ 6 ];
		S1 = sh[ 5 ];
		S2 = sh[ 4 ];
		S3 = sh[ 3 ];
		S4 = sh[ 2 ];
		S5 = sh[ 1 ];
		S6 = sh[ 0 ];
		dx0 = sx[ 6 ];                // offset increment for innermost loop
		dx1 = sx[ 5 ] - ( S0*sx[6] );
		dx2 = sx[ 4 ] - ( S1*sx[5] );
		dx3 = sx[ 3 ] - ( S2*sx[4] );
		dx4 = sx[ 2 ] - ( S3*sx[3] );
		dx5 = sx[ 1 ] - ( S4*sx[2] );
		dx6 = sx[ 0 ] - ( S5*sx[1] ); // offset increment for outermost loop
	} else { // order === 'column-major'
		// For column-major ndarrays, the first dimensions have the fastest changing indices...
		S0 = sh[ 0 ];
		S1 = sh[ 1 ];
		S2 = sh[ 2 ];
		S3 = sh[ 3 ];
		S4 = sh[ 4 ];
		S5 = sh[ 5 ];
		S6 = sh[ 6 ];
		dx0 = sx[ 0 ];                // offset increment for innermost loop
		dx1 = sx[ 1 ] - ( S0*sx[0] );
		dx2 = sx[ 2 ] - ( S1*sx[1] );
		dx3 = sx[ 3 ] - ( S2*sx[2] );
		dx4 = sx[ 4 ] - ( S3*sx[3] );
		dx5 = sx[ 5 ] - ( S4*sx[4] );
		dx6 = sx[ 6 ] - ( S5*sx[5] ); // offset increment for outermost loop
	}
	// Set a pointer to the first indexed element:
	ix = x.offset;

	// Cache a reference to the input ndarray buffer:
	xbuf = x.data;

	// Iterate over the ndarray dimensions...
	for ( i6 = 0; i6 < S6; i6++ ) {
		for ( i5 = 0; i5 < S5; i5++ ) {
			for ( i4 = 0; i4 < S4; i4++ ) {
				for ( i3 = 0; i3 < S3; i3++ ) {
					for ( i2 = 0; i2 < S2; i2++ ) {
						for ( i1 = 0; i1 < S1; i1++ ) {
							for ( i0 = 0; i0 < S0; i0++ ) {
								if ( xbuf[ ix ] === value ) {
									return true;
								}
								ix += dx0;
							}
							ix += dx1;
						}
						ix += dx2;
					}
					ix += dx3;
				}
				ix += dx4;
			}
			ix += dx5;
		}
		ix += dx6;
	}
	return false;
}, _generateIntegrityFile(lockfile, patterns, flags, workspaceLayout, artifacts) {
    var _this3 = this;

    return (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* () {
      const result = (0, (_extends2 || _load_extends()).default)({}, INTEGRITY_FILE_DEFAULTS(), {
        artifacts
      });

      result.topLevelPatterns = patterns;

      // If using workspaces, we also need to add the workspaces patterns to the top-level, so that we'll know if a
      // dependency is added or removed into one of them. We must take care not to read the aggregator (if !loc).
      //
      // Also note that we can't use of workspaceLayout.workspaces[].manifest._reference.patterns, because when
      // doing a "yarn check", the _reference property hasn't yet been properly initialized.

      if (workspaceLayout) {
        result.topLevelPatterns = result.topLevelPatterns.filter(function (p) {
          // $FlowFixMe
          return !workspaceLayout.getManifestByPattern(p);
        });

        for (var _iterator4 = Object.keys(workspaceLayout.workspaces), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
          var _ref5;

          if (_isArray4) {
            if (_i4 >= _iterator4.length) break;
            _ref5 = _iterator4[_i4++];
          } else {
            _i4 = _iterator4.next();
            if (_i4.done) break;
            _ref5 = _i4.value;
          }

          const name = _ref5;

          if (!workspaceLayout.workspaces[name].loc) {
            continue;
          }

          const manifest = workspaceLayout.workspaces[name].manifest;

          if (manifest) {
            for (var _iterator5 = (_constants || _load_constants()).DEPENDENCY_TYPES, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _iterator5[Symbol.iterator]();;) {
              var _ref6;

              if (_isArray5) {
                if (_i5 >= _iterator5.length) break;
                _ref6 = _iterator5[_i5++];
              } else {
                _i5 = _iterator5.next();
                if (_i5.done) break;
                _ref6 = _i5.value;
              }

              const dependencyType = _ref6;

              const dependencies = manifest[dependencyType];

              if (!dependencies) {
                continue;
              }

              for (var _iterator6 = Object.keys(dependencies), _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _iterator6[Symbol.iterator]();;) {
                var _ref7;

                if (_isArray6) {
                  if (_i6 >= _iterator6.length) break;
                  _ref7 = _iterator6[_i6++];
                } else {
                  _i6 = _iterator6.next();
                  if (_i6.done) break;
                  _ref7 = _i6.value;
                }

                const dep = _ref7;

                result.topLevelPatterns.push(`${dep}@${dependencies[dep]}`);
              }
            }
          }
        }
      }

      result.topLevelPatterns.sort((_misc || _load_misc()).sortAlpha);

      if (flags.checkFiles) {
        result.flags.push('checkFiles');
      }

      if (flags.flat) {
        result.flags.push('flat');
      }

      if (_this3.config.ignoreScripts) {
        result.flags.push('ignoreScripts');
      }
      if (_this3.config.focus) {
        result.flags.push('focus: ' + _this3.config.focusedWorkspaceName);
      }

      if (_this3.config.production) {
        result.flags.push('production');
      }

      if (_this3.config.plugnplayEnabled) {
        result.flags.push('plugnplay');
      }

      const linkedModules = _this3.config.linkedModules;

      if (linkedModules.length) {
        result.linkedModules = linkedModules.sort((_misc || _load_misc()).sortAlpha);
      }

      for (var _iterator7 = Object.keys(lockfile), _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _iterator7[Symbol.iterator]();;) {
        var _ref8;

        if (_isArray7) {
          if (_i7 >= _iterator7.length) break;
          _ref8 = _iterator7[_i7++];
        } else {
          _i7 = _iterator7.next();
          if (_i7.done) break;
          _ref8 = _i7.value;
        }

        const key = _ref8;

        result.lockfileEntries[key] = lockfile[key].resolved || '';
      }

      for (var _iterator8 = _this3._getModulesFolders({ workspaceLayout }), _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _iterator8[Symbol.iterator]();;) {
        var _ref9;

        if (_isArray8) {
          if (_i8 >= _iterator8.length) break;
          _ref9 = _iterator8[_i8++];
        } else {
          _i8 = _iterator8.next();
          if (_i8.done) break;
          _ref9 = _i8.value;
        }

        const modulesFolder = _ref9;

        if (yield (_fs || _load_fs()).exists(modulesFolder)) {
          result.modulesFolders.push(path.relative(_this3.config.lockfileFolder, modulesFolder));
        }
      }

      if (flags.checkFiles) {
        const modulesRoot = _this3._getModulesRootFolder();

        result.files = (yield _this3._getIntegrityListing({ workspaceLayout })).map(function (entry) {
          return path.relative(modulesRoot, entry);
        }).sort((_misc || _load_misc()).sortAlpha);
      }

      return result;
    })();
  }, get isSpotted() {
        return this.getProp("DT_BaseEntity", "m_bSpotted");
    }, source_sentence: The toggle content, if left empty it will render the default toggle (seen above).
sentences: update = () => {

	            const timerId = window.requestAnimationFrame( update );
	            const elapsed = performance.now() - timestamp;
	            const progress = elapsed / duration;
	            const opacity = 1.0 - progress > 0 ? 1.0 - progress : 0;
	            const radius = progress * canvasWidth * 0.5 / dpr;

	            context.clearRect( 0, 0, canvasWidth, canvasHeight );
	            context.beginPath();
	            context.arc( x, y, radius, 0, Math.PI * 2 );
	            context.fillStyle = `rgba(${color.r * 255}, ${color.g * 255}, ${color.b * 255}, ${opacity})`;
	            context.fill();
	            context.closePath();

	            if ( progress >= 1.0 ) {

	                window.cancelAnimationFrame( timerId );
	                this.updateCanvasArcByProgress( 0 );

	                /**
	                 * Reticle ripple end event
	                 * @type {object}
	                 * @event Reticle#reticle-ripple-end
	                 */
	                this.dispatchEvent( { type: 'reticle-ripple-end' } );

	            }

	            material.map.needsUpdate = true;

	        }, static _headersDictToHeadersArray(headersDict) {
    const result = [];
    for (const name of Object.keys(headersDict)) {
      const values = headersDict[name].split('\n');
      for (let i = 0; i < values.length; ++i) {
        result.push({name: name, value: values[i]});
      }
    }
    return result;
  }, function NavbarToggle() {
	    (0, _classCallCheck3['default'])(this, NavbarToggle);
	    return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments));
	  }
pipeline_tag: sentence-similarity
library_name: sentence-transformers
Likes: 1 | All-time downloads: 51
Created: 2025-09-19 04:58:07