prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from django.core.exceptions import ValidationError import datetime # Create your models here. class Article(models.Model): title = models.CharField(max_length=255)<|fim▁hole|> brief = mode...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::ops::Range; /// Return true if two ranges overlap. /// /// assert_eq!(ranges::overlap(0..7, 3..10), true); /// assert_eq!(ranges::overlap(1..5, 101..105), false); /// /// If either range is empty, they don't count as overlapping. ///<|fim▁hole|>pub fn o...
/// assert_eq!(ranges::overlap(0..0, 0..10), false); /// assert_eq!(ranges::overlap(0..10, 1..1), false); ///
<|file_name|>haproxy.go<|end_file_name|><|fim▁begin|>package configuration type HAProxy struct { TemplatePath string OutputPath string ReloadCommand string<|fim▁hole|><|fim▁end|>
}
<|file_name|>mocha.js<|end_file_name|><|fim▁begin|>;(function(){ // CommonJS require() function require(p){ var path = require.resolve(p) , mod = require.modules[path]; if (!mod) throw new Error('failed to require "' + p + '"'); if (!mod.exports) { mod.exports = {}; mod.call(mod.exports,...
var WordWithSpaceDiff = new Diff(); WordDiff.tokenize = WordWithSpaceDiff.tokenize = function(value) { return removeEmpty(value.split(/(\s+|\b)/));
<|file_name|>AssessmentRounded.js<|end_file_name|><|fim▁begin|>import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM8 17c-.55 0-1-.4...
}), 'AssessmentRounded');
<|file_name|>hr_language.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free s...
'speak': True,
<|file_name|>jobs.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.db import models from django.utils.timezone import now, timedelta Q = models.Q class LogisticJob(models.Model): LOCK_FOR = ( (60*15, '15 minutes'), (60*30, '30 minutes'), (60*45, '45 min...
('stone', 'Stone'), ('food', 'Food'),
<|file_name|>import_rewrite_visitor.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. 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 {AotCompilerHost} from '@angular/compiler...
const symbolName = resolvedImport.name; const moduleFileName =
<|file_name|>siphash.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2016 The nealcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Specialized SipHash-2-4 implementations. This impleme...
v0 ^= 0x2000000000000000 v2 ^= 0xFF v0, v1, v2, v3 = siphash_round(v0, v1, v2, v3)
<|file_name|>decorate-enum.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(rocket_codegen)] extern crate rocket; #[get("")] //~ ERROR can only be used on functions enum B { } //~ ERROR but was applied fn main() { let _ = routes![get];<|fim▁hole|><|fim▁end|>
}
<|file_name|>suite_clang_cindex.py<|end_file_name|><|fim▁begin|>import sys import unittest import cbind cbind.choose_cindex_impl(cbind.CLANG_CINDEX) import suite_all if __name__ == '__main__':<|fim▁hole|> runner = unittest.TextTestRunner() sys.exit(not runner.run(suite_all.suite_all).wasSuccessful())<|fim▁en...
<|file_name|>Ram20140214GetUserRequest.py<|end_file_name|><|fim▁begin|>''' Created by auto_sdk on 2015.06.23 ''' from aliyun.api.base import RestApi class Ram20140214GetUserRequest(RestApi): def __init__(self,domain='ram.aliyuncs.com',port=80):<|fim▁hole|> self.UserName = None def getapiname(self): return 'ram.al...
RestApi.__init__(self,domain, port) self.AccountSpace = None
<|file_name|>legacy-road.ts<|end_file_name|><|fim▁begin|>import * as proceduralTexture from "../road"; /** * This is the entry point for the UMD module. * The entry point for a future ESM package should be index.ts */ var globalObject = (typeof global !== 'undefined') ? global : ((typeof window !== 'undefined...
export * from "../road";
<|file_name|>procesoxml.py<|end_file_name|><|fim▁begin|>__author__ = 'fer' from xml.etree import ElementTree from xml.etree.ElementTree import Element from xml.etree.ElementTree import SubElement from core.tableObjects import Table, Column class Xml: archivo = None<|fim▁hole|> self.archivo = ruta def ...
def __init__(self, ruta=None):
<|file_name|>observation_preprocessor_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 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 # # http://www.apache.org/licenses/...
} } """, brain_spec)
<|file_name|>gyptest-errors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test that two targets with the same name generates an error. """ import os ...
stderr = ('gyp: Duplicate target definitions for '
<|file_name|>surface_tracking.cpp<|end_file_name|><|fim▁begin|>#include "Copter.h" // adjust_climb_rate - hold copter at the desired distance above the // ground; returns climb rate (in cm/s) which should be passed to // the position controller float Copter::SurfaceTracking::adjust_climb_rate(float target_ra...
// set target altitude (in cm) above ground void Copter::SurfaceTracking::set_target_alt_cm(float _target_alt_cm) {
<|file_name|>TestMTStmtTwoPatternsStartStop.java<|end_file_name|><|fim▁begin|>/* * ************************************************************************************* * Copyright (C) 2008 EsperTech, Inc. All rights reserved. * * http://esper.codehaus.org ...
<|file_name|>0527.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- import logging unicode_string = u"Татьяна"<|fim▁hole|>utf8_string = "'Татьяна' is an invalid string value" logging.warning(unicode_string) logging.warning(utf8_string) try: raise Exception(utf8_string) except Exception,e: print "---...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! This module defines the trait necessary for a session storage struct. use self::session::Session; pub mod session; /// A default implementation of `SessionStore`: `Session`. pub mod hashsession; /// This `Trait` defines a session storage struct. It must be implem...
fn remove(&self, key: &K) -> bool; }
<|file_name|>issue-4764.ts<|end_file_name|><|fim▁begin|>import { expect } from "chai"; import "reflect-metadata"; import { Connection } from "../../../src/index"; import { closeTestingConnections, createTestingConnections, reloadTestingDatabases, } from "../../utils/test-utils"; import { User } from "./enti...
<|file_name|>mlperf_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 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.apach...
"""Tests the MLPerf compliance logs. This serves as a quick check that we probably didn't break the compliance logging. It is not mean to be as comprehensive as the official MLPerf
<|file_name|>dock.py<|end_file_name|><|fim▁begin|>import docker from cargo.container import Container from cargo.image import Image # this is a hack to get `__getattribute__` working for a few reserved properties RESERVED_METHODS = ['containers', '_client', 'images', 'info', 'start', 'stop'] class Dock(object): ""...
elif isinstance(container, basestring): cid = container
<|file_name|>enquire-client-portal.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { GalleryService } from 'ng-gallery'; import { fadeInAnimation } from '../../animation-fade-in'; @Component({ moduleId: module.id, selector: 'sd-enquire-client-portal', templateU...
},
<|file_name|>60_command-line-flags.go<|end_file_name|><|fim▁begin|>// [_Command-line flags_](http://en.wikipedia.org/wiki/Command-line_interface#Command-line_option) // are a common way to specify options for command-line // programs. For example, in `wc -l` the `-l` is a // command-line flag. package lessons //...
// command-line flag parsing. We'll use this package to // implement our example command-line program. import(
<|file_name|>associated-types-cc.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...
extern crate associated_types_cc_lib as bar; use bar::Bar;
<|file_name|>2043.js<|end_file_name|><|fim▁begin|>{<|fim▁hole|>}<|fim▁end|>
var x = f; x = items[0]; x = items[1];
<|file_name|>test_hue_api.py<|end_file_name|><|fim▁begin|>"""The tests for the emulated Hue component.""" import asyncio import json from unittest.mock import patch import pytest from homeassistant import bootstrap, const, core import homeassistant.components as core_components from homeassistant.components import ( ...
assert result.status == 400
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
let mut chunk = unsafe {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from distutils.core import setup import os.path classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Ap...
"Operating System :: OS Independent", "Topic :: Software Development :: Libraries :: Python Modules", ]
<|file_name|>MdbInvoker.java<|end_file_name|><|fim▁begin|>/** * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You unde...
<|file_name|>0005_auto_20161103_0856.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-03 08:56 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.M...
<|file_name|>test_tctototal_streaming.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero G...
# This program is distributed in the hope that it will be useful, but WITHOUT
<|file_name|>MidiOutputEventHandler.java<|end_file_name|><|fim▁begin|>package com.pingdynasty.blipbox; import java.util.Map; import java.util.HashMap; import javax.sound.midi.*; import com.pingdynasty.midi.ScaleMapper; import org.apache.log4j.Logger; public class MidiOutputEventHandler extends MultiModeKeyPressManage...
MidiConfigurationMode mode = (MidiConfigurationMode)getCurrentConfigurationMode(); return mode.getScaleMapper();
<|file_name|>bitset_test.go<|end_file_name|><|fim▁begin|>// Copyright 2014 Will Fitzgerald. 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 tests bit sets package sparsebitset import ( "math" "math/rand" "testing" ) func Te...
// b := New(99) c := New(100)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .circumcision_model_mixin import CircumcisionModelMixin from .crf_model_mixin import CrfModelManager, CrfModelMixin # CrfModelMixinNonUniqueVisit from .detailed_sexual_history_mixin import DetailedSexualHistoryMixin from .hiv_testing_supplemental_mixin import H...
from .sexual_partner_model_mixin import SexualPartnerMixin
<|file_name|>profile.py<|end_file_name|><|fim▁begin|># Monary - Copyright 2011-2013 David J. C. Beach # Please see the included LICENSE.TXT and NOTICE.TXT for licensing information. from time import time<|fim▁hole|> def __init__(self, name): self._name = name def __enter__(self): self._...
class profile(object):
<|file_name|>kickstarter_service.py<|end_file_name|><|fim▁begin|>from .service import Service<|fim▁hole|> class KickstarterService(Service): def get_supporters(self): r = self.get('kickstarter/') self.print_supporters(r) def print_supporters(self, s): for supporter in s: ...
<|file_name|>mainandprojects.py<|end_file_name|><|fim▁begin|>from locust import HttpLocust, TaskSet, task class UserBehavior(TaskSet): def on_start(self): """ on_start is called when a Locust start before any task is scheduled """ self.login() def login(self):<|fim▁hole|> @task(2) def ...
# do a login here # self.client.post("/login", {"username":"ellen_key", "password":"education"}) pass
<|file_name|>0046_auto__add_field_issue_status.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Issue.status' ...
'core.project': { 'Meta': {'object_name': 'Project'}, 'createdByUser': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}), 'creationDate': ('django.db.models.fields.DateTimeField', [], {}),
<|file_name|>cc-prereq.js<|end_file_name|><|fim▁begin|>// <![CDATA[ /** * Creative Commons has made the contents of this file * available under a CC-GNU-GPL license: * * http://creativecommons.org/licenses/GPL/2.0/ * * A copy of the full license can be found as part of this * distribution in the file COPYING. *...
<|file_name|>device.go<|end_file_name|><|fim▁begin|>/* * Copyright © 2012 go-opencl authors *<|fim▁hole|> * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * go-opencl is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without e...
* This file is part of go-opencl. * * go-opencl is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by
<|file_name|>fd_multidrop_tests.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2022 (C) Alexey Dynda This file is part of Tiny Protocol Library. GNU General Public License Usage Protocol Library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Pu...
<|file_name|>converter_test.js<|end_file_name|><|fim▁begin|>/* global Converter, probandDatav2 */ describe('Converter', function() { describe('load', function() { it('should load proband data', function() { var converter = new Converter(); converter.load(probandDatav2); ...
<|file_name|>players.js<|end_file_name|><|fim▁begin|>$(document).ready(function() { $(document).on('submit', '.status-button', function(e) { e.preventDefault(); var joinButton = e.target $.ajax(joinButton.action, { method: 'PATCH', data: $(this).serialize() })<|fim▁hole|> .fail(functio...
.done(function(data) { gameDiv = $(joinButton).parent(); gameDiv.replaceWith(data); })
<|file_name|>bitcoin_lt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Litedoge</source> <translation type="unfinished...
<|file_name|>gcp_compute_instance_group_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------...
main()
<|file_name|>filesystem.py<|end_file_name|><|fim▁begin|>import os from segments import Segment, theme from utils import colors, glyphs class CurrentDir(Segment): bg = colors.background(theme.CURRENTDIR_BG) fg = colors.foreground(theme.CURRENTDIR_FG) def init(self, cwd): home = os.path.expanduser...
<|file_name|>menus.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *------------...
let needsMenuUpdate = false; keybindings.forEach((keybinding) => {
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * Pipe audio streams to your ears * Dan Motzenbecker <dan@oxism.com> * MIT Licensed */ "use strict"; var spawn = require('child_process').spawn, util = require('util'), Duplex = require('stream').Duplex, apply = function(obj, method, a...
/*! * ear-pipe
<|file_name|>test_loaders.py<|end_file_name|><|fim▁begin|>from unittest import TestCase from pydigmips import instructions, loaders class HexaLoaderTestCase(TestCase): def testAdd(self): i = ['1510', # 000 101 010 001 0000 '1C60', '2C60'] # 001 011 000 110 0000 o = [instr...
<|file_name|>qsub.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import os import random <|fim▁hole|>job_properties = read_job_properties(jobscript) with open("qsub.log", "w") as log: print(job_properties, file=log) print(random.randint(1, 100)) os.system("sh {}".format(jobscript))<|fim▁end|>
from snakemake.utils import read_job_properties jobscript = sys.argv[1]
<|file_name|>errors.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import six from rbtools.utils.encoding import force_unicode class APIError(Exception): def __init__(self, http_status, error_code, rsp=None, *args, **kwargs): Exception.__init__(self, *args, **kwargs) sel...
<|file_name|>AEtestNodeATemplate.py<|end_file_name|><|fim▁begin|>""" To create an Attribute Editor template using python, do the following: 1. create a subclass of `uitypes.AETemplate` 2. set its ``_nodeType`` class attribute to the name of the desired node type, or name the class using the convention ``AE<nodeType>...
self.addControl("attribute0") self.endLayout() self.beginLayout("Version",collapse=0)
<|file_name|>ignored_params.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(rocket_codegen)] #[get("/<name>")] //~ ERROR 'name' is declared fn get(other: usize) -> &'static str { "hi" } //~ ERROR isn't in the function #[get("/a?<r>")] //~ ERROR 'r' is declared fn get1() -> &'static str { "hi" } //~ ERRO...
#[get("/<_r>")] //~ ERROR '_r' is declared
<|file_name|>mechanicalturk.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction<|fim▁hole|>prefix = "mechanicalturk" class Action(BaseAction): def __init__(self, action: str = None...
from .aws import BaseARN service_name = "Amazon Mechanical Turk"
<|file_name|>other.py<|end_file_name|><|fim▁begin|>""" accounts FILE: forms.py Created: 6/21/15 8:31 PM """ __author__ = 'Mark Scrimshire:@ekivemark' from django.conf import settings from django import forms from django.utils.safestring import mark_safe from registration.forms import (RegistrationFormUniqueEmail, ...
User.objects.get(email=value) raise forms.ValidationError(mark_safe( "This email is already registered. <br/>Use <a href='/password/reset'>this forgot password</a> link or on the <a href ='/accounts/login?next=/'>login page</a>."))
<|file_name|>associated-types-normalize-in-bounds-ufcs.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 o...
<|file_name|>mux_twists.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from functools import partial import math from threading import Lock import rospy from geometry_msgs.msg import Twist from lg_common.helpers import run_with_influx_exception_handler NODE_NAME = 'mux_twists' DEFAULT_TICK_RATE = 65.0 DEFAU...
stamp = self.sample_stamps[topic] if t - stamp > self.age_limit: continue
<|file_name|>let.js<|end_file_name|><|fim▁begin|>/** * @param func<|fim▁hole|> */ export function letProto(func) { return func(this); } //# sourceMappingURL=let.js.map<|fim▁end|>
* @return {Observable<R>} * @method let * @owner Observable
<|file_name|>update.go<|end_file_name|><|fim▁begin|>package postactions import ( "net/http" "github.com/fragmenta/auth/can" "github.com/fragmenta/mux" "github.com/fragmenta/server" "github.com/fragmenta/view" "github.com/fragmenta/fragmenta-cms/src/lib/session" "github.com/fragmenta/fragmenta-cms/src/posts" ...
// Authorise update post user := session.CurrentUser(w, r) err = can.Update(post, user) if err != nil {
<|file_name|>split_file.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ split_file.py [-o <dir>] <path> Take the file at <path> and write it to multiple files, switching to a new file every time an annotation of the form "// BEGIN file1.swift" is encountered. If <dir> is specified, place the files in <dir>;...
for line in fp_in: m = re.match(r'^//\s*BEGIN\s+([^\s]+)\s*$', line)
<|file_name|>WebSocket.py<|end_file_name|><|fim▁begin|>try: from tornado.websocket import WebSocketHandler import tornado.ioloop tornadoAvailable = True except ImportError: class WebSocketHandler(object): pass tornadoAvailable = False from json import loads as fromJS, dumps as toJS from threading import Thread f...
<|file_name|>image.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] use std; use rgb::*; use imgref::*; /// RGBA, but: premultiplied alpha, linear, f32 unit scale 0..1 pub type RGBAPLU = RGBA<f32>; /// RGB, but linear, f32 unit scale 0..1 pub type RGBLU = RGB<f32>; /// L\*a\*b\*b, but using float units (values a...
b: self.b * other.b, }
<|file_name|>text_documents.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ //! Utilities related to LSP text document syncing use crate::{lsp_r...
<|file_name|>firehose.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "firehose")]<|fim▁hole|>use rusoto::{DefaultCredentialsProvider, Region}; #[test] fn should_list_delivery_streams() { let credentials = DefaultCredentialsProvider::new().unwrap(); let client = KinesisFirehoseClient::new(credentials, Region:...
extern crate rusoto; use rusoto::firehose::{KinesisFirehoseClient, ListDeliveryStreamsInput};
<|file_name|>example_test.go<|end_file_name|><|fim▁begin|>// Copyright 2018, OpenCensus 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/LI...
<|file_name|>local_transactions.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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...
for hash in to_remove { self.transactions.remove(&hash);
<|file_name|>ensure_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 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. package main import ( "errors" "go/build" "testing" "github.com/golang/dep/internal/gps" "github...
t.Errorf("no args to plain ensure with -vendor-only") } ec.vendorOnly = false if err := ec.runDefault(nil, []string{"foo"}, nil, nil, gps.SolveParameters{}); err == nil {
<|file_name|>searchService.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *----...
const exists = await Promise.all(query.folderQueries.map(query => this.fileService.exists(query.folder))); query.folderQueries = query.folderQueries.filter((_, i) => exists[i]);
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os test_dir = os.path.dirname(__file__) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(test_dir, 'db.sqlite3'), } } INSTALLED_APPS = [ 'django.contrib.contenttypes', 'django.contrib.s...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Copyright (c) Matt Haggard. # See LICENSE for details. from distutils.core import setup import os, re<|fim▁hole|> base_init = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'norm/__init__.py') guts = open(base_init, 'r').read() m = r_version.se...
def getVersion(): r_version = re.compile(r"__version__\s*=\s*'(.*?)'")
<|file_name|>unique-send-2.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...
<|file_name|>netmhc_cons.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2017. Mount Sinai School of Medicine # # 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....
input_file_flag="-f",
<|file_name|>vcview.py<|end_file_name|><|fim▁begin|>### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org> ### Copyright (C) 2010-2012 Kai Willadsen <kai.willadsen@gmail.com> ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as pub...
def recompute_label(self): self.label_text = os.path.basename(self.location)
<|file_name|>sync_mutex_owned.rs<|end_file_name|><|fim▁begin|>#![warn(rust_2018_idioms)] #![cfg(feature = "sync")] #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::wasm_bindgen_test as test; #[cfg(target_arch = "wasm32")] use wasm_bindgen_test::wasm_bindgen_test as maybe_tokio_test; #[cfg(not(target_arch = "wasm...
}) .await .expect("Mutex is locked"); }
<|file_name|>EventController.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from datetime import datetime from datetime import date from datetime import timedelta import re import Entity.User as User import Entity.Event as Event import Entity.RepeatingEvent as RepeatingEvent import Responder def createSingle...
place = split[1].strip() timeString = split[3].strip() time = None
<|file_name|>transitioner.ts<|end_file_name|><|fim▁begin|>import Key from './key'; import SubscriberPayload from './subscriber-payload'; import Transition from './transition'; import TransitionHistory from './transition-history'; import TransitionSet from './transition-set'; /** * A class responsible for performing t...
<|file_name|>jquery.overscroll.js<|end_file_name|><|fim▁begin|>/** * Overscroll v1.6.3 * A jQuery Plugin that emulates the iPhone scrolling experience in a browser. * http://azoffdesign.com/overscroll * * Intended for use with the latest jQuery * http://code.jquery.com/jquery-latest.js * * Copyright 2012, Jo...
if (prefix === 'moz' || prefix === 'webkit') {
<|file_name|>constructor.js<|end_file_name|><|fim▁begin|>import _size from './_size'; export default class MapObject { constructor() { this._data = new Map();<|fim▁hole|> get size() { return _size(); } }<|fim▁end|>
}
<|file_name|>GenericEventContext.java<|end_file_name|><|fim▁begin|>package io.github.phantamanta44.botah.core.context; import io.github.phantamanta44.botah.core.rate.RateLimitedChannel; import io.github.phantamanta44.botah.util.MessageUtils; import sx.blah.discord.api.Event; import sx.blah.discord.handle.obj.IChannel;...
public IUser getUser() { return user;
<|file_name|>break-alignment-interface.cc<|end_file_name|><|fim▁begin|>/* break-align-interface.cc -- implement Break_alignment_interface source file of the GNU LilyPond music typesetter (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl> */ #include "break-align-interface.hh" #include "align-interface.hh" #i...
if (g && sym == g->get_property ("break-align-symbol")) { new_elts.push_back (g); writable_elts.erase (writable_elts.begin () + i);
<|file_name|>schedule_generator_tests.py<|end_file_name|><|fim▁begin|>from django.utils.unittest.case import TestCase from scheduler.models import ScheduleGenerator from uni_info.models import Semester, Course class ScheduleGeneratorTest(TestCase): """ Test class for schedule generator, try different courses ...
self.assertIsNotNone(result)
<|file_name|>robotTestData.js<|end_file_name|><|fim▁begin|>module.exports = { dimension: 'overworld', config: { robotName: 'rob', accountName: 'admin', serverIP: '127.0.0.1', serverPort: 8080, tcpPort: 3001, posX: 4, posY: 4, posZ: 4, orient: 0, raw: true, }, internalI...
"name": "minecraft:dirt", }, },
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.core.urlresolvers import reverse from django.db import models from midnight_main.models import BaseTree, Base, BreadCrumbsMixin, BaseComment from ckeditor.fields import RichTextField from django.utils.translation import ugettext_lazy as _ from sorl.thumbna...
comments = models.BooleanField(default=False, verbose_name=_('Comments'))
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>const initialState = { country: 'es', language: 'es-ES' } const settings = (state = initialState, action) => { switch (action.type) { default:<|fim▁hole|> } } export default settings<|fim▁end|>
return state
<|file_name|>courseware.py<|end_file_name|><|fim▁begin|>""" Courseware page. """ from bok_choy.page_object import PageObject, unguarded from bok_choy.promise import EmptyPromise import re from selenium.webdriver.common.action_chains import ActionChains from common.test.acceptance.pages.lms.bookmarks import BookmarksP...
You can use these titles in `go_to_section` to navigate to the section. """
<|file_name|>bitcoin_hi_IN.ts<|end_file_name|><|fim▁begin|><TS language="hi_IN" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Create a new address</source> <translation>नया पता लिखिए !</translation> </message> <message> <source>Copy the currently selecte...
</context>
<|file_name|>connection.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- import ldap class Connection: def __init__(self, url='ldap://annuaire.math.univ-paris-diderot.fr:389', \ base='ou=users,dc=chevaleret,dc=univ-paris-diderot,dc=fr'): self.base = base self.url = url<|fim▁hole...
self.con = ldap.initialize(self.url) self.con.bind_s('', '') def __del__(self):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate rustc_serialize; mod json_flex; pub use json_flex::decode; pub use json_flex::Unwrap; pub use json_flex::JFObject; <|fim▁hole|>mod test;<|fim▁end|>
#[cfg(test)]
<|file_name|>LocalStorageNode.ts<|end_file_name|><|fim▁begin|>/* * #%L * %% * Copyright (C) 2019 BMW Car IT GmbH<|fim▁hole|> * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * ...
<|file_name|>config.js<|end_file_name|><|fim▁begin|>module.exports = { // Token you get from discord "token": "", // Prefix before your commands "prefix": "", // Port for webserver (Not working)<|fim▁hole|> // Mongodb stuff "mongodb": { // Mongodb uri "uri": "" }, // Channel IDs "channelID...
"port": 8080,
<|file_name|>io_ops_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
# Test exact match without wildcards.
<|file_name|>editor_plugin.js<|end_file_name|><|fim▁begin|>/** * @package JCE * @copyright Copyright (c) 2009-2015 Ryan Demmer. All rights reserved. * @license GNU/GPL 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * JCE is free software. This version may have been modified pursuant ...
}; } });
<|file_name|>length_feet_and_inches_to_metric.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this sou...
:param inches: Inch value in string
<|file_name|>ExampleEchoGinjector.java<|end_file_name|><|fim▁begin|>/* * ((e)) emite: A pure Google Web Toolkit XMPP library * Copyright (c) 2008-2011 The Emite development team * * This file is part of Emite. * * Emite is free software: you can redistribute it and/or modify * it under the terms of the G...
import com.calclab.emite.core.session.XmppSession; import com.calclab.emite.im.EmiteIMModule; import com.calclab.emite.im.chat.PairChatManager;
<|file_name|>net.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 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 "chainparams.h" #includ...
if (lockRecv)
<|file_name|>token_aware_policy.hpp<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> Copyright (c) 2014-2016 DataStax 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/licen...
<|file_name|>ManageIssueType.js<|end_file_name|><|fim▁begin|>var ManageIssueTypePage = new Ext.Panel({<|fim▁hole|> id : 'ezTrack_Manage_IssueType_Page', layout : 'fit', autoScroll : true, items: [ ManageIssueTypePanelEvent ] });<|fim▁end|>
<|file_name|>custom_metrics_stackdriver.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/...