prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test-fs-open-close.js<|end_file_name|><|fim▁begin|>// Copyright IBM Corp. 2014. All Rights Reserved. // Node module: async-tracker // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT var assert = require('assert'); require('../index.js'); var fs...
fs.close(fd, closeCallback);
<|file_name|>resultsChartController.js<|end_file_name|><|fim▁begin|>(function(){ angular .module("InteractionDesign") .controller("ResultsChartController", ResultsChartController); function ResultsChartController($scope, $location) { $scope.$location = $location; var data1 = [ ...
<|file_name|>socket.rs<|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 Apach...
/// /// Create a `TTcpChannel`. ///
<|file_name|>logctx.go<|end_file_name|><|fim▁begin|>package logctx import ( "net/http" "sync" "time" "github.com/lestrrat/go-apache-logformat/internal/httputil" ) type clock interface { Now() time.Time } type defaultClock struct{} func (_ defaultClock) Now() time.Time { return time.Now() } var Clock clock =...
ctx.responseContentLength = wrapped.ContentLength() ctx.responseHeader = wrapped.Header() ctx.responseStatus = wrapped.StatusCode()
<|file_name|>povray.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.6.3 (function() { var Stl, stl_parser; stl_parser = require('../parser/stl_parser'); Stl = (function() { function Stl() {} return Stl; })(); Stl.PovRay = (function() { function PovRay() {} PovRay.prototype...
<|file_name|>Square.java<|end_file_name|><|fim▁begin|>package ru.stqa.pft.sandbox; /** * Created by Даниил on 06.05.2017. */ public class Square { public double l; public Square(double l) { this.l = l; } public double area() {<|fim▁hole|>}<|fim▁end|>
return this.l * this.l; }
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># Generated by Django 3.1 on 2020-08-13 19:23 from django.db import migrations, models import django.db.models.deletion import django_countries.fields import uuid class Migration(migrations.Migration): initial = True dependencies = [ ] oper...
migrations.CreateModel( name='Interaction', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
<|file_name|>editor.py<|end_file_name|><|fim▁begin|>"""gui systems to manage actions """ import os from sftoolbox.content import ActionContent, PanelContent from sftoolboxqt import qtgui, qtcore from sftoolboxqt.tree import PanelsModel, PanelsTreeWidget class ActionsTreeWidget(qtgui.QTreeWidget): """tree widget ...
self._project = value
<|file_name|>1____Serial_Device_Settings_Change_Check.py<|end_file_name|><|fim▁begin|>from ImageScripter import *<|fim▁hole|> Viewer.Start() Viewer.CloseAndClean() Configurator.Start() Configurator.inputoutput.Click() addNewComDev(ComType = "Standard Connection",HardwareType = "Serial Port",Comport = '0') addNewDevice(...
from elan import * raise ValueError('fff')
<|file_name|>requested_path.rs<|end_file_name|><|fim▁begin|>use iron::Request; use std::path::{PathBuf, Path}; use std::fs::{self, Metadata}; use std::convert::AsRef; pub struct RequestedPath { pub path: PathBuf, } impl RequestedPath { pub fn new<P: AsRef<Path>>(root_path: P, request: &Request) -> RequestedPa...
} let index_path = self.path.join("index.html");
<|file_name|>live_audio_sample.py<|end_file_name|><|fim▁begin|>import numpy as np<|fim▁hole|>import pyaudio as pa import wave from time import sleep #Constants used for sampling audio CHUNK = 1024 FORMAT = pa.paInt16 CHANNELS = 1 RATE = 44100 # Must match rate at which mic actually samples sound RECORD_TIMEFRAME = 1.0...
import matplotlib.pyplot as plt #Used for graphing audio tests
<|file_name|>ProCamTransformer.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2009,2010,2011,2012 Samuel Audet * * This file is part of JavaCV. * * JavaCV 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 Found...
}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ZoomOut = exports.ZoomIn = exports.SlideRight = exports.SlideLeft = undefined; var _slideLeft = require('./slide-left.scss'); var _slideLeft2 = _interopRequireDefault(_slideLeft);...
var _zoomIn = require('./zoom-in.scss'); var _zoomIn2 = _interopRequireDefault(_zoomIn);
<|file_name|>mapsourceesri.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.0"> <context> <name>MapSourceEsri</name> <message> <location filename="../../plugins/mapsourceesri/mapsourceesri.cpp" line="6"/> <source>Esri map source</source> <translation>Джерело ...
<|file_name|>RemoveAndGreedyFillScript.java<|end_file_name|><|fim▁begin|>package hmod.domain.mkp.scripts; import flexbuilders.core.BuildException; import flexbuilders.core.Buildable; import flexbuilders.scripting.BuildScript; import flexbuilders.tree.BranchBuilder; import flexbuilders.tree.TreeHandler; import static h...
setSubStep(greedyFillStart) );
<|file_name|>webpack.exercise.js<|end_file_name|><|fim▁begin|>var webpack = require("webpack"), HtmlWebpackPlugin = require("html-webpack-plugin"), ExtractTextPlugin = require("extract-text-webpack-plugin"), CopyWebpackPlugin = require("copy-webpack-plugin"), helpers = require("./helpers"); const exercisePath = pr...
<|file_name|>syntax_iterators.py<|end_file_name|><|fim▁begin|>from typing import Union, Iterator from ...symbols import NOUN, PROPN, PRON from ...errors import Errors from ...tokens import Doc, Span def noun_chunks(doclike: Union[Doc, Span]) -> Iterator[Span]: """ Detect base noun phrases from a dependency p...
# Prevent nested chunks from being produced if word.left_edge.i <= prev_end:
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url from django.contrib import admin from rest_framework import routers from courts import views router = routers.DefaultRouter() router.register(r'courts', views.CourtsViewSet) <|fim▁hole|> url(r'^admin/', include(ad...
urlpatterns = patterns('', url(r'^api/v1/', include(router.urls)), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>'use strict'; /** * Rounds a number to decimal places * * @param {number} number to be rounded * @param {integer} the number of place to round to * @param {String} the rounding method to be used * @returns {number} the number rounded to places */ f...
<|file_name|>MineralArmorInfo.java<|end_file_name|><|fim▁begin|>/* This file is part of Arkhados. Arkhados 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 optio...
effect.addToCharacter(params); return effect; } }
<|file_name|>LanguageDialog.ts<|end_file_name|><|fim▁begin|>namespace sharp.Serene.Administration { @Serenity.Decorators.registerClass() export class LanguageDialog extends Serenity.EntityDialog<LanguageRow, any> { protected getFormKey() { return LanguageForm.formKey; } protected getIdProperty...
}
<|file_name|>android.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/license...
<|file_name|>command-handlers.js<|end_file_name|><|fim▁begin|><|fim▁hole|> function fixImports() { let editor = atom.workspace.getActiveTextEditor() if (editor) { // fixImports(editor) // editor.selectLinesContainingCursors() } } module.exports = { fixImports, };<|fim▁end|>
'use strict';
<|file_name|>describe.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/L...
Args:
<|file_name|>pyunit_mnist_manyCols_gbm_large.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def mnist_many_cols_gbm_large(): train = h2o.import_file(path=pyunit_utils.locate("bigdata/lapto...
if __name__ == "__main__":
<|file_name|>LCExtension.cc<|end_file_name|><|fim▁begin|>//# LCExtension.cc: Extend an LCRegion along straight lines to other dimensions //# Copyright (C) 1998,2001 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms o...
// Fill the other members variables and determine the bounding box. fill (extendAxes, extendBox);
<|file_name|>WatchLeakTest.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 you under...
sk.attach(nioCnxn);
<|file_name|>configureStore.js<|end_file_name|><|fim▁begin|>import { createStore, compose, applyMiddleware } from 'redux'; import reduxImmutableStateInvariant from 'redux-immutable-state-invariant'; import thunk from 'redux-thunk'; import axios from 'axios'; import axiosMiddleware from 'redux-axios-middleware'; import ...
initialState, composeEnhancers(applyMiddleware(...middlewares)) );
<|file_name|>foursquares.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>remaining two are in random colors. """ from turtlegraphics import Turtle import random def drawSquare(turtle, x, y, length): turtle.up() turtle.move(x, y) turtle.setDirection(270) turtle.down() for count in xrange(4): ...
File: foursquares.py Draws squares in the corners of a turtle window. One square is black, another is gray, and the
<|file_name|>method-ambig-one-trait-unknown-int-type.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 ...
// (prompting the mismatched types error) but does not influence the choice // of what kind of `Vec` we have, eventually leading to a type error.
<|file_name|>TmgProtocol.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 - 2018 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>use std::io::Write; use termion::event::Key; use Editor; pub type EventHandler<'a, W> = FnMut(Event<W>) + 'a; pub struct Event<'a, 'out: 'a, W: Write + 'a> { pub editor: &'a mut Editor<'out, W>, pub kind: EventKind, }<|fim▁hole|> impl<'a, 'out: 'a, W: Write +...
<|file_name|>htmlmediaelement.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 audio_video_metadata; use document_loader::LoadT...
<|file_name|>GofmtBear.py<|end_file_name|><|fim▁begin|>from coalib.bearlib.abstractions.Linter import linter from coalib.bears.requirements.GoRequirement import GoRequirement @linter(executable='gofmt', use_stdin=True, output_format='corrected', result_message='Formatting can be improved.') cl...
AUTHORS = {'The coala developers'} AUTHORS_EMAILS = {'coala-devel@googlegroups.com'} LICENSE = 'AGPL-3.0'
<|file_name|>mainwindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
self.map_window.construct_scene()
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|>package apgo_test import ( "testing" "github.com/igkuz/apgo" ) func TestNewConfig(t *testing.T) { expectedDbName := "sgap_test" expectedDbUser := "root" expectedDbPass := "123" expectedDbDialect := "mysql" config := apgo.NewConfig() if conf...
t.Error("Wrong DB name was configured") } if config.DB["user"] != expectedDbUser {
<|file_name|>as_ref.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)]<|fim▁hole|> // /// Converts the array to immutable slice // fn as_slice(&self) -> &[T]; // /// Converts the array to mutable slice // fn as_mut_slice(&mut self) -> &mut [T]; // } ...
mod tests { use core::convert::AsRef; // pub trait FixedSizeArray<T> {
<|file_name|>widget.configmanager.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. */<|fim▁hole|> 'confignode-modelcfg','controlnode-modelcfg','vrouter-modelcfg', 'databasenode-modelcfg','analyticsnode-modelcfg','monitor-infra-modelcfg', 'secur...
define([ 'lodash', 'controlnode-widgetcfg', 'vrouter-widgetcfg','databasenode-widgetcfg', 'analyticsnode-widgetcfg','confignode-widgetcfg','monitor-infra-widgetcfg', 'security-dashboard-widgetcfg',
<|file_name|>expanded-cfg.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/li...
// except according to those terms. // skip-codegen
<|file_name|>ajv-bsontype-tests.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>ajvBsontype(ajv);<|fim▁end|>
import Ajv from 'ajv'; import ajvBsontype = require('ajv-bsontype'); const ajv = new Ajv();
<|file_name|>sites.py<|end_file_name|><|fim▁begin|>import sys from functools import update_wrapper from future.utils import iteritems from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models.base import ModelBase from django.utils import six from django.views.decora...
# self.check_dependencies()
<|file_name|>block_test_util.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The go-ethereum Authors // This file is part of the go-ethereum library. // // The go-ethereum library is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // ...
<|file_name|>number.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Servo Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LIC...
mem::transmute(&value)); Some(TCFType::wrap_under_create_rule(number_ref)) } }
<|file_name|>symlink.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright 2003 Dave Abrahams # Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test the 'symlink' rule. import os impo...
t.write("jamfile.jam", """ exe hello : hello.cpp ; symlink hello_release : hello/<variant>release ;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Version code adopted from Django development version. https://github.com/django/django """ VERSION = (0, 7, 2, 'final', 0) def get_version(version=None): """ Returns a PEP 386-compliant version number from VERSION. """ i...
Returns a numeric identifier of the latest git changeset. The result is the UTC timestamp of the changeset in YYYYMMDDHHMMSS format.
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* Copyright 2017 Jinjing Wang This file is part of mtcp. mtcp is free software: you can redistribute it and/or modify<|fim▁hole|>the Free Software Foundation, either version 3 of the License, or (at your option) any later version. mtcp is distributed in the hope tha...
it under the terms of the GNU General Public License as published by
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"""Implements a widget that displays the player's current commitments."""
<|file_name|>clean.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import r...
# listify to avoid updating dict while iterating over it for k in list(dirty.keys()):
<|file_name|>test_form.py<|end_file_name|><|fim▁begin|>from constance.admin import ConstanceForm from django.forms import fields from django.test import TestCase class TestForm(TestCase): def test_form_field_types(self): f = ConstanceForm({}) self.assertIsInstance(f.fields['INT_VALUE'], fields....
# from CONSTANCE_ADDITIONAL_FIELDS self.assertIsInstance(f.fields['CHOICE_VALUE'], fields.ChoiceField)
<|file_name|>e424d03ba260_.py<|end_file_name|><|fim▁begin|>"""empty message Revision ID: e424d03ba260 Revises: ace8d095a26b Create Date: 2017-10-12 11:25:11.775853 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'e424d03ba260' down_revision = 'ace8d095a26b' bra...
<|file_name|>issue-19982.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. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
} fn main() {}
<|file_name|>hostname.go<|end_file_name|><|fim▁begin|><|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 // distributed u...
// Copyright 2015-2017 trivago GmbH // // Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>duplicated-external-mods.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or...
<|file_name|>lsm6ds33.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Python library module for LSM6DS33 accelerometer and gyroscope. This module for the Raspberry Pi computer helps interface the LSM6DS33 accelerometer and gyro.The library makes it easy to read the raw accelerometer and gyro data through I²...
# Check if accelerometer has been enabled if not self.is_accel_enabled:
<|file_name|>Insanity.js<|end_file_name|><|fim▁begin|>import Analyzer from 'parser/core/Analyzer'; import RESOURCE_TYPES from 'game/RESOURCE_TYPES'; class Insanity extends Analyzer { _insanityEvents = []; on_toPlayer_energize(event) { if (event.resourceChangeType === RESOURCE_TYPES.INSANITY.id) { this._...
} get events() { return this._insanityEvents;
<|file_name|>a30_entityAction.js<|end_file_name|><|fim▁begin|>/** @module breeze **/ var EntityAction = (function () { /** EntityAction is an 'Enum' containing all of the valid actions that can occur to an 'Entity'. @class EntityAction @static **/ var entityActionMethods = { isAttach: function () { ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#![cfg(target_os = "ios")] use GlAttributes; use CreationError; use PixelFormat; use PixelFormatRequirements; use ContextError; pub use api::ios::*; #[derive(Default)] pub struct PlatformSpecificHeadlessBuilderAttributes; pub struct HeadlessContext(i32); impl Headle...
unimplemented!()
<|file_name|>environment.ts<|end_file_name|><|fim▁begin|>// The file contents for the current environment will overwrite these during build. // The build system defaults to the dev environment which uses `environment.ts`, but if you do // `ng build --env=prod` then `environment.prod.ts` will be used instead. // The lis...
functionEndPoint: 'http://localhost:7071/api/SessionAttendeePhotos/api/SessionAttendeePhotos' };
<|file_name|>messages.py<|end_file_name|><|fim▁begin|>import string import socket import base64 import sys class message: def __init__(self, name="generate" ): if name == "generate": self.name=socket.gethostname() else: self.name=name <|fim▁hole|> def set ( self, conte...
self.type="gc" self.decoded=""
<|file_name|>tchannel_client.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2022 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including...
"strings" "time"
<|file_name|>entity-view.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, ViewChild } from '@angular/core'; import { Router, ROUTER_DIRECTIVES } from '@angular/router'; import { ActivatedRoute } from '@angular/router'; import {CORE_DIRECTIVES} from '@angular/common'; import {TAB_DIRECTIVES} from 'n...
styleUrls: ['entity-view.component.css'], directives: [
<|file_name|>test_06_ingest.py<|end_file_name|><|fim▁begin|>"""Test icatdump and icatingest. """ from subprocess import CalledProcessError import pytest import icat import icat.config from icat.query import Query from conftest import DummyDatafile, gettestdata, getConfig, callscript # Test input ds_params = str(gett...
<|file_name|>subtrees_comparer.py<|end_file_name|><|fim▁begin|>def subtrees_equal(expected_schema_node, actual_node): if expected_schema_node[0] != actual_node.get_name(): return False if expected_schema_node[1] != actual_node.get_state(): return False expected_children = expected_schema_node[2] actual_children...
return False for (expected_child, actual_child_name) in \
<|file_name|>GenericTIFFSeriesMaximumIntensityProjectionGenerationAlgorithm.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Created on Apr 27, 2016 @author: Aaron Ponti ''' from ch.systemsx.cisd.openbis.dss.etl.dto.api.impl import MaximumIntensityProjectionGenerationAlgorithm class GenericTIFFSeriesMax...
# Call the parent base constructor MaximumIntensityProjectionGenerationAlgorithm.__init__(self, datasetTypeCode, width, height, filename)
<|file_name|>timer.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 base::prelude::*; use core::{mem}; use cty::{c_int, itimerspec...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static import profiles.urls import accounts.urls from . import views<|fim▁hole|> url(r'^$', views.HomePage.as_view(), name=...
urlpatterns = [
<|file_name|>ForumContainer.js<|end_file_name|><|fim▁begin|>import React, {Component, PropTypes} from 'react'; import * as actions from './ForumAction'; import ForumPage from './ForumPage'; class ForumContainer extends Component { constructor(props) { super(props); this.state = { questi...
<|file_name|>contact-us.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; <|fim▁hole|> templateUrl: './contact-us.component.html', styleUrls: ['./contact-us.component.less'] }) export class ContactUsComponent implements OnInit { constructor() { // Do stuff } ngO...
@Component({ selector: 'nymcp-contact-us',
<|file_name|>app.js<|end_file_name|><|fim▁begin|>'use strict'; jQuery(document).ready(function ($) { var lastId, topMenu = $("#top-navigation"), topMenuHeight = topMenu.outerHeight(), // All list items menuItems = topMenu.find("a"), // Anchors corresponding to menu items ...
menuItems
<|file_name|>ranges_iter.rs<|end_file_name|><|fim▁begin|>// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.<|fim▁hole|>use super::range::Range; #[derive(PartialEq, Eq, Clone, Debug)] pub enum IterStatus { /// All ranges are consumed. Drained, /// Last range is drained or this iteration is ...
<|file_name|>ValueFactory.java<|end_file_name|><|fim▁begin|>/* $Id$ * * 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 ...
/** * @param msg the message whose well-known in-reply-to field is to * be set.
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>use ci::{build, Command, Sandbox}; use std::path::Path; use std::{process, fs}; <|fim▁hole|>{ fn run(&mut self, command: Command, working_dir: &Path) -> build::TaskOutput { if !working_dir.exists() { fs::create_dir_all(&working_dir).expect("cou...
pub struct Basic; impl Sandbox for Basic
<|file_name|>race_storage.py<|end_file_name|><|fim▁begin|>import copy import secrets <|fim▁hole|> '🐶': 0xccd6dd, '🐱': 0xffcb4e, '🐭': 0x99aab5, '🐰': 0x99aab5, '🐙': 0x9266cc, '🐠': 0xffcc4d, '🦊': 0xf4900c, '🦀': 0xbe1931, '🐸': 0x77b255, '🐧': 0xf5f8fa } names = { '🐶': '...
races = {} colors = {
<|file_name|>0005_auto__del_field_artistmedia_is_default_image__del_field_artistmedia_na.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): ...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> console.log('Razzle comes with React! This package is a stub.'); return config; };<|fim▁end|>
module.exports = function modify(config) {
<|file_name|>test_gravmag_euler.py<|end_file_name|><|fim▁begin|>from __future__ import division import numpy as np from fatiando.gravmag.euler import Classic, ExpandingWindow, MovingWindow from fatiando.gravmag import sphere, fourier from fatiando.mesher import Sphere from fatiando import utils, gridder model = None x...
assert (base - euler.baselevel_)/base <= precision, \ 'baselevel: %g estimated: %g' % (base, euler.baselevel_)
<|file_name|>migration_context.py<|end_file_name|><|fim▁begin|># Copyright 2015 Red Hat 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/lice...
class MigrationContext(base.NovaPersistentObject, base.NovaObject): """Data representing additional resources related to a migration.
<|file_name|>karma.config.js<|end_file_name|><|fim▁begin|>var webpackConfig = require('./webpack.local.config.js'); <|fim▁hole|> // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma...
webpackConfig.entry = {}; module.exports = function (config) { config.set({
<|file_name|>browser_test.go<|end_file_name|><|fim▁begin|>package payload_test import ( "encoding/json" "fmt" "testing" "github.com/RobotsAndPencils/buford/payload" ) func ExampleBrowser() { p := payload.Browser{ Alert: payload.BrowserAlert{ Title: "Flight A998 Now Boarding", Body: "Boarding has begu...
<|file_name|>check_name_request.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Cod...
}
<|file_name|>color-mode.js<|end_file_name|><|fim▁begin|>import React from 'react' import Icon from 'react-icon-base' <|fim▁hole|> <g><path d="m5 5v30h30v-30h-30z m2.5 27.5v-25h25l-25 25z"/></g> </Icon> ) export default GoColorMode<|fim▁end|>
const GoColorMode = props => ( <Icon viewBox="0 0 40 40" {...props}>
<|file_name|>match-in-macro.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.org/...
enum Foo {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Mirantis 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 # # ...
# License for the specific language governing permissions and limitations # under the License.
<|file_name|>blockly.js<|end_file_name|><|fim▁begin|>/*jshint esversion: 6 */ import Service from '@ember/service'; export default Service.extend({ createCustomBlock(name, options, callback_to_change_block) { options.colour = options.colour || '#4453ff'; if (Blockly.Blocks[name]) { //console.warn(`Re...
getCustomBlocksList() { return Object.keys(Blockly.Blocks).filter((e) => {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """proyectoP4 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views ...
1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
<|file_name|>read_pixels.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 -i import serial # if you have not already done so from time import sleep import matplotlib.pyplot as plt import re import datetime import numpy import pickle class DataExtruder: <|fim▁hole|> def __init__(self,port='/dev/ttyACM0',baudrate=1...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Mirantis 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 # # Unl...
<|file_name|>rt-set-exit-status-fail.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<|fim▁hole|>// op...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework import relations, serializers import amo import mkt.carriers import mkt.regions from addons.models import Category from mkt.api.fields import SplitField, TranslationSerializerField from mkt.api.serializers import URLSerializerMixin from mkt.c...
url_basename = 'feedapp'
<|file_name|>app-build-details.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, NgZone, Inject, OnDestroy } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; import { ApiServ...
this.updateJobTimes(); this.subStatus = this.socketService.outputEvents .pipe(filter(event => event.type === 'process'))
<|file_name|>trl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf8 -*- from report_aeroo.ctt_objects import ctt_currency class trl(ctt_currency):<|fim▁hole|> self.cur_singular = u' Lira' # default plural form for currency self.cur_plural = u' Lira' self.frc_singular =...
def _init_currency(self): self.language = u'tr_TR' self.code = u'TRL' self.fractions = 100
<|file_name|>grabsudoku.py<|end_file_name|><|fim▁begin|>from bs4 import BeautifulSoup import requests, re n = int(input('How many sudoku\'s do you want to download (between 1 and 10)? ')) if n < 1 or n > 10: die() url = 'http://show.websudoku.com/?level=4' for i in range(n): page = requests.get(url) page.raise_fo...
<|file_name|>NormalVerifier.java<|end_file_name|><|fim▁begin|>package org.python.util.install.driver; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.nio.file.Paths; import java.util.Arrays; import java.util.List; import java.util.StringTok...
feedback(line); } else { throw new DriverException(stderr.toString());
<|file_name|>tut05_derived_objects.py<|end_file_name|><|fim▁begin|>""" Tutorial - Object inheritance You are free to derive your request handler classes from any base class you wish. In most real-world applications, you will probably want to create a central base class used for all your pages, which takes care of thin...
And this is the amazing second page! </p> ''' + self.footer() index.exposed = True
<|file_name|>Protocol1_12_2To1_12_1.java<|end_file_name|><|fim▁begin|>/* * This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion * Copyright (C) 2016-2021 ViaVersion and contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Genera...
protected void registerPackets() {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from './booklike.component';<|fim▁end|>
<|file_name|>connection_wrapper.py<|end_file_name|><|fim▁begin|>import logging import time from django.conf import settings from django.core.mail import get_connection as dj_get_connection logger = logging.getLogger(__name__) class BackendWrapper(object): """A wrapper around Django's Email Backend, providing h...
self._backend = backend
<|file_name|>shared-tests-for-multi-geometry-views.js<|end_file_name|><|fim▁begin|>var _ = require('underscore'); module.exports = function () { beforeEach(function () { spyOn(_, 'debounce').and.callFake(function (func) { return function () { func.apply(this, arguments); }; }); this.geometryView.render(); ...
this.geometry.remove();
<|file_name|>formatter.rs<|end_file_name|><|fim▁begin|>// (c) 2016 Productize SPRL <joost@productize.be> use std::io; use Sexp; use symbolic_expressions::{Formatter, SexpError}; // custom symbolic_expressions formatter that aims to be // kicad compatible struct Indent { newline_before: i64, closing_on_new_li...
indent: i64, stack: Vec<Option<(String, Option<Indent>)>>,
<|file_name|>livestream.py<|end_file_name|><|fim▁begin|>import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream import HLSStream from streamlink.utils.parse import parse_json log = logging.getLogger(__name__) @pluginmatcher(re.co...
)) class Livestream(Plugin): _config_re = re.compile(r"window.config = ({.+})")