prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>css.js<|end_file_name|><|fim▁begin|>var fs = require('fs'), path = require('path'), cleanCSS = require('clean-css'), rjs = require('requirejs'); module.exports = function(grunt) { // **css* task works pretty much the same as grunt's min task. The task // target is the destination, data is an ...
<|file_name|>bracket-push.rs<|end_file_name|><|fim▁begin|>extern crate bracket_push; use bracket_push::*; #[test] fn paired_square_brackets() { assert!(Brackets::from("[]").are_balanced()); } #[test] fn empty_string() { assert!(Brackets::from("").are_balanced()); } #[test] fn unpaired_brackets() { asser...
#[test] fn unpaired_and_nested_brackets() { assert!(!Brackets::from("([{])").are_balanced());
<|file_name|>interfaces.go<|end_file_name|><|fim▁begin|>package storageapi // 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 cause inc...
<|file_name|>0066_auto_20210428_0912.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.19 on 2021-04-28 09:12 from django.db import migrations, models import image_cropping.fields class Migration(migrations.Migration): <|fim▁hole|> dependencies = [ ('markets', '0065_auto_20190426_1255'), ] ...
<|file_name|>OptionalWeightUnitOfMeasure.java<|end_file_name|><|fim▁begin|>/* */ package com.elcuk.jaxb; /* */ /* */ import javax.xml.bind.annotation.XmlEnum; /* */ import javax.xml.bind.annotation.XmlType; /* */ /* */ @XmlType(name="OptionalWeightUnitOfMeasure") /* */ @XmlEnum /* */ public en...
<|file_name|>GoingToZeroOrInfinity.rs<|end_file_name|><|fim▁begin|>fn going(n: i32) -> f64 { let mut result = 0.0; for i in 1..n+1 { result += i as f64; result /= i as f64; } result } fn assert_fuzzy_equals(actual: f64, expected: f64) { let merr = 1.0e-6; let inrange = ...
(actual.abs() <= merr) } else { ((actual - expected).abs() / expected <= merr)
<|file_name|>calcplusplus.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- coding: utf-8 -*-ç import sys import calcoo import calcoohija import csv if __name__ == "__main__": calc = calcoohija.CalculadoraHija() with open(sys.argv[1]) as fichero: reader = csv.reader(fichero) for operan...
resultado = calc.resta(int(operandos[1]), int(operandos[2]))
<|file_name|>SphinxTranscriptionService.d.ts<|end_file_name|><|fim▁begin|>/** * Implements a TranscriptionService for a Sphinx4 http server */ export default class SphinxService extends AbstractTranscriptionService { url: string;<|fim▁hole|>} import AbstractTranscriptionService from "./AbstractTranscriptionServic...
<|file_name|>_management_link_client.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. # Co...
def __enter__(self): # type: () -> ManagementLinkClient self._client.__enter__()
<|file_name|>webhooks.py<|end_file_name|><|fim▁begin|>from flask import request from structlog import get_logger from ghinbox import app from ghinbox.tasks import create_issue logger = get_logger() @app.route('/hooks/postmark', methods=['POST']) def postmark_incomming_hook(): # TODO #2 HTTP Basic Auth <|fim▁h...
inbound = request.json if not inbound:
<|file_name|>AsyncTask.java<|end_file_name|><|fim▁begin|>package org.wikipedia.concurrency; // Copied from Android 4.4.2_r2 source // so we can use executeOnExecutor :P // // https://android.googlesource.com/platform/frameworks/base/+/android-4.4.2_r2/core/java/android/os/AsyncTask.java /* * Copyright (C) 20...
*/ protected final void publishProgress(Progress... values) {
<|file_name|>import3DS.py<|end_file_name|><|fim▁begin|>#*************************************************************************** #* * #* Copyright (c) 2016 Yorik van Havre <yorik@uncreated.net> * #* ...
m = [tuple(r) for r in d_nobj.obj.matrix.array] m = m[0] + m[1] + m[2] + m[3] placement = FreeCAD.Placement(FreeCAD.Matrix(*m)) mesh = Mesh.Mesh(meshdata)
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from Players.models import Player @admin.register(Player) class PlayerAdmin(admin.ModelAdmin): view_on_site = True list_display = ('pk', 'first_name', 'last_name', 'number', 'team', 'position', 'age', 'height', 'weight') ...
# Disable delete action form the list; not ideal, disables delete for all players def get_actions(self, request):
<|file_name|>042_ReverseWordsInSequence.java<|end_file_name|><|fim▁begin|>/** * Created by Administrator on 2017/3/11. */ public class ReverseWordsInSequence { public void reverseSequence(String str) { if (str == null) return; String[] strArray = str.split(" "); StringBuilder sb = n...
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # encoding: utf-8 """ main.py The entry point for the book reader application. """ __version_info__ = (0, 0, 1) __version__ = '.'.join(map(str, __version_info__)) __author__ = "c.guenther@mac.com" import time import sqlite3 import pdb import...
<|file_name|>basic_auth.py<|end_file_name|><|fim▁begin|># Copyright 2013 Gert Kremer # # 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/LIC...
return view_decorator
<|file_name|>ports_list.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2016 Nicolargo <nicolas@nicolargo.com> # # Glances 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|>test.py<|end_file_name|><|fim▁begin|>" Settings for tests. " from settings.project import * # Databases DATABASES = { 'default': {<|fim▁hole|> 'NAME': ':memory:', 'USER': '', 'PASSWORD': '', 'TEST_CHARSET': 'utf8', }} # Caches CACHES['default']['BACKEND'] = 'django....
'ENGINE': 'django.db.backends.sqlite3',
<|file_name|>subst.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|>Invocation.java<|end_file_name|><|fim▁begin|>package org.jruby.ext.ffi.jna; import java.util.ArrayList; import org.jruby.runtime.ThreadContext; /** * An invocation session. * This provides post-invoke cleanup. */ final class Invocation { private final ThreadContext context; private ArrayList<R...
} void finish() {
<|file_name|>submit_util.py<|end_file_name|><|fim▁begin|>''' Created on Aug 21, 2014 @author: Dean4Devil ''' import mysql.connector from pycore.sql_util import MySQLHelper class SubmitTree(): 'A tree of all submits to that standard. I.e. OpenDriver is a tree, OpenDriver 0.2 is a submit.' def __init__(s...
cur.close() con.close()
<|file_name|>version.ts<|end_file_name|><|fim▁begin|>/** * Version Service */ import semver = require('semver'); interface VersionUtility { normalizeName?: (name: string) => string; compare?: (v1, v2) => number; }<|fim▁hole|> // Normalize version name VersionUtility.normalizeName = function (name) { if (name[...
var VersionUtility: VersionUtility = {};
<|file_name|>instr_shld.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn shld_1() { run_test(&Instruction ...
<|file_name|>config_flow.py<|end_file_name|><|fim▁begin|>"""Config flow for Mailgun.""" from homeassistant.helpers import config_entry_flow from .const import DOMAIN config_entry_flow.register_webhook_flow( DOMAIN,<|fim▁hole|> { "mailgun_url": "https://documentation.mailgun.com/en/latest/user_manual.ht...
"Mailgun Webhook",
<|file_name|>audit.js<|end_file_name|><|fim▁begin|>// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. /** * @fileOverview WebAudio layout test utility library. Built around W3C's * testh...
<|file_name|>notify.rs<|end_file_name|><|fim▁begin|>use notify_rust::{Notification, NotificationHint, NotificationUrgency}; use rusthub::notifications; use std::process::Command; use std::thread; use std::path::Path; const APP_NAME: &'static str = "gh-notify"; pub fn show_notification(notification: &notifications::No...
}
<|file_name|>client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: latin-1 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 3, or (at your optio...
# Create HTTP wrapper Http = get_Http()
<|file_name|>findBarcode.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ Code128 Barcode Detection & Analysis (c) Charles Shiflett 2011 Finds Code128 barcodes in documents scanned in Grayscale at 300 dpi. Usage: Each page of the PDF must be converted to a grayscale PNG i...
raise
<|file_name|>init.py<|end_file_name|><|fim▁begin|>''' TODO: Init package docs ''' import logging import uuid from grader.models import Grader from grader.utils.config import is_grader_dir logger = logging.getLogger(__name__) help = 'Initialize grader by creating grader.yml' def setup_parser(parser): parser.ad...
<|file_name|>categories.js<|end_file_name|><|fim▁begin|>var _ = require('underscore'); var express = require('express'); var router = express.Router(); var Autocomplete = require('autocomplete'); var autocomplete = Autocomplete.connectAutocomplete(); var categoryNames = [];<|fim▁hole|> categoryNames.push(category.na...
var categories = require('../data/categories.json'); _.each(categories, function (category) { if( category.name!=undefined || category.name!=null )
<|file_name|>chrDesktopNotificationsView.js<|end_file_name|><|fim▁begin|>var chrDesktopNotificationsView = new function () { 'use strict'; var that = this; this.ID = 'chrDesktopNotificationsView'; this.ns = {}; this.showChrRichNotificationProgress = function (title, body, sourceUrl, noturl, iconU...
this.stopUpdateChrNotificationProgress = function (nid) { try {
<|file_name|>jquery.tosrus.html.min.js<|end_file_name|><|fim▁begin|>/* <|fim▁hole|> * jQuery Touch Optimized Sliders "R"Us * HTML media * * Copyright (c) Fred Heusschen * www.frebsite.nl */ !function(i){var n="tosrus",e="html";i[n].media[e]={filterAnchors:function(n){return"#"==n.slice(0,1)&&i(n).is("div")},initAn...
<|file_name|>builds-correctly.js<|end_file_name|><|fim▁begin|>//// [/lib/initial-buildOutput.txt] /lib/tsc --b /src/src/main /src/src/other exitCode:: ExitStatus.Success //// [/src/dist/main/a.d.ts] export {}; //// [/src/dist/main/a.js] "use strict"; exports.__esModule = true; var b_1 = require("./b"); v...
"../../src/main/a.ts": [ "../../src/main/b.ts" ]
<|file_name|>apps.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class ScheduleConfig(AppConfig): name = 'schedule'<|fim▁end|>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig
<|file_name|>networktreeitem.cpp<|end_file_name|><|fim▁begin|>//============================================================================================================= /** * @file networktreeitem.cpp * @author Lorenz Esch <Lorenz.Esch@tu-ilmenau.de>; * Matti Hamalainen <msh@nmr.mgh.harvard.edu> * ...
<|file_name|>rpc_server.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from tornado.ioloop import IOLoop from stormed import Connection, Message def fib(n): if n == 0: return 0 elif n == 1: return 1 else: return fib(n-1) + fib(n-2) def on_connect(): global ch ch = conn.channel...
#!/usr/bin/env python import logging
<|file_name|>Tabs.Skeleton.js<|end_file_name|><|fim▁begin|>import React from 'react'; export default class TabsSkeleton extends React.Component { render() { const tab = ( <li className="wfp--tabs__nav-item"> <div className="wfp--tabs__nav-link">&nbsp;</div><|fim▁hole|> </li> ); return ...
<|file_name|>structofp13__meter__band__dscp__remark.js<|end_file_name|><|fim▁begin|>var structofp13__meter__band__dscp__remark = [ [ "burst_size", "structofp13__meter__band__dscp__remark.html#a65ae2e874c730303bbc5d780640f7fc9", null ], [ "len", "structofp13__meter__band__dscp__remark.html#ad56aaad8bcc7a48f6f232...
[ "rate", "structofp13__meter__band__dscp__remark.html#a1087876e1f2f5eacbb785424dad28347", null ], [ "type", "structofp13__meter__band__dscp__remark.html#a6837249197a1667e26a848d4870ebaff", null ] ];
<|file_name|>generate_playlist.py<|end_file_name|><|fim▁begin|>""" Playlist Generation """ from os import path from random import choice import string import pafy from .. import content, g, playlists, screen, util, listview from ..playlist import Playlist from . import command, search, album_search @command(r'mk...
<|file_name|>dns_oa.py<|end_file_name|><|fim▁begin|>import logging import os import json import shutil import sys import datetime import csv, math from tld import get_tld from collections import OrderedDict from utils import Util from components.data.data import Data from components.iana.iana_transform import IanaTran...
edge_file ="{0}/edge-{1}_{2}_00.csv".format(self._data_path,dns_qry_name.replace("/","-"),hh)
<|file_name|>managed_value_store_cache.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/extensions/api/storage/managed_value_store_cache.h" #...
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); PolicyValueStoreMap::iterator it = store_map_.find(extension_id); if (it == store_map_.end()) return NULL;
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require("gulp"), concat = require("gulp-concat"), karma = require("karma").server, mocha = require("gulp-mocha"), nodemon = require("gulp-nodemon"), notify = require("gulp-notify"), size = require("gulp-filesize"), sourcemaps = require("gulp-source...
.pipe(notify(path + " tscTest compiled into JavaScript")) .pipe(size()); }
<|file_name|>UploadSslCertCmd.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 u...
// software distributed under the License is distributed on an
<|file_name|>return_statements_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
<|file_name|>main_player.js<|end_file_name|><|fim▁begin|>function mainPlayer() { this.x = 100; this.y = 200; this.d = "u"; // "d", "l", "r", and combinations? this.sword = false; this.walking = false; this.bomb = false; this.bow = false; this.keyFrameRow = 0; this.keyFrame = 0; this.keyFrameN = 4...
ix = 2; } ix *= 4; iy *= 4;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::error; use std::marker; #[derive(Debug)] pub enum BencodeError { ParseError(&'static str) } impl fmt::Display for BencodeError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { BencodeError::ParseE...
where Self: marker::Sized;
<|file_name|>observable-util.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Trim-marks Inc. * * This file is part of Vivliostyle UI. * * Vivliostyle UI 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 Fo...
value: Observable<T>; }; const util = {
<|file_name|>EN.ts<|end_file_name|><|fim▁begin|>// tslint:disable:max-line-length export default { About: { About: "ABOUT THE PROGRAM", AppCoreVersion: "The kernel version of the application:", AppVersion: "Version", CSPVersion: "CryptoPro CSP:", Compatible: "(compatibility with Electron 1.6.6, O...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># coding: utf-8 from django.contrib import admin from hub.models import ExtraUserDetail from .models import AuthorizedApplication <|fim▁hole|># Register your models here. admin.site.register(AuthorizedApplication) admin.site.register(ExtraUserDetail)<|fim▁end|>
<|file_name|>list_funds.js<|end_file_name|><|fim▁begin|>dojo.require("dijit.Dialog"); dojo.require("dijit.form.FilteringSelect"); dojo.require('dijit.form.Button'); dojo.require('dijit.TooltipDialog'); dojo.require('dijit.form.DropDownButton'); dojo.require('dijit.form.CheckBox'); dojo.require('dojox.grid.DataGrid'); d...
}
<|file_name|>i2c_display.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] extern crate i2cdev; use super::*; use self::i2cdev::core::I2CDevice; use self::i2cdev::linux::{LinuxI2CDevice, LinuxI2CError}; const MODE_REGISTER: u8 = 0x00; const FRAME_REGISTER: u8 = 0x01; const AUTOPLAY1_REGISTER: u8 = 0x02; const AU...
} Ok(())
<|file_name|>QTSSPrefs.cpp<|end_file_name|><|fim▁begin|>/* * * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2008 Apple Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2....
<|file_name|>ConsultationRequest.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. * This software is published under the GPL GNU General Public License. * This program is free software; you can redistribute it and/or * modify i...
<|file_name|>tool_test.go<|end_file_name|><|fim▁begin|>package tool_test import ( "bytes" "strings" "testing" "github.com/matryer/codeform/source" "github.com/matryer/codeform/tool" "github.com/matryer/is" ) func TestExecute(t *testing.T) { is := is.New(t) srcCode := source.Reader("source.go", strings.NewRe...
`{{ range .Packages }}{{ range .Interfaces }}{{ .Name }} {{ end }}{{ end }}`,
<|file_name|>ExampleApp.C<|end_file_name|><|fim▁begin|>/****************************************************************/ /* DO NOT MODIFY THIS HEADER */ /* MOOSE - Multiphysics Object Oriented Simulation Environment */ /* ...
}
<|file_name|>car.py<|end_file_name|><|fim▁begin|>""" Created on 11.09.2014 @author: benjamin@boerngen-schmidt.de """ from abc import ABCMeta, abstractmethod import random<|fim▁hole|> class BaseCar(metaclass=ABCMeta): """ Represents the fundamentals of a car """ def __init__(self, env, tank_size): ...
import datetime
<|file_name|>controlflow.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/lic...
}
<|file_name|>data_api.py<|end_file_name|><|fim▁begin|>from colab.plugins.utils.proxy_data_api import ProxyDataAPI <|fim▁hole|>class JenkinsDataAPI(ProxyDataAPI): def fetch_data(self): pass<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#Made by Kerb import sys from com.l2scoria import Config from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "644_GraveR...
#Items
<|file_name|>FilterByID_dict_parse.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------- # Name: module1 # Purpose: # # Author: Eli # # Created: 06/04/2014 # Copyright: (c) Eli 2014 # Licence: <your licence> #---------------------...
# sys.stdout.write('\t'.join(idlist1[name]) + '\t' + '\t'.join(line.split('\t')[2:]))
<|file_name|>htmldialogelement.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 dom::bindings::cell::DOMRefCell; use dom::bindi...
<|file_name|>model_describe.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Provides textual descriptions for :mod:`behave.model` elements. """ from behave.textutil import indent # ----------------------------------------------------------------------------- # FUNCTIONS:<|fim▁hole|># --------------------...
<|file_name|>release_stages.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module containing the various stages that a builder runs.""" import json import loggin...
url: Url to fetch and parse.
<|file_name|>starter_imagelist.cpp<|end_file_name|><|fim▁begin|>/* * starter_imagelist.cpp * * Created on: Nov 23, 2010 * Author: Ethan Rublee * * A starter sample for using opencv, load up an imagelist * that was generated with imagelist_creator.cpp * easy as CV_PI right?<|fim▁hole|> */ #include "opencv2...
<|file_name|>docfix.js<|end_file_name|><|fim▁begin|>(function (w) { var $ = w.$, d = document, e = d.documentElement, g = d.getElementsByTagName('body')[0], my = w.ilm, contid = 0; function fixCharts(width, fn) { $(fn).css("width", width); $(d).ready(function () { var inner = $(fn).width(); ...
w.ilm.showLinks(); } else if (e.keyCode === 13 && obj.style.display === "none") {
<|file_name|>markdownx-widget.js<|end_file_name|><|fim▁begin|>let widget = document.getElementsByClassName('markdownx-widget')[0]; let element = document.getElementsByClassName('markdownx'); let element_divs = element[0].getElementsByTagName('div'); let div_editor = element_divs[0]; let div_preview = element_divs[1]; ...
}
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework import serializers from workers.models import (TaskConfig, Task, Job, TaskProducer) from grabbers.serializers import (MapperSerializer, ...
<|file_name|>disable.py<|end_file_name|><|fim▁begin|># # Copyright 2013, 2018, 2019 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 Foundatio...
f.write(swigfile)
<|file_name|>glut_viewer_gui.cpp<|end_file_name|><|fim▁begin|>/* * _____ _ _ _ _____ _ _ _ _____ _ __ _____ _____ * / ___| | | | | | | |_ _| | | / / | | | ____| | | / / | ____| | _ \ * | | | | | | | | | | | | / / | | | |__...
circle_arc_vertices(x,y,r,0.0f,400.0f) ;
<|file_name|>scope.js<|end_file_name|><|fim▁begin|>(function() { var Scope, extend, last, _ref; _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; exports.Scope = Scope = (function() { Scope.root = null; function Scope(parent, expressions, method) { this.parent = pare...
{
<|file_name|>spatialemis.go<|end_file_name|><|fim▁begin|>/* Copyright © 2017 the InMAP authors. This file is part of InMAP. InMAP 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, o...
// Emissions returns spatially-explicit emissions caused by the // specified economic demand. Emitters // specifies the emitters emissions should be calculated for.
<|file_name|>register-web-ui-test.js<|end_file_name|><|fim▁begin|>// register-web-ui-test.js // // Test that the home page shows an invitation to join // // Copyright 2012, E14N https://e14n.com/ // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with...
"it works": function(err, app) { assert.ifError(err); },
<|file_name|>socket.rs<|end_file_name|><|fim▁begin|>use std::net::{SocketAddr, UdpSocket}; use std::io; use std::time::Duration; pub trait SocketProvider<I,S> { fn new_state() -> S; fn bind(addr: &SocketAddr, state: &mut S) -> Result<I, io::Error>; fn local_addr(&self) -> Result<SocketAddr, io::Error>; ...
fn bind(addr: &SocketAddr, state: &mut SimulatorRef) -> Result<SimulatedSocket, io::Error> { Ok(SimulatedSocket { local_addr: addr.clone(),
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>from django_nose.tools import assert_false, assert_true from pontoon.base.tests import TestCase from pontoon.base.utils import extension_in class UtilsTests(TestCase): def test_extension_in(self): assert_true(extension_in('filename.txt', ['bat', 'tx...
<|file_name|>gridrenderer.js<|end_file_name|><|fim▁begin|>GridRenderer.prototype.extend( { <|fim▁hole|><|fim▁end|>
});
<|file_name|>index.test.js<|end_file_name|><|fim▁begin|>import demand from 'must'; import { columnsParser, sortParser, filtersParser, filterParser, createFilterObject } from '../index'; import sinon from 'sinon'; describe('<List> query parsers', function () { beforeEach(function () { this.fields = { name: { ...
<|file_name|>import_spec.js<|end_file_name|><|fim▁begin|>describe('import.js', function() { describe('ImportSetup', function() { describe('#respondToPostMessages', function() { var test = { callback: function(uploadId, message) { } }; beforeEach(function() { spyOn(test, 'callbac...
describe('#listenForGitPostMessages', function() { var gitPostMessageCallback; beforeEach(function() {
<|file_name|>DjangoProjectTemplate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Projy template for PythonPackage. """ # system from datetime import date from os import mkdir, rmdir from shutil import move from subprocess import call # parent class from projy.templates.ProjyTemplate import ProjyTemplate ...
mail_collector = AuthorMailCollector() substitute_dict = { 'project': self.project_name, 'project_lower': self.project_name.lower(),
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Author: Joel Grand-Guillaume # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it unde...
# # You should have received a copy of the GNU Affero General Public License
<|file_name|>_explanation.py<|end_file_name|><|fim▁begin|>import pandas as pd import numpy as np import scipy as sp import sys import warnings import copy import operator import sklearn from slicer import Slicer, Alias, Obj # from ._order import Order from .utils._general import OpChain # slicer confuses pylint... # p...
<|file_name|>BackRightAutonomous.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * * @author Bill */ public class BackRightAutonomous extends CommandBase { public BackRightAutonomous() { // Use req...
// Called just before this Command runs the first time
<|file_name|>sizelimit.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 OpenStack, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License a...
<|file_name|>test_ipminative.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2013 International Business Machines Corporation # 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 # ...
<|file_name|>modifyvolumeresponse.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, e...
<|file_name|>pens_test.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division, absolute_import import unittest from cu2qu.pens import Cu2QuPen, Cu2QuPointPen from . import CUBIC_GLYPHS, QUAD_GLYPHS from .utils import DummyGlyph, DummyPointGlyph from .utils import DummyPen, DummyPointPen from f...
def test_convert_simple_glyph(self): self.expect_glyph(CUBIC_GLYPHS['a'], QUAD_GLYPHS['a'])
<|file_name|>create_baseline_stubs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Script to generate unannotated baseline stubs using stubgen. Basic usage: $ python3 scripts/create_baseline_stubs.py <project on PyPI> Run with -h for more help. """ import argparse import os import re import shutil import ...
run_stubgen(package)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .file_logger import FileLogger
<|file_name|>targetpool.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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 Unl...
Instances []string `json:"instances,omitempty"` SessionAffinity string `json:"session_affinity,omitempty"`
<|file_name|>active.js<|end_file_name|><|fim▁begin|>$(document).ready(function(){ //Grabs url path var url = window.location.pathname; //Grabs current file name from URL var url = url.substring(url.lastIndexOf('/')+1); // now grab every link from the navigation<|fim▁hole|> $('#navigation a').each(function(){ //Grab th...
<|file_name|>irc.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Copyright (c) 2011-2012 Litecoin Developers // Copyright (c) 2013 Fastcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING...
if (!Wait(nRetryWait += 60)) return; } }
<|file_name|>test_conditional.py<|end_file_name|><|fim▁begin|>from __future__ import (absolute_import, division, print_function) __metaclass__ = type from units.compat import unittest from units.mock.loader import DictDataLoader from mock import MagicMock<|fim▁hole|> from ansible.template import Templar from ansible i...
<|file_name|>sys.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 T. Okubo // This file is part of vlc-rs. // Licensed under the MIT license, see the LICENSE file. #![allow(non_camel_case_types, non_upper_case_globals)] #[link(name = "vlc")] extern "C" {} use libc::{c_void, c_int, c_uint, c_char, c_float, uintp...
pub i_decoded_video: c_int, pub i_decoded_audio: c_int, /* Video Output */
<|file_name|>doctor_attentions_diseases_inherit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ############################################################################# # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free s...
<|file_name|>configuration.get.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2010 Surevine Limited. * * Although intended for deployment and use alongside Alfresco this module should * be considered 'Not a Contribution' as defined in Alfresco'sstandard contribution agreement, see * http://www.alfresco...
<|file_name|>qapi-visit.py<|end_file_name|><|fim▁begin|># # QAPI visitor generator # # Copyright IBM, Corp. 2011 # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Michael Roth <mdroth@linux.vnet.ibm.com> # # This work is licensed under the terms of the GNU GPLv2. # See the COPYING.LIB file in the top-level di...
fdef.write(ret)
<|file_name|>templates.js<|end_file_name|><|fim▁begin|>// # Templates // // Figure out which template should be used to render a request // based on the templates which are allowed, and what is available in the theme // TODO: consider where this should live as it deals with channels, singles, and errors var _ = require...
slugTemplate = 'post-' + postObject.slug; if (postObject.page) {
<|file_name|>account_config.py<|end_file_name|><|fim▁begin|># Copyright 2018 Silvio Gregorini (silviogregorini@openforce.it) # Copyright (c) 2018 Openforce Srls Unipersonale (www.openforce.it) # Copyright (c) 2019 Matteo Bilotta # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).<|fim▁hole|>class ResConfig...
from odoo import fields, models
<|file_name|>two_step_pipeline.py<|end_file_name|><|fim▁begin|># Copyright 2020 The Kubeflow 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/LI...
- sh - -c - |
<|file_name|>ItemTM1.java<|end_file_name|><|fim▁begin|>package com.houtekamert.testmod1.item; import com.houtekamert.testmod1.creativetab.CreativeTabTM1; import com.houtekamert.testmod1.reference.Reference; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.render...
<|file_name|>getMotionEventName.js<|end_file_name|><|fim▁begin|>// will this be needed? var getMotionEventName = function(type) { var t; var el = document.createElement('fakeelement'); var map = {}; if (type == 'transition') { map = { 'transition': 'transitionend', 'OTransition': 'oT...