prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>protocol.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # The MIT License (MIT) # # Copyright (c) 2014 Flavien Charlon # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Softwa...
else: output = TransactionOutput(value, script, None, 0, OutputType.issuance)
<|file_name|>ProtocolProdTest.java<|end_file_name|><|fim▁begin|><|fim▁hole|> /*********************************************************************************************************************** * * API.AI Java SDK - client-side libraries for API.AI * ================================================= * * Copyri...
package ai.api.test;
<|file_name|>login.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy, ViewEncapsulation } from '@angular/core'; import { Router } from '@angular/router'; import {UserService} from "../../services/user/user.service"; @Component({ selector: 'app-login', templateUrl: './login.component.h...
<|file_name|>slidy.py<|end_file_name|><|fim▁begin|>from slider import * def setup(): global slidy size(400,200) slidy = Slider( Rect(50,80,300,40), minVal=100, maxVal=255 ) def draw(): background(slidy.value) slidy.draw() def mousePressed(): slidy.press() <|fim▁hole|> def mouseReleased(): slidy.release()<|fim...
def mouseDragged(): slidy.drag()
<|file_name|>device.rs<|end_file_name|><|fim▁begin|>use std::marker::PhantomData; use std::mem; use libusb::*; use context::Context; use device_handle::{self, DeviceHandle}; use device_descriptor::{self, DeviceDescriptor}; use config_descriptor::{self, ConfigDescriptor}; use fields::{self, Speed}; /// A reference t...
<|file_name|>hashset.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet; fn main() { let mut a: HashSet<i32> = vec!(1i32, 2, 3).into_iter().collect(); let mut b: HashSet<i32> = vec!(2i32, 3, 4).into_iter().collect(); assert!(a.insert(4)); assert!(a.contains(&4)); // `HashSet::insert()`...
// If a collection's element type implements `Show`,
<|file_name|>coursier_fetch_filter_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from typing import DefaultDict, Sequence from unittest import mock import pytes...
coord5 = Coordinate("test", "art5", "1.0.0") # No dependencies (coord1)
<|file_name|>ToolTip.java<|end_file_name|><|fim▁begin|>package com.valarion.gameengine.events.menu.battlemenu; <|fim▁hole|><|fim▁end|>
public interface ToolTip { public String getToolTip(); }
<|file_name|>functions_a.js<|end_file_name|><|fim▁begin|>var searchData=<|fim▁hole|> ['queuefree',['queueFree',['../struct_ticker_state.html#a942a4c5388669138ad9518b3e14c3cb4',1,'TickerState']]], ['queueused',['queueUsed',['../struct_ticker_state.html#a99d84731b9512a573efd4d40d1ce6b07',1,'TickerState']]] ];<|fim▁end...
[
<|file_name|>RelayDefaultNetworkLayer.js<|end_file_name|><|fim▁begin|>/** * Copyright 2013-2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be f...
'Server response was missing for query `' + request.getDebugName() + '`.' ));
<|file_name|>etree.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """nrvr.xml.etree - Utilities for xml.etree.ElementTree The main class provided by this module is ElementTreeUtil. To be expanded as needed. Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com> Public repository - https://githu...
element.text = ""
<|file_name|>fertility_rate_preprocess_gen_tmcf.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/lice...
writer.writeheader()
<|file_name|>MercurialHasRevisionRule.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restr...
class MercurialHasRevisionRule(AnsibleLintRule):
<|file_name|>ServerConf.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
except KeyError as e: print msg % ('gcc',) try:
<|file_name|>artists.js<|end_file_name|><|fim▁begin|>var expect = require('expect.js'); var request = require('supertest'); var app = require(process.cwd() + '/app.js'); describe('GET /api/artists', function() { this.timeout(15000); it('should return a single JSON artist object', function(done) { requ...
it('should return a JSON array of artist within a specific tag', function(done) { var slug = 'pop'; request(app)
<|file_name|>Solution.py<|end_file_name|><|fim▁begin|>""" The set [1,2,3,...,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, we get the following sequence for n = 3: "123" "132" "213" "231" "312"<|fim▁hole|>Note: Given n will be between 1 and 9 inclusive. Give...
"321" Given n and k, return the kth permutation sequence.
<|file_name|>Cache.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011-2013 The Animo Project * http://animotron.org * * This file is part of Animotron. * * Animotron is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * publ...
import java.io.IOException; import java.io.OutputStream;
<|file_name|>ZKClient.py<|end_file_name|><|fim▁begin|># !/usr/bin/env python # -*- coding: utf-8 -*- """ @author: mango @contact: w4n9@sina.com @create: 16/7/4 hail hydra! """ __author__ = "mango" __version__ = "0.1" from kazoo.client import KazooClient import logging logging.basicConfig() class ZookeeperClient(o...
def zk_stop(self):
<|file_name|>mac_address_identifier.go<|end_file_name|><|fim▁begin|>package machine import ( "fmt" "io/ioutil" "os" "path/filepath" ) // See include/uapi/linux/if_arp.h const ethernetDeviceType = 1 type MACAddressIdentifier struct { sysFsDirectory string // Base directory that is explored for available network ...
a, err := os.Open(filepath.Join(self.sysFsDirectory, e.Name(), "address"))
<|file_name|>FoxHound_tests.js<|end_file_name|><|fim▁begin|>/** * Unit tests for FoxHound * * @license MIT * * @author Steven Velozo <steven@velozo.com> */ var Chai = require('chai'); var Expect = Chai.expect; var Assert = Chai.assert; var libFable = require('fable').new({}); var libFoxHound = require('../so...
( 'Pass multiple records',
<|file_name|>owrocanalysis.py<|end_file_name|><|fim▁begin|>""" ROC Analysis Widget ------------------- """ import operator from functools import reduce, wraps from collections import namedtuple, deque import numpy import sklearn.metrics as skl_metrics from PyQt4 import QtGui from PyQt4.QtGui import QColor, QPen, QBru...
<|file_name|>short_generator_vows.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2015, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. from pyvows import Vows, expect from tc_shortener.generators.short_generator import Gener...
from thumbor.importer import Importer @Vows.batch class ShortGeneratorVows(Vows.Context):
<|file_name|>contact.js<|end_file_name|><|fim▁begin|>import React from 'react'; const Contact = () => ({ contactNext(){ var data = $("#questionInput").val(); if(data){ Session.set('contact', data); FlowRouter.go("/register/6"); }else{ alert("Please enter your email."); } }, c...
<|file_name|>accept_ranges.rs<|end_file_name|><|fim▁begin|>//! The Accept-Ranges request header, defined in RFC 2616, Section 14.5. use std::io::IoResult; use std::ascii::AsciiExt; pub use self::AcceptableRanges::{RangeUnits, NoAcceptableRanges}; pub use self::RangeUnit::{Bytes, OtherRangeUnit}; #[derive(Clone, Part...
for ru in range_units.iter() {
<|file_name|>utility.hpp<|end_file_name|><|fim▁begin|>#ifndef COBALT_UTILITY_HPP_INCLUDED #define COBALT_UTILITY_HPP_INCLUDED #pragma once #include <cobalt/utility/compare_floats.hpp> #include <cobalt/utility/enum_traits.hpp> #include <cobalt/utility/enumerator.hpp> #include <cobalt/utility/factory.hpp> #include <cob...
#include <cobalt/utility/throw_error.hpp>
<|file_name|>md-tabs.js<|end_file_name|><|fim▁begin|>/** * @file Defines the on-render callback and the event handler for MD Tabs. * @author Derek Gransaull <derek@dgtlife.com> * @copyright DGTLife, LLC 2017 */ import { Template } from 'meteor/templating'; import {<|fim▁hole|> initializeTabGroup, handleClickOnTa...
currentTab,
<|file_name|>test_unique.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import datetime import unittest from django.apps.registry import Apps from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase from .models import ( CustomPKMod...
p = Post(title="Django 1.0 is released", posted=datetime.date(2008, 9, 3)) with self.assertRaises(ValidationError) as cm:
<|file_name|>jwplatform.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, float_or_none, int_or_none, ) class JWPlatformBaseIE(InfoExtractor): @staticmethod def _find_jwplayer_d...
if source_url.startswith('rtmp'): a_format['ext'] = 'flv',
<|file_name|>hsetnx.ts<|end_file_name|><|fim▁begin|>export function hsetnx(key: string, hashKey: string, hashVal: any) { if (!this.data.has(key)) { this.data.set(key, {}); } if (!{}.hasOwnProperty.call(this.data.get(key), hashKey)) { const hash = this.data.get(key); hash[hashKey] = hashVal; this....
<|file_name|>secret_hash.py<|end_file_name|><|fim▁begin|>##### import sys import inspect from pylons import config import logging import zkpylons.lib.helpers as h from pylons import request, response, session, tmpl_context as c from zkpylons.lib.helpers import redirect_to from pylons.util import class_name_from_module_...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#-*-coding:utf-8-*- from . import about_blueprint from flask import render_template <|fim▁hole|><|fim▁end|>
@about_blueprint.route("/") def about_index(): return render_template("about.html")
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>import ana import weakref default_plugins = { } # This is a base class for SimState plugins. A SimState plugin will be copied along with the state when the state is branched. They # are intended to be used for things such as tracking open files, tracking heap detail...
def merge(self, others, merge_flag, flag_values): # pylint: disable=W0613 '''
<|file_name|>example_test.go<|end_file_name|><|fim▁begin|>package faregate import ( "fmt" "math/rand" "time" ) func Must(c <-chan struct{}, err error) <-chan struct{} { if err != nil { panic(err) } return c } func Example() { rnd := rand.New(rand.NewSource(42)) fg, err := New(RefreshInterval(time.Second),...
} defer fg.Close()
<|file_name|>CitationView.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2015 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...
for (var i = 0; i < stringProps.length; i++) { var p = stringProps[i]; var pname = p.name.toLowerCase();
<|file_name|>mapAnims.js<|end_file_name|><|fim▁begin|>function P(x, y) { return { x: x, y: y }; } function MapAnimFactory(type, args) { let func = null, glitched = false, origArgs = [...args]; switch(type) { case "sw": func = StandardWalk; break; case "dw": func = DiffWalk; break; case "...
} SoloTile.prototype = Object.create(MapAnim.prototype); SoloTile.prototype.constructor = MapAnim;
<|file_name|>formats.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y.' TIME_FORMAT...
DATE_INPUT_FORMATS = ( '%Y-%m-%d', # '2006-10-25' '%d.%m.%Y.', '%d.%m.%y.', # '25.10.2006.', '25.10.06.'
<|file_name|>menuController.js<|end_file_name|><|fim▁begin|>define('controllers/menuController',['jqueryui'],function($){ $('#faq').dialog({ modal:true, autoOpen: false, height:window.innerHeight * 0.75, width:window.innerWidth * 0.75, draggable:false }); $('...
}); });
<|file_name|>rpc.rs<|end_file_name|><|fim▁begin|>extern crate rustc_serialize; use std::collections::HashMap; use rustc_serialize::json::Json; use std::sync::{RwLock}; #[derive(RustcDecodable)] pub struct RpcCall { id: u32, method: String, params: Vec<String> } #[derive(RustcEncodable)] pub struct RpcResponse { ...
<|file_name|>EGroupingMode.java<|end_file_name|><|fim▁begin|>package org.optimizationBenchmarking.evaluator.attributes.clusters.propertyValueGroups; import org.optimizationBenchmarking.utils.math.NumericalTypes; import org.optimizationBenchmarking.utils.math.functions.arithmetic.Div; import org.optimizationBenchma...
if (exclusiveMaxIndex >= data.length) {
<|file_name|>_defines.py<|end_file_name|><|fim▁begin|>__author__ = 'sei'<|fim▁hole|>DEFAULT_BAUDRATE = 57600<|fim▁end|>
DEFAULT_SERIAL = '/dev/ttyUSB0'
<|file_name|>test_gjslint.py<|end_file_name|><|fim▁begin|>import os import sys import nose<|fim▁hole|>from subprocess import CalledProcessError, check_output as run from functools import partial GJSLINT_COMMAND = 'gjslint' GJSLINT_OPTIONS = ['--strict'] JS_BASE_FOLDER = os.path.join('skylines', 'public', 'js') JS_F...
<|file_name|>video.py<|end_file_name|><|fim▁begin|>class Video(object): def __init__(self, json): self.id = json['id'] self.slug = json['slug'] self.title = json['title'] self.presenters = json['presenters'] self.host = json['host'] self.embed_code = json['embed_code'] def presenter_names(s...
def url(self): return 'plugin://plugin.video.%s/?action=play_video&videoid=%s' % (self.host, self.embed_code)
<|file_name|>test_threshold.py<|end_file_name|><|fim▁begin|>"""The test for the threshold sensor platform.""" import unittest from homeassistant.setup import setup_component from homeassistant.const import ( ATTR_UNIT_OF_MEASUREMENT, STATE_UNKNOWN, TEMP_CELSIUS) from tests.common import get_test_home_assistan...
<|file_name|>clipper.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * * * Author : Angus Johnson * * Version : 6.4.2 ...
<|file_name|>experiment_frameworks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #!/usr/bin/python import numpy as np import scipy from sklearn import preprocessing from sklearn.feature_extraction import DictVectorizer from sklearn.cross_validation import train_test_split from sklearn.metrics import classifi...
<|file_name|>test_execute_python.py<|end_file_name|><|fim▁begin|>import pytest from opentrons.protocol_api import ProtocolContext from opentrons.protocols.execution import execute, execute_python from opentrons.protocols.parse import parse def test_api2_runfunc(): def noargs(): pass with pytest.raise...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation // Copyright (C) 2020 Stacks Open Internet Foundation // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published b...
} else {
<|file_name|>EuclideanDoublePoint.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 Yo...
import java.util.Arrays; import org.apache.commons.math3.util.MathArrays;
<|file_name|>Motion.py<|end_file_name|><|fim▁begin|>__author__ = 'andrucuna' # Ball motion with an explicit timer import simplegui # Initialize globals WIDTH = 600 HEIGHT = 400 BALL_RADIUS = 20 init_pos = [WIDTH / 2, HEIGHT / 2] vel = [0, 3] # pixels per tick time = 0 # define event handlers def tick(): globa...
canvas.draw_circle(ball_pos, BALL_RADIUS, 2, "Red", "White")
<|file_name|>token.go<|end_file_name|><|fim▁begin|>// generated by gocc; DO NOT EDIT. package token import( "fmt" ) type Token struct { Type Lit []byte Pos } type Type int const( INVALID Type = iota EOF ) type Pos struct { Offset int Line int Column int } func (this Pos) String() string { return fmt.Sp...
"and", "or", "not",
<|file_name|>lock.py<|end_file_name|><|fim▁begin|>"""Support for BMW car locks with BMW ConnectedDrive.""" import logging from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN from homeassistant.components.lock import LockDevice from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED DEPE...
<|file_name|>apgar.js<|end_file_name|><|fim▁begin|>var ns4 = (document.layers)? true : false; var ie4 = (document.all)? true : false; // var ie4 = (document.all && !document.getElementById)? true : false; // var ie5 = (document.getElementById && document.all)? true : false; var ns6 = (document.getElementById && !docu...
<|file_name|>public_api.js<|end_file_name|><|fim▁begin|>/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */<|fim▁hole|> * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found ...
/**
<|file_name|>getRawCollection.test.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var assert = require('assert'), _ = require('lodash'); describe('Semantic Interface', function() { describe('.getRawCollection()', function() { it('should create a set of 15 users', function(done) { var usersArra...
/** * Created by Luigi Ilie Aron on 27.01.15. * email: luigi@kreditech.com */
<|file_name|>30_removegroup.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** For Copyright & Licensing information, see COPYRIGHT in project root ** ****************************************************************************/ #include "30_removegroup...
*/
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior a...
* @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request
<|file_name|>test_bea.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import io import os from dlstats.fetchers.bea import BEA as Fetcher import httpretty from dlstats.tests.base import RESOURCES_DIR as BASE_RESOURCES_DIR from dlstats.tests.fetchers.base import BaseFetcherTestCase import unittest from unit...
"concept": 25, "frequency": 1 },
<|file_name|>agent_dqn.py<|end_file_name|><|fim▁begin|>"""Tabular QL agent""" import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np import matplotlib.pyplot as plt from tqdm import tqdm import framework import utils DEBUG = False GAMMA = 0.5 # discounted fa...
x = np.arange(NUM_EPOCHS) fig, axis = plt.subplots() axis.plot(x, np.mean(epoch_rewards_test,
<|file_name|>watchlist.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ Allows access to the bot account's watchlist. The watchlist can be updated manually by running this script. Syntax: python pwb.py watchlist [-all | -new] Command line options: -all - Reloads watchlists for...
"""Fetch the watchlist.""" pywikibot.output(u'Retrieving watchlist for %s via API.' % str(site)) return list(site.watched_pages(sysop=sysop, force=True))
<|file_name|>unwind-interleaved.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache....
let _y = ~[0]; b(); }
<|file_name|>IProxy.java<|end_file_name|><|fim▁begin|>package com.plasmablazer.tutorialmod.proxy; public interface IProxy { <|fim▁hole|><|fim▁end|>
}
<|file_name|>test_kafka_broker_publisher.py<|end_file_name|><|fim▁begin|>#<|fim▁hole|># a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRA...
# Copyright 2015 Cisco 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
<|file_name|>KettleAttributeInterface.java<|end_file_name|><|fim▁begin|>/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2017 by Hitachi Vantara : http://www.pentaho.com * ********************************************************...
<|file_name|>0004_auto_20170921_1113.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-21 11:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
<|file_name|>tabs-demo.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 {Component, ViewEncapsulation} from '@angular/core'; im...
label: 'Tab 4', content: 'This is the body of the fourth tab' }, ];
<|file_name|>handshake.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Light Code Labs, 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 // // http://www.apache.org/licenses/LICE...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CMS.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
import os import sys if __name__ == "__main__":
<|file_name|>example_pb2.py<|end_file_name|><|fim▁begin|># Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/core/example/example.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.pro...
full_name='tensorflow.Example', filename=None, file=DESCRIPTOR,
<|file_name|>Decoder_turbo.hpp<|end_file_name|><|fim▁begin|>/*! * \file * \brief Class module::Decoder_turbo. */ #ifndef DECODER_TURBO_HPP_ #define DECODER_TURBO_HPP_ #include <vector> #include <memory> #include <mipp.h> #include "Tools/Code/Turbo/Post_processing_SISO/Post_processing_SISO.hpp" #include "Module/Int...
<|file_name|>stringOps.py<|end_file_name|><|fim▁begin|># Adrian deWynter, 2017 # Implementation of various algorithms # applied to strings # Given a long string find the greater # number that is also a palindrome. def nextPalindrome(S): def isPalindrome(x): return x == x[::-1] while True: S = S + 1 if isPalind...
for k,v in A: node = Node() node.value = k[0]
<|file_name|>DatePicker.js<|end_file_name|><|fim▁begin|>import { h, Component } from 'preact'; import moment from 'moment'; const MonthPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-month">{ optionsFor("month", props.date) }</select> ); const DayPicker = ({ onChange, ...props }) => ( ...
<option value={i} selected={isSelected ? 'selected' : ''}>{item}</option> );
<|file_name|>csdn_offline_common.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- #!/usr/bin/env python3 <|fim▁hole|>from collections import namedtuple from minghu6.internet.proxy_ip import proxy_ip from minghu6.text.seq_enh import filter_invalid_char URL_LIST_FILE_PATH = 'URList-{username:s}.txt' UrlN...
""" """
<|file_name|>vinsertf128.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; fn vinsertf128_1() { run_test(&Instruction { mnemonic: Mnemonic::...
fn vinsertf128_4() { run_test(&Instruction { mnemonic: Mnemonic::VINSERTF128, operand1: Some(Direct(YMM3)), operand2: Some(Direct(YMM7)), operand3: Some(IndirectDisplaced(RAX, 1337666297, Some(OperandSize::Xmmword), None)), operand4: Some(Literal8(119)), lock: false, rounding_mode: None, merge_mode: None, sae: fals...
<|file_name|>sumofpairs.js<|end_file_name|><|fim▁begin|>var sum_pairs = function (ints, s) { // your code here };<|fim▁hole|><|fim▁end|>
module.exports = sum_pairs;
<|file_name|>loggingFunctions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Set up the logging """ import logging import tempfile import os def initialize_logging(): """ Set up the screen and file logging. :return: The log filename """ # set up DEBUG logging to file, INFO loggi...
return log_file
<|file_name|>strategy_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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 http://www.apache.org/licenses/LICENSE-2.0 ...
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>'use strict' let ugly = require('gulp-uglify') ,gulp = require('gulp') ,watch = require('gulp-watch') ,plumber = require('gulp-plumber') ,newer = require('gulp-newer') ,stylus = require('gulp-stylus') ,jade = require('gulp-jade') ,concat = require('gulp-concat') ,r...
,stylusOptions = { compress: true
<|file_name|>drive_test.go<|end_file_name|><|fim▁begin|>package roomba_api import ( "testing" rt "github.com/xa4a/go-roomba/testing" ) func TestDriveOk(t *testing.T) { StartTestServer() defer StopTestServer() defer rt.ClearTestRoomba() client := NewTestClient(t) defer client.Close() conn_req := AcquireConn...
func TestDirectDriveWrongConnId(t *testing.T) {
<|file_name|>a(1).java<|end_file_name|><|fim▁begin|>package android.support.v7.app; import android.content.Context; import android.content.res.Configuration; import android.graphics.drawable.Drawable; import android.support.v7.b.b; import android.view.KeyEvent; import android.view.View; public abstract class a { pu...
public abstract void c(boolean paramBoolean);
<|file_name|>Cannon.java<|end_file_name|><|fim▁begin|>package org.siggd.actor; import org.siggd.ContactHandler; import org.siggd.Convert; import org.siggd.Game; import org.siggd.Level; import org.siggd.StableContact; import org.siggd.Timer; import org.siggd.view.BodySprite; import org.siggd.view.CompositeDraw...
// no sprite to draw } @Override
<|file_name|>tsl2561.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Code sourced from AdaFruit discussion board: https://www.adafruit.com/forums/viewtopic.php?f=8&t=34922 and https://github.com/seanbechhofer/raspberrypi/blob/master/python/TSL2561.py import sys import time import re import smbus class Adafruit_I...
<|file_name|>EProgressaoTest.java<|end_file_name|><|fim▁begin|>package engsoft; import junit.framework.TestCase; import java.lang.System; public class EProgressaoTest extends TestCase { public void testProgressaoAritmetica() { Progressao p = new ProgressaoAritmetica(); assertEquals(0, p.inicia())...
assertEquals("0 2 4 6 8 10 12 14 16 18 20\n", p.imprimeProgressao(10));
<|file_name|>beta_python_plugin_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 gRPC 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...
directories_path_components = { proto_file_path_components[:-1]
<|file_name|>widgetOld.js<|end_file_name|><|fim▁begin|>export default function widget(widget=null, action) { switch (action.type) { case 'widget.edit': return action.widget; <|fim▁hole|> case 'widget.edit.close': return null; default: return widget; } }<|fim▁end|>
<|file_name|>mallory.py<|end_file_name|><|fim▁begin|>#Copyright Intrepidus Group 2010 #All Rights Reserved #Released under the following license # #PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 #-------------------------------------------- # #0. This Python Software Foundation License (the "License") applies to #any ori...
<|file_name|>service_instance_test.go<|end_file_name|><|fim▁begin|>package requirements_test import ( "github.com/cloudfoundry/cli/cf/api/apifakes" "github.com/cloudfoundry/cli/cf/errors" "github.com/cloudfoundry/cli/cf/models" . "github.com/cloudfoundry/cli/cf/requirements" . "github.com/onsi/ginkgo" . "github....
var _ = Describe("ServiceInstanceRequirement", func() { var repo *apifakes.FakeServiceRepository
<|file_name|>callback.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/. */ //! Base classes to work with IDL callbacks. use dom::bindi...
} }
<|file_name|>votes.py<|end_file_name|><|fim▁begin|>from openstates.utils import LXMLMixin from billy.scrape.votes import VoteScraper, Vote from billy.scrape.utils import convert_pdf import datetime import subprocess import lxml import os import re journals = "http://www.leg.state.co.us/CLICS/CLICS%s/csljournals.nsf/" ...
) vote_re = re.compile((r"\s*" "YES\s*(?P<yes_count>\d+)\s*" "NO\s*(?P<no_count>\d+)\s*"
<|file_name|>public-api.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 */ export * from './boolean-property'; export * from './number-p...
<|file_name|>current.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- #-------------------------------------------------------------------------------------------------- # Program Name: holy_orders # Program Description: Update program for the Abbot Cantus API server. # # File...
#
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import <|fim▁hole|>class ConfigNotFound(LookupError): """Raise this exception to signal that a requested config item was not found in the config.""" pass<|fim▁end|>
<|file_name|>instr_roundpd.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn roundpd_1() { run_test(&Instru...
} #[test]
<|file_name|>alert.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function() { $('.alert-close').bind('click', function() { $(this).parent().fadeOut(100); }); function createAutoClosingAlert(selector, delay) { var alert = $(selector).alert(); window.setTimeout(function() { alert.alert('c...
<|file_name|>AIReviewStream.tsx<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012-2022 Online-Go.com * * 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 * ...
function onMessage(data: any) { props.callback(data); }
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function from lxml import etree import os <|fim▁hole|> :param mode: file mode for open :return: """ base = os.path.dirname(__file__) + '/xml_test_files/' return open(os.path.join(base, filenam...
def open_xml_file(filename, mode): """Opens an XML file for use. :param filename: XML file to create file from
<|file_name|>operations.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2019 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 __future__ import unicode_literals from flas...
db.session.flush() logger.info('Track group %r updated by %r', track_group, session.user) track_group.event.log(EventLogRealm.management, EventLogKind.positive, 'Track Groups',
<|file_name|>Image.java<|end_file_name|><|fim▁begin|>package grok.core; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.auto.value.AutoValue; @AutoValue public abstract class Image { @JsonCreator public static Image of(@JsonProperty("id"...
@JsonProperty("title") String title, @JsonProperty("url") String url) {
<|file_name|>standalone.ts<|end_file_name|><|fim▁begin|>import { entryPoint } from '@rpgjs/standalone' import globalConfigClient from './config/client' import globalConfigServer from './config/server' import modules from './modules' document.addEventListener('DOMContentLoaded', function() { entryPoint(modules, { ...
<|file_name|>math.plane.ts<|end_file_name|><|fim▁begin|>import { DeepImmutable } from '../types'; import { Vector3, Matrix } from './math.vector'; /** * Represents a plane by the equation ax + by + cz + d = 0 */ export class Plane { private static _TmpMatrix = Matrix.Identity(); /** * Normal ...
* @param origin origin of the plane to be constructed
<|file_name|>AlignVerticalCenterOutlined.js<|end_file_name|><|fim▁begin|>"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(require("...