prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>print_table.rs<|end_file_name|><|fim▁begin|>use itertools::*; use std::cmp::max; use std::fmt::{self, Debug, Formatter}; pub fn debug_table<A, B, C, D, E, F, G>(name: A, column_names: B, column_alignments: D, ...
G: Into<String> {
<|file_name|>RegisteredDriverImpl.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2011 Prashant Dighe * * 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, inclu...
private String _name = null; private int _age = 0;
<|file_name|>format.py<|end_file_name|><|fim▁begin|>import my_data_file d = my_data_file.my_data <|fim▁hole|>print "Hello my name is %s and i am %d years of age and my coolnes is %d " % (d [ 'naam' ], d [ 'age' ], d ['coolheid'])<|fim▁end|>
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>/* > ++ptr; < --ptr; + ++*ptr; - --*ptr; . putchar(*ptr); , *ptr = getchar(); [ while (*ptr) { ] } */ use std::os; extern { fn getchar() -> i8; } fn get_val_of_ptr(val: &Vec<i8>, ptr: uint) -> i8 { if ptr < val.len() { ...
for state in states.iter() { if state.from == index {
<|file_name|>dashboard-controller.js<|end_file_name|><|fim▁begin|>function DashboardController($scope, $state, $stateParams, dashboardFactory) { var dc = this; dc.playerStats = {}; dc.itemForAuction = {}; dc.auctionStarted = false; // Called on page load to retrieve player data dashboardFactor...
dc.playerStats = res.data; }); }
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for auth_example project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands ...
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "auth_example.settings") # This application object is used by any WSGI server configured to use this
<|file_name|>io.go<|end_file_name|><|fim▁begin|>package file <|fim▁hole|> // CreateAndWrite creates a file called "name" (or overwrites if it already existed), reads all of r into the file, then closes the file. Returns any errors encountered along the way. func CreateAndWrite(name string, r io.Reader) error { fd, err...
import ( "io" "os" )
<|file_name|>rssso2015schedule.py<|end_file_name|><|fim▁begin|>#!/usr/local/lib/python2.7.10/bin/python # -*- coding: utf-8 -*- """ Created on Sun Aug 09 13:15:13 2015 @author: Vedran Fetching a schedule from Google Docs, extracting information, converting to pdf and sending via e-mail. Copyright (C) 2015 V...
# schedule for the chosen date. # # PARAMETERS: # html - The string containing the conent of a html file derived from the
<|file_name|>key.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this...
callback will be called during the file transfer.
<|file_name|>meg.rs<|end_file_name|><|fim▁begin|>extern crate env_logger; extern crate rustc_serialize; extern crate toml; extern crate turbo; extern crate meg; extern crate term_painter; #[macro_use] extern crate log; use std::collections::BTreeSet; use std::env; use std::fs; use std::io; use std::path::{PathBuf, Pa...
let dirs = list_command_directory(); let mut command_paths = dirs.iter().map(|dir| dir.join(&command_exe)); command_paths.find(|path| fs::metadata(&path).is_ok()) }
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># Author: Martin Oehler <oehler@knopper.net> 2013 # License: GPL V2 from django.forms import ModelForm from django.forms import Form from django.forms import ModelChoiceField from django.forms.widgets import RadioSelect from django.forms.widgets import CheckboxSelect...
from linboweb.linboserver.models import partition from linboweb.linboserver.models import partitionSelection from linboweb.linboserver.models import os from linboweb.linboserver.models import vm
<|file_name|>checkpoint.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unl...
// Delimiter used on checkpoints written to disk
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Entity Component System Library (ECS) //! //! For info about why an ECS may be beneficial, see some of these articles: //! //! - http://gameprogrammingpatterns.com/component.html //! - http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-de...
none: [] )
<|file_name|>ask.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnChanges, Input, Output, EventEmitter } from "ng-metadata/core" @Component({ selector: "ask-cmp", template: require('./askCmp.html') //WEBPACK MAGIC INLINE HTML }) export class AskComponent implements OnChanges { constructor()...
<|file_name|>_ticktextsrc.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class TicktextsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="ticktextsrc", parent_name="layout.xaxis", **kwargs): super(TicktextsrcValidator, self).__init__( ...
)
<|file_name|>10926.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h> using namespace std; vector<int> adj[143]; int n; bool seen[143]; int dfs(int u) { seen[u] = true; int result = 0; for (int v: adj[u]) if (!seen[v]) result += dfs(v) + 1; return result; } int main() { ...
<|file_name|>liquidwrapper.rs<|end_file_name|><|fim▁begin|>extern crate liquid; use std::fs::File; use std::io::Read; use templatewrapper::TemplateWrapper; pub struct LiquidTemplate { template: String,<|fim▁hole|>} impl TemplateWrapper for LiquidTemplate { fn new(template_file: String) -> LiquidTemplate { ...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>macro_rules! timeit { ($func:expr) => ({ let t1 = std::time::Instant::now(); println!("{:?}", $func); let t2 = std::time::Instant::now().duration_since(t1); println!("{}", t2.as_secs() as f64 + t2.subsec_nanos() as f64 / 1000000000.00...
<|file_name|>R114.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gener...
0.107938879710e1, -0.199243619673e1, -0.155135133506, -0.121465790553, -0.165038582393e-1, -0.186915808643, 0.308074612567, 0.115861416115, 0.276358316589e-1,
<|file_name|>tcp.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...
let (port, chan) = Chan::new(); do spawn {
<|file_name|>AndToOr.java<|end_file_name|><|fim▁begin|>package fmautorepair.mutationoperators.features; import org.apache.log4j.Logger; import de.ovgu.featureide.fm.core.Feature; import de.ovgu.featureide.fm.core.FeatureModel; import fmautorepair.mutationoperators.FMMutator; /** transform And to or */ public class A...
<|file_name|>IParser.d.ts<|end_file_name|><|fim▁begin|>/** * Namespace of the jquery-scope-watch. * @namespace */<|fim▁hole|> /** * Parser instance * @interface */ interface IParser { /** * Return result that parse expression. * @param {Scope} scope * @return {*} parse result */ ...
declare module scope {
<|file_name|>ja.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { "A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": 'この地域を地理的に指定するロケーション。これはロケーションの階層構造のうちの一つか、ロケーショングループの一...
'Received Shipment canceled': '受け取った輸送をキャンセルしました', 'Received Shipment updated': '受領済みの配送物の情報が更新されました', 'Received Shipments': '受諾した輸送物資',
<|file_name|>sites.py<|end_file_name|><|fim▁begin|>from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth import logout as auth_logout, REDIREC...
You'll want to use this from within ``AdminSite.get_urls()``:
<|file_name|>main_design.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'main.ui' # # Created by: PyQt4 UI code generator 4.12.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.f...
self.gridLayout_7.setObjectName(_fromUtf8("gridLayout_7"))
<|file_name|>snow.js<|end_file_name|><|fim▁begin|>(function () { var g = void 0, k = !0, m = null, o = !1, p, q = this, r = function (a) { var b = typeof a; if ("object" == b) if (a) { if (a instanceof Array) return "array"; ...
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>use ::NailResult; use regex::Regex; use ssh::KeyExchangeInit; use std::fmt; pub enum CipherBlockSize { Eight, Sixteen, } impl From<u8> for CipherBlockSize { fn from(v: u8) -> CipherBlockSize { match v { 16 => CipherBlockSize::Sixteen, ...
<|file_name|>docserver.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import flask import os import threading import time import webbrowser from tornado.wsgi import WSGIContainer from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop _basedir = os.path.join("..", os.path...
app = flask.Flask(__name__, static_path="/unused")
<|file_name|>org-edit.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('BaubleApp') .controller('OrgEditCtrl', ['$scope', '$location', 'Alert', 'User', 'Organization', function ($scope, $location, Alert, User, Organization) {<|fim▁hole|> Organization.save(org) .success(func...
$scope.save = function(org){ $scope.working = true;
<|file_name|>saveRetrospectiveSurveyResponses.test.js<|end_file_name|><|fim▁begin|>/* eslint-env mocha */ /* global expect, testContext */ /* eslint-disable prefer-arrow-callback, no-unused-expressions */ import factory from 'src/test/factories' import {resetDB, runGraphQLMutation, useFixture} from 'src/test/helpers' i...
it('returns new response ids for all responses created in COMPLETE state', async function () { await Cycle.get(this.cycleId).updateWithTimestamp({state: COMPLETE}) return this.invokeAPI()
<|file_name|>iconhead_plugin.js<|end_file_name|><|fim▁begin|>var iconhead={ title:"Icon Heading Shortcode", id :'oscitas-form-iconhead', pluginName: 'iconhead', setRowColors:false }; (function() { _create_tinyMCE_options(iconhead,800); })(); function create_oscitas_iconhead(pluginObj){ if(jQu...
<tr>\ <th><label for="oscitas-iconhead-heading">Heading:</label></th>\
<|file_name|>access_q_fail.cpp<|end_file_name|><|fim▁begin|>//Copyright (c) 2008-2010 Emil Dotchevski and Reverge Studios, Inc. //Distributed under the Boost Software License, Version 1.0. (See accompanying //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/qvm/q_access.hpp> ...
#include <boost/qvm/v_access.hpp> struct my_quat { };
<|file_name|>839_similar-string-groups.py<|end_file_name|><|fim▁begin|>import collections class Solution: def numSimilarGroups(self, A): UF = {} for i in range(len(A)): UF[i] = i def find(x): if x != UF[x]: UF[x] = find(UF[x]) return UF[x] def ...
while i<len(s1): if s1[i] != s2[i]: if j == -1: j = i else: break
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include "version.h" #include <boost/filesystem/operations.hpp> #include <iostream> #define PCRE2_CODE_UNIT_WIDTH 8 #include <pcre2.h> #include "file.h" #include "options.h" #include "parser.h" using namespace boost::filesystem; using namespace std; int errorcode; ...
pcre2_match_data *match_data = pcre2_match_data_create_from_pattern(linePattern, nullptr); auto rc = 0;
<|file_name|>individual.py<|end_file_name|><|fim▁begin|>import logging from ..report.individual import IndividualReport <|fim▁hole|> def __init__(self, test): self.test = test async def generate(self, parent): test_group = None try: test_group = self.test(parent.filename) except OSError as e:...
class IndividualGenerator(object): logger = logging.getLogger("ddvt.rep_gen.ind")
<|file_name|>transparent.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3 # This work is licensed under the Creative Commons Attribution 3.0 United # States License. To view a copy of this license, visit # http://creativecommons.org/licenses/by/3.0/us/ or send a letter to Creative # Commons, 171 Second Stree...
<|file_name|>discovery_tests.py<|end_file_name|><|fim▁begin|>from proboscis import test @test(groups=['benchmark.discovery']) class BenchmarkDiscoveryTests(object): def __init__(self):<|fim▁hole|><|fim▁end|>
pass
<|file_name|>Rgaa30Rule120401.java<|end_file_name|><|fim▁begin|>/* * Asqatasun - Automated webpage assessment * Copyright (C) 2008-2019 Asqatasun.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free S...
import org.asqatasun.ruleimplementation.AbstractNotTestedRuleImplementation;
<|file_name|>testMixin.js<|end_file_name|><|fim▁begin|>'use strict'; function A() { this._va = 0; console.log('A'); } A.prototype = { va: 1, fa: function() { console.log('A->fa()'); } }; function B() { this._vb = 0; console.log('B'); } B.prototype = { vb: 1, fb: function() { console.log('B->...
} C.prototype = { vc: 1,
<|file_name|>helpers.js<|end_file_name|><|fim▁begin|>'use strict'; // Load modules const i18n = require('../services/i18n'); const fs = require('fs'); var dateFormat = require('dateformat'); const Remarkable = require('remarkable'); const path = require('path'); const logger = require('../services/logger'); const conf...
// Setup const md = new Remarkable({ html: true });
<|file_name|>BaseBlockNode.js<|end_file_name|><|fim▁begin|>import BaseStatementNode from './BaseStatementNode'; import * as symbols from '../symbols'; export default class BaseBlockNode extends BaseStatementNode { packBlock(bitstr, propName) { var prop = this[propName] if (!prop) { bit...
return;
<|file_name|>test_rfxtrx.py<|end_file_name|><|fim▁begin|>"""Th tests for the Rfxtrx component.""" # pylint: disable=too-many-public-methods,protected-access import unittest import time from homeassistant.bootstrap import _setup_component from homeassistant.components import rfxtrx as rfxtrx from tests.common import ge...
while len(rfxtrx.RFX_DEVICES) < 1:
<|file_name|>SingleUrlResponseCache.java<|end_file_name|><|fim▁begin|>package org.fakekoji.xmlrpc.server.expensiveobjectscache; import org.fakekoji.xmlrpc.server.xmlrpcrequestparams.XmlRpcRequestParams; import java.io.BufferedWriter; import java.io.IOException; import java.lang.reflect.Array; import java.lang.reflect...
private static String asMinutes(long l) {
<|file_name|>mpqfile.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2014 MaNGOS <http://getmangos.com/> * * 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 3 of the...
return; }
<|file_name|>gatsby-node.js<|end_file_name|><|fim▁begin|>const path = require(`path`) const chunk = require(`lodash/chunk`) // This is a simple debugging tool // dd() will prettily dump to the terminal and kill the process // const { dd } = require(`dumper.js`) /** * exports.createPages is a built-in Gatsby Node API...
/**
<|file_name|>Value.java<|end_file_name|><|fim▁begin|>package com.planet_ink.coffee_mud.Commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.plan...
}
<|file_name|>PackageVariable.py<|end_file_name|><|fim▁begin|>"""engine.SCons.Variables.PackageVariable This file defines the option type for SCons implementing 'package activation'. To be used whenever a 'package' may be enabled/disabled and the package path may be specified. Usage example: Examples: x11=no...
... build with x11 ...
<|file_name|>MemberDetailsRedirectView.py<|end_file_name|><|fim▁begin|>from django.views.decorators.cache import never_cache from django.views.generic.base import RedirectView from C4CApplication.views.utils import create_user class MemberDetailsRedirectView(RedirectView): url = "" connec...
<|file_name|>home.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.scss']<|fim▁hole|> constructor() { } ngOnInit(): void { // } }<|fim▁end|...
}) export class HomeComponent implements OnInit {
<|file_name|>proc_005.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 from taptaptap.proc import plan, ok, not_ok, out plan(first=1, last=13)<|fim▁hole|>ok('Starting the engine') ok('Find the object') ok('Grab it', todo=True) ok('Use it', todo=True) 2 * 2 == 4 and ok('2 * 2 == 4') or not_ok('2 * 2 != 4') out...
ok('Starting the program')
<|file_name|>bitstreamTest.cc<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011 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 property rights...
const uint16_t maxBitrateLayer[numberOfLayers]= {BitRateBPSInv(150000),
<|file_name|>CSSDocumentRangFormatProvider.ts<|end_file_name|><|fim▁begin|>import { TextDocument, DocumentFormattingEditProvider, DocumentRangeFormattingEditProvider, FormattingOptions, CancellationToken, TextEdit, ExtensionContext, TextEditor, commands, window, DocumentSelector, languages, Position, Range ...
let originText = document.getText(range); let formattedText: string = this.format.css(originText, options);
<|file_name|>angular-schema-form-download.js<|end_file_name|><|fim▁begin|>angular.module('schemaForm').config( ['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider', function(schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider) { var download = function(name, schem...
schemaFormDecoratorsProvider.addMapping( 'bootstrapDecorator',
<|file_name|>const.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//- @FOO defines/binding SFOO //- SFoo.node/kind constant const FOO: &'static str = "hi"; fn foo() { //- @FOO ref SFOO FOO; }<|fim▁end|>
<|file_name|>removal.js<|end_file_name|><|fim▁begin|>// This file contains methods responsible for removing a node. import { hooks } from "./lib/removal-hooks"; export function remove() { this._assertUnremoved(); this.resync(); if (this._callRemovalHooks()) { this._markRemoved(); return; }<|fim▁hole...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from investor_lifespan_model.investor import Investor<|fim▁hole|>from investor_lifespan_model.lifespan_model import LifespanModel from investor_lifespan_model.mortality_data import π, G, tf<|fim▁end|>
from investor_lifespan_model.market import Market from investor_lifespan_model.insurer import Insurer
<|file_name|>versions_repository.py<|end_file_name|><|fim▁begin|>import logging import os from lib import exception from lib import repository from lib.constants import REPOSITORIES_DIR LOG = logging.getLogger(__name__) def get_versions_repository(config): """ Get the packages metadata Git repository, clon...
return version_milestone
<|file_name|>ActionCheckerService.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010 Yahoo! Inc. All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
<|file_name|>require.d.ts<|end_file_name|><|fim▁begin|>/* require-2.1.5.d.ts may be freely distributed under the MIT license. Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/require.d.ts Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated doc...
* Configure require.js **/ config(config: RequireConfig): Require;
<|file_name|>test_ppsread.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2013 Adam.Dybbroe # Author(s): # Adam.Dybbroe <a000680@c14526.ad.smhi.se> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
<|file_name|>SummonCommand.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package dualcraft.org.server.classic.cmd.impl; /*License ==================== Copyright (c) 2010-2012 Daniel Vidmar We use a modified GNU gpl v 3 license for this. GNU gpl v 3 is included in License.txt The modified part of the license is some...
<|file_name|>WMLInputElement.cpp<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by...
}
<|file_name|>utils.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 rustc::front::map as ast_map; use rustc::lint::LateContext;...
<|file_name|>camera.py<|end_file_name|><|fim▁begin|>"""This component provides support to the Ring Door Bell camera.""" import asyncio from datetime import timedelta import logging import voluptuous as vol from homeassistant.components.camera import PLATFORM_SCHEMA, Camera from homeassistant.components.ffmpeg import ...
try: stream_reader = await stream.get_reader() return await async_aiohttp_proxy_stream(
<|file_name|>Dropdown.Props.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var DropdownMenuItemType;<|fim▁hole|> DropdownMenuItemType[DropdownMenuItemType["Header"] = 2] = "Header"; })(DropdownMenuItemType = exports.DropdownMenuItemType || (exports.Dropdo...
(function (DropdownMenuItemType) { DropdownMenuItemType[DropdownMenuItemType["Normal"] = 0] = "Normal"; DropdownMenuItemType[DropdownMenuItemType["Divider"] = 1] = "Divider";
<|file_name|>test_sample_app.py<|end_file_name|><|fim▁begin|>import asyncio import random import names from chilero.web.test import asynctest from chilero.pg import Resource from chilero.pg.test import TestCase, TEST_DB_SUFFIX import json class Friends(Resource): order_by = 'name ASC' search_fields = ['name...
def serialize_list_object(self, row): return dict(
<|file_name|>dohtml.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # # Typical usage: # dohtml -r docs/* # - put all files and directories in docs into /usr/share/doc/${PF}/html # dohtml foo.html # - put foo...
<|file_name|>constants.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation. # 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 # ...
# L3 Protocol name constants TCP = "tcp" UDP = "udp"
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::process::Command; use std::env; fn main() { let curr_dir = env::current_dir().unwrap();<|fim▁hole|> .current_dir(&curr_dir).status().unwrap(); #[cfg(target_os="windows")] println!("cargo:rustc-flags=-L C:\\msys64\\mingw64\\lib"); }<|fim▁end...
Command::new("git").arg("submodule").arg("update").arg("--init")
<|file_name|>test_collection_times.py<|end_file_name|><|fim▁begin|>from concurrency.get_websites import get_number_of_links import time # Run get_number_of_links and compare it to a serial version # stub out load_url with a sleep function so the time is always the same # Show that the concurrent version takes less tim...
get_number_of_links_serial(self.fake_urls) serial_total = time.time() - serial_start print("Concurrent collection: {}".format(concurrent_total))
<|file_name|>Strings.js<|end_file_name|><|fim▁begin|>// @flow import compose from 'ramda/src/compose'; import contains from 'ramda/src/contains'; import curry from 'ramda/src/curry'; import curryN from 'ramda/src/curryN'; import pipe from 'ramda/src/pipe'; import props from 'ramda/src/props'; import uniq from 'ramda/s...
if (hasAlpha(format)) { pairs = [r, g, b, alpha].map(toHex); } else { pairs = [r, g, b].map(toHex);
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from . import views <|fim▁hole|> url(r'^candidate/$', views.candidate), ]<|fim▁end|>
urlpatterns = [ url(r'^$', views.home), url(r'^interviewer/$', views.interviewer),
<|file_name|>ContainerConstants.java<|end_file_name|><|fim▁begin|>package org.vitanov.container; public class ContainerConstants { <|fim▁hole|> System.getProperty("user.dir"); }<|fim▁end|>
public static String CONTAINER_ROOT_PATH =
<|file_name|>files_70.js<|end_file_name|><|fim▁begin|>var searchData= [ ['parser_2ecpp',['Parser.cpp',['../_parser_8cpp.html',1,'']]], ['parser_2eh',['Parser.h',['../_parser_8h.html',1,'']]], ['parsercollision_2ecpp',['ParserCollision.cpp',['../_parser_collision_8cpp.html',1,'']]], ['parsercollision_2eh',['Pars...
['physicalworld_2eh',['PhysicalWorld.h',['../_physical_world_8h.html',1,'']]],
<|file_name|>usernav.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input } from '@angular/core'; import { Router, ActivatedRoute, Params } from '@angular/router';<|fim▁hole|>import { Auth } from '../.././shared-services/authorization/auth.service'; @Component({ selector: 'user-top-nav', tem...
<|file_name|>ReactMultiChild.js<|end_file_name|><|fim▁begin|>/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in t...
updateQueue.push({
<|file_name|>util.js<|end_file_name|><|fim▁begin|>'use strict'; var assert = require('assert'); var fixtures = require('../fixtures'); var sharp = require('../../index'); var defaultConcurrency = sharp.concurrency(); describe('Utilities', function() { describe('Cache', function() { it('Can be disabled', funct...
describe('Concurrency', function() { it('Can be set to use 16 threads', function() { sharp.concurrency(16);
<|file_name|>vectors.rs<|end_file_name|><|fim▁begin|>// Lumol, an extensible molecular simulation engine // Copyright (C) 2015-2016 Lumol's contributors — BSD license //! 3-dimensional vector type use std::ops::{Add, Sub, Neg, Mul, Div, BitXor, Index, IndexMut}; use std::ops::{AddAssign, SubAssign, MulAssign, DivAssig...
Vector3D::new(self[0] - other[0], self[1] - other[1], self[2] - other[2]) );
<|file_name|>provider_test.go<|end_file_name|><|fim▁begin|>package provider import ( "io/ioutil" "os" "strings" "testing" "text/template" "github.com/containous/traefik/types" ) type myProvider struct { BaseProvider TLS *ClientTLS } func (p *myProvider) Foo() string { return "bar" } func TestConfiguration...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>"""Tests for the nut integration.""" import json from unittest.mock import MagicMock, patch from homeassistant.components.nut.const import DOMAIN from homeassistant.const import CONF_HOST, CONF_PORT, CONF_RESOURCES from homeassistant.core import HomeAssistant from te...
return pynutclient
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # powerschool_apps documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in thi...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2007-2016 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with HyperSpy. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>RandomPermutationChooser.cc<|end_file_name|><|fim▁begin|>// $Id$ /* Copyright (C) 2004-2006 John B. Shumway, Jr. 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 versi...
for (int jfrom=0; jfrom<=ifrom; ++jfrom) {
<|file_name|>spec.js<|end_file_name|><|fim▁begin|>var doxygen = require("../lib/nodeDoxygen"); var rimraf = require("rimraf"); var exec = require("child_process").execSync; /*describe("Download:", function () { beforeEach(function (done) { rimraf("dist", function (error) { if (error) { ...
<|file_name|>filters.js<|end_file_name|><|fim▁begin|>import { put, select, takeEvery } from 'redux-saga/effects' import { getQuotes } from './quotes' import { has, toArray } from 'lodash' import { createAuthor, removeAuthor, updateAuthor } from "./authors"; import { createCategory, removeCategory, updateCategory } from...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Landlab component that simulates relative incidence shortwave radiation on sloped surface. Landlab component that computes 1D and 2D total incident shortwave radiation. This code also computes relative incidence shortwave radiation compared to a flat surface. Re...
<|file_name|>carbon-components-tests.ts<|end_file_name|><|fim▁begin|>import { Accordion, Checkbox, CodeSnippet, ContentSwitcher, CopyButton, DataTable, DataTableV2, DatePicker, Dropdown, FileUploader, FloatingMenu, HeaderNav, HeaderSubmenu, InlineLoading, Load...
const accordion = new Accordion(document.getElementById('root')!, { selectorAccordionContent: '' }); accordion._checkIfButton();
<|file_name|>ServletLocaleFilterTests.java<|end_file_name|><|fim▁begin|>package com.teamunify.i18n.com.teamunify.i18n.webapp; import com.teamunify.i18n.I; import com.teamunify.i18n.webapp.AbstractLocaleFilter; import org.junit.Before; import org.junit.Test; import static junit.framework.Assert.*; import static org.mo...
@Test public void uses_the_computed_locale_if_available() throws IOException, ServletException { computedLocale = Locale.CHINA;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # Copyright (C) 2015 - 2019 Lionel Ott # # 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 3 of the L...
self.action_sets = [[], []]
<|file_name|>COLT2015.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ This file is used to make a crawl """ import __init__ import os import re import urllib from utility import prgbar def get_html(url): """Get the html """ page = urllib.urlopen(url) html = page.read() return html <|fim▁hole|>def ...
<|file_name|>PLSVM.py<|end_file_name|><|fim▁begin|>from __future__ import division __author__ = 'wenqihe' import sys import random<|fim▁hole|> def __init__(self, feature_size, label_size, type_hierarchy, lambda_reg=0.1, max_iter=5000, threshold=0.5, batch_size=100): self._feature_size = feature_size ...
import math class PLSVM:
<|file_name|>test_manager.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 required by applicable l...
<|file_name|>0013_auto_20180305_1339.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2018-03-05 05:39 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|> dependencies = [ ('sponsors', '0012_sponsor_level_smallint'), ] ...
class Migration(migrations.Migration):
<|file_name|>configureUrlQuery-test.js<|end_file_name|><|fim▁begin|>import configureUrlQuery from '../configureUrlQuery';<|fim▁hole|>import urlQueryConfig from '../urlQueryConfig'; it('updates the singleton query object', () => { configureUrlQuery({ test: 99 }); expect(urlQueryConfig.test).toBe(99); configureUr...
<|file_name|>Model.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <vector> #ifdef __APPLE__ #include <OpenGL/gl3.h> #else #include <GL/glew.h> #endif #include <FLIGHT/Core/BB.hpp> #include "Shader.hpp" #include "Vertex.hpp" #include <array> #include <fstream> #include <iostream> #include <memory> #include <sst...
static std::shared_ptr<Model> LoadFromWavefront(std::fstream &);
<|file_name|>passphrase_recover.go<|end_file_name|><|fim▁begin|>// Copyright 2019 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package engine import ( "fmt" "sort" "github.com/keybase/client/go/kbun" "github.com/keybase/client/go/libkb" keybase1 "github....
Endpoint: "send-reset-pw", SessionType: libkb.APISessionTypeNONE,
<|file_name|>LogFileAccessManager.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ ############################################################################################# #<|fim▁hole|># Name: LogFileAccessManager.py # # @author: Nicholas Lemay # # @license: MetPX Copyright (C) 2004-2006 Environment Can...
#
<|file_name|>test_leave_period.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import unittest import frappe import erpnext test_dependencies = ["Employee", "Leave Type", "Leave Policy"] class TestLeavePeriod(unittest.TestCase): pass def crea...
leave_period = frappe.get_doc({ "doctype": "Leave Period",
<|file_name|>selectssperspective.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2009 * Jan-Felix Schwarz * * 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...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>registry = {} def register(model, fields, order='pk', filter=False, results=5): registry[str(model)] = (model, fields, results, order, filter)<|fim▁hole|>class LoopBreak(Exception): pass def search_for_string(search_string): search_string = search_string.l...