content
stringlengths
10
4.9M
// equivalent steps through each node in the given linked list and checks that it // is forward connected, backward connected, and each node is equivalent to the same index // in the slice. func equivalent(t *testing.T, ll LinkedList[int], s []int) bool { cursor := ll.CursorGhost() for i := 0; i < len(s); i++ { ass...
<reponame>ffshen/go-istio-api package main import ( "fmt" log "github.com/sirupsen/logrus" "net/http" ) func main() { http.Handle("/repo/v1/info", loggingMiddleware(http.HandlerFunc(handler))) http.ListenAndServe(":9528", nil) } func handler(w http.ResponseWriter, req *http.Request) { //fmt.Println(string(body...
import React, { ReactElement } from "react"; import { Box, styled } from "@mui/material"; interface HierarchyItemProps { level: number; connector?: ReactElement; } const ConnectorBox = styled(Box)({ width: "16px", height: "100%", border: "solid #E7E7E7", }); export const NormalEnd: React.FC = () => { ret...
Jane Shore, Edward IV, and the Politics of Publicity n 1614, the ghost of Richard III gleefully recalled the “peece of Iustice” he had inflicted on “Mistresse Shore,” the mistress of his brother Edward IV. “Shore’s wife,” as she was also known, first appeared in Thomas More’sHistory of King Richard III. She featured a...
""" It requires only 3 wires to connect it to the Pi. One is +5V which can be grabbed directly from pin 2 of the Raspberry Pi, one is Ground, which is provided on pin 4, and the third is pin 11 ToDo: catch error discontinued mesurment """ from PyEdgeIoTFramework.pyedgeiotframework.core.EdgeService import EdgeService ...
#pragma once #include <boost/assert.hpp> #define _WINSOCK_DEPRECATED_NO_WARNINGS #include <WinSock2.h> #pragma comment(lib, "WS2_32.lib") #include <chrono> #include <iostream> #include "reader_statistics.hpp" using namespace reader; template<typename T> void print(const std::map<unsigned int, T>& map, const std...
def share_history_with_user(self, user_id=None, user_email=None, assert_valid=False, screenshot=False): self.navigate_to_history_share_page() self.components.histories.sharing.share_with_collapse.wait_for_and_click() multiselect = self.components.histories.sharing.share_with_multiselect.wait_for...
#include <stdio.h> void solve(){ int n; long long a[50], b[50], minA, minB, sum = 0; scanf("%d", &n); scanf("%I64d", &a[0]); minA = a[0]; for( int i = 1; i < n; i++ ){ scanf("%I64d", &a[i]); if( a[i] < minA ) minA = a[i]; } scanf("%I64d", &b[0]); minB = b[0]; for( int i = 1; i < ...
def match_title(event_title): bill_titles = [ "bill amended and passed by ncop", "bill passed and amended by ncop", "bill passed and amended by the ncop", "bill passed and referred to the ncop", "bill passed and sent to the president for assent", "bill passed and subm...
/** * Changes to the project that the selected document belongs to */ public void change() { ProjectCommands inList = selectFromList(edtDoc[iDoc].fileParent(), true); if (inList != null) { change(inList); } }
/** * xmlXIncludeFreeRef: * @ref: the XInclude reference * * Free an XInclude reference */ static void xmlXIncludeFreeRef(xmlXIncludeRefPtr ref) { if (ref == NULL) return; #ifdef DEBUG_XINCLUDE xmlGenericError(xmlGenericErrorContext, "Freeing ref\n"); #endif if (ref->doc != NULL) { #ifdef DEBUG_X...
<reponame>rabiavarol/METU-CENG #ifndef VIDEOSHARE_HPP #define VIDEOSHARE_HPP #include <string> #include <iostream> #include "User.hpp" #include "Video.hpp" #include "LinkedList.hpp" using namespace std; class VideoShare { private: LinkedList<User> users; LinkedList<Video> videos; /* TO-DO: you can priva...
// Silenced filters based on role's datacenters func (u *Uchiwa) Silenced(data *[]interface{}, token *jwt.Token) []interface{} { silenced := make([]interface{}, len(*data)) copy(silenced, *data) return silenced }
Laura Jane Grace Covers The Mountain Goats' 'Best Ever Death Metal Band in Denton' Enlarge this image toggle caption Ryan Russell, DL Andersoni/Courtesy of the artists Ryan Russell, DL Andersoni/Courtesy of the artists John Darnielle tells stories that make you care so deeply about the people in them that when Darnie...
<gh_stars>0 # -*- coding: utf-8 -*- import sys import datetime import getopt from reddit_user import RedditUser, UserNotFoundError, NoDataError print "Processing user %s" % sys.argv[1] start = datetime.datetime.now() try: u = RedditUser(sys.argv[1]) print u except UserNotFoundError: print "User %s not fo...
Well, this would be interesting. This Sunday will be a homecoming of sorts for one player on the Miami roster: QB J.P. Losman, former Buffalo first-round draft bust turned Miami backup. Losman’s mostly held a clipboard this season, but he’s looking likely to get the start this weekend against the Bills. Dolphins start...
/// Add an image to the `Glyph`. /// /// Errors when format version 1 is set or the function is called more than once. pub fn image(&mut self, image: Image) -> Result<&mut Self, ErrorKind> { if self.glyph.format == GlifVersion::V1 { return Err(ErrorKind::UnexpectedTag); } if self.gly...
<filename>bin/MongoToolbeltCLI/CLI.hs<gh_stars>0 module CLI ( opts , Command(..) , SearchIdOpts(..) ) where import Data.Bson (ObjectId) import Options.Applicative import Safe (readMay) opts :: ParserInfo Command opts = info (actionParser <**> helper) ...
// chown.c // // Time-stamp: <18/02/01 11:07:50 keuchel@w2k> #include "celib.h" int xcechown(const char *filename, int owner, int group) { return 0; }
/** * Output an object that is not an array. If <code>toString()</code> (other than the base definition in Object) is declared then * use that otherwise make a recursive call. * @param sb where the output is to be placed. * @param obj to be output. * @param prefix to be prepended to each line */ priva...
/** * TransactionErrorEventListener: creates a new transaction context. */ @SuppressWarnings("rawtypes") public static class TransactionLifecycleErrorEventListener extends TransactionContextLifecycleAwareAdapter implements ApplicationListener<TransactionLifecycleErrorEvent> { @Override public void o...
import * as React from 'react' import classNames from 'classnames' import Icon from '../icon' import TimelineItem from './TimelineItem' import ConfigContext from '../config-provider/ConfigContext' import { getCompProps } from '../_utils' export interface TimelineProps { reverse?: boolean prefixCls?: string clas...
package events import ( v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/record" ) const ( EventRecorderName = "varnish" EventReasonReloadError EventReason = "ReloadError" EventReasonVCLCompilationError EventReason = "VCLCompilationError" annotationSourcePod string = ...
import * as fs from 'fs' import * as path from 'path' // eslint-disable-next-line import/prefer-default-export export function getContentDirectory(...paths: string[]) { return path.join(process.cwd(), ...paths) } export function getContentFiles(contentPath: string) { return fs.readdirSync(getContentDirectory(cont...
Three people are stranded on a small island. One is a physicist, one is a circus strongman, and one is an economist. After a few days of surviving on fruit, they discover a cache of canned food, and they have to decide how to open it. The physicist says to the strongman "Why don't you climb that tree, and smash the can...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: <NAME> """ # ROS imports import rospy from geometry_msgs.msg import Twist from geometry_msgs.msg import PoseStamped from std_msgs.msg import UInt16 from tf.transformations import euler_from_quaternion from nav_msgs.msg import Path # Python imports import numpy...
<reponame>leftiness/hex_math mod ray; mod through; pub use self::ray::Ray; pub use self::through::Through;
<filename>packages/api-console-gui/src/app/app.component.ts import { Component, ElementRef } from '@angular/core'; import { DuiApp } from '@deepkit/desktop-ui'; import { ControllerClient } from './client'; @Component({ selector: 'app-root', template: ` <dui-window> <dui-window-header size="...
//============================================================================ // update the plane rate depending on the occupancy void OctreePlanarState::updateRate(int occupancy, int numSiblings) { bool isPlanarX = !((occupancy & 0xf0) && (occupancy & 0x0f)); bool isPlanarY = !((occupancy & 0xcc) && (occupancy & ...
def load_splits( self, splits_dir: str ) -> Dict[str, Tuple[List[str], List[int]]]: splits = {} splits_path = os.path.join(self._data_dir, 'processed', splits_dir) for fname in os.listdir(splits_path): fpath = os.path.join(splits_path, fname) if os.path.is...
/** * Reactive operations that really belong to {@link EntityType} * * @author Gavin King */ public class EntityTypes { /** * Replacement for {@link EntityType#resolve(Object, SharedSessionContractImplementor, Object, Boolean)} */ public static CompletionStage<Object> resolve(EntityType entityTyp...
<filename>grape/parallel/parallel_engine.h /** Copyright 2020 Alibaba Group Holding Limited. 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 r...
/** * Created with IntelliJ IDEA. * User: alsutton * Date: 10/09/2013 * Time: 13:46 * To change this template use File | Settings | File Templates. */ public class ModifyTodoRequest extends ServerRequestData { private Double completionTimestamp; private String eventId; private String nfcId; pr...
<filename>fcrepo-http-api/src/test/java/org/fcrepo/integration/http/api/ExternalContentHandlerIT.java<gh_stars>0 /* * The contents of this file are subject to the license and copyright * detailed in the LICENSE and NOTICE files at the root of the source * tree. */ package org.fcrepo.integration.http.api; import st...
<filename>src/main/java/com/forte/config/ConfigurationHelper.java /* * Copyright (c) 2020. ForteScarlet All rights reserved. * Project simple-robot-core * File ConfigurationHelper.java * * You can contact the author through the following channels: * github https://github.com/ForteScarlet * gitee https://gi...
namespace JVM { export interface ConnectionTestResult { ok: boolean; message: string; } }
package com.roadrunner.panoengine.panorama; import org.json.JSONArray; import org.json.JSONObject; import android.graphics.Bitmap; import android.os.AsyncTask; import com.roadrunner.panoengine.opengl.OpenGLTexture; public class JSONPanoramaLoader extends PanoramaLoader { public enum PanoramaType { Unknown, Cubic...
Life strategies of people with deafblindness due to Usher syndrome type 2a - a qualitative study ABSTRACT Purpose: To explore life strategies in people with Usher syndrome type 2a. Background: There are no studies on life strategies in people with Usher syndrome. People with deafblindness are often described in terms ...
def maskBySigmas(self, sigma=2): self.avgFlux = np.mean(self.flux) self.stdFlux = np.std(self.flux) self.smoothFlux = self.flux self.smoothFlux[self.smoothFlux <= self.avgFlux - sigma * self.stdFlux] = 0 self.mask = np.where(self.smoothFlux <= 0) self.wave = np.delete(self.wave, list(self.mask)) self.fl...
Characterization of Staphylococcus xylosus isolated from broiler chicken barn bioaerosol. In this study we isolated and characterized Staphylococcus xylosus, a coagulase-negative staphylococcal species considered as commensal and one of the prevalent staphylococcal species found in poultry bioaerosol. Isolates were ob...
def validation_lineplot(model, X, y, target): means = model.predict(X) line_chart = pygal.Line(fill=False, height=500, width=1000, title="[Validation] Model Fit Time Series", x_title="Day", y_title=f"{target}", explicit_size=True, show_legend=True, legend_at_bottom=False) line_cha...
/** * Return the text of the first item in an xQ's collection. * * Returns a pointer to the string copy on success, or 0 on failure. The * caller is responsible for freeing any returned string by calling * xmlFree(). */ xmlChar* xQ_getText(xQ* self) { if ( (!self->context.size) || (!self->context.list[0]) || (!...
<filename>src/test/java/wise86/socialNetworkKata/repository/onMemory/MemoryFollowingRepositoryTest.java package wise86.socialNetworkKata.repository.onMemory; import org.junit.Test; import wise86.socialNetworkKata.data.User; import wise86.socialNetworkKata.repository.FollowingRepository; import java.util.List; import...
<reponame>fsspec/ipfsspec import pytest from ipfsspec.async_ipfs import AsyncIPFSGateway, MultiGateway, AsyncIPFSFileSystem import aiohttp TEST_ROOT = "QmW3CrGFuFyF3VH1wvrap4Jend5NRTgtESDjuQ7QhHD5dd" REF_CONTENT = b'ipfsspec test data' TEST_FILENAMES = ["default", "multi", "raw", "raw_multi", "write"] @pytest.fixtur...
import { Injectable } from '@angular/core' import { AngularFireStorage } from '@angular/fire/storage' import { Storage } from '../constants/storage' @Injectable({ providedIn: 'root', }) export class ImageService { constructor(private readonly afStorage: AngularFireStorage) {} addImage(image: File, quizId: strin...
<reponame>mkorman9/spigot-plugin-test package com.github.mkorman9.spigotplugintest.commands; import com.github.mkorman9.spigotplugintest.Entrypoint; import com.github.mkorman9.spigotplugintest.events.PoweroffWhenEmptyEvent; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org....
#后缀自动机 (SAM) #字符串 s 的 SAM 是一个接受s的所有后缀的最小 DFA(确定性有限自动机或确定性有限状态自动机)。 #https://oi-wiki.org/string/sam/ #待实现
from typing import Optional from fastapi import Header, HTTPException from carbonserver.database.database import SessionLocal async def get_token_header( x_token: Optional[str] = Header( "fake-super-secret-token", convert_underscores=False ) ): if x_token != "fake-super-secret-token": ra...
/*---------------------------------------------------------------- * * Function: OS_TaskCreate_Impl * * Purpose: Implemented per internal OSAL API * See prototype for argument/return detail * *-----------------------------------------------------------------*/ int32 OS_TaskCreate_Impl (uint32 task_id,...
/** * * selects the appropriate parsing method * a tree is returned where each node is a list with the first element being the string representation and the remaining entries being the parsed values (java types or subtrees) * * @throws IllegalArgumentException * value does not conform cach...
def step(self, action): done = False self.pose = np.clip(self.pose + 0.05 * action, -1, 1) self.t += 1 reward = self.calculate_reward() if self.t == self.max_steps: done = True return self.pose, reward, done, {'rew_area': self.reward_area}
package com.xxmassdeveloper.mpchartexample; import android.graphics.Color; import android.graphics.Typeface; import android.os.Bundle; import android.view.WindowManager; import com.github.mikephil.charting.charts.LineChart; import com.github.mikephil.charting.components.Legend; import com.github.mikephil.charting.da...
// Execute prepared statement. If statement requires parameters you may bind // them first or specify directly. After this command you may use GetRow to // retrieve data. func (stmt *Stmt) Run(params ...interface{}) (res mysql.Result, err error) { defer catchError(&err) if stmt.my.net_conn == nil { return nil, mysq...
export interface StringKeyRegEx { [key: string]: RegExp } export interface StringKeyString { [key: string]: string } export interface StringKeyNumber { [key: string]: number }
To celebrate the one year anniversary of Ben Affleck being cast as Batman, I thought I’d share a small Batman v Superman: Dawn of Justice scoop with you. Minor spoilers follow… Advertisement Ben Affleck shot a Batman v Superman: Dawn of Justice scene inside the Masonic Temple in Detroit last week, and a source told B...
<filename>src/com/littlechoc/leetcode/algorithms/convert_sorted_list_to_binary_search_tree/Solution.java package com.littlechoc.leetcode.algorithms.convert_sorted_list_to_binary_search_tree; import com.littlechoc.leetcode.datastructure.ListNode; import com.littlechoc.leetcode.datastructure.TreeNode; /** * Problem 10...
The complexity of empathy during medical school training: evidence for positive changes Empathy is an essential aspect of clinical care, associated with improved patient satisfaction, increased adherence to treatment, and fewer malpractice complaints. Previous studies suggest that empathy declines during medical train...
/* * Copyright (c) 2018 IOTA Stiftung * https://github.com/iotaledger/iota.c * * Refer to the LICENSE file for licensing information */ /** * @ingroup cclient * * @{ * * @file * @brief * */ #ifndef CCLIENT_SERVICE_H_ #define CCLIENT_SERVICE_H_ #include <stdlib.h> #include "cclient/serialization/serializ...
// Clone returns a deep copy of the tree. func (t *Tree) Clone() *Tree { return &Tree{ nonce: t.nonce, maxDepth: t.maxDepth, memDepth: t.memDepth, root: t.root.Clone(), context: t.context, factory: t.factory, } }
def custom_data(coco, target, path=data_path+'/sub_sets/split_train_test_val_data/', nr_of_users=2, img_per_user=80, super_cat=True, toggle_folder_creation=False, split=False, split_name=""): path = path if path[-1] == '/' else path + '/' flush(path) users = UserSampling(coco=coco, labels_pa...
If "Boston Uprising" turns out like another local team owned by Robert Kraft, it should be a solid competitor. The Overwatch League, an international electronic sports "ecosystem" managed by Blizzard Entertainment Inc., is made up of 12 teams that will compete for the first time this year. The e-sports entertainment i...
Evaluation of laser radiation regimes at thermal tissue destruction The existing methods of laser destruction of biotissues, widely spread in surgery and coagulation action, are based on local heat emission in the tissues after light absorption. Here we present the results of the simulation of tissues heat destruction...
<filename>advancedbot/components/storage_managing/storage.py from abc import ABC, abstractmethod from .exceptions.storageexception import StorageException class Storage(ABC): ''' Base class for storing data ''' #--------------------------------------------------------------------------- # Getting...
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; bool fun(pii A, pii B){ if(A.first<B.first) return true; else if(A.first==B.first) return A.second < B.second; else return false; } main(){ int n; scanf("%d",&n); vector<pii> arr (n); int a,b; ...
<gh_stars>0 from pypandoc import convert_text from archivy.extensions import get_elastic_client def add_to_index(index, model): es = get_elastic_client() if not es: return payload = {} for field in model.__searchable__: payload[field] = getattr(model, field) es.index(index=index, ...
<reponame>christianspecht/tasko-androidclient package de.christianspecht.tasko.androidclient; import android.content.Context; import android.content.Intent; /** * Open menu items */ public class MenuOpener { private Context context; private MessageText message; public MenuOpener(Context context, M...
/* * Clean up a cache manager call. */ static void afs_cm_destructor(struct afs_call *call) { kfree(call->buffer); call->buffer = NULL; }
package br.com.ead.curso.dtos; import br.com.ead.curso.models.UsuarioModel; import org.springframework.beans.BeanUtils; import java.util.UUID; public class UsuarioEventDTO { private Long idUsuario; private UUID idExterno; private String nomeCompleto; private String cpf; private String email; ...
package gl_tls import ( "crypto/tls" "crypto/x509" "fmt" go_http "net/http" go_time "time" ) type tlsVerifier struct { } func NewTLSVerifier() *tlsVerifier { return &tlsVerifier{} } func (tv *tlsVerifier) VerifyHostCertificate(host string, port int) error { conn, err := tls.Dial("tcp", fmt.Sprintf("%s:%d", h...
/** * A wrapper to call the Site API. */ public class ITSiteApi { private Service mService; public ITSiteApi(Context context) { mService = ITRetrofitUtils.getRetrofitInstance(context).create(Service.class); } /** * Retrieves the site with the given reference. * * @param siteRe...
// Update updates the OauthToken in the database. func (ot *OauthToken) Update(db XODB) error { var err error if !ot._exists { return errors.New("update failed: does not exist") } if ot._deleted { return errors.New("update failed: marked for deletion") } const sqlstr = `UPDATE oauth_tokens SET ` + `app = ?,...
<reponame>hir12111/pvAccessCPP #ifndef SECURITYIMPL_H #define SECURITYIMPL_H #include <pv/remote.h> #include "security.h" namespace epics { namespace pvAccess { class AuthNZHandler : public ResponseHandler { EPICS_NOT_COPYABLE(AuthNZHandler) public: AuthNZHandler(Context* context) : ResponseHan...
<gh_stars>0 import * as vscode from 'vscode'; import { TreeItem } from 'vscode'; import * as path from 'path'; const reach_icon = path.join(__filename, '..', '..', '..', 'images', 'reach-icon.svg'); const reach_icon_red = path.join(__filename, '..', '..', '..', 'images', 'reach-icon-red.svg'); const discord_icon = pat...
export enum ActionTypes { SET_TOKEN = "SET_TOKEN", SET_USERID = "SET_USERID" }
<filename>pkg/fanal/handler/gomod/gomod_test.go package gomod import ( "context" "testing" "golang.org/x/exp/slices" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/aquasecurity/trivy/pkg/fanal/types" ) func Test_gomodMergeHook_Hook(t *testing.T) { tests := []struct { ...
/** toDays correctly converts sample values in different units to days */ public void testToDays() { for (long t = 0; t < 88888; t += 100) { assertEquals(t, TimeUnit.DAYS.toDays(t)); assertEquals(t, TimeUnit.HOURS.toDays(t * 24)); assertEquals(t, TimeUnit.MINUTES.toDays(t * SECS_IN_MIN * 24)); ...
// PrefixedNumerics returns a list of ids with a simple name prefix // followed by an integer separated by a dash. Naming starts at '1' not '0'. func PrefixedNumerics(prefix string, max int) []string { ids := make([]string, 0) for i := 1; i <= max; i++ { ids = append(ids, fmt.Sprintf("%s%d", prefix, i)) } return ...
from functools import reduce import numpy as np import pandas as pd from utils import get_country_ts, read_data def get_mortality_data(country, confirmed, dead): """ Calculate mortality rate over time for specific country. """ df = get_country_ts(country=country, ...
<reponame>ploukareas/Design-Patterns // ˅ #include "behavioral_patterns/visitor/File.h" #include "behavioral_patterns/visitor/Visitor.h" #include "behavioral_patterns/visitor/FileSystemElement.h" // ˄ File::File(const string& name, const int size) : name(name) , size(size) // ˅ // ˄ { // ˅ // ˄ } File::~Fi...
<reponame>srghma/reflex-platform<filename>haskell-overlays/reflex-packages/dep/ghcjs-dom/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RTCIceCandidate.hs {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParam...
/** * UGENE - Integrated Bioinformatics Tools. * Copyright (C) 2008-2012 UniPro <<EMAIL>> * http://ugene.unipro.ru * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of...
/** * Represents the component that manages {@link PojoMapperEndpoint}. */ public class PojoMapperComponent extends DefaultComponent { protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { PojoMapperEndpoint endpoint = new PojoMapperEndpoint(ur...
Distributed Sensing for High Quality Structural Health Monitoring Using Wireless Sensor Networks In recent years, using wireless sensor networks (WSNs) for structural health monitoring (SHM) has attracted increasing attention. Traditional centralized SHM algorithms developed by civil engineers can achieve the highest ...
Generic Style Music Preferences of Fifth-Grade Students The primary intent of this study was to find fifth-graders' most preferred generic music style and identify the critical competitors of that style, if any existed. A short listening test was developed to measure preference for different generic styles of music. A...
def image_required(func): @patch_required def image_wrapper(request, image_type, *args, **kwds): content_key = None content = None if image_type == "0": content_key = request.patch.content_key elif image_type == "1": content_key = request.patch.patched_content_key if content_key: ...
<filename>src/configuration/configuration.service.ts import { Injectable } from '@nestjs/common'; import { ConfigurationInterface } from './interface/configuration.interface'; @Injectable() export class ConfigurationService { async getConfiguration(enviroment: string): Promise<any>{ if(enviroment === 'prod...
/** * Hydro Time Series Shef Issue xml. * * <pre> * * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Mar 28, 2011 mpduff Initial creation * * </pre> * * @author mpduff * @version 1.0 */ @XmlRootEleme...
import sys input=sys.stdin.readline #for _ in range(int(input().strip())): n,q,k=map(int,input().strip().split(" ")) #s=input().strip() #n=int(input().strip()) a=list(map(int,input().strip().split(" "))) for _ in range(q): l,r=map(int,input().strip().split(" ")) L=a[l-1] R=a[r-1] print(L-1+k-R+2*(R-L-(r-...
#!/usr/bin/env python3 import sys from helpers import * if len(sys.argv) < 3: print("usage: python split.py streusle.conllulex ud_{train, dev, test}_sent_ids.txt", file=sys.stderr) sys.exit(1) sent_ids = set() with open(sys.argv[2]) as f: for line in f: line = line.strip() if line: ...
<reponame>dangxuanvuong98/pineapples_harvester<gh_stars>0 import cv2 import os import xml.etree.ElementTree as ET from tqdm import tqdm data_directory_path = '/media/trivu/data/DataScience/ComputerVision/dua/new_data/train' result_path = '/media/trivu/data/DataScience/ComputerVision/dua/new_data/cropped_pineapple' lab...
Oral Manifestations in SARS-CoV-2 Positive Patients: A Systematic Review The COVID-19 pandemic has severely affected the human population by revealing many health problems, including within the oral cavity. This systematic review was designed to answer the question “Is there a relationship between oral manifestations ...
<gh_stars>100-1000 /*++ Module Name: Util.cpp Abstract: Generic support routines that don't seem to belong elsewhere. Authors: <NAME>, March, 2013 Environment: User mode service. Revision History: Factored from other places --*/ #include "stdafx.h" #include "Util.h" #include "Error.h" #i...
/** * Tests getting and setting fields. */ @Test public void fields() { Random random = new Random(); boolean createParent = random.nextBoolean(); boolean ensureAtomic = random.nextBoolean(); String owner = CommonUtils.randomAlphaNumString(10); String group = CommonUtils.randomAlphaNumString...
. A case of metastatic renal cell carcinoma in which complete remission was achieved using Interferon therapy is reported. A 67-year-old male was found to have extensive paraaortic lymph node metastasis while undergoing left nephrectomy following diagnosis of 1-renal cancer. Pathological diagnosis of the node was meta...
import { Vec3 } from "./vec3"; import { Color } from "./color"; import { CameraRay } from "./cameraray"; export class Viewport { private width: number private height: number private buffer: Uint8ClampedArray constructor(width: number, height: number) { this.width = width; this.height =...
package com.avaje.ebean.dbmigration.ddlgeneration.platform; import com.avaje.ebean.config.DbConstraintNaming; import com.avaje.ebean.config.ServerConfig; import com.avaje.ebean.config.dbplatform.DbIdentity; import com.avaje.ebean.config.dbplatform.DbTypeMap; import com.avaje.ebean.config.dbplatform.IdType; import com....
# Discord python bot for Konziis! # # Python discord bot: # https://realpython.com/how-to-make-a-discord-bot-python/ # https://discordpy.readthedocs.io/en/latest/index.html # https://github.com/Rapptz/discord.py/tree/v1.7.2/examples # # Wolfram-API: # https://products.wolframalpha.com/api/documentation/#getti...
<gh_stars>1-10 package com.todoist.mediaparser.mediaentity; import com.todoist.mediaparser.util.HttpStack; import java.util.regex.Pattern; /** * Holds various information about the associated media. It needs to be configured through a call to * {@link #configure(HttpStack)}, which can be a blocking call depending ...
Kevin Smith Presents Slamdance Award Winning 'The Dirties' Trailer "The most important movie you will see all year," says Kevin Smith. One of the first films debuting through Kevin Smith's new "Movie Club" distribution company (aka SModcast Pictures with Phase 4) is a Slamdance award-winning indie titled The Dirties. ...
#include <stdio.h> int countfunc(int n, int x); int main(void){ int n, x, cou; while(1){ scanf("%d %d", &n, &x); if((n == 0) && (x == 0)) break; cou = countfunc(n, x); printf("%d\n", cou); } return 0; } int countfunc(int n, int x) { int i, j, k; int count = 0; for(i = 1;i <= n;i++){ for(j = i +...