content stringlengths 10 4.9M |
|---|
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[]srgs) {
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
List<String> list=new ArrayList<String>();
for(int i=0;i!=a;i++) {
String str=scan.next();
if(!list.contains(str)) {... |
Luteinizing hormone pulse frequency and amplitude in azoospermic, oligozoospermic and normal fertile men in Turkey.
AIM
To investigate the LH pulse frequency and amplitude in azoospermic and oligozoospermic patients and to compare them with normal fertile subjects.
METHODS
In this controlled clinical study, 10 norma... |
Since Trump’s Election, Increased Attention to Politics – Especially Among Women
Most find it stressful to talk politics with those who differ on Trump
Survey Report
Following an election that had one of the largest gender gaps in history, women are more likely than men to say they are paying increased attention to ... |
def scale_iterable(iterable, scale_factor):
if isinstance(iterable, list):
scaled_iterable = list(val * scale_factor for val in iterable)
elif isinstance(iterable, tuple):
scaled_iterable = tuple(val * scale_factor for val in iterable)
return scaled_iterable |
package redis
import (
"fmt"
"os"
"time"
"github.com/go-redis/redis"
)
// Storage is the interface that needs to be implemented for caching capabilities.
type Storage interface {
Get(key string) ([]byte, error)
Set(key string, content []byte, duration time.Duration) error
Delete(key string) error
Exists(key ... |
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the... |
"""
this code is borrowed from https://github.com/ajbrock/BigGAN-PyTorch
MIT License
Copyright (c) 2019 Andy Brock
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including w... |
/**
* @author Gidi Shabat
*/
public class MockArtifactoryServersCommonService implements ArtifactoryServersCommonService {
public MockArtifactoryServersCommonService(ArtifactoryVersion version) {
}
@Nullable
@Override
public ArtifactoryServer getRunningHaPrimary() {
return null;
}
... |
/**
* @author Nataliya Shurupova
*/
@Entity
@DiscriminatorValue(value="2")
public class WeekdayBlackout extends BlackoutDate {
// TODO: This ought to be the java.util.Calendar constant for the day, or a custom enum
private String dayOfTheWeek;
@Transient
public String getDisplayName() {
retur... |
/**
* Select the previous collision object (in cyclical index order).
*/
public void selectPrevious() {
if (isSelected()) {
List<String> names = cgm.getPhysics().listPcoNames("");
String selectedName = name();
int index = names.indexOf(selectedName);
a... |
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
* Copyright 2017-2018 NXP
*/
#ifndef __DT_BINDINGS_RSCRC_IMX_H
#define __DT_BINDINGS_RSCRC_IMX_H
/*
* These defines are used to indicate a resource. Resources include peripherals
* and bus masters (but not memory region... |
<filename>cascading-hadoop/src/test/java/cascading/flow/hadoop/MapReduceFlowPlatformTest.java
/*
* Copyright (c) 2007-2013 Concurrent, Inc. All Rights Reserved.
*
* Project and contact information: http://www.cascading.org/
*
* This file is part of the Cascading project.
*
* Licensed under the Apache License, Ve... |
package io.nanovc.agentsim.simulations.memory;
import io.nanovc.agentsim.*;
import org.junit.jupiter.api.Test;
/**
* Tests the {@link MemorySimulationHandler}.
*/
public class MemorySimulationHandlerTests extends MemorySimulationHandlerTestsBase
{
@Test
public void creationTest()
{
new MemorySim... |
import { getManyCards } from './handlers/cards.many'
import { getCardsToGold } from './handlers/cards.toGold'
export const routes: mb.Route[] = [
{
methods: ['get'],
url: '/api/cards',
handler: getManyCards
},
{
methods: ['get'],
url: '/api/cards/to-gold/:id',
handler: getCardsToGold
}
... |
import _Vue from "vue";
import M from "materialize-css";
export function MessagePlugin(Vue: typeof _Vue, options?: MessagesPluginOptions) {
Vue.prototype.$message = function (html: string) {
M.toast({ html })
}
Vue.prototype.$error = function (html: string) {
M.toast({ html: `[Ошибка]: ${html}` })
}
}... |
// ColorIndexAt returns the palette index of the pixel at (x, y).
func (l *Layer) ColorIndexAt(x, y int) uint8 {
if t := l.TileAt(x, y); t != nil {
ts := l.Tileset.Size
return t.ColorIndexAt(x%ts.X, y%ts.Y)
}
return 0
} |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server... |
def confirm_order(self, update: Update, context: CallbackContext) -> int:
context.chat_data['order_decision'] = update.message.text
reply_keyboard = [['Yes', 'No']]
if context.chat_data['order_decision'] == 'Cancel':
update.message.reply_text(
'You\'ve cancelled your ... |
/*
* problema c.cxx
*
* Copyright 2018 Cuenta Generica para la Escuela de simulacion molecular <trainingcamp-080@ws22.labo6>
*
* 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; eit... |
package models
import (
"fmt"
)
type Guild struct {
ID int
Emoji string
Name string
BattleID int
PlayerIDs []int
Prestige int
Wins int
Coins int
ChatID int64
}
func (g *Guild) Title() string {
return fmt.Sprintf("[%s]%s", g.Emoji, g.Name)
}
var Guilds = []Guild{
Guild{ID: 1, Emoji: RhinoE... |
// Normalized Least Mean Squares (NLMS) update
//
// NLMS is a variant of Least Mean Squares which uses a
// variable gain. The gain is computed based on the power
// of the input. The given `filter` taps are updated based
// on the input samples in `window`.
fn nlms_update(
relaxation: f32,
regularization: f32... |
# Long Beach Fire Department
# Glen Goodrich
Copyright © 2005 by Glen Goodrich
9781439614402
Published by Arcadia Publishing
Charleston, South Carolina
Printed in the United States of America
Library of Congress Catalog Card Number: 2005926067
For all general information contact Arcadia Publishing at:
Telep... |
def parse_config(self, config):
try:
for change_name, targets in config.items('changes'):
change = self.find_change(change_name)
for target in targets.split():
self.set_changes(os.path.join('assets', 'minecraft', 'textures', 'block', target), chang... |
package oci
import (
"context"
"fmt"
"github.com/oracle/oci-go-sdk/v44/nosql"
"github.com/turbot/steampipe-plugin-sdk/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/plugin"
"github.com/turbot/steampipe-plugin-sdk/plugin/transform"
)
//// TABLE DEFINITION
func tableOciNoSQLTableMetricWriteThrottleCountHour... |
package motherlode.block;
import motherlode.client.model.BlockModelDefinition;
import motherlode.client.model.ItemBlockModelDefinition;
import motherlode.client.model.ItemModelDefinition;
import motherlode.util.InitUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab;
import net.minecraft.block... |
def assertConvsConnectedToGammas(self, conv_names, gamma_prefixes, mapper):
def make_set(item):
return item if isinstance(item, set) else set([item,])
convs = [get_op(conv_name) for conv_name in conv_names]
gamma_sets = [make_set(mapper.get_gamma(conv)) for conv in convs]
if len(gamma_sets) > 1:
... |
<gh_stars>10-100
#ifdef USE_MSVC
/**
* Include Header
*/
#include "Plugin.h"
/**
* Include Engine
*/
#include <ING/Engine/Engine.h>
/**
* Include Debug
*/
#include <ING/_Debug/Debug.h>
namespace ING {
namespace MSVC {
/**
* Constructors And Destructor
*/
Plugin::Plugin(const WString& path)... |
// Tests a known result of a homography estimation.
TEST(DLT, KnownTransforms1) {
vector<Vec2f> input{
{0, 0},
{0, 1},
{1, 1},
{1, 0}};
vector<Vec2f> output{
{0, 0},
{0, 2},
{2, 2},
{2, 0}};
Mat3f GT = Mat3f::Identity();
GT(0, 0) = 2;
GT(1, 1) = 2;
constexpr f... |
// helper file to unzip the WAR file contents
private static void unjar(String zipFile, String outputDirectory) throws IOException {
byte[] buffer = new byte[1024];
ZipFile archive = new ZipFile(new File(zipFile));
try {
Enumeration<? extends ZipEntry> entries = archive.entries();
while (entries.hasMoreElem... |
We have featured one of these Camaro Pace Cars in the past, but it was in pieces. I’m not sure which is worse though. This body is full of rust and everything else is deteriorated. What is there though appears to be original and there is documentation to prove the car’s pedigree. As can be evidenced by the quantity of ... |
// Checks that we index member variables.
//- @C defines/binding ClassC
//- @f defines/binding FieldF
//- FieldF childof ClassC
//- FieldF typed vname("int#builtin",_,_,_,_)
//- FieldF.node/kind variable
//- FieldF.subkind field
class C { int f; };
|
#include "Scanner.h"
#include <string.h>
#define TYPE_BUFFER 0
#define TYPE_FILE 1
void Scanner_InitFromString(Scanner_T * scanner, const char * string)
{
scanner->type = TYPE_BUFFER;
scanner->file = NULL;
scanner->index = 0;
scanner->buffer = string;
scanner->size = strlen(string);
scanner->lin... |
/**
*
* @author Mustafa SACLI
*/
public final class ConfigurationManager {
public static DbConfiguration getConfiguration(String connection_name) {
DbConfiguration db_conf
= get_configuration("C:/JvFreeOrm/conf/config.xml", connection_name);
return db_conf;
}
public stat... |
<reponame>novemberde/lang-practice
sum = lambda a,b: a+b
print(sum(1,3)) # 4 |
/** \brief Sorts points in a point array.
*
* arr array uses NR standard indexing i.e arr[1...n]
* but brr[0..n-1]
* if the point array is two-way-coupled to another point array
* the image pointers of that array will follow sort
* if the array is not two-way-coupled to another the image
* pointe... |
/**
* Handle request coming from Lambda. Call Message Parser.
* @param input - String input from lambda
* @param context - Lambda context
* @return output from message parser
*/
public String handleRequest(String input, Context context) {
MessageParser parser = new MessageParser();
... |
from django.contrib import admin
from durin.models import Client
from .models import ClientSettings
class ClientSettingsInlineAdmin(admin.StackedInline):
"""
Django's StackedInline for :class:`ClientSettings` model.
"""
model = ClientSettings
list_select_related = True
extra = 1
class Cl... |
FM-Indexing Grammars Induced by Suffix Sorting for Long Patterns
The run-length compressed Burrows-Wheeler transform (RLBWT) used in conjunction with the backward search introduced in the FM index is the centerpiece of most compressed indexes working on highly-repetitive data sets like biological sequences. Compared t... |
def init_plate_locations(self):
if self.fms_scale == 'R':
self.scale_init_waypoint = reflect_2d_y(self.SCALE_INIT_WAYPOINT)
self.scale_deposit = reflect_2d_y(self.SCALE_DEPOSIT)
self.scale_deposit_waypoint = reflect_2d_y(self.SCALE_DEPOSIT_WAYPOINT)
self.scale_dep... |
Adoption of care management activities by primary care nurses for people with common mental disorders and physical conditions: a multiple case study.
INTRODUCTION
Few studies assessed current nursing practices before implementing the collaborative care model and the role of care manager for people with common mental d... |
def default_hashing(positions, res):
return positions[:,0]*res+positions[:,1] |
//----------------------------------------------------------------------------
// Default XML channel file name.
//----------------------------------------------------------------------------
ts::UString ts::ChannelFile::DefaultFileName()
{
#if defined(TS_WINDOWS)
static const UChar env[] = u"APPDATA";
static c... |
// String returns a formatted Metrics string scaled
// to a width of s.
func (h *Histogram) String(s int) string {
if h == nil {
return ""
}
var min, max uint64 = math.MaxUint64, 0
for _, bin := range *h {
for _, v := range bin {
if v > max {
max = v
}
if v < min {
min = v
}
}
}
switch l... |
<filename>src/unifrac.cpp<gh_stars>10-100
/*
* BSD 3-Clause License
*
* Copyright (c) 2016-2021, UniFrac development team.
* All rights reserved.
*
* See LICENSE file for more details
*/
#include "tree.hpp"
#include "biom_interface.hpp"
#include "unifrac.hpp"
#include "affinity.hpp"
#include <unordered_map>
#in... |
<reponame>Srijanjha/FormulaCLI<filename>formulacli/result_tables.py
from datetime import datetime
from typing import Optional, List
import pandas as pd
from bs4 import BeautifulSoup
from formulacli.html_handlers import get_response, parse
def get_result_table(soup: BeautifulSoup) -> Optional[BeautifulSoup]:
try... |
package com.lingkj.project.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lingkj.common.utils.PageUtils;
import com.lingkj.project.api.user.dto.AccountBindingDto;
import com.lingkj.project.user.entity.UserToken;
import com.lingkj.project.user.entity.UserWorthMentioning;
import ja... |
The same exemplary precision found on the high-end iPhones is also found on the iPhone SE. At last, you don't have to feel that you're settling just to get a phone that's easier to handle.
Handling the iPhone SE is a lovely affair, particularly if you're coming from the iPhone 6S Plus. It's dainty - cute, even - and a... |
<gh_stars>1-10
package com.github.alexivchenko.filefinder.core;
import java.io.File;
import java.io.InputStream;
import java.util.Collections;
import java.util.List;
/**
* @author <NAME>
*/
public class RobustXmlCrawler implements XmlCrawler {
private final XmlCrawler delegate;
public RobustXmlCrawler(XmlC... |
def _radar(
df: pd.DataFrame, ax: plt.Axes, label: str, all_tags: Sequence[str],
color: str, alpha: float = 0.2, edge_alpha: float = 0.85, zorder: int = 2,
edge_style: str = '-'):
tmp = df.groupby('tag').mean().reset_index()
values = []
for curr_tag in all_tags:
score = 0.
selected = tmp[tmp['... |
<reponame>interlay/polkabtc-ui
import { ReactElement } from 'react';
import { useTranslation } from 'react-i18next';
import clsx from 'clsx';
import VaultTable from '../../../common/components/vault-table/vault-table';
import ActiveVaults from '../components/active-vaults';
import CollateralLocked from '../components/... |
import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";
import {form_contrib} from "./form_contrib";
@Entity("datos_formularios",{schema:"redcobrosjp" } )
export class datos_formularios extends BaseEntity {
... |
//
// FILE: MS5611.h
// AUTHOR: <NAME>
// Erni - testing/fixes
// VERSION: 0.1.8
// PURPOSE: MS5611 Temperature & Pressure library for Arduino
// URL:
//
// HISTORY:
// see MS5611.cpp file
//
#ifndef MS5611_h
#define MS5611_h
#if ARDUINO < 100
#error "VERSION NOT SUPPPORTED"
#else
#include <Arduino.h... |
/*
Copyright 2016 Medcl (m AT medcl.net)
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, so... |
/** Returns whether the queue is empty. */
bool myQueueEmpty(MyQueue* obj) {
if (obj == NULL) return true;
if (obj->tail == NULL) {
return true;
}
return false;
} |
import { Component, OnInit, Input, Output, EventEmitter, OnDestroy } from '@angular/core';
import axios from 'axios';
import { Subscription } from 'rxjs';
import { CommonService, AxiosService, I18nService, MessageService } from '../../../../service';
@Component({
selector: 'app-package-progress',
templateUrl: './p... |
<filename>AirballBase/src/org/schmivits/airball/airdata/N42PEUARTFlightData.java
package org.schmivits.airball.airdata;
import android.content.Context;
/**
* A N42PEUARTFlightData assumes the Android device is connected to a Prolific USB-to-serial
* interface that is in turn connected to the RS-232 output port of a... |
package core;
import static GUI.GUIHelper.imgPath;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
/**
* Provides static methods and variables for MedicineUI
*
* @author jMedicine
* @version 0.7.13
* @... |
/**
* Pulls the current clock from this historical event recording.
*
* @return
*/
public static GamePhaseCurrentTime generateGamePhaseCurrentTime(
GameClockEvent gce) {
GamePhaseCurrentTime gpct = new GamePhaseCurrentTime();
gpct.setCurrentInterval(gce.currentInterval);
gpct.setCurrentIntervalSta... |
/**
* Generates token and creates asynchronous operation.
* Sets token to session and response.
* @param message {
* "sessionId": "session identifier for save as async data",
* "expiredTime": "TTL for async operation"
* }
* @throws CreateAsyncOperationAct... |
#include <bits/stdc++.h>
using namespace std;
struct Node {
int data;
Node *next, *prev;
};
Node* merge( Node* a, Node* b)
{
// Base cases
if (!a)
return b;
if (!b)
return a;
if (a->data <= b->data)
{
a->next = merge(a->next, b);
a->next->prev = a;
a->prev = NULL;
return a... |
package main
import (
"context"
"encoding/base64"
"github.com/Venafi/aws-private-ca-policy-venafi/common"
"github.com/Venafi/vcert"
"github.com/Venafi/vcert/pkg/endpoint"
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go-v2/aws/external"
"github.com/aws/aws-sdk-go-v2/service/kms"
"log"
"os"
"... |
<filename>src/block/block_content/block_content_impl.hpp<gh_stars>0
/**********************************************************************************************************************
*
* Copyright (c) 2017-2018 <NAME>
*
* License: MIT
* Permission is hereby granted, free of charge, to any person obtaining a c... |
I rather imagine that we are going to be repeating this question a lot this season:
What did we learn today?
To start with, we learned that yes, an opposing player can be MOTM. “Tono” Rodriguez, a 32-year-old keeper formerly of Racing Santander, was spectacular today. No. He was absurd, that kind of head-smacking goo... |
N = []
for i in range(6):
N.append(int(input()))
ans = "Yay!"
for i in range(5):
for j in range(i+1,5):
dist = abs(N[j] - N[i])
if dist > N[5]:
ans = ":("
print(ans)
##5m |
def run(self):
try:
server_socket = socket.socket()
server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server_socket.bind(('0.0.0.0', 8000))
server_socket.listen(0)
connection = server_socket.accept()[0].makefile('rb')
try:... |
Functions satisfying holonomic q-differential equations
Abstract. In a similar manner as in the papers and , where explicit algorithms for finding the differential equations satisfied by holonomic functions were given, in this paper we deal with the space of the q-holonomic functions which are the solutions of line... |
"My child has asthma": some answers to parents' questions.
The incidence of asthma appears to have doubled since the 1970s. 15% of children in the UK are now estimated to have the condition. Children's asthma needs to be taken seriously by parents, health professionals and teachers. Its severity varies and it is a pot... |
def video_set_subtitle_file(self, psz_subtitle):
e=VLCException()
return libvlc_video_set_subtitle_file(self, psz_subtitle, e) |
/**
* Returns a type identifier for the specified array of values (integers), while using a cache
*
* @param values
* an array of values (integers)
* @return a type identifier
*/
static int typeIdentifierFor(int... values) {
int j = IntStream.range(0, types.size()).filter(i -> Arrays.equals(va... |
// MergeValidationResults merge all validate result from
func MergeValidationResults(ctx context.Context, k8sResources kube.K8SResource, channels ...<-chan v1alpha1.AuditResult) (kube.K8SResource, <-chan v1alpha1.AuditResult) {
result := make(chan v1alpha1.AuditResult)
var wg sync.WaitGroup
wg.Add(len(channels))
me... |
// tgrid makes a clickable grid of tweets from the Atom feed
func tgrid(t Feed, x, y, w, h, nc int) {
var slink, imlink string
xp := x
for i, entry := range t.Entry {
for _, link := range entry.Link {
switch link.Rel {
case "alternate":
slink = link.Href
case "image":
imlink = link.Href
}
}
... |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
#define pb push_back
#define mp make_pair
#def... |
Requirement for Knowledge Management System
Knowledge Management (KM), defined as the creation and application of new knowledge, is becoming a good source of competitive advantage. Employee innovation is increased by the development and sharing of knowledge. Failure to implement a knowledge management system for the o... |
House Intelligence Committee member Rep. Trey Gowdy (R-SC) said Thursday that “classified” information about conversations by members of President Donald Trump’s administration “should never have made it to the public domain.”
“We cannot overlook the fact that the methodology of the collection and the content of that ... |
<filename>src/linux-3.7.10/drivers/staging/iio/adc/mxs-lradc.c
/*
* Freescale i.MX28 LRADC driver
*
* Copyright (c) 2012 DENX Software Engineering, GmbH.
* <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published... |
<filename>dist/lib/ann/index.d.ts
import * as T from './types';
export { T };
export { ANN } from './ANN';
export { default } from './create';
|
<gh_stars>10-100
from msdsl import *
r0, r1, c = 1234, 2345, 1e-9
m = MixedSignalModel('rc', dt=0.1e-6)
u = m.add_analog_input('u')
k = m.add_digital_input('k')
x = m.add_analog_output('x')
g = eqn_case([1/r0, 1/r1], [k])
m.add_eqn_sys([c*Deriv(x) == (u-x)*g])
m.compile_and_print(VerilogGenerator()) |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int ui;
typedef vector<int> vi;
typedef vector<ui> vui;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<vui> vvui;
typedef vector<v... |
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
expr_stat.cpp
Abstract:
Expression statistics (symbol count, var count, depth, ...)
All functions in these module assume expressions do not contain
nested quantifiers.
Author:
Leonardo de Moura (leonardo) 2008-02-05.
Revision... |
<gh_stars>1-10
import json
import urllib3
from botocore.config import Config
import botocore
import boto3
import enum
import traceback
import time
CREATE_SUCCEEDED = "CREATE_COMPLETE"
CREATE_FAILED = ["CREATE_FAILED", "ROLLBACK_COMPLETE", "ROLLBACK_FAILED"]
DELETE_SUCCEEDED = "DELETE_COMPLETE"
DELETE_FAILED = ["DELET... |
Foundations of cumulative culture in apes: improved foraging efficiency through relinquishing and combining witnessed behaviours in chimpanzees (Pan troglodytes)
A vital prerequisite for cumulative culture, a phenomenon often asserted to be unique to humans, is the ability to modify behaviour and flexibly switch to mo... |
<gh_stars>0
package morganfield
import (
"net"
"strings"
)
type suffixlist struct {
Internal_Host string
External_Host string
}
// Fqdns only
// dev.localdomain OK
// .localdomain NOT ok
func (s suffixlist) PublicSuffix(domain string) string {
// By default everything is public -> do not allow setting cookie
r... |
<filename>Activiti-master/modules/activiti-form-engine/src/main/java/org/activiti/form/engine/impl/persistence/deploy/DeploymentManager.java
/* 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
... |
import { Context } from 'koa';
export interface IHealthcheckResponse {
readonly status: number;
readonly body: {
readonly status: string;
};
}
export async function getHealthcheck(_ctx: Context): Promise<IHealthcheckResponse> {
return {
status: 200,
body: {
status: 'OK',
},
};
}
|
// SPDX-License-Identifier: (BSD-3-Clause OR GPL-2.0-only)
/* Copyright(c) 2014 - 2020 Intel Corporation */
#include "adf_accel_devices.h"
#include "adf_common_drv.h"
#include "adf_transport_internal.h"
#define ADF_ARB_NUM 4
#define ADF_ARB_REG_SIZE 0x4
#define WRITE_CSR_ARB_SARCONFIG(csr_addr, arb_offset, index, val... |
Duncan: Hey! Nice to meet you too. Just so you guys know I’ve got about an hour and then I’ve got a moving, I’m in the middle of moving so I’m up to my neck in boring tasks outside of this which is wonderful but I’ve got all this year packing up chords and Incredibly mundane things I have to do.
Euvie: So, what’s the ... |
/**
* This method reads all the lifecycle configuration files from a folder and add the already added configurations
* as aspects.
*
* @param registry tenant registry
* @param rootRegistry root registry
* @return
* @throws RegistryException
* @throws FileNotFoundException
... |
When it comes to alcoholic beverages, I’m a wine guy first and foremost, then a Scotch & bourbon guy. Until recently if someone mentioned rum and didn’t say Coke right after it or mention mojito’s, I wasn’t quite sure what they were getting at. But then aged rum started hitting my periphery. One reason was some friends... |
<gh_stars>0
import logging
from typing import Dict, Any
import emails
from application.core.config import config
def send_email(
email_to: str,
subject: str = '',
text: str = '',
environment: Dict[str, Any] = {}, # noqa
) -> None:
assert config.EMAILS_ENABLED, 'no provided configu... |
GOCAD TSurf 1
HEADER {
name:<NAME>
*visible:false
*solid*color:0.000000 0.666667 1.000000 1
}
GOCAD_ORIGINAL_COORDINATE_SYSTEM
NAME Default
AXIS_NAME "X" "Y" "Z"
AXIS_UNIT "m" "m" "m"
ZPOSITIVE Elevation
END_ORIGINAL_COORDINATE_SYSTEM
TFACE
VRTX 1 1728805.20585289 5237972.34014042 -12232.27186601
VRTX 2 1... |
/// Create a new HibernateKeyManager, with no keys.
pub fn new() -> Self {
HibernateKeyManager {
private_key: None,
public_key: None,
}
} |
/**
* This function is called once when teleop is enabled.
*/
@Override
public void teleopInit() {
if(wasAuto) {
wasAuto = false;
Drivetrain.getInstance().getPigeon().setYaw(Drivetrain.getInstance().getOdometry().getPoseMeters().getRotation().getDegrees());
Drivetrain.getInstance().getOdom... |
def update(self, true_labels, pred_labels):
if len(pred_labels.shape) > 1:
pred_labels = np.argmax(pred_labels, axis=-1)
conf_matrix = np.bincount(
self.n_classes * true_labels.astype(int) + pred_labels.astype(int),
minlength=self.n_classes ** 2
).reshape(self... |
<reponame>miaoyinjun/boot-admin
package org.jjche.system.modules.system.service;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import lombok.RequiredArgsConstructor;
import org.jjche.cache.service.RedisService;
import org.jjche.common.constant.CacheKey;
i... |
lenght = 0
amount = 0
for _ in range(5):
row = input()
lenght += 1
if '1' in row:
row = row.split()
index = row.index('1')
current = (lenght, index)
lenght = current[0]
while lenght != 3:
if lenght < 3:
lenght += 1
amount += 1
elif lenght > 3:
... |
<reponame>daku10/leetcode-study
package main
func jump(nums []int) int {
indexDistanceMap := make(map[int]int)
indexDistanceMap[0] = 0
length := len(nums)
innerJump(nums, 0, length, indexDistanceMap)
return indexDistanceMap[length - 1]
}
func innerJump(nums []int, index int, length int, indexDistanceMap map[... |
// Last returns the most recent datapoint for a metric+tagset. The metric+tagset
// string should be formated like os.cpu{host=foo}. The tag porition expects the
// that the keys will be in alphabetical order.
func Last(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error) {
var counter bo... |
Nine years have passed since Fred Clarke and Cesar Pelli conceived the design notion of a San Francisco transit center wrapped in an undulating skin and topped by a quarter-mile-long park.
Now the two leaders of Pelli Clarke Pelli Architects can stand inside and look out through sections of that skin. The glossy visio... |
from aws_cdk import core, aws_iam as iam, aws_lambda as _lambda
from aws_cdk.core import CustomResource
import aws_cdk.aws_logs as logs
import aws_cdk.custom_resources as cr
import uuid
import json
class ScpPolicyResource(core.Construct):
def __init__(
self,
scope: core.Construct,
id: ... |
<reponame>Sinnlos/PierwiastkiChemiczne<gh_stars>0
package com.s14014.tau.service;
/*
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.text.SimpleDateFormat;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.