content stringlengths 10 4.9M |
|---|
//Connect to the NATS message queue
func (natsConn *NatsConn) Connect(host, port string, errChan chan error) {
log.Info("Connecting to NATS: ", host, ":", port)
nh := "nats://" + host + ":" + port
conn, err := nats.Connect(nh,
nats.DisconnectErrHandler(func(_ *nats.Conn, err error) {
errChan <- err
}),
nats... |
<reponame>cemozerr/artemis
/*
* Copyright 2019 ConsenSys AG.
*
* 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 applic... |
package sep.gaia.resources.wikipedia.test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import sep.gaia.resources.wikipedia.Wikipe... |
package seedu.planner.testutil.activity;
import static seedu.planner.logic.commands.CommandTestUtil.VALID_ACTIVITY_ADDRESS_A;
import static seedu.planner.logic.commands.CommandTestUtil.VALID_ACTIVITY_ADDRESS_B;
import static seedu.planner.logic.commands.CommandTestUtil.VALID_ACTIVITY_NAME_A;
import static seedu.planne... |
import heapq
if __name__ == '__main__':
n, m, k = [int(x) for x in input().split(' ')]
assert 2 <= n <= 200000
assert 1 <= m
assert 2 <= k
assert m*k <= n
ns = [int(x) for x in input().split(' ')]
assert len(ns) == n
pis = [i for (i, p) in heapq.nlargest(m * k, enumerate(ns), lambda x... |
def map_hsv(self, H, S, L):
size = max([v.size for v in (H, S, L)])
if H.size == 1:
H = np.repeat(H, size)
elif H.size != size:
raise ValueError('cannot map HSV of unequal size')
if S.size == 1:
S = np.repeat(S, size)
elif S.size != size:
... |
package goethauth
import (
"encoding/hex"
"reflect"
"testing"
)
func Test_IsChallengeSignedByEthAccount(t *testing.T) {
type args struct {
ethAccountStr string
msg string
sigStr string
}
tests := []struct {
name string
args args
want bool
wantErr bool
}{
{
name: "va... |
<reponame>skkuse-adv/2019Fall_team2
package kr.co.popone.fitts.di.component;
import dagger.android.AndroidInjector;
import kr.co.popone.fitts.feature.post.PostFirstWriteNoticeActivity;
public interface PostFirstWriteNoticeActivityComponent extends AndroidInjector<PostFirstWriteNoticeActivity> {
public sta... |
Thanks to Nicholas Negroponte and the Media Lab at MIT, children in developing nations around the world will have access to technology. Negroponte, the co-founder of the Lab, said MIT and his non-profit, One Laptop Per Child , is in discussions with five countries -- Brazil, China, Thailand, Egypt and South Africa -- t... |
Digital Ischemia and Necrosis: A Rarely Described Complication of Gemcitabine in Pancreatic Adenocarcinoma
Abstract Background: Gemcitabine, alone or in combination with other agents, has become an important part of the standard of care for treatment of both resectable and unresectable/advanced pancreatic adenocarcino... |
/**
* Dispose of the camera preview.
* @param holder
*/
public void surfaceDestroyed(SurfaceHolder holder) {
if (mCamera != null){
mCamera.stopPreview();
}
} |
/**
* Appends decoy sequences to the given target database file.
*
* @param fastaParameters the FASTA parsing parameters
* @param waitingHandler the waiting handler
*
* @return the file created
* @throws IOException exception thrown whenever an error happened while
* read... |
Final Fantasy XV did the near impossible by finally releasing back in late November for PlayStation 4 and Xbox One after years of development. We’ve heard previous details of the number of units shipped at launch and since for the game, which have been pretty impressive, but now Square Enix has revealed just how succes... |
<reponame>fossabot/solar-2<filename>src/actors/tcp_server.rs<gh_stars>0
use async_std::{
net::{TcpListener, ToSocketAddrs},
prelude::*,
};
use futures::FutureExt;
use kuska_ssb::keystore::OwnedIdentity;
use crate::broker::*;
use anyhow::Result;
pub async fn actor(server_id: OwnedIdentity, addr: impl ToSocke... |
def before_request():
is_known = not g.current_user.is_anonymous
if not is_known:
msg = "Account is unconfirmed."
return forbidden(msg) |
Regulations governing the EU wholesale electricity market have become so complex that the integration of the market is regressing instead of progressing, says Peter Styles, Chairman of the Electricity Committee of the European Federation of Energy Traders (EFET), in an interview with Energy Post. He notes TSOs (transmi... |
// Tideland Go Database Clients - CouchDB Client
//
// Copyright (C) 2016-2020 <NAME> / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.
package couchdb // import "tideland.dev/go/db/couchdb"
//--------------------
// IMPORTS
//------------------... |
<filename>codegen/src/main/java/com/oes/openfmb/generation/Profiles.java
// SPDX-FileCopyrightText: 2021 Open Energy Solutions Inc
//
// SPDX-License-Identifier: Apache-2.0
package com.oes.openfmb.generation;
import com.google.protobuf.Descriptors;
import openfmb.breakermodule.*;
import openfmb.capbankmodule.*;
impor... |
import React, { SVGProps } from 'react';
import generateIcon from '../../generateIcon';
const SolidGopuram = (props: SVGProps<SVGSVGElement>) => {
return (
<svg viewBox="0 0 512 512" width="1em" height="1em" {...props}>
<path d="M496 352h-16V240c0-8.8-7.2-16-16-16h-16v-80c0-8.8-7.2-16-16-16h-16V16c0-8.8-7.... |
/* tslint:disable:no-unused-variable */
import { BaseRequestOptions, Http, ResponseOptions, Response } from '@angular/http'
import { TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing';
import { MockBackend, MockConnection } from '@angular/http/testing';
import { ElastalertControlService } from './e... |
/**
* Follow a given path.
*
* <p>
* Unlike the {@link Pathfinder#goToPosition(HeadingPoint)} method, this
* does not attempt to optimize a path to as few targets as possible.
* Rather, this method generates paths to each of the waypoints and merges
* them all together - thus ensuring... |
def max_area(height: list) -> int:
area = 0
front = 0
back = len(height) - 1
while front != back:
area = max(area, min(height[front], height[back]) * (back - front))
if height[front] > height[back]:
back -= 1
else:
front += 1
return area |
def as_html_in_list(self):
return ''.join([
'<li class="list-group-item clearfix" style="font-size: 130%;">',
('<img src="%s" style="float:left; margin-right: 20px;">'
% self.image.version_generate('thumbnail').url)
if self.image else '',
'%s<br>' ... |
/*
* Copyright 2010 Outerthought bvba
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... |
/**
* The class represents a configuration for {@link CommonsRequestLoggingFilter} filter. Also, this
* logging filter requires the logging level be set to DEBUG.
* <p>
* This bean will be created in case when logging level for CommonsRequestLoggingFilter is set to
* debug.
*/
@Configuration
@Deprecated
public cl... |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-retentionperiod.html
module Stratosphere.ResourceProperties.IoTAnalyticsDatasetRetentionPeriod where
import Stratos... |
package com.mjiayou.trecore.helper;
import com.mjiayou.trecore.base.TCApp;
import com.mjiayou.trecorelib.util.LogUtil;
import com.wanjian.sak.LayoutManager;
/**
* Created by treason on 2016/12/20.
*/
public class SwissArmyKnifeUtil {
private static final String TAG = SwissArmyKnifeUtil.class.getSimpleName();
... |
<gh_stars>0
/*****************************************************************************
*
* test_pair_ss_cut_ij.c
*
* Edinburgh Soft Matter and Statictical Physics Group and
* Edinburgh Parallel Computing Centre
*
* (c) 2022 The University of Edinburgh
*
* Contributing authors:
* <NAME> (<EMAIL>)
*
... |
<reponame>mazhiwei/spring-rabbitmq-tutorials<filename>src/main/java/org/mzw/rabbitmq/tutorials/sender/RetryPublisher.java
package org.mzw.rabbitmq.tutorials.sender;
import org.mzw.rabbitmq.tutorials.conf.RetryConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.core.Message;... |
<gh_stars>1-10
/* Copyright (C) 2002 Univ. of Massachusetts Amherst, Computer Science Dept.
This file is part of "MALLET" (MAchine Learning for LanguagE Toolkit).
http://www.cs.umass.edu/~mccallum/mallet
This software is provided under the terms of the Common Public License,
version 1.0, as published by htt... |
def fit_transform(self, raw_documents: List[str]) -> List[List[int]]:
KeyphraseCountVectorizer.fit(self=self, raw_documents=raw_documents)
return CountVectorizer(vocabulary=self.keyphrases, ngram_range=(self.min_n_gram_length, self.max_n_gram_length),
lowercase=self.lowerc... |
/**
* Holds do not disturb change attributes
*/
public class DNDChangeMessage {
private boolean checked;
public DNDChangeMessage(boolean checked) {
this.checked = checked;
}
public boolean isChecked() {
return checked;
}
} |
def capture_diff_traces(self, dtype=float, sweep_mode: str = 'SINGLE', big_endian: bool = True):
num_diff_pairs = self.num_ports // 2
self.set_sweep_mode(sweep_mode)
dformat = self.get_data_format()
num_points = self.get_number_sweep_points()
diff_data = np.zeros((num_points, num... |
import Privilege from "./Privilege";
import PrivilegeGroup from "./PrivilegeGroup";
import type * as UsersTypes from "..";
export default class PrivilegeCategory {
main: UsersTypes.default;
name: UsersTypes.PrivilegeKeysType;
$privilegesContainer: JQuery<HTMLElement>;
privileges: (Privilege | PrivilegeGroup)... |
package lockotron
import (
"sync"
)
type locker struct {
mutex sync.Mutex
mutexesByKey map[string]*sync.Mutex
}
func newLocker() *locker {
return &locker{mutexesByKey: make(map[string]*sync.Mutex)}
}
func (l *locker) obtain(key string) *sync.Mutex {
l.mutex.Lock()
mutex, ok := l.mutexesByKey[key]
if !... |
<reponame>i386/java-magento-client<filename>src/main/java/com/github/chen0040/magento/models/category/ProductLink.java
package com.github.chen0040.magento.models.category;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
... |
<gh_stars>0
//! This module is supposed to define context-free grammars and their
//! components.
#[macro_use]
pub mod symbol;
use self::symbol::Symbol;
use super::{Associativity, Operator, Parser, ParserAction};
use automata::{State, Transition};
use automata::dfa::DFA;
use automata::nfa::NFA;
use std::collections::... |
import { Path } from '@serenity-js/core/lib/io';
import * as fs from 'fs';
import { GherkinDocument } from '../nodes';
import { UnableToParseFeatureFileError, UnableToReadFeatureFileError } from './errors';
/**
* @private
*/
export class FeatureFileParser {
constructor(private readonly gherkinParser: { parse: (... |
a, b = map(int, input().split())
count,flag=0,0
if(a==1 and b==1):
flag=1
print(0)
while(flag==0 and a > 0 and b > 0):
count+=1
if(min(a,b)==a):
a+=1
b-=2
else:
b+=1
a-=2
if(not flag):
print(count)
|
<filename>BOJ_Solved/BOJ-9012.py
"""
백준 9012번 : 괄호
"""
test = int(input( ))
result = []
def is_vps(ps):
stack = []
for p in ps:
if len(stack) == 0 and p == ')':
return False
elif p == ')':
del stack[len(stack) - 1]
elif p == '(':
stack.append(1)
... |
/**
* @file ZW_global_definitions.h
*
* This file is a helper file for including all globally required parameters
* and definitions for ease of coding.
* It is defined as a ZWave API module so that it also can be used by the
* ZAF API if needed.
*
* @copyright 2020 Silicon Laboratories Inc.
*/
#ifn... |
A couple of days ago, David asked me to add a new feature to the animation editor UI. He wanted the ability to have multiple timelines in the UI so he could mix animations. He drew me a picture to make it a bit more clear:
It required a little bit of refactoring, but it was pretty straightforward to implement. Normall... |
/**
* The main set of web services.
*/
@Named
@Singleton
public class TextelementController extends Controller {
private final DocumentRepository documentRepository;
// We are using constructor injection to receive a repository to support our desire for immutability.
@Inject
public TextelementContro... |
<reponame>mzy-ray/react-redux-ts
import {createBrowserHistory, History} from 'history';
// subpath of the web service
const defaultPath: string = process.env.PUBLIC_URL;
const history: History = createBrowserHistory({basename: defaultPath});
export default history;
|
/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi... |
<gh_stars>1-10
package com.works.vetrestapi.repositories;
import com.works.vetrestapi.entities.Depo;
import org.springframework.data.jpa.repository.JpaRepository;
public interface DepoRepository extends JpaRepository<Depo,Integer> {
}
|
import torch
import torch.utils.data
import torch.cuda
import torch.backends.cudnn
import random
import numpy as np
from typing import Optional
def fix(offset: int = 0, fix_cudnn: bool = True):
random.seed(0x12345678 + offset)
torch.manual_seed(0x0DABA52 + offset)
torch.cuda.manual_seed(0x0DABA52 + 1 + of... |
/*------------------------------------------------------------------------------
Copyright © 2016 by <NAME>
XLib is provided under the terms of The MIT License (MIT):
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to d... |
ALBANY, NY – The Albany Devils will face the Utica Comets during the First Round of the 2016 Calder Cup Playoffs. The Devils, who finished second in the North Division with a 46-20-8-2 record, will have home-ice advantage during the best-of-five series. Game 1 is slated for Friday, April 22 at 7 pm at Times Union Cente... |
/**
* Here 2 frames slide around on an imaginary table top extending into the
* distance. This creates a 3D-type effect where frames move in and out of the
* users field of view.
* <P>
* (The best way to understand exactly what this does is to see it in action.)
* <P>
* More technically: this creates a Perspecti... |
<gh_stars>0
# O(N)
import unittest
def is_substring(string, sub):
return string.find(sub) != -1
def string_rotation(s1, s2):
if len(s1) == len(s2) != 0:
return is_substring(s1 + s1, s2)
return False
class Test(unittest.TestCase):
'''Test Cases'''
data = [
('waterbottle', 'erbot... |
Muscular Activity and the Biomechanics of the Hip
The interactions between the forces transmitted by the muscles and by the bones are central to the understanding of load transmission in the musculoskeletal system. A reasonable concept of the biomechanics of the hip can only be grasped when the activities of all the m... |
""" Hubspot models """
from django.db import models
from ecommerce.models import Line
class HubspotErrorCheck(models.Model):
"""
Store the datetime of the most recent Hubspot API error check.
"""
checked_on = models.DateTimeField()
class HubspotLineResync(models.Model):
"""
Indicates that ... |
<filename>core-project/asakusa-runtime/src/main/java/com/asakusafw/runtime/core/Report.java
/**
* Copyright 2011-2017 Asakusa Framework Team.
*
* 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... |
//
// Creates a new instance of the media session.
//
HRESULT MFCameraPlayer::CreateSession()
{
HRESULT hr = S_OK;
MF_TOPOSTATUS topoStatus = MF_TOPOSTATUS_INVALID;
CComQIPtr<IMFMediaEvent> mfEvent;
do
{
hr = CloseSession();
BREAK_ON_FAIL(hr);
assert(state_ == PlayerState::Closed);
hr = MFCreateMediaSe... |
Europe's largest manufacturer of electrical cables and wires Leoni AG has seen its shares fall by between 5-7% after reporting that an email phishing scam caused the company to lose €40m ($44.7m, £33.7m) overnight.
Leoni AG is a German firm, but it has a factory located in Bistrita, a city in northern Romania. Accordi... |
def find_product_in_list(alist, factors):
largest_product = 0
end = len(alist) - (factors - 1)
n = 0
while n < end:
list_slice = alist[n: n + factors]
product = calculate_product(list_slice)
if product > largest_product:
largest_product = product
n += 1
re... |
// Note unit struct (field-less struct)
impl fmt::Display for InvalidBoardSize {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"Board data is of invalid size. Has to contain {size} elements",
size = BOARD_SIZE
)
}
} |
def from_tuple(cls, data: Tuple[Tuple, Tuple, Tuple, int, bool]) -> "Candle":
return cls(
Ohlc.from_tuple(data[0]),
Ohlc.from_tuple(data[1]),
Ohlc.from_tuple(data[2]),
TimeInt(data[3]),
data[4],
) |
def describe_xml(self):
doc = None
if self.allowed_type == ALLOWEDVALUETYPE.VALUE:
doc = OWS.Value(str(self.value))
else:
doc = OWS.Range()
doc.set('{%s}rangeClosure' % NAMESPACES['ows'], self.range_closure)
doc.append(OWS.MinimumValue(str(self.mi... |
//Get handler to get a especific menu
func Get(mEnv *config.Data) httprouter.Handle {
return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
id, _ := primitive.ObjectIDFromHex(ps.ByName("id"))
menu := OneData(mEnv.CL, id)
fmt.Fprintf(w, "%s, %s, %T\n", menu.ID, menu.Category, menu.Items)
}
... |
////////////////////////////////////////////////////////////////////////
// vehicle_nissanleaf_car_on()
// Takes care of setting all the state appropriate when the car is on
// or off. Centralized so we can more easily make on and off mirror
// images.
//
void vehicle_nissanleaf_car_on(bool isOn)
{
StandardMetrics.... |
Selma James’ Sex, Race and Class offers a way to grapple with many of the unanswered questions that are frustrating today’s movements for social justice. This new collection of pieces (James’ short pamphlet of the same title was first published in 1974) is the harvest of seven decades of grassroots organising, a lifeti... |
/**
* Test class for {@code Event}.
*
*/
public class TestEvent
{
/**
* Tries to create an instance without a source.
*/
@Test(expected = IllegalArgumentException.class)
public void testInitNoSource()
{
new Event(null, Event.ANY);
}
/**
* Tries to create an instance wi... |
def index2sentence(generated_word_index, prob_logit, ixtoword):
for i in range(len(generated_word_index)):
if generated_word_index[i] == 3 or generated_word_index[i] <= 1:
sort_prob_logit = sorted(prob_logit[i])
curindex = np.where(prob_logit[i] == sort_prob_logit[-2])[0][0]
... |
Clang-Tidy is a linter from the LLVM ecosystem. I wanted to try to run it on the Linux kernel to see what kind of bugs it would find. The false positive rate seems pretty high (a persistent bane to static analysis), but some patching in both the tooling and the source can likely help bring this rate down.
The most str... |
Aesthetics of Acquisition: Notes on the Transactional Life of Persons and Things in Gabon
Abstract Based on a historical study of older and newer visual regimes in Gabon, Equatorial Africa, this paper examines spectacles as world-manufacturing processes that produce and circulate assets. Visual and aesthetic strategie... |
// NewTranslate creates new struct.
func NewTranslate() (*Translate, error) {
sess, err := session.NewSession()
if err != nil {
return nil, fmt.Errorf("aws session error: %w", err)
}
return &Translate{
svc: translate.New(sess),
}, nil
} |
export * from './FunctionProperties';
export * from './FunctionPropertyNames';
export * from './Head';
export * from './Next';
|
def _IsContentfulLine(self, filename, line, is_in_multiline_c_comment):
return not (_WHITESPACE_LINE_RE.search(line) or
_CXX_COMMENT_LINE.search(line) or
_C_COMMENT_LINE.search(line) or
self._IsHeaderGuardLine(filename, line) or
self._IsInACComment(lin... |
<filename>archive/errorAndLoading.ts<gh_stars>1-10
import { ReduxStory, ReduxReducer, ReduxStoryLine, ErrorState, LoadingState } from "./baseTypes";
import { unpackStoriesIntoStoryLines } from "./util";
export function createPendingFlagReducer(reduxes) {
const initialState = reduxes.reduce((acc, cur) => {
... |
<reponame>snolflake/graphs-and-tracks<filename>src/app/settings/challenge-messages.ts
import { TutorialStep, Message, UI_CONTROL } from '../shared/types'
export const TUTORIAL_STEPS: TutorialStep[] = [
{
title: 'Welcome to Graphs and Tracks!',
content: `
Your mission is to discover the motion of a rolling ball... |
<filename>src/global.d.ts<gh_stars>0
declare global {
function setInterval(handler: TimerHandler, timeout?: number, ...arguments: any[]): number;
}
|
/* Free a set of linked memory blocks */
static void freeMemBlock(mem_blk_set_t* head)
{
mem_blk_set_t* iter;
if(!head)
return;
freeMemBlock(head->next);
head->next = NULL;
#ifdef _DELETE
printf("Freeing mem block = %x\n", head);
#endif
free(head);
} |
Myelodysplastic syndromes: the pediatric point of view.
Myelodysplastic syndromes (MDS) are clonal disorders of the multipotent hematopoietic stem cell characterized by ineffective hematopoiesis and associated with marrow hypercellularity, increased intramedullary cell death and peripheral cytopenias of varying severi... |
<reponame>mdmuidulalam/muskdailyapi
package data
import (
"context"
"go.mongodb.org/mongo-driver/bson/primitive"
model "muskdaily.com/model"
)
type AccountData struct {
Data
}
func (this AccountData) InsertAccount(account model.Account) bool {
collection := this.client.Database("muskdaily").Collection("account... |
#include <iostream>
#include <string>
#include <sstream>
#include <ctype.h>
using namespace std;
class Solution {
public:
bool isPalindrome(string s) {
if (s.empty()) return true;
stringstream str(s);
string buffer;
string newS;
//clean up the string
while (str >> b... |
def merge_lmdbs():
db_path = 'sexp_cache'
dst_db = lmdb.open(db_path, map_size=1e11, writemap=True, readahead=False)
files = glob('data/**/*sexp_cache', recursive=True)
bar = ProgressBar(max_value=len(files))
for i, db_path in enumerate(files):
print(db_path)
try:
src_db ... |
/**
* Parses an AspectService annotation.
* @param annotation
*/
private void parseAdapterService(Annotation annotation)
{
EntryWriter writer = new EntryWriter(EntryType.AdapterService);
m_writers.add(writer);
writer.put(EntryParam.impl, m_componentClassName);
String a... |
/**
* Updates existing movie. If movie does not exist in database, will do nothing.
*/
public void updateMovie(MovieDetails details, int tmdbId) {
ContentValues values = details.toContentValuesUpdate();
if (values.size() == 0) {
return;
}
values.put(SeriesGuideCont... |
<reponame>alexa/apl-core-library
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apac... |
def Vegas(integrand, ndim, userdata=NULL,
epsrel=EPSREL, epsabs=EPSABS, flags=0, ncomp=1, seed=None,
mineval=MINEVAL, maxeval=MAXEVAL, nstart=NSTART,
nincrease=NINCREASE, nbatch=NBATCH,
gridno=GRIDNO, statefile=NULL, nvec=1):
neval = c_int()
fail = c_int()
comp = c_int()
ARR = c_double * ncomp... |
<reponame>aeriksson/MeiliSearch
use std::borrow::Cow;
use std::collections::HashMap;
use std::hash::Hash;
use std::ops::Deref;
use cow_utils::CowUtils;
use either::Either;
use heed::types::{Str, OwnedType};
use indexmap::IndexMap;
use serde_json::Value;
use meilisearch_schema::{FieldId, Schema};
use meilisearch_types... |
ETS-1-mediated Transcriptional Up-regulation of CD44 Is Required for Sphingosine-1-phosphate Receptor Subtype 3-stimulated Chemotaxis*
Background: S1P3-mediated chemotaxis plays a pivotal role in various physiological and pathophysiological activities. Results: S1P/S1P3 signaling activates ROCK/JNK/ETS-1/CD44 pathway,... |
package testy
import (
"net/http"
"regexp"
"testing"
)
// Error compares actual.Error() against expected, and triggers an error if
// they do not match. If actual is non-nil, t.SkipNow() is called as well.
func Error(t *testing.T, expected string, actual error) {
var err string
if actual != nil {
err = actual.... |
<reponame>wingej0/3dgradebook2.0<filename>src/app/core/models/user.ts
export interface User {
uid : string,
email : string,
photoURL : string,
displayName : string,
school? : string,
city? : string,
state? : string,
import? : {
source? : string,
domain? : string,
... |
An In-Depth Tutorial For Both New and Old Players
I've started a Let's Play on Youtube to help new players on their journey to complete the game. Vets of the game may have something to learn as well so please check it out, subscribe and more importantly ask questions/leave comments about what you'd like to see. This s... |
<filename>birthdayproblem.py
# -*- coding: utf-8 -*-
"""
Created on Thu Jan 20 18:23:48 2022
@author: olivi
"""
import random
matches = 0
for i in range(1000000):
bdays = []
for j in range(36):
bday = random.randint(1, 365)
if bday in bdays:
matches += 1
break
... |
import disjoint_sets as ds
import heapq as h
def kruskal(graph):
# graph = {edge: {edge: weight}}
forest = ds.DisjointSets()
mst = {}
def add_edge(a, b, w):
forest.connect(a, b)
if a not in mst:
mst[a] = {}
if b not in mst:
mst[b] = {}
mst[a][b] = w
mst[b][a] = w
edge_queue = []
for a, edges i... |
/**
* Documents the return value. Return value is described using the
* {@code @return} annotation.
*
* @param description the return value's description
*/
boolean documentReturn(String description) {
if (!lazyInitDocumentation()) {
return true;
}
if (documentation.returnDescription !=... |
/**
* The Actuator class is used to add or remove Voldemort nodes to the controlled Voldemort cluster.
* The Actuator uses the rebalance tool provided by Voldemort to redistribute data.
*
* @author Ahmad Al-Shishtawy <ahmadas@kth.se>
*
*/
public class Actuator implements Runnable, Steppable {
static Logger lo... |
// Get the score of a Bigram. If the Bigram was
// not found, the score will be 0.
func (b *Bigrams) ScoreForBigram(other Bigram) float64 {
score, has := b.data[other.GetKey()]
if !has {
return 0
}
return score
} |
<gh_stars>100-1000
// Copyright 2021 Northern.tech AS
//
// 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 requ... |
def resolve_mark_agree(mark, lex):
if mark.text == lex.debug["ana"]:
a=5
if mark.head.morph not in ["","_"]:
mark.agree_certainty = "head_morph"
return [mark.head.morph]
else:
if mark.form == "pronoun":
if mark.text in lex.pronouns:
return lex.pronouns[mark.text]
elif mark.text.lower() in lex.prono... |
<reponame>Leehaeun0/react-analytics-provider
import * as faker from 'faker';
import * as initUtils from '../../../src/utils/googleAnalytics/initialize';
const SCRIPT_ID = 'ga-gtag';
describe('googleAnalyticsHelper.initialize', () => {
const setUp = () => {
const trackingId = faker.lorem.word();
const mock... |
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
#define endl '\n'
int a[300005],b[300005][20],c[300005],power[30];
void powerCal() {
power[0] = 1;
for(int i=1;i<30;i++) {
power[i] = power[i-1] * 2;
}
}
int sparshTable(int N) {
for(int ... |
Uneasy alliances: managed care plans formed by safety-net providers.
Health care providers that have traditionally served the poor are forming their own managed care plans, often in alliance with local safety-net peers. These alliances make it easier to raise needed capital, increase the pool of likely enrollees, and ... |
<filename>src/java/org/apache/cassandra/utils/btree/Path.java
/*
* 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 ... |
If you ever visit the Magic City you might have toured the Birmingham Museum of Art, or Vulcan, or the Holocaust Education Center.
President Trump's budget proposal could affect all of those with plans to slash the National Endowment for the Arts and Humanities.
The Director, Gail Andrews, said taxpayers would lose m... |
import { Schema } from '../schema';
import { V1PageCell } from './v1PageCell';
export interface V1UpdatePageCellRequest {
/** V1PageCell */
body: V1PageCell;
}
export declare const v1UpdatePageCellRequestSchema: Schema<V1UpdatePageCellRequest>;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.