content stringlengths 10 4.9M |
|---|
import { Tile } from "@akashic-extension/akashic-tile";
import { sampleScene3 } from "./sampleScene3";
var game = g.game;
export function sampleScene2() {
var scene = new g.Scene({
game: game,
assetIds: ["map", "frame", "right"]
});
scene.loaded.add(function() {
// background
var rect = new g.FilledRect({
... |
/**
* Observer class that register callback member functions.
*/
class ObserverClass {
public:
explicit ObserverClass(std::shared_ptr<DeviceSettingsManager>& manager);
~ObserverClass() = default;
void onAlarmVolumeRamp(const types::AlarmVolumeRampTypes& value);
void onWakewordConfirmation(const WakeWo... |
Further Studies on H∞Guaranteed Cost Computation by Means of Parameter-dependent Lyapunov Functions
The linear matrix inequality approach to compute H-infinity guaranteed costs by means of parameter dependent Lyapunov functions is further studied in this paper. This can be regarded as an extension of the previou... |
//! Determine if two directories have different contents.
//!
//! For now, only one function exists: are they different, or not? In the future,
//! more functionality to actually determine the difference may be added.
//!
//! # Examples
//!
//! ```no_run
//! extern crate dir_diff;
//!
//! assert!(dir_diff::is_different... |
/*
* A keyboard layout for the gridded planck.
*
* Copyright (C) 2017 <NAME>
*
* 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 the Free Software Foundation; either version 2
* of the License, or (at your option) any ... |
package main
import (
"encoding/base64"
"fmt"
"os"
"path/filepath"
"strings"
)
func Error(format string, a ...interface{}) {
fmt.Fprintf(os.Stderr, format, a...)
}
func print_url_blank() {
base_url := get_base_url()
if base_url == nil {
return
}
fmt.Printf("%s\n", base_url.String())
}
func print_url() {... |
<filename>src/Page/Soltys.Page/ClientApp/src/cv/Picture.tsx
import React from 'react';
const Picture = () => {
return (
<div className="pic-box">
<a href="https://www.gravatar.com/avatar/34b3ce730aa7e53b7e6aaf47e964d3b0.jpg?s=720">
<img src="https://www.gravatar.com/avatar/34b3ce... |
// CreateTeam creates a new team, an error means the ID is taken.
func (mm *MutMap) CreateTeam(teamID string) (server.Team, error) {
mm.mutex.Lock()
defer mm.mutex.Unlock()
team, ok := mm.teams[teamID]
if ok {
return team, errors.New("exists")
}
team.ID = teamID
mm.teams[teamID] = team
if mm.onNewTeam != nil ... |
The New American Encounter with International Human Rights Norms: The Road After Abu Ghraib
In this research, I paint a canvas of how international human rights norms have entered American civil society-governmental contests over torture and detainee rights policies after Abu Ghraib and assess the extent to which effo... |
<reponame>dropbox/changes-artifacts<gh_stars>1-10
// generated by stringer -type=ArtifactState; DO NOT EDIT
package model
import "fmt"
const _ArtifactState_name = "UNKNOWN_ARTIFACT_STATEERRORAPPENDINGAPPEND_COMPLETEWAITING_FOR_UPLOADUPLOADINGUPLOADEDDEADLINE_EXCEEDEDCLOSED_WITHOUT_DATA"
var _ArtifactState_index = [... |
<filename>ext/stub/internalinterfaces.zep.h
extern zend_class_entry *stub_internalinterfaces_ce;
ZEPHIR_INIT_CLASS(Stub_InternalInterfaces);
PHP_METHOD(Stub_InternalInterfaces, count);
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_stub_internalinterfaces_count, 0, 0, IS_LONG, 0)
ZEND_END_ARG_INFO()
ZEPHIR_INIT_F... |
/**
* This class represents data returned by ESP32 relay switch on getting current device status. It is used for data
* serialization.
* @see <a href="https://github.com/kyberpunk/esp-relay-switch">https://github.com/kyberpunk/esp-relay-switch</a>
*/
@Data
public class DeviceInfo {
/**
* ID of the device. ... |
/**
* search a meeting by username and title
* @param uesrName the sponsor's userName
* @param title the meeting's title
* @return a meeting list result
*/
func QuitMeeting(username string, title string) bool {
flag :=entity.QueryMeeting(func (m *entity.Meeting) bool {
return m.GetTitle() == title && m.IsPartic... |
/**
* @brief Initializes the DMA control data structure according to the specified
* parameters.
* @param DMA_ctrl_data_ptr: pointer to a DMA_CtrlDataInitTypeDef structure that
* contains the control data structure to initialize
* @param DMA_ctrl_table_ptr: pointer to a DMA_CtrlDataTyp... |
Autonomous drone race: A computationally efficient vision-based navigation and control strategy
Drone racing is becoming a popular sport where human pilots have to control their drones to fly at high speed through complex environments and pass a number of gates in a pre-defined sequence. In this paper, we develop an a... |
from modules.world import World, Landmark, Map, Goal
from modules.grid_map_2d import GridMap2D
from modules.robot import IdealRobot
from modules.sensor import IdealCamera, Camera
from modules.agent import Agent, EstimationAgent, GradientAgent
from modules.gradient_pfc import GradientPfc
from modules.mcl import Particle... |
// Add adds an identifier to the namespace. If the name is already taken,
// an error is returned.
func (ns Namespace) Add(id string) error {
if ns[id] {
return fmt.Errorf("identifier redeclared: %v", id)
}
ns[id] = true
return nil
} |
/** editable property representing a primitive that is directly editable */
class EditablePrimitiveProperty extends EditableProperty {
/** property's units */
final private String UNITS;
/** Constructor */
protected EditablePrimitiveProperty( final String pathPrefix, final Object target, final PropertyDescriptor ... |
<gh_stars>1-10
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Nbdkit(AutotoolsPackage):
"""NBD(Network Block Device) is a protocol for ac... |
def _set_commands(click_group: click.core.Group):
config_path = _get_config_path()
config = ConfigParser.from_files(config_path)
option_names = config.options('fetchme')
for i in option_names:
func = _get_command_func(i, config)
click_group.command(name=i)(click.pass_context(func)) |
<filename>.scannerwork/css-bundle/node_modules/micromark/lib/parse.d.ts
import {ParseOptions, Parser} from './shared-types'
declare function createParser(options?: ParseOptions): Parser
export default createParser
|
def read_string(self, length_format):
length = self.read(length_format)
bs = self.read_farray('s', length)[0]
return bs.decode('utf_8') |
/**
* An attribute modifier specifically for body tags.
* <p>
* Panels have associated markup files and if they contain <code><wicket:head></code> and
* <code><body onLoad="..."></code> then the body's <code>onLoad</code> attribute will be
* appended to the page's onLoad attribute. That accretion happe... |
Effects of Red Mud Addition in the Microstructure, Durability and Mechanical Performance of Cement Mortars
Recently, there has been a great effort to incorporate industrial waste into cement-based materials to reach a more sustainable cement industry. In this regard, the Bayer process of obtaining alumina from bauxite... |
/*
* Copyright (c) "Neo4j"
* Neo4j Sweden AB [http://neo4j.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your... |
def load_yaml(filename):
def parse_value(value):
if "#" in value:
value = value[:value.index("#")]
value = value.strip(" \n")
if not value:
return None
if value.lower() == "true":
return True
if value.lower() == "false":
return ... |
Socio-economic status in fl uences the relationship between obesity and antenatal depression: Data from a prospective cohort study of Disorders
Background: Obesity has been associated with increased risk of antenatal depression, but little is known about this relationship. This study tested whether socio-economic statu... |
import unittest
from metaci.users.models import User
class TestUser(unittest.TestCase):
def setUp(self):
self.user = User(username="testuser")
def test__str__(self):
self.assertEqual(
self.user.__str__(),
"testuser",
)
def test_get_absolute_url(self):
... |
import { FormlyFieldConfig } from '@ngx-formly/core';
import { textField } from './text.field';
import { cityField, countryField, stateField, zipCodeField } from './text.additional.field';
import { flexLayoutWrapper } from '../../wrapper/wrapper';
import { FieldConfig } from '../../field';
import { repeatArrayField } f... |
def script_batch_masking(config):
core.error.ifas_info("Running the batch script for all mask scripts. "
"All mask scripts will be run according to the "
"configuration file.")
if (len(core.config.extract_configuration(
config_object=config, keys=['mask_... |
/**
* Removes a team category.<br>
* <b>Warning:</b> Removes all the teams in the category.
* @param tcId id of the removed team category
*/
public void removeTeamCategory(int tcId) {
TeamCategory cat = teamCategories.remove(tcId);
for(Team t : cat.getAllTeams()) {
t.removeAllContestants();
}
teams.r... |
Nanometer Interconnect Test Structure for Modeling of Process Variation
With the interconnection density and doubling the number of layers in VLSI, Interconnect line width,pitch,and the thickness of the dielectric layer will changed within the same chip caused by the process variation. and the interconnect parasitics ... |
import pygame
from math import sqrt
from random import randint
class Box:
SPEED = 10
def __init__(self, pos_offsets: dict, square_length: int, color: tuple, surface: pygame.Surface, debug=False):
self.pos_offsets = pos_offsets
self.length = square_length
self.tile_num = int(sqrt(len(po... |
def show_ui_console(self, show):
p_geo = GXContext._get_tls_geo()
return p_geo.show_ui_console(show) |
<gh_stars>0
package com.example.conor.a1rmtracker;
import android.content.ContentValues;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenH... |
def durationSeconds(self):
f=0.0
if self.isVideo() or self.isAudio():
if self.__dict__['duration']:
try:
f=float(self.__dict__['duration'])
except Exception as e:
print "None numeric duration"
return f |
<gh_stars>1-10
package com.pj.squashrestapp.dto;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
/** */
@Getter
public class XpPointsForTable {
private final String type;
private final String split;
private final int numberOfPlayers;
private final List<XpPointsDto> xpPoints;
publi... |
/**
* Distributed lock depends on File system.
* Usage:
* <code>
* Lock lock = Watcher.getInstance().acquire();
* ...
* try {
* if (lock != null) {
* lock.lock();
*
* // TODO
* logger.info(Thread.currentThread().getName() + " is selling #" + (tickets--) + " with Lock#" + lock.id());
* }
* } catch (Appl... |
These women love to get high.
In the ’70s, it was Avon parties, in the ’80s, Tupperware...then book clubs in the ’90s and wine parties in the 2000s. And now, in the new age of marijuana legalization sweeping the United States, women of all ages, races, and religions are getting together and getting high.
Queens of th... |
<reponame>AlanDuong07/slicedadviceprototype
import nc from 'next-connect'
import dbConnect from '../../../config/dbConnect';
import { getSingleExpertisePost, updateSingleExpertisePost, deleteSingleExpertisePost } from '../../../controllers/expertisePostControllers'
import onError from '../../../middlewares/errors'
con... |
/*
* thread_hold:
*
* Suspend execution of the specified thread.
* This is a recursive-style suspension of the thread, a count of
* suspends is maintained.
*/
void thread_hold(
register thread_t thread)
{
spl_t s;
s = splsched();
thread_lock(thread);
thread->suspend_count++;
thread->state |= TH_SUSP;
thr... |
from common_tasks import print_error, set_data_mysql, get_device_id, check_ip, get_data
import re
# Workflows
from int_down import interface_down_check
def parse_message(message):
"""
Author - <NAME>
Function - Takes in a message and runs checks for each message
Inputs - message - String
returns... |
<reponame>jugrinovskiy/spark-design-system
import { storyWrapper } from '../../../../../../.storybook/helpers/storyWrapper';
import { SprkTabsModule } from './sprk-tabs.module';
import { SprkTabsPanelModule } from '../../directives/sprk-tabs/sprk-tabs-panel/sprk-tabs-panel.module';
import { SprkTabsButtonModule } from ... |
package cmd
import (
"github.com/dictyBase-docker/github-actions/internal/app/chart"
"github.com/urfave/cli"
)
func DeployChartCmd() cli.Command {
return cli.Command{
Name: "deploy-chart",
Usage: "deploy helm chart",
Aliases: []string{"dc"},
Action: chart.DeployChart,
Flags: []cli.Flag{
cli.Stri... |
/**
* Returns the type of the innermost enclosing instance, or null if there is none. This is the
* same as {@link DeclaredType#getEnclosingType()} except that it returns null rather than
* NoType for a static type. We need this because of
* <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=508... |
# Vasya_and_Socks.py
a,b = map(int,input().split())
adder,temp,ans = 0,a,a
while(temp!=0):
temp = int(ans//b)
temp = temp-adder
ans = ans + temp
adder = adder +temp
print(ans) |
import { Model } from './model';
import { Categoria } from './categoria';
import { Servico } from './servico';
import { Produto } from './produto';
export class TabelaPreco extends Model {
nome: string;
ativo: boolean;
itens: ItemTabelaPreco[];
servico: Servico;
}
export class ItemTabelaPreco {
... |
<gh_stars>0
package it.unisannio.studenti.franco.raffaele.communityandroidclient;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import ... |
Cannabis legalization is emerging at a time when consumers expect more from retail. The impact of online shopping has resulted in everyone from tiny boutiques to traditional retail establishments understanding that customers want to be lured by a pleasant shopping experience.
Whether a cannabis store is opening in a f... |
from django.test import Client
import json
client = Client()
def test_react_url() -> None:
response = client.get('')
assert response.status_code == 200
assert 'React will load' in response.content.decode()
def test_existing_user() -> None:
response = client.post(
'/predict/', dict(platform=... |
export const flatten = <T>(array: T[]) => ([] as T[]).concat(...array)
export const random = (min: number, max: number) =>
Math.floor(Math.random() * (max - min) + min)
export const range = (start: number, end: number) =>
Array.from(' '.repeat(end - start), (_, index) => start + index)
export const shuffle = <T>... |
Showdown in Arkansas over “Ad Orientem”
EVERAL PEOPLE have sent me copies of a letter dated 14 July 2016. This shocking letter—sent to all priests and deacons in Little Rock by BISHOP ANTHONY B. TAYLOR—orders that Mass “will always be celebrated facing the people in our diocese.”
When the 2000 (2002) Missal was promu... |
/*
EncodeErrorRequest will extract the string message from the request error and add it to the body
*/
func EncodeErrorRequest(_ context.Context, r *http.Request, request interface{}) error {
req := request.(error)
r.Body = ioutil.NopCloser(bytes.NewReader([]byte(req.Error())))
return nil
} |
"""
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 may not use this ... |
package com.example.springtrial.simple;
import org.springframework.stereotype.Component;
@Component
public class FactoryObject {
/**
* applicationContext defines that to create instance of
* FactoryGeneratedObject<br/>
* It has to call this {@link FactoryObject#generateFactoryGeneratedObject} method.<br/><br/... |
import { Meteor } from 'meteor/meteor';
import { Wishlist} from '../../../both/collections/wishlist.collections';
Meteor.publish('wishlist', () => Wishlist.find()); |
use super::{Material, Shape};
use crate::{Matrix4x4, Point, Vector};
use std::f64::consts::PI;
fn round(v: f64) -> f64 {
const SIG_FIGS: f64 = 100000.0;
(v * SIG_FIGS).round() / SIG_FIGS
}
#[test]
fn the_normal_on_different_axis() {
let s = Shape::default();
let n1 = s.normal_at(Point::new(1.0, 0.0, 0... |
/**
* <p>Base class for JBoss WildFly security management that uses the administration Java API for managing the command line interface.</p>
* <p>Based on JBoss WildFly administration API & Util classes.</p>
*/
public abstract class BaseWildflyCLIManager {
protected static final String DEFAULT_HOST = "localhost... |
<filename>src/test/script_standard_tests.cpp
//此源码被清华学神尹成大魔王专业翻译分析并修改
//尹成QQ77025077
//尹成微信18510341407
//尹成所在QQ群721929980
//尹成邮箱 <EMAIL>
//尹成毕业于清华大学,微软区块链领域全球最有价值专家
//https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
//版权所有(c)2017-2018比特币核心开发商
//根据MIT软件许可证分发,请参见随附的
//文件复制或http://www.opensource.org/licenses/mit-lic... |
#include "help.h"
/**************************************************************************************************************/
/*Constructs the Help object*/
Help::Help(StateManager * inStateManager, SDL_Renderer* inRenderer, int inWidth, int inHeight)
: State(inStateManager, inRenderer, inWidth, inHeight)
{
/*... |
<reponame>dornerworks/camkes<filename>apps/aeroplage/components/Switch/switch.c
/*
* Copyright 2017, Data61
* Commonwealth Scientific and Industrial Research Organisation (CSIRO)
* ABN 41 687 119 230.
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that... |
// PostNewOutfit saves a new outfit into database
func PostNewOutfit(request *http.Request, userID string) {
outfit, err := model.NewOutfitForm(request.R())
if err != nil {
request.BadRequest(err.Error())
return
}
outfit.ID = uuid.Must(uuid.NewV4()).String()
outfit.UserID = userID
outfit.CreatedAt = time.Now(... |
Unicystic ameloblastoma- A case report
It is the most common benign tumor that can be seen significantly. It is common odontogenic tumor involving the molar ramus area. As this tumor shows some similarities with dentigerous cysts, both clinically and radiographically the biologic behaviour of this tumor group was revi... |
<filename>scripts/cognito/scenarios/adminResetUserPassword.scenario.ts
import assert from "assert";
import AWS from "aws-sdk";
import {
createUserPoolClient,
randomUsername,
} from "../utils";
import { Scenario } from "./scenario";
const cognito = new AWS.CognitoIdentityServiceProvider();
const scenario: Scenario... |
<filename>dtc.go
package phash
// copy pasta from https://ironchef-team21.googlecode.com/git-history/75856e07bb89645d0e56820d6e79f8219a06bfb7/ironchef_team21/src/ImagePHash.java
import (
"image"
"math"
"sort"
"github.com/disintegration/imaging"
)
var (
dtcSizeBig = 32
dtcSize = 8
)
// DTC computes percept... |
// SignData implements the KeyManager RPC of the same name.
func (m *Base) SignData(ctx context.Context, req *keymanagerv0.SignDataRequest) (*keymanagerv0.SignDataResponse, error) {
if req.KeyId == "" {
return nil, status.Error(codes.InvalidArgument, "key id is required")
}
if req.SignerOpts == nil {
return nil,... |
def densityFactor(self, value):
if value<130:
densfactor=0
elif value>=130 and value<=199:
densfactor=1
elif value>199 and value<=299:
densfactor=2
elif value>299 and value<=399:
densfactor=3
else:
densfactor=4
r... |
/*
* Copyright 2014-2015 Groupon, Inc
* Copyright 2014-2015 The Billing Project, LLC
*
* The Billing Project licenses this file to you 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... |
import * as AWS from 'aws-sdk'
import { DocumentClient } from 'aws-sdk/lib/dynamodb/document_client'
import { NoSQLDatabase } from './NoSQLDatabase'
import { NotImplementedErr } from '../../error/Error'
import { Misc } from '../../collections/Misc'
export class AwsDynamodb<T extends { id: string }> implements NoSQLDat... |
Effects of Effective-Mass Hamiltonian Forms on Valence Band Structures of Quantum Wells
Calculations have been made of the valence band structures of two typical quantum well films, GaAs/Al0.3Ga0.7As and In0.53Ga0.47As/InP, using two kinds of effective-mass Hamiltonian forms (characterized by β=0 and β=-1). While the ... |
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
int n;cin>>n;
vector<int> v;
for(int i=1;i<=n;i++){
int tmp;scanf("%d",&tmp);v.push_back(tmp);
}
sort(v.begin(),v.end());
set<int> st;
int l=0;
for(int i=0;i<v.size();i++){
if(v[... |
<reponame>pkgcraft/pkgcraft
use scallop::builtins::{output_error_func, Builtin, ExecStatus};
use scallop::variables::string_value;
use scallop::{source, Error, Result};
static LONG_DOC: &str = "\
Export stub functions that call the eclass's functions, thereby making them default.
For example, if ECLASS=base and `EXPOR... |
# Copyright (c) OpenMMLab. All rights reserved.
import torch
from mmcv.parallel import MMDataParallel
from .scatter_gather import scatter_kwargs
class MLUDataParallel(MMDataParallel):
"""The MLUDataParallel module that supports DataContainer.
MLUDataParallel is a class inherited from MMDataParall, which su... |
// CancelOrder closes an open order.
func (c *Client) CancelOrder(orderId Id) (*CancelOrderResponse, error) {
urlStr := fmt.Sprintf("/v1/accounts/%d/orders/%d", c.accountId, orderId)
cor := CancelOrderResponse{}
if err := requestAndDecode(c, "DELETE", urlStr, nil, &cor); err != nil {
return nil, err
}
return &co... |
class ChameleonCard:
"""Chameleon (fire, instant) - one point, is counted as an appropriate animal in further instant effects"""
def __init__(self):
self.element = 'Fire'
self.type = 'instant'
def __repr__(self):
return "Chameleon"
def get_instant_points(self, p_totems, x, y):... |
import React, {FormEvent, useEffect, useState} from "react";
import {
Button,
Checkbox,
Container,
Dropdown,
Form,
Header,
Message,
Rating,
RatingProps,
TextArea
} from "semantic-ui-react";
import {Book, RootState} from "./types";
import {connect, ConnectedProps} from "react-redux";
import {login} f... |
// Meta sets the Meta for the Grant request.
func (b *grantBuilder) Meta(meta map[string]interface{}) *grantBuilder {
b.opts.Meta = meta
return b
} |
//*******************************************************************************
//
// Methods for Converting Options into strings
//
//*******************************************************************************
Status Configurable::GetOptionString(const ConfigOptions& config_options,
... |
// mergeTem merges a single template file using tem format and the passed in variables
func (t *TemplMerger) mergeTem(tem []byte, env Envar) ([]byte, error) {
content := string(tem)
vars := t.regex.FindAll(tem, -1)
for _, v := range vars {
defValue := ""
vname := strings.TrimSuffix(strings.TrimPrefix(string(v), ... |
// First return the first item in the slice
func (nas NodeAccounts) First() NodeAccount {
if len(nas) > 0 {
return nas[0]
}
return NodeAccount{}
} |
async def remove(self, ctx, member: discord.Member):
rc = cf_common.user_db.remove_handle(member.id, ctx.guild.id)
if not rc:
raise HandleCogError(f'Handle for {member.mention} not found in database')
await self.update_member_rank_role(member, role_to_assign=None,
... |
<gh_stars>0
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup -----------------------------------------------------------... |
/**
* %clear selected macro sets either globally or in contexts
*/
static void do_clear(enum clear_what what, bool context)
{
if (context) {
if (what & CLEAR_ALLDEFINE) {
Context *ctx;
list_for_each(ctx, cstk)
clear_smacro_table(&ctx->localmac, what);
}
... |
/**
* Manages the lifecycle of a feed surface represented by {@link FeedSurfaceCoordinator} associated
* with an Activity.
*/
public class FeedSurfaceLifecycleManager implements ApplicationStatus.ActivityStateListener {
/** The different states that the Stream can be in its lifecycle. */
// TODO(chili): Clea... |
/**
* @author Heiko Braun
*/
@RunWith(Arquillian.class)
public class OpenshiftIT {
@RouteURL("${app.name}")
private URL url;
@Before
public void setup() throws Exception {
await().atMost(5, TimeUnit.MINUTES).until(() -> {
try {
return get(url).getStatusCode() == 2... |
# Copyright (c) OpenMMLab. All rights reserved.
import argparse
import logging
from mmdeploy.apis.snpe import from_onnx
from mmdeploy.utils import get_root_logger
def parse_args():
parser = argparse.ArgumentParser(
description='Convert ONNX to snpe dlc format.')
parser.add_argument('onnx_path', help=... |
/**
* Receives server's answer, 0x03 followed by 1536 bytes from previous step followed by 1536 random bytes from server
* @throws IOException
*/
public void receiveAnswer ( ) throws IOException
{
try
{
int bytes = socket.read( replyBuffer );
if ( bytes == -1 ) throw new IOException( "Disconnected at ... |
/**
* Provides cached access to XML and XSL data.
Events
Cache instances publish two types of events for every operation that modifies the contents of the cache. The
schemas of the two event types are
subject - Cache.CHANGE
id or ids - the ID or array of IDs of the modified documents
actio... |
# Neural Abstractions
# Copyright (c) 2022 Alessandro Abate, Alec Edwards, Mirco Giacobbe
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import unittest
import torc... |
<reponame>saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS-<filename>gym-project/src/app/CreateUsers/app.UserRegistration.component.ts
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { DatePipe } from '@angular/common';
import { UserModel } from './Models/app.UserM... |
import { ErrorCallback, OpenOptions, SerialPortStream } from '@serialport/stream'
import { MockBinding, MockBindingInterface } from '@serialport/binding-mock'
export type SerialPortMockOpenOptions = Omit<OpenOptions<MockBindingInterface>, 'binding'>
export class SerialPortMock extends SerialPortStream<MockBindingInte... |
import React from 'react'
import { Header } from '../../components/common'
import { observer } from 'mobx-react'
import RemoteBooksList from './RemoteShelve'
import { AddBookButton } from './common'
import LocalBooksList from './LocalShelve'
import SwipeableViews from 'react-swipeable-views'
import { useTheme } from '@... |
<reponame>vagase/chat-bot-hub<filename>server/web/auth.go
package web
import (
"encoding/json"
"fmt"
"net/http"
"time"
"github.com/dgrijalva/jwt-go"
"github.com/gorilla/context"
"github.com/gorilla/sessions"
"github.com/hawkwithwind/chat-bot-hub/server/dbx"
"github.com/hawkwithwind/chat-bot-hub/server/utils... |
def make_model(n_size, n_output, n_embedding, n_vocab):
model = Sequential()
model.add(Embedding(n_vocab, n_embedding, mask_zero=True))
model.add(LSTM(n_size))
model.add(Dense(n_output))
model.add(Activation('softmax'))
model.compile(loss='categorical_crossentropy',
optimizer='... |
Monday was chicken nugget day in the cafeteria at Tennessee’s Farragut High School.
“You can’t go wrong with nugget day at high school,” senior Carson Koller told me. “The nuggets were great.”
Click here to join Todd’s American Dispatch: a must-read for Conservatives!
Carson, an Eagle Scout, was so hungry he got six... |
/**
* Test that the parser handles the case that build tag is specified but empty and if the build tag is
* specified but does not start with a number
*/
@Test
public void buildTagException()
{
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> Pyp... |
/**
* Configure {@link Docket}
* <p>
* The base package value:
* default value is {@link AutoConfigurationPackages#get} is used
*
* @return The {@link Docket} instance
*/
@Bean
public Docket docket() {
String basePackage = swaggerProperties.getBasePackage();
if (St... |
def loads(text, allow_multiple=True):
g = GlycoCTXML.loads(text)
first = next(g)
if not allow_multiple:
return first
second = None
try:
second = next(g)
collection = [first, second]
collection.extend(g)
return collection
except StopIteration:
retur... |
/**
* @author <a href="mailto:nmaurer@redhat.com">Norman Maurer</a>
*/
public class BootstrapClientWithOptionsAndAttrs {
public void bootstrap() {
final AttributeKey<Integer> id = new AttributeKey<Integer>("ID");
Bootstrap bootstrap = new Bootstrap();
bootstrap.group(new NioEventLoopGroup... |
def __VGG_Conv2DBlock(self, depth, kernelshape, activation, padding, channel_pos, x, conv_amount=3, inp_shape=None):
bn_axis = 3
if inp_shape == None:
x = Conv2D(depth, kernel_size=kernelshape, padding=padding, data_format=channel_pos)(x)
else:
x = Conv2D(depth, kernel_si... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.