prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>#[macro_export] macro_rules! tuple { ( $( $x:tt ),* ) => { { use berg_compiler::BergVal; BergVal::from_iter(vec![ $( val!($x) ),* ].drain(..)) } };<|fim▁hole|>#[macro_export] macro_rules! val { ( [ $( $x:tt ),* ] ) => { tuple!( $( $x ),* ) }; ( ( $( $x:tt ...
}
<|file_name|>exponential.rs<|end_file_name|><|fim▁begin|>use std::num::{sin, cos}; use extra::complex::Cmplx; use nodes; use eval::array_helpers::{simple_monadic_array}; use eval::eval::{AplFloat, AplInteger, AplComplex, AplArray, Value, eval_monadic}; use math_constants::e; pub fn exponential(first: &Value) -> Result...
} }
<|file_name|>evaluation_parameters.py<|end_file_name|><|fim▁begin|>import copy import datetime import logging import math import operator import traceback from collections import namedtuple from typing import Any, Dict, Optional, Tuple from pyparsing import ( CaselessKeyword, Combine, Forward, Group, ...
# or use provided pyparsing_common.number, but convert back to str: # fnumber = ppc.number().addParseAction(lambda t: str(t[0])) fnumber = Regex(r"[+-]?(?:\d+|\.\d+)(?:\.\d+)?(?:[eE][+-]?\d+)?")
<|file_name|>testdata.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2010 VoltDB Inc. # # VoltDB 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, eith...
testspec = """ class Database { /** test comment */
<|file_name|>Email.js<|end_file_name|><|fim▁begin|>'use strict'; /**<|fim▁hole|> * Email.js service * * @description: A set of functions similar to controller's actions to avoid code duplication. */ const _ = require('lodash'); const sendmail = require('sendmail')({ silent: true }); module.exports = { send: (...
<|file_name|>mainThreadTask.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.<|fim▁...
*--------------------------------------------------------------------------------------------*/ 'use strict'; import { TPromise } from 'vs/base/common/winjs.base';
<|file_name|>Paragraph.d.ts<|end_file_name|><|fim▁begin|>declare interface Paragraph extends Theme { color?: string, invert?: boolean<|fim▁hole|><|fim▁end|>
}
<|file_name|>static_request.d.ts<|end_file_name|><|fim▁begin|>import { RequestMethod } from './enums'; import { RequestArgs } from './interfaces'; import { Headers } from './headers'; /** * Creates `Request` instances from provided values. * * The Request's interface is inspired by the Request constructor defi...
* } * } * * var injector = Injector.resolveAndCreate([HTTP_PROVIDERS, AutoAuthenticator]);
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistr...
'security/ir.model.access.csv', 'sale_journal_view.xml', 'sale_journal_data.xml' ],
<|file_name|>di.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC 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 */ import {isForwardRef, resolveForwardRef} from '../di/forward_ref'; im...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use malachite_base_test_util::runner::Runner; pub(crate) fn register(runner: &mut Runner) { arithmetic::register(runner);<|fim▁hole|> comparison::register(runner); conversion::register(runner); logic::register(runner); } mod arithmetic; mod basic; mod co...
basic::register(runner);
<|file_name|>tracker.py<|end_file_name|><|fim▁begin|>__author__ = 'minhtule' from request import * class Tracker(object): """ """ def __init__(self, tracking_id, visitor): self.__tracking_id = tracking_id self.__visitor = visitor self.__debug_enabled = False @property<|fim▁...
def tracking_id(self): return self.__tracking_id @property
<|file_name|>enrollmentTermsApiSpec.js<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas 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 * Soft...
<|file_name|>test_auto_segmentEG_FEMPO.py<|end_file_name|><|fim▁begin|>import pandas as pd from sklearn.datasets import load_boston from sklearn.linear_model import LinearRegression from sklearn.tree import DecisionTreeRegressor from sklearn.cross_validation import train_test_split from sklearn.metrics import me...
clf = BasicSegmenterEG_FEMPO(ngen=30,init_sample_percentage = 1, n_votes=10, n = 10, base_estimator = base_estimator, unseen_x = X_test, unseen_y = y_test) clf.fit(X_train, y_train)
<|file_name|>qa_measure_processing_rate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from gnuradio import gr, gr_unittest from gnuradio import blocks import grdab class qa_measure_processing_rate(gr_unittest.TestCase): """ @brief QA for measure processing rate sink. This class implements a test bench to ...
rate = sink.processing_rate() assert(rate > 900000 and rate < 1100000)
<|file_name|>LanguageList.js<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * Copyright (c) 2014 Alberto Congiu (@4lbertoC) * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ 'use strict'; var React = require('react'); /** * Like Arr...
* Popular Repositories
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Empty<|fim▁hole|><|fim▁end|>
"""
<|file_name|>lagan_neu.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <fstream> #include <seqan/basic.h> #include <seqan/index.h> #include <seqan/seq_io.h> #include <seqan/sequence.h> #include <seqan/file.h> #include <seqan/score.h> #include <seqan/seeds.h> #include <seqan/align.h> using namespace seqan...
bool readFASTA(char const * path, CharString &id, Dna5String &seq){
<|file_name|>MovieRestController.java<|end_file_name|><|fim▁begin|>package com.github.ivanmarban.movies; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; @RestController public class MovieRestController { @Autowired...
public void delete(@PathVariable String id) { repo.delete(id); }
<|file_name|>367.py<|end_file_name|><|fim▁begin|>class Solution(object): def isPerfectSquare(self, num): """ :type num: int :rtype: bool """ # return num ** 0.5 == int(num ** 0.5) if num < 2: return True x = num // 2<|fim▁hole|><|fim▁end|>
while x * x > num: x = (x + num // x) // 2 return x * x == num
<|file_name|>result.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|>----------- Provides a TextTestResult that extends unittest._TextTestResult to provide support for error classes (such as the builtin skip and deprecated classes), and hooks for plugins to take over or extend reporting. """ import logging from unittes...
Test Result
<|file_name|>MinHeap.test.js<|end_file_name|><|fim▁begin|>const test = require('tape') const MinHeap = require('./MinHeap') test('find returns null in empty heap', assert => { const heap = new MinHeap() assert.equal(heap.findMin(), null) assert.end() }) test('length is 0 in empty heap', assert => { const hea...
const input = [] for (let i = 0; i < 1e5; i++) { const item = Math.floor(Math.random() * 1e4) input.push(item)
<|file_name|>google.py<|end_file_name|><|fim▁begin|>"""~google <search term> will return three results from the google search for <search term>""" import re import requests from random import shuffle from googleapiclient.discovery import build import logging from secret_example import GOOGLE_CUSTOM_SEARCH_ENGINE, GOOG...
searchterm = match[0]
<|file_name|>first_missing_positive.cpp<|end_file_name|><|fim▁begin|>/* First Missing Positive Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant space. */ #include ...
int a2[] = { 3, 4, -1, 1 }; int a3[] = { 1, 1 }; // bug, duplicate numbers
<|file_name|>search.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from json import loads from datetime import datetime from functools import partial from django.db.models import Q from django.contr...
""" def fn(predicate_value, field=None): # a min/max predicate can either take
<|file_name|>create_user_response.rs<|end_file_name|><|fim▁begin|>use crate::from_headers::*; use crate::User; use azure_sdk_core::errors::AzureError; use azure_sdk_core::{etag_from_headers, session_token_from_headers}; use http::HeaderMap; use std::convert::TryInto; #[derive(Debug, Clone, PartialEq)] pub struct Creat...
Ok(Self {
<|file_name|>compare_BSR.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """compares BSR values between two groups in a BSR matrix Numpy and BioPython need to be installed. Python version must be at least 2.7 to use collections""" from optparse import OptionParser import subprocess from ls_bsr.util import prun...
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>//! Event handling (mouse, keyboard, controller, touch screen, etc.) //! //! See [`Event`](enum.Event.html) for more information. //! //! # Unstable //! //! There are still many unanswered questions about the design of the events API in the turtle //! crate. This modul...
<|file_name|>a00250.js<|end_file_name|><|fim▁begin|>var a00250 = [ [ "data_count", "a00250.html#a370358835ed2aa53bcc515894b13eb87", null ],<|fim▁hole|> [ "evt_type", "a00250.html#a622197dded7bfa292535944e6870c5f7", null ] ];<|fim▁end|>
<|file_name|>sparkline.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Zack Guo <zack.y.guo@gmail.com>. All rights reserved. // Use of this source code is governed by a MIT license that can // be found in the LICENSE file. package widgets import ( "image" . "github.com/gizak/termui/v3" ) // Sparkline is like: ▅...
for i, sl := range self.Sparklines { heightOffset := (sparklineHeight * (i + 1)) barHeight := sparklineHeight if i == len(self.Sparklines)-1 {
<|file_name|>image.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import attr from cached_property import cached_property from navmazing import NavigateToSibling, NavigateToAttribute from wrapanapi.containers.image import Image as ApiImage from cfme.common import (WidgetasticTaggable, PolicyProfileAssignable...
def check_image_entities(self, image_entities): """check rows on Container Images table.""" images_view = navigate_to(self, 'All', use_resetter=False) images_view.paginator.set_items_per_page(1000)
<|file_name|>cny.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.ca...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages with open('requirements.txt') as reqs: inst_reqs = reqs.read().split('\n') setup( name='autobot', version='0.1.0', packages=find_packages(), author='Mikael Knutsson', author_email='mikael.knutsson@gm...
<|file_name|>78335000.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
jsonp({"cep":"78335000","cidade":"Colniza","uf":"MT","estado":"Mato Grosso"});
<|file_name|>FloatingLabel.js<|end_file_name|><|fim▁begin|>import React, { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { Animated, StyleSheet } from 'react-native'; import { H6 } from '@ui/typography'; import styled from '@ui/styled'; export const LabelText = styled(({ theme }) => ({ col...
<|file_name|>themes.js<|end_file_name|><|fim▁begin|>export default { standard: { credits: { enabled: false }, chart: { spacingBottom: 20, style: { fontFamily: "'proxima', 'Helvetica', sans-serif' ", paddingTop: '20px' // Make room for buttons } }, exporting: { ...
} }, title: '' }
<|file_name|>gravatar_tags.py<|end_file_name|><|fim▁begin|>import re import urllib import hashlib from django import template from django.conf import settings URL_RE = re.compile(r'^https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?', re.IGNORECASE) EMAIL_RE = re.compile(r'^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]...
for key, value in params.items(): if key in default_keys: k, default_value = DEFAULT_PARAMS[key] # skip parameters whose values are defaults,
<|file_name|>symbol_test.js<|end_file_name|><|fim▁begin|>/* * Copyright 2016 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org...
const SymbolProps = class { [s1]() { return 's1'; } [s2]() { return 's2'; } }
<|file_name|>completionForStringLiteralImport1.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts' /> // Should define spans for replacement that appear after the last directory seperator in import statements // @typeRoots: my_typings // @Filename: test.ts //// import * as foo0 from "./[|some|]/*0*/ ...
goTo.marker("1"); verify.completionListContains("someFile2", undefined, undefined, undefined, 1);
<|file_name|>mod.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/. */ //! Servo heavily uses display lists, which are retained-mode lis...
} fn hit_test_stacking_context<'a>(&self, stacking_context: &StackingContext,
<|file_name|>video.rs<|end_file_name|><|fim▁begin|>use rect::Rect; use surface::SDL_Surface; #[cfg(feature = "no_std")] use core::prelude::*; use libc::{c_void, c_int, c_float, c_char, uint16_t, uint32_t}; use num::FromPrimitive; pub type SDL_Rect = Rect; pub type SDL_bool = c_int; //SDL_video.h #[allow(missing_copy...
pub fn SDL_SetWindowIcon(window: *mut SDL_Window, icon: *mut SDL_Surface); pub fn SDL_SetWindowData(window: *mut SDL_Window, name: *const c_char, userdata: *const c_void) -> *const c_void;
<|file_name|>bundle.js<|end_file_name|><|fim▁begin|>/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /*****...
/******/ // expose the module cache /******/ __webpack_require__.c = installedModules;
<|file_name|>train_simple_network.py<|end_file_name|><|fim▁begin|>import os import argparse import datetime import yaml import api.src.common.initial_environment_config from ..models.dense import create_model from ..data_processing.data_generator import DataGenerator from ..common.config import TrainingConfig, DataCon...
LearningRateScheduler(TrainingConfig.schedule), EarlyStopping(patience=5) ]if not Config.NO_SAVE else []
<|file_name|>describe_router_vxnets.py<|end_file_name|><|fim▁begin|># ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License...
return { 'router': options.router, 'vxnet': options.vxnet,
<|file_name|>bip65-cltv-p2p.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util ...
def __init__(self): self.num_nodes = 1
<|file_name|>v1_image_source.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with ...
""" Returns the model properties as a dict """ result = {}
<|file_name|>index.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*-coding:utf-8-*- ''' Author : ming date : 2016/11/27 上午12:20 role : Version Update ''' from tornado import web<|fim▁hole|> def get(self, room): if room == 'get': raise HTTPError(500) self.room = room ...
from tornado.web import HTTPError class IndexHandler(web.RequestHandler):
<|file_name|>mergedDeclarationsWithExportAssignment1.ts<|end_file_name|><|fim▁begin|>/// <reference path='fourslash.ts'/> ////declare module 'M' ////{ //// class Foo { //// doStuff(x: number): number; //// } //// module Foo { //// export var x: number; //// } //// export = F...
////var z/*3*/ = new /*2*/Foo(); ////var r2/*5*/ = Foo./*4*/z;
<|file_name|>webapi.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Author: Dennis Lutter <lad1337@gmail.com> # Author: Jonathon Saine <thezoggy@gmail.com> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill is free software: you can redistribute it and/or modify # it under the terms o...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>VERSION = (0, 1, 5) __version__ = '.'.join(map(str, VERSION))<|fim▁end|>
<|file_name|>tests_view_results.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.test import Client from django.urls import reverse from nmkapp import views from .nmk_unit_test_case import NmkUnitTestCase class ResultsTests(NmkUnitTestCase): def test_anon_user(self): """ Test ...
self.client = Client() response = self.client.get(reverse(views.results)) self.assertEqual(response.status_code, 302)
<|file_name|>letter_frequency.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/Letter_frequency #![cfg_attr(not(test), feature(io))] #[cfg(not(test))] use std::fs::File; #[cfg(not(test))] use std::io::{BufReader, Read}; use std::collections::HashMap; use std::collections::hash_map::Entry::{Occupied, Vac...
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>""" This module contains various methods for checking the type of timelines and a class that creates all kinds of timelines. """ import re from functools import partial from gettext import gettext as _ from turses.models import Timeline, is_DM HOME_TIMELINE = 'ho...
DEFAULT_TIMELINES = [ HOME_TIMELINE, MENTIONS_TIMELINE,
<|file_name|>constructorsWithSpecializedSignatures.js<|end_file_name|><|fim▁begin|>//// [constructorsWithSpecializedSignatures.ts] // errors declare class C { constructor(x: "hi"); constructor(x: "foo"); constructor(x: number); } // ok declare class C2 { constructor(x: "hi"); constructor(x: "foo")...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Imports for Python API. <|fim▁hole|>This file is MACHINE GENERATED! Do not edit. Generated by: tensorflow/tools/api/generator/create_python_api.py script. """ from tensorflow.python.platform.resource_loader import get_data_files_path from tensorflow.python.platfo...
<|file_name|>db.py<|end_file_name|><|fim▁begin|>from airy.core.conf import settings from mongoengine import *<|fim▁hole|> connect(getattr(settings, 'database_name', 'airy'))<|fim▁end|>
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A convenient Rust interface to the UIO kernel module for TI Programmable Real-time Unit //! coprocessors, with roughly the same functionality as the //! [C prussdrv library](https://github.com/beagleboard/am335x_pru_package) //! but with a safer, rustic API that atte...
dram0: dram0, dram1: dram1,
<|file_name|>iforest.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # License: BSD 3 clause from __future__ import division import numpy as np import scipy as sp from warnings import warn from scipy.sparse import issparse import numbers from ..ext...
# Authors: Nicolas Goix <nicolas.goix@telecom-paristech.fr>
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The QingYuan Authors All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICEN...
Unless required by applicable law or agreed to in writing, software
<|file_name|>io_compat.rs<|end_file_name|><|fim▁begin|>// there's no real io error on a byte slice pub type Error = (); pub type Result<T> = core::result::Result<T, Error>; pub trait Write { fn write(&mut self, buf: &[u8]) -> Result<usize>; }<|fim▁hole|> fn write(&mut self, data: &[u8]) -> Result<usize> { ...
impl Write for &mut [u8] {
<|file_name|>UpcItem.java<|end_file_name|><|fim▁begin|>package com.knr.recyclr; import org.json.*; public class UpcItem { public String number; public String itemName; public String description; public UpcItem(String json) { try { JSONObject jsonObj = new JSONObject(json); this.number = jsonObj.getStrin...
this.itemName = "invalid item"; this.description = "invalid UPC code"; }
<|file_name|>schema.rs<|end_file_name|><|fim▁begin|>// // Copyright (C) 2017 Kubos Corporation // // 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-...
pub struct QueryRoot; /// Base GraphQL query model
<|file_name|>login.routes.ts<|end_file_name|><|fim▁begin|>import { Routes, RouterModule } from '@angular/router'; import { LoginComponent } from './login.component'; const routes: Routes = [ { path: 'login', component: LoginComponent }, { path: 'login/:id', component: LoginComponent }<|fim▁hole|>]; export con...
<|file_name|>c_ycm_conf.py<|end_file_name|><|fim▁begin|># This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, u...
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html # # You can get CMake to generate this file for you by adding: # set( CMAKE_EXPORT_COMPILE_COMMANDS 1 )
<|file_name|>server-ssl.go<|end_file_name|><|fim▁begin|>package f5 import ( "encoding/json" "strings" ) type LBServerSsl struct { Name string `json:"name"` Partition string `json:"partition"` FullPath string `json:"fullPath"` Generation ...
<|file_name|>Coupling2DCavities2D.py<|end_file_name|><|fim▁begin|>import numpy as np from Coupling import Coupling class Coupling2DCavities2D(Coupling): """ Coupling for cavity2D to cavity transmission. """ @property def impedance_from(self): """ Choses the right impedance of s...
@property def tau(self): """
<|file_name|>CWE36_Absolute_Path_Traversal__wchar_t_environment_fopen_52b.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>Label Definition File: CWE36_Absolute_Path_Traversal.label.xml Template File: sources-sink-52b.tmpl.cpp */ /* * @description * CWE: 36 Absolute Path Traversal * BadSource: environment Read inp...
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE36_Absolute_Path_Traversal__wchar_t_environment_fopen_52b.cpp
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Python 101 documentation build configuration file, created by # sphinx-quickstart on Tue Sep 16 15:47:34 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configu...
<|file_name|>new_handler.cc<|end_file_name|><|fim▁begin|>// Copyright 2012 Room77, Inc. // Author: Uygar Oztekin #include "base/common.h" // intercept memory allocation failures and force a stack trace struct InitNewHandler { static void NewHandler () {<|fim▁hole|> *static_cast<int*>(ptr) = 0; } InitNewHandl...
cout << "\n*** Memory allocation Failed! About to segfault ***" << endl; // Cause a segfault. void* ptr = nullptr; // Create a var to get around enabled compiler warning.
<|file_name|>console.py<|end_file_name|><|fim▁begin|>from IPython import embed import annotateit from annotateit import model, db, es from flask import g def main(): app = annotateit.create_app()<|fim▁hole|> embed(display_banner=False) if __name__ == '__main__': main()<|fim▁end|>
with app.test_request_context(): g.user = model.User.fetch('admin')
<|file_name|>umd.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export * from "./index";<|fim▁end|>
/*! s.js (C) 2019-present SheetJS -- https://sheetjs.com */
<|file_name|>qNickInputWidget.py<|end_file_name|><|fim▁begin|>from PyQt4.QtCore import Qt from PyQt4.QtGui import QHBoxLayout from PyQt4.QtGui import QLabel from PyQt4.QtGui import QLineEdit from PyQt4.QtGui import QMessageBox from PyQt4.QtGui import QPixmap from PyQt4.QtGui import QPushButton from PyQt4.QtGui import Q...
<|file_name|>angular-bootstrap-datepicker.js<|end_file_name|><|fim▁begin|>/* ========================================================= * bootstrap-datepicker.js * http://www.eyecon.ro/bootstrap-datepicker * ========================================================= * Copyright 2012 Stefan Petre * Improvements by A...
* Lithuanian translation for bootstrap-datepicker * Šarūnas Gliebus <ssharunas@yahoo.co.uk>
<|file_name|>counter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import time <|fim▁hole|> count = 0 try: count = open(persistou...
output = sys.argv[1] persistoutput = "%s.persist" % sys.argv[1]
<|file_name|>uxu-tickets.js<|end_file_name|><|fim▁begin|><|fim▁hole|>(function($){ if (typeof UxU.utils !== 'undefined') { $('.uxu-ticket-status-festival-length').html(UxU.utils.durationFromVisitors(info.tickets_sold)); } })(jQuery);<|fim▁end|>
<|file_name|>nextafter.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package math // Nextafter returns the next representable value after x towards y. // If x == y, then x i...
<|file_name|>example.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. // source: go-micro/examples/server/proto/example/example.proto // DO NOT EDIT! /* Package go_micro_srv_example is a generated protocol buffer package. It is generated from these files: go-micro/examples/server/proto/example/...
import ( client "github.com/micro/go-micro/client" server "github.com/micro/go-micro/server"
<|file_name|>focus-trap.ts<|end_file_name|><|fim▁begin|>import {Component, ViewEncapsulation, ViewChild, ElementRef} from '@angular/core'; import {InteractivityChecker} from './interactivity-checker'; /** * Directive for trapping focus within a region. *<|fim▁hole|> * Things like tabIndex > 0, flex `order`, and sha...
* NOTE: This directive currently uses a very simple (naive) approach to focus trapping. * It assumes that the tab order is the same as DOM order, which is not necessarily true.
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import mongoengine as db <|fim▁hole|> created = db.DateTimeField(required=True) last_login = db.DateTimeField() nino = db.StringField() linked_ids = db.ListField(db.ReferenceField('User'), default=[]) def link(self, other): self.update(push...
class User(db.Document): user_id = db.StringField(required=True, unique=True)
<|file_name|>572.js<|end_file_name|><|fim▁begin|>require("./71.js"); require("./143.js");<|fim▁hole|>require("./286.js"); require("./571.js"); module.exports = 572;<|fim▁end|>
<|file_name|>MemUnit.java<|end_file_name|><|fim▁begin|>package cn.xishan.oftenporter.demo.testmem.porter; import cn.xishan.oftenporter.porter.core.annotation.AutoSet; import cn.xishan.oftenporter.porter.core.util.LogMethodInvoke; /** * @author Created by https://github.com/CLovinr on 2018/9/22. */ public class MemU...
System.out.println("..................."+obj1); } }
<|file_name|>dialogs.py<|end_file_name|><|fim▁begin|># dialogs - provide common dialogs # # Copyright (c) 2006 FSF Europe # # Authors: # Sebastian Heinlein <glatzor@ubuntu.com> # Michael Vogt <mvo@canonical.com> # # This program is free software; you can redistribute it and/or # modify...
Gtk.MessageType.ERROR,Gtk.ButtonsType.CLOSE,"") dialog.set_markup(p);
<|file_name|>ui.js<|end_file_name|><|fim▁begin|>import $ from 'jquery'; import ParsleyUI from '../../src/parsley/ui'; import Parsley from '../../src/parsley'; describe('ParsleyUI', () => { before(() => { Parsley.setLocale('en'); }); it('should create proper errors container when needed', () => { $('body...
expect($('ul#parsley-id-' + parsleyField.__id__ + ' li').length).to.be(2); expect($('ul#parsley-id-' + parsleyField.__id__ + ' li').eq(0).hasClass('parsley-required')).to.be(true); expect($('ul#parsley-id-' + parsleyField.__id__ + ' li').eq(1).hasClass('parsley-type')).to.be(true);
<|file_name|>_install.py<|end_file_name|><|fim▁begin|># Copyright Hybrid Logic Ltd. See LICENSE file for details. # -*- test-case-name: flocker.provision.test.test_install -*- """ Install flocker on a remote node. """ import posixpath from textwrap import dedent from urlparse import urljoin, urlparse from effect imp...
run_from_args(['yum', 'install', '-y', 'yum-utils']),
<|file_name|>test_errors.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # test_errors.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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...
self.assertRaisesRegex( nest.kernel.NESTError, "UnknownModelName", nest.Create, -1)
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::error::Error; use std::fs; use std::io::{BufRead, BufReader}; <|fim▁hole|>fn main() -> Result<(), Box<dyn Error>> { let app_version = { let f = fs::File::open("conf.pri")?; let reader = BufReader::new(f); let mut s = String::new();...
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>use git2::{ Oid, Time }; use super::{ Request, Comment, Analysis, CIStatus }; pub enum EventKind { Request, Comment, Analysis,<|fim▁hole|> CIStatus, } pub trait Event { fn commit_id(&self) -> Oid; fn timestamp(&self) -> Option<Time>; fn kind(&self) -> E...
<|file_name|>tag-align-shape.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 x = t_rec {c8: 22u8, t: a_tag(44u64)};
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import os import datetime from django.test import TestCase, Client, override_settings from django.utils import timezone from ..models import Show, Episode, Enclosure try: from django.urls import reverse except ImportEr...
# enclosure 4 Enclosure.objects.create( episode=episode_4,
<|file_name|>test_term_consistency.py<|end_file_name|><|fim▁begin|># c: 19.05.2008, r: 19.05.2008 from sfepy import data_dir filename_mesh = data_dir + '/meshes/2d/special/circle_in_square.mesh' dim = 2 field_1 = { 'name' : 'scalar_field', 'dtype' : 'real', 'shape' : 'scalar', 'region' : 'Omega', ...
term2 = term_template % (('dw',) + dw_vars[:2])
<|file_name|>gx2r_displaylist.cpp<|end_file_name|><|fim▁begin|>#include "gx2r_buffer.h" #include "gx2r_displaylist.h" #include "gx2_displaylist.h" #include <common/log.h> namespace gx2 { void GX2RBeginDisplayListEx(GX2RBuffer *displayList, uint32_t unused, GX2RResourceFla...
<|file_name|>CRTDispatchConnection.cpp<|end_file_name|><|fim▁begin|>// // CRTDispatchConnection.cpp // dyncRTConnector // // Created by hp on 12/8/15. // Copyright (c) 2015 hp. All rights reserved. // #include "CRTDispatchConnection.h" #include "CRTConnManager.h" #include "CRTConnection.h" #include "CRTConnectionT...
} } }
<|file_name|>pad-zeropadding.js<|end_file_name|><|fim▁begin|>;(function (root, factory, undef) { if (typeof exports === "object") { // CommonJS module.exports = exports = factory(require("./core"), require("./cipher-core")); } else if (typeof define === "function" && define.amd) { // AMD<|fim▁hole|> } else { ...
define(["./core", "./cipher-core"], factory);
<|file_name|>writers.go<|end_file_name|><|fim▁begin|>package vm import ( "io" "math" ) type StringWriter interface { WriteString(string) (int, error) } type ByteWriter interface { Grow(int) WriteByte(byte) error } func WriteBool(r bool, w io.Writer) error { var b byte if r { b = byte(1) } var err error ...
b |= 128 }
<|file_name|>check_features.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2018 The ESPResSo project # Copyright (C) 2012 Olaf Lenz # # This file is part of ESPResSo. # # ESPResSo is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
if len(sys.argv) != 2: print("Usage: %s FILE" % sys.argv[0])
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ The initialization file for the Pywikibot framework. """ # # (C) Pywikipedia bot team, 2008 # # Distributed under the terms of the MIT license. # __version__ = '$Id$' import datetime import difflib import logging import math import re i...
changes were made.
<|file_name|>IUser.d.ts<|end_file_name|><|fim▁begin|>/** * Created by sam on 27.02.2017. */ export interface IUser { /** * user name */ readonly name: string; /** * list of roles the user is associated with */ readonly roles: string[]; } export declare class UserUtils { static ...
}
<|file_name|>no.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'horizontalrule', 'no', {<|fim▁hole|>} );<|fim▁end|>
toolbar: 'Sett inn horisontal linje'
<|file_name|>abstract_crawler.cc<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. 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...
it != m_chain_makers.end(); ++it) { uint64 new_chain_id= next_chain_id++; Chain_data* chain_data= new Chain_data(new_chain_id);
<|file_name|>DRMEncoder.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|>/* * Copyright (C) 2005-2020 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "DRMEncoder.h" #include <cstring> #include <errno...