prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>types.py<|end_file_name|><|fim▁begin|>import re from collections import namedtuple from typing import Optional from esteid import settings from esteid.constants import Languages from esteid.exceptions import InvalidIdCode, InvalidParameter from esteid.signing.types import InterimSessionData from esteid.ty...
return False raise InvalidParameter(param="phone_number") if not id_code_ee_is_valid(self.id_code):
<|file_name|>SceneManager.hpp<|end_file_name|><|fim▁begin|>#pragma once //! Include the SDL2_Engine objects #include "../__LibraryManagement.hpp" #include "../Utilities/IGlobal.hpp" #include "../Utilities/TypeID.hpp" namespace SDL2_Engine { //! Prototype the Scene Manager Initialiser object namespace Initialisation...
<|file_name|>AsymmetricMatcher.test.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import {OptionsReceived} from '../types';...
const result = prettyFormat(expect.arrayContaining([1, 2]), options); expect(result).toEqual(`ArrayContaining [ 1, 2,
<|file_name|>splif_fingerprints.py<|end_file_name|><|fim▁begin|>""" SPLIF Fingerprints for molecular complexes. """ import logging import itertools import numpy as np from deepchem.utils.hash_utils import hash_ecfp_pair from deepchem.utils.rdkit_utils import load_complex from deepchem.utils.rdkit_utils import compute_a...
for i, contact_bin in enumerate(contact_bins):
<|file_name|>_rvs_sampling.py<|end_file_name|><|fim▁begin|>import numpy as np from scipy._lib._util import check_random_state def rvs_ratio_uniforms(pdf, umax, vmin, vmax, size=1, c=0, random_state=None): """ Generate random samples from a probability density function using the ratio-of-uniforms method. ...
... vmin=0, vmax=2*np.exp(-1), size=1000, ... random_state=rng)
<|file_name|>editor_id.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="id_ID"> <context> <name>AbstractRuntimeEngine</name> <message> <source>World map testing via IPC is not supported</source> <translation type="unfinished"></tran...
</message> </context>
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>mod rustzx; mod settings; mod sound; pub(crate) mod video; // main re-export pub use self::{rustzx::RustzxApp, settings::Settings};<|fim▁end|>
//! This module provides main application class. mod events;
<|file_name|>predictor.py<|end_file_name|><|fim▁begin|># Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import cv2 import torch from torchvision import transforms as T from maskrcnn_benchmark.modeling.detector import build_detection_model from maskrcnn_benchmark.utils.checkpoint import Detectron...
<|file_name|>transpiler.js<|end_file_name|><|fim▁begin|>/* globals describe, it */ import Compiler from '../src/transpiler/compiler'; import assert from 'assert'; import fs from 'fs'; function compare(source, target) { const compiler = new Compiler(source); assert.equal(target, compiler.compiled); } describe('Trans...
it('should transpile a print with string', function() { compare('midiaGolpista(\'Número abaixo de 100.000: \').,', 'console.log(\'Número abaixo de 100.000: \');');
<|file_name|>FairHeader_Test_Query.graphql.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */ /* eslint-disable */ import { ConcreteRequest } from "relay-runtime"; import { FragmentRefs } from "relay-runtime"; export type FairHeader_Test_QueryVariables = {}; export type FairHeader_Test_QueryResponse = { readonly...
<|file_name|>DmnParse.java<|end_file_name|><|fim▁begin|>/* 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 appli...
* ------------------- GETTERS AND SETTERS ------------------- */
<|file_name|>app.spec.ts<|end_file_name|><|fim▁begin|>import { it, inject, injectAsync, beforeEachProviders } from '@angular/core/testing'; // to use Translate Service, we need Http, and to test Http we need to mock the backend import { BaseRequestOptions, Http, Response, Respons...
expect(app.appHeaderMenuModel.length).toBeGreaterThan(0); })); });
<|file_name|>issue-74954.rs<|end_file_name|><|fim▁begin|>// check-pass fn main() { if let Some([b'@', filename @ ..]) = Some(b"@abc123") { println!("filename {:?}", filename); }<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_artificial_1024_Fisher_MovingMedian_0__100.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art <|fim▁hole|> art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 0, transform = "Fishe...
<|file_name|>no_0343_integer_break.rs<|end_file_name|><|fim▁begin|>struct Solution; impl Solution { pub fn integer_break(n: i32) -> i32 { let mut dp = vec![0; n as usize + 1]; for i in 2..=n { let mut cur_max = 0; for j in 1..i { cur_max = cur_max.max((j * (i ...
}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export * from './achievement'; export * from './auth'; export * from './chatlinks';<|fim▁hole|>export * from './test';<|fim▁end|>
export * from './forum'; export * from './help'; export * from './emotes'; export * from './rank';
<|file_name|>MidiHashUtil.java<|end_file_name|><|fim▁begin|>/* * Created on 5 Sep 2007 * * Copyright (c) 2004-2007 Paul John Leonard * * http://www.frinika.com * * This file is part of Frinika. * * Frinika is free software; you can redistribute it and/or modify * it under the terms of the GNU General Publi...
static public void hashDisp(long hash) {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate osmpbfreader; extern crate serde; #[macro_use] extern crate serde_derive; #[macro_use(bson, doc)] extern crate bson; extern crate mongodb; use std::collections::HashMap; use std::env::args; use mongodb::coll::options::WriteModel; use mongodb::{Client, Thre...
println!("Objs got"); let mut nodes = HashMap::new(); let mut bulk = Vec::new();
<|file_name|>pagervisor.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "os" "os/signal" "syscall" ) <|fim▁hole|> func Info(format string, params ...interface{}) { Print("Info: " + format, params...) } func Error(err error) { Print("Error: %s", err) } func Fatal(err error) { Print("Fatal: %s", err...
func Print(format string, params ...interface{}) { fmt.Fprintf(os.Stderr, format+"\n", params...) }
<|file_name|>04.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # This example illustrates how to use non-homogeneous(nonzero) # Dirichlet boundary conditions. # # PDE: Poisson equation -Laplace u = CONST_F, where CONST_F is # a constant right-hand side. It is not difficult to see that # the function u(x,y) = (...
for i in range(INIT_REF_NUM): mesh.refine_all_elements()
<|file_name|>RateLimiterTest.java<|end_file_name|><|fim▁begin|>package org.asteriskjava.pbx.agi; import static org.junit.Assert.assertTrue; import org.asteriskjava.pbx.agi.RateLimiter; import org.junit.Test;<|fim▁hole|> @Test public void test() throws InterruptedException { long now = System.curren...
public class RateLimiterTest {
<|file_name|>gensim_test.py<|end_file_name|><|fim▁begin|>import gensim import numpy as np from gensim.models import word2vec import jieba from TextSta_v2 import TextSta from gensim.corpora.dictionary import Dictionary <|fim▁hole|>word_list = jieba.lcut(sentense_file) tmp_dic = Dictionary() tmp_dic(word_list) # sentence...
path = u"C:\\Users\\xiangrufan\\Desktop\\NLP\\Astro_NLP\\resource\\复旦分类语料\\answer\\C3-Art\\C3-Art0002.txt" text = TextSta(path,encoding="GBK") sentense_file = text.sen(all_return=True)
<|file_name|>it2me_helpee_channel.js<|end_file_name|><|fim▁begin|>// Copyright 2014 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. /** * @fileoverview * * It2MeHelpeeChannel relays messages between the Hangouts web p...
* @param {string|Error} error * @private */ remoting.It2MeHelpeeChannel.prototype.sendErrorResponse_ =
<|file_name|>ArrayTypearg.java<|end_file_name|><|fim▁begin|>/* * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License v...
class ArrayTypearg { private void foo() { List<Object[]> list = new ArrayList<Object[]>();
<|file_name|>FindItemsForFavoriteSearchResponse.java<|end_file_name|><|fim▁begin|>// Generated by xsd compiler for android/java // DO NOT CHANGE! package com.ebay.marketplace.search.v1.services; import com.leansoft.nano.annotation.*; /** * * Reserved for future use. * */ @RootElement(name = "findItemsForFavorit...
}
<|file_name|>ls.js<|end_file_name|><|fim▁begin|>/* * Elfenben - Javascript using tree syntax! This is the compiler written in javascipt * */ var version = "1.0.16", banner = "// Generated by Elfenben v" + version + "\n", isWhitespace = /\s/, isFunction = /^function\b/, validName = /^[a-zA-Z_$][0-9a-z...
return ret } var includeFile = (function () {
<|file_name|>tyencode.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/l...
ty::Predicate::Trait(ref trait_ref) => { mywrite!(w, "t");
<|file_name|>plot_queue.py<|end_file_name|><|fim▁begin|>''' Plot queue occupancy over time ''' from helper import * import plot_defaults parser = argparse.ArgumentParser() parser.add_argument('--files', '-f', help="Queue timeseries output to one plot", required=True, ...
<|file_name|>poller.py<|end_file_name|><|fim▁begin|>from zope.interface import implementer from six import iteritems from twisted.internet.defer import DeferredQueue, inlineCallbacks, maybeDeferred, returnValue from .utils import get_spider_queues from .interfaces import IPoller @implementer(IPoller) class QueuePolle...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import cuda_convnet import corrmm<|fim▁end|>
from .base import * # TODO: import the relevant names instead of importing everything.
<|file_name|>CheckpointConfigurationUpdateMarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of t...
private static final MarshallingInfo<Long> MINPAUSEBETWEENCHECKPOINTSUPDATE_BINDING = MarshallingInfo.builder(MarshallingType.LONG) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("MinPauseBetweenCheckpointsUpdate").build();
<|file_name|>query_test.go<|end_file_name|><|fim▁begin|>package main import ( "testing" <|fim▁hole|> _ "bitbucket.org/ikeikeikeike/antenna/conf/inits" libm "bitbucket.org/ikeikeikeike/antenna/lib/models" "bitbucket.org/ikeikeikeike/antenna/models" "bitbucket.org/ikeikeikeike/antenna/models/character" _ "bitbucket...
"github.com/k0kubun/pp"
<|file_name|>gauge.rs<|end_file_name|><|fim▁begin|>use crate::{ buffer::Buffer, layout::Rect, style::{Color, Style}, symbols, text::{Span, Spans}, widgets::{Block, Widget}, }; /// A widget to display a task progress. /// /// # Examples: /// /// ``` /// # use tui::widgets::{Widget, Gauge, Block,...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import CodeClipboard from './CodeClipboard'; <|fim▁hole|><|fim▁end|>
export default CodeClipboard;
<|file_name|>Feedback.py<|end_file_name|><|fim▁begin|>from ..PulsePrimitives import * from ..Compiler import compile_to_hardware from ..PulseSequencePlotter import plot_pulse_files from .helpers import create_cal_seqs from itertools import product import operator from ..ControlFlow import *<|fim▁hole|>from typing impor...
from ..TdmInstructions import * from functools import reduce
<|file_name|>track_sampling.py<|end_file_name|><|fim▁begin|>""" Sampling along tracks --------------------- The :func:`pygmt.grdtrack` function samples a raster grid's value along specified<|fim▁hole|>:class:`pandas.DataFrame` table where the first two columns are x and y (or longitude and latitude). Note also that th...
points. We will need to input a 2D raster to ``grid`` which can be an :class:`xarray.DataArray`. The argument passed to the ``points`` parameter can be a
<|file_name|>move.hpp<|end_file_name|><|fim▁begin|>// 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) // (C) Copyright 2007-8 Anthony Williams // (C) Copyright 2011-2012 Vicente J. Botet Escriba #ifndef BOOST_THREA...
<|file_name|>mapparser.class.cpp<|end_file_name|><|fim▁begin|>// ************************************************************************** // // 24 Bomb // // By: rcargou <rcargou@student.42.fr> ::: :::::::: // // By: nmoham...
case BOSS_D: return static_cast<Entity*>( Factory::create_boss(BOSS, x, y, BOSS_C, BOSS_D) ); case PLAYER1: return static_cast<Entity*>( Factory::create_player( PLAYER, x, y, PLAYER1) ); case PLAYER2: return static_cast<Entity*>( Factory::create_player(...
<|file_name|>tarteaucitron.it.js<|end_file_name|><|fim▁begin|>/*global tarteaucitron */ tarteaucitron.lang = { "adblock": "Benvenuto! Questo sito ti permette di attivare i servizi di terzi di tua scelta.", "adblock_call": "Disabilita il tuo adblocker per iniziare la navigazione.", "reload": "Aggiorna la pag...
"details": "La gestione dei commenti utente aiuta a gestire la pubblicazione dei commenti e a lottare contro lo spamming" },
<|file_name|>primitive_reuse_peer.rs<|end_file_name|><|fim▁begin|>extern crate futures; extern crate tokio_io; use futures::future::ok; use std::cell::RefCell; use std::rc::Rc; use super::{BoxedNewPeerFuture, Peer}; use std::io::{Error as IoError, Read, Write}; use tokio_io::{AsyncRead, AsyncWrite}; use super::{onc...
fn flush(&mut self) -> Result<(), IoError> {
<|file_name|>test_trt_convert_group_norm.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # 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 # # ...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
<|file_name|>test_effects_layer.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals import pytest import logging from psd_tools.psd.effects_layer import ( CommonStateInfo, ShadowInfo, InnerGlowInfo, OuterGlowInfo, BevelInfo, SolidFillInfo, ) from ..utils im...
InnerGlowInfo,
<|file_name|>CipherOutputStream.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU G...
* by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT
<|file_name|>ops.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc. All Rights Reserved. # # 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...
collections=moving_collections)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[doc = r" Value read from the register"] pub struct R { bits: u32, } #[doc = r" Value to write to the register"] pub struct W { bits: u32, } impl super::F9R1 { #[doc = r" Modifies the contents of the register"] #[inline(always)] pub fn modify<F>(&sel...
#[doc = "Bit 11 - Filter bits"] #[inline(always)]
<|file_name|>PreventListener.java<|end_file_name|><|fim▁begin|>/* * This file is part of FlexibleLogin * * The MIT License (MIT) * * Copyright (c) 2015-2018 contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy<|fim▁hole|> * copies of the Software, and to permit persons to...
* of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<|file_name|>labler.js<|end_file_name|><|fim▁begin|>const storage = require("./storage"); const recognition = require("./recognition"); async function labelPictures(bucketName) { const bucket = await storage.getOrCreateBucket(bucketName); const fileNames = await storage.ls(bucket); <|fim▁hole|> try { ...
for (const file of fileNames) { console.log(`Retrieve labels for file ${file.name}`);
<|file_name|>pic.py<|end_file_name|><|fim▁begin|># _*_ coding: utf-8 _*_ # filename: pic.py import csv import numpy import matplotlib.pyplot as plt # 读取 house.csv 文件中价格和面积列 price, size = numpy.loadtxt('house.csv', delimiter='|', usecols=(1, 2), unpack=True) print price print size plt.figure() plt.subplot(211) # plt...
plt.subplot(212) # plt.title("area") plt.xlabel("/ m**2") plt.hist(size, bins=20)
<|file_name|>strategy_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors. <|fim▁hole|>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 distributed under the License is distributed on an...
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
<|file_name|>index.js<|end_file_name|><|fim▁begin|>define(['underscore','backbone','aura'], function(_,Backbone,Aura) { console.log('loading index.js') var app=Aura({debug: { enable: true}}); app.components.addSource('aura', '../node_webkit/auraext'); app.components.addSource('kse', '../kse/aura_components'); <|...
app.use('../node_webkit/auraext/aura-backbone') .use('../node_webkit/auraext/aura-yadb') .use('../node_webkit/auraext/aura-yase')
<|file_name|>controls.ts<|end_file_name|><|fim▁begin|>// Copyright 2016 David Li, Michael Mauer, Andy Jiang // This file is part of Tell Me to Survive. // Tell Me to Survive is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Fr...
args.onabort(); } }, }, "Abort"));
<|file_name|>utils.go<|end_file_name|><|fim▁begin|>package zmq4 import ( "fmt" ) /* Send multi-part message on socket. Any `[]string' or `[][]byte' is split into separate `string's or `[]byte's Any other part that isn't a `string' or `[]byte' is converted to `string' with `fmt.Sprintf("%v", part)'. Returns total ...
/* Receive parts as message from socket, including metadata.
<|file_name|>frequency.rs<|end_file_name|><|fim▁begin|>use envelope; use pitch; /// Types for generating the frequency given some playhead position. pub trait Frequency { /// Return the frequency given some playhead percentage through the duration of the Synth. /// - 0.0 < perc < 1.0l fn hz_at_playhead(&s...
/// Return whether or not the Dynamic is an Envelope. pub fn is_env(&self) -> bool {
<|file_name|>char_parameter.cpp<|end_file_name|><|fim▁begin|>// (C) Copyright Gennadiy Rozental 2005-2008. // Use, modification, and distribution are subject to 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) // See http://ww...
// ***************************************************************************
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import platform if platform.system() == 'Windows': from compat import * from puke.Error import * from puke.Task import * from puke.Tools import * from puke.ToolsExec import * from puke.FileList import * from pu...
logging.getLogger().addHandler(consoleCfg)
<|file_name|>UncagingControlTemplate_pyqt5.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'acq4/analysis/old/UncagingControlTemplate.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 impor...
<|file_name|>test.py<|end_file_name|><|fim▁begin|># noinspection PyMethodMayBeStatic class TestDevice: def __init__(self, cf): self.type = cf.get('device_test_type', 'test') self.host = ('test', 80) self.mac = [1, 2, 3, 4, 5, 6] def auth(self): pass # RM2/RM4 def check_...
# RM4
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup uses a pluggable XML or HTML parser to parse a (possibly invalid) document into a tree representation. Beautiful Soup provides provides met...
if '\n' in currentData:
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import import re from argparse import ArgumentParser, ArgumentTypeError from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flexget import options from flexget.event import eve...
regexp_list = db.get_list_by_exact_name(options.list_name) if not regexp_list:
<|file_name|>quickOutline.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-----...
} }
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404 from django.http import HttpResponseRedirect, Http404 from django.db.models import Q from django.contrib import messages from cc.general.util import render import ...
<|file_name|>UploadingViewTest.java<|end_file_name|><|fim▁begin|>package eindberetning.it_minds.dk.eindberetningmobil_android.views; import android.widget.TextView;<|fim▁hole|>import eindberetning.it_minds.dk.eindberetningmobil_android.BaseTest; import eindberetning.it_minds.dk.eindberetningmobil_android.data.StaticDa...
import org.junit.Test;
<|file_name|>DisassociateEnvironmentOperationsRoleRequest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy...
return false; if (other.getEnvironmentName() != null && other.getEnvironmentName().equals(this.getEnvironmentName()) == false) return false;
<|file_name|>test_color.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class TestColor(TestCase): def test_is_string(self): c = n.color("w") self.assertTrue(isinstance(c, tuple))<|fim▁end|>
from unittest import TestCase import neuropsydia as n n.start(open_window=False)
<|file_name|>commit_sync_config_utils.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use metaconfig_types::{DefaultSmallToLargeCommitSyncPathAction, Small...
<|file_name|>integration_parameters.rs<|end_file_name|><|fim▁begin|>use na::{self, RealField}; /// Parameters for a time-step of the physics engine. #[derive(Clone)] pub struct IntegrationParameters<N: RealField> { /// The timestep (default: `1.0 / 60.0`) dt: N, /// The inverse of `dt`. inv_dt: N, ...
); self.dt = dt; if dt == N::zero() { self.inv_dt = N::zero()
<|file_name|>functions4.go<|end_file_name|><|fim▁begin|>package main import "fmt" func split(sum int) (x, y int) { x = sum * 4 / 9 y = sum - x return } func main() { x, y := split(22)<|fim▁hole|><|fim▁end|>
fmt.Println(x, y) }
<|file_name|>my-service.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|> return 'Welcome to Strapi 🚀'; }, });<|fim▁end|>
module.exports = ({ strapi }) => ({ getWelcomeMessage() {
<|file_name|>RunDGEN.py<|end_file_name|><|fim▁begin|>import re import os import itertools import time from string import upper import ete3 import copy import subprocess from collections import defaultdict from sys import platform from scipy import stats from ete3 import Tree from natsort import natsorted from Bio impo...
<|file_name|>eui48.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2008-2015, David P. D. Moss. All rights reserved. # # Released under the BSD license. See the LICENSE file for details. #-------------------------------------------------...
<|file_name|>NonUniqueTaxonomyMap.java<|end_file_name|><|fim▁begin|>//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# ...
<|file_name|>ListProcessingJobsResult.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is loca...
#include <aws/core/utils/json/JsonSerializer.h>
<|file_name|>regularizers.py<|end_file_name|><|fim▁begin|>import numpy as np from keras.datasets import mnist from keras.layers import Activation from keras.layers import Dense from keras.models import Sequential from keras.utils import np_utils np.random.seed(1337) nb_classes = 10 batch_size = 128 nb_epoch = 5 weigh...
max_train_samples = 5000 max_test_samples = 1000
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/* Copyright 2011, AUTHORS.txt (http://ui.operamasks.org/about) Dual licensed under the MIT or LGPL Version 2 licenses. */ (function() { OMEDITOR.plugins.add( 'templates', { requires : [ 'dialog' ], init : function( editor ) { OMEDITOR.dialog.add( '...
{
<|file_name|>tree.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! Traits that nodes must implement. Breaks the otherwise-cycli...
/// Empty string for no namespace
<|file_name|>test_despike.py<|end_file_name|><|fim▁begin|>import numpy as np from apvisitproc import despike import pytest import os DATAPATH = os.path.dirname(__file__) FILELIST1 = os.path.join(DATAPATH, 'list_of_txt_spectra.txt') FILELIST2 = os.path.join(DATAPATH, 'list_of_fits_spectra.txt') @pytest.fixture def wa...
wave3, spec3 = np.loadtxt(os.path.join(DATAPATH, 'spec3test.txt'), unpack=True) wavelist = [wave1, wave2, wave3] speclist = [spec1, spec2, spec3]
<|file_name|>CreateUserOrgHierarchySample.java<|end_file_name|><|fim▁begin|>/* * 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 license...
<|file_name|>589.async.js<|end_file_name|><|fim▁begin|>require.ensure([], function(require) { require("./73.async.js"); require("./147.async.js"); require("./294.async.js"); require("./588.async.js");<|fim▁hole|><|fim▁end|>
}); module.exports = 589;
<|file_name|>media_queries.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! Servo's media-query device and expression represent...
/// The current media type used by de device. media_type: MediaType, /// The current viewport size, in CSS pixels. viewport_size: TypedSize2D<f32, CSSPixel>,
<|file_name|>test_output_plots.py<|end_file_name|><|fim▁begin|>''' Tests of output_plots.py module ''' import pytest import os import numpy as np import matplotlib.image as mpimg from ogusa import utils, output_plots # Load in test results and parameters CUR_PATH = os.path.abspath(os.path.dirname(__file__)) base_ss ...
(base_tpi, base_params, reform_tpi, reform_params, 'diff', None, None),
<|file_name|>cli.py<|end_file_name|><|fim▁begin|># Copyright 2014 Open Source Robotics Foundation, 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 of the License at # # http://www.apache.org/licenses/...
from .common import get_build_type
<|file_name|>script_settings.py<|end_file_name|><|fim▁begin|><|fim▁hole|>../../../../../../../share/pyshared/orca/scripts/apps/packagemanager/script_settings.py<|fim▁end|>
<|file_name|>DataDescription.tsx<|end_file_name|><|fim▁begin|>/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format */ import {Typography, Popover, Input, Select, Checkbox...
keep: false,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># 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 # distributed under th...
# coding=utf-8 # Copyright 2016 The TF-Slim Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>application.py<|end_file_name|><|fim▁begin|>from flask import Flask from flask import make_response from flask import request from flask import render_template from flask import redirect from flask import url_for import logging from logging.handlers import RotatingFileHandler app = Flask(__name__) @app....
resp = make_response(redirect(url_for('index'))) resp.set_cookie('username', request.form['username'])
<|file_name|>server.cc<|end_file_name|><|fim▁begin|>/* * ============================================================================ * Filename: server.hxx * Description: Server side implementation for flihabi network * Version: 1.0 * Created: 04/20/2015 06:21:00 PM * Revision: ...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
input: input,
<|file_name|>products.server.controller.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), errorHandler = require('./errors.server.controller'), Product = mongoose.model('Product'), multiparty = require('multiparty'), uuid = require('node-uuid'), f...
if (err) {
<|file_name|>turtle.js<|end_file_name|><|fim▁begin|>var Turtle = function () { this.d = 0; this.x = 0; this.y = 0; this.rounding = false; this.invert = false; } Turtle.prototype.setX = function (val) { this.x = val; return this; } Turtle.prototype.setY = function (val) { this.y = val; ...
<|file_name|>u_char.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
#[unstable = "mainly needed for compiler internals"] fn is_xid_start(self) -> bool; /// Returns whether the specified `char` satisfies the 'XID_Continue'
<|file_name|>biotestflavor.py<|end_file_name|><|fim▁begin|>from fabric.api import * from fabric.contrib.files import * from cloudbio.flavor import Flavor from cloudbio.custom.shared import (_fetch_and_unpack) class BioTestFlavor(Flavor): """A Flavor for cross Bio* tests """ def __init__(self, env): ...
env.logger.info("Starting post-install") env.logger.info("Load Scalability tests") if exists('Scalability'): with cd('Scalability'):
<|file_name|>image.cpp<|end_file_name|><|fim▁begin|>// // Copyright (c) 2017 Advanced Micro Devices, Inc. All rights reserved. // // 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 re...
max_layer_index = mipmap_iterator->n_layer;
<|file_name|>anomaly_likelihood_region_test.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for ...
import tempfile import unittest import random
<|file_name|>notification.js<|end_file_name|><|fim▁begin|>/** * Piwik - free/libre analytics platform * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function ($, require) { var exports = require('piwik/UI'); /** * Creates a new notifications. ...
* * @param {string} message The actual message that will be displayed. Must be set.
<|file_name|>locked_queue.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
#include "locked_queue.h"
<|file_name|>application_gateway_sku.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # ...
# Changes may cause incorrect behavior and will be lost if the code is
<|file_name|>Guild.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/> * Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as pub...
if (!pSrc->InitItem()) return; // No source item
<|file_name|>secure_message_sign_verify_rsa.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 Cossack Labs Limited // // 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.apa...
<|file_name|>cost.py<|end_file_name|><|fim▁begin|>from neon.transforms.cost import Cost class MulticlsSVMLoss(Cost): def __init__(self, delta=1.): self.delta = delta def __call__(self, y, t): T = self.be.empty_like(y) T[:] = self.be.max(y * t, axis=0) # T = self.be.array(self....
return self.be.maximum(0, y - T + self.delta) / self.be.bsz
<|file_name|>TriggerConfig.tsx<|end_file_name|><|fim▁begin|>import React from "react"; import {Input} from "reactstrap"; interface TriggerConfigProps { allModuleTypes: string[]; setConfig: (value: any) => void; configValue: string; } const TriggerConfig: React.FC<TriggerConfigProps> = ({ configValue = "", se...