prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>http.js<|end_file_name|><|fim▁begin|>(function () {
'use strict';
angular.module('metronome.services.http', ['angular-jwt'])
.factory('http', ['$http', 'CONFIG', 'jwtHelper', function($http, CONFIG, jwtHelper) {
var token = Cookies.get('token');
var now = moment();
var expiratio... | console.log("Error on call to renew accessToken:", response)
});
}
|
<|file_name|>OFOxmBsnInPorts128.java<|end_file_name|><|fim▁begin|>// Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
// Copyright (c) 2011, 2012 Open Networking Foundation
// Copyright (c) 2012, 2013 Big Switch Networks, Inc.
// This library was generated by the LoxiGen Compiler.
// Se... | import org.projectfloodlight.openflow.protocol.action.*;
import org.projectfloodlight.openflow.protocol.actionid.*;
import org.projectfloodlight.openflow.protocol.bsntlv.*; |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for the Italian train system using ViaggiaTreno API."""
import asyncio
import logging
import time
import aiohttp
import async_timeout<|fim▁hole|>import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity
from homeas... | |
<|file_name|>14 circle function.py<|end_file_name|><|fim▁begin|>def circle(cx, cy, diameter):
radius = diameter / 2<|fim▁hole|>
# diameter = 254
# radius = diameter / 2
# cx, cy = (420, 532)
# oval(cx - radius, cy - radius, diameter, diameter)
circle(420, 532, 254)
# diameter = 154
# radius = diameter / 2
# cx, ... | oval(cx - radius, cy - radius, diameter, diameter) |
<|file_name|>connect.js<|end_file_name|><|fim▁begin|>const ircFramework = require('irc-framework')
const store = require('../store')
const attachEvents = require('./attachEvents')
const connect = connection => {
const state = store.getState()
let ircClient = state.ircClients[connection.id]
if (!ircClient) {
... | nick: connection.nick,
host: connection.host, |
<|file_name|>separateOddsAndEvens.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <vector>
using namespace std;
void separateOddsAndEvens(const vector<int>& arr, vector<int>& odds, vector<int>& evens);
void printVector(const vector<int>& vec);
int main() {
vector<int> arrUnsplit = {1,2,3,4,5,6,7,8,9,1... | } |
<|file_name|>max_test.py<|end_file_name|><|fim▁begin|>from .max import max<|fim▁hole|>
def max_test():
assert_equal(max([1, 3, 4, 2]), 4)<|fim▁end|> | from pyramda.private.asserts import assert_equal
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// See LICENSE file for copyright and license details.<|fim▁hole|>pub mod dir;
pub mod fs;
pub mod game_state;
pub mod map;
pub mod misc;
pub mod pathfinder;
pub mod types;
// vim: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab:<|fim▁end|> |
pub mod conf;
pub mod core; |
<|file_name|>volumetric_repr.rs<|end_file_name|><|fim▁begin|>use na::{Pnt2, Iso2, Pnt3, Mat3, Iso3, Mat1};
use ncollide::shape::{Ball, Cone, Cylinder, Convex3, Cuboid2, Cuboid3, Compound2, Compound3};
use ncollide::inspection::Repr;
use ncollide::math::Scalar;
use volumetric::Volumetric;
macro_rules! dispatch(
($p... | else if let Some(c) = repr.downcast_ref::<$compound>() {
c.$name($($argN,)*)
} |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#
# Copyright (C) 2014 Mathias Weber <mathew.weber@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source... | # |
<|file_name|>cstore.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... |
pub fn get_used_crate_files(cstore: &CStore) -> ~[Path] {
return /*bad*/copy cstore.used_crate_files; |
<|file_name|>export-non-interference3.rs<|end_file_name|><|fim▁begin|>// xfail-fast<|fim▁hole|>// 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/LICENSE-2.0> or the M... |
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT |
<|file_name|>webgl_conformance_expectations.py<|end_file_name|><|fim▁begin|># Copyright (c) 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.
from telemetry.page import test_expectations
# Valid expectation conditions ... | |
<|file_name|>hackRIT.py<|end_file_name|><|fim▁begin|>import os
#Decoration Starts
print """
+=============================================================+
|| Privilege Escalation Exploit ||
|| +===================================================+ ||
|| | _ _ _ ____ _ __ ____ ___ ... | print "\n1. B.Tech Final Year\n2. T.Y.B.Tech\n3. S.Y.B.Tech\n4. F.Y.Tech"
year_input = input()
|
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![deny(
missing_debug_implementations,
missing_copy_implementations,
warnings,
trivial_numeric_casts,
unstable_features,
unused,
future_incompatible
)]
use actix_web::server;
use anyhow::Result;
use log::info;
use potboiler_common::pg;
use ... | |
<|file_name|>ReviewInviteControllerTest.java<|end_file_name|><|fim▁begin|>package org.innovateuk.ifs.assessment.invite.controller;
import org.innovateuk.ifs.BaseControllerMockMVCTest;
import org.innovateuk.ifs.assessment.invite.form.ReviewInviteForm;
import org.innovateuk.ifs.assessment.invite.populator.ReviewInviteMo... | |
<|file_name|>test_cuttle_class.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8
"""
Tests related to the Cuttle class.
"""
import os
import unittest
import warnings
import time
from cuttle.reef import Cuttle, Column
from cuttlepool import CuttlePool
from cuttlepool.cuttlepool import PoolConnection
DB = '_cuttle_t... |
def tearDown(self): |
<|file_name|>base_primitives.cc<|end_file_name|><|fim▁begin|><|fim▁hole|>/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual p... | |
<|file_name|>original-document.js<|end_file_name|><|fim▁begin|>'use strict';
var util = require('util');
var BaseController = require('hof').controllers.base;
var OriginalDocumentController = function OriginalDocumentController() {
BaseController.apply(this, arguments);
};
util.inherits(OriginalDocumentControlle... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>mod modul1;<|fim▁hole|>
fn main() {
modul1::func1();
modul2::func1();
// func1(); // error: unresolved name `func1`
// func1(); // works when use modul1::func1; is added
}
// called func1 from modul1
// called func1 from modul2<|fim▁end|> | mod modul2;
// use modul1::func1; |
<|file_name|>alpine.rs<|end_file_name|><|fim▁begin|>use std::io::Write;
use std::fs::File;
use std::path::Path;
use unshare::{Command, Stdio};
use rand::{thread_rng, Rng};
use super::super::super::file_util::create_dir;
use super::super::context::{Context};
use super::super::capsule;
use super::super::packages;
use p... |
pub static LATEST_VERSION: &'static str = "v3.2";
static MIRRORS: &'static str = include_str!("../../../alpine/MIRRORS.txt"); |
<|file_name|>ResolveSimpleNameClassName.java<|end_file_name|><|fim▁begin|>package org.ljc.adoptojdk.class_name;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
<|fim▁hole|>import java.util.List;
import java.util.Set;
public class ResolveSimpleNameClassName {
private Collect... | |
<|file_name|>groupBy.js<|end_file_name|><|fim▁begin|>const { stripIndent } = require('common-tags')
<|fim▁hole|>
let people = listOfPeople();
<>
<${widgetName}
data={people}
textField='fullName'
groupBy='lastName'
/>
<${widgetName}
data={people}
textFie... | module.exports = function (widgetName) {
return stripIndent`
import { ${widgetName} } from 'react-widgets'; |
<|file_name|>page.rs<|end_file_name|><|fim▁begin|>use iron::prelude::*;
use iron::middleware::Handler;
use iron::status;
use iron::headers::{ContentType};
use utils::Utils;
use rustview::view::View;
pub struct Index {
utils: Utils,
template: View,
}
impl Index {
pub fn new(utils: Utils, admin_template: V... | let mut response = Response::with((status::Ok, self.template.render("home.html", model)));
response.headers.set(ContentType::html()); |
<|file_name|>inputs_p38_singlet.py<|end_file_name|><|fim▁begin|>import json
import numpy as np
from glob import glob
inputs = {
'xml_file_path' : "./data/single_wavelength_copy",
'file_set' : {'p38' : glob( "./data/single_wavelength_copy/*.xml")},
'section' : '280_480_TOP_120',
'ligand_or... | 'Lstated' : np.array([20.0e-6,14.0e-6,9.82e-6,6.88e-6,4.82e-6,3.38e-6,2.37e-6,1.66e-6,1.16e-6,0.815e-6,0.571e-6,0.4e-6,0.28e-6,0.196e-6,0.138e-6,0.0964e-6,0.0676e-6,0.0474e-6,0.0320e-6,0.0240e-6,0.0160e-6,0.0120e-6,0.008e-6,0.0], np.float64), # ligand concentration, M
'Pstated' : 0.5e-6 * np.ones(... |
<|file_name|>run_examples.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import doctest<|fim▁hole|>import sys
def test_suite(docs):
suite = unittest.TestSuite()
for doc in docs:
suite.addTest(doctest.DocFileSuite(doc, optionflags=flags()))
return suite
def flags():
flags = doctest.NORMA... | import unittest |
<|file_name|>test_plugin_maven.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 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 Fre... | ' xsi:schemaLocation="http://maven.apache.org/SETTINGS/'
'1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">\n' |
<|file_name|>Play_Organs.java<|end_file_name|><|fim▁begin|>package com.planet_ink.coffee_mud.Abilities.Songs;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import ... | private static Ability theSpell=null;
@Override |
<|file_name|>sft_handler.py<|end_file_name|><|fim▁begin|>"""
Dealing with SFT tests.
"""
import logging
import sft_meta
import sft_schema as schema
from sft.utils.helpers import strip_args
class SFTPool():
""" This class defines all site functional tests (SFT)s
that shall be executed.
"""
de... | |
<|file_name|>seeclickfix_api.py<|end_file_name|><|fim▁begin|>'''
Pull one page of 100 results from seeclickfix using the global PARAMS
value if the parameters are not supplied. If there are more than 100
results, make another pull passing paramters that include the next page to
be pulled.
Nicole Donnelly 30May2016, up... | # track the number of items we have pulled with our requests |
<|file_name|>epio.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from .base import *
from bundle_config import config
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': config['postgres']['database'],
'USER': config['postgres']['us... | CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': '{host}:{port}'.format( |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from m2core.m2core import M2Core, logger
from m2core import bases
from m2core import data_schemes
from m2core import db<|fim▁hole|>from m2core import utils
from m2core import common<|fim▁end|> | |
<|file_name|>private_import_core.d.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<|fim▁hole|>export declare type RenderDebugInfo = typeof r._RenderDebugInfo;
export declare var RenderDebugInfo: t... | * found in the LICENSE file at https://angular.io/license
*/
import { __core_private__ as r } from '@angular/core'; |
<|file_name|>start_basinhopping_worker.py<|end_file_name|><|fim▁begin|>from pele.concurrent import BasinhoppingWorker
from start_server import create_system, get_server_uri
def main():
system = create_system()
uri = get_server_uri()
worker = BasinhoppingWorker(uri, system=system)
worker.run(1000)
<... | if __name__ == "__main__":
main() |
<|file_name|>datastorepythonwrapper.cpp<|end_file_name|><|fim▁begin|>/*******************************************************************************
Copyright (C) The University of Auckland
OpenCOR is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... |
auto simulationDataUpdatedFunction = reinterpret_cast<DataStoreValuesDictObject *>(pValuesDict)->simulationDataUpdatedFunction;
|
<|file_name|>example1-simpleloop.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
example1-simpleloop
~~~~~~~~~~~~~~~~~~~
This example shows how to use the loop block backend and frontend.
:copyright: 2015 by Lantz Authors, see AUTHORS for more details.
:license: BSD, see LICENSE for mo... | # You instantiate the loop
app = Loop() |
<|file_name|>ast.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/licens... | AngleBracketedParameters(AngleBracketedParameterData),
/// The `(A,B)` and `C` in `Foo(A,B) -> C`
ParenthesizedParameters(ParenthesizedParameterData),
} |
<|file_name|>map_remove_entry_listener_codec.py<|end_file_name|><|fim▁begin|>from hazelcast.serialization.bits import *
from hazelcast.protocol.client_message import ClientMessage
from hazelcast.protocol.custom_codec import *
from hazelcast.util import ImmutableLazyDataList
from hazelcast.protocol.codec.map_message_typ... | def decode_response(client_message, to_object=None):
""" Decode response from client message""" |
<|file_name|>acl.go<|end_file_name|><|fim▁begin|>package main
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"log"
"mime"
"net"
"net/http"
"net/url"
"os"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"
)
// Access Control Lists (ACLs)
// An ACLDefinitions object contains information about how to as... | for _, a := range args {
switch a[0] { |
<|file_name|>import-aliases.js<|end_file_name|><|fim▁begin|>const path = require('path');
const fs = require('fs');
const { flattenDeep, memoize } = require('lodash');
function locateSourceFile(modulesPath, moduleName, importPath = '') {
const srcPrefixes = ['src', ''];
const indexFiles = ['', 'index'];
const ex... | * Given '@spinnaker/core/deep/import', returns { pkg: 'core', path: 'deep/import' };
* Given 'anythingelse', returns undefined
*/ |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | |
<|file_name|>fixws.py<|end_file_name|><|fim▁begin|>import sys
import glob
def read_fileb(filename, mode='rb'):
f = open(filename, mode)
try:
return f.read()
finally:
f.close()
def write_fileb(filename, value, mode='wb'):
f = open(filename, mode)
try:
f.write(value)
fi... | data2lines = read_fileb(filename).strip().split('\n')
data2 = '\n'.join([line.rstrip( |
<|file_name|>export.py<|end_file_name|><|fim▁begin|>from pykintone.base_api import BaseAPI
import pykintone.user_api.user_api_result as ur
class Export(BaseAPI):
def __init__(self, account, requests_options=()):
super(Export, self).__init__(account=account, requests_options=requests_options)
def get... | resp = self._request("GET", url, params_or_data=params)
r = ur.GetUserGroupsResult(resp)
return r |
<|file_name|>normalizer.py<|end_file_name|><|fim▁begin|>#Caleb
#normalizes shapes in size and sets the lower left corner to 0
import math
def calc_dist(a,b):
ax=a[0]
ay=a[1]
bx=b[0]
by=b[1]
return math.sqrt((ax-bx)**2+(ay-by)**2)
def normalize(shapes):
"""Normalize shapes
>>> normalize([[(0,2.5),(2.5,2.5... | [[(0,1),(1,1),(0,0),(1,0)],[(0,1),(1,1),(0,0),(1,0)],[(0,1),(1,1),(0,0),(1,0)],[(0,1),(1,1),(0,0),(1,0)],[(0,1),(1,1),(0,0),(1,0)],[(0,1),(1,1),(0,0),(1,0)]]
""" |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use]
extern crate serde_derive;
extern crate itertools;
extern crate clap;
use clap::{App, Arg};
mod config;
mod subscription;
mod util;
fn main() {
let matches = App::new("podstats")
.version("0.2.0")
.author("Andrew Michaud <dev@mail.an... | .short("c")
.long("config")
.value_name("FILE")
.help("Sets a custom config file") |
<|file_name|>videos.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__license__ = "GNU Affero General Public License, Ver.3"
__author__ = "Pablo Alvarez de Sotomayor Posadillo"
# This file is part of Kirinki.
#
# Kirinki is free software: you can redistribute it and/or modify
# it under the terms of the GNU A... | from kirinki.models import streaming |
<|file_name|>DataTypeMapIntFloat.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
import hyperdex.client
from hyperdex.client import LessEqual, GreaterEqual, Range, Regex, LengthEquals, LengthLessEqual, LengthGreaterEqual
c = hyperdex.client.Client(sys.argv[1], int(sys.argv[2]))
def to_objectset(xs):
... | assert c.put('kv', 'k', {'v': {1: 3.14, 2: 0.25, 3: 1.0}}) == True
assert c.get('kv', 'k') == {'v': {1: 3.14, 2: 0.25, 3: 1.0}}
assert c.put('kv', 'k', {'v': {}}) == True
assert c.get('kv', 'k') == {'v': {}} |
<|file_name|>database.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//... | }
}
} |
<|file_name|>bower.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'),
config = require('../config'),
mergeStream = require('merge-stream'),
mainBowerFiles = require('main-bower-files'),
flatten = require('gulp-flatten'),
rename = require("gulp-rename"),
bowerRequireJS = require('bower-requirejs'),
... | gulp.task('bower:styles', function() {
|
<|file_name|>mediabrowser.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | |
<|file_name|>position.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/. */
//! Generic types for CSS handling of specified and computed... | |
<|file_name|>cssmin.js<|end_file_name|><|fim▁begin|>'use strict';
var path = require('path');
exports.name = 'cssmin';
//
// Output a config for the furnished block
// The context variable is used both to take the files to be treated
// (inFiles) and to output the one(s) created (outFiles).
// It aslo conveys whether... | context.inFiles.forEach(function(f) { files.src.push(path.join(context.inDir, f));} );
cfg.files.push(files); |
<|file_name|>beaglebone-black.py<|end_file_name|><|fim▁begin|>#
# Get the pin which correlates with a given purpose.
#
# @param char array purpose
# The purpose to search by.
# @return int
# A pin which can be used for the given purpose.
#
def getPin(purpose):
purpose_collection = {
"i2c-data": 20<|fim▁h... | "i2c-clock": 19
|
<|file_name|>PSYM_ENUMERATESYMBOLS_CALLBACK.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#pragma once
#include <common/common.h>
START_ATF_NAMESPACE
typedef int (WINAPIV *PSYM_ENUMERATESYMBOLS_CALLBACK)(_SYMBOL_INFO *, unsigned int, void *);
END_ATF_NAMESPACE<|fim▁end|> | // This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually |
<|file_name|>SendAuthorizeRequestTest.py<|end_file_name|><|fim▁begin|># pylint: disable-all
# flake8: noqa
import sys
sys.path.append("..")
from todopagoconnector import TodoPagoConnector
from SendAuthorizeRequestData import SendAuthorizeRequestData
import unittest
from unittest import TestCase
if sys.version_info[0] >... | instanceSAR.get_options_SAR_operation_params())
self.assertNotEquals(responseSAR['StatusCode'], -1)
|
<|file_name|>EncryptedData.java<|end_file_name|><|fim▁begin|>package org.bouncycastle.asn1.cms;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Integer;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
imp... | /**
* <pre> |
<|file_name|>jml.js<|end_file_name|><|fim▁begin|>var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
... | jml.toDOM = function () { |
<|file_name|>binary_sensor.py<|end_file_name|><|fim▁begin|>"""Representation of Z-Wave binary_sensors."""
from openzwavemqtt.const import CommandClass, ValueIndex, ValueType
from homeassistant.components.binary_sensor import (
DOMAIN as BINARY_SENSOR_DOMAIN,
BinarySensorDeviceClass,
BinarySensorEntity,
)
f... | |
<|file_name|>depRepSpec.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node
'use strict';
var assert = require('assert');
var depRep = require('../../lib/depRep');
var oldJson = require('../fixtures/old.json');
var newJson = require('../fixtures/new.json');
var unsupported = require('../fixtures/unsupported.json');
... | // assert.equal(analyze[key(1)].status, "major");
// assert.equal(report[key(2)].status, null);
// assert.equal(report[key(3)], null); |
<|file_name|>KingdomView.java<|end_file_name|><|fim▁begin|>package eu.hgross.blaubot.android.views;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Looper;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView... | });
}
/** |
<|file_name|>perfmonger_linux.go<|end_file_name|><|fim▁begin|>// +build linux
package subsystem
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"os/exec"
"runtime"
"strconv"
"strings"
)
type PlatformHeader LinuxHeader
func NewPlatformHeader() *LinuxHeader {
header := new(LinuxHeader)
header.Devices = make(map[... | if err != nil { |
<|file_name|>special.py<|end_file_name|><|fim▁begin|>'''Defines the Special class for theia.'''
# Provides:
# class Special
# __init__
# lines
import numpy as np
from ..helpers import geometry, settings
from ..helpers.units import deg, cm, pi
from .optic import Optic
class Special(Optic):
'''
... | None
|
<|file_name|>board_alerts.py<|end_file_name|><|fim▁begin|>###############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013, 2015 XCG Consulting (http://www.xcg-consulting.fr/)
#
# This program is free software: you can redistribut... | |
<|file_name|>NativeModule.ts<|end_file_name|><|fim▁begin|>/// <reference path="emscripten.d.ts" />
/// <reference path="libvorbis.asmjs.d.ts" />
/// <reference path="../typings/es6-promise/es6-promise.d.ts" />
module libvorbis {
export function makeRawNativeModule(options?: emscripten.EmscriptenModuleOptions) {
... | _makeRawNativeModule(options, resolve);
});
}
} |
<|file_name|>NoteTwoTone.js<|end_file_name|><|fim▁begin|>"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSv... | d: "M15 6H4v12.01h16V11h-5z", |
<|file_name|>ListEdgePoliciesInput.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.
*/
package com.microso... | /** |
<|file_name|>tahoe_mkdir.py<|end_file_name|><|fim▁begin|>import urllib
from allmydata.scripts.common_http import do_http, check_http_error
from allmydata.scripts.common import get_alias, DEFAULT_ALIAS, UnknownAliasError
from allmydata.util.encodingutil import quote_output
def mkdir(options):
nodeurl = options['nod... | return 1
if not where or not path: |
<|file_name|>obli.js<|end_file_name|><|fim▁begin|>module.exports = {<|fim▁hole|> },
trade: function(player, npc){
vendor("Obli's General Store");
}
}<|fim▁end|> | talkTo: function(player, npc){
// TODO: Dialogues
this.trade(player, npc); |
<|file_name|>TableComplexityCheckTest.java<|end_file_name|><|fim▁begin|>/*
* SonarQube Lua Plugin
* Copyright (C) 2016
* mailto:fati.ahmadi AT gmail DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by th... |
CheckMessagesVerifier.verify(file.getCheckMessages()) |
<|file_name|>pixel_data_range.py<|end_file_name|><|fim▁begin|>'''OpenGL extension NV.pixel_data_range
This module customises the behaviour of the
OpenGL.raw.GL.NV.pixel_data_range to provide a more
Python-friendly API
Overview (from the spec)
The vertex array range extension is intended to improve the
efficienc... | buffer.
|
<|file_name|>sf_account_manager.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# (c) 2017, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_v... | sf_account_manager: |
<|file_name|>wrapper.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 core::nonzero::NonZero;
use dom::bindings::js::{MutNullab... | |
<|file_name|>buildsettings.py<|end_file_name|><|fim▁begin|># settings file for builds.
# if you want to have custom builds, copy this file to "localbuildsettings.py" and make changes there.
# possible fields:
# resourceBaseUrl - optional - the URL base for external resources (all resources embedded in standard IITC)
... | 'resourceUrlBase': 'http://localhost:8100',
'distUrlBase': 'http://localhost:8100', |
<|file_name|>ConfigHelper.java<|end_file_name|><|fim▁begin|>package net.joaopms.PvPUtilities.helper;
import net.minecraftforge.common.config.Configuration;
import java.io.File;
public class ConfigHelper {
private static Configuration config;
public static void init(File file) {
config = new Configur... | config.get("overcastStatistics", "overlayOpacity", 0.5F);
} |
<|file_name|>services.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core';
@Component({
selector: 'sky-services',
template: `
<div id="services" class="container-fluid py-5">
<div class="row row align-items-start justify-content-center">
<div clas... | description: 'SkyPress can assist you in building future proof solutions for your web applications. Being a well known thought leader on WordPress web applications and the creator of the WAR framework, we can work with your team to rapidly develop your idea into a finished product.'
},
{ |
<|file_name|>statefile.go<|end_file_name|><|fim▁begin|>// replication-manager - Replication Manager Monitoring and CLI for MariaDB and MySQL
// Authors: Guillaume Lefranc <guillaume@signal18.io>
// Stephane Varoqui <stephane.varoqui@mariadb.com>
// This source code is licensed under the GNU General Public Lic... | } |
<|file_name|>cc_keys_to_console.py<|end_file_name|><|fim▁begin|># vi: ts=4 expandtab
#
# Copyright (C) 2011 Canonical Ltd.
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
#
# Author: Scott Moser <scott.moser@canonical.com>
# Author: Juerg Haefliger <juerg.haefliger@hp.com>
#
# This program... | |
<|file_name|>ActionBar.stories.js<|end_file_name|><|fim▁begin|>import React from 'react';
import { action } from '@storybook/addon-actions';
import { Action } from '../Actions';
import ActionBar from './ActionBar.component';
const primary = {
label: 'Primary',
icon: 'talend-cog',
bsStyle: 'primary',
'data-feature'... | <ActionBar>
<ActionBar.Content tag="a" left href="#/foo/bar">
Hello anchor
</ActionBar.Content> |
<|file_name|>incompatibleExports2.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>declare module "foo" {
export interface x { a: string }
interface y { a: Date }
export = y;
}<|fim▁end|> | |
<|file_name|>shogi.py<|end_file_name|><|fim▁begin|>import re
import functools
from slackbot.bot import respond_to
from app.modules.shogi_input import ShogiInput, UserDifferentException, KomaCannotMoveException
from app.modules.shogi_output import ShogiOutput
from app.slack_utils.user import User
from app.helper impor... | board_str = ShogiOutput.make_board_emoji_reverse(board)
message.send(board_str) |
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
... | 'karma-spec-reporter',
'@angular-devkit/build-angular/plugins/karma', |
<|file_name|>KarisikSayma.java<|end_file_name|><|fim▁begin|>package Thread;
/**
* Created by cnkaptan on 5/8/15.
*/
public class KarisikSayma {<|fim▁hole|> public static void main(String[] args){
ThreadTest thrd = new ThreadTest("Thread");
Thread runnableThread = new Thread(new RunnableTest("Runna... | |
<|file_name|>AndroidfilehostCom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*
#
# Test links:
# https://www.androidfilehost.com/?fid=95916177934518197
import re
from module.plugins.internal.SimpleHoster import SimpleHoster
class AndroidfilehostCom(SimpleHoster):
__name__ = "AndroidfilehostCom"
... | |
<|file_name|>dependency_format.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.o... | //!
//! When producing a final artifact, such as a dynamic library, the compiler has
//! a choice between linking an rlib or linking a dylib of all upstream |
<|file_name|>prod.py<|end_file_name|><|fim▁begin|>import os
from .base import * # NOQA
import dj_database_url
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
)
DATABASES = {'default': dj_database_url.config()}<|fim▁hole|>
LOGGING = {
'version': 1,
'disable_existing_loggers': True,
'filters': {
'... | |
<|file_name|>pgn.component.ts<|end_file_name|><|fim▁begin|>import { Component, Output, EventEmitter } from '@angular/core';
import { ChessService } from '../shared';
import { PgnLineComponent } from '../pgn-line';
@Component({
selector: 'app-pgn',
templateUrl: 'pgn.component.html',
styleUrls: ['pgn.component.scs... | |
<|file_name|>tools_test.py<|end_file_name|><|fim▁begin|>from unidown.tools import unlink_dir_rec
<|fim▁hole|> no_folder = tmp_path.joinpath("./donotexist/")
assert not no_folder.exists()
unlink_dir_rec(no_folder)
assert not no_folder.exists()
def test_recursive(self, tmp_path):
... | class TestDeleteDirRec:
def test_non_existence(self, tmp_path): |
<|file_name|>htmllielement.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 dom::bindings::codegen::HTMLLIElementBinding;
use d... | |
<|file_name|>logic.py<|end_file_name|><|fim▁begin|># This file is part of Korman.
#
# Korman is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | exporter.want_node_trees[i.node_tree.name] = (bo, so)
node = i.node_tree.nodes.get(i.node_name, None)
if node is None:
raise ExportError("Node '{}' does not exist in '{}'".format(i.node_name, i.node_tree.name)) |
<|file_name|>rust_base64.rs<|end_file_name|><|fim▁begin|>use indy_api_types::errors::prelude::*;
use failure::ResultExt;
pub fn encode(doc: &[u8]) -> String {
base64::encode(doc)
}
pub fn decode(doc: &str) -> Result<Vec<u8>, IndyError> {
base64::decode(doc)<|fim▁hole|> .map_err(|err| err.into())
}
pub... | .context("Invalid base64 sequence")
.context(IndyErrorKind::InvalidStructure) |
<|file_name|>CodeConverter.java<|end_file_name|><|fim▁begin|>package me.killje.servercaster.core.converter;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;<|fim▁hole|>import me.killje.servercaster.core.ServerCaster;
import mkremins.fanciful.FancyMessage;
import org.bukkit.entity.Play... | import java.util.Map;
import java.util.logging.Level; |
<|file_name|>4623531fa2b_record_information_about_how_a_game_.py<|end_file_name|><|fim▁begin|>"""Record information about how a game finished.
Revision ID: 4623531fa2b
Revises: 9aec2a74d9
Create Date: 2016-04-16 12:27:45.788322
"""
# revision identifiers, used by Alembic.
revision = '4623531fa2b'
down_revision = '9a... | batch_op.add_column(sa.Column('result', sa.Enum('WBR', 'WBC', 'BBR', 'BBC', 'D', ''), nullable=True))
connection = op.get_bind()
for game in connection.execute(gamehelper.select()):
result = go.get_game_result(game.sgf).value |
<|file_name|>spatial_graphs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# This file is part of the NNGT project to generate and analyze
# neuronal networks and their activity.
# Copyright (C) 2015-2019 Tanguy Fardet
#
# This program is free software: you can redistribute it and/or mod... | import os
import time
|
<|file_name|>test_attach.py<|end_file_name|><|fim▁begin|># encoding: utf-8
'''
Tests for various attachment thingies
Created on Oct 21, 2013
@author: pupssman<|fim▁hole|>import pytest
from hamcrest import has_entries, assert_that, is_, contains, has_property
from allure.constants import AttachmentType
from allure.u... | ''' |
<|file_name|>solution.py<|end_file_name|><|fim▁begin|>class Solution(object):
def maxProfit(self, prices):
"""
:type prices: List[int]
:rtype: int
"""
low=1<<31
profit=0
for p in prices:
if p<low:
low=p
if p-low>profit:
... | return profit |
<|file_name|>slick.dev.js<|end_file_name|><|fim▁begin|>/*
_ _ _ _
___| (_) ___| | __ (_)___
/ __| | |/ __| |/ / | / __|
\__ \ | | (__| < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
|__/
Version: 1.8.1
Author: Ken Wheeler
Website: http://kenwheeler.github.io
Docs: http://kenwh... | .eq(index)
.addClass('slick-center');
} else { |
<|file_name|>bloom.cpp<|end_file_name|><|fim▁begin|>/*
* Vulkan Example - Implements a separable two-pass fullscreen blur (also known as bloom)
*
* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
#include <stdio.h... | ubos.vertBlur.horizontal = 0;
VK_CHECK_RESULT(vkMapMemory(device, uniformData.fsVertBlur.memory, 0, sizeof(ubos.vertBlur), 0, (void **)&pData)); |
<|file_name|>plotynth.py<|end_file_name|><|fim▁begin|>#!/bin/env python
# plot results from ynthetictest.py
# by Dan Stowell, spring 2013
import os.path
import csv
from math import log, exp, pi, sqrt, ceil, floor
from numpy import mean, std, shape
import numpy as np
import random
import matplotlib.pyplot as plt
import... | if row[filtercol] not in allowedvals:
skiprow = True
break
if skiprow: continue |
<|file_name|>user.js<|end_file_name|><|fim▁begin|>// set event handlers and intialize date
var utils = new MedialUtilities();
var week = 0;
window.addEventListener('load',function() {
document.getElementById('appointment').addEventListener('click', overlayCalendar);
document.getElementById('calendar-close').ad... | |
<|file_name|>decrypt.go<|end_file_name|><|fim▁begin|>// decrypt is a tiny utility that can decrypt Pond detachments given the key
// file. The key file can be saved to disk from within the main Pond client.
// Later the bulk of the data, transported by other means, can be decrypted
// with this utility. (Or the main Po... | if err := proto.Unmarshal(contents, &detachment); err != nil {
return err
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.