prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>hi-IN.js<|end_file_name|><|fim▁begin|>/* * World Calendars * https://github.com/alexcjohnson/world-calendars * * Batch-converted from kbwood/calendars * Many thanks to Keith Wood and all of the contributors to the original project! * * This source code is licensed under the MIT license found in the ...
digits: null,
<|file_name|>commentbox.js<|end_file_name|><|fim▁begin|>goog.provide('glift.displays.commentbox');<|fim▁hole|><|fim▁end|>
glift.displays.commentbox = {};
<|file_name|>test_snapshots.py<|end_file_name|><|fim▁begin|># Copyright 2011 Denali Systems, 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 # # h...
displayName='snap_name', displayDescription='snap_desc',
<|file_name|>sbac_featured_content.js<|end_file_name|><|fim▁begin|>(function ($) { Drupal.behaviors.sbac_featured_content = { attach: function (context, settings) {<|fim▁hole|> window.location = '/' + $(this).attr('url'); }); } }; })(jQuery);<|fim▁end|>
// If JS is working, turn cursor into a pointer and redirect on click $('.featured-content-inner').css( 'cursor', 'pointer' ); $('.featured-content-inner').click(function(){
<|file_name|>loadbalanceroutboundrules.go<|end_file_name|><|fim▁begin|>package network // Copyright (c) Microsoft and contributors. 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...
}() } result.fn = client.listNextResults
<|file_name|>restricted_from_invalid.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def usage(): print "%s WORK_DIR [num_results]" % sys.argv[0] sys.exit(1) try: work_dir = sys.argv[1] except: print "you must specify your DenyHosts WORK_DIR" usage() try: num = int(sys.argv[2]) except: num =...
#!/bin/env python import os, sys
<|file_name|>AccountDaoImpl.java<|end_file_name|><|fim▁begin|>package io.cattle.platform.process.dao.impl; import static io.cattle.platform.core.model.tables.AccountTable.*; import io.cattle.platform.core.model.Account; import io.cattle.platform.db.jooq.dao.impl.AbstractJooqDao; import io.cattle.platform.process.dao.A...
} }
<|file_name|>createHashHistory.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
import { HistoryOptions, History } from '../index'; export default function createHashHistory(options?: HistoryOptions): History;
<|file_name|>forms.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 appl...
PROPERTY_TYPES = {'min_disk': long, 'min_ram': long, 'protected': str2bool} def convert_value(key, value):
<|file_name|>dylan.js<|end_file_name|><|fim▁begin|>// CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: http://codemirror.net/LICENSE (function (mod) { if (typeof exports == "object" && typeof module == "object") // CommonJS mod(require("../../lib/codemirror")); ...
function tokenBase(stream, state) { // String
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"""Top-level module for releng-sop."""
<|file_name|>util.ts<|end_file_name|><|fim▁begin|>import { EditorState } from 'prosemirror-state'; import { EditorView } from 'prosemirror-view'; import { CommandStateBuilder, SchemaType, CreateToggleOptions, ToggleOptions, CommandSpec,<|fim▁hole|>export const createCommandSpec = (builder: CommandStateBuilder): Co...
} from './types';
<|file_name|>f13.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<|fim▁hole|>// <LICENSE-MIT or http:/...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" """ from .register import get_registered_layers #custom layer import begins import axpy import flatten<|fim▁hole|>import priorbox import permute import detection_out import normalize import select import crop import reduction #custom layer import ends custom...
import argmax import reshape import roipooling
<|file_name|>AbstractAmazonPollyAsync.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License is l...
<|file_name|>support.js<|end_file_name|><|fim▁begin|>module("support", {teardown: moduleTeardown}); var computedSupport = getComputedSupport(jQuery.support); function getComputedSupport(support) { var prop, result = {}; for (prop in support) { if (typeof support[prop] === "function") { ...
};
<|file_name|>message_queue.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.org/l...
// except according to those terms.
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>__author__ = 'alberto' import time from functools import wraps from config import logger <|fim▁hole|> """ @wraps(func) def wrapper(*args, **kwargs): logger.info("Running %s", func.__name__) start = time.time() result = func(*args, ...
def measure_time(func): """ Decorator that reports the execution time.
<|file_name|>womprat.py<|end_file_name|><|fim▁begin|>import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType<|fim▁hole|> def addTemplate(core): mobileTemplate = MobileTemplate() mobileTemplate.setCreatureName('womprat') mobileTempla...
from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>class JoommfError(Exception):<|fim▁hole|><|fim▁end|>
pass
<|file_name|>photostack.js<|end_file_name|><|fim▁begin|>/*jshint browser: true, strict: true, undef: true */ /*global define: false */ ( function( window ) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg( className ) { return new RegExp("(^|\\s+)" + className...
if (pair.length < 2) {
<|file_name|>defaults.d.ts<|end_file_name|><|fim▁begin|>import * as strategies from "./strategies" export declare const defaults : { labels: string, css: { [key: string]: string }, strategies: { selection: Array<string | strategies.selectionStrategy<any>> click: Array<string | strateg...
openerOpts: { position?: "none" | "left" | "right" }, draggable: boolean, dragndrop: {
<|file_name|>http-request.service.ts<|end_file_name|><|fim▁begin|>import { Http, Headers, Response, RequestOptions } from '@angular/http'; import { Injectable, Inject } from '@angular/core'; import { DefaultRequest } from '../models/default-request.model' import { Observable } from 'rxjs'; import 'rxjs/add/operator/m...
.catch(this.error); }
<|file_name|>PresenceArrivalConditionClassTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2015 Whizzo Software, LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the E...
values );
<|file_name|>angular-locale_en-fk.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); ret...
"posPre": "",
<|file_name|>0056_v350_custom_venv_history.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-22 22:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration):<|fim▁hole|> dependencies = [ ('main'...
<|file_name|>workload.go<|end_file_name|><|fim▁begin|>/* Copyright AppsCode Inc. and Contributors 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...
return appName + "-" + podOrdinal, nil }
<|file_name|>ixlib_random.hh<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
#include <ixlib_random.hpp>
<|file_name|>sorting.rs<|end_file_name|><|fim▁begin|>use std::cmp::Ordering; pub enum SortingAlgorithmn { Bubble, Quick } pub trait Sort { fn adv_sort_mut(&mut self, algo: SortingAlgorithmn); } pub trait SortBy<T: PartialOrd, F: FnMut(&T, &T) -> Ordering> { fn adv_sort_by_mut(&mut self, compare...
} } }
<|file_name|>XMLParser.java<|end_file_name|><|fim▁begin|>/* * Copyright 2008 Google 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....
} /**
<|file_name|>pygtkcompat.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2011-2012 Johan Dahlin <johan@gnome.org> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General ...
self.base = BaseGetter(context) self.black = Gdk.Color(red=0, green=0, blue=0) class StyleDescriptor(object):
<|file_name|>tellstick.py<|end_file_name|><|fim▁begin|>""" Support for Tellstick lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.tellstick/ """ from homeassistant.components import tellstick from homeassistant.components.light import ATTR_BR...
def turn_on(self, **kwargs): """Turn the switch on."""
<|file_name|>recomendaciones.component.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> selector: "recomendaciones", templateUrl: "app/components/htmls/recomendacionesysugerencias/recomendaciones.html", styleUrls: ["app/components/htmls/htmlStyles.css"] }) export class RecomendacionesComponent {};<|fim▁end|>
import {Component} from '@angular/core'; @Component({
<|file_name|>nuctranslationmap.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # ...
You can specify all parameters while calling this methods. A special argument named `data` will enable you to load the object from a Python dictionary
<|file_name|>demangle.hpp<|end_file_name|><|fim▁begin|>// The MIT License (MIT) // Copyright (c) 2013-2016 Rapptz, ThePhD and contributors // 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 Softwar...
template <typename T> inline std::string ctti_get_type_name() { const static std::array<std::string, 7> removals = { { "public:", "private:", "protected:", "struct ", "class ", "`anonymous-namespace'", "`anonymous namespace'" } }; std::string name = __FUNCSIG__;
<|file_name|>test_admin.py<|end_file_name|><|fim▁begin|>from aiohttp import ClientSession from aiowing import settings async def test_unauthenticated_records(test_app, test_client): cli = await test_client(test_app) resp = await cli.get(test_app.router['admin_records'].url(), allow_r...
resp = await cli.get(test_app.router['admin_logout'].url(), allow_redirects=False) assert resp.headers.get('Location') == test_app.router['admin_login'].url() await resp.release()
<|file_name|>Benchmarks.java<|end_file_name|><|fim▁begin|>package org.jabref.benchmarks; import java.io.IOException; import java.io.StringReader; import java.util.List; import java.util.Random; import java.util.stream.Collectors; import org.jabref.Globals; import org.jabref.logic.exporter.BibtexDatabaseWriter; import...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = { normalizeEntityName: function() {}, <|fim▁hole|>};<|fim▁end|>
afterInstall: function() { this.addBowerPackageToProject('jsoneditor'); }
<|file_name|>Inner.js<|end_file_name|><|fim▁begin|>import PropTypes from 'prop-types'; import React from 'react'; import moment from 'moment'; import { withStyles } from 'material-ui/styles'; import IconButton from 'material-ui/IconButton'; import CloseIcon from 'material-ui-icons/Close'; import InfoIcon from 'material...
</ToolBoxSection> <ActionSection>
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|>from ...plugin import hookimpl from ..custom import CustomBuilder<|fim▁hole|> @hookimpl def hatch_register_builder(): return [CustomBuilder, SdistBuilder, WheelBuilder]<|fim▁end|>
from ..sdist import SdistBuilder from ..wheel import WheelBuilder
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Helpful routines for regression testing.""" from bas...
if num_matched == 0 and not should_not_find: raise AssertionError("No objects matched %s" % (str(to_match))) if num_matched > 0 and should_not_find:
<|file_name|>support_standard.hpp<|end_file_name|><|fim▁begin|>/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Copyright (c) 2001-2011 Hartmut Kaiser http://spirit.sourceforge.net/ Distributed under the Boost Software License, Versi...
#include <lslboost/spirit/home/support/char_encoding/standard.hpp> #endif
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from './Material';<|fim▁end|>
<|file_name|>meta_data.cpp<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2015 Microsoft Corporation * * -=- Robust Distributed System Nucleus (rDSN) -=- * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation fi...
{ drops.push_back(node);
<|file_name|>d3d9.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Corey Richardson // Licensed under the MIT License <LICENSE.md> //! Direct3D include file pub const D3D_SDK_VERSION: ::DWORD = 32; pub const D3D9b_SDK_VERSION: ::DWORD = 31; RIDL!( interface IDirect3D9(IDirect3D9Vtbl): IUnknown(IUnknownVtbl) { ...
fn GetDevice(&mut self, ppDevice: *mut *mut IDirect3DDevice9) -> ::HRESULT, fn GetType(&mut self) -> ::D3DRESOURCETYPE,
<|file_name|>Root-CAs.js<|end_file_name|><|fim▁begin|>// These are concatenated md5 and sha1 fingerprints for the Firefox and // Microsoft root CAs as of Aug 2010 var root_ca_hashes = { '00531D1D7201D423C820D00B6088C5D143DDB1FFF3B49B73831407F6BC8B975023D07C50' : true, '015A99C3D64FA94B3C3BB1A3AB274CBFFC219A76112F7...
'86420509BCA79DEC1DF32E0EBAD81DD01D8259CA2127C3CBC16CD932F62C65298CA88712' : true, '86ACDE2BC56DC3D98C2888D38D16131ECE6A64A309E42FBBD9851C453E6409EAE87D60F1' : true, '86EF8E319D9F8569A2A41A127168BA1B90DECE77F8C825340E62EBD635E1BE20CF7327DD' : true, '8714AB83C4041BF193C750E2D721EBEF30779E9315022E94856A3FF8BCF815...
<|file_name|>card.unit.go<|end_file_name|><|fim▁begin|>package gwent const ( // AbilityNone means unit card has no ability at all AbilityNone = iota ) // CardUnit is single unit used for combat type CardUnit struct { UnitType CardType UnitRange CardRange UnitFaction CardFaction UnitPower, UnitAbility int ...
<|file_name|>Rds20140815CheckAccountNameAvailableRequest.py<|end_file_name|><|fim▁begin|>'''<|fim▁hole|>from aliyun.api.base import RestApi class Rds20140815CheckAccountNameAvailableRequest(RestApi): def __init__(self,domain='rds.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.AccountName = None ...
Created by auto_sdk on 2015.06.23 '''
<|file_name|>doc-web.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2018 Analytics Zoo 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...
f = open('_build/html/'+path) return f.read() if __name__ == "__main__":
<|file_name|>hello_world_py3.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
print ("Hello World!")
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Added Fortran compiler support to config. Currently useful only for # try_compile call. try_run works but is untested for most of Fortran # compilers (they must define linker_exe first). # Pearu Peterson from __future__ import division, absolute_import, print_functi...
done to the function f. """
<|file_name|>svc-big-query-logging.tests.js<|end_file_name|><|fim▁begin|>"use strict";<|fim▁hole|> beforeEach(module(function($provide) { $provide.service("$q", function() {return Q;}); $provide.factory("externalLogging", [function () { return { logEvent: function(eventName, eventDetails, eventV...
describe("Services: bigQueryLogging", function() { beforeEach(module("risevision.common.components.logging")); var bigQueryLogging, httpResp, forceHttpError, externalLogEventSpy;
<|file_name|>InputElementBuilder.js<|end_file_name|><|fim▁begin|>var textDivTopIndex = -1; /** * Creates a div that contains a textfiled, a plus and a minus button * @param {String | undefined} textContent string to be added to the given new textField as value * @returns new div<|fim▁hole|> */ function createTextDi...
<|file_name|>grafo-3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Mar 27 01:20:46 2016 @author: caioau """ import matplotlib.pyplot as plt import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout def main(): G = nx.DiGraph() # G eh um gra...
# print i[0], i[1] G[i[0]][i[1]]["color"] = "black" # G[1][2]["color"] = "red" maiorCaminho = nx.dag_longest_path(G)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os from django.conf import settings from django.core.urlresolvers import reverse from django.test import Client from .....checkout.tests import BaseCheckoutAppTests from .....delivery.tests import TestDeliveryProvider from .....order...
class App(BaseCheckoutAppTests):
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>from functools import wraps<|fim▁hole|> def decorated_function(*args, **kwargs): retry = kwargs.get('retry', False) if retry == 0: return f(*args, **kwargs) elif retry > 0: for x in range(0, retry): ...
def retry_task(f): @wraps(f)
<|file_name|>livingsocial_spider.py<|end_file_name|><|fim▁begin|>#! -*- coding: utf-8 -*- """ Web Scraper Project Scrape data from a regularly updated website livingsocial.com and save to a database (postgres). Scrapy spider part - it actually performs scraping. """ from scrapy.spider import BaseSpider from scrapy....
""" name = "livingsocial" allowed_domains = ["livingsocial.com"]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>### # Copyright (c) 2005, Jeremiah Fincher # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain ...
<|file_name|>e621.py<|end_file_name|><|fim▁begin|># The MIT License (MIT) # Copyright (c) 2016 HeyItsShuga # 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 wit...
<|file_name|>cpf.module.ts<|end_file_name|><|fim▁begin|>import { NgModule, ModuleWithProviders} from '@angular/core'; import { CommonModule } from '@angular/common'; import { CpfDirective } from './cpf.directive'; import { CpfConfig } from './cpf.config'; @NgModule({ imports: [ CommonModule<|fim▁hole|> exports...
], declarations: [CpfDirective],
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod copy; pub mod grep;<|fim▁hole|>pub mod read_dir; pub mod echo; pub mod client;<|fim▁end|>
pub mod collector;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to wtsapi32.<|fim▁hole|>#![no_std] #![experimental] extern crate winapi; use winapi::*; extern "system" { }<|fim▁end|>
<|file_name|>DoubleProperty.java<|end_file_name|><|fim▁begin|>/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered.org <http://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * ...
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for tweeter project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see<|fim▁hole|>import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_M...
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """
<|file_name|>d3.timeline.js<|end_file_name|><|fim▁begin|>(function(){ d3.timeline = function(){ var itemHeight = 20, height = null, width = 1000; function chart(selection){ selection.each(function(data){ var groups = grouping(data), levels = d3.sum(d3.values(groups).map(function(d){ return d....
<|file_name|>space-before-bound.rs<|end_file_name|><|fim▁begin|>// rustfmt-space_before_bound: true trait Trait {} trait Trait2 {} fn f<'a, 'b: 'a, T: Trait, U>() where U: Trait2 {} // should fit on the line fn f2<'a, 'b: 'a, Ttttttttttttttttttttttttttttttttttttttttttttttt: Trait, U>() where U: Trait2 {}<|fim▁hole|><...
// should be wrapped fn f2<'a, 'b: 'a, Tttttttttttttttttttttttttttttttttttttttttttttttt: Trait, U>() where U: Trait2 {}
<|file_name|>wsgidav_app.py<|end_file_name|><|fim▁begin|># (c) 2009-2015 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Original PyFileServer (c) 2005 Ho Chun Wei. # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ WSGI container, that handles the...
<|file_name|>musicmanager.py<|end_file_name|><|fim▁begin|>import os from socket import gethostname import time import urllib from uuid import getnode as getmac import webbrowser import httplib2 # included with oauth2client from oauth2client.client import OAuth2WebServerFlow, TokenRevokeError import oauth2client.file ...
<|file_name|>initializedb.py<|end_file_name|><|fim▁begin|>from importlib import import_module from json import load from os.path import basename, dirname, join from sys import argv, exit from pyramid.paster import get_appsettings, setup_logging from pyramid.scripts.common import parse_vars from transaction import mana...
<|file_name|>common.go<|end_file_name|><|fim▁begin|>package warp import ( "bytes" "crypto/rand" "crypto/sha256" "encoding/base64" "encoding/json" "io" "strings" ) var randReader io.Reader = rand.Reader func generateChallenge() ([]byte, error) { challenge := make([]byte, ChallengeLength) n, err := randReader...
if err != nil { return nil, err } if n < ChallengeLength {
<|file_name|>CreateMonitorTemplateResult.java<|end_file_name|><|fim▁begin|>package org.zstack.sdk.zwatch.monitorgroup.api; import org.zstack.sdk.zwatch.monitorgroup.entity.MonitorTemplateInventory; public class CreateMonitorTemplateResult { public MonitorTemplateInventory inventory; public void setInventory(M...
}
<|file_name|>set_1.py<|end_file_name|><|fim▁begin|>low_primes = {1,3,5,7,11,13} low_primes.add(17) # It will be {1,3,5,7,11,13,17}<|fim▁hole|>low_primes.update({19,23},{2,29}) # It will be {1,2,3,5,7,11,13,17,19,23,29}, sorted order while low_primes: print(low_primes.pop()/3) #It wi...
<|file_name|>sandbox.datepickerdemo.ctrl.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('com.module.sandbox') .controller('DatepickerDemoCtrl', function ($scope) { $scope.today = function () { $scope.dt = new Date(); }; $scope.today(); $scope.clear = function () { $sc...
}; $scope.dateOptions = { formatYear: 'yy',
<|file_name|>ListStyleFacet-test.tsx<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2019 SonarSource SA * mailto:info AT sonarsource 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 t...
* but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
<|file_name|>test11.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <propeller.h> #include "test11.h" #ifdef __GNUC__ #define INLINE__ static inline #define PostEffect__(X, Y) __extension__({ int32_t tmp__ = (X); (X) = (Y); tmp__; }) #else #define INLINE__ static static int32_t tmp__; #define PostEffect__(X, Y) ...
<|file_name|>AboutWindow.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2011-2013, John Haddon. All rights reserved. # Copyright (c) 2012, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms,...
# promote products derived from this software without specific prior
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import time from prometheus_client import Counter, Histogram from prometheus_client import start_http_server from flask import request FLASK_REQUEST_LATENCY = Histogram('flask_request_latency_seconds', 'Flask Request Latency', ['method', 'endpoint']) F...
<|file_name|>NERLexicalResources.java<|end_file_name|><|fim▁begin|>package com.silicolife.textmining.processes.ie.ner.nerlexicalresources; import java.util.ArrayList; import java.util.Calendar; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.List; import java.util.Proper...
INERLexicalResourcesConfiguration lexicalResurcesConfiguration = (INERLexicalResourcesConfiguration) configuration; if(lexicalResurcesConfiguration.getCorpus()==null) {
<|file_name|>entityLoaderFactory.js<|end_file_name|><|fim▁begin|>const R = require('ramda'); const {thread} = require('davis-shared').fp; const DataLoader = require('dataloader'); const Task = require('data.task'); const Async = require('control.async')(Task); const when = require('when'); const task2Promise = Async.to...
R.map(entityType => ([ entityType, new DataLoader(ids => task2Promise(
<|file_name|>button.component.ts<|end_file_name|><|fim▁begin|>import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Side } from '../common/side'; <|fim▁hole|> selector: 'ls-button', template: ` <button [attr.type]="type" [class]="class" [style]="style" [...
@Component({
<|file_name|>flow.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google 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...
return value of this function and instead and use
<|file_name|>pushNotifications.js<|end_file_name|><|fim▁begin|>function pushRegisterError(_data, _callback) { _callback && _callback({ success: false, error: _data }); } function pushRegisterSuccess(_userId, _data, _callback) { var token = _data.deviceToken; Cloud.PushNotifications.unsu...
error: null, msg: msgStr
<|file_name|>Connection.py<|end_file_name|><|fim▁begin|>import sys from Boxing import Box, dump_exception, load_exception from ModuleNetProxy import RootImporter from Lib import raise_exception, AttrFrontend FRAME_REQUEST = 1 FRAME_RESULT = 2 FRAME_EXCEPTION = 3 class Connection(object): """ the rpyc connect...
return self.box[oid](*args, **kwargs) def handle_repr(self, oid):
<|file_name|>clv_insured_seq.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol ...
code_form = code_str[14 - code_len:21] return code_form
<|file_name|>zoom-buttons.component.ts<|end_file_name|><|fim▁begin|>import {Component, Output, EventEmitter, Input} from '@angular/core'; @Component({ selector: 'zoom-buttons', templateUrl: './zoom-buttons.html' })<|fim▁hole|>export class ZoomButtonsComponent { @Input() zoomInEnabled: boolean = true; ...
/** * @author Thomas Kleinke */
<|file_name|>errors.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # 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 #<|fim▁hole|># WI...
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>af.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- # Plural-Forms for af (Afrikaans (South Africa)) nplurals=2 # Afrikaans language has 2 forms: # 1 singular and 1 plural # Determine plural_id for number *n* as sequence of positive<|fim▁hole|># NOTE! For singular...
# integers: 0,1,...
<|file_name|>recipeeditorwindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Roastero, released under GPLv3 import os import json import time import functools from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5 import QtWidgets from openroast import tools from openroast.views import customqtwidg...
<|file_name|>hunter.rs<|end_file_name|><|fim▁begin|>// // Copyright 2021 The Project Oak 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<|fim▁hole|>// // http://www.apache.org...
<|file_name|>score.py<|end_file_name|><|fim▁begin|>from pippi import dsp from pippi import tune def ping(maxlen=44100, freqs=None): out = '' if freqs is None: freqs = [ dsp.rand(20,10000) for i in range(4) ] tlen = dsp.randint(10, maxlen) tones = [ dsp.tone(length=tlen, freq=freq, amp=0.1, w...
fcurves = [ dsp.breakpoint([ dsp.rand(0.0, 0.1) + 0.9 for t in range(len(tones[i]) / 20) ],
<|file_name|>commentator-test.js<|end_file_name|><|fim▁begin|>import { moduleForModel, test } from 'ember-qunit'; moduleForModel('commentator', 'Unit | Model | commentator', { // Specify the other units that are required for this test. needs: [] }); <|fim▁hole|> let model = this.subject(); // let store = this.s...
test('it exists', function(assert) {
<|file_name|>transformer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/globocom/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import math...
<|file_name|>surveyRoutes.js<|end_file_name|><|fim▁begin|>const _ = require("lodash"); const Path = require("path-parser"); const { URL } = require("url"); const mongoose = require("mongoose"); const requireSignIn = require("../middlewares/requireSignIn"); const requireCredits = require("../middlewares/requireCredits")...
).exec(); })
<|file_name|>agilentE3634A.py<|end_file_name|><|fim▁begin|>""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich 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 Sof...
super(agilentE3634A, self).__init__(*args, **kwargs)
<|file_name|>g3c.py<|end_file_name|><|fim▁begin|>from . import Cl, conformalize layout_orig, blades_orig = Cl(3) layout, blades, stuff = conformalize(layout_orig) locals().update(blades) locals().update(stuff) <|fim▁hole|><|fim▁end|>
# for shorter reprs layout.__name__ = 'layout' layout.__module__ = __name__
<|file_name|>receivers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio 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 ve...
# index videos (records)
<|file_name|>require.js<|end_file_name|><|fim▁begin|>/** vim: et:ts=4:sw=4:sts=4 * @license RequireJS 2.1.11 Copyright (c) 2010-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */ //Not using strict: uneven strict suppo...
<|file_name|>fft.py<|end_file_name|><|fim▁begin|>from chainer import cuda from chainer import function_node from chainer.utils import type_check class FFT(function_node.FunctionNode): """Fast Fourier transform.""" def __init__(self, method): self._method = method def check_type_forward(self, in...
the result and ``ri`` is the imaginary part of the result.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from typing import Dict from urllib.parse import quote <|fim▁hole|> return quote('/' + env.get('PATH_INFO', '').lstrip('/'))<|fim▁end|>
def request_path(env: Dict):
<|file_name|>resource.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https:...