content stringlengths 10 4.9M |
|---|
def tgffile_to_graph(tgffilename, elfilename=''):
results = []
if not tgffilename:
raise ValueError('No tgf filename given.')
if elfilename == '':
elfilename = tgffilename + '.el'
try:
elfilename = tgffile_to_edgelist(tgffilename, elfilename)
results = edgelistfile_to_gra... |
//This function will find the previous block even if it is an orphan
CBlockIndex * GetPreviousBlock(const CBlock& block, int64_t numBlocksBefore) {
if(numBlocksBefore <= 0) {
if(mapBlockIndex.count(block.GetHash())) {
return mapBlockIndex.at(block.GetHash());
}
return nullptr;
... |
/*
Parses the settings from the commandline parameters.
*/
func LoadSettings() {
Settings = SettingsData{}
flag.IntVar(&(Settings.Address), "address", 0x68, "The I2C address of the interface we " +
"are connecting to.")
flag.IntVar(&(Settings.FlexingChannel), "flexingchannel", 1, "The channel of t... |
def handle_commands(self, words, vision):
try:
words[1]
except IndexError:
return None
command = words[1].lower()
if command == "play" and len(words) > 2:
self.command_handler.play_spotify(words, vision)
if command == "pause" and len(words) > 2... |
import { assert } from "chai"
import { ECS } from "../src/ECS";
import { TestPositionComponent, TestVelocityComponent } from "./TestComponents";
import { TestPositionSystem, TestVelocitySystem } from "./TestSystems";
describe('ECS', function () {
const ecs = new ECS();
const positionSystem = new TestPosition... |
package main
import (
"fmt"
"net/http"
"os"
"github.com/go-zoo/claw"
mw "github.com/go-zoo/claw/middleware"
)
func main() {
mux := http.NewServeMux()
logger := mw.NewLogger(os.Stdout, "[Example]", 2)
c := claw.New(logger)
stk := claw.NewStack(Middle1, Middle2)
mux.HandleFunc("/home", Home)
http.Listen... |
import type { PropsWithChildren } from 'react';
import type { Values } from '../../utils/types';
import type { MenuProps } from '../menu';
import { Size } from './types';
export type MenuItemSizeType = Values<typeof Size>;
export type MenuItemListType = {
key: string;
content: string | React.ReactNode;
prefix?:... |
n=int(input())
l=map(int,input().split())
l1=list(l)
t=l1.index(max(l1))
sec=0
sec+=t
l1.reverse()
t1=l1.index(min(l1))
sec+=t1
if(t<(n-t1)):
print(sec)
else:
if(sec<=0):
print("0")
else:
print(sec-1) |
import { ContainerConfiguration, Scope } from 'typescript-ioc';
import { HelloWorldApi } from './hello-world.api';
import { HelloWorldService } from './hello-world.service';
const config: ContainerConfiguration[] = [
{
bind: HelloWorldApi,
to: HelloWorldService,
scope: Scope.Singleton,
},
];
export de... |
<gh_stars>0
from .unc_data_loader import unc_data_loader
import numpy as np
def unc_data_loader_2_groups(args):
group_data_ret = unc_data_loader(args)
# print("group_data_ret.shape: ", group_data_ret)
group_AD = group_data_ret[0]
group_LMCI = group_data_ret[3]
group_CN = group_data_ret[1]
gr... |
/**
* Marshall the given parameter object, and output to a SdkJsonGenerator
*/
public void marshall(Disk disk, StructuredJsonGenerator jsonGenerator) {
if (disk == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
jsonGene... |
def timeout(
timeout: float,
func: Callable[..., Any],
args: Tuple[Any, ...] = (),
kwargs: Dict[str, Any] = {},
) -> Any:
class FuncThread(threading.Thread):
def __init__(self, bucket: queue.Queue) -> None:
threading.Thread.__init__(self)
self.result: Any = None
... |
/* Hook to validate the current #pragma GCC target and set the state, and
update the macros based on what was changed. If ARGS is NULL, then
POP_TARGET is used to reset the options. */
static bool
s390_pragma_target_parse (tree args, tree pop_target)
{
tree prev_tree = build_target_option_node (&global_option... |
def filter_by_logged_object(self):
return {
self.__class__.__name__ + '_uuid': self.uuid.hex
} |
//
// Created by k.leyfer on 11.09.2017.
//
#ifndef TOUCHLOGGER_DIRTY_RAWPOINTERDATA_H
#define TOUCHLOGGER_DIRTY_RAWPOINTERDATA_H
#include <stdint.h>
#include "BitSet.h"
#include "../common.h"
/* Raw data for a collection of pointers including a pointer id mapping table. */
struct RawPointerData
{
struct Pointe... |
/**
* A ViewHolder containing views for an alarm item in collapsed stated.
*/
public final class CollapsedAlarmViewHolder extends AlarmTimeViewHolder {
public final TextView alarmLabel;
public final TextView daysOfWeek;
public final TextView upcomingInstanceLabel;
public final View hairLine;
pub... |
A Mount Allison University professor says there is still a lot of research to be done on the health benefits of marijuana compared to its adverse effects.
Karen Crosby is an assistant professor of biology whose research focuses on how the brain regulates appetite within the hypothalamus.
Crosby led a discussion about... |
// processTemplate handles injecting data into specified template file.
func processTemplate(t *testing.T, name string, data interface{}) (string, error) {
t.Helper()
tmpl, err := template.New(name).ParseFiles(path.Join("..", "acceptance", "data", "golden", name))
if err != nil {
t.Fail()
return "", fmt.Errorf(... |
<filename>paradocx/__init__.py
from paradocx.util import w
from paradocx.package import WordPackage
class Document(WordPackage):
def paragraph(self, text=None, style=None):
p = paragraph(text, style=style)
self.start_part.append(p)
return p
def table(self, data=None, style=None):
... |
n = input()
v = list(map(int, raw_input().split()))
configs = 1
for x in set(v):
configs *= v.count(x)
if configs < 3:
print "NO"
exit()
print "YES"
v = sorted([(v[i], i) for i in range(0, len(v))])
def display():
print ' '.join([str(x[1]+1) for x in v])
display()
equals = []
for i in range(0, len... |
import math
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
maxA = A[len(A)-1]
valid = [True] * (maxA+1)
for i in range(len(A)):
if valid[A[i]] == False:
continue
if i != 0 and A[i-1] == A[i]:
valid[A[i]] = False
else:
for j in range(A[i]*2, maxA+1, A[i]):
... |
/**
* Verifies collection generic types or array types are introspected as
* properties according to specification rules
*/
@Test
public void testPropertyCollectionType() throws Exception {
JavaImplementation type = javaImplementationFactory.createJavaImplementation();
Constructor<Pro... |
// StartTorrentSyncing is an endless loop that uses torrents to sync missing blocks
// It will grab any block higher than the highest dblock saved in the database up
// to the highest known block.
func (s *State) StartTorrentSyncing() error {
if !s.UsingTorrent() {
return fmt.Errorf("State is not using torrents, yet... |
#include "version.h"
#include "config.h"
#include "cpuid.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/time.h>
__ID("@(#) $Id: cpuid.cc 2433 2012-01-10 22:01:30Z lyonel $");
#if defined(__i386__) || defined(__alpha__)
static hwNode *getcache(hwNo... |
<filename>src/main/java/it/polimi/se2019/rmi/ViewFacadeInterfaceRMIServer.java
package it.polimi.se2019.rmi;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;
public interface ViewFacadeInterfaceRMIServer {
/**
* Send a string message to a client
*/
void sendGeneri... |
Sharad Pawar, a workaholic by nature, manages to remain in the centre of state politics even as he remains bedridden in his bungalow, 'Silver Oak' on Bhulabhai Desai road in Mumbai. While recovering from a surgery on his leg, Pawar recently managed to postpone a defection attempt by his lieutenant Ganesh Naik of Navi M... |
package zapmixin
import (
"github.com/fox-one/mixin-sdk-go"
"go.uber.org/zap/zapcore"
)
type Handler struct {
conversations []string
client MixinClient
levels []zapcore.Level
async bool
formatter func(zapcore.Entry) string
filter func(zapcore.Entry) bool
afterFunc func(za... |
from flask import Flask, redirect, url_for, request
app = Flask(__name__)
app.config['DEBUG'] = True
@app.route("/users", defaults={'username': 'Guest'})
@app.route("/users/<username>")
def index(username):
return "Users Content " + username
@app.route("/find/<user>")
def show_user(user):
return redirect(url... |
<reponame>ShipChain/dashboard
import WalletInterface from "./WalletInterface"
class HDWalletInterface extends WalletInterface {
constructor(
readonly path,
pubkey,
readonly isHardware: boolean,
identifier: string,
readonly txSigner,
readonly msgSigner,
) {
super(pubkey, true, identifier... |
//deshalb musste ich hier viele verschiedene abfragen machen, wie meine variable nachricht ausschaut
static int leseZahl(String nachricht)
{
System.out.print(nachricht+" ");
int zahl = 0;
do{
try{
zahl = input.nextInt();
input.nextLine();
if(!nachricht.contains("(1/0)")&&((!nachricht... |
n,l = map(int,input().split())
if l<=0 and 0<=l+n-1:
print(n*l+n*(n-1)//2)
elif 0<=l:
print(n*l+n*(n-1)//2-l)
else:
print(n*l+n*(n-1)//2-l-n+1) |
def preprocess_output(self, image, outputs):
crop_coords = []
for bounding_box in outputs[0][0]:
if bounding_box[2] >= self.threshold:
xmin = int(bounding_box[3]*self.image_width)
ymin = int(bounding_box[4]*self.image_height)
xmax = int(boundin... |
<gh_stars>0
package com.github.jgzl.gw.gateway.spi.log;
import com.github.jgzl.gw.common.core.spi.Join;
import com.github.jgzl.gw.common.core.utils.JacksonUtil;
import com.github.jgzl.gw.common.gateway.domain.GatewayLog;
import lombok.extern.slf4j.Slf4j;
@Slf4j(topic = "gateway")
@Join
public class LocalFileRecordLog... |
/**
* This test tests the successful run of the runGetCommand method, retrieving three objects,
* and then returning said objects back to the end user.
*
* This is also testing the construction of the required MatchaGetQuery object.
*/
@Test
public void testRunGetCommand() {
List<Ha... |
/*
* 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 "License"); you may ... |
async def send_terminal_stdout_to_backend(self):
if not self.ws_connected:
log.debug("leaving send_terminal_stdout_to_backend")
return -1
while self.run_sending_thread:
try:
shell_stdout = os.read(self.master, 102400)
resp_header = {
... |
from aiohttp_admin2.exceptions import AdminException
__all__ = [
'ClientException',
'InstanceDoesNotExist',
'FilterException',
'BadParameters',
'CURSOR_PAGINATION_ERROR_MESSAGE',
]
CURSOR_PAGINATION_ERROR_MESSAGE = \
"Pagination by cursor available only together with sorting by primary key"
... |
<filename>src/downloadArtifact.ts
import { getOctokit } from "@actions/github";
import { exec } from "@actions/exec";
import axios from "axios";
import { createWriteStream } from "fs";
import { Readable } from "stream";
import { fileSync } from "tmp";
type Api = ReturnType<typeof getOctokit>;
interface DownloadArgs {... |
/**
* This class tabulates the frequency associated with
* the integers presented to it via the collect() method
* Every value presented is interpreted as an integer
* For every value presented a count is maintained.
* There could be space/time performance issues if
* the number of different values presented is l... |
<reponame>ArgonneCPAC/shamnet
"""
"""
import numpy as np
from ..shmf_bpl import log10_cumulative_shmf_bpl
def test1():
lgmp = np.linspace(8, 17, 5000)
lg_cumu_nd = log10_cumulative_shmf_bpl(lgmp, 0)
assert np.all(np.isfinite(lg_cumu_nd))
|
def transform(self, corpus: Corpus, selector: Callable[[CorpusComponent], bool] = lambda x: True) -> Corpus:
objs = []
for obj in corpus.iter_objs(self.obj_type):
if selector(obj):
objs.append(obj)
else:
obj.add_meta(self.clf_attribute_name, None)
... |
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Operation shape for `AddLayerVersionPermission`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`add_layer_version_permission`](crate::client::Client::add_layer_version_permission).
///
/// Se... |
// NewLimiter returns a custom limiter witout Strict mode
func NewLimiter(window int, burst int) *Limiter {
return newLimiter(Policy{
Window: window,
Burst: burst,
Strict: false,
})
} |
<filename>Example/KXModuleOrz/KXViewController.h
//
// KXViewController.h
// KXModuleOrz
//
// Created by XiangqiTu on 09/23/2020.
// Copyright (c) 2020 XiangqiTu. All rights reserved.
//
@import UIKit;
@interface KXViewController : UIViewController
@end
|
//F6164
//F6165 FUNCTION getGHGConc( ghgNumber, inYear )
float GETGHGCONC( int ghgNumber, int inYear )
{
f_enter( __func__ );
assert( G_CARB != NULL && G_TANDSL != NULL && G_CONCS != NULL && G_NEWCONCS != NULL &&
G_STOREDVALS != NULL && G_NEWPARAMS != NULL && G_BCOC != NULL &&
G_ME... |
/**
* Switches between the display pane to the edit pane.
*/
private void switchPane() {
if (mediaList.getSelectionModel().getSelectedItem() != null) {
if (mediaList.getSelectionModel().getSelectedItem() instanceof Film) {
mediaEditType = "film";
} else if (medi... |
// SetBorderWidth function sets width of the Table's border and it's rows and cells
func (t *Table) SetBorderWidth(value int) *Table {
t.borderWidth = value
for tr := range t.data {
t.data[tr].SetBorderWidth(value)
}
return t
} |
<reponame>ahmedibrahimq/ng-cart
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ProductQtyUpdaterComponent } from './product-qty-updater.component';
describe('ProductQtyUpdaterComponent', () => {
let component: ProductQtyUpdaterComponent;
let fixture: ComponentFixture<ProductQty... |
// ProtoToInstanceTemplatePropertiesDisksInitializeParams converts a InstanceTemplatePropertiesDisksInitializeParams resource from its proto representation.
func ProtoToComputeInstanceTemplatePropertiesDisksInitializeParams(p *computepb.ComputeInstanceTemplatePropertiesDisksInitializeParams) *compute.InstanceTemplatePr... |
<gh_stars>0
import React from 'react';
import styled from 'styled-components';
import media from 'styled-media-query';
import { BoxProps, getBoxExpression } from './Box';
import { ScreenType, ScreenValue } from '@/constants';
import { GatsbyImage } from '@/atoms/GatsbyImage';
import { isNumber } from 'lodash';
import {... |
class TestCreateModels:
"""Class for model initialization test suite."""
@pytest.mark.unit
def test_record_model_create(self, test_recordmodel):
"""should return a record model instance."""
assert isinstance(test_recordmodel, RAMSTKMissionPhaseRecord)
# Verify class attributes are ... |
/**
* Execute the Perforce fix command with jobs, changelist and options. Log
* the returned fixes.
* <p>
* Mark each named job as being fixed by the changelist number given with
* changelist.
*
* @throws BuildException
* the build exception
* @see PerforceTask#... |
<filename>src/getFileSections.ts
// TYPES
// UnparsedAccountEntry
// UnparsedAccountNumberChunk
const hasValidLineLength = (line: string) => line.length === 27
export default function getFileSections(lines: string[]): string[][] {
let entries = [];
// for loop, skipping every 4 lines
for (let i = 0... |
import { Component } from '@angular/core';
import {AuthService} from './auth/services/auth.service';
import {Router,NavigationEnd} from '@angular/router'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
user=null;
editor:b... |
/**
* JAVADOC Method Level Comments
*
* @param arg0 JAVADOC.
*/
@Override
public void onApplicationEvent(ContextRefreshedEvent arg0) {
Message<?> message = MessageBuilder.withPayload(new RegistrationEvent(applicationName,
applicationName, "jms://" + myQueue))
.setHeader(Operative.DESTINATION_NAME, "s... |
// of this matrix. Return an invalid matrix on error.
public Matrix transpose() {
if (!(valid())) {
return (new Matrix().invalidate());
} else {
Matrix transM = new Matrix(cols, rows);
for (int i = 0; i < rows; i++)
for (int j = 0; j < cols; j++)
transM.el[j][i] = el[i][j];
return (trans... |
<gh_stars>0
import javax.swing.JFrame;
////////////////////////////////////////////////////////////// PaintDemo
class PaintDemo {
//============================================================= main
public static void main(String[] args) {
PaintWindow window = new PaintWindow();
window.setDefau... |
Thermal desorption ambient ionization mass spectrometry for emergency toxicology.
In the emergency department, it is important to rapidly identify the toxic substances that have led to acute poisoning because different toxicants or toxins cause poisoning through different mechanisms, requiring disparate therapeutic st... |
/**
* @author Pedro Ruivo
* @since 5.2
*/
@Test(groups = "functional", testName = "tx.gmu.totalorder.TotalOrderDistSimpleTest")
public class TotalOrderDistSimpleTest extends DistSimpleTest {
public void testTotalOrderManager() {
TotalOrderManager totalOrderManager = TestingUtil.extractComponent(cache(0), T... |
def _register_factor_group(
self, factor_group: groups.FactorGroup, name: Optional[str] = None
) -> None:
if name in self._named_factor_groups:
raise ValueError(
f"A factor group with the name {name} already exists. Please choose a different name!"
)
s... |
def _wait_util(self, expect, func, *args, **kwargs):
left = self._wait_retry
while left > 0:
if func(*args, **kwargs) == expect:
return
else:
left = left - 1
sleep(self._interval)
raise Exception("Timeout waiting for state c... |
<filename>src/main/java/com/arkaces/aces_listener_ethereum/ethereum_rpc/RpcRequestFactory.java
package com.arkaces.aces_listener_ethereum.ethereum_rpc;
import com.arkaces.aces_listener_ethereum.RpcRequest;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RpcRequestFactory {... |
/* Author haleyk10198 */
/* �@��: haleyk10198 */
/* CF handle: haleyk100198*/
/* FOR ACM-ICPC WF*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
#define pb push_back
constexpr auto MOD = 1000000007LL;
co... |
<filename>persistence/workload_config.go<gh_stars>0
package persistence
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/boltdb/bolt"
"github.com/golang/glog"
)
// workload variable configuration table name
const WORKLOAD_CONFIG = "workload_config"
type WorkloadConfig struct {
WorkloadURL str... |
N=int(input())
S=list(input())
L=0
R=0
for i in range(N):
if(S[i]=="("):
R+=1
elif(S[i]==")"):
if(R==0):
L+=1
else:
R-=1
for i in range(R):
S.append(")")
for i in range(L):
S.insert(0,"(")
print("".join(S))
|
<gh_stars>0
// Import plugin
import React from "react"
import { Link } from "gatsby"
// Import settings
import settings from "../../../layouts/index"
// Import component
// Import styles
import { Header } from "./style/style"
// Create new component
const HeaderComponent = () => {
return (
<>
<Header th... |
/* Converts from SDL keysym to DX key mapping. */
static int s_MapSDLKeyToDXKey(const SDL_Keysym *keysym) {
switch(keysym->scancode) {
case SDL_SCANCODE_A: return KEY_INPUT_A;
case SDL_SCANCODE_B: return KEY_INPUT_B;
case SDL_SCANCODE_C: return KEY_INPUT_C;
case SDL_SCANCODE_D: retur... |
// Copyright 2016 <NAME> (Falcons)
// SPDX-License-Identifier: Apache-2.0
// Copyright 2016 <NAME>
// Licensed under the Apache License version 2.0
// You may not use this file except in compliance with this License
// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#ifndef DRV8301_H... |
/**
* A factory to create new instances of classes of open metadata classifications by name. Return null if the classification is not known.
*/
public class ClassificationFactory {
private static final Logger log = LoggerFactory.getLogger( ClassificationFactory.class);
private static final String className = ... |
It's nature's example of Joseph and his Technicolour Dream Coat, the chameleon. They're just phenomenal. There is this myth that chameleons change colour to blend in with their surroundings, but this is actually not true.
Most of the reason chameleons change colour is as a signal, a visual signal of mood and aggressio... |
// STD Libs
#include<cmath>
#include<string>
#include<ctime>
#include<cstdio>
#include<vector>
// VItA Libs
#include<structures/domain/AbstractDomain.h>
#include<structures/domain/SimpleDomain.h>
#include<structures/domain/DomainNVR.h>
#include<structures/domain/PartiallyVascularizedDomain.h>
#include<structures/domai... |
# test bytearray.append method
a = bytearray(4)
print(a)
# append should append a single byte
a.append(2)
print(a)
# a should not be modified if append fails
try:
a.append(None)
except TypeError:
print('TypeError')
print(a)
|
/**
* Contains static helper methods for reading data and metadata from NetCDF
* files, OPeNDAP servers and other data sources using the Unidata Common Data
* Model.
*
* @author Jon Blower
* @author Guy Griffiths
* @author Mike Grant, Plymouth Marine Labs
*/
public final class CdmUtils {
private static fina... |
/**
* Custom function, set the function name will be implemented in the call supplement function
*/
public static class TearDownHookFunction extends AbstractFunction {
@Override
public AviatorObject call(Map<String, Object> env,AviatorObject type) {
LogHelper.info("正在执行:{}方法,方法参数:{}"... |
/**
* Add a SystemComponent as a system requirement.
*
* @param requirements SystemComponent representing a system component requirement
*/
public void addSystemComponent(final SystemComponent... requirements) {
if (requirements == null)
return;
synchronized (systemCompon... |
/**
* The basic implementation of the {@link CustomBetSelectionBuilder}
*/
public class CustomBetSelectionBuilderImpl implements CustomBetSelectionBuilder {
private URN eventId;
private int marketId;
private String outcomeId;
private String specifiers;
@Override
public CustomBetSelectionBuild... |
class DataUrl:
"""
Decodes a Base64 encoded data URL
"""
exp = re.compile(r"data:(?P<mime>[^;]+);base64,(?P<content>.*)")
def __init__(self, url: Text):
m = self.exp.match(url)
if not m:
raise ValueError
self.mime = m.group("mime")
self.content = b64de... |
// Grab a buffer from the available buffers or create a new buffer if none are available
void FD3D12DefaultBufferPool::AllocDefaultResource(const D3D12_RESOURCE_DESC& Desc, FD3D12ResourceLocation& ResourceLocation, uint32 Alignment)
{
FD3D12Device* Device = GetParentDevice();
FD3D12Adapter* Adapter = Device->GetParen... |
/**
* Check gwt-user dependency matches plugin version
*/
private void checkGwtUserVersion() throws MojoExecutionException
{
InputStream inputStream = Thread.currentThread().getContextClassLoader()
.getResourceAsStream( "org/codehaus/mojo/gwt/mojoGwtVersion.properties" );
Prope... |
Hillary Clinton: Aliens May Have Visited Us Already; Vows to Get to the Bottom of UFOs Jon Podhoretz said, correctly, that if any Republican candidate had said this, it would be screaming news all over every dial and website -- a perfect Otherizing story illustrating the strange, anti-scientific beliefs of Republicans.... |
Table-driven and context-sensitive collage languages
In this paper, we introduce the notions of context-sensitive and ET0L collage grammars as generalizations of context-free collage grammars. Both kinds of picture-generating devices are more powerful than the context-free case. Nevertheless, the size of collages in a... |
<filename>pkg/execution/plugins/atlassian/secretenvvar/kubecompute/podsecretenvvar_plugin_test.go
package kubecompute
import (
"testing"
smith_v1 "github.com/atlassian/smith/pkg/apis/smith/v1"
smith_plugin "github.com/atlassian/smith/pkg/plugin"
"github.com/atlassian/voyager/pkg/execution/plugins/atlassian/secret... |
//! Contains offspring selection algorithms.
use crate::construction::heuristics::InsertionContext;
use crate::solver::RefinementContext;
mod naive_selection;
pub use self::naive_selection::NaiveSelection;
/// A trait which specifies evolution selection behavior.
pub trait Selection {
/// Selects parent from pop... |
/**
* Method for building and signing packets.
*
* @param function (byte) protocol function
* @param hostPrivKey (PrivateKey) host's private key object
* @param p1 (byte) the first parameter
* @param p2 (byte) the second parameter
* @param data (byte[]) pac... |
package com.outlook.bigkun.concepts;
import java.util.Hashtable;
/**
* @author zhanghk
* @since 2019/8/2
*/
public class FlyweightFactory {
private Hashtable flyweights = new Hashtable();
public Flyweight getFlyweight(Object key) {
Flyweight flyweight = (Flyweight) flyweights.get(key);... |
import sys
readline = sys.stdin.readline
N = int(readline())
p = 0
ans = set()
for i in range(1,N + 1):
p += i
ans.add(i)
if p >= N:
break
if p == N:
for a in ans:
print(a)
exit(0)
ans.remove(p - N)
for a in ans:
print(a)
|
Normative Aesthetics: The Ideal Audience and Art Education
Reader-Response Criticism proposes a new way of looking at literary text. One of the writers of this criticism discusses about 'literary competence' which entails the idea of 'ideal reader'. The writer proposes the idea of 'ideal audience' to work with fields ... |
Several dozen professors in Harvard University’s Faculty of Arts and Sciences have signed a letter to their dean asking for formal oversight of the massive open online courses offered by Harvard through edX, a MOOC provider co-founded by the university.
While “some faculty are tremendously excited about HarvardX,” the... |
<gh_stars>0
// WARNING: This file was autogenerated by jni-bindgen. Any changes to this file may be lost!!!
#[cfg(any(feature = "all", feature = "android-os-Environment"))]
__jni_bindgen! {
/// public class [Environment](https://developer.android.com/reference/android/os/Environment.html)
///
/// Requir... |
Immunohistochemical localization of steroidogenic enzymes in corpus luteum of wild sika deer during early mating season.
We analyzed the localization of steroidogenic enzymes (P450 scc, 3 beta HSD, P450 arom and P450 c17) in the corpora lutea of two Hokkaido sika deer (Cervus nippon yesoensis) during the early mating ... |
def _variable(self):
if self.token.type == 'SYMBOL':
name = self.token.value
self._advance()
return Variable(name)
else:
self._error('SYMBOL') |
"Heaven has no rage like love to hatred turned, nor hell a fury like a woman scorned," playwright William Congreve wrote.
In a suburb of Chicago, fury has overtaken a jilted bride who is suing her former fiancé for the wedding costs. Dominique Buttitta, dumped four days before the wedding was to take place, is seeking... |
Lionsgate’s “Divergent” has opened impressively with $4.9 million at late-night shows on Thursday night in the U.S.
“We’re off to a great start with strong numbers from all regions of the country, urban, suburban and rural alike,” said Lionsgate CEO Jon Feltheimer. “We’re confident that ‘Divergent’ is on its way to be... |
/* $Header: /Users/ikriest/CVS/mops/external_forcing_mops_biogeochem.c,v 1.1.1.1 2015/06/03 17:02:09 ikriest Exp $ */
/* $Name: mops-1_2 $*/
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef READ_SWRAD
#include "p... |
<reponame>hugbed/OpenS3D
// Copyright 2012 The Chromium Authors. All rights reserved.
// Inspired by Chromium video capture interface
// Simplified and stripped from internal base code
#include "s3d/video/video_frame.h"
namespace s3d {
// static
size_t VideoFrame::AllocationSize(VideoPixelFormat format, const Size& ... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/ads/googleads/v4/services/merchant_center_link_service.proto
package com.google.ads.googleads.v4.services;
public final class MerchantCenterLinkServiceProto {
private MerchantCenterLinkServiceProto() {}
public static void registerAllExt... |
def save_plots(ds: tf.data.Dataset, num_images: int) -> None:
for i, sample in enumerate(ds.take(num_images)):
image, bboxes, labels = [tensor.numpy() for tensor in sample]
image = image.astype(np.int32)
for bbox, label in zip(bboxes, labels):
x_min, y_min, width, height = [int(v... |
<gh_stars>10-100
import { Key, useState } from 'react';
import {
cleanup,
fireEvent,
render,
TestRenderer,
act,
} from '../../__test-utils__';
import {
describeForwardRefToHTMLElement,
describeHostElementClassNameAppendable,
} from '../../__test-utils__/common';
import Tabs, { Tab, TabPane } from '.';
de... |
// create a list of prediction inputs from double matrix
private List<PredictionInput> createPIFromMatrix(double[][] m) {
List<PredictionInput> pis = new ArrayList<>();
int[] shape = MatrixUtilsExtensions.getShape(m);
for (int i = 0; i < shape[0]; i++) {
List<Feature> fs = new ArrayL... |
import pandas as pd
import os
from ..utils import NoCloudtrailException
from isitfit.utils import logger
from isitfit.cost.cloudtrail_iterator import dict2service
class CloudtrailCached:
def __init__(self, EndTime, cache_man, tqdmman):
self.EndTime = EndTime
self.tqdmman = tqdmman
self... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.