content stringlengths 10 4.9M |
|---|
def is_apply_to_error_spans(self, is_apply_to_error_spans):
self._is_apply_to_error_spans = is_apply_to_error_spans |
Security service level agreement measurement in cloud: A proof of concept implementation
Security concerns of cloud computing mainly originate from outsourced data and computation on which data owners do not have full control. Recent works in both industry and academia documented these concerns well and described both... |
import os, argparse, shutil
import numpy as np
import open3d as o3d
import trimesh
def scale(args):
"""For now this function is simply used to rescale the ConvOnet output from unit cube to
75mm cube as used in Berger et al. benchmark"""
args.scene_conf = args.scene + "_" + str(args.conf)
gt_file = o... |
/**
* Indicates that the given object was deleted in the model. If this object
* is currently edited in a form, this form is closed.
*
* @param obj
*/
public void objectDeleted(IScenarioObject obj) {
if (currentForm != null) {
if (currentForm.getCurrentlyEditedObject() == ob... |
// -*- coding: utf-8 -*-
/**
Kanevsky all minimum node k cutsets algorithm.
*/
from operator import itemgetter
from itertools import combinations
#include <xnetwork.hpp> // as xn
from .utils import build_auxiliary_node_connectivity
from xnetwork.algorithms.flow import (
build_residual_network,
edmonds_karp,
... |
Density functional theory study of the interaction of H2 with pure and Ti-doped WO3 (002) surfaces
Density functional theory (DFT) calculations are conducted to explore the interaction of H2 with pure and Ti-doped WO3 (002) surfaces. Four top adsorption models of H2 on pure and Ti-doped WO3 (002) surfaces are investig... |
struct point {
int x;
int y;
int z;
};
int main() {
return 0;
}
|
/*
* Colan Biemer
* This class is in charge of holding the path string and the
* date held by the file.
*/
public class Scene {
private String path;
private SimpleDateFormat format;
private long date;
public File file;
public Scene(File fileFile)
{
this.file = fileFile;
this.path = file.toString... |
A man believed to be the suspect in an attack that injured five people in Edmonton over the weekend was detained days after arriving in the United States from Mexico, U.S. officials said.
Abdullahi Hassan Sharif, who sources say is the same person as Abdulahi Hasan Sharif, the man charged with attempted murder after a... |
use rsip::{headers::*, message::HeadersExt};
#[test]
fn headers() {
//TODO: start using randomized stuff/traits
let via = Via::new("SIP/2.0/TLS client.biloxi.example.com:5061;branch=z9hG4bKnashd92");
let max_forwards = MaxForwards::new("70");
let to = To::new("Bob <sips:<EMAIL>>");
let from = From:... |
<filename>autoload/autoload.go
package autoload
import "github.com/PrashantRaj18198/goenvargs"
func init() {
goenvargs.LoadEnvVars(nil, nil)
} |
/**
* Sums two values.
* @param <R> the result type
* @param <T1> the first parameter type
* @param <T2> the second parameter type
*/
public class Sum<R, T1, T2> implements BiFunction<T1, T2, R> {
private final SumPolicy<R, T1, T2> policy;
public Sum(SumPolicy<R, T1, T2> policy) {
dbc.preconditio... |
def config_logging():
yaml = YAML(typ="safe")
with current_app.open_resource(current_app.config['LOGGING_CONFIG']) as f:
config = yaml.load(f)
log_lvl = "INFO"
if os.environ.get('VERLOOP_DEBUG', False):
log_lvl = "DEBUG"
update_config = {
"handlers":
{
... |
/**
* Trim list of flashcards to review
* @param flashcardsToReviewList Shuffled list of flashcards to review
* @return Trimmed list of flashcards to review
*/
private ObservableList<Flashcard> trimReviewFlashcards(ObservableList<Flashcard> flashcardsToReviewList) {
long reviewCardLimit = us... |
n=int(input())
l=list(map(lambda x: int(x), input().split()))
res,a,b,c,d=0,0,0,0,0
for i in range(0,n):
p=l[i]
if (p==4) :
a=a+1
elif p==3:
b+=1
elif p==2:
c+=1
else:
d+=1
res+=a+b
if b>=d:
res+=c//2+c%2
e... |
<filename>src/lexer.rs<gh_stars>0
use lasso::{Rodeo, Spur};
use logos::{Lexer, Logos};
use std::fmt::Display;
pub fn lex(src: &str) -> Lexer<Token> {
let mut lexer = Token::lexer(src);
for s in ["void", "int"] {
lexer.extras.get_or_intern_static(s);
}
lexer
}
#[derive(Debug, PartialEq, Clone... |
def send_to_health_monitor(event):
env = get_environment(event)
target_region = os.environ.get("TARGET_REGION")
aws_sqs = boto3.client("sqs", region_name=target_region)
payload_json = event.to_json()
queue_url = get_health_target_queue_url(env)
LOG.debug("Send to SQS: %s", queue_url)
respons... |
// +build ignore
package main
import (
"context"
"errors"
"flag"
"fmt"
"os"
"sync"
"github.com/hashicorp/go-hclog"
goplugin "github.com/hashicorp/go-plugin"
"github.com/spiffe/spire-plugin-sdk/pluginmain"
"github.com/spiffe/spire-plugin-sdk/private/proto/test"
"github.com/spiffe/spire/pkg/common/catalog/t... |
<gh_stars>0
package lu.acel.lidderbuch.model;
import android.graphics.Bitmap;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Created by mirkomack on 16.11.16.
*/
public class LBBacker implements Serializab... |
It sounds like a direct-to-Netflix horror movie plot — a cheap, addictive drug available in a foreign land, that turns the user's skin a scaly green color. Soon it rots the flesh, causing the user's skin to emulate that of a crocodile, leaving bone and muscle tissue exposed to the world. But the Russian drug known as k... |
Any good fantasy world deserves a map, but how does a world map go from your notebook to an espansive illustration that provides depth and information?
Read on as Isaac Stewart shares his process for making the map for The Emperor’s Blades, the first book in Brian Staveley’s new fantasy series Chronicles of the Unhewn... |
Chris Hemsworth, Tom Hiddleston, Mark Ruffalo, Cate Blanchett, Jeff Goldblum and Tessa Thompson treated an unexpected audience to a 4D experience on the 'Late Late Show With James Corden.'
James Corden and the cast of Marvel's Thor: Ragnarok crashed a screening of the new film at the Grove in Los Angeles this week to ... |
/// Step when the control contains a value.
fn step_value(&mut self, value: Rc<Value<'a>>, kont: Kont<'a>) -> Ctrl<'a> {
use Kont::*;
match kont {
Dump(env) => {
self.env = env;
Ctrl::Value(value)
}
Pop(count) => {
self.... |
import { PartialQuery } from './../query/partial';
import { StringToken } from './../tokens';
export class Now extends PartialQuery {
constructor() {
super(new StringToken(`NOW()`));
}
}
export const now = () => new Now();
|
Self-Determination along the Austrian Frontier, 1918-1920: Case Studies of German Bohemia, Vorarlberg, and Carinthia
The First World War led to the collapse of a number of prominent European empires, allowing for the spread of new ideas into Europe. US President Woodrow Wilson’s rhetoric of national self-determination... |
/**
* Get method for field imageGranularity [vkstruct]<br>
* Prototype: VkExtent3D imageGranularity
*/
public VkExtent3D imageGranularity(){
long pointer = getImageGranularity0(super.ptr);
if(pointer == 0){
this.imageGranularity = null;
return null;
}
if(this.imageGranularity == null){
... |
/**
* This class represents a node in parse tree.
*/
static class ClosureToken extends Token implements java.io.Serializable {
private static final long serialVersionUID = 1L;
int min;
int max;
Token child;
ClosureToken(int type, Token tok) {
... |
async def ensure_cached_claimant(channel: discord.TextChannel) -> None:
if await _caches.claimants.get(channel.id):
return
async for message in channel.history(limit=1000):
if message.author.id != bot.instance.user.id:
continue
if message.embeds:
if _message._matc... |
<filename>types/carbon__icons-react/es/pills--subtract/32.d.ts<gh_stars>1000+
export { PillsSubtract32 as default } from "../../";
|
#include "CommandExamine.h"
#include <boost/algorithm/string.hpp>
using internationalization::Internationalization;
void CommandExamine::executeInHeartbeat(const std::string& username, const std::vector<std::string>& fullCommand) {
auto location = characterManager.getCharacterLocation(username);
if(location.area... |
package pipelines
import "fmt"
type HttpBinPipeline struct{
In chan string
}
func (h *HttpBinPipeline) Process(){
for item:= range h.In{
fmt.Println("Process item")
fmt.Println(item)
}
}
|
/**
* Read messages from the panel
* The first message found in the LinkedList of messages is
* returned which matches the given command code.
*
* @param m1Command
* @return message
* @throws IOException
*/
public Message readMessages(String m1Command) throws IOException {
Message msg = null;
Itera... |
#!/usr/bin/env python3
import warnings
import glob
from pathlib import Path ## for os-agnostic paths
import pandas as pd
from mendeleev import get_table
from ase import data as ase_data
from pymatgen import Element
HERE = Path(__file__).parent
def gather_ptable_dataframe():
df_list = []
## get propertie... |
async def image(self, ctx):
async with ctx.bot.session.get(url) as resp:
if not resp.status == 200:
raise exceptions.WebAPIInvalidResponse(
api=service, status=resp.status
)
data = await resp.json(content_type=None)
img = ... |
/**
* This class formats a DCP message for ingest into Kisters' WISKI database
* by dropping files into a know directory in the Kisters ZRXP format.
*
* @author Michael Maloney, Cove Software, LLC
*/
public class KistersFormatter
extends OutputFormatter
{
private SimpleDateFormat sdf = new SimpleDateFormat("yyy... |
def inverse_udwt_n_combine_splits(cls, coeffs, wavelet, pad_lengths, split_dim, raw_data_shape):
num_splits = len(coeffs)
pad_len_row = pad_lengths[0]
pad_len_col = pad_lengths[1]
pad_len_row2 = pad_lengths[2]
pad_len_col2 = pad_lengths[3]
intensities = np.empty(raw_data_... |
Despite doubts and denials, Russia is about to embark on an ambitious expansion of its Syrian presence, likely to change the game in the war-torn country. Russia’s small and dated naval repair facility in Tartous will be enlarged, while Jableh near Latakia (Laodicea of old) will become the Russian Air Force base and a ... |
<filename>benchmark/stats.py
import os, re
N = 40
values_pt = [0] * N
values_cudnn = [0] * N
values_best = [0] * N
def cmd(method, index):
binary = " ./benchmark-persistent-kernels.out"
mini_batch_size = "--mini-batch-size"
backend = "--backend"
command = binary + " " + mini_batch_size + " " + str(... |
<filename>gibson2/envs/parallel_env.py
from gibson2.core.physics.robot_locomotors import Turtlebot, Husky, Ant, Humanoid, JR2, JR2_Kinova
from gibson2.core.simulator import Simulator
from gibson2.core.physics.scene import BuildingScene, StadiumScene
import gibson2
from gibson2.utils.utils import parse_config, rotate_ve... |
<filename>Java/Tobin.c
#include<stdio.h>
int n,k,a[100];
void pat(int x, int y){
int i;
if(x>=n){
if(y==k){
for(i=0; i<n; i++)printf("%d",a[i]);
printf("\n");
}
return;
}
if(y<k){
a[x]=1;
pat(x+1,y+1);
}
a[x]=0;
p... |
Design and control of the first foldable single-actuator rotary wing micro aerial vehicle
The monocopter is a type of micro aerial vehicle largely inspired from the flight of botanical samaras (Acer palmatum). A large section of its fuselage forms the single wing where all its useful aerodynamic forces are generated, ... |
/**
* Microservice for managing TestPlans.
*
* @since 1.0.0-SNAPSHOT
*/
@Path("/testplan")
public class TestPlanAPI {
TestPlanRunnerManager runnerManager = ApplicationDataHolder.getInstance().getRunnerManager();
@POST
@Path("/add")
@Consumes("application/json")
@Produces("application/json")
... |
def kbhit():
try:
import msvcrt
return msvcrt.kbhit()
except ImportError:
import select
i, _, _ = select.select([sys.stdin], [], [], 0.0001)
return sys.stdin in i |
// Copyright 2020, Shulhan <<EMAIL>>. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package asciidoctor
import "fmt"
type DocumentTitle struct {
Main string
Sub string
el *element
raw string
sep byte
}
//
// String return the c... |
def remove_lrc(lrc_array=None,remove_lrc_array=None):
joined_array= np.vstack([remove_lrc_array,lrc_array])
all_cells,uinds,uinv = unique_rows(joined_array,sort=False,return_inverse=True)
uord = [(uinds==utemp).nonzero()[0][0] for utemp in np.sort(uinds)]
repeated_inds = uord[remove_lrc_array.shape[0]:]... |
use super::{
any::Any, boolean::Boolean, byte_string::ByteString, function::Function, list::List,
none::None, number::Number, record::Record, reference::Reference, union::Union,
};
use position::Position;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Eq, Ord, PartialEq, PartialOrd, S... |
<reponame>addventa/rosaenlg
/**
* @license
* Copyright 2019 <NAME>
* SPDX-License-Identifier: Apache-2.0
*/
import { Context, Callback } from 'aws-lambda';
import { S3RosaeContextsManager } from 'rosaenlg-server-toolkit';
import { createS3rosaeContextsManager, getUserID, corsHeaders } from './helper';
let s3r... |
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0... |
/**
* Option list used to perform the analysis by the DependencyDiscoverer
*
* @see DependencyDiscoverer
*/
public class DependencyDiscovererOptions {
/**
* The entry points of the user application (on the form a.b.C, a.b.*)
*/
private final ArrayList<String> entryPoints;
/**
* The classpath used to ret... |
import {Component, OnInit, OnDestroy, Inject, Optional} from '@angular/core';
import {Router} from '@angular/router';
import {NzMessageService} from 'ng-zorro-antd';
import {Jc} from '@core/jc';
@Component({
selector: 'app-index',
templateUrl: './index.component.html',
styleUrls: ['./index.component.less'],
... |
25 KitchenAid Stand Mixer Tips & Troubleshooting Help
105 Comments Print Email 105 Comments
I love my KitchenAid and although I haven’t had any problems with it yet (knock on wood), I decided to put together a page full of tips and tricks that I’ve bookmarked from around the web so I have them on hand “just in case”.... |
/***
* The Movie class is designed for the video rental business.
* The class track the information of each movie of Title Name,
* Rate, ID Number, and it has the calculate the late fee.
* The class is also the base class for other Derived class like
* Action , Comedy , Drama and etc, which has a different late f... |
/**
* Copy a pool and all questions
*
* @param context
* The destination context.
* @param pool
* The source pool.
* @param asHistory
* If set, make the pool and questions all historical.
* @param oldToNew
* A map, which, if present, will be filled in with the mapping of... |
<filename>Development/dotnetshell/IntegratedBuildHTML/HTMLViewer/bin/x86/Debug/dist_orig/app/activity/activity.component.ts
import { Component , OnInit} from '@angular/core';
import { ActivatedRoute,Router } from '@angular/router';
import {SharedService} from '../shared.service';
import 'jquery';
declare var $: any;
@... |
// Register adds a new scannable service to the registry.
func Register(id string, newFunc interface{}, iface svcIface, roots ...interface{}) struct{} {
name := reflect.TypeOf(newFunc).Out(0).String()
name = name[1:strings.IndexByte(name, '.')]
svcRegistry.register(name, id, newFunc, iface, roots)
return struct{}{}... |
package com.yntovi.base;
import com.baomidou.mybatisplus.extension.activerecord.Model;
/**
* 抽象实体类:无公共字段
*
* @author fanglei
* @date 2021/07/28 15:26
**/
public abstract class CommonModel<T extends Model<?>> extends Model<T> {
}
|
/**
* Html base class for test reports and links
*/
public class TestReport extends Report {
/**
*
*/
private static final long serialVersionUID = -3105616111390882858L;
private Object message = null;
private boolean isStatement = false;
public TestReport(){
super();
}
public TestReport(String titl... |
from operator import attrgetter
import simple_switch_13
from ryu.controller import ofp_event
from ryu.controller.handler import MAIN_DISPATCHER, DEAD_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.lib import hub
import socket
import threading
import SocketServer
import subprocess
import logging
# ... |
#include<cstdio>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
using namespace std;
typedef long long ll;
int main()
{
int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a<c||b<c||a<d||b<d)
{
printf("-1\n");
return 0;
}
if(c... |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define sz(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()
void solve (int tp)
{
assert(tp == 12 || tp == 24);
string tm;
cin ... |
<filename>src/runtime_src/core/common/module_loader.h
/**
* Copyright (C) 2016-2020 Xilinx, Inc
*
* 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://www.apache.org/licenses/LICEN... |
<gh_stars>1-10
import React from "react";
import {
IonPage,
IonContent,
IonItem,
IonLabel,
IonHeader,
IonTitle,
IonToolbar,
isPlatform,
IonCard,
IonCol,
IonGrid,
IonRow,
IonThumbnail,
} from "@ionic/react";
import { PageHeader, AndroidBackButtonExit } from "../../components";
const About: Re... |
"""
===============================================
DL8.5 classifier : python side iterative search
===============================================
Iterative search is the idea that the algorithm starts with finding an optimal
shallow tree, and then uses the quality of this tree to bound the quality of
deeper trees. ... |
from itertools import chain
import logging
from flask import redirect, request, url_for, flash
from flask_admin import BaseView, expose
from flask_mail import Message
from flask_wtf import Form
from wtforms import (
StringField,
TextAreaField,
validators,
HiddenField,
BooleanField,
SelectMultip... |
// 对 __bl.js 提供的方法的封装,不必判断是否初始化完成(但必须已安装)
export { default as armsSetConfig } from './util/arms/set-config';
export { default as armsSetPage } from './util/arms/set-page';
export { default as armsSetCommonInfo } from './util/arms/set-common-info';
export { default as armsCustom } from './util/arms/custom';
export { def... |
<reponame>awbear/json-schema-viewer
import { TreeListNode } from '@stoplight/tree-list';
import { Dictionary, JsonPath } from '@stoplight/types';
import { JSONSchema4, JSONSchema4TypeName } from 'json-schema';
export const enum SchemaKind {
Any = 'any',
String = 'string',
Number = 'number',
Integer = 'integer'... |
Molecular variation in Leymus species and populations
Icelandic populations of European lymegrass were examined using amplified fragment length polymorphism (AFLP) and restriction fragment length polymorphism (RFLP) of the major ribosomal genes (18S–5.8S–26S rDNA), in comparison with Alaskan populations of its close... |
Get the biggest daily news stories by email Subscribe Thank you for subscribing We have more newsletters Show me See our privacy notice Could not subscribe, try again later Invalid Email
As the sonographer paused the ultrasound scan and zoomed in on the picture of her unborn baby, first-time mum Sarah Radford and her ... |
import { ChakraProvider, useDisclosure } from "@chakra-ui/react";
import theme from "./theme";
import Header from "./components/Header";
import ConnectButton from "./components/ConnectButton";
import AccountModal from "./components/AccountModal";
import Swap from "./components/Swap";
import "@fontsource/inter";
impo... |
Asymptotic Robust Adaptive Tracking of Parametric Strict-Feedback Systems with Additive Disturbance
This paper deals with the tracking control of multi-inut/multi-output nonlinear parametric strict-feedback systems in the presence of additive disturbances and parametric uncertainties. For such systems, robust adaptive... |
package splash
import (
"fmt"
"strings"
"time"
"github.com/kyokomi/emoji"
"github.com/qdm12/cloudflare-dns-server/internal/constants"
)
// Splash returns the welcome spash message
func Splash(version, vcsRef, buildDate string) string {
lines := title()
lines = append(lines, "")
lines = append(lines, fmt.Spri... |
def SaveVariables(self, variables, filename, env):
proxy = self.VarEnvProxy(env)
_VariablesWrapper(variables).Save(filename, proxy) |
def convert_dat_to_pdb(infile, outfile):
with open(infile, "rb") as f_in, open(outfile, "w") as f_out:
f_out.write(_from_dat(f_in)) |
def compute(self, atomic_input: AtomicInput) -> AtomicResult:
job_input_msg = atomic_input_to_job_input(atomic_input)
self._send_msg(pb.JOBINPUT, job_input_msg)
status = self._recv_msg(pb.STATUS)
while not status.accepted:
print("JobInput not accepted. Retrying...")
... |
import { SharedModule } from './../shared/shared.module';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { LeafletModule } from '@asymmetrik/ngx-leaflet';
import { MapsdRoutingModule } from './maps-routing.module';
import { DetailDistributionCenterModalComponent } from ... |
/* istanbul ignore file: no usefull tests to build */
import EnvParam from './EnvParam';
import IEnvParam from './IEnvParam';
// ATTENTION subtilité sur ConfigurationService et STATIC_ENV_PARAMS, on
// a besoin de ces fichiers en JS également pour la conf de webpack, donc il faut
// recopier le JS à chaque compila... |
//Serialize argument to its byte representation.
func (a BinaryArgument) Serialize(s *serializer.Serializer) error {
err := s.Byte(byte(ArgumentBinary))
if err != nil {
return err
}
return s.BytesWithUInt32Len(a.Value)
} |
/** A sample customer code handler class that implements a simple getTime() method */
public class TimeHandler extends CustomCodeHandler {
@CustomCodeTarget(name = "get_time")
public byte[] getTime(byte[] data) throws InvalidProtocolBufferException {
TimeRequest request = TimeRequest.parseFrom(data);
Stri... |
/**
* @author Anindya Chatterjee
*/
class NitriteDocument extends LinkedHashMap<String, Object> implements Document {
private static final long serialVersionUID = 1477462374L;
private static final List<String> reservedFields = listOf(DOC_ID, DOC_REVISION, DOC_SOURCE, DOC_MODIFIED);
NitriteDocument(Map<St... |
<gh_stars>0
pub fn hello() {
println!("Hello from first module");
}
|
The Durbar Hall at Diggi Palace, the venue for the Festival. The Durbar Hall at Diggi Palace, the venue for the Festival.
Over 200 authors including two Nobel Prize winners will be in attendance at this year's festival.
EVERY January, the world gets divided into those who are - and those who are not attending the Jai... |
Design and testing of a four-sided permanent magnet linear generator prototype
In the perspective of the fossil fuels deposits depletion new energy resources must be developed; amongst them the renewable energy sector seems to be able to provide a long term solution. Besides the already popular wind, solar or thermal ... |
def alt_to_s3(chart, bucket, key):
s3 = boto3.client("s3")
fname = f"{tempfile.gettempdir()}/{str(uuid4())}.json"
save(chart, fname)
with open(fname, "rb") as f:
s3.upload_fileobj(
f,
bucket,
key,
ExtraArgs={"ContentType": "text/json", "ACL": "publ... |
/**
Copyright 2008 University of Rochester
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... |
import { Component, Input, OnChanges, OnInit } from '@angular/core';
import { EDMBarChartModel } from '../edm-bar-chart.model';
@Component({
selector: 'app-edm-perf-summ-mil1',
templateUrl: './edm-perf-summ-mil1.component.html',
styleUrls: ['./edm-perf-summ-mil1.component.scss', '../../reports.scss']
})
export c... |
def _RetrieveAlias(self):
alias = ''
while not alias:
alias = raw_input('Enter a valid alias email address'
'(username@domain.com): ')
response = self.multidomain_client.RetrieveAlias(alias)
self._PrintAliasDetails(response) |
"""
This module defines helper class for the purpose of linearization.
(Named as a helper instead of util since it doesn't directly do liniearization.)
"""
import numpy as np
import cvxpy as cvx
class LinearizationHelper(object):
"""
Delegate class to take care of obtaining a value used to make make a
con... |
<filename>src/app/usuarios/interceptors/auth.interceptor.ts
import { AuthService } from '../auth.service';
import { Injectable } from '@angular/core';
import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
import { Observable, throwError } from 'rxjs';
import { catchError } from 'r... |
/**
* adds a card to the active hand of the player if the player is able to hit
*/
public void hit() {
if (rules.canHit(player.getActiveHand())) {
stackCheck();
player.takeCard(cardstack.drawCard());
status = "player took a card";
} else {
status... |
Insulin resistance and beta-cell hypersecretion in essential hypertension.
To determine whether a decreased sensitivity to insulin is involved in the pathogenesis of essential hypertension, fasting blood glucose, serum insulin, serum C peptide, the glucose:insulin ratio and the insulin:C-peptide ratio were measured in... |
#include<bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define pi 3.14159265359
using namespace std;
const int INF = 100000000;
int niz[200000];
int pref[200000][26];
int rez[26];
int podeli(int l, int r, int... |
/**
* Servlet implementation class RTCStatsServlet for verify page
*/
@WebServlet("/verify")
public class RTCStatsServlet extends HttpServlet {
private static final long serialVersionUID = -6712086996275183628L;
private static final Log log = LogFactory.getLog(RTCStatsServlet.class);
/**
* @see HttpServlet... |
/**
* Modifies m_ranking ordering attributes in decreasing order of Fleuret's
* CMIM approximation of I(Xi;C|m_selected) for all Xi in m_ranking. CMIM
* approximates this value with formula: max_Xi min_Xj I(Xi;C|m_selected)
* for all Xi in m_ranking and all Xj in m_selected
*
* @param data from which to co... |
It’s been a long time coming, but CCP is about to make good on the promise of an integrated MMO and FPS this coming Thursday, January 10th 2013.
On Thursday the 10th of January, following a slightly longer than usual scheduled downtime, we will be migrating over players currently participating in the DUST 514 closed b... |
def dimension(self, obj):
if not obj:
raise NoSuchDimensionError("Requested dimension should not be "
"none (cube '{}')".forma(self.name))
name = str(obj)
try:
return self._dimensions[str(name)]
except KeyError:
r... |
def calculate_risk_surface(lyr, age, dist, halflife, halfdist):
dist_raster = arcpy.sa.EucDistance(lyr,
dist)
max_temporal_risk = 1.0
k_temporal = math.log(0.5)/-halflife
k_spatial = math.log(0.5)/-halfdist
dist_raster = arcpy.sa.Exp(dist_raster * -k_spatial)
... |
import React from "react";
import { Story } from "@storybook/react";
import {
NewRoomNotification,
NewRoomNotificationProps,
} from "../../ui/NotificationElement/NewRoomNotification";
export default {
title: "Notification/NewRoomNotification",
component: NewRoomNotification,
};
export const Default: Story<Ne... |
// Spring WS Implementation
@Service
@Transactional
public class AccountReceivableServiceImpl implements AccountReceivableService {
@Autowired
AccountReceivableDao accountReceivableDao;
@Override
public InvoicedProducts getInvProduct(Integer id) {
InvoicedProducts invProdWS = new InvoicedProducts();
Invoi... |
/*
* Convert string input module parms. Accept either the
* number of the mode or its string name.
*/
static inline int bond_parse_parm(char *mode_arg, struct bond_parm_tbl *tbl)
{
int i;
for (i = 0; tbl[i].modename; i++) {
if ((isdigit(*mode_arg) &&
tbl[i].mode == simple_strtol(mode_arg, NULL, 0)) ||
... |
// UseReward use reward by id.
func (d *Dao) UseReward(id int64, usePlat string) (rst bool, err error) {
if err := d.orm.
Model(&model.AnchorReward{}).
Where("id=?", id).
Update(map[string]interface{}{"status": model.RewardUsed, "use_plat": usePlat, "use_time": xtime.Time(time.Now().Unix())}).Error; err != nil {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.