prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>issue-15689-2.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. //<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>toggle_demo.py<|end_file_name|><|fim▁begin|>import os from traits.api import HasTraits from traitsui.api import View, Item from enable.savage.trait_defs.ui.svg_button import SVGButton pause_icon = os.path.join(os.path.dirname(__file__), 'player_pause.svg') resume_icon = os.path.join(os.path.dirname(__fi...
trait_view = View(Item('pause'))
<|file_name|>live_range.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>#[derive(Clone,Debug,PartialEq,Eq)] pub struct LiveRange { /// The ID of the first instruction in the range. pub start_id: util::Id, /// The ID of the last instruction in the range. pub end_id: util::Id, }<|fim▁end|>
use util; /// A range of instructions which may have live variables.
<|file_name|>win_wua.py<|end_file_name|><|fim▁begin|>""" Module for managing Windows Updates using the Windows Update Agent. List updates on the system using the following functions: - :py:func:`win_wua.available <salt.modules.win_wua.available>` - :py:func:`win_wua.list <salt.modules.win_wua.list_>` This is an easy...
if not salt.utils.win_service.info("CryptSvc")["StartType"] == "Auto": return ( False,
<|file_name|>S3_to_FS.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># 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 law or agreed to in writing, software # d...
# # Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>common.go<|end_file_name|><|fim▁begin|>package builder import ( "bytes" "context" "crypto/sha1" "encoding/json" "fmt" "io/ioutil" "math/rand" "os" "path/filepath" "sort" "strings" "time" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/m...
for i, item := range bi { kv[i] = dockerfile.KeyValue{Key: item.Key, Value: item.Value} } return kv
<|file_name|>Editor.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved. * * 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 wit...
} }
<|file_name|>lint.py<|end_file_name|><|fim▁begin|>import os from typing import List import click from valohai_yaml.lint import lint_file from valohai_cli.ctx import get_project from valohai_cli.exceptions import CLIException from valohai_cli.messages import success, warn from valohai_cli.utils import get_project_dire...
if not lr.messages: success(f'{filename}: No errors') return 0
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from cms.models import CMSPlugin<|fim▁hole|>from django.utils.translation import ugettext as _ class Match(models.Model): datetime = models.DateTimeField(_("Date")) game = models.ForeignKey(Game, verbose_name=_("Game")) clanA = models....
from community.models import Clan, Member, Game
<|file_name|>170109-optional.ts<|end_file_name|><|fim▁begin|>function buildName(firstName = "Will", lastName: string) { return firstName + " " + lastName; }<|fim▁hole|> let result1 = buildName("Bob"); // error, too few parameters let result2 = buildName("Bob", "Adams", "Sr."); // error, too many p...
<|file_name|>yamaha.py<|end_file_name|><|fim▁begin|>""" Support for Yamaha Receivers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.yamaha/ """ import logging import requests import voluptuous as vol from homeassistant.components.media_pl...
def sound_mode(self): """Return the current sound mode."""
<|file_name|>jquery.retina.js<|end_file_name|><|fim▁begin|>/* * Twitter Search Plugin jquery.retina.js * https://github.com/tylercraft/jQuery-Retina * * Copyright (c) 2012 tylercraft.com * Author: Tyler Craft * Dual licensed under the MIT and GPL licenses. * https://github.com/tylercraft/jQuery-Retina * */ (fu...
<|file_name|>urn.ts<|end_file_name|><|fim▁begin|>/** * Cached RegExp object for a global search of / * @type {RegExp} */ const encodedSlashRegExp = new RegExp(encodeURIComponent('/'), 'g'); /** * Replaces any occurrence of / with the encoded equivalent * @param {string} urn * @return {string} */ export const enc...
<|file_name|>pyunit_ozoneKmeans.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(1, "../../../") import h2o def ozoneKM(ip, port): # Connect to a pre-existing cluster # connect to localhost:54321 train = h2o.import_file(path=h2o.locate("smalldata/glm_test/ozone.csv")) # See that the data is ready...
my_km.show() my_km.summary()
<|file_name|>LightspeedEComErrorException.java<|end_file_name|><|fim▁begin|>package com.lightspeedhq.ecom; import com.lightspeedhq.ecom.domain.LightspeedEComError; import feign.FeignException;<|fim▁hole|>import lombok.Getter; /** * * @author stevensnoeijen */ public class LightspeedEComErrorException extends Feign...
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/* globals define */ define(function(require, exports, module) { "use strict"; // Import famo.us dependencies var Engine = require("famous/core/Engine"); var FastClick = require("famous/inputs/FastClick"); // Create main application view var Ap...
context.setPerspective(2000); var view = new AppView(); context.add(view); });
<|file_name|>PlatformTokenExtensionGatewayManagerEmitterDAO.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * Licensed under the AGPL Version 3 license. */ export const TX_ASSET_CREATED = 'AssetCreated'<|fim▁end|>
* Copyright 2017–2019, LaborX PTY
<|file_name|>_size.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class SizeValidator(_plotly_utils.basevalidators.AnyValidator): def __init__(self, plotly_name="size", parent_name="histogram2d.xbins", **kwargs): super(SizeValidator, self).__init__( plotly_name=plotly_name...
parent_name=parent_name, edit_type=kwargs.pop("edit_type", "calc"),
<|file_name|>jquery.contextMenu.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jQuery contextMenu 1.7.0 // Project: http://medialize.github.com/jQuery-contextMenu/ // Definitions by: Natan Vivo <https://github.com/nvivo/> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <reference pat...
}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { Feature } from 'core/feature'; import * as toolkitHelper from 'helpers/toolkit'; export class TargetBalanceWarning extends Feature { constructor() { super(); } shouldInvoke() { return toolkitHelper.getCurrentRouteName().indexOf('budget') !== -1...
currencyElement.addClass('cautious');
<|file_name|>lru.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Google Inc. //<|fim▁hole|>// 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...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os<|fim▁hole|>if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "json_schema.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
import sys
<|file_name|>configure_test.py<|end_file_name|><|fim▁begin|>"""Unit test for treadmill.appcfg.configure. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import shutil import sys import tempfile import un...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** utils.py --------------------- Date : November 2009 Copyright : (C) 2009 by Martin Dobias Email : wond...
package = sys.modules[packageName]
<|file_name|>Activator.java<|end_file_name|><|fim▁begin|>package com.odcgroup.mdf.integration; import org.osgi.framework.BundleContext; import com.odcgroup.workbench.core.AbstractActivator; /** * The activator class controls the plug-in life cycle */ public class Activator extends AbstractActivator { // The plug...
<|file_name|>index.web.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = undefined; var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possib...
if (!direction || direction === 'vertical') { if (titleFixed) { table = _react2["default"].createElement(_rcTable2["default"], __assign({}, restProps, { columns: columns, data: dataSource, className: "am-table", scroll: { x: true }, showHeader: false })); } else {
<|file_name|>CommandHandlerInitializer.js<|end_file_name|><|fim▁begin|>'use strict'; let path = require('path'); let ModuleInitializer = require('../../tools/ModuleInitializer'); class CommandHandlerInitializer extends ModuleInitializer { constructor(repositories, buses, options) { super(options); this._re...
}
<|file_name|>ez_setup.py<|end_file_name|><|fim▁begin|>#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() I...
<|file_name|>types.ts<|end_file_name|><|fim▁begin|>/* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ /* The schema below determines the PostgreSQL database schema. The notation is as follows: schema.table_name = desc: '...
instead_of_query?: ( database, opts: {
<|file_name|>locker-core-api-test.js<|end_file_name|><|fim▁begin|>/* * * Copyright (C) 2011, The Locker Project * All rights reserved. * * Please see the LICENSE file for more information. * */ var assert = require("assert"); var vows = require("vows"); var RESTeasy = require("api-easy"); var http = require("http"); v...
lconfig.load('Config/config.json');
<|file_name|>LWJGL3FramebuffersTestGL33.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH RE...
* Copyright © 2016 <code@io7m.com> http://io7m.com * * Permission to use, copy, modify, and/or distribute this software for any
<|file_name|>HashTaskUnitTests.py<|end_file_name|><|fim▁begin|>""" Unit tests for the HashTask object By Simon Jones 26/8/2017 """ import unittest from test.TestFunctions import * from source.HashTask import * from source.Channel import Channel class HashTaskUnitTests(unittest.TestCase): """ Unit tests for the Has...
self.task2_c_channel.put(str(TaskMessage(TaskMessage.FLAG_JOIN, 2, TaskMessage.REQUEST)))
<|file_name|>mempool.go<|end_file_name|><|fim▁begin|>package core import ( "context" "errors" "fmt" "math/rand" "time" abci "github.com/tendermint/tendermint/abci/types" "github.com/tendermint/tendermint/internal/mempool" "github.com/tendermint/tendermint/internal/state/indexer" tmmath "github.com/tendermint...
// NumUnconfirmedTxs gets number of unconfirmed transactions. // More: https://docs.tendermint.com/master/rpc/#/Info/num_unconfirmed_txs
<|file_name|>filechunks_read_test.go<|end_file_name|><|fim▁begin|>package filer import ( "fmt" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "math/rand" "testing" ) func TestReadResolvedChunks(t *testing.T) { chunks := []*filer_pb.FileChunk{ { FileId: "a", Offset: 0, Size: 100, Mtime: 1, ...
}, { FileId: "5,e5562640b9",
<|file_name|>network_set.go<|end_file_name|><|fim▁begin|>package ov import ( "encoding/json" "fmt" "github.com/HewlettPackard/oneview-golang/rest" "github.com/HewlettPackard/oneview-golang/utils" "github.com/docker/machine/libmachine/log" ) type NetworkSet struct { Category string `json:"c...
<|file_name|>resolve-label.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...
'l: loop { fn g() {
<|file_name|>test_polytools.py<|end_file_name|><|fim▁begin|>"""Tests for user-friendly public interface to polynomial functions. """ from sympy.polys.polytools import ( Poly, PurePoly, poly, parallel_poly_from_expr, degree, degree_list, LC, LM, LT, pdiv, prem, pquo, pexquo, div, rem, quo, exquo...
assert factor(x**11 + x + 1, modulus=65537, symmetric=True) == \
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>//! Conditional compilation stripping. use rustc_ast::ptr::P; use rustc_ast::token::{DelimToken, Token, TokenKind}; use rustc_ast::tokenstream::{AttrAnnotatedTokenStream, AttrAnnotatedTokenTree}; use rustc_ast::tokenstream::{DelimSpan, Spacing}; use rustc_ast::tokens...
use rustc_span::{Span, DUMMY_SP}; /// A folder that strips out items that do not belong in the current configuration. pub struct StripUnconfigured<'a> {
<|file_name|>libarchive2.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2015 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. #...
<|file_name|>0011_auto__add_field_grader_is_calibration.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Grader.is_cal...
db.add_column('controller_grader', 'is_calibration', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False)
<|file_name|>ContextProvidersCustomer.java<|end_file_name|><|fim▁begin|>package org.jboss.resteasy.test.providers.multipart.resource; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootEl...
@XmlRootElement(name = "customer")
<|file_name|>tflite_driver.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/l...
TfLitePtrUnion data_; size_t num_elements_; };
<|file_name|>e003.py<|end_file_name|><|fim▁begin|>def is_prime(n): for j in xrange(3, long(n**.5)+1, 2): if n%j == 0 or n%2 == 0: return False return True def lpf(n): for i in xrange(3, long(n**.5)+1, 2): if n%i == 0: if is_prime(i): s = i return...
start = time() print lpf(600851475143) print "LPF time: {}".format(time() - start)
<|file_name|>rw_snippet.cpp<|end_file_name|><|fim▁begin|>/* RWImporter Copyright (C) 2017 Martin Smith 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 License, or (at your opt...
writer->writeTextElement(CONTENTS_TOKEN, digits); #else const QLocale &locale = QLocale::system();
<|file_name|>filelink.js<|end_file_name|><|fim▁begin|>/** * @file Link files. * @function filelink * @param {string} src - Source file (actual file) path. * @param {string} dest - Destination file (link) path. * @param {object} [options] - Optional settings. * @param {string} [options.type='symlink'] - Link type ...
module.exports = filelink
<|file_name|>LiveDataDemoBigJobs.py<|end_file_name|><|fim▁begin|>import numpy as np import networkx from zephyr.Problem import SeisFDFDProblem # Plotting configuration import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.ticker as ticker import matplotlib matplotlib.rcParams.update({'font.size...
<|file_name|>LayoutSVGInline.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> * Copyright (C) 2006 Apple Inc. All rights reserved. * Copyright (C) Research In Motion Limited 2010. All rights reserved. * * This library is free software; you can redistribute it an...
* Boston, MA 02110-1301, USA. */ #include "config.h"
<|file_name|>test_array_fromfile_eof.py<|end_file_name|><|fim▁begin|># Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import array import tempfile <|fim▁hole|> class ArrayFromfileEofTestCase(TestCase): def testArrayFromfileEof(self): # This tests if the followin...
from portage import _unicode_decode from portage import _unicode_encode from portage.tests import TestCase
<|file_name|>_sourceattribution.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class SourceattributionValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="sourceattribution", parent_name="layout.mapbox.layer", **kwargs<|fim▁...
<|file_name|>Sockets.js<|end_file_name|><|fim▁begin|>import WebSocket from 'ws'; import querystring from 'querystring'; import Socket from './Socket.js'; /** * Websocket server that creates and host all {@link server.Socket} instance. * * (@note - could be usefull for broadcasting messages, creating rooms, etc. * ...
<|file_name|>issue-35030.rs<|end_file_name|><|fim▁begin|>#![allow(non_camel_case_types)] trait Parser<T> { fn parse(text: &str) -> Option<T>; } impl<bool> Parser<bool> for bool { fn parse(text: &str) -> Option<bool> { Some(true) //~ ERROR mismatched types }<|fim▁hole|>fn main() { println!("{}"...
}
<|file_name|>color_test.go<|end_file_name|><|fim▁begin|>package blend_test import ( "image/color" "testing" "github.com/tv42/quobar/blend" ) var ( white = color.RGBA{R: 255, G: 255, B: 255, A: 255} green = color.RGBA{R: 0, G: 255, B: 0, A: 255} yellow = color.RGBA{R: 255, G: 255, B: 0, A: 255} red = colo...
{0, red}, {1024, white}, {768, green},
<|file_name|>ssh.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Li...
<|file_name|>bmx055.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2016 Intel Corporation. # # 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...
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
<|file_name|>express.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Module dependencies. */ var fs = require('fs'), http = require('http'), https = require('https'), express = require('express'), morgan = require('morgan'), logger = require('./logger'), bodyParser = require('body-parser'...
<|file_name|>useMediaPicker.js<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * * 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unles...
* Copyright 2020 Google LLC
<|file_name|>ElementModelProcessor.java<|end_file_name|><|fim▁begin|>/* * ============================================================================= * * Copyright (c) 2011-2016, The THYMELEAF team (http://www.thymeleaf.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may n...
super(TemplateMode.HTML, dialectPrefix, "div", true, null, false, 100); }
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for text_analysis project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ """ import os from django.core.wsgi import g...
application = get_wsgi_application()
<|file_name|>progressbar.cpp<|end_file_name|><|fim▁begin|>// ****************************************************************************** // // Filename: progressbar.cpp // Project: Vox // Author: Steven Ball // // Purpose: // A progress bar component to show visual feedback of progress. // // Revision History...
if(m_pProgressBackground) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// SPDX-License-Identifier: Unlicense //! Unifies the CPU-architecture specific code for the supported CPU's. //! //! All architectures are linked in for unit testing on the host platform. //! Only the target architecture is linked for release builds (including when //!...
#[cfg(all(not(test), target_arch = "aarch64"))] pub use aarch64 as arch;
<|file_name|>TestI.py<|end_file_name|><|fim▁begin|># ********************************************************************** # # Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ********...
def callH(self, current=None):
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for django-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`` command...
# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks # if running multiple sites in the same mod_wsgi process. To fix this, use
<|file_name|>aspect_frame.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Rust-GNOME Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> //! A frame that constrains its...
struct_Widget!(AspectFrame);
<|file_name|>clientListStore.js<|end_file_name|><|fim▁begin|>import pagination from '@admin/store/modules/paginationStore' import {HTTP} from '@shared/config/api' const state = { clientList: [] }<|fim▁hole|> const getters = { getClientList: state => state.clientList } const mutations = { set(state, {type,...
<|file_name|>letter_frequency.rs<|end_file_name|><|fim▁begin|>// Implements http://rosettacode.org/wiki/Letter_frequency #[cfg(not(test))] use std::io::fs::File; #[cfg(not(test))] use std::io::BufferedReader; use std::collections::HashMap; fn count_chars<T: Iterator<char>>(mut chars: T) -> HashMap<char, uint> { l...
fn test_empty() { let map = count_chars("".chars()); assert!(map.len() == 0); }
<|file_name|>static.module.js<|end_file_name|><|fim▁begin|>const ng = require('angular'); ng.module('porybox.static', ['ngRoute']).config(['$routeProvider', $routeProvider => { [ 'about', 'donate', 'extracting-pokemon-files', 'faq', 'how-to-pk6-1-bvs', 'how-to-pk6-2-homebrew', 'how-to-pk6-...
'how-to-pk6-6-decrypted-powersaves', 'how-to-pk7-1-bvs',
<|file_name|>group_mod.py<|end_file_name|><|fim▁begin|>"""Modify Group Entry Message.""" from enum import IntEnum from pyof.foundation.base import GenericMessage from pyof.foundation.basic_types import ( FixedTypeList, Pad, UBInt8, UBInt16, UBInt32) from pyof.v0x04.common.header import Header, Type from pyof.v0x04...
<|file_name|>ReadyButton.tsx<|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/. */ import React, { useContext } from 'react'; import { ...
const { inputContext, matchmakingContext, warbandContextState } = this.props; if (matchmakingContext.shouldShowButtonFound) { return (
<|file_name|>concurrent_queue.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2014, Project OSRM, Dennis Luxen, others 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 m...
<|file_name|>Information.py<|end_file_name|><|fim▁begin|><|fim▁hole|># coding=utf-8 Version = "0.2.0" Description = "LOTRO/DDO Launcher" Author = "Alan Jackson" Email = "ajackson@bcs.org.uk" WebSite = "http://www.lotrolinux.com" LongDescription = "Lord of the Rings Online and Dungeons & Dragons Online\nLauncher for Lin...
<|file_name|>sListTrx.js<|end_file_name|><|fim▁begin|>/** * * Store transaction * * Programmer By Emay Komarudin. * 2013 * * Description Store transaction * * **/<|fim▁hole|>Ext.define('App.store.transaction.sListTrx',{ extend : 'Ext.data.Store', // groupField: 'trx_no', // model : 'App.model.transaction.mOrders', ...
var data_gen = generate_transaction_list(30);
<|file_name|>map.rs<|end_file_name|><|fim▁begin|>//! map provides functions around StringMap (HashMap<String, String>).<|fim▁hole|>//! # Example //! ``` //! use sqlib::map::{to_map, update_from_map}; //! //! let map = to_map("key1=2"); //! let mut integer = 1i32; //! //! update_from_map(&map, "key1", &mut integer); //!...
//!
<|file_name|>test_object_failures.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -u # Copyright (c) 2010-2012 OpenStack Foundation # # 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 # # ht...
def run_quarantine_zero_byte_post(self):
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>#coding:utf-8 bind = 'unix:/var/run/gunicorn.sock'<|fim▁hole|># you should change this user = 'root' # maybe you like error loglevel = 'debug' errorlog = '-' logfile = '/var/log/gunicorn/debug.log' timeout = 300 secure_scheme_headers = { 'X-SCHEME': 'https', }...
workers = 4
<|file_name|>ssl.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2014 Space Monkey, 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|>defaults.js<|end_file_name|><|fim▁begin|>var toArray = require('./toArray'); var find = require('../array/find'); /** * Return first non void argument */ <|fim▁hole|> function nonVoid(val){ return val != null; } module.exports = defaults;<|fim▁end|>
function defaults(var_args){ return find(toArray(arguments), nonVoid); }
<|file_name|>json-structure.ts<|end_file_name|><|fim▁begin|>export const VERSION = 1; /** Same as DexieExportJsonStructure but without the data.data array */ export interface DexieExportJsonMeta { formatName: 'dexie'; formatVersion: typeof VERSION; data: { databaseName: string; databaseVersion: number; ...
}>; } }
<|file_name|>facebook-me.js<|end_file_name|><|fim▁begin|>'use strict'; angular .module('facebookMe', [ ])<|fim▁hole|><|fim▁end|>
;
<|file_name|>compare.py<|end_file_name|><|fim▁begin|>import Levenshtein import re from prisoners import db from prisoners.models.original import Gedetineerde #prisonersmatch = db.Table('PrisonersMatch', # db.Column('master_id_ged', db.Integer, db.ForeignKey('PrisonersCompare.id_gedetineerde')...
<|file_name|>encode.js<|end_file_name|><|fim▁begin|>'use strict'; /* lib/encode.js * Encode WebSocket message frames.<|fim▁hole|><|fim▁end|>
* * */
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># To install another language: # - update default_bridges below # - update languages.cson in seamless/compiler from ...highlevel.Environment import ContextEnvironment, Environment from . import r _default_bridges = { "r": { "code": r.bridge_r, ...
b = _default_bridges[lang] if env._py_bridges is None: env._py_bridges = {} env.set_py_bridge(lang, b["code"])
<|file_name|>XrdCmsBlackList.hh<|end_file_name|><|fim▁begin|>#ifndef __XRDCMSBLACKLIST_HH__ #define __XRDCMSBLACKLIST_HH__ /******************************************************************************/ /* */ /* X r d C m s B...
<|file_name|>executable.py<|end_file_name|><|fim▁begin|>"""An example of a python script which can be executed by the task queue """ import sys <|fim▁hole|>def execute(): """Simply write the python executable """ sys.stdout.write(sys.executable) if __name__ == '__main__': execute()<|fim▁end|>
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ syslog2irc.main ~~~~~~~~~~~~~~~ :Copyright: 2007-2015 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from itertools import chain from .announcer import create_announcer from .processor import Processor from .router impor...
<|file_name|>values.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LI...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
<|file_name|>color.js<|end_file_name|><|fim▁begin|>const HEX_SHORT = /^#([a-fA-F0-9]{3})$/; const HEX = /^#([a-fA-F0-9]{6})$/; function roundColors(obj, round) { if (!round) return obj; const o = {}; for (let k in obj) { o[k] = Math.round(obj[k]); } return o; } function hasProp(obj, key) { return obj...
} else { hsv.h = 4 + (r - g) / delta; }
<|file_name|>owf-group-dashboard-management-widget.js<|end_file_name|><|fim▁begin|>Ext.define('Ozone.data.Dashboard', { extend: 'Ext.data.Model', idProperty: 'guid', fields:[ 'alteredByAdmin', 'guid', {name:'id', mapping: 'guid'}, { name: 'isdefault', type: 'boolean', ...
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>define({ "sourceSetting": "Pretraži postavke izvora", "instruction": "Dodaj i konfiguriši servise za geokodiranje ili slojeve geoobjekata kao izvore pretrage. Ovi navedeni izvori određuju šta može da se pretražuje unutar trake za pretragu.", "add": "Dodaj izvor...
"setSearchFields": "Postavi polja pretrage",
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from .models import personalBinge<|fim▁hole|>from .models import Bingether from .models import Comment # Register your models here. admin.site.register(personalBinge) admin.site.register(Bingether) admin.site.register(Comment)<|fim▁end...
<|file_name|>test_interaction.py<|end_file_name|><|fim▁begin|>"""Test interact and interactive.""" #----------------------------------------------------------------------------- # Copyright (C) 2014 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file C...
with nt.assert_raises(ValueError): c = interactive(f, tup=(1,1)) with nt.assert_raises(ValueError):
<|file_name|>borrowck-borrow-of-mut-base-ptr-safe.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 // ...
// except according to those terms.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" The Django User class is used to handle users and authentication. https://docs.djangoproject.com/en/1.10/ref/contrib/auth/ User groups:<|fim▁hole|> superadmin - Can access django admin page admin - Can access regular admin pages hacker - Hacker page...
<|file_name|>vector.js<|end_file_name|><|fim▁begin|>var Vector = function(values) { // An N-Dimensional vector. // // Args: // values: A list of values for each dimension of the vector. var self = this; self.values = values; self.hash = function() { // Generate a hash of the vector. // // ...
// Divide the vector by a constant.
<|file_name|>geoalchemy_model.py<|end_file_name|><|fim▁begin|>from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base from geoalchemy import GeometryColumn, LineString, GeometryDDL<|fim▁hole|>metadata = MetaData(engine) Base = declarative_base(metadata=metadata) cl...
engine = create_engine('postgres://michel@localhost/featureserver', echo=False) session = sessionmaker(bind=engine)()
<|file_name|>Page.java<|end_file_name|><|fim▁begin|>package bf.io.openshop.entities; public class Page { private long id; private String title; private String text; public Page() { } public long getId() { return id; } public void setId(long id) { this.id = id; } ...
<|file_name|>root-reducer.ts<|end_file_name|><|fim▁begin|>import * as _ from "lodash"; import * as reducer from "./reducers"; import {ReduxAction} from "./create-action"; import {Store, initialState} from "./store"; export default function rootReducer(store: Store = initialState, action: ReduxAction): Store { if...
return { // >>> call(reducer)
<|file_name|>test_application.py<|end_file_name|><|fim▁begin|># coding=utf-8 import mock from lxml import html from wtforms import ValidationError from dmapiclient.errors import HTTPError from app.main.helpers.frameworks import question_references from .helpers import BaseApplicationTest class TestApplication(BaseA...
self.app.config['DM_COOKIE_PROBE_COOKIE_NAME'], self.app.config['DM_COOKIE_PROBE_COOKIE_VALUE'],
<|file_name|>TransactionTypeValidator.java<|end_file_name|><|fim▁begin|>/** * * $Id$ */ package net.opengis.wfs20.validation; import net.opengis.wfs20.AbstractTransactionActionType; import net.opengis.wfs20.AllSomeType; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.util.FeatureMap; /** ...
* It was generated by the org.eclipse.emf.examples.generator.validator plug-in to illustrate how EMF's code generator can be extended. * This can be disabled with -vmargs -Dorg.eclipse.emf.examples.generator.validator=false. */ public interface TransactionTypeValidator {