prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>wc.js<|end_file_name|><|fim▁begin|>Parse.initialize("AQxY526I5fcCPVkniY6ONnaBqU5qh1qDMqcOCORz", "y0cZ5QAGDU1SN1o1DtsQA8mHAKL3TKetrRvGwv3Y"); calculateSteps(); <|fim▁hole|> var count = 0; var Trips = Parse.Object.extend("Trip"); var query = new Parse.Query(Trips); query.greaterThan("StepsCompleted", 0);...
function calculateSteps(){
<|file_name|>workspace.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import logging import os import shlex import shutil import sys import traceback from flask import current_app from subprocess import PIPE, Popen, STDOUT from uuid import uuid1 from freight.exceptions import CommandError c...
if not isinstance(pipe, int): pipe = pipe.fileno() return os.fdopen(pipe, 'w')
<|file_name|>031_version_2_2_3.py<|end_file_name|><|fim▁begin|>import logging from sqlalchemy import * from kallithea.lib.dbmigrate.migrate import * from kallithea.lib.dbmigrate.migrate.changeset import * from kallithea.model import meta from kallithea.lib.dbmigrate.versions import _reset_base, notify log = logging...
<|file_name|>XMLexport.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright (C) 2008-2013 by Heiko Koehn - KoehnHeiko@googlemail.com * * Copyright (C) 2014 by Ahmed Charles - acharles@outlook.com * * Copyright (C) 2016 by Ian Ad...
<|file_name|>pathBasicShapeCircleTest.js<|end_file_name|><|fim▁begin|>/* global suite test internalScope */ (function () { suite('offsetPath', function () { test('basicShapeCircle', function () { var assertTransformInterpolation = internalScope.assertTransformInterpolation; assertTransformInter...
] );
<|file_name|>status_updater.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import flt, cstr from webnotes import msgprint from ...
<|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/. */ #![feature(box_syntax)] #![feature(collections)] #![feature(core)...
<|file_name|>file_data_source.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "media/filters/file_data_source.h" #include <algorithm> #include "base/loggin...
UpdateHostBytes(); return true; }
<|file_name|>era_prep.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ This module preprocesses ERA-Interim data, units, accumulated to instantaneous values and timestep interpolation for 6 h to 3 h values. Example: as import: from getERA import era_prep as prep prep.main(wd, co...
path2script = "./rsrc/toposcale_pre2.R"
<|file_name|>util.js<|end_file_name|><|fim▁begin|>var path = require('path'); var fs = require('fs'); var spawn = require('child_process').spawn; function noop() {} exports.noop = noop; if (process.env.HTTP2_LOG) { var logOutput = process.stderr; if (process.stderr.isTTY) { var bin = path.resolve(path.dirname...
while (written < concatenated.length) { var chunk_size = Math.min(concatenated.length - written, Math.ceil(Math.random()*20)); output.push(concatenated.slice(written, written + chunk_size));
<|file_name|>grid.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('tucha') .controller('GridCtrl', function ($rootScope, $scope, $location, $http, $timeout, states, columns) { var stateName = $location.path().split('/')[1]; for (var i = 0; i < states.length; i++) { if (sta...
for (var key in data.data[0]) {
<|file_name|>3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from math import * def i321(): n = 0L mn = 0L tn = 0L sn = 0L n3 = 0L n9 = 0L n = 372889431 mn = 139046528497282623<|fim▁hole|> print "M(%i) = %i\n" % (n, mn) print "sqrt(%d) = %i\n" % (n, sqrt(n)) print "sqrt(%d) = %i\n" % (tn...
tn = 1L + 8L * mn
<|file_name|>compare.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import argparse import json import csv import sys sys.path.append('python') import plotting import utils from opener import opener parser = argparse.ArgumentParser() parser.add_argument('-b', action='store_true') # passed on to ROOT when plo...
args.cyst_positions = json.load(json_file)
<|file_name|>CTBitset.java<|end_file_name|><|fim▁begin|>/** * Copyright 2017 Matthieu Jimenez. All rights reserved. * <p> * 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 * <p> * http://...
public abstract void clear();
<|file_name|>regions-close-object-into-object-5.rs<|end_file_name|><|fim▁begin|>#![allow(warnings)] trait A<T><|fim▁hole|>} struct B<'a, T: 'a>(&'a (A<T> + 'a)); trait X { fn foo(&self) {} } impl<'a, T> X for B<'a, T> {} fn f<'a, T, U>(v: Box<A<T> + 'static>) -> Box<X + 'static> { // oh dear! Box::new(B(&...
{ fn get(&self) -> T { panic!() }
<|file_name|>aws_ebs_test.go<|end_file_name|><|fim▁begin|>// +build !providerless /* Copyright 2014 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.or...
tmpDir, err := utiltesting.MkTmpdir("aws-ebs") if err != nil { t.Fatalf("can't make a temp dir: %v", err)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var Promise = require('ember-cli/lib/ext/promise'); <|fim▁hole|> afterInstall: function() { var addonContext = this; return this.addBowerPackageToProject('jquery-ui', '1.10.1') .then(function() { return addonContext.addBowerPackageToProject('...
module.exports = { normalizeEntityName: function() {},
<|file_name|>MspImagePlugin.py<|end_file_name|><|fim▁begin|># # The Python Imaging Library. # $Id$ # # MSP file handling # # This is the format used by the Paint program in Windows 1 and 2. # # History: # 95-09-05 fl Created # 97-01-03 fl Read/write MSP images # # Copyright (c) Secret Labs AB 1997. ...
<|file_name|>system4.py<|end_file_name|><|fim▁begin|>import os import select fds = os.open("data", os.O_RDONLY) while True: reads, _, _ = select.select(fds, [], [], 2.0)<|fim▁hole|> d = os.read(reads[0], 10) if d: print "-> ", d else: break else: print "...
if 0 < len(reads):
<|file_name|>ViewGeneratorService.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import Config import Database import atexit, os, time from flask import Flask from concurrent.futures import ThreadPoolExecutor from classes import CRONTask # Generate a thread pool executor = ThreadPoolExecutor(5) app = Flask( __...
def runTask( ) :
<|file_name|>0057_expire_all_sessions.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-05-08 17:49 from __future__ import unicode_literals from django.db import migrations from django.core import management from django.contrib.sessions.models import Session from django.util...
dependencies = [("users", "0056_remove_authorization_partner")] operations = [migrations.RunPython(expire_all_sessions)]
<|file_name|>BsWhiteImplicitReverseFkRef.java<|end_file_name|><|fim▁begin|>/* * Copyright 2004-2013 the Seasar Foundation and the Others. * * 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 Licens...
/** * To be unique by the unique column. <br> * You can update the entity by the key when entity update (NOT batch update).
<|file_name|>header_chain.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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, eith...
genesis_header: genesis.to_owned(), best_block: RwLock::new(BlockDescriptor {
<|file_name|>timedmute.py<|end_file_name|><|fim▁begin|># Timed mute: !tm <player> <seconds> <reason> # default time 5 minutes, default reason None # by topologist June 30th 2012 from scheduler import Scheduler from commands import add, admin, get_player, join_arguments, name @name('tm') @admin def timed_mute...
nick = args[0] time = int(args[1]) reason = join_arguments(args[2:])
<|file_name|>hhfit.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # hhfit.py --- # Description: # Author: # Maintainer: # Created: Tue May 21 16:31:56 2013 (+0530) # Commentary: # Functions for fitting common equations for Hodgkin-Huxley type gate # equations. import traceback import warnings import numpy as...
offset used in the exponential parts of Boltzman-type/HH-type
<|file_name|>iwatchonline.py<|end_file_name|><|fim▁begin|>import urllib,urllib2,re,string,sys,os import xbmc, xbmcgui, xbmcaddon, xbmcplugin from resources.libs import main #Mash Up - by Mash2k3 2012. addon_id = 'plugin.video.movie25' selfAddon = xbmcaddon.Addon(id=addon_id) art = main.art prettyName = 'iWatchOnline'...
remaining_display = 'Movies loaded :: [B]'+str(loadedLinks)+' / '+str(totalLinks)+'[/B].' dialogWait.update(0,'[B]Will load instantly from now on[/B]',remaining_display) xbmc.executebuiltin("XBMC.Dialog.Close(busydialog,true)")
<|file_name|>routing.hpp<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * @author nocotan * @date 2016/11/4 */ #ifndef ROUTING_HPP #define ROUTING_HPP #include <functional> #include <string> namespace ots { /** * @struct header * @brief header */ struct header { const std::string name...
* @file routing.hpp * @brief this file implements the application routing.
<|file_name|>bitmap_image.hpp<|end_file_name|><|fim▁begin|>/* *************************************************************************** * * * Platform Independent * * Bitmap Ima...
{255, 85, 0}, {255, 84, 0}, {255, 83, 0}, {255, 82, 0}, {255, 81, 0}, {255, 80, 0}, {255, 79, 0}, {255, 78, 0}, {255, 77, 0}, {255, 76, 0}, {255, 75, 0}, {255, 74, 0},
<|file_name|>jumbles nontrobo.py<|end_file_name|><|fim▁begin|>"""return a jumbled version of a string. eg, the lazy hamster is jumping becomes the lzay hmasetr si jmunipg shuffles insides of words. """ import random import string #okay, so this will be the jmuble algorythim <|fim▁hole|> def string_jumble(stri...
#variables, passed #string_to_jumble = "" #yeah #jumble_mode = true # do u switch words of two letters
<|file_name|>sentimentAnalyzerVader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Fri Jan 27 16:23:07 2017 @author: user """ ## FOUND HERE http://www.nltk.org/howto/sentiment.html ## Source code http://www.nltk.org/_modules/nltk/sentiment/vader.html ## http://www.nltk.or...
sentiment_tweets.append((tweet_id,sentiment,label))
<|file_name|>0007_auto_20151117_1038.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('maximo', '0006_auto_20151111_2021'), ] operations = [...
import django.core.validators
<|file_name|>SearchManager.java<|end_file_name|><|fim▁begin|>/******************************************************************** The Multiverse Platform is made available under the MIT License. Copyright (c) 2012 The Multiverse Foundation Permission is hereby granted, free of charge, to any person obtaining a cop...
} public Collection getResults()
<|file_name|>weight.pipe.ts<|end_file_name|><|fim▁begin|>import {Pipe, PipeTransform} from '@angular/core'; import { TopicObject } from './topic.model'; @Pipe({ name: 'weightSorting' })<|fim▁hole|>export class TopicWeightSort implements PipeTransform{ transform(array: Array<TopicObject>, args: string): Array<TopicO...
<|file_name|>ClientHandshakeSequenceTest.java<|end_file_name|><|fim▁begin|>package org.ovirt.engine.core.itests; import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNotNull; import org.ovirt.engine.core.common.queries.*; import org.ovirt.engin...
@Test public void testRunVm() {
<|file_name|>paint_listener.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 LayerId; use LayerProperties;<|fim▁hole|> /// The ...
use layers::layers::{BufferRequest, LayerBufferSet}; use layers::platform::surface::NativeDisplay; use msg::compositor_msg::{Epoch, FrameTreeId}; use msg::constellation_msg::PipelineId;
<|file_name|>nuvnfthresholdpolicy.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # ...
<|file_name|>multi_line_uncomment_after.rs<|end_file_name|><|fim▁begin|>fn doub<selection>le(x: i32) -> i32 {<|fim▁hole|><|fim▁end|>
x</selection> * 2 }
<|file_name|>index.tmpl.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 10 _modified_time = 1440369075.543512 _enable_loop = True _template_filename = u'themes/monospace/temp...
__M_writer(u'\n') if 'parent' not in context._data or not hasattr(context._data['parent'], 'content'):
<|file_name|>permission.js<|end_file_name|><|fim▁begin|>const PERM_NOT_FOUND = "Permission '_perm_' not found on '_role_' for '_res_'."; const Types = { ALL: 'ALL', CREATE: 'CREATE', READ: 'READ', UPDATE: 'UPDATE', DELETE: 'DELETE' }; /** * The map of role-resource tuple to permissions. * The first level ...
/**
<|file_name|>tensorNetwork.cpp<|end_file_name|><|fim▁begin|>// Xerus - A General Purpose Tensor Library // Copyright (C) 2014-2017 Benjamin Huber and Sebastian Wolf. // // Xerus is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published // by th...
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|>{ "name" : "GII", "version" : "1.0", "depends" : ['sale','product'], <|fim▁hole|> """, 'website': 'http://www.novasoftindia.com', 'data': ['giisa.xml', ], 'demo': [], 'installable': True, 'auto_instal...
"author" : "Novasoft Consultancy Services Pvt. Ltd.", 'category' : 'Generic Modules/Others', "description": """ GII - Management Module
<|file_name|>hardware.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # -*- coding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2016 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redi...
self.qc.save() self.qc.unlock_db()
<|file_name|>RenderLoom.java<|end_file_name|><|fim▁begin|>package com.bioxx.tfc.Render.Blocks; import net.minecraft.block.Block; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.Tessellator; import net.minecraft.world.IBlockAccess; import org.lwjgl.opengl.GL11; import ...
this.setRotatedRenderBounds(renderer, te.rotation, minX+0.8F, minY, minZ+0.75F, maxX-0.1F, maxY, maxZ-0.15F); renderer.renderStandardBlock(materialBlock, x, y, z);
<|file_name|>RouteAdder.java<|end_file_name|><|fim▁begin|>package org.dfhu.thpwa.routing; abstract class RouteAdder<T extends Route> { /** * Get the url pattern for this route */ protected abstract String getPath(); /** * get the HTTP request method<|fim▁hole|> */ protected abstract Route.METHOD ge...
<|file_name|>gradienteditor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import gtk from objects.gradientcolor import GradientColor from objects.gradient import Gradient from interfaces.signalizable import Signalizable class GradientLine(gtk.Viewport): def __init__(self, moving_call...
self.canvas = Canvas()
<|file_name|>tt_postscript.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015, Michael Droettboom All rights reserved. <|fim▁hole|># 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in bin...
# Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met:
<|file_name|>bitcoin_es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About TakeiCoin</source> ...
<location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation>Use las flechas arriba y abajo para navegar por el historial y &lt;b&gt;Control+L&lt;/b&gt; para limpiar la pantalla.</translation>
<|file_name|>swig.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Copyright (c) 2010 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. """Wrapper around swig. Sets the SWIG_LIB environment var to point to Lib dir and d...
# preprocessor. Provide them ourselves. platform_flags = { 'darwin': '-DSWIGMAC', 'linux2': '-DSWIGLINUX',
<|file_name|>email.py<|end_file_name|><|fim▁begin|>from oscar.core.loading import get_class OrderPlacementMixin = get_class("checkout.mixins", "OrderPlacementMixin")<|fim▁hole|> class OrderMessageSender(OrderPlacementMixin): def __init__(self, request): self.request = request<|fim▁end|>
<|file_name|>typeahead.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('mgcrea.ngStrap.typeahead', ['mgcrea.ngStrap.tooltip', 'mgcrea.ngStrap.helpers.parseOptions']) .provider('$typeahead', function() { var defaults = this.defaults = { animation: 'am-fade', prefixClass: 'typeahead', ...
parsedOptions.valuesFn(scope, controller)
<|file_name|>turtle.py<|end_file_name|><|fim▁begin|>""" Turtle RDF graph serializer for RDFLib. See <http://www.w3.org/TeamSubmission/turtle/> for syntax specification. """ from collections import defaultdict from rdflib.term import BNode, Literal, URIRef from rdflib.exceptions import Error from rdflib.serializer imp...
self.write('\n' + self.indent() + '[]') self.predicateList(subject)
<|file_name|>block_quotation.rs<|end_file_name|><|fim▁begin|>use parser::Block; use parser::attributes::parse_block_attributes; use parser::block::parse_block; use parser::block::paragraph::parse_paragraph; use parser::inline::parse_inline_elements; use parser::patterns::BLOCK_QUOTATION_PATTERN; pub fn parse_block_quo...
tag_type: "strong".to_string(), }, ], starts_with_p: false,
<|file_name|>debug_test.js<|end_file_name|><|fim▁begin|>// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted pr...
goog.require('proto.jspb.test.HasExtensions'); goog.require('proto.jspb.test.IsExtension'); goog.require('proto.jspb.test.Simple1');
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { A } from '@ember/array'; import Route from '@ember/routing/route'; import Ember from 'ember'; import Pretender from 'pretender'; const { testing } = Ember; const LEGACY_PAYLOAD = { fruit: [ { id: 1, name: 'apple' }, { id: 2, ...
url: request.url
<|file_name|>hateoas.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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 ...
links = [self.create_link(item.app, rel='parent')] return links, link
<|file_name|>HtmlUtil.java<|end_file_name|><|fim▁begin|>/* Copyright 2005-2006 Tim Fennell * * 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...
* * @param fragment a String fragment that might have HTML special characters in it * @return the fragment with special characters escaped
<|file_name|>App.java<|end_file_name|><|fim▁begin|>public class App { public static void main(String[] args) { System.out.println("Old man, look at my life...");<|fim▁hole|><|fim▁end|>
} }
<|file_name|>try-macro.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(deprecated)] // for deprecated `try!()` macro use std::num::{ParseFloatError, ParseIntError}; <|fim▁hole|> assert_eq!(nested(), Ok(2)); assert_eq!(merge_ok(), Ok(3.0)); assert_eq!(merge_int_err(), Err(Error::Int)); assert_eq!(mer...
fn main() { assert_eq!(simple(), Ok(1));
<|file_name|>SecureDict.py<|end_file_name|><|fim▁begin|>def interactiveConsole(a,b=None): ''' Useful function for debugging Placing interactiveConsole(locals(),globals()) into code will<|fim▁hole|> ''' import code d = {} if b: d.update(b) d.update(a) c=code.Interactive...
drop into an interactive console when run
<|file_name|>textbuf.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////// // Name: src/common/textbuf.cpp // Purpose: implementation of wxTextBuffer class // Created: 14.11.01 // Author: Morten Hanssen, Vadim Zeitlin // Copyright: (c) 199...
case wxTextFileType_None: return wxEmptyString; case wxTextFileType_Unix: return wxT("\n");
<|file_name|>responses.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. <|fim▁hole|> from marshmallow import fields from mar...
import time
<|file_name|>testsuite_shared.cc<|end_file_name|><|fim▁begin|>// Copyright (C) 2004-2016 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the...
} #if __cplusplus < 201103L
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>// delila - a desktop version of lila. // // Copyright (C) 2017 Lakin Wecker <lakin@wecker.ca> // // 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 Fou...
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>app.js<|end_file_name|><|fim▁begin|>(function(angular) { 'use strict'; angular.module('nonStringSelect', []) .run(function($rootScope) { $rootScope.model = { id: 2 }; }) .directive('convertToNumber', function() { return { require: 'ngModel', link: function(scope, element, attrs,...
return parseInt(val, 10); });
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># 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<|fim▁hole|># # Unless required by applicable law or agreed to in writing, software # distribut...
# # http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>RemoteInvocationCallData.java<|end_file_name|><|fim▁begin|>/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 */ package net.sf.mmm.service.base.client; import net.sf.mmm.service.api.RemoteInvocationCall; import net.sf.mmm.util.lan...
private CALL call; /**
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(const_fn)]<|fim▁hole|> #![plugin(stainless)] #![plugin(clippy)] // for stainless before_each #![allow(unused_mut, unused_variables)] extern crate concrust; #[macro_use(expect)] extern crate expectest; mod test_primitives; mod test_array_queue; mod test_link...
#![feature(plugin)]
<|file_name|>MagicCubeRender.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011-2014 Zhaotian Wang <zhaotianzju@gmail.com> * * 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 * * ht...
public void AutoSolve3(String SolverName)
<|file_name|>testmodule.py<|end_file_name|><|fim▁begin|>import time from Rpyc import Async def threadfunc(callback): """this function will call the callback every second""" callback = Async(callback)<|fim▁hole|> try: while True: print "!" callback() time.sleep(1) ...
<|file_name|>process_thread_impl.cc<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property ...
} // Wake the thread calling ProcessThreadImpl::Process() to update the // waiting time. The waiting time for the just registered module may be
<|file_name|>IntNode.java<|end_file_name|><|fim▁begin|>package com.fasterxml.jackson.databind.node; import java.io.IOException; import java.math.BigDecimal; import java.math.BigInteger; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.core.io.NumberOutput; import com.fasterxml.jackson.databind.Serial...
<|file_name|>index.py<|end_file_name|><|fim▁begin|>"""Routines related to PyPI, indexes""" import sys import os import re import mimetypes import posixpath <|fim▁hole|>from pip.exceptions import (DistributionNotFound, BestVersionAlreadyInstalled, InstallationError, InvalidWheelFilename, Uns...
from pip.log import logger from pip.util import Inf, normalize_name, splitext, is_prerelease
<|file_name|>file_atomic_replace_write_file.cc<|end_file_name|><|fim▁begin|>// Copyright 2019 The Cobalt 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 // /...
<|file_name|>integration_test.rs<|end_file_name|><|fim▁begin|>extern crate rcalc; use std::sync::Arc; use rcalc::{ Calculator, RuntimeItem, Value }; #[test] fn test_atom() { let mut calculator = Calculator::new(); assert_eq!(calculator.calc("1"), Result::Ok(&RuntimeItem::Value(Value::Integer(1)...
#[test] fn test_calc_parallel_with_context_1() {
<|file_name|>test_tag.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import fauxfactory import pytest from cfme import test_requirements from cfme.cloud.provider import CloudProvider from cfme.infrastructure.provider import InfraProvider from cfme.markers.env_markers.provider import ONE from cfme.markers.env_...
assert_response(appliance, results_num=tags_count) # testing BZ 1460257 results = appliance.rest_api.response.json()['results']
<|file_name|>ColumnTransformer.java<|end_file_name|><|fim▁begin|>package info.yongli.statistic.table; <|fim▁hole|>public class ColumnTransformer { }<|fim▁end|>
/** * Created by yangyongli on 25/04/2017. */
<|file_name|>game-play.component.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>@Component({ template: 'play' }) export class GamePlayComponent {}<|fim▁end|>
import { Component } from '@angular/core';
<|file_name|>plot_undirected_grid_graph_watersheds.py<|end_file_name|><|fim▁begin|>""" Edge/Node Weighted Watersheds ==================================== Compare edge weighted watersheds and node weighted on a grid graph. """ #################################### # sphinx_gallery_thumbnail_number = 5 from __future__ i...
pylab.title('Edge Weighted Watershed (sum weights)')
<|file_name|>pe_region.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ A list of Peru regions as `choices` in a formfield. This exists in this standalone file so that it's only imported into memory when explicitly needed. """ from __future__ import unicode_literals REGION_CHOICES = ( ('AMA', 'Amazonas...
<|file_name|>televigo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of PyDownTV. # # PyDownTV 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, eithe...
URL_TeleVigo = "http://www.televigo.com/" def __init__(self, url=""): self._URL_recibida = url
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod klondike;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .depth import * from .camera import *<|fim▁hole|><|fim▁end|>
from .contact import * from .imagefeature import * from .arduino import *
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># flake8: noqa from .config import INFER_HOST<|fim▁hole|>from .main import run_app, runserver, serve_static<|fim▁end|>
<|file_name|>inkscape-export.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python <|fim▁hole|>import sys INKSCAPE = '/usr/bin/inkscape' def list_layers(svg): layers = [ ] for g in svg.getElementsByTagName("g"): if g.attributes.has_key("inkscape:label"): layers.append(g.attributes["inkscap...
import os import codecs from xml.dom import minidom import subprocess
<|file_name|>MachineTypeEnum.java<|end_file_name|><|fim▁begin|>/* * Copyright 2021 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 copy of the License at * * https://www.apache.org/licenses/LI...
} }
<|file_name|>generate.go<|end_file_name|><|fim▁begin|>/* Copyright */ //go:generate rm -vf autogen/gen.go<|fim▁hole|> //go:generate mkdir -p vendor/github.com/docker/docker/autogen/dockerversion //go:generate cp script/dockerversion vendor/github.com/docker/docker/autogen/dockerversion/dockerversion.go package main<|...
//go:generate go-bindata -pkg autogen -o autogen/gen.go ./static/... ./templates/...
<|file_name|>TransactionWriteTakeIfExistsTest.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 thi...
/*
<|file_name|>light_data.hpp<|end_file_name|><|fim▁begin|>/*** * Copyright 2013, 2014 Moises J. Bonilla Caraballo (Neodivert) * * This file is part of COMO. * * COMO is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License v3 as published by * the Free Softwar...
/***
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- """ Verion: 1.0 Author: zhangjian Site: http://iliangqunru.com File: __init__.py.py Time: 2017/7/22 2:19<|fim▁hole|>"""<|fim▁end|>
<|file_name|>gast.py<|end_file_name|><|fim▁begin|>import sys as _sys import ast as _ast from ast import boolop, cmpop, excepthandler, expr, expr_context, operator from ast import slice, stmt, unaryop, mod, AST def _make_node(Name, Fields, Attributes, Bases): def create_node(self, *args, **kwargs): nbparam...
}
<|file_name|>qqGroupBackend.go<|end_file_name|><|fim▁begin|>package main import "log" import "time" import "strings" import "strconv" import "net/http" import "io/ioutil" import "database/sql" import "encoding/json" import "math/rand" //import "zhuji" import _ "github.com/go-sql-driver/mysql" // #cgo LDFLAGS: -L. -l...
func doGroupSign(ginfo,uinfo map[string]interface{}) string { timeData := time.Now()
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.generic import TemplateView from django.shortcuts import render_to_response<|fim▁hole|>class DashboardView(LoginRequiredMixin, TemplateView): template_name = 'dashboard.html' def get(self, *args, **kwargs): return render_to_response(s...
from django.template import RequestContext from braces.views import LoginRequiredMixin
<|file_name|>menu.py<|end_file_name|><|fim▁begin|>import pygame import sys from game import constants, gamestate from game.ai.easy import EasyAI from game.media import media from game.scene import Scene <|fim▁hole|># List of menu options (text, action_method, condition) where condition is None or a callable. ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from quicktions import Fraction from . import ( _update, deprecated, enumerate, format, get, illustrators, io, iterate, iterpitches, lyconst, lyenv, makers, mutate, persist, string, wf, ) from ._versio...
"Leaf", "LeafMaker", "Left",
<|file_name|>Email.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2015-2017 Atomist 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...
*/ class Email implements api.Email {
<|file_name|>InterfaceMethodBuilder.java<|end_file_name|><|fim▁begin|>package com.mistraltech.smogen.codegenerator.javabuilder;<|fim▁hole|>public class InterfaceMethodBuilder extends MethodSignatureBuilder<InterfaceMethodBuilder> { private InterfaceMethodBuilder() { } public static InterfaceMethodBuilder a...
<|file_name|>webpackfile.js<|end_file_name|><|fim▁begin|>const Webpack = require('webpack') const CopyWebpackPlugin = require('copy-webpack-plugin')<|fim▁hole|> const dependencies = package.dependencies return Object .keys(dependencies) .reduce((modules, module) => Object.assign({}, modules, { [module...
const package = require('./package.json') const { join } = require('path') const externals = () => {
<|file_name|>model_list.go<|end_file_name|><|fim▁begin|>// Copyright 2019 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 copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 ...
<|file_name|>draw.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('depthyApp') .controller('DrawCtrl', function ($scope, $element, depthy, $window, $timeout) { var drawer = depthy.drawMode, viewer = depthy.getViewer(), lastPointerPos = null, oldViewerOpts = angular.extend({}, depthy.v...
depthy.animateOption(depthy.viewer, { depthPreview: oldViewerOpts.depthPreview, depthScale: oldViewerOpts.depthScale, depthBlurSize: oldViewerOpts.depthBlurSize,
<|file_name|>typo-suggestion.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...
println!("Hello {}", fob); //~ ERROR cannot find value }