prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>var path = require("path"); var webpack = require("webpack"); var ExtractTextPlugin = require('extract-text-webpack-plugin'); var pkg = require(path.join(process.cwd(), 'package.json')); var assetsPath = path.join(__dirname, "public","js"); var publicPa...
allChunks: true
<|file_name|>handsontable.full.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:59e6f2fa6c70c504d839d897c45f9a84348faf82342a31fb5818b1deb13861fa size 294301
<|file_name|>model_mutation.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The LUCI 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/L...
if cfg.DelayedMutations { if dm, ok := m.(DelayedMutation); ok { targetTime := dm.ProcessAfter() if dm.HighPriority() || targetTime.After(now) {
<|file_name|>stop.rs<|end_file_name|><|fim▁begin|>use async_trait::async_trait; use cucumber::given; use mimir::adapters::secondary::elasticsearch::remote::connection_test_pool; use mimir::domain::ports::secondary::remote::Remote; use snafu::ResultExt; use crate::error::{self, Error}; use crate::state::{GlobalState, S...
state .status_of(&IndexCosmogony { region: region.to_string(), dataset: dataset.to_string(),
<|file_name|>JavascriptCacheableList.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Este arquivo é parte do Biblivre5. * * Biblivre5 é um software livre; você pode redistribuí-lo e/ou * modificá-lo dentro dos termos da Licença Pública Geral GNU...
private JavascriptCache cache;
<|file_name|>bitsnoop.py<|end_file_name|><|fim▁begin|>from xbmctorrentV2 import plugin from xbmctorrentV2.scrapers import scraper from xbmctorrentV2.ga import tracked from xbmctorrentV2.caching import cached_route from xbmctorrentV2.utils import ensure_fanart from xbmctorrentV2.library import library_context BASE_URL...
"fmt": "rss",
<|file_name|>day23.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Solve day 23 of Advent of Code. http://adventofcode.com/day/23 """ class Computer: def __init__(self): """ Our computer has 2 registers, a and b, and an instruction pointer so that we know which instruct...
if getattr(self, register) == 1: self.jmp(offset) else: self.ip += 1
<|file_name|>SearchResults.js<|end_file_name|><|fim▁begin|>import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import pluralize from 'common/utils/pluralize'; import search from './actions'; import { selectSearchResultIds, selectIsSearching, selectIsSea...
ids: [], isSearching: false, isSearchComplete: false, };
<|file_name|>splitBySelector.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> onlyChildren = false }: { selector: string onlyChildren?: boolean }) => (markup: string) => { const rootNode = domify(markup) const markups = onlyChildren ? Array.from(rootNode.children) .filter(node => n...
import domify from '../domify/domify' const splitBySelector = ({ selector,
<|file_name|>bg.js<|end_file_name|><|fim▁begin|>/** * Todo: * - Allow hiding of trades (seperates upcoming and finished games) * - Allow auto-retry for when bots are down * - Allow auto-accept offers * - Create popup for browser action (next X games, my winnings) */ // CONSTANTS var GREEN = "#76EE00", ...
<|file_name|>signatures.go<|end_file_name|><|fim▁begin|>// // Copyright 2021 The Sigstore 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...
// distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License.
<|file_name|>backtrace.rs<|end_file_name|><|fim▁begin|>// Copyright 2014-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/...
fn backtrace(buf: *mut *mut libc::c_void, sz: libc::c_int) -> libc::c_int; }
<|file_name|>utils.rs<|end_file_name|><|fim▁begin|>//! Utilities useful for various generations tasks. use std::ops::{Index, IndexMut}; use std::mem; use std::iter; use std::collections::HashMap; use std::collections::hash_map::Entry; use num::Float; use na; use na::{Pnt3, Dim, Cross, Orig}; use ncollide_utils::{Hasha...
for i in 0 .. nsubdiv - 1 { out.push(Pnt3::new(base_circle + i, point, base_circle + i + 1));
<|file_name|>home.client.controller.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('core').controller('HomeController', ['$scope', 'Authentication', function($scope, Authentication) { // This provides Authentication context. $scope.authentication = Authentication; $scope.alerts = [ { icon...
icon:'glyphicon-calendar', color:'btn-primary',
<|file_name|>HealPetPet.py<|end_file_name|><|fim▁begin|>from neolib.plots.Step import Step from neolib.NST import NST import time class HealPetPet(Step): _paths = { 'links': '//*[@id="content"]/table/tr/td[2]//a/@href', 'img': '//*[@id="content"]/table/tr/td[2]/div/img/@src', 'cert': '//a...
<|file_name|>orphan.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|>BaseMvpFragment.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 The Android Open Source Project * * 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://w...
// ======================================================================== @Override public abstract P createPresenter();
<|file_name|>test_surface.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import unittest import os import random import numpy as np from pymatgen.core.structure import Structure from pymatgen.core.lattice import Lattice from pymatgen.core.surface import Slab, SlabGenerator, generate_all_slabs, \ get_symmetri...
else: #Cubic lattice is compatible with all other space groups. latt = Lattice.cubic(5) s = Structure.from_spacegroup(i, latt, ["H"], [[0, 0, 0]])
<|file_name|>lifecycle-core.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2005-2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * ...
<|file_name|>ipset.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2015 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.com> # # 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 S...
os.unlink(temp_file.name) if status != 0:
<|file_name|>intro.cpp<|end_file_name|><|fim▁begin|>/* ScummVM - Graphic Adventure Engine * * ScummVM is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. * * This program is free software; you can red...
/*
<|file_name|>explicit_null.rs<|end_file_name|><|fim▁begin|>use juniper::{ graphql_object, graphql_value, graphql_vars, EmptyMutation, EmptySubscription, GraphQLInputObject, Nullable, Variables, }; pub struct Context; impl juniper::Context for Context {} pub struct Query; #[derive(GraphQLInputObject)] struct...
"literalNullFieldIsExplicitNull": true, "noFieldIsExplicitNull": false, "emptyVariableObjectFieldIsExplicitNull": false,
<|file_name|>sync_client.js<|end_file_name|><|fim▁begin|>import SyncClient from 'sync-client'; const versions = [{<|fim▁hole|> version: 1, stores: { bookmarks: 'id, parentID', folders: 'id, parentID', }, }, { version: 2, stores: { bookmarks: 'id, parentID, *tags', folders: 'id, parentID', ...
<|file_name|>DocValuesGroupByOptimizedIteratorTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to Crate under one or more contributor license agreements. * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. Crate licenses this file * to you under the Apac...
<|file_name|>mypydoc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: iso-8859-1 -*- # """\ # Modifies the pydoc contained in Python to use the member function filelink # for filelink generation, so it can be later overridden. # See also http://bugs.python.org/issue902061 """ # # Copyright (C) 2009 ...
<|file_name|>u32.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
<|file_name|>test_security.py<|end_file_name|><|fim▁begin|># Copyright 2012-2015 Mattias Fliesberg # # This file is part of opmuse. # # opmuse is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either vers...
<|file_name|>server_query.rs<|end_file_name|><|fim▁begin|>use async_graphql::{Context, FieldResult}; use chrono::prelude::*; use eyre::{ // eyre, Result, // Context as _, }; use printspool_json_store::{JsonRow, Record}; // use async_graphql::{ // // ID, // // Context, // FieldResult, // }; // us...
// eg. Teg 0.1.0 for linux/x86_64 format!( "Teg {version_number}{dirty_string}", version_number = version_number,
<|file_name|>createDB.py<|end_file_name|><|fim▁begin|>import sqlite3 import sys import os def menu(): sane = 1 while sane == 1: print "[ - ] Please enter absolute path to cred. database to be created: " in_path = raw_input() if os.path.exists(in_path): os.system('cls' if os.name == 'nt' else 'clea...
<|file_name|>batch_conversion.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 Pi-Yueh Chuang <pychuang@gwu.edu> # # Distributed under terms of the MIT license. """convert the output file in a batch""" import os import os.path as op import sys impor...
<|file_name|>api_resource.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- <|fim▁hole|> Provides sane defaults and the logic needed to augment these settings with the internal ``class Meta`` used on ``Resource`` subclasses. """ allowed_methods = ['get', 'post', 'put', 'delete', 'patch'] list_a...
class ResourceOptions(object): """ A configuration class for ``Resource``.
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>DD_SAVE_DIR = 'home/pi/' DD_TIME_FORMAT = '%H:%S-%d-%m-%Y' MOUNT_DIR = '/mnt' FC_SAVE_DIR = '/home/pi/' FC_TIME_FORMAT = '%S:%H-%d-%m-%Y' POP_INDEX = 1 DEBUG = 0 PLANT_LOAD_DIR = '/home/pi/pruebas/'<|fim▁hole|><|fim▁end|>
PLANT_SAVE_DIR = '/'
<|file_name|>fov.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 Jeffery Olson // // Licensed under the 3-Clause BSD License, see LICENSE.txt // at the top-level of this repository. // This file may not be copied, modified, or distributed // except according to those terms. use std::vec::Vec; use std::default::...
<|file_name|>daterange-picker-test.js<|end_file_name|><|fim▁begin|>import { moduleForComponent, test } from 'ember-qunit';<|fim▁hole|>moduleForComponent('daterange-picker', 'DaterangePickerComponent', { // specify the other units that are required for this test // needs: ['component:foo', 'helper:bar'] }); tes...
<|file_name|>RunFlask.py<|end_file_name|><|fim▁begin|>#We don't use sagenb.notebook.run_notebook because we want the server in the same python environment as our app so we have access to the Notebook and Worksheet objects. ######### # Flask # ######### import os, random from guru.globals import GURU_PORT, GURU_NOTEB...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#=============================================================================== # Copyright (C) 2014-2019 Anton Vorobyov # # This file is part of Phobos. # # Phobos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Gener...
# GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with Phobos. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>import.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Pilosa Corp. // // 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 // ...
// limitations under the License. package cmd
<|file_name|>DateTimeAuthenticationRequestRiskCalculatorTests.java<|end_file_name|><|fim▁begin|>package org.apereo.cas.impl.calcs; import org.apereo.cas.api.AuthenticationRiskEvaluator; import org.apereo.cas.api.AuthenticationRiskScore; import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authent...
<|file_name|>AlertMessageView_spec.js<|end_file_name|><|fim▁begin|>define( [ 'views/AlertMessageView',<|fim▁hole|> ], function (AlertMessageView, Mediator) { describe('AlertMessageView', function () { var resultsCollection, view, mediator; beforeEach(function () { resultsCollection = ...
'lib/Mediator'
<|file_name|>fig4.py<|end_file_name|><|fim▁begin|>#### # Figure 4 # needs: # - data/*.npz produced by run.py #### import glob import sys sys.path.append('..') from lib.mppaper import * import lib.mpsetup as mpsetup import lib.immune as immune files = sorted((immune.parse_value(f, 'epsilon'), f) for f in glob.glob("d...
<|file_name|>CycleResource.java<|end_file_name|><|fim▁begin|>package com.douwe.notes.resource.impl; import com.douwe.notes.entities.Cycle; import com.douwe.notes.resource.ICycleResource; import com.douwe.notes.service.ICycleService; import com.douwe.notes.service.IInsfrastructureService; import com.douwe.notes.service...
<|file_name|>ssf_reader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -*- coding:utf-8 -*- __Author__ = "Riyaz Ahmad Bhat" __Email__ = "riyaz.ah.bhat@gmail.com" import re from collections import namedtuple from sanity_checker import SanityChecker class DefaultList(list): """Equivalent of Default dictionari...
<|file_name|>life_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Aleksandr Demeshko. All rights reserved. // conway project // life_test.go package conway import ( "fmt" // "testing" ) <|fim▁hole|> Cell{0, 0}: 0, }, popNumber: 0, } p.Next() fmt.Println(p) // Output: {map[] 1} } func Example_twoCell...
func Example_singleCell() { var p = Population{cells: map[Cell]int{
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#encoding:utf-8 subreddit = 'jacksepticeye' t_channel = '@r_jacksepticeye' def send_post(submission, r2t):<|fim▁hole|><|fim▁end|>
return r2t.send_simple(submission)
<|file_name|>chops.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate holmes; use holmes::simple::*; extern crate tiamat; extern crate bap; use bap::high::bitvector::BitVector; #[test] pub fn chop_2() {<|fim▁hole|> single(&|holmes, core| { tiamat::uaf(vec!["./samples/chops/2.so".to_string()], 20, fal...
<|file_name|>rpcprotocol.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2013 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "rpcprotocol.h" #in...
"<BODY><H1>401 Unauthorized.</H1></BODY>\r\n" "</HTML>\r\n", rfc1123Time(), FormatFullVersion());
<|file_name|>departures_gui.cpp<|end_file_name|><|fim▁begin|>/* $Id$ */ /* * This file is part of OpenTTD. * OpenTTD 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, version 2. * OpenTTD is distributed in the h...
template<bool Twaypoint> void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
<|file_name|>lib.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. //<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>textmate.js<|end_file_name|><|fim▁begin|>define([ "less!theme/textmate.less" ], function(cssContent) { return { 'isDark': false, 'cssClass': "ace-tm", 'cssText': cssContent<|fim▁hole|><|fim▁end|>
} });
<|file_name|>memchr.rs<|end_file_name|><|fim▁begin|>const LO_U64: u64 = 0x0101010101010101; const HI_U64: u64 = 0x8080808080808080; // use truncation const LO_USIZE: usize = LO_U64 as usize; const HI_USIZE: usize = HI_U64 as usize; #[cfg(target_pointer_width = "32")] const USIZE_BYTES: usize = 4; #[cfg(target_pointer...
<|file_name|>gyro_plot.py<|end_file_name|><|fim▁begin|># This is an example of popping a packet from the Emotiv class's packet queue # and printing the gyro x and y values to the console. from emokit.emotiv import Emotiv import platform if platform.system() == "Windows": import socket # Needed to prevent gevent ...
<|file_name|>test_types.py<|end_file_name|><|fim▁begin|>from datetime import date, time try: from decimal import Decimal haveDecimal = True except ImportError: haveDecimal = False from twisted.internet import defer from twisted.trial import unittest import formal from formal import validation class TestVa...
([], {'missing': 'bar'}, 'foo', 'foo'), ([], {'missing': 'bar'}, '', 'bar'), ([], {'strip': True, 'missing': ''}, ' ', ''), ])
<|file_name|>test_item.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 unittest import frappe from frappe.test_runner import make_test_objects from erpnext.cont...
"item_tax_rate": '{}', "uom": "_Test UOM",
<|file_name|>generatemedia.py<|end_file_name|><|fim▁begin|>from ...api import generate_media, prepare_media from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Combines and compresses your media files and saves them in _generated_media.' <|fim▁hole|> generate_media()<|fim...
requires_model_validation = False def handle(self, *args, **options): prepare_media()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// put actual stuff here pub use self::cachedefs::{AccessType, CacheStats, CacheBlock, Cache, VictimCache}; pub mod cachedefs; #[derive(Debug)] pub struct CacheSystem { pub stats: CacheStats, pub l1: Cache, pub vc: VictimCache, pub l2: Cache, } impl C...
break; }
<|file_name|>pipe.spec.ts<|end_file_name|><|fim▁begin|>//import {it, describe, expect, beforeEach, inject} from '@angular/testing'; import {DurationFormat} from './duration.pipe'; describe('MyPipe Tests', () => { let pipe:DurationFormat; beforeEach(() => { pipe = new DurationFormat(); }); i...
} ) });
<|file_name|>y.go<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Dgraph Labs, Inc. and Contributors * * 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...
// One problem is with n distinct sizes in random order it'll reallocate log(n) times. type Slice struct {
<|file_name|>population.py<|end_file_name|><|fim▁begin|>"""Provide infrastructure to allow exploration of variations within populations. Uses the gemini framework (https://github.com/arq5x/gemini) to build SQLite database of variations for query and evaluation. """ import collections import csv from distutils.version ...
<|file_name|>scope_wrapper.rs<|end_file_name|><|fim▁begin|>use std::default::Default; use communication::Communicator; use progress::frontier::{MutableAntichain, Antichain}; use progress::{Timestamp, Scope}; use progress::nested::Target; use progress::nested::subgraph::Target::{GraphOutput, ScopeInput}; use progress...
self.name = format!("{}(tombstone)", self.name); } // for each output: produced messages and internal progress
<|file_name|>pagination-simple.ts<|end_file_name|><|fim▁begin|>import { ensureSafeComponent } from '@embroider/util'; import ModelsTablePaginationSimpleComponent from '../../themes/default/pagination-simple'; import { getBsButton, getBsForm } from '../../../../utils/emt/themes/ebs'; export default class PaginationSimp...
}
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' Created on Jan 6, 2018 @author: consultit ''' from panda3d.core import Filename import sys, os from subprocess import call ### NOTE: currently this script works only on GNU/Linux currdir = os.path.abspath(sys.path[0]) builddir = Filename.f...
args = ['build.py', '--dir', moduledir, '--libs', libtools, '--libs_src', toolsdir, '--clean'] call(['/usr/bin/python'] + args)
<|file_name|>TutorialTVScenes.py<|end_file_name|><|fim▁begin|># Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.tutorial.TutorialTVScenes from panda3d.core import Camera from direct.task.Task import Task from otp.avatar import Emote from toontown.television.TVScenes import * from toontown.televis...
for id, posHpr in self.ToonPos.iteritems():
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># __init__.py # Copyright (C) 2006, 2007, 2008, 2009, 2010 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php <|fim▁hole|>__version__ = '0.3.4'<|fim...
<|file_name|>0003_auto_20170116_1142.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 = [ ('autodidact', '0002_auto_20161004_1251'), ] operations = [ ...
), migrations.AlterField( model_name='course',
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>""" Application file for the code snippets app. """ from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ class SnippetsConfig(AppConfig): """ Application configuration class for the code snippets app. """ name = '...
<|file_name|>virtualmachinescalesetvms.go<|end_file_name|><|fim▁begin|>package compute // Copyright (c) Microsoft and contributors. 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...
if err != nil { err = autorest.NewErrorWithError(err, "compute.VirtualMachineScaleSetVMsClient", "Restart", result.Response(), "Failure sending request")
<|file_name|>a.after.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import foo<|fim▁end|>
<|file_name|>dom_html_canvas_element.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use DOMElement; use DOMEventTarget; use DOMHTMLElement; use DOMNode; use DOMObject; use glib::object::Cast; use g...
<|file_name|>drop-list-ref.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 {ElementRef, NgZone} from '@angular/core'; import {...
currentIndex: number, container: DropListRef, item: DragRef
<|file_name|>default.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ pygments.styles.default ~~~~~~~~~~~~~~~~~~~~~~~ The default highlighting style. :copyright: 2007 by Tiberius Teng. :copyright: 2006 by Georg Brandl. :license: BSD, see LICENSE for more details. """ from pygments....
Name.Builtin: "#008000", Name.Function: "#0000FF", Name.Class: "bold #0000FF", Name.Namespace: "bold #0000FF",
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># 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. # -----...
<|file_name|>newlines.py<|end_file_name|><|fim▁begin|>from SCons.Script import * def exists(env): return (env["PLATFORM"]=="win32") def ConvertNewlines(target,source,env): for t,s in zip(target,source): f_in=open(str(s),"rb") f_out=open(str(t),"wb") f_out.write(f_in.read().replace("\n"...
env["BUILDERS"]["ConvertNewlinesB"]=Builder(action=ConvertNewlinesB,suffix=".txt")
<|file_name|>HttpRequest.java<|end_file_name|><|fim▁begin|>package jenkins.plugins.http_request; import static com.google.common.base.Preconditions.checkArgument; import java.io.IOException; import java.io.PrintStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.M...
String[] fromTo = code.trim().split(":");
<|file_name|>_pgsql.py<|end_file_name|><|fim▁begin|># The Admin4 Project # (c) 2013-2014 Andreas Pflug # # Licensed under the Apache License, # see LICENSE.TXT for conditions of usage # http://initd.org/psycopg/docs/ import psycopg2 import select import logger import adm import re import threading from wh import xlt...
<|file_name|>_axis.py<|end_file_name|><|fim▁begin|>"""Axis class and associated.""" # --- import -------------------------------------------------------------------------------------- import re import numexpr import operator import functools import numpy as np from .. import exceptions as wt_exceptions from .. im...
@property def units_kind(self) -> str: """Units kind."""
<|file_name|>SearchExpressionTests.cpp<|end_file_name|><|fim▁begin|>#include "catch.hpp" #include "SearchExpression.hpp" using namespace quip; <|fim▁hole|>TEST_CASE("Search expressions can be constructed from an empty expression.", "[SearchExpressionTests]") { SearchExpression expression(""); REQUIRE_FALSE(exp...
<|file_name|>f5bigip_sys_crypto_cert.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016-2018, Eric Jacob <erjac77@gmail.com> # # 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...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![crate_type="staticlib"] #![feature(alloc)] #![feature(allocator)] #![feature(arc_counts)] #![feature(augmented_assignments)] #![feature(asm)] #![feature(box_syntax)] #![feature(collections)] #![feature(const_fn)] #![feature(core_intrinsics)] #![feature(core_str_ext)]...
}
<|file_name|>IGridColumn.ts<|end_file_name|><|fim▁begin|>export interface IGridColumn { name: string; title: string;<|fim▁hole|>}<|fim▁end|>
type: string; value?: any;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2008 Aldo Cortesi # Copyright (c) 2011 Mounier Florian # Copyright (c) 2012 dmpayton # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 roger # Copyright (c) 2014 Pedro Algarvio # Copyright (c) 2014-2015 Tycho Andersen # # Permiss...
# in the Software without restriction, including without limitation the rights
<|file_name|>test_octodns_provider_dnsimple.py<|end_file_name|><|fim▁begin|># # # from __future__ import absolute_import, division, print_function, \ unicode_literals from mock import Mock, call from os.path import dirname, join from requests import HTTPError from requests_mock import ANY, mock as requests_mock f...
call('DELETE', '/zones/unit.tests/records/11189899'), call('DELETE', '/zones/unit.tests/records/11189897'),
<|file_name|>test_base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function import re import sys from datetime import datetime, timedelta import numpy as np import pandas as pd import pandas.compat as compat import pandas.core.common as com import pandas.util.testing as tm fr...
<|file_name|>layout.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (b7f5189) from gir-files (71d73f0) // DO NOT EDIT use Adjustment; use Container; use Scrollable; use Widget; use ffi; use gdk; use glib::Value; use glib::object::Downcast; use glib::object::IsA; use glib::translate::*; use gobject_ff...
unsafe { gobject_ffi::g_object_set_property(self.to_glib_none().0, "height".to_glib_none().0, Value::from(&height).to_glib_none().0);
<|file_name|>bitcoin_cs.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About taobaocoin</source> ...
</message> <message>
<|file_name|>buildCts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (C) 2009 The Android Open Source Project # # 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://...
<|file_name|>add-ebook.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import {Router, ActivatedRoute, Params} from '@angular/router'; import { FlashMessagesService } from 'angular2-flash-messages'; import { LearnService } from '../../services/learn.service'; import { AuthSe...
) { }
<|file_name|>4Sum.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012 Binson Zhang. All rights reserved. * * @author Binson Zhang <bin183cs@gmail.com> * @date 2012-12-11 */ #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: struct TwoSum { int sum...
std::cout << "Input:\n"; Output(num);
<|file_name|>utils.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 rustc::front::map as ast_map; use rustc::lint::{LateContext...
Some(ast_map::NodeItem(itm)) => { match itm.node { hir::ItemFn(_, style, _, _, _, _) => match style {
<|file_name|>agent_manager.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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 ...
def _setup_rpc(self): self.plugin_rpc = agent_api.LbaasAgentApi(
<|file_name|>BleReceiveDataProvider.java<|end_file_name|><|fim▁begin|>package jp.co.thcomp.bluetoothhelper; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; public class BleReceiveDataProvider extends BleDataProvider { ...
int packetSize = tempBufferForInt.getInt(0);
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import requests import time import math import datetime import random import envoy import jsonfield import logging import urllib from collections import defaultdict from magic_repr import make_repr from hashlib import md5, sha1 from ...
date_joined = models.DateTimeField('date joined', default=timezone.now)
<|file_name|>binop.rs<|end_file_name|><|fim▁begin|>use std::ops::{Add, Sub, Mul, Div}; /// Binary numeric operators #[derive(Copy, Clone, PartialEq, Eq, Debug)] pub enum BinOp { /// a + b Add, /// a - b Sub, /// b - a SubSwap, /// a * b Mul, /// a / b Div, /// b / a DivS...
BinOp::SubSwap => BinOp::SubSwap, BinOp::Mul => BinOp::Div, BinOp::Div => BinOp::Mul, BinOp::DivSwap => BinOp::DivSwap,
<|file_name|>TestValues.cpp<|end_file_name|><|fim▁begin|>// TestValues.cpp : Test XML encoding and decoding of XmlRpcValues. #include <stdlib.h> #include "XmlRpcValue.h" #include <assert.h> #include <iostream> using namespace XmlRpc; void testBoolean() { XmlRpcValue booleanFalse(false); XmlRpcValue booleanT...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging from mimeprovider.documenttype import get_default_document_types from mimeprovider.client import get_default_client from mimeprovider.exceptions import MimeException from mimeprovider.exceptions import MimeBadRequest from mimeprovider.mimerenderer ...
self.register(*documents) def _validate(self, document): if not hasattr(document, "object_type"):
<|file_name|>TimerPage.js<|end_file_name|><|fim▁begin|>var React = require('react'); var Animation = require('react-addons-css-transition-group'); var NBButton = require('./NBItems').NBButton; var NBTitle = require('./NBItems').NBTitle; var NBEmpty = require('./NBItems').NBEmpty; var Navbar = React.createClass({ r...
var PageContent = React.createClass({ componentWillMount: function() {
<|file_name|>interface.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The html5ever Project Developers. See the // COPYRIGHT file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license ...
force_quirks: false, }
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os, argparse from flask import Flask parser = argparse.ArgumentParser() #настройка аргументов принимаемых с консоли parser.add_argument("--port", default='7000', type=int, help='Port to listen'), parser.add_argument("--hash-algo", d...
app.config['UPLOAD_FOLDER'] = os.path.join(BASE_DIR, content_dir) app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 #Максимальный размер загружаемых файлов (16 mb)
<|file_name|>GeneralSettings.tsx<|end_file_name|><|fim▁begin|>import React, { useState } from 'react'; import { connect, ConnectedProps } from 'react-redux'; import { TimeZone } from '@grafana/data'; import { CollapsableSection, Field, Input, RadioButtonGroup, TagsInput } from '@grafana/ui'; import { selectors } from '...
updateTimeZone: updateTimeZoneDashboard,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rustc_serialize; use rustc_serialize::json; #[derive(RustcDecodable, RustcEncodable)] struct Command { cid: u64, uid: u32, target: String, } fn get_string(cmd: &Command) -> String {<|fim▁hole|> let bs = Command{ cid: 0, uid: 1, target: "something...
return json::encode(&cmd).unwrap(); } fn main(){
<|file_name|>color.py<|end_file_name|><|fim▁begin|>#Written by: Karim shoair - D4Vinci ( Dr0p1t-Framework ) import sys from os.path import * global G, Y, B, R, W , M , C , end def set_colors(): global G, Y, B, R, W , M , C , end if sys.platform.startswith('win'): # Windows deserve coloring too :D try: import ...