prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Button.component.tsx<|end_file_name|><|fim▁begin|>/** @jsx jsx */<|fim▁hole|>import { styles } from './Button.styles'; interface ButtonProps { className?: string children?: ReactNode onClick?: () => void } const Button = (props: ButtonProps): ReactElement => { const { className, children, onClick...
import { jsx } from '@emotion/react'; import { ReactNode, ReactElement } from 'react';
<|file_name|>check_match.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.or...
let mut seen = Vec::new();
<|file_name|>lifecycle.js<|end_file_name|><|fim▁begin|>/** * The file lifecycle.js.js Create with WebStorm * @Author gaosi * @Email angus_gaosi@163.com * @Date 2014/10/13 15:49:00 * To change this template use File | Setting |File Template */ var pomelo = require('pomelo'); var logger = re...
module.exports.beforeStartup = function (app, cb) {
<|file_name|>passwords.py<|end_file_name|><|fim▁begin|># coding=utf-8 from django.contrib.auth.forms import PasswordResetForm, SetPasswordForm from django.contrib.auth.tokens import default_token_generator from django.contrib.auth.views import password_reset_confirm from django.template.response import TemplateResp...
need_site_permission = False
<|file_name|>cb_language.js<|end_file_name|><|fim▁begin|>// // ClearBox Language File (JavaScript)<|fim▁hole|> CB_NavTextPrv='zurück', // text of previous image CB_NavTextNxt='weiter', // text of next image CB_NavTextFull='volle grösse', // text of original size (only at pictures) CB_Na...
// var
<|file_name|>midasvr.py<|end_file_name|><|fim▁begin|>import pwsimple # Midas volume rendering ParaviewWeb plugin # Initialize the volume rendering state def InitViewState (cameraFocalPoint, cameraPosition, colorArrayName, colorMap, sofPoints, viewSize): if type(colorArrayName) is unicode: colorArrayName = color...
<|file_name|>purchasewizard.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2005-2012 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Les...
<|file_name|>shaderc_cpp_test.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 The Shaderc 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://...
TEST_F(CppInterface, GlslDefaultPackingUsed) { CompileOptions options;
<|file_name|>minTime.ts<|end_file_name|><|fim▁begin|>import { TimeGridViewWrapper } from '../lib/wrappers/TimeGridViewWrapper' describe('slotMinTime', () => { // TODO: rename file pushOptions({ initialView: 'timeGridWeek', initialDate: '2017-03-22', scrollTime: '00:00', }) describe('event rendering'...
'2017-03-23T00:00:00Z', )
<|file_name|>feature_gate.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/li...
("plugin", "1.0.0", Active), ("start", "1.0.0", Active), ("main", "1.0.0", Active),
<|file_name|>configuration_pb2.py<|end_file_name|><|fim▁begin|># Generated by the protocol buffer compiler. DO NOT EDIT! # source: orderer/configuration.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobu...
has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None,
<|file_name|>client.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 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/...
TargetTcpProxiesClient: The constructed client. """ credentials = service_account.Credentials.from_service_account_info(info) kwargs["credentials"] = credentials
<|file_name|>testing.py<|end_file_name|><|fim▁begin|>import os #: The title of this site SITE_TITLE = 'Job Board' #: Database backend<|fim▁hole|>SQLALCHEMY_DATABASE_URI = 'postgresql:///hasjob_testing' SERVER_NAME = 'hasjob.travis.local:5000' #: LastUser server LASTUSER_SERVER = 'https://hasgeek.com/' #: LastUser clie...
<|file_name|>Lecture10Video1Notes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Mon Sep 19 11:45:20 2016 @author: johnguttag """ import random, pylab, numpy #set line width pylab.rcParams['lines.linewidth'] = 4 #set font size for titles pylab.rcParams['axes.titlesize'] = 20 #set font size f...
pylab.title('Measured Displacement of Spring') pylab.xlabel('|Force| (Newtons)') pylab.ylabel('Distance (meters)')
<|file_name|>textMarker.js<|end_file_name|><|fim▁begin|>import EVENTS from '../events.js'; import external from '../externalModules.js'; import mouseButtonTool from './mouseButtonTool.js'; import touchTool from './touchTool.js'; import pointInsideBoundingBox from '../util/pointInsideBoundingBox.js'; import toolColors f...
<|file_name|>binary_search_tree_test.go<|end_file_name|><|fim▁begin|>// API: // // type SearchTreeData struct { // left *SearchTreeData // data int // right *SearchTreeData // } // // func Bst(int) *SearchTreeData // func (*SearchTreeData) Insert(int) // func (*SearchTreeData) MapString(func(int) string) []string // ...
func TestInsertingSame(t *testing.T) { bst := SearchTreeData{data: 4}
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # 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/...
from datetime import datetime
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for yargs 17.0 // Project: https://github.com/chevex/yargs, https://yargs.js.org // Definitions by: Martin Poelstra <https://github.com/poelstra> // Mizunashi Mana <https://github.com/mizunashi-mana> // Jeffery Graj...
<|file_name|>test_oti.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python from peyotl.api import OTI from peyotl.test.support.pathmap import get_test_ot_service_domains from peyotl.utility import get_logger import unittest import os _LOG = get_logger(__name__) @unittest.skipIf('RUN_WEB_SERVICE_TESTS' not in os.envi...
r = self.oti.find_studies({'ot:studyPublication': '10.1073/pnas.0709121104'})
<|file_name|>autoscale.js<|end_file_name|><|fim▁begin|>define(["pat-autoscale", "jquery"], function(pattern, jQuery) { describe("pat-autoscale", function() { beforeEach(function() { $("<div/>", {id: "lab"}).appendTo(document.body); $(window).off(".autoscale"); }); ...
<|file_name|>punish.py<|end_file_name|><|fim▁begin|>from datetime import datetime import discord from discord.ext import commands import inspect import logging import os import re import textwrap import time from .mod import CaseMessageNotFound, NoModLogAccess from .utils import checks from .utils.chat_formatting impo...
<|file_name|>setRedis.py<|end_file_name|><|fim▁begin|>import time from subprocess import * PATH = "/home/richie_rich/OSProj/redis-OS-project/src/redis-cli" p1 = Popen([PATH], shell=True, stdin=PIPE) p1.communicate(input="FLUSHALL") strength = 1000000 rangeVal = strength + 1 string = "set key" string1 = "" count = 0 ...
string1 = string1 + string + str(i) + " val" + str(i) + "\n" if (i % 1000) == 0 : p1 = Popen([PATH], shell=True, stdin=PIPE)
<|file_name|>quote-unused-sp-no-warning.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...
fn test(cx: &mut ExtCtxt) { let foo = 10i; let _e = quote_expr!(cx, $foo); }
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-HTMLtoP...
'Operating System :: OS Independent', 'Programming Language :: Python',
<|file_name|>smileys.js<|end_file_name|><|fim▁begin|>(function ($) { var smileys = [ ":(", ":)", ":O", ":D", ":p", ":*", ":-)", ":-(", ":-O", ":-D" ], extras = { "<3": true, "&lt;3": true }, smileParts = { "O": "middle-mouth", "D": "middle-mouth", "d": "middle-mouth...
};
<|file_name|>FileSelectionPanel.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** FileSelectionPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Emai...
<|file_name|>dwasm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import argparse import code import readline import signal import sys from parse import Argparser, premain, SigHandler_SIGINT,PythonInterpreter from utils import ParseFlags def getWASMModule(): module_path = sys.argv[1] interpreter = PythonI...
try: premain(argparser) except Exception as e: print(e.__doc__)
<|file_name|>trailingBlankLinesWithBackslashesAtFunctionEndNoNewLine.py<|end_file_name|><|fim▁begin|>def foo(): pass \ \<|fim▁hole|><|fim▁end|>
\
<|file_name|>tornado-sqs.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#!! this example requires the file /test/setting.py with the folowing constants is created from awsutils.tornado.sqsclient import SQSClient from test.settings import access_key, secret_key sqsclient = SQSClient(endpoint='sqs.us-east-1.amazonaws.com',...
import tornado.ioloop
<|file_name|>pbrt.py<|end_file_name|><|fim▁begin|>import logging import numpy as np import os import subprocess import tempfile from . import scene from . import rman ZERO = scene.npvector((0, 0, 0)) _film = rman.Identifier( 'Film', positional=['string'], named={ 'xresolution': 'integer', '...
'Sampler', positional=['string'], named={ 'pixelsamples': 'integer',
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) ...
setup( name='mo-hg', version="2.18.18240", description='Fast cache for Mozilla\'s Mercurial repository',
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import json import os<|fim▁hole|>from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, NSVariableStatusItemLength, NSImage from PyObjCTools import AppHelper from project_cron.models import Schedule from threading import Timer from project_cron.utils import...
<|file_name|>collections.rs<|end_file_name|><|fim▁begin|>use std::borrow::Borrow; use std::collections::BTreeMap; use std::fmt::{self, Debug}; // TODO: Consider using BTreeMap, possible perforance increase. Do benchmarks. /// A stack of scopes of something. Fast access due to hashmaps, and guaranteed to contain no ///...
}
<|file_name|>http_client.go<|end_file_name|><|fim▁begin|>package rpcclient import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net" "net/http" "net/url" "reflect" "strings" "github.com/pkg/errors" types "github.com/tendermint/tendermint/rpc/lib/types" ) // HTTPClient is a common interface for JSONRPCClien...
// if rpc/core/types is imported, the result will unmarshal // into the correct type // log.Notice("response", "response", string(responseBytes))
<|file_name|>App.js<|end_file_name|><|fim▁begin|>import React from "react"; import { useResponse } from "@curi/react-dom"; import NavLinks from "./NavLinks"; <|fim▁hole|> return ( <div> <NavLinks /> <Body response={response} /> </div> ); }<|fim▁end|>
export default function App() { let { response } = useResponse(); let { body: Body } = response;
<|file_name|>placehold-it.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'img', attributeBindings: ['src'], height: 100, width: 100, backgroundColor: 'aaa', textColor: '555', format: undefined, // gif, jpg, jpeg, png text: undefined,<|fim▁hole|> ...
<|file_name|>file_1.py<|end_file_name|><|fim▁begin|>def file_1_function_a(): pass a_number = 7 a_string = 'bleh' def file_1_function_b(): pass<|fim▁hole|>file_1_function_b.is_setup_function = True<|fim▁end|>
file_1_function_a.is_setup_function = True
<|file_name|>exists.py<|end_file_name|><|fim▁begin|>from .base import DerivedType from categorical import CategoricalComparator from .categorical_type import CategoricalType class ExistsType(CategoricalType) : type = "Exists" _predicate_functions = [] def __init__(self, definition) : super(Catego...
if field_1 and field_2 : return self.cat_comparator(1, 1)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>'''<|fim▁hole|>Read more here: http://pytest.org/ Copyright 2015, LeadGenius Licensed under MIT '''<|fim▁end|>
cloudelements: tests module. Meant for use with py.test. Organize tests into files, each named xxx_test.py
<|file_name|>dhcp.py<|end_file_name|><|fim▁begin|># Copyright (c) 2003-2015 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # import pcapy import socket import time from random i...
<|file_name|>const-fn-destructuring-arg.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICE...
// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>viewport.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 cssparser::{Parser, ParserInput}; use euclid::TypedSize2...
UserAgent, error_reporter, shared_lock.clone()), stylesheet!("@viewport { min-width: 200px !important; min-height: 200px !important; }", User, error_reporter, shared_lock.clone()), stylesheet!("@viewport { min-width: 300px !important; min-height: 300px !important;...
<|file_name|>test_volumes_actions.py<|end_file_name|><|fim▁begin|># 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 # a copy of the License at # # ...
self.volumes_client.detach_volume(self.volume['id'])
<|file_name|>ec2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 ''' EC2 external inventory script ================================= Generates inventory that Ansible can understand by making API request to AWS EC2 using the Boto library. NOTE: This script assumes Ansible is being executed where the environmen...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export const state = () => ({ visits:[] }) export const mutations = {<|fim▁hole|> ADD_VISIT (state,path) { state.visits.push({ path, date:new Date().toJSON() }) } }<|fim▁end|>
<|file_name|>render.py<|end_file_name|><|fim▁begin|><|fim▁hole|>south = 51.416; north = 51.623; west = -0.415; east = 0.179; if __name__ == "__main__": x = Image.fromstring("RGBA", (2668,1494), open("output_pixel_data").read()) x.save("lit-map.png", "PNG")<|fim▁end|>
import Image import json
<|file_name|>_engine_core_8h.js<|end_file_name|><|fim▁begin|>var _engine_core_8h = [ [ "EngineCore", "class_ludo_1_1_engine_core.html", "class_ludo_1_1_engine_core" ], [ "LD_EXPORT_ENGINE_CORE", "_engine_core_8h.html#a0ced60c95a44fd7969a8d0b789257241", null ]<|fim▁hole|><|fim▁end|>
];
<|file_name|>ras_test.go<|end_file_name|><|fim▁begin|>// +build linux // +build 386 amd64 arm arm64 package ras import ( "fmt" "testing" "github.com/influxdata/telegraf/testutil" "github.com/stretchr/testify/assert" ) func TestUpdateCounters(t *testing.T) { ras := newRas() for _, mce := range testData { ra...
MciStatusMsg: "Error_overflow Corrected_error", },
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. # Python import json # Django from django.db import models # Tower from awx.main.models.base import CreatedModifiedModel, prevent_search from awx.main.fields import JSONField from awx.main.utils import encry...
return '{}_ID'.format(key) def display_value(self): if self.key == 'LICENSE' and 'license_key' in self.value:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apac...
# under the License. from .firefox.webdriver import WebDriver as Firefox # noqa from .firefox.firefox_profile import FirefoxProfile # noqa
<|file_name|>tangents.py<|end_file_name|><|fim▁begin|># Copyright 2017 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 # # ...
def tatleast_3d(z, x): d[z] = numpy.atleast_3d(d[x])
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>"""Tkinker gui for pylint""" from Tkinter import Tk, Frame, Listbox, Entry, Label, Button, Scrollbar from Tkinter import TOP, LEFT, RIGHT, BOTTOM, END, X, Y, BOTH import os import sys if sys.platform.startswith('win'): PYLINT = 'pylint.bat' else: PYLINT = 'pyli...
<|file_name|>MaterialChooseApp.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Color-Coding Studio. All Rights Reserved. * * Use of this source code is governed by an Apache License, Version 2.0 * that can be found in the LICENSE file at http://www.apache.org/licenses/LICENSE-2.0 */ namespace tr...
<|file_name|>xen.py<|end_file_name|><|fim▁begin|>__author__ = """Copyright Martin J. Bligh, 2006, Copyright IBM Corp. 2006, Ryan Harper <ryanh@us.ibm.com>""" import os, shutil, copy, pickle, re, glob<|fim▁hole|>class xen(kernel.kernel): def log(self, msg): print msg self.logfile.wr...
from autotest_lib.client.bin import kernel, kernel_config, os_dep, test from autotest_lib.client.bin import utils
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"DiskCache: disk and file backed cache." from .core import Cache, Disk, UnknownFileWarning, EmptyDirWarning, Timeout<|fim▁hole|>from .persistent import Deque, Index __all__ = [ 'Cache', 'Disk', 'UnknownFileWarning', 'EmptyDirWarning', 'Timeout'...
from .core import DEFAULT_SETTINGS, EVICTION_POLICY from .fanout import FanoutCache
<|file_name|>i18n_select_pipe.d.ts<|end_file_name|><|fim▁begin|>import { PipeTransform } from 'angular2/core'; /** * * Generic selector that displays the string that matches the current value. * * ## Usage * * expression | i18nSelect:mapping * * where `mapping` is an object that indicates the text ...
<|file_name|>sortingnetwork.py<|end_file_name|><|fim▁begin|># This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or (at...
sequence = list(sequence) self.sort(sequence) misses += (sequence != ordered[sum(sequence)])
<|file_name|>Context.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2018 Christophe Friederich * * 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...
}
<|file_name|>E0005.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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/...
<|file_name|>jobs.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2019-2021 Renata Hodovan, Akos Kiss. * * Licensed under the BSD 3-Clause License * <LICENSE.rst or https://opensource.org/licenses/BSD-3-Clause>. * This file may not be copied, modified, or distributed except * according to those terms. */ /* ...
if ($(progress).data('maxvalue') < Infinity) {
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickrage.github.io # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
<|file_name|>HttpMonitorInputModule.java<|end_file_name|><|fim▁begin|>package org.graylog2.plugin.httpmonitor; import org.graylog2.plugin.PluginConfigBean;<|fim▁hole|> import java.util.Collections; import java.util.Set; /** * Extend the PluginModule abstract class here to add you plugin to the system. */ public cla...
import org.graylog2.plugin.PluginModule;
<|file_name|>document_condition.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/. */ //! [@document rules](https://www.w3.org/TR/2012/W...
<|file_name|>ftpScraper.py<|end_file_name|><|fim▁begin|>from io import BytesIO import json import os import urllib.parse import six import sys from ftptool import FTPHost import xlsxwriter # from https://docs.djangoproject.com/en/1.10/_modules/django/utils/encoding/ def smart_text(s, encoding="utf-8", strings_only=F...
return force_text(s, encoding, strings_only, errors) # from https://docs.djangoproject.com/en/1.10/_modules/django/utils/encoding/
<|file_name|>trait-inheritance-num2.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://ww...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import * as awsExpress from "aws-serverless-express"; import * as log4js from "log4js"; import * as App from "./app"; log4js.configure({ appenders: {out: {type: "stdout"}}, categories: { default: {appenders: ["out"], level: "debug"}, }, }); <|fim▁hole|> con...
const server = awsExpress.createServer(App.app); exports.handler = (event, context) => {
<|file_name|>did.rs<|end_file_name|><|fim▁begin|>use {ErrorCode, IndyError}; use std::ffi::CString; use futures::Future; use ffi::did; use ffi::{ResponseEmptyCB, ResponseStringCB, ResponseStringStringCB}; use utils::callbacks::{ClosureHandler, ResultHandler}; use {CommandHandle, WalletHandle, Po...
<|file_name|>process.py<|end_file_name|><|fim▁begin|># stdlib from collections import defaultdict import time # 3p import psutil # project from checks import AgentCheck from config import _is_affirmative from utils.platform import Platform DEFAULT_AD_CACHE_DURATION = 120 DEFAULT_PID_CACHE_DURATION = 120 ATTR_TO_M...
<|file_name|>DefaultBookmarks_rc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Resource object code # # Created by: The Resource Compiler for PyQt5 (Qt v5.4.1) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x01\xf1\ \x00\ \x00\x09\x00\x78...
\x45\xd7\xaa\x48\x7a\x60\x70\x8a\x53\x71\xe1\xdd\x4c\x1f\x2b\x3b\ \x64\x04\x0b\xf8\xbc\x13\xe9\xcb\x45\x7b\xf2\x73\x60\x21\xba\xa2\ \x2c\xee\xcc\xfb\x75\xf3\x1d\x7b\xfb\x23\xf3\x1b\xc5\xa5\x8d\x58\ \
<|file_name|>ik.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2020 Stephane Caron <stephane.caron@normalesup.org> # # This file is part of pymanoid <https://github.com/stephane-caron/pymanoid>. # # pymanoid is free software: you can redistribute it and/or modify it...
<|file_name|>directconnect.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "directconnect")] extern crate rusoto; use rusoto::directconnect::{DirectConnectClient, DescribeConnectionsRequest, DescribeConnectionsError}; use rusoto::{DefaultCredentialsProvider, Region}; use rusoto::default_tls_client; #[test] fn shoul...
<|file_name|>foundation.js<|end_file_name|><|fim▁begin|>/* * Foundation Responsive Library * http://foundation.zurb.com * Copyright 2015, ZURB * Free to use under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function ($, window, document, undefined) { 'use strict'; var header_hel...
// Description:
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>/* * Angular 2 decorators and services */ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import {LocationStrategy, PlatformLocation, Location} from '@angular/common'; import * as $ from 'jquery'; import {AppRunner} from './c...
titlee = titlee.slice(1); if ('/login' === titlee) { return false; } else {
<|file_name|>provider.ts<|end_file_name|><|fim▁begin|>'use strict'; import * as ev from 'events'; import * as vsc from 'vscode'; import * as dcdUtil from './dcd/util'; import * as dscannerUtil from './dscanner/util'; import * as misc from './misc'; import Dub from './dub'; import Server from './dcd/server'; import Cli...
<|file_name|>PlaceAskOrder.java<|end_file_name|><|fim▁begin|>package nxt.http; import nxt.Account; import nxt.Attachment; import nxt.Constants; import nxt.NxtException; import nxt.util.Convert; import org.json.simple.JSONStreamAware; import javax.servlet.http.HttpServletRequest; import static nxt.http.JSONResponses....
String quantityValue = req.getParameter("quantity");
<|file_name|>mod_binaries.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017, All Contributors (see CONTRIBUTORS file) // // 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...
<|file_name|>config_file.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************/ /* config_file.cpp */ /*************************************************************************/ /* This file...
return; // ? values[p_section].erase(p_key); if (values[p_section].empty()) { values.erase(p_section);
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>""" pyfire.contact ~~~~~~~~~~ Handles Contact ("roster item") interpretation as per RFC-6121 :copyright: 2011 by the pyfire Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import xml.etree.ElementTree as ET ...
return cont
<|file_name|>shared.spec.ts<|end_file_name|><|fim▁begin|>import {HarnessLoader} from '@angular/cdk/testing'; import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed'; import {Component} from '@angular/core'; import {ComponentFixture, TestBed} from '@angular/core/testing'; import {ReactiveFormsModule} from...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url from volunteers import views urlpatterns = patterns('', #url(r'^$', views.index, name='volunteer_index'), #url(r'^(?P<volunteer_id>\d+)/$', views.volunteer_detail, name='volunteer_detail'), #url(r'^AddTask...
)
<|file_name|>server.js<|end_file_name|><|fim▁begin|>const express = require("express"); const app = express();<|fim▁hole|>app.set('port', (process.env.PORT || 3000)); const getData = require('./src/server/api/getData'); const setup = require('./src/server/api/setupApi'); app.engine('html', require('ejs').renderFile);...
<|file_name|>deck.core.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:fd2ad8a08df37f7b13dad35da22197faf51ef6887162bf5f74ce30df59fdba0f size 15638
<|file_name|>helper.go<|end_file_name|><|fim▁begin|>// Protocol Buffers for Go with Gadgets // // Copyright (c) 2013, The GoGo Authors. All rights reserved. // http://github.com/gogo/protobuf // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the follow...
set.File[i] = g.allFiles[i].FileDescriptorProto } return set
<|file_name|>opening_a_file.py<|end_file_name|><|fim▁begin|># # Place a file called test.txt in the same directory as you place this program... # f = open('test.txt') s = f.read()<|fim▁hole|><|fim▁end|>
print(s)
<|file_name|>Ghastly.js<|end_file_name|><|fim▁begin|>import { Client } from 'discord.js'; import { isFunction, isRegExp, isString } from 'lodash/lang'; import CommandRegistry from '../command/CommandRegistry'; import Dispatcher from './dispatcher/Dispatcher'; import ServiceContainer from './services/ServiceContainer'; ...
<|file_name|>flags.rs<|end_file_name|><|fim▁begin|>pub struct StatusFlags { pub carry: bool, pub zero: bool,<|fim▁hole|> pub overflow: bool, pub sign: bool, } impl StatusFlags { pub fn to_u8(&self) -> u8 { let carry = if self.carry { 0x01 } else { 0 }; let zero = if self.zero { 0x02 ...
pub interrupt_disabled: bool, pub decimal: bool, pub breakpoint: bool, pub unused: bool,
<|file_name|>TestStepFirstWorkflowStrategy.java<|end_file_name|><|fim▁begin|>/* * Copyright 2016 SimplifyOps, Inc. (http://simplifyops.com) * * 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 a...
assertEquals("user1", executionContext.getUser()); assertEquals(nodeset, executionContext.getNodeSelector());
<|file_name|>webapis-notification.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ ((_global: any) => { // patch Notification patc...
if (!desc || !desc.configurable) { return; } const patchOnProperties = (Zone as any)[(Zone as any).__symbol__('patchOnProperties')];
<|file_name|>IUsuario.java<|end_file_name|><|fim▁begin|>/*** Copyright (c) 2011, 2014 Hércules S. S. José Este arquivo é parte do programa Imobiliária Web. Imobiliária Web é um software livre; você pode redistribui-lo e/ou modificá-lo dentro dos termos da Licença Pública Geral Menor ...
mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from rest_framework import serializers from accesslog.models import AccessLog, DaySummary, MonthSummary class SourceSerializer(serializers.Serializer): source = serializers.CharField(max_length=200) total = serializers.IntegerF...
<|file_name|>check_url.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys import requests try: url = sys.argv[1] r = requests.get('http://%s' %url ,timeout=3) except requests.exceptions.Timeout: print 'url timeout\n%s' %url sys.exit(2) except: print 'url error \n%s' %u...
sys.exit(2)
<|file_name|>test_util.py<|end_file_name|><|fim▁begin|>from gurtel.util import Url class TestUrl(object): def equal(self, one, two): """ For this test, want to ensure that compare-equal implies hash-equal. """ return (one == two) and (hash(one) == hash(two)) def test_no_qs(se...
Url("http://fake.base/path/?foo=bar&arg=yo"), Url("http://fake.base/path/?arg=yo&foo=bar"))
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import setuptools with open("README.rst") as f: long_description = f.read() setuptools.setup( name='django-diplomacy', version="0.8.0", author='Jeff Bradberry', author_email='jeff.bradberry@gmail.com', description='A play-by-web app for Dipl...
'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Games/Entertainment :: Turn Based Strategy'
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import inspectISOBMFF from "isobmff-inspector"; import render from "./renderer.js"; // -- Feature switching based on the various API support -- if (window.File && window.FileReader && window.Uint8Array) { /** * @param {Event} evt * @returns {Boolean} */ ...
<|file_name|>Draw.py<|end_file_name|><|fim▁begin|>import Log import pygame as Pygame def fillJob(screen, color, job): if hasattr(job, "fillArea"): job.fillArea(color) else:<|fim▁hole|> padding = job.border_width Pygame.draw.rect( screen, color, ...
padding = 0 if hasattr(job, "border_width"): ## Workaround
<|file_name|>morph_clustering_on_bbp_features_old_example.py<|end_file_name|><|fim▁begin|>__author__ = 'xiaoxiaol' import numpy as np import pylab as pl import scipy import pandas as pd import seaborn as sns import os import sys, getopt from scipy.cluster import hierarchy import platform from scipy.stats.stats import...
<|file_name|>sortables.py<|end_file_name|><|fim▁begin|>from copy import deepcopy, copy from django.contrib import admin from django.contrib.admin.views.main import ChangeList from django.contrib.contenttypes.admin import GenericTabularInline, GenericStackedInline from django.forms import ModelForm, NumberInput from dja...
self.ordering = (self.sortable,) self.fields = self.fields or [] if self.fields and self.sortable not in self.fields:
<|file_name|>explicit_cast_specialisations.hpp<|end_file_name|><|fim▁begin|>/* ///////////////////////////////////////////////////////////////////////// * File: stlsoft/conversion/internal/explicit_cast_specialisations.hpp * * Purpose: Specialisations of explicit_cast * * Created: 13th August 2...
STLSOFT_TEMPLATE_SPECIALISATION class explicit_cast<signed int const&> {
<|file_name|>version.py<|end_file_name|><|fim▁begin|># Do not edit this file, pipeline versioning is governed by git tags<|fim▁hole|><|fim▁end|>
__version__="1.0.1"
<|file_name|>patch-base__security_unittest.cc<|end_file_name|><|fim▁begin|>--- ./base/security_unittest.cc.orig 2014-04-30 22:41:43.000000000 +0200 +++ ./base/security_unittest.cc 2014-05-04 14:38:46.000000000 +0200 @@ -159,7 +159,7 @@ // FAILS_ is too clunky. void OverflowTestsSoftExpectTrue(bool overflow_detected) ...
-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX)