content stringlengths 10 4.9M |
|---|
// Copyright 2021 Chaos Mesh Authors.
//
// 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... |
//HARDCODED INFORMATION, Handle with care
public class SelectionSortInfo {
/*0*/ public static final String SS = "Selection Sort";
/*11*/ public static final String VAL = "I";
/*11*/ public static final String SWAP = "Swap";
/*11*/ public static final String L_LESSER_R = "Left <= Right";
/*13*/ pu... |
import numpy as np
import random
from collections import namedtuple, deque
from src.model import QNetwork, DuelQNetwork
import abc
import torch
import torch.nn.functional as F
import torch.optim as optim
#BUFFER_SIZE = int(1e5) # replay buffer size
#BATCH_SIZE = 64 # minibatch size
#GAMMA = 0.99 #... |
// NewExperiment creates a new experiment.
func NewExperiment(
sess *session.Session, config Config,
) *experiment.Experiment {
m := &measurer{config: config}
return experiment.New(sess, testName, testVersion, m.measure)
} |
class SpecreduceOperation:
"""
An operation to perform as part of a spectroscopic reduction pipeline.
This class primarily exists to define the basic API for operations:
parameters for the operation are provided at object creation,
and then the operation object is called with the data objects requi... |
// Copyright (c) Microsoft Corporation.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// instantiations of iomanip
#include <iomanip>
_STD_BEGIN
static void __cdecl rsfun(ios_base& iostr, ios_base::fmtflags mask) { // reset specified format flags
iostr.setf(ios_base::_Fmtzero, mask);
}
static void _... |
Palestinian brothers Achmed and Hussama Kafana, ages 5 and 7, use the top of an umbrella as a prayer mat in the ruins of the Omar Abed El Aziz Mosque in Beit Hanoun during Friday prayers. The mosque was damaged during the war.
‘A dirty diaper’
One reason for the reluctance to deliver funds is the Islamist militant mo... |
# Inference code in file was adapted from https://gist.github.com/aallan/6778b5a046aef3a76966e335ca186b7f
import argparse
import cv2
from tcp_latency import measure_latency
from edgetpu.detection.engine import DetectionEngine
from relay import Relay
from stopwatch import Stopwatch
def main():
parser = argparse... |
<reponame>applinh-getcouragenow/sys<filename>sys-account/service/go/pkg/repo/project_repo.go
package repo
import (
"context"
"fmt"
sharedConfig "github.com/getcouragenow/sys-share/sys-core/service/config"
"github.com/getcouragenow/sys/sys-account/service/go/pkg/dao"
"google.golang.org/grpc/codes"
"google.golan... |
#include <cmath>
#include "Vec3D.h"
int Vec3D::getLength()
{
return std::sqrt((x*x + y*y + z*z));
} |
/**
* Encode a LinkType OSPF Sub TLV
*/
public void encode() {
this.setTLVValueLength(1);
this.tlv_bytes=new byte[this.getTotalTLVLength()];
this.tlv_bytes[4]=(byte)(linkType & 0xFF);
} |
<reponame>st-user/ojm-drone-local
import { CommonEventDispatcher } from 'client-js-lib';
import { CustomEventNames } from './CustomEventNames';
enum Tab {
Setup,
Run
}
export default class TabModel {
private selectedTab: Tab
constructor() {
this.selectedTab = Tab.Setup;
}
isSetupSel... |
def cast_value_logic(self, value: str) -> Any:
if self.custom_cast_dict is not None:
for rule, func in self.custom_cast_dict.items():
if value.startswith(f'{rule}(') and value.endswith(')'):
try:
casted_value = func(value.replace(f'{rule}('... |
/**
* Used as simple chache for Task Objects.
*/
public class TaskPOs
{
/**
* Instance of this task.
*/
private Instance instance;
/**
* Level of this Task.
*/
private final int level;
/**
* Parent for this task.
... |
Determination of the analgesic components of Spasmomigraine tablet by liquid chromatography with ultraviolet detection.
A procedure was developed for the determination of the analgesic components of Spasmomigraine tablets, which are ergotamine (I), propyphenazone (II), caffeine (III), camylofin (IV), and mecloxamine (... |
/**
* Represents a cube.
*
* @see org.eclipse.birt.report.model.elements.olap.Cube
*/
public abstract class CubeHandle extends ReportElementHandle
implements
ICubeModel
{
/**
* Constructs a handle for the given design and design element. The
* application generally does not create handles directly. Inst... |
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
#include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
#include "DataFormats/GeometrySurface/in... |
Highlights from College News’ exclusive interview with Wiz Khalifa
Pittsburgh born rapper Wiz Khalifa has been in the game for a while. He put out his first mixtape in 2006 and has been consistently releasing projects since. Despite being a huge name in hip-hop, Wiz finds himself at an interesting point in his career ... |
/**
* Validates that:
* 1. Seven Tag Roster is present
* 2. Result tag matches Game Termination Marker
* 3. If SetUp tag is 1, then FEN tag is present
* Note: Nothing else is validated (no even moves)!
*
* @throws PgnValidationException when something is not valid
*/
@Override
public void validate() th... |
from django.shortcuts import render
import json
import requests
import os
def index_view(request):
secret_key = os.environ.get('SECRET_KEY')
res = requests.get(f"http://api.ipstack.com/check?access_key={secret_key}")
json_res = json.loads(res.content)
ip = json_res['ip'],
country = json_res['count... |
// ReadPubEncKey reads a public encryption key from a file.
func ReadPubEncKey(filename string) (PubEncKey, error) {
keyBytes, err := ioutil.ReadFile(filename)
if err != nil {
return PubEncKey{}, errors.Wrapf(err, "error reading key file")
}
return ParsePubEncKey(keyBytes)
} |
Stereotactic biopsy of cerebral lesions in patients with AIDS.
Central nervous system involvement with AIDS is not uncommon. The indications and timing of brain biopsy remains controversial. Stereotactic CT-guided biopsy offers a safe and effective means of establishing a diagnosis in any patient with a cerebral mass ... |
The impact of broader regional sharing of livers: 2‐year results of “Share 35”
In June of 2013, the Organ Procurement and Transplantation Network (OPTN) implemented regional sharing for Model for End‐Stage Liver Disease (MELD)/Pediatric End‐Stage Liver Disease (PELD) candidates with scores reaching 35 and above (“Shar... |
<reponame>33cn/chat33-pc<filename>src/scripts/groupKey-dao.ts
import Datasource from '@/scripts/data-source';
import Dao from '@/scripts/dao';
import { TableName } from '@/config/config-enum';
import { ApiMsg } from '@/config/apiTypings';
import Notify from '@/plugins/NotifyPop';
import groupKeyPo from '@/object/po/gro... |
def fit_method(self, new_val: str):
self._fit_method = new_val |
nk = input()
n, k = [int(i) for i in nk.split(" ")]
a = input()
a = [int(i) for i in a.split(" ")]
b = []
for i in range(len(a)):
b += [(i, a[i])]
b.sort(key = lambda x:x[1])
m = 0
no = 0
p = []
for i in range(n):
m += b[i][1]
if m <= k:
no += 1
p.append(b[i][0])
else:
... |
package constants
import (
"github.com/qdm12/gluetun/internal/models"
)
const (
// UnboundConf is the file path to the Unbound configuration file.
UnboundConf models.Filepath = "/etc/unbound/unbound.conf"
// ResolvConf is the file path to the system resolv.conf file.
ResolvConf models.Filepath = "/etc/resolv.con... |
Snap Fitness
America’s Fitness Brand Renews NASCAR Sponsorship For 2016
MINNEAPOLIS (March 7, 2016) — Snap Fitness, the world’s premier 24/7 fitness provider, announced today that it will sponsor NASCAR driver Landon Cassill for the third-straight season.
Cassill will continue to represent Snap Fitness as a brand ch... |
<reponame>per1234/SimpleAnimation
#include "Timer.h"
#include <Arduino.h>
Timer::Timer(): duration(0),startTime(0) {}
void Timer::setDuration(uint32_t _duration){
duration=_duration;
}
void Timer::reset(){
startTime = millis();
}
uint32_t Timer::elapsedTime(){
if(startTime > 0){
return millis()-startTim... |
/**
* Provider class for opentracing-LiTe.
*
* OTL provider is responsible for create and returning an instance of a tracer
* that is compliant with the spec as demonstrated and laid down by io.opentracing
* community.
*
* There will be a single instance of type {@link OTLTracer} per jvm. The provider
* is loa... |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define p push
#define pp pop
#define mp make_pair
#define mt make_tuple
#define lb lower_bound // lb(first, last, val) [first, last) >= val
#define ub upper_bound // ub(first, ... |
THE COMPLEX OF PARASITES AND PREDATORS WITH ROLE IN LIMITING THE APHIDS FROM THE PLUM ORCHARDS IN THE CENTRAL OLTENIA AREA
The mealy plum aphid (Hyalopterus pruni Geoffr.), Homoptera Order, Aphididae Familiy, present a large area of spreding, beeing one of the main plum pest from the Oltenia central area. In the clima... |
// IndexMatchLine will index and extract the line contains the pattern.
func IndexMatchLine(ret, target string) (string, bool) {
if strings.Contains(ret, target) {
if target == "_|_" {
r := regexp.MustCompile(`_\|_[\s]//.*`)
match := r.FindAllString(ret, -1)
if len(match) > 0 {
return strings.Join(match... |
winPositions = [
(0, 1, 2), (3, 4, 5), (6, 7, 8), (0, 3, 6), (1, 4, 7), (2, 5, 8), (0, 4, 8), (2, 4, 6)
]
COL = {
0 : 0,
1 : 1,
2 : 2,
3 : 0,
4 : 1,
5 : 2,
6 : 0,
7 : 1,
8 : 2,
}
ROW = {
0 : 0,
1 : 0,
2 : 0,
3 : 1,
4 : 1,
5 : 1,
6 : 2,
7 : 2,
8 : 2,
}
def ch... |
//Sign calculates signature from bundle hash and key
//by hashing x 13-normalizedBundleFragment[i] for each segments in keyTrits.
func Sign(normalizedBundleFragment []int8, keyFragment Trytes) Trytes {
signatureFragment := make([]byte, len(keyFragment))
for i := 0; i < 27; i++ {
bb := keyFragment[i*HashSize/3 : (i+... |
<filename>elit/components/amr/amr_parser/postprocess.py
# MIT License
#
# Copyright (c) 2020 <NAME>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without li... |
/*
* (C) Copyright 2000
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* (C) Copyright 2002
* Torsten Demke, FORCE Computers GmbH. torsten.demke@fci.com
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef _PIIX4_PCI_H
#define _PIIX4_PCI_H
#include <common.h>
#include <mpc824x.h>
#include <asm/processor... |
import {SupportedLanguages, PostGetResponse, SequencedPostListResponse} from '../../../api-def/api';
export type FunctionFetchPostList<R extends SequencedPostListResponse> = (
uid: string,
langCode: SupportedLanguages,
) => Promise<R>;
export type FetchPostOptions<K extends string | number> = {
uid: string,
... |
/**
* Parse a transformer processing instruction.
*
* @param data The data to parse.
* @return A ParsedTransformer object containing the properties from the given data string.
*
* @throws ParseException If the given input data could not be properly parsed.
*/
public static ParsedTransformer parse... |
//function to find the parent of a vertex
int find(int i)
{
while(parent[i])
i=parent[i];
return i;
} |
<reponame>ahmet-tas/amazon-chime-sdk-component-library-react<filename>src/components/ui/Notification/Notification.stories.tsx
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
import React from 'react';
import { select } from '@storybook/addon-knobs';
im... |
/**
* Clears old data and repopulates the @code RoomTaskListPanel} with the {@code Room} containing at least
* one {@code Task}.
*
* @param roomTaskList The list of rooms containing tasks with which to repopulate the panel.
*/
private void resetPanel(ObservableList<Room> roomTaskList) {
... |
<filename>arpspoof.c
/*
* arpspoof.c
*
* Redirect packets from a target host (or from all hosts) intended for
* another host on the LAN to ourselves.
*
* Copyright (c) 1999 <NAME> <<EMAIL>>
*
* $Id: arpspoof.c,v 1.5 2001/03/15 08:32:58 dugsong Exp $
*/
#include "config.h"
#include <sys/types.h>
#include <sy... |
Examination of the Blank Error on Mirror Accuracy of Lightweight SiC Mirror and a Compensation Method
Due to excellent characteristics of specific stiffness and thermal stability, silicon carbide-based (SiC) material is commonly selected to construct large-scale lightweight mirror. In general, the fabrication process ... |
<filename>sendim/middleware.py<gh_stars>1-10
from django.conf import settings
from django.contrib import messages
from referentiel.models import MailType,MailGroup,Supervisor
if 'djcelery' in settings.INSTALLED_APPS :
from djcelery.models import TaskMeta
class CeleryMessageMiddleware(object):
def proce... |
/* Verifies that the given stream parameters are valid. */
static int verify_rstream_parameters(const struct cras_rstream_config *config,
struct cras_rstream *const *stream_out)
{
const struct cras_audio_format *format = config->format;
if (stream_out == NULL) {
syslog(LOG_ERR, "rstream: stream_out can't b... |
<filename>Testing/Core/vtkTestErrorObserver.h
/*=========================================================================
Program: Visualization Toolkit
Module: TestErrorObserver.h
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for de... |
<filename>data/train/java/3cb7c12ff6a7e740e0646578078bc8c53edf62d2AccountService.java<gh_stars>10-100
/*
* AccountService
* Copyright (c) 2012 Cybervision. All rights reserved.
*/
package com.hashmem.idea.service;
import com.hashmem.idea.remote.SyncService;
public class AccountService {
private NotesService n... |
// Fetch a batch of log events from on-chain and enqueue them.
// This function is called periodically in a ticker polling loop.
func (w *Watch) fetchLogEvents() {
blkNum := w.service.GetBlockNumber()
if w.fromBlock+w.blkDelay > blkNum {
log.Tracef("skip log fetching: %s: want %d, delay %d, blk %d", w.name, w.fromB... |
def dump(entries, debug=False, eval_lazy=False, trace=False, title_only=False):
def sort_key(field):
if field == 'title':
return (0,)
if field == 'url':
return (1,)
if field == 'original_url':
return (2,)
return 3, field
highlighter = ReprHighl... |
<gh_stars>0
package com.ldw.torrentclient;
import android.text.TextUtils;
import com.frostwire.jlibtorrent.AlertListener;
import com.frostwire.jlibtorrent.SessionManager;
import com.frostwire.jlibtorrent.TorrentInfo;
import com.frostwire.jlibtorrent.alerts.AddTorrentAlert;
import com.frostwire.jlibtorrent.alerts.Ale... |
def on_solution_callback(self):
self.__solution_count += 1
print('Solution %i: ', self.__solution_count)
print(' min vendors:', self.__min_vendors)
for i in range(self.__num_vendors):
print(' - vendor %i: ' % i, self.__possible_schedules[self.Value(
self.__s... |
Endocrinology and hormone therapy in breast cancer: Aromatase inhibitors versus antioestrogens
Endocrine therapies act by either blocking or downregulating the oestrogen receptor or by reducing oestrogen concentrations around and within the cancer cell. In postmenopausal women, oestrogen suppression is achieved by inh... |
/**
* A RIF-BLD reasoner based on the WSML2Reasoner framework.
*
* @author Adrian Marte
*/
public class WsmlRifReasoner extends AbstractReasoner {
private static final Logger logger = LoggerFactory
.getLogger(WsmlRifReasoner.class);
private boolean hasChanged = true;
private Set<Document> docum... |
CMC will partner with the Pike National Forest to begin work on the Badger Flats Habitat Restoration Project. This beautiful area, less than 50 miles from Colorado Springs, has been growing in popularity but an extensive network of user-created routes is destroying native vegetation and fragmenting local wildlife habit... |
// Package key enumerates keystrings for use in bindings
package key
|
<reponame>asrivast28/ParsiMoNe<filename>parsimone.cpp
/**
* @file parsimone.cpp
* @brief The implementation of the main function for ParsiMoNe,
* and other functions that drive the program execution.
* @author <NAME> <<EMAIL>>
*
* Copyright 2020 Georgia Institute of Technology
*
* Licensed under the Apac... |
/**
* Init a node representing a MPSCNNBinaryFullyConnected kernel
*
* @param sourceNode The MPSNNImageNode representing the source MPSImage for the filter
* @param weights A pointer to a valid object conforming to the MPSCNNConvolutionDataSource
* ... |
/**
* Reads one test file and stores it in Object.
* @param f
* @return
*/
public TestRecord readOneTestFile(File f) throws Exception {
TestRecord record = new TestRecord();
String currentLine;
ArrayList<String> words = new ArrayList<String>();
BufferedReader br = new... |
package collector
import (
"bytes"
"encoding/json"
"fmt"
log "github.com/sirupsen/logrus"
"io/ioutil"
"net/http"
"time"
cmodel "github.com/open-falcon/common/model"
cutils "github.com/open-falcon/common/utils"
tsema "github.com/toolkits/concurrent/semaphore"
tcron "github.com/toolkits/cron"
thttpclient "g... |
module Puzzles.Day7 ( part1, part2 ) where
import Data.Function
import Data.List ( nub )
import qualified Data.Map as M
import Data.Maybe
import qualified Data.Set as S
import Data.Text
import Puzzles.Input7
import Text.Parsec
testInput ::... |
BANGKOK, May 30 (UPI) -- Following a military coup in Thailand on May 22, Gen. Prayuth Chan-ocha has set forth a time frame for national reconciliation, government reforms, and elections.
"Enough time has been wasted on conflict," the military coup leader said Friday during a televised address.
He outlined two phases... |
/**
* This class represents a hyphenated word.
*
* @author Carlos Villegas <cav@uniscope.co.jp>
*/
public class Hyphenation {
private int[] hyphenPoints;
private String word;
/**
* number of hyphenation points in word
*/
private int len;
/**
* rawWord as made of alternating... |
<filename>core/src/com/noahcharlton/stationalpha/worker/WorkerNeedsManager.java
package com.noahcharlton.stationalpha.worker;
import com.noahcharlton.stationalpha.gui.scenes.message.MessageQueue;
import com.noahcharlton.stationalpha.item.Item;
import com.noahcharlton.stationalpha.worker.job.Job;
import com.noahcharlto... |
/**
* Filters artifacts based on the type.
* @param artifacts the collection which stores artifacts.
* @param types the supported types.
* @return the list with artifacts whose types fit to the supported types.
* @since 1.4.0
*/
protected List<Artifact> filterArtifacts(final Collection<Art... |
Distributed finite-time estimators of reference trajectory states for consensus tracking control of higher-order uncertain nonlinear systems
A class of distributed finite-time estimators of reference trajectory states is proposed for the sake of consensus tracking control systems design. In each agent of the network, ... |
// TODO: redirect isChunkLoaded where needed
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
@Mixin(Chunk.class)
public abstract class MixinChunk_Cubes implements IColumn {
@Shadow @Final private ExtendedBlockStorage[] storageArrays;
@Shadow @Final public static ExtendedBlockStorage NULL_BLOCK_ST... |
// SeekByte seeks through index to find the matching entry from which to produce the tar stream.
func (ir *IndexReader) SeekByte(pos int64) error {
var offset int64
if pos == 0 {
return nil
}
if ir.totalSize != 0 && ir.totalSize < pos {
return ErrSkipBoundary
}
if ir.noMoreSeek {
return ErrNoSeek
}
ir.noM... |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
string toBit(ll x){
string s = "";
while(x!=0){
s += x%2 + '0';
x/=2;
}
string ans = "";
for(int i = s.length()-1;i>=0;i--) ans += s[i];
return ans;
}
ll toDec(string s){
ll ans = 0;
for(int i=0;i<s.length();i++){
ans = 2*ans ... |
#include "flushpch.h"
#include "Shader.h"
#include "glad/glad.h"
#include "Core/Log.h"
#include "Renderer.h"
#include "Platform/OpenGL/OpenGLShader.h"
namespace Flush{
std::vector<Ref<Shader>> Shader::s_AllShaders;
Ref<Shader> Shader::Create(const std::string& filepath)
{
Ref<Shader> result = nullptr;
swit... |
Former CELTIC FROST bassist Martin Eric Ain died yesterday (Saturday, October 21) after suffering a heart attack at the age of 50. His death was confirmed by Ain's close friend Jan Graber, who told Switzerland's 20 Minuten that Martin "suddenly collapsed when he switched to a different tram."
Graber was not aware of a... |
<gh_stars>1-10
import response from "aws-lambda-res"
import * as customerBase from "../../customerBase"
import { nakedDomain } from "../../domainNames"
export async function handler(event) {
try {
const { token } = event.pathParameters
await customerBase.verifyAccount(token)
return response(302)(null,... |
<gh_stars>1-10
import { FC } from "react";
import { Drawer } from "@components/common/drawer/drawer";
import FilterIcon from "@components/icons/filter-icon";
import { Text } from "@components/ui/text";
import { useUI } from "@contexts/ui.context";
import FilterSidebar from "@components/shop/filter-sidebar";
import List... |
<gh_stars>0
-- ~\~ language=Haskell filename=src/Milkshake/Data.hs
-- ~\~ begin <<lit/index.md|src/Milkshake/Data.hs>>[0]
{-# LANGUAGE NoImplicitPrelude,DuplicateRecordFields,OverloadedLabels #-}
{-# LANGUAGE DerivingStrategies,DerivingVia,DataKinds,UndecidableInstances #-}
module Milkshake.Data where
import RIO
impo... |
<reponame>fthaler/GHEX
/*
* GridTools
*
* Copyright (c) 2014-2020, ETH Zurich
* All rights reserved.
*
* Please, refer to the LICENSE file in the root directory.
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef INCLUDED_GHEX_RMA_CHUNK_HPP
#define INCLUDED_GHEX_RMA_CHUNK_HPP
#include <gridtools/common/host... |
def owner_graph(self):
if self.__owner_graph is None:
self.__owner_graph = self._get_owner_graph()
return self.__owner_graph |
<reponame>Maruf-Tuhin/Online_Judge<filename>solved-codeforces/the_redback/contest/355/b/4773650.cpp
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<algorithm>
#include<stack>
using namespace std;
main()
{
int i,j,k,l,... |
<gh_stars>0
use std::fs;
#[derive(Debug)]
enum Element
{
Pair(Box<(Element,Element)>),
Int(i32),
}
fn main() {
let path = "test.txt";
let txt = fs::read_to_string(path).unwrap();
let nums: Vec<Element> = Vec::new();
for line in txt.lines() {
let mut num = Element::Pair(Box::... |
#ifndef GRAPHICS_VIEW_ZOOM_H
#define GRAPHICS_VIEW_ZOOM_H
#include <QObject>
#include <QGraphicsView>
/*!
*此类增加了使用鼠标滚轮缩放QGraphicsView的功能。光标下的点
*在可能的情况下保持静止。
*
*请注意,当场景的
*尺寸与视口尺寸相比还不够大。 QGraphicsView将图片居中
*当它小于视图时。而且QGraphicsView的滚动边界不允许
*将任何图片点放置在任何视口位置。
*
*当用户开始滚动时,此类会记住原始场景位置并
*保留它直到滚动完成。比获得原始场景位置更好
*每个滚... |
/** UniformRotationModel represents a rotation of a constant rate about a
* fixed axis.
*
* @param axis a non-zero vector giving the axis of rotation
* @param rotationRate the constant rate of rotation in radians per second
* @param meridianAngleAtEpoch the angle in radians of the meridian at the epoch date
... |
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
# Copyright 2019-2020 the ProGraML authors.
#
# Contact <NAME> <<EMAIL>>.
#
# 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... |
<filename>remoc/src/rfn/rfn_once.rs
use futures::Future;
use serde::{Deserialize, Serialize};
use std::fmt;
use super::{msg::RFnRequest, CallError};
use crate::{codec, rch::oneshot, RemoteSend};
/// Provides a remotely callable async [FnOnce] function.
///
/// Dropping the provider will stop making the function avail... |
<reponame>iadgov/simon-speck-supercop<filename>crypto_hash/rfsb509/ref/hash.c
#include "crypto_hash.h"
#include "crypto_hashblocks_rfsb509.h"
#include "crypto_hashblocks_sha256.h"
static const char sha256_iv[32] = {
0x6a,0x09,0xe6,0x67,
0xbb,0x67,0xae,0x85,
0x3c,0x6e,0xf3,0x72,
0xa5,0x4f,0xf5,0x3a,
0x51,0x0e... |
<filename>exp1/1_1.cpp
#include <iostream>
#include <vector>
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
using namespace std;
// 序列化类
class Content
{
public:
Content() // 构造函数
{
i = 0;
}
virtual ~Content() {} // 析构函数
void SetContent(int j) ... |
def play_bet_tile(self, camel):
if self.bet_tiles[camel]:
pop = self.bet_tiles[camel][0]
util.add_list_to_dict(self.player_dict[self.state]["bet_tiles"], camel, pop)
self.bet_tiles[camel].remove(pop)
if self.bet_tiles[camel] == []:
self.bet_tiles.pop(camel... |
def encoder_model(self):
outs_conv=[]
inputs=[]
for i, dim in enumerate(self._input_dimensions):
if len(dim) == 3 or len(dim) == 4:
if(len(dim) == 4):
input = Input(shape=(dim[-4],dim[-3],dim[-2],dim[-1]))
inputs.append(input)
... |
/**
* cint check when packet configured to be snoop & drop if its
* drop counter actually updated
* test function - drop_action_with_counting
* the sequnce of the test function include
* create_dummy_voq - create voq that drop each packet arrived
* to it
* create_drop_action - which base on forward_actio... |
Nuclear Expression of Hepatitis B Virus X Protein Is Associated with Recurrence of Early-Stage Hepatocellular Carcinomas: Role of Viral Protein in Tumor Recurrence
Background: Hepatitis B virus (HBV) plays well-known roles in tumorigenesis of hepatocellular carcinoma (HCC) in infected patients. However, HBV-associated... |
def notify_height_changed(self):
new_table_height = sum([row.height for row in self.rows])
self._graphic_frame.height = new_table_height |
/**
* The tactical model of a human agent.
*
* @author S.A.M. Janssen
*/
public abstract class TacticalModel implements Updatable {
/**
* The activity module.
*/
private ActivityModule activityModule;
/**
* The navigation module.
*/
private NavigationModule navigationModule;
/**
* Creates a new ta... |
Integrative mutation, haplotype and G × G interaction evidence connects ABGL4, LRP8 and PCSK9 genes to cardiometabolic risk
This study is expected to investigate the association of ATP/GTP binding protein-like 4 (AGBL4), LDL receptor related protein 8 (LRP8) and proprotein convertase subtilisin/kexin type 9 (PCSK9) ge... |
<filename>server-interface/src/main/java/org/powertac/common/interfaces/InitializationService.java
/*
* Copyright 2011 the original author or authors.
*
* 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 th... |
// Read provides an io.Reader interface to a zeromq socket
// DEPRECATED: see goczmq.ReadWriter
func (s *Sock) Read(p []byte) (int, error) {
var totalRead int
var totalFrame int
frame, flag, err := s.RecvFrame()
if err != nil {
return totalRead, err
}
if s.GetType() == Router {
s.clientIDs = append(s.clientID... |
<filename>BACS2063 Data Structures and Algorithms/Chapter4SourceCode/adt/ArrayList.java
package adt;
import java.io.Serializable;
public class ArrayList<T> implements ListInterface<T>, Serializable {
private T[] array;
private int numberOfEntries;
private static final int DEFAULT_CAPACITY = 5;
public ArrayL... |
/** Creates geometry to highlight the supplied set of movement tiles. */
protected void highlightMovementTiles (
PointSet set, PointSet goals, ColorRGBA highlightColor)
{
highlightTiles(set, goals, highlightColor, _movstate, true, true);
} |
def keep(data):
data = data[pd.notnull(data["Gene name"])]
data = data[pd.notnull(data["Gene CDS length"])]
data = data[pd.notnull(data["Mutation ID"])]
data = data[pd.notnull(data["Mutation Description"])]
data = data[(data.SNP != 'y')]
data = data[(data["Genome-wide screen"] == 'y')]
data ... |
Exact two-body solutions and Quantum defect theory of two dimensional dipolar quantum gas
In this paper, we provide the two-body exact solutions of two dimensional (2D) Schr\"{o}dinger equation with isotropic $\pm 1/r^3$ interactions. Analytic quantum defect theory are constructed base on these solutions and are appli... |
//
// Created by PinkySmile on 18/01/2021.
//
#ifndef CHALLONGELIB_TIME_HPP
#define CHALLONGELIB_TIME_HPP
#include <ctime>
#include <string>
#include "json.hpp"
using json = nlohmann::json;
namespace ChallongeAPI
{
class Time {
private:
time_t _time;
public:
Time() = default;
Time(tm time);
Time(const ... |
import java.io.*;
import java.util.*;
import java.util.concurrent.ForkJoinTask;
public class Main
{
static StringBuilder ans = new StringBuilder();
static long per[];
static String s;
static int tCount = 0,te =0;
static int len;
static long mod = 1000000007;
public static int it(int ind, int upper)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.