prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>ZKMessages.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you unde...
*/ package org.apache.twill.internal;
<|file_name|>__config__.py<|end_file_name|><|fim▁begin|># This file is generated by /tmp/pip-kUGBJh-build/-c # It contains system_info results at the time of building this package. __all__ = ["get_info","show"] lapack_opt_info={'libraries': ['openblas', 'openblas'], 'library_dirs': ['/usr/local/lib'], 'language': 'c',...
if k == "sources" and len(v) > 200: v = v[:60] + " ...\n... " + v[-60:] print(" %s = %s" % (k,v))
<|file_name|>context.go<|end_file_name|><|fim▁begin|>package api2go import ( "context" "time" ) // APIContextAllocatorFunc to allow custom context implementations type APIContextAllocatorFunc func(*API) APIContexter // APIContexter embedding context.Context and requesting two helper functions type APIContexter int...
<|file_name|>index_spec.js<|end_file_name|><|fim▁begin|>import { cachedData, getCurrentHoverElement, setCurrentHoverElement, addInteractionClass, } from '~/code_navigation/utils'; afterEach(() => { if (cachedData.has('current')) { cachedData.delete('current'); } }); describe('getCurrentHoverElement', ...
${undefined} `('it returns cached current key', ({ value }) => {
<|file_name|>strings.js<|end_file_name|><|fim▁begin|>define({ "configText": "아래의 필터 그룹 정의", "labels": { "groupName": "필터 설정 이름:", "groupNameTip": "사용자가 선택할 필터의 이름입니다.", "groupDesc": "설명:", "groupDescTip": "필터 설정의 설명입니다.", "groupOperator": "프리셋 연산자:", "groupOperatorTip": "필터의 연산자를 미리 정의하는 옵션입...
"simpleMode": "간단한 뷰에서 시작",
<|file_name|>_annotations.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class AnnotationsValidator(_plotly_utils.basevalidators.CompoundArrayValidator): def __init__(self, plotly_name="annotations", parent_name="layout.scene", **kwargs): super(AnnotationsValidator, self).__init__( ...
"auto", the anchor is equivalent to "middle" for data-referenced annotations or if there is
<|file_name|>rigidbody.js<|end_file_name|><|fim▁begin|>var box, mbox; function demo() { cam ( 0, 20, 40 ); world = new OIMO.World(); world.add({ size:[50, 10, 50], pos:[0,-5,0] }); // ground var options = { type:'box', size:[10, 10, 10], pos:[0,20,0],<|fim▁hole|> } bo...
density:1, move:true
<|file_name|>compress_assets.py<|end_file_name|><|fim▁begin|>import hashlib import os import re import time import uuid import subprocess from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.staticfiles.finders import find as find_static_path from oly...
css_out.write(css_parsed) # Return bundle hash for cachebusting JS/CSS files. file_hash = hashlib.md5(css_parsed).hexdigest()[0:7]
<|file_name|>ch07_relay_click.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import RPi.GPIO as GPIO import time # Configure the Pi to use the BCM (Broadcom) pin names, rather than the pin positions GPIO.setmode(GPIO.BCM) relay_pin = 18 GPIO.setup(relay_pin, GPIO.OUT) try: while True: GPIO.output(r...
<|file_name|>test_fileinfo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 <|fim▁hole|># # 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 opt...
# ScatterBackup - A chaotic backup solution # Copyright (C) 2015 Ingo Ruhnke <grumbel@gmail.com>
<|file_name|>booksim_config.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include "config_utils.hpp" class BookSimConfig : public Configuration { public: BookSimConfig( ); }; #endif<|fim▁end|>
#ifndef _BOOKSIM_CONFIG_HPP_ #define _BOOKSIM_CONFIG_HPP_
<|file_name|>DP20151228A.py<|end_file_name|><|fim▁begin|>""" [2015-12-28] Challenge #247 [Easy] Secret Santa https://www.reddit.com/r/dailyprogrammer/comments/3yiy2d/20151228_challenge_247_easy_secret_santa/ # Description Every December my friends do a "Secret Santa" - the traditional gift exchange where everybody is...
<|file_name|>ExashareCom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from ..internal.XFSAccount import XFSAccount <|fim▁hole|> __type__ = "account" __version__ = "0.06" __status__ = "testing" __description__ = """Exashare.com account plugin""" __license__ = "GPLv3" __authors__ = [("...
class ExashareCom(XFSAccount): __name__ = "ExashareCom"
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>############################################################################## #<|fim▁hole|># # 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...
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version.
<|file_name|>test_casting_unittests.py<|end_file_name|><|fim▁begin|>""" The tests exercise the casting machinery in a more low-level manner. The reason is mostly to test a new implementation of the casting machinery. Unlike most tests in NumPy, these are closer to unit-tests rather than integration tests. """ import ...
assert_array_equal(expected, arr_NULLs.astype(dtype)) def test_float_to_bool(self):
<|file_name|>recovery.go<|end_file_name|><|fim▁begin|>package martini import ( "bytes" "fmt" "io/ioutil"<|fim▁hole|> "net/http" "runtime" ) const ( panicHtml = `<html> <head><title>PANIC: %s</title> <style type="text/css"> html, body { font-family: "Roboto", sans-serif; color: #333333; background-color: #ea53...
"log"
<|file_name|>string.rs<|end_file_name|><|fim▁begin|>use crate::ffi_fn; use libc::c_char; use std::ffi::{CStr, CString}; use std::ops::Not; // All of this module is `pub(crate)` and should not appear in the C header file // or documentation. /// Converts the string into a C-compatible null terminated string, /// then ...
<|file_name|>TestAbomination.java<|end_file_name|><|fim▁begin|>package com.hearthsim.test.minion; import com.hearthsim.card.Card; import com.hearthsim.card.CharacterIndex; import com.hearthsim.card.basic.minion.BoulderfistOgre; import com.hearthsim.card.basic.minion.RaidLeader; import com.hearthsim.card.classic.minion...
<|file_name|>gensymed.rs<|end_file_name|><|fim▁begin|>// edition:2018 <|fim▁hole|><|fim▁end|>
mod std {}
<|file_name|>mat.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import import re from collections import OrderedDict from uuid import uuid4 from warnings import warn from numpy import object as np_object from numpy import array, inf, isinf from six import string_types from c...
new_reaction.id = str(name[0][0])
<|file_name|>test_protein_motif_encoder.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_protein_motif_encoder ---------------------------------- Tests for `protein_motif_encoder` module. """ import pandas as pd import pytest from click.testing import CliRunner import cli def t...
<|file_name|>gage_graphs.py<|end_file_name|><|fim▁begin|>import datetime from django.http import HttpResponse import logging from natsort import natsorted import pandas as pd from PyPDF2 import PdfFileReader, PdfFileMerger from pyper import * import json from database.models import ko_entry import functions LOG_FIL...
<|file_name|>webpack.config.optimize.js<|end_file_name|><|fim▁begin|>'use strict'; // eslint-disable-line const { default: ImageminPlugin } = require('imagemin-webpack-plugin'); const imageminMozjpeg = require('imagemin-mozjpeg'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin') const config = require('./con...
<|file_name|>tpm_other.go<|end_file_name|><|fim▁begin|>//go:build !windows // +build !windows /* Copyright 2021 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at<|fim▁hole|> ...
<|file_name|>ExampleUnitTest.java<|end_file_name|><|fim▁begin|>package com.fragmobile; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation<...
} }
<|file_name|>charts-legend-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:723a8517e1cf6d7394b64767b5361ca7f77278fc4d699827b5994af7b1be1714<|fim▁hole|><|fim▁end|>
size 183710
<|file_name|>ResourceBurstType.java<|end_file_name|><|fim▁begin|>// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost up...
public void setStatus(ResourceBurstStatus value) { this.status = value; }
<|file_name|>TdlMath.java<|end_file_name|><|fim▁begin|>// Copyright 2011 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/l...
m[11] = -1;
<|file_name|>ccseg.py<|end_file_name|><|fim▁begin|>from tfs import * from pylab import * from numpy import * import glob, os import nibabel as nib matplotlib.interactive(True) session = tf.InteractiveSession() dataPath = './corpusCallosum/' # Class to serve up segmented images def computePad(dims,depth): y1=y2=x1...
<|file_name|>qpacketprotocol.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtDeclarative module of the Qt Toolkit. *...
<|file_name|>ShowCertification.js<|end_file_name|><|fim▁begin|>const certificationUrl = '/certification/developmentuser/responsive-web-design'; const projects = { superBlock: 'responsive-web-design', block: 'responsive-web-design-projects', challenges: [ { slug: 'build-a-tribute-page', solution: '...
{ slug: 'build-a-personal-portfolio-webpage', solution: 'https://codepen.io/moT01/pen/vgOaoJ' }
<|file_name|>blueprints.py<|end_file_name|><|fim▁begin|>######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 # # ...
<|file_name|>counts.py<|end_file_name|><|fim▁begin|>import logging import time from collections import OrderedDict, defaultdict from datetime import datetime, timedelta from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union from django.conf import settings from django.db import connection from djang...
sql_data_collector( UserCount, check_useractivityinterval_by_user_query(realm), None), CountStat.DAY, interval=timedelta(days=1)-UserActivityInterval.MIN_INTERVAL_LENGTH),
<|file_name|>helper.py<|end_file_name|><|fim▁begin|>## pythonFlu - Python wrapping for OpenFOAM C++ API ## Copyright (C) 2010- Alexey Petrov ## Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the...
<|file_name|>NonTransientResource.java<|end_file_name|><|fim▁begin|>package org.axonframework.test.saga; public class NonTransientResource {<|fim▁hole|><|fim▁end|>
}
<|file_name|>webgltexture.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/. */ // https://www.khronos.org/registry/webgl/specs/latest/1...
pub fn populate_mip_chain(&self, first_level: u32, last_level: u32) -> WebGLResult<()> { let base_image_info = self.image_info_at_face(0, first_level);
<|file_name|>ctimagetreemodel_serializer.cpp<|end_file_name|><|fim▁begin|>/* This file is part of perfusionkit. Copyright 2010 Henning Meyer perfusionkit is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Fo...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::env; use std::io::Read; use std::fs::File; use std::path::Path; use std::path::PathBuf; use std::collections::HashMap; use std::collections::HashSet; fn main() { let mut data_path: PathBuf = env::current_dir().unwrap(); data_path.push("data"); data...
}
<|file_name|>vala.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 import os.path, shutil import Task, Runner, Utils, Logs, Build, Node, Options from TaskGen import extension, after, before EXT_VALA = ['.vala', '.gs'] class valac_task(Task.Task): vars = ("VALAC", "VALAC_VER...
<|file_name|>bigiq_regkey_license_assignment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function _...
to do licensing. Usually this is the C(Administrator) role. - When C(managed) is C(no), this parameter is required. type: str device_password:
<|file_name|>actions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Smewt - A smart collection manager # Copyright (c) 2008-2013 Nicolas Wack <wackou@smewt.com> # # Smewt is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
# then we would look into the available graphs where such a Metadata has files, # and choose the one on the fastest media (ie: local before nfs before tcp) # it should also choose subtitles the same way, so we could even imagine reading # the video from one location and the subs from another
<|file_name|>topo_sort.py<|end_file_name|><|fim▁begin|># Original topological sort code written by Ofer Faigon (www.bitformation.com) and used with permission # Permission is hereby granted to copy, modify and use this source code for any purpose as long as the above comment line is included with it. """ Loop detecti...
graph[child][0] = graph[child][0] - 1 if graph[child][0] == 0: roots.append(child)
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|># coding=latin-1 from flask import request, g from flask import abort, flash from functools import wraps def checa_permissao(permissao): def decorator(f): @wraps(f) def inner(*args, **kwargs): if g.user and g.user.checa_...
return f(*args, **kwargs) else:
<|file_name|>fem.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """FEM library Demonstrates some simple finite element definitions, and computes a mass matrix $ python fem.py [ 1/60, 0, -1/360, 0, -1/90, -1/360] [ 0, 4/45, 0, 2/45, 2/45, -1/90] [-1/360, 0, 1/60, -1/90, 0, -1/36...
us = [] for i in range(0, fe.nbf()):
<|file_name|>ReplayVersion3Offsets.py<|end_file_name|><|fim▁begin|>from spyparty.ReplayOffsets import ReplayOffsets <|fim▁hole|> class ReplayVersion3Offsets(ReplayOffsets): def extract_number_offset(self): return 0x00 def get_file_version_offset(self): return 0x04 def get_protocol_version_...
<|file_name|>schema.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 pandas-gbq Authors All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Helper methods for BigQuery schemas""" import copy # API may return data types as legacy SQL, so m...
fields_sorted = sorted(fields, key=lambda field: field["name"]) clean_schema = [] for field in fields_sorted: field_type = field["type"].upper()
<|file_name|>message.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::hash::{Hash, Hasher}; use std::str::from_utf8; use std::collections::HashMap; use hdata::HData; use errors::WeechatError; use errors::WeechatError::ParseError; use parse::Parse; use strdata::StrData; /// Holds header information for data rec...
} /// Message received from weechat
<|file_name|>rijndael.py<|end_file_name|><|fim▁begin|>""" A pure python (slow) implementation of rijndael with a decent interface To include - from rijndael import rijndael To do a key setup - r = rijndael(key, block_size = 16) key must be a string of length 16, 24, or 32 blocksize must be 16, 24, or 32. Default i...
<|file_name|>demo-cdr.component.spec.ts<|end_file_name|><|fim▁begin|>import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { DemoCdrComponent } from './demo-cdr.component'; import { UiSwitchModule } from '../../lib/ui-...
beforeEach( waitForAsync(() => { TestBed.configureTestingModule({
<|file_name|>DatabaseHandler.py<|end_file_name|><|fim▁begin|>import MySQLdb class DatabaseHandler: def __init__(self): pass def is_delete(self, tableName): reservedTableNameList = ["mantis_user_table", "mantis_tokens_table", "mantis_config_table"] isDeleteFlag = 1 for nam...
# databaseHandler.clean_database("localhost", "spark", "spark", "robottest")
<|file_name|>0006_sapelliproject_sapelli_fingerprint.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals<|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('geokey_sapelli', '0005_sapellifield_truefalse'), ] operations = [ migr...
from django.db import models, migrations
<|file_name|>shootout-fasta-redux.rs<|end_file_name|><|fim▁begin|>// The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // contributed by the Rust Project Developers // Copyright (c) 2013-2014 The Rust Project Developers // // All rights reserved. // // Redistribution and use in sourc...
impl<'a, W: Writer> RandomFasta<'a, W> {
<|file_name|>destructure-trait-ref.rs<|end_file_name|><|fim▁begin|>// The regression test for #15031 to make sure destructuring trait<|fim▁hole|>#![feature(box_patterns)] #![feature(box_syntax)] trait T { fn foo(&self) {} } impl T for isize {} fn main() { // For an expression of the form: // // let &...
// reference work properly.
<|file_name|>HashThreeTest.java<|end_file_name|><|fim▁begin|>package com.github.andriell.collection; import org.junit.Test; import static org.junit.Assert.assertEquals; /** * Created by Andrey on 13.02.2016 */ public class HashThreeTest { public static void main(String[] args) { HashThreeTest test = ne...
}
<|file_name|>ui_role_tree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """Test of tree output using Firefox.""" from macaroon.playback import * import utils sequence = MacroSequence() sequence.append(PauseAction(3000)) sequence.append(KeyComboAction("<Alt>b")) sequence.append(KeyComboAction("Return")) sequence...
" VISIBLE: 'Bookmarks Toolbar TREE LEVEL 2', cursor=1", "SPEECH OUTPUT: 'Bookmarks Toolbar.'"]))
<|file_name|>XBeeHandler.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Riccardo Miccini. All rights reserved. #include "XBeeHandler.h" #include "XBee.h" #include <SoftwareSerial.h> uint8_t payload[] = {0, 0}; uint8_t cmdNI[] = {'N', 'I'}; XBeeHandler::XBeeHandler(uint8_t statusLed, uint8_t errorLed, uin...
} XBeeHandler::XBeeHandler(uint8_t statusLed, uint8_t errorLed, uint8_t dataLed) {
<|file_name|>ImputerPreprocessor.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You...
/**
<|file_name|>cssifyStaticStyle-test.js<|end_file_name|><|fim▁begin|>import { createRenderer } from 'fela' import cssifyStaticStyle from '../cssifyStaticStyle' describe('Cssifying static css declarations', () => { it('should return the minified style string', () => {<|fim▁hole|> .foo { color: red }...
expect(cssifyStaticStyle('.foo{color:red}')).toEqual('.foo{color:red}') expect( cssifyStaticStyle( `
<|file_name|>process_org_apps.py<|end_file_name|><|fim▁begin|># Copyright 2011 the Melange 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/LICENS...
else: yield operation.counters.Increment("proposals_ignored")
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>/* The filesystem package provides an http.FileSystem implementation that may contain file data not present in the host operating system. */<|fim▁hole|>package filesystem<|fim▁end|>
<|file_name|>sender.js<|end_file_name|><|fim▁begin|>// =================================================================== // // Mixology example: SENDER // Gearcloud Labs, 2014<|fim▁hole|>// // Main parts // mNode code (ie, WebRTC setup via Mixology) // // Video effects // Photo booth - Colors and reflections; ...
<|file_name|>test_postprocessor_manager.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **GUI Test Cases.** Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under ...
# one layer (the impact) should have been added expected_count = len(CANVAS.layers()) + 1 # # Press RUN
<|file_name|>CreateAttachmentCmd.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2020 Alfresco Software, Ltd. * * 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...
protected String taskId;
<|file_name|>program_struct.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The Google Research 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.apa...
"""
<|file_name|>use_queue.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng <|fim▁hole|> # Get the queue. This returns an SQS.Queue instance queue = sqs.get_queue_by_name(QueueName='test') # You can now access identifiers and attributes print(queue.url) print(queue.attri...
import boto3 # Get the service resource sqs = boto3.resource('sqs')
<|file_name|>pissalotCouchService.js<|end_file_name|><|fim▁begin|>'use strict'; /* Service to retrieve data from backend (CouchDB store) */ pissalotApp.factory('pissalotCouchService', function ($resource) { return $resource('http://192.168.1.4:8080/measurement/:listType',{ listType: '@listType' }, { ...
method: 'GET', isArray: false }
<|file_name|>workspaces.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate cargotest; extern crate hamcrest; use std::io::{Read, Write}; use std::fs::File; use cargotest::sleep_ms; use cargotest::support::{project, execs, git}; use cargotest::support::registry::Package; use hamcrest::{assert_that, existing_fil...
}
<|file_name|>CutterPI.js<|end_file_name|><|fim▁begin|>/** * OpenEyes * * (C) Moorfields Eye Hospital NHS Foundation Trust, 2008-2011 * (C) OpenEyes Foundation, 2011-2013 * This file is part of OpenEyes. * OpenEyes is free software: you can redistribute it and/or modify it under the terms of the GNU General Public...
ctx.beginPath();
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from requests.auth import HTTPBasicAuth def apply_updates(doc, update_dict): # updates the doc with items from the dict # returns whether or not any updates were made should_save = False for key, value in update_dict.items(): if getattr(doc, k...
def _urlcombine(self, base, target): return '{base}{target}'.format(base=base, target=target)
<|file_name|>solution1.py<|end_file_name|><|fim▁begin|># Python3<|fim▁hole|> import base64 def weirdEncoding(encoding, message): return base64.b64decode(message, encoding).decode()<|fim▁end|>
<|file_name|>test_interface.py<|end_file_name|><|fim▁begin|>import pilas def test_todos_los_objetos_de_interfaz_se_pueden_crear(): pilas.iniciar() deslizador = pilas.interfaz.Deslizador() assert deslizador assert deslizador.progreso == 0 <|fim▁hole|> ingreso = pilas.interfaz.IngresoDeTexto() as...
boton = pilas.interfaz.Boton() assert boton
<|file_name|>logger_state.rs<|end_file_name|><|fim▁begin|>use std::io ; use std::io::Write ; use std::thread ; use std::thread::Thread ; use std::sync::mpsc ; use std::sync::atomic::Ordering ; use integer_atomics::AtomicU32 ; use std::net::TcpStream ; use std::collections::HashMap ; use std::fs::File ; use std::io::Buf...
pub fn close_buffer_write_stream(&mut self) { if DEBUG_LOGGER && self.write_stream.is_some() {
<|file_name|>agherant_standalone.py<|end_file_name|><|fim▁begin|>from flask import Flask, request from flask_bootstrap import Bootstrap from flask_babel import Babel import agherant from webserver_utils import gevent_run def create_app(conf): app = Flask(__name__) app.config.update(conf) Bootstrap(app) ...
main()
<|file_name|>ScriptEngineManagerWrapperTest.java<|end_file_name|><|fim▁begin|>package com.github.database.rider.core.script; import org.assertj.core.api.SoftAssertions; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import javax.script.ScriptException;...
softly.assertThat(scriptEngineManager.getScriptAssert(script, 2)).as("groovy script with value=2").isTrue(); softly.assertThat(scriptEngineManager.getScriptAssert(script, 0)).as("groovy script with value=0").isFalse();
<|file_name|>aim_server.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from ServerConfig import Aim from ServerConfig import TellStore from ServerConfig import General from ServerConfig import Storage from ServerConfig import Kudu def hostToIp(host): return General.infinibandIp[host] def semicolonReduce(x, y): r...
#!/usr/bin/env python from threaded_ssh import ThreadedClients
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import argparse import yaml from jubatus.classifier.client import classifier from jubatus.classifier.types import * from jubaweather.version import get_version def parse_options(): parser = argparse.ArgumentParser() parser.add_argument( '-a', required = Tr...
season, avetemp, maxtemp, mintemp, pressure, humidity = map(str.strip, data.strip().split(','))
<|file_name|>fitsinfo.py<|end_file_name|><|fim▁begin|># Licensed under a 3-clause BSD style license - see LICENSE.rst """ ``fitsinfo`` is a command-line script based on astropy.io.fits for<|fim▁hole|>printing a summary of the HDUs in one or more FITS files(s) to the standard output. Example usage of ``fitsinfo``: 1. ...
<|file_name|>linux_lvm_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import import os.path # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock...
pvdisplay = MagicMock(return_value=False) with patch('salt.modules.linux_lvm.pvdisplay', pvdisplay): mock = MagicMock(return_value=True)
<|file_name|>blueprint.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import redirect, request from indico.mo...
<|file_name|>ansi.rs<|end_file_name|><|fim▁begin|>pub const ANSI_RESET: &'static str = "\x1b[0m"; pub const ANSI_RED: &'static str = "\x1b[31m"; pub const ANSI_GREEN: &'static str = "\x1b[32m"; pub const ANSI_YELLOW: &'static str = "\x1b[33m"; pub const ANSI_MAGENTA: &'static str = "\x1b[35m"; pub const ANSI_CYAN: &'st...
pub const ANSI_BRIGHT_WHITE: &'static str = "\x1b[97m";
<|file_name|>AliasSetTracker.cpp<|end_file_name|><|fim▁begin|>//===- AliasSetTracker.cpp - Alias Sets Tracker implementation-------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apac...
MemoryLocation(Entry.getValue(), Size, AAInfo)); if (Result != MustAlias) { Alias = SetMayAlias; AST.TotalMayAliasSetSize += size();
<|file_name|>0x05_call_by_reference.js<|end_file_name|><|fim▁begin|>import { Component } from 'react'; import Router from 'next/router'; import io from 'socket.io-client'; import fetch from 'isomorphic-fetch'; import Page from '../../layouts/page.js'; import Slide from '../../components/slide.js'; import Code from '.....
const mapDispatchToProps = dipatch => ({ changeRole: role => (dispatch(_changeRole(role)))
<|file_name|>entrycompletion.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk 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 // (at your op...
None
<|file_name|>user.js<|end_file_name|><|fim▁begin|>// UserController for AngularJS ecollabroApp.controller('userController', ['$scope', 'securityService', function ($scope, securityService) { $scope.user = {}; $scope.activeRoles = []; $scope.userId = 0; //Method initialize $scope.initialize ...
showMessage("divSummaryMessageUser", resp.businessException.ExceptionMessage, "danger"); } }); };
<|file_name|>mp2processor.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** ** kjmp2 -- a minimal MPEG-1/2 Audio Layer II decoder library ** ** version 1.1 ** *********************...
0x000A1, 0x0009A, 0x00093, 0x0008B, 0x00084, 0x0007D, 0x00075, 0x0006F,
<|file_name|>JsonPropertyDecorator.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = des...
}, {
<|file_name|>view_tools.py<|end_file_name|><|fim▁begin|>from flask import request, abort, session from functools import wraps import logging import urllib.request as urllib2 import numpy as np import cv2 import random from annotator_supreme.views import error_views from io import StringIO from PIL import Image from ann...
def get_param_from_request(request, label): """
<|file_name|>auto-formatter.js<|end_file_name|><|fim▁begin|>'use strict'; describe('AutoFormatter', function() { var event = require('../polyfill/event'); var AutoFormatter = require('../src/auto-formatter'); var autoFormatter; var inputNode; var config = { limitToMaxLength: true, recurringPattern: f...
assert.equal(inputNode.value, '12,345,678.90');
<|file_name|>last_binding_operation.go<|end_file_name|><|fim▁begin|>package handlers import ( "errors" "fmt" "net/http" "code.cloudfoundry.org/lager" "github.com/gorilla/mux" "github.com/pivotal-cf/brokerapi/v8/domain" "github.com/pivotal-cf/brokerapi/v8/domain/apiresponses" "github.com/pivotal-cf/brokerapi/v...
h.respond(w, http.StatusPreconditionFailed, requestId, apiresponses.ErrorResponse{
<|file_name|>lcd_demo.py<|end_file_name|><|fim▁begin|>''' Created on Dec 13, 2015 @author: Shannon Litwin ''' import Adafruit_BBIO.GPIO as GPIO import Adafruit_BBIO.PWM as PWM import Lib_LCD as LCD import Lib_Main as BBB import sys import signal import time leftForward = "P8_46" leftBackward = "P8_45" rightForward = ...
LCD.backlight("off") time.sleep(1)
<|file_name|>integration.go<|end_file_name|><|fim▁begin|>package main import ( "bytes" "errors" "fmt" "os" "os/exec" "path/filepath" "regexp" "runtime" "strconv" "strings" "sync" "time" ) var ( bashPath string debugging = false erroring = false maxprocs = 4 testPattern = regexp.MustCompile...
defer wg.Done() for {
<|file_name|>japanese_range.py<|end_file_name|><|fim▁begin|># coding=utf-8 jchars = u'。々ゝヽゞヾーぁァあアぃィいイぅゥうウヴぇェえエぉォおオヵかカがガきキぎギくクぐグヶけケげゲこコごゴさサざザしシじジすスず' \ u'ズせセぜゼそソぞゾたタだダちチぢヂっッつツづヅてテでデとトどドなナにニぬヌねネのノはハばバぱパひヒびビぴピふフぶブぷプへ' \ u'ヘべベぺペほホぼボぽポまマみミむムめメもモゃャやヤゅュゆユょョよヨらラりリるルれレろロゎヮわワゐヰゑヱをヲんン一丁七万-' \ u'下不与丑且世丘...
u'拙招拝拠拡括拷拾持指挑挙挟振挿捕捜捨据掃授掌排掘掛採探接控推措掲描提揚換握揮援揺損搬搭携搾摂摘摩撃撤撮撲擁操擦擬支改攻放政' \ u'故敏救敗教敢散敬数整敵敷文斉斎斗料斜斤斥断新方施旅旋族旗既日旧-早旬昆昇昌明易昔星映春昨昭是昼時晩普景晴晶暁暇暑暖暗暦暫暮暴' \
<|file_name|>HttpChannelConfig.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010-2020 Contributors to the openHAB project * * See the NOTICE file(s) distributed with this work for additional * information. * * This program and the accompanying materials are made available under the * terms of the Eclips...
} private void createMaps() { addToMaps(this.onValue, OnOffType.ON);
<|file_name|>webpack.dev.conf.js<|end_file_name|><|fim▁begin|>var config = require('./config') var webpack = require('webpack') var merge = require('webpack-merge') var utils = require('./utils') var baseWebpackConfig = require('./webpack.base.conf') var HtmlWebpackPlugin = require('html-webpack-plugin') var FriendlyEr...
// add hot-reload related code to entry chunks Object.keys(baseWebpackConfig.entry).forEach(function (name) {
<|file_name|>router.rs<|end_file_name|><|fim▁begin|>use std::fmt; use std::error::Error; use std::fmt::Display; use std::io::Read; use std::io; use tiny_http::{Request, Method, StatusCode}; use rustc_serialize::json; use rustc_serialize::json::Json; use url_parser; use url_parser::UrlResource; use std::io::Cursor; ...
UnknownResource,
<|file_name|>test_dhcp_agent.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # htt...
self._test_metadata_proxy_spawn_kill_with_subnet_create_delete()
<|file_name|>Choice.js<|end_file_name|><|fim▁begin|>const Constraint = Jymfony.Component.Validator.Constraint; /** * @memberOf Jymfony.Component.Validator.Constraints */ export default class Choice extends Constraint { /** * @inheritdoc */ static getErrorName(errorCode) { switch (errorCode)...
/**
<|file_name|>CallejeroTestCase.py<|end_file_name|><|fim▁begin|># coding: UTF-8 import unittest from usig_normalizador_amba.Callejero import Callejero from usig_normalizador_amba.Partido import Partido from usig_normalizador_amba.Calle import Calle from tests.test_commons import cargarCallejeroEstatico class Callej...
self.assertEqual(len(res), 1, 'Debería haber 1 matchings.') self._checkCalle(res[0], 77481, 'Gelly y Obes', 'jose_c_paz', 'José C. Paz') def testCallejero_buscarCalle_calles_con_y_02(self):
<|file_name|>clusterpolicy.go<|end_file_name|><|fim▁begin|>package cache import ( kapi "k8s.io/kubernetes/pkg/api" kapierrors "k8s.io/kubernetes/pkg/api/errors" "k8s.io/kubernetes/pkg/controller/framework" oapi "github.com/openshift/origin/pkg/api" authorizationapi "github.com/openshift/origin/pkg/authorization/...
clusterPolicyList := &authorizationapi.ClusterPolicyList{}
<|file_name|>PostGISSqlCastBuilder.java<|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/. * * Copyright (C) 2010, 2011, 2012, 2013 P...