prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>example.py<|end_file_name|><|fim▁begin|># # Copyright 2016-2019 Crown Copyright # # 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...
view=g.View( edges=[ g.ElementDefinition( 'RegionContainsLocation',
<|file_name|>input_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 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/license...
seen_b += len(which_b)
<|file_name|>qcframe.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2002-2014 The ProteinDF project # see also AUTHORS and README. # # This file is part of ProteinDF. # # ProteinDF is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
return frg_table
<|file_name|>Routes.ts<|end_file_name|><|fim▁begin|>import express = require('express'); import poiRouter = require('./poiRouters'); import UserRouter from "./../../modules/user/routing";<|fim▁hole|>var router = express.Router(); //noinspection TypeScriptValidateTypes router.use("/poi", poiRouter.Routers); //noinspec...
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/*----------------------------------------------------------------------------------- /* /* Main JS /* -----------------------------------------------------------------------------------*/ (function($) { /*---------------------------------------------------- */ ...
}, captionOff = function() { $( '#imagelightbox-caption' ).remove();
<|file_name|>AODeterminization.cpp<|end_file_name|><|fim▁begin|>#include "../../include/domains/AODeterminization.h" #include "../../include/domains/DummyAction.h" AllOutcomesDeterminization:: AllOutcomesDeterminization(mlcore::Problem* problem) { originalProblem_ = problem; problem->generateAll(); ...
for (auto& entry : transitionGraph_.at(s_idx)) { stateActions.push_back(actionsVector_[entry.first]);
<|file_name|>test_json.py<|end_file_name|><|fim▁begin|>import datetime import uuid from decimal import Decimal from django.core import checks, exceptions, serializers from django.core.serializers.json import DjangoJSONEncoder from django.forms import CharField, Form, widgets from django.test.utils import isolate_apps ...
class MyModel(PostgreSQLModel): field = JSONField(default={})
<|file_name|>AccountRoleDAO.java<|end_file_name|><|fim▁begin|>package org.zanata.dao; import java.util.Collection; import java.util.HashSet; import java.util.List; import java.util.Set; import org.hibernate.Criteria; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.criterion.Restrictions...
} groups.add(findByName(includeRole)); } makePersistent(role);
<|file_name|>new.go<|end_file_name|><|fim▁begin|>package groups import ( "errors" "fmt" "io" "github.com/spf13/cobra" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/sets" kcmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" kprinters "k8s.io/kubernetes/pkg/printers" "github.com/openshift/orig...
return fmt.Errorf("Group is required")
<|file_name|>wiredep.js<|end_file_name|><|fim▁begin|><|fim▁hole|> return { server: { src: ['<%= tmp %>/index.html'], ignorePath: /\.\.\// } } };<|fim▁end|>
module.exports = function() {
<|file_name|>webpack.config.development.js<|end_file_name|><|fim▁begin|>/* eslint max-len: 0 */ import webpack from 'webpack'; import merge from 'webpack-merge'; import baseConfig from './webpack.config.base'; const port = process.env.PORT || 3000; export default merge(baseConfig, { debug: true, devtool: 'cheap-...
target: 'electron-renderer' });
<|file_name|>Navigation.js<|end_file_name|><|fim▁begin|>import React from 'react'; import withStyles from 'isomorphic-style-loader/lib/withStyles'; import s from './Navigation.css'; import Link from '../Link'; class Navigation extends React.Component { render() { return (<|fim▁hole|> <Link className={s.li...
<div className={s.root} role="navigation">
<|file_name|>bug107.go<|end_file_name|><|fim▁begin|>// errchk $G $D/$F.go // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import os "os" type _ os.FileInfo func f() (os int) { // In the next l...
}
<|file_name|>alerts.ts<|end_file_name|><|fim▁begin|>'use strict'; import {Injectable, Inject} from '@angular/core'; import { Platform, Events} from 'ionic-angular'; import {GeofenceProvider} from './geofence'; import { Storage } from '@ionic/storage'; @Injectable() export class AlertsProvider { private geofencePro...
) {
<|file_name|>compiler_facade_interface.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 */ /** * A set of interfaces which are shared ...
export type ViewEncapsulation = number; export type ChangeDetectionStrategy = number;
<|file_name|>type_sizes_piechart.py<|end_file_name|><|fim▁begin|>from collections import Counter<|fim▁hole|>import matplotlib.pyplot as plt from arcapix.fs.gpfs import ListProcessingRule, ManagementPolicy def type_sizes(file_list): c = Counter() for f in file_list: c.update({splitext(f.name): f.file...
from os.path import splitext
<|file_name|>urls.js<|end_file_name|><|fim▁begin|>module.exports.twitter = function twitter(username) { // Creates the canonical twitter URL without the '@' return 'https://twitter.com/' + username.replace(/^@/, ''); }; module.exports.facebook = function facebook(username) { // Handles a starting slash, th...
return 'https://www.facebook.com/' + username.replace(/^\//, ''); };
<|file_name|>test-gamestats.js<|end_file_name|><|fim▁begin|>var assert = require('should'); var GameStats = require('../static/js/gamestats.js'); describe('gamestats', function(){ describe('#accuracy', function(){ it('should be updated after keypress', function () { var gm = new GameStats(); ...
gm.keypress(); gm.backspacepress(); gm.backspacepress(); gm.accuracy.should.equal(1/3);
<|file_name|>Utils.py<|end_file_name|><|fim▁begin|># # Utility functions # import sys from functools import partial from uuid import UUID from hashlib import sha1 from os import path, listdir from zipfile import ZipFile from subprocess import Popen, TimeoutExpired import nacl.utils import nacl.secret def isValidUUID(...
return path.abspath(path.join(datadir, pathname))
<|file_name|>source_trick_reciever.py<|end_file_name|><|fim▁begin|>import sys import os import pysos import signal # these two variables should be changed depending on the test drivers PID # and the type of message it will be sending, If you are using the generic_test.c # then it is likely these two values can stay t...
<|file_name|>version.py<|end_file_name|><|fim▁begin|>""" The latest version of this package is available at: <http://github.com/jantman/webhook2lambda2sqs> ################################################################################ Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com> ...
<|file_name|>0004_emailmarketingconfiguration_welcome_email_send_delay.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models<|fim▁hole|> dependencies = [ ('email_marketing', '0003_auto_20160715_1145'), ] operations ...
class Migration(migrations.Migration):
<|file_name|>macros.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/xml" "errors" "os" "os/exec" "strings" ) type KmItem struct { Keys []string `xml:"key"` Values []string `xml:",any"` } type KmCategory struct { Keys []string `xml:"key"` Values []string `xml:"string"` Items []KmItem `x...
Name: item.getValueByKey("name"), Category: category.getValueByKey("name"),
<|file_name|>notebook.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------...
<|file_name|>rotate_point.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Noise-rs Developers. // // 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/licens...
mod debug; fn main() {
<|file_name|>fields.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-2014 OpenERP (<http://www.openerp.com>). # # This program is free software: you can redist...
record._cache[self] = UnionUpdate(self, record, value)
<|file_name|>niche-prefer-zero.rs<|end_file_name|><|fim▁begin|>// Check that niche selection prefers zero and that jumps are optimized away. // See https://github.com/rust-lang/rust/pull/87794 // assembly-output: emit-asm // only-x86 // compile-flags: -Copt-level=3 #![crate_type = "lib"] #[repr(u8)] pub enum Size { ...
}
<|file_name|>sale_order.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2014 Avanzosc <http://www.avanzosc.com> # # This program is free software: you ca...
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>AssetsScreenTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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://...
* */
<|file_name|>graph_theory.py<|end_file_name|><|fim▁begin|>"""This module provides graph theory functionality.""" from heapq import heapify, heappop, heappush def dijkstra(nodes, edges, startNode, directed): """Finds the length between each node in the graph and the startNode. Arguments: nodes - the se...
(non-negative) weight of that edge (in that order).
<|file_name|>01_RedditlistCrawler.py<|end_file_name|><|fim▁begin|>import requests from bs4 import BeautifulSoup import urllib2 # require python 2.0 """ 1. Get all subreddit name from redditlist.com using urllib and BeautifulSoup library """ def get_subreddit_list(max_pages): """ Get all of ...
<|file_name|>extHostDocumentSaveParticipant.ts<|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 in...
return (listener, thisArg, disposables) => { const remove = this._callbacks.push([listener, thisArg, extension]); const result = { dispose: remove };
<|file_name|>gal.js<|end_file_name|><|fim▁begin|>showWord(["n. ","Gratèl, lagratèl, maladi po ki atrapan; maladi po ki bay pi. Tretman gal fasil. 2. Enfeksyon nan plant."<|fim▁hole|><|fim▁end|>
])
<|file_name|>estimate.rs<|end_file_name|><|fim▁begin|>use std::error::Error; use std::fs::File; use std::io; use bio::stats::{LogProb, Prob}; use clap; use csv; use serde_json; use libprosic; use libprosic::estimation; use libprosic::model; use libprosic::model::AlleleFreq; use call; pub fn effective_mutation_rate(...
struct DummyEvent {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def load_tests(loader, tests, ignore): tests.addTests(doctest.DocTestSuite(config)) return tests<|fim▁end|>
import doctest from maiden import config
<|file_name|>test_power.py<|end_file_name|><|fim▁begin|>from __future__ import division import numpy as np from numpy.testing import assert_almost_equal import pytest from acoustics.power import lw_iso3746 @pytest.mark.parametrize("background_noise, expected", [ (79, 91.153934187), (83, 90.187405234), ...
<|file_name|>test-multiple-statements-load-data-infile.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); var common = require('../../common'); var path = common.fixtures + '/data.csv'; var table = 'multi_load_data_test'; var newline = common.detectNewline(path); common.getTestConnection({multipleSt...
common.useTestDb(connection); connection.query([
<|file_name|>TopologyUpdateWaitHandler.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...
LOG.fine(qualifiedName + node + " has failed");
<|file_name|>queue-promote-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:7998c9520ed14ac4fc2dcf6956c1dcbd36b02d6dfe63b0e4ec15a1635b951e08<|fim▁hole|><|fim▁end|>
size 4403
<|file_name|>david2expr.py<|end_file_name|><|fim▁begin|>'''The script reads in a list of genes from an output from DAVID and reads in expression data from a text file containing corresponding genes and report an expression level of each gene in DAVID list to standard output. Both gene expression and DAVID files should...
exprs = '\t'.join(cols[1:5]) if geneid not in genes:
<|file_name|>a.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::prelude::*; use std::io::BufReader; use std::error::Error; static KEYPAD_MAP: [[u8; 3]; 3] = [ [1, 2, 3], [4, 5, 6], [7, 8, 9]]; struct Turtle { x: i8, y: i8, code: String, } impl Turtle { fn new() -> Turtle {...
self.code.push_str(KEYPAD_MAP[self.y as usize][self.x as usize].to_string().as_str());
<|file_name|>apps.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 nVentiveUX # # 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 restriction, including # without limitation the rig...
<|file_name|>MessageTranslator.java<|end_file_name|><|fim▁begin|>/* * GNU LESSER GENERAL PUBLIC LICENSE * Version 3, 29 June 2007 * * Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> * Everyone is permitted to copy and distribute verbatim copies * of this license document,...
* You can view LICENCE file for details. * * @author The Dragonet Team */
<|file_name|>stdafx.cpp<|end_file_name|><|fim▁begin|>// stdafx.cpp : source file that includes just the standard includes // importkeyboard.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "stdafx.h" // TODO: reference any additional headers you need in STDAFX....
// and not in this file
<|file_name|>start_gym_battle_message_pb2.py<|end_file_name|><|fim▁begin|># Generated by the protocol buffer compiler. DO NOT EDIT! # source: pogoprotos/networking/requests/messages/start_gym_battle_message.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobu...
))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import httpbenchmark<|fim▁hole|>from unuk.benchmarks.base import runtests<|fim▁end|>
<|file_name|>char_class.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 Strahinja Val Markovic // // 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/L...
// TODO: tests for escaped chars in class }
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2008-2013 AvanzOSC S.L. All Rights Reserved # Date: 01/07/2013 # # This progr...
}
<|file_name|>NativeEventEmitter.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @format * @flow */ 'use strict'; const EventEmitter = require...
*/ class NativeEventEmitter extends EventEmitter { constructor() {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Mirantis 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 # Unless r...
import setuptools
<|file_name|>equal_tests.py<|end_file_name|><|fim▁begin|>from python.equal import Equal def count_steps_test(): equal_instance = Equal() array_a = [2, 2, 3, 7] array_b = [53, 361, 188, 665, 786, 898, 447, 562, 272, 123, 229, 629, 670, 848, 994, 54, 822, 46, 208, 17, 449, 302, 466, 832, 931,...
811, 24, 420, 440, 46, 269, 786, 101, 443, 832, 661, 460, 281,
<|file_name|>glpk_solver_java.py<|end_file_name|><|fim▁begin|>##cobra.solvers.glpk_solver #This script provides wrappers for libglpk-java 1.0.22 and pyglpk 0.3 from warnings import warn from copy import deepcopy ###solver specific parameters from .parameters import status_dict, variable_kind_dict, \ sense_dict, pa...
if isinstance(the_problem, __solver_class): #Update the problem with the current cobra_model
<|file_name|>A_in.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2000, 2003 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public Lic...
<|file_name|>tool_move.cpp<|end_file_name|><|fim▁begin|>#include "tool_move.hpp" #include "document/idocument_board.hpp" #include "board/board.hpp" #include "document/idocument_package.hpp" #include "pool/package.hpp" #include "document/idocument_padstack.hpp" #include "pool/padstack.hpp" #include "document/idocument_s...
break;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #![deny(warnings)] #![deny(rust_2018_idioms)] // #![deny(clippy::all)] #![deny(cli...
mod validator;
<|file_name|>brocade_ip_access_list.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import xml.etree.ElementTree as ET class brocade_ip_access_list(object): """Auto generated class. """ def __init__(self, **kwargs): self._callback = kwargs.pop('callback') def ip_acl_ip_acce...
config = ET.Element("config") ip_acl = ET.SubElement(config, "ip-acl", xmlns="urn:brocade.com:mgmt:brocade-ip-access-list") ip = ET.SubElement(ip_acl, "ip") access_list = ET.SubElement(ip, "access-list")
<|file_name|>stdin.rs<|end_file_name|><|fim▁begin|>#![feature(libc)] extern crate libc; extern crate termios; use termios::prelude::*; fn main() {<|fim▁hole|><|fim▁end|>
println!("{:?}", Termios::fetch(libc::STDIN_FILENO).unwrap()); }
<|file_name|>vulnerability.pb.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The Grafeas 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...
func (x *Vulnerability_WindowsDetail_KnowledgeBase) String() string { return protoimpl.X.MessageStringOf(x) }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models class Institution(models.Model): name = models.CharField(max_length=50); @property def teams(self): return Team.objects.filter(institution=self) @property def judges(self): return Judge.objects.filte...
<|file_name|>test_us_equity_pricing.py<|end_file_name|><|fim▁begin|># # Copyright 2015 Quantopian, 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/...
columns,
<|file_name|>HTTPOut.py<|end_file_name|><|fim▁begin|>import mt, os, mimetypes from time import strftime class HTTPOut(): class mtEntry(): def __init__(self): self.html = False self.css = False self.js = False self.data = "" self.target = "" d...
<|file_name|>not_const_clusure_in_const.rs<|end_file_name|><|fim▁begin|>// run-pass const _FOO: fn() -> String = || "foo".into();<|fim▁hole|> pub fn bar() -> fn() -> String { || "bar".into() } fn main(){}<|fim▁end|>
<|file_name|>32.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { Blog32 as default } from "../../";
<|file_name|>abstract_rotation.rs<|end_file_name|><|fim▁begin|>use crate::allocator::Allocator; use crate::geometry::{Rotation, UnitComplex, UnitQuaternion}; use crate::{DefaultAllocator, DimName, Point, Scalar, SimdRealField, VectorN, U2, U3}; use simba::scalar::ClosedMul; /// Trait implemented by rotations that can...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # urls.py --- # # Created: Wed Dec 14 23:02:53 2011 (+0200) # Author: Janne Kuuskeri # <|fim▁hole|>dictresource = resources.MyDictResource() textresource = resources.MyTextResource() respresource = resources.MyRespResource() authresource = reso...
from django.conf.urls.defaults import patterns, url import resources
<|file_name|>_x.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class XValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(self, plotly_name="x", parent_name="choropleth.colorbar", **kwargs): super(XValidator, self).__init__( plotly_name=plotly_name, ...
min=kwargs.pop("min", -2), **kwargs )
<|file_name|>htmltextareaelement.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::attr::{Attr, AttrValue}; use dom::bindin...
<|file_name|>rpcrawtransaction.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2014 The Lioncoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "base58.h" #i...
entry.push_back(Pair("confirmations", 1 + chainActive.Height() - pindex->nHeight)); entry.push_back(Pair("time", (boost::int64_t)pindex->nTime));
<|file_name|>HexagonViewNorthSouth.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 Pablo Guardiola Sánchez. * * 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.apa...
float radiusBorder = radius - 5; float adjacentBorder = (float) (Math.sqrt(3) * radiusBorder / 2);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, The Radare Project. All rights reserved. // See the COPYING file at the top-level directory of this distribution. // Licensed under the BSD 3-Clause License: // <http://opensource.org/licenses/BSD-3-Clause> // This file may not be copied, modified,...
pub mod valueset;
<|file_name|>restore.go<|end_file_name|><|fim▁begin|>// Copyright 2019 PingCAP, 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 /...
}() loop: for { select {
<|file_name|>index.js<|end_file_name|><|fim▁begin|>const readdirp = require('readdirp'), path = require('path'), fs = require('graceful-fs'), _ = require('lodash'), frontMatterParser = require('./parsers/front_matter_parser'), markdownParser = require('./parsers/markdown_parser'), fileParser = require('./pa...
<|file_name|>pubsub-macros.rs<|end_file_name|><|fim▁begin|>use jsonrpc_core; use jsonrpc_pubsub; use serde_json; #[macro_use] extern crate jsonrpc_derive; use jsonrpc_core::futures::channel::mpsc; use jsonrpc_pubsub::typed::Subscriber; use jsonrpc_pubsub::{PubSubHandler, PubSubMetadata, Session, SubscriptionId}; use s...
#[test] fn test_subscribe_with_alias() { let mut io = PubSubHandler::default();
<|file_name|>ObjectCloner.java<|end_file_name|><|fim▁begin|>package util; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; /** * Taken from * http://www.javaworld.com/article/2077578/learn-java/java-tip-76--an-alternative...
private ObjectCloner() { }
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CherryMusic documentation build configuration file, created by # sphinx-quickstart on Fri Mar 1 23:32:37 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all po...
<|file_name|>XDivision.java<|end_file_name|><|fim▁begin|>package org.wingx; import java.awt.Color; import org.wings.*; import org.wings.style.CSSAttributeSet; import org.wings.style.CSSProperty; import org.wings.style.CSSStyle; import org.wings.style.CSSStyleSheet; import org.wings.style.Selector; import org.wings.sty...
boolean oldVal = this.isTitleClickable; this.isTitleClickable = clickable; propertyChangeSupport.firePropertyChange("titleClickable", oldVal, this.isTitleClickable);
<|file_name|>mfn.menu.js<|end_file_name|><|fim▁begin|>/* @Name: Horizontal multilevel menu @Author: Muffin Group @WWW: www.muffingroup.com @Version: 1.5.2 */ (function($){ $.fn.extend({ muffingroup_menu: function(options) { var menu = $(this); var defaults = { delay : 100,<|fim▁hole|...
hoverClass : 'hover', arrows : true, animation : 'fade', addLast : true
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict'; // Declare app level module which depends on views, and components <|fim▁hole|>var partnerModule = angular.module('partnerModule', []); var dodoModule = angular.module('dodoModule', []); angular.module('myApp', [ 'ngMaterial', 'ngRoute', 'myAp...
var accountModule = angular.module('accountModule', []);
<|file_name|>ChromeapiPlugupCardTerminalFactory.js<|end_file_name|><|fim▁begin|>/* ************************************************************************ Copyright (c) 2013 UBINITY SAS Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. ...
<|file_name|>hcat_client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ 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 y...
:param env: :param upgrade_type: :return:
<|file_name|>app.e2e-spec.ts<|end_file_name|><|fim▁begin|>import { AuthMeanPage } from './app.po'; describe('auth-mean App', () => { let page: AuthMeanPage; beforeEach(() => {<|fim▁hole|> }); it('should display message saying app works', () => { page.navigateTo(); expect(page.getParagraphText()).toEqu...
page = new AuthMeanPage();
<|file_name|>test_service.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Bull. # # 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 # # Unle...
fake_get_computehosts = self.patch(self.s_api.API, "get_computehosts") fake_get_computehosts.return_value = self.fake_list
<|file_name|>gap_analysis.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # © 2014 Elico Corp (https://www.elico-corp.com) # Licence AGPL-3.0 or later(http://www.gnu.org/licenses/agpl.html) from datetime import datetime import time from osv import fields, osv from tools.translate import _ from tools import ...
'proposed': fields.boolean('Propose as template ?'), #### Default values (Templating) ####
<|file_name|>test_validate_invalid.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2021 Ansible Project # 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 import pyte...
assert result.unsupported_parameters == unsupported assert result.validated_parameters == expected
<|file_name|>course_module.py<|end_file_name|><|fim▁begin|>""" Django module container for classes and operations related to the "Course Module" content type """ import logging from cStringIO import StringIO from lxml import etree from path import Path as path from pytz import utc import requests from datetime import d...
"if they're not enrolled in the course." ), default=False, scope=Scope.settings
<|file_name|>be_equivalent_to_matcher.go<|end_file_name|><|fim▁begin|>package matchers import (<|fim▁hole|> "fmt" "github.com/bfontaine/go-tchoutchou/Godeps/_workspace/src/github.com/onsi/gomega/format" "reflect" ) type BeEquivalentToMatcher struct { Expected interface{} } func (matcher *BeEquivalentToMatcher) Ma...
<|file_name|>replica_group.js<|end_file_name|><|fim▁begin|>/*! * Copyright (C) 2015 SequoiaDB 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...
var svc = svcs[i]; var type = svc[constants.FIELD_SERVICE_TYPE];
<|file_name|>datafactory.py<|end_file_name|><|fim▁begin|># This file is part of PlexPy. # # PlexPy 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) an...
def __init__(self): pass def get_datatables_history(self, kwargs=None, custom_where=None, grouping=0, watched_percent=85):
<|file_name|>hydrogen.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ hydrogen ~~~~~~~~ Hydrogen is an extremely lightweight workflow enhancement tool for Python web applications, providing bower/npm-like functionality for both pip and bower packages. :author: David Gidwani <david....
if chunk: f.write(chunk) f.flush()
<|file_name|>IndexedTriangleStripSet.js<|end_file_name|><|fim▁begin|>/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*- ******************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * ...
* You should have received a copy of the GNU General Public License version 3
<|file_name|>BeanParamParser.java<|end_file_name|><|fim▁begin|>package org.jboss.resteasy.reactive.client.processor.beanparam; import static org.jboss.resteasy.reactive.common.processor.ResteasyReactiveDotNames.BEAN_PARAM; import static org.jboss.resteasy.reactive.common.processor.ResteasyReactiveDotNames.COOKIE_PARAM...
<|file_name|>constraints.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ TDDA constraint discovery and verification is provided for a number of DB-API (PEP-0249) compliant databases, and also for a number of other (NoSQL) databases. The top-level functions are: :py:func:`tdda.constraints.discover_db_t...
sys.exit(1) constraints = disco.discover()
<|file_name|>api.spec.ts<|end_file_name|><|fim▁begin|>import { it, describe, expect, inject, beforeEachProviders } from 'angular2/testing'; import {Api} from './api'; describe('Api Service', () => { beforeEachProviders(() => [Api]); it('should ...', inject([Api], (api:Api) => { expect(api.title).to...
})); });
<|file_name|>lib.in.rs<|end_file_name|><|fim▁begin|>#[cfg(not(feature = "sqlite"))] mod annotations; mod deserialization; mod insert; mod schema;<|fim▁hole|><|fim▁end|>
mod update;
<|file_name|>api.py<|end_file_name|><|fim▁begin|><|fim▁hole|># proxy module from __future__ import absolute_import from mayavi.core.api import *<|fim▁end|>
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from decimal import Decimal from django.http import HttpResponse, HttpRequest from django.conf import settings from django.conf.urls import patterns, include, url from django.core.urlresolvers import reverse from django.test import TestCase, Cli...
assertRedirects(view(request, order_token=order.token), reverse('satchless-checkout-confirmation', args=(order.token,)))
<|file_name|>toggle_markup.java<|end_file_name|><|fim▁begin|>package com.actelion.research.orbit.imageAnalysis.components.icons; import java.awt.*; import java.awt.geom.*; import java.awt.image.BufferedImage; import java.io.*; import java.lang.ref.WeakReference; import java.util.Base64; import java.util.Stack; import ...
<|file_name|>UART01.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # uart-eg01.py # # to run on the other end of the UART # screen /dev/ttyUSB1 115200 import serial def readlineCR(uart): line = b'' while True: byte = uart.read() line += byte if byte == b'\r': return line uart = serial.Serial('/dev/ttyU...
if line != b'exit\r':
<|file_name|>test_layout_objects.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.template import Context from django.utils.translation import ugettext as _ from django.utils.translation import activate, deactivate from .compatibilit...
def test_alert(self):
<|file_name|>parseOptions.py<|end_file_name|><|fim▁begin|>from modules.Utils import runCommand import re import sys def parseOptions(command): so, se, rc = runCommand("gofed %s --help" % command) if rc != 0: return [] options = [] option_f = False for line in so.split("\n"): if line == "Options:": option_...
line = line.strip() parts = line.split(' ')[0].split(',')