prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>App.spec.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { createStore } from 'redux'; import { createBrowserHistory } from 'history'; import { expect } from 'chai'; import { shallow } from 'enzyme'; import rootReducer from '../../src/reducers'; import Routes from '../../src/Routes'...
it('renders Routes component', () => { const wrapper = shallow(<App history={createBrowserHistory()} store={configureStore()}/>);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Various code related to computing outlives relations. pub mod env;<|fim▁hole|>pub mod verify; use rustc_middle::traits::query::OutlivesBound; use rustc_middle::ty; pub fn explicit_outlives_bounds<'tcx>( param_env: ty::ParamEnv<'tcx>, ) -> impl Iterator<Item = ...
pub mod obligations;
<|file_name|>vm.rs<|end_file_name|><|fim▁begin|>use parking_lot::{Mutex, RwLock}; use std::collections::hash_map::Iter; use std::collections::HashMap; use std::collections::HashSet; use std::convert::TryInto; use std::mem; use std::ops::{Index, IndexMut}; use std::ptr; use std::sync::Arc; use crate::baseline; use crat...
}
<|file_name|>testrun.js<|end_file_name|><|fim▁begin|>var scroungejs = require('scroungejs'), startutils = require('./startutil'); startutils.createFileIfNotExist({ pathSrc : './test/indexSrc.html', pathFin : './test/index.html' }, function (err, res) { if (err) return console.log(err); scroungejs.build({ ...
isCompressed : false, isConcatenated : false, basepage : './test/index.html' }, function (err, res) {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import os.path<|fim▁hole|><|fim▁end|>
RNASEQ_PIPELINE_DIR = os.path.dirname(__file__)
<|file_name|>SpeciesLearnset.java<|end_file_name|><|fim▁begin|>/* * PokeDat - A Pokemon Data API. * Copyright (C) 2015 * * 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 restric...
* * @author Kaioru **/ public class SpeciesLearnset implements Serializable {
<|file_name|>http_uri_name_test.go<|end_file_name|><|fim▁begin|>// Copyright 2019 Google LLC // // 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 //<|fim▁hole|>// Unless required by applicable...
// https://www.apache.org/licenses/LICENSE-2.0 //
<|file_name|>0003_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime<|fim▁hole|>from django.db import models class Migration(SchemaMigration): def forwards(self, orm): pass def backwards(self, orm): pass models = { ...
from south.db import db from south.v2 import SchemaMigration
<|file_name|>DebugCamera.cpp<|end_file_name|><|fim▁begin|>#include <Core/Platform.h> #include <Shared/misc.h> #include <Core/Core.h> #include "DebugCamera.h" #include "SceneTools.h" DebugCamera::DebugCamera(Pimp::World* world) : world(world) , isEnabled(false) , isLookingAt(false) { ASSERT(nullptr != world); camer...
{ if (enabled == isEnabled)
<|file_name|>parameterWithNestedDestructuring.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts'/> ////[[{foo: 'hello', bar: [1]}]]<|fim▁hole|> 1: "var foo: string", 2: "var baz: number" });<|fim▁end|>
//// .map(([{foo, bar: [baz]}]) => /*1*/foo + /*2*/baz); verify.quickInfos({
<|file_name|>testSelectionExtensionExprFail.py<|end_file_name|><|fim▁begin|>class A: def test(self): print "I##|nitializing A", "test"##| attribute = "hello" def my_method(self): print self.attribute a = A() a.test() ##r Should expand to Full String "Initializing A" <|fi...
# Invalid selection: # nitializing A", "test"
<|file_name|>NotExistingRecipeException.java<|end_file_name|><|fim▁begin|>package com.bellini.recipecatalog.exception.recipe; public class NotExistingRecipeException extends RuntimeException { private static final long serialVersionUID = 2975419159984559986L; private Long id; public NotExistingRecipeExce...
this.id = id; }
<|file_name|>crate-method-reexport-grrrrrrr.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 // h...
#![feature(managed_boxes)] // This is a regression test that the metadata for the // name_pool::methods impl in the other crate is reachable from this
<|file_name|>nexus_db_v2.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, Cisco Systems, 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 Licen...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for pybr11_tutorial project. Generated by 'django-admin startproject' using Django 1.8.6. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https:/...
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
<|file_name|>PasswordRecoveryService.java<|end_file_name|><|fim▁begin|>package ru.ncedu.ecomm.servlets.services.passwordRecovery; import ru.ncedu.ecomm.data.models.dao.UserDAOObject; import java.util.ArrayList; import java.util.List; import java.util.Random; import static ru.ncedu.ecomm.data.DAOFactory.getDAOFactory...
}
<|file_name|>select-harness.spec.ts<|end_file_name|><|fim▁begin|>import {MatSelectModule} from '@angular/material/select'; import {MatSelectHarness} from './select-harness'; import {runHarnessTests} from './shared.spec'; <|fim▁hole|><|fim▁end|>
describe('Non-MDC-based MatSelectHarness', () => { runHarnessTests(MatSelectModule, MatSelectHarness); });
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # BbQuick documentation build configuration file, created by # sphinx-quickstart on Fri Feb 10 20:55:10 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values...
<|file_name|>ConfPeriodo.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package pe.edu.upeu.modelo; import java.io.Serializable; import j...
this.gloMetaCollection = gloMetaCollection;
<|file_name|>cmd_away.py<|end_file_name|><|fim▁begin|>from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.config import ConfigValidationError from txircd.module_interface import Command, ICommand, IModuleData, ModuleData from txircd.utils import trimStringToByteLength from zope.interf...
else: user.sendMessage(irc.RPL_UNAWAY, "You are no longer marked as being away")
<|file_name|>IAS.MachineAccountValidation.js<|end_file_name|><|fim▁begin|>class ias_machineaccountvalidation { constructor() { } // System.Runtime.Remoting.ObjRef CreateObjRef(type requestedType) CreateObjRef() { } // bool Equals(System.Object obj) Equals() { } // int GetHashCod...
// string ToString()
<|file_name|>instr_vextractf64x4.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn vextractf64x4_1() { run_...
run_test(&Instruction { mnemonic: Mnemonic::VEXTRACTF64x4, operand1: Some(IndirectDisplaced(RAX, 1609800228, Some(OperandSize::Ymmword), None)), operand2: Some(Direct(ZMM10)), operand3: Some(Literal8(118)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }...
<|file_name|>hejbejse.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- #/* # * Copyright (C) 2011 Ivo Brhel # * # * # * 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 ve...
<|file_name|>pylexotron.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 # regarding copyright ownership. The ASF licenses this file # to you under the Apac...
terminals = [] tokeniter = iter(tokens)
<|file_name|>wifi.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os from lazagne.config.module_info import ModuleInfo try: from ConfigParser import RawConfigParser # Python 2.7 except ImportError: from configparser import RawConfigParser # Python 3 from collections ...
pwd_found = [] directory = u'/etc/NetworkManager/system-connections'
<|file_name|>inputmask.date.extensions.js<|end_file_name|><|fim▁begin|>/*! * inputmask.date.extensions.js * https://github.com/RobinHerbots/Inputmask * Copyright (c) 2010 - 2018 Robin Herbots * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) * Version: 4.0.1-beta.7 */ !function(fact...
} return result && opts.max && opts.max.date.getTime() == opts.max.date.getTime() && (result = opts.max.date.getTime() >= dateParts.date.getTime()), result; }(dateParts, opts)), result;
<|file_name|>load_run_model.py<|end_file_name|><|fim▁begin|># Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifie...
@property
<|file_name|>is_send_sync.rs<|end_file_name|><|fim▁begin|>// NOTE: the following tests will compile iff. the tested structs are `Send + Sync + 'static`. use ncollide3d::world::CollisionWorld; fn is_send_sync<T: Send + Sync + 'static>(_: T) -> bool { true } <|fim▁hole|> assert!(is_send_sync(world)); }<|fim▁end|>
#[test] fn world_is_send_sync() { let world = CollisionWorld::<f32, ()>::new(0.0f32);
<|file_name|>js-borschik-include.js<|end_file_name|><|fim▁begin|>/** * js-borschik-include * =================== * * Собирает *js*-файлы инклудами борщика, сохраняет в виде `?.js`. * Технология нужна, если в исходных *js*-файлах используются инклуды борщика. * * В последствии, получившийся файл `?.js` следует ра...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use test::Bencher; use solver::Solution; mod tools; mod jnh01; mod jnh02; mod jnh03; mod jnh12; #[bench] fn wikipedia(b: &mut Bencher) { let p = tools::load_problem(" p cnf 12 8 1 4 0 1 -3 -8 0 1 8 12 0 2 11 0<|fim▁hole|>-7 8 -9 0 7 8 -10 0 7 10 -12"); b.iter(|| ...
-7 -3 9 0
<|file_name|>lang-item-public.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<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT...
// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponseNotAllowed, HttpResponseServerError from django.utils import simplejson as json from util import to_json_response from util import to_dojo_data try: from functools import wraps except ImportError: from django.utils.fun...
def __getdict(self, key): ret = self.get(key) try: ret = json.loads(ret)
<|file_name|>test_extras.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function, unicode_literals) import io import unittest from prov.model import * from prov.dot import prov_to_dot from prov.serializers import Registry from prov.tests.examples impor...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hischool.settings") # Add the "core" and "extensions" folders to the path sys.path.insert(0, os.path.join(os.path.dirname(__file__), "e...
<|file_name|>BSONType.java<|end_file_name|><|fim▁begin|>package com.mattinsler.guiceymongo.data.query; import org.bson.BSON; /** * Created by IntelliJ IDEA. * User: mattinsler * Date: 12/29/10 * Time: 3:28 AM * To change this template use File | Settings | File Templates. */ public enum BSONType { Double(BS...
} byte getTypeCode() { return _typeCode;
<|file_name|>aws.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var AWS = require('./core'); // Load all service classes require('../clients/all'); /** * @api private */ module.exports = AWS;<|fim▁end|>
require('./node_loader');
<|file_name|>macro-expr-uncommon-token.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types,<|fim▁hole|> non_upper_case_globals )] pub const MODBUS_WOOT: u32 = 3; extern "C" { pub fn foo(); }<|fim▁end|>
<|file_name|>_uirevision.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="uirevision", parent_name="heatmap", **kwargs): super(UirevisionValidator, self).__init__( plotly_na...
**kwargs )
<|file_name|>bf_constants.rs<|end_file_name|><|fim▁begin|>/// @copyright /// Copyright (C) 2020 Assured Information Security, Inc. /// /// @copyright /// 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 ...
/// @brief Defines the index for bf_vm_op_tlb_flush pub const BF_VM_OP_TLB_FLUSH_IDX_VAL: bsl::SafeU64 = bsl::SafeU64::new(0x0000000000000005);
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = Logger; var _lodash = require('lodash'); var _moment = require('moment'); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return...
}
<|file_name|>unitfactory.py<|end_file_name|><|fim▁begin|>from model.commonfactory import CommonFactory from model.slaveunit import SlaveUnit from model.squireunit import SquireUnit from model.swordfighterunit import SwordfighterUnit from model.archerunit import ArcherUnit from model.cavalryunit import CavalryUnit<|fim▁...
<|file_name|>test_dynamodb_consumedcapacity.py<|end_file_name|><|fim▁begin|>import boto3 import pytest import sure # noqa # pylint: disable=unused-import from botocore.exceptions import ClientError from moto import mock_dynamodb2 @mock_dynamodb2 def test_error_on_wrong_value_for_consumed_capacity(): resource = ...
["TOTAL", True, False],
<|file_name|>directory_storage_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2<|fim▁hole|># Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests of directory storage adapter.""" import ...
<|file_name|>NodeJS.js<|end_file_name|><|fim▁begin|>/* Siesta 3.0.1 Copyright(c) 2009-2015 Bryntum AB http://bryntum.com/contact http://bryntum.com/products/siesta/license */ /** @class Siesta.Harness.NodeJS @extends Siesta.Harness Class, representing the NodeJS harness. This class reports the output from all test ...
// static my : { isa : Siesta.Harness,
<|file_name|>expressions.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakos...
<|file_name|>project-suggested-contributions.js<|end_file_name|><|fim▁begin|>/** * window.c.ProjectSuggestedContributions component * A Project-show page helper to show suggested amounts of contributions * * Example of use: * view: () => { * ... * m.component(c.ProjectSuggestedContributions, {project: projec...
* }
<|file_name|>LocalDatePatternFormat.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 licenses this file to...
public class LocalDatePatternFormat implements PatternFormat<LocalDate> { private String pattern;
<|file_name|>require.js<|end_file_name|><|fim▁begin|>/** vim: et:ts=4:sw=4:sts=4 * @license RequireJS 2.1.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ //Not using strict: uneven strict suppor...
moduleName + ' at ' + url, e, [moduleName])); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from api import Api<|fim▁hole|>def full_url(resource): return Api.url_base.format(resource=resource)<|fim▁end|>
<|file_name|>review.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 ...
def getSurName(self): return self._surName
<|file_name|>async_steps35.py<|end_file_name|><|fim▁begin|># -- REQUIRES: Python >= 3.5 from behave import step from behave.api.async_step import async_run_until_complete<|fim▁hole|>@step('an async-step waits {duration:f} seconds') @async_run_until_complete async def step_async_step_waits_seconds_py35(context, duration...
import asyncio
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># finances.settings # The common Django settings for the Finance Analysis project. # # Author: Benjamin Bengfort <bengfort@cs.umd.edu> # Created: Tue Jan 19 20:43:16 2016 -0500 # # Copyright (C) 2015 Bengfort.com # For license information, see LICENSE.txt # # ID:...
########################################################################## ## Imports ##########################################################################
<|file_name|>FATSuite.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementatio...
/******************************************************************************* * Copyright (c) 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials
<|file_name|>test_coordination_geometries.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python __author__ = 'waroquiers' import unittest import numpy as np from pymatgen.util.testing import PymatgenTest from pymatgen.analysis.chemenv.coordination_environments.coordination_geometries import ExplicitPermutationsAlgo...
'\n' ' - coordination number : 6\n' ' - list of points :\n' ' - [0.0, 0.0, 1.0]\n'
<|file_name|>test-conv-samevalue.js<|end_file_name|><|fim▁begin|>/* * SameValue() (E5 Section 9.12). * * SameValue() is difficult to test indirectly. It appears in E5 Section * 8.12.9, [[DefineOwnProperty]] several times. * * One relatively simple approach is to create a non-configurable, non-writable * pr...
print('test: different types, first object')
<|file_name|>TestIpPrefixOperators.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 requ...
public class TestIpPrefixOperators extends AbstractTestFunctions {
<|file_name|>window.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/. */ use dom::bindings::codegen::WindowBinding; use dom::bindings::...
} }
<|file_name|>api.pb.go<|end_file_name|><|fim▁begin|>/* Copyright The Kubernetes Authors. 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 requi...
<|file_name|>highlighter.py<|end_file_name|><|fim▁begin|>import re from PyQt4.QtGui import QSyntaxHighlighter, QColor, QFont, QTextCharFormat from PyQt4.QtCore import Qt from .mdx_strkundr import DEL_RE, INS_RE, STRONG_RE, EMPH_RE class MikiHighlighter(QSyntaxHighlighter): WORDS = r'(?iu)[\w\']+' def __ini...
self.setCurrentBlockState(1)
<|file_name|>polls.py<|end_file_name|><|fim▁begin|>import factory import factory.django from faker import Faker from machina.core.db.models import get_model<|fim▁hole|>from machina.test.factories.auth import UserFactory from machina.test.factories.conversation import TopicFactory faker = Faker() TopicPoll = get_mod...
<|file_name|>index.rs<|end_file_name|><|fim▁begin|>extern crate iron; extern crate staticfile; extern crate mount; use iron::{status, Iron, Request, Response, IronResult, IronError}; use iron::mime::Mime; use staticfile::Static; use mount::Mount; use std::process::{Command, Output}; use std::error::Error; #[derive(D...
fn main() { let mut root = Mount::new(); root.mount("/", Static::new("../")) .mount("/server", serve);
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "content_edit_proj.settings") <|fim▁hole|> execute_from_command_line(sys.argv)<|fim▁end|>
from django.core.management import execute_from_command_line
<|file_name|>derives-span-Clone-enum.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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.ap...
// except according to those terms.
<|file_name|>voice.cpp<|end_file_name|><|fim▁begin|>// --------------------------------------------------------------------------- // This file is part of reSID, a MOS6581 SID emulator engine. // Copyright (C) 2004 Dag Lem <resid@nimrod.no> // // This program is free software; you can redistribute it and/or modify...
// = 0x38) at 5.94V. wave_zero = 0x380;
<|file_name|>zh.js<|end_file_name|><|fim▁begin|><|fim▁hole|>Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'toolbar', 'zh', { toolbarCollapse: '摺疊工具列', toolbarExpand: '展開工具列'...
/*
<|file_name|>UserService.java<|end_file_name|><|fim▁begin|>package de.leif.ffmanagementsuite.service; import de.leif.ffmanagementsuite.domain.Authority; import de.leif.ffmanagementsuite.domain.User; import de.leif.ffmanagementsuite.repository.AuthorityRepository; import de.leif.ffmanagementsuite.config.Constants; impo...
newUser.setLogin(login);
<|file_name|>views.py<|end_file_name|><|fim▁begin|>""" Copyright 2016 Andrea McIntosh 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 ...
class IndexView(generic.ListView): template_name = "polls/index.html"
<|file_name|>0010_target_data_migration.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations <|fim▁hole|> for entry in Entry.objects.all(): entry.target_amount = entry.goal.target_amount entry.save() class Migratio...
def populate_target_amount(apps, schema_editor): Entry = apps.get_model("momentum", "Entry")
<|file_name|>motion_detector.py<|end_file_name|><|fim▁begin|># USAGE # python motion_detector.py # python motion_detector.py --video videos/example_01.mp4 # import the necessary packages import argparse import datetime import imutils import time import cv2 # construct the argument parser and parse the arguments ap = ...
# initialize the first frame in the video stream firstFrame = None
<|file_name|>explicit_self_xcrate_exe.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. //<|fim▁hole|>// except according to those terms. // ignore-fast // aux-build:exp...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>Charge.js<|end_file_name|><|fim▁begin|>/** * Charge.js * * @description :: TODO: You might write a short summary of how this model works and what it represents here. * @docs :: http://sailsjs.org/#!documentation/models */ module.exports = { attributes: {<|fim▁hole|> name: { type: 'string...
<|file_name|>Gpio.java<|end_file_name|><|fim▁begin|>package com.esd.phicomm.bruce.esdapp; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io...
try {
<|file_name|>yelphelper.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Meson development 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.apache.org/licenses/LICENS...
# limitations under the License. import os
<|file_name|>nn_NO.js<|end_file_name|><|fim▁begin|>OC.L10N.register( "weather", { "Monday" : "Måndag", "Tuesday" : "Tysdag", "Wednesday" : "Onsdag", "Thursday" : "Torsdag", "Friday" : "Fredag", "Saturday" : "Laurdag",<|fim▁hole|> "Sunday" : "Søndag", "Weather" : "Vær", "Save" ...
<|file_name|>variance.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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/licens...
//! associated types invariant, then projection is no longer a //! function with a single result. Consider: //!
<|file_name|>parserx86.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 ## ## We define Instrution as two types "Computing instruction" and "Control Transfer instruction" ## for computing instruction ## "NAME" : [ Operand_Number , [ Formula_that_modify_reg ], [ FLAG_reg_modified]] ## for control transfter ins...
"cld": [0, [], ["DF = 0"]],
<|file_name|>strategy.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes Authors. 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 Unles...
// If you make changes to this file, you should also make the corresponding change in ReplicaSet. package replicationcontroller
<|file_name|>fuzzylogic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst<|fim▁hole|>""" Quality Control based on fuzzy logic. """ import logging import numpy as np from .core import QCCheckVar from .gradient import gradient from .spike import...
<|file_name|>assignment5.py<|end_file_name|><|fim▁begin|>import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn import tree from subprocess import call # https://archive.ics.uci.edu/ml/machine-learning-databases/mushroom/agaricus-lepiota.names # # TODO: Load up the...
<|file_name|>internet_protocol.py<|end_file_name|><|fim▁begin|># -*- test-case-name: twisted.test.test_factories,twisted.internet.test.test_protocol -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details.<|fim▁hole|>Start here if you are looking to write a new protocol implementation for Twisted. T...
""" Standard implementations of Twisted protocol-related interfaces.
<|file_name|>_hastagbase.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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; e...
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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.or...
fn call_stream( &self,
<|file_name|>filters.py<|end_file_name|><|fim▁begin|>from abc import ABCMeta, abstractmethod import six from django.db.models import Q from dimagi.utils.chunked import chunked class DomainFilter(six.with_metaclass(ABCMeta)): @abstractmethod def get_filters(self, domain_name): """Return a list of fil...
self.include_web_users = include_web_users
<|file_name|>file_to_gcs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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 requ...
""" Uploads a file to Google Cloud Storage
<|file_name|>store.tsx<|end_file_name|><|fim▁begin|>import {createStore, combineReducers} from 'redux'; import {todos} from '../reducers/todos'; export function configureStore() {<|fim▁hole|> const store = createStore(combineReducers({todos})); return store; }<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc # 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 ...
your phone number, your avatar, your enterprise name and ID etc. This `user` is the root object of everything as all subsequent
<|file_name|>transform.py<|end_file_name|><|fim▁begin|>''' Geometry Transform<|fim▁hole|>'''<|fim▁end|>
<|file_name|>brewers.py<|end_file_name|><|fim▁begin|>from tableacc import TableAcc class Brewers(TableAcc): def __init__(self): super(Brewers, self).__init__( table_name='brewers', cols=['id', 'name', 'location_id'], upsert_proc='brewerupsert') def bylocation_id(self, location_id, or...
param=[location_id] ) def has_recommended_beers_by_loc(self, location_id, order_by=""):
<|file_name|>MutableTriple.java<|end_file_name|><|fim▁begin|>package com.springdemo.learningMVC.common.src.main.java.com.common.tuple; /** * A mutable triple consisting of three {@code Object} elements. * <p> * Not #ThreadSafe# * * @param <L> the left element type * @param <M> the middle element type * @param <...
}
<|file_name|>java1.py<|end_file_name|><|fim▁begin|>import os import pynja import repo <|fim▁hole|> sources = [ "com/java1/Counter.java", ] with self.java_compile_ex(sources) as task: task.workingDir = os.path.join(self.projectDir, "source") self.jar_create("java1...
@pynja.project class java1(repo.JavaProject): def emit(self):
<|file_name|>status_library.py<|end_file_name|><|fim▁begin|>from robot.libraries.BuiltIn import BuiltIn <|fim▁hole|><|fim▁end|>
def fail_with_traceback(traceback_message): BuiltIn().fail(traceback_message)
<|file_name|>TypedMap.java<|end_file_name|><|fim▁begin|>/* * !++ * QDS - Quick Data Signalling Library * !- * Copyright (C) 2002 - 2021 Devexperts LLC * !- * 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 obt...
public synchronized <T> T get(TypedKey<T> key) { return (T) values.get(key); }
<|file_name|>ScanSetup.py<|end_file_name|><|fim▁begin|>from Screen import Screen from ServiceScan import ServiceScan from Components.config import config, ConfigSubsection, ConfigSelection, \ ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable from Components.ActionMap import NumberAction...
# DVB-T2 : OK frequency bandwidth delivery system number_of_plp plp_id0:plp_type0 if data[3] == 1: # DVB-T parm = eDVBFrontendParametersTerrestrial() parm.frequency = int(data[1])
<|file_name|>price_history_pack.py<|end_file_name|><|fim▁begin|>import numpy as np class PriceHistoryPack(object): def __init__(self, input_seq_len, num_features, target_seq_len): super(PriceHistoryPack, self).__init__() self.sku_ids = [] self.XX = np.empty((0, input_seq_len, num_features)...
self.YY = np.empty((0, target_seq_len)) self.sequence_lens = []
<|file_name|>portugal_weather_forecast.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This program collects Portugal weather forecasts from IPMA and uploads them to the Orion Context Broker. It uploads the list of stations on the fly from - http://api.ipma.pt/json/loca...
<|file_name|>safe_test.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Irfan Adilovic // This software is licensed under the terms of the MIT license. // See LICENSE for the text of the license. #include <iostream> #include <iomanip> #include <limits> #include <stdint.h> #include <cstdio> #include <typeinfo> #in...
printf(" expecting 1u >/>= int8_t(-1) to fail, but safe variants to succeed...\n"); safe_cmp_assert2(1u, >, >=, int8_t(-1), <, <=);
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from "./msg-repo"; export * from "./imsg-repo"; export * from "./msg-repo-mock";<|fim▁end|>
export * from "./msg";
<|file_name|>lxde.py<|end_file_name|><|fim▁begin|># # xfce.py # # Copyright (C) 2010 Fabio Erculiani # # 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 y...
"A small lightweight and functional working environment at your service.") _descriptionFields = (productName,) sortPriority = 10000
<|file_name|>parse.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate criterion; extern crate rand; extern crate rs_poker; use criterion::Criterion; use rs_poker::holdem::RangeParser; fn parse_ako(c: &mut Criterion) { c.bench_function("Parse AKo", |b| { b.iter(|| RangeParser::parse_one("AKo")); ...
});
<|file_name|>permissions_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env vpython # Copyright 2020 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. import logging import sys import unittest import test_env te...
self.check(