content stringlengths 10 4.9M |
|---|
from collections import OrderedDict
from itertools import chain
import regex as re
from dateutil import parser
from dateparser.timezone_parser import pop_tz_offset_from_string, word_is_tz
from dateparser.utils import combine_dicts, normalize_unicode
from .dictionary import ALWAYS_KEEP_TOKENS, Dictionary, NormalizedD... |
<filename>erp_parent/erp_client/src/main/java/com/redsum/bos/ws/ObjectFactory.java
package com.redsum.bos.ws;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory method... |
/**
* Remove all rules matching the passed predicate.
*
* @param aFilter
* The predicate to apply for deletion. May not be <code>null</code>.
* @return {@link EChange#CHANGED} it at least one rule was removed,
* {@link EChange#UNCHANGED} otherwise.
* @since 5.0.0
*/
@Nonnull
pub... |
import { constants } from 'http2';
import { files } from '../src';
describe('files', () => {
it('should be callable', () => {
expect(typeof files).toBe('function');
});
it('should return get route', () => {
expect(files().method).toBe(constants.HTTP2_METHOD_GET);
});
});
|
s=input()
t=input()
i=0
o="Yes"
if(len(s)!=len(t)):
o="No"
while(len(s)==len(t)and o=="Yes"and i<len(s)):
if(s[i] == "a" or s[i] =="o" or s[i] =="i" or s[i] =="e" or s[i] =="u" )and (t[i] == "a" or t[i] =="o" or t[i] =="i" or t[i] =="e" or t[i] =="u"):
o="Yes"
elif(s[i] != "a" and s[i] !="o" and s[i... |
async def undocking(self, guild : discord.Guild):
def has_subname_role(member : discord.Member) -> bool:
roles = member.roles
role_names = map(lambda r: r.name, roles)
return self._name in role_names
in_sub = filter(has_subname_role, guild.members)
for member ... |
// Choose the timeout : setupTimeout (if set) limits the protocolTimeout.
private static long chooseTimeout(long setupTimeout, long protocolTimeout) {
if ( setupTimeout < 0 )
return protocolTimeout;
if (protocolTimeout > 0 )
return Math.min(setupTimeout, protocolTimeout);
... |
/**
* Copyright 2019 zgqq <<EMAIL>>
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law o... |
<filename>years/2020/02/passwords.ts
export const validatePasswords = (input: string[]) => {
const data = input.map((row) => {
const [, minCount, maxCount, character, password] = row.split(/(\d+)-(\d+) (.): (.+)/);
return { minCount: Number(minCount), maxCount: Number(maxCount), character, password };
});
... |
/**
* Save a graduacao.
*
* @param graduacaoDTO the entity to save.
* @return the persisted entity.
*/
public GraduacaoDTO save(GraduacaoDTO graduacaoDTO) {
log.debug("Request to save Graduacao : {}", graduacaoDTO);
Graduacao graduacao = graduacaoMapper.toEntity(graduacaoDTO);
... |
import java.util.*;
public class TravelCard{
public static int n;
public static int[] mincost;
public static int[] t;
public static int f(int x){
int l = 1; int r = n; int a = l;int mid;
while(l <= r){
mid = (l+r)/2;
if(t[mid] >= x){
a ... |
#!/usr/bin/env python2
# Copyright 2016 The Fontbakery Authors
# Copyright 2017 The Google Font Tools 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/lice... |
use azure_sdk_core::errors::{check_status_extract_body, AzureError};
use azure_sdk_storage_core::key_client::KeyClient;
use azure_sdk_storage_core::prelude::*;
use azure_sdk_storage_core::{
client, get_default_json_mime, get_json_mime_fullmetadata, get_json_mime_nometadata,
ConnectionString, ServiceType,
};
use... |
def fixslash(url, relative=True):
url = url.strip("/")
if relative:
url = "/" + url
return url |
/**
* Discards a batch of Pig commands.
*
* @throws FrontendException
*/
public void discardBatch() throws FrontendException {
if (currDAG == null || !isBatchOn()) {
int errCode = 1083;
String msg = "setBatchOn() must be called first.";
throw new FrontendE... |
<gh_stars>1-10
import * as t from "@babel/types";
import getDefinitionName from "./get-definition-name";
import typeNodeName from "./type-node-name";
import some from "../../utils/some";
import {
MetaTypeTree,
TypeNode,
TypeTree,
MetaTypeNode
} from "../../node-types";
import filter from "../../utils/filter";
... |
/**
* Eureka 内部传输数据编解码转换器
* 支持XML/JSON 格式
*/
package com.netflix.discovery.converters; |
def DictStartVisit(self, obj , topology_model):
output_dir = os.environ["DICT_DIR"] + "/commands"
if not (os.path.isdir(output_dir)):
os.makedirs(output_dir)
init_file = output_dir + os.sep + "__init__.py"
open(init_file, "w+")
try:
instance_obj_li... |
<reponame>abagusetty/Uintah
/*
* The MIT License
*
* Copyright (c) 1997-2021 The University of Utah
*
* 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 wit... |
#include "obj.h"
#include "handle.h"
#include "gtest/gtest.h"
namespace yukino {
TEST(ObjTest, HandleRefCounting) {
auto obj = String::New(yuki::Slice("1234"));
EXPECT_EQ(0, obj->RefCount());
Handle<String> str(obj);
EXPECT_EQ(1, obj->RefCount());
EXPECT_EQ(obj->RefCount(), str.ref_count());
... |
<filename>ccnxlibs/libccnx-common/ccnx/common/codec/schema_v1/ccnxCodecSchemaV1_MessageDecoder.c<gh_stars>1-10
/*
* Copyright (c) 2017 Cisco and/or its affiliates.
* 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 ... |
/**
* HTML for each insert tab (neume, grouping, clef, system, and division).
*/
export const insertTabHtml: Record<string, string> = {
primitiveTab: '<p class=\'control\'>' +
'<button id=\'punctum\' class=\'button insertel smallel\' aria-label=\'punctum\' title=\'punctum\'><img src=\'' + __ASSET_PREFIX__ +... |
/**
* Skip over that many entries. This method is relatively fast (for this map
* implementation) even if many entries need to be skipped.
*
* @param n the number of entries to skip
*/
public void skip(long n) {
if (n < 10) {
while (n-- > 0 && hasNext()) {
ne... |
"""
LSTM for time series classification
This model takes in time series and class labels.
The LSTM models the time series. A fully-connected layer
generates an output to be classified with Softmax
"""
import numpy as np
import tensorflow as tf #TF 1.1.0rc1
tf.logging.set_verbosity(tf.logging.ERROR)
import matplotlib... |
def parse_speed(original, unit):
return parse_distance(original, unit) |
Afghanistan: The Australian Story documentary gives insight into military involvement
Updated
Members of the military who fought in Australia's longest war have re-opened raw memories of bloodshed and death in an official documentary account of their service.
Afghanistan: The Australian Story was commissioned by the... |
<reponame>xuyz/qbase
package baseabci
import (
"github.com/QOSGroup/qbase/account"
"github.com/QOSGroup/qbase/mapper"
"github.com/QOSGroup/qbase/qcp"
"github.com/QOSGroup/qbase/store"
"github.com/tendermint/tendermint/crypto"
)
func (app *BaseApp) SetName(name string) {
if app.sealed {
panic("SetName() on sea... |
/**
* A {@link GameMessageReader} implementation that intercepts data sent when the region changes.
*
* @author lare96 <http://github.org/lare96>
*/
public final class RegionChangedMessageReader extends GameMessageReader {
@Override
public Event read(Player player, GameMessage msg) throws Exception {
... |
/**
* Decomposes a complex matrix.
* <p />
* @param Q_re The real part of the matrix to decompose and afterwards
* the real part of the unitary matrix.
* @param Q_im The imaginary part of the matrix to decompose and
* afterwards the imaginary par... |
<filename>src/typings.d.ts
declare const _G: any
declare type VConnection = {
/** trailer Entity */
ent: Entity
/** AdvBallSocket */
socket: Entity
}
/** @todo */
type ExtensionData = {
}
/** Storage for handling car info */
declare type VEntity = {
/** inputPos of vehicle */
inputPos?: Vector
/** outputPos o... |
<filename>src/main/java/org/age/hz/core/services/topology/leader/election/LeaderElector.java
package org.age.hz.core.services.topology.leader.election;
import org.age.hz.core.node.NodeId;
public interface LeaderElector {
NodeId electLeader() throws Throwable;
boolean isCurrentNodeMaster();
}
|
n,k = input().split()
n = int(n)
k = int(k)
ans = n-k+1
s = input()
s = list(s)
l = list(set(s))
l.sort()
i = k-1
if n>=k:
while(i>=0):
if s[i]==l[len(l)-1]:
s[i] = l[0]
i-=1
else:
s[i] = l[l.index(s[i])+1]
break
for i in range(k... |
#!/usr/bin/env python2
# pylint: disable=missing-docstring,invalid-name
# XXX: Refactor to a comand line tool and remove pylint disable
"""Compute coordinates for volcano plot."""
from __future__ import absolute_import, division, print_function
import argparse
import json
import os
import pandas as pd # pylint: disa... |
package de.thatsich.autosort.alias;
import de.thatsich.data.Repository;
import java.nio.file.Path;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class NonPersistentPathRepository implements Repository<String, Path> {
private final Map<String, Path> i... |
//
// Created by <NAME> on 30.12.2019.
//
#include "ParticleEmission.h"
ParticleEmission::ParticleEmission(Particles &incident_particles, Particles &emitted_particles, Grid &grid,
Matrix &domain_condition, array<scalar, 3> emission_direction, scalar gamma,
... |
// Copyright (c) 2020 <NAME>
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
/**
* Data service tokens for Angular dependency injection pattern
*/
export const DATA_INJECTION_TOKENS = {
storeCatalog: 'StoreCatalogData',
people: 'PeopleData',
shared: 'Sha... |
package com.joymain.jecs.pm.model;
// Generated 2009-11-6 17:25:20 by Hibernate Tools 3.1.0.beta4
/**
* @struts.form include-all="true" extends="BaseForm"
* @hibernate.class
* table="JPM_PRODUCT_COMBINATION"
*
*/
public class JpmProductCombination extends com.joymain.jecs.model.BaseObject implemen... |
<reponame>willstudy/iotex-analytics<gh_stars>0
package chainmeta
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/iotexproject/iotex-analytics/indexprotocol"
"github.com/iotexproject/iotex-analytics/indexservice"
s "github.com/iotexproject/iot... |
<filename>@DOC by DIPTA/Old/@GEO/ngsdq-geo/ZZtriangle_circle_intersect.cpp
/*
* Author : <NAME>
* Problem Name : Radiation from Fukushima
* Algorithm : ALGEBRAIC sum of triangle & circle's intersection, Binary Search.
* Complexity : O(BS*n)
* Difficulty : Hard
*
* IUT Programming Contest ... |
/**
* Checks if ball hits bricks, updates score, and subtracts from brickTracker
* @param ball
* @param elapsedTime
*/
public void checkBrickCollision(Ball ball, double elapsedTime) {
Iterator<Brick> iter = bricksLevel.iterator();
while (iter.hasNext()) {
Brick brick = it... |
//---------------------------------------------------------------------------//
// Map a reference point to the physical space of an entity.
void POD_PointCloudLocalMap::mapToPhysicalFrame(
const Entity &entity,
const Teuchos::ArrayView<const double> &reference_point,
const Teuchos::ArrayView<double> &physi... |
import { locale as _locale } from './zh-CN'
export const locale: typeof _locale = {
title: 'Shanbay Word Syncing',
open: 'Open',
error: {
login: 'Shanbay login failed. Click to open shanbay.com.',
network:
'Unable to access shanbay.com. Please check your network connection.',
word:
"Unabl... |
<reponame>geovisto/geovisto-filters<filename>src/model/internal/filter/basic/MapFilterOperation.ts
// Geovisto core
import {
AbstractMapDomain
} from "geovisto";
import IMapFilterOperation from "../../../types/filter/IMapFilterOperation";
/**
* This class wraps a filter operation defined by constructor props.
*... |
<filename>test/_test_Animate_Preprocess.py
# -*- coding: utf-8 -*-
"""
Created on Sat May 1 23:49:09 2021
@author: Christian
"""
import numpy as np
import hysteresis.plotSpecial.animate as ani
import hysteresis as hys
import scipy
np.random.seed(101)
x = np.linspace(0, 1, 1001)*10
triangleBig = scipy.signal.sawtoo... |
The Centre on Tuesday told the Delhi high court that criminalising marital rape “may destabilise the institution of marriage” and would become an easy tool for harassing husbands, a position slammed as retrograde by rights activists.
Responding to a bunch of petitions seeking criminalisation of marital rape, the gover... |
<gh_stars>10-100
""" Implements functions that handle the serialization of types and classes.
Type handlers store and load objects of exactly that type. Instance handlers
work also work for subclasses of that type.
The instance handlers are processed in the order they are stored. This means
that if an object is... |
package com.se.entity;
public class ReportKey {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column REPORT.STUDENT_ID
*
* @mbg.generated Wed Oct 27 22:15:26 CST 2021
*/
private String studentId;
/**
*
* This field w... |
package storage
import (
"github.com/t-yuki/zipkin-go/models"
"github.com/t-yuki/zipkin-go/storage/mysql"
)
func Open() (Storage, error) {
stor, err := mysql.Open()
return stor, err
}
type Storage interface {
StoreSpans(spans models.ListOfSpans) error
Close() error
}
|
<filename>api/rx/zb_explicit.go
package rx
import (
"encoding/binary"
)
const (
zbExplicitAPIID byte = 0x91
zbeAddr64Offset = 0
zbeAddr16Offset = 8
zbeSrcEPOffset = 10
zbeDstEPOffset = 11
zbeClusterIDOffset = 12
zbeClusterIDLength = 2
zbeProfileIDOffset = 14
zbeProfileIDLength = 2
zbeOptions... |
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: Copyright 2019-2022 Heal Research
#ifndef OPERON_FORMAT_HPP
#define OPERON_FORMAT_HPP
#include <unordered_map>
#include "tree.hpp"
namespace Operon {
class Dataset;
class OPERON_EXPORT TreeFormatter {
static void FormatNode(Tree const& tree, std::unor... |
<gh_stars>1-10
from unicorn import *
from keystone import *
from capstone import *
from unicorn.x86_const import *
from binaryninja import *
def decrypt(bv, _address, _key, _len):
xor_key = Transform['XOR']
address = _address
key = _key
for i in range(_len):
enc_str = bv.read(address, 4)
decrypted_str = xor_ke... |
/** Jdbc implementation for {@link CodeStore} */
public class JdbcCodeStore implements CodeStore {
private final DataSource dataSource;
private final Logger log = Logger.getLogger("JdbcCodeStore");
@Inject
public JdbcCodeStore(DataSource dataSource) {
this.dataSource = dataSource;
}
@Override
publ... |
def save_binary_file(path: str, data: bytes):
return Path(path).write_bytes(data) |
s = input()
ans = 0
if len(s)==1:
if s.count("A")+s.count("G")+s.count("C")+s.count("T") == 1:
print(1)
exit()
for i in range(len(s)-1):
for j in range(i+1, len(s)+1):
x = s[i:j]
if x.count("A")+x.count("G")+x.count("C")+x.count("T") == len(x) and len(x) > ans:
an... |
<reponame>philipsorst/gitki.java
package net.dontdrinkandroot.gitki.wicket.page.file;
import net.dontdrinkandroot.gitki.model.FilePath;
import net.dontdrinkandroot.gitki.wicket.page.BrowsePage;
import net.dontdrinkandroot.gitki.wicket.util.PageParameterUtils;
import org.apache.wicket.model.IModel;
import org.apache.wi... |
// De l'image par une transfo affine d'un repere orthonorme
// au parametre ABC de l'ellipse passant par ce repere
void ImRON2ParmEllipse
(
REAL & A,
REAL & B,
REAL & C,
const Pt2dr & aV0,
const Pt2dr & aV1
)
{
ElMatrix<REAL> aMat(2,2);
SetCol(aMat,0,aV0);
SetCol(aMat,1... |
def mul(self, other):
if not (isinstance(other, Variable) or isinstance(other, LazyVariable)) or \
(isinstance(other, Variable) and other.numel() == 1):
from .constant_mul_lazy_variable import ConstantMulLazyVariable
return ConstantMulLazyVariable(self, other)
else... |
/** Invokes parseOutput. This will block until the end :-(*/
public void start() throws IOException {
program_start = new Date();
errThread.start();
parseOutput(br);
} |
/**
* Created by Roman Kontchakov on 02/12/2016.
*/
public class ExpressionParserTest {
private static final DBBooleanFunctionSymbol NOT = SQLTestingTools.DB_FS_FACTORY.getDBNot();
private static final QuotedIDFactory IDFAC;
private static final DBTypeFactory DB_TYPE_FACTORY;
private static final DB... |
def remove_old_objs(self):
for fb in self._fire_beams:
if fb.is_out()[1]:
self._fire_beams.remove(fb)
for co in self._coins:
if co.is_out()[1]:
self._coins.remove(co)
for ma in self._magnets:
if ma.is_out()[1]:
s... |
/**
* Save the classes similarity matrix.
* @param file The output file to which to save the similarity matrix.
*/
public void saveClassesMatrix(SimilarityMatrix matrix, String file) {
List<Node> sourceClassesList = sourceOntology.getClassesList();
List<Node> targetClassesList = targetOntology.getClassesList(... |
/*
* Return the data for the specified address, or NULL if not found.
*
* The result must be released with dvmReleaseRegisterMapLine().
*/
const u1* dvmRegisterMapGetLine(const RegisterMap* pMap, int addr)
{
int addrWidth, lineWidth;
u1 format = dvmRegisterMapGetFormat(pMap);
u2 numEntries = dvmRegister... |
/**
* Created by greatdreams on 11/8/15.
*/
public class SimpleResponseConsumer {
private RequestResponseApi request;
public void init() {
Timer timer = new Timer();
timer.scheduleAtFixedRate(new ConsoleResponder(request), 500l, 5000l);
}
public void setRequest(RequestResponseApi req... |
/**
* @file
* @copyright This code is licensed under the 3-clause BSD license.\n
* Copyright ETH Zurich, Laboratory for Physical Chemistry, Reiher Group.\n
* See LICENSE.txt for details.
*/
#include <Utils/Properties/Thermochemistry/ThermochemistryCalculator.h>
#include <pybind11/eigen.h>
#i... |
<filename>core/arch/arm/plat-imx/registers/imx7-iomux_regs.h
/* SPDX-License-Identifier: BSD-2-Clause */
/*
* Copyright 2017-2018 NXP
*
*/
#ifndef __MX7_IOMUX_REGS_H__
#define __MX7_IOMUX_REGS_H__
/*
* Macros definition
*/
#define IOMUX_GPRx_OFFSET(idx) (idx * 4)
/*
* DDR PHY control PD pins
* TrustZone Addre... |
def create(code, dictionary_data):
jsondata = flask.Response()
jsondata.headers["Content-Type"] = "application/json"
jsondata.status_code = code
jsondata.set_data(json.dumps(dictionary_data))
return jsondata |
// Uncomment these imports to begin using these cool features!
import { inject } from "@loopback/core";
import { CountSchema, Filter, Where } from "@loopback/repository";
import { get, getModelSchemaRef, param, post, requestBody, patch, getWhereSchemaFor } from "@loopback/rest";
import { authenticate, AuthenticationBi... |
import java.util.Scanner;
/*
* Vasya often uses public transport. The transport in the city is of
* two types: trolleys and buses. The city has n buses and m trolleys,
* the buses are numbered by integers from 1 to n, the trolleys are numbered
* by integers from 1 to m.
*
* Public transport is not ... |
package operations_test
import (
"bytes"
"context"
"crypto/md5" //nolint:gosec
"crypto/rand"
"fmt"
"testing"
"github.com/treeverse/lakefs/pkg/api"
"github.com/treeverse/lakefs/pkg/block"
"github.com/treeverse/lakefs/pkg/upload"
)
const (
bucketName = "test"
ObjectBlockSize = 1024 * 3
expensiveStrin... |
import * as core from '@actions/core'
import scraping from './scraping'
import fetch from 'node-fetch'
async function run(): Promise<void> {
let contents = new Array<string>()
const extract = new Array<string | undefined>()
try {
contents = await scraping('https://atcoder.jp/contests/')
for (let i = 0; i... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.ai.metricsadvisor;
import com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class CredentialsTests {
@... |
/*
* Reopen log is designed by sending sigusr1 to active workers and pending shutdown of them
*/
static void
rspamd_worker_usr1_handler (gint fd, short what, void *arg)
{
struct rspamd_worker_signal_handler *sigh =
(struct rspamd_worker_signal_handler *)arg;
rspamd_log_reopen (sigh->worker->srv->logger);
if (si... |
import {Component, EventEmitter, OnInit, Output} from '@angular/core';
import {AuthService} from '../api/client/auth/auth.service';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent implements OnInit {
@Output() attem... |
def fqn(self, fqn):
self._fqn = fqn |
/****************************************************/
/* This file is distributed under the */
/* University of Illinois/NCSA Open Source License. */
/* See LICENSE file in top directory for details. */
/* */
/* Copyright (c) 2016 FIGSiM developers ... |
n,a,b = map(int,input().split())
#制限なしで全ての花束の作り方
wa = pow(2, n, 10 ** 9 + 7) - 1
#a本の花束の作り方
#val1 = comb(n, a, exact=True)
#val2 = comb(n, b, exact = True)
x = 1
y = 1
for i in range(a):
x = (x * (n-i)) % (10 ** 9 + 7)
y = (y * (i+1)) % (10 ** 9 + 7)
val1 = (x * pow(y, 10 ** 9 + 7 - 2, 10 ** 9 + 7)) % (10 **... |
import torch
import torch.nn.functional as F
import torch.nn as nn
from learning.modules.downsample_map.downsample_res import DownsampleResidual
from learning.modules.blocks import DenseMlpBlock2
HIDDEN_SIZE = 64
downsample_factor = 2
class EgoMapToActionTriplet(nn.Module):
def __init__(self, map_channels=1, ma... |
def merge_k(arr_k: list):
if len(arr_k) == 1:
return arr_k[0]
mid = len(arr_k) // 2
arr1 = arr_k[:mid]
arr2 = arr_k[mid:]
arr1 = merge_k(arr1)
arr2 = merge_k(arr2)
merged = merge_2(arr1, arr2)
if (DEBUG):
print(f"arr1: {arr1}")
print(f"arr2: {arr2}")
print... |
/**
* In-game Score Label. Former {@code Score} class.
*/
public final class ScoreLabel extends VisTable implements Comparable<Long>, Disposable {
private final AtomicLong score;
private final AtomicLong tmp;
private final VisLabel lblScore;
private boolean bool;
private boolean valid;
priva... |
<gh_stars>1-10
package gov.med.va.innovations.domain;
import gov.med.va.innovations.service.EventManager;
import java.io.Serializable;
public abstract class VistaTO implements Serializable {
private static final long serialVersionUID = -7656569560070101993L;
private String errorMessage;
private boolean... |
Birefringence control for ion-exchanged channel waveguides at 1.55-μm wavelength
We show at 1.55 micrometer wavelength that the waveguide birefringence of ion-exchanged channel waveguides in glass can be broadly tuned by a potassium and silver double-ion- exchange. Two different potassium and silver double-ion- exchan... |
// Input queueid and jobname string
// Return jobid, jobstatus string and error only based on jenkins job status
func (mock *mock) GetJobIdAndStatus(queueid string, jobname string) (string, string, error) {
for _, job := range mock.jobs {
if job.name == jobname {
qid, err := strconv.ParseInt(queueid, 10, 0)
if... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uniltiranyu.examples.labyrinth.multeseo;
import uniltiranyu.examples.labyrinth.LabyrinthPercept;
import uniltiranyu.examples.labyrinth.LabyrinthUtil;
/**
*
* @author Jonatan
*/
public class MultiAgentLabyrin... |
/* Convert an int to four-byte integer number in GDS format.
*/
void print_int4 (int n)
{
PUTBYTE (n >> 24);
PUTBYTE (n >> 16);
PUTBYTE (n >> 8);
PUTBYTE (n);
} |
#include "pch.h"
#include "BirdObject.h"
BirdObject::BirdObject(VulkanCore* core)
:QuadObj(core)
{
Texture.reset(new VulkanTexture2D("assets/textures/flappyBird/bird.png", core));
SetScale(0.5);
}
BirdObject::~BirdObject()
{
}
void BirdObject::OnUpdate(float deltaTime)
{
}
|
Customizable FPGA-Based Hardware Accelerator for Standard Convolution Processes Empowered with Quantization Applied to LiDAR Data
In recent years there has been an increase in the number of research and developments in deep learning solutions for object detection applied to driverless vehicles. This application benefi... |
def _get(env: gym.Env) -> _MonitorEnv:
assert env, "env not set"
result = None
if isinstance(env, _MonitorEnv):
result = env
else:
if isinstance(env, gym.core.Wrapper):
result = _get(env.env)
return result |
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
class Package
{
private:
string sender_name;
string sender_address;
string sender_city;
string sender_state;
string sender_ZIP;
string recipient_name;
string recipient_address;
string recipient_city;
string recipient_state;
string... |
<gh_stars>1-10
/*====================================================================*
*
* menu.h -
*
*. Motley Tools by <NAME>
*: Published 2006 by <NAME> Associates Limited;
*; Licensed under the Internet Software Consortium License
*
*--------------------------------------------------------------------*... |
The Reform Alliance, headed by Lucinda Creighton, has taken a major step towards becoming a fully fledged political party by registering with the Standards in Public Office Commission (SIPO).
The Reform Alliance, headed by Lucinda Creighton, has taken a major step towards becoming a fully fledged political party by re... |
def fetch_token(
self, username: str = "", password: str = "", credentials_file_path: str = ""
) -> None:
if credentials_file_path == "":
if (username == "") or (password == ""):
raise AttributeError(f"both username and password should be given.")
else:
... |
package mbrtu
import (
"fmt"
"ckklearn.com/testmodbus/global"
)
// RtuParseResponse 解析从站返回报文
func RtuParseResponse(dst, src []byte, reqFunCode global.FunCode) (int, error) {
// `src[1]` 是读取的报文的功能码
switch src[1] {
case reqFunCode:
// 如果是读取,则写入读取到的数据,否则不写入
// `src[2]` 是读取的数据的字节长度
switch reqFunCode {
case ... |
// Checks if the `assert_invalid` message matches the expected one
fn matches_message_assert_invalid(expected: &str, actual: &str) -> bool {
actual.contains(expected)
// Waiting on https://github.com/WebAssembly/bulk-memory-operations/pull/137
// to propagate to WebAssembly/testsuite.
... |
<reponame>moducate/moducate
package cmd
import (
"github.com/moducate/moducate/internal/db"
"github.com/spf13/cobra"
)
// MakeMigrateCmd creates a new instance of the `moducate migrate` command. This
// command performs PostgreSQL database migrations.
func MakeMigrateCmd() *cobra.Command {
return &cobra.Command{
... |
/** Remove the stored choice from prefs. */
@VisibleForTesting
static void removePreviousSearchEngineType() {
SharedPreferencesManager.getInstance().removeKey(
ChromePreferenceKeys.SEARCH_ENGINE_CHOICE_DEFAULT_TYPE_BEFORE);
} |
/**
* Concatenates an iterator over iterators into one long iterator.
*
* @author Dan Klein
*/
public class ConcatenationIterator<E> implements Iterator<E> {
final Iterator<Iterator<E>> sourceIterators;
Iterator<E> currentIterator;
Iterator<E> lastIteratorToReturn;
public boolean hasNext() {
return cu... |
/**
* A GeoJSON object with the type "FeatureCollection" is a feature object which represents a
* collection of feature objects.
*
* @see <a href='geojson.org/geojson-spec.html#feature-collection-objects'>Official GeoJSON FeatureCollection Specifications</a>
* @since 1.0.0
*/
public class FeatureCollection extend... |
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq
def ri():
return int(input())
def rl():
return list(map(int, input().split()))
def yield_ones(n):
place = 0
while n:
n, r = divmod(n, 2)
if r:
yield place
place += 1
... |
Get the biggest daily news stories by email Subscribe Thank you for subscribing We have more newsletters Show me See our privacy notice Could not subscribe, try again later Invalid Email
Video Loading Video Unavailable Click to play Tap to play The video will start in 8 Cancel Play now
This intriguing footage capture... |
package goomg_test
import (
"bytes"
"context"
goomg "github.com/onionltd/go-omg"
"golang.org/x/crypto/openpgp"
"io/ioutil"
"net/http"
"net/http/httptest"
"testing"
"time"
)
func TestClient_GetCanaryMessage(t *testing.T) {
testServer := httptest.NewServer(http.HandlerFunc(func(res http.ResponseWriter, req *h... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.