prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>globalfunc.js<|end_file_name|><|fim▁begin|>var content = '<abcdテスト>';
var result = '';
result = encodeURI(content);<|fim▁hole|>result = encodeURIComponent(content);
console.log("encodeURIComponent('abcdテスト')", result);
console.log("decodeURIComponent(encodeURIComponent('abcdテスト'))", decodeURIComponent(enc... | console.log("encodeURI('abcdテスト')", result);
console.log("decodeURI(encodeURI('abcdテスト'))", decodeURI(encodeURI(content)));
|
<|file_name|>BaseRepository.java<|end_file_name|><|fim▁begin|>/*
* Copyright © 2013-2021, The SeedStack authors <http://seedstack.org>
*
* 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://m... | *
* <p> This class is mainly used as a common base for specialized technology-specific
* implementations. Client code will often extend these more specialized classes instead of this
* one. </p> |
<|file_name|>omp_target_update.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>
void
TC_OMP_TARGET_UPDATE::finish_type (tree t)
{
cerr << "finish_type: OMP_TARGET_UPDATE" << t << endl;
};
void
TC_OMP_TARGET_UPDATE::finish_decl (tree t)
{
cerr << "finish_decl: OMP_TARGET_UPDATE" << t << endl;
};
void
TC_OMP_TARGET_UP... | #include "omp_target_update.hpp"
TC_OMP_TARGET_UPDATE aOMP_TARGET_UPDATE; |
<|file_name|>sync-send-iterators-in-libcore.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 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:/... | macro_rules! all_sync_send {
($ctor:expr, $($iter:ident),+) => ({
$( |
<|file_name|>poes.py<|end_file_name|><|fim▁begin|>"""
.. module:: poes
:synopsis: A module for reading, writing, and storing poes Data
.. moduleauthor:: AJ, 20130129
*********************
**Module**: gme.sat.poes
*********************
**Classes**:
* :class:`poesRec`
**Functions**:
* :func:`readPoes`
* :func:... | |
<|file_name|>users.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>
module.exports = function(app, passport) {
app.route('/logout')
.get(users.signout);
app.route('/users/me')
.get(users.me);
// Setting up the users api
app.route('/register')
.post(users.create);
... |
// User routes use users controller
var users = require('../controllers/users'); |
<|file_name|>test-framework.js<|end_file_name|><|fim▁begin|>'use strict';
var path = require('path');
var helpers = require('yeoman-generator').test;
var assert = require('yeoman-assert');
describe('test framework', function () {
describe('mocha', function () {
before(function (done) {
helpers.run(path.joi... | }); |
<|file_name|>build-config.js<|end_file_name|><|fim▁begin|>/**
* @license Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any tim... | 'a11yhelp' : 1,
'about' : 1,
'basicstyles' : 1,
'blockquote' : 1, |
<|file_name|>copy-asset.js<|end_file_name|><|fim▁begin|>$(document).ready(function() {
$('#btn-create-version').on('click', function(e) {
e.preventDefault();
var newVersion = $('#new-version').val();
if (newVersion) {
var assetId = $('#asset-id').val();
var assetType ... | |
<|file_name|>metadata_test.go<|end_file_name|><|fim▁begin|>package bimg
import (
"io/ioutil"
"os"
"path"
"testing"
)
func TestSize(t *testing.T) {
files := []struct {
name string
width int
height int
}{
{"test.jpg", 1680, 1050},
{"test.png", 400, 300},
{"test.webp", 550, 368},
}
for _, file := ... | if metadata.EXIF.ApertureValue != file.ApertureValue {
t.Fatalf("Unexpected image exif ApertureValue: %s != %s", metadata.EXIF.ApertureValue, file.ApertureValue) |
<|file_name|>aoncmd_taskupdate.py<|end_file_name|><|fim▁begin|>"""Update a task in maniphest.
you can use the 'task id' output from the 'arcyon task-create' command as input
to this command.
usage examples:
update task '99' with a new title, only show id:
$ arcyon task-update 99 -t 'title' --format-id
99
... | help='a list of usernames to cc on the task',
type=str)
opt.add_argument(
'--projects', |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import os
import shutil
import unittest
from django.utils import six
from django_node import node, npm
from django_node.node_server import NodeServer
from django_node.server import server
from django_node.base_service import BaseService
from django_node.exceptions impo... | from django_node.services import EchoService
from .services import TimeoutService, ErrorService
from .utils import StdOutTrap
|
<|file_name|>automatic_questioner.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>described structure and which contains information about functions and
variables of other packages.
Scheme of the db
----------------
# {'function_name':
# {'variables':
# {'variable_name':
# {'question_info':
# ... | automatic_questioner
--------------------
Module which serves as a interactor between the possible database with the |
<|file_name|>custom_tests.rs<|end_file_name|><|fim▁begin|>extern crate rusoto_mock;
use crate::generated::{LexRuntime, LexRuntimeClient, PostTextRequest, PostTextResponse};
use rusoto_core::Region;
use std::collections::HashMap;
use self::rusoto_mock::*;
#[tokio::test]
async fn test_post_text_resposnse_serialization... | |
<|file_name|>test_config.py<|end_file_name|><|fim▁begin|>import unittest
from flumine import config
class ConfigTest(unittest.TestCase):
def test_init(self):
self.assertFalse(config.simulated)
self.assertTrue(config.simulated_strategy_isolation)
self.assertIsInstance(config.customer_strat... | self.assertEqual(config.update_latency, 0.150)
self.assertEqual(config.replace_latency, 0.280)
self.assertEqual(config.order_sep, "-")
self.assertEqual(config.execution_retry_attempts, 10) |
<|file_name|>users-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { UserListComponent } from "../user-list/user-list.component";
import { UserDetailComponent } from "../user-detail/user-detail.component";
const ro... | }
]; |
<|file_name|>notification.py<|end_file_name|><|fim▁begin|>import requests
import logging
import redis
from requests.packages.urllib3.exceptions import ConnectionError
from core.serialisers import json
from dss import localsettings
# TODO(fergal.moran@gmail.com): refactor these out to
# classes to avoid duplicating cons... | 'sessionid': session_id,
'image': image,
'message': message |
<|file_name|>number_parser.spec.js<|end_file_name|><|fim▁begin|>// Copyright 2012 Twitter, Inc
// http://www.apache.org/licenses/LICENSE-2.0
var TwitterCldr = require('../../../lib/assets/javascripts/twitter_cldr/core.js');
var data = require('../../../lib/assets/javascripts/twitter_cldr/en.js');
describe("NumberPar... | {value: "33", type: "numeric"},
{value: ".", type: "decimal"}, |
<|file_name|>NetworkingActions.ts<|end_file_name|><|fim▁begin|>import { RequestUtil } from "mesosphere-shared-reactjs";
import Config from "#SRC/js/config/Config";
import getFixtureResponses from "#SRC/js/utils/getFixtureResponses";
import {
REQUEST_NETWORKING_BACKEND_CONNECTIONS_ERROR,
REQUEST_NETWORKING_BACKEND_... | SDK.dispatch({
type: REQUEST_NETWORKING_VIPS_SUCCESS,
data: response.array,
}); |
<|file_name|>AbstractExtension.java<|end_file_name|><|fim▁begin|>/*
* This file is part of Pebble.
*
* Copyright (c) 2014 by Mitchell Bösecke
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
package com.mitchellbosecke.pebble.extens... | @Override
public List<BinaryOperator> getBinaryOperators() {
return null;
} |
<|file_name|>0007_auto_20160404_1858.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-04-04 18:58
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Mi... | model_name='snippet',
name='description', |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2012-2014 The python-semanticversion project
# This code is distributed under the two-clause BSD License.
try: # pragma: no cover
import django
from django.conf import settings
django_loaded = True
except ImportE... | |
<|file_name|>sleeper.test.js<|end_file_name|><|fim▁begin|>import sinon from 'sinon';
import expect from 'expect';
import sleeper from '..';
describe('sleeper', () => {
it('should be a function', () => {
expect(sleeper).toEqual(expect.any(Function));
});
it('should expose the Resource constructor', () => {
expe... |
describe('#update(id, obj)', () => {
it('should be an alias of put()', () => { |
<|file_name|>AboutBoxAction.java<|end_file_name|><|fim▁begin|>/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2022 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|> *
* Unless required by applicable law or agreed to in writing, software
* distri... | * 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|>tcpstream.cc<|end_file_name|><|fim▁begin|>/*
* "$Id: tcpstream.cc,v 1.11 2007-03-01 01:09:39 rmf24 Exp $"
*
* TCP-on-UDP (tou) network interface for RetroShare.
*
* Copyright 2004-2006 by Robert Fernie.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of... | |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, t... | # |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""Support for the Foobot indoor air quality monitor."""
import asyncio
from datetime import timedelta
import logging
import aiohttp
from foobot_async import FoobotClient
import voluptuous as vol
from homeassistant.const import (
ATTR_TEMPERATURE,
ATTR_TIME,... | except (KeyError, TypeError):
data = None |
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for CongCards project.<|fim▁hole|>https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CongCards.setti... |
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see |
<|file_name|>local.example.py<|end_file_name|><|fim▁begin|>from opendata.settings.dev import *
<|fim▁hole|># Override settings here<|fim▁end|> | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>fn main() {
// demonstrate the Option<T> and Some
let five = Some(5);
let six = plus_one(five);
let none = plus_one(None);
println!("Five: {:?}", five);
println!("Six: {:?}", six);
println!("None: {:?}", none);
// simpler syntax if you ... | } |
<|file_name|>TitleIllustrations.java<|end_file_name|><|fim▁begin|>/*
* Created on Oct 18, 2004
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.tolweb.tapestry;
import java.util.Collection;
import org.apache.tapestry.BaseComp... | ImageInjectable, BaseInjectable {
@SuppressWarnings("unchecked") |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.<|fim▁hole|># Created by Todd Gamblin, tgamblin@llnl.gov, All... | #
# This file is part of Spack. |
<|file_name|>registration-embedded.js<|end_file_name|><|fim▁begin|>import Component from '@glimmer/component';
import VerifiLogoSvg from 'dummy/images/media-registry/verifi-logo.svg';
export default class RegistrationEmbedded extends Component {
get registrationEmbedded() {
let verifi_id = this.args.model?.verif... | if (verifi_id) {
return {
id: verifi_id, |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(pa... | # Choose your license |
<|file_name|>BatchCheckLayerAvailabilityResult.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the Licens... | }
} |
<|file_name|>noncentral_distr.py<|end_file_name|><|fim▁begin|>from numpy import sqrt
from pacal.standard_distr import NormalDistr, ChiSquareDistr
from pacal.distr import Distr, SumDistr, DivDistr, InvDistr
from pacal.distr import sqrt as distr_sqrt
class NoncentralTDistr(DivDistr):
def __init__(self, df = 2, mu =... | return "NoncT({0},{1})".format(self.df, self.mu) |
<|file_name|>resolve.js<|end_file_name|><|fim▁begin|>'use strict';
var _Object$assign = require('babel-runtime/core-js/object/assign')['default'];
var _getIterator = require('babel-runtime/core-js/get-iterator')['default'];
var fs = require('fs'),
path = require('path'),
resolve = require('resolve');
var CA... | } catch (err) {
_didIteratorError = true; |
<|file_name|>pool-test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (C) 2010 Red Hat, Inc.
#
# This is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2.1 of
# the Lice... | # |
<|file_name|>tensor_signature.py<|end_file_name|><|fim▁begin|># 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://www.apache.org... | |
<|file_name|>mnist_lenet2.py<|end_file_name|><|fim▁begin|>import gzip
import cPickle
import numpy as np
import theano
import theano.tensor as T
from neuralmind import NeuralNetwork
from layers import HiddenLayer
from layers import ConvolutionLayer
from layers import FlattenLayer
import activations
def load_data(data... | # Load the dataset |
<|file_name|>compositor.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 compositor_data::{CompositorData, DoesntWantScrollEven... | }
|
<|file_name|>ArDPPTU.java<|end_file_name|><|fim▁begin|>/*
MobileRobots Advanced Robotics Interface for Applications (ARIA)
Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc.
Copyright (C) 2010, 2011 Adept Technology, Inc.
This program is free software; you can ... | }
public boolean resetAll() {
return AriaJavaJNI.ArDPPTU_resetAll(swigCPtr, this); |
<|file_name|>task10.cc<|end_file_name|><|fim▁begin|>#include <iostream>
using namespace std;
#define FLOAT(name, value) float name = value
#define CONST_FLOAT(name, value) const FLOAT(name, value)
#define VAR_FLOAT(name) FLOAT(name, 0)
#define VAR_INT(name) int name = 0
#define DEFINE_LINEAR_EQUATION(n)\
VAR_FLOAT... | |
<|file_name|>DummyVerticle.java<|end_file_name|><|fim▁begin|>package io.vertx.ext.auth.test.jwt;
import io.vertx.core.AbstractVerticle;
import io.vertx.ext.auth.KeyStoreOptions;
import io.vertx.ext.auth.jwt.JWTAuth;
import io.vertx.ext.auth.jwt.JWTAuthOptions;
public class DummyVerticle extends AbstractVerticle {
... | } |
<|file_name|>website.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, _
from odoo.addons.http_routing.models.ir_http import url_for
class Website(models.Model):
_inherit = "website"
@api.model
... | page_key = _('Blog Posts') |
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.core.urlresolvers import reverse
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from django.contrib.auth.mixins import LoginRequiredMixin
fr... |
class UserRedirectView(LoginRequiredMixin, RedirectView):
permanent = False |
<|file_name|>zeroconf.py<|end_file_name|><|fim▁begin|>"""
This module exposes Home Assistant via Zeroconf.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/zeroconf/
"""
import logging
import socket
import voluptuous as vol
from homeassistant import uti... |
return True |
<|file_name|>TestAllCodes.java<|end_file_name|><|fim▁begin|>/*
* This file is part of lanterna (http://code.google.com/p/lanterna/).
*
* lanterna 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, ei... | } |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from sqlalchemy import Column, Integer, String, DateTime, Boolean, ForeignKey
from project.database import Base
from project.database import db_session
from sqlalchemy.orm import relationship
from sqlalchemy_utils import EmailType
from flask.ext.babel import lazy_gett... | def __repr__(self): |
<|file_name|>WhoisKeyBlock.java<|end_file_name|><|fim▁begin|>package be.dnsbelgium.rdap.sample.parser;
import be.dnsbelgium.rdap.sample.dto.Contact;<|fim▁hole|>import be.dnsbelgium.rdap.sample.dto.DnsSecKey;
import be.dnsbelgium.rdap.sample.dto.SimpleContact;
public enum WhoisKeyBlock {
MAIN(),
DOMAIN(),
REGIS... | |
<|file_name|>WriteSegmentRequestMarshaller.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2012-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License... | .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Dimensions").build();
private static final MarshallingInfo<String> NAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD) |
<|file_name|>0011_setting_logo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-09 20:48
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('elearning', '0010_auto_2016020... | ),
] |
<|file_name|>EditCounterNoBots.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Abbas (Ar:User:Elph), 2012
# -*- coding: utf-8 -*-
import catlib ,pagegenerators<|fim▁hole|>import MySQLdb as mysqldb
import config
pagetop=u"'''تاریخ آخری تجدید:''''': ~~~~~ '''بذریعہ:''' [[user:{{subst:Currentuser}}|{{subst:Currentus... | import wikipedia,urllib,gzip,codecs,re |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// DO NOT EDIT !
// This file was generated automatically from 'src/mako/api/lib.rs.mako'
// DO NOT EDIT !
//! This documentation was generated from *logging* crate version *0.1.8+20150326*, where *20150326* is the exact revision of the *logging:v1beta3* schema built by... | |
<|file_name|>match-static-const-lc.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... | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your |
<|file_name|>pref.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# File: src/webframe/management/commands/pref.py
# Date: 2020-04-22 21:35
# Author: Kenson Man <kenson@kenson.idv.hk>
# Desc: Import / Create / Update / Delete preference
#
from django.conf import settings
from django.contrib.auth import get_us... | def output( self, pref, pattern=None ):
pattern=pattern if pattern else self.kwargs['pattern'] |
<|file_name|>translatable.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react';
import { LangConsumer } from '../LangContext';
import { Schema } from 'jsoninput';
import { infoStyle } from './commonView';
import { css } from 'glamor';
import IconButton from '../Components/IconButton';
interface Translation ... | status: '', |
<|file_name|>target_nrf51.py<|end_file_name|><|fim▁begin|>"""
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.<|fim▁hole|> Unless required by applicable law or agreed to in wr... | You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
|
<|file_name|>util.ts<|end_file_name|><|fim▁begin|>import readdirRecursive from "fs-readdir-recursive";
import * as babel from "@babel/core";
import path from "path";
import fs from "fs";
import * as watcher from "./watcher";
export function chmod(src: string, dest: string): void {
try {
fs.chmodSync(dest, fs.st... |
export function withExtension(filename: string, ext: string = ".js") { |
<|file_name|>userdata.rs<|end_file_name|><|fim▁begin|>extern crate hlua;
#[test]
fn readwrite() {
#[derive(Clone)]
struct Foo;
impl<'lua, L> hlua::Push<L> for Foo
where L: hlua::AsMutLua<'lua>
{
type Err = hlua::Void;
fn push_to_lua(self, lua: L) -> Result<hlua::PushGuard<L>, (h... | {
fn lua_read_at_position(lua: L, index: i32) -> Result<Foo, L> {
let val: Result<hlua::UserdataOnStack<Foo, _>, _> = |
<|file_name|>plot_rbf_parameters.py<|end_file_name|><|fim▁begin|>'''
==================
RBF SVM parameters
==================
This example illustrates the effect of the parameters ``gamma`` and ``C`` of
the Radial Basis Function (RBF) kernel SVM.
Intuitively, the ``gamma`` parameter defines how far the influence of a... | Z = Z.reshape(xx.shape) |
<|file_name|>hr.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from frappe import _
def get_data():
return [
{
"label": _("Employee and Attendance"),
"items": [
{
"type": "doctype",
"name": "Employee",
"description": _("Employee records."),
},
{
"type":... | ] |
<|file_name|>analyse_check_q_boundary_condition.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Runs the conduction example, produces some output
#
nproc = 1 # Number of processors to use
from boututils import shell, launch, plotdata
from boutdata import collect
import numpy as np... |
# Collect the data |
<|file_name|>issue-57410.rs<|end_file_name|><|fim▁begin|>// check-pass
// Tests that the `unreachable_pub` lint doesn't fire for `pub self::imp::f`.
#![deny(unreachable_pub)]
<|fim▁hole|>mod m {
mod imp {
pub fn f() {}
}
pub use self::imp::f;
}
pub use self::m::f;
fn main() {}<|fim▁end|> | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2017 Starbot Discord Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/l... | # See the License for the specific language governing permissions and
# limitations under the License.
from api.database.DAL import SQLite |
<|file_name|>riscv_instr_base.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
http://www.apache.org/licenses/LICENSE-2.0
Unless re... | (name == "SLTIU" and group == "RV32I" and format == "I_FORMAT" and
category == "COMPARE" and imm_t == "IMM") |
<|file_name|>register.py<|end_file_name|><|fim▁begin|>from django.db import models
from sampledatahelper.helper import SampleDataHelper
from sampledatahelper import handlers
class Register(object):
fields = {}
ignored_fields = []
_instance = None
sd = SampleDataHelper()
def __new__(cls, *args, **... | register.register(models.FilePathField, handlers.FilePathHandler)
register.register(models.ImageField, handlers.ImageHandler)
register.register(models.IPAddressField, handlers.IPAddressHandler)
register.register(models.GenericIPAddressField, handlers.GenericIPAddressHandler) |
<|file_name|>resource_dns_record_set_test.go<|end_file_name|><|fim▁begin|>package google
import (
"fmt"
"testing"
"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)
func TestAccDnsRecordSet_basic(t *testing.T) {
zoneName... | `, zoneName, ttl)
} |
<|file_name|>autoderef-method-priority.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// 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
//... | |
<|file_name|>riot.js<|end_file_name|><|fim▁begin|><|fim▁hole|>};<|fim▁end|> | exports.translate = function(tag) {
return this.import("riot").compile(tag); |
<|file_name|>ReteWorkingMemory.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* http://www.apache.org/licenses/LICENSE-2.0
*
... |
@Override
public void fireUntilHalt(final AgendaFilter agendaFilter) {
initInitialFact(); |
<|file_name|>sample5__unittest_8cc.js<|end_file_name|><|fim▁begin|>var sample5__unittest_8cc =
[
[ "QuickTest", "class_quick_test.html", "class_quick_test" ],<|fim▁hole|> [ "QueueTest", "class_queue_test.html", "class_queue_test" ],
[ "TEST_F", "sample5__unittest_8cc.html#ad7679328025ef6d95ee2f45d5604aa89", ... | [ "IntegerFunctionTest", "class_integer_function_test.html", null ], |
<|file_name|>_hassourceofbase.py<|end_file_name|><|fim▁begin|>#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2002-2006 Donald N. Allingham
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | #------------------------------------------------------------------------- |
<|file_name|>ColorManager.test.js<|end_file_name|><|fim▁begin|>"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsdom = require("jsdom");
var chai_1 = require("chai");
var ColorManager_1 = require("./ColorManager");
describe('ColorManager', function () {
var cm;
var dom;
var ... | chai_1.assert.equal(cm.colors.ansi[145].css, '#afafaf');
chai_1.assert.equal(cm.colors.ansi[146].css, '#afafd7');
chai_1.assert.equal(cm.colors.ansi[147].css, '#afafff'); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod approach;
mod character;
mod friend;
mod context;
mod chat;
mod authorized;
mod player_status;
mod error;
use super::{Session, GameState, AccountData, SocialInformations, SocialState};
use super::chunk::{ChunkImpl, Ref, SocialUpdateType};
use character::CharacterMin... | warn_on_connection: account.social.warn_on_connection,
warn_on_level_gain: account.social.warn_on_level_gain, |
<|file_name|>mysql_monitor_test.py<|end_file_name|><|fim▁begin|># Copyright 2019 Scalyr 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/licenses/LICENSE-2.0
#... | self.assertRaises(UnsupportedSystem, lambda: self._import_mysql_monitor())
else: |
<|file_name|>bitcoin_zh_CN.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_CN" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About EAcoin</source... | <translation>钱包已被<b>加密</b>,当前为<b>解锁</b>状态</translation>
</message>
<message> |
<|file_name|>island.js<|end_file_name|><|fim▁begin|>/**
* echarts组件:孤岛数据<|fim▁hole|> */
define(function (require) {
/**
* 构造函数
* @param {Object} messageCenter echart消息中心
* @param {ZRender} zr zrender实例
* @param {Object} option 图表选项
*/
function Island(messageCenter, zr) {
// 基类装... | *
* @desc echarts基于Canvas,纯Javascript图表库,提供直观,生动,可交互,可个性化定制的数据统计图表。
* @author Kener (@Kener-林峰, linzhifeng@baidu.com)
* |
<|file_name|>transform_old_config.py<|end_file_name|><|fim▁begin|># 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://www.apache.o... | for name, value in root.items():
key = '{prefix}{child}'.format(prefix=prefix, child=name) |
<|file_name|>virtual_network_peering.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
... | |
<|file_name|>reduce.rs<|end_file_name|><|fim▁begin|>//! Applies a reduction function on records grouped by key.
//!
//! The `reduce` operator acts on `(key, val)` data.
//! Records with the same key are grouped together, and a user-supplied reduction function is applied
//! to the key and the list of values.
//! The fu... | |
<|file_name|>MeasureUtils.java<|end_file_name|><|fim▁begin|>/*
* SonarQube
* Copyright (C) 2009-2016 SonarSource SA
* mailto:contact AT sonarsource DOT com
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the ... | * @return whether the measure has a data field
*/
public static boolean hasData(Measure measure) { |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
def _asdict(self):
result = OrderedDict()
for key in self.__mapper__.c.keys():
result[key] = getattr(self, key)
return result<|fim▁end|> | from collections import OrderedDict
class SerializableModel(object): |
<|file_name|>content.js<|end_file_name|><|fim▁begin|>module.exports = {
before: [function () {
console.log('global beforeAll1');
}, 'alias1'],
'alias1': 'alias2',
'alias2': function () {
console.log('global beforeAll2');
},
'One': function () {
this.sum = 1;
},<|fim▁hole|> if (this.sum !== ... | 'plus one': function () {
this.sum += 1;
},
'equals two': function () { |
<|file_name|>tarpc_server_missing_async.rs<|end_file_name|><|fim▁begin|>#[tarpc::service(derive_serde = false)]
trait World {
async fn hello(name: String) -> String;
}
<|fim▁hole|> fn hello(name: String) -> String {
format!("Hello, {}!", name)
}
}
fn main() {}<|fim▁end|> | struct HelloServer;
#[tarpc::server]
impl World for HelloServer { |
<|file_name|>progParser.py<|end_file_name|><|fim▁begin|>import xml.etree.ElementTree as ET
import csv
'''
Tara O'Kelly - G00322214,
Graph Theory Assignment,
Third Year, Graph Theory, Software Development.
A program to parse the xml file with data taken from http://timetable.gmit.ie/.
'''
# adapted from https://docs... | |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>var DND_START_EVENT = 'dnd-start',
DND_END_EVENT = 'dnd-end',
DND_DRAG_EVENT = 'dnd-drag';
angular
.module( 'app' )
.config( [ 'iScrollServiceProvider', function(iScrollServiceProvider){
iScrollServiceProvider.configureDefaults({
iScroll: {
... | console.log( 'got msg', msg );
};
|
<|file_name|>networks.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
exports.bitcoin = {
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'bc',
bip32: {
public: 0x0488b21e,
private: 0x0488ade4,
},
pubKeyHash: 0x00,
scriptHash: 0x05... | exports.testnet = {
messagePrefix: '\x18Bitcoin Signed Message:\n',
bech32: 'tb', |
<|file_name|>settings.component.js<|end_file_name|><|fim▁begin|>var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" &... | |
<|file_name|>board-file-gallery.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewChild, NgZone} from '@angular/core';
<|fim▁hole|>import { CanvasFile } from '../../models/canvas-file';
@Component({
selector: 'boad-file-gallery',
templateUrl: './board-file-gallery.component.html'
})
export cl... | import { MdDialog, MdDialogRef } from '@angular/material';
import { BoardService } from '../board/board.service';
|
<|file_name|>ThreadGroupDebuggee.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * (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 required by applicable law or agreed to in ... | * 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 License, Version 2.0 |
<|file_name|>bitcoin_nb.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About RupayaCoin</source>
... | <source>Sign &Message</source> |
<|file_name|>query.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/. */
//! Utilities for querying the layout, as needed by the layout ... | /// Scroll offsets of stacking contexts. This will only be populated if WebRender is in use.
pub stacking_context_scroll_offsets: ScrollOffsetMap, |
<|file_name|>hashing.py<|end_file_name|><|fim▁begin|># Copyright 2020 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.or... | # and siphash.
if any(isinstance(inp, ragged_tensor.RaggedTensor) for inp in inputs):
raise ValueError('Hashing with ragged input is not supported yet.') |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Pi-Yueh Chuang <pychuang@gwu.edu>
#
# Distributed under terms of the MIT license.
"""__init__.py"""
from utils.errors.Error import Error
from utils.errors.InfLoopError import Inf... | __author__ = "Pi-Yueh Chuang"
__version__ = "alpha" |
<|file_name|>MyRemoteClass.java<|end_file_name|><|fim▁begin|>package rmi;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
<|fim▁hole|> public String[] sayYourName(String name) throws RemoteException {
System.err.println("remote reference");
return ... | import java.rmi.server.UnicastRemoteObject;
public class MyRemoteClass implements MyRemoteInterface {
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Python bindings to oDesk API
# python-odesk version 0.5
# (C) 2010-2015 oDesk
<|fim▁hole|>so you can use::
from odesk import Client
from odesk import raise_http_error
"""
VERSION = '0.5.8'
def get_version():
return VERSION
from odesk.client impo... | # Updated by the script
"""Main package of the python bindings for oDesk API.
For convenience some most commonly used functionalities are imported here, |
<|file_name|>index-test.js<|end_file_name|><|fim▁begin|>/* eslint-env jasmine, jest */
import React from 'react';
import View from '../';
import StyleSheet from '../../StyleSheet';
import { act } from 'react-dom/test-utils';
import { createEventTarget } from 'dom-event-testing-library';
import { render } from '@testin... | expect(container.firstChild).toMatchSnapshot();
// set native props
node.setNativeProps({ style: { color: 'orange', height: 20, width: 20 } });
expect(container.firstChild).toMatchSnapshot(); |
<|file_name|>SendAuth.hpp<|end_file_name|><|fim▁begin|>/*================================================================================
code generated by: java2cpp
author: Zoran Angelov, mailto://baldzar@gmail.com
class: com.tencent.mm.sdk.openapi.SendAuth
=======================================================... | } //namespace SendAuth_
|
<|file_name|>dim_helpers.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, print_function
from dynd._pydynd import w_type, \
make_var_dim, make_strided_dim, make_fixed_dim, make_cfixed_dim
__all__ = ['var', 'strided', 'fixed', 'cfixed']
class _Dim(object):
__slots__ = []
... | >>> ndt.fixed[5] * ndt.strided * ndt.float64
ndt.type('5 * strided * float64')
""" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.