prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Utils.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ Copyright [1999-2018] EMBL-European Bioinformatics Institute 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:/...
string += "============\n" string += "\n"
<|file_name|>pessoa_cpp.cpp<|end_file_name|><|fim▁begin|>#include "pessoa_cpp.hpp" Pessoa::Pessoa() { } Pessoa::Pessoa(QString nome, int idade, float altura) { this->setNome(nome); this->idade = idade; this->altura = altura; } Pessoa::~Pessoa() { qDebug() << "Deletando a pessoa " << this; } void Pes...
qDebug() << "Idade: " << this->idade;
<|file_name|>test_linux.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Linux specific tests.""" import contextlib import errno import io import...
self.assertRaises(IOError, psutil.cpu_times_percent) self.assertRaises( IOError, psutil.cpu_times_percent, percpu=True)
<|file_name|>lib.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/. */ #![feature(custom_attribute, custom_derive, plugin)]<|fim▁hole|>e...
#![plugin(heapsize_plugin, serde_macros, plugins)] #[macro_use] extern crate bitflags;
<|file_name|>ARTarget.cpp<|end_file_name|><|fim▁begin|>/* * ARTarget.cpp * ARToolKit5 * * This file generate a special actor who defines a NFT target * File descriptions: ARTarget contains very important features like size of the target, * the offset calcultation for the NFT track point, a plane to display the tar...
//toogle shadow plane shadowPlane->SetVisibility(AllowShadowPlane);
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from utils.api_factory import ApiFactory <|fim▁hole|> if __name__ == '__main__': api.run(host='0.0.0.0', port=8000)<|fim▁end|>
api = ApiFactory.get_instance()
<|file_name|>development_tools_config_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################### # License, author and contributors information in: # # __openerp__.py file at the root folder of this modul...
<|file_name|>traits.rs<|end_file_name|><|fim▁begin|>// * This file is part of the uutils coreutils package. // * // * (c) 2020 Alex Lyon <arcterus@mail.com> // * (c) 2020 nicoo <nicoo@debian.org> // * // * For the full copyright and license information, please view the LICENSE file // * that was distributed with ...
#[cfg(debug_assertions)] fn as_u128(&self) -> u128; }
<|file_name|>filter_games_controller.py<|end_file_name|><|fim▁begin|>''' This module controls the dialog to set filter criteria ''' from PyQt5 import QtCore, Qt, QtWidgets from views.filter_dialog import Ui_FilterDialog class FilterGamesController(QtWidgets.QDialog): ''' Controller object for the filter games...
parameters:
<|file_name|>autotag.py<|end_file_name|><|fim▁begin|>""" Contains a few template tags relating to autotags Specifically, the autotag tag itself, and the filters epoch and cstag. """ from django import template from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from tags.models...
<|file_name|>__init__.js<|end_file_name|><|fim▁begin|>(function(){ if ( window.xataface == undefined ) window.xataface = {}; if ( window.xataface.modules == undefined ) window.xataface.modules = {};<|fim▁hole|><|fim▁end|>
if ( window.xataface.modules.htmlreports == undefined ) window.xataface.modules.htmlreports = {}; })();
<|file_name|>db.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import pymongo<|fim▁hole|> client = pymongo.MongoClient(MONGO_STRING, tz_aware=True) db = client['yo-water']<|fim▁end|>
from config import MONGO_STRING
<|file_name|>dataAnalysis.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #encoding=utf8 #Copyright [2014] [Wei Zhang] #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...
timeperiod_numattendants = defaultdict(int)
<|file_name|>observations.js<|end_file_name|><|fim▁begin|>const iNaturalistAPI = require( "../inaturalist_api" ); const ControlledTerm = require( "../models/controlled_term" ); const Observation = require( "../models/observation" ); const Project = require( "../models/project" ); const Taxon = require( "../models/taxon...
} return response; } ); }
<|file_name|>onedstate.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gofem Authors. All rights reserved. // Use of this source code is governed by a BSD-style<|fim▁hole|> import "github.com/cpmech/gosl/chk" // OnedState holds data for 1D models type OnedState struct { // essential Sig float64 // σ: Cauchy s...
// license that can be found in the LICENSE file. package solid
<|file_name|>preloader.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('mpApp') .factory( 'preloader', function($q, $rootScope) { // I manage the preloading of image objects. Accepts an array of image URLs. function Preloader(imageLocations) { // I am the image SRC values t...
<|file_name|>UserInput.py<|end_file_name|><|fim▁begin|>import os import atexit import string import importlib import threading import socket from time import sleep def BYTE(message): return bytes("%s\r\n" % message, "UTF-8") class UserInput(threading.Thread): isRunning = False parent = None def __init__(self, bo...
self.setDaemon(True)
<|file_name|>hook-wx.lib.activex.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception<|fim▁hole|>#--------------------------...
# for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this software.
<|file_name|>commonUtils.js<|end_file_name|><|fim▁begin|>import dateformat from 'dateformat'; import { map } from "underscore"; import { getAccountById } from 'routes/root/routes/Banking/routes/Accounts/modules/accounts'; import { getCreditCardById, getPrepaidCardById } from 'routes/root/routes/Banking/routes/Cards/mod...
return findDebitAccount(debitAccountType, debitAccountId, state).currency; } export const isValidDate = (date) => {
<|file_name|>format_ctree.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools; use std::fmt::Display; use std::fs::OpenOptions; use std::io::Write; use std::ops::AddAssign; use std::path::PathBuf; use error::{Error, ResultExt}; use types::{CCode, CTree, Field, ToC}; #[derive(Debug, Default)] pub struct CFilePair...
ref name,
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Ben Swartzlander. All rights reserved. # Copyright (c) 2014 Navneet Singh. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Bob Callaway...
l = root.get_child_by_name('l') self.assertIsInstance(l, netapp_api.NaElement)
<|file_name|>first_run.js<|end_file_name|><|fim▁begin|>/** * @fileOverview first_run.js shows the necessary navigation and * design elements to be integrated into the privly-applications * bundle. */ /** * Initialize the applications by showing and hiding the proper * elements. */ function init() { // Set th...
document.addEventListener('DOMContentLoaded', init);
<|file_name|>profile.js<|end_file_name|><|fim▁begin|>angular.module('gitphaser').controller('ProfileController', ProfileCtrl); /** * @ngdoc object * @module gitphaser * @name gitphaser.object:ProfileCtrl * @description Exposes GitHub.me profile object or account object to the profile template. * G...
// Arbitrary profile
<|file_name|>0base.js<|end_file_name|><|fim▁begin|>checkRolesInFunction = function (doRole, userId) { if (!Meteor.userId() || ENUM.getUserById(userId)) throw ENUM.ERROR(403); }; getSelector = function (selector) { var baseSelector = { delete_flg: {$ne: 1} }; return _.extend(baseSelector, selector); }; ...
for (let env in Meteor.settings.env_address){ var addr = Meteor.settings.env_address[env]
<|file_name|>http.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """PySide port of the network/http example from Qt v4.x""" import sys from PySide import QtCore, QtGui, QtNetwork class HttpWindow(QtGui.QDialog): def __init__(self, parent=None): QtGui.QDialog.__init__(self, parent) self.u...
if url.port() != -1: self.http.setHost(url.host(), url.port())
<|file_name|>factories.py<|end_file_name|><|fim▁begin|>import factory from .models import User USER_PASSWORD = "2fast2furious"<|fim▁hole|> name = "John Doe" email = factory.Sequence(lambda n: "john{}@example.com".format(n)) password = factory.PostGenerationMethodCall('set_password', USER_PASSWORD) gend...
class UserFactory(factory.DjangoModelFactory):
<|file_name|>saddle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc Print = PETSc.Sys.Print # from MatrixOperations import * from dolfin import * import numpy as np import matplotlib.pylab as plt import scipy.sparse as sps import scipy.s...
<|file_name|>round.js<|end_file_name|><|fim▁begin|>/*jslint browser: true, devel: true, node: true, ass: true, nomen: true, unparam: true, indent: 4 */ /** * @license * Copyright (c) 2015 The ExpandJS authors. All rights reserved. * This code may only be used under the BSD style license found at https://expandjs.gi...
<|file_name|>test_kubernetes_pod_operator_backcompat.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...
'requiredDuringSchedulingIgnoredDuringExecution': {
<|file_name|>flag.go<|end_file_name|><|fim▁begin|>package cli import ( "flag" "fmt" "os" "strconv" "strings" "time" ) // This flag enables bash-completion for all commands and subcommands var BashCompletionFlag = BoolFlag{ Name: "generate-bash-completion", Hide: true, } // This flag prints the version for th...
<|file_name|>die-macro.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licen...
<|file_name|>play.js<|end_file_name|><|fim▁begin|>// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. (function() { "use strict"; var runFunc; var count = 0; function getId() { return "code" + (coun...
<|file_name|>extent.rs<|end_file_name|><|fim▁begin|>// // Copyright 2016 Andrew Hunter // // 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/L...
///
<|file_name|>FacebookConnect.spec.ts<|end_file_name|><|fim▁begin|>import {addProviders} from '@angular/core/testing' import {testBootstrap, injectAsync, defaultProviders} from '../../../testing/Utils' import {FacebookConnect} from './FacebookConnect' import {Facebook} from 'ionic-native' let testProviders: Array<any> ...
it('should login when user is not yet connected', (done) => { spyOn(this.instance, 'fbLogin').and.callThrough()
<|file_name|>cvscontrol.cpp<|end_file_name|><|fim▁begin|>/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** ** GNU Lesser Gene...
#include "cvssettings.h"
<|file_name|>durand.py<|end_file_name|><|fim▁begin|>""" Implementation of the paper, Durand and Dorsey SIGGGRAPH 2002, "Fast Bilateral Fitering for the display of high-dynamic range images" """ import numpy as np import hydra.io import hydra.filters def bilateral_separation(img, sigma_s=0.02, sigma_r=0.4): r, c ...
log_base = np.log10(Lbase)
<|file_name|>ssm.rs<|end_file_name|><|fim▁begin|>//! Amazon EC2 Simple Systems Manager //! //! If you're using the service, you're probably looking for [SsmClient](struct.SsmClient.html). <|fim▁hole|><|fim▁end|>
include!(concat!(env!("OUT_DIR"), "/ssm.rs"));
<|file_name|>htmltablerowelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::utils::{DOMString, ErrorResult...
pub fn GetRowIndex(&self) -> i32 { 0
<|file_name|>testPlugin2.cpp<|end_file_name|><|fim▁begin|>/** * * This file is part of Tulip (www.tulip-software.org) * * Authors: David Auber and the Tulip development Team * from LaBRI, University of Bordeaux * * Tulip is free software; you can redistribute it and/or modify * it under the terms of the GNU Les...
* as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. *
<|file_name|>AnalogArrowIndicator.js<|end_file_name|><|fim▁begin|>define(["dojo/_base/declare","./AnalogIndicatorBase"], function(declare, AnalogIndicatorBase) { return declare("dojox.gauges.AnalogArrowIndicator", [AnalogIndicatorBase],{<|fim▁hole|> // to the value of the indicator. _getShapes: function(group){ ...
// summary: // An indicator for the AnalogGauge that draws an arrow. The arrow is drawn on the angle that corresponds
<|file_name|>84.py<|end_file_name|><|fim▁begin|>from qgl2.qgl2 import qgl2decl, qgl2main, qreg from qgl2.qgl2 import QRegister from qgl2.qgl1 import X, Y, Z, Id, Utheta from itertools import product @qgl2decl def cond_helper(q: qreg, cond): if cond: X(q) @qgl2decl def t1(): """ Correct result is [...
@qgl2decl
<|file_name|>hero-detail.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { Hero } from '../model/hero'; import { HeroService } from '../model/hero.service'; // #docregion prototype<|fim▁hole|>@Injectab...
<|file_name|>plot_gpr_prior_posterior.py<|end_file_name|><|fim▁begin|>""" ========================================================================== Illustration of prior and posterior Gaussian process for different kernels ========================================================================== This example illustr...
alpha=0.1, color="black", label=r"$\pm$ 1 std. dev.", )
<|file_name|>example.rs<|end_file_name|><|fim▁begin|>static ABC: &str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; pub fn get_diamond(diamond_char: char) -> Vec<String> { let mut result: Vec<String> = Vec::new(); let diamond_char = diamond_char.to_ascii_uppercase(); if ABC.find(diamond_char).is_none() { return ...
//letter line for i in letter_e.chars() { r.push(i) }
<|file_name|>ipspace_modify_parameters.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT. package networking // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "context" "net/http" "time" "githu...
} // SetHTTPClient adds the HTTPClient to the ipspace modify params
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may ...
} } impl Hasher for PlainHasher {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Cairo test suite. """ import imp import os import cairosvg reference_cairosvg = imp.load_source( 'cairosvg_reference', pathname=os.path.join( os.path.dirname(__file__), 'cairosvg_reference', 'cairosvg', '__init__.py'))<|fim▁hole|>cairosvg...
<|file_name|>optionsF.cc<|end_file_name|><|fim▁begin|>/*** * * WHAT * * FILE * * $Source: /home/vdmtools/cvsroot/toolbox/code/qtgui/optionsF.cc,v $ * * VERSION * * $Revision: 1.29 $ * * DATE * * $Date: 2006/02/07 01:52:03 $ * * AUTHOR * * $Author: vdmtools $ * * COPYRIGHT * * (C) Kyushu Univer...
<|file_name|>0009_auto_20180524_2221.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-05-25 02:21 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.M...
model_name='computerregistration', name='user', field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), ),
<|file_name|>cimgvolumereader.cpp<|end_file_name|><|fim▁begin|>/********************************************************************************* * * Inviwo - Interactive Visualization Workshop<|fim▁hole|> * * Copyright (c) 2015-2021 Inviwo Foundation * All rights reserved. * * Redistribution and use in source an...
<|file_name|>0019_auto_20150903_0458.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): <|fim▁hole|> ] operations = [ migrations.AlterUniqueTogether( name='friend_r...
dependencies = [ ('course_selection', '0018_auto_20150830_0319'),
<|file_name|>codedarticle.py<|end_file_name|><|fim▁begin|>########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The...
# option) any later version. # # # # AmCAT is distributed in the hope that it will be useful, but WITHOUT # # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
<|file_name|>development.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = { db: 'mongodb://localhost/qaapp-dev',<|fim▁hole|> //db: 'mongodb://nodejitsu:e0b737c9d532fc27e1e753a25a4f823e@troup.mongohq.com:10001/nodejitsudb3924701379', mongoose: { debug: true }, app: { name: 'AskOn' }, ...
<|file_name|>inputs-outputs.component.ts<|end_file_name|><|fim▁begin|>import {Component} from '@angular/core'; import {SourceCodeViewComponent} from '../../components/source-code-view/source-code-view.component'; import {RunExampleComponent} from '../../components/run-example/run-example'; @Component({<|fim▁hole|> ...
moduleId: module.id, selector: 'inputs-outputs', styleUrls: ['inputs-outputs.component.css'], templateUrl: 'inputs-outputs.component.html',
<|file_name|>first-8.ts<|end_file_name|><|fim▁begin|>import { helper as buildHelper } from '@ember/component/helper'; <|fim▁hole|> return params[0].substring(0, 8); } export default buildHelper(first8);<|fim▁end|>
export function first8(params: any[] /*, hash*/) {
<|file_name|>imgui_widgets.cpp<|end_file_name|><|fim▁begin|>// dear imgui, v1.69 // (widgets code) /* Index of this file: // [SECTION] Forward Declarations // [SECTION] Widgets: Text, etc. // [SECTION] Widgets: Main (Button, Image, Checkbox, RadioButton, ProgressBar, Bullet, etc.) // [SECTION] Widgets: Low-level Lay...
{ ImGuiContext& g = *GImGui; if (g.CurrentWindow->SkipItems)
<|file_name|>curves.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::default::Default; use std::num::FromStrRadix; use num::{BigUint, Zero, One}; use num::bigint::ToBigUint; use fields::{Field, FieldElem, P192, R192, P256, R256, P521, R521}; #[allow(non_snake_case)] // Weierstrass curve with large characteristi...
} impl<C: Curve<F, G>, F:Field, G: Field> Mul<FieldElem<G>, AffinePoint<C, F, G>> for AffinePoint<C, F, G> { fn mul(&self, other: &FieldElem<G>) -> AffinePoint<C, F, G> { self.pow(&other.limbs) }
<|file_name|>datadialog.ts<|end_file_name|><|fim▁begin|>namespace RIAPP.MOD.datadialog { import utilsMOD = RIAPP.MOD.utils; import templMOD = RIAPP.MOD.template; import mvvm = RIAPP.MOD.mvvm; var utils: utilsMOD.Utils; RIAPP.global.addOnInitialize((s, args) => { utils = s.utils; }); ...
<|file_name|>prp_CamClasses.py<|end_file_name|><|fim▁begin|># Copyright (C) 2008 Guild of Writers PyPRP Project Team # See the file AUTHORS for more info about the team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publish...
<|file_name|>stereo.hpp<|end_file_name|><|fim▁begin|>/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you ...
CV_EXPORTS static Ptr<cv::stereo::StereoBinarySGBM> create(int minDisparity, int numDisparities, int blockSize, int P1 = 100, int P2 = 1000, int disp12MaxDiff = 1, int preFilterCap = 0, int uniquenessRatio = 5,
<|file_name|>image.cc<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) * Copyright (C) 2004, 2005, 2006 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the followin...
// SkImage. PaintImage image = PaintImageForCurrentFrame(); if (!image) return false;
<|file_name|>font.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/. */ //! Generic types for font stuff. use cssparser::Parser; use nu...
}
<|file_name|>get_all_labels.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2015 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...
def main(client): # Initialize appropriate service.
<|file_name|>dialogflow_generated_dialogflow_v2_entity_types_batch_create_entities_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 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 ob...
# Generated code. DO NOT EDIT! # # Snippet for BatchCreateEntities
<|file_name|>co.py<|end_file_name|><|fim▁begin|>from django.contrib.localflavor.co.forms import CODepartmentSelect from utils import LocalFlavorTestCase class COLocalFlavorTests(LocalFlavorTestCase): def test_CODepartmentSelect(self): d = CODepartmentSelect()<|fim▁hole|><option value="ATL">Atl\xe1ntico</o...
out = u"""<select name="department"> <option value="AMA">Amazonas</option> <option value="ANT">Antioquia</option> <option value="ARA">Arauca</option>
<|file_name|>basevariantprotocol.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010, * Gavriloaie Eugen-Andrei (shiretu@gmail.com) * * This file is part of crtmpserver. * crtmpserver is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publi...
{ ASSERT("We should not be here"); return false; }
<|file_name|>d3-stack.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; import { stack } from 'd3-shape'; import addOptionsToStack from '../utils/add-options-to-stack'; export function d3Stack( [ data, args ], hash={}) { return addOptionsToStack(stack(data, args), hash); } <|fim▁hole|><|fim▁end|>
export default Ember.Helper.helper(d3Stack);
<|file_name|>stylesheets.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 cssparser::{self, Parser as CssParser, SourcePosition...
LengthOrPercentageOrAuto::Percentage(Percentage(1.)))), Importance::Normal), (PropertyDeclaration::AnimationPlayState(DeclaredValue::Value( animation_play_state::SpecifiedValue(
<|file_name|>selectmany.go<|end_file_name|><|fim▁begin|><|fim▁hole|>// Example: Fetch many rows and allow cancel the query by Ctrl+C. package main import ( "context" "database/sql" "flag" "fmt" "log" "os" "os/signal" "runtime/pprof" "strconv" _ "net/http/pprof" "runtime/debug" sf "github.com/snowflakedb...
<|file_name|>StundenplanManager.java<|end_file_name|><|fim▁begin|>package de.maxgb.vertretungsplan.manager; import android.content.Context; import android.os.AsyncTask; import de.maxgb.android.util.Logger; import de.maxgb.vertretungsplan.util.Constants; import de.maxgb.vertretungsplan.util.Stunde; import org.json.JSON...
}
<|file_name|>sr_mult.py<|end_file_name|><|fim▁begin|>from list_node import ListNode from instruction import Instruction, Subneg4Instruction def sr_mult(WM, LM): namespace_bak = WM.getNamespace(string=False) WM.setNamespace(["sr","mult"]) c_0 = WM.const(0) c_1 = WM.const(1) c_m1 = WM.const(-1) c_32 = W...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .context import CorpusContext from .audio import AudioContext from .importable import ImportContext from .lexical import LexicalContext from .pause import PauseContext from .utterance import UtteranceContext from .structured import StructuredContext<|fim▁hole|...
<|file_name|>webGrid.js<|end_file_name|><|fim▁begin|>/// <reference path="jquery-1.4.4-vsdoc.js" /> $(document).ready(function () { function updateGrid(e) { e.preventDefault(); // find the containing element's id then reload the grid var url = $(this).attr('href'); var grid = $(thi...
grid.load(url + ' #' + id); }; $('.ajaxGrid table thead tr a').live('click', updateGrid); // hook up ajax refresh for sorting links
<|file_name|>message.rs<|end_file_name|><|fim▁begin|>use regex::Regex; #[derive(Debug, PartialEq)] pub struct Message { pub data: String, }<|fim▁hole|> } pub fn decompress_v1(&self) -> u64 { let marker_finder: Regex = Regex::new(r"\((\d+)x(\d+)\)").unwrap(); decompressed_string_length_v1(&...
impl Message { pub fn new(data: &str) -> Message { Message { data: data.to_string() }
<|file_name|>MachineWatcherController.java<|end_file_name|><|fim▁begin|>package org.iatoki.judgels.michael.controllers; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.apache.commons.lang3.EnumUtils; import org.iatoki.judgels.play.InternalLink; import org.iatoki.judge...
} private Result showActivateMachineWatcher(Machine machine, String watcherType, Html html) { LazyHtml content = new LazyHtml(html);
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate serial; extern crate num_cpus; use std::io; use std::io::{Read, BufReader, BufRead, Write}; use std::fs::File; use std::str::FromStr; use std::thread::sleep; use std::time::Duration; use std::num::ParseFloatError; use std::collections::VecDeque; use seria...
if let Some(first) = iter.next() { if let Some(second) = iter.next() { return Some((first.to_string(), second.to_string()));
<|file_name|>test_products.py<|end_file_name|><|fim▁begin|>from sympy import (symbols, product, factorial, rf, sqrt, cos, Function, Product, Rational) a, k, n = symbols('a,k,n', integer=True) def test_simple_products(): assert product(2, (k, a, n)) == 2**(n-a+1) assert product(k, (k, 1, n))...
def test_special_products(): # Wallis product
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join def configuration(parent_package='', top_path=None): import warnings from numpy.distutils.misc_util import Configuration from numpy.distutils....
<|file_name|>ShaderPhongTexture.cpp<|end_file_name|><|fim▁begin|>// Shader Code #include <windows.h> #include <string> #include <fstream> #include <d3d9.h> #include <d3dx9.h> #include "../../math/Math.h" #include "../../base/base.h" #include "../../etc/Utility.h" #include <vector> #include <map> #include <sstream> #pr...
g_CurPos.x = LOWORD(lParam);
<|file_name|>AddIgnoredIdentifierQuickFix.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2016 JetBrains s.r.o. * * 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.apa...
} }
<|file_name|>concat-helper-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../include.d.ts" /> import * as should from "should"; import { create as createHandlebarsInstance } from "handlebars"; import { ConcatHelper } from "../../../src/services/template/concat-helper"; describe('ConcatHelper', functi...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod node;<|fim▁hole|><|fim▁end|>
pub mod list;
<|file_name|>KtekLoginEntity.java<|end_file_name|><|fim▁begin|>/* * * Copyright 2015 IK4-Tekniker All Rights Reserved * * This file is part of Health Questionnaire SE at FISTAR https://www.fi-star.eu/ * * Health Questionnaire SE is free software: you can redistribute it and/or * modify it under the terms of the GNU A...
* License, or (at your option) any later version.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup setup(name='PyRankinity', version='0.1', description='Rankinity API Wrapper - See http://my.rankinity.com/api.en', author='UpCounsel', author_email='brad@upcounsel.com', url='https://www.github.com/upcounsel/p...
install_requires=[ 'requests', ],
<|file_name|>recipe.go<|end_file_name|><|fim▁begin|>package domain // RecipeType blah blah type RecipeType int const ( pinRecipe RecipeType = iota userRecipe ) // RecipeIngredient is the link object between a recipe and an ingredient type RecipeIngredient struct { ID int IngredientID int<|fim▁hole|> //...
Amount float32 Unit int }
<|file_name|>fifa_spider.py<|end_file_name|><|fim▁begin|>from scrapy.spiders import Spider from scrapy.selector import Selector from scrapy.http import HtmlResponse from FIFAscrape.items import PlayerItem from urlparse import urlparse, urljoin from scrapy.http.request import Request from scrapy.conf import settin...
def parse(self, response): #obtains links from page to page and passes links to parse_playerURL sel = Selector(response) #define selector based on response object (points to urls in start_urls by default)
<|file_name|>import_errors.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. # # 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; vers...
cmd_str = ("{0} --skip-blobs --format=sql --import=definitions "
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys<|fim▁hole|>from foobar.app import create_app from foobar.user.models import User from foobar.settings import DevConfig, ProdConfig from foobar.database import db if os.environ.get("FOOBAR_ENV") == 'pr...
import subprocess from flask.ext.script import Manager, Shell, Server from flask.ext.migrate import MigrateCommand
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.7 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation ...
elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package org.eclipse.om2m.commons.resource; import javax.xml.bind.annotation.XmlNs;
<|file_name|>find.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-2021 MinIO, Inc. // // This file is part of MinIO Object Storage stack // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Fo...
// iterate over all content which is within the given directory for content := range ctx.clnt.List(globalContext, ListOptions{Recursive: true, ShowDir: DirFirst}) { if content.Err != nil {
<|file_name|>register.go<|end_file_name|><|fim▁begin|>/*<|fim▁hole|>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 law ...
Copyright 2016 The Kubernetes Authors.
<|file_name|>robust_mutex.hpp<|end_file_name|><|fim▁begin|>//---------------------------------------------------------------------------- /// \file robust_mutex.hpp /// \author Serge Aleynikov //---------------------------------------------------------------------------- /// \brief Robust mutex that can be shared bet...
private: pthread_mutex_t* m;
<|file_name|>regions-return-interior-of-option.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<|fim▁h...
<|file_name|>generateProptypes.ts<|end_file_name|><|fim▁begin|>import * as path from 'path'; import * as fse from 'fs-extra'; import * as ttp from 'typescript-to-proptypes'; import * as prettier from 'prettier'; import * as globCallback from 'glob'; import { promisify } from 'util'; import * as _ from 'lodash'; import ...
});
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>DESCRIPTION = """\ ACQ4 is a python-based platform for experimental neurophysiology. It includes support for standard electrophysiology, multiphoton imaging, scanning laser photostimulation, and many other experimental techniques. ACQ4 is highly modular and extensib...
author='Luke Campagnola', author_email='luke.campagnola@gmail.com', )
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use crate::types::game::context::roleplay::fight::arena::ArenaRankInfos; use crate::types::game::context::roleplay::fight::arena::LeagueFriendInformations; use protocol_derive::{Decode, Encode}; #[derive(Clone, PartialEq, Debug, Encode, Decode)] #[protocol(id = 6282)] p...
pub address: &'a str, pub ports: std::borrow::Cow<'a, [u16]>,
<|file_name|>codemap.js<|end_file_name|><|fim▁begin|>// Copyright 2009 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must reta...
/**
<|file_name|>freeze.py<|end_file_name|><|fim▁begin|>import re import sys import pip from pip.req import InstallRequirement from pip.log import logger from pip.basecommand import Command from pip.util import get_installed_distributions import pkg_resources class FreezeCommand(Command): """Output installed package...
f = sys.stdout for dist in pkg_resources.working_set:
<|file_name|>main.js<|end_file_name|><|fim▁begin|>import answer from './answer';<|fim▁hole|><|fim▁end|>
var answer2 = answer; export default answer2;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...