content stringlengths 10 4.9M |
|---|
// Checks that RecordShortPlaybackIgnored() records the right UKM.
TEST_F(MediaEngagementSessionTest, RecordShortPlaybackIgnored) {
using Entry = ukm::builders::Media_Engagement_ShortPlaybackIgnored;
const std::string url_string = origin().GetURL().spec();
scoped_refptr<MediaEngagementSession> session = new Media... |
import * as React from 'react'
import Box from '@mui/material/Box'
import { IFile } from '../../interfaces'
// TODO: restyle scrolls (use Table's style)
interface FileProps {
file: IFile
}
export default function File(props: FileProps) {
return (
<Box sx={{ height: '100%', width: '100%', overflow: 'auto' }}>... |
def parent_selection(self, population, fitness):
idxs = np.random.choice(range(self.m), size = self.k, replace = False)
candidate_solutions = population[idxs]
candidate_fitness = fitness[idxs]
best_idxs = np.argsort(candidate_fitness)[-2:]
parent_a = candidate_solutions[b... |
/**
* Adds items to basket
*
* @param items an array of string (item names)
*/
private void populateItems(String[] items) {
ItemFactory itemFactory = new ItemFactory();
for(int i = 0; i < items.length; i++) {
String itemName = items[i].toLowerCase();
Item item... |
<reponame>sagrudd/amos
#include "LaunchPadBase.hh"
#include <qvariant.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <q3textedit.h>
#include <q3buttongroup.h>
#include <qradiobutton.h>
#include <q3header.h>
#include <q3listview.h>
#include <qlabel.h>
#include <qlineedit.h>
#include ... |
// NewCLI - New CLI instance.
func NewCLI() (cli *CLI) {
cli = &CLI{}
cli.InitializeError = cli.Initialize()
return
} |
//we can insert OrderGoods BeanObject into database.
public BeanObject convertGoodsToOrderGoods(BeanObject goods)
{
BeanObject bean = new BeanObject();
bean.set(IOrderGoods.ID, store.getCount()+1);
bean.set(IOrderGoods.GOODS, goods.getString(IGoods.ID));
bean.set(IOrderGoods.GOODSNAME, goods.getString(IGoods.... |
Pro marijuana advocates in Maine are expected to start collecting signatures to get recreational pot on the ballot in 2016 following approval Tuesday of a petition by the Secretary of State's office, the Associated Press reported. Legalize Maine submitted its proposal 10 weeks ago, and hoped to put through the petition... |
<gh_stars>100-1000
package recovery_test
// todo: actually test
// purposefully empty to trigger coverage report
|
NEWARK, N.J.—The owner is dreadfully deep in debt and can’t find a viable business partner. The club will lose an estimated $20 million (all figures U.S.) this season and is teetering on the edge of bankruptcy. The NHL has already advanced the franchise millions of dollars and is poised to step in if necessary and make... |
/* SU= 8, XOR common bytes of a pair of Octets */
void OCT_xor(octet *y,octet *x)
{
int i;
for (i=0; i<x->len && i<y->len; i++)
{
y->val[i]^=x->val[i];
}
} |
package com.netflix.eureka.registry;
import com.netflix.appinfo.AmazonInfo;
import com.netflix.appinfo.DataCenterInfo;
import com.netflix.appinfo.InstanceInfo;
import com.netflix.appinfo.InstanceInfo.InstanceStatus;
import com.netflix.appinfo.LeaseInfo;
import com.netflix.discovery.EurekaClient;
import com.netflix.dis... |
# coding: utf-8
# # Table des matières
# * [1. Agrégation externe de mathématiques, texte d’exercice diffusé en 2012](#1.-Agrégation-externe-de-mathématiques,-texte-d’exercice-diffusé-en-2012)
# * [1.1 Épreuve de modélisation, option informatique](#1.1-Épreuve-de-modélisation,-option-informatique)
# * [1.2 *Proposi... |
/**
* Returns the format dictionary entries
* @param pw
* printwriter
* @param dictionary
* dictionary
*/
public static void formatDictionaryEntries(PrintWriter pw, Map<String, String> dictionary) {
pw.println(Messages.formatWordCount(dictionary.size()));
... |
Selling a boy an ice cream cone, or a murder magnet? Photo by Andrew Burton/Getty Images
Crime is Slate’s crime blog. Like us on Facebook, and follow us on Twitter @slatecrime.
The New Orleans Times-Picayune ran a piece last Friday attempting to answer a question the entire world has been asking: Should ice cream be ... |
def _write_temp(content, suffix):
with NamedTemporaryFile(mode='w', suffix=suffix, delete=False) as out:
out.write(content)
return out.name |
def error(ilo, ihix, ihiy, dx, r):
e = numpy.sqrt(dx*dx*numpy.sum((r[ilo:ihix+1,ilo:ihiy+1]**2)))
return e |
<gh_stars>1-10
package com.interviewBitScaler;
import org.omg.PortableInterceptor.SYSTEM_EXCEPTION;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
public class A3_AllocateBook {
public static void main(String[] args) {
... |
/*
Quote the given identifier if needed and append it to the target string.
If the given identifier is empty, it will be quoted.
SYNOPSIS
append_identifier()
thd thread handler
packet target string
name the identifier to be appended
name_length ... |
<filename>quickstarts/camel/camel-odata/src/main/java/org/apache/camel/example/olingo4/blueprint/Olingo4TestConfiguration.java
/**
* Copyright 2005-2017 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version
* 2.0 (the "License"); you may not use this file except in compliance
* ... |
/*
Copyright 2020 gRPC 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 agreed to in writing, software
d... |
This morning, the official Tapatalk client for Windows Phone (both 7.x and 8; optimized for WP8) has been released to the Store and is now available as part of an early-access program for enthusiast users. Tapatalk is the leading standard for discussion forums, allowing users a common system by which to access and util... |
/**
* Dispatches an due events, and returns the timeout until the next event.
*
* @return the time in milliseconds until the next event, or 0 if there are no events.
*/
private Event executePendingEvents() {
final Collection<Runnable> toRun = new ArrayList<>();
final Event nextEvent ... |
/**
* Modify an existing table, more IRB friendly version. Asynchronous operation. This means that
* it may be a while before your schema change is updated across all of the table.
* You can use Future.get(long, TimeUnit) to wait on the operation to complete.
* It may throw ExecutionException if there was ... |
/* vi:set ts=4 sw=4:
*
* VIM - Vi IMproved by <NAME>
* GUI/Motif support by <NAME>
* Athena port by <NAME>
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
*/
#include <X11/StringDefs.h>
#include <X11/Intrin... |
#include "test.h"
/** Question no 48 medium Rotate Image
* Author : Li-Han, Chen; 陳立瀚
* Date : 8th, February, 2020
* Source : https://leetcode.com/problems/rotate-image/
*
* You are given an n x n 2D matrix representing an image.
*
* Rotate the image by 90 degrees (clockwise).
*
* Note:
* You have to rot... |
/**
* A model object representing a KDL Document. The only data in a document is the list of nodes, which may be empty.
*/
public class KDLDocument implements KDLObject {
private final List<KDLNode> nodes;
public KDLDocument(List<KDLNode> nodes) {
this.nodes = Collections.unmodifiableList(Objects.req... |
<filename>Hurrican/src/stdafx.h
#ifndef _STDAFX_H_
#define _STDAFX_H_
#define DIRECTINPUT_VERSION 0x0800
#include "Console.h"
#include "DX8Font.h"
#include "DX8Sound.h"
#include "Gameplay.h"
#include "Globals.h"
#include "GUISystem.h"
#include "HUD.h"
#include "Logdatei.h"
#include "Partikelsystem.h"
#i... |
/**
* Maps attribites from the specified {@link LdapUserData} onto
* a {@link org.sakaiproject.user.api.UserEdit}. Implemented to
* delegate to the currently assigned {@link LdapAttributeMapper}.
*
* @see LdapAttributeMapper#mapUserDataOntoUserEdit(LdapUserData, UserEdit)
* @param userData a non-null user ... |
def key_fields(self):
if self.add:
return ['date', 'elem']
else:
return ['date'] |
def deploy():
parser = argparse.ArgumentParser(description=deploy.__doc__)
parser.add_argument('dest', help="Destination directory")
args = parser.parse_args()
dest = os.path.abspath(args.dest)
if not os.path.exists(dest):
os.makedirs(dest)
resources = os.path.join(os.path.dirname(__file... |
<filename>packages/gatsby-theme-bulmaio/src/resources/tutorialstep/createResolvers.ts
import { posix } from 'path';
export const tutorialStepCreateResolvers = async (createResolvers: any) => {
// noinspection JSUnusedLocalSymbols
createResolvers({
TutorialStep: {
inTutorial: {
type: 'Tutorial',
... |
package com.alipay.bluewhale.core.task;
public interface StopCheck {
public boolean isStop();
}
|
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const long long inf=0x3f3f3f3f3f3f3f3f;
const int maxm=3e5+10;
const int maxn=3e5+10;
int num=0;
int n,m,k;
int first[maxn],book[maxn];
long long dis[maxm];
vector<int>tmp;
struct node1
{
int v;
int w;
int ans;
int next;
};
node1 edge... |
<reponame>ViteFalcon/RokLegend<filename>source/archive/grf/RoGrf2Impl.cpp
#include "RoGrf2Impl.h"
#include <core/RoErrorInfo.h>
#include <core/RoException.h>
#include <core/RoLog.h>
#include <core/RoMemoryDataStream.h>
#include <core/RoSharedPtr.h>
#define roPROFILE_GRF_LOADING 1
#if roPROFILE_GRF_LOADING
# includ... |
def write_summary_output(self):
self._accumulate_summary_data()
ncol = np.size(self._summary_data.keys())
if self._summary_output_number == 0:
header = " " + " ".join(list(self._summary_data.keys())) + "\n"
f = open(config.io.summary_output_filename,'w')
f.wr... |
//
// Helps in debugging of fast paths.
//
void LowererMD::GenerateDebugBreak( IR::Instr * insertInstr )
{
IR::Instr *int3 = IR::Instr::New(Js::OpCode::DEBUGBREAK, insertInstr->m_func);
insertInstr->InsertBefore(int3);
} |
def check_definition(
self, definition, header_fields: dict, verbose: bool = False
) -> bool:
if not header_fields:
return None
if not isinstance(definition, (dict, list, tuple)):
message = WRONG_DEFINITION_TYPE.format(
definition_type=type(definition)... |
<filename>projects/core/src/occ/adapters/cms/occ-cms-component.adapter.spec.ts
import {
HttpClientTestingModule,
HttpTestingController,
} from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { CmsComponent, PageType } from '../../../model/cms.model';
import { OccEndpointsServ... |
def post_task(self, name: str, image: str, collaboration_id: int,
input_: str = '', description='',
organization_ids: list = None) -> dict:
self.log.debug("post task without encryption (is handled by proxy)")
organization_ids = organization_ids if organization_ids els... |
/**
* Assigns the value of zero to the specified BigInt
*/
void BIGINT_Zero(BigInt * b)
{
if (b->signum != 0) {
b->signum = 0;
b->len = 0;
BIGINT_Invalidate(b);
}
} |
package fossilsarcheology.server.biome;
import fossilsarcheology.server.entity.mob.EntitySentryPigman;
import fossilsarcheology.server.gen.feature.HellMushroomWorldGen;
import net.minecraft.block.Block;
import net.minecraft.entity.monster.EntityPigZombie;
import net.minecraft.world.World;
import net.minecraft.world.bi... |
Gravity: It’s the law in these parts. But to reach the stars, humans may have to learn to live outside the law.
“Gravity is the most pervasive thing on the planet, and it’s always been there,” says Simon Gilroy, University of Wisconsin–Madison botany professor. “Terrestrial biology has evolved with this constant force... |
Air Pollution and Human Health in Greater Manchester
The background to air pollution control in Manchester and the resulting falling pollution concentrations and consequent damage to health are described, and an analysis is made of the statistical relationships between mortality and air pollution in Greater Manchester... |
def _expandsubinclude(kindpats, root):
relmatchers = []
other = []
for kind, pat, source in kindpats:
if kind == 'subinclude':
sourceroot = pathutil.dirname(util.normpath(source))
pat = util.pconvert(pat)
path = pathutil.join(sourceroot, pat)
newroot =... |
//Determine which subclass of Website to add to the array
public static String addWebsiteFromArray(String[] websiteParts)
{
if (websiteParts.length > 0) {
if (websiteParts[0].equals("com")) {
if(addMediaStreamingWebsite(websiteParts).equals("Error"))
{
return "Error";
}
}
else if (websiteP... |
import time
from typing import Callable, List
from threading import Thread
from functools import wraps
from retrying import retry
from datetime import timedelta
from django.utils import timezone
from django.db import transaction
from data_refinery_common.models import (
WorkerJob,
DownloaderJob,
ProcessorJo... |
#include <stdio.h>
#include <stdlib.h>
int n;
typedef struct
{
int next;
int num;
}XY;
XY ID[105];
void Bulid()
{
int i;
for(i=1;i<=n;i++)
{
ID[i].next=i;
ID[i].num=1;
}
}
int Find(int i)
{
if(ID[i].next!=i)
return Find(ID[i].next);
else
return i;
}
int ... |
<filename>src/ProgressBar/ProgressBar.stories.tsx
import React from 'react'
import { ProgressBar, ProgressBarProps } from '.'
export default {
title: 'ProgressBar',
component: ProgressBar,
}
const defaultArgs: ProgressBarProps = {}
export const Default = (args: any) => <ProgressBar {...args} />
Default.args ... |
Toward independence learning of disabled students through optimization of humanist approaches during the pandemic
Students with disabilities have equal rights in the service of education. They need extra help in learning and developing independence. Learning in the pandemic era could not be implemented optimally. Ther... |
<reponame>VirtusLab/formts<filename>src/core/decoders/number.spec.ts
import { impl } from "../types/type-mapper-util";
import { number } from "./number";
describe("number decoder", () => {
it("should provide it's field type", () => {
const decoder = impl(number());
expect(decoder.fieldType).toBe("number");... |
export * from './emails-smtp-routing.module';
export * from './emails-smtp.module';
export * from './ng-emails-smtp-settings-fields-config';
|
/**
* Computes hash of `node` and returns it as raw bytes.
*
* @param node node whose hash will be computed
* @return raw bytes representing the hash of `node`
*/
raw_hash SimpleHashNode::compute_hash(const SimpleHashNode& node){
picosha2::hash256_one_by_one hasher;
hasher.process(&node.serial, &node.se... |
/**
* Created with IntelliJ IDEA.
* User: alekspo
* Date: 25.11.14
* Time: 18:07
*/
public class PlayDto {
private String title;
private String playerWhite;
private String playerBlack;
private SafeHtml deskHtml;
public PlayDto() {
}
public PlayDto(String title, String playerWhite, String playerBlac... |
use crate::lang::execution_context::ExecutionContext;
use crate::lang::errors::{CrushResult, error};
use crate::lang::{value::ValueType, table::Row, value::Value};
use crate::lang::stream::{Readable, ValueSender};
use crate::lang::table::ColumnType;
pub fn run(input: &mut dyn Readable, sender: ValueSender) -> CrushRes... |
class Solution(object):
def letterCombinations(self, digits):
"""
:type digits: str
:rtype: List[str]
"""
if not digits:
return []
mapping = {2:"abc", 3:"def", 4:"ghi", 5:"jkl", 6:"mno", 7:"pqrs", 8:"tuv", 9:"wxyz"}
res = []
... |
<reponame>kapmahc/fly-old
package auth
import (
"net/http"
gin "gopkg.in/gin-gonic/gin.v1"
)
type fmAttachmentNew struct {
Type string `form:"type" binding:"required,max=255"`
ID uint `form:"uint"`
}
func (p *Engine) createAttachment(c *gin.Context) (interface{}, error) {
user := c.MustGet(CurrentUser).(*U... |
// Unref is a wrapper around the C function g_file_attribute_info_list_unref.
func (recv *FileAttributeInfoList) Unref() {
C.g_file_attribute_info_list_unref((*C.GFileAttributeInfoList)(recv.native))
return
} |
#include<bits/stdc++.h>
#define LL long long
#define P pair<int,int>
#define PI acos(-1.0)
#define ls o<<1
#define rs o<<1|1
using namespace std;
const int maxn=2e5+10;
int a[maxn],f[maxn],g[maxn];
int h[maxn<<1],c[maxn<<1];
int lowbit(int x)
{
return x&(-x);
}
void update(int x,int v)
{
w... |
<reponame>mmahut/cardano-node<gh_stars>0
{-# LANGUAGE OverloadedStrings #-}
module Cardano.CLI.Environment
( readEnvSocketPath
) where
import Cardano.Prelude
import Cardano.CLI.Ops (CliError (..))
import Cardano.Config.Types (SocketPath (..))
import Control.Monad.Trans.E... |
Deformations of third order Peregrine breather solutions of the NLS equation with four parameters
In this paper, we give new solutions of the focusing NLS equation as a quotient of two determinants. This formulation gives in the case of the order 3, new deformations of the Peregrine breather with four parameters. This... |
/**
* <p>Checks if the PocketSphinx speech recognition is available.</p>
* <p>It does so by checking if the PocketSphinx library file is available on the device.</p>
* <p>Ignore Android Studio saying this always returns true.</p>
*
* @return true if it is available for use (PocketSphinx library file on the de... |
def sql_query(query, all_rows = False):
db_info = json.loads(open("docs/database.json", "r").read())
connection = pymysql.connect(
host = db_info["host"],
user = db_info["user"],
port = db_info["port"],
password = db_info["password"],
database = db_info["database"],
... |
<filename>framework-plugins/lisk-framework-forger-plugin/test/utils/genesis_block.ts
/*
* Copyright © 2020 Lisk Foundation
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* ... |
# -*- coding:utf-8 -*-
#!/usr/bin/env Python
from .text_markup_language_utility import TmlUtl,TmlDefs
__all__ = ["TmlUtl", "TmlDefs"] |
// Copyright (c) <NAME> 2013.
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE.txt or a copy at http://www.boost.org/LICENSE_1_0.txt).
#ifndef FUNCTIONAL_CC_INCLUDED_FP_LAZY_HPP
#define FUNCTIONAL_CC_INCLUDED_FP_LAZY_HPP
#include <functional>
#include <memory>
#inclu... |
<filename>extensions/ringopenssl/ring_vmopenssl.h
/* Copyright (c) 2013-2020 <NAME> <<EMAIL>> */
#ifndef ring_vmopenssl_h
#define ring_vmopenssl_h
/* Functions */
RING_API void ringlib_init ( RingState *pRingState ) ;
void ring_vm_openssl_md5_init ( void *pPointer ) ;
void ring_vm_openssl_md5_update ( void *pPointer... |
/**
* Test a successful API fetch of SearchResult (Title).
*/
@Test
public void searchByTitleSuccess() {
openLibraryClient.getRepository().search(Repository.SearchType.TITLE, "the lord of the rings", null)
.blockingSubscribe(new DisposableSingleObserver<SearchResult>() {
... |
President Trump sent a chill through the biopharma industry before he even took office, with his charge that drug companies are “getting away with murder” when it comes to pricing. But this is one issue that he won’t easily be able to sign away with the swoop of an executive order. Not only is his oft-cited solution of... |
/**
* Computes the histogram of intensity values for the image while scaling the range to match the histogram.
*
* @param input (input) Image.
* @param minValue (input) Minimum possible intensity value
* @param histogram (output) Storage for histogram. Number of elements must be equal to max value.
*/
publi... |
#include "duckdb/planner/bound_result_modifier.hpp"
namespace duckdb {
BoundResultModifier::BoundResultModifier(ResultModifierType type) : type(type) {
}
BoundResultModifier::~BoundResultModifier() {
}
BoundOrderByNode::BoundOrderByNode(OrderType type, OrderByNullType null_order, unique_ptr<Expression> expression)
... |
/*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
* Copyright (C) 1997--2015 The R Core Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*... |
use std::default::Default;
use pb_text_format_test_data::*;
use protobuf::text_format::print_to_string;
fn t<F : FnMut(&mut TestTypes)>(expected: &str, mut setter: F) {
let mut m = TestTypes::new();
setter(&mut m);
assert_eq!(&*print_to_string(&m), expected);
}
#[test]
fn test_singular() {
t("int32_... |
/* Runs DFS through graph whilst ignoring Articulation Points */
void count_scc(
Graph *g, SCC_data *scc,
Stack *st,
Vertex u,
int *disc, int *low, int *disc_time
) {
Edge adj;
if (stack_contains(&scc->ap, u)) { return; }
disc[u] = low[u] = ++(*disc_time);
stack_push(st, u);
for (adj = g->first[u]; adj != 0; a... |
Ultrafast excitation energy transfer in a benzimidazole-naphthopyran donor-acceptor dyad.
The excited-state dynamics of a donor-acceptor dyad composed of 1-propyl-2-pyridinyl-benzimidazole (PPBI) as donor and the photochromic molecular switch diphenylnaphthopyran (DPNP) as acceptor linked via an ester bridge has been ... |
How To Teach Children That Failure Is The Secret To Success
Enlarge this image toggle caption CAP/Getty Images CAP/Getty Images
Is failure a positive opportunity to learn and grow, or is it a negative experience that hinders success? How parents answer that question has a big influence on how much children think they... |
def dedent(self):
import textwrap
return self._f(textwrap.dedent(paste())) |
KYIV, 17 September 2015 – Since the occupation and annexation of Crimea by the Russian Federation in early 2014, the enjoyment of human rights and fundamental freedoms has deteriorated radically for a large number of residents and displaced persons – particularly for pro-Ukrainian activists, journalists and the Crimean... |
// SignpostWithArguments creates a single point of interest, allowing you to specifiy all arguments
func SignpostWithArguments(action, arg1, arg2, arg3, arg4 int32) {
C.kdebug_signpost(
C.uint32_t(action),
C.uintptr_t(arg1),
C.uintptr_t(arg2),
C.uintptr_t(arg3),
C.uintptr_t(arg4),
)
} |
<gh_stars>0
"use strict";
import Actor = require("../../lib/scenes/actors/Actor");
import Scene = require("../../lib/scenes/Scene");
/**
* Joy class
*/
class Joy extends Actor {
constructor(scene:Scene, obj:any) {
super(scene, obj);
this.shape = "circle";
this.addAnimation("be", [ 0, 1, 2, 3, 4, ... |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
__all__ = ["FactorRevOp"]
from .base_op import CeleriteBaseOp
class FactorRevOp(CeleriteBaseOp):
func_file = "./factor_rev.cc"
func_name = "APPLY_SPECIFIC(factor_rev)"
num_input = 7
output_ndim = (1, 2, 2, 2)
def __init__... |
/**
* Resolver for Class lookup
*/
public class ClassLookupResolver {
private final ClasspathInfo classpath;
public ClassLookupResolver(ClasspathInfo classpath) {
this.classpath = classpath;
}
/**
* returns a list with all classes matchting the given filter
*/
public List<CompletionItem> resolv... |
// Copyright (c) 2020-2022 Climate Interactive / New Venture Fund
import type { InputVarId } from '../_shared'
/** Callback functions that are called when the input value is changed. */
export interface InputCallbacks {
/** Called after a new value is set. */
onSet?: () => void
}
/**
* Represents a writable mod... |
/**
* Clears the pool, deleting all its elements (technically undoes the effect of HintSize)
* @remark this function does NOT take care of any elements that are still in use, they must be returned to the pool using Free() first!
*/
void Clear()
{
CChunk *pChunk = m_pFirst;
while(pChunk)
{
CChunk *pNext ... |
/**
* closes the session with Paperless
*
* @return
* @throws IOException
*/
public boolean close() throws IOException {
URL loginURL = new URL(PaperlessRestApiUrls.HOST.toString()
+ PaperlessRestApiUrls.LOGIN);
HttpsURLConnection con = (HttpsURLConnection) login... |
def cleanup_equivalent(labels, shifts, errs, ws, crysts, inds, hashes):
new_labels = []
new_shifts = []
new_errs = []
new_ws = []
new_crysts = []
new_inds = []
new_hashes = []
for l, sh, er, w, cr, ind, h in zip(labels, shifts, errs, ws, crysts, inds, hashes):
if h in new_hashes:... |
/**
* Provides a SPARQL interface to contexts.
*
* @author Hannes Ebner
*/
public class SparqlResource extends BaseResource {
static Logger log = LoggerFactory.getLogger(SparqlResource.class);
List<MediaType> supportedMediaTypes = new ArrayList<MediaType>();
@Override
public void doInit() {
supportedMedi... |
#include "Player.hpp"
#include <kocmoc-core/types/Symbol.hpp>
#include <kocmoc-core/scene/AssetLoader.hpp>
#include <kocmoc-core/component/Renderable.hpp>
#include <component/TextLabel.hpp>
#include <component/PlayerBehaviour.hpp>
#include <component/CameraDistToMidi.hpp>
using namespace sputnik::object;
using name... |
// PartitionBy returns an array of elements split into groups. The order of grouped values is
// determined by the order they occur in collection. The grouping is generated from the results
// of running each element of collection through iteratee.
// `iteratee` is call in parallel.
func PartitionBy[T any, K comparable... |
<reponame>fallenfuzz/pynet<filename>presentations/dfwcug/examples/case13_term_server/term_server.py
#!/usr/bin/env python
import time
from netmiko import ConnectHandler, redispatch
net_connect = ConnectHandler(
device_type='terminal_server',
ip='10.10.10.10',
username='admin',
password='<PASSWORD>',
... |
/**
* GCP Search configuration properties.
*/
@Component
@ConfigurationProperties("spring.data.gcp.search")
public class SearchProperties {
/**
* Search index naming strategy to use.
*/
private Class<? extends IndexNamingStrategy> indexNamingStrategy = DefaultIndexNamingStrategy.class;
public ... |
.
Safety literatures on Rhizoma Dioscoreae bulbiferae and oral preparation have been reviewed and analyzed systematically, including textual research for origin and varieties, ancient and modern toxic record and toxic empirical study. Characteristics of clinical manifestations, risk factors and latest findings related... |
Cluster Detection Mechanisms for Syndromic Surveillance Systems: Systematic Review and Framework Development
Background The time lag in detecting disease outbreaks remains a threat to global health security. The advancement of technology has made health-related data and other indicator activities easily accessible for... |
def _get_main_studio_info(studios):
try:
edges = studios['edges']
for edge in edges:
Ayumi.debug("Checking edge {}".format(edge['node']['name']))
if edge['isMain']:
Ayumi.debug("Found main studio edge, returning tuple")
node = edge['node']
... |
<gh_stars>10-100
import { NgModule } from '@angular/core';
import { OverlayModule } from '@angular/cdk/overlay';
import { LuPopup } from './popup.service';
import { LU_POPUP_CONFIG, LU_POPUP_REF_FACTORY } from './popup.token';
import { luDefaultPopupConfig } from './popup-config.default';
import { LuPopupRefFactory } f... |
<reponame>phamtinhDev/learn-nest
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { MongoConfigModule } from '../../../config/database/mongo/config.module';
import { MongoConfigService } from '../../../config/database/mongo/config.service';
@Module({
imports: [
... |
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import re
import urllib
import ssl
import json
import shutil
nickName = '';
class CsdnHelper:
post_url = 'https://www.douban.com/note/create';
ck = '';
url = '';
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; W... |
<reponame>bodymovin/skia-buildbot<gh_stars>0
import karma from 'karma';
import webpack from 'webpack';
// Adapted from https://github.com/google/common-sk/blob/master/karma.common.js.
export function setCommonConfigOptions(karmaConfig: karma.Config, webpackConfig: webpack.Configuration) {
// Work-around for karma-we... |
Analysis framework for machine learning experiments based on classifier combination for petrographic images
The analysis and description of rocks is very well useful in geological industry and also in rock mining. Igneous rock is most abandoned rock in nature. The classification of Igneous rocks in its two types namel... |
template< typename G >
struct BiConnectedComponents : LowLink< G > {
using LL = LowLink< G >;
vector< int > used;
vector< vector< pair< int, int > > > bc;
vector< pair< int, int > > tmp;
BiConnectedComponents(const G &g) : LL(g) {}
void dfs(int idx, int par) {
used[idx] = true;
for(auto &to : ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.