prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>server.go<|end_file_name|><|fim▁begin|>package main import ( "log" "os" "github.com/docopt/docopt.go" "github.com/go-martini/martini" "github.com/martini-contrib/binding" "github.com/martini-contrib/render" "labix.org/v2/mgo" "labix.org/v2/mgo/bson" ) // Note contains a title and content. type n...
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * RS232 */ package kernel.modbus;<|fim▁end|>
/** * Contains methods for working with device using the MODBUS protocol over
<|file_name|>api.go<|end_file_name|><|fim▁begin|>package api import ( "errors" "io/ioutil" "log" "net/http" "github.com/bitly/go-simplejson" ) func Request(req *http.Request) (*simplejson.Json, error) { resp, err := http.DefaultClient.Do(req) if err != nil { return nil, err } body, err := ioutil.ReadAll(r...
url + ": " + err.Error()) }
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_TRACK_MODIFICATIONS = False MAIL_SERVER = 'smtp.googlemai...
SQLALCHEMY_DATABASE_URI = 'postgresql://' + str(Config.SQL_USERNAME) + ':' + str(
<|file_name|>router.js<|end_file_name|><|fim▁begin|>'use strict' require('./controllers/listCtrl.js'); require('./controllers/loginCtrl.js'); require('./services/pageService.js'); angular.module('app.router', ['ui.router', 'app.list', 'app.login']) .config(configFn); configFn.$inject = ['$locationProvider'...
}); }
<|file_name|>networkstyle.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 The GreenCoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "networkstyle.h" #include "guiconstants.h" #include <QApplicati...
const char *appName; const char *appIcon;
<|file_name|>workspace.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016-present, Facebook, 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/LICE...
"""Fetches a blob from the workspace.
<|file_name|>paned.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (17af302) from gir-files (11e0e6d) // DO NOT EDIT use Buildable; use Container; use Orientable; use Orientation; use Widget; use ffi; use gdk; use glib::object::Downcast; use glib::object::IsA; use glib::translate::*; glib_wrapper! {...
pub fn get_position(&self) -> i32 { unsafe { ffi::gtk_paned_get_position(self.to_glib_none().0)
<|file_name|>make_fits_catalogs.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted # provided that the following condi...
format='D', array=out_fit_mad_s),
<|file_name|>ETransformationState.java<|end_file_name|><|fim▁begin|>/** * */ /* * Cacheonix Systems licenses this file to You under the LGPL 2.1 * (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.cacheonix.org/product...
public String toString() {
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for jQuery.raty 2.7.0 // Project: https://github.com/wbotelhos/raty // Definitions by: Matt Wheatley <http://github.com/terrawheat> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 /// <reference types...
target?: string, targetFormat?: string, targetKeep?: boolean, targetScore?: string,
<|file_name|>q17.py<|end_file_name|><|fim▁begin|>""" 问题描述:给定一个矩阵matrix,其中的值有正、负和0,返回子矩阵的最大累加和. 例如,矩阵matrix为 -90 48 78 64 -40 64 -81 -7 66 其中,最大累加和的子矩阵为: 48 78 -40 64 -7 66 所以返回累加和209. <|fim▁hole|> 其中,最大累加和的子矩阵为: 2 2 所以返回累加和为4. """ import sys from arrandmatrix.q16 import MaxSum class MaxMatrixSum: @class...
例如,matrix为: -1 -1 -1 -1 2 2 -1 -1 -1
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|># Copyright 2016 Hewlett Packard Enterprise Development, LP # # 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 ...
if host_routes is None: host_routes = []
<|file_name|>run_CNN_SAT.py<|end_file_name|><|fim▁begin|># Copyright 2015 Tianchuan Du University of Delaware # 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/l...
if cfg.param_output_file != '': _nnet2file(dnn.dnn_adapt.layers, filename = cfg.param_output_file + '.adapt', input_factor = cfg_adapt.input_dropout_factor, factor = cfg_adapt.dropout_factor) _nnet2file(dnn.cnn_si.layers, filename = cfg.param_output_file + '.si',
<|file_name|>string_view.py<|end_file_name|><|fim▁begin|>''' sc_studio.string_view Author: Ming Tsang Copyright (c) 2014-2015 HKUST SmartCar Team Refer to LICENSE for details ''' import binascii import logging import time import tkinter from tkinter import Tk, Text from sc_studio import config from sc_studio.view imp...
<|file_name|>entropy_sample.rs<|end_file_name|><|fim▁begin|>extern crate rust_ml; use rust_ml::junk::minamoto::entropy; mod even_odd_class; fn main() { let set = vec!((2i32, even_odd_class::EvenOddClass::Even),<|fim▁hole|> (9i32, even_odd_class::EvenOddClass::Odd)); println!("2 {}", entrop...
(4i32, even_odd_class::EvenOddClass::Even), (6i32, even_odd_class::EvenOddClass::Even), (8i32, even_odd_class::EvenOddClass::Even),
<|file_name|>test_stacks.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/...
resp, stack = self.client.get_stack(stack_name) self.assertEqual('CREATE_COMPLETE', stack['stack_status']) # fetch the stack by id
<|file_name|>create_form_test_template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementE...
<|file_name|>scrape_season.py<|end_file_name|><|fim▁begin|>import scrapenhl_globals import scrape_game def scrape_games(season, games, force_overwrite = False, pause = 1, marker = 10): """ Scrapes the specified games. Parameters ----------- season : int The season of the game. 2007-08 woul...
scrape_game.update_team_ids_from_json(teamdata) scrape_game.update_player_ids_from_json(teamdata) scrape_game.update_quick_gamelog_from_json(data)
<|file_name|>test_util_netstrings.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the ho...
# note that the incomplete 'foobar' does not appear here self.assertEqual(p.strings, ['hello world'])
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>use {Span, Spanned}; use lexer::{mod, Lexer, Token}; #[deriving(Clone)] pub enum ParseError { UnexpectedEndOfFile, /// An unexpected token has been encountered. UnexpectedToken(Spanned<Token>, String), } impl ::std::fmt::Show for ParseError { fn fmt...
<|file_name|>CP.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import os import sys thispath = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.join(os.path.dirname(thispath),"helper")) from MiscFxns import * from StandardModules import * import pulsar_psi4 def ApplyBasis(syst,bsname,bs...
return abs(EgyIn+224.89287653924677)<0.00001 def CompareGrad(GradIn): CorrectGrad=[
<|file_name|>bitcoind.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "init.h" #include ...
<|file_name|>cluster.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ 聚类和EM算法 ~~~~~~~~~~~~~~~~ 聚类 :copyright: (c) 2016 by the huaxz1986. :license: lgpl-3.0, see LICENSE for more details. """ import numpy as np import matplotlib.pyplot as plt from sklearn.datasets.samples_generator impo...
fig=plt.figure() ax=fig.add_subplot(1,1,1)
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var elixir = require('laravel-elixir'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-------------------------------------------------------------------------- |<|fim▁hole|> | */ elixir(function(mix...
| Elixir provides a clean, fluent API for defining some basic Gulp tasks | for your Laravel application. By default, we are compiling the Sass | file for our application, as well as publishing vendor resources.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup except: from distutils.core import setup setup( long_description=open("README.rst").read(), name="""tinypath""", license="""MIT""", author="""Karim Bahgat""", author_email="""karim.bahgat.norway@gmail.com""", py_modules=['tinypa...
<|file_name|>createSampledSetFunctionObject.C<|end_file_name|><|fim▁begin|>// OF-extend Revision: $Id$ /*---------------------------------------------------------------------------*\<|fim▁hole|> \\ / A nd | Copyright held by original author \\/ M anipulation | -----------------------------...
========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration |
<|file_name|>eq.rs<|end_file_name|><|fim▁begin|>use malachite_base_test_util::bench::bucketers::pair_rational_sequence_max_len_bucketer; use malachite_base_test_util::bench::{run_benchmark, BenchmarkType}; use malachite_base_test_util::generators::common::{GenConfig, GenMode}; use malachite_base_test_util::generators::...
<|file_name|>ArrayPrimitiveMenu.java<|end_file_name|><|fim▁begin|>package jaist.css.covis.cls; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JFrame; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.JPopupMenu; im...
String input;
<|file_name|>app.js<|end_file_name|><|fim▁begin|>angular.module('luhbot',[ 'ui.router', 'dashboard' ]) //TODO: Persistance of socket .factory('IO',function(Toasts){ var IO = function(){ this.namespace = null; this.socket = {}; var self = this; this.connect = function(namespace){ if(namespac...
this.listenNewMessages = function(){ this.socket.on('newMessage',function(data){
<|file_name|>network_tb_gen_parameterized_credit_based.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Siavoosh Payandeh Azad from math import ceil, log import random # -D [size]: sets the size of the network, it can be powers of two # -Rand: generates random traffic patterns import sys if '--help' in sys.arg...
string_to_print += "enable_"+str(i)+ ", " noc_file.write("\tsignal "+string_to_print[:-2]+": std_logic;\n") string_to_print = ""
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/*! * hybridify-all <https://github.com/hybridables/hybridify-all> * * Copyright (c) 2015 Charlike Mike Reagent, contributors. * Released under the MIT license. */ 'use strict' var reduce = require('object.reduce') var hybridify = require('hybridify') /** * > ...
}
<|file_name|>test_tds_parameter.py<|end_file_name|><|fim▁begin|>import re import warnings import ctds from .base import TestExternalDatabase from .compat import PY3, PY36, unicode_ class TestTdsParameter(TestExternalDatabase): def test___doc__(self): self.assertEqual( ctds.Parameter.__doc__...
TypeError if PY3 else False, TypeError if PY3 else False, ),
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages from pip.req import parse_requirements version = "6.27.20" requirements = parse_requirements("requirements.txt", session="") setup( name='frappe', version=version,<|fim▁hole|> author_email='info@frappe.io', packages=find...
description='Metadata driven, full-stack web framework', author='Frappe Technologies',
<|file_name|>renamer.js<|end_file_name|><|fim▁begin|>"use strict"; var _classCallCheck = require("babel-runtime/helpers/class-call-check")["default"]; var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; var _interopRequireWildcard = require("babel-runtime/helpers/interop...
var oldName = this.oldName;
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { title = 'Free Eclipse icons';<|fim▁hole|><|fim▁end|>
}
<|file_name|>RandomColoringDiv2.java<|end_file_name|><|fim▁begin|>public class RandomColoringDiv2 { public int getCount(int maxR, int maxG, int maxB, int startR, int startG, int startB, int d1, int d2) { int colors = 0; int minR = Math.max(0, startR - d2); int minG = Math.max(0, ...
<|file_name|>0007_auto_20170423_1937.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-04-23 19:37 ''' Миграция ''' from __future__ import unicode_literals <|fim▁hole|> class Migration(migrations.Migration): ''' Добавляем опциональные поля ''' dependencies = [ ('lawe', '0006...
from django.db import migrations, models
<|file_name|>CharSequences.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under...
* If there is no common words, then this method returns an empty string.</p> * * <h4>Possible future evolution</h4> * Current implementation searches only for a common prefix and a common suffix, ignoring any common words
<|file_name|>results_model.py<|end_file_name|><|fim▁begin|># Created By: Virgil Dupras # Created On: 2009-04-23 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The ter...
fm = QFontMetrics(font)
<|file_name|>TheorEval.cc<|end_file_name|><|fim▁begin|>/*! @file TheorEval.cc @date Tue Aug 12 2013 @author Andrey Sapronov <Andrey.Sapronov@cern.ch> Contains TheorEval class member function implementations. */ #include <fstream> #include <list> #include <sstream> #include <stack> #include <float.h> #include <va...
break; } } while (1); double dterm = atof(term.c_str());
<|file_name|>boss_felmyst.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2017 TrinityCore <http://www.trinitycore.org/> * * 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 ve...
} void UpdateAI(uint32 /*diff*/) override {
<|file_name|>connect.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 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, either ver...
result => Ok(result)
<|file_name|>example.py<|end_file_name|><|fim▁begin|>from Robinhood import Robinhood #Setup my_trader = Robinhood(username="YOUR_USERNAME", password="YOUR_PASSWORD"); #Get stock information #Note: Sometimes more than one instrument may be returned for a given stock symbol stock_instrument = my_trader.instruments(...
print(quote_info); #Place a buy order (uses market bid price) buy_order = my_trader.place_buy_order(stock_instrument, 1)
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate serde_derive; extern crate docopt; use docopt::Docopt; use std::fs; use std::path::PathBuf; mod directory_files; use directory_files::*; mod file_comparable; mod directory_comparable; use directory_comparable::*; /// The Docopt usage strin...
println!( "Could not find {} in {}", missing_file.display(),
<|file_name|>font_context.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 font::{Font, FontDescriptor, FontGroup, FontHandleMe...
use platform::font::FontHandle; use platform::font_context::FontContextHandle;
<|file_name|>test_metric_service_client_v3.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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:...
client = monitoring_v3.MetricServiceClient()
<|file_name|>ExFour03.java<|end_file_name|><|fim▁begin|>package com.shumz.think.ex004; public class ExFour03 { public ExFour03() { System.out.println("An instance of ExFour03 was created..."); } public static void main(String[] args) { new ExFour03(); }<|fim▁hole|><|fim▁end|>
}
<|file_name|>feed_parse_extractVodkatranslationsCom.py<|end_file_name|><|fim▁begin|>def extractVodkatranslationsCom(item): ''' Parser for 'vodkatranslations.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None ...
('Loiterous', 'Loiterous', 'oel'), ]
<|file_name|>TestAndOrSimple.java<|end_file_name|><|fim▁begin|>package com.globalforge.infix; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import com.globalforge.infix.api.InfixSimpleActions; import com.google.common.collect.ListMultimap; /*- The MIT License (MIT) Copyright (c) 2019-...
} catch (Exception e) { e.printStackTrace();
<|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(core_intrinsics)] #![feature(c...
pub mod time; pub mod vec;
<|file_name|>forInStatement2.ts<|end_file_name|><|fim▁begin|>var expr: number; for (var a in expr) {<|fim▁hole|><|fim▁end|>
}
<|file_name|>BeanTypeTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General...
* @run main ClassFileInstaller sun.hotspot.WhiteBox * sun.hotspot.WhiteBox$WhiteBoxPermission
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import os from setuptools import setup readme = os.path.join(os.path.dirname(__file__), 'README.md') setup(name = 'bottleneck', version = '0.1.0', description = 'performance report generator for OpenMP programs in GNU/Linux', ...
<|file_name|>pool.go<|end_file_name|><|fim▁begin|>// Copyright ©2014 The gonum Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package mat import ( "sync" "gonum.org/v1/gonum/blas" "gonum.org/v1/gonum/blas/blas64" ) var tab64 =...
} poolVec[i].New = func() interface{} { return &VecDense{mat: blas64.Vector{
<|file_name|>Errores.java<|end_file_name|><|fim▁begin|>package es.com.blogspot.elblogdepicodev.activiti; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; import org.activiti.engine.ProcessEngine; import org.activiti.engine.ProcessEngineConfiguration; import org.activiti.engine.ProcessEn...
variables.put("producto", producto);
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2010-2012 Roberto Longobardi # # This file is part of the Test Manager plugin for Trac. # # The Test Manager plugin for Trac is free software: you can # redistribute it and/or modify it under the terms of the GNU # General ...
url='http://trac-hacks.org/wiki/TestManagerForTracPlugin',
<|file_name|>request_test.go<|end_file_name|><|fim▁begin|>package request_test import ( "bytes" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/http/httptest" "net/url" "reflect" "runtime" "strconv" "strings" "testing" "time" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr...
} func (d *testRetryer) MaxRetries() int {
<|file_name|>HotNeedleLightControl.cpp<|end_file_name|><|fim▁begin|>#include "HotNeedleLightControl.h" HotNeedleLightControlClass::HotNeedleLightControlClass(uint8_t background[NEOPIXEL_COUNT][COLOR_BYTES], uint8_t hotNeedleColor[COLOR_BYTES], float highlightMultiplier, bool useHighlight, uint16_t fadeTime, uint8_t fr...
void HotNeedleLightControlClass::renderFrame(uint16_t pos, NEEDLE_DIRECTION dir) {
<|file_name|>overloaded-index-in-field.rs<|end_file_name|><|fim▁begin|>// run-pass // Test using overloaded indexing when the "map" is stored in a // field. This caused problems at some point. use std::ops::Index; struct Foo { x: isize, y: isize, } struct Bar { foo: Foo } impl Index<isize> for Foo { ...
<|file_name|>0002_auto_20170415_1001.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 = [ ('papers', '0001_initial'), ] operations = [ migrations.A...
<|file_name|>delete-droplet.spec.ts<|end_file_name|><|fim▁begin|>import axios from 'axios'; import MockAdapter from 'axios-mock-adapter'; import { createContext } from '../../common'; import {deleteDroplet} from './delete-droplet'; import * as MOCK from './delete-droplet.mock'; describe('droplet', () => { const DROP...
expect(request.headers).toMatchObject(MOCK.request.headers); expect(request.data).toBeUndefined(); /// validate headers const {headers, status} = response;
<|file_name|>bg.js<|end_file_name|><|fim▁begin|><|fim▁hole|>CKEDITOR.plugins.setLang("codesnippet","bg",{button:"Въвеждане на блок с код",codeContents:"Съдържание на кода",emptySnippetError:"Блока с код не може да бъде празен.",language:"Език",title:"Блок с код",pathName:"блок с код"});<|fim▁end|>
/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */
<|file_name|>test_metrics_fluster.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 TiKV Project Authors. Licensed under Apache-2.0. use std::path::Path; use std::thread::sleep; use std::time::Duration; use engine_rocks::raw::{DBOptions, TitanDBOptions}; use tempfile::Builder; use engine_rocks::util::{self as rocks_...
db_opt.set_titandb_options(&TitanDBOptions::new()); let db_opt = RocksDBOptions::from_raw(db_opt);
<|file_name|>vdnConfig.py<|end_file_name|><|fim▁begin|># coding=utf-8 # # Copyright © 2015 VMware, Inc. All Rights Reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restrictio...
segments_create_body['segmentRange']['begin'] = '11002' segments_create_body['segmentRange']['end'] = '11003' segments_create_body['segmentRange']['name'] = 'legacy'
<|file_name|>serve.ts<|end_file_name|><|fim▁begin|>import { task } from 'gulp'; import { join } from 'path'; import { config } from '../utils/config'; import { sequenceTask } from '../utils/sequence-task'; import { readFileSync, writeFileSync } from 'fs'; const serve = require('browser-sync'); const webpack = requir...
<|file_name|>id_mapping.py<|end_file_name|><|fim▁begin|>id_mappings = { "EX1_097": "Abomination", "CS2_188": "Abusive Sergeant", "EX1_007": "Acolyte of Pain", "NEW1_010": "Al'Akir the Windlord", "EX1_006": "Alarm-o-Bot", "EX1_382": "Aldor Peacekeeper", "EX1_561": "Alexstrasza", "EX1_393"...
"EX1_564": "Faceless Manipulator",
<|file_name|>index.js<|end_file_name|><|fim▁begin|>define(['app', 'directives/search/search'], function() { 'use strict';<|fim▁hole|><|fim▁end|>
});
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Author: Vova Zaytsev <zaytsev@usc.edu> import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nlcd.settings")<|fim▁hole|><|fim▁end|>
from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
<|file_name|>crawler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #encoding:utf-8 import os import sys import requests import MySQLdb from bs4 import BeautifulSoup from bs4 import SoupStrainer if len(sys.argv) != 4: print 'Invalid parameters!' exit(1) print '=' * 60 print 'start:', sys.argv aim_cat...
<|file_name|>diffie_hellman.rs<|end_file_name|><|fim▁begin|>use num_bigint::{BigUint, RandBigInt}; use num_integer::Integer; use num_traits::{One, Zero}; use once_cell::sync::Lazy; use rand::{CryptoRng, Rng}; static DH_GENERATOR: Lazy<BigUint> = Lazy::new(|| BigUint::from_bytes_be(&[0x02])); static DH_PRIME: Lazy<BigU...
pub fn shared_secret(&self, remote_key: &[u8]) -> Vec<u8> { let shared_key = powm(
<|file_name|>array.js<|end_file_name|><|fim▁begin|>define(['underscore', 'util', 'collection/abstract'], function(_, Util, AbstractCollection) { 'use strict'; var _parent = AbstractCollection.prototype; var ArrayCollection = Util.extend(AbstractCollection, { _registry: null, ...
return this._map.slice(); } });
<|file_name|>FormGroupSize.java<|end_file_name|><|fim▁begin|>/* * #%L * Diana UI Core * %% * Copyright (C) 2014 Diana UI * %% * 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|>navtreeindex7.js<|end_file_name|><|fim▁begin|>var NAVTREEINDEX7 = { "classIogn_1_1DatabaseIO.html#a4d31b02871089cc417ea990591acb9e7":[4,0,64,2,9], "classIogn_1_1DatabaseIO.html#a4f78970eb21804fb1eb863b93d174e0c":[4,0,64,2,42], "classIogn_1_1DatabaseIO.html#a509bdb2de719b050921fd03bd207361e":[4,0,64,2,21], ...
"classIogn_1_1GeneratedMesh.html#a78ef32eaeec128564a364248a33f3dbf":[4,0,64,5,71],
<|file_name|>_mod1_0_1_0_0_4.py<|end_file_name|><|fim▁begin|>name1_0_1_0_0_4_0 = None name1_0_1_0_0_4_1 = None name1_0_1_0_0_4_2 = None name1_0_1_0_0_4_3 = None <|fim▁hole|><|fim▁end|>
name1_0_1_0_0_4_4 = None
<|file_name|>AutoComplete.py<|end_file_name|><|fim▁begin|>"""AutoComplete.py - An IDLE extension for automatically completing names. This extension can complete either attribute names of file names. It can pop a window with all available names, for the user to select from. """ import os import sys import string from ...
"""Find the completions and create the AutoCompleteWindow. Return True if successful (no syntax error or so found).
<|file_name|>rest-builder.test.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); var RequestBuilder = require('../lib/rest-builder'); describe('REST Request Builder', function () { describe('Request templating', function () { var server = null; before(function (done) { v...
it('should build an operation with the parameter names', function (done) { var builder = new RequestBuilder('POST', 'http://localhost:3000/{p}').query({x: '{x}', y: 2}); var fn = builder.operation(['p', 'x']);
<|file_name|>batch_tests.py<|end_file_name|><|fim▁begin|>import itertools from batchy.runloop import coro_return, runloop_coroutine from batchy.batch_coroutine import batch_coroutine, class_batch_coroutine from . import BaseTestCase CALL_COUNT = 0 @batch_coroutine() def increment(arg_lists): def increment_singl...
global CALL_COUNT CALL_COUNT += 1 coro_return([increment_single(*ar, **kw) for ar, kw in arg_lists])
<|file_name|>TextIO.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
TextIO
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import os import amo.search from .models import Reindexing from django.core.management.base import CommandError # shortcut functions<|fim▁hole|>is_reindexing_amo = Reindexing.objects.is_reindexing_amo flag_reindexing_amo = Reindexing.objects.flag_reindexing_amo unfl...
<|file_name|>cellNavigationService.js<|end_file_name|><|fim▁begin|>/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v14.0.0 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; var __decorate = (this && this.__decorate) || function (de...
}; CellNavigationService.prototype.getRowBelow = function (lastRow) { // if already on top row, do nothing if (this.isLastRowInContainer(lastRow)) {
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import base64 import cPickle as pickle import datetime from email import message_from_string from email.utils import getaddresses from django import forms from django.contrib.auth.models import User, Group from django.contrib.contenttypes.models import ContentType f...
ANYONE = "all" PERMISSION_CHOICES = ( (MODERATORS, 'Moderators',),
<|file_name|>account.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cstr, cint from frappe import throw, _ from frappe.model.doc...
(self.report_type, self.lft, self.rgt))
<|file_name|>associative-recall-task.py<|end_file_name|><|fim▁begin|>import theano import theano.tensor as T import numpy as np import matplotlib.pyplot as plt from lasagne.layers import InputLayer, DenseLayer, ReshapeLayer import lasagne.layers import lasagne.nonlinearities import lasagne.updates import lasagne.objec...
_, seqlen, _ = l_input.input_var.shape # Neural Turing Machine Layer memory = Memory(memory_shape, name='memory', memory_init=lasagne.init.Constant(1e-6), learn_init=False)
<|file_name|>process_site.py<|end_file_name|><|fim▁begin|>"""Process `site.json` and bower package tools.""" import os import json import subprocess from functools import partial import importlib import sys from flask import Flask, render_template, g, redirect, current_app from gitloader import git_show from import_...
return os.path.join(get_pkg_dir(package), pkg['main']) def check_pkg(package): """CHeck if the package exists, if not use bower to install."""
<|file_name|>boot.js<|end_file_name|><|fim▁begin|>'use strict'; function Boot() { }<|fim▁hole|> preload: function () { this.load.image('preloader', 'assets/preloader.gif'); }, create: function () { this.game.input.maxPointers = 1; this.game.state.start('preload'); } }; module.exports = Boot;<|fim▁e...
Boot.prototype = {
<|file_name|>test_plugins.py<|end_file_name|><|fim▁begin|>import os from twisted.trial import unittest from lisa.server.plugins.PluginManager import PluginManagerSingleton class LisaPluginTestCase(unittest.TestCase): def setUp(self): self.pluginManager = PluginManagerSingleton.get() def test_a_instal...
self.assertEqual(answer['status'], "success") def test_h_uninstall_plugin(self):
<|file_name|>test_igmp.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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.apach...
g_str = '%s(%s)' % (igmpv3_report_group.__name__, _g_str) eq_(str(self.g), g_str)
<|file_name|>thir-unsafeck-issue-85871.rs<|end_file_name|><|fim▁begin|>// Tests that no ICE occurs when a closure appears inside a node // that does not have a body when compiling with // compile-flags: -Zthir-unsafeck=yes // check-pass #![allow(dead_code)]<|fim▁hole|> _n => 42, // we may not call the closure h...
struct Bug { inner: [(); match || 1 {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate may; extern crate mimalloc; extern crate num_cpus; #[macro_use] extern crate serde_derive; extern crate may_minihttp; extern crate serde_json; use may_minihttp::{BodyWriter, HttpServer, HttpService, Request, Response}; use std::io; use mimalloc::MiMalloc;...
may::config()
<|file_name|>ipc.rs<|end_file_name|><|fim▁begin|>/* Precached - A Linux process monitor and pre-caching daemon Copyright (C) 2017-2020 the precached developers This file is part of precached. Precached is free software: you can redistribute it and/or modify it under the terms of the GNU General Pu...
info!("IPC client disconnected"); }
<|file_name|>sub.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://www.apache.org/licenses/LI...
<|file_name|>regions-creating-enums5.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://www.ap...
add(&'a ast<'a>, &'a ast<'a>) }
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
while !rp.is_null() {
<|file_name|>lib.rs<|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<|fim▁hole|>// (at your option) any later version. // Pari...
// the Free Software Foundation, either version 3 of the License, or
<|file_name|>cobp.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # encoding=utf8 """ Copyright (C) 2018 MuadDib ---------------------------------------------------------------------------- "THE BEER-WARE LICENSE" (Revision 42): @tantrumdev wrote this file. As long as you retain this notice you can...
@route(mode='COBP', args=["url"]) def get_stream(url): url = urlparse.urljoin('http://collectionofbestporn.com/', url)
<|file_name|>inheritance.py<|end_file_name|><|fim▁begin|>class Hayvan: def __init__(self,isim, renk): self.isim=isim self.renk=renk def yuru(self): print(self.isim+" yurumeye basladi") def ye(self): print(self.isim+" yemeye basladi") class Fare(Hayvan):<|fim▁hole|> ...
def __init__(self,isim,renk): super().__init__(isim,renk) def yuru(self):
<|file_name|>compiler.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The go-okcoin Authors // This file is part of go-okcoin.<|fim▁hole|>// // go-okcoin 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, eit...
<|file_name|>test_database.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 Phil Birkelbach # # 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 2 of the License, or # (at y...
units: '%/100' initial: 0.0
<|file_name|>client.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The Go Authors. All rights reserved. // // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file or at // https://developers.google.com/open-source/licenses/bsd. package gosrc import ( "encoding/json" ...
type httpClient struct {