prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>roles_cmd.go<|end_file_name|><|fim▁begin|>package main import ( "github.com/spf13/cobra" ) func getRolesCmd() *cobra.Command { return &cobra.Command{ Use: "roles", Short: "Resets all settings", Long: ``, PreRun: initConfigFiles, Run: runRolesCmd, } }<|fim▁hole|>func runRolesCmd(cmd ...
<|file_name|>face-two-tone.js<|end_file_name|><|fim▁begin|>import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h(h.f, null, h("path", { d: "M17.5 8c.46 0 .91-.05 1.34-.12C17.44 5.56 14.9 4 12 4c-.46 0-.91.05-1.34.12C12.06 6.44 14.6 8 17.5 8zM8.08 5.03C6.37 6 5.05 7...
opacity: ".3" }), h("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 2c2.9 0 5.44 1.56 6.84 3.88-.43.07-.88.12-1.34.12-2.9 0-5.44-1.56-6.84-3.88.43-.07.88-.12 1.34-.12zM8.08 5.03C7.45 6.92 6.13 8.5 4.42 9.47 5.05 7.58 6.37 6 8.08 5.03zM12 20c-4.41 0-8-3.59-8-8 0-.05.01-.1.01-.15 2....
<|file_name|>EditableInputConnection.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2007-2008 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 *<|fi...
* http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>support.rs<|end_file_name|><|fim▁begin|>#![no_std] #![allow(visible_private_types)] #![allow(non_camel_case_types)] extern "rust-intrinsic" { fn offset<T>(dst: *mut T, offset: int) -> *mut T; } extern "rust-intrinsic" { fn offset<T>(dst: *const T, offset: int) -> *const T; } type c_int = i32; #...
i += 1; } }
<|file_name|>amount_to_text.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can ...
if dval > val:
<|file_name|>last_names.ts<|end_file_name|><|fim▁begin|>export default `Abbott Abernathy Abshire Adams Altenwerth Anderson Ankunding Armstrong Auer Aufderhar Bahringer Bailey Balistreri Barrows Bartell Bartoletti Barton Bashirian Batz Bauch Baumbach Bayer Beahan Beatty Bechtelar Becker Bednar Beer Beier Berge Bergnaum ...
Ortiz
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import logging from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from corehq.apps.adm.dispatcher import ADMSectionDispatcher from corehq.apps.adm.models import REPORT_SECTION_OPTIONS, ADMReport from corehq.apps.reports.datata...
rows.append(row)
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import sys import logging logger = logging.getLogger(__name__) def configure_logging(): root = logging.getLogger()<|fim▁hole|> formatter = logging.Formatter('%(asctime)s %(name)12s %(levelname)7s - %(message)s') handler.setFormatter(formatter) root....
root.setLevel(logging.DEBUG) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.DEBUG)
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from flask import Flask, redirect, abort, url_for app = Flask(__name__) app.debug = True @app.route('/') def index(): return redirect(url_for('login')) @app.route('/login') def login(): abort(401) this_is_never_executed()<|fim▁hole|> if __name__ == '__main...
<|file_name|>WebhookLongIdJson.java<|end_file_name|><|fim▁begin|><|fim▁hole|>}<|fim▁end|>
package org.support.project.knowledge.vo.notification.webhook; public class WebhookLongIdJson { public long id;
<|file_name|>wrap.go<|end_file_name|><|fim▁begin|>package closure<|fim▁hole|>import ( "fmt" ) func wrapper() func() int { x := 0 increment := func() int { x++ //x is enclosed in inner block scope to reduce the scope of x being used at block level only. Hence the closure return x } return increment } func by...
<|file_name|>test_api20_os_bootstrap_parallel_local.py<|end_file_name|><|fim▁begin|>''' Copyright 2017 Dell Inc. or its subsidiaries. All Rights Reserved. Author(s): George Paulos This script tests minimum payload base case of the RackHD API 2.0 OS bootstrap workflows using NFS mount or local repo method.<|fim▁hole|>...
This routine runs OS bootstrap jobs simultaneously on multiple nodes. For 12 tests to run, 12 nodes are required in the stack. If there are less than that, tests will be skipped.
<|file_name|>Layout.cpp<|end_file_name|><|fim▁begin|>// // Created by Dawid Drozd aka Gelldur on 7/11/16. // #include "Layout.h" #include <log.h> #ifndef PLATFORM_IOS void Layout::layout() { WLOG("Function %s not implemented: %s:%d", __func__, __FILE__, __LINE__); } #endif Layout& Layout::getNullObject() { stat...
void NullLayout::layout() {
<|file_name|>data.js<|end_file_name|><|fim▁begin|>module.exports = { KeyQ: { printable: true, keyCode: 81, Default: 'ქ', Shift: '', CapsLock: 'Ⴕ', Shift_CapsLock: '', Alt: '', Alt_Shift: '' }, KeyW: { printable: true, keyCode: 87, Default: 'წ', Shift: 'ჭ', CapsL...
keyCode: 192, Default: '§', Shift: '±', CapsLock: '§',
<|file_name|>wayland.rs<|end_file_name|><|fim▁begin|>// Copyright (c) <2015> <lummax> // Licensed under MIT (http://opensource.org/licenses/MIT) #![allow(dead_code)] use libc::{c_int, c_char, c_void, int32_t, uint32_t}; #[repr(C)] pub struct WLInterface { pub name: *const c_char, pub version: c_int, pub ...
} pub fn array(&mut self) -> *mut *mut WLArray {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url, patterns, include from accounts import views user_tool_patterns = patterns( "", url(r"^lending/$", views.LendingManager.as_view(), name="lending"), url(r"^manager/$", views.ToolManager.as_view(), name="manager"), )<|fim▁ho...
<|file_name|>DefaultStoryTeller.java<|end_file_name|><|fim▁begin|>package com.jukusoft.libgdx.rpg.engine.story.impl; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.jukusoft.libgdx.rpg.engine.story.StoryPart; import com.jukusoft.libgdx.rpg.engine.story.Stor...
import com.jukusoft.libgdx.rpg.engine.time.GameTime;
<|file_name|>sequential.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/. */ //! Implements sequential traversals over the DOM and flow...
let assign_inline_sizes = AssignISizes {
<|file_name|>chunk_read_planner_unittest.cc<|end_file_name|><|fim▁begin|>/* Copyright 2013-2015 Skytechnology sp. z o.o. This file is part of LizardFS. LizardFS 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...
TEST(ChunkReadPlannerTests, VerifyRead3) {
<|file_name|>Record_RX.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # SPDX-License-Identifier: GPL-3.0 # # GNU Radio Python Flow Graph # Title: Record_RX # Author: Justin Ried # GNU Radio version: 3.8.1.0 from distutils.version import StrictVersion if __name__ == '__main__': i...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># pyresample, Resampling of remote sensing image data in python # # Copyright (C) 2012, 2014, 2015 Esben S. Nielsen # # 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 t...
<|file_name|>deploy_package.py<|end_file_name|><|fim▁begin|>## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ Deploy and install a package to a target """ import os import sys import zipfile ...
rm_cmd = ["ssh", "%s@%s" % (url.user, url.host), "rm", os.path.basename(pkg_path)]
<|file_name|>methodManager.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """Method Manager Provide the end user interface for method (geophysical) dependent modelling and inversion as well as data and model visualization. """ import numpy as np import pygimli as pg from pygimli.utils...
Axes object to draw into. Create a new if its not given. data : iterable | pg.DataContainer
<|file_name|>resample.ts<|end_file_name|><|fim▁begin|>import { Accessor, AnimationSampler, Document, Root, Transform, TransformContext } from '@gltf-transform/core'; import { createTransform, isTransformPending } from './utils'; const NAME = 'resample'; export interface ResampleOptions {tolerance?: number} const RES...
for (const channel of animation.listChannels()) { if (channel.getSampler() && channel.getTargetPath() === 'weights') {
<|file_name|>R.java<|end_file_name|><|fim▁begin|>package com.onkiup.minedroid; import com.onkiup.minedroid.gui.resources.*; import com.onkiup.minedroid.gui.MineDroid; /** * This class is auto generated. * Manually made changes will be discarded. **/ public final class R { final static String MODID = "minedroid"; ...
public final static Style relative_layout = new Style(new ResourceLink(MODID, "styles", "relative_layout.xml", new EnvParams[] { new EnvParams(null, null, null, null)}), R.class, "@minedroid:style/view_group"); public final static Style checkbox = new Style(new ResourceLink(MODID, "styles", "checkbox.xml", new EnvP...
<|file_name|>getNotionUsers.ts<|end_file_name|><|fim▁begin|>import rpc from './rpc' export default async function getNotionUsers(ids: string[]) { const { results = [] } = await rpc('getRecordValues', { requests: ids.map((id: string) => ({ id, table: 'notion_user', })), }) const users: any = ...
return { users } }
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>""" The GUI to QCRI. """ # pylint: disable=I0011, no-member, missing-docstring import threading import logging from sys import version_info import pythoncom from qcri.application import importer from qcri.application import qualitycenter # pylint: disable=I0011, import...
self.runresultsview.populate(self.results['tests'])
<|file_name|>elf_arch-i386.rs<|end_file_name|><|fim▁begin|>pub const ELF_CLASS: u8 = 1; pub type ElfAddr = u32; pub type ElfHalf = u16; pub type ElfOff = u32; pub type ElfWord = u32; /// An ELF header #[repr(packed)] pub struct ElfHeader { /// The "magic number" (4 bytes) pub magic: [u8; 4], /// 64 or 32 b...
<|file_name|>videopage.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright (C) 2010 by Kai Dombrowe <just89@gmx.de> * * * * This program is free softwar...
} m_provider = plugin;
<|file_name|>shipbonusmissilelauncherheavyrofatc1.py<|end_file_name|><|fim▁begin|># shipBonusMissileLauncherHeavyROFATC1 # # Used by: # Ship: Vangel type = "passive" <|fim▁hole|> "speed", ship.getModifiedItemAttr("shipBonusATC1"))<|fim▁end|>
def handler(fit, ship, context): fit.modules.filteredItemBoost(lambda mod: mod.item.group.name == "Missile Launcher Heavy",
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.10.0 ...
body: body, initialData: initialState, onTabChange: function (dialogApi, details) { currentTab.set(details.newTabName);
<|file_name|>rc4.rs<|end_file_name|><|fim▁begin|>// 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 // option. This file may not be copied, modified, or distributed // exce...
rc4.process(&input, &mut output); }); bh.bytes = input.len() as u64; }
<|file_name|>pcawg_summary.loader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>from elasticsearch1 import Elasticsearch def init_es(es_host, es_index): es = Elasticsearch([ es_host ]) es.indices.delete( es_index, ignore=[400, 404] ) es.indices.create( es_index, ignore=400 ) # crea...
import sys import json
<|file_name|>purchase-edit-ctrl.js<|end_file_name|><|fim▁begin|>'use strict'; var app = angular.module('Fablab'); app.controller('GlobalPurchaseEditController', function ($scope, $location, $filter, $window, PurchaseService, NotificationService, StaticDataService, SupplyService) { $scope.selected = {purchas...
StaticDataService.loadSupplyStock(function (data) { $scope.supplyStock = data;
<|file_name|>panel.py<|end_file_name|><|fim▁begin|>from django.utils.translation import ugettext_lazy as _ import horizon from openstack_dashboard.dashboards.tasks import dashboard class History(horizon.Panel):<|fim▁hole|> dashboard.Tasks.register(History)<|fim▁end|>
name = _("History") slug = "history"
<|file_name|>models.py<|end_file_name|><|fim▁begin|>""" 42. Storing files according to a custom storage system ``FileField`` and its variations can take a ``storage`` argument to specify how and where files should be stored. """ import random import tempfile from django.db import models from django.core.files.base i...
# to make sure it only gets called once. return '%s/%s' % (random.randint(100, 999), filename)
<|file_name|>ghostrider.cpp<|end_file_name|><|fim▁begin|>/* XMRig * Copyright 2018-2021 SChernykh <https://github.com/SChernykh> * Copyright 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of t...
select_indices(cn_indices, seed); #ifdef XMRIG_ARM uint32_t step[6] = { 1, 1, 1, 1, 1, 1 };
<|file_name|>_sqlalchemy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ### # Copyright (c) 2013, Rice University # This software is subject to the provisions of the GNU Affero General # Public License version 3 (AGPLv3). # See LICENCE.txt for details. # ### import uuid from sqlalchemy.types import TypeDecor...
return "%.32x" % uuid.UUID(value) else: # hexstring return "%.32x" % value
<|file_name|>proxy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from queue import Queue from lxml import etree import requests import random from settings import * import time import socket from pybloom_live import BloomFilter from settings import log import os from settings import REFRESH_BF from settings ...
def parse_page(url, page, pattern): page = etree.HTML(page.lower())
<|file_name|>Store.tsx<|end_file_name|><|fim▁begin|>import { Dictionary } from 'lodash' import React, { createContext, Dispatch, useReducer } from 'react' import { IAgent, IHandoff } from '../../../types' import Reducer, { ActionType } from './Reducer' interface StoreType { state: StateType dispatch: Dispatch<Ac...
export const Store = ({ children }) => { const [state, dispatch] = useReducer(Reducer, initialState) return <Context.Provider value={{ state, dispatch }}>{children}</Context.Provider>
<|file_name|>feed_mapping_status.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.<|fim▁hole|># # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
# You may obtain a copy of the License at
<|file_name|>unwrapOr.ts<|end_file_name|><|fim▁begin|>import { Maybe } from './Maybe'; import { expectNotNullAndUndefined } from './expect'; import { ERR_MSG_DEF_MUST_NOT_BE_NO_VAL_FOR_MAYBE } from './ErrorMessage'; /** * Return _v_ as `T` if the passed _v_ is not `null` and `undefined`. * Otherwise, return _def_....
* * If the _def_ is `null` or `undefined`, throw `TypeError`.
<|file_name|>mac_dev.py<|end_file_name|><|fim▁begin|># coding=utf-8 __author__ = "Daniel Arroyo <daniel@astroprint.com>" __license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html' import logging import threading import time import os from octoprint.server import eventManager from octoprin...
'connected': True }, { 'id': 'wlan0',
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { editMenu, viewMenu, windowMenu, helpMenu } from './common-menus' import { addDarwinMenuItems } from './darwin-menus'<|fim▁hole|>const initialMenu = [ editMenu, viewMenu, windowMenu, helpMenu ] export const setupMenus = () => { const menuItems = (process.pla...
import { app, Menu } from 'electron'
<|file_name|>pq_model.go<|end_file_name|><|fim▁begin|>package surf import ( "bytes" "database/sql" "errors" "fmt" "strconv" ) // PqModel is a github.com/lib/pq implementation of a Model type PqModel struct { Database *sql.DB `json:"-"` Config Configuration `json:"-"` } // GetConfiguration returns the ...
} }
<|file_name|>decoder.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 https://mozilla.org/MPL/2.0/. */ //! Adapted from an implementation in reqwest. /*! A potent...
} /// A future attempt to poll the response body for EOF so we know whether to use gzip or not.
<|file_name|>copy.py<|end_file_name|><|fim▁begin|>from core import FM from core.FMOperation import FMOperation class CopyFiles(FM.BaseAction): def __init__(self, request, paths, session, target, overwrite, **kwargs): super(CopyFiles, self).__init__(request=request, **kwargs) self.paths = paths ...
def run(self): request = self.get_rpc_request()
<|file_name|>app.config.js<|end_file_name|><|fim▁begin|>import moment from 'moment'; import PublicationsController from './controller/publications.controller.js'; import AuthorsController from './controller/authors.controller.js'; import PublishersController from './controller/publishers.controller.js'; /* * Applica...
<|file_name|>sse42.rs<|end_file_name|><|fim▁begin|>// Added with Nehalem // todo anotate pub enum SSE42Instr { CRC32, PCMPESTRI, PCMPESTRM, PCMPISTRI, <|fim▁hole|><|fim▁end|>
PCMPISTRM, PCMPGTQ }
<|file_name|>SplitDocumentAction.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2008-2012 Indivica Inc. * * This software is made available under the terms of the * GNU General Public License, Version 2, 1991 (GPLv2). * License details are available via "indivica.ca/gplv2" * and "gnu.org/licenses/gpl-2.0.h...
PDFParser parser = new PDFParser(input);
<|file_name|>multilligual-string.ts<|end_file_name|><|fim▁begin|>export class MultilligualString{ fi: string; en: string; sv: string; <|fim▁hole|> this.fi = userInfo.fi; this.en = userInfo.en; this.sv = userInfo.sv; } }<|fim▁end|>
constructor(userInfo: any){
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # google-cloud-irm documentation build configuration file # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
# html_use_index = True
<|file_name|>2019.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <cstdio> #include <algorithm> using namespace std; const int maxn = 111; int arr[maxn]; int main() { //freopen("in.txt", "r", stdin); int n, m; while(2 == scanf("%d%d", &n, &m) && !(n==0 && m==0)) { for(int i = 0; i < n; ++i) ...
<|file_name|>test_recorder.py<|end_file_name|><|fim▁begin|>"""The tests for hls streams.""" from datetime import timedelta from io import BytesIO from unittest.mock import patch from homeassistant.setup import async_setup_component from homeassistant.components.stream.core import Segment from homeassistant.components....
await recorder.recv() # Wait a minute future = dt_util.utcnow() + timedelta(minutes=1)
<|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.<|fim▁hole|...
// The list of which env maps to which file can be found in `.angular-cli.json`.
<|file_name|>APSync_module.py<|end_file_name|><|fim▁begin|># A template for APSync process based modules from multiprocessing import Process, Event import threading import time import signal, select import traceback import setproctitle from APSyncFramework.utils.common_utils import PeriodicEvent from APSyncFramework.ut...
# CRITICAL # ERROR # WARNING
<|file_name|>RimSummaryMultiPlotCollection.cpp<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2022 Equinor ASA // // ResInsight is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public L...
///
<|file_name|>converter.js<|end_file_name|><|fim▁begin|>(function (root, factory) { if (typeof define === 'function' && define.amd) { define([], factory); } else if (typeof exports === 'object') { module.exports = factory(); } else { root.UtmConverter = factory(); } }(this, function () { /////////...
/* Precalculate coefficients for l**n in the equations below so a normal human being can read the expressions for easting and northing -- l**1 and l**2 have coefficients of 1.0 */
<|file_name|>analytics.effects.ts<|end_file_name|><|fim▁begin|>import { Store } from '@ngrx/store'; import { Injectable } from '@angular/core'; import { Effect, Actions, ofType } from '@ngrx/effects'; import { UserProfileActions } from '@store/user-profile'; import * as PlayerSearch from '@store/player-search'; import...
private analytics: AnalyticsService ) {}
<|file_name|>reducer.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python import sys sys.path.append('../') from toolbox.hreaders import token_readers as reader from toolbox.hreducers import list_reducer as reducer SOLO_FACTURA = False def reduction(x,y): v1 = x.split(',') v2 = y.split(',') r = x if int(v1[...
K,V = _reducer.reduce(key,value) if K:
<|file_name|>client.py<|end_file_name|><|fim▁begin|># # Copyright 2012, 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/licenses/LICEN...
status='COMPLETE', status_reason='', stack_user_project_id=None): input_values = input_values or {}
<|file_name|>if-bot.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/licenses...
<|file_name|>gameconfig.hpp<|end_file_name|><|fim▁begin|>// SuperTux // Copyright (C) 2006 Matthias Braun <matze@braunis.de> // // 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 ver...
JoystickConfig joystick_config; bool mobile_controls;
<|file_name|>test_arc.py<|end_file_name|><|fim▁begin|>import os import unittest from math import pi import numpy from kiva import agg def save_path(filename): return filename def draw_arcs(gc, x2, y2, radiusstep=25.0): gc.set_stroke_color((0.2,0.2,0.2)) # lightgray gc.move_to(0, 0) gc.line_to(100,...
gc.set_stroke_color((0.0,0.0,1.0)) gc.stroke_path() gc.set_ctm(ctm2)
<|file_name|>input.ts<|end_file_name|><|fim▁begin|>// this test case comes from Dexie.js /// <reference path="./ambient-module-declaration.d.ts" /> import { Interface } from './interface'; export interface InterfaceInternal extends Interface {} <|fim▁hole|>declare var ModuleName: { prototype: Interface }; export { ...
declare module ModuleName { export interface Interface extends InterfaceInternal {} }
<|file_name|>while.rs<|end_file_name|><|fim▁begin|>// https://rustbyexample.com/flow_control/while.html // http://rust-lang-ja.org/rust-by-example/flow_control/while.html fn main() { // A counter variable let mut n = 1; // Loop while `n` is less than 101 while n < 101 { if n % 15 == 0 { ...
} // Increment counter
<|file_name|>exponent.rs<|end_file_name|><|fim▁begin|>use crate::digit_table::*; use core::ptr; #[cfg_attr(feature = "no-panic", inline)] pub unsafe fn write_exponent3(mut k: isize, mut result: *mut u8) -> usize { let sign = k < 0; if sign { *result = b'-'; result = result.offset(1); k ...
<|file_name|>receiverMatchesSimple.py<|end_file_name|><|fim▁begin|>def foo(someParam: int): pass<|fim▁hole|> someParam = 1 foo(<caret>)<|fim▁end|>
<|file_name|>common.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 appl...
<|file_name|>class_resa___pro_1_1_formularios_1_1_agregar_solicitud.js<|end_file_name|><|fim▁begin|>var class_resa___pro_1_1_formularios_1_1_agregar_solicitud = [ [ "AgregarSolicitud", "class_resa___pro_1_1_formularios_1_1_agregar_solicitud.html#a412476c1dcd5f6c8d56fe23a6ffdf7f0", null ], [ "Dispose", "class_re...
[ "VEmail", "class_resa___pro_1_1_formularios_1_1_agregar_solicitud.html#a82942b118e0a793b872442f768279496", null ], [ "VerificacionFechas", "class_resa___pro_1_1_formularios_1_1_agregar_solicitud.html#a8e655cd96c4fcb124ff84095c56e0e55", null ]
<|file_name|>oozie_setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses t...
<|file_name|>json.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-----------------...
<|file_name|>model_wallet_transaction_execute_response.go<|end_file_name|><|fim▁begin|>/* * The Plaid API * * The Plaid REST API. Please see https://plaid.com/docs/api for more details. * * API version: 2020-09-14_1.78.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. pa...
}
<|file_name|>Cache.java<|end_file_name|><|fim▁begin|><|fim▁hole|>/******************************************************************************* * Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * terms of the...
<|file_name|>views_tests.py<|end_file_name|><|fim▁begin|>from django.test.client import Client from django.test import TestCase from django.urls import reverse from nose.tools import * from django.contrib.auth import get_user_model User = get_user_model() from amon.apps.servers.models import server_model class TestS...
<|file_name|>5.cc<|end_file_name|><|fim▁begin|>// 2006-06-16 Paolo Carlini <pcarlini@suse.de> // Copyright (C) 2006-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General...
tg.get_time(str0.begin(), str0.end(), iss, err, &tm0); VERIFY( err == (failbit | eofbit) ); VERIFY( tm0.tm_sec == 0 );
<|file_name|>ex6_2.py<|end_file_name|><|fim▁begin|>import numpy as np import pyCloudy as pc import matplotlib.pyplot as plt from pyneb.utils.physics import IP # TODO: Add comments """ Pregunta 1 """ def alpha_B(Te): """ Recomb. coefficient, case B """ T4 = Te/1e4 return 2.6e-13/T4 def U_mean_def(...
c_input.set_sphere() # () or (True) : sphere, or (False): open geometry.
<|file_name|>query.py<|end_file_name|><|fim▁begin|>import itertools from django.conf import settings from django.db import models from django.utils import translation as translation_utils from olympia.addons.query import IndexCompiler, IndexQuery def order_by_translation(qs, fieldname): """ Order the Query...
return ('%s %s%s ON (%s.%s = %s.%s AND %s.%s = %s)' % (join_type, qn(name), alias_str,
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Implement common functions for tests """ from __future__ import print_function from __future__ import unicode_literals import io import sys def parse_yaml(yaml_file): """<|fim▁hole|> import yaml except ImportError: ...
Parses a yaml file, returning its contents as a dict. """ try:
<|file_name|>config.py<|end_file_name|><|fim▁begin|>""" Configurations -------------- Various setups for different app instances """ class Config: """Default config""" DEBUG = False TESTING = False SESSION_STORE = 'session' MONGODB_DB = 'default' SECRET_KEY = 'flask+braiiin=<3' LIVE = ...
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.<|fim▁hole|># # ********************************************************************** import os, sys path = [ "."...
# # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution.
<|file_name|>album.py<|end_file_name|><|fim▁begin|>from ..models import Album from ..resource import SingleResource, ListResource from ..schemas import AlbumSchema <|fim▁hole|> schema = AlbumSchema() routes = ('/album/<int:id>/',) model = Album class ListAlbums(ListResource): schema = AlbumSchema(many=...
class SingleAlbum(SingleResource):
<|file_name|>db_test.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- import datetime import xml.etree.ElementTree as et import pony.orm as orm import sys import os pjoin = os.path.join __dir__ = os.path.abspath(os.path.dirname(__file__)) sys.path.append(__dir__) from server import * dat = dict( code ...
last_login = datetime.datetime.now(), user_type = 'admin',
<|file_name|>sorting.ts<|end_file_name|><|fim▁begin|>export class MatchSorter { constructor() {} quicksort(items, left, right) { let pivot, partitionIndex; if (left < right) { pivot = right; partitionIndex = this.partition(items, pivot, left, right); this.quicksort(items, left, partiti...
<|file_name|>send_tencent_sms.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python2 # encoding:utf-8 # python 2.7 测试通过 # python 3 更换适当的开发库就能使用,在此我们不额外提供 import httplib import json import hashlib import random import time import argparse class SmsSingleSender: """ 单发类定义""" appid = 0 appkey = "" url =...
parser.add_argument("subject", help="the subject of the alarm sms") parser.add_argument("content", help="the content of the alarm sms") parser.add_argument("receiver", help="the phone number who receive the sms")
<|file_name|>LinkedinExtractor.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #imports from linkedin import linkedin import easygui import sys reload(sys) sys.setdefaultencoding("utf-8") import requests def enum(*sequential, **named): enums = dict(zip(sequential, range(len(sequential))), **named) ...
<|file_name|>basic_operations_tests.py<|end_file_name|><|fim▁begin|>import os import shutil class BasicOperations_TestClass: TEST_ROOT =' __test_root__' def setUp(self):<|fim▁hole|> self.regenerate_root print(self.TEST_ROOT) assert os.path.isdir(self.TEST_ROOT) def tearDown(self): ...
<|file_name|>baraban.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import time <|fim▁hole|>tc = 0.001 en = 0.3 es = 0.3 ## Import wall's geometry params=utils.getViscoelasticFromSpheresInteraction(tc,en,es) facetMat=O.materials.append(ViscElMat(frictionAngle=frictionAngle,**params)) # **par...
## PhysicalParameters Density=2400 frictionAngle=radians(35)
<|file_name|>ltsv.rs<|end_file_name|><|fim▁begin|>/*! Library for reading/writing Labeled Tab-Separated Values # Example ~~~~~~~~~~~~~~~~~~~~~~ extern mod ltsv; use ltsv::LTSVWriter; use ltsv::LTSVReader; fn main() { let infile = io::file_reader(&Path("path/fo/file.tlsv")).get(); for infile.read_ltsv().each ...
record.insert(label, value);
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # spherepy documentation build configuration file, created by # sphinx-quickstart on Sat Feb 7 21:35:42 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration val...
# The name of an image file (relative to this directory) to place at the top
<|file_name|>testing_sormqr.cpp<|end_file_name|><|fim▁begin|>/* -- MAGMA (version 1.6.1) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2015 @author Mark Gates @generated from testing_zunmqr.cpp normal z -> s, Fri Jan...
gpu_perf = gflops / gpu_time; if (info != 0)
<|file_name|>doc-cfg-target-feature.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// no-system-llvm // #49723: rustdoc didn't add target features when extracting or running doctests #![feature(doc_cfg)] /// Foo /// /// # Examples /// /// ``` /// #![feature(cfg_target_feature)] /// /// #[cfg(target_feature = "sse")] //...
// only-x86_64 // compile-flags:--test // should-fail
<|file_name|>eh_methods_old.js<|end_file_name|><|fim▁begin|>/* Uncaught exception * Output: EH_UNCAUGHT_EXCEPTION */ function throwsException() {<|fim▁hole|> try { throwsException(); } catch (e) { } } function doSomethingElse() { throwsException(); } doSomething(); doSomethingElse();<|fim▁end|>
throw new Error(); } function doSomething() {
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for consumable-stream 1.0 // Project: https://github.com/SocketCluster/consumable-stream // Definitions by: Daniel Rose <https://github.com/DanielRose> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // Minimum TypeScript Versio...
next(): Promise<IteratorResult<T>>;
<|file_name|>plugins.js<|end_file_name|><|fim▁begin|>import core from 'core-js'; import * as LogManager from 'aurelia-logging'; import {Metadata} from 'aurelia-metadata'; var logger = LogManager.getLogger('aurelia'); function loadPlugin(aurelia, loader, info){ logger.debug(`Loading plugin ${info.moduleId}.`); aur...
this.processed = true; return Promise.resolve(); };
<|file_name|>mod.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/. */ //! The implementation of the DOM. //! //! The DOM is comprised o...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>""" Auto-discovers all unittests in the tests directory and runs them """<|fim▁hole|>tests = loader.discover('tests', pattern='*.py', top_level_dir='.') testRunner = unittest.TextTestRunner() testRunner.run(tests)<|fim▁end|>
import unittest loader = unittest.TestLoader()
<|file_name|>WriteAbortedException.hpp<|end_file_name|><|fim▁begin|>/*================================================================================ code generated by: java2cpp author: Zoran Angelov, mailto://baldzar@gmail.com class: java.io.WriteAbortedException ============================================...
}
<|file_name|>15.2.3.5-4-83.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2009 Microsoft Corporation /// /// Redistribution and use in source and binary forms, with or without modification, are permitted provided /// that the following conditions are met: /// * Redistributions of source code must retain the ab...
/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS /// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
<|file_name|>renderer.test.js<|end_file_name|><|fim▁begin|>var t = require('chai').assert; var P = require('bluebird'); var Renderer = require('../').Renderer; var view = { "name": { "first": "Michael", "last": "Jackson" }, "age": "RIP", calc: function () { return 2 + 4; }, delayed: function ()...