content stringlengths 10 4.9M |
|---|
<gh_stars>1-10
package com.dianping.cat.report.page.cache;
import org.apache.commons.lang.StringUtils;
import com.dianping.cat.consumer.event.model.entity.EventName;
import com.dianping.cat.consumer.event.model.entity.EventReport;
import com.dianping.cat.consumer.event.model.entity.EventType;
import com.dianping.cat.... |
/**
* @Created 06 / 04 / 2020 - 2:52 PM
* @project SpringFileUpDown
* @Author Hamdamboy
*/
public class FileStorageException extends RuntimeException {
//
private static final long serialVerionUID = 1L;
public FileStorageException(String message) {
super(message);
}
public FileStorageE... |
Gamma Irradiation Effect of
In order to know the influence of 60Co gamma radiation, on the germination of two semitropical species, roselle seeds and sunflower were irradiated at the Transelektro LGI-01 of the InstitutoNacional de InvestigacionesNucleares, At doses 0, 5, 10, 15, 20, 25, 30 and 35 Gy, to determine the ... |
/**
* Applies a time window to data and calculates a mean of the data during that window
*/
public class RollingAverage {
private final long windowLengthInSec;
private final TimeSource timeSource;
private final List<TelemetryDataPoint> telemetryDataPoints = new ArrayList<>();
private Consumer<Double>... |
import { useCookies } from '@react-smart/react-cookie-service';
export function App() {
const { getAllCookies } = useCookies();
return <div>{JSON.stringify(getAllCookies())}</div>;
}
export default App;
|
def vertex_factor_tensor(self):
K = NumberField(self.p, 'y')
y = K.gen()
R = LaurentPolynomialRing(K, 'h')
h = R.gen()
return [[[self.gamma(eye, kay, ell) for eye in
range(len(self.zees))] for kay in range(2 * self.n + 1)]\
for ell in range(self.n + 1)] |
class xArmController:
'''
Send and receive commands to/from the xarm.
'''
def __init__(self, node_name="xarm_controller", port="/dev/ttyACM0"):
'''
'''
self.node_name = node_name
rospy.init_node(node_name)
#Servo control module
self.arm = xarm_servo_contr... |
def data_types_get_req():
return {'status': 'success',
'message': '',
'data_types': Study.all_data_types()} |
<filename>smithy-model/src/main/java/software/amazon/smithy/model/transform/ReplaceShapes.java
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. 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.
* A copy... |
/**
* Here NPC equipment mask is initialized. All NPC slot masks should be
* lower than 65536
*/
public void init() {
synchronized (this) {
if (items == null) {
items = new TreeMap<ItemSlot, ItemTemplate>();
for (ItemTemplate item : v.items) {
... |
/*
*************** ASSIGNMENT# - HW 08 ***************
*************** FILE NAME - AddPlacesTabFragment.java ***************
*************** FULL NAME - <NAME> & <NAME> (Group 18) ***************
*/
package com.mymobileapps.hw08;
import android.app.DatePickerDialog;
import android.content.DialogInterface... |
// sets current region & attempts to jump to it
// returns success/failure
bool BamReaderPrivate::SetRegion(const BamRegion& region) {
if ( m_randomAccessController.SetRegion(region, m_references.size()) )
return true;
else {
const string bracError = m_randomAccessController.GetErrorString();
... |
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#include "qxcbeventdispatcher.h"
#include "qxcbconnection.h"
#include <QtCore/QCoreApplication>
#include <qpa/qwindowsysteminterface.h>
QT_BEGIN_NAMESPACE
QXcbUnixEventDisp... |
/// Replace given decision node with an unprocessed node and delete all child nodes.
///
/// Returns list of deleted nodes.
pub fn revert_decision(&mut self, node: BdtNodeId) -> Vec<BdtNodeId> {
let mut deleted = vec![];
if let BdtNode::Decision { classes, .. } = self[node].clone() {
let mut... |
Imagine a brew of coffee that has a blueberry and coriander seed aroma, with flavor notes of red grapefruit, raspberry and sugar cane. With a blackberry aftertaste.
It was that cup of joe that nabbed Klatch Coffee’s Todd Goldsworthy the recognition of best coffee brewer in the nation.
“It took a day to really sink in... |
import java.util.Scanner;
/*
* File: StateFlowersAndBirds.java
* Author: <NAME>
* Date: October 07, 2018
* Purpose: This program prompts the user to enter an American state, then provides the state bird
* and state flower for that state. The program will continue to prompt the user for states until
* the user en... |
import { async, ComponentFixture, TestBed, inject } from '@angular/core/testing';
import { BeersComponent } from './beers.component';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { MaxLengthPipe } fro... |
/**
At a point in execution where we know the query source, save the text
of it in the query profile.
This must be called exactly once per descrete statement.
*/
void PROFILING::set_query_source(const char *query_source_arg,
size_t query_length_arg) {
DBUG_TRACE;
if (!enabled... |
//NewConfig panic prevent do not return nil
func NewConfig(name string) *Config {
file, err := os.OpenFile(name, os.O_RDONLY, os.ModePerm)
if err != nil {
return &Config{
Tree: &toml.Tree{},
}
}
tree, err := toml.LoadReader(file)
if err != nil {
return &Config{
Tree: &toml.Tree{},
}
}
return &Confi... |
// Release decrements the Dispatcher's usage count. If it reaches 0, Release releases all of the
// underlying senders concurrently and waits for the operations to finish.
// See pipeline.Component.Release.
func (d *Dispatcher) Release() error {
return d.tracker.Release(func() error {
errors := make([]error, len(d.s... |
THINGS ARE GETTING REALLY STRANGE NOW. Now being outside of UK office hours mean we’re yet to get our own EA response to why Crysis 2 vanished from Steam yesterday, but across-the-ponders have now received one. The upshot? Despite all this ‘only on Origin’ stuff, EA didn’t do it. So: who did?
Valve, apparently. Said a... |
import styled from 'styled-components';
import helpers from '@bbc/telescope-kit-helpers';
import { downarrow } from '@bbc/telescope-kit-icons';
const {
white,
slateGrey,
} = helpers.colours;
export const Link = styled.a`
text-decoration: none;
`;
export const Arrow = styled.div`
height: 16px;
width: 13px;
... |
<reponame>sabarnac/giveaway-webapp
import React, { useEffect } from "react";
import "./LoserOverlayView.scss";
import classNames from "classnames";
import Participant from "../../../store/round/match/participant/Participant";
import {
AnimationStateHook,
useAnimationState,
runOnPredicate,
} from "../../../util/in... |
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define oo 2000000000
const int N = 100010;
int n , m , a[N] , b[N];
long long sum = 0;
vector< int > v;
int main() {
scanf("%d%d",&n,&m);
for(int i=0;i<n;i++){
scanf("%d%d",&a[i],&b[i]);
sum += a[i];
v.push_back(a[i] - b[i]);
... |
// GenerateReplicationGroupName generates a valid ElastiCache replication group name
// A valid name must contain between 1 and 20 alphanumeric characters or hyphens, should start with a letter, and cannot end with a hyphen or contain two consecutive hyphens.
func GenerateReplicationGroupName(instanceID string) string ... |
#pragma once
#include "vkdev/buffer.h"
#include "vkdev/commandpool.h"
#include "vkdev/device.h"
#include <vulkan/vulkan.h>
namespace vkdev {
class Image {
public:
explicit Image(Device& device_): device(device_) {}
VkImage handle = VK_NULL_HANDLE;
VkDeviceMemory memory = VK_NULL_HANDLE;
VkImage... |
A Partial Deducer Assisted by Predefined Assertions and a Backwards Analyzer
Partial deduction is a program transformation technique which specializes a program w.r.t. its static data. If the program contains impure predicates, it is known that unfolding steps for atoms which are not leftmost is problematic. Impure pr... |
def delete_list(self, full):
(_, compfile, destfile, _) = self._get_update_info(full)
self.logger.info('Cleaning up downloads...')
mvutils.file_remove(compfile)
mvutils.file_remove(destfile) |
// TestMaybeRotateSigningSecret validates the rotation of a signing secret when required.
func TestMaybeRotateSigningSecret(t *testing.T) {
newCAConfig, err := crypto.MakeSelfSignedCAConfig("foo", SigningCertificateLifetimeInDays)
if err != nil {
t.Fatalf("error generating a new ca: %v", err)
}
newSigningSecret, ... |
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import six
import numpy as np
from numpy import ma
from matplotlib import cbook, docstring, rcParams
from matplotlib.ticker import (
NullFormatter, ScalarFormatter, LogFormatterSciNotation, LogitFormatter... |
package table
import (
"github.com/paul-at-nangalan/csv-stuff/data"
"testing"
)
func TestImportTable_Import(t *testing.T) {
testdata := [][]string{
{"","","","New York", "Dublin", "Hong Kong"},
{"","","","", "", ""},
{"A","","","3000", "4500", "643.234"},
{"B","","","3001", "4501", "644.234"},
{"C","",""... |
// Return true if the called function can return.
static bool callCanReturn(deExpression callExpression) {
deExpression accessExpression = deExpressionGetFirstExpression(callExpression);
deDatatype datatype = deExpressionGetDatatype(accessExpression);
switch (deDatatypeGetType(datatype)) {
case DE_TYPE_TCLASS... |
/* monitor the flight mode event status and trigger an event record if the state changes */
static void blackboxCheckAndLogFlightMode(void)
{
if (memcmp(&rcModeActivationMask, &blackboxLastFlightModeFlags, sizeof(blackboxLastFlightModeFlags))) {
flightLogEvent_flightMode_t eventData;
eventData.last... |
def main():
letter_str = input()
alpha_list = set(ch for ch in list(letter_str) if ch.isalpha() is True)
print(len(alpha_list))
main()
|
/**
* Returns the area of triangle ABC. This method combines two different algorithms to get accurate
* results for both large and small triangles. The maximum error is about 5e-15 (about 0.25 square
* meters on the Earth's surface), the same as girardArea() below, but unlike that method it is
* also accura... |
package medium;
public class ShiftingLetters {
public static void main(String[] args) {
//https://leetcode.com/problems/shifting-letters/submissions/
// System.out.println(shiftingLetters("abc", new int[]{3, 5, 9}).equals("rpl"));
// System.out.println(shiftingLetters("aaa", new int[]{1, 2, 3... |
DUBAI (Reuters) - Saudi Arabia said on Thursday it was ready to participate in any ground operations in Syria if the U.S.-led alliance decides to start such operations, an adviser to the Saudi defence minister said.
“The kingdom is ready to participate in any ground operations that the coalition (against Islamic State... |
/**
* Sample extension to migrate the sample-app
* from a WAR deployment application model to a Spring Boot
* application model
*
* @author facarvalho
*/
public class SampleExtension extends Extension {
public SampleExtension() {
add(SampleTransformationTemplate.class);
}
@Override
publi... |
import zeug
import numpy as np
import pytest
def test_sin_cos_transformation():
a = [0, 1, 2, 3, 4, 5, 6]
period = 7
a_sin, a_cos = zeug.sin_cos_transformation(a, period=period)
assert a_sin.shape == a_cos.shape
def test_synth_ts():
ts = zeug.synth_ts()
assert type(ts) == np.ndarray
ts ... |
#include<stdio.h>
int main()
{
long long int n,i;
char s1[]="I hate it";
char s2[]="I love it";
char s3[]="I hate that";
char s4[]="I love that";
scanf("%lld",&n);
if(n==1)
{
printf("%s\n",s1);
}
else if(n==2)
{
printf("%s %s\n",s3,s2);
}
else
{
if(n%2==0)
{
for(i=1;i<n/2;i++)
{
printf(... |
<reponame>oimchat/oim-server
import Path from '@/app/com/common/permission/Path';
class PersonalPath {
public service: string = 'manage';
public get: Path = new Path(this.service, '/v1/personal/info/get');
public updatePassword: Path = new Path(this.service, '/v1/personal/info/update.password');
}
export ... |
// Copyright 2017 <NAME> <<EMAIL>> <<EMAIL>>
use std::cell::{Cell, RefCell};
use std::cmp;
use std::path::{PathBuf, MAIN_SEPARATOR};
use std::rc::Rc;
use gdk;
use gtk;
use gtk::prelude::*;
use pw_pathux;
use crate::{gtkx::list_store::*, wrapper::*};
// Labelled Text Entry
#[derive(Debug, PWO)]
pub struct Labelled... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import socket
import threading
import time
import sys
# from random import *
import struct
import argparse
import re
from urllib.request import Request, urlopen # Python 3
import queue as Queue
__author__ = "TheSpeedX"
__version__ = "2.0"
banner = """
███████╗ ██████╗ ███... |
#include "../../../../src/Featuring/Tool/Implicit/SharedTool.h"
|
/**
* This class uses the mediator pattern to connect the SpriteImageGenerator with
* the SaveLoadUtility. This adds another layer of indirection and allows for
* all loading and saving of spritesheets and colormasks to pass through this
* module.
*
* @author Rahul
*
*/
public class SpriteImageLoader {
pri... |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "core/inspector/ThreadDebugger.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V... |
// CreditUser subtracts the balance of the pubkey by issuing a settlement exec and bringing it through
// all of the required data stores.
// CreditUser acquires dbLock so it can just be called.
func (server *OpencxServer) CreditUser(pubkey *koblitz.PublicKey, amount uint64, param *coinparam.Params) (err error) {
var ... |
Partial remission of a newly diagnosed diffuse large B‐cell non‐Hodgkin's lymphoma in a hemodialysis patient after administration of immuno‐chemotherapy with rituximab‐CHOP
To date little data exist about treatment of hematologic malignancies in patients with end‐stage renal disease (ESRD). While administration of imm... |
<reponame>hong123608/testtwo
package net.oschina.app.improve.detail.activities;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.google.gson.reflect.TypeToken;
import com.loopj.android.http.TextHttpResponseHandler;
import net.oschina.a... |
def calcA(x):
return x*2
def calcB(k, x):
return x + k
def main():
n = int(input())
k = int(input())
start = 1
for i in range(n):
start1 = calcA(start)
start2 = calcB(k, start)
if start1 < start2:
start = start1
else:
start = start2
p... |
/**
* Test an individual VEO.
*
* @param veo the file path of the VEO
* @param outputDir the directory in which to unpack this VEO
* @return a structure containing information about the VEO
* @throws VEOError if something went wrong
*/
public TestVEOResult testVEO(String veo, Path out... |
-- Copyright (c) 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
{-# LANGUAGE OverloadedStrings #-}
module DA.LanguageServer.Conduits
( contentLengthParserConduit
, contentLengthEmitterConduit
, instrumentConduit
) where
import ... |
def generate_wordclouds(
wordclouds_args,
fig_output_dir,
fig_filename_format,
title_fontsize=20,
title_color="green",
ncols=5,
nrows=1,
dpi=300,
figsize=(20, 20),
save=True,
save_each=False,
save_masked=False,
mask_dir=None,
fontpath=None,
colormap="PuBu",
... |
/**
* Method that initialized the bean.
*
* @param request is a reference to the http request.
*/
public void initialize(HttpServletRequest request, EjbcaWebBean ejbcawebbean) throws Exception {
if (!initialized) {
admin = ejbcawebbean.getAdminObject();
EjbLocalHelper... |
/**
* Loads a properties file into a BootstrapProperties object.
* @param bootstrapPath The path to the properties file
* @param propertyPrefix The property prefix to enforce
* @return The BootstrapProperties
* @throws IOException If the properties file could not be read
*/
public static B... |
/**
* Splits the packet.
*
* @param peer
* the peer.
* @return the split up encapsulated packet.
* @throws IllegalStateException
* if the <code>encapsulated</code> is already split or if the
* packet is too small to be split according to
* {@link #needsS... |
/**
* Installs defaults that can't be overridden by overriding
* installDefaults().
*/
private void installFixedDefaults()
{
String prefix = getPropertyPrefix();
Caret caret = textComponent.getCaret();
if (caret == null || caret instanceof UIResource)
{
caret = createCaret();
... |
<reponame>KudrinMatvey/myfplll
#include <plll/config.hpp>
#undef DEBUG // Otherwise, dlalloc contains a function (do_check_malloc_state) which is never used
#include "dlalloc.c"
|
/**
* Reset to the initial conditions.
*/
void reset ()
{
center = new Vertex (0, 0, 0);
setTranslation (0, 0, 0);
setScaling (1, 1, 1);
setRotation (0, 0, 0);
} |
/**
* A simple {@link Fragment} subclass.
*/
public class BackgroundFragment extends Fragment {
EditText screen;
//This should be the default fragment stuff if you've unchecked the options under the layout part of new fragment screen
//should probably be able to edit this like an activity
//fragments... |
def variables(self):
return {
name: self.var_transform[name](val)
for name, val in self.untransformed_variables.items()
} |
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
vector<long long int> list;
cin>>n;
long long int te, last=-1;
bool allsame = true;
for (int i=0;i<2*n;i++){
cin>>te;
if(last != te && i!=0){
allsame = false;
}
last = te;
... |
<reponame>awltux/scm-manager
package sonia.scm.web;
import com.google.common.base.Charsets;
import com.google.common.io.ByteStreams;
import org.junit.Test;
import javax.servlet.ServletInputStream;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import static org.junit.Assert.assertEquals;
public cl... |
<gh_stars>0
const addressPrefix = "0x";
export function addAddressPrefix(address: string): string {
if (address.slice(0, 2) === addressPrefix) {
return address;
}
return addressPrefix + address;
}
export function removeAddressPrefix(address: string): string {
if (address.slice(0, 2) === addre... |
def parse_bus_stop_list(link_to_bus_stop_list: str) -> DefaultDict[str, List[Tuple[str, str]]]:
soup = BeautifulSoup(requests.get(link_to_bus_stop_list).content.decode('utf-8'), 'html.parser')
stops = soup.select('div#MIMMPK > ul > li')
result = defaultdict(list)
for stop in stops:
try:
... |
def fqdn_with_protocol():
fallback_fqdn = get_fqdn()
logger.info('this host will be used to host packages')
logger.info('and will act as a repository for other nodes')
if fallback_fqdn is None:
logger.warning('no FQDN could be detected for current host')
fqdn = prompt('provide the FQDN for t... |
lst=[[0,0]]
for c in range(int(input())):
lst.append(list(map(int,input().split())))
#print(lst)
count=1
for r in range(len(lst)-1):
a=lst[r][0];b=lst[r][1];c=lst[r+1][0];d=lst[r+1][1]
if a==b:
count+=min(c-a,d-b)
elif (a<b and c>=d) or (b<a and c<=d):
count+=min(c-a,d-b)+1
... |
export enum ParamMappingStrategies {
LINEAR = 'linear',
LINEAR_LIST = 'linearList',
LIST = 'list'
} |
As a mixed martial artist, Blagoi Ivanov knows how to put up a good fight.
The Bellator heavyweight, who was clinging to life after suffering a severe stab wound late last month, is reportedly in stable condition following emergency surgery, having regained consciousness over the weekend.
The Bulgarian English-speaki... |
package com.dwarfeng.bitalarm.sdk.bean.entity;
import com.alibaba.fastjson.annotation.JSONField;
import com.dwarfeng.bitalarm.stack.bean.entity.Point;
import com.dwarfeng.subgrade.sdk.bean.key.FastJsonLongIdKey;
import com.dwarfeng.subgrade.stack.bean.Bean;
import java.util.Objects;
/**
* FastJson数据点对象。
*
* @auth... |
<gh_stars>1-10
/*
* Copyright 2008, 2009 Google Inc.
* Copyright 2006, 2007 Nintendo Co., Ltd.
*
* 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/L... |
<reponame>devlz303/gulden-official<filename>src/unity/djinni/node_js/NJSGuldenMonitorListener.cpp<gh_stars>0
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from libunity.djinni
#include "NJSGuldenMonitorListener.hpp"
using namespace std;
void NJSGuldenMonitorListener::onPartialChain(int32_t h... |
// JSDataContainerResetParametersFactory is just a simple function to instantiate the JSDataContainerResetParametersStruct
func JSDataContainerResetParametersFactory(
ForceOption *bool,
) JSDataContainerResetParametersStruct {
return JSDataContainerResetParametersStruct{
Type: "JSDataContainerResetParameters... |
def _pseudoGroundTruth(COURSEDESCRIPTIONS):
from bert_serving.client import BertClient
bc = BertClient()
bertProc = Preprocessor()
desc = list(map(lambda x: bertProc.stringNumRemover(bertProc.stringPunRemover(x.lower())),
list(COURSEDESCRIPTIONS.values())))
encodedDesc = bc.encod... |
def crop(self, enc_features, x):
(_, _, H, W) = x.shape
enc_features = CenterCrop([H, W])(enc_features)
return enc_features |
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>;
using namespace std;
int main(){
int n;
cin>>n;
long long firstsum=0;
long long secondsum=0;
vector<int> first;
vector<int> second;
int a;
for(int i=0; i<n ; i++){
cin>>a;
if(a>0){
firstsum +=a;
... |
#ifndef _SAMPLED_BCFR_BUILDER_H_
#define _SAMPLED_BCFR_BUILDER_H_
#include <memory>
#include <string>
#include "vcfr.h"
using namespace std;
class BettingAbstraction;
class BettingTree;
class Buckets;
class CardAbstraction;
class CFRConfig;
class HandTree;
class Node;
class SampledBCFRBuilder : public VCFR {
publi... |
Breaking News Emails Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.
Sep. 6, 2015, 1:49 PM GMT / Updated Sep. 6, 2015, 3:58 PM GMT / Source: NBC Washington By Alexandra Jaffe
Former Secretary of State Colin Powell expressed support for the nuclear agreement ... |
// Sync up the command line options if there is dependency
func syncOptions() error {
image, ok := kolaDefaultImages[kola.QEMUOptions.Board]
if !ok {
return fmt.Errorf("unsupport board %q", kola.QEMUOptions.Board)
}
if kola.QEMUOptions.DiskImage == "" {
kola.QEMUOptions.DiskImage = image
}
if kola.QEMUOptions... |
/**
* Deletes all the sprites killed in the previous step. Also, clears the
* array of collisions from the last step.
*
* @param fm
* Forward model where we are cleaning sprites.
*/
protected void clearAll(ForwardModel fm) {
for (VGDLSprite sprite : kill_list) {
int spriteType = sprite.getTy... |
import { ResourceBase, ResourceTag } from '../resource';
import { Value, List } from '../dataTypes';
export declare class VpnTunnelOptionsSpecification {
PreSharedKey?: Value<string>;
TunnelInsideCidr?: Value<string>;
constructor(properties: VpnTunnelOptionsSpecification);
}
export interface VPNConnectionPr... |
/**
* Add {@link Tooltip} to given <code>control</code> FXML element that is visible when the <code>control</code> is
* focused on.
*
* @param control FXML element to which the tooltip is being added
* @param tooltipText text which will be displayed in a tooltip
*/
protected static voi... |
Rotavirus Outbreak Associated With Toys
Rogers and colleagues from Memorial Sloan-Kettering Cancer Center in New York City report a rotavirus outbreak in the 42-bed pediatric unit having both bone marrow transplant patients and non-bone marrow transplant oncology patients. Nosocomially acquired rotavirus was defined a... |
<filename>presto-main/src/test/java/com/facebook/presto/operator/aggregation/differentialentropy/TestIllegalMethodAggregation.java<gh_stars>1-10
/*
* 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 Licen... |
/**
* @param metadata
* @param procCommand
* @throws TeiidComponentException
* @throws QueryResolverException
*/
protected void resolveGroup(TempMetadataAdapter metadata,
ProcedureContainer procCommand) throws TeiidComponentException,
... |
A Method Proposal for Conducting Simulation Projects in Industry 4.0: A Cyber-Physical System in an Aeronautical Industry
In Industry 4.0, computer simulation has been changing its application. Simulation models focused on specific analysis give space to models with automation degree and they are integrated with diffe... |
/*
* Called holding mutex, will walk cq calling cb on all connections whose
* c_connid <= cq_last->c_connid that still exist at the time we get to them.
*/
void
connections_walk_last(
ldap_pvt_thread_mutex_t *cq_mutex,
lload_c_head *cq,
LloadConnection *cq_last,
CONNCB cb,
voi... |
def check_reciever_connection(netconf_handler, reciever_ip, status='active'):
payload = '''
<filter>
<mdt-oper-data xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-mdt-oper">
<mdt-subscriptions>
<mdt-receivers/>
</mdt-subscriptions>
</mdt-oper-data>
</filter>
'''
netconf... |
def transform_coordinates(xyz):
ptsnew = np.hstack((np.zeros_like(xyz), xyz))
r_phi = xyz[:, 0] ** 2 + xyz[:, 1] ** 2
ptsnew[:, 0] = np.sqrt(r_phi + xyz[:, 2] ** 2)
ptsnew[:, 2] = np.pi / 2 - np.arctan2(np.sqrt(r_phi), xyz[:, 2])
ptsnew[:, 1] = np.arctan2(xyz[:, 1], xyz[:, 0])
ptsnew[:, 3] = x... |
<reponame>hazemalsaied/AutomatiqueSummarization
import re
import string
from nltk.corpus import stopwords
from nltk.corpus import wordnet
from termBank import TermBank
class Word:
titleWordWeight = 1.2
abstractWordWeight = 1.2
# The main initiator
def __init__(self, text, sentence, index=None, paper=... |
<reponame>subramanir2143/Rocket.Chat
import { Callout } from '@rocket.chat/fuselage';
import React, { useMemo, FC } from 'react';
import { FormSkeleton } from '../../../../client/components/Skeleton';
import { useTranslation } from '../../../../client/contexts/TranslationContext';
import { AsyncStatePhase } from '../.... |
<gh_stars>100-1000
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import { asset } from "@pulumi/pulumi";
const config = new pulumi.Config("aws");
const providerOpts = { provider: new aws.Provider("prov", { region: <aws.R... |
/**
*
*
* <pre>
* The list of criteria for matching attributes of a request to this routeRule. This list has OR semantics: the request matches this routeRule when any of the matchRules are satisfied. However predicates within a given matchRule have AND semantics. All predicates within a matchRule mu... |
<filename>Text_Command.h<gh_stars>1-10
#ifndef TEXT_COMMAND_H
#define TEXT_COMMAND_H
#include <QUndoCommand>
#include <QPoint>
#include <QChar>
class MainWidget;
class Text_Command : public QUndoCommand {
typedef std::pair<QPoint, QChar> cell;
MainWidget* widget;
public:
QList<cell> chars;
QList<cell... |
<filename>src/Bible/Versions.hs<gh_stars>1-10
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Bible.Versions(
listVersions
, versionId
, name
, lang
, langCode
, contactUrl
) where
import Bible.Request
import Control.Applicative
import ... |
// Code generated by go-swagger; DO NOT EDIT.
package vsphere
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"net/http"
"github.com/go-openapi/runtime"
models "github.com/vmware-tanzu/tanzu-framework/pkg/v1/tkg/web/se... |
def _all_decoy(protein_col, decoy_prefix):
ret = []
protein_col = protein_col.str.split(";")
for row in protein_col:
decoy = all([p.startswith(decoy_prefix) for p in row])
ret.append(decoy)
return pd.Series(ret).astype(int) |
def generateRename(self, type_name, name, rename, header_mode):
subst = {"DEFINITION_LD": self.__definition_ld, "SOURCE_NAME": self.getVariableName(), "TYPE_NAME": type_name, "VARIABLE_NAME": name, "RENAME": rename}
if header_mode:
return g_template_glsl_rename_header.format(subst)
r... |
import styled from 'styled-components';
interface IStyledButton {
bgColor?: string;
hBg?: string;
}
export const Button = styled.button`
background-color: ${(props: IStyledButton) => props.bgColor ? props.bgColor : '#8979B9'};
border: none;
padding: 1rem;
color: white;
font-family: 'Bangers';
font-size: 2... |
// NewBaseViewKeeper returns a new BaseViewKeeper.
func NewBaseViewKeeper(cdc codec.Marshaler, storeKey sdk.StoreKey, ak types.AccountKeeper) BaseViewKeeper {
return BaseViewKeeper{
cdc: cdc,
storeKey: storeKey,
ak: ak,
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.