prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate log; extern crate env_logger; extern crate clap; extern crate ctrlc; extern crate gauc; extern crate iron; extern crate urlencoded; use clap::{App, Arg}; use gauc::cli; use gauc::web; use gauc::client::Client; use std::env; use std::process::exit; use s...
} }
<|file_name|>about_dialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'resources/about_dialog.ui' # # Created: Sat Apr 8 00:53:02 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from Py...
<|file_name|>index.spec.ts<|end_file_name|><|fim▁begin|>import { render } from '@testing-library/vue'; import { IBreadcrumb } from '@inkline/inkline/components'; describe('Components', () => { describe('IBreadcrumb', () => { const props = { color: 'light', size: 'md' }; ...
<|file_name|>_isString.js<|end_file_name|><|fim▁begin|><|fim▁hole|> return toString.call(obj) === '[object String]' }<|fim▁end|>
export default function _isString(obj) {
<|file_name|>RPICameraRemote.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- #important: before running this demo, make certain that you import the library #'paho.mqtt.client' into python (https://pypi.python.org/pypi/paho-mqtt) #also make certain that ATT_IOT is in the same directory as ...
camera.start_recording('video' + datetime.date.today().strftime("%d_%b_%Y_%H_%M%_S") + '.h264') elif value == "false":
<|file_name|>do_the_right_thing.cc<|end_file_name|><|fim▁begin|>// { dg-do compile } // { dg-options "-std=gnu++0x" } // Copyright (C) 2012-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // te...
// You should have received a copy of the GNU General Public License along // with this library; see the file COPYING3. If not see
<|file_name|>VirtualConfigurationType.java<|end_file_name|><|fim▁begin|>package com.intellij.execution.configurations; /** * Configuration of such type can't be manually added or removed by the user; the template entry is hidden. */ public interface VirtualConfigurationType {<|fim▁hole|><|fim▁end|>
}
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from copy import copy import datetime import time import urllib2 from nose.tools import assert_equals from nose.plugins.skip import SkipTest from autoscalebot import TOO_LOW, JUST_RIGHT, TOO_HIGH from autoscalebot.conf import AutoscaleSettings from autoscalebot.models ...
assert_equals(len(self.test_scaler.backends[0].messages), 0) self.test_scaler.do_autoscale()
<|file_name|>script.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import sys import re # file name unified by the following rule: # 1. always save the osm under ../osmFiles directory<|fim▁hole|># 3.2. use command argument to specify osm file name # 4. this script generates a set of paths, each includes ...
# 2. the result automatically generate to ../trajectorySets # 3.1. change variable "osmName", or
<|file_name|>Sebastian_Test_Pluss.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from Pluss import add class TestAdd(unittest.TestCase): def setUp(self): pass def test_numbers_5_7(self): self.assertEqual(add(5,7), 12) if __name__ == '__main__': unittest.main()<|fim▁end|>
import unittest
<|file_name|>color_rgb.go<|end_file_name|><|fim▁begin|>package color import ( "fmt" "strconv" "strings" ) // 24 bit RGB color // RGB: // R 0-255 G 0-255 B 0-255 // R 00-FF G 00-FF B 00-FF (16进制) // // Format: // ESC[ … 38;2;<r>;<g>;<b> … m // Select RGB foreground color // ESC[ … 48;2;<r>;<g>;<b> … m // Choose...
}
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; import { Wea...
export class AppModule { }
<|file_name|>txn_doublespend.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcredit Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with malleable trans...
# Both transactions should be conflicted assert_equal(tx1["confirmations"], -1) assert_equal(tx2["confirmations"], -1)
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- <|fim▁hole|> pbr=True, test_suite="")<|fim▁end|>
from setuptools import setup setup(setup_requires=['pbr'],
<|file_name|>progreso.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- #<|fim▁hole|># 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 ...
# progreso.py # # Copyright 2010 Jesús Hómez <jesus@jesus-laptop> #
<|file_name|>config.route.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; var app = angular.module('app'); // Collect the routes app.constant('routes', getRoutes()); // Configure the routes and route resolvers app.config(['$routeProvider', 'routes', routeConfigurator]); fun...
config: { title: 'admin',
<|file_name|>btc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ Btc plugin for Varas<|fim▁hole|>""" import urllib2 from plugin import Plugin name = 'Bitcoin' class Bitcoin(Plugin): def __init__(self): Plugin.__init__(self,"bitcoin","<wallet> Return current balance fro...
Author: Neon & A Sad Loner Last modified: November 2016
<|file_name|>token_string.go<|end_file_name|><|fim▁begin|>// Code generated by "stringer -type=Token tokens.go"; DO NOT EDIT. package traversal <|fim▁hole|>import "strconv" const _Token_name = "ILLEGALEOFWSIDENTCOMMADOTLEFTPARENTHESISRIGHTPARENTHESISSTRINGNUMBERGVEHASHASKEYHASNOTHASEITHEROUTINOUTVINVBOTHVOUTEINEBOTHE...
<|file_name|>law_of_demeter_bad_example.py<|end_file_name|><|fim▁begin|>class City(object): def __init__(self, name): self.name = name def Name(self): return self.name class Home(object): def __init__(self, name, city): self.name = name self.city = city def Name(sel...
return self.city
<|file_name|>input.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************/ /* Mednafen Fast SNES Emulation Module */ /******************************************************************************/ /* input.cpp: ** Copyrig...
{ "gamepad", "Gamepad",
<|file_name|>uuid_test.go<|end_file_name|><|fim▁begin|>// Copyright 2020 CUE 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 /...
"testing" "cuelang.org/go/pkg/internal/builtintest"
<|file_name|>head.py<|end_file_name|><|fim▁begin|># head.py # Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import commit class Head(object): """ A Head ...
@classmethod def from_string(cls, repo, line): """
<|file_name|>qbittorrent.py<|end_file_name|><|fim▁begin|>import os from loguru import logger from requests import Session from requests.exceptions import RequestException from flexget import plugin from flexget.event import event from flexget.utils.template import RenderError logger = logger.bind(name='qbittorrent')...
data=data, msg_on_fail='Authentication failed.',
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>import logging from wtforms import Form, SelectField, SelectMultipleField, validators import savant.comparisons import savant.sets import savant.diffs class DiffForm(Form): diffs = SelectMultipleField('Diffs', [validators.Required()], choices=[]) class DiffNami...
prev_system = '' prev_action = ''
<|file_name|>quadrature_clough_2D.C<|end_file_name|><|fim▁begin|>// The libMesh Finite Element Library. // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License...
<|file_name|>State2VecTest.java<|end_file_name|><|fim▁begin|>package experiments; import java.io.File; import java.util.Arrays; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import data.StateImpl; import datahandler.word2vec.MedicalSequenceIterator; import state2vec.State2Vec; publ...
logger.info("vectorLength: " + vectorLength);
<|file_name|>md.py<|end_file_name|><|fim▁begin|># devices/md.py # # Copyright (C) 2009-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any lat...
<|file_name|>problem303.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># Multiples with small digits # =========================== # Published on Saturday, 25th September 2010, 10:00 pm # # For a positive integer n, define f(n) as the least positive multiple of n # that, written in base 10, uses on...
# ProjectEuler/src/python/problem303.py #
<|file_name|>FunctionParamSpec.java<|end_file_name|><|fim▁begin|>package org.xacml4j.v30.pdp;<|fim▁hole|> * Xacml4J Core Engine Implementation * %% * Copyright (C) 2009 - 2014 Xacml4J.org * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Publ...
/* * #%L
<|file_name|>Issue623.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var foo = /bar//* test */
<|file_name|>template.py<|end_file_name|><|fim▁begin|>import collections import re #imports class Jison:#extends symbols = {} terminals = {} productions = {} table = {} default_actions = {} version = '0.3.12' debug = False action_none = 0 action_shift = 1 action_deduce = 2 action_accept = 3 unput_stack ...
else: self.yy.loc = ParserLocation()
<|file_name|>cartesian.js<|end_file_name|><|fim▁begin|>/* =================================================== */ var treeData = [ { "name": "Top Level", "parent": "null", "children": [ { "name": "Level 2: A", "parent": "Top Level", "children": [ { "name"...
<|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 OclIcd(AutotoolsPackage): """This pac...
url = "https://github.com/OCL-dev/ocl-icd/archive/v2.2.12.tar.gz" version('2.2.13', sha256='f85d59f3e8327f15637b91e4ae8df0829e94daeff68c647b2927b8376b1f8d92') version('2.2.12', sha256='17500e5788304eef5b52dbe784cec197bdae64e05eecf38317840d2d05484272')
<|file_name|>unknown-tool-name.rs<|end_file_name|><|fim▁begin|>#[foo::bar] //~ ERROR failed to resolve: use of undeclared crate or module `foo`<|fim▁hole|><|fim▁end|>
fn main() {}
<|file_name|>build_executables_basic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import fileinput import string import sys import os ar = 'ar' fortran_compiler = 'ftn' fortran_opt_flags = '-O3' fortran_link_flags = '-O1' c_compiler = 'cc' c_opt_flags = '-O3' src_dir = './src/' obj_dir = './obj/' exe_dir = '....
source_file.write(' IF(glass_correct(perm(1), perm(2), perm(3), perm(4))) THEN\n') source_file.write(' write(6,*) "KGlass Reference = ",Tglass,"seconds"\n') source_file.write(' ENDIF\n')
<|file_name|>slope.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** slope.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alex...
self.tr("Use Zevenbergen&Thorne formula (instead of the Horn's one)"), False)) self.addParameter(ParameterBoolean(self.AS_PERCENT,
<|file_name|>guiprocess.py<|end_file_name|><|fim▁begin|># vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the...
<|file_name|>15.2.3.6-3-141-1.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2012 Ecma International. All rights reserved. /// Ecma International makes this code available under the terms and conditions set /// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the /// "Use Terms"). Any re...
<|file_name|>master.go<|end_file_name|><|fim▁begin|>package canal import ( "bytes" "os" "sync" "time" "github.com/BurntSushi/toml" "github.com/siddontang/go-mysql/mysql" "github.com/siddontang/go/ioutil2" "github.com/siddontang/go/log" ) type masterInfo struct { Addr string `toml:"addr"` Name strin...
var err error if err = ioutil2.WriteFileAtomic(m.name, buf.Bytes(), 0644); err != nil { log.Errorf("canal save master info to file %s err %v", m.name, err) }
<|file_name|>FsmTransition.java<|end_file_name|><|fim▁begin|>package com.usp.icmc.labes.fsm; public class FsmTransition extends FsmElement{ private FsmState from; private String input; private String output; private FsmState to; public FsmTransition(){ super(); } public FsmTransition(FsmState f, Strin...
} public String getOutput() { return output;
<|file_name|>JdkMarshaller.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 under...
clsLdr = getClass().getClassLoader();
<|file_name|>Server.cc<|end_file_name|><|fim▁begin|>/* Copyright (c) 2012 Stanford University * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * T...
Server::Server(Event::Loop& eventLoop, uint32_t maxMessageLength) : mutex()
<|file_name|>time.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ //! Timing functions. use crate::heartbeats; use crate::trace_...
&ProfilerCategory::ApplicationHeartbeat, profile_heartbeats, )
<|file_name|>update_replace_rollback.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 # # Unl...
test.assertEqual(expected_count, len(reality.resources_by_logical_name('C')))
<|file_name|>BlockFrenchFlag.java<|end_file_name|><|fim▁begin|>package com.silvermatch.advancedMod.block; import com.silvermatch.advancedMod.init.ModBlocks; import com.silvermatch.advancedMod.reference.Reference; import com.silvermatch.advancedMod.utility.Names; import net.minecraft.block.Block; import net.minecraft....
}
<|file_name|>Object.cpp<|end_file_name|><|fim▁begin|>#include "Object.h" // #include <SFML/Audio.hpp> // for playing sounds namespace { using namespace ogl; // taken from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html#The C Code // Argument Meaning // nvert Number of vertices in th...
} // handle_event void Object::render()
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # python-problem documentation build configuration file, created by # sphinx-quickstart on Tue Dec 4 12:03:58 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration...
u'Richard Marko', 'manual'), ]
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jasmine-ajax 3.1 // Project: https://github.com/jasmine/jasmine-ajax // Definitions by: Louis Grignon <https://github.com/lgrignon> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 interface Jasmin...
interface JasmineAjaxRequestStubReturnOptions { status?: number;
<|file_name|>_signalhelper.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; py-indent-offset: 4 -*- # pygobject - Python bindings for the GObject library # Copyright (C) 2012 Simon Feltman # # gi/_signalhelper.py: GObject signal binding decorator object # # This library is free software; you can redistribute it an...
<|file_name|>CircleTransform.java<|end_file_name|><|fim▁begin|>package me.zsj.moment.utils; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapShader; import android.graphics.Canvas; import android.graphics.Paint; import com.bumptech.glide.load.engine.bitmap_recycle....
public CircleTransform(Context context) { super(context);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use provider::HandleFunc; use provider::port::inline::InlineProvider; use provider::port::shell::ShellProvider; pub struct PortProvider { pub inline: Box<InlineProvider>, pub shell: Box<ShellProvider>, }<|fim▁hole|> let s = self.shell.clone(); Box...
impl PortProvider { pub fn is_listening(&self, number: usize) -> Box<HandleFunc> { let i = self.inline.clone();
<|file_name|>dependency_inference.py<|end_file_name|><|fim▁begin|># Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import json import logging import re from collections import defaultdict from dataclas...
PATH_FROM_SHELLCHECK_ERROR = re.compile(r"Not following: (.+) was not specified as input")
<|file_name|>CImageLoaderPPM.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2007-2012 Christian Stehno // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h #include "CImageLoaderPPM.h" #ifdef _IRR_COMPILE_WITH_PPM_LOADER_ #include "IReadFile....
if (id[0]!='P' || id[1]<'1' || id[1]>'6')
<|file_name|>logger_test.go<|end_file_name|><|fim▁begin|>package logging import ( "bytes" "encoding/json" "errors" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "net/http" "os" "testing" "time" ) type logReccord struct { Type string `json:"type"` Timestamp ...
<|file_name|>graphics.rs<|end_file_name|><|fim▁begin|>use super::*; use redox::*; impl Editor { /// Redraw the window pub fn redraw(&mut self) { // TODO: Only draw when relevant for the window let x = self.x(); let y = self.y(); // Redraw window self.window.set([0, 0, 0,...
self.window.char(8 * (x - self.scroll_y) as isize,
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Rustic bindings to [libnotify](https://developer.gnome.org/libnotify/) //!<|fim▁hole|>//! fn main() { //! // Init libnotify //! libnotify::init("myapp").unwrap(); //! // Create a new notification (doesn't show it yet) //! let n = libnotify::Notificati...
//! ```rust //! extern crate libnotify; //!
<|file_name|>non-inline-mod-restriction.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main() { mod foo; //~ ERROR cannot declare a non-inline module inside a block }<|fim▁end|>
// Test that non-inline modules are not allowed inside blocks.
<|file_name|>border.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% ...
if let Ok(value) = input.try(|i| BorderSideWidth::parse(context, i)) { width = Some(value); any = true; continue
<|file_name|>convert.py<|end_file_name|><|fim▁begin|>import logging import codecs from optparse import OptionParser from pyjade.utils import process import os def convert_file(): support_compilers_list = ['django', 'jinja', 'underscore', 'mako', 'tornado'] available_compilers = {} for i in support...
if __name__ == '__main__':
<|file_name|>app.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- '''The app module, containing the app factory function.''' from flask import Flask, render_template from cheapr.settings import ProdConfig from cheapr.assets import assets from cheapr.extensions import ( bcrypt, cache, db, login_m...
return None
<|file_name|>pilconvert.py<|end_file_name|><|fim▁begin|>#!/Users/keith.hamilton/Documents/GitHub/keithhamilton/blackmaas/bin/python # # The Python Imaging Library. # $Id$ # # convert image files # # History: # 0.1 96-04-20 fl Created # 0.2 96-10-04 fl Use draft mode when converting images # 0.3 96-12-30 f...
<|file_name|>chai-jquery-1.0.0.js<|end_file_name|><|fim▁begin|>(function (chaiJquery) { // Module systems magic dance. if (typeof require === "function" && typeof exports === "object" && typeof module === "object") { // NodeJS module.exports = chaiJquery; } else if (typeof define === "function" && define....
, 'expected #{this} not to have value #{exp}' , value ); });
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py<|fim▁hole|>__doc__="""The Reportlab PDF generation library.""" Version = "2.7" impor...
__version__=''' $Id$ '''
<|file_name|>issue-2904.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...
-> Vec<Vec<square>> {
<|file_name|>tabs.spec.js<|end_file_name|><|fim▁begin|>import { createVue, destroyVM } from '../util'; describe('Tabs', () => { let vm; afterEach(() => { destroyVM(vm); }); it('create', done => { vm = createVue({ template: ` <el-tabs ref="tabs"> <el-tab-pane label="用户管理">A</el-...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>def tryprint():<|fim▁hole|> return ('it will be oke')<|fim▁end|>
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>struct Point<T> { x: T, y: T, } impl<T> Point<T> { fn swap(&mut self) { std::mem::swap(&mut self.x, &mut self.y); } } fn takes_anything<T>(x: T) { // do something with x } fn takes_two_of_the_same_thing<T>(x: T, y: T) { // do something...
}
<|file_name|>views_support.py<|end_file_name|><|fim▁begin|># This code has been taken from http://www.assembla.com/spaces/datatables_demo/wiki from django.db.models import Q from django.template.loader import render_to_string from django.http import HttpResponse from django.utils.cache import add_never_cache_hea...
iDisplayLength = min(int(request.GET.get('iDisplayLength',10)),100) #Safety measure. If someone messes with iDisplayLength manually, we clip it to the max value of 100. startRecord = int(request.GET.get('iDisplayStart',0)) # Where the data starts from (page)
<|file_name|>CalledSteps.java<|end_file_name|><|fim▁begin|>package billing; import cuke4duke.Then; import cuke4duke.Given; import static org.junit.Assert.assertTrue; <|fim▁hole|> public void itIs(String what) { if(what.equals("magic")) { magic = true; } } @Then("^magic should ha...
public class CalledSteps { private boolean magic; @Given("^it is (.*)$")
<|file_name|>test_stress.py<|end_file_name|><|fim▁begin|>from ritoapi.endpoints.match_v3 import MatchV3 import threading def _load_matches(match_v3, sample_region, sample_match_id, count): for i in range(count): data = match_v3.matches(sample_region, sample_match_id) assert(data['gameId'] == sampl...
t.start() for t in threads:
<|file_name|>outwin.py<|end_file_name|><|fim▁begin|>"""Editor window that can serve as an output file. """ import re from tkinter import messagebox from idlelib.editor import EditorWindow file_line_pats = [ # order of patterns matters r'file "([^"]*)", line (\d+)', r'([^\s]+)\((\d+)\)', r'^(\s*\S.*...
"""
<|file_name|>const-fields-and-indexing.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....
const s : S = S {a: 10, b: 20}; static t : isize = s.b; struct K {a: isize, b: isize, c: D}
<|file_name|>0003_auto_20200421_0255.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.21 on 2020-04-21 06:55 from __future__ import unicode_literals from django.db import migrations import django.utils.timezone import model_utils.fields<|fim▁hole|>class Migration(migrations.Migration)...
<|file_name|>func_lambda_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|> return lambda x: log(x, base) My_LF = make_logarithmic_function(3) print(My_LF(9))<|fim▁end|>
from math import log def make_logarithmic_function(base):
<|file_name|>PostTitle.js<|end_file_name|><|fim▁begin|>/* @flow */ import { Case } from '../Case'; export class PostTitle extends Case { static text = 'Post title'; static parseCriterion(input: *) { return { patt: input }; } static defaultConditions = { patt: '' }; static fields = ['post\'s title contains ', { ...
<|file_name|>subtitle-text.js<|end_file_name|><|fim▁begin|>/** * Copyright 2016-present Tuan Le. * * Licensed under the MIT License. * You may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://opensource.org/licenses/mit-license.html * * Unless requir...
componentRef.transition( componentRefTransition.from, componentRefTransition.to,
<|file_name|>mod.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/. */ pub use self::builder::BlockFlowDisplayListBuilding; pub use self...
<|file_name|>treewalker.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::callback::ExceptionHandling::Ret...
// "1. Let sibling be node's next sibling if type is next,
<|file_name|>imgui_style.hpp<|end_file_name|><|fim▁begin|>#pragma once #include "imgui.h" namespace bengine { inline void setup_imgui_style_green()<|fim▁hole|> style.Alpha = 1.0f; style.FrameRounding = 3.0f; style.Colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f); style.Colors[ImGuiCol_TextDisabled] ...
{ ImGuiStyle& style = ImGui::GetStyle(); // light style from Pacôme Danhiez (user itamago) https://github.com/ocornut/imgui/pull/511#issuecomment-175719267
<|file_name|>issue-30079.rs<|end_file_name|><|fim▁begin|>struct SemiPriv; mod m1 { struct Priv; impl ::SemiPriv { pub fn f(_: Priv) {} //~ WARN private type `m1::Priv` in public interface //~^ WARNING hard error } impl Priv { pub fn f(_: Priv) {} // ok } } mod m2 { str...
} }
<|file_name|>login.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({ selector: 'login',<|fim▁hole|> <div>LOGIN</div> <form> <fieldset> <div [ngClass]="{ 'has-error' : firstNameVar.touched && !firstNameVar.valid }"> ...
template: `
<|file_name|>pages.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ The project pages map for project """ import io import os from optimus.builder.pages import PageViewBase from optimus.conf import settings from project import __version__ as sveetoy_version from project.sitemap import PageSitemap, tree_fro...
return context
<|file_name|>IntegrationTestReplication.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this fi...
* The number of rows after which the linked list points to the first row. * See {@link org.apache.hadoop.hbase.test.IntegrationTestBigLinkedList} for more details */
<|file_name|>DetailActivity.java<|end_file_name|><|fim▁begin|>package com.example.android.sunshine.app; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.view.MenuItemCompat; import android.support.v7.app.ActionBarActivity; import android.support...
// if (myShareActionProvider != null) { // myShareActionProvider.setShareIntent(createShareForecastIntent()); // } else { // Log.d(LOG_TAG, "share actionprovider is null ?!?");
<|file_name|>addprofile.js<|end_file_name|><|fim▁begin|>Template.formeditprofile.events({ 'submit #editform': function(event){ event.preventDefault(); var firstNameVar = event.target.firstname.value; var lastNameVar = event.target.lastname.value; var classVar = event.target.classvar.value; Profiles.insert({ ...
<|file_name|>rare.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''Tool to generate computationally-rarefied graphs kmer spectra''' import sys import os import scipy.stats from optparse import OptionParser import numpy as np import ksatools def fract(aa, epsilon, threshold): '''Evaluates the fraction of ...
''' assert aa.shape[1] == 2 matrix = np.zeros((len(samplefracs), len(thresholds))) for i, frac in enumerate(samplefracs):
<|file_name|>UserInfo.java<|end_file_name|><|fim▁begin|>package com.altas.preferencevobjectfile.model;<|fim▁hole|>/** * @author Altas * @email Altas.TuTu@gmail.com * @date 2014年9月27日 */ public class UserInfo implements Serializable { /** * */ private static final long serialVersionUID = 8558071977129572083L...
import java.io.Serializable;
<|file_name|>struct-base-wrong-type.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.apa...
// except according to those terms.
<|file_name|>set.hpp<|end_file_name|><|fim▁begin|>// // MessagePack for C++ static resolution routine // // Copyright (C) 2008-2015 FURUHASHI Sadayuki // // 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 co...
++p; ++it;
<|file_name|>faSave.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var prefix = 'far'; var iconName = 'save'; var width = 448; var height = 512; var ligatures = []; var unicode = 'f0c7';<|fim▁hole|>exports.definition = { prefix: prefix, iconNa...
var svgPathData = 'M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l...
<|file_name|>cgpm.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # h...
raise NotImplementedError
<|file_name|>node-test.js<|end_file_name|><|fim▁begin|>/*global SixSpeed */ var Fs = require('fs'), Path = require('path'); var $type = process.argv[2]; if ($type === 'babel') { require('babel-polyfill'); } if ($type === 'traceur') { require('traceur/bin/traceur-runtime'); } require('./runner'); var testDir ...
});
<|file_name|>providers.py<|end_file_name|><|fim▁begin|>from genesis2.core.core import Plugin, implements from genesis2.interfaces.gui import IMeter class BaseMeter (Plugin): """ Meters are determinable values (int, float, bool) representing system status (sysload, memory usage, service status, etc.) which...
<|file_name|>pi_counter_imp.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013-present Barefoot Networks, 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.or...
pibmv2::convert_from_counter_data(&desired_data, &bytes, &packets); auto error_code = pibmv2::switch_->write_counters( 0, c_name, index, bytes, packets); if (error_code != bm::Counter::CounterErrorCode::SUCCESS)
<|file_name|>calibrator.py<|end_file_name|><|fim▁begin|>import todsynth import os import numpy import json import pandas class Calibrator( object ): ''' A todsynth.calibrator object is a container that stores coefficients that transform RAW dac units to physical units for a given TOD. ''' # ...
name,caltype,_ = os.path.basename( systemPath ).split('.') self.name = name
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>export type { Format } from "../types/Format";<|fim▁hole|>export type { WebfontOptions } from "./WebfontOptions";<|fim▁end|>
export type { GlyphMetadata } from "./GlyphMetadata"; export type { GlyphTransformFn } from "./GlyphTransformFn"; export type { GlyphData } from "./GlyphData"; export type { InitialOptions } from "./InitialOptions";
<|file_name|>ws_freidman1_SVR_rbf_db2_code_gen.py<|end_file_name|><|fim▁begin|><|fim▁hole|> reg_gen.test_model("SVR_rbf" , "freidman1" , "db2")<|fim▁end|>
from sklearn2sql_heroku.tests.regression import generic as reg_gen
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .ui import * from .windows_views import *<|fim▁end|>
<|file_name|>saver.py<|end_file_name|><|fim▁begin|>import torch import pickle import logging from .baseclasses import ScalarMonitor from .meta import Regurgitate class Saver(ScalarMonitor): def __init__(self, save_monitor, model_file, settings_file, **kwargs): self.saved = False self.save_monitor =...
if self.value is None: self.value = self.save_monitor.value if self.save_monitor.changed: self.save(model, settings)
<|file_name|>vdom-util.tsx<|end_file_name|><|fim▁begin|>/* eslint max-classes-per-file: off */ import { __assign } from 'tslib' import { Component, Ref } from './vdom' import { ViewContextType, ViewContext } from './ViewContext' import { compareObjs, EqualityFuncs, getUnequalProps } from './util/object' import { Dicti...