prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>wiki.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ MoinMoin wiki stats about updated pages Config example:: [wiki] type = wiki wiki test = http://moinmo.in/ The optional key 'api' can be used to change the default xmlrpc api endpoint:: <|fim▁hole|>""" import xmlrpc.client from did.ba...
[wiki] type = wiki api = ?action=xmlrpc2 wiki test = http://moinmo.in/
<|file_name|>test_time.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright 2009, Gerhard Weis # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following con...
''' Test cases for the isotime module.
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>// Include gulp var gulp = require('gulp'); // Include Our Plugins var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var rename = require('gulp-rename'); var header = require('gulp-header'); var footer = require('gulp-footer'); // Build Ta...
gulp.src([ "src/promises.js", "src/util.js", "src/request.js", "src/legends.js", "src/static.js" ]) .pipe(concat('legends.js', { newLine: "\n\n" })) .pipe(header("/*!\n" + " * Legends.js\n" +
<|file_name|>createVectorTilePolylines.js<|end_file_name|><|fim▁begin|>import AttributeCompression from "../Core/AttributeCompression.js"; import Cartesian3 from "../Core/Cartesian3.js"; import Cartographic from "../Core/Cartographic.js"; import Ellipsoid from "../Core/Ellipsoid.js"; import IndexDatatype from "../Core/...
var expandAndWidth = new Float32Array(size * 2); var vertexBatchIds = new Uint16Array(size);
<|file_name|>workspace_shortcut.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2021, Frappe Technologies and contributors # For license information, please see license.txt <|fim▁hole|># import frappe from frappe.model.document import Document class WorkspaceShortcut(Document): pass<|fim▁end|>
<|file_name|>client.py<|end_file_name|><|fim▁begin|>import socket import argparse import sys import magic_ping import os import settings import signal import logging import struct logging.basicConfig(format=u'%(levelname)-8s [%(asctime)s] %(message)s', level=logging.DEBUG, filename=u'client.log') # Обработка CTRL+C ...
return parser
<|file_name|>VerticesToEdgeIdsIterable.java<|end_file_name|><|fim▁begin|>package org.vertexium.util; import org.vertexium.Authorizations; import org.vertexium.Direction; import org.vertexium.Vertex; import java.util.Iterator; public class VerticesToEdgeIdsIterable implements Iterable<String> { private final Iter...
public VerticesToEdgeIdsIterable(Iterable<? extends Vertex> vertices, Authorizations authorizations) { this.vertices = vertices;
<|file_name|>collections_models.py<|end_file_name|><|fim▁begin|>from sqlalchemy import JSON, Boolean, Column, ForeignKey, Index, Integer, String from sqlalchemy.dialects import postgresql from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy.orm import relationship from sqlalchemy.sql.functions import Gener...
tags = Column(JSON) tagline = Column(String)
<|file_name|>localstorage.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; var storage = window.localStorage; @Injectable() export class LocalstorageService { constructor() {} public setData(name:string, value:string):void { storage.setItem(name, value); } public getD...
}
<|file_name|>mpservices.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys import osxdaemons COL_RED = "\033[91m" COL_GRN = "\033[92m" COL_END = "\033[0m" load_actions = ["up", "on", "load", "start"] unload_actions = ["down", "off", "unload", "stop"] ACTIONS = {act:"load" for act in load_actions} ACTIONS...
def main(): if len(sys.argv) == 1: print_services() return 0
<|file_name|>coordinate_test.go<|end_file_name|><|fim▁begin|>package coordinate import ( "fmt" "testing" ) func TestEuclideanDistance(t *testing.T) { tests := []struct { c1 []float64 c2 []float64 want float64 }{ {[]float64{2, -1}, []float64{-2, 2}, 5}, } for _, test := range tests { c1 := New(tes...
{1, 1, -1, 0, 0, 1, 2, 1}, }
<|file_name|>LogManager.py<|end_file_name|><|fim▁begin|>from Screens.Screen import Screen from Components.GUIComponent import GUIComponent from Components.VariableText import VariableText from Components.ActionMap import ActionMap from Components.Label import Label from Components.Button import Button from Components....
message = _("Are you sure you want to send this log:\n") + str(self.sel[0])
<|file_name|>event_bus.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from blinker import signal, Namespace, NamedSignal from yosaipy2.core.event.abcs import EventBus from typing import Dict from functools import wraps class BlinkerEventBus(EventBus): def __init__(self): # t...
@staticmethod def _adapter(func, topic_name): @wraps(func) def callback(sender, **kwargs):
<|file_name|>gruppen.js<|end_file_name|><|fim▁begin|>/* Copyright 2012 Samuel Bucheli and Thomas Klöti, University Library Berne. This file is part of the Ryhiner Bounding Box Tool. The Ryhiner Bounding Box Tool is free software: you can redistribute it and/or modify it under the terms of the GNU General Pub...
gruppen["2624"].push("Ryh_2624_53");
<|file_name|>eventbinding.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-eventbinding', templateUrl: './eventbinding.component.html', styleUrls: ['./eventbinding.component.css'] }) export class EventbindingComponent implements OnInit { ...
alert("El texto anterior era: " + this.texto); this.texto = "Nuevo texto de prueba"; alert("El nuevo texto será: " + this.texto);
<|file_name|>normalization-debruijn-1.rs<|end_file_name|><|fim▁begin|>// build-pass // edition:2018 // Regression test to ensure we handle debruijn indices correctly in projection // normalization under binders. Found in crater run for #85499 use std::future::Future; use std::pin::Pin; pub enum Outcome<S, E> { Su...
pub trait FromRequest<'r>: Sized { type Error; fn from_request<'life0>(
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod stdout; pub mod elasticsearch;<|fim▁hole|>pub mod network;<|fim▁end|>
pub mod file;
<|file_name|>status_bar.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016-2020 Boucher, Antoni <bouanto@zoho.com> * * 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 restrict...
} }
<|file_name|>mongodb.py<|end_file_name|><|fim▁begin|># coding: utf-8 from fabkit import task from fablib.mongodb import MongoDB mongodb = MongoDB() @task<|fim▁hole|> return {'status': 1}<|fim▁end|>
def setup(): mongodb.setup()
<|file_name|>data.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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/li...
# The format of the dataset string is "billiard-label_fn_str-{valid,test}" # where label_fn_str options are specified in data/billiard.py # Example: billiard-left-color-min-max-valid parts = dataset.split("-")
<|file_name|>safari.py<|end_file_name|><|fim▁begin|>''' Copyright (c) 2017 Yogesh Khatri This file is part of mac_apt (macOS Artifact Parsing Tool). Usage or distribution of this software/code is subject to the terms of the MIT License. ''' import io import os import logging import nska_deserialize ...
TopSites.plist <-- [BannedURLStrings] , DisplayedSitesLastModified, TopSites\[xx][TopSiteTitle & TopSiteURLString] Extensions\Extensions.plist <-- Installed Extensions\[xx][Archive File Name & Enabled] ReadingListArchives/<UUID>/Page.webarchive <-- Plist, get WebResourceURL
<|file_name|>test_settings.py<|end_file_name|><|fim▁begin|>"""Settings that need to be set in order to run the tests.""" import os DEBUG = True SITE_ID = 1 DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:", } } ROOT_URLCONF = 'linklist.tests.urls' STATIC_...
'django.contrib.staticfiles.finders.DefaultStorageFinder', )
<|file_name|>gu.js<|end_file_name|><|fim▁begin|>/** * Copyright 2012-2018, Plotly, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ 'use strict'; module.exports = { moduleType: 'locale', name: 'gu', ...
'જુલાઈ', 'ઑગસ્ટ', 'સપ્ટેમ્બર', 'ઑક્ટોબર', 'નવેમ્બર', 'ડિસેમ્બર' ], shortMonths: [
<|file_name|>tables.py<|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/. <|fim▁hole|>from relengapi.lib import db from relengapi.lib.permissio...
import sqlalchemy as sa from relengapi.blueprints.tokenauth import types
<|file_name|>county_vmt.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'county_vmt.ui' # # Created: Thu Nov 21 11:10:25 2013 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui ...
Form.resize(389, 320)
<|file_name|>angular-data.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:082a71326f3ffc5d4a12f1e2d1226bde6726d7e65fd21e9e633e1aa7bdd656d8<|fim▁hole|><|fim▁end|>
size 117145
<|file_name|>api.py<|end_file_name|><|fim▁begin|>import json import bottle from pyrouted.util import make_spec def route(method, path): def decorator(f): f.http_route = path f.http_method = method return f return decorator class APIv1(object): prefix = '/v1' def __init__(se...
@route('GET', '/query/<name:re:(%s|%s|%s|%s)>' % ('nodes',
<|file_name|>drag-n-drop.js<|end_file_name|><|fim▁begin|>(function(){ var b_prepared = false; var prep_pos = { x: 0, y: 0 }; var b_dragging = false; var current_params = {}; var current_element = false; var placeholder = false; var old_style = {}; var drag_offset = { x: 0, y: 0 }; glyph.dragInit = function( container...
placeholder = el.cloneNode( true ); glyph.addClass( placeholder, 'glyph_drag-placeholder' );
<|file_name|>DetailPrinter.java<|end_file_name|><|fim▁begin|>/* * Copyright © 2013-2019, The SeedStack authors <http://seedstack.org> * * 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://mo...
printDeclaration(propertyInfo, ansi); printLongDescription(propertyInfo, ansi);
<|file_name|>testConfig.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; ve...
} }
<|file_name|>resource_cloudstack_security_group_rule.go<|end_file_name|><|fim▁begin|>package cloudstack import ( "fmt" "log" "strconv" "strings" "sync" "time" multierror "github.com/hashicorp/go-multierror" "github.com/hashicorp/terraform/helper/schema" "github.com/xanzy/go-cloudstack/cloudstack" ) type aut...
Elem: &schema.Schema{Type: schema.TypeString}, Set: schema.HashString, },
<|file_name|>message.js<|end_file_name|><|fim▁begin|>'use strict' const { Message: MessageModel } = require('../model') module.exports = exports = { sendAtMessage: (masterId, authorId, topicId, replyId) => { return exports.sendMessage('at', masterId, authorId, topicId, replyId) }, sendReplyMessage: (masterI...
<|file_name|>video_db.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding:utf-8 """ @software: PyCharm @file: video_db.py @time: 2016/8/4 16:56 """ import sqlite3 class Create_DB(): def __init__(self): self.conn = sqlite3.connect('video.db') self.cn = self.conn.cursor() def cre...
self.cn.execute(table)
<|file_name|>log-err-phi.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/lic...
pub fn main() { if false { println!("{}", "foo".to_owned() + "bar"); } }
<|file_name|>issue-6458-2.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. //<|fim▁hole|>// option. This file may not be copied, modified, or distributed // except according ...
// 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
<|file_name|>TowerIce.java<|end_file_name|><|fim▁begin|>package al.artofsoul.data; import java.util.concurrent.CopyOnWriteArrayList; public class TowerIce extends Tower { public TowerIce(TowerType type, Pllaka filloPllaka, CopyOnWriteArrayList<Armiku> armiqt) {<|fim▁hole|> super(type, filloPllaka, armiqt); } @...
<|file_name|>UIObject.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "UIObject.h" UIObject::UIObject() { } UIObject::~UIObject() { } void UIObject::SetRootParameter(ID3D12GraphicsCommandList * pd3dCommandList) { pd3dCommandList->SetGraphicsRootDescriptorTable(0, m_d3dCbvGPUDescriptorHandle); } void...
if (m_xmf2StartPos.x < pPoint->x && m_xmf2StartPos.y > pPoint->y) { if (m_xmf2EndPos.x > pPoint->x && m_xmf2EndPos.y < pPoint->y) {
<|file_name|>no-JS-prefix.js<|end_file_name|><|fim▁begin|>// ========================================== // RECESS // RULE: .js prefixes should not be styled // ========================================== // Copyright 2012 Twitter, Inc // Licensed under the Apache License v2.0 // http://www.apache.org/licenses/LICENSE-2....
// return if no selector to validate if (!def.selectors) return isValid
<|file_name|>explicit-self.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/l...
circle(Point, f64), rectangle(Point, Size)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>default_app_config = 'allink_apps.locations.apps.AllinkLocationsConfig' __version__ = '0.0.1'<|fim▁end|>
# -*- coding: utf-8 -*-
<|file_name|>manticore_protocol_cerberus_Challenge__req_from_wire.rs<|end_file_name|><|fim▁begin|>// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 // !! DO NOT EDIT !! // To regenerate this file, run `fuzz/generate_pro...
let _ = <C as Command<'_>>::Req::from_wire(&mut data, &arena); });
<|file_name|>WebGLSpriteBatch.js<|end_file_name|><|fim▁begin|>/** * Created by chenqx on 8/5/15. * @hack 添加三角形绘制提交方式 */ /** * 以四边形填充 * @constant * @type {number} */ qc.BATCH_QUAD = 0; /** * 以三角形填充 * @constant * @type {number} */ qc.BATCH_TRIANGLES = 1; var oldWebGLSpriteBatchSetContext = PIXI.WebGLSpriteB...
<|file_name|>misc.py<|end_file_name|><|fim▁begin|># Licensed to the StackStorm, Inc ('StackStorm') 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,...
<|file_name|>infect.py<|end_file_name|><|fim▁begin|>from mininet.net import Mininet from ..util import findPyroObjectOrNone def monkeypatch(cls): def decorator(func): setattr(cls, func.__name__, func) return func return decorator def getOneNodeByName(net, name): if name in net.nameToNode: return net...
def remoteExecute(self, code): print "-- Executing: %s" % code
<|file_name|>2.cc<|end_file_name|><|fim▁begin|>// { dg-require-namedlocale "fr_FR.ISO8859-15" } // 2001-07-17 Benjamin Kosnik <bkoz@redhat.com> // Copyright (C) 2001-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/...
#include <testsuite_hooks.h> void test02()
<|file_name|>JRestlessContainerResponseWriterTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Bjoern Bilger * * 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...
when(context.getStringHeaders()).thenReturn(new MultivaluedHashMap<>()); containerResponseWriter.writeResponseStatusAndHeaders(-1, context); containerResponseWriter.failure(new RuntimeException());
<|file_name|>enums.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ class PRIORITY: LOWEST = -100 LOWER = -50 LOW = -10 NORMAL = 0 HIGH = 10 HIGHER = 50 HIGHEST = 1...
ACCEPT_CHARSET = "Accept-Charset" ACCEPT_ENCODING = "Accept-Encoding"
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::sync::mpsc;<|fim▁hole|>fn main() { let (tx, rx) = mpsc::channel(); thread::spawn(move || { let val = String::from("hi"); tx.send(val).unwrap(); }); let received = rx.recv().unwrap(); println!("Got: {}", received); }<|fim▁en...
use std::thread;
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('citizenForumsShowApp', [ 'citizenForumsShowApp.services', 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'uiGmapgoogle-maps', 'xeditable', 'restangular', 'nl2br' ...
}) .constant('CFG', { DELAY: 600,
<|file_name|>test_auto_segmentEG_FEGT.py<|end_file_name|><|fim▁begin|>import pandas as pd from sklearn.datasets import load_boston from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor from sklearn.cross_validation import train_test_split from sklearn.metrics import mea...
boston = load_boston()
<|file_name|>mx.rs<|end_file_name|><|fim▁begin|>extern crate c_ares_sys; extern crate libc; use std::ffi::CStr; use std::marker::PhantomData; use std::mem; use std::ptr; use std::slice; use std::str; use error::AresError; use utils::ares_error; /// The result of a successful MX lookup. pub struct MXResults { mx_...
self.next = (*mx_reply).next;
<|file_name|>tims.js<|end_file_name|><|fim▁begin|>import {getTims} from '../api/api'; export function loadData() { return getTims().then(data => { const parser = new DOMParser(); const doc = parser.parseFromString(data, 'text/xml'); if (doc.documentElement.nodeName === 'parseerror') { throw new Er...
} return res;
<|file_name|>c_preproc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2010 (ita) """ C/C++ preprocessor for finding dependencies Reasons for using the Waf preprocessor by default #. Some c/c++ extensions (Qt) require a custom preprocessor for obtaining the dependencies (....
<|file_name|>hbio.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import hashlib import io import struct # default from KeePass2 source BLOCK_LENGTH = 1024 * 1024 try: file_types = (file, io.IOBase) except NameError: file_types = (io.IOBase,) # HEADER_LENGTH = 4+32+4 def read_int(stream, length): ...
if data: stream.write(struct.pack('<I', index)) stream.write(hashlib.sha256(data).digest())
<|file_name|>reducer_config.ts<|end_file_name|><|fim▁begin|>/* Copyright 2019 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<|fim▁hole|> Unless required...
http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>Source.js<|end_file_name|><|fim▁begin|>var url = require('url'); var semver = require('semver'); var nijs = require('nijs'); var inherit = require('nijs/lib/ast/util/inherit.js').inherit; var base64js = require('base64-js'); /** * Creates a new source instance. This function should never be used directly...
} else if(parsedUrl.protocol == "http:" || parsedUrl.protocol == "https:") { // If the version is an HTTP URL do a download
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models <|fim▁hole|>class Author(models.Model): name = models.CharField(max_length=20) def __unicode__(self): return self.name class Book(models.Model): name = models.CharField(max_length=20) authors = models.ManyToManyFi...
<|file_name|>test_search.py<|end_file_name|><|fim▁begin|>#!/usr/bin env python from tests.unit import unittest from httpretty import HTTPretty import urlparse import json import mock import requests from boto.cloudsearch.search import SearchConnection, SearchServiceException HOSTNAME = "search-demo-userdomain.us-ea...
def test_cloudsearch_results_info(self):
<|file_name|>stepper_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 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.apac...
if element_name + ":0" in closure_elements: op_with_output_in_closure = str(element_name) break
<|file_name|>inotify.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the P...
<|file_name|>mod.rs<|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<|fim▁hole|>// http://www...
// to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at //
<|file_name|>command_line_args.rs<|end_file_name|><|fim▁begin|>// Implements http://rosettacode.org/wiki/Command-line_arguments <|fim▁hole|> println!("{}", arg); } }<|fim▁end|>
use std::env; fn main(){ for arg in env::args() {
<|file_name|>ParsedValue.py<|end_file_name|><|fim▁begin|>MAX_SCORE = 10 class ParsedValue(): """ Possible run-time value. The value data might either be definite or guessed. """ def __init__(self, data, description, score=0, raw=None, type_=None): """ Ctor @param data: Th...
self.description = description self.type = type_
<|file_name|>unresolved_type_param.rs<|end_file_name|><|fim▁begin|>// Provoke an unresolved type error (T). // Error message should pinpoint the type parameter T as needing to be bound // (rather than give a general error message) // edition:2018 async fn bar<T>() -> () {} async fn foo() { bar().await; //~^ E...
} fn main() {}
<|file_name|>BarTest.java<|end_file_name|><|fim▁begin|>package de.lathspell.test.service; <|fim▁hole|>import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.conte...
import lombok.extern.slf4j.Slf4j; import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; import org.junit.Before;
<|file_name|>scene_recognition.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import glob import numpy as np import pyboof as pb # Scene recognition is defined here as the problem where you wish to find multiple views of the same scene # In this example we will load a set of images that has sets of 3 related ...
# Display the results image_list = [(query_image, "Query")] for m in found_matches:
<|file_name|>projects.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose'); var rooms = require('./rooms'); mongoose.connect('mongodb://localhost:27017/rpgd'); var RoomSchema = require('mongoose').model('Room').schema; var Schema = mongoose.Schema; var ObjectId = Schema.ObjectId; // Setup Database s...
console.log(err); }
<|file_name|>OpwLink.java<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright 2015 Adam Kowalewski. * * 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, i...
OpwLink other = (OpwLink) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
<|file_name|>E0597.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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/...
x: Option<&'a u32>, }
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import django from account.views import ChangePasswordView, SignupView, LoginView from django.conf.urls import include, url from django.contrib import admin from example_thirdparty.forms import SignupFormW...
url(r"^accounts/password/$", ChangePasswordView.as_view(),
<|file_name|>util.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes 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/licenses/LI...
return fmt.Errorf("Error retrieving metrics: %v", err) }
<|file_name|>hookspecs.py<|end_file_name|><|fim▁begin|>""" Hook specifications for tox. """ from pluggy import HookspecMarker, HookimplMarker hookspec = HookspecMarker("tox") hookimpl = HookimplMarker("tox") @hookspec def tox_addoption(parser): """ add command line options to the argparse-style parser object."...
The first plugin/hook which returns an executable path will determine it.
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The Google AI Language Team 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...
import os from typing import Dict, Optional
<|file_name|>MetadataDBHandler.py<|end_file_name|><|fim▁begin|># Written by Andrea Reale # see LICENSE.txt for license information from Tribler.Core.Subtitles.MetadataDomainObjects.SubtitleInfo import SubtitleInfo from Tribler.Core.Subtitles.MetadataDomainObjects.MetadataDTO import MetadataDTO from Tribler.Core.CacheD...
query = QUERIES["SELECT METADATA"] infohash = bin2str(infohash)
<|file_name|>wp_joom.py<|end_file_name|><|fim▁begin|>import urllib import os import re from time import sleep from datetime import date def welcome(modulename): print """ |==========================================================| |====================== [ 404 ] ========================| ...
conf = open(con[0]) readd=conf.read()
<|file_name|>copy.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * Created by kib357 on 22/01/16. */ class copy { static arrayStructure(target, source, exclude) { if (!Array.isArray(target) || !Array.isArray(source)) { thr...
copy.arrayStructure(target[key], source[key], exclude); continue;
<|file_name|>MicroServiceInfoTest.java<|end_file_name|><|fim▁begin|>package jobmanager.tests; import static alabno.testsuite.TestUtils.*;<|fim▁hole|>import alabno.testsuite.TestModule; import alabno.testsuite.TestStatistics; import jobmanager.MicroServiceInfo; public class MicroServiceInfoTest implements TestModule {...
<|file_name|>macro-use-all.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/l...
// aux-build:two_macros.rs // ignore-stage1 #[macro_use]
<|file_name|>i16.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<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // ...
// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>predicates.py<|end_file_name|><|fim▁begin|>class Predicate(object): def __init__(self, name, arguments): self.name = name self.arguments = arguments self.value_mapping = dict()<|fim▁hole|> def get_arity(self): return len(self.arguments) def get_arguments(sel...
self.cost_str = "" def __str__(self): return "%s(%s)" % (self.name, ", ".join(map(str, self.arguments)))
<|file_name|>basic-types.go<|end_file_name|><|fim▁begin|>// Ignored build directive: +build OMIT package main import ( "fmt" "math/cmplx" ) var ( ToBe bool = false MaxInt uint64 = 1<<64 - 1<|fim▁hole|> z complex128 = cmplx.Sqrt(-5 + 12i) ) func main() { fmt.Printf("Type: %T Value: %v\n", ToBe,...
<|file_name|>users.py<|end_file_name|><|fim▁begin|>import re import unicodedata from collections import defaultdict from typing import Any, Dict, List, Optional, Sequence, Union from django.conf import settings from django.core.exceptions import ValidationError from django.db.models.query import QuerySet from django.f...
# The user_avatar_url_field_optional gives the server sole # discretion in deciding for which users we want to send the
<|file_name|>env.py<|end_file_name|><|fim▁begin|>from typing import Any, Dict, List, Sequence, Tuple from gym3.types import ValType<|fim▁hole|> class Env: """ An interface for reinforcement learning environments. :param ob_space: ValType representing the valid observations generated by the environment ...
<|file_name|>html.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import collections from pyramid.view import view_defaults, view_config from kubb_match.data.models import Round @view_defaults(request_method='GET', accept='text/html') class HtmlView(object): def __init__(self, request): self.reque...
games.sort(key=lambda x: x.field, reverse=False) current_games[r.label] = games current_round[r.label] = r.id else:
<|file_name|>http_connection_manager.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto package v2 import ( fmt "fmt" io "io" math "math" time "time" _ "github.com/envoyproxy/protoc...
return io.ErrUnexpectedEOF
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|><|fim▁end|>
from __future__ import unicode_literals
<|file_name|>specialization-cross-crate-no-gate.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 // ht...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from django.contrib.auth.admin import UserAdmin from django.contrib import admin from django.contrib.admin.sites import NotRegistered from models import UserOpenidAssociation class OpenIDInline(admin.StackedInline): mod...
<|file_name|>keyword-typeof.rs<|end_file_name|><|fim▁begin|>fn main() {<|fim▁hole|><|fim▁end|>
let typeof = (); //~ ERROR expected identifier, found reserved keyword `typeof` }
<|file_name|>ResponsiveElement.js<|end_file_name|><|fim▁begin|>(function ($, scope, undefined) { function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); } /** * @constructor * @param responsive {NextendSmartSliderResponsive} caller object * @param grou...
/** * Changes the original font size based on the current mode and also updates the current value on the element. * @param mode */
<|file_name|>test_timer2.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import with_statement import sys import time from kombu.tests.utils import redirect_stdouts from mock import Mock, patch<|fim▁hole|> class test_Entry(Case): def test_call(self): scratch = [Non...
import celery.utils.timer2 as timer2 from celery.tests.utils import Case, skip_if_quick
<|file_name|>directive.js<|end_file_name|><|fim▁begin|>export default function() { let directive = { restrict: 'E', replace: true, scope: { ad: '='<|fim▁hole|> $scope.ad.previewImg = `${$scope.ad.thumbnail.base_url}/card/${$scope.ad.thumbnail.path}`; } else { $scope.ad.previewImg = '/src/images/c...
}, templateUrl: './directives/adCard/template.html', controller: ['$scope', ($scope) => { if ($scope.ad.thumbnail) {
<|file_name|>resource_aws_glue_job_test.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "log" "regexp" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/glue" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/has...
<|file_name|>plotCorrelation.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import numpy as np import matplotlib matplotlib.use('Agg') matplotlib.rcParams['pdf.fonttype'] = 42 matplotlib.rcParams['svg.fonttype'] = 'none' from deeptools import cm # noqa: F401 i...
default=None, help='Maximum value for the heatmap intensities.' 'If not specified, the value is set automatically',
<|file_name|>test.js<|end_file_name|><|fim▁begin|>describe('dev-radiolist', function() { beforeEach(function() { browser().navigateTo(mainUrl); }); it('should show radio options and submit new value', function() { var s = '[ng-controller="DevRadiolistCtrl"] '; expect(element(s+'a.normal ').text())....
<|file_name|>hbase_setup.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 ...
class Command(NoArgsCommand): help = 'Create and fill some demo tables in the first configured cluster.' def handle_noargs(self, **options):
<|file_name|>git.component.ts<|end_file_name|><|fim▁begin|>/* Copyright 2016 - 2017 Huawei Technologies Co., Ltd. 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...
@Component({ selector: 'app-git', templateUrl: './git.component.html', styleUrls: ['./git.component.scss']
<|file_name|>math.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main() { let value = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO...
// rustfmt-binop_separator: Back
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import setuptools # Hack to prevent stupid TypeError: 'NoneType' object is not callable error on # exit of python setup.py test # in multiprocessing/util.py _exit_function when # running python setup.py test (see # http://www.eby-sarna.co...
name='orwell.agent', version='0.0.1', description='Agent connecting to the game server.',
<|file_name|>test_lin_ops.py<|end_file_name|><|fim▁begin|>""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY is free software: you can redistribute it and/or modify<|fim▁hole|>CVXPY is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.