content stringlengths 10 4.9M |
|---|
<filename>admin.gwt.core/src/main/java/org/jresearch/gavka/gwt/core/client/module/connection/editor/PropertySelectEvent.java
package org.jresearch.gavka.gwt.core.client.module.connection.editor;
import javax.annotation.Nonnull;
import com.google.web.bindery.event.shared.Event;
public class PropertySelectEvent ... |
import java.util.*;
import java.io.*;
public class forceees {
public static void main(String[] args) throws IOException {
BufferedReader rd = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(rd.readLine());
cards = new String[N];
StringTokenizer... |
Looking for news you can trust?
Subscribe to our free newsletters.
In the 2012 presidential race, New Hampshire’s first-in-the-nation primary is make-or-break for Mitt Romney, and to win it, Romney’s campaign will need the savviest operatives it can find. But Team Romney will have to go without one key player: Bruce ... |
/** A collection of block storage policies. */
public class BlockStoragePolicySuite {
static final Logger LOG = LoggerFactory.getLogger(BlockStoragePolicySuite
.class);
public static final String STORAGE_POLICY_XATTR_NAME
= "hsm.block.storage.policy.id";
public static final XAttr.NameSpace XAttrNS = ... |
#include<iostream>
using namespace std;
int main (){
int test , arr[1000][3] , c=0 , sum=0;
cin>>test;
for(int i=0 ;i<test ;i++)
{
for(int j=0 ;j<3;j++)
{
cin>>arr[i][j];
sum+=arr[i][j];
}
if (sum>=2)
{
c++;
}
sum=0;
}
cout<<c;
return 0;
} |
#pragma once
#include "data-structure/SurfaceCompat.hpp"
#include "data-structure/NormalsCompat.hpp"
#include "data-structure/MergeCompat.hpp"
#include "data-structure/OctreeCube.hpp"
#include <memory>
namespace inexor {
namespace cube2_map_importer {
// The macro behind this has been resolved.
const ivec facec... |
Die crack mechanism study and improvement on 54ld SOIC EP package
There are multiple die crack incidents reported on 54ld SOIC EP (Exposed pad) packages from one SMT customer. Various analytical methods were employed in order to find the root cause of the die crack, including CSAM, X-Ray, 4 point bend test, SEM & frac... |
//CheckZero checks a string IS a blank string slice
func CheckZero(s string) bool {
if s != "" {
return false
} else {
return true
}
} |
// XDataTags returns a slice of Tags that contains code >= 1000.
func (slice TagSlice) XDataTags() []*Tag {
tags := make([]*Tag, 0)
for _, tag := range slice {
if tag.Code > 999 {
tags = append(tags, tag)
}
}
return tags
} |
def updating(self, dataset, assert_update=True):
dataset = dataset or dict()
for data in dataset:
for response in data.values():
self.appdata.update(response)
if assert_update:
check_data = {
response[self.appdata._k... |
Ash Ash as depicted in seals of Peribsen Name in hieroglyphs
Ash was the ancient Egyptian god of oases,[1] as well as the vineyards of the western Nile Delta[1] and thus was viewed as a benign deity. Flinders Petrie in his 1923 expedition to the Saqqara (also spelt Sakkara) found several references to Ash in Old Kingd... |
package unic
import (
"bufio"
"io"
"strings"
multierror "github.com/hashicorp/go-multierror"
cuckoo "github.com/seiflotfy/cuckoofilter"
)
// Filter is a unique filter utilizing Cuckoo Filters
type Filter struct {
CaseI bool
FilterCapacity uint
}
// FilterOption sets an option of the passed Filter
ty... |
// initDB is used to drop schema and create schema again.
// initDB should use `root` as user while connecting to DB
func (s *Server) initDB() error {
log.Info("begin to init DB")
var masterID string
startTime := time.Now()
log.Info("wait until agent starts")
for masterID == "" {
masterID, _ = s.getDBConnection(... |
def forward(self, src, src_mask=None, src_key_padding_mask=None):
src2 = self.self_attn(
src,
src,
src,
attn_mask=src_mask,
key_padding_mask=src_key_padding_mask)
src = src + self.dropout1(src2)
src = self.norm1(src)
src = src.p... |
<gh_stars>1-10
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 13 13:19:46 2020
@author: usama
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
plt.close('all')
dispersionCoeff=18
L=np.arange(10,410,10)
spectralWidth=0.6
alpha=0.17
prof=alpha*L
deltaT_chrom=dispersi... |
n = int(input())
var = input()
var = list(map(int, var.split()))
crimes = 0
police = 0
for i in range(len(var)):
if var[i] != -1:
police += var[i]
elif var[i] == -1:
if police <= 0:
crimes += 1
else:
police -= 1
print(crimes) |
Book review of Process Selection from Design to Manufacture, 2nd edition, by K. G. Swift and J. D. Booker, Butterworth Heinemann, 2003, pp. xvi + 336, paperback (ISBN 0-7506-5437-6).
Bridging the intellectual gap between design and manufacture was the focus for the first edition of this text (1997), and the recent pub... |
<reponame>alexanderweb-code/react-hooks-redux-toast-api<filename>src/types/constants.ts
export const SET_TODOS = "SET_TODOS";
export const ADD_TODOS = "ADD_TODOS";
export const DELETE_TODOS = "DELETE_TODOS";
export const TODO_DELETED = "Todo deleted";
export const TODO_ADDED = "New Todo added";
export const BACKEND_NOT... |
export {render, RenderOptions, Instance} from './render';
export {Box, BoxProps} from './components/Box';
export {Text, TextProps} from './components/Text';
export {Color, ColorProps} from './components/Color';
export {AppContext, AppContextProps} from './components/AppContext';
export {StdinContext, StdinContextProps}... |
/**
* Test Write Method for an ArrayList
*/
@Test
public void testArrayListWriteMethod() throws Exception {
final PropertyDescriptor descriptor =
propertyUtilsBean.getPropertyDescriptor(bean, "arrayList");
assertNotNull("No ArrayList Write Method", descriptor.getWriteMethod())... |
// Render options as argument string array
func (d Options) Render(apiToken string) ([]string, error) {
defaults := GetDefaults()
err := ensureRequiredOptions(d)
if err != nil {
return nil, err
}
args := []string{}
args = append(args, "--digitalocean-region", d.Region)
args = append(args, "--digitalocean-image... |
import { Job } from './job';
import { OneshotTimer } from './timer';
const getNow = (): number => {
return Date.now();
};
interface Schedule {
at: number;
job: Job;
}
const compareSchedule = (a: Schedule, b: Schedule) => a.at - b.at;
interface Scheduler {
start(): void;
stop(): void;
add(job: Job): void... |
import { ICardGame } from "./models/ICardGame";
import { isCardAvail } from "../utils/misc";
import { IPlayer } from "./models/IPlayer";
import { IDropCardPlayer } from "./models/IDropCardPlayer";
import { Deck } from "../utils/deck";
import { MAX_PLAYERS } from "../constants/misc";
import { InMemoryStore } from "../pe... |
/**
* @param matrix Image matrix to rotate
* @return Rotated image matrix by 90 degrees
*/
public void rotate(int[][] matrix) {
if (matrix.length == 0 || matrix.length != matrix[0].length) return;
int n = matrix.length;
for (int layer = 0; layer < n / 2; layer++) {
in... |
Spatio-spectral & temporal parameter searching using class correlation analysis and particle swarm optimization for a brain computer interface
Distinct features play a vital role in enabling a computer to associate different electroencephalogram (EEG) signals to different brain states. To ease the workload on the feat... |
<reponame>GneissBytes/home<filename>src/Components/Home.tsx<gh_stars>0
import React from "react";
import { connect } from "react-redux";
import "./Home.css";
import SocialLink from "./elements/SocialLink";
import ScrollButton from "./elements/ScrollButton";
import { State } from "../reducers";
import { Home as HomeTyp... |
//Warning for log Warning level
func (l *Log) Warning(v ...interface{}) {
if l.Level >= logLevelWarning {
l.LogWF.Output(2, fmt.Sprintln(" Warning ", v))
}
} |
/**
* Builder of an action set.
*/
public static final class Builder {
private final Set<WeightedAction> actionSet = Sets.newHashSet();
private Builder() {
// hides constructor.
}
/**
* Adds a weighted action to this action set.
*
* @pa... |
/**
* find an object from Cassandra by key.
* @param key the key on Cassandra
* @param bean the object
* @param session the Session
* @param <T> kind of object
* @param consistency the consistency Level on Cassandra
* @return the object or null if there is not exists.
*/
... |
def testHashableReactionString(self):
compound_a = models.Compound(kegg_id='C00010')
compound_b = models.Compound(kegg_id='C00009')
compound_c = models.Compound(kegg_id='C00021')
compound_d = models.Compound(kegg_id='C00032')
compound_e = models.Compound(kegg_id='C00190')
... |
<filename>app/src/main/java/com/example/jb/test4/gson/Forecast.java<gh_stars>1-10
/**
* Copyright 2018 bejson.com
*/
package com.example.jb.test4.gson;
import java.util.List;
/**
* Auto-generated: 2018-05-02 20:50:55
*
* @author bejson.com (<EMAIL>)
* @website http://www.bejson.com/java2pojo/
*/
public class... |
Russian population reproduction: challenges, trends, factors and possible results by 2024
The article assesses the probability of fulfilling the tasks set by the President of the Russian Federation in the May 2018 Decree in the field of population reproduction. Each of the tasks outlines the current situation, current... |
import FreeCAD, Part, Mesh, math
DOC = FreeCAD.activeDocument()
DOC_NAME = "light_assembly"
def clear_doc():
# Clear the active document deleting all the objects
for obj in DOC.Objects:
DOC.removeObject(obj.Name)
def setview():
# Rearrange View
FreeCAD.Gui.SendMsgToActiveView("ViewFit")
... |
def compute_rms(self, image, NSAMPLE = 10):
xdim= image.shape[0]
ydim= image.shape[1]
strip = int(xdim / 5)
sample = np.array([])
yrand = np.random.randint(0,ydim,NSAMPLE)
xrand = np.random.randint(0,xdim-strip-1,NSAMPLE)
for i in range(NSAMPLE):
t... |
Raiders Should Look To Trade Back In This Draft
The Oakland Raiders are one of the more desperate teams in this league for star talent, and with a mostly veteran roster filled with stopgaps, the Raiders could use a talent upgrade at just about every position on the roster. With the 5th overall pick the Raiders will ha... |
package com.ay.todo.service;
import com.ay.todo.TaskState;
import com.ay.todo.Todo;
import com.ay.todo.repository.ToDoRepository;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.List;
public class Tod... |
package utils
import (
"crypto/rand"
"encoding/hex"
"fmt"
"io/ioutil"
"log"
"math"
"os"
"path/filepath"
)
// CreateOutputFile generate a output file
func CreateOutputFile(outputPath string, outputPrefix string, outputFileExtension string) (outputAbosulePath string) {
buff := make([]byte, int(math.Round(float... |
<gh_stars>100-1000
import { testUpdate } from '../shared/update';
import { describeBasicDefaultMigratorMethodTest } from './helpers';
describeBasicDefaultMigratorMethodTest('update', testUpdate);
|
<reponame>Andreip760/job4j
package ru.job4j.tracker;
import java.util.Scanner;
import java.util.function.Consumer;
/**
* Class providing console interface.
* @author <NAME>.
* @version 1
* @since 18.02.2019
*/
public class ConsoleInput implements Input {
private final Scanner scanner = new Scanner(System.in);... |
package de.prob.core.domainobjects.ltl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import de.prob.core.command.LtlCheckingCommand.PathType;
import de.prob.core.command.LtlCheckingCommand.Result;
import de.prob.core.domainobjects.Operation;
impor... |
<filename>pm.py
import os,random,time,multiprocessing
import numpy as np
import pandas as pd
import inspect as ins
from .fun import ispump
def sampler(inputs):
pathfile,Heads,seq,file_size,subsize,keep,qlist,intercept=inputs
reader=open(pathfile,encoding='iso8859-1')
oklines=0;data=[];ncolumns = ... |
def applyClassMapping(self, Y):
labels = np_utils.categorical_probas_to_classes(Y)
return [self.mapping[l] for l in labels] |
MOSCOW/BAKHCHISARAY, Crimea (Reuters) - Russia said on Saturday it had no intention of invading eastern Ukraine following its annexation of Crimea, while the Black Sea peninsula’s Muslim Tatars demanded autonomy.
U.S. Secretary of State John Kerry and Russian Foreign Minister Sergei Lavrov will meet on Sunday in Paris... |
Palaeoclimate and groundwater evolution in Africa—implications for adaptation and management
Abstract Groundwaters of known age contained in major aquifer systems in the African sedimentary basins enable low-resolution (±1000 year) characteristics of past climates to be determined, specifically palaeo-temperature, air... |
<reponame>caojianping/hfcatv-activity
export const RoleTypes: Array<string> = ["管理员", "营业员"];
export const AwardTypes: Array<string> = ["参与奖", "充值卡券", "现金红包", "实物礼品", "观影券"];
export const AwardExpireTypes: Array<string> = ["天数", "日期范围"];
export const AwardRanks: Array<string> = ["参与奖", "一等奖", "二等奖", "三等奖", "四等奖", "五... |
package templatefs
import (
"github.com/hugelgupf/p9/internal/linux"
"github.com/hugelgupf/p9/p9"
)
// NotSymlinkFile denies Readlink with EINVAL.
//
// EINVAL is returned by readlink(2) when the file is not a symlink.
type NotSymlinkFile struct{}
// Readlink implements p9.File.Readlink.
func (NotSymlinkFile) Read... |
In North America, Travel & Living / By Tom / 11 June 2013
(Image: Pedro Sánchez, cc-sa-3.0)
Nestled in a narrow valley amid surrounding mountains, the colourful city of Guanajuato plays an important role in Mexico’s cultural heritage. Named a UNESCO World Heritage Site in 1988, the city was the location of the first ... |
/**
* Start the server.
* Begin listening on port read from config file, or fall back to DEFAULT_PORT.
* When a client connects, create a remote view and start updating him about open lobbies.
*/
public void start() {
ServerSocket serverSocket = null;
try {
serverSocket =... |
# -*- coding: utf-8 -*-
import gtk
import sys,os,re
import pickle
from datewidget import DateEntry, set_background
from pytz import timezone
from datetime import datetime
from .. extensions.validation import MaskEntry,ValidationError
from .. extensions.path import path
curr = None
boss = None
regex = re.compile("[A-Z... |
/*
* mcp9803.h
*
* Created on: 30.09.2020
* Author: SimpleMethod
*
*Copyright 2020 SimpleMethod
*
*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, ... |
def dipole_alpha(name):
theta = j2000_to_theta(name)
return (DIP_AMPLITUDE * np.cos(np.deg2rad(theta)) + DIP_MONOPOLE) * 1e6 |
Cross-sectional and longitudinal associations of circulating omega-3 and omega-6 fatty acids with lipoprotein particle concentrations and sizes: population-based cohort study with 6-year follow-up
Background Cross-sectional studies have suggested that serum omega-3 (n-3) and omega-6 (n-6) polyunsaturated fatty acids (... |
Mehau Kulyk/Science Photo Library
Useful quantum computers are one step closer, thanks to the latest demonstration of a technique designed to stop them making mistakes.
Quantum computers store information as quantum bits, or qubits. Unlike binary bits, which store a 0 or a 1, qubits can hold a mixture of both states ... |
package main
import (
"fmt"
)
//var ErrorData = errors.New("errorrrrr..")
type customerErr struct {
Name string
}
func (ce customerErr) Error() string {
return fmt.Sprintf("error happenend : %v", ce.Name)
}
func main() {
c1 := customerErr{
"alexis",
}
foo(c1)
}
func foo(e error)... |
// Copyright 2010 The win Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package win
import (
"syscall"
"unsafe"
)
type GpStatus int32
const (
Ok GpStatus = 0
GenericError GpStatus = 1
Inv... |
// Run is the main event loop that processes queued requests.
func (w *worker) Run() {
w.wg.Add(1)
defer w.wg.Done()
for {
select {
case <-w.done:
return
default:
w.processQueue()
}
time.Sleep(time.Duration(w.opt.WorkerPollInt) * time.Second)
}
} |
# ------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
# -------------------------------------------------------------------... |
// mapExtend will merge another map into the origin map, value with duplicated key will be replaced.
// origin map should not be nil
func mapExtend(origin map[string]interface{}, another map[string]interface{}) {
if origin == nil || another == nil {
return
}
for k, v := range another {
origin[k] = v
}
} |
<gh_stars>1-10
package de.adito.jloadr.repository.local;
import de.adito.jloadr.api.*;
import de.adito.jloadr.common.JLoadrUtil;
import de.adito.jloadr.repository.jlr.JlrEntry;
import java.io.*;
import java.nio.file.*;
import java.nio.file.attribute.FileTime;
import java.util.Objects;
/**
* @author j.boesl, 08.09.1... |
ROS-based online robot programming for remote education and training
RPN (Robotic Programming Network) is an initiative to bring existing remote robot laboratories to a new dimension, by adding the flexibility and power of writing ROS code in an Internet browser and running it in the remote robot with a single click. ... |
t=int(input())
for q in range(0,t):
n=int(input())
b=list(map(int,input().strip().split()))[:n*2]
b.sort()
for i in range(1,2*n-1,2):
temp=b[i]
b[i]=b[i+1]
b[i+1]=temp
print(*b)
|
Communities and Local Government Committee Written evidence submitted by Lorraine Barter
My Comments
Regarding the aspect of houses in multiple occupation, the areas in which they predominate have become significant in the fact that daily or almost daily some kind of crime incident, burglary, drug dealing, anti-socia... |
<reponame>Ko-Rona/QA30_ILCarro<filename>src/test/java/tests/AddNewCarTests.java
package tests;
import models.*;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class AddNewCarTests extends TestBase {
@Befo... |
Twelve hours ago, Ron Clements and John Musker called wrap for the seventh time in their careers. The way they anoint their latest movie, after more than five years toiling over its every intricacy, mirrors the directors themselves: Humble, low-key, without much fanfare, but deserving of far more than they’d allow. The... |
0 of 32
Butch Dill/Getty Images
The field is set for the 2017 NFL draft.
Another loaded group of underclassmen is set to enter the NFL prospect pool. In total, 94 sophomores and juniors will forego their amateur status and begin the path to a pro career.
Some are ready. Others aren't. And their perceived value may ... |
Games & merch 13 Oct 2011 11:48 pm by David !
I made a graphic with (as best as I could manage) the titles of all 1,958 submissions to Machine of Death Volume 2. The bigger the text, the more common the title among the submissions.
Here’s a closer look:
Here’s a PDF (10MB) for an even closer look! Can you find yours... |
/**
* Genera una InetAddress dado un int
*/
public static InetAddress fromInt(int inetAddress) {
byte[] b = new byte[4];
for(int i = 0; i < 4; i++)
b[i] = (byte) (inetAddress >>> ((3-i) * 8) & (0xFF));
try {
return InetAddress.getByAddress(b);
} catch (UnknownHostException e) {
return null;
}
... |
package io.localmotion.smokefreeplaygrounds.controller;
import com.coxautodev.graphql.tools.GraphQLMutationResolver;
import graphql.schema.DataFetchingEnvironment;
import io.localmotion.application.DomainException;
import io.localmotion.initiative.command.JoinInitiativeCommand;
import io.localmotion.initiative.control... |
def serdes(job=None, cmd_tokens=None):
if job:
command = [f'"{sys.executable}"', f'"{rms_paths.root / "process_model.py"}"']
command.extend([
job["<command>"],
job["<project_code>"],
job["<full_model_path>"],
])
for k, v in job.items():
... |
def write_section_rec(self, section, count_str="1.", appendix=False,
level=0, numbered=True, emit_numbered="all", s_count=1):
if level > 0:
anchor = section.attrib.get('anchor')
title = section.attrib.get('title')
include_toc = section.attrib.get('t... |
Relationships between syn-orogenic sedimentation and nappe emplacement in the hinterland of the Variscan belt in NW Iberia deduced from detrital zircons
Abstract Flysch-type, syn-orogenic deposits of Carboniferous age occur in relation to the emplacement of a large allochthonous nappe stack in the Variscan belt of NW ... |
/**
* Extension of Batik's DefaultExtensionHandler which handles different kinds of Paint objects
* <p>
* Taken (with permission) from https://gist.github.com/msteiger/4509119,
* including the fixes that are discussed in the comments
*
* @see <a href="https://stackoverflow.com/questions/14258206/">Gradient paints... |
/** * Suspend execution of the current thread. */
bool Thread::sleep(int64_t usec)
{
struct timespec ts = { 0, 0 };
ts.tv_sec = static_cast<time_t>(usec / Time::kMicroSecondsPerSecond);
ts.tv_nsec = static_cast<long>(usec % Time::kMicroSecondsPerSecond * 1000);
::nanosleep(&ts, NULL);
return true;
} |
def build_prior_class_distribution(distribution, trainpath, errorpath="error.txt"):
_, y_classes, y_subclasses, y_leafclasses, list_classes, list_subclasses, list_leaf_classes = load_dataseer_corpus_csv(trainpath, True)
for key1 in distribution:
if type(distribution[key1]) is dict:
distribut... |
<gh_stars>10-100
// This file was generated by counterfeiter
package fakes
import (
"sync"
"github.com/cloudfoundry/bosh-agent/agent/script"
boshdrain "github.com/cloudfoundry/bosh-agent/agent/script/drain"
)
type FakeJobScriptProvider struct {
NewScriptStub func(jobName string, scriptName string) script.... |
<gh_stars>0
package guices.gzguice;
import com.google.common.base.Preconditions;
import com.google.inject.matcher.Matcher;
import org.aopalliance.intercept.MethodInterceptor;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.List;
final class GZMethodAspect {
private final Matcher<? supe... |
import {CHANGE_LANGUAGE} from "./index.type";
export function changeLanguage(lang: string) {
return {
type: CHANGE_LANGUAGE,
payload: {lang},
};
}
|
<reponame>Aku-mi/cattleia
import router from "./index.routes";
export default router;
|
Anatomy of the lower respiratory tract in domestic birds, with emphasis on respiration
This manuscript describes the anatomy of the lower respiratory tract in domestic bird species including the chicken and pigeon. The here described anatomical structures play a major role avian respiration, which is fundamentally dif... |
// Purchases purchases a phone number.
func Purchase(c *messagebird.Client, numberPurchaseRequest *NumberPurchaseRequest) (*Number, error) {
number := &Number{}
if err := request(c, number, http.MethodPost, pathNumbers, numberPurchaseRequest); err != nil {
return nil, err
}
return number, nil
} |
/***********************************************************************
* \brief Look for overview tables for the bands of the current dataset
**********************************************************************/
PROverview * PostGISRasterDataset::GetOverviewTables(int * pnOverviews)
{
PROverview * poOV = null... |
def economizing_check(self, econ_condition, cur_time):
if econ_condition:
_log.info("{}: economizing, for data {} --{}.".format(constants.ECON3, econ_condition, cur_time))
self.economizing.append(cur_time)
return True
return False |
The Ultimate Water-Only Hair Washing Routine – [No Shampoo!]
Just Water?
I finally got fed up with the damaging effects of shampoos and decided I wanted to take my hair to the next level by going shampoo-free. It was the greatest decision I ever made for my hair! If you’re curious as to why I would make such a crazy ... |
Studio Ghibli posted a job recruitment notice for animators on director Hayao Miyazaki's "final" film on Friday. The studio is hiring in-between animators and background artists on a three-year contract starting on October 1. The notice emphasized that the film is "director Hayao Miyazaki's final feature animation film... |
// Checks if the message will get logged.
// Allows layer to defer collecting & formating data if the
// message will be discarded.
static inline bool will_log_msg(debug_report_data *debug_data, VkFlags msg_flags) {
VkFlags local_severity = 0;
VkFlags local_type = 0;
DebugReportFlagsToAnnotFlags(msg_flags, ... |
def plot_kde_uncertainty(data, n_resamples=1000, x_resolution=1000, significance=0.05, palette=sns.color_palette()):
assert n_resamples >= 100
x_grid = np.linspace(min(data), max(data), x_resolution)
orig_kde = kde(data, x_grid)
resampled_kdes = np.zeros((n_resamples, x_resolution))
for i in range(n... |
package gathertool
import (
"fmt"
"log"
"runtime"
)
func loger(v ...interface{}){
_, file, line, _ := runtime.Caller(2)
//fun := runtime.FuncForPC(pc)
//funName := fun.Name()
log.Println(fmt.Sprintf("%v:%v", file, line), v)
} |
package tabby.core.switcher;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import soot.*;
import soot.jimple.*;
import soot.jimple.internal.JimpleLocalBox;
import soot.toolkits.graph.BriefUnitGraph;
import soot.toolkits.graph.UnitGraph;
import tabby.core.scanner.ClassInfoScanner;
impor... |
/*
File: absolute_triallist.hpp
________________________________
Author(s): <NAME> (<EMAIL>)
Edited by: <NAME> (<EMAIL>), <NAME> (<EMAIL>)
Defines a class to randomize a list of trial conditions for
Absolute Threshold experiment.
*/
#ifndef ABSOLUTE_TRIALLIST
#define ABSOLUTE_TRIALLIST
/*****************************... |
<filename>src/solana/utils.rs
use serde::{de::Error, Deserialize, Deserializer};
#[inline]
pub(crate) fn deserialize_array_from_base58<'de, D, const N: usize>(
deserializer: D,
) -> Result<[u8; N], D::Error>
where
D: Deserializer<'de>,
{
let s: &str = Deserialize::deserialize(deserializer)?;
let mut array = [0... |
/**
* Servlet implementation class LoanRequest
*/
public class LoanRequest extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public LoanRequest() {
super();
// TODO Auto-generated constructor stub
}
/**
* @... |
/*----------------------------------------------------------------------------
GetParentFolderSpec
Given an FSSpec to a (possibly non-existent) file, get an FSSpec for its
parent directory.
----------------------------------------------------------------------------*/
static OSErr GetParentFolderS... |
<filename>games/bocce/venue.py
class Venue():
def __init__(self, name):
self.name = name
self.courts = []
def add_court(self, court):
self.courts.append(court)
def remove_court(self, court):
# todo feature to remove court
pass
def str_courts(self):
# build a comma separated listing of courts and then... |
<gh_stars>0
package android.support.v4.media;
import android.os.Bundle;
import java.util.List;
public abstract class c {
public abstract void a(String str, Bundle bundle);
public abstract void a(String str, Bundle bundle, List<MediaBrowserCompat$MediaItem> list);
}
|
<reponame>ngx-tc/rating
/*
* Public API Surface of rating
*/
export * from './lib/rating.component';
export * from './lib/rating.module';
|
<reponame>APN-Pucky/opencl-testing<filename>src/tuo/main.cpp<gh_stars>0
#include "tyrant_optimize.h"
#include <boost/timer/timer.hpp>
#ifndef TEST
int main(int argc,const char** argv)
{
#ifndef NTIMER
boost::timer::auto_cpu_timer t;
#endif
if (argc == 2 && strcmp(argv[1], "-version") == 0)
{
std::cout << "Tyrant ... |
//check if nextLevel is eligible for compaction
func (pInfo *PartitionInfo) checkPossibleCompaction(level int) {
if level != MaxLevel && len(pInfo.levelsInfo[level].sstSeqNums) > int(LevelCompactInf[level]) {
publishCompactTask(&CompactInfo{
partitionId: pInfo.partitionId,
thisLevel: level,
})
}
} |
// fixPolicy correct current policy according to command 'write-ness' or forced mode.
func (c *Cluster) fixPolicy(slot uint16, req Request, policy ReplicaPolicyEnum) ReplicaPolicyEnum {
if c.getConfig().slotIsAsking(slot) {
return MasterOnly
}
switch policy {
case MasterOnly:
return MasterOnly
case ForceMaster... |
def main():
arguments = docopt(__doc__, version=__version__)
if arguments['ls']:
_pull_all('ls')
elif arguments['list']:
_pull_all('list')
elif arguments['<PACKAGE>']:
try:
if arguments['<VERSION>']:
_construct(arguments['<PACKAGE>'],arguments['<VERSION>'])
else:
_constru... |
Tone Vays, head of research at BraveNewCoin, talks on how to buy BTC preserving your anonymity, and what he thinks the real uses of the cryptocurrency are now, as well as what to expect soon.
Online Exchange vs. BTMs vs. In-Person
CT: Why do some users choose to buy their Bitcoin in person, instead of via an online e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.