prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>PipeItemsSterlingSilver.java<|end_file_name|><|fim▁begin|>package ua.pp.shurgent.tfctech.integration.bc.blocks.pipes.transport;
import net.minecraft.item.Item;
import net.minecraftforge.common.util.ForgeDirection;<|fim▁hole|>import ua.pp.shurgent.tfctech.integration.bc.BCStuff;
import ua.pp.shurgent.tfcte... | |
<|file_name|>rpcmining.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 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 "main.h"
#include "db.... | |
<|file_name|>managers.py<|end_file_name|><|fim▁begin|>from .message import *
from functools import wraps
import datetime
import pymongo
import re
from app import session
class Singleton(type):
instance = None
def __call__(cls, *args, **kwargs):
if not cls.instance:
cls.instance = super(Si... | @verify_session
def expire_process(self, user_key):
user = session.find_one({'user_key': user_key})
user.update({'process': None}) |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node
var app = require('./app'),
config = require('./config');
<|fim▁hole|> "use strict";
console.log('Express server listening on port ' + server.address().port);
});<|fim▁end|> |
app.set('port', process.env.PORT || config.app.port);
var server = app.listen(app.get('port'), function() { |
<|file_name|>nodelist.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::NodeListBinding;
use dom::bindin... | *found = item.is_some(); |
<|file_name|>compiler.ts<|end_file_name|><|fim▁begin|>import {Binding, resolveForwardRef, Injectable} from 'angular2/di';
import {
Type,
isBlank,
isPresent,
BaseException,
normalizeBlank,
stringify,
isArray,
isPromise
} from 'angular2/src/facade/lang';
import {Promise, PromiseWrapper} from 'angular2/src... | |
<|file_name|>security_utils.py<|end_file_name|><|fim▁begin|>#########
# Copyright (c) 2019 Cloudify Platform Ltd. All rights reserved
#<|fim▁hole|>#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed 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 |
<|file_name|>arg_visitor.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>
use error::{Error, ResultE};
use super::osc_reader::OscReader;
use super::osc_type::OscType;
use super::maybe_skip_comma::MaybeSkipComma;
#[derive(Debug)]
pub struct ArgDeserializer<'a, R: Read + 'a> {
data: Option<ArgVisitor<'a, R>>,
}
/// Des... | use std::io::{Read, Take};
use std::vec;
use serde::de;
use serde::de::{DeserializeSeed, SeqAccess, Visitor}; |
<|file_name|>machine.js<|end_file_name|><|fim▁begin|>// Abacus Machine Simulator
// Gaurav Manek
//
// machine.js compiles the parser output to an intermediate form and simulates the machine.
"use strict";
// The compiler transforms the output of the parser to an intermediate form that the machine can use.
//... | |
<|file_name|>OpenGLESPage.xaml.cpp<|end_file_name|><|fim▁begin|>/*
* cocos2d-x http://www.cocos2d-x.org
*
* Copyright (c) 2010-2014 - cocos2d-x community
* Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
*
* Portions Copyright (c) Microsoft Open Technologies, Inc.
* All Rights Reserved
*
* Licensed under the ... | }
Windows::UI::Xaml::Application::Current->Exit();
}
|
<|file_name|>ImageLoadQueue.cpp<|end_file_name|><|fim▁begin|>/*******************************************************************************
MPhoto - Photo viewer for multi-touch devices
Copyright (C) 2010 Mihai Paslariu
This program is free software: you can redistribute it and/or modify
it under the terms of the G... | }
void ImageLoadQueue::clearPriorities( void ) |
<|file_name|>cgc.py<|end_file_name|><|fim▁begin|># cgc.py - Curriculum Graph Converter - Dana Toribio
import graphviz
import os
import re
import subprocess
import sys
re_courses = re.compile('\w+\s\d+\w*') # regex for courses
header = r'''from graphviz import Digraph
g = Digraph('studyplan', filename='studyplan.gv')... | trk_electives = trk_electives + 'c2' + prereq_edge(course[0], course[1], False) |
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
... | );
// Replaced
let fork = db.fork(); |
<|file_name|>templates.js<|end_file_name|><|fim▁begin|>MetaclicUtils.Templates = {};
MetaclicUtils.Templates.datasets = [
' {{#ifCond sort "!=" false}}',
' <div class="result-sort"><label>Trier par</label>',
' <select name="sort" class="form-control">',
' {{#each sortTypes}}',
<|f... | ' {{#ifCond id "==" ../sort}}',
' <option value="{{id}}" selected>{{name}}</option>',
' {{else}}', |
<|file_name|>constexpr-builtin-bit-cast.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -triple x86_64-apple-macosx10.14.0 %s
// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-only -triple x86_64-apple-macosx10.14.0 %s -fno-signed-char
// RUN: %clang_cc1 -verify -std=c++2a -fsyntax-onl... | unsigned doublez;
};
struct tuple4 { |
<|file_name|>parser.py<|end_file_name|><|fim▁begin|>import numpy as np
import re<|fim▁hole|> '''
prende il filename e ritorna la lista [[[pt1.x,pt1.y],...],[blocco2],...]
'''
f=open(filename)
block=False
lastlist=[]
listone=[]
for i in f:
print(i)
if(re.match(r"[\d\.]+e[\+... | import os
def GetBlocks(filename): |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
#
# grmpy documentation build configuration file, created by
# sphinx-quickstart on Fri Aug 18 13:05:32 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values ... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from model_utils import Choices
from model_utils.models import TimeStampedModel
class History(TimeStampedModel):... | filters = {'resolution': self.resolution, 'tag': self.tag}
previous = self._default_manager.filter(**filters).latest()
except self._meta.model.DoesNotExist: |
<|file_name|>panic_in_result_fn_assertions.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::panic_in_result_fn)]
#![allow(clippy::unnecessary_wraps)]
struct A;
impl A {
fn result_with_assert_with_message(x: i32) -> Result<bool, String> // should emit lint
{
assert!(x == 5, "wrong argument");
Ok... | assert!(x == 5, "wrong argument");
} |
<|file_name|>ArUrg.java<|end_file_name|><|fim▁begin|>/*
Adept MobileRobots Robotics Interface for Applications (ARIA)
Copyright (C) 2004-2005 ActivMedia Robotics LLC
Copyright (C) 2006-2010 MobileRobots Inc.
Copyright (C) 2011-2014 Adept Technology
This program is free software; you can redistribute it and/or mod... | |
<|file_name|>constant-in-match-pattern.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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:/... | // debug locations to 'constant' patterns in match expressions. |
<|file_name|>sha2.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licen... | },
Test {
input: "The quick brown fox jumps over the lazy \
dog".to_string(), |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault('DJANGO_SETTINGS_MODULE',<|fim▁hole|> 'video_gallery.tests.south_settings')
from django.core.management import execute_from_command_line
... | |
<|file_name|>test_raft_paper.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICEN... | // the leader appends the proposal to its log as a new entry, then issues
// AppendEntries RPCs in parallel to each of the other servers to replicate
// the entry. Also, when sending an AppendEntries RPC, the leader includes
// the index and term of the entry in its log that immediately precedes |
<|file_name|>AspectRatioUtil.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2013, Edmodo, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License.
* You may obtain a copy of the License in the LICENSE file, or at:
*
* http://www.a... | |
<|file_name|>0007_auto_20160318_2122.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('draw', '0006_auto_20160314_1817'),
]
operations = [
... | # Generated by Django 1.9.2 on 2016-03-18 21:22 |
<|file_name|>TUTableImpl.js<|end_file_name|><|fim▁begin|>/*
* Name: TUTableImpl.js
* Module:
* Location: Norris/test/unit
* Date: 2015-05-25
* Version: v1.00
*
* History:
*
* ================================================================================
* Version Date Programmer Changes
* ================... | |
<|file_name|>I2C.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
# Based on Adafruit_I2C.py created by Kevin Townsend.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), t... | # all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
<|file_name|>ItemSharkEgg.java<|end_file_name|><|fim▁begin|>package moCreatures.items;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.World;
import moCreatures.entities.EntitySharkEgg;
// Decompiled by Jad v1.5.8g. Copyright 200... | }
} |
<|file_name|>constellation.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
//! The `Constellation`, Servo's Grand Central Station... | if let Err(e) = sender.send(CanvasMsg::Create(
canvas_id_sender, |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Dec 14 14:10:41 2016
@author: sigurdja
"""<|fim▁hole|> version="0.1",
packages=find_packages(),
)<|fim▁end|> |
from setuptools import setup, find_packages
setup(
name="psse_models", |
<|file_name|>reloj3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Una copia del programa que hice en python 2 para tomar el tiempo en
# una partida de ajedrez pero este es para python 3.
from tkinter import *
from tkinter import font
import datetime
class RelojAjedrez(Frame):
def _... | self.rNegras = datetime.timedelta(0) |
<|file_name|>ApplicationTest.java<|end_file_name|><|fim▁begin|>package com.example.apahlavan1.top10downloader;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest ext... | public ApplicationTest() { |
<|file_name|>page-api.cpp<|end_file_name|><|fim▁begin|>#include "models/page-api.h"
// #include <QtConcurrentRun>
#include <QTimer>
#include <QtMath>
#include <utility>
#include "functions.h"
#include "image.h"
#include "logger.h"
#include "models/api/api.h"
#include "models/filtering/post-filter.h"
#include "models/pa... |
m_originalUrl = QString(url);
m_url = QString(url); |
<|file_name|>form-mapping.js<|end_file_name|><|fim▁begin|>var form = window.document.forms[0];
var inputsObject = {};
var rawParams = [];
var mappedParams = [];
var getInputValue = function(input) {
var value = false;
switch (input.type) {
case 'radio':
case ... | |
<|file_name|>UsersService.java<|end_file_name|><|fim▁begin|>package com.p.service;
import java.util.Collection;
import java.util.Optional;
import java.util.Random;
import java.util.UUID;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.hibernate.SessionFactory;
import org.springframework.... | authentication = context.getAuthentication();
Assert.notNull(authentication);
principal = authentication.getPrincipal(); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .sql import *
<|fim▁hole|><|fim▁end|> | __all__ = ['DBAdapter', 'get_db_adapter', 'async_atomic', 'async_atomic_func', 'get_db_settings'] |
<|file_name|>Opdracht1.py<|end_file_name|><|fim▁begin|>__author__ = 'SM'
import sys
import
# from tkinter import *
# #create new window
# root = Tk()
# root.title("Hello world app")
# root.geometry('200x85')
#
# app = Frame()
# app.grid()
# lbl = Label(app, text = "Hello World!")
# lbl.grid()
#
# bttn1 = Button(app... | # Our function to call when the button is clicked
def sayHello():
print("Hello world") |
<|file_name|>emberTemplates.js<|end_file_name|><|fim▁begin|>module.exports = {
options: {
templateCompilerPath: 'bower_components/ember/ember-template-compiler.js',
handlebarsPath: 'bower_components/handlebars/handlebars.js',
preprocess: function (source) {
return source.replace(/\s+/g, ' ');
},
template... | components/[name].hbs ==> components/[name]
partials/[name].hbs ==> _[name]
modules/application/templates/[name].hbs ==> [name] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import logging
from speaklater import make_lazy_string
from quokka.modules.accounts.models import User
logger = logging.getLogger()
def lazy_str_setting(key, default=None):
from flask import current_app
return make_lazy_string(
... | except Exception as e:
logger.warning("No user found: %s" % e.message)
return None |
<|file_name|>adjust_event.js<|end_file_name|><|fim▁begin|>/** @file This file contains the functions to adjust an existing polygon. */
/**
* Creates the adjusting event
* @constructor
* @param {string} dom_attach - The html element where the polygon lives
* @param {array} x - The x coordinates for the pol... | return e.data.obj.StartMoveScalingPoint(e.data.point);
});
|
<|file_name|>TimeoutManager.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * Copyright (C) 2000 - 2012 Silverpeas
*
* This program 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... | /** |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>// #docregion
import { enableProdMode } from '@angular/core';<|fim▁hole|>import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(AppModule);<|fim▁end|> | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module'; |
<|file_name|>jet.py<|end_file_name|><|fim▁begin|>from heppy_fcc.particles.jet import Jet as BaseJet<|fim▁hole|>import math
class Jet(BaseJet):
def __init__(self, fccjet):
self.fccjet = fccjet
self._tlv = TLorentzVector()
p4 = fccjet.Core().P4
self._tlv.SetXYZM(p4.Px, p4.Py, p4.... | from vertex import Vertex
from ROOT import TLorentzVector |
<|file_name|>handlers.py<|end_file_name|><|fim▁begin|>#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apac... | |
<|file_name|>CamelCase.js<|end_file_name|><|fim▁begin|>import {expect} from 'chai';
import {camel_case} from '../src';<|fim▁hole|>
describe('CamelCase', () => {
it('should be exists.', () => {
expect(camel_case).to.be.exists;
});
it('should convert helloThere to HelloThere.', () => {
e... | |
<|file_name|>stable-addr-of.rs<|end_file_name|><|fim▁begin|>// run-pass
// Issue #2040
pub fn main() {
let foo: isize = 1;<|fim▁hole|>}<|fim▁end|> | assert_eq!(&foo as *const isize, &foo as *const isize); |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(clamp)]
use std::{env, fs};
fn main() {
let uid = unsafe { geteuid() };
if uid != 0 {
panic!("UID {} is not root", uid);
}
let args: Vec<String> = env::args().collect();
match args.as_slice() {
[_, x] => run(x),
_... | n if n.parse::<i64>().is_ok() => set(n.parse::<i64>().unwrap()),
_ => help(),
} |
<|file_name|>aiplatform_v1_generated_metadata_service_create_context_sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2022 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 ... | # Create a client
client = aiplatform_v1.MetadataServiceClient()
|
<|file_name|>Close.tsx<|end_file_name|><|fim▁begin|>import {
BoostnoteIconProps,
BoostnoteIconStyledContainer
} from '../../lib/icons'
import React from 'react'
export const IconClose = (props: BoostnoteIconProps) => (
<BoostnoteIconStyledContainer>
<svg
width='1em'
height='1em'
viewBox='0 ... | |
<|file_name|>sale_order.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-2013 Elanz (<http://www.openelanz.fr>).
#
# This program is free software: you can red... | from openerp.tools.translate import _
|
<|file_name|>check.rs<|end_file_name|><|fim▁begin|>use std::error::Error;
use std::fmt::{self, Debug, Display};
use futures::future::BoxFuture;
use crate::client::Context;
use crate::framework::standard::{Args, CommandOptions};
use crate::model::channel::Message;
/// This type describes why a check has failed.
///
/... | |
<|file_name|>pages.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"net/http"
"strings"
)
type formField struct {
Present bool
Value string
}
func (f formField) UpdatePresent(p bool) formField {
f.Present = p
return f
}
func checkField(key string, r *http.Request) formField {
var f formField
... | var pgData pageData
wasGet := r.FormValue("submit") == "Get"
pgData, err = dbDeleteRecord(r)
|
<|file_name|>regionck-unboxed-closure-lifetimes.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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-APA... | |
<|file_name|>background.js<|end_file_name|><|fim▁begin|>/*
* Copyright 2019 The Project Oak 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/licens... | * distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>AwsClientBuilder.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2011-2019 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located... | * @return This object for method chaining.
*/
public final Subclass withRequestHandlers(RequestHandler2... handlers) {
setRequestHandlers(handlers); |
<|file_name|>controller.js<|end_file_name|><|fim▁begin|>angular.module('app', [])<|fim▁hole|><|fim▁end|> | .controller('Controller', function($scope) {
$scope.hi = 'world';
}); |
<|file_name|>cache_configuration.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.flushCacheConfiguration = exports.getCacheConfiguration = exports.loadCacheConfigurations = exports.setCacheConfiguration = undefined;
var _stringify = require('babel... | var _serverSideReactNative = require('./server-side-react-native'); |
<|file_name|>bitcoin_gl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="gl" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About BillaryCoin</source>
<translation>Acerca de Bil... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># browsershots.org - Test your web design in different browsers
# Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org>
#
# Browsershots is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | __date__ = "$Date: 2007-08-20 06:02:52 +0530 (Mon, 20 Aug 2007) $"
__author__ = "$Author: johann $" |
<|file_name|>binary_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2012-2013 Spotify AB
#
# 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... | # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
<|file_name|>testSICKSlowMetropolis.cpp<|end_file_name|><|fim▁begin|>/**
* @brief Tests a slow version of MCMC for Occupancy grids
* @author Brian Peasley
* @date ?
*/
#include "OccupancyGrid/MCMC.h"
#include "OccupancyGrid/cvmat_serialization.h"
#include "OccupancyGrid/visualiser.h"
#include "OccupancyGrid/load... | po::positional_options_description pos; |
<|file_name|>release.js<|end_file_name|><|fim▁begin|>module.exports = function (grunt) {
var packageVersion = require('../../package.json').version;
<|fim▁hole|>
grunt.registerTask('updateRelease', '', function () {
packageVersion = require('../../package.json').version;
});
// Maintainers: Run prior to a releas... | /* -------------
RELEASE
------------- */
grunt.registerTask('notes', 'Run a ruby gem that will request from Github unreleased pull requests', ['prompt:generatelogsmanually']); |
<|file_name|>SolverException.java<|end_file_name|><|fim▁begin|>package edu.cmu.cs.dickerson.kpd.solver.exception;
<|fim▁hole|> public SolverException(String message) {
super(message);
}
}<|fim▁end|> | public class SolverException extends Exception {
private static final long serialVersionUID = 1L;
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 Google Inc. 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/license... | assert_eq!(32, linebreak_property('\u{B3F5}')); |
<|file_name|>patch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Luis Alberto Perez Lazaro <luisperlazaro@gmail.com>
# Copyright: (c) 2015, Jakub Jirutka <jakub@jirutka.cz>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https... | that will be stripped from each file name found in the patch file. |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule } from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {HttpModule} from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/a... | MdMenuModule, |
<|file_name|>leap.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2013, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
* additional grant of patent rights can be found in the ... | Entry.call(this); |
<|file_name|>user.py<|end_file_name|><|fim▁begin|># coding: utf-8
from libs.redis_storage import db1
class User(object):
def __init__(self, **kwargs):
pk = kwargs.get('pk') or db1.incr('new_user_id')
kwargs['pk'] = pk
db1.hmset('user::{}'.format(pk), kwargs)
super(User, self).__se... | def incr(self, attr, by=1):
db1.hincrby(self.db_key, attr, by) |
<|file_name|>UserString.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
## vim:ts=4:et:nowrap
"""A user-defined wrapper around string objects
Note: string objects have grown methods in Python 1.6
This module requires Python 1.6 or later.
"""
from types import StringType, UnicodeType
import sys
__all__ = ["UserS... | def isspace(self): return self.data.isspace()
def istitle(self): return self.data.istitle() |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// =================================================================
//
// * WARNING *
//
// This file is generated!
//
// Changes made to this file will be overwritten. If changes are
// required to the generated code, the ... | |
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>var REGEX = require('REGEX'),
MAX_SINGLE_TAG_LENGTH = 30,
create = require('DIV/create');
var parseString = function(parentTagName, htmlStr) {
var parent = create(parentTagName);
parent.innerHTML = htmlStr;
return parent;
};
<|fim▁hole|> var si... | var parseSingleTag = function(htmlStr) {
if (htmlStr.length > MAX_SINGLE_TAG_LENGTH) { return null; }
|
<|file_name|>svg.py<|end_file_name|><|fim▁begin|>class Printer:
def __init__(self):
self._output = ''
def print_output(self, output):
self._output += output
def print_line(self, x1, y1, x2, y2, color=0, width=1):
self.print_output(_svg_line(x1, y1, x2, y2, color=color, width=width... | |
<|file_name|>EnvironmentVariable58StateElement.py<|end_file_name|><|fim▁begin|># Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ve... | #
# PySCAP is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
<|file_name|>ccl_bplist.py<|end_file_name|><|fim▁begin|>"""
Copyright (c) 2012, CCL Forensics
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above co... |
class NsKeyedArchiverDictionary(dict): |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import codecs
import os
from setuptools import setup, find_packages
def read(filename):
filepath = os.path.join(os.path.dirname(__file__), filename)
return codecs.open(filepath, encoding='utf-8').read()
setup(
name='lemon-filebrowser',
version='0.1.... | author='Trilan Team', |
<|file_name|>page.py<|end_file_name|><|fim▁begin|>from google.appengine.ext.webapp import template
from models.user import User
from models.page import Page
import webapp2
import json
class PageHandler(webapp2.RequestHandler):
def get(self, page_id):
template_params = {}
user = None
if self.request.cookies... | self.response.write(html)
|
<|file_name|>test_costs.py<|end_file_name|><|fim▁begin|># Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | expected_result = np.ones((1, 1)) / 3.
compare_metric(Misclassification(), |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import json<|fim▁hole|>import numpy as np
import pandas as pd
import numbers
class NumpyAndPandasEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, (np.ndarray, np.matrix)):
return [self.default(x) for x in obj]
i... | |
<|file_name|>DougLea.java<|end_file_name|><|fim▁begin|>/*
Sample code file for CPJ2e.
All code has been pasted directly from the camera-ready copy, and
then modified in the smallest possible way to ensure that it will
compile -- adding import statements or full package qualifiers for
some class names, adding... | }
|
<|file_name|>Redrawable.java<|end_file_name|><|fim▁begin|>package com.kartoflane.superluminal2.components.interfaces;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;<|fim▁hole|>
public interface Redrawable extends PaintListener
{
/**
* Calls paintControl if the object is visi... | |
<|file_name|>take.rs<|end_file_name|><|fim▁begin|>use {Buf};
use std::cmp;
/// A `Buf` adapter which limits the bytes read from an underlying buffer.
///
/// This struct is generally created by calling `take()` on `Buf`. See
/// documentation of [`take()`](trait.Buf.html#method.take) for more details.
#[derive(Debug)... | pub fn set_limit(&mut self, lim: usize) {
self.limit = lim |
<|file_name|>20170311204915-create-choice.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('Choices', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.I... | return queryInterface.dropTable('Choices');
}
}; |
<|file_name|>AddonManager_ko.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="1.1" language="ko" sourcelanguage="en">
<context>
<name>AddonInstaller</name>
<message><|fim▁hole|> <source>Installed location</source>
<translation>설치 위치</translation>
... | <location filename="addonmanager_workers.py" line="531"/> |
<|file_name|>struct_destructuring_cross_crate.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... | // except according to those terms.
#[crate_type="lib"];
|
<|file_name|>register.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 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<|fim▁hole|> http://www.apache.org/licenses/LICENSE-... | |
<|file_name|>multipart_parser.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/fetch/multipart_parser.h"
#include "base/cxx17_ba... | |
<|file_name|>OpsDeviceManager.py<|end_file_name|><|fim▁begin|>"""
config of ops service, Control by OPS devices
@author: opsdev
"""
import httplib
import json
from OpsServiceConfig import OPS_SERVICE_CONFIG
class OpsDeviceManager():
def __init__(self,config):
self.server = config["server"]
self.... | body = json.dumps(data)
if action == self.addAction: |
<|file_name|>attr_invalid2.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/licenses/MIT>, a... |
#[nopanic = "something"] //~ ERROR: #[nopanic] does not have arguments or values
pub fn foo() {}
|
<|file_name|>validation_job.py<|end_file_name|><|fim▁begin|>'''
Created on Mar 19, 2014
@author: Simon
'''
from engine.engine_job import EngineJob
class ValidationJob(EngineJob):
'''
M/R job for validating a trained model.
'''
def mapper(self, key, values):
data_processor = self.get_data_pro... | vals = list(values) |
<|file_name|>setup_package.py<|end_file_name|><|fim▁begin|>from distutils.core import Extension
from collections import defaultdict
def get_extensions():
import numpy as np
exts = []<|fim▁hole|> mac_incl_path = "/usr/include/malloc"
cfg = defaultdict(list)
cfg['include_dirs'].append(np.get_includ... |
# malloc |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (
scoped_session,
sessionmaker,
)
from zope.sqlalchemy import ZopeTransactionExtension<|fim▁hole|>from handlers.index import IndexHandler
from handlers.sensors import Sens... |
import tornado.web |
<|file_name|>qgserrordialog.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
qgserrordialog.cpp - error description
-------------------
begin : October 2012
copyright : ... | QgsErrorDialog::~QgsErrorDialog()
{
} |
<|file_name|>RskAddress.java<|end_file_name|><|fim▁begin|>/*
* This file is part of RskJ
* Copyright (C) 2017 RSK Labs Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either ... | * @return the null address, which is the receiver of contract creation transactions.
*/ |
<|file_name|>RequiresEconomyModifier.java<|end_file_name|><|fim▁begin|>/*
* This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file
* at the root of this project for more details.
*/
package io.github.nucleuspowered.nucleus.core.scaffold.command.modifier.impl;
import io.github.n... | |
<|file_name|>32.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { NumberSmall_332 as default } from "../../"; |
<|file_name|>login.rs<|end_file_name|><|fim▁begin|>use std::io::prelude::*;
use std::io;
use cargo::ops;
use cargo::core::{SourceId, Source};
use cargo::sources::RegistrySource;
use cargo::util::{CliResult, CliError, Config};
#[derive(RustcDecodable)]
struct Options {
flag_host: Option<String>,
arg_token: Opt... | |
<|file_name|>match.js<|end_file_name|><|fim▁begin|>"use strict";
var valueToString = require("@sinonjs/commons").valueToString;
var indexOf = require("@sinonjs/commons").prototypes.string.indexOf;
var forEach = require("@sinonjs/commons").prototypes.array.forEach;
var type = require("type-detect");
var engineCanCompa... | /* istanbul ignore next: this is basically the rest of the function, which is covered */ |
<|file_name|>test_handle.py<|end_file_name|><|fim▁begin|># Copyright 2012 Kevin Goodsell
#
# This software is licensed under the Eclipse Public License (EPL) V1.0.
<|fim▁hole|>import unittest
import STAF
class HandleTests(unittest.TestCase):
def assertSTAFResultError(self, rc, func, *args, **kwargs):
try... | from __future__ import with_statement
import time |
<|file_name|>comex_page_profile_controllers.js<|end_file_name|><|fim▁begin|>/**we have all
* @fileoverview
* Profile 1/overview and 2/completing
* @todo
* - package.json
*
* @version 1
* @copyright ISCPIF-CNRS 2016
* @author romain.loth@iscpif.fr
*
* @requires comex_user_shared, comex_lib_elts
*
* NB The... | }
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.