prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>github.js<|end_file_name|><|fim▁begin|>var async = require('async'), fs = require('graceful-fs'), path = require('path'), colors = require('colors'), swig = require('swig'), spawn = require('child_process').spawn, util = require('../../util'), file = util.file2, commitMessage = require('./u...
if (!args.setup) next(); }); });
<|file_name|>UpdateLogger.py<|end_file_name|><|fim▁begin|># # UpdateLogger.py # """ package oompa.tracking TODO: stil waffling about whether to log two-columns - "datetime {json}" or "{json-with-datetime-field}" """ import json import os from datetime import datetime class UpdateLogger: """ records upda...
"subject": entityMetadata.name, } # TODO: probably just write out full list in one record
<|file_name|>renderers.py<|end_file_name|><|fim▁begin|>import json<|fim▁hole|> return json.dumps(data)<|fim▁end|>
class JSONRenderer(object): def render(self, data):
<|file_name|>15.5.4.20-4-55.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistributio...
es5id: 15.5.4.20-4-55 description: > String.prototype.trim handles whitepace and lineterminators
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime import photolib.models import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0001_initia...
('id', models.AutoField(auto_created=True, verbose_name='ID', serialize=False, primary_key=True)),
<|file_name|>runtests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Custom test runner If args or options, we run the testsuite as quickly as possible. If args but no options, we default to using the spec plugin and aborting on first error/failure. <|fim▁hole|> Run all tests (as fast as possible) $ ./runt...
If options, we ignore defaults and pass options onto Nose. Examples:
<|file_name|>vision.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from __future__ import division ''' All things computer vision. ''' import cv2 from mousetrap.i18n import _ from mousetrap.image import Image import m...
haar = cv2.CascadeClassifier(haar_file)
<|file_name|>solver.worker.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { Craft, CrafterStats, CraftingAction, CraftingActionsRegistry } from '@ffxiv-teamcraft/simulator'; import { first } from 'rxjs/operators'; @Injectable({<|fi...
providedIn: 'root'
<|file_name|>ConsultarSituacaoLoteRps.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from pysignfe.xml_sped import * from .Rps import IdentificacaoPrestador, IdentificacaoRps import os DIRNAME = os.path.dirname(__file__) class MensagemRetorno(XMLNFe): def __init__(self): super(MensagemRetorno, s...
xml += u'</ListaMensagemRetorno>' return xml
<|file_name|>_minexponent.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class MinexponentValidator(_plotly_utils.basevalidators.NumberValidator): def __init__(<|fim▁hole|> self, plotly_name="minexponent", parent_name="choropleth.colorbar", **kwargs ): super(MinexponentVali...
<|file_name|>clip_to_rect_test_case.py<|end_file_name|><|fim▁begin|>""" Needed Tests clip_to_rect() tests -------------------- DONE *. clip_to_rect is inclusive on lower end and exclusive on upper end. DONE *. clip_to_rect behaves intelligently under scaled ctm. DONE *. clip_to_rect int...
def test_empty_clip_region(self): # This tests when the clipping region is clipped down to nothing.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in com...
.param('termsHash', 'The SHA-256 hash of this collection\'s terms, encoded in hexadecimal.') ) def acceptCollectionTerms(self, collection, termsHash):
<|file_name|>copydata_test.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2014-2016 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Softwa...
q := func(s string) string {
<|file_name|>MemoryMappedFileFactory.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2016, All partners of the iTesla project (http://www.itesla-project.eu/consortium) * 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 * ...
package eu.itesla_project.commons.io.mmap; import java.io.IOException;
<|file_name|>aggregates.count.assignment.1.test.py<|end_file_name|><|fim▁begin|>input = """ % Atom bug shouldn't be derived, as the body of the rule % should be false. Auxiliary atoms shouldn't be printed % out, as they are censored. d(1). d(2). d(3). bug :- 1 < #count{V : d(V)} <= 2. """ output = """ % Atom bug sh...
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>"""Support for Climate devices of (EMEA/EU-based) Honeywell evohome systems.""" from datetime import datetime, timedelta import logging import requests.exceptions from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const...
<|file_name|>const_let_promote.rs<|end_file_name|><|fim▁begin|>// run-pass use std::cell::Cell; const X: Option<Cell<i32>> = None;<|fim▁hole|>const Y: Option<Cell<i32>> = { let x = None; x }; // Ensure that binding the final value of a `const` to a variable does not affect promotion. #[allow(unused)] fn main...
<|file_name|>font.rs<|end_file_name|><|fim▁begin|>use {JamResult, JamError}; use rusttype::{self, FontCollection}; use {FontLoadError, load_file_contents}; use std::path::Path; use render::read_directory_paths; pub struct OurFont { pub font: rusttype::Font<'static>, } pub fn load_font(full_path: &Path) -> Result<...
for path in paths { if let Some(extension) = path.extension().and_then(|p| p.to_str()).map(|s| s.to_lowercase()) { if extension == "ttf" {
<|file_name|>interfaces.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- """ @author: Matthias Feys (matthiasfeys@gmail.com) @date: %(date) """ import theano class Layer(object): def __init__(self,name, params=None): self.name=name self.input = input self.params = [] i...
for pname,param in params.__dict__.iteritems(): self.__dict__[pname[:-(len(self.name)+1)]] = theano.shared(param, name=pname[:-(len(self.name)+1)]+'_'+self.name, borrow=True) def initParams():
<|file_name|>test_ircmsgs.py<|end_file_name|><|fim▁begin|>### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 mus...
## if msg.args: ## def setArgs(msg): ## msg.args[0] = s ## self.assertRaises(TypeError, setArgs, msg)
<|file_name|>long-live-the-unsized-temporary.rs<|end_file_name|><|fim▁begin|>#![allow(incomplete_features)] #![feature(unsized_locals, unsized_fn_params)] use std::fmt; fn gen_foo() -> Box<fmt::Display> { Box::new(Box::new("foo")) } fn foo(x: fmt::Display) { assert_eq!(x.to_string(), "foo"); } fn foo_indire...
}
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env log = CPLog(__name__) class Automation(Plugin): def __init__(self): ...
movie_ids = []
<|file_name|>legacy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2021 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the t...
if local_vars == None: local_vars = global_vars
<|file_name|>peekreader.rs<|end_file_name|><|fim▁begin|>//! Contains the trait `PeekRead` and type `PeekReader` implementing it. use std::io; use std::io::{Read, Write}; use multifilereader::HasError; /// A trait which supplies a function to peek into a stream without /// actually reading it. /// /// Like `std::io::R...
self.temp_buffer.drain(..n); n }, Err(_) => 0,
<|file_name|>NotExpression.java<|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 * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by ...
{
<|file_name|>git-config.d.ts<|end_file_name|><|fim▁begin|>declare module 'git-config' {<|fim▁hole|> }, github: { user?: string } } export function sync(gitFile?: string): Config; }<|fim▁end|>
export type Config = { user: { name?: string, email?: string
<|file_name|>i18n.js<|end_file_name|><|fim▁begin|>/** * Internationalization / Localization Settings * (sails.config.i18n) * * If your app will touch people from all over the world, i18n (or internationalization) * may be an important part of your international strategy. * * * For more information, check out: ...
locales: ['en', 'es', 'fr', 'de'], objectNotation: true };
<|file_name|>response.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Asymmetric Base Framework - A collection of utilities for django frameworks # Copyright (C) 2013 Asymmetric Ventures Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU ...
<|file_name|>players.js<|end_file_name|><|fim▁begin|>define(['backbone', 'collections/players', 'views/player'], function(Backbone, PlayersCollection, PlayerView) { return Backbone.View.extend({ tagName: 'table', className: 'table table-striped', template: _.template($('#players-view').html()), init...
<|file_name|>lib.js<|end_file_name|><|fim▁begin|>var ArrayProto = Array.prototype; var ObjProto = Object.prototype; var escapeMap = { '&': '&amp;', '"': '&quot;', "'": '&#39;', "<": '&lt;', ">": '&gt;' }; var escapeRegex = /[&"'<>]/g; var lookupEscape = function(ch) { return escapeMap[ch]; };...
return; } if(ArrayProto.each && obj.each == ArrayProto.each) {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from __future__ import print_function<|fim▁hole|> import sys import os # from setuptools import Distribution from pkg_resources import get_distribution, working_set, VersionConflict def samefile(path, other): """ Workaround for missing ``os.path.samefile`` i...
<|file_name|>PowerActivationFunction.java<|end_file_name|><|fim▁begin|>package com.anji_ahni.nn.activationfunction; /** * Square-root function. * * @author Oliver Coleman */ public class PowerActivationFunction implements ActivationFunction, ActivationFunctionNonIntegrating { /** * identifying string */ pub...
/**
<|file_name|>issue-15730.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/lic...
fn main() { let mut array = [1, 2, 3]; let pie_slice = &array[1..2]; }
<|file_name|>main.js<|end_file_name|><|fim▁begin|>$('.js-toggle-menu').click(function(e){ e.preventDefault(); $(this).siblings().toggle(); }); $('.nav--primary li').click(function(){ $(this).find('ul').toggleClass('active');<|fim▁hole|><|fim▁end|>
});
<|file_name|>linkedList.js<|end_file_name|><|fim▁begin|>/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v18.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Li...
var entry = {
<|file_name|>box_.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/. */ //! The `Box` type, which represents the leaves of the layout tr...
pub fn paint_inline_background_border_if_applicable(&self, list: &mut DisplayList, absolute_bounds: &Rect<Au>, offset: &Point2D<Au>) {
<|file_name|>0_4_0.py<|end_file_name|><|fim▁begin|># Copyright (c) 2008-2016 VMware, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|># You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# you may not use this file except in compliance with the License.
<|file_name|>example.py<|end_file_name|><|fim▁begin|><|fim▁hole|> mygraph = greengraph.Greengraph('New York','Chicago') data = mygraph.green_between(20) plt.plot(data) plt.show()<|fim▁end|>
import greengraph if __name__ == '__main__': from matplotlib import pyplot as plt
<|file_name|>mirror.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gfx-rs Developers. // // 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/LICEN...
usage: usage,
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (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, either version 3 ...
} static propTypes = { isLoading: PropTypes.bool.isRequired,
<|file_name|>view-node-map.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:8b057c8d60d76759e6a75285bd1fcea8ba4acea65ffe3b8e5ff4a1937cb3dacd size 2530
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
<|file_name|>LSE.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2009-2015, Jack Poulson # All rights reserved. # # This file is part of Elemental and is under the BSD 2-Clause License, # which can be found in the LICENSE file in the root directory, or at # http://opensource.org/licenses/BSD-2-Clause # import ...
<|file_name|>UserInformationManagementFormPanel.js<|end_file_name|><|fim▁begin|>var UserInformation_AccountStore = new Ext.data.Store({ fields:[ {name : 'Name'}, {name : 'ID'}, {name : 'Mail'}, {name : 'Roles'} ], reader : AccountReader }); var UserInformationItem = [ { fieldLabel : 'User ID', ...
UserManagementMainLoadMaskShow(); Ext.Ajax.request({ scope : this,
<|file_name|>synthetic_dynamic_cast_fast.cpp<|end_file_name|><|fim▁begin|>/// /// \file /// /// This file is a part of pattern matching testing suite. /// /// \autor Yuriy Solodkyy <yuriy.solodkyy@gmail.com> /// /// This file is a part of the XTL framework (http://parasol.tamu.edu/xtl/). /// Copyright (C) 2005-...
<|file_name|>test_cisco_mech.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 OpenStack Foundation. # # 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...
<|file_name|>run.py<|end_file_name|><|fim▁begin|>import math import string lookup_map = {} def memcache_read(n): global lookup_map if lookup_map.has_key(n): return lookup_map[n] else: return None def memcache_write(n, value): global lookup_map lookup_map[n] = value def get_chain_length(n): # che...
return 1 if n % 2 == 0: n = n / 2
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright 2012 Google Inc. 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...
if not key:
<|file_name|>pascal_str.rs<|end_file_name|><|fim▁begin|>use std::borrow::{Cow, ToOwned}; use std::cmp::{Ordering, PartialEq, PartialOrd}; use std::ffi::{CStr, CString}; use std::str; use ::utf8::PascalString; use ::PASCAL_STRING_BUF_SIZE; #[derive(Hash, Eq, Ord)] pub struct PascalStr { string: str } impl PascalSt...
&mut self.string
<|file_name|>crazyeights.js<|end_file_name|><|fim▁begin|>exports.commands = { 'c8': 'crazyeights', crazyeights: function(arg, by, room) { if (room.charAt(0) === ',') return false; if (!crazyeight.gameStatus[room]) { crazyeight.gameStatus[room] = 'off'; } if (!arg) { return false; } else { arg = t...
crazyeight.deck[room] = crazyeight.deck[room].slice(1); if (crazyeight.deck[room].length === 0) {
<|file_name|>issue-1118-using-forward-decl.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] pub type c = nsTArray; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct nsTArray_base { pub d: *mut ::std::os::raw::c_int, } #[test] fn ...
assert_eq!(
<|file_name|>managed_process.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/. // Assumes Unix use libc::{self, c_int}; use std::threa...
// and we kill it, then on unix we might ending up killing a
<|file_name|>vhdlscanner.cpp<|end_file_name|><|fim▁begin|>#line 3 "<stdout>" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer vhdlscanYY_create_buffer #define yy_delete_buffer vhdlscanYY_delete_buffer #define yy_flex_debug vhdlscanYY_flex_debug #define yy_init_buff...
if ((*str == '\t') || (*str == '\n') || (*str == '\r') || (*str == ' ')) { *str++;
<|file_name|>log2csv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Simple log converter for SOTA It inputs a simplified text log and converts it to SOTA CSV format. The input is a simplified version which allows most of the data field to be guessed by previous input. Example of input file: # lines startin...
# 3 missing hour part {09:03} # 05 missing hour part {09:05} # 13 missing hour part {09:13}
<|file_name|>bitcoin_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Fellatio</source> ...
<translation>Unbekannter Netztyp in -onlynet angegeben: &apos;%s&apos;</translation> </message>
<|file_name|>items.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html<|fim▁hole|> import scrapy class PictureItem(scrapy.Item): # define the fields for your item here like: image...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Asynchronous I/O //! //! This crate contains the `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and //! `AsyncBufRead` traits, the asynchronous analogs to //! `std::io::{Read, Write, Seek, BufRead}`. The primary difference is //! that these traits integrate with the asynchr...
} fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
<|file_name|>AbstractLoggerTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You u...
log(Level.DEBUG, "Hello"); log(Level.DEBUG, null, "Hello"); currentEvent = events[1];
<|file_name|>context.js<|end_file_name|><|fim▁begin|>'use strict'; const Hoek = require('hoek'); exports.plugin = { register: async (plugin, options) => { plugin.ext('onPreResponse', (request, h) => { try { var internals = { devEnv: (process.env.NODE_ENV === 'development'), meta: options.meta, ...
} }); }, pkg: require('../package.json'),
<|file_name|>test_glusterfs.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Red Hat, Inc. # 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...
drv._mounted_shares = [] self.assertRaises(exception.GlusterfsNoSharesMounted,
<|file_name|>cl_LF_max.cc<|end_file_name|><|fim▁begin|>// max(). // General includes. #include "base/cl_sysdep.h" // Specification. #include "cln/lfloat.h" // Implementation. namespace cln { <|fim▁hole|> return (x >= y ? x : y); } } // namespace cln<|fim▁end|>
const cl_LF max (const cl_LF& x, const cl_LF& y) {
<|file_name|>main.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from backup.api import api as api_backup from backup.api import api_restore # Blueprints registration app.register_blueprint(api_backup, url_prefix='/api/backup') app.register_blueprint(api_restore, url_prefix='/api/restore') @app.route('/api/help', meth...
from app import app from flask import jsonify
<|file_name|>GKEventDispatcher.cpp<|end_file_name|><|fim▁begin|>/* * Copyright(c), All rights reserved. * Author: alexzzp@gmail.com * Filename: GKEventCenter.cpp * Created Time: 2014/11/15 16:02:33 * Description: 事件分发器 * Revision: * License:<|fim▁hole|> /* -------------------------...
*/ USING_NS_CC;
<|file_name|>inspector.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "inspector")] extern crate rusoto; use rusoto::inspector::{Inspector, InspectorClient, ListAssessmentRunsRequest}; use rusoto::{DefaultCredentialsProvider, Region}; use rusoto::default_tls_client; #[test] fn should_list_assessment_runs() { l...
<|file_name|>core.py<|end_file_name|><|fim▁begin|>import os import re import sys import json import shlex import logging import inspect import functools import importlib from pprint import pformat from collections import namedtuple from traceback import format_tb from requests.exceptions import RequestException import...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import unittest<|fim▁hole|>import threading from electrum import constants # Set this locally to make the test suite run faster. # If set, unit tests that would normally test functions with multiple implementations, # will only be run once, using the fastest impl...
<|file_name|>logtest.py<|end_file_name|><|fim▁begin|>import logging logging.basicConfig(filename='test-logfile.log', level=logging.DEBUG) top = 50 for i in range(top): print(i)<|fim▁hole|><|fim▁end|>
logging.info('Loop completed, reached %s' % top)
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import sys from fabric.api import env, task, local __author__ = 'flat' __version__ = '1.0' env.hosts = ['localhost'] env.colorize_errors = 'True' env.disable_known_hosts = 'True' args = sys.argv[1:] if not args: print("Usage: fab { git | ad...
add()
<|file_name|>background.go<|end_file_name|><|fim▁begin|>package hugot import "context" // BackgroundHandler gets run when the bot starts listening. They are // intended for publishing messages that are not in response to any // specific incoming message. type BackgroundHandler interface { Describer StartBackground(...
// description provided. func NewBackgroundHandler(name, desc string, f BackgroundFunc) BackgroundHandler {
<|file_name|>compiler.py<|end_file_name|><|fim▁begin|>from django.db.backends.mysql.compiler import SQLCompiler as BaseSQLCompiler from django.db.backends.mysql.compiler import SQLInsertCompiler, \ SQLDeleteCompiler, SQLUpdateCompiler, SQLAggregateCompiler, \ SQLDateCompiler, SQLDateTimeCompiler class SQLComp...
This should only be called after any SQL construction methods that
<|file_name|>2.10_conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so d...
'github_version': 'devel/docs/docsite/rst/',
<|file_name|>infinite-tag-type-recursion.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://ww...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/** * configuration for grunt tasks * @module Gruntfile */ module.exports = function(grunt) { /** load tasks */ require('load-grunt-tasks')(grunt); /** config for build paths */ var config = { dist: {<|fim▁hole|> StoreFactory: 'dist/StoreFacto...
dir: 'dist/',
<|file_name|>Polygon.py<|end_file_name|><|fim▁begin|># CS4243: Computer Vision and Pattern Recognition # Zhou Bin # 29th, Oct, 2014 import numpy as np from Vertex import Vertex class Polygon: def __init__(self, newVertexList, newTexelList): # Create list to store all vertex self.Vertex...
# Create list to store all texel value self.Texel = []
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/* ======================================================================== * Bootstrap: alert.js v3.0.3 * http://getbootstrap.com/javascript/#alerts * ======================================================================== * Copyright 2013 Twitter, Inc. * *...
<|file_name|>signal.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 use libc::c_int; pub use vmm_sys_util::signal::*; extern "C" { fn __libc_current_sigrtmin() -> c_int; fn __libc_current_sigrtmax() -...
<|file_name|>webpack.config.babel.js<|end_file_name|><|fim▁begin|>/* eslint import/no-extraneous-dependencies: ["error", {"devDependencies": true}] */ import path from 'path'; import webpack from 'webpack'; import CopyWebpackPlugin from 'copy-webpack-plugin'; import HtmlWebpackPlugin from 'html-webpack-plugin'; export...
<|file_name|>SocketClient.js<|end_file_name|><|fim▁begin|>//-------------------------------------------------------------------------------------------------- $.SocketClient = $.CT.extend( /*-------------------------------------------------------------------------------------------------- | | -> Конструктор | |--...
<|file_name|>login.ts<|end_file_name|><|fim▁begin|>import { Component, View } from 'angular2/core'; import { Router, RouterLink } from 'angular2/router'; import { CORE_DIRECTIVES, FORM_DIRECTIVES } from 'angular2/common'; import { Http, Headers } from 'angular2/http'; import { contentHeaders } from '../common/headers';...
login(event, username, password) { let body = JSON.stringify({ username, password });
<|file_name|>boss_the_beast.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information * * 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<|fim▁hole|> *...
* Free Software Foundation; either version 2 of the License, or (at your
<|file_name|>compat.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2013-2017 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import absolute_import import os import re import sys try: impo...
<|file_name|>WorkflowNavigationButtonPanel.java<|end_file_name|><|fim▁begin|>package org.sahsu.rif.generic.presentation; import java.awt.BorderLayout; import java.awt.GridBagConstraints; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JPanel; import org.sahsu.rif.generic.system.M...
GridBagConstraints rightPanelGC = userInterfaceFactory.createGridBagConstraints(); rightPanelGC.anchor = GridBagConstraints.SOUTHEAST; rightPanel.add(firstButton, rightPanelGC); rightPanelGC.gridx++;
<|file_name|>MockFilesystem.test.ts<|end_file_name|><|fim▁begin|>import {IFilesystem} from './Filesystem'; <|fim▁hole|> files: Directory = {}; constructor(files?: Directory) { this.files = files || {}; } private get(path: string, create?: boolean): [Directory | undefined, string] { if (...
export type Node = Directory | string; export type Directory = {[name: string]: Node}; export class MockFilesystem implements IFilesystem {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""core URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views<|fim▁hole|>Class-based views ...
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
<|file_name|>group_api_urls.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import<|fim▁hole|>import re from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from django.conf.urls import patterns, include, url from sentry.plugins import plugins logger = logging.getLogger("sentry.plug...
import logging
<|file_name|>contact-us.js<|end_file_name|><|fim▁begin|>var ContactUs = function () { return { //main function to initiate the module init: function () { var map; $(document).ready(function(){ map = new GMaps({ div: '#map', lat: -13.004333, lng: -38.494333,...
lat: -13.004333,
<|file_name|>FBODebugger.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////// // Copyright 2004-2014, SenseGraphics AB // // This file is part of H3D API. // // H3D API is free software; you can redistribute it and/or modify // it under the terms of...
FrameBufferTextureGenerator *fbo_node = *i; if( fbo_node->getName() == fbo->getValue() ) { selected_fbo_node = *i;
<|file_name|>ArtifactRequestProcessor.java<|end_file_name|><|fim▁begin|>/* * Copyright 2022 ThoughtWorks, 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...
<|file_name|>selectnav.js<|end_file_name|><|fim▁begin|>/** * @preserve SelectNav.js (v. 0.1) * Converts your <ul>/<ol> navigation into a dropdown list for small screens * https://github.com/lukaszfiszer/selectnav.js */ window.selectnav = (function(){ "use strict"; var selectnav = function(element,options){ ...
if(nested){ var subElement = list.children[i].children[1]; if( subElement && islist(subElement) ){ html += parselist(subElement);
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>### EXESOFT PYIGNITION ### # Copyright David Barker 2010 # # Global constants module # Which version is this? PYIGNITION_VERSION = 1.0 <|fim▁hole|> # Drawtype constants DRAWTYPE_POINT = 100 DRAWTYPE_CIRCLE = 101 DRAWTYPE_LINE = 102 DRAWTYPE_SCALELINE...
<|file_name|>cron.py<|end_file_name|><|fim▁begin|>import asyncio import asyncio.subprocess import datetime import logging from collections import OrderedDict, defaultdict from typing import Any, Awaitable, Dict, List, Optional, Union # noqa from urllib.parse import urlparse from aiohttp import web import yacron.versio...
retry["backoffMultiplier"], retry["maximumDelay"], ) self.retry_state[job.name] = retry_state
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" ================================================== Sparse linear algebra (:mod:`scipy.sparse.linalg`) ================================================== .. currentmodule:: scipy.sparse.linalg Abstract linear operators ------------------------- .. autosummary:...
:toctree: generated/
<|file_name|>test_tf_nn_moments.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Author: violinsolo # Created on 08/03/2018 import tensorflow as tf import numpy as np x_shape = [5, 3, 3, 2] x = np.arange(reduce(lambda t, s: t*s, list(x_shape), 1)) print x x = x.reshape([5, 3, 3, -1]) <|fi...
print x.shape
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from article import views urlpatterns = [<|fim▁hole|><|fim▁end|>
url(r'^$', views.articles, name='articles'), url(r'^add/?$', views.add_articles, name='add-articles'), ]
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from api.models import UsernameSnippet class TestUsernameSnippet(TestCase): @classmethod<|fim▁hole|> def test_existence(self): u = UsernameSnippet.objects.first() self.assertIsInstance(u, UsernameSnippet) self.assertEqua...
def setUpTestData(cls): UsernameSnippet.objects.create(available=True)
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use actix::prelude::*; use actors::forward_agent::ForwardAgent; use actors::ForwardA2AMsg; use actors::agent::Agent; use dirs; use base64; use domain::a2a::*; use domain::a2connection::*; use domain::config::*; use domain::key_deligation_proof::*; use domain::invite::*...
let msgs = [A2AMessage::Version1(A2AMessageV1::UpdateConnectionStatus(UpdateConnectionStatus {
<|file_name|>templatevm.py<|end_file_name|><|fim▁begin|># # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2014-2016 Wojtek Porczyk <woju@invisiblethingslab.com> # Copyright (C) 2016 Marek Marczykowski <marmarek@invisiblethingslab.com>) # Copyright (C) 2016 Bahtiar `kalkin-` Gadimov <bahti...
doc='VM that provides network connection to this domain. When ' '`None`, machine is disconnected.')
<|file_name|>websocket.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::cell::DOMRefCell; use dom::bindings::cod...
let buf = JS_NewArrayBuffer(cx, len);
<|file_name|>test_mnistplus.py<|end_file_name|><|fim▁begin|>""" This file tests the MNISTPlus class. majorly concerning the X and y member of the dataset and their corresponding sizes, data scales and topological views. """ from pylearn2.datasets.mnistplus import MNISTPlus from pylearn2.space import IndexSpace, VectorS...
"""
<|file_name|>_changedsince.py<|end_file_name|><|fim▁begin|># # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # 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 Softwar...
# # This program is distributed in the hope that it will be useful,