content
stringlengths
10
4.9M
/** Define a test hook for coordinating waiting. */ public class WaitTestHook<T> extends TestHookAdapter<T> { /** Logger for this class. */ protected final Logger logger = LoggerUtils.getLoggerFixedPrefix(getClass(), "Test"); /** Whether the hook is waiting. */ private boolean waiting = false;...
<reponame>shengwen1997/puyuma-core<filename>src/core/main.cpp<gh_stars>0 #include <cstdio> #include <opencv2/opencv.hpp> #include <raspicam/raspicam_cv.h> #include "camera.hpp" #include "motor.hpp" #include "lane_detector.hpp" #include "self_driving.hpp" #include "intrinsic_calibration.hpp" #include "extrinsic_calibra...
// Peek returns the next n bytes without advancing the reader. The bytes stop // being valid at the next read call. If Peek returns fewer than n bytes, it // also returns an error explaining why the read is short. The error is // ErrBufferFull if n is larger than b's buffer size. func (b *Reader) Peek(n int) ([]byte, e...
package graphql import ( "bytes" "fmt" "io" "os" "path/filepath" "reflect" "strings" "text/template" "github.com/pkg/errors" "golang.org/x/tools/imports" "github.com/EGT-Ukraine/go2gql/generator/plugins/graphql/lib/importer" ) type schemaGenerator struct { tracerEnabled bool schemaCfg SchemaConfig ...
def add_view(self, view): if view.name not in map(lambda v: v.name, self.views): new_view = True self.views.append(view) for ID, targets in view.map.items(): for target in targets: self.add_target(target) return True els...
<reponame>NicoleRauch/react-flux-enzyme module React.Flux.Enzyme (module E) where import React.Flux.Enzyme.ReactWrapper as E import React.Flux.Enzyme.ShallowWrapper as E
from collections import namedtuple from kaa.filetype.default import defaultmode from gappedbuf import re as gre from kaa.highlight import Tokenizer, Span, Keywords, EndSection from kaa.theme import Theme, Style JavaScriptThemes = { 'default': Theme([ # None defined ]) } def build_tokeni...
/** * Convenient wrapper for a button that goes to a particular place when clicked. */ public class PlaceButton extends Composite { private final Button button = new Button(); public PlaceButton( final PlaceManager placeManager, final DefaultPlaceRequest goTo ) { checkNotNull( "placeManager", placeM...
/** * The entry point for clients to access role data */ @RestController @RequestMapping("/roles") public class RoleController { /** * Using the Role service to process role data */ @Autowired RoleService roleService; /** * List of all roles * <br>Example: <a href="http://localho...
On the 1st January 2011, I released the first Open Source version of Labyrinth, both to CPAN and GitHub. In additon I also released several plugins and a demo site to highlight some of the basic functionality of the system. Labyrinth has been in the making since December 2002, although the true beginnings are from abo...
// SendDistribution send node information about to the peer func (peer *Peer) SendDistribution() error { packet := packets.NewPacket(packets.CMD_DISTRIBUTION, peer.Server.ServerNode.ServerNetworkNode) peer.SendPacket(packet) return nil }
<reponame>rebeccajohnson88/qss20_s21_proj # Authors: JG, DC # Date: 6/1/2021 # Purpose: fuzzy matches between the H2A applications data and the WHD investigations data # Filename: A1_fuzzy_matching.py # imports import pandas as pd import numpy as np import random import re import recordlinkage import time # -------- ...
// FIXME: Fix semantics of Thread::block class KernelMutex { public: ~KernelMutex() { VERIFY(m_waiting_threads.size() == 0); } void lock() { if (Scheduler::is_initialized()) { Thread *active_thread = Scheduler::the().active_thread_i...
/* ipmi_kontron_next_boot_set - Select the next boot order on CP6012 * * @intf: ipmi interface * @id: fru id * * returns -1 on error * returns 1 if successful */ static int ipmi_kontron_nextboot_set(struct ipmi_intf * intf, int argc, char **argv) { struct ipmi_rs *rsp; struct ipmi_rq req; uint8_t msg_...
// If no bundle name is specified, the first app's name is used. // TODO(omaha): There is no enforcement of required or optional values of // the extra arguments. Come up with a way to enforce this. // TODO(omaha): If we prefix extra_args with '/' and replace all '=' with ' ' // and all & with '/' then we should be abl...
import * as React from 'react' import styled from 'styled-components' import { Indicator } from '../types/DataType' type ChartTitleProps = { countries: string[] indicators: Indicator[] } const StyledChartTitle = styled.div` padding: 1em; text-align: center; :first-letter { text-transform: capitalize...
After writing a cover story heralding Barack Obama as the “First Gay President,” conservative blogger Andrew Sullivan went on “The Chris Matthews Show” to talk about what Obama’s personal endorsement of gay marriage meant to him. A lot, apparently: “It’s hugely important, and to tell you the truth I didn’t realize ho...
//! Internal shared convenient things. use crate::error::{Result, Ret, RsmpegError}; use libc::c_int; use rusty_ffmpeg::ffi; use std::{ops::Deref, ptr::NonNull}; /// Triage a pointer to Some(non-null) or None pub trait PointerUpgrade<T>: Sized { fn upgrade(self) -> Option<NonNull<T>>; } impl<T> PointerUpgrade<T> ...
/* Copyright 2012, 2015 <NAME>. 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 in writing, software d...
Therapeutic enquiries about biological agents as a tool to identify safety aspects and patterns of use Background Biotechnological agents (BA) are increasingly being used in clinical practice. We aimed to determine, whether enquiries about them to a therapeutic consultation service have also become more frequent, and ...
from os.path import join COURSE_DATA = join('..', 'course-data') details_source = join(COURSE_DATA, 'details') xml_source = join(COURSE_DATA, 'raw_xml') course_dest = join(COURSE_DATA, 'courses') term_dest = join(COURSE_DATA) mappings_path = join(COURSE_DATA, 'data-lists') handmade_path = join(COURSE_DATA, 'data-mappi...
<reponame>alexeyyavorskiy/vet-beckend export class UpdateSpeciesDto { readonly id: number; readonly label: string; animalId?: number; }
#include<stdio.h> #include<map> #include<vector> #include<algorithm> #include<string.h> #define Max 2*100005 using namespace std; map<int,int>m; vector<int>vec; int main(){ char s[Max]; int a[Max+1][3],i,j,val; scanf("%s",s); int len = strlen(s); a[len][0] = 0,a[len][1] = 0,a[len][2] = 0; for(i=len-1;i>=0;i--){ ...
package controllers; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; import com.fasterxml.jackson.databind.node.ArrayNode; import com.google.inject.Inject; import Model.UserModel; import actors.SentimentActor; import actors.TweetWordsActor; import actors.HashtagActor; impo...
def kt_configure(): maven_install( name = "kotlin_rules_maven", fetch_sources = True, artifacts = [ "com.google.code.findbugs:jsr305:3.0.2", "junit:junit:4.13-beta-3", "com.google.protobuf:protobuf-java:3.6.0", "com.google.protobuf:protobuf-jav...
package presentation import ( "github.com/the4thamigo-uk/paymentserver/pkg/domain/account" "github.com/the4thamigo-uk/paymentserver/pkg/domain/amount" "github.com/the4thamigo-uk/paymentserver/pkg/domain/bank" "github.com/the4thamigo-uk/paymentserver/pkg/domain/charges" "github.com/the4thamigo-uk/paymentserver/pkg...
def attach(self, device, name=None, channel=None): self.device = device self.name = name self.initialize(channel=channel)
A dedicated paediatric departmental intranet site – is it worth it? Aims There is currently no published evidence looking into the use of departmental websites in medicine. This study investigated the usage, acceptance and potential benefits of a paediatric departmental intranet site in a DGH over a three year period....
package fi.joniaromaa.duelsminigame.pregame; import java.io.File; import java.io.IOException; import java.nio.file.Paths; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Optional; import org.apache.commons.io.FileUtils; import org.bukkit.Chunk; import org.bukkit.Location; ...
/** * Returns the {@link Installation} if device token exists and request is * authenticated (Basic Or Bearer). * * @param request {@link HttpServletRequest} * */ public Optional<Installation> loadInstallationWhenAuthorized(HttpServletRequest request) { String deviceToken = ClientAuthHelper.getDeviceToken...
How to Explore with Intent - Exploratory Testing Self-Management By Maaret Pyhäjärvi Exploratory testing is the wonderful idea that we can use our freedom of choice while testing, to learn as we go on and let that learning influence the choices we make next. The system we test is our external imagination, and it's ou...
<gh_stars>0 // The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // contributed by the Rust Project Developers // contributed by <NAME> // contributed by TeXitoi // modified by <NAME> // contributed by <NAME> (@cristicbz) // contributed by <NAME> // contributed by <NAME> // modified b...
// Author: <NAME> <<EMAIL>> // controllers package - package controllers import ( . "TheGorgeous/controllers/helpers" "net/http" ) // Struct type indexController - type indexController struct { LayoutHelper } // IndexController function - func IndexController() *indexController { return &indexController{} } // ...
/** * Translates the NetworkTables into the Codex with the corresponding enumeration name */ public void parseFromNetworkTables() { for(E e : EnumUtils.getEnums(mEnumClass)) { String key = e.name().toUpperCase(); Double value = kNetworkTable.getEntry(key).getDouble(Double.NaN);...
/** * Load the input, and then run the algorithm under the * controlled timing setting. */ public void run() { algorithm.loadInput(input); GenResults gs = new GenResults(algorithm, NUMREPEATS); gs.run(); this.results = algorithm.getResults(); this.ticks = gs.getTicks(); this.time = gs.getTime(); ...
<filename>src/lib/utils/requestPhotos.tests.ts import { LegacyNativeModules } from "lib/NativeModules/LegacyNativeModules" import { Platform } from "react-native" import { openPicker } from "react-native-image-crop-picker" import { requestPhotos } from "./requestPhotos" jest.mock("react-native-image-crop-picker", () =...
package registrar import ( "github.com/cosmos/cosmos-sdk/simapp/params" "github.com/forbole/egldjuno/logging" "github.com/forbole/egldjuno/types" "github.com/forbole/egldjuno/modules/messages" "github.com/forbole/egldjuno/modules/modules" "github.com/forbole/egldjuno/client" "github.com/forbole/egldjuno/db" ...
def covertype_train(project_id, region, source_table_name, gcs_root, dataset_id, evaluation_metric_name, evaluation_metric_threshold, model_id, version_id, ...
def currentsellings(): items = Item.query.filter( (Item.user_id == session["user_id"]) & (Item.sold == 0)).all() return render_template("currentsellings.html", items=items)
/// Create a new instance of the `GameBoyRom`. pub fn new(rom_bytes: &'rom [u8]) -> Self { Self { rom_data: rom_bytes, } }
<gh_stars>0 ------------------------------------------------------------------------------ module Network.HTTP.Media.MediaType.Tests (tests) where ------------------------------------------------------------------------------ import qualified Data.ByteString.UTF8 as BS import qualified Data.Map as Map ---...
/** * Provides abstraction to the drive mechanism of the robot. * * @author Benjamin Landers */ public class DriveTrain extends Subsystem { public final String TAG = "DriveTrain"; public Jaguar left, right; public Gyro gyro; public DriveTrain(int left, int right, int gyro) { this.left ...
import unittest import torch from util.data_handling.string_generator import IndependentGenerator from edit_distance.task.dataset_generator_synthetic import EditDistanceDatasetGenerator ALPHABET_SIZE = 6 class TestEDDatasetGenerationSynthetic(unittest.TestCase): def __init__(self, methodName): super()....
package logs import ( "fmt" "io" "os" "strings" "time" rotatelog "github.com/lestrrat/go-file-rotatelogs" "github.com/op/go-logging" "github.com/opensourceways/app-robot-server/config" ) const ( logDir = "logs" logSoftLink = "latest_log" Module = "app-robot" ) var Logger = logging.MustGetLogge...
/* * Check if there are messages waiting to be collected */ public boolean hasMessagesAvailable() { if( inmsgs!=null ) { return inmsgs.isEmpty(); } return true; }
/**************************************************************/ /** Checks a file segment header within a B-tree root page and updates the segment header space id. @return TRUE if valid */ static bool btr_root_fseg_adjust_on_import( fseg_header_t* seg_header, page_zip_des_t* page_zip, ulint space, mtr_t* mtr...
‘Ni kijana!’ is Swahili phrase that means ‘It’s a boy!’ This exciting exclamation was heard on September 3rd when we celebrated the arrival of a new baby in the gorilla family troop at Disney’s Animal Kingdom! Our avid Disney Parks Blog readers might be thinking, “Didn’t you just announce a new gorilla baby?” Yes, we d...
/** * Fills buffer with town's name * @param buff buffer start * @param t we want to get name of this town * @param last end of buffer * @return pointer to terminating '\0' */ char *GetTownName(char *buff, const Town *t, const char *last) { TownNameParams par(t); return GetTownName(buff, &par, t->townnameparts,...
def encapsulate(*args): if len(args) > 1: return list(Sequential.encapsulate(x) for x in args if len(x) > 0) layers = args[0] if len(layers) == 1: return layers[0] def f(x): for layer in layers: x = layer(x) return x ...
def add_message(self, msg_id, location, msg): module, obj, line, col_offset = location[1:] sigle = self.make_sigle(msg_id) full_msg = [sigle, module, obj, str(line), msg] self.msgs += [[sigle, module, obj, str(line)]] self.gui.msg_queue.put(full_msg)
/** * Enable or disable notification messages to clients * every cache_time/2 seconds */ public void enableNotify(boolean enable) { if (enable && notifyTimer == null) { notifyTimer = new NotifyTimer(); Timer timer = new Timer(); timer.schedule(new NotifyTimer()...
/// Instantiates `Self` from bytes. /// /// The bytes are not fully verified (i.e., they may not represent a valid BLS point). Only the /// byte-length is checked. pub fn deserialize(bytes: &[u8]) -> Result<Self, Error> { if bytes.len() == SIGNATURE_BYTES_LEN { let mut pk_bytes = [0; SIGNATURE_BYTES...
Photo: Heidi Carpenter On Saturday, heavy rains moved into Keeneland as lady luck left and two of the heavy favorites of the day fell. But despite the rain and losses, I had a wonderful time; if anything, the rains allowed me to take some interesting photos. Champion sprinter Groupie Doll was happy to pose for photog...
<filename>src/analysis/special_functions.rs use crate::{ analysis::{functions::Info as FuncInfo, imports::Imports}, codegen::Visibility, config::GObject, library::{Type as LibType, TypeId}, version::Version, }; use std::{collections::BTreeMap, str::FromStr}; #[derive(Clone, Copy, Eq, Debug, Ord, Pa...
""" This is a custom JUnit XML reporter for AltWalker implemented using the built-in PrintReporter as basis. It provides the ability to either generate a JUnit XML report containing a testcase element per each model or a single testcase that abstracts the whole execution, no matter how many models have been exe...
/** * The code will cease to work once the enum values are no longer in descending order. */ @Test public void testDescendingOrder() { long previous = Long.MAX_VALUE; for (PowersOfTen value : PowersOfTen.values()) { assertThat(value.getLongValue()).isLessThan(previous); previous = value.getL...
/** * @author Peter Williams */ public class ParentManagedDDBeanTableModel extends InnerTableModel { // Fields required to interpret parentBean correctly (comments wrt/ JspConfig) private CommonDDBean parentBean; private String parentPropertyName; // = JspConfig.PROPERTY; private List<TableEntry> pro...
<gh_stars>0 import unittest from app.models import User,Article from app import db class BlogTest(unittest.TestCase): def setUp(self): ''' Sets up the before all tests ''' self.user_admin = User(username='admin',password_hash='<PASSWORD>',email='<EMAIL>') self.new_article = ...
/** * Return the column position within the given columns. * * @param columns the list of columns to search the column from. * @param colId the wanted column id. * @return the column position within the given columns. */ private int findColumnPosition(List<ColumnMetadata> columns, String c...
<filename>src/main/java/com/rbc/shopping/repository/OrderRepository.java package com.rbc.shopping.repository; import com.rbc.shopping.entity.Orders; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; im...
/*! Progress Bar just writes the given message and flushes */ class NoProgressBar : public ProgressIndicator { public: NoProgressBar(const std::string& message, const unsigned int messageWidth = 40); void updateProgress(const unsigned long progress, const unsigned long total) override {} void reset() overri...
<filename>main.go package main import ( "log" "time" ) func main() { start := time.Now() log.Println("Start") log.Println("App", pVersion) doIt() statsDmp() memDmp() elapsed := time.Since(start) log.Println("Takes about: ", elapsed) log.Println("Done") }
import { Controller, Get, Post, Res, Body, UseGuards,UseInterceptors, CacheInterceptor, CacheKey,CacheTTL } from '@nestjs/common'; import { Param } from '../../common/decorators/param.decorator'; import { UserService } from './user.service'; import { CreateUserDto } from '../../pojo/dto/user.create.dto'; import { ApiTa...
n,x,t=input().split() n=int(n) x=int(x) t=int(t) i=1 for i in range(n*2): if n-x*i<=0: break else: i+=1 print(t*i)
def tracking_hybrid(self): if self.tracking_stage == 0: self.cur_data['pose'] = SE3(self.gt_poses[self.cur_data['id']]) self.tracking_stage = 1 return elif self.tracking_stage >= 1: start_time = time() cur_data, ref_data = self.deep_flow_forwar...
def f(x): r=0 while x:r+=x;x//=10 return r for s in[*open(0)][1:]:l,r=map(int,s.split());print(f(r)-f(l))
<filename>containers/index.ts<gh_stars>0 export { default as ProductCard } from "./ProductCard/ProductCard"; export { default as CartItem } from "./CartItem/CartItem"; export { default as CartSummary } from "./CartSummary/CartSummary"; export { default as CardPayment } from "./CardPayment/CardPayment";
/** * Overriten method responsible for drawing the view */ @Override protected void paintComponent(Graphics g) { super.paintComponent(g); for(var view : views) { view.draw(g); } Toolkit.getDefaultToolkit().sync(); }
Closed Beta Your unique download code: Note: Do not share this key or you may not be able to play. This Promotion Code is case sensitive and must be entered exactly as displayed. *Start date and terms subject to change without notice. If full game is not yet released at time of purchase, entitlement will allow for ...
In linguistics, an eggcorn is an idiosyncratic substitution of a word or phrase for a word or words that sound similar or identical in the speaker's dialect (sometimes called oronyms). The new phrase introduces a meaning that is different from the original but plausible in the same context, such as "old-timers' disease...
/** * Sets the flow tasks in the DB in status 'New' so they will be 'visible' to the producer thread/s and therefore * will be added to the queue for execution. * @param flowId to update in DB. * @throws PersistenceException in case the update failed - may cause some of the tasks of a flow to be in ...
<filename>app/src/main/java/com/projects/marcoscavalcante/deloapp/Utils/BaseFragment.java package com.projects.marcoscavalcante.deloapp.Utils; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.util.Dis...
#ifndef CAN_BUS_DEFS_H #define CAN_BUS_DEFS_H #define REQUEST_STATE_TO_ALL 0x00000001 // Команда всем передать свое состояние #define BCKPC_STATE_PACKET 0x00000060 // Ответ контроллера резервного питания. #define BCKPC_CMD_PACKET 0x00000070 // Команда ко...
#ifndef SphereCollider_hpp #define SphereCollider_hpp #include "Collider.hpp" namespace FishEngine { class FE_EXPORT SphereCollider : public Collider { public: DefineComponent(SphereCollider); SphereCollider() = default; SphereCollider(const Vector3& center, const float raduis); virtual void OnD...
/* * Copyright (c) 2016. <NAME>, Inc * * 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 ag...
<reponame>ZborovskiyKyryl/trello_Kyryl package com.trello.qa.manadger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class BoardHelper ext...
//-- HelloRenderer.cpp ---------------------------------------------------------- // // Copyright (C) 2015 // University Corporation for Atmospheric Research // All Rights Reserved // //---------------------------------------------------------------------------- // // File:...
a,b = map(list, raw_input().split('|')) s = list(raw_input()) while s: e = s.pop() if len(a) >= len(b): b.append(e) else: a.append(e) if len(a) == len(b): print '%s|%s' % (''.join(a), ''.join(b)) else: print 'Impossible'
// Returns the current position in the given file, or -1 on error. errno is set // to indicate the error. // // See https://liballeg.org/a5docs/5.2.6/file.html#al_ftell func (f *File) Tell() (int64, error) { pos := int64(C.al_ftell((*C.ALLEGRO_FILE)(f))) if pos == -1 { return 0, LastError() } return pos, nil }
/** * The attributes of a vertex are * its height and the array of faces surrounding that vertex. * <p> * There is a crude parallelism between the Vertex and Face classes, corresponding * to the duality of planar maps that exchanges vertices and faces. */ public class Vertex { private final int height...
def _parse_ascii_armored_base64(data: str) -> bytes: data = data.strip() lines = (line for line in data.split('\n')) header = next(lines).rstrip() base64_data = '' line = next(lines).rstrip() while line and (line != EC_PRIVATE_FOOTER) and (line != EC_PUBLIC_FOOTER): ...
/* * The MIT License * * Copyright (c) 2020 Nefele <https://github.com/nefele-org> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation t...
/** * @deprecated Define a {@link IWicketContextExecutor} bean in your application and use this bean instead of * extending AbstractBackgroundWicketThreadContextBuilder. */ public abstract class AbstractBackgroundWicketThreadContextBuilder implements IContextualService { @Autowired private IWicketContextExecutor...
<filename>services/ui-src/src/measures/2022/Qualifiers/validationFunctions.ts import { ACS, CCS, CCSC, CCSM, HHCS } from "./validations"; export const validationFunctions = { ACS, CCS, CCSC, CCSM, HHCS, };
/* The set_voice_position method should set the voice's playback position, given the value in samples. This should never be called on a streaming voice. */ static int _dsound_set_voice_position(ALLEGRO_VOICE *voice, unsigned int val) { ALLEGRO_DS_DATA *ex_data = (ALLEGRO_DS_DATA *)voice->extra; HRESULT hr; ...
Some 5,000 activists in Berlin rallied in front of Reichstag and dug at least one hundred graves to express their solidarity with asylum seekers, who have died trying to reach Europe after fleeing war and persecution in their home countries. ‘Refugees are welcome here’: Thousands march in Berlin to support migrants, G...
The Wasted Fractions of Pequi Fruit are Rich Sources of Dietary Fibers and Phenolic Compounds Considering the scarcity of studies on the nutrients and phenolic compounds in the wasted fractions of the pequi (Caryocar brasiliense Camb.) fruit processing, this study investigated the proximate composition, identified the...
// AOJ 3065 How old are you // 2019.9.30 bal4u #include <stdio.h> typedef long long ll; int main() { int N, q, x; ll A, B; A = 0, B = 1; scanf("%d", &N); while (N--) { scanf("%d%d", &q, &x); if (q == 1) A *= x, B *= x; else if (q == 2) A += x; else A -= x; } printf("%lld %lld\n", -A, B); return 0; }...
// Reselect the video / audio tracks. private void reselectTracks() { if (counter.add(System.currentTimeMillis())) { Log.i(WebUtil.DEBUG, "reselectTracks ignored, too frequent for more than 9 calls duration one minute."); return; } Log.i(WebUtil.DEBUG, "reselectTracks for group constraint"); ...
//#pragma GCC optimize(2) //#pragma GCC optimize(3) #include <bits/stdc++.h> #define int long long #define mod 1000000007 //#define getchar() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<22,stdin),p1 == p2)?EOF:*p1++) using namespace std ; //char buf[(1 << 22)] , *p1 = buf , *p2 = buf ; inline int read () { char c = getch...
/** Computes the concrete types that can result from the given expression. */ ConcreteType inferConcreteType(ConcreteScope scope, Node expr) { Preconditions.checkNotNull(scope); Preconditions.checkNotNull(expr); ConcreteType ret; switch (expr.getType()) { case Token.NAME: StaticSlot<Concre...
from openpyxl import Workbook wb = Workbook() ws = wb.active data = [ ["Fruit", "Quantity"], ["Kiwi", 3], ["Grape", 15], ["Apple", 3], ["Peach", 3], ["Pomegranate", 3], ["Pear", 3], ["Tangerine", 3], ["Blueberry", 3], ["Mango", 3], ["Watermelon", 3], ["Blackberry", 3], ...
Development of adult sensilla on the wing and notum of Drosophila melanogaster. We have investigated the temporal pattern of appearance, cell lineage, and cytodifferentiation of selected sensory organs (sensilla) of adult Drosophila. This analysis was facilitated by the discovery that the monoclonal antibody 22C10 lab...
def load_word2vec(filepath, vocabulary, embedding_dim): embeddings = np.random.uniform(-0.25, 0.25, (len(vocabulary), embedding_dim)) words_found = 0 with open(filepath, "rb") as f: header = f.readline() word2vec_vocab_size, embedding_size = map(int, header.split()) binary_len = np.d...
<gh_stars>1-10 N = int(input()) a_list = list(map(int, input().split())) a_list.sort() from collections import deque deq = deque(a_list) res = [] while len(deq) > 2: min_num = deq.popleft() max_num = deq.pop() if min_num < 0 and max_num > 0: ne = deq.pop() if ne >= 0: res.appen...
import { ChronoAtom, MinimalChronoAtom } from "../../src/chrono/Atom.js" import { ChronoGraph, MinimalChronoGraph } from "../../src/chrono/Graph.js" declare const StartTest : any StartTest(t => { t.it('Behavior depending from data', async t => { const graph : ChronoGraph = MinimalChronoGraph.new() ...
const express = require('express') const bodyParser = require('body-parser') const cookieParser = require('cookie-parser') const cors = require('cors') const path = require('path') const app = express() const log = console.log var port = process.env.PORT || 4000 // Body parser: https://github.com/expressjs/body-parser...
/** * A label that displays a help icon and can open a help page when clicked. For * a help page in the SE3 docs, use {@link #setWikiPage} to set the location. * Otherwise, use {@link #setHelpPage} and provide the full URL. * * @author Chris Jennings <https://cgjennings.ca/contact> * @since 3.0 */ @SuppressWarni...
<gh_stars>0 // ArduinoJson.hやFS.hはここでincludeすべきだが, // ArduinoJson.hがこのファイルからincludeできなかった(No such file or directory) // ため,メインのjRemocon.inoでまとめてincludeするようにしている typedef struct { char ssid[0xFF]; char pass[0xFF]; IPAddress *ip; IPAddress *subnet; IPAddress *gateway; } wifi_config; IPAddress* toIPA...
from pepper.framework import AbstractImage, Bounds, Object from PIL import Image import numpy as np import json import os def read(root): OBJ_HANDLE = "_obj.json" RGB_HANDLE = "_rgb.png" DEPTH_HANDLE = "_depth.npy" META_HANDLE = "_meta.json" obj_files = sorted([item for item in os.listdir(root...