prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>test.js<|end_file_name|><|fim▁begin|>"use strict";
var expect = require('chai').expect
, protolib = require(__dirname + '/../')
;
describe('protolib', function() {
describe('clone', function() {
it('should create a clone of the given object', function() {
var object = {
name: '... | expect(object).to.have.property('type', 'list'); |
<|file_name|>Dictory.java<|end_file_name|><|fim▁begin|>package com.glaf.base.modules.sys.model;
import java.io.Serializable;
import java.util.Date;
public class Dictory implements Serializable {
private static final long serialVersionUID = 2756737871937885934L;
private long id;
private long typeId;
private String... | |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate lalrpop;
fn main() {<|fim▁hole|> lalrpop::process_root().unwrap();
}<|fim▁end|> | |
<|file_name|>InvalidUsageException.java<|end_file_name|><|fim▁begin|>/*
* WorldEdit, a Minecraft world manipulation toolkit
* Copyright (C) sk89q <http://www.sk89q.com>
* Copyright (C) WorldEdit team and contributors
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of ... | |
<|file_name|>DICGaussSeidelSmoother.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held ... | |
<|file_name|>armdFromSourceFabs.js<|end_file_name|><|fim▁begin|>// @flow
import { transformFileSync, type babel } from 'babel-core';
import pluginReactIntl from 'babel-plugin-react-intl';
import pluginReactIntlAuto from 'babel-plugin-react-intl-auto';
import pathOr from 'ramda/src/pathOr';
import compose from 'ramda/s... | |
<|file_name|>bswap16.rs<|end_file_name|><|fim▁begin|>#![feature(core, core_intrinsics)]
extern crate core;
#[cfg(test)]
mod tests {
use core::intrinsics::bswap16;
// pub fn bswap16(x: u16) -> u16;
macro_rules! bswap16_test {
($value:expr, $reverse:expr) => ({
let x: u16 = $value;
let result: u... | |
<|file_name|>scripts.js<|end_file_name|><|fim▁begin|>$(function () {
var $container = $('#container');
var certificatesInfo = $container.data('certinfo');
var runDate = $container.data('rundate');
$('#created_date').html(runDate);
var sorted_certificates = Object.keys(certificatesInfo)
.sort(function( a... | +' <div class="card-footer">'
+' <h6 class="text-muted" style="margin-bottom:.5rem;">Issued by: {{issuer}}</h6>'
+' <h6 class="text-muted" style=""><small>{{issuer_cn}}</small></h6>' |
<|file_name|>470 Implement Rand10() Using Rand7().py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
"""
Given a function rand7 which generates a uniform random integer in the range 1
to 7, write a function rand10 which generates a uniform random integer in the
range 1 to 10.
Do NOT use system's Math.random().
"""
#... | 7-ary system
:rtype: int
""" |
<|file_name|>BraitenbergVehicle2b.py<|end_file_name|><|fim▁begin|>"""
Braitenberg Vehicle2b
The more light sensed on the left side the faster the right motor moves.
The more light sensed on the right side the faster the left motor moves.
This causes the robot to turn towards a light source.
"""
from pyrobot.brain impo... | self.robot.light[0].units = "SCALED" |
<|file_name|>fuzz6.js<|end_file_name|><|fim▁begin|>// |jit-test| error:TypeError
<|fim▁hole|><|fim▁end|> | if (!this.hasOwnProperty("TypedObject"))
throw new TypeError();
new TypedObject.StructType(RegExp); |
<|file_name|>options.go<|end_file_name|><|fim▁begin|>package levigo
// #cgo LDFLAGS: -lleveldb
// #include "leveldb/c.h"
import "C"
// CompressionOpt is a value for Options.SetCompression.
type CompressionOpt int
// Known compression arguments for Options.SetCompression.
const (
NoCompression = CompressionOpt(0... |
// NewWriteOptions allocates a new WriteOptions object.
func NewWriteOptions() *WriteOptions {
opt := C.leveldb_writeoptions_create() |
<|file_name|>LinqConcateIterator.java<|end_file_name|><|fim▁begin|>package com.github.visgeek.utils.collections;
import java.util.Iterator;
class LinqConcateIterator<T> implements Iterator<T> {
// コンストラクター
public LinqConcateIterator(Iterable<T> source, Iterable<? extends T> second) {
this.second = second;
... | result = this.itr.hasNext();
if (!this.isSwitched) {
if (!result) {
|
<|file_name|>MapTag.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2008-2013, ETH Zürich, Samuel Welten, Michael Kuhn, Tobias Langner,<|fim▁hole|> * Sandro Affentranger, Lukas Bossard, Michael Grob, Rahul Jain,
* Dominic Langenegger, Sonia Mayor Alonso, Roger Odermatt, Tobias Schlueter,
* Yannick Stucki, Sebasti... | |
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/*
* SonarQube
* Copyright (C) 2009-2022 SonarSource SA
* mailto:info AT sonarsource DOT com
*
* 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 Fre... | * Lesser General Public License for more details. |
<|file_name|>core.py<|end_file_name|><|fim▁begin|>import logging
import threading
import time
from ballast.discovery import ServerList
from ballast.rule import Rule, RoundRobinRule
from ballast.ping import (
Ping,
SocketPing,
PingStrategy,
SerialPingStrategy
)
class LoadBalancer(object):
DEFAULT_... | time.sleep(self._ping_interval) |
<|file_name|>aleph.rs<|end_file_name|><|fim▁begin|>extern crate aleph;
fn main() {}
// use aleph::reader;
// extern crate itertools;
// use itertools::*;
// extern crate ansi_term;
// use ansi_term::Colour;
<|fim▁hole|>// #[macro_use]
// extern crate clap;
// use clap::{App, AppSettings, SubCommand};
// use std:... | |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
import module
from flask import Flask, render_template, request, session, redirect, url_for, send_from_directory
from werkzeug import secure_filename
from functools import wraps
app = Flask(__name__)
# Configure upload locations
app.config['UPLOAD_FOLDER'] =... | return redirect(url_for("profile")) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
This module houses ctypes interfaces for GDAL objects. The following GDAL
objects are supported:
CoordTransform: Used for coordinate transformations from one spatial
reference system to another.
Driver: Wraps an OGR data source driver.
DataSo... | from django.contrib.gis.gdal.srs import SpatialReference, CoordTransform # NOQA
from django.contrib.gis.gdal.geometries import OGRGeometry # NOQA
|
<|file_name|>resolve.rs<|end_file_name|><|fim▁begin|>use super::encode::Metadata;
use crate::core::dependency::DepKind;
use crate::core::interning::InternedString;
use crate::core::{Dependency, PackageId, PackageIdSpec, Summary, Target};
use crate::util::errors::CargoResult;
use crate::util::Graph;
use std::borrow::Bor... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
setup(name='MODEL1302010006',
version=20140916,
description='MODEL1302010006 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/MODEL1302010006',
maintainer='Stanley Gu',
maintainer_url='... | package_data={'': ['*.xml', 'README.md']},
) |
<|file_name|>resize-app.py<|end_file_name|><|fim▁begin|>def resizeApp(app, dx, dy):
switchApp(app)
corner = find(Pattern("1273159241516.png").targetOffset(3,14))
dragDrop(corner, corner.getCenter().offset(dx, dy))
resizeApp("Safari", 50, 50)
# exists("1273159241516.png")
# click(Pattern("1273159241516.png").targetO... | |
<|file_name|>ModifyUserSpectraS3ResponseParser.java<|end_file_name|><|fim▁begin|>/*
* ******************************************************************************
* Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License"). You may not ... | import com.spectralogic.ds3client.commands.parsers.interfaces.AbstractResponseParser;
import com.spectralogic.ds3client.commands.parsers.utils.ResponseParserUtils;
import com.spectralogic.ds3client.commands.spectrads3.ModifyUserSpectraS3Response;
import com.spectralogic.ds3client.models.SpectraUser; |
<|file_name|>virtualenv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Create a "virtual" Python installation
"""
# If you change the version here, change it in setup.py
# and docs/conf.py as well.
virtualenv_version = "1.7.1.2"
import base64
import sys
import os
import optparse
import re
import shutil
impo... | sys.stdout.write('...' + self.in_progress + msg + '\n')
sys.stdout.flush()
else: |
<|file_name|>config_base.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apac... |
@staticmethod |
<|file_name|>View.java<|end_file_name|><|fim▁begin|>package com.structurizr.view;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.structurizr.model.*;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import jav... | |
<|file_name|>ssl_server_test.cc<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
*/
#include <fstream>
#include <iostream>
#include <pthread.h>
#include <memory>
#include <netinet/in.h>
#include <sstream>
#include <sys/types.h>
#include <sys/socket.h>
#include <boost/... | TASK_UTIL_EXPECT_EQ(connect_abort_, 0);
// wait for on connect message to come back from echo server.
TASK_UTIL_EXPECT_EQ(sent_data_size, session->len());
|
<|file_name|>passes.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/lic... | match i {
Some(i) => { |
<|file_name|>cart66-library.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function($) {
$('.modalClose').click(function() {
$('.Cart66Unavailable').fadeOut(800);
});
$('#Cart66CancelPayPalSubscription').click(function() {
return confirm('Are you sure you want to cancel your subscription?\n'... | str += name + '=' + encodeURIComponent(val) + '&';
} |
<|file_name|>fetch.js<|end_file_name|><|fim▁begin|>/**
* @module kat-cr/lib/fetch
* @description
* Wraps request in a Promise
*/
/**
* The HTTP response class provided by request
* @external HTTPResponse
* @see {@link http://github.com/request/request}
*/
"use strict";
const request = (function loadPrivate(m... | * @description |
<|file_name|>permission_request_id.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 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 "components/permissions/permission_request_id.h"
#include <inttypes.h>
#inclu... | #include "content/public/browser/render_process_host.h"
|
<|file_name|>354. Russian Doll Envelopes.py<|end_file_name|><|fim▁begin|>class Solution(object):
def maxEnvelopes(self, envelopes):
"""
:type envelopes: List[List[int]]<|fim▁hole|> :rtype: int
"""<|fim▁end|> | |
<|file_name|>test_data.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from shutil import rmtree
from os import remove, path
from crawler.swiftea_bot.data import BASE_LINKS
URL = "http://aetfiws.ovh"
SUGGESTIONS = ['http://suggestions.ovh/page1.html', 'http://suggestions.ovh/page2.html']
CODE1 = """<!DOCTY... | <meta http-equiv="content-language" content="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-16 LE" /> |
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::{error, fmt, str};
use string::SafeString;
/// An error object.
#[repr(C)]
#[derive(Clone, PartialEq)]
pub struct Error {
desc: SafeString,
}
impl Error {
/// Creates a new Error.
pub fn new(desc: &str) -> Error {
Self {
desc:... | |
<|file_name|>axisgrid.py<|end_file_name|><|fim▁begin|>from itertools import product
from inspect import signature
import warnings
from textwrap import dedent
import numpy as np
import pandas as pd
import matplotlib as mpl
import matplotlib.pyplot as plt
from ._core import VectorPlotter, variable_type, categorical_ord... | Returns ``self`` for easy method chaining. |
<|file_name|>CommandParser.java<|end_file_name|><|fim▁begin|>package seedu.ezdo.logic.parser;
<|fim▁hole|>
/**
* An interface for the command parsers in ezDo.
*/
public interface CommandParser {
/** Parses the given string */
Command parse(String args);
}<|fim▁end|> | import seedu.ezdo.logic.commands.Command; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
#
from distutils.core import setup
from spacewalk.common.rhnConfig import CFG, initCFG
initCFG('web')
setup(name = "rhnclient",
version = "5.5.9",
description = CFG.PRODUCT_NAME + " Client Utilities and Libraries",
long_descripti... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use alloc::boxed::Box;
use schemes::{Result, KScheme, Resource, Url};
use syscall::{Error, O_CREAT, ENOENT};
pub use self::dsdt::DSDT;
pub use self::fadt::FADT;
pub use self::madt::MADT;
pub use self::rsdt::RSDT;
pub use self::sdt::SDTHeader;
pub use self::ssdt::SSDT;
p... |
let mut acpi = box Acpi {
rsdt: rsdt,
fadt: None, |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from django.contrib.comments.managers import CommentManager
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.core import... |
def save(self, *args, **kwargs):
if self.flag_date is None:
self.flag_date = timezone.now() |
<|file_name|>AlarmTrap.java<|end_file_name|><|fim▁begin|>/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Yet Another Pixel Dungeon
* Copyright (C) 2015-2016 Considered Hamster
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public Lice... | |
<|file_name|>routefilterrules.go<|end_file_name|><|fim▁begin|>package network
// Copyright (c) Microsoft and contributors. 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 Lice... | |
<|file_name|>iterable.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import inspect
class Iterable:
# Jinja2 wants to iterate over all properties; __dict__ doesn't return the @property ones
def __iter__(self):
for attr, value in inspect.getmembers(self):
if not attr.startswith('_... | yield attr, value |
<|file_name|>lint_stability_fields.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.apac... | pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
#[unstable(feature = "test_feature", issue = "0")] pub u8,
#[unstable(feature = "test_feature", issue = "0")] |
<|file_name|>gak_spider.py<|end_file_name|><|fim▁begin|>from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse
from scrapy.utils.url import urljoin_rfc
from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductLoader
class... | |
<|file_name|>AbstractCopyrightFilestoreFilter.java<|end_file_name|><|fim▁begin|>/*
* Licensed to The Apereo Foundation under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* The Apereo Foundation licenses th... | |
<|file_name|>Card.tsx<|end_file_name|><|fim▁begin|>import { forwardRef, useImperativeHandle, useRef } from 'react'
import {
ConnectDropTarget,
ConnectDragSource,
DropTargetMonitor,
DragSourceMonitor,
} from 'react-dnd'
import {
DragSource,
DropTarget,
DropTargetConnector,
DragSourceConnector,
} from 'react-dnd'... | isDragging: monitor.isDragging(),
}), |
<|file_name|>series-column-coverage.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | version https://git-lfs.github.com/spec/v1
oid sha256:ad911cfe35ed2702a6023f24dac7e20b7b1d64e5583cd53411e87b5c10fa0c35
size 16080 |
<|file_name|>notfollow_flake8.py<|end_file_name|><|fim▁begin|># Written by Nanbo Sun and CBIG under MIT license: https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
x = { 'a':37,'b':42,
'c':927}
y = 'hello ''world'
z = 'hello '+'world'
a = 'hello {}'.format('world')
class foo ( object ):
def f (se... | def f ( a ) :
return 37+-+a[42-x : y**3] |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
import time
from ControlUsuarios.forms import *
from ControlUsuario... | password = request.POST["password"]
user = authenticate(username=username, password=password)
|
<|file_name|>labels.js<|end_file_name|><|fim▁begin|>const labels = {
collectionFilterLabels: {
edit: {
name: 'Event name',<|fim▁hole|> event_type: 'Type of event',
address_country: 'Country',
uk_region: 'UK Region',
organiser: 'Organiser',
start_date_after: 'From',
start_d... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Kam Y. Tse
//
// 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
//
// Un... | #[macro_use] |
<|file_name|>polyfills.js<|end_file_name|><|fim▁begin|>// Polyfills
// (these modules are what are in 'angular2/bundles/angular2-polyfills' so don't use that here)
// import 'ie-shim'; // Internet Explorer
// import 'es6-shim';
// import 'es6-promise';
// import 'es7-reflect-metadata';
// Prefer CoreJS over the polyfil... | // Development
Error.stackTraceLimit = Infinity;
require('zone.js/dist/long-stack-trace-zone'); |
<|file_name|>CommonController.go<|end_file_name|><|fim▁begin|>package Admin
import (
"github.com/jesusslim/slimgo"
)
type CommonController struct {
slimgo.Controller
}
func (this *CommonController) Show() {
this.Data["json"] = "show it"
this.ServeJson(nil)<|fim▁hole|><|fim▁end|> | } |
<|file_name|>network_dialog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 So... | # server
self.server_host = QLineEdit() |
<|file_name|>filter-input.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';
import { Filter, FilterType } from 'lib/filter';
@Component({
selector: 'iw-filter-input',
templateUrl: './filter-input.component.html',
styleUrls: ['./filter-input.... | } |
<|file_name|>preview.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
from gimpfu import *
import time
import re
def preview (image, delay, loops, force_delay, ignore_hidden, restore_hide):
if not image:
raise "No image given."
layers = image.layers
nlayers = len (layers)
visible = []
... | while i > 0:
i -= 1 |
<|file_name|>mazeOfPacman.py<|end_file_name|><|fim▁begin|>import os
import random
import pygame
import sys
from util import utils
from time import sleep
square_l = 10
pacman_r, pacman_c = None, None
food_r, food_c = None, None
r,c = None, None
visited = []
fPath = []
def dfs(grid, start, end, path = [])... | |
<|file_name|>log.rs<|end_file_name|><|fim▁begin|>use crate::core::counter::Counter;
use crate::iterators::{HistogramIterator, PickMetadata, PickyIterator};
use crate::Histogram;
/// An iterator that will yield at log-size steps through the histogram's value range.
pub struct Iter<'a, T: 'a + Counter> {
hist: &'a H... | );
assert!(log_base > 1.0, "log_base must be > 1.0");
|
<|file_name|>disorder.js<|end_file_name|><|fim▁begin|>/*
* Disorder is a class for storing genetic disorder info and loading it from the
* the OMIM database. These disorders can be attributed to an individual in the Pedigree.
*
* @param disorderID the id number for the disorder, taken from the OMIM database
* @par... | |
<|file_name|>ovs_cleanup.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... |
# Default ovsdb_timeout value for this script. |
<|file_name|>ItemmappingMapper.java<|end_file_name|><|fim▁begin|>package com.healthcare.db.client;
import com.healthcare.db.model.Itemmapping;
import com.healthcare.db.model.ItemmappingExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ItemmappingMapper {
/**
* ... | int insert(Itemmapping record);
/**
|
<|file_name|>math.js<|end_file_name|><|fim▁begin|>var Vector;
(function (Vector) {
function clean(n) {
var vector = [];
for (var i = 0; i < n; i++) {
vector[i] = 0;
}
return vector;
}
Vector.clean = clean;
function create() {
var values = [];
f... | ]; |
<|file_name|>TableConnectableBlokk.ts<|end_file_name|><|fim▁begin|>import { gql } from '@apollo/client'
import { connectableContextMenuConnectableFragment } from 'v2/components/ConnectableContextMenu/fragments/connectableContextMenu'
export const channelTableContentsConnectableFragment = gql`
fragment ChannelTableCo... | created_at(relative: true)
updated_at(relative: true)
}
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::all)]
mod channel;
mod guild;
use std::sync::Arc;
use async_trait::async_trait;
use parking_lot::RwLock;
use rendezvous_common::{
anyhow,
futures::prelude::*,
proto::{
bouncer_service_client::BouncerServiceClient, event, ClientType... | g.members.insert(id, new_member.into());
}
}
|
<|file_name|>test_view.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-
from mock import patch
from django.conf import settings
from django.test import TestCase
from django_any.models import any_model
from django.utils import unittest
from django.contrib.auth.models import User
from django.test.client import Cli... | {'url':
'http://w3af.sourceforge.net/'}) |
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import {Component, ViewChild} from '@angular/core';
import { Platform, MenuController, NavController} from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { HomeComponent... |
// set our app's pages |
<|file_name|>readerApi.interface.ts<|end_file_name|><|fim▁begin|>// ==LICENSE-BEGIN==
// Copyright 2017 European Digital Reading Lab. All rights reserved.
// Licensed to the Readium Foundation under one or more contributor license agreements.
// Use of this source code is governed by a BSD-style license<|fim▁hole|>impo... | // that can be found in the LICENSE file exposed on Github (readium) in the project repository.
// ==LICENSE-END==
|
<|file_name|>test_statistics.cpp<|end_file_name|><|fim▁begin|>// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2015, Knut Reinert,... | // Call Tests.
SEQAN_CALL_TEST(test_statistics_markov_model); |
<|file_name|>lib.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<|fim▁hole|>
//! Calculate [specified][specified] and [computed values][computed] from a
//! tree of DOM nodes and a set of styles... | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
<|file_name|>ErrorReporting.py<|end_file_name|><|fim▁begin|># xVector Engine Client
# Copyright (c) 2011 James Buchwald
# 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... | if severity == FatalError:
dlg.setIcon(QtGui.QMessageBox.Critical) |
<|file_name|>print-tickets.js<|end_file_name|><|fim▁begin|>$(document).ready(function(){
// removing some column headers when there is at least one product
if ( $('#lines tbody tr.product').length > 0 )
{
$('#lines').addClass('with-product');
$('body').addClass('with-product');
}
if ( $('#lines tbody ... | // print again
if ( $('#options #print-again').length > 0 ) |
<|file_name|>setup_metrics.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Copyright 2014 IBM Corp
#
# 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... |
MOLD_DIMENSIONS = {"key1": None}
|
<|file_name|>AddCommentPayload.java<|end_file_name|><|fim▁begin|>package com.vaguehope.onosendai.payload;
import android.content.Context;
import android.content.Intent;
import com.vaguehope.onosendai.config.Account;
import com.vaguehope.onosendai.model.Meta;
import com.vaguehope.onosendai.model.MetaType;
import com.v... | intent.putExtra(PostActivity.ARG_IN_REPLY_TO_SID, getOwnerTweet().getSid());
final Meta replyToId = getOwnerTweet().getFirstMetaOfType(MetaType.REPLYTO); |
<|file_name|>0003_set_site_domain_and_name.py<|end_file_name|><|fim▁begin|>"""
To understand why this file is here, please read:
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
"""
from django.conf import settings
from django.db import m... | ) |
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|># Copyright 2019 Tecnativa - David
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import SUPERUSER_ID, api
_logger = logging.getLogger(__name__)
def pre_init_hook(cr):
"""Speed up the installation of the module on an e... | cr.execute(
"""
ALTER TABLE stock_move ADD COLUMN qty_returnable float;
""" |
<|file_name|>fontgen.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Very basic tool to generate a binary font from a TTF. Currently
# hardcodes a lot of things, so it's only really suitable for this demo.
#
# Assumes every glyph fits in an 8x8 box. Each glyph is encoded as
# an uncomp... | * by fontgen.py from %s
*/
static const uint8_t font_data[] = {""" % FONT |
<|file_name|>ServiceComm.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2011 Matthias Jordan <matthias.jordan@googlemail.com>
*
* This file is part of piRSS.
*
* piRSS 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 ... |
ic.feedId = extras.getLong(FEED_ID);
if (contentRefO != null) { |
<|file_name|>mailbox.py<|end_file_name|><|fim▁begin|># *- coding: utf-8 -*-
# mailbox.py
# Copyright (C) 2013-2015 LEAP
#
# 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 ... | it's not bad to fetch all the FLAGS docs at once.
|
<|file_name|>app-bootstrap.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { BehaviorSubject } from 'rxjs';
import { AppLocalization } from '@kaltura-... | |
<|file_name|>TurtleCommands.py<|end_file_name|><|fim▁begin|>__author__ = 'Alex'
from Movement import Movement
class BaseCommand:
def __init__(self, movement):
assert isinstance(movement, Movement)
self.name = 'unknown'
self.m = movement
def execute(selfself):pass
class Forward(BaseCo... | |
<|file_name|>unit.js<|end_file_name|><|fim▁begin|>const sinon = require('sinon');
const sinonChai = require('sinon-chai');
const chai = require('chai');
const dirtyChai = require('dirty-chai');
const should = chai.Should;
should();
chai.use(dirtyChai);
chai.use(sinonChai);
const index = require('./../src/index.js');
... | testParam1: {
type: 'integer',
minimum: 1, |
<|file_name|>ut.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
# -*- coding: utf-8 -*-
# @file ut.py
# @brief The main unit test program of whole project
# README: organize the unit tests in the number range
# refer UTGeneral functions
# print the suggested procedure in the console
# print the suggest... | import simpy
from configobj import ConfigObj
import urllib
import simplejson |
<|file_name|>SocialPreview.uni.driver.d.ts<|end_file_name|><|fim▁begin|>import { BaseUniDriver } from 'wix-ui-test-utils/base-driver';
import { SocialPreviewSize, SocialPreviewSkin } from './index';
<|fim▁hole|> getDescription: () => Promise<string>;
getSkin: () => Promise<SocialPreviewSkin>;
getSize: () => Promis... | export interface SocialPreviewUniDriver extends BaseUniDriver {
getTitle: () => Promise<string>;
getPreviewUrl: () => Promise<string>; |
<|file_name|>core.client.routes.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|> function($stateProvider, $urlRouterProvider) {
// Redirect to home view when route not found
$urlRouterProvider.otherwise('/');
// Home state routing
$stateProvider.
state('home', {
url: '/',
templateUrl: 'module... | // Setting up route
angular.module('core').config(['$stateProvider', '$urlRouterProvider', |
<|file_name|>MultiSelection.cpp<|end_file_name|><|fim▁begin|>#include "MultiSelection.h"
#include "ofxCogEngine.h"
#include "EnumConverter.h"
#include "Node.h"
namespace Cog {
void MultiSelection::Load(Setting& setting) {
string group = setting.GetItemVal("selection_group");
if (group.empty()) CogLogError("Mult... | |
<|file_name|>test_h5p.py<|end_file_name|><|fim▁begin|># This file is part of h5py, a Python interface to the HDF5 library.
#
# http://www.h5py.org
#
# Copyright 2008-2013 Andrew Collette and contributors
#
# License: Standard 3-clause BSD; see "license.txt" for full license terms
# and contributor agreement.... | |
<|file_name|>0040_auto_20191120_2258.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2019-11-21 04:58
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('posgradmin', '0039_auto_201911... | |
<|file_name|>reduction.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, absolute_import, division
import os
import theano
from theano.gof import Op, Apply
from theano.gof.type import Generic
from .basic_ops import (infer_context_name, as_gpuarray_variable)
from .type import GpuArrayType
try:
... | |
<|file_name|>cargo.rs<|end_file_name|><|fim▁begin|>extern crate cargo;
extern crate env_logger;
extern crate git2_curl;
extern crate rustc_serialize;
extern crate toml;
#[macro_use] extern crate log;
use std::collections::BTreeSet;
use std::env;
use std::fs;
use std::io;
use std::path::{PathBuf, Path};
use std::proces... | }
dirs |
<|file_name|>HELP.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | print("hello!!!!") |
<|file_name|>createCopy.py<|end_file_name|><|fim▁begin|>import os
import time
import traceback
from lib.FileManager.FM import REQUEST_DELAY
from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer
class CreateCopy(BaseWorkerCustomer):
def __init__(self, paths, session, *args, **kwargs):
... | dirname = ftp.path.dirname(path)
|
<|file_name|>daemon_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/lice... | "k8s.io/kubernetes/pkg/labels"
) |
<|file_name|>options_directory.go<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2018 The "MysteriumNetwork/node" Authors.
*
* 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 ... | if err != nil {
return err |
<|file_name|>test_factor.rs<|end_file_name|><|fim▁begin|>// This file is part of the uutils coreutils package.
//
// (c) kwantam <kwantam@gmail.com>
//
// For the full copyright and license information, please view the LICENSE file
// that was distributed with this source code.
#![allow(clippy::unreadable_literal)]
//... | 68719475767,
68719475731,
68719475729,
]; |
<|file_name|>kubernetes_worker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# 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
#
# http://w... | def update_nrpe_config(unused=None): |
<|file_name|>subsurface_pt_BR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.1">
<context>
<name>About</name>
<message>
<location filename="../mobile-widgets/qml/About.qml" line="10"/>
<location filename="../mobile-widgets/qml/About.qml" line="... | <location filename="../desktop-widgets/divelogexportdialog.ui" line="157"/>
<location filename="../build/ui_divelogexportdialog.h" line="355"/> |
<|file_name|>about_test.py<|end_file_name|><|fim▁begin|>def test_imprint(app, client):
app.config["SKYLINES_IMPRINT"] = u"foobar"
res = client.get("/imprint")
assert res.status_code == 200
assert res.json == {u"content": u"foobar"}
def test_team(client):
res = client.get("/team")
assert res.s... | |
<|file_name|>log.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Tuxemon
# Copyright (C) 2014, William Edwards <shadowapex@gmail.com>,
# Benjamin Bean <superman2k5@gmail.com>
#
# This file is part of Tuxemon.
#
# Tuxemon is free software: you can redistribute it and/or ... | #
import sys |
<|file_name|>myutil.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
This module put my utility functions
"""
__author__ = "Jiang Yu-Kuan <yukuan.jiang@gmail.com>"
__date__ = "2016/02/08 (initial version) ~ 2019/04/17 (last revision)"
import re
import os
import sys
#---------------------------... |
def prefix_info(lines, software, version, author, comment_mark='//'):
"""Prefix information to the given lines with given comment-mark.
|
<|file_name|>issue-8044.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lice... | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.