content stringlengths 10 4.9M |
|---|
N = int(input())
li = [ [int(it) for it in input().split() ] for i in range(N) ]
lix = [0]*N
liy = [0]*N
for i in range(N):
lix[i] = (i,li[i][0])
liy[i] = (i,li[i][1])
lix.sort( key=lambda x:x[1] )
liy.sort( key=lambda x:x[1] )
edge = [0]*(2*(N-1))
c = 0
for i in range(N-1):
edge[c] = ( lix[i][0],lix[i+1][0], ... |
def _GetConfigProto(self, rewriter_config=None):
config = config_pb2.ConfigProto(
gpu_options=config_pb2.GPUOptions(allow_growth=True))
if rewriter_config:
config.graph_options.rewrite_options.CopyFrom(rewriter_config)
return config |
Understanding nonlinear saturation in zonal-flow-dominated ion temperature gradient turbulence
We propose a quantitative model of ion temperature gradient driven turbulence in toroidal magnetized plasmas. In this model, the turbulence is regulated by zonal flows, i.e. mode saturation occurs by a zonal-flow-mediated en... |
<filename>xgin/app_router.go
package xgin
import (
"fmt"
"github.com/Aoi-hosizora/ahlib/xnumber"
"github.com/Aoi-hosizora/ahlib/xreflect"
"github.com/gin-gonic/gin"
"net/http"
"reflect"
"runtime"
"strings"
)
// AppRouter represents a group of routers with gin.Engine and gin.IRouter, is a replacement of gin's ... |
/**
* Writes b.length bytes from the specified byte array
* to this output stream.
*
* @param b the data.
* @exception IOException if an I/O error occurs.
*/
public void write(final byte b[])
throws IOException
{
write(b, 0, b.length);
} |
package org.adempiere.util.proxy;
/*
* #%L
* de.metas.util
* %%
* Copyright (C) 2015 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 2 of the
* License, ... |
Indeterminacy from Inflation Forecast Targeting: Problem or Pseudo-Problem?
Contemporary literature on monetary policy analysis concludes that use of an interest rate policy rule that responds to expected inflation in some future period may generate indeterminacy - a multiplicity of stable rational expectations (RE) s... |
<gh_stars>0
#ifndef ENTITY_H
#define ENTITY_H
#include <list>
#include <vector>
#include "Managers/jsonmanager.h"
class Component;
enum ComponentType;
class C_Transform;
class Entity
{
friend class EntityManager;
friend class EntityAbstraction;
private:
Entity(const std::string& uid, const std::string&... |
<filename>src/layouts/default/setting/SettingDrawer.tsx
import { defineComponent, computed, unref } from 'vue';
import { BasicDrawer } from '/@/components/Drawer/index';
import { Divider } from 'ant-design-vue';
import {
TypePicker,
ThemeColorPicker,
SettingFooter,
SwitchItem,
SelectItem,
InputNumberItem,
}... |
Baseball 18 straight wins? That’s the goal for Texas baseball, says Augie Garrido Posted April 21st, 2016
Advertisement
Augie Garrido is starting to sound a little crazy.
With 15 games remaining in the regular season, the Texas baseball coach is talking about perfection, saying openly this week that the Longhorns’ g... |
// Read function gets an identifier and returns a string with its contents. You can also access it on
// dontpad.com/{identifier}. We do not return an error because we want you to be able to access it directly as value,
// if there are any errors, keep in mind that it will panic. If you don't want this to happen, use R... |
/**
* {@link Parameter} with error fields containing a description of what is wrong with
* this {@link Parameter}
*
* @author Christopher Churas <churas@ncmir.ucsd.edu>
*/
public class ParameterWithError extends Parameter {
private String _error;
/**
* Constructor that takes a {@link Paramet... |
<gh_stars>0
import { createSelector } from '@reduxjs/toolkit';
import { RootState } from 'types';
import { initialState } from './slice';
// First select the relevant part from the state
const selectDomain = (state: RootState) => state.auth || initialState;
export const selectData = createSelector([selectDomain], st... |
The nation’s physicians are mobilizing once again to battle attempts to end health insurance coverage millions of Americans have gained over the last four years under the Affordable Care Act.
Several groups within the American Medical Association are voicing support for policy that expands coverage even as the Republi... |
def items_dict_to_protein_data_dict(items_dict: dict) -> dict:
protein_ids_string = get_item_by_priority(items_dict, ['ACCESSION'])
protein_ids = protein_ids_string.split('|')
gene_name = get_item_by_priority(items_dict, ['GENE']).split('|')
TDL_values = get_item_by_priority(items_dict, ['TDL']).split('... |
<filename>AminerAuthor2PaperParser/com/kafaichan/util/WriteFileTask.java
package com.kafaichan.util;
import com.kafaichan.model.Author2Paper;
import java.util.ArrayList;
import java.io.*;
/**
* Created by kafaichan on 2016/5/12.
*/
public class WriteFileTask extends Thread{
private static final Stri... |
import { uniqueString, randomFlow, getSha256Hash } from '../src/util';
import {
Flow,
FlowSchema,
Message,
Question,
Reply,
Trigger,
twilly,
} from '../src'; // tests should fail if not all objects in build are exported
import {
FlowController,
defaultTestForExit,
} from '../src/Flows';
import {
Sms... |
Capacity Development for Integrated Coastal Zone Management in Egypt
Since 1990 there has been a considerable increase in the number of developing countries undertaking Integrated Coastal Zone Management (ICZM) schemes at both the local and national levels. Unfortunately many of these ICZM schemes have failed to be im... |
package com.jin.web.security.client;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.web.client.R... |
/*
Copyright 2020 Google LLC
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 in writing, software
dist... |
Copyright © 2016 Chris Given-Wilson
All rights reserved. This book may not be reproduced in whole or in part, in any form (beyond that copying permitted by Sections 107 and 108 of the U.S. Copyright Law and except by reviewers for the public press) without written permission from the publishers.
For information abo... |
<reponame>ranjeesh-powerofn/LPC_1768_1769CMSIS_old_library
/****************************************************************************
* $Id:: i2cslave2.c 5866 2010-12-08 21:44:48Z usb00423 $
* Project: NXP LPC17xx I2C Slave example
*
* Description:
* This file contains I2C slave code... |
<reponame>runtest007/dpdk_surcata_4.1.1<filename>suricata-4.1.4/suricata-update/suricata/update/util.py
# Copyright (C) 2017 Open Information Security Foundation
# Copyright (c) 2013 <NAME>
#
# You can copy, redistribute or modify this Program under the terms of
# the GNU General Public License version 2 as published b... |
// buildTblDefsForSheets returns a TableDef for each sheet. If the
// sheet is empty (has no data), the TableDef for that sheet will be nil.
func buildTblDefsForSheets(ctx context.Context, log lg.Log, sheets []*xlsx.Sheet, hasHeader bool) ([]*sqlmodel.TableDef, error) {
tblDefs := make([]*sqlmodel.TableDef, len(sheets... |
<filename>src/Fhw/Pass/Dataflow/Simulator.hs
{-
Module : Fhw.Pass.Dataflow.Simulator
Description : The interface for a Dataflow Network simulator.
We simulate a Dataflow topology by converting it
into a standardized graph, inserting buffers both for
correctness (breaking cycles, preventing deadlock) and
optimization... |
Modeling Rydberg Gases using Random Sequential Adsorption on Random Graphs
The statistics of strongly interacting, ultracold Rydberg gases are governed by the interplay of two factors: geometrical restrictions induced by blockade effects, and quantum mechanical effects. To shed light on their relative roles in the sta... |
Exposing Approximate Computing Optimizations at Different Levels: From Behavioral to Gate-Level
Many classes of applications exhibit significant tolerance to inaccuracies in their computations. Some examples include image processing, multimedia applications, and machine learning. These inaccuracies can be exploited to... |
//
// TDNotificationView.h
// TDNotificationView
//
// Created by <NAME> on 2018-12-11.
// Copyright © 2018 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
// Aux view animation style
typedef NS_ENUM(NSInteger, NVAnimationStyle)
{
NVExpandInPlace,
NVExpandAndCente... |
/**
* Created by andreas on 5/1/17.
*/
public class JavaFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater pLayoutInflater, ViewGroup pContainer, Bundle pSavedInstanceState) {
View view = pLayoutInflater.inflate(R.layout.java_fragment, pContainer, false);
Button but... |
<reponame>Cyrillile/ZephyRpc
package com.recocozephyr.rpc.netty;
import com.google.common.reflect.Reflection;
import com.recocozephyr.rpc.common.SerializeProtocol;
import java.lang.reflect.Proxy;
/**
* @AUTHOR: Cyril (https://github.com/Cyrillile)
* @DATE: 2020/10/20 16:30
* @DESCRIPTIONS:
*/
public class Client... |
Last updated on June 15th, 2017
At E3 2017, we had the opportunity to sit down with the Dauntless team at Phoenix Labs in their cozy installation. Dauntless is an online free to play cooperative behemoth slaying RPG that lets you and 3 friends come together to take out monsters, loot their corpses and craft new gears ... |
/**
* channel handler pipline
*
* @author kevin
*/
public class MyTestServerHandler extends ChannelInitializer<SocketChannel> {
@Override
protected void initChannel(SocketChannel socketChannel) throws Exception {
ChannelPipeline channelPipeline = socketChannel.pipeline();
channelPipeline.addLast(new L... |
Library Service Brand and Mark: General and Special
The problem of forming the library image as an active social marketing tool in the context of globalization of the information space is becoming more urgent and relevant and requires new approaches, both in the theoretical and practical spheres of the library sector.... |
import { BackboneModel, jQuery, TemplateContext } from 'sc-types-frontend';
import { JSXView, ReactLike, JSXComponent, ReactNode, MouseEvent } from 'sc-types-frontend-extras';
export default describe('jsx component class', () => {
describe('JSXComponent', () => {
xit('should be able to use it alone without... |
def queryset(self):
o1 = Mock()
o1.pk = 1
o1.__unicode__ = lambda self: "one"
o2 = Mock()
o2.pk = 2
o2.__unicode__ = lambda self: "two"
qs = Mock()
qs.__iter__ = lambda self: iter([o1, o2])
qs.all.return_value = qs
return qs |
/**
* This method must be called when this runner is not going to be used
* anymore. Otherwise the window will be checked for ever and that might not
* be desirable. For example in case of configuration change, the old window
* should be disposed and the corresponding runner should be canceled.
... |
package com.joywifi.knowledge.service;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeanWrapper;
import org... |
#ifndef __LIBPDBG_SBE_H
#define __LIBPDBG_SBE_H
#include <stdio.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#include "libpdbg.h"
enum sbe_state {
SBE_STATE_NOT_USABLE = 0x00000000,
SBE_STATE_BOOTED = 0x00000001,
SBE_STATE_CHECK_CFAM = 0x00000002,
SBE_STATE_DEBUG_MODE = 0x00000003,
SBE... |
<filename>test/node/src/camel-case.test.ts<gh_stars>0
import { CamelCasePlugin, Generated, Kysely, sql } from '../../../'
import {
BUILT_IN_DIALECTS,
destroyTest,
initTest,
TestContext,
testSql,
expect,
TEST_INIT_TIMEOUT,
createTableWithId,
} from './test-setup.js'
for (const dialect of BUILT_IN_DIALE... |
/**
* The app stops on breakpoint in multiple threads and concurrent stepping
* in different threads is performed.
*/
public void testSteppingInTwoThreads () throws Exception {
try {
JPDADebugger debugger = support.getDebugger();
JPDAThread currentThread = debugger.getCurr... |
<reponame>lybiu/ios-dynamsoft-camera-sdk<gh_stars>0
//
// DcsDocument.h
// DCSTest
//
// Created by dynamsoft on 05/07/2017.
// Copyright © 2017 dynamsoft. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "DcsImage.h"
@interface DcsDocument : DcsImage
/**
Creates a DcsDocument object from UIImage
@param... |
Study on the validation measurement of current harmonic for electric vehicle in charging mode
In order to effectively resolve the environmental issues of energy consumption and the emission of exhaust, electric vehicle with green, clean and energy-saving characteristics has been developed and will become more and more... |
<filename>src/test/ui/issues/auxiliary/issue-17718-aux.rs
use std::sync::atomic;
pub const C1: usize = 1;
pub const C2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);
pub const C3: fn() = { fn foo() {} foo };
pub const C4: usize = C1 * C1 + C1 / C1;
pub const C5: &'static usize = &C4;
pub static S1: usize = 3;
pu... |
The influence industry is playing a larger role than meets the eye in raising money for Hillary Clinton and Jeb Bush.
Campaigns are required to file reports detailing registered lobbyists who round up donations, but that number is only a small slice of the fundraisers who work in some capacity in Washington's vast inf... |
/**
* Test class for the DropLocationResource REST controller.
*
* @see DropLocationResource
*/
@RunWith(SpringRunner.class)
@SpringBootTest(classes = ArTEMiSApp.class)
public class DropLocationResourceIntTest {
private static final Integer DEFAULT_POS_X = 1;
private static final Integer UPDATED_POS_X = 2;... |
/**
* ZooKeeper based implementation of a distributed sequential UID generator.
*/
public class ZooUidProvider<E> implements UidProvider<E> {
// TODO: use ZK paths to store uid and modSeq, etc.
public static final String UID_PATH_SUFFIX = "-uid";
private final CuratorFramework client;
private final R... |
/**
* Base class for InternalFactories that are used by Providers, to handle
* circular dependencies.
*
* @author sameb@google.com (Sam Berlin)
*/
abstract class ProviderInternalFactory<T> implements InternalFactory<T> {
protected final Object source;
ProviderInternalFactory(Object source) {
this.sou... |
class Bidder:
"""
Represents network operator in the Digital Marketplace.
"""
# ID counter
_id_counter = 0
def __init__(self, total_bitrate=None, costs=None, bidding_params=None,
reputation=None, reputation_params=None):
"""
Constructs Bidder instance.
Keyword arguments:
total_... |
//
// Created by <NAME> on 16/07/21.
//
#ifndef FAIRWIND_HISTOGRAMWIDGET_HPP
#define FAIRWIND_HISTOGRAMWIDGET_HPP
#include <QThread>
#include <QVideoFrame>
#include <QAudioBuffer>
#include <QWidget>
class QAudioLevel;
namespace fairwind::apps::entertainment {
class FrameProcessor: public QObject
{
Q_OBJ... |
import java.io.*;
import java.util.*;
public class word_capital {
public static void main(String args[]) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintStream p = new PrintStream(System.out);
char c[] = br.readLine().toCharArray();... |
namespace DC.LoadingBar {
interface TimerHandle {
handle: number | null;
}
class LoadingBar {
private loadingBarTemplate = '<div id="loading-bar"><div class="bar"><div class="peg"></div></div></div>';
private loadingBarContainer: HTMLElement | null = null;
private loadin... |
Shape recognition for transparent objects using ultrasonic sensor array
Ultrasonic sensors are often utilized for perceiving the outside world. In this paper, we propose the construction of a new ultrasonic recognition system for identification of transparent object. The proposed recognition system consists of an ultr... |
/**
* Tests the default object converters added to the prover.
*/
@Test
public void testObjectConverters() {
assertSuccess("?=1.", 1);
assertFailure("?=1.", 1.0);
assertFailure("?=1.", 2);
assertSuccess("?=1.0.", 1.0);
assertFailure("?=1.0.", 1);
assertFailure("?=1.0.", 2.0);
assertSuccess("?=prolog4... |
/*
* Public API Surface of password-strength-meter
*/
export * from './lib/password-strength-meter.service';
export * from './lib/password-strength-meter.component';
export * from './lib/password-strength-meter.module';
export * from './lib/config/password-strength-config';
|
#include "global.h"
#include "ActorUtil.h"
#include "GameCommand.h"
#include "GameConstantsAndTypes.h"
#include "GameState.h"
#include "InputEventPlus.h"
#include "InputMapper.h"
#include "LuaBinding.h"
#include "OptionRowHandler.h"
#include "PrefsManager.h"
#include "RageLog.h"
#include "RageUtil.h"
#include "ScreenDi... |
<filename>go/src/infra/cros/internal/testplan/computemapping/computemapping.go<gh_stars>0
package computemapping
import (
"context"
"fmt"
"sort"
"strings"
"infra/cros/internal/gerrit"
"infra/cros/internal/git"
"infra/tools/dirmd"
dirmdpb "infra/tools/dirmd/proto"
"go.chromium.org/luci/common/data/stringset"... |
import NodeCache from 'node-cache'
import Storage from './Storage'
const threeHours = 60 * 60 * 3
const Memory = () => {
const cache = new NodeCache()
const fetchKeys = (prefix: string): Promise<string[]> => {
return new Promise((resolve, reject) => {
cache.keys((err, keys) => {
if (err) {
... |
/**
* Object carrying target values with outputs, and corresponding evaluation computations.
* <p>
* Created by gusta on 8.3.17.
*/
public abstract class Results implements Exportable<Results> {
private static final Logger LOG = Logger.getLogger(Results.class.getName());
transient Settings settings;
@... |
package dev.patika.quixotic95.schoolmanagementsystem.config;
import dev.patika.quixotic95.schoolmanagementsystem.entity.logger.ClientInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springfram... |
class Crawler:
"""
get images by keywords from Baidu website
"""
__time_sleep = 0.1
__amount = 0
__start_amount = 0
__counter = 0
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0'}
url = 'http://image.baidu.com/search/avatarjson?tn=re... |
/* Implement TARGET_MEMORY_MOVE_COST: compute the cost of moving data
between registers and memory. */
int
csky_memory_move_cost (machine_mode mode, reg_class_t rclass,
bool in)
{
return (4 + memory_move_secondary_cost (mode, rclass, in));
} |
<filename>opscloud-common/src/main/java/com/baiyi/opscloud/common/util/time/DurationUtil.java<gh_stars>0
package com.baiyi.opscloud.common.util.time;
import com.baiyi.opscloud.domain.vo.base.ShowTime;
import java.text.SimpleDateFormat;
import java.util.TimeZone;
/**
* @Author baiyi
* @Date 2021/9/24 3:42 下午
* @Ve... |
def _compute_i(self, parameters, nif_ref, year_ref, pfeatures, qvalue):
computer = Sklearn_permutation_test(self.num_cores)
scores, best_pars_info =\
computer.compute(pfeatures, qvalue, parameters)
self._computer.append(computer)
return scores, best_pars_info |
/**
* A subclass of {@link JPanel} that calls {@link WindowManager#paintWindow(Graphics)}
* Not really necessary, but makes the code nicer.
*/
@SuppressWarnings("serial")
protected class GamePanel extends JPanel {
@Override
public void paint(Graphics g) {
paintWindow(g);
... |
def recursive_check_config_types(config, types):
for k, v in config.items():
if type(v) is dict:
yield from recursive_check_config_types(v, types[k])
else:
yield (k, type(v) in types[k]) |
How to Successfully Start the Transformation of an Academic Institution Case study on the process mapping project at the Czech Technical University
This paper contains a case study on the successful initiation of an academic institution transformation project. The present environment in the Czech Republic is forcing a... |
<filename>src/app/models/user.ts
import { Difficulty } from './difficulty';
import { firestore } from 'firebase/app';
import Timestamp = firestore.Timestamp;
export class User {
uid: string;
email: string;
displayName: string;
totalExp: number;
todayExp: number;
streak: number; //days
diffi... |
CTV Vancouver
Update: Mounties have found remains they believe belong to Hailey Dunbar-Blanchette and the Amber Alert has been called off. More information here.
A 22-year-old man has been arrested in connection with the abduction of a young girl near the B.C. border, but the whereabouts of the toddler is still unkno... |
import unittest
import numpy as np
from unittest import mock
from bioslds.regressor_utils import transform_ar
class TestTransformAR(unittest.TestCase):
def test_calls_regressor_transform_once(self):
regressor = mock.Mock(n_features=3)
transform_ar(regressor, [])
regressor.transform.asse... |
<reponame>altafan/tdex-daemon
package permissions
import (
"gopkg.in/macaroon-bakery.v2/bakery"
)
const (
EntityOperator = "operator"
EntityTrade = "trade"
EntityMarket = "market"
EntityPrice = "price"
EntityUnlocker = "unlocker"
EntityWallet = "wallet"
EntityWebhook = "webhook"
)
// MarketPermiss... |
<reponame>pascalh/Astview
{-| This module contains datatype-generic functions to gain a 'Ast'
out of an arbitrary term.
-}
module Language.Astview.DataTree
(annotateWithPaths
,dataToAstIgnoreByExample
,flatten
,dataToAst
,dataToAstSimpl
,removeSubtrees
,manual
) where
import Data.Generics (Data
... |
/**
* This class validates update check entity related inputs from a client.
*
* @author boto
* Date of creation Sep 8, 2017
*/
public class UpdateCheckValidator {
/* Min/max length for string input fields */
private final int STRING_INPUT_MIN_LEN = 1;
private final int STRING_INPUT_MAX_LEN = 255;
... |
/// Put output loop in a thread.
pub fn background(
mut output: Output,
priority: Option<ThreadPriority>,
backlog: usize,
) -> anyhow::Result<Output> {
let (sender, receiver) = sync_channel(backlog);
let name = format!("Background[{}]", &output.name);
let sample_rate_hint = output.sample_rate_hi... |
/**
* Maps all elements from an input iterable to a collection of the given type.
*
* @param <T> Input element type
* @param <U> Output element type
* @param <COut> Output collection type
* @param collection Collection of input ... |
Children study the Koran prior to examinations at the Dar al-Haqqania Madrassa on May 11, 2009 near Peshawar, Pakistan. Getty Images/Daniel Berehulak The Easter bombing of civilians in a park in Lahore follows a long rise of religious extremism in Pakistan and a poisoning of public opinion towards minority faiths.
The... |
The evolution of Y distribution during the processing route of mechanically alloyed iron studied by means of atom probe tomography
Abstract Oxide dispersion strengthening of steels has become quite popular during the last few years. Especially because of their thermal stability, Y–O clusters can improve high temperatu... |
import { CoordinatesTimeQueryController } from "../../CoordinatesTimeQueryController";
import "reflect-metadata";
import { inject, injectable } from "inversify";
import { TYPES } from "../../../utils/Constants";
import { ICoordinatesTimeQueryService } from "../../../service/ICoordinatesTimeQueryService";
import { APIGa... |
// Caller has to ensure seqno is not nullptr.
Status GetGlobalSequenceNumber(const TableProperties& table_properties,
SequenceNumber largest_seqno,
SequenceNumber* seqno) {
const auto& props = table_properties.user_collected_properties;
const auto versio... |
Number of olfactory marker protein‐containing receptor cells is influenced by developmental stage of the olfactory bulb
In vitro studies on E15 rat embryos have shown that the number of receptor neurons containing olfactory marker protein (OMP) is markedly increased when olfactory mucosa (OM) is cultured in direct con... |
module Utils where
import Web.Fn (okHtml)
import Data.Text (Text, pack, unpack)
import Data.Text.Lazy (toStrict)
import Network.Wai (Response)
import Lucid (Html, renderText)
showT :: Show a => a -> Text
showT = pack . show
readT :: Read a => Text -> a
readT = read . unpack
lucidHtml :: Html () -> IO (Maybe Respons... |
def cloud_watch(tasks, name, log_name):
operator = CloudWatchOperator(log_name=log_name, name=name)
for task in tasks:
if task is not None:
operator(task['log'])
yield task |
def overlappingPoints(self, predictions):
points = predictions[0, 0:4, 0:2]
distances = np.triu(cdist(points, points))
distances[distances == 0] = np.inf
indxs = np.argwhere(distances < 30)
return not len(indxs) == 0 |
/**
* The AI class uses alpha-beta pruning to determine a best move for most board games.
* Debugging information goes into ./Resources/aidebug.txt
* @author kevinshao
*
*/
public class AI {
private static final int killerMoveDepth = 2;
static PrintWriter time = null;
/**
* Given an IBoard, return an int... |
package org.flinkextended.flink.ml.lib.tensorflow;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.api.scala.typeutils.Types;
import org.apache.flink.table.functions.FunctionContext;
import org.apache.flink.table.functions.TableFunction;
import org.apache.flink.types.Row;
import or... |
import os
import shutil
import tempfile
import pytest
import globus_sdk
try:
import mock
except ImportError:
from unittest import mock
_IS_WINDOWS = os.name == "nt"
@pytest.fixture(autouse=True)
def mocked_homedir():
tempdir = tempfile.mkdtemp()
def mock_expanduser(path):
return os.path.... |
<filename>leetcode/1000_Minimum-Cost-To-Merge-Stones/MergeStones.cpp
#include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int mergeStones(vector<int>& stones, int K) {
int n = stones.size();
if ((n-1) % (K-1) > 0) return -1;
vector<int> sum(n+1, 0); // 树状数组
... |
/**
* Sets the angle of the camera. Use this in order to rotate the scene.
* It will affect successive calls to moveStrafe and moveFly methods.
* Default: 0.0f
* @param pAngle Camera angle in degrees.
*/
void IND_Camera2d::setAngle(float pAngle) {
_prevAngle = _angle;
_angle = pAngle;
} |
import matplotlib.pyplot as plt
import sympy
from sympy.abc import x, y
import numpy as np
def cylinder_stream_function(U=1, R=1): #Stream Function
r = sympy.sqrt(x**2 + y**2) #converts x,y in terms of r,θ
theta = sympy.atan2(y, x)
si = U * ... |
// ValuesToBytes converts a slice of ledger values into a slice of byte slices.
func ValuesToBytes(values []ledger.Value) [][]byte {
bb := make([][]byte, 0, len(values))
for _, value := range values {
b := make([]byte, len(value))
copy(b, value[:])
bb = append(bb, b)
}
return bb
} |
"""camera.py
Summay:
Camera class
Take a camera capture of the RasPi and detect sleepiness.
"""
import cv2
from baseCamera import BaseCamera
from detectionSleepiness import DetectionSleepiness
class Camera(BaseCamera):
""" Camera class.
Args:
BaseCamera (BaseCamera): Base camera ... |
Domestic Monetary Policy and Technology Subcommittee Chairman Ron Paul is currently holding a hearing on legislation calling for a full audit of U.S. gold reserves. H.R. 1495, the “Gold Reserve Transparency Act of 2011,” calls for an audit by the Treasury that gives a full and thorough accounting of the U.S. government... |
<reponame>leedaoquan/java-xiaochengxu
/****************************************************
* Description: Service for 评论
* Copyright: Copyright (c) 2018
* Company: xjj
* @author zhanghejie
* @version 1.0
* @see
HISTORY
* 2018-07-04 zhanghejie Create File
****************************... |
package ru.stqa.pft.mantis.appmanager;
import org.openqa.selenium.By;
import ru.stqa.pft.mantis.model.UserData;
public class ChangePasswordHelper extends HelperBase {
public ChangePasswordHelper(ApplicationManager app) {
super(app);
}
public void loginAsAdmin() {
wd.get(app.getProperty("... |
Classroom Treatment of Psychotic Children
Behavior modification procedures were employed to treat four psychotic children in a classroom setting. Four treatment phases (baseline, a teacher-attention multiple baseline, reversal, and token reinforcement multiple baseline were utilized) and extensive recordings of teache... |
/*
* pxf_fdw.h
* Foreign-data wrapper for PXF (Platform Extension Framework)
*
* IDENTIFICATION
* fdw/pxf_fdw.h
*/
#include "postgres.h"
#include "access/formatter.h"
#include "commands/copy.h"
#if PG_VERSION_NUM >= 90600
#include "nodes/pathnodes.h"
#endif
#include "nodes/pg_list.h"
#if PG_VERSION_NUM < ... |
class Queue:
'''A queue class stores :class:`Track` objects and has various methods to manipulate them. This class should not be created manually but is an attribute to :class:`Player`.'''
def __init__(self):
self.tracks: List[Playable] = []
@property
def is_empty(self) -> bool:
'''
... |
<filename>server/src/infra/createApiDocumentation.ts<gh_stars>10-100
import { Joi } from 'koa-joi-router';
import Mustache from 'mustache';
import showdown from 'showdown';
/**
* REST API documentation generator
*/
const markdownRenderer = new showdown.Converter({
smartIndentationFix: true,
simpleLineBreaks: tr... |
LOS ANGELES -- Of all the stadiums in all the towns and all the states on the rich final weekend of September in America, please do bring me to a humble dining room without even a view of the field. Bring me to the fifth level of Dodger Stadium, behind the press box, behind the main media dining area, to a room with fo... |
/**
* Reward the current owner of the hill (if they are standing on it).
*/
private void reward() {
if (this.points.isPresent() && this.controlTime.isPresent()
&& this.controlTime.get().getMillis() != 0) {
int reward = this.points.get();
if (this.pointsGrowth.isPresent()) {
double ... |
from .spconv_backbone import VoxelBackBone8x, VoxelResBackBone8x
__all__ = {
'VoxelBackBone8x': VoxelBackBone8x,
'VoxelResBackBone8x': VoxelResBackBone8x,
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.