content
stringlengths
10
4.9M
Four-dimensional Monte Carlo simulations demonstrating how the extent of intensity-modulation impacts motion effects in proton therapy lung treatments. PURPOSE To compare motion effects in intensity modulated proton therapy (IMPT) lung treatments with different levels of intensity modulation. METHODS Spot scanning I...
<gh_stars>1-10 /* Package set implements a `Set` and a `SyncSet` for common set operations. This is pretty standard data structure implementation that uses a `map[interface{}]struct{}` and also serves as a template for more specific set type implementations. The SyncSet provides thread-safe concurrent access to a set u...
<gh_stars>0 // import anypackage.in.which.you.put.Exevalator; /** * Function available in expressions. */ class MyFunction implements Exevalator.FunctionInterface { /** * Invoke the function. * * @param arguments An array storing values of arguments. * @return The return value of the functi...
<gh_stars>0 package uk.gov.hmcts.ccd.domain.service.search.elasticsearch; import static java.lang.String.format; import uk.gov.hmcts.ccd.ApplicationParams; public abstract class CaseSearchRequestFactory<T> { private final ApplicationParams applicationParams; private final CaseSearchQuerySecurity caseSearchQ...
package org.opendatakit.utilities; import org.junit.After; import org.junit.Before; import org.junit.FixMethodOrder; import org.junit.runners.MethodSorters; import org.opendatakit.TestConsts; import org.opendatakit.database.service.DbHandle; import org.opendatakit.services.database.AndroidConnectFactory; import org.op...
Top twelve myths about fiber The recent popularity of fiber in medicine and nutrition is based on old wives' tales and intentional lies that have little to do with either science or medicine. These lies and tales are retold ad nauseam in medical offices, web sites, diet books, college courses, government pamphlets, an...
// // $Date: 2008-08-20 16:59:17 +0300 (K, 20 aug 2008) $ $Revision: 599 $ // /* * l�pugruppide sisselugemine, uute tegemine ja faili kirjutamine */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "../../../lib/etana/post-fsc.h" #include "noomen.h" extern tyvestr tyvi[]; //extern FSXSTRING inbuf...
#include<stdio.h> int MIN(int a,int b) { return a<b?a:b; } int main() { int s,x1,x2,t1,t2,p,d,ans; scanf("%d %d %d %d %d %d %d",&s,&x1,&x2,&t1,&t2,&p,&d); if(d==1 && x1<x2 && p<=x1) ans = MIN((abs(x2-x1)*t2),(abs(x2-p)*t1)); else if(d==1 && x1<x2 && p>x1) ans = MIN((abs(...
def full_message(self, course_key): cache_key = f"status_message.{str(course_key)}" if cache.get(cache_key): return cache.get(cache_key) msg = self.message if course_key: try: course_home_message = self.coursemessage_set.get(course_key=course_key) ...
/** * Graph stream viewer. * * @author Min Cai */ public class GraphStreamViewer { private ACOHelper acoHelper; private Graph graph; static { System.setProperty("org.graphstream.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer"); } /** * Create a graph stream viewer. ...
def sql_summary(lines, show_times=False, show_details=False, **options): if sqlparse is None: raise Exception("sql_summary() requires the sqlparse package") d = {} for l in lines: l = l.replace('"', '') l = l.replace('`', '') m = re.match(regex, l) if m: g...
/** * Persist recent list asynchronously on a background thread * * @return this recent list */ public RecentRepositories saveAsync() { if (ids != null) new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { ...
<gh_stars>1-10 package model // Permission : Permission to assign. type Permission string // List of possible Permission values const ( Permission_GET Permission = "GET" Permission_DELETE Permission = "DELETE" Permission_POST Permission = "POST" Permission_PUT Permission = "PUT" Permission_PATCH Permiss...
def addHelpSection(self, accessLevel : int, sectionName : str): if accessLevel < 0 or accessLevel > self.numAccessLevels - 1: raise IndexError("accessLevel must be at least 0, and less than " + str(self.numAccessLevels)) if sectionName in self.helpSections: raise ValueError("The ...
// relocateSpec creates a spec for where the new machine will be located. func (c *vsphereClientImpl) relocateSpec(ctx context.Context, s *vsphereSettings) (types.VirtualMachineRelocateSpec, error) { var spec types.VirtualMachineRelocateSpec var morRP types.ManagedObjectReference var morDS types.ManagedObjectReferen...
Below is a recent interview with the Hungarian intelligence analyst László Földi, who has been featured in several videos here in the past. In this clip Mr. Földi and the presenter discuss the shadowy political forces that have generated the current “refugee crisis” in Europe for their own ends. In particular he addres...
def create_random_bytes( min_length: Optional[int] = None, max_length: Optional[int] = None, lower_case: bool = False ) -> bytes: if min_length is None: min_length = 0 if max_length is None: max_length = min_length + 1 * 2 length = random.randint(min_length, max_length) result = hexl...
/** * Returns a flattened JSON string. * * @return a flattened JSON string */ public String flatten() { flattenAsMap(); if (source.isObject() || isObjectifiableArray()) return flattenedMap.toString(printMode); else return javaObj2Json(flattenedMap.get(ROOT)); }
// class union advanced.union1(advanced.a) advanced.union1(advanced.b) // primative union advanced.union2(123) advanced.union2("foo")
I think it's safe to say that we as Cape Bretoners are not Hollywood types. As I walk down Charlotte Street on my way to work, past the parade of flannel and baseball caps, "glamorous" just isn't the word that comes to mind. Combined with a near obsessive compulsion to be ever-humble, the limelight does little more to ...
// Copyright 1998-2016 Epic Games, Inc. All Rights Reserved. #include "BlueprintCompilerCppBackendModulePrivatePCH.h" #include "BlueprintCompilerCppBackendUtils.h" #include "Editor/UnrealEd/Public/Kismet2/StructureEditorUtils.h" #include "Engine/InheritableComponentHandler.h" #include "Engine/DynamicBlueprintBinding.h...
Subsurface structure of St. Elmo submarine volcanic mound (Austin, Texas) and its volcanic conduits imaged using geophysical methods Geophysical survey techniques including electrical resistivity imaging and magnetics were utilized to study the late-Cretaceous submarine volcanic mound of St. Elmo railroad cut located ...
/** * pm_runtime_forbid - Block runtime PM of a device. * @dev: Device to handle. * * Increase the device's usage count and clear its power.runtime_auto flag, * so that it cannot be suspended at run time until pm_runtime_allow() is called * for it. */ void pm_runtime_forbid(struct device *dev) { spin_lock_irq(&...
/** * \brief Transforms an \ref error from a T gate. Converts an X error to a Y error * * \param[in] error The \ref error to transform */ void qc_T_transform_error(ERROR *error) { if (error->op == X) { error->op = Y; } }
<filename>ferrite-session/src/internal/session/choice/internal/utils/mod.rs mod receiver_to_selector; mod run_case_cont; mod unit_to_session; pub use receiver_to_selector::*; pub use run_case_cont::*; pub use unit_to_session::*;
/** * Determines if a location counts as in-city, and has passed the required wait * time since the city was founded. * * @param room_data *loc The location to check. * @param empire_data *emp The empire to check. * @param bool check_wait If TRUE, requires the city wait time to have passed. * @param bool *too_soon Will...
<gh_stars>1-10 // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2017 Western Digital Corporation or its affiliates. * * This file is released under the GPL. */ #include "dm-zoned.h" #include <linux/module.h> #include <linux/crc32.h> #include <linux/sched/mm.h> #define DM_MSG_PREFIX "zoned metadata" ...
// GetAccounts is part of idb.IndexerDB func (db *IndexerDb) GetAccounts(ctx context.Context, opts idb.AccountQueryOptions) (<-chan idb.AccountRow, uint64) { out := make(chan idb.AccountRow, 1) if opts.HasAssetID != 0 { opts.IncludeAssetHoldings = true } else if (opts.AssetGT != nil) || (opts.AssetLT != nil) { e...
def _compare_document(self, system, reference): num_f1_scores = 8 all_matched = np.zeros((num_f1_scores, len(system), len(reference))) annotation_labels = defaultdict(list) for i, system_annotation in enumerate(system): for j, reference_annotation in enumerate(reference): ...
/* * #%L * de.metas.elasticsearch.server * %% * Copyright (C) 2018 metas GmbH * %% * 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 the * License, or (at your option)...
Resolution and Prevention of Feline Immunodeficiency Virus-Induced Neurological Deficits by Treatment with the Protease Inhibitor TL-3 ABSTRACT In vivo tests were performed to assess the influence of the protease inhibitor TL-3 on feline immunodeficiency virus (FIV)-induced central nervous system (CNS) deficits. Twent...
# [Project Ku CES Noty-Service] Konkuk Univ. Class Empty Seat Notification Service for EE. # 0.1.0va, 19.12.27. First launched. # written by acoustikue(<NAME>) # __ _ __ # ____ __________ __ _______/ /_(_) /____ _____ # / __ `/ ___/ __ \/ / / / ___/ __/ / //_/ / / /...
import sys import time lineNo = 0 for line in sys.stdin: if lineNo == 0: arrCount = int(line) else: loe = line.strip(' ') lineNo = lineNo + 1 fp = 0 sp = -1 nloe = '' loe = list(loe[:len(loe) - 1]) rtimes = 0 rdels = 0 dindices = [i for i, x in en...
import * as React from "react" import { Link } from "gatsby" import SimpleSlider from "../slider/slider" import "./hero-slider.scss" const HeroSliderSettings = { responsive: [ { breakpoint: 1140, settings: { slidesToShow: 1, }, }, ], } const HeroSlider = ({ items, currentLocale }...
/** * This exception is produced when wrong password is entered by the user while confirming **/ public class SameNamePasswordException extends Exception { private static final long serialVersionUID = 1L; /** * constructor will set a new object of same name password exception * * @param Strin...
<filename>testsuite/tests/th/T7021.hs {-# LANGUAGE TemplateHaskell #-} module T7021 where import T7021a func :: a -> Int func = $(test)
// NextWorkerID increments the global variable // workerID by 1 and is protected by a mutex lock func NextWorkerID() int64 { mu.Lock() workerID = workerID + 1 defer mu.Unlock() return workerID }
/* * Store a copy of linkname associated with the DLPI handle. * Save errno before closing the dlpi handle so that the * correct error value is used if 'err' is a system error. */ void pr_errdlpi(dlpi_handle_t dh, const char *cmd, int err) { int save_errno = errno; char linkname[DLPI_LINKNAME_MAX]; (void) strlcp...
<filename>vm/actor/tests/common/mod.rs // Copyright 2020 ChainSafe Systems // SPDX-License-Identifier: Apache-2.0, MIT use actor::{ self, ACCOUNT_ACTOR_CODE_ID, CRON_ACTOR_CODE_ID, INIT_ACTOR_CODE_ID, MARKET_ACTOR_CODE_ID, MINER_ACTOR_CODE_ID, MULTISIG_ACTOR_CODE_ID, PAYCH_ACTOR_CODE_ID, POWER_ACTOR_CODE_ID, ...
<reponame>7coil/react-uwp<filename>src/styles/getAcrylicTextureStyle.ts import { isSupportBackdropFilter } from "../utils/browser/backdropFilterDetector"; export { isSupportBackdropFilter }; export interface AcrylicConfig { tintColor: string; blurSize: number; background?: string; } export function getAcrylicTexture...
/** * Statistics of object database size, aggregated by table names. Enabled with * {@link ReportType#DATABASE_TABLE_SIZE}. * <p> * Thread unsafe (assumes external synchronization) for concurrent updates of * the same object. * * @author mzawirski */ public class DatabaseSizeStats { public static final Str...
def sync_open_rooms(self, default_connector=None, filter_token=None): rooms = self.get_open_rooms() for room in rooms: if filter_token: if filter_token not in room.get("v", {}).get("token"): pass else: LiveChatRoom = app...
/// Adds the downloaded binary in Installer to a Windows PATH pub fn add_binary_to_path(installer: &Installer) -> Result<(), InstallerError> { let windows_path = get_windows_path_var()?; let bin_path = installer.get_bin_dir_path()?.to_string(); if let Some(old_path) = windows_path { if let Some(new_...
<filename>app/client/src/pages/CommitCreate.tsx<gh_stars>1-10 import React, { useState, Fragment } from 'react' import { useQuery, useLazyQuery, useMutation } from '@apollo/client' import { Link, Router, RouteComponentProps } from '@reach/router' import { Button, Form, Input } from 'antd' import * as queries from '../s...
<reponame>dozedoff/commonj<gh_stars>1-10 /* * The MIT License (MIT) * Copyright (c) 2022 <NAME> * http://opensource.org/licenses/MIT */ package com.github.dozedoff.commonj.io; import java.sql.Connection; import java.sql.SQLException; import com.j256.ormlite.support.ConnectionSource; /** * Interface...
<filename>main/svx/source/form/fmcontrollayout.cxx /************************************************************** * * 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 copyr...
// LoginHandler handles the login procedure. func LoginHandler(cont *gin.Context) { state := RandToken(32) session := sessions.Default(cont) session.Set("state", state) session.Save() scopes := strings.Join(confTemp.Scopes, " ") linkStr := string(confTemp.Endpoint.AuthURL + "?client_id=" + confTemp.ClientID + ...
/** * Entity Container Builder. */ public static final class Builder { private String name; private String namespace; private String baseEntityContainerName; private final Map<String, EntitySet> entitySetsBuilder = new LinkedHashMap<>(); private final Map<String, Single...
/// Finds in the name section all functions from specified banned modules and /// returns their names and indexes. fn find_banned_fns_idxs<'a>( module: &'a Module, banned_modules: &[&str], ) -> Result<HashMap<u32, &'a str>, Error> { use parity_wasm::elements::NameSection; // name section is actually Map...
/* Frees a block of memory that was successfully allocated by ** a prior call the vcms_alloc. ** ** The handle should be considered invalid upon return from this ** call. ** ** Whether any memory is actually freed up or not as the result of ** this call will depends on many factors, if all goes well it will ** be freed...
As we layered up for the New Hampshire winter, my friend and I were indulging in a popular pastime – comparing our gear. We both enjoy the outdoors and have spent our fair share of time working in forestry or on farms, so we share any tips we can get. Such as, TitleNine makes great sports bras. Oiselle has soft waistba...
def solve_partition_function(self, A, h, k): n = len(A) all_strings = self.__generate_strings(n, k) mx = -np.inf sm_list = [] for s in all_strings: sm = get_f(A, h, s) mx = max(mx, sm) sm_list.append(sm) sm_list = [elem - mx for ele...
Blood-membrane interaction: C3a, an indicator of biocompatibility. An interest in hemodialysis-related patient symptomatology dating back to the beginnings of maintenance hemodialysis (HD) therapy prompted our investigations to determine the etiology of such discomfort. Since the discovery by Craddock et al (1) of the...
Platinum is one of the costly metals used as catalysts in new technologies employed for industrial chemical processes, renewable energy sources, pollution control and many other purposes. In particular, it is used for fuel cells, devices that turn chemical energy directly into electrical energy, without combustion. Res...
/** * xml utils * * @author ispong * @since 0.0.1 */ @Slf4j public class XmlUtils { /** * parse inputSteam content * * @param inputStream inputStream * @param targetClass targetClass * @param <T> T * @return target * @since 0.0.1 */ public static <T extends ...
<reponame>Ventiv-Technology/DockerManager /** * Copyright (c) 2014 - 2015 Ventiv Technology * * 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...
package com.example.ronensabag.animationsandgestures.scrollDetector; import android.annotation.SuppressLint; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.widget.TextView; import com.example.ronensabag.a...
<filename>go/src/infra/tools/migrator/internal/plugsupport/repo.go // Copyright 2020 The LUCI Authors. All rights reserved. // Use of this source code is governed under the Apache License, Version 2.0 // that can be found in the LICENSE file. package plugsupport import ( "bufio" "bytes" "context" "fmt" "io" "io...
A comparative study of the effects of ketoconazole and fluconazole on 17-beta estradiol production by rat ovaries in vitro. In this study we have compared the effects of ketoconazole and fluconazole, a novel triazole antifungal agent, on 17-beta estradiol production in rat ovaries in vitro. For both compounds there wa...
/** * Call the graph resource, return user information * * @return Response with graph data */ @PreAuthorize("hasAuthority('SCOPE_Obo.Graph.Read')") @GetMapping("call-graph-with-repository") public String callGraphWithRepository() { Authentication principal = SecurityContextHolder.ge...
/*----------------------------------------------------------*/ /* */ /* LIBMESH V 7.0 */ /* */ /*----------------------------------------------------------*/ /* */ /* Description: handle .meshb file format I/O */ /* Author: <NAME> */ /* Creation date: dec...
/// Generates trait implementations for auxiliary traits for the account wrapper. /// /// # Note /// /// Auxiliary traits currently include: /// /// - `Clone`: To allow cloning contract references in the long run. /// - `Debug`: To better debug internal contract state. fn generate_auxiliary_trait_impls(&self) -> TokenS...
#include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> #include <string> #define pii pair<int, int> #define pb push_back #define f first #define s second typedef long long ll; const int MOD = 1e9 + 7; const int INF = 1e9 + 7; const int MAXN = 1e5 + 5; using namespace std; char str[MAXN]...
def layout_document(html, root_box, context, max_loops=8): initialize_page_maker(context, root_box) pages = [] original_footnotes = [] actual_total_pages = 0 for loop in range(max_loops): if loop > 0: PROGRESS_LOGGER.info( 'Step 5 - Creating layout - Repagination ...
import { TransformStream } from "isomorphic-streams"; /** * Filters chunks emitted by the stream using a predicate. * * @param predicate - The predicate which is applied on each chunk * @returns A `TransformStream` through which a `ReadableStream` can be piped */ export function filter<I>(predicate: (value: I) =>...
Tourism and Virtual Reality: a bibliometric analysis of scientific production from the Scopus database To identify the most developed terms in the field of Tourism and virtual reality, a quantitative analysis was developed in February 2020. This analysis was focused on seven hundred and eighty-four (784) publications ...
// node is basic unit of tree which will be responsible to hold data and two children class node { public: node * left; node *right; int data; }
# SPDX-License-Identifier: Apache-2.0 # To register converter for sparkml operators, import associated modules here. from . import bucketed_random_projection_lsh from . import aft_survival_regression from . import element_wise_product from . import min_hash_lsh from . import word2vec from . import index_to_string from...
<filename>generated/java/proto-google-common-protos/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponseOrBuilder.java // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/api/servicemanagement/v1/servicemanager.proto package com.google.api.servicemanagement.v1; publi...
// NextOrFailure calls next.ServeDNS when next is not nill, otherwise it will return, a ServerFailure // and a nil error. func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { if next != nil { if span := ot.SpanFromContext(ctx); span != nil { child :=...
/** * Restores the console threshold log level. Based on if {@code Class} or {@code Method} is annotated by * {@link ConsoleLogLevelThreshold}. * <p> * {@link #restoreConsoleLog()} * * @since 11.1 */ protected void restoreConsoleThresholdLogLevel(FeaturesRunner runner, FrameworkMethod...
/* * Copyright Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags and * the COPYRIGHT.txt file distributed with this work. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may ob...
/** * Apply the function. * @param args The function arguments including uri and rest config. * @param context Stellar context */ @Override public Object apply(List<Object> args, Context context) throws ParseException { String uriString = getArg(0, String.class, args); Map<String, Ob...
package com.wukong.concurrency.imooccache; /** * 描述: 线程池看缓存效果 */ public class ImoocCache11 { }
<reponame>owanturist/react-inner-store<gh_stars>0 import { useCallback } from "react" import { act, renderHook } from "@testing-library/react-hooks" import { Sweety, useWatchSweety } from "../../src" import { Counter, WithSpy, WithStore } from "../common" describe.each([ [ "without comparator", ({ store, sp...
package org.socraticgrid.hl7.services.uc.functional; import org.socraticgrid.hl7.services.uc.model.Message; public class SimpleMessageSumarizer { public String getMesageSummary(Message msg){ StringBuffer buf = new StringBuffer(); buf.append(msg.getHeader().getMessageType().name()); buf.append(" message"); r...
A, B, T = map(int, input().split()) for x in range(1, 21): if (x*A < T+0.5) & ((x+1)*A > T+0.5): print(B*x) break elif x*A > T+0.5: print(0) break
First terrestrial discovery of an extremely rare mineral called ringwoodite confirms theory about huge water ‘reservoirs’ 410 to 660 km beneath the surface of our planet, says a team of researchers led by Prof Graham Pearson from the University of Alberta, Canada. Ringwoodite is a form of the mineral peridot, believed...
Welcome to the “HERE WE ARE: The History of Experimental Cinema” Project! What would a history of experimental/avant-garde cinema look like in which we *solely* explore the contributions of women, non-binary, trans and genderqueer filmmakers? Who would you want to see included in such a compendium? (Recent history inc...
<filename>apps/app/ui-tests-app/list-view/main-view-model.ts import { Observable } from "tns-core-modules/data/observable"; import { ObservableArray } from "tns-core-modules/data/observable-array"; export class Item extends Observable { private _name: string; private _id: number; private _age: number; constru...
/** * Diff for missing/deleted resources. */ private void diffViewForMissingAndRemoved() { URL lastCommitedFileURL = null; try { lastCommitedFileURL = GitRevisionURLHandler.encodeURL( VersionIdentifier.INDEX_OR_LAST_COMMIT, file.getFileLocation()); } catch (MalformedURLException e1) { if...
Long may this continue: here we are, heading into Christmas, and the 20 men who started the season as Barclays Premier League managers all retain their jobs. If it was down to me, they would all still be in their roles on May 24 next year, when the campaign reaches its conclusion. I’d certainly back a rule being brou...
<reponame>DreamTeamGDL/SmartGL import IPoint from "./interfaces/IPoint"; import IBufferSettings from "./interfaces/IBufferSettings"; import {mat4} from "gl-matrix"; export default class GLVector implements Iterable<IPoint> { public readonly size: number; public readonly program: WebGLProgram; private re...
/** * * @author vincent * @author walker * */ public class Shielded implements ShieldedInterface{ private double myTotalShieldHealth; private double myCurrentShieldHealth; private double myTotalTime; private double myTimeRemaining; public Shielded(){ myTotalShieldHealth=0.0; ...
import random print('주사위를 굴립니다') com = random.randint(1, 6) user = random.randint(1, 6) print('컴퓨터의 주사위 눈은 ' + str(com) + '입니다') print('당신의 주사위 눈은 ' + str(user) + '입니다')
// AsSha256OfOrderedMap hash function // My tests showed this is unnecessary because apparently, the order of the key is the same // if the content of the row is the same. So, two rows could have different field order, but // it should be always the same for the specific row func AsSha256OfOrderedMap(o map[string]inter...
<reponame>silloi/yuutsu-records /** * @file Vuex内で共通して使う型、インターフェース */ import { Store as CounterStore } from '@/store/counter' export type RootStore = CounterStore export type BaseAxiosAction = { key?: symbol } export type AxiosAction<T, P = {}> = BaseAxiosAction & (T extends void ? {} : { data: T }) & P
/** * A simple state-machine for parsing CSV records. * * The parser starts in this state. */ static void state_normal (struct CSV_context *ctx) { if (ctx->c_in == ctx->delimiter) { ctx->state = STATE_STOP; return; } switch (ctx->c_in) { case -1: ctx->state = STATE_EOF; break...
package com.symantec.cpe.analytics; import io.dropwizard.Configuration; import javax.validation.Valid; public class KafkaMonitorConfiguration extends Configuration { @Valid private String zookeeperUrls = "localhost:2181"; @Valid private int refreshSeconds = 60; @Valid private String statsD...
/** * Returns true if the message corresponding to this messageSeq and epoch is complete, returns false otherwise. */ public boolean isFragmentedMessageComplete(Integer messageSeq, Integer epoch) { FragmentKey key = new FragmentKey(messageSeq, epoch); FragmentCollector collector = fragments.ge...
<filename>marklogic-junit5/src/test/java/com/marklogic/junit5/spring/XmlNodeTest.java package com.marklogic.junit5.spring; import com.marklogic.client.io.StringHandle; import com.marklogic.junit5.MarkLogicNamespaceProvider; import com.marklogic.junit5.NamespaceProvider; import com.marklogic.junit5.XmlNode; import org....
import torch from torch.nn import functional as F from torch.nn.modules import loss class DistributionLoss(loss._Loss): def forward(self, model_output, real_output): self.size_average = True # Target is ignored at training time. Loss is defined as KL divergence # between the model outpu...
MIPSers: MIPS extension release 6 simulator MIPSers is a simulator based on the current Release 6 version of Microprocessor without Interlocked Pipeline Stages (MIPS). Currently, there are no existing MIPS simulators that support MIPS Release 6. Hence, MIPSers is the only simulator that can demonstrate the major chang...
/* * Copyright (c) 2015 EMC Corporation * All Rights Reserved */ package com.emc.storageos.api.service.impl.resource; import static com.emc.storageos.api.mapper.ComputeMapper.map; import static com.emc.storageos.api.mapper.DbObjectMapper.toNamedRelatedResource; import java.net.URI; import java.util.Arrays; import ...
<reponame>jbalmant/auth<filename>auth/models/__init__.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- from auth.app import db from datetime import datetime class BaseModel (db.Model): __abstract__ = True created_dt = db.Column(db.DateTime, default=datetime.utcnow, nullable=False) updated_dt ...
// Upload fileUrl to Google Photos by Cloud Upload plug-in private void cloudUpload(String fileUrl){ int lastIndex = fileUrl.lastIndexOf('/'); String dirAndFileName = fileUrl.substring(fileUrl.lastIndexOf('/', lastIndex-1) + 1); String filePath = "/storage/emulated/0/DCIM/"+dirAndFileName; LOGGER.d("cl...
package s3_test import ( "io/ioutil" "log" "os" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "github.com/ctrox/csi-s3/pkg/s3" "github.com/kubernetes-csi/csi-test/pkg/sanity" ) var _ = Describe("S3Driver", func() { mntDir, _ := ioutil.TempDir("", "mnt") stagingDir, _ := ioutil.TempDir("", "staging"...
<gh_stars>0 package rabbitmq import "github.com/kozgot/go-log-processing/postprocessor/pkg/models" // MessageProducer encapsulates methods used to publish data for ES uploader service. type MessageProducer interface { PublishEvent(event models.SmcEvent) PublishConsumption(cons models.ConsumtionValue) Connect() Cl...
// The virtual machine scale set extension profile. func (o VirtualMachineScaleSetVMProfileOutput) ExtensionProfile() VirtualMachineScaleSetExtensionProfilePtrOutput { return o.ApplyT(func(v VirtualMachineScaleSetVMProfile) *VirtualMachineScaleSetExtensionProfile { return v.ExtensionProfile }).(VirtualMachineScaleS...
/** * Create a new thread, starting with execution of lf_thread * getting passed arguments. The new handle is stored in thread. * * @return 0 on success, 1 otherwise. */ int lf_thread_create(_lf_thread_t* thread, void *(*lf_thread) (void *), void* arguments) { uintptr_t handle = _beginthread((windows_thread)l...