content stringlengths 10 4.9M |
|---|
import numpy as np
import scipy
import pandas as pd
import plotly.express as px
def smoothen_fft_(lc, thresh=200):
# a low pass filter
lc_fft = np.fft.fft(lc)
lc_fft[thresh : len(lc) - thresh] = 0
lc_smooth = np.abs(np.fft.ifft(lc_fft))
return lc_smooth
def smoothening_ma(__x, __y, window_sz, sh... |
<reponame>dankocher/metamodern-ui<filename>src/components/Tag/Tag.interface.ts
export interface MetTagProps {
/**
* Additional component styles
*/
style?: object;
/**
* Additional component classes
*/
className?: string;
/**
* Font for component
*/
fontClass?: strin... |
<gh_stars>1-10
from unittest import TestCase
from unittest import TestSuite
from unittest import main
from unittest import makeSuite
from mwstools.parsers.notifications import Notification
class Dummy(object):
"""
Only used for test_notification_payload since there is not actually a payload to test.
"""
... |
def is_cmp_data_empty(cmp_data):
if not cmp_data:
return True
return not any([cmp_data.runIds,
cmp_data.runTag,
cmp_data.openReportsDate]) |
/* iprintf() prints out input prompts */
void iprintf( int i_inp_msg )
{
saverrno = printf( ca_inp_msg[i_inp_msg] );
fflush( stdout );
if (saverrno < 0)
usage( ERPRINT );
} |
#!/usr/bin/env python
import visvis as vv
import OpenGL.GL as gl
class CustomWobject(vv.Wobject):
""" Example Custom wobject.
This example is not optimal, it is just to illustrate how Wobject
can be subclassed.
"""
def __init__(self, parent):
vv.Wobject.__init__(self, parent)
... |
/**
* <p>Initialize our internal MessageResources bundle.</p>
*
* @throws ServletException if we cannot initialize these resources
* @throws UnavailableException if we cannot load resources
*/
protected void initInternal()
throws ServletException {
try {
interna... |
import { Status, Resolution, Resolvable } from './Resolver'
import { Segment, createPlaceholderSegment } from './Segments'
import {
NaviNode,
NodeMatcher,
NodeMatcherResult,
NaviNodeBase,
NodeMatcherOptions,
MaybeResolvableNode,
NaviNodeType,
} from './Node'
import { Env } from './Env'
export interface ... |
// Down pauses the configured Vagrant boxes.
func (o Distillery) Down() error {
var wg sync.WaitGroup
wg.Add(len(o.Recipes))
for _, recipe := range o.Recipes {
go o.DownRecipe(recipe, &wg)
}
wg.Wait()
return nil
} |
<filename>templates/react-ts-webpack-app-starter/src/todo-uifabric-context/components/TodoList.tsx
import { useContext } from 'react';
import { Stack } from 'office-ui-fabric-react';
import { TodoListItem } from './TodoListItem';
import { TodoContext } from '../TodoContext';
import * as React from 'react';
export cons... |
/**
* This method convert "string_util" to "stringUtil"
* @param targetString targetString
* @param posChar posChar
* @return String result
*/
public static String convertToCamelCase(String targetString, char posChar) {
StringBuffer result = new StringBuffer();
boolean nextUpper = false;
... |
/*=========================================================================
Program: Visualization Toolkit
Module: vtkClientSocket.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is... |
/**
* Check if services are connected
*
* @param services list of services
* @return true if all services of the list are connected
*/
public boolean isServiceConnected(RcsServiceName... services) {
for (RcsServiceName service : services) {
if (!mManagedServices.contains(ser... |
package com.eszop.ordersservice.test.orders;
import com.eszop.ordersservice.orders.domain.usecase.dto.OrderDto;
public class OrderDtoBuilder {
private Long buyerId = 1L;
private Long offerId = 1L;
private Long tierId = 1L;
private String description = "description";
public OrderDtoBuilder setBuy... |
(A–B) Hematoxylin and eosin (H/E)-stained fat tissues (arrows show multiloculated adipocytes), and (C) UCP1 positivity in iWAT from RD-fed male mice on Ad-lib or ITAD feeding for 4mo (n=3). (D) qPCR for brown and beige genes, (E) adipocyte/myogenic progenitor genes in stromal vascular fractions (SVF), and (F) mitochond... |
n = int(input())
hlp = []
for i in range(1, int(n ** 0.5) + 1):
if (n - i * i) % 2 == 0:
hlll = (n - i * i) // (i * 2) + ((n - i * i) % (i * 2) != 0)
hlp.append((i + hlll, i))
hlp.sort()
if len(hlp) == 0:
print(-1)
else:
st = hlp[0][1] + (n - hlp[0][1]**2) // (hlp[0][1] * 2)
p... |
<filename>src/routing/rectilinear/nudging/PathMerger.ts
/// Avoid a situation where two paths cross each other more than once. Remove self loops.
///
import {from, IEnumerable} from 'linq-to-typescript'
import {Point} from '../../../math/geometry/point'
// import {Assert} from '../../../utils/assert'
import {PointMap}... |
Elizabeth Warren (via Instagram) There have been two salient reactions to the news that Elizabeth Warren is trying to reintroduce Wall Street's nightmare legislation, Glass-Steagall. One is a big populist high-five, the other is complete and total indifference.
The first is Washington's reaction, the second is Wall St... |
/*
========================================================================
Routine Description:
Allocate dma-consistent buffer.
Arguments:
dev - the USB device
size - buffer size
dma - used to return DMA address of buffer
Return Value:
a buffer that may be used to perform DMA to the specified device
No... |
def after_move(self: Board, player: int, player_house: int) -> Board:
next_state: Board = Board(self)
starting_house: int = (player * 6) + player_house
seeds: int = next_state.houses[starting_house]
next_state.houses[starting_house] = 0
house_stack: List[int] = []
for hou... |
<filename>src/lib/util/rowing.ts
import { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from "./constant/keycode";
import { stopEvent } from "./event";
export interface IRowing<T = unknown> {
queryGroup (): T[];
rowToElement: ((elem: T) => void);
}
/**
* Rows to an element.
* @param element
* @param e
*/
expo... |
import unicodedata
import re
import urllib
_slugify_strip_re = re.compile(r'[^\w\s-]')
_slugify_hyphenate_re = re.compile(r'[-\s]+')
def slugify(value):
slug = unicode(_slugify_strip_re.sub('', normalize(value)).strip().lower())
slug = _slugify_hyphenate_re.sub('-', slug)
if not slug:
return quo... |
INTEGRATION OF MOBILE GIS AND LINKED DATA TECHNOLOGY FOR SPATIO-TEMPORAL TRANSPORT DATA MODEL
Linked Data is available data on the web in a standard format that is useful for content inspection and insights deriving from data through semantic queries. Querying and Exploring spatial and temporal features of various dat... |
def chunk_taste(self, length, dtypes) -> None:
try:
elem = next(self)
except StopIteration:
self.shape = Shape({DEFAUL_GROUP_NAME: (0, )})
self.dtypes = np.dtype([(DEFAUL_GROUP_NAME, None)])
self.dtype = None
else:
self.type_elem = type... |
/**
* Check to see if we should show the rationale for any of the permissions. If so, then display a dialog that
* explains what permissions we need for this app to work properly.
* <p>
* If we should not show the rationale, then just request the permissions.
*/
private void showPermissionRati... |
The LGBT issue is real, and people still find it hard to accept. A movie like Moonlight tries to bring it in the vanguard. In a neighborhood that roughhouses the quiet and the mute, where being gay is unacceptable to people, thrives the story of a little boy with hopeful eyes. He is yet to understand and wrap his head ... |
// ListConnectBoard return list connect board for current board
func (ds GitLabDataSource) ListConnectBoard(boardID string) ([]*models.Board, int, error) {
b := []*models.Board{}
boards, err := ds.db.LRange(fmt.Sprintf("boards:%s:connect", boardID), 0, 100).Result()
if err != nil {
return nil, 0, err
}
for _, bo... |
import { isMarkType, MarkType } from './components';
import type { NormalizedTextSpan } from 'pote-parse';
// fixme: only takes first
export function guessSpanType(span: NormalizedTextSpan): MarkType | undefined {
return span.marks
.map((e) => e.type)
.filter(isMarkType)
.pop();
}
export function getFir... |
/**
* Play or resume the Sound.
*
* # Example
* ```Rust
* let snd = Sound::new("path/to/the/sound.ogg").unwrap();
* snd.play();
* ```
*/
fn play(&mut self) -> () {
check_openal_context!(());
al::alSourcePlay(self.al_source);
match al::openal_has_error() {
... |
<gh_stars>0
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* 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
*... |
//Created by zhbinary on 2019-01-09.
//Email: <EMAIL>
package types
type ChannelHandlerContext interface {
ChannelInboundInvoker
ChannelOutboundInvoker
/**
* Return the {@link channel} which is bound to the {@link ChannelHandlerContext}.
*/
Channel() Channel
/**
* The unique name of the {@link ChannelHandle... |
def create():
import random, string
suggested_name = ''.join(random.choice(string.ascii_lowercase) for _ in range(4))
if session['su'] != 'Yes':
return abort(403)
if request.method == 'POST':
name = request.form['name']
template = request.form.get('template','debian')
arc... |
<filename>src/main/java/xyz/andrewkboyd/homedatahub/dto/SearchCriteria.java
package xyz.andrewkboyd.homedatahub.dto;
import lombok.Data;
import java.math.BigInteger;
import java.util.List;
public @Data
class SearchCriteria {
private BigInteger offset;
private long count;
private List<String> terms;
}
|
/*! ************************************
\brief Construct a SoundCardDescription
Constructor
***************************************/
Burger::SoundManager::SoundCardDescription::SoundCardDescription() :
m_DeviceName(),
m_uDevNumber(0),
m_b8Bit(FALSE),
m_b16Bit(FALSE),
m_bStereo(FALSE),
m_bHardwareAccelerated... |
Polygonal equalities and virtual degeneracy in $L_{p}$-spaces
Suppose $0<p \leq 2$ and that $(\Omega, \mu)$ is a measure space for which $L_{p}(\Omega, \mu)$ is at least two-dimensional. The central results of this paper provide a complete description of the subsets of $L_{p}(\Omega, \mu)$ that have strict $p$-negativ... |
/**
* Abstract calendar exception, to be implemented by more concrete exceptions thrown from our application.
* {@link org.folio.calendar.exception.NonspecificCalendarException NonspecificCalendarException} should be used for otherwise unknown errors (e.g. generic Exception or Spring-related exceptions).
*/
@ToStrin... |
from .breadthFirstTraversal import breadthFirstTraversal
from dataStructures.binarySearchTree.bst import BST
from pytest import fixture
@fixture
func newBst() {
return BST()
@fixture
func filledBst() {
return BST([4, 3, 2, 1, 8, 6, 12, 9])
@fixture
func leftBst() {
return BST(range(9, -9, -2))
@fix... |
/*++
Copyright (c) 1991-1999, Microsoft Corporation All rights reserved.
Module Name:
slitest.c
Abstract:
Test module for NLS API SetLocaleInfo.
NOTE: This code was simply hacked together quickly in order to
test the different code modules of the NLS component.
This... |
<filename>cargo/vendor/windows-sys-0.32.0/src/Windows/Win32/Networking/ActiveDirectory/mod.rs
#![allow(non_snake_case, non_camel_case_types, non_upper_case_globals, clashing_extern_declarations, clippy::all)]
#[link(name = "windows")]
extern "system" {
#[doc = "*Required features: 'Win32_Networking_ActiveDirectory'... |
<filename>src/app/java/pages/web/herokuapp/CheckboxesPage.java<gh_stars>1-10
package pages.web.herokuapp;
import core.web.selenium.BaseWebPage;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
public class CheckboxesPage extends BaseWebPage {
private final By checkBox1 = By.xpath("(//input[@ty... |
class Enumerations:
"""
Enumerations used in the context of the Swydo API.
"""
@unique
class UserState(Enum):
"""
State of a User.
"""
revoked = auto()
"""User is Revoked."""
pending = auto()
"""User is Pending."""
active = auto()
... |
<reponame>Dimanaux/spring-aop-sample<gh_stars>1-10
package app.handlers;
public interface Handler {
String respond(String query);
}
|
<reponame>KyleRogers/pitest<gh_stars>0
package org.pitest.mutationtest;
import java.io.Serializable;
import java.util.Objects;
import org.pitest.classinfo.ClassName;
import org.pitest.classinfo.HierarchicalClassId;
public class ClassHistory implements Serializable {
private static final long serialVersionUID = 1L... |
def log_episode_at_done(self):
if self.is_log_episode:
self.episode_video = self.episode_video.unsqueeze(0).unsqueeze(2)
self.tf_summary.add_video(
'{}/{}_{}'.format(
self.get_log_tag(),
'log_episode',
'video',
... |
<gh_stars>1000+
// Copyright (c) 1997
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL: https://gi... |
/**
* Gets the worldServer by the given dimension.
*/
public WorldServer worldServerForDimension(int dimension)
{
WorldServer ret = net.minecraftforge.common.DimensionManager.getWorld(dimension);
if (ret == null)
{
net.minecraftforge.common.DimensionManager.initDimensio... |
Charge carrier transport and electroluminescence in atomic layer deposited poly-GaN/c-Si heterojunction diodes
In this work, we study the charge carrier transport and electroluminescence (EL) in thin-film polycrystalline (poly-) GaN/c-Si heterojunction diodes realized using a plasma enhanced atomic layer deposition pr... |
Free market ideology, as represented in the nuanced ideas of Adam Smith or F.A. Hayek, has not outlived its purposefulness. Indeed, rejecting this ideology would be not just intellectually tragic. Rejection would be practically tragic, threatening the welfare and well-being of billions of people throughout the world.
... |
//! This module is concerned with finding methods that a given type provides.
//! For details about how this works in rustc, see the method lookup page in the
//! [rustc guide](https://rust-lang.github.io/rustc-guide/method-lookup.html)
//! and the corresponding code mostly in librustc_typeck/check/method/probe.rs.
use... |
Simultaneous transcatheter closure of ruptured sinus of Valsalva aneurysm and stent implantation for aortic coarctation
Ruptured sinus of Valsalva aneurysm is a rare anomaly and an associated coarctation of aorta is even rarer. A combination of such defects is traditionally treated surgically. The surgery is necessari... |
<filename>RenderEngine/src/main/java/Kurama/geometry/assimp/AssimpAnimLoader2.java
package Kurama.geometry.assimp;
import Kurama.Math.Matrix;
import Kurama.Math.Quaternion;
import Kurama.Math.Transformation;
import Kurama.Math.Vector;
import Kurama.Mesh.Material;
import Kurama.Mesh.Mesh;
import Kurama.game.Game;
impor... |
<filename>pkg/agentd/sreq/reattach.go
// Copyright 2019 <NAME>
//
// 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... |
<gh_stars>0
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MatTabGlobalComponent } from './mat-tab-global/mat-tab-global.component';
import { BodyWithoutHeaderComponent } from './body-without-header/body-without-header.component';
import { AngularPdfCompon... |
<filename>src/path.cpp
/*
* Copyright 2013 <NAME>
*
* This file is subject to the terms and conditions
* defined in file 'LICENSE.txt', which is part of this source
* code package.
*/
#include <urlcpp/path.h>
#define D(x)
using namespace std;
namespace url
{
void Path::merge(const Path& p)
{
D(cout ... |
// generates raw transaction from payload
// returns raw transaction + chainId + error (if any)
func (e *EthereumAdapter) createRawTransaction(payloadString string, backendLogger log.Logger) (*types.Transaction, *big.Int, error) {
var payload lib.EthereumRawTx
if err := json.Unmarshal([]byte(payloadString), &payload)... |
// NewSetAsyncCallStackDepthArgs initializes SetAsyncCallStackDepthArgs with the required arguments.
func NewSetAsyncCallStackDepthArgs(maxDepth int) *SetAsyncCallStackDepthArgs {
args := new(SetAsyncCallStackDepthArgs)
args.MaxDepth = maxDepth
return args
} |
from polygraphy.tools.base import *
from polygraphy.tools.registry import TOOL_REGISTRY
|
/**
* Strip any path or query parameters from the given URL, returning only host[:port].
*/
public static URL hostOnlyUrlFrom(URL url) {
checkArgumentNotNull(url, "url must not be null");
var urlSpec = url.getProtocol() + "://" + url.getAuthority();
return KiwiUrls.createUrlObject(urlS... |
<gh_stars>1-10
package com.less.tplayer.util;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.telephony.TelephonyManager;
import java.io.IOException;
import java.net.... |
// Lookup performs the search and returns the RBLResults.
func Lookup(ctx context.Context, rblList string, rawIP string) (*Result, error) {
ip := net.ParseIP(rawIP)
ip4 := ip.To4()
res, err := query(ctx, rblList, ip4)
if err != nil {
return nil, err
}
return res, nil
} |
<filename>src/templates/packages/back/o-auth/src/@apps/o-auth/refresh-token/domain/refresh-token.aggregate.ts
/* eslint-disable key-spacing */
import { LiteralObject } from '@nestjs/common';
import { AggregateRoot } from '@nestjs/cqrs';
import { Utils } from 'aurora-ts-core';
import {
RefreshTokenId,
RefreshTok... |
package br.com.juno.integration.api.services.request.document;
import br.com.juno.integration.api.services.request.BaseResourceRequest;
public final class DocumentListRequest extends BaseResourceRequest {
private static final long serialVersionUID = 3175598211179607287L;
}
|
def is_configured(self, project, **kwargs):
params = self.get_option
return bool(params('host', project) and params('port', project)) |
#include "guimod.h"
#include "credits.h"
#include "clickablelabel.h"
#include "qtu.cpp" // contains template function(s) so can't have normal header
#include "stylesheets.h"
#include "version.h"
#include <QApplication>
#include <QCheckBox>
#include <QDesktopServices>
#include <QFileDialog>
#include <QGroupBox>
#includ... |
package entity
import "github.com/sedyh/mizu/examples/tilemap/component"
// Tilemap size
type Construct struct {
component.Construct
}
|
<reponame>dolphingarlic/sketch-frontend
/*
* Copyright 2003 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies a... |
// NewGCPTokenManager creates a GCP object
func NewGCPTokenManager(saProject, defaultBroker string, saw *saw.AccountWarehouse) *GCP {
return &GCP{
saProject: saProject,
defaultBroker: defaultBroker,
saw: saw,
}
} |
/** Inline this ApplyExp if parameters are constant.
* @param proc the procedure bound to this.func.
* @return the constant result (as a QuoteExp) if inlining was possible;
* otherwise this ApplyExp.
* If applying proc throws an exception, print a warning on walker.messages.
*/
public final Expression ... |
import {Pointer} from './pointer'
import {apply} from './patch'
import {Operation, TestOperation, isDestructive, Diff, VoidableDiff, diffAny} from './diff'
export {Operation, TestOperation}
export type Patch = Operation[]
/**
Apply a 'application/json-patch+json'-type patch to an object.
`patch` *must* be an array ... |
// post submits a message to a backend service
// returns the response or encountered errors
func Post(serviceURL string, data []byte, header map[string]string) (h.HTTPResponse, error) {
client := &http.Client{Timeout: h.BackendRequestTimeout}
req, err := http.NewRequest(http.MethodPost, serviceURL, bytes.NewBuffer(d... |
def add_baseline_bias(self):
self.utilities[self.detailed_baseline_version.id] += 1.0e-10
logger.debug("Added baseline bias")
logger.debug(self.utilities.head()) |
/**
******************************************************************************
* @file STM32F10x_DSP_Lib/inc/stm32_dsp.h
* @author MCD Application Team
* @version V2.0.0
* @date 04/27/2009
* @brief This source file contains prototypes of DSP functions
**************************************... |
def tabs_to_df(tabs):
stackable = defaultdict(int)
for tab in tabs:
for item in tab['items']:
if 'stackSize' in item:
stackable[item['typeLine']] += item['stackSize']
return pandas.DataFrame(stackable.items(), columns=['item', 'count']) |
package org.aries.service.jaxws;
import java.util.Collection;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import javax.xml.ws.handler.MessageContext;
public class MessageContextImpl implements MessageContext {
private Map<String, Object> map = new ConcurrentHashMap<S... |
<reponame>1018-MattOberlies-CaliberMobile/caliber-mobile-backend<filename>src/functions/note/handlers/getNotesByBatchIdAndWeekOverallHandler.ts
/* eslint-disable prefer-destructuring */
/* eslint-disable dot-notation */
import 'source-map-support/register';
import type { ValidatedEventAPIGatewayProxyEvent } from '@lib... |
import { Command } from './interfaces';
const cliui = require('cliui');
export interface CommandWrapper extends Command {
name: string;
group: string;
path: string;
}
export type CommandsMap = Map<string, CommandWrapper>;
/**
* Function to create a loader instance, this allows the config to be injected
* @param... |
package linklist;
//TODO https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/
//删除链表的倒数第N个节点
public class LinkList19 {
public static void main(String[] args) {
ListNode n1 = new ListNode(1);
// ListNode n2 = new ListNode(2);
// ListNode n3 = new ListNode(3);
// ListNod... |
/**
* It is not clear what is the difference between aggregation and the previous version.
*/
public class ClickHouseSqlStatementWriter
extends BaseJdbcSqlStatementWriter
{
protected static final Logger log = Logger.get(ClickHouseSqlStatementWriter.class);
public ClickHouseSqlStatementWriter(JdbcPush... |
/**
* Created by Administrator on 2017/1/18.
*/
public class HomeFragment extends BaseMVPFragment<DiscoverPresenter> implements IDiscoverView {
@BindView(R.id.progressLayout)
ProgressLayout progressLayout;
@BindView(R.id.swipe)
SuperSwipeRefreshLayout swipe;
@BindView(R.id.rv_discover)
Recyc... |
// copied from minecraft's EnchantingTableBlockEntityRenderer
public void renderFancyBook(TableBlockEntity tableBlockEntity, float f, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) {
matrixStack.push();
matrixStack.translate(0.5D, 0.75D, 0.5D);
float g = (float)tableBlockEnt... |
<gh_stars>1000+
import sys
from goprocam import GoProCamera, constants
import ffmpeg
print("Run modprobe v4l2loopback device=1 video_nr=44 card_label=\"GoPro\" exclusive_caps=1")
input("Hit enter when done!")
gopro = GoProCamera.GoPro(ip_address=GoProCamera.GoPro.getWebcamIP(
sys.argv[1]), camera=constants.gpcontr... |
<gh_stars>0
from pathlib import Path
from internetarchive import download
|
// Implement this class
public class StoreApiImpl implements StoreApi {
public Single<ApiResponse<Void>> deleteOrder(String orderId) {
return Single.error(new ApiException("Not Implemented").setStatusCode(501));
}
public Single<ApiResponse<Map<String, Integer>>> getInventory() {
return Sing... |
<gh_stars>0
import gym
import numpy as np
import random
from math import pow
from math import sqrt
from math import exp
import pandas
import matplotlib.pyplot as plt
class QLearn:
def __init__(self, actions, epsilon, alpha, gamma):
# Defining Q table as dictionary,
# provides us to empt... |
'''
A Mongo-based server for use with dojox.data.JsonRestStore.
:copyright: <NAME> 2010
:license: BSD
'''
import tornado.httpserver
import tornado.ioloop
import tornado.web
from tornado.web import HTTPError
import pymongo
import bson.json_util
try:
import pymongo.objectid
except ImportError:
pass
import mongo_... |
async def update_page(self, message: discord.Message) -> None:
embed = await self.get_page()
await message.edit(embed=embed) |
/** see: commissioner_argcargv.hpp, constructor for the commissioner argc/argv parser */
ArgcArgv::ArgcArgv(int argc, char **argv)
{
mARGC = argc;
mARGV = argv;
mARGx = 1;
memset(&(mOpts[0]), 0, sizeof(mOpts));
} |
<gh_stars>0
// Package krakend registers a bloomfilter given a config and registers the service with consul.
package krakend
import (
"context"
"encoding/json"
"errors"
"github.com/devopsfaith/krakend/config"
"github.com/devopsfaith/krakend/logging"
"github.com/devopsfaith/bloomfilter"
bf_rpc "github.com/devop... |
<reponame>hmtool/parent<filename>hmtool-core/src/main/java/tech/mhuang/core/exception/ExceptionUtil.java
package tech.mhuang.core.exception;
import tech.mhuang.core.util.ObjectUtil;
/**
* 异常工具类
*
* @author mhuang
* @since 1.0.0
*/
public class ExceptionUtil {
/**
* 获得完整消息,包括异常名
*
* @param e 异... |
/**
* Opens the given input stream in which the XML file has to be read.
* It skips the beginning of the document with XML definition and a number of container tags
* (putting 1 as {@code skipDepth} corresponds to only skip the root element).
* If an input stream is already open, it closes it be... |
/**
* Tests information about local variables.
*
* @author Maros Sandor, Jan Jancura
*/
public class LocalVariablesTest extends NbTestCase {
private JPDASupport support;
private DebuggerManager dm = DebuggerManager.getDebuggerManager ();
private static final String CLASS_NAME =
"org.netbea... |
Remarriage in old age.
Although an increasing number of elders in the United States are remarrying, remarriage has been among the least researched and least known alternatives in old age. This paper explores some social, situational and personal factors associated with remarriage in old age, and focuses on role change... |
<gh_stars>1-10
/*========================================================================
VES --- VTK OpenGL ES Rendering Toolkit
http://www.kitware.com/ves
Copyright 2011 Kitware, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with t... |
Farai Chinomwe is one of the world’s most surprising marathon runners. His unusual running technique certainly brings him attention with loud shouts of “Hey Rasta Man!”, jeers and whistles as he runs past. Farai has run a number of short marathons and fun runs backwards but it was only when he ran the 56km two oceans m... |
// HeaderFactory.java
// $Id$
/*****************************************************************************
* The contents of this file are subject to the Ricoh Source Code Public
* License Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the... |
# AUTOGENERATED! DO NOT EDIT! File to edit: lambdasdk.ipynb (unless otherwise specified).
__all__ = ['InvocationType', 'Lambda']
# Cell
from dataclasses import dataclass
from dataclasses_json import dataclass_json
@dataclass_json
@dataclass
class InvocationType:
requestResponse = 'RequestResponse'
event = 'Event'... |
/**
* To find the ICAT SOAP web service irrespective of the container in use. It
* does this by trial and error.
*/
public class ICATGetter {
private static String[] suffices = new String[] { "ICATService/ICAT?wsdl", "icat/ICAT?wsdl" };
/**
* Provide access to an ICAT SOAP web service with the basic URL string... |
/**
* Tests the name space URIs of a newly created instance. They should have
* default values.
*/
@Test
public void testInitNameSpaces()
{
assertEquals("Wrong name space for beans",
JellyBeanBuilderFactory.NSURI_DI_BUILDER, builder
.getDiBuilderNam... |
def on_trial_error(self, iteration: int, trials: List["Trial"],
trial: "Trial", **info):
pass |
// Reconcile is part of the main kubernetes reconciliation loop which aims to
// move the current state of the cluster closer to the desired state.
//
// For more details, check Reconcile and its Result here:
// - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.11.0/pkg/reconcile
func (r *CertInjectionReconciler) ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.