content
stringlengths
10
4.9M
// NewWebhook creates the state needed for a webhook func NewWebhook(key []byte, events chan interface{}) Webhook { return Webhook{ key, events, } }
/* * Preallocate log files beyond the specified log endpoint. * * XXX this is currently extremely conservative, since it forces only one * future log segment to exist, and even that only if we are 75% done with * the current one. This is only appropriate for very low-WAL-volume systems. * High-volume systems wil...
/** * UGENE - Integrated Bioinformatics Tools. * Copyright (C) 2008-2012 UniPro <<EMAIL>> * http://ugene.unipro.ru * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of...
# Lint as: python3 # # Copyright 2020 The XLS Authors # # 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...
//led toggle macros #define LED1_ON SET_BIT(PORTB, 3) #define LED1_OFF CLEAR_BIT(PORTB, 3) #define LED0_ON SET_BIT(PORTB, 2) #define LED0_OFF CLEAR_BIT(PORTB, 2) #define LEDBOTH_OFF CLEAR_BIT(PORTB, 2); CLEAR_BIT(PORTB, 3) // set backlight (0 = max, 1023 = min). Taken from adc_pwm_backlight.c from topic 11 voi...
<gh_stars>0 import {Component, OnInit} from '@angular/core'; import {ActivatedRoute} from '@angular/router'; import {ShowDetailsParams} from '../../app-routing.module'; import {TvMazeService} from '../tv-maze.service'; import {ShowDetails} from '../tv.models'; @Component({ selector: 'app-show-details', templateUrl...
/* * VmbusChannelSetEvent - Trigger an event notification on the specified * channel. */ static void VmbusChannelSetEvent(struct vmbus_channel *Channel) { struct hv_monitor_page *monitorPage; DPRINT_ENTER(VMBUS); if (Channel->OfferMsg.MonitorAllocated) { set_bit(Channel->OfferMsg.ChildRelId & 31, (unsigned l...
package br.com.sprintters.prettystyle.dao; import java.sql.ResultSet; import java.util.ArrayList; import java.sql.Connection; import java.sql.SQLException; import br.com.sprintters.prettystyle.model.Item; import br.com.sprintters.prettystyle.model.Mark; import br.com.sprintters.prettystyle.model.Product; import br.co...
<filename>runtimeconfig/unit_tests/test_client.py<gh_stars>0 # Copyright 2016 Google 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 # ...
/* Multisteps: a program to get optime Runge-Kutta and multi-steps methods. Copyright 2011-2019, <NAME>. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright no...
import java.util.*; public class Main { public static void main(String [] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); Node [] G = new Node[n]; for(int i=0;i<n;i++){ int id = sc.nextInt(); int k = sc.nextInt(); int child[] = n...
import os import time from keylime import keylime_logging from keylime.da.record import BaseRecordManagement, base_build_key_list # setup logging logger = keylime_logging.init_logging("durable_attestation_persistent_store") # ###################################################### # Durable Attestation record manager...
. A total of 128 adrenalectomies were made for catechol-producing tumor (n = 69), mineralocorticism (n = 27), primary and metastatic adrenal cancer (n = 20), other tumors (n = 12). A stable hypotensive result after adrenalectomy was observed in 97.1, 66.8% patients with pheochromocytoma and mineralocorticism, respecti...
from .abi_types import * from .address_types import * from .binary_types import * from .block_types import * from .config_types import * from .external_types import * from .network_types import * from .number_types import * from .rpc_types import * from .storage_types import *
/** * Created by Aspsine on 2015/9/7. */ public abstract class BaseLoopPagerAdapter extends PagerAdapter implements ViewPager.OnPageChangeListener, View.OnTouchListener, Runnable { private static final int DEFAULT_DELAY_MILLIS = 5000; private final ViewPager mViewPager; private final Handler mHandler; ...
import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') # # NOTE: Do this here, instead of settings, because if you do it from settings # it loads settings and causes a subtle settings import loop. # from django.template.base import add_to_builtins # Add template tags to all templates for {%...
// ConfigSaveContext saves a context to disk func (cm *ConfigManager) ConfigSaveContext(c *Context) error { configInfo, err := cm.configrw.ConfigLoad() if err != nil { return err } if len(c.AuthInfo) != 0 { if _, ok := configInfo.AuthInfos[c.AuthInfo]; !ok { return fmt.Errorf("Credentials %s do not exist", c...
// Matrix downsamples a matrix. func Matrix(matrix [][]float64, maxDimension int) [][]float64 { treshold := defineThreshold(maxDimension) scale := calculateScale(matrix, treshold) return downsample(matrix, scale) }
FRIDAY EVENING UPDATE: Claudette Moore was found safe. No other information was immediately released. === She had just watched her son graduate from OSU, and had holiday plans with her family. But this Christmas she's nowhere to be found. Family of 44-year-old Claudette "Cookie" Moore are desperate for answers this...
// Assert functions, if indicator is false then call the apropriate print error function, then exit the program void error_assert(bool indicator, const std::string &message) { if(!indicator) { print_error(message); std::exit(1); } }
P.A.M.E.L.A set to come out on February 2017 P.A.M.E.L.A is set in a former Utopia that has collapsed due to a horrific disease NVYVE Studios announced in an update on steam that they have pushed the release of P.A.M.E.L.A from Fall 2016 back to February 2017. The change in schedule comes as the team buys itself more...
<reponame>allisonrandal/pcc_testing<filename>src/nci_test.c /* Copyright (C) 2001-2007, Parrot Foundation. $Id$ =head1 NAME src/nci_test.c - shared library used for testing the Native Call Interface =head1 DESCRIPTION From this code a shared library can be compiled and linked with a command like: cc -shared -fp...
// MarshalJSON is used to create a JSON representation of this known fingerprint func (k KnownFingerprint) MarshalJSON() ([]byte, error) { return json.Marshal(struct { UserID string FingerprintHex string Untrusted bool }{ UserID: k.UserID, FingerprintHex: hex.EncodeToString(k.Fingerprin...
// a helper function that can pause the VM until you press any key in the console. (nice for debugging sometimes.) public void waitOnAnyKey() { System.out.println("Press the any key..."); try { System.in.read(); } catch (IOException e) { e.printStackTrace(); } }
import { css } from '@emotion/css'; export const containerCx = css` position: relative; display: none; `;
// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2017-present Datadog, Inc. // +build kubeapiserver package custommetrics import ( "context" "fmt...
/** * Method used to first check if the company has the right to post new internship offer and then add the offer * to the DB. * * @param companyId company id. * @param internship internship to add. * @return > 0 if ok (id of internship), 0 if the company can't post, -1 otherwise. *...
Oh, my God! I really like this movie! And I never ever thought that I’m going to say this – but this year’s TIFF is definitely full of surprises! As usual, I have a feeling that I have to write something spectacular about some movie. But this time, I don’t give a shit if you’re going to pay attention to this title, or...
/// Extract the function name from this section fn name(&self) -> String { self.0 .children() .nth(0) .unwrap() .text() .trim() .to_lowercase() .split_whitespace() .collect::<Vec<_>>() .join("_") }
CTV Vancouver The victim of a scam involving the payment system of the new Compass Cards is warning other commuters to be cautious. Arbab Mehrab, who sells hotdogs outside the Commercial-Broadway SkyTrain Station, purchased a Compass Card from a stranger who said he was leaving town and could no longer use it. The s...
/*! * @file DFRobot_BMP3XX.h * @brief Define infrastructure of DFRobot_BMP3XX class * @details This is a pressure and temperature sensor that can be controlled via IIC and SPI. * @n BMP(390L/388) has temperature compensation, data oversampling, IIR filter, binary sampling and other functions * @n These functi...
def from_dictionary(cls, dictionary): if dictionary is None: return None error = cohesity_management_sdk.models.request_error.RequestError.from_dictionary(dictionary.get('error')) if dictionary.get('error') else None is_instant_recovery_finished = dictionary.g...
from __future__ import absolute_import import numpy as np from numpy.testing import assert_allclose from nose.tools import assert_equal, assert_true import pycircstat from pycircstat import event_series as es def test_vector_strength_spectrum(): T = 3 # 2s sampling_rate = 10000. firing_rate = 10 # 10...
/* * Allocate a new open/delegation state counter. This is needed for * pNFS for proper return on close semantics. * * Note that we only allocate it for pNFS-enabled exports, otherwise * all pointers to struct nfs4_clnt_odstate are always NULL. */ static struct nfs4_clnt_odstate * alloc_clnt_odstate(struct nfs4_c...
#pragma once #include "il2cpp.h" Dpr_MsgWindow_MsgWindowParam_o* Dpr_Battle_View_BtlvUtility__MakeMsgWindowParam (Dpr_Message_MessageTextParseDataModel_o* pStrBuf, const MethodInfo* method_info); Dpr_Message_MessageTextParseDataModel_o* Dpr_Battle_View_BtlvUtility__BTLV_STRPARAM_to_StrBuf (Dpr_Battle_Logic_BTLV_STRPA...
package main import ( "sort" "testing" ) func TestBurrowsWheeler(t *testing.T) { for k, v := range map[string]string{ "oooooooo$ ffffffff ffffffffuuuuuuuuaaaaaaaallllllllbbBbbBBb": "Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo$", "edarddddddddddntensr$ ehhhh...
import sys LI=lambda:list(map(int, sys.stdin.readline().split())) MI=lambda:map(int, sys.stdin.readline().split()) SI=lambda:sys.stdin.readline().strip('\n') II=lambda:int(sys.stdin.readline()) def fnd1(s, e): global arr, k l, r=0, k-1 ret=-1 while l<=r: m=(l+r)//2 if arr[m]>=s: ...
/// Returns the number of the correct plural form /// for `n` objects, as defined by the rule contained in this resolver. pub fn resolve(&self, n: u64) -> usize { match *self { Expr(ref ast) => ast.resolve(n), Function(ref f) => f(n), } }
/* * Copyright 2020 the original author or authors. * <p> * 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 * <p> * https://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by...
<reponame>stm107/CS1632_Spring2019<filename>sample_code/performance_testing/Laboon.java<gh_stars>0 import java.math.BigInteger; public class Laboon { public static int laboonify(String l) { char[] chars = l.toCharArray(); BigInteger counter = new BigInteger("0"); for (int j = 0; j < chars.length; j++) { ...
def start_of_game(self): self.needed_money = 0 self.money_to_be_taken = 0
<gh_stars>1-10 package main import ( "fmt" "github.com/algorand/go-algorand-sdk/future" "github.com/algorand/go-algorand-sdk/client/algod" "github.com/algorand/go-algorand-sdk/client/kmd" ) func main() { const kmdAddress = "http://localhost:7833" const kmdToken = "206ba3f9ad1d83523fb2a303dd055cd99ce10c5be01e35...
<reponame>affromero/SMILE import torch.nn as nn from misc.utils import PRINT from torch.nn import init import math def print_debug(feed, layers, file=None, append=''): if isinstance(feed, (tuple, list)): for i in feed: PRINT(file, i.size()) else: PRINT(file, feed.size()) for la...
Accelerated Elevation Change of Greenland's Jakobshavn Glacier Observed by ICESat and IceBridge The recent accelerated ice mass loss of the Greenland ice sheet and its outlet glaciers has been widely documented. The Jakobshavn isbrae/glacier is one of the fastest melting glaciers in Greenland. To determine its elevati...
#include <stdint.h> #include <murax_hex.h> void print_hex(char *str){ while(*str){ uart_write(UART,*(str++)); } } void main() { volatile uint32_t a = 1, b = 2, c = 3; uint32_t result = 0; interruptCtrl_init(TIMER_INTERRUPT); prescaler_init(TIMER_PRESCALER); timer_init(TIMER_A); TIMER_PRESCALER->LIMIT = 1...
<filename>tests/__init__.py """ PKCS#11 Tests The following environment variables will influence the behaviour of test cases: - PKCS11_MODULE, mandatory, points to the library/DLL to use for testing - PKCS11_TOKEN_LABEL, mandatory, contains the token label - PKCS11_TOKEN_PIN, optional (default is None), contains th...
/** * * test short serialize & deserialize model * * @author jason.shang */ public class Hessian2StringShortType implements Serializable { Map<String, Short> stringShortMap; Map<String, Byte> stringByteMap; Map<String, PersonType> stringPersonTypeMap; public Hessian2StringShortType(){ } }
#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #define RE register using namespace std; template <class T> inline void read(T &x){ x = 0; char ch = getchar(); while(ch < '0' || ch > '9') ch = getchar(); while(ch >= '0' && ch <= '9'){x = (x << 3) + (x << 1) + (ch ^ 48); ch = g...
import { UnumDto } from '../types'; export interface SmsResponseBody { success: boolean; } /** * Handler to send a SMS using UnumID's SaaS. * Designed to be used with a deeplink which creates a templated message. * @param authorization * @param to * @param deeplink */ export declare const sendSms: (authorizat...
/** * Registers a persistent single bean by id. * * @param pBeanId the id of the single bean * @param pBeanType the bean type of the persistent single bean */ void registerSingleBeanType(String pBeanId, Class<? extends IBean> pBeanType) { final Map<IField<?>, Object> initialContent = BeanReflecto...
export * from './hybrid';
# 1 "lz4hc_cs_adapter.h" # 1 "<command-line>" # 1 "lz4hc_cs_adapter.h" // externaly defined: // - GEN_SAFE: generate safe code // - GEN_X64: generate 64-bit version # 59 "lz4hc_cs_adapter.h" // LZ4HC private const int MAXD = 1 << MAXD_LOG; private const int MAXD_MASK = MAXD - 1; private const int HASHHC_LOG = MAX...
//Mob for the Thinblade of Vines -- Yves #include <std.h> inherit WEAPONLESS; void create(){ ::create(); set_name("sprite"); setenv("MIN", "$N flies in."); setenv("MOUT", "$N flies off to the $D."); set_id(({ "sprite", "fairy", "fey" })); set_short("%^BOLD%^%^GREEN%...
<reponame>hendrysadrak/Bracket-Pair-Colorizer-2<filename>src/deferred.ts<gh_stars>1-10 export const getDeferred = () => { let resolve: () => void; let reject: () => void; const promise = new Promise((_resolve, _reject) => { resolve = _resolve as () => void; reject = _reject; }); re...
/*! * Copyright (c) 2014 by Contributors * \file reduceto1d.h * \brief support for sum_rows and sumall_except_dim * \author Tianqi Chen */ #ifndef MSHADOW_EXTENSION_REDUCETO1D_H_ #define MSHADOW_EXTENSION_REDUCETO1D_H_ #include "../extension.h" namespace mshadow { namespace expr { /*! * \brief reduction to 1 dim...
def inprocess_order_list(): inprocess = unicode(ORDER_STATUS[2][0]) orders = orders_at_status(inprocess) return { 'orders' : orders, 'multihost' : is_multihost_enabled() }
<filename>server/workers/tests/test_summarization.py<gh_stars>1-10 import pytest from .test_helpers import CASENAMES, RESULTS, get_stopwords LANGS = ["english"] @pytest.mark.parametrize("testcase", CASENAMES) def test_empty_area_titles(testcase): testcase = RESULTS[testcase] assert testcase.area.map(lambda x...
It's so easy to miss the little things in life. Those things that brighten up our day but are taken for granted and never really noticed outside of our subconscious. Like Sunny days or calls from a loved one or the fact that your parents will finally be dead one day. RPGs, much like life, are full of these little extra...
<reponame>lambdaxymox/fuchsia<filename>src/connectivity/network/dns/src/main.rs // Copyright 2020 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use { anyhow::{Context as _, Error}, async_trait::async_trait, ...
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module IntegrationTest ( withApp, integrationSpec ) where import BasicPrelude import Data.Aeson (FromJSON, parseJSON, (.:)) import qualified Data.Aeson as JSON import Network.Wai.Test (simpleB...
// UnstableAttr implements fs.InodeOperations.UnstableAttr. func (i *inodeOperations) UnstableAttr(ctx context.Context, inode *fs.Inode) (fs.UnstableAttr, error) { i.mu.Lock() defer i.mu.Unlock() return i.uattr, nil }
/** \brief constructor for ATCAIface objects * \param[in] cfg points to the logical configuration for the interface * \return ATCAIface */ ATCAIface newATCAIface(ATCAIfaceCfg *cfg) { ATCAIface caiface = (ATCAIface)malloc(sizeof(struct atca_iface)); caiface->mType = cfg->iface_type; caiface->mIfaceCFG = cfg;...
/* # Copyright (c) 2012, The Met Office, UK # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditi...
<gh_stars>0 package main import ( "testing" "sigs.k8s.io/kustomize/kyaml/yaml" ) func TestStarlarkFunctionConfig(t *testing.T) { testcases := []struct { config string expectErrMsg string }{ { config: `apiVersion: fn.kpt.dev/v1alpha1 kind: StarlarkRun metadata: name: my-star-fn namespace: foo s...
N = int(input()) As = list(map(int, input().split())) from itertools import accumulate cAs = list(accumulate(As[::-1]))[::-1][1:] + [0] ans = 0 now_nodes = 1 for i, (cum, a) in enumerate(zip(cAs, As)): if i==N: if now_nodes==a: print(ans+a) else: print(-1) if now_nodes<...
/** * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a * user logs in. Each parameter must be in the form "key=value". * * @param loginParameters the loginParameters value to set. * @return the AzureActiveDirectoryLogin object itself...
package _time import "time" //获取时间戳 int64 func Stamp64() int64 { return time.Now().Unix() } //正确的使用方式 //time.Sleep(time.Second * time.Duration(common.C.CpuTempRest)) //获取指定时间的时间戳 //获取一个月之后的时间戳 //30 * 24 * 60 * 60 * time.Second //或者 //30 * 24 * time.Hour func AppointStamp64(t time.Duration) (timestamp int64) { retu...
INT DiamondCompressFile( IN NOTIFYPROC CompressNotify, IN LPSTR SourceFile, IN LPSTR TargetFile, IN BOOL Rename, OUT PLZINFO pLZI ); TCOMP DiamondCompressionType; // 0 if not diamond (ie, LZ)
(CNN) -- What is seen by some as the holy four-day weekend for geek culture at San Diego Comic-Con has gone mainstream in a big way for the past few years. Are you a Comic-Con beginner? Get the rules right! Starting today, there will be panels called "I Can't Write, I Can't Draw, But I Love Comics!" and "Indie Comics...
New on Kickstarter is the Mono desktop 3D printer with a touchscreen interface. Looks interesting, but the launch has had teething troubles. Recently, ALL3DP ran an article about things to be aware of when backing crowdfunding campaigns. Supporting innovation is important, but so is protecting consumers from shoddy pr...
(Newser) – The Texas plumber whose truck infamously ended up in the hands of jihdists is suing a car dealership for more than $1 million, the Houston Chronicle reports. At issue: the dealership’s failure to remove a decal bearing the name and phone number of the Texas City man's business, which he says destroyed his li...
with open("../input/day3.txt", 'r') as inputFile: data = inputFile.readlines() def determineCount(slope): pos = (0, 0) treeCount = 0 while pos[1] < len(data): if pos != (0, 0): line = data[pos[1]].rstrip() char = line[pos[0] % len(line)] if char == "#": ...
/** * Start any class in the classpath as game * @param args * @throws Exception */ public static void main(String[] args) throws Exception { int n = args[0].lastIndexOf('.'); String pkg = args[0].substring(0, n); String main = args[0].substring(n+1); ClasspathCartridge c = new ClasspathCartridge(args...
Information Transfer Capacity of Articulators in American Sign Language The ability to convey information is a fundamental property of communicative signals. For sign languages, which are overtly produced with multiple, completely visible articulators, the question arises as to how the various channels co-ordinate and...
/** * Associated with a JFrame. * <br> * @author Charles Bentley * */ public class FrameScreenManager implements IStringable { private boolean isFullScreen = false; private int prevX, prevY, prevWidth, prevHeight; private CBentleyFrame f; private boolean isOnlyHei...
package net.osmand.plus; import android.annotation.SuppressLint; import android.graphics.Bitmap; import android.graphics.Matrix; import android.os.AsyncTask; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.content.ContextCompat; import net.osmand.CallbackWithObject; impo...
// SPDX-License-Identifier: GPL-2.0 /* * Timer events oriented CPU idle governor * * Copyright (C) 2018 Intel Corporation * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> * * The idea of this governor is based on the observation that on many systems * timer events are two or more orders of magnitude more...
<gh_stars>0 import React from 'react' interface SpotifyPlayerProps { url: string height: string } const SpotifyPlayer = ({ url, height }: SpotifyPlayerProps) => { return ( <div className='spotify-playlist'> <iframe src={url} title={Date.now().toString()} width='100%' he...
/** * Return a {@link NumericDoubleValues} instance that can be used to sort root documents * with this mode, the provided values and filters for root/inner documents. * * For every root document, the values of its inner documents will be aggregated. * If none of the inner documents has a value...
Effect of Slip and Convective Boundary Conditions on Entropy Generation in a Porous Channel due to Micropolar Fluid Flow Abstract This article presents the effect of convective heating and velocity slip on flow generation of an incompressible micropolar fluid through a porous channel. The flow is induced by a constant...
import { Terminal } from '../src' import readline from 'readline' describe('Terminal', () => { test('Can write to the cli', () => { const action = jest.spyOn(process.stdout, 'write').mockImplementation(() => true) const t = new Terminal() t.write('foo') expect(action).toHaveBeenCalledWith('foo') }) test...
module Main where import Lib a :: A a = A b :: B b = B x :: A x = f main :: IO () main = someFunc
<gh_stars>1-10 /** Copyright 2010-2019 Red Anchor Trading Co. Ltd. Distributed under the Boost Software License, Version 1.0. See <http://www.boost.org/LICENSE_1_0.txt> */ #include "fost-cli.hpp" #include <f5/cord/iostream.hpp> #include <fost/log> #include <iostream> namespace { const char *nl_sp...
<commit_msg>Allow editing amount field in expensenote <commit_before>from django.contrib import admin from expense.models import ExpenseNote class ExpenseNoteAdmin(admin.ModelAdmin): list_display = ['date', 'save_in_ledger', 'details', 'contact', 'credit_account', 'debit_account', 'amount'] list_filter = ['d...
def store( self, sitename ): if sitename in self.__db['sitenames']: if not self.__user_select( 'Overwrite existing credentials for "{}"? [Y/n] '.format( sitename ) ): return else: self.__db['sitenames'].append( sitename ) print( 'Please enter credentia...
<filename>0118 Pascals Triangle/solution.py #!python3 class Solution(object): def generate(self, numRows): """ :type numRows: int :rtype: List[List[int]] """ res = [] for row in range(0, numRows): cur = [None for _ in range(row+1)] cu...
import { useMemo } from "react"; import useGameContext from "../components/GameContext"; export default function Reset() { const context = useGameContext(); const saveData = useMemo(() => context.saveAs(true), []); function resetGame() { if (confirm("Are you sure you want to reset? This cannot be undone."))...
<filename>src/frames/file/add_directory_dialog.cpp ///////////////////////////////////////////////////////////////////////////// // Name: add_directory_dialog.cpp // Purpose: // Author: // Modified by: // Created: 05/09/2018 20:13:34 // RCS-ID: // Copyright: // Licence: ////////////...
/* * vec_alignment_plus * GetSymmetricAlignmentLength * * It returns the average between the two possible alignment lengths. */ int vec_alignment_plus::GetSymmetricAlignmentLength( int align_id ) const { int al_pos = all_aligns_ids_[align_id]; int len1 = alignments_[al_pos].a.Pos1( ) - alignments_[al_pos].a.po...
<reponame>velocity-9/v9_worker // I'd like the most pedantic warning level #![warn( clippy::cargo, clippy::needless_borrow, clippy::pedantic, clippy::redundant_clone )] // But I don't care about these ones #![allow( clippy::cast_precision_loss, // There is no way to avoid this precision loss ...
def _init_model(self): if self._random_state is not None: torch.manual_seed(self._random_state) torch.backends.cudnn.deterministic = True if not isinstance(self._model, nn.Module): raise TypeError("`model` must be a `torch.nn.Module`.") self._model = self._mod...
<gh_stars>1-10 import {ITaskQueue, TaskItem, ActiveTask, ActiveQueues, ActiveQueue} from './index.d'; export default class Pubus { static throttle = 30; // The default throttle interval 30ms private throttle: number; // the time of waitting every task between, the unit is 'ms' private holdQueue:ITaskQueue<Task...
// Read reads the file specified by the path. func Read(ctx context.Context, path string) ([]byte, error) { if strings.HasPrefix(path, gcsBucketPrefix) { return readGCSFile(ctx, path) } return readLocalFile(path) }
/** * Creates a new acceleration that is linked to the given {@code referenceAcceleration} as follows: * * <pre> * newAcceleration = scale * referenceAcceleration * </pre> * * where the scale is obtained from the given {@code scaleSupplier}. * * @param scaleSupplier the suppl...
<gh_stars>0 package graph import ( i04eb5309aeaafadd28374d79c8471df9b267510b4dc2e3144c378c50f6fd7b55 "github.com/microsoft/kiota/abstractions/go/serialization" ) // AccessReviewNotificationRecipientItem type AccessReviewNotificationRecipientItem struct { // Stores additional data not described in the OpenAPI...
<gh_stars>0 package loom import ( "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) func TestSyntaxRules(t *testing.T) { // (define-syntax and // (syntax-rules () // ((and) #t) // ((and test) test) // ((and test1 test2 ...) // (if t...
<filename>common/primitives/json.go // Copyright 2017 Factom Foundation // Use of this source code is governed by the MIT // license that can be found in the LICENSE file. package primitives import ( "encoding/json" "fmt" ) type JSON2Request struct { JSONRPC string `json:"jsonrpc"` ID interface{} `json...
Methyltetrahydrofolic Acid Mediates N- and O-Methylation of Biogenic Amines A variety of mammalian and avian tissues N- and O-methylate indoleamines and phenylethylamines, with methyltetrahydrofolic acid as the methyl donor. Because it is considerably more efficient than S-adenosylmethionine, methyltetrahydrofolic aci...
// See the cfg-if crate. #[allow(unused_macro_rules)] macro_rules! cfg_if { // match if/else chains with a final `else` ($( if #[cfg($($meta:meta),*)] { $($it:item)* } ) else * else { $($it2:item)* }) => { cfg_if! { @__items () ; $( ( ($($meta)...
<reponame>sheyll/isobmff-builder -- | The payload of AAC DASH streams. module Data.ByteString.Mp4.Dash.Aac ( DashAacMedia (..), BinaryDashAacMedia (..), buildDashAacMedia, dashAacMediaBuilder, module X, ) where import qualified Data.ByteString as BS import Data.ByteString.IsoBaseFileFormat.Box impo...