prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>LargeHeaderButton.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import classNames from 'classnames'; import { Button } from 'reakit'; import { Icon, IconName } from 'components'; require('./largeHeaderButton.scss'); type Props = { active?: boolean; className?: string; disabled?: boolean...
{/* @ts-expect-error ts-migrate(2533) FIXME: Object is possibly 'null' or 'undefined'. */}
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from flask_wtf import FlaskForm from saylua.utils.form import sl_validators from saylua.utils.form.fields import SlField, SlTextAreaField class ForumThreadForm(FlaskForm): title = SlField('Thread Title', [ sl_validators.Required(), sl_validators.No...
sl_validators.Required(),
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals import os from django import VERSION as DJANGO_VERSION from django.utils.translation import ugettext_lazy as _ ###################### # MEZZANINE SETTINGS # ###################### # The following settings ...
<|file_name|>utils_for_test.go<|end_file_name|><|fim▁begin|>package datastore import ( "bytes" "errors" "io" ) const ( emptyBlobName = "ZZ8FaUwURAkWvzbnRhTt2pWSJCYZMAELqPk9USTUJgC4" ) var testBlobs = []struct { name string data []byte }{ {"Pq2UxZQcWw2rN8iKPcteaSd4LeXYW2YphibQjmj3kUQC", []byte("Test")}, {"TZ4...
if onRead == nil { onRead = nop } if onEOF == nil {
<|file_name|>collision_object.cpp<|end_file_name|><|fim▁begin|>#include "torch-moveit.h" #include <moveit/planning_scene_interface/planning_scene_interface.h> #include "utils.h" typedef std::shared_ptr<moveit_msgs::CollisionObject> CollisionObjectPtr; MOVIMP(CollisionObjectPtr*, CollisionObject, new)() { CollisionO...
<|file_name|>divsum_analysis.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys print "divsum_analysis.py DivsumFile NumberOfNucleotides" try: file = sys.argv[1] except: file = raw_input("Introduce RepeatMasker's Divsum file: ") try: nucs = sys.argv[2] except: nucs = raw_input("Introduce n...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from io import BytesIO from itertools import groupby import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from flask import make_response, render_template, abort from weba...
matrix_fig = plot_normalized_confusion_matrix(test_labels, test_predictions) return serve_matplotlib_fig(matrix_fig)
<|file_name|>xrootd.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # XRootD # # XRootD package installer. # # Author M Mottram - 15/04/2016 <m.mottram@qmul.ac.uk> : First revision ####################################################################### import localpackage import os import stat import shutil cl...
<|file_name|>ActionsCapability.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************************** * Copyright (c) 2007 Nikolaj Hald Nielsen <nhn@kde.org> * * ...
} Capabilities::ActionsCapability::ActionsCapability( const QList<QAction*> &actions ) : Capabilities::Capability()
<|file_name|>input.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity 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 3 of the...
let ref key_str: Option<String> = keyval[0];
<|file_name|>Login.py<|end_file_name|><|fim▁begin|>from UtmpHead import UtmpHead import Config from Log import Log <|fim▁hole|> return (self._loginid == other._loginid) def __ne__(self, other): return not self.__eq__(other) def __init__(self, loginid): self._loginid = loginid def g...
class Login: def __eq__(self, other): if (other == None): return (self._loginid == 0)
<|file_name|>sample1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals test_data = [ { "Transaction" : { "transaction_date" : "2015-01-08", "amount" : -1286.75, "security_amount" : 4.0726, "se...
"Transaction" : { "transaction_date" : "2014-10-02", "amount" : -10218.04, "security_amount" : 149.8263,
<|file_name|>FormBruterJob.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ This is part of WebScout software<|fim▁hole|>Docs EN: http://hack4sec.pro/wiki/index.php/WebScout_en Docs RU: http://hack4sec.pro/wiki/index.php/WebScout License: MIT Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://a...
<|file_name|>CameraPoller.java<|end_file_name|><|fim▁begin|>/* * IRIS -- Intelligent Roadway Information System * Copyright (C) 2007-2016 Minnesota Department of Transportation * Copyright (C) 2014 AHMCT, University of California * * This program is free software; you can redistribute it and/or modify * it unde...
package us.mn.state.dot.tms.server.comm;
<|file_name|>IUpdateFeeDiscountBMO.java<|end_file_name|><|fim▁begin|>package com.java110.fee.bmo.feeDiscount; import com.alibaba.fastjson.JSONArray; import com.java110.po.feeDiscount.FeeDiscountPo; import org.springframework.http.ResponseEntity; public interface IUpdateFeeDiscountBMO { /** * 修改费用折扣 * ...
<|file_name|>fm_emph.py<|end_file_name|><|fim▁begin|># # Copyright 2005,2007,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, filter import math import cmath class fm_deemph(gr.hier_block2): r""" FM Deemphasis I...
/ \
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
module.exports = require('./lib/SimpleNodeDb');
<|file_name|>Input.py<|end_file_name|><|fim▁begin|># Copyright (C) 2005 Colin McMillen <mcmillen@cs.cmu.edu> # # This file is part of GalaxyMage. # # GalaxyMage 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; ...
x = mouseMotion[0] / 750.0 y = mouseMotion[1] / 750.0 postUserEvent(TRANSLATE_CAMERA,
<|file_name|>page_hinkley.py<|end_file_name|><|fim▁begin|>""" The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com --- *** The Page Hinkley (PH) Method Implementation *** Paper: Page, Ewan S. "Continuous inspection ...
pr = 1 if pr is False else 0 warning_status = False drift_status = False
<|file_name|>users.server.controller.js<|end_file_name|><|fim▁begin|>const _ = require('lodash'); module.exports = _.extend( require('./users/users.authentication.server.controller'), require('./users/users.authorization.server.controller'), require('./users/users.password.server.controller'),<|fim▁hole|><|fim▁e...
require('./users/users.profile.server.controller') );
<|file_name|>add_polynomials.cpp<|end_file_name|><|fim▁begin|>/* Part of Cosmos by OpenGenus Foundation */ /* Contributed by Vaibhav Jain (vaibhav29498) */ /* Refactored by Adeen Shukla (adeen-s) */ #include <iostream> #include <stddef.h> using namespace std; struct term { int coeff; int pow; term* nex...
p1.insert_term(4, 5); p1.insert_term(10, 0); p1.insert_term(9, 2); cout << "First polynomial:";
<|file_name|>common_layers.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
A tensor of the same shape as x. Raises:
<|file_name|>Changes.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2011 Thomas Schreiber # # 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 ...
# vim: set ts=4 sw=4 noet:
<|file_name|>lcon.d.ts<|end_file_name|><|fim▁begin|>declare module "lcon" { export interface SourceLocation { line: number column: number } export interface SyntaxTreeBuilder<A> { initObject(start: SourceLocation): A initArray(start: SourceLocation): A appendKeyToObject(key: string, object:...
<|file_name|>SettingAction.java<|end_file_name|><|fim▁begin|>package kawigi.cmd; import kawigi.properties.*; import kawigi.widget.*; import kawigi.editor.*; import javax.swing.*; import java.awt.event.*; /** * Action implementation for setting actions. * * This class really serves two purposes. The first...
<|file_name|>project_issue_solution.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- <|fim▁hole|> """ Note """ _inherit = 'project.issue.solution' _columns = { 'product_ids': fields.many2many('product.product', 'project_issue_solution_product_rel', 'solution_id','product_id', string='Products'), ...
from openerp.osv import fields, osv, orm class project_isssue_solution(osv.osv):
<|file_name|>rdd.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 Apache Licen...
specified by the optional key function.
<|file_name|>testInstallation.py<|end_file_name|><|fim▁begin|>"""Tests for CMFNotification installation ad uninstallation. $Id: testInstallation.py 65679 2008-05-25 23:45:26Z dbaty $ """ from zope.component import getUtility from zope.component import getMultiAdapter from AccessControl.PermissionRole import rolesForP...
def testPortletCanBeAdded(self):
<|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", "quotoxic.settings") from django.core.management import execute_from_command_line<|fim▁hole|><|fim▁end|>
execute_from_command_line(sys.argv)
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals from django.contrib import admin<|fim▁hole|>from .models import FinishDetail, FinishSubcategory class FinishSubcategoryAdmin(SubcategoryAdmin): def get_form(self, request, obj=None, **kwargs): from...
from core.admin import SubcategoryAdmin, DetailAdmin
<|file_name|>day.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Forms for day forms """ from django.conf import settings from django import forms from django.utils.translation import ugettext as _ from arrow import Arrow from datebook.models import DayEntry from datebook.forms import CrispyFormMixin from...
def __init__(self, datebook, day, *args, **kwargs): self.datebook = datebook self.daydate = datebook.period.replace(day=day)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from streamable_archive_tests import * <|fim▁hole|><|fim▁end|>
from delivery_collection_tests import *
<|file_name|>day_10.rs<|end_file_name|><|fim▁begin|>#![allow(transmute_ptr_to_ref)] <|fim▁hole|>use std::boxed::Box; use std::option::Option; use std::ops::Deref; use std::ops::DerefMut; use std::marker::Copy; use std::clone::Clone; struct Bucket { key: Option<i32>, value: Option<i32>, next: Option<Link> }...
use std::mem;
<|file_name|>iconSentry.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import SvgIcon from './svgIcon'; type Props = React.ComponentProps<typeof SvgIcon>;<|fim▁hole|> props: Props, ref: React.Ref<SVGSVGElement> ) { return ( <SvgIcon {...props} ref={ref}> <path d="M15.8,14.57a1.53,1.53,0,0,...
const IconSentry = React.forwardRef(function IconSentry(
<|file_name|>thesubdb.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import logging import babelfish import requests from . import Provider from .. import __version__ from ..exceptions import InvalidSubtitle, ProviderNotAvailable, ProviderError from ..subtitle import Sub...
detect(r.content, subtitle.language.alpha2)['encoding'], 'replace')
<|file_name|>quantization_mnist_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 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...
# 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
<|file_name|>views.py<|end_file_name|><|fim▁begin|># include for aggregation from django.db.models import Case, IntegerField, Sum, Value, When from django.db.models import CharField # ------------------------------------------ # imports needed for the functional view from rest_framework.response import Response # -----...
<|file_name|>test-form.js<|end_file_name|><|fim▁begin|>/** * Copyright 2016 The AMP HTML 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://w...
selectedOption.value = 'bar'; selectedOption.selected = true;
<|file_name|>proxy.py<|end_file_name|><|fim▁begin|># GUI object/properties browser. # Copyright (C) 2011 Matiychuk D. # # This library 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 Foundation; either version 2.1...
<|file_name|>publish_twist_state.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from flexbe_core import EventState, Logger import rospy from flexbe_core.proxy import ProxyPublisher from geometry_msgs.msg import Twist """Created on June. 21, 2017 @author: Alireza Hosseini """ class PublishTwistState(EventSt...
<|file_name|>LogisticClassifier.py<|end_file_name|><|fim▁begin|>import torch import torch.autograd as autograd import torch.nn as nn import torch.nn.functional as F import torch.optim as optim # Datos de Prueba data = [("me gusta comer en la cafeteria".split(), "SPANISH"), ("Give it to me".split(), "ENGLISH"),...
<|file_name|>xls.py<|end_file_name|><|fim▁begin|># Rekall Memory Forensics # Copyright 2014 Google Inc. All Rights Reserved. # # Authors: # Michael Cohen <scudette@google.com> # # 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 ...
<|file_name|>test_selection.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
exclude_list.seek(0) with mock.patch('builtins.open', return_value=exclude_list):
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "log" "os" "golang.org/x/net/context" "google.golang.org/grpc" // "google.golang.org/grpc/credentials/oauth" "google.golang.org/grpc/metadata" m "github.com/konjoot/grpc/proto/messages" s "github.com/konjoot/grpc/proto/sessions" ) const...
message := m.NewMessageClient(messageConn)
<|file_name|>database.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-console*/ import low from 'lowdb'; import fse from 'fs-extra'; import uuid from 'uuid'; import slug from 'slug'; import constants from './constants'; import { crypt } from '../utils'; const user = { id: uuid(), name: constants.USER_NAME, ...
users: [user], containers: [],
<|file_name|>network.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. *----------...
export const vscodeWorkspaceTrust = 'vscode-workspace-trust';
<|file_name|>SeqDoubleIterator.py<|end_file_name|><|fim▁begin|>import SeqIterator import Constants """ @author: Jacob Porter @summary: An iterator class for iterating through two sequence record files simultaneously. @requires: SeqIterator """ <|fim▁hole|> self.SeqIterator1 = SeqIterator.SeqIterator(file_name1,...
class SeqDoubleIterator: def __init__(self, file_name1, file_name2, file_type=Constants.FASTQ, gzip_switch = False):
<|file_name|>ValidationException.java<|end_file_name|><|fim▁begin|>package io.blitz.curl.exception; /** * Exceptions thrown when a validation error occur during a test execution * @author ghermeto */ public class ValidationException extends BlitzException { /** * Constructs an instance of <code>Validation...
<|file_name|>HostOnlyDaoImpl.java<|end_file_name|><|fim▁begin|>package io.cattle.platform.networking.host.dao.impl; import static io.cattle.platform.core.model.tables.HostTable.*; import static io.cattle.platform.core.model.tables.HostVnetMapTable.*; import static io.cattle.platform.core.model.tables.SubnetVnetMapTabl...
return objectManager.create(HostVnetMap.class, HOST_VNET_MAP.VNET_ID, vnet.getId(), HOST_VNET_MAP.HOST_ID, host.getId());
<|file_name|>parser_init_mapping.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Class representing the mapper for the parser init files.""" from plasoscaffolder.bll.mappings import base_mapping_helper from plasoscaffolder.bll.mappings import base_sqliteplugin_mapping from plasoscaffolder.model import init_d...
class ParserInitMapping( base_sqliteplugin_mapping.BaseSQLitePluginMapper): """Class representing the parser mapper."""
<|file_name|>invitation_test.py<|end_file_name|><|fim▁begin|>from django.core import mail from django.test import TestCase from users.default_roles import DefaultGroups from users.models import Invitation, Membership, OCUser from communities.tests.common import create_sample_community from django.core.urlresolvers impo...
self.assertEqual(response.status_code, 400) self.assertEqual(_("This user already a member of this community."), response.content)
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from lino.api import dd<|fim▁hole|> class Tag(dd.Model): name = dd.CharField(max_length=100) def __str__(self): return self.name @dd.receiver(dd.auto_create) def my_auto_create_handler(sender, **kw): print("My handler was called with {}".format...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup import minify.command setup(name='cloaca', version='0.1.0', url='https://github.com/mhmurray/cloaca', author='Michael Murray', author_email='michaelhamburgmurray@gmail.com', license='MIT', pa...
install_requires=[ 'tornado>=4.3.0', 'tornadis>=0.7.0', 'bcrypt>=2.0.0',
<|file_name|>launch_reduction.py<|end_file_name|><|fim▁begin|>import os import traceback from mantidqt.utils.asynchronous import AsyncTask from addie.processing.mantid.master_table.master_table_exporter import TableFileExporter as MantidTableExporter # Mantid Total Scattering integration # (https://github.com/marshal...
# TODO should emit a signal
<|file_name|>affix.js<|end_file_name|><|fim▁begin|>/** * angular-strap * @version v2.2.1 - 2015-05-15 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes <olivier@mg-crea.com> (https://github.com/mgcrea) * @license MIT License, http://www.opensource.org/licenses/MIT */ 'use strict'; angular...
element.css('top', options.offsetParent ? '' : bodyEl[0].offsetHeight - offsetBottom - elementHeight - initialOffsetTop + 'px');
<|file_name|>share_links.py<|end_file_name|><|fim▁begin|>import logging from constance import config from dateutil.relativedelta import relativedelta from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from ...
""" if not self._can_generate_shared_link(request): error_msg = 'Permission denied.'
<|file_name|>vue.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = { extends: ['./index', './rules/imports', './rules/frontend', './rules/vue'].map(require.resolve).concat(['plugin:vue/recommended']),<|fim▁hole|> ecmaVersion: 2017, ecmaFeatures: { jsx: true, experimentalObjectRestSpread: t...
parser: 'vue-eslint-parser', parserOptions: { parser: 'babel-eslint', sourceType: 'module',
<|file_name|>base_ovh_konnector.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.10.0 var Bill, baseKonnector, filterExisting, linkBankOperation, ovhFetcher, saveDataAndFile; ovhFetcher = require('../lib/ovh_fetcher'); filterExisting = require('../lib/filter_existing'); saveDataAndFile = require('../li...
models: [Bill], fetchOperations: [ fetchBills, filterExisting(logger, Bill), saveDataAndFile(logger, Bill, fileOptions, ['bill']), linkBankOperation({
<|file_name|>TSink.java<|end_file_name|><|fim▁begin|>/* ----------------------------------------------------------------------------- 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 3 o...
GNU General Public License for more details.
<|file_name|>test_distreporter.py<|end_file_name|><|fim▁begin|># Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.trial.distreporter}. """ from cStringIO import StringIO from twisted.trial._dist.distreporter import DistReporter from twisted.trial.unittest import TestCase ...
""" self.distReporter.startTest(self.test) self.assertEqual(self.stream.getvalue(), "")
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>from django.db.models import CharField <|fim▁hole|> class HrefField(CharField): def __init__( self, protocols=DEFALT_PROTOCOLS, allow_paths=True, allow_fragments=True, allow_query_strings=True, ...
DEFALT_PROTOCOLS = ('http', 'https', 'mailto', 'tel')
<|file_name|>ArrayItem.tsx<|end_file_name|><|fim▁begin|>/* eslint-disable import/no-unresolved,no-nested-ternary */ import {ChangeIndicatorScope, ContextProvidedChangeIndicator} from '@sanity/base/change-indicators' import { ArraySchemaType, isReferenceSchemaType, isValidationMarker, Marker, Path, } from '@s...
)
<|file_name|>std-pub.rs<|end_file_name|><|fim▁begin|>// The 'std' crates should always be implicitly public, // without having to pass any compiler arguments // run-pass<|fim▁hole|> pub struct PublicType { pub field: Option<u8> } fn main() {}<|fim▁end|>
#![deny(exported_private_dependencies)]
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Daniel Grunwald // // 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 without limitation ...
pyobject_newtype!($name, $checkfunction); impl ::python::PythonObjectWithTypeObject for $name { #[inline]
<|file_name|>mod.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/LI...
pub enum vtable_origin { /* Statically known vtable. def_id gives the class or impl item
<|file_name|>_container_registry.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.7.4, generator: @autorest/python@5.12.4) # Changes may cause incorrect behavior and will be ...
request_copy = deepcopy(request) path_format_arguments = { "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True),
<|file_name|>evaluate_callables_tests.py<|end_file_name|><|fim▁begin|>from build import evaluate_callables <|fim▁hole|> self.result = evaluate_callables({"abc": 123, "def": 456, "xyz": 789}) def it_should_return_the_same_dict(self): assert self.result == {"abc": 123, "def": 456, "xyz": 789} class...
class WhenEvaluatingADictWithNoCallables: def when_i_evaluate_the_dict(self):
<|file_name|>algorithms.ts<|end_file_name|><|fim▁begin|>import 'rxjs/add/operator/map'; import {Injectable} from '@angular/core'; import {Http, RequestMethod} from '@angular/http'; import {Observable} from 'rxjs/Observable'; import {Cube} from '../models/cube'; import 'rxjs/add/operator/mergeMap'; import {Algorithm} fr...
case 'rule_mining': return this.getRuleMiningAlgorithm();
<|file_name|>test_coilheatingdxvariablespeed.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging<|fim▁hole|> log = logging.getLogger(__name__) class TestCoilHeatingDxVariableSpeed(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp() def tea...
from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.coils import CoilHeatingDxVariableSpeed
<|file_name|>_user.model.ts<|end_file_name|><|fim▁begin|><%# Copyright 2013-2018 the original author or authors from the JHipster project. This file is part of the JHipster project, see http://www.jhipster.tech/ for more information. Licensed under the Apache License, Version 2.0 (the "License"); you may not use...
<|file_name|>RTree.java<|end_file_name|><|fim▁begin|>package com.github.davidmoten.rtree; import static com.github.davidmoten.rtree.geometry.Geometries.rectangle; import static java.util.Optional.of; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; import j...
<|file_name|>addon.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # coding=utf-8 import sys base_url = sys.argv[0] addon_handle = int(sys.argv[1]) import xbmcplugin xbmcplugin.setContent(addon_handle, 'episodes') import urlparse args = urlparse.parse_qs(sys.argv[2][1:]) mode = args.get('mode', None) from urllib ...
return [vidsfromseason(url) for url in re.findall(
<|file_name|>select-kernel.tsx<|end_file_name|><|fim▁begin|>/* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ // help users selecting a kernel import { React, Component, Rendered } from "../app-framework"; import { Map as I...
} render_dont_ask_again() { return (
<|file_name|>cube.py<|end_file_name|><|fim▁begin|>class cube(): CUBE_STATUS = "Off" PATTERN = "Hello" def __init__(self): pass @staticmethod def status(): """ Return dictionary of details about the cube :return: Dictionary """ return {<|fim▁hole|> ...
'pattern': cube.PATTERN,
<|file_name|>PALPIDEFSProducer.hh<|end_file_name|><|fim▁begin|>// // Producer for the ALICE pALPIDEfs chip // Author: Jan.Fiete.Grosse-Oetringhaus@cern.ch // #include "eudaq/Producer.hh" #include "eudaq/Configuration.hh" #include <mutex> #include <thread> #include <queue> #include <tinyxml.h> // pALPIDEfs driver #i...
bool QueueFull(); bool ThresholdScan();
<|file_name|>lineMaps.component.ts<|end_file_name|><|fim▁begin|>import {Component, ViewEncapsulation} from '@angular/core'; import {BaCard, BaAmChart} from '../../../../theme/components'; import {LineMapsService} from './lineMaps.service'; @Component({ selector: 'line-maps', pipes: [], providers: [LineMapsServi...
directives: [BaCard, BaAmChart],
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>export const APP_LAYOUT_INIT = 'APP_LAYOUT_INIT';<|fim▁hole|><|fim▁end|>
export const APP_LAYOUT_CHANGE = 'APP_LAYOUT_CHANGE';
<|file_name|>user.go<|end_file_name|><|fim▁begin|>package model <|fim▁hole|>import "time" type User struct { Id int64 `json:"-"` Email string `json:"email,omitempty"` PasswordHash string `json:"-"` Active bool `json:"active,omitempty"` UpdateToken ...
<|file_name|>run_script.js<|end_file_name|><|fim▁begin|>module.exports = { //--------------------------------------------------------------------- // Action Name // // This is the name of the action displayed in the editor. //--------------------------------------------------------------------- name: "Run Script", /...
}, //---------------------------------------------------------------------
<|file_name|>DiscordChannelPartEvent.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016-2022 phantombot.github.io/PhantomBot * * 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 ...
* (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>unit_test_inverse_dynamics_balance_controller.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Aug 31 16:04:18 2017 @author: adelpret """ import pinocchio as se3 import numpy as np from pinocchio import RobotWrapper from conversion_utils import config_sot_to_urdf, joints_sot_to_...
<|file_name|>test_controllers.py<|end_file_name|><|fim▁begin|>import json import re import tg<|fim▁hole|>pylons.c = pylons.tmpl_context pylons.g = pylons.app_globals from pylons import c from ming.orm import ThreadLocalORMSession from datadiff.tools import assert_equal from allura import model as M from allura.lib im...
import pkg_resources import pylons
<|file_name|>test_path.py<|end_file_name|><|fim▁begin|>import unittest import tqdm from ieml.dictionary.script import Script from ieml.ieml_database import IEMLDatabase, GitInterface from ieml.usl import PolyMorpheme, Lexeme, Word from ieml.usl.decoration.parser.parser import PathParser from ieml.usl.decoration.path ...
(">content>constant", "U:"),
<|file_name|>generic-arithmetic-2.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> #![feature(repr_simd, platform_intrinsics)] #![allow(non_camel_case_types)] #[repr(simd)] #[derive(Copy, Clone)] pub struct i32x4(pub i32, pub i32, pub i32, pub i32); #[repr(simd)] #[derive(Copy, Clone)] pub struct u32x4(pub u32, pub u32, p...
// build-fail
<|file_name|>ViewConfig.js<|end_file_name|><|fim▁begin|>/** * Client. * @module client */ <|fim▁hole|> */ function ViewConfig(resources) { this.playAnimations = true; this.resources = resources; } /** * Should we play animations? * @method setPlayAnimations */ ViewConfig.prototype.setPlayAnimations = function(...
/** * View configuration. * @class ViewConfig
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0004_make_focal_point_key_not_nullable'), ('wagtailcore', ...
}, bases=('wagtailcore.page',),
<|file_name|>airFilterWhenSmoggy.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2014 brian@bevey.org * * 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...
break; case 'nest' :
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # TrinityX documentation build configuration file, created by # sphinx-quickstart on Tue Oct 25 14:04:29 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all pos...
<|file_name|>main_test.go<|end_file_name|><|fim▁begin|>// Copyright 2021 PingCAP, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0...
<|file_name|>test_denormalize.py<|end_file_name|><|fim▁begin|>import unittest from programy.processors.post.denormalize import DenormalizePostProcessor from programy.bot import Bot from programy.brain import Brain from programy.config.brain import BrainConfiguration from programy.config.bot import BotConfiguration cl...
self.assertIsNotNone(result)
<|file_name|>AreaFragmentRight.java<|end_file_name|><|fim▁begin|>package com.example.mathsolver; import android.annotation.TargetApi; import android.app.Fragment; import android.os.Build; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @TargetApi(...
return inflater.inflate(R.layout.area_right, container, false);
<|file_name|>model_control_one_enabled_BoxCox_LinearTrend_BestCycle_MLP.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['LinearTrend'] , ['BestCycle'] , ['MLP'] );<|fim▁end|>
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from planarprocess import * from gds_helpers import * from itertools import cycle xmin, xmax = -5, 5 layers = gds_cross_section('mypmos.gds', [(0,xmin), (0, xmax)], 'gdsmap.map') ['P-Active-Well', 'Active-Cut', 'N-Well', 'Metal-2', 'Metal-1', 'P-Select', 'N-Select', '...
metal2 = wafer.grow(1., m2, outdiffusion=.1, label='Metal-2') # Presentation custom_style = {s: {} for s in wafer.solids}
<|file_name|>emoji.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import React = require('react'); import { EmojiData, EmojiSkin } from '..'; export type BackgroundImageFn = (set: EmojiSet, sheetSize: EmojiSheetSize) => string; export type EmojiSet = 'apple'|'google'|'twitter'|'emojione'|'messenger'|'facebook'; export...
<|file_name|>runcmd.go<|end_file_name|><|fim▁begin|>// Copyright 2011-2015 visualfc <visualfc@gmail.com>. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package runcmd <|fim▁hole|> "strings" "github.com/visualfc/gotools/pkg/command" ) var...
import ( "fmt" "os" "os/exec"
<|file_name|>showsByFollowedArtists.test.ts<|end_file_name|><|fim▁begin|>/* eslint-disable promise/always-return */ import { runAuthenticatedQuery } from "schema/v2/test/utils" import gql from "lib/gql" describe("Me", () => { describe("ShowsByFollowedArtists", () => { it("returns shows by followed artists", asyn...
<|file_name|>fr.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2009-2016 by the geOrchestra PSC * * This file is part of geOrchestra. * * geOrchestra 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, ...
"Cliquez sur la carte.</div>",
<|file_name|>sig-mention-handler.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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...
<|file_name|>ErpInventory.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2011 Richard Lincoln # # 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 without li...
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn find() -> usize { let limit = 4_000_000usize; let mut fibonachi: Vec<usize> = Vec::new(); fibonachi.push(1); fibonachi.push(2); let mut i = 2usize; loop { let k = fibonachi[i - 2] + fibonachi[i - 1]; println!("{} - {}", i, k); ...
fn main() { let sum = find(); println!("sum of even = {}", sum); }