content stringlengths 10 4.9M |
|---|
def are_users_erased(self, user_ids):
user_ids = tuple(set(user_ids))
def _get_erased_users(txn):
txn.execute(
"SELECT user_id FROM erased_users WHERE user_id IN (%s)" % (
",".join("?" * len(user_ids))
),
user_ids,
... |
/** Roughly equivalent to expr_list in the grammar */
public class NodeList {
private final List<Node> list;
private final Set<IData> set;
private boolean resolvable = false;
public NodeList() {
this.list = new ArrayList<>();
this.set = new HashSet<>();
}
public List<Node> getL... |
<filename>org.caleydo.view.selectionbrowser/src/org/caleydo/view/selectionbrowser/SelectionBrowserView.java
/*******************************************************************************
* Caleydo - Visualization for Molecular Biology - http://caleydo.org
* Copyright (c) The Caleydo Team. All rights reserved.
* Li... |
/**
* @author Rakesh Patel
*
*/
@SuppressWarnings("unchecked")
@EnableLoggingInterceptor
public abstract class DefaultSearchFunctionHandler<T, R> extends AbstractFunctionHandler<T, R> {
public static final String PROJECTIONS_SEPARATOR = ",";
public static final String KEY_VALUE_SEPARATOR = ":";
@Override
publ... |
Characterization of monoclonal antibodies against Erwinia carotovora subsp. atroseptica serogroup I: specificity and epitope analysis.
The characteristics of two monoclonal antibodies (Mabs), A23/1221.59.44.d.3 (1221) and A23/1239.36.64.e.2 (1239), against Erwinia carotovora subsp. atroseptica serogroup I produced in ... |
import { BasicGate } from './basicgate';
import {
PhaseGate,
ExtraGate,
CNOT, CCNOT, CZ,
CH, CRZ, CXBASE, CY,
SWAP, CSWAP, ISWAP, PSWAP,
RX, RY, RZ
} from './extragates';
export const Gates = {
X: (qubit: number) => {
return new BasicGate('X', [qubit]);
},
Y: (qubit: number) => {
return new B... |
/**
* Initializes the ecoder with the specified number
* of Threads, etc.
*/
public void init() {
EncoderThread encoder;
String name;
publisher = new ParallelPublisher();
publisher.start();
encoders = new ArrayList<>(numEncoders);
for (int i = 0; i < numEnc... |
Water restriction, salinity and depth influence the germination and emergence of sourgrass
Background: Substantial losses to crops can occur due to the presence of sourgrass in agroecosystems, which is promoted by its seed dispersal ability. Environmental factors can affect sourgrass germination and emergence. Objecti... |
/**
* If a DI job calls somehow a Big Data job, then the PACKAGE Maven goal must be called on all the jobs.
*
* @return true if the job or its recursive childs contain a tRunJob which points to a Big Data job
*/
protected boolean requirePackaging() {
if (this.requirePackaging == null) {
... |
/**
* Appends the class file for the given resource to the given buffer. If the
* class file is out-of-date, its fully-qualified class name will be added
* to the set of warning classes.
*
* @param resource
* The resource to find and append the class file for. Cannot be
* null.
* @... |
<filename>errors/notfound.go<gh_stars>0
package errors
import "fmt"
type NotFoundError struct {
Id string
}
func (e *NotFoundError) Error() string {
return fmt.Sprintf("job \"%s\" not found", e.Id)
}
|
The test pilot who was killed in last Friday's crash of** Virgin Galactic's SpaceShipTwo** prematurely unlocked the craft's feathering tail structure, most likely leading to a catastrophic inflight breakup high over the Mojave Desert, according to the National Transportation Safety Board.
Acting NTSB Chairman Christop... |
<reponame>DEK-Technologies/lora-gateway-bridge
package structs
import (
"encoding/hex"
"github.com/brocaar/loraserver/api/gw"
"github.com/brocaar/lorawan"
"github.com/brocaar/lorawan/band"
"github.com/pkg/errors"
)
// UplinkProprietaryFrame implements the uplink proprietary frame.
type UplinkProprietaryFrame st... |
<filename>test/api/OrderRequest.test.ts
import { post, get, put, del } from 'superagent'
import { StatusCodes } from 'http-status-codes'
import * as chai from 'chai'
import * as chaiJsonSchema from 'chai-json-schema'
import { Order } from '../../src/models/Order';
import { orderSchema, arraySchema } from '../../src/sch... |
When I decided on UC Berkeley, my grandmother took me out for a celebratory dinner at Skates on the Bay, an upscale restaurant with phenomenal views in the Berkeley Marina. Although I grew up only an hour away from here, I thought that I’d never been to Berkeley. As I gazed out at San Francisco, however, passing Advent... |
/**
* A shared entity with a capped number of shareholders.
*
* @param <S> the type of the shareholders
* @param <O> the type of the offers of sale of shares for this entity
*/
public class SharedEntityWithCappedShareholders<S extends PayableContract, O extends Offer<S>> extends SimpleSharedEntity<S, O> {
/**... |
I maintain a Varnish Configuration Repository that everyone can commit to. It's meant to be a good base to start any kind of Varnish implementation. I use it as my personal Varnish Boilerplate. And I personally have always disliked configurations such as these:
# Remove all cookies for static files, force a cache hit ... |
/**
* Determine whether the graph contains an Exit
* @param graph
* @return
*/
private boolean hasExit(ActivityGraph graph) {
for (Activity activity : graph.vertexSet() ) {
if (activity instanceof Exit) {
return true;
}
}
return false;
} |
def allowed_flex_volumes(self) -> Optional[List["AllowedFlexVolume"]]:
return self.__allowed_flex_volumes |
def mocked_schema_session(mocker, mocked_schemas):
with mocker.patch.object(
ftrack_api.Session,
'_load_schemas',
return_value=mocked_schemas
):
with mocker.patch.object(
ftrack_api.Session,
'_configure_locations'
):
patched_session = f... |
package main
import (
"fmt"
"sync"
"time"
csp "github.com/barklan/concurrency/csp"
)
func elapsed() func() {
start := time.Now()
return func() {
fmt.Println("took", time.Since(start))
}
}
func cpuHeavy() {
for n := 0; n < 20_000; n++ {
a, b := 0, 1
for i := 0; i < n; i++ {
a, b = b, a+b
}
}
}
... |
A group of proud asexual folks in the 2015 London Pride Parade. Photo by Funk Dooby (Creative Commons).
My friends think I just haven't met the right guy yet. My doctor offered to run some tests. Even the DSM-5 categorizes lack of sexual arousal as a disorder.
Asexuality is one of the lesser known—or invisible—sexual... |
def uri_exists_wait(uri, timeout=300, interval=5, storage_args={}):
uri_obj = get_uri_obj(uri, storage_args)
start_time = time.time()
while time.time() - start_time < timeout:
if uri_obj.exists(): return True
time.sleep(interval)
if uri_exists(uri): return True
return False |
/**
* Create array list from array of objects.
* @param[] $input Array of objects.
* @return TArrayList Resulting array list.
*/
public static TArrayList createFrom(Object[] $input) {
if ($input == null)
return null;
TArrayList $output = create();
if (SIZE($input)... |
/**
* Checks that the initial phase's method "toCreationPhase" works properly.
*/
@Test
void toCreationPhaseTest() {
try {
phase.toCreationPhase();
assertEquals(controller.getPhase(), new CreationPhase());
assertEquals(controller.getPhase(), controller.getPhase(... |
ab = input().split()
a,b = int(ab[0]), int(ab[1])
result = a*(a-1)//2 + b*(b-1)//2
print(result) |
import json
import os
import boto3
import logging
def lambda_handler(event, context):
http_method = event["requestContext"]["http"]["method"]
task_body = event.get("body", json.dumps([]))
if type(task_body) is str:
task_body = json.loads(task_body)
logging.warning("HTTP method is: " + http_m... |
// MenuHintText returns a LabelStyle suitable for use as hint text in a
// MenuItemStyle.
func MenuHintText(th *material.Theme, label string) material.LabelStyle {
l := material.Body1(th, label)
l.Color = WithAlpha(l.Color, 0xaa)
return l
} |
There have been scattered reports of several countries staging pre-World Cup camps in the United States. England had previously been planning friendlies in Boston and Washington, but after learning of their draw they may be aiming for a more humid stint and playing the US in South Florida: England are planning to tweak... |
<gh_stars>1-10
import time
import NN_Train
import EmailTool
import CmdAnalysis
import Global
if __name__ == '__main__':
Global.running = False
cmdana = CmdAnalysis.CmdAnaly()
print('Start')
a = 1
while(True):
time.sleep(10)
print(a, Global.running)
try:
msg, sub... |
A new study from Princeton spells bad news for American democracy—namely, that it no longer exists.
Asking “[w]ho really rules?” researchers Martin Gilens and Benjamin I. Page argues that over the past few decades America’s political system has slowly transformed from a democracy into an oligarchy, where wealthy elite... |
// proxyWebsocket copies data between websocket client and server until one side
// closes the connection. (ReverseProxy doesn't work with websocket requests.)
func (h *Harness) proxyWebsocket(w http.ResponseWriter, r *http.Request, host string) {
var (
d net.Conn
err error
)
if h.paths.HTTPSsl {
d, err = t... |
/**
* The TransportDescriptor data type describes a transport.
*
* Ref. ETSI GS MEC 010-2 V1.1.1 (2017-07) - 6.2.1.19
*
* @author nextworks
*
*/
@Entity
public class TransportDescriptor implements DescriptorInformationElement {
@Id
@GeneratedValue
@JsonIgnore
private Long id;
@OneToOne(fetch=... |
<filename>src/client/actions.ts
import {
CodeAction,
CodeActionContext,
CodeActionProvider,
Position,
Range,
TextEdit,
TextDocument,
workspace,
} from 'coc.nvim';
export class VolarCodeActionProvider implements CodeActionProvider {
public async provideCodeActions(document: TextDocument, range: Range,... |
package cmd
import (
wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli"
"github.com/cosmos/cosmos-sdk/client"
"github.com/spf13/cobra"
)
func AddGenesisWasmMsgCmd(defaultNodeHome string) *cobra.Command {
txCmd := &cobra.Command{
Use: "add-wasm-genesis-message",
Short: ... |
// screenfitter.h: Class to perform screen fitting
// Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
// SPDX-License-Identifier: GPL-3.0-or-later
/**
* @file ScreenFitter.h Implements TEC model screen filter @ref ScreenFitter.
* @author Maaijke Mevius
* @date 2017-02-01
*/
#ifndef DP3_DDECA... |
def forward(ctx, src: RaggedFloat, use_log: bool, out: List[RaggedFloat],
unused_scores: torch.Tensor) -> torch.Tensor:
assert len(out) == 1
ans_ragged = _k2.normalize_per_sublist(src.ragged, use_log)
out[0] = RaggedFloat(ans_ragged)
ctx.out_ragged = out[0].ragged
... |
<filename>src/java/org/apache/cassandra/io/sstable/SSTableRewriter.java<gh_stars>0
/*
* 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... |
<filename>ZEKit/ZEKit/resource/ZEResource.h
//
// ZEResource.h
// ZEKit
//
// Created by zwein on 6/4/14.
// Copyright (c) 2014 lzhteng. All rights reserved.
//
#ifndef ZEKit_ZEResource_h
#define ZEKit_ZEResource_h
#endif
|
/*-
* #%L
* Chronograph
* %%
* Copyright (C) 2019 Morten Haraldsen (ethlo)
* %%
* 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
*
... |
Oral Anticoagulants Versus Antiplatelet Therapy for Preventing Further Vascular Events After Transient Ischemic Attack or Minor Stroke of Presumed Arterial Origin
Patients who are entered in clinical trials after a transient ischemic attack or nondisabling ischemic stroke have an annual risk of important vascular even... |
package metrics
type PolicyValidationMode string
const (
Enforce PolicyValidationMode = "enforce"
Audit PolicyValidationMode = "audit"
)
type PolicyType string
const (
Cluster PolicyType = "cluster"
Namespaced PolicyType = "namespaced"
)
type PolicyBackgroundMode string
const (
BackgroundTrue PolicyBac... |
<reponame>bflorian/smartthings-cli<gh_stars>0
import _ from 'lodash'
import Table from 'cli-table'
import { Logger } from '@smartthings/core-sdk'
import { logManager } from './logger'
/**
* This code is copied from the DefinitelyTyped source code because it is not
* exported there.
*
* https://github.com/Defini... |
import java.io.IOException;
import java.util.Scanner;
public class Kot {
public static void main (String [] Args) throws IOException {
Scanner in = new Scanner(System.in);
int hh = in.nextInt();
int mm = in.nextInt();
int H = in.nextInt();
int D = in.nextI... |
/*
* Tencent is pleased to support the open source community by making 蓝鲸 available.
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the Li... |
/*
* This code is required to insure that a new Dept entity
* instance is posted before any new Emp entity instances
* that are in that new department.
*
* It would not be necessary if the Dept->Emp association
* were marked as a composition, in which case the framework
* takes care of the ... |
package inmemorydb
import (
"context"
"fmt"
"github.com/eurofurence/reg-attendee-service/internal/entity"
"github.com/eurofurence/reg-attendee-service/internal/repository/database/dbrepo"
"sync/atomic"
)
type InMemoryRepository struct {
attendees map[uint]*entity.Attendee
history map[uint]*entity.History
idSe... |
// GetThing gives you a thing from storage
func (s *Service) GetThing(ctx context.Context, id uint) (*entity.Thing, error) {
return s.repo.GetThing(ctx, id)
} |
/**
*
* @author Rafael Guterres
*/
public class DeviceRepository extends BaseTraccarRepository<Device, Long> implements Repository<Device, Long> {
private static final long serialVersionUID = 5330144509499505026L;
public List<Device> findDevicesByUserId(Long userId) {
CriteriaBuilder criteriaBuilde... |
"""This sample game illustrates the collision rules in PaintBot. Written by the Mimir curriculum team."""
from paintbot import (
PaintGame
)
def p0_main(bot):
bot.down()
bot.down()
bot.down()
bot.right()
bot.right()
def p1_main(bot):
bot.up()
bot.up()
bot.left()
bot.left()
... |
import {
Column,
Entity,
OneToOne,
PrimaryGeneratedColumn,
} from "../../../src/index"
import { Post } from "./Post"
@Entity("sample2_post_details")
export class PostDetails {
@PrimaryGeneratedColumn()
id: number
@Column()
authorName: string
@Column()
comment: string
@Col... |
<filename>src/routes/v1.ts<gh_stars>0
import express from 'express'
import AuthenticationController from '../controllers/AuthenticationController'
import AuthenticationControllerPolicy from '../policies/AuthenticationControllerPolicy'
import isAuthenticated from '../policies/isAuthenticated'
const router = express.R... |
/**
* Constants that are used throughout the program
* Created by Erika on 19-Mar-17.
*/
public class Constants {
/**
* Multiply by this factor to convert nautical miles to meters.
* <br>
* Divide by this factor to convert meters to nautical miles.
* <br>
* 1 nautical mile = 1852 meters.
... |
/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko.gfx;
im... |
def decorator(func):
def decorated_func( *args, **kwargs):
print ("Originating function: {}".format(func.__name__))
return func( *args, **kwargs)
return decorated_func |
Johnnie Bryan Hunt was never the most likely candidate to breathe life into what remains of America's unfinished multibillion-dollar science project: the Superconducting Super Collider.
The plain-talking, Stetson-wearing, born-again Arkansan multimillionaire left school after the sixth grade. He made a small fortune i... |
What Are the High Holy Days?
If the year is a train, the High Holidays (AKA High Holy Days) are its engine. A delicate blend of joy and solemnity, feasting and fasting, prayer and inspiration make up the spiritually charged head of the Jewish year.
The High Holiday season begins during the month of Elul, when the sho... |
// AddBackground adds background image to the world
func (w *World) AddBackground(path string) error {
bg, err := loadPicture(path)
if err != nil {
return err
}
w.bg = bg
return nil
} |
Danny Simpson is set to return from injury in time to face Birmingham the week after next.
Manager Harry Redknapp confirmed the right-back, ever present until a small fracture of the back at the end of January ruined the sequence, has received good news from a scan.
The manager said: “Danny’s improving. In a couple o... |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int N,H;
cin>>N>>H;
long long int arr[N];
for(int i=0;i<N;i++){
cin>>arr[i];
}
int ans = 0;
for(int i=1;i<=N;i++){
sort(arr,arr+i,greater<int>());
long long int temp = 0;
for(int j=0;j<i;j=j+2){
... |
def concat(self, data_container: DACT):
data_container.tolistshallow()
self._ids.extend(data_container._ids)
self.data_inputs.extend(data_container.data_inputs)
self.expected_outputs.extend(data_container.expected_outputs)
return self |
import { ParatextProject } from '../../model/paratextProject';
import { IAxiosStatus } from '../AxiosStatus';
// Describing the shape of the paratext integration slice of state
export interface IParatextState {
count: number;
countStatus?: IAxiosStatus;
username: string;
shortName: string;
usernameStatus?: I... |
/* Perform a basic EVE configuration.
* The LIF, TPID values, VID values and VLAN-Edit profile are supplied.
* The Action is defined, the LIF VLAN-Edit information is configured as well
* as mapping between the VLAN-Edit Profile and q fixed tag format.
*
* INPUT:
* lif: Out-LIF to set
* gport_id: The LIF... |
<gh_stars>10-100
#ifndef AYLA_GL_CAMERA_TO_VIEWPORT_RAY_HPP
#define AYLA_GL_CAMERA_TO_VIEWPORT_RAY_HPP
#include "ayla_gl/config.hpp"
#include <ayla/geometry/ray.hpp>
namespace ayla_gl {
/**
* @param x_ndc Position x coordinate in Normalized Device Coordinates (NDC) [-1, 1]
* @param y_ndc Position y coordinate in ... |
<reponame>viettrung9012/home-panel
// @flow
import { Color } from '@material-ui/core';
import { PaletteOptions } from '@material-ui/core/styles/createPalette';
import { CommonColors } from '@material-ui/core/colors/common';
import pink from '@material-ui/core/colors/pink';
import { BaseProps } from '../Cards/Base';
im... |
You'd think someone in charge would have told the lackeys scouring social media for stuff to put up on the big screens at Quicken Loans Arena for the Republican National Convention to spend just a little bit of time screening those tweets. But this is the RNC and the biggest shitshow of a convention ever.
As Donald Tr... |
<gh_stars>1-10
# coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2017-2018 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "S... |
/**
* For a statement s, compute the set of statements that may def the heap value read by s.
*/
OrdinalSet<Statement> computeResult(Statement s, Map<PointerKey, MutableIntSet> pointerKeyMod,
BitVectorSolver<? extends ISSABasicBlock> solver, OrdinalSetMapping<Statement> domain, CGNode node, ExtendedHe... |
Pseudoenantiomeric fluorescent sensors in a chiral assay.
Two enantioselective fluorescent sensors, namely, the 1,1'-binaphthol (BINOL)-amino alcohol (S)-1 and the H(8)BINOL-amino alcohol (R)-2, have been prepared as a pseudoenantiomeric pair. These two compounds have the opposite chiral configuration at both the axia... |
/**
*
* @author Martin Kouba
*/
public class FileSystemResultRepositoryTest {
@Rule
public WeldInitiator weld = WeldInitiator.of(FileSystemResultRepository.class, IdGenerator.class,
InMemoryResultRepository.class, DelegateResultRepository.class, MockVertxProducer.class,
DummyConfigur... |
/**
* Class responsible to handle the logic of MQTT protocol it's the director of
* the protocol execution.
*
* Used by the front facing class ProtocolProcessorBootstrapper.
*
* @author andrea
*/
public class ProtocolProcessor {
static final class WillMessage {
private final String topic;
pr... |
<gh_stars>1-10
// Stick
// Copyright © 2017-2021 <NAME>.
//
// Licensed under any of:
// - Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
// - MIT License (https://mit-license.org/)
// - Boost Software License, Version 1.0 (https://www.boost.org/LICENSE_1_0.txt)
// At your option (See accompa... |
<reponame>NovasomIndustries/Utils-2019.01
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <libdrm/drm_fourcc.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <errno.h>
#include <string.h>
#include <stdint.h>
#include "pv_jpegdec... |
WASHINGTON – John Kelly led tens of thousands of Marines in Iraq’s treacherous Anbar Province, was in charge of the entire U.S. military presence in Central and South America, yet now may have come across someone even he cannot manage:
The guy in the West Wing office a few steps away from his, the president of the Uni... |
import TilgangTabell from '@/AvtaleOversikt/IngenAvtaler/arbeidsgiver/TilgangTabell';
import VerticalSpacer from '@/komponenter/layout/VerticalSpacer';
import EksternLenke from '@/komponenter/navigation/EksternLenke';
import { Tilganger } from '@/types/innlogget-bruker';
import { Element, Normaltekst } from 'nav-fronte... |
<reponame>transcend-io/schema-sync<gh_stars>10-100
import { GraphQLClient } from 'graphql-request';
import { CREATE_DATA_SUBJECT, DATA_SUBJECTS } from './gqls';
import keyBy from 'lodash/keyBy';
import flatten from 'lodash/flatten';
import uniq from 'lodash/uniq';
import difference from 'lodash/difference';
import { Tr... |
def main():
parser = ArgumentParser(epilog=('''\
One OPERATION Command is needed for Chromograph to produce output
'''))
parser.add_argument("-a", "--autozyg", dest="autozyg", help="Plot regions of autozygosity from bed file [OPERATION]", metavar="FILE")
parser.add_argument("-c", "--covera... |
#include <string>
#define BOOST_URL_HEADER_ONLY
#include <boost/url.hpp>
#include <amqp.h>
#include <amqp_tcp_socket.h>
#include <components/log/log.hpp>
struct amqp_err_reply {
int code;
std::string text;
};
class amqp_consumer {
public:
amqp_consumer(const std::string& url, std::string queue = "celery", st... |
Queanbeyan a natural disaster as flood peaks
Updated
The city of Queanbeyan, south-east of Canberra, has been declared a natural disaster zone after experiencing its worst flooding in decades.
The Queanbeyan River peaked at 8.4 metres leaving the southern New South Wales city's centre underwater.
The flood waters r... |
#include "DisplayManager.h"
#include "../entities/Camera.h"
#include <iostream>
GLFWwindow* DisplayManager::m_Window;
float DisplayManager::m_LastFrameTime = 0.0f;
float DisplayManager::m_DeltaTime = 0.0f;
void keyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
void cursorPositionCallback(... |
/**
* Delete a specific version of a file including its contents and meta-data. Has an empty response with 204 No-Content
* to ensure the idempotent behavior
*
* @param fileId File ID of the resource to be deleted
* @param version Specific version of a file resource to be deleted
* */
@ResponseS... |
/**
* DOC hyWang class global comment. Detailled comment
*/
public class ConvertRepositoryNodeToProcessNode {
private INode node;
private String memoSQL;
private DbInfo info;
private IContext selectedContext;
DatabaseConnection databaseConnection;
public ConvertRepositoryNodeToProcessNod... |
mod asm;
use asm::emit_asm;
mod command;
use command::{parse, Command};
mod config;
use config::CompilerConfig;
mod error;
use error::{CompilerError, Result};
mod fs;
use fs::{read_source, write_to_file};
mod optimized_command;
use optimized_command::{optimize, OptimizedCommand};
fn main() -> Result<()> {
let... |
Airway responses to inhaled ouabain and histamine in conscious guinea pigs.
Tracheal Na+-K+-ATPase activity is positively correlated with in vivo airway responsiveness to histamine. We wondered whether this were a chance association or whether it was directly related to the mechanism of hyperreactivity. Therefore, we ... |
describe('404', () => {
it('should return display not-found page', () => {
cy.visit('http://localhost:3000/test', { failOnStatusCode: false });
cy.title().should('include', 'page not found');
});
});
|
Plasma cofactors of platelet function: correlation with diabetic retinopathy and hemoglobins Ala-c.
We studied 29 diabetic patients (eight without and 21 with retinopathy) and 29 matched control subjects for hemoglobins Ala-c and plasma levels of fibrinogen, von Willebrand factor, and factor VIII/von Willebrand factor... |
/**
* Helper method to validate existence of given directory. Will create
* missing directory if createMissingDirectories flag is set to true.
*
* @param path
* To be validated
* @param createMissingDirectories
* Boolean flag to indicate whether to create missin... |
A bill passed by the Michigan State Senate would endanger the health of Michiganders by granting sweeping new powers to practitioners of unscientific bogus medicine and treatments, said the Center for Inquiry.
Black(water) Market: Digging Up the Dirt about Slick Designer Beverages
April 2, 2012
The organic aisle in ... |
// @@@ START COPYRIGHT @@@
//
// 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, Ver... |
<reponame>ltron/tangle
class TangledMapper(object):
""" Class that implements relations between instances of one class to the other.
"""
def __getitem__(self, item):
raise NotImplementedError()
def get_mapped_object(self, instance, other_class):
try:
return instance.tangle... |
/**
* A {@code PlaceholderException} is used when an assertion error cannot be serialized or deserialized.
*/
public class PlaceholderAssertionError extends AssertionError implements PlaceholderExceptionSupport {
private final String exceptionClassName;
private final Throwable getMessageException;
private... |
def feature_vector_mc(
graph: nx.Graph,
event_photon_numbers: list,
max_count_per_mode: int = 2,
n_mean: float = 5,
samples: int = 1000,
loss: float = 0.0,
) -> list:
if samples < 1:
raise ValueError("Number of samples must be at least one")
if n_mean < 0:
raise ValueErro... |
/* The purpose of this class is just to "bundle together" all the
* character data that the user might type in when they want to
* add a new Customer or edit an existing customer. This String
* data is "pre-validated" data, meaning they might have typed
* in a character string where a number was expected.
*
... |
import pytest
import tensorlayerx as tlx
from gammagl.utils import homophily
def test_homophily():
edge_index = tlx.convert_to_tensor(([[0, 1, 2, 3], [1, 2, 0, 4]]))
y = tlx.convert_to_tensor(([0, 0, 0, 0, 1]))
batch = tlx.convert_to_tensor(([0, 0, 0, 1, 1]))
method = 'edge'
assert pytest.approx(... |
def make_diviser(n):
D=[]
for i in range(1,int(n**0.5)+2):
if n%i==0:
D.append(i)
D.append(n//i)
D=sorted(set(D))
l=len(D)
if l%2==0:
return D[(l//2)-1]+D[l//2]
else:
return D[l//2]*2
n=int(input())
print(make_diviser(n)-2) |
import React from 'react';
import { getExamples } from '../util/examples';
import { dispatchSelectExample } from '../actions/selectExample';
import { getActionManager } from 'monaco-typescript-project-util';
import { State } from '../actions/State';
import { getEmitOutput } from '../projectActions';
export default (st... |
from fastapi import FastAPI, Request, Form
from typing import Optional
from starlette.responses import RedirectResponse
from onelogin.saml2.auth import OneLogin_Saml2_Auth
from onelogin.saml2.settings import OneLogin_Saml2_Settings
from onelogin.saml2.utils import OneLogin_Saml2_Utils
app = FastAPI()
saml_settings =... |
<reponame>MichalPitr/fever-cs-dataset<filename>src/common/features/feature_function.py
import numpy as np
import os
import pickle
from common.util.log_helper import LogHelper
class Features():
def __init__(self,model_name, features=list(), label_name="label",base_path="features"):
self.feature_functions ... |
def AbegoConstraintSegment(segments,blue):
blue.reindex_blueprint(start=1)
cst=''
for segment in segments:
seg = blue.segment_dict[segment]
for res in seg.bp_data:
pos = res[0]
if len(blue.bp_data[pos-1][2])==2:
st = AbegoPhiPsiConstraints(pos,blue)
cst+=st
return cst |
// Copyright 2017 The Ray 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 i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.