prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>UserProfile.test.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { shallow } from 'enzyme'; import UserProfile from '../UserProfile';<|fim▁hole|> it('should render <Wrapper />', () => { const wrapper = shallow(<UserProfile />); expect(wrapper.find(Wrapper).length).toEqual(1); ...
import Wrapper from '../Wrapper'; describe('<UserProfile />', () => {
<|file_name|>UserClient.java<|end_file_name|><|fim▁begin|>// *************************************************************************** // * Copyright 2014 Joseph Molnar // * // * Licensed under the Apache License, Version 2.0 (the "License"); // * you may not use this file except in compliance with the License. //...
this.methods[ 0 ] = this.defineMethod( "get_user", User.class, HttpVerb.GET, "users/{id}" ) .definePathParameter("id", ObjectId.class )
<|file_name|>GuiSchematicMaterialsSlot.java<|end_file_name|><|fim▁begin|>package com.github.lunatrius.schematica.client.gui; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiSlot; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.resources.I18n; import net.minecraft...
this.guiSchematicMaterials.drawString(this.minecraft.fontRenderer, amount, x + 215 - this.minecraft.fontRenderer.getStringWidth(amount), y + 6, 0xFFFFFF); } }
<|file_name|>ascribe_user_type.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // optio...
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at
<|file_name|>mock-heroes.ts<|end_file_name|><|fim▁begin|>import {Hero} from './hero'; export const HEROES: Hero[] = [ {id: 11, name: 'Mr. Nice'}, {id: 12, name: 'Narco'}, {id: 13, name: 'Bombasto'}, {id: 14, name: 'Celeritas'}, {id: 15, name: 'Magneta'}, {id: 16, name: 'RubberMan'}, {id: 17...
{id: 18, name: 'Dr IQ'}, {id: 19, name: 'Magma'},
<|file_name|>index1.js<|end_file_name|><|fim▁begin|>$(document).ready(function() { var text = $("#hSleep").text(); var results = []; var data = []; results = text.split(","); // alert(results); console.log("results: " + text); for(var i = results.length-1; i >= 0; i--) { data.push([new...
hoverable: true //IMPORTANT! this is needed for tooltip to work }, xaxis: { mode: "time",
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Provides dedicated `system` pipelines inside OrbTk. //! //! System pipelines are modules, that handle specific tasks when //! iteratively walking the widget tree. Because each widget //! implements the `state` trait, all system modules are accessible. //! Pipelines a...
<|file_name|>irrigation.ts<|end_file_name|><|fim▁begin|>/// <reference path="../defs/metahub.d.ts" /> /// <reference path="bloom.d.ts" /> import MetaHub = require('metahub') export interface IRequest { id? action? parameters? path? path_string? } export class Irrigation extends MetaHub.Meta_Ob...
<|file_name|>3f289637f530_remove_unused_models.py<|end_file_name|><|fim▁begin|>"""Remove unused models Revision ID: 3f289637f530 Revises: 4ba1dd8c3080 Create Date: 2014-04-17 11:08:50.963964 """ # revision identifiers, used by Alembic. revision = '3f289637f530'<|fim▁hole|> def upgrade(): op.drop_table('aggtestgr...
down_revision = '4ba1dd8c3080' from alembic import op
<|file_name|>jsdocBindingInUnreachableCode.ts<|end_file_name|><|fim▁begin|>// @allowJs: true // @noEmit: true // @checkJs: true<|fim▁hole|> /** * @param {string} s */ const x = function (s) { }; }<|fim▁end|>
// @Filename: bug27341.js if (false) {
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # © 2012-2016 Therp BV <http://therp.nl> # © 2013 Agile Business Group sagl <http://www.agilebg.com> # <lorenzo.battistini@agilebg.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). {<|fim▁hole|> "name": "Account...
<|file_name|>OgreGLDepthBuffer.cpp<|end_file_name|><|fim▁begin|>/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2011 Torus Knot Software Ltd ...
The above copyright notice and this permission notice shall be included in
<|file_name|>UpdateUserController.java<|end_file_name|><|fim▁begin|>package ru.job4j.servlet.services; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import ru.job4j.servlet.model.User; import ru.job4j.servlet.repository.RepositoryException; import ru.job4j.servlet.repository.UserStore; import javax.servle...
<|file_name|>log.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package connmgr import "github.com/abcsuite/abclog" // log is a logger that is initialized with no output filters. This //...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// =================================================================<|fim▁hole|>// * WARNING * // // This file is generated! // // Changes made to this file will be overwritten. If changes are // required to the generated co...
//
<|file_name|>Bus.d.ts<|end_file_name|><|fim▁begin|>import * as Promise from 'bluebird'; export declare class RabbitHutch { static CreateBus(config: IBusConfig): IBus; static CreateExtendedBus(config: IBusConfig): IExtendedBus; } export declare class Bus implements IBus { config: IBusConfig; private stat...
CancelConsumer(consumerTag: string): Promise<IQueueConsumeReply>; DeleteExchange(exchange: string, ifUnused: boolean): void;
<|file_name|>route.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="angular" /> /// <reference types="angular-route" /><|fim▁hole|><|fim▁end|>
export default function ($locationProvider: angular.ILocationProvider, $routeProvider: angular.route.IRouteProvider): void;
<|file_name|>reportcommon.py<|end_file_name|><|fim▁begin|>#!/usr/local/munkireport/munkireport-python2 # encoding: utf-8 from . import display from . import prefs from . import constants from . import FoundationPlist from munkilib.purl import Purl from munkilib.phpserialize import * import subprocess import pwd impor...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate wapc_guest as guest; use guest::prelude::*; #[no_mangle]<|fim▁hole|>pub extern "C" fn wapc_init() { register_function("SayHello", do_hello); } fn do_hello(msg: &[u8]) -> CallResult { let name = std::str::from_utf8(msg)?; let res = host...
<|file_name|>A.cpp<|end_file_name|><|fim▁begin|>/* ======================================== ID: mathema6 TASK: LANG: C++14 * File Name : A.cpp * Creation Date : 10-04-2021 * Last Modified : Tue 13 Apr 2021 11:12:59 PM CEST * Created By : Karel Ha <mathemage@gmail.com> * URL : https://codingco...
* 15m :-/ :-( * 15m (upsolve) * * Status :
<|file_name|>feature_flag_tests.py<|end_file_name|><|fim▁begin|>import unittest import helper.config import mock from vetoes import config <|fim▁hole|>class FeatureFlagMixinTests(unittest.TestCase): def test_that_flags_are_processed_during_initialize(self): settings = helper.config.Data({ 'f...
<|file_name|>bookmarkfiltermodel.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Assistant of the Qt Toolkit. ** **...
{
<|file_name|>pyText2Pdf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*- coding: UTF-8 -*- # File: pyText2Pdf.py # # Derived from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/189858 __docformat__ = 'plaintext' __date__ = '04/10/2013' ''' pyText2Pdf - Python script to convert plain text fil...
d = optlist.__dict__ if d.get('isolatin'): self._IsoEnc=True if d.get('formfeed'): self._doFFs = True
<|file_name|>FormEndpoint.java<|end_file_name|><|fim▁begin|>package com.hcentive.webservice.soap; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.ws.server.endpoint.annotation.Endpoint; import org.springframework.ws.server.endpoint.annotation.PayloadRoot; import org.springfra...
// GetCountryResponse response = new GetCountryResponse(); // response.setCountry(countryRepository.findCountry(request.getName()));
<|file_name|>chart.js<|end_file_name|><|fim▁begin|>(function(window, document){ var chart; var pressure_chart; var lasttime; function drawCurrent(data) { var tempDHT, tempBMP; if (data.count_dht022 > 0) { lasttime = data.humidity[data.count_dht022-1][0]; tempDHT = data.temperature_dht022[da...
datatype: "json",
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// this example showcases speeds metric inference from strings property package main import ( "flag" "time" "github.com/performancecopilot/speed" ) var timelimit = flag.Int("time", 60, "number of seconds to run for") func main() { flag.Parse() c, err := speed....
c.MustStart() defer c.MustStop()
<|file_name|>topology_layer2_testcase.py<|end_file_name|><|fim▁begin|>from mock import patch import networkx as nx from nav.models.manage import SwPortVlan, Vlan from nav.netmap import topology<|fim▁hole|>class TopologyLayer2TestCase(TopologyTestCase): def setUp(self): super(TopologyLayer2TestCase, self).s...
from nav.topology import vlan from .topology_testcase import TopologyTestCase
<|file_name|>32.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
import { TextFill32 } from "../../"; export = TextFill32;
<|file_name|>App.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { Router, Route, IndexRoute } from 'react-router'; import createBrowserHistory from 'history/lib/createBrowserHistory'; import * as views from 'views'; import * as admin from 'views/admin'; import { RouteConstants } from 'constants'; co...
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import shutil from io import BytesIO, TextIOWrapper import logging import os from os.path import expanduser, exists import struct from configobj import ConfigObj from Crypto.Cipher import AES logger = logging.getLogger(__name__) def load_config(usr_cfg, def_cfg=None...
# Read the login key.
<|file_name|>calc.py<|end_file_name|><|fim▁begin|>""" To start UNO for both Calc and Writer: (Note that if you use the current_document command, it will open the Calc's current document since it's the first switch passed) libreoffice "--accept=socket,host=localhost,port=18100;urp;StarOffice.ServiceManager" --norestore ...
from com.sun.star.connection import ConnectionSetupException from com.sun.star.awt.FontWeight import BOLD import sys
<|file_name|>ArithmeticModuleNode.java<|end_file_name|><|fim▁begin|>package com.mauriciotogneri.apply.compiler.syntactic.nodes.arithmetic; import com.mauriciotogneri.apply.compiler.lexical.Token; import com.mauriciotogneri.apply.compiler.syntactic.TreeNode; import com.mauriciotogneri.apply.compiler.syntactic.nodes.Exp...
super(token, left, right); } @Override
<|file_name|>nvd3-test-discreteBarChart.ts<|end_file_name|><|fim▁begin|> namespace nvd3_test_discreteBarChart { var historicalBarChart = [ { key: "Cumulative Return", values: [ { "label": "A", "value": 29.765957771107 ...
"value": 13.925743130903
<|file_name|>C.rs<|end_file_name|><|fim▁begin|>fn main(){ let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let n: u32 = s.trim().parse().unwrap();<|fim▁hole|> for i in 0..n { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let vec: Vec<&str> = s.trim().split(' ')....
let mut t: Vec<u32> = Vec::new(); let mut x: Vec<u32> = Vec::new(); let mut y: Vec<u32> = Vec::new();
<|file_name|>queues.py<|end_file_name|><|fim▁begin|># # Module implementing queues # # multiprocessing/queues.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import sys import os import threading import collections import weakref impor...
<|file_name|>node.py<|end_file_name|><|fim▁begin|>""" EPYNET Classes """ from . import epanet2 from .objectcollection import ObjectCollection from .baseobject import BaseObject, lazy_property from .pattern import Pattern class Node(BaseObject): """ Base EPANET Node class """ static_properties = {'elevation': ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// This file is part of zinc64. // Copyright (c) 2016-2019 Sebastian Jastrzebski. All rights reserved. // Licensed under the GPLv3. See LICENSE file in the project root for full license text. mod help; mod load; mod ls; mod parser; mod reset; use std::io::Write; use st...
use self::help::HelpCommand; use self::load::LoadCommand; use self::ls::LsCommand; use self::parser::Parser;
<|file_name|>ObjJasmineSpec.js<|end_file_name|><|fim▁begin|>'use strict'; describe("Divhide.Obj", function () { beforeEach(function () { jasmine.addMatchers(window.JasmineCustomMatchers); }); it("Divhide.Specs.ObjExample", function () { Divhide.Specs.ObjExample(); }); /** *...
it("array with identation should return a valid string", function () {
<|file_name|>signal_handlers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either ...
try: obj = model.objects.get(pk=pk) except model.DoesNotExist:
<|file_name|>viewsets.py<|end_file_name|><|fim▁begin|>from django_filters.rest_framework import DjangoFilterBackend from rest_framework.decorators import action from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.viewsets import ModelViewSet<|fim▁hole|...
from rdmo.core.exports import XMLResponse
<|file_name|>presets.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for parser and parser plugin presets.""" from __future__ import unicode_literals import unittest from plaso.containers import artifacts from plaso.parsers import presets from tests import test_lib as shared_...
class ParserPresetTest(shared_test_lib.BaseTestCase): """Tests for the parser and parser plugin preset."""
<|file_name|>test_task_manager.py<|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/. from unittest import mock from configman.dotdict import ...
tm = MyTaskManager(config, task_func=mock.Mock())
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # pynag - Python Nagios plug-in and configuration environment # Copyright (C) 2010 Drew Stinnet # # 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 ...
def stat(self, *args, **kwargs):
<|file_name|>transfer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2007 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 Lesser General...
__storm_table__ = 'transfer_order_item'
<|file_name|>addons.py<|end_file_name|><|fim▁begin|>from base import IfbyphoneApiBase class Addons(IfbyphoneApiBase): def list(self): """List all purchased Addons for an account """ self.options['action'] = 'addons.list' return self.call(self.options) def purc...
item_id -- ID number of desired addon qty -- the quantity of the addon send_receipt -- set to 1 to send a receipt to account email
<|file_name|>clear_cache.py<|end_file_name|><|fim▁begin|>"""Clears the Cache""" from django.core.cache import cache from django.core.management.base import BaseCommand class Command(BaseCommand): """ Clears the Cache """ help = "Clears the Cache" def handle(self, **options): """Clear...
self.stdout.write('Cleared cache\n')
<|file_name|>Solution.java<|end_file_name|><|fim▁begin|>import java.util.Scanner; /** * @author Oleg Cherednik * @since 13.07.2018 */ public class Solution { static int palindromeIndex(String s) { for (int i = 0, j = s.length() - 1; i < j; i++, j--) { if (s.charAt(i) == s.charAt(j)) ...
public static void main(String[] args) { int q = scanner.nextInt();
<|file_name|>shapepack.py<|end_file_name|><|fim▁begin|>import woo.core, woo.dem from woo.dem import * import woo.utils from minieigen import * from math import *<|fim▁hole|>for p in [woo.utils.sphere((0,0,0),1,mat=m),woo.utils.ellipsoid((0,0,0),semiAxes=(.8,1,1.2),mat=m),woo.utils.ellipsoid((0,0,0),semiAxes=(1.,1.,1.),...
from woo import utils m=woo.utils.defaultMaterial() zeroSphere=woo.utils.sphere((0,0,0),.4) # sphere which is entirely inside the thing
<|file_name|>models.py<|end_file_name|><|fim▁begin|># follow/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from datetime import datetime, timedelta from django.db import models from election.models import ElectionManager from exception.models import handle_exception, handle_record_found_more_...
count_result = None try: count_query = FollowIssue.objects.using('readonly').all()
<|file_name|>isr.rs<|end_file_name|><|fim▁begin|>// Zinc, the bare metal stack for rust. // Copyright 2014 Vladimir "farcaller" Pouzanov <farcaller@gmail.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 cop...
#[path="lpc17xx/isr.rs"] pub mod isr_lpc17xx; #[cfg(feature = "mcu_k20")] #[path="k20/isr.rs"] pub mod isr_k20;
<|file_name|>SchemaColumn.java<|end_file_name|><|fim▁begin|>/* This file is part of VoltDB. * Copyright (C) 2008-2013 VoltDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, ei...
import org.json_voltpatches.JSONException;
<|file_name|>TempFileUtilsTest.java<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2017 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 th...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Combines sequences of arithmetic or logical instructions into single instructions. //! For every instruction, try to combine one of its operands into itself. This //! transforms linear data-dependency chains into trees. use crate::analysis::analyzer::{ Action, A...
impl fmt::Debug for CombinableOpInfo { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { use self::CombinableOpConstInfo as COCI;
<|file_name|>struct-no-fields-3.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....
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup, find_packages from pip.req import parse_requirements #REQUIREMENTS_FILE = os.path.join( os.path.dirname(__file__), 'requirements.openshift.txt') PROJECT_NAME = '<your-project-name>' AUTHOR_NAME = '<your-name>' AUTHOR_EMAIL = '<...
version='1.0', author=AUTHOR_NAME,
<|file_name|>gr-thread-list_test.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright (C) 2018 The Android Open Source Project * * 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 * ...
});
<|file_name|>test-async.js<|end_file_name|><|fim▁begin|>/** * NOTE: We are in the process of migrating these tests to Mocha. If you are * adding a new test, consider creating a new spec file in mocha_tests/ */ var async = require('../lib/async'); if (!Function.prototype.bind) { Function.prototype.bind = func...
test.equal(err, 'error');
<|file_name|>content.py<|end_file_name|><|fim▁begin|>import re import uuid from xmodule.assetstore.assetmgr import AssetManager XASSET_LOCATION_TAG = 'c4x' XASSET_SRCREF_PREFIX = 'xasset:' XASSET_THUMBNAIL_TAIL_NAME = '.jpg' STREAM_DATA_CHUNK_SIZE = 1024 import os import logging import StringIO from urlparse impor...
<|file_name|>test_geomutils.py<|end_file_name|><|fim▁begin|>#!/bin/env python #Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details __version__='''$Id: test_geomutils.py 3355 2009-01-08 14:58:44Z jonas $'''<|fim▁hole|>setOutDir(__name__) class GeomTestCase(unittest.TestCase): def test_pa...
__doc__="""Tests for geometry utility functions.""" import unittest from reportlab.lib.testutils import setOutDir,makeSuiteForClasses
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys from os import path <|fim▁hole|><|fim▁end|>
current_dir = path.dirname(__file__) sys.path.insert(0, path.join(path.dirname(current_dir), 'wdom'))
<|file_name|>channel_mpsc.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 serde::{Deserialize, Deserializer, Serialize, Serial...
unreachable!(); } }
<|file_name|>unnamed_argument_mode.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.apac...
}
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># https://djangosnippets.org/snippets/690/ import re from django.template.defaultfilters import slugify def unique_slugify(instance, value, slug_field_name='slug', queryset=None, slug_separator='-'): """ Calculates and stores a unique slug ...
if separator == '-' or not separator: re_sep = '-'
<|file_name|>PMMLDocumentMetadataProviderTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2019 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at ...
callback.onSuccess(pmmlDocuments);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import click def incomplete(package): click.echo('{} packages not yet implemented'.format(package)) @click.group() def run(): '''Build packages inside Docker containers.''' pass @click.command() @click.option('--image', '-i', help='image to build in',...
<|file_name|>global-styles.js<|end_file_name|><|fim▁begin|>import { createGlobalStyle } from 'styled-components'; const GlobalStyle = createGlobalStyle` .ant-breadcrumb { display: flex; align-items: center; font-size: 10px; color: #818181; border-bottom: 1px solid #ccc;<|fim▁hole|><|fim▁end|>
} `; export default GlobalStyle;
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>use uuid::Uuid; use std::str::FromStr; use std::fmt; use version; #[derive(Clone,Debug)] pub struct SessionConfig { pub user_agent: String, pub device_id: String, } impl Default for SessionConfig { fn default() -> SessionConfig { let device_id =...
Computer = 1, Tablet = 2, Smartphone = 3, Speaker = 4,
<|file_name|>screen_error_message.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileoverview Offline message screen implementation. */ cr.define('login', ...
function f(e) { offlineMessage.removeEventListener('webkitTransitionEnd', f); if (offlineMessage.classList.contains('faded')) offlineMessage.classList.add('hidden');
<|file_name|>devmapper_wrapper.go<|end_file_name|><|fim▁begin|>// +build linux,cgo package devicemapper // import "github.com/docker/docker/pkg/devicemapper" /* #define _GNU_SOURCE #include <libdevmapper.h> #include <linux/fs.h> // FIXME: present only for BLKGETSIZE64, maybe we can remove it? // FIXME: Can't we fi...
DmTaskSetMessage = dmTaskSetMessageFct DmTaskSetName = dmTaskSetNameFct
<|file_name|>show.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Show, ShowResponse } from './show'; import { DiskService } from '../disk/disk.service'; import { SettingsService } from '../settings'; import { UserService } fr...
return this.settings.api_base() + 'regularfilmshow/' + id + '/vote/'; } constructor(
<|file_name|>status.py<|end_file_name|><|fim▁begin|>""" This example demonstrate how status works """ from juju import jasyncio from juju import loop import logging import sys from logging import getLogger from juju.model import Model from juju.status import formatted_status LOG = getLogger(__name__)<|fim▁hole|> asyn...
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
<|file_name|>mod.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.org/licens...
u8_val = u8_val.wrapping_add(1); assert_eq!(from_str::<u8>("0"), Some(u8_val));
<|file_name|>CharTypes.cpp<|end_file_name|><|fim▁begin|>#include "CharTypes.h" namespace GeneHunter { <|fim▁hole|>bool firstMatchSecond( char c1, char c2 ) { if ( c1 == c2 ) return true; if ( c1 == 'U' and c2 == 'T' ) return true; if ( c1 == 'T' and c2 == 'U' ) return true; if ( c1 == 'K' and ( c2 == '...
<|file_name|>GenEdLookup.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd import pickle <|fim▁hole|> picklepath = "data\\dietrich_gen_eds.p" try: with open(picklepath,'rb') as file: gen_eds = pickle.load(file) except: df = pd.read_csv(fileName,names=...
# Return 0 or 1 based on whether Course fulfills a General Education Requirement def lookupGenEd(cNum, college): fileName = "data/Dietrich Gen Eds.csv"
<|file_name|>mozvisibility.js<|end_file_name|><|fim▁begin|>;(function() { MozVisibility = { _MAX_TRIES: 10, _date: new Date, _tries: 0, _timer: null, _isVisible: undefined, _proxy: function(fn, context) { context = context || window; return function() { fn.apply(context, arguments); ...
this._timer = setTimeout(this._invisibilityCheckTimeout, 0);
<|file_name|>ychenik_search.js<|end_file_name|><|fim▁begin|>(function ($) { Drupal.ychenikSearch = {}; /** * jQuery plugin. */ $.fn.ychenikSearch = function (stars) { stars = stars || 0; this.each(function () { $(this).addClass('ychenik-search').find('label').each(function () { var context = this.for...
if ($field.val() === initial_value || $field.val() === '') { $label.fadeOut('fast'); }
<|file_name|>pre_gen_project.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
project_slug = '{{ cookiecutter.project_slug }}' if hasattr(project_slug, 'isidentifier'): assert project_slug.isidentifier(), 'Project slug should be valid Python identifier!'
<|file_name|>SbcTest.java<|end_file_name|><|fim▁begin|>package com.nes.processor; import com.nes.NesAbstractTst; import org.junit.Test; /** * * @author Dmitry */ public class SbcTest extends NesAbstractTst { @Test public void testSbc() { String[] lines; lines = new String[]{ ...
};
<|file_name|>extern-crosscrate.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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.o...
fn fact(n: uint) -> uint { unsafe { debug!("n = %?", n);
<|file_name|>filter-4.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from gwpy.plotter import FrequencySeriesPlot plot = FrequencySeriesPlot(whiteasd, dispasd, sep=True, sharex=True, label=None)
<|file_name|>jquery.bgiframe.unminified.js<|end_file_name|><|fim▁begin|>/*! Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net) * Licensed under the MIT License (LICENSE.txt). * * Version 3.0.0 */ (function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anon...
if (!$.isFunction(s.conditional)) { var condition = s.conditional; s.conditional = function() { return condition; }; }
<|file_name|>Request.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enume...
* @param {string} query * @param {array} keys * @param {array} results
<|file_name|>test_topo_map.py<|end_file_name|><|fim▁begin|>import json from c2corg_api.models.route import Route from c2corg_api.models.topo_map import ArchiveTopoMap, TopoMap, MAP_TYPE from c2corg_api.models.topo_map_association import TopoMapAssociation from c2corg_api.models.waypoint import Waypoint from c2corg_api...
<|file_name|>steamapi.js<|end_file_name|><|fim▁begin|>"use strict"; var request = require(__dirname + "/request"); var db = require(__dirname + "/db"); /** * Steam utils */ var steamapi = {}; /** * Request to our api * @param {string} type * @param {string[]} ids * @param {function} callback */ steamapi.reque...
} catch (e) { console.error(new Date(), "Steamapi cleanup failed", e, e.stack);
<|file_name|>parse_options.cpp<|end_file_name|><|fim▁begin|>/** \file parse_options.cpp \author michael.zohner@ec-spride.de \copyright ABY - A Framework for Efficient Mixed-protocol Secure Two-party Computation Copyright (C) 2015 Engineering Cryptographic Protocols Group, TU Darmstadt This program is free s...
<|file_name|>SimDigital.cpp<|end_file_name|><|fim▁begin|>/*************** <auto-copyright.pl BEGIN do not edit this line> ************** * * VR Juggler is (C) Copyright 1998-2011 by Iowa State University * * Original Authors: * Allen Bierbaum, Christopher Just, * Patrick Hartling, Kevin Meinert, * Carolina...
} // End of gadget namespace
<|file_name|>test_commands.py<|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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. #
<|file_name|>utils.go<|end_file_name|><|fim▁begin|>package core import ( "crypto/sha256" "errors" "strings" "time" "github.com/OpenBazaar/wallet-interface" "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/golang/protobuf/ptypes" google_protobuf "github.com/golang/protobuf/ptypes/timestamp" util "gx...
}
<|file_name|>cloud9.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> use rusoto_cloud9::{Cloud9, Cloud9Client, ListEnvironmentsRequest}; use rusoto_core::Region; #[test] fn should_list_environments() { let client = Cloud9Client::new(Region::UsEast1); let request = ListEnvironmentsRequest::default(); let resul...
#![cfg(feature = "cloud9")] extern crate rusoto_core; extern crate rusoto_cloud9;
<|file_name|>FileSerializer.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2012 Orbeon, Inc. * * 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 the Free Software Foundation; either version * 2.1 of the Licens...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015 by Clearcode <http://clearcode.cc> # and associates (see AUTHORS). # This file is part of matchbox. # matchbox is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published b...
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # You should have received a copy of the GNU Lesser General Public License
<|file_name|>SyspropsMapWrapper.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to yo...
public Object remove(Object key) { throw new UnsupportedOperationException("sysprops#remove(" + key + ") N/A"); }
<|file_name|>test_gem.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- "Fully test this module's functionality through the use of fixtures." from megacosm.generators import Gem<|fim▁hole|>import fixtures class TestGem(unittest.TestCase): def setUp(self): """ """ sel...
import unittest2 as unittest import fakeredis from config import TestConfiguration
<|file_name|>nfc.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { IconBaseProps } from 'react-icon-base';<|fim▁hole|><|fim▁end|>
export default class MdNfc extends React.Component<IconBaseProps, any> { }
<|file_name|>hws_cascaded_configer.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- __author__ = 'q00222219@huawei' import time from heat.openstack.common import log as logging import heat.engine.resources.cloudmanager.commonutils as commonutils import heat.engine.resources.cloudmanager.constant as constant imp...
self._config_az_cascaded()
<|file_name|>11.py<|end_file_name|><|fim▁begin|># In the 20x20 grid below, four numbers along a diagonal line have been marked in red. # 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 # 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 # 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 6...
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50 \ 32 98 81 28 64 23 67 10 26 38 40 67 59 54 70 66 18 38 64 70 \ 67 26 20 68 02 62 12 20 95 63 94 39 63 08 40 91 66 49 94 21 \
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ $(document).ready(function(){ var oldAction = $('#comment-form').attr("action"); hljs.initHighlightingOnLoad(); $('#coolness div').hover(...
$("#comment-form").attr("action", action);
<|file_name|>stock.py<|end_file_name|><|fim▁begin|>import numpy as np class Stock: """ Class to represent the data and ratios of a stock. """ def __init__(self, eps, dps, roe=0): ''' eps: earnings per share. dps: dividends per share. roe: fractional return on equ...
Returns the dividend cover for the stock (alias for retention_ratio). ''' return self.retention_ratio()
<|file_name|>TabSet.js<|end_file_name|><|fim▁begin|>import React, { Fragment } from 'react' import noop from '@utils/noop' const DEFAULT_TAB = { id: 'blank', onClick: noop, renderTab: () => <div />, renderContents: () => <div />, } const TabSet = ({ activeTabId, buttons, onTabClicked = noop, showTabs = true, ...
'tab',
<|file_name|>Robot_sr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sr" sourcelanguage="en"> <context> <name>CmdRobotAddToolShape</name> <message> <location filename="../../CommandInsertRobot.cpp" line="215"/> <source>Robot</source...