content
stringlengths
10
4.9M
def _get_disable_pod_identity(self, enable_validation: bool = False) -> bool: disable_pod_identity = self.raw_param.get("disable_pod_identity") if enable_validation: if self.decorator_mode == DecoratorMode.UPDATE: if disable_pod_identity and self._get_enable_pod_identity(enab...
import * as assert from 'assert'; import Editor from '../Editor'; suite('Editor.ts Tests', function() { test('Create a new Editor instance and expect it to return the file name and line number it was created with', function() { const editor = new Editor(10, 'src/testFile.js'); assert.strictEqual(ed...
Improved Environmental Status: 50 Years of Declining Fish Mercury Levels in Boreal and Subarctic Fennoscandia. Temporally (1965-2015) and spatially (55°-70°N) extensive records of total mercury (Hg) in freshwater fish showed consistent declines in boreal and subarctic Fennoscandia. The database contains 54 560 fish en...
<filename>internal/scan/minikubectl.go<gh_stars>10-100 /* Copyright 2021 GramLabs, 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 requir...
package org.intermine.objectstore.intermine; /* * Copyright (C) 2002-2017 FlyMine * * This code may be freely distributed and modified under the * terms of the GNU Lesser General Public Licence. This should * be distributed with the code. See the LICENSE file for more * information or http://www.gnu.org/copyle...
/** * @author Dmitry Krasilschikov */ public class DomainClassNode extends ClassNode { public DomainClassNode(@NotNull final Module module, @NotNull final GrTypeDefinition typeDefinition, @Nullable final ViewSettings viewSettings) { super(module, typeDefinition,...
class Utils: # expand text template from keys-values in a run def template(run, text): kv = run.keys_values() for k,v in kv.items(): text = text.replace('${}'.format(k), v) return text
// SetIndex sets the item in a collection for the given key, using the // '__newindex' metamethod if appropriate. SetIndex always consumes CPU if it // doesn't return an error. func SetIndex(t *Thread, coll Value, idx Value, val Value) error { if idx.IsNil() { return errors.New("index is nil") } for i := 0; i < m...
/** * Create a 2D array the same size as the map with the costs of moving to * each tile * An abyss tile obviously has the highest cost and the cost decreases * exponentially as we move farther from the edge * */ private void genMapCostsMask() { genProxMask(); evaluateProxMask(); }
<filename>server/src/database/migration/1588246416803-removeOldColumns.ts import { MigrationInterface, QueryRunner } from 'typeorm'; export class removeOldColumns1588246416803 implements MigrationInterface { name = 'removeOldColumns1588246416803'; public async up(queryRunner: QueryRunner): Promise<any> { awai...
/** * Image * @author Eduardo Fonseca Velasques - @eduveks */ public class Image implements Component { private Proteu proteu = null; private Script script = null; private Values parameters = new Values(); private String type = ""; private String description = ""; private String style = ""; ...
Nuclear Capsid Uncoating and Reverse Transcription of HIV-1. After cell entry, human immunodeficiency virus type 1 (HIV-1) replication involves reverse transcription of the RNA genome, nuclear import of the subviral complex without nuclear envelope breakdown, and integration of the viral complementary DNA into the hos...
The Use of Exergames in Motor Education Processes for School-Aged Children: A Systematic Review and Epistemic Diagnosis This study aimed to diagnose the current state of knowledge about the use of exergames in the motor education processes of school-aged children. We conducted a systematic review following the PRISMA ...
<reponame>robertdstein/flarestack import numpy as np from astropy import units as u from astropy.coordinates import Distance import os import logging from flarestack.shared import catalogue_dir from flarestack.utils.prepare_catalogue import cat_dtype from flarestack.cosmo.neutrino_cosmology import ( define_cosmolog...
<filename>Development/nmos/id.cpp #include "nmos/id.h" #include <boost/uuid/name_generator.hpp> #include <boost/uuid/random_generator.hpp> #include <boost/uuid/string_generator.hpp> #include <boost/uuid/uuid_io.hpp> #include "cpprest/basic_utils.h" namespace nmos { struct id_generator::impl_t { boost:...
use tract_hir::internal::*; use tract_ndarray::prelude::*; #[derive(Debug, Clone, new, Default, Educe)] #[educe(Hash)] pub struct Lrn { #[educe(Hash(method = "hash_f32"))] pub alpha: f32, #[educe(Hash(method = "hash_f32"))] pub beta: f32, #[educe(Hash(method = "hash_f32"))] pub bias: f32, p...
/** * Test case for the CertificateSamplerCustomPublisher. * * This is a unit test and does not require EJBCA to be running. * * @version $Id: CertificateSamplerCustomPublisherUnitTest.java 22121 2015-10-29 13:49:30Z mikekushner $ */ public class CertificateSamplerCustomPublisherUnitTest { private static fi...
Gender and Media Gender and media have been topics of academic interest for over half a century.Media production, content, and consumption have each given rise to vibrant fields of scholarly research on how to understand themin relation to gender. Specific epistemological and ontological viewpoints on understanding...
package com.manywho.services.sql.services; import com.healthmarketscience.sqlbuilder.*; import com.manywho.sdk.api.run.elements.type.ListFilter; import com.manywho.sdk.api.run.elements.type.MObject; import com.manywho.sdk.api.run.elements.type.ObjectDataType; import com.manywho.sdk.api.run.elements.type.Property; impo...
def crates_vendor_deps_targets(): native.config_setting( name = "linux_amd64", constraint_values = ["@platforms//os:linux", "@platforms//cpu:x86_64"], visibility = ["//visibility:public"], ) native.config_setting( name = "linux_arm64", constraint_values = ["@platforms...
In indigenous communities like Nuyoó, where almost every family has members who have migrated for work, low-cost phone calls are seen as an essential service Until this month, Celia Pérez could only afford a brief weekly call to her husband, Rubén Martínez, who left left their remote rural community in Mexico two year...
<filename>src/main/java/pinacolada/powers/common/ImpairedPower.java package pinacolada.powers.common; import com.megacrit.cardcrawl.core.AbstractCreature; import com.megacrit.cardcrawl.orbs.AbstractOrb; import pinacolada.interfaces.subscribers.OnOrbApplyFocusSubscriber; import pinacolada.powers.PCLCombatStats; import ...
Vermaelen made just 14 Premier League appearances last season Arsenal have agreed a fee of about £15m with Barcelona for the sale of captain Thomas Vermaelen. The 28-year-old Belgium centre-back must now agree personal terms with the Catalan giants and pass a medical. Vermaelen was a target for Manchester United but...
def amorphous_carbon(cls): return cls._namespace_SIO('SIO_010791')
/** * The type Dfa 19. */ class DFA19 extends DFA { /** * Instantiates a new Dfa 19. * * @param recognizer the recognizer */ public DFA19(BaseRecognizer recognizer) { this.recognizer = recognizer; this.decisionNumber = 19; this.eot = DFA19_eot; this.eof = DFA19...
def unnormalized_G(branch_lengths, i, j): return (branch_lengths*logical_and(i, logical_not(j))).sum()/\ branch_lengths.sum()
import './style/index.less'; import Tabs from 'yoshino/lib/Tabs'; export default Tabs
def floyd_warshall_predecessor_and_distance(self): dist, pred = self.floyd_warshall_initialization() shared_d = mp.sharedctypes.RawArray(ctypes.c_double, dist.shape[0]**2) dist_shared = np.frombuffer(shared_d, 'float64').reshape(dist.shape) dist_shared[:] = dist shared_p = mp.sha...
Polarized Raman Scattering from Small Single Crystals Polarized Raman scattering from single crystals can provide definitive evidence for assigning symmetry species to vibrational modes. Unfortunately, reflection from crystal faces and surface imperfections scrambles the polarization of the scattered radiation. Reflec...
<reponame>sbardian/portfolio import React from "react" // eslint-disable-next-line import { render } from "@testing-library/react" import Article from "./article" const ArticleData: React.FC = () => ( <div> <h1>Mock Article</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmo...
// Looks up if the origin matches one of the patterns // provided in Options.AllowOrigins patterns. func (o *Options) IsOriginAllowed(origin string) (allowed bool) { for _, pattern := range o.AllowOrigins { allowed, _ = regexp.MatchString(pattern, origin) if allowed { return } } return }
<filename>src/main/java/svenhjol/charm/mixin/core/OverrideBundleTooltipGridsizeMixin.java package svenhjol.charm.mixin.core; import net.minecraft.client.gui.screens.inventory.tooltip.ClientBundleTooltip; import net.minecraft.world.inventory.tooltip.BundleTooltip; import org.spongepowered.asm.mixin.Mixin; import org.sp...
<filename>src/components/layout/index.tsx import React, { FunctionComponent } from 'react' import { Github } from '../icons' type Props = { children: React.ReactElement } export const Layout: FunctionComponent<Props> = ({ children }) => { return ( <> <div className='flex justify-center fixed right-0 lef...
/** * Enable or disable the SmsReceiver as appropriate. Pre-KLP we use this receiver for * receiving incoming SMS messages. For KLP+ this receiver is not used when running as the * primary user and the SmsDeliverReceiver is used for receiving incoming SMS messages. * When running as a secondary user...
<reponame>gangadhar-kadam/sapphite_lib # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes import msgprint, _ from webnotes.utils import flt, cint, cstr from webnotes.model.meta import get_field_precision error_co...
MG has flagged big changes to its Australian operations following an almost non-existent opening 12 months of local trading, believed to stem from setbacks in gaining compliance to sell cars. The ambitious Chinese brand says it sold “fewer than 50 vehicles” since being introduced to the Australian market last year, so...
import math def count(a, b, P): if abs(a-b) > 2: return 0 if a == b: return 0 m = (a+b)/2 c = m + (m-a)*(math.sqrt(1-abs(m-a)**2))*1j/abs(m-a) cnt = 0 for x in P: if abs(x-c) <=1.0001: cnt += 1 return cnt while True: N = int(input()) if N == 0: ...
NVIDIA will host a conference call on Thursday, Feb. 9 at 2 p.m. PT (5 p.m. ET) to discuss its financial results for the fourth quarter and fiscal year 2017, ending Jan. 29, 2017. The call will be webcast live (in listen-only mode) at the following websites: www.nvidia.com and www.streetevents.com. The company's prepa...
Effects of a Post-Shock Injection of the Kappa Opioid Receptor Antagonist Norbinaltorphimine (norBNI) on Fear and Anxiety in Rats Exposure of rats to footshocks leads to an enduring behavioral state involving generalized fear responses and avoidance. Recent evidence suggests that the expression of negative emotional b...
/** * should detect people around the robot */ private void findHumansAround() { Log.i(TAG, "findHumansAround"); Future<List<Human>> humansAroundFuture = humanAwareness.async().getHumansAround(); humansAroundFuture.andThenConsume(humansAround -> { Log.i(TAG, humansAround.si...
def load_audio_in_ref_paths(cls, metadata_path): metadata_filepath = os.path.join(metadata_path, cls._AUDIO_IN_REF_FILENAME) with open(metadata_filepath) as f: audio_in_filepath = f.readline().strip() audio_ref_filepath = f.readline().strip() return audio_in_filepath, audio_ref_filepath
//SwitchToState implements github.com/insolar/insolar/pulsar.StateSwitcher interface func (m *StateSwitcherMock) SwitchToState(p context.Context, p1 State, p2 interface{}) { atomic.AddUint64(&m.SwitchToStatePreCounter, 1) defer atomic.AddUint64(&m.SwitchToStateCounter, 1) if m.SwitchToStateMock.mockExpectations != n...
/* * ======== OPT3001_open ======== * Setups OPT3001 sensor and returns OPT3001_Handle */ OPT3001_Handle OPT3001_open(unsigned int index, I2C_Handle i2cHandle, OPT3001_Params *params) { OPT3001_Handle handle = &OPT3001_config[index]; OPT3001_Object *obj = (OPT3001_Object*)(OPT3001_config[index].obj...
UV and temperature effects on chloroacetanilide and triazine herbicides degradation and cytotoxicity The purpose of this study was to explore the stability and toxicity of the herbicides and their degradation byproduct after exposure to different environmental factors. Triazines (atrazine, propazine, simazine) and chl...
import random from sqds.models import Unit, PlayerUnitGear, Gear, Skill from sqds_seed.factories import CategoryFactory, GearFactory, UnitFactory, GuildFactory, \ PlayerFactory, PlayerUnitFactory, ZetaFactory, ModFactory def random_sublist(lst, probability=0.5): """ Returns an iterator that includes each...
/** * Increment our version and place ourself in the cache. */ public synchronized void processSessionRepl() { if (log.isTraceEnabled()) { log.trace("processSessionRepl(): session is dirty. Will increment " + "version from: " + getVersion() + " and replicate."); ...
/* * Copyright 2018, Decawave Limited, All Rights Reserved * * 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 u...
/** * Register is the basic unit of ASM form. Each assignment targets a new, unique register. * Use the factory method {@link #ofType(Supplier)} to obtain instances of this class. */ public final class Register implements ExprNode { private final String name; private final Supplier<StaticType> type; private Regi...
package com.google.android.gms.internal.ads; import android.view.View; public final class tz implements b10 { private aa0 a; public tz(aa0 aa0) { this.a = aa0; } @Override // com.google.android.gms.internal.ads.b10 public final boolean a() { return this.a == null; } @Ove...
package org.greenplum.pxf.plugins.hive; import org.apache.hadoop.hive.serde.serdeConstants; import org.greenplum.pxf.api.filter.ColumnIndexOperandNode; import org.greenplum.pxf.api.filter.Node; import org.greenplum.pxf.api.filter.Operator; import org.greenplum.pxf.api.filter.OperatorNode; import org.greenplum.pxf.api....
def parse_object_array(hf, heap, reader): del hf objid = reader.id() strace = reader.u4() length = reader.u4() clsid = reader.id() elems = tuple(reader.id() for ix in range(length)) heap._deferred_objarrays.append((objid, strace, clsid, elems))
// Returns the length of the given scan record array. We have to calculate this // based on the maximum possible data length and the TLV data. See TODO above // |kScanRecordLength|. size_t GetScanRecordLength(uint8_t* bytes) { for (size_t i = 0, field_len = 0; i < kScanRecordLength; i += (field_len + 1)) { ...
import { cold } from "jest-marbles"; import { runEffect, withEffect } from "../../util/testing"; import { MetamaskStore } from "./metamask.store"; import { MetamaskQuery } from "./metamask.query"; let store: MetamaskStore; let query: MetamaskQuery; beforeEach(() => { store = new MetamaskStore({}); query = new Met...
<filename>src/main/java/net/optifine/config/GlVersion.java package net.optifine.config; public class GlVersion { private int major; private int minor; private int release; private String suffix; public GlVersion(int major, int minor) { this(major, minor, 0); } public GlVersion...
/// <summary> /// Disables and removes the scene analysis effect, and unregisters the event handler for the SceneAnalyzed event of the effect /// </summary> /// <returns></returns> task<void> MainPage::CleanSceneAnalysisEffectAsync() { _sceneAnalysisEffect->HighDynamicRangeAnalyzer->Enabled = false; _sceneA...
def collect_protocol_samples(self, n_protocol_samples, protocol_length, marginal="configuration"): W_shads_F, W_shads_R = [], [] xv_F, xv_R = [], [] for _ in tqdm(range(n_protocol_samples)): x_0 = self.sample_x_from_equilibrium() v_0 = self.sample_v_given_x(x_0) ...
// init initializes the command line flags. func init() { core.Flags.Var(&flags.pretty, "pretty", "[-pretty]", "Produce output in human readable format") var def string if flags.rotate.interval == 0 { def = " (default do not rotate)" } else if flags.rotate.interval < time.Second { flags.rotate.interval = time.S...
import { ImageLoadState } from 'office-ui-fabric-react'; import { IPersonaCoinProps, IPersonaCoinViewProps } from './PersonaCoin.types'; import { BaseState } from '../../utilities/BaseState'; export type IPersonaCoinState = Pick<IPersonaCoinViewProps, 'isPictureLoaded' | 'onPhotoLoadingStateChange'>; export class Per...
n1 = int(input()) n = [int(0) for i in range(10)] st = input() for i in range(len(st)): if st[i] == 'L': for j in range(len(n)): if n[j] is 0: n[j] = 1 break elif st[i] is 'R': for j in reversed(range(len(n))): if n[j] is ...
Nonlinear absorption in dielectric metamaterials We solve the nonlinear Maxwell equations in an InP-based dielectric metamaterial, considering both two-photon absorption and photo-induced free-carrier absorption. We obtain the intensity-dependent reflection, absorption, and effective permittivity and permeability of t...
#ifndef GMAIL_UTILS_HPP_ #define GMAIL_UTILS_HPP_ #include <string> // Utilities for GmailArchiver namespace GmailArchiver { namespace Utils { namespace Crypto { void encrypt ( std::string& str ) noexcept; void decrypt ( std::string& str ) noexcept; } // Crypto // Utils functions bool openBrowser( const ...
package com.xinran.qxviewslib.customview; import android.content.Context; import android.text.Editable; import android.text.TextWatcher; import android.util.AttributeSet; import android.view.View; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import com.xinran.qx...
/********************************************************************** * Description: only used by transport layer. set ack waiting information. * Input: handle,sequence number * Return: none **********************************************************************/ static void transport_set...
/** * Attempts to add a callback for a resource. * * @param uri the {@link android.net.Uri} of the resource for which a callback is * desired. * @param callback the callback to register. * @return {@code true} if the callback is guaranteed to be invoked with * a n...
import { css } from 'styled-components'; import { SuomifiTheme } from '../../../../theme'; import { font } from '../../../../theme/reset'; export const baseStyles = (theme: SuomifiTheme) => css` &.fi-select-item-list { ${font(theme)('bodyText')} list-style-type: none; box-sizing: content-box; max-hei...
// CleanupPod cleans up a pod that was started with the container deployer. func CleanupPod(ctx context.Context, hostClient client.Client, pod *corev1.Pod, keepPod bool) error { controllerutil.RemoveFinalizer(pod, container.ContainerDeployerFinalizer) if err := hostClient.Update(ctx, pod); err != nil { err = fmt.Er...
package main import ( "log" "os" "path/filepath" "github.com/hsmtkk/azure-blob-upload/upload" "github.com/spf13/cobra" "go.uber.org/zap" ) var command = &cobra.Command{ Use: "azure-blob-upload srcDirectory container", Run: run, Args: cobra.ExactArgs(2), } func init() { } func main()...
/** * Dex entry data access object * * @author Eduardo Naveda * @since 0.0.1 */ public class DexEntry extends Access { public static enum Version { XY(24); // Todo add all versions private Integer version; private Version(Integer version) { this.version = version; ...
/** * Invoke the method with the provided signature (name and parameter types) * on the given Java {@link Object}. * * @param target target {@link Object} whose method we are invoking * @param methodName method name to invoke * @param parameters parameters passed to the method call ...
s = raw_input() st = 0 en = 0 ans = [['.' for _ in xrange(13)] for _ in xrange(2)] for i in xrange(ord('A'),ord('Z')+1): c = chr(i) st = s.find(c) en = s.find(c,st+1) if en != -1: break if st+1 == en: print "Impossible" else: l = (en-st) l += (l%2) ss = 13-...
Will there be no more cakes and ale? Sir Toby Belch, Twelfth Night (Act II, Scene 3) We’d be willing to bet that most of us have over indulged on the Christmas goodies at one time or another, and for those in the past this was just as true. In this post we look at a traditional cure for bloating and discomfort caused ...
Calotropis procera Latex Extract Affords Protection against Inflammation and Oxidative Stress in Freund's Complete Adjuvant-Induced Monoarthritis in Rats In view of the well-established anti-inflammatory properties of latex of Calotropis procera (DL), the present study was carried out to evaluate the protective effect...
<gh_stars>1-10 import { useLocalStorage, useWebStorage } from "../../src"; import { nextTick } from "../utils"; import { promisedTimeout } from "../../src/utils"; describe("localStorage", () => { const setItemSpy = jest.spyOn(Storage.prototype, "setItem"); const consoleWarnSpy = jest.spyOn(console, "warn"); bef...
def _install_widevine_arm(self): root_cmds = ['mount', 'umount', 'losetup', 'modprobe'] cos_config = self._chromeos_config() device = [x for x in cos_config if config.CHROMEOS_ARM_HWID in x['hwidmatch']][0] required_diskspace = int(device['filesize']) + int(device['zipfilesize']) ...
/** * @author Vyacheslav Rusakov * @since 30.12.2021 */ public class ContextAccess implements BeforeAllCallback, BeforeEachCallback { @Override public void beforeAll(ExtensionContext context) throws Exception { // class context ActionHolder.add("class.id: " + context.getUniqueId()); ...
def login(self, username=None, password=None, auth=AuthMethod.SESSION): self.__username = username if username else self.__username self.__password = password if password else self.__password if auth == AuthMethod.BASIC: auth_key = base64.b64encode(('%s:%s' % (self.__username, \ ...
// findByPath find and returns VM by Inventory Path func findByPath(ctx context.Context, client *vim25.Client, dcName, path string) (*object.VirtualMachine, error) { f := find.NewFinder(client, true) dc, err := f.DatacenterOrDefault(ctx, dcName) if err != nil { return nil, err } f.SetDatacenter(dc) return f.Vir...
import { DateTime } from 'luxon'; import { RRule } from '@mackgevanni/rrule-es6'; const rule = RRule.fromString( "DTSTART;TZID=America/Denver:20181101T190000;\n" + "RRULE:FREQ=WEEKLY;BYDAY=MO,WE,TH;INTERVAL=1;COUNT=3" ); const rule_all = rule.all();; const date = new Date(); const date_utc_date = date.getUTCDate()...
def generate_function_name(self, function_type, variable, arr_index): variable_spec_regex = r'@.*?::(?P<namescope>.*?::.*?)::(' \ r'?P<variable>.*?)::(?P<index>.*)' variable_match = re.match(variable_spec_regex, variable) if variable_match: namespace_sco...
/* * Copyright 2019 <NAME> (github.com/mP1) * * 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 o...
// Copyright (c) 2017 <NAME> // MIT License, see LICENSE file for full terms. import { Message } from '@phosphor/messaging'; import { Widget } from '@phosphor/widgets'; import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { style } from 'typestyle'; import { AppContainer } from './react-hot-l...
<reponame>matu3ba/cports pkgname = "libthai" pkgver = "0.1.28" pkgrel = 0 build_style = "gnu_configure" make_cmd = "gmake" make_install_args = ["-j1"] hostmakedepends = ["gmake", "pkgconf"] makedepends = ["libdatrie-devel"] pkgdesc = "Thai language support routines" maintainer = "q66 <<EMAIL>>" license = "LGPL-2.1-or-l...
#include <QTest> #include "loginactiontest.h" #include "asteriskmanager.h" #include "packettransport.h" #include "packettransportmock.h" #include "loginaction.h" LoginActionTest::LoginActionTest(QObject *parent) : QObject(parent) { } void LoginActionTest::testLoginMessageSent() { AsteriskManager *asteriskManager...
// handleError handles a raw yaml decoder.Decode error, filters it, // and return the resulting error. func (p yamlParser) handleError(err error) error { var typeError *yaml.TypeError if !errors.As(err, &typeError) { return err } filtered := &yaml.TypeError{} for _, msg := range typeError.Errors { if p.isCusto...
package repository import ( "github.com/Tanibox/tania-core/src/user/domain" "github.com/Tanibox/tania-core/src/user/storage" uuid "github.com/satori/go.uuid" ) // RepositoryResult is a struct to wrap repository result // so its easy to use it in channel type RepositoryResult struct { Result interface{} Error er...
N, M = map(int, input().split()) A = list(map(int, input().split())) def votenum(A): m = 0 for i in range(0, len(A)): m = m + A[i] return m #上位番目 Mlast = sorted(A)[-M] S = Mlast / votenum(A) if S < 0.25 / M: print('No') else: print('Yes')
<filename>src/dynamo/handlers/MongoDbHandler.java<gh_stars>1-10 package dynamo.handlers; import com.google.gson.Gson; import com.mongodb.async.client.MongoClient; import com.mongodb.async.client.MongoClients; import com.mongodb.async.client.MongoCollection; import com.mongodb.async.client.MongoDatabase; import dynamo....
def _svd(self, points1: torch.Tensor, points2: torch.Tensor ) -> torch.Tensor: b, _, c = points1.shape points1 = torch.transpose(points1, -2, -1) points2 = torch.transpose(points2, -2, -1) centroid1 = points1.mean(dim=-1, keepdims=True) centroid2 = points1.mea...
<gh_stars>1-10 // Copyright © 2011-2018 <NAME> <<EMAIL>> package goryachev.common.util; import java.util.Arrays; import java.util.Collection; public class CStringList extends CList<String> { public CStringList(int initialCapacity) { super(initialCapacity); } public CStringList() { super()...
def forward(self, x): if self.name == "noconcat": return [x[0][0].squeeze(), x[1].squeeze(), x[2].squeeze(), x[3][0].squeeze(), x[4]] if self.name == "image": return torch.cat([x[0][0].squeeze(), x[1][0].squeeze(), x[2]], 1) if self.name == "simple": return to...
/** * @see ClaimDataDAO * * @author Derek Hulley * @since 1.3 */ @RunWith(JUnit4.class) public class ClaimDataDAOTest { private final static String COLLECTION_BM_CLAIM_DAO_TEST = "BenchmarkClaimDAOTest"; public final static String[] CLAIM_IDS = new String[] {"A-123", "B-234", "C-345", "D-45...
import styled from "styled-components"; function TabletBlob(props: any) { return ( <svg viewBox="0 0 960 540" xmlns="http://www.w3.org/2000/svg" xmlnsXlink="http://www.w3.org/1999/xlink" version="1.1" {...props} > <g transform="translate(960, 0)"> <path d...
// // DynamicLayoutCollectionViewController.h // CATCalendarProvider // // Created by wit on 15/2/19. // Copyright (c) 2015年 cat. All rights reserved. // #import <UIKit/UIKit.h> @interface DynamicLayoutCollectionViewController : UICollectionViewController @end
/// Add an interval to the store. pub fn add(&mut self, start: T, end: T) { let mut new_interval = Interval { start, end }; let mut first_match = None; let mut i = 0; while i != self.intervals.len() { let interval = self.intervals[i]; if first_match.is_none() && i...
<reponame>EmmaNguyen/feature_adversarial_with_topology_signatures import matplotlib.pyplot as plt def save_encoded_sample(data, targets, epoch, vis_path="../data/", figsize=(10,10)): plt.figure(figsize=figsize) plt.scatter(data[:, 0], -data[:, 1], c=(10 * targets), cmap=plt.cm.Spectral) plt.xlim([-1.5, 1.5...
import { AxiosPromise } from '../types/response' import { AxiosRequestConfig } from '../types/request' import { processURL } from '../helpers/url' import { processRequestData } from '../helpers/data' import { processHeaders } from '../helpers/headers' import xhr from '../xhr' /** * 发送请求前处理请求配置 * @param config 请求配置 ...
/** * @author byte * * Represents the paddle. */ public class Paddle { private Point2D.Double _position; private int _pixelWidth; private int _pixelHeight; private Rectangle2D.Double _collisionRectangle; private PlayField _parentPlayField; /** * @param parentPlayFiel...
/** * Created by rezkyatinnov on 09/08/2017. */ public class AlertUtils { public static void showDialogDualActions(Context context, String title, String message, String positive, String negative, DialogInterface.OnClickListener positiveCallback, DialogInterface.OnClickListener negativeCallback) { AlertDia...
module Main where import Haste import Haste.DOM import Haste.Events import ProcNum main = withElems ["pv","ty","r","result"] calculator calculator [pv,ty,r,result] = do onEvent pv KeyUp $ \_ -> recalculate onEvent ty KeyUp $ \_ -> recalculate onEvent r Change $ \_ -> recalculate where recalculate...
/** * @author Antonio Rabelo * * @param <R> Result Type * @param <T> Entity Type */ public abstract class AbstractCriteriaSnippetDecorator<R, T> implements CriteriaSnippet<R, T> { /** * CriteriaSnippet to be decorated. */ protected final CriteriaSnippet<R, T> snippetToBeDecorated; /** * Constructor. ...