prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>plot_couplings.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""
This programs plots the electronic coupling between two states.
It reads all Ham_*_im files and cache them in a tensor saved on disk.
Usage:
plot_couplings.py -p . -s1 XX -s2 YY -dt 1.0
p = path to the hamiltonian files
s1 =... | import glob
import os.path
|
<|file_name|>python.go<|end_file_name|><|fim▁begin|>package tasks
import (
"strings"
"os/exec"
"log"<|fim▁hole|>
const (
PYTHON_COMMAND_ARG = "command"
PYTHON_ARGS_ARG = "args"
)
type Python struct {
args []string
}
func (t *Python) Configure(args map[string]string) statusCode {
val, ok := args[PYTHON_COMMA... | ) |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate roman_army;
use roman_army::ComponentUnit;
use roman_army::primitives::{ Archer, Infantryman, Horseman };
use roman_army::composite::CompositeUnit;
fn main() {
let mut army = CompositeUnit::new();
for _ in 0..4 {
let legion = create_legi... | composite_legion.add_unit(Box::new(Archer));
}
for _ in 0..300 { |
<|file_name|>IborFutureTradeTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2015 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.strata.product.index;
import static com.opengamma.strata.collect.TestHelper.assertSerializati... | |
<|file_name|>bundle.min.js<|end_file_name|><|fim▁begin|>/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(inst... | 'use strict';
var _prodInvariant = __webpack_require__(39);
|
<|file_name|>service_callback_api_schema.py<|end_file_name|><|fim▁begin|>from app.schema_validation.definitions import https_url, uuid
create_service_callback_api_schema = {
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "POST service callback/inbound api schema",
"type": "object",
... | "required": ["updated_by_id"]
} |
<|file_name|>jy_serv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env jython
import sys
#sys.path.append("/usr/share/java/itextpdf-5.4.1.jar")
sys.path.append("itextpdf-5.4.1.jar")
#sys.path.append("/usr/share/java/itext-2.0.7.jar")
#sys.path.append("/usr/share/java/xercesImpl.jar")
#sys.path.append("/usr/share/java/xml... | |
<|file_name|>groupjoin.ts<|end_file_name|><|fim▁begin|>import { IterableX } from '../../iterable/iterablex';
import { groupJoin } from '../../iterable/operators/groupjoin';
/**
* @ignore
*/
export function groupJoinProto<TOuter, TInner, TKey, TResult>(
this: IterableX<TOuter>,
inner: Iterable<TInner>,
outerSel... | IterableX.prototype.groupJoin = groupJoinProto;
declare module '../../iterable/iterablex' {
interface IterableX<T> { |
<|file_name|>SortOrderSelectionDialog.java<|end_file_name|><|fim▁begin|>package de.thomas.dreja.ec.musicquiz.gui.dialog;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.os.Bundle;
i... | }
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//-------------------------------------------------------------------------------
// URL:
//-------------------------------------------------------------------------------
<|fim▁hole|>
use time;
use reader;
pub const ID: i32 = 8;
pub const DIR: &str = "array/dutchfla... | use std::path::Path; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | from . import test_stock_location_empty |
<|file_name|>SpeedSearch.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2017 JetBrains s.r.o.<|fim▁hole|> * 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
*
* Unless required by applicable law or agre... | *
* Licensed under the Apache License, Version 2.0 (the "License"); |
<|file_name|>filesearch.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... | pub fn get_tools_search_paths(&self) -> Vec<Path> {
let mut p = Path::new(self.sysroot);
p.push(find_libdir(self.sysroot)); |
<|file_name|>client_agent_endpoint.go<|end_file_name|><|fim▁begin|>package nomad
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"net"
"time"
log "github.com/hashicorp/go-hclog"
sframer "github.com/hashicorp/nomad/client/lib/streamframer"
cstructs "github.com/hashicorp/nomad/client/structs"
"github.com/has... | }()
var streamErr error
OUTER: |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"io/ioutil"<|fim▁hole|> "os"
)
func main() {
dat, err := ioutil.ReadFile("data/simple.txt")
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Print(string(dat))
}<|fim▁end|> | |
<|file_name|>stack_fwd.hh<|end_file_name|><|fim▁begin|>/**
\file "util/STL/stack_fwd.hh"
Forward declaration of std::stack.
No wrapping.
$Id: stack_fwd.hh,v 1.6 2006/04/23 07:37:29 fang Exp $
*/
#ifndef __UTIL_STL_STACK_FWD_HH__
#define __UTIL_STL_STACK_FWD_HH__
#include "util/STL/deque_fwd.hh"
BEGIN_NAMESPAC... | |
<|file_name|>descriptor.py<|end_file_name|><|fim▁begin|>"""
This module implements atom/bond/structure-wise descriptor calculated from
pretrained megnet model
"""
import os
from typing import Dict, Union
import numpy as np
from tensorflow.keras.models import Model
from megnet.models import GraphModel, MEGNetModel
fr... |
"""
prefix, level = self._get_updated_prefix_level("meg_net_layer", level)
return self._get_features(structure, prefix=prefix, level=level, index=2) |
<|file_name|>test_evalf.py<|end_file_name|><|fim▁begin|>from sympy.core.evalf import PrecisionExhausted, complex_accuracy
from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \
fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \
factorial, binomial, Sum, zeta, Catalan, Pow, Gold... | assert NS((A+B*I)*(C+D*I) - F*I, 5) in ('6.4471e-6 - .0e-15*I', '6.4471e-6 + .0e-15*I')
def test_evalf_logs():
assert NS("log(3+pi*I)", 15) == '1.46877619736226 + 0.808448792630022*I' |
<|file_name|>RecordTimer.py<|end_file_name|><|fim▁begin|>from enigma import eEPGCache, getBestPlayableServiceReference, \
eServiceReference, iRecordableService, quitMainloop
from Components.config import config
from Components.UsageConfig import defaultMoviePath
from Components.TimerSanityCheck import TimerSanityChec... | |
<|file_name|>zone.py<|end_file_name|><|fim▁begin|><|fim▁hole|>Support for the definition of zones.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/zone/
"""
import logging
import voluptuous as vol
from homeassistant.const import (
ATTR_HIDDEN, ATTR... | """ |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The html5ever Project Developers. See the
// COPYRIGHT file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LI... | _ => match lower_ascii_letter(c) {
Some(cl) => go!(self: push_temp cl; emit c),
None => go!(self: reconsume RawData ScriptDataEscaped DoubleEscaped), |
<|file_name|>bitcoin_tr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Hellascoin</source>
... | |
<|file_name|>topic_index.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#---
#--- Python
import sys
import StringIO
import argparse
#---
#--- 3rd party
from redmine import Redmine
from redmine import exceptions as redmine_exceptions
#---
class ProjectTree(object) :
def __init__(sel... | |
<|file_name|>transaction.py<|end_file_name|><|fim▁begin|>""":mod:`flask.ext.volatile.transaction` --- Key-level transactions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2011 by Hong Minhee, StyleShare
:license: MIT License, see :file:`LICENSE` for more details.
"""
import time
... | |
<|file_name|>version.hpp<|end_file_name|><|fim▁begin|>#include "farversion.hpp"
<|fim▁hole|>#define PLUGIN_BUILD 37
#define PLUGIN_DESC L"File names case conversion for Far Manager"
#define PLUGIN_NAME L"FileCase"
#define PLUGIN_FILENAME L"FileCase.dll"
#define PLUGIN_AUTHOR FARCOMPANYNAME
#define PLUGIN_VERSION MAKEFA... | |
<|file_name|>AutoRestAzureSpecialParametersTestClientImpl.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
... | * @return the azure client;
*/
public AzureClient getAzureClient() { |
<|file_name|>remote_viewer_it.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="it_IT">
<context>
<name>BookmarksWidget</name>
<message>
<source>Filter:</source>
<translation>Filtro:</translation>
</message>
</context>
<context>
... | |
<|file_name|>course.service.spec.ts<|end_file_name|><|fim▁begin|>/* tslint:disable max-line-length */
import { TestBed, getTestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { HttpClient, HttpResponse } from '@angular/common/http... | endDate: currentDate.format(DATE_TIME_FORMAT),
}, |
<|file_name|>admin.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'
import { CommonModule } from '@angular/common'
import { FormsModule } from '@angular/forms'
import { AdminRoutes } from './admin.routes'
//Compnsants pour le panneau d'administration
import { HomePageAdmin } ... | imports: [
CommonModule,
FormsModule, |
<|file_name|>16.d.ts<|end_file_name|><|fim▁begin|>import { LogoTumblr16 } from "../../";
<|fim▁hole|><|fim▁end|> | export = LogoTumblr16; |
<|file_name|>0004_auto_20150117_1017.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('profiles', '0003_auto_20150115_1939'),
]
operations = [
... | ),
] |
<|file_name|>auth.py<|end_file_name|><|fim▁begin|>"""Implement the auth feature from Hass.io for Add-ons."""
from ipaddress import ip_address
import logging
import os
from aiohttp import web
from aiohttp.web_exceptions import (
HTTPInternalServerError,
HTTPNotFound,
HTTPUnauthorized,
)
import voluptuous as... | SCHEMA_API_PASSWORD_RESET = vol.Schema(
{vol.Required(ATTR_USERNAME): cv.string, vol.Required(ATTR_PASSWORD): cv.string},
extra=vol.ALLOW_EXTRA, |
<|file_name|>portal.rs<|end_file_name|><|fim▁begin|>use app;
use components::*;
use specs::Join;
use specs;
use levels;
#[derive(Clone)]<|fim▁hole|>}
impl specs::Component for Portal {
type Storage = specs::VecStorage<Self>;
}
impl Portal {
pub fn new(destination: levels::Level) -> Self {
Portal {
... | pub struct Portal {
destination: levels::Level, |
<|file_name|>fr-MG.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gu... | let i = Math.floor(Math.abs(n)); |
<|file_name|>rm.go<|end_file_name|><|fim▁begin|>package dockercommand
import docker "github.com/fsouza/go-dockerclient"
type RmOptions struct {
Container []string
Force bool
}
func (dock *Docker) Rm(options *RmOptions) error {
for _, containerID := range options.Container {<|fim▁hole|> }
}
return nil
}<|fi... | err := dock.client.RemoveContainer(docker.RemoveContainerOptions{ID: containerID, Force: options.Force})
if err != nil {
return err |
<|file_name|>search.js<|end_file_name|><|fim▁begin|><|fim▁hole|> switch(action.type) {
case types.SEARCH_INPUT_SUCCESS:
return action.data;
case types.SEARCH_INPUT_FAILED:
return action.error.message;
default:
return state;
}
};
export default search;<... | import * as types from '../actions/types';
const search = (state = [], action) => { |
<|file_name|>bug_972.py<|end_file_name|><|fim▁begin|>import unittest
from PySide.QtCore import QSizeF
from PySide.QtGui import QGraphicsProxyWidget, QSizePolicy, QPushButton, QGraphicsScene, QGraphicsView
from helper import TimedQApplication
def createItem(minimum, preferred, maximum, name):
w = QGraphicsProxyWid... | w.setMinimumSize(minimum) |
<|file_name|>gst010.py<|end_file_name|><|fim▁begin|># -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L.
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
#
# This file may be distributed and/or modi... | |
<|file_name|>object.js<|end_file_name|><|fim▁begin|>import Ember from 'ember';
import ObjectProxyMixin from '../mixins/object';
export default Ember.ObjectProxy.extend(ObjectProxyMixin, {<|fim▁hole|><|fim▁end|> | _storageType: 'session'
}); |
<|file_name|>jquery.easing.js<|end_file_name|><|fim▁begin|>/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
... | easeInOutBack: function (x, t, b, c, d, s) {
if (s == undefined) s = 1.70158;
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
|
<|file_name|>plano.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.forms import inlineformset_factory
from djangosige.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo
class PlanoContasGrupoForm(fo... | |
<|file_name|>verification_completed.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The LUCI Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/li... | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
|
<|file_name|>interfaces.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 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/LICENSE... | Update(ctx api.Context, obj runtime.Object) (runtime.Object, bool, error)
} |
<|file_name|>widget-document.js<|end_file_name|><|fim▁begin|>/**
* @author Anakeen
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License
*/
// Utility function to add an event listener
function addEvent(o,e,f){
if (o.addEventListener){ o.addEventListener(e,f,true); retur... | name: name,
allowBlank: !attr.needed,
disabled: disabled
}); |
<|file_name|>markup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2013-2014, Martín Gaitán
# Copyright (c) 2012-2013, Alexander Jung-Loddenkemper
# This file is part of Waliki (http://waliki.nqnwebs.com/)
# License: BSD (https://github.com/mgaitan/waliki/blob/master/LICE... |
``**bold** and *italics*`` turn into **bold** and *italics*. Very easy! |
<|file_name|>test_mockdata.py<|end_file_name|><|fim▁begin|>import unittest
from src.data_structures.mockdata import MockData
class TestMockData (unittest.TestCase):
def setUp(self):
self.data = MockData()
def test_random_data(self):
data = MockData()
a_set = data.get_random_elements... | self.assertTrue(len(a_set) == 10, "the data should have 10 elements!")
if __name__ == '__main__': |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import find_packages, setup
from auspost_pac import __version__ as version
setup(
name='python-auspost-pac',
version=version,
license='BSD',
author='Sam Kingston',
author_email='sam@sjkwi.com.au',
description='Python API for Au... | |
<|file_name|>block-must-not-have-result-res.rs<|end_file_name|><|fim▁begin|>struct R;
impl Drop for R {
fn drop(&mut self) {<|fim▁hole|>fn main() {
}<|fim▁end|> | true //~ ERROR mismatched types
}
}
|
<|file_name|>lint-non-camel-case-with-trailing-underscores.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.
//<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or th... | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
<|file_name|>google.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#coding:utf-8
# Author: Beining --<cnbeining#gmail.com>
# Purpose: A Chrome DCP handler.
# Created: 07/15/2015
#Original copyright info:
#Author: Xiaoxia
#Contact: xiaoxia@xiaoxia.org
#Website: xiaoxia.org
import sys
import argparse
from th... | return 'DIRECT'; |
<|file_name|>employee_birthday.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors<|fim▁hole|>
import frappe
from frappe import _
def execute(filters=None):
if not filters: filters = {}
columns = get_columns()
data = get_employees(filters)
return columns, data
... | # License: GNU General Public License v3. See license.txt |
<|file_name|>FormatLangPair_impl_ari_1_5_0.java<|end_file_name|><|fim▁begin|>package ch.loway.oss.ari4java.generated.ari_1_5_0.models;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated ... | format = val;
} |
<|file_name|>image_annotator_client_example_test.go<|end_file_name|><|fim▁begin|>// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.... |
resp, err := op.Wait(ctx) |
<|file_name|>fragment_program.py<|end_file_name|><|fim▁begin|>'''OpenGL extension ARB.fragment_program
This module customises the behaviour of the
OpenGL.raw.GL.ARB.fragment_program to provide a more
Python-friendly API
Overview (from the spec)
Unextended OpenGL mandates a certain set of configurable per-
fragm... | |
<|file_name|>signup.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SignupPage } from './signup';
@NgModule({
declarations: [
SignupPage,
],
imports: [
IonicPageModule.forChild(SignupPage),<|fim▁hole|>})
export cla... | ],
exports: [
SignupPage
] |
<|file_name|>util.hpp<|end_file_name|><|fim▁begin|>// Endless Online Bot v0.0.1
#ifndef UTIL_HPP_INCLUDED
#define UTIL_HPP_INCLUDED
#include <math.h>
#include <vector>
#include <string>
int path_length(int x1, int y1, int x2, int y2);
<|fim▁hole|>#endif // UTIL_HPP_INCLUDED<|fim▁end|> | std::vector<std::string> Args(std::string str);
std::string Lowercase(std::string str);
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// (c) 2016-2017 Productize SPRL <joost@productize.be>
//! Kicad file format parser and generator library
#![warn(missing_docs)]
#[macro_use]
extern crate log;
extern crate shellexpand;
extern crate symbolic_expressions;
// extern crate strum;
// #[macro_use]
// extern... | |
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Copyright (C) 2015 by Per Unneberg
class NotInstalledError(Exception):
"""Error thrown if program/command/application cannot be found in path
Args:
msg (str): String described by exception
code (int, optional): Error code, defa... | |
<|file_name|>ServicePort.cpp<|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 "modules/navigatorconnect/ServicePort.h"
#include "bindings/core/v8/ScriptValue.h"
#in... | #include "public/platform/modules/navigator_services/WebServicePortProvider.h"
namespace blink { |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>import * as _ from "lodash";
declare const sampleSize: typeof _.sampleSize;<|fim▁hole|><|fim▁end|> | export default sampleSize; |
<|file_name|>qdesigner_formwindow.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**<|fim▁hole|>** This file is... | |
<|file_name|>test_pymongo.py<|end_file_name|><|fim▁begin|># Copyright 2009-2014 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | |
<|file_name|>jquery.cycle.all.js<|end_file_name|><|fim▁begin|>/*!
* jQuery Cycle Plugin (with Transition Definitions)
* Examples and documentation at: http://jquery.malsup.com/cycle/
* Copyright (c) 2007-2013 M. Alsup
* Version: 3.0.3 (11-JUL-2013)
* Dual licensed under the MIT and GPL licenses.
* http://jquery.m... | opts.cssFirst = opts.cssFirst || {};
opts.animIn = opts.animIn || {};
opts.animOut = opts.animOut || {};
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8
from __future__ import unicode_literals
from collections import OrderedDict
from .. import BaseProvider
localized = True
class Provider(BaseProvider):
all_colors = OrderedDict((
("AliceBlue", "#F0F8FF"),
("AntiqueWhite", "#FAEB... | ("GreenYellow", "#ADFF2F"),
("HoneyDew", "#F0FFF0"), |
<|file_name|>0012_auto_20150422_2019.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('managers', '0011_auto_20150422_2018'),
]
operations = [
... | ] |
<|file_name|>SecurityOptionalConfig.java<|end_file_name|><|fim▁begin|>/*
* Licensed to David Pilato (the "Author") under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Author licenses this
* file to you und... | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
#
# Created by 'myth' on 8/26/15
from tkinter import *
from algorithms import ASTAR_OPTIONS, ASTAR_HEURISTIC, GAC_DEFAULT_K, GAC_DEFAULT_CONSTRAINT
from common import *
def generate_menus(window):
"""
Takes in the window main menu b... |
constraint_formula = Entry(frame) |
<|file_name|>new_security_install.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Do whatever is needed to get a security upload released
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2010 Joerg Jaspert <joerg@debian.org>
@license: GNU General Public License version 2 or later
"""
# This p... | |
<|file_name|>plotting_NR.py<|end_file_name|><|fim▁begin|>def plot_kinematics(signal, background, nbins=100,
mass_range=(50., 110.), pt_range=(200., 500.),
mass_pad=10, pt_pad=50,
linewidth=1, title=None):
import numpy as np
from matplotlib import pyplo... | bins=np.linspace(pt_min - pt_pad, pt_max + pt_pad, nbins),
histtype='stepfilled', facecolor='none', edgecolor='blue', normed=1, |
<|file_name|>todo.js<|end_file_name|><|fim▁begin|>const ADD_TODO = 'ADD_TODO';
const TOGGLE_TODO = 'TOGGLE_TODO';
const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER';
const SHOW_ALL = 'SHOW_ALL';
const todo = (state = {}, action) => {
switch (action.type) {
case ADD_TODO:
return {
id: action.id,
... | todos
}; |
<|file_name|>quantization.py<|end_file_name|><|fim▁begin|>#
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"
"net/http/httputil"
"strings"
)
type App struct {
Service string `json:"service"`
Host string `json:"host"`
IP string `json:"ip"`
Port string `json:"p... |
func GetEndpoint(name string) []App {
body, err := MakeRequest("GET", "http://52.34.228.148:8123/v1/services/_"+name+"._tcp.marathon.mesos")
if err != nil { |
<|file_name|>Loop.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
from SimPEG import Mesh, Utils
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from scipy.sparse import spdiags,... | B: magnetic field [Bx,By,Bz] |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# flask_slack documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 19 16:31:35 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration ... |
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities. |
<|file_name|>HttpSession.java<|end_file_name|><|fim▁begin|>package ru.stqa.pft.mantis.appmanager;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.clien... | import org.apache.http.impl.client.LaxRedirectStrategy;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
|
<|file_name|>privatelinkresources.go<|end_file_name|><|fim▁begin|>package cognitiveservices
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Chan... | |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import json
from django import forms
from django.contrib.auth.models import AnonymousUser
from django.core.exceptions import ObjectDoesNotExist
try:
from django.urls import reverse, resolve
except:
from django.core.urlr... |
from .form_fields import ChainedChoiceField, ChainedModelChoiceField, ChainedModelMultipleChoiceField
|
<|file_name|>enigma-gui-resizable-window.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
from tkinter import *
from tkinter.messagebox import *
fenetre = Tk()
fenetre.title("The Enigma Machine")
fenetre.configure(background='white')
fenetre.geometry("550x800")
class AutoScrollbar(Scrollbar):
#create a 'responsi... | liste = Listbox(f1, height=5, width=50, borderwidth=0, background='white')
s1.config(command = liste.yview) |
<|file_name|>generate.py<|end_file_name|><|fim▁begin|>"""
"""
import pandas as pd
import numpy as np
from OfferPandas import Frame, load_offerframe
import sys
import os
import datetime
import time
def create_fan(energy, reserve, fName=None, return_fan=True, break_tp=False,
force_plsr_only=True, ve... |
pass |
<|file_name|>RadioManagement.py<|end_file_name|><|fim▁begin|>from PyQt4.QtCore import *
from PyQt4 import QtGui
class RadioManagement ():
def __init__ (self, radioCol, gridLayout):
self.radioGroup = QtGui.QButtonGroup() # To store radio buttons.
self.radioCol = radioCol
self.gridLayout = gridLayout
def initDe... | # We'll also need to remove the radio button's reference from "radioGroup".
lastRadioButon = self.gridLayout.itemAtPosition (rowCount, self.radioCol)
self.radioGroup.removeButton (lastRadioButon.widget())
|
<|file_name|>binaryExpr.js<|end_file_name|><|fim▁begin|>// Copyright 2012 Google Inc. All Rights Reserved.
/**
* @fileoverview A class representing operations on binary expressions.
*/
goog.provide('wgxpath.BinaryExpr');
goog.require('wgxpath.DataType');
goog.require('wgxpath.Expr');
goog.require('wgxpath.Node');... |
/**
* Returns the operator with this opString or null if none. |
<|file_name|>uuidhelpers.js<|end_file_name|><|fim▁begin|>// Javascript helper functions for parsing and displaying UUIDs in the MongoDB shell.
// This is a temporary solution until SERVER-3153 is implemented.
// To create BinData values corresponding to the various driver encodings use:
// var s = "{00112233-4455-... |
function TestUUIDHelperFunctions() {
var s = "{00112233-4455-6677-8899-aabbccddeeff}";
var uuid = UUID(s); |
<|file_name|>lis.py<|end_file_name|><|fim▁begin|>################ Lispy: Scheme Interpreter in Python
## (c) Peter Norvig, 2010-14; See http://norvig.com/lispy.html
################ Types
from __future__ import division
Symbol = str # A Lisp Symbol is implemented as a Python str
List = list # A L... | env.update({ |
<|file_name|>dev.py<|end_file_name|><|fim▁begin|>from settings.common import Common<|fim▁hole|> 'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'ffrpg.sql', # Or path to database file if using s... |
class Dev(Common):
DATABASES = { |
<|file_name|>kart_racer.py<|end_file_name|><|fim▁begin|>#!/env/python3
import sys
import argparse
import os
import csv
import tabix
import gzip
import io
from collections import Counter<|fim▁hole|> with open(hg19_size_file) as file:
reader = csv.reader(file, delimiter="\t")
for line in reader:
results[li... |
def chromosom_sizes(hg19_size_file):
''' Return chromosom size range ex: size["chr13"] = 234324 '''
results = {} |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __author__="Joao" |
<|file_name|>domquad.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use crate::dom::bindings::codegen::Bindings::DOMPointBinding... | p1: &DOMPoint,
p2: &DOMPoint, |
<|file_name|>nodelog.py<|end_file_name|><|fim▁begin|>from include import IncludeManager
from django.apps import apps
from django.db import models
from django.utils import timezone
from osf.models.base import BaseModel, ObjectIDMixin
from osf.utils.datetime_aware_jsonfield import DateTimeAwareJSONField
from osf.utils.f... |
EDITED_TITLE = 'edit_title'
EDITED_DESCRIPTION = 'edit_description'
CHANGED_LICENSE = 'license_changed' |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(unknown_lints)] // Allow clippy lints.
extern crate alga;
extern crate arrayvec;
extern crate decorum;
#[macro_use]
extern crate failure;
#[macro_use]
extern crate gfx;
extern crate gfx_device_gl;
extern crate gfx_window_glutin;
extern crate glutin;
extern crat... | } |
<|file_name|>DataStoreFactory.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Signavio Core Components
* Copyright (C) 2012 Signavio GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU G... | dataStore.setCapacity(Integer.valueOf(shape.getProperty("capacity")).intValue());
/* Set isUnlimited attribute */
String isUnlimited = shape.getProperty("isunlimited"); |
<|file_name|>remove-block.tsx<|end_file_name|><|fim▁begin|>/** @jsx jsx */
import { jsx } from '../..'
export const input = (
<editor>
<block>
<text />
<inline>
<block>one</block>
<text>two</text>
</inline>
<text />
</block>
</editor>
)<|fim▁hole|> <text />
... | export const output = (
<editor>
<block> |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import math
def square_root ( a ):
"""Computes squar root of a
"""
espilon = 0.1e-11
x = a
while True:
y = ( x + a / x ) / 2.0<|fim▁hole|> x = y
def test_square_root():
"""Compares custom square and math.sqrt.
"""
a = 1... | if abs( y - x ) < espilon:
return y |
<|file_name|>scene.py<|end_file_name|><|fim▁begin|>"""Allow users to set and activate scenes."""
from __future__ import annotations
import logging
from typing import Any, NamedTuple
import voluptuous as vol
from homeassistant import config as conf_util
from homeassistant.components.light import ATTR_TRANSITION
from ... | hass.services.async_register( |
<|file_name|>FlushScreenCommand.java<|end_file_name|><|fim▁begin|>package spaceinvaders.command.client;
import static spaceinvaders.command.ProtocolEnum.UDP;
import spaceinvaders.client.mvc.Controller;
import spaceinvaders.client.mvc.View;
import spaceinvaders.command.Command;
/** Flush the screen. */
public class F... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import sys
import os.path
import subprocess
PY3 = sys.version >= '3'
from setuptools import setup, find_packages
# http://blogs.nopcode.org/brainstorm/2013/05/20/pragmatic-python-versioning-via-setuptools-and-git-tags/
# Fetch version from git tags, and write to ver... |
version_msg = ("# Do not edit this file, "
"pipeline versioning is governed by git tags") |
<|file_name|>init_ops_v2.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://www.apach... | self.mean = mean
self.stddev = stddev
self.seed = seed |
<|file_name|>env.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/licens... | ///
/// ```
/// use std::env; |
<|file_name|>hashdb.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 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 vers... | /// Trait modelling datastore keyed by a 32-byte Keccak hash. |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>""" RUN RUN RUN !
"""
from buttersalt import create_app
from flask_script import Manager, Shell<|fim▁hole|>
app = create_app('default')
manager = Manager(app)
def make_shell_context():
return dict(app=app)
manager.add_command("shell", Shell(make_context=make_... | |
<|file_name|>IfcElementType.cpp<|end_file_name|><|fim▁begin|>// IFC SDK : IFC2X3 C++ Early Classes
// Copyright (C) 2009 CSTB
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; eithe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.