prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>jsonutils.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the... | level=level,
max_depth=max_depth)
if isinstance(value, dict): |
<|file_name|>Institution.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright 2015 Unicon (R) Licensed under the
* Educational Community License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. Y... | /**
* @author ggilbert |
<|file_name|>update_default_servers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# This script prints a new "servers.json" to stdout.
# It prunes the offline servers from the existing list (note: run with Tor proxy to keep .onions),
# and adds new servers from provided file(s) of candidate servers.
# A file o... | |
<|file_name|>setup_verify.go<|end_file_name|><|fim▁begin|>package ovs
import (
"time"
ovs "github.com/docker/libnetwork/drivers/ovs/ovsdbdriver"
"github.com/vishvananda/netlink"
)<|fim▁hole|> var (
maxRetry int = 3
found = false
)
for retry := 1; retry <= maxRetry; retry++ {
_, err := netlink.LinkB... |
// Check whether the bridge interface exist
func setupVerifyInterface(_ *ovs.OvsdbDriver, config *networkConfiguration) error { |
<|file_name|>v1_0_0.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */
/**
* @... | /**
|
<|file_name|>rational.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# ******************************************************************************
#
# Copyright (C) 2008-2010 Olivier Tilloy <olivier@tilloy.net>
#
# This file is part of the pyexiv2 distribution.
#
# pyexiv2 is free software; you can redistr... | self.assertEqual(Rational.match_string('4/3'), (4, 3))
self.assertEqual(Rational.match_string('-4/3'), (-4, 3)) |
<|file_name|>pipeP.js<|end_file_name|><|fim▁begin|>var assert = require('assert');
var Q = require('q');
var R = require('..');
describe('pipeP', function() {
function a(x) {return x + 'A';}
function b(x) {return x + 'B';}
it('handles promises', function() {
var plusOne = function(a) {return a + 1;};
... | assert.strictEqual(f1.length, a.length);
var f2 = R.pipeP(a2, b);
assert.strictEqual(f2.length, a2.length);
var f3 = R.pipeP(a3, b); |
<|file_name|>frontend.js<|end_file_name|><|fim▁begin|>/* Copyright 2018 Onestein
* License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). */
odoo.define('website_lazy_load_image.lazy_image_loader', function (require) {
'use strict';
var Class = require('web.Class');
var mixins = require('web.mixi... | },
}); |
<|file_name|>BaseFragment.java<|end_file_name|><|fim▁begin|>package io.kaif.mobile.app;
import rx.Observable;
import rx.android.app.support.RxFragment;
import rx.android.lifecycle.LifecycleObservable;
import rx.android.schedulers.AndroidSchedulers;
<|fim▁hole|> protected <T> Observable<T> bind(Observable<T> observabl... | public class BaseFragment extends RxFragment {
|
<|file_name|>one_device_strategy.py<|end_file_name|><|fim▁begin|># Copyright 2018 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://w... | return value
def _update(self, var, fn, args, kwargs, group): |
<|file_name|>CSNHandler.java<|end_file_name|><|fim▁begin|>package service.handler.twostep;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.net.Socket;
import java.security.KeyPair;
import java.security.PublicKey;
import java.security.Signatu... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
.. module: FSRStools.rraman
:platform: Windows
.. moduleauthor:: Daniel Dietze <daniel.dietze@berkeley.edu>
Resonance Raman excitation profile calculation based on the time-domain picture of resonance Raman. See Myers and Mathies in *Biological Applicat... | """
|
<|file_name|>server.go<|end_file_name|><|fim▁begin|>package perform
import (
"encoding/json"
"io/ioutil"
"net/http"
"os"
"github.com/monax/compilers/definitions"
"github.com/monax/cli/config"
"github.com/monax/cli/log"
)
// Start the compile server
func StartServer(addrUnsecure, addrSecure, cert, key string)... | |
<|file_name|>glfw_windowing.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/. */
//! A windowing implementation using GLFW.
use window... |
mouse_down_button: @mut None,
mouse_down_point: @mut Point2D(0 as c_int, 0), |
<|file_name|>google.js<|end_file_name|><|fim▁begin|>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)<|fim▁hole|>ga('send', 'pageview'... | })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-26989160-4', '3scape.me');
ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js'); |
<|file_name|>corpus_test.cpp<|end_file_name|><|fim▁begin|>// File: corpus_test.cpp
#include "crn_core.h"
#include "corpus_test.h"
#include "crn_find_files.h"
#include "crn_console.h"
#include "crn_image_utils.h"
#include "crn_hash.h"
#include "crn_hash_map.h"
#include "crn_radix_sort.h"
#include "crn_mipmapped_texture.... | const image_utils::error_metrics& em = stats[i];
if ((em.mPeakSNR < 200.0f) && (em > best_metrics)) {
best_metrics = em; |
<|file_name|>broadcasting.py<|end_file_name|><|fim▁begin|>"""
========================
Broadcasting over arrays
========================
The term broadcasting describes how numpy treats arrays with different
shapes during arithmetic operations. Subject to certain constraints,
the smaller array is "broadcast" across th... | [ 1., 2., 3., 4.]])
Broadcasting provides a convenient way of taking the outer product (or |
<|file_name|>sprites.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 *-*
import pygame
from const import *
class MultiSprite(object):
def __init__(self, path, res_x, res_y=None, offX=0, offY=0, gX=0, gY=0):
"""path = file path of the Multi sprite.
res_x and res_y are the X, Y size o... | self.gY = gY |
<|file_name|>MDMC.py<|end_file_name|><|fim▁begin|># coding=utf-8
from abc import ABCMeta
import logging
from typing import Iterator
import numpy as np
from mdlmc.topo.topology import NeighborTopology
from ..misc.tools import remember_last_element
from ..LMC.output import CovalentAutocorrelation, MeanSquareDisplacem... | logger.debug("topology has method take_lattice_reference") |
<|file_name|>random_string.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
#
# Unless requir... |
class RandomString(resource.Resource):
"""A resource which generates a random string. |
<|file_name|>test_worker.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division, absolute_import
from numbers import Integral
from operator import add
import os
import shutil
import sys
import traceback
import logging
import re
import pytest
from toolz import pluck
from tornado import gen
fro... | |
<|file_name|>wiz_event_append_assistant.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# (c) 2016 Alfredo de la Fuente - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import fields, models, api
from openerp.addons.event_track_assistant._common import\
_convert_to_ut... | vals = super(WizEventAppendAssistant,
self)._prepare_registration_data(event)
date_start = _convert_to_local_date(self.from_date).date()
date_start = _convert_to_utc_date( |
<|file_name|>shared.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { StarComponent } from '../shared/star.component';
@NgModule({
declarations: [
StarComponent
],
... | ], |
<|file_name|>view.py<|end_file_name|><|fim▁begin|># Webhooks for external integrations.
from __future__ import absolute_import
from typing import Any, Dict, List, Optional, Text, Tuple
from django.utils.translation import ugettext as _
from django.db.models import Q
from django.conf import settings
from django.http im... | Q(full_name__iexact=jira_username) |
Q(short_name__iexact=jira_username) |
Q(email__istartswith=jira_username),
is_active=True, |
<|file_name|>autoderef-method-twice-but-not-thrice.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
//... | let x = box box box box box 3u;
assert_eq!(x.double(), 6u);
} |
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package me.banxi.androiddemo;<|fim▁hole|>import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class MainActivity extends Activity{
public void onCreate(Bundle bundle){
super.onCreate(bundle);
TextVi... | |
<|file_name|>test_automatic_adaptation.py<|end_file_name|><|fim▁begin|>###############################################################################
# Copyright 2014 Enthought, Inc.
###############################################################################
from traits.adaptation.api import reset_global_adaptati... |
def test_instance_trait_automatic_adaptation(self):
bar = Bar() |
<|file_name|>sensorcontrol.cpp<|end_file_name|><|fim▁begin|>#include "sensorcontrol.h"
using namespace oi;
/*!
* \brief SensorControl::SensorControl
* \param station
* \param parent
*/
SensorControl::SensorControl(QPointer<Station> &station, QObject *parent) : QObject(parent), station(station), sensorValid(false)... | //call method of sensor worker
bool hasInvoked = QMetaObject::invokeMethod(this->worker, "home", Qt::QueuedConnection);
if(!hasInvoked){
emit this->sensorMessage("Cannot invoke getSensor method of sensor worker", eErrorMessage, eConsoleMessage); |
<|file_name|>if-check-panic.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/... | |
<|file_name|>container_debug_adapter.js<|end_file_name|><|fim▁begin|>import Ember from 'ember-metal'; // Ember as namespace
import {
A as emberA,
typeOf,
String as StringUtils,
Namespace,
Object as EmberObject
} from 'ember-runtime';
/**
@module ember
@submodule ember-extension-support
*/
/**
The `Contain... | if (typeOf(klass) === 'class') {
types.push(StringUtils.dasherize(key.replace(typeSuffixRegex, '')));
}
} |
<|file_name|>test_sepsis.py<|end_file_name|><|fim▁begin|>import pandas as pd
from pandas.io import gbq
def test_sepsis3_one_row_per_stay_id(dataset, project_id):
"""Verifies one stay_id per row of sepsis-3"""
query = f"""
SELECT
COUNT(*) AS n
FROM
(
SELECT stay_id FROM {dataset}.sepsis... | """
df = gbq.read_gbq(query, project_id=project_id, dialect="standard") |
<|file_name|>coire.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
#
# Copyright: Conor O'Callghan 2016
# Version: v1.1.3
#
# Please feel free to fork this project, modify the code and improve
# it on the github repo https://github.com/brioscaibriste/iarnrod
#
# Powered by TfL Open Data
# This program is... |
A simple function to parse the command line arguments passed to the function.
The function does very little sanitisation on the input variables. The
argument passed is then returned from the function. |
<|file_name|>easyblock.py<|end_file_name|><|fim▁begin|># #
# Copyright 2009-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (htt... | if ec:
self.log.info("Not skipping %s" % name) |
<|file_name|>MultisigSignatureTransactionComparator.java<|end_file_name|><|fim▁begin|>package org.nem.core.model;
import org.nem.core.utils.ArrayUtils;<|fim▁hole|>
import java.util.Comparator;
/**
* A custom comparator for comparing MultisigSignatureTransaction objects.
* <br>
* This comparator only looks at the t... | |
<|file_name|>0019_auto_20150420_1821.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
<|fim▁hole|> ('libreosteoweb', '0018_auto_20150420_1232'),
]
operations = [
migr... | dependencies = [ |
<|file_name|>MongoRecordReader.java<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2013, Groupon, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above... | import org.apache.hadoop.io.Text; |
<|file_name|>markdown_pass.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/l... |
fn write_trait(ctxt: &Ctxt, doc: doc::TraitDoc) {
write_common(ctxt, doc.desc(), doc.sections()); |
<|file_name|>voir.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# 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 co... | class PrmVoir(Parametre):
"""Commande 'chemin voir'. |
<|file_name|>builtin-superkinds-in-metadata.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be c... | // Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
// |
<|file_name|>SdmlConfiguration.py<|end_file_name|><|fim▁begin|># SecuML
# Copyright (C) 2016 ANSSI
#
# SecuML 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 opt... | @staticmethod
def fromJson(obj):
conf = SdmlConfiguration(
families_supervision=obj['families_supervision']) |
<|file_name|>0003_auto__add_field_queryhistory_server_name__add_field_queryhistory_serve.py<|end_file_name|><|fim▁begin|># encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
#... | 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
} |
<|file_name|>rpcmining.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "db.... | |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, t... |
# TODO: query if blas/lapack/scalapack uses 64bit Ints |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>KISSY.add("brix/gallery/switchable/index", function(S,Brick,KSSwitchable) {
/**
* kissy switchable 组件的封装。
* @extends Brix.Brick
* @class Brix.Gallery.Switchable
* <a target="_blank" href="http://docs.kissyui.com/docs/html/api/component/switchab... | requires: ["brix/core/brick",'switchable']
}); |
<|file_name|>app.py<|end_file_name|><|fim▁begin|># 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 option) any later version.
#
# This program is dis... | """
Initializes a new app instance. |
<|file_name|>ec2creds.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation
# Copyright 2013 Nebula 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
#
# h... | |
<|file_name|>mac.py<|end_file_name|><|fim▁begin|># Copyright 2014 Huawei Technologies Co. Ltd
#
# 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.... |
"""Compass Appliance Mac module.""" |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
fn main() {
println!("cargo:rustc-flags=-l dbgeng");
}<|fim▁end|> | |
<|file_name|>data_models.py<|end_file_name|><|fim▁begin|># Copyright 2014 Rackspace
#
# 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/LICE... | self.provider_physical_network = provider_physical_network
self.provider_segmentation_id = provider_segmentation_id
self.router_external = router_external |
<|file_name|>app.component.spec.ts<|end_file_name|><|fim▁begin|>import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { OnChangesDemoComponent } from './on-changes-demo/... | |
<|file_name|>shiny_types.py<|end_file_name|><|fim▁begin|>from shinymud.lib.world import World
import json
world = World.get_world()
def to_bool(val):
"""Take a string representation of true or false and convert it to a boolean
value. Returns a boolean value or None, if no corresponding boolean value
exists... | k,v = pair.split('=') |
<|file_name|>DlgMSMeer.cpp<|end_file_name|><|fim▁begin|>// DlgMSMeer.cpp : implementation file
//
#include "stdafx.h"
#include "Risa.h"
#include "DlgMSMeer.h"
#include "afxdialogex.h"
#include "msImageProcessor.h"
// CDlgMSMeer dialog
IMPLEMENT_DYNAMIC(CDlgMSMeer, CDialogEx)
CDlgMSMeer::CDlgMSMeer(cv::Mat* pmImg, b... | |
<|file_name|>env.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# 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.
"""Implements a standard mechanism for Chrome Infra Python environment setup.
This li... | """
parts = [] |
<|file_name|>Asset.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package nl.hyranasoftware.githubupdater.domain;
import com.fasterxml.jackson.anno... | }
public Asset(String url, String browser_download_url, int id, String name, String label, String state, String content_type, long size, long download_count, DateTime created_at, DateTime updated_at, GithubUser uploader) {
this.url = url; |
<|file_name|>infinite-scroll.d.ts<|end_file_name|><|fim▁begin|>import { ElementRef, EventEmitter, NgZone } from '@angular/core';
import { Content, ScrollEvent } from '../content/content';
import { DomController } from '../../platform/dom-controller';
/**
* @name InfiniteScroll
* @description
* The Infinite Scroll al... | * default spinner or add text by adding properties to the
* `ion-infinite-scroll-content` component.
* |
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import {
Badge,
Box,
Flex,
Heading,
Stack,
Tab,
TabList,
TabPanel,
TabPanels,
Tabs
} from '@chakra-ui/react'
import useSWR from 'swr'
import {API} from 'lib/constants'
import JobDashboard from 'lib/components/admin-job-dashboard'
import TextLink ... | const workers = workerRequest.data || []
return ( |
<|file_name|>verlet_nvt_andersen.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright © 2008-2012 Peter Colberg and Felix Höfling
*
* This file is part of HALMD.
*
* HALMD 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 Softwar... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';
const Async = require('async');
const Boom = require('boom');
const DataRetrievalRouter = require('./DataRetrievalRouter');
const DENY = 0;
const PERMIT = 1;
const UNDETERMINED = 3;
const internals = {};
/**
* Evaluate a single Policy of PolicySet
*... | * ]
* |
<|file_name|>ContractsAndGrantsBillingServiceImpl.java<|end_file_name|><|fim▁begin|>/*
* The Kuali Financial System, a comprehensive financial management system for higher education.
*
* Copyright 2005-2014 The Kuali Foundation
*
* This program is free software: you can redistribute it and/or modify
* it under th... | } |
<|file_name|>eew.rs<|end_file_name|><|fim▁begin|>use chrono::{DateTime, Utc};
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub enum IssuePattern { Cancel, IntensityOnly, LowAccuracy, HighAccuracy }
#[derive(PartialEq, Eq, Debug, Clone, Copy)]
pub enum Source { Tokyo, Osaka }
#[derive(PartialEq, Eq, Debug, Clone, Co... | NIEDLow, NIEDHigh, EPOSLow, EPOSHigh, Unknown
} |
<|file_name|>_2533BeritrasCurse.java<|end_file_name|><|fim▁begin|>/**
* This file is part of Aion-Lightning <aion-lightning.org>.
*
* Aion-Lightning 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,... | player.getController().updateNearbyQuests();
|
<|file_name|>input.js<|end_file_name|><|fim▁begin|>(function(global) {
var LiteGraph = global.LiteGraph;
function GamepadInput() {
this.addOutput("left_x_axis", "number");
this.addOutput("left_y_axis", "number");
this.addOutput("button_pressed", LiteGraph.EVENT);
this.pro... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#-*- coding: utf-8 -*-
###########################################################
# © 2011 Daniel 'grindhold' Brendle and Team
#
# This file is part of Skarphed.
#
# Skarphed is free software: you can redistribute it and/or
# modify it under the... | # useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU Affero General Public License for more details. |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Pdfkit v0.10.0
// Project: http://pdfkit.org
// Definitions by: Eric Hillah <https://github.com/erichillah>
// Erik Berreßem <https://github.com/she11sh0cked>
// Jeroen Vervaeke <https://github.com/jeroenvervaek... | writeUInt16(val: number): void;
readInt16(): number;
writeInt16(val: number): void; |
<|file_name|>storage_thread.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 ipc_channel::ipc::{self, IpcReceiver, IpcSender};
... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""URLs to run the tests."""<|fim▁hole|>try:
from django.urls import include
except ImportError:
from django.conf.urls import include
from django.conf.urls import url
from django.contrib import admin
admin.autodiscover()
urlpatterns = (
url(r'^admin/', adm... | |
<|file_name|>get_binary.py<|end_file_name|><|fim▁begin|>"""
CMSIS-DAP Interface Firmware
Copyright (c) 2009-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.or... | if __name__ == '__main__':
options = get_options()
|
<|file_name|>async-fn.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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... | // edition:2018
// compile-flags:-Z unstable-options
|
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Helpful routines for regression testing."""
from bas... | if user is None or password is None:
raise ValueError("No RPC credentials") |
<|file_name|>git.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""Git tools."""
from shlex import split
from plumbum import ProcessExecutionError
from plumbum.cmd import git
DEVELOPMENT_BRANCH = "develop"
<|fim▁hole|> if not quiet:
print("{}{}".format("[DRY-RUN] " if dry_run else "", command))
... | def run_git(*args, dry_run=False, quiet=False):
"""Run a git command, print it before executing and capture the output."""
command = git[split(" ".join(args))] |
<|file_name|>perf_profiler.py<|end_file_name|><|fim▁begin|># Copyright 2013 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.
import logging
import os
import re
import signal
import subprocess
import sys
import tempfile
<|fi... | |
<|file_name|>gae_models.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright 2014 The Oppia 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
#
# htt... | # The version of the states blob schema.
states_schema_version = ndb.IntegerProperty( |
<|file_name|>main-dev.js<|end_file_name|><|fim▁begin|>document.write('<script src="js/goog/base.js"></script>');
document.write('<script src="js/deps.js"></script>');<|fim▁hole|><|fim▁end|> | document.write("<script>goog.require('AlignShop');</script>"); |
<|file_name|>color_world.py<|end_file_name|><|fim▁begin|>from __future__ import division
from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import ActorNode
from panda3d.core import WindowProperties, NodePath, LVector3
from panda3d.core import LineSegs, OrthographicLens, CardMaker
from inputs import ... | self.config['match_direction'] = ['front']
elif self.inputs.key_map['f'] is not None:
self.config['match_direction'] = ['back'] |
<|file_name|>fetchheaders.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2
#
# Copyright 2012 Abid Hasan Mujtaba
#
# 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... |
# We must perform some error checking on the arguments passed to the --exclude optional argument |
<|file_name|>pages.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright(C) 2014 smurail
#
# This file is part of a weboob module.
#
# This weboob module 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 S... | r'\((\d+)\)', default='')(self)
acc_id = Regexp(CleanText('./td[1]'), r'(\d+)\s*(\d+)', r'\1\2')(self)
if area_id: |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>define(function(require, exports, module) {
exports.init = function(){<|fim▁hole|> }
function Manager(){
$("#manager").click(function(){
location.href = $(this).attr("data-href");
});
}
});<|fim▁end|> | Manager() |
<|file_name|>profesional.ts<|end_file_name|><|fim▁begin|>import * as mongoose from 'mongoose';
import { AndesDocWithAudit, AuditPlugin } from '@andes/mongoose-plugin-audit';
import * as direccionSchema from './direccion';
import * as contactoSchema from './contacto';
import { ObjSIISASchema, EspecialidadSIISASchema } f... | domicilios: [direccionSchema], |
<|file_name|>template.py<|end_file_name|><|fim▁begin|># Copyright (c) 2010, Florian Ludwig <dino@phidev.org>
# see LICENSE
"""Helpers for code generation based on genshi [0]
There are good code generator tools out there like cog [1].
But if you already use genshi in your project this module might
help you integrating... | |
<|file_name|>StrLookup.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the... |
} |
<|file_name|>DfsBProgramVerifierTest.java<|end_file_name|><|fim▁begin|>/*
* The MIT License
*
* Copyright 2017 michael.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restri... | " bp.sync({request:bp.Event(\"C\")});\n" + |
<|file_name|>display.py<|end_file_name|><|fim▁begin|>from OpenGL.GL import *
from OpenGL.GLU import *
from OpenGL.GLUT import *
import camera
import time
class Display(object):
# Inheritrance convinience functions
def init(self): pass
def close(self): pass
def mouse(self, mouseButton, buttonState, x, y): pass... | def __init__(self, width = 1280, height = 720, frameName = "OpenGL"):
self.frameSize = (self.width, self.height) = (width, height) |
<|file_name|>prservice.py<|end_file_name|><|fim▁begin|>import unittest
import os
import logging
import re
import shutil
import datetime
import oeqa.utils.ftools as ftools
from oeqa.selftest.base import oeSelfTest
from oeqa.utils.commands import runCmd, bitbake, get_bb_var
from oeqa.utils.decorators import testcase
fro... | @testcase(936)
def test_pr_service_ipk_arch_indep(self): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import sys
import os
import warnings
import ruamel.yaml as yaml
from fnmatch import fnmatch
__author__ = "Pymatgen Development Team"
__email__ ="pymatgen@googlegroups.com"
__maintainer__ = "Shyue Ping Ong"
__maintainer_email__ ="shyuep@gmail.com"
__version__ = "201... | |
<|file_name|>nothing_test.go<|end_file_name|><|fim▁begin|>package nothing
import (
"testing"
)<|fim▁hole|>
func TestPop(t *testing.T) {
var manage TimerManager
var node HeapNode
node.Time = 1
var node1 HeapNode
node1.Time = 2
manage.Push(&node1)
manage.Push(&node)
min := manage.Pop()
if min == nil {
t.Fa... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from distutils.core import setup
execfile('modlunky/version.py')
with open('requirements.txt') as requirements:
required = requirements.read().splitlines()
kwargs = {
"name": "modlunky",
"version": str(__version__),
"packages":... | if required:
kwargs["install_requires"] = required |
<|file_name|>EditPropertyConditionDialog.js<|end_file_name|><|fim▁begin|>/**
* Created by Jacky.Gao on 2017-02-09.
*/
import {alert} from '../MsgBox.js';
export default class EditPropertyConditionDialog{
constructor(conditions){
this.conditions=conditions;
this.dialog=$(`<div class="modal fade" r... | alert(`${window.i18n.dialog.editPropCondition.selectProp}`);
return;
}
} else if(type==='expression') { |
<|file_name|>any.hpp<|end_file_name|><|fim▁begin|>/**
* @file
* Declares the any type.
*/
#pragma once
<|fim▁hole|>
namespace puppet { namespace runtime { namespace types {
// Forward declaration of recursion_guard
struct recursion_guard;
/**
* Represents the Puppet Any type.
*/
struct an... | #include "../values/forward.hpp"
#include <ostream> |
<|file_name|>generate_queries.py<|end_file_name|><|fim▁begin|>"""
Generate possible queries from Gates Found grant database.
There are 4 filters and >11K possibilities, Bill returns a max of 1000 results per query combo.
So the hope is that by using all potential queries, we will get everything. Otherwise, their
sy... |
def create_field_dicts(facets_dict, minimum_count): |
<|file_name|>tag-align-shape.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... | a_tag(u64); |
<|file_name|>detector.js<|end_file_name|><|fim▁begin|>var detector = (function () {
function foodCollision(snake, food, ui) {
var snakeHeadX = snake.parts[0].getPosition().x;
var snakeHeadY = snake.parts[0].getPosition().y;
var foodX = food.getPosition().x;
var foodY = food.getPositi... | snake.parts[0].y = 0;
snake.direction = 1; |
<|file_name|>itusozluk.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'Eren Turkay <turkay.eren@gmail.com>'
from scrapy import log
from scrapy.http import Request
from scrapy.exceptions import CloseSpider
from datetime import datetime
from . import GenericSozlukSpider
from ..items import Girdi
... | item['text'] = text |
<|file_name|>LSAPI.H<|end_file_name|><|fim▁begin|>/*++
Copyright (c) 1995-1996 Microsoft Corporation
Module Name:
lsapi.h
Abstract:
This module defines the 32-Bit Licensing API.
The Licensing API is still pre-release (i.e. beta) code.
Revision History:
--*/
#ifndef LSAPI_H
#define... | #define LS_AUTHORIZATION_UNAVAILABLE ((LS_STATUS_CODE) 0xC0001005)
#define LS_LICENSE_UNAVAILABLE ((LS_STATUS_CODE) 0xC0001006)
#define LS_RESOURCES_UNAVAILABLE ((LS_STATUS_CODE) 0xC0001007)
#define LS_NETWORK_UNAVAILABLE ((LS_STATUS_CODE) 0xC0001008)
|
<|file_name|>events.rs<|end_file_name|><|fim▁begin|>// extern crate sdl2;
macro_rules! struct_events {
(
keyboard: { $( $k_alias:ident : $k_sdl:ident ),* },
// match against a pattern
else: { $( $e_alias:ident : $e_sdl:pat ),* }
) => {
use sdl2::EventPump;
pub struct I... | self.now.$k_alias = Some(false);
self.$k_alias = false; |
<|file_name|>argparse.go<|end_file_name|><|fim▁begin|>package argparse
// Copyright (c) 2017 by Gilbert Ramirez <gram@alumni.rice.edu>
import (
"fmt"
"io"
"os"
)
type ArgumentParser struct {
// If this is set, instead of printing the help statement,
// when --help is requested, to os.Stdout, the output goes her... | }
if cmd.Function != nil { |
<|file_name|>initial_consul_data.py<|end_file_name|><|fim▁begin|>initial_consul_data = {
"update" : {
"providers/va_standalone_servers" : {"username": "admin", "servers": [], "sec_groups": [], "images": [], "password": "admin", "ip_address": "127.0.0.1", "networks": [], "sizes": [], "driver_name": "generic_... | {'name' : 'stop', 'type' : 'action'}
],
} |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main(){
println!("hello world!")
}<|fim▁end|> | |
<|file_name|>jquery.elastislide.js<|end_file_name|><|fim▁begin|>(function (e, t, n) {
t.fn.touchwipe = function (e) {
var n = {
min_move_x: 20,
min_move_y: 20,
wipeLeft: function () {},
wipeRight: function () {},
wipeUp: function () {},
... | n || t.data(this, "elastislide", new t.elastislide(e, this))
});
return this
} |
<|file_name|>ShellCommand.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2015-2016 Maven Source Dependencies
* Plugin contributors as indicated by the @author tags.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may o... | private final long timeoutMs;
private final Path workingDirectory;
public ShellCommand(String executable, List<String> arguments, Path workingDirectory, |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Automatic config nagios configurations.
Copyright (C) 2015 Canux CHENG
All rights reserved
Name: __init__.py
Author: Canux canuxcheng@gmail.com
Version: V1.0
Time: Wed 09 Sep 2015 09:20:51 PM EDT
<|fim▁hole|>Exaple:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.