prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>jquery.fileupload.js<|end_file_name|><|fim▁begin|>/*
* jQuery File Upload Plugin 5.32.0
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*jslint nomen: true, ... | };
}, |
<|file_name|>keys_test.py<|end_file_name|><|fim▁begin|># coding=utf-8
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You u... | from __future__ import print_function |
<|file_name|>Pattern.ts<|end_file_name|><|fim▁begin|>import { Loop, LoopOptions } from "./Loop";
import { PatternGenerator, PatternName } from "./PatternGenerator";
import { ToneEventCallback } from "./ToneEvent";
import { optionsFromArguments } from "../core/util/Defaults";
import { Seconds } from "../core/type/Units"... | * The current value
*/
private _value?: ValueType; |
<|file_name|>SqlViewView.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under t... | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and |
<|file_name|>separator.py<|end_file_name|><|fim▁begin|>from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
import wx
from .common import update_class
class Separator(wx.StaticLine):
def __init__(self, parent):
<|fim▁hole|> wx.Defau... | wx.StaticLine.__init__(self, parent.get_container(), -1,
|
<|file_name|>simpleStreaming.js<|end_file_name|><|fim▁begin|>//=====================================================================
// This sample demonstrates using TeslaJS
//
// https://github.com/mseminatore/TeslaJS
//
// Copyright (c) 2016 Mark Seminatore
//
// Refer to included LICENSE file for usage rights and r... | .option('-i, --index <n>', 'vehicle index (first car by default)', parseInt) |
<|file_name|>procurement.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
class ProcurementOrder(models.Model):
_inherit = 'procurement.order'
task_id = fields.Many2one('project.task', '... | # find the project corresponding to the analytic account of the sales order
account = self.sale_line_id.order_id.project_id
if not account: |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::env::args;
use std::collections::HashMap;
trait Validator {
fn increment(&mut self) -> bool;
fn has_sequence(&self) -> bool;
fn no_forbidden_chars(&self) -> bool;
fn has_two_doubles(&self) -> bool;
}
impl Validator for Vec<u8> {
fn in... | let l = ('l' as u8) - ('a' as u8);
!(self.contains(&i) || self.contains(&o) || self.contains(&l))
} |
<|file_name|>BalancedBinaryTree.py<|end_file_name|><|fim▁begin|>__source__ = 'https://leetcode.com/problems/balanced-binary-tree/#/description'
# https://github.com/kamyu104/LeetCode/blob/master/Python/balanced-binary-tree.py
# Time: O(n)
# Space: O(h), h is height of binary tree
# divide and conquer
#
# Description: ... | |
<|file_name|>neutron_plugin_base_v2.py<|end_file_name|><|fim▁begin|># Copyright 2011 VMware, 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
#
# h... | |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>var should=require('should');
var toast=('../toast');
describe('test/toast.js', function () {
it('toast', function () {<|fim▁hole|><|fim▁end|> | toast.should.equal(toast);
});
}); |
<|file_name|>TypeFilterConfigTests.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2008-2011 the original author or authors.
*<|fim▁hole|> * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
... | |
<|file_name|>lang_utils.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC 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
*/<|fim▁hole|>
export function instantiateType(type: Function, pa... |
export function getTypeOf(instance: any /** TODO #9100 */) {
return instance.constructor;
} |
<|file_name|>Multibound1.java<|end_file_name|><|fim▁begin|>/*
* @test /nodynamiccopyright/
* @bug 4482403
* @summary javac failed to check second bound
* @author gafter
*
* @compile/fail/ref=Multibound1.out -XDrawDiagnostics Multibound1.java
*/
package Multibound1;
interface A {}
interface B {}
class C<T exte... | class E extends C<D> {} |
<|file_name|>styling_title.py<|end_file_name|><|fim▁begin|>from bokeh.plotting import figure, output_file, show
output_file("title.html")<|fim▁hole|>
p = figure(width=400, height=400, title="Some Title")
p.title.text_color = "olive"
p.title.text_font = "times"
p.title.text_font_style = "italic"
p.circle([1, 2, 3, 4, ... | |
<|file_name|>filter-inline-item.component.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> Component
} from '@angular/core';
@Component({
selector: 'sky-filter-inline-item',
styleUrls: ['./filter-inline-item.component.scss'],
templateUrl: './filter-inline-item.component.html'
})
export class SkyFilterInlineItemComp... | import { |
<|file_name|>coverage.py<|end_file_name|><|fim▁begin|># This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# 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 Li... | except ImportError:
# missing Shapely is handled by require_geom_support |
<|file_name|>eezyReport.py<|end_file_name|><|fim▁begin|>from lxml import etree
import os
from BeautifulSoup import BeautifulSoup
from itertools import chain
def replacements(text):
text = text.replace('>', '\\textgreater ')
text = text.replace('<', '\\textless ')
text = text.replace('&', '\&')
te... | retTxt += 'Table \\ref{' + content.text +'}'
elif content.name == 'table': |
<|file_name|>admin.js<|end_file_name|><|fim▁begin|>var config = require('../config'),
_ = require('underscore'),
path = require('path'),
when = require('when'),
api = require('../api'),
mailer = require('../mail'),
errors = require('..... | var token = req.params.token,
newPassword = req.param('newpassword'),
ne2Password = req.param('ne2password');
|
<|file_name|>util.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC 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 {syntaxError} from '@angular/compiler';
import * as path fro... |
// Note: This is an internal property in TypeScript. Use it only for assertions and tests.
export function tsStructureIsReused(program: ts.Program): StructureIsReused { |
<|file_name|>cleanup.py<|end_file_name|><|fim▁begin|>"""Runs the Treadmill container cleanup job.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import click
from treadmill import appenv
from treadmill import cl... | from treadmill import utils
|
<|file_name|>HeadData.tsx<|end_file_name|><|fim▁begin|>/* Copyright (C) 2019, 2020 Monomax Software Pty Ltd<|fim▁hole|> * it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Dnote is... | *
* This file is part of Dnote.
*
* Dnote is free software: you can redistribute it and/or modify |
<|file_name|>RoundingMethod.java<|end_file_name|><|fim▁begin|>package xde.lincore.mcscript.math;
public enum RoundingMethod {
Round, Floor, Ceil, CastInt;
public int round(final double value) {
switch (this) {
case Round:
return (int) Math.round(value);
case Floor:
return (int) Math.floor(value);
... | }
}
|
<|file_name|>override_autoescaped.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
templatetricks.override_autoescaped
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Override which templates are autoescaped
http://flask.pocoo.org/snippets/41/
"""
import os
import sys
sys.path.insert(0, os.path.dirname... |
app = JHtmlEscapingFlask(__name__) |
<|file_name|>test_analysis_signal.py<|end_file_name|><|fim▁begin|>'''Test the analysis.signal module.'''
from __future__ import absolute_import, print_function, division
import pytest
import numpy as np
import gridcells.analysis.signal as asignal
from gridcells.analysis.signal import (local_extrema, local_maxima,
... | class TestAutoCorrelation(object):
'''Test the acorr function.''' |
<|file_name|>types_swagger_doc_generated.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses... | return map_CertificateSigningRequestCondition
}
var map_CertificateSigningRequestSpec = map[string]string{ |
<|file_name|>Streamer1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the<|fim▁hole|># permit persons to whom the Software is furnished to do so, subject to
# ... | # "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright 2016 ARC Centre of Excellence for Climate Systems Science
author: Scott Wales <scott.wales@unimelb.edu.au>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lice... | Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>a361.js<|end_file_name|><|fim▁begin|>//~ name a361
<|fim▁hole|>alert(a361);
//~ component a362.js<|fim▁end|> | |
<|file_name|>signus.rs<|end_file_name|><|fim▁begin|>extern crate libc;
use std::sync::mpsc::channel;
use std::ffi::CString;
use indy::api::signus::{
indy_sign,
indy_create_and_store_my_did,
indy_store_their_did,
indy_replace_keys,
indy_verify_signature,
indy_encrypt,
indy_decrypt
};
use in... | use utils::timeout::TimeoutUtils;
pub struct SignusUtils {}
|
<|file_name|>manageiq_alerts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 Red Hat Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
... | # an alert with this description doesn't exist yet, let's create it |
<|file_name|>HMMPowerSupplyMap.py<|end_file_name|><|fim▁begin|>'''
HMMPowerSupplyMap
'''
from Products.DataCollector.plugins.CollectorPlugin import (
SnmpPlugin, GetTableMap, GetMap
)
from DeviceDefine import HMMSTATUS, HMMPRESENCE, HMMPOWERMODE, HMMLOCATION
class HMMPowerSupplyMap(SnmpPlugin):
... | '''
|
<|file_name|>GetNetworkProfileRequestMarshaller.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017-2022 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 Li... | private static final MarshallingInfo<String> NETWORKPROFILEARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
.marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("NetworkProfileArn").build();
private static final GetNetworkProfileRequestMarshaller instance = new GetNetworkPr... |
<|file_name|>tree.js<|end_file_name|><|fim▁begin|>// ========================================================================
// SproutCore -- JavaScript Application Framework
// Copyright ©2006-2011, Strobe Inc. and contributors.
// Portions copyright ©2008 Apple Inc. All rights reserved.
// =========================... | determine the expansion state of the item. The default is
"treeItemIsExpanded"
|
<|file_name|>create_trace_graphviz.py<|end_file_name|><|fim▁begin|>"""
Read in the output from the trace-inputlocator script and create a GraphViz file.
Pass as input the path to the yaml output of the trace-inputlocator script via config file.
The output is written to the trace-inputlocator location.
WHY? because th... | """ |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from linda_app.models import DatasourceDescription<|fim▁hole|>
# A single test over a data source
class EndpointTest(models.Model):
execution_time = models.DateTimeField(auto_now_add=True) # test timestamp
datasource = models.For... | |
<|file_name|>api.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Piston Cloud Computing, Inc.
# Copyright 2012-2013 Red Hat, Inc.
# All Righ... | |
<|file_name|>mixed-field-qualifiers.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate typeinfo;<|fim▁hole|> struct Foo {
a: i32,
pub b: i32, //~ ERROR no rules expected the token `b`
}
}<|fim▁end|> |
def! { |
<|file_name|>Zombie.spec.ts<|end_file_name|><|fim▁begin|>import { Zombie } from './';
describe('Zombie', () => {
it('should set UUIDLeast', () => {
let zombie = new Zombie();
zombie.Tag.UUIDLeast = 'Test';
expect(zombie.Command).to.be('{UUIDLeast:"Test"}');
});
it('should set Attack... | let zombie = new Zombie();
zombie.Tag.CanBreakDoors = true;
expect(zombie.Command).to.be('{CanBreakDoors:true}');
}); |
<|file_name|>ClosureDefinitionTranslator.java<|end_file_name|><|fim▁begin|>/*
* Renjin : JVM-based interpreter for the R language for the statistical analysis
* Copyright © 2010-2019 BeDataDriven Groep B.V. and contributors
*
* This program is free software; you can redistribute it and/or modify
* it under the ter... | FunctionCall call) {
// a closure whose value is not used has no side effects
// E.g. |
<|file_name|>test.conf.js<|end_file_name|><|fim▁begin|>/**
* @license angular-sortable-column
* (c) 2013 Knight Rider Consulting, Inc. http://www.knightrider.com
* License: MIT
*/
/**
*
* @author Dale "Ducky" Lotts
* @since 7/21/13
*/
basePath = '..';
files = [
JASMINE,
JASMINE_ADAPTER... | 'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js', |
<|file_name|>ListType.java<|end_file_name|><|fim▁begin|>package simpl.typing;
public final class ListType extends Type {
public Type t;
public ListType(Type t) {
this.t = t;
}
@Override
public boolean isEqualityType() {
// TODO Done
return t.isEqualityType();
}
@... | return t.unify(this); |
<|file_name|>editor.js<|end_file_name|><|fim▁begin|>var g_batchAssessmentEditor = null;
var g_tabAssessments = null;
var g_updatingAttendance = false;
var g_onRefresh = null;
var g_lockedCount = 0;
var g_btnSubmit = null;
var g_sectionAssessmentEditors = null;
var g_sectionAssessmentButtons = null;
function createAs... | if(!value) return;
// assessed participants cannot edit or re-submit assessments |
<|file_name|>uimanager.spec.ts<|end_file_name|><|fim▁begin|>import { InternalUIConfig, PlayerWrapper, UIManager } from '../src/ts/uimanager';
import { PlayerAPI } from 'bitmovin-player';
import { MockHelper, TestingPlayerAPI } from './helper/MockHelper';
import { MobileV3PlayerEvent } from '../src/ts/mobilev3playerapi'... | |
<|file_name|>Q00700_CursedLife.java<|end_file_name|><|fim▁begin|>/*
* This file is part of the L2J Mobius project.
*
* 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... | htmltext = "32560-01.htm";
break;
} |
<|file_name|>Problem.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017-2022 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 License is located at
*
* ... | * </li> |
<|file_name|>ratio_layouted_frame.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2011, Dirk Thomas, TU Darmstadt
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributi... | |
<|file_name|>test_proxy_middleware.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<|fim▁hole|># http://www.apache.org/licenses/LICENSE-2.0
#
# ... | # |
<|file_name|>REM_console.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
import rem_backend.query_data as qd
import rem_backend.propagation_model_estimation as pm
import threading
import _thread
__author__ = "Daniel Denkovski", "Valentin Rakovic"
__copyright__ = "Copyright (c) 2017, Faculty of Electrical Engineeri... | print(dev_list[int(devind)-1][0])
|
<|file_name|>stadium.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import sys
import re
import types
import random
import lxml
from lxml import etree
from copy import deepcopy
def usage():
print "Usage: %s countryfile regionname valuefile clubfile1 [clubfile2...]" % sys.argv[0]
print " countryf... | |
<|file_name|>UriMapFeature.hpp<|end_file_name|><|fim▁begin|>/*
* UriMapFeature.hpp
*
* Copyright (c) 2010 Paul Giblock <pgib/at/users.sourceforge.net>
*
* This file is part of Unison - http://unison.sourceforge.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of ... | class UriMapFeature : public Feature
{ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from .analyzer import Pep8Analyzer
from .issues_data import issues_data
analyzers = {
'pep8' :
{
'title' : 'Pep-8',
'class' : Pep8Analyzer,
'language' : 'python',
'issues_data' : issues_data,
},<|fim▁... | } |
<|file_name|>clang.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)
# Ralf Habacker, 2006 (rh)
# Yinon Ehrlich, 2009
"""
clang/llvm detection.
"""
import os, sys
from waflib import Configure, Options, Utils
from waflib.Tools import ccroot, ar
from waflib.Configure... | |
<|file_name|>subresource.py<|end_file_name|><|fim▁begin|>import os, sys, json, urlparse, urllib
def get_template(template_basename):
script_directory = os.path.dirname(os.path.abspath(__file__))
template_directory = os.path.abspath(os.path.join(script_directory,
... | destination_netloc = get_swapped_origin_netloc(parsed.netloc)
destination_url = urlparse.urlunsplit(urlparse.SplitResult( |
<|file_name|>0023_auto_20160505_1636.py<|end_file_name|><|fim▁begin|>from django.db import migrations
<|fim▁hole|>
operations = [
migrations.AlterModelOptions(
name="candidateresult",
options={"ordering": ("-num_ballots_reported",)},
)
]<|fim▁end|> | class Migration(migrations.Migration):
dependencies = [("uk_results", "0022_postresult_confirmed_resultset")] |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>""" Form widget classes """
from __future__ import absolute_import
from django.conf import settings
from django.forms.utils import flatatt
from django.forms.widgets import CheckboxInput
from django.urls import reverse
from django.utils.encoding import force_text
fr... | |
<|file_name|>htmlmediaelement.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 audio_video_metadata;
use document_loader::{Load... | |
<|file_name|>resize-base-min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|>oid sha256:277086ec0fb49c6da22640a41bd9d52e5e3503cc15ae358cd76662b81439df83
size 10713<|fim▁end|> | |
<|file_name|>media.go<|end_file_name|><|fim▁begin|>package responses
type MediaCommand struct {
Headers
MediaSessionID int `json:"mediaSessionId"`
}
type LoadMediaCommand struct {
Headers
Media MediaItem `json:"media"`
CurrentTime int `json:"currentTime"`
Autoplay bool `json:"autoplay"... | Media *MediaStatusMedia `json:"media"` |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# python-gnupg documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 5 22:38:47 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration v... |
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default' |
<|file_name|>test_wdm.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import pprint
import shutil
import subprocess
import unittest
from pyspatialite import dbapi2 as db
import qgis.core # Need to import this before PyQt to ensure QGIS parts work
from PyQt4.QtSql import QSqlQuery, QSqlDatabase
from Roadnet.database imp... | # -*- coding: utf-8 -*-
from mock import patch
import os |
<|file_name|>configure.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|># coding: utf8
import os
import subprocess
from '{% if cookiecutter.namespace %}{{ cookiecutter.namespace }}.{{ cookiecutter.project_slug }}{% else %}{{ cookiecutter.project_slug }}{% endif %}'.commands.base import BaseCommand
from '{%... | |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Clawpack documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 25 12:07:14 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don'... | # jsmath_path = '_static/jsMath/easy/load.js'
keep_warnings = 'True' |
<|file_name|>ModalContent.tsx<|end_file_name|><|fim▁begin|>/*
MIT License
Copyright (c) 2022 Looker Data Sciences, 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, ... | |
<|file_name|>virtual_network_peering.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
... | 'peering_state': {'key': 'properties.peeringState', 'type': 'str'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'}, |
<|file_name|>logout.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { CredentialsService } from './credentials.service';
import { AgriHub } from '../../global/agrihub';
@Component({<|fim▁hole|>export class LogoutComponent imp... | selector: 'logout',
template: ''
}) |
<|file_name|>RemarksAPITest.cpp<|end_file_name|><|fim▁begin|>//===- unittest/Support/RemarksAPITest.cpp - C++ API tests ----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apach... | EXPECT_NE(R.Loc->SourceFilePath.data(), R2.Loc->SourceFilePath.data());
EXPECT_NE(R.Args.back().Key.data(), R2.Args.back().Key.data()); |
<|file_name|>linked_list.rs<|end_file_name|><|fim▁begin|>use core::alloc::{GlobalAlloc, Layout};
use core::ptr::{self, NonNull};
use linked_list_allocator::Heap;
use spin::Mutex;
use crate::paging::{ActivePageTable, TableKind};
static HEAP: Mutex<Option<Heap>> = Mutex::new(None);
pub struct Allocator;
impl Allocato... | Err(()) => {
let size = heap.size();
super::map_heap(&mut ActivePageTable::new(TableKind::Kernel), crate::KERNEL_HEAP_OFFSET + size, crate::KERNEL_HEAP_SIZE); |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Provide basic components for groupby. These definitions
hold the allowlist of methods that are exposed on the
SeriesGroupBy and the DataFrameGroupBy objects.
"""
from __future__ import annotations
import dataclasses
from typing import Hashable
@dataclasses.datacl... | |
<|file_name|>subresources_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2... |
apiExtensionClient, err := clientset.NewForConfig(config)
if err != nil {
t.Fatal(err) |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from fundraiser_app import views
urlpatterns = [
url(r'^$', views.FMItemListView.as_view(), name='fmitem_list'),
url(r'^about/$', views.AboutView.as_view(), name='about'),
url(r'^fmitem/(?P<pk>\d+)$', views.FMItemDetailView.... | url(r'^fmitem/(?P<pk>\d+)/remove$', views.FMItemDeleteView.as_view(), name='fmitem_remove'),
url(r'^fmitem/(?P<pk>\d+)/publish/$', views.fmitem_publish, name='fmitem_publish'),
] |
<|file_name|>enchantingdialog.hpp<|end_file_name|><|fim▁begin|>#ifndef MWGUI_ENCHANTINGDIALOG_H
#define MWGUI_ENCHANTINGDIALOG_H
#include "spellcreationdialog.hpp"
#include "../mwbase/windowmanager.hpp"
#include "../mwmechanics/enchanting.hpp"
namespace MWGui
{
class ItemSelectionDialog;
class ItemWidget;
... |
virtual void resetReference(); |
<|file_name|>unrecognizedgrouppb_test.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo.
// source: unrecognizedgroup.proto
// DO NOT EDIT!
/*
Package unrecognizedgroup is a generated protocol buffer package.
It is generated from these files:
unrecognizedgroup.proto
It has these top-level message... | dAtA[i] = byte(popr.Intn(256))
}
if err := p.VerboseEqual(msg); err != nil {
t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) |
<|file_name|>tyencode.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/l... | |
<|file_name|>condvar.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/license... | |
<|file_name|>dc_algorithm_rebeca.hpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////////
// Author: Thomas Arndt monotomy@cythar.sequenzer.org
// This file is part of CYTHAR Sequenzer
//
// This program is free software: you can redistribute it and/or modify
// ... | repeat_step));
}
return std::move(results_serie); |
<|file_name|>dir_72c031272133aec1d916095cf903ecf1.js<|end_file_name|><|fim▁begin|>var dir_72c031272133aec1d916095cf903ecf1 =
[<|fim▁hole|> [ "HTTP", "dir_7e5fd1ff9265fa651882e3ad4d93cc88.html", "dir_7e5fd1ff9265fa651882e3ad4d93cc88" ],
[ "Module", "dir_10705d0e5b4538c0e815cbe3b6497638.html", "dir_10705d0e5b4538c... | |
<|file_name|>test_inbound.py<|end_file_name|><|fim▁begin|>##
# Copyright (c) 2008-2015 Apple 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.or... | |
<|file_name|>mocks.py<|end_file_name|><|fim▁begin|>""" test """
import logging
import os
import tempfile
import sys
import random
from bzt.engine import Engine, Configuration, FileLister
from bzt.utils import load_class
from bzt.engine import Provisioning, ScenarioExecutor, Reporter, AggregatorListener
from bzt.module... | def startup(self):
""" |
<|file_name|>test_mapper.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import unittest
import mock
import openerp.tests.common as common
from openerp.addons.connector.unit.mapper import (
Mapper,
ImportMapper,
ExportMapper,
ImportMapChild,
MappingDefinition,
changed_by,
only_crea... | map_record = mapper.map_record(record)
expected = {'out_name': 300, 'field2': 'value'}
self.assertEqual(map_record.values(fields=['field', 'name']), expected)
self.assertEqual(map_record.values(for_create=True, |
<|file_name|>accession.js<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The BioBricks 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/LICENSE-2.0
Unl... | function (error) {
/* istanbul ignore if */ |
<|file_name|>reparent.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////
// Name: src/x11/reparent.cpp
// Purpose: wxWindow
// Author: Julian Smart
// Modified by:
// Created: 2002-03-09
// Copyright: (c) Julian Smart
// Licence: wxWi... | unsigned char *propreturn;
Window *children; |
<|file_name|>ASMCode.java<|end_file_name|><|fim▁begin|>import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;<|fim▁hole|>//this code contains the output assembly code that the program outputs.
//will have at least three functions:
//add(string, string, string, strin... | import java.util.LinkedList;
|
<|file_name|>wanderer.js<|end_file_name|><|fim▁begin|>var name = "Wanderer";
var collection_type = 0;
var is_secret = 0;
var desc = "Visited 503 new locations.";
var status_text = "Gosh, where HAVEN'T you traveled? Your peregrinations have earned you this footworn-but-carefree Wanderer badge.";
var last_published =... | |
<|file_name|>saltkeys.go<|end_file_name|><|fim▁begin|>// Obdi - a REST interface and GUI for deploying software
// Copyright (C) 2014 Mark Clarkson
//
// 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 Fou... | return nil
case "DELETE":
t.DeleteRequest(args, response)
return nil |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>/*
* @flow
*/
import type {Suite} from "flow-dev-tools/src/test/Suite";
const { suite, test } = require("flow-dev-tools/src/test/Tester");
module.exports = (suite(({ addFile, addFiles, addCode }) => [
test("BigInt invalid decimal type literal", [
addCode(`
... | |
<|file_name|>event.py<|end_file_name|><|fim▁begin|>import asyncio
import inspect
import logging
from typing import List, Tuple, Callable, NamedTuple
from lightbus.schema.schema import Parameter
from lightbus.message import EventMessage
from lightbus.client.subclients.base import BaseSubClient
from lightbus.client.util... | async def _on_message(
self, event_message: EventMessage, listener: Callable, options: dict, on_error: OnError
): |
<|file_name|>project.js<|end_file_name|><|fim▁begin|>'use strict';
var page = 'projects';
module.exports = {
renderPage: function(req, res) {
if (!req.user) {
res.redirect('/login');
} else {
res.render(page, {
helpers: {
activeClass: function(section) {<|fim▁hole|> ... | if (section === 'projects') {
return 'active';
} else { |
<|file_name|>about_scoring_project.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from runner.koan import *
# Greed is a dice game where you roll up to five dice to accumulate
# points. The following "score" function will be used calculate the
# score of a single roll of the dice.
#
# ... | from collections import Counter
|
<|file_name|>serialwin32.py<|end_file_name|><|fim▁begin|>#! python
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# serial driver for win32
# see __init__.py
#
# (C) 2001-2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# Initial patch to use ctypes by Giovanni Bajo <ra... | return bytes(read)
def write(self, data):
"""Output the given byte string over the serial port.""" |
<|file_name|>ntddscsi.rs<|end_file_name|><|fim▁begin|>// 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 files in the project carrying such notice may not be... | pub const FIRMWARE_REQUEST_BLOCK_STRUCTURE_VERSION: ULONG = 0x1;
STRUCT!{struct FIRMWARE_REQUEST_BLOCK { |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#
# Copyright 2016 Dohop hf.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.<|fim▁hole|>#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | # You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0 |
<|file_name|>paypal.py<|end_file_name|><|fim▁begin|># -*- coding: utf-'8' "-*-"
import base64
try:
import simplejson as json
except ImportError:
import json
import logging
import urlparse
import werkzeug.urls
import urllib2
from openerp.addons.payment.models.payment_acquirer import ValidationError
from opener... | percentage = acquirer.fees_dom_var
fixed = acquirer.fees_dom_fixed
else:
percentage = acquirer.fees_int_var |
<|file_name|>test_tasks_base.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Mirantis 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/LICENSE-2.0
... | def test_delete_tasks(self):
tenant = {"id": "tenid1", "name": "tenant1"} |
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#<|fim▁hole|>#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Configuration for Invenio-Formatter."""
from __future__ import absolute_import, pr... | # This file is part of Invenio.
# Copyright (C) 2016-2018 CERN. |
<|file_name|>dataDao.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Intel Corporation
#
# 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
#... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#<|fim▁hole|># The licence is in the file __manifest__.py
#
##############################################################################
from . import b2s_ima... | # Copyright (C) 2015 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
# |
<|file_name|>salary_slip.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, erpnext
import datetime, math
from frappe.utils import add_days, cint, cstr, fl... | self.total_loan_repayment = 0 |
<|file_name|>SpringSecurityAuditorAware.java<|end_file_name|><|fim▁begin|>package io.variability.jhipster.security;
import io.variability.jhipster.config.Constants;
import org.springframework.data.domain.AuditorAware;
import org.springframework.stereotype.Component;
/**
* Implementation of AuditorAware based on Spr... | */
@Component |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The GLFW-RS Developers. For a full listing of the authors,
// refer to the AUTHORS file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complia... | }
/// Wrapper for `glfwSetWindowSize`. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.