prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>test-regexp-instance-properties.js<|end_file_name|><|fim▁begin|>/*
* RegExp instance properties.
*
* RegExp instance 'source' property must behave as specified in E5 Section
* 15.10.4.1 paragraphcs 5 and 6. Note: there is no one required form of source.
* Tests are for the source form that we wan... | t = new RegExp('foo', 'm');
print(t.source, t.global, t.ignoreCase, t.multiline);
t = eval('/' + t.source + '/' + getflags(t));
print(t.source, t.global, t.ignoreCase, t.multiline); |
<|file_name|>FilesystemCache.cpp<|end_file_name|><|fim▁begin|>/*
Copyright © 2007, 2008, 2009, 2010, 2011 Vladimír Vondruš <mosra@centrum.cz>
This file is part of Kompas.
Kompas is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License version ... | file.read(buffer, 4);
_blockSize = Endianness::littleEndian(*reinterpret_cast<unsigned int*>(buffer));
/* Block count */ |
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> *
* 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
*/
'use strict';
// THIS CHECK SHOULD BE THE FIRST THING IN THIS FILE
// This is to ensure that we catch env i... | * @license
* Copyright Google Inc. All Rights Reserved. |
<|file_name|>psqworker.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | if hasattr(queue, '__call__'):
queue = queue()
return queue |
<|file_name|>WidgetUtil.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2007 Divmod.<|fim▁hole|>/**
* Utilities for testing L{Nevow.Athena.Widget} subclasses.
*/
/**
* Make a node suitable for passing as the first argument to a
* L{Nevow.Athena.Widget} constructor.
*
* @param athenaID: the athena ID of the wid... | // See LICENSE for details.
|
<|file_name|>test_group_lasso.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function
import numpy as np
import nose.tools as nt
import regreg.api as rr
from ..group_lasso import (group_lasso,
selected_targets,
full_targets,
... | _, pval, intervals = conv.summary(observed_target,
group_assignments,
cov_target,
cov_target_score, |
<|file_name|>test_zopetestbrowser.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2013 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import os
import unittest
import sys
from splinter import Browser
fro... | """
with self.assertRaises(NotImplementedError): |
<|file_name|>clean_mac_info_plist.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Jonas Schnelli, 2013
# make sure the Litecoin-Qt.app contains the right plist (including the right version)
# fix made because of serval bugs in Qt mac deployment (https://bugreports.qt-project.org/browse/QTBUG-21267)
from string... | version = lineArr[1].replace("\n", "");
|
<|file_name|>cache_restore.rs<|end_file_name|><|fim▁begin|>use anyhow::Result;
mod common;
use common::cache::*;
use common::common_args::*;
use common::fixture::*;
use common::input_arg::*;
use common::output_option::*;
use common::process::*;
use common::program::*;
use common::target::*;
use common::test_dir::*;
... | } |
<|file_name|>batchDeleteExistingOverlayActionsCommand.ts<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
im... | import { COMPOSITE_BATCH_URL } from '@salesforce/salesforcedx-apex-replay-debugger/out/src/constants'; |
<|file_name|>StatisticCalc.java<|end_file_name|><|fim▁begin|>/*
{{ jtdavids-reflex }}
Copyright (C) 2015 Jake Davidson
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 the License,... |
return ("______SINGLEPLAYER______\n" +
" MIN TIME:\n" + |
<|file_name|>KurentoHttpPlayer.java<|end_file_name|><|fim▁begin|>/*
* (C) Copyright 2014 Kurento (http://kurento.org/)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 2.1 which accompanies this distr... | }
} |
<|file_name|>iCellRenderer.js<|end_file_name|><|fim▁begin|>/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components<|fim▁hole|> * @link http://www.ag-grid.com/
* @license MIT
*/<|fim▁end|> | * @version v4.1.1 |
<|file_name|>state_change_repeating.py<|end_file_name|><|fim▁begin|>from bson import ObjectId
from . import repeating_schedule
from state_change import StateChange
class StateChangeRepeating(StateChange):
def __init__(self, seconds_into_week, AC_target, heater_target, fan, id=None):
self.id = id
... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export * from './table-enquete.component'; |
<|file_name|>keyup.js<|end_file_name|><|fim▁begin|>function(){
var db = $$(this).app.db,
term = $(this).val(),
nonce = Math.random();
$$($(this)).nonce = nonce;
db.view("icd9lookup/by_code", {
startkey : term,
endkey : term+"\u9999", //I don't know why only \u9999 works, not \uFFFF
limit :... | |
<|file_name|>CollectiveInfoResource.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import at.ac.tuwien.dsg.pm.PeerManager;
import at.ac.tuwien.dsg.pm.model.Collective;
import at.ac.tuwien.dsg.smartcom.model.CollectiveInfo;
import at.ac.tuwien.dsg.smartcom.model.Identifier;
import javax.inject.Inject;
import javax.ws.r... | package at.ac.tuwien.dsg.pm.resources; |
<|file_name|>rsa.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
"""
requires tlslite - http://trevp.net/tlslite/
"""
import binascii
try:
from gdata.tlslite.utils import keyfactory
except ImportError:
from tlslite.tlslite.utils import keyfactory
try:
from gdata.tlslite.utils import cryptomath
except Import... | oauth.escape(oauth_request.get_normalized_http_url()),
oauth.escape(oauth_request.get_normalized_parameters()),
)
key = '' |
<|file_name|>PrayerGroup.java<|end_file_name|><|fim▁begin|>package org.maxgamer.rs.model.skill.prayer;
import java.util.LinkedList;
/**
* @author netherfoam, alva
*/
public enum PrayerGroup {
//Standard prayer book
/** All prayers that boost defense */
DEFENSE(PrayerType.THICK_SKIN, PrayerType.ROCK_SKIN, PrayerT... | |
<|file_name|>help.hpp<|end_file_name|><|fim▁begin|>#ifndef METASHELL_PRAGMA_HELP_HPP
#define METASHELL_PRAGMA_HELP_HPP
// Metashell - Interactive C++ template metaprogramming shell
// Copyright (C) 2014, Abel Sinkovics (abel@sinkovics.hu)
//
// This program is free software: you can redistribute it and/or modify
// it... | iface::main_shell&) const override;
};
} |
<|file_name|>reader.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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... |
#![allow(dead_code)]
#[cfg(stage0)] use prelude::v1::*; |
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import { NPS } from './NPS'<|fim▁hole|><|fim▁end|> | export default NPS |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os<|fim▁hole|> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "radiocontrol.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|fim▁end|> | import sys
if __name__ == "__main__": |
<|file_name|>validate-config.js<|end_file_name|><|fim▁begin|>'use strict';
var async = require('async');
var _ = require('lodash');
var yamlReader = require('./yaml-reader/yaml-reader');
var fliprValidation = require('flipr-validation');
module.exports = validateConfig;
function validateConfig(options, cb) {
var v... | config: _.partial(yamlReader, options), |
<|file_name|>dir_4627380db2f0c36581ca02ea208a64c6.js<|end_file_name|><|fim▁begin|>var dir_4627380db2f0c36581ca02ea208a64c6 =
[<|fim▁hole|><|fim▁end|> | [ "support", "dir_2e2aa096c82c7fb5ccae4b9643632450.html", "dir_2e2aa096c82c7fb5ccae4b9643632450" ]
]; |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ProxyServe.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|fim▁end|> | #!/usr/bin/env python
import os
import sys |
<|file_name|>QPropertyModel.py<|end_file_name|><|fim▁begin|>from PyQt4 import QtCore, QtGui
from components.propertyeditor.Property import Property
from components.RestrictFileDialog import RestrictFileDialog
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import sys, os
class QPropertyModel(QtCore.QAbstractIte... | if (section == 0) : |
<|file_name|>foundation.equalizer.min.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | version https://git-lfs.github.com/spec/v1
oid sha256:a2aca9cd81f31f3e9e83559fdcfa84d3ee900090ee4baeb2bae129e9d06473eb
size 1264 |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use bindgen::RustTarget;
use pkg_config::Error;
use std::env;
use std::io::Write;
use std::path::PathBuf;
fn main() {
let package_name = "cfitsio";
match pkg_config::probe_library(package_name) {
Ok(_) => {
let bindings = bindgen::builder()... | |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Store, StoreModule } from '@ngrx/store';
import { AppComponent } from './app.component';
import { Child } from './child.component';
import { Child... | import { appState } from './reducer.appstate';
@NgModule({ |
<|file_name|>test_sensor.py<|end_file_name|><|fim▁begin|>"""Test zha sensor."""
from unittest import mock
import pytest
import zigpy.zcl.clusters.general as general
import zigpy.zcl.clusters.homeautomation as homeautomation
import zigpy.zcl.clusters.measurement as measurement
import zigpy.zcl.clusters.smartenergy as s... | |
<|file_name|>factory.py<|end_file_name|><|fim▁begin|>#-*- coding: ISO-8859-1 -*-
# pysqlite2/test/factory.py: tests for the various factories in pysqlite
#
# Copyright (C) 2005-2007 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
#... |
def tearDown(self):
self.con.close() |
<|file_name|>63880000.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | jsonp({"cep":"63880000","cidade":"Domingos da Costa","uf":"CE","estado":"Cear\u00e1"}); |
<|file_name|>test_smbfs.py<|end_file_name|><|fim▁begin|># Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/li... |
def test_copy_image_to_volume_wrong_size_after_fetch(self):
self._test_copy_image_to_volume(wrong_size_after_fetch=True)
|
<|file_name|>transform-requests.ts<|end_file_name|><|fim▁begin|>import {
cloneRecordIdentity,
equalRecordIdentities,
recordDiffs,
Record,
RecordIdentity,
RecordOperation,
Transform,
AddRecordOperation,
RemoveRecordOperation,
ReplaceAttributeOperation,
ReplaceRecordOperation,
AddToRelatedRecordsO... | |
<|file_name|>marimo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwn import *
import time
host = "10.211.55.6"
port = 8888
host = "ch41l3ng3s.codegate.kr"
port = 3333
r = remote(host,port)
def sell(idx):
r.recvuntil(">>")
r.sendline("S")
r.recvuntil(">>")
r.send... | puts_got = 0x603018
r.recvuntil(">>") |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// ts project doc.go
/*
ts document
*/<|fim▁hole|>package main<|fim▁end|> | |
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>//! Defines configuration file format.
use anyhow::{anyhow, Result};
use glob::Pattern;
use lazy_static::lazy_static;
use serde::Deserialize;
use std::{
fs,
io::Read,
ops::{Deref, DerefMut},
path::{Path, PathBuf},
};
lazy_static! {
static ref CON... | self.root_dir.join(".cache.json")
}
}
|
<|file_name|>linkrefs.component.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit, Input} from '@angular/core';
import {Messages} from "../../messages";
import {AbstractRegisteredService} from "../../../domain/registered-service";
import {Data} from "../data";
@Component({
selector: 'app-linkrefs',
templat... | export class LinkrefsComponent implements OnInit { |
<|file_name|>SGDerivative.java<|end_file_name|><|fim▁begin|>/*
<|fim▁hole|> *
* This file is part of MZmine 2.
*
* MZmine 2 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 L... | * Copyright 2006-2015 The MZmine 2 Development Team
|
<|file_name|>issue-6117.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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... | Right(()) => {}
_ => {}
}
} |
<|file_name|>69b85d86968f_init2.py<|end_file_name|><|fim▁begin|>"""init2
Revision ID: 69b85d86968f
Revises: 9f83e778144c
Create Date: 2017-09-25 17:36:03.015859
<|fim▁hole|>import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '69b85d86968f'
down_revision = '9f83e778144c'
branch_labels = None
d... | """
from alembic import op |
<|file_name|>addTrip.js<|end_file_name|><|fim▁begin|>const
pObj=pico.export('pico/obj'),
fb=require('api/fbJSON'),
rdTrip=require('redis/trip')
return {
setup(context,cb){
cb()
},
addPickup(user,action,evt,name,next){
const text=pObj.dotchain(evt,['message','text'])
if(!text) return next(null,`fb/ask${action... | switch(text.toLowerCase()){
case 'done':
action.push('+:pickup',null)
this.set(name,'TripFirstDropoff') |
<|file_name|>mailer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
This script sends confirmation messages to recently registered users.
It should be run periodically so that users receive a registration
confirmation link soon after they have registered.
rbp@isnomore.net
"""
import smtplib
from email.m... |
def mail_confirmation(email, msg): |
<|file_name|>Socket.ts<|end_file_name|><|fim▁begin|>import { Event } from "../events/Event"
import { EventDispatcher } from "../events/EventDispatcher"
import { Browser } from "../utils/Browser"
import { Byte } from "../utils/Byte"
/**
* 连接建立成功后调度。
* @eventType Event.OPEN
* */
/*[Event(name = "open", type = "laya.e... | }
/** |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>"""Configuration for pytest."""
import json
def pytest_generate_tests(metafunc):
"""Configure pytest to call each of the tests once for each test case."""<|fim▁hole|> tests = json.load(open("tests/test_data.json"))["tests"]
metafunc.parametrize(... | if "test_case" in metafunc.fixturenames: |
<|file_name|>explicit_instantiation.cc<|end_file_name|><|fim▁begin|>// { dg-do compile { target c++11 } }
// Copyright (C) 2013-2021 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the G... | |
<|file_name|>preview.js<|end_file_name|><|fim▁begin|>/*global gdn, jQuery*/
jQuery(($) => {
const $preview = $('<div class="Preview"></div>')
.insertBefore('#ConversationForm .bodybox-wrap, #Form_ConversationMessage .bodybox-wrap')
.hide();
const $textbox = $('#ConversationForm textarea[name="... | |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>"""
Form Widget classes specific to the Django admin site.
"""
from __future__ import unicode_literals
import copy
from django import forms
from django.contrib.admin.templatetags.admin_static import static
from django.core.urlresolvers import reverse
from django.fo... | |
<|file_name|>database.js<|end_file_name|><|fim▁begin|>'use strict';
const MongoClient = require('mongodb').MongoClient;
module.exports = class Events {
constructor() {
this.database = null;
this.collections = {};
}
getDatabase(callback) {
if (this.database) {
callback(this.database);
} el... | } else {
this.getDatabase(database => {
this.collections[collection] = database.collection(collection);
callback(this.collections[collection]); |
<|file_name|>test_cvs.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
* Copyright 2007 Robert Gruber <rgruber@users.sourceforge.net> *
* *
* This program is free software... | // try to start the job
QVERIFY( j->exec() ); |
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>/*
* Copyright 2021 ThoughtWorks, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENS... | |
<|file_name|>handler.ts<|end_file_name|><|fim▁begin|>// (C) Copyright 2015 Moodle Pty Ltd.
//
// 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... | name = 'AddonModQuizAccessIpAddress';
ruleName = 'quizaccess_ipaddress';
constructor() { |
<|file_name|>string.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015 Daniel Grunwald
//
// 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 limitati... | |
<|file_name|>TaylorTest.py<|end_file_name|><|fim▁begin|># This software is Copyright (C) 2004-2008 Bristol University
# and is released under the GNU General Public License version 2.
import unittest
from Powers import Powers
from Polynomial import Polynomial<|fim▁hole|>
class Sine(unittest.TestCase):
def test_... | import Taylor |
<|file_name|>SimpleConfigObject.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2011-2012 Typesafe Inc. <http://typesafe.com>
*/
package com.typesafe.config.impl;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.math.BigInteger;
import java.util.AbstractMap;
import java.util.Arr... | sb.append('\n');
} else {
sb.append(",");
separatorCount = 1; |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from django.conf import settings
from django.db import models
from django.template.context import Context
from django.template.loader import get_template_from_string
from django.utils import timezone
import swapper
class BaseLogEntry(models.... | return unicode(self.name)
|
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from .views import ObservationListView, AddObservationView, UploadObservationsView
<|fim▁hole|> url(
r"^(?P<observer_id>\d+)/$",
ObservationListView.as_view(),
name="observation_list_by_observer",
),
... | app_name = "observations"
urlpatterns = [
url(r"^$", ObservationListView.as_view(), name="observation_list"), |
<|file_name|>user_entities_request.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from ..request import Request
from ..query import Entity
from ..query import Entry
import json
class UserEntity(Entity):
"""UserEntity object used for upload user entities.
Detail information about user entities you ... | return None |
<|file_name|>textModelResolverService.test.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 inf... | |
<|file_name|>helper_functions.js<|end_file_name|><|fim▁begin|>/*----------------------------------------------------------------------*/
/* The name says it all */
/*----------------------------------------------------------------------*/
/*-------------------------------... | results.push(newObject);
}
} |
<|file_name|>general_rates.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Constrained Optimization 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 Licens... |
if positive_class is not None:
raise ValueError(
"positive_class cannot be provided to " |
<|file_name|>beforePeekFlatMapCount.java<|end_file_name|><|fim▁begin|>// "Replace with 'Stream.mapToLong().sum()'" "true"
import java.util.Collection;
import java.util.List;<|fim▁hole|> void foo(List<List<String>> s) {
long count = s.stream().peek(System.out::println).flatMap(Collection::stream).c<caret>ount();
... |
class Test { |
<|file_name|>feed_parse_extractLittlebambooHomeBlog.py<|end_file_name|><|fim▁begin|><|fim▁hole|> Parser for 'littlebamboo.home.blog'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('FW', 'For... | def extractLittlebambooHomeBlog(item):
''' |
<|file_name|>update_users_report_view_settings.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
from frappe.model import update_users_report_view_settings
from erpne... | update_users_report_view_settings(dt, field[0], field[1]) |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
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, includin... | |
<|file_name|>position.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports.definition = {
set: function (v) {
this._setProperty('position', v);
},
get: function () {
return this.getPropertyValue('position');
},
enumerable: true,<|fim▁hole|><|fim▁end|> | configurable: true
}; |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for object-hash v1.2.0
// Project: https://github.com/puleos/object-hash
// Definitions by: Michael Zabka <https://github.com/misak113>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import HashStatic = ObjectHash.HashStatic;
... | MD5(object: any): string;
keysMD5(object: any): string;
HashTable: HashTableStatic;
} |
<|file_name|>prelude.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2017 Pietro Albini
//
// 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 the License, or
// (at your opt... | //! easily included.
pub use super::errors::{Error, ErrorKind, Result, ResultExt};
pub use super::traits::*; |
<|file_name|>Client.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import json
class Client():
def __init__(self, clientHostName, clientPort, channel):
self.clientHostName = clientHostName
self.clientPort = clientPort
self.clientType = self.getClientType()
self.channel = channel
#... | #!/usr/bin/python
|
<|file_name|>0014_signuplog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-10-03 02:38
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):... | |
<|file_name|>test_urllib.py<|end_file_name|><|fim▁begin|>"""Regresssion tests for urllib"""
import urllib
import httplib
import unittest
import os
import sys
import mimetools
import tempfile
import StringIO
from test import test_support
from base64 import b64encode
def hexescape(char):
"""Escape char as RFC 239... | # The authorization header must be in place
self.assertIn(authorization, fakehttp_wrapper.buf)
self.assertEqual(fp.readline(), "Hello!") |
<|file_name|>CountBinaryWithoutConsecutiveOnes.java<|end_file_name|><|fim▁begin|>package dp;
/**
* Question: http://www.geeksforgeeks.org/count-number-binary-strings-without-consecutive-1s/
*/
public class CountBinaryWithoutConsecutiveOnes {
public int count(int N) {
int[][] memo = new int[N + 1][2];
... | }
return c;
} |
<|file_name|>sprydomutils.js<|end_file_name|><|fim▁begin|>// SpryDOMUtils.js - version 0.13 - Spry Pre-Release 1.7
//
// Copyright (c) 2007. Adobe Systems Incorporated.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the... | |
<|file_name|>start.js<|end_file_name|><|fim▁begin|>process.env.NODE_ENV = 'development';
// Load environment variables from .env file. Suppress warnings using silent
// if this file is missing. dotenv will never modify any environment variables
// that have already been set.
// https://github.com/motdotla/dotenv
requi... | // It allows us to log custom error messages on the console.
function onProxyError(proxy) { |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Models provided by the `libsvm` library.
<|fim▁hole|><|fim▁end|> | mod ffi;
pub mod svc; |
<|file_name|>doc.js<|end_file_name|><|fim▁begin|>(function () {
var Demo = {
init: function () {
this.syntaxHighlight();
this.sticky();
},
syntaxHighlight: function () {
hljs.initHighlighting();
},<|fim▁hole|> $sticky.sticky({
... |
sticky: function () {
var $sticky = $('[data-sticky]');
|
<|file_name|>test_delete.py<|end_file_name|><|fim▁begin|>import os
from jenkins_jobs import cmd
from tests.base import mock
from tests.cmd.test_cmd import CmdTestsBase
@mock.patch('jenkins_jobs.builder.Jenkins.get_plugins_info', mock.MagicMock)
class DeleteTests(CmdTestsBase):
@mock.patch('jenkins_jobs.cmd.Buil... | parameters feature.
"""
args = self.parser.parse_args(['delete', |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! This library provides wrappers for LLVM that are memory-safe and follow
//! Rust idioms.
//!
//! The original LLVM reference is available [here](http://llvm.org/doxygen/)
//! but take note that this isn't as thorough as this documentation.
extern crate llvm_sys as f... | extern crate libc;
extern crate cbox;
#[macro_use] |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.urls import reverse_lazy
from modoboa.lib.tests import ModoTestCase
class OpenAPITestCase(ModoTestCase):
openapi_schema_url = reverse_lazy('schema-v1-legacy')<|fim▁hole|> self.client.logout()
response = self.client.get(self.openapi_sc... |
def test_unauthorized(self): |
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>//
// imag - the personal information management suite for the commandline
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> and contributors
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Le... |
error_chain! {
types { |
<|file_name|>dbconnect_shared.cc<|end_file_name|><|fim▁begin|>// $Id: dbconnect_shared.cc,v 1.9 2005/03/30 12:32:58 jacek Exp $
/* libcommonc++: ManuProC's main OO library
* Copyright (C) 1998-2000 Adolf Petig GmbH & Co. KG, written by Jacek Jakubowski
* Copyright (C) 2010 Christof Petig
*
* This program is fre... | const std::string &u,const std::string &n, const int p)
: host(h), dbase(d), user(u), name(n), port(p), type(C_SQLite)
{
std::string host_=DEFAULT_DBHOST; |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from collections import namedtuple
Resolution = namedtuple('Resolution', ['x', 'y'])
class Resolutions(object):
resolutions = [
(1920, 1200),
(1920, 1080),
(1680, 1050),
(1440, 900),
(1360, 768),
(1280, 80... | if (x,y) not in self.resolutions:
resolutions = ', '.join(['%sx%s' % (a, b) for a,b in self.resolutions])
raise Exception('Resolution %s x %s not supported. Available resolutions: %s' % (x,y, resolutions) )
return Resolution(x, y)
|
<|file_name|>_jet_Erroresql_0.java<|end_file_name|><|fim▁begin|>package org.eclipse.jet.compiled;
import org.eclipse.jet.JET2Context;
import org.eclipse.jet.JET2Template;
import org.eclipse.jet.JET2Writer;
import org.eclipse.jet.taglib.RuntimeTagElement;
import org.eclipse.jet.taglib.TagInfo;
public class _jet_Errore... | out.write(NL); |
<|file_name|>connection_core.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
/**
* The Connection Manager provides a simplified interface to the XMLHttpRequest
* object. It hand... | if(callback && callback.success){
if(!callback.scope){
callback.success(responseObject);
} |
<|file_name|>seeds_threshold.py<|end_file_name|><|fim▁begin|># This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
from load import load_dataset
import numpy... | # numpy magic to make an array with 10% of 0s starting at fold
training[fold::10] = 0
|
<|file_name|>coinaaa_ar.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Coinaaa Core</source>
<translation type="unfini... | <translation>خيارات ...</translation>
</message>
<message>
<location line="+13"/> |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::io;
pub struct JiaeHomework {
index: usize,
value: i32,
}
fn stdinln_i32() -> i32 {
// 이 함수는 하나의 줄을 stdin으로 받아 단 하나의 integer를 리턴합니다.
let mut buffer = String::new();
std::io::stdin().read_line(&mut buffer).expect("Failed to read stdin.");
buffer.trim().p... | // 현재 구름은 rustc 2017년대 버젼을 쓰고있다. 따라서 이와같이 해결한다.
// i32::abs(...) |
<|file_name|>server.go<|end_file_name|><|fim▁begin|><|fim▁hole|>import (
log "github.com/sirupsen/logrus"
"github.com/catpie/musdk-go"
"strconv"
"strings"
)
func handleLog(l string) error {
log.Info("get log: ", l)
arr := strings.Split(l, "\n")
log.Infof("len: %d ", len(arr))
// var logs []musdk.UserTrafficLog... | package main
|
<|file_name|>issue-1701.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/lice... | animal::rabbit(..) => { None }
animal::tiger(..) => { Some("roar".to_string()) }
}
} |
<|file_name|>xrwebglsubimage.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 https://mozilla.org/MPL/2.0/. */
use crate::dom::bindings::codegen::Bindings::XRWebGL... | |
<|file_name|>ja.js<|end_file_name|><|fim▁begin|>tutao.provide('tutao.tutanota.ctrl.lang.ja');
tutao.tutanota.ctrl.lang.ja.writing_direction = "ltr";
tutao.tutanota.ctrl.lang.ja.id = "ja";
tutao.tutanota.ctrl.lang.ja.keys = {
"account_label": "ユーザー",
"activate_action": "有効にする",
"address_label": "アドレス",
"add_acti... | "password_label": "パスワード",
"presharedPasswordAndStrength_msg": "パスワードの強さ",
"preSharedPasswordNeeded_label": "各外部受信者用の承認パスワードを入力して下さい。", |
<|file_name|>group_tags.py<|end_file_name|><|fim▁begin|>from django import template
from django.utils.encoding import smart_str
from django.core.urlresolvers import reverse, NoReverseMatch
from django.db.models import get_model
from django.db.models.query import QuerySet
register = template.Library()
class GroupURL... | |
<|file_name|>timer.py<|end_file_name|><|fim▁begin|>import pile
import matplotlib.pyplot as plt
import time
import random
x,y = [],[]
for i in range(0,10):
p = 10 ** i
print(i)
start = time.time()
pile.pile(p)
final = time.time()<|fim▁hole|> delta = final - start
x.append(p)
y.append(delta... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version... | GasLeft, ReturnData |
<|file_name|>network.py<|end_file_name|><|fim▁begin|># This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, ... | |
<|file_name|>orderline.cpp<|end_file_name|><|fim▁begin|>#include <climits>
#include <cstdlib>
#include <cstring>
#include "orderline.h"
#include "../src/schema/conversion.h"
using namespace std;
void OrderlineStore::add(string elements[10]) {
add_instance(atoi(elements[0].c_str()),
atoi(elements[1].c_str()),
... | uint64_t OrderlineStore::get(int32_t ol_w_id, int32_t ol_d_id, int32_t ol_o_id, int32_t ol_number) {
return pkIndex[std::make_tuple(ol_w_id, ol_d_id, ol_o_id, ol_number)]; |
<|file_name|>gcc.py<|end_file_name|><|fim▁begin|>"""SCons.Tool.gcc
Tool-specific initialization for gcc.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2017 The SCons Foundation
#
#... | |
<|file_name|>IjkMediaFormat.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2015 Bilibili
* Copyright (C) 2015 Zhang Rui <bbcallen@gmail.com>
*
* 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 L... | |
<|file_name|>checkout_mode_tag.py<|end_file_name|><|fim▁begin|>from classytags.helpers import InclusionTag
from django import template<|fim▁hole|>register = template.Library()
class Banner(InclusionTag):
"""
Displays a checkout mode banner.
"""
template = 'sagepay/checkout_mode_banner.html'
def ... | from django.conf import settings
from django.template.loader import render_to_string
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.