content
stringlengths
10
4.9M
// This is a generated file. Not intended for manual editing. package org.rust.devkt.lang.core.parser; import org.jetbrains.kotlin.com.intellij.lang.PsiBuilder; import org.jetbrains.kotlin.com.intellij.lang.PsiBuilder.Marker; import static org.rust.devkt.lang.core.psi.RsElementTypes.*; import static org.rust.devkt.lan...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <vic411_vicNl.h> static char vcid[] = "$Id: vic411_cmd_proc.c,v 4.3.2.1 2006/11/17 01:06:20 vicadmin Exp $"; vic411_filenames_struct vic411_cmd_proc(int argc, char *argv[]) /********************************************************************** vi...
def testReturnIntPtrDimDefault(self): rv = ownership.ReturnIntPtrDimDefault() self.assertIsInstance(rv, np.ndarray) self.assertEqual('int32', rv.dtype.name) self.assertEqual(7, rv.size) self.assertTrue(all(np.equal(rv, [31,32,33,34,35,36,37])))
Whistleblower says ‘profound difference’ has occurred over past two years after leaking of NSA documents as public demands privacy A “profound difference” has occurred over the past two years, following the leaking of NSA documents that led to revelations about US surveillance on phone and internet communications, whi...
// // Copyright 2012 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // //-------------...
/** * Represents an observed value */ export interface Observer { /** * Get the current value */ get(): any; /** * Set the target value */ set(value: any): void; /** * Stop observe value */ unobserve(): void; }
import os import numpy as np import shutil import sys import contextlib import random os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' from framework import lib from framework import model_neural_trad from framework import evaluation from framework import data from framework import config ####################################...
/** * Holds Kujaku specific configurations for MapBox data sources. Currently, creating a config for a * data-source means that data in the data-source will be rendered on the map. * <p> * Created by Jason Rogena - jrogena@ona.io on 1/2/18. */ public class DataSourceConfig implements Config { public static fin...
print(1) node('server',asd) print(2)
// SetAlive sets the service to live as soon as the health port is started func SetAlive() func(*Healthz) { return func(h *Healthz) { h.alive = healthy } }
/** * Class implements main serialization algorithm. Other classes can extend it. * * @author Johannes Lichtenberger, University of Konstanz * */ abstract class AbsSerializer implements Callable<Void> { /** Treetank session {@link ISession}. */ protected final ISession mSession; /** Stack for readi...
/** * Created by solkin on 31.07.17. */ public class StreamHelper { public static void safeClose(@Nullable Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException ignored) { } } } public static byte...
def _eval(self, context: RuleContext) -> Optional[LintResult]: if context.segment.name != "comma": return None subsequent_whitespace, first_non_whitespace = self._get_subsequent_whitespace( context ) if ( (subsequent_whitespace is None) and...
<filename>src/patterns/two-pointers/squaring-sorted-array.test.ts<gh_stars>0 import { make_squares } from "./squaring-sorted-array"; describe("make_squares", () => { it("should square sorted array - example 1", () => { const actual = make_squares([-2, -1, 0, 2, 3]); expect(actual).toEqual([0, 1, 4, 4, 9]); ...
Behçet's disease and major histocompatibility complex class II antigens in Tunisians. Forty-two Tunisian patients suffering from Behçet's disease (23 with uveitis) were typed for HLA-DR and DQ antigens. There was a significant excess of HLA-DQw3 (p less than 0.01) but also an important deficiency of HLA-DRw6 and DQw1 ...
/** * Battery voltage of cells, in millivolts (1 = 1 millivolt). Cells above the valid cell count for * this battery should have the UINT16_MAX value. */ @MavlinkFieldInfo( position = 5, unitSize = 2, arraySize = 10, descriptio...
ST. LOUIS — Subscribers have filed a class-action lawsuit against a telecommunications company for alleged rights to privacy and publicity for their personally identifiable information. A. Michael, on behalf of himself and all others similarly situated, filed a complaint on April 4 in the U.S. District Court for the E...
Review of metal oxide semiconductors-based thin-film transistors for point-of-care sensor applications Recently, oxide semiconductors-based thin-film transistors have received much attention for biosensor platforms due to their high sensitivity, good chemical resistance, easy surface immobilizations of bioreceptors, a...
package com.google.crypto.tink.shaded.protobuf; import java.lang.reflect.Method; import java.nio.ByteBuffer; import java.nio.charset.Charset; import java.util.AbstractList; import java.util.AbstractMap; import java.util.AbstractSet; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java...
<reponame>pascal-knodel/haskell-craft -- -- -- ----------------- -- Exercise 6.17. ----------------- -- -- -- module E'6'17 where import Pictures ( Picture , width , height ) import Test.HUnit myAbove :: Picture -> Picture -> Picture myAbove top bottom | widthTop < widthBottom = ( padRight top (width...
/** * The unpeek livedata, which is used to decide should receive previous value * before observe. See, https://github.com/KunMinX/UnPeek-LiveData * * @param <T> the data type */ public class UnPeekLiveData<T> extends MutableLiveData<T> { private final static int START_VERSION = -1; private final AtomicI...
BP cuts checks for workers' lost wages Fishermen gathered last week at BP's claims office in Bayou La Batre, Ala. NEW YORK (CNNMoney.com) -- The scope of the damage from the Gulf Coast oil spill is still hard to calculate, but here's a grim tally: More than 23,000 workers and business owners along the Gulf Coast have...
import sys parts = sys.stdin.readline().split(' ') m = int(parts[0]) n = int(parts[1]) ans = 0 for i in range(m): for j in range(n): d1 = (j + 1) % 10 d2 = (j + 1) // 10 if d1 > 1 and d2 > 1 and d1 * d2 == i + 1: ans += 1 print(ans)
/** * A reader for GenomicsDB that implements {@link htsjdk.tribble.FeatureReader} * Currently, the reader only return {@link htsjdk.variant.variantcontext.VariantContext} */ public class GenomicsDBFeatureReader<T extends Feature, SOURCE> implements FeatureReader<T> { private String loaderJSONFile; private G...
/** * Checks if the operation is a member of a family for which we have turned response compression on. * @param operation */ private boolean isMemberOfCompressionFamily(String operation) { if (operation.contains(FAMILY_SEPARATOR)) { String[] parts = operation.split(FAMILY_SEPARATOR); if ...
/** * Factory for all converters(add string support). * * @author Michael Liao (askxuefeng@gmail.com) * @author LW */ public class ParameterConverterFactory { private Logger log = Logger.getLogger(ParameterConverterFactory.class.getName()); private static Map<Class<?>, ParameterConverter<?>> map = new HashMap<...
/** * Utilizes a basic binary search algorithm to find the level for the specified experience. * * @param experience The experience. * @param min The minimum level. * @param max The maximum level. * @return The level for the specified experience. */ private static int binarySearch(double experience...
/** * © Copyright IBM Corporation 2016. * © Copyright HCL Technologies Ltd. 2017. * LICENSE: Apache License, Version 2.0 https://www.apache.org/licenses/LICENSE-2.0 */ package com.hcl.appscan.sdk.scanners.sast.xml; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.O...
Ponies at Dawn are proud to announce the release of our 9th album, Voyager, jam packed with an incredible line up of music from a whole host of fandom artists. Our biggest album yet, with 58 tracks, there’s sure to be something for everybody here. Music from big names such as Replacer, UndreamedPanic, 4Everfreebrony an...
Estimating the density of molten CaF2-Al2O3-CaO slags based on optical basicity Slag density is a significant factor in determining the process efficiency of the electroslag remelting (ESR) process, where calcium fluoride (CaF2)-based slag is formed synthetically to refine metal ingots. Although there are some former ...
/** * g_bit_trylock: * @address: a pointer to an integer * @lock_bit: a bit value between 0 and 31 * @returns: %TRUE if the lock was acquired * * Sets the indicated @lock_bit in @address, returning %TRUE if * successful. If the bit is already set, returns %FALSE immediately. * * Attempting to lock on two diff...
/** * A service whose Spring beans are loaded into a service specific {@link ApplicationContext} that is a child of the * context provided in {@link #setApplicationContext(ApplicationContext)}. * * Services derived from this base class may not be re-initialized after they have been destroyed. */ public abstract c...
def reverseXZrotation(self): rot = np.zeros((3, 3), dtype = 'float64') rot[0, 0] = np.cos(self.currtheta) rot[0, 1] = -np.sin(self.currtheta) rot[0, 2] = 0.0 rot[1, 0] = np.sin(self.currtheta) * np.cos(self.currphi) rot[1, 1] = np.cos(self.currtheta) * np.cos(self.currphi...
// ServeHTTP implement pod.Handler func (m *Mux) ServeHTTP( w http.ResponseWriter, r *http.Request, next http.HandlerFunc) { m.ServeMux.ServeHTTP(w, r) next(w, r) }
Image caption One eyewitness said they saw a tank lift off the floor and go through a fence Two men have been taken to hospital with serious injuries after a gas explosion at an industrial estate. Emergency services were called to Bio Dynamic, in Colwick, Nottingham, shortly after 10:00 BST. The fire service said th...
package utils import ( "bytes" "strconv" ) func Panic(err error) { if err != nil { panic(err) } } //byte转16进制字符串 func ByteToHex(data []byte) string { buffer := new(bytes.Buffer) for _, b := range data { s := strconv.FormatInt(int64(b&0xff), 16) if len(s) == 1 { ...
/** * Return a new rational representing the biggest integral rational not * bigger than <code>this</code>. * @return Next smaller integer of <code>this</code>. */ public Rational floor() { if (mDenom <= 1) { return this; } int div = mNum / mDenom; if (mNum < 0) { div--; } return valueOf(div, ...
<gh_stars>0 package ru.job4j.search; import org.junit.Before; import org.junit.Test; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; /** * Тестируем работу поиска в телефонном справочнике. */ public class PhoneDictionaryTest { private final PhoneDictionary phones = new PhoneDi...
def from_dict(cls, _dict: Dict) -> 'RankedDocument': args = {} if 'documentId' in _dict: args['document_id'] = _dict.get('documentId') if 'title' in _dict: args['title'] = _dict.get('title') if 'metadata' in _dict: args['metadata'] = _dict.get('metadat...
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; using ll = long long; const ll mod = 1000000007; ll f(ll n){ if(n==1)return 2; if(n==2)return 4; if(n==3)return 6; //ll m[2][2]={{6,4},{4,2}}; n-=3; ll m[2][2]={{1,1},{1,0}}; ll res[2]={6,4}; while(n){ if(n&1...
/** * Signals to the node that the vehicle will stop at this * node and no longer move. This should normally only * happen when the vehicle is at it's destination or when * it cannot find a path to follow. * * @param c */ public void park( Vehicle c ) { queue.park(c); logger.info( "STOP: " + c...
<gh_stars>100-1000 /* * 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, Version 2.0 (the ...
<reponame>HarshCasper/software package parsers import ( "errors" "github.com/deepvalue-network/software/pangolin/domain/lexers" ) type builder struct { eventsAdapter EventsAdapter lexer lexers.Lexer params []ToEventsParams replacements map[string]RetrieveReplacementsFn } func createBuilder(eve...
def parse(self, filename): with open(filename, "r", encoding='utf-8') as fp: return self.load(fp)
<reponame>centerprime/Quark-Chain-Client-SDK package com.centerprime.quarkchainsdk.quarck.response; import com.centerprime.quarkchainsdk.quarck.Response; import java.util.ArrayList; /** * networkInfo. */ public class QKCNetworkInfo extends Response<QKCNetworkInfo.NetworkInfo> { public static class NetworkInfo...
The Matanuska-Susitna Borough mayor, a veteran musher, contended on Monday that Wells Fargo's decision to pull its sponsorship of the Iditarod Trail Sled Dog Race sped up an ongoing review of the company's performance as the borough's longtime bank. But borough officials say the bank review has no connection to the sp...
import psycopg2 from psycopg2.extras import RealDictCursor try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse class UnableToConnectToDatabase(Exception): pass def database_connection(database_url): parsed = urlparse(database_url) user = parsed.username ...
def _custom_preparation(self, params: Any = None) -> tuple[EITImage, EITData]: logger.info("Preparation of PYEIT solver: Start...") self._build_mesh_from_pyeit(import_design=True) self.init_inv(params=params, import_fwd=True) sim_data, img_h, img_ih = self.simulate() img_rec = se...
<filename>old-project/PKUYouthWechatAPP/src/main/java/pkuyouth/requestobjects/ShowArticleObject.java package pkuyouth.requestobjects; /** * Created by WangJian on 2017/1/30. */ public class ShowArticleObject { private String user_id; private String article_id; public String getUser_id() { return...
THE Commonwealth will introduce tough new terror laws giving police greater powers after NSW Premier Mike Baird insisted the federal government crack down on extremists in the wake of this month’s attack at Parramatta. Attorney-General George Brandis has agreed to Mr Baird’s request to lower the age at which control ...
<gh_stars>10-100 import React from "react"; import { Radio, RadioGruppe } from "../src/index"; import { Meta } from "@storybook/react/types-6-0"; export default { title: "nav-frontend/Skjema/Radio", component: Radio, } as Meta; export const radio = () => { return ( <div style={{ display: "grid...
// ACL returns an instrumented cloud.google.com/go/storage.ACLHandle that provides access to the // object's access control list. // // See https://pkg.go.dev/cloud.google.com/go/storage?tab=doc#ObjectHandle.ACL for further details on wrapped method. func (o *ObjectHandle) ACL() *ACLHandle { return &ACLHandle{ ACLHa...
Visceral leishmaniasis as a cause of postpartum pyrexia — case report IntroductionVisceral leishmaniasis, caused by protozoan parasites of the Leishmania genus, is very rare cause of postpartum pyrexia. It is also known as kala-azar, black fever, and Dumdum fever. Signs and symptoms include fever, weight loss, mucosal...
/** * GetMeanResolution - Get Mean of all the resolutions of all the measures * in the Control Point * * @author Sharmila Prasad (6/1/2010) * * @return double */ double CnetRefByResolution::GetMeanResolution(void) { double dTotal = 0; for (int i = 0; i < (int)mdResVector.size(); i++) { ...
def _setup_next_sequence(cls, *args, **kwargs): session = cls._meta.sqlalchemy_session model = cls._meta.model pk = getattr(model, model.__mapper__.primary_key[0].name) max_pk = session.query(max(pk)).one()[0] if isinstance(max_pk, int): return max_pk + 1 if max_pk el...
Hundreds of people are expected to attend rallies Saturday across southeast Missouri to support the Noranda/steel mill issue. Supporters say State Rep. Don Rone’s (R-Portageville) bill would help restore about 400 jobs at the former Noranda site, and would create 200 jobs at a new Bootheel steel mill. Governor Eric G...
Examining the association between speed-accuracy trade-offs and psychopathy among male offenders in a facial affect recognition task. Despite a large body of work examining the relationship between facial affect recognition and psychopathy, there is little consensus regarding the nature of emotion processing in such i...
Dynamic Distributed Storage of Stormwater in Sponge-Like Porous Bodies: Modelling Water Uptake : An innovative concept of dynamic stormwater storage in sponge-like porous bodies (SPBs) is presented and modelled using first principles, for down-flow and up-flow variants of SPBs. The rate of inflow driven by absorption and ...
/** * This problem was asked by Palantir. Given a number represented by a list of digits, find the next greater permutation of a number, in terms of lexicographic ordering. If there is not greater permutation possible, return the permutation with the lowest value/ordering. For example, the list [1,2,3] should retu...
package party import ( "github.com/ferdoran/go-sro-agent-server/model" "github.com/ferdoran/go-sro-agent-server/service" "github.com/ferdoran/go-sro-framework/network" "github.com/ferdoran/go-sro-framework/network/opcode" "github.com/ferdoran/go-sro-framework/server" log "github.com/sirupsen/logrus" ) type Part...
A video has emerged of Kim Han Sol, the son of the murdered North Korean believed to be Kim Jong Nam. KUALA LUMPUR: A video has emerged of Kim Han Sol, the son of the murdered North Korean believed to be Kim Jong Nam. The video titled KHS Video was uploaded on the YouTube page of a group called Cheollima Civil Defens...
<gh_stars>10-100 // Copyright 2018 The Grin Developers // Modifications Copyright 2019 The Gotts Developers // // 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...
// currently under the assumption that the file has a '.gz' extension public static void gunzip(File f) { if (f == null || !f.exists() || !f.canRead()) { return; } File parent = f.getParentFile(); if (parent == null || !parent.exists() || !parent.canWrite()) { ret...
/** * calculates the accuracy for original test and train set * * @throws Exception if something goes wrong */ @Override protected void calculateAccuracy() throws Exception { double[] acc1; double[] acc2; acc1 = CollectiveInstances.calculateAccuracy( m_Classifier, m_Tr...
<gh_stars>1-10 import Tippy from '@tippyjs/react' import { EditorContent } from '@tiptap/react' import React from 'react' import styled from 'styled-components' import { colors } from 'tailwindcss/defaultTheme' interface Props {} interface ButtonToolbarProps extends React.ButtonHTMLAttributes<HTMLButtonElement> { ...
/** * Voegt een element toe aan het einde van de queue en vergroot de size met 1 * @param t */ public void add(T t){ extend(); assert queue.length == size : "Queue length does not match size: \r\n Queue: " + queue.length + "\r\n Size: " + size; queue[size-1] = t; }
def output_links(self): output_links = [] pm_dict = self.get_dict() output_links.append('surface_sample') if pm_dict['target_volume'] != 0.0: output_links.append('cell') return output_links
<gh_stars>0 #pragma once #include "ProducerConsumerQueue.h" struct DatabaseJobContext; class DatabaseJobManager { public: DatabaseJobManager() {} void ExecuteDatabaseJobs(); void PushDatabaseJobRequest( DatabaseJobContext* jobContext ); bool PopDatabaseJobResult( DatabaseJobContext*& jobContext ); private: ...
/** * Copies the currently selected text to the system clipboard, with * any necessary style information (font, foreground color and background * color). Does nothing for <code>null</code> selections. */ public void copyAsRtf() { int selStart = getSelectionStart(); int selEnd = getSelectionEnd(); if ...
// Malloc // file fcgiapp.c line 79 static void * Malloc(unsigned long int size) { void *result; result=malloc(size); assert(size == (unsigned long int)0 || result != (void *)0); return result; }
def _request_pre_prepare_for_prepare(self, three_pc_key) -> bool: if three_pc_key in self.prePreparesPendingPrevPP: logger.debug('{} not requesting a PRE-PREPARE since already found ' 'stashed for {}'.format(self, three_pc_key)) return False if len( ...
<gh_stars>0 import express from "express"; import path from "path"; import dotenv from "dotenv"; import startup from "./src/startup"; import { CLIENT_PATH, PROJECT_ROOT } from "./applicationPaths"; import uploadRouter from "./src/api/v1/routers/uploadRouter"; import userRouter from "./src/api/v1/routers/userRouter"; im...
Who the Clix? is a series of articles featuring information on comic book characters that have been made into figures for the popular tabletop game Heroclix. These articles are meant to help Heroclix players learn more about the characters behind their favorite pieces. Today we look at the legacy character that dies i...
// copyright 2015 inbetweengames GBR #pragma once #include "Components/ActorComponent.h" #include "FlockingDataCache.generated.h" #define TEAM_CALVES 0 #define TEAM_HUNTERS 1 #define TEAM_CALVES_DEAD 2 #define TEAM_HUNTERS_DEAD 3 #define TEAM_AMBIENT 4 #define TEAM_CALVES_UNACTIVATED 5 #define TEAM_HUNTERS_PANIC 6 ...
# Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. import collections import math import numpy as np from . import city_track def compare(x, y): ...
function testHeap() { var h = Heap.fromArray([4, 1, -1, 3, 6, 0], (a, b) => a < b); while (h != null) { let [v, rest] = h.remove(); console.log(v); h = rest; } } testHeap();
/** * Helper methods to convert types for objects. * can be used to cast types explicitly in generated code by calcite */ public final class TypeConvertUtil { private TypeConvertUtil() { } public static Short toShort(Object value) { if (value == null) { return null; } return SqlFunctions...
export type ArticleData = { title: string; date: string; category: string; writtenBy: string; tags?: string[]; thumbnail?: string; description?: string; original?: boolean; hideThumbnail?: boolean; status?: "open" | "draft" | "close"; }; export type Tag = { id: string; title: string; }; export...
/** * Enable the use of the given controller type by * adding it to the cursor controller types list. * @param controllerType GVRControllerType to add to the list */ public void addControllerType(GVRControllerType controllerType) { if (cursorControllerTypes == null) { ...
def fill_parameterList(self): self.ParameterList.append(self.conc) self.ParameterList.append(self.myu) self.ParameterList.append(self.kappa_1_lhs_conc) self.ParameterList.append(self.kappa_2_lhs_conc) self.ParameterList.append(self.kappa_1_rhs_conc) self.Param...
<filename>openstack/db/v1/configurations/urls.go<gh_stars>1-10 package configurations import "github.com/chnsz/golangsdk" func baseURL(c *golangsdk.ServiceClient) string { return c.ServiceURL("configurations") } func resourceURL(c *golangsdk.ServiceClient, configID string) string { return c.ServiceURL("configurati...
from flask import Flask app = Flask(__name__) app.config['DEBUG'] = True @app.route('/') def hello_world(): return 'Hello, World!'
def run_centralized(optimizer: tf.keras.optimizers.Optimizer, experiment_name: str, root_output_dir: str, num_epochs: int, batch_size: int, decay_epochs: Optional[int] = None, lr_decay: Optional[float...
Equilibrium Disorder in Carbamazepine Toxicity Three cases of acute carbamazepine intoxication were evaluated neurotologically and neurologically. Findings included symptoms of equilibrium, gait and speech disorders, drowsiness, gaze nystagmus, depressed optokinetic nystagmus and disturbances of smooth pursuit eye mov...
Lesson #9: Never assume. Before opening the bakery, I taught culinary arts at our local community college. So did one of my friends, who also helped me out in the bakery during the first year. She taught a course called "Flavorings and Aromatics" (or something like that). The class met once per week and included a sho...
In 1992, researcher Tom Caudell coined the term Augmented Reality (AR). It’s an experience that supplements the real world with a virtual layer of information. Until recently, AR sounded like something from a cyberpunk novel. Some sort of cyborg capability that could go the way of PDAs and laser disks. However AR does...
Understanding the organization of sharing economy in agri-food systems: evidence from alternative food networks in Valencia The concept of sharing economy is rising in the societal and academic debate. Although contested in terms of its multiple dimensions and frames (Belk 2007; Bardhi and Eckhardt 2012; Martin et al....
def dataset_dataframe(self, dataset_id: str, test_part: bool): dataset_data_path = self.update_cache_dataset(dataset_id=dataset_id, test_part=test_part) if test_part: only_csv = [x for x in os.listdir(dataset_data_path) if x.endswith('.csv')] all_csv_path = [os.path.join(dataset_...
As marijuana's national popularity continues to grow and more states have legalized either medical or recreational use of it, a new federal survey shows that those shifting attitudes have not produced a surge in teen use. The biennial High School Youth Risk Behavior Surveillance System survey from the Centers for Dise...
A hybrid computer-aided tuning method for microwave filters with asymmetrical phase shift effects A hybrid tuning method for microwave filters with asymmetric phase shift effects is presented in this paper. This novel tuning technique is based on the combination of the modified Cauchy method and aggressive space mappi...
"""Retrieve query.""" import logging from typing import Any, List from llama_index.indices.base_retriever import BaseRetriever from llama_index.indices.query.schema import QueryBundle from llama_index.indices.tree.base import TreeIndex from llama_index.indices.utils import get_sorted_node_list from llama_index.schema ...
y,k,n = map(int, raw_input().split()) a = 1 cnt = 0 while a * k <= n : if(a * k > y) : print a * k - y, cnt += 1 a += 1 if cnt == 0 : print -1
# Copyright (c) Facebook, Inc. and its affiliates. import torch from mmf.common.sample import Sample from mmf.datasets.builders.vqa2 import VQA2Dataset from mmf.utils.distributed import byte_tensor_to_object, object_to_byte_tensor class COCODataset(VQA2Dataset): def __init__(self, config, dataset_type, imdb_file_...
<reponame>lunaDolphin/leetcode public class comparator<T> { }
<gh_stars>0 package workers import ( "encoding/json" "fmt" "io/ioutil" "net/http" "os" "time" "github.com/incognitochain/go-incognito-sdk-v2/coin" "github.com/incognitochain/go-incognito-sdk-v2/common" "github.com/incognitochain/portal-workers/entities" ) type PortalAddressInstance struct { IncAddress stri...
/** * Each extended class contains some CUfunctions. * * @author Lin Chi-Min (v381654729@gmail.com) * */ public abstract class AbstractCudaModule { public static Class<?>[] allModules = { CudaLDAFunctions.class, }; }
// This class is used to emulate a case where less than 4 bytes are sent in // a single packet to ensure it is still parsed correctly class SlowIODevice : public QIODevice { public: SlowIODevice(const QString &expectedData, QObject *parent = 0) : QIODevice(parent), currentPos(0), readyToSend(true) { ...
A powerful New York Times editorial paints a dispiriting portrait of U.S. gun violence, using three numbers and one calendar. Here's the headline: “477 Days. 521 Mass Shootings. Zero Action From Congress.” According to an accompanying graphic, there has been at least one mass shooting on most days since a gunman kill...
// ProvideWebPortFromEnvironment creates a WebPort from the environment, defaulting to 8080 when missing func ProvideWebPortFromEnvironment() (WebPort, error) { portString, ok := os.LookupEnv("PORT") if !ok { portString = "8080" } port, err := strconv.ParseInt(portString, 0, 0) return WebPort(port), err }
/** * Parses the given byte buffer and populate the result object. * Returns the number of bytes that were parsed from the given buffer. */ protected Record parseRecord(int opCount, int generation, int expiration) throws AerospikeException, IOException { Map<String,Object> bins = null; ArrayList<Map<String...