content stringlengths 10 4.9M |
|---|
package io.tek256.net;
import java.io.IOException;
import java.net.InetAddress;
public class Net {
public static int MAX_TIMEOUT = 1000; //1s
public static boolean ping(String addr){
try{
return InetAddress.getByName(addr).isReachable(MAX_TIMEOUT);
}catch(IOException e){
e.printStackTrace();... |
Control of seed born mycobiota associated with Glycine max L. Merr. seeds by a combination of traditional medicinal plants extracts
Seeds from soybean collected from different commercial markets were surveyed for seed-borne fungi. Ninetyeight fungal colonies were isolated all over three monthly isolations constituting... |
<filename>endoscope-storage-gzip/src/test/java/com/github/endoscope/storage/gzip/GzipStorageTest.java
package com.github.endoscope.storage.gzip;
import com.github.storage.test.StorageTestCases;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
public class GzipStorageTest extends StorageTe... |
<reponame>HeinousTugboat/bitburner
interface Position {
row: number;
column: number;
}
class PositionTracker {
positions: Map<string, Position>;
constructor() {
this.positions = new Map<string, Position>();
}
saveCursor(filename: string, pos: Position): void {
this.positions.set(filename, pos);
... |
def parse_unit_results( self, results ):
log = []
error_in_test = False
_log = ''
for l in results.split( '\n' ):
if error_in_test:
if l == '':
error_in_test = False
continue
else:
log[-1][2] += l + '\n'
l_arr = l.split( ' ' )
if len( l_ar... |
<reponame>naterivah/atriangle<gh_stars>1-10
package tech.artcoded.atriangle.api.dto;
public enum EventType {
MONGODB_SINK,
RDF_SINK,
}
|
<gh_stars>0
/**
* frame_Test.go
* Copyright (c) 2018 <NAME>
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
package rec
import (
"bytes"
"testing"
)
func TestFrameEncode(t *testing.T) {
f := Frame{
Time: 123,
Type: FrameStdout,
Payload: []byte{0xff, ... |
/*
* ApplyTransaction calls in Ratis are sequential.
*/
@Override
public CompletableFuture<Message> applyTransaction(TransactionContext trx) {
try {
metrics.incNumApplyTransactionsOps();
ContainerCommandRequestProto requestProto =
getRequestProto(trx.getSMLogEntry().getData());
P... |
void doLinkClustering(int nClusters, Vector<Integer>[] nClusterID, Node[] clusterNodes) {
int nInstances = m_instances.numInstances();
PriorityQueue<Tuple> queue = new PriorityQueue<Tuple>(nClusters * nClusters / 2, new TupleComparator());
double[][] fDistance0 = new double[nClusters][nClust... |
<gh_stars>0
from typing import List
def remove_par(p_list: List[str]) -> List[str]:
remove_list = ["(", ")"]
for symbol in remove_list:
while symbol in p_list:
p_list.remove(symbol)
return p_list
spec_mapper = {
"'pars_m_t'": "'\t'",
"'pars_m_n'": "'\n'",
"'pars_m_dq'": '... |
CJ Entus have signed two new AD carries for the upcoming 2017 Challengers Korea: Kim "Veritas" Kyoung-min and Yoo "Avenger" Seon-wu.
[ENTUS News]
CJ엔투스 LoL팀의 새로운 원거리 딜러 선수들을 소개합니다!
We'd like to introduce our new AD Carry players!https://t.co/OxNgiAl7gK pic.twitter.com/vIH5zvaL8s — OGN ENTUS (@ENTUS_Progaming) Januar... |
from flask import Flask, render_template, abort, request,\
redirect, url_for, flash
from flask_sqlalchemy import SQLAlchemy
from werkzeug.utils import secure_filename
import random
import string
import datetime
app = Flask(__name__)
app.config.from_object('config.DevelopmentConfig')
app.config['S... |
"""
.. module:: Pantheon
:synopsis: Pantheon likelihood from Jones et al. 2018 and Scolnic et al. 2018
.. moduleauthor:: Rodrigo von Marttens <rodrigovonmarttens@gmail.com> and Antonella Cid <antonellacidm@gmail.com>
Based on the previous JLA likelihood writted by Benjamin Audren
.. code::
C00 = mag_covmat_... |
The Solution Of 3-D Biomedical Electrostatic Problems On A Data Parallel Computer
Many electromagnetic problems in the area of biomedical engineering can be approximated as electrostatic problems. These problems are governed by Laplace’s equation which is not ana lytically solvable for most real world problems. Often,... |
//===================================================//
// File Name: fused_decoder_hist.cpp
// Author: <NAME>
// Created Date: 2017-12-3
// Description: A fused decoder + hist kernel
// We don't have to write the output jpgs!
//===================================================//
#include "scanner/video/decoder_auto... |
def ListTableColumns(self, table):
assert isinstance(table, str)
if contains_metastrings(table):
raise ValueError, "bad table name: contains reserved metastrings"
columnlist_key = _columns_key(table)
if not getattr(self.db, "has_key")(columnlist_key):
return []
... |
/* This function merges the branches of a condition-phi-node,
contained in the outermost loop, and whose arguments are already
analyzed. */
static tree
interpret_condition_phi (struct loop *loop, gphi *condition_phi)
{
int i, n = gimple_phi_num_args (condition_phi);
tree res = chrec_not_analyzed_yet;
for (... |
/* R denotes the type of objects you expect the store to return at a access or update call */
public abstract class BasicStore<R> implements Serializable {
private static Logger LOG = Logger.getLogger(BasicStore.class);
private final String _uniqId;
private PrintStream _ps;
protected String _objRe... |
def settings(**kwarg):
return {
'interpreter_path': '/path/to/venv/bin/python3'
}
|
/*
* 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 ... |
/* This function notifies the Volume Status Handlers that the
* AFS client service is stopping.
*/
long
cm_VolStatus_Service_Stopped(void)
{
long code = 0;
osi_Log1(afsd_logp,"cm_VolStatus_Service_Stopped handle 0x%x", hVolStatus);
if (hVolStatus == NULL)
return 0;
code = dll_funcs.dll_VolStat... |
// CreateImage create ogp image API
func (app *App) CreateImage(w http.ResponseWriter, r *http.Request) {
if err := r.ParseForm(); err != nil {
return
}
words := r.Form.Get("words")
id := uuid.New()
log.Printf("%s, %s", words, id)
filename := fmt.Sprintf("%s.png", id.String())
filepath := path.Join("data", fil... |
/**
* @tpTestDetails Locator returns resource which inherits annotations from an interface.
* @tpSince RESTEasy 3.0.20
*/
@Test
@DisplayName("Test Annotation Free Subresource")
public void testAnnotationFreeSubresource() throws Exception {
{
Response response = client.target(g... |
Optimizing network traffic by generating association rules using hybrid apriori-genetic algorithm
Association rule mining is a technique of generating frequent item sets so that the analysis on the basis of these sets can be used for different application areas such as analysis of network traffic. Although the frequen... |
<reponame>applifactory/research-rpa
import { SubscribeMessage, WebSocketGateway, OnGatewayConnection, OnGatewayInit } from '@nestjs/websockets';
import { UnauthorizedException, UseGuards } from '@nestjs/common';
import { AuthService } from 'src/auth/auth.service';
import { User } from 'src/user/user.entity';
import { S... |
export interface SwaggerDocumentOptions {
include?: Function[];
}
|
/**
* Test that we don't register a service when the unit and
* context don't match
*/
@Test
public void testAddDifferentContext() throws InvalidSyntaxException
{
reg1 = registerUnit(emf1, "unit", TRUE);
assertNoContextRegistered();
mgr.registerContext("context", client1, new HashMap<String,... |
What COVID-19 has introduced into education: challenges Facing Higher Education Institutions (HEIs)
ABSTRACT The effect of the latest novel Coronavirus (COVID-19) on higher education, specifically the transition from face-to-face sessions to online and interactive learning systems, is investigated in this study. The p... |
// Return the average value of int[] grades
public static double average() {
int total = 0;
for(int i = 0;i < grades.length; i++){
total += grades[i];
}
return (double) (total / grades.length);
} |
<reponame>LtPeriwinkle/robbb
use super::*;
/// Set your role. Use without arguments to see available roles.
#[command]
#[only_in(guilds)]
#[usage("role [role-name]")]
#[aliases("roles")]
pub async fn role(ctx: &client::Context, msg: &Message, args: Args) -> CommandResult {
let config = ctx.get_config().await;
... |
Interiorization Phenomenon within the Plots of the Fantastic Tales by F. V. Bulgarin (1820–1840s)
The paper focuses on the analyses of the interiorization phenomena in the fantastic (utopian and dystopian) tales by Faddey Bulgarin that he wrote and published between 1825 and 1846. The tales came out in such periodical... |
use crate::facades::QuickJsRuntimeFacade;
use crate::quickjsrealmadapter::QuickJsRealmAdapter;
use crate::quickjsruntimeadapter::QuickJsRuntimeAdapter;
use hirofa_utils::js_utils::adapters::JsRuntimeAdapter;
use hirofa_utils::js_utils::facades::{JsRuntimeBuilder, JsRuntimeFacade};
use hirofa_utils::js_utils::modules::{... |
<reponame>gabrielribeirof/chatter
export enum ViolationReasons {
REQUIRED = 'REQUIRED',
BAD_LENGTH = 'BAD_LENGTH',
MAX_LENGTH = 'MAX_LENGTH',
MIN_LENGTH = 'MIN_LENGTH',
CHOICES = 'CHOICES',
INVALID_EMAIL = 'INVALID_EMAIL',
EMAIL_ALREADY_REGISTERED = 'EMAIL_ALREADY_REGISTERED',
NAME_ALREADY_REGISTERED =... |
import React, { Fragment } from 'react';
import { Icon } from 'antd';
import classNames from 'classnames';
import { StyleProps, WithFalse } from '@/typings';
import Link, { LinkProps } from '@/components/Link';
import './style.less';
export interface Render {
copyrightRender: WithFalse<() => CopyrightProps>;
}
expo... |
module HsFp1.ParsePerson where
import Data.String
import Data.List(all)
import Data.Text(pack, unpack, splitOn)
import Text.Read (readMaybe)
data Error = ParsingError | IncompleteDataError | IncorrectDataError String deriving (Show)
data Person = Person { firstName :: String, lastName :: String, age :: Int } derivin... |
/**
* Given a feature type name, figure out if the warehouse thinks it should
* *NOT* be drawn.
*
* @param warehouse the warehouse to build the graphics.
* @param featureName the VPF name of the feature (polbndl, for example).
* @return SKIP_FEATURETYPE if the feature should not be drawn.... |
/**
* Determines, if input file is VDLt or VDLx. Parses VDLt into a temporary VDLx file. Adds VDLx
* into the VDC. Skips to next file on error.
*
* @param args is the argument vector of main
* @param start is the start of filenames in the argument vector.
* @param define is a VDC connector... |
/** True if our request has the given selector */
private boolean hasSelector(SlingHttpServletRequest req, String selectorToCheck) {
for (String selector : req.getRequestPathInfo().getSelectors()) {
if (selectorToCheck.equals(selector)) {
return true;
}
}
... |
from unittest import TestCase
from mock import Mock
from .car import Car
class CarTests(TestCase):
def setUp(self):
self.car = Car()
def test_init_car(self):
self.assertEqual(self.car.speed, 0)
def test_stop(self):
# Is directly accessing a private attribute ok?
self.car.... |
def open_eyes_session(
self,
runner=None,
apikey=None,
appname=None,
testname=None,
library=None,
width=None,
height=None,
matchlevel=None,
enable_eyes_log=None,
batch=None,
serverurl=None,
force_full_page_screenshot... |
def coeff_string_check(text):
try:
[float(a) for a in text.split()]
except:
return Pmw.PARTIAL
return Pmw.OK |
/**
* copy the incoming message requested to buff and return the bytes received
*/
int HTTP_conn::receiveRequest(SOCKET* clientSock, std::string& result) {
char recvbuf[DEFAULT_BUFLEN];
int res = recv(*clientSock, recvbuf, DEFAULT_BUFLEN, 0);
if (res > 0) {
result = std::string(recvbuf, res);
} else {
result = ... |
<filename>ejercicios/primer_nombre_repeticiones.py
"""
Escribir un código que solicite:
- El nombre completo de una persona.
- Un número entero.
Con dicha información, el programa debe imprimir el primer nombre del
usuario, repetido la cantidad de veces correspondiente al número entero
TODO: add tests
"""
d... |
// MarshalJSON is the custom marshaler for CreateScopeJobParameters.
func (csjp CreateScopeJobParameters) MarshalJSON() ([]byte, error) {
objectMap := make(map[string]interface{})
if csjp.Tags != nil {
objectMap["tags"] = csjp.Tags
}
if csjp.Name != nil {
objectMap["name"] = csjp.Name
}
if csjp.DegreeOfParall... |
Utilization of a Clinical Decision Support Tool to Reduce Child Tobacco Smoke Exposure in the Urgent Care Setting
Background Clinical decision support systems (CDSS) may facilitate caregiver tobacco screening and counseling by pediatric urgent care (UC) nurses. Objective This study aimed to assess the feasibility of a... |
package io.rong.imkit.config;
import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import io.rong.common.RLog;
import io.rong.imkit.GlideKitImageEngine;
import io.rong.imkit.IMCenter;
import i... |
/**
* @param ldifFile to create with
* @param ldifSortedFile to compare with
*
* @throws Exception On test failure.
*/
@Parameters(
{
"ldifEntry",
"ldifSortedEntry"
})
@Test(groups = {"ldif"})
public void readAndCompareSortedLdif(final String ldifFile, final String ldifSorte... |
Only a few days after media outlets erroneously reported that Bernie Sanders supporters chanted “English only” during the Democratic Nevada caucus, TIME Magazine went a step further and erroneously claimed that Sanders himself yelled “English only.”
TIME‘s preface to an interview of Clinton supporter David Brock conta... |
<filename>rbatis-core/src/connection.rs<gh_stars>0
//! Contains the `Connection` and `Connect` traits.
use std::convert::TryInto;
use futures_core::future::BoxFuture;
use crate::executor::Executor;
use crate::pool::{Pool, PoolConnection};
use crate::transaction::Transaction;
use crate::url::Url;
/// Represents a si... |
<reponame>procrash/cpp-sc2
#include "sc2api/sc2_api.h"
#include "sc2utils/sc2_manage_process.h"
#include <iostream>
#include <string>
#include <random>
#include <cmath>
static uint32_t c_text_size = 8;
static std::string GetAbilityText(sc2::AbilityID ability_id) {
std::string str;
str += sc2::AbilityTypeToN... |
"""
You are given an HTML code snippet of N lines.
Your task is to detect and print all the HTML tags, attributes and attribute values.
"""
from html.parser import HTMLParser
class MyHTMLParser(HTMLParser):
def handle_starttag(self, tag, attrs):
print(tag)
for attr in attrs:
print("-... |
/**
* Created by stackcode on 9/19/17.
*/
public class LogDetails {
private String TAG = "SUPER EASY";
public void d(){
Log.d(TAG,"Hey!!! Its my first android Lib Ever");
}
} |
/*
* CTxtPtr::GetPrevChar()
*
* @mfunc
* Return character just before this text pointer, NULL if text pointer
* beginning of text
*
* @rdesc
* Character just before this text ptr
*/
TCHAR CTxtPtr::GetPrevChar()
{
TRACEBEGIN(TRCSUBSYSBACK, TRCSCOPEINTERN, "CTxtPtr::GetPrevChar");
LONG cchValid;... |
import {
Either,
eitherArrayReduce,
eitherMapRight,
optionFold,
optionFromNullable,
Right,
} from 'trimop';
import {
ActionTrigger,
GetDoc,
GetTransactionCommitError,
TransactionCommit,
TriggerSnapshot,
UpdateDocCommit,
} from './type';
/**
* Magic HAHA!
* @param param0
* @returns
*/
expor... |
<reponame>Commander-lol/EntwaCourse
/*
Copyright (c) 2015, <NAME>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of ... |
/**
* {@link Disassembler} is a class responsible for disassembling binary files.
*
* @author <a href="mailto:andrewt@ispras.ru">Andrei Tatarnikov</a>
*/
public final class Disassembler {
public static interface Output {
void add(final IsaPrimitive primitive);
void close();
}
public static interface... |
<gh_stars>1-10
import React from "react";
import { IAppView } from "./IAppView";
import { Styled } from "../styled";
import "antd/dist/antd.css";
import MovingPictureShowcase from "../../moving-picture-showcase/container/MovingPictureShowcase";
import ParticleVortexShowcase from "../../particle-vortex-showcase/containe... |
def _index_key(self, sig, codegen):
codebytes = self._py_func.__code__.co_code
if self._py_func.__closure__ is not None:
cvars = tuple([x.cell_contents for x in self._py_func.__closure__])
cvarbytes = dumps(cvars)
else:
cvarbytes = b''
hasher = lambda ... |
/**
* Enables the (thread-local) TFileRegistry, so that every call to the createXX() or register() static methods
* will result in the relevant TFile to be stored for further cleaning of TrueZip internal resources.
* <p>The actual cleaning must be performed by calling the {@link #close()} static method on TFileRe... |
def create_symptoms(
person,
time,
start_symp_key,
end_symp_key,
start_symp_unique,
end_symp_unique,
viral_load_unique,
max_num_days_since_infection,
):
viral_load_threshold = 0.5
dsi_threshold = 5
not_infected_dsi = 0
person_suffix = index_name(person)
time_person_su... |
<filename>models/subscription.go
package models
import (
"encoding/json"
"time"
)
// Subscription - code representation of a users subscription to a tag
type Subscription struct {
ID int `db:"id" json:"-"`
Tag Tag `db:"-" json:"tag"`
TagName string `db:"-" json:"tagName"`
TagID ... |
/**
* 任务分析状态
* 值为后端返回的任务分析状态
*
* --目前不全,后期需要用到请新增
*/
export enum TaskStatus {
Created = 'Created',
Waiting = 'Waiting',
Sampling = 'Sampling',
Analyzing = 'Analyzing',
Stopping = 'Stopping',
Aborted = 'Aborted',
Failed = 'Failed',
Completed = 'Completed',
On = 'on',
Off = 'off',
Cancelled = '... |
/*BanChatSender bans a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights.... |
/// Returns the entire text of the `Rope` as a newly allocated String.
pub fn to_string(&self) -> String {
use iter::Chunks;
let mut text = String::with_capacity(self.len_bytes());
for chunk in Chunks::new(&self.root) {
text.push_str(chunk);
}
text
} |
package us.kbase.workspace.listener;
import java.time.Instant;
import java.util.List;
import com.google.common.base.Optional;
import us.kbase.workspace.database.ObjectInformation;
import us.kbase.workspace.database.Permission;
import us.kbase.workspace.database.WorkspaceUser;
/** A listener for workspace events.
*... |
def make_ref2(args):
watson = open(args.watson,'r')
crick = open(args.crick,'r')
out = open(args.consensus, 'w')
count = 0
try:
while True:
w = [watson.readline()[1:-1],watson.readline()[:-1].upper()]
c = [crick.readline()[1:-1],crick.readline()[:-1].upper()]
... |
<reponame>chegojs/chego-mongodb<gh_stars>1-10
import { MongoClientOptions } from 'mongodb';
import { Table } from '@chego/chego-api';
import { IQueryContext } from '@chego/chego-database-boilerplate';
export interface IMongoConfig {
url:string;
database?:string;
clientOptions?:MongoClientOptions;
}... |
<reponame>shazz/pygase<gh_stars>10-100
# -*- coding: utf-8 -*-
import curio
from freezegun import freeze_time
from helpers import assert_timeout
from pygase.backend import Server, GameStateMachine, GameStateStore
from pygase.client import Client
from pygase.gamestate import GameState, GameStatus
class TestIntegrat... |
/**
* The result of a call to {@link LineReaderTask#handleLine(String)}. Allows implementations of that method to
* indicate whether a particular invocation of that method produced a return for this task or not. If a return value
* doesn't exist the {@link #call()} method will continue to the next line.
... |
/**
* Twitch API Client (Helix)
* @return TwitchHelix
*/
public TwitchPubSub build() {
log.debug("PubSub: Initializing Module ...");
TwitchPubSub twitchChat = new TwitchPubSub(this.eventManager);
return twitchChat;
} |
By THERESA HARRINGTON, EdSource
After hours of testimony, the state Board of Education rejected two history textbooks from Houghton Mifflin Harcourt, but approved 10 others based on new history social sciences guidelines.
Following nearly eight hours of emotional pleas from Hindus and Indian American, as well as advo... |
/**
* Converts the given field to its getter. Example:
* <li> myWidgetX = get_myWidgetX()
* <li> f_html1 = get_f_html1()
*/
public String convertFieldToGetter(String fieldName) {
if (!useLazyWidgetBuilders) {
return fieldName;
}
incrementFieldCounter(fieldName);
return getFieldGetter... |
import * as React from 'react'
import { MemoryRouter, Route, Switch } from 'react-router-dom'
import { when } from 'jest-when'
import { renderWithProviders } from '@opentrons/components'
import { i18n } from '../../../i18n'
import {
useRobot,
useRunCreatedAtTimestamp,
} from '../../../organisms/Devices/hooks'
imp... |
/**
* Created by govind on 8/14/16.
*/
public class ExifJSON {
public static JSONObject getExifJSON(File file) {
JSONObject jsonObject = new JSONObject("{\"exif\":{}}");
try {
Metadata metadata = ImageMetadataReader.readMetadata(file);
for (Directory directory : metadat... |
def add_employee(*args,emp_id,emp_name,emp_phone,payment_amnt):
try:
cursor = sql.cursor()
cursor.execute(f"INSERT INTO employees VALUES ({emp_id},'{emp_name}','{emp_phone}',{payment_amnt});")
sql.commit()
cursor.close()
return "Successfully Added"
... |
# params for model RPLP
RPLP_config = {
"train_gat": True,
"train_conv": True,
"evaluate": True,
'data': "./data/FB15k-237/",
'output_folder': './checkpoints/fb/out/',
'get_2hop': False,
'use_2hop': True,
'partial_2hop': True,
'epochs_gat': 20,
'epochs_conv': 2... |
def main():
version = get_local_version()
with open(sys.argv[1], "w") as fptr:
fptr.write(version)
with open(sys.argv[2], "w") as fptr:
fptr.write(str(is_new_release(version))) |
The Mets are monitoring Brewers' infielders Aramis Ramirez and Jean Segura in advance of the trade deadline at the end of July, according to a report from Ken Rosenthal of FOXSports.com. The team is also interested in Ben Zobrist, who is likely to be traded by the Athletics at some point this summer.
Rosenthal notes t... |
<filename>src/main/cpp/Util/UtilityFunctions.h
/****************************** Header ******************************\
Class Name: -
File Name: UtilityFunctions.h
Summary: File of static utility functions for auto use.
Project: FRC2019CPP
Copyright (c) BroncBotz.
All rights reserved.
Author(s): <NAME>, <NAME>
Comments ... |
def action(self, book):
entry = BookShelf.objects.get(user=self.request.user, book=book)
entry.delete()
messages.success(self.request, "You have removed this book from your bookshelf.") |
<reponame>kix/django<filename>django/contrib/flatpages/tests/urls.py<gh_stars>100-1000
from django.conf.urls import patterns, include
# special urls for flatpage test cases
urlpatterns = patterns('',
(r'^flatpage_root', include('django.contrib.flatpages.urls')),
(r'^accounts/', include('django.contrib.auth.url... |
// Find the previous entity stored if one is available.
func (entity *Treatment) Find(context DatabaseService) error {
context.Find(&Treatment{ID: entity.ID}, func(result interface{}) {
previous := result.(*Treatment)
if entity.Name == nil {
entity.Name = &Text{}
}
entity.NameID = previous.NameID
entity.N... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _OE_HOST_CRYPTO_RSA_H
#define _OE_HOST_CRYPTO_RSA_H
#include <openenclave/internal/rsa.h>
/* Caller is responsible for freeing public key. */
oe_result_t oe_rsa_get_public_key_from_private(
const oe_rsa_privat... |
<reponame>go-toolbelt/clock<gh_stars>0
package clock_test
import (
"testing"
"time"
"github.com/go-toolbelt/clock"
)
func TestNow(t *testing.T) {
start := time.Unix(1, 0)
clock := clock.NewFakeClockAt(start)
assertClockAt(t, start, clock)
}
func TestAdvance(t *testing.T) {
start := time.Unix(1, 0)
clock := ... |
/**
* The app that use async mode to run a parallel task, and then poll the progress
* and show an aggregation
*/
public class HttpBasicAsyncRunProgressPollingApp {
/**
* The main method.
*
* @param args the arguments
*/
public static void main(String[] args) {
ParallelClient pc... |
def _report_sighting(self, msg: str):
try:
sighting: Sighting = parse(msg, allow_custom=True)
except Exception as e:
self.opencti_helper.log_error(
f"Error parsing message from Threat Bus. Expected a STIX-2 Sighting: {e}"
)
return
i... |
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... |
<gh_stars>1-10
class OpenItem
{
//! WIll open the 'item_target' by spawning a new entity and transferring item variables to the new one
static void OpenAndSwitch(ItemBase item_tool, ItemBase item_target, PlayerBase player, float specialty_weight = 0)
{
ref array<int> spill_range = new array<int>;
if( item_too... |
/**
* Created by maxiaoxin on 17-6-21.
*/
public class FDSProgressInputStream extends FilterInputStream{
private ProgressListener listener;
private long lastNotifyTime;
public FDSProgressInputStream(InputStream in, ProgressListener listener) {
super(in);
this.listener = listener;
this.lastNotifyTime = Syste... |
// -----------------------------------------------------------------------------
// Functions used for calculating probability distribution function (pdf) and
// cumulative distribution function (cdf).
// -----------------------------------------------------------------------------
float gaussian_pdf(
floa... |
#pragma once
#include <list>
#include <vector>
#include "Hash.h"
using namespace std;
struct col_texture
{
string name;
vector<string> includes;
vector<string> excludes;
bool compare(char *textureName)
{
if(!textureName || textureName[0] == '\0')
return false;
if(name.empty() || strstr(textureName, nam... |
<commit_msg>Include participant in outgoing ack
<commit_before>from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class OutgoingAckProtocolEntity(AckProtocolEntity):
'''
<ack type="{{delivery | read}}" class="{{message | receipt | ?}}" id="{{MESSAGE_ID}} to={{TO_JID}... |
Hot Dog Johnny's is located on Route 46 in the tee-hee inducingly named area known as Buttzville New Jersey, a part of Belvidere. (I pause here to allow your internal 3rd-grader to recover from the gigglefits, and then proceed ;-))
While you would be right in thinking that hot dogs are on the menu here (my internal 3r... |
// Copyright 2019 Google LLC. 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.0
//
// Unless required by applicable... |
<reponame>fregaham/KiWi<gh_stars>1-10
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008-2009, The KiWi Project (http://www.kiwi-project.eu)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provi... |
// Copyright 2014 The Cockroach 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or ag... |
from collections import Counter
for _ in range(int(input())):
# read line as an integer
a,b,k = map(int,input().split())
arr1 = list(map(int,input().split()))
arr2 = list(map(int,input().split()))
hori = [0]*k
verti = [0]*k
hori,verti = Counter(arr1),Counter(arr2)
coun =... |
def quit_app():
conn.send(("close").encode())
sleep(2)
app.terminate()
app.wait()
conn.close() |
<filename>source/core/unitlib/helpers/constants_private.h
// Copyright 2018-19 <NAME>
#pragma once
// Dimensionless, private
namespace _units_private {
constexpr double constexpr_sqr(double a) {
return a * a;
}
constexpr double constexpr_power(double a, std::size_t n) {
return n == 0 ? 1 : constexpr_sqr(const... |
/*
Copyright (c) 2013-2017 <NAME> (jrxie at ucdavis dot edu)
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, including without limitation the rights
to use, copy, modify, merg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.