prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>input.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 script_traits::MouseButton; use std::path::Path; use std::...
use std::num::Float;
<|file_name|>0022_google_sheet_sync_additions.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.1 on 2019-09-19 11:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dojo', '0021_cve_index'), ]<|fim▁hole|> model_name='system_setti...
operations = [ migrations.AddField(
<|file_name|>logs.py<|end_file_name|><|fim▁begin|>import commandRunner as cr import subprocess import glob, os, platform, shutil, adb from pathlib import Path def combine_browsers_logs(udid): cmd = 'rebot -N Combined --outputdir browserlogs/ ' for idx, device in enumerate(udid): #Get all the output.x...
def delete_previous_logs_browser(): cmd = 'rm -rf browserlogs/*'
<|file_name|>vista_sp12_x64_syscalls.py<|end_file_name|><|fim▁begin|># Volatility # Copyright (c) 2008-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 ...
<|file_name|>Reservation.java<|end_file_name|><|fim▁begin|>package me.marcosassuncao.servsim.job; import me.marcosassuncao.servsim.profile.RangeList; import com.google.common.base.MoreObjects; <|fim▁hole|> * made by a customer to reserve a given number of resources * from a provider. * * @see WorkUnit * @see De...
/** * {@link Reservation} represents a resource reservation request
<|file_name|>voidOperatorWithNumberType.ts<|end_file_name|><|fim▁begin|>// void operator on number type var NUMBER: number; var NUMBER1: number[] = [1, 2]; function foo(): number { return 1; } class A { public a: number; static foo() { return 1; } } module M { export var n: number; }<|fim▁hole|> // numbe...
var objA = new A();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" matstat docstrings<|fim▁hole|><|fim▁end|>
""" # from supergame import supergame # from supergametools import supergame
<|file_name|>jsonfile.py<|end_file_name|><|fim▁begin|># (c) 2014, Brian Coca, Josh Drake, et al # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __met...
import json
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from .messages import I18nMessages<|fim▁end|>
<|file_name|>cache.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # pylint: disable=not-context-manager,useless-object-inheritance # NOTE: The pylint not-content-manager warning is disabled pending the fix of # a bug in pylint https://github.com/PyCQA/pylint/issues/782 # NOTE: useless-object-inheritance need...
<|file_name|>htmldivelement.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<|fim▁hole|> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::HTMLD...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate rustbox;<|fim▁hole|> fn main() { fract::main::main(); }<|fim▁end|>
mod leelib; mod fract;
<|file_name|>kcluster_do.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import clusters<|fim▁hole|>blognames,words,data=clusters.readfile( './../data/feed_list.csv' ) for k in range( 1, 10 ) : kclust = None kclust = clusters.kcluster(data, blognames, clusters.pearson, k) for k_id in ...
<|file_name|>jobs.py<|end_file_name|><|fim▁begin|>import logging import time import zlib from collections import defaultdict from datetime import datetime from hashlib import sha1 from operator import itemgetter import simplejson as json from _mysql_exceptions import IntegrityError from django.conf import settings fro...
tasks = []
<|file_name|>bigquerystorage_v1beta2_generated_big_query_write_append_rows_sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google 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 co...
def request_generator(): for request in requests:
<|file_name|>grok.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
print('bar-package grok!')
<|file_name|>configure_action.py<|end_file_name|><|fim▁begin|># proxy module from __future__ import absolute_import<|fim▁hole|><|fim▁end|>
from envisage.ui.single_project.action.configure_action import *
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. //! # Iml Job Scheduler RPC client //! //! This module provides a client to make rpc calls to the `job_scheduler`. //!...
<|file_name|>update-eligibility-trusted-status.js<|end_file_name|><|fim▁begin|>const config = require('../../../knexfile').intweb const knex = require('knex')(config) const dateFormatter = require('../date-formatter') const insertClaimEvent = require('./insert-claim-event') const claimEventEnum = require('../../constan...
return knex('Claim')
<|file_name|>operation_printer_test.rs<|end_file_name|><|fim▁begin|>// @generated SignedSource<<a60416ae2e6ab7dea59da3c3da781539>> mod operation_printer; use operation_printer::transform_fixture; use fixture_tests::test_fixture;<|fim▁hole|> #[test] fn multiple_queries_with_same_fragment() { let input = include_st...
<|file_name|>keyboardKey.ts<|end_file_name|><|fim▁begin|>module Inknote.Drawing { export class KeyboardKey { hover: boolean; draw(ctx: CanvasRenderingContext2D, canvas: HTMLCanvasElement) { if (this.name == "") { return; } ctx.beginPath(); ...
export function keysFromString(text: string, x: number, y: number, totalWidth: number, itemHeight) { var charArray = text.split(""); var keys: KeyboardKey[] = [];
<|file_name|>noso_test.go<|end_file_name|><|fim▁begin|>// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. <|fim▁hole|> // Nothing to test.<|fim▁end|>
// +build !cgo package so_test
<|file_name|>build-ks-vue.js<|end_file_name|><|fim▁begin|>/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ /* eslint no-console: ["error", { allow: ["log"] }] */ const gulp = require('gulp'); const modifyFile = require('gulp-modify-file'); const path = require('path'); const rollup =...
function buildKs(cb) { const env = process.env.NODE_ENV || 'development';
<|file_name|>scripts.js<|end_file_name|><|fim▁begin|>// JavaScript Document jQuery(document).ready(function(){ var ap_methods = { load_sub_items: function(type){ jQuery.post(ajaxurl, {action: 'ap_tax_types',"type":type}, function(response) { response = jQuery.parseJSON(response); ...
if(vs==i)
<|file_name|>cached_size.rs<|end_file_name|><|fim▁begin|>/// Cached size field used in generated code. /// It is always equal to itself to simplify generated code. /// (Generated code can use `#[derive(Eq)]`). #[derive(Debug,Default,Clone)] pub struct CachedSize { size: ::std::cell::Cell<u32>, } impl CachedSize { ...
true } }
<|file_name|>NotificationAdapter.java<|end_file_name|><|fim▁begin|>package owuor.f8th.adapters; import java.util.List; import owuor.f8th.R; import owuor.f8th.ContentProvider.F8thContentProvider; import owuor.f8th.database.NotificationsTable; import owuor.f8th.types.F8th; import owuor.f8th.types.Notification; import a...
if(notification.getStatus().equalsIgnoreCase(F8th.NOTIFY_UNREAD)){ holder.sender.setTextColor(Color.RED); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>## begin license ## # # "Meresco Solr" is a set of components and tools # to integrate Solr into "Meresco." # # Copyright (C) 2011-2013 Seecr (Seek You Too B.V.) http://seecr.nl # Copyright (C) 2012 SURF http://www.surf.nl # Copyright (C) 2013 Stichting Kennisnet h...
# GNU General Public License for more details. #
<|file_name|>lib.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/. */ #![cfg_attr(not(target_os = "windows"), feature(alloc_jemalloc))]...
pub mod trace_dump;
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>var fs = require('fs'); var path = require('path'); <|fim▁hole|> grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), copy: { main: { files: [ {src: 'numbro.js', dest: 'dist/numbro.js'}, ...
module.exports = function(grunt) { 'use strict';
<|file_name|>FactoryConstraint.java<|end_file_name|><|fim▁begin|>//: generics/FactoryConstraint.java interface FactoryI<T> { T create(); } class Foo2<T> {<|fim▁hole|> public <F extends FactoryI<T>> Foo2(F factory) { x = factory.create(); } // ... } class IntegerFactory implements FactoryI<Integer> { pu...
private T x;
<|file_name|>models.go<|end_file_name|><|fim▁begin|>//go:build go1.9 // +build go1.9 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // This code was auto-generated by: // github.com/Azure/azure-sdk-for-go/eng...
<|file_name|>Locator.cpp<|end_file_name|><|fim▁begin|>/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The...
<|file_name|>generate-seeds.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2014 Wladmir J. van der Laan # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chain...
<|file_name|>test_xem.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # Author: echel0n <echel0n@sickrage.ca> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
<|file_name|>aspect.js<|end_file_name|><|fim▁begin|>/*global Backbone */ var Generator = Generator || {}; (function () { 'use strict'; // Aspect Model // ---------- <|fim▁hole|> text: '' } }); })();<|fim▁end|>
Generator.Aspect = Backbone.Model.extend({ defaults: { result: 0,
<|file_name|>11-tensormrtrix.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from core.toad.generictask import GenericTask from lib.images import Images __author__ = "Mathieu Desrosiers, Arnaud Bore" __copyright__ = "Copyright (C) 2016, TOAD" __credits__ = ["Mathieu Desrosiers", "Arnaud Bore"] class TensorMr...
<|file_name|>closures.js<|end_file_name|><|fim▁begin|>// Copyright 2010 the V8 project authors. All rights reserved. // 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 ret...
<|file_name|>test-issue1438-t.py<|end_file_name|><|fim▁begin|># Copyright (c) Meta Platforms, Inc. and affiliates. # Copyright (c) Mercurial Contributors. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import abso...
sh % "hg status" == r""" R link ? bad.patch"""
<|file_name|>getCompilerOptionsFromTsConfig.ts<|end_file_name|><|fim▁begin|>import { FileSystemHost, RealFileSystemHost, TransactionalFileSystem } from "../fileSystem";<|fim▁hole|>import { TsConfigResolver } from "./TsConfigResolver"; export interface CompilerOptionsFromTsConfigOptions { encoding?: string; fil...
import { CompilerOptions, ts } from "../typescript";
<|file_name|>BUILTIN_SET_OF.py<|end_file_name|><|fim▁begin|>from rambutan3.check_args.base.RAbstractTypeMatcher import RAbstractTypeMatcher from rambutan3.check_args.set.RSetEnum import RSetEnum from rambutan3.check_args.set.RSetOfMatcher import RSetOfMatcher<|fim▁hole|># noinspection PyPep8Naming def BUILTIN_SET_OF(ty...
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>// https://github.com/KubaO/stackoverflown/tree/master/questions/html-get-24965972 #include <QtNetwork> #include <functional> void htmlGet(const QUrl &url, const std::function<void(const QString&)> &fun) { QScopedPointer<QNetworkAccessManager> manager(new QNetworkA...
if (response->error() != QNetworkReply::NoError) return; auto const contentType = response->header(QNetworkRequest::ContentTypeHeader).toString();
<|file_name|>b258.js<|end_file_name|><|fim▁begin|><|fim▁hole|>alert(b258); //~ component b259.js<|fim▁end|>
//~ name b258
<|file_name|>if_else.rs<|end_file_name|><|fim▁begin|>fn main() { let n = 15;<|fim▁hole|> if n < 0 { print!("{} is negative", n); } else if n > 0 { print!("{} is positive", n); } else { print!("{} is zero", n); } let big_n = if n < 10 && n > -10 { println!(", and i...
<|file_name|>view.js<|end_file_name|><|fim▁begin|>JabberApp.module('DashboardApp.Show', function(Show, App, Backbone, Marionette, $, _) { Show.Layout = App.Views.Layout.extend({ template: require('./tpl/layout.hbs') , regions: { upcomingRegion: '#upcoming-region' , theatreRegion: '#theatre-region' ...
});
<|file_name|>test_runtime.py<|end_file_name|><|fim▁begin|>import os import peru.runtime as runtime import shared class RuntimeTest(shared.PeruTest): def test_find_peru_file(self): test_dir = shared.create_dir({ 'a/find_me': 'junk', 'a/b/c/junk': 'junk', }) result ...
self.assertEqual(expected, result)
<|file_name|>date.js<|end_file_name|><|fim▁begin|>import Moment from 'moment'; import { functions, has, includes } from 'lodash'; export default function(dateString, context) { const date = Moment(dateString); if (has(context.hash, 'type') && includes(functions(date), context.hash.type)) { return date...
}
<|file_name|>DropdownButton.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { Sizes } from 'react-bootstrap'; import { DropdownBaseProps } from './Dropdown'; declare namespace DropdownButton { export interface DropdownButtonBaseProps extends DropdownBaseProps {<|fim▁hole|> navItem?:...
block?: boolean; bsSize?: Sizes; bsStyle?: string;
<|file_name|>vec-matching.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/li...
[1, 2] => (), [..] => () }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|> from .TransmitFeatures import TransmitFeatures from .GetFeatures import GetFeatures<|fim▁end|>
<|file_name|>usetex_fonteffects.py<|end_file_name|><|fim▁begin|># This script demonstrates that font effects specified in your pdftex.map # are now supported in pdf usetex. import matplotlib import matplotlib.pyplot as plt matplotlib.rc('text', usetex=True) def setfont(font): return r'\font\a %s at 14pt\a ' % fo...
['ptmr8r', 'ptmri8r', 'ptmro8r', 'ptmr8rn', 'ptmrr8re'], ['Nimbus Roman No9 L ' + x for x in ['', 'Italics (real italics for comparison)',
<|file_name|>types.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes 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://www.apache.org/licenses/L...
APIs may be broken at any time by the kubernetes team.
<|file_name|>store.rs<|end_file_name|><|fim▁begin|>use std::ascii::AsciiExt; use std::collections::HashSet; use folder::Folder; use message::Flag; use message::parse_flag; use self::StoreName::{Add, Replace, Sub}; use super::sequence_set; /// Representation of a STORE operation pub enum StoreName { Replace, // r...
} else {
<|file_name|>functions.js<|end_file_name|><|fim▁begin|>var slug = require('slug'); var async = require('async'); var _ = require('underscore'); var kwery = require('kwery'); var functions = { getInstances: function (state, next) {<|fim▁hole|> result.many(function (instances) { state.instances = instances; ...
var result = kwery.flat(state.db, { path: new RegExp('^' + state.data.path + '(/|$)') });
<|file_name|>node.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {TStylingContext} from '../styling_next/interfaces'; import ...
// TODO (matsko): rename this to `styles` once the old styling impl is gone newStyles: TStylingContext|null; // TODO (matsko): rename this to `classes` once the old styling impl is gone
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), banner: [ '/**', ' * <%= pkg.name %> <%= pkg.version %>', ' * Copyright (C) <%= grunt.template.tod...
} },
<|file_name|>CreateDungeonHandler.java<|end_file_name|><|fim▁begin|>package com.bioxx.tfc2.handlers; import java.util.*; import net.minecraft.init.Blocks; import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.relauncher....
requeueNeighbors(queue, dungeon, room); dungeon.setRoom(room.getPosition(), null); } }
<|file_name|>Toptip.js<|end_file_name|><|fim▁begin|>'use strict'; import React, {Component, PropTypes} from 'react'; import ReactNative, {View, Text} from 'react-native'; var Popover = require('../Popover'); var AutoHide = require('./AutoHide'); var ToptipAnimation = require('../Popover/PopoverAnimationVertical').crea...
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std; use std::fmt; use std::ops::Deref; /// Error type #[derive(Debug)] pub struct Error { // Description what: String, // Cause cause: Option<Box<std::error::Error + Sized>>, } impl Error { /// Construct `Error` with message only pub fn new<S>(what: S) -...
<|file_name|>SecretService.py<|end_file_name|><|fim▁begin|>import logging from ..util import properties from ..util import XDG from ..backend import KeyringBackend from ..errors import (InitError, PasswordDeleteError, ExceptionRaisedContext) <|fim▁hole|>except ImportError: pass log = logging.getLogger(__name_...
try: import secretstorage import secretstorage.exceptions as exceptions
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* This is a generated file */<|fim▁hole|>const index = React.createClass({ render() { return <JestIndex language={ 'en'} />; }, }); module.exports = index;<|fim▁end|>
const React = require('React'); const JestIndex = require('JestIndex');
<|file_name|>dfpAdServerVideo_spec.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'; import parse from 'url-parse'; import { buildDfpVideoUrl, buildAdpodVideoUrl } from 'modules/dfpAdServerVideo.js'; import adUnit from 'test/fixtures/video/adUnit.json'; import * as utils from 'src/utils.js'; import { conf...
'output': 'vast', }
<|file_name|>IOStream.hh<|end_file_name|><|fim▁begin|>/** * @file Cosa/IOStream.hh * @version 1.0 * * @section License * Copyright (C) 2012-2015, Mikael Patel * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by...
* Set non-blocking mode.
<|file_name|>load_GPS_EXIF.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################################## # This file is deprecated because Python 2.x is deprecated # # A Python 3.x version of ...
##############################################################################################
<|file_name|>test_markup.py<|end_file_name|><|fim▁begin|># Check translations of pango markup # # This will look for translatable strings that appear to contain markup and # check that the markup in the translation matches. # # Copyright (C) 2015 Red Hat, Inc. # # This copyrighted material is made available to anyone ...
raise AssertionError("Markup does not match for msgid %s" % entry.msgid)
<|file_name|>start.go<|end_file_name|><|fim▁begin|>/* Copyright 2018 The OpenEBS Authors.<|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 ...
<|file_name|>DisplayObjectContainer.js<|end_file_name|><|fim▁begin|>/** * @author Mat Groves http://matgroves.com/ @Doormat23 */ /** * A DisplayObjectContainer represents a collection of display objects. * It is the base class of all display objects that act as a container for other objects. * * @class DisplayO...
* @constructor */ PIXI.DisplayObjectContainer = function() {
<|file_name|>term.rs<|end_file_name|><|fim▁begin|>use func::Func; pub trait Term { type Result; fn run(self) -> Self::Result; } pub struct Lift<A>(pub A);<|fim▁hole|> self.0 } } pub struct Apply<F, A>(pub F, pub A); impl<F, R, A, B> Term for Apply<F, A> where F: Term<Result=R>, R: F...
impl<A> Term for Lift<A> { type Result = A; fn run(self) -> A {
<|file_name|>fr-FR.js<|end_file_name|><|fim▁begin|>Date.CultureInfo = { /* Culture Name */ name: "fr-FR", englishName: "French (France)", nativeName: "français (France)", /* Day Name Strings */ dayNames: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], abbreviated...
<|file_name|>resource_pool_callback.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ##############################################################################<|fim▁hole|># # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
# # Acrisel LTD # Copyright (C) 2008- Acrisel (acrisel.com) . All Rights Reserved
<|file_name|>ext.mgwiki.js<|end_file_name|><|fim▁begin|>( function ( mw, $ ) { /** * LoginForm * TODO: .js dédié à l'authentificatioin ... */ if ( mw.config.get('wgTitle') == 'Connexion' && $('.mgw-alert').length ) { $('.mgw-alert').css({'margin':'0 0 1em 0', 'padding':'0.5em', 'width':'275px'}); $('.mgw-a...
document.body.appendChild(form); form.method = 'post'; form.action = url; if ( target == "blank" ) {
<|file_name|>testing.dev.js<|end_file_name|><|fim▁begin|>"format register"; System.register("angular2/src/mock/animation_builder_mock", ["angular2/src/core/di", "angular2/src/animate/animation_builder", "angular2/src/animate/css_animation_builder", "angular2/src/animate/animation", "angular2/src/animate/browser_details...
case 'macroTask':
<|file_name|>topic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # standard library imports <|fim▁hole|>from mobile_push.db import Session, Topic class TopicFactory(factory.alchemy.SQLAlchemyModelFactory): class Meta(object): model = Topic sqlalchemy_session = Session name = factory...
# third party related imports import factory # local library imports
<|file_name|>highDimensionData.js<|end_file_name|><|fim▁begin|>/************************************************************************* * tranSMART - translational medicine data mart * * Copyright 2008-2012 Janssen Research & Development, LLC. * * This product includes software developed at Janssen Research & ...
<|file_name|>expected.rs<|end_file_name|><|fim▁begin|>// @generated automatically by Diesel CLI. diesel::table! { use foo::*; use bar::*; users1 (id) { id -> Int4,<|fim▁hole|> use foo::*; use bar::*; users2 (id) { id -> Int4, } } diesel::allow_tables_to_appear_in_same_quer...
} } diesel::table! {
<|file_name|>BB.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <array> #include <glm/glm.hpp> namespace FLIGHT { class AABB { // A.K.A. Axis Aligned Bounding Box glm::vec3 m_min, m_max; void DoYRotation(std::array<glm::vec3, 8> & cubePoints, const float rad); void DoXRotation(std::array<glm::vec3,...
<|file_name|>goToDefinitionDynamicImport4.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>//// export function /*Destination*/bar() { return "bar"; } //// import('./foo').then(({ [|ba/*1*/r|] }) => undefined); verify.goToDefinition("1", "Destination");<|fim▁end|>
/// <reference path='fourslash.ts' /> // @Filename: foo.ts
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from horizon_contrib.utils.dotdict import dotdict, list_to_dotdict, to_dotdict<|fim▁end|>
<|file_name|>initial-audio-video.py<|end_file_name|><|fim▁begin|>""" Tests outgoing calls created with InitialAudio and/or InitialVideo, and exposing the initial contents of incoming calls as values of InitialAudio and InitialVideo """ import operator from servicetest import ( assertContains, assertEquals, assert...
<|file_name|>ping.rs<|end_file_name|><|fim▁begin|>//! ping test handler use iron::status; use iron::prelude::*;<|fim▁hole|>// ping handler is simply just to test if core service is available. pub fn ping(_: &mut Request, _: DbPooledConnection) -> IronResult<Response> { Ok(Response::with((status::Ok, format!("Pong!...
use services::storage::DbPooledConnection;
<|file_name|>timeline.js<|end_file_name|><|fim▁begin|>var events = new Hash(); function showEvent( eid, fid, width, height ) { var url = '?view=event&eid='+eid+'&fid='+fid; url += filterQuery; createPopup( url, 'zmEvent', 'event', width, height ); } function createEventHtml( event, frame ) { var event...
window.location = '?view='+currentView+filterQuery+'&minTime='+minTime+'&maxTime='+maxTime; }
<|file_name|>GEMglTexParameteri.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////// // // GEM - Graphics Environment for Multimedia // // Implementation file // // Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at // zmoelnig@iem.kug.ac.at // Fo...
param(static_cast<GLint>(arg2))
<|file_name|>SchedulePolicyViewController.js<|end_file_name|><|fim▁begin|>SchedulePolicyViewController = BaseViewController.extend( { el: '#schedule_policy_view_container', over_time_policy_api: null, initialize: function() { this._super( 'initialize' ); this.edit_view_tpl = 'SchedulePolicyEditView.html'; thi...
id: this.script_name + '_navigation',
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys import dotenv dotenv.read_dotenv() if __name__ == "__main__": ENVIRONMENT = os.getenv('ENVIRONMENT') if ENVIRONMENT == 'STAGING': settings = 'staging'<|fim▁hole|> settings = 'production' else: ...
elif ENVIRONMENT == 'PRODUCTION':
<|file_name|>method.ts<|end_file_name|><|fim▁begin|>import {statementType} from "../_utils"; import * as Statements from "../../../src/abap/statements/"; const tests = [ "METHOD zfoobar.",<|fim▁hole|> "METHOD foobar by kernel module foobar ignore.", "METHOD if_foo~write BY KERNEL MODULE foobar.", "METHOD foobar...
"METHOD foobar by kernel module foobar fail.",
<|file_name|>functionalStatus.js<|end_file_name|><|fim▁begin|>var assert = require("assert"), expect = require('expect.js'), cda = require("../utils/xml.js").cda, DOMParser = require('xmldom').DOMParser, XmlSerializer = require('xmldom').XMLSerializer,<|fim▁hole|> Σ = xmlUtils.CreateNode, A = xm...
xmlUtils = require("../utils/xml.js").xml, FunctionalStatusSectionCreator = require("../Model/FunctionalStatusSection.js"), FunctionalStatusEntryCreator = require("../Model/FunctionalStatusEntry.js"), FunctionalStatusPainScaleEntryCreator = require("../Model/FunctionalStatusPainScaleEntry.js"),
<|file_name|>test_utils_sitemap.py<|end_file_name|><|fim▁begin|>import unittest from scrapy.utils.sitemap import Sitemap, sitemap_urls_from_robots class SitemapTest(unittest.TestCase): def test_sitemap(self): s = Sitemap("""<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schem...
[{'priority': '1', 'loc': 'http://www.example.com/', 'lastmod': '2009-08-16', 'changefreq': 'daily'}, {'priority': '0.8', 'loc': 'http://www.example.com/Special-Offers.html', 'lastmod': '2009-08-16', 'changefreq': 'weekly'}]) def test_sitemap_index(self): s = Sitemap("""<?xml version="1.0" enco...
<|file_name|>alarm_control_panel.py<|end_file_name|><|fim▁begin|>"""Support for NX584 alarm control panels.""" import logging from nx584 import client import requests import voluptuous as vol import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel import PLATFORM...
@property
<|file_name|>test_sites.py<|end_file_name|><|fim▁begin|>from django.utils import unittest from django.contrib import admin from hyperadmin.sites import ResourceSite class SiteTestCase(unittest.TestCase): def test_install_from_admin_site(self):<|fim▁hole|> site.install_models_from_site(admin.site) ...
site = ResourceSite() admin.autodiscover()
<|file_name|>views.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals import re import os from django.shortcuts import render from django.conf import settings def index(request): p = re.compile(r'^app\d+_') apps = (a.split('_') for a in settings.INSTALLED_APPS if p.matc...
{"apps": sorted(apps), "settings": settings})
<|file_name|>udiv128.rs<|end_file_name|><|fim▁begin|>/// Multiply unsigned 128 bit integers, return upper 128 bits of the result #[inline]<|fim▁hole|> let x_hi = (x >> 64) as u64; let y_lo = y as u64; let y_hi = (y >> 64) as u64; // handle possibility of overflow let carry = (x_lo as u128 * y_lo as ...
fn u128_mulhi(x: u128, y: u128) -> u128 { let x_lo = x as u64;
<|file_name|>DocumentEvent.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from thug.DOM.W3C.Core.DOMException import DOMException from .HTMLEvent import HTMLEvent from .MouseEvent import MouseEvent from .MutationEvent import MutationEvent from .StorageEvent import StorageEvent from .UIEvent import UIEvent Eve...
def __init__(self, doc): self.doc = doc def createEvent(self, eventType):
<|file_name|>exchange.rs<|end_file_name|><|fim▁begin|>//! The exchange pattern distributes pushed data between many target pushees. use {Push, Data}; use dataflow::channels::Content; use abomonation::Abomonation; // TODO : Software write combining /// Distributes records among target pushees according to a distribut...
} } // as a last resort, use mod (%)
<|file_name|>IrcNetworkEditDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2012 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog for editing IRC network definitions. """ from __future__ import unicode_literals import copy from PyQt5.QtCore import ...
currentIdentity = IrcIdentity.DefaultIdentityDisplay index = self.identityCombo.findText(currentIdentity) if index == -1: index = 0
<|file_name|>SVR_nuclear.py<|end_file_name|><|fim▁begin|>def read_data(file_name): return pd.read_csv(file_name) def preprocess(data): # Data Preprocessing<|fim▁hole|> data['ENPRP_scaled']=preprocessing.scale(data['ENPRP']) data['NGMPB_scaled']=preprocessing.scale(data['NGMPB']) data['PAPRB_scaled...
data['GDP_scaled']=preprocessing.scale(data['GDP']) data['CLPRB_scaled']=preprocessing.scale(data['CLPRB']) data['EMFDB_scaled']=preprocessing.scale(data['EMFDB'])
<|file_name|>udp.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/licenses/LI...
/// /// use std::old_io::net::udp::UdpSocket; /// use std::old_io::net::ip::{Ipv4Addr, SocketAddr}; /// fn main() {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ UserBot module Copyright 2015, Ismael R. Lugo G. """ import translate reload(translate) from sysb import commands<|fim▁hole|>from translate import _ commands.addHandler('translate', '(tr|translate)2 (?P<in>[^ ]+) (?P<out>[^ ]+) ' ...
from translate import lang
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|># Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 # # ...
<|file_name|>test_audit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Test audit columns""" import pytest from pyrseas.testutils import AugmentToMapTestCase CREATE_STMT = "CREATE TABLE t1 (c1 integer, c2 text)" FUNC_SRC1 = """ BEGIN NEW.modified_by_user = SESSION_USER; NEW.modified_timestamp = CURRE...
assert expmap == dbmap['schema public']['table t1'] def test_columns_with_trigger(self): "Add predefined audit columns with trigger"
<|file_name|>reassign_modal.js<|end_file_name|><|fim▁begin|>Template.reassign_modal.helpers({ fields: function() { var userOptions = null; var showOrg = true; var instance = WorkflowManager.getInstance(); var space = db.spaces.findOne(instance.space); var flow = db.flows.findOne({ '_id': instance.fl...
if (space.admins.contains(Meteor.userId())) {
<|file_name|>0007_auto_20150123_1600.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cacao', '0006_auto_20150119_0946'), ] operations = [ mi...
),