content
stringlengths
10
4.9M
/** * Register a bot in the api that will receive updates using webhook method * @param bot Bot to register */ public void registerBot(WebhookBot bot) throws TelegramApiRequestException { if (useWebhook) { webhook.registerWebhook(bot); bot.setWebhook(externalUrl + bot.getB...
<reponame>logicalclocks/hdfs-1 // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.25.0 // protoc (unknown) // source: datatransfer.proto package hadoop_hdfs import ( hadoop_common "github.com/colinmarc/hdfs/v2/internal/protocol/hadoop_common" proto "github.com/golang/protobuf...
def merge_label(df, label1, label2, merged_label): df.loc[(df['project_short_name'] == label1) | (df['project_short_name'] == label2), 'project_short_name'] = merged_label return df
#include "calc.h" inline bool isDigit(char c) { return c >= '0' && c <= '9'; } inline int64_t toDigit(char c) { return c - '0'; } bool Calculator::convert(const char *s) { for (const char *p = s; *p != '\0';) { while ((*p) == ' ') p++; //operand section //unary mu...
Mosquito Species (Diptera: Culicidae) Diversity from Ovitraps in a Mesoamerican Tropical Rainforest. Mosquito sampling using efficient traps that can assess species diversity and/or presence of dominant vectors is important for understanding the entomological risk of mosquito-borne disease transmission. Here, we prese...
<gh_stars>0 /* ============================================================ DataTypes Contains declarations for all the custom data types, enums defines, and constants used throughout the game ===========================================================*/ #pragma once #include <string> // DEFINES // Assets folder #...
Russell Street Report Lombardi's Way Ravens Predictions For The 2014 Season Biggest Surprise: To say that the position of cornerback is thin for the Baltimore Ravens is about as insightful as saying ESPN slobbers over Johnny Manziel. Starters Jimmy Smith and Lardarius Webb have struggled to stay healthy and Chykie Bro...
<reponame>Danny-Ngg/go-swan-provider<filename>service/common.go package service import ( "fmt" "strings" "swan-provider/common/constants" "swan-provider/config" "time" "github.com/filswan/go-swan-lib/client" libconstants "github.com/filswan/go-swan-lib/constants" "github.com/filswan/go-swan-lib/logs" libmode...
def selectLayer(self, index): if index > len(self.layers) or index < 0: raise ValueError("Index out of bounds") self.currentLayer = index
/// Directly read the pin each time this is called bool Pin_sensor::is_active() { if(HIGH == digitalRead(pin_)) { return true; } else { return false; } }
/** * An {@link Expression} representing the Java {@code length} keyword. */ public class ArrayLength implements Expression { private final Expression array; /** * Instatiates a new {@code length} {@link Expression} node for the abstract syntax tree, * representing the Java {@code length} keyword. ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { string s; cin>>s; int k; int arr[26]; int n=s.size(); cin>>k; for(int i=0;i<26;i++) cin>>arr[i]; int a; ll sum=0; for(int i=0;i<s.size();i++){ a=int(s[i])-96; ...
package main import ( "fmt" "runtime" ) func query() int { ch := make(chan int) for i := 0; i < 1000; i++ { go func() {ch <- 0}() } return <- ch } func main() { for i := 0; i < 4; i++ { query() fmt.Printf("goroutines: %d\n", runtime.NumGoroutine()) } } // goroutines: 1001 // goroutines: 2000 // gorouti...
I teach and research in the areas of property, land use, real estate and local government law at the University of Maine School of Law, so a number of my friends in Portland have been asking me how I’m planning to vote on the parks referendum June 10. Although everyone who knows me knows how much I love parks and open...
# -*- coding: utf-8 -*- # --------------------------------------------------------------------- # Vendor: Zhone # OS: Bitstorm # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # -----------------------------------------------...
// LoadSite - load the complete site func LoadSite(cfg *models.Config) (*models.Site, error) { initAPI := utils.NewStopwatchLevel("api", logging.NOTICE) itemIndex := make(models.ItemIndex) config, err := LoadConfig(cfg) if err != nil { return nil, err } toggles, err := LoadFeatureToggles(cfg) if err != nil { ...
// Autogenerated from CppHeaderCreator on 7/27/2020 3:09:52 PM // Created by Sc2ad // ========================================================================= #pragma once #pragma pack(push, 8) // Begin includes #include "utils/typedefs.h" // Including type: System.ValueType #include "System/ValueType.hpp" #include "u...
/** * Data accessor holding XML documents. * <p> * </p> * @author Philippe Riand */ public abstract class XmlArrayBlockAccessor extends RestDataBlockAccessor { private static final long serialVersionUID = 1L; public static class XmlBlock extends Block { private static final long serialVer...
def merge(self, values, lists_only=False): def _get_converted_list(dict_key, func): v = values.get(dict_key) if v: return func(v) return None def _merge_first(current, update_list): if not update_list: return new...
package db import ( "context" "database/sql" "database/sql/driver" "fmt" "io" "strings" "testing" "testing/iotest" "time" ) var testDriver *MockDriver const ( testDriverName = "mockDB" testDatabaseURL = "postgres://username:password@host:port/db_name" ) func init() { testDriver = new(MockDriver) sql.R...
<gh_stars>1-10 #include "drake/geometry/proximity/hydroelastic_callback.h" #include <memory> #include <unordered_map> #include <utility> #include <vector> #include <fcl/fcl.h> #include <gtest/gtest.h> #include "drake/common/test_utilities/expect_no_throw.h" #include "drake/common/test_utilities/expect_throws_message...
/// Set the [`StencilOp`] to do when both the depth test and stencil test pass: pub fn on_depth_stencil_pass(self, op: StencilOp) -> Self { Self { depth_stencil_pass: op, ..self } }
KISSIMMEE, Fla. — Fantasy football players take note: Tyreek Hill could average as many as 70 snaps a game as a wide receiver and returner in 2017. So says the coach of Kansas City’s rookie sensation. MORE: SN's 2016 All-Pro team “He was averaging 35 plays a game (in 2016),” Andy Reid told co-host Kirk Morrison and ...
// class stores time in 24 hour format always. // Depending upon query, takes inout or outputs time wither in 12/24 hour format. class time_time{ private: int hour, min, sec; void time_rationalise(void){ while(min >= 60){ hour += 1; min -= 60; } while( hour >= 24) hour -= 24; } int validate_input( b...
Image: Anastasia Yendiki and Viviana Siless/MGH/Harvard University Advertisement Seven years ago, the U.S. National Institutes of Health (NIH) decided to map all the connections in the brain. In 2010, the Human Connectome Project (HCP) was born. It has provided funding to the tune of $40 million to two collaborating ...
/** * Event to fire the processes in charge the revocation of Flex Offer (DSO side). */ public class FlexOfferRevocationEvent { private final FlexOfferRevocation flexOfferRevocation; /** * Default constructor. * * @param flexOfferRevocationMessage received message from the aggregator. *...
Determination of a number of indicators of “Venocoryl” ointment Aim. To determine a number of parameters of a new medicine – 5 % “Venocoryl” ointment with the dense extract from common hazel leaves. Materials and methods. The object of our study was 7 batches of “Venocoryl” ointment developed in the laboratory conditi...
<reponame>thelouiselawrence/goscan package enum import ( "fmt" "github.com/thelouiselawrence/goscan/goscan/core/utils" "strings" ) func (s *EnumScan) EnumSSH() { for _, port := range s.Target.GetPorts(utils.Config.DB) { // Enumerate only if port is open if port.Status == "open" { // Dispatch the correct sc...
Mick Davis, Michael Lewis and Poju Zabludowicz named in Cabinet report, with over £140,000 channelled through Pargav Update 25 October 2011 - International Resources Group (IRG), a Washington based company owned by L-3 Communications, have asked us to make clear that they have not funded Pargav and we accept this. On ...
// Queues a third column with a single highlighted line fn queue_oneline_column( w: &mut StdoutLock, left_x: u16, right_x: u16, column_bot_y: u16, message: &str, ) -> crossterm::Result<()> { let mut curr_y = 1; // 1 is the starting y for columns let col_width = right_x - left_x + 1; queu...
def select_sdr_by_sensor_type(self, sensor_type): sensor_type = find_sdr_sensor_type(sensor_type) self._selected_sdr = self._find_sdr_by_sensor_type(sensor_type)
#!/usr/bin/env python3 # created : 2020. 12. 31. 23:59 import os from sys import stdin, stdout def getTp(w): m = len(w) tp = [0 for i in range(m)] j = 0 for i in range(1,m): while j > 0 and w[i] != w[j]: j = tp[j-1] if w[i] == w[j]: j += 1 tp[i] = ...
<gh_stars>0 package com.yahoo.r4hu7.moviesdoughnut.ui.dependency.adapter; import android.databinding.DataBindingUtil; import android.databinding.ObservableList; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.ViewGroup; ...
Now that the iPhone 5s and iOS 7 have been jailbroken for a while, tweak developers have had some time to evaluate the current state of iOS and find some great ways to improve on the existing features. Below you’ll find a bunch of great iOS 7-ready tweaks for your newly-jailbroken iOS 7 devices. Most of them are free,...
<reponame>axonepro/sdk-ooti import requests import json from .helper import Helper class Customfields(Helper): def __init__(self, base_url, org_pk, teams_pk, access_token, _csrf_token, headers, pagination): super().__init__(base_url, org_pk, teams_pk, access_token, _csrf_token, headers, pagination) ...
package org.patientview.api.controller; import org.patientview.api.config.ExcludeFromApiDoc; import org.patientview.api.model.FhirDiagnosticReport; import org.patientview.api.service.ApiDiagnosticService; import org.patientview.config.exception.ResourceNotFoundException; import org.patientview.config.exception.FhirRes...
import { Injectable } from '@angular/core'; import { NzModalService } from 'ng-zorro-antd/modal'; import { TranslateService } from '@ngx-translate/core'; import { SettingsPopupComponent } from './settings-popup/settings-popup.component'; @Injectable() export class SettingsPopupService { constructor(private dialog: N...
<filename>shuttermint/app/checktx.go package app import ( "github.com/ethereum/go-ethereum/common" "shielder/shuttermint/shmsg" ) // MaxTxsPerBlock is the maximum number of txs by a single sender per block. const MaxTxsPerBlock = 10 // NewCheckTxState returns a new check tx state. func NewCheckTxState() *CheckTxS...
Identifying Melanoma Images using EfficientNet Ensemble: Winning Solution to the SIIM-ISIC Melanoma Classification Challenge We present our winning solution to the SIIM-ISIC Melanoma Classification Challenge. It is an ensemble of convolutions neural network (CNN) models with different backbones and input sizes, most o...
Characterisation of G-protein-coupled receptors by antibodies. G-protein-coupled receptors constitute a superfamily of integral membrane proteins encompassing hundreds of receptors for all types of chemical messengers, as well as, for example, the key molecules of our light and smell sensory systems, bioactive amines,...
Regarding the Sperm whale's head as a solid oblong, you may, on an inclined plane, sideways divide it into two quoins, whereof the lower is the bony structure, forming the cranium and jaws, and the upper an unctuous mass wholly free from bones; its broad forward end forming the expanded vertical apparent forehead of th...
The report makes 29 recommendations to improve embassy security. | REUTERS Benghazi report: Systematic failures An independent panel charged with investigating the deadly Sept. 11 attack in Libya that killed a U.S. ambassador and three other Americans has concluded that systematic management failures at the State Depa...
package li.l1t.sic.service; import li.l1t.sic.exception.QuoteNotFoundException; import li.l1t.sic.model.Person; import li.l1t.sic.model.Quote; import li.l1t.sic.model.repo.QuoteRepository; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import java.security.Principal; i...
def _object_count_threshold(img, thresh_stepsize=2, thresh_lower=4.0, verbose=False): thresholds = np.arange(1, 255, thresh_stepsize) counts = np.zeros_like(thresholds) for index,threshold in enumerate(thresholds): if index == len(thresholds)-1: raise Exce...
def forbid(self, rule): self._addRule(False, rule)
<filename>database.go /* * @Author: 周家建 * @Mail: <EMAIL> * @Date: 2021-07-27 19:02:39 * @Description: */ package main import ( "strings" "database/sql" _ "github.com/go-sql-driver/mysql" _ "github.com/mattn/go-sqlite3" ) func instanceDB(str string) (*sql.DB, error) { sp:= strings.Split(str, "://") if len...
/* * $Id$ * * Copyright (c) 2011 Surfnet * Copyright (c) 2011 .SE (The Internet Infrastructure Foundation). * Copyright (c) 2011 OpenDNSSEC AB (svb) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition...
def encode(self, x): feat_map = self.backbone(x) feat_vec = self.adaptive_avg_pool_2d(feat_map).squeeze().unsqueeze(0) y = self(x) return torch.cat(tensors=(feat_vec, y), dim=1).squeeze()
def addElementToPlug(self, plug): data = plug.asMDataHandle() arrayData = om.MArrayDataHandle(data) builder = arrayData.builder() builder.addLastArray() arrayData.set(builder) plug.setMDataHandle(data) return plug.elementByPhysicalIndex(plug.numElements() - 1)
Sidekiq is a popular job framework for Ruby. Now we're bringing it to Crystal! Why Crystal? I wanted to use a language that was a good complement to Ruby. Its syntax is similar enough to Ruby that I can reuse a lot of code but it adds a huge leap in performance. In summary: very similiar syntax to Ruby at least 3-5...
def parse_json_response(*, response: Response, expression: str) -> Dict[str, Any]: data = response.json() if not expression.startswith('$'): if expression and not expression.startswith('.'): expression = f"$.{expression}" else: expression = f"${expression}" return { ...
def _add_source(self) -> None: filename = self.config_path() if os.path.isfile(filename): self.add(ConfigSource(load_yaml(filename) or {}, filename))
#include <cstdio> #include <cstring> #include <queue> #include <algorithm> using namespace std; const int maxn = 23; const int maxm = 11; const int dir[][2] = {{0, 1}, {1, 0}, {-1, 0}, {0, -1}}; struct State { int x, y, l, u, r, d, w; State (int x = 0, int y = 0, int l = 0, int u = 0, int r = 0, int d = 0): x(x), y...
/** The service implementation used to host all multiprocess test client code. */ public class MultiprocessTestClientService extends ChildProcessService { public MultiprocessTestClientService() { super(new MultiprocessTestClientServiceDelegate()); } }
import React, { useState } from 'react'; import { defaultMapProps, generateMarkers, susolvkaCoords, } from '../examples-utils'; import Map, { bindResizeListener, getMapBounds, Marker } from '../src'; const apiIsLoaded = (map, maps, places) => { // Get bounds by our places const bounds = getMapBounds(map, map...
/** * Created by hengwang on 2017-05-28. * * Given a singly linked list, determine if it is a palindrome. * * Follow up: * Could you do it in O(n) time and O(1) space? * */ public class PalindromeLinkedList { /** * 1. Copy the original linked list * 2. Reverse the original one * 3. Compare the two ...
We have highlighted the shocking revelation of how neo-Nazis have been elected onto Slovakia’s Parliament and which we highlighted through our sister site, Religious Reader. Below is a video of Milan Mazurek (aged 22) and who can be seen in the green shirt in the video shouting abuse to Muslims in Slovakia. He has bee...
def refine(arr, n): assert(type(n) is int) s = np.shape(arr) dim = len(s) assert(dim==1 or dim==2) if dim==2: px, py = np.where(np.ones_like(arr)) data = arr[px, py] w = (n*px, n*py) grid_x, grid_y = np.mgrid[:n*(s[0]-1)+1,:n*(s[1]-1)+1] return griddata(w, data, (grid_x, grid_y), method='linear') if dim...
<reponame>Zzoay/YaoNLP import torch from torch.utils.data import DataLoader, Dataset, random_split from torch.utils.data._utils import collate import torch.nn.utils.rnn as rnn_utils import os from typing import List, Callable, Optional, Any, Union, Tuple from abc import ABCMeta, abstractmethod class Vocab(): de...
/* * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
<filename>src/Environment.ts<gh_stars>0 import type { ChipmunkSymbol, ChipmunkType } from "./types.ts"; class Environment { private data: Map<string, ChipmunkType> = new Map(); public constructor( public readonly outerEnv?: Environment, bindSymbols: ChipmunkSymbol[] = [], bindExpressions: ChipmunkType...
def block_tables(self, ltable, rtable, l_overlap_attr, r_overlap_attr, rem_stop_words=False, q_val=None, word_level=True, overlap_size=1, l_output_attrs=None, r_output_attrs=None, l_output_prefix='ltable_', r_output_prefix='rtable_', ...
<reponame>drupol/dura use dura::{config::Config, snapshots}; use std::env; mod util; #[macro_use] extern crate serial_test; #[test] fn change_single_file() { let tmp = tempfile::tempdir().unwrap(); let mut repo = util::git_repo::GitRepo::new(tmp.path().to_path_buf()); repo.init(); repo.write_file("f...
// *** WARNING: this file was generated by the Pulumi SDK Generator. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "../../utilities"; // Export members: export * from "./addon"; export * from "./bandwidthSched...
<reponame>Intergiro/service-ch3d2 export interface DeviceRenderOptions { sdkInterface?: "01" | "02" | "03" sdkUiType?: ("01" | "02" | "03" | "04" | "05")[] } export namespace DeviceRenderOptions { export function is(value: DeviceRenderOptions | any): value is DeviceRenderOptions { return ( typeof value == "obj...
/**....................................................................... * Try to match a single character ch with a [] regexp character list. * Return 1 on success, 0 on failure. Normally *was_error is returned * as 0, but if there is a regexp syntax error it is returned as 1. * The regexp can be formed of any a...
<reponame>ceekay1991/AliPayForDebug // // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by <NAME>. // #import <UIKit/UIView.h> @class NSMutableArray; @interface LifeFollowActivityServiceTagView : UIView { ...
// (c) 1997-2000 Monolith Productions, Inc. All Rights Reserved #ifndef __AI_HUMAN_H__ #define __AI_HUMAN_H__ #include "AI.h" #include "AIHumanState.h" #include "AIHumanReactions.h" #include "AINudge.h" #include "AIBrain.h" class CAIHuman : public CAI { public : // Public methods // Ctors/Dtors/etc CAIHuman(...
def inputs(eval_data, data_dir, batch_size, shuffle=False): if eval_data == 'train': num_files = len(glob.glob(os.path.join(data_dir, 'train*/*.tfrecords'))) filenames = [os.path.join(data_dir, 'train-clean-100/train_' + str(i) + '.tfrecords') for i in range(1, num_files + 1)] ...
The CCTV footage of the Florida movie theater shooting involving a former Florida police officer who shot a man dead was released after a court hearing Friday. Retired Tampa Police Cpt. Curtis Reeves, 71, fatally shot Chad Oulsen, 43, during a screening of the movie “Lone Survivor” after an argument over texting broke...
<gh_stars>0 /** * Created by consultadd on 26/7/16. */ import {Component, OnInit} from "angular2/core"; @Component({ selector: 'my-component', template: ` Hi I'm <span [style.color]="inputElement.value==='yes' ? 'blue': ''">{{name}}</span> and this is my first angular2 component! and <br> <span [cla...
On minimizers of an isoperimetric problem with long-range interactions under a convexity constraint We study a variational problem modeling the behavior at equilibrium of charged liquid drops under convexity constraint. After proving well-posedness of the model, we show C 1,1-regularity of minimizers for the Coulombic...
Dental caries prevalence among adults in Denmark--the impact of socio-demographic factors and use of oral health services. OBJECTIVES To measure the prevalence of dental caries in the Danish adult population and to analyse how the risk of dental caries is affected by age, gender, region, area, and socio-economic facto...
<gh_stars>1-10 /* Copyright (C) 1997-2001 Id Software, Inc. 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) any later version. This program is di...
RIO DE JANEIRO, Brazil — Well, that was that. Brazilians had been hungry to host another World Cup final in Rio's historic Maracanã stadium since 1950, and although in the end things didn't go to plan on the pitch, many have praised the country's enthusiasm, hospitality and what turned out to be a dramatic and unforge...
/** * \brief Sets the SDADC window mode. * * Sets the SDADC window mode to a given mode and value range. * * \param[in] module_inst Pointer to the SDADC software instance struct * \param[in] window_mode Window monitor mode to set * \param[in] window_lower_value Lower window monitor threshold val...
export interface CartItem { id: string; quantity: number; unitAmount: number; totalAmount: number; discount: number; isGift: boolean; }
package com.rbkmoney.orgmanager.config; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.ObjectMapper; import com.rbkmoney.orgmanager.controller.converter.InvitationStatusConverter; import org.openapitools.jackson.nullable.JsonNullableModule; import org.springframework.beans.f...
from ropgenerator.semantic.Engine import combine_increments s = combine_increments([7,3,2,1],4) print(s)
// When an internal otion "-cmc" is present, compile the input as a CM program. static bool TranslateBuildCM(const STB_TranslateInputArgs* pInputArgs, STB_TranslateOutputArgs* pOutputArgs, TB_DATA_FORMAT inputDataFormatTemp, const IGC::CPlatform& IGCPlatform, float profilingTimerResolution) { cmc::C...
/** * identify entitylocator, qualitymodifier and/or relationalquality (the last is based on restricted relation list) from this relation * the process may also generate EQ such as xyz:absent from "without" phrases * * @param root of the description * @param relationstrings, each with a format of "fromid rel...
<filename>src/main/java/com/storycraft/core/combat/DamageHologram.java package com.storycraft.core.combat; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import com.storycraft.StoryMiniPlugin; import com.storycraft.server.event.server.ServerUpdateEvent; import com.storycraft.server.even...
package io.github.mrshoenel.stateMachines.transition.simplePoker; import io.github.mrshoenel.stateMachines.state.BaseState; public class BetRoundValidateState extends BaseState { public BetRoundValidateState() { super(BetRoundValidateState.class.getSimpleName()); } }
/* read one frame from the framebuffer assuming it was captured using a uncompressed transfer */ static void mchip_cont_read_frame(u32 v, u8 *buf, int size) { int pt_id; pt_id = (v >> 17) & 0x3FF; ptable_copy(buf, pt_id, size, MCHIP_NB_PAGES); }
/* * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 * (the "License"). You may not use this work except in compliance with the License, which is * available at www.apache.org/licenses/LICENSE-2.0 * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDI...
// ExtractSecrets will loop through al those damn interfaces func (vaultClient *API) ExtractSecrets(input util.SecretJSON) (secrets.Result, error) { var result = make(secrets.Result) var currentPrefix = config.Config.Prefix var currentUpperCase = config.Config.UpperCase for _, a := range input.Secrets { if fmt.Sp...
/* * shared.cpp * * This file is part of the QtSixA, the Sixaxis Joystick Manager * Copyright 2008-2011 <NAME> <<EMAIL>> * * QtSixA can be redistributed and/or modified under the terms of the GNU General * Public License (Version 2), as published by the Free Software Foundation. * A copy of the license is inclu...
// SELinux labels of the container func (o ServiceTaskSpecContainerSpecPrivilegesOutput) SeLinuxContext() ServiceTaskSpecContainerSpecPrivilegesSeLinuxContextPtrOutput { return o.ApplyT(func(v ServiceTaskSpecContainerSpecPrivileges) *ServiceTaskSpecContainerSpecPrivilegesSeLinuxContext { return v.SeLinuxContext })....
import {DeepPartial} from "entity/common"; import {ModuleGetter} from "modules"; import {ModuleNames} from "modules/names"; import {ReturnModule} from "react-coat"; type ExcludeNull<T> = {[K in keyof T]-?: T[K] extends null ? never : K}[keyof T]; export function defineModuleGetter<T extends {[moduleName in ModuleName...
def each_index(matrix: NDArray) -> CartesianIndex: for i in range(matrix.shape[0]): for j in range(matrix.shape[1]): yield (i, j)
// Connect to the given MQTT server(s) func (t *thing) Connect(ctx context.Context, servers ...string) error { if t.IsConnected() { return nil } if t.options.ID == nil || t.options.Credentials == nil { return ErrConfigurationError } if t.options.AuthTokenExpiration == 0 { t.options.AuthTokenExpiration = Defa...
from __future__ import print_function import numpy as np import h5py import matplotlib.pyplot as plt from sklearn import preprocessing from PIL import Image def normalizing_samples_L2(samples): # normalizing the features #samples_norm = np.linalg.norm(samples, axis=1) #samples_L2 = np.divide(samples,sample...
<gh_stars>0 import { Atom, Desc, EventStream, EventStreamSeed, isAtom, ObservableSeed, Property, PropertySeed } from "./abstractions"; import { LensedAtom } from "./atom"; import * as L from "./lens"; import { map } from "./map"; import { rename, toString } from "./util"; import { Function1, Function2, Function3, Func...
/* * All rights reserved. (C) Copyright 2009, Trinity College Dublin */ package com.mind_era.knime.common.view.impl; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.Set; impo...
/* Implementation of "Group 23", test 5 from CTS_EXT_geometry_shader. Description follows: * * 5. Make sure writing up to GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT atomic * counter buffers from within a geometry shader works correctly. * * Category: API. * * Create a program object. Define a boiler...
Dual band metamaterial-structured antenna with coplanar waveguides and radial feed stub A new dual-band metamaterial antenna is proposed and presented in this paper. The antenna comprises 2D-metamaterial patch array with coplanar waveguide (CPW) embedded in each patch. CPWs are used to shift the negative 2nd-order res...
package builder import ( "bufio" "bytes" "context" "io" "os" . "gopkg.in/check.v1" btypes "github.com/box-builder/box/types" "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/pkg/term" ) func runBuilder(script string) (*Builder, error) { b, err := NewBu...
// Eval implements activity.Activity.Eval func (a *MyActivity) Eval(context activity.Context) (done string, err error) { sourceFile = context.GetInput(ivSourceFile).(string) log.Debugf("[FlogoFileRead]: %s", sourceFile) data, err := ioutil.ReadFile(sourceFile) context.SetOutput(ovResult, string(data)) return strin...
Microtubule disassembly increases endothelial cell barrier dysfunction: role of MLC phosphorylation. Endothelial cell (EC) barrier regulation is critically dependent on cytoskeletal components (microfilaments and microtubules). Because several edemagenic agents induce actomyosin-driven EC contraction tightly linked to...
/** * Converts an avro schema into hudi type. * * @param schema a avro schema. * @param visited track the visit node when do traversal for avro schema; used to check if the name of avro record schema is correct. * @param firstVisitRoot track whether the current visited schema node is a root node. * @p...