content stringlengths 10 4.9M |
|---|
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 22 13:57:00 2022
@author: jdu
Web based GUI of controller tuning panel.
"""
import os
import requests
from filip.clients.ngsi_v2 import ContextBrokerClient
from filip.models.base import FiwareHeader
import PySimpleGUIWeb as sg
class ControllerPanel:
... |
/**
* Loads study annotation groups.
* @param study to load.
*/
public static void loadCollection(Study study) {
loadCollection(study.getAnnotationGroups());
for (AnnotationGroup group : study.getAnnotationGroups()) {
loadCollection(group.getAnnotationFieldDescriptors());
... |
def delete_rocktype(self, rocktypename):
if rocktypename in self.rocktype:
rt = self.rocktype[rocktypename]
del self.rocktype[rocktypename]
self.rocktypelist.remove(rt) |
def Kabsch(A, B, backend="auto"):
A, B, backend = shape_and_backend(A, B, backend)
if backend == "torch":
return kabsch_torch(A[0], B[0])
else:
return kabsch_numpy(A[0], B[0]) |
package ru.ifmo.ctddev.gmwcs.solver;
import ilog.concert.IloException;
import ilog.concert.IloLinearNumExpr;
import ilog.concert.IloNumExpr;
import ilog.concert.IloNumVar;
import ilog.cplex.IloCplex;
import ru.ifmo.ctddev.gmwcs.Pair;
import ru.ifmo.ctddev.gmwcs.TimeLimit;
import ru.ifmo.ctddev.gmwcs.graph.*;
import j... |
package edu.neu.ccs.pyramid.regression.lad_boost;
import edu.neu.ccs.pyramid.dataset.DataSet;
import edu.neu.ccs.pyramid.dataset.RegDataSet;
import edu.neu.ccs.pyramid.optimization.gradient_boosting.GBOptimizer;
import edu.neu.ccs.pyramid.optimization.gradient_boosting.GradientBoosting;
import edu.neu.ccs.pyramid.regr... |
You're invited. Live TV. $20 a month. No cable company. Get 7 days FREE. | View this email in your browser.
You're invited. Be one of the first to try Sling TV – FREE for 7 days. Watch the best of live TV, including ESPN, Adult Swim, Disney Channel, and more. No cable company. Add our Sports Extra, Kids Extra, and New... |
# coding: utf-8
# Your code here!
N,A,B = map(int,input().split())
ans1 = (N - A - B)
if ans1 <= 0:
ans1 = abs(ans1)
else:
ans1 = 0
print(min(A,B),ans1) |
One of the main factors businesses consider when deciding on where to relocate or expand is the available pool of college-educated workers. And that has cities competing for college-educated young adults. “The American population, contrary to popular opinion, is not very mobile, but there is one very significant except... |
Regularized matched-mode processing for source localization.
This paper develops a new approach to matched-mode processing (MMP) for ocean acoustic source localization. MMP consists of decomposing far-field acoustic data measured at an array of sensors to obtain the excitations of the propagating modes, then matching ... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { InjectionToken } from '@angular/core';
import { CdkPortal } from '@angular/cdk/portal';
/**
* Injection toke... |
/**
* Setup data-type and message converters for the given message channel.
* @param channel message channel to set the data-type and message converters
* @param channelName the channel name
*/
@Override
public void configureMessageChannel(MessageChannel channel, String channelName) {
Assert.isAssignable... |
def gather_filepath_list(site_folder):
import os
filepath_list = []
for root, folders, files in os.walk(site_folder):
for filename in files:
fullpath = os.path.join(root, filename)
if ".nii" in fullpath:
filepath_list.append(fullpath.replace(site_folder + "/",... |
#include "framebuffer.h"
int enif_make_framebuffer(ErlNifEnv* env,
struct fb_fix_screeninfo finfo,
struct fb_var_screeninfo vinfo,
ERL_NIF_TERM fd,
ERL_NIF_TERM* fb) {
ERL_NIF_TERM framebuffer = enif_make_new_map(env);
if (!enif_make_map_put(env, framebuffer,
enif_make_atom(env, "__struct_... |
A Switch-Reduced Multicell-to-Multicell Battery Equalizer Based on Full-Bridge Bipolar-Resonant LC Converter
Many battery equalizers have been proposed to achieve voltage consistency between series connected battery cells. Among them, the multicell-to-multicell (MC2MC) equalizers, which can directly transfer energy fr... |
<gh_stars>0
"use strict";
var cryptojs = require('crypto-js')
var Crypto = function Crypto($scope){
this.data = $scope || {}
this.cryptojs = cryptojs
}
Crypto.prototype.MD5 = function(){
return this.cryptojs.MD5(this.data.entry)
}
Crypto.prototype.md5 = function(){
return this.MD5().toString()
}
export function... |
import 'mocha';
describe('sample spec', () => {
it('passes', () => {
});
});
|
def _build_ic(self):
s2 = ee.ImageCollection(self.collection_ids[0])
s2cloud = ee.ImageCollection(self.collection_ids[1])
s2joined = ee.Join.saveFirst('cloud_mask').apply(
primary=s2,
secondary=s2cloud,
condition=ee.Filter.equals(
leftField='sy... |
from sklearn.model_selection import GridSearchCV
from sklearn.svm import SVC
from numpy import nan
from sklearn.metrics import accuracy_score
import pandas as pd
from utils import PreProcessing2ClassesDataset2, HandlingIO
# Preprocessing
handle_io = HandlingIO()
pathsave = "results/test23/"
train_file = "dataset/trai... |
Posttraumatic stress disorder at the end of life.
A Caucasian, unmarried man was referred for inpatient hospice care. He was diagnosed with congestive heart failure and had a history of type 2 diabetes. The patient was referred for hospice care because of increasing difficulties caring for himself, as evidenced by two... |
// InterStore computes the intersection (AND) of all provided bitmaps and save to destination.
func (bs *Bitmaps) InterStore(destination string, names ...string) uint64 {
bm := bs.intersection(names...)
if bm == nil {
return 0
}
bs.mu.Lock()
bs.bitmaps[destination] = &Bitmap{bitmap: bm}
bs.mu.Unlock()
return b... |
/**
* Shows libraries customizer for given library manager.
* @param activeLibrary if not null the activeLibrary is selected in the opened customizer
* @return true if user pressed OK and libraries were successfully modified
*/
@Messages("TXT_LibrariesManager=Ant Library Manager")
public static ... |
After months of lobbying and tweaking, the NCAA's new autonomy proposal has passed. The new set of rules represents the most substantive change of rules in the history of the organization. Basically, the bigger schools will have more power than ever to determine how they operate, which will at some point mean increased... |
/**
* Determines the metadata profile (and the CF type) based on the data contained in the provided WizardData object.
* The user may have explicitly specified the profile(s) to use, or we may have to determine them from the
* community info.
*
* @param wizardData The wizardData object containing the use... |
from math import ceil,gcd
from collections import deque,defaultdict
from heapq import heappush as hpush,heappop as hpop, heapify
n=input()
print( int(n[-1])%2)
|
T cell-based tracking of multidrug resistant tuberculosis infection after brief exposure.
Molecular epidemiology indicates significant transmission of Mycobacterium tuberculosis after casual contact with infectious tuberculosis cases. We investigated M. tuberculosis transmission after brief exposure using a T cell-bas... |
n = int(input())
s = input()
begin = ord('A')
end = ord('Z')
modulo = end - begin + 1
ans = [(ord(c) - begin + n) % modulo for c in s]
ans = ''.join([chr(o + begin) for o in ans])
print(ans)
|
/**
* A RequestHandler handles requests performed over a socket. Specifically it
* - Reads the command string specifying which method is to be invoked
* - Reads the appropriate arguments
* - Delegates the actual invocation to the given sjavac implementation
* - Writes the result back to the socket output strea... |
// By Ratna Priya
class Solution {
public List<Integer> partitionLabels(String s) {
List<Integer> parlen = new ArrayList<>();
int[] lastind = new int[26];
for(int i =0; i<s.length(); i++){
lastind[s.charAt(i)-'a'] = i;
}
int i =0;
while(i<s.length()){
... |
// ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
<filename>hphp/runtime/vm/jit/func-effects.cpp
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2015 Facebook, Inc... |
<filename>bspump/crypto/__init__.py<gh_stars>1-10
from .aes import DecryptAESProcessor
from .aes import EncryptAESProcessor
'''
Test AES
openssl aes-128-cbc -e -in /etc/services -out /Users/ateska/Downloads/services.enc -K 00000000000000000000000000000000 -iv 00000000000000000000000000000000
''' |
<reponame>masatoko/test-ghci-pipe
module GHCi where
import Control.Concurrent (forkIO)
import Control.Monad (forever, unless)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BC
import Data.List (isPrefixOf)
import Dat... |
<reponame>ricky26/netlib<gh_stars>1-10
#include "netlib/shared_memory.h"
#include <Windows.h>
namespace netlib
{
//
// shmem_private
//
struct shmem_internal
{
HANDLE handle;
size_t size;
void *pointer;
shmem_internal()
{
handle = INVALID_HANDLE_VALUE;
size = 0;
pointer = nullptr;
}
stat... |
Analysis of Instantaneous Collision Process of Axial Flow Check Valve Closing
When the pump stops suddenly, the axial flow check valve will shut down suddenly under the action of the medium pressure differential force, and the impact load between the disc and the valve seat will produce when the valve closes, which wi... |
//Checks if a photo exists with specified id and photoLink in the database
@Override
public boolean imageExists(Integer imageId, String imageLink)
{
try
{
LOGGER.info("Queried id: {}", imageId);
boolean returnValue = imageRepo.existsImageIdAndImageLink(imageId, imageLink)... |
Iodine deficiency disorders: Public health measures to mitigate the global burden
Iodine is an essential micronutrient required for the synthesis of the hormones - thyroxine and triiodothyronine. Iodine insufficiency is prevalent throughout the world, and is rated as one of the most significant public health concern i... |
// Unmarshal parses the common formatted checkpoint data and stores the result
// in the Checkpoint.
//
// The supplied data is expected to begin with the following 3 lines of text,
// each followed by a newline:
// - <Origin string>
// - <decimal representation of log size>
// - <base64 representation of root hash>... |
/**
* A response for a transaction that installs a jar in a yet not initialized blockchain.
*/
@Immutable
public class GameteCreationTransactionResponse extends InitialTransactionResponse implements TransactionResponseWithUpdates {
final static byte SELECTOR = 0;
/**
* The updates resulting from the execution of... |
/**
* Reverts the rotation of the {@link IPoint4 Point} around the z-axis by
* the provided rotation angle.
*
* @param <T>
* the {@link Number} type of the {@link IPoint4 Point} to
* rotate.
*
* @param pointToRotate
* the {@link IPoint4 Point... |
A LADAR bare earth extraction technique for diverse topography and complex scenes
Bare earth extraction is an important component to LADAR data analysis in terms of terrain classification. The challenge in providing accurate digital models is augmented when there is diverse topography within the data set or complex co... |
<reponame>zugaldia/capitalbikeshare
from flask.ext.restful import fields, marshal
|
/**
* Represents a single state in the recognition trellis. Subclasses of a token are used to represent the various
* emitting state.
* <p/>
* All scores are maintained in LogMath log base
*/
@SuppressWarnings("serial")
public class Token implements Scoreable {
private static int curCount;
private static ... |
/**
* Reset the reader, so that it can be read again.
*/
public void resetReader() {
this.packetValues.addAll(readableObjects);
this.readableObjects.clear();
this.readableObjects.addAll(packetValues);
this.packetValues.clear();
} |
#include <iostream>
#include <vector>
using tMatriz = std::vector<std::vector<int>>;
const tMatriz calc = {{7,8,9},{4,5,6},{1,2,3}};
bool gana( int s, int n, int x, int y){
bool OK = false;
for (int j = 0; !OK && j < 3; ++j) {
if (calc[j][y] != n && s + calc[j][y] < 31) {
OK = !gana(s + calc[j][y], calc... |
// Add all adjacencies to node at (row, col)
inline std::vector<thrift::Adjacency>
createGridAdjacencys(const int row, const int col, const uint32_t n) {
std::vector<thrift::Adjacency> adjs;
auto nodeId = row * n + col;
auto otherId = row * n + col + 1;
createGridAdjacency(
row,
col + 1,
getIf... |
def hyperglance_automation(boto_session, resource: dict, automation_params = ''):
client = boto_session.client('iam')
policy_arn = resource['attributes']['Policy ARN']
default_version_id = client.get_policy(PolicyArn=policy_arn) ['Policy']['DefaultVersionId']
policy_versions = client.list_policy_versions(
P... |
<gh_stars>0
import Matter from "matter-js";
import * as PIXI from "pixi.js";
import { WorldExtended } from "./exttypes";
import { imgPaths, params } from "./config";
import * as utils from "./utils";
import * as repulsion from "./repulsion";
import * as grouping from "./grouping";
import * as poke from "./randompokes"... |
ATG3, a Target of miR-431-5p, Promotes Proliferation and Invasion of Colon Cancer via Promoting Autophagy
Background Studies have indicated that ATG3 could mediate the effects of other tumor-related regulators in carcinogenesis. However, the expression, role, and mechanism of ATG3 itself in cancers are rarely revealed... |
President Trump fanned the flames that surround Walt Disney Co.’s sports broadcaster ESPN with a Friday morning tweet that fed on critics’ assertions that ESPN’s liberal-leaning politics are ruining the worldwide leader in sports television.
The president claimed that ESPN’s declining viewership, a problem that has ca... |
<reponame>MiniGameWorlds/AllMiniGames
package com.worldbiomusic.allgames.games.solo;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
import org.bukk... |
<filename>electives/gkw/lab/lista-2/ex-1/canvas.ts
import { vertexShaderRaw, fragmentShaderRaw } from './shaders'
export type Colour = number[];
export class MyCanvas {
/**
* WebGL context.
*/
private gl: WebGLRenderingContext
private program: WebGLProgram
public readonly DrawTypes: {
... |
<reponame>LastLeaf/rc_forest
use super::*;
pub trait ForestNodeContent {
#[inline]
fn associate_node(&mut self, _node: ForestNodeSelf<Self>) where Self: Sized { }
#[inline]
fn parent_node_changed(&mut self) where Self: Sized { }
}
|
def consStep(self, step):
df = self.consClean
df = df[df['msg'] == step.value]
if step in [Step.Propose, Step.Prevote, Step.Precommit] :
df = df[df['R'] == 0]
return pd.DataFrame(index=df['H'].values, data={'at':df['at'].values }) |
// Automatically generated code. Edit at your own risk!
// Generated by bali2jak v2002.09.03.
package mdb;
import minidb.je.ExecuteHelpers;
import java.io.File;
import static minidb.je.ExecuteHelpers.myDbEnvPath;
public class CloseCmd extends Close {
final public static int ARG_LENGTH = 1 /* Klu... |
/**
* Get the status of a specific Order
*
* Retrieve the current status of an order being processed
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void vendorOrdersOrderIdStatusGetTest() throws ApiException {
String orderId = null;
IllegalArgu... |
// TestGenerateDockerfileEnvBuildArgs ensures environment variables are used as
// build args.
func TestGenerateDockerfileEnvBuildArgs(t *testing.T) {
t.Parallel()
dockerfile := filepath.Join(generateDockerBaseDir, "args", "buildargs", "Dockerfile")
envPath := filepath.Join(generateDockerBaseDir, "args", "buildargs"... |
/**
* Determine the maximum ciphertext expansion for a given enctype.
*
* @param[in] k0 The rxgk key to be used.
* @param[out] len_out The maximum ciphertext expansion, in octets.
* @return rxgk error codes.
*/
afs_int32
rxgk_cipher_expansion(rxgk_key k0, afs_uint32 *len_out)
{
krb5_context ctx = NULL;
kr... |
<reponame>chirkovd/sim-sub-es-plugin
package org.elasticsearch.plugin;
import com.carrotsearch.randomizedtesting.RandomizedRunner;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.commons.io.IOUtils;
import org.elasticsearch.action.admin.i... |
import base64
import gzip
import json
import textwrap
import uuid
from collections.abc import KeysView, ValuesView
from typing import Any
from box import Box
def lowercase_first_letter(s: str) -> str:
"""
Given a string, returns that string with a lowercase first letter
"""
if s:
return s[0].... |
use crate::commands::prelude::*;
use requester::google::{GoogleSearchData, GoogleScraper as _};
use serenity::builder::CreateEmbed;
use crate::traits::Paginator;
#[command]
#[aliases("g")]
#[min_args(1)]
/// Search gooogle
async fn search(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
let text = arg... |
Patients with HIV and coronary disease: are we meeting national guidelines?
Cardiovascular disease (CVD) has a higher incidence in patients with HIV infection. This study sought to determine whether HIV-infected patients with established CVD were being managed according to national guidelines. Data were collected from... |
The report released on International Migrants Day is critical of Qatar for failing to deliver changes to labour rights or compliance, and warns construction companies, hotels, retail chains and UK and US Universities the cost of doing business in a slave state.
“Every CEO operating in Qatar is aware that their profits... |
AUSTIN — Two of Texas’ most powerful business leaders have mounted a late-hour push to derail an anti-illegal-immigration bill in the Legislature’s special session.
Houston homebuilder Bob Perry and HEB/Central Market grocery chieftain Charles Butt applied pressure Thursday to members of a House panel to block the “sa... |
import tw, { styled, css } from 'twin.macro'
import { Modal } from '@QCFE/qingcloud-portal-ui'
interface IDarkModal {
orient?: 'fullright' | 'center'
dark?: boolean
noBorder?: boolean
}
export const ModalWrapper = styled(Modal)(
({ orient, noBorder = false }: IDarkModal) => [
orient === 'fullright' &&
... |
<filename>webapp/lib/evaluategrade.py<gh_stars>0
import sqlite3
from contextlib import closing
import json
import validators
def urls_without_scheme(src_list):
"""
Looks for urls/domains without scheme and if it exists, it returns true. otherwise false
"""
result = False
for item in src_list:
... |
<gh_stars>0
package server
import (
"time"
"github.com/alexedwards/scs/v2"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/credentials"
"github.com/aws/aws-sdk-go-v2/service/dynamodb"
"github.com/sjansen/dynamostore"
"github.com/sjansen/bouncer/internal/web/config"
)
func (s *Server) openDyn... |
// Tests that RtpPacket::RemoveExtension can successfully remove extension when
// other extensions are present but not registered.
TEST(RtpPacketTest, RemoveExtensionPreservesOtherUnregisteredExtensions) {
RtpPacketToSend::ExtensionManager extensions;
extensions.Register<TransmissionOffset>(kTransmissionOffsetExte... |
<gh_stars>1-10
import { Gender } from '@ayzek/core/conversation';
import { Image } from '@ayzek/core/model/attachment';
import { validateData } from '@ayzek/core/util/config';
import { PromiseMap } from '@meteor-it/utils';
import * as t from 'io-ts';
import { VKApi } from '..';
import GroupingVKApiRequester from '../gr... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
/**
* Represents a Javascript file that will be compiled and run by the V8 engine
*
* Once a script text is set or loaded, you can invoke functions in the
* script using nvokeFunction(String functionName, Object[] parameters)},
* to handle events delivered to it.
*/
public class SXRJavascriptV8File {
/**
... |
After eight months in office, President Donald Trump has bombed Syria, called for increased deployment levels to Afghanistan, and threatened North Korea with “fire and fury like the world has never seen.” Before running for president, though, he tweeted against military intervention in Syria, called the war in Afghanis... |
/**
* Open pdf in available viewer
*
* @param url
*/
public void openPdf(String className) {
String path = resultingPdfs.get(className);
if (path != null) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(new File(Environment
... |
"""
"""
## Standard Library
import sys
import os
from collections import namedtuple
## Third-Party
import colorama
## Constants
STDIN_FD = 0
STDOUT_FD = 1
STDERR_FD = 2
class Stream(object):
"""Coloured text stream in C++ style with verbosity control.
Example
-------
>>> Stream.set_lvl(0... |
/**
* Determines whether the specified JndiDataSourceType enum and the given, supported Pivotal GemFire 'named',
* JNDI DataSource implementation are a match.
*
* @param jndiDataSourceType the given JndiDataSourceType enum used in the match.
* @param name the specified Pivotal GemFire "named" JNDI DataSource ... |
/*
* Call blocker (GoBGP or Arista)
*/
func CallBlocker(acls []ACL, customerID int) (err error){
ch := make(chan *models.ACLBlockerList, 10)
errCh := make(chan error, 10)
defer func() {
close(ch)
close(errCh)
}()
unregisterCommands := make([]func(), 0)
counter := 0
blockerConfig, err := models.GetBlocker... |
def extract_weights(self, name):
weight_layer = (self.merged_model).get_layer(name)
weights = weight_layer.get_weights()[0]
return weights |
import tool.TreeNode;
import java.util.Deque;
import java.util.LinkedList;
/**
* 实现一个二叉搜索树迭代器类BSTIterator ,表示一个按中序遍历二叉搜索树(BST)的迭代器:
* BSTIterator(TreeNode root) 初始化 BSTIterator 类的一个对象。BST 的根节点 root 会作为构造函数的一部分给出。指针应初始化为一个不存在于 BST 中的数字,且该数字小于 BST 中的任何元素。
* boolean hasNext() 如果向指针右侧遍历存在数字,则返回 true ;否则返回 false 。
* i... |
// The extractor trick is in progress. Take the next step, when possible.
// At most one step occurs per frame.
void ProductionManager::doExtractorTrick()
{
if (_extractorTrickState == ExtractorTrick::Start)
{
UAB_ASSERT(!_extractorTrickBuilding, "already have an extractor trick building");
int nDrones = Worker... |
<gh_stars>0
package types
type Double struct {
Target *float64
}
func (b *Double) SetBoolean(v bool) {
panic("Unable to assign boolean to double field")
}
func (b *Double) SetInt(v int32) {
*(b.Target) = float64(v)
}
func (b *Double) SetLong(v int64) {
*(b.Target) = float64(v)
}
func (b *Double) SetFloat(v flo... |
Adrian Brown/Bloomberg via Getty
It’s surprisingly difficult to come up with a truly random sequence of numbers or items. Doing so requires cognitive skills such as memory and attention, as well as a sense of complexity.
“Our brains are wired to find patterns even where there are none – for example, when looking at c... |
In an interview with Komsomolskaya Pravda, Russian history professor Elena Sinyavskaya in a discussion with Alexey Ovchinnikov disputes the factual provenance of the Red Army rape of Germany.
The Myth of the “Rape of Germany” was Invented by Goebbels
In recent years, Victory Day has unfortunately acquired a not very ... |
/***********************************
Copyright 2017 <NAME>
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 agreed to... |
class ForecastAPILoader:
"""
Class that retreives Forecast data from external API
Methods:
________
fetch_forecast(lat, long)
request weather data based on lat/long from external API
load_forecasts_from_api(resorts)
load weather data for each resort in resorts
"""
API_UR... |
/******************************************************************************
* Copyright (c) 2014, <NAME> *
* All rights reserved. *
******************************************************************************/
#inclu... |
import { Application } from 'express';
import bodyParser from 'body-parser';
import cors from 'cors';
import config from '../config';
import api from '../api/index';
import errorMiddleware from '../api/middlewares/errorMiddleware';
import methodOverride from 'method-override';
import HttpException from '../exceptions/H... |
module Test.Locals where
import Test.Tasty
import Test.Tasty.HUnit
import Data.Map.Strict as M
import Locals
tests :: TestTree
tests = testGroup "Tests" [unitTests]
unitTests :: TestTree
unitTests = testGroup "Unit tests"
[ testCase "sum" $ do
let Right (Store store) = run... |
<gh_stars>100-1000
// Copyright (c) 2015 fjz13. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
#include "MedusaPreCompiled.h"
#include "Engine_Binding.h"
#ifdef MEDUSA_LUA
#include "Core/Script/ScriptEngine.h"
#include "Binding/Lua/Geometry_... |
<filename>Source/PointsToDraw.cpp
#include "PointsToDraw.h"
const float * PointsToDraw::getRawData() const noexcept {
return data.data();
}
//Return: start position and interval size
Pair<int, int> PointsToDraw::operator[](unsigned int intervalNumver) const {
return Pair<int, int>(intervals[intervalNumver], interva... |
#pragma once
/** GPS Status, as provided by rcd */
typedef enum {
/** Timestamp is invalid */
GpsTimeInvalid,
/** Using CPU time */
UsingCpuTime,
/** Using GPS time */
UsingGpsTime
} GpsTimeStatus_t;
|
<gh_stars>10-100
use crate::{
spawn::{spawn_task, task_name},
Bus, Lifeline,
};
use log::{debug, error};
use std::future::Future;
use std::{any::TypeId, fmt::Debug};
/// Takes channels from the [Bus](./trait.Bus.html), and spawns a tree of tasks. Returns one or more [Lifeline](./struct.Lifeline.html) values. ... |
def begin(self):
logging.debug('begin')
x = self.read8(self.TSL2561_REGISTER_ID)
if not(x & 0x0A):
return False
self._tsl2561Initialised = True
self.set_integration_time(self._tsl2561IntegrationTime)
self.set_gain(self._tsl2561Gain)
self.disable()
... |
<reponame>oliverbunting/clash-compiler
{-# LANGUAGE RankNTypes #-}
module Clash.Tests.Laws.Enum (tests) where
import Control.DeepSeq (NFData)
import Data.Proxy
import Test.Tasty
import Test.Tasty.HUnit
import Clash.Sized.Index (Index)
import Clash.Sized.Signed (Signed)
import Clash.Sized.Unsigned (Unsigned)
import ... |
Senate Minority Leader Harry Reid launched a petition on Monday pressuring Donald Trump to prove he can pass the U.S. citizenship test.
The petition said Trump should "put up or shut up" about immigration until the GOP presidential nominee can show his knowledge of the country he intends to lead.
"Donald Trump wants ... |
#include "IOMC/ParticleGuns/interface/BeamMomentumGunProducer.h"
#include "DataFormats/Math/interface/deltaPhi.h"
#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWC... |
def _on_disconnect(client, userdata, return_code):
_logger.info(''.join(('Client has disconnected with code <', str(return_code), '>.')))
client.connected = False |
/*
* WARNING! All changes made in this file will be lost!
* Created from 'scheme.tl' by 'mtprotoc'
*
* Copyright (c) 2021-present, Teamgram Studio (https://teamgram.io).
* All rights reserved.
*
* Author: teamgramio (<EMAIL>)
*/
package status_client
import (
"context"
"github.com/teamgram/proto/mtproto"... |
// Copyright 2015 Google Inc. 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.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable... |
<filename>bin/kegbot_core.py<gh_stars>1-10
#!/usr/bin/env python
from kegbot.pycore import kegbot_app
__doc__ = kegbot_app.__doc__
if __name__ == '__main__':
kegbot_app.KegbotCoreApp.BuildAndRun()
|
/**
* Extracts the OperationId from a Operation-Location returned by the POST Read operation
* @param operationLocation
* @return operationId
*/
private static String extractOperationIdFromOpLocation(String operationLocation) {
if (operationLocation != null && !operationLocation.isEmpty()) {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.