content stringlengths 10 4.9M |
|---|
//
// AlbumSecondViewController.h
// DouPaiwo
// 专辑详情界面内容
// Created by J006 on 15/9/14.
// Copyright (c) 2015年 <EMAIL>. All rights reserved.
//
#import "BaseViewController.h"
#import "AlbumInstance.h"
@interface AlbumSecondViewController : BaseViewController
- (void)initAlbumSecondViewControllerWithAlbum :(Alb... |
import re
import pytest
from pandas import Timedelta
import pandas.tseries.frequencies as frequencies
import pandas.tseries.offsets as offsets
@pytest.mark.parametrize(
"freq_input,expected",
[
(frequencies.to_offset("10us"), offsets.Micro(10)),
(offsets.Hour(), offsets.Hour()),
((5... |
import { SignalStrength20 } from "../../";
export = SignalStrength20;
|
/**
* \brief Returns true iff the given timer is active / enqueued
*/
bool timer_is_running(struct timer *timer)
{
return timer && (timer->next || timer->prev ||
timer_queue == timer || timers_pending_insertion == timer);
} |
Climate denier in White House prompts a 'March for Science' on Earth Day
Denis Hayes, coordinator of the first Earth Day, helped organize this year's action, which may prove to be an important moment for those opposed to President Donald Trump. Denis Hayes, coordinator of the first Earth Day, helped organize this year... |
import sys
import streamlit as st
import textwrap
import networkx as nx
import pandas as pd
import altair as alt
import nx_altair as nxa
import inspect
from autogoal.kb import build_pipeline_graph
@st.cache(allow_output_mutation=True)
def eval_code(code, *variables):
locals_dict = {}
exec(code, globals(), lo... |
<filename>src/com/jayantkrish/jklol/cli/AbstractCli.java
package com.jayantkrish.jklol.cli;
import java.io.IOException;
import java.util.Arrays;
import java.util.Set;
import joptsimple.OptionException;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
import com.google.common... |
// Called every time the scheduler runs while the command is scheduled.
@Override
public void execute() {
currentAngle = turret.getPosition();
if(targetAngle > currentAngle){
turret.move(-.6);
}
if(targetAngle < currentAngle){
turret.move(.6);
}
} |
/**
* Add hex integer BEFORE current getIndex.
* @param buffer
* @param n
*/
public static void prependHexInt(Buffer buffer, int n)
{
if (n==0)
{
int gi=buffer.getIndex();
buffer.poke(--gi,(byte)'0');
buffer.setGetIndex(gi);
}
e... |
/*!
* @file SFGamma.cc
* @brief Implementation of various forms of the Gamma function.
* @author Segev BenZvi
* @date 17 Apr 2012
* @version $Id: SFGamma.cc 26761 2015-08-25 20:53:58Z tweisgarber $
*/
#include <hawcnest/Logging.h>
#include <data-structures/math/SpecialFunctions.h>
#ifdef HAVE_GSL
//
#include <g... |
<reponame>ThorbenKuck/Keller
package com.github.thorbenkuck.keller.di;
import java.util.Map;
public interface InstantiateStrategy {
<T> T construct(final Class<T> type, final Map<Class<?>, Object> bindings);
default <T> T get(final Class<T> type, final Map<Class<?>, Object> bindings) {
if(bindings.get(type) != ... |
<reponame>max0x4e/bytecode<filename>src/ghc-9.2.1/libraries/directory/tests/FindFile001.hs<gh_stars>0
{-# LANGUAGE CPP #-}
module FindFile001 where
#include "util.inl"
import qualified Data.List as List
import System.FilePath ((</>))
main :: TestEnv -> IO ()
main _t = do
createDirectory "bar"
createDirectory "qux... |
/**
* Component registering url policies and document view codecs.
*
* @author <a href="mailto:at@nuxeo.com">Anahide Tchertchian</a>
*/
public class URLServiceComponent extends DefaultComponent {
public static final String NAME = URLServiceComponent.class.getName();
public static final String URL_PATTERNS... |
Utility of the HandScan in monitoring disease activity and prediction of clinical response in rheumatoid arthritis patients: an explorative study
Abstract Objectives The aims were to determine the ability of the HandScan to measure RA disease activity longitudinally, compared with DAS28, and to determine whether sho... |
/**
* Normalize point sample.
*
* @return the point sample
*/
@Nonnull
public PointSample normalize() {
if (count == 1) {
this.addRef();
return this;
} else {
@Nonnull DeltaSet<UUID> scale = delta.scale(1.0 / count);
@Nonnull PointSample pointSample = new PointSample(scale,... |
#include<bits/stdc++.h>
using namespace std;
#define its_me ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,s,e) for(i=s;i<e;i++)
#define mod 1000000007
#define in(a) for(auto &ghe:a) cin>>ghe;
#define in2d(a) for(auto &ghe:a) for(auto &he:ghe) cin>>he;
#define out(a) for(auto &ghe:a) cout<<gh... |
def load_behaviour(config: BehaviourConfigBlock) -> BehaviourInterface:
behaviour = load_component(config)
assert isinstance(behaviour, BehaviourInterface)
for trigger_definition in config["triggers"]:
trigger = load_component(trigger_definition)
assert isinstance(trigger, TriggerInterface),... |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int n;
string back(string str)
{
int i = str.find_last_of('/');
return str.substr(0,i);
}
string add(string str,string add_str)
{
return str+"/"+add_str;
}
int main()
{
int... |
import { AppError } from '../../errors/AppError';
import { Product } from '../../modules/products/entities/Product';
interface IStock {
product_id: number;
quantity: number;
}
export function checkStock(products: Product[], data: IStock) {
const findProduct = products.find((get) => get.id === data.product_id);
... |
/*
* bigger than 1 means that 'this' is better than 'other'
*/
public double compare(Goodness other) {
if (_maxWeight != other._maxWeight) {
return 1 / (_maxWeight / other._maxWeight);
} else if (_lst != other._lst) {
return 1 / (_lst / other._lst);
} else {
return 1 / (_avgRegionDensity / ot... |
/**
* An example how to use DownloadButton
*
* @author Matti Tahvonen
*/
public class DownloadButtonExample extends AbstractTest {
private static final long serialVersionUID = 2638100034569162593L;
public DownloadButtonExample() {
// Polling or Push needs to be enable to support response written h... |
/*******************************************************************************
*
* Pentaho Data Integration
*
* Copyright (C) 2002-2012 by Pentaho : http://www.pentaho.com
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the ... |
# -*- coding: utf-8 -*-
# Copyright (C) 2020 - Sean: mailto:<EMAIL>
# GitHub: https://github.com/SeanTolstoyevski
# This project is licensed under the MIT license. You are free to do whatever you want as long as you accept your liability.
# : NVDA's modules
import addonHandler
import config
import globalPluginHandler
... |
class MP:
"""A member of parliament data structure for saving basic information about an MP.
Gender is either 'm' for male or 'f' for female. Language refers to mother tongue, either
Finnish (fi) or Swedish (sv). Party field contains the party the MP represents at the time
this object is created. Profe... |
export interface UrlManager {
getDashboardUrl(environment: string): string;
getDocumentationLink(): string;
getApiUrl(): string;
}
|
<gh_stars>0
package it.softphone.rd.gwt.client.widget.base.tag;
import it.softphone.rd.gwt.client.CommonWidgetsStyle;
import it.softphone.rd.gwt.client.resources.base.TagBoxCss;
import it.softphone.rd.gwt.client.widget.base.HintTextBox;
import java.util.ArrayList;
import java.util.List;
import com.google.gwt.event.d... |
def subtract_arrays(x, y):
if len(x) != len(y):
raise ValueError("Both arrays must have the same length.")
z = []
for x_, y_ in zip(x, y):
z.append(x_ - y_)
return z |
package patch
import (
"github.com/stretchr/testify/assert"
"testing"
)
func TestCoverStructsField(t *testing.T) {
type A struct {
Name string
ID int
Desc *string
Data []byte
}
desc := "abc"
src := A{
Name: "test",
ID: 0,
Desc: &desc,
Data: []byte("data"),
}
dst := A{}
err := CoverStructs... |
/*
* Write dirty or read not uptodate page lists of a stripe.
*/
static int stripe_chunks_rw(struct stripe *stripe)
{
int r;
struct raid_set *rs = RS(stripe->sc);
r = for_each_io_dev(stripe, stripe_get_references);
if (r) {
int max;
struct stripe_cache *sc = &rs->sc;
for_each_io_dev(stripe, stripe_chunk_rw... |
London buses might be fitted with smart sensors after the road safety trials conducted. The intention is to reduce the number of collisions with pedestrians and cyclists.
Smart London Buses Fleet
TfL is “upgrading” its London buses fleet. The new safety sensors, which could save the lives of dozens of vulnerable road... |
package com.semihshn.paymentservice.domain.payment;
import com.semihshn.paymentservice.domain.port.PaymentPort;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
@Service
@RequiredArgsConstructor
public class PaymentService {
private final PaymentPort paymentPort;
public L... |
<reponame>LobanovichMichael/HSE-initiatives<filename>telegram/TestCommand.java
package ru.misha.telegram;
import java.util.ArrayList;
import java.util.HashMap;
public class TestCommand implements Command {
String chatID;
String messageText;
public TestCommand(String chatID, String messageText) {
... |
<reponame>peitaosu/Logger
//---------------------------------------------------//
// MIT License //
// Copyright @ 2018-2020 <NAME> All Rights Reserved //
// https://github.com/peitaosu/Logger //
//---------------------------------------------------//
#include "LogE... |
def plotmaxima(dim):
c_values = np.linspace(2, 6, 41)
var = [findmaxima(c, dim)[-17:] for c in c_values]
fig = plt.figure(1)
plt.plot(c_values, [elem for elem in var], 'b-')
plt.xlabel('c')
plt.ylabel(dim)
plt.ylim([3,12])
plt.title(dim + ' local maxes vs. c')
plt.show() |
<reponame>BartMassey/sort-race
/*
* Copyright (c) 2019 <NAME>
* [This program is licensed under the "MIT License"]
* Please see the file LICENSE in the source
* distribution of this software for license terms.
*/
/* Terrible PRNG to avoid the rand crate here. */
fn rand(r: &mut usize) {
// https://en.wikipedi... |
package it.polimi.ingsw.client.cli;
import it.polimi.ingsw.client.modelClient.GameClient;
import it.polimi.ingsw.constant.enumeration.ResourceType;
import it.polimi.ingsw.constant.model.Game;
import it.polimi.ingsw.constant.model.NumberOfResources;
import it.polimi.ingsw.constant.move.MoveChoseResources;
import it.pol... |
package com.taobao.csp.ahas.transport.api;
public interface RequestHandler {
<R> Response<R> handle(Request var1) throws RequestException;
}
|
def audit(self):
log.debug("SAMLAssertionWallet.audit ...")
for k, v in self.__assertionsMap.items():
creds = [credential for credential in v
if self.isValidCredential(credential)]
if len(creds) > 0:
self.__assertionsMap[k] = creds
... |
/*
This file is part of solidity.
solidity 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 3 of the License, or
(at your option) any later version.
solidity is distributed in the hope that it ... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package shapeCollection;
import collection.TList;
import static org.testng.Assert.*;
import org.testng.annotations.BeforeMethod;
impor... |
<reponame>piquark6046/gtk3-rs<gh_stars>0
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use crate::Display;
use crate::Visual;
use crate::Window;
use glib::object::ObjectType as ObjectType_;
use glib::signal::connect_raw;
use gli... |
// Copyright 2017 Rough Industries LLC. All rights reserved.
//model/image.go:package model
package model
import ()
//DATA STRUCTURES
//Image data structure
type Image struct {
Text string
Keywords string
ImageSource string
LabeledImageSource string
ImageGen string
Image... |
Actress Lena Dunham wants images of guns yanked from ads for Matt Damon’s new film Jason Bourne.
On Tuesday, the Girls star re-posted a photo of an ad in which the image of Damon’s gun had been ripped out. Producer Tami Sagher had captioned the photo: “Hey New Yorkers, what if we do some peeling & get rid of the guns ... |
/** A mapping from {@link TypeVariable} to resolved {@link Type}. */
class TypeResolutions {
/** The type variables. */
private final TypeVariable<?>[] typeVariables;
/** The resolved type arguments. */
Type[] resolvedTypeArguments;
/**
* Produce a list of type variable resolutions from a re... |
use pyo3::prelude::*;
pub mod hw {
tonic::include_proto!("hw"); // The string specified here must match the proto package name
}
#[pyclass]
#[derive(Debug, Clone)]
pub struct HelloRequest {
#[pyo3(get)]
name: String
}
#[pymethods]
impl HelloRequest {
#[new]
fn new(name: &str) -> Self {
He... |
/*
* Copyright (c) 2017 The Regents of the University of California.
* All rights reserved.
*
* '$Author: crawl $'
* '$Date: 2017-08-29 15:27:08 -0700 (Tue, 29 Aug 2017) $'
* '$Revision: 1392 $'
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, m... |
<reponame>chrissound/HaskellNet
module Network.HaskellNet.POP3
( -- * Establishing Connection
connectPop3Port
, connectPop3
, connectStream
-- * Send Command
, sendCommand
-- * More Specific Operations
, closePop3
, user
, pass
, userPass
, apop
, auth
, sta... |
/*
* release_partition
* clear information kept within a partition, including
* tuplestore and aggregate results.
*/
static void
release_partition(WindowAggState *winstate)
{
int i;
for (i = 0; i < winstate->numfuncs; i++)
{
WindowStatePerFunc perfuncstate = &(winstate->perfunc[i]);
if (perfuncstate->winob... |
<reponame>spyrosfoniadakis/jalgorithms
package misc;
import keyedElement.DoubleKeyedElement;
import keyedElement.FloatKeyedElement;
import keyedElement.IntKeyedElement;
import keyedElement.LongKeyedElement;
import utils.DateUtils;
import java.util.Arrays;
import java.util.stream.Collectors;
public final class Person... |
<filename>generate.go
package veldt
// GenerateTile generates a tile for the provided pipeline ID and JSON request.
func GenerateTile(id string, args map[string]interface{}) error {
pipeline, err := GetPipeline(id)
if err != nil {
return err
}
req, err := pipeline.NewTileRequest(args)
if err != nil {
return e... |
A mobile unit for memory retrieval in daily life based on image and sensor processing
We developed a Mobile Unit which purpose is to support memory retrieval of daily life. In this paper, we describe the two characteristic factors of this unit. (1)The behavior classification with an acceleration sensor. (2)Extracting ... |
<reponame>jumi2016/birdfight
//
// UIView+SDAutoLayout.h
//
// Created by gsd on 15/10/6.
// Copyright (c) 2015年 gsd. All rights reserved.
//
/*
*************************************************************************
--------- INTRODUCTION ---------
HOW TO USE ?
MODE 1. >>>>>>>>>>>>>>> You can use it in... |
Welcome to What Do They Own?, a new Curbed series where we take someone making headlines and try to figure out how much of the world they own, and by extension, how far they've gone to insulate themselves from the world.
Disgraced financier Jeffrey Epstein became a registered sex offender in 2008, when he was convicte... |
<reponame>ajblane/iota_fpga
/*
* (C) Copyright 2001
* <NAME>, DENX Software Engineering, <EMAIL>.
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* publi... |
import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
import { readProjectConfiguration, readJson, logger } from '@nrwl/devkit';
import type { Tree } from '@nrwl/devkit';
import { libraryGenerator } from '@nrwl/node';
import { configurationGenerator } from '../configuration/generator';
import { scssGener... |
WASHINGTON—Thousands thronged the docks of the capital seaport last week to watch as Congressmen boarded galleys and set sail in search of the Lost Sword of Bipartisanship, a holy relic that according to legend has the power to restore collegial relations and procedural harmony to the legislative branch.
Initial repor... |
import os
from typing import List, Union
import torch
import torch.nn as nn
from allennlp.modules import FeedForward
from allennlp.nn.activations import Activation
from torch.nn.utils.rnn import pack_padded_sequence, pad_sequence
from transformers import AutoConfig, AutoModel, AutoTokenizer, BertModel
device = torch.... |
#include <stdio.h>
int main()
{
int N,K;
char S[11];
scanf("%d %s %d",&N,S,&K);
for (int i = 0; i < N; i++)
{
if (S[i] == S[K-1]){
putchar(S[K-1]);
}else{
putchar('*');
}
}
} |
def match(self, target):
match = self.re.match(target)
return match and match.end() == len(target) |
def lang_file_ext(self) -> "str":
return (
self.json.get("metadata", {})
.get("language_info", {})
.get("file_extension", ".py")
) |
def lru_diskcache(maxsize=16):
def lru_diskcache_inner(func):
directory = Path("cashe_of_" + func.__name__)
if not directory.is_dir():
directory.mkdir()
key_dequeue_file = directory.joinpath("cache_table.json")
key_dequeue = OrderedDictStorage(file=key_dequeue_file)
... |
#include<bits/stdc++.h>
using namespace std;
#define int long long
int mod=1e9+7;
int modexp(int a,int b){
int ans=1;
while(b){
if(b&1){
ans=(ans*a)%mod;
}
a=(a*a)%mod;
b=b/2;
}
return ans;
}
int32_t main(){
ios::sync_with_stdio(0);c... |
def start(self):
try:
self._launch_jupyter()
except Exception as exc:
console.print(f'[bold red]:x: {exc}')
self.close()
finally:
console.rule(
f'[bold red]:x: Terminated the network 📡 connection to {self.session.host}',
... |
ST. PETERSBURG -- To hear him tell it, Ruslan Starodubov can do almost anything: lay tile, carry heavy equipment, even bake bread.
"My hands are the hands of a normal Russian man," he says. "They know what they're doing most of the time."
But what Starodubov and his hands like to do most is soldier. Originally from t... |
def build_model(self, train_last_layer_only=False):
if self.task_config.hub_module_url and self.task_config.init_checkpoint:
raise ValueError("At most one of `hub_module_url` and "
"`init_checkpoint` can be specified.")
if self.task_config.hub_module_url:
... |
<reponame>stierma1/mandrill
package mandrill
import (
"errors"
"reflect"
"sync"
)
type PID interface {
Kill()
Send(message []interface{}) error
Send1(m interface{}) error
Send2(m1, m2 interface{}) error
Send3(m1, m2, m3 interface{}) error
Read() []interface{}
Read1(v interface{}) bool
Read2(v1, v2 interfac... |
<filename>entity relations/HotelDatabase/src/main/java/entities/Room.java
package entities;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Set;
@Entity
@Table(name = "rooms")
public class Room {
private Long roomNumber;
private RoomType roomType;
private BedType bedType;
pri... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> l_l;
const int INF=1001001000;
const int mINF=-1001001000;
const ll LINF=10100100100100100;
int main(){
ll n,k;cin >> n >> k;
for(int i=0; i<35; i++){
ll big=pow(k,i+1... |
def handling_cost(self) -> float:
if self._handling_cost is None:
assert len(self.customers) + 1 == len(self.plan)
self._handling_cost = 0.
for idx, customer in enumerate(self.customers):
before, after = self.plan[idx], self.plan[idx + 1]
self.... |
# Copyright 2016 The TensorFlow 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... |
export interface User {
uid: string;
photoURL: string;
displayName: string;
email: string;
phoneNumber: string;
providerId: string;
}
export interface UserAppSetting extends User {
AppKey: string;
TeamId: string;
AboutMe: string;
AppTheme: string;
GithubProfile: string;
... |
/*
* ATtinySerialOut.cpp
*
* For transmitting debug data over bit bang serial with 115200 baud for 1/8/16 MHz ATtiny clock.
* For 1 MHz you can choose also 38400 baud (120 bytes smaller code size).
* For 8/16 MHz you can choose also 230400 baud (just faster).
* 1 Start, 8 Data, 1 Stop, No Parity
*
* Using PB2 /... |
#include <stdio.h>
#include <math.h>
int main(void){
int input[3],num[2];
int i,j,Max,iMax,iMin,cnt=0;
scanf("%d",&input[0]);
scanf("%d",&input[1]);
scanf("%d",&input[2]);
if(input[0]>input[1]){
Max=input[0];
iMax=0;
}else{
Max=input[1];
... |
import {Router, ActivatedRoute} from '@angular/router';
import {from, Observable, noop, forkJoin, of, concat, combineLatest, iif, Subject, throwError} from 'rxjs';
import {ExtendedOrgUser} from 'src/app/core/models/extended-org-user.model';
import {AuthService} from 'src/app/core/services/auth.service';
import {DateSer... |
<filename>adminlte3_theme/serializers.py
from rest_framework import serializers
from .models import confrence
class confrenceserializer(serializers.ModelSerializer):
class Meta:
model=confrence
fields=('confrence_ID','date','venu','image','confrence_Overview','register','travel_information') |
// GetSession gets a goboots session
func (m *MysqlDBSession) GetSession(sid string) (*goboots.Session, error) {
db, err := m.w.db()
if err != nil {
return nil, err
}
var stime time.Time
var updated time.Time
data := make([]byte, 0)
var shortexpires time.Time
var shortcount uint8
err = db.QueryRowx("SELECT t... |
UPDATE : In an interview with Business Times dated 28 June, Ramsay's business partner Stuart Gillies disclosed that they will be opening their first restaurant in Singapore early next year at The Shoppes at Marina Bay Sands. Our sources further reveal the location is likely to be at the soon-to-close Moluccas Room.
Ce... |
Festivals exist for music-lovers to let their hair down, ignore their work inbox for a weekend and just cut loose while shaking to some class acts. It’s easy to overlook just how much of an environmental impact large festivals have on their surrounding area, and this is one of the many reasons Liftshare exists.
Not on... |
<reponame>krish2487/STM32-Repo
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "exti/exti.h"
#include "gpio/gpio.h"
#include "uart/uart.h"
#include "uart/uart_interrupt.h"
#include "FreeRTOS.h"
#include "queue.h"
#include "task.h"
/**
* STATIC FUNCTION DECLARATIONS
*/
void main__gpio_output(vo... |
/// Update a existing key value pair to etcd
pub async fn update_existing_kv<
T: DeserializeOwned + Serialize + Clone + Debug + Send + Sync,
>(
&self,
key: &str,
value: &T,
) -> DatenLordResult<T> {
let write_res = self.write_to_etcd(key, value).await?;
if let Som... |
<filename>domain/user.go
package domain
import (
"fmt"
"time"
"golang.org/x/crypto/bcrypt"
)
// User contains user data.
type User struct {
ID string
Email string
Password []byte
ActivationToken string
RecoveryToken string
Activated *time.Time
Created *time.Tim... |
// CLI for protocol switch related RAIL events.
void emberAfPluginDmpTuningGetRailScheduledEventCounters(void)
{
emberAfCorePrintln("Scheduled event counter:%d Unscheduled event counter:%d",
railScheduledEventCntr,
railUnscheduledEventCntr);
} |
<filename>examples/68702115/index.tsx
import React from 'react';
import { useRef, useState, useEffect, MouseEvent } from 'react';
const useAudio = (url: string) => {
const audio = useRef<HTMLAudioElement | undefined>(typeof Audio !== 'undefined' ? new Audio(url) : undefined);
const [playing, setPlaying] = useState... |
/**
* 深圳金融电子结算中心
* Copyright (c) 1995-2017 All Rights Reserved.
*/
package com.murong.prepayment.cache;
import com.murong.prepayment.cache.config.CacheConfig;
import com.murong.prepayment.cache.to.CacheKey;
import com.murong.prepayment.cache.to.CacheWrapper;
/**
* 缓存类接口
* @author lw.xu
* @version $Id: Cache.jav... |
def _split_coefficients(self, w: NDArray[Float64]) -> Tuple[float, NDArray[Float64]]:
if self.fit_intercept:
bias = w[0]
wf = w[1:]
else:
bias = 0.0
wf = w
return bias, wf |
package ru.job4j.threads.sinhronizy;
import org.junit.Before;
import org.junit.Test;
import java.util.List;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
public class UserStorageTest {
private UserStorage storage;
private UserStorage.User a;
private UserStorage.User b;
pri... |
<filename>client/client.go
// Copyright 2018-2019 The Loopix-Messaging 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
//
// ... |
import {ModuleGenerator} from "./ModuleGenerator";
describe('ModuleGenerator', () => {
describe('expected files', () => {
const generator = new ModuleGenerator({
name: 'name',
description: 'description'
});
const expectedFiles = [
'.gitignore',
... |
A report on Donald Trump‘s campaign suggests that his advisors are now trying to limit his TV appearances in order to reduce the amount of controversy he generates with his inflammatory political ideas.
Howard Kurtz of Fox’s Mediabuzz reported today that some of the mogul’s top people are trying to cut down on the med... |
/**
* Copyright (c) 2020 The UsaCon Authors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This pr... |
/**
* Create a class element for the given simple type.
* @param type The type
* @param annotationMetadata The annotation metadata
* @param typeArguments The type arguments
* @return The class element
* @since 2.4.0
*/
static @NonNull ClassElement of(
@NonNull Class<?> typ... |
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates.
*
* 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... |
<gh_stars>10-100
import os.path
import os.path as osp
import sys
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
from collections import deque
from tqdm import *
import click
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
from PIL ... |
Can an experiment be replicated in a mechanical fashion without considering the processes underlying the initial results? Here I will consider a non-replication of Saccade Induced Retrieval Enhancement (SIRE) and argue that it results from focusing on statistical instead of on substantive process hypotheses. Particular... |
def inellipse(pos, center, theta, a, b):
c = np.cos(np.radians(theta))
s = np.sin(np.radians(theta))
r = b/a
x, y = pos
x0, y0 = center
return (
(x-x0)**2*(c**2 + s**2/r**2) +
(y-y0)**2*(c**2/r**2 + s**2) +
2*(x-x0)*(y-y0)*c*s*(1./r**2 - 1.) < (a/3600.)**2
) |
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Integer sum = 0;
Integer numTypeDonuts= new Integer(scanner.next());
Integer donutsMaterials = new Integer(scanner.next(... |
def _make_time_pass(self, seconds, timeout, time_mock):
time_mock.return_value = TIMEOUT_EPOCH
timeout.start_connect()
time_mock.return_value = TIMEOUT_EPOCH + seconds
return timeout |
As more information comes to light and public outcry steadily grows against FirstEnergy, Duke and American Electric Power's respective bailout riders, 12 companies with a large presence in Ohio now also have come out against the utilities.
As more information comes to light and public outcry steadily grows against Fir... |
//*************************************************************************************************
/*!\brief Constructor for the GeneralTest class test.
//
// \exception std::runtime_error Operation error detected.
*/
GeneralTest::GeneralTest()
{
testIsNan();
testIsUniform();
testIsZero();
testNormalize();... |
.
The diagnosis of an immunodeficiency is made after detailed clinical and laboratory investigations. To guide these investigations the Dutch Working Group on Immunodeficiencies had made a protocol for evaluating the functioning of the immune system of patients. The protocol is based on the report 'Immunodeficiency' f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.