prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>local_cloud_datastore.py<|end_file_name|><|fim▁begin|># # Copyright 2015 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.apach...
logging.warning('failed to shut down datastore; response: %s', response)
<|file_name|>blob_detector_.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from blob import Blob from foreground_processor import ForegroundProcessor import cv2 import operator import rospy from blob_detector.msg import Blob as BlobMsg from blob_detector.msg import Blobs as BlobsMsg<|fim▁hole|>import numpy as n...
<|file_name|>test_traffic_annotation_auditor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2017 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. """//testing/scripts wrapper for the network traffic annot...
]
<|file_name|>a4.rs<|end_file_name|><|fim▁begin|>fn main() { // Declaración de vectores o arrays<|fim▁hole|> let vector1 = vec!["primer lemento","segundo elemento","tercer elemento"] ; // Se utiliza "vec!" para declarar una apuntador de variable como vector. let mut vector2: Vec<&str> = Vec::new(); // Declaraci...
<|file_name|>uri.rs<|end_file_name|><|fim▁begin|>extern crate spring_dvs; use spring_dvs::uri::*; #[test] fn ts_model_uri_new_pass() { let r = Uri::new("spring://cci.esusx.uk"); assert!(r.is_ok()); let uri = r.unwrap(); let gsn = uri.route(); assert_eq!(gsn.len(), 3); assert_eq!(gsn[0], "cci"); assert_eq!...
assert_eq!(uri.res()[0], "res"); assert_eq!(uri.res()[1], "home");
<|file_name|>k_means_cluster.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # Filename: k_means_cluster.py """ A Machine learning algorithm for K mean clustering. Date: 24th March, 2015 pm """ __author__ = "Anthony Wanjohi" __version__ = "1.0.0" import random, fractions def euclidean_distance(point, centroid): '...
<|file_name|>guiMetaSwap.py<|end_file_name|><|fim▁begin|>import wx from service.fit import Fit import gui.mainFrame from gui import globalEvents as GE from .calc.fitRemoveImplant import FitRemoveImplantCommand from .calc.fitAddImplant import FitAddImplantCommand from .calc.fitRemoveBooster import FitRemoveBoosterComma...
<|file_name|>sequence.py<|end_file_name|><|fim▁begin|>""" Author: Eric J. Ma Affiliation: Massachusetts Institute of Technology """ from random import choice from generate_id import generate_id class Sequence(object): """ The Sequence object is the lowest level object in the pathogen simulator. It provides a cont...
return self.id def generate_sequence(self, length):
<|file_name|>WCSFTIME_WCHAR_T_FMAT.cpp<|end_file_name|><|fim▁begin|>// checking for wcsftime() in <wchar.h> #if defined (_RWSTD_USE_CONFIG) # include "config.h" #endif // _RWSTD_USE_CONFIG #include <stddef.h> // for size_t #include <stdio.h> // for printf() #include <time.h> // for struct tm #ifndef _RWS...
<|file_name|>DefaultEmptyMessageValidator.java<|end_file_name|><|fim▁begin|>/* * Copyright 2006-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.<|fim▁hole|> * * Unless required by applicable l...
* You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>Read.js<|end_file_name|><|fim▁begin|>//Capturar possibles errors process.on('uncaughtException', function(err) { console.log(err); }); //Importar mòdul net var net = require('net') //Port d'escolta del servidor var port = 8002; //Crear servidor TCP net.createServer(function(socket){ socket.on('da...
//Funció per llegir dades de la plataforma thethings.iO
<|file_name|>inline.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 https://mozilla.org/MPL/2.0/. */ use crate::context::LayoutContext; use crate::flow::float::Fl...
ifc.current_nesting_level .max_block_size_of_fragments_so_far .max_assign(line_height); ifc.current_nesting_level
<|file_name|>dummySensor.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ ===================================== dummySensor.py - Dummy Sensor Handler ===================================== Displays a silly little window for faking sensor values by clicking on buttons. """ import threading, subprocess, os, tim...
print >>sys.__stderr__, "(SENS) Killing dummysensor GUI..." self.p_sensorHandler.stdin.write(":QUIT\n") self.p_sensorHandler.stdin.close()
<|file_name|>ZkTaskManager.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 ...
// } if (customTaskData != null) {
<|file_name|>get-cause.test.ts<|end_file_name|><|fim▁begin|>import { Bugsy, getCause } from '.'; describe('Utils', () => { describe('getCause', () => { it('get cause of Error', () => { const error = new Error(); const cause = getCause(error); expect(cause).toBeNull(); }); <|fim▁hole|> ...
it('get cause of Bugsy error', () => { const error = new Error(); const networkError = new Bugsy({ name: 'NetworkError',
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>""" Platform for Ecobee Thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.ecobee/ """ import logging import voluptuous as vol from homeassistant.components import ecobee from homeas...
return current[0]['name']
<|file_name|>Frustum.java<|end_file_name|><|fim▁begin|>/* * Ferox, a graphics and game library in Java * * Copyright (c) 2012, Michael Ludwig * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met:...
throw new IllegalArgumentException("Field of view must be in (0, 180], not: " + fov);
<|file_name|>get_user_team_associations_by_statement.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Copyright 2013 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...
__author__ = 'api.shamjeff@gmail.com (Jeff Sham)'
<|file_name|>test_context_processors.py<|end_file_name|><|fim▁begin|>import os from django.contrib.auth import authenticate from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.auth.models import User, Permission from django.contrib.contenttypes.models import ContentType from django.contrib...
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' Hello Flask Latest version can be found at https://github.com/dakside/pydemo References: Python documentation: https://docs.python.org/ Flask documentation: http://flask.pocoo.org/ PEP 0008...
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
<|file_name|>messages.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 © Samuel Dolt <samuel@dolt.ch> // // This file is part of orion_backend. // // Orion_backend 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 Founda...
Example:
<|file_name|>graph.go<|end_file_name|><|fim▁begin|>package terraform import ( "fmt" "log" "runtime/debug" "strings" "sync" "github.com/hashicorp/terraform/dag" ) <|fim▁hole|>const RootModuleName = "root" // RootModulePath is the path for the root module. var RootModulePath = []string{RootModuleName} // Graph ...
// RootModuleName is the name given to the root module implicitly.
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (c) 2010-2012 Cidadania S. Coop. Galega # # This file is part of e-cidadania. # # e-cidadania 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...
if self.request.user.is_anonymous(): self.template_name = 'not_allowed.html'
<|file_name|>cs_CZ.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="cs_CZ" sourcelanguage="en"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AddCategoryDlg</name> <message> <location filename="../ui/addcategorydlg.ui" line="14"/> ...
<message> <location filename="../ui/addtrainingdlg.ui" line="56"/> <source>Monday</source>
<|file_name|>translate_smt.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python import os import sys from barf.barf import BARF if __name__ == "__main__": # # Open file # try: filename = os.path.abspath("../../samples/toy/arm/branch4") barf = BARF(filename) except Exception as e...
for addr, asm_instr, reil_instrs in barf.translate(): print("0x{0:08x} : {1}".format(addr, asm_instr))
<|file_name|>request.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::fmt; use std::path::{Path, PathBuf}; use std::sync::atomic::AtomicUsize; use st...
pub fn verify_tls_cert(mut self, verify: bool) -> Self { self.set_verify_tls_cert(verify); self }
<|file_name|>level.js<|end_file_name|><|fim▁begin|>'use strict'; function Level(args) { if(!(this instanceof Level)) return new Level(args); this.context = args.context; this.player = args.player; this.gameplayObjects = args.gameplayObjects; this.outcomeListeners = []; this.finalMessageListeners = [];...
Level.prototype.addRespawnInfoListener = function(listener) { this.respawnInfoListeners.push(listener); }
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>use super::*; use crate::punctuated::Punctuated; ast_struct! { /// A path at which a named item is exported (e.g. `std::collections::HashMap`). /// /// *This type is available only if Syn is built with the `"derive"` or `"full"` /// feature.* #[cfg_...
<|file_name|>converter.ts<|end_file_name|><|fim▁begin|>/** * Converts modlogs between text and SQLite; also modernizes old-format modlogs * @author Annika * @author jetou */ if (!global.Config) { let hasSQLite = true; try { require.resolve('better-sqlite3'); } catch (e) { hasSQLite = false; } global.Confi...
<|file_name|>delaybot.py<|end_file_name|><|fim▁begin|>#This bot was written by /u/GoldenSights for /u/FourMakesTwoUNLESS on behalf of /r/pkmntcgtrades. Uploaded to GitHub with permission. import praw import time import datetime import sqlite3 '''USER CONFIGURATION''' APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRE...
time.sleep(5) cur.execute('INSERT INTO oldposts VALUES(?)', [pid]) sql.commit()
<|file_name|>flogger3.py<|end_file_name|><|fim▁begin|># # FLOGGER # # This program reads records from the OGN network processing only # those received from a specified site and registration marks, eg aircraft belonging to # a specific club. # It writes each record to a database and at the end of each day process # the...
<|file_name|>facebook.rs<|end_file_name|><|fim▁begin|>use hyper; use hyper::net::NetworkListener; use hyper::server::Request; use hyper::server::Response; use hyper::uri::RequestUri; use hyper::header::AccessControlAllowOrigin; use rand::{self, Rng}; use serde_json; use std::collections::BTreeMap; use std::io::Read; us...
}
<|file_name|>test_meson.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2020 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 Softw...
self.assertThat( plugin.get_build_commands(), Equals(
<|file_name|>ILamiViewer.java<|end_file_name|><|fim▁begin|>///******************************************************************************* // * Copyright (c) 2015, 2016 EfficiOS Inc., Alexandre Montplaisir // * // * All rights reserved. This program and the accompanying materials are // * made available under the te...
<|file_name|>sequelize-models.js<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////// // // GENERATED CLASS // // DO NOT EDIT // // See sequelize-auto-ts for edits // //////////////////////////////////////////////////////////////////// var Sequelize = require('seque...
/*__ignore__*/ var __defineFieldType__; /*__ignore__*/ var __primaryTableName__; /*__ignore__*/ var __foreignTableName__; /*__ignore__*/ var __firstTableName__;
<|file_name|>UpdateFolderRequest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2020 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/license...
public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { onChanged();
<|file_name|>experimentService.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *...
id: string; enabled: boolean; state: ExperimentState; action?: IExperimentAction;
<|file_name|>metrics_service.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. //------------------------------------------------------------------------------ // Descripti...
// static void MetricsService::SetExecutionPhase(ExecutionPhase execution_phase, PrefService* local_state) { execution_phase_ = execution_phase;
<|file_name|>Repository.py<|end_file_name|><|fim▁begin|># # Jasy - Web Tooling Framework # Copyright 2010-2012 Zynga Inc. # import os import jasy.core.Console as Console import jasy.core.Util as Util import jasy.vcs.Git as Git import jasy.vcs.Svn as Svn def isUrl(url): """ Figures out whether the given stri...
:param url: Path to the local repository :type url: string
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import "C" import ( "fmt" "net" "strings" "github.com/jvermillard/nativedtls" ) func main() { ctx := nativedtls.NewServerDTLSContext() if !ctx.SetCipherList("PSK-AES256-CCM8:PSK-AES128-CCM8") { panic("impossible to set cipherlist") } svrAddr,...
if err != nil { panic(err) }
<|file_name|>SourceData.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) Anton Johansson <antoon.johansson@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 * * ...
* Defines source data.
<|file_name|>module-84-comp.component.spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { async, ComponentFixture, TestBed...
<|file_name|>point_of_sale.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redis...
<|file_name|>thss.rs<|end_file_name|><|fim▁begin|>#![cfg(test)] #![feature(test)] #![cfg(feature = "dss")] extern crate rusty_secrets; extern crate test; mod shared; mod thss { use rusty_secrets::dss::thss; use shared; use test::{black_box, Bencher}; macro_rules! bench_generate { ($name:ide...
let shares = &all_shares.into_iter().take($k).collect::<Vec<_>>().clone(); b.iter(|| {
<|file_name|>test_handlers.py<|end_file_name|><|fim▁begin|>import unittest import sys import inspect from robot.running.handlers import _PythonHandler, _JavaHandler, DynamicHandler from robot import utils from robot.utils.asserts import * from robot.running.testlibraries import TestLibrary from robot.running.dynamicme...
for method in _get_handler_methods(ArgInfoLibrary()): handler = _PythonHandler(LibraryMock(), method.__name__, method) args = handler.arguments
<|file_name|>run.rs<|end_file_name|><|fim▁begin|>use std::old_io::process::ExitStatus; use cargo::ops; use cargo::core::manifest::TargetKind; use cargo::util::{CliResult, CliError, human, Config}; use cargo::util::important_paths::{find_root_manifest_for_cwd}; #[derive(RustcDecodable)] struct Options { flag_bin: ...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 The Syncthing Authors. // // 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/. package main impor...
"log" "os" "github.com/syncthing/syncthing/lib/signature"
<|file_name|>exampleValues.ts<|end_file_name|><|fim▁begin|>import {Timestamp} from "../src/IonTimestamp"; import {Decimal} from "../src/IonDecimal"; import {load, Value} from "../src/dom"; // Used as a default filtering predicate in functions below function acceptAnyValue(_: any) : boolean { return true; } // A c...
"2020-03-19T23:01:01-08:00", "2020-03-19T11:30:30-08:00",
<|file_name|>macro-use-all-and-none.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apa...
// aux-build:two_macros.rs
<|file_name|>archive_test.py<|end_file_name|><|fim▁begin|># archive_test.py - unit tests for archive.py # Authors: # * Erich Blume <blume.erich@gmail.com> # # Copyright 2011 Erich Blume <blume.erich@gmail.com> # # This file is part of Tiger Lily. # # Tiger Lily is free software: you can redistribute it and/or mod...
<|file_name|>cells_search.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np from image_funcs import * from scipy.misc import imread, imsave<|fim▁hole|> ############################################################################### import scipy.misc nuclei = imread('3.jpg') nuclei = sci...
def grid(image, threshold):
<|file_name|>clone_on_copy.rs<|end_file_name|><|fim▁begin|>use clippy_utils::diagnostics::{span_lint_and_sugg, span_lint_and_then}; use clippy_utils::get_parent_node; use clippy_utils::source::snippet_with_context; use clippy_utils::sugg; use clippy_utils::ty::is_copy; use rustc_errors::Applicability; use rustc_hir::{B...
CLONE_ON_COPY, expr.span,
<|file_name|>describe_sql_log_files.go<|end_file_name|><|fim▁begin|>package rds //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 i...
// //http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>queryPages.spec.ts<|end_file_name|><|fim▁begin|>import queryPages from '../../lib/api/helpers/queryPages'; describe('query pages', () => {<|fim▁hole|> async (n) => { return { Value: n, Total: 5, }; }, ...
it('should be able to process multiple pages', async () => { const result = await queryPages(
<|file_name|>profile.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2005-2006 Ali Sabil <ali.sabil@gmail.com> # Copyright (C) 2007-2008 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify...
@type supports_secure_channel: bool @ivar supports_sip_invite: does the client supports SIP @type supports_sip_invite: bool
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#! ../env/bin/python from flask import Flask from webassets.loaders import PythonLoader as PythonAssetsLoader from appname import assets from appname.models import db from appname.controllers.main import main from appname.controllers.categories import categories f...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>""" 18. Using SQL reserved names Need to use a reserved SQL name as a column name or table name? Need to include a hyphen in a column or table name? No problem. Django quotes names appropriately behind the scenes, so your database won't complain about reserved-name u...
""" from django.db import models
<|file_name|>watcher_conf.py<|end_file_name|><|fim▁begin|>"""Gauge watcher configuration.""" # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (...
from faucet.conf import Conf
<|file_name|>mem.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
let mut r = BufReader::new(&buf); r.seek(10, SeekSet).unwrap();
<|file_name|>PersVinfo_src.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015 Convey Computer Corporation * * This file is part of the OpenHT jpegscale application. * * Use and distribution licensed under the BSD 3-clause license. * See the LICENSE file for the complete license text. */ #if defined(VERT) || d...
P_readIdx += 1; if (P_readIdx == P_readCnt) { HtContinue(VINFO_PNT_WGHT_IDX); } else
<|file_name|>UniVocityCsvDataFormatTest.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...
assertEquals('n', dataFormat.createAndConfigureParserSettings().getFormat().getNormalizedNewline());
<|file_name|>vl_siftdescriptor.cpp<|end_file_name|><|fim▁begin|>/** @internal ** @file vl_siftdescriptor_python.cpp ** @author Andrea Vedaldi ** @author Mikael Rousson (Python wrapping) ** @brief SIFT descriptor - MEX **/ #include "../py_vlfeat.h" extern "C" { #include <vl/mathop.h> #include <vl/sift....
int opt;
<|file_name|>AsmUtils.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2016 - 2030 youtongluan. * * 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/license...
} Class<?>[] paramTypes2 = m.getParameterTypes(); if (!Arrays.equals(paramTypes2, paramTypes)) { continue;
<|file_name|>outputclosuresource0.rs<|end_file_name|><|fim▁begin|>fn create_fn() -> Box<Fn()> { let text = "Fn".to_owned(); Box::new(move || println!("This is a: {}", text)) } fn create_fnmut() -> Box<FnMut()> { let text = "FnMut".to_owned(); Box::new(move || println!("This is a: {}", text))<|fim▁hol...
}
<|file_name|>issue-17121.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() {}
<|file_name|>ellipse.js<|end_file_name|><|fim▁begin|>/* Class: Graphic.Ellipse Shape implementation of an ellipse. Author: Sébastien Gruhier, <http://www.xilinus.com> License: MIT-style license. See Also: <Shape> */ Graphic.Ellipse = Class.create(); Object.extend(Graphic.Ellipse.prototype, Graphic.S...
},
<|file_name|>buttons.js.uncompressed.js<|end_file_name|><|fim▁begin|>define( "dojox/calendar/nls/fr/buttons", { previousButton: "◄", nextButton: "►", <|fim▁hole|> dayButton: "Jour", weekButton: "Semaine", fourDaysButton: "4 jours", monthButton: "Mois" } );<|fim▁end|>
todayButton: "Aujourd'hui",
<|file_name|>topologies.py<|end_file_name|><|fim▁begin|>from .topology import Master, OVS, Netns, Link from collections import OrderedDict def direct_veth(disable_offloading=False, **settings): m = Master() ns1 = Netns('x-ns1').add_to(m) ns2 = Netns('x-ns2').add_to(m) Link.declare((ns1, '10.112.1.1'...
<|file_name|>order.js<|end_file_name|><|fim▁begin|>$(document).ready(function() { //extract the data from the table var data = new Object(); $('tr').each(function(index, elem) { var sel = $(this).children(); data[sel.eq(0).text()] = sel.eq(1).text();<|fim▁hole|> // });<|fim▁end|>
}) // remove the table $('#data').remove();
<|file_name|>RegulatingControl.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2011 Richard Lincoln # # 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 restriction, including witho...
def getRegulationSchedule(self): """Schedule for this Regulating regulating control. """ return self._RegulationSchedule
<|file_name|>service.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../includes.ts"/> /// <reference path="kubernetesHelpers.ts"/> /// <reference path="kubernetesPlugin.ts"/> module Kubernetes { export var ServiceController = controller("ServiceController", ["$scope", "KubernetesModel", "KubernetesStat...
$scope.itemConfig = { properties: { '^\\/labels$': {
<|file_name|>CodeModelProvider.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2019 University of Hildesheim, Software Systems Engineering * * 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 Lice...
<|file_name|>runserver_plus.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function import logging import os import re import socket import sys import time import django from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mana...
from django.core.servers.basehttp import get_internal_wsgi_application from django.db import DEFAULT_DB_ALIAS, connections from django.db.backends import utils from django.db.migrations.executor import MigrationExecutor
<|file_name|>regicide.py<|end_file_name|><|fim▁begin|>import requests import hashlib import json import random import sys class ApiItemAmount(object): def __new__(self, item_type, amount): return {"type": item_type, "amount": amount} class SagaAPI(object): secret = "" episodeLengths = {} apiUr...
myScore = scoreList.values()[0][0]["value"] + 5000
<|file_name|>ex10_confParse.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import re from ciscoconfparse import CiscoConfParse def main():<|fim▁hole|> using the ciscoconfparse to find the crypto maps that are not using AES ''' cisco_file = 'cisco_ipsec.txt' cisco_cfg = CiscoConfParse(cisco_fil...
'''
<|file_name|>min_work_ex.py<|end_file_name|><|fim▁begin|>import numpy as np import numpy.random as rng import theano import theano.tensor as T from theano.tensor.nnet import conv2d minibatch = 3 image_height,image_width = 28,28 filter_height,filter_width = 3,3 n_filters = 1 n_channels = 1 n = 1/(np.sqrt(image_height...
<|file_name|>IBMConnectionsSocialGraph.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # dépendances import requests import xml.dom.minidom import sys import signal import os import getopt from queue import Queue from threading import Thread import time class SetQueue(Queue): def _...
except: continue userIds = dom.getElementsByTagName('snx:userid') for index, item, in enumerate(userIds):
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use parse_scene::parse_scene; use std::sync::Arc; use image_types::Color; use cgmath::{Point, Vector}; use cgmath::{Vector3, Point3, Ray3, Ray}; use cgmath::dot; use self::util::random_cos_around; pub use self::illuminator::Illuminator; pub use self::intersectable::Inter...
total_light
<|file_name|>bitcoin_gu_IN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="gu_IN" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Rsvcoin</sourc...
<translation type="unfinished"/> </message>
<|file_name|>modified-original-unit-tests.ts<|end_file_name|><|fim▁begin|>/* Copyright 2009+, GM_config Contributors (https://github.com/sizzlemctwizzle/GM_config) GM_config Collaborators/Contributors: Mike Medley <medleymind@gmail.com> Joe Simmons Izzy Soft Marti Martz Adam Thompson-Sharpe GM_con...
label: 'Alert Text',
<|file_name|>sbfDoxygen.py<|end_file_name|><|fim▁begin|># SConsBuildFramework - Copyright (C) 2013, Nicolas Papier. # Distributed under the terms of the GNU General Public License (GPL) <|fim▁hole|># as published by the Free Software Foundation. # Author Nicolas Papier import os from src.sbfRsync import createR...
<|file_name|>tabs.js<|end_file_name|><|fim▁begin|>define('jqueryui/tabs', ['jquery','jqueryui/core','jqueryui/widget'], function (jQuery) { /* * jQuery UI Tabs 1.8.16<|fim▁hole|> * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/lic...
*
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|># from test_plus.test import TestCase # # # class TestUser(TestCase): # # def setUp(self): # self.user = self.make_user() # # def test__str__(self): # self.assertEqual( # self.user.__str__(), # 'testuser' # This is...
# )
<|file_name|>test_serialization.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import os import base64 from kombu.serialization import registry from celery.exceptions import SecurityError from celery.security.serialization import SecureSerializer, register_auth from celery.security.certificat...
def test_lots_of_sign(self): for i in range(1000): rdata = base64.urlsafe_b64encode(os.urandom(265)) s = self._get_s(KEY1, CERT1, [CERT1])
<|file_name|>joinmesh.js<|end_file_name|><|fim▁begin|>var quickconnect = require('rtc-quickconnect'); var mesh = require('../../'); var Model = require('scuttlebutt/model'); module.exports = function(roomId, members, opts) { return function(t) { var model; var qc; t.plan(1);<|fim▁hole|> qc = quickco...
<|file_name|>Md5HashGenerator.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 un...
String newHash = generate(data); return newHash.equals(hash); }
<|file_name|>unique-fn-ret.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/l...
}
<|file_name|>MarkDeadlineUnfinishedCommand.java<|end_file_name|><|fim▁begin|>package seedu.address.logic.commands; import seedu.address.commons.core.IndexPrefix; import seedu.address.commons.exceptions.IllegalValueException; import seedu.address.model.Model; import seedu.address.model.task.DeadlineTask; import seedu.a...
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>/* Copyright (c) 2017 The swc Project Developers 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 restriction, including without limitation...
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- <|fim▁hole|>import os PATH = os.path.dirname(os.path.abspath(__file__))<|fim▁end|>
<|file_name|>jquery.colorbox.js<|end_file_name|><|fim▁begin|>/*! jQuery Colorbox v1.4.10 - 2013-04-02 (c) 2013 Jack Moore - jacklmoore.com/colorbox license: http://www.opensource.org/licenses/mit-license.php */ (function ($, document, window) { var // Default settings object. // See http://jacklmoore.com/...
if(speed===0){ // temporary workaround to side-step jQuery-UI 1.8 bug (http://bugs.jquery.com/ticket/12273)
<|file_name|>CommonHelper.java<|end_file_name|><|fim▁begin|>package com.hss01248.myvolleyplus.wrapper; import android.text.TextUtils; import android.util.Log; import com.hss01248.myvolleyplus.config.BaseNetBean; import com.hss01248.myvolleyplus.config.ConfigInfo; import com.hss01248.myvolleyplus.config.NetConf...
<|file_name|>string_io.py<|end_file_name|><|fim▁begin|># Copyright (c) 2007-2008 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limite...
and t0, rcx, rcx, flags=(EZF,), dataSize=asz br label("end"), flags=(CEZF,) # Find the constant we need to either add or subtract from rdi
<|file_name|>truss.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = "Matheus Marotzke" __copyright__ = "Copyright 2017, Matheus Marotzke" __license__ = "GPLv3.0" import numpy as np class Truss: """Class that represents the Truss and it's values""" def __init__(self, nodes, elements): ...
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>/* eslint-disable local/html-template */ const documentModes = require('./document-modes'); const {AmpState, ampStateKey} = require('./amphtml-helpers'); const {html, joinFragments} = require('./html'); const jsModes = [ { value: 'default', description: `...
const JsModeSelector = ({jsMode}) =>
<|file_name|>MathBold.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:ba70bb48cb8b3fa4039462224a789adb71a3ff64f8c3c3da603a633299e783af size 2528
<|file_name|>tests_f64.rs<|end_file_name|><|fim▁begin|>use super::Interval; type B = f64; type IV = Interval<B>; const PREC: usize = 2; macro_rules! assert_str_eq { ($x:expr, $y:expr) => { assert_eq!($x, format!("{}", $y)) }; ($x:expr, $y:expr, $($arg:tt)+) => { assert_eq!($x, format!("{}", $y), $($arg)+) };...
("m", "true"), ("z", "true"), ("p0", "true"),
<|file_name|>SitemapProviderImpl.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010-2015, openHAB.org and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is availa...
<|file_name|>reader.rs<|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 the Apa...
/// Batch size (number of records to load each time) /// /// The default batch size when using the `ReaderBuilder` is 1024 records batch_size: usize,
<|file_name|>ch5_1.py<|end_file_name|><|fim▁begin|>""" 5.1 - Probabilistic Modeling: Error Propagation ================================================ In this example we will show how easy we can propagate uncertainty from GemPy parameters to final structural models. """ # %% import sys, os sys.path.append("../../g...
p2d.axes[0].vlines(9e3, .5e3, well_2, linewidth=4, color='gray') p2d.axes[0].vlines(3e3, .5e3, well_1)