prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp'),
webserver = require('gulp-webserver'),
htmlreplace = require('gulp-html-replace');
//gulp.task('default', function() {
// gulp.run('watcher', 'webserver');
//});
gulp.task('webserver', function() {
gulp.src('build')
... | });
gulp.task('copy', function(){
gulp.src('app/index.html') |
<|file_name|>delta.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under t... | error += _('%s. No default code on file found\n') % i
continue # jump
try: |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#<|fim▁end|> | #
# Generated by the Open ERP module recorder ! |
<|file_name|>ordereddict.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Backport from python2.7 to python <= 2.6."""
from itertools import repeat as _repeat, chain as _chain, starmap as _starmap
try:
from itertools import izip_longest as _zip_longest
except ImportError:
from itertools import izip
... | for key in other.keys(): |
<|file_name|>Sequence.java<|end_file_name|><|fim▁begin|><|fim▁hole|> public int size(); // Return number of elements in sequence.
public void addFirst(int e); // Insert e at the front of the sequence.
public void addLast(int e); // Insert e at the back of the sequence.
// Inserts an element e ... | import java.lang.IndexOutOfBoundsException;
public interface Sequence
{ |
<|file_name|>time_date.py<|end_file_name|><|fim▁begin|>"""
Support for showing the date and the time.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.time_date/
"""
import logging
import homeassistant.util.dt as dt_util<|fim▁hole|>
_LOGGER = loggi... | from homeassistant.helpers.entity import Entity |
<|file_name|>2.py<|end_file_name|><|fim▁begin|>"""This example follows the simple text document Pipeline illustrated in the figures above.
"""
from pyspark.ml import Pipeline
from pyspark.ml.classification import LogisticRegression
from pyspark.ml.feature import HashingTF, Tokenizer
# Prepare training documents from ... | (7, "apache hadoop") |
<|file_name|>action.rs<|end_file_name|><|fim▁begin|>pub enum Action {
// Do nothing.
Passive,<|fim▁hole|> // Attack the player.
Attack(f64),
}<|fim▁end|> | |
<|file_name|>RHEL_7.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2017 Chris Lalancette <clalancette@gmail.com>
# Copyright (C) 2013 Ian McLeod <imcleod@redhat.com>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as pu... |
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software |
<|file_name|>task.py<|end_file_name|><|fim▁begin|># -*- test-case-name: twisted.test.test_task,twisted.test.test_cooperator -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Scheduling utility methods and classes.
@author: Jp Calderone
"""
__metaclass__ = type
import time
from zope.in... | |
<|file_name|>test-donation.js<|end_file_name|><|fim▁begin|>import Vue from 'vue';
import socket from './sockets';
export default () => new Vue({
el: '#test_donation',
data: {
name: '',
displayName: '',
amount: 0
},
methods: {
clear: function(){
this.name = '';
this.displayName = '';... | socket.emit('test-notification', send);
this.clear();
}
} |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates<|fim▁hole|>
$(function () {
$('[data-toggle="popover"]').popover();
$('.main-hide-div').hide();
$('#UserTa... | * and open the template in the editor.
*/ |
<|file_name|>parallel.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/. */
//! Implements parallel traversal over the DOM tree.
//!
//!... | // We were the last child of our parent. Construct flows for our parent. |
<|file_name|>test_html5lib.py<|end_file_name|><|fim▁begin|>"""Tests to ensure that the html5lib tree builder generates good trees."""
import warnings
try:
from bs4.builder import HTML5TreeBuilder
HTML5LIB_PRESENT = True
except ImportError, e:
HTML5LIB_PRESENT = False
from bs4.element import SoupStrainer
f... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub mod filehandler;<|fim▁hole|>pub mod validator;
pub mod util;
pub mod generator {
// pub mod swift;
pub mod jsoninc;
pub mod jaxrs;
pub mod java_client;
pub mod jquery;
pub mod knockout;
pub mod dotnet;
pub mod dotnet_types;
pub mod dotnet_interfaces... | pub mod cmdlinehandler;
pub mod model;
pub mod parser; |
<|file_name|>functions_74.js<|end_file_name|><|fim▁begin|>var searchData=
[
['takeaction',['takeAction',['../classBasicStar.html#aadca2b88ce5766a1a6cd95accbb72bfb',1,'BasicStar::takeAction()'],['../classMovingStar.html#a273dfe02f9eab1148da09619e34480e9',1,'MovingStar::takeAction()']]],<|fim▁hole|><|fim▁end|> | ['touches',['touches',['../classPlayer.html#ab6c3ad981fd782f3b59fe19d66bc15d8',1,'Player']]]
]; |
<|file_name|>test_testing.py<|end_file_name|><|fim▁begin|>import warnings
import unittest
import sys
from nose.tools import assert_raises
from gplearn.skutils.testing import (
_assert_less,
_assert_greater,
assert_less_equal,
assert_greater_equal,
assert_warns,
assert_no_warnings,
assert_e... | def f():
warnings.warn("yo", DeprecationWarning) |
<|file_name|>solve.py<|end_file_name|><|fim▁begin|>def sort_by_length(arr):<|fim▁hole|> return sorted(arr, key=len)<|fim▁end|> | |
<|file_name|>_isyclimate.py<|end_file_name|><|fim▁begin|>"""
This is a subfile for IsyClass.py
These funtions are accessable via the Isy class opj
"""
__author__ = 'Peter Shipley <peter.shipley@gmail.com>'
__copyright__ = "Copyright (C) 2013 Peter Shipley"
__license__ = "BSD"
import time
##
## Climate funtions
##
... | if __name__ == "__main__": |
<|file_name|>map.rs<|end_file_name|><|fim▁begin|>use crate::vec::Vec;
use core::borrow::Borrow;
use core::cmp::Ordering;
use core::fmt::{self, Debug};
use core::hash::{Hash, Hasher};
use core::iter::{FromIterator, FusedIterator};
use core::marker::PhantomData;
use core::mem::{self, ManuallyDrop};
use core::ops::{Index,... | /// assert_eq!(map.get(&2), None); |
<|file_name|>CMSStaticPageTest.java<|end_file_name|><|fim▁begin|>/**
* This file is part of the Goobi viewer - a content presentation and management application for digitized objects.
*
* Visit these websites for more information.
* - http://www.intranda.com
* - http://digiverso.com
*
* This pr... | |
<|file_name|>issue-22034.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lic... | // option. This file may not be copied, modified, or distributed
// except according to those terms. |
<|file_name|>Trashcan.py<|end_file_name|><|fim▁begin|>import time
import os
try:
import enigma
from Components.config import config
except:
print "Cannot import enigma"
from Directories import resolveFilename, SCOPE_HDD
def getTrashFolder():
# Returns trash folder without symlinks
return os.path.realpath(os.pat... | def getRecordings(self):
return [] |
<|file_name|>regions-mock-trans.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.... | |
<|file_name|>qnode.js<|end_file_name|><|fim▁begin|>/**
* Created by 勇 on 2015/7/3.<|fim▁hole|><|fim▁end|> | */ |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import datetime
import time
from django.core.exceptions import ObjectDoesNotExist
from django.db import models
from django.db.models import Q
from django.db.models.signals import pre_save
from django.contrib.contenttypes.fields import GenericRelation
from django.cont... |
self.thread.forum.last_post = self
self.thread.forum.save() |
<|file_name|>advanced.py<|end_file_name|><|fim▁begin|>#-*- coding: utf8 -*-
'''
Examples of advanced Python features:
- metaclass
- descriptor
- generator/forloop<|fim▁hole|>'''
from __future__ import print_function
import sys
if sys.version_info > (3, ): # Python 3
exec('''
def exec_in(code, glob, loc=Non... | |
<|file_name|>createFieldRefs.H<|end_file_name|><|fim▁begin|>volScalarField& alpha2(mixture.alpha2());
const dimensionedScalar& rho1 = mixture.rho1();<|fim▁hole|>
twoPhaseChangeModel& phaseChange = phaseChangePtr();
tmp<volScalarField> rAU;<|fim▁end|> | const dimensionedScalar& rho2 = mixture.rho2(); |
<|file_name|>Cluster.d.ts<|end_file_name|><|fim▁begin|>import { EventsKey } from '../events';
import BaseEvent from '../events/Event';
import { Extent } from '../extent';
import Feature from '../Feature';
import Geometry from '../geom/Geometry';
import Point from '../geom/Point';
import { ObjectEvent } from '../Object'... | import { AttributionLike } from './Source';
import VectorSource, { VectorSourceEvent } from './Vector';
|
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from keras import backend as K
class Config:
def __init__(self):
self.verbose = True
self.network = 'resnet50'
# setting for data augmentation
self.use_horizontal_flips = True
self.use_vertical_flips = True
self.rot_90 = True
# anchor box scales
... | self.img_scaling_factor = 1.0
# number of ROIs at once |
<|file_name|>color_schemes.js<|end_file_name|><|fim▁begin|>const COLORS_ON = {
RESET: '\x1B[39m',
ANSWER: '\x1B[36m', // NYAN
SUCCESS: '\x1B[32m', // GREEN
QUESTION: '\x1B[1m', // BOLD
question: function (str) {
return this.QUESTION + str + '\x1B[22m'
},
success: function (str) {
return this.SUCCE... | const COLORS_OFF = {
RESET: '',
ANSWER: '', |
<|file_name|>X12Parser.java<|end_file_name|><|fim▁begin|>/*
Copyright [2011] [Prasad Balan]
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... |
import java.io.BufferedReader;
import java.io.File; |
<|file_name|>profile.py<|end_file_name|><|fim▁begin|>from datetime import datetime
import cProfile
# Invokes the profiler when processing a query.
# Postprocess results with:
# pyprof2calltree -k -i /tmp/*.pro
#
# or, when kcachegrind is not available, you can also use
# cprofilev -f /tmp/*.pro
# navigate ... | class ProfileMiddleware(object):
def __init__(self, get_response): |
<|file_name|>ssh.py<|end_file_name|><|fim▁begin|># Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazo... | 'ServerAliveInterval=10', '-i',
parsed_args.key_pair_file, constants.SSH_USER +
'@' + master_dns, '-t']
if parsed_args.command: |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod asset;
mod combat_screen;
mod input;
mod start_screen;
mod teams_screen;
mod text;
mod types;
use sdl2::render::Texture;
pub use asset::*;
pub use input::*;
pub use text::*;
pub use types::*;
use sdl2::pixels::Color;
use sdl2::rect::Rect;
use sdl2::render::WindowCa... | combat_screen::render(ui.viewport, scroll_offset, combat_data)
}
};
|
<|file_name|>problem4.rs<|end_file_name|><|fim▁begin|>fn is_palindrome(num: i64) -> bool {
let num_str = num.to_string();
let chars_to_check = num_str.len()/2;
let mut iter = num_str.as_bytes().iter().take(chars_to_check);
let mut rev_iter = num_str.as_bytes().iter().rev().take(chars_to_check);
// H... | |
<|file_name|>TEXTUI.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# ******************************************************
# Copyright 2004: Commonwealth of Australia.
#
# Developed by the Computer Network Vulnerability Team,
# Information Security Group.
# Department of Defence.
#
# Michael Cohen <scudette@use... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>"""
Oracle database backend for Django.
Requires cx_Oracle: http://cx-oracle.sourceforge.net/
"""
from __future__ import unicode_literals
import decimal
import re
import sys
import warnings
def _setup_environment(environ):
import platform
# Cygwin requires so... | settings_dict['NAME'])
else: |
<|file_name|>siteProperties.py<|end_file_name|><|fim▁begin|>#====================================================================================================
# C L A S S E S concerning the site description
#====================================================================================================
#----... | #non-valid dataset can't be on deletion list
if banInvalid == True:
if not self.dsetIsValid[datasetName]:
continue |
<|file_name|>PermissionRequestProvider.java<|end_file_name|><|fim▁begin|>package com.coreoz.plume.jersey.security.permission;
import java.util.Collection;
import javax.ws.rs.container.ContainerRequestContext;
/**<|fim▁hole|>public interface PermissionRequestProvider {
/**
* Fetch user permissions corresponding t... | * Extract permissions from the user corresponding to the current HTTP request
*/ |
<|file_name|>navcoin-util-test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# Copyright 2014 BitPay, Inc.
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import o... | |
<|file_name|>setup.py<|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<|fim▁hole|>
from __future__ import absolute_import
try:
from setuptools import setup
except ImportError:
from distutils.c... | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
<|file_name|>group.rs<|end_file_name|><|fim▁begin|>/*!
Group Icons and Cursors.
References:
* http://msdn.microsoft.com/en-us/library/ms997538.aspx
* https://devblogs.microsoft.com/oldnewthing/20120720-00/?p=7083
* https://github.com/MathewSachin/NIco/wiki/Ico,-Cur-and-PE-Formats
# Examples
The following example pr... | dest.write(self.image.as_bytes())?; |
<|file_name|>exit_with_last_argument.rs<|end_file_name|><|fim▁begin|>use std::env;<|fim▁hole|>
fn main() {
process::exit(env::args().last().unwrap().trim().parse().unwrap());
}<|fim▁end|> | use std::process; |
<|file_name|>sys.cpp<|end_file_name|><|fim▁begin|>/*
* Orthos backend functions. Mostly inspired by slim DM code.
* Big thanks to Per Liden, Simone Rota and Johannes Winkelmann.
*
* [exa]
*/
#include "sys.h"
#include "settings.h"
//#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wa... |
//evarything seemez ok
return 0; |
<|file_name|>TeTunnelRestconfProvider.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016-present Open Networking Laboratory
*
* 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
*
* h... |
private YangCodecHandler codecHandler;
|
<|file_name|>dm.py<|end_file_name|><|fim▁begin|>import sys
class DualModulusPrescaler:
def __init__(self,p):
self.m_p = p
return
def set_prescaler(self):
return
# may be internal
def set_a(self,a):
self.m_a = a
return
# may be internal
def set_n(self,n... |
def set_freq(self,freq):
return
|
<|file_name|>DepthPassPlugin.js<|end_file_name|><|fim▁begin|>/**
* @author alteredq / http://alteredqualia.com/
*/
THREE.DepthPassPlugin = function () {
this.enabled = false;
this.renderTarget = null;
var _gl,
_renderer,
_lights, _webglObjects, _webglObjectsImmediate,
_depthMaterial, _depthMaterialMorph, _de... | _renderer.state.setDepthTest( true );
// update scene |
<|file_name|>vehicles_David.py<|end_file_name|><|fim▁begin|>class Vehicle(object):
def __init__(self, make, model, year):
self.make = make
self.model = model
self.year = year
def foo(self, a, b, c):
print 'does some work'
print a, b, c
class Car(Vehicle):
def __... | def __init__(self, power, *args):
Vehicle.__init__(self, *args)
if power not in ('propeller', 'sail'): |
<|file_name|>desktop_l10n.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# ***** BEGIN LICENSE BLOCK *****
# 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/.
# *****... | "help": "Override the user repo path for all repos"}
], [
['--release-config-file', ],
{"action": "store", |
<|file_name|>MDBRow.cpp<|end_file_name|><|fim▁begin|>/**********************************************************
* Filename: MDBRow.cpp
* Text Encoding: utf-8
*
* Description:
*
*
* Author: moxichang (ishego@gmail.com)
* Harbin Engineering University
* Information Security Res... | } |
<|file_name|>app-android.cpp<|end_file_name|><|fim▁begin|>// This is generic code that is included in all Android apps that use the
// Native framework by Henrik Rydgård (https://github.com/hrydgard/native).
// It calls a set of methods defined in NativeApp.h. These should be implemented
// by your game or app.
#inc... | |
<|file_name|>mod_args.py<|end_file_name|><|fim▁begin|># (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# 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 Public License as published by
# the Free Software Foundation, either versio... | |
<|file_name|>method.ts<|end_file_name|><|fim▁begin|>/// <reference path="../define.ts"/>
/// <reference path="function.ts"/>
/// <reference path="../view/main.ts"/>
/* CONTROLLER */
module MODULE.CONTROLLER {
export class Methods {
constructor() {
FREEZE(this);
}
<|fim▁hole|><|fim▁end|> | }
} |
<|file_name|>t_ClaytonCopulaFactory_std.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
from openturns import *
TESTPREAMBLE()
RandomGenerator.SetSeed(0)
try:
distribution = ClaytonCopula(1.5)
size = 1000
sample = distribution.getSample(size)
factory = ClaytonCopulaFactory()
estimatedDistr... | print "distribution=", repr(distribution)
print "Estimated distribution=", repr(estimatedDistribution)
estimatedDistribution = factory.build()
print "Default distribution=", estimatedDistribution |
<|file_name|>test.policy.ts<|end_file_name|><|fim▁begin|>// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0... | const fileUrl = `/${repo.full_name}/${repo.default_branch}/${file}`;
const magicUrl = `/${repo.full_name}/${repo.default_branch}/.github/${file}`;
const scope = nock(githubRawBase)
.get(fileUrl) |
<|file_name|>wrap_matcher.py<|end_file_name|><|fim▁begin|>import six<|fim▁hole|>
__author__ = "Jon Reid"
__copyright__ = "Copyright 2011 hamcrest.org"
__license__ = "BSD, see License.txt"
import types
def wrap_matcher(x):
"""Wraps argument in a matcher, if necessary.
:returns: the argument as-is if it is alr... |
from hamcrest.core.base_matcher import Matcher
from hamcrest.core.core.isequal import equal_to |
<|file_name|>context-https.ts<|end_file_name|><|fim▁begin|>import { SecureClientSessionOptions } from "http2";
import { connect, ConnectionOptions, TLSSocket } from "tls";
import { HttpProtocols } from "./core";
import { AltNameMatch, parseOrigin } from "./san";
<|fim▁hole|>
const alpnProtocols =
{
http1: Buffer.from... |
const needsSocketHack = [ "12", "13" ]
.includes( process.versions.node.split( '.' )[ 0 ] ); |
<|file_name|>issue12328.go<|end_file_name|><|fim▁begin|>// Copyright 2015 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 issue12328
type T struct {<|fim▁hole|><|fim▁end|> | Err error
} |
<|file_name|>callee.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/licenses... | pub data: CalleeData<'tcx>,
} |
<|file_name|>prop-info.component.ts<|end_file_name|><|fim▁begin|>import { Component } from '@angular/core';
import { PropInfo } from './prop-info';
@Component({
selector: 'prop-info',
templateUrl: './prop-info.component.html'
//styleUrls: ['./info.component.css']
})<|fim▁hole|>
export class PropInfoComponent {
... | |
<|file_name|>microarchitectures.cc<|end_file_name|><|fim▁begin|>// Copyright 2017 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICEN... | model_ids: 'intel:06_3A'
model_ids: 'intel:06_3E' |
<|file_name|>field.js<|end_file_name|><|fim▁begin|>var cx = require('classnames');
var blacklist = require('blacklist');
var React = require('react');
module.exports = React.createClass({
displayName: 'Field',
getDefaultProps() {
return {
d: null,
t: null,<|fim▁hole|> },
renderError() {
if... | m: null,
label: ''
} |
<|file_name|>relacher_rames.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -*
# Copyright (c) 2013 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of sour... | |
<|file_name|>buffer.py<|end_file_name|><|fim▁begin|>class Buffer(object):
"""
A Buffer is a simple FIFO buffer. You write() stuff to it, and you
read() them back. You can also peek() or drain() data.
"""
def __init__(self, data=''):
"""
Initialize a buffer with 'data'.
"""
... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! JSON parser which picks up values directly without performing tokenization
extern crate fnv;
#[cfg(feature = "avx-accel")]
extern crate x86intrin;
#[cfg(feature = "avx-accel")]
mod avx;
#[cfg(not(feature = "avx-accel"))]
mod emulated;
mod bit;
mod error;
#[doc(hidde... | pub mod query;
mod result; |
<|file_name|>test_worker_bigrams.py<|end_file_name|><|fim▁begin|># coding: utf-8
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... |
import nltk
|
<|file_name|>hellow.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3<|fim▁hole|>a = 100
#判断a是否大于等于0
if a >= 100:
# 如果大于等于0执行这里边的内容
print('a为正 a =',a)
else:
# 反之执行这段代码
print('a为负 a =',a)
#
#转义字符
#
print("I'm OK")
print('I\'m OK')
print('I\'m\tlearning\nPython')
# 使用 r'' 来使 '' 里边的字符串不需要转 // 但是这样不行 -... |
#定义一个变量a |
<|file_name|>grpc_mux_impl_test.cc<|end_file_name|><|fim▁begin|>#include <memory>
#include "envoy/config/endpoint/v3/endpoint.pb.h"
#include "envoy/config/endpoint/v3/endpoint.pb.validate.h"
#include "envoy/service/discovery/v3/discovery.pb.h"
#include "source/common/common/empty_string.h"
#include "source/common/con... | envoy::service::discovery::v3::Resource resource; |
<|file_name|>globals_test.py<|end_file_name|><|fim▁begin|># Copyright The OpenTelemetry 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-... | # pylint: disable=protected-access |
<|file_name|>hashes.py<|end_file_name|><|fim▁begin|># This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
from cryptography imp... | name = "sha384"
digest_size = 48
block_size = 128
|
<|file_name|>notifications.js<|end_file_name|><|fim▁begin|>// add new post notification callback on post submit
postAfterSubmitMethodCallbacks.push(function (post) {
var adminIds = _.pluck(Meteor.users.find({'isAdmin': true}, {fields: {_id:1}}).fetch(), '_id');
var notifiedUserIds = _.pluck(Meteor.users.find({'pro... | instructions: 'Enable email notifications for new posts and new comments (requires restart).'
} |
<|file_name|>VideoPlayer.js<|end_file_name|><|fim▁begin|>import React from 'react';
import PropTypes from 'prop-types';
import VideoStream from './VideoStream.js';
import Toolbar from './Toolbar.js';
import PlayButtonIcon from '../icons/PlayButtonIcon.js';
import StopButtonIcon from '../icons/StopButtonIcon.js';
import... | this.play(); |
<|file_name|>test.rs<|end_file_name|><|fim▁begin|>use std::collections::VecDeque;
use super::{parse, BinaryOperator, Expression, Operand, Statement, Type};
use scanner::Scanner;
<|fim▁hole|>fn example_program_2() {
let source = r#" var nTimes : int := 0;
print "How many times?";
read nTimes;
var x : int;
for x ... | #[test] |
<|file_name|>startup.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
def startupNotification(callback):
callbacks.append(callback)
return callback
def notify():
for callback in callbacks:
callback()<|fim▁end|> | callbacks = [] |
<|file_name|>removeFaces.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 Op... | Class
Foam::removeFaces
Description |
<|file_name|>CCEXBalance.java<|end_file_name|><|fim▁begin|>package org.knowm.xchange.ccex.dto.account;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.math.BigDecimal;
public class CCEXBalance {
private String Currency;
private BigDecimal Balance;
private BigDecimal Available;
private BigDe... | + ", Pending="
+ Pending
+ ", CryptoAddress=" |
<|file_name|>test_access_rights.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: y... | self.project_project.write(cr, uid, [pigs_id], {'privacy_visibility': 'employees'}) |
<|file_name|>composite.rs<|end_file_name|><|fim▁begin|>/*
* This file generated automatically from composite.xml by r_client.py.
* Edit at your peril.
*/
//Make the compiler quiet
#![allow(unused_imports)]
#![allow(unused_unsafe)]
use std;
use libc::*;
use std::{mem,num,ptr,str};
use ffi::base::*;
use base;
use bas... | |
<|file_name|>ConnectorAmbulanceCentre.java<|end_file_name|><|fim▁begin|>package adf.launcher.connect;
import adf.agent.office.OfficeAmbulance;
import adf.control.ControlAmbulance;
import adf.launcher.AbstractLoader;
import adf.launcher.ConfigKey;
import rescuecore2.components.ComponentConnectionException;
import rescu... | if (classStr == null)
{ |
<|file_name|>filter.py<|end_file_name|><|fim▁begin|># Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the a... | rules -- in that order. As we will describe below, later rules
in the list take precedence. The path-specific rules are the
rules corresponding to the first element of the "path_specific" |
<|file_name|>csearch.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/license... | decoder::each_implementation_for_type(cdata, def_id.node, callback)
} |
<|file_name|>test_presentation.py<|end_file_name|><|fim▁begin|># encoding: utf-8
"""
Test suite for pptx.presentation module.
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
import pytest
from pptx.parts.coreprops import CorePropertiesPart
from pptx.parts.presentation ... | ]) |
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|># @file plugin.py
#
# Connect Zen Coding to Pluma.
#
# Adapted to pluma by Joao Manoel (joaomanoel7@gmail.com)
#
# Original Author Franck Marcia (franck.marcia@gmail.com)
#
import pluma, gobject, gtk, os
from zen_editor import ZenEditor
zencoding_ui_str = """
<ui>
... | <menuitem name="ZenCodingComment" action="ZenCodingCommentAction"/>
</menu>
</placeholder> |
<|file_name|>issue-10755.rs<|end_file_name|><|fim▁begin|>// build-fail
// dont-check-compiler-stderr<|fim▁hole|>}<|fim▁end|> | // compile-flags: -C linker=llllll -C linker-flavor=ld
// error-pattern: linker `llllll` not found
fn main() { |
<|file_name|>service.rs<|end_file_name|><|fim▁begin|>use tokio_io::codec::{Encoder, Decoder, Framed};
use tokio_proto::multiplex::RequestId;
use bytes::BytesMut;
use bytes::BigEndian;
use std::str;
use std::io::Error as IOError;
use bytes::buf::IntoBuf;
use bytes::Buf;
use bytes::BufMut;
use tokio_proto::multiplex::Ser... | src.split_to(payload_len); |
<|file_name|>test_host_reservation_address_conflicts_pgsql.py<|end_file_name|><|fim▁begin|>"""Host Reservation DHCPv6"""
# pylint: disable=invalid-name,line-too-long
import pytest
import misc
import srv_msg
import srv_control
@pytest.mark.v6
@pytest.mark.host_reservation
@pytest.mark.kea_only
@pytest.mark.pgsql
de... | # bigger prefix pool + reservation
misc.test_setup()
srv_control.set_time('renew-timer', 105) |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>mod tokenizer;
mod executor;
use tokenizer::*;
use executor::{execute, Numeric};
use std::collections::HashMap;
use std::io::prelude::*;
use std::io;
fn main() {
// contain all program variables
let mut variables: HashMap<String, executor::Numeric> = HashMap::n... | |
<|file_name|>ragged_tensor_value.py<|end_file_name|><|fim▁begin|># Copyright 2018 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://w... | row_splits.dtype != values.row_splits.dtype):
raise ValueError("row_splits and values.row_splits must have "
"the same dtype")
self._values = values |
<|file_name|>utils.go<|end_file_name|><|fim▁begin|>// +build linux
package cgroups
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"strconv"
"strings"
"time"
units "github.com/docker/go-units"
)
const (
cgroupNamePrefix = "name="
CgroupProcesses = "cgroup.procs"
)
// https://www.kernel.or... | )
|
<|file_name|>page.js<|end_file_name|><|fim▁begin|>/**
* 页面管理
* @author: SimonHao
* @date: 2015-12-19 14:24:08
*/
'use strict';
var path = require('path');
var fs = require('fs');
var extend = require('extend');
var mid = require('made-id');
var file = require('./file');
var config = require('./config... | basedir: base_path
}, comm_option.style);
|
<|file_name|>line.cpp<|end_file_name|><|fim▁begin|>/* xoreos - A reimplementation of BioWare's Aurora engine
*
* xoreos is the legal property of its developers, whose names
* can be found in the AUTHORS file distributed with this source
* distribution.
*
* xoreos is free software; you can redistribute it and/or
... | glLineWidth(3.f);
glBegin(GL_LINES); |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup
setup(
name='behave-teamcity',
version="0.1.23",
packages=['behave_teamcity', ],
url='https://github.com/iljabauer/behave-teamcity',
download_url='https://github.com/iljabauer/behave-teamcity/releases/tag/0.1.23',
l... | ], |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import uuid
from random import randint
from django.shortcuts import render
from django.http import HttpResponseRedirect
from .models import Url
def index(request):
if request.session.has_key("has_url"):
url = request.session.get("has_url")
del r... | |
<|file_name|>nested_import.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | use std::{result, marker::PhantomData}; |
<|file_name|>test_resourcefilecontrollerfactory.py<|end_file_name|><|fim▁begin|>import unittest<|fim▁hole|>from robotide.controller.filecontrollers import ResourceFileControllerFactory
class ResourceFileControllerFactoryTestCase(unittest.TestCase):
def setUp(self):
namespace = lambda:0
project = ... | |
<|file_name|>noExposedTodoRule.js<|end_file_name|><|fim▁begin|>const ts = require('typescript');
const utils = require('tsutils');
const Lint = require('tslint');
const ERROR_MESSAGE =
'A TODO may only appear in inline (//) style comments. ' +
'This is meant to prevent a TODO from being accidentally included i... | * detects TODO's inside of multi-line comments. TODOs need to be placed inside of single-line
* comments. |
<|file_name|>mimetype.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use dom::bindings::codegen::Bindings::MimeTypeBinding::MimeTypeMethods;
use dom::bindings::js::Root;
use dom::bindings::reflector::Reflector;
use dom::bindings::str::DOMString;
use dom::plugin::Plugin;
use dom_struct::dom_struct;
#[dom_struct]
pub struc... | /* 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/. */
|
<|file_name|>comments.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/l... | debug!(">>> line comments");
let p = rdr.last_pos;
let mut lines: Vec<String> = Vec::new(); |
<|file_name|>models_tests.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from django.test import TestCase
from us_ignite.snippets.models import Snippet
from us_ignite.snippets.tests import fixtures
class TestSnippetModel(TestCase):
def tearDown(self):
Snippet.objects.all().delete()
def get_instance(sel... | from nose.tools import eq_, ok_
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.