prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>PRESUBMIT.py<|end_file_name|><|fim▁begin|># Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain t...
<|file_name|>iomhelper.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * $Id: iomhelper.cpp 10645 2007-01-18 02:22:39Z warmerdam $ * * Project: Interlis 1/2 Translator * Purpose: Implementation of ILI1Reader class. * Author: Pirmin Kalberer, Sour...
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
<|file_name|>ContactResourceAssembler.java<|end_file_name|><|fim▁begin|>package msvcdojo; import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo; import org.springframework.hateoas.Resource; import org.springframework.hateoas.mvc.ResourceAssemblerSupport; import org.springframework.stereotype.Comp...
<|file_name|>24.d.ts<|end_file_name|><|fim▁begin|>import { LogoSnapchat24 } from "../../";<|fim▁hole|>export = LogoSnapchat24;<|fim▁end|>
<|file_name|>basic-snack-bar.module.spec.ts<|end_file_name|><|fim▁begin|>import { BasicSnackBarModule } from './basic-snack-bar.module'; describe('BasicSnackBarModule', () => { let basicSnackBarModule: BasicSnackBarModule; beforeEach(() => { basicSnackBarModule = new BasicSnackBarModule(); }); it('should...
}); });
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding: utf-8 # pylint: disable=too-many-lines import inspect import sys from typing import TypeVar, Optional, Sequence, Iterable, List, Any from owlmixin import util from owlmixin.errors import RequiredError, UnknownPropertiesError, InvalidTypeError from owlmix...
<|file_name|>check_i18n.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: iso-8859-1 -*- """check_i18n - compare texts in the source with the language files Searches in the MoinMoin sources for calls of _() and tries to extract the parameter. Then it checks the language modules if those parameters ...
<|file_name|>helpers_sync.py<|end_file_name|><|fim▁begin|>import os from geotrek.flatpages.models import FlatPage from geotrek.flatpages.views import FlatPageViewSet, FlatPageMeta from django.db.models import Q class SyncRando: def __init__(self, sync): self.global_sync = sync <|fim▁hole|> self.g...
def sync(self, lang):
<|file_name|>test_period_asfreq.py<|end_file_name|><|fim▁begin|>import pytest from pandas._libs.tslibs.frequencies import get_freq from pandas._libs.tslibs.period import period_asfreq, period_ordinal @pytest.mark.parametrize( "freq1,freq2,expected", [ ("D", "H", 24), ("D", "T", 1440), ...
(5, 11417), # Sunday (Oct. 6, 2013). (6, 11417), # Monday (Oct. 7, 2013).
<|file_name|>instances.py<|end_file_name|><|fim▁begin|>#!python import re import sys import logging import boto.ec2 from texttable import Texttable from pprint import PrettyPrinter from optparse import OptionParser PP = PrettyPrinter( indent=2 ) ################### ### Arg parsing ################### parse...
### prints to RegionInfo:us-east-1. For now, use the private version ### XXX EVERY column in this output had better have a non-zero length
<|file_name|>swap-1.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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...
}
<|file_name|>TrackNavigator.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************************** * Copyright (c) 2007 Ian Monroe <ian@monroe.nu> * * Copyright (c) 2008 Soren Harward <stharward@gmail.com> ...
<|file_name|>frontend_spec.js<|end_file_name|><|fim▁begin|>// # Frontend Route tests // As it stands, these tests depend on the database, and as such are integration tests. // Mocking out the models to not touch the DB would turn these into unit tests, and should probably be done in future, // But then again testing re...
<|file_name|>asr1k_routertype_driver.py<|end_file_name|><|fim▁begin|># Copyright 2015 Cisco Systems, 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 # # ...
return
<|file_name|>BenchmarkTest06598.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.1 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://www.owasp.org/index.php/Benchmark">https://www.owasp.org/index.php/Benchmark</a>...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # generated from catkin/cmake/template/__init__.py.in # keep symbol table as clean as possible by deleting all unnecessary symbols from os import path as os_path from sys import path as sys_path from pkgutil import extend_path __extended_p...
if os_path.isfile(src_init_file):
<|file_name|>sessions.go<|end_file_name|><|fim▁begin|>/* Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments Copyright (C) ITsysCOM GmbH 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 ...
// Shutdown stops the service
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from distutils.sysconfig import get_python_inc from distutils.core import Extension, setup try: from Cython.Build import cythonize except ImportError: print("Please install cython and try again.") raise SystemExit PACKAGES = [ 'pdsa', '...
get_python_inc(plat_specific=True), os.path.join('pdsa/helpers/hashing', 'src') ]
<|file_name|>Buffalo.js<|end_file_name|><|fim▁begin|>{ "metadata" : { "formatVersion" : 3.1, "sourceFile" : "Buffalo.obj", "generatedBy" : "OBJConverter", "vertices" : 2202, "faces" : 4134, "normals" : 2113, "uvs" : 0, ...
}],
<|file_name|>enginectrl.py<|end_file_name|><|fim▁begin|>from multiprocessing import Process, JoinableQueue, Manager, Lock, Value, Event import wiringpi as wp import RPi.GPIO as rpio from slaveprocess import SlaveProcess import time rpio.setmode(rpio.BCM) class PMWProcess(Process): def __init__(self,**kwargs):...
def rpio_init(self):
<|file_name|>mobile.js<|end_file_name|><|fim▁begin|>/* * VITacademics * Copyright (C) 2014-2016 Aneesh Neelam <neelam.aneesh@gmail.com> * Copyright (C) 2014-2016 Ayush Agarwal <agarwalayush161@gmail.com> * * This file is part of VITacademics. * * VITacademics is free software: you can redistribute it and/...
false
<|file_name|>contentscript.js<|end_file_name|><|fim▁begin|>/******************************************************************************* uBlock Origin - a browser extension to block requests. Copyright (C) 2014-present Raymond Hill This program is free software: you can redistribute it and/or modify ...
const process = function(delay) { if ( toProcess.length === 0 ) { return; } if ( delay === 0 ) { if ( processTimer !== undefined ) {
<|file_name|>fdiv_ST1_ST1.java<|end_file_name|><|fim▁begin|>/* JPC: An x86 PC Hardware Emulator for a pure Java Virtual Machine Copyright (C) 2012-2013 Ian Preston This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as pub...
public String toString() { return this.getClass().getName(); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .async import TelnetServer
<|file_name|>OEngineLocalPaginated.java<|end_file_name|><|fim▁begin|>/* * * * Copyright 2014 Orient Technologies LTD (info(at)orientechnologies.com) * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obt...
<|file_name|>nine.py<|end_file_name|><|fim▁begin|>from itertools import combinations def is_good(n): return 1 + ((int(n) - 1) % 9) == 9 def generate_subsequences(n): subsequences = [] combinations_list = [] index = 4 #Generate all combinations while index > 0: combinations_list.append...
if __name__ == '__main__': #The modulo
<|file_name|>SqlConnectionDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to enter the connection parameters. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot from P...
<|file_name|>convert.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from lxml import etree import os, sys, logging, subprocess from os.path import realpath, dirname import xapian sys.path.append('/home/liza/threepress') from threepress import settings db_dir = 'db/' main_db = 'threepres...
fo_file = out_file fo_file = fo_file.replace('tei/', 'fo/')
<|file_name|>factory.go<|end_file_name|><|fim▁begin|>package deployment import ( "fmt" "time" kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" "github.com/GoogleCloudPlatform/kubernetes/pkg/client/cache" "github.com/GoogleCloudPlatform/kuber...
} if count > 1 { return false }
<|file_name|>registration.py<|end_file_name|><|fim▁begin|>class FieldRegistry(object): _registry = {} def add_field(self, model, field): reg = self.__class__._registry.setdefault(model, []) reg.append(field) <|fim▁hole|> return self.__class__._registry.get(model, []) def __contains_...
def get_fields(self, model):
<|file_name|>field_data.py<|end_file_name|><|fim▁begin|>""" :class:`~xblock.field_data.FieldData` subclasses used by the LMS """ from xblock.field_data import ReadOnlyFieldData, SplitFieldData from xblock.fields import Scope def lms_field_data(authored_data, student_data): """<|fim▁hole|> and all UserScope.NO...
Returns a new :class:`~xblock.field_data.FieldData` that reads all UserScope.ONE and UserScope.ALL fields from `student_data`
<|file_name|>issue-79690.rs<|end_file_name|><|fim▁begin|>// ignore-32bit // This test gives a different error on 32-bit architectures. // stderr-per-bitwidth union Transmute<T: Copy, U: Copy> { t: T, u: U, } trait Bar { fn bar(&self) -> u32; } struct Foo { foo: u32, bar: bool, } impl Bar for Foo { ...
<|file_name|>ed25519_keys.py<|end_file_name|><|fim▁begin|>""" <Program Name> ed25519_keys.py <Author> Vladimir Diaz <vladimir.v.diaz@gmail.com> <Started> September 24, 2013. <Copyright> See LICENSE for licensing information. <Purpose> The goal of this module is to support ed25519 signatures. ed25519 is a...
else:
<|file_name|>test_trainer_utils.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 the HuggingFace Inc. team. # # 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.a...
num_labels = 12
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ERPNext - web based ERP (http://erpnext.com) # Copyright (C) 2012 Web Notes Technologies Pvt Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
import frappe
<|file_name|>lasduplicate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** lasduplicate.py --------------------- Date : September 2013 Copyright : (C) 2013 by Martin Isenburg Email ...
<|file_name|>MacPaginationVerticalScrollBarUI.java<|end_file_name|><|fim▁begin|>package org.openswing.swing.table.client; import java.awt.*; import javax.swing.*; import javax.swing.plaf.*; import com.sun.java.swing.plaf.mac.*; /** * <p>Title: OpenSwing Framework</p> * <p>Description: Vertical scrollba...
break; case 5: // '\005' g.drawLine(3, 5+h, 10, 5+h);
<|file_name|>ForceReply.py<|end_file_name|><|fim▁begin|>__author__ = 'harsha' class ForceReply(object): def __init__(self, force_reply, selective): self.force_reply = force_reply self.selective = selective def get_force_reply(self): return self.force_reply def get_selective(self)...
def __str__(self): return str(self.__dict__)
<|file_name|>service.py<|end_file_name|><|fim▁begin|>""" .. module: lemur.certificate.service :platform: Unix :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. .. moduleauthor:: Kevin Glisson <kglisson@netflix.com> """ import arrow from flask import ...
<|file_name|>matrix.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2009-2012, Jack Poulson All rights reserved. This file is part of Elemental. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redist...
<|file_name|>XProjection.java<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright (C) 2006 by Arnaud Desaedeleer * * arnaud@desaedeleer.com * * ...
<|file_name|>glue.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<|fim▁hole|>use env_logger; use euclid::Size2D; use parking_lot::RwLock; use std::mem::transmute; use std::sync::{Arc, Mutex}; us...
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use app_units::Au; use cssparser::{Parser, ToCss};
<|file_name|>Hook.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # ...
isinstance(element, (str, six.text_type)) for element in add_events
<|file_name|>phone_alert_status.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
NAME="Phone Alert Status"
<|file_name|>projections.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from math import pi, sin, log, exp, atan DEG_TO_RAD = pi / 180 RAD_TO_DEG = 180 / pi def minmax (a,b,c): a = max(a,b) a = min(a,c) return a class GoogleProjection: """<|fim▁hole|> self.Bc = [] self.Cc = [] ...
Google projection transformations. Sourced from the OSM. Have not taken the time to figure out how this works. """ def __init__(self, levels=18):
<|file_name|>mod.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...
}
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup <|fim▁hole|> license="MIT", url="https://github.com/jddeal/python-cmr", description="Python wrapper to the NASA Common Metadata Repository (CMR) API.", long_description=open("README.rst").read(), author="Justin Deal, Matt...
setup( name="python-cmr", version="0.4.1",
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from pathlib import Path from jobman.jobman import JobMan from mc.clients.job_record_client import JobRecordClient from mc.clients.flow_record_client import FlowRecordClient from mc.flows.flow_engine import FlowEngine from mc.db.db import Db from mc.runners.flow_runn...
def job_dirs(self, value): self._job_dirs = value
<|file_name|>deslizador.py<|end_file_name|><|fim▁begin|>import pilasengine # Permite que este ejemplo funcion incluso si no has instalado pilas. import sys sys.path.insert(0, "..") pilas = pilasengine.iniciar() mono = pilas.actores.Mono(y=-100) def cuando_cambia_escala(valor): mono.escala = valor * 2 deslizador_...
def cuando_cambia_rotacion(valor): mono.rotacion = valor * 360
<|file_name|>to_javascript.rs<|end_file_name|><|fim▁begin|>//! # To JavaScript //! //! This module defines the trait for translating Robin code to JavaScript use error::Error; use stdlib::Stdlib; pub trait ToJavaScript { fn eval(&mut self, stdlib: &mut Stdlib) -> Result<String, Error>;<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_tmpdir.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division) __metaclass__ = type impo...
mock_mkdtemp = MagicMock(return_value="/tmp/path") mock_makedirs = MagicMock(side_effect=OSError("Some OS Error here")) monkeypatch.setattr(tempfile, 'mkdtemp', mock_mkdtemp)
<|file_name|>tag_pattern.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' tag_treetagger.py This module is a wrapper to TreeTagger. ''' import os import sys import string import six import sklearn from itertools import chain from bakfu.core.routes import register from bakfu.process.base import BaseProce...
... ngram_range=(1, 3), ... #stop_words=nltk.corpus.stopwords.words(baf.get('language')),
<|file_name|>avengers.js<|end_file_name|><|fim▁begin|>var Avenger = require('mongoose').model('Avenger'); exports.getAvengers = function (req, res) { Avenger.find({}).exec(function (err, collection) { res.send(collection); }); }; exports.getAvengerById = function (req, res) {<|fim▁hole|> res.se...
Avenger.findOne({_id:req.params.id}).exec(function (err, avenger) {
<|file_name|>reissue_certificate_order_request.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 infor...
}
<|file_name|>test_common.py<|end_file_name|><|fim▁begin|>import json import time import pytest from anchore_engine.auth.common import ( get_creds_by_registry, get_docker_registry_userpw, registry_record_matches, ) _test_username = "tonystark" _test_password = "potts" _test_registry_meta = { "authoriz...
_record_ecr_inactive = { "registry": "docker.io",
<|file_name|>limitedSurfaceInterpolationScheme.hh<|end_file_name|><|fim▁begin|>// pythonFlu - Python wrapping for OpenFOAM C++ API<|fim▁hole|>// it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later ver...
// Copyright (C) 2010- Alexey Petrov // Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) // // This program is free software: you can redistribute it and/or modify
<|file_name|>sprite_sheet.py<|end_file_name|><|fim▁begin|>""" A SpriteSheet is the overall collection of individual frames (which may be spread across files) that define one layer of the final sprite. """ from models.sprite_action import SpriteAction class SpriteSheet(): def __init__( self, data, group_name ): ...
self.file_path = data.get( "file_path" ) self.group_name = group_name self.name = data.get( "name", "Unnamed Layer" )
<|file_name|>24.d.ts<|end_file_name|><|fim▁begin|>import * as React from "react"; import { CarbonIconProps } from "../../"; declare const Opacity24: React.ForwardRefExoticComponent<<|fim▁hole|><|fim▁end|>
CarbonIconProps & React.RefAttributes<SVGSVGElement> >; export default Opacity24;
<|file_name|>version.go<|end_file_name|><|fim▁begin|>// santiago - webhook dispatching service // https://github.com/topfreegames/santiago // Licensed under the MIT license:<|fim▁hole|> package metadata //VERSION identifies current version of the application var VERSION = "1.2.0"<|fim▁end|>
// http://www.opensource.org/licenses/mit-license // Copyright © 2016 Top Free Games <backend@tfgco.com>
<|file_name|>functions_7.js<|end_file_name|><|fim▁begin|>var searchData= [ ['save_5fcomments',['save_comments',['../useful__functions_8php.html#af56aec073a82606e9a7dac498de28d96',1,'useful_functions.php']]],<|fim▁hole|> ['signup_5fexists',['signup_exists',['../useful__functions_8php.html#a7cf6d3ac90a6fca8c3f595e68b6...
['save_5fexperiment_5flist',['save_experiment_list',['../choose__experiments_8php.html#a5d24f39ae6c336d7828523216bce6fae',1,'choose_experiments.php']]], ['save_5fsessions',['save_sessions',['../useful__functions_8php.html#a38a4632f417ceaa2f1c09c3ed0494d5e',1,'useful_functions.php']]], ['save_5fsignup_5fto_5fdb',[...
<|file_name|>agent.py<|end_file_name|><|fim▁begin|>""" Due is a learning, modular, action-oriented dialogue agent. `Agents` are the entities that can take part in Episodes (:mod:`due.episode`), receiving and issuing Events (:mod:`due.event`). """ import uuid from abc import ABCMeta, abstractmethod from datetime import ...
Returns the Agent as an object. This object can be loaded with :func:`Agent.load` and can be (de)serialized using the
<|file_name|>generic.rs<|end_file_name|><|fim▁begin|>use rustc_serialize; use quick_csv::Csv; use csv; use nn::{NN, HaltCondition}; use std::clone::Clone; use std::cmp::Eq; use std::collections::HashMap; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::fmt::Debug; use rustc_serialize::{Decodable, Enc...
}
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// // SOS: the Stupid Operating System // by Eliza Weisman (eliza@elizas.website) // // Copyright (c) 2015-2017 Eliza Weisman // Released under the terms of the MIT license. See `LICENSE` in the root // directory of this repository for more information. // //! Archi...
use ::{Addr, Page};
<|file_name|>mask.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <%he...
}, _ => {}
<|file_name|>Face.py<|end_file_name|><|fim▁begin|>import pygame class Face(pygame.sprite.Sprite): def __init__(self, imagePaths, rect, player): pygame.sprite.Sprite.__init__(self) self.imagePath = imagePaths self.images = {} self.rect = pygame.Rect(rect) self.player = player ...
self.stateCallback = cb
<|file_name|>move-4.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(dead_code)] struct Triple { a: isize, b: isize, c: isize } fn test(foo: Box<Triple>) -> Box<Triple> { let foo = foo; let bar = foo; let baz = bar; let quux = baz; return quux; } pub fn main() { let x = Box::new(Triple{ a...
<|file_name|>secret.go<|end_file_name|><|fim▁begin|>package authorizer import ( "context" "github.com/influxdata/influxdb/v2" "github.com/influxdata/influxdb/v2/kit/platform" ) var _ influxdb.SecretService = (*SecretService)(nil) // SecretService wraps a influxdb.SecretService and authorizes actions // against i...
<|file_name|>test_lexical_syntactic_featurizer.py<|end_file_name|><|fim▁begin|>import numpy as np import pytest import re from typing import Text, Dict, Any, Callable, List, Optional, Union from rasa.engine.graph import ExecutionContext from rasa.engine.storage.storage import ModelStorage from rasa.engine.storage.reso...
message = Message(data={TOKENS_NAMES[TEXT]: tokens})
<|file_name|>JsonRest.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ //>>built define("dojo/store/JsonRest",["../_base/xhr","../_base/lang"...
if(this.rangeParam){ _12+=(_12||_15?"&":"?")+this.rangeParam+"="+_14["X-Range"]; _15=true;
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS DATABASES = { 'default': {<|fim▁hole|> 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test', } } ROOT_URLCONF = 'urls' SITE_ID = 1 INSTALLED_APPS = ( 'django.contrib.c...
<|file_name|>UTTTError.ts<|end_file_name|><|fim▁begin|>export default class UTTTError extends Error {<|fim▁hole|> super(message); this.code = code; } }<|fim▁end|>
constructor(message: string, private code: number) {
<|file_name|>server-entry.js<|end_file_name|><|fim▁begin|>import { app, router, store } from './app' const isDev = process.env.NODE_ENV !== 'production' export default context => { const s = isDev && Date.now() router.push(context.url) const matchedComponents = router.getMatchedComponents() if (!matchedCompo...
<|file_name|>ParseUtils.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 hilemz * * http://www.wykop.pl/ludzie/hilemz/ * * 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:/...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { Direction } from "./Direction"; function printValue(direction: Direction): void { if (direction === Direction.Horizontal) { console.log("Horizontal."); } else if (direction === Direction.Vertical) { console.log("Vertical."); } else...
<|file_name|>adbutlerBidAdapter_spec.js<|end_file_name|><|fim▁begin|>describe('adbutler adapter tests', function () { var expect = require('chai').expect; var adapter = require('modules/adbutlerBidAdapter'); var adLoader = require('src/adloader'); var bidmanager = require('src/bidmanager'); describe('creatio...
bidderCode: 'adbutler', bids: [
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {} with open(path.join(HERE, 'datadog_checks', 'riak_repl', '__about__.py')) as f: exe...
def get_dependencies(): dep_file = path.join(HERE, 'requirements.in')
<|file_name|>aws-autoscalingplans-scalingplan_predefinedscalingmetricspecification.go<|end_file_name|><|fim▁begin|>package resources import "github.com/awslabs/goformation/cloudformation/policies" // AWSAutoScalingPlansScalingPlan_PredefinedScalingMetricSpecification AWS CloudFormation Resource (AWS::AutoScalingPlans...
// Required: false
<|file_name|>updating-widget.js<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Hewlett Packard Enterprise Development Company, L.P. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. */ define([ 'underscore', 'jquery', 'find/idol/app/page...
<|file_name|>bitcoin_cy.ts<|end_file_name|><|fim▁begin|><TS version="2.1" language="cy"> <context> <name>AddressBookPage</name> <message> <source>Create a new address</source> <translation>Creu cyfeiriad newydd</translation> </message> <message> <source>&amp;New</source> ...
<|file_name|>signals.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import get_user_model from django.db import transaction from django.db.models.signals import pre_delete from django.dispatch import Signal, receiver from misago.categories.models import Category from misago.categories.signals import delete_c...
def merge_threads_posts(sender, **kwargs):
<|file_name|>rms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Request Management System - Controllers """ prefix = request.controller resourcename = request.function if prefix not in deployment_settings.modules: session.error = T("Module disabled!") redirect(URL(r=request, c="default", f="inde...
_same = r.same()
<|file_name|>app-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; //import { UIRouter } from "@uirouter/angular"; import { BirthplacesComponent } from './modules/birthplace/components/birthplaces/birthplaces.component'; im...
<|file_name|>lists.js<|end_file_name|><|fim▁begin|>// ***************************************************************************** // Copyright 2013-2019 Aerospike, 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 o...
<|file_name|>filters.py<|end_file_name|><|fim▁begin|>import django_filters from rest_framework import filters from waldur_core.core import filters as core_filters from . import models class InvoiceFilter(django_filters.FilterSet): customer = core_filters.URLFilter( view_name='customer-detail', field_nam...
return queryset.filter(is_active=True)
<|file_name|>RecipientsActivity.java<|end_file_name|><|fim▁begin|>package com.elionhaxhi.ribbit.ui; import java.util.ArrayList; import java.util.List; import android.app.Activity; import android.app.AlertDialog; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.NavUtils; import android.u...
public static final String TAG=RecipientsActivity.class.getSimpleName(); protected List<ParseUser> mFriends;
<|file_name|>aggregate.py<|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 #...
# TODO: infer the coder from the input types and output type of the built-in functions
<|file_name|>ClientYamlTestSuite.java<|end_file_name|><|fim▁begin|>/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apac...
} public String getName() { return name;
<|file_name|>read_hadamard_file.py<|end_file_name|><|fim▁begin|># read_hadamard_file.py # Reads data from a text file to create a 3D # version of a given Hadamard Matrix. # Created by Rick Henderson # Created on June 4, 2015 # Completed June 5, 2015 # Note: A "Hadamard File" is a text file containing rows # ro...
import bpy # Set the order (size) of the matrix
<|file_name|>roundtrip.validator.ts<|end_file_name|><|fim▁begin|>import { Directive } from '@angular/core'; import { FormGroup, Validator, AbstractControl, NG_VALIDATORS, FormGroupDirective, } from '@angular/forms'; @Directive({ selector: 'form[round-trip]', providers: [{ provide: NG_VALIDATORS, useExist...
if (!fromCtrl || !toCtrl) return {};
<|file_name|>cubeblocks.py<|end_file_name|><|fim▁begin|>import xml.etree.ElementTree as ET<|fim▁hole|>class Definition(object): def __init__(self, definition_root): self._definition_root = definition_root def type_name(self): type_id = self._definition_root.find('Id').find('TypeId') su...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models # Create your models here. class Author(models.Model): first_name = models.CharField(max_length = 100)<|fim▁hole|> profile_photo = models.ImageField(upload_to="media") linkedin_link = models.URLField(max_length=250) person...
last_name = models.CharField(max_length = 100) date_of_birth = models.DateField()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011-2013 Serpent Consulting Services...
#
<|file_name|>aesoracle.rs<|end_file_name|><|fim▁begin|>use matasano::set2::aesoracle; #[test] fn test_cryptopals_case() { let (success, failure) = r!(aesoracle::detect_aes_mode(100)); assert_eq!((success, failure), (100, 0));<|fim▁hole|><|fim▁end|>
}
<|file_name|>single.rs<|end_file_name|><|fim▁begin|>use mongodb::stream::StreamConnector; use mongodb::topology::{TopologyDescription, TopologyType}; use std::fs; use std::path::Path; use super::framework::run_suite; #[test] fn sdam_single() { let dir = "tests/json/data/specs/source/server-discovery-and-monitori...
<|file_name|>Utils.py<|end_file_name|><|fim▁begin|># $HeadURL: $ ''' :mod: Utils Module that collects utility functions. ''' import fnmatch from DIRAC import gConfig, S_OK from DIRAC.Core.Utilities import List from DIRAC.ConfigurationSys...
return secTree
<|file_name|>canteen_website_tags.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django import template from CanteenWebsite.models import Category from CanteenWebsite.utils.functions import setting_get register = template.Library() @register.simple_tag def get_setting(name, default=None): return s...
}
<|file_name|>Linear-B-Syllabary-regex.js<|end_file_name|><|fim▁begin|>// Regular expression that matches all symbols in the Linear B Syllabary block as per Unicode v5.1.0:<|fim▁hole|><|fim▁end|>
/\uD800[\uDC00-\uDC7F]/;
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>""" Unit tests for django-registration. These tests assume that you've completed all the prerequisites for getting django-registration running in the default setup, to wit: 1. You have ``registration`` in your ``INSTALLED_APPS`` setting. 2. You have created all of t...
def test_activation(self): """
<|file_name|>adnoce.js<|end_file_name|><|fim▁begin|>var db = require('mongoose'); var Log = require('log'), log = new Log('info'); var clienttracking = require('./clienttracking.js'); var mapreduce = require('./mapreduce.js'); var io = null; exports.server = require('./adnoceserver.js'); exports.setDatabase = funct...
callback(null, true); }).on('connection', socketConnection); clienttracking.setSocketIO(io);
<|file_name|>do_help.js<|end_file_name|><|fim▁begin|>// Copyright JS Foundation and other contributors, http://js.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...
// distributed under the License is distributed on an "AS IS" BASIS // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.