prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>find-map.js<|end_file_name|><|fim▁begin|>/** * shuji (周氏) * https://github.com/paazmaya/shuji * * Reverse engineering JavaScript and CSS sources from sourcemaps * * Copyright (c) Juga Paazmaya <paazmaya@yahoo.com> (https://paazmaya.fi) * Licensed under the MIT license */ const fs = require('fs'), ...
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # privacyIDEA is a fork of LinOTP # May 08, 2014 Cornelius Kölbel # License: AGPLv3 # contact: http://www.privacyidea.org # # 2014-10-17 Fix the empty result problem # Cornelius Kölbel, <cornelius@privacyidea.org> # # Copyri...
<|file_name|>parsing.rs<|end_file_name|><|fim▁begin|>//! Utility functions for Header implementations. use language_tags::LanguageTag; use std::str; use std::str::FromStr; use std::fmt::{self, Display}; use url::percent_encoding; use header::Raw; use header::shared::Charset; /// Reads a single raw string when parsin...
})
<|file_name|>test_output.py<|end_file_name|><|fim▁begin|>import pytest from httpie import ExitStatus from httpie.output.formatters.colors import get_lexer from utils import TestEnvironment, http, HTTP_OK, COLOR, CRLF class TestVerboseFlag: def test_verbose(self, httpbin): r = http('--verbose', ...
def test_get_lexer(self, mime): lexer = get_lexer(mime)
<|file_name|>f64.rs<|end_file_name|><|fim▁begin|>//! Double precision use Complex; /// Imaginary unit<|fim▁hole|><|fim▁end|>
pub const I: Complex<f64> = Complex { re: 0., im: 1. };
<|file_name|>Input.cpp<|end_file_name|><|fim▁begin|>#include "Input.h" #include "Core.h" #include "Memory.h" #include "Cpu.h" //Gameboy keys: //[Up][Left][Right][Down][A][B][Start][Select] //Mapped to standard keyboard keys: //[Up][Left][Right][Down][Z][X][Enter][RShift] //Mapped to standard Xbox controller buttons:...
memory.writeMemory(0xFF00, keyInput); }
<|file_name|>many_queries.rs<|end_file_name|><|fim▁begin|>#![feature(plugin)] #![plugin(postgres_macros)] fn main() { sql!(" LOCK TABLE foo IN ACCESS EXCLUSIVE MODE "); sql!(" ALTER TABLE foo ADD CONSTRAINT foo PRIMARY KEY (foo) "); sql!(" ALTER TABLE foo ...
ON DELETE RESTRICT ON UPDATE RESTRICT ");
<|file_name|>tensor.py<|end_file_name|><|fim▁begin|>import numpy as np from .abstract_layer import LayerBase, NoParamMixin from ..util import zX, zX_like, white, scalX class PoolLayer(NoParamMixin, LayerBase): def __init__(self, filter_size, compiled=True): LayerBase.__init__(self, activation="linear", ...
self.output = self.activation.forward(self.op.forward(X, self.weights, "valid")) self.output += self.biases return self.output
<|file_name|>model09.rs<|end_file_name|><|fim▁begin|>% Including a second lag of a control variable (page 56) endogenous C N W R exogenous ER EW parameters h gam rhow sigw sigr b1 observables N C <|fim▁hole|>model N = b1*N{-2} + W - gam*C; C = (1-h)*W+h*C{+1}+R; W = rhow*W{-1}+sigw*EW; R = sigr*ER;<|fim▁en...
<|file_name|>menu.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # Support for excporting Q...
Object.__init__(self, bus, object_path) self.status = 'normal' self.menu = menu self.revision = 0
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>// Copyright 2019 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 // // Unle...
options: translate_v3beta1.Options
<|file_name|>issue-7012.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] /* # Comparison of static arrays The expected behaviour would be that `test == test1`, therefore 'true' would be printed, however the below prints false. */ struct signature<'a> { pat...
<|file_name|>globalsystems.rs<|end_file_name|><|fim▁begin|>extern mod glfw; extern mod std; use components::{Components,texture_from_uint}; //GLOBAL SYSTEM DEFINITIONS pub trait GlobalSystem { fn process(&mut self, window: &glfw::Window) -> (); } pub struct ScoreUpdateSystem { paddle: @Components, counter...
self.score += i; } None => break }
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(asm)] extern crate core; extern crate system; use std::collections::BTreeMap; use std::collections::VecDeque; use std::io::{Read, Write, SeekFrom}; use std::mem; use std::process::Command; use std::sync::{Arc, Mutex}; use std::thread; use std::time::Instant...
} else { self.dragging = false; }
<|file_name|>make_in_dir.rs<|end_file_name|><|fim▁begin|>use prelude::*; pub fn make_inode_in_dir(fs: &mut Filesystem, dir_ino: u64, name: &[u8], mode: Mode, attr: FileAttr) -> Result<Inode><|fim▁hole|> "Inode {} is not a directory", dir_ino))); } let dir_group = get_ino_group(fs, dir_ino).0; let new_ino...
{ let mut dir_inode = try!(get_inode(fs, dir_ino)); if dir_inode.mode.file_type != FileType::Dir { return Err(Error::new(format!(
<|file_name|>DisplaySteerableBase.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2021, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License...
* See the License for the specific language governing permissions and * limitations under the License.
<|file_name|>not_op.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.c...
from jx_elasticsearch.es52.painless.null_op import null_script
<|file_name|>testconn.go<|end_file_name|><|fim▁begin|>package conn import ( "sync" "time" ) type testConn struct { rd <-chan []byte wt chan<- []byte rlock *sync.Mutex wlock *sync.Mutex readDeadline <-chan time.Time writeDeadline <-chan time.Time closed chan struct{} wtCloseWait *sync.WaitGroup } f...
}
<|file_name|>default_settings.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- """ this is the default settings, don't insert into your customized settings! """ DEBUG = True TESTING = True SECRET_KEY = "5L)0K%,i.;*i/s(" SECURITY_SALT = "sleiuyyao" # DB config<|fim▁hole|>SQLALCHEMY_ECHO = True UPLOADS_DEFAULT_...
SQLALCHEMY_DATABASE_URI = "sqlite:///dev.db"
<|file_name|>p210_Course_Schedule_II.py<|end_file_name|><|fim▁begin|>''' - Leetcode problem: 210 - Difficulty: Medium - Brief problem description: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to first take course 1...
<|file_name|>ContainerList.react.js<|end_file_name|><|fim▁begin|>import React from 'react/addons'; import ContainerListItem from './ContainerListItem.react'; var ContainerList = React.createClass({ componentWillMount: function () { this.start = Date.now(); }, render: function () { var containers = this.p...
}); module.exports = ContainerList;
<|file_name|>fix_rigid.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) San...
<|file_name|>CreditTest.java<|end_file_name|><|fim▁begin|>package unit.com.bitdubai.fermat_dmp_plugin.layer.basic_wallet.bitcoin_wallet.developer.bitdubai.version_1.structure.BitcoinWalletBasicWalletAvailableBalance; import com.bitdubai.fermat_api.layer.dmp_basic_wallet.common.exceptions.CantRegisterCreditException; i...
mockRecords = new ArrayList<>(); mockRecords.add(mockBalanceRecord); setUpMockitoRules();
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings admin.autodiscover() from front.views import * from front.views import views as front_views from django.views.decorators.csrf import csrf_exempt if ...
# urls for post(s)/ url(r'^post/?$', PublicPosts.as_view(), name='public_posts'), url(r'^posts/?$', PublicPosts.as_view(), name='public_posts'), # urls for post(s)/<post_id>/
<|file_name|>logger.rs<|end_file_name|><|fim▁begin|>extern crate env_logger; extern crate log_panics; extern crate log; #[cfg(target_os = "android")] extern crate android_logger; use self::env_logger::Builder as EnvLoggerBuilder; use self::log::{LevelFilter, Level}; use std::env; use std::io::Write; #[cfg(target_os = ...
<|file_name|>fingo.carousel.js<|end_file_name|><|fim▁begin|>/*! fingoCarousel.js © heoyunjee, 2016 */ function(global, $){ 'use strict'; /** * width: carousel width * height: carousel height * margin: tabpanel margin * count: how many tabpanels will move when you click button * col: how many columns...
var $carousel_mask = this.$carousel_mask; var carousel_tabpannel_width = ($carousel_mask.width() - (this.carousel_col - 1) * this.carousel_content_margin) / this.carousel_col;
<|file_name|>library.py<|end_file_name|><|fim▁begin|>import os import re import gettext import locale import threading # libsearchfilter_toggle starts thread libsearchfilter_loop import operator import gtk import gobject import pango import ui import misc import formatting import mpdhelper as mpdh from consts import ...
else: bd = self.library_populate_toplevel_data(artistview=True) elif self.config.lib_view == consts.VIEW_GENRE: genre, artist, album, year = self.library_get_data(
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import {Manager} from './manager' export {Filterer} from './filter'; export {Logger} from './logger';<|fim▁hole|>var logging = new Manager(); export default logging;<|fim▁end|>
export {Manager};
<|file_name|>plot_label_foci.py<|end_file_name|><|fim▁begin|>""" ======================= Generate Surface Labels ======================= Define a label that is centered on a specific vertex in the surface mesh. Plot that label and the focus that defines its center. """ print __doc__ from surfer import Brain, utils ...
<|file_name|>marshal.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The gocql 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 cassandra import ( "bytes" "fmt" "math/big" "reflect" "time" "errors" "github.com/e...
flagSkipMetaData byte = 0x02 flagPageSize byte = 0x04
<|file_name|>datepicker.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:e40a08695f05163cfb0eaeeef4588fcfad55a6576cfadfb079505495605beb33<|fim▁hole|>size 27133<|fim▁end|>
<|file_name|>basic.rs<|end_file_name|><|fim▁begin|>// Generated by build.rs script in the amqp0-primitives crate. // Pre-generated files are used by default. Generation is done with the amqp0-codegen crate. // // To regenerate, ignoring the pre-generated files, use: cargo --features="amqp0-build-primitives" // To forma...
impl<T> Default for GetBuilder<T> where T: ::Encodable + Default { fn default() -> Self {
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>""" This module defines serializers for the main API data objects: .. autosummary:: :nosignatures: DimensionSerializer FilterSerializer MessageSerializer QuestionSerializer """ from django.core.paginator import Paginator from rest_framewor...
class Meta: model = enhance_models.Dictionary
<|file_name|>export_all_courses.py<|end_file_name|><|fim▁begin|>""" Script for exporting all courseware from Mongo to a directory and listing the courses which failed to export """ from django.core.management.base import BaseCommand from six import text_type from xmodule.contentstore.django import contentstore from ...
Export all courses to target directory and return the list of courses which failed to export """ content_store = contentstore() module_store = modulestore()
<|file_name|>engine.py<|end_file_name|><|fim▁begin|>/*Owner & Copyrights: Vance King Saxbe. A.*/""" Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from Gold...
with a_lock:
<|file_name|>petition-page-loader.ts<|end_file_name|><|fim▁begin|>/// <reference path="../node.d.ts" /> import loading = require('./loading'); import https = require('https'); import petitionUtil = require('../private/petition-util'); var getJsonOverHttps = petitionUtil.getJsonOverHttps; export module UkPetitions { ...
* The 'error' event is passed the Error.
<|file_name|>Lexer.cpp<|end_file_name|><|fim▁begin|>// Lexer.cpp // Copyright (c) 2014 - 2015, zhiayang@gmail.com // Licensed under the Apache License Version 2.0. #include <string> #include <ctype.h> #include <cassert> #include <iostream> #include "parser.h" #include "../utf8rewind/include/utf8rewind/utf8rewind.h" ...
read = std::string("÷").length(); tok.text = "÷";
<|file_name|>bot.py<|end_file_name|><|fim▁begin|>from slackminion.bot import Bot from slackminion.webserver import Webserver<|fim▁hole|> class DummyBot(Bot): def __init__(self, *args, **kwargs): super(DummyBot, self).__init__(None, *args, **kwargs) setattr(self, 'start', lambda: None) setatt...
<|file_name|>CollectionFilteringUnitTest.java<|end_file_name|><|fim▁begin|>package com.baeldung.collection.filtering; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; import java.util.stream.Collectors; import org.hamcrest.Matchers; import org.junit.Assert; import org....
private List<String> employeeNameFilter() { return Arrays.asList("Alice", "Mike", "Bob"); }
<|file_name|>expected.js<|end_file_name|><|fim▁begin|><|fim▁hole|>/*before*/"use strict"; /*after*/foo();<|fim▁end|>
<|file_name|>main.js<|end_file_name|><|fim▁begin|>define(function(require) { var $ = require('./jquery'); var marked = require('./marked'); var prettify = require('./prettify'); var title = document.title; function initPage() { marked.setOptions({ highlight: function(code) { return prettify.prettyPrint...
function getShareData() { return { title: document.title, link: document.location.href,
<|file_name|>GuiCreateWorld.java<|end_file_name|><|fim▁begin|>package net.minecraft.client.gui; import java.io.IOException; import java.util.Random; import net.minecraft.client.resources.I18n; import net.minecraft.util.ChatAllowedCharacters; import net.minecraft.world.GameType; import net.minecraft.world.WorldSettings...
{ if (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.FLAT)
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2020-2021 Jason Ish // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitatio...
pub struct ServerContext { pub config: ServerConfig, pub datastore: Datastore,
<|file_name|>MUHSetLong.java<|end_file_name|><|fim▁begin|>package sk.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import sk.mmap.Constants; import sk.mmap.IUnsafeAllocator; import java.util.Map; import java.util.HashMap; // Memory mapped hash set of Long public class MUHSetLong { private stati...
<|file_name|>algo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Sat Apr 22 16:47:12 2017 @author: Jasmin """ from parser import * #from parser import read_data #from parser import read_params #import parser from Methode2 import EvalWeightedSumInteract from Methode2 import * from ...
profiles = traite_data(profiles, poids) data_brute = traite_data(data_brute, poids) data = normalize(data_brute, normalisation=norm)
<|file_name|>floatf.rs<|end_file_name|><|fim▁begin|>//! formatter for %f %F common-notation floating-point subs use super::super::format_field::FormatField; use super::super::formatter::{InPrefix, FormatPrimitive, Formatter}; use super::float_common::{FloatAnalysis, get_primitive_dec, primitive_to_str_common}; pub str...
} impl Formatter for Floatf { fn get_primitive(&self,
<|file_name|>bitcoin_et.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Unicorncoin</source>...
<translation>Säilita vähemalt &lt;n&gt; ühendust peeridega (vaikeväärtus: 125)</translation> </message>
<|file_name|>issue-6596-1.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/li...
($inp:ident) => ( $nonexistent
<|file_name|>reference.rs<|end_file_name|><|fim▁begin|>use crate::real_std::{any::Any, fmt, marker::PhantomData, sync::Mutex}; use crate::{ api::{generic::A, Generic, Unrooted, Userdata, WithVM, IO}, gc::{CloneUnrooted, GcPtr, GcRef, Move, Trace}, thread::ThreadInternal, value::{Cloner, Value}, vm:...
fn make_ref(a: WithVM<Generic<A>>) -> Reference<A> { // SAFETY The returned, unrooted value gets pushed immediately to the stack
<|file_name|>generator.go<|end_file_name|><|fim▁begin|>package generator import ( kapi "k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api/rest" "k8s.io/kubernetes/pkg/runtime" buildapi "github.com/openshift/origin/pkg/build/api" "github.com/openshift/origin/pkg/build/generator"<|fim▁hole|> "github.com/opensh...
<|file_name|>Plan.py<|end_file_name|><|fim▁begin|>import sys from collections import deque from Catalog.Schema import DBSchema from Query.Operators.TableScan import TableScan from Query.Operators.Select import Select from Query.Operators.Project import Project from Query.Operators.Union import Union from Qu...
"""
<|file_name|>lexical.py<|end_file_name|><|fim▁begin|>from ..io.importer import lexicon_data_to_csvs, import_lexicon_csvs from ..io.enrichment.lexical import enrich_lexicon_from_csv, parse_file from .spoken import SpokenContext class LexicalContext(SpokenContext): """ Class that contains methods for dealing sp...
default to False """ if type_data is None:
<|file_name|>selection_manager.ts<|end_file_name|><|fim▁begin|>import {HasProps} from "./has_props" import {Geometry} from "./geometry" import {Selection} from "models/selections/selection" import {Renderer, RendererView} from "models/renderers/renderer" import {GlyphRendererView} from "models/renderers/glyph_renderer"...
<|file_name|>better-timeinput-polyfill.js<|end_file_name|><|fim▁begin|>(function(DOM, COMPONENT_CLASS) { "use strict"; if ("orientation" in window) return; // skip mobile/tablet browsers // polyfill timeinput for desktop browsers var htmlEl = DOM.find("html"), timeparts = function(str) { ...
ampmselect.next().set(ampmselect.data("defaultValue")); }
<|file_name|>struct_m_s_vehicle_1_1_lane_q.js<|end_file_name|><|fim▁begin|>var struct_m_s_vehicle_1_1_lane_q = [ [ "allowsContinuation", "d3/d89/struct_m_s_vehicle_1_1_lane_q.html#a1491a03d3e914ce9f78fe892c6f8594b", null ], [ "bestContinuations", "d3/d89/struct_m_s_vehicle_1_1_lane_q.html#a2fc7b1df76210eff08026...
<|file_name|>testcurses.py<|end_file_name|><|fim▁begin|>import androidhelper import curses <|fim▁hole|>try: win.box() w,h=win.getmaxyx() win.addstr(2,2,"Curses Test %sx%s" % (w,h)) win.addstr(10,10,"Hit a key") win.getch() finally: curses.endwin() print("Result=",result)<|fim▁end|>
droid = androidhelper.Android() win=curses.initscr() result="No result"
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! A Rust crate to connect a HD44780 lcd display //! //! # Example //! ```no_run //! use pi_lcd::*; //! //! // create a new lcd //! let lcd = HD44780::new(11,10,[6,5,4,1],20,4); //! //! // send a String to the lcd at row 0 //! lcd.send_string("Hello World".to_string(),0...
fn select_row(&self, row: u32) { // select the row where the String should be printed at self.send_byte(self.lines[row as usize], COMMAND); }
<|file_name|>yuki279.py<|end_file_name|><|fim▁begin|>from collections import Counter<|fim▁hole|><|fim▁end|>
c = Counter(input()) print(min(c['t'], c['r'], c['e']//2))
<|file_name|>spyglass_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2018 The Kubernetes 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/licenses/LICENSE-2.0 ...
<|file_name|>generate_metadata_pkl.py<|end_file_name|><|fim▁begin|>import argparse import glob import re import cPickle as pickle from dicom.sequence import Sequence from log import print_to_file from paths import LOGS_PATH, TRAIN_DATA_PATH, TEST_DATA_PATH def read_slice(path): return pickle.load(open(path))['d...
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import "react-hot-loader/patch"; let seed: number | null = null; const queryParamMatch = window.location.search.slice(1).match(/seed=(\d+)/); if (queryParamMatch != null) { seed = parseInt(queryParamMatch[1], 10); } function isNumeric(n: any): n is number { r...
<|file_name|>test_workflow_history.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import Permission from django.test import TestCase from django.urls import reverse from wagtail.core.models import Page from wagtail.tests.utils import WagtailTestUtils class TestWorkflowHistoryDetail(TestCase, Wagtail...
fixtures = ['test.json'] def setUp(self):
<|file_name|>PlainTextView.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2009 JetBrains s.r.o. * * 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...
myConsole = builder.getConsole(); myConsole.attachToProcess(myProcessHandler); }
<|file_name|>bg.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { '!langcode!': 'bg', '!langname!': 'Български', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update o...
'"User Exception" debug mode. ': '"User Exception" debug mode. ',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: yuchou<|fim▁hole|><|fim▁end|>
@time: 2017/8/7 10:28 """
<|file_name|>hdr_intrusive_msqueue_dhp.cpp<|end_file_name|><|fim▁begin|>/* This file is a part of libcds - Concurrent Data Structures library Version: 2.0.0 (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2014 Distributed under the BSD license (see accompanying file license.txt) Source ...
typedef ci::MSQueue< cds::gc::DHP, member_item_type, traits_MSQueue_DHP_member_cachealign > MSQueue_DHP_member_cachealign;
<|file_name|>build.index.prod.ts<|end_file_name|><|fim▁begin|>import * as gulp from 'gulp'; import * as gulpLoadPlugins from 'gulp-load-plugins'; import { join, sep, normalize } from 'path'; import * as slash from 'slash'; import Config from '../../config'; import { TemplateLocalsBuilder } from '../../utils'; const p...
return plugins.inject(gulp.src(files, { read: false }), { files, transform: transformPath()
<|file_name|>htmlscriptelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use std::ascii::AsciiExt; use dom::attr::Attr; use...
_ => (),
<|file_name|>BenchmarkTest00544.java<|end_file_name|><|fim▁begin|>/** * OWASP Benchmark Project v1.2 * * This file is part of the Open Web Application Security Project (OWASP) * Benchmark Project. For details, please see * <a href="https://owasp.org/www-project-benchmark/">https://owasp.org/www-project-benchmark/</a>. ...
response.setContentType("text/html;charset=UTF-8");
<|file_name|>revlog.py<|end_file_name|><|fim▁begin|># revlog.py - storage back-end for mercurial # # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. """Storage back-end for Mercur...
else: df = self.opener(self.datafile)
<|file_name|>oai_harvest.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio Demosite.<|fim▁hole|># Invenio Demosite 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 ...
# Copyright (C) 2013 CERN. #
<|file_name|>hydro.conf.js<|end_file_name|><|fim▁begin|>/** * Hydro configuration * * @param {Hydro} hydro */ module.exports = function(hydro) { hydro.set({ suite: 'equals', timeout: 500, plugins: [ require('hydro-chai'), require('hydro-bdd') ], chai: {<|fim▁hole|> stack: tru...
chai: require('chai'), styles: ['should'],
<|file_name|>layout.rs<|end_file_name|><|fim▁begin|>use super::{FractionalHex,Hex}; use std::f32::consts::PI;<|fim▁hole|> f: Vec<f32>, b: Vec<f32>, start_angle: f32 } impl Orientation { pub fn new(f: Vec<f32>,b: Vec<f32>,start_angle: f32) -> Orientation { Orientation { f: f, ...
pub struct Orientation {
<|file_name|>toolshell.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 // (at your option) ...
<|file_name|>directive.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; function movieDetail(movieDetailService) { return { restrict: 'EA', replace: true, templateUrl: './src/app/movieDetail/template.html', scope: {}, controllerAs: 'vm',<|fim▁hole|> var vm = this...
bindToController: true, /*jshint unused:false*/ controller: function($log, $stateParams) {
<|file_name|>0021_auto_20170107_0813.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-07 08:13 from __future__ import unicode_literals import django.core.validators from django.db import migrations import djstripe.fields<|fim▁hole|> dependencies = [ ('djstripe...
class Migration(migrations.Migration):
<|file_name|>e.rs<|end_file_name|><|fim▁begin|>// rustfmt-format_strings: true<|fim▁hole|>const foo: String = "Suspendisse vel augue at felis tincidunt \ sollicitudin. Fusce arcu. Duis et odio et leo sollicitudin consequat. Aliquam \ lobortis. Phasellus condimentum.";<|fim▁end|>
// rustfmt-max_width: 50 // explicit line breaks should be kept in order to preserve the layout
<|file_name|>training.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
""" num_batches = int(np.ceil(size / float(batch_size)))
<|file_name|>session.test.js<|end_file_name|><|fim▁begin|>/**! * koa-generic-session - test/session.test.js * Copyright(c) 2013 * MIT Licensed * * Authors: * dead_horse <dead_horse@qq.com> (http://deadhorse.me) */ 'use strict'; /** * Module dependencies. */ var Session = require('..'); var koa = require('...
it('should rewrite session before get ok', function (done) {
<|file_name|>xblock_module.py<|end_file_name|><|fim▁begin|># Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
from controllers import utils import dbmodels
<|file_name|>server.go<|end_file_name|><|fim▁begin|>package server import ( "crypto/tls" "encoding/base64" "encoding/json" "fmt" "io" "net" "net/http" "os" "runtime" "strconv" "strings" "time" "github.com/gorilla/mux" "golang.org/x/net/websocket" "github.com/Sirupsen/logrus" "github.com/docker/docker...
current = nil } defer es.Evict(l) for _, ev := range current {
<|file_name|>sistema.js<|end_file_name|><|fim▁begin|>$(function(){ $('#telefone').mask('(99)9999-9999'); $('.editar').on({ click : function(){ var url = URI+"sistema/editar/"+$(this).attr('data-item'); window.location.href = url; } }); ...
var $selecionados = get_selecionados(); if($selecionados.length > 0)
<|file_name|>ConstraintCommand.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 y...
} else { tableName = null;
<|file_name|>009.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from circuits import Component, Event class bark(Event): """bark Event""" <|fim▁hole|> self.bob = Bob().register(self) self.fred = Fred().register(self) class Dog(Component): def started(self, *args): self.fir...
class Pound(Component): def __init__(self): super(Pound, self).__init__()
<|file_name|>bake_and_deploy_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
self.skipTest("--test_google flag not set") else: self.run_test_case( self.scenario.delete_pipeline(self.scenario.google_destroy_pipeline_id))
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> and others # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General P...
<|file_name|>shared_space_audit.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # -*- coding: utf-8 -*- """TODO""" <|fim▁hole|># # LinShare cli 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 ve...
# This file is part of Linshare cli.
<|file_name|>enroll_node_not_found.py<|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 # # Unless required by appli...
<|file_name|>json.ts<|end_file_name|><|fim▁begin|>import viser from '../../../packages/viser/src/index'; import { data, scale } from './data' const DataSet = require('@antv/data-set'); const ds = new DataSet(); const dv = ds.createView() .source(data) .transform({ type: 'percent', field: 'value', dimen...
padding: [100, 80, 80, 80], renderer: 'svg', onPlotdblclick: (ev: any, chart: any) => {
<|file_name|>horrorkino.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- """ Covenant Add-on 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 3 of th...
<|file_name|>PointsPlugin.ts<|end_file_name|><|fim▁begin|>import { Plugin } from "../Plugin"; import { CommandHandler } from "../../matrix/CommandHandler";<|fim▁hole|> /** * Plugin for tracking an arbitrary number of points */ export class PointsPlugin implements Plugin { private pointsTracker: PointsTracker; ...
import { PointsTracker } from "../../points/PointsTracker"; import { LogService, MatrixClient } from "matrix-bot-sdk";
<|file_name|>backup.go<|end_file_name|><|fim▁begin|>package gostuff import ( "fmt" "log" "os" "os/exec" "runtime" ) //exports database(without Grandmaster games) to an .sql file as a hot backup //@param isTemplate If true then export template database func ExportDatabase(isTemplate bool) { problems, _ := os.Op...
} }
<|file_name|>timeline.client.controller.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|> } ]);<|fim▁end|>
angular.module('core').controller('TimelineController', ['$scope', function($scope) { // Timeline controller logic // ...
<|file_name|>test_rule_500.py<|end_file_name|><|fim▁begin|>import os import unittest from vsg.rules import ieee from vsg import vhdlFile from vsg.tests import utils sTestDir = os.path.dirname(__file__) lFile, eError =vhdlFile.utils.read_vhdlfile(os.path.join(sTestDir,'rule_500_test_input.vhd')) lExpected_lower = []...
self.assertEqual(utils.extract_violation_lines_from_violation_object(oRule.violations), lExpected)
<|file_name|>TestDiracCommands.py<|end_file_name|><|fim▁begin|>import datetime from collections import namedtuple import os import tempfile import time import uuid import random import stat from textwrap import dedent import pytest from GangaCore.Utility.logging import getLogger from GangaDirac.Lib.Utilities.DiracUt...
"""Load the Ganga config files before the test and clean them up afterwards"""
<|file_name|>uri.rs<|end_file_name|><|fim▁begin|>use std::error::Error as StdError; use std::fmt::{Display, self}; use std::str::{self, FromStr}; use http::ByteStr; use bytes::{BufMut, BytesMut}; /// The Request-URI of a Request's StartLine. /// /// From Section 5.3, Request Target: /// > Once an inbound connection i...
self.fragment_start.map(|start| { // +1 to remove the '#' &self.source[start + 1..]
<|file_name|>teardown.go<|end_file_name|><|fim▁begin|>// Copyright 2020 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package provider import ( "context" "sync" "time" jujuclock "github.com/juju/clock" "github.com/juju/errors" apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/api...
) { defer wg.Done()
<|file_name|>status_service.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="request" /> import SkypeAccount from './skype_account'; import { CookieJar } from "request"; import Status from "./status/status";<|fim▁hole|> private eventEmitter; constructor(cookieJar: CookieJar, eventEmitter: EventEmitter); ...
import { EventEmitter } from "./utils"; export declare class StatusService { private requestWithJar;
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, url<|fim▁hole|> url(r'^add/', dr.make_waybill), url(r'^del/', dr.remove_waybill), url(r'^find/', dr.search_waybill), url(r'^take/', dr.take_place), url(r'^trips/', dr.trips), url(r'^cancel_trip/', dr.cancel_t...
from iyoume.waybill import views as dr urlpatterns = patterns('',
<|file_name|>DedicatedArticlesBreadcrumbs_Test_Query.graphql.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */ /* eslint-disable */ // @ts-nocheck import { ConcreteRequest } from "relay-runtime"; import { FragmentRefs } from "relay-runtime"; export type DedicatedArticlesBreadcrumbs_Test_QueryVariables = {}; export ...
const node: ConcreteRequest = (function(){ var v0 = [