content stringlengths 10 4.9M |
|---|
Highly Stable Lasing from Solution‐Epitaxially Grown Formamidinium‐Lead‐Bromide Micro‐Resonators
High‐quality epitaxial growth of oriented microcrystallites on a semiconductor substrate is demonstrated here for formamidinium lead bromide perovskite, by drop casting of precursor solutions in air. The microcrystallites ... |
def assert_paths():
def f(paths: list):
for file in paths:
assert os.path.exists(file)
return f |
/**
* Helper method to check and update the cache for exchange rates.
*
* @param fromCurrency conversion from currency
* @param toCurrency conversion to currency
* @throws CurrencyNotSupportedException
* @throws StorageException
* @throws JSONException
* @throws EndpointException
* @throws ServiceExce... |
#include<bits/stdc++.h>
using namespace std;
int main()
{
string a;
cin>>a;
string b;
cin>>b;
int i=0;
string h1,m1,h2,m2;
h1=a[0];
h1+=a[1];
m1=a[3];
m1+=a[4];
h2=b[0];
h2+=b[1];
m2=b[3];
m2+=b[4];
int h=stoi(h1);
int m=stoi(m1);
int hh=stoi(h2);
int mm=stoi(m2);
int hour=hh-h... |
/**
* Start operation request was accepted.
*/
@Immutable
public class StartOperationRequestAuditEvent extends AbstractUserAuditEvent {
public static class StartOperationAuditEventBuilder
extends AbstractUserAuditEventBuilder<StartOperationRequestAuditEvent, StartOperationAuditEventBuilder> {
/**
* R... |
High-Temperature Nodal Ring Semimetal in 2D Honeycomb-Kagome Mn2N3 Lattice
The search for two-dimensional (2D) nodal ring semimetallic (NRSM) materials is a current research hotspot in spintronics, and designing a 2D nodal ring (NR) material with high Curie temperature (T
C
) and strong robustness to spin-orbit ... |
Networks of phenotypic variation
Evolution
Evolution depends on phenotypic variation. Gene regulatory networks are theoretically expected to be likely sources of variation. Schaerli et al. explored how the structure of gene regulatory circuits contributes to the range of mutant phenotypes that are produced. Synthetic ... |
/**
* This class provides a fixed-size immutable array with update operation. Setting an element to a
* value returns a new array.
*/
public final class ImmutableArray<E> extends ImmutableArrayBase<E>
implements Array<E>
{
private ImmutableArray(long sz)
{
super(sz);
}
@Suppr... |
Get the biggest daily 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
Work to turn a historic Liverpool library into a community centre will start within weeks after the project won £3.9m in Lottery cash.
T... |
#-- GAUDI jobOptions generated on Sun Feb 7 02:07:34 2016
#-- Contains event types :
#-- 15104201 - 151 files - 3002173 events - 906.80 GBytes
#-- Extra information about the data processing phases:
#-- Processing Pass Step-124834
#-- StepId : 124834
#-- StepName : Reco14a for MC
#-- ApplicationName : ... |
use std::cell::RefCell;
// rust还不太熟,先抄着吧
use std::rc::Rc;
// use std::cell::RefCell;
fn main() {
println!("Hello, world!");
}
// Definition for a binary tree node
#[derive(Debug, PartialEq,Eq)]
pub struct TreeNode{
pub val:i32,
pub left: Option<Rc<RefCell<TreeNode>>>,
pub right: Option<Rc<RefCell<Tre... |
<reponame>webdevelukas/klubwebsite
import styled from "styled-components";
import NextImage from "next/image";
import useMediaQuery from "hooks/useMediaQuery";
type LightboxProps = {
setShowLightbox: (showLightbox: boolean) => void;
images: [{ url: string; alt: string; width: number; height: number }];
};
functio... |
White House counselor Kellyanne Conway on Monday morning confirmed that President Donald Trump’s personal attorney John Dowd wrote the President’s Saturday tweet saying that he fired Michael Flynn as national security adviser because he lied to Vice President Mike Pence and the FBI.
“I was with the President on Saturd... |
<filename>test/contrib/test_pyopenssl.py
# -*- coding: utf-8 -*-
import os
import mock
import pytest
try:
from cryptography import x509
from OpenSSL.crypto import FILETYPE_PEM, load_certificate
from urllib3.contrib.pyopenssl import _dnsname_to_stdlib, get_subj_alt_name
except ImportError:
pass
def ... |
Object languages in a type-theoreticmeta-frameworkPaul
This paper concerns techniques for providing a convenient syntax for object languages implemented via a type-theoretic Logical Framework, and reports on work in progress. We rst motivate the need for a type-theoretic logical framework. Firstly, we take the logical... |
About
How many times have you gone out with your geeky friends to a local bar, only to be surrounded by sports on every screen? Ever try to ask someone to put on an episode of Deep Space 9 or Dark Matter? They'd look at you like you had two heads!
The looks you get when you break out your Magic cards in those places.... |
// Adds two linked lists of same size represented by head1 and head2 and returns
// head of the resultant linked list. Carry is propagated while returning from
// the recursion
node* addSameSize(node* head1, node* head2, int* carry)
{
if (head1 == NULL)
return NULL;
int sum;
node* result = (node *)m... |
import requests, json, base64, time, threading, sys, cv2
import numpy as np
from flask import Flask, render_template, send_file, request, redirect
# Configuration Variables
server_url = "http://localhost:8194" # the URL the Slackbot server is running on
# Test low_battery without an image
print("Testing /low_battery ... |
/**
* The forked computation.
* <p>
* The resulting index always includes the position to the end-of-file
* (EOF).
* </p>
*
* @return a Sorted set of positions representing a start of line.
*/
@Override
protected SortedSet<Long> compute() {
SortedSet<Long> index = new TreeSet<Long>... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Custom auxiliar modules for SETA_gophish app
import sys
import csv
import configparser
import time
import os
from datetime import datetime
from gophish import Gophish
from gophish.models import (Campaign, Group, Page, SMTP, Template, User)
def initiali... |
An investigation of the field-induced ferrielectric subphases in antiferroelectric liquid crystals
We report results of detailed investigations of the dielectric response of two antiferroelectric liquid crystal materials over a wide range of frequencies as a function of bias voltage and of temperature. On the basis of... |
<reponame>PyroTechniac/Skyra
import { SkyraCommand, SkyraCommandOptions } from '@lib/structures/SkyraCommand';
import { CLIENT_ID } from '@root/config';
import { ApplyOptions } from '@skyra/decorators';
import { assetsFolder } from '@utils/constants';
import { fetchAvatar, radians } from '@utils/util';
import { Canvas ... |
<gh_stars>1-10
/*
* Copyright (C) 2016 Red Hat, Inc.
*
* 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 ofthe License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... |
#include<stdio.h>
//#define scanf scanf_s
int main()
{
int t, n,max,i,a[100],temp,j,k;
scanf("%d", &t);
for (i = 1; i <= t; i++)
{
scanf("%d", &n);
for (j = 0; j < n; j++)
scanf("%d", &a[j]);
for (j = 0; j < n - 1; j++)
{
for (max = j,... |
<reponame>yuanhang110/ZheyeProject<filename>zheye-servers2/src/main/java/com/evostar/netty/handler/MessageRequestHandler.java
package com.evostar.netty.handler;
import com.evostar.VO.UserVO;
import com.evostar.model.ChatRecord;
import com.evostar.model.User;
import com.evostar.netty.request.LoginRequestPacket;
import ... |
<reponame>blacknred/full-taskapp
export enum Width {
lg = "full",
md = "3xl",
sm = "sm",
}
export enum Privilege {
EDIT_WORKSPACE = "EDIT_WORKSPACE",
CREATE_AGENT = "CREATE_AGENT",
READ_ANY_AGENT = "READ_ANY_AGENT",
EDIT_ANY_AGENT = "EDIT_ANY_AGENT",
DELETE_ANY_AGENT = "DELETE_AGENT",
CREATE_SAGA = "... |
<reponame>nibalizer/galileo<filename>snotrocket/snotrocket_sync.py
#!/usr/bin/python
# application to follow the snot log and refresh the snotrocket
# cache as necessary
# doesn't return, must be run as a daemon
from elasticsearch import Elasticsearch
import tailer
from snotrocket_populate import import_ticket
impo... |
<filename>packages/core/Server.ts
// # Modules
import { getPublic } from '@config/env'
import http from "http"
import handler from "serve-handler"
// # Interfaces
import { Configuration } from '@main/Program';
export default class Server {
config: Configuration
constructor(config: Configuration) {
th... |
def translate_selected_nodes_shape_cvs(translate_list):
selected_nodes = maya.cmds.ls(sl=True, long=True)
if not selected_nodes:
return
return translate_node_shape_cvs(selected_nodes, translate_list) |
export { default as Button } from './button';
export { default as Card } from './card';
export { default as CardStack } from './card-stack';
export { default as Divider } from './divider';
export { default as Header } from './header';
export { default as Icon } from './icon';
export { default as Section } from './secti... |
Is There Any Age Cutoff to Treat Elderly Patients with Head and Neck Cancer? Comparing with Septuagenarians and Octogenarians
With the increase in life expectancy, age is no longer considered as a limitation for treatment. Nevertheless, the treatment of elderly patients with head and neck cancer (HNC) remains controve... |
/**
* Public key reconstruction. (Sec 4, 3.5).
*
* @param idInfo - user identification data.
* @param reconstructionPoint - public key reconstruction data.
* @return reconstructed user public key.
*/
public ECDSA extractPublic( final Binary idInfo, final Binary reconstructionPoint )
{
ECCurve ecCurve = ... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2012-2020 Synaptics Incorporated
*/
#include <linux/kernel.h>
#include <linux/rmi.h>
#include <linux/input.h>
#include <linux/slab.h>
#include "rmi_driver.h"
#define RMI_F3A_MAX_GPIO_COUNT 128
#define RMI_F3A_MAX_REG_SIZE DIV_ROUND_UP(RMI_F3A_MAX_GPIO_CO... |
class Tile:
# This class may extend a PyGame Button class in the future, depending on
# the implementation
""" A Tile class. This is used to represent a tile inside the grid
in a Minesweeper game.
This is an abstract class that should not be instantiated directly.
This class is exte... |
/**
* Cause the interrupt hook to be called when the next
* JavaScript instruction starts to execute.
* <p>
* The interrupt is self clearing
* @see netscape.jsdebug.DebugController#setInterruptHook
*/
public void sendInterrupt()
throws ForbiddenTargetException
{
Privil... |
<reponame>VenDream/goindex<gh_stars>0
/**
* Goindex page script
* @author VenDream<<EMAIL>>
* @since 2020-4-20
*/
alert('hello');
|
def query_album(self, album, bonus):
data = None
by_word = ' {} '.format(self.translate('by'))
if len(album.split(by_word)) > 1:
album, artist = album.split(by_word)
album_search = album
else:
album_search = album
albums = self.client.list('alb... |
Satirical Texas Bill Would Fine Men's Masturbation, Set Viagra Waiting Period
A bill introduced in the Texas House of Representatives on Friday would fine men for masturbating, allow doctors to refuse to prescribe Viagra and require men to undergo a medically unnecessary rectal exam before any elective vasectomy.
Sta... |
<filename>software/perception/image_io_utils/src/image-warp/ImageWarper.cpp
#include <memory>
#include <string>
#include <lcm/lcm-cpp.hpp>
#include <drc_utils/LcmWrapper.hpp>
#include <drc_utils/BotWrapper.hpp>
#include <bot_param/param_client.h>
#include <bot_param/param_util.h>
#include <bot_core/camtrans.h>
#inclu... |
h,w,n = map(int,input().split())
coord = [list(map(int,input().split())) for i in range(n)]
num = {}
for i in range(n):
for j,k in [[0,0],[0,1],[0,-1],[1,0],[1,1],[1,-1],[-1,0],[-1,1],[-1,-1]]:
if not(2<=coord[i][0]+j<=h-1) or not(2<=coord[i][1]+k<=w-1):
continue
if not coord[i][0]+j in num:
num... |
<filename>dev/app/home/home.component.ts
"use strict";
import { Router } from "@angular/router";
import { Component, OnInit, Input } from "@angular/core";
import { Observable } from "rxjs/Observable";
import { Subscription } from "rxjs/Subscription";
// services
import { User, UserService } from "../Services/users.s... |
/************************************
* The BridgeSettingsTelegram class *
************************************/
export interface BridgeSettingsTelegramProperties {
chatId: number;
sendUsernames: boolean;
relayCommands: boolean;
relayJoinMessages: boolean;
relayLeaveMessages: boolean;
crossDeleteOnDiscord: b... |
def associative_scan(fn, elems):
elems_flat, tree = tree_flatten(elems)
def lowered_fn(a_flat, b_flat):
a = tree_unflatten(tree, a_flat)
b = tree_unflatten(tree, b_flat)
c = fn(a, b)
c_flat, _ = tree_flatten(c)
return c_flat
num_elems = int(elems_flat[0].shape[0])
if not all(int(elem.shape[0... |
// writeTo serializes the processing instruction to the writer.
func (p *ProcInst) writeTo(w *bufio.Writer, trimmed bool) {
w.WriteString("<?")
w.WriteString(p.Target)
w.WriteByte(' ')
w.WriteString(p.Inst)
w.WriteString("?>")
} |
import java.util.*;
import java.io.*;
public class A110 {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
long n = Long.parseLong(br.readLine());
int l = 0;
while(n > 0){
if(n%1... |
def _compute_binary_classification_accuracy(self, h:torch.tensor, t_binary:torch.tensor):
assert h.size(0) == t_binary.size(0) >= 0
assert len(h.size()) == len(t_binary.size()) == 1
if h.size(0) == t_binary.size(0) == 0:
acc = 0.0
pre = 0.0
rec = 0.0
e... |
Credit: DC Comics
Updated October 5, 2017: Bryan Hitch has told Newsarama that he never agreed to write Justice League #32 and #33 despite DC soliciting him as writer for those November issues, and that his final issue will be Justice League #31 as he originally intended.
"Justice League #31 is my last issue (Legacy ... |
import http from "../utils/http";
export const getHitokotoApi = () => http.get("https://v1.hitokoto.cn/");
export const getWeatherApi = () =>
http.get(
"https://www.tianqiapi.com/api?unescape=1&version=v6&appid=33896864&appsecret=BR49xbsH&city=" +
123
);
|
#pragma once
void test_conversion();
|
package rds
import (
"strings"
atlas "github.com/infobloxopen/atlas-db/pkg/apis/db/v1alpha1"
"github.com/infobloxopen/atlas-db/pkg/server/mysql"
"github.com/infobloxopen/atlas-db/pkg/server/plugin"
"github.com/infobloxopen/atlas-db/pkg/server/postgres"
)
type RDSPlugin atlas.RDSPlugin
func Convert(a *atlas.RDS... |
import VnNative3ConsoleCore from "./console";
export default class VnNative3Console extends VnNative3ConsoleCore {} |
import unittest
import numpy as np
from os import path
import pickle
import tempfile
from mutual_information import mf, mf_random
class TestMFRandom(unittest.TestCase):
def setUp(self):
self.tempdir = tempfile.mkdtemp()
M = 10
N = 10000
phenotype_list = ['HP:' + str(i + 1) for i i... |
Dependency related parameters in the reconstruction of a layered software architecture
Software architecture reconstruction techniques may be used to understand and maintain software systems, especially in these cases where architectural documentation is outdated or missing. Reconstruction of layers is interesting, si... |
from django.urls import path
from .views import *
urlpatterns = [
path('category_create/', CategoryCreate.as_view(), name='category_create'),
path('post_create/', post_create, name='post_create'),
path('post_details/<int:pk>/', PostDetails.as_view(), name='post_details'),
path('post_update/<int:pk>/'... |
// ****************************************************************************
// Method: trapezoidAverage
//
// Purpose:
// Return averaged node value over layers by trapezpoid method
//
//
//
// Arguments:
// a_state layered node variable with size of mesh layers
// a_z el... |
/**
* Add a new delay rule to LNet
* There is no check for duplicated delay rule, all rules will be checked for
* incoming message.
*/
int
lnet_delay_rule_add(struct lnet_fault_attr *attr)
{
struct lnet_delay_rule *rule;
int rc = 0;
if (attr->u.delay.la_rate & attr->u.delay.la_interval) {
CDEBUG(D_NET, "please... |
/****************************************************************************
* netutils/webserver/httpd_dirlist.c
*
* Copyright 2019 Sony Home Entertainment & Sound Products Inc.
* Author: <NAME> <<EMAIL>>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted p... |
<gh_stars>10-100
package tl.lin.lucene.wikipedia;
import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apac... |
#include<stdio.h>
int main()
{
int n;
scanf_s("%d", &n);
int charge = 1;
if (n % 4 == 0 || n % 7 == 0||n%47==0||n%74==0||n%447==0||n%477==0||n%777==0||n%774==0||n%744==0)
charge = 0;
if (charge == 1)
{
printf("NO");
}
else
printf("YES");
return 0;
}
|
/**
* Refresh information of a customer object from database
*
* @param listObj
* @throws IOException
*/
public void refresh(List<T> listObj) throws IOException {
if (listObj == null) {
throw new NullPointerException("Cannot refresh null object");
}
for (T o ... |
// pre-calculated exponents in GF(2^16), missing bottom 3 bits, followed by 128-entry polynomial shift table
void gfmat_init() {
input_diff = (int8_t*)malloc(32768);
gf_exp = (uint16_t*)malloc((8192+128)*2);
int exp = 0, n = 1;
for (int i = 0; i < 32768; i++) {
do {
if((exp & 7) == 0) gf_exp[exp>>3] = n;
ex... |
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ServiceStatus) DeepCopyInto(out *ServiceStatus) {
*out = *in
if in.DeploymentStatus != nil {
in, out := &in.DeploymentStatus, &out.DeploymentStatus
*out = new(appsv1.DeploymentStatus)
(*i... |
.
Tuhfetü'l-Tib is a Turkish medical history periodical published regularly every two weeks in Istanbul since December 27th, 1867. Its collection comprises totally 15 issues, every one of which is consisted of 16 pages with a hard cover, printed at the Maltepe Military Hospital printing press for more than seven month... |
/**
* Test of features method, of class MyFeatures.
*/
@Test
public void testFeatures() {
Map<String, Boolean> result = MyFeatures.features();
assertEquals(false, result.get(MyFeatures.values()[0].name()));
} |
DENVER — It was only one game.
Something positive, however, emerged from an otherwise forgettable night in Denver.
Defensemen Ben Lovejoy and Derrick Pouliot looked comfortable together, and while it was merely one game and coach Mike Johnston has promised to tinker with his lineup, this is a duo that could stick.
“... |
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
import { Request, Response } from 'express';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import { LoggerService } from '../../services/main/main';
@Injectable()
export class LoggerInterceptor impl... |
Artemisia lanaticapitula (Asteraceae: Tribe Anthemideae), a New Species from Zhejiang, East China
Abstract Artemisia lanaticapitula (Asteraceae: Anthemideae), a new species from Zhejiang in East China, is described and illustrated, based on the analyses of morphological observations and molecular phylogenetic evidence... |
import py
from py._path.svnurl import InfoSvnCommand
import datetime
import time
from svntestbase import CommonSvnTests
def pytest_funcarg__path1(request):
repo, repourl, wc = request.getfuncargvalue("repowc1")
return py.path.svnurl(repourl)
class TestSvnURLCommandPath(CommonSvnTests):
@py.test.mark.xfail... |
package cn.mzhong.kbus.http.bio;
import cn.mzhong.kbus.http.*;
import cn.mzhong.kbus.util.StreamUtils;
import java.io.IOException;
import java.io.InputStream;
/**
* TODO<br>
* 创建时间: 2019/10/28 9:59
*
* @author mzhong
* @version 1.0
*/
public class HttpBioResponseReader {
public HttpResponse read(InputStre... |
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distri... |
/**
* Testcase ID=20016 TestCase Description:Test the functionality of "Continue
* with Google" button
*
* @param method
*/
@Test(dependsOnMethods = { "verifyIfContinueWithGoogleIsPresent_20015" })
public void testContinueWithGoogleButton_20016(Method method) {
homepage.launchAndLoginWithCity(method.getNa... |
/**
* Prints a next expression in standard LTL syntax.
*
* @param nextExpr The next expression to print
*/
@Override
public void visit(Next nextExpr)
{
builder.append("(X ");
nextExpr.subExpr.accept(this);
builder.append(")");
} |
// String implements the fmt.Stringer.
func (sq *SurveyQuestion) String() string {
var builder strings.Builder
builder.WriteString("SurveyQuestion(")
builder.WriteString(fmt.Sprintf("id=%v", sq.ID))
builder.WriteString(", create_time=")
builder.WriteString(sq.CreateTime.Format(time.ANSIC))
builder.WriteString(", ... |
def walk_nodes(self, where="/", classname=None):
class_ = get_class_by_name(classname)
if class_ is Group:
yield from self.walk_groups(where)
elif class_ is Node:
yield self.get_node(where)
for group in self.walk_groups(where):
yield from s... |
from airflow.utils.decorators import apply_defaults
from typing import List
from airflow.models import BaseOperator
from airflow.contrib.hooks.aws_dynamodb_hook import AwsDynamoDBHook
from airflow.hooks.S3_hook import S3Hook
from decimal import Decimal
import boto3
import json
import logging
class S3ToDynamoDBOperato... |
# -*- coding: UTF-8 -*-
# Author: <NAME>
# E-mail: <EMAIL>
# Update time: 2021.03.05
from __future__ import print_function
import time
import matplotlib.pyplot as plt
import Table
from pit import PIT
from forward import FORWARD
'''
data = {'type': 'data',
# 'interest_ID': 0,
'consumer_ID': 0,
... |
A Study on the Plant-Input-Mapping Discretization for Nonlinear Control Systems Utilizing Feedback Linearization
This study attempts to extend a digital redesign method, called the Plant-Input-Mapping (PIM) method, to nonlinear control systems. The PIM method in the linear case can preserve the stability of the underl... |
// PortForward creates a port forward.
func (c *grpcServer) PortForward(ctx context.Context, in *proto.PortForwardRequest) (*proto.PortForwardResponse, error) {
req, err := convertToPortForwardRequest(in)
if err != nil {
return nil, err
}
pfResp, err := c.service.PortForward(ctx, *req)
if err != nil {
return n... |
/*
* Copyright 2017 HugeGraph Authors
*
* 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, Ve... |
package cluster
import (
"bytes"
"fmt"
"github.com/ligao-cloud-native/xwc-controller-agent/cluster/execute"
"github.com/ligao-cloud-native/xwc-controller-agent/pkg/types"
"os"
"strconv"
"strings"
)
var ClusterName = os.Getenv("PWC_NAME")
var (
cmdStatusOk = " 1"
cmdStatusFailed = " 2"
logInstallCmd = "2>... |
package tk
import (
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
"os"
)
var db *gorm.DB
func init() {
var err error
params := fmt.Sprintf("host=%s user=%s dbname=%s sslmode=disable",
os.Getenv("DB_HOST"),
os.Getenv("DB_USER"),
os.Getenv("DB_NAME"))
db, err = gorm.Open("p... |
<gh_stars>0
# Returns a valid response when request's |referrer| matches |referrer_policy|.
def main(request, response):
referrer = request.headers.get("referer", None)
referrer_policy = request.GET.first("referrer_policy")
source_origin = request.GET.first("source_origin")
is_cross_origin = request.GET... |
1 of 6
Oscar Baldizon/Getty Images
Luke Walton intimately knows the full value of the three ball. During his two seasons spent as a Golden State Warriors assistant, he saw them pace the league in three-point makes and percentage, all while making a pair of NBA Finals appearances and snapping a 40-year title drought.
... |
package gotau
import "time"
// Event is the common parts of every event coming from TAU
type Event struct {
ID string `json:"id"`
EventID string `json:"event_id"`
EventType string `json:"event_type"`
EventSource string `json:"event_source"`
Created Time `json:"created"`
Origin string `... |
<reponame>breadhead/use-query
import * as React from 'react'
import {
AppComponentType,
AppProps,
DefaultAppIProps,
NextAppContext,
} from 'next/app'
import { QueryContextProvider } from '../QueryContextProvider'
type NextProps = AppProps & DefaultAppIProps
interface QueryProps {
query: any
}
export const ... |
/*
* Timer.h
*
* Created on: 16.10.2015
* Author: cem
*/
#ifndef OSAL_INCLUDE_TIMER_H_
#define OSAL_INCLUDE_TIMER_H_
#include "scmRTOS.h"
namespace OSAL
{
class Timer
{
public:
static void Sleep(uint16_t timeout)
{
OS::TBaseProcess::sleep(delay_us(timeout));
}
static void SleepMS(uint16_t ms)
{
... |
<reponame>fullstackatbrown/hours-backend
package repository
import (
"cloud.google.com/go/firestore"
"fmt"
"github.com/golang/glog"
"github.com/google/uuid"
"github.com/mitchellh/mapstructure"
"google.golang.org/api/iterator"
"log"
"net/http"
"signmeup/internal/config"
"signmeup/internal/firebase"
"signmeup... |
class DownloadResult:
"""
This class represents a result of downloading of a single spectrum. It contains information
about spectrum final name, download link, exception in case of download failure.
"""
def __init__(self, name, url, exception=None):
"""
Initializes instance by passe... |
<gh_stars>1-10
/*
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.opens... |
/**
* This {@link BlockStateMock} represents a {@link TileState} which is capable of storing persistent data using a
* {@link PersistentDataContainerMock}.
*
* @author TheBusyBiscuit
*
*/
public abstract class TileStateMock extends BlockStateMock implements TileState
{
private final PersistentDataContainerMock ... |
This is the third and final part of a three-part series on designing and building a barcode scanner using a Raspberry Pi Zero W.
Raspberry Pi Zero Handheld Barcode Scanner Part 1
Raspberry Pi Zero Handheld Barcode Scanner Part 2
In the previous blog post the circuits were finished and a case was designed and sent fo... |
Systolic growth of linear groups
We prove that the residual girth of any finitely generated linear group is at most exponential. This means that the smallest finite quotient in which the $n$-ball injects has at most exponential size. If the group is also not virtually nilpotent, it follows that the residual girth is p... |
def wrap_language(filename, content, compressed):
name = lang_name(filename)
if compressed:
content = content.rstrip(';')
wrap = 'hljs.registerLanguage("%s",%s);'
else:
wrap = '\nhljs.registerLanguage(\'%s\', %s);\n'
return wrap % (name, content) |
use std::fs::OpenOptions;
use std::panic;
use anyhow::{anyhow, Context, Result};
use backtrace::Backtrace;
use clap::{App, Arg};
use tracing::{error, info};
use tracing_appender;
use tracing_subscriber;
use zanthe::run;
const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
fn main() {
let log_file = OpenOptions:... |
Transparent Conductive Adhesives for Tandem Solar Cells Using Polymer-Particle Composites.
Transparent conductive adhesives (TCAs) can enable conductivity between two substrates, which is useful for a wide range of electronic devices. Here, we have developed a TCA composed of a polymer-particle blend with ethylene-vin... |
def from_def(cls, obj):
prof = cls(obj["steamid"])
prof._cache = obj
return prof |
Laser-Induced Fluorescence Studies of Hematoporphyrin Derivative (HPD) in Normal and Tumor Tissue of Rat
Fluorescence studies of hematoporphyrin derivative (HPD) in normal and tumor tissue of rat were performed with nitrogen laser excitation and optical multi-channel detection. Fifteen types of tissue including inocul... |
/**
* Tokenizes the input text and returns a string corresponding to the tokens
* as one token per line
*
* @param text (String plain text)
* @return tokens (String)
*/
public String tokenize(String text) {
String tokens = "";
if (text != null && text.length() != 0) {
... |
<filename>spec/renderer/integration/store/Preferences/General.spec.ts
import { createLocalVue } from '@vue/test-utils'
import Vuex from 'vuex'
import { ipcMain, ipcRenderer } from '~/spec/mock/electron'
import General, { GeneralState } from '@/store/Preferences/General'
import { MyWindow } from '~/src/types/global'
imp... |
<reponame>kshinde2512/OpenMetadata
/*
* Copyright 2021 Collate
* 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 appl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.