prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>bulkimportusers.py<|end_file_name|><|fim▁begin|>import csv import logging import ntpath import re import sys from uuid import UUID from django.conf import settings from django.contrib.auth.hashers import make_password from django.core.exceptions import ValidationError from django.core.management.base impo...
if not username: error = { "row": index + 1, "message": MESSAGES[DUPLICATED_USERNAME],
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: { options: { separator: ';' }, dist: { src: ['assets/magnific.js', 'assets/jquery-vimeothumb.js'], dest: 'ma...
}, dist: { files: {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Form widgets for ToscaWidgets. To download and install:: easy_install twForms """ from tw.api import Widget from tw.forms.core import * from tw.forms.fields import * from tw.forms.datagrid import * from tw.forms.calendars import * # build all so doc to...
from tw.forms.datagrid import __all__ as __datagrid_all from tw.forms.calendars import __all__ as __calendars_all
<|file_name|>payment.py<|end_file_name|><|fim▁begin|># coding: utf-8 import json import logging import dateutil.parser import pytz from werkzeug import urls from odoo import api, fields, models, _ from odoo.addons.payment.models.payment_acquirer import ValidationError from odoo.addons.payment_paypal.controllers.main...
return invalid_parameters @api.multi
<|file_name|>gen.py<|end_file_name|><|fim▁begin|>from random import randrange MAX = 100000 args = [randrange(MAX) for x in range(2 * MAX)] args1 = [randrange(MAX) for x in range(MAX)] args2 = [randrange(MAX) + MAX for x in range(MAX)] def mkdel(s): return "delete " + str(s) def mkins(s): return "insert " + str(...
print ("\n".join(map(mkins, args1)) \
<|file_name|>redux-little-router.js<|end_file_name|><|fim▁begin|>(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("react")); else if(typeof define === 'function' && define.amd) define(["react"], factory); el...
* @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener.
<|file_name|>segmentation.py<|end_file_name|><|fim▁begin|>from cmsplugin_cascade.segmentation.mixins import EmulateUserModelMixin, EmulateUserAdminMixin from shop.admin.customer import CustomerProxy class EmulateCustomerModelMixin(EmulateUserModelMixin): UserModel = CustomerProxy <|fim▁hole|><|fim▁end|>
class EmulateCustomerAdminMixin(EmulateUserAdminMixin): UserModel = CustomerProxy
<|file_name|>linkaddrcache_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The gVisor 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/licen...
t.Errorf("c.get(%q)=%q, want %q", string(e.addr.Addr), got, l2) }
<|file_name|>ManagedClustersListSamples.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.containerservice.generated; import com.azure.core.util...
* @param azure The entry point for accessing resource management APIs in Azure. */ public static void listManagedClusters(com.azure.resourcemanager.AzureResourceManager azure) {
<|file_name|>FunctionDescriptorValidator.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 fi...
* 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.
<|file_name|>receive_logs.py<|end_file_name|><|fim▁begin|>import asyncio from aio_pika import connect, IncomingMessage, ExchangeType loop = asyncio.get_event_loop() async def on_message(message: IncomingMessage): async with message.process(): print("[x] %r" % message.body) async def main():<|fim▁hole|>...
# Perform connection connection = await connect( "amqp://guest:guest@localhost/", loop=loop )
<|file_name|>piWebAPI.js<|end_file_name|><|fim▁begin|>var activeElements = []; var sleepElements = []; var promises = []; $.ajax("https://osiproghackuc2015.osisoft.com/piwebapi/assetdatabases/D0EgxEhIf8KUieOFdFcX1IWQZ8qIGYDdE0m5aJCwNb4x_gSlVQSVRFUjAwMVxQSUZJVE5FU1M/elements", { type : 'GET', headers: { "Authoriza...
ChildWebId : innerItem.WebId }); }
<|file_name|>synchronous.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: iso-8859-15 -*- # ========================================================================== # Copyright (C) 2016 Dr. Alejandro Pina Ortega # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this...
return 'Should never see this'
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(feature = "strict", deny(warnings))] <|fim▁hole|>extern crate libc; extern crate syn; mod attributes; // Used by remacs-macros and remacs-lib pub use self::attributes::parse_lisp_fn;<|fim▁end|>
extern crate darling; extern crate errno;
<|file_name|>driver.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. *-----------...
constructor(
<|file_name|>RoleManagerImpl.java<|end_file_name|><|fim▁begin|>/** * Copyright 2014 David L. Whitehurst * * 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/licen...
} /**
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .ao_integrals import AOIntegrals, ao2mo<|fim▁hole|>from .fcidump_generator import generate_fcidump<|fim▁end|>
from .mo_integrals import FCIDUMP from .mo_integrals import load as load_fcidump
<|file_name|>rovnice.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python def kvadraticka(a, b, c): return 20 def kubicka(a, b, c, d): return 77<|fim▁hole|> print 'Inicializuji se'<|fim▁end|>
x = 16 y = 'ahoj'
<|file_name|>get-current-bus-iteration.test.ts<|end_file_name|><|fim▁begin|>import {getCurrentBusIteration} from '../get-current-bus-iteration' import {processBusSchedule} from '../process-bus-line' import {dayAndTime, time} from './moment.helper' import type {UnprocessedBusSchedule, BusSchedule} from '../../types' f...
let schedule = { days: ['Su'],
<|file_name|>file_tools.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * Wormux is a convivial mass murder game. * Copyright (C) 2001-2007 Wormux Team. * * This program is free software; you can redistribute it and/or modify * it under the terms...
* This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>bson_benchmarks_test.go<|end_file_name|><|fim▁begin|>package mongo import ( "gopkg.in/mgo.v2/bson" "testing" ) func BenchmarkNestedDocumentSerializationDocument(b *testing.B) { document := NewDocument() subdocument := NewDocument() subdocument.Add("int", int32(10)) document.Add("string", "hello wor...
type T2 struct {
<|file_name|>frontend_test_utils.py<|end_file_name|><|fim▁begin|>import atexit, datetime, os, tempfile, unittest import common from autotest_lib.frontend import setup_test_environment from autotest_lib.frontend import thread_local from autotest_lib.frontend.afe import models, model_attributes from autotest_lib.client.c...
acl_group.users.add(models.User.current_user())
<|file_name|>compositor_thread.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/. */ //! Communication with the compositor thread. use ...
}
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> { "name": "Account Invoice Merge Stock Picking", "version": "8.0.1.0.0", "license": "AGPL-3", "author": "AvanzOSC", "website": "http://www.avanzosc.es", "contributors": [ "Ainara Galdona <ainaragaldona@avanzosc.es>", ...
# -*- coding: utf-8 -*- # Copyright 2017 Ainara Galdona - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate mtbl; extern crate rand; extern crate tempfile; extern crate test; use mtbl::{Read, Write}; use rand::distributions::{IndependentSample, Range}; use test::Bencher; #[bench] fn bench_get(bench: &mut Bencher) { let tempfile_writer = tempfile::NamedTempFi...
let tempfile_reader = tempfile_writer.reopen().unwrap(); let n_keys = 100000;
<|file_name|>DirectoryAnalyser.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2007-2015 Peter Monks. * * 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...
<|file_name|>sparse_ops.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. 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...
`sp_inputs` converted to `SparseTensor` objects. Raises:
<|file_name|>codecvt.cc<|end_file_name|><|fim▁begin|>// Locale support (codecvt) -*- C++ -*- // Copyright (C) 2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public ...
<|file_name|>DescribePendingMaintenanceActionsResult.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/docdb/model/DescribePendingMaintenanceActionsResult.h> #include <aws/core/utils/xml/XmlSerializer.h>...
#include <aws/core/AmazonWebServiceResult.h> #include <aws/core/utils/StringUtils.h> #include <aws/core/utils/logging/LogMacros.h>
<|file_name|>reset_test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl import unittest import sys try: import urllib.parse as urllib_parse except ImportError: import urllib as urllib_parse from . import appmanager from . import util setup_module, tea...
<|file_name|>minters.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of CERN Analysis Preservation Framework. # Copyright (C) 2018 CERN. # # CERN Analysis Preservation Framework is free software; you can redistribute # it and/or modify it under the terms of the GNU General Public License a...
<|file_name|>constants.rs<|end_file_name|><|fim▁begin|>pub const NODE: &str = "0"; pub const NYM: &str = "1"; pub const GET_TXN: &str = "3"; pub const ATTRIB: &str = "100"; pub const SCHEMA: &str = "101"; pub const CRED_DEF: &str = "102"; pub const GET_ATTR: &str = "104"; pub const GET_NYM: &str = "105"; pub const GET_...
<|file_name|>StaticFlow.ts<|end_file_name|><|fim▁begin|>// Copyright 2021 The Kubeflow 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/LI...
tasksMap: { [key: string]: PipelineTaskSpec; }, componentsMap: { [key: string]: ComponentSpec },
<|file_name|>practicalengine.rs<|end_file_name|><|fim▁begin|>#![allow(unstable)] extern crate time; extern crate water; use water::Net; use water::Endpoint; use water::Message; use water::ID; use water::Duration; use time::Timespec; use std::thread::JoinGuard; use std::thread::Thread; use std::vec::Vec...
endpoints.push(mep.clone()); endpoints.push(ep.clone());
<|file_name|>memory.rs<|end_file_name|><|fim▁begin|>//! # Glulx memory mapping //! //! The Glulx machine memory consists of a ROM and RAM, which themselves //! are separated into several different groups. //! //! //! ## Program Provided Values //! //! The following values are defined by the given program: //! //! * RAM...
<|file_name|>telequebec.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, smuggle_url, ) <|fim▁hole|>class TeleQuebecIE(InfoExtractor): _VALID_URL = r'https?://zonevideo\.telequebec\.tv/media/(?P<id>...
<|file_name|>ansiprint.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''Print message using ANSI terminal codes''' __author__ = "Miki Tebeka <miki@mikitebeka.com>" from sys import stdout, stderr # Format bright = 1 dim = 2 underline = 4 blink = 5 reverse = 7 hidden = 8 # Forground black = 30 red = 31 green ...
if __name__ == "__main__":
<|file_name|>testdatefmtrange_wo_SN.js<|end_file_name|><|fim▁begin|>/* * testdatefmtrange_wo_SN.js - test the date range formatter object Wolof-Senegal * * Copyright © 2021, JEDLSoft * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Lice...
<|file_name|>InfixtoPostfixConverter.py<|end_file_name|><|fim▁begin|>import string from operator import ge as greater_than_or_equal, gt as greater_than from collections import deque OPERATOR_PRECEDENCE = { '(':0, '+':1, '-':1, '*':2, '/':2, '^':3, } RIGHT_ASSOCIATIVE_OPERATORS = '^' LEFT_ASSOC...
operators.append(token) elif token == ')': while operators and operators[-1] != '(': output.append(operators.pop())
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*-coding:utf-8-*- ''' Description: Created on 2016Äê5ÔÂ26ÈÕ @author: weihua @version: ''' from __future__ import division import pandas as pd import numpy as np import pandas.io.sql as sql from datetime import datetime from sklearn.linear_model...
elif(aim=="test"):
<|file_name|>duplicate-suggestions.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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.apac...
//~| SUGGESTION (Either::One(_t), Either::Two(_u))
<|file_name|>Availability.tsx<|end_file_name|><|fim▁begin|>import React from "react" import { makeStyles } from "@material-ui/core/styles" import Alert from "@material-ui/lab/Alert" import AvailableDisplay from "./AvailableDisplay" import { CartItem } from "common/types" const useStyles = makeStyles((theme) => ({ me...
)}
<|file_name|>test_regions.py<|end_file_name|><|fim▁begin|>from contextlib import contextmanager from mpconstants.countries import COUNTRY_DETAILS from nose.tools import eq_, ok_ from tower import activate import mkt.constants.regions as regions from mkt.site.tests import TestCase class TestRegions(TestCase): def...
regions.REGIONS_CHOICES_SORTED_BY_NAME()] ok_(region_names_pl.index(regions.ESP.name) <
<|file_name|>0003_auto_20161027_0940.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-10-27 09:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('images', '0002_alter_fie...
field=models.TextField(blank=True, default=''), ),
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all poss...
# The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. #language = None
<|file_name|>broadcast.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import sys sys.path.append('..') from src.sim import Sim from src.packet import Packet from networks.network import Network class BroadcastApp(object): def __init__(self, node): self.node = node def recei...
n5.add_protocol(protocol="broadcast", handler=b5) # send a broadcast packet from 1 with TTL 2, so everyone should get it
<|file_name|>hook.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
# proxy module from __future__ import absolute_import from apptools.type_manager.hook import *
<|file_name|>staticFriction.js<|end_file_name|><|fim▁begin|>var Example = Example || {}; Example.staticFriction = function() { var Engine = Matter.Engine, Render = Matter.Render, Runner = Matter.Runner, Body = Matter.Body, Composites = Matter.Composites, Events = Matter.Even...
<|file_name|>chat_test.go<|end_file_name|><|fim▁begin|>package db import ( "database/sql" "testing" "time" ) var chdb ChatDB func init() { setupDB() } func setupDB() { conn, _ := sql.Open("sqlite3", ":memory:") initDatabaseTables(conn, "") chdb = ChatDB{ db: conn, } } func TestChatDB_Put(t *testing.T) { ...
if count != 2 { t.Error("GetUnreadCount returned incorrect count") } }
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// main.go package main import ( "net/http" "github.com/gin-gonic/gin" ) var router *gin.Engine func main() { // Set Gin to production mode gin.SetMode(gin.ReleaseMode) // Set the router as the default one provided by Gin router = gin.Default() // Process ...
<|file_name|>ban_string_initialized_sets_rule.ts<|end_file_name|><|fim▁begin|>/** * @fileoverview Bans `new Set(<string>)` since it is a potential source of bugs * due to strings also implementing `Iterable<string>`. */ import * as ts from 'typescript'; import {Checker} from '../checker'; import {ErrorCode} from '...
readonly ruleName = Rule.RULE_NAME; readonly code = ErrorCode.BAN_STRING_INITIALIZED_SETS; register(checker: Checker) {
<|file_name|>OOMPpart_CAPC_0603_X_PF100_V50.py<|end_file_name|><|fim▁begin|>import OOMP newPart = OOMP.oompItem(8826) newPart.addTag("oompType", "CAPC") newPart.addTag("oompSize", "0603") newPart.addTag("oompColor", "X") newPart.addTag("oompDesc", "PF100")<|fim▁hole|> OOMP.parts.append(newPart)<|fim▁end|>
newPart.addTag("oompIndex", "V50")
<|file_name|>nursery.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import with_statement import argparse import sys import logging import urllib, urllib2 import json from fabric.operations import local from fabric.api import hide import yaml VERSION = "0.0.1" SERVER_FILE = ".server" logging.ba...
server = values
<|file_name|>version.rs<|end_file_name|><|fim▁begin|>/*! Querying SDL Version */ use std::ffi::CStr; use std::fmt; use sys::version as ll; /// A structure that contains information about the version of SDL in use. #[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)] pub struct Version { /// major version pub ...
}
<|file_name|>runtest.py<|end_file_name|><|fim▁begin|>import os import sys import django def main(): """ Standalone django model test with a 'memory-only-django-installation'. You can play with a django model without a complete django app installation. http://www.djangosnippets.org/snippets/1044/ "...
global_settings.ROOT_URLCONF = "websettings.urls"
<|file_name|>styling.ts<|end_file_name|><|fim▁begin|>// Copyright (c) Jupyter Development Team. // Distributed under the terms of the Modified BSD License. /** * A namespace for node styling. */ export namespace Styling { /** * Style a node and its child elements with the default tag names. * * @param nod...
let child = nodes[i]; child.classList.add('jp-mod-styled'); if (className) { child.classList.add(className);
<|file_name|>class_ClientMessage.py<|end_file_name|><|fim▁begin|># _*_ coding:utf-8 _*_ # Filename:ClientUI.py # Python在线聊天客户端 from socket import * from ftplib import FTP import ftplib import socket import thread import time import sys import codecs import os reload(sys) sys.setdefaultencoding( "utf-8" ) class ClientM...
<|file_name|>ui.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 https://mozilla.org/MPL/2.0/. */ //! Specified types for UI properties. use crate::parser::{Parse...
/// A specified value for `scrollbar-color` property
<|file_name|>dm_utils.py<|end_file_name|><|fim▁begin|>from collections import namedtuple import io import re from six.moves.urllib.parse import urlparse from apitools.base.py import exceptions as apitools_exceptions from googlecloudsdk.api_lib.deployment_manager import dm_base from ruamel.yaml import YAML DM_OUTPUT_Q...
<|file_name|>log_entry.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: google/api/servicecontrol/v1/log_entry.proto package google_api_servicecontrol_v1 import proto "github.com/gogo/protobuf/proto" import fmt "fmt" import math "math" import _ "go.pedge.io/pb/gogo/goog...
<|file_name|>dialog-ref.ts<|end_file_name|><|fim▁begin|>import {OverlayRef, GlobalPositionStrategy} from '../core'; import {AnimationEvent} from '@angular/animations'; import {DialogPosition} from './dialog-config'; import {Observable} from 'rxjs/Observable'; import {Subject} from 'rxjs/Subject'; import {MdDialogContai...
}
<|file_name|>ipython_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent from pants.backend.python import target_types_rules from pants.ba...
python_sources(name='b', interpreter_constraints=['>=3.5']) """
<|file_name|>subject_locator_admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from edc_registration.models import RegisteredSubject from edc_locator.admin import BaseLocatorModelAdmin from ..forms import SubjectLocatorForm from ..models import SubjectLocator class SubjectLocatorAdmin(BaseLocat...
radio_fields = {"home_visit_permission": admin.VERTICAL,
<|file_name|>sigma_urls.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- import requests import random import time from pyquery import PyQuery as pq from mongodb import db, conn from requests.exceptions import ConnectionError from chem_log import log # urls = [ # 'http://www.sigmaald...
""" url = 'http://www.sigmaaldrich.com/china-mainland/zh/analytical-chromatography/analytical-chromatography-catalog.html' res = get_res(url)
<|file_name|>post_processing.pb.cc<|end_file_name|><|fim▁begin|>// Generated by the protocol buffer compiler. DO NOT EDIT! // source: object_detection/protos/post_processing.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "object_detection/protos/post_processing.pb.h" #include <algorithm> #inclu...
const PostProcessing_ScoreConverter PostProcessing::SIGMOID;
<|file_name|>MetadataRepoTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2018 The Android Open Source Project * * 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....
@Test public void testPut_withMultiCodePointsMapping() { final int[] codePoint = new int[]{1, 2, 3, 4};
<|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::F20R2 { #[doc = r" Modifies the contents of the register"] #[inline(always)] pub fn modify<F>(&se...
} #[doc = "Bit 28 - Filter bits"] #[inline(always)]
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """zip source directory tree""" import argparse import fnmatch import logging import os import re import subprocess import zipfile def get_version(): command = ['git', 'describe', '--tags', '--dirty', '--always'] return subprocess.check...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Created by Cai Kang Jie on 2017/7/31. */ import lazyLoading from './../../store/modules/routeConfig/lazyLoading' export default {<|fim▁hole|> name: 'UI Features', expanded: false, sidebarMeta: { title: 'UI Features', icon: 'ion-android-laptop', ...
<|file_name|>drag-handle.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {BooleanInput, coerceBooleanProperty} from '@angular/...
@Input('cdkDragHandleDisabled') get disabled(): boolean { return this._disabled; } set disabled(value: boolean) { this._disabled = coerceBooleanProperty(value);
<|file_name|>dependency.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015-2016 Cisco Systems, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including with...
msg = "Downloading dependencies with '{}'...".format( dependency_name) util.print_info(msg)
<|file_name|>icons-list.js<|end_file_name|><|fim▁begin|>var icons = [ 'moneybag', 'save', 'establishment', 'completion', 'share', 'no_money', 'euro', 'palette', 'puzzle', 'backward', 'partial', 'minimize', 'tick', 'tick_thin', 'tick_bold', 'compass', 'minus', 'supplies', 'alarm', 'analytics', 'char...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for opendai_lleida_web project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` com...
might make sense to replace the whole Django WSGI application with a custom one that later delegates to the Django one. For example, you could introduce WSGI middleware here, or combine a Django application with an application of another
<|file_name|>message.py<|end_file_name|><|fim▁begin|># Copyright (C) 2008 Canonical 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 by # the Free Software Foundation; either version 2 of the License, or # (at your option) a...
<|file_name|>express.ts<|end_file_name|><|fim▁begin|>'use strict'; /** * Module dependencies. */ import * as fs from 'fs'; import * as http from 'http'; import * as https from 'https'; import * as express from 'express'; import * as morgan from 'morgan'; import * as bodyParser from 'body-parser'; import * as sessio...
// use passport session app.use(passport.initialize());
<|file_name|>test_NUMBER.py<|end_file_name|><|fim▁begin|>from rambutan3.check_args.annotation.NUMBER import NUMBER def test(): assert not NUMBER.matches("abc") assert not NUMBER.matches(True)<|fim▁hole|> assert NUMBER.matches(-1.234) assert NUMBER.matches(-1) assert NUMBER.matches(0) assert NUM...
<|file_name|>dialog_apply_filter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2010-2017 Samuele Carcagno <sam.carcagno@gmail.com> # This file is part of pysoundanalyser # pysoundanalyser is free software: you can redistribute it and/or modify # it under the terms of the GNU General...
QDialog.__init__(self, parent) self.prm = parent.prm self.currLocale = self.parent().prm['data']['currentLocale']
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*******************************************************************************<|fim▁hole|> * * kit/kernel/keyboard/ps2/mod.rs * * vim:ft=rust:ts=4:sw=4:et:tw=80 * * Copyright (C) 2015-2021, Devyn Cairns * Redistribution of this file is permitted under the terms o...
<|file_name|>dsskey.py<|end_file_name|><|fim▁begin|># Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software ...
<|file_name|>context-factory.js<|end_file_name|><|fim▁begin|>import config from '../../config/common'; import Context from '../../src/server/context'; import range from 'range'; /** * Create an instance of Context with the given list of blacklisted IPs. * * @param {Array=} blacklistIPs Array of IPs to blacklist in ...
ctx.allu = { template: () => {} };
<|file_name|>HPORepository.java<|end_file_name|><|fim▁begin|>package org.molgenis.data.annotation.core.entity.impl.hpo; import au.com.bytecode.opencsv.CSVParser; import au.com.bytecode.opencsv.CSVReader; import com.google.common.collect.Iterables; import org.molgenis.data.Entity; import org.molgenis.data.MolgenisDataE...
<|file_name|>13.py<|end_file_name|><|fim▁begin|>__author__ = 'student'<|fim▁hole|>import turtle import math turtle.shape('turtle') def duga(r): for i in range (20): turtle.forward(r) turtle.left(9) def krug(r): for i in range(72): turtle.forward(r) turtle.left(5) turtle.penup...
<|file_name|>MediaTable.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import { connect } from 'react-redux' import { searchSubTitle } from '../actions' <|fim▁hole|> while (!r && ra.length && rb.length) { var x = ra.shift(), y = rb.shift(), nx = parseInt(x), ny = parseInt(y); ...
function natcmp(a, b) { var ra = a.match(/\D+|\d+/g); var rb = b.match(/\D+|\d+/g); var r = 0;
<|file_name|>ArrayDataPointerConstant.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016, 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...
}
<|file_name|>pasticciotto_client.cpp<|end_file_name|><|fim▁begin|>#include "../../vm/vm.h" #include <fstream> #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { unsigned char banner[] = { 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x5f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, ...
0x04, 0x04, 0x00, 0x05, 0x04, 0x65, 0x70, 0xcb, 0x53, 0x5c, 0x07, 0xde, 0x07, 0xb1, 0x45, 0xde, 0x04, 0xcb, 0x43, 0x36, 0x04, 0x05, 0x00, 0x05, 0x04, 0x65, 0x70, 0x5c, 0x05, 0xb1, 0x45, 0x39, 0x24, 0xcb, 0x42, 0x20,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import<|fim▁hole|><|fim▁end|>
from .schedule import *
<|file_name|>test_strop.py<|end_file_name|><|fim▁begin|>from test_support import verbose import strop, sys def test(name, input, output, *args): if verbose: print 'string.%s%s =? %s... ' % (name, (input,) + args, output), f = getattr(strop, name) try: value = apply(f, (input,) + args) e...
<|file_name|>test_utfgrid.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import json import logging import unittest from pycaching import Geocaching from pycaching.utfgrid import UTFGrid, GridCoordinateBlock from pycaching.errors import Error from test.test_geocaching import _username, _password ...
<|file_name|>AbstractParametricCurveSurfaceType.java<|end_file_name|><|fim▁begin|>/** */ package net.opengis.gml311; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Abstract Parametric Curve Surface Type</b></em>'. * <!-- end-user-doc --> * * <!-- begin-model-doc --> * * * <...
public interface AbstractParametricCurveSurfaceType extends AbstractSurfacePatchType { } // AbstractParametricCurveSurfaceType
<|file_name|>htmlmediaelement.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 https://mozilla.org/MPL/2.0/. */ use crate::document_loader::{LoadBlocker, LoadType}...
// Step 6.6.1. self.paused.set(true);
<|file_name|>build_lipid.py<|end_file_name|><|fim▁begin|># Author: Samuel Genheden, samuel.genheden@gmail.com """ Program to build lipids from a template, similarly to MARTINI INSANE Is VERY experimental! """ import argparse import os import xml.etree.ElementTree as ET import numpy as np from sgenlib import pdb c...
parser.add_argument('-l','--lipid',help="the lipid to build")
<|file_name|>app.js<|end_file_name|><|fim▁begin|>#!/bin/env node 'use strict'; var winston = require('winston'), path = require('path'), mcapi = require('mailchimp-api'), Parser = require('./lib/parser'), ApiWrapper = require('./lib/api-wrapper'); var date = new Date(); date = date.toJSON().replace(/(-|:...
<|file_name|>RateOfChange.ts<|end_file_name|><|fim▁begin|>import * as indicators from "../"; export class RateOfChange extends indicators.AbstractIndicator<number> { static INDICATOR_NAME: string = "ROC"; static INDICATOR_DESCR: string = "Rate of change : ((price/prevPrice)-1)*100"; static TIMEPERIOD_...
this.periodCounter += 1;
<|file_name|>WebViewConfig.java<|end_file_name|><|fim▁begin|>package com.hzq.sphinxwebview; import android.annotation.SuppressLint; import android.app.Activity; import android.os.Build; import android.webkit.WebSettings; /**<|fim▁hole|>}<|fim▁end|>
* Created by friencis on 2017/4/3 0003. */ public class WebViewConfig {
<|file_name|>parser_any_macro.rs<|end_file_name|><|fim▁begin|>// from src/libsyntax/ext/tt/macro_rules.rs use std::cell::RefCell; use syntax::parse::parser::Parser; use syntax::parse::token; use syntax::ast; use syntax::ptr::P; use syntax::ext::base::MacResult; use syntax::util::small_vector::SmallVector; pub struct ...
}
<|file_name|>wunderground.py<|end_file_name|><|fim▁begin|>from i3pystatus import IntervalModule from i3pystatus.core.util import internet, require from datetime import datetime from urllib.request import urlopen import json import re GEOLOOKUP_URL = 'http://api.wunderground.com/api/%s/geolookup%s/q/%s.json' STATION_Q...
forecast_url = None
<|file_name|>menu.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerab...
return _possibleConstructorReturn(this, (Menu.__proto__ || Object.getPrototypeOf(Menu)).call(this, props)); }
<|file_name|>CreateUserInput.java<|end_file_name|><|fim▁begin|>package com.tqmars.cardrecycle.application.User.dto; /** * Created by jjh on 1/14/17. */ public class CreateUserInput { private String account; private String pwd; private String qq; private String tel; private String businessId; ...
", businessPwd='" + businessPwd + '\'' + ", smsCode='" + smsCode + '\'' +
<|file_name|>menuanchoredposition.js<|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 b...
<|file_name|>ir_attachment.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redis...
# filter ids according to what access rules permit target_ids = targets.keys() allowed_ids = self.pool.get(model).search(cr, uid, [('id', 'in', target_ids)], context=context)