prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>wifi_out.py<|end_file_name|><|fim▁begin|># ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 o... |
def register(): |
<|file_name|>scopeperm.go<|end_file_name|><|fim▁begin|>// Copyright 2015, Cyrill @ Schumacher.fm and the CoreStore contributors
//
// 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... | func (bits *ScopePerm) Set(scopes ...ScopeGroup) ScopePerm {
for _, i := range scopes {
*bits = *bits | (1 << i) // (1 << power = 2^power)
} |
<|file_name|>0008_auto_20150630_1859.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
<|fim▁hole|> ]
operations = [
migrations.AddField(
model_name='schedule',
name='logic_de... | class Migration(migrations.Migration):
dependencies = [
('flyerapp', '0007_auto_20150629_1135'), |
<|file_name|>ColladaLoader.js<|end_file_name|><|fim▁begin|>/**
* @author Tim Knip / http://www.floorplanner.com/ / tim at floorplanner.com
*/
THREE.ColladaLoader = function () {
var COLLADA = null;
var scene = null;
var daeScene;
var readyCallbackFunc = null;
var sources = {};
var images = {};
var animati... | Node.prototype.updateMatrix = function () {
|
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms
from ncdjango.interfaces.arcgis.form_fields import SrField<|fim▁hole|>class PointForm(forms.Form):
x = forms.FloatField()
y = forms.FloatField()
projection = SrField()<|fim▁end|> | |
<|file_name|>kallisto_quant.py<|end_file_name|><|fim▁begin|>"""
created 09/05/17
For executation of the kallisto quantification step
To be run with three arguements
* basedir - top level output directory
* input directory - contains folders with .fastq.gz files
* max_threads - how many threads to allocate t... | |
<|file_name|>json.rs<|end_file_name|><|fim▁begin|>// Rust JSON serialization library.
// Copyright (c) 2011 Google Inc.
#![forbid(non_camel_case_types)]
#![allow(missing_docs)]
//! JSON parsing and serialization
//!
//! # What is JSON?
//!
//! JSON (JavaScript Object Notation) is a way to write data in Javascript.
//... | |
<|file_name|>project_euler_problem_16.cpp<|end_file_name|><|fim▁begin|>/**
@file project_euler_problem_15.cpp
@author Terence Henriod
Project Euler Problem 15
@brief Solves the following problem for the general case of any power of 2
(within system limitations):
"2^15 = 32768 and the su... | @post
-# |
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Snap! Configuration Manager
#
# (C) Copyright 2011 Mo Morsi (mo@morsi.org)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License, Version 3,
# as published by the Free Software Foundation
#
# ... | snap.config.options.outputformat = options.outputformat |
<|file_name|>compiletest.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | let p = path.dir_path();
let dir = p.filename_str(); |
<|file_name|>ez_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Bootstrap setuptools installation
To use setuptools in your package's setup.py, include this
file in the same directory and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
To require a s... | |
<|file_name|>pool.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 std::collections::HashMap;
use std::path::Path;
use std::vec::V... | Ok(vec![msg])
}
|
<|file_name|>email_alerts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""A simple wrapper to send email alerts."""
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import logging
import re
import smtplib
imp... | to_addresses,
from_address,
subject, |
<|file_name|>assets.rs<|end_file_name|><|fim▁begin|>#[cfg(not(feature="dynamic-assets"))]
mod static_assets {
use std::collections::HashMap;
use futures::Future;
use web::{Resource, ResponseFuture};
// The CSS should be built to a single CSS file at compile time
#[derive(StaticResource)]
#[file... | |
<|file_name|>test_intersect.py<|end_file_name|><|fim▁begin|># Copyright Iris contributors
#
# This file is part of Iris and is released under the LGPL license.
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.
"""
Test the intersection of Coords
"""
# import iris tests first... | 1, |
<|file_name|>TransformMatrix.js<|end_file_name|><|fim▁begin|>/***********************************************************************
* Module: Transform Matrix
* Description:
* Author: Copyright 2012-2014, Tyler Beck
* License: MIT
****************************************************************... | |
<|file_name|>deployment_controller.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.apach... | }
} |
<|file_name|>test_hyperlink15.py<|end_file_name|><|fim▁begin|>###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workb... | |
<|file_name|>channel.rs<|end_file_name|><|fim▁begin|>use std::any::Any;
use std::fmt;
use std::sync::{Arc, Mutex};
use std::collections::VecDeque;
use base::types::{ArcType, Type};
use {Error, Result as VmResult};
use api::record::{Record, HList};
use api::{Generic, VmType, primitive, WithVM, Function, Pushable, Runt... | field_decl!{ sender, receiver }
|
<|file_name|>flow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2012 Yahoo! 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. Yo... | def __str__(self): |
<|file_name|>scan_results.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Script to fetch test status info from sqlit data base. Before use this
script, avocado We must be lanuch with '--journal' option.
"""
import os
import sys
import sqlite3
import argparse
from avocado.core import data_dir
from dateutil ... | '-d',
'--test-results-dir',
action='store', |
<|file_name|>from_hex.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009-2010 Sergey Koposov
# This file is part of astrolibpy
#
# astrolibpy 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|>BeanException.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2015 See AUTHORS file
* 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 r... | private static final long serialVersionUID = 4487528732406582847L;
public BeanException(String message) { |
<|file_name|>cover.py<|end_file_name|><|fim▁begin|>"""Platform for the Garadget cover component."""
import logging
import requests
import voluptuous as vol
from homeassistant.components.cover import PLATFORM_SCHEMA, CoverDevice
from homeassistant.const import (
CONF_ACCESS_TOKEN,
CONF_COVERS,
CONF_DEVICE,... | def name(self): |
<|file_name|>defaults.py<|end_file_name|><|fim▁begin|>"""
Misago default settings
This fille sets everything Misago needs to run.
If you want to add custom app, middleware or path, please update setting vallue
defined in this file instead of copying setting from here to your settings.py.
Yes:
#yourproject/settings.... | 'output_filename': 'misago_admin.js',
},
}
|
<|file_name|>issue_315.rs<|end_file_name|><|fim▁begin|>#![allow(
dead_code,
non_snake_case,
non_camel_case_types,<|fim▁hole|>)]
/// <div rustbindgen replaces="c"></div>
pub type c<a> = a;<|fim▁end|> | non_upper_case_globals |
<|file_name|>ngb-calendar-islamic-umalqura.ts<|end_file_name|><|fim▁begin|>import {NgbCalendarIslamicCivil} from './ngb-calendar-islamic-civil';
import {NgbDate} from '../ngb-date';
import {Injectable} from '@angular/core';
/**
* Umalqura calendar is one type of Hijri calendars used in islamic countries.
* This Cale... | for (let j = 0; j < 12; j++) { |
<|file_name|>compare-generic-enums.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apac... | |
<|file_name|>test_port.py<|end_file_name|><|fim▁begin|># 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<|fim▁hole|>#
# Unless r... | |
<|file_name|>ExampleInstrumentedTest.java<|end_file_name|><|fim▁begin|>package es.guiguegon.geoapi;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;<|fim▁hole|>
import static org.junit.Assert.*;
/**
* Instru... | import org.junit.runner.RunWith; |
<|file_name|>attributes.go<|end_file_name|><|fim▁begin|>/*
Copyright 2021 The CloudEvents Authors
SPDX-License-Identifier: Apache-2.0
*/
package spec
import (
"fmt"
"time"
"github.com/cloudevents/sdk-go/v2/event"
"github.com/cloudevents/sdk-go/v2/types"
)
// Kind is a version-independent identifier for a Clo... | |
<|file_name|>formio.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Optional, ViewEncapsulation, Input, NgZone, OnChanges } from '@angular/core';
import { FormioAppConfig } from '../../formio.config';
import { Formio, Form } from 'formiojs';
import { FormioBaseComponent } from '../../FormioBaseCom... | |
<|file_name|>test_user_login_and_registration.py<|end_file_name|><|fim▁begin|>from pytest import mark
from django.urls import reverse
from email_template.models import Email
from assopy.models import AssopyUser
from conference.accounts import PRIVACY_POLICY_CHECKBOX, PRIVACY_POLICY_ERROR
from conference.models impor... | assert "captcha_question" in response.content.decode("utf-8")
assert "captcha_answer" in response.content.decode("utf-8")
assert response.content.decode("utf-8").count(QUESTION) == 2
|
<|file_name|>frmHome.js<|end_file_name|><|fim▁begin|>//Form JS File
function frmHome_stopWatch_onClick_seq0() {
alert("You clicked on stop watch");
};
function frmHome_button214149106640_onClick_seq0(eventobject) {
var a = frmHome.stopWatch.stopWatch();
alert(a);
};
function frmHome_button214149106641_onC... | "labelRightSideView": "Settings"
}, |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
#[cfg(feature = "serde1")]
extern crate serde;
#[cfg(feature = "serde1")]
#[macro_use]
extern crate serde_derive;
#[cfg(not(feature = "std"))]
#[macro_use]
pub extern crate a... | pub use flat_map::FlatMap; |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import './skottie-library-sk';<|fim▁hole|><|fim▁end|> | import './skottie-library-sk.scss'; |
<|file_name|>AC_dfs_n.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python
# -*- coding: utf-8 -*-
# Author: illuz <iilluzen[at]gmail.com>
# File: AC_dfs_n.py
# Create Date: 2015-08-16 10:15:54
# Usage: AC_dfs_n.py
# Descripton:
# Definition for a binary tree node.
class TreeNode:
def __in... | |
<|file_name|>deprecatedProperty.py<|end_file_name|><|fim▁begin|>class Foo:<|fim▁hole|> def bar(self):
import warnings
warnings.warn("this is deprecated", DeprecationWarning, 2)
foo = Foo()
foo.<warning descr="this is deprecated">bar</warning><|fim▁end|> | @property |
<|file_name|>ADeclarationEdge.java<|end_file_name|><|fim▁begin|>/*
* CPAchecker is a tool for configurable software verification.
* This file is part of CPAchecker.
*
* Copyright (C) 2007-2014 Dirk Beyer
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may ... | @Override
public Optional<? extends ADeclaration> getRawAST() { |
<|file_name|>app.rs<|end_file_name|><|fim▁begin|>use delorean::*;
use js_sys::Date;
use rand::{rngs::SmallRng, SeedableRng};
use serde_json::from_str;
use wasm_bindgen::{prelude::*, JsCast, UnwrapThrowExt};
use web_sys::{Element, Event};
use crate::{<|fim▁hole|> hydrate_row, new_row,
row::{row_element, Row, Row... | handler::*, |
<|file_name|>ItaniumCXXABI.cpp<|end_file_name|><|fim▁begin|>//===------- ItaniumCXXABI.cpp - Emit LLVM Code from ASTs for a Module ----===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache... | }
return false;
} |
<|file_name|>bookmark.py<|end_file_name|><|fim▁begin|># vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2011, Timothy Legge <timlegge@gmail.com> and Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os
from contextlib import closing
class Boo... | |
<|file_name|>MarkerCanvas.js<|end_file_name|><|fim▁begin|>import React from 'react'
import PropTypes from 'prop-types'
import { MarkerCanvasProvider } from './MarkerCanvasContext'
import TimelineMarkersRenderer from './TimelineMarkersRenderer'
import { TimelineStateConsumer } from '../timeline/TimelineStateContext'
//... |
render() { |
<|file_name|>SimpleFieldsResourceGeneratorTest.java<|end_file_name|><|fim▁begin|>/*
* eGov suite of products aim to improve the internal efficiency,transparency,
* accountability and the service delivery of the government organizations.
*
* Copyright (C) <2015> eGovernments Foundation
*
* The updated... | |
<|file_name|>extract_cats_dogs.py<|end_file_name|><|fim▁begin|>"""One-time script for extracting all the cat and dog images from CIFAR-10."""
import cPickle
import numpy as np
from PIL import Image
TRAIN_FILES = ['cifar-10-batches-py/data_batch_%d' % i for i in range(1,6)]
TEST_FILE = 'test_batch'
CAT_INPUT_LABEL = ... | index += 1 |
<|file_name|>template.js<|end_file_name|><|fim▁begin|>import defaults from './defaults.js';
import _ from './underscore.js';
import './templateSettings.js';
// When customizing `_.templateSettings`, if you don't want to define an
// interpolation, evaluation or escaping regex, we need one that is
// guaranteed not to ... | |
<|file_name|>0004_auto_20161103_1044.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-11-03 10:44
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
<|fim▁hole|> ('... | dependencies = [ |
<|file_name|>profile-addresses.component.ts<|end_file_name|><|fim▁begin|>/// <reference types="@types/google-maps" />
import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit, ViewChild } from '@angular/core';
import { AddressView } from 'app/api/models';
import { Breakpoint } fr... | } |
<|file_name|>MachineLoginFilter.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2012-2017 Red Hat, Inc.<|fim▁hole|> * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package org.eclipse.che.multiuser.machine.authentication.server;
import stati... | * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#################################################################################
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Dmitry Sovetov
#
# https://github.com/dmsovetov
#
# Permission is hereby granted, free of charge, to any person obta... | |
<|file_name|>platform_browser.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright 2019 Google LLC. 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://... | fetch(path: string, init?: RequestInit): Promise<Response> {
return fetch(path, init);
}
|
<|file_name|>singleton.hpp<|end_file_name|><|fim▁begin|>/**
* @file singleton.hpp
* @brief dynamic Singleton pattern design template class
* @author Byunghun Hwang<bhhwang@nsynapse.com>
* @date 2015. 8. 2
* @details singleton ÆÐÅÏ ÅÛÇø´ Ŭ·¡½º
*/
#ifndef _COSSB_ARCH_SINGLETON_HPP_
#define _COSSB_ARCH_SINGL... | |
<|file_name|>CustomFormAuthenticationFilter.java<|end_file_name|><|fim▁begin|>package com.cell.user.web.shrio.filter.authc;
import javax.servlet.ServletRequest;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.web.filter.authc.FormAuthenticati... | * <p/>
*/
public class CustomFormAuthenticationFilter extends FormAuthenticationFilter {
@Autowired
|
<|file_name|>version.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation
#
# 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.o... | # |
<|file_name|>services.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2018 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundat... | |
<|file_name|>HeroContainer.js<|end_file_name|><|fim▁begin|>import React from 'react'
import { Hero } from '../../components'
<|fim▁hole|>
export default HeroContainer<|fim▁end|> | const HeroContainer = () => (
<Hero />
) |
<|file_name|>camera_pulse.py<|end_file_name|><|fim▁begin|>"""Run the interactive pulse program.
Keys:
- Escape - Exit the program
- Space - Update program image
- C - Calibrate the image again
"""
import time
import cv2
from pulse_programming import PulseField
from camera_calibration import Calibration
window ... | cv2.namedWindow("Capture", cv2.WINDOW_AUTOSIZE)
calibration = Calibration((1024, 768), window_name=window) |
<|file_name|>tokens.py<|end_file_name|><|fim▁begin|>class Token(object):
def __init__(self, start_mark, end_mark):
self.start_mark = start_mark
self.end_mark = end_mark
def __repr__(self):
attributes = [key for key in self.__dict__
if not key.endswith('_mark')]<|fim▁hole|... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2011 Sebastien Maccagnoni-Munch<|fim▁hole|>#
# Omoma 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, version 3.
#
# Omoma is distributed in the... | #
# This file is part of Omoma. |
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from os import chmod
from spack import *
class Tbl2asn(Package):
... | |
<|file_name|>Consumer.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2002-2016 xiaoyuepeng
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.<|fim▁hole|> * You may obtain a copy of the License at
*
* http://www.apache.org/... | |
<|file_name|>query-parameters-v2.spec.ts<|end_file_name|><|fim▁begin|>import { asUrlQueryString } from './query-parameters-v2';
describe('asUrlQueryString', () => {
it('should create a empty query', () => {
expect(asUrlQueryString({})).toBe('');
});
it('should create a query string with one argument', () =>... | }); |
<|file_name|>ApplicationInterface.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
... | @Column(name = "CREATION_TIME")
private Timestamp creationTime; |
<|file_name|>case_label.cc<|end_file_name|><|fim▁begin|>// { dg-do compile }
// { dg-options "-Wall" { target *-*-* } }
// -*- C++ -*-
// Copyright (C) 2004-2014 Free Software Foundation, Inc.
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public Lic... | // <http://www.gnu.org/licenses/>.
|
<|file_name|>c_str.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/... |
#[test] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># vim:ts=4:sts=4:sw=4:expandtab
"""Package. Manages event queues.
Writing event-driven code
-------------------------
Event-driven procedures should be written as python coroutines (extended generators).
To call the event API, yield an instance of the appropriate ... | from .client2 import Client2
from .slave2 import Slave2
|
<|file_name|>makenugetpackagetask.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
import ntpath
import glob
from pyhammer.tasks.taskbase import TaskBase
from pyhammer.utils import execProg
class MakeNugetPackageTask(TaskBase):
"""Make Nuget Package Task"""<|fim▁hole|> super(MakeNugetPackag... |
def __init__( self, csProjectPath, solutionDir, tempDir, publishDir, visualStudioVersion = "12.0" ): |
<|file_name|>TrackSystem.cpp<|end_file_name|><|fim▁begin|>// =============================================================================
// PROJECT CHRONO - http://projectchrono.org
//
// Copyright (c) 2014 projectchrono.org
// All right reserved.
//
// Use of this source code is governed by a BSD-style license that ... |
// add to the lists passed into the track chain, find location of each wheel center w.r.t. chassis coords. |
<|file_name|>whois-parsed-tests.ts<|end_file_name|><|fim▁begin|>import * as whoIs from 'whois-parsed';
const lookupTestDomain = async () => {
const { domainName, isAvailable } = await whoIs.lookup('https://codecademy.com');
return { domainName, isAvailable };
};
<|fim▁hole|><|fim▁end|> | Promise.resolve(lookupTestDomain()).then(result => {}); |
<|file_name|>scram.go<|end_file_name|><|fim▁begin|>// mgo - MongoDB driver for Go
//
// Copyright (c) 2014 - Gustavo Niemeyer <gustavo@niemeyer.net>
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions a... | |
<|file_name|>EssentialsAntiBuild.java<|end_file_name|><|fim▁begin|>package com.earth2me.essentials.antibuild;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class Essentia... | @Override
public Map<AntiBuildConfig, List<Integer>> getSettingsList()
{ |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from .views import HomePage, PlayerList, PlayerDetail, SignUpForm
urlpatterns = [
url(r'^$', HomePage.as_view(),
name='home'),
url(r'^list$', PlayerList.as_view(),
name='player_list'),
url... | ] |
<|file_name|>PredefinedCrsPanel.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2010 Brockmann Consult GmbH (info@brockmann-consult.de)
*
* 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... | infoLabel.setEnabled((Boolean) evt.getNewValue());
crsList.setEnabled((Boolean) evt.getNewValue()); |
<|file_name|>moneyclient_pt_PT.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About MoneyCoin</source>
<translation type=... | The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems; |
<|file_name|>FilePicker.java<|end_file_name|><|fim▁begin|>//simple GUI for the Matching program
package compare;
//importing requird libraries
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import... | //get file path of the selected file
public static String getSelectedFilePath() {
|
<|file_name|>VInteger.cpp<|end_file_name|><|fim▁begin|>/***********************************************************************************************************************
**
** Copyright (c) 2011, 2014 ETH Zurich
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without modif... | |
<|file_name|>factory_of_factories.py<|end_file_name|><|fim▁begin|>"""`Factory of Factories` pattern."""
from dependency_injector import containers, providers
class SqlAlchemyDatabaseService:
def __init__(self, session, base_class):
self.session = session
self.base_class = base_class
class Toke... | assert user_service.database.base_class is User |
<|file_name|>services.js<|end_file_name|><|fim▁begin|>angular.module('app.services', [
'app.services.actions',
'app.services.connection',
'app.services.coverart',
'app.services.locale',
'app.services.logging',
'app.services.mopidy',
'app.services.paging',
'app.services.platform',
'app.services.router'... | ]); |
<|file_name|>Cmd.java<|end_file_name|><|fim▁begin|>package net.nopattern.cordova.brightcoveplayer;<|fim▁hole|> */
public enum Cmd {
LOAD,
LOADED,
DISABLE,
ENABLE,
PAUSE,
PLAY,
HIDE,
SHOW,
SEEK,
RATE,
RESUME,
REPOSITION
};<|fim▁end|> |
/**
* Created by peterchin on 6/9/16. |
<|file_name|>Effect3D.java<|end_file_name|><|fim▁begin|>/* ===========================================================
* JFreeChart : a free chart library for the Java(tm) platform
* ===========================================================
*
* (C) Copyright 2000-2016, by Object Refinery Limited and Contribut... | public interface Effect3D {
/**
|
<|file_name|>ProductList.js<|end_file_name|><|fim▁begin|>import React, { PropTypes, Component } from 'react';
import { Breadcrumb, Table, Button, Col } from 'react-bootstrap';
import cx from 'classnames';
import _ from 'lodash';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import s from './ProductLi... | <tr>
<th style={{ textAlign: 'center' }} >产品名</th>
<th style={{ textAlign: 'center' }} >成员</th> |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from couchpotato.core.event import addEvent
from couchpotato.core.helpers.variable import tryFloat
from couchpotato.core.logger import CPLog
from couchpotato.core.plugins.base import Plugin
from couchpotato.environment import Env
from urlparse import urlparse
import re
... |
addEvent('%s.search' % self.type, self.search)
addEvent('yarr.search', self.search)
|
<|file_name|>solution.py<|end_file_name|><|fim▁begin|># We slice the array in two parts at index d, then print them
# in reverse order.
n, d = map(int, input().split())
A = list(map(int, input().split()))<|fim▁hole|>print(*(A[d:] + A[:d]))<|fim▁end|> | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export const MRoot = {
name: 'm-root',
nodeName: 'm-node',
data() {
return {
nodeVMs: [],
};
},
methods: {
walk(func) {
let queue = [];
queue = queue.concat(this.nodeVMs);<|fim▁hole|> ... | let nodeVM;
while ((nodeVM = queue.shift())) {
queue = queue.concat(nodeVM.nodeVMs); |
<|file_name|>env.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licens... | |
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use std::io::{Read, Cursor};
use FromCursor;
use compression::Compression;
use frame::frame_response::ResponseBody;
use super::*;
use types::{from_bytes, UUID_LEN, CStringList};
use types::data_serialization_types::decode_timeuuid;
use error;
pub fn parse_frame(mut ... | |
<|file_name|>volatile.py<|end_file_name|><|fim▁begin|>"""
[DEPRECATED] Run a single container in debug mode
"""
import typer
from controller import print_and_exit
from controller.app import Application
# Deprecated since 2.1
@Application.app.command(help="Replaced by run --debug command")
def volatile(
service: ... | "--user",
"-u",
help="User existing in selected service", |
<|file_name|>test_eval_power.py<|end_file_name|><|fim▁begin|>from sympy.core import *
def test_rational():
a = Rational(1, 5)
assert a**Rational(1, 2) == a**Rational(1, 2)
assert 2 * a**Rational(1, 2) == 2 * a**Rational(1, 2)
assert a**Rational(3, 2) == a * a**Rational(1, 2)
assert 2 * a**Rationa... |
test_issue350() |
<|file_name|>spotcheck.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
from builtins import zip
import pycrfsuite
def compareTaggers(model1, model2, string_list, module_name):
"""
Compare two models. Given a list of strings, prints out tokens & t... | |
<|file_name|>sprites.rs<|end_file_name|><|fim▁begin|>use sdl2::rect::Rect;
use sdl2::video::Window;
use sdl2::render::{Texture, Canvas};
pub struct Sprite<'a> {
rect: Rect,
pub size: Rect,
texture: &'a Texture,
}
impl<'a> Sprite<'a> {
pub fn draw(&self, x: i32, y: i32, canvas: &mut Canvas<Window>) {
... | match canvas.copy(&self.texture, Some(self.rect), Some(pos_rect)) {
Err(e) => println!("canvas copy error: {}", e), |
<|file_name|>lastsent_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.
package logfwd_test
import (
"github.com/juju/errors"
"github.com/juju/names/v4"
"github.com/juju/testing"
jc "github.com/juju/testing/checkers"
gc "gopkg.in/che... | RecordID: 10,
RecordTimestamp: 100, |
<|file_name|>telecoms.rs<|end_file_name|><|fim▁begin|>#![feature(unboxed_closures)]
extern crate synthrs;
use synthrs::synthesizer::{ make_samples, quantize_samples };
use synthrs::wave::SineWave;
use synthrs::writer::write_wav;
fn main() {
write_wav("out/dialtone.wav", 44100,<|fim▁hole|> 0.5 * (S... | quantize_samples::<i16>(
make_samples(15.0, 44100, |t: f64| -> f64 { |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for model_advanced project.
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.10/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import... |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "model_advanced.settings")
application = get_wsgi_application() |
<|file_name|>test_gateway.py<|end_file_name|><|fim▁begin|>"""Test deCONZ gateway."""
from unittest.mock import Mock, patch
import pytest
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.components.deconz import errors, gateway
from tests.common import mock_coro
import pydeconz
ENTRY_CON... | assert len(deconz_gateway.events) == 0
assert len(deconz_gateway.deconz_ids) == 0 |
<|file_name|>inject.ts<|end_file_name|><|fim▁begin|>/// <reference path="refs.d.ts" />
interface IInjectFn {
invoker(locals: any);
}
var $InjectProvider = [<any>
function () {
'use strict';
this.$get = [<any> '$injector',
function ($injector: ng.auto.IInjectorService): dotjem.rout... | //if (this.invokerFn == null) {
// this.invokerFn = (locals?: any) => {
// var args = [];
// var l = this.dependencies.length; |
<|file_name|>CoursesView.js<|end_file_name|><|fim▁begin|>;
define('views/courses/CoursesView', ['appframework', 'mustache', 'controllers/Courses', 'i18n!nls/courses', 'routers/coursesrouter'],
(function ($, mustache, controller, courses, router) {
var courseTemplate, currentSearch;
var $coursesSearch, $courses;... | } |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*-<|fim▁hole|>""" EOSS catalog system
external catalog management package
"""
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["Thilo Wehrmann", "Steffen Gebhardt"]
__license__ = "GPL"
__... | |
<|file_name|>groups_list.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>/***************************************************************************
QuickMapServices
A QGIS plugin
Collection of internet map services
-------------------... | """ |
<|file_name|>test_isodownload.py<|end_file_name|><|fim▁begin|>"""Test class for ISO downloads UI
:Requirement: Isodownload
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: UI
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from robottelo.decorators import run_only_on, stubbed, tier... | |
<|file_name|>sns.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 Apache Li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.