prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>t_ab_state.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import unittest import pentai.base.human_player as h_m import pentai.base.rules as r_m import pentai.base.game as g_m import pentai.ai.priority_filter as pf_m import pentai.ai.utility_calculator as uc_m from pentai.ai.ab_state import * de...
def test_cannot_place_off_e_edge(self): try:
<|file_name|>operator.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * * MIT License * * Copyright (c) 2017 Advanced Micro Devices, Inc. *<|fim▁hole|> * of this software and associated documentation files (the "Software"), to deal * in the Softwar...
* Permission is hereby granted, free of charge, to any person obtaining a copy
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
module.exports = require('./lib/Redback');
<|file_name|>thumbv7neon_unknown_linux_musleabihf.rs<|end_file_name|><|fim▁begin|>use crate::spec::{Target, TargetOptions}; // This target is for musl Linux on ARMv7 with thumb mode enabled // (for consistency with Android and Debian-based distributions) // and with NEON unconditionally enabled and, therefore, with 32...
features: "+v7,+thumb-mode,+thumb2,+vfp3,+neon".to_string(), max_atomic_width: Some(64),
<|file_name|>test.ts<|end_file_name|><|fim▁begin|>import * as tv from "./index";<|fim▁hole|> // Shows.getMetadata(val,console.log); tv.shows.getEpisodes(val,(err,seasons) => { if(!seasons[2]) {return;} console.log(seasons[2].episodes[4]) tv.shows.streamEpisode(seasons[...
tv.search.shows("Stargate Universe",(err,shows) => { shows.forEach((val,i) => {
<|file_name|>main.go<|end_file_name|><|fim▁begin|>/* The MIT License (MIT) Copyright (c) 2014 DutchCoders [https://github.com/dutchcoders/] 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...
<|file_name|>series-bar-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:3e0c436bb4be5a94bea0b2ce84121c3a8c6fbe226e7559f80cd0db5b4b93fdb0 size 17334
<|file_name|>LODPointFeaturesPreprocessor.java<|end_file_name|><|fim▁begin|>package com.glob3mobile.vectorial.processing; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import com.glob3mobile.utils.Progress; import com.glob3mobile.vecto...
<|file_name|>init.js<|end_file_name|><|fim▁begin|>ConstructIndex(); //non ui for(let B of Bakteriler) { AddBacteriaToDisplay(B);//sadece isimler ve aileler //only ui with variables BakteriRouterSearch(B); //non ui + } ConstructBottomPanel(); //only ui with variables IndexFamilies(); //non ui PremakeLeftPanel(); //...
<|file_name|>TestBreakpointCommand.py<|end_file_name|><|fim▁begin|>""" Test lldb breakpoint command add/list/delete. """ from __future__ import print_function import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil import side_effect class Break...
# Next lets try some other breakpoint kinds. First break with a regular expression # and then specify only one file. The first time we should get two locations,
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-28 01:00 from __future__ import unicode_literals import caching.base from django.db import migrations, models import django.db.models.deletion import sorl.thumbnail.fields class Migration(migratio...
('created', models.DateTimeField(auto_now_add=True)),
<|file_name|>globalize-tests.ts<|end_file_name|><|fim▁begin|>/*Globalize.culture("fr"); console.log(Globalize.culture().name); Globalize.culture("fr-FR"); console.log(Globalize.culture().name); Globalize.culture(["es-MX", "fr-FR"]); console.log(Globalize.culture().name); Globalize.culture("fr;q=0.4, es;q=0.5, he"); ...
Globalize.culture("fr"); Globalize.parseDate("1/2/2003"); Globalize.addCultureInfo({ numberFormat: { billionZeroes: 12 } });
<|file_name|>ipn_merchant_order.py<|end_file_name|><|fim▁begin|># coding: UTF-8 import os, sys import mercadopago def index(req, **kwargs): mp = mercadopago.MP("CLIENT_ID", "CLIENT_SECRET") topic = kwargs["topic"] merchant_order_info = None if topic == "payment" payment_info = mp.get("/collec...
raise ValueError("Error obtaining the merchant_order") if merchant_order_info["status"] == 200
<|file_name|>make-pathway2list.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys ## A name of directory containing 'path:...' file ## You can download them using 'make-wget_pathway.sh' script dir_name = sys.argv[1] f_summary = open('%s.summary'%dir_name,'w') f_genes = open('%s.genes'%dir_nam...
f_genes.write('path:%s\t%s\n'%(path_id,line[11:].strip())) #print line[11:].strip() elif( tmp_tag == '' and prev_tag == 'GENE' ): gene_list.append( line[11:].strip().split()[0] )
<|file_name|>test_frontend.py<|end_file_name|><|fim▁begin|># Authors: # Jason Gerard DeRose <jderose@redhat.com> # # Copyright (C) 2008 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
<|file_name|>TexUnpackBlob.cpp<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* 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:/...
const auto& dstIsPremult = webgl->mPixelStore_PremultiplyAlpha; if (mSrcIsPremult != dstIsPremult)
<|file_name|>Guild.js<|end_file_name|><|fim▁begin|>const Long = require('long'); const User = require('./User'); const Role = require('./Role'); const Emoji = require('./Emoji'); const Invite = require('./Invite'); const GuildAuditLogs = require('./GuildAuditLogs'); const Webhook = require('./Webhook'); const { Presenc...
/**
<|file_name|>index.js<|end_file_name|><|fim▁begin|>// ***********************************************************<|fim▁hole|>// // You can change the location of this file or turn off loading // the plugins file with the 'pluginsFile' configuration option. // // You can read more here: // https://on.cypress.io/plugins-...
// This example plugins/index.js can be used to load plugins
<|file_name|>ssp_Hector_Fit3D_mix.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------------- from bin.dazer_methods import Dazer from bin.lib.ssp_functions.ssp_synthesis_tools import ssp_fitter #---------------------------------------------------------------...
pdl_res_JOINT=pdl_tmp/(pdl_rat_master[0:nx_1])-pdl_mod_JOINT else: pdl_res_JOINT=pdl_tmp/(pdl_rat_master)-pdl_mod_JOINT pdl_output[4,:]=pdl_res_JOINT
<|file_name|>constants.py<|end_file_name|><|fim▁begin|># ######## KADEMLIA CONSTANTS ########### BIT_NODE_ID_LEN = 160 HEX_NODE_ID_LEN = BIT_NODE_ID_LEN // 4 # Small number representing the degree of # parallelism in network calls ALPHA = 3 # Maximum number of contacts stored in a bucket # NOTE: Should be an even nu...
# Max size of a single UDP datagram.
<|file_name|>imports.js<|end_file_name|><|fim▁begin|>'use strict'; import _ from 'lodash'; import bluebird from 'bluebird'; import fs from 'fs'; import requireDir from 'require-dir'; import Logger from '../../logger'; <|fim▁hole|> function main() { const imports = _.chain(requireDir('./importers')) .map('default...
bluebird.promisifyAll(fs);
<|file_name|>ace-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="ace.d.ts" /> var assert: any; var editor = ace.edit("editor"); editor.setTheme("ace/theme/monokai"); editor.getSession().setMode("ace/mode/javascript"); editor.setTheme("ace/theme/twilight"); editor.getSession().setMode("ace/mode/javascript...
<|file_name|>Message.js<|end_file_name|><|fim▁begin|>const Mentions = require('./MessageMentions'); const Attachment = require('./MessageAttachment'); const Embed = require('./MessageEmbed'); const MessageReaction = require('./MessageReaction'); const ReactionCollector = require('./ReactionCollector'); const ClientAppl...
/** * Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications) * @type {boolean}
<|file_name|>authentication.client.controller.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('users').controller('AuthenticationController', ['$scope', '$http', '$location', 'Authentication', function($scope, $http, $location, Authentication) { $scope.authentication = Authentication; $(".sign...
// And redirect to the index page $location.path('/timeline');
<|file_name|>datastructures.py<|end_file_name|><|fim▁begin|>"""Utilities for working with data structures. Version Added: 2.1 """ from __future__ import unicode_literals from collections import OrderedDict from django_evolution.compat import six def filter_dup_list_items(items): """Return list items with ...
<|file_name|>test_magicbot_sm.py<|end_file_name|><|fim▁begin|>from magicbot.state_machine import ( default_state, state, timed_state, AutonomousStateMachine, StateMachine, IllegalCallError, NoFirstStateError, MultipleFirstStatesError, MultipleDefaultStatesError, InvalidStateName,...
sm.execute()
<|file_name|>stream.d.ts<|end_file_name|><|fim▁begin|>declare module "stream" { import * as events from "events"; class internal extends events.EventEmitter { pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T; } namespace internal { class Stream ext...
once(event: "close", listener: () => void): this; once(event: "drain", listener: () => void): this;
<|file_name|>ms.js<|end_file_name|><|fim▁begin|>/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */ /* vim: set ts=2 et sw=2 tw=80: */ /************************************************************* * * MathJax/jax/output/SVG/autoload/ms.js * * Implements the SVG output for <ms> elements. ...
* you may not use this file except in compliance with the License. * You may obtain a copy of the License at *
<|file_name|>managed-pointer-within-unique-vec.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 // htt...
#[allow(unused_variable)];
<|file_name|>gluster.py<|end_file_name|><|fim▁begin|># # # Copyright (C) 2013 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. Redistributions of source code must retain the a...
""" self.file = None
<|file_name|>foo.py<|end_file_name|><|fim▁begin|>def main(**kwargs):<|fim▁hole|><|fim▁end|>
print('foo foo')
<|file_name|>dumb_agent.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -tt # An incredibly simple agent. All we do is find the closest enemy tank, drive # towards it, and shoot. Note that if friendly fire is allowed, you will very # often kill your own tanks with this code. ######################################...
<|file_name|>IntervalFeature.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.mskcc.shenkers.data.interval; import htsjdk.tribble.Featur...
import htsjdk.tribble.bed.FullBEDFeature;
<|file_name|>ventilator.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import zmq import random import time def run(): context = zmq.Context() sender = context.socket(zmq.PUSH)<|fim▁hole|> sender.bind('tcp://*:5557') sink = context.socket(zmq.PUSH) sink.connect('tcp://localhost:5558'...
<|file_name|>tsUnit.ts<|end_file_name|><|fim▁begin|>module tsUnit { export interface ITestClass { } export class Test { private tests: TestDefintion[] = []; addTestClass(testClass: ITestClass, name: string = 'Tests'): void { this.tests.push(new TestDefintion(testClass...
'</section>' + '</article>'; target.innerHTML = template;
<|file_name|>Easel.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable...
function Easel() { _classCallCheck(this, Easel);
<|file_name|>ManageAccounts.java<|end_file_name|><|fim▁begin|>import java.text.NumberFormat; // **************************************************************** // ManageAccounts.java // Use Account class to create and manage Sally and Joe's bank accounts public class ManageAccounts { public static void main(...
//print Sally's new balance (use getBalance()) System.out.println("Sally's new balance: " + usMoney.format(acct1.getBalance()));
<|file_name|>bp.py<|end_file_name|><|fim▁begin|>import math import net SIGMOID = 0 TANH = 1 class bp: def __init__(self, net, learning_rate, momentum): self.type = net.getType() self.net = net self.lr = learning_rate self.m = momentum self.layer = net.getLayer() self.lc = [[[0]*max(self.laye...
delta = [] for i in range(0, nlayer): delta.append([0.0] * self.layer[i])
<|file_name|>WSDLHostCustomizer.java<|end_file_name|><|fim▁begin|>package org.wildfly.swarm.webservices.runtime; <|fim▁hole|>import org.wildfly.swarm.spi.api.Customizer; import org.wildfly.swarm.spi.runtime.annotations.Post; import org.wildfly.swarm.webservices.WebServicesFraction; /** * @author Bob McWhirter */ @Po...
import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; import org.wildfly.swarm.container.Interface;
<|file_name|>remote_fs_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # 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 ...
def test_push_file(self): driver = android_w3c_driver()
<|file_name|>test_help.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ [tests/stdlib/test_help.py] Test the help command. """ import unittest #import os<|fim▁hole|> #from ergonomica import ergo, ENV class TestHelp(unittest.TestCase): """Tests the 'help' command.""" def tes...
<|file_name|>SacrificedSouls.js<|end_file_name|><|fim▁begin|>import React from 'react'; import Analyzer, { SELECTED_PLAYER } from 'parser/core/Analyzer'; import Events from 'parser/core/Events'; import calculateEffectiveDamage from 'parser/core/calculateEffectiveDamage'; import SPELLS from 'common/SPELLS';<|fim▁hole|...
import { formatThousands } from 'common/format';
<|file_name|>bitcoin_bg.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About sportcoin</source> ...
<|file_name|>coffeehandlers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''coffeehandlers.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jul 2014 This contains the URL handlers for the astroph-coffee web-server. ''' import os.path import logging import base64 import re LOGGER = logging.getLogger(__nam...
<|file_name|>test_bottleparser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import pytest from bottle import Bottle, debug, request, response from webtest import TestApp from webargs import ValidationError, fields from webargs.bottleparser import BottleParser hello_args = { 'name': fields.Str(missing=...
}
<|file_name|>test_systemd.py<|end_file_name|><|fim▁begin|># Copyright 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LI...
res = systemd._abstractify(sock_name) self.assertEqual('\0{0}'.format(sock_name[1:]), res)
<|file_name|>common.py<|end_file_name|><|fim▁begin|>import collections import mui4py.mui4py_mod as mui4py_mod from mui4py.config import get_default_config from mui4py.types import map_type, get_float_type_str, get_int_type_str, get_io_type_str import re import numpy as np class CppClass(object): def __init__(self,...
self.config = config
<|file_name|>simple_functions.py<|end_file_name|><|fim▁begin|>import math<|fim▁hole|> ''' Returns a list of even numbers in thelist ''' return [x for x in thelist if x%2 == 0] def is_perfect_square(x): ''' Returns True if x is a perfect square, False otherwise ''' thesqrt = int(math.sqrt...
def even_numbers_only(thelist):
<|file_name|>projectcli.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Name: ProjectCli.py # Purpose: # Author: Fabien Marteau <fabien.marteau@armadeus.com> # Created: 23/05/2008 #----------------------...
top = TopVHDL(settings.active_project)
<|file_name|>api_op_DescribeSnapshots.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ec2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DescribeSnapshotsInput struct { _ struct{} `type:"st...
Copy func(*DescribeSnapshotsInput) DescribeSnapshotsRequest }
<|file_name|>demo.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; function Cat(name, color) { this.name = name; this.color = color; } Cat.prototype.age = 4; var huesitos = new Cat('huesitos', 'amarillo claro'); display(huesitos.__proto__); display(Cat.pr...
<|file_name|>parser.ts<|end_file_name|><|fim▁begin|>import {ENV, DEBUG, uuid, unpad, underline, coerceInput} from "./utils" import * as runtime from "./runtime" import {eve} from "./app" import {repeat} from "./utils" class ParseError extends Error { name: string = "Parse Error"; constructor(public message:string...
// let scope; // [scope = {}, charIx] = getMapArgs(line, lineIx, charIx);
<|file_name|>controllers.js<|end_file_name|><|fim▁begin|>angular.module('perCapita.controllers', []) .controller('AppCtrl', ['$scope', '$rootScope', '$ionicModal', '$timeout', '$localStorage', '$ionicPlatform', 'AuthService', function ($scope, $rootScope, $ionicModal, $timeout, $localStorage, $ionicPlatform, Aut...
template: '<p>Are you sure you want to delete this item?</p>'
<|file_name|>webmediaplayer_params.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webkit/media/webmediaplayer_params.h"<|fim▁hole|> namespace webkit_media ...
#include "media/base/audio_renderer_sink.h" #include "media/base/media_log.h"
<|file_name|>Paginator.test.tsx<|end_file_name|><|fim▁begin|>import { render, screen } from '@testing-library/react' import userEvent from '@testing-library/user-event' import Paginator from '../Paginator' import type { PaginatorProps } from '../Paginator' const mockPageChange = jest.fn() const testCases = [ // act...
) it('activePage has active prop', () => {
<|file_name|>previewContentProvider.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license informatio...
<|file_name|>fn_type.py<|end_file_name|><|fim▁begin|>from core_types import IncompatibleTypes, ImmutableT class FnT(ImmutableT): """Type of a typed function""" def __init__(self, input_types, return_type): self.input_types = tuple(input_types) self.return_type = return_type self._hash = hash(self.inp...
_fn_type_cache[key] = t return t
<|file_name|>response_writer.js<|end_file_name|><|fim▁begin|>const ResponseMessage = require('../../messages').Response; const through2 = require('through2'); const xtend = require('xtend');<|fim▁hole|>}; function encoder(Message, options) { options = xtend(defaults, options || {}); return through2.obj(functio...
var defaults = { ignore_invalid: false
<|file_name|>testReferenceReads1.js<|end_file_name|><|fim▁begin|>(function($) { module("referenceReads1"); // Test case : Reference Reads 1 _asyncTest("Reference Reads 1", function() { expect(6); GitanaTest.authenticateFullOAuth().then(function() { var platform = this; ...
this.createStack().then(function() { stack = this; });
<|file_name|>group.js<|end_file_name|><|fim▁begin|>var https = require('https'); var xml2js = require('xml2js'); var groups = {}; var host, port , auth, origin; groups.getUserGroups = function(req, res) { var options = { rejectUnauthorized: false, hostname: host, port: port, path: ...
id: "Tile_" + k, isNews: (k%2)?true:false };
<|file_name|>p10_sieve.py<|end_file_name|><|fim▁begin|>big = 2000000 # B = the number below which primes are summed p = [True] * big # P = whether a number is prime, all are initially true and will later be falsified print("running sieve...") s = 0 ...
p[b] = False # the multiple isn't prime
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # # # Copyright (c) 2008-2014 University of Dundee. # # 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 Softwar...
<|file_name|>serializer.test.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { shallow, mount } from 'enzyme' import { Editor, EditorState, convertFromRaw } from 'draft-js' import { Serlizer } from './serializer' import { getContentState } from './testUtils' describe('Editor Serilizer', () => { ...
it('<Editor/> should get right textContent', () => { const text = '你好啊 今天开心吗,BUG又少了吗' const s: any = getContentState(text) const c = Serlizer.deserialize(s)
<|file_name|>ABC083B.go<|end_file_name|><|fim▁begin|>package main import ( "bufio" "fmt" "os" "strconv" "strings" ) func main() { sc := bufio.NewScanner(os.Stdin) sc.Split(bufio.ScanWords) n := nextInt(sc)<|fim▁hole|> answer := 0 for i := 1; i <= n; i++ { sum := 0 for _, s := range fmt.Sprintf("%d", i) {...
a := nextInt(sc) b := nextInt(sc)
<|file_name|>hash.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::hash::SipHasher; use core::hash::Hasher; use core::hash::Hash; // pub trait FixedSizeArray<T> { // /// Converts the array to immutable slice // fn as_slice(&self) -...
// Ord::cmp(&&self[..], &&other[..]) // }
<|file_name|>_context.py<|end_file_name|><|fim▁begin|><|fim▁hole|># This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. class TaxingContext(object): def __init__(self, customer_tax_group=None, customer_tax_number=None, location=None): ...
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. #
<|file_name|>CoreConfigParser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import with_statement from os.path import exists from os.path import join CONF_VERSION = 1 ######################################################################## class ConfigParser: #------------------------...
section, none, desc = line[:-1].partition('-') section = section.strip()
<|file_name|>0005_cephpool_percent_used.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals<|fim▁hole|>from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('ceph', '0004_rm_models_based_on_storageobj'), ] op...
<|file_name|>outputDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ The output tab for the main toolbar @author: Chris Scott """ from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import shutil import subprocess import copy...
self.scalarsCombo.addItem(scalarsID)
<|file_name|>strain.py<|end_file_name|><|fim▁begin|>#Copyright (C) 2013 Alex Nitz # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 3 of the License, or (at your # option) any lat...
<|file_name|>pyserial_driver.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 Swift Navigation Inc. # Contact: Mark Fine <mark@swiftnav.com> # # This source is subject to the license found in the file 'LICENSE' which must # be be distributed together with this source. All other rights reserved. # # THIS CODE AND IN...
http://pyserial.sourceforge.net/pyserial_api.html#urls for more details. baud : int Baud rate of serial port (defaults to 115200)
<|file_name|>Fx-catalog-collapsible-menu.js<|end_file_name|><|fim▁begin|>define([ "jquery",<|fim▁hole|> "fx-cat-br/widgets/Fx-widgets-commons", 'text!fx-cat-br/json/fx-catalog-collapsible-menu-config.json', "lib/bootstrap" ], function ($, W_Commons, conf) { var o = { }, defaultOptions = { ...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for TaskTracker project. Generated by 'django-admin startproject' using Django 1.9.6. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://doc...
<|file_name|>problem_1449.py<|end_file_name|><|fim▁begin|>"""1449. Form Largest Integer With Digits That Add up to Target https://leetcode.com/problems/form-largest-integer-with-digits-that-add-up-to-target/ """ from functools import lru_cache from typing import List class Solution: def largest_number(self, cost:...
ret = str(i + 1) + ret if compare(ret, res): res = ret return res
<|file_name|>simplepool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """simple thread pool @author: dn13(dn13@gmail.com) @author: Fibrizof(dfang84@gmail.com) """ import threading import Queue import new def WorkerPoolError( Exception ): pass class Task(threading.Thread): def __init__(self, queue, ...
class WorkerPool( object ):
<|file_name|>test_app.py<|end_file_name|><|fim▁begin|>from bottle import route, default_app app = default_app() data = { "id": 78874, "seriesName": "Firefly", "aliases": [ "Serenity" ], "banner": "graphical/78874-g3.jpg", "seriesId": "7097", "status": "Ended", "firstAired": "2002...
"siteRatingCount": 472, }
<|file_name|>test_component_padmonitor.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; test-case-name: flumotion.test.test_feedcomponent010 -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services,...
def testPadMonitorTimeout(self):
<|file_name|>script_watcher.py<|end_file_name|><|fim▁begin|>""" script_watcher.py: Reload watched script upon changes. Copyright (C) 2015 Isaac Weaver Author: Isaac Weaver <wisaac407@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Li...
<|file_name|>querycondition.cpp<|end_file_name|><|fim▁begin|>#include "querycondition.h" queryCondition::queryCondition(const QString &fieldName, const conditionOperator condition, const QStringList &values, QObject *parent) : QObject(parent) { _fieldName = fieldName; _condition = condition;<|fim▁hole|>queryCo...
_values = values; }
<|file_name|>test_course_topic.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt<|fim▁hole|> class TestCourseTopic(unittest.TestCase): pass<|fim▁end|>
import unittest
<|file_name|>test_images.py<|end_file_name|><|fim▁begin|># Copyright 2018 Red Hat, 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....
@decorators.related_bug('1420008')
<|file_name|>test_pyramid_sendgrid_webhooks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pyramid_sendgrid_webhooks ---------------------------------- Tests for `pyramid_sendgrid_webhooks` module. """ from __future__ import unicode_literals import unittest import pyramid_se...
'timestamp': 1249948800, 'tls': '1', 'type': 'bounce', 'unique_arg_key': 'unique_arg_value',
<|file_name|>simulator.go<|end_file_name|><|fim▁begin|>package numato import ( "bytes" "fmt" "strconv" "strings" ) // Simulator controls a dummy Numato device. // It only deals with the input/output of the numato.Numato object and does not // handle all valid inputs to a real Numato. type Simulator struct { rela...
buf bytes.Buffer
<|file_name|>ExampleInventoryRead.java<|end_file_name|><|fim▁begin|>// file ExampleInventoryRead // $Id: ExampleInventoryRead.java,v 1.10 2009/01/09 22:10:13 mark Exp $ package je.gettingStarted; import java.io.File; import java.io.IOException; import com.sleepycat.bind.EntryBinding; import com.sleepycat.bind.serial...
Vendor.class);
<|file_name|>CompiledMethod_i386.cpp<|end_file_name|><|fim▁begin|>/* * * * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU G...
* included at /legal/license.txt).
<|file_name|>test_config.py<|end_file_name|><|fim▁begin|># # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
from apache.aurora.client import config
<|file_name|>control.py<|end_file_name|><|fim▁begin|>##### CONTROL AND NAVIGATION ################################################### # update the applications' title bar def UpdateCaption(page=0, force=False): global CurrentCaption, CurrentOSDCaption, CurrentOSDPage, CurrentOSDStatus global CurrentOSDCom...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 by Stacy Prowell. All rights reserved. // // Licensed under the BSD 2-Clause license. See the file LICENSE // that is part of this distribution. This file may not be copied, // modified, or distributed except according to those terms.extern ext...
<|file_name|>cinder_service_check.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2014, Rackspace US, 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://ww...
from maas_common import get_auth_ref from maas_common import get_keystone_client from maas_common import metric_bool
<|file_name|>QueryReadStore.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.data.QueryReadStore"]){ dojo._hasR...
<|file_name|>SoftwareRenderer.js<|end_file_name|><|fim▁begin|>/** * @author mrdoob / http://mrdoob.com/ * @author ryg / http://farbrausch.de/~fg * @author mraleph / http://mrale.ph/ * @author daoshengmu / http://dsmu.me/ */ THREE.SoftwareRenderer = function ( parameters ) { console.log( 'THREE.Softwa...
} else {
<|file_name|>73_Set_Matrix_Zeroes.py<|end_file_name|><|fim▁begin|>class Solution(object): def setZeroes(self, matrix): """ :type matrix: List[List[int]] :rtype: void Do not return anything, modify matrix in-place instead. """ width,height = len(matrix[0]),len(matrix) ...
if matrix[j][i] == float("inf"):
<|file_name|>cache.py<|end_file_name|><|fim▁begin|># This file is part of the qpopplerview package. # # Copyright (c) 2010 - 2014 by Wilbert Berendsen # # 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 Found...
"""
<|file_name|>templatetags.py<|end_file_name|><|fim▁begin|>def format_date(dt):<|fim▁hole|><|fim▁end|>
return dt.strftime('%Y-%m-%d %H:%M:%S')
<|file_name|>issue-78722.rs<|end_file_name|><|fim▁begin|>// edition:2018 #![feature(type_alias_impl_trait)] type F = impl core::future::Future<Output = u8>; struct Bug { V1: [(); {<|fim▁hole|> } let f: F = async { 1 }; //~^ ERROR mismatched types [E0308] 1 }], } fn main() {}<|...
fn concrete_use() -> F { async {}
<|file_name|>LambdaOutputUpdate.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/kinesisanalytics/model/LambdaOutputUpdate.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using n...
<|file_name|>content.d.ts<|end_file_name|><|fim▁begin|>export const enum ContentType { Component, Helper, String,<|fim▁hole|> SafeString, Fragment, Node, Other, }<|fim▁end|>
Empty,
<|file_name|>hole.cpp<|end_file_name|><|fim▁begin|>/* SPDX-FileCopyrightText: 2009-2013 Graeme Gott <graeme@gottcode.org> SPDX-License-Identifier: GPL-3.0-or-later */ #include "hole.h" <|fim▁hole|>#include <QRadialGradient> //----------------------------------------------------------------------------- Hole::Hole...
#include <QBrush> #include <QPen>
<|file_name|>ExampleUnitTest.java<|end_file_name|><|fim▁begin|>package com.xing.sample.actionbarcompat_basic; import org.junit.Test;<|fim▁hole|> import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public ...
<|file_name|>FeedController.java<|end_file_name|><|fim▁begin|>package org.ominidi.api.controller; import org.ominidi.api.exception.ConnectionException; import org.ominidi.api.exception.NotFoundException; import org.ominidi.api.model.Errors; import org.ominidi.domain.model.Feed; import org.ominidi.domain.model.Po...
public class FeedController { private PageFeedService pageFeedService;