prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>suggest-labels.rs<|end_file_name|><|fim▁begin|>#[allow(unreachable_code, unused_labels)]
fn main() {
'foo: loop {
break 'fo; //~ ERROR use of undeclared label
}<|fim▁hole|> }
'longlabel: loop {
'longlabel1: loop {
break 'longlable; //~ ERROR use of undeclared lab... |
'bar: loop {
continue 'bor; //~ ERROR use of undeclared label |
<|file_name|>monitor.go<|end_file_name|><|fim▁begin|>package monitor
const (
// RedisPrefix 参数:business。
RedisPrefix = "monitor_stats_%d_"
// SuffixVideo 视频停留统计。参数:state
SuffixVideo = "%d"
// SuffixArc 稿件停留统计。参数:round。参数:state。
SuffixArc = "%d_%d"
BusVideo = 1
BusArc = 2
NotifyTypeEmail = 1
NotityTypeSm... | }
type Stats struct { |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.5
#
# Copyright 2009 Google 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
#<|fim▁hole|># WITHOUT WARRANTIES OR CONDI... | # http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>CommonIO.cpp<|end_file_name|><|fim▁begin|>/*
This file is part of solidity.
solidity 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 late... | #if defined(_WIN32)
#include <windows.h> |
<|file_name|>alertify.py<|end_file_name|><|fim▁begin|># @Author: ganeshkumarm
# @Date: 2016-11-19T19:20:11+05:30
# @Last modified by: ganeshkumarm
# @Last modified time: 2016-11-19T19:20:45+05:30
#Built in modules
import os
import sys
import time
import subprocess
import datetime
import platform
from win10toast im... | def sleep_time(self, notify_time): |
<|file_name|>RParser.java<|end_file_name|><|fim▁begin|>// Generated from /mnt/hdd/Programming/Projects/Groovy/intellidots/src/main/antlr/R.g4 by ANTLR 4.2.2
package ua.edu.hneu.ast.parsers;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime... | }
break; |
<|file_name|>sql_types.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2008--2010 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
#... | type_name = None
def __init__(self, value=None, size=None):
self.size = size or 1 |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import contextlib
import gzip
import hashlib
import io
import mmap
from builtins import (
map as imap,
)
def gzip_compress(data, compresslevel=6):
compressed = io.BytesIO()
with gzip.GzipFile(fileobj=compressed,
mode="wb",<|fim▁hole... | compresslevel=compresslevel) as compressor:
compressor.write(data)
return compressed.getvalue()
|
<|file_name|>MiSeLoR.java<|end_file_name|><|fim▁begin|>package de.tkprog.MiSeLoR;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;<|fim▁hole|>import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sq... | import java.io.InputStreamReader; |
<|file_name|>PickleSaver.py<|end_file_name|><|fim▁begin|># Copyright (c) 2001 Autonomous Zone Industries
# Copyright (c) 2002-2009 Zooko Wilcox-O'Hearn
# This file is part of pyutil; see README.rst for licensing terms.
"""
An object that makes some of the attributes of your class persistent, pickling
them and lazil... | attrdict = pickle.loads(open(self._extres.fname + ".tmp", "rb").read())
for attrname, attrval in attrdict.items():
if not hasattr(self, attrname): |
<|file_name|>backendTests.ts<|end_file_name|><|fim▁begin|>/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.<|fim▁hole|>You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is di... |
Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License. |
<|file_name|>models.hpp<|end_file_name|><|fim▁begin|>//
// models.hpp
// animeloop-cli
//
// Created by ShinCurry on 2017/4/3.
// Copyright © 2017年 ShinCurry. All rights reserved.
//
#ifndef models_hpp
#define models_hpp
#include <iostream>
#include <opencv2/opencv.hpp>
namespace al {
typedef std::tuple<long... | |
<|file_name|>PaperSheet.js<|end_file_name|><|fim▁begin|>/**
* @file
* @copyright 2020 WarlockD (https://github.com/warlockd)
* @author Original WarlockD (https://github.com/warlockd)
* @author Changes stylemistake
* @author Changes ThePotato97
* @author Changes Ghommie
* @author Changes Timberpoes
* @license MI... | const formatted_text = run_marked_default(fielded_text.text);
// Fifth, we wrap the created text in the pin color, and font. |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# Desarrollado por rNet Soluciones
# Jefe de Proyecto: Ing. Ulises Tlatoani Vidal Rieder
# Desarrollador: Ing. Salvador Daniel Pelayo Gómez.
# Analis... | # |
<|file_name|>RegistryService.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2005-2010 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the ... | * no value exists at the path and name provided
*
|
<|file_name|>doc.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | executes. In particular, the type of every closure `fn:'r K` includes
a region bound `'r`. This bound indicates the maximum lifetime of that
closure; once we exit that region, the closure cannot be called |
<|file_name|>test_filters.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
unit test for filters module
author: Michael Grupp
This file is part of evo (github.com/MichaelGrupp/evo).
evo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published b... | lie.se3(np.eye(3), np.array([0, 0, 0.999999])),
lie.se3(np.eye(3), np.array([0, 0, 0.9999999]))
] |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
""" Copyright (C) 2012 mountainpenguin (pinguino.de.montana@googlemail.com)
<http://github.com/mountainpenguin/pyrt>
This file is part of pyRT.
pyRT is free software: you can redistribute it and/or modify
it under the terms of ... | if "logfile" in configfile:
logfile = configfile["logfile"]
else: |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
class MyTest(unittest.TestCase):
def test(self):
self.assertEqual(4, 4)<|fim▁end|> | import unittest |
<|file_name|>083_remove_duplicates_from_sorted_list.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
using namespace std;
/**
* Definition for singly-linked list.
*/
struct ListNode {
int val;
ListNode *next;
ListNode(int x) : val(x), next(NULL) {}
};
class Solution {
public:
ListNode* deleteDu... | }; |
<|file_name|>no_0037_sudoku_solver.rs<|end_file_name|><|fim▁begin|>struct Solution;
impl Solution {
pub fn solve_sudoku(board: &mut Vec<Vec<char>>) {
// 9 行,每个 u16 表示一行上的数据,u16 表示对应索引的数字在这一行上已经有了。
let mut line = vec![0_u16; 9];
// 9 列
let mut column = vec![0_u16; 9];
// 3 x 3... | |
<|file_name|>autocomp.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node
var fs = require('fs'),
path = require('path');
//kansorc = require('kanso/kansorc');
//kansorc.load(function (err, cfg) {
var commands = {
'clear-cache': null,
'create': null,
'createdb': null,
'deletedb': null,
'... | 'pack': [{directories: true}], |
<|file_name|>tfile.server.model.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* Module dependencies.<|fim▁hole|>
/**
* Tfile Schema
*/
var TfileSchema = new Schema({
name: {
type: String,
default: '',
required: 'Please add a TestFile name',
trim: true
},
created: {
type: Date,
default: Date.now
... | */
var mongoose = require('mongoose'),
Schema = mongoose.Schema; |
<|file_name|>main.module.ts<|end_file_name|><|fim▁begin|>import { TopWarningComponent } from './../top-warning/top-warning.component';
import { TrialExpiredComponent } from './../trial-expired/trial-expired.component';
import { EmptyDashboardComponent } from './empty-dashboard.component';
import { RouterModule } from '... | imports: [TranslateModule.forChild(), SharedModule, routing],
declarations: [MainComponent, SideNavComponent, TreeViewComponent, TrialExpiredComponent, TopWarningComponent],
providers: [], |
<|file_name|>CloudFormationStackRecordSourceInfo.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the L... | |
<|file_name|>test_django.py<|end_file_name|><|fim▁begin|>from kaneda.backends import LoggerBackend, ElasticsearchBackend
from kaneda.queues import CeleryQueue
from django_kaneda import settings # NOQA
class TestDjango(object):
def test_django_kaneda_with_backend(self, mocker, django_settings_backend):
m... | |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from wtforms.e... | from indico.web.forms.fields import IndicoMarkdownField |
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Le... | StoreReadError {
description("Error reading store")
display("Error reading store")
} |
<|file_name|>killProcName.py<|end_file_name|><|fim▁begin|># Kills a process by process name
#
# Uses the Performance Data Helper to locate the PID, then kills it.
# Will only kill the process if there is only one process of that name
# (eg, attempting to kill "Python.exe" will only work if there is only
# one Python.ex... | |
<|file_name|>primeng-tabview.js<|end_file_name|><|fim▁begin|>import { EventEmitter, Input, Output, Component, ViewContainerRef, ContentChildren, ElementRef, NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TooltipModule } from 'primeng/tooltip';
import { PrimeTemplate, SharedMod... | |
<|file_name|>FileBrowser.java<|end_file_name|><|fim▁begin|>/*Copyright (c) 2004,University of Illinois at Urbana-Champaign. All rights reserved.
*
* Created on Jun 14, 2006
*
* Developed by: CCT, Center for Computation and Technology,
* NCSA, University of Illinois at Urbana-Champaign
* OSC, Ohio Supe... | |
<|file_name|>common.js<|end_file_name|><|fim▁begin|>function getURLVar(key) {
var value = [];
var query = String(document.location).split('?');
if (query[1]) {
var part = query[1].split('&');
for (i = 0; i < part.length; i++) {
var data = part[i].split('=');
if (data[0] && data[1]) {
value[data[0]]... | |
<|file_name|>jquery.slimscroll.js<|end_file_name|><|fim▁begin|>/*! Copyright (c) 2011 Piotr Rochala (http://rocha.la)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*
* Version: 1.0.0
*
*/
(function($) {
... | |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>"""
This module allows you to mock the config file as needed.
A default fixture that simply returns a safe-to-modify copy of
the default value is provided.
This can be overridden by parametrizing over the option you wish to
mock.<|fim▁hole|>... def test_fixture(mock... |
e.g.
>>> @pytest.mark.parametrize("extension_initial_dot", (True, False)) |
<|file_name|>builder.rs<|end_file_name|><|fim▁begin|>extern crate libc;
use std::ops::Drop;
use std::collections::HashMap;
use std::ffi::CString;
use basic_block::BasicBlock;<|fim▁hole|>use function_call::FunctionCall;
use bindings::*;
#[derive(PartialEq,Eq)]
pub struct IRBuilder(pub(super) LLVMBuilderRef);
impl IR... | use value::Value;
use context::Context;
use switch::Switch;
use function::Function; |
<|file_name|>test_assertions.py<|end_file_name|><|fim▁begin|>import collections
import unittest
from kobold import assertions
class TestAssertEqual(unittest.TestCase):
def test_empty_hashes(self):
assertions.assert_equal({}, {})
def test_distinct_keys(self):
self.assertRaises(
... | 'status_code' : 200, |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>import test from 'ava';
import fn from './';
test('to decimal', t => {
t.true(fn(65) === 0.65);
t.true(fn(1234.5) === 12.345);<|fim▁hole|> t.true(fn(6158.4256, {digits: 5}) === 61.58426);
t.true(fn(1234.5, {digits: 0}) === 12);
t.end();
});<|fim▁end|> | t.true(fn(0.1) === 0.001);
t.true(fn(12.1245, {digits: 2}) === 0.12); |
<|file_name|>Cisco_IOS_XR_tunnel_l2tun_oper.py<|end_file_name|><|fim▁begin|>""" Cisco_IOS_XR_tunnel_l2tun_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR tunnel\-l2tun package operational data.
This module contains definitions
for the following management objects\:
l2tp\: L2TP operatio... | |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"flag"
"github.com/katherinealbany/rodentia/logger"
"os"
"os/exec"
)
var (
log = logger.New("main")
dir string
repo string
build string
stable string
release string<|fim▁hole|>)
func init() {
flag.StringVar(&dir, "dir", "."... | force string
push string |
<|file_name|>test_dimension.py<|end_file_name|><|fim▁begin|>from itertools import product
import numpy as np
from sympy import And
import pytest
from conftest import skipif, opts_tiling
from devito import (ConditionalDimension, Grid, Function, TimeFunction, SparseFunction, # noqa
Eq, Operator, Co... | |
<|file_name|>lsn.js<|end_file_name|><|fim▁begin|>$(document).ready(function() {
/* initialize the external events
-----------------------------------------------------------------*/
$('#external-events div.external-event').each(function() {
// create an Event Object (http://arshaw.com/fullcalendar/docs/... | |
<|file_name|>Tron.java<|end_file_name|><|fim▁begin|>package nak.liblinear;
import static nak.liblinear.Linear.info;
/**
* Trust Region Newton Method optimization<|fim▁hole|>
private final double eps;
private final int max_iter;
public Tron( final Function fun_obj ) {
this(fun_obj, 0.1);
... | */
class Tron {
private final Function fun_obj; |
<|file_name|>home.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
The home manual page is at:
http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Home
==Operation==
The default 'Activate Home' checkbox is on. When it is on, the functions described below will work, when it is off, nothing will be done.
==Settings==
... | """
This page is in the table of contents.
Plugin to home the tool at beginning of each layer. |
<|file_name|>json11.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2013 Dropbox, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitatio... | }
} // namespace json11 |
<|file_name|>packer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys, os, os.path, signal
import jsshellhelper
from optparse import OptionParser<|fim▁hole|>
class Packer(object):
toolsdir = os.path.dirname(os.path.abspath(__file__))
def run(self, jsshell, filename):
tmpFile = jsshellhelper.crea... | from subprocess import Popen, PIPE, STDOUT
# Uses jsshell https://developer.mozilla.org/en/Introduction_to_the_JavaScript_shell |
<|file_name|>handlers.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2016-2021 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Fo... | // hasOtherInstances checks whether there are other instances of the snap, be it |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![allow(unused_must_use)]
extern crate pad;
#[macro_use]
extern crate quicli;
extern crate reqwest;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate serde_json;
extern crate term;
use pad::PadStr;
use reqwest::Url;
use std::process;
use std::s... | |
<|file_name|>ViewQueueHelp.js<|end_file_name|><|fim▁begin|>"use strict";
function HelpTutorial()
{
let _getText = function()
{
return "HelpTutorial_Base";
};
this.getName = function(){ return "HelpTutorial_Base"; };
this.getImageId = function(){ return "button_help"; };<|fim▁hole|>}
function HelpTutorialBuild... | this.getText = _getText; |
<|file_name|>watcher_mac.py<|end_file_name|><|fim▁begin|>import subprocess
import sys
import os
import time
from collections import namedtuple
sys.path.append(os.path.join(os.getcwd(), "src"))
from utils import settings
from utils import logger
settings.initialize('watcher')
original_plist = '/opt/TopPatch/agent/da... | |
<|file_name|>classExclusion.d.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright 2013 Palantir Technologies, 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:... | private shouldPrivacyBeDocumented(node);
} |
<|file_name|>findNoteCounts.py<|end_file_name|><|fim▁begin|># Import the Evernote client
from evernote.api.client import EvernoteClient
# Import the Evernote note storetypes to get note datatypes
# to properly get note/tag counts (note filter)
import evernote.edam.notestore.ttypes as NoteStoreTypes
# Define access t... | #note_filter.includeAllReadableNotebooks=True
|
<|file_name|>setup_template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import sys
extra_install = []
if sys.version_info <= (3,1):
extra_install.append('futures')
<|fim▁hole|> extra_install.append('pysha3')
setup(
name="moneywagon",
version='{{... | if sys.version_info <= (3,6): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>r"""
Main classes of OpenPNM
=======================
This module contains the main classes from which all other major objects
(Network, Geometry, Physics, Phase, and Algorithm) derive.
The Base class
--------------
The ``Base`` class is a ``dict`` that has added ... | that inherit from ``Subdomain`` are Geomery and Physics. |
<|file_name|>StockImbalanceReportParam.java<|end_file_name|><|fim▁begin|>/*
* This program was produced for the U.S. Agency for International Development. It was prepared by the USAID | DELIVER PROJECT, Task Order 4. It is part of a project which utilizes code originally licensed under the terms of the Mozilla Public... | private String productCategory;
private String facility;
private int programId;
|
<|file_name|>modules.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
######################################
#
# Détection des modules
#
######################################
#
# WxGeometrie
# Dynamic geometry, graph plotter, and more for french mathematic teachers.
# Copyright (C) 2005-2013 Nicol... | print("Warning: %s n'est pas un module valide (%s)." %(nom, msg))
for nom in os.listdir(_modules_dir):
if nom not in _skip_dir and os.path.isdir(os.path.join(_modules_dir, nom)): |
<|file_name|>iife.js<|end_file_name|><|fim▁begin|>(function () {
'use strict';<|fim▁hole|>
function foo () {
return embiggen( 6, 7 );
}
/**
* Embiggens a number
* @param {number} num - the number to embiggen
* @param {number} factor - the factor to embiggen it by
* @returns {number}
*/
function embigg... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod postgres;<|fim▁end|> | #[cfg(feature = "postgres")] |
<|file_name|>commands.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//! Defines the redis commands exposed by the redis client.
//!
#[cfg(test)]
#[path = "./commands_test.rs"]
mod commands_test;
use crate::client::Client;
use crate::types::{RedisArg, RedisBoolResult, RedisEmptyResult, RedisResult, RedisStringResult};
u... | //! # commands
//! |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! A safe wrapper around the kernel's KVM interface.
mod cap;
use std::cell::RefCell;
use std::cmp:... | // the entire log. |
<|file_name|>account_connectivity.py<|end_file_name|><|fim▁begin|># ~*~ coding: utf-8 ~*~
from celery import shared_task
from django.utils.translation import ugettext as _, gettext_noop
from common.utils import get_logger
from orgs.utils import org_aware_func
from ..models import Connectivity
from . import const
from... | @shared_task(queue="ansible") |
<|file_name|>DocumentController.js<|end_file_name|><|fim▁begin|>/**
* DocumentController
*
* @description :: Server-side logic for managing documents
* @help :: See http://links.sailsjs.org/docs/controllers
*/
var exec = require('child_process').exec;
var path = require('path');
var fs = require('fs');
var... | |
<|file_name|>_env.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2017 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Fo... | env.append(
formatting_utils.format_path_variable(
"PKG_CONFIG_PATH", paths, prepend="", separator=":" |
<|file_name|>users.js<|end_file_name|><|fim▁begin|>// @flow
import type { Action } from "../actions/types";
import type { UserState } from "../types";
const initialState: UserState = {
fetching: false,
fetched: false,
users: [],
error: null
};
export default function users(state: UserState = initialState, ac... | } |
<|file_name|>navigator-view.js<|end_file_name|><|fim▁begin|>// Copyright 2017 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.
(async function() {
TestRunner.addResult(`Tests scripts panel file selectors.\n`);
await T... | 'very_looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong_url',
false);
SourcesTestRunner.dumpNavigatorViewInAllModes(sourcesNavigatorView); |
<|file_name|>todo-input.component.spec.ts<|end_file_name|><|fim▁begin|>/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { TodoInputComponent } from './to... |
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TodoInputComponent ] |
<|file_name|>measure.py<|end_file_name|><|fim▁begin|># Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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 ... | |
<|file_name|>hops_editor.py<|end_file_name|><|fim▁begin|># ===============================================================================
# Copyright 2014 Jake Ross
#
# 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 ... | if dialog.open() == OK:
p = dialog.path |
<|file_name|>pe054-poker-hands.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding=utf-8
"""54. Poker hands
https://projecteuler.net/problem=54
In the card game poker, a hand consists of five cards and are ranked, from
lowest to highest, in the following way:
* **High Card** : Highest value card.
* **... | highest cards tie then the next highest cards are compared, and so on. |
<|file_name|>constellation.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/. */
//! The `Constellation`, Servo's Grand Central Station
... | frame_id: frame_id,
old_pipeline_id: None, |
<|file_name|>dlatrd.go<|end_file_name|><|fim▁begin|>// Copyright ©2016 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package testlapack
import (
"fmt"
"math"
"math/rand"
"testing"
"gonum.org/v1/gonum/blas"
"gonum.... | }
}
} |
<|file_name|>token_parser.py<|end_file_name|><|fim▁begin|>from tokens.andd import And
from tokens.expression import Expression
from tokens.iff import Iff
from tokens.kfalse import ConstantFalse
from tokens.ktrue import ConstantTrue
from tokens.nop import Not
from tokens.orr import Or<|fim▁hole|>
class TokenParser:
... | from tokens.then import Then
from tokens.variable import Variable
|
<|file_name|>menuShortcuts.py<|end_file_name|><|fim▁begin|># coding=utf-8
from qtpy import QtWidgets
class MenuShortcuts(QtWidgets.QWidget):
"""
Window displaying the application shortcuts
"""
def __init__(self):
QtWidgets.QWidget.__init__(self)
self.setWindowTitle('Shortcu... | lk = QtWidgets.QLabel(key)
|
<|file_name|>L-dynamic.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import pairing_heap as pheap
from copy import deepcopy,copy
import threading
import Queue
import requests
from requests.auth import HTTPDigestAuth
import json
import sys
import communication
import config
import time
import L_sprit
# グローバル変... | # 一つ上の選択のDを流用する |
<|file_name|>hello.rs<|end_file_name|><|fim▁begin|>// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at<|fim▁hole|>//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-... | // http://rust-lang.org/COPYRIGHT. |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import setuptools
setuptools.setup(
name="sirius",
version="0.5",
author="",<|fim▁hole|> description="pySIRIUS",
url="https://github.com/electronic_structure/SIRIUS",
packages=['sirius'],
install_requires=['mpi4py', 'voluptuous', 'numpy', 'h... | author_email="simon.pintarelli@cscs.ch", |
<|file_name|>player-name-check.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* Confirm new player name
*/
module.exports = (srcPath) => {
const EventUtil = require(srcPath + 'EventUtil');<|fim▁hole|> event: state => (socket, args) => {
const say = EventUtil.genSay(socket);
const write = EventUt... | return { |
<|file_name|>attempt_test.go<|end_file_name|><|fim▁begin|>package aws_test
import (
"github.com/lizdeika/goamz/aws"
. "github.com/motain/gocheck"
"time"
)
func (S) TestAttemptTiming(c *C) {
testAttempt := aws.AttemptStrategy{
Total: 0.25e9,
Delay: 0.1e9,
}
want := []time.Duration{0, 0.1e9, 0.2e9, 0.2e9}
go... | c.Assert(a.HasNext(), Equals, true) |
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp');
var del = require('del');
var plumber = require('gulp-plumber');
var replace = require('gulp-replace');
// lib
gulp.task('lib-clean', function () {
return del('./lib/*');
});
gulp.task('lib-assets', ['lib-clean'], function () {
... | });
gulp.task('dist-x', ['dist-clean'], function () {
return gulp.src(['./package.json', './README.md', './LICENSE']) |
<|file_name|>control_flow_ops.py<|end_file_name|><|fim▁begin|># 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://www.apache.org/l... | for x in op.control_inputs:
assert x._get_control_flow_context() == self, ( |
<|file_name|>p28.py<|end_file_name|><|fim▁begin|>sum = 1
curr = 3
<|fim▁hole|> sum = sum + curr #bottom left
curr = curr + inc
sum = sum + curr #top left
curr = curr + inc
sum = sum + curr #top right
curr = curr + inc + 2
print sum<|fim▁end|> | for width in xrange(3,1002,2):
inc = width - 1
sum = sum + curr #bottom right
curr = curr + inc |
<|file_name|>cygwinccompiler.py<|end_file_name|><|fim▁begin|>"""distutils.cygwinccompiler
Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows. It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in ... | shared_lib_extension = ".dll"
static_lib_format = "lib%s%s"
shared_lib_format = "%s%s" |
<|file_name|>test_lazy_canteen.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*-
from datetime import date
import re
import pytest
from pyopenmensa.feed import LazyBuilder
@pytest.fixture
def canteen():
return LazyBuilder()
def test_date_converting(canteen):
day = date(2013, 3, 7)
assert canteen... | day = date(2013, 3, 7)
canteen.addMeal(day, 'Hauptgericht', 'Gulasch')
assert canteen.hasMealsFor(day)
|
<|file_name|>information.py<|end_file_name|><|fim▁begin|>class Information:
def __init__(self, objectid, cvid, information_type_id, description):
self.objectid = objectid<|fim▁hole|> self.information_type_id = information_type_id
self.description = description
self.deleted = 0<|fim▁en... | self.cvid = cvid |
<|file_name|>issue-61936.rs<|end_file_name|><|fim▁begin|>// run-pass
trait SliceExt<T: Clone> {
fn array_windows_example<'a, const N: usize>(&'a self) -> ArrayWindowsExample<'a, T, N>;
}
impl <T: Clone> SliceExt<T> for [T] {
fn array_windows_example<'a, const N: usize>(&'a self) -> ArrayWindowsExample<'a, T, N... | |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>"""
Django settings for kore project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside th... | LANGUAGE_CODE = 'en-us'
|
<|file_name|>automlapi.ts<|end_file_name|><|fim▁begin|>// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
/... | (m1, m2) =>
new Date(m2.createTime).getTime() - new Date(m1.createTime).getTime() |
<|file_name|>index.spec.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|> });
});<|fim▁end|> | describe('nothing', () => {
it('should do nothing', () => {
// |
<|file_name|>revalidate-tests.ts<|end_file_name|><|fim▁begin|>import r = require("revalidate");
const isValidEmail = r.createValidator(
message => value => {
if (value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value)) {
return message;
}
},
'Invalid email address'
);
const isGreaterThan... |
const isNumber = r.isNumeric({
message: 'Must be a number'
}); |
<|file_name|>blend_subtract.py<|end_file_name|><|fim▁begin|>'''OpenGL extension OES.blend_subtract
This module customises the behaviour of the
OpenGL.raw.GLES1.OES.blend_subtract to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/O... | from OpenGL.raw.GLES1.OES.blend_subtract import _EXTENSION_NAME
|
<|file_name|>hr.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|>Bitrix 16.5 Business Demo = bf14f0c5bad016e66d0ed2d224b15630<|fim▁end|> | |
<|file_name|>securityappcontainer.rs<|end_file_name|><|fim▁begin|>// Copyright © 2017 winapi-rs developers
// 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.
// All... | use um::winnt::{HANDLE, LPWSTR, PSID};
extern "system" {
pub fn GetAppContainerNamedObjectPath( |
<|file_name|>makefastqdumpScript.py<|end_file_name|><|fim▁begin|>def makefastqdumpScript(sraFileNameListFileName, outputDirectory, scriptFileName):
# Make a script that will run fastq-dump on each of a list of SRA files
sraFileNameListFile = open(sraFileNameListFileName)
scriptFile = open(scriptFileName, 'w+')
... | scriptFileName = sys.argv[3]
|
<|file_name|>SectorsResource.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package ch.heigvd.amt.mvcdemo.rest.resources;
import ch.heigvd.amt.mvcdemo.model.entities.Sector;
import ch.heigvd.amt.mvcdemo.rest.dto.SectorDTO;
import ch.heigvd.amt.mvcdemo.services.dao.BusinessDomainEntityNotFoundException;
import ch.heigvd... | |
<|file_name|>StarLexer.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2015 Rochus Keller <mailto:rkeller@nmr.ch>
*
* This file is part of the CARA (Computer Aided Resonance Assignment,
* see <http://cara.nmr.ch/>) NMR Application Framework (NAF) library.
*
* The following is the license that applies to this... | }
if( d_in == 0 )
d_in = new QTextStream();
d_in->setAutoDetectUnicode(false); |
<|file_name|>param_tcp_rxbufsize_8k.py<|end_file_name|><|fim▁begin|>from trex_astf_lib.api import *
# IPV6 tunable example
#
# ipv6.src_msb
# ipv6.dst_msb
# ipv6.enable
# <|fim▁hole|>
def get_profile(self, **kwargs):
# ip generator
ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], di... |
class Prof1():
def __init__(self):
pass |
<|file_name|>BookmarkImporter.java<|end_file_name|><|fim▁begin|>package yuku.alkitab.base.util;
import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.database.sqlite.SQLiteDatabase;
import android.os.... | |
<|file_name|>mock_generator.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
import gevent
from gevent import monkey; monkey.patch_all()
import argparse
import os
import socket
import random
import math
import uuid
from netaddr import IPAddress
from pysandesh.sandesh... | |
<|file_name|>Utils.java<|end_file_name|><|fim▁begin|>package cn.hicc.information.sensorsignin.utils;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.ne... | return false;
} else {
// 建立网络数组 |
<|file_name|>app.e2e-spec.ts<|end_file_name|><|fim▁begin|>import { AppPage } from './app.po';
describe('material2 App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {<|fim▁hole|>});<|fim▁end|> | page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
}); |
<|file_name|>libvpx_vp9_encoder.cc<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property r... | }
last_updated_buf_idx.reset(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.