prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ToolbarPanel.cpp<|end_file_name|><|fim▁begin|>#include "ToolbarPanel.h" #include "StagePanel.h" #include "SelectSpritesOP.h" #include "Context.h" namespace coceditor { ToolbarPanel::ToolbarPanel(wxWindow* parent) : ee::ToolbarPanel(parent, Context::Instance()->stage) { Context* context = Context::Insta...
addChild(new ee::UniversalCMPT(this, wxT("paste"), context->stage, new ee::ArrangeSpriteOP<SelectSpritesOP>(context->stage, context->stage, context->property)));
<|file_name|>Configuration.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher (clemens.prescher@gmail.com) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute ...
self._auto_integrate_pattern = True self._auto_integrate_cake = False
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Speedcurve.py documentation build configuration file, created by # sphinx-quickstart on Mon Nov 16 12:29:28 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuratio...
# a list of builtin themes. html_theme = 'sphinx_rtd_theme'
<|file_name|>decontaminate_unitary.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # File created on 09 Aug 2012 from __future__ import division __author__ = "Jon Sanders" __copyright__ = "Copyright 2014, Jon Sanders" __credits__ = ["Jon Sanders"] __license__ = "GPL" __version__ = "1.9.1" __maintainer__ = "Jon ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>__author__ = 'marijn' from setuptools import setup <|fim▁hole|> license="AGPL3", packages=['goal_notifier'], requires=[ "google-api-python-client", "pykka", "pydub", "pyopenssl", ], scripts=["goal_notifier"] )<|fim▁en...
setup( name="goal_notifier", version="0.0.0",
<|file_name|>locations.spec.ts<|end_file_name|><|fim▁begin|>'use strict'; import { Location } from '../../src/models/location'; describe('Location', () => { let mockLocation: Location = new Location({ "id": 178, "timestamp": "2018-04-09T16:17:26.464000-07:00", "target": "d--0000-0000-0000-0532", "l...
it('checks basic', () => { expect(mockLocation.target).toBe("d--0000-0000-0000-0532");
<|file_name|>to_vec.rs<|end_file_name|><|fim▁begin|>// compile-flags: -O #![crate_type = "lib"] // CHECK-LABEL: @copy_to_vec<|fim▁hole|>}<|fim▁end|>
#[no_mangle] fn copy_to_vec(s: &[u64]) -> Vec<u64> { s.to_vec() // CHECK: call void @llvm.memcpy
<|file_name|>test_artificial_1024_Quantization_PolyTrend_30__20.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art<|fim▁hole|> art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 30, transform = "Quan...
<|file_name|>GXDBWRITE.py<|end_file_name|><|fim▁begin|>### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref from .GXDB import GXDB from .GXVA import GXVA from .GXVV import GXV...
<|file_name|>image.js<|end_file_name|><|fim▁begin|>function loadText() { var txtLang = document.getElementsByName("txtLang"); txtLang[0].innerHTML = "K\u00E4lla"; txtLang[1].innerHTML = "Alternativ text"; txtLang[2].innerHTML = "Mellanrum"; txtLang[3].innerHTML = "Placering"; txtLang[4].inne...
optLang[3].text = "Nederst"; optLang[4].text = "V\u00E4nster"; optLang[5].text = "Mitten";
<|file_name|>PlaceOrderController.java<|end_file_name|><|fim▁begin|>package br.copacabana; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.logg...
return formView; }
<|file_name|>folders.ts<|end_file_name|><|fim▁begin|>import $ from 'cafy'; import ID from '../../../../misc/cafy-id'; import DriveFolder, { pack } from '../../../../models/drive-folder'; import { ILocalUser } from '../../../../models/user'; export const meta = { desc: { ja: 'ドライブのフォルダ一覧を取得します。', en: 'Get folders ...
<|file_name|>workarounds.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid c...
<|file_name|>tranzdump.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import os.path import re import sys import string from django.apps.registry import apps from django.core.management.base import BaseCommand, CommandError from python_translate.extractors import base as extractors from python_tra...
def get_value(self, key, args, kwargs): self.used.add(key)
<|file_name|>debug.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2012 Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = t...
<|file_name|>test_resource_owner_password.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json from unittest import mock from oauthlib.common import Request from oauthlib.oauth2.rfc6749 import errors from oauthlib.oauth2.rfc6749.grant_types import ( ResourceOwnerPasswordCredentialsGrant, ) from oaut...
tknval1, tknval2 = mock.Mock(), mock.Mock() self.auth.custom_validators.pre_token.append(tknval1)
<|file_name|>checkHistoryList.js<|end_file_name|><|fim▁begin|>import { injectReducer } from 'STORE/reducers' export default store => ({<|fim▁hole|> require.ensure([], (require) => { const CheckHistoryList = require('VIEW/CheckHistoryList').default const reducer = require('REDUCER/checkHistoryList').defa...
path : 'checkHistoryList.html', getComponent(nextState, cb) {
<|file_name|>0002_add_subscription.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-03-19 19:08 from __future__ import unicode_literals import channels.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion class ...
("channels", "0001_add_tokens"),
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * <|fim▁hole|>from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^project/', include('project.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admi...
# Uncomment the next two lines to enable the admin:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""MNE software for MEG and EEG data analysis.""" # PEP0440 compatible formatted version, see: # https://www.python.org/dev/peps/pep-0440/ # # Generic release markers: # X.Y # X.Y.Z # For bugfix releases # # Admissible pre-release markers: # X.YaN # Alpha...
<|file_name|>bzr.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, André Paramés <git@andreparames.com> # Based on the Git module by Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it un...
<|file_name|>bulk.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
max_failed_deletes = int(conf.get('max_failed_deletes', 1000)) yield_frequency = int(conf.get('yield_frequency', 10))
<|file_name|>cmd_job_cancel.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any la...
<|file_name|>bin.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate malachite_base_test_util; extern crate malachite_nz; extern crate malachite_nz_test_util; extern crate serde; extern crate serde_json; use demo_and_bench::register; use generate::digits_data::generate_string_data; use malachite_base_test_util::...
// // cargo run -- -g digits_data
<|file_name|>ephyview.py<|end_file_name|><|fim▁begin|>import os import numpy as np import tables import galry.pyplot as plt from galry import Visual, process_coordinates, get_next_color, get_color from qtools import inthread MAXSIZE = 5000 CHANNEL_HEIGHT = .25 class MultiChannelVisual(Visual): def initialize(sel...
nsamples = shape[1] else:
<|file_name|>Image.cpp<|end_file_name|><|fim▁begin|>#include "Image.h" // to avoid compiler confusion, python.hpp must be include before Halide headers #include <boost/format.hpp> #include <boost/python.hpp> #define USE_NUMPY #ifdef USE_NUMPY #ifdef USE_BOOST_NUMPY #include <boost/numpy.hpp> #else // we use Halide::...
bn::dtype type_to_dtype(const h::Type &t) { if (t == h::UInt(8)) return bn::dtype::get_builtin<uint8_t>(); if (t == h::UInt(16)) return bn::dtype::get_builtin<uint16_t>(); if (t == h::UInt(32)) return bn::dtype::get_builtin<uint32_t>();
<|file_name|>auth.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Subject } from 'rxjs/Subject'; import { Observable } from 'rxjs/Observable';<|fim▁hole|>import {Http, Headers} from '@angular/http'; import {Router } from '@angular/router'; import 'rxjs/add/operator/map'; @I...
import { AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database'; import { AngularFireAuth } from 'angularfire2/auth'; import * as firebase from 'firebase/app';
<|file_name|>local_settings.py<|end_file_name|><|fim▁begin|>import os import pymongo import imp <|fim▁hole|># django stuff reference_data_dir = '../data/reference_data' #DEBUG = True #COMPRESS_ENABLED = False GENERATED_FILES_DIR = os.path.join(os.path.dirname(__file__), 'generated_files') MEDIA_ROOT = os.path.join(G...
<|file_name|>testrun.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging from operator import methodcaller from typing import List from django.core.exceptions import ObjectDoesNotExist from kobo.django.xmlrpc.decorators import user_passes_test from tcms.issuetracker.models import Issue from tcms.m...
<|file_name|>ZkPaths.ts<|end_file_name|><|fim▁begin|>/** * @module node-zk-treecache */ /** */ import { validatePath } from "./PathUtils" import { Client, ACL, Id, CreateMode, Exception } from "node-zookeeper-client" const PATH_SEPARATOR = "/" const ANYONE_ID_UNSAFE = new Id("world", "anyone") const OPEN_ACL_UNSAF...
* Given a full path, return the node name. i.e. "/one/two/three" will return "three" *
<|file_name|>i586_unknown_linux_musl.rs<|end_file_name|><|fim▁begin|>use crate::spec::Target; pub fn target() -> Target { let mut base = super::i686_unknown_linux_musl::target(); base.cpu = "pentium".to_string(); base.llvm_target = "i586-unknown-linux-musl".to_string();<|fim▁hole|><|fim▁end|>
base }
<|file_name|>audio.js<|end_file_name|><|fim▁begin|>en.resources.define("audio",{ name: "Engine", src: "./audio/ship_engine.ogg", }, function(content, callback){ var sound = client.audio.createSound(); sound.load(content.src, function(sound){ content.sound = sound; callback(content.type, content); }); <...
}, function(content){ return content.sound; });
<|file_name|>pydevd_frame.py<|end_file_name|><|fim▁begin|>import linecache import os.path import re import sys import traceback # @Reimport from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_dont_trace from _pydevd_bundle import pydevd_vars from _pydevd_bundle.pydevd_breakpoints import get_exceptio...
<|file_name|>test_som.py<|end_file_name|><|fim▁begin|>import os import pytest from som.vm.current import current_universe @pytest.mark.parametrize( "test_name", [ "Array",<|fim▁hole|> "ClassLoading", "ClassStructure", "Closure", "Coercion", "CompilerReturn", ...
"Block",
<|file_name|>SingleLineTextField.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { FormControl, FormGroup, ControlLabel, Col } from 'react-bootstrap'; import { IField, IFieldError, IFieldBuilderProps, IFieldInputProps } from '../../../../src/data'; interface IState { } export default class Sin...
<FormControl type='text' placeholder={hint} required={required} value={this.props.value} onChange={this.onTextFieldChange} /> </Col> </FormGroup> </div>
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # @copyright (C) 2014-2015 #Developpeurs 'BARDOU AUGUSTIN - BREZILLON ANTOINE - EUZEN DAVID - FRANCOIS SEBASTIEN - JOUNEAU NICOLAS - KIBEYA AISHA - LE CONG SEBASTIEN - # MAGREZ VALENTIN - NGASSAM NOUMI PAOLA JOVANY - OUHAMMOUCH SAL...
model = Provider howKnowledgeCHOICES = get_menus_settings('howKnowledge') widgets = { 'password': forms.PasswordInput(attrs={'id': 'password', 'required': 'required'}),
<|file_name|>UpdatePasswordWidget.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2020 Emweb bv, Herent, Belgium. * * See the LICENSE file for terms of use. */ package eu.webtoolkit.jwt.auth; import eu.webtoolkit.jwt.*; import eu.webtoolkit.jwt.chart.*; import eu.webtoolkit.jwt.servlet.*; import eu.webtoolkit...
* <p>If <code>authModel</code> is not <code>null</code>, the user also has to authenticate first * using his current password. */ public UpdatePasswordWidget(
<|file_name|>delegate.js<|end_file_name|><|fim▁begin|>steal('can/util', 'can/observe', function(can) { // ** - 'this' will be the deepest item changed // * - 'this' will be any changes within *, but * will be the // this returned // tells if the parts part of a delegate matches the broken up props of t...
<|file_name|>SessionIdentifierGenerator.java<|end_file_name|><|fim▁begin|>package com.example.heregpsloc; import java.security.SecureRandom; import java.math.BigInteger; // http://stackoverflow.com/questions/41107/how-to-generate-a-random-alpha-numeric-string public final class SessionIdentifierGenerator { priva...
}
<|file_name|>edit-app.js<|end_file_name|><|fim▁begin|>define(() => { function postLoad(ipy, editor, savewidget, events) { function navigateAlternate(alt) { var url = document.location.href.replace('/edit', alt); if (url.includes("?")) { url = url.slice(0, url.lastIndexOf("?")); } u...
return { postLoad: postLoad
<|file_name|>page.config.js<|end_file_name|><|fim▁begin|>module.exports = { 'tokens': [ { 'type': 'category', 'name': 'Colors', 'tokens': [ { 'variable': '--app-accent-color', 'name': 'App Accent Color', 'type': 'color', 'themes': { 'pl...
'themes': { 'plain': { 'value': '1rem' },
<|file_name|>DragAndDrop.controller.js<|end_file_name|><|fim▁begin|>sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/model/json/JSONModel", "sap/m/MessageToast" ], function (Controller, JSONModel, MessageToast) { "use strict"; var TABLESETTINGS = window.TABLESETTINGS; return Controller.extend("sap.ui.table...
{ width: "25rem" } );
<|file_name|>createPath.js<|end_file_name|><|fim▁begin|>VectorCanvas.prototype.createPath = function (config) { var node; if (this.mode === 'svg') { node = this.createSvgNode('path'); node.setAttribute('d', config.path); if (this.params.borderColor !== null) { node.setAttribute('stroke', this.par...
return this.getAttribute('fill'); };
<|file_name|>features_deviceinusefeature.py<|end_file_name|><|fim▁begin|># pylint: disable=line-too-long, unused-argument import json from django.template.loader import render_to_string def format_reading(probe_name, json_payload): item = json.loads(json_payload) status = item['DEVICE_ACTIVE'] if item[...
for reading in readings: payload = json.loads(reading.payload)
<|file_name|>test_memusage.py<|end_file_name|><|fim▁begin|>from test.lib.testing import eq_ from sqlalchemy.orm import mapper, relationship, create_session, \ clear_mappers, sessionmaker, class_mapper from sqlalchemy.orm.mapper import _mapper_registry from sqlalchemy.orm.session import _sessions import operator fro...
a2 = A(col2='a2') b1 = B(col2='b1') b2 = B(col2='b2')
<|file_name|>issue-85581.rs<|end_file_name|><|fim▁begin|>// Regression test of #85581. // Checks not to suggest to add `;` when the second mutable borrow // is in the first's scope. use std::collections::BinaryHeap;<|fim▁hole|> fn foo(heap: &mut BinaryHeap<i32>) { match heap.peek_mut() { Some(_) => { heap....
<|file_name|>test_steps__outputs_file.py<|end_file_name|><|fim▁begin|>from daisychain.steps.outputs.file import OutputFile from daisychain.steps.input import InMemoryInput import tempfile import os TEST_STRING = 'THIS OUTPUT STRING IS COMPLETELY UNIQUE AND WILL NOT EXIST EVER AGAIN' def test_output_file(): t = te...
t.close() try: i = OutputFile(path=t.name, input_step=InMemoryInput(output=TEST_STRING))
<|file_name|>zone_sectag.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3.2 # # Copyright (c) Net24 Limited, Christchurch, New Zealand 2011-2012 # and Voyager Internet Ltd, New Zealand, 2012-2013 # # This file is part of py-magcode-core. # # Py-magcode-core is free software: you can redistribute i...
""" return str(self.sectag) def to_engine(self, time_format=None):
<|file_name|>component.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'tr', classNames: ['clickable'], <|fim▁hole|> click() { this.sendAction('action', this.imaging); } });<|fim▁end|>
<|file_name|>SnakePropertiesBuilder.java<|end_file_name|><|fim▁begin|><|fim▁hole|>public class SnakePropertiesBuilder extends MonsterProperties.Builder { @Override public MonsterProperties build() { experienceGain(100) .hp(100) .strength(5) .level(1); return super.build(); } }<|fim▁end|>
package pl.mmorpg.prototype.server.objects.monsters.properties.builders; import pl.mmorpg.prototype.clientservercommon.packets.monsters.properties.MonsterProperties;
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#encoding:utf-8 from user import app <|fim▁hole|><|fim▁end|>
if __name__ == '__main__': app.run(host='0.0.0.0',port=9002,debug=True)
<|file_name|>output.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var img = NotReact.createElement( 'img', { src: "foo.gif" });<|fim▁end|>
<|file_name|>pointing.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> ...
.map(computed_value::Keyword::Cursor) .map_err(|()| SelectorParseError::UnexpectedIdent(ident.clone()).into()) } }
<|file_name|>gl.js<|end_file_name|><|fim▁begin|>//! moment.js locale configuration //! locale : Galician [gl] //! author : Juan G. Hurtado : https://github.com/juanghurtado ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' && typeof require === 'function' ? fac...
return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; },
<|file_name|>manager.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
self._look_for_new_crash_logs(retry_attempt_results, start_time)
<|file_name|>from.js<|end_file_name|><|fim▁begin|>'use strict'; require('../../modules/es.weak-set'); require('../../modules/esnext.weak-set.from'); var WeakSet = require('../../internals/path').WeakSet; var weakSetfrom = WeakSet.from;<|fim▁hole|>};<|fim▁end|>
module.exports = function from(source, mapFn, thisArg) { return weakSetfrom.call(typeof this === 'function' ? this : WeakSet, source, mapFn, thisArg);
<|file_name|>home.py<|end_file_name|><|fim▁begin|>""" This page is in the table of contents. Plugin to home the tool at beginning of each layer. The home manual page is at: http://fabmetheus.crsndoo.com/wiki/index.php/Skeinforge_Home ==Operation== The default 'Activate Home' checkbox is on. When it is on, the functi...
from fabmetheus_utilities import archive
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import sys<|fim▁hole|> __version__ = '2.0.5' from cfchecker.cfchecks import getargs, CFChecker def cfchecks_main(): """cfchecks_main is based on the main program block in cfchecks.py """ (badc,coards,uploader,useFileName,standardName,areaTypes,udunits...
import os import os.path as op
<|file_name|>CouchbaseServer.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2013, Centre National de la Recherche Scientifique # # 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://...
def __init__(self, configHolder): configHolder.assign(self) self.system = SystemFactory.getSystem(self.frontendSystem, configHolder)
<|file_name|>enums.go<|end_file_name|><|fim▁begin|>package machinelearningservices // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may c...
OrderStringUpdatedAtDesc OrderString = "UpdatedAtDesc" )
<|file_name|>version.go<|end_file_name|><|fim▁begin|>package command import ( "bytes" "fmt" "github.com/hashicorp/serf/serf" "github.com/mitchellh/cli" ) // VersionCommand is a Command implementation prints the version. type VersionCommand struct { Revision string Version string VersionPrere...
}
<|file_name|>advanced_excel.py<|end_file_name|><|fim▁begin|>""" See http://pbpython.com/advanced-excel-workbooks.html for details on this script """ from __future__ import print_function import pandas as pd from xlsxwriter.utility import xl_rowcol_to_cell def format_excel(writer, df_size): """ Add Excel specific...
# subtract 1 from the column to handle because we don't care about index table_end = xl_rowcol_to_cell(df_size[0] + 1, df_size[1] - 1)
<|file_name|>ccroot.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # encoding: utf-8 import os,sys,re import TaskGen,Task,Utils,preproc,Logs,Build,Options from Logs import error,debug,warn from Utils import md5 from TaskGen import taskgen,after,before,feature from Constants import* try: from cStringIO import ...
def install_target_cshlib(self): if getattr(self,'vnum','')and not win_platform: self.link_task.vnum=self.vnum self.link_task.install=install_shlib
<|file_name|>XmlTaskMapper.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 Antony Esik * * 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/...
import javax.xml.bind.JAXBException; import java.io.StringReader; import java.io.StringWriter;
<|file_name|>CCLoaders.js<|end_file_name|><|fim▁begin|>/**************************************************************************** Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtainin...
<|file_name|>classes_1.js<|end_file_name|><|fim▁begin|>var searchData= [ ['changedetailsapi',['ChangeDetailsAPI',['../classbackend_1_1api_1_1users_1_1_change_details_a_p_i.html',1,'backend::api::users']]], ['chatmessageapi',['ChatMessageApi',['../classbackend_1_1api_1_1messages_1_1_chat_message_api.html',1,'backend...
['chatuserapi',['ChatUserApi',['../classbackend_1_1api_1_1messages_1_1_chat_user_api.html',1,'backend::api::messages']]], ['chatuserretrieveapi',['ChatUserRetrieveApi',['../classbackend_1_1api_1_1messages_1_1_chat_user_retrieve_api.html',1,'backend::api::messages']]] ];
<|file_name|>user.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import get_user_model from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from selvbetjening.sadmin2 import menu from selvbetjening.sadmin2.decorators im...
user = get_object_or_404(get_user_model(), pk=user_pk)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod shell; mod syscall; use self::syscall::*; #[no_mangle] pub extern "C" fn el0_other() -> ! { println!("I just exit."); //loop {} syscall_exit(127); } #[no_mangle] pub extern "C" fn el0_shell() -> ! { println!("I sleep 50ms."); syscall_sleep(50).u...
let mut b = unsafe { Gpio::new_from(IO_BASE_RAW + GPIO_BASE, 19).into_output() };
<|file_name|>legendImport.js<|end_file_name|><|fim▁begin|>import {FileSelect} from 'widget/fileSelect' import {Form, form} from 'widget/form/form' import {FormCombo} from 'widget/form/combo' import {Layout} from 'widget/layout' import {Panel} from 'widget/panel/panel' import {activatable} from 'widget/activation/activa...
? this.renderMapping('colorColumn') : ( <Layout type='horizontal-nowrap'>
<|file_name|>vtgate_cursor.py<|end_file_name|><|fim▁begin|># Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. """VTGateCursor, and StreamVTGateCursor.""" import itertools import operator import re from vtdb import b...
sorted_rows = itertools.islice(self.fetchall(), limit) neutered_rows = [row[len(order_by_columns):] for row in sorted_rows] return neutered_rows
<|file_name|>hello.rs<|end_file_name|><|fim▁begin|>use std::ops::Add; fn main() { println!("hello, world"); println!("> Primitives"); primitives(); println!("> Tuples"); tuples(); println!("> Arrays"); arrays(); println!("> Structs"); structs(); println!("> References"); ref...
// operator overloading! type Output = Point; fn add(self, other: Point) -> Point { Point {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2014 Bezleputh # # This file is part of weboob. # # weboob 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 Foundati...
#
<|file_name|>SpeakerExample.java<|end_file_name|><|fim▁begin|>package com.hzh.corejava.proxy;<|fim▁hole|> speaker.greeting(); } }<|fim▁end|>
public class SpeakerExample { public static void main(String[] args) { AiSpeaker speaker = (AiSpeaker) AuthenticationProxy.newInstance(new XiaoaiAiSpeeker());
<|file_name|>start-app.js<|end_file_name|><|fim▁begin|>import { run } from '@ember/runloop'; import { merge } from '@ember/polyfills'; import Application from '../../app'; import config from '../../config/environment'; export default function startApp(attrs) { let application; let attributes = merge({}, config.AP...
<|file_name|>optparse.py<|end_file_name|><|fim▁begin|>"""optparse - a powerful, extensible, and easy-to-use option parser. By Greg Ward <gward@python.net> Originally distributed as Optik; see http://optik.sourceforge.net/ . If you have problems with this module, please do not file bugs, patches, or feature requests ...
""" i = 0
<|file_name|>comparison.js<|end_file_name|><|fim▁begin|>$(document).ready(function(){ $('#datepickerDay1').hide(); $('#datepickerDay2').hide(); $('#datepickerMnd1').hide(); $('#datepickerMnd2').hide(); $('#datepickerYear1').hide(); $('#datepickerYear2').hide(); $('select').change(function(){ var index = $...
showChart1();
<|file_name|>method-self-arg-2.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.o...
} fn main() { let mut x = Foo;
<|file_name|>solution-0.cpp<|end_file_name|><|fim▁begin|>class Solution { public:<|fim▁hole|> for (int i = 1; i <= amount; ++i) { dp[i] = -1; } dp[0] = 0; for (int i = 0; i <= amount; ++i) { for (int j = 0; j < n; ++j) { ...
int coinChange(vector<int>& coins, int amount) { const int n = coins.size(); int dp[amount + 1];
<|file_name|>script07_use_gene_list.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys import glob import argparse from datetime import datetime import platform if platform.system().lower() == 'darwin': os.environ['PYTHONPATH'] = '%s/osx_libs:$PYTHONPATH' % os.getcwd() import wormtabl...
def store_genes(genes_to_query): """
<|file_name|>property_injection.test.ts<|end_file_name|><|fim▁begin|>/// <reference path="../globals.d.ts" /> import { expect } from "chai"; import "es6-symbol/implement"; import { Container, injectable, inject, named, tagged, multiInject, unmanaged, optional } from "../../src/inversify"; describe("Proper...
container.bind<Weapon>(TYPES.Weapon).to(Shuriken); let warrior = container.get<Warrior>(TYPES.Warrior); expect(warrior.name).to.eql("Samurai");
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for redux-batched-actions 0.1 // Project: https://github.com/tshelburne/redux-batched-actions // Definitions by: Chad Burggraf <https://github.com/ChadBurggraf> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import { Action, R...
export function batchActions<A extends Action>(actions: A[]): Action;
<|file_name|>Solution.java<|end_file_name|><|fim▁begin|>package com.javarush.task.task11.task1109; /* Как кошка с собакой */ public class Solution { public static void main(String[] args) { Cat cat = new Cat("Vaska", 5); Dog dog = new Dog("Sharik", 4); cat.isDogNear(dog); dog.isC...
}
<|file_name|>near_hundred.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Given an int n, return True if it is within 10 of 100 or 200. Note: abs(num) computes the absolute value of a number. near_hundred(93) == True near_hundred(90) == True near_hundred(89) == False<|fim▁hole|> def near_hundred(n): ret...
"""
<|file_name|>protover.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2016-2019, The Tor Project, Inc. */ // See LICENSE for licensing information */ extern crate protover; use protover::errors::ProtoverError; use protover::ProtoEntry; use protover::ProtoverVote; use protover::UnvalidatedProtoEntry; #[test] fn pars...
"Cons=1".parse().unwrap(), "Cons=1".parse().unwrap(), "Dinosaur=1".parse().unwrap(),
<|file_name|>overwrite.hpp<|end_file_name|><|fim▁begin|>// Boost.Range library // // Copyright Neil Groves 2009. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // For more i...
BOOST_DEDUCED_TYPENAME range_iterator<const SinglePassRange1>::type
<|file_name|>login.js<|end_file_name|><|fim▁begin|>export default { userData: {}, isAuthenticated: false,<|fim▁hole|> attemptFailed: false, reviewData: [] }<|fim▁end|>
registrationMode: false, registrationFailed: false,
<|file_name|>mountain_car.py<|end_file_name|><|fim▁begin|>""" https://webdocs.cs.ualberta.ca/~sutton/MountainCar/MountainCar1.cp """ import math import gym from gym import spaces from gym.utils import seeding import numpy as np class MountainCarEnv(gym.Env): metadata = { 'render.modes': ['human', 'rgb_arr...
self.low = np.array([self.min_position, -self.max_speed]) self.high = np.array([self.max_position, self.max_speed])
<|file_name|>ci.conf.js<|end_file_name|><|fim▁begin|>'use strict'; var chai = require('chai'); var promised = require('chai-as-promised'); chai.use(promised); global.expect = chai.expect; <|fim▁hole|> allScriptsTimeout: 15000, // Capabilities to be passed to the webdriver instance. capabilities: { 'br...
exports.config = { // The timeout for each script run on the browser. This should be longer // than the maximum time your application needs to stabilize between tasks.
<|file_name|>basecamp.py<|end_file_name|><|fim▁begin|>from core import send_request from people import get_me from projects import get_all_active_projects, get_project from todo_lists import get_todo_list, get_todo, get_all_active_todo_lists from stars import get_starred_projects try: from MY_BC import BC except Im...
<|file_name|>event.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 <|fim▁hol...
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>update.go<|end_file_name|><|fim▁begin|>package system import ( // HOFSTADTER_START import "fmt" // HOFSTADTER_END import // custom imports // infered imports "github.com/spf13/cobra" ) // Tool: geb // Name: update // Usage: update // Parent: system <|fim▁hole|>// HOFSTADTER_START var // H...
// HOFSTADTER_START const // HOFSTADTER_END const
<|file_name|>hoisting_sf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # calculates safety factor in hoisting lines with various number of parts & rotating sheaves # (c) 2013, D. Djokic # No guaranties, whatsoever - use code on your own risk # Released under GNU General Public License ''' IADC safety factor ...
file.write (str(description)) file.write ("\t")
<|file_name|>explicit-call-to-dtor.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<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/license...
// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>"""Provides some useful utilities for the Discord bot, mostly to do with cleaning.""" import re import discord __all__ = ['clean', 'is_clean'] mass_mention = re.compile('@(everyone|here)') member_mention = re.compile(r'<@\!?(\d+)>') role_mention = re.compile(r'<@&(\...
return strings[0] + single_suffix elif len(strings) == 2:
<|file_name|>document_dialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of Gertrude. # # Gertrude 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 ...
<|file_name|>client.py<|end_file_name|><|fim▁begin|>import aioamqp import asyncio import umsgpack as msgpack import logging from functools import wraps from uuid import uuid4 logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) logger.addHandler(logging.StreamHandler()) class RemoteException(Exception):...
await self._waiter.wait() await self._protocol.close() try:
<|file_name|>test_migrations_util.py<|end_file_name|><|fim▁begin|>import unittest from db.migrations import migrations_util class TestMigrationUtil(unittest.TestCase): """Test the CLI API.""" @classmethod def setUpClass(cls): cls.db_path = '/some/random/path/file.db' def setUp(self): ...
self.assertEqual(options.action, 'downgrade') def test_cli_parser_bad_action(self): self.assertRaises(
<|file_name|>logging.rs<|end_file_name|><|fim▁begin|>use super::super::namespace::InvokeContext; use wasm_core::value::Value; <|fim▁hole|> LoggingNs, "logging", LoggingImpl, info, warning ); pub struct LoggingImpl; impl LoggingImpl { pub fn info(&self, ctx: InvokeContext) -> Option<Value> { ...
decl_namespace!(
<|file_name|>testoak.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 Pierre Talbot (IRCAM) // 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...
}; test.test_directory(&format!("Run and Pass tests of `{}`", grammar.name),
<|file_name|>picker-global-options.js<|end_file_name|><|fim▁begin|>define(['exports'], function (exports) {<|fim▁hole|> Object.defineProperty(exports, "__esModule", { value: true }); var globalExtraOptions = exports.globalExtraOptions = { mappingDataStructure: { class: 'class', content: 'conten...
'use strict';