prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>acpiutils.cpp<|end_file_name|><|fim▁begin|>#include <stdlib.h> #include <string.h> #include <QStringList> #include <QDir> #include <QDebug> #include "acpiutils.h" //================================================================================== #define ACPI_PATH_PROC "/proc/acpi/" #define ACPI_PATH...
<|file_name|>OAuthMapToUserRegistryWithRegMismatch2ServerTests.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2016, 2021 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made availa...
<|file_name|>generate.js<|end_file_name|><|fim▁begin|>var generatetask = require('../source/ajgenesis/tasks/generate'), createtask = require('../create'), path = require('path'), fs = require('fs'), ajgenesis = require('ajgenesis'); exports['generate'] = function (test) { test.async(); ...
exports['generate in directory'] = function (test) {
<|file_name|>master.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /// <reference types="node" /> import * as cluster from 'cluste...
/**
<|file_name|>test.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <set> using namespace std; #define all(t) begin(t), end(t) #define sp << " " << long gcd(long m, long n) { while (m != 0) { long k = n%m; n=m; m=k; } return n; } <|...
<|file_name|>Symbol.py<|end_file_name|><|fim▁begin|>class Symbol(): def __init__(self, name, isterm): self.name = name self.isterm = isterm def __str__(self): if self.isterm: if self.name == "": return "&" return "'{}'".format(self.name)<|fim▁hole...
<|file_name|>match_wild_err_arm.rs<|end_file_name|><|fim▁begin|>// revisions: edition2018 edition2021 // [edition2018] edition:2018 // [edition2021] edition:2021 #![feature(exclusive_range_pattern)] #![allow(clippy::match_same_arms)] #![warn(clippy::match_wild_err_arm)] fn match_wild_err_arm() { let x: Result<i32,...
} }
<|file_name|>bounding_sphere_repr.rs<|end_file_name|><|fim▁begin|>use na::Translate; use bounding_volume::{HasBoundingSphere, BoundingSphere}; use math::{Scalar, Point, Vect, Isometry}; use shape::{Ball, Capsule, Compound, Cone, Convex, Cuboid, Cylinder, TriMesh, Polyline, Plane, Segment, Triangle}; use ins...
<|file_name|>test_Matrix.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. 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...
void testParamReluForward(int height, int width, int w_height, int w_width) {
<|file_name|>Utils.ts<|end_file_name|><|fim▁begin|>import { Fail, Ok, Result } from "./Result"; export function inlineEscaped(str : string) : Result<string, string> { let result = "" for (let i = 0; i < str.length; ++i) { const ch = str[i]; if (ch == "\\") { if (i + 1 === str.length) { return new Fail("Ex...
return new Ok(result); } export function stripComments(line : string) : Result<string, string> {
<|file_name|>course.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for # more information about the licensing of this file. """ Course page """ import web from inginious.frontend.pages.utils import INGIniousPage class CoursePage(I...
if (total_tasks % page_limit) != 0 or pages == 0: pages += 1 if (page_limit * current_page + page_limit) < total_tasks: page_tasks_ids = list(filtered_tasks.keys())[page_limit * current_page:
<|file_name|>Rgaa42019Rule010802Test.java<|end_file_name|><|fim▁begin|>/* * Tanaguru - Automated webpage assessment * Copyright (C) 2008-2015 Tanaguru.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the F...
checkResultIsPreQualified(processResult, 2, 2); checkRemarkIsPresent(
<|file_name|>experiment.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Manage and display experimental results. """ __license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>'<|fim▁hole|> import sys import os import numpy import random import scipy import socket sys.path.append('./cod...
__author__ = 'Lucas Theis <lucas@theis.io>' __docformat__ = 'epytext' __version__ = '0.4.3'
<|file_name|>test_knox_co_agenda_scraper.py<|end_file_name|><|fim▁begin|>import pytest import responses from document import Document from scrapers.knox_tn_agendas_scraper import KnoxCoTNAgendaScraper from . import common from . import utils class TestKnoxAgendaScraper(object): session = None page_str = "" ...
@responses.activate def test_full_scraper(self):
<|file_name|>main.js<|end_file_name|><|fim▁begin|>define([ 'base/Module', './show/Controller' ],function(Module, ShowController){ <|fim▁hole|> var controller = new ShowController({ region: mod.kernel.headerRegion }); controller.showHeader(); } }; ...
var mod = Module('HeaderModule', {autoStart: false}); var API = { showHeader: function() {
<|file_name|>oc_project.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|__...
import ruamel.yaml as yaml except ImportError: import yaml
<|file_name|>remove.hpp<|end_file_name|><|fim▁begin|>// Copyright Neil Groves 2009. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // For more information, see http...
} } // namespace range
<|file_name|>lib.d.ts<|end_file_name|><|fim▁begin|>/* ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the Licens...
new(): SVGFEFuncAElement;
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for ssssss project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS import os if 'SERVER_SOFTWARE' in os.environ: from sae.const import ( MYSQL_HOST, MYSQL_PORT, MYS...
<|file_name|>base58.js<|end_file_name|><|fim▁begin|>module.exports = (app) => { let Base58 = {}; Base58.alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'; Base58.alphabetMap = {}; for(let i = 0; i < Base58.alphabet.length; i++) { Base58.alphabetMap[Base58.alphabet.charAt(i)] = i }...
while (carry) { bytes.unshift(carry); carry = bytes[0] >> 8; bytes[0] &= 0xff
<|file_name|>Projects.py<|end_file_name|><|fim▁begin|>from datetime import datetime from django.contrib.auth.models import User from django.db import models from uccaApp.models import Layers, Users, Constants class Projects(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(max_le...
<|file_name|>WebMediaStreamTrack.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 Google 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 mus...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(plugin, asm, start)] #![no_std] #![plugin(macro_zinc)] extern crate zinc; use zinc::hal::mem_init::{init_data, init_stack}; #[zinc_main] fn run() { init_data(); init_stack(); unsafe { asm!("nop") }<|fim▁hole|><|fim▁end|>
}
<|file_name|>CacheableFileTest.ts<|end_file_name|><|fim▁begin|>// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. // // Copyright 2016-2018 Pascal ECHEMANN. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You ...
@TestSuite({ description: "Test the CacheableFile class properties"
<|file_name|>call_analytics.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity 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...
#[derive(Eq, PartialEq, Default, Clone, Copy, Debug, Binary)]
<|file_name|>conditional_test_req.py<|end_file_name|><|fim▁begin|>import unittest from conans.test.utils.tools import TestClient from conans.util.files import load, save class ConditionalReqsTest(unittest.TestCase): def conditional_requirements_test(self): conanfile = """from conans import ConanFile cla...
requires = "Hello/0.1@lasote/testing" settings = "os", "build_type", "product" def requirements(self):
<|file_name|>weather.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from .. import app, celery import hashlib import hmac import time import requests from . import wechat_custom @celery.task def get(openid): """获取天气与空气质量预报""" content = [] current_hour = time.strftime('%H') ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2013 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser ...
<|file_name|>cni_linux.go<|end_file_name|><|fim▁begin|>// // Last.Backend LLC CONFIDENTIAL // __________________ //<|fim▁hole|>// NOTICE: All information contained herein is, and remains // the property of Last.Backend LLC and its suppliers, // if any. The intellectual and technical concepts contained // herein are p...
// [2014] - [2019] Last.Backend LLC // All Rights Reserved. //
<|file_name|>node.rs<|end_file_name|><|fim▁begin|>use std::fmt::{Display, Formatter}; use crate::error::NodeError; use crate::lexer::ItemType; use crate::utils::unquote_char; use gtmpl_value::Value; macro_rules! nodes { ($($node:ident, $name:ident),*) => { #[derive(Debug)] #[derive(Clone)] ...
$(Nodes::$name(ref t) => t.fmt(f),)* } } }
<|file_name|>eshm20_craton.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2022 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by ...
Module exports :class:`ESHM20Craton` """
<|file_name|>teamliquid.py<|end_file_name|><|fim▁begin|>""" $url teamliquid.net $url tl.net $type live """ import logging import re from urllib.parse import urlparse from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugins.afreeca import AfreecaTV from streamlink.plugins.twitch import Twitch log =...
def _get_streams(self): res = self.session.http.get(self.url)
<|file_name|>cornelldata.py<|end_file_name|><|fim▁begin|>import os import ast """ Load the cornell movie dialog corpus. Available from here: http://www.cs.cornell.edu/~cristian/Cornell_Movie-Dialogs_Corpus.html """ class CornellData: """ """ def __init__(self, dirName): """ Args: ...
<|file_name|>frame.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------------- # # -*- coding: utf-8 -*- # # phlox-libdc1394/dc1394/frame.py # # Copyright (C) 2016, by Matthias Yang Chen <matthias_cy@outlook.com> # All rights reserved. # # phlox-libdc1394 is free soft...
_frame = None def __new__(cls, camera, frame): """
<|file_name|>maskoceans.py<|end_file_name|><|fim▁begin|>from mpl_toolkits.basemap import Basemap, shiftgrid, maskoceans, interp import numpy as np import matplotlib.pyplot as plt # example showing how to mask out 'wet' areas on a contour or pcolor plot.<|fim▁hole|>latsin = np.loadtxt('etopo20lats.gz') # shift data s...
topodatin = np.loadtxt('etopo20data.gz') lonsin = np.loadtxt('etopo20lons.gz')
<|file_name|>workbench.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------...
mark('code/didStartWorkbench');
<|file_name|>linalg_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
{"testcase_name": "_shapes={}".format( ','.join(jtu.format_shape_dtype_string(s, dtype) for s in shapes)), "shapes": shapes, "dtype": dtype} for shapes in [
<|file_name|>LogWindow.cpp<|end_file_name|><|fim▁begin|>/* --------------------------------------------------------------------------- Open Asset Import Library (ASSIMP) --------------------------------------------------------------------------- Copyright (c) 2006-2010, ASSIMP Development Team All rights reserved. R...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>## @package hfst.exceptions ## exceptions... ## Base class for HfstExceptions. Holds its own name and the file and line number where it was thrown. class HfstException: ## A message describing the error in more detail. def what(): pass ## Two or mo...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from gavel import app from gavel.models import * from gavel.constants import * import gavel.settings as settings import gavel.utils as utils from flask import ( redirect, render_template,<|fim▁hole|> request, url_for, ) import urllib.parse @app.route('/...
<|file_name|>RMIServer.java<|end_file_name|><|fim▁begin|>package controller.server; import controller.LibraryService; import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import java.rmi.RemoteException; public class RMIServer { public static void main(String[] a...
LibraryService service = new DBController();
<|file_name|>DatabaseBuilder.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python ######################################################################## # Copyright (c) 2017 # Daniel Plohmann <daniel.plohmann<at>mailbox<dot>org> # All rights reserved. ################################################################...
LOG.info("Now check for ASLR...") if check_aslr():
<|file_name|>LocalRepositoryClassGenerator.java<|end_file_name|><|fim▁begin|>package com.link184.respiration; import com.squareup.javapoet.AnnotationSpec; import com.squareup.javapoet.ClassName; import com.squareup.javapoet.JavaFile; import com.squareup.javapoet.MethodSpec; import com.squareup.javapoet.ParameterizedTy...
<|file_name|>test_pep440.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """PEP 440 verschemes tests""" import unittest from verschemes.pep440 import Pep440Version class Pep440VersionTestCase(unittest.TestCase): def test_one_segment(self): version = Pep440Version(release1=4) self.assert...
version = Pep440Version(development=42)
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Module Dependencies */ var gulp = require('gulp'); var sass = require('gulp-sass'); var app = require('./app.js'); /** * Config */ var PUBLIC = __dirname + '/public'; var ASSETS = PUBLIC + '/assets'; /** * Compiling */ gulp.task('sas...
gulp.src(ASSETS + '/styles/sass/app.scss')
<|file_name|>select.rs<|end_file_name|><|fim▁begin|>#[macro_export(local_inner_macros)] macro_rules! select_inner { ( $( any ($any:expr) -> $var:ident => $abody:expr , )* $( one ($sub:expr) => $cbody:expr , )* nonblocking $nonblocking:literal => $bbody:expr , error -> $e:ident => $eb...
(
<|file_name|>web-app-container.js<|end_file_name|><|fim▁begin|>/*global require: false, module: false, process: false */ "use strict"; var mod = function( _, Promise, Options, Logger ) { var Log = Logger.create("AppContainer"); var WebAppContainer = function() { this.initialize.apply(this, arguments)...
};
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(default_type_params)] #![feature(phase)]<|fim▁hole|>pub use basicclient::{BasicClient, ConnectionStatus}; pub use capability::{Capability, CapabilityModifier}; pub use connection::Connection; pub use irc_methods::IrcMethods; pub use message::{Message, MessageE...
#[phase(plugin)] extern crate regex_macros; extern crate regex;
<|file_name|>test_bubble_chart.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl import pytest from openpyxl.xml.functions import fromstring, tostring from openpyxl.tests.helper import compare_xml @pytest.fixture def BubbleChart(): from ..bubble_chart impor...
<|file_name|>Main.js<|end_file_name|><|fim▁begin|><|fim▁hole|>size 105460<|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:eb830b3ada371c6f6af6bd512f864699a8123c5922f0376292ece99b8fc9e602
<|file_name|>ceil_f32.rs<|end_file_name|><|fim▁begin|>#pragma version(1) #pragma rs java_package_name(android.renderscript.cts) void ceil_f32_1(const float *in, float *out) { *out = ceil(*in); } void ceil_f32_2(const float2 *in, float2 *out) { *out = ceil(*in); } void ceil_f32_3(const float3 *in, float3 *out...
<|file_name|>graph.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Patrick Burroughs <celti@celti.name>. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // https://www.apache.org/licenses/LICENSE-2.0>, or the MIT license // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your opti...
"horizontal" => { try!(braille::horizontal_graph(reverse, input)) } "vertical" => { try!(braille::vertical_graph(reverse, input)) } _ => { return Err(CommandError::UnknownError) }
<|file_name|>poc.js<|end_file_name|><|fim▁begin|>#!/usr/bin/node --harmony 'use strict' const noble = require('noble'), program = require('commander') program .version('0.0.1') .option('-p, --prefix <integer>', 'Manufacturer identifier prefixed to all fan commands', parseInt) .option('-t, --target [mac]', 'M...
}) noble.on('discover', function(peripheral) {
<|file_name|>examples.js<|end_file_name|><|fim▁begin|><|fim▁hole|>.factory('formPostData', ['$document', function($document) { return function(url, fields) { var form = angular.element('<form style="display: none;" method="post" action="' + url + '" target="_blank"></form>'); angular.forEach(fields, function(...
angular.module('examples', [])
<|file_name|>videosController.js<|end_file_name|><|fim▁begin|>'use strict'; /** * Home controller simply lists all the videos */ angular.module("nodeVideoCMS.videos").controller("VideosCtrl", function($scope, $routeParams, api){ var videosPerPage = 12,<|fim▁hole|> $scope.paginationVisible = false; if($routePa...
criteria; $scope.maxSize = 5; $scope.currentPage = 1;
<|file_name|>workdays_t.py<|end_file_name|><|fim▁begin|>from ..workdays import * from datetime import datetime, timedelta from time import strptime import math import traceback tests=[] def test( fn ): tests.append(fn) return fn<|fim▁hole|>def runTests(): for t in tests: print t try: t() ...
<|file_name|>appsettings.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|> FLUENT_CONTENTS_CACHE_OUTPUT = getattr(settings, 'FLUENT_CONTENTS_CACHE_OUTPUT', True) FLUENT_CONTENTS_PLACEHOLDER_CONFIG = getattr(settings, 'FLUENT_CONTENTS_PLACEHOLDER_CONFIG', {}) # Note: the default language setting is used during the migr...
Overview of all settings which can be customized. """ from django.conf import settings from parler import appsettings as parler_appsettings
<|file_name|>client.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from ZSI import Binding MESSAGE = "Hello from Python!" def main(): binding = Binding(url='http://localhost:8080/server.py') print ' Sending: %s' % MESSAGE response = binding.echo(MESSAGE) print 'Response: %s' % MESSAGE if __...
main()
<|file_name|>RulesMatrix.tsx<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012-2022 Online-Go.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * Lic...
stone.
<|file_name|>yamlImport.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Alexander David Leech @date: 03/06/2016 @rev: 1 @lang: Python 2.7 @deps: YAML @desc: Class to use as an interface to import YAML files """ import yaml class yamlImport(): @staticmetho...
return config
<|file_name|>datepickerDemoCtrl.js<|end_file_name|><|fim▁begin|>'use strict'; /* Controllers */ <|fim▁hole|> $scope.today = function() { $scope.dt = new Date(); }; $scope.today(); $scope.showWeeks = true; $scope.toggleWeeks = function () { $scope.showWeek...
angular.module('myApp.controllers') .controller('DatepickerDemoCtrl', ['$scope','$timeout',function($scope, $timeout) {
<|file_name|>status_action_bar.js<|end_file_name|><|fim▁begin|>import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import IconButton from './icon_button'; import DropdownMenu from './dropdown_menu'; import { defineMessages, injectIntl } from 'react-...
<|file_name|>uniformDiffusivity.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-...
#endif // ************************ vim: set sw=4 sts=4 et: ************************ //
<|file_name|>lint-tool-cmdline-allow.rs<|end_file_name|><|fim▁begin|>// check-pass // aux-build:lint-tool-test.rs // ignore-stage1 // compile-flags: -A test-lint #![feature(plugin)] #![plugin(lint_tool_test)] //~ WARNING compiler plugins are deprecated fn lintme() {} //~^ WARNING item is named 'lintme' [clippy::test_...
<|file_name|>sendfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import sys,os from email.Utils import COMMASPACE, formatdate from email.MIMEMultipart import MIMEMultipart from email.MIMEText import MIMEText from email.MIMEImage import MIMEImage from email.MIMEImage import MIMEImage from email.MIMEBase import MI...
msg.attach(part)
<|file_name|>FLinkInput.java<|end_file_name|><|fim▁begin|>package org.mo.com.io;<|fim▁hole|><|fim▁end|>
public class FLinkInput { }
<|file_name|>rdflib-example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file is free software; you can redistribute it and/or mo...
# You should have received a copy of the GNU General Public License
<|file_name|>FileNameFormatter.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 Google 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/LI...
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */
<|file_name|>WsDeployService.hpp<|end_file_name|><|fim▁begin|>/*############################################################################## Copyright (C) 2011 HPCC Systems. All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero Gen...
bool m_bCloud; Owned<IPropertyTree> m_pCfg; CDateTime m_lastStarted;
<|file_name|>signals.py<|end_file_name|><|fim▁begin|>from allauth.account.signals import email_confirmed, email_changed, email_added, email_removed, user_signed_up, user_logged_in from django.contrib.auth.models import User, Group, Permission from django.db.models import Q from django.dispatch import receiver """inter...
@receiver(email_confirmed)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in the hop...
* You should have received a copy of the GNU General Public License * version 2 along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
<|file_name|>width_test.go<|end_file_name|><|fim▁begin|>package liner import ( "strconv" "testing" ) func accent(in []rune) []rune { var out []rune for _, r := range in { out = append(out, r) out = append(out, '\u0301') } return out }<|fim▁hole|>type testCase struct { s []rune glyphs int } var testC...
<|file_name|>SqlTool.java<|end_file_name|><|fim▁begin|>/* Copyright (c) 2001-2008, The HSQL Development Group * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source co...
/**
<|file_name|>p042.rs<|end_file_name|><|fim▁begin|>//! [Problem 42](https://projecteuler.net/problem=42) solver. #![warn(bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results)] #[macro_use(problem)] extern crate common; extern crate seq; use std::fs::File...
.trim_right_matches(',') .trim_matches('\"');
<|file_name|>corks.py<|end_file_name|><|fim▁begin|>import bottle from cork import Cork from utils import skeleton aaa = Cork('users', email_sender='c.emmery@outlook.com', smtp_url='smtp://smtp.magnet.ie') authorize = aaa.make_auth_decorator(fail_redirect='/login', role="user") def postd(): return bot...
print(repr(e)) return dict(ok=False, msg=e.message)
<|file_name|>unique-vec-res.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/...
let r2 = ~[~r { i: i2 }];
<|file_name|>nrdata.go<|end_file_name|><|fim▁begin|>// VNR - Plugin for NewRelic which monitors `varnishstat` // Copyright (C) 2015 Luke Mallon // // 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 Foundat...
Agent struct {
<|file_name|>day_11.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::iter::Peekable; use std::num::ParseFloatError; use std::str::Chars;<|fim▁hole|>pub enum Ast { Num(Result<f64, ParseFloatError>), Operand(char, Box<Ast>, Box<Ast>), } pub struct Parser<'p> { iter: Peekable<Chars<'p>> } impl<...
#[derive(PartialEq, Debug)]
<|file_name|>JUnitBDDSoftAssertionsSuccessTest.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 * * Unles...
package org.assertj.core.api;
<|file_name|>flex-columns.test.js<|end_file_name|><|fim▁begin|>const path = require('path') const sassTrue = require('sass-true') const sassFile = path.join(__dirname, 'flex-columns.test.scss')<|fim▁hole|><|fim▁end|>
sassTrue.runSass({ file: sassFile }, describe, test)
<|file_name|>01.12.2015.22.25.cpp<|end_file_name|><|fim▁begin|>/* Димитър Валериев Трифонов, КН, 50Б, 146518 */ /* Задача 2. Да се напише програма, която сортира масива като използва структурата пирамида. */ #include "stdafx.h" #include <iostream> int total; void heapify(int arr[], int i) { // Get index of ...
<|file_name|>person_create.go<|end_file_name|><|fim▁begin|>// Code generated by entc, DO NOT EDIT. package model import ( "context" "errors" "fmt" "hello-ent/model/person" "time" "entgo.io/ent/dialect/sql/sqlgraph" "entgo.io/ent/schema/field" ) // PersonCreate is the builder for creating a Person entity. typ...
}) _node.Email = value } if value, ok := pc.mutation.Age(); ok {
<|file_name|>ProcessPanel.java<|end_file_name|><|fim▁begin|>/* * RapidMiner * * Copyright (C) 2001-2011 by Rapid-I and the contributors * * Complete list of developers available at our web site: * * http://rapid-i.com * * This program is free software: you can redistribute it and/or modify ...
import com.rapidminer.gui.MainFrame;
<|file_name|>vEQ_benchmark.py<|end_file_name|><|fim▁begin|>''' Created on 24 Feb 2015 @author: oche ''' from __future__ import unicode_literals from __future__ import division import argparse import os import sys import time import re import logging import json import numpy from plotter import makeSubPlot from os.pat...
db_loc = args.db_loc to_show = args.to_show
<|file_name|>cusnot.js<|end_file_name|><|fim▁begin|>/** * Created by OTHREE on 7/17/2016. <|fim▁hole|>function my_special_notification_callback(data) { var badge = document.getElementById('live_notify_badge2'); if (badge) { badge.innerHTML = data.unread_count; } var template = "<li> <a hr...
*/
<|file_name|>formatter.js<|end_file_name|><|fim▁begin|>"use strict"; const util = require("util"); const colors = require("colors");<|fim▁hole|>const consoleLog = console.log; const consoleWarn = console.warn; const consoleError = console.error; const EError = require("../eerror"); function padd(str, length = proces...
<|file_name|>angular-article-directive.js<|end_file_name|><|fim▁begin|>(function() { var app = angular.module('article-directive', ['ui.bootstrap.contextMenu']); app.config(function($sceProvider) { // Completely disable SCE. For demonstration purposes only! // Do not use in new projects. $sceProvider...
var link = function link(scope, element, attrs) { scope.toggleComments = function () { scope.$broadcast("event:toggle"); }
<|file_name|>common-tests.js<|end_file_name|><|fim▁begin|>import { createTest } from 'tests/test-utils' import moment from 'moment' import { EventTypes, Disciplines } from 'client/calendar/events/types' import _ from 'lodash' import ncnca2017 from '../2017-ncnca-events' import usac2017 from '../2017-usac-events' cons...
t.ok(event.promoters.every(x => x.id && x.id.startsWith('prm-')), 'each promoter\'s id should start from "prm-"') }
<|file_name|>WebDriver.cpp<|end_file_name|><|fim▁begin|>// Copyright 2011 Software Freedom Conservancy // 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/license...
<|file_name|>F7.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 License, or (at y...
<|file_name|>feature_artist.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2011 - 2015, Met Office # # This file is part of cartopy. # # cartopy 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 Founda...
""" super(FeatureArtist, self).__init__()
<|file_name|>HistogramClip.js<|end_file_name|><|fim▁begin|>/** * Controls for setting the clip for the histogram, either as a [min,max] range * or as a percentage. */ /*global mImport */ /******************************************************************************* * @ignore( mImport) ***************************...
<|file_name|>candlestick.py<|end_file_name|><|fim▁begin|>from math import pi import pandas as pd from bokeh.sampledata.stocks import MSFT from bokeh.plotting import * df = pd.DataFrame(MSFT)[:50] df['date'] = pd.to_datetime(df['date']) mids = (df.open + df.close)/2 spans = abs(df.close-df.open) inc = df.close > df....
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>""" Automatically generate marking helpers functions. """ import sys from .objects import Mark class SimpleHelpers(object): """ A class that is designed to act as a module and implement magic helper generation. """ def __init__(self): ...
raise AttributeError(name) try:
<|file_name|>cdssm_pred.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import numpy as np import scipy.sparse as sp from scipy.sparse import lil_matrix from nltk.tokenize import RegexpTokenizer from keras import backend as K from keras.models import Sequential from keras.engine.topology import Layer from keras...
model = Sequential()
<|file_name|>linear_congruential_generator.rs<|end_file_name|><|fim▁begin|>// Implements http://rosettacode.org/wiki/Linear_congruential_generator use std::num::Wrapping as w; trait LinearCongruentialGenerator { fn seed(&mut self, seed: u32); fn next(&mut self) -> u32; } struct BSDLinearCongruentialGenerator ...
<|file_name|>20.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import { ChartBarOverlay20 } from "../../"; export = ChartBarOverlay20;<|fim▁end|>
<|file_name|>PropTypes.js<|end_file_name|><|fim▁begin|>/* @flow */ import { PropTypes } from 'react'; export function notImplemented(props: Object, propName: string, componentName: string): ?Error { if (props[propName]) { return new Error(`<${componentName}> "${propName}" is not implemented.`); } return nul...
export const component = PropTypes.oneOfType([PropTypes.func, PropTypes.string]);
<|file_name|>replace_it.py<|end_file_name|><|fim▁begin|>"""replace.py Tool for replacing variable names in Damon. Copyright (c) 2009 - 2011, Mark H. Moulton for Pythias Consulting, LLC. Purpose: This tool was developed to replace CamelCase argument variables with all lower case equivalents across all Damon modules. ...
##################### replace_ = {}
<|file_name|>issue-34074.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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/lic...
// option. This file may not be copied, modified, or distributed