content stringlengths 10 4.9M |
|---|
def crf_decoding_layer(input, size, label=None, param_attr=None, name=None):
assert isinstance(input, LayerOutput)
assert label is None or isinstance(label, LayerOutput)
ipts = [Input(input.name, **param_attr.attr)]
if label is not None:
ipts.append(Input(label.name))
Layer(
name=nam... |
LAS VEGAS—Government leaders in the United States and Mexico are close to signing a pact to add areas south of the border to Colorado River water sharing agreements involving seven Western U.S. states, officials said Friday.
U.S. Bureau of Reclamation officials characterized the talks as delicate while final documents... |
/*
Copyright 2012-2018 <NAME>, <NAME>, Yiancar
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in ... |
<gh_stars>10-100
#ifndef MAPI_H_INCLUDED
#define MAPI_H_INCLUDED
#ifdef DONT_HAVE_BUILTIN_EXPECT
#define __unlikely(cond) __builtin_expect(!!(cond), 0)
#define __likely(cond) __builtin_expect(!!(cond), 1)
#else
#define __unlikely(cond) (cond)
#define __likely(cond) (cond)
#endif /* DONT... |
Kinetic studies of coke formation and removal on HP40 in cycled atmospheres at high temperatures.
An austenitic FeNiCr alloy, HP40Nb, has been preoxidized and subsequently exposed to an alternating carburizing/oxidizing /carburizing atmosphere. During the oxidation at 1000°C a thick Cr 2 O 3 layer was formed which par... |
use super::*;
use std::fmt::{Display, Error, Formatter};
impl Display for BddVariable {
fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {
f.write_fmt(format_args!("{}", self.0))
}
}
impl BddVariable {
/// Convert to little endian bytes
pub(super) fn to_le_bytes(self) -> [u8; 2] {
... |
/**
* Loads clients from the database.
*
* @param con that will be used for the queries
* @throws SQLException
* in case loading queries fail
*/
public void loadClients(Connection con) throws SQLException {
clients.clear();
String loadSQL = "select client_id, client_name, phone_number, crea... |
// Delete will delete a User Favorite from the datastore
func (p *FavoritesDBStore) Delete(userGUID string, guid string) error {
if _, err := p.db.Exec(deleteFavorite, userGUID, guid); err != nil {
return fmt.Errorf("Unable to delete User Favorite record: %v", err)
}
return nil
} |
// RegisterTransport transport module init function call this function register transport
func RegisterTransport(transport Transport) {
if err := globalRegister.add(transport); err != nil {
panic(err)
}
} |
// Tests basic initialization and makes sure that the proper metrics are updated with an insert.
TEST_F(CounterTest, InitializationSanity) {
Counter::CounterTimeConfig test_time_config = {pair<uint64_t, int> (5000, 2),
pair<uint64_t, int> (10000, 2)};
Counter::Metr... |
// SetInactive sets a finding as inactive
func (r *CommandCenter) SetInactive(ctx context.Context, name string) (*crm.Finding, error) {
return r.client.SetFindingState(ctx, &crm.SetFindingStateRequest{
Name: name,
State: crm.Finding_INACTIVE,
StartTime: timestamppb.Now(),
})
} |
<filename>types/global.d.ts<gh_stars>0
/** Global definitions for development **/
// for style loader
declare module '*.css' {
const styles: any;
export = styles;
}
// Omit type https://github.com/Microsoft/TypeScript/issues/12215#issuecomment-377567046
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K... |
An SVM-based Query Monitoring Method For Inference Control
Many widely-used data sharing applications rely on allowing untrusted clients to query against secret data. Inference control for secure data is a key issue. In these scenarios, the owner of secret data opens the secret data for querying to provide general inf... |
<filename>read-co2-sensor.py
import os
import datetime
import sys
import getopt
def get_last_modified_file(directory):
dated_files = [(os.path.getmtime(os.path.join(directory, fn)), os.path.join(directory, fn))
for fn in os.listdir(directory) if fn.lower().endswith('.csv')]
dated_files.sort()
dat... |
def check_bot(self):
if self._data.get('bot_id'):
if self._data.get('bot_id') == self._kwargs.get('botid'):
self.command = False
elif self.user == self._kwargs.get('botid'):
self.command = False
return |
KAKRAPAR: It was a red letter day in the history of India's nuclear power generation. The work on the first pair of indigenously designed 700 MW pressurized heavy water reactors (PHWRs) of Nuclear Power Corporation of India Limited ( NCPIL ) started at Kakrapar Atomic Power Project (KAPP) with the first pouring of conc... |
def list_dhcp_agent_networks(qclient, agent_id):
resp = qclient.list_networks_on_dhcp_agent(agent_id)
LOG.debug("list_networks_on_dhcp_agent: %s", resp)
return [s['id'] for s in resp['networks']] |
A Magnetic Alpha-Omega Dynamo in Active Galactic Nuclei Disks: I. The Hydrodynamics of Star-Disk Collisions and Keplerian Flow
A magnetic field dynamo in the inner regions of the accretion disk surrounding the supermassive black holes in AGNs may be the mechanism for the generation of magnetic fields in galaxies and i... |
When Gran Turismo 5 was released, something unusual in the game’s Kyoto Photo Travel Location caught the attention of our community: a curiously detailed little cat. He blinked, turned his head, looked around, and generally drove people crazy.
When GTPlanet member MadmuppGT created a thread in our forums about the cat... |
def do_inconclusive(self, meeting: Meeting, context: Context, operation: str, operand: str, message: TrackedMessage) -> None:
if meeting.is_chair(message.sender):
meeting.vote_in_progress = False
meeting.motion_index = None
meeting.track_event(EventType.INCONCLUSIVE, message,... |
def check_version(args):
version_str_set = set()
file_vars_set = load_file_vars_set(args.pyproject_file, args.file_vars)
for file_var_str in sorted(file_vars_set):
print(f"Processing {file_var_str}")
file, var_name = file_var_str.split(":", 1)
file_path = Path(file).resolve()
... |
We are all Melmottes now
Hot/cold on the heels of Iceland’s quasi-default, the Roger Lowenstein in the NY Times urges underwater/negative equity homeowners to “Walk Away From Your Mortgage!”. . Lowenstein’s key point is that businesses (including those owned or controlled by the banks themselves) treat default as a st... |
def cal_ndcg_loo(self):
full, top_k = self._subjects, self._top_k
top_k = full[full['rank'] <= top_k]
test_in_top_k = top_k[top_k['test_item'] == top_k['item']]
test_in_top_k['ndcg'] = test_in_top_k['rank'].apply(
lambda x: math.log(2) / math.log(1 + x))
return test... |
Dapsone: A Novel Corrosion Inhibitor for Mild Steel in Acid Media
Abstract: Corrosion inhibition of mild steel in 1 M HCl and 0.5 M H 2 SO 4 by dapsone were studied by polarization resis-tance, Tafel polarization, electrochemical impedance spectroscopy (EIS) and weight loss measurement. Results obtained revealed that ... |
Interventions for treating simple bone cysts in the long bones of children.
BACKGROUND
Simple bone cysts, also known as a unicameral bone cysts or solitary bone cysts, are the most common type of benign bone lesion in growing children. Cysts may lead to repeated pathological fracture (fracture that occurs in an area o... |
/**
* @author shiyuanchen
* @project LeetCode
* @since 2020/06/01
*/
public class P245_ShortestWordDistanceIII {
public int shortestWordDistance(String[] words, String word1, String word2) {
long dist = Integer.MAX_VALUE, i1 = dist, i2 = -dist;
for (int i = 0; i < words.length; i++) {
if (words[i].... |
// CountTransactions returns the number of transactions matching the filter options.
func (s *DBService) CountTransactions(user *User, options TransactionFilterOptions) (uint64, error) {
var count uint64
emptyFilter := options.IsEmpty()
err := s.view(func() error {
handleFn := func(transactionUUID string) error {
... |
/**
* The main class for the playspace deploy wizard
*/
public class PVSystemGui extends JPanel implements ActionListener
{
public static final GridBagConstraints gbc = null;
private static final String LOAD_CARD = "Load profile";
private static final String SOLAR_CARD = "Solar irradiance profile";
... |
/**
* The builder builds a specific {@link GobblinTrackingEvent} whose metadata has {@value GobblinEventBuilder#EVENT_TYPE}
* to be {@value LineageEventBuilder#LINEAGE_EVENT_TYPE}
*
* Note: A {@link LineageEventBuilder} instance is not reusable
*/
@Slf4j
public final class LineageEventBuilder extends GobblinEventB... |
<filename>src/test/java/Conditions.java
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class Conditions extends BaseUI {
@Test
public void te... |
The Chicago Bears’ 2016 NFL Draft class ranks extremely well just a year after the event.
Chicago Bears general manager Ryan Pace has not been perfect. His 2015 draft class leaves plenty to be desired and he has been constantly criticized for his work in the 2017 NFL Draft. That being said, Pace and the Bears front of... |
Fixed points fix estimates: The accuracy of an effect size estimate is described by its sample’s conditional algorithmic information, as computed across rank permutations
Every statistical estimate is equal to the sum of a nonrandom component, due to parameter values and bias, and a random component, due to sampling e... |
import sys
def text_match_word(text, words):
for word in words:
if word == text[:len(word)]:
return word
words_next = (("dream", "er"), ("erase", "r"))
words_next_dict = dict(words_next)
s = input()
before_match_word = ""
while "" != s:
search_words = list(words_next_dict.keys())
if ... |
/*
* Summary: SAX2 parser interface used to build the DOM tree
* Description: those are the default SAX2 interfaces used by
* the library when building DOM tree.
*
* Copy: See Copyright for the status of this software.
*
* Author: Daniel Veillard
*/
#ifndef __XML_SAX2_H__
#define __XML_SAX2_H__
... |
def cleanup_at_exit():
global lockfilename
if lockfilename:
os.remove(lockfilename)
lockfilename = None |
import React from 'react';
import { Container } from '../Container';
export default {
title: '@co-design/core/Container',
component: Container,
argTypes: {
size: {
defaultValue: 'medium',
options: ['xsmall', 'small', 'medium', 'large', 'xlarge'],
control: { type: 'inline-radio' },
},
... |
This is an artist's impression of the large stellar void stretching 8,000 light-years from the center of the Milky Way. Astronomers of the new research found no young stars called Cepheids in this vast region.
A vast tract of space near the center of the Milky Way — in an area called the inner disk — is completely dev... |
<filename>api/selftest.go
package api
import (
"fmt"
log "github.com/Sirupsen/logrus"
)
func findAgentsInHistoryServiceSelfTest(pastTime string) error {
finder := &findAgentsInHistoryService{
pastTime: pastTime,
next: nil,
}
nodes, err := finder.find()
if err != nil {
return err
}
if len(nodes) == ... |
//-----------------------------------------------------------------------------
// Resource preloading for cubemaps.
//-----------------------------------------------------------------------------
class CResourcePreloadCubemap : public CResourcePreload
{
virtual bool CreateResource( const char *pName )
{
ITexture *... |
package com.mark59.datahunter.api.rest.samples;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.List;
import com.mark59.datahunter.api.application.DataHunterConstants;
import com.mark59.datahunter.api.data.beans.Policies;
import com.mark59.datahunter.api.model... |
Just over a month after the launch of Java 8, it was announced yesterday that, after a massive two year effort, Java ME 8 is now officially GA (click here for a full feature tour, courtesy of Steve Meloan and Oracle senior technologist and product manager Terrence Barr).
Java ME 8 constitutes a major update to the exi... |
Two-loop non-planar hexa-box integrals with one massive leg
Based on the Simplified Differential Equations approach, we present results for the two-loop non-planar hexa-box families of master integrals. We introduce a new approach to obtain the boundary terms and establish a one-dimensional integral representation of ... |
/*
* Copyright 2015-2016 USEF 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
*
* Unless required by applicable law or agree... |
Syntactic‐semantic relationships in the mental lexicon of aphasic patients
This paper examines the relative values of syntactic‐semantic relationships in the mental lexicon of aphasic patients, which were tested within syntagmatic and paradigmatic networks of lexical relations. Semantic relations, such as synonymy, an... |
<filename>UVa 10360 - Rat Attack/sample/10360 - Rat Attack.cpp
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int g[1025][1025];
int main() {
int testcase, n, d;
scanf("%d", &testcase);
while(testcase--) {
scanf("%d %d", &d, &n);
memset(g, 0, sizeof(g));
... |
package com.sequenceiq.cloudbreak.cmtemplate.configproviders.profilermanager;
import com.cloudera.api.swagger.model.ApiClusterTemplateConfig;
import com.google.common.annotations.VisibleForTesting;
import com.sequenceiq.cloudbreak.api.endpoint.v4.database.base.DatabaseType;
import com.sequenceiq.cloudbreak.cmtemplate.... |
def quiz1(self):
_, ax = plt.subplots(len(_data_file_list), figsize=(12, 7))
datas = {}
for i, file in enumerate(_data_file_list):
pair_name = file.split('_')[1]
pair_data = pd.read_csv(
_data_path / file, index_col='Date', parse_dates=True, skiprows=1)
... |
import { parseISO, format } from "date-fns";
import styles from "./date.module.scss";
import CalendarIcon from "./../../assets/Icons/Calendar.svg";
import ClockIcon from "./../../assets/Icons/Clock.svg";
export default function Date({ dateString }: { dateString: string }) {
const date = parseISO(dateString);
retur... |
/** Gnome libs imports */
import * as GObject from 'gobject';
import { registerGObjectClass } from 'src/utils/gjs';
import * as St from 'st';
/** Extension imports */
const Me = imports.misc.extensionUtils.getCurrentExtension();
@registerGObjectClass
export class MatDivider extends St.Widget {
static metaInfo: GO... |
def element_count( atoms ):
res = {}
for atom in atoms:
if ( not atom.symbol in res.keys() ):
res[atom.symbol] = 1
else:
res[atom.symbol] += 1
return res |
<gh_stars>0
/**
* Copyright 2015 @ to2.net.
* name : odl_to_go
* author : jarryliu
* date : 2016-07-19 19:40
* description :
* history :
*/
package parser
import (
"bytes"
"sync"
)
var _ Parser = new(odlToGo)
type odlToGo struct {
mux sync.Mutex
buf *bytes.Buffer
}
func NewOdlToGo() *odlToGo {
return &o... |
/// The total balance involved in this vote.
pub fn balance(self) -> Balance {
match self {
AccountVote::Standard { balance, .. } => balance,
AccountVote::Split { aye, nay } => aye.saturating_add(nay),
}
} |
use built::Options;
use std::path::{Path, PathBuf};
fn main() {
let mut default: Options = Options::default();
let options = default
.set_compiler(true)
.set_cfg(true)
.set_ci(false)
.set_dependencies(false)
.set_git(true)
.set_env(true)
.set_features(tru... |
Who would think a cookie could create such controversy and eventual sweet victory? After years of legal maneuvers and grassroots organizing, Wisconsin bakers can sell homemade baked goods thanks to a judge’s ruling in 2017. New Jersey is now the only state still with a ban on the sale of homemade baked goods.
Thanks t... |
/**
* Contains ACH/ECP account details for vaulted shoppers
*/
export declare type EcpAccountType = 'CONSUMER_CHECKING' | 'CONSUMER_SAVINGS' | 'CORPORATE_CHECKING' | 'CORPORATE_SAVINGS';
export interface EcpRequest {
accountNumber: string;
routingNumber: string;
accountType: EcpAccountType;
}
export inter... |
AlphaGo Zero uses 4 TPUs, is built entirely out of neural nets with no handcrafted features, doesn’t pretrain against expert games or anything else human, reaches a superhuman level after 3 days of self-play, and is the strongest version of AlphaGo yet.
The architecture has been simplified. Previous AlphaGo had a poli... |
Dr. Greer is a retired medical doctor turned ufologist who claims to have briefed sitting Presidents of the United States, members of the Joint Chiefs of Staff, congressmen, and other figures in government. He is known for the Disclosure Project hearings that took place in 2001 and 2013, as well as the widely successfu... |
<filename>app/src/main/java/net/droidlabs/mvvmdemo/binder/SuperUserBinder.java
package net.droidlabs.mvvmdemo.binder;
import net.droidlabs.mvvm.recyclerview.adapter.binder.ConditionalDataBinder;
import net.droidlabs.mvvmdemo.viewmodel.SuperUserViewModel;
import net.droidlabs.mvvmdemo.viewmodel.UserViewModel;
public c... |
#include<stdio.h>
int main(){
int n,i,j,k1,k2;
long prt1[100000];
long prt2[100000];
long tmp;
int res[100000][2]={0};
scanf("%d",&n);
for (i=0;i<n;i++){
scanf("%ld %ld",&prt1[i],&prt2[i]);
}
k1=0;
k2=0;
for (j=0;j<n/2;j++){
res[j][0]=1;
res[j][1]=1;
}
while (k1+k2<n){
if (prt1[k1]<prt2[k... |
export class Schedule {
id: string;
title: string;
creator: string;
description: string;
location: string;
timeStart: Date;
timeEnd: Date;
constructor(obj: any) {
this.id = obj.id;
this.title = obj.title;
this.creator = obj.creator;
this.description = obj.description;
this.location... |
<reponame>fossabot/pedrolamas.com<gh_stars>1-10
import React from 'react';
import SidebarSocialLink from './sidebarSocialLink';
import SiteContext from '../../../siteContext';
import { FontAwesome } from '../../../../utils';
type SidebarSocialProps = {
children?: never;
};
const SidebarSocial: React.FunctionCompon... |
Reduction of noise transmission through an aperture using active feedforward noise control.
A local active noise control technique has been applied to reduce noise emission through an aperture in the wall of the enclosure. Pressure cancellation was effected at the center of an aperture of 0.3×0.3 m2 for an enclosure o... |
from __future__ import absolute_import, division, print_function
from __future__ import unicode_literals
import sys
import os
from random import randint
import datetime
import time
from multiprocessing import Pool, TimeoutError
from collections import defaultdict
from scipy.stats import chisquare
from mmgroup impo... |
/**
* Test counts in a given table
*
* @param table Table name
* @param aggregateAttribute Aggregate attribute
* @param componentId Component ID
* @param expectedCount Expected count
* @throws AnalyticsException
*/
private void... |
// ParseObjects return a string yaml and return a array of the objects/items from a Template/List kind
func ParseObjects(source string) (Objects, error) {
var template Object
err := yaml.Unmarshal([]byte(source), &template)
if err != nil {
return nil, err
}
if GetKind(template) == ValKindTemplate || GetKind(temp... |
package meta
import (
"time"
"github.com/gogo/protobuf/proto"
"github.com/messagedb/messagedb/meta/internal"
)
// RetentionPolicyInfo represents metadata about a retention policy.
type RetentionPolicyInfo struct {
Name string
ReplicaN int
Duration time.Duration
ShardGroupDura... |
//Reads and parses cell voltages from LTC6804 registers into 'cell_codes' variable.
uint8_t LTC6804_rdcv(uint8_t reg,
uint8_t total_ic,
uint16_t cell_codes[][12],
uint8_t addr_first_ic
)
{
const uint8_t NUM_CELLVOLTAGES_IN_REG = 3;
... |
/* =============================================================================
* preprocessor_convertURNHex
* -- Translate % hex escape sequences
* =============================================================================
*/
void
preprocessor_convertURNHex (char* str)
{
char* src = str;
char* dst = st... |
/**
* Appends the combined random art entries for the provided keys
*
* @param <A> The {@link Appendable} output writer
* @param session The {@link SessionContext} for invoking this load command - may be {@code null} if not invoked
* within a session context (e.g., o... |
/// User clicks on one of the exercise it shows all assignments to that exercise
/// # Arguments
/// path is ```/manage/exercise/{{exercise.id}}```
/// data is my state of the app
pub async fn all_assignments_for_exercise(
path: web::Path<String>,
data: web::Data<State>,
) -> HttpResult {
let id = parse_pat... |
n, k, x = map(int, input().split())
arr = list(map(int, input().split()))
# def collapse(arr):
# if (len(arr) < 3):
# return 0
# start = 0
# currentNumber = arr[0]
# counter = 1
# for i in range(1, len(arr), 1):
# if (i == len(arr) - 1 and arr[i] == currentNumber):
# counter += 1
... |
The New York Times has a story out on how San Diego police use mobile facial recognition devices in the field, including potentially on non-consenting residents who aren’t suspected of a crime. One account from a retired firefighter is especially alarming:
Stopped by the police after a dispute with a man he said was a... |
Lifestyle drugs -- chiefly Viagra -- are costing General Motors $17 million a year and the cost is passed along to car, truck and SUV consumers. The blue pill is covered under GM's labor agreement with United Auto Workers, as well as benefit plans for salaried employees.
GM executives estimate health care adds $1,500 ... |
Let us now address the greatest American mystery at the moment: what motivates the supporters of Republican presidential candidate Donald Trump?
I call it a “mystery” because the working-class white people who make up the bulk of Trump’s fan base show up in amazing numbers for the candidate, filling stadiums and airpo... |
This show has been commercially released as " Europe '72: The Complete Recordings - All The Music Edition"
Set 1
Cold Rain And Snow
Me And Bobby McGee
Chinatown Shuffle
China Cat Sunflower ->
I Know You Rider
Jack Straw
He's Gone
Next Time You See Me
Black Throated Wind
Set 2
Casey Jones
Playing In The Ban... |
ON THE UNIQUENESS OF SOLUTIONS OF STOCHASTIC VOLTERRA EQUATIONS
We prove strong existence and uniqueness, and Hölder regularity, of a large class of stochastic Volterra equations, with singular kernels and non-Lipschitz diffusion coefficient. Extending Yamada-Watanabe’s theorem , our proof relies on an approximation ... |
/**
* Copyright 2007-2008 University Of Southern California
*
* <p>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
*
* <p>http://www.apache.org/licenses/LICENSE-2.0
*
* <p>Unless required b... |
def _move_ssh_key(profile, logger, is_backup):
context = env.get_profile_context(profile)
key_filepath = context.ssh_key
if key_filepath:
backup_path = os.path.join(
EXPORTED_SSH_KEYS_DIR, os.path.basename(key_filepath)) + \
'.{0}.profile'.format(profile)
if is_backup... |
// SPDX-License-Identifier: Apache-2.0
// Copyright Authors of Cilium
package fragmap
import (
"fmt"
"unsafe"
"github.com/cilium/cilium/pkg/bpf"
"github.com/cilium/cilium/pkg/types"
)
const (
// MapName is the name of the map used to retrieve L4 ports associated
// to the datagram to which an IPv4 belongs.
M... |
<reponame>basharast/RetroArch-ARM<filename>src/play_feature_delivery/play_feature_delivery.h
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - <NAME>
* Copyright (C) 2014-2017 - <NAME>
* Copyright (C) 2016-2019 - <NAME>
* Copyright (C) 2019-2020 - <NAME>
*
* RetroArch is free software: you... |
#include <bts/blockchain/note_record.hpp>
#include <bts/blockchain/chain_interface.hpp>
namespace bts { namespace blockchain {
public_key_type note_record::signer_key()const
{ try {
FC_ASSERT( signer.valid() );
fc::sha256 digest;
if( !message->data.empty() ) digest = fc::sha256::hash( string(message->data.be... |
<gh_stars>0
/****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding val... |
def _create_dim_scales(self):
dim_order = self._dim_order.maps[0]
for dim in sorted(dim_order, key=lambda d: dim_order[d]):
if dim not in self._h5group:
size = self._current_dim_sizes[dim]
kwargs = {}
if self._dim_sizes[dim] is None:
... |
# move_zeros([1, 0, 1, 2, 0, 1, 3]) # returns [1, 1, 2, 1, 3, 0, 0]
'''Мое решение'''
list1 = []
list2 = []
for i in list1:
if i>0:
list2.append(i)
list1.sort()
for k in list1:
if k == 0:
list2.append(k)
print(list2)
arr = [1, 0, 1, 2, 0, 1, 3]
l = [i for i in arr if isinstance(... |
def prop_nouns_with_adj(self, **kwargs):
return self._extract_syntactic_features('prop_nouns_with_adj', **kwargs)[
'prop_nouns_with_adj'
] |
/******************************************************************************
* Top contributors (to current version):
* Andrew Reynolds
*
* This file is part of the cvc5 project.
*
* Copyright (c) 2009-2023 by the authors listed in the file AUTHORS
* in the top-level source directory and their institutional... |
/**
* Updates the goods wanted by this settlement.
*
* It is only meaningful to call this method from the
* server, since the settlement's {@link GoodsContainer}
* is hidden from the clients.
*/
public void updateWantedGoods() {
final Specification spec = getSpecification();
... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <TestImpactFramework/TestImpactClientTestRun.h>
namespace TestImpact
{
namespace Client... |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: service/sys/internal/conf/conf.proto
package conf
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb ... |
import os
import param
import logging
import cartopy.crs as ccrs
from holoviews import Path
from geoviews import Path as GeoPath
from genesis.model import Model
from genesis.util import Projection
from .mesh import AdhMesh
import holoviews.plotting.bokeh
import geoviews.plotting.bokeh
log = logging.getLogger('AdhMod... |
// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
// Contributed by Dave Abrahams
// See http://www.boost.org/libs/utility for documentation.
#ifndef DLIB_BOOST_NONCOPYABL... |
// AcceptBlock Handles insertion of new blocks into the block chain and merkle tree.
// It will verify the block before actually inserting, if the block is invalid an error will be returned.
// For now, it's the caller's responsibility to make sure given block is under consensus.
// If VerifyBlock returns err, but bloc... |
import { Component } from "@angular/core";
import { GameStateView, GameStateViewBase } from "../view-base.component";
@Component({
selector: 'ultimate-view',
templateUrl: 'ultimate-view.component.html'
})
export class UltimateViewComponent extends GameStateViewBase<any> {
ngOnInit() { }
ngOnDestroy() { }
}
export... |
import cv2
import numpy as np
from face_common import get_landmarks, get_landmarks_points
def floating_face(models, image, background):
face, landmarks = get_landmarks(models, image)
lps = get_landmarks_points(landmarks)
np_points = np.array(lps, np.int32)
hull = cv2.convexHull(np_points)
#mask ... |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Handler.Blog
( getBlogHomeR
, getBlogPostR
, getBlogFeedR
) where
import Data.WebsiteContent
import Import
import Yesod.AtomFeed (atomLink)
import RIO.Time (getCurrentTime)
getAddPreview :: Handler (Route A... |
<filename>test/Test.hs
{-# LANGUAGE OverloadedStrings #-}
import YGG
import ScrapHTML
import Text.XML.HXT.Core
import Paths_hYGG
import Config
import Utils
import Data.Maybe
c = Config {port=8080, hostName="https://www3.yggtorrent.nz", yggid="", yggpass="", yggcookie=""}
exSearchurl = "https://www3.yggtorrent.nz/eng... |
def make_tfrecord(atom_data, mask_data, nlist, peak_data, residue, atom_names, weights=None, indices=np.zeros((3, 1), dtype=np.int64)):
features = {}
N = atom_data.shape[0]
NN = nlist.shape[1]
assert mask_data.shape[0] == N
assert nlist.shape[0] == N and nlist.shape[2] == 3
assert peak_data.shap... |
// Fuzz the H1/H2 codec implementations.
DEFINE_PROTO_FUZZER(const test::common::http::CodecImplFuzzTestCase& input) {
try {
TestUtility::validate(input);
codecFuzz(input, HttpVersion::Http1);
codecFuzz(input, HttpVersion::Http2);
} catch (const EnvoyException& e) {
ENVOY_LOG_MISC(debug, "EnvoyExcep... |
// Copyright 2017 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 "ash/system/palette/palette_tray.h"
#include "ash/ash_switches.h"
#include "ash/public/cpp/ash_pref_names.h"
#include "ash/public/cpp/config.h"
... |
What is the deal? If you're over 35, are you as good as dead? Do you really absolutely have to pick a genre? And is the spec market really dead? There are some rumors that seem to have become truths out there, while other realities have been written about again and again. Yes, you can make it if you're over 35. And, fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.