prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . uuid64 import *<|fim▁end|> | |
<|file_name|>interface.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""The parsers and plugins interface classes."""
import abc
import os
from plaso.lib import errors
class BaseFileEntryFilter(object):
"""File entry filter interface."""
# pylint: disable=redundant-returns-doc
@abc.abstractmethod
... | self.ParseFileEntry(parser_mediator, file_entry)
finally:
parser_mediator.PopFromParserChain()
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
#![allow(dead_code)]
#![allow(unreachable_code)]
#![allow(unused... | pub use flow::BoxTreeRoot; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
from setuptools import find_packages, setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fp:
README = fp.read()
with open(os.path.join(here, 'VERSION')) as ver... | # See https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable', |
<|file_name|>navleft.js<|end_file_name|><|fim▁begin|>/*分页JS*/
var rsss = false;
$(function () {
$(".leftNav_side").css("min-height", $(".leftNav_side").height());
$(window).resize(function () {
$(".leftNav_side").height($(window).height());
}).trigger("resize");//左侧菜单高度自适应,但是保留内容最小高度
//... | pages[pages.length] = '<a class="next" href="#">下一页</a><a class="last" href="#">尾页</a>';
|
<|file_name|>probe.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/... | |
<|file_name|>svc-system-messages-spec.js<|end_file_name|><|fim▁begin|>/*jshint expr:true */
describe("Services: Core System Messages", function() {
<|fim▁hole|>
beforeEach(module(function ($provide) {
//stub services
$provide.service("$q", function() {return Q;});
$provide.value("userState", {
isRi... | beforeEach(module("risevision.core.systemmessages")); |
<|file_name|>GitParser.py<|end_file_name|><|fim▁begin|># Copyright (C) 2007 LibreSoft
#
# 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 2 of the License, or
# (at your option) any... | |
<|file_name|>tokeniser_tests.py<|end_file_name|><|fim▁begin|>from hamcrest import assert_that, contains, has_properties
from mammoth.styles.parser.tokeniser import tokenise
def test_unknown_tokens_are_tokenised():
assert_tokens("~", is_token("unknown", "~"))
def test_empty_string_is_tokenised_to_end_of_file_to... |
def test_close_square_brackets_are_tokenised():
assert_tokens("]]", is_token("symbol", "]"), is_token("symbol", "]")) |
<|file_name|>series.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import
import copy
import datetime
from math import ceil
from flask import jsonify
from flask import request
from flask_restplus import inputs
from sqlalchemy.orm.exc import NoResultFound
from flexget.api ... | 'message': e.value
}, 502
|
<|file_name|>interface.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package networkmanageriface provides an interface to enable mocking the AWS Network Manager service client
// for testing your code.
//
// It is important to note that this interface will have... | // // Define a mock struct to be used in your unit tests of myFunc.
// type mockNetworkManagerClient struct { |
<|file_name|>DownloadRemoteFileDialog.cpp<|end_file_name|><|fim▁begin|>/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2017 UniPro <ugene@unipro.ru>
* http://ugene.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licens... | * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
<|file_name|>jquery.mobile.js<|end_file_name|><|fim▁begin|>//>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
//>>group: exclude
define([
"require",
"./widgets/loader",
"./events/navigate",
"./navigation/path",
"./navigation/history",
"./navigation/navigator",
"./navigation/method",
"./transitions/h... | "./widgets/forms/autogrow",
"./widgets/forms/select.custom",
"./widgets/forms/select", |
<|file_name|>davfs.py<|end_file_name|><|fim▁begin|>'''
Datastore via remote webdav connection
'''
from __future__ import unicode_literals
from future import standard_library
standard_library.install_aliases()
import os
import tarfile
import logging
from fs.contrib.davfs import DAVFS
from urllib.parse import urlparse
f... | obj = self.store.dav_fs.open(self.tarfile_path, 'rb')
with closing(tarfile.open(fileobj=obj)) as data_archive:
f = data_archive.extractfile(self.path)
if max_length: |
<|file_name|>helpers.js<|end_file_name|><|fim▁begin|>'use strict'
const _ = require('lodash')
module.exports = {<|fim▁hole|> const qs = {}
_.forEach(url.split('?').pop().split('&'), s => {
if (!s) return
const kv = s.split('=')
if (kv[0]) {
qs[kv[0]] = decodeURIComponent(kv[1])
... | getQueryString(url) { |
<|file_name|>IndexedTextFile.cpp<|end_file_name|><|fim▁begin|>/*
* This file is part of Dune Legacy.
*
* Dune Legacy 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 2 of the License, or... | if(SDL_RWseek(RWop,0,SEEK_SET) != 0) { |
<|file_name|>MantidPlotProjectSerialiseTest.py<|end_file_name|><|fim▁begin|>"""
Test of basic project saving and loading
"""
import mantidplottests
from mantidplottests import *
import shutil
import numpy as np
import re
from PyQt4 import QtGui, QtCore
class MantidPlotProjectSerialiseTest(unittest.TestCase):
def... | |
<|file_name|>trumbowyg.fontfamily.js<|end_file_name|><|fim▁begin|>(function ($) {
'use strict';
$.extend(true, $.trumbowyg, {
langs: {
// jshint camelcase:false
en: {
fontFamily: 'Font'
},
es: {
fontFamily: 'Fuente'
... | fontfamily: {
init: function (trumbowyg) {
trumbowyg.o.plugins.fontfamily = $.extend(true, {},
defaultOptions, |
<|file_name|>0027_auto_20150220_0305.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('statmaps', '0026_populate_cogatlas'),
]
operations = [
... | field=models.CharField(help_text=b'Brain imaging procedure that was used to acquire the data.', max_length=200, verbose_name=b'Modality & Acquisition Type', choices=[(b'fMRI-BOLD', b'fMRI-BOLD'), (b'fMRI-CBF', b'fMRI-CBF'), (b'fMRI-CBV', b'fMRI-CBV'), (b'Diffusion MRI', b'Diffusion MRI'), (b'Structural MRI'... |
<|file_name|>header.js<|end_file_name|><|fim▁begin|>'use strict';
// Disable eval and Buffer.
window.eval = global.eval = global.Buffer = function() {
throw new Error("Can't use eval and Buffer.");
}
const Electron = require('electron')
const IpcRenderer = Electron.ipcRenderer;
var Urlin = null; // element of ... | Urlin.blur();
IpcRenderer.sendToHost('url-input', Urlin.value);
}, false);
}, false); |
<|file_name|>CylinderZoneEditWidget.hpp<|end_file_name|><|fim▁begin|>/*
Copyright_License {
XCSoar Glide Computer - http://www.xcsoar.org/
Copyright (C) 2000-2013 The XCSoar Project
A detailed list of copyright holders can be found in the file "AUTHORS".
This program is free software; you can redistribute i... |
public:
/* virtual methods from class Widget */
virtual void Prepare(ContainerWindow &parent, |
<|file_name|>tplink.py<|end_file_name|><|fim▁begin|>"""
Support for TP-Link routers.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.tplink/
"""
import base64
from datetime import datetime
import hashlib
import logging
import re
from aioht... | "An unknown error happened while fetching data")
return False |
<|file_name|>16270000.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|>jsonp({"cep":"16270000","cidade":"Glic\u00e9rio","uf":"SP","estado":"S\u00e3o Paulo"});<|fim▁end|> | |
<|file_name|>LabeledSelect.tsx<|end_file_name|><|fim▁begin|>//
// LESERKRITIKK v2 (aka Reader Critics)
// Copyright (C) 2017 DB Medialab/Aller Media AS, Oslo, Norway
// https://github.com/dbmedialab/reader-critics/
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the G... | import * as React from 'react';
import { Label } from 'admin/components/website/additionalComponents/Label';
export interface ILabeledSelect { |
<|file_name|>websocket_loader.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::connector::create_ssl_connector_builder;
... | use ipc_channel::ipc::{IpcReceiver, IpcSender};
use net_traits::request::{RequestInit, RequestMode};
use net_traits::{CookieSource, MessageData};
use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(plugin_registrar, quote, rustc_private, box_patterns)]
extern crate rustc_plugin;
#[macro_use] pub extern crate syntax;
extern crate rustc_errors as errors;
extern crate peg;
use syntax::ast;
use syntax::codemap;
use syntax::codemap::FileName;
use syntax::ex... | MacEager::items(SmallVector::one(module)) |
<|file_name|>alex.py<|end_file_name|><|fim▁begin|>import chainer
import chainer.functions as F
import chainer.links as L
<|fim▁hole|>class Alex(chainer.Chain):
"""Single-GPU AlexNet without partition toward the channel axis."""
def __init__(self, n_class=1000, threshold=0.5, pt_func=None):
self.thres... | |
<|file_name|>profile.ts<|end_file_name|><|fim▁begin|>import {Observable} from 'rxjs/Observable';
import {
GraphApiObject,
GraphApiObjectType,
DUMMY_GRAPH_API_OBJECT_TYPE
} from './graph-api-object';
import {ConfService} from './conf.service';
import {GraphApiResponse} from './graph-api-response';
import {P... | |
<|file_name|>dbus.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"github.com/coreos/go-systemd/dbus"
)
type dbusConnectioner interface {
RestartUnit(string, string, chan<- string) (int, error)
}
var newDBusConnection = func() (dbusConnectioner, error) {
return dbus.New()
}
func restartNetworkD(max... | return nil
} |
<|file_name|>agent3.py<|end_file_name|><|fim▁begin|>import random
from datetime import datetime
from multiprocessing import Pool
import numpy as np
from scipy.optimize import minimize
def worker_func(args):
self = args[0]
m = args[1]
k = args[2]
r = args[3]
return (self.eval_func(m, k, r) -
... | return result
|
<|file_name|>controllers.js<|end_file_name|><|fim▁begin|>(function () {
'use strict';
/* Controllers */
var pollsControllers = angular.module('pollsControllers', []);
var author = 'Patrick Nicholls';
pollsControllers.controller('PollListCtrl', ['$scope', '$http',
function ($scope, $ht... |
$http.get(base_url + "polls/" + $scope.pollId) |
<|file_name|>runner.js<|end_file_name|><|fim▁begin|>"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.pr... | |
<|file_name|>admin_navigation.js<|end_file_name|><|fim▁begin|>/*
Copyright (C) 2016 PencilBlue, LLC
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 ... | * @private
* @static |
<|file_name|>app.po.ts<|end_file_name|><|fim▁begin|>import { browser, by, element } from 'protractor';
export class GphotoPage {
navigateTo() {
return browser.get('/');
}
getParagraphText() {
return element(by.css('app-root h1')).getText();
}<|fim▁hole|><|fim▁end|> | } |
<|file_name|>language.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# enzyme - Video metadata parser
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
# Copyright 2003-2006 Dirk Meyer <dischi@freevo.org>
#
# This file is part of enzyme.
#
# enzyme is free software; you can redistribute it and/or modi... | #
# enzyme is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
<|file_name|>backdrop.ts<|end_file_name|><|fim▁begin|>import {Animate} from "../../core/util/animate";
import {ElementRef, ViewEncapsulation, Component, Input, Output, EventEmitter} from "angular2/core";
import {DOM} from "angular2/src/platform/dom/dom_adapter";
/**
* An overlay for content on the page.
* Can option... | |
<|file_name|>assignment.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react';
import {SvgIconProps} from '../../SvgIcon';<|fim▁hole|><|fim▁end|> |
export default function Assignment(props: SvgIconProps): React.ReactElement<SvgIconProps>; |
<|file_name|>openrc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import os<|fim▁hole|># With the addition of Keystone, to use an openstack cloud you should
# authenticate against keystone, which returns a **Token** and **Service
# Catalog**. The catalog contains the endpoint for all services the
# user/tenant ha... | |
<|file_name|>beam_centre_model_test.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function)
import unittest
import sys
from sans.gui_logic.models.beam_centre_model import BeamCentreModel
from sans.common.enums import FindDirectionEnum, SANSInstrument
if sys.version_info.majo... | self.SANSCentreFinder = mock.MagicMock(return_value = self.centre_finder_instance) |
<|file_name|>muhkuh_split_testdescription.cpp<|end_file_name|><|fim▁begin|><|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 2 of the License, or *
*... | /***************************************************************************
* Copyright (C) 2011 by Christoph Thelen *
* doc_bacardi@users.sourceforge.net *
* * |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
Microformats2 is a general way to mark up any HTML document with
classes and propeties. This library parses structured data from
a microformatted HTML document and returns a well-formed JSON
dictionary.
"""
from .version import __version__
from .parser import P... |
__all__ = ['Parser', 'parse', 'get_url', '__version__'] |
<|file_name|>TauPump.cpp<|end_file_name|><|fim▁begin|>#ifndef _pymoose_TauPump_cpp
#define _pymoose_TauPump_cpp
#include "TauPump.h"
using namespace pymoose;
const std::string TauPump::className_ = "TauPump";
TauPump::TauPump(std::string className, std::string objectName, Id parentId):Neutral(className, objectName, par... | TauPump::TauPump(std::string name, Id parentId):Neutral(className_, name, parentId){}
TauPump::TauPump(std::string name, PyMooseBase& parent):Neutral(className_, name, parent){}
TauPump::TauPump(const TauPump& src, std::string objectName, PyMooseBase& parent):Neutral(src, objectName, parent){} |
<|file_name|>sepiasearch.py<|end_file_name|><|fim▁begin|># SPDX-License-Identifier: AGPL-3.0-or-later
"""
SepiaSearch (Videos)
"""
from json import loads
from dateutil import parser, relativedelta
from urllib.parse import urlencode
from datetime import datetime
# about
about = {
"website": 'https://sepiasearch.o... | |
<|file_name|>PairwiseAlignment.cc<|end_file_name|><|fim▁begin|>/* Copyright (c) 2006
Colin Dewey (University of Wisconsin-Madison)
cdewey@biostat.wisc.edu
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... | --start;
--end; |
<|file_name|>EntityBullet.java<|end_file_name|><|fim▁begin|>package com.exilegl.ld34.entity.enemy;
import java.util.Random;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphi... | public Vector2 getOffset(){ |
<|file_name|>capitalize_spec.js<|end_file_name|><|fim▁begin|>const {capitalize} = require('../capitalize');
const {expect} = require('chai');
describe('capitalize() Capitalizes the first letter of a string', function() {
it('should capitalize the first letter of a string', function(){
expect(capitalize("github")... | })
}) |
<|file_name|>NavDrawerItem.java<|end_file_name|><|fim▁begin|>/* Android IMSI-Catcher Detector | (c) AIMSICD Privacy Project
* -----------------------------------------------------------
* LICENSE: http://git.io/vki47 | TERMS: http://git.io/vki4o
* -----------------------------------------------------------
*/
pac... | |
<|file_name|>entrypoint.go<|end_file_name|><|fim▁begin|>package mocks
import (
cli "github.com/stackanetes/kubernetes-entrypoint/client"
)
type MockEntrypoint struct {
client cli.ClientInterface
namespace string
}
func (m MockEntrypoint) Resolve() {
}
func (m MockEntrypoint) Client() (client cli.ClientInterfa... | return m.namespace |
<|file_name|>constraints.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... | meta_count += 1
meta_size += len(key) + len(value)
if len(key) > MAX_META_NAME_LENGTH:
return HTTPBadRequest( |
<|file_name|>test_frontend.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.api import Environment
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT
from datetime import date, timedelta
import odoo.tests
class TestUi(odoo.te... | |
<|file_name|>rest_helpers.py<|end_file_name|><|fim▁begin|># Copyright 2021 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
#
# Un... | return _flatten_value(obj, key_path=key_path) |
<|file_name|>msp.py<|end_file_name|><|fim▁begin|>import sys
import cv2
import helper as hp
class MSP():
name = "MSP"
def __init__(self):
self.__patterns_num = []
self.__patterns_sym = []
self.__labels_num = []
self.__labels_sym = []
msp_num, msp_sym = "msp/num", "msp/... | self.__labels_num = [hp.get_test(path, "num")[0] for path in paths]
|
<|file_name|>reed_5_2_5.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions o... |
import unittest
|
<|file_name|>1Prelude.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012, Event Store LLP
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// Redistributions of source code must ret... | |
<|file_name|>index_mem.go<|end_file_name|><|fim▁begin|>package fileindex
import (
"crypto/sha1"
"fmt"
log "github.com/sirupsen/logrus"
"os"
"path"
"path/filepath"
"time"
)
func NewMemIndex(root string, id string, filter Filter) (Index, error) {
rootPath := filepath.Clean(root)
fi, err := os.Stat(rootPath)
i... | err = i.updateChildren(d, dir, dirEntry.Id()) |
<|file_name|>merge.js<|end_file_name|><|fim▁begin|>// Ember.merge only supports 2 arguments
// Ember.assign isn't available in older Embers
// Ember.$.extend isn't available in Fastboot
import Ember from 'ember';
export default function(...objects) {
let merged = {};
objects.forEach(obj => {<|fim▁hole|> merged... | |
<|file_name|>test_conf.py<|end_file_name|><|fim▁begin|># Case Conductor is a Test Case Management system.
# Copyright (C) 2011 uTest Inc.
#
# This file is part of Case Conductor.
#
# Case Conductor is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... |
settings = FakeSettings()
with patch("ccui.core.conf.settings", settings):
with self.assertRaises(ImproperlyConfigured): |
<|file_name|>play.js<|end_file_name|><|fim▁begin|><|fim▁hole|>game.PlayScreen = me.ScreenObject.extend({
/**
* action to perform on state change
*/
onResetEvent: function() {
// reset the score
game.data.score = 0;
me.levelDirector.loadLevel("level01");
this.resetPlayer(0, 420);
// the level i'm going ... | |
<|file_name|>snapshot.go<|end_file_name|><|fim▁begin|>/* -------------------------------------------------------------------------- */
/* Copyright 2002-2020, OpenNebula Project, OpenNebula Systems */
/* */
/* Licensed under the A... | CurrentBase int `xml:"CURRENT_BASE"`
NextSnapshot int `xml:"NEXT_SNAPSHOT"` |
<|file_name|>fieldLabel.tsx<|end_file_name|><|fim▁begin|><|fim▁hole|>
import space from 'app/styles/space';
const shouldForwardProp = p => p !== 'disabled' && isPropValid(p);
const FieldLabel = styled('div', {shouldForwardProp})<{disabled?: boolean}>`
color: ${p => (!p.disabled ? p.theme.textColor : p.theme.disable... | import isPropValid from '@emotion/is-prop-valid';
import styled from '@emotion/styled'; |
<|file_name|>UndefinedSampleLengthException.java<|end_file_name|><|fim▁begin|>package dataset;
<|fim▁hole|> private static final long serialVersionUID = 1L;
}<|fim▁end|> |
public class UndefinedSampleLengthException extends Exception { |
<|file_name|>vistoolspline.cpp<|end_file_name|><|fim▁begin|>/************************************************************************
**
** @file vistoolspline.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 18 8, 2014
**
** @brief
** @copyright
** This source code is part of the Val... | controlPoints() |
<|file_name|>script_msg.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 AnimationState;
use CompositorEvent;
use DocumentState... | /// Get the browsing context id for a given pipeline.
GetBrowsingContextId(PipelineId, IpcSender<Option<BrowsingContextId>>),
/// Get the parent info for a given pipeline.
GetParentInfo(PipelineId, IpcSender<Option<(PipelineId, FrameType)>>), |
<|file_name|>word_break.cpp<|end_file_name|><|fim▁begin|>#include "common_header.h"
namespace {
using ArrayType = std::vector<std::string>;
using DictType = std::unordered_set<std::string_view>;
/** Word Break Problem
*
* @reference Word Break Problem | DP-32
* https://www.geeksforgeeks.org/word-b... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod actor_state;
mod character;
mod openable;
mod respawnable;
mod stats_item;
pub use actor_state::*;<|fim▁hole|>pub use openable::*;
pub use respawnable::*;
pub use stats_item::*;<|fim▁end|> | pub use character::*; |
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>#
# (c) Simon Marlow 2002
#
import sys
import os
import string
import getopt
import platform
import time
import re
from testutil import *
from testglobals import *
# Readline sometimes spews out ANSI escapes for some values of TERM,
# which result in test failur... | config.compile_ways = filter(neq(arg), config.compile_ways)
if opt == '--threads': |
<|file_name|>HTMLAnchorElement.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2000 Simon Hausmann <hausmann@kde.org>
* Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
* ... | {
// Skip the supportsFocus check in HTMLElement.
return Element::tabIndex(); |
<|file_name|>RS485.java<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------------
| RXTX License v 2.1 - LGPL v 2.1 + Linking Over Controlled Interface.
| RXTX is a native interface to serial ports in java.
| Copyright 1997-2007 by Trent Jarvi tjarvi@qbang.org and ot... | | case of linking over a controlled interface. The intent is to add a |
<|file_name|>node_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The go-krypton Authors
// This file is part of the go-krypton library.
//
// The go-krypton library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free ... | |
<|file_name|>ColorButton.cpp<|end_file_name|><|fim▁begin|>/*
===========================================================================
Doom 3 GPL Source Code
Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
Doom 3 Source Co... | |
<|file_name|>hostfile_windows.go<|end_file_name|><|fim▁begin|>package main
import (
"os"
)
var (
HOSTFILE = os.Getenv("SystemRoot")+"/system32/drivers/etc/hosts"<|fim▁hole|><|fim▁end|> | FLUSH_CMD []string = nil
) |
<|file_name|>jQuery-provider.js<|end_file_name|><|fim▁begin|>///<reference src="js/tempus-dominus"/>
/*global $ */
tempusDominus.jQueryInterface = function (option, argument) {
if (this.length === 1) {
return tempusDominus.jQueryHandleThis(this, option, argument);
}
// "this" is jquery here
return this.eac... | |
<|file_name|>Display.java<|end_file_name|><|fim▁begin|>package mrdev023.opengl;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.system.MemoryUtil.*;
import java.awt.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.openg... | public static void create(String title,int width,int height,int major,int minor){
if ( !glfwInit() )
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
The MIT License
Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel
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 ... | |
<|file_name|>handler.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free... | |
<|file_name|>missing-macro-use.rs<|end_file_name|><|fim▁begin|>// aux-build:two_macros.rs
extern crate two_macros;
pub fn main() {
macro_two!();
//~^ ERROR cannot find macro `macro_two` in this scope<|fim▁hole|>}<|fim▁end|> | |
<|file_name|>type_ellipsis_test.go<|end_file_name|><|fim▁begin|>package acceptance_test
import (
. "github.com/mokiat/gostub/acceptance"
"github.com/mokiat/gostub/acceptance/acceptance_stubs"
"github.com/mokiat/gostub/acceptance/external/external_dup"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var ... | |
<|file_name|>htmlselectelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::attr::Attr;
use dom::attr::AttrHelpers;
us... | let node: JSRef<Node> = NodeCast::from_ref(*self);
if node.ancestors().any(|ancestor| ancestor.root().r().is_htmlfieldsetelement()) {
node.check_ancestors_disabled_state_for_form_control(); |
<|file_name|>ChargeServiceTest.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2019 Intuit
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ... |
Refund refundRequest = new Refund.Builder()
.amount(expectedRefund.getAmount()) |
<|file_name|>validations.ts<|end_file_name|><|fim▁begin|>/* global getAttrs, setAttrs, getSectionIDs, generateRowID, on, removeRepeatingRow, _, getTranslationByKey */
/**
* Validations
*/
const validateTab = () => {
getAttrs(["tab", "npc"], v => {
if (v.tab === "character" && v.npc === "1") setAttrs({
... | type = v.homebrew_skill_list,
setting: {[key: string]: string} = {}; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-<|fim▁hole|>from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
import versioneer
__author__ = 'Chia-Jung, Yang'
__email__ = 'jeroyang@gmail... | |
<|file_name|>core_json.js<|end_file_name|><|fim▁begin|>/*
@author Zakai Hamilton
@component CoreJson
*/
screens.core.json = function CoreJson(me, { core, storage }) {
me.init = function () {
if (me.platform === "server") {
me.request = require("request");
}
};
me.loadCom... | if (error) {
resolve({ error });
} |
<|file_name|>viewsets.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2017, Digital Reasoning
#
# 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.o... | raise StackdioConfigException('LDAP is enabled, but django_auth_ldap isn\'t '
'installed. Please install django_auth_ldap') |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>var mySteal = require('@steal');
if (typeof window !== "undefined" && window.assert) {<|fim▁hole|> done();
} else {
console.log("Systems", mySteal.loader == steal.loader);
}<|fim▁end|> | assert.ok(mySteal.loader == steal.loader, "The steal's loader is the loader"); |
<|file_name|>ImportProcessFactory.java<|end_file_name|><|fim▁begin|>package org.adempiere.impexp.impl;
/*
* #%L
* de.metas.adempiere.adempiere.base
* %%
* Copyright (C) 2015 metas GmbH
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Lice... | Check.assumeNotNull(asyncImportProcessBuilderSupplier, "A supplier for {} shall be registered first", IAsyncImportProcessBuilder.class);
return asyncImportProcessBuilderSupplier.get();
}
|
<|file_name|>write_rss_xml.py<|end_file_name|><|fim▁begin|>import os
from lxml import etree
# write_rss_xml writes name and date data for podcast RSS feeds to XML files
# contained in the relative path ./feeds. It is currently assumed that each
# podcast will have its data stored in a separate file.
def write_rss_xml(... | |
<|file_name|>ResourcePool.java<|end_file_name|><|fim▁begin|>package org.fluentjava.iwant.plannerapi;
public interface ResourcePool {
boolean hasFreeResources();
Resource acquire();
void release(Resource resource);
<|fim▁hole|>}<|fim▁end|> | |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = function (grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Automatically load required grunt tasks
require('jit-grunt')(grunt, {
lockfile: 'grunt-loc... | grunt.task.run([ |
<|file_name|>system_linux.go<|end_file_name|><|fim▁begin|>package color
func init() {
KeyboardFocus = RGB(240, 119, 70)
SelectedTextBackground = KeyboardFocus<|fim▁hole|><|fim▁end|> | } |
<|file_name|>stringLiteralTypesInUnionTypes03.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>// @declaration: true
type T = number | "foo" | "bar";
var x: "foo" | "bar" | number;
var y: T = undefined;
if (x === "foo") {
let a = x;
}
else if (x !== "bar") {
let b = x || y;
}
else {
let c = x;
... | |
<|file_name|>ReactDOMFiberAsync-test.js<|end_file_name|><|fim▁begin|>var React = require('react');
var ReactFeatureFlags = require('ReactFeatureFlags');
var ReactDOM;
var AsyncComponent = React.unstable_AsyncComponent;
describe('ReactDOMFiberAsync', () => {
var container;
beforeEach(() => {
container = docu... | |
<|file_name|>ramen.js<|end_file_name|><|fim▁begin|>"use strict";
var i = 180; //3分固定
function count(){
if(i <= 0){<|fim▁hole|> i -= 1;
}
window.onload = function(){
setInterval("count()", 1000);
};<|fim▁end|> | document.getElementById("output").innerHTML = "完成!";
}else{
document.getElementById("output").innerHTML = i + "s";
} |
<|file_name|>test_modelfield.py<|end_file_name|><|fim▁begin|>from django import forms
from example.models import OneUrlModel, ManyUrlsModel
def test_one_url(db):
class F(forms.ModelForm):
class Meta:
model = OneUrlModel
fields = '__all__'
form = F({'url': 'ya.RU'})
instan... | class F(forms.ModelForm):
class Meta:
model = ManyUrlsModel
fields = '__all__' |
<|file_name|>ExplicitConvection.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Author: Martin Sandve Alnes
# Date: 2008-10-03
#
from ufl import (Coefficient, TestFunction, TrialFunction, VectorElement, dot,
dx, grad, triangle)
element = VectorElement("Lagrange", triangle, 1)
u = TrialFunction(element)... | # |
<|file_name|>download.go<|end_file_name|><|fim▁begin|>// Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repo
import (
"fmt"
"io"
"path"
"... | }
defer func() {
if err = dataRc.Close(); err != nil {
log.Error("ServeBlob: Close: %v", err) |
<|file_name|>test_artificial_128_Difference_Lag1Trend_7_12_20.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds
import tests.artificial.process_artificial_dataset as art<|fim▁hole|>art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 7, transform = "Difference"... | |
<|file_name|>database.js<|end_file_name|><|fim▁begin|>/**
* Created by Samuel Schmid on 23.03.14.
*
* Class for Database Handling
*
* Containing
* - App Config
* - Database Information
*
* @type {Database}
*/
module.exports = Database;
Array.prototype.contains = function(obj) {
var i = this.length;
w... | grunt.log.write("cannot create schemes for database " + this.db.name + ", because there we can't use the provider "+this.db.provider+" for it.");
}
} else { |
<|file_name|>unauthenticated.js<|end_file_name|><|fim▁begin|>/* The all pages that do not require authentication */
function UnAuthenticatedHandler() {
"use strict";
this.displayAboutPage = function(req, res, next) {
return res.render("about");
};
this.displayContactPage = function(req, res, n... | |
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import subprocess
import os
import errno
def download_file(url, local_fname=None, force_write=False):
# requests is not default installed
import requests
if local_fname is None:
local_fname = url.split('/')[-1]
if not force_write and os.path.exists(local_f... |
def get_gpus():
""" |
<|file_name|>comp-1144.component.spec.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { async, ComponentFixture, TestBed } fr... | fixture = TestBed.createComponent(Comp1144Component);
component = fixture.componentInstance;
fixture.detectChanges(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.