content stringlengths 10 4.9M |
|---|
// Adds instances for all test things
public void addTestTingInstances() {
for (GeneralTestInputOutput inputOutput : inputoutputs) {
if (inputOutput.instance == null) {
Instance instance = ThingMLFactory.eINSTANCE.createInstance();
instance.setName(inputOutput.name);
instance.setType(inputOutput.type)... |
<reponame>WojciechKo/asgardex-electron
import { BCHChain, BNBChain, BTCChain, Chain, DOGEChain, ETHChain, LTCChain, THORChain } from '@xchainjs/xchain-util'
import * as O from 'fp-ts/lib/Option'
import * as Rx from 'rxjs'
import * as RxOp from 'rxjs/operators'
import * as BNC from '../binance'
import * as BTC from '..... |
def render_rect(self, box: Box, color: ColorType, projection: Matrix) -> None:
if not isinstance(color, ffi.CData):
color = ffi.new("float[4]", color)
lib.wlr_render_rect(self._ptr, box._ptr, color, projection._ptr) |
<reponame>foundations/futuquant<gh_stars>1-10
# -*- coding: utf-8 -*-
from futuquant import *
from .data_acquisition import *
from .config import config
from .check_config import CheckConfig
import sys
cc = CheckConfig()
ret, msg = cc.check_all()
if ret != RET_OK:
print(ret, msg)
sys.exit(1)
big_sub_codes = ... |
An end-to-end deep learning model can detect the gist of the abnormal in prior mammograms as perceived by experienced radiologists
This study investigated the possibility of building an end-to-end deep learning-based model for the prediction of a future breast cancer based on prior negative mammograms. We explored whe... |
import { ErrorItem } from './error';
export interface RepositoryOkResponse<D> {
ok: true;
data: D;
errors: [];
}
export interface RepositoryErrorResponse {
ok: false;
data: undefined;
errors: ErrorItem[];
}
export type RepositoryResponse<D> =
| RepositoryOkResponse<D>
| RepositoryErrorResponse;
|
<filename>helpers/getTxnsUrl.ts
import moment from "moment";
export const DATE_FORMAT = "YYYYMMDD";
export function getTxnsUrl(
apiSiteUrl: string,
accountNumber: string,
startDate?: Date
) {
const defaultStartMoment = moment().subtract(1, "years").add(1, "day");
if (!startDate) {
startDate = defaultStar... |
/**
* Class for loading Textures from drive<br>
* <br>
* Supported Formats (From STB):<br>
* <br>
* JPEG baseline and progressive (12 bpc/arithmetic not supported, same as stock
* IJG lib<br>
* PNG 1/2/4/8/16-bit-per-channel<br>
* TGA (not sure what subset, if a subset)<br>
* BMP non-1bpp, non-RLE<br>
* PSD (... |
<gh_stars>0
import { db } from "@firestore";
import { HttpError } from "@http-error";
import { autoId } from "@nicollite/utils";
import { Chopp } from "shared";
export const choppCollection = db.collection("chopps");
/**
* Add a the chop doc, if don't exists create a new doc
* @param chopps A Chopp object or array
... |
Oncogenic Role of miR-15a-3p in 13q Amplicon-Driven Colorectal Adenoma-to-Carcinoma Progression
Progression from colorectal adenoma to carcinoma is strongly associated with an accumulation of genomic alterations, including gain of chromosome 13. This gain affects the whole q arm and is present in 40%–60% of all colore... |
-- Compile with O2; SpecConstr should fire nicely
-- and eliminate all allocation in inner loop
module Main where
foo :: Int -> Maybe (Double,Double) -> Double
foo _ Nothing = 0
foo 0 (Just (x,y)) = x+y
foo n (Just (x,y)) = let r = f x y in r `seq` foo (n-1) (Just r)
where
f x y | x <= y = (x,y)
... |
/**
* find person with all names that have.
*/
@Override
public Person find(Long id) throws SQLException {
Person person = null;
List<Person_Name> person_names = new ArrayList<Person_Name>();
List<Person_Identifier> person_identifiers = new ArrayList<Person_Identifier>();
P... |
#include <stdio.h>
#include <stdlib.h>
void calcu(int ,int);
void ncalcu(int,int);
int main()
{
int n,m,count,count1,count2;
scanf("%d%d",&n,&m);
if(n%2==0){
calcu(n,m);
}
if(n%2!=0)
{
ncalcu(n,m);
}
return 0;
}
void calcu(int n,int m)
{
int count1,count2,coun... |
// helper to load a MathFont Property File
static nsresult
LoadProperties(const nsString& aName,
nsCOMPtr<nsIPersistentProperties>& aProperties)
{
nsAutoString uriStr;
uriStr.AssignLiteral("resource://gre/res/fonts/mathfont");
uriStr.Append(aName);
uriStr.StripWhitespace();
uriStr.AppendLitera... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
#include <math.h>
#include "error.h"
#include "file.h"
#include "gpio.h"
#include "task.h"
#include "kinematics.h"
const tasks_table_t tasks[] = { \
{ "gpio", &task_gpio }, \
{ "core", &task_core... |
def histogram(mass, h, w):
table = [[0]*w for i in range(h)]
for i in range(h):
for j in range(w):
if mass[i][j] == '*':
table[i][j] = 0
else:
table[i][j] = table[i-1][j] + 1
return table
def get_rectangle_area(table, w):
maxv = 0
sta... |
def read(self):
msg = None
max_tries = 4
for attempt in range(1, max_tries + 1):
try:
while not isinstance(msg, pynmea2.GGA):
msg = pynmea2.parse(self.ser.readline())
except pynmea2.ParseError:
if attempt == max_tries:
... |
from collections import Counter
import sys
sys.setrecursionlimit(4100000)
n, m, k = map(int, input().split())
#友達関係
F = [[] for i in range(n)] #Friend
for i in range(m):
a, b = map(int, input().split())
F[a-1].append(b)
F[b-1].append(a)
#DFSで連結部分ごとのグループに分ける
G = [0] * n #Group
gid = 0 #group id
#DFSを行うため... |
<reponame>trapchain/go-perun<filename>backend/ethereum/channel/contractbackend_test.go
// Copyright 2019 - See NOTICE file for copyright holders.
//
// 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 Lice... |
<reponame>sriharshachilakapati/SilenceEngine
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, includ... |
// This is the latest version of AWS WAF, named AWS WAFV2, released in November,
// 2019. For information, including how to migrate your AWS WAF resources from the
// prior release, see the AWS WAF Developer Guide
// (https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html).
// Retrieves the WebACL for t... |
<reponame>adityadani/go-replace-tag
package main
import (
"bytes"
"flag"
"fmt"
"go/parser"
"go/token"
"go/printer"
"go/ast"
"strings"
"os"
"github.com/Sirupsen/logrus"
)
const (
ReplaceTag = "// @replace-tag "
)
func replaceTagsInFile(input string) {
fset := token.NewFileSet() // positions are relative ... |
import itertools
def luckygen():
count = 1
while True:
for i in itertools.product("47", repeat=count):
yield int("".join(i))
count += 1
num = input()
for i in luckygen():
if i > num:
break
if num % i == 0:
print "YES"
exit()
print "NO" |
<reponame>anirudhts/github-api-cli
package types
//UserInfo encapsulates user information
type UserInfo struct {
Name string `json:"name"`
Location string `json:"location"`
PublicRepos int `json:"public_repos"`
}
//Follower encapsulates follower meta
type follower struct {
Name string `json:"login... |
<reponame>Grom1799/pathfinder
#include "libmx.h"
void *mx_memcpy(void *restrict dst, const void *restrict src, size_t n) {
unsigned char *p1 = dst;
unsigned char *p2 = (unsigned char *)src;
while (n--)
*p1++ = *p2++;
return dst;
}
|
/**
* Populate distinct keys part of cachedKeys for a particular row.
* @param row the row
* @param index the cachedKeys index to write to
*/
private void populateCachedDistinctKeys(Object row, int index) throws HiveException {
StandardUnion union;
cachedKeys[index][numDistributionKeys] = union = ne... |
#include "util/file.h"
#include "framework/log.h"
#include "util/memory.h"
#include <windows.h>
#include "util/platform/win/error.h"
#include "util/string.h"
/* ------------------------------------------------------------------------- */
uint32_t
file_load_into_memory(const char* file_name, void** buffer, file_opts_e ... |
import { fourDaysAgo, oneDayAgo, oneWeekAgo } from './dates';
/* eslint-disable max-len */
import {
CalendarItem,
Child,
Notification,
ScheduleItem,
User,
} from '@skolplattformen/api';
import { oneDayForward, oneWeekForward, twoDaysForward } from './dates';
const data: any = {
'39b59e-bf4b9f-f68ac25321-97... |
/**
* Switches the left-side valve on the analyte collector to the
* "TO COLUMN" position.
*/
public void leftColumnPulse() {
if (!checkPort()) {
return;
}
println("C-");
controller.sendToVnmr("lcColumnValve=1");
} |
// this inner class cannot be static because it uses member variable(s) in JCmdLineApp
public class SysConsoleInput extends ConsoleInputStream {
public void doBeforeInput() {
}
public String inputString() throws InterruptedException {
String strInput = "";
... |
<reponame>surgefm/v2land-redstone
import * as bcrypt from 'bcrypt';
import { RedstoneRequest, RedstoneResponse } from '@Types';
import { Client, sequelize } from '@Models';
import { ClientService, RecordService } from '~/api/services';
async function changePassword(req: RedstoneRequest, res: RedstoneResponse) {
cons... |
/**
* Omakase REST Application
*
* @author Richard Lucas
*/
@ApplicationPath("api")
public class OmakaseApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> resources = new HashSet<>();
resources.addAll(getProviders());
resources.addAll(getIn... |
/**
* Common superclass for classes that update the jobs hierarchy by subscribing toJMX notifications from the drivers.
* @author Laurent Cohen
* @since 5.1
* @exclude
*/
abstract class AbstractJobNotificationsHandler implements NotificationListener, JobMonitoringHandler {
/**
* Logger for this class.
*/
... |
Contact-induced doping in aluminum-contacted molybdenum disulfide
The interface between two-dimensional semiconductors and metal contacts is an important topic of research of nanoelectronic devices based on two-dimensional semiconducting materials such as molybdenum disulfide (MoS2). We report transport properties of ... |
What do you want to happen to your body once you die? Do you want to be buried? Perhaps in a graveyard with the rest of your family? Or maybe you’d rather be cremated and have your ashes scattered about your favourite site? Whatever you want, it’s going to be something pretty ‘normal’, isn’t it? Well, how about this? W... |
<gh_stars>1-10
#include "LaplacesDemon.h"
#include <RcppArmadilloExtensions/sample.h>
using namespace Rcpp;
using namespace arma;
SEXP mcmcamwg(SEXP MODEL, SEXP DATA, SEXP ITERATIONS, SEXP STATUS,
SEXP THINNING, SEXP SPECS, SEXP ACCEPTANCE, SEXP DEV, SEXP DIAGCOVAR,
SEXP liv, SEXP MON, SEXP MO0, SEXP SCALEF, SE... |
/**
* Created by shidawei on 16/3/14.
*/
public class UTime {
public static Date addMinute(Date date,int amount){
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.MINUTE, amount);
return cal.getTime();
}
public static Date addYear(Date date,int a... |
/**
* Copyright Soramitsu Co., Ltd. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "application/impl/local_key_storage.hpp"
#include <boost/property_tree/json_parser.hpp>
#include "application/impl/config_reader/error.hpp"
#include "application/impl/config_reader/pt_util.hpp"
#include "comm... |
# coding: utf-8
# @File: model.py
# @Author: <NAME>.
# @Email: <EMAIL>
# @Time: 2020/10/10 17:12:56
# @Description:
import torch
import torch.nn as nn
from transformers import BertModel
# Bert
class BertClassifier(nn.Module):
def __init__(self, bert_config, num_labels):
super().__init__()
self.be... |
/**
* creates and runs the whole game
*
* @param args arguments array
*/
public static void main(String[] args) {
Chess gm = new Chess();
Scanner scan = new Scanner(System.in);
Pattern p1 = Pattern.compile("(?:[[A-h][a-h]])(?:[1-8]) (?:[[A-h][a-h]])(?:[1-8])");
<N||R||B||Q>
Pattern p2 = Pattern.compi... |
// Bootstrap yargs for Deno platform:
import denoPlatformShim from './lib/platform-shims/deno.ts';
import {YargsFactory} from './build/lib/yargs-factory.js';
const Yargs = YargsFactory(denoPlatformShim);
export default Yargs;
|
// Copyright 2019 The vault713 Developers
//
// 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 law or a... |
#include<bits/stdc++.h>
#define ll long long
#define N 100007
using namespace std;
ll dp[N];
// Keeps upper hull for maximums.
// add lines with -m and -b and return -ans to
// make this code working for minimums.
typedef long double ld;
const ld inf = 1e18;
struct chtDynamic {
struct line {
ll m, b; ld... |
<reponame>mcb64/pmgr<filename>pmgr/pmgr_ui.py<gh_stars>0
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'pmgr.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
... |
Realistic event rates for detection of supermassive black hole coalescence by LISA
The gravitational waves generated during supermassive black hole (SMBH) coalescence are prime candidates for detection by the satellite LISA. We use the extended Press-Schechter formalism combined with empirically motivated estimates fo... |
def ncon_to_weighted_adj(dims: List[Tuple], labels: List[List[int]]):
N = len(labels)
ranks = [len(labels[i]) for i in range(N)]
flat_labels = np.hstack([labels[i] for i in range(N)])
tensor_counter = np.hstack(
[i * np.ones(ranks[i], dtype=int) for i in range(N)])
index_counter = np.hstack([np.arange(r... |
// HasValue returns true if the value already exists in any List.
func (l *Lists[K, V, O]) HasValue(value V) (bool, error) {
v, err := l.definition.valueEncoding.Encode(value)
if err != nil {
return false, fmt.Errorf("encode value: %w", err)
}
valuesBucket, err := l.valuesBucket(false)
if err != nil {
return f... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from net.ResNet import resnet50
from math import log
from net.Res2Net import res2net50_v1b_26w_4s
class ConvBNR(nn.Module):
def __init__(self, inplanes, planes, kernel_size=3, stride=1, dilation=1, bias=False):
super(ConvBNR, self).__init_... |
<filename>src/endpoints/snip.ts
import { client } from '../client'
import { snip } from '../types/snip'
/**
* Represents the collection of fields that can be passed when creating a new snip.
* @see https://snip.hxrsh.in/api-docs.md
*/
type SnipCreateFields = Partial<
Pick<snip, 'slug' | 'content' | 'password' | '... |
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
/* Before Node.js v11 the crypto module did not support
* a method to PEM format a ECDH key. It has always supported
* producing such keys: `crypto.createECDH`. But formatting
* these keys as a PEM for use ... |
//*****************************************************************************
//
//! Set the global SNEP Packet Pointer and Length
//!
//! \param pui8PacketPtr is the pointer to the first payload to be transmitted.
//! \param ui32PacketLength is the length of the total packet.
//!
//! This function must be called by ... |
/**
* extends the hadoop JobControl to remove the hardcoded sleep(5000)
* as most of this is private we have to use reflection
*
* See {@link https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20/src/mapred/org/apache/hadoop/mapred/jobcontrol/JobControl.java}
*
*/
public class PigJobControl extends... |
/**
* Loads the dag, queryId.plan, from disk.
* @param queryId
* @return the dag corresponding to queryId
* @throws IOException
*/
@Override
public AvroDag load(final String queryId) throws IOException {
final File storedFile = getAvroOperatorChainDagFile(queryId);
return loadFromFile(storedFil... |
Tikkun Magazine, March/April 2009
The Cynical Psychology of Capitalism
by Allen D. Kanner
Two years ago, three psychologists and an economist published a long journal article on the dubious psychology that underlies American corporate capitalism. The original title of the piece began with the phrase, "A Taboo Topic,... |
Heme Cofactor‐Resembling Fe–N Single Site Embedded Graphene as Nanozymes to Selectively Detect H2O2 with High Sensitivity
Over the past decade, the catalytic activity of nanozymes has been greatly enhanced, but their selectivity is still low and considered a critical issue to overcome. Herein, Fe–N4 single site embedd... |
#include <bits/stdc++.h>
using namespace std;
#define st first
#define nd second
#define pb push_back
#define int long long int
#define endl '\n'
#define MOD (int)(1e9 + 7)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define mid start+(end-start)/2
#define debug(x) cerr << #x <... |
import { Component, OnInit } from '@angular/core';
import { Http } from '@angular/http';
import { FormGroup, FormControl, Validators, FormBuilder } from '@angular/forms';
import { ShoeService } from 'app/services/shoe.service';
import { ToastComponent } from 'app/shared/toast/toast.component';
import { CompanyService }... |
/// Fetch the nth word-sized system call argument as a file descriptor
/// and return both the descriptor and the corresponding struct file.
fn argfd<'a>(n: usize, proc: &'a CurrentProc<'a>) -> Result<(i32, &'a RcFile), ()> {
let fd = argint(n, proc)?;
if fd < 0 || fd >= NOFILE as i32 {
return Err(());
... |
/**
* Find a resolution from a given string representation. Note, this looks
* into all resolutions and does not look into the specific resolutions
* related to a state. Search is by name and by ID of the resolution.
*
* @param value
* - the resolution display text or "" or null;
* @return the... |
//----------------------------------------------------------------------------
// Function: KillTask
//
// Description:
// Kills a task via a jobobject. Outputs the
// appropriate information to stdout on success, or stderr on failure.
//
// Returns:
// ERROR_SUCCESS: On success
// GetLastError: otherwise
DWORD Kill... |
// SetConfirmOwnership sets ownership confirming information to db
func (k Keeper) SetConfirmOwnership(ctx sdk.Context, confirmOwnership *types.ConfirmOwnership) {
store := ctx.KVStore(k.storeKey)
key := types.GetConfirmOwnershipKey(confirmOwnership.Product)
store.Set(key, k.cdc.MustMarshalBinaryBare(confirmOwnershi... |
/* giowin32-private.c - private glib-gio functions for W32 GAppInfo
*
* Copyright 2019 Руслан Ижбулатов
*
* SPDX-License-Identifier: LGPL-2.1-or-later
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free... |
/**
* This method loads the image for a Contact into the ImageView. If the user does not have image url set, it will create an alphabeticText image.
* This will automatically check if the image is set and handle the views visibility by itself.
*
* @param imageView CircularImageView which loads the i... |
// ISBN10 ISBN13 Title SubTitle Author Translator Publisher Pubdate Price Series Pages
func prettyBook(b *bookstore.BookInfo) {
fmt.Printf("%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s\n", b.ISBN10, b.ISBN13, b.Title, b.SubTitle,
b.OriginTitle, sa(b.Author), sa(b.Translator), b.Publisher, b.Pubdate, y(b.Price),
b.Series... |
// NewClient instantiates a new core.Broker client
func NewClient(netAddr string) (core.AuthBrokerClient, error) {
brokerConn, err := grpc.Dial(
netAddr,
grpc.WithInsecure(),
grpc.WithTimeout(time.Second*15),
)
if err != nil {
return nil, err
}
broker := core.NewBrokerClient(brokerConn)
brokerManager := ... |
In all of JavaScript, I’m not sure there is a more maligned piece than eval() . This simple function designed to execute a string as JavaScript code has been the more source of more scrutiny and misunderstanding during the course of my career than nearly anything else. The phrase “eval() is evil” is most often attribut... |
Abstract A179: Targeting UCP2 pathway in melanoma cells reprograms the tumor microenvironment and initiates antitumor immune cycle
Immune checkpoint blockade treatment displays promising therapeutic efficiency in different cancer types. However, a significant proportion of patients are refractory to this treatment due... |
///////////////////////////////////////////////////////////////////////////////
// This file is generated automatically using Prop (version 2.4.0),
// last updated on Jul 1, 2011.
// The original source file is "env.ph".
///////////////////////////////////////////////////////////////////////////////
#line 1 "env.ph... |
Phenotypic diversity and sensitivity to injury of the pulmonary endothelium during a period of rapid postnatal growth
Endothelial cells (EC) sit at the forefront of dramatic physiologic changes occurring in the pulmonary circulation during late embryonic and early postnatal life. First, as the lung moves from the hypo... |
A soldier prepares to fire an M-203 grenade launcher mounted to an M-16 assault rifle. U.S. forces typically use rifle-attached grenade launchers like this one. Photo courtesy U.S. Department of Defense
Impact grenades work like a bomb launched from an airplane -- they explode as soon as they hit their target. Typical... |
<gh_stars>0
package org.springframework.security.boot.unionid.authentication;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* UnionID登录认证绑定的参数对象Model
*
* @author : <a href="https://github.com/hiwepy">wandl</a>
*/
public class UnionIDLoginRequest {
... |
/**
* Converts the specified transformation request to a Scala script that can be executed by the script engine.
*
* @param request the transformation request
* @return the Scala script
*/
@Nonnull
@VisibleForTesting
String toTransformScript(@Nonnull final TransformRequest request) {
... |
// Valid reports whether configuration is valid or not.
func (lang *Language) Valid() bool {
notEmpty := len(strings.TrimSpace(lang.Code)) != 0
isUp := lang.Code == strings.ToUpper(lang.Code)
return notEmpty && isUp
} |
Over the years, Dale Earnhardt Jr. has been about as enthusiastic for test sessions as he is for road course racing.
In other words, he wouldn’t mind if neither existed.
But this week, Earnhardt found himself “freaking pumped up” to come to a NASCAR organizational test in Phoenix, where he’s turning laps in the publi... |
/*[clinic input]
_io.FileIO.read
size: Py_ssize_t(accept={int, NoneType}) = -1
/
Read at most size bytes, returned as bytes.
Only makes one system call, so less data may be returned than requested.
In non-blocking mode, returns None if no data is available.
Return an empty bytes object at EOF.
[clinic start g... |
#include<bits/stdc++.h>
using namespace std;
typedef pair<int,string> P;
typedef long long int lld;
#define INF (1<<20)
int main(){
int n;
cin >> n;
vector<P> product;
map<string,int> count;
for(int i=0;i<n;i++){
string name; int num;
cin >> name >> num;
if(count[name] == 0) product.push_back(P(n... |
<filename>doccontrollers/src/test/java/ru/doccloud/controller/IAControllerGetTest.java
package ru.doccloud.controller;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.... |
def execute_script(self, string, args=None):
result = None
try:
result = self.driver_wrapper.driver.execute_script(string, args)
return result
except WebDriverException:
if result is not None:
message = 'Returned: ' + str(result)
el... |
/* access modifiers changed from: package-private */
public boolean h() {
for (int i2 = 0; i2 < this.a.size(); i2++) {
if (b(this.a.get(i2))) {
return true;
}
}
return false;
} |
// GetFakeMachineFromTemplate passes the machine template spec to return the machine object
func GetFakeMachineFromTemplate(template *v1alpha1.MachineTemplateSpec, parentObject runtime.Object, controllerRef *metav1.OwnerReference) (*v1alpha1.Machine, error) {
desiredLabels := getMachinesLabelSet(template)
desiredFina... |
def GenerateUserReport(flags):
if FILE_MANAGER.FileExists(_REPORT_USERS_ORGS_FILE_NAME) and not flags.force:
print 'Showing counts from existing file.'
return
print 'Generating new counts...'
arg_list = [
'--output_file=%s' % _REPORT_USERS_ORGS_FILE_NAME,
'--csv_fields=%s' % ','.join(_REPORT_F... |
/**
* Created by sunpengfei on 15/11/4.
*/
public class HotfixApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
File dexPath = new File(getDir("dex", Context.MODE_PRIVATE), "hackdex_dex.jar");
Utils.prepareDex(this.getApplicationContext(), dexPath,... |
/**
* <pre>
* Kill all the TG server processes.
* Note that this method blindly tries to kill all the servers of the machine
* and do not update the running status of those servers.
* - taskkill on Windows.
* - kill -9 on Unix.
* </pre>
*
* @throws Exception Kill operation fails
*/
publi... |
<filename>src/ui/shared/Svg/Icons/Won.tsx
import React from "react";
import Svg from "../Svg";
import {SvgProps} from "../types";
const Icon: React.FC<SvgProps> = (props) => {
return (
<Svg viewBox="0 0 80 80" {...props}>
<g clipPath="url(#clip0)">
<path
fill... |
ANDERSON J R (1993) Rules of the Mind. Hillsdale, NJ: Lawrence Erlbaum Associates.
ANDERSON J R and Lebiere C (1998) The Atomic Components of Thought. Mahwah, NJ: Lawrence Erlbaum Associates.
AXTELL R, Axelrod J and Cohen M (1996) Aligning Simulation Models: A Case Study and Results. Computational and Mathematical Or... |
<filename>pzy-redis-starter/src/main/java/org/pzy/opensource/redis/support/util/RedisIncrAndDecrUtil.java<gh_stars>0
/*
* Copyright (c) [2019] [潘志勇]
* [pzy-opensource] is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain... |
t = int(input())
for i in range(t):
b,p,f = [int(i) for i in input().split()]
h,c = [int(i) for i in input().split()]
buns = b//2
tr = (p+f)*2
k = (p+f)
if b < 2:
print(0)
elif tr < b:
if h == c:
print(k*h)
elif h > c:
a = h*p
... |
use clap::Parser;
#[derive(Parser)]
#[clap(version = "1.0")]
#[derive(Debug)]
struct Opts {
year: u32,
day: usize,
part: usize,
}
fn main() {
let opts: Opts = Opts::parse();
match (opts.year, opts.day, opts.part) {
(2015, day, part) => aoc::aoc_2015::SOLUTIONS[day - 1][part - 1](),
... |
<filename>tests/test-checkpoint2.py
a = 5
#chk>{{{
#chk>gANDIEfymvjN9EowcCGj+XNtin7uihFyNxXkbW2Myny7GZzJcQAugAN9cQAoWAwAAABfX2J1aWx0aW5z
#chk>X19xAWNidWlsdGlucwpfX2RpY3RfXwpYAQAAAGFxAksFdS4=
#chk>}}}
print(a)
#o> 5
|
MEXICO CITY (Reuters) - Hector Beltran Leyva, one of the most notorious Mexican drug lords still at large, was captured on Wednesday by soldiers at a seafood restaurant in a picturesque town in central Mexico popular with American retirees.
Pictures of the head of the Beltran Leyva drug cartel Hector Beltran Leyva are... |
////////////////////////////////////////////////////////////////////
// Function: EggVertexPool::begin()
// Access: Public
// Description: Returns an iterator that can be used to traverse
// through all the vertices in the pool.
//////////////////////////////////////////////////////////////////... |
<reponame>trebol-ecommerce/ngx-trebol-frontend
/*
* Copyright (c) 2022 The Trebol eCommerce Project
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';
/**
* Keeps track of the sidenav o... |
#pragma once
#include <Engine/LogicCore/Components/SComponent.h>
namespace ScrapEngine
{
namespace Physics
{
class CollisionBody;
}
}
namespace ScrapEngine
{
namespace Core
{
class RigidBodyComponent;
class TriggerComponent : public SComponent
{
private:
Physics::CollisionBody* collisionbody_ = nu... |
/** Gitiles access for testing. */
public class TestGitilesAccess implements GitilesAccess.Factory {
private final DfsRepository repo;
public TestGitilesAccess(DfsRepository repo) {
this.repo = checkNotNull(repo);
}
@Override
public GitilesAccess forRequest(final HttpServletRequest req) {
return new... |
def parse(self, content, path, delimiter=None):
if delimiter is None:
delimiter = self.delimiters[0]
if not isinstance(delimiter, str):
raise TypeError('delimiter must be a str')
if not self.pre_open:
self.parser(content, path, delimiter)
return
... |
<gh_stars>1-10
package de.kxmpetentes.engine.command;
import de.kxmpetentes.engine.command.impl.ICommand;
import lombok.Getter;
/**
* @author kxmpetentes
* @see de.kxmpetentes.engine.command.impl.ICommand;
*/
public abstract class Command implements ICommand {
@Getter
public final String commandName;
... |
export declare function any(): (_?: any) => boolean;
export declare function eq(value: any): (_?: any) => boolean;
declare class Mocked {
private calls;
private expectations;
onCall(method: string, args: any): any;
times(method: string, ...args: any): number;
reset(): void;
resetTimes(): void;
... |
<filename>src/models/index.ts
export * from './IPersonalQuickLinksWebPartProps';
export * from './IPersonalQuickLinksProps';
export * from './IQuickLinks';
export * from './IQuickLink';
|
from complete_db.models import Author, Book
import flask_api_framework as af
from .schemas import (
AuthorsBooksListKwargsSchema,
AuthorSchema,
BookCreateSchema,
BookDetailBodySchema,
BookDetailKwargsSchema,
BookListSchema,
)
class AuthorsIndex(af.List, af.Create):
"""
List all autho... |
export * from './failover-strategy';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.