prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ipython.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2011 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """IPython v0.11+ Plugin""" from spyderlib.qt.QtGui import QHBoxLayout # Local imports from spyderlib.wid...
"""Register plugin in Spyder's main window"""
<|file_name|>IOMDataService.py<|end_file_name|><|fim▁begin|>import shelve """ Currently unused. All mysql queries are now done via IomDataModels. May be resurrected to help with shelve and pickles """ from USCProjectDAOs import IOMProjectDAO class IOMService(IOMProjectDAO): """ This handles interactions wit...
# def get_data_from_database(self, query, val):
<|file_name|>console.js<|end_file_name|><|fim▁begin|>'use strict'; const util = require('util'); const colors = require('colors/safe'); Object.entries({ info: colors.blue, warn: colors.yellow, error: colors.red }).map(([method, color]) => { const _ = global.console[method]; global.console[method] ...
<|file_name|>e1138_unsupported_delete_operation.py<|end_file_name|><|fim▁begin|>from typing import List class NamedList: """A contaner class for storing a list of named integers.""" def __init__(self, names: List[str], values: List[int]) -> None: self._names = names self._values = values ...
idx = self._names.index(name) return self._values[idx]
<|file_name|>fetchbot.py<|end_file_name|><|fim▁begin|>from praw import Reddit import json import os import time import datetime from .tools import storage from .tools import display class FetchBot: """Bot to fetch the subreddit data.""" def __init__(self, user_agent, subreddit, data_file): """Basic...
storage.dict_check_key(self._data[key], 'time', dict()) storage.dict_check_key(self._data[key]['time'], 'all', dict()) storage.dict_check_key(self._data[key]['time'], '0', dict())
<|file_name|>cookies.js<|end_file_name|><|fim▁begin|>// eslint-disable-next-line function getCookie(cname) { const name = `${cname}=`; const ca = document.cookie.split(';'); for (let i = 0; i < ca.length; i += 1) { let c = ca[i]; while (c.charAt(0) === ' ') c = c.substring(1); if (c.indexOf(name) !== ...
} return ''; }
<|file_name|>table-list.controller.ts<|end_file_name|><|fim▁begin|>interface ITableListBindings { addButton: any; config: any; data: any; extra: any; filters: any; onAction: Function; onSort: Function; openFiltersPanel: Function; rowClickable: boolean; sort: any; title: string; } interface ITable...
if (changes.data) { this.data = angular.copy(this.data);
<|file_name|>server.js<|end_file_name|><|fim▁begin|>'use strict'; import Component from './component'; import VolumeAttachment from './volume-attachment'; import Port from './port'; import {isString} from './util'; const Server = function (properties) { if (!(this instanceof Server)) { return new Server(propert...
Server.prototype = Object.create(Component.prototype); Server.prototype.constructor = Server;
<|file_name|>helptopics.py<|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 Apac...
DROP INDEX <indexname>;
<|file_name|>eval.py<|end_file_name|><|fim▁begin|>""" Author: RedFantom Contributors: Daethyra (Naiii) and Sprigellania (Zarainia) License: GNU GPLv3 as in LICENSE Copyright (C) 2016-2018 RedFantom<|fim▁hole|> def config_eval(value): """ Safely evaluate a string that can be a in a configuration file to a v...
""" from ast import literal_eval
<|file_name|>ci_server_poller.py<|end_file_name|><|fim▁begin|>import logging import time import threading try: import ConfigParser as config except: import configparser as config from pydispatch import dispatcher import requests import ci_screen.service.ci_server_loader as ci_loader logger = logging.getLogg...
def __del__(self):
<|file_name|>abstractRule.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2013 Palantir Technologies, 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://ww...
if (Array.isArray(value) && value.length > 1) {
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.9.0 exports.MSGBYPAGE = 30; exports.LIMIT_DESTROY = 200; exports.LIMIT_UPDATE = 30; exports.CONCURRENT_DESTROY = 1; <|fim▁hole|>exports.FETCH_AT_ONCE = 1000;<|fim▁end|>
<|file_name|>test_tag_woopra.py<|end_file_name|><|fim▁begin|>""" Tests for the Woopra template tags and filters. """ import pytest from django.contrib.auth.models import AnonymousUser, User from django.http import HttpRequest from django.template import Context from django.test.utils import override_settings from util...
r = self.render_tag('woopra', 'woopra') assert 'var woo_settings = {"domain": "example.com"};' in r
<|file_name|>s_213.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
search_result['213']=["topic_0000000000000068_events--.html","ChatTokenResponseDto Events",""];
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from importlib import import_module def import_object(object_path):<|fim▁hole|> :param object_path: path to the object for import :return: imported object """ module_path, class_name = object_path.rsplit('.', 1) module = import_module(module_path) ...
""" Import class or function by path
<|file_name|>share_snapshots.py<|end_file_name|><|fim▁begin|># Copyright 2012 NetApp # 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.apa...
@api_versions.wraps("1.0", "2.6") def force_delete(self, snapshot): return self._do_force_delete(snapshot, "os-force_delete")
<|file_name|>stats_gopher.presence_monitor.js<|end_file_name|><|fim▁begin|>StatsGopher.PresenceMonitor = function PresenceMonitor (opts) { opts = opts || {}; this.statsGopher = opts.statsGopher; this.key = opts.key; this.send = this.executeNextSend; this.paused = false; } StatsGopher.PresenceMonitor.prototyp...
StatsGopher.UserActivity = function () {
<|file_name|>test_csv.py<|end_file_name|><|fim▁begin|>from ddt import ddt, data from django.core.urlresolvers import reverse from django.test import TestCase import mock from analyticsclient.exceptions import NotFoundError from courses.tests import SwitchMixin from courses.tests.test_views import ViewTestMixin, DEMO_C...
<|file_name|>UserAccountDefinition.java<|end_file_name|><|fim▁begin|>package com.tkmdpa.taf.definitions.pantheon; import com.tkmdpa.taf.steps.pantheon.UserAccountSteps; import net.thucydides.core.annotations.Steps; import org.jbehave.core.annotations.Given; import org.jbehave.core.annotations.Then; import org.jbehave....
public class UserAccountDefinition {
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>// Copyright © 2014, 2015, Travis Snoozy // // 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 3 of the License, or // (at your ...
<< std::setw(22) << "RX IV" << data.rxiv << "\n"; std::ios save2(NULL);
<|file_name|>test_services_status.py<|end_file_name|><|fim▁begin|># # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
<|file_name|>GwtDeviceConfig.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2011, 2020 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Pu...
public String getLastEventType() { return (String) get("lastEventType");
<|file_name|>2d.composite.solid.xor.worker.js<|end_file_name|><|fim▁begin|>// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. // OffscreenCanvas test in a worker:2d.composite.solid.xor // Description: // Note: importScripts("/resources/testharness.js"); importScripts("/html/canvas/resources...
var t = async_test("");
<|file_name|>RegisterAgentCommand.java<|end_file_name|><|fim▁begin|>/* * Copyright 2021 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
*/ package com.thoughtworks.go.server.perf.commands;
<|file_name|>response.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::fmt::{Display, Formatter}; use std::hash::{Hash, Hasher}; use std::str::from_utf8; use base64::encode; use log::warn; use maplit::hashmap; use serde_json::{json, Value}; use crate::{DifferenceType, PactSpecification}; use cr...
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>const pug = require("pug"); const pugRuntimeWrap = require("pug-runtime/wrap"); const path = require("path"); const YAML = require("js-yaml"); const getCodeBlock = require("pug-code-block"); const detectIndent = require("detect-indent"); const rebaseIndent = require(...
return { // get meta meta: subexample, // get html output
<|file_name|>EntityIronGolem.java<|end_file_name|><|fim▁begin|>package net.minecraft.server; import org.bukkit.craftbukkit.inventory.CraftItemStack; // CraftBukkit public class EntityIronGolem extends EntityGolem { private int e = 0; Village d = null; private int f; private int g; public EntityI...
if (this.d == null) { this.aE(); } else {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generate...
from .version import VERSION __all__ = [ 'AutoRestUrlTestService',
<|file_name|>easyjson.go<|end_file_name|><|fim▁begin|>// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. package deviceorientation import ( json "encoding/json" easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" ) // ...
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface func (v *SetDeviceOrientationOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) { easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDeviceorientation(l, v)
<|file_name|>unittest_geocode.py<|end_file_name|><|fim▁begin|>from testscenarios import TestWithScenarios import unittest from geocode.geocode import GeoCodeAccessAPI class GeoCodeTests(TestWithScenarios, unittest.TestCase): scenarios = [ ( "Scenario - 1: Get latlng from address", ...
pass
<|file_name|>test_randomcolor_visual.py<|end_file_name|><|fim▁begin|>import randomcolor import random def main(): hues = ['red', 'orange', 'yellow', 'green', 'blue', 'purple', 'pink', 'monochrome', 'random'] luminosities = ['bright', 'light', 'dark', 'random'] formats = ['rgb', 'hex'] co...
<|file_name|>Trip.java<|end_file_name|><|fim▁begin|>package foodtruck.linxup; import java.util.List; import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.joda.time.DateTime; import foodtruck.model.Location; /** * @author avio...
private DateTime startTime; private DateTime endTime; private List<Position> positions;
<|file_name|>test_migrations.py<|end_file_name|><|fim▁begin|># Copyright 2014 NEC Corporation. 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:...
raise self.skipException(msg) server = self.create_test_server(wait_until="ACTIVE") src_host = self.get_host_for_server(server['id'])
<|file_name|>script_wp_before_3.5.js<|end_file_name|><|fim▁begin|>(function($) { $(document).ready( function() { if ( cntctfrm_ajax.cntctfrm_delete_multi_link ) { $( '#cntctfrm_show_multi_notice' ).removeAttr('href title').css('cursor', 'pointer'); }; $( '#cntctfrm_change_label' ).change( function() { if ...
if ( $( '.cntctfrm_language_tab_block' ).css( 'display' ) == 'none' ) { $( '.cntctfrm_language_tab_block ').css( 'display', 'block' ); $( '.cntctfrm_language_tab_block_mini' ).css( 'background-position', '1px -3px' );
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The init2winit 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|># You may obtain a copy of the License at # # http://www.apa...
<|file_name|>F57.py<|end_file_name|><|fim▁begin|>import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER FEC CMTE ID', 'number': '2'}, {'name...
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|># coding: utf8 from functools import wraps from logging import getLogger logger = getLogger(__name__) __author__ = 'marcos.costa' class request_logger(object): def __init__(self, method=None): self.method = method <|fim▁hole|> def __call__(self,...
<|file_name|>LineString.cpp<|end_file_name|><|fim▁begin|>/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2011 Sandro Santilli <strk@keybit.net> * Copyright (C) 2005-2006 Refractions Research Inc. * Copyright ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod message_set; use std; use std::fmt; use linked_hash_map::{Iter, LinkedHashMap}; use uuid::Uuid; pub mod message; #[derive(Debug, PartialEq)] pub struct Message { properties: Map, body: Option<Value>, } impl Message { pub fn new() -> MessageBuilder { ...
calculator.visit_message(&message, &mut size); assert_eq!(size, 14);
<|file_name|>List Comprehensions.py<|end_file_name|><|fim▁begin|>if __name__ == '__main__': x = int(raw_input()) y = int(raw_input()) z = int(raw_input())<|fim▁hole|> n = int(raw_input()) print ( [ [i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n] )<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Initialization of All Modules of UnivMathSys # Copyright (C) 2016 Zhang Chang-kai # # Contact via: phy.zhangck@gmail.com #<|fim▁hole|>from Foundation import * from Elementary import * from Structure import * # End of Initialization of All Modules<|fim▁en...
# General Public License version 3.0 # '''Initialization of All Modules'''
<|file_name|>input.py<|end_file_name|><|fim▁begin|>import sys def inputText(): input = sys.stdin.readline() return input.strip() def inputChoices(list, backcmd = "b", backtext = "back"): repeat = True while repeat: repeat = False<|fim▁hole|> print count, "-", item count += 1 print backcmd, "-", backtext ...
count = 0 for item in list:
<|file_name|>test_handlers.py<|end_file_name|><|fim▁begin|># Copyright 2009-2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type from lp.services.mail.handlers import MailHandlers from lp.testing import TestCase class Tes...
def test_get_is_case_insensitive(self): # The domain passed to get() is treated case-insentitively. handlers = MailHandlers() handler = object()
<|file_name|>install_local_soup.py<|end_file_name|><|fim▁begin|>import subprocess # Hey this is embarrassing I'll remove it soon I promise.<|fim▁hole|> def apply(params, state): subprocess.check_output(["cp", state['sqlite_file'], "/srv/git/datacommons_mani...
# I mean, maybe. Or I'll leave it malingering for years.
<|file_name|>entry_watcher_service_factory.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. #include "chrome/browser/extensions/api/file_system/entry_watcher_service_facto...
<|file_name|>recurrent.py<|end_file_name|><|fim▁begin|># time series prediction of stock data # using recurrent neural network with LSTM layer from pybrain.datasets import SequentialDataSet from itertools import cycle from pybrain.tools.shortcuts import buildNetwork from pybrain.structure.modules import LSTMLayer from ...
def rnn(): # load dataframe from csv file df = pi.load_data_frame('../../data/NABIL.csv')
<|file_name|>DomapInfo_dlg.cpp<|end_file_name|><|fim▁begin|>// WinProm Copyright 2015 Edward Earl // All rights reserved. // // This software is distributed under a license that is described in // the LICENSE file that accompanies it. // // DomapInfo_dlg.cpp : implementation file // #include "stdafx.h" #include "winpr...
{ //{{AFX_DATA_INIT(CDomapInfo_dlg) m_ndom_0peak = 0; m_ndom_1peak = 0;
<|file_name|>htmltextareaelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::HTMLTextAre...
<|file_name|>user-webuploader.js<|end_file_name|><|fim▁begin|>// 文件上传 jQuery(function() {<|fim▁hole|> $btn = $('#ctlBtn'), state = 'pending', // 优化retina, 在retina下这个值是2 ratio = window.devicePixelRatio || 1, // 缩略图大小 thumbnailWidth = 100 * ratio, thumbnailHeight = 1...
var $ = jQuery, $list = $('#thelist'),
<|file_name|>routes.config.js<|end_file_name|><|fim▁begin|>;(function() { angular.module('app.core') .config(config); /* @ngInject */ function config($stateProvider, $locationProvider, $urlRouterProvider) { $stateProvider /** * @name landing * @type {route} * @description Fir...
'add-routes@home': { templateUrl: 'html/modules/layout/add-routes.html', controller: 'AddRoutesController',
<|file_name|>gui.py<|end_file_name|><|fim▁begin|>"""Graphical user interface.""" import collections import ctypes import sdl2 import hienoi.renderer from hienoi._common import GLProfile, GraphicsAPI, ParticleDisplay, UserData from hienoi._vectors import Vector2i, Vector2f, Vector4f class NavigationAction(object): ...
renderer_info.minor_version) if renderer_info.profile == GLProfile.CORE: sdl2.SDL_GL_SetAttribute(sdl2.SDL_GL_CONTEXT_PROFILE_MASK, sdl2.SDL_GL_CONTEXT_PROFILE_CORE)
<|file_name|>code.py<|end_file_name|><|fim▁begin|>import math import re from collections import defaultdict def matches(t1, t2): t1r = "".join([t[-1] for t in t1]) t2r = "".join([t[-1] for t in t2]) t1l = "".join([t[0] for t in t1]) t2l = "".join([t[0] for t in t2]) t1_edges = [t1[0], t1[-1], t1r...
<|file_name|>diff_html.py<|end_file_name|><|fim▁begin|># -*- coding: iso-8859-1 -*- """ MoinMoin - Side by side diffs <|fim▁hole|> @license: GNU GPL, see COPYING for details. """ from MoinMoin.support import difflib from MoinMoin.wikiutil import escape def indent(line): eol = '' while line an...
@copyright: 2002 Juergen Hermann <jh@web.de>, 2002 Scott Moonen <smoonen@andstuff.org>
<|file_name|>makevcf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys,os import textwrap def print_header(): print textwrap.dedent("""\ ##fileformat=VCFv4.1 ##phasing=none ##INDIVIDUAL=TRUTH ##SAMPLE=<ID=TRUTH,Individual="TRUTH",Description="bamsurgeon spike-in"> ##INFO=<ID=CIP...
logdir_files = os.listdir(sys.argv[1]) for filename in logdir_files:
<|file_name|>test_volume_utils.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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 #...
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
<|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/. */ #![cfg_attr(feature = "unstable", feature(core_intrinsics))] #![c...
} } }; match libc::setrlimit(libc::RLIMIT_NOFILE, &rlim) {
<|file_name|>test_keypairs.py<|end_file_name|><|fim▁begin|># Copyright 2011 Eldar Nugaev # 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...
@mock.patch("nova.db.api.key_pair_get_all_by_user")
<|file_name|>display.rs<|end_file_name|><|fim▁begin|>use hal; use hal::spi::Spi;<|fim▁hole|>use hal::gpio::{gpiob, gpioa, Output, PushPull, AF5}; use ls010b7dh01::Ls010b7dh01; // Type aliases for these gross types pub type Extcomin = gpiob::PB1<Output<PushPull>>; pub type Display = Ls010b7dh01< Spi< hal::...
<|file_name|>visitor.rs<|end_file_name|><|fim▁begin|>use rustc::middle::{ty, def}; use rustc::middle::ty::MethodCall; use syntax::{ast, ast_util, ast_map}; use syntax::codemap::Span; use syntax::parse::token; use syntax::visit; use syntax::visit::Visitor; use std::fmt; use std::mem::replace; use std::collections::BTr...
self.info().unsafe_call.push(expr.span) } }
<|file_name|>test_patch.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ...
def test_patch_info_patch_patches_misc_linux_st710x_patches_disable_unaligned_printks_patch(self): test_file = self.get_test_loc(u'patch/patches/misc/linux-st710x/patches/disable_unaligned_printks.patch') expected_file = self.get_test_loc('patch/patches/misc/linux-st710x/patches/disable_unaligned_pr...
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) { require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks); grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), copy: { main: { expand: true, cwd: "src/", src: ["**", ...
}
<|file_name|>result_form_unittests.py<|end_file_name|><|fim▁begin|>"""Unit tests for result_form_functional_tests.py Systems: - indicators.views.ResultCreate - bad indicator id 404 - get with good ids gives form - initial form data is correct - correct disaggregation values -...
reporting_period_end=datetime.date(2016, 12, 31), ) self.indicator = i_factories.IndicatorFactory( program=self.program,
<|file_name|>GenericItem.java<|end_file_name|><|fim▁begin|>package it.unimi.di.big.mg4j.query; /* * MG4J: Managing Gigabytes for Java (big) * * Copyright (C) 2005-2015 Sebastiano Vigna * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public Li...
<|file_name|>mail_message.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from email.header import decode_header from email.utils import formataddr from odoo import _, api, fields, models, SUPERUSER_ID, tools from odoo....
'tracking_value_ids': tracking_value_ids,
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import re from main import sc __author__ = 'minh' <|fim▁hole|> not_allowed_chars = '[\/*?"<>|\s\t]' numeric_regex = r"\A((\\-)?[0-9]{1,3}(,[0-9]{3})+(\\.[0-9]+)?)|((\\-)?[0-9]*\\.[0-9]+)|((\\-)?[0-9]+)|((\\-)?[0" \ r"-9]*\\.?[0-9]+([eE][-+...
class Utils: def __init__(self): pass
<|file_name|>virtimage.py<|end_file_name|><|fim▁begin|># # Copyright 2013 Red Hat, Inc. # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
if disk.path and disk.path in paths: continue
<|file_name|>KafkaLogCompactionConverterTest.java<|end_file_name|><|fim▁begin|>/** * Copyright 2015 LinkedIn Corp. 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 *...
deployment.additionalDeploymentInfo = Collections.singletonMap("EI", "delete"); event.deploymentInfo = Collections.singletonList(deployment); newEvent = converter.convert(event);
<|file_name|>test_dn.py<|end_file_name|><|fim▁begin|>import contextlib import unittest import pytest from cryptography import x509 import six from ipapython.dn import DN, RDN, AVA if six.PY3: unicode = str def cmp(a, b): if a == b: assert not a < b assert not a > b ...
<|file_name|>GumbelFit_opt3.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ To be used in conjunction with: NR099910-004-10006 - Repeated lowering, OrcaFlex Gumbel Script NR099910-004-10001 - Lifting Analysis Methodology - Probabilistic Approach ======================================================...
Changed the way result file is read. Previous version required that the Result txt-file be opened and saved using Excel, as an error occured if not. Now this is fixed, but requires that object
<|file_name|>dom_html_head_element.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files.git) // DO NOT EDIT use crate::DOMElement; use crate::DOMEventTarget; use crate::DOMHTMLElement; use crate::DOMNode; use crate::DOM...
}
<|file_name|>test_gpu.py<|end_file_name|><|fim▁begin|>import unittest import slowboy.gpu import slowboy.interrupts from tests.mock_interrupt_controller import MockInterruptController STAT_IE_ALL_MASK = (slowboy.gpu.STAT_LYC_IE_MASK | slowboy.gpu.STAT_OAM_IE_MASK | slowboy.gpu...
self.gpu.mode = slowboy.gpu.Mode.OAM_VRAM_READ self.assertEqual(self.gpu.stat & slowboy.gpu.STAT_MODE_MASK, slowboy.gpu.Mode.OAM_VRAM_READ.value)
<|file_name|>revertable.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 3 of the Licen...
<|file_name|>SessionOperationExecutor.ts<|end_file_name|><|fim▁begin|>import { OperationExecutor } from "./OperationExecutor"; import { InMemoryDocumentSessionOperations } from "../Session/InMemoryDocumentSessionOperations"; import { DocumentStoreBase } from "../DocumentStoreBase"; import * as deprecate from "deprec...
<|file_name|>ScrollableLabelLarge.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify ...
self.oBackGround.pos = value
<|file_name|>rpc_server.go<|end_file_name|><|fim▁begin|>package rpc import ( "github.com/golang/glog" "github.com/oikomi/FishChatServer2/common/ecode" "github.com/oikomi/FishChatServer2/protocol/external" "github.com/oikomi/FishChatServer2/protocol/rpc" "github.com/oikomi/FishChatServer2/server/access/conf" "git...
glog.Error(err) res = &rpc.ASSendP2PMsgFromJobRes{
<|file_name|>all_14.js<|end_file_name|><|fim▁begin|>var searchData= [ ['udp',['Udp',['../class_cool_time.html#a4e23216a8121ca79d0fb019f30884b92',1,'CoolTime']]], ['unsubscribe',['unsubscribe',['../class_cool_pub_sub_client.html#a850554280e314d6b5c33c73fd9e809fc',1,'CoolPubSubClient']]], ['update',['update',['../c...
['user',['user',['../class_cool_m_q_t_t.html#a8cd47e45d457f908d4b4390b35aaee83',1,'CoolMQTT']]], ['useractive',['userActive',['../class_cool_board.html#a6395459131d6889a3005f79c7a35e964',1,'CoolBoard']]], ['userdata',['userData',['../class_cool_board.html#ae7358fb6e623cfc81b775f5f1734909b',1,'CoolBoard']]],
<|file_name|>take_until.rs<|end_file_name|><|fim▁begin|>use consumer::*; use std::cell::Cell; use std::rc::Rc; use stream::*; /// Emit items until it receive an item from another stream. /// /// This struct is created by the /// [`take_until()`](./trait.Stream.html#method.take_until) method on /// [Stream](./trait.Str...
trigger: trigger, } }
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup#, find_packages, Extension import distutils.command.build as _build import setuptools.command.install as _install import sys import os import os.path as op import distutils.spawn as ds import distutils.dir_util as dd import posixpath def...
print "Error while running cmake" print "run 'setup.py build --help' for build options" print "You may also try editing the settings in CMakeLists.txt file and re-running setup"
<|file_name|>if-check.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/licens...
// except according to those terms. fn even(x: uint) -> bool {
<|file_name|>RoutingNodes.java<|end_file_name|><|fim▁begin|>/* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to you under * the Apache Lice...
String node = recoveries.getKey(); final Recoveries value = recoveries.getValue(); int incoming = 0;
<|file_name|>0006_auto_20150827_1019.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 = [ ('formbuilder', '0005_auto_20150826_1600'), ] operations = [ ...
), migrations.AddField(
<|file_name|>missing_values_numeric.py<|end_file_name|><|fim▁begin|>import pandas as pd import numpy as np import seaborn as sns import matplotlib.pyplot as plt from include.dataset_fnames import generate_station_data_fname from include.feature_lists import numeric_features from xgboost import XGBRegressor def numer...
del iter_df
<|file_name|>action_dlcontent.py<|end_file_name|><|fim▁begin|>""" Downloads bootloader content for all arches for when the user doesn't want to supply their own. Copyright 2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of ...
files = ( ( "%s/README" % content_server, "%s/README" % dest ),
<|file_name|>domtokenlist.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::attr::{Attr, AttrHelpers}; use dom::bindings::c...
fn check_token_exceptions(self, token: &str) -> Fallible<Atom> { match token {
<|file_name|>tutorial_5_solved.py<|end_file_name|><|fim▁begin|># ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and # associated...
w=unit/3 for i in xrange(0, size, unit): for j in xrange(0, size, unit): x=xorg+i
<|file_name|>graph.py<|end_file_name|><|fim▁begin|>""" graph.py ------------- Deal with graph operations. Primarily deal with graphs in (n, 2) edge list form, and abstract the backend graph library being used. Currently uses networkx or scipy.sparse.csgraph backend. """ import numpy as np import collections from . ...
<|file_name|>web.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import time import random import socket from flask import Flask, render_template, redirect, url_for, request, jsonify import config log = None # classes class Agent(): def __init__(self, ip, cw=True, node=None, state='initial'): sel...
<|file_name|>construct_erc2-chromatin15state-all_files.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys import os output_dir = "erc2-chromatin15state-all-files" if not os.path.exists(output_dir): sys.stderr.write("Creating dir [%s]...\n" % (output_dir)) os.makedirs(output_dir) prefix = "/home/c...
'E033',
<|file_name|>transfer.py<|end_file_name|><|fim▁begin|>import logging import multiprocessing import os from mimetypes import guess_type from django.conf import settings from django.core.cache import cache from django.db import connection from zerver.lib.avatar_hash import user_avatar_path from zerver.lib.upload import...
attachments = list(Attachment.objects.all()) if processes == 1:
<|file_name|>lambdaFluc2dCreator.py<|end_file_name|><|fim▁begin|>import subprocess import sys import os # This code is meant to manage running multiple instances of my KMCLib codes at the same time, # in the name of time efficiency numLambda = 512 numStepsEquilib = 1600000 numStepsAnal = 16000 numStepsSnapshot = 1000 ...
<|file_name|>userInfo.js<|end_file_name|><|fim▁begin|>/*============================= = Views = =============================*/ App.Views.UserInfo = Backbone.View.extend({ el: $('#user-info'), events: { "click #settings" : "clickSettings", "click #logout" : "clickLogout" ...
<|file_name|>IUser.java<|end_file_name|><|fim▁begin|>/* * jHears, acoustic fingerprinting framework. * Copyright (C) 2009-2010 Juha Heljoranta. * * This file is part of jHears. * * jHears is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * ...
public interface IUser { String getName();
<|file_name|>jmlib.js<|end_file_name|><|fim▁begin|>'use strict'; /* * jmlib-js - Portable JuggleMaster Library (JavaScript Version) * Version 2.0 * (C) Per Johan Groland 2006-2016 * * Based on JMLib 2.0, (C) Per Johan Groland and Gary Briggs * * Based on JuggleMaster Version 1.60 * Copyright (c) 1995-1996 Ken ...
this.ap.hx = parseInt(mx); this.ap.hy = parseInt((my * 2 - this.dpm * 2 / 3 + this.base) / 3);
<|file_name|>ForestTrustInformation.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # module samba.dcerpc.lsa # from /usr/lib/python2.7/dist-packages/samba/dcerpc/lsa.so # by generator 1.135 """ lsa DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class ForestTrustInformation(__talloc.Obje...
count = property(lambda self: object(), lambda self, v: None, lambda self: None) # default entries = property(lambda self: object(), lambda self, v: None, lambda self: None) # default
<|file_name|>0135_auto_20160824_0348.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-08-24 03:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0134_user...
<|file_name|>load_timeline_for_day_and_user.py<|end_file_name|><|fim▁begin|>from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * i...
<|file_name|>package.js<|end_file_name|><|fim▁begin|>Package.describe("Telescope BKX theme");<|fim▁hole|> // api.use([ // 'jquery', // 'underscore', // 'templating' // ], 'client'); api.add_files([ 'lib/client/stylesheets/screen.css', ], ['client']); });<|fim▁end|>
Package.on_use(function (api) { // api.use(['telescope-lib'], ['client', 'server']);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
import backend # hopefully fixes issues with Celery finding tasks?
<|file_name|>bitcoin_pt_BR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_BR" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Evcoin</source...