prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>parser_mysql.py<|end_file_name|><|fim▁begin|>import time import zlib from bs4 import BeautifulSoup # from geopy.geocoders import Nominatim as Geo from scraper import BaseScraper from price_parser import parse_price_text from MySQL_connector import db_connector db = 'realestate_db' class Parser(object...
rooms = [None, None, None]
<|file_name|>rest-menu.ts<|end_file_name|><|fim▁begin|>export class RestMenu {<|fim▁hole|> price: number; description: string; type: string; created_on: Date; isVeg() { return this.type === 'veg'; } }<|fim▁end|>
id: string; title: string;
<|file_name|>publications-per-year-k2.py<|end_file_name|><|fim▁begin|>"""Creates beautiful visualizations of the publication database.""" import datetime import sqlite3 as sql import numpy as np from astropy import log from matplotlib import pyplot as plt import matplotlib.patheffects as path_effects import matplotli...
ax.spines["bottom"].set_visible(False)
<|file_name|>uart_pt.rs<|end_file_name|><|fim▁begin|>// Zinc, the bare metal stack for rust. // Copyright 2014 Lionel Flandrin <lionel@svkt.org> // // 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 Licen...
0 ... 7 => sub.path.clone(),
<|file_name|>PythonTask_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # copyright (C) 2021- The University of Notre Dame # This software is distributed under the GNU General Public License. # See the file COPYING for details. # Example on how to execute python code with a Work Queue task. # The class...
# function is then written to a file as an output file and read when neccesary
<|file_name|>pel_parser.rs<|end_file_name|><|fim▁begin|>use pel; use typer::TyperError; use typer::FunctionName; use typer::FunctionOverload; use typer::UnresolvedFunction; use typer::ErrorType; use typer::ToErrorType; use typer::parse_datalayout; use typer::parse_type; use typer::ExpressionContext; use typer::Variable...
Ok(TypedExpression::Value(node, output_type)) }
<|file_name|>search.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 S...
<|file_name|>class_redis_cache_test.js<|end_file_name|><|fim▁begin|>var class_redis_cache_test = [ [ "__construct", "class_redis_cache_test.html#ae22c12eb0d136f444b6c9c0735f70382", null ], [ "testArray", "class_redis_cache_test.html#a76100cea2dba0b01bfffb70a193dfb9f", null ], [ "testGet", "class_redis_cache...
[ "testReinitializedGet", "class_redis_cache_test.html#addb63e1b14cdbfcdc65837dff633f7f2", null ], [ "testReinitializedHas", "class_redis_cache_test.html#a39dc99ba8e9efe29f3939ecbe99210be", null ], [ "testRemove", "class_redis_cache_test.html#a10b3034f21731f5a6507dbb5207097cf", null ]
<|file_name|>main_module.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- ''' script.skin.helper.service Helper service and scripts for Kodi skins mainmodule.py All script methods provided by the addon ''' import xbmc import xbmcvfs import xbmcgui import xbmcaddon from skinset...
self.deprecated_method("script.skin.helper.colorpicker")
<|file_name|>test_export.py<|end_file_name|><|fim▁begin|>import io import pytest import databot import pandas as pd from databot.db.utils import Row from databot.exporters.utils import flatten_nested_lists, flatten_nested_dicts, get_level_keys, flatten, sort_fields from databot.exporters import jsonl from databot.exp...
(1, 'bar'),
<|file_name|>render.rs<|end_file_name|><|fim▁begin|>//! 2D accelerated rendering //! //! Official C documentation: https://wiki.libsdl.org/CategoryRender //! # Introduction //! //! This module contains functions for 2D accelerated rendering. //! //! This API supports the following features: //! //! * single pixel point...
}; let raw = unsafe {
<|file_name|>tooltip.ts<|end_file_name|><|fim▁begin|>import * as R from 'ramda'; import { IUSerInterfaceTooltip, ITableHeaderTooltips, ITableStaticTooltips, IVirtualizedDerivedData, DataTooltips } from 'dash-table/components/Table/props'; import {ifColumnId, ifRowIndex, ifFilter} from 'dash-table/c...
return resolvedStaticTooltip; }
<|file_name|>bitcoin_hu.ts<|end_file_name|><|fim▁begin|><TS language="hu" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>A cím vagy címke szerkeszteséhez kattintson a jobb gombbal</translation> </message> ...
</message> <message> <source>Use a custom data directory:</source> <translation>Saját adatkönyvtár használata:</translation>
<|file_name|>TreeGridColumns.js<|end_file_name|><|fim▁begin|>/*! * Ext JS Library 3.4.0 * Copyright(c) 2006-2011 Sencha Inc. * licensing@sencha.com * http://www.sencha.com/license */ (function() { Ext.override(Ext.list.Column, { init : function() { var types = Ext.data.Types, ...
Ext.reg('tgcolumn', Ext.tree.Column);
<|file_name|>test_optimizer_inference.py<|end_file_name|><|fim▁begin|># Copyright 2017 Ravi Sojitra. 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.ap...
<|file_name|>unit_vector.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more detail...
/* 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
<|file_name|>server.test.ts<|end_file_name|><|fim▁begin|>/* * SonarQube JavaScript Plugin * Copyright (C) 2011-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as publi...
<|file_name|>show.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from config.template_middleware import TemplateResponse from gaecookie.decorator import no_csrf from gaepermission.decorator import login_not_required from routes.campapel.home import retur...
@login_not_required
<|file_name|>defaults.go<|end_file_name|><|fim▁begin|>// Copyright © 2021 The Knative 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/LICE...
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>tokens.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.utils import six class AccountActivationTokenGenerator(PasswordResetTokenGenerator): def _make_hash_value(self, user, timestamp): return ( six.text_type(user.pk) + ...
<|file_name|>ConditionalShowHide.py<|end_file_name|><|fim▁begin|>from enigma import eTimer from Converter import Converter class ConditionalShowHide(Converter, object): def __init__(self, argstr): Converter.__init__(self, argstr) args = argstr.split(',') self.invert = "Invert" in args self.blink = "Blink" in ...
def startBlinking(self): self.blinking = True self.timer.start(self.blinktime)
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>from enum import Enum, unique from pathlib import Path from tempfile import NamedTemporaryFile from threading import Lock import os from typing import Callable, Dict <|fim▁hole|>from useintest.common import MissingDependencyError _UTF8_ENCODING = "utf-8" @unique...
<|file_name|>observerUserTest.py<|end_file_name|><|fim▁begin|>from observertest import BaseObserverToscaTest from core.models import Site, Deployment, User, ControllerUser # Note that as a side effect, these tests will also create a Site class ObserverUserTest(BaseObserverToscaTest): tests = ["create_user"] ...
<|file_name|>rego_egou_.js<|end_file_name|><|fim▁begin|>showWord(["n. "," Nan konstriksyon lari, twou kote dlo desann anba tè. Twou rego sa a bouche."<|fim▁hole|>])<|fim▁end|>
<|file_name|>config_variables.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.core.validators import MinValueValidator from openslides.core.config import ConfigVariable from openslides.motions.models import MotionPoll from .models import Workflow def get_workflow_choices(): """ ...
yield ConfigVariable( name="motions_export_title",
<|file_name|>dmc.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use crate::channel::Channel; use crate::system::{Region, SystemState}; use std::cell::RefCell; #[derive(Default)] struct DmcState { current_tick: u64, timer_counter: u16, sample_buffer: u8, sample_buffer_empty: bool, address_counter: u16...
use crate::apu::ApuState; use crate::bus::{AddressBus, AndEqualsAndMask, DeviceKind};
<|file_name|>test_physical_server_details.py<|end_file_name|><|fim▁begin|>import pytest from cfme.physical.provider.lenovo import LenovoProvider from cfme.utils.appliance.implementations.ui import navigate_to pytestmark = [pytest.mark.tier(3), pytest.mark.provider([LenovoProvider], scope="module")] @pytest.fixture(...
policy_items = physical_server_view.toolbar.policy.items assert "Manage Policies" in policy_items
<|file_name|>SwaggerConfig.java<|end_file_name|><|fim▁begin|>package com.flockinger.spongeblogSP.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.Requ...
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket;
<|file_name|>wheel.py<|end_file_name|><|fim▁begin|>"""Support functions for working with wheel files. """ from __future__ import absolute_import import logging from email.parser import Parser from zipfile import ZipFile from pip._vendor.packaging.utils import canonicalize_name from pip._vendor.pkg_resources import D...
<|file_name|>notify_history.js<|end_file_name|><|fim▁begin|>"use strict"; //////////////////////////////////////////////////////////////////////////////// // デスクトップ通知履歴 //////////////////////////////////////////////////////////////////////////////// Contents.notify_history = function( cp ) { var p = $( '#' + cp.id );...
<|file_name|>extension.js<|end_file_name|><|fim▁begin|>var s = document.createElement('script'); s.src = chrome.extension.getURL('flourish.js');<|fim▁hole|>s.onload = function() { this.parentNode.removeChild(this); }; (document.head||document.documentElement).appendChild(s);<|fim▁end|>
<|file_name|>reqwest.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:d5b913ad3304fa791ac6c6064dcecf37b157290bb0e8292e76aee05bee6dc425 size 3752
<|file_name|>InterpreterManager.js<|end_file_name|><|fim▁begin|>/*globals define, WebGMEGlobal, requirejs*/<|fim▁hole|> * @author rkereskenyi / https://github.com/rkereskenyi * @author lattmann / https://github.com/lattmann * @author pmeijer / https://github.com/pmeijer */ define([ 'common/core/coreQ', 'plu...
/*jshint browser: true*/ /**
<|file_name|>_base.py<|end_file_name|><|fim▁begin|>class PluginBase(object): name = '' doc = 'doc about this class' methods_subclass = {} def __init__(self, **kwargs): self.methods = { 'help': 'doc about help method', 'get_methods': 'doc about get_methods method' ...
if start_str[0]: if char == start_str[0]: rev = text[:i+1][::-1]
<|file_name|>test_helper.py<|end_file_name|><|fim▁begin|>from luigi_bigquery import ResultProxy import os import shutil import tempfile class MockClient(object): def __init__(self, datasets, tables, jobs): self._datasets = datasets self._tables = tables self._jobs = jobs def create_da...
class TestConfig(object): def __init__(self, datasets=[], tables=[], jobs=[], objects=[]): self.datasets = datasets self.tables = tables
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # Copyright 2017-2021 Joel Allen Luellwitz and Emily Frost # # 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 versi...
<|file_name|>i_asset_presentation_provider.hpp<|end_file_name|><|fim▁begin|>#ifndef I_ASSET_PRESENTATION_PROVIDER_HPP #define I_ASSET_PRESENTATION_PROVIDER_HPP #include "core_data_model/i_item.hpp" namespace wgt { class IAssetObjectItem; /**<|fim▁hole|> An interface to a class that can provide the specific presentat...
IAssetPresentationProviderOld
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under the MIT license <LICENSE-MIT // https://opensource.org/licenses/MIT> or the Modified BSD license <LICENSE-BSD // https://opensource.org/licenses/BSD-3-Clause>, at your optio...
<|file_name|>archive.go<|end_file_name|><|fim▁begin|>package daemon import ( "errors" "io" "os" "path/filepath" "strings" "github.com/docker/docker/builder"<|fim▁hole|> "github.com/docker/docker/container" "github.com/docker/docker/pkg/archive" "github.com/docker/docker/pkg/chrootarchive" "github.com/docker/...
<|file_name|>test_reference_bind.py<|end_file_name|><|fim▁begin|># Copyright 2017 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from datet...
<|file_name|>selectors.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unle...
self.update_freq = update_freq
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models class Citizen(models.Model): """ The insurance users. """ name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) # Contact information email = models.EmailField() phone = mode...
(CC, 'cc'), (PASSPORT, 'Passport') ) document_type = models.CharField(max_length=5, choices=document_choices)
<|file_name|>Gatewaydfile.js<|end_file_name|><|fim▁begin|>module.exports = function(gatewayd) { // ADD PLUGINS HERE, SUCH AS SETUP WIZARD const WizardPlugin = require('gatewayd-setup-wizard-plugin'); var wizardPlugin = new WizardPlugin({<|fim▁hole|> gatewayd.server.use('/', wizardPlugin.router); }<|fim▁end|>
gatewayd: gatewayd });
<|file_name|>ApplicationMenuBar.java<|end_file_name|><|fim▁begin|>/* * aTunes * Copyright (C) Alex Aranda, Sylvain Gaudard and contributors * * See http://www.atunes.org/wiki/index.php?title=Contributing for information about contributors * * http://www.atunes.org * http://sourceforge.net/projects/atunes * * T...
this.playerMenu = playerMenu; }
<|file_name|>VariantDir.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the<|fim▁hole|># "Software"), to deal in the Software w...
<|file_name|>HeapDumpTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Publi...
<|file_name|>desktopswitch_es.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="es"> <context> <name>DesktopSwitch</name> <message> <location filename="../desktopswitch.cpp" line="84"/> <source>Switch to desktop %1</source> <...
<message> <location filename="../desktopswitchconfiguration.ui" line="59"/>
<|file_name|>syncwatcher_test.go<|end_file_name|><|fim▁begin|>// syncwatcher_test.go package main import ( "os" "path/filepath" "strconv" "strings" "testing" "time" ) var ( slash = string(os.PathSeparator) testDirectory = "test" + slash<|fim▁hole|>} func clearTestDir() { os.RemoveAll(testDirectory) ...
) func init() { // setupLogging(4, 2); // For debugging
<|file_name|>validate_authentication.go<|end_file_name|><|fim▁begin|>package authentication import ( "fmt" "io" "k8s.io/apimachinery/pkg/api/validation" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/util/validation/field" "k8s.io/apiserver/pkg/admission" ...
<|file_name|>arrange.rs<|end_file_name|><|fim▁begin|>//! Arranges a collection into a shareable trace structure. //! //! The `arrange` operator applies to a differential dataflow `Collection` and returns an `Arranged` //! structure, which maintains the collection's records in an indexed manner. //! //! Several operato...
} else {
<|file_name|>greg_weekday.hpp<|end_file_name|><|fim▁begin|>#ifndef GREG_WEEKDAY_HPP___ #define GREG_WEEKDAY_HPP___ /* Copyright (c) 2002,2003 CrystalClear Software, Inc. * Use, modification and distribution is subject to the * Boost Software License, Version 1.0. (See accompanying * file LICENSE_1_0.txt or http://...
greg_weekday(unsigned short day_of_week_num) :
<|file_name|>pulp_simulator.py<|end_file_name|><|fim▁begin|>import sys import numpy import scipy import json import itertools import random import os from sys import stderr, exit, argv from scipy.sparse.linalg import spsolve from sklearn.metrics.pairwise import euclidean_distances from nltk.stem import SnowballStemmer...
<|file_name|>_binned_statistic.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function, absolute_import import numpy as np from scipy.lib.six import callable def binned_statistic(x, values, statistic='mean', bins=10, range=None): """ Compute a binned stat...
# Compute the sample indices in the flattened statistic matrix. ni = nbin.argsort() xy = np.zeros(N, int)
<|file_name|>ntp.py<|end_file_name|><|fim▁begin|>"""Parsing and conversion of NTP dates contained in datagrams.""" import datetime<|fim▁hole|> # 63 zero bits followed by a one in the least signifigant bit is a special # case meaning "immediately." IMMEDIATELY = struct.pack('>q', 1) # From NTP lib. _SYSTEM_EPOCH = dat...
import struct import time
<|file_name|>emoji.go<|end_file_name|><|fim▁begin|>package helper const ( // EmojiStar const for unicode code EmojiStar = "\U00002B50" // EmojiAlarm const for unicode code EmojiAlarm = "\U000023F0" // EmojiDroplet const for unicode code EmojiDroplet = "\U0001F4A7" // EmojiGear const for unicode code EmojiGe...
EmojiBellCancelled = "\U0001F515"
<|file_name|>bulk_update_order.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms o...
<|file_name|>OpsReplacemeentTest.java<|end_file_name|><|fim▁begin|>package uk.ac.manchester.cs.openphacts.queryexpander.queryLoader; import java.util.List; import java.util.Set; import org.bridgedb.uri.tools.GraphResolver; import org.bridgedb.utils.Reporter; import static org.junit.Assert.*; import org.junit.Test; imp...
Reporter.println("Testing " + loader.getQueryName(queryKey)); String originalQuery = loader.getOriginalQuery(queryKey);
<|file_name|>proc_mounts_searcher_test.go<|end_file_name|><|fim▁begin|>package disk_test import ( "errors" . "github.com/cloudfoundry/bosh-init/internal/github.com/onsi/ginkgo" . "github.com/cloudfoundry/bosh-init/internal/github.com/onsi/gomega" . "github.com/cloudfoundry/bosh-init/internal/github.com/cloudfoun...
}) })
<|file_name|>bibformat_utils_unit_tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2010, 2011, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the...
self.assertEqual((False, 0), words_start_with_patterns(['thi'], ['this'])) self.assertEqual((True, 0), words_start_with_patterns(['this'], ['this']))
<|file_name|>CartDeposit.java<|end_file_name|><|fim▁begin|>package com.sk89q.craftbook.cart; <|fim▁hole|> import org.bukkit.block.Chest; import org.bukkit.block.Sign; import org.bukkit.entity.Minecart; import org.bukkit.entity.StorageMinecart; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.I...
import java.util.ArrayList; import java.util.Arrays;
<|file_name|>function_load.py<|end_file_name|><|fim▁begin|># Copyright (C) 2015-2022 by the RBniCS authors # # This file is part of RBniCS. # # SPDX-License-Identifier: LGPL-3.0-or-later from rbnics.utils.io import NumpyIO def function_load(fun, directory, filename, suffix=None): if suffix is not None: f...
return file_exists
<|file_name|>animation_group_player.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {scheduleMicroTask} from '../util'; import...
this.totalTime = this.players.reduce((time, player) => Math.max(time, player.totalTime), 0); }
<|file_name|>en_ca.js<|end_file_name|><|fim▁begin|>/*! * froala_editor v1.1.8 (http://editor.froala.com) * Copyright 2014-2014 Froala */ /** * English spoken in Canada */ $.Editable.LANGS['en_ca'] = { translation: { "Bold": "Bold", "Italic": "Italic", "Underline": "Underline", "Strikethrough": ...
"Color": "Colour", "Background Color": "Background Colour",
<|file_name|>server.js<|end_file_name|><|fim▁begin|>var eio = require('engine.io'), HashMap = require('hashmap').HashMap; function Server() { var self = this; self.endpoint = { port: 44444, host: 'localhost' }; self.server = eio.listen(self.endpoint.port, self.endpoint.host); ...
});
<|file_name|>LoopingRollerCoaster.cpp<|end_file_name|><|fim▁begin|>#pragma region Copyright (c) 2014-2017 OpenRCT2 Developers /***************************************************************************** * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. * * OpenRCT2 is the work of many authors, a full li...
trackSequence = mapLeftQuarterTurn3TilesToRightQuarterTurn3Tiles[trackSequence]; looping_rc_track_right_banked_quarter_turn_3_25_deg_up(session, rideIndex, trackSequence, (direction + 1) & 3, height, mapElement); }
<|file_name|>t198_lib_arg_float.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from runtest import TestBase class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'float-libcall', result=""" # DURATION TID FUNCTION [18276] | main() { 0.371 ms [18276] | expf(1....
if cflags.find('-finstrument-functions') >= 0:
<|file_name|>test_cpp_build_module.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 und...
<|file_name|>AlleleSubmission.py<|end_file_name|><|fim▁begin|># This file is part of saddle-bags. # # saddle-bags is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (a...
self.ipdSubmissionIdentifier = None self.ipdSubmissionVersion = None
<|file_name|>wheels.py<|end_file_name|><|fim▁begin|>from enum import Enum from Adafruit_MotorHAT import Adafruit_MotorHAT, Adafruit_DCMotor import time import atexit Direction = Enum('Forward','Reverse','Spin','Left','Right','None') class Wheels: def __init__(self): self.lc = 100 #Loop count self...
self.setSpeed(100,Direction.Spin) time.sleep(2) self.setSpeed(0,Direction.Spin)
<|file_name|>CassandraInstanceDao.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 BrightTag, 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.a...
* @param ring name of the Cassandra ring
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Hiveary https://hiveary.com Licensed under Simplified BSD License (see LICENSE) (C) Hiveary, Inc. 2013-2014 all rights reserved """ import platform import sys from hiveary import __version__ as version current_platform = platform.system(...
else:
<|file_name|>_align.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class AlignValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="align", parent_name="scatterternary.hoverlabel", **kwargs<|fim▁hole|> ): super(AlignValidator, self)._...
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
require('./ramda-mori')
<|file_name|>bucles.py<|end_file_name|><|fim▁begin|>a = [1,2,3,4,5] b = [2,3,4,5,6] to_100=list(range(1,100)) print ("Printing B") <|fim▁hole|> print ("Printing A") for i in b: print i print ("Print 100 elements") for i in to_100: print i<|fim▁end|>
for i in a: print i
<|file_name|>dropdown.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip']) .provider('$dropdown', function() { var defaults = this.defaults = { animation: 'am-fade', prefixClass: 'dropdown', prefixEvent: 'dropdown', placemen...
$dropdown.show = function() { show(); // use timeout to hookup the events to prevent
<|file_name|>EndgamesPanel.py<|end_file_name|><|fim▁begin|>import random from io import StringIO from gi.repository import Gtk from pychess.compat import create_task from pychess.System.prefix import addDataPrefix from pychess.Utils.const import WHITE, BLACK, LOCAL, NORMALCHESS, ARTIFICIAL, chr2Sign, chrU2Sign, FAN_P...
from pychess.Utils.lutils.attack import isAttacked from pychess.Utils.lutils.LBoard import LBoard from pychess.Utils.lutils.lmove import FILE, RANK
<|file_name|>poll.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Poll sensor data log file Poll the sensor data log file periodically and use parse_log to submit new values via http. """ import time from subprocess import call LOG_FILE = 'aginovadb.log' PARSER = 'parse_log.py'<|fim▁hole|>def main(): ...
POLL_INTERVAL = 120 # in seconds
<|file_name|>isr.rs<|end_file_name|><|fim▁begin|>// Zinc, the bare metal stack for rust. // Copyright 2014 Vladimir "farcaller" Pouzanov <farcaller@gmail.com> // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a cop...
//! ISR Data for lpc17xx
<|file_name|>tcp.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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...
let mut buf = [0]; stream.read(&mut buf).unwrap(); assert_eq!(buf[0], 99); }
<|file_name|>vec.go<|end_file_name|><|fim▁begin|>package geom import ( "math" ) // Vec is a 3-component vector.<|fim▁hole|> // Add returns a + b. func (a Vec) Add(b Vec) Vec { return Vec{ a[0] + b[0], a[1] + b[1], a[2] + b[2], } } // MAdd (multiply-add) returns a + s*b. func (a Vec) MAdd(s float64, b Vec) V...
// Used to represent either points in space or vectors. type Vec [3]float64
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// just-install - The simple package installer for Windows // Copyright (C) 2020 just-install authors. // // 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 ...
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details.
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url from django.shortcuts import redirect from olympia.stats.urls import stats_patterns from . import views ADDON_ID = r"""(?P<addon_id>[^/<>"']+)""" # These will all start with /addon/<addon_id>/ detail_patterns = [ url('...
# Hardcode because there is no relation from blocklist items and the
<|file_name|>0005_rename_to_emailnotification.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-04-24 15:01 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration):<|fim▁hole|> operations = [ migrations.Rena...
dependencies = [("notification", "0004_delete_old_email_notification")]
<|file_name|>alg_binarysearcharray_binarysearch_spec.ts<|end_file_name|><|fim▁begin|>import {ArrayBinarySearch} from '../alg/binarysearch/ArrayBinarySearch'; describe('ArrayBinarySearch', () => { let binsearch = new ArrayBinarySearch(); describe('#search()', () => { it("should return vali...
}); }); });
<|file_name|>format_CIAAW.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import re import mpmath as mp mp.dps=250 mp.mp.dps = 250 if len(sys.argv) != 2: print("Usage: format_CIAAW.py ciaawfile") quit(1) <|fim▁hole|>path = sys.argv[1] atomre = re.compile(r'^(\d+) +(\w\w*) +(\w+) +\[?(\d+)\...
<|file_name|>bitcoin_ru.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ru" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Neutralitycoin</sour...
<message> <location line="+5"/> <source>New key generation failed.</source> <translation>Генерация нового ключа не удалась.</translation>
<|file_name|>test_compression.py<|end_file_name|><|fim▁begin|>import asyncio import functools import random import time from testing import Client from testing import default_test_setup from testing import gen_data from testing import gen_points from testing import gen_series from testing import InsertError from testin...
series, n=0.8,
<|file_name|>stream_random.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com> # # Licensed under BSD3. See the LICENSE.txt file in the root of this distribution. from simulation.aivika.modeler.model import * from simulation.aivika.modeler.port import * from simulation.aivika.m...
y.bind_to_input() y.write(code)
<|file_name|>erapi.py<|end_file_name|><|fim▁begin|>#-*- encoding: utf-8 -*- import csv, math, time, re, threading, sys try: from urllib.request import urlopen except ImportError: from urllib import urlopen class ErAPI(): # Metodo constructor, seteos basicos necesarios de configuracion, instancia objetos ...
"Recruit", "Private",
<|file_name|>macro.rs<|end_file_name|><|fim▁begin|>// aux-build:macro_inner.rs // aux-build:proc_macro.rs // build-aux-docs #![deny(broken_intra_doc_links)] extern crate macro_inner; extern crate proc_macro_inner; // @has 'macro/macro.my_macro.html' '//a[@href="../macro_inner/struct.Foo.html"]' 'Foo' pub use macro_inn...
<|file_name|>model_clip_iterator.rs<|end_file_name|><|fim▁begin|>use std::cmp::min; use std::slice::Iter; use cairo; use super::context::CellMetrics; use crate::ui_model; pub struct RowView<'a> { pub line: &'a ui_model::Line, pub cell_metrics: &'a CellMetrics, pub line_y: f64, pub ctx: &'a cairo::Con...
ctx, cell_metrics,
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.contrib.auth.models import User from harnas.userprofile.models import UserProfile class UserProfileEditForm(forms.ModelForm): class Meta: model = UserProfile<|fim▁hole|> fields = ('organization', 'personal_page'...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #![deny(warnings)] #![deny(rust_2018_idioms)] // #![deny(clippy::all)] #![deny(cli...
mod program; mod signatures; mod transform;
<|file_name|>bigmeal.py<|end_file_name|><|fim▁begin|>""" Prosta klasa reprezentująca posiłek składający się z wielu innych obiektów jadalnych. """ class BigMeal: def __init__(self, edibles): # TODO: zainicjuj obiekt przekazaną listą obiektów jadalnych # "edibles" def get_name(self): # ...
# składowych obiektów jadalnych
<|file_name|>user_story_set_unittest.py<|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. import os import unittest from telemetry.story import shared_state from telemetry impor...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import boto import copy import itertools import re import six from collections import defaultdict from datetime import datetime from boto.ec2.instance import Instance as BotoInstance, Reservation from boto.ec2.blockdevicemappi...
eip = ec2_backend.allocate_address(domain='standard')
<|file_name|>invert.py<|end_file_name|><|fim▁begin|># Invert gray image import cv2 from . import print_image from . import plot_image def invert(img, device, debug=None): """Inverts grayscale images. Inputs: img = image object, grayscale device = device number. Used to count steps in the pipeli...
""" device += 1 img_inv = cv2.bitwise_not(img)
<|file_name|>npc_taxi.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/> * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU ...
if (player->GetQuestStatus(11542) == QUEST_STATUS_COMPLETE || player->GetQuestStatus(11543) == QUEST_STATUS_COMPLETE)
<|file_name|>TractInfo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import argparse import logging import os import tractconverter.info as info import tractconverter from tractconverter import FORMATS from tractconverter import EXT_ANAT # Script description DESCRIPTION = """ TractInfo {0}. Print info about ...
if __name__ == "__main__": main()
<|file_name|>visa.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ pyvisa.visa ~~~~~~~~~~~ Module to provide an import shortcut for the most common VISA operations. This file is part of PyVISA.<|fim▁hole|> from __future__ import division, unicode_literals, print_function, absolute_import f...
:copyright: 2014 by PyVISA Authors, see AUTHORS for more details. :license: MIT, see COPYING for more details. """