content
stringlengths
10
4.9M
def no(): print('NO') exit(0) n, k = map(int, input().split()) bina = list(map(int, bin(n)[2:])) cur = bina.count(1) if k > n or cur > k: no() while cur < k: index = bina.index(next(x for x in bina if x > 0)) to = index while to < len(bina) - 1 and pow(2, to - index + 1) - 1 <= k ...
/* Adds a message to the document's external message queue. */ void enqueue_message(Document *document, const Message *message) { if ((document->flags & DOCFLAG_EXTERNAL_MESSAGES) != 0) enqueue_message(&document->message_queue, message); }
// newHashTable creates a new hashtable func newHashTable(size uint) *hashTable { return &hashTable{ buckets: make([]*Bucket, size), nSize: 0, } }
Fermi-liquid and non-Fermi-liquid phases of an extended Hubbard model in infinite dimensions. We study an extended Hubbard model in the limit of infinite dimensions. The local correlation functions of this model are those of a generalised asymmetric Anderson model. The impurity model displays a Fermi liquid phase, a p...
Osama bin Laden issued a handy guide about masturbation – assuring jihadists that he approved of self-love in extreme cases. The memo — among the documents and sizable porn stash seized in 2011, when Navy SEALs killed him in Pakistan — have now been released by the Office of the Director of National Intelligence. The...
from sys import stdin def main(): stdin.readline() l = list(map(int, stdin.readline().split())) mi = ma = l[0] cnt = 0 for x in l: if ma < x: ma = x cnt += 1 elif mi > x: mi = x cnt += 1 print(cnt) main()
// Creates a new instance of the IntegrationAccountMapListResultPage type. func NewIntegrationAccountMapListResultPage(cur IntegrationAccountMapListResult, getNextPage func(context.Context, IntegrationAccountMapListResult) (IntegrationAccountMapListResult, error)) IntegrationAccountMapListResultPage { return Integrati...
<gh_stars>10-100 #pragma once #include <map> #include <iostream> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtx/quaternion.hpp> #include <SDL2/SDL.h> #include "../core/display.h" #include "../editor/components/viewport.h" class Camera { public: Camera(Display* windown, float fov, float as...
GIGABYTE’s New Products Pictures launched of GIGABYTE’s Facebook pages this week point to at least four new models covering gaming, overclocking and connectivity. Part of GIGABYTE’s new range is its Black Editions (BK), reducing the color of the heatsinks and components to as black as possible. It is unclear if some m...
// SSHCreateFile creates a file on a remote machine func SSHCreateFile(ctx context.Context, user string, host string, dest string, f io.Reader) error { err := SSHRunCommand(ctx, user, host, fmt.Sprintf("sudo mkdir -p %s", filepath.Dir(dest))) if err != nil { return errors.Wrapf(err, "Error creating %s", filepath.Di...
<filename>examples/gRPC/area_calculator/consumer-jvm/src/test/java/io/pact/example/grpc/consumer/PactConsumerTest.java package io.pact.example.grpc.consumer; import au.com.dius.pact.consumer.MockServer; import au.com.dius.pact.consumer.dsl.PactBuilder; import au.com.dius.pact.consumer.junit.MockServerConfig; import au...
The Problem of Persistence with Rotating Displays Motion-to-photon latency causes images to sway from side to side in a VR/AR system, while display persistence causes smearing; both of these are undesirable artifacts. We show that once latency is reduced or eliminated, smearing due to display persistence becomes the d...
/** * Package is containing highlighter classes. **/ package com.gentics.cr.lucene.search.highlight;
from math import ceil,floor n,m = map(int, input().split()) res = 0 for i in range(1,n+1): req = 5 - i%5 res += ((m-req) // 5) +1 print(res)
//Call this method *ONLY* to add initial rules from file public void addInitialRuleFromFile(long id,String operation,double amount,String coin, String direction, double target, String currency, String comment,String orderResponse, boolean active,boolean executed, String market, String executed...
<gh_stars>0 import { Component } from '@angular/core'; import { FaIconLibrary } from '@fortawesome/angular-fontawesome'; import { faCalendar, faClipboard, faCommentDots, faEye, faEyeSlash, faHeart, faUser, faArrowAltCircleDown, faPauseCircle, faKeyboard } from '@fortawesome/free-regular-svg-icons'; import { State a...
package main import ( "fmt" "github.com/zofan/go-country" "github.com/zofan/go-fwrite" "github.com/zofan/go-language" "github.com/zofan/go-req" "github.com/zofan/go-xmlre" "html" "path/filepath" "regexp" "runtime" "strings" "time" ) func main() { fmt.Println(Update()) } func Update() error { var ( ht...
Lithium-ion energy storage battery in PV-smart building application Photovoltaic (PV) panels with energy storage batteries represents a feasible solution for powering domestic loads. The service life of the batteries and the power management are the main challenges by developing the energy supply system of smart homes...
<reponame>Belval/DiskList from .disklist import *
<reponame>DCTewi/My-Codes #include <bits/stdc++.h> using namespace std; const int MAX = 20 + 5; const int MAXN = 1e7 + 5; int n, k, tot = 0; int x[MAX]; bool ispri[MAXN]; int prime[MAXN], top = 0; void check_prime() { memset(ispri, 0x3f, sizeof(ispri)); ispri[0] = ispri[1] = 0; for (int i = 2; i < MAXN; ++i) { ...
The IRS intensified its war against the Tea Party with more delays and an unheard of move. It has stalled processing non-profit status requests for Tea Party groups yet again despite admitting in 2013 it targeted these groups unfairly. Instead of approving the applications, the IRS sent back a new round of questions....
/** * Metadata for a single KML layer, in JSON format. <br> * <br> * See <a href="https://developers.google.com/maps/documentation/javascript/reference#KmlLayerMetadata">KmlLayerMetadata * API Doc</a> */ public class KmlLayerMetadata extends JavaScriptObject { /** * use newInstance(); */ protected KmlLa...
k,n,w = map(int,input().split()) need = k*(w*(w+1))/2 required = need -n if required<0 : required = 0 print(int(required))
/** * Created by rroeser on 3/8/16. */ public class FailureAwareReactiveSocketClientTest { @Test public void testError() throws InterruptedException { AtomicInteger count = new AtomicInteger(0); FailureAwareReactiveSocketClient client = new FailureAwareReactiveSocketClient(new ReactiveSocketCl...
import pytest from matcher.score.logic import calculate_match_score from matcher.score.errors import EmptyInputRecord @pytest.mark.parametrize( 'input_record, db_record', [ ( {'col1': 'val1', 'col2': 'val2'}, None ) ] ) def test_calculate_match_score_with_empty_db_...
#import "QuadPayCardholder.h" #import "QuadPayCard.h" #import "QuadPayCustomer.h" @class QuadPayVirtualCheckoutViewController; NS_ASSUME_NONNULL_BEGIN @protocol QuadPayVirtualCheckoutDelegate <NSObject> - (void)checkoutSuccessful:(QuadPayVirtualCheckoutViewController*)viewController card:(QuadPayCard *)card cardhol...
/** removes zero time Diff, Integrate terms **/ ex zero_order_rem(const ex& expr_) { ex _y=expr_; exmap expr; expr[Integrate(wild(0), wild(1), 0)] = wild(0); expr[Diff(wild(0), wild(1), 0)] = wild(0); ex xprev; do { xprev = _y; _y = _y.subs(expr, subs_options::algebraic); ...
Risk, variability, and decision-making in goal-directed movements 1. Whole-body movements are less optimal than arm-reaching movements. 2. Optimality in arm-reaching is reduced by increased variability, whereas this effect is not observed in whole-body movements. This is the first study to assess the optimality of who...
package exohcl import ( "fmt" "github.com/deref/exo/internal/manifest/exohcl/hclgen" "github.com/hashicorp/hcl/v2" "github.com/hashicorp/hcl/v2/hclsyntax" ) type ComponentSet struct { // Analysis inputs. Blocks hcl.Blocks // Analysis outputs. Components []*Component } func NewComponentSet(m *Manifest) *Com...
import logging import warnings from datetime import datetime from src import * logger_spacy = logging.getLogger("spacy") logger_spacy.setLevel(logging.ERROR) warnings.filterwarnings("ignore", message=r"\[W108\]", category=UserWarning)
<filename>tests/benchmarks/bench_all.cpp // this file runs all the benchmarks #include <benchmark/benchmark.h> #include <benchutils.hpp> #include <cellular_automata.hpp> #include <iostream> // run 10 iterations on multiple grid sizes using the default number of workers static void BM_SimulationStepSequential(benchmar...
import numpy as np import matplotlib.pyplot as plt import h5py as py from BarAxialVibration import BarAxialVibration out_time = [] pcl_var = [] # numerical solution hdf5_file = py.File("../Build/Tests/t2d_me_s_1d_compression.h5", "r") th_grp = hdf5_file['TimeHistory']['compression'] output_num = th_grp.attrs['outpu...
#include<stdio.h> int main(void){ int a,b,c,d[10],e=0,f,g,h,flag; scanf("%d%d",&a,&b); for(c=a;c<=b;c++){ h=c;flag=1;e=0; while(h>=10) {d[e]=h%10; h=h/10;e++; } d[e]=h; for(f=0;f<=e;f++) for(g=f+1;g<=e;g++) if(d[f]==d[g]) flag=0; if(flag==1) {printf("%d",c);return 0;}} if(flag==0) printf(...
/* * To be called by the forked process to load the generated links and Hadoop * configuration properties to automatically inject. * * @param props The Azkaban properties */ public static void injectResources(Props props) { if (props.getBoolean("azkaban.inject.hadoop-site.configs", true)) { Con...
package frontEnd.CustomJavafxNodes; import java.util.List; import java.util.Optional; import javafx.scene.control.TextInputDialog; public class SingleFieldPrompt { private List<String> myDialogTitles; private String myPromptText; private String myPromptLabel; public SingleFieldPrompt(List<String> dialogTitles, ...
<gh_stars>1000+ import { IDotnetify } from "../dist/typings"; declare const dotnetify: IDotnetify; export default dotnetify;
/** * Global imports */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; /** * Local imports */ import { TournamentServicesModule } from '@tournament/services'; /** * Import guards */ import { AdministratorGuard } from './administrator.guard'; import { CreatorGuard } fro...
package com.waes.jgu.service; import java.util.ArrayList; import java.util.List; import com.waes.jgu.domain.EntryData; import com.waes.jgu.dto.DiffResponse; import com.waes.jgu.enums.Side; import com.waes.jgu.exception.EntryIncompleteException; import com.waes.jgu.exception.EntryNotFoundException; import co...
/** * Return true if this link has expired, ie. a different one exists at a later time than this that is in the past. */ boolean expired(DB db) throws SQLException { db.executeQuery("SELECT count(*) AS count FROM nodelinks WHERE nlid<>"+nlid+" AND nid="+nid+" AND starttime>'"+starttime+"' AND starttim...
package mylib2 import "strings" func repeatString(s string, n int) string { var pieces = make([]string, n) for i := range pieces { pieces[i] = s } const sep = "" return strings.Join(pieces, sep) }
Now I know we didn’t have the best relationship between our two sites, but I’d like to thank you for your service to the community nevertheless. I know not only myself, but many others have benefited from your site at one time or another. We used to use it as our primary streaming mirror (much to your chagrin) after al...
/* delete node "wn" from the block (which may be NULL). * adjust the next, previous, and block first and last pointers */ extern void LWN_Delete_From_Block(WN *block, WN* wn) { WN *node; WN* parent_wn; Is_True (wn, ("LWN_DeleteFromBlock: deleting a NULL node")); Is_True (((!block) || (WN_opcode(block) == OPC_...
/** * JUnit4 {@link org.junit.Rule} which executes test with real (in-memory) compiler and custom immutables processor. * It gives access to {@link Elements} and {@link Types} as well as {@link ValueType} (for a given class). * * <p>A much better alternative to mocking {@code javax.lang.model} classes. * * <h3>Us...
/** * Check whether the given armor is leggings of any material. * * @param type * The material describing the armor. * @return <code>true</code>, if the armor is an leggings. */ public static boolean isLeggings(final Material type) { if (type == null) { return false; } switch (type) { ...
/** * @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a> */ abstract class ClientRepresentationMixIn { @JsonIgnore String registrationAccessToken; }
<gh_stars>0 import java.awt.*; public class CardClass extends ShapeClass { //Declare encapsulated data private int suitValue = 1; private int faceValue = 1; private Color suitColor = Color.red; private boolean faceUp = true; //Constructor method public CardClass () { setCentre (320, 2...
<gh_stars>1-10 #ifndef DTSegment_DTRecSegment2DAlgoFactory_h #define DTSegment_DTRecSegment2DAlgoFactory_h /** \class DTRecSegment2DAlgoFactory * * Factory of seal plugins for DT 2D segments reconstruction algorithms. * The plugins are concrete implementations of DTRecSegment2DBaseAlgo base class. * * \author <...
/* * Copyright (c) 2018-2020, <NAME> <<EMAIL>> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list ...
Glenn Jones is a graphic designer and illustrator from Auckland, New Zealand. ‘GLENN’ from ‘NZ’ = GLENNZ; which was his user name on the T-shirt design site Threadless.com. What started as a hobby quickly became a booming success, eventually leading to the launch of his own t-shirt site GLENNZ.com, where he now sells a...
<filename>nerts-bot/src/lobbyinfo.rs use steamworks::{LobbyId, SteamId}; use crate::Bot; #[derive(Debug, Clone, Copy)] pub enum LobbyInfo { SteamLobby(LobbyId), FriendLobby(SteamId, LobbyId), } impl LobbyInfo { pub fn lobby_id(&self) -> LobbyId { match self { LobbyInfo::SteamLobby(id)...
Robust Multivariable Estimation of the Relevant Information Coming from a Wheel Speed Sensor and an Accelerometer Embedded in a Car under Performance Tests In the present paper, in order to estimate the response of both a wheel speed sensor and an accelerometer placed in a car under performance tests, robust and optim...
def flare_ensemble(config, simulation_period, N, out_dir, file_suffix=""): for i in range(0, int(N)): instance_out_dir = "%s/%s" % (out_dir, i) flare_local(config, simulation_period, instance_out_dir, file_suffix=file_suffix)
// SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2017 Google, Inc */ #include <common.h> #include <dm.h> #include <errno.h> #include <log.h> #include <wdt.h> #include <asm/io.h> #include <asm/arch/wdt.h> #include <linux/err.h> #define WDT_AST2500 2500 #define WDT_AST2400 2400 struct ast_wdt_priv { struct ast_w...
/** * Generate the packing instruction suitable for modifying the zone associated * with the given user. * * @param userName * {@code String} with the iRODS user name. * @param zone * {@code String} with the user's zone. * @return {@link GeneralAdminInp} * @throws JargonException...
#include <bits/stdc++.h> #define ff first #define ss second #define endl '\n' #define INF 1e9 using namespace std; using ll = long long; using pii = pair<int,int>; using vi = vector<int>; int main() { ios::sync_with_stdio(false); cin.tie(NULL); double x,y; cin >> x >> y; double k = floor(sqrt(x*...
#include<iostream> #include<cstdio> using namespace std; int main() { long long s, m, p, co=0, ex=0; // cin>>s>>m>>p; scanf("%lld %lld %lld", &s, &m, &p); co+=s/p; s=s%p; co+=m/p; m=m%p; if((m+s)/p>=1) { co+=(m+s)/p; if(s>m) ex=((s+m)-((s+m)%p))-s; else ex=((m+s)-((m+s)%p))-m ; }...
<gh_stars>0 // // Created by <NAME> on 28.02.17. // #include <llvm/IR/DerivedTypes.h> #include <llvm/Support/raw_ostream.h> #include "type.h" #include "function-type.h" #include "pointer-type.h" #include "array-type.h" #include "struct-type.h" NAN_MODULE_INIT(TypeWrapper::Init) { auto type = Nan::GetFunction(Nan:...
package com.yiran.paychannel.exception; import com.yiran.paychannel.enums.ErrorCode; /** * * <p>checked exception 基类</p> */ public class AppCheckedException extends Exception { private static final long serialVersionUID = 7240166912823355206L; public AppCheckedException() { super(); } ...
Source or target first? Comparison of two post-editing strategies with translation students We conducted an experiment with translation students to assess the influence of two different post-editing (PE) strategies (reading the source segment or the target segment first) on three aspects: PE time, ratio of corrected e...
<reponame>danilosalve/tir try: from setuptools import setup except ImportError: from distutils.core import setup config = { 'description': 'TOTVS Interface Robot', 'author': 'TOTVS Automation Team', 'url': 'https://github.com/totvs/tir', 'download_url': 'https://github.com/totvs/tir', 'aut...
<filename>FYP/matlabImport.py<gh_stars>0 # -*- coding: utf-8 -*- """ scipy.io.loadmat notes: v4 (Level 1.0), v6 and v7 to 7.2 matfiles are supported. You will need an HDF5 python library to read matlab 7.3 format mat files. Because scipy does not supply one, we do not implement the HDF5 / 7.3 interface here. h5py an...
// Loads and starts the CLR (if necessary) and creates a new appdomain to run // managed code. // // (We don't want to use the default appdomain because we want to be able to unload // stuff, which you can only do by unloading an appdomain, and you can't unload the // default appdomain without shutting down the CLR, an...
import { DmvService, TeaDispenserService } from '../data/ChatService'; import ChatServiceContext from '../data/ChatServiceContext'; import Command from '../data/Command'; import FleetLoot from '../data/FleetLoot'; import InvalidCommand from '../data/InvalidCommand'; import ItemStack from '../data/ItemStack'; import Mes...
// Invocation line: g++ -std=c++17 -O3 #include <tuple> extern "C" void f(int *out); int c() { int r; f(&r); return r; } auto cpp() { std::tuple<int> r; f(&std::get<0>(r)); return r; }
15 years ago today, the Sega Dreamcast made its debut in Japan (the US release date was famously 9/9/99). This bizarre beige machine didn’t even last three years on the market, but it left a lasting mark on the world of video games. From second screen gameplay to online multiplayer to DLC, the Dreamcast was well ahead ...
<reponame>agunde406/consensource use database::{DbConn, PgPool}; use database_manager::models::Block; use database_manager::tables_schema::blocks; use diesel::prelude::*; use errors::ApiError; use hyper_sse::Server; use paging::*; use rocket_contrib::{Json, Value}; use std::{thread, time}; const DEFAULT_CHANNEL: u8 = ...
/** * Set element indices of an n-dimensional array to value.indices is assumed to have the right number of elements * for the dimension of array. */ void sidlx_rmi_SimCall__array_set( struct sidlx_rmi_SimCall__array* array, const int32_t indices[], sidlx_rmi_SimCall const value) { sidl_interface__array_set(...
d = 25 - int(input()) s = ['Eve'] * d print(' '.join(['Christmas'] + s))
class ActivitySearch: """``ActivitySearch`` defines the interface for specifying activity search options.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod def search_among_activities(self, activity_ids): """Execute this search among the given list of activities. :param activity_ids: ...
Beyonce performs the National Anthem during the inauguration ceremony on Monday Photo by JEWEL SAMAD/AFP/Getty Images I’m hoping for a flurry of retractions. A Marine spokesperson said yesterday that she couldn’t confirm or deny that Beyoncé wasn’t lip-syncing, and pretty much every media outlet assumed that was an a...
<reponame>rgianassi/learning_go package shorten import ( "encoding/json" "fmt" "io" "net/http" "strings" "sync" ) // URLShortener URL shortener server data structure type URLShortener struct { expanderRoute string shortenRoute string statisticsRoute string mappings map[string]string statistics Stats...
package com.webcheckers.model; import java.util.logging.Logger; /** * Represents a player * * @author <a href='mailto:<EMAIL>'><NAME></a> */ public class Player implements Comparable<Player> { private static final Logger LOG = Logger.getLogger(Player.class.getName()); private int wins; private int los...
/// <reference types="node" /> import { Socket } from 'net'; import { TLSSocket } from 'tls'; interface Listeners { connect?: () => void; secureConnect?: () => void; close?: (hadError: boolean) => void; } declare const deferToConnect: (socket: TLSSocket | Socket, fn: Listeners | (() => void)) => void; expor...
/** * If You change the Nuxeo-System. The UUIDs will be different than the used ones here! You need to change those accordingly. * @author cstrobel */ public class NuxeoUtilityTest { private static final transient Logger LOG = LoggerFactory.getLogger(NuxeoUtilityTest.class); private static final String URL ...
def plot_periodic_voro(points, box, colorfill="shape", plot_points=False, **kw): if isinstance(points, tuple): naxs = len(points) fig, axs= plt.subplots(ncols=naxs, figsize=(4*naxs, 4) ) else: naxs = 1 fig, axs= plt.subplots(ncols=1, figsize=(4, 4) ) axs = [axs] p...
<gh_stars>1-10 // general #defines #ifndef TRUE #define TRUE 1L #define FALSE 0L #endif #ifndef NULL #define NULL 0L #endif // generalized C/C++ types // note: BYTE, WORD, and BOOL are defined in Windows header files. typedef long LONG; typedef unsigned long ULONG; typedef short SHORT; typedef unsigned short USHORT...
<filename>orion/modules/active/twitter.py """ Allows users to send tweets via voice command Requires: - IFTTT configuration Usage Examples: - "Tweet What's up guys?" - "Post What's up everyone? to twitter" """ from orion.classes.module import Module from orion.classes....
My World Of Flops is Nathan Rabin’s survey of books, television shows, musical releases, or other forms of entertainment that were financial flops, critical failures, or lack a substantial cult following. There’s something inherently compelling about world-class athletes. We’re fascinated, on a superficial level, by t...
<reponame>TomatoYoung/beegfs<filename>client_module/source/common/net/message/storage/attribs/SetXAttrRespMsg.h #ifndef SETXATTRRESPMSG_H_ #define SETXATTRRESPMSG_H_ #include <common/net/message/SimpleIntMsg.h> struct SetXAttrRespMsg; typedef struct SetXAttrRespMsg SetXAttrRespMsg; static inline void SetXAttrRespMsg...
#include <pcl/recognition/ransac_based/bvh.h> #error "Using pcl/recognition/bvh.h is deprecated, please use pcl/recognition/ransac_based/bvh.h instead."
def refresh_image(self): self.vb.autoRange() self.image.update() return
<reponame>gwsch/unitime /* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * The Apereo Foundation licenses this file to you under the Apache License, * Version 2.0 ...
In a rare tale of technology, bio­terrorism and chocolate, scientists are racing to sequence the cacao tree genome. They fear that without the genome in hand they will be unable to stop the spread of two virulent pathogens that threaten to devastate the world’s cocoa crop. Cacao trees were first domesticated more then...
// ODBC SHORTANSI -- the actual MPLoc is encoded in the schName // using underscore delimiters, i.e. "systemName_volumeName_subvolName". // We make a real MPLoc out of that. NABoolean QualifiedName::applyShortAnsiDefault(NAString& catName, NAString& schName) const { ComMPLoc loc; loc.parse(schName, ComM...
/// Optionally prepares a table of response times. /// /// This function is invoked by `GooseMetrics::print()` and /// `GooseMetrics::print_running()`. pub(crate) fn fmt_response_times(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { // If there's nothing to display, exit immediately. if self.reque...
<reponame>mkinsner/llvm<filename>clang/test/CodeGen/sanitize-coverage-old-pm.c // RUN: %clang %s -target x86_64-unknown-linux-gnu -emit-llvm -S -fsanitize-coverage=trace-pc,trace-cmp -o - -flegacy-pass-manager | FileCheck %s --check-prefixes=CHECK // RUN: %clang %s -target x86_64-unknown-linux-gnu...
/* * Until the connector entity allows querying for the status, we have to go through all connections and * see if we can find our connector host in there. */ private RouterConnections collectConnectionInfo(List<List<?>> response) { int hostIdx = connection.getAttributeIndex("host...
The most depressed tweets from people at work after Glastonbury 'It's difficult not to have a little cry on the train' Glastonbury is all over for another year, and for the 175,000-ish lucky people who went, it's back to reality. Sorry. It was always going to be tricky setting your alarm for 7am and boarding a packe...
def phrase_matcher(terms: list, attribute: str = "LOWER") -> spacy.matcher.PhraseMatcher: matcher = spacy.matcher.PhraseMatcher(nlp.vocab, attr=attribute) if attribute != "LOWER": patterns = [phrase_nlp(term) for term in terms] else: patterns = [nlp(term) for term in terms] matcher.add...
package org.elder.sourcerer; import com.google.common.collect.ImmutableList; public class EventReadResult<T> { private final ImmutableList<EventRecord<T>> events; private final int fromVersion; private final int lastVersion; private final int nextVersion; private final boolean isEndOfStream; ...
<filename>shadows/supportv4/src/test/java/org/robolectric/shadows/support/v4/NotificationCompatBuilderTest.java package org.robolectric.shadows.support.v4; import static com.google.common.truth.Truth.assertThat; import android.app.Notification; import android.support.v4.app.NotificationCompat; import com.android.inte...
// vim: set filetype=go: /* BSD 3-Clause License Copyright (c) 2019, iXo All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this ...
/** * A description in the Interface Repository of a member of an IDL union. */ public final class UnionMember implements org.omg.CORBA.portable.IDLEntity { // instance variables /** * The name of the union member described by this * <code>UnionMember</code> object. * @serial */ publ...
def classify_region(self, D: BorelSet, n: int)->Tuple[torch.Tensor,torch.Tensor,torch.Tensor]: mean, lcb, ucb = self.get_ucb_lcb(D, n) above = lcb > self.level_set below = ucb < self.level_set not_known = above * False + True not_known = not_known * (~ above) * (~ below) return (above.view(-1), not_known.vi...
import re from django.shortcuts import render from elasticsearch import Elasticsearch from rest_framework.views import APIView from rest_framework.response import Response def index(req): return render(req, 'index.html') class Geomovement(APIView): es = Elasticsearch() indexes = ['news', 'tweets', 'sci...
import { Injectable } from '@angular/core'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/subject'; // http://blog.angular-university.io/how-to-build-angular2-apps-using-rxjs-observable-data-services-pitfalls-to-avoid/ export interface Todo { id: number; name: string; isSync: boole...
// Close closes the connection. // Any blocked Read or Write operations will be unblocked and return errors. func (conn *Conn) Close() error { conn.closing <- 0 conn.closing <- 0 conn.closed.Wait() return conn.rawConn.Close() }
import React, { FC, ReactElement } from 'react'; import { EMail, EBody, ESection, EColumn } from '../../src/browser'; import { ISectionProps } from '../../src/eSection'; import { IColumnProps } from '../../src/eColumn'; export type EmailProps = { sectionProps?: ISectionProps; columnProps?: IColumnProps; childre...
Sex differences in 10-year ischemic cardiovascular disease risk prediction in Chinese patients with prediabetes and type 2 diabetes Background Cardiovascular disease has become a serious public health problem in recent years in China. The aim of the study was to examine sex differences in cardiovascular risk factors a...
// Flags is the command flags func (cmd *CommandCreate) Flags() []flags.Flag { return []flags.Flag{ remoteAppFlag(&cmd.inputs.RemoteApp), flags.StringFlag{ Value: &cmd.inputs.LocalPath, Meta: flags.Meta{ Name: flagLocalPathCreate, Usage: flags.Usage{ Description: "Specify the local filepath of a...