prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>waybacktrack.py<|end_file_name|><|fim▁begin|>"""waybacktrack.py Use this to extract Way Back Machine's url-archives of any given domain! TODO: reiterate entire design! """ import time import os import urllib2 import random from math import ceil try: from cStringIO import StringIO as BytesIO except Imp...
#snapshot_age_span is a percentage of total snapshots to process from #the given year
<|file_name|>update_expanded_text_ad.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.a...
'description': 'Best space cruise ever.', 'finalUrls': ['http://www.example.com'],
<|file_name|>filter.test.ts<|end_file_name|><|fim▁begin|>import {assert, should, test} from 'gs-testing'; import {filter} from './filter'; import {$pipe} from './pipe'; test('@tools/collect/operators/filter', () => { should('exclude items that do not pass the check function', () => { assert($pipe(new Set([1, 2,...
}); });
<|file_name|>point.py<|end_file_name|><|fim▁begin|>import re from itertools import islice #from geopy import util, units, format import util, units, format class Point(object): """ A geodetic point with latitude, longitude, and altitude. Latitude and longitude are floating point values in degrees. ...
return self def __getitem__(self, index): return (self.latitude, self.longitude, self.altitude)[index]
<|file_name|>copy-to-clipboard.tsx<|end_file_name|><|fim▁begin|>/* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ import * as copy_to_clipboard from "copy-to-clipboard"; import { CSS, React, ReactDOM, useRef, useState } from "...
interface Props { value: string; button_before?: JSX.Element; // Button to place before the copy text
<|file_name|>__foogallery.js<|end_file_name|><|fim▁begin|>(function($, _){ /** * @summary A reference to the jQuery object the plugin is registered with. * @memberof FooGallery * @function $ * @type {jQuery} * @description This is used internally for all jQuery operations to help work around issues where mu...
<|file_name|>TestAsyncTableScanException.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 f...
<|file_name|>0003_auto__del_field_campaign_photo__add_field_campaign_image.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def for...
db.add_column(u'campaign_campaign', 'image', self.gf('cloudinary.models.CloudinaryField')(default=0, max_length=100),
<|file_name|>elCmd.py<|end_file_name|><|fim▁begin|>"""A generic class to build line-oriented command interpreters. Interpreters constructed with this class obey the following conventions: 1. End of file on input is processed as the command 'EOF'. 2. A command is parsed out of each line by collecting the prefix compos...
import string, sys
<|file_name|>emiter.spec.ts<|end_file_name|><|fim▁begin|>import { LuaArray } from "@wowts/lua"; import { test, beforeEach, expect } from "@jest/globals"; import { IMock, Mock } from "typemoq"; import { AstAnnotation, AstFunctionNode, AstNode, AstNodeSnapshot, OvaleASTClass, } from "../engine/ast"; i...
context.annotation = Mock.ofType<Annotation>(); context.astAnnotation = Mock.ofType<AstAnnotation>(); context.nodeList = {}; context.astAnnotation
<|file_name|>education_summary_v30.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagge...
def visibility(self): """Gets the visibility of this EducationSummaryV30. # noqa: E501
<|file_name|>blockutils.go<|end_file_name|><|fim▁begin|>/* Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ package protoutil import ( "bytes" "crypto/sha256" "encoding/asn1" "math/big" "github.com/golang/protobuf/proto" cb "github.com/hyperledger/fabric-protos-go/common" "gith...
func GetChannelIDFromBlock(block *cb.Block) (string, error) {
<|file_name|>shortlex_ordered_unique_vecs.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools; use malachite_base::bools::exhaustive::exhaustive_bools; use malachite_base::chars::exhaustive::exhaustive_ascii_chars; use malachite_base::nevers::nevers; use malachite_base::tuples::exhaustive::exhaustive_units; use ma...
<|file_name|>tie.js<|end_file_name|><|fim▁begin|>/*! TieJS - http://develman.github.io/tiejs Licensed under the MIT license Copyright (c) 2018 Georg Henkel <g.henkel@cg-solutions.de>, Christoph Huppertz <c.huppertz@cg-solutions.de> Permission is hereby granted, free of charge, to any person obtaining a copy of th...
if (data.required) {
<|file_name|>print.py<|end_file_name|><|fim▁begin|># Various functions for printing various specific values # in human-readable format import sys import time import pprint # pretty print object pp = pprint.PrettyPrinter(indent=4) def pretty_print(value): pp.pprint(value) # print timedelta, provided in seconds,...
percentage=progress)) sys.stdout.flush()
<|file_name|>NetTask.java<|end_file_name|><|fim▁begin|>// Copyright 2013 Shaun Simpson shauns2029@gmail.com package uk.co.immutablefix.wifireset;<|fim▁hole|> import java.net.InetAddress; import java.net.UnknownHostException; import android.os.AsyncTask; public class NetTask extends AsyncTask<String, Integer, String>...
<|file_name|>scripts.js<|end_file_name|><|fim▁begin|>var encodeDecode = function() { var randomNum = function (min, max) { // helper function for random numbers return Math.random() * (max - min) + min; }; var insertBreak = function (counter) { //helper function to break lines @ 100 char if (counter ...
lineCounter++;
<|file_name|>gather.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # gather.py lookup_terms = [ {'program' :'email_outlook.py', 'known_as':['email', 'mail', 'outlook', 'messages', 'sent items', 'inbox', 'spam'] }, {'program' :'sys_PC_usage.py', 'known_as':['PC usage', 'Applicati...
""" This is the main function gather which defines
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__version__ = "1.12.0"<|fim▁hole|><|fim▁end|>
__version_info__ = ( 1, 12, 0 )
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewChild } from '@angular/core'; import { jqxGridComponent } from '../../../../../jqwidgets-ts/angular_jqxgrid' @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent { @ViewChild...
let city = '<div style="margin: 10px;"><b>City:</b> ' + datarecord.city + '</div>'; let phone = '<div style="margin: 10px;"><b>Phone:</b> ' + datarecord.homephone + '</div>';
<|file_name|>pyStructureEventTest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from Acspy.Nc.CommonNC import CommonNC from Acspy.Nc.Supplier import Supplier import datacapEx from datacapEx import ExecBlockProcessedEvent, DataCapturerId, ExecBlockStartedEvent, ScanStartedEvent import asdmEX s = ...
s.publishEvent(name)
<|file_name|>issue-4972.rs<|end_file_name|><|fim▁begin|>// Copyright 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/lice...
A(Box<MyTrait>), }
<|file_name|>alphabet.rs<|end_file_name|><|fim▁begin|>use text::letter::Letter; use graphics::rectangle::Rectangle; use std::collections::HashMap; use text::font::Font; pub struct Alphabet<'r> { font: &'r Font<'r>, alphabet: HashMap<char, Letter>, } impl<'r> Alphabet<'r> { pub fn new(font: &'r Font) -> ...
let mut alphabet = HashMap::new(); // TODO: use font atlas for this. let letter = Letter::new('a', Rectangle::empty(), Rectangle::new(0.0, 0.0, 9.0, 15.0));
<|file_name|>MyInterface6.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008 Universidade Federal de Campina Grande * * This file is part of Commune. *<|fim▁hole|> * Software Foundation, either version 3 of the License, or (at your option) * any later version. * * This program is distributed in the ...
* Commune is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free
<|file_name|>test_requesting_sprints_for_task.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************** ** ** Copyright (C) 2016-2021 Pavel Pavlov. ** ** ** This file is part of SprintTimer. ** ** SprintTimer is free software: you can redistribute it and/or modif...
using namespace sprint_timer::use_cases; using namespace sprint_timer::entities; using namespace sprint_timer::compose;
<|file_name|>server.js<|end_file_name|><|fim▁begin|>'use strict'; /**<|fim▁hole|> config = require('./config/config'), mongoose = require('mongoose'), chalk = require('chalk'); /** * Main application entry file. * Please note that the order of loading is important. */ // Bootstrap db connection var db = mongoose...
* Module dependencies. */ var init = require('./config/init')(),
<|file_name|>panic-handler-bad-signature-1.rs<|end_file_name|><|fim▁begin|>// compile-flags:-C panic=abort #![no_std] #![no_main] use core::panic::PanicInfo; #[panic_handler] fn panic( info: PanicInfo, //~ ERROR argument should be `&PanicInfo` ) -> () //~ ERROR return type should be `!` {<|fim▁hole|><|fim▁end|>
}
<|file_name|>test_withdrawn_registrations.py<|end_file_name|><|fim▁begin|>from urlparse import urlparse from api_tests.nodes.views.test_node_contributors_list import NodeCRUDTestCase from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from framework.auth.core import Auth from tes...
<|file_name|>seqmapping.py<|end_file_name|><|fim▁begin|>""" Classes for char-to-int mapping and int-to-int mapping. :Author: James Taylor (james@bx.psu.edu) The char-to-int mapping can be used to translate a list of strings over some alphabet to a single int array (example for encoding a multiple sequence alignment)....
<|file_name|>p5.dom.js<|end_file_name|><|fim▁begin|>/*! p5.dom.js v0.3.3 May 10, 2017 */ /** * <p>The web is much more than just canvas and p5.dom makes it easy to interact * with other HTML5 objects, including text, hyperlink, image, input, video, * audio, and webcam.</p> * <p>There is a set of creation methods, D...
* ] * },
<|file_name|>ChromeTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Atanas Stoychev Kanchev * 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...
.setCap(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 60) .setCap(MobileCapabilityType.FULL_RESET, false)
<|file_name|>results-selling.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; //Language import { Language } from '../../language/language'; import { LanguageService } from '../../language/language.service'; <|fim▁hole|>@Component({ selecto...
//Objects import { Company } from '../../objects/company'; import { Situation } from '../../objects/result/situation';
<|file_name|>NonCodeUsageGroupingRule.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2015 JetBrains s.r.o. * * 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....
super(2);
<|file_name|>batch_norm_kernel.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2022 PaddlePaddle 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 // // h...
#include "paddle/fluid/framework/tensor_util.h" namespace phi {
<|file_name|>events.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # 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://ww...
def delete(self): return self.manager.delete(self)
<|file_name|>PassExecutorService.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.codeInsight.daemon.impl; import com.intellij.codeHighlighting.EditorBoundHighlightingPass...
Map<FileEditor, List<TextEditorHighlightingPass>> documentBoundPasses = new HashMap<>(); Map<FileEditor, List<EditorBoundHighlightingPass>> editorBoundPasses = new HashMap<>(); Map<FileEditor, Int2ObjectMap<TextEditorHighlightingPass>> id2Pass = new HashMap<>();
<|file_name|>GithubException.py<|end_file_name|><|fim▁begin|>############################ Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012...
class BadUserAgentException(GithubException): """
<|file_name|>binding.rs<|end_file_name|><|fim▁begin|>use libc::{c_char, c_int, c_short, c_uchar, c_void, int16_t, int32_t, int64_t, uint16_t, size_t, time_t}; /// Opaque Pointer of hdfsFS #[allow(non_camel_case_types)] pub enum hdfsFS {} /// Opaque Pointer of hdfsFile #[allow(non_camel_case_types)] pub enum hdfsFi...
/// #### Params
<|file_name|>gain.cpp<|end_file_name|><|fim▁begin|>/* * gain.cpp * * Created on: Sep 28, 2009 * Author: dc */ #include <ostream> #include <gtest/gtest.h> #include <barrett/systems/gain.h> #include <barrett/systems/manual_execution_manager.h> #include <barrett/systems/helpers.h> #include "./exposed_io_system...
<|file_name|>Otomata.py<|end_file_name|><|fim▁begin|>""" RUN FROM THIS FILE Alexandre Yang ITP 115 Final Project 05/08/2014 Description: Refer to readme.txt """ import pygame from Oto import Oto from Button import Button from Label import Label # Input: pygame.Surface, tuple, int, int, int, int # Output: none # Si...
Oto.changeInstrument("trumpet")
<|file_name|>sigqueue.go<|end_file_name|><|fim▁begin|>// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // This file implements runtime support for signal handling. // // Most synchronization primitives are not...
"runtime/internal/atomic" "unsafe" )
<|file_name|>guildlist.py<|end_file_name|><|fim▁begin|>from discord import Embed from bot import Command, categories class GuildList(Command): def __init__(self, bot): super().__init__(bot)<|fim▁hole|> async def handle(self, cmd): if not cmd.is_pm: await cmd.answer('$[guildlist-an...
self.name = 'guildlist' self.aliases = ['guilds'] self.category = categories.SETTINGS self.bot_owner_only = True
<|file_name|>sePlacer.py<|end_file_name|><|fim▁begin|>""" DIRECT Nine DoF Manipulation Panel """ from direct.showbase.DirectObject import DirectObject from direct.directtools.DirectGlobals import * from direct.tkwidgets.AppShell import AppShell from direct.tkwidgets.Dial import AngleDial from direct.tkwidgets.Floater ...
def zeroHpr(self): self.xformStart(None) self.updateHprWidgets(ZERO_VEC)
<|file_name|>domains.js<|end_file_name|><|fim▁begin|>/** * Sitespeed.io - How speedy is your site? (https://www.sitespeed.io) * Copyright (c) 2014, Peter Hedenskog, Tobias Lidskog * and other contributors * Released under the Apache 2.0 License */ 'use strict'; var util = require('../util/util'), RequestTiming =...
domain.connect.add(entry.timings.connect, entry.request.url, pageURL); domain.ssl.add(entry.timings.ssl, entry.request.url, pageURL);
<|file_name|>map_reduce_part2.py<|end_file_name|><|fim▁begin|>''' SI 618 - HW 4: Map-Reduce Part 2<|fim▁hole|>''' from mrjob.job import MRJob from mrjob.step import MRStep import re WORD_RE = re.compile(r"\b[\w']+\b") class MRMostUsedWord(MRJob): def mapper_get_words(self, _, line): for word in WORD_RE.findall(l...
Uniqname: gracfu
<|file_name|>editor.js<|end_file_name|><|fim▁begin|><|fim▁hole|> ed.addCommand('mcekotofey_shortcodes', function() { ed.windowManager.open({ file : url + '/interface.php', width : 290 + ed.getLang('kotofey_shortcodes.delta_width', 0), height : 150 + ed.getLang('kotofey_shortcodes.delta_height', 0)...
(function() { tinymce.PluginManager.requireLangPack('kotofey_shortcodes'); tinymce.create('tinymce.plugins.kotofey_shortcodes', { init : function(ed, url) {
<|file_name|>tests.py<|end_file_name|><|fim▁begin|><|fim▁hole|># No tests<|fim▁end|>
from django.test import TestCase
<|file_name|>menu.test.ts<|end_file_name|><|fim▁begin|>import '@toba/test'; import { MockRequest, MockResponse } from '@toba/test'; import { Header } from '@toba/tools'; import { menu } from '../controllers/'; import { Page } from '../views/'; const req = new MockRequest(); const res = new MockResponse(req); beforeEa...
<|file_name|>variable_length_fields.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Robert Clipsham <robert@octarineparrot.com> // // 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/license...
payload: Vec<u8> }
<|file_name|>ImageViewCairo.py<|end_file_name|><|fim▁begin|># # ImageViewCairo.py -- classes for the display of Ginga canvases # in Cairo surfaces # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD licens...
cr.set_source_rgb(1.0, 0.0, 0.0) cr.set_line_width(1)
<|file_name|>persistor.py<|end_file_name|><|fim▁begin|>import boto3 import botocore import tarfile import os import shutil class Persistor(object): def __init__(self, data_dir, aws_region, bucket_name): self.data_dir = data_dir self.s3 = boto3.resource('s3', region_name=aws_region) self.bu...
with tarfile.open(filename, "r:gz") as tar: tar.extractall(self.data_dir)
<|file_name|>states.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from helpers import flatten, merge, add, search import sys import os import yaml import boto3 import termcolor def str_presenter(dumper, data): if len(data.splitlines()) == 1 and data[-1] == '\n': return dumper.repres...
return flatten(output) if flat else output except IOError as e: print(e, file=sys.stderr)
<|file_name|>utils.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::path::{Path, PathBuf}; use std::fs::{self, File}; use rustc_serialize::{Encodable, Encoder}; use url::Url; use git2::{self, ObjectType}; use core::GitReference; use util::{CargoResult, ChainError, human, ToUrl, internal}; #[derive(PartialEq, C...
let obj = try!(self.repo.find_object(id, None)); let obj = try!(obj.peel(ObjectType::Commit));
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import tests.test_graph import tests.test_output<|fim▁end|>
import unittest import tests import tests.test_logic
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate futures; use futures::{Future, Poll}; const BUFFER_SIZE: usize = 1; pub struct Error(::std::io::Error); <|fim▁hole|>struct Dummy<T>(T); impl<T> Future for Dummy<T> { type Item = T; type Error = Error; fn poll(&mut self) -> Poll<Self::Item, Self...
<|file_name|>vpcdhcpoptionsassociation_fitask.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/lic...
<|file_name|>interfaceorg_1_1onosproject_1_1grpc_1_1Port_1_1PortStatisticsOrBuilder.js<|end_file_name|><|fim▁begin|>var interfaceorg_1_1onosproject_1_1grpc_1_1Port_1_1PortStatisticsOrBuilder = [<|fim▁hole|> [ "getPort", "interfaceorg_1_1onosproject_1_1grpc_1_1Port_1_1PortStatisticsOrBuilder.html#af9c20290d571c3f0b6b...
[ "getPacketsReceived", "interfaceorg_1_1onosproject_1_1grpc_1_1Port_1_1PortStatisticsOrBuilder.html#a190993a33fa895f9d07145f3a04f5d22", null ], [ "getPacketsSent", "interfaceorg_1_1onosproject_1_1grpc_1_1Port_1_1PortStatisticsOrBuilder.html#ae9a71f2c48c5430a348eba326eb6d112", null ],
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: UTF-8 -*- # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: import os from setuptools import setup, find_packages def get_version(): basedir = os.path.dirname(__file__) with open(os.path.join(basedir, 'instapush/version...
description = 'a python wrapper for instapush', license = 'MIT License',
<|file_name|>exceptions.go<|end_file_name|><|fim▁begin|>package main import "fmt" import "errors" func DoStuff(inError bool) error { if inError { return errors.New("An error occured!") } fmt.Println("Doing stuff!") return nil } func main() { err := DoStuff(false) if err == nil { err := DoStuff(true)<|fim▁h...
<|file_name|>ErrorNotesColumn.java<|end_file_name|><|fim▁begin|>// Copyright (C) 2012 Tuma Solutions, LLC // Team Functionality Add-ons for the Process Dashboard // // 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...
* with errors
<|file_name|>permissions.js<|end_file_name|><|fim▁begin|>/* This file is part of Aaron Rest Server. Aaron Rest Server 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 version 3 of the License, or (a...
return res.send(500, new Error('mysql')); } var post = {};
<|file_name|>methods.js<|end_file_name|><|fim▁begin|>exports.definition = { /** * Add custom methods to your Model`s Records * just define a function: * ```js * this.function_name = function(){ * //this == Record * }; * ``` * This will automatically add the new method to your Record ...
*
<|file_name|>line_follower.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # line_follower.py # # Copyright 2011 Manuel Martín Ortiz <mmartinortiz@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the term...
global_speed = 180
<|file_name|>problems.rs<|end_file_name|><|fim▁begin|>//! Test Driven Learning Project. //! Desenvolva TDD e programação com TDD e programação! //! Módulo novice. //! //! The MIT License (MIT) //! //! Copyright (c) 2016 Paulo Henrique Rodrigues Pinheiro <paulohrpinheiro@gmail.com> //! //! Permission is hereby granted, ...
//! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, //! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE //! SOFTWARE.
<|file_name|>get_python_cmake_flags.py<|end_file_name|><|fim▁begin|>## @package get_python_cmake_flags # Module scripts.get_python_cmake_flags ############################################################################## # Use this script to find your preferred python installation. ####################################...
# macOS specific
<|file_name|>beholder.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.o...
config = self.previous_config self.config_last_modified_time = modified_time
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate integrate; use integrate::cquad; use std::num::FloatMath; use std::f64::consts; fn main() { // Integrate sin(x)/2 from 0 to pi let (result, err, neval) = cquad(|x| 0.5f64 * FloatMath::sin(x), 0f64, consts::PI);<|fim▁hole|><|fim▁end|>
println!("result: {:.10e}, err {:.10e}, neval {}", result, err, neval); }
<|file_name|>views.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.shortcuts import render def about(request): return render(request, "about.html", {}) def location(request): return render(request, "location.html", {}) def failure(request): return render(request, "failure.html", {})<|fim▁end|>
<|file_name|>s60emulatorrunconfiguration.cpp<|end_file_name|><|fim▁begin|>/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** *...
** Please review the following information to ensure the GNU Lesser General ** Public License version 2.1 requirements will be met:
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ mod ascii; mod ascii_large; mod box_drawing; mod column; mod output; #[allow(clippy::module_...
<|file_name|>test_correctness.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from itertools import izip<|fim▁hole|> ordered_list_path = 'data/ordered.list' expected_lines = open(ordered_list_path).read().splitlines(True) expected_lines.reverse() expected_count = len(expected...
from tacit import tac
<|file_name|>slider.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify i...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
<|file_name|>ExampleUnitTest.java<|end_file_name|><|fim▁begin|>package org.mcxa.vortaro; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */...
}
<|file_name|>nested.cpp<|end_file_name|><|fim▁begin|>#include "clwrapper.h" #include <cstdio> #include <iostream> #define PLATFORM 0 #define DEVICE 0 #define GROUPSIZE 4 int main(int argc, char **argv) { // platform/device info std::cout << clinfo() << std::endl; // thread0 runs outer xyvals[0] times // ...
for (int lid=0; lid<GROUPSIZE; lid++) {
<|file_name|>plugin_aria2.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging import re import xmlrpc.client from flexget import plugin from flexget.event import event from flexget....
<|file_name|>update-hue-ini.py<|end_file_name|><|fim▁begin|>## update-hue-ini.py ## ## This script will extract the appropriate IBM Analytics for Apache Hadoop credentials from the VCAP_SERVICES ## environment variable inside a running container. It will add the username and password to the hue.ini file ## so that the...
vcaps = json.loads(os.environ["VCAP_SERVICES"]) if "Analytics for Apache Hadoop" in vcaps: username = vcaps["Analytics for Apache Hadoop"][0]["credentials"]["userid"]
<|file_name|>onboardingMethodPage.ts<|end_file_name|><|fim▁begin|>import {Page, NavController, NavParams} from "ionic-angular"; import {OnInit} from "@angular/core"; import {OnboardingDataService} from "../../../providers/onboardingDataService"; import {OnboardingFileContentPage} from "../onboardingFileContentPage/onbo...
<|file_name|>dx.messages.es.js<|end_file_name|><|fim▁begin|>/*! * DevExtreme (dx.messages.es.js) * Version: 17.2.17 * Build date: Fri Apr 23 2021 * * Copyright (c) 2012 - 2021 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; ! func...
"dxDataGrid-ariaFilterCell": "Celda de filtro",
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2018 Lorenzo Battistini - Agile Business Group # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). { "name": "Causali pagamento per ritenute d'acconto", "version": "10.0.1.0.0", "development_status": "...
"data": [ "views/withholding_tax.xml",
<|file_name|>client.js<|end_file_name|><|fim▁begin|>var EVENTS, ProxyClient, _r, bindSocketSubscriber, getSystemAddresses, io, mazehallGridRegister; _r = require('kefir'); io = require('socket.io-client'); EVENTS = require('./events'); ProxyClient = function(server, hosts) { server.on('listening', function() { ...
}); socket.on('connect_timeout', function() { return console.log('proxy-connection: timeout');
<|file_name|>ChangeIconActionBar.java<|end_file_name|><|fim▁begin|>package fr.ybo.transportscommun.activity.commun; import android.widget.ImageButton; public interface ChangeIconActionBar { <|fim▁hole|>}<|fim▁end|>
public void changeIconActionBar(ImageButton imageButton);
<|file_name|>emoji-identifiers.rs<|end_file_name|><|fim▁begin|>struct ABig👩‍👩‍👧‍👧Family; //~ ERROR identifiers cannot contain emoji struct 👀; //~ ERROR identifiers cannot contain emoji impl 👀 {<|fim▁hole|> fn full_of_✨() -> 👀 { //~ ERROR identifiers cannot contain emoji 👀 } } fn i_like_to_😅_a_lo...
<|file_name|>dhcpbridge.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file excep...
<|file_name|>.ycm_extra_conf.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python import os # import ycm_core # return the filename in the path without extension def findFileName(path, ext): name = '' for projFile in os.listdir(path): # cocoapods will generate _Pods.xcodeproj as well if projFile.endswit...
projectPath = FindDerivedDataPath( derivedDataPath, projectName ) if (len(projectPath) <= 0) or not os.path.exists(projectPath):
<|file_name|>test_del_10gig_hardware.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-<|fim▁hole|># # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in ...
# ex: set expandtab softtabstop=4 shiftwidth=4:
<|file_name|>_argparse.py<|end_file_name|><|fim▁begin|># Copyright 2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ['ArgumentParser'] try:<|fim▁hole|> from argparse import ArgumentParser except ImportError: # Compatibility with Python 2.6 and 3.1 from optparse imp...
<|file_name|>asgi.py<|end_file_name|><|fim▁begin|>import os<|fim▁hole|>from channels.asgi import get_channel_layer os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ena.settings") channel_layer = get_channel_layer()<|fim▁end|>
<|file_name|>adserver.js<|end_file_name|><|fim▁begin|>import {formatQS} from './url'; import {getWinningBids} from './targeting'; // Adserver parent class const AdServer = function(attr) { this.name = attr.adserver; this.code = attr.code; this.getWinningBidByCode = function() { return getWinningBids(this.cod...
for (var i in dfpParamsWithVariableValue) { if (!this.urlComponents.search.hasOwnProperty(dfpParamsWithVariableValue[i])) { return false;
<|file_name|>GPPOD.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># # Gaussian Process Proper Orthogonal Decomposition.<|fim▁end|>
# Copyright 2009 James Hensman # Licensed under the Gnu General Public license, see COPYING
<|file_name|>Modal.api.js<|end_file_name|><|fim▁begin|>/** * modal api */ export default { methods: { /** * 点击 Full 的导航按钮 */ clickFullNav() { if (this.commit) { this.no() } else { this.hide() } }, /** * 显示pop * * @param {Number} - 当前页码 ...
* * @return {Object, Boolean} */
<|file_name|>MenuServiceImpl.java<|end_file_name|><|fim▁begin|>package com.myit.server.service.admin.impl; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype...
List<Menu> menus = null; // 调用dao查询板块信息 List<com.myit.server.model.admin.Menu> menuBeans = menuDao.findMenusByUId(uId);
<|file_name|>profile.js<|end_file_name|><|fim▁begin|>import Lab from 'lab'; import server from '../../server'; import data from '../data'; const expect = Lab.assertions.expect; export const lab = Lab.script(); lab.experiment('ProfileCtrl', function() { lab.before(done => { data.sync().then(done, done); }); ...
const result = response.result; expect(response.statusCode).to.equal(200); expect(result.name.last).to.equal('Batman');
<|file_name|>canopen-dump.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # ------------------------------------------------------------------------------ # Copyright (C) 2012, Robert Johansson <rob@raditex.nu>, Raditex Control AB # All rights reserved. #<|fim▁hole|># # rSCADA # http://www.rSCADA.se # info@rscada.se...
# This file is part of the rSCADA system.
<|file_name|>VendedorController.java<|end_file_name|><|fim▁begin|>/* * Copyright 2002-2013 the original author or 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...
@RequestMapping(value = { "/vendedores.json", "/vendedores.xml" })
<|file_name|>author.py<|end_file_name|><|fim▁begin|>from whiffle import wikidotapi from util import hook @hook.command def author(inp): ".author <Author Name> -- Will return details regarding the author" if firstrefresh == 0:#make sure the cache actually exists return "Cache has not yet updated, please wait a minu...
multimatch.append(item[page]["created_by"]) except KeyError: pass
<|file_name|>voice_artist.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright 2018 The Oppia 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 # # ht...
file_system_class = fs_services.get_entity_file_system_class() fs = fs_domain.AbstractFileSystem(file_system_class(
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from pathlib import Path import os import structlog <|fim▁hole|>log = structlog.get_logger() _config = None def get(): global _config if not isinstance(_config, _build_config): _config = _build_config() return _config class _build_config: ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User, Group from django.utils.translation import ugettext_lazy as _<|fim▁hole|> class Repository(models.Model): """ Git repository """ # basic info name = models.CharField( ...
from django.core.validators import RegexValidator from django.conf import settings
<|file_name|>browser-env.js<|end_file_name|><|fim▁begin|>/* eslint-env node */ import { JSDOM } from 'jsdom'; const html = `<body> <div id="test_player" data-vimeo-id="2"></div> <div class="multiple"><|fim▁hole|> </div> </body>`; global.window = new JSDOM(html).window; global.document = window.document; global.navi...
<iframe class="two" src="https://player.vimeo.com/video/2"></iframe> <iframe class="one" src="https://player.vimeo.com/video/76979871"></iframe>
<|file_name|>__init__.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. # Code generated by...
# --------------------------------------------------------------------------