prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>super.calibrate.py<|end_file_name|><|fim▁begin|># #calibrate.py # #calibrate fits images using darks, flats, and bias frames #corrected image = (image - bias - k(dark-bias))/flat #for k=1, i.e. image exp = dark exp, corrected image = (image - dark)/flat import os import glob import math import subprocess ...
#master bias frame #folder with bias component frames *including* ending forward slash bias_path='./bias/'
<|file_name|>DTRAM_estimator.py<|end_file_name|><|fim▁begin|># This file is part of PyEMMA. # # Copyright (c) 2015-2017 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License ...
sliding=self.count_mode, sparse_return=False, nstates=self.nstates_full)
<|file_name|>base.py<|end_file_name|><|fim▁begin|>############################################################################## # adaptiveMD: A Python Framework to Run Adaptive Molecular Dynamics (MD) # Simulations on HPC Resources # Copyright 2017 FU Berlin and the Authors # # Authors: Jan-Hendrik Prinz #...
<|file_name|>overlay_test.go<|end_file_name|><|fim▁begin|>// +build linux package overlay import ( "testing" "github.com/containers/storage/drivers" "github.com/containers/storage/drivers/graphtest" "github.com/containers/storage/pkg/archive" ) func init() { // Do not sure chroot to speed run time and allow ar...
func BenchmarkExists(b *testing.B) { graphtest.DriverBenchExists(b, "overlay") }
<|file_name|>RPG game base v0.36.cpp<|end_file_name|><|fim▁begin|>//Created by: Jack Melvin //RPG game //v0.36 //Rules of the program //Variables are lowercase. //Functios start with upper case per word //Known Bugs //Hp doesnt raise after you talk with the inn keeper. //doom doesnt kill you. //Always glanceing blow....
MainMenu(); break;
<|file_name|>traits.rs<|end_file_name|><|fim▁begin|>use {Vec2, Vec3, Vec4, Mat2, Mat3, Mat4, Quaternion}; use std::ops::{Add, Sub, Mul, Div}; use std::ops::{AddAssign, SubAssign, MulAssign, DivAssign}; use std::ops::{Neg}; use std::cmp::{PartialEq, PartialOrd}; /// Allows us to be generic over numeric types in vector...
<|file_name|>test_hostname.py<|end_file_name|><|fim▁begin|>from insights.parsers.hostname import Hostname from insights.tests import context_wrap HOSTNAME = "rhel7.example.com" HOSTNAME_SHORT = "rhel7" def test_hostname(): data = Hostname(context_wrap(HOSTNAME)) assert data.fqdn == "rhel7.example.com" as...
<|file_name|>context.go<|end_file_name|><|fim▁begin|>package shared import ( "bytes" "fmt" "text/template" "github.com/envoyproxy/protoc-gen-validate/validate" pgs "github.com/lyft/protoc-gen-star" "google.golang.org/protobuf/proto" ) type RuleContext struct { Field pgs.Field Rules proto.Messag...
ruleType, rule, wrapped = "fixed64", r.Fixed64, false case *validate.FieldRules_Sfixed32:
<|file_name|>creation.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOME...
# PostGIS 2.0 does not support GIST_GEOMETRY_OPS. So, on 1.5 # we use GIST_GEOMETRY_OPS, on 2.0 we use either "nd" ops # which are fast on multidimensional cases, or just plain
<|file_name|>kill_ps.go<|end_file_name|><|fim▁begin|>// +build darwin freebsd,amd64 linux solaris windows freebsd,arm freebsd,arm64 package clipboard import ( ps "github.com/mitchellh/go-ps" ) // killPrecedessors will kill any previous "gopass unclip" invocations to avoid // erasing the clipboard prematurely in cas...
func killPrecedessors() error { procs, err := ps.Processes()
<|file_name|>db.rs<|end_file_name|><|fim▁begin|>use postgres::{Connection, TlsMode}; use postgres::types::ToSql; use postgres::error as sqlerr; use getopts; pub fn build (matches: &getopts::Matches) { if matches.opt_present("i") { let user = matches.opt_str("u").unwrap_or("postgres".to_owned()); le...
<|file_name|>JMXClassLoaderMBean.java<|end_file_name|><|fim▁begin|>/* * ProActive Parallel Suite(TM): * The Open Source library for parallel and distributed * Workflows & Scheduling, Orchestration, Cloud Automation * and Big Data Analysis on Enterprise Grids & Clouds. * * Copyright (c) 2007 - 2017 ActiveEon * Co...
* You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * If needed, contact us to obtain a release under GPL Version 2 or 3
<|file_name|>ishared.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 v...
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework_gis.serializers import GeoFeatureModelSerializer from districts.models import AlderDistrict class DistrictSerializer(GeoFeatureModelSerializer): """ Geo Serialize the district model<|fim▁hole|> class Meta: model = AlderDis...
"""
<|file_name|>cargo_clean.rs<|end_file_name|><|fim▁begin|>use crate::core::InternedString; use std::collections::HashMap; use std::fs; use std::path::Path; use crate::core::compiler::unit_dependencies; use crate::core::compiler::{BuildConfig, BuildContext, CompileKind, CompileMode, Context}; use crate::core::compiler::...
for spec in opts.spec.iter() { // Translate the spec to a Package let pkgid = resolve.query(spec)?;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![warn(missing_docs)] #![crate_name="itertools"] #![cfg_attr(not(feature = "use_std"), no_std)] //! Extra iterator adaptors, functions and macros. //! //! To extend [`Iterator`] with methods in this crate, import //! the [`Itertools` trait](./trait.Itertools.html): //!...
<|file_name|>LAM_MPI_SSI_COLL_SHMEM_NUM_SEGMENTS.cc<|end_file_name|><|fim▁begin|>/* ## Copyright (C) 2004-2007 Javier Fernández Baldomero, Mancia Anguita López ## ## This program is free software ## ---------------------------------------------------- ## Author: Javier Fernández Baldomero <jfernand@ugr.es>, Mancia Angu...
* ----------------------------------------------------
<|file_name|>IN.py<|end_file_name|><|fim▁begin|># Generated by h2py from /usr/include/netinet/in.h _NETINET_IN_H = 1 # Included from features.h _FEATURES_H = 1 _ISOC95_SOURCE = 1 _ISOC99_SOURCE = 1 _ISOC11_SOURCE = 1 _POSIX_SOURCE = 1 _POSIX_C_SOURCE = 200809L _XOPEN_SOURCE = 700 _XOPEN_SOURCE_EXTENDED = 1 _LARGEFILE6...
STA_PPSJITTER = 0x0200 STA_PPSWANDER = 0x0400 STA_PPSERROR = 0x0800 STA_CLOCKERR = 0x1000
<|file_name|>rottentomatoes_lookup.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from past.builtins import basestring import logging from flexget import plugin from flexget.event import...
'rt_runtime': 'runtime', 'rt_critics_consensus': 'critics_consensus', 'rt_releases': lambda movie: dict((release.name, release.date) for release in movie.release_dates),
<|file_name|>eventlet_backdoor.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
from __future__ import print_function
<|file_name|>CLogBookScreen.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <memory> #include <utility> #include <vector> #include "Runtime/CSaveWorld.hpp" #include "Runtime/CToken.hpp" #include "Runtime/rstl.hpp" #include "Runtime/MP1/CPauseScreenBase.hpp" namespace metaforce { class CPlayerState; class CSca...
int NextSurroundingArticleIndex(int cur) const; bool IsArtifactCategorySelected() const; int GetSelectedArtifactHeadScanIndex() const;
<|file_name|>jquery-css.js<|end_file_name|><|fim▁begin|>/*! * jQuery JavaScript Library v1.8.3 -css,-effects,-offset,-dimensions * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2012 jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/li...
var type = jQuery.type( arg ); if ( type === "function" ) { if ( !options.unique || !self.has( arg ) ) {
<|file_name|>binary_tree.py<|end_file_name|><|fim▁begin|>from . import tree class Node: def __init__(self, container, parent, value=None): self._node = tree.Node(container, parent, value) @property def _container(self): return self._node._container @property def id(self): ...
def sync(self):
<|file_name|>ptr.rs<|end_file_name|><|fim▁begin|>/*! Typed virtual address. */ use std::{cmp, fmt, hash, mem, str}; use std::marker::PhantomData; use crate::Pod; use super::image::{Va, SignedVa}; /// Typed virtual address. #[repr(transparent)] pub struct Ptr<T: ?Sized = ()> { va: Va, marker: PhantomData<fn() -> T...
<|file_name|>generator.rs<|end_file_name|><|fim▁begin|>// a lot of the source of this file is the same as main.rs // but instead of tweeting, it just prints to stdout extern crate rand; use rand::{thread_rng, ThreadRng}; // these files are paths to plain-text lists of the various word types // these paths assume you...
const ABSTRACTS_FILENAME: &str = "resources/abstracts.txt";
<|file_name|>status_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Un...
<|file_name|>setupapi.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the Windows Setupapi log parser.""" from __future__ import unicode_literals import unittest from plaso.parsers import setupapi from tests.parsers import test_lib class SetupapiLogUnitTest(test_lib.Par...
self.CheckTimestamp(event.timestamp, '2015-11-22 17:59:28.110000')
<|file_name|>renderer.js<|end_file_name|><|fim▁begin|>const { ipcRenderer, remote } = require('electron'); const mainProcess = remote.require('./main'); const currentWindow = remote.getCurrentWindow(); const $name = $('.name-input'); const $servings = $('.servings-input'); const $time = $('.time-input'); const $ingred...
let time = $time.val();
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> fn main() { println!("cargo:rustc-flags=-l vccomsup");<|fim▁hole|><|fim▁end|>
}
<|file_name|>run_trf_2.py<|end_file_name|><|fim▁begin|>import os import sys import numpy as np import matplotlib.pyplot as plt sys.path.insert(0, os.getcwd() + '/../../tools/') import wb import trf import wer def process_nbest(fread, fwrite): nEmptySentNum = 0 with open(fread, 'rt') as f1, open(fwrite, 'wt') ...
nbest_root = 'data/nbest/'
<|file_name|>bfs.rs<|end_file_name|><|fim▁begin|>use std::collections::VecDeque; pub fn bfs<F, GT: ::graph::GraphTraversal>(g: &GT, s: usize, mapped_function: &mut Box<F> ,marker: &mut ::mark::Marker) where F: FnMut(usize) { let mut q: VecDeque<usize> = VecDeque::new(); q.push_back(s); marker.mark(s);<|fim▁...
loop { if let Some(u) = q.pop_front() { mapped_function(u); q.extend(g.fwd_edges(u).iter().filter_map(|&x| {
<|file_name|>wrapping_div.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { // macro_rules! int_impl { // ($ActualT:ty, $UnsignedT:ty, $BITS:expr, // $add_with_overflow:path, // $sub_with_overflow:path, // $mul_with_overflow:path) => { ...
// pub fn from_be(x: Self) -> Self {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>''' Created on Oct 19, 2016 @author: jaime ''' from django.conf.urls import url from django.views.decorators.csrf import csrf_exempt from products import views urlpatterns = [ url(r'^categories/$', csrf_exempt(views.ProductCategoryView.as_view())),<|fim▁hole|> ...
url(r'^categories/(?P<uid>\w+)/$', csrf_exempt(views.ProductCategoryView.as_view())), url(r'^$', csrf_exempt(views.ProductView.as_view())), url(r'^(?P<uid>\w+)/$', csrf_exempt(views.ProductView.as_view())),
<|file_name|>cascade.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/. */ //! The main cascading algorithm of the style system. use c...
if !self.seen.contains(LonghandId::XLang) && !self.seen.contains(LonghandId::FontFamily) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod family; pub mod grocery_shop;<|fim▁hole|>pub mod mill; pub mod bakery; pub mod neighboring_town_trade;<|fim▁end|>
pub mod grain_farm; pub mod cow_farm; pub mod vegetable_farm;
<|file_name|>QLearningRoutingAlgorithm.java<|end_file_name|><|fim▁begin|>package adasim.algorithm.routing; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.LinkedList; import java.ut...
<|file_name|>EmailValidatorTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * This file is part of OpenNMS(R). *<|fim▁hole|> * Copyright (C) 2016-2016 The OpenNMS Group, Inc. * OpenNMS(R) is Copyright (C) 1999-2016 The OpenNMS Group, Inc. * * O...
<|file_name|>backtrace-debuginfo-aux.rs<|end_file_name|><|fim▁begin|>// run-pass // ignore-test: not a test, used by backtrace-debuginfo.rs to test file!() <|fim▁hole|>#[inline(never)] pub fn callback<F>(f: F) where F: FnOnce((&'static str, u32)) { f((file!(), line!())) } // We emit the wrong location for the call...
<|file_name|>toaster.js<|end_file_name|><|fim▁begin|>'use strict'; /* * AngularJS Toaster * Version: 0.4.4 * * Copyright 2013 Jiri Kavulak. * All Rights Reserved. * Use, reproduction, distribution, and modification of this code is subject to the terms and * conditions of the MIT license, available at http:...
function setTimeout(toast, time) {
<|file_name|>complex.rs<|end_file_name|><|fim▁begin|>extern crate iron; extern crate session;<|fim▁hole|>extern crate rustc_serialize; use iron::prelude::*; use session::*; // To run, $ cargo run --example complex // to use, $ curl "http://localhost:3000/login" // $ curl "http://localhost:3000/show_count" // ...
<|file_name|>package.js<|end_file_name|><|fim▁begin|>// package metadata file for Meteor.js Package.describe({ name: 'startup-cafe', "author": "Dragos Mateescu <dmateescu@tremend.ro>", "licenses": [ { "type": "MIT", "url": "http://opensource.org/licenses/MIT" } ], "scripts": { }, "en...
"grunt-stripmq": "0.0.6", "grunt-wp-assets": "~0.2.6", "load-grunt-tasks": "~0.6.0", "time-grunt": "~0.3.2",
<|file_name|>syllabifier.py<|end_file_name|><|fim▁begin|># # Retrieved from: https://svn.code.sf.net/p/p2tk/code/python/syllabify/syllabifier.py # on 2014-09-05. # # According to https://www.ling.upenn.edu/phonetics/p2tk/, this is licensed # under MIT. # # This is the P2TK automated syllabifier. Given a string of phon...
ret = [] for syl in syllables :
<|file_name|>random.cc<|end_file_name|><|fim▁begin|>// random -*- C++ -*- // Copyright (C) 2012-2015 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as pub...
return; } }
<|file_name|>currency.rs<|end_file_name|><|fim▁begin|>use protocol::FIXValue; /// ISO 4271 currency code #[derive(Clone, Debug, Eq, PartialEq)] pub enum Currency { /// UAE Dirham AED, /// Afghani AFN, /// Lek ALL, /// Armenian Dram AMD, /// Netherlands Antillean Guilder ANG, ...
b"SLL" => Some(Currency::SLL), b"SOS" => Some(Currency::SOS), b"SRD" => Some(Currency::SRD),
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/* istanbul ignore file */ /** * @module mugshot<|fim▁hole|>export * from './lib/webdriver-screenshotter'; export * from './interfaces/png-differ'; export * from './interfaces/png-processor'; export * from './interfaces/screenshot-storage'; export * from './interfaces...
*/ export * from './lib/mugshot'; export * from './interfaces/webdriver';
<|file_name|>GLExtensions.cpp<|end_file_name|><|fim▁begin|>// Copyright 2013 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #include <sstream> #include <unordered_map> #include "Common/GL/GLInterfaceBase.h" #include "Common/GL/GLExtensions/GLExtensions.h" #include "Common...
GLFUNC_SUFFIX(glBindVertexArray, APPLE, "GL_APPLE_vertex_array_object !GL_ARB_vertex_array_object"), GLFUNC_SUFFIX(glDeleteVertexArrays, APPLE, "GL_APPLE_vertex_array_object !GL_ARB_vertex_array_object"), GLFUNC_SUFFIX(glGenVertexArrays, APPLE, "GL_APPLE_vertex_array_object !GL_ARB_vertex_array_object"),
<|file_name|>transport.go<|end_file_name|><|fim▁begin|>package net import ( "io" ) const ( bufferSize = 4 * 1024 ) // ReaderToChan dumps all content from a given reader to a chan by constantly reading it until EOF. func ReaderToChan(stream chan<- []byte, reader io.Reader) error { for { buffer := make([]byte, bu...
<|file_name|>master.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/...
<|file_name|>client_test.go<|end_file_name|><|fim▁begin|>package kube_test import ( . "github.com/emc-advanced-dev/layerx/layerx-k8s-rpi/kube"<|fim▁hole|> "fmt" "github.com/Sirupsen/logrus" core_fakes "github.com/emc-advanced-dev/layerx/layerx-core/fakes" "github.com/emc-advanced-dev/layerx/layerx-core/layerx_rpi_...
<|file_name|>dota2.js<|end_file_name|><|fim▁begin|>import chai from 'chai'; import nock from 'nock'; import path from 'path'; import dota from '../../src/commands/games/dota2'; import { loadFixtures } from '../_helpers'; chai.should(); const FIXTURES = loadFixtures(path.join(__dirname, '../fixtures/dota2/')); descr...
<|file_name|>Start Session.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.6 import sys, os, cinesync if len(sys.argv) == 1: print >>sys.stderr, 'Usage: %s <file.mov> ...' % sys.argv[0] sys.exit(1)<|fim▁hole|>session = cinesync.Session() session.media = [cinesync.MediaFile(path) for path in sys.argv[1:]] ...
# Create the session and add media from command-line arguments
<|file_name|>webstream.go<|end_file_name|><|fim▁begin|>package photostream import ( "errors" "fmt" "time" ) // WebStreamItemDerivative represents the one of the sizes // (derivatives) available for this particular media item type WebStreamItemDerivative struct { Checksum string `mapstructure:"checksum"` Size ...
// for a certain period of time, and so this function will give you // a cached version upon calling the function again. When the data // is about to expire (in the next 5 minutes) it will make a new // request for fresh information. WebStreamItemDerivative.GetURLs()
<|file_name|>misc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2018 Jonathan Peirce # Distributed under the terms of the GNU General Public License (GPL).<|fim▁hole|> """Wrapper for all miscellaneous functions and classes from psychopy.too...
<|file_name|>marm2.py<|end_file_name|><|fim▁begin|>from rsf.proj import * from math import * import fdmod,pcsutil,wefd def data(par): # ------------------------------------------------------------ Fetch('vp_marmousi-ii.segy',"marm2") Fetch('vs_marmousi-ii.segy',"marm2") Fetch('density_marmousi-ii.segy...
smooth rect1=100 repeat=1 | scale axis=123 | transp |
<|file_name|>actions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from pisi.actionsapi import shelltools, get, autotools, pisitools <|fim▁hole|>def build(): autotools.make () def install(): autotools.rawInstall ("DESTDIR=%s" % get.installDIR()) pisitools.dodoc ("README", "ChangeLog", "LICENSE")<|f...
def setup(): autotools.configure ("--prefix=/usr\ --disable-static")
<|file_name|>on_disk.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use crate::{tests::suite, OnDiskStorage, Storage}; use diem_temppath::TempPath; #[test] fn on_disk() { let path_buf = TempPath::new().path().to_path_buf(); let mut storage = Storage::from(OnDiskStorage::new(path_buf)); suite::execute_all_stor...
// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0
<|file_name|>plugin_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apach...
self.debugger_plugin._serve_health_pills_helper(request).status_code)
<|file_name|>bench.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import pack_command import pack_command_python import timeit import cProfile import pstats import pycallgraph def format_time(seconds): v = seconds <|fim▁hole|> if v * 1000 * 1000 * 1000 < 1000: scale = u'ns' v = int(ro...
<|file_name|>step_remote_upload.go<|end_file_name|><|fim▁begin|>package iso import ( "fmt" "github.com/mitchellh/multistep" vmwcommon "github.com/mitchellh/packer/builder/vmware/common" "github.com/mitchellh/packer/packer" "log"<|fim▁hole|>) // stepRemoteUpload uploads some thing from the state bag to a remote d...
<|file_name|>App.js<|end_file_name|><|fim▁begin|>import React from 'react'; import styles from './App.less'; import withContext from '../../decorators/withContext'; import withStyles from '../../decorators/withStyles'; import Rankinglist from '../Rankinglist/Rankinglist'; @withContext @withStyles(styles) class App { ...
</div>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .working_gif import working_encoded from .splash import SplashScreen, Spinner, CheckProcessor from .multilistbox import MultiListbox <|fim▁hole|><|fim▁end|>
from .utils import set_widget_state, set_binding, set_button_action, set_tab_order from .tooltip import ToolTip
<|file_name|>jquery.js<|end_file_name|><|fim▁begin|>/* * jQuery JavaScript Library v1.10.1 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2013-05-...
<|file_name|>CiudadService.java<|end_file_name|><|fim▁begin|>/** * */ package co.innovate.rentavoz.services.ciudad; import java.util.List; import co.innovate.rentavoz.model.Ciudad; import co.innovate.rentavoz.model.Departamento; import co.innovate.rentavoz.services.GenericService; /** * @author <a href="mailto:e...
<|file_name|>imutils_test.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from ..imutils import nan_to_zero, quantile_threshold, interpolate class ImutilsTest(unittest.TestCase): def test_nan_to_zero_with_ge_zero(self): ids = ( np.zeros(1), np.ones(range(1, 10)...
q_actual = quantile_threshold(**kwargs)
<|file_name|>check_privilege_dbadm.py<|end_file_name|><|fim▁begin|>class check_privilege_dbadm(): """ check_privilege_dbadm: The DBADM (database administration) role grants the authority to a user to perform<|fim▁hole|> to authorized users only. """ # References: # https://benchmarks.cisecur...
administrative tasks on a specific database. It is recommended that dbadm role be granted
<|file_name|>WolframAlphaLookup.py<|end_file_name|><|fim▁begin|>import sublime, sublime_plugin, requests from xml.etree import ElementTree as ET class WolframAlphaLookupCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings("Preferences.sublime-settings") if...
items.append([title, plaintext])
<|file_name|>tuple_combinations.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate test; extern crate itertools; use test::{black_box, Bencher}; use itertools::Itertools; // aproximate 100_000 iterations for each combination const N1: usize = 100_000; const N2: usize = 448; const N3: usize = 86; const N4...
<|file_name|>bitcoin_es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="14"/> <source>About Bitcoin</source> ...
<translation>Error al codificar la URI en el código QR.</translation> </message> <message> <location filename="../qrcodedialog.cpp" line="63"/>
<|file_name|>IPmdViolation.ts<|end_file_name|><|fim▁begin|>import { IPmdViolationMetaData } from "./IPmdViolationMetaData"; /** * PHP mess detector violation interface * * @module vscode-phpmd/server/model/pmd * @author Sandhjé Bouw (sandhje@ecodes.io) */ export interface IPmdViolation { /** * ...
<|file_name|>encoders.py<|end_file_name|><|fim▁begin|>import json from decimal import Decimal class CustomEncoder(json.JSONEncoder): def default(self, object): if isinstance(object, set):<|fim▁hole|> if object % 1 > 0: return float(object) else: retur...
return list(object) if isinstance(object, Decimal):
<|file_name|>issue-17651.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...
<|file_name|>common_oauth_callback.js<|end_file_name|><|fim▁begin|>"use strict"; let User = require("../../../../persistence").models.User; let debug = require("debug")("app:auth"); module.exports = (findUserEntity, createUserEntity, methodName) => { return (tokenA, tokenB, profile, done) => { return User....
debug(`error authenticating via ${methodName}`, err); done(err, null); });
<|file_name|>config_loader.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017 Joshua Charles Campbell # 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 Fo...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>column.rs<|end_file_name|><|fim▁begin|>use std::mem; use std::fmt::Debug; use std::fmt::Display; use std::fmt::Formatter; use std::fmt; use std::str; use std::slice; use cql_bindgen::CASS_VALUE_TYPE_ASCII; use cql_bindgen::CASS_VALUE_TYPE_VARCHAR; use cql_bindgen::CASS_VALUE_TYPE_TEXT; use cql_bindgen::CA...
for item in self.set_iter().unwrap() { try!(write!(f, "SET {:?}", item )) }
<|file_name|>widget.py<|end_file_name|><|fim▁begin|>shader_code = """ <script id="orbit_shader-vs" type="x-shader/x-vertex"> uniform vec3 focus; uniform vec3 aef; uniform vec3 omegaOmegainc; attribute float lintwopi; varying float lin; uniform mat4 mvp; const float M_PI = 3.14159265359; ...
<|file_name|>notification_service.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/monitoring/v3/notification_service.proto package monitoring // import "google.golang.org/genproto/googleapis/monitoring/v3" import proto "github.com/golang/protobuf/proto" import fmt...
<|file_name|>audio.component.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
//# sourceMappingURL=audio.component.js.map
<|file_name|>PyLocale.py<|end_file_name|><|fim▁begin|>""" A location-aware script to manage ringer volume """ __author__ = 'Marco Bonifacio <bonifacio.marco@gmail.com>' __license__ = 'MIT License' import android import time # Parameters SSID = {'bonix-lan': 'casa', 'ZENIT SECURED WPA': 'lavoro'} RINGER = {'c...
Args: droid: an Android instance. state: a string, the present state.
<|file_name|>test_lazymod.py<|end_file_name|><|fim▁begin|>"""Test lazymod.py""" import sys import unittest from capa.safe_exec.lazymod import LazyModule class ModuleIsolation(object): """ Manage changes to sys.modules so that we can roll back imported modules. Create this object, it will snapshot the c...
# Each test will remove modules that it imported.
<|file_name|>PlanUtils.ts<|end_file_name|><|fim▁begin|>import {ProjectEditor, EditProject} from "@atomist/rug/operations/ProjectEditor" import {Project} from "@atomist/rug/model/Project" import {Edit,Instruction,HandleCommand, Respondable, Execute} from "@atomist/rug/operations/Handlers" /** * Build a plan instructio...
* @param p project or name of project to edit * @param ed editor to use */ export function editWith(p: Project | string, ed: EditProject | ProjectEditor): Edit {
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the ...
# along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>euler_17.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python -Wall # -*- coding: utf-8 -*- """ <div id="content"> <div style="text-align:center;" class="print"><img src="images/print_page_logo.png" alt="projecteuler.net" style="border:none;" /></div><|fim▁hole|><p>If all the numbers from 1 to 1000 (one thous...
<h2>Number letter counts</h2><div id="problem_info" class="info"><h3>Problem 17</h3><span>Published on Friday, 17th May 2002, 06:00 pm; Solved by 88413; Difficulty rating: 5%</span></div> <div class="problem_content" role="problem"> <p>If the numbers 1 to 5 are written out in words: one, two, three, four, five, then th...
<|file_name|>Context.java<|end_file_name|><|fim▁begin|>/* This file is part of SableCC ( http://sablecc.org ). * * See the NOTICE file distributed with this work for copyright information. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
public class Context {
<|file_name|>fields.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ couchbasekit.fields ~~~~~~~~~~~~~~~~~~~ :website: http://github.com/kirpit/couchbasekit :copyright: Copyright 2013, Roy Enjoy <kirpit *at* gmail.com>, see AUTHORS.txt. :license: MIT, see LICENSE.txt for details. * :class:`couchbasekit.fiel...
password = bcrypt.hashpw(password, bcrypt.gensalt(self.LOG_ROUNDS)) self.value = password
<|file_name|>dvs_securitygroup_rpc.py<|end_file_name|><|fim▁begin|># Copyright 2015 Mirantis, 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 # # htt...
self._devices_to_update = self._devices_to_update - device_ids
<|file_name|>tests_utils.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import Group from django.core import mail from django.urls import reverse from django.test import TestCase from django.conf import settings from zds.member.factories import ProfileFactory from zds.mp.models import PrivateTopic cl...
<|file_name|>171.py<|end_file_name|><|fim▁begin|>import copy class Solution: # @param strs: A list of strings # @return: A list of strings def anagrams(self, strs): # write your code here str1=copy.deepcopy(strs) def hashLize(s): dicts1= dict() for i i...
for i in range(len(strs)): str_s1=sortLize(strs[i]) if str_s1 in check_dict.keys(): check_dict[str_s1].append(strs[i])
<|file_name|>writeFunsTemplates.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | foam-extend: Open Source CFD \\ / O peration | \\ / A nd | For copyright notice see fil...
const vtkTopo& topo = vMesh.topo();
<|file_name|>tests.js<|end_file_name|><|fim▁begin|>describe("twitter plugin", function () { xit("works", function () { expect(function () { var plugins = require("../index.js").convert, assert = require("assert"); var goodURLs = [ "https://twitter.com/davidmerfieId/status/500323409218...
<|file_name|>messages.js<|end_file_name|><|fim▁begin|><|fim▁hole|> const Messages = t.list(Message, 'Messages') module.exports = Messages<|fim▁end|>
const t = require('tcomb') const Message = require('./message')
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'ghost' import random import string import os import datetime import logging def allowed_file(file, allowed_extensions): """ :param file: file name :param allowed_extensions: file extension ...
<|file_name|>uppercase.js<|end_file_name|><|fim▁begin|>var through = require('through2') module.exports = function (filename) { return through(function (buf, enc, next) { next(null, buf.toString().toUpperCase()) })<|fim▁hole|><|fim▁end|>
}
<|file_name|>priority_queue.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2014, Randolph Voorhies, Shane Grant 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 sourc...
auto & o_podpriority_queue_c = cereal::queue_detail::container(o_podpriority_queue); auto & o_iserpriority_queue_c = cereal::queue_detail::container(o_iserpriority_queue);
<|file_name|>variables_3.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var searchData= [ ['left',['left',['../struct__bst__node.html#ac33950f6c4a6e2bbe1674d0c7436b30f',1,'_bst_node']]] ];
<|file_name|>move_document.py<|end_file_name|><|fim▁begin|>from documents.models import Document from categories.models import Category import os def move_doc(doc_id, cat_id): doc = Document.objects.get(pk=int(doc_id)) old_cat = doc.refer_category<|fim▁hole|> os.system(cmd) doc.refer_category = new...
new_cat = Category.objects.get(pk=int(cat_id)) for p in doc.pages.all(): cmd = "mv " + p.get_absolute_path() + " " + new_cat.get_absolute_path() + "/"
<|file_name|>filter_tree.rs<|end_file_name|><|fim▁begin|>use filter::Filter; use filter::CompOp; use filter::Attribute; use regex_filter::RegexFilter; use name_filter::EqualNameFilter; use name_filter::EqualBasenameFilter; use size_filter::SizeFilter; use time_filter::TimeFilter; use filetype_filter::FiletypeFilter; us...
eprintln!("Cannot have an expression without a left hand side!"); process::exit(1);
<|file_name|>component.js<|end_file_name|><|fim▁begin|>(function(){ angular.module('form', ['participants']) .component('formComp', { templateUrl: 'components/form/template.html', bindings: { addParticipant: '<' }, controller: function(Participants){<|fim▁hole|> this.submit ...
this.participant = {};
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Virtual environment (venv) package for Python. Based on PEP 405. Copyright (C) 2011-2014 Vinay Sajip. Licensed to the PSF under a contributor agreement. """ import logging import os import shutil import subprocess import sys import types logger = logging.getLo...
def setup_python(self, context): """ Set up a Python executable in the environment.
<|file_name|>async-generator-issue-67158.rs<|end_file_name|><|fim▁begin|>#![feature(generators)] // edition:2018 // Regression test for #67158. fn main() {<|fim▁hole|>}<|fim▁end|>
async { yield print!(":C") }; //~ ERROR `async` generators are not yet supported
<|file_name|>issue-2804.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org...
println!("Expected list for {} interfaces, found {:?}", managed_ip, device.get(&"interfaces".to_string())); Vec::new() }