content stringlengths 10 4.9M |
|---|
/**
* Implementation of method to draw marker on the map.
*/
public void draw(PGraphics pg, float x, float y) {
pg.pushStyle();
Float h = 5.0f;
Float b = (float) Math.sqrt(3) * h;
pg.fill(255, 0, 0, 100);
pg.triangle(x, y - 0.66f * h, x - 0.5f * b, y + 0.33f * h, x + 0.5f * b, y + 0.33f * h);
pg.popStyl... |
<reponame>johngreyland262/Stealth
// Copyright (c) 2019 2020 The Stealth Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef _EXPLOREDESTINATION_H_
#define _EXPLOREDESTINATION_H_ 1
#include "serialize.h"
#in... |
/**
* Leaf node of scanning tree that allows global menu to be shown. TODO: Consider removing
* suppression and overriding hashCode()
*/
@SuppressWarnings("EqualsHashCode")
public class ShowGlobalMenuNode extends OverlayActionNode {
public ShowGlobalMenuNode(OverlayController overlayController) {
super(overla... |
The Manyas fault zone (southern Marmara region, NW Turkey): active tectonics and paleoseismology
The Manyas fault zone (MFZ) is a splay fault of the Yenice Gönen Fault, which is located on the southern branch of the North Anatolian Fault System. The MFZ is a 38 km long, WNW–ESE-trending and normal fault zone comprised... |
<reponame>FedorUporov/gridgain
/*
* Copyright 2019 GridGain Systems, Inc. and Contributors.
*
* Licensed under the GridGain Community Edition License (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.gridgain.com/prod... |
University of Birmingham: Stop the Clampdown on Protests
Defend E. started this petition to University of Birmingham started this petition to
The University of Birmingham has started an unprecedented clampdown on protest this year. Two students, Kelly Rogers and Simon Furse, have been suspended from the University fo... |
<reponame>navikt/k9-produksjonsstyring
import React, { FunctionComponent } from 'react';
import { injectIntl, WrappedComponentProps, FormattedMessage } from 'react-intl';
import { Row, Column } from 'nav-frontend-grid';
import { Hovedknapp, Knapp } from 'nav-frontend-knapper';
import { Normaltekst } from 'nav-frontend-... |
n = int(input())
mas = list(map(int, input().split()))
maxx = 1
d = 0
t = True
for i in range(n - 1):
if mas[i + 1] <= 2 * mas[i]:
d += 1
t = False
else:
if d > maxx:
maxx = d
d = 0
if d > maxx:
maxx = d
if t == False:
print(maxx + 1)
else:
print(maxx)
|
import argparse
import os
import sys
from fabric.api import *
from fabric.colors import red
from fabric.contrib import files
from fabric.network import disconnect_all
from playback import __version__, common
from playback.templates.local_settings_py import conf_local_settings_py
class Horizon(common.Co... |
Metalocalypse crossover time! I wanted to do this for so long... And it took a lot of my free time to finish this. About 5 hours to make the sketch and... I guess 30+ hours of work in photoshop. Yeah, I'm a patient oneSo, who is who?Twilight Sparkle = Nathan Explosion (cause she's some kind of a leader, right?)Applejac... |
// Method to invoke methods called through reflection. If method doesn't exist, display error
@Override
protected void invokeMethod(Method method) {
try {
method.invoke(SimulatorChoiceDialogBoxFactory.this);
} catch (Exception e) {
new GenerateError(myLanguageResources, INVAL... |
<filename>filer_addons/tests/settings_admin_styles.py
from .settings import * # noqa
INSTALLED_APPS.insert(0, 'admin_styles') # noqa
|
// runDiagnosticsService is like runMetricService, but uses the
// insecure port and supports both trace and metrics.
func (ms *testServer) runDiagnosticsService(ts *traceServer) {
listener, err := net.Listen("tcp", "127.0.0.1:19000")
if err != nil {
log.Fatalf("failed to listen: %s", err)
}
grpcServer := grpc.Ne... |
/* A simple test for CompositeTransformReader on its own. See
* CompositeTransformWriterAndReaderTest for a test that checks
* actual writing and then reading for errors. */
int itkCompositeTransformReaderTest(int , char *[] )
{
const unsigned int NDimensions = 2;
typedef itk::CompositeTransformReader<double, NDi... |
package numbersix
import (
"database/sql"
"testing"
"time"
"hawx.me/code/assert"
)
func TestFor(t *testing.T) {
assert := assert.New(t)
sqlite, _ := sql.Open("sqlite3", "file::memory:")
a, err := For(sqlite, "a")
assert.Nil(err)
b, err := For(sqlite, "b")
assert.Nil(err)
assert.Nil(a.Set("x", "y", "z"... |
// Based on https://stackoverflow.com/questions/45667415/how-to-receive-bitcoin-payments-using-bitcoinjs-lib-in-node-js
export function subscribePaymentAtAddress(
address: string,
onPayment,
onError = (err) => {}
) {
const btcWS = new WebSocket('wss://ws.blockchain.info/inv')
// NOTIFY ON ADDRESS UPDATE
bt... |
<reponame>jayvdb/django-outputs<filename>outputs/filters.py
import django_filters
from crispy_forms.bootstrap import InlineRadios
from crispy_forms.layout import Layout, Row, Div, Fieldset, Field
from django.contrib.contenttypes.models import ContentType
from django.forms import HiddenInput
from django.utils.translatio... |
Yes, Hitman’s Bodyguard is available on Netflix in Japan, but did you know you can unlock thousands of movies and shows not currently available in Japan? The release date for Netflix Japan was August 25th 2017, and here are the dates it was released on Netflix in other countries:
Netflix Netherlands : Released on Augu... |
def version(self):
version_command = 'SYSTem:VERSion?'
responce = self.send_scpi_command(command=version_command)
return responce |
def build_shift_dict(self, shift):
assert(0 <= shift < 26), "shift not in [0,26]: %d" % shift
cipher = {}
for c in string.ascii_lowercase:
if ord(c) + shift > ord("z"):
cipher[c] = chr(ord(c) + shift - ord("z") + ord("a") - 1)
else:
cipher[... |
by Chio
I didn’t realize it was time for finals until I read the Facebook status updates. My newsfeed was littered with posts discussing immense sleep deprivation; pictures of meals comprised of Hot Cheetos, Red Bulls, and 5-Hour Energy drinks; and extensive lists of extracurricular activities that needed to be accomp... |
A Nutrigenomic Inflammation-Related PBMC-Based Approach to Predict the Weight-Loss Regain in Obese Subjects
Background: Long-term maintenance of a dietary-induced weight loss continues to be a major health problem and warrants research on innovative approaches to understand weight stability. We investigated the role o... |
/**
* @desc collects groups of concurrent items in the offset range
*/
QList< QLinkedList<QxtScheduleInternalItem *> > QxtScheduleViewPrivate::findConcurrentItems(const int from, const int to) const
{
QList< QLinkedList<QxtScheduleInternalItem *> > allConcurrentItems;
QList<QxtScheduleInternalItem *> allItems... |
// cleanRemote Deleting file on the server
func (c SshClient) cleanRemote(remotePath string) (err error) {
ftp, err := c.NewSftp()
if err != nil {
return err
}
defer func(ftp *sftp.Client) {
err := ftp.Close()
if err != nil {
pterm.FgRed.Println(err)
}
}(ftp)
err = ftp.Remove(remotePath)
return err
} |
/**
* @module adaptive-expressions
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
/**
* Type of quantifier for expanding trigger expressions.
*/
export declare enum QuantifierType {
/**
* Within a clause, duplicate any predicate with variable for ... |
British media have censored the death of hundreds of people who have lost their lives in the Grenfell Tower fire in west London, a local resident has said.
The more than 500 people unaccounted from Grenfell Tower fire are dead, Nadia, whose family name was not given, told Press TV.
London Police Commander Stuart Cund... |
/**
* Class representing a text plugin definition.
*
* format_mask_examples is optional, but all other fields are mandatory
*
* All ArrayList fields should contain the same number of elements
*/
public final class TextPluginDefinition extends PluginDefinition {
/**
* List of format masks provided by ... |
// Dir checks the given path, will return error if path not exists or path
// is not directory.
func Dir(path string) error {
if info, err := os.Stat(path); err != nil {
return fmt.Errorf(`directory not exists: %s`, path)
} else if !info.IsDir() {
return fmt.Errorf(`path is not directory: %s`, path)
}
return ni... |
def create_input(density: list, velocity: list, solid: list, cmap="", qcolor="", filename=""):
if not cmap: cmap = "None"
text = f"colormap={cmap}\n"
if not cmap: cmap = "None"
text += f"quiver={qcolor}\n"
text += f"density={len(density)}\n"
for den in density:
text += f"{den}\n"
tex... |
<filename>packages/lesswrong/server/indexUtil.ts
import { expectedIndexes, isUnbackedCollection } from '../lib/collectionUtils';
import { getCollection, getAllCollections } from '../lib/vulcan-lib/getCollection';
import * as _ from 'underscore';
function indexesMatch(indexA: any, indexB: any)
{
return (_.isEqual(ind... |
Measurement of Mechanical Properties of Cantilever Shaped Materials
Microcantilevers were first introduced as imaging probes in Atomic Force Microscopy (AFM) due to their extremely high sensitivity in measuring surface forces. The versatility of these probes, however, allows the sensing and measurement of a host of me... |
package com.ycao.mysite.controller.admin;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.ycao.mysite.constant.ErrorConstant;
import com.ycao.mysite.exception.BusinessException;
import com.ycao.mysite.model.FileCategoryDomain;
import com.ycao.mysite.service.markdown.IMdCategoryService;... |
Read circuits for resistive memory (ReRAM) and memristor-based nonvolatile Logics
Resistive memory device (Memristor) is one of the candidates for energy-efficient nonvolatile memory and nonvolatile logics (nvLogics) in the applications of wearable devices, Internet of Things (IoT), cloud computing, and big-data proce... |
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { DefaultLayoutService, LayoutOptions } from '../../layout/layout.settings';
@Component({
selector: 'vr-toolbar-alpha',
templateUrl: './toolbar-alpha.component.html',
styleUrls: ['./toolbar-alpha.component.scss']
})
export cla... |
Overview of the events of 1972 in film
The year 1972 in film involved several significant cinematic events including the release of Francis Ford Coppola's Academy Award-winning film, The Godfather.
Highest-grossing films (U.S.) [ edit ]
The top ten 1972 released films by box office gross in North America are as foll... |
n = int(input())
stu = [int(x) for x in input().split()]
stu.sort()
# print(stu)
print(sum(stu[i+1]-stu[i] for i in range(0,n,2)))
|
// NewPGPopularRepository creates the new popular characters repository for postgres
// and the redis cache for appearances.
func NewPGPopularRepository(db ORM, ctr CharacterThumbRepository) *PGPopularRepository {
return &PGPopularRepository{
db: db,
ctr: ctr,
}
} |
/** Equality expressions to aid in converting between DepNodes and CAS objects */
public static boolean equalCoverage(Annotation annot1,Annotation annot2) {
if (annot1==null || annot2==null)
return false;
return annot1.getBegin()==annot2.getBegin() &&
annot1.getEnd()==annot2.getEnd() &&
annot1.getCovere... |
import { useEffect, useMemo, useState, useCallback } from 'react';
import * as anchor from '@project-serum/anchor';
import styled from 'styled-components';
import { Container, Snackbar } from '@material-ui/core';
import Paper from '@material-ui/core/Paper';
import Alert from '@material-ui/lab/Alert';
import { PublicKe... |
/**
* Filter out index that are replaced by another index with the same base
* name but newer version.
*
* Indexes without a version number in the name are always used, except if
* there is an active index with the same base name but a newer version.
*
* Active indexes have a hidden... |
/**
* A collection of useful class methods.
*
* @author Casey Marshall (rsdio@metastatic.org)
*/
public final class Util
{
// Constants.
// -------------------------------------------------------------------------
public static final String HEX = "0123456789abcdef";
// Class methods.
// ---------------... |
Is It Possible To Walk And Work At The Same Time?
toggle caption iStockphoto.com
When it comes to walking, the easy part is understanding the benefits: Regular, brisk walks can strengthen our bones, help control blood sugar, help lower blood pressure and cholesterol, and the list goes on. The hard part is finding the... |
// ListCommonPrefixes gets a list of all object key prefixes that come
// after the provided prefix and before the provided delimiter (this is
// often used to simulate a directory hierarchy in object storage).
func (c *ObjectStoreGRPCClient) ListCommonPrefixes(bucket, prefix, delimiter string) ([]string, error) {
req... |
<filename>examples/python/cpu/tensors/tensor_split_03.py
import pyOcean_cpu as ocean
a = ocean.tensor([5,6])
a.T.copy(range(a.nelem))
print("---------------------------------------")
print("a")
print("---------------------------------------")
print(a)
print("\n---------------------------------------")
print("a.split... |
<reponame>zealoussnow/chromium
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/ui/webui/print_preview/local_printer_handler_chromeos.h"
#include <memory>
#include <string>
#inc... |
#include<stdio.h>
int main()
{
char s[100],a[100],temp;
gets(s);
int i,len,j=0,k=0,l;
len=strlen(s);
while(s[j]!='\0')
{
if(s[j]!='+')
{
a[k]=s[j];
k++;
}
j++;
}
for(i=1;i<k;i++)
{
for(l=0;l<(k-i);l++)
if(a[l]>a[... |
//
// Created by MichelT on 10/12/2019.
//
#ifndef STACK_STACK_H
#define STACK_STACK_H
typedef struct node {
int item;
struct node *next;
} Node;
typedef struct stack {
Node *top;
} Stack;
Stack* create_stack();
void push(Stack* stack, int item);
int pop(Stack* stack);
int peek(Stack* stack);
int is_emp... |
<reponame>lee20h/ALPS_2020_Summer_Study
#pragma once
#include "GameObject.h"
namespace rpg_extreme
{
class Character : public GameObject
{
public:
virtual bool IsCharacter() const override;
virtual bool IsEquipmentBox() const override;
virtual bool IsWall() const overr... |
The significance of digital gene expression profiles.
Genes differentially expressed in different tissues, during development, or during specific pathologies are of foremost interest to both basic and pharmaceutical research. "Transcript profiles" or "digital Northerns" are generated routinely by partially sequencing ... |
def pop(self, *args, **kwargs):
if self.focus_stack().pop():
self.master.prompt_for_exit()
else:
self.refresh()
self.view_changed()
self.focus_changed() |
from time import time
import random
def performance_sum():
"""Evaluate performance of sum"""
scores = {}
trial = 1
while trial <= 20:
numbers = [random.randint(1, 9) for i in list(range(2**trial))]
now = time()
sum = 0
for d in numbers:
sum = sum + d
... |
// set the return stream name to the adapter cluster name
private void decorateRequest(Request r) {
Request.RInfo rinfo = r.getRInfo();
if (rinfo instanceof Request.ClientRInfo) {
String cname = clusterEventListener.getRawListener()
... |
/**
* A simple data class for storing information about registered call backs.
*/
private static class CallBackData
{
/** Stores the call back. */
private ComponentBuilderCallBack callBack;
/** Stores the parameter for the call back. */
private Object param;
/**
... |
def product_of_experts(mu_experts, var_experts, eps=1e-7):
T = 1. / (var_experts + eps)
mu_product = torch.sum(mu_experts * T, dim=1) / torch.sum(T, dim=1)
var_product = 1. / torch.sum(T, dim=1)
return mu_product, var_product + eps |
/**
* A session is an authentication request sent to a user. Creating a session initiates a push notification to the user's mobile device.
*/
public class Session {
/**
* Various states that Sessions can take on.
*/
public static enum State {
/**
* The recipient has not yet respond... |
<reponame>jfbarthe/gedcom
package gedcom_test
import (
"github.com/elliotchance/gedcom"
"github.com/stretchr/testify/assert"
"testing"
)
var stringTests = []struct {
a, b string
jaro, str float64
}{
// Simple values
{"", "", 0, 0},
{"Foo", "Foo", 1, 1},
{"foo bar", "foo bar", 1, 1},
{"Foo bar", "foo ba... |
Tetraspanins CD9 and CD81 function to prevent the fusion of mononuclear phagocytes
Tetraspanins CD9 and CD81 facilitate the fusion between gametes, myoblasts, or virus-infected cells. Here, we investigated the role of these tetraspanins in the fusion of mononuclear phagocytes. Expression of CD9 and CD81 and their comp... |
/**
* This file is part of Eclipse Steady.
*
* 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... |
Using Appraisal Taxonomies for Sentiment Analysis
Recent years have seen a growing interest in non-topical text analysis, in which characterizations are sought of the opinions, feelings, and attitudes expressed in a text, rather than just the facts. A key problem in this area is sentiment classification, in which a do... |
/// Process an event to destroy a component
fn destroy(self, parent_to_detach: bool) {
scheduler::push_component_destroy(Box::new(DestroyRunner {
state: self.state,
parent_to_detach,
}));
// Not guaranteed to already have the scheduler started
... |
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
Operative hysteroscopy with the Bigatti shaver (IBS ®) for the removal of placental remnants
Background About 15-20% of pregnant women will miscarry spontaneously during the first trimester. Traditionally, the surgical treatment of placental remnants has been dilation and curettage (D&C). However, because of its ‘blin... |
Neutronics studies on the feasibility of developing fast breeder reactor with flexible breeding ratio
This paper investigates the feasibility of designing a flexible fast breeder reactor from the view of neutronics. It requires that the variable breeding ratio can be achieved in operating a fast reactor without signif... |
/*
* Notifies just get posted to the monitor. The actual notification is done
* when the monitor is fully exited so that MP systems don't contend for a
* monitor that they can't enter.
*/
static void _PR_PostNotifyToMonitor(PRMonitor *mon, PRBool broadcast)
{
PR_ASSERT(mon != NULL);
PR_ASSERT_CURRENT_THREAD... |
<filename>stats/stats_smallworld.c<gh_stars>0
/**
* Function for calculating the small world index of a graph.
*
* Author: <NAME> <<EMAIL>>
*/
#include <math.h>
#include <stdint.h>
#include "graph/graph.h"
#include "stats/stats.h"
#include "stats/stats_cache.h"
double stats_local_smallworld_index(graph_t *g, u... |
Illustration by Alex Eben Meyer.
Last week a man bumped into me on Fifth Avenue.
“Out of the way, tutti-frutti!” he boomed, eliciting shocked glances from passersby. As I scanned for a cop, I thought, “What kind of crazy, Little Richard–inspired hate speech was that?” But the moment quickly passed. The quaintness of ... |
#include<iostream>
#include<stdlib.h>
#include<stdio.h>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<math.h>
#include<assert.h>
using namespace std;
#define mod 1000000007
typedef long long int ll;
void combine(ll p[],ll mid,ll l,ll h){
ll i=l;
ll j=mid+1,k=l,... |
<reponame>h-arlt/morphia<gh_stars>100-1000
package dev.morphia.test.mapping;
import dev.morphia.annotations.Entity;
import dev.morphia.annotations.Id;
import dev.morphia.annotations.Property;
import dev.morphia.mapping.codec.pojo.EntityModel;
import dev.morphia.mapping.codec.pojo.PropertyModel;
import dev.morphia.mapp... |
<filename>src/lambda-calls-phone-api.py
# Version: Python 3.9 (verified)
# Import libraries
import json, os
import boto3
import urllib3 # The requests library is desperated in Lambda, so we need to use urllib3
# For logging and trace
import logging, traceback
import time
from base64 import b64decode # For data decrypti... |
It seems like it was just yesterday that we were awaiting an update to version 13 of Google Hangouts with its host of new emoticons and stability improvements. And while Google is trying to really market Allo to its growing consumer base, Hangouts looks to be in continued development as it makes the shift to a more ent... |
Association between protein intake and lean body mass in a group of Masters Athletes
Recommendations for protein intake are based on total body weight; however, these recommendations do not consider lean body mass (LBM). The purpose of the present study was to identify the average protein intake in g/kg LBM in a group... |
a, b, c = map(int, raw_input().split())
res = (a+b)/c
deb = (a+b)/c - a/c - b/c
a %= c
b %= c
dt = 0
if deb:
dt = c-max(a,b)
print res,dt |
<reponame>sgholamian/log-aware-clone-detection<filename>LACCPlus/Camel/271_1.java
//,temp,LuceneIndexAndQueryProducerIT.java,159,179,temp,LuceneIndexAndQueryProducerIT.java,123,144
//,2
public class xxx {
public void configure() {
from("direct:start").setHeader("QUERY", constant("Grouc?? Ma... |
Target Detection and Identification with a Heterogeneous Sensor Network by Strategic Resource Allocation and Coordination
In this paper, an approach for target acquisition and identification with a heterogeneous sensor network through strategic resource allocation and coordination is presented. Based on sensor managem... |
The Flyers enter the month of March, where they have 14 games in 28 days including three sets of back-to-backs in which five of those six games are played on the road… They are three points behind Pittsburgh for the final playoff spot with three games remaining against the Penguins… The Flyers are in the midst of a six... |
<filename>src/contexts/app.tsx
import React, { useContext } from 'react';
import { ChildrenProps } from 'global-types';
import { ApiClient } from 'lib/http';
import BackendApiService from 'services/backend';
import SectionsApiService from 'services/section';
import { AppServices } from 'services';
import StorageService... |
/// data is available only if there're tables related to input sequences and parameters of the input sequences.
bool DB_adapter::is_data_available ()
{
if ( is_seqs_available () && is_params_available () )
return DB_YES;
else
return DB_NO;
} |
// A placeholder fragment containing a simple view.
public static class PlaceholderFragment extends Fragment {
private static final String ARG_SECTION_NUMBER = "section_number";
private Button startButton = null;
public PlaceholderFragment() {
}
/**
* Returns a new i... |
<reponame>m-philipps/pyPESTO<gh_stars>10-100
# setup.py is still needed for editable installs
import setuptools
setuptools.setup()
|
package net.anotheria.moskito.core.util;
import net.anotheria.moskito.core.predefined.RuntimeStats;
import net.anotheria.moskito.core.producers.IStats;
import net.anotheria.moskito.core.producers.IStatsProducer;
import net.anotheria.moskito.core.registry.ProducerRegistryFactory;
import java.lang.management.Management... |
/**
* Created by Andreas Dyck on 26.07.17.
*/
public class AuditApiTest {
@Test
public void testAuditApi() {
final CloudOfThingsRestClient cotRestClientMock = Mockito.mock(CloudOfThingsRestClient.class);
AuditApi auditApi = new AuditApi(cotRestClientMock);
Assert.assertNotNull(audit... |
Next to sushi, low carb soup is my favorite food. Pretty much year round, you can open my fridge or freezer and see at least one or two low carb soups lining the shelves. While I convert a lot of my slow cooker recipes to stovetop recipes because I am impatient and just want to eat my soup NOW, I still really love all ... |
/*************************************************************************
* Description: Initialization for timer
* Returns: none
* Notes: none
*************************************************************************/
void timer_init(
void)
{
TIMECAPS tc;
if (timeGetDevCaps(&tc, sizeof(TIMECAPS)) != TIMER... |
<filename>app/jobs/DnsInquireJob.java<gh_stars>0
package jobs;
import helpers.DnsInquireHelper;
import models.Domain;
public class DnsInquireJob implements Runnable {
private Domain domain;
public DnsInquireJob(Domain domain) {
this.domain = domain;
}
@Override
public void run() {
DnsInquireHelper helpe... |
async def put_node_title(response: Response, node_id: str = "", title: str = ""):
query = Query()
nodes = DB.table("nodes")
node_doc = nodes.get(query.node_id == node_id)
if node_doc is None:
msg = "Node does not exist"
logging.info(msg)
response.status_code = status.HTTP_400_BAD... |
// No route for the HTTP2 request, send 404 on the corresponding HTTP2 stream
void send404(
int streamId)
{
ArrayFW<HttpHeaderFW> headers =
factory.headersRW.wrap(factory.errorBuf, 0, factory.errorBuf.capacity())
.item(b -> b.name(":status").value("40... |
<gh_stars>10-100
"""Command design pattern - run shell command."""
from fastapi_mvc.commands import Command
from fastapi_mvc.utils import ShellUtils
class RunShell(Command):
"""Define the common interface for ShellUtils.run_shell method.
Args:
cmd (list): Shell command to run.
cwd (str): Path... |
/**
*
* @author fkaraman
*
* Implementation of DDR extension !walkj9pool
*
*/
public class WalkJ9PoolCommand extends Command
{
private static final String nl = System.getProperty("line.separator");
/**
* Constructor
*/
public WalkJ9PoolCommand()
{
addCommand("walkj9pool", "<address>", "Walks the el... |
<reponame>daisy/books-to-videos
import dayjs from 'dayjs';
import fs from 'fs-extra';
import path from 'path';
import winston from 'winston';
import * as types from '../types/index.js';
import * as utils from '../utils/index.js';
// create an HTML page with the video embedded in it
function createHtmlPage(book: types.... |
<gh_stars>0
package com.supyuan.school.umutil;
import com.jfinal.kit.PathKit;
import com.jfinal.kit.Ret;
import com.jfinal.upload.UploadFile;
import com.supyuan.component.base.BaseProjectController;
import com.supyuan.jfinal.component.annotation.ControllerBind;
import javax.imageio.ImageIO;
import javax.imageio.Image... |
<reponame>njenga5/django-mediastore-site
from django.db import models
from PIL import Image
from taggit.managers import TaggableManager
from django.utils.translation import gettext_lazy as _
from commonops.models import CustomUser as User
class Photo(models.Model):
user = models.ForeignKey(User, on_delete=mode... |
async def _async_register(self) -> None:
metadata = aioxmpp.make_security_layer(None, no_verify=not self.verify_security)
query = ibr.Query(self.jid.localpart, self.password)
_, stream, features = await aioxmpp.node.connect_xmlstream(
self.jid, metadata, loop=self.loop
)
... |
All Publishers 6th Ave Press A House Called Alice Ltd A Stravaiger Abbeymead Books Academy UK LTD Agile Student Ltd aintlifewonderful books Alogo Publications Amazing If AMD Publishing (UK) Ancient Family Roots Ltd Ancient History Seminars Andrew Everett MA Angela Kilmartin Angela Kilmartin Angela Krause Aniseed Press ... |
def _residue_key_func(node):
attrs = 'mol_idx', 'chain', 'resid', 'resname'
return tuple(node.get(attr) for attr in attrs) |
// common extensions unit tests
package testing
|
<reponame>ianeli1/simple-chat-web
import '../assets/main.css';
import TopBar from '../components/TopBar';
import Sidebar, { SidebarProps } from '../components/Sidebar';
import React, { useContext } from 'react';
import { Chat } from '@material-ui/icons';
import AvatarScroller from '../components/AvatarScroller';
import... |
// ResolveCredentialsEUser resolves the effective user id of the process to a username
func (ev *Event) ResolveCredentialsEUser(e *model.Credentials) string {
if len(e.EUser) == 0 && ev != nil {
e.EUser, _ = ev.resolvers.UserGroupResolver.ResolveUser(ev.ResolveCredentialsEUID(e))
}
return e.EUser
} |
<reponame>samwestmoreland/please<gh_stars>1000+
package cgo
import (
"fmt"
"strconv"
)
// CheckAnswer checks that the given answer matches the canonical one.
func CheckAnswer(answer string) error {
ans, _ := strconv.ParseInt(answer, 13, 32)
if int(ans) != 6*9 {
return fmt.Errorf("universe parameters incorrect")... |
Study on the evaluation of waterlogging tolerance about different Dactylis glomerata L. germplasm resources and the difference on microstructure of root under waterlogging stress
In order to characterize the physiological mechanisms of waterlogging tolerance of Dactylis glomerata L. and to help rationally select water... |
#include "internal.h"
#include "script_int.h"
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include "pullpush.h"
unsigned char *push_bytes(unsigned char **cursor, size_t *max,
const void *src, size_t len)
{
if (cursor == NULL || *cursor == NULL) {
*max += len;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.