prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>q2.py<|end_file_name|><|fim▁begin|># Experiment with boundary for collections L = [0, 1, 2, 3] print('-------- Part A --------') # Index beyond, generates a IndexError exception try: L[4] # part (a) of question except IndexError as err: print('IndexError Exception', err) print('-------- Part B --...
print(sliced)
<|file_name|>example_02.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python #/* # * example_02.c: sample gnome-print code # * # * This program 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;...
gpc.showpage()
<|file_name|>preferences.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use crate::commands::Result; use crate::models::application::{Application, Preferences}; use crate::util; pub fn edit(app: &mut Application) -> Result { let preference_buffer = Preferences::edit()?; util::add_buffer(preference_buffer, app) } ...
<|file_name|>fileview.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- # """This plugin renders the filesystem in a tree and a table.""" import cgi import os import random import socket from django import http from M2Crypto import X509 from grr.gui import renderers from ...
(23, 1): "tcp6",
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright (c) Pymatgen Development Team.<|fim▁hole|> """ This package contains various command line wrappers to programs used in pymatgen that do not have Python equivalents. """<|fim▁end|>
# Distributed under the terms of the MIT License.
<|file_name|>VelocityTrim.js<|end_file_name|><|fim▁begin|>import React from 'react' import PropTypes from 'prop-types' import VelocityTrimControls from './VelocityTrimControls' import Instrument from '../../images/Instrument' import styles from '../../styles/velocityTrim' import { trimShape } from '../../reducers/veloc...
</section> ) }
<|file_name|>test_context.py<|end_file_name|><|fim▁begin|># Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 # # ...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import linecache import sys import numpy from six import iteritems from theano import config from theano.compat import OrderedDict, PY3 def simple_extract_stack(f=None, limit=None, skips=[]): """This is traceback.extract_st...
<|file_name|>ExternalSessionExpires.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2019 Tremolo Security, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the...
<|file_name|>OfeliaDebianVMConfigurator.py<|end_file_name|><|fim▁begin|>import shutil import os import jinja2 import string import subprocess import re from xen.provisioning.HdManager import HdManager from settings.settingsLoader import OXA_XEN_SERVER_KERNEL,OXA_XEN_SERVER_INITRD,OXA_DEBIAN_INTERFACES_FILE_LOCATION,O...
def _configureNetworking(vm,path): #Configure interfaces and udev settings try:
<|file_name|>prometheus.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2013-2020 Blockstack PBC, a public benefit corporation // Copyright (C) 2020 Stacks Open Internet Foundation // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as publ...
<|file_name|>item_knowbase.py<|end_file_name|><|fim▁begin|># Copyright 2017 Predict & Truly Systems 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.ap...
self.set_attributes(attributes=attributes) self.set_attributes(attributes=defaults)
<|file_name|>voteActionType.ts<|end_file_name|><|fim▁begin|>export enum VoteActionType { <|fim▁hole|> ADD_VOTE_LIST = 'ADD_VOTE_LIST', CLEAR_ALL_DATA_VOTE = 'CLEAR_ALL_DATA_VOTE' }<|fim▁end|>
ADD_VOTE = 'ADD_VOTE', DELETE_VOTE = 'DELETE_VOTE',
<|file_name|>test_ins.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public L...
"Ltests/androguard/TestInvoke; TestInvoke8 (I I I I I I I I)I" : {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk 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 3 of the License, or<|fim▁hole|>// rgtk is dist...
// (at your option) any later version. //
<|file_name|>MissFailoverRoute.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be foun...
McrouterRouteHandlePtr makeNullRoute(); McrouterRouteHandlePtr makeMissFailoverRoute( std::vector<McrouterRouteHandlePtr> targets) {
<|file_name|>entrypoint.go<|end_file_name|><|fim▁begin|>package tracing import ( "context" "net/http" "github.com/containous/alice" "github.com/containous/traefik/middlewares" "github.com/containous/traefik/tracing" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" ) const ( ...
e.next.ServeHTTP(recorder, req) tracing.LogResponseCode(span, recorder.Status()) }
<|file_name|>TestSetEvent.java<|end_file_name|><|fim▁begin|>/* * 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 version 2 of the License, or * (at your option) any later ve...
<|file_name|>wiredata.py<|end_file_name|><|fim▁begin|># Copyright (C) Dnspython Contributors, see LICENSE for text of ISC license # Copyright (C) 2011,2017 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # pr...
if start < 0 or stop < 0: raise dns.exception.FormError # If it's not an empty slice, access left and right bounds
<|file_name|>toLower.ts<|end_file_name|><|fim▁begin|>import { Injectable, Pipe } from '@angular/core'; /* Generated class for the ToLower pipe. See https://angular.io/docs/ts/latest/guide/pipes.html for more info on Angular 2 Pipes. */ @Pipe({ name: 'tolower' }) @Injectable() export class ToLower { /* T...
return value.toLowerCase();
<|file_name|>text_edit.rs<|end_file_name|><|fim▁begin|>use crate::{TextUnit, TextRange, TextBuf, Text, tu}; use std::cmp::Ordering; #[derive(Clone, Debug)] pub struct TextEdit { pub ops: Vec<TextEditOp>, } #[derive(Clone, Debug)] pub enum TextEditOp { Copy(TextRange), // TODO: check for disjoint ranges In...
Ordering::Greater => panic!("Invalid edit"), } }
<|file_name|>modules.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Tue Mar 14 02:17:11 2017 <|fim▁hole|>@author: guida """ import json import requests def get_url(url): response = requests.get(url) content = response.content.decode("utf8") return content #Json parser ...
<|file_name|>uint_impl.rs<|end_file_name|><|fim▁begin|>use parse::uint::*; use RoundingMode; impl ToU32 for bool { /// Parse [`bool`](https://doc.rust-lang.org/std/primitive.bool.html) to /// [`u32`](https://doc.rust-lang.org/std/primitive.u32.html) /// (see more: [`bool_to_u32_res`](../../parse/uint/fn.b...
<|file_name|>run_parallel_Heat_NumPy.py<|end_file_name|><|fim▁begin|>from mpi4py import MPI from pySDC.helpers.stats_helper import filter_stats, sort_stats from pySDC.implementations.controller_classes.controller_MPI import controller_MPI from pySDC.implementations.collocation_classes.gauss_radau_right import CollGaus...
description['sweeper_class'] = generic_implicit # pass sweeper description['sweeper_params'] = sweeper_params # pass sweeper parameters description['level_params'] = level_params # pass level parameters
<|file_name|>template_expansion.go<|end_file_name|><|fim▁begin|><|fim▁hole|>package internalversion import ( "github.com/openshift/origin/pkg/template/api" "k8s.io/apimachinery/pkg/api/errors" ) // TemplateListerExpansion allows custom methods to be added to // TemplateLister. type TemplateListerExpansion interface...
<|file_name|>sync.rs<|end_file_name|><|fim▁begin|>//! `Await` implementations for _some_ `std::sync`` types use Await; use std::sync::{Mutex, MutexGuard, LockResult}; // Await `Mutex` impl<'a, T: ?Sized> Await<LockResult<MutexGuard<'a, T>>> for &'a Mutex<T> { fn await(self) -> LockResult<MutexGuard<'a, T>> { ...
<|file_name|>dac.py<|end_file_name|><|fim▁begin|># j4cDAC test code # # Copyright 2011 Jacob Potter # # 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, version 3. # # This program is distributed i...
def __init__(self, host, port = 7765):
<|file_name|>templates.test.js<|end_file_name|><|fim▁begin|>/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const _ = require("underscore") const path = require("path") co...
<|file_name|>fixedcouponbond_project.py<|end_file_name|><|fim▁begin|>from datetime import date from openpyxl import load_workbook if __name__ == '__main__': wb = load_workbook('FixedCouponBond.xlsx') ws = wb.active # Take the input parameters today = ws['C2'].value.date() # OIS Data ois_start...
out_list[i][0].value = output_npv[i]
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import functools from time import strftime import tensorflow as tf # lazy_property: no need for if $ not None logic def lazy_property(function): attribute = '_cache_' + function.__name__ @property @functools.wraps(function) def decorator(self): ...
<|file_name|>0009_auto_20150821_0243.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0008_auto_20150819_0050'),<|fim▁hole|> ] operations = [ ...
<|file_name|>Rule_PREVTAG.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1995-2012, The University of Sheffield. See the file * COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt * * This file is part of GATE (see http://gate.ac.uk/), and is free * software, licenced under the GNU L...
* * HepTag was originally written by Mark Hepple, this version contains * modifications by Valentin Tablan and Niraj Aswani.
<|file_name|>general_script_L1_PACS.py<|end_file_name|><|fim▁begin|>### This script fetches level-1 PACS imaging data, using a list generated by the ### archive (in the CSV format), attaches sky coordinates and masks to them ### (by calling the convertL1ToScanam task) and save them to disk in the correct ### format for...
path = dir_root +"L1/"
<|file_name|>JobExecutionState.java<|end_file_name|><|fim▁begin|>package com.swfarm.biz.chain.bo; import java.io.Serializable; import java.sql.Timestamp; import java.util.Random; import com.swfarm.pub.framework.FormNumberCache; public class JobExecutionState implements Serializable { private Long id; ...
<|file_name|>main.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/L...
}
<|file_name|>os.bot.hpp<|end_file_name|><|fim▁begin|>/** Copyright (c) 2017, Philip Deegan. 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 code must retain the above cop...
kul::Dir const &prnt(parent()); if (_p != prnt.path() && !prnt.is()) parent().mk(); return CreateDirectory(locl().c_str(), NULL);
<|file_name|>validated.rs<|end_file_name|><|fim▁begin|>//! Module for holding Validated logic //!<|fim▁hole|>//! an `HList` of all your results. //! //! # Examples //! //! ``` //! #[macro_use] //! extern crate frunk; //! //! # fn main() { //! use frunk::Validated; //! use frunk::prelude::*; // for .into_validated() //!...
//! `Validated` is a way of running a bunch of operations that can go wrong (for example, //! functions returning `Result<T, E>`) and, in the case of one or more things going wrong, //! having all the errors returned to you all at once. In the case that everything went well, you get
<|file_name|>dialogs.hpp<|end_file_name|><|fim▁begin|>class Global_var_WeaponGUI { idd=-1; movingenable=false; class controls { class Global_var_WeaponGUI_Frame: RscFrame { idc = -1; x = 0.365937 * safezoneW + safezoneX; y = 0.379 * safezoneH + safezoneY; w = 0.170156 * safezoneW; h = 0.143 * saf...
class Global_var_WeaponGUI_Text: RscText { idc = -1; text = "Waffenauswahl"; //--- ToDo: Localize;
<|file_name|>job_delete.spec.js<|end_file_name|><|fim▁begin|>var expect = require('expect.js'); var Promise = require('bluebird'); var ZugZug = require('../lib/zugzug'); var Job = require('../lib/job'); describe('job.delete():Promise(self)', function() { var zz, job; beforeEach(function() { zz = new ZugZug(); ...
}); });
<|file_name|>hello_world.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import keras<|fim▁end|>
<|file_name|>B_Frame.py<|end_file_name|><|fim▁begin|>from DemoFramework import DemoFramework from LUIVerticalLayout import LUIVerticalLayout from LUIFrame import LUIFrame from LUILabel import LUILabel from LUIButton import LUIButton from LUIObject import LUIObject import random f = DemoFramework() f.prepare_demo("LUI...
# Functions
<|file_name|>unified-builder.ts<|end_file_name|><|fim▁begin|>import { Cache } from '../cache/cache'; import { BoundedCache } from '../cache/bounded'; import { KeyType } from '../cache/key-type'; import { BoundlessCache } from '../cache/boundless'; import { Weigher } from '../cache/weigher'; import { DefaultLoadingCache...
*/ export class CacheBuilderImpl<K extends KeyType, V> implements CacheBuilder<K, V> {
<|file_name|>adjlist.hpp<|end_file_name|><|fim▁begin|>/* COPYRIGHT (c) 2014 Umut Acar, Arthur Chargueraud, and Michael * Rainey * All rights reserved. * * \file adjlist.hpp * \brief Adjacency-list graph format * */ #ifndef _PASL_GRAPH_ADJLIST_H_ #define _PASL_GRAPH_ADJLIST_H_ #include "../../graph/include/grap...
return neighbors.data(); } vtxid_type* get_out_neighbors() const {
<|file_name|>EditorToolbarAction.java<|end_file_name|><|fim▁begin|>package de.uni.bremen.stummk.psp.calculation; import java.lang.reflect.InvocationTargetException; import java.util.List; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.ResourcesPl...
List<ScheduleEntry> e = Manager.getInstance().getSchedulePlanning(etc.getProjectPlanSummary().getProject().getProjectName());
<|file_name|>objectClassificationDataExportGui.py<|end_file_name|><|fim▁begin|>############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilast...
colors.append( QColor(128,0, 128) ) #purple colors.append( QColor(240, 230, 140) ) #khaki
<|file_name|>index.js<|end_file_name|><|fim▁begin|>console.log('----加载开始----'); <|fim▁hole|><|fim▁end|>
module.exports = (num) => { return num + 1; } console.log('----加载结束----');
<|file_name|>consensus_tree.py<|end_file_name|><|fim▁begin|>from flask import session, Blueprint from lexos.managers import session_manager from lexos.helpers import constants from lexos.models.consensus_tree_model import BCTModel from lexos.views.base import render<|fim▁hole|> consensus_tree_blueprint = Blueprint("con...
<|file_name|>profiles.go<|end_file_name|><|fim▁begin|>package trafficmanager // Copyright (c) Microsoft and contributors. 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 Licen...
result.Response = autorest.Response{Response: resp} err = autorest.NewErrorWithError(err, "trafficmanager.ProfilesClient", "Delete", resp, "Failure sending request") return
<|file_name|>pagers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 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/...
``List`` requests and continue to iterate through the ``items`` field on the corresponding responses.
<|file_name|>IntermolecularDRMSD.cpp<|end_file_name|><|fim▁begin|>/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Copyright (c) 2016,2017 The plumed team (see the PEOPLE file at the root of the distribution for a list of names) See http://www.plumed.org for more information. T...
}
<|file_name|>test_scheduler.py<|end_file_name|><|fim▁begin|>from __future__ import annotations from decimal import Decimal from typing import ( Any, Mapping, Sequence, ) import uuid from pprint import pprint import pytest from ai.backend.common.docker import ImageRef from ai.backend.common.types import (...
example_total_capacity, example_pending_sessions, example_existing_sessions)
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export { Button, ButtonFactory } from './Button';<|fim▁end|>
<|file_name|>example_grid_time.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>""" Grid time ============= """ from datetime import timedelta import numpy as np from opendrift.readers import reader_global_landmask from opendrift.readers import reader_netCDF_CF_generic from opendrift.models.oceandrift ...
<|file_name|>backtrace.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/licen...
// Allocate necessary structures for doing the stack walk let process = unsafe { GetCurrentProcess() }; let thread = unsafe { GetCurrentThread() }; let mut context: arch::CONTEXT = unsafe { intrinsics::init() };
<|file_name|>discard_framebuffer.py<|end_file_name|><|fim▁begin|>from OpenGLCffi.GLES1 import params<|fim▁hole|>@params(api='gles1', prms=['target', 'numAttachments', 'attachments']) def glDiscardFramebufferEXT(target, numAttachments, attachments): pass<|fim▁end|>
<|file_name|>test_add_project.py<|end_file_name|><|fim▁begin|>from model.project import Project def test_add_project(app): project=Project(name="students_project", description="about Project") try: ind = app.project.get_project_list().index(project) app.project.delete_named_project(project) ...
assert len(old_projects) + 1 == len(new_projects)
<|file_name|>package.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, t...
# conditions of the GNU Lesser General Public License for more details.
<|file_name|>findARestaurant.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import json import httplib2 import sys import codecs sys.stdout = codecs.getwriter('utf8')(sys.stdout) sys.stderr = codecs.getwriter('utf8')(sys.stderr) foursquare_client_id = 'SMQNYZFVCIOYIRAIXND2D5SYBLQUOPDB4HZTV13TT22AGACD' foursq...
restaurant_name = restaurant['name'] restaurant_address = restaurant['location']['formattedAddress'] #Format the Restaurant Address into one string
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r"^/android/setup$", views.android_setup_view, name="notif_android_setup"),<|fim▁hole|>]<|fim▁end|>
url(r"^/chrome/setup$", views.chrome_setup_view, name="notif_chrome_setup"), url(r"^/chrome/getdata$", views.chrome_getdata_view, name="notif_chrome_getdata"), url(r"^/gcm/post$", views.gcm_post_view, name="notif_gcm_post"), url(r"^/gcm/list$", views.gcm_list_view, name="notif_gcm_list")
<|file_name|>calc.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC<|fim▁hole|># # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR C...
# # 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
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.contrib import auth from django.contrib.auth.models import User from django.test import TestCase from django.urls.base import reverse class TestAccountRegistration(TestCase): def setUp(self): # create one user for convenience response ...
<|file_name|>memory_info.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ DragonPy - base memory info ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :created: 2013 by Jens Diemer - www.jensdiemer.de :copyleft: 2013 by the MC6809 team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE ...
<|file_name|>structs.rs<|end_file_name|><|fim▁begin|>use collections::BTreeMap; //JSON support use serialize::json::{ self, ToJson, Json}; // syntax elements use syntax::ast::StructDef; use syntax::ast::StructFieldKind::*; pub struct StructDefinition { name: String, // (name ,type ) fields...
impl StructDefinition { pub fn new(name: String, struct_def: &StructDef) -> StructDefinition {
<|file_name|>specularlighting.cpp<|end_file_name|><|fim▁begin|>/** \file * SVG <feSpecularLighting> implementation. * */ /* * Authors: * hugo Rodrigues <haa.rodrigues@gmail.com> * Jean-Rene Reinhard <jr@komite.net> * Abhishek Sharma * * Copyright (C) 2006 Hugo Rodrigues * 2007 authors * ...
this->specularConstant_set = FALSE; }
<|file_name|>max-length.ts<|end_file_name|><|fim▁begin|>import { Validation, ValidationType } from '.'; export class MaxLength extends Validation { <|fim▁hole|> super(ValidationType.MAX_LENGTH, message); } public get value(): number { return this._value; } }<|fim▁end|>
public constructor( message: string, private _value: number ) {
<|file_name|>RegAllocFast.cpp<|end_file_name|><|fim▁begin|>//===- RegAllocFast.cpp - A fast register allocator for debug code --------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // /...
<|file_name|>hex.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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/licens...
InvalidHexCharacter(char, usize),
<|file_name|>PageLoader.java<|end_file_name|><|fim▁begin|>/* * SPDX-License-Identifier: GPL-3.0 * * * (J)ava (M)iscellaneous (U)tilities (L)ibrary * * JMUL is a central repository for utilities which are used in my * other public and private repositories. *<|fim▁hole|> * it under the terms of the GNU General ...
* Copyright (C) 2016 Kristian Kutin * * This program is free software: you can redistribute it and/or modify
<|file_name|>cms_app.py<|end_file_name|><|fim▁begin|>from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class ProductApphook(CMSApp): name = _("Product Apphook") urls = ["wlansi_store.urls"] <|fim▁hole|>apphook_pool.register(Product...
<|file_name|>pull_request.go<|end_file_name|><|fim▁begin|>package gitbot import "fmt" // PullRequest object from github API type PullRequest struct { Head *Head `json:"head"` Base *Head `json:"base"` Links *Links `json:"_links"` User *User `json:"user"` Merge...
Comments int `json:"comments"` Commits int `json:"commits"` Additions int `json:"additions"` Deletions int `json:"deletions"`
<|file_name|>validator.js<|end_file_name|><|fim▁begin|>/*! * Module dependencies. */ 'use strict'; const MongooseError = require('./'); /** * Schema validator error * * @param {Object} properties * @inherits MongooseError * @api private */ function ValidatorError(properties) {<|fim▁hole|> } const messag...
let msg = properties.message; if (!msg) { msg = MongooseError.messages.general.default;
<|file_name|>grid.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
Simpla CMS 2.3.8 = 0f9e3c6a3ac53725fa229f3620b7ca52
<|file_name|>_helpers.py<|end_file_name|><|fim▁begin|># Copyright 2016 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...
NOTICE = 300 WARNING = 400 ERROR = 500 CRITICAL = 600
<|file_name|>CookieNotice.tsx<|end_file_name|><|fim▁begin|>import * as React from "react" import { useEffect, useState } from "react" import classnames from "classnames" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome" import { faCheck } from "@fortawesome/free-solid-svg-icons/faCheck"<|fim▁hole|> ac...
import { Action, getTodayDate } from "./CookiePreferencesManager" export const CookieNotice = ({
<|file_name|>XML.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>org.json.XML<|fim▁end|>
<|file_name|>app_settings.rs<|end_file_name|><|fim▁begin|>extern crate clap; <|fim▁hole|>#[test] fn sub_command_negate_requred() { App::new("sub_command_negate") .setting(AppSettings::SubcommandsNegateReqs) .arg(Arg::with_name("test") .required(true) .index(1)) ...
use clap::{App, Arg, SubCommand, AppSettings};
<|file_name|>AdviceWithLambdaTest.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to Yo...
a.from("direct:bar").to("mock:bar"); a.interceptSendToEndpoint("mock:foo").skipSendToOriginalEndpoint().to("log:foo").to("mock:advised");
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A macro that maps unicode names to chars and strings. #![crate_type="dylib"] #![feature(quote, plugin_registrar, plugin, rustc_private)] #![plugin(regex_macros)] <|fim▁hole|> extern crate regex; extern crate unicode_names; use syntax::ast; use syntax::codemap; u...
extern crate syntax; extern crate rustc;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- """ desispec.pipeline ==================== Tools for pipeline creation and running. """ from __future__ import absolute_import, division, print_function from . import tasks from .defs import (task_states, prod_options_name, ...
# # See top-level LICENSE.rst file for Copyright information #
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from datetime import datetime from django.db import models from django.utils.translation import ugettext_lazy as _ class TestModel(models.Model): text = models.CharField(max_length=10, default=_('Anything')) class Company(models.Model): name = models.CharFie...
date_added = models.DateTimeField(default=datetime(1799,1,31,23,59,59,0))
<|file_name|>backend.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # F...
def processSourcePackages(self, packages, uploadForce=0, ignoreUploaded=0, forceVerify=0, transactional=0): # Insert/update the packages
<|file_name|>rax.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # (c) 2013, Jesse Keating <jesse.keating@rackspace.com,<|fim▁hole|># # Ansible 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 ver...
# Paul Durivage <paul.durivage@rackspace.com>, # Matt Martz <matt@sivel.net> # # This file is part of Ansible.
<|file_name|>error_handling.py<|end_file_name|><|fim▁begin|>from itty import * @error(500) def my_great_500(request, exception): html_output = """ <html> <head> <title>Application Error! OH NOES!</title> </head> <body> <h1>OH NOES!</h1> ...
def test_other(request): raise RuntimeError('Oops.') return 'This should never happen either either.'
<|file_name|>kendo.culture.zh-SG.js<|end_file_name|><|fim▁begin|>module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is i...
/******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__
<|file_name|>blocking.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. mod block_on; mod pool; <|fim▁hole|><|fim▁end|>
pub use block_on::*; pub use pool::*;
<|file_name|>axle.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** file : axle.cpp created : Sun Mar 19 00:05:09 CET 2000 copyright : (C) 2000 by Eric Espie email : torcs@free.fr vers...
sgn = SIGN(stl - str); #if 0 axle->arbSusp.x = fabs(stl - str);
<|file_name|>buster-test.js<|end_file_name|><|fim▁begin|>/** @license MIT License (c) copyright B Cavalier & J Hann */ /** * when * A lightweight CommonJS Promises/A and when() implementation * * when is part of the cujo.js family of libraries (http://cujojs.com/) * * Licensed under the MIT License at: * http:/...
proxyCall.callId = id;
<|file_name|>Migrate.js<|end_file_name|><|fim▁begin|>/* ************************************************************************ qooxdoo - the new era of web development http://qooxdoo.org Copyright: 2017 Christian Boulanger License: MIT: https://opensource.org/licenses/MIT See the LICENS...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* */ var htmlparser = require('htmlparser2'); var _ = require('lodash'); var quoteRegexp = require('regexp-quote'); module.exports = sanitizeHtml; // Ignore the _recursing flag; it's there for recursive // invocation as a guard against this exploit: // https://gith...
<|file_name|>async-gen-method-yield-as-identifier-reference-escaped.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/async-generators/yield-as-identifier-reference-escaped.case // - src/async-generators/syntax/async-class-expr-method.template /*--- description...
<|file_name|>issue_371.rs<|end_file_name|><|fim▁begin|>//! Checks that `executor.look_ahead().field_name()` is correct in presence of //! multiple query fields. //! See [#371](https://github.com/graphql-rust/juniper/issues/371) for details. //! //! Original author of this test is [@davidpdrsn](https://github.com/davidp...
#[graphql_object]
<|file_name|>connector.oracle.ts<|end_file_name|><|fim▁begin|>import {DBConnector, SqlBinding, SqlMaker} from './index'; class OracleSqlMaker extends SqlMaker { quote(value: string) { return `"${value.replace(/"/g, '""')}"`; } insert(table: string, columns: string[], sql_values: SqlBinding[], output_columns...
}, destroy(oracledb, db) {
<|file_name|>Bluetooth.py<|end_file_name|><|fim▁begin|>import serial from sys import platform as platform import serial.tools.list_ports import serial.threaded from pymouse import PyMouse from Voice.GoogleTTS import speak import threading import math import copy import time import json data_repository_ri...
<|file_name|>articles.js<|end_file_name|><|fim▁begin|>/** * Shopware 5 * Copyright (c) shopware AG * * According to our dual licensing model, this program can be used either * under the terms of the GNU Affero General Public License, version 3, * or under a proprietary license. * * The texts of the GNU Affero G...
api: { read: '{url controller=CanceledOrder action="getArticle"}' },
<|file_name|>feature-gate-crate_visibility_modifier.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 /...
fire: bool, air: bool, water: bool, }
<|file_name|>sched.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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/lice...
threads: 2, event_loop_factory: rustuv::event_loop, });
<|file_name|>prepare.js<|end_file_name|><|fim▁begin|>// list of points object, map_type dependant // fields: // .pt_index // .pt var river_points = []; var current_parcours_id; var current_deb; // debarquement (1) ou embarquement (0) var current_river_obj; /* Creates a point object */ function Point(lat,lon,previ...
if (d>1000.0) { return Math.round(d/1000.0) + '&nbsp;km';
<|file_name|>ShowFileTransfersDialogCommand.cpp<|end_file_name|><|fim▁begin|>/* UOL Messenger * Copyright (c) 2005 Universo Online S/A * * Direitos Autorais Reservados * All rights reserved * * Este programa é software livre; você pode redistribuí-lo e/ou modificá-lo * sob os termos da Licença Pública Geral GNU ...
void CShowFileTransfersDialogCommand::Execute() { CUIMApplication::GetApplication()->GetUIManager()->ShowFileTransferDialog(NULL);
<|file_name|>replication_controller_utils.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes 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://ww...
<|file_name|>capturegame.py<|end_file_name|><|fim▁begin|>__author__ = 'Tom Schaul, tom@idsia.ch' from random import choice from scipy import zeros from twoplayergame import TwoPlayerGame # TODO: undo operation class CaptureGame(TwoPlayerGame): """ the capture game is a simplified version of the Go game: the f...
if newg == oldg: self.liberties[newg].difference_update([pos])