prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ContactPhone.java<|end_file_name|><|fim▁begin|>package ru.stqa.pft.addressbook.tests; <|fim▁hole|>import org.testng.annotations.Test; import ru.stqa.pft.addressbook.model.ContactData; import ru.stqa.pft.addressbook.tests.TestBase; import java.util.Arrays; import java.util.stream.Collectors; import static...
import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert;
<|file_name|>NaN.js<|end_file_name|><|fim▁begin|>var test = require('tape'); var equal = require('../'); test('NaN and 0 values', function (t) { t.ok(equal(NaN, NaN)); t.notOk(equal(0, NaN)); t.ok(equal(0, 0)); t.notOk(equal(0, 1)); t.end(); }); <|fim▁hole|> t.ok(equal([ NaN, 1, NaN...
test('nested NaN values', function (t) {
<|file_name|>GradebookExternalAssessmentService.java<|end_file_name|><|fim▁begin|>/********************************************************************************** * * $Id$ * *********************************************************************************** * * Copyright (c) 2007, 2008 The Sakai Foundation * * Li...
/** * Retrieve all assignments for a gradebook that are marked as externally
<|file_name|>TransformerStepPlugin.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) Mirth Corporation. All rights reserved. * * http://www.mirthcorp.com * * The software in this package is published under the terms of the MPL license a copy of which has * been included with this distribution in the LI...
public TransformerStepPlugin(String name) { super(name); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> __all__ = [ 'get_filepath', ] def get_filepath(name='sherpa_wz.hepmc'): return resource_filename('deepjets', os.path.join('testdata', name))<|fim▁end|>
import os from pkg_resources import resource_filename
<|file_name|>video_mode.rs<|end_file_name|><|fim▁begin|>// The MIT License (MIT) // // Copyright (c) 2014 Jeremy Letang // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restricti...
pub struct VideoMode { pub width: i32,
<|file_name|>model.py<|end_file_name|><|fim▁begin|>from keras.models import Sequential, model_from_json from keras.layers import Dense, Dropout, Activation, Flatten, Convolution2D, MaxPooling2D, Lambda, ELU from keras.layers.normalization import BatchNormalization from keras.optimizers import Adam import cv2 import cs...
#
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import requests from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.simplejson import dumps, loads from common.models import Singleton from lock_manager import Lock, LockError...
<|file_name|>backuptool.py<|end_file_name|><|fim▁begin|>import tarfile import time import os import json class BackupTool(object): """Simple backup utility.""" def __init__(self): pass @staticmethod def backup(openbazaar_installation_path, backup_folder_path, on...
date_time = time.strftime('%Y-%h-%d-%H-%M-%S')
<|file_name|>PokemonAdapter.java<|end_file_name|><|fim▁begin|>package org.foi.androidworkshop.adapters; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import or...
this.pokemons = pokemons; }
<|file_name|>OutsideGroupDependentConfigsTest.java<|end_file_name|><|fim▁begin|>/** * JBoss, Home of Professional Open Source. * Copyright 2014-2022 Red Hat, Inc., and individual contributors * as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use ...
super.initialize(); saveConfig(config1);
<|file_name|>StreamHandler.java<|end_file_name|><|fim▁begin|>/* StreamHandler.java -- A class for publishing log messages to instances of java.io.OutputStream Copyright (C) 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modi...
* * <p>In case of an I/O failure, the <code>ErrorManager</code> * of this <code>Handler</code> will be informed, but the caller * of this method will not receive an exception.
<|file_name|>offscreencanvasrenderingcontext2d.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/. */ use crate::dom::bindings::cell::Do...
self.canvas_state .borrow() .DrawImage(self.htmlcanvas.as_ref().map(|c| &**c), image, dx, dy) }
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::error::Error; use mediawiki::{ api_sync::ApiSync, }; const CATEGORY_NAMESPACE: &str = "14"; fn ends_in_four_digits(s: &str) -> bool { s.chars().rev().take(4).all(|c: char| c.is_ascii_digit()) } fn make_map(params: &[(&...
output_filename.push(chrono::Utc::now().format("%d %B %Y").to_string()); output_filename.set_extension("json"); std::fs::write(output_filename, serde_json::to_string(&counts)?)?;
<|file_name|>apps.py<|end_file_name|><|fim▁begin|><|fim▁hole|>""" from __future__ import absolute_import, print_function, unicode_literals INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'dja...
#!/usr/bin/env python # -*- coding: utf-8 -*- """
<|file_name|>test_plugin.py<|end_file_name|><|fim▁begin|>"""Tests for plugin.py.""" import ckanext.dictionary.plugin as plugin def test_plugin():<|fim▁hole|><|fim▁end|>
pass
<|file_name|>i686_unknown_linux_gnu.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.apa...
data_layout: "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string(), llvm_target: "i686-unknown-linux-gnu".to_string(), target_endian: "little".to_string(),
<|file_name|>website_settings.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import get_request_site_address, encode from frappe.model.docume...
<|file_name|>attributes.py<|end_file_name|><|fim▁begin|>import json import requests # TODO: Complete methods. class AttributeType(): """Attribute Type Client.""" # Service Setup config = { 'schema': 'http', 'host': 'localhost', 'port': '9903', 'endpoint': 'api/v1/attribut...
"""Attribute Client."""
<|file_name|>solution.py<|end_file_name|><|fim▁begin|>def is_palindrome(data): if isinstance(data, list): data = ''.join(c.lower() for c in ''.join(data) if c.isalpha()) if isinstance(data, str): return "Palindrome" if data == data[::-1] else "Not a palindrome" else: return "Invalid ...
num, *lines = file.read().splitlines() print(is_palindrome(lines))
<|file_name|>test_consul.py<|end_file_name|><|fim▁begin|>import random from tests.checks.common import AgentCheckTest, load_check from utils.containers import hash_mutable MOCK_CONFIG = { 'init_config': {}, 'instances' : [{ 'url': 'http://localhost:8500', 'catalog_checks': True, }] } MOCK...
"Node": "node-1",
<|file_name|>vs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ pygments.styles.vs ~~~~~~~~~~~~~~~~~~ Simple style with MS Visual Studio colors. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """<|fim▁hole|> Operator, Gene...
from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \
<|file_name|>resource_sked.hh<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010-2011 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: redistribu...
int numStages; };
<|file_name|>format.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import argparse import sys import yaml <|fim▁hole|>from pf_focus.markdown import output_markdown from pf_focus.bbcode import output_bbcode from pf_focus.parse import parse_pfsense from pf_focus.pfsense import PfSenseDocument from pf_focus.progr...
<|file_name|>File.js<|end_file_name|><|fim▁begin|>/* * Moonshine - a Lua virtual machine. * * Email: moonshine@gamesys.co.uk * http://moonshinejs.org * * Copyright (c) 2013-2015 Gamesys Limited. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this soft...
<|file_name|>basic.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var parseTorrent = require('parse-torrent') var test = require('tape') var WebTorrent = require('../') var DHT = require('bittorrent-dht/client') var parallel = require('run-parallel') var bufferEqual = require('buffer-equal') var leaves = fs.readFileSync(...
var fs = require('fs')
<|file_name|>window.rs<|end_file_name|><|fim▁begin|>use error::Result; use error::Error::Sdl as SdlError; use sdl2::Sdl; use sdl2::video::Window as SdlWindow; use sdl2::video::{gl_attr, GLProfile, GLContext}; use libc::c_void; use gl; use sdl2; const WINDOW_TITLE: &'static str = "Rusty Doom v0.0.7 - Toggle mouse with...
pub fn clear(&self) { check_gl_unsafe!(gl::Clear(gl::COLOR_BUFFER_BIT | gl::DEPTH_BUFFER_BIT));
<|file_name|>remote_database.py<|end_file_name|><|fim▁begin|>__author__ = 'juan' import json from termcolor import colored import mysql.connector import time config = { 'user': 'elec', 'password': 'elec', 'host': 'thor.deusto.es', 'database': 'eu_test2', } class database: def __init__(self): ...
try: cursor = self.con.cursor() cursor.execute("SELECT text, total from hash_group WHERE ( text='"+hashtag+"' AND group_id = 'ALDE' AND day = '"+str(date)+"')")
<|file_name|>dde-session-ui_gl_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="gl_ES" version="2.1"> <context> <name>ContentWidget</name> <message> <location filename="../dde-shutdown/view/contentwidget.cpp" line="244"/> <location filename="../dde-shutdown/vie...
</context> <context>
<|file_name|>test_cli20_rule.py<|end_file_name|><|fim▁begin|># Copyright 2015 Huawei Technologies India Pvt Ltd. # 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...
None) self._test_list_resources(resources, cmd, True, response_contents=response_contents, cmd_resources=cmd_resources)
<|file_name|>model.external.py<|end_file_name|><|fim▁begin|># The content of this file was generated using the Python profile of libCellML 0.2.0. from enum import Enum from math import * __version__ = "0.3.0" LIBCELLML_VERSION = "0.2.0" STATE_COUNT = 3 VARIABLE_COUNT = 19 class VariableType(Enum): VARIABLE_OF...
<|file_name|>DateArrayType.js<|end_file_name|><|fim▁begin|>/*! * Module dependencies. */ var util = require('util'), moment = require('moment'), super_ = require('../Type'); /** * Date FieldType Constructor * @extends Field * @api public */ function datearray(list, path, options) { this._nativeType = [Dat...
<|file_name|>train_eval_online.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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....
flags.DEFINE_string('env_name', 'pixels-dm-cartpole-swingup', 'Environment for training/evaluation.') flags.DEFINE_integer('seed', 42, 'Fixed random seed for training.')
<|file_name|>initialConditions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Tue Aug 25 13:08:19 2015 @author: jgimenez """ from PyQt4 import QtGui, QtCore from initialConditions_ui import Ui_initialConditionsUI import os from utils import * from PyFoam.RunDictionary.BoundaryDict import Boun...
def clearLayout(self, layout, dejar): for i in reversed(range(layout.count())): if i>= dejar: item = layout.itemAt(i)
<|file_name|>RegisterBankEmitter.cpp<|end_file_name|><|fim▁begin|>//===- RegisterBankEmitter.cpp - Generate a Register Bank Desc. -*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: ...
<|file_name|>IncludeTest.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013 Statoil ASA. This file is part of the Open Porous Media project (OPM). OPM 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 ...
<|file_name|>app.ts<|end_file_name|><|fim▁begin|>import { PLATFORM } from 'aurelia-framework'; import { RouterConfiguration, Router } from 'aurelia-router'; export class App { appDate: Date = new Date(); message = 'Hello, welcome to Aurelia!'; router: Router; configureRouter(config: RouterConfiguration, route...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = function(el, state, container) { var ul = el.getElementsByTagName('ul')[0] var lastFlags = [] var controlsTouch = -1 var containerTouch = {"id":-1, "x":-1, "y":-1} el.addEventListener('touchstart', startTouchControls) el.addEventListener('t...
} function handleTouchContainer(event) {
<|file_name|>login.module.spec.js<|end_file_name|><|fim▁begin|>'use strict'; describe('LoginController', function () { // Load the parent app beforeEach(module('demoSite')); var $controller; var $scope, controller, $window; beforeEach(inject(function (_$controller_) { $controller = _$con...
returnedData = new Object();
<|file_name|>application.py<|end_file_name|><|fim▁begin|>from flask import Flask from os.path import expanduser <|fim▁hole|>def create_app(): app = Flask(__name__) app.config.from_pyfile(expanduser('~/.directory-tools.py')) from directory_tools.frontend import frontend app.register_blueprint(frontend)...
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ flaskbb.management.views ~~~~~~~~~~~~~~~~~~~~~~~~ This module handles the management views. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import sys from flask import (Bluep...
def add_user():
<|file_name|>context.js<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Google LLC<|fim▁hole|> * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an...
* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
<|file_name|>unique-panic.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or<|fim▁hole|>// http://www.ap...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
did: ast::DefId) -> TypeAndSubsts<'tcx> {
<|file_name|>config_env.rs<|end_file_name|><|fim▁begin|>use envconfig::Envconfig; use crate::domain::key_derivation::KeyDerivationFunction; lazy_static! { static ref APP_ENV_CONFIG: AppEnvConfig = AppEnvConfig::init().unwrap(); } pub fn get_app_env_config() -> &'static AppEnvConfig { return &APP_ENV_CONFIG } ...
env::set_var("NEW_AGENT_KDF", "RAW"); let app_config = AppEnvConfig::init().unwrap();
<|file_name|>fish.ts<|end_file_name|><|fim▁begin|>import { FishingSpot } from './fishing-spot'; export interface Fish { guide: string; icon: number;<|fim▁hole|><|fim▁end|>
spots: FishingSpot[]; folklore?: number; }
<|file_name|>class-implement-trait-cross-crate.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or /...
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>const path = require('path'); const nodeExternals = require('webpack-node-externals'); // 외부 Node.js 모듈들을 포함하지 않기 위해 로드. const WebpackShellPlugin = require('webpack-shell-plugin'); const OutputFileName = 'aether.agent.package.js'; var serverCfg = { context: ...
path: path.resolve(__dirname, 'dist'), filename: OutputFileName }, module: {
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Authors: Karl MacMillan <kmacmill@redhat.com> # # Copyright (C) 2007 Red Hat # see file 'COPYING' for use and warranty information # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
config.default_domain = str(domain).rstrip(".")
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from . import models<|fim▁end|>
from django.contrib import admin
<|file_name|>issue-4542.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Package initialization.""" from .core import *<|fim▁hole|><|fim▁end|>
from .main import main from .pandocattributes import PandocAttributes
<|file_name|>intro_evals.py<|end_file_name|><|fim▁begin|>from datetime import datetime import structlog from flask import Blueprint, request from conditional.util.ldap import ldap_get_intro_members from conditional.models.models import FreshmanCommitteeAttendance from conditional.models.models import CommitteeMeeti...
<|file_name|>table_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 import numpy as np import bs <|fim▁hole|>n_rows = 10 n_cols = 5 t.init (n_rows, n_cols); for i in xrange (n_cols): t.set_col_name (i, "Col " + str (i)) a = np.linspace (float (i), float (i + 1), n_rows) t.set_col_values (i, a) print t<|fim▁...
t = bs.common_types.table ()
<|file_name|>submit.py<|end_file_name|><|fim▁begin|>import os import logging from jsub.util import safe_mkdir from jsub.util import safe_rmdir class Submit(object): def __init__(self, manager, task_id, sub_ids=None, dry_run=False, resubmit=False): self.__manager = manager self.__task = self.__manager.load_task(t...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 '''Check online DNSSEC signing module (just basic checks).''' import dns.rdatatype from dnstest.test import Test from dnstest.utils import * from dnstest.module import ModOnlineSign t = Test(stress=False) ModOnlineSign.check() knot = t.server...
if rrset.rdtype != dns.rdatatype.DNSKEY: continue else:
<|file_name|>TransformatorStructure.java<|end_file_name|><|fim▁begin|>package at.ac.tuwien.big.xmlintelledit.xmltext.ecoretransform.impl; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import j...
boolean idAttributeExisted = false; //Now you can arbitrarily pick one of the remaining candidates to add the ID attribute if (!superClasses.isEmpty()) {
<|file_name|>export_test.go<|end_file_name|><|fim▁begin|>package ec2 import ( "github.com/crowdmob/goamz/aws" "time" ) func Sign(auth aws.Auth, method, path string, params map[string]string, host string) { sign(auth, method, path, params, host) } func fixedTime() time.Time { return time.Date(2012, 1, 1, 0, 0, 0,...
}
<|file_name|>support.py<|end_file_name|><|fim▁begin|>from pathlib import Path from unittest import mock, TestCase from rpg.spec import Spec class RpgTestCase(TestCase): test_project_dir = Path("tests/project") def assertExistInDir(self, expected, pathlibobject): path = Path(pathlibobject) for...
sack = mock.MagicMock() spec = Spec()
<|file_name|>dup_averages_wgs_nexome.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt import pandas as pd WGS = ['G69145', 'G71602', 'G71608', 'G76270'] ### scatch import duplicate text files # fname = "/seq/picard_aggregation/G69145/NA12878/current/NA12878.duplicate_metrics" # gdup...
# put into dataframe df_nex = pd.DataFrame.from_dict(metric_dict,orient='index') df_nex.columns = nMetrics
<|file_name|>anonymize.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from uuid import uuid4 from gluon import current def rlpcm_person_anonymize(): """ Rules to anonymize a case file """ auth = current.auth s3db = current.s3db ANONYMOUS = "-" # Standard anonymizers from s3db.pr i...
"cascade": [("br_case", { "key": "person_id", "match": "id", "fields": {"comments": "remove",
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- <|fim▁hole|>from Tools.Directories import resolveFilename, SCOPE_PLUGINS import gettext PluginLanguageDomain = "OpenWebif" PluginLanguagePath = "Extensions/OpenWebif/locale" def localeInit(): gettext.bindtextdomain(PluginLanguageDomain, r...
from Components.Language import language
<|file_name|>html.js<|end_file_name|><|fim▁begin|>var Taco = Taco || {}; Taco.Util = Taco.Util || {}; Taco.Util.HTML = Taco.Util.HTML || {}; Taco.Util.HTML.render = function(str, html) { html = (typeof html != 'undefined') ? html : false; return (html === true) ? str : Taco.Util.Str.htmlEntities(st...
leading_space = (typeof leading_space != 'undefined') ? leading_space : true; if(Taco.Util.Obj.getObjectLength(attribs) < 1) return '';
<|file_name|>resumeButtons.js<|end_file_name|><|fim▁begin|>/** * A script for handling the bootstrap switch on the resume page. */ // Import css. require("bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"); require('bootstrap-switch'); $("[name='my-checkbox']").bootstrapSwitch(); // http://www.bootstr...
var pdf_link = document.getElementById('pdf_link');
<|file_name|>init-twice-retains-filter.rs<|end_file_name|><|fim▁begin|>extern crate env_logger; extern crate log; use std::env; use std::process; use std::str; fn main() { if env::var("YOU_ARE_TESTING_NOW").is_ok() { // Init from the env (which should set the max level to `Debug`) env_logger::init...
.env("YOU_ARE_TESTING_NOW", "1")
<|file_name|>htmlbrelement.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::codegen::Bindings::HTMLBRElementBind...
htmlelement: HTMLElement, } impl HTMLBRElement {
<|file_name|>server.go<|end_file_name|><|fim▁begin|>package server import ( "bytes" "context" "encoding/json" "io/ioutil" "log" "net/http" "strings" "sync" "sync/atomic" "text/template" "time" "github.com/TV4/graceful" "github.com/gogap/config" "github.com/gogap/go-wkhtmltox/wkhtmltox" "github.com/gori...
<|file_name|>perf.js<|end_file_name|><|fim▁begin|>;(function() { /** Used to access the Firebug Lite panel (set by `run`). */ var fbPanel; /** Used as a safe reference for `undefined` in pre ES5 environments. */ var undefined; /** Used as a reference to the global object. */ var root = typeof global == '...
<|file_name|>test_util.rs<|end_file_name|><|fim▁begin|>extern crate mazth; #[allow(unused_imports)] use std::ops::Div;<|fim▁hole|>use self::mazth::i_comparable::IComparableError; use self::mazth::mat::{Mat3x1, Mat4}; use implement::math::util; #[test] fn test_math_util(){ //look_at { let eye : Mat3x1...
#[allow(unused_imports)] use std::cmp::Ordering;
<|file_name|>keen-tracker.js<|end_file_name|><|fim▁begin|>(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.ex...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * The routes worker process * * This worker process gets the app routes by running the application dynamically * on the server, then stores the publicly exposed routes in an intermediate format * (just the url paths) in Redis. * From there, the paths are...
setTimeout(function() { return page.evaluate(function() {
<|file_name|>actions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from pisi.actionsapi import shelltools, get, autotools, pisitools def setup(): autotools.configure ("--prefix=/usr\<|fim▁hole|> --disable-static\ --disable-docs\ --...
<|file_name|>authority.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2018 Benjamin Fry <benjaminfry@me.com> // // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or // http://opensource.org/licenses/MIT>, at your option. T...
&self, name: &LowerName,
<|file_name|>lib.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.org/licenses/LI...
macro_rules! impl_integer_for_uint {
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ import itertools from datetime import timedelta import ddt from django.core.ex...
modes = CourseMode.modes_for_course(CourseLocator('TestOrg', 'TestCourse', 'TestRun'))
<|file_name|>targeting_spec.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import { targeting as targetingInstance, filters, getHighestCpmBidsFromBidPool, sortByDealAndPriceBucketOrCpm } from 'src/targeting.js'; import { config } from 'src/config.js'; import { createBidReceived } from 'test/fixtures/fix...
'image': { 'url': 'http://vcdn.adnxs.com/p/creative-image/94/22/cd/0f/9422cd0f-f400-45d3-80f5-2b92629d9257.jpg', 'height': 2250,
<|file_name|>Lexer.cpp<|end_file_name|><|fim▁begin|>// // Lexer.cpp // lut-lang // // Created by Mehdi Kitane on 13/03/2015. // Copyright (c) 2015 H4314. All rights reserved. // #include "Lexer.h" #include <string> #include <regex> #include <iostream> #include "TokenType.h" #include "ErrorHandler.h"<|fim▁hole|>usi...
using std::cout;
<|file_name|>registrator.go<|end_file_name|><|fim▁begin|>package v1 import ( "github.com/ertgl/croncache" ) func init() { err := croncache.TaskManagerRepository().Register(MODULE_NAME, Generator)<|fim▁hole|> if err != nil { croncache.HandleFatalError(err) } }<|fim▁end|>
<|file_name|>muParserDLL.cpp<|end_file_name|><|fim▁begin|>/* _____ __ _____________ _______ ______ ___________<|fim▁hole|> Copyright (C) 2004 - 2020 Ingo Berg Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Re...
/ \| | \____ \__ \\_ __ \/ ___// __ \_ __ \ | Y Y \ | / |_> > __ \| | \/\___ \\ ___/| | \/ |__|_| /____/| __(____ /__| /____ >\___ >__| \/ |__| \/ \/ \/
<|file_name|>Quest.java<|end_file_name|><|fim▁begin|>package pixlepix.auracascade.data; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; /** * Created by localmacaccount on 5/31/15. */ public class Quest { //TODO QUEST public static int nextId; public final ItemStack ta...
<|file_name|>QuestionService.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|>import {Question} from 'common/models.js'; import {Injector} from 'kusema.js'; var I = new Injector('$http', '$q'); var QuestionService = function() { BaseContentService.call(this, true); I.init(); this.urlStem = 'api/questio...
import BaseContentService from './BaseContentService.js';
<|file_name|>currency.py<|end_file_name|><|fim▁begin|># Lookup Bitcoin value from exchanges from exchanges.bitfinex import Bitfinex import re<|fim▁hole|> def bitcoinValue(msg): val = Bitfinex().get_current_price() formattedVal = "$" + "{:,.2f}".format(val) if re.search(r"(?i)moon", msg): return "T...
<|file_name|>sanitizer.py<|end_file_name|><|fim▁begin|># Copyright 2010-2020 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided...
'align', 'alignmentscope',
<|file_name|>config.go<|end_file_name|><|fim▁begin|>// Copyright 2020 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/LICENSE-2.0 //...
version, err := semver.NewVersion(config.Ignition.Version) if err != nil || *version != types.MaxVersion {
<|file_name|>hashmap.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.org/license...
}
<|file_name|>ExecExecutor.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under the ...
import org.apache.geode.cache.CacheTransactionManager; import org.apache.geode.cache.CommitConflictException;
<|file_name|>cast.py<|end_file_name|><|fim▁begin|>""" Provide functionality to interact with Cast devices on the network. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.cast/ """ # pylint: disable=import-error import logging import voluptuo...
def turn_off(self): """Turn Chromecast off.""" self.cast.quit_app()
<|file_name|>categorical.rs<|end_file_name|><|fim▁begin|>use distribution; use random; /// A categorical distribution. #[derive(Clone)] pub struct Categorical { k: usize, p: Vec<f64>, cumsum: Vec<f64>, } impl Categorical { /// Create a categorical distribution with success probability `p`. /// ...
assert_eq!(new!([0.3, 0.3, 0.4]).mean(), 1.1); assert_eq!(new!([1.0 / 6.0, 1.0 / 3.0, 1.0 / 3.0, 1.0 / 6.0]).mean(), 1.5); }
<|file_name|>http_server.rs<|end_file_name|><|fim▁begin|>use std::path::Path; use iron::Iron; use iron::Listening; use staticfile::Static; use mount::Mount; pub fn start_http(ip_port: &str) -> Listening { println!("Serving HTTP on: {}", ip_port);<|fim▁hole|>} fn get_mount() -> Mount { // let views_handler =...
Iron::new(get_mount()) .http(ip_port) .expect("starting HTTP server FAILED")
<|file_name|>serializer.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 Softw...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__author__ = 'elijahethun'
<|file_name|>is-js.js<|end_file_name|><|fim▁begin|>export default function isJavascript(scriptTag) { // TODO: add a console warning if the script tag doesn't have an attribute? // seems like it's required for some parts of ember consumption<|fim▁hole|><|fim▁end|>
let type = scriptTag.attributes.type ? scriptTag.attributes.type.value : 'text/javascript'; return /(?:application|text)\/javascript/i.test(type); }
<|file_name|>pulse_channel.rs<|end_file_name|><|fim▁begin|>use apu::envelope::Envelope; use apu::timer::{Timer, TimerCycle}; use apu::length_counter::LengthCounter; use apu::sweep::{Sweep, Complement, SweepCycle}; use memory::Memory; /* duty cycles for the square wave for example, duty cycle 1 generates the follow...
self.timer.set_high_bits(timer_high_bits); self.duty.duty_position = 0;
<|file_name|>soln.py<|end_file_name|><|fim▁begin|>class Solution: def minPathSum(self, grid: List[List[int]]) -> int: row = len(grid) col = len(grid[0]) dp = [[0]*col for i in range(row)] minPath = 0 return self.findPath(grid, row-1, col-1, dp) def findP...
elif i == 0: dp[i][j] = grid[i][j] + self.findPath(grid, i,max(0,j-1), dp) return dp[i][j] #element to left
<|file_name|>ui.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" /> <% from...
_ => Err(input.new_custom_error(StyleParseErrorKind::UnspecifiedError)), } }
<|file_name|>bots_ordereddict.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- <|fim▁hole|># Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
# Copyright (c) 2009 Raymond Hettinger #
<|file_name|>kontrabant.py<|end_file_name|><|fim▁begin|>## Unquill: Copyright (C) 2003 Janez Demsar ## ## During development I peeked a lot at Unquill from John Elliott, 1996-2000. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as publ...
def do_quit(self): self.reset() self.update_location()
<|file_name|>installForTest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python __author__ = 'CGS' import os, shutil, sys, distutils.core, subprocess # Some configuration needed for this file apps_directory = "" apps = {"variants": "apps/variants"} PRODUCTION = False # TODO: better management of errors # Some basic ch...
app_directory = apps_directory+"/"+app_name """ # We try to delete the eventual old folder
<|file_name|>shadertool.js<|end_file_name|><|fim▁begin|>var ShaderTool = new (function ShaderTool(){ function catchReady(fn) { var L = 'loading'; if (document.readyState != L){ fn(); } else if (document.addEventListener) { document.addEventListener('DOMContentLoaded'...
raf( tickHandler ); } raf( tickHandler );
<|file_name|>funnel3d.src.js<|end_file_name|><|fim▁begin|>/** * @license Highcharts JS v8.2.2 (2020-10-22) * @module highcharts/modules/funnel3d * @requires highcharts * @requires highcharts/highcharts-3d * @requires highcharts/modules/cylinder * * Highcharts funnel module * * (c) 2010-2019 Kacper Madej *<|fi...
* License: www.highcharts.com/license */ 'use strict'; import '../../Series/Funnel3DSeries.js';