prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from httmock import HTTMock from jenkinsapi.jenkins import Jenkins from jenkins.models import Build, JobType from .helpers import mock_url from .factories import BuildFactory, JenkinsServerFactory class JenkinsServerTest(TestC...
def test_get_client(self): """
<|file_name|>merge.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. 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/...
batch_sizes -= set([None]) if len(batch_sizes) == 1: output_shape = (list(batch_sizes)[0],) + output_shape
<|file_name|>XmlSerializer.cpp<|end_file_name|><|fim▁begin|>#include "XmlSerializer.h" namespace dnc { namespace Xml { XmlSerializer::XmlSerializer() {} XmlSerializer::~XmlSerializer() {} std::string XmlSerializer::ToString() { return std::string("System.Xml.XmlSerializer"); } std::string XmlSeriali...
SerializableAttribute& t = obj->Attribute(i);
<|file_name|>remove.py<|end_file_name|><|fim▁begin|>import json import csv teamfolder = "teamdata/out/" with open('combined.json', 'r') as jsonfile: data = json.load(jsonfile) for yeardata in data: year = yeardata['year'] print "" print "NEW YEAR " + str(year) for team in yeardata['teams']: ...
newplayers = [] totalper = 0 for player in team['players']:
<|file_name|>import-to-mongodb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import pymongo import json print "import crawled json file into mongodb 'newspapers' database." if len(sys.argv) < 3: print "input as [collection] [json_file]" exit(1) connection = pymongo.Connection("localhost", ...
json_file.close() except Exception, e: raise e
<|file_name|>IntegerSmallIntTest.java<|end_file_name|><|fim▁begin|>/* The MIT License (MIT) Copyright (c) 2014 Manni Wood 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, incl...
Assert.assertEquals(actual, expected, "scalars must match"); }
<|file_name|>setting_helpers.cpp<|end_file_name|><|fim▁begin|>/* Neutrino-GUI - DBoxII-Project Copyright (C) 2001 Steffen Hehn 'McClean' Homepage: http://dbox.cyberphoria.org/ Kommentar: Diese GUI wurde von Grund auf neu programmiert und sollte nun vom Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. ...
g_PluginList->startPlugin(sel,0); } return menu_return::RETURN_EXIT;
<|file_name|>calamares_sr@latin.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="sr@latin" version="2.1"> <context> <name>AlongsidePage</name> <message> <location filename="../src/modules/partition/gui/AlongsidePage.cpp" line="77"/> <source>Choose partition to shr...
<source>Failed to write keyboard configuration to existing /etc/default directory.</source> <translation type="unfinished"/> </message> </context>
<|file_name|>GpioPinPwm.java<|end_file_name|><|fim▁begin|>package com.pi4j.io.gpio; /* * #%L * ********************************************************************** * ORGANIZATION : Pi4J * PROJECT : Pi4J :: Java Library (Core) * FILENAME : GpioPinPwm.java * * This file is part of the Pi4J pro...
public interface GpioPinPwm extends GpioPin { int getPwm();
<|file_name|>IAccount.java<|end_file_name|><|fim▁begin|>package com.dgex.offspring.nxtCore.service; import java.util.List; import nxt.Account; import nxt.Alias; import nxt.Block; import nxt.Transaction; import com.dgex.offspring.nxtCore.core.TransactionHelper.IteratorAsList; public interface IAccount { public Ac...
public List<Alias> getNativeAliases(); public List<Block> getForgedBlocks();
<|file_name|>transport-browser.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Mozilla 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/lice...
onload(new Uint8Array(xhr.response), xhr.status); };
<|file_name|>rpc.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015-2017 winapi-rs developers // Licensed under the Apache License, Version 2.0<|fim▁hole|>// except according to those terms. // Master include file for RPC applications. pub type I_RPC_HANDLE = *mut ::c_void; pub type RPC_STATUS = ::c_long;<|fim▁end|>
// <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 copied, modified, or distributed
<|file_name|>project_test1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright 2002 Dave Abrahams # Copyright 2002, 2003, 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) from BoostBuild impo...
<|file_name|>external_tools.py<|end_file_name|><|fim▁begin|>from restclients.canvas import Canvas #from restclients.models.canvas import ExternalTool class ExternalTools(Canvas): def get_external_tools_in_account(self, account_id): """<|fim▁hole|> Return external tools for the passed canvas account...
<|file_name|>cli.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015, 2016 CERN. # # Zenodo 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 vers...
def loadlocation_cli(): """Load data store location."""
<|file_name|>routes.rs<|end_file_name|><|fim▁begin|>//! # Request handlers //! //! Iron's [`router`]() will accept a function closure that takes //! a mutable `Request` and returns an `IronResult<Response>`. //! The application specifies two handlers: //! //! - `get_person` handles `GET /person/:id`, and will get a `Pe...
let conn = get_conn()?;
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>import sys # widgets class Button: """ Represents button Keyword arguments: text -- button text | str onclick -- function invoked after pressing the button | function: Button -> void Attributes: wide ...
<|file_name|>cookies.ts<|end_file_name|><|fim▁begin|>/** * @module * Cookies support. */ import { getHeader, setHeader, } from './headers'; /** * Returns true if `name` is a valid cookie name according to RFC-6265 */ export function isValidName(name: string): boolean { // Any CHAR (Octets 0-127) excep...
let header = `${name}=${value}`; if (options.path) {
<|file_name|>PipelineRunNode.js<|end_file_name|><|fim▁begin|>/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.1.2-pre.0 * Contact: blah@cliffano.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-ge...
<|file_name|>mpl1.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import sys import os import random import matplotlib # Make sure that we are using QT5 matplotlib.use('Qt5Agg') from PyQt5 import QtCore, QtWidgets from numpy import arange, sin, pi from matplotlib.backends.backend_qt5agg import...
self.help_menu = QtWidgets.QMenu('&Help', self) self.menuBar().addSeparator()
<|file_name|>HealthColors.js<|end_file_name|><|fim▁begin|>/* My Profile link: https://app.roll20.net/users/262130/dxwarlock GIT link: https://github.com/dxwarlock/Roll20/blob/master/Public/HeathColors Roll20Link: https://app.roll20.net/forum/post/4630083/script-aura-slash-tint-healthcolor Last Updated 2/27/2017 */ /*gl...
<|file_name|>future.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
} #[test]
<|file_name|>borrowck-move-out-of-vec-tail.rs<|end_file_name|><|fim▁begin|>// Test that we do not permit moves from &[] matched by a vec pattern. struct Foo { string: ~str } pub fn main() { let x = [ Foo { string: ~"foo" }, Foo { string: ~"bar" }, Foo { string: ~"baz" } ]; matc...
}
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False CSRF_ENABLED = True SECRET_KEY = os.getenv('APP_SECRET_KEY', '') # db config DB_PORT = os.getenv('DB_PORT', '') DB_HOST = o...
<|file_name|>handy.js<|end_file_name|><|fim▁begin|>'use strict'; var handyJS = {}; 'use strict'; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbo...
options.method = 'GET'; } else { options.method = options.method.toUpperCase();
<|file_name|>plugin_suite_test.go<|end_file_name|><|fim▁begin|>package plugin_test import ( "path/filepath" "code.cloudfoundry.org/cli/utils/testhelpers/pluginbuilder" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega"<|fim▁hole|>) func TestPlugin(t *testing.T) { RegisterFailHandler(Fail) pluginbuilder.Buil...
"testing"
<|file_name|>protractor.conf.js<|end_file_name|><|fim▁begin|>// conf.js exports.config = { seleniumServerJar: "./node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar", specs: ["test/e2e/*.scenarios.coffee"], baseUrl: "http://localhost:3000", capabilities: { "browserName": "chrome"<|fim▁hol...
<|file_name|>data.js<|end_file_name|><|fim▁begin|>vde.App.controller('DataCtrl', function($scope, $rootScope, $http, timeline, Vis, vg, d3) { $scope.dMdl = { src: {}, formats: ['json', 'csv', 'tsv'], parsings: ['string', 'number', 'boolean', 'date'] }; $scope.finishedLoading = function() { var sr...
if(type == 'json') { $scope.dMdl.src.values = JSON.parse($scope.dMdl.values); $scope.finishedLoading();
<|file_name|>file_util.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import base64 from random import choice def random_file_from_dir(relative_path):<|fim▁hole|>def abs_path_to_file(relative_path): # print os.getcwd() return os.path.abspath(os.path.join(os.getcwd(), relative_path)) def en...
random_file = choice(os.listdir(os.path.join(os.getcwd(), relative_path))) return abs_path_to_file(os.path.join(relative_path, random_file))
<|file_name|>Maze.py<|end_file_name|><|fim▁begin|># Copyright 2010 by Dana Larose # This file is part of crashRun. # crashRun 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, ...
else: return None def gen_map(self):
<|file_name|>prelude.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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...
pub use super::{Read, Write, BufRead, Seek};
<|file_name|>ec2.py<|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 the Apache License...
'i2.4xlarge', 'i2.8xlarge',
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::env; use std::process::Command; use std::str::{self, FromStr}; fn main(){ let minor = match rustc_minor_version() { Some(minor) => minor, None => return, }; // const fn stabilized in Rust 1.31: if minor >= 31 { println...
<|file_name|>graph_test.go<|end_file_name|><|fim▁begin|>package graph_test import ( "testing" "github.com/filwisher/algo/graph" "github.com/filwisher/algo/set" ) func TestGraph(t *testing.T) { conn := 1 g := graph.NewGraph() for i := 2; i < 6; i++ { g.AddEdge(conn, i) } <|fim▁hole|> for e := range g.Adjacen...
s := set.NewSet()
<|file_name|>dynamic.rs<|end_file_name|><|fim▁begin|>use maths::{Point2, Vector2, Basis2, Rotation2, Rad, EuclideanSpace, Rotation, ApproxEq, Angle}; use std::ops::{Deref, DerefMut}; use ecs::entity::{Entities, Accessor, EntityRef}; use ecs::state::CommitArgs; use ecs::module::{Component, Template}; use ecs::policy::Id...
TransformTemplate { transform: Transform::one(), parent: None,
<|file_name|>skia.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/. #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #...
pub fn SkiaGrContextRelease(aContext: SkiaGrContextRef);
<|file_name|>test_nonlin.py<|end_file_name|><|fim▁begin|>""" Unit tests for nonlinear solvers Author: Ondrej Certik May 2007 """ from __future__ import division, print_function, absolute_import from numpy.testing import assert_ import pytest from scipy._lib.six import xrange from scipy.optimize import nonlin, root fr...
assert_(nonlin.norm(res.fun) < 1e-5)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the...
These follow the thrift naming conventions, but return dicts or arrays of dicts,
<|file_name|>sync.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors // MIT License. See license.txt $.extend(frappe.model, { docinfo: {}, sync: function(r) { /* docs: extract docs, docinfo (attachments, comments, assignments) from incoming request and set i...
}
<|file_name|>icon.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Moodle Pty Ltd. // // 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....
for (let i = attrs.length - 1; i >= 0; i--) { if (attrs[i].name == 'class') { // We don't want to override the classes we already added. Add them one by one. if (attrs[i].value) {
<|file_name|>template.py<|end_file_name|><|fim▁begin|># Copyright (C) 2007-2010 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the ...
@param strip_command: Whether to strip the command echo from the response.
<|file_name|>make_appimage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function try: from configparser import RawConfigParser except ImportError: from ConfigParser import RawConfigParser import glob import os import shutil import subprocess import...
pass try:
<|file_name|>_peering_service_prefixes_operations.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 info...
:param resource_group_name: The resource group name.
<|file_name|>ZonePlanningLayers.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import renderOrder from '../renderOrder'; import { RenderLayer } from '../browser_utils/Utils'; import { SharedState } from '../citybound'; import { shadersForLandUses } from './stripedShaders'; import colors from '../color...
}))} />)} {[...zoneOutlineGroups.entries()].map(([landUse, groups]) => <RenderLayer renderOrder={renderOrder.addedGesturesZonesOutlines} decal={true} batches={[...groups.values()].map(groupMesh => ({ mesh: groupMesh,
<|file_name|>UseCountingXMLReaderWrapper.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016-2017 Mozilla Foundation * * 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 restr...
import org.xml.sax.SAXNotSupportedException; import org.xml.sax.XMLReader; public final class UseCountingXMLReaderWrapper
<|file_name|>tap.py<|end_file_name|><|fim▁begin|># -*- test-case-name: twisted.names.test.test_tap -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Domain Name Server """ import os, traceback from twisted.python import usage from twisted.names import dns from twisted.application import...
<|file_name|>range.test.js<|end_file_name|><|fim▁begin|>import { createRangeFromZeroTo } from '../../helpers/utils/range' describe('utils range', () => { describe('createRangeFromZeroTo range 2', () => { const range = createRangeFromZeroTo(2) it('return the array 0 to 1', () => { expect(range).toEqual...
it('return the array 0', () => {
<|file_name|>day_5.rs<|end_file_name|><|fim▁begin|>use std::boxed::Box; use std::ptr::Shared; use std::option::Option; struct Node { elem: i32, next: Option<Box<Node>> } impl Node { fn new(e: i32) -> Node { Node { elem: e, next: None } } } #[derive(Default)] p...
|head| { let h = *head; self.head = h.next;
<|file_name|>buffered_write_stream.hpp<|end_file_name|><|fim▁begin|>// // buffered_write_stream.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or...
std::size_t read_some(const MutableBufferSequence& buffers) { return next_layer_.read_some(buffers); }
<|file_name|>dig.py<|end_file_name|><|fim▁begin|># coding=utf-8 # # Copyright 2016 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
at the end of its URI.
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate nickel; extern crate config; extern crate pulldown_cmark; use nickel::Nickel; use std::path::Path; use std::collections::HashMap; use std::fs::File; use std::io::{Read,BufReader, Error}; use config::reader; use config::types::Config; use pul...
let parser = Parser::new(markdown_file.as_str());
<|file_name|>example-1.5.x.py<|end_file_name|><|fim▁begin|># Download the Python helper library from twilio.com/docs/python/install from twilio.rest import TwilioTaskRouterClient # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_to...
workspace = client.workspaces.get(workspace_sid) statistics = workspace.statistics.get() print(statistics.cumulative["avg_task_acceptance_time"]) print(statistics.cumulative["tasks_created"])
<|file_name|>library-directory.js<|end_file_name|><|fim▁begin|>// Plugin for using a local directory as a Library. Generates the payload for // an AssetList REST endpoint consisting of asset models as well as pagination // helpers. var _ = require('underscore'), fs = require('fs'), url = require('url'), pat...
<|file_name|>apiStatusContext.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { createContext } from 'react'; export const defaultApiStatus = { offline: false, apiUnreachable: '', appVersionBad: false, }; export default createContext(defaultApiStatus);<|fim▁end|>
<|file_name|>cramps.py<|end_file_name|><|fim▁begin|>from machinekit import hal from machinekit import rtapi as rt from machinekit import config as c from fdm.config import base def hardware_read(): hal.addf('hpg.capture-position', 'servo-thread') hal.addf('bb_gpio.read', 'servo-thread') def hardware_write(...
def init_hardware(): watchList = []
<|file_name|>textjs.js<|end_file_name|><|fim▁begin|>(function(global){ var PollXBlockI18N = { init: function() { (function(globals) { var django = globals.django || (globals.django = {}); django.pluralidx = function(count) { return (count == 1) ? 0 : 1; }...
return fmt.replace(/%s/g, function(match){return String(obj.shift())}); } };
<|file_name|>test_root.py<|end_file_name|><|fim▁begin|><|fim▁hole|> assert response.data.decode('utf-8') == 'Hey enlil'<|fim▁end|>
def test_root(client): response = client.get('/') assert response.status_code == 200
<|file_name|>transpose.cpp<|end_file_name|><|fim▁begin|>/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-...
}
<|file_name|>resources.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship inf...
def reload(self):
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import ujson as json import pytz from datetime import datetime import requests from django.http import HttpResponse, Http404 from django.shortcuts import render def index(request): return render(request, 'timetable/index.html', {}) def query(request, term): ...
"platform": con["from"]["platform"], "from": con["from"]["station"]["name"], "to": con["to"]["station"]["name"],
<|file_name|>BaseTestHBaseClient.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Async HBase Authors. All rights reserved. * This file is part of Async HBase. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions a...
@Ignore // ignore for test runners public class BaseTestHBaseClient { protected static final Charset CHARSET = Charset.forName("ASCII");
<|file_name|>lumina-config_et.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="et"> <context> <name>AppDialog</name> <message> <location filename="../AppDialog.ui" line="14"/> <source>Select Application</source> <translation...
<message> <location filename="../PanelWidget.cpp" line="23"/> <source>Bottom</source>
<|file_name|>session-card.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy, Input} from '@angular/core'; import { Router } from '@angular/router'; import { FirebaseAuthState } from 'angularfire2'; import { UUID } from 'angular2-uuid'; import { AuthService } from '../shared/security/auth....
return this.isTutor || this.isTutee; } constructor(private router: Router, private authService: AuthService, private sessionService: SessionService) { }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Capstone low-level binding for Rust. //! //! See [Capstone's C language documentation](http://www.capstone-engine.org/lang_c.html) for more //! information. //! //! # Safety //! //! Obviously unsafe. //! //! Every `handle` shall be initialied first with `cs_open`. //...
CS_SUPPORT_X86_REDUCE = CS_ARCH_ALL+2,
<|file_name|>cssmediarule.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 cssparser::Parser; use dom::bindings::codegen::Bindi...
use dom::cssrule::SpecificCSSRule;
<|file_name|>Spell.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Found...
case SPELL_AURA_RANGED_ATTACK_POWER_ATTACKER_BONUS: { if (!m_targets.GetUnitTarget()) return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2016 SonarSource SA * mailto:contact AT sonarsource DOT com * * This program 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 Sof...
success: function (model) { model.set({ _status: 'installing' }); }
<|file_name|>d2d1_3.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 c...
fn DrawGdiMetafile( gdiMetafile: *mut ID2D1GdiMetafile, destinationRectangle: *const D2D1_RECT_F,
<|file_name|>obj_file_io.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ object file io is a Python object to single file I/O framework. The word 'framework' means you can use any serialization/deserialization algorithm here. - dump: dump python object to a file. - safe_dump: add atomic writing guarantee ...
decompress=True, verbose=False, **kwargs): """load object from file.
<|file_name|>test_price_list.py<|end_file_name|><|fim▁begin|>test_records = [ [{<|fim▁hole|> "valid_for_all_countries": 1 }] ]<|fim▁end|>
"doctype": "Price List", "price_list_name": "_Test Price List", "currency": "INR",
<|file_name|>MultilevelSensor.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ***************************************************************...
******************************************************************************* * Copyright (c) 2013 Whizzo Software, LLC. * All rights reserved. This program and the accompanying materials
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::path::Path; use std::sync::Arc; use linefeed::complete::{Completer, Completion}; use linefeed::prompter::Prompter; use linefeed::terminal::Terminal; pub mod dots; pub mod env; pub mod make; pub mod path; pub mod ssh; use crate::libs; use crate::parsers; use c...
} pub fn escaped_word_start(line: &str) -> usize {
<|file_name|>main.go<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013 ASMlover. 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 retain the abo...
*/ package main import ( "fmt"
<|file_name|>QTableColumnConstraint.java<|end_file_name|><|fim▁begin|>package org.plasma.provisioning.rdb.mysql.v5_5.query; import org.plasma.provisioning.rdb.mysql.v5_5.TableColumnConstraint; import org.plasma.query.DataProperty; import org.plasma.query.Expression; import org.plasma.query.dsl.DataNode; import org.pla...
}
<|file_name|>colors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # coding:utf-8 from twython import Twython from colors import const #import const import numpy as np import PIL.Image as img import colorsys import StringIO import os from datetime import datetime from datetime import timedelta from random impo...
text = c.to_string() picdata = c.to_image(self.size) # https://twython.readthedocs.org/en/latest/usage/advanced_usage.html
<|file_name|>sps_30.py<|end_file_name|><|fim▁begin|>""" Created on 1 May 2019 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) https://www.sensirion.com/en/environmental-sensors/particulate-matter-sensors-pm25/ https://bytes.com/topic/python/answers/171354-struct-ieee-754-internal-representation Firmware r...
encoded = I2C.Sensors.read_cmd16(command, count) values = self.__decode(encoded)
<|file_name|>info.py<|end_file_name|><|fim▁begin|># Copyright 2013 Daniel Richman # # This file is part of The Snowball Ticketing System. # # The Snowball Ticketing System 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 F...
logger.debug("Rendering endpoint %r -> %r", endpoint, filename)
<|file_name|>unixccompiler.py<|end_file_name|><|fim▁begin|>"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories spe...
return "gcc" in compiler_name or "g++" in compiler_name
<|file_name|>folders.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Plugins related to folders and paths """ from hyde.plugin import Plugin from hyde.fs import Folder class FlattenerPlugin(Plugin): """ The plugin class for flattening nested folders. """ def __init__(self, site): s...
try: node = self.site.content.node_from_relative_path(item.source)
<|file_name|>inheritedConstructorWithRestParams2.js<|end_file_name|><|fim▁begin|>//// [inheritedConstructorWithRestParams2.ts] class IBaseBase<T, U> { constructor(x: U) { } } interface IBase<T, U> extends IBaseBase<T, U> { } class BaseBase2 { constructor(x: number) { } } declare class BaseBase<T, U> extends...
new Derived("", 3, 3); new Derived("", 3, 3, 3);
<|file_name|>text.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/. */ //! Specified types for text properties. use cssparser::{Parser...
GenericLineHeight::Normal => {
<|file_name|>test_user_avatar.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import six from base64 import b64encode from django.core.urlresolvers import reverse from sentry.models import UserAvatar from sentry.testutils import APITestCase class UserAvatarTest(APITestCase): def test_get...
url = reverse('sentry-api-0-user-avatar', kwargs={
<|file_name|>feed_parse_extractDhragonisslytherinWordpressCom.py<|end_file_name|><|fim▁begin|>def extractDhragonisslytherinWordpressCom(item): ''' Parser for 'dhragonisslytherin.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['t...
tagmap = [
<|file_name|>cli.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node 'use strict'; const fs = require('fs'); const repl = require('repl'); const program = require('commander'); const esper = require('..'); const Engine = esper.Engine; function enterRepl() { function replEval(cmd, context, fn, cb) { engine.evalDet...
-p, --print evaluate script and print result -c, --check syntax check script without executing -i, --interactive always enter the REPL even if stdin does not appear to be a terminal
<|file_name|>ToonidoApp.java<|end_file_name|><|fim▁begin|>package app.toonido.mindorks.toonido; import android.app.Application; import com.parse.Parse; /** * Created by janisharali on 30/09/15. */ public class ToonidoApp extends Application { @Override public void onCreate() { super.onCreate(); ...
Parse.initialize(this, ToonidoConstants.PARSE_APPLICATION_ID, ToonidoConstants.PARSE_CLIENT_KEY); }
<|file_name|>insc.py<|end_file_name|><|fim▁begin|># coding: utf-8 if DefLANG in ("RU", "UA"): AnsBase_temp = tuple([line.decode("utf-8") for line in ( "\nВсего входов - %d\nВремя последнего входа - %s\nПоследняя роль - %s", # 0 "\nВремя последнего выхода - %s\nПричина выхода - %s", # 1 "\nНики: %s", # 2 "Нет ...
"'%s' spent here - %s.", # 4 "You spent here - %s.", # 5 "No such user here." # 6 )
<|file_name|>_postgres_builtins.py<|end_file_name|><|fim▁begin|>""" pygments.lexers._postgres_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Self-updating data files for PostgreSQL lexer. :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ ...
'QUOTE',
<|file_name|>fabrics.go<|end_file_name|><|fim▁begin|>// // Copyright (c) 2018, Joyent, Inc. All rights reserved. // // 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/. //...
if err != nil {
<|file_name|>car_factory.rs<|end_file_name|><|fim▁begin|>use super::car_type::{Body, CarType, Colour}; pub struct CarFactory { car_types: Vec<CarType>, } impl CarFactory { pub fn new() -> CarFactory {<|fim▁hole|> pub fn get_car_type_id(&mut self, body: Body, colour: Colour) -> u8 { let position = ...
CarFactory { car_types: Vec::new(), } }
<|file_name|>BarChartDemoWebPart.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import * as ReactDom from 'react-dom'; import * as strings from 'BarChartDemoWebPartStrings'; import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, IPropertyPaneConfiguration, } from '@mi...
export interface IBarChartDemoWebPartProps {
<|file_name|>test_i3wm-formula.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_i3wm-formula ---------------------------------- Tests for `i3wm-formula` module. """ import unittest from i3wm-formula import i3wm-formula class TestI3wm-formula(unittest.TestCase): def setUp...
<|file_name|>KangXiZiDian-djvu2tiff.py<|end_file_name|><|fim▁begin|># This tool convert KangXiZiDian djvu files to tiff files. # Download djvu files: http://bbs.dartmouth.edu/~fangq/KangXi/KangXi.tar # Character page info: http://wenq.org/unihan/Unihan.txt as kIRGKangXi field. # Character seek position in Unihan.txt ht...
import os if __name__ == "__main__": os.system("mkdir tif")
<|file_name|>neoip_upnp_call_addport.hpp<|end_file_name|><|fim▁begin|>/*! \file \brief Declaration of the upnp_call_addport_t */ #ifndef __NEOIP_UPNP_CALL_ADDPORT_HPP__ #define __NEOIP_UPNP_CALL_ADDPORT_HPP__ /* system include */ /* local include */ #include "neoip_upnp_call_addport_cb.hpp" #include "neoip...
upnp_err_t start(const upnp_disc_res_t &disc_res, uint16_t port_pview, uint16_t port_lview , const upnp_sockfam_t &sock_fam, const delay_t &lease_delay , const std::string &description_str
<|file_name|>AvgCacheCalc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # This file is part of the pebil project. # # Copyright (c) 2010, University of California Regents # All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
print print "Reading files from: ", dirRead #gets the list of files with a matching sysid value
<|file_name|>transformer.py<|end_file_name|><|fim▁begin|># Authors: Mainak Jas <mainak@neuro.hut.fi> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Romain Trachel <trachelr@gmail.com> # # License: BSD (3-clause) import numpy as np from .mixin import TransformerMixin from .. import...
<|file_name|>array-type.ts<|end_file_name|><|fim▁begin|>import { string_type } from '../../constants'; import { emit } from '../../emit'; import { create_array_type, is_array_type } from '../array-type'; it('should return correctly', () => { expect( emit( create_array_type({ type: string_type, ...
type: string_type,
<|file_name|>nproc.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uu_nproc"] /* * This file is part of the uutils coreutils package. *<|fim▁hole|> */ extern crate getopts; extern crate num_cpus; #[cfg(unix)] extern crate libc; #[macro_use] extern crate uucore; use std::env; #[cfg(target_os = "linux")] pub con...
* (c) Michael Gehring <mg@ebfe.org> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code.
<|file_name|>permissions.py<|end_file_name|><|fim▁begin|>""" Provides a set of pluggable permission policies. """ from __future__ import unicode_literals from django.http import Http404 from rest_framework import exceptions from rest_framework.compat import is_authenticated SAFE_METHODS = ('GET', 'HEAD', 'OPTIONS') ...
if not user.has_perms(perms, obj): # If the user does not have permissions we need to determine if # they have read permissions to see 403, or not, and simply see
<|file_name|>import_tasks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: Ansible Project # 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 ANSIBLE_...
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>extern crate url; use url::percent_encoding::percent_decode; use regex; use json::{JsonValue, ToJson}; lazy_static! { pub static ref MATCHER: regex::Regex = regex::Regex::new(r":([a-z][a-z_]*)").unwrap(); } pub struct Path { regex: regex::Regex, pub path:...