prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>CompilerGCC.hpp<|end_file_name|><|fim▁begin|>#ifndef __HIT_COMPILERGCC_HPP__ #define __HIT_COMPILERGCC_HPP__ #include <cstdint> #include <cstddef> typedef int8_t HIT_SINT8; typedef uint8_t HIT_UINT8; typedef int16_t HIT_SINT16; typedef uint16_t HIT_UINT16; typedef int32_t HIT_SINT32; typedef uint32_t...
<|file_name|>App.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- # # Copyright © 2003 - 2018 Michal Čihař <michal@cihar.com> # # This file is part of Wammu <https://wammu.eu/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
sys.excepthook = Wammu.Error.Handler except: print(_('Failed to set exception handler.')) app = WammuApp()
<|file_name|>window.rs<|end_file_name|><|fim▁begin|>use std::fs::File; use std::io::*; use std::mem; use std::slice; use std::syscall::sys_yield; use std::to_num::ToNum; use super::Event; use super::Color; /// A window pub struct Window { /// The x coordinate of the window x: i32, /// The y coordinate of ...
pub fn x(&self) -> i32 {
<|file_name|>ReturnVal.java<|end_file_name|><|fim▁begin|>/** * Copyright 2013 Simeon Malchev * * 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/licens...
if (value == null) throw new NullPointerException(); this.value = value; this.state = state;
<|file_name|>log.py<|end_file_name|><|fim▁begin|># Django from django.core.files.storage import get_storage_class from django.utils.functional import LazyObject # Internal from .settings import ( FILE_STORAGE, FILE_STORAGE_ARGS, LOGGER_NAME, LOG_FILE, LOG_SIZE, LOGGER_FORMAT, LOG_LEVEL ) from .utils.l...
<|file_name|>distance.rs<|end_file_name|><|fim▁begin|>#![feature(test)] extern crate bio; extern crate bit_vec; extern crate test; use test::Bencher; use bio::alignment::distance::*; // 5,000 random nucleotides, GC content = .55 static STR_1: &'static [u8] = b"ATCTAACTATTCCCTGTGCCTTATGGGGGCCTGCGCTATCTGCCTGT\ CGAACC...
<|file_name|>term.py<|end_file_name|><|fim▁begin|># Author: Mike 'Fuzzy' Partin # Copyright: (c) 2016-2018 # Email: fuzzy@fumanchu.org # License: See LICENSE.md for details # Stdlib imports import math import datetime def red(txt): return '\033[1;31m%s\033[0m' % txt def green(txt): return '\033[1;32m%s\033[0...
def purple(txt): return '\033[1;35m%s\033[0m' % txt
<|file_name|>minTime.js<|end_file_name|><|fim▁begin|>describe('minTime', function() { beforeEach(function() { affix('#cal'); }); var numToStringConverter = function(timeIn, mins) { var time = (timeIn % 12) || 12; var amPm = 'am'; if ((timeIn % 24) > 11) { amPm = 'pm'; } return time + (mins != null ?...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 Martin Garcia <newluxfero@gmail.com> # # This file is part of python-producteev, and is made available under # MIT license. See LICENSE for the full details. import re import htmlentitydefs def unescape(text): """ Removes HTML or XML char...
if text[:2] == "&#":
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod mdbook; pub mod bookitem; pub mod bookconfig; <|fim▁hole|><|fim▁end|>
pub use self::bookitem::{BookItem, BookItems}; pub use self::bookconfig::BookConfig; pub use self::mdbook::MDBook;
<|file_name|>5657.js<|end_file_name|><|fim▁begin|>{ if (this.props.x === 227) { return React.createElement( "span", { className: "_38my"<|fim▁hole|> "Campaign Details", null, React.createElement("span", { className: "_c1c" }) ); } if (this.props.x === 26...
},
<|file_name|>Palindrome Number.py<|end_file_name|><|fim▁begin|>class Solution(object): def isPalindrome(self, x): """ :type x: int :rtype: bool """<|fim▁hole|> l=list(s) l.reverse() sq='' s1=sq.join(l) if s==s1: return True e...
s=str(x)
<|file_name|>crop-16-9.js<|end_file_name|><|fim▁begin|>'use strict'; var React = require('react'); var SvgIcon = require('../../svg-icon'); var ImageCrop169 = React.createClass({ displayName: 'ImageCrop169', render: function render() { return React.createElement( SvgIcon, this.props, React....
}); module.exports = ImageCrop169;
<|file_name|>conversions.py<|end_file_name|><|fim▁begin|>from pgshovel.interfaces.common_pb2 import ( Column, Row, Snapshot, Timestamp, ) from pgshovel.utilities.conversions import ( RowConverter, to_snapshot, to_timestamp, ) from tests.pgshovel.streams.fixtures import reserialize def test...
Column(name='active', boolean=True), Column(name='biography'),
<|file_name|>test_command.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import, unicode_literals import os import time import threading import tempfile from mog_commons.command import * from mog_commons import unittest class TestCommand(unittest.Tes...
self.assertEqual(capture_command(['echo', 'あい'], shell=True), (0, ('あい' + os.linesep).encode('utf-8'), b'')) self.assertEqual(capture_command(['/bin/sh', '-c', 'echo あい'], shell=False),
<|file_name|>ComponentUtils.ts<|end_file_name|><|fim▁begin|>export const shouldUpdate = (curr: object, next: object, ...ignored: string[]) => { for (const key of Object.keys(curr)) { if (ignored.indexOf(key) !== -1 && curr[key] !== next[key]) { return false; } }<|fim▁hole|><|fim▁end|...
return true; };
<|file_name|>0110_add_default_contract_discount.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.14 on 2020-09-03 02:09 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('enterprise', '0109_remove_use_enterprise_catalog_sample'), ] operat...
), ]
<|file_name|>product_showcase-form-5065f89cf4.js<|end_file_name|><|fim▁begin|>var ModelForm = { init: function(options) { var ops = $.extend(true, this.getDefaultOptions(), options); Validation.init(ops);<|fim▁hole|> { return { src: '.form', isAjax: false, ...
}, getDefaultOptions: function()
<|file_name|>.eslintrc.js<|end_file_name|><|fim▁begin|>module.exports = { extends: 'airbnb', parser: 'babel-eslint', plugins: [ 'react', 'jsx-a11y', 'import' ], globals: { OT: true }, env: { browser: true, }, rules: { 'no-confusing-arrow': ['error', { allowParens: true }],<|fim...
'react/jsx-filename-extension': 'off', 'react/forbid-prop-types': ['error', { forbid: ['any', 'array'] }]
<|file_name|>deltaelektronika.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import sys import pyhard2.driver as drv import pyhard2.driver.virtual as virtual import pyhard2.driver.deltaelektronika as delta import pyhard2.ctrlr as ctrlr def createController(): """Initialize controller.""" config = ctrlr.Config("d...
"""Graphical user interface to Delta-Elektronika SM-700 Series controllers."""
<|file_name|>runner.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache Li...
return {}
<|file_name|>7.6.1-4-7.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 Ecma International. All rights reserved. // Ecma International makes this code available under the terms and conditions set // forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the // "Use Terms"). Any redistribution of ...
---*/ function testcase() { var test0 = 0, test1 = 1, test2 = 2;
<|file_name|>Constructing_a_De_Bruijn_Graph.py<|end_file_name|><|fim▁begin|>import os import sys from Bio.Seq import Seq def main(*args, **kwargs): fpath = os.path.join(os.getcwd(), args[-2]) tmp = []<|fim▁hole|> with open(fpath,'r') as f: for line in f: txt = line.strip() t...
<|file_name|>Tester.java<|end_file_name|><|fim▁begin|>package etri.sdn.controller.module.vxlanflowmapper; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.codehaus.jackson.map.ObjectMapper; public class Tester { public static void main(...
HeaderInfoPair pair1 = new HeaderInfoPair( new OuterPacketHeader.Builder()
<|file_name|>AnnotationTableController.java<|end_file_name|><|fim▁begin|>package gui.sub_controllers; import gui.GraphDrawer; import javafx.collections.FXCollections; import javafx.collections.ObservableList; import javafx.collections.transformation.FilteredList; import javafx.collections.transformation.SortedList; im...
// 3. Wrap the FilteredList in a SortedList. sortedData = new SortedList<>(filteredData);
<|file_name|>FSLeafQueue.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 un...
}
<|file_name|>tar.py<|end_file_name|><|fim▁begin|># Copyright 2018 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 # # Unless req...
from docuploader import shell
<|file_name|>cfg.js<|end_file_name|><|fim▁begin|>var self = module.exports; self = (function(){ self.debug = true; self.prefix = '/kaskade'; self.ssl = false; /*{ key: {PEM}, cert: {PEM} }*/ self.port = 80; self.host = '0.0.0.0'; self.onConnectionClose = ...
}*/
<|file_name|>kda.js<|end_file_name|><|fim▁begin|>angular.module('app.controllers.kda', ['app.services.data', 'app.services.options']) .controller('KdaController', ['$scope', 'Data', 'Options', function ($scope, Data, Options) { console.log('kda chart controller', $scope)<|fim▁hole|> Data.data.getKdaData($scope...
<|file_name|>analyzers.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Kythe Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache....
<|file_name|>prelude.rs<|end_file_name|><|fim▁begin|>//! Wildcard glob this module to have access to all commonly used items. pub use crate::api::{ Account, Action, Certificate, CustomImage, Domain, DomainRecord, Droplet, FloatingIp, Image, LoadBalancer, Region, Size, Snapshot, SshKey, Tag, Volume,<|fim▁hole|>...
};
<|file_name|>Circulo.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 Hector Espert Pardo * * 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 * (...
* You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>runner.c++<|end_file_name|><|fim▁begin|>// Wheels - various C++ utilities<|fim▁hole|>// // To the extent possible under law, the author(s) have dedicated all copyright and related // and neighboring rights to this software to the public domain worldwide. This software is // distributed without any warranty...
// // Written in 2013 by Martinho Fernandes <martinho.fernandes@gmail.com>
<|file_name|>PreviewImageCanvas.java<|end_file_name|><|fim▁begin|>package com.desple.view; import javax.imageio.ImageIO; import javax.swing.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; public class PreviewImageCanvas extends JPanel { private BufferedI...
} }
<|file_name|>el.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:27606576bf3cd46c15755bdec387cc97145a4a0c0a5b3933c11d30ab8c6c5ec7<|fim▁hole|><|fim▁end|>
size 1825
<|file_name|>client_auth_test.go<|end_file_name|><|fim▁begin|>// Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package ssh import ( "bytes" "crypto/rand" "errors" "fmt" "os" "strings" "testing" ) type...
t.Fatalf("client could not authenticate with rsa key: %v", err) } }
<|file_name|>task.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "github.com/idealeak/goserver/core/basic" "math/rand" "time" "github.com/idealeak/goserver/core/module" "github.com/idealeak/goserver/core/task" ) var TaskExampleSington = &TaskExample{} type TaskExample struct { id int } //in tas...
for i := 100; i < 200; i++ { th := &TaskExample{id: i}
<|file_name|>makemessages_unique.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import glob import os import polib from django import VERSION as DJANGO_VERSION from django.core.management.commands.makemessages import ( Command as OriginalMakeMessagesCommand) from django.utils import translation from django...
class Command(OriginalMakeMessagesCommand): # Django version 1.7+ requires_model_validation is deprecated
<|file_name|>NetworkStackThroughputITCase.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<|fim▁hole|> * to you under the Apache License, Version 2.0...
* regarding copyright ownership. The ASF licenses this file
<|file_name|>privmsg.py<|end_file_name|><|fim▁begin|>from twisted.words.protocols.irc import ERR_NORECIPIENT, ERR_NOTEXTTOSEND, ERR_NOSUCHNICK class Command(object): """ PRIVMSG is used to send private messages between users, as well as to send messages to channels. <msgtarget> is usually the nickname of...
PRIVMSG #*.edu :NSFNet is undergoing work, expect interruptions ; Message to all users who come from a host which has a name matching
<|file_name|>ps.js<|end_file_name|><|fim▁begin|>var q = require("./quasi"); exports.ps = function (opt) { opt = opt || {}; var strokeWidth = opt.strokeWidth || "0.015"; if (opt.color) console.error("The ps module does not support the `color` option."); // PS header var ret = [<|fim▁hole|> ...
"%%!PS-Adobe-1.0 " , "%%%%BoundingBox: -1 -1 766.354 567.929 " , "%%%%EndComments "
<|file_name|>Agent.cpp<|end_file_name|><|fim▁begin|>/* * Agent.cpp * * Created on: 20-oct-2009 * Author: hfreire */ #include "Agent.h" namespace opengl{ namespace agents{ log4cxx::LoggerPtr Agent::logger(log4cxx::Logger::getLogger("opengl.agents.Agent")); Agent::Agent(int millisecondsStep){<|fim▁hol...
<|file_name|>simulated_onu.py<|end_file_name|><|fim▁begin|># # Copyright 2017 the original author or 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/li...
pass # construct packet emit rule here
<|file_name|>QueryFactoryCallback.java<|end_file_name|><|fim▁begin|>package org.ddd.toolbox.dao; /** * Callback interface for building queries. * * <br> * Patterns: Callback * * <br> * Revisions: jnorris: Oct 2, 2007: Initial revision. * * @param <T_QUERY> * The type of the query being...
* @author jnorris */ public interface QueryFactoryCallback<T_QUERY> {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Provide an authentication layer for Home Assistant.""" import asyncio from collections import OrderedDict from datetime import timedelta import logging from typing import Any, Dict, List, Optional, Tuple, cast import jwt from homeassistant import data_entry_flo...
<|file_name|>service_test.go<|end_file_name|><|fim▁begin|>// Copyright 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package uniter_test import ( "time" "github.com/juju/names" jc "github.com/juju/testing/checkers" gc "gopkg.in/check.v1" "github.com/juju/juju/api/uniter" "git...
<|file_name|>linq.js<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------------- * linq.js - LINQ for JavaScript * ver 3.0.3-Beta4 (Oct. 9th, 2012) * * created and maintained by neuecc <ils@neue.cc> * licensed under MIT License * http://linqjs.codeplex.com/ *...
// Overload:function(func) // Overload:function(func, count) Enumerable.generate = function (func, count) {
<|file_name|>blob_loader.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use filemanager_thread::{FileManager, UIProvider}; use hy...
<|file_name|>remove_unwanted_files.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|> See https://github.com/conda/conda-build/issues/1001 """ import os import sys py2_only_files = [] py3_only_files = [ 'numba/tests/annotation_usecases.py', ] def remove_files(basedir): """ Remove unwanted files from ...
Workaround for a conda-build bug where failing to compile some Python files results in a build failure.
<|file_name|>interfaces.ts<|end_file_name|><|fim▁begin|>import { Stats } from "fs"; import { Diagnostic } from "typescript"; import { TypescriptConfig } from "./generated/typescript-config"; export * from "./generated/typescript-config"; export type CompilerOptionsConfig = TypescriptConfig["compilerOptions"]; export ...
throwOnError?: boolean
<|file_name|>SupervisorJob.py<|end_file_name|><|fim▁begin|>from jinja2 import Template class SupervisorJob(object): """docstring for SupervisorJob""" def __init__(self, config): """ Specify the configuration options for a job. 'config' must be a dictionary containing the following keys: ...
"program_name" : self.config['name'],
<|file_name|>es5-shim.js<|end_file_name|><|fim▁begin|>/*! * https://github.com/es-shims/es5-shim * @license es5-shim Copyright 2009-2015 by contributors, MIT License * see https://github.com/es-shims/es5-shim/blob/master/LICENSE */ // vim: ts=4 sts=4 sw=4 expandtab // Add semicolon to prevent IIFE from being pass...
hourOffset * signOffset ) * 60;
<|file_name|>bitcoin_et.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0"><|fim▁hole|><context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Credit</source> <translation>Crediti...
<defaultcodec>UTF-8</defaultcodec>
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Ilkka Rauta // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // U...
// distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>test_product_tmpl_image.py<|end_file_name|><|fim▁begin|># Copyright 2019 Rafis Bikbov <https://it-projects.info/team/RafiZz> # Copyright 2019 Alexandr Kolushov <https://it-projects.info/team/KolushovAlexandr> # Copyright 2019 Eugene Molotov <https://it-projects.info/team/em230418> # License LGPL-3.0 or lat...
{ "name": "Test product",
<|file_name|>rei.go<|end_file_name|><|fim▁begin|>package main import ( "encoding/json" "fmt" "io/ioutil" "log" "net/http" "net/url" "os" "os/user" "path/filepath" "strings" "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" gmail "goog...
<|file_name|>1446_Consecutive_Characters.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3<|fim▁hole|> p, cnt, ret = '', 1, 0 for c in s: if c == p: cnt += 1 else: ret, cnt = max(ret, cnt), 1 p = c return max(ret, cnt) str_...
class Solution: def maxPower(self, s):
<|file_name|>TwitterConfigWidget.cpp<|end_file_name|><|fim▁begin|>/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> === * * Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org> * Copyright 2010-2011, Jeff Mitchell <jeff@tomahawk-player.org> * * Tomahawk is free so...
m_ui( new Ui::TwitterConfigWidget ), m_account( account ) {
<|file_name|>llvm_compile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys import string import random def id_generator(size=6, chars=string.ascii_uppercase + string.digits): return ''.join(random.choice(chars) for _ in range(size)) kernels = { 'aes-aes' : 'gf_alog,gf_log,gf_mulinv,rj_...
<|file_name|>ganesha_mgr_view.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ * Copyright (c) 2017 SUSE LLC * * openATTIC 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; version 2. * * ...
@api_view(['GET'])
<|file_name|>mdpTimePicker.js<|end_file_name|><|fim▁begin|>/* global moment, angular */ function TimePickerCtrl($scope, $mdDialog, time, autoSwitch, ampm, confirmText, cancelText, $mdMedia) { var self = this; this.VIEW_HOURS = 1; this.VIEW_MINUTES = 2; this.currentView = this.VIEW_HOURS; this.time = m...
}); element.on("click", onEvent);
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate clap; extern crate serde_json; extern crate jmespath; use std::rc::Rc; use std::io::prelude::*; use std::io; use std::fs::File; use std::process::exit; use clap::{Arg, App}; use jmespath::Rcvar; use jmespath::{Variable, compile}; macro_rules! die( ($...
.map_err(|e| die!(format!("Error parsing JSON: {}", e)))
<|file_name|>parse.js<|end_file_name|><|fim▁begin|>var assert = require('assert'); var cookie = require('..'); suite('parse'); test('basic', function() { assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar')); assert.deepEqual({ foo: '123' }, cookie.parse('foo=123')); }); test('ignore spaces', function()...
}); test('escaping', function() {
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django.forms import ModelForm from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm class UserLogin(ModelForm): class Meta: model = User fields = ['username', 'password'] ...
self.fields["email"].disabled = True
<|file_name|>observe.js<|end_file_name|><|fim▁begin|>/** * Method to set dom events * * @example * wysihtml.dom.observe(iframe.contentWindow.document.body, ["focus", "blur"], function() { ... }); */ wysihtml.dom.observe = function(element, eventNames, handler) { eventNames = typeof(eventNames) === "string" ? ...
};
<|file_name|>output-slot-variants.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.apach...
<|file_name|>Categorize.spec.ts<|end_file_name|><|fim▁begin|>import { enableFetchMocks } from 'jest-fetch-mock' enableFetchMocks() import merge from 'deepmerge' import { Categorize, CategorizeSettings, CategorizeTriggers, ICategorizeSettings, } from '.' import { Filter, IQuery } from '../Common' import...
const catRef = reference as ICategories let spyConsoleWarn: any beforeAll(() => {
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "time" ) func main() { lb := NewLoadBalancer(5) lb.AssignTask(func () int { time.Sleep(time.Second) return 1 }) lb.AssignTask(func () int { time.Sleep(time.Millisecond * 500) return 2 }) lb.AssignTask(func () int { time...
<|file_name|>constant.rs<|end_file_name|><|fim▁begin|>#pragma version(1) #pragma rs java_package_name(foo) const float floatTest = 1.99f; const double doubleTest = 2.05; const char charTest = -8; const short shortTest = -16; const int intTest = -32; const long longTest = 17179869184l; // 1 << 34 const long long longlo...
<|file_name|>indirect-connection.ts<|end_file_name|><|fim▁begin|>import { Message, MessageFactory, messageJumpContext,<|fim▁hole|> browserSubscribeResponse, } from '../communication'; export const send = <Response, T>(message: Message<T>): Promise<Response> => { return new Promise((resolve, reject) => { b...
DispatchHandler,
<|file_name|>vcoin_eu_ES.ts<|end_file_name|><|fim▁begin|><TS language="eu_ES" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Eskuin-klika helbidea edo etiketa editatzeko</translation> </message> <message>...
<context> <name>WalletFrame</name> </context>
<|file_name|>mod.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/. */ pub mod dom_manipulation; pub mod file_reading; pub mod history_t...
} }
<|file_name|>config64.py<|end_file_name|><|fim▁begin|>import os import subprocess import sys deltext="" if sys.platform.startswith("linux") : deltext="rm" copytext="cp" if sys.platform.startswith("darwin") : deltext="rm" copytext="cp" if sys.platform.startswith("win") : deltext="del" copytext="copy" def run_i...
<|file_name|>move-2.rs<|end_file_name|><|fim▁begin|>// run-pass<|fim▁hole|>pub fn main() { let x: Box<_> = Box::new(X {x: 1, y: 2, z: 3}); let y = x; assert_eq!(y.y, 2); }<|fim▁end|>
#![allow(dead_code)] struct X { x: isize, y: isize, z: isize }
<|file_name|>dummy.py<|end_file_name|><|fim▁begin|>""" Store only meta data but no real data (except from store state of nodes) """ import logging import os import pwd import yaml from pySPACE.resources.dataset_defs.base import BaseDataset<|fim▁hole|> This class overrides the 'store' method in a way that only ...
class DummyDataset(BaseDataset): """ Class to store only meta data of collection
<|file_name|>matrixFactor.py<|end_file_name|><|fim▁begin|>############################################################################### import numpy import time ############################################################################### def matrixFactorization(R, P, Q, K, epochMax=1000, alpha=0.0002, beta=0.02...
########################################################################### def createUserRow(utp):
<|file_name|>globals.cpp<|end_file_name|><|fim▁begin|>//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---...
// strings for builtin names #define HASH_NAME(name, hashCS, hashCI) \ const StaticSym g_ssym_##name = \
<|file_name|>ejdb_bson.rs<|end_file_name|><|fim▁begin|>//! Contains low-level utilities for conversion between Rust and EJDB BSON representations. //! //! This module is only public to facilitate direct usage of `ejdb-sys` library, if such //! need arises. The types provided here are useful for converting Rust BSON val...
#[inline]
<|file_name|>traversal.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/. */ //! Traversals over the DOM and flow trees, running the lay...
/// /// Since a work-stealing queue is used for styling, sometimes, the bloom filter
<|file_name|>partnersRoutes.ts<|end_file_name|><|fim▁begin|>import loadable from "@loadable/component" import { graphql } from "react-relay" import { AppRouteConfig } from "v2/System/Router/Route" const GalleriesRoute = loadable( () => import(/* webpackChunkName: "partnersBundle" */ "./Routes/GalleriesRoute"), ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .AugmentedWeapon import AugmentedWeapon from .Cloaked import Cloaked from .Ethereal import Ethereal from .Muted import Muted from .TemporaryIllumination import TemporaryIllumination from .Undead import Undead from .HealthDrain import HealthDrain __all__ = [ ...
"TemporaryIllumination",
<|file_name|>JavaMethodJSC.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2003, 2004, 2005, 2007, 2009 Apple Inc. All rights reserved. * Copyright 2010, The Android Open Source Project * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the follow...
} #endif // ENABLE(JAVA_BRIDGE)
<|file_name|>abstract_authenticator.py<|end_file_name|><|fim▁begin|>from abc import ABCMeta, abstractmethod class AbstractAuthenticator(metaclass=ABCMeta): def __init__(self): """ Every authenticator has to have a name :param name: """ super().__init__() @abstractmeth...
Decide whether to authorise transaction. Note that all relevant information can be obtained from the customer. :param customer: the customer making a transaction :return: boolean, whether or not to authorise the transaction
<|file_name|>gen_id.py<|end_file_name|><|fim▁begin|>import numpy as np import sys R = np.eye(int(sys.argv[2]))<|fim▁hole|><|fim▁end|>
np.savetxt(sys.argv[1]+'/R.txt', R)
<|file_name|>DependencyTests.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2006-2012 Rogério Liesenfeld * This file is subject to the terms of the MIT license (see LICENSE.txt). */ package mockit.integration.junit4; import org.junit.runner.*; import org.junit.runners.*; <|fim▁hole|>@Suite.SuiteClass...
@RunWith(Suite.class)
<|file_name|>j.java<|end_file_name|><|fim▁begin|><|fim▁hole|>package org.vidogram.messenger.g.a; import java.io.ByteArrayOutputStream; public class j extends ByteArrayOutputStream { private final b a; public j(b paramb, int paramInt) { this.a = paramb; this.buf = this.a.a(Math.max(paramInt, 256)); } ...
<|file_name|>simple_funcs.py<|end_file_name|><|fim▁begin|>from functools import partial from .primitives import EMPTY __all__ = ['identity', 'constantly', 'caller', 'partial', 'rpartial', 'func_partial', 'curry', 'rcurry', 'autocurry', 'iffy'] def identity(x): return x def con...
<|file_name|>Backend.py<|end_file_name|><|fim▁begin|>class Backend(object): ''' Backend type with a plugin and zero or more parameters (Parameter functionality is TBD. Links to categories handled by this backend ''' def __init__(self, plugin, params): self._plugin = plugin self._para...
self._categories.append(category)
<|file_name|>fortios_firewall_ssl_server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
def main(): fields = { "host": {"required": False, "type": "str"}, "username": {"required": False, "type": "str"},
<|file_name|>token_selector.js<|end_file_name|><|fim▁begin|>// Copyright © 2016, Ugo Pozo // 2016, Câmara Municipal de São Paulo // token_selector.js - floating action button component for the interface. // This file is part of Anubis. // Anubis is free software: you can redistribute it and/or modify // ...
})) : []; return (
<|file_name|>scheduler.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import time import shutil import traceback import signal from collections import OrderedDict import re import flask import gevent import gevent.event import gevent.queue from config i...
<|file_name|>pidaemon.py<|end_file_name|><|fim▁begin|>"""pidaemon.py Usage: pidaemon.py [--brightness=<b>] [--sleep=<s>] [--interval=<s>] [--wait=<s>] pidaemon.py (-h | --help) pidaemon.py --version Options: -h --help Show this screen. --version Show version --brightness=<b> Default brigh...
'sleep': float(opts['--sleep']), 'interval': float(opts['--interval']), 'wait': float(opts['--wait']),
<|file_name|>CheckboxGroupExtended.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { CheckboxGroup } from '../index'; import { Checkbox } from '../../Checkbox'; import { classes } from './CheckboxGroupExtended.st.css'; export const CheckboxGroupPerf = () => { return ( <CheckboxGroup label...
</CheckboxGroup> ); };
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration // Generated on Fri May 29 2015 12:25:53 GMT-0500 (CDT) module.exports = function(config) { config.set({ // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '',<|fim▁hole|> // available framew...
// frameworks to use
<|file_name|>add_coverage_to_project.py<|end_file_name|><|fim▁begin|>import os from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') def handle(self, *ar...
<|file_name|>language.rs<|end_file_name|><|fim▁begin|>const PRIMARY_LANGUAGE_MASK: u16 = 0x03FF; const SUB_LANGUAGE_MASK: u16 = 0xFC00; /// A language used to read string descriptors from USB devices. /// /// A language consists of a primary language and a sub language. Primary languages are language /// families...
}
<|file_name|>sprite.ts<|end_file_name|><|fim▁begin|>import { ITexture } from './texture' import { Transformer } from './transformers'<|fim▁hole|> export interface SceneObject { build(builder: BatchBuilder): void; } /** * An animated object in a scene, consisting of a texture and a tranformer. */ export class Spr...
import { BatchBuilder } from './batch'
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|> * @providesModule Fabric */ 'use strict'; module.exports.Crashlytics = require('./Crashlytics'); module.exports.Answers = require('./Answers');<|fim▁end|>
/**
<|file_name|>structurecachestrategy.cpp<|end_file_name|><|fim▁begin|>/* This file is part of Zanshin Todo. Copyright (C) 2012 Christian Mollekopf <chrigi_1@fastmail.fm> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License...
IdList parents = translateFrom(mRelations->getParents(mRelations->getItemId(sourceChildIndex.data(Akonadi::EntityTreeModel::ItemRole).value<Akonadi::Item>())));
<|file_name|>error_reporting.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.apach...
infer::RangeExpression(_) => { "start and end of range have compatible types"