prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>country.service.ts<|end_file_name|><|fim▁begin|>/** * Created by aaron on 27/05/17. */ import {Injectable} from "@angular/core"; import {Http, Response} from "@angular/http"; import {Observable, Subscription} from "rxjs"; import {map} from "rxjs/operators" import {SearchParamService} from "./searchParam....
<|file_name|>players.py<|end_file_name|><|fim▁begin|># Copyright (c) Mathias Kaerlev 2012. # This file is part of Anaconda. # Anaconda is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
self.symbol_to_key[code] = name_key def set_score(self, value):
<|file_name|>domrect.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 dom::bindings::codegen::Bindings::DOMRectBinding; use dom...
// https://drafts.fxtf.org/geometry/#dom-domrect-x
<|file_name|>insults.rs<|end_file_name|><|fim▁begin|>! version = 2.0 // Handling abusive users. + int random comeback{weight=100} - You sound reasonable... time to up the medication. - I see you've set aside this special time to humiliate yourself in public. - Ahhh... I see the screw-up fairy has visited us again. - ...
- Okay. :-){topic=random} + (* sorry|sorry *)
<|file_name|>crudResponse.js<|end_file_name|><|fim▁begin|>import { put, takeEvery } from 'redux-saga/effects'; import { push } from 'react-router-redux'; import { CRUD_CREATE_FAILURE, CRUD_CREATE_SUCCESS, CRUD_DELETE_FAILURE, CRUD_DELETE_SUCCESS, CRUD_GET_LIST_FAILURE, CRUD_GET_MANY_FAILURE, ...
] : yield [put(showNotification('aor.notification.deleted'))]; case CRUD_GET_ONE_FAILURE:
<|file_name|>DependencyPanel.py<|end_file_name|><|fim▁begin|>import wx from Gauge import Gauge class DependencyPanel(wx.Panel): def __init__(self, parent, text, gaugeColor, textColor, env = 0, mineral = 0, energy = 0, nothing = 0): wx.Panel.__init__(self, parent, -1) gaugeBorders = (5, 5, 1, 7) self.env = G...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::url::Url; use std::{cmp, mem, ptr}; use std::get_slice::GetSlice; use std::io::*; use std::process::Command; use std::ops::DerefMut; use std::syscall::SysError; use std::syscall::ENOENT; use std::to_num::ToNum; use orbital::event::Event; use orbital::Point; us...
pub mod session;
<|file_name|>a.rs<|end_file_name|><|fim▁begin|>extern crate regex; use std::fs::File; use std::io::{BufReader, BufRead}; use std::str; use std::str::FromStr; use regex::Regex; fn main() { let mut summation = 0; let mut amount_of_correct = 0; let regex = Regex::new(r"^(.*)-(\d+)\[(.+)\]$").unwrap(); fo...
<|file_name|>simple_tableprinter.py<|end_file_name|><|fim▁begin|>import sqlite3 FIELD_MAX_WIDTH = 20 TABLE_NAME = 'people' SELECT = 'select * from %s order by age, name_last' % TABLE_NAME con = sqlite3.connect("mydb") cur = con.cursor() cur.execute(SELECT) # Print a header. for fieldDesc in cur.description: pri...
# the maximum possible width of that field. fieldIndices = range(len(cur.description)) for row in cur:
<|file_name|>product.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2014-2016 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # Copyright 2016 Sodexis (http://sodexis.com)<|fim▁hole|> from openerp import models, fields, api, _ from openerp.exceptions imp...
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
<|file_name|>version.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__version__ = "0.0.2a3"
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use crowbook_intl::{Extractor, Localizer}; use std::env; use std::path::Path; fn main() { println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=lang/fr.po");<|fim▁hole|> let mut extractor = Extractor::new(); extractor .a...
// Extract and localize src/lib
<|file_name|>bn.ts<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache ...
const words = new Int32Array(buffer, byteOffset, length); let number = 0, i = 0;
<|file_name|>issue-2063-resource.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...
// option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>stringio.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2012 Jacob Rus 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 restriction, including without limitation the right...
this.pos = newpos;
<|file_name|>remove.py<|end_file_name|><|fim▁begin|>import math import wx import eos.db import gui.mainFrame from gui import globalEvents as GE from gui.fitCommands.calc.cargo.remove import CalcRemoveCargoCommand from gui.fitCommands.helpers import CargoInfo, InternalCommandHistory from service.market import Market ...
sMkt = Market.getInstance() results = [] for itemID in self.itemIDs:
<|file_name|>test_points.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2014 - 2015, Met Office # # This file is part of Iris. # # Iris 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, eit...
# importing anything else. import iris.tests as tests
<|file_name|>buildifier.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. <|fim▁hole|>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 writing, software distributed under the License is distributed on an "A...
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
<|file_name|>tags.js<|end_file_name|><|fim▁begin|>export default { FETCH_TAGS_PENDING: Symbol("FETCH_TAGS_PENDING"), FETCH_TAGS_SUCCESS: Symbol("FETCH_TAGS_SUCCESS"), FETCH_TAGS_FAILURE: Symbol("FETCH_TAGS_FAILURE"), FILTER_TAGS: Symbol("FILTER_TAGS"), ORDER_TAGS: Symbol("ORDER_TAGS")<|fim▁hole|><|fim▁end|>
};
<|file_name|>test2.py<|end_file_name|><|fim▁begin|>from egat.testset import UnorderedTestSet class Test2(UnorderedTestSet): def testStep1(self):<|fim▁hole|> pass def testStep3(self): pass<|fim▁end|>
pass def testStep2(self):
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from './dispatchSchedule.component';<|fim▁end|>
<|file_name|>reject_assignments.py<|end_file_name|><|fim▁begin|>import argparse, json import simpleamt if __name__ == '__main__': parser = argparse.ArgumentParser(parents=[simpleamt.get_parent_parser()]) args = parser.parse_args() mtc = simpleamt.get_mturk_connection_from_args(args) reject_ids = [] if args...
print 'Rejecting assignments' for idx, assignment_id in enumerate(reject_ids): print 'Rejecting assignment %d / %d' % (idx + 1, len(reject_ids)) mtc.reject_assignment(assignment_id, feedback='Invalid results')
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react'; import Home from './Home.js'; import Login from './Login.js'; import PointInTime from './PointInTime.js'; import Vispdat from './VISPDAT.js'; import Refuse from './Refuse.js'; import { Actions, Scene } from 'react-native-router-flux'; /*...
);
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2009 Christian Hujer. * * This library 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 L...
* * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of
<|file_name|>coercion.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.org/licens...
Ok(Some(ty::AdjustReifyFnPointer))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .flag_button import *
<|file_name|>StringHttpRequestCallback.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015 pengjianbo(pengjianbosoft@gmail.com), 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 a...
public StringHttpRequestCallback() { super(); type = String.class; }
<|file_name|>fs.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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.org/licenses/LIC...
<|file_name|>expected.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> diesel::table! { /// Representation of the `custom_schema.in_schema` table. /// /// (Automatically generated by Diesel.) custom_schema.in_schema (id) { /// The `id` column of the `custom_schema.in_schema` t...
// @generated automatically by Diesel CLI. pub mod custom_schema {
<|file_name|>test_service.py<|end_file_name|><|fim▁begin|>import unittest from unittest.mock import patch from app.main.service import GitHubUserService @patch("app.main.service.github") class TestGitHubUserService(unittest.TestCase): def setUp(self): self.test_user = "test" self.retrieved_repos_...
<|file_name|>server.js<|end_file_name|><|fim▁begin|>const fs = require('fs') const path = require('path') const LRU = require('lru-cache') const express = require('express') const favicon = require('serve-favicon') const compression = require('compression') const resolve = file => path.resolve(__dirname, file) const { ...
const serverInfo = `express/${require('express/package.json').version} ` + `vue-server-renderer/${require('vue-server-renderer/package.json').version}`
<|file_name|>gnome.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- from checker.backends import BaseBackend from checker import logger log = logger.getLogger(__name__) class GnomeBackend(BaseBackend): """for projects hosted on gnome.org""" name = 'Gnome' domain = 'gnome.org' exa...
<|file_name|>min_const_unsafe_fn_libstd_stability2.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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 //...
// check whether this function cannot be called even with the feature gate active
<|file_name|>apk.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012, The Honeynet Project. All rights reserved. # Author: Kun Yang <kelwya@gmail.com><|fim▁hole|># # APKIL is free software: you can redistribute it and/or modify it under # the terms of version 3 of the GNU Le...
<|file_name|>AbstractLogFactory.java<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * 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 writing, software * distributed under the License is distributed on an "AS IS" BASI...
* Copyright 2009 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { AuthenticationService } from './authentication.service'; import { UserService } from './user.service'; import { MessageService } from './message.service'; import { NavigationService } from './navigation.service'; import { SearchService } from './search.service...
NavigationService, SearchService, SalesService, TableService,
<|file_name|>istr.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.org/licenses/L...
assert_eq!(~"" + "", ~"");
<|file_name|>dialogService.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('app').service('dialogService', [ '$q', function($q) { var remote = require('remote'); var dialog = remote.require('dialog'); function DialogService() {} DialogService.prototype.showOpenDialog = function() { ...
]);
<|file_name|>secret_configs_json.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2022 ThoughtWorks, 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...
interface EmbeddedJSON {
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './tech-card.component';
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[allow(unused_imports)] use env_logger; #[allow(unused_imports)] use pact_matching::models::PactSpecification; #[allow(unused_imports)] use pact_matching::models::Response; #[allow(unused_imports)] use pact_matching::match_response; #[allow(unused_imports)] use expectes...
<|file_name|>jquery.inputmask.numeric.extensions.js<|end_file_name|><|fim▁begin|>/* * jquery.inputmask.numeric.extensions.js * http://github.com/RobinHerbots/jquery.inputmask * Copyright (c) 2010 - 2014 Robin Herbots * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) * Version: 3...
if (isFinite(initialValue)) { return initialValue.toString().replace(".", opts.radixPoint); } else {
<|file_name|>mqtt.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import print_function import os import sys import uuid import logging import simplejson as json import paho.mqtt.client as mqtt from time import sleep try: sys.path.append(os.path.dirname(os.path.realp...
return result[1]
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>extern crate time; use std::env; use std::fs; use std::path; use std::time::{SystemTime, UNIX_EPOCH}; use core::io::BinaryComponent; use core::sig; pub fn load_user_keypair() -> Option<sig::Keypair> { let kpp = match env::home_dir() { Some(mut p) => { ...
let mut f = match fs::File::open(kpp) { Ok(o) => o, Err(_) => return None
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import dask from .scheduler import ray_dask_get, ray_dask_get_sync from .callbacks import ( RayDaskCallback, local_ray_callbacks, unpack_ray_callbacks, ) from .optimizations import dataframe_optimize dask_persist = dask.persist <|fim▁hole|> ray_dask_pe...
def ray_dask_persist(*args, **kwargs): kwargs["ray_persist"] = True return dask_persist(*args, **kwargs)
<|file_name|>hdl_block.py<|end_file_name|><|fim▁begin|>""" This file is part of xcos-gen. xcos-gen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your...
<|file_name|>test_serializers.py<|end_file_name|><|fim▁begin|>from nose.tools import * # noqa: F403 from tests.base import AdminTestCase from osf_tests.factories import NodeFactory, UserFactory from osf.utils.permissions import ADMIN from admin.nodes.serializers import serialize_simple_user_and_node_permissions, seri...
<|file_name|>models.py<|end_file_name|><|fim▁begin|># models.py import os import socket import datetime import random import re from django import forms from django import urls from django.db import models from django.db.models.signals import pre_save from .unique_slugify import unique_slugify from .titlecase import...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import print_function __title__ = 'pif.utils'<|fim▁hole|>__author__ = 'Artur Barseghyan' __copyright__ = 'Copyright (c) 2013 Artur Barseghyan' __license__ = 'GPL 2.0/LGPL 2.1' __all__ = ('ensure_autodiscover', 'list_checkers', 'get_public_ip') from pi...
<|file_name|>io.rs<|end_file_name|><|fim▁begin|>use std::os::raw::{c_char, c_void}; use std::mem::transmute; use super::CFixedString; #[repr(C)] pub enum LoadState { Ok, Fail, Converted, Truncated, OutOfData, } #[repr(C)] pub struct CPDSaveState { pub priv_data: *mut c_void, pub write_int:...
<|file_name|>CuisineHadoop.py<|end_file_name|><|fim▁begin|>from JumpScale import j base = j.tools.cuisine._getBaseClass() # TODO: *4 unfinished but ok for now class CuisineHadoop(base): def _install(self): if self._cuisine.core.isUbuntu: C = """\ apt-get install -y apt-get inst...
tar -xf hadoop-2.7.2.tar.gz -C /opt/ """
<|file_name|>cmd_attributes.py<|end_file_name|><|fim▁begin|>import cmd class HelloWorld(cmd.Cmd): prompt = 'prompt: ' intro = "Simple command processor example." doc_header = 'doc_header' misc_header = 'misc_header' undoc_header = 'undoc_header' <|fim▁hole|> def do_prompt(self, line): ...
ruler = '-'
<|file_name|>UserWindow.js<|end_file_name|><|fim▁begin|>Ext.provide('Phlexible.users.UserWindow'); Ext.require('Ext.ux.TabPanel'); Phlexible.users.UserWindow = Ext.extend(Ext.Window, {<|fim▁hole|> plain: true, iconCls: 'p-user-user-icon', width: 530, minWidth: 530, height: 400, minHeight: 400, ...
title: Phlexible.users.Strings.user, strings: Phlexible.users.Strings,
<|file_name|>LogServiceIntegrationJUnitTest.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...
<|file_name|>CoreAudioDevice.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2011-2012 Team XBMC * http://xbmc.org * * 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...
if (currentRate == sampleRate)
<|file_name|>0018_podcasts.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2018-08-21 18:59 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('dispatch', '0017_subsections')...
('title', models.CharField(max_length=255)), ('description', models.TextField()),
<|file_name|>store_test.go<|end_file_name|><|fim▁begin|>package webl import ( // "testing" . "gopkg.in/check.v1" ) //------ // version //------ func (s *MySuite) Test_saveResource(c *C) { Pool = NewPool(":6379","") r := Resource{ Name: "a", Url: "http://a", Status: "404", Type: "html" } saveResource(&r) ...
func (s *MySuite) Test_deleteResource(c *C) { Pool = NewPool(":6379","")
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod archive_comments; mod archive_entries; mod archive_events; mod archive_ratings; mod create_entry; mod create_rating; mod update_entry; pub mod prelude { pub use super::{ archive_comments::*, archive_entries::*, archive_events::*, archive_ratings::*, ...
pub fn create_entry(self: &EnvFixture, new_entry: NewEntry) -> String {
<|file_name|>udpsink.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2019 Mathieu Duponchelle <mathieu@centricular.com> // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public // License as published by the Free Software Foundation; either // v...
}
<|file_name|>config.js<|end_file_name|><|fim▁begin|>// # Ghost Configuration // Setup your Ghost install for various environments<|fim▁hole|> var path = require('path'), config; config = { // ### Production // When running Ghost in the wild, use the production environment // Configure your URL and mail...
// Documentation can be found at http://support.ghost.org/config/
<|file_name|>date_utils.py<|end_file_name|><|fim▁begin|>import time <|fim▁hole|><|fim▁end|>
def current_millis(): return int(round(time.time() * 1000))
<|file_name|>find_holes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Mon Jun 20 12:28:32 2015 @author: boland """ import sys sys.path.append('/home/boland/Anaconda/lib/python2.7/site-packages') import pickle import numpy as np import matplotlib.pyplot as plt from scipy.cluster.vq import kmea...
# Mask zeros H = np.ma.masked_where(H==0,H) # Mask pixels with a value of zero GRAD = np.ma.masked_where(GRAD==0,GRAD) # Mask pixels with a value of zero
<|file_name|>directorio.py<|end_file_name|><|fim▁begin|>import os import tempfile import shutil def listar(directorio): """Regresa uns lista con los archivos contenidos en unca carpeta""" archivos = os.listdir(directorio) buff = [] for archivo in archivos: ruta = os.path.join(directorio, a...
def crear(prefijo="Gram"): """Crea una carpeta temporal y regresa un string con la ruta
<|file_name|>i_PA_DeprjDist.py<|end_file_name|><|fim▁begin|>import numpy as np from astropy.coordinates import Angle, Distance from astropy import units as u from .angles2Plane import gal_theta def vdm_2001_dep_dist_kpc(rho, phi, glx_theta, glx_incl, D_0): """ Deprojected angular distance from vdM & Cioni (20...
rotation angles that define each inclined plane (inc_lst, pa_lst), and the distance (gal_dist) and center coordinates of the galaxy.
<|file_name|>docker_api_exec_resize_test.go<|end_file_name|><|fim▁begin|>package main import ( "bytes" "encoding/json" "fmt" "io" "net/http" "strings" "sync" "github.com/docker/docker/integration-cli/checker" "github.com/docker/docker/integration-cli/request" "github.com/go-check/check" ) func (s *DockerSu...
testRequires(c, DaemonIsLinux)
<|file_name|>rcode.rs<|end_file_name|><|fim▁begin|>//! DNS response codes and extended response codes. //! //! The original DNS specification in [RFC 1035] specified four bits of the //! message header as response code. The type [Rcode] defined herein //! represents these codes. Later, [RFC 2671] (now [RFC 6891]) added...
} }
<|file_name|>count.ts<|end_file_name|><|fim▁begin|>import { expectTypeOf } from "expect-type"; import { Model, Op } from 'sequelize'; class MyModel extends Model {} expectTypeOf(MyModel.count()).toEqualTypeOf<Promise<number>>(); expectTypeOf(MyModel.count({ group: 'tag' })).toEqualTypeOf<Promise<{ [key: string]: numb...
expectTypeOf(MyModel.count({ where: { updatedAt: {
<|file_name|>CLAClassifierRegion.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate lice...
<|file_name|>script_task.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/. */ //! The script task is the task that owns the DOM in memo...
}
<|file_name|>events.directive.ts<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> templateUrl: 'components/events/events.html', restrict: 'E', scope: { calHeight: '=height', showTitle: '=showTitle' }, controller: 'EventsController', controllerAs: 'event' }));<|fim▁end|>
angular.module('knowShareVanApp') .directive('events', () => ({
<|file_name|>ILocalDebugClient.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2020 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 is located at<|fim▁...
* http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express'); var http = require('http'); var app = express(); var bodyParser = require('body-parser'); var methodOverride = require('method-override'); var router = require('./server/router'); var morgan = require('morgan'); app.use(bodyParser.url...
});
<|file_name|>person.py<|end_file_name|><|fim▁begin|>"""Provides all the generic data related to the personal information.""" from typing import Tuple BLOOD_GROUPS = ( "O+", "A+", "B+", "AB+", "O−", "A−", "B−", "AB−", ) GENDER_SYMBOLS: Tuple[str, str, str] = ( "♂", "♀", "⚲"...
<|file_name|>initializers_test.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2015 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 # #...
initializers.variance_scaling_initializer, shape=[100, 40], variance=4. / (100. + 40.),
<|file_name|>bootstrap.js<|end_file_name|><|fim▁begin|>/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) */ /*! * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=bdc334eb...
Button.DEFAULTS = { loadingText: 'loading...'
<|file_name|>kraken_taxonomy_report.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Reports a summary of Kraken's results # and optionally creates a newick Tree # Copyright (c) 2016 Daniel Blankenberg # Licensed under the Academic Free License version 3.0 # https://github.com/blankenberg/Kraken-Taxonomy-Report...
# NB: We put 'no rank' at top of list for generating trees, due to e.g.
<|file_name|>vendor.js<|end_file_name|><|fim▁begin|>window.jQuery = window.$ = require('jquery');<|fim▁hole|>require('file?name=[name].[ext]!bootstrap/dist/css/bootstrap.css.map'); require('yii2-pjax'); require('yii'); require('yii.validation'); require('yii.activeForm'); require('yii.gridView'); require('yii.captcha'...
require('bootstrap'); require('bootstrap/dist/js/bootstrap.js'); require('bootstrap/dist/css/bootstrap.css');
<|file_name|>36784000.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|>jsonp({"cep":"36784000","cidade":"Dona Euz\u00e9bia","uf":"MG","estado":"Minas Gerais"});<|fim▁end|>
<|file_name|>io.cpp<|end_file_name|><|fim▁begin|>// -*- Mode:C++ -*- /**************************************************************************************************/ /* */ /* Copyright (C) 2015 University of Hull ...
namespace glx {
<|file_name|>Events.d.ts<|end_file_name|><|fim▁begin|>declare enum Events { AUDIO_LEVEL = 'statistics.audioLevel', BEFORE_DISPOSED = 'statistics.before_disposed', BYTE_SENT_STATS = 'statistics.byte_sent_stats',<|fim▁hole|> LONG_TASKS_STATS = 'statistics.long_tasks_stats' }<|fim▁end|>
CONNECTION_STATS = 'statistics.connectionstats',
<|file_name|>ete_extract.py<|end_file_name|><|fim▁begin|># #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the term...
<|file_name|>SnapshotOptions.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more contributor license * agreements. See the NOTICE file distributed with this work for additional information regarding * copyright ownership. The ASF licenses this file to You under t...
* or implied. See the License for the specific language governing permissions and limitations under
<|file_name|>normalize_multiline_doc_attribute.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>///This comment ///is split ///on multiple lines fn foo() {} /// B1 /// /// A1 fn bar() {}<|fim▁end|>
// rustfmt-unstable: true // rustfmt-normalize_doc_attributes: true
<|file_name|>SpongeDirectionalProcessor.java<|end_file_name|><|fim▁begin|>/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered <https://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a...
} @Override public Optional<BlockState> removeFrom(IBlockState blockState) {
<|file_name|>example.js<|end_file_name|><|fim▁begin|>$(function() { function cellValue(val) { return { sortValue: val, displayValue: val.toString() }; } var yAxis = [{ id: 'store', name: 'Store' }, { id: 'clerk', name: 'Clerk' }]; var keyfigures = [{ id: 'nocustomers', name: 'Customers' }, { i...
reportState.serverData.push({ type: 'row', values: [cellValue('Berlin'), cellValue('Julia'), cellValue(430), cellValue(30200)] });
<|file_name|>extend.routes.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { ExtendComponent } from './src/components/extend.component'; import { SubExtendComponent } from './src/components/sub-extend.component'; const extendRout...
@NgModule({ imports: [ RouterModule.forChild(extendRoutes)
<|file_name|>jade.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|>size 21785<|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:dd32b7eaa7daed7371af2e06195ec013df98eb5920727aaf459d9419ef607ff9
<|file_name|>xrecord_event_handler.go<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 ~ 2018 Deepin Technology Co., Ltd. * * Author: jouyouyun <jouyouwen717@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as publis...
//h.logPressedMods("before release") mod, ok := key2Mod(keystr) if !ok {
<|file_name|>vtable.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 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.org/licenses...
<|file_name|>test_xenapi.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, 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 th...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""stockretriever""" from setuptools import setup setup( name='portfolio-manager', version='1.0', description='a web app that keeps track of your investment portfolio', url='https://github.com/gurch101/portfolio-manager',<|fim▁hole|> license='MIT',...
author='Gurchet Rai', author_email='gurch101@gmail.com',
<|file_name|>download.py<|end_file_name|><|fim▁begin|># download.py import urllib.request print("Downloading") url = 'https://www.python.org/ftp/python/3.4.1/python-3.4.1.msi'<|fim▁hole|>urllib.request.urlretrieve(url, 'python-3.4.1.msi')<|fim▁end|>
print('File Downloading')
<|file_name|>tests_forms.py<|end_file_name|><|fim▁begin|>"""Tests for forms in eCommerce app.""" from django.test import TestCase from ecommerce.forms import OrderForm required_fields = { 'phone': '123456789', 'email': 'valid@email.ru', } invalid_form_email = {<|fim▁hole|>no_phone = {'email': 'sss@sss.sss'} ...
'email': 'clearly!not_@_email', 'phone': '123456789' }
<|file_name|>codec_mme_audio_spdifin.cpp<|end_file_name|><|fim▁begin|>/************************************************************************ COPYRIGHT (C) SGS-THOMSON Microelectronics 2007 Source file name : codec_mme_audio_spdifin.cpp Author : Gael Lassure Implementation of the spdif-input audio codec c...
} return CodecNoError;
<|file_name|>draggable-element-base.ts<|end_file_name|><|fim▁begin|>import { Input } from '@angular/core'; import { Config } from '../../../../../../../config/config'; import { ISpecmatePositionableModelObject } from '../../../../../../../model/ISpecmatePositionableModelObject'; import { Id } from '../../../../../.....
private get isOffX(): boolean { return this.isCoordOff(this.rawX, this.center.x); }
<|file_name|>when_fn_regular.rs<|end_file_name|><|fim▁begin|>use super::*; #[mockable] fn function(arg: bool) -> String { format!("{}", arg) } #[test] fn and_not_mocked_then_runs_normally() { assert_eq!("true", function(true)); } #[test] fn and_continue_mocked_then_runs_with_modified_args() { unsafe { ...
assert_eq!("mocked true", function(true)); }
<|file_name|>TextBox.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react'; import './TextBox.css'; interface Props { className: string; onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void; placeholder: string; } class TextBox extends React.Component<Props, {}> {<|fim▁hole|> } private han...
public constructor(props: Props) { super(props); this.handleChange = this.handleChange.bind(this);
<|file_name|>address.js<|end_file_name|><|fim▁begin|>'use strict'; /* jshint maxstatements: 30 */ var chai = require('chai'); var should = chai.should(); var expect = chai.expect; var bitcore = require('..'); var PublicKey = bitcore.PublicKey; var Address = bitcore.Address; var Script = bitcore.Script; var Networks ...
<|file_name|>ovirt_auth.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
description: - "A boolean flag indicating if Kerberos authentication should be used instead of the default basic authentication."
<|file_name|>splitToWords.H<|end_file_name|><|fim▁begin|>/****************************************************************************** * * This file is part of canu, a software program that assembles whole-genome * sequencing reads into contigs. * * This software is based on: * 'Celera Assembler' (http://...
* * Brian P. Walenz beginning on 2016-FEB-25 * are a 'United States Government Work', and