code
stringlengths
0
30.8k
source
stringclasses
6 values
language
stringclasses
9 values
__index_level_0__
int64
0
100k
func (nt *NamespacesTester) EnsureDumpAllForNamespace( md namespace.Metadata, ) (DecodedBlockMap, error) { id := md.ID().String() for _, acc := range nt.Accumulators { if acc.ns != id { continue } writeMap := acc.writeMap loadedBlockMap := acc.dumpLoadedBlocks() merged := make(DecodedBlockMap, len(write...
function
go
99,800
bool Environment::Initialize(const vec2i& , const char* , WindowMode ) { #if defined(_WIN32) && !defined(FPLBASE_GLES) #define GLEXT(type, name, required) \ LOOKUP_GL_FUNCTION(type, name, required, wglGetProcAddress) GLBASEEXTS GLEXTS #undef GLEXT #endif #...
function
c++
99,801
protected void createStartEvents(Attributes attributes, Collection[] events) { Map nsMap = null; List attrs = null; if (namespaces != null) { Iterator prefixes = namespaces.getDeclaredPrefixes(); while (prefixes.hasNext()) { String prefix = (String) prefixes.next(); String uri = ...
function
java
99,802
private string SetPathToLoad(CultureInfo cultureInfo) { if (Directory.Exists(Path.Combine(LocalizationPath, cultureInfo.Name))) pathToLoad = SelectLanguageFolder(cultureInfo, true); else if (Directory.Exists(Path.Combine(LocalizationPath, cultureInfo.TwoLetterISOLanguageName))) pathToLoad = SelectLanguageFolder(c...
function
c#
99,803
TEST_F(TrackedObjectsTest, LifeCycleMidDeactivatedToSnapshotMainThread) { ThreadData::InitializeAndSetTrackingStatus(ThreadData::PROFILING_ACTIVE); const char kFunction[] = "LifeCycleMidDeactivatedToSnapshotMainThread"; Location location(kFunction, kFile, kLineNumber, NULL); TallyABirth(location, kMainThreadNam...
function
c++
99,804
public byte[] evaluateChallenge(byte[] challengeData) throws SaslException { if (challengeData.length > MAX_CHALLENGE_LENGTH) { throw new SaslException( "DIGEST-MD5: Invalid digest-challenge length. Got: " + challengeData.length + " Expected < " + MAX_CHALLENGE_LENGT...
function
java
99,805
BeaconSetupService::SerialisedMsg BeaconSetupService::GetComplaintAnswers() { std::lock_guard<std::mutex> lock(mutex_); complaints_manager_.Finish(valid_dkg_members_); complaint_answers_manager_.Init(complaints_manager_.Complaints()); SharesExposedMap complaint_answer; for (auto const &reporter : complaints_m...
function
c++
99,806
def inflate(self, shift=None, volume=None): if shift is not None and volume is not None: raise ValueError("Only shift of volume should be given to inflate") if shift is None and volume is None: raise ValueError("Either shift or volume should be specified to inflate") if s...
function
python
99,807
private void readResponse(byte[] data) { try { ParsedMessage parsed = this.parser.parseMsg(data); if (parsed instanceof AuthParsedMessage) { int requestId = ((AuthParsedMessage) parsed).getRequestId(); RequestResult res = results.get(requestId); ...
function
java
99,808
fn map_unique_attr<T, F>(ast: &syn::DeriveInput, name: &str, f: F) -> Option<T> where F: Fn(syn::Meta) -> T, { let mut t_iter = ast .attrs .iter() .filter_map(syn::Attribute::interpret_meta) .filter(|meta| meta.name() == name) .map(f); match (t_iter.next(), t_iter.nex...
function
rust
99,809
public static UvssSetTriggerActionSyntax SetTriggerAction( SyntaxToken setKeyword, UvssPropertyNameSyntax propertyName, UvssSelectorWithParenthesesSyntax selector, UvssPropertyValueWithBracesSyntax value) { return new UvssSetTriggerActionSyntax( ...
function
c#
99,810
Block* split_block(Block* blk, unsigned int sz) { if (blk->size < sz + sizeof(Block)) { return NULL; } blk->size = blk->size - (sz + sizeof(Block)); if (blk->next) { blk->next->prev_size = blk->size; } return (Block*)(blk + (blk->size + sizeof(blk))); }
function
c
99,811
public class AmqpSerializer { private static final AmqpSerializer instance; private final CustomType customType = new CustomType(); static { instance = new AmqpSerializer(); } /** * Encodes an object graph into bytes. * @param buffer Buffer to save the bytes. The buffer's...
class
java
99,812
public static Color showDialog(Component component, String title, Color initial) { JColorChooser choose = new JColorChooser(initial); JDialog dialog = createDialog(component, title, true, choose, null, null); dialog.getContentPane().add(choose); dialog.pack(); dial...
function
java
99,813
public class VipCustomer { private String name; private String emailAddress; private double creditLimit; public VipCustomer() { this("default name", "default@email.com", 1000.00); } public VipCustomer(String name, String emailAddress) { this(name, emailAddress, 3000.00); } ...
class
java
99,814
protected static int levelCapacity(int lev) { if(lev == 1) return 2; else if(lev == 2) return 8; else if(lev == 3) return 18; else if(lev == 4) return 32; else if(lev == 5) return 32; else if(lev == 6) return 18; else if(lev == 7) return 8; return 0; }
function
java
99,815
def select(self, id, start, stop, rate=False, maxlen=float("inf"), fixed=0): minstep = total_seconds(stop - start) / maxlen for index, model in enumerate(self): if start >= model.start(id) and model.step >= minstep: break points = model.select(id, dt__gte=start, dt__l...
function
python
99,816
@Override public void run() { if (shouldSkipCheck()) { skippedHealthChecks++; LOG.info("Detected long delay in scheduling HB processing thread. " + "Skipping heartbeat checks for one iteration."); } else { checkNodesHealth(); } This time taken to work can skew the heartbea...
function
java
99,817
def well_to_index( plate, row, column, across_row_first=True, element_coordinates=[None,None] ): row = row.lower() if( plate < 1 or plate > 4 or not row in [ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h' ] or column < 1 or column > 12 ): print( 'Error: spreadsheet cell: %s%s: bad well values: plate: %d ...
function
python
99,818
private bool LoadCollections(XPathNavigator source, XmlNamespaceManager manager) { bool wasLoaded = false; Guard.ArgumentNotNull(source, "source"); Guard.ArgumentNotNull(manager, "manager"); XPathNodeIterator authorIterator = source.Select("ato...
function
c#
99,819
def createCrossholeData(sensors): from itertools import product if len(sensors) % 2 > 0: pg.error("createCrossholeData is only defined for an equal number of" " sensors in two boreholes.") n = len(sensors) // 2 numbers = np.arange(n) rays = np.array(list(product(numbers, num...
function
python
99,820
function isLoggedIn(callback) { store.get("user", function(err, user) { store.get("session", function(err, session) { if ( user === undefined || session === undefined ) { return callback(false); } if ( !session.inactive || !session.expires ) { ...
function
javascript
99,821
public byte[] computeSignature(DexBuffer dex) throws IOException { MessageDigest digest; try { digest = MessageDigest.getInstance("SHA-1"); } catch (NoSuchAlgorithmException e) { throw new AssertionError(); } int offset = SIGNATURE_OFFSET + SIGNATURE_SIZE;...
function
java
99,822
def softmaxFunction(self, vector): sum = 0 for i in range(vector.shape[0]): sum += math.exp(vector[i]) answer_vector = np.zeros((vector.shape[0],)) for i in range(vector.shape[0]): answer_vector[i] = (math.exp(vector[i])) / sum return answer_vector
function
python
99,823
class MediaQuery{ constructor(options,callback,context=this){ let {query,full=false} = options; this._matches = false; this.full = full; this._mq = null; this._callback = callback; this._context = context; this._bound = this._onMatch.bind(this); this.query=query; } _onMatch(mq){ ...
class
javascript
99,824
public class ComponentMaximiserMouseListener extends MouseAdapter { private static final Logger LOGGER = Logger.getLogger(ComponentMaximiserMouseListener.class); private static final String DOUBLE_CLICK_WARN_MESSAGE = Constant.messages.getString("tab.doubleClick.warning"); /** * The view options to ...
class
java
99,825
public void shareApp(Activity activity, String app_share_message, String app_share_subject) { try { Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("text/plain"); if (!TextUtils.isEmpty(app_share_subject)) { sendIntent.putExtra(Intent.EX...
function
java
99,826
public LocalDate parseLastUpdateAsDate() { if (lastUpdate == null || lastUpdate.isBlank()) { return null; } final String lastUpdateWithoutText = lastUpdate.replace(" Uhr", "").replace(",", ""); return LocalDate.parse(lastUpdateWithoutText, DateTimeFormatter.ofPattern("dd.MM.y...
function
java
99,827
pub fn upload_geometry( &mut self, geometry: Geometry, ) -> InstancedGeometry { let gpu_data = self.create_gpu_data(geometry); InstancedGeometry { gpu_data } }
function
rust
99,828
public static String toShortName(String longClassName) { int lastDotPos = longClassName.lastIndexOf('.'); if (lastDotPos != -1) { return longClassName.substring(lastDotPos + 1); } return longClassName; }
function
java
99,829
public final class BatchAction implements Action<BatchResult> { /** * The list of actions in this batch. Non-{@code final} to allow for GWT * serialization, but never altered in practice. */ private ImmutableList<Action<?>> actions; // serialization support @SuppressWarnings("unused") private BatchAction() ...
class
java
99,830
private License parseLicense(Document details) throws ParseException { String name = details.select("span#lblName2").text(); String address = details.select("span#lblAddress").text(); String licenseType = details.select("span#lblLicenseType").text(); String licenseNumber = details.select...
function
java
99,831
public static UnicodeSymbol FromTokenizedCodePoints(string tokenizedCodePoints) { Guard.AgainstNullArgument(nameof(tokenizedCodePoints), tokenizedCodePoints); UnicodeSymbol unicode = Empty; if (!tokenizedCodePoints.IsEmpty()) { int[] codePoints = split(tokenizedCodePoints) .Select(cp => Convert.T...
function
c#
99,832
public static void Write(this NetBuffer message, Matrix value) { message.Write(value.M11); message.Write(value.M12); message.Write(value.M13); message.Write(value.M14); message.Write(value.M21); message.Write(value.M22); message...
function
c#
99,833
public static class GridUtil { </summary> <param name="mode"></param> <returns></returns> public static Func<int, int, int> SelectWrapFunction(WrapMode mode) { switch (mode) { case WrapMode.Clamp: return Clamp; ...
class
c#
99,834
static void *memsys5Realloc(void *pPrior, int nBytes){ int nOld; void *p; assert( pPrior!=0 ); assert( (nBytes&(nBytes-1))==0 ); assert( nBytes>=0 ); if( nBytes==0 ){ return 0; } nOld = memsys5Size(pPrior); if( nBytes<=nOld ){ return pPrior; } memsys5Enter(); p = memsys5MallocUnsafe(nB...
function
c
99,835
async def _autoclose_bids(): async with Engine() as engine: async with engine.acquire() as conn: statuses = [BidStatus.NOTIFIED] daily_bids = await get_daily_bids(conn, statuses=statuses) bid_ids = [b.id for b in daily_bids] if bid_ids: logger....
function
python
99,836
def load_combined_df( experiment_dirs: List[Path], experiment_labels: List[str], init_data_filename: str ) -> pd.DataFrame: dfs = [] for run_name, run_dir in zip(experiment_labels, experiment_dirs): run_df = load_experiment_df(run_dir, init_data_filename) run_df[RUN_NAME_COLUMN] = run_name...
function
python
99,837
@Override public void onChildViewDetachedFromWindow(@NonNull View view) { final RecyclerView.ViewHolder holder = recyclerView.getChildViewHolder(view); if (!(holder instanceof SwipeOpenViewHolder)) { return; } final SwipeOpenViewHolder swipeHolder = (SwipeOpenViewHolder) holder; if (prevSelect...
function
java
99,838
def qac_stats(image, test = None, eps=None, box=None, region=None, pb=None, pbcut=0.8, edge=False, sratio=True): def text2array(text): a = text.split() b = np.zeros(len(a)) for i,ai in zip(range(len(a)),a): b[i] = float(ai) return b def arraydiff(a1,a2): delta...
function
python
99,839
def initialize_symmertic_ratchets( self, shared_key: bytes, /, opt_public_key: Optional[X25519PublicKey] = None, opt_private_key: Optional[X25519PrivateKey] = None, ) -> None: r_set = RatchetSet() r_set.root_ratchet = InnerRatchet(shared_key) assert ( ...
function
python
99,840
class CommentPost extends Post { init() { super.init(); /** * If the post has been hidden, then this flag determines whether or not its * content has been expanded. * * @type {Boolean} */ this.revealContent = false; // Create an instance of the component that displays the po...
class
javascript
99,841
def sort_and_merge_gzipped_csv_files( input_filenames, output_filename, sort_columns, ): header_line = get_header_line(input_filenames) sort_column_indices = get_column_indices(header_line, sort_columns) pipeline = "( {read_files} ) | ( echo {header_line}; {sort_by_columns} )".format( re...
function
python
99,842
func (reader PluginConfigReaderWithError) GetStreamArray(key string, defaultValue []MessageStreamID) ([]MessageStreamID, error) { key = reader.config.registerKey(key) if reader.HasValue(key) { values, err := reader.GetStringArray(key, []string{}) if err != nil { return nil, err } streamArray := []MessageSt...
function
go
99,843
static unsigned PNG_zGetBits(PNG_decode *d, unsigned num) { unsigned val; unsigned limit; unsigned mask; val = 0; limit = 1 << num; for (mask = 1; mask < limit; mask <<= 1) if (PNG_zGetBit(d)) val += mask; return val; }
function
c
99,844
def update_emissions(component, emissions): if not emissions: return if emissions['key'] == 'variable': emissions = choose_valid_dict(component, emissions) if type(emissions['key']) is not list: emissions['key'] = [emissions['key']] emissions['fitting_value'] = [emissions['fi...
function
python
99,845
internal bool TryStepToValue(IEnumerator<TKeyElement> keyElementEnumerator, out TValue value) { if (keyElementEnumerator == null) throw new ArgumentNullException(nameof(keyElementEnumerator)); while (keyElementEnumerator.MoveNext() && this.StepNext(keyElementEnumerator.Current)) { if (this.CurrentNode.Has...
function
c#
99,846
@Test @SuppressWarnings({"unchecked", "rawtypes"}) public void testCreatingBuildWithinUserClassLoader() throws Exception { ClassLoader appClassLoader = getClass().getClassLoader(); Assume.assumeTrue(appClassLoader instanceof URLClassLoader); ClassLoader userClassLoader = new SpecifiedChildFirstUserClassLoader( ...
function
java
99,847
def multivariate_spike_distance(spike_trains, ti, te, N): d = np.zeros((N,)) n_trains = len(spike_trains) t = 0 for i, t1 in enumerate(spike_trains[:-1]): for t2 in spike_trains[i+1:]: tij, dij = bivariate_spike_distance(t1, t2, ti, te, N) if(i == 0): t = ...
function
python
99,848
def simulate_interdependent_effects(self, network_recovery_original): network_recovery = copy.deepcopy(network_recovery_original) resilience_metrics = resm.WeightedResilienceMetric() unique_time_stamps = sorted( list(network_recovery.event_table.time_stamp.unique()) ) ...
function
python
99,849
def add_trace(self, number: int = 1, s_parameter: str = "S21"): _, traces, _ = self.get_existing_traces() if number in traces: print('Trace exist. Please use another trace number or remove the current one with remove_trace(number).') else: logging.debug(__name__ + f": add...
function
python
99,850
bool IsOtherPowerUpActive( std::vector<PowerUp> &powerUps, std::string type ) { for( const PowerUp &powerUp : powerUps ) { if( powerUp.Activated ) if( powerUp.Type == type ) return true; } return false; }
function
c++
99,851
public CurrencyAmount delta(final ForexOptionSingleBarrier barrierOption, final BlackForexSmileProviderInterface data, final boolean directQuote) { ArgumentChecker.notNull(barrierOption, "barrierOption"); ArgumentChecker.notNull(data, "data"); ArgumentChecker.isTrue(data.checkCurrencies(barrierOption....
function
java
99,852
@Deprecated public void registerAttribute(A attribute) { if (null == attribute) return; boolean listeningAlready = false; for (PropertyChangeListener listener : attribute.getPropertyChangeListeners(Attribute.QUALIFIER_NAME)) { if (ATTRIBUTE_WORKER == listener) { l...
function
java
99,853
@Test void testMissingRequiredProperty() { LOG.info("testMissingRequiredProperty"); DSLMappingService m = null; try { String aadmTTL = RepositoryTestUtils.fileToString("dsl/snow/ide_snow_v3_required_property_missing.ttl"); m = new DSLMappingService(kb, aadmTTL,"", false,"snow","DSL","snow.ttl", ""); try...
function
java
99,854
func NewCrankEventQueueInstruction( state ag_solanago.PublicKey, zetaGroup ag_solanago.PublicKey, market ag_solanago.PublicKey, eventQueue ag_solanago.PublicKey, dexProgram ag_solanago.PublicKey, serumAuthority ag_solanago.PublicKey) *CrankEventQueue { return NewCrankEventQueueInstructionBuilder(). SetStateAcc...
function
go
99,855
function cmpFailed(errMsg, hookConfig, extraArgs) { clearTimeout(hookConfig.timer); if (allowAuction) { storeConsentData(undefined); } exitModule(errMsg, hookConfig, extraArgs); }
function
javascript
99,856
static MergeEngine *vdbeMergeEngineNew(int nReader){ int N = 2; int nByte; MergeEngine *pNew; assert( nReader<=SORTER_MAX_MERGE_COUNT ); while( N<nReader ) N += N; nByte = sizeof(MergeEngine) + N * (sizeof(int) + sizeof(PmaReader)); pNew = sqlite3F...
function
c
99,857
def download(self, target_path, torrent_path = None, info_hash = None, close = False): def on_complete(task): owner = task.owner self.remove_task(task) if close: owner.close() task = TorrentTask( self, target_path, torrent_path = to...
function
python
99,858
BOOL MACIsTxReady(void) { BOOL result = TRUE; if (isRawRxMgmtInProgress()) { WFProcess(); return FALSE; } if ( !RawWindowReady[RAW_TX_ID] ) { SetRawWindowState(RAW_TX_ID, WF_RAW_UNMOUNTED); if ( g_encPtrRAWId[ENC_RD_PTR_ID] == RAW_TX_ID ) { ...
function
c
99,859
class Account: """ Expects an array of parameters according to the number of columns in the "accounts" database. """ # Class variables def __init__(self, account_info) -> None: self.account_info = account_info def create(self): # Database parameters path =...
class
python
99,860
func flattenHostAddrs(addrPatterns string, defaultPort int) (addrs []string, err error) { var portHosts hostlist.HostGroups portHosts, err = hostsByPort(addrPatterns, defaultPort) if err != nil { return } for _, port := range portHosts.Keys() { hosts := strings.Split(portHosts[port].DerangedString(), ",") fo...
function
go
99,861
def _create_flip(context, flip, port_fixed_ips): if port_fixed_ips: context.session.begin() try: ports = [val['port'] for val in port_fixed_ips.values()] flip = db_api.port_associate_ip(context, ports, flip, port_fixed_ips.keys()) ...
function
python
99,862
public static ID[][] loadLevel(BufferedImage image) { int w = image.getWidth(); int h = image.getHeight(); int blockSize; String color = new String(); ID[][] gameMap = new ID[w][h]; for (int x = 0; x < w; x++) { for (int y = 0; y < h; y++) { in...
function
java
99,863
public static final String charSubst( final char target, final char desired, final String string ) { final StringBuffer buf = new StringBuffer( ( string == null ) ? "" : string ); for ( int indx = buf.length() - 1; indx >= 0; --indx ) { if ( buf.charAt( indx ) == target ) { buf.setCharAt( indx, de...
function
java
99,864
UBOOL USeqAct_ActorFactory::UpdateOp(FLOAT deltaTime) { if (Factory != NULL) { if (RemainingDelay <= 0.f) { TArray<UObject**> objVars; GetObjectVars(objVars,TEXT("Spawn Point")); TArray<AActor*> spawnPoints; for (INT idx = 0; idx < objVars.Num(); idx++) { AActor *testPoint = Cast<AActor>(*(objV...
function
c++
99,865
public static void dumpResponseContentAndFail(final WebResponse response, final String message) { if (response != null) { final SessionImpl session = (SessionImpl) Session.getCurrent(); final File resultsDirectory = new File(session.getResultsDirectory(), XltConstants.DUMP_OU...
function
java
99,866
public T FindMousedOverWithComponent<T>(IEnumerable<Element> container, Element ignoreElement = null) where T : Component { foreach (Element element in container) { if (isMouseOverable(element, ignoreElement) && element.Bounds.AbsoluteContains(MousePosition)) ...
function
c#
99,867
protected boolean isPackageFragmentEmpty(IJavaElement element) throws JavaModelException { if (element instanceof IPackageFragment) { IPackageFragment fragment = (IPackageFragment) element; if (fragment.exists() && !(fragment.hasChildren() || fragment.getNonJavaResources().length > 0) &&...
function
java
99,868
static void putIfNotNull(final Map<String, Object> map, final String key, final Object value) { boolean addValues = map != null && key != null && value != null; if (addValues) { map.put(key, value); } }
function
java
99,869
def image_deployment(server, config): try: server_serial_number = server['Server_serial_number'] os_type = config["OS_type"] image_path = config["HTTP_server_base_url"]+config["OS_image_name"] iso_file_check = is_iso_file_present(image_path) if not iso_file_check: ...
function
python
99,870
void ConfigJsonParserCollector::SetupObjectFilter() { AddObjectType("global_system_config"); AddObjectType("structured_syslog_sla_profile"); AddObjectType("structured_syslog_application_record"); AddObjectType("structured_syslog_hostname_record"); AddObjectType("structured_syslog_tenant_record"); ...
function
c++
99,871
void CANReadMsgObjData(unsigned int baseAdd, unsigned int msgNum, unsigned int* data, unsigned int ifReg) { DCANCommandRegSet(baseAdd, (DCAN_DAT_A_ACCESS | DCAN_DAT_B_ACCESS | DCAN_TXRQST_ACCESS | DCAN_CLR_INTPND | DCAN_ACCESS...
function
c
99,872
@Nullable private static String parseName(XmlResourceParser parser) throws IOException, XmlPullParserException { while (parser.next() != XmlPullParser.END_DOCUMENT) { int tagType = parser.getEventType(); String tagName = parser.getName(); if (tagType == XmlPullParser.TEXT...
function
java
99,873
def _send_multi_stage_continue_headers(self, request, use_multiphase_commit, mime_documents_iter, **kwargs): if use_multiphase_commit: request.environ['wsgi.input'].\ send_hundred_continue_response(...
function
python
99,874
pub fn config_param<K: AsRef<str>>(&self, key: K) -> Result<Option<String>, ()> { unsafe { let p = self.plugin_ptr as *mut flbgo_output_plugin; let key = CString::new(key.as_ref()).map_err(|_| ())?; let param = if let Some(f) = (*(*p).api).output_get_property { ...
function
rust
99,875
protected void populateView(InMemoryView v) throws SQLException { ResultSet rs = null; try { rs = dbMeta.getColumns(config.getDbCatalog(), config.getDbSchema(), v.getName(), null); while (rs.next()) { addColumn(v, rs); } } finally { DBUtil.close(rs, log); } }
function
java
99,876
@API(API.Status.EXPERIMENTAL) public class FlattenNestedAndPredicateRule extends PlannerRule<LogicalFilterExpression> { private static final BindingMatcher<QueryPredicate> nestedPredicateMatcher = anyPredicate(); private static final BindingMatcher<QueryPredicate> otherPredicateMatcher = anyPredicate(); pri...
class
java
99,877
def _add_sentinel(self, query: torch.FloatTensor, key: torch.FloatTensor, mask: torch.ByteTensor) -> Tuple: batch_size, query_length, _ = query.size() if key is None: new_keys = self.sentinel.expand([batch_size, 1, self._key_v...
function
python
99,878
@Override @AvailMethod A_Tuple o_ValuesAsTuple (final AvailObject object) { final int size = object.mapSize(); final MapIterable mapIterable = object.mapIterable(); return generateObjectTupleFrom( size, index -> mapIterable.next().value().makeImmutable()); }
function
java
99,879
def xy_czt(unit,step,q_points,q_mins,q_max): max_qxyz = (2*pi)/step intermediate = czt.zoomfft(unit,q_mins[0],q_max[0],q_points[0], max_qxyz[0],axis = 0) xy_czt_result = czt.zoomfft(intermediate,q_mins[1],q_max[1], q_points[1],max_qxyz[1],axis=1...
function
python
99,880
func (t *jsiiProxy_Table) AutoScaleReadCapacity(props *EnableScalingProps) IScalableTableAttribute { var returns IScalableTableAttribute _jsii_.Invoke( t, "autoScaleReadCapacity", []interface{}{props}, &returns, ) return returns }
function
go
99,881
public class GasPricePendingTransactionsSorter extends AbstractPendingTransactionsSorter { private final NavigableSet<TransactionInfo> prioritizedTransactions = new TreeSet<>( comparing(TransactionInfo::isReceivedFromLocalSource) .thenComparing(TransactionInfo::getGasPrice) ...
class
java
99,882
def gradient_descent( bin_path: str, save_path: str, epsilon: float, update_nr: int, dt: float, sigmas: [float], st_obs_w: obspy.Stream, current_update: int = 0, prior_crfl_filepath: str = None, alphas: [float] = [1e-6, 1e-5, 5e-5, 1e-4, 5e-4, 1e-3, 1e-2, 1e-1], fmin: float =...
function
python
99,883
func (c *Controller) rollingUpdate(cluster *corev1alpha1.StorageCluster, hash string) error { nodeToStoragePods, err := c.getNodeToStoragePods(cluster) if err != nil { return fmt.Errorf("couldn't get node to storage pod mapping for storage cluster %v: %v", cluster.Name, err) } _, oldPods := c.getAllStorageClus...
function
go
99,884
public abstract class GraphTopology<X extends Tester> extends AbstractTopology<X> { protected GraphTopology(String name) { super(name); } protected <N extends Source<T>, T> TStream<T> sourceStream(N sourceOp) { return new ConnectorStream<GraphTopology<X>, T>(this, graph().source(sourceOp))...
class
java
99,885
_unwatchScripts (reset = false) { if (this._fsWatcher) { this._fsWatcher.close() this._fsWatcher = null if (reset) { this._watchScripts() } } }
function
javascript
99,886
def buildSyntheticSigData(path, cohort=239673, training=0.7, groups=None): diagnosis_map = { "borderline": -1, "healthy": 0, "bipolar": 1 } if groups is not None: groups = [diagnosis_map[group] for group in groups] signatures = np.genfromtxt(os.path.join(path, "cohort_" +...
function
python
99,887
function bindCustomizerChanges(callback) { if (!isInCustomizer()) { return; } SETTINGS_TO_STATE_MAP.forEach((jsName, phpName) => { window.wp.customize(phpName, value => { value.bind(function (newValue) { const newOvelayOptions = { [jsName]: newValue }; window[_cons...
function
javascript
99,888
private void SetStartupRegistry(bool setStartup = false) { Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true); Assembly curAssembly = Assembly.GetExecutingAssembly(); if (setStartup) ...
function
c#
99,889
public class ChunkedResponse implements IChunkedResponse { protected IChunkedRequest reference; protected byte[] payload; protected boolean deflated; protected int payloadSize; /** * Needed for serialization */ public ChunkedResponse() { super(); } public ChunkedResponse(IChunkedRequest reference, byte[...
class
java
99,890
def visualize(x, labels, to_show=6, num_col=3, predictions=None, test=False): import matplotlib.pyplot as plt If to_show//num_col == 0 then it means num_col is greater then to_show increment to_show to increment to_show set num_row to 1 num_row = to_show // num_col if to_show // ...
function
python
99,891
void Read_n( int* n_p , int* local_n_p , int my_rank , int comm_sz , MPI_Comm comm ) { int local_ok = 1; char *fname = "Read_n"; if (my_rank == 0) { printf("What's the order of the vectors?\n"); scanf("%d", n_...
function
c++
99,892
func (sc *serverConn) startFrameWrite(wr FrameWriteRequest) { sc.serveG.check() if sc.writingFrame { panic("internal error: can only be writing one frame at a time") } st := wr.stream if st != nil { switch st.state { case stateHalfClosedLocal: panic("internal error: attempt to send frame on half-closed-lo...
function
go
99,893
func NewTicker(d time.Duration) *Ticker { if d < time.Microsecond { panic(errors.New("non-positive interval for NewTicker")) } c := make(chan time.Time, 1) t := &Ticker{ C: c, r: timer{ when: when(d), period: int64(d), f: f, arg: c, }, } startTimer(&t.r) return t }
function
go
99,894
def _infer(self, data: Dict) -> Tuple[List, bool, str]: features = data["features"] opunit = data["opunit"] model_path = data["model_path"] if not isinstance(opunit, str): return [], False, "INVALID_OPUNIT" try: opunit = OpUnit[opunit] except KeyEr...
function
python
99,895
void GeneratePartitionSchema(const Schema& schema, const vector<pair<vector<string>, int>>& hash_partitions, const vector<string>& range_partition_columns, PartitionSchema* partition_schema) { PartitionSchemaPB partition_schema_pb;...
function
c++
99,896
func NewReplicaStatusDataAllOf(clusterId string, topicName string, brokerId int32, partitionId int32, isLeader bool, isObserver bool, isIsrEligible bool, isInIsr bool, isCaughtUp bool, logStartOffset int64, logEndOffset int64, lastCaughtUpTimeMs int64, lastFetchTimeMs int64) *ReplicaStatusDataAllOf { this := ReplicaSt...
function
go
99,897
@Nullable public ArrayList<JellowIcon> query(String iconTitle) { ArrayList<JellowIcon>list =new ArrayList<>(); String selectQuery = iconTitle+"%"; Gson gson = new Gson(); Icon icon; ArrayList<VerbiageModel> vList = new ArrayList<>( database.verbiageDao().getVe...
function
java
99,898
def from_string(self, string, doc_format=None): if self.parser == 'XML': self.doc = xmlparser.XMLReader().from_string(string) if self.show_warnings: self._validation_warning() return self.doc if self.parser == 'YAML': try: s...
function
python
99,899