prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>475.cc<|end_file_name|><|fim▁begin|>class Solution { public: int findRadius(vector<int>& houses, vector<int>& heaters) { sort(houses.begin(), houses.end()); sort(heaters.begin(), heaters.end()); auto radius = 0; auto idx = 0; for (auto house : houses) { auto current = abs(house - heaters[idx...
} }
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import itertools import os import re from importlib import import_module from django.apps import apps from django.conf import settings from django.contrib.admin.models import LogEntr...
<|file_name|>CMAny.hpp<|end_file_name|><|fim▁begin|>/* * The Apache Software License, Version 1.1 * * Copyright (c) 2001 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditi...
* are met: *
<|file_name|>gaya.js<|end_file_name|><|fim▁begin|>/* * Sidebar toggle function */ (function(document) { var toggle = document.querySelector('.sidebar-toggle'); var sidebar = document.querySelector('#sidebar'); var checkbox = document.querySelector('#sidebar-checkbox'); document.addEventListener('click', fu...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import glob import json from os.path import basename, dirname, realpath from BeautifulSoup import BeautifulSoup from flask import Response, request, render_template, send_from_directory from annotaria import app from store import Store app.config.from_object(__name__)...
return jsonify(store.query_authors())
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './OutlineFilter';
<|file_name|>Ed2SheetLabelProvider.java<|end_file_name|><|fim▁begin|>package es.ucm.fdi.emf.model.ed2.diagram.sheet; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.gmf.runtime.emf.type.core.IElementType; import org.eclipse.gmf.runtime.notation.View; import org.eclipse.jface.viewers.BaseLabelProvid...
return null; }
<|file_name|>JDBCAddressDAO.java<|end_file_name|><|fim▁begin|>/* JDBCAddressDAO.java * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Copyright Ⓒ 2014-2015 Universiteit Gent * * This file is part of the Degage Web Application * * Corresponding author (see also AUTHORS.txt) * * Kris Coolsaet...
rs.getString("address_street"), rs.getString("address_number"), rs.getFloat("address_latitude"),
<|file_name|>csv.py<|end_file_name|><|fim▁begin|>import csv __author__ = "Aaron Eppert <aaron.eppert@packetsled.com>" def process(options, results, output_handle): headers = options['select'].split(',') writer = csv.writer(output_handle) writer.writerow(headers) for result in results: row = [...
<|file_name|>neos_cs.ts<|end_file_name|><|fim▁begin|><TS language="cs" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Pravým kliknutím upravte adresu nebo popisek</translation> </message> <message> ...
<|file_name|>simple.rs<|end_file_name|><|fim▁begin|>pub fn main() { let a = true; let b = false; if a { print!("a"); } else if b { print!("b"); } else { print!("c") } let mut a: int = 0; let b: bool = true; let c: bool = false; let _numbers = [1, 2, 3]; ...
println!("{}", a); // As an expression a = if !c {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|>from . import ek90, porcelain<|fim▁end|>
#
<|file_name|>BulbReleaseControl.hpp<|end_file_name|><|fim▁begin|>// // RemotePhotoTool - remote camera control software // Copyright (C) 2008-2014 Michael Fink // /// \file BulbReleaseControl.hpp Canon control - Release control for Bulb mode // #pragma once // includes /// \brief bulb shutter release control /// this...
<|file_name|>SettingsForm.js<|end_file_name|><|fim▁begin|>import { useState } from "react"; import { PropTypes } from "prop-types"; import { SaveOutlined, WarningOutlined } from "@ant-design/icons"; import { Button, Col, Form, Input, InputNumber, Row, Select, Switch, Typography, ...
/> </Form.Item> </Col> <Col span={16}>
<|file_name|>suicides.py<|end_file_name|><|fim▁begin|>from datetime import datetime from pymongo import DESCENDING from libs.lib import tee_db from libs.statisticator import Job class SuicidesJob(Job): def __init__(self): """ Job to get player suicides Collection name: kill_results ...
self.results_db = tee_db[results_db_name]
<|file_name|>vfsgnome.py<|end_file_name|><|fim▁begin|># -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public Licens...
def __init__(self, path, name=None):
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A serialization/deserialization library for [CSA] format. //! //! [CSA] format is a plaintext format for recording Shogi games. //! This library supports parsing CSA-formatted string as well as composing CSA-formatted string from structs. //! Detail about CSA format ...
//! +
<|file_name|>XmlAttributeImportsTestCases.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved. * This program and the accompanying materials are made available under the * term...
setClasses(new Class[]{Person.class}); }
<|file_name|>equal_test.go<|end_file_name|><|fim▁begin|>package simple <|fim▁hole|> "testing" ) func TestEqualShouldFail(t *testing.T) { a := 1 b := 1 shouldNotBe := false if real := equal(a, b); real == shouldNotBe { t.Errorf("equal(%d, %d) should not be %v, but is:%v\n", a, b, shouldNotBe, real) } }<|fim▁end|...
import (
<|file_name|>data2db.py<|end_file_name|><|fim▁begin|>import os from library.connecter.ansible.yaml import Yaml_Base class Data_DB(Yaml_Base): def router(self, content, name, yaml_tpye='main', file_type='tasks', preserve=True, together=False, describe=''): ''' 检测yaml数据的语法是否正确,如果含有i...
self.logger.error('检测yaml数据名为' + name + '类型为full_roles或者main的语法失败,未通过yaml语法检测,原因:' + result[1])
<|file_name|>azure_dns_zone.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Automatic provisioning of Azure DNS zones. import os import azure import json from requests import Request try: from urllib import quote except: from urllib.parse import quote from nixops.util import attr_property from nix...
"""Definition of an Azure DNS Zone"""
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub use self::os::{FNM_PERIOD}; pub use self::os::{FNM_NOESCAPE}; use {NTStr, int_t, char_t}; #[cfg(target_os = "linux")] #[path = "linux/mod.rs"] mod os; pub fn fnmatch<T: NTStr, U: NTStr>(pattern: &T, string: &U, flags: int_t) -> int_t { extern { ...
pub use self::os::{FNM_NOMATCH}; pub use self::os::{FNM_PATHNAME};
<|file_name|>mdn_experiment_one_ahead.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division import cPickle import gzip import os import sys import timeit import numpy import theano from theano import tensor import mdn_one_ahead # parameters batch_size = 100 L1_reg=0.00 L2_reg=0.0001 n_epochs...
<|file_name|>scaling_options.py<|end_file_name|><|fim▁begin|>""" Phil scope of options for scaling. """ from __future__ import annotations import iotbx.phil phil_scope = iotbx.phil.parse( """ anomalous = False .type = bool .help = "Separate anomalous pairs in scaling and error model optimisation." ...
full_matrix = True
<|file_name|>x509TestUtilities.py<|end_file_name|><|fim▁begin|>""" Configuration and utilities for all the X509 unit tests """ import os import sys from datetime import datetime from pytest import fixture # We use certificates stored in the same folder as this test file CERTDIR = os.path.join(os.path.dirname(__file__...
# sys.modules.pop(mod) X509CHAINTYPES = ("M2_X509Chain",)
<|file_name|>regions-in-enums.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.or...
<|file_name|>sites.js<|end_file_name|><|fim▁begin|>// Copyright 2015 LastLeaf, LICENSE: github.lastleaf.me/MIT 'use strict'; var fs = require('fs'); var fse = require('fs-extra'); var async = require('async'); var User = fw.module('/db_model').User; var exports = module.exports = function(conn, res, args){ User.che...
<|file_name|>ecdsa_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import unittest from pycoin.ecdsa import generator_secp256k1, sign, verify, public_pair_for_secret_exponent class ECDSATestCase(unittest.TestCase): def test_sign_verify(self): def do_test(secret_exponent, val_list): ...
<|file_name|>PhoneNumber.java<|end_file_name|><|fim▁begin|>package fr.sii.ogham.sms.message; import fr.sii.ogham.core.util.EqualsBuilder; import fr.sii.ogham.core.util.HashCodeBuilder; /** * Represents a phone number. It wraps a simple string. The aim is to abstracts * the concept and to be able to provide other fi...
} public void setNumber(String number) {
<|file_name|>PathologyRestTranslatorTest.java<|end_file_name|><|fim▁begin|>/** * Package: MAG - VistA Imaging WARNING: Per VHA Directive 2004-038, this routine should not be modified. Date Created: Jul 10, 2012 Site Name: Washington OI Field Office, Silver Spring, MD Developer: VHAISWWERFEJ Description:...
;; is considered to be a violation of US Federal Statutes.
<|file_name|>Apartment.js<|end_file_name|><|fim▁begin|>import React from 'react' import ApartmentTable from './ApartmentListContainer' import TextFieldForm from './ApartmentForm' import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider' import {Tabs, Tab} from 'material-ui/Tabs' import Paper from 'material-ui/...
title='Apartment Form' showMenuIconButton={false} />
<|file_name|>nosy.py<|end_file_name|><|fim▁begin|>"""Watch for changes in a collection of source files. If changes, run the specified test runner (nosetests, by default). """ from argparse import ArgumentParser import ConfigParser import glob import os import stat import subprocess import sys import time class Nosy(o...
# extra_paths for any files or paths that aren't easily # included via base_path, glob_patterns, and exclude_patterns self.config.set('nosy', 'paths', '*.py') self._build_cmdline_parser()
<|file_name|>test_url.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for t...
<|file_name|>bluetooth_api.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. var _callbacks = {}; var _next_reply_id = 0; var postMessage = function(msg, callback) { va...
var copiedDevices = []; for (var i = 0; i < devices.length; i++) copiedDevices[i] = devices[i]._clone();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" # Copyright (c) 05 2015 | surya # 18/05/15 nanang.ask@kubuskotak.com # 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...
def search_by_author(self, author): """ Return list of chapter dicts whose keys are: name
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Tesserama - Simple membership cards manager // Copyright (C) 2017-2021 Andrea Bolognani <eof@kiyuko.org> // SPDX-License-Identifier: GPL-2.0-or-later <|fim▁hole|>}<|fim▁end|>
fn main() { tesserama::Application::new().run();
<|file_name|>miss_vs_stall.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import analyze_conf import sys import datetime, glob, job_stats, os, subprocess, time<|fim▁hole|># Set the matplotlib output mode from config if it exists if not 'matplotlib.pyplot' in sys.modules: try: matplotlib.use(analyze_conf.ma...
import operator import matplotlib
<|file_name|>writer.py<|end_file_name|><|fim▁begin|>import numpy as np from displays.letters import ALPHABET class Writer: """Produce scrolling text for the LED display, frame by frame""" def __init__(self): self.font = ALPHABET self.spacer = np.zeros([8, 1], dtype=int) self.phrase =...
<|file_name|>release.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # 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/. # ***** END ...
from mozharness.base.config import parse_config_file
<|file_name|>extension.rs<|end_file_name|><|fim▁begin|>//! ESMTP features use std::{ collections::HashSet, fmt::{self, Display, Formatter}, net::{Ipv4Addr, Ipv6Addr}, result::Result, }; use crate::transport::smtp::{ authentication::Mechanism, error::{self, Error}, response::Response, u...
} => write!(f, "{}={}", keyword, XText(value)), MailParameter::Other { ref keyword, value: None,
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#![cfg(any(target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "openbsd"))] use ContextError; use CreationError; use GlAttributes; use GlProfile; use GlRequest; use Api; use PixelFormat; use PixelFormatRequirements; use ReleaseBehavior; use ...
<|file_name|>f64.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/licens...
/// Returns `true` if `self` is negative, including `-0.0` and /// `Float::neg_infinity()`.
<|file_name|>overloaded-deref.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.or...
x: isize, y: isize }
<|file_name|>with-identifier.ts<|end_file_name|><|fim▁begin|>export interface IWithIdentifier {<|fim▁hole|> id?: string; }<|fim▁end|>
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ file: __main__.py Description: the entry point to SEM. author: Yoann Dupont MIT License Copyright (c) 2018 Yoann Dupont Permission is hereby granted, free of charge, to any person obtaining a copy of this software ...
print("Usage: {0} <module> [module arguments]\n".format(name)) print("Module list:") for module in modules:
<|file_name|>TransientNernstPlanck.py<|end_file_name|><|fim▁begin|>from openpnm.algorithms import TransientReactiveTransport from openpnm.utils import logging logger = logging.getLogger(__name__) class TransientNernstPlanck(TransientReactiveTransport): r""" A subclass of GenericTransport to perform steady and...
if phase: self.settings['phase'] = phase.name if quantity: self.settings['quantity'] = quantity
<|file_name|>category.py<|end_file_name|><|fim▁begin|>import operator import numpy as np from pandas._libs import index as libindex from pandas import compat from pandas.compat.numpy import function as nv from pandas.core.dtypes.generic import ABCCategorical, ABCSeries from pandas.core.dtypes.dtypes import Categorica...
def is_unique(self): return self._engine.is_unique @property
<|file_name|>panelScatter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from PyQt4.uic import loadUiType from pyqtgraph.Qt import QtCore, QtGui #from matplotlib.figure import Figure from matplotlib import pyplot as plt import numpy as np from matplotlib.bac...
self.label.setText('Instante ' + str(self.getTime(xdata[ind[0]], ydata[ind[0]], ep))) def creaFiguras(self, ep): """ ep: tiempo, temp, flujo"""
<|file_name|>adapter.js<|end_file_name|><|fim▁begin|>// Don't need this for our purposes module = function(){}; if(typeof equal != 'undefined') { equals = equal; } ok = function(actual, message) { equal(actual, true, message); } raises = function(fn, expected, message) { raisesError(fn, message); }; asyncTest ...
method: function(arr, n, guard){
<|file_name|>files_6b.js<|end_file_name|><|fim▁begin|>var searchData= [ <|fim▁hole|> ['keep_5fhistory_2ecpp',['keep_history.cpp',['../keep__history_8cpp.html',1,'']]], ['keep_5fhistory_5fpass_2ecpp',['keep_history_pass.cpp',['../keep__history__pass_8cpp.html',1,'']]], ['keep_5fhistory_5fpass_2eh',['keep_history...
<|file_name|>extract_xml.py<|end_file_name|><|fim▁begin|>import os import types from sllib.LLSD import LLSD try: os.makedirs('./httpcap') except: pass data = open('httpcap.txt','r').read() c = 0 btag = '<llsd>' etag = '</llsd>' ##mbtag = '<key>message</key><string>' ##metag = '</string>' b ...
## if bm >= 0 and em >= 0 and em >= bm:
<|file_name|>postgislayers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' gsconfig is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API. The project is distributed under a MIT License . ''' __author__ = "David Winslow" __copyright__ = "Copyright 2012-2015 Boundless, C...
<|file_name|>rc.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/LIC...
<|file_name|>apiissue.go<|end_file_name|><|fim▁begin|>package apimanagement // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause in...
{TargetValue: serviceName, Constraints: []validation.Constraint{{Target: "serviceName", Name: validation.MaxLength, Rule: 50, Chain: nil}, {Target: "serviceName", Name: validation.MinLength, Rule: 1, Chain: nil},
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># Copyright 2017 Cloudbase Solutions Srl # 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://w...
# # Unless required by applicable law or agreed to in writing, software
<|file_name|>adaboostSAMME.py<|end_file_name|><|fim▁begin|>''' adaboost.py script can be used to train and test adaboost with a SGDclassifier for mnist data. Look up commandline options for more information. ''' import argparse import cPickle as pickle import numpy as np import pylab as pl import time from sklearn...
ax.yaxis.grid(True) leg = ax.legend(loc='upper right', fancybox=True) leg.get_frame().set_alpha(0.7) pl.savefig(file_name)
<|file_name|>mod.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...
use option::Option::None; use result::Result::{Ok, Err}; use self::ip::{SocketAddr, ToSocketAddr};
<|file_name|>debug.rs<|end_file_name|><|fim▁begin|>use alloc::boxed::Box; use collections::string::String; use scheduler::context::{context_switch, context_i, contexts_ptr}; use scheduler; use schemes::{KScheme, Resource, Url}; use syscall::handle; /// A debug resource pub struct DebugResource { pub scheme: *m...
<|file_name|>example.py<|end_file_name|><|fim▁begin|>class Year(object): def __init__(self, year):<|fim▁hole|> self.year = year def is_leap_year(self): return (self._by_4() and not self._by_100()) \ or self._by_400() def _by_4(self): return self.year % 4 == 0 def...
<|file_name|>visit_ast.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/...
// looks to me like the first two of these are actually
<|file_name|>UnknownTypeException.java<|end_file_name|><|fim▁begin|>/* * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Pub...
* have any questions.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os from setuptools import setup import sys if sys.version_info < (2, 6): raise Exception('Wiggelen requires Python 2.6 or higher.') install_requires = [] # Python 2.6 does not include the argparse module. try: import argparse except ImportError: i...
try: with open('README.rst') as readme: long_description = readme.read()
<|file_name|>encryption-generator.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # encryption-generator.py # # Copyright 2016 Netuser <zorgonteam@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public...
while True: try: menu=raw_input('\n[*] encrypt or decrypt $ ') menu_item="update"
<|file_name|>municipaltax.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import StringIO import csv from xml.etree.ElementTree import Element, SubElement, Comment, tostring from xml.dom import minidom import configdb def prettify(elem): """Return a pretty-printed XML string for the Element. """ ...
_facturacion.text = '%0.2f' % quarter['client_amount'] _derechosacceso = SubElement(_municipio, 'DERECHOSACCESO')
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::io::IoError; use std::error::{Error, FromError}; /// Possible parser errors #[derive(Show, PartialEq)] pub enum ParserErrorKind { /// Parser met EOF before parsing a proper datum UnexpectedEOF, /// Unexpected token: the first string describes expe...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' ps = psi4.Solver with psi4.quite_run(): ps.prepare_chkpt(mo_coeff, fock_on_mo, nelec, e_scf, nuclear_repulsion) ecc = ps.energy('CCSD', c.shape[1], hcore_on_mo, eri_on_mo)<|fim▁hole|> rdm1, rdm2 = ps.density(mo_coeff.shape[1]) eccsdt = ps.energy(...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from setuptools import setup from gun import __version__<|fim▁hole|>setup( name = 'gun', version = __version__, description = 'Gentoo Updates Notifier', author = 'Andriy Yurchuk', author_email = 'ayurchuk@minuteware....
<|file_name|>fields.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re from collections import OrderedDict from odoo import api, fields, models, _ from PIL import Image from cStringIO import StringIO import babel from odoo.tools import html_escape as escape, posix_to_ldml, safe_eval, float_utils from .qw...
<|file_name|>timetrav.cpp<|end_file_name|><|fim▁begin|>/* * ____ DAPHNE COPYRIGHT NOTICE ____ * * Copyright (C) 2005 Mark Broadhead * * This file is part of DAPHNE, a laserdisc arcade game emulator * * DAPHNE is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public ...
void timetrav::input_disable(Uint8 move) {} void timetrav::input_enable(Uint8 move) {}
<|file_name|>csharp.js<|end_file_name|><|fim▁begin|>/* * _ _ _ * | | | | | | * | | __ _| |__ ___ ___ __ _| |_ Labcoat (R) * | |/ _` | '_ \ / __/ _ \ / _` | __| Powerful development environment for Quirrel. * | | (_| | |_) | (_| (_...
* 3 of the License, or (at your option) any later version. *
<|file_name|>discovery-wrapper.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python2 """ discovery-wrapper A small tool which wraps around discovery and tries to guide the discovery process with a more modern approach with a Queue and workers. Based on the original version of poller...
try: time.sleep(1) except: pass
<|file_name|>test_tags.py<|end_file_name|><|fim▁begin|>try: import unittest2 as unittest # Python2.6 except ImportError: import unittest from tests.functional import test_base @unittest.skipIf(test_base.get_test_server_api() == 1, "The tag API didn't work at v1 - see frontend issue #927") cla...
This test is a little contrived, since the tag create/delete endpoints are only intended for internal use. """ # Create a tag
<|file_name|>position.mako.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/. */ <%! from data import to_rust_ident %> <%namespace name=...
<|file_name|>register.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('aquilaApp') .config(function ($stateProvider) { $stateProvider .state('register', { parent: 'account', url: '/register', data: { roles: [], ...
translatePartialLoader: ['$translate', '$translatePartialLoader', function ($translate, $translatePartialLoader) { $translatePartialLoader.addPart('register');
<|file_name|>logical_geometry.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/. */ //! Geometry in flow-relative space. use euclid::{P...
<|file_name|>jquery.wikiEditor.publish.js<|end_file_name|><|fim▁begin|>/* Publish module for wikiEditor */ ( function ( $ ) { $.wikiEditor.modules.publish = { /** * Compatability map */ browsers: { // Left-to-right languages ltr: { msie: [['>=', 7]], firefox: [['>=', 3]], opera: [['>=', 9.6]], ...
<|file_name|>events.js<|end_file_name|><|fim▁begin|>var draw = SVG('mainPage'); var energyBar = draw.rect(0,5).move(0,598) .fill({ color: '#cc0', opacity: '1' }) .stroke({ color: '#fff', width: '1', opacity: '0.6'}); var port = 25550; var images = "http://"+document.location.hostname+":"+port+"/game/images/"; var ...
// Rafraichissement du tableau de scores socket.on('refreshScores', function (players) { // Arrangement du tableau en fonction des scores players = players.sort(function(a,b) {
<|file_name|>enkf_node.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012 Statoil ASA, Norway. # # The file 'enkf_node.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
assert impl_type == ErtImplType.CUSTOM_KW
<|file_name|>readme_maker.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Tue Apr 9 21:30:31 2019 <|fim▁hole|>import os from os.path import join, split lines = [] for root, folders, filenames in os.walk('..'): for filename in filenames: if filename == 'readme.md': lines...
@author: Rignak """
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function (grunt) { grunt.initConfig({ less: { test: { src: 'test/test.less',<|fim▁hole|> } } }) grunt.loadNpmTasks('grunt-contrib-less') grunt.registerTask('default', ['less']) }<|fim▁end|>
dest: 'test/test.css'
<|file_name|>stock_picking.py<|end_file_name|><|fim▁begin|># Copyright 2014-2017 Pedro M. Baeza <pedro.baeza@tecnativa.com> # Copyright 2018-2019 Sergio Teruel <sergio.teruel@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models from odoo.fields import firs...
picking.returned_ids = picking.mapped( 'move_lines.returned_move_ids.picking_id') @api.depends('move_lines.origin_returned_move_id')
<|file_name|>conflicting-repr-hints.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] #[repr(C)] enum A { A, } #[repr(u64)] enum B { B, } #[repr(C, u64)] //~ ERROR conflicting representation hints //~^ WARN this was previously accepted enum C { C, } #[repr(u32, u64)] //~ ERROR conflicting representat...
<|file_name|>hello.go<|end_file_name|><|fim▁begin|>// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // //...
"log" "net/http" "os" )
<|file_name|>tight_bbox.py<|end_file_name|><|fim▁begin|>""" This module is to support *bbox_inches* option in savefig command. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six import warnings from matplotlib.transforms import Bbox, Transforme...
function which restores the original values are returned. """ origBbox = fig.bbox
<|file_name|>cmdln_main2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ $ python cmdln_main2.py This is my shell. $ python cmdln_main2.py foo hello from foo """<|fim▁hole|> import sys import cmdln class Shell(cmdln.RawCmdln): "This is my shell." name = "shell" def do_foo(self, ...
<|file_name|>qquote.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/lic...
extern crate syntax; use std::io::*;
<|file_name|>fisherfaces_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) Philipp Wagner. All rights reserved. # Licensed under the BSD license. See LICENSE file in the project root for full license information. import sys # append facerec to module search path sys...
from facerec.visual import subplot
<|file_name|>issue-24086.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.apache.org/lic...
fn drop(&mut self) {} }
<|file_name|>featuresDuck.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j 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 F...
[USER_CAPABILITIES.serverConfigReadable]: false, [USER_CAPABILITIES.proceduresReadable]: false } }
<|file_name|>_file_cache.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import errno import os import re import tempfile from hashlib import md5 class _FileCacheError(Exception): """Base exception class for FileCache related errors""" class _FileCache(object): DEPTH = 3 def __init__(self, root_...
return
<|file_name|>component_registrator.js<|end_file_name|><|fim▁begin|>/** * DevExtreme (core/component_registrator.js) * Version: 16.2.5 * Build date: Mon Feb 27 2017 * * Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED * EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml */ "use stri...
MemorizedCallbacks = require("./memorized_callbacks"),
<|file_name|>main_window.hpp<|end_file_name|><|fim▁begin|>/* * Tweeteria - A minimalistic tweet reader. * Copyright (C) 2017 Andreas Weis (der_ghulbus@ghulbus-inc.de) * * 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 * ...
void unreadForUserChanged(tweeteria::UserId, int); public slots: void markTweetAsRead(tweeteria::TweetId tweet_id, tweeteria::UserId user_id);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Sebastian Raschka 2016 # # `siteinterlock` is a Python package for selecting near-native protein-ligand # docking poses based upon the hypothesis that interfacial rigidification # of both the protein and ligand prove to be important characteristics of # the native...
from .hether import hether __all__ = ["hether"]
<|file_name|>data.js<|end_file_name|><|fim▁begin|>/*jshint node:true, indent:2, curly:false, eqeqeq:true, immed:true, latedef:true, newcap:true, noarg:true, regexp:true, undef:true, strict:true, trailing:true, white:true */ /*global X:true */<|fim▁hole|>(function () { "use strict"; var _ = X._; /** Defines ...
<|file_name|>beanstalkc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """beanstalkc - A beanstalkd Client Library for Python""" import logging import socket import sys __license__ = ''' Copyright (C) 2008-2016 Andreas Bolka Licensed under the Apache License, Version 2.0 (the "License"); you may not use this...
self._interact('bury %d %d\r\n' % (jid, priority), ['BURIED'], ['NOT_FOUND'])
<|file_name|>dstr-async-gen-meth-dflt-obj-ptrn-id-init-skipped.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-binding/obj-ptrn-id-init-skipped.case // - src/dstr-binding/default/cls-decl-async-gen-meth-dflt.template /*--- description: Destructuring init...
} };
<|file_name|>component.py<|end_file_name|><|fim▁begin|># Copyright © 2020, Joseph Berry, Rico Tabor (opendrop.dev@gmail.com) # OpenDrop is released under the GNU GPL License. You are free to # modify and distribute the code, but always under the same license # # If you use this software in your research, please cite th...
stroke_color=color,
<|file_name|>class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_bonus_slabs.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_bonus_slabs = [ [ "OnControlLoad", "class_mix_e_r_p_1_1_net_1_1_core_1_1_modules_1_1_sales_1_1_setup_1_1_...
<|file_name|>mlfutil.py<|end_file_name|><|fim▁begin|># -*- coding=utf-8 -*- import cPickle import numpy as np import os import sys """Common tools for this project. Utils are defined in this module for sharing. """ PROJ_DIR = os.path.split(os.path.realpath(__file__))[0] def draw_progress(iteration, total, pref='Pro...
return len(self.cats)
<|file_name|>fragment.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The `Fragment` type, which represents the leaves of the ...
} }