prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>BeanPropertyComparator.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2005-2015 The Kuali Foundation
*
* Licensed under the Educational Community 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
*
* ... | for (Iterator i = propertyNames.iterator(); (compared == 0) && i.hasNext();) {
String currentProperty = i.next().toString();
// choose appropriate comparator |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>var express = require('express');
var http = require('http');
var path = require('path');
var app = express();
app.use(express.bodyParser());
app.use(app.router);
app.use(express.static(__dirname + '/public'));
// Simple REST server.
var users = [];
app.post('/use... | }
});
|
<|file_name|>debug_info.py<|end_file_name|><|fim▁begin|>"""Helper to handle a set of topics to subscribe to."""
from __future__ import annotations
from collections import deque
from collections.abc import Callable
import datetime as dt
from functools import wraps
from typing import Any
import attr
from homeassistant... | entity_id: str, |
<|file_name|>auditmessages.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2008-2015 Citrix 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.or... |
class auditmessages(base_resource) : |
<|file_name|>baidu.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose');
var Post = require('../models/Post').Post;
var config = require('../config');
var http = require('http');<|fim▁hole|>var site = "";
var token = "";
var options = {
host: 'data.zz.baidu.com',
path: '/urls?site=' + site + '&token=... | |
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright(C) 2013 Julien Veyssier
#
# This file is part of weboob.
#
# weboob 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 Foundati... | recipe.instructions = rec.instructions |
<|file_name|>test_temp.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Unit Tests for temp module
#
# See __usage__ for an explanation of runtime arguments.
#
# -Christopher Blunck
#
import unittest
from ..temp import *
__author__ = 'Christopher Blunck'
__email__ = 'chris@wxnet.org'
__revision__ = '$Rev... | |
<|file_name|>plug.go<|end_file_name|><|fim▁begin|>package xrest
type Plugger interface {
Plug(Handler) Handler<|fim▁hole|><|fim▁end|> | } |
<|file_name|>buddhist.js.uncompressed.js<|end_file_name|><|fim▁begin|><|fim▁hole|>version https://git-lfs.github.com/spec/v1
oid sha256:ff6a5c1204e476c89870c6f14e75db666fa26de9359f9d8c372ef779b55c8875
size 2736<|fim▁end|> | |
<|file_name|>Socket.js<|end_file_name|><|fim▁begin|>var socketio = require('socket.io'),
dotProp = require('dot-prop');
/**
* Constructs a Socket.
* Socket manager powered by Socket.IO.
*
* @constructor
*/
function Socket(){
this.port = null;
this.io = null;
this.scope = {};
}
Socket.prototype.start =... | socket.on('call', function(data){
dotProp.get(self.scope, data.path).job.call(data); |
<|file_name|>ifmt.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/L... | // Just make sure that the macros are defined, there's not really a lot that we
// can do with them just yet (to test the output) |
<|file_name|>multipart.py<|end_file_name|><|fim▁begin|>'''
Classes for using multipart form data from Python, which does not (at the
time of writing) support this directly.
To use this, make an instance of Multipart and add parts to it via the factory
methods field and file. When you are done, get the content via the... | Create and append a file part. THis kind of part has a field name,
a filename, and a value. |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Aaron Krebs akrebs@ualberta.ca
# 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, either version 3 of the License, or
# (at ... | name='registration_disallowed'
), |
<|file_name|>editorbase.py<|end_file_name|><|fim▁begin|># Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
# PyQt4 includes for python bindings to QT
from PyQt4.QtCore import Qt, QString
from PyQt4.QtGui import QFont, QFontMetrics, QColor, QIcon, QLab... | # Main |
<|file_name|>dump_waffle_flags.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from django.core.management import call_command
from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, *args, **options):
call_command(
'dumpdata',<|fim▁hole|> ... | "waffle.flag",
indent=4,
use_natural_foreign_keys=True, |
<|file_name|>traits.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, either ver... | fn mem_used(&self) -> usize;
/// Returns the size of journalled state in memory. |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
with open("README.rst") as readme_file:
long_description = readme_file.read()
setup(name="Presser",
version="0.1.8",
packages=["presser",],
license="GNU GPL v3.0",
description="Extracts data from vine, in lieu of an A... | download_url="https://github.com/ladyrassilon/presser/archive/", |
<|file_name|>Storage.js<|end_file_name|><|fim▁begin|>/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and lice... | * @returns the data object |
<|file_name|>jqplot.cursor.js<|end_file_name|><|fim▁begin|>/**
* jqPlot
* Pure JavaScript plotting plugin using jQuery
*
* Version: 1.0.4
* Revision: 1120
*
* Copyright (c) 2009-2012 Chris Leonello
* jqPlot is currently available for use in all personal or commercial projects
* under both the MIT (ht... | }
|
<|file_name|>json.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2002 JSON.org
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, including without limitation the rights to use... | if (f) {
v = f(v);
if (typeof v == 'string') {
if (b) { |
<|file_name|>animated_properties.mako.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 app_units::Au;
use cssparser::{Color as ... | let iz = fz.interpolate(&tz, progress).unwrap();
result.push(TransformOperation::Translate(ix, iy, iz)); |
<|file_name|>utilsOsType.py<|end_file_name|><|fim▁begin|>""" Utility module to determine the OS Python running on
--------------------------------------------------------------------------
File: utilsOsType.py
Overview: Python module to supply functions and an enumeration to
... | # Python modules:
import sys # Provide system information
# Third party modules: |
<|file_name|>install.rs<|end_file_name|><|fim▁begin|>use std::path::Path;
use cargo::ops;
use cargo::core::{SourceId, GitReference};
use cargo::util::{CliResult, Config, ToUrl, human};
#[derive(RustcDecodable)]
struct Options {
flag_jobs: Option<u32>,
flag_features: Vec<String>,
flag_no_default_features: ... | |
<|file_name|>quote.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/licenses/... |
let stmt_let_tt = cx.stmt_let(sp, true, id_ext("tt"), cx.expr_vec_ng(sp)); |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::fmt;
trait OutlinePrint: fmt::Display {
fn outline_print(&self) {
let output = self.to_string();
let len = output.len();
println!("{}", "*".repeat(len + 4));
println!("*{}*", " ".repeat(len + 2));
println!("* {} *", ... | } |
<|file_name|>form.theme.inc.js<|end_file_name|><|fim▁begin|>/**
* Themes a checkbox input.
* @param {Object} variables
* @return {String}
*/<|fim▁hole|> if (variables.checked) {
variables.attributes.checked = 'checked';
}
var output = '<input ' + drupalgap_attributes(variables.attributes) + ' />';
... | function theme_checkbox(variables) {
try {
variables.attributes.type = 'checkbox';
// Check the box? |
<|file_name|>tridentnet_r152v1bc4_c5_2x.py<|end_file_name|><|fim▁begin|>from models.tridentnet.builder import TridentFasterRcnn as Detector
from models.tridentnet.builder_v2 import TridentResNetV1bC4 as Backbone
from models.tridentnet.builder import TridentRpnHead as RpnHead
from models.tridentnet.builder import proces... | short = 800 // 16
long = 1200 // 16
stride = 16
scales = (2, 4, 8, 16, 32) |
<|file_name|>mail_compose_message.py<|end_file_name|><|fim▁begin|># Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import ast
from odoo import api, exceptions, models, _
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
@api.model
... | self.env['ir.config_parameter'].sudo().get_param(
key, default='{}')) |
<|file_name|>status.rs<|end_file_name|><|fim▁begin|>use bytes::Bytes;
use crate::HeaderValue;
pub const STATUS_200: HeaderValue =
unsafe { HeaderValue::from_bytes_unchecked(Bytes::from_static(b"200")) };
pub const STATUS_404: HeaderValue =
unsafe { HeaderValue::from_bytes_unchecked(Bytes::from_static(b"404"))... | match code { |
<|file_name|>RevealableBlock.ts<|end_file_name|><|fim▁begin|>import { Renderer } from '../Rendering/Renderer'
import { Heading } from './Heading'
import { RichOutlineSyntaxNode } from './RichOutlineSyntaxNode'
export class RevealableBlock extends RichOutlineSyntaxNode {
render(renderer: Renderer): string {<|fim▁hol... | return renderer.revealableBlock(this)
}
// As a rule, we don't want to include any revealable (i.e. initially hidden) headings in the |
<|file_name|>Uniques.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2006-2020 Talend Inc. - www.talend.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
__init__.py
ist303-miye
Copyright (C) 2017
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; either version 2 of the License, or (at your ... | version.
This program is distributed in the hope that it will be useful, but WITHOUT |
<|file_name|>IgmpLayer.cpp<|end_file_name|><|fim▁begin|>#define LOG_MODULE PacketLogModuleIgmpLayer
#include "IgmpLayer.h"
#include "PacketUtils.h"
#include "Logger.h"
#include <string.h>
#include "EndianPortable.h"
namespace pcpp
{
/*************
* IgmpLayer
*************/
IgmpLayer::IgmpLayer(Igm... | case IgmpType_MulticastTracerouteResponse:
msgType = "Multicast Traceroute Response";
break;
|
<|file_name|>Stochastic Utility.py<|end_file_name|><|fim▁begin|>from chowdren.writers.objects import ObjectWriter
from chowdren.common import get_animation_name, to_c, make_color<|fim▁hole|>
class Util(ObjectWriter):
class_name = 'Utility'
static = True
def write_init(self, writer):
pass
actions ... |
from chowdren.writers.events import (StaticConditionWriter,
StaticActionWriter, StaticExpressionWriter, make_table) |
<|file_name|>Assembly_it.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="it" sourcelanguage="en">
<context>
<name>AssemblyGui::Workbench</name>
<message>
<location filename="../../Workbench.cpp" line="+50"/>
<source>Assembly</sourc... | <name>CmdAssemblyConstraintAxle</name>
<message>
<location filename="../../Command.cpp" line="+42"/> |
<|file_name|>test_inventory.py<|end_file_name|><|fim▁begin|># Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com>
#
# This file is part of Ansible
#
# Ansible 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,... | 'a[-2]': [('a', (-2, None)), ['Y']],
'a[48:]': [('a', (48, -1)), ['W', 'X', 'Y', 'Z']],
'a[49:]': [('a', (49, -1)), ['X', 'Y', 'Z']],
'a[1:]': [('a', (1, -1)), list(string.ascii_letters[1:])], |
<|file_name|>motorctrl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import zmq
from zmq.eventloop import ioloop as ioloop_mod
import zmqdecorators
import time
SERVICE_NAME = "urpobot.motor"
SERVICE_PORT = 7575
SIGNALS_PORT = 7576
# How long to wait for new commands before stopping aut... |
class motorserver(zmqdecorators.service):
def __init__(self, service_name, service_port, serialport):
super(motorserver, self).__init__(service_name, service_port) |
<|file_name|>applicationautoscaling.py<|end_file_name|><|fim▁begin|>"""General-use classes to interact with the ApplicationAutoScaling service through CloudFormation.
See Also:
`AWS developer guide for ApplicationAutoScaling
<https://docs.aws.amazon.com/autoscaling/application/APIReference/Welcome.html>`_
"""
... | |
<|file_name|>test_cleanup.py<|end_file_name|><|fim▁begin|>"""
Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved.
This program and the accompanying materials are made available under
the terms of the under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance w... | distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and |
<|file_name|>edit.py<|end_file_name|><|fim▁begin|>from zeit.cms.i18n import MessageFactory as _
from zope.cachedescriptors.property import Lazy as cachedproperty
import os.path
import zeit.cms.browser.view
import zeit.cms.content.interfaces
import zeit.cms.interfaces
import zeit.content.image.interfaces
import zeit.con... | import zope.formlib.form
|
<|file_name|>rabbit_queues.py<|end_file_name|><|fim▁begin|>import requests
from requests.auth import HTTPBasicAuth
def get_data(config):
auth = HTTPBasicAuth(config['authentication']['username'], config['authentication']['password'])
resp = requests.get(config['host'] + '/api/queues', auth=auth)
queues = ... | |
<|file_name|>Application.java<|end_file_name|><|fim▁begin|>package shuaicj.hello.configuration.case04;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* Spring boot application.
*
* @author shuaicj 2019/10/12
*/
@SpringBootApplication
pub... | }
} |
<|file_name|>filters.js<|end_file_name|><|fim▁begin|>var Vue = require('vue')<|fim▁hole|>
function fixFilters() {
// 动态 filter
Vue.filter('apply', function(value, name) {
var filter = this.$options.filters[name] || Vue.options.filters[name]
var args = [value].concat(
[].slice.call(ar... | |
<|file_name|>tagger_transitions.cc<|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/licenses... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>mod test_binary_ops_grad;
mod test_core;
mod test_optimizers;
mod test_tensor_ops_eval;
mod test_tensor_ops_grad;<|fim▁end|> | mod test_array_gen;
mod test_binary_ops_eval; |
<|file_name|>conditions.py<|end_file_name|><|fim▁begin|>'''
A condition
'''
from base import Base
from compares import const
class ComparisonMixin(object):
'''
Compare two values with a comparison utility
to denote if a change has validated.
'''
def compare(self, a, b, ctype=None):
'''
... | |
<|file_name|>test_dependency.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 informa... | |
<|file_name|>item.rs<|end_file_name|><|fim▁begin|>// An item is line of text that read from `find` command or stdin together with
// the internal states, such as selected or not
use std::cmp::Ordering;
use ncurses::*;
use ansi::parse_ansi;
use regex::Regex;
use reader::FieldRange;
use std::borrow::Cow;
use std::ascii:... | //------------------------------------------------------
// +- T -> trans+ANSI | ANSI |
<|file_name|>mdc-slider-e2e-module.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC All Rights Reserved.
*<|fim▁hole|>
import {NgModule} from '@angular/core';
import {MatSliderModule} from '@angular/material-experimental/mdc-slider';
import {MdcSliderE2e} from './mdc-slider-e2e';
@NgModule({
... | * 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
*/ |
<|file_name|>filterList.ts<|end_file_name|><|fim▁begin|>import { Pipe } from '@angular/core';
import { Config } from './config';
@Pipe({
name: 'filterList'
})
export class FilterList {
transform(items: any[], args: any): any[] {
if (items.length === 0 || args.length < Config.minFilterInput) return items;
retur... | return Config.filterTypes.indexOf(k) > -1 ? new RegExp(args, 'i').test(item[k]) : false;
}); |
<|file_name|>jigsaw.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function, absolute_import
import selfsup
import tensorflow as tf
import os
from .base import Method
from collections import OrderedDict
import deepdish as dd
import numpy as np
import itertools
import selfsup.jigsaw
PERMUTATION... | info['activations']['primary_loss'] = primary_loss |
<|file_name|>kickass.py<|end_file_name|><|fim▁begin|>"""
Kickass Torrent (Videos, Music, Files)
@website https://kickass.so
@provide-api no (nothing found)
@using-api no
@results HTML (using search portal)
@stable yes (HTML can change)
@parse url, title, content, seed, leech, magnetlink
""... |
search_res = dom.xpath('//table[@class="data"]//tr')
|
<|file_name|>builtin_math.go<|end_file_name|><|fim▁begin|>package goja
import (
"math"
)
func (r *Runtime) math_abs(call FunctionCall) Value {
return floatToValue(math.Abs(call.Argument(0).ToFloat()))
}
func (r *Runtime) math_acos(call FunctionCall) Value {
return floatToValue(math.Acos(call.Argument(0).ToFloat()... | m._putProp("LN2", valueFloat(math.Ln2), false, false, false) |
<|file_name|>returning.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The Cockroach Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|>//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed u... | // you may not use this file except in compliance with the License.
// You may obtain a copy of the License at |
<|file_name|>trackobjects.py<|end_file_name|><|fim▁begin|>from cellprofiler.gui.help import USING_METADATA_HELP_REF, USING_METADATA_GROUPING_HELP_REF, LOADING_IMAGE_SEQ_HELP_REF
TM_OVERLAP = 'Overlap'
TM_DISTANCE = 'Distance'
TM_MEASUREMENTS = 'Measurements'
TM_LAP = "LAP"
TM_ALL = [TM_OVERLAP, TM_DISTANCE, TM_MEASURE... |
if (not from_matlab) and variable_revision_number == 4:
# Added lifetime filtering: Wants filtering + min/max allowed lifetime
setting_values = setting_values + [cps.NO, cps.YES, "1", cps.NO, "100"] |
<|file_name|>FileStreamSinkConnector.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 ... | return AppInfoParser.getVersion();
}
@Override |
<|file_name|>dest.js<|end_file_name|><|fim▁begin|>var through = require('through2');
var should = require('should');
var dat = require('dat');
var File = require('vinyl');
var bops = require('bops');
var vdat = require('..');
describe('dest stream', function () {
var destPath = 'test/data/test-dest';
beforeEach... | |
<|file_name|>dataschema-json.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 3.3.0
build: 3167
*/
YUI.add('dataschema-json', function(Y) {
/**
* Provides a DataSchema implementation which ... | }
} |
<|file_name|>guimporter.py<|end_file_name|><|fim▁begin|>#guimporter.py<|fim▁hole|>
from PySide import QtGui, QtCore, QtWebKit
Signal = QtCore.Signal<|fim▁end|> | import sys |
<|file_name|>supplier.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt<|fim▁hole|> },
refresh: function(frm) {
if(frappe.defaults.get_default("supp_master_name")!="Naming Series") {
frm.toggle_display("... |
frappe.ui.form.on("Supplier", {
before_load: function(frm) {
frappe.setup_language_field(frm); |
<|file_name|>workform.js<|end_file_name|><|fim▁begin|>$(document).ready(function() {
$.viewMap = {
'install' : $('#coordinator_row'),
'repair' : $('#barcode_row, #equipment_row')
};
$('#coordinator_row').hide();<|fim▁hole|> $.each($.viewMap, function() { this.hide(); });
// show current
$.viewM... |
$('#id_work_type').change(function() {
// hide all |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, Christopher Chambers
// Distributed under the GNU GPL v3. See COPYING for details.
use regex::Regex;
use sbbm_asm::assembler::Assembler;
use sbbm_asm::commands::{Command, Target, IntoTarget, players};
use sbbm_asm::fab;
use sbbm_asm::hw::{Computer, Me... | |
<|file_name|>webserver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2
from conf import *
import socket
import os
from threading import Thread
import time
def get_cookie(request_lines):
#print("cookie data is: " + request_lines[-3])
data = request_lines[-3].split(":")[-1]
return (data.split("=")[-1])
... | #print(file_name)
|
<|file_name|>signup-mixin.js<|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/. */
define(function (require, exports, module) {
'use stri... | |
<|file_name|>settings.go<|end_file_name|><|fim▁begin|>package config
import (
"fmt"
"os"
"github.com/DimensionDataResearch/packer-plugins-ddcloud/helpers"
"github.com/mitchellh/packer/common"
"github.com/mitchellh/packer/helper/communicator"
"github.com/mitchellh/packer/packer"
)
// Settings represents the set... | }
var _ helpers.PluginConfig = &Settings{}
|
<|file_name|>rot13.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: rot13 -*-
<|fim▁hole|><|fim▁end|> | cevag "Uryyb TvgUho!".rapbqr("rot13") |
<|file_name|>wlt_2_nextion.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# coding=utf-8
# Copyright (c) 2015, 2016 Björn Schrader
#
# 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, either v... | |
<|file_name|>test4_grunt_spec.js<|end_file_name|><|fim▁begin|>'use strict';
var _ = require("lodash-node")
,parserlib = require("parserlib") // for linting CSS
,fse = require("fs-extra")
,cwd = process.cwd()
describe("test 4 - check css is valid", function() {
var originalTimeout;
beforeEach(function() {
or... | });
|
<|file_name|>sky.js<|end_file_name|><|fim▁begin|>var fs = require('fs');
var mysql = require('mysql');
var qs = require('querystring');
var express = require('express');
var config = JSON.parse(fs.readFileSync(__dirname+'/config.json', 'UTF-8'));
// --------------------------------------------------------------------... | //dataStore[data.id] = data;
dataStore = data;
res.send('ok');
}); |
<|file_name|>nav.js<|end_file_name|><|fim▁begin|>var Backbone = require('backbone'),
$ = require('jquery'),
lang = require('../lang'),
template = require('../templates/nav.hbs')
module.exports = Backbone.View.extend({
events: {
'click .js-nav': 'navigate'<|fim▁hole|> },
initialize: funct... | |
<|file_name|>OpenGLShaderProgram.cpp<|end_file_name|><|fim▁begin|>#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers
/*****************************************************************************
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* OpenRCT2 is the work of many authors, a full lis... | glDetachShader(_id, _vertexShader->GetShaderId()); |
<|file_name|>action_chains.py<|end_file_name|><|fim▁begin|># Copyright 2011 WebDriver committers
# Copyright 2011 Google 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://ww... | If None, clicks on current mouse position.
"""
if on_element: self.move_to_element(on_element)
self._actions.append(lambda: |
<|file_name|>hexcanvas.py<|end_file_name|><|fim▁begin|>from kivy.uix.floatlayout import FloatLayout
from kivy.properties import NumericProperty, ObjectProperty, BoundedNumericProperty, ListProperty
from .node import Node
from math import sqrt
class HexCanvas(FloatLayout):
last_node = ObjectProperty(None, allowno... | y_offset = a * sqrt(3) / 2
y = y_start
for j in range(self.row_count):
row = [] |
<|file_name|>RpcMessage.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 und... | */
public abstract class RpcMessage {
/** Message type */ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
from setuptools import setup, find_packages
setup(<|fim▁hole|> author='Giuseppe Lavagetto',
author_email='glavagetto@wikimedia.org',
url='https://github.com/lavagetto/plumber',
install_requires=['argparse', 'Flask', 'jinja2'],
set... | name='plumber',
version='0.0.1-alpha',
description='simple, mundane script to build and publish containers to marathon/mesos', |
<|file_name|>docker_cli_exec_test.go<|end_file_name|><|fim▁begin|>// +build !test_no_exec
package main
import (
"bufio"
"fmt"
"net/http"
"os"
"os/exec"
"path/filepath"
"reflect"
"sort"
"strings"
"sync"
"time"
"github.com/docker/docker/pkg/integration/checker"
"github.com/go-check/check"
)
func (s *Dock... | |
<|file_name|>test_fixture_creation.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from unittest import TestCase
from datetime import datetime, timedelta
from voeventdb.server.tests.fixtures import fake, packetgen
class TestBasicRoutines(TestCase):
def setUp(self):
self.start = datet... | self.assertEqual(n_interval, len(packets)) |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict';
'use strict';
angular.module('appModule', [ 'ngRoute', 'appControllers' ])
.config(function($routeProvider) {
$routeProvider.when('/home', {<|fim▁hole|> controller : 'PostCodeCtrl',
templateUrl : '/views/postcode/list.html'
}).when('/postcode/:i... | controller : 'SettingCtrl',
templateUrl : '/views/public/setting.html'
}).when('/postcodes', { |
<|file_name|>doxygen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- python -*-
#BEGIN_LEGAL
#
#Copyright (c) 2016 Intel Corporation
#
# 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 Licens... | |
<|file_name|>test_foo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import unittest
class FooTest(unittest.TestCase):
'''Sample test case -- FooTest()'''
def setUp(self):
'''Set up for testing...'''
print 'FooTest:setUp_:begin'
testName = self.shortDescription()
... | |
<|file_name|>popup_utils.js<|end_file_name|><|fim▁begin|>/*
eZ Online Editor MCE popup : common js code used in popups
Created on: <06-Feb-2008 00:00:00 ar>
Copyright (c) 1999-2014 eZ Systems AS
Licensed under the GPL 2.0 License:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*/
var e... | td.appendChild( tag );
hasImage = true; |
<|file_name|>errors_test.go<|end_file_name|><|fim▁begin|>// Copyright 2012, 2013 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package common_test
import (
stderrors "errors"
jc "github.com/juju/testing/checkers"
gc "launchpad.net/gocheck"
"github.com/wallyworld/core/errors"
"githu... | }
}
} |
<|file_name|>identity_matrix.hpp<|end_file_name|><|fim▁begin|>//Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef UUID_D6250026A17F11DEA29012BF... | template <class T,int Dim>
BOOST_LA_INLINE_TRIVIAL
la_detail::identity_matrix_<T,Dim> const & |
<|file_name|>index-spec.6.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * @author Adam Meadows <adam.meadows@gmail.com>
* @copyright 2015 Adam Meadows. All rights reserved.
*/
'use strict';
/* eslint-disable max-nested-callbacks */
let $ = require('jquery');
let main = require('aiw-ui');
describe('main', () => ... | |
<|file_name|>bitcoin_sv.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About BitcoinDark</source>
<translation>Vad du behöve... | |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.enviro... | """
WSGI config for django_tutorial project. |
<|file_name|>glyphviewerdialogextension.cpp<|end_file_name|><|fim▁begin|>/*
(c) Copyright 2002, 2003 Rogier van Dalen
(R.C.van.Dalen@umail.leidenuniv.nl for any comments, questions or bugs)
This file is part of my OpenType/TrueType Font Tools.
The OpenType/TrueType Font Tools is free software; you can redistribut... | : GlyphViewerDialogExtensionBase (parent)
{
connect( buttonFirstInstruction, SIGNAL( clicked() ), parent, SLOT( firstInstruction() ) ); |
<|file_name|>HandleException.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h"
#include "HandleException.h"
#include <dbghelp.h>
#pragma comment ( lib, "dbghelp.lib" )
typedef LONG (WINAPI * UNHANDLEDEXCEPTIONFILTER)
(
struct _EXCEPTION_POINTERS *ExceptionInfo
);
static HANDLE gEventExit = NULL;
... | |
<|file_name|>rv.py<|end_file_name|><|fim▁begin|>import os
from subprocess import call, Popen, PIPE<|fim▁hole|>from . import Command
from . import utils
class OpenSequenceInRV(Command):
"""%prog [options] [paths]
Open the latest version for each given entity.
"""
def run(self, sgfs, ... | import sys
|
<|file_name|>at_exit_imp.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | }
// FIXME: switch this to use atexit as below. Currently this
// segfaults (the queue's memory is mysteriously gone), so |
<|file_name|>fix_unreads.py<|end_file_name|><|fim▁begin|>import time
import logging
from typing import Callable, List, TypeVar, Text
from psycopg2.extensions import cursor
CursorObj = TypeVar('CursorObj', bound=cursor)
from django.db import connection
from zerver.models import UserProfile
'''
NOTE! Be careful modi... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from . import views<|fim▁hole|><|fim▁end|> |
urlpatterns = [
url(r'^$', views.AP_list, name='AP_list'),
] |
<|file_name|>profile-page.ts<|end_file_name|><|fim▁begin|>import { Page } from 'puppeteer';
import Textbox from 'app/element/textbox';
import AuthenticatedPage from 'app/page/authenticated-page';
import { waitForDocumentTitle, waitForUrl, waitWhileLoading } from 'utils/waits-utils';
import Button from 'app/element/butt... | Address1: 'streetAddress1',
Address2: 'streetAddress2',
City: 'city', |
<|file_name|>loopapp.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding: utf-8
from .interactiveapp import InteractiveApplication, ENCODING
class InteractiveLoopApplication(InteractiveApplication):<|fim▁hole|>
super(InteractiveLoopApplication, self).__init__(
name, desc, version, padd... |
def __init__(self, name, desc, version,
padding, margin, suffix, encoding=ENCODING): |
<|file_name|>progpoint.rs<|end_file_name|><|fim▁begin|>//! Program points.
use entity::EntityRef;
use ir::{Ebb, Inst, ValueDef};
use std::fmt;
use std::u32;
use std::cmp;
/// A `ProgramPoint` represents a position in a function where the live range of an SSA value can
/// begin or end. It can be either:
///
/// 1. An... | } |
<|file_name|>test_structure_matcher.py<|end_file_name|><|fim▁begin|># coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import itertools
import json
import os
import unittest
import numpy as np
from monty.json import MontyDecoder
from pymatgen.core.periodic_t... | )
)
self.assertFalse( |
<|file_name|>my-children-controller.js<|end_file_name|><|fim▁begin|>/* global _, angular */
'use strict';
function myChildrenCtrl ($scope, $state, $translate, ownProfile, cdUsersService) {
$scope.parentProfileData = ownProfile.data;
$scope.tabs = [];
function loadChildrenTabs () {
$scope.tabs = [];
cdU... | });
if (!childLoaded) { |
<|file_name|>test_microsite.py<|end_file_name|><|fim▁begin|>"""
Test for User Creation from Micro-Sites
"""
from django.test import TestCase
from student.models import UserSignupSource
import mock
import json
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
FAKE_MICROSITE = {
... | def fake_microsite_get_value(name, default=None): |
<|file_name|>ShapeService.java<|end_file_name|><|fim▁begin|>package com.sp.jb.service;
import com.sp.jb.model.Circle;
import com.sp.jb.model.Triangle;
public class ShapeService {
private Circle circle;<|fim▁hole|> private Triangle triangle;
public Circle getCircle() {
return circle;
}
pu... | |
<|file_name|>feature_column_ops.py<|end_file_name|><|fim▁begin|># 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
#
# http://ww... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.