content stringlengths 10 4.9M |
|---|
def is_sv(entry, min_size=25):
return entry_size(entry) >= min_size |
def assign(self, request, pk=None):
pi = self.get_object()
data = request.data
window_number = data.get('window')
if window_number:
window = Window.objects.get(pk=window_number)
window.pi = pi
window.save()
return Response('OK') |
def propSet(self):
propFunList = {
"general-data": dUtilityClass.extractCompData,
"molecular-weight-mix": dUtilityClass.mixtureMolecularWeight,
"diffusivity-coefficient-mix": 1
}
propNameList = DATABASE_GENERAL_ITEMS
propNameSet = self.propName
... |
Repression of transcription initiation by Escherichia coli FNR protein: repression by FNR can be simple.
Naturally occurring promoters that are repressed by the Escherichia coli FNR protein are complex. In this work, we have constructed a simple semi-synthetic promoter that is repressed by FNR binding to a single site... |
<reponame>amosr/limp-cbc
/* $Id: ClpNonLinearCost.cpp 1769 2011-07-26 09:31:51Z forrest $ */
// Copyright (C) 2002, International Business Machines
// Corporation and others. All Rights Reserved.
// This code is licensed under the terms of the Eclipse Public License (EPL).
#include "CoinPragma.hpp"
#include <iostream... |
// DeleteBucketProtectionGroup Deletes a bucket from a protection group and the child protection group S3 asset.
// Appearance in /datasources/protection-groups/s3-assets read/listing is asynchronous
// and may take a few seconds to minutes at most. Must be in the same OU context as
// the creator of this protection... |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Builder SDK Github:
// https://github.com/Microsoft/BotBuilder
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// Permission is her... |
<filename>src/index.ts
export * from './interfaces';
export type { Context, ContextRequest, ContextResponse } from './context';
export type { Exception } from './exception';
export type { Model } from './model';
import { HttpClient, RequestMethod } from './http.client';
export type { RequestMethod };
export default Ht... |
#include "ActionMove.h"
#include "Entity.h"
#include "ComponentRender.h"
#include "ComponentMovement.h"
#include "MovementSystem.h"
#include <iostream>
#define SPEED 5.0f
ActionMove::ActionMove() : _dt(0)
{
}
ActionMove::~ActionMove()
{
}
void ActionMove::move(Entity* entity, std::map<sf::Keyboard::Key, actions:... |
/*
* This routine pretty-prints the platform's internal CPU clock
* frequencies into the buffer for usage in /proc/cpuinfo.
*/
static int
ppc4xx_show_percpuinfo(struct seq_file *m, int i)
{
seq_printf(m, "clock\t\t: %ldMHz\n", (long)__res.bi_intfreq / 1000000);
return 0;
} |
# -*- coding: UTF-8 -*-
from functools import wraps
from flask import session, url_for, redirect, logging
# 登录状态检查
def logincheck(f):
@wraps(f)
def wrapper(*args, **kwargs):
try:
if 'login' in session.keys():
if session['login'] == 'loginsuccess':
retur... |
def drop(cls, soClass):
sql = getattr(soClass, soClass._connection.dbName + 'Drop', None)
if sql:
soClass._connection.query(sql)
else:
soClass.dropTable() |
<gh_stars>0
/*
Copyright 2019 Broadcom. All rights reserved.
The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
*/
/*
Package tlerr defines the errors of the translib library.
The Error() method of the error interface for these functions
returns the English version, and are only meant for log files.... |
<reponame>ritikmishra/babycat
// Copyright 2012-2014 The Rust Project Developers and <NAME>. See the
// COPYRIGHT-RUST.txt file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <... |
/*
* Copyright 2012-2022 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... |
def entropy(G,M):
m = np.argmax( G, axis = 1 )
marg = calcMargiProb(m, M)
jont = calcJointProb(G, m, M)
cond = calcCondiProb(jont, marg)
return estEntropy(cond) |
package thread
import (
"bytes"
"fmt"
)
type Stack struct {
size uint
top *Frame
}
func newStack() *Stack {
return &Stack{}
}
func (s *Stack) Push(f *Frame) {
f.next = s.top
s.top = f
s.size++
}
func (s *Stack) Pop() *Frame {
f := s.top
if f != nil {
s.top = f.next
s.size--
return f
}
return nil... |
Gas Turbine Performance Monitoring and Operation Challenges: A Review
• This paper presents the elements affecting the efficiency of gas turbines. • Reviews about machine learning monitoring system for gas turbine emission predication. • Reviews about the available monitoring system solutions for gas turbines. Article... |
// Copyright (C) 2009-2016 National ICT Australia (NICTA)
//
// 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/.
// -----------------------------------------------------... |
/**
* Resolves the exception and sets proper http code.
*
* @param request
* the http servlet request
* @param response
* the http servlet response
* @param handler
* the handler object
* @param exception
* the thro... |
package ttp.algorithm.greedy;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import ttp.model.Item;
import ttp.model.Node;
import ttp.model.Problem;
import ttp.model.wrapper.P... |
// Parse the arguments of the function-like define starting after the first (. Also returns
// the location of the closing ).
fn parse_define_call_arguments(
&mut self,
lexer: &mut dyn MeLexer,
mut current_location: Location,
) -> Step<(Vec<Vec<Token>>, Location)> {
let mut paren_nes... |
// Status checks that the HTTP status code matches an expected one
func (a Response) Status(code int) Response {
if a.StatusCode != code {
a.t.Errorf("HTTP: expected %d %s, got %d %s", code,
http.StatusText(code), a.StatusCode, a.StatusText)
}
return a
} |
{-# LANGUAGE OverloadedStrings, PatternGuards #-}
module Database.RethinkDB.MapReduce where -- (termToMapReduce) where
import Control.Monad.State
import Control.Monad.Writer
import qualified Data.Text as T
import Data.Maybe
import Data.Foldable (toList)
import Database.RethinkDB.Wire.Term
import Database.RethinkDB.R... |
/**
* An error that is reported when the server returns valid JSON, but it doesn't match the format we expect.
*/
public static class InvalidJSONException extends LiveQueryException {
// JSON used for matching.
private final String json;
/// Key that was expected to match.
priv... |
<reponame>dominico966/Spark
/**
* Copyright (C) 2004-2011 <NAME>. 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.... |
/// \brief Run checkers for evaluating a call.
/// Only one checker will evaluate the call.
void CheckerManager::runCheckersForEvalCall(ExplodedNodeSet &Dst,
const ExplodedNodeSet &Src,
const CallEvent &Call,
... |
Predicting the number of citations of polycystic kidney disease with 100 top-cited articles since 2010: Bibliometric analysis
Background: Polycystic kidney disease (PKD) is a genetic disorder in which the renal tubules become structurally abnormal, resulting in the development and growth of multiple cysts within the k... |
At the end of the secular year, "top 10" lists abound. Check out our picks - in no particular order - for the most exciting moments of 2014 within the Reform Jewish world. Do you agree with our list? What would you add?
Religious pluralism makes major advances in Israel: This year saw encouraging stories of the increa... |
<filename>src/components/index.ts<gh_stars>0
export { Button } from "./Button"
export { FoodTypeTag } from "./FoodTypeTag"
export { Image } from "./Image"
export { BlogPost, HtmlNode } from "./BlogPost"
export { Bio } from "./Bio"
|
// New creates a new client depending on the token type
func New(ctx *context.Context) (Client, error) {
if ctx.TokenType == context.TokenTypeGitHub {
return NewGitHub(ctx)
}
if ctx.TokenType == context.TokenTypeGitLab {
return NewGitLab(ctx)
}
return nil, nil
} |
/**
* Mark multiple hits.
*
* @param hits Number of hits.
*/
public void onHits(long hits) {
long curTs = U.currentTimeMillis();
int curPos = position(curTs);
clearIfObsolete(curTs, curPos);
lastHitTimes.set(curPos, curTs);
taggedCounters.addAndGet(curPos, hit... |
// GetUnitMeta returns information about the "best" entity (module, path or directory) with
// the given path. The module and version arguments provide additional constraints.
// If the module is unknown, pass internal.UnknownModulePath; if the version is unknown, pass
// internal.LatestVersion.
//
// The rules for pic... |
/**
* Determine if this Report implies that the given DataSegment needs to be
* resent. i.e., True if:
* <ul>
* <li>DataSegment is red
* <li>DataSegment has not been acknowledged by a prior ReportSegment.
* <li>DataSegment is in scope of the ReportSegment
* </ul>
* @param dataSegment Given DataSe... |
def new(cls, size: tuple):
return ASCIMTable([[None] * size[0]] * size[1]) |
Advertisement
The Bill and Melinda Gates Foundation has proven of late to be a spur to developing nanotechnology-based solutions to some of the world’s problems, like a system for sterilizing medical equipment even in places where there is no electricity.
The foundation's latest Grand Challenge Exploration grants are... |
use super::*;
use specs::prelude::*;
pub struct RenderSystem;
pub struct RenderSystemData {
depth_texture: Texture,
}
impl<'a> System<'a> for RenderSystem {
type SystemData = (
WriteExpect<'a, RenderState>,
ReadExpect<'a, Camera>,
ReadExpect<'a, RenderSystemData>,
ReadStorage<... |
<filename>DrawingWithKeyboard.py
import keyboard
import turtle
pen = True
t = turtle.Turtle()
turtle.getscreen()
while True:
if pen == True:
t.pendown()
else:
t.penup()
if keyboard.is_pressed("q"):
break
if keyboard.is_pressed("w"):
t.forward(10)
if keyb... |
/*
* Enable or disable a specific channel. If something needs to be written to the
* dimmer board, will do that as well.
*/
void KridaDimmer::enable_channel(uint8_t chan, bool en) {
switch (chan) {
case 0:
case 1:
case 2:
case 3:
set_brightness(chan, en ? ((0 == _channel_values[chan]) ? _chann... |
<reponame>yoannfleurydev/formiz
import React, { useEffect, useState } from 'react';
import {
Slider,
SliderTrack,
SliderFilledTrack,
SliderThumb,
Stack,
NumberInput,
NumberInputField,
NumberInputStepper,
NumberIncrementStepper,
NumberDecrementStepper,
} from '@chakra-ui/react';
import { useField } f... |
Limerick politicians united to block a move by Irish Water to draw huge amounts of water from the Parteen Basin to augment supplies to the greater Dublin area.
Irish Water has set out plans to pipe over 300m litres a day from the basin to ensure supplies to the east coast meet demand.
Dublin has seen water cuts in re... |
// GetJobService - returns service of a type *JobService
func (gs *NsGroupService) GetJobService() (vs *JobService) {
if gs.jobService == nil {
gs.jobService = NewJobService(gs)
}
return gs.jobService
} |
<filename>src/models/V2beta2MetricStatus.ts<gh_stars>0
/* tslint:disable */
/* eslint-disable */
/**
* Kubernetes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: release-1.19
*
*
* NOTE: This class is auto gener... |
<gh_stars>0
/**
** This file was automatically generated by the Cyclone scheme compiler
** http://justinethier.github.io/cyclone/
**
** (c) 2014-2019 <NAME>
** Version 0.11.6
**
**/
#define closcall1(td, clo,a1) \
if (obj_is_not_closure(clo)) { \
Cyc_apply(td, 0, (closure)(a1), clo); \
} else { \
((clo)-... |
<reponame>nareshbhatia/http-utils<gh_stars>0
import { Order } from './Order';
export const order1: Order = {
id: 'f95244e6-1a1a-51ea-8c9a-0bca651329c6',
side: 'buy',
secId: 'GRMN',
quantity: 9600,
executed: 0,
type: 'market',
status: 'pendingApproval',
fundId: 'TFTBM',
managerId: 'a... |
// Newuuid populate buf with unique set of bytes.
func Newuuid(buf Uuid) (Uuid, error) {
if ln := len(buf); (ln%2) != 0 && ln < 8 {
return nil, ErrorUuidInvalidSize
} else if _, err := rand.Read([]byte(buf)); err != nil {
return nil, err
}
return buf, nil
} |
def remove_objects(self, objects, all_versions=True, **kwargs):
if not isinstance(objects, (list, set)):
objects = [objects]
if not objects:
print('No objects selected')
return
override = kwargs.pop('_override', False)
if not override:
msg ... |
<filename>lib/posix/_fork.c<gh_stars>10-100
#include <lib.h>
#define fork _fork
#include <unistd.h>
PUBLIC pid_t fork()
{
message m;
return(_syscall(MM, FORK, &m));
}
|
def WaitForAccessToken(port=DEFAULT_OAUTH2_PORT):
httpd = ClientRedirectServer((LOCALHOST_IP, port), ClientRedirectHandler)
httpd.handle_request()
if httpd.access_token is None:
ErrorExit(httpd.error or OAUTH_DEFAULT_ERROR_MESSAGE)
return httpd.access_token |
def off_by_m_algorithm2(n, m):
positions = allowed_positions(n, m)
permutation = []
return _off_by_m_aux_gen(n, m, positions, permutation) |
/**
* This class is used for web panel declaration that do not have a custom
* <code>class</code> attribute in their descriptor, but do have a
* <code>location</code> attribute in their resource child element, which
* points to a template file on the (plugin's) classpath.
*
* @see org.maera.plugin.web.descriptors... |
def check_headers(oe_file):
num_records = [f.num_records for f in oe_file]
sampling_rates = [f.header['sampleRate'] for f in oe_file]
buffer_sizes = [f.header['bufferSize'] for f in oe_file]
block_sizes = [f.header['blockLength'] for f in oe_file]
assert len(set(num_records)) == 1
assert len(set... |
<gh_stars>1-10
// Copyright the Hyperledger Fabric contributors. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
package internal
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestSliceAsCommaSentence(t *testing.T) {
slice := []string{"one", "two", "three"}
assert.Equal(t, "one, tw... |
Back in my day, cereal came with prizes. Sometimes the prizes were merely stickers or collector cards, sometimes they were posters, and sometimes, if you were really lucky, you got a toy that could pop your eye right out of your face! Here is a sampling of some of the more beloved cereal box premiums from the 1980s and... |
Jim McElwain didn’t exactly give away the plans to his new operation at Florida, but his first order of business in the recruiting world has made it pretty clear: He has got to get things going on offense.
OK, that’s painfully obvious in Gainesville, and McElwain has wasted no time on the recruiting front getting in f... |
// readPackages consumes package info from the given reader.
func readPackages(c ResolverConfig, r io.Reader, isBinaryPackages bool) (*PackageInfo, error) {
packages := make(map[string]map[version.Version]*deb.Paragraph)
virtualPackages := make(map[string][]*deb.Paragraph)
d := deb.NewDecoder(r)
for {
var p deb.P... |
// newRequests creates a request with the authentication header, and with the
// appropriate scheme and port in the case of self-signed TLS.
func (c *Client) newRequest(method, url string, body ...io.Reader) *http.Request {
var bodyR io.Reader
if len(body) > 0 {
bodyR = body[0]
}
if len(body) > 1 {
panic("too m... |
def hasPrivKey(self):
return (self.binPrivKey32_Encr.getSize() != 0 or \
self.binPrivKey32_Plain.getSize() != 0 or \
self.createPrivKeyNextUnlock) |
Extended focus imaging in digital holographic microscopy: a review
Abstract. The microscope is one of the most useful tools for exploring and measuring the microscopic world. However, it has some restrictions in its applications because the microscope’s depth of field (DOF) is not sufficient for obtaining a single ima... |
package com.tszh.entity;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.UpdateTimestamp;
import javax.persistence.*;
import java.util.Date;
/**
* Created by Administrator on 2018/4/17 0017... |
/**
* Simulation manager contact. Used to run simulations remotely.
*/
public class SmContact extends Contact {
private static final Logger LOGGER = LogManager.getLogger(SmContact.class);
private SimulationManager simulationManager;
private WorkItem currentWorkItem;
private String simulationConfigurationId;... |
def load_plugins():
return load_dynamic_modules(pathfinder.plugins_path(), abstractplugin.AbstractPlugin) |
A,B,T=map(int,input().split())
a=0
ans = 0
for t in range(1,T+1):
a += 1
# print(t,a)
if a == A:
a=0
ans+=B
print(ans)
|
// DecrementIP4By returns a v4 net.IP that is lower than the supplied net.IP
// by the supplied integer value. If you underflow the IP space it will return
// 0.0.0.0
func DecrementIP4By(ip net.IP, count uint32) net.IP {
i := IP4ToUint32(ip)
d := i - count
if d > i {
return generateNetLimits(4, 0)
}
return Uint3... |
def convert(self, views, form_type='add'):
if not isinstance(views, list) and (isinstance(views, Form)
or issubclass(views, Form)):
return super().convert(views)
try:
iter(views)
except TypeError:
views = [views]
... |
package xkcd
import (
"encoding/json"
"fmt"
"io/ioutil"
"math/rand"
"net/http"
"github.com/botlabs-gg/yagpdb/commands"
"github.com/jonas747/dcmd/v4"
"github.com/jonas747/discordgo/v2"
)
type Xkcd struct {
Month string
Num int64
Link string
Year string
News string
SafeTitle... |
// Contains (Public) - returns true if key is in map
func (t *TreeMap) Contains(key string) bool {
current := t.root
for {
if current == nil {
return false
}
result := current.compareTo(key)
if result == 0 {
break
} else if result > 0 {
current = current.left
} else {
current = current.right
... |
<reponame>jeremiahpslewis/oxigraph<gh_stars>0
//! Data structures for [RDF 1.1 Concepts](https://www.w3.org/TR/rdf11-concepts/) like IRI, literal or triples.
use std::fmt;
use std::fmt::Write;
/// An RDF [IRI](https://www.w3.org/TR/rdf11-concepts/#dfn-iri).
///
/// The default string formatter is returning an N-Tripl... |
/**
* frwr_reminv - handle a remotely invalidated mr on the @mrs list
* @rep: Received reply
* @mrs: list of MRs to check
*
*/
void frwr_reminv(struct rpcrdma_rep *rep, struct list_head *mrs)
{
struct rpcrdma_mr *mr;
list_for_each_entry(mr, mrs, mr_list)
if (mr->mr_handle == rep->rr_inv_rkey) {
list_del_ini... |
// NewMatcher creates a Matcher.
func (cfg *Configuration) NewMatcher(
cache cache.Cache,
kvCluster client.Client,
clockOpts clock.Options,
instrumentOpts instrument.Options,
) (Matcher, error) {
opts, err := cfg.NewOptions(kvCluster, clockOpts, instrumentOpts)
if err != nil {
return nil, err
}
return NewMatc... |
<reponame>RP0001/ms2ldaviz<gh_stars>1-10
# see http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
from __future__ import absolute_import, unicode_literals
from .celery_tasks import app as celery_app
__all__ = ['celery_app'] |
import { Stack, StackProps } from 'aws-cdk-lib';
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import { Construct } from 'constructs';
import { DBSettings } from '../bin/db-settings';
import { Database } from './database';
interface DbDefinerStackProps extends StackProps {
dbSettings: DBSettings;
}
export class DbDefi... |
import { Task } from 'fp-ts/lib/Task';
// all processors share these generic processor types
export type Context = Array<string>;
export type QueryProcessor<Q, R> = (q: Q) => Task<R>;
export type ResultProcessor<R> = (r: R) => Task<void>;
export type Build<P, A, C extends Context> = (a: A) => (c: C) => P;
|
Isolation, structure, and functional elucidation of a modified pentapeptide, cysteine protease inhibitor (CPI-2081) from Streptomyces species 2081 that exhibit inhibitory effect on cancer cell migration.
Cysteine proteases play an important role in cell migration and tumor metastasis. Therefore, their inhibitors are o... |
import styled from "styled-components";
import { Link } from "react-router-dom";
import { colors } from "../../mainStyles/colors";
import { typography } from "../../mainStyles/typography";
export const LogoText = styled.p<{ textAlign?: string; margin?: string }>`
font-family: "Lato", sans-serif;
font-size: ${typog... |
import * as React from 'react';
import { View, StyleSheet, Button } from 'react-native';
import DateField, {
MonthDateYearField,
YearMonthDateField,
} from 'react-native-datefield';
const App = () => {
const [date, setDate] = React.useState<Date | null>(null);
return (
<View style={styles.container}>
... |
// UnsetOutPort removes an external outport from the graph
func (n *Graph) UnsetOutPort(name string) bool {
port, exists := n.outPorts[name]
if !exists {
return false
}
if proc, ok := n.procs[port.proc]; ok {
unsetProcPort(proc, port.proc, true)
}
delete(n.outPorts, name)
return true
} |
/**
*
* Handler for Business Action Event Items
*
*/
public class BusinessActionRefHandler {
public final Map<String, Object> execute(final BusinessActionItemDataObject businessActionItemDataObject,
final ApplicationContext context, final DataIdentifier dataId) throws ExternalException {
... |
<filename>alipay/aop/api/response/AlipayTradeAppPayResponse.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayTradeAppPayResponse(AlipayResponse):
def __init__(self):
super(AlipayTradeAppPayResponse, self).__init__(... |
import { FormControl } from '@angular/forms';
import { BwcProvider } from '../providers/bwc/bwc';
export class AddressValidator {
static bitcore: BwcProvider;
constructor(bwc: BwcProvider) {
AddressValidator.bitcore = bwc;
}
isValid(control: FormControl): any {
let b = AddressValidator.bitcore.getBit... |
<reponame>stardustapp/dust-typescript
import {
clr,
combine,
iter,
readableStreamFromReader,
readerFromIterable,
} from "../deps.ts";
const KnownDirs = new Array<[string,string]>();
const signals = [
Deno.signal(Deno.Signal.SIGINT),
Deno.signal(Deno.Signal.SIGTERM),
];
export function disregardSignals()... |
package com.algaworks.algafood.api.v2.model.input;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class CidadeInputV2 {
@NotBlank
private String nomeCidade;
@NotNull
private Long idEstado;
}
|
def activity(self, comp):
stats = dict()
stats['component'] = comp
if comp in self.db_activity:
data = self.db_activity[comp]
del self.db_activity[comp]
stats['activity'] = data
else:
stats['activity'] = []
yield self.session.publis... |
/**
* Make a combo box to select vertical separation of wind barbs, in m
* @return component for vertical interval selection
*/
protected JComponent doMakeVerticalIntervalComponent() {
JComboBox intervalBox = GuiUtils.createValueBox(this, CMD_INTERVAL,
(int) v... |
<reponame>fang19911030/Leetcode
public class Solution{
public int[][] updateMetrix(int[][]matrix){
int m = matrix.length;
int n = matrix[0].length;
Queue<int[]>queue = new LinkedList<>();
for(int i=0;i<m;i++){
for(int j=0;j<n;j++){
if(matrix[i][j]==0){
queue.offer(new int[]{i,j})
}else{
ma... |
/**
* Parses the {@link Reader}'s contents assuming it is in the <i>default
* syntax</i>.
*
* @param r the {@link Reader} whose contents are assumed to be a JAAS Login
* Configuration Module file written in the <i>default syntax</i>.
* @throws IOException if an exception occurs while parsing the input... |
/**
* Created by patrice on 09.04.16.
*/
public class GeoJsonItemPath extends GeoJsonItem {
private Deque<GeoJsonItemPoint> points = new LinkedList<>();
private double distance = 0;
private long elevationGain;
private long verticalDrop;
public GeoJsonItemPath() {
}
public GeoJsonItemPat... |
/**
* Operation used to denote the creation of a limit order on the blockchain.
*
* The blockchain will atempt to sell amount_to_sell.asset_id for as much min_to_receive.asset_id as possible.
* The fee will be paid by the seller's account. Market fees will apply as specified by the issuer of both the
* selling ass... |
def convert_sfh(self, agebins, mformed, epsilon=1e-4, maxage=None):
agebins_yrs = 10**agebins.T
dt = agebins_yrs[1, :] - agebins_yrs[0, :]
bin_edges = np.unique(agebins_yrs)
if maxage is None:
maxage = agebins_yrs.max()
t = np.concatenate((bin_edges * (1.-epsilon), ... |
/** Retrieves body of a vertex shader that should be used by the test program.
*
* @return Requested string.
**/
std::string FunctionalTest17::getVertexShaderBody() const
{
return "#version 400\n"
"\n"
"#extension GL_ARB_shader_subroutine : require\n"
"\n"
"out VS_DATA\n"
"{\n"
" v... |
// Fill out your copyright notice in the Description page of Project Settings.
#include "MainGameMode.h"
#include "EngineUtils.h"
#include "Components/PointLightComponent.h"
#include "Components/SpotLightComponent.h"
#include "UObject/UObjectIterator.h"
#include "DrawDebugHelpers.h"
#include "UObject/ConstructorHelper... |
#include "platform.h"
#include <library/cpp/unittest/registar.h>
class TPlatformTest: public TTestBase {
UNIT_TEST_SUITE(TPlatformTest);
UNIT_TEST(TestSizeOf)
UNIT_TEST_SUITE_END();
private:
inline void TestSizeOf() {
UNIT_ASSERT_EQUAL(SIZEOF_PTR, sizeof(void*));
UNIT_ASSERT_EQUAL(SIZ... |
package org.freifeld.navigator;
/**
* @author royif
* @since 24/02/17
*/
public interface SerializationFactory
{
<T> Serializer<T> createSerializer(Class<T> cls);
<T> Deserializer<T> createDeserializer(Class<T> cls);
}
|
Dear Reader, As you can imagine, more people are reading The Jerusalem Post than ever before. Nevertheless, traditional business models are no longer sustainable and high-quality publications, like ours, are being forced to look for new ways to keep going. Unlike many other news organizations, we have not put up a payw... |
Zubir Said B.B.M. (22 July 1907 – 16 November 1987) was a Singaporean composer originally from the Minangkabau highlands of Indonesia who composed the national anthem of Singapore, "Majulah Singapura" ("Onward Singapore"). A self-taught musician, Zubir also worked as a score arranger and songwriter for Cathay-Keris Fil... |
/**
* A {@code ClientFactory} creates Http clients to access services within the SDA Platform or
* external services.
*/
public class ClientFactory {
private final Environment environment;
private final String consumerToken;
private final Tracer tracer;
ClientFactory(Environment environment, String consume... |
#include "FWCore/Framework/interface/Event.h"
#include "EMTFCollections.h"
namespace l1t {
namespace stage2 {
EMTFCollections::~EMTFCollections() {
// std::cout << "Inside EMTFCollections.cc: ~EMTFCollections" << std::endl;
// Sort by processor to match uGMT unpacked order
L1TMuonEndCap::sort_... |
use crate::builder::traits::{
Associative, Builder, Multilevel, Policy, Profiler, Sequential,
};
use crate::Array;
use std::marker::PhantomData;
/// `Array` builder.
///
/// This builder can be consumed later to spawn an
/// [`Array`](../../struct.Array.html) container.
///
/// ## Examples
/// ```
/// use byoc::Bu... |
<gh_stars>1-10
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "Lice... |
def merge_infrequent_targets(self):
value_counts = self.learning_data[self.target_column].value_counts(
).to_frame()
top_targets = value_counts.head(self.top_x_targets).index.to_list()
self.learning_data[self.target_column] = self.learning_data[self.target_column].apply(
lamb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.