prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>pgn.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Implement a PGN reader/writer. See http://www.chessclub.com/help/PGN-spec """ __author__ = 'Robert Ancell <bob27@users.sourceforge.net>' __license__ = 'GNU General Public License Version 2' __copyright__ = 'Copyright 2005-2006 Robert Ancell...
raise Error('Got a %s token, expecting a %s token' % (repr(tokenType), repr(TOKEN_TAG_END)))
<|file_name|>chime_scorer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('inset', choices=['test', 'val', 'train', 'all']) parser.add_argument('recog', choices=['clean', 'reverb', 'noisy', 'retrain', 'all']) phase_group = ...
from save_score import save_score, parse_result def do_score(dataset, classifier):
<|file_name|>bh_ir.cpp<|end_file_name|><|fim▁begin|>/* This file is part of Bohrium and copyright (c) 2012 the Bohrium team <http://www.bh107.org>. Bohrium 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, e...
<|file_name|>constants.py<|end_file_name|><|fim▁begin|># Copyright 2022 The Magenta 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...
MELODY_NO_EVENT = -2 # Other melody-related constants.
<|file_name|>lock.py<|end_file_name|><|fim▁begin|>""" Helper for keeping processes singletons """ __license__ = """ This file is part of RAPD Copyright (C) 2016-2018 Cornell University All rights reserved. RAPD is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Publi...
<|file_name|>XLSExport.java<|end_file_name|><|fim▁begin|>package sql.fredy.sqltools; /** XLSExport exports the result of a query into a XLS-file. To do this it is using HSSF from the Apache POI Project: http://jakarta.apache.org/poi Version 1.0 Date 7. aug. 2003 Author Fredy Fischer XLSExport is part o...
i++; database = args[i]; }
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>// The island of misfit toys... for functions var path = require('path'), fs = require('fs'), colors = require('colors'), crypto = require('crypto'), util = require('util'), wrench = require('wrench'), jsonlint = require('jsonlint'), resolve = require('resolve'...
}, createEmptyNode: function(name, ns) { var str = '<' + name + (ns ? ' ns="' + ns + '"' : '') + '></' + name + '>'; return exports.XML.parseFromString(str).documentElement;
<|file_name|>sim_router.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # LICENSE: GPL2 # (c) 2013 Tom Schouten <tom@getbeep.com> # (c) 2014, Kamil Wartanowicz <k.wartanowicz@gmail.com> import logging import os import threading import time import usb import plac import sim_shell import sim_ctrl_2g import sim_ctrl_...
data = None
<|file_name|>privacy-sanity.rs<|end_file_name|><|fim▁begin|>#![feature(negative_impls)] <|fim▁hole|> const C: u8; type T; } pub struct S { pub a: u8 } struct Ts(pub u8); pub impl Tr for S { //~ ERROR unnecessary visibility qualifier pub fn f() {} //~ ERROR unnecessary visibility qualifier pub const...
pub trait Tr { fn f();
<|file_name|>short-break.client.controller.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('core').controller('ShortBreakController', ['$scope', '$interval', 'timer', function ($scope, $interval, timer) { var initialTime = 300000; $scope.currentTime = initialTime; $scope.startTimer = function()...
$scope.returnToWorkMessage = function() { return 1 === 1; };
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>from flask import current_app, redirect, url_for, request, session, flash, send_file from flask.ext import restful from flask.ext.login import login_required, current_user, login_user, logout_user import twitter from request_parsers import * from datetime import da...
def get(self): #args = list_parser.parse_args() #TODO also return subscribed lists user = current_user
<|file_name|>RadioButtons.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import { withStyles } from '@material-ui/core/styles'; import { green } from '@material-ui/core/colors'; import Radio, { RadioProps } from '@material-ui/core/Radio'; import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButton...
color="default" name="radio-button-demo" inputProps={{ 'aria-label': 'E' }} icon={<RadioButtonUncheckedIcon fontSize="small" />}
<|file_name|>main_Fourier_TG_2.cpp<|end_file_name|><|fim▁begin|>// polyFEM // with mass matrix, and all // plus, correction to quadratic consistency // periodic boundary conditions // Solves NS equation for an incompressible // fluid in Fourier space #include <CGAL/Timer.h> // write out matrices //#define WRITE //...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = function (str) { var bytes = []; for (var i = 0; i < str.length; i++) { var c = str.charCodeAt(i); if (c >= 0xd800 && c <= 0xdbff && i + 1 < str.length) { var cn = str.charCodeAt(i + 1); if (cn >= 0xdc00 ...
return bytes; };
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># utils.py """ Utilities module containing various useful functions for use in other modules. """ import logging import numpy as np import scipy.linalg as sl import scipy.sparse as sps import scipy.special as ss from pkg_resources import Requirement, resource_filenam...
<|file_name|>TestInvalidFieldInitializer3.java<|end_file_name|><|fim▁begin|>package invalid; public class TestInvalidFieldInitializer3 { private Object field= /*]*/foo()/*[*/; public Object foo() {<|fim▁hole|> return field; } }<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2017 The Tangram Developers. See the AUTHORS file at the # top-level directory of this distribution and at # https://github.com/renatoGarcia/tangram/blob/master/AUTHORS. # # This file is part of Tangram. # # Tangram is free software: you can redistribute...
# along with Tangram in the COPYING and COPYING.LESSER files.
<|file_name|>keyboard.rs<|end_file_name|><|fim▁begin|>use crate::backend::input::KeyState; use crate::wayland::Serial; use slog::{debug, info, o, trace, warn}; use std::{ cell::RefCell, default::Default, fmt, io::{Error as IoError, Write}, ops::Deref as _, os::unix::io::AsRawFd, rc::Rc, }; u...
&xkb_config.model,
<|file_name|>data_user.js<|end_file_name|><|fim▁begin|>define([ "../Data" ], function( Data ) {<|fim▁hole|><|fim▁end|>
return new Data(); });
<|file_name|>Beleth.java<|end_file_name|><|fim▁begin|>package ai.hellbound; import l2s.commons.util.Rnd; import l2s.gameserver.ai.CtrlEvent; import l2s.gameserver.ai.Mystic; import l2s.gameserver.model.Creature; import l2s.gameserver.model.Playable; import l2s.gameserver.model.World; import l2s.gameserver.model.instan...
{ NpcInstance actor = getActor(); if(System.currentTimeMillis() - _lastFactionNotifyTime > _minFactionNotifyInterval)
<|file_name|>algorithm.hh<|end_file_name|><|fim▁begin|>/* vim: set sw=4 sts=4 et nofoldenable : */ /* * Copyright (c) 2007, 2008 Danny van Dyk <danny.dyk@uni-dortmund.de> * Copyright (c) 2007, 2008 Dirk Ribbrock <dirk.ribbrock@uni-dortmund.de> * * This file is part of the LA C++ library. LibLa is free software; *...
throw MatrixColumnsDoNotMatch(orig.columns(), copy.columns()); copy = orig.copy();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) 2021, DjaoDjin Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the abov...
# this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution.
<|file_name|>BoardDao2.java<|end_file_name|><|fim▁begin|>package dao; import java.util.List; import org.apache.ibatis.session.SqlSession; import factory.FactoryService; import vo.Bbs_CommmVo; import vo.Board2Vo; public class BoardDao2 { private static BoardDao2 dao; public static synchronized BoardDao2 getDao(){ ...
<|file_name|>mencode_unittests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (c) 2001 Autonomous Zone Industries # Copyright (c) 2002 Bryce "Zooko" Wilcox-O'Hearn # This file is licensed under the # GNU Lesser General Public License v2.1. # See the file COPYING or visit http://www.gnu.org...
filenamelist.sort() encoded_messages = [] sizes_list = [] for name in filenamelist:
<|file_name|>known-colors.d.ts<|end_file_name|><|fim▁begin|>declare module "color/known-colors" { export var AliceBlue; export var AntiqueWhite; export var Aqua; export var Aquamarine; export var Azure; export var Beige; export var Bisque; export var Black; export var BlanchedAlmond;...
export var DarkSlateBlue;
<|file_name|>pftv_tv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 ve...
url = client.parseDOM(r, 'a', ret='href', attrs = {'rel': 'nofollow'}) url = [i for i in url if not urlparse.urlparse(self.base_link).netloc in i]
<|file_name|>DatabaseClient.java<|end_file_name|><|fim▁begin|>package org.keycloak.example.oauth; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.DefaultHttpClient; import...
try { oauthClient.redirectRelative("client.jsf", request, response);
<|file_name|>http_server.rs<|end_file_name|><|fim▁begin|>use std::thread; use actix_web::{middleware, web, App, HttpRequest, HttpServer, Responder}; use prometheus::{Encoder, TextEncoder}; pub fn start_http_server( addr: std::net::SocketAddr, ) -> (thread::JoinHandle<()>, actix_rt::System, actix_web::dev::Serve...
let join_handle = thread::spawn(move || { let system = actix_rt::System::new("http_server");
<|file_name|>no_macro_custom_data.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate nickel; use nickel::{Nickel, HttpRouter, Request, Response, MiddlewareResult}; struct MyConfig { greet: String,<|fim▁hole|> let my_config = req.server_data(); res.send(&*my_config.greet) } fn main() { let my_co...
} fn greeter<'mw>(req: &mut Request<MyConfig>, res: Response<'mw, MyConfig>) -> MiddlewareResult<'mw, MyConfig> {
<|file_name|>resolve-issue-2428.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....
enum bs { thing = foo }
<|file_name|>impls.rs<|end_file_name|><|fim▁begin|>//! This module contains `Deserialize` and `Visitor` implementations. use std::borrow::Cow; use std::collections::{ BinaryHeap, BTreeMap, BTreeSet, LinkedList, HashMap, HashSet, VecDeque, }; #[cfg(feature = "nightly")] use collections::enum...
<|file_name|>proc_table.py<|end_file_name|><|fim▁begin|># # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you ca...
"""Module with a *procedures* dictionary specifying available quantum chemical methods.
<|file_name|>growl.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
opts = {} if host is None: hostParts = sickbeard.GROWL_HOST.split(':')
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># Copyright 2012, Nachi Ueno, NTT MCL, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
<|file_name|>asmsyntax.js<|end_file_name|><|fim▁begin|><|fim▁hole|>asm(1000){ var a = 1; };<|fim▁end|>
<|file_name|>xml_dump.py<|end_file_name|><|fim▁begin|>""" Assumptions: * Revisions appear ordered by page ASC, timestamp ASC, rev_id ASC * The max(rev_id) and max(timestamp) of revisions represents the last revision chronologically captured by the dump """ import logging import traceback from mw.xml_dump import I...
logger.error(traceback.format_exc())
<|file_name|>demo_IRR_ballSMC.cpp<|end_file_name|><|fim▁begin|>// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license...
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>package spring.aop; <|fim▁hole|> public static void main(String[] args) { // ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring/aop/aop-proxy.xml"); // ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("spring/aop...
import org.springframework.context.support.ClassPathXmlApplicationContext; public class Main {
<|file_name|>dao_test.go<|end_file_name|><|fim▁begin|>// Copyright Project Harbor 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...
<|file_name|>VisualBranch.cpp<|end_file_name|><|fim▁begin|>//======================================================================= // Author: Donovan Parks // // Copyright 2009 Donovan Parks // // This file is part of Chameleon. // // Chameleon is free software: you can redistribute it and/or modify // it under the t...
painter->drawLine(vertLine); painter->drawLine(horLine);
<|file_name|>asset.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # from rest_framework.viewsets import ModelViewSet from rest_framework.generics import RetrieveAPIView, ListAPIView from django.shortcuts import get_object_or_404 from django.db.models import Q from common.utils import get_logger, get_object_or...
'retrieve': 'assets.view_gateway' }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- u'''\ :mod:`ecoxipy.pyxom` - Pythonic XML Object Model (PyXOM) ======================================================== This module implements the *Pythonic XML Object Model* (PyXOM) for the representation of XML structures. To conveniently ...
>>> document_copy[0][0].attributes['data'] ecoxipy.pyxom.Attribute('data', 'to quote: <&>"\\'') >>> old_data = document_copy[0][0].attributes['data'].value
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>extern crate bindgen; extern crate pkg_config; use std::env; use std::path::PathBuf; fn main() { pkg_config::probe_library("libcec").unwrap(); let libcec_bindings = bindgen::Builder::default() .header("/usr/include/libcec/cecc.h")<|fim▁hole|> .generate() ...
.rust_target(bindgen::RustTarget::Nightly) .generate_comments(false) .layout_tests(false)
<|file_name|>test_template_format.py<|end_file_name|><|fim▁begin|># # 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 # # Unless...
<|file_name|>TheCave.rube-scriptLog-150508-133509.rs<|end_file_name|><|fim▁begin|>//Restarted script log at 05/02/15 21:37:26 getBody(159).deselect(); getBody(161).deselect(); getBody(33).select();<|fim▁hole|>getBody(39).select();<|fim▁end|>
getBody(33).deselect();
<|file_name|>about.py<|end_file_name|><|fim▁begin|># encoding=utf-8 from gi.repository import Gtk<|fim▁hole|> def __init__(self, parent): super(AboutDialog, self).__init__(title=_('About'), parent=parent) self.set_modal(True) self.set_program_name('Ydict') self.set_authors(['Wiky L<...
from .i18n import _ class AboutDialog(Gtk.AboutDialog):
<|file_name|>fileBlockService.js<|end_file_name|><|fim▁begin|>const {classes: Cc, interfaces: Ci, utils: Cu} = Components; Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); function FileBlock() {} FileBlock.prototype = { appDir: null, profileDir: null, tempDi...
aContentLocation.spec.match(this.appDir) || aContentLocation.spec.match(this.tempDir)) { return Ci.nsIContentPolicy.ACCEPT; }
<|file_name|>rtnl.rs<|end_file_name|><|fim▁begin|>impl_var!( /// Internet address families Af, libc::c_uchar, Inet => libc::AF_INET as libc::c_uchar, Inet6 => libc::AF_INET6 as libc::c_uchar ); impl_var!( /// General address families for sockets RtAddrFamily, u8, Unspecified => libc::AF_UNS...
/// Values are nested attributes to IFLA_LINKMODE. IflaInfo, libc::c_ushort, IflaInfoType,
<|file_name|>test_site_data_products.py<|end_file_name|><|fim▁begin|>from unittest import skip from ion.services.dm.test.dm_test_case import DMTestCase from pyon.public import PRED, OT, RT from pyon.util.log import log from ion.services.dm.test.test_dm_end_2_end import DatasetMonitor from ion.services.dm.utility.gra...
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>""" Django settings for djangoecommerce project. Generated by 'django-admin startproject' using Django 1.9.8. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https:/...
LANGUAGE_CODE = 'pt-br'
<|file_name|>decode_string.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class Solution(object): def decodeString(self, s): """ :type s: str :rtype: str """ # Original idea by @StefanPochmann r = re.compile(r"(\d+)\[([^\d\[\]]*)\]") while r.search(s): ...
import re
<|file_name|>lexer.rs<|end_file_name|><|fim▁begin|>//! Lexical analysis for .cton files. use std::str::CharIndices; use std::u16; #[allow(unused_imports)] use std::ascii::AsciiExt; use cretonne::ir::types; use cretonne::ir::{Value, Ebb}; use error::Location; /// A Token returned from the `Lexer`. /// /// Some variant...
// // This function does not filter out all invalid numbers. It depends in the context-sensitive // decoding of the text for that. For example, the number of allowed digits in an `Ieee32` and // an `Ieee64` constant are different.
<|file_name|>testTrades.py<|end_file_name|><|fim▁begin|>import unittest import ccs import time #################################################################################################################### # OKCOINCOM ...
def testLen(self): self.assertIsInstance(len(self.trades), int)
<|file_name|>tr_backend_draw.cpp<|end_file_name|><|fim▁begin|>/* =========================================================================== Doom 3 BFG Edition GPL Source Code Copyright (C) 1993-2012 id Software LLC, a ZeniMax Media company. Copyright (C) 2013-2014 Robert Beckebans Copyright (C) 2014 Carl Kenner This...
RB_CopyRender
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import smtplib from django.contrib.auth.models import Permission from django.test import TestCase from principal.forms import * from principal.models import * from principal.services import DepartmentService, CertificationService, UserService, ...
self.student_javrodleo.user_permissions.add(Permission.objects.get(codename='view_subject_details')) # Lecturers self.lecturer_benavides = Profesor.objects.create(
<|file_name|>forms.py<|end_file_name|><|fim▁begin|><|fim▁hole|> EMPTY_LIST_ERROR = "You can't have an empty list item" class ItemForm(forms.models.ModelForm): class Meta: model = Item fields = ('text',) widgets = { 'text': forms.fields.TextInput(attrs={ 'placeholder': 'Enter a to-do item', 'class'...
from django import forms from lists.models import Item
<|file_name|>graphicsDisplay.py<|end_file_name|><|fim▁begin|># graphicsDisplay.py # ------------------ # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were developed at UC Berkeley,...
screenPos = self.to_screen( cell) cellColor = formatColor(*[(n-k) * c * .5 / n + .25 for c in baseColor]) block = square(screenPos, 0.5 * self.gridSize,
<|file_name|>parallel_interleave_dataset_op.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow 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:/...
// 4. When restoring from checkpoint, threads are started only after // the restore is complete. // 5. Once restored from a checkpoint, the local state is edited only // by this thread. 3 & 4 allow making assumptions like temporarily
<|file_name|>clearsolutions.py<|end_file_name|><|fim▁begin|>from traitlets import Unicode, Bool from textwrap import dedent <|fim▁hole|>class ClearSolutions(NbGraderPreprocessor): code_stub = Unicode( "# YOUR CODE HERE\nraise NotImplementedError()", config=True, help="The code snippet that ...
from .. import utils from . import NbGraderPreprocessor
<|file_name|>jquery.loader.js<|end_file_name|><|fim▁begin|>jQuery(window).bind('load', function() { jQuery('.foreground').toggle('slow'); }); jQuery(function() { jQuery('.view-portfolio .views-field-field-portfolio-image a').hide(); }); jQuery(window).bind('load', function() { var i = 1; var imgs = jQuery('.view...
i++;
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include "fizzbuzz.h" #include <iostream> <|fim▁hole|><|fim▁end|>
int main(int /*argc*/, char* /*argv*/[]) { playFizzBuzz(); return 0; }
<|file_name|>hlo_instruction.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 The TensorFlow 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.org...
instruction->convolution_dimension_numbers_ = MakeUnique<ConvolutionDimensionNumbers>(dimension_numbers);
<|file_name|>res_partner.py<|end_file_name|><|fim▁begin|># © 2014-2015 Tecnativa S.L. - Jairo Llopis<|fim▁hole|> from odoo import fields, models class ResPartner(models.Model): _inherit = "res.partner" department_id = fields.Many2one("res.partner.department", "Department") class ResPartnerDepartment(models...
# © 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import print_function import argparse import csv ...
'disable_existing_loggers': True,
<|file_name|>Fuse.Entities.Primitives.g.cpp<|end_file_name|><|fim▁begin|>// This file was generated based on '(multiple files)'. // WARNING: Changes might be lost if you edit this file directly. #include <Fuse.Drawing.Meshes.MeshGenerator.h> #include <Fuse.Entities.Mesh.h> #include <Fuse.Entities.MeshHitTestMode.h> #i...
{
<|file_name|>logger.ts<|end_file_name|><|fim▁begin|>import config from 'config'; import * as winston from 'winston'; import type Transport from 'winston-transport'; import newRelicFormatter from '@newrelic/winston-enricher'; import winstonNewrelicLogsTransport from 'winston-newrelic-logs-transport'; import { isProduct...
licenseKey: config.get('new_relic.license_key'),
<|file_name|>ez-tab-panel-list.js<|end_file_name|><|fim▁begin|>import EzTabPanelList from 'ember-ez-tabs/ez-tab-panel-list';<|fim▁hole|> export default EzTabPanelList;<|fim▁end|>
<|file_name|>BigIntegerAssert_isCloseToPercentage_Test.java<|end_file_name|><|fim▁begin|>/* * 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|>__init__.py<|end_file_name|><|fim▁begin|>"""Component for interacting with a Lutron Caseta system.""" from __future__ import annotations import asyncio import contextlib import logging import ssl import async_timeout from pylutron_caseta import BUTTON_STATUS_PRESSED from pylutron_caseta.smartbridge impor...
hass.data[DOMAIN][entry_id] = { BRIDGE_LEAP: bridge,
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate data_macro; data!( SomeData { a: usize = 1 // fields can be set as normal b: usize = a + 2 // fields can reference other fields c: usize = mul_by_four(b)// fields can be set via functions } ...
println!("Multiplying {} by 4", num); num * 4 }
<|file_name|>kendo.culture.nso-ZA.js<|end_file_name|><|fim▁begin|>/** * Copyright 2015 Telerik AD * * 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...
names: ["Pherekgong","Hlakola","Mopitlo","Moranang","Mosegamanye","Ngoatobošego","Phuphu","Phato","Lewedi","Diphalana","Dibatsela","Manthole",""], namesAbbr: ["Pher","Hlak","Mop","Mor","Mos","Ngwat","Phup","Phat","Lew","Dip","Dib","Man",""] }, AM: ...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![warn(missing_docs)] //! A `Pinboard` is a shared, mutable, eventually consistent, lock-free data-structure. This //! allows multiple threads to communicate in a decoupled way by publishing data to the pinboard //! which other threads can then read in an eventually c...
<|file_name|>TestDefaultLoadBalancer.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 ...
import org.apache.hadoop.hbase.master.LoadBalancer;
<|file_name|>grid.js<|end_file_name|><|fim▁begin|>/* global Me */ function Grid(c, r) { console.log('New grid', c, r); this.cells = []; this.c = c; this.r = r; // init cells: this.empty(); this.chain = /((?!00)\d{1,2}.)\1{2,9}/g; } Grid.prototype = { get: function(x, y) { if ((x < 0 || x >= this.c) || (y ...
while ((rslt = this.chain.exec(t)) !== null) { lm = rslt[0].match(/\./g).length; // how many cells founds:
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from flask import request, abort, jsonify, render_template from flask.ext.sqlalchemy import BaseQuery import math class PaginatedQuery(object): def __init__(self, query_or_model, paginate_by, page_var='page', check_bounds=False): self.pag...
return int(math.ceil(float(self.query.count()) / self.paginate_by)) def get_object_list(self):
<|file_name|>color.rs<|end_file_name|><|fim▁begin|>pub enum ColorName { Black, Blue, Red, Purple, Green, Cyan, Yellow, White, } pub fn number_to_color(num: u8) -> ColorName { match num { 0 => ColorName::Black, 1 => ColorName::Blue, 2 => ColorName::Red, ...
pub value: u8, }
<|file_name|>test_png_encoding1.cpp<|end_file_name|><|fim▁begin|>#include "bench_framework.hpp" #include <mapnik/image_util.hpp> class test : public benchmark::test_case { mapnik::image_rgba8 im_; public: test(mapnik::parameters const& params) : test_case(params), im_(256,256) {} bool validate(...
for (std::size_t i=0;i<iterations_;++i) { out.clear(); out = mapnik::save_to_string(im_,"png8:m=h:z=1"); }
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.7.1 var Application, Manifest, americano; americano = require('americano-cozy'); Manifest = require('../lib/manifest').Manifest; module.exports = Application = americano.getModel('Application', { name: String, displayName: St...
git: String, errormsg: String, branch: String,
<|file_name|>events_controller.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino # # The licence is in the fil...
@http.route( "/event/payment/gpv_payment_validate/<int:invoice_id>", type="http",
<|file_name|>AngularSpec.js<|end_file_name|><|fim▁begin|>'use strict'; describe('angular', function() { var element; afterEach(function(){ dealoc(element); }); describe('case', function() { it('should change case', function() { expect(lowercase('ABC90')).toEqual('abc90'); expect(manualLow...
}); inject(function(fake) {
<|file_name|>test_frameload.py<|end_file_name|><|fim▁begin|>""" Tests for zipline.pipeline.loaders.frame.DataFrameLoader. """ from unittest import TestCase from mock import patch from numpy import arange, ones from numpy.testing import assert_array_equal from pandas import ( DataFrame, DatetimeIndex, Int64...
'value': -9999.0, 'kind': OVERWRITE, },
<|file_name|>widget.py<|end_file_name|><|fim▁begin|>import os import sys class Widget(object): """ Widget is a User Interface (UI) component object. A widget object claims a rectagular region of its content, is responsible<|fim▁hole|> for all drawing within that region. """ def __init__(self, n...
<|file_name|>view_tag.py<|end_file_name|><|fim▁begin|>from django.template import Library, Node, TemplateSyntaxError, Variable from django.conf import settings from django.core import urlresolvers import hashlib import re register = Library() class ViewNode(Node): def __init__(self, parser, token): sel...
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>error_chain! { errors { InvalidRequest(r: String) { description("invalid tracker request") display("invalid tracker request: {}", r) } InvalidResponse(r: &'static str) { description("invalid tracker resp...
display("tracker timeout") } DNSTimeout {
<|file_name|>Menubar.Edit.js<|end_file_name|><|fim▁begin|>import { UIPanel, UIRow, UIHorizontalRule } from './libs/ui.js'; import { AddObjectCommand } from './commands/AddObjectCommand.js'; import { RemoveObjectCommand } from './commands/RemoveObjectCommand.js'; import { MultiCmdsCommand } from './commands/MultiCmdsCo...
}
<|file_name|>Widgets.py<|end_file_name|><|fim▁begin|># # Widgets.py -- wrapped Qt widgets and convenience functions # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # impo...
self.layout = QtGui.QHBoxLayout()
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import "./signaling" import "./enums" import "./has_props" import "./layout"<|fim▁hole|>import "./logging" import "./properties" import "./property_mixins" import "./selection_manager" import "./util" import "./ui_events" import "./visuals"<|fim▁end|>
<|file_name|>fw_zone.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) 2011-2012 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the...
table = "filter" chains.append([ table, "INPUT" ]) target = DEFAULT_ZONE_TARGET.format(chain=SHORTCUTS["INPUT"], zone=zone)
<|file_name|>Item.js<|end_file_name|><|fim▁begin|>'use strict'; const EventEmitter = require('events'); const uuid = require('node-uuid'); const ItemType = require('./ItemType'); const { Inventory, InventoryFullError } = require('./Inventory'); const Logger = require('./Logger'); const Player = require('./Player'); ...
<|file_name|>tag.component.ts<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 VMware, 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.apac...
}
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>import datetime import httplib2 import itertools import json from django.conf import settings from django.db import connection, transaction from django.db.models import Sum, Max import commonware.log from apiclient.discovery import build from celeryutils import task ...
return stats
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use super::Atom; use super::Atom::*; #[test] fn test_atom_show () { let mut a: Atom; <|fim▁hole|> a = UInt(1u64); assert_eq!(format!("{}", a), "1"); a = SInt(42i64); assert_eq!(format!("{}", a), "42"); a = SInt(-1i64); assert_eq!(format!("{...
a = Char('a'); assert_eq!(format!("{}", a), "'a'");
<|file_name|>loopingcall.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under t...
done.send_exception(*sys.exc_info()) return
<|file_name|>InterruptingExecutionWithYieldExample03.js<|end_file_name|><|fim▁begin|>function* generatorFn() { yield 'foo'; yield 'bar'; return 'baz'; }<|fim▁hole|>let generatorObject2 = generatorFn(); console.log(generatorObject1.next()); // { done: false, value: 'foo' } console.log(generatorObject2.next());...
let generatorObject1 = generatorFn();
<|file_name|>spl.py<|end_file_name|><|fim▁begin|>""" Module defining the Spline class, something easy to wrap around SciPy splines. Includes BOK algorithms (Mollinari et al) Some rules of splrep (k = 3) - do not put more then 2 knots between data points. - splrep wants inner knots only, do not give extremal knots, e...
return(len(self.t) - 2* (self.k + 1) + 1)
<|file_name|>ProductDao.js<|end_file_name|><|fim▁begin|>const products = [{id : 'classic', name : 'Classic Ad', price : 269.99}, {id : 'standout', name : 'Standout Ad', price : 322.99}, {id : 'premium', name : 'Premium Ad', price : 394.99}] class ProductDao { constructor() {<...
console.log('Instantiating ProductDao') }
<|file_name|>struct-literal-in-for.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.apac...
}
<|file_name|>message.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Cloud Robotics FX 会話理解API用メッセージ # # @author: Osamu Noguchi <noguchi@headwaters.co.jp> # @version: 0.0.1 import cloudrobotics.message as message APP_ID = 'SbrApiServices' PROCESSING_ID = 'RbAppConversationApi' <|fim▁hole|># 会話メッセージ # class...
<|file_name|>MyDataSerializer.java<|end_file_name|><|fim▁begin|>package com.chuidiang.ejemplos.subscription; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output;<|fim▁hole|>import com.hazelcast.nio.ObjectDataOutput; import com.hazelcast.nio.seria...
import com.hazelcast.nio.ObjectDataInput;
<|file_name|>cql_test_env.cc<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015 Cloudius Systems, Ltd. */ /* * This file is part of Scylla. * * Scylla 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 Found...
auto cfg = make_lw_shared<db::config>(); _data_dir = make_lw_shared<tmpdir>(); cfg->data_file_directories() = { _data_dir->path };