prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/*jshint esversion: 6 */ (function () { let locationPromise = new Promise((resolve, reject) => { navigator.geolocation.getCurrentPosition((position) => { resolve(position); });<|fim▁hole|> locationPromise .then(displayLocation)...
});
<|file_name|>0001_initial.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 = [ ] operations = [ migrations.CreateModel( name='WebsiteContact', ...
), ]
<|file_name|>column.spec.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> * @author David Sehnal <david.sehnal@gmail.com> */ import { FixedColumnProvider as FixedColumn } from '....
'', ' 5' ];
<|file_name|>Producer.hh<|end_file_name|><|fim▁begin|>/*++ * * Kafka Message Queue * * DESCRIPTION: * AUTHOR: NickeyWoo * DATE: 2014/8/15<|fim▁hole|> * --*/ #ifndef __KAFKA_PRODUCER_HH__ #define __KAFKA_PRODUCER_HH__ #include <boost/nocopyable.hpp> #include <google/protobuf/message_lite.h> #include <google...
<|file_name|>DeconvolveChallengeImages_reflection.py<|end_file_name|><|fim▁begin|># @StatusService status # @DatasetService data # @CommandService command # @DisplayService display # @IOService io # this script deconvolves an image. # # It is assumed the images have allready been extended. See ExtendChallengeImages_r...
finalName=str(baseName)+str(algorithm)+"."+str(regularizationFactor)+"."+str(iterations)+".final.ome.tif"
<|file_name|>example_usage.py<|end_file_name|><|fim▁begin|>import pickle from content_stats import Compare_regions from content_stats import Title_stats # load saved dictionaries nz_titles = pickle.load(open('nz/all_movies_dict.p', 'rb'))<|fim▁hole|>us_titles = pickle.load(open('nz/all_movies_dict.p', 'rb'))<|fim▁en...
<|file_name|>build.js.prod.ts<|end_file_name|><|fim▁begin|>import * as gulp from 'gulp'; import * as gulpLoadPlugins from 'gulp-load-plugins'; import { join } from 'path'; import Config from '../../config'; import { makeTsProject, TemplateLocalsBuilder } from '../../utils'; const plugins = <any>gulpLoadPlugins(); co...
) ) .pipe(gulp.dest(Config.TMP_DIR))
<|file_name|>orchestrationUpdateChefRunlistCtrl.js<|end_file_name|><|fim▁begin|>/* Copyright (C) Relevance Lab Private Limited- All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * Written by Relevance UI Team, * Aug 2015 */ (function (ang...
params = { url: '/d4dMasters/org/' + p.org + '/templateType/SoftwareStack/templates' };
<|file_name|>0003_auto__add_unique_vendeur_code_permanent.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint...
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "log" "net/http" "os" "path/filepath" ) const path = "/src/github.com/Bredgren/gohtmlctrl/test" var goPath = os.Getenv("GOPATH") func main() { e := os.Chdir(filepath.Join(goPath, path)) if e != nil { log.Fatal(e) } http.HandleFunc("/"...
}
<|file_name|>create-vscode-config.ts<|end_file_name|><|fim▁begin|>// FoalTS import { FileSystem } from '../../file-system'; export function createVSCodeConfig() { new FileSystem()<|fim▁hole|> .copy('vscode-config/launch.json', 'launch.json') .copy('vscode-config/tasks.json', 'tasks.json'); }<|fim▁end|>
// TODO: test this line .cdProjectRootDir() .ensureDir('.vscode') .cd('.vscode')
<|file_name|>interop.rs<|end_file_name|><|fim▁begin|>use std::io::Read; use std::io::Write; use std::process; /// Invoke `interop` binary, pass given data as stdin, return stdout. pub fn interop_command(command: &str, stdin: &[u8]) -> Vec<u8> { let mut interop = process::Command::new("../interop/cxx/interop") ...
.unwrap()
<|file_name|>bitcoin_pl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About ShadowCoin</source> <translation>O ShadowCoin</...
</message> <message> <location line="+25"/>
<|file_name|>csvjson.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import json import codecs from csvkit import CSVKitReader from csvkit.cli import CSVKitUtility, match_column_identifier from csvkit.exceptions import NonUniqueKeyColumnException class CSVJSON(CSVKitUtility): description = 'Convert a CSV f...
self.argparser.add_argument('-k', '--key', dest='key', type=str, default=None, help='Output JSON as an array of objects keyed by a given column, KEY, rather than as a list. All values in the column must be unique. If --lat and --lon are also specified, this column will be used as GeoJSON Feature ID....
<|file_name|>base.js<|end_file_name|><|fim▁begin|><|fim▁hole|> this.validate = params.validate || function() { return true; }; }<|fim▁end|>
module.exports = function(params) { params = params || {}; _.extend(this, params);
<|file_name|>KeyDiscriminatorParser.java<|end_file_name|><|fim▁begin|>package alien4cloud.tosca.parser.impl.base; import java.util.Map; import java.util.Set; import org.yaml.snakeyaml.nodes.MappingNode; import org.yaml.snakeyaml.nodes.Node; import org.yaml.snakeyaml.nodes.NodeTuple; import org.yaml.snakeyaml.nodes.Sc...
// if not we should use the mapping node fallback parser.
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(box_syntax, box_patterns)] #![feature(associated_consts)] #![feature(collections, collections_bound, btree_range)] #![feature(unicode)] extern crate libc; extern crate docopt; extern crate toml; extern crate term; extern crate rustc_serialize; extern crate co...
}; use docopt::Docopt;
<|file_name|>app-controller.js<|end_file_name|><|fim▁begin|>/** * App Control * * Central controller attached to the top level <html> * element */ "use strict"; ( function ( angular, app ) { // get user profile data app.controller( "AppCtrl", [ '$rootScope', '$scope', '$state', 'UserService', function ( $ro...
<|file_name|>ActivityProxyBuilder.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2003-2014 eXo Platform SAS. * * This program 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 Foundation, either version 3 ...
* Apr 28, 2014 */ public class ActivityProxyBuilder {
<|file_name|>ServicePlugin.java<|end_file_name|><|fim▁begin|>package org.luban.common.plugin; import org.luban.common.network.URL; /** * 服务插件接口 * * @author hexiaofeng * @version 1.0.0 * @since 12-12-12 下午8:47 */ public interface ServicePlugin { /** * 返回类型 * * @return */ String getT...
* * @param url */ void setUrl(URL url);
<|file_name|>log.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2017 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in the hop...
<|file_name|>base_model.py<|end_file_name|><|fim▁begin|># Lint as: python3 # Copyright 2021 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.<|fim▁hole|># # http://www.apache.org/license...
# You may obtain a copy of the License at
<|file_name|>init.rs<|end_file_name|><|fim▁begin|>// // Copyright:: Copyright (c) 2016 Chef Software, Inc. // License:: Apache License, Version 2.0 // // 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 Li...
pub fn new(matches: &'n ArgMatches<'n>) -> Self { InitClapOptions { user: value_of(&matches, "user"),
<|file_name|>context.directive.js<|end_file_name|><|fim▁begin|>/*! * Copyright 2019 Hitachi Vantara. 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...
var documentHeight = $document.height(); var documentWidth = $document.width();
<|file_name|>WebController.java<|end_file_name|><|fim▁begin|>package name.parsak.controller; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org....
Tcpip tcpip = new Tcpip(); String response = tcpip.get("http://www.google.com"); model.addAttribute("response", response);
<|file_name|>osm.py<|end_file_name|><|fim▁begin|>"""Implementation of magic functions for interaction with the OS. Note: this module is named 'osm' instead of 'os' to avoid a collision with the builtin. """ #----------------------------------------------------------------------------- # Copyright (c) 2012 The IPython...
mode = 'a' if args.amend else 'w' with io.open(filename, mode, encoding='utf-8') as f: f.write(cell)
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::io; use std::io::Write; mod calc; fn main() { let mut inputstr = String::new(); loop { print!("> "); io::stdout().flush().unwrap(); match io::stdin().read_line(&mut inputstr) { Err(e) => println!("Couldn't read li...
} }
<|file_name|>TitledOnBorderWindow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2016-2017, Thierry Lemeunier <thierry at lemeunier dot net> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following c...
self.title = title self.colourT = colourT
<|file_name|>IosAnalytics.js<|end_file_name|><|fim▁begin|>import React from 'react'; import IconBase from './../components/IconBase/IconBase'; export default class IosAnalytics extends React.Component { render() { if(this.props.bare) { return <g> <path d="M256,32C141.174,32,46.544,118.404,33.54,229.739C32.534,238...
<|file_name|>fdb-legacy.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.expo...
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterModule } from '@angu...
<|file_name|>layerio_test.go<|end_file_name|><|fim▁begin|>package layerio import ( "bytes" "compress/flate" "io" "io/ioutil" "sync" "testing" ) func TestLayeredReaderSimple(t *testing.T) { src := new(bytes.Buffer) src.Write([]byte("00000")) wr, _ := flate.NewWriter(src, flate.DefaultCompression) ...
go func() { for {
<|file_name|>0035_add_undelete_functions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from corehq.sql_db.operations import RawSQLMigration from corehq.form_processor.models import XFormInstanceSQL migrator = RawSQLMigration(('corehq',...
]
<|file_name|>tool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- mode: python -*- # -*- coding: utf-8 -*- # 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 copyrig...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { Type } from "@angular/core"; import { GridViewComponent } from './grid-view.component';<|fim▁hole|> export * from "./grid-view.component"; export const HBR_GRIDVIEW_DIRECTIVES: Type<any>[] = [ GridViewComponent ];<|fim▁end|>
<|file_name|>abstractcircuitobject.cpp<|end_file_name|><|fim▁begin|>#include "abstractcircuitobject.h" AbstractCircuitObject::~AbstractCircuitObject() {<|fim▁hole|>} AbstractCircuitObject::AbstractCircuitObject(QDataStream &in) { in >> num; }<|fim▁end|>
<|file_name|>math__random.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** <BR> This file is part of Crack dot Com's free source code release of Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for information about compiling & licensing...
static w32 w32_rtable[TSIZE]; static float f_rtable[TSIZE]; static int seed=0;
<|file_name|>GameMap.java<|end_file_name|><|fim▁begin|>package battlecode.world; import battlecode.common.Direction; import battlecode.common.GameConstants; import battlecode.common.MapLocation; import battlecode.common.RobotType; import battlecode.common.TerrainTile; import battlecode.serial.GenericGameMap; import j...
WIDTH, HEIGHT, SEED, MAX_ROUNDS, THEME /*, MIN_POINTS*/ }
<|file_name|>Rule2Fsm.java<|end_file_name|><|fim▁begin|>package com.jaivox.ui.appmaker; import java.io.*; import java.util.*;<|fim▁hole|> public class Rule2Fsm { static String dir = "./"; basicTree tree; TreeMap <String, String> states; TreeMap <String, String> tags; static String name = "data/road1.tree"; s...
import bitpix.list.*;
<|file_name|>20.d.ts<|end_file_name|><|fim▁begin|>import * as React from "react"; import { CarbonIconProps } from "../../"; declare const NotificationOffFilled20: React.ForwardRefExoticComponent<<|fim▁hole|><|fim▁end|>
CarbonIconProps & React.RefAttributes<SVGSVGElement> >; export default NotificationOffFilled20;
<|file_name|>test_manager.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2016 <> # # Distributed under terms of the MIT license. # Third-party modules import pytest <|fim▁hole|> def test_manager_raises_TypeError_with_invalid_connection(): """FnapyM...
# Projects modules from fnapy.fnapy_manager import FnapyManager
<|file_name|>MatplotlibImportTimingWidget.py<|end_file_name|><|fim▁begin|># coding=utf-8 ''' Created on 6.6.2013 Updated on 29.8.2013 Potku is a graphical user interface for analyzation and visualization of measurement data collected from a ToF-ERD telescope. For physics calculations Potku uses external analyzation...
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License
<|file_name|>roles.py<|end_file_name|><|fim▁begin|># Copyright 2018 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from lino.core.roles import UserRole <|fim▁hole|> class NotesStaff(NotesUser): pass<|fim▁end|>
class NotesUser(UserRole): pass
<|file_name|>ghostAgents.py<|end_file_name|><|fim▁begin|># ghostAgents.py # -------------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution...
def getDistribution(self, state): util.raiseNotDefined()
<|file_name|>crc32.py<|end_file_name|><|fim▁begin|><|fim▁hole|> import zlib def crc32(filename): '''calculate CRC-32 checksum of file''' f = open(filename, 'r') if not f: return '' crc = 0 while 1: buf = f.read(16384) if not buf: break crc = zlib.crc32(buf, crc) f.close() str_crc = '%x' % crc #...
#! /usr/bin/env python # # CRC32 WJ103 #
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Copyright (c) 2015 Red Hat, Inc All rights reserved. <|fim▁hole|>of the MIT license. See the LICENSE file for details. """ import logging def setup_logging(name="cct", level=logging.DEBUG): # create logger logger = logging.getLogger(name) logger.h...
This software may be modified and distributed under the terms
<|file_name|>reference.rs<|end_file_name|><|fim▁begin|>use super::*; impl<'graph, G: DirectedGraph> DirectedGraph for &'graph G { type Node = G::Node; } impl<'graph, G: WithNumNodes> WithNumNodes for &'graph G { fn num_nodes(&self) -> usize { (**self).num_nodes() } } impl<'graph, G: WithStartNode...
<|file_name|>MessageMenuState.java<|end_file_name|><|fim▁begin|><|fim▁hole|>import BusinessLogic.Message; public class MessageMenuState implements ConnectionState{ public void dial(String key, ActualConnection connection) { if (key.equals("1")) { String output = ""; Message m...
package BusinessLogic.ConnectionStates; import BusinessLogic.ActualConnection;
<|file_name|>producer.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate serde_derive; extern crate redis; extern crate oppgave; use oppgave::Queue; use std::time::Duration; use std::thread::sleep; #[derive(Deserialize, Serialize, Debug)] struct Job { id: u64, } fn main() { let client = redis::Client:...
<|file_name|>faq.js<|end_file_name|><|fim▁begin|><|fim▁hole|> this.url = "/faq" this.send = function(inputs){ var params = new FormData(); // var csrf = $("#csrf").val(); // params.append("csrf_ID", csrf); $.each(inputs, function(key, val){ params.append(key,val); }); $.ajax({ url :...
$.FAQ = function(){ $self = this;
<|file_name|>pipe.rs<|end_file_name|><|fim▁begin|>// Copyright 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<|fim▁hole|>// except according to t...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>WhileStatement.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import INodeVisitor from '~/syntax/INodeVisitor'; import { Statement } from '~/syntax/statements/Statement'; import { nonTerminal, parser } from '~/parser/Parser'; import { Token, TokenType } from '~/parser/Tokenizer'; import { Expression } from '~...
<|file_name|>prog_test.py<|end_file_name|><|fim▁begin|>from adt.util.prog import Prog from adt.util.literal import Literal from adt.util.expr import Expr from adt.util.unary_op import Unary_op from adt.util.binary_op import Binary_op from adt.util.block import Block from adt.util.context import Context from adt.util.in...
<|file_name|>schema.ts<|end_file_name|><|fim▁begin|>import { gql } from '@urql/core' import { P } from '@/schemas' import { titleCase, plural } from '@/utils/helper' const getPagedPublishedArticlesSchema = (thread) => { return gql`<|fim▁hole|>const follow = gql` ${P.follow} ` const undoFollow = gql` ${P.undoFo...
${P[`pagedPublished${plural(titleCase(thread))}`]} ` }
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'); var sass = require('gulp-sass'); var browserSync = require('browser-sync'); var useref = require('gulp-useref'); var uglify = require('gulp-uglify'); var gulpIf = require('gulp-if'); var cssnano = require('gulp-cssnano'); var imagemin = r...
// ------------------ // Optimizing CSS and JavaScript gulp.task('useref', function() {
<|file_name|>StatisticsReportCommand.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * This file is part of OpenNMS(R). * * Copyright (C) 2007-2014 The OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2014 The OpenNMS Group, Inc. * * OpenNMS...
*/ public Integer getId() { return m_id;
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>use libc; use std; pub fn gethostname() -> std::io::Result<String> { unsafe { let mut name = Vec::new();<|fim▁hole|> let ptr = name.as_mut_ptr() as *mut libc::c_char; let cap = name.len() as libc::size_t; let ret = libc::gethostname(p...
name.resize(65, 0u8);
<|file_name|>kis_doc2_test.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010 Dmitry Kazakov <dimula73@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version ...
<|file_name|>ValueGenerator.java<|end_file_name|><|fim▁begin|><|fim▁hole|>}<|fim▁end|>
public class ValueGenerator {
<|file_name|>union-derive-rpass.rs<|end_file_name|><|fim▁begin|>// run-pass // revisions: mirunsafeck thirunsafeck // [thirunsafeck]compile-flags: -Z thir-unsafeck #![allow(dead_code)] #![allow(unused_variables)] // Some traits can be derived for unions. #[derive( Copy, Clone, Eq, )] union U { a: u8,...
<|file_name|>flavormanage.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
import webob from nova.api.openstack.compute import flavors as flavors_api
<|file_name|>grouped_animation.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Pikkpoiss 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...
return 0 }
<|file_name|>lithium.dom.js<|end_file_name|><|fim▁begin|>/** * @class Li */ /** * DOM utility methods */ (function (factory) { if (typeof define === "function" && define.amd) { define(['./lithium', 'jquery'], factory); } else if (typeof exports === 'object') { //For NodeJS module.exports = ...
html += (voidTags[tag] ? '/>' : '>'); } else if (!voidTags[tag]) { html += '</' + tag + '>'; }
<|file_name|>actionCreators.js<|end_file_name|><|fim▁begin|>import { ActionCreators } from 'redux-undo'; import * as types from './actionTypes'; export function setInitialState(options) { return { type: types.SET_INITIAL_STATE, options }; } export function changeDimensions(gridProperty, increment) { ret...
}
<|file_name|>loader.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import xbmc,urllib<|fim▁hole|>for parser in all_modules: xbmc.executebuiltin('XBMC.RunPlugin("plugin://plugin.video.p2p-streams/?mode=405&name=p2p&url=' + urllib.quote(parser) + '")') xbmc.sleep(1000) xbmc.executebuiltin("Notification(...
all_modules = [ 'https://github.com/bazingasheldon/tv/blob/master/raspberry/addon.tar.gz?raw=true']
<|file_name|>914.js<|end_file_name|><|fim▁begin|>{ test.ok( thrown instanceof axios.Cancel, "Promise must be rejected with a Cancel obejct" ); test.equal(thrown.message, "Operation has been canceled."); test.done();<|fim▁hole|><|fim▁end|>
}
<|file_name|>range.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::CharacterDataBinding::Cha...
Option<Root<Node>>, Vec<Root<Node>>)> { let start_node = self.StartContainer();
<|file_name|>ExampleMC.cc<|end_file_name|><|fim▁begin|>// datamodel specific includes #include "ExampleMC.h" #include "ExampleMCConst.h" #include "ExampleMCObj.h" #include "ExampleMCData.h" #include "ExampleMCCollection.h" #include <iostream> ExampleMC::ExampleMC() : m_obj(new ExampleMCObj()){ m_obj->acquire(); } ...
}
<|file_name|>views.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""Business logic for all URLs in the ``main`` application. For details on what each function is responsible for, see ``main/urls.py``. That module documents both URL-to-function mappings and the exact responsiblities of each function. """ from django.cor...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 from django.shortcuts import render from table.views import FeedDataView from app.tables import ( ModelTable, AjaxTable, AjaxSourceTable, CalendarColumnTable, SequenceColumnTable, LinkColumnTable, CheckboxColumnTable...
table = AjaxSourceTable() return render(request, "index.html", {'people': table})
<|file_name|>ModuleExaminerTests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright 2013 Iain Peddie inr314159@hotmail.com # # This file is part of WellBehavedPython # # WellBehavedPython is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
def test_examiner_can_find_all_modules(self): # Where examiner = ModuleExaminer('WellBehavedPythonTests.Samples');
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from csacompendium.utils.abstractmodels import ( AuthUserDetail, CreateUpdateTime, ) from csacompendium.utils.createslug import create_slug from csacompendium.utils.modelmanagers import ( mod...
Get related CSA practice :return: Query result from the CSA practice model :rtype: object/record
<|file_name|>test_errors.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # # test_errors.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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|>sr-Latn-BA.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 */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angular/too...
]
<|file_name|>database.cpp<|end_file_name|><|fim▁begin|>#include "database.h" #include <stdexcept> #include <QFile> #include <QSqlQuery> #include "brauhelfer.h" Database::Database() : mVersion(-1), mLastError(QString()) { QSqlDatabase::addDatabase("QSQLITE", "kbh"); } void Database::createTables(Brauhelfer...
{ mLastError = modelSud->lastError(); ret = false;
<|file_name|>trans_test.go<|end_file_name|><|fim▁begin|>// // Copyright © 2011-2015 Guy M. Allard // // 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/...
// Then subscribe and test server message s, e := c.Subscribe(h)
<|file_name|>domain-detail.js<|end_file_name|><|fim▁begin|>import actionTypes from '../../client/actions/types'; const defaultState = { data: {}, errors: 'Not Found', }; export default function domainDetailReducer(state = defaultState, action = {}) { switch (action.type) { case actionTypes.getDomainDetail: ...
} }
<|file_name|>Globals.js<|end_file_name|><|fim▁begin|>/* * * * (c) 2010-2019 Torstein Honsi * * License: www.highcharts.com/license * * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!! * * */ 'use strict'; /* globals Image, window */ /** * Reference to the global SVGElement class as a...
*/ charts: [],
<|file_name|>invalidation_notifier_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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 "components/invalidation/invalidation_notifier.h" #include "base/mem...
DestroyInvalidator(); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>the terms of the under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable la...
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under
<|file_name|>_repeat.js<|end_file_name|><|fim▁begin|>/** * A null-safe function to repeat the source string the desired amount of times. * @private * @param {String} source * @param {Number} times * @returns {String} */ function _repeat (source, times) { var result = ""; for (var i = 0; i < times; i++) {...
}
<|file_name|>convertahedron.cc<|end_file_name|><|fim▁begin|>// // // Convertahedron, convert beteen what polyptyth/poly can understand. // Please consult http://www.laidout.org about where to send any // correspondence about this software. // // This program is free software; you can redistribute it and/or // modify i...
Polyhedron poly; cerr <<"convertahedron -h"<<endl;
<|file_name|>object_fca.py<|end_file_name|><|fim▁begin|>class Object:<|fim▁hole|> def __init__(self, name): self._name = name @property def name(self): return self._name<|fim▁end|>
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>// Copyright (C) 2018 Simon Mika <simon@mika.se> // // This file is part of SysPL. // // SysPL 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 versi...
// along with SysPL. If not, see <http://www.gnu.org/licenses/>. // export { Expression } from "./Expression"
<|file_name|>syscache.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: from __future__ import absolute_import from __future__ import print_function from __future__ import division from builtins import round import gdb import re import zlib import sy...
from datetime import timedelta if sys.version_info.major >= 3:
<|file_name|>search.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/concat'; import 'rxjs/add/operator/map'; import { SearchHelper } from '../helpers/search.helper...
for (let i = 0; i < students.length; i++) {
<|file_name|>entities.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from canari.maltego.message import Entity, EntityField, EntityFieldType, MatchingRule __author__ = 'jaegeral' __copyright__ = 'Copyright 2014, Viper Project' __credits__ = [] __license__ = 'GPL' __version__ = '0.1' __maintainer__ = 'jaegeral...
class vipertag(viperentity): pass
<|file_name|>0077_auto__chg_field_response_ts__chg_field_respondant_review_status__chg_f.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models<|fim▁hole|> def forwards(self, orm): # Changing field 'R...
class Migration(SchemaMigration):
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import hotkeys from "hotkeys-js"; export default class HotkeyHandler { constructor(hotkeyRegistry) { this.hotkeyRegistry = hotkeyRegistry; hotkeys("*", { keyup: true, keydown: false }, event => { event.preventDefault(); <|fim▁hole|> }); hotkey...
this.hotkeyRegistry.resetLastPressedKeyCodes(); return false;
<|file_name|>prefill_an_array.py<|end_file_name|><|fim▁begin|>""" Prefill an Array (6 kyu) https://www.codewars.com/kata/54129112fb7c188740000162/train/python Create the function prefill that returns an array of n elements that all have the same value v. See if you can do this without using a loop. <|fim▁hole|>You h...
<|file_name|>model.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright 2014 Globo.com Player authors. All rights reserved. # Use of this source code is governed by a MIT License # license that can be found in the LICENSE file. from collections import namedtuple import os import errno import math try: impo...
codecs=iframe_stream_info.get('codecs') )
<|file_name|>interface.py<|end_file_name|><|fim▁begin|>def run(*args, **kwargs): _run(*args, **kwargs) <|fim▁hole|>def _run(task=None): if task is None: return task()<|fim▁end|>
<|file_name|>EventServer.py<|end_file_name|><|fim▁begin|>from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from thrift.server import TServer import threading from wpwithin.WPWithinCallback import Client from wpwithin.WPWith...
def __init__(self, listenerHandler, hostname, port): try: if(listenerHandler == None):
<|file_name|>middleware.rs<|end_file_name|><|fim▁begin|>/// Macro to reduce the boilerplate required for using unboxed /// closures as `Middleware` due to current type inference behaviour. /// /// In future, the macro should hopefully be able to be removed while /// having minimal changes to the closure's code. /// ///...
res.send(r)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react';<|fim▁hole|>import App from './App'; import registerServiceWorker from './registerServiceWorker'; ReactDOM.render(<App />, document.getElementById('root')); registerServiceWorker();<|fim▁end|>
import ReactDOM from 'react-dom'; import './index.css';
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Andreas Damgaard Pedersen # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
# You should have received a copy of the GNU General Public License
<|file_name|>yield_inside_async_function_py36.py<|end_file_name|><|fim▁begin|><|fim▁hole|># pylint: disable=missing-docstring, unused-variable async def good_coro(): def _inner(): yield 42 yield from [1, 2, 3] async def bad_coro(): yield 42 yield from [1, 2, 3] # [yield-inside-a...
"""Test that `yield` or `yield from` can't be used inside an async function."""
<|file_name|>objectBindingPatternKeywordIdentifiers01.js<|end_file_name|><|fim▁begin|>//// [objectBindingPatternKeywordIdentifiers01.ts] var { while } = { while: 1 } //// [objectBindingPatternKeywordIdentifiers01.js] <|fim▁hole|>var = { "while": 1 }["while"];<|fim▁end|>
<|file_name|>jquery.autocomplete.js<|end_file_name|><|fim▁begin|>/* * jQuery Autocomplete plugin 1.1 * * Copyright (c) 2009 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * * Revision: $Id: jquery....
blockSubmit = false;
<|file_name|>js-itm.js<|end_file_name|><|fim▁begin|>/** * @fileOverview js-itm: a Javascript library for converting between Israel Transverse Mercator (ITM) and GPS (WGS84) coordinates.<p> * <a href="http://code.google.com/p/js-itm/">http://code.google.com/p/js-itm/</a> * @author Udi Oron (udioron at g mail dot com)...