content stringlengths 10 4.9M |
|---|
<reponame>isilvalun/kibana
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { shallow } from 'enzyme';
import { Locatio... |
def poisson_disc_sample(array_radius, pad_radius, candidates=100, d=2, seed=None):
rng = np.random.default_rng(seed)
uniform = rng.uniform
randint = rng.integers
key = array_radius, pad_radius, seed
if key in XY_CACHE:
return XY_CACHE[key]
start = np.zeros(d)
samples = [start]
qu... |
Radioactive probes for adrenocorticotropic hormone receptors.
Our attempts to develop adrenocorticotropic hormone (ACTH) analogues that can be employed for ACTH receptor identification and isolation began with the synthesis of ACTH fragments containing N epsilon-(dethiobiotinyl)lysine (dethiobiocytin) amide in positio... |
use crate::lib::{default_sub_command, file_to_lines, parse_lines, Command, SumChecker};
use anyhow::Error;
use clap::{value_t_or_exit, App, Arg, ArgMatches, SubCommand};
pub const REPORT_REPAIR: Command = Command::new(sub_command, "report-repair", run);
struct ReportRepairArgs {
file: String,
target: isize,
... |
package steering
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
... |
package quic
type sender interface {
Send(p *packetBuffer)
Run() error
WouldBlock() bool
Available() <-chan struct{}
Close()
}
type sendQueue struct {
queue chan *packetBuffer
closeCalled chan struct{} // runStopped when Close() is called
runStopped chan struct{} // runStopped when the run loop returns... |
/**
* map the item in the stream to another item if an error occurred
*
* @param mappedItem the new mapped item
* @param <R> the new item type
* @return an {@link Optional} that holds the mapped item on error, or empty {@link Optional}
* if no error occurred
*/
public <R> Optio... |
/* Function: PrintViterbiAMX()
*
* Purpose: Print out a normal main matrix from the original
* Viterbi alignment algorithm.
*
*/
void
PrintViterbiAMX(FILE *fp,
struct istate_s *icm,
int statenum,
char *seq,
int N,
in... |
Bilateral effect of aging population on consumption structure: Evidence from China
The deepening of aging population inevitably in China will exert a far-reaching influence on national consumption and economic transformation. Based on interprovincial panel data in 2000–2018, this paper measured the ratio of five survi... |
"""
Config generator
"""
import sys
import abc
import os
import six
from starttls_policy_cli import constants
from starttls_policy_cli import policy
from starttls_policy_cli import util
class ConfigGenerator(object):
# pylint: disable=useless-object-inheritance
"""
Generic configuration generator.
The... |
<filename>Trees/main.py
import trees
Data = []
labels = ['Outlook' , 'Temperatures' , 'Humidity' , 'Wind' , 'Play']
file = open("data.txt" , "r")
numLines = len(file.readlines())
file.seek(0)
for i in range(numLines):
Data.append(file.readline().strip().split("\t"))
file.close()
inV = ['sunny', 'mild' , 'normal'... |
<reponame>tikivn/redux-miniprogram-bindings
export declare const isFunction: (value: unknown) => value is Function;
export declare const isPlainObject: <T extends Record<string, unknown> = Record<string, unknown>>(value: unknown) => value is T;
export declare const getType: (value: unknown) => string;
export declare co... |
<filename>infra/Pos/Slotting/Impl/Ntp.hs
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
-- | NTP-based implementation of slotting.
module Pos.Slotting.Impl.Ntp
(
-- * State
NtpSlottingState
, NtpSlottingVar
-- * Mode
, NtpMode
, NtpWorkerMode
... |
def check(cls):
cls._tries += 1
try:
args = cls._get_injected_args()
cls._check_whether_attempted(*args)
cls._do_check(*args)
except NotAttempted as e:
return ProblemStatement(cls._problem + ' ' + str(e))
except (Incorrect, AssertionError) ... |
An expedition launched to track the drift of tsunami debris is using remote sensing to compare the actual event to computer predictions of the trajectory while improving officials ability to warn residents about impending landfall.
The tsunami that followed on the heels of the March 11, 2011, earthquake in northern Ja... |
<gh_stars>1-10
package org.javers.repository.jql;
import org.javers.core.metamodel.object.GlobalIdFactory;
import org.javers.core.metamodel.type.TypeMapper;
class QueryCompiler {
private final GlobalIdFactory globalIdFactory;
private final TypeMapper typeMapper;
QueryCompiler(GlobalIdFactory globalIdFact... |
<gh_stars>1000+
/*
* services/authzone.h - authoritative zone that is locally hosted.
*
* Copyright (c) 2017, NLnet Labs. All rights reserved.
*
* This software is open source.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condi... |
def unit_of_measurement(self):
if self.forecast_day is not None:
return FORECAST_SENSOR_TYPES[self.kind][self._unit_system]
return SENSOR_TYPES[self.kind][self._unit_system] |
HARARE, Zimbabwe (CNN) -- Zimbabwe's inflation rate has soared in the past three months and is now at 11.2 million percent, the highest in the world, according to the country's Central Statistical Office.
Zimbabwe's inflation rate has soared to a world high.
Official figures dated Monday show inflation has surged fro... |
What once was available only for sale through doctors office, this powerful digestive supplement is now available to the public.
Purely Scientific stunned the competition by releasing an all new Digestive Enzyme Solution formulation intended to stand-out in the crowd of other ‘similar’ products.
There is a plethora o... |
Does the concept of an intelligent designer make sense?
Human beings explain features of the world around them in two main ways. One way is to supply naturalistic explanations that appeal to features of the natural world, such as natural events, forces and laws. The explanations of physics and chemistry fall into this... |
def show_nth_sample(self, n):
x = self.get_nth_sample(n).squeeze()
plt.imshow(x)
plt.show() |
def _check_level(label, expected, actual):
if SP.issparse(expected):
assert_true(SP.issparse(actual))
assert_array_almost_equal(actual.todense(),
expected.todense(),
err_msg=label,
decimal=5)
... |
<gh_stars>1-10
import {ICacheProvider, ICacheProviderOptions, CacheProvider} from '@sarahjs/core';
/**
* Controll caches lifetime.
*/
export class MemoryProvider extends CacheProvider implements ICacheProvider {
private caches: any;
name: string;
constructor(options?: ICacheProviderOptions) {
s... |
import * as React from 'react';
import { RenderInlineProps } from "slate-react";
import * as css from './PlaceholderPlugin.scss';
import cx from 'classnames';
import { uuiMod } from "@epam/uui-core";
export class PlaceholderBlock extends React.Component<RenderInlineProps> {
render() {
const { attributes, ... |
<reponame>edoburu/fluentcms-contactform<filename>fluentcms_contactform/migrations/0001_initial.py<gh_stars>1-10
import phonenumber_field.modelfields
from django.db import migrations, models
import fluentcms_contactform.appsettings
class Migration(migrations.Migration):
dependencies = [
("fluent_contents... |
package com.mangooa.common.platform.group;
/**
* 群组类型。
*
* @author <NAME>
* @since 1.0.0
**/
public enum GroupType {
/**
* 全局组,所有租户都可以访问。
*/
GLOBAL_SCOPE,
/**
* 应用组。
*/
APP_SCOPE;
}
|
export interface Block {
role: string;
value: midHeaderNode | pageNode | quoteNode | textNode | rowNode | columnNode | imageNode | codeNode | enumListNode;
}
export type NodeTitle = (
| [string]
| [
string,
(
| (
| [/** 我来内部链接 */ "BiLink", string, string]
| [/** 一般超链接... |
/* blocks until there are no remainder async messages. */
void sched_no_async_msg( void ) {
pthread_mutex_lock(&mutex_async_msg_count);
if( async_msg != 0 ) {
pthread_cond_wait(&cond_no_remain_async_msg, &mutex_async_msg_count);
}
pthread_mutex_unlock(&mutex_async_msg_count);
} |
<gh_stars>0
/*
Command cloudchaser is a minimal build sentry for Flitter. It will check permissions
based on environment variables and then return via exit code.
This is designed to be run from the context of a git push.
2014/10/29 10:23:52 Usage:
cloudchaser <revision> <sha>
*/
package main
|
/**
* Notifies reception of exposure capabilities and settings.
*
* @param supportedShutterSpeeds supported manual shutter speed values
* @param supportedManualIsoSensitivities supported manual ISO sensitivity values
* @param supportedMaxIsoSensitivities supporte... |
The crystal structure of KSHV ORF57 reveals dimeric active sites important for protein stability and function
Kaposi’s sarcoma-associated herpesvirus (KSHV) is a γ-herpesvirus closely associated with Kaposi’s sarcoma, primary effusion lymphoma and multicentric Castleman disease. Open reading frame 57 (ORF57), a viral ... |
def post_connect(self, gateway:str, device:str):
self.device = device
self.setup_routes(gateway)
if self.dns_handler is not None:
self.dns_handler.SetDns(device, self.srv_options) |
#ifndef __EFFEKSEERRENDERER_GL_MATERIALLOADER_H__
#define __EFFEKSEERRENDERER_GL_MATERIALLOADER_H__
#include "../RendererUrho3D/EffekseerUrho3D.RendererImplemented.h"
namespace Effekseer
{
class Material;
class CompiledMaterialBinary;
} // namespace Effekseer
namespace EffekseerUrho3D
{
class MaterialLoader : pub... |
def add_pos_neg_features(df, vocab_pos, vocab_neg, n=10):
df_pos = df.where(df.positive==True)
df_neg = df.where(df.positive==False)
df_pos_terms = add_top_features(df_pos, vocab_pos, n)
df_neg_terms = add_top_features(df_neg, vocab_neg, n)
return df_pos_terms.unionAll(df_neg_terms) |
// Normalize returns a new unit vector in the same direction as a.
func (v Vector3) Normalize() Vector3 {
n2 := v.Norm2()
if n2 == 0 {
return *NewVector3(0, 0, 0)
}
return v.Times(1 / math.Sqrt(n2))
} |
In the early twentieth century, some of the most interesting voices in Irish public life, including Socialist leader James Connolly, expressed their support for the idea of an international language.
A constructed international auxiliary language (differing from natural languages, which develop over time), Esperanto w... |
// Attempt to prerender an unsafe page. The prerender navigation should be
// cancelled and should not affect the security state of the primary page.
IN_PROC_BROWSER_TEST_P(SafeBrowsingPrerenderBrowserTest, UnsafePrerender) {
const GURL initial_url = embedded_test_server()->GetURL("/title1.html");
ASSERT_TRUE(ui_te... |
A day after suffering a minor heart attack, B.B. King has returned to his Las Vegas residence and is receiving home hospice care. The legendary blues guitarist, singer and bandleader is 89 years old.
Yesterday, the following message from him was posted on his Facebook page. "I am in home hospice care at my residence i... |
import async_hooks from "async_hooks";
import { enable } from "^jab";
//enable already called.
enable(async_hooks);
enable(async_hooks);
|
/**
* A <I>location</I> is an integer that identifies the position in a
* file of a particular piece of program source text. This class is
* never instantiated. It contains static functions for manipulating
* locations. Locations are produced by the
* <code>CorrelatedReader</code> class (and by this class), they... |
"""
@author: <NAME>
@created by cemakpolat at 2021-12-29
"""
from flask import Blueprint, request, jsonify
import util
userapi = Blueprint('userapi', __name__)
logger = util.get_logger()
@userapi.route('/user/preferences', methods=["GET", "POST"])
def assign_user_preferences():
profile = request.form.to_dict()
... |
// buildResourceRegexp translates the resource indicator to regexp.
func buildResourceRegexp(s string) (*regexp.Regexp, error) {
hash := strings.Split(s, ":")
for i, v := range hash {
if v == "" || v == "*" {
hash[i] = ".*"
}
}
return regexp.Compile(strings.Join(hash, ":"))
} |
/**
* Indicates whether a discovery procedure is currently in progress.
*
* @return 0: No discovery procedure in progress;
* 1: Discovery procedure in progress.
*/
int
ble_gap_disc_active(void)
{
return ble_gap_master.op == BLE_GAP_OP_M_DISC;
} |
Dynamic State Estimation in the Presence of Sensor Outliers Using MAP-Based EKF
In this letter, we consider the problem of dynamic state estimation (DSE) in scenarios where sensor measurements are corrupted with outliers. For such situations, we propose a filter that utilizes maximum a posteriori estimation in the ext... |
'''import playsound
playsound.playsound('ex021.mp3')'''
print('Curso em video python'. '-'.join())
|
const Validator = require('validator');
const Empty = require('./is_empty');
module.exports = function validateLoginInput(data:{logemail:any,logpassword:any}) {
var errors:any;
var error_logpassword = "";
var error_logemail = "";
data.logemail = !Empty(data.logemail) ? data.logemail : '';
data.lo... |
use crate::errors::Error;
use serde::{self, Deserialize};
type DateTime = chrono::DateTime<chrono::FixedOffset>;
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct Event {
/// Short code describing the event
///
/// TODO: Reverse engineer the possible values and their meaning
... |
<filename>aws-cpp-sdk-mediaconvert/source/model/Mp4Settings.cpp
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/mediaconvert/model/Mp4Settings.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws... |
<reponame>LinkedModernismProject/web_code
"""Generic metaclass.
XXX This is very much a work in progress.
"""
import types
class MetaMethodWrapper:
def __init__(self, func, inst):
self.func = func
self.inst = inst
self.__name__ = self.func.__name__
def __call__(self, *args, **kw):
... |
import React from 'react'
import { RiCloseLine } from 'react-icons/ri'
import LogoImg from '../../images/logo.png'
import Section from './section'
import SelectDir from './selectDir'
type Props = {
focusIframe: () => void
onClickClose: () => void
}
const Config = ({ focusIframe, onClickClose }: Props): JSX.Eleme... |
<reponame>anunez97/fergilnad-game-engine
// Dummy AI
#ifndef _DummyAI
#define _DummyAI
#include "BaseAI.h"
// AI used purely for testing, will not do anything
class DummyAI : public BaseAI
{
public:
DummyAI() {};
DummyAI(const DummyAI& other) = delete;
DummyAI& operator=(const DummyAI& other) = de... |
/** Builder enabling use of Java 8 SAMs */
public static class Builder {
private CommitRollbackFunction commit;
private CommitRollbackFunction rollback;
private RecoveryFunction recovery;
public Builder withCommit(CommitRollbackFunction commit){
this.... |
package models
import (
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// FilterGroup
type FilterGroup struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serializ... |
Evaluation of aluminium, manganese, copper and selenium effects on human islets amyloid polypeptide hormone aggregation.
Islet amyloid formation causes destruction of insulin-producing beta-cells of the pancreas. The subsequent lack of insulin leads to increased blood and urine glucose. In this research, the fluorimet... |
Ben Zobrist is leading the hit parade even before he steps to the plate.
Zobrist knocked in the Cubs' first run in Game 2 against the Giants Saturday, perhaps thanks to a new walk-up song created by his wife, Christian singer Julianna Zobrist — a cover of Elton John's "Bennie and the Jets," with a tweak of the lyrics ... |
“For all I know, his desire to work out a solution is quite sincere,” Mr. Putin continued. “I met him recently on the sidelines of the G-20 summit in Los Cabos, Mexico, where we had a chance to talk. And though we talked mostly about Syria, I could still take stock of my counterpart. My feeling is that he is a very hon... |
// RunRsh starts a remote shell session on the server
func RunRsh(options *kubecmd.ExecOptions, f *clientcmd.Factory, cmd *cobra.Command, args []string) error {
if len(args) != 1 {
return cmdutil.UsageError(cmd, "rsh requires a single POD to connect to")
}
options.PodName = args[0]
_, client, err := f.Clients()
... |
// Given an address (typically with 0 last octet), search for a matching address on our interfaces, and return its last octet
// Used for checking/defaulting "myaddr" parameter of config entries.
// If no matching interface is found, 0 is returned.
static int
last_addr_octet_on_net(struct sockaddr *sa)
{
struct socka... |
def _transform_standardize(self, x: pd.DataFrame, y: pd.Series) -> [pd.DataFrame, pd.Series]:
assert self.settings['standardize'], "Standardize settings not found."
features = self.settings['standardize']['input']['features']
means = self.settings['standardize']['input']['means']
stds = ... |
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* This file is part of the class library */
/* SoPlex --- the Sequential object-oriented simPlex. */
... |
<gh_stars>1-10
import * as AWSXRay from "aws-xray-sdk-core";
declare module "fastify" {
interface FastifyInstance {
/**
* AWSXRay custom instance
*/
AWSXRay?: any;
}
interface FastifyRequest {
/**
* Request XRay Segment
*/
segment?: AWSXRay.Segment;
}
}
declare function fa... |
MUMBAI/NEW DELHI -- India is tapping Japanese bullet train technology to build a 500km high-speed rail line linking a western manufacturing hub to Mumbai, an endeavor Prime Minister Narendra Modi hopes will spur similar upgrades across the country.
The roughly 2 trillion yen ($17.5 billion) project will connect Ahmeda... |
<filename>tests/JarJarDiff/new/ModifiedPackage/ModifiedDeclarationInterface.java
package ModifiedPackage;
public interface ModifiedDeclarationInterface extends Cloneable {
}
|
/*
* Move a char into a scene.
*/
void actor_to_scene( PLAYER *ch, SCENE *pSceneIndex )
{
PROP *prop;
if ( pSceneIndex == NULL )
{
wtf_logf( "Char_to_scene: NULL.", 0 );
pSceneIndex = get_scene( SCENE_VNUM_DEATH );
}
ch->in_scene = pSceneIndex;
ch->next_in_scene = pSceneIndex-... |
def check_weasyprint( self ):
from weasyprint import HTML, CSS
from weasyprint.fonts import FontConfiguration
font_config = FontConfiguration()
from weasyprint import default_url_fetcher
files_loaded = []
def log_url_fetcher(url):
files_loaded.append( url )
... |
from math import log, factorial
import re
from .adjacency_graphs import ADJACENCY_GRAPHS
from decimal import Decimal
from src.probabilistic_models.probabilistic_model import *
def calc_average_degree(graph):
average = 0
for key, neighbors in graph.items():
average += len([n for n in neighbors if ... |
def makeTissueMask(img):
hsv = cv2.cvtColor(img, cv2.COLOR_RGB2HSV)
lower_red = np.array([120,20,180])
upper_red = np.array([190,220,255])
tissue_mask = cv2.inRange(hsv, lower_red, upper_red)
tissue_mask = cv2.dilate(tissue_mask, None, iterations=2)
tissue_mask = cv2.morphologyEx(tissue_mask, cv... |
import sys
import math
def main(args):
food_choice = [0, 1, 2, 0, 2, 1, 0]
a, b, c = map(int, input().split())
res = 0
for d in range(7):
cnt = 0
ar = [a, b, c]
for i in range(d, 7):
v = food_choice[i]
if not ar[v]:
... |
/**
* This is the fragment for the Home page
*/
public class FragmentHome extends Fragment {
Context context;
private View root;
MaterialCardView myStatusCard;
ConstraintLayout heading;
TextView scanningTv;
TextView headlingTv;
RadioGroup radioGroup;
RadioButton radioPositiveBtn;
... |
/*
** Check whether a given upvalue from a given closure exists and
** returns its index
*/
static void *checkupval (lua_State *L, int argf, int argnup, int *pnup) {
void *id;
int nup = (int)luaL_checkinteger(L, argnup);
luaL_checktype(L, argf, LUA_TFUNCTION);
id = lua_upvalueid(L, argf, nup);
if (pnup) {... |
<reponame>square1-io/android-sq1-tools
package io.square1.tools;
import android.os.Parcel;
import android.test.suitebuilder.annotation.SmallTest;
import android.support.test.runner.AndroidJUnit4;
import junit.framework.Assert;
import org.json.JSONObject;
import org.junit.Before;
import org.junit.runner.RunWith;
impo... |
<gh_stars>100-1000
/** @file
This is part of the implementation of an Intel Graphics drivers OpRegion /
Software SCI interface between system BIOS, ASL code, and Graphics drivers.
The code in this file will load the driver and initialize the interface
Copyright (c) 2019 - 2020 Intel Corporation. All right... |
/**
* This source code file reference from class <a href="https://github.com/tyrantgit/HeartLayout/blob/master/heartlayout/src/main/java/tyrantgit/widget/PathAnimator.java">PathAnimator</a> in HeartLayout project of tyrantgit on GitHub
*/
public class PathAnimation extends Animation {
private float mLength;
... |
/**
* equals(Object) must return <code>false</code> for null
*/
@TestTargetNew(
level = TestLevel.PARTIAL_COMPLETE,
notes = "Null parameter checked",
method = "equals",
args = {java.lang.Object.class}
)
public void testEqualsObject_00() {
CodeSource thiz = new C... |
package jacl
import (
"fmt"
"reflect"
)
// ------------------------------------------------------------
// NIL-CMP
// nilCmp compares a single item to another.
type nilCmp struct {
}
func (c nilCmp) Cmp(b interface{}) error {
if !isNilInterface(b) {
return newComparisonError(fmt.Sprintf(haveWan... |
<reponame>nberktumer/Change-me-plz-zahit<filename>src/components/ShapePanel/ShapeItem.tsx
import React from "react"
import styles from "./ShapePanel.module.css"
import {Card, CardHeader} from "@material-ui/core"
export interface IShapeItemProps {
model: any;
name: string;
}
export interface IShapeItemState {
... |
<filename>tensorflow/compiler/plugin/poplar/driver/tools/custom_ops/sequence_slice.cc<gh_stars>10-100
/* Copyright 2021 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of ... |
/**
* Don't allow clients to submit resources with binary storage attachments declared unless the ID was already in the
* resource. In other words, only HAPI itself may add a binary storage ID extension to a resource unless that
* extension was already present.
*/
private void blockIllegalExternalBinaryIds(IBas... |
#include "blis.h"
#include "complex_math.hpp"
#include <vector>
#include <array>
#include <cassert>
inline void increment(inc_t, gint_t) {}
template <typename T, typename... Args>
void increment(inc_t n, gint_t i, T& off, const inc_t* s, Args&... args)
{
off += s[i]*n;
increment(n, i, args...);
}
template <... |
When it comes to battling prostitution and child exploitation, the sheriff for the nation's second-largest county is walking tall and carrying a big stick.
That's why Illinois, Cook County Sheriff Thomas Dart and the operators of online classified portal Backpage.com are in a legal duel of sorts—and the First Amendmen... |
<gh_stars>1-10
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "... |
import time
class ds18b20:
"""reads ds18b20 bus sensor data (temperature)"""
def __init__(self, config):
self.config = config
self.s_path = '/sys/bus/w1/devices/%s/w1_slave' % (self.config['path'])
def read(self, data):
return [[data['ts'], self.config['id'], self.config['name'], ... |
import { Component, OnInit, Output, EventEmitter } from '@angular/core';
import { MedsServices } from '~/meds-service';
import { NotificationService } from '~/notification-service';
import * as moment from 'moment';
@Component({
selector: 'ns-add-item',
templateUrl: './add-item.component.html',
styleUrls:... |
def _init_subtokens_from_list(self, subtoken_strings, reserved_tokens=None):
if reserved_tokens is None:
reserved_tokens = []
if reserved_tokens:
self._all_subtoken_strings = reserved_tokens + subtoken_strings
else:
self._all_subtoken_strings = subtoken_strings
self._max_subtoken_len =... |
import { ICreature } from "creature/ICreature";
import { IDoodad } from "doodad/IDoodad";
import { IPoint } from "Enums";
import { IContainer, IItem } from "item/IItem";
import BasePacket from "multiplayer/packets/BasePacket";
export default abstract class IndexedPacket extends BasePacket {
private _index;
priv... |
# -*- coding: utf-8 -*-
__author__ = "Haribo (<EMAIL>)"
__license__ = "Apache 2.0"
# standard library
import asyncio
from http import HTTPStatus
from typing import TypeVar
# scip plugin
from eureka.client.discovery.discovery_client import EurekaTransport
from eureka.client.discovery.eureka_client_config import Eurek... |
Photoredox-Catalyzed Carbonyl Alkylative Amination with Diazo Compounds: A Three-Component Reaction for the Construction of γ-Amino Acid Derivatives.
A photoredox-catalyzed reaction of secondary amines, aldehydes, diazo compounds, and Hantzsch ester is reported, affording biologically active γ-amino acid derivatives i... |
/**
* Iteration over the three vectors, with a pause whenever we find a match
*
* On each stop, we store the iteration stat in the inout i,j,k
* parameters, and return the currently matching passive refspec as
* well as the head which we matched.
*/
static int next_head(const git_remote *remote, git_vector *refs,... |
import {ActionTypes, BaseModuleHandlers, action, mutation, LoadingState} from '@elux/vue-vuex-web';
import {CustomError} from '@/utils/errors';
import {CurUser, guest, api} from './entity';
export interface ModuleState {
loading?: {global: LoadingState};
curUser: CurUser;
}
export class ModuleHandlers extends Bas... |
<filename>NetworkServiceProxy.framework/NPKeyBag.h
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/NetworkServiceProxy.framework/NetworkServiceProxy
*/
@interface NPKeyBag : NSObject {
unsigned int _error;
unsigned int _generation;
unsigned int _index;
NSArray * _keys;
... |
<reponame>amitkrout/gitops-operator
/*
Copyright 2021.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to... |
<filename>primer/chapter09/3.cpp
/*!
构成迭代器范围的迭代器有何限制?
1. 它们指向同一个容器中的元素,或者是容器最后一个元素之后的位置。
2. 他们可以通过反复递增begin来到达end,换句话说,end不在begin之前。
*/
|
Orca: A Language For Parallel Programming of Distributed Systems
A detailed description is given of the Orca language design and the design choices are discussed. Orca is intended for applications programmers rather than systems programmers. This is reflected in its design goals to provide a simple, easy-to-use langua... |
<reponame>SpeciesFileGroup/distinguish
export const RANK_TYPES: Array<string> = [
'otu',
'subspecies',
'species',
'subgenus',
'genus',
'subtribe',
'tribe',
'subfamily',
'family'
]
|
/**
* Always returns true for "GET_ACCOUNTS", because we actually don't need this permission
* to read accounts of this application
*/
public static boolean checkPermission(@NonNull Context context, PermissionType permissionType) {
return allGranted || permissionType == PermissionType.GET_ACCOUNT... |
<gh_stars>0
//
// BaseViewController.h
// HappyShopping
//
// Created by Alien on 2018/10/23.
// Copyright © 2018 alien. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface BaseViewController : UIViewController
@property(nonatomic,strong)UIView *navBarView;
/**
右边按钮文字
*/
@propert... |
#Pye
from sys import stdin, stdout
from os import path
if path.exists('inp.txt'):
stdin = open("inp.txt", "r")
q = int(stdin.readline())
for _ in range(q):
x, y, a, b = map(int, stdin.readline().split())
print(int((y-x)/(a+b)) if not (y-x) % (a+b) else -1)
|
#import <UIKit/UIKit.h>
#import <GoogleAnalytics/GAI.h>
#import <GoogleAnalytics/GAIDictionaryBuilder.h>
#import <GoogleAnalytics/GAIEcommerceFields.h>
#import <GoogleAnalytics/GAIEcommerceProduct.h>
#import <GoogleAnalytics/GAIEcommerceProductAction.h>
#import <GoogleAnalytics/GAIEcommercePromotion.h>
#import <Google... |
import { both } from 'ramda';
import { selectorUnitCombinator } from '../style/define';
import { matchSelector } from '../style/match-selector';
import { isTag } from './is-tag';
import { traversalNode } from './traversal-node';
// 类似 querySelectorAll 的规则,找到所有符合条件的元素
export const getBySelector = (dom: INode, selectors... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.