content stringlengths 10 4.9M |
|---|
/**
* Add a custom {@link io.burt.jmespath.function.Function} to JMESPath
* {@link Base64Function} and {@link Base64GZipFunction} are already built-in.
*
* @param function the function to add
* @param <T> Must extends {@link BaseFunction}
*/
public <T extends BaseFunction> void addFunction... |
<reponame>jodhi/mantine<filename>docs/src/components/MdxPage/MdxPageTabs/StylesApi/StylesApiHeader/StylesApiHeader.tsx
import React from 'react';
import { Title, Text } from '@mantine/core';
import { Prism } from '@mantine/prism';
import { generateRootCode } from '../generate-styles-code';
import GatsbyLink from '../..... |
// New creates a new API server
func New(ctx interface{}, o *options.Base) (*API, error) {
var err error
a := API{
options: o,
logger: log.New().WithField("module", "core"),
}
base := web.New(ctx)
a.Router = router.New(base, ctx, "")
if o.Session.Secret == "" {
a.options.Session.Secret, err = options.Gener... |
Urgent Change Needed to Radiation Protection Policy
AbstractAlthough almost 120 y of medical experience and data exist on human exposure to ionizing radiation, advisory bodies and regulators claim there are still significant uncertainties about radiation health risks that require extreme precautions be taken. Decades ... |
// SendTransaction is a mock for SendTransaction function.
func (c *MockClient) SendTransaction(ctx context.Context,
from, to common.Address, amount *big.Int) (result *string, err error) {
gasLimit := uint64(4700000)
acc := c.Acc[strings.ToLower(from.String())]
nonce, err := c.Backend.NonceAt(context.Background(), ... |
// +build linux
package main
import (
"encoding/json"
"fmt"
"os"
"os/exec"
"strings"
"github.com/urfave/cli"
)
var psCommand = cli.Command{
Name: "ps",
Usage: "ps displays the processes running inside a container",
ArgsUsage: `<container-id> [ps options]`,
Flags: []cli.Flag{
cli.StringFlag{
... |
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> h, m;
int main() {
string s, sub;
int i, j, n, H, M;
long long ans=0;
cin>>s;
n = s.size();
for(i=0;i<=n-5;i++) {
sub = s.substr(i, 5);
if(sub == "heavy") h.push_back(i);
else if(sub == "metal") m.push_back(i);
}
M ... |
Behind the hot shooting of Jordan Hamilton and Quincy Miller, the Denver Nuggets sure didn’t look like the No. 22 seed as tournament play began at the NBA Summer League in Las Vegas.
Hamilton scored 18 points in the first quarter, Miller added 12 in the third quarter and the Nuggets advanced to the Round of 16 with a ... |
#!/usr/bin/env python3
"""
Created on Tue Apr 24 15:48:52 2020
@author: <NAME>
"""
import sys
from os.path import splitext
import numpy as np
# import spatialmath as sp
from spatialmath import SE3
from spatialmath.base.argcheck import getvector, verifymatrix
from roboticstoolbox.robot.ELink import ELink, ETS
# from ro... |
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#include "stdafx.h"
using nam... |
Executive Summary Document History Summary of Changes Version Section(s) Synopsis of Change 0.1 Outline 0.2 First Contributions 0.3 Integration of Contributed Sections 0.4 Corrections According to Internal Review 1.0 Final Assembled Version
In this deliverable the new, SerWorks aligned architecture of the BIONETS Simu... |
// NewSearchUsersNamesParamsWithTimeout creates a new SearchUsersNamesParams object
// with the default values initialized, and the ability to set a timeout on a request
func NewSearchUsersNamesParamsWithTimeout(timeout time.Duration) *SearchUsersNamesParams {
var ()
return &SearchUsersNamesParams{
timeout: timeout... |
/*
* 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 "License"); you may ... |
class LeafCollection:
"""
A collection of leaf nodes in a Huffman tree
"""
def __init__(self):
self.leaves = list()
def add_leaf(self, leaf: Node):
"""
Adds a leaf to the collection
"""
self.leaves.append(leaf)
def get_leaf_by_value(self, value: bytes)... |
// KEEP PERSISTING
// KEEP PERSISTING
// WORK HARD FOR YOUR DREAMS
// YOU HAVE TO BE THE BEST
// JUST 400 QUESTIONS ON SPOJ
// AND YOU WILL THE BEST
// DON'T QUIT
#include<bits/stdc++.h>
using namespace std;
#define MAXL 0xfffff
vector<int >ab;
int hash[65],prime[65],fact[65],a[102];
int dp[102][1<<17],so... |
<gh_stars>1-10
/* --------------------------------------------------------------------------
*
* File T03_CustomSceneNode.cpp
* Author <NAME>
*
* --------------------------------------------------------------------------
*
* Copyright (C) 2010-2012 XMSoft. All rights res... |
<filename>sort.go
package sort
import (
"sort"
)
// UintSlice attaches the methods of Interface to []uint, sorting in increasing order.
type UintSlice []uint
// Len implements sort.Interface.
func (u UintSlice) Len() int {
return len(u)
}
// Less implements sort.Interface.
func (u UintSlice) Less(i, j int) bool {... |
<reponame>treeform/pystorm
import submodules.diamondbase
def run():
print "calling diamond1.run()"
submodules.diamondbase.run()
|
<filename>misc.h
/**
* @file misc.h
* @brief
*
* Copyright (c) 2021 Bouffalolab team
*
* 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 li... |
<reponame>Keneral/ae1
/* ila.h - ILA Interface */
#ifndef _LINUX_ILA_H
#define _LINUX_ILA_H
/* NETLINK_GENERIC related info */
#define ILA_GENL_NAME "ila"
#define ILA_GENL_VERSION 0x1
enum {
ILA_ATTR_UNSPEC,
ILA_ATTR_LOCATOR, /* u64 */
ILA_ATTR_IDENTIFIER, /* u64 */
ILA_ATTR_LOCATOR_MATCH, /* u64 */
ILA_... |
/**
* Check if there is one more tuple.
*/
static inline int
tp_hasnext(struct tpresponse *r)
{
return (uint32_t)(r->tuple_itr.cur_index + 1) < r->tuple_itr.elem_count;
} |
/**
* Created by liumapp on 1/5/18.
* E-mail:liumapp.com@gmail.com
* home-page:http://www.liumapp.com
*/
public class SchedulePattern extends Pattern {
public static enum IntervalUnit {
MILLISECOND,
SECOND,
MINUTE,
HOUR,
DAY,
WEEK,
MONTH,
YEAR;
... |
import FWCore.ParameterSet.Config as cms
testProducerWithPsetDesc = cms.EDProducer('ProducerWithPSetDesc',
testingAutoGeneratedCfi = cms.untracked.bool(True),
p_int = cms.int32(2147483647),
p_int_untracked = cms.untracked.int32(-2147483647),
p_int_opt = cms.int32(0),
p_int_optuntracked = cms.untracked.int32(... |
<filename>platform/android/Rhodes/src/com/rhomobile/rhodes/Push.java
package com.rhomobile.rhodes;
public class Push {
public static final String SENDER = "<EMAIL>";
}
|
<reponame>kneed/iot-device-simulator
package migrate
import (
"github.com/golang-migrate/migrate/v4"
_ "github.com/golang-migrate/migrate/v4/database/postgres"
_ "github.com/golang-migrate/migrate/v4/source/file"
"github.com/kneed/iot-device-simulator/settings"
log "github.com/sirupsen/logrus"
)
func DbMigrate()... |
Comparison of HoNOS and HoNOS-Secure in a forensic mental health hospital
Abstract The Health of the Nation Outcome Scale (HoNOS) is a widely used tool for monitoring consumer outcomes within mental health services. However, concern about its suitability in forensic mental health settings led to the development of a f... |
Alkaline phosphatase activities following repeated suramin administration in some rat tissues in relation to their functions.
The effect of repeated administration of suramin, a trypanocide and filariacide, on the level of alkaline phosphatase activity in some rat tissues and organs was investigated. Daily administrat... |
package smart_farm_api.sensor.service;
import smart_farm_api.common.ResultDto;
import smart_farm_api.sensor.domain.SensorDataDto;
public interface ISensorService {
public void execute(SensorDataDto dataSet);
public ResultDto execute(Object obj);
}
|
<filename>types/amap-js-api-transfer/amap-js-api-transfer-tests.ts
declare const map: AMap.Map;
declare const lnglat: AMap.LngLat;
declare const lnglatTuple: [number, number];
// $ExpectError
new AMap.Transfer();
// $ExpectType Transfer
new AMap.Transfer({
city: 'city'
});
// $ExpectType Transfer
const transfer = ... |
import { majorScale, Pane } from 'evergreen-ui'
import React from 'react'
interface Props {}
const RuleLayout: React.FC<Props> = ({ children }) => {
return (
<Pane display="flex" marginBottom={majorScale(4)}>
{children}
</Pane>
)
}
export default RuleLayout
|
import { Scene_data } from "../tl3d/engine/context/Scene_data";
/**
* ...
* @author ...
*/
export class VertexElementFormat {
static Single: string = "single";
static Vector2: string = "vector2";
static Vector3: string = "vector3";
static Vector4: string = "vector4";
static Color: string = "color";
static Byt... |
/**
* From an existing object, copy an individual part that will comprise a piece of a
* multipart upload object.
*
* @param upload
* the multipart upload to which this part will be added.
* @param partNumber
* the part's number; must be between 1 and 10,000 and must uniquely identify... |
/**
* Perform the operation across all versions of a specific resource (by ID and type) on the server. Note that
* <code>theId</code> must be populated with both a resource type and a resource ID at a minimum.
*
* @param id the {@link IIdType} which must be populated with bot... |
<gh_stars>10-100
use failure::{Context, Fail};
use std::result;
pub use failure::ResultExt;
#[derive(Debug, Fail)]
pub enum ErrorKind {
/// Wraps a `std::io::Error`.
#[fail(display = "IO error: {}", _0)]
Io(#[fail(cause)] std::io::Error),
/// Wraps an internal message
#[fail(display = "[{}:{}]: {}... |
import { Stream } from 'most';
const ignoreElements = <T>(stream$: Stream<T>) => stream$.filter(() => false);
export default ignoreElements;
|
The best part is when the lights in the tents go on, one by one, says Elad Orian. Electricity here, in the hills south of Hebron, was long unreliable. Either it was not available or it was too expensive, produced for just a few hours each day by a noisy, diesel-guzzling generator. That changed when Elad Orian and Noam ... |
///
/// @file BitSieve240.cpp
/// @brief The BitSieve240 base class contains lookup tables that are
/// needed to implement a prime sieving algorithm where each
/// bit corresponds to an integer that is not divisible by 2,
/// 3 and 5. The 8 bits of each byte correspond to the offsets
/// {... |
/****************************************************************************
* Flat Field correction
* Bool parameter used to know whether flat field correction
* is to be made
*
****************************************************************************/
void JLP_SpeckProcessPanel::OnSelectFFieldCorr(wxCommandEvent&... |
def _parse_channels(self, root, group=None):
def parse_channel(node, group=None):
id = int(node.get('id'))
interval = node.get('interval')
if interval is None:
timeseries = LazyVariableTimeSeries(parent=self, channel_id=id)
else:
timeseries = LazyUniformTimeSeries(
... |
/// Writes the inputs for the fuzzer
use std::io::Write;
use tokio_util::codec::Encoder;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let in_dir = std::path::Path::new(env!("CARGO_MANIFEST_DIR")).join("in");
if in_dir.exists() {
std::fs::remove_dir_all(&in_dir)?;
}
std::fs::create_dir(&in_dir)?;
let... |
/**
* Instance conceptually encapsulates all Remote Build Execution resources for remote builds. An
* instance consists of storage and compute resources (for example, `ContentAddressableStorage`,
* `ActionCache`, `WorkerPools`) used for running remote builds. All Remote Build Execution API
* calls are scoped to an ... |
<reponame>BlueCodeSystems/opensrp-client-chw
package org.smartregister.chw.model;
public class NavigationModelFlv extends DefaultNavigationModelFlv {
}
|
/*
* Return ascii name of an item type.
*/
std::string Object::item_type_name ()
{
switch (item_type) {
case ITEM_LIGHT:
return "light";
case ITEM_SCROLL:
return "scroll";
case ITEM_WAND:
return "wand";
case ITEM_STAFF:
return "staff";
case ITEM_WEAPON:
return "weapon";
case ITEM_TRE... |
<gh_stars>0
public class MarkovGenerator {
}
|
The mouse androgen receptor is suppressed by the 5'-untranslated region of the gene.
The androgen receptor (AR) mediates the biological functions of androgens and is essential for normal growth and differentiation of urogenital organs as well as initiation and maintenance of spermatogenesis. Withdrawal of androgens by... |
/******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
#include <cstdlib>
#include <new>
#include <utility>
struct MallocFreePolicy
{
template <typename T, typename... Args>
static auto alloc(Args&&... args)
{
auto ptr = (T*)std::malloc(sizeof(T));
new(ptr) T(std::forward<Args>(args)...);
return ptr;
}
template <typename T>
... |
// ByteSliceDataSource creates a DataSource from a byte slice.
func ByteSliceDataSource(b []byte) FuncDataSource {
return FuncDataSource(func(w io.Writer) error {
_, err := io.Copy(w, bytes.NewReader(b))
return err
})
} |
<gh_stars>100-1000
package org.iotp.server.actors.rule;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
import org.iotp.analytics.ruleengine.api.device.DeviceMetaData;
import org.iotp.analytics.ruleengine.api.rules.RuleContext;
import org.iotp.analytics.ruleengine.common.msg.device.ToDevice... |
def brand_monitor(self, query, exclude=None, domain_status=None,
days_back=None, out_format="dict"):
req_dict = {}
self._add_query_param(req_dict, query, "|")
self._add_exclude_param(req_dict, exclude)
self._add_domain_status_param(req_dict, domain_status)
s... |
<filename>src/app/params.ts<gh_stars>1-10
export class Params {
lambda: number = 0.026; // J/(m*s*K) heat conductivity
rho: number = 1.225; // kg/m^3 density
c_p: number = 1004; // J/(kg*K) heat-capacity
T_c: number = 273; // K cold-temp
T_h: number = 273 + 5; // K hot-temp
v_max: number = 2; // m/s^2 max.... |
syn = input().split()
s = int(syn[0])
n = int(syn[1])
fuerzas_bonus = []
for i in range(n):
fuerzas_bonus.append(input().split())
fuerzas_bonus[i][0] = int(fuerzas_bonus[i][0])
fuerzas_bonus[i][1] = int(fuerzas_bonus[i][1])
def mejor_posicion_debil(dragones):
j = 0
bono = 0
elimina ... |
/// Creates a new log, using a log::Store for storage.
pub fn new(store: Box<dyn log::Store>) -> Result<Self> {
let (commit_index, commit_term) = match store.committed() {
0 => (0, 0),
index => store
.get(index)?
.map(|v| Self::deserialize::<Entry>(&v))
... |
NEW DELHI: The Supreme Court has mocked CBI for proposing a three-year fixed tenure for its director as a means of securing its autonomy, saying having an institutional framework is what is important.
The Supreme Court’s comment on Wednesday came even as the Attorney General expressed the government’s reluctance to le... |
White Plains, N.Y. — News of Tom Brady and the New England Patriots' Deflategate suspensions traveled fast.
Giants quarterback Eli Manning was delivering remarks at a Guiding Eyes for the Blind sponsor recognition party in White Plains, New York, when the NFL released the news that Brady would be suspended for four ga... |
<gh_stars>0
"""Story graph for the interactive storytelling system DoppioGioco."""
from collections import defaultdict
import csv
import os
from interactive_story.tension_evaluation import get_tension_value
from interactive_story.story_graph import StoryGraph
STORY_GRAPH_CSV = os.path.join(os.path.dirname(__file__),
... |
#coding:utf-8
import sys
import getopt
from camel.biz.application.celerysrv import CeleryApplicationClient,AsClient,setup,instance,celery
setup(CeleryApplicationClient)
instance.celeryManager.getService('test_server').send_task('access.celery.hello.hello',args=['sss',])
|
<filename>src/spacecharge/wrap_forcesolverfft2d.cc
#include "orbit_mpi.hh"
#include "pyORBIT_Object.hh"
#include "ForceSolverFFT2D.hh"
#include "Grid2D.hh"
#include "wrap_forcesolverfft2d.hh"
#include "wrap_spacecharge.hh"
#include <iostream>
using namespace OrbitUtils;
namespace wrap_spacecharge{
#ifdef __cplusp... |
/*
* Copyright The Cryostat Authors
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below, permission is hereby granted to any
* person obtaining a copy of this software, associated documentation and/or data
* (collectively the "Software"), free of charge and under ... |
// PushPredicate implements the Operator interface
func (d *Derived) PushPredicate(expr sqlparser.Expr, semTable *semantics.SemTable) error {
tableInfo, err := semTable.TableInfoForExpr(expr)
if err != nil {
if err == semantics.ErrMultipleTables {
return semantics.ProjError{Inner: vterrors.Errorf(vtrpcpb.Code_UN... |
/**
* Jackson-friendly version of {@link Categories}.
*/
public class JsonAdaptedCategories {
private final String cuisine;
private final String occasion;
private final String priceRange;
/**
* Constructs a {@code JsonAdaptedCategories} with the given categories details.
*/
@JsonCreato... |
// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
// See microsoft-abi-structors.cpp for constructor codegen tests.
namespace Test1 {
// Classic diamond, fully virtual.
struct A { int a; };
struct B : virtual A { int b; };
struct C : virtual A { int c; };
struct D : virtual B, virtu... |
Prevalence and Associated Factors of Physical Activity among Medical Students from the Western Balkans
The student population includes young adults who need nutrition and regular physical activity (PA) for mental, cognitive, and physical development. It is estimated that, globally, only 25–40% of the university studen... |
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
public class Main {
public static void main(String[] Args) {
new Main().solve();
}
... |
/**
* FSCK tool to recover failed directory mutations guarded by GCS Connector Cooperative Locking
* feature.
*
* <p>Usage:
*
* <pre>{@code
* hadoop jar /usr/lib/hadoop/lib/gcs-connector.jar com.google.cloud.hadoop.fs.gcs.CoopLockFsck \
* --{check,rollBack,rollForward} gs://<bucket_name> [all|<operation-id>... |
"""
Copyright (c) 2020, The Decred developers
See LICENSE for details.
Based on dcrd MsgPing.
"""
from decred.util.encode import ByteArray
CmdPong = "pong"
NonceLength = 8
class MsgPong:
"""
MsgPong implements the Message API and represents a Decred pong message
which is used primarily to confirm tha... |
def prefixed(self, prefix):
if not prefix:
return self.clone()
else:
return self.using(join(prefix, self)) |
def update_power_status(self, host, status, flag_on):
query_elem = self.get_full_query({"cm_id": host})
hosts_status = self.get_status(host)
result = False
if hosts_status and hosts_status[0]["status"] == "deployed":
host_status = hosts_status[0]
trans_status = {}... |
def ocr_core(self):
text = pytesseract.image_to_string(PIL.Image.open(fileName),lang=self.lang)
self.imagetext.setText(text) |
// Returns a description of specified virtual tapes in the virtual tape shelf
// (VTS). This operation is only supported in the tape gateway type. If a specific
// TapeARN is not specified, Storage Gateway returns a description of all virtual
// tapes found in the VTS associated with your account.
func (c *Client) Desc... |
<gh_stars>0
import * as ldcp from 'jsonld-context-parser'
import * as fs from 'fs'
import axios from 'axios'
import * as md5 from 'md5'
export const contextParser = new ldcp.ContextParser()
export const NGSI_LD_CORE_CONTEXT_URL = "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.3.jsonld"
export function app... |
def fit_cluster_23():
data = classy.data.load()
X23 = data.loc[data.cluster == 23, ["z0", "z3"]]
gmm_23 = GaussianMixture(
n_components=2,
random_state=0,
means_init=[[-0.6, -0.4], [-0.3, -0.3]],
max_iter=1000,
).fit(X23)
CLASSES = ["L", "M"] if gmm_23.means_[0][0] < ... |
import { BigNumber } from 'bignumber.js'
import { maxUint256 } from 'blockchain/calls/erc20'
import { DEFAULT_PROXY_ADDRESS } from 'helpers/mocks/vaults.mock'
import { openVaultStory } from 'helpers/stories/OpenVaultStory'
import { one } from 'helpers/zero'
import { OpenVaultView } from '../OpenVaultView'
const proxy... |
def exportDataUsingSQL(self,tableOrReportURI,format,exportToFileObj,sql,config=None):
payLoad = ReportClientHelper.getAsPayLoad([config],None,sql)
url = ReportClientHelper.addQueryParams(tableOrReportURI,self.authtoken,"EXPORT",format)
return self.__sendRequest(url,"POST",payLoad,"EXPORT",export... |
#include <bits/stdc++.h>
using namespace std;
int p2(int x)
{
return x*x;
}
int main()
{
int n,s;
cin>>n>>s;
if(s==1000000)
{
cout<<0;
return 0;
}
int sum=s;
vector<pair<double,int> >distance;
for(int i=0;i<n;++i)
{
int k;
dou... |
async def list(
self, prefix: Optional[str] = None, *, continuation_token: Optional[str] = None
) -> AsyncIterable[File]:
assert prefix is None or not prefix.startswith('/'), 'the prefix to filter by should not start with a "/"'
while True:
params = {'list-type': 2, 'prefix': pre... |
/**
* Perform the dot product of the two matrices or vectors. Each row,column item is multiplied into the row,column item of the
* other matrix or vector and added to the sum. This operation is usually employed with vectors.
*
* @param matrix2
* @return the sum of the products
*/
public double dot( Matrix m... |
/**
* @brief Saves the options and scenario config to the disk.
* @details This is needed for the analysis and to reproduce a specific run.
*
*/
void ProSeCoPlanner::save_config() const {
ROS_INFO_STREAM("Writing output to: " + oOpt().output_path);
util::saveJSON(oOpt().output_path + "/options_output", m_cfg->o... |
Research Report : Cacti : A Front End for Program Visualization
In this paper we describe a system that allows the user to rapidly construct program visualizations over a variety of data sources. Such a system is a necessary foundation for using visualization as an aid to software understanding. The system supports an... |
import sys
import math
t = int(sys.stdin.readline())
for _ in range(t):
n,x = list(map(int, sys.stdin.readline().strip().split(' ')))
graph = {}
for _ in range(n-1):
u, v = list(map(int, sys.stdin.readline().strip().split(' ')))
if u in graph:
graph[u].append(v)
else:
graph[u] = [v]
if v in graph:
... |
/**
* Tests for UnitsHelper.
*/
import * as chai from "chai";
import { UnitsHelper } from "../../src/helpers/unitsHelper";
// tslint:disable-next-line:no-default-import
import convertUnitsJson from "./convert-units.json";
describe("UnitsHelper", () => {
it("can be created", () => {
const obj = new UnitsH... |
Arsenal’s pre-season preparations, which will commence when the club’s professional players return to London Colney for training a week today, will take a somewhat different course than usual this year, with the traditional curtain raiser against Barnet at Underhill and subsequent tour of Austria, which had been a stap... |
class PrintoutIdentifier:
""" Represents an identifier that was parsed from a soar print command via parse_wm_printout
and implements the IdentifierExtensions interface for it """
def create(client, id, depth):
""" Will print the given identifier to the given depth and wrap the result in a Prin... |
def tick(self):
self.logger.debug("heartbeat felt")
self.light_on()
time.sleep(0.5)
self.light_off() |
import cv2
import time
import pandas as pd
import numpy as np
import plotly.graph_objects as go
from typing import Dict
from configs.colored import bcolors as bc
def approve(
tresholds: Dict[str, float],
face_confidence: float,
face_class: str):
"""
Check confidence
Args:
... |
// This file is generated. Do not edit
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_g... |
<reponame>yasuc/vim-vixen<filename>src/background/operators/impls/ReopenTabOperator.ts
import Operator from "../Operator";
import TabPresenter from "../../presenters/TabPresenter";
export default class ReopenTabOperator implements Operator {
constructor(private readonly tabPresenter: TabPresenter) {}
run(): Promi... |
<reponame>yotann/alive2
// Copyright (c) 2021-present The Alive2 Authors.
// Distributed under the MIT license that can be found in the LICENSE file.
// This program connects to a memodb-server server, gets alive.tv and
// alive.interpret jobs, evaluates them, and sends the results back to the
// server. You need a se... |
In case you haven’t used App Shortcuts in Android yet, it’s an awesome feature that allows us to provide our users with a way to quickly access parts of our apps from the home screen of their device. As developers, we can make these shortcuts either static (meaning they’re statically defined in an XML file) or dynamic ... |
def apply_bounds(self, column_name, lower_bound=-np.inf,
upper_bound=np.inf):
self.check_for_column(column_name)
if lower_bound is None:
lower_bound = -np.inf
if upper_bound is None:
upper_bound = np.inf
column = self.data[column_name]
... |
<filename>goodsKill-spring-boot-provider/goodsKill-service/src/main/java/org/seckill/service/mp/SuccessKilledService.java
package org.seckill.service.mp;
import com.baomidou.mybatisplus.extension.service.IService;
import org.seckill.entity.SuccessKilled;
/**
* @author heng
*/
public interface SuccessKilledService e... |
<reponame>WangZixuan/Leetcode
/*
Find Duplicate Subtrees
Given a binary tree, return all duplicate subtrees. For each kind of duplicate subtrees, you only need to return the root node of any one of them.
Two trees are duplicate if they have the same structure with same node values.
Example 1:
1
/ \
2 3
... |
<gh_stars>10-100
package iso20022
// Provide information on the status reason of the record.
type ValidationStatusReason1 struct {
// Party that issues the status.
Originator *PartyIdentification77 `xml:"Orgtr,omitempty"`
// Specifies the reason for the status.
Reason *StatusReason6Choice `xml:"Rsn,omitempty"`
... |
// NewMIDIOutDefault opens a default MIDIOut port.
func NewMIDIOutDefault() (MIDIOut, error) {
out := C.rtmidi_out_create_default()
if !out.ok {
defer C.rtmidi_out_free(out)
return nil, errors.New(C.GoString(out.msg))
}
return &midiOut{out: out, midi: midi{midi: C.RtMidiPtr(out)}}, nil
} |
package br.com.jcpvix.githubapi.controller.v1;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
impor... |
<gh_stars>1-10
import axios from 'axios';
import { Message } from 'discord.js';
import { queueAdd } from '../controller';
import { getSpotifyToken as getSpotifyToken } from '../loaders/nodecache';
import { CONSTANT_URL, REGEX } from '../shared/constants';
import { validateRegex } from '../shared/validation';
import { s... |
// BlueprintGeneratedClass BP_ProjectileTrajectory_HeldObjectSocket.BP_ProjectileTrajectory_HeldObjectSocket_C
// Size: 0x278 (Inherited: 0x269)
struct ABP_ProjectileTrajectory_HeldObjectSocket_C : ABP_ProjectileTrajectory_C {
char pad_269[0x7]; // 0x269(0x07)
struct FPointerToUberGraphFrame UberGraphFrame; // 0x270(... |
def print_error(e):
print(" ".join([str(arg) for arg in e.args])) |
def main(engine: Any, schema: Optional[str],
warnings: bool, list_tables: bool, table_details: bool, partition: bool,
cycles: bool, insert_order: bool, export_graph: bool, transferable: bool) -> None:
inspector = inspect(engine)
if schema is None:
schema = inspector.default_schema_name... |
/// Build a single schema file and write it to the destination file.
///
/// **WARNING: THIS OVERWRITES THE DESTINATION FILE.**
pub fn build_schema(schema: impl AsRef<Path>, destination: impl AsRef<Path>) {
let (schema, destination) = (schema.as_ref(), destination.as_ref());
let compiler_path = compiler_path();... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.