prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>cast.py<|end_file_name|><|fim▁begin|>""" homeassistant.components.media_player.chromecast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides functionality to interact with Cast devices on the network. WARNING: This platform is currently not working due to a changed Cast API """ import logging fro...
@property def media_season(self):
<|file_name|>event.go<|end_file_name|><|fim▁begin|>/* Copyright 2021 The Knative 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...
// Get extracts the typed informer from the context.
<|file_name|>script.js<|end_file_name|><|fim▁begin|>'use strict'; $(function() { $.material.init(); $('#libraries').btsListFilter('#searcher', { itemChild: 'h3', resetOnBlur: false });<|fim▁hole|><|fim▁end|>
$('#searcher').focus(); });
<|file_name|>sanity_resources.go<|end_file_name|><|fim▁begin|>package hookexecutor /** * The file is used to define the resources that will be created during a sanity * test. All the reosurces are in yaml format, but stored in the file as separate * strings. In this way, we can package these resources at compile-ti...
* them at any time without touching local files in the container. */
<|file_name|>3d0bf4ee67d1_geonature_samples.py<|end_file_name|><|fim▁begin|>"""geonature samples Revision ID: 3d0bf4ee67d1 Create Date: 2021-09-27 18:00:45.818766 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3d0bf4ee67d1'<|fim▁hole|>) def upgrade(): o...
down_revision = None branch_labels = ('geonature-samples',) depends_on = ( 'geonature',
<|file_name|>test_prefetch_related_objects.py<|end_file_name|><|fim▁begin|>from django.db.models import Prefetch, prefetch_related_objects from django.test import TestCase from .models import Author, Book, Reader class PrefetchRelatedObjectsTests(TestCase): """ Since prefetch_related_objects() is jus...
def test_prefetch_object(self):
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>extern crate build; fn main() { build::link("dnsperf", true) }<|fim▁end|>
// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md>
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals <|fim▁hole|> class Post(SmartModel): title = models.CharField(max_length=128, help_text="The title of this blog post, keep it relevant") body = models.TextField(help_text="The body of the po...
from django.db import models from smartmin.models import SmartModel, ActiveManager
<|file_name|>nonlinear_elliptic_problem.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from rbnics.problems.base import NonlinearProblem from rbnics.problems.elliptic import EllipticProblem from rbnics.back...
# Default initialization of members def __init__(self, V, **kwargs):
<|file_name|>UserRole.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2013 Alfresco Software Limited. * This file is part of Alfresco * Alfresco 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 F...
private String roleName; private UserRole(String role)
<|file_name|>regression_slope_validator.ts<|end_file_name|><|fim▁begin|>import {ListWrapper} from '@angular/facade'; import {OpaqueToken} from '@angular/core/src/di'; import {Validator} from '../validator'; import {Statistic} from '../statistic'; import {MeasureValues} from '../measure_values'; /** * A validator tha...
<|file_name|>use-get-thumbnail.js<|end_file_name|><|fim▁begin|>// @flow import React from 'react'; import { generateStreamUrl } from 'util/web'; export default function useGetThumbnail( uri: string, claim: ?Claim, streamingUrl: ?string, getFile: string => void, shouldHide: boolean ) { let thumbnailToUse; ...
// if (hasClaim && isImage && isFree) { // if (streamingUrl) { // setThumbnail(streamingUrl);
<|file_name|>ChunkCache.java<|end_file_name|><|fim▁begin|>/* * This file is part of Jiffy, licensed under the MIT License (MIT). * * Copyright (c) OreCruncher * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to...
if (k1 > l) { l = k1; }
<|file_name|>KafkaRequester.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 thi...
logger.debug("cannot find PartitionMetadata, topic:" + topic + " partitionId:" + partitionId); return null; }
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for ahaha 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`` commands discove...
<|file_name|>get.js<|end_file_name|><|fim▁begin|>var editMode = portal.request.mode == 'edit'; var content = portal.content; var component = portal.component; var layoutRegions = portal.layoutRegions; var body = system.thymeleaf.render('view/layout-70-30.html', { title: content.displayName, path: content.path...
rightRegion: layoutRegions.getRegion("right") });
<|file_name|>log.js<|end_file_name|><|fim▁begin|>/** * Logger configuration * * Configure the log level for your app, as well as the transport * (Underneath the covers, Sails uses Winston for logging, which * allows for some pretty neat custom transports/adapters for log messages) * * For more information on the...
// log: {
<|file_name|>control_area.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as publish...
# >>> control_area.attributes # <<< control_area.references
<|file_name|>connection.rs<|end_file_name|><|fim▁begin|>use std::io::{BufRead, BufReader, Write}; use std::net::{self, TcpStream}; use std::path::PathBuf; use std::str::from_utf8; use std::time::Duration; use url; use cmd::{cmd, pipe, Pipeline}; use parser::Parser; use types::{ from_redis_value, ErrorKind, FromRe...
<|file_name|>ledger.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Google Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/lice...
// magic incantation to get the first 16 bytes of the hash let mut arr: [u8; 16] = Default::default(); arr.as_mut().clone_from_slice(&full_slice[0..16]);
<|file_name|>CommandObjectStats.cpp<|end_file_name|><|fim▁begin|>//===-- CommandObjectStats.cpp ----------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: A...
#include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Target/Target.h"
<|file_name|>NettyContext.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 you u...
<|file_name|>transform.py<|end_file_name|><|fim▁begin|># This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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 L...
dst_srs=self.dst_srs,
<|file_name|>Dias_Da_Semana.java<|end_file_name|><|fim▁begin|>package br.com.fuelclub.entity; import java.util.List; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToMany; import javax.persist...
@Entity @Table (name = "Dias_da_Semana") public class Dias_Da_Semana {
<|file_name|>muffincms.js<|end_file_name|><|fim▁begin|>$(document).ready(function(){ var toggleMuffEditor = function(stat=false){ $("#muff-opt").remove(); // bind event if(stat){ $(".muff").mouseover(function() { $("#muff-opt").remove(); muffShowOptions($(this)); $(window).scroll(function()...
<|file_name|>suspend_and_re_activate.py<|end_file_name|><|fim▁begin|>from paypalrestsdk import BillingAgreement import logging BILLING_AGREEMENT_ID = "I-HT38K76XPMGJ" try: billing_agreement = BillingAgreement.find(BILLING_AGREEMENT_ID) print("Billing Agreement [%s] has state %s" % (billing_agreement.id, billi...
if billing_agreement.reactivate(reactivate_note): # Would expect state has changed to Active
<|file_name|>ChatLikeCMD.py<|end_file_name|><|fim▁begin|>#coding=utf8 import thread, time, sys, os, platform try: import termios, tty termios.tcgetattr, termios.tcsetattr import threading OS = 'Linux' except (ImportError, AttributeError): try: import msvcrt OS = 'Windows'...
print self.inPip.pop() # linux special
<|file_name|>PlatformServerlessTest.ts<|end_file_name|><|fim▁begin|>import {DITest} from "@tsed/di"; import {APIGatewayEventDefaultAuthorizerContext, APIGatewayProxyEventBase, APIGatewayProxyHandler} from "aws-lambda"; import {APIGatewayProxyResult} from "aws-lambda/trigger/api-gateway-proxy"; import {createFakeEvent} ...
<|file_name|>json.java<|end_file_name|><|fim▁begin|>package com.xhuihui.app.json;<|fim▁hole|> */ public class json { }<|fim▁end|>
/** * Created by lihuiguang on 2017/7/13.
<|file_name|>Shader.color.js<|end_file_name|><|fim▁begin|>PP.lib.shader.shaders.color = { info: { name: 'color adjustement', author: 'Evan Wallace', link: 'https://github.com/evanw/glfx.js' }, ...
time: { type: "f", value: 0.0}, speed: { type: "f", value: 0.01 },
<|file_name|>ganeti.tools.node_daemon_setup_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright (C) 2012 Google 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: # # 1. ...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rand; use std::io; use rand::Rng; use std::cmp::Ordering; fn main() { println!("Guess the number!"); let secret_number = rand::thread_rng().gen_range(1, 101); print!("secret_number is {}\n", secret_number); <|fim▁hole|> // 为什么必须在loop里...
loop {
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyLocalcider(PythonPackage): """Tools...
homepage = "http://pappulab.github.io/localCIDER"
<|file_name|>GetRepositoryInfo.java<|end_file_name|><|fim▁begin|>package org.alfresco.repo.cmis.ws; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.Xm...
/** * Gets the value of the repositoryId property.
<|file_name|>blob.spec.ts<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; <|fim▁hole|> describe('entitype-integration-tests > query > websql > blob', async () => { beforeEach(async function () { this.timeout(10000); await seedNorthwindDatabase(); }); it('should return Uint8Array for ...
import { NorthwindContext } from 'common/northwind-sqlite'; import { seedNorthwindDatabase } from './helper';
<|file_name|>bezier_traj.py<|end_file_name|><|fim▁begin|>from gen_data_from_rbprm import * from hpp.corbaserver.rbprm.tools.com_constraints import get_com_constraint from hpp.gepetto import PathPlayer from hpp.corbaserver.rbprm.state_alg import computeIntermediateState, isContactCreated from numpy import matrix, asa...
global configs
<|file_name|>gravmag_magdir_dipolemagdir.py<|end_file_name|><|fim▁begin|>""" GravMag: Use the DipoleMagDir class to estimate the magnetization direction of dipoles with known centers """ import numpy from fatiando import mesher, gridder from fatiando.utils import ang2vec, vec2ang, contaminate from fatiando.gravmag imp...
mpl.figure(figsize=(14, 5)) mpl.subplot(1, 2, 1) mpl.title("Total Field Anomaly (nT)", fontsize=14)
<|file_name|>SendService.ts<|end_file_name|><|fim▁begin|>import _ from 'lodash'; import {gettext} from 'core/utils'; import {showModal} from 'core/services/modalService'; import {IArticle} from 'superdesk-api'; import {appConfig} from 'appConfig'; import {AuthoringWorkspaceService} from 'apps/authoring/authoring/servic...
* * @return {Promise} */ function startConfig() {
<|file_name|>user-list-controller.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> console.log('UserListController'); vm.userList = userList; } module.exports = UserListController;<|fim▁end|>
function UserListController(userList) { var vm = this;
<|file_name|>postproc_db.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os, sys, logging, urllib, time, string, json, argparse, collections, datetime, re, bz2, math from concurrent.futures import ThreadPoolExecutor, wait import lz4 pool = ThreadPoolExecutor(max_workers=16) logging.basicConfig(level=lo...
# docs_by_rank = sorted(POI.objects(at__geo_within_center=(doc.at['coordinates'], spacing)), # key=lambda point: point.rank or 0, # reverse=True) # for doc in POI.objects(at__geo_within_center=(doc.at['coordinates'], 1), min_zoom__gt=0).order_by('-rank...
<|file_name|>tree.py<|end_file_name|><|fim▁begin|>import pygame, math pygame.init() window = pygame.display.set_mode((600, 600)) pygame.display.set_caption("Fractal Tree") screen = pygame.display.get_surface() def drawTree(x1, y1, angle, depth): if depth: x2 = x1 + int(math.cos(math.radians(angle)) * de...
drawTree(x2, y2, angle + 20, depth - 1)
<|file_name|>scalajsenv.js<|end_file_name|><|fim▁begin|>/* Scala.js runtime support * Copyright 2013 LAMP/EPFL * Author: Sébastien Doeraene */ /* ---------------------------------- * * The top-level Scala.js environment * * ---------------------------------- */ //!if outputMode == ECMAScript51Global var ScalaJS ...
//!if outputMode != ECMAScript6 ScalaJS.TypeData.prototype["getSuperclass"] = function() { //!else
<|file_name|>test_args.py<|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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
({'auto_approve': True}, ['-auto-approve']), ({'auto_approve': False}, []), ({'backend': True}, []), ({'backend': None}, []),
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#coding: utf-8 #!/usr/bin/env python3 #Initial test code for MiSynth Wave Generator #Opens Wave Files And Cuts And Plays Them As The FPGA will #Synth plays back 2048 samples at frequency of note #Effective sample rate is 901,120Hz @ 440Hz #CURRENTLY A DRAWING LOOP TO B...
<|file_name|>testSegment.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- ########################################################################### # This is part of the module phystricks # # phystricks is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
def testSegment(): test_constructors()
<|file_name|>mips_unknown_linux_uclibc.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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....
target_os: "linux".to_string(), target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc,
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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/li...
<|file_name|>GetHealthCheckLastFailureReasonResultStaxUnmarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the Licens...
<|file_name|>0049_preprintprovider_preprint_word.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-08-09 17:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0048...
),
<|file_name|>perl.js<|end_file_name|><|fim▁begin|>// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) // This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) (function(mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS m...
seek :1, // - reposition file pointer for random-access I/O
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2016 Edouard Lambert # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by #...
<|file_name|>RgbImage.cpp<|end_file_name|><|fim▁begin|>/* * * RayTrace Software Package, release 1.0.3, July 2003. * * Author: Samuel R. Buss * * Software accompanying the book * 3D Computer Graphics: A Mathematical Introduction with OpenGL, * by S. Buss, Cambridge University Press, 2003. * * Software is "...
<|file_name|>TransitionEdge.java<|end_file_name|><|fim▁begin|>/** * The MIT License * Copyright (c) 2003 David G Jones * * 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 restrict...
// Constructors protected TransitionEdge() { super();
<|file_name|>Listener.java<|end_file_name|><|fim▁begin|>/** * Copyright 2015 Santhosh Kumar Tekuri * * The JLibs authors license this file to you 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: * ...
<|file_name|>MemTable.cpp<|end_file_name|><|fim▁begin|>#include "MemTable.h" using namespace std; json MemTable::Table; template <class type> LinkedList<type> ListAdapter<type>::SmartList; int MemTable::getSize(long ID) { int size = 0; std::string number; std::stringstream strstream; strstream <...
return size; }
<|file_name|>SipReplaces.py<|end_file_name|><|fim▁begin|># Copyright (c) 2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it...
<|file_name|>compose.go<|end_file_name|><|fim▁begin|>// Package compose aims to provide simple "helper" methods to ease the use of // compose (through libcompose) in (integration) tests. package compose import ( "fmt" "regexp" "strings" "golang.org/x/net/context" "github.com/docker/docker/api/types" "github.co...
<|file_name|>tuple.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/...
//! let x = ("colorless", "green", "ideas", "sleep", "furiously"); //! assert_eq!(x.3, "sleep");
<|file_name|>test_hostgroup.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- """Test class for :class:`robottelo.cli.hostgroup.HostGroup` CLI. @Requirement: Hostgroup @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: CLI @TestType: Functional @CaseImportance: High @Upstream: No """ from...
from robottelo.cli.proxy import Proxy from robottelo.cli.factory import ( make_architecture,
<|file_name|>system.src.js<|end_file_name|><|fim▁begin|>/* * SystemJS v0.18.5 */ (function() { function bootstrap() {(function(__global) { var isWorker = typeof window == 'undefined' && typeof self != 'undefined' && typeof importScripts != 'undefined'; var isBrowser = typeof window != 'undefined' && typeof docum...
catch(e) {
<|file_name|>BracketedKeywordInContextDelegate.hh<|end_file_name|><|fim▁begin|>#ifndef BRACKETEDKEYWORDINCONTEXTDELEGATE_HH #define BRACKETEDKEYWORDINCONTEXTDELEGATE_HH #include <vector> #include <AlpinoCorpus/LexItem.hh><|fim▁hole|>{ Q_OBJECT public: BracketedKeywordInContextDelegate(CorpusReaderPtr); v...
#include "BracketedDelegate.hh" class BracketedKeywordInContextDelegate : public BracketedDelegate
<|file_name|>consumer_test.go<|end_file_name|><|fim▁begin|>package sarama import ( "log" "os" "os/signal" "sync" "testing" "time" ) func TestConsumerOffsetManual(t *testing.T) { seedBroker := newMockBroker(t, 1) leader := newMockBroker(t, 2) metadataResponse := new(MetadataResponse) metadataResponse.AddBro...
config := NewConfig()
<|file_name|>_tornado.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import Cookie import base64 import calendar import datetime import email.utils import functools import gzip import hashlib import hmac import httplib import logging import mimetypes import os.path import re import stat ...
name = escape.native_str(name) value = escape.native_str(value)
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'), plugins = require('gulp-load-plugins')(), Karma = require('karma').Server; var paths = { scripts: { src: ['src/**/*.js'], dest: 'dist', file: 'mention.js' }, styles: { src: ['src/**/*.scss'], dest: 'dist...
gulp.task('watch:example', function(){ gulp.watch(paths.example.scripts.src, 'scripts:example');
<|file_name|>validator.utils.js<|end_file_name|><|fim▁begin|>function isString(value) { if (typeof value !== 'string' || value === '' || value === null) { return false; } return true; } function isNumber(value) { if (typeof Number.parseInt(value, 10) !== 'number' || Number.isNaN(value) ...
const atIndex = value.indexOf('@'); if (atIndex < 1) { return false; }
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.conf import settings from common.views import AbsSegmentSelection #from common.views import AbsTargetSelection from common.views import AbsTargetSelectionTable # from common.alignment_SITE_NAME import Alignment from prot...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright 2020 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/license...
}
<|file_name|>multi_request.rs<|end_file_name|><|fim▁begin|>use rand::seq::SliceRandom; use rand::thread_rng; use yaml_rust::Yaml; use crate::interpolator::INTERPOLATION_REGEX; use crate::actions::Request; use crate::benchmark::Benchmark; pub fn is_that_you(item: &Yaml) -> bool { item["request"].as_hash().is_some()...
}
<|file_name|>uiLocalization.js<|end_file_name|><|fim▁begin|>/************************************************************************************** * Copyright (c) 2013-2015, Finnish Social Science Data Archive/University of Tampere * * ...
"default": "Datan konfiguraatio" }, "&upload": {
<|file_name|>reclamos.component.spec.ts<|end_file_name|><|fim▁begin|>import {expect} from 'chai'; import {Controller} from '../../src/component/reclamos.component.ts'; <|fim▁hole|> it("getTitle must return hello plus prestacionName", () => { let controller = new Controller(); controller.solicitudes...
describe("Controller Test", () => {
<|file_name|>GPUCommon.cpp<|end_file_name|><|fim▁begin|>#include <algorithm> #include "native/base/mutex.h" #include "native/base/timeutil.h" #include "GeDisasm.h" #include "GPUCommon.h" #include "GPUState.h" #include "ChunkFile.h" #include "Core/Config.h" #include "Core/CoreTiming.h" #include "Core/MemMap.h" #include ...
void GPUCommon::CheckDrawSync() { easy_guard guard(listLock);
<|file_name|>test_anonymous_epic.py<|end_file_name|><|fim▁begin|><|fim▁hole|>Anonymous Epic Storyboard is defined within the comments of the program itself """ import unittest from flask import url_for from biblib.views.http_errors import NO_PERMISSION_ERROR from biblib.tests.stubdata.stub_data import UserShop, Libra...
""" Functional test
<|file_name|>RobotTemplate.java<|end_file_name|><|fim▁begin|>/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2008. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accom...
} public void updateDrivetrain(){ }
<|file_name|>operation_progress.go<|end_file_name|><|fim▁begin|>// Copyright 2018 Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main<|fim▁hole|>import ( "context" "log" "golang.org/x/oauth2/google" compute "google.g...
<|file_name|>autoload.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule <|fim▁hole|>for app in settings.INSTALLED_APPS: if '.' not in app: continue mod = import_module(app) t...
<|file_name|>mod.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/licenses/LI...
use std::io::signal::Signum; use libc::c_int;
<|file_name|>docscrape_sphinx.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, print_function import sys, re, inspect, textwrap, pydoc import sphinx import collections<|fim▁hole|>from .docscrape import NumpyDocString, FunctionDoc, ClassDoc if sys.version_info[0] >= 3: sixu = lambd...
<|file_name|>TitelConverter.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 org.kore.runtime.jsf.converter; import javax.faces.component.UIC...
if (string == null || string.trim().length() == 0) { return null; } return new Titel(string.trim());
<|file_name|>monitor.js<|end_file_name|><|fim▁begin|>// Run if you want to monitor unresolved promises (in properly working // application there should be no promises that are never resolved) 'use strict'; var max = Math.max , callable = require('es5-ext/lib/Object/valid-callable') , isCallable = require...
// Cancel monitor delete deferred._monitor;
<|file_name|>File_posix.cpp<|end_file_name|><|fim▁begin|>#include "libplatform/impl.h" namespace mp4v2 { namespace platform { namespace io { /////////////////////////////////////////////////////////////////////////////// class StandardFileProvider : public FileProvider { public: StandardFileProvider(); bool...
, _seekp ( false )
<|file_name|>prefix.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 Michael Yang. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file.<|fim▁hole|> (Complex<f32>, $f: ident) => (cblas_c::$f); (Complex<f64>, $f: ident) => (cblas_z::$f); ...
macro_rules! prefix( (f32, $f: ident) => (cblas_s::$f); (f64, $f: ident) => (cblas_d::$f);
<|file_name|>builder.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # LICENCE MIT # # DESCRIPTION Callgraph builder. # # AUTHOR Michal Bukovsky <michal.bukovsky@trilogic.cz> # from operator import attrgetter from inspect import signature from callgraph.hooks import Hooks from callgraph.utils...
kwargs = {"self": CallGraphBuilder, "function": CallGraphBuilder.build} root = builder.build(CallGraphBuilder.build, kwargs)
<|file_name|>seed.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Noise-rs Developers. // // 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/LICEN...
/// # } /// ``` /// /// ```rust
<|file_name|>script_tests.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2015 The C-Bit Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "data/script_invalid.json.h" #include "data/script_valid.js...
ScriptError err;
<|file_name|>GSheet2Python.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|> """ Takes Google's json encoded spreadsheet and prints a python dictionary keyed by the values in the first column of the SS. ©2017 J. J. Crump, GNU general public license """ import urllib2 from pprint import pprint import re imp...
# -*- coding: utf-8 -*-
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # ObservationTools documentation build configuration file, created by # sphinx-quickstart on Sun Apr 30 14:32:48 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not...
<|file_name|>vimenv.py<|end_file_name|><|fim▁begin|>""" vimenv.py Vim-specific environment helpers. This module uses git and pathogen to manage vim plugins. """ from collections import namedtuple from os import path, makedirs, walk, chdir, getcwd from urllib import urlretrieve from subprocess import check_call VimP...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.md')) as f: CHANGES = f.read() requires = [ '...
zip_safe=False,
<|file_name|>htmltitleelement.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 crate::dom::bindings::codegen::Bindings::HTMLTit...
impl VirtualMethods for HTMLTitleElement { fn super_type(&self) -> Option<&dyn VirtualMethods> {
<|file_name|>test_deletechannel.py<|end_file_name|><|fim▁begin|>from django.core.management import call_command from django.test import TestCase from mock import call from mock import patch from kolibri.core.content import models as content class DeleteChannelTestCase(TestCase): """ Testcase for delete chann...
self.assertEquals(0, content.ChannelMetadata.objects.count()) def test_channelmetadata_delete_remove_contentnodes(self): self.delete_channel()
<|file_name|>associated-types-bound-failure.rs<|end_file_name|><|fim▁begin|>// run-rustfix // Test equality constraints on associated types in a where clause. #![allow(dead_code)] pub trait ToInt { fn to_int(&self) -> isize; } pub trait GetToInt { type R;<|fim▁hole|> fn get(&self) -> <Self as GetToInt>::R...
<|file_name|>test_raid.py<|end_file_name|><|fim▁begin|><|fim▁hole|># pdev cbd # pdev asd cbd # pdev asd sd cbd from hba_util import HBA from raid_util import Raid_Util from subdev import * def test_create_remove_raid(raid_util, bdevs): sub_dev_list = [] for bdev in bdevs: path = '/dev/' + bdev ...
#!/usr/bin/python # pdev
<|file_name|>azure.go<|end_file_name|><|fim▁begin|>package boshinit import ( "fmt" "github.com/enaml-ops/enaml" "github.com/enaml-ops/enaml/cloudproperties/azure" "github.com/enaml-ops/omg-cli/plugins/products/bosh-init/enaml-gen/azure_cpi" ) const ( azureCPIJobName = "cpi" azureCPIReleaseName = "bosh-azur...
func (a *AzureBosh) resourcePoolCloudProperties() interface{} { return azurecloudproperties.ResourcePool{ InstanceType: a.cfg.AzureInstanceSize,
<|file_name|>ControllerB2.java<|end_file_name|><|fim▁begin|>package foo; <|fim▁hole|> public void foo() { super.foo(); System.out.println("ControllerB.foo() running again!"); } }<|fim▁end|>
public class ControllerB2 extends grails.TopB {
<|file_name|>signal_linux_mipsx.go<|end_file_name|><|fim▁begin|>// +build linux // +build mips mipsle mips64 mips64le package signal // import "github.com/tiborvass/docker/pkg/signal" import ( "syscall" "golang.org/x/sys/unix" ) const ( sigrtmin = 34 sigrtmax = 127 ) // SignalMap is a map of Linux signals. var...
"INT": unix.SIGINT,
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>import django.conf class AppSettings(object): """ A holder for app-specific default settings that allows overriding via the project's settings. """ def __getattribute__(self, attr): if attr == attr.upper(): try: ...
"""
<|file_name|>polynomials.py<|end_file_name|><|fim▁begin|>from ..libmp.backend import xrange from .calculus import defun #----------------------------------------------------------------------------# # Polynomials # #----------------------------------------...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>from django.conf import settings as django_settings from django.contrib.auth.decorators import login_required from django.http import Http404 from django.http import HttpResponse from django.shortcuts import render, redirect, get_object_or_404 from django.views.deco...
<|file_name|>verify_test.go<|end_file_name|><|fim▁begin|>/* Copyright IBM Corp. 2017 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.<|fim▁hole|> Unless required by applicable law or agreed to in writing, software dist...
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>upgrade.js<|end_file_name|><|fim▁begin|>/** * @license Angular v4.0.3 * (c) 2010-2017 Google, Inc. https://angular.io/ * License: MIT */ import { Compiler, ComponentFactoryResolver, Directive, ElementRef, EventEmitter, Inject, Injector, NgModule, NgZone, ReflectiveInjector, SimpleChange, Testability, V...
constructor(prop, attr) { this.prop = prop; this.attr = attr;