content stringlengths 10 4.9M |
|---|
<gh_stars>0
module Evaluator
( evaluate,
evaluateRepl,
evaluateDefines,
Value (..),
Context,
) where
import Text.Read (readMaybe)
import Data.Maybe (fromMaybe)
import Control.Exception (throw)
import qualified Data.Map.Strict as Map
import Parser (Expression (..))
import Exception (HE... |
<reponame>adessoSE/budgeteer
package de.adesso.budgeteer.rest.project.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import javax.validation.constraints.Positive;
@Getter
public class UpdateDefaultProjectModel {
@Positive private final long newDefaultProjectId;
public Up... |
Lisa Bloomquist
Activist Post
A U.S. military publication, The Air Force Times, made the connection that victims of Fluoroquinolone Toxicity Syndrome (“Floxies”) have been screaming about for years – that Gulf War Illness is tied to Cipro. In an article entitled, “New FDA warnings on Cipro may tie into Gulf War Illne... |
/*
* Copyright 2021, Yahoo Inc.
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root for terms.
*/
package com.yahoo.elide.datastores.aggregation.queryengines.sql.metadata;
import com.yahoo.elide.core.type.Type;
import com.yahoo.elide.datastores.aggregation.annotation.JoinType;
impo... |
////////* ********************* IN_THE_NAME_OF_ALLAH *******************///////
#include<bits/stdc++.h>
#include<iostream>
#define endl '\n'
#define Faltu_code() return 0
#define sp setprecision
#define ll long long
using namespace std;
long long mn =1e12 ;
void fast()
{
ios::... |
def parse_json_site_response(text):
jdata = json.loads(text)
data = []
for site in jdata.get(u'ResponseData', {}):
if site.get(u'Type') == 'Station':
data.append({u'name': site['Name']})
return data |
#ifndef HTTP_H
#define HTTP_H
#include <stdio.h>
#include <osi.h>
#include <termcaps.h>
#include <app.h>
#include "http-parser.h"
#define HTTP_OUTPUT_HEADER \
COLOR_BEGIN(LIGHT_MAGENTA, \
"-------------------------------------------------------\n" \
"-------------------- " BOLD("HTTP Header") " ---... |
<filename>internal/mail/smtp_test.go
package mail
import (
"reflect"
"testing"
)
func TestSmtpMail(t *testing.T) {
provider, err := NewMailProvider("smtp://<EMAIL>:587")
if err != nil {
t.Errorf("can't get smtp provider")
}
providerType := reflect.TypeOf(provider).String()
if "*mail.smtpProvider" != provide... |
<reponame>sgholamian/log-aware-clone-detection
//,temp,StorageManagerImpl.java,2227,2292,temp,StorageManagerImpl.java,2016,2111
//,3
public class xxx {
@Override
public ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd) {
String providerName = cmd.getProviderName();
DataS... |
<filename>frontend/src/components/icons/index.ts
export * from './vega'
|
Computer-assisted Children Physical Fitness Detection and Exercise Intervention Evaluation based on Artificial Intelligence Model
Computer-assisted children physical fitness detection and exercise intervention evaluation based on artificial intelligence model is implemented in this research. Big data is usually a mode... |
//#region imports
import * as React from 'react';
import { RouteHandler } from 'components';
import { routes } from './routes';
//#endregion
/**
* Common route handler for all `/algo` paths.
*/
const Algorithms: React.SFC<{}> = () => (
<RouteHandler routes={routes} />
);
export default Algorithms;
|
/**
* Setting up the View and initializing the Google Map.
* Filling the tables for Mode and Purpose Icons.
* Setting default STATE of the LocationService to OFF.
*
* @param savedInstanceState
*/
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(save... |
// Copyright 2018 Google LLC
//
// 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
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... |
/**
* Terminate our worker thread, either immediately or after waiting
* for it to return to idle state.
*
* @param waitForIdle Whether to wait until the thread is not busy
* to notify it.
*/
private void terminate(boolean waitForIdle) {
shutdown = true;
if (queuedThread != null) {
String thread... |
import { Future } from '@ephox/katamari';
import { btoa } from '@ephox/dom-globals';
import { ImageDialogInfo } from './DialogTypes';
import Settings from '../api/Settings';
import Imgproxy from '../core/Imgproxy';
const collect = (editor, url): Future<ImageDialogInfo> => {
const imgproxySettings = {
url: Settin... |
class Preprocessor:
"""
Performs additional transformations that can't be performed, or would be
too complicated for the Transformer, before the tree is compiled.
"""
@staticmethod
def fake_tree(block):
"""
Get a fake tree
"""
return FakeTree(block)
@staticm... |
Around 4,000 people participated in the demonstration, the largest since South Korea and the United States agreed to deploy the system, known as Terminal High-Altitude Area Defence (THAAD)
ADVERTISING Read more
Seoul (AFP)
Thousands of protesters marched near the US embassy in Seoul on Saturday, accusing President D... |
<gh_stars>10-100
package org.onebillion.onecourse.mainui.oc_addtakeaway;
import android.graphics.Color;
import android.graphics.PointF;
import org.onebillion.onecourse.controls.OBControl;
import org.onebillion.onecourse.controls.OBGroup;
import org.onebillion.onecourse.controls.OBLabel;
import org.onebillion.onecours... |
def device_serial(self):
if not self.default_serial:
devices = self.devices()
if devices:
if len(devices) == 1:
self.default_serial = list(devices.keys())[0]
else:
raise EnvironmentError(
"Multiple devices attached but default android serial not set.")
... |
<filename>src/main/java/net/algorithm/answer/SumofIntegers.java<gh_stars>0
package net.algorithm.answer;
public class SumofIntegers {
public static void main(String[] args) {
System.out.println(new SumofIntegers().getSum(1, 99));
}
public int getSum(int a, int b) {
while (b != 0) {
... |
Israeli policemen suspected of shooting dead a 10-year-old Palestinian schoolgirl in 2007 will escape prosecution after a court said that too much time had elapsed to allow a re-examination of the case.
The decision will come as a blow for the girl's parents, who have campaigned for justice for their daughter, Abir Ar... |
Photo: Stina Järperud
She fled for her life after getting death threats in Syria. Now journalist Rowa Alkhatib has landed a plum job as a talk-show host with Sweden’s national radio broadcaster. She tells The Local Voices how she’s now helping quench Arabic speakers’ thirst for knowledge about their new home.
Back in... |
def number_of_states_in_band(self, band=1, vibgen_approx=None,
Nvib=None, vibenergy_cutoff=None):
nret = 0
for state in self.allstates(mult=band, mode="EQ", save_indices=False,
vibgen_approx=vibgen_approx, Nvib=Nvib,
... |
/**
* Created by vincent on 16-7-20.
* Copyright @ 2013-2016 Platon AI. All rights reserved
*/
public class TestJCommander {
private ImmutableConfig conf = new ImmutableConfig();
@Test
public void quoted() {
class Cmd {
@Parameter(names = {"-instance", "-ins"}, required = true, desc... |
Brexit campaign leader Nigel Farage has called out billionaire open borders campaigner George Soros and his “reliable friends” for collusion on a grand scale.
George Soros has spent billions in the EU to undermine the nation state. This is where the real international political collusion is. pic.twitter.com/ANXOII7SFY... |
/* eslint-disable @typescript-eslint/no-empty-interface */
import SERVER_PACKETS from '../packets/server';
import { DATA_TYPES } from '../types/data';
export default {
[SERVER_PACKETS.LOGIN]: [
['success', DATA_TYPES.boolean],
['id', DATA_TYPES.uint16],
['team', DATA_TYPES.uint16],
['clock', DATA_TYP... |
<gh_stars>10-100
#!/usr/bin/env python
#
# Copyright (C) 2018 The Android Open Source Project
#
# 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... |
/**
* @brief Constructor.
*
* @param line_number The line number of "PARTITION CLAUSE" in the SQL statement.
* @param column_number The column number of "PARTITION CLAUSE" in the SQL statement.
* @param partition_type The type of partitioning to be made - Hash or Range
* @param attribute_name_list A l... |
/// Read File To Buffer, Return File Length
pub fn read(&self, buf: &mut [u8]) -> Result<usize, FileError> {
let length = self.detail.length().unwrap();
let spc = self.bpb.sector_per_cluster_usize();
let cluster_size = spc * BUFFER_SIZE;
let mut number_of_blocks = spc;
if buf.len... |
<filename>src/org/usfirst/frc/team3539/robot/commands/DisableSoftLimits.java
package org.usfirst.frc.team3539.robot.commands;
import org.usfirst.frc.team3539.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;
/**
* Disables softlimits when a button on the dashboard is pressed
*/
public class DisableSoftLi... |
def query(self, _id, conditions={}):
j = self.get_newest(_id)
if j == None:
return json.dumps("Model not found")
try:
domains=j.domains
return json_convert(j.query(**conditions))
except:
return json.dumps("You have not yet fully specified ... |
def _start(self) -> NoReturn:
self._timer = threading.Timer(self.period, self._run_callback)
self._timer.name = self.name
self._timer.start()
self._timestamp = time() |
<gh_stars>0
extern crate cast;
#[macro_use]
extern crate criterion;
extern crate criterion_stats as stats;
extern crate rand;
mod common_bench;
macro_rules! stat {
($ty:ident <- $($stat:ident),+) => {
$(
fn $stat(c: &mut Criterion) {
let v = ::common_bench::vec::<$ty>();
... |
/**
* DOCUMENT (langr) - insert description
*
* @author langr
* 18.10.2009, 15:08:13
*
*/
public class clsPAInspectorFunctional extends Inspector implements ActionListener {
private static final long serialVersionUID = -1191073481242249784L;
private JGraph moGraph;
private ArrayList<clsNode> moRootNodes;
... |
import { CircularProgress, IconButton, List, ListItem, ListItemIcon, ListItemText, TextField } from '@material-ui/core';
import { useEffect, useState } from 'react';
import AddIcon from '@material-ui/icons/Add';
import DeleteIcon from '@material-ui/icons/Delete';
import "./TokBrowser.css";
import { createURL } from '..... |
Real-world object categories and scene contexts conjointly structure statistical learning for the guidance of visual search
We examined how object categories and scene contexts act in conjunction to structure the acquisition and use of statistical regularities to guide visual search. In an exposure session, participan... |
<gh_stars>1-10
{- |
Module "Database.PostgreSQL.PQTypes.SQL.Builder" offers a nice
monadic DSL for building SQL statements on the fly. Some examples:
>>> :{
sqlSelect "documents" $ do
sqlResult "id"
sqlResult "title"
sqlResult "mtime"
sqlOrderBy "documents.mtime DESC"
sqlWhereILike "documents.title" "%patte... |
BOCA RATON – Between garage sales at his home in the Charlestown neighborhood of Boston and fleeing South Florida ahead of the arrival of Hurricane Irma, Kelly Olynyk spent plenty of time in Miami this summer getting to know his new teammates.
And Olynyk, who signed a four-year, $50 million contract in July, sees a pa... |
import {test} from "./test.ts"
export function maybe<A, B>(x?: A, z: B, f: (a: A) => B): B {
return x === undefined ? z : f(x)
}
test(maybe, undefined, -1, x => x + ' ok').is = -1
test(maybe, 'seems', -1, x => x + ' ok').is = 'seems ok'
export function nub<A>(xs: A[]): A[] {
const seen = new Set<A>()
return xs... |
<reponame>snehalpersistent/snehalvgithub
import { createSelector } from "reselect";
import { IRootState } from "../reducers/rootReducer";
function getDatabaseState(state: IRootState) {
return state.database;
}
export const getInfo = createSelector(
getDatabaseState,
state => state.info
);
|
// newStreamWriter creates a streamer that will be used to stream the
// requests that occur within this session to the audit log.
func (s *Server) newStreamWriter(identity *tlsca.Identity, app types.Application) (events.StreamWriter, error) {
recConfig, err := s.c.AccessPoint.GetSessionRecordingConfig(s.closeContext)... |
<reponame>stitchfix/librato
/*
Package librato is a pure go client for publishing metrics to Librato.
The package publishes metrics asynchronously, at a regular interval. If the package is unable to
log metrics (network issues, service outage, or the app being overloaded), it will drop metrics instead of degrading the... |
<filename>src/client/containers/Header/index.tsx
import React, { useContext, useMemo } from 'react';
import { Dropdown, Menu } from 'antd';
import { AppContext } from '../../context/appContext';
import { logout } from '../../service/user';
import styles from './header.module.less';
const { Item } = Menu;
const Header... |
/**
* bam_issue_pending - starts pending transactions
* @chan: dma channel
*
* Calls tasklet directly which in turn starts any pending transactions
*/
static void bam_issue_pending(struct dma_chan *chan)
{
struct bam_chan *bchan = to_bam_chan(chan);
unsigned long flags;
spin_lock_irqsave(&bchan->vc.lock, flags)... |
/**
* Decides what to do based on the intent that started this activity
* @param intent Intent that started this activity
*/
private void processIntent(Intent intent) {
Serializable movie = intent.getSerializableExtra(Constants.EXTRA_MOVIE);
if (movie == null || !(movie instanceof Movie))... |
// Copyright 2019 The color Authors. All rights reserved.
// Use of this source code is governed by a MIT
// license that can be found in the LICENSE file.
package color_test
import (
"testing"
color "github.com/zchee/color/v2"
)
func TestAttributeString(t *testing.T) {
tests := []struct {
attr color.Attribute... |
import {Component, OnInit} from '@angular/core';
import {FormControl, FormGroup, Validators} from '@angular/forms';
import {ValidationService} from '../../services/validation.service';
import {GetApi} from '../../modules/GetApi';
import {ApiService} from '../../services/api/api.service';
import {Router} from '@angular/... |
GRAND RAPIDS -- Business is booming in at least one sector of the local and national economy: bankruptcy. The
saw its caseload jump nearly 58 percent in March as more individuals and businesses are bitten by the recession.
Bankruptcy filings are up nearly 40 percent through the first quarter of 2009, with 3,916
in t... |
def main(args):
setupLogging(args)
config.init()
app = App()
def SIGINT_handler(num, frame):
__logger.info("Signal handler triggered, purging application")
app.purge()
signal.signal(signal.SIGINT, SIGINT_handler)
signal.signal(signal.SIGHUP, SIGINT_handler)
app.setup(args)
... |
#include <iostream>
using namespace std;
int main()
{
int t;
cin>>t;
for(int x=1;x<=t;x++){
string z;
cin>>z;
int c=0;
string j="";
for(int k=1;k<=z.size();k++)
if(z[k]==z[k-1] && z[k]!='?'){
cout<<-1<<endl;
goto h1;
... |
/**
* Will add an error situation and how to handle it to the response mapping. If a there has been a mapping
* before this will be overwritten.
*
* @param responseStatus Http status to react to.
* @param errorHandling Object holding error handling informations.
* @... |
<gh_stars>1-10
package de.adito.git.impl.data;
import com.google.inject.AbstractModule;
import com.google.inject.assistedinject.FactoryModuleBuilder;
/**
* Guice Module for the data package
*
* @author m.kaspera, 24.12.2018
*/
public class DataModule extends AbstractModule
{
@Override
protected void configur... |
package io.behindthemath.mjolnir.utils;
/**
* Created by <NAME> on 3/16/2017.
*/
public class Utils {
/**
* Searches the specified array of chars for the specified value.
*
* @param charArray The array to be searched
* @param value The value to be searched for
* @return The index of the ... |
/* Reset and restore all of the 3c574 registers. */
static void tc574_reset(struct net_device *dev)
{
struct el3_private *lp = netdev_priv(dev);
int i;
kio_addr_t ioaddr = dev->base_addr;
unsigned long flags;
tc574_wait_for_completion(dev, TotalReset|0x10);
spin_lock_irqsave(&lp->window_lock, flags);
outw(0, ioa... |
/*
Copyright 2018-2020 National Geographic Society
Use of this software does not constitute endorsement by National Geographic
Society (NGS). The NGS name and NGS logo may not be used for any purpose without
written permission from NGS.
Licensed under the Apache License, Version 2.0 (the "License"); you may... |
def move_and_tuning(model, adversarial_samples, target_samples, init_preds, n_calls, device, parameter, move_type,
num_trial, step_max, reduce_threshold=0.2, increase_threshold=0.7,
increase=0.9, decrease=0.9):
if move_type == 'forward':
print("\tForward step...")
... |
/**
* Adds a child to this submenu object.
*
* @param item The item to add
*/
public void addChild(MenuItem item){
if(children == null){
children = new ArrayList<MenuItem>();
}
children.add(item);
} |
<gh_stars>0
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*---------------------------------------------------... |
# Warning: this file is auto-generated. Do not edit.
from ctypes import POINTER, c_char, c_char_p, c_int64, c_uint32
"""
File xr.raw_functions.py
Defines low-level ctypes function definitions for use by
higher-level pythonic functions in pyopenxr.
"""
from .library import openxr_loader_library
from .enums import *
... |
/**
* Action class for the Run -> Assemble menu item (and toolbar icon)
*/
public class RunAssembleAction extends GuiAction {
private static ArrayList MIPSprogramsToAssemble;
private static boolean extendedAssemblerEnabled;
private static boolean warningsAreErrors;
// Threshold for adding filename to prin... |
/**
* Creates the cache if it does not exist.
* @param context the bundle context that will be used by the case
* @return the created cache (or the existing cache)
*/
private static ServiceRegistryCache createCache(BundleContext context) {
ServiceRegistryCache cache = null;
boolean open = false;
synchroni... |
/**
* This method add this node into a cluster with given cluster ID. If
* such cluster doesn't exist in ClusterManager, it creates a new cluster.
*/
public void addCluster(int clusterID)
{
ClusterManager cm = this.graphManager.getClusterManager();
Cluster cluster = cm.getClusterByID(clusterID);
if (cl... |
EFFICIENT PRODUCTION OF URIDINE 5′-DIPHOSPHO-N-ACETYLGLUCOSAMINE BY THE COMBINATION OF THREE RECOMBINANT ENZYMES AND YEAST CELLS
Uridine 5′-diphospho N-acetylglucosamine (UDP-GlcNAc) is an important nucleotide sugar in the biochemistry of all living organisms, and it is an important substrate in the synthesis of oligo... |
def notifications(request):
return_dict = {}
return_dict['notifications'] = [ m.message for m in get_messages(request)]
if hasattr(request, '_notifications_count'):
return_dict['notifications_count'] = request._notifications_count
return return_dict |
def IterOneAsync(inter_mat,vect,values):
vect1 = vect[:]
index = int(inter_mat.shape[0] * random.random())
value = np.dot(inter_mat[index], vect1)
if value > 0:
vect1[index] = int(values[0])
elif value < 0:
vect1[index] = int(values[1])
else:
True
return vect1 |
import os
import time
import boto3
import constants
import utility as util
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
def lambda_export_rds_snapshot_to_s3(event, context):
"""start export task of RDS snapshot to S3 bucket"""
region = os.environ['Region']
rds = boto3.client... |
package com.randolltest.facerecognition.ui.home;
import android.Manifest;
import android.os.Bundle;
import android.view.View;
import com.arcsoft.face.ErrorInfo;
import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.SPUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.ftd.livepermissions... |
Detection of plasmacytoma of the nasal cavity by immunoelectrophoresis of nasal washing fluid
A patient with a solitary IgG-lambda plasmacytoma of the nasal cavity is described. Immunoelectrophoresis of the nasal washing fluid showed the presence of the same paraprotein. After radiotherapy the tumour and the paraprote... |
// argumentValue returns closure that returns log argument used in log message.
func (f *Formatter) argumentValue(position int, argument interface{}) func() interface{} {
return func() interface{} {
f.usedArguments[position] = true
return argument
}
} |
def compute_stress_objective(self, xPhys, dobj, p=4):
rho = self.compute_young_moduli(xPhys)
EBu = sum([self.EB @ self.u[:, i][self.edofMat.T]
for i in range(self.nloads)])
s11, s22, s12 = numpy.hsplit((EBu * rho / float(self.nloads)).T, 3)
self.stress[:] = numpy.sqrt(... |
<filename>mini_dbms/mdb/src/mdb/OneRelClause.java
// Automatically generated code. Edit at your own risk!
// Generated by bali2jak v2002.09.03.
package mdb;
import Jakarta.util.*;
import java.io.*;
import java.util.*;
public class OneRelClause extends One_rel_clause {
final public static int ARG_LENGT... |
def bootstrap_chef():
with settings(user='root'):
run('apt-get update')
run('apt-get -y dist-upgrade')
run('apt-get install -y git-core rubygems ruby ruby-dev')
run('gem install --no-rdoc --no-ri chef')
rsync_project(remote_dir='/etc/chef/', local_dir=CONFIG_ROOT + sep)
... |
/**
* \file pcm/pcm_extplug.c
* \ingroup Plugin_SDK
* \brief External Filter Plugin SDK
* \author <NAME> <<EMAIL>>
* \date 2005
*/
/*
* PCM - External Filter Plugin SDK
* Copyright (c) 2005 by <NAME> <<EMAIL>>
*
*
* This library is free software; you can redistribute it and/or modify
* it under the te... |
/**
* Represents a game mode.
*/
abstract class Mode {
//tappa 6
boolean isPaused;
boolean isPlayMode;
/*
* Draws the plane and the ball.
*/
public abstract void display();
/*
* Implements the mouse dragged action for the mode.
*/
public void mouseDragged(){}
/*
* Implements ... |
package main
import (
"flag"
"math/rand"
"os"
"time"
"github.com/golang/glog"
"github.com/google/uuid"
"github.com/openshift/cluster-version-operator/pkg/autoupdate"
"github.com/openshift/cluster-version-operator/pkg/cvo"
clientset "github.com/openshift/cluster-version-operator/pkg/generated/clientset/versio... |
// NewRowNumberOperator creates a new exec.Operator that computes window
// function ROW_NUMBER. outputColIdx specifies in which exec.Vec the operator
// should put its output (if there is no such column, a new column is
// appended).
func NewRowNumberOperator(input Operator, outputColIdx int, partitionColIdx int) Oper... |
package main
import (
cmd "github.com/rafaelbreno/go-api-template/api/cmd"
)
func main() {
cmd.Boostrap()
}
|
import { NgModule } from '@angular/core';
import { PagesComponent } from './pages.component';
import { PagesRoutingModule } from './pages-routing.module';
import { ThemeModule } from '../@theme/theme.module';
import { BuddyComponent } from './buddy/buddy.component';
import { BuddyinfoComponent } from './buddyinfo/budd... |
def resize_by_width(image: Image.Image, nw: int) -> Image.Image:
w, h = image.size
if w == nw:
return image
w_ratio = float(nw) / float(w)
new_size = (nw, round(float(h) * w_ratio))
new_image = image.resize(new_size, Image.ANTIALIAS)
return new_image |
def clear_state(self, key_space):
LOG.debug("Clearing key space: %s", key_space)
try:
rv = self.etcd_client.read(key_space)
for child in rv.children:
self.etcd_client.delete(child.key)
except etcd.EtcdNotFile:
pass |
<gh_stars>1-10
#
# Top-level program for XML test suite
#
import regrtest
del regrtest.STDTESTS[:]
def main():
tests = regrtest.findtests('.')
regrtest.main( tests, testdir = '.' )
if __name__ == '__main__':
main()
|
/**
* Parses and sets comma delimited target list
*/
void tcAreaGoal::SetTargetList(const std::string& targets)
{
targetList.clear();
AddToTargetList(targets);
} |
def patterns():
cat = np.array([[1, 0, 1, 1, 0, 1], [0, 1, 0, 0, 1, 0]]).T
items = np.array(['absence', 'hollow', 'pupil', 'fountain', 'piano', 'pillow'])
patterns = {
'items': items,
'vector': {'loc': np.eye(6), 'cat': cat},
'similarity': {'loc': np.eye(6), 'cat': np.dot(cat, cat.T)... |
<reponame>ClintLawson/hiring-exercise
import React from "react";
import { CircularProgress, Modal } from "@mui/material";
interface props {
loading: boolean;
}
const LoadingPopup: React.FC<props> = ({ loading }) => {
return (
<Modal open={loading} style={{ display: "flex" }}>
<CircularProgress color="inh... |
/**
* The implementation that is used to create transfer jobs that callout to the new globus-url-copy
* client, that support multiple file transfers
*
* <p>In order to use the transfer implementation implemented by this class,
*
* <pre>
* - the property pegasus.transfer.*.impl must be set to value TPTGUC.... |
/**
* Checks whether the given lat and lon values are not null and within their
* allowed boundaries.
*
* @param lat
* @param lon
* @return
*/
public static boolean isValid(Double lat, Double lon) {
return lat != null && lon != null
&& lat >= -90.0 && lat <= 90... |
def _cell_center_position(cell: Cell) -> Position:
n_half = N_CELLS_PER_ROW / 2
px = (cell[0] - n_half) * DIE_WIDTH + DIE_WIDTH / 2
py = (cell[1] - n_half) * DIE_WIDTH + DIE_WIDTH / 2
pz = DIE_WIDTH / 2
return (px, py, pz) |
<reponame>nqn/kubernetes
/*
Copyright 2014 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 applic... |
Crystallite size and strain calculations of hard particle reinforced composite powders (Cu/Ni/Fe–WC) synthesized via mechanical alloying
In this study, Cu–25WC, Ni–25WC, and Fe–25WC (all in wt%) composite powders were produced via mechanical alloying (MA) and characterized for their potential utilization in particulat... |
/**
* It listen to the input socket, when a message is received the proper
* communication method is invoked.
*
*
*/
public class SocketMessageHandlerIn implements Runnable {
private static final Logger LOGGER = Logger.getLogger(SocketMessageHandlerIn.class.getName());
private ObjectInputStream socketIn;
priv... |
from __future__ import unicode_literals
from django.db import models
# from django.utils import timezone
# from orca.scripts import self_voicing
# There is no actual data stored in this model.
# It's only an example holding information about the file you uploaded
# Create your models here.
class UploadedFile(model... |
<filename>pkg/commands/options/filename.go
package options
import (
"github.com/spf13/cobra"
)
// FilenameOptions
type FilenameOptions struct {
Filename string
}
func AddFilenameArg(cmd *cobra.Command, fo *FilenameOptions, required bool) {
cmd.Flags().StringVarP(&fo.Filename, "filename", "f", "",
"The path to t... |
package GoReactive
import (
"testing"
"time"
"github.com/stvp/assert"
)
/// Returns an observable which emits 1, 2, 3, 4, and 5 then completion
func oneToFiveObservable() Observable {
return NewObservableSlice([]interface{}{1, 2, 3, 4, 5})
}
/// Returns an observable which emits 1, 1, 2, 3, 3, 4, 5 and 5 t... |
Association of serum folate levels during pregnancy and prenatal depression.
OBJECTIVE
To evaluate the association between serum folate levels during pregnancy and prenatal depression and the extent to which obesity may modify this relationship.
METHODS
This secondary data analysis leveraged data from a previous stu... |
/*
* Copyright (c) 2016 Cray Inc. All rights reserved.
* Copyright (c) 2017 Los Alamos National Security, LLC. All rights reserved.
* Copyright (c) 2019-2020 Triad National Security, LLC.
* All rights reserved.
*
* This software is available to you under a choice of one of two
* licenses.... |
<gh_stars>10-100
from pipeline.builder import * # noqa
def parallel_pipeline(branch_nums):
print("prepare pipeline...")
node_count = 10
start = EmptyStartEvent()
first_acts = []
for i in range(branch_nums):
acts = [ServiceActivity(component_code="debug_node") for _ in range(node_count)]
... |
/*
* Copyright 2019 The Kythe Authors. 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 ap... |
// set 3-digit text to the window
inline VOID DoSetWindowInt03(HWND hWnd, INT n)
{
TCHAR szBuf[8];
szBuf[0] = TCHAR('0' + n / 100 % 10);
szBuf[1] = TCHAR('0' + n / 10 % 10);
szBuf[2] = TCHAR('0' + n % 10);
szBuf[3] = 0;
SetWindowText(hWnd, szBuf);
} |
def _run(bot, inputs, logger, server_override=None, botengine_override=None):
global _bot_logger
_bot_logger = logger
next_timer_at_server = None
if botengine_override is None:
services = None
if 'services' in inputs:
services = inputs['services']
count = None
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.