prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>pkcs11factory.go<|end_file_name|><|fim▁begin|>// +build pkcs11
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package factory
import (
"encoding/hex"
"github.com/hyperledger/fabric/bccsp"
"github.com/hyperledger/fabric/bccsp/pkcs11"
"github.com/hyperledger/fabri... | |
<|file_name|>init.rs<|end_file_name|><|fim▁begin|>#![feature(core, collections)]
extern crate core;
#[cfg(test)]
mod tests {
use core::slice::SliceExt;
// fn size_from_ptr<T>(_: *const T) -> usize {
// mem::size_of::<T>()
// }
// macro_rules! slice_offset {
// ($ptr:expr, $by:expr) =>... | // }
// |
<|file_name|>babylon.animation.ts<|end_file_name|><|fim▁begin|>module BABYLON {
export class Animation {
private _keys: Array<any>;
private _offsetsCache = {};
private _highLimitsCache = {};
private _stopped = false;
public _target;
private _easingFunction: IEasingFu... | |
<|file_name|>Solution.java<|end_file_name|><|fim▁begin|>package com.mgireesh;
public class Solution extends VersionControl {
public int firstBadVersion(int n) {
int badVersion = 0;<|fim▁hole|> int end = n;
while (start < end) {
int mid = start + (end - start) / 2;
if (isBadVersion(mid)) {
end = mid;
... |
int start = 1; |
<|file_name|>tagger.js<|end_file_name|><|fim▁begin|>let BASE_DIR = '/masn01-archive/';
const TAG_OPTIONS = ['meteor', 'cloud', 'bug', 'misc'];
let CURR_DIR = null;
let CURR_FILES = null;
let INIT_CMAP = null;
let CURR_IDX = 0;
let PREV_IDX = null;
$(async function() {
let cameras = JSON.parse(await $.get('camera... | }, {
action: 'list',
path: currentFile |
<|file_name|>TimezoneModel.js<|end_file_name|><|fim▁begin|>Ext.define('Onlineshopping.onlineshopping.shared.shop.model.location.TimezoneModel', {
"extend": "Ext.data.Model",
"fields": [{
"name": "primaryKey",
"type": "string",
"defaultValue": ""
}, {
"name": "timeZ... | "name": "cities",
"type": "string",
"defaultValue": ""
}, { |
<|file_name|>test_abstract.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
try:
import unittest2 as unittest
except ImportError:
import unittest
from rpaths import unicode, PY3, AbstractPath, PosixPath, WindowsPath
class TestAbstract(unittest.TestCase):
def test_construct(self):
... | class TestWindows(unittest.TestCase):
"""Tests for WindowsPath.
"""
def test_construct(self): |
<|file_name|>advogato.py<|end_file_name|><|fim▁begin|># Copyright (c) 2001-2004 Twisted Matrix Laboratories.<|fim▁hole|># See LICENSE for details.
#
'''
Usage:
advogato.py <name> <diary entry file>
'''
from twisted.web.xmlrpc import Proxy
from twisted.internet import reactor
from getpass import getpass
import sys
... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::net::{TcpStream, TcpListener};
use std::thread;
fn handle_client(stream: TcpStream) {
println!("Someone connected!");
}
fn main() {
println!("Starting Iron IRCd");<|fim▁hole|> match stream {
Ok(stream) => {
thread::spawn(move || {
handle_cli... |
let listener = TcpListener::bind("127.0.0.1:6667").unwrap();
for stream in listener.incoming() { |
<|file_name|>c_cm1x.py<|end_file_name|><|fim▁begin|># ----------------------------------------------------------------------------
# Copyright (C) 2013-2014 Huynh Vi Lam <domovilam@gmail.com>
#
# This file is part of pimucha.
#
# This program is free software: you can redistribute it and/or modify
# it und... | # GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
<|file_name|>Script.ts<|end_file_name|><|fim▁begin|>import { ILogger, getLogger } from './loggers';
import { CancellationToken, ICancellationToken } from '../util/CancellationToken';
import { Step } from './Step';
import { ModuleLoader } from './ModuleLoader';
import * as _ from 'underscore';
import { Guid } from '../u... | this.name = scriptDefinition.name; |
<|file_name|>test_parse_rank_score.py<|end_file_name|><|fim▁begin|>from scout.parse.variant.rank_score import parse_rank_score
from scout.parse.variant.variant import parse_variant
def test_parse_rank_score():
## GIVEN a rank score string on genmod format
rank_scores_info = "123:10"
variant_score = 10.0
... | ## THEN assert that None is returned
assert parsed_rank_score == None
|
<|file_name|>single_thread_calculator.rs<|end_file_name|><|fim▁begin|>use crate::{MonteCarloPiCalculator, gen_random};
use std::sync::Arc;
pub struct SingleThreadCalculator {}
impl SingleThreadCalculator {
#[inline]
fn gen_randoms_static(n: usize) -> (Vec<f64>, Vec<f64>) {
let mut xs = vec![0.0; n];
... | |
<|file_name|>cog_selector.py<|end_file_name|><|fim▁begin|># #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the t... | node_id, clade_id = generate_node_ids(target_sp, out_sp)
# Initialize task |
<|file_name|>MultiSurfaceType.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2013 Gunnar Kappei.
*
* 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.or... | |
<|file_name|>from_bits.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools;
use malachite_base::num::basic::traits::Zero;
use malachite_base::num::conversion::traits::ExactFrom;
use malachite_base::num::logic::traits::BitAccess;
use malachite_nz::natural::Natural;
pub fn from_bits_asc_naive<I: Iterator<Item = boo... | }) { |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>(function() {
function config($stateProvider, $locationProvider) {
$locationProvider
.html5Mode({
enabled: true,
requireBase: false
});
$stateProvider
.state('landing', {
url: '/',<|fim▁hole|> url: '/album',... | controller: 'LandingCtrl as landing',
templateUrl: '/templates/landing.html'
})
.state('album', { |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod clauses;
pub mod elements;
pub mod expressions;
pub mod func;
pub mod keywords;
pub mod math;
pub mod select_statement;
pub mod values;
use nom::branch::alt;
use nom::combinator::map;
use nom::number::complete::double;
use nom::IResult;
use ordered_float::Ordere... | pub use expressions::parse_expr; |
<|file_name|>get_outgoing.rs<|end_file_name|><|fim▁begin|>use chrono::{UTC, Date, Datelike};
use std::str::FromStr; // Use of #from_str.
use api::client::{TellerClient, ApiServiceResult, Transaction};
use api::client::parse_utc_date_from_transaction;
use api::inform::Money;
pub trait GetOutgoing {
fn get_outgoin... | .fold(0i64, |sum, v| sum + v); |
<|file_name|>current.py<|end_file_name|><|fim▁begin|>"""This *was* the parser for the current HTML format on parl.gc.ca.
But now we have XML. See parl_document.py.
This module is organized like so:
__init__.py - utility functions, simple parse interface
common.py - infrastructure used in the parsers, i.e. regexes<|fi... | current.py - parser for the Hansard format used from 2006 to the present
old.py - (fairly crufty) parser for the format used from 1994 to 2006 |
<|file_name|>problem-0013.rs<|end_file_name|><|fim▁begin|>/// Problem 13
/// Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
///
/// 37107287533902102798797998220837590246510135740250
/// ...
fn main() {
let raw: String = "\
37107287533902102798797998220837590246510... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""GRR restful API rendering plugins."""
# pylint: disable=unused-import<|fim▁hole|>from grr.gui.api_plugins import docs
from grr.gui.api_plugins import hunt
from grr.gui.api_plugins import reflection
from grr.gui.api_plugins import stats<|fim... | from grr.gui.api_plugins import aff4
from grr.gui.api_plugins import artifact
from grr.gui.api_plugins import config |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Collision detection algorithms<|fim▁hole|><|fim▁end|> |
pub mod minkowski;
pub mod broad_phase; |
<|file_name|>moment.ts<|end_file_name|><|fim▁begin|>import 'moment';<|fim▁hole|> if (!date) return undefined;
return moment(date).format(format);
}
}<|fim▁end|> |
export class MomentValueConverter {
toView(date: Date, format: string) {
if (!format) format = 'LLL'; |
<|file_name|>twitter.py<|end_file_name|><|fim▁begin|>import urllib
from askbot.deps.django_authopenid.util import OAuthConnection
class Twitter(OAuthConnection):<|fim▁hole|> super(Twitter, self).__init__('twitter')
self.tweet_url = 'https://api.twitter.com/1.1/statuses/update.json'
def tweet(self, ... | def __init__(self): |
<|file_name|>sigecoin_vi.ts<|end_file_name|><|fim▁begin|><TS language="vi" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Create a new address</source>
<translation>Tạo một địa chỉ mới</translation>
</message>
<message>
<source>&New</source>
<... | <context>
<name>ReceiveCoinsDialog</name>
</context> |
<|file_name|>testmarkint.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2019 Ondrej Starek
*
* This file is part of OTest2.
*
* OTest2 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 ... | |
<|file_name|>SendMessageUtil.java<|end_file_name|><|fim▁begin|>package com.wjyup.coolq.util;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;<|fim▁hole|>import com.google.common.hash.HashCode;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import com.google.... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .polarpoint import PolarPoint
__all__ = [
'PolarPoint',<|fim▁hole|>]<|fim▁end|> | |
<|file_name|>testcase_lmd_loader.js<|end_file_name|><|fim▁begin|>(function (require) {
var test = require('test'),
asyncTest = require('asyncTest'),
start = require('start'),
module = require('module'),
ok = require('ok'),
expect = require('expect'),
$ = requir... | if (typeof result === "undefined") {
result = scriptTag;
|
<|file_name|>entry.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2013-2014 Avencall
#
# 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, ... | u'7931G',
u'7941G',
u'7942G', |
<|file_name|>lithos_switch.rs<|end_file_name|><|fim▁begin|>extern crate libc;
extern crate nix;
extern crate env_logger;
extern crate regex;
extern crate argparse;
extern crate quire;
#[macro_use] extern crate log;
extern crate lithos;
use std::env;
use std::io::{stderr, Read, Write};
use std::process::exit;
use std:... | (default /etc/lithos/master.yaml)") |
<|file_name|>test_list_image_filters.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation
# 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
#
# ... | self.assertFalse(any([i for i in images
if i['id'] == self.snapshot1_id]))
self.assertFalse(any([i for i in images
if i['id'] == self.snapshot2_id])) |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* main.rs */
#[crate_id = "main#0.1"];
#[comment = "ironkernel"];
#[license = "MIT"];
#[crate_type = "lib"];
// Forked from pczarn/rustboot
#[no_std];
#[feature(asm, globs, macro_rules)];
extern mod core;
#[cfg(target_arch = "arm")]
pub use support::{memcpy, memmove}... | use platform::{cpu, io};
pub mod kernel; |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import include, url
from sapl.sessao.views import (AdicionarVariasMateriasExpediente,
AdicionarVariasMateriasOrdemDia, BancadaCrud,
CargoBancadaCrud, ExpedienteMateriaCrud,
... | url(r'^sistema/sessao-plenaria/tipo/',
include(TipoSessaoCrud.get_urls())),
url(r'^sistema/sessao-plenaria/tipo-resultado-votacao/',
include(TipoResultadoVotacaoCrud.get_urls())), |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------... | |
<|file_name|>chatsService.js<|end_file_name|><|fim▁begin|>appService.factory('Chats', function() {
// Might use a resource here that returns a JSON array
// Some fake testing data
var chats = [{
id: 0,
<|fim▁hole|> name: 'Ben Sparrow',
lastText: 'You on your way?',
face: 'app/view/common/im... | |
<|file_name|>instr_vfmadd132ss.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;
#[test]
fn vfmadd132ss_1() {
run_test... | fn vfmadd132ss_3() {
run_test(&Instruction { mnemonic: Mnemonic::VFMADD132SS, operand1: Some(Direct(XMM0)), operand2: Some(Direct(XMM7)), operand3: Some(Direct(XMM4)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[196, 226, 65, 153, 196], OperandSiz... |
<|file_name|>preamble_patcher.cc<|end_file_name|><|fim▁begin|>// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
/* Copyright (c) 2007, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following con... | unsigned char* target,
unsigned int* target_bytes,
unsigned int target_size) { |
<|file_name|>updateCategory.js<|end_file_name|><|fim▁begin|>let fs = require("fs");
let path = require("path");
let cp = require("child_process");
function runCommand(folder, args) {
cp.spawn("npm", args, { env: process.env, cwd: folder, stdio: "inherit" });
}
function getPackages(category) {
let folder = path.jo... | runCommandInCategory(c, args);
});
} else {
runCommandInCategory(category, args); |
<|file_name|>styles.js<|end_file_name|><|fim▁begin|>import {StyleSheet} from 'react-native'
const styles = StyleSheet.create({
container: {
flex: 1
}
})<|fim▁hole|>
export default styles<|fim▁end|> | |
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var roshamboApp = angular.module('roshamboApp', []),
roshambo=
[
{
name:'Rock',
src:'img/rock.png'
},
{
name:'Paper',
src:'img/paper.png'
},
{
name:'Scissors',
src:'img/scissors.png'
... | }
}
},function(errorResponse){ |
<|file_name|>view.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding=utf-8
__author__ = 'pyphrb'
from .import index
from flask import render_template
from model import NameFrom<|fim▁hole|> name = None
form = NameFrom()
if form.validate_on_submit():
name = form.name.data
form.name... | @index.route('/', methods=['GET', 'POST'])
def index(): |
<|file_name|>btree_builder.rs<|end_file_name|><|fim▁begin|>use anyhow::Result;
use byteorder::{LittleEndian, WriteBytesExt};
use std::collections::VecDeque;
use std::io::Cursor;
use std::sync::{Arc, Mutex};
use crate::checksum;
use crate::io_engine::*;
use crate::pdata::btree::*;
use crate::pdata::space_map::*;
use cr... | }; |
<|file_name|>McElieceKobaraImaiCipherTest.java<|end_file_name|><|fim▁begin|>package org.spongycastle.pqc.jcajce.provider.test;
import java.security.KeyPairGenerator;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import org.spongycastle.pqc.jcajce.spec.ECCKeyGenParameterSpec;
<|fim▁ho... | public class McElieceKobaraImaiCipherTest |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011-2015 Slack
#
# 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 re... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of Radicale Server - Calendar Server
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
# Copyright © 2008-2013 Guillaume Ayoub
#
# This library is free software: you can redistribute it and/or modify
# i... | # Override auth.is_authenticated |
<|file_name|>statlog-rollup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2008 - 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | else:
new.stamps[s] = this.stamps[stamp]
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from sqlobject.dbconnection import registerConnection
def builder():
import mysqlconnection
return mysqlconnection.MySQLConnection
def isSupported():
try:
import MySQLdb
except ImportError:
return False<|fim▁hole|><|fim▁end|> | return True
registerConnection(['mysql'], builder, isSupported) |
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
from mkt.site.helpers import page_title
@register.function
@jinja2.contextfunction
def operators_page_title(context, title=None):
section = _lazy('Operator Dashboard')
title = u'%s | %s' % (title, section) if title else section
return page_... | import jinja2
from jingo import register
from tower import ugettext_lazy as _lazy |
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (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 3 of th... | } |
<|file_name|>bfe_cited_by.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by... | |
<|file_name|>test.py<|end_file_name|><|fim▁begin|><|fim▁hole|>
token = keyring.get_password('messagesReceiver', 'skypeToken')
registrationToken = keyring.get_password('messagesReceiver', 'skypeRegistrationToken')
username = keyring.get_password('messagesReceiver', 'skypeUsername')
password = keyring.get_password('messa... | from messenger import Skype
import keyring
import utils |
<|file_name|>function.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... | |
<|file_name|>gsi.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" This module returns stats about the DynamoDB table """
import math
from datetime import datetime, timedelta
from boto.exception import JSONResponseError, BotoServerError
from retrying import retry
from dynamic_dynamodb.aws import dynamodb
fr... | table_name, gsi_name, lookback_window_start, 'WriteThrottleEvents')
except BotoServerError:
raise
|
<|file_name|>illumos.rs<|end_file_name|><|fim▁begin|>s! {
pub struct shmid_ds {
pub shm_perm: ::ipc_perm,
pub shm_segsz: ::size_t,
pub shm_amp: *mut ::c_void,<|fim▁hole|> pub shm_nattch: ::shmatt_t,
pub shm_cnattch: ::c_ulong,
pub shm_atime: ::time_t,
pub shm_d... | pub shm_lkcnt: ::c_ushort,
pub shm_lpid: ::pid_t,
pub shm_cpid: ::pid_t, |
<|file_name|>monitor_system.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from entropyfw import System
from s_pico_tc08.module import EntropyPicoTc08
from s_tti_cpx.module import EntropyTTiCPX
from s_laird_optotec_ot15.module import EntropyLairdOT15ConstantQc
from .s_controller.module impor... | # self.tticpx = EntropyTTiCPX(name=system_names.TTiCPX_MOD) |
<|file_name|>msid.rs<|end_file_name|><|fim▁begin|>#[doc = "Register `MSID[%s]` reader"]
pub struct R(crate::R<MSID_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<MSID_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<MSID_SPEC>> for R {
... | |
<|file_name|>showdevices.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
"""Run 'adb devices' and show results in friendly way.
Runs 'adb devices' and integrates the results with environment
variables DEVTAGS and ANDROID_SERIAL to show model numbers for
connected devices.
"""
import getopt
import os
import re
imp... |
# ---------main portion of script -------------
u.setdeflanglocale() |
<|file_name|>checker.go<|end_file_name|><|fim▁begin|>// Copyright 2017 PingCAP, 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/LICENSE-2.0
/... | return false
} |
<|file_name|>primitives.py<|end_file_name|><|fim▁begin|>import random
import struct
########################################################################################################################
class base_primitive (object):
'''
The primitive base class implements common functionality shared across ... | @rtype: 0
@return: 0
'''
|
<|file_name|>test_write_idmap.py<|end_file_name|><|fim▁begin|>###############################################################################
#
# Tests for XlsxWriter.
#<|fim▁hole|>
import unittest
from ...compatibility import StringIO
from ...vml import Vml
class TestWriteOidmap(unittest.TestCase):
"""
Test ... | # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
# |
<|file_name|>SILDebugInfoGenerator.cpp<|end_file_name|><|fim▁begin|>//===--- SILDebugInfoGenerator.cpp - Writes a SIL file for debugging ------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache Licen... | I.setDebugLocation(SILDebugLocation(Loc, Scope));
} else {
RegularLocation RLoc(DL); |
<|file_name|>SecurityRole.java<|end_file_name|><|fim▁begin|>package mat.model;
import com.google.gwt.user.client.rpc.IsSerializable;
/**
* The Class SecurityRole.
*/
public class SecurityRole implements IsSerializable {
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 1L;
/... | return id;
}
/** |
<|file_name|>A_evolve_outer_star_to_giant.py<|end_file_name|><|fim▁begin|>import os
import os.path
from amuse.units import units
from amuse.datamodel import Particle
from amuse.ext.star_to_sph import pickle_stellar_model
from amuse.community.mesa.interface import MESA as stellar_evolution_code
from xiTau_parameters ... | |
<|file_name|>deconv_simult.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import sys, time, scipy.optimize, scipy.ndimage.interpolation
import scipy.ndimage.filters as filt
import src.lib.utils as fn
import src.lib.wsutils as ws
import src.lib.Algorithms as alg
import scipy.signal.signaltools as sig
from src.lib.P... | return src_par, dec.shifts, dec.src_ini
def main(argv=None): |
<|file_name|>weaponupgradescpuneedbonuspostpercentcpulocationshipmodulesrequiringmissilelauncheroperation.py<|end_file_name|><|fim▁begin|># weaponUpgradesCpuNeedBonusPostPercentCpuLocationShipModulesRequiringMissileLauncherOperation
#
# Used by:
# Implants named like: Zainou 'Gnome' Launcher CPU Efficiency LE (6 of 6)
... | type = "passive"
|
<|file_name|>FindInFiles-test.js<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2014 - present Adobe Systems Incorporated. All rights reserved.
*
* 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 ... | |
<|file_name|>burp2.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
"""
.. module:: burpui.misc.backend.burp2
:platform: Unix
:synopsis: Burp-UI burp2 backend module.
.. moduleauthor:: Ziirish <hi+burpui@ziirish.me>
"""
import re
import os
import time
import json
from collections import OrderedDict
fr... | :param number: Backup number to work on
:type number: int
|
<|file_name|>24.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { PhoneIp24 as default } from "../../"; |
<|file_name|>decodable.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/... | },
explicit_self: None, |
<|file_name|>RelationPermissionsDao.java<|end_file_name|><|fim▁begin|>/**
* The MIT License
*
* Copyright (C) 2015 Asterios Raptis
*
* 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 wit... | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
<|file_name|>_gatebody.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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
#
# htt... | if children.type == "custom_unitary":
lst.append(children.name)
return lst |
<|file_name|>sriov_nic_agent.py<|end_file_name|><|fim▁begin|># Copyright 2014 Mellanox Technologies, 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/... | |
<|file_name|>gobspy.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
from gobspy import main
<|fim▁hole|><|fim▁end|> | main() |
<|file_name|>transient_detector_unittest.cc<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license<|fim▁hole|> * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file... | * that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found |
<|file_name|>fablib.py<|end_file_name|><|fim▁begin|>import os
from os import path
from datetime import datetime
import getpass
import re
import time
from fabric.context_managers import cd, hide, settings
from fabric.operations import require, prompt, get, run, sudo, local
from fabric.state import env
from fabric.contr... | webserver_cmd('restart')
|
<|file_name|>Toolbar.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react';
import { StandardProps } from '..';
export interface ToolbarProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, ToolbarClassKey> {
disableGutters?: boolean;
}
export type ToolbarClassKey = 'root' | 'gutters';
<|fi... | declare const Toolbar: React.ComponentType<ToolbarProps>;
export default Toolbar; |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from solution import Solution
from solution import TreeNode
def constructOne(s):
if s == '#':
return None
else:
return TreeNode(int(s))
def createTree(tree):
q = []
root = constructOne(tre... | while q:
tn = q.pop(0)
if not tn:
continue |
<|file_name|>mac_arabic.py<|end_file_name|><|fim▁begin|>""" Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,erro... | 0x00c0: 0x274a, # EIGHT TEARDROP-SPOKED PROPELLER ASTERISK, right-left
0x00c1: 0x0621, # ARABIC LETTER HAMZA
0x00c2: 0x0622, # ARABIC LETTER ALEF WITH MADDA ABOVE
|
<|file_name|>messenger_contact_add.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com>
#
# 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 Fo... | __all__ = ['MessengerContactAddScenario']
class MessengerContactAddScenario(BaseScenario):
def __init__(self, ab, callback, errback, |
<|file_name|>ArcherCommand.java<|end_file_name|><|fim▁begin|>package com.iluwatar.front.controller;
/**
*
* Command for archers.
*<|fim▁hole|> */
public class ArcherCommand implements Command {
@Override
public void process() {
new ArcherView().display();
}
}<|fim▁end|> | |
<|file_name|>operations.hpp<|end_file_name|><|fim▁begin|>#ifndef _OPERATIONS_HPP
#define _OPERATIONS_HPP
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
#include <CL/cl.h>
#include "matrix.hpp"<|fim▁hole|>public:
virtual ~Operations(void) { }
virtual Matrix multiply(const M... | #include "mem.hpp"
class Operations
{ |
<|file_name|>import_mr_sessions_stroop.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
##
## See COPYING file distributed along with the ncanda-data-integration package
## for the copyright and license terms
##
from __future__ import print_function
from builtins import str
import os
import re
import tempfile
... |
# |
<|file_name|>NodeIteratorTest.java<|end_file_name|><|fim▁begin|>package org.chasen.mecab.wrapper;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
... | }
});
threads.add(new Thread(){
public void run(){ |
<|file_name|>mod.py<|end_file_name|><|fim▁begin|># Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.... | |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import unittest
from pyramid import testing
<|fim▁hole|> self.config = testing.setUp()
def tearDown(self):
testing.tearDown()
def test_my_view(self):
from .views import my_view
request = testing.DummyRequest()
info = my... |
class ViewTests(unittest.TestCase):
def setUp(self): |
<|file_name|>test_protocol_peer.py<|end_file_name|><|fim▁begin|>###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software an... | |
<|file_name|>app.d.ts<|end_file_name|><|fim▁begin|>/// <reference path="MonitoredSocket.d.ts" /><|fim▁hole|>/// <reference path="Sqlite.d.ts" /><|fim▁end|> | |
<|file_name|>CreatureAIRegistry.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public Li... | *
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>. |
<|file_name|>UserInterface.py<|end_file_name|><|fim▁begin|># PiTimer - Python Hardware Programming Education Project For Raspberry Pi
# Copyright (C) 2015 Jason Birch
#
# 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 Fre... | STATE_SHUTDOWN = 6
# Constants to define display modes.
MODE_STANDARD = 0 |
<|file_name|>waterfallsink_gl.py<|end_file_name|><|fim▁begin|>#
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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 Foundat... | |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>def load_config(default_values, user_values):
if user_values is None:<|fim▁hole|> for k, v in user_values.items():
if k in default_values:
if isinstance(v, dict):
cloned = user_values[k].copy()
for key, value i... | return default_values
config = {} |
<|file_name|>instructions_a_test.go<|end_file_name|><|fim▁begin|>package chip8
import (
"testing"
)
func Test0xAnnn(t *testing.T) {<|fim▁hole|> c := New([]byte{
0xAF, 0xFF,
})
c.Step()
if c.i != 0xFFF {
t.Error("i was not set to 0xFFF as expected")
}
}<|fim▁end|> | |
<|file_name|>FMTLexer.hpp<|end_file_name|><|fim▁begin|>#ifndef INC_FMTLexer_hpp_
#define INC_FMTLexer_hpp_
#include <antlr/config.hpp>
/* $ANTLR 2.7.7 (20130428): "format.g" -> "FMTLexer.hpp"$ */
#include <antlr/CommonToken.hpp><|fim▁hole|>#include "FMTTokenTypes.hpp"
#include <antlr/CharScanner.hpp>
#include <fstre... | #include <antlr/InputBuffer.hpp>
#include <antlr/BitSet.hpp> |
<|file_name|>a-dashboard_controller.js<|end_file_name|><|fim▁begin|>'use strict';
/* global angular */
(function() {
var aDashboard = angular.module('aDashboard');
aDashboard.controller('ADashboardController', function( $scope, $rootScope, tradelistFactory, $timeout) {
$scope.subState = $scope.$parent;
$scope... | $scope.avgLoss = calculateAvgLoss( tradelist ).avg;
$scope.lossCount = calculateAvgLoss( tradelist ).count;
calculateAvgTradeSize( tradelist );
}); |
<|file_name|>pt.js<|end_file_name|><|fim▁begin|><|fim▁hole|>*/
CKEDITOR.plugins.setLang("placeholder","pt",{title:"Propriedades dos marcadores",toolbar:"Símbolo",name:"Nome do marcador",invalidName:"O marcador não pode estar em branco e não pode conter qualquer dos seguintes carateres: [, ], <, >",pathName:"símbolo"});... | /*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license |
<|file_name|>client.rs<|end_file_name|><|fim▁begin|>use std;
import core::result::*;<|fim▁hole|> assert count <= vec::len(bytes);
ret str::from_bytes(vec::slice(bytes, 0u, count));
}
fn main() {
let host = "0.0.0.0";
let port = 12345u16;
let sock = new_tcp_socket();
let addr = inet_addr(host);
... | import socket::*;
fn from_bytes_n(bytes: [const u8], count: uint) -> str { |
<|file_name|>ActivityOverview.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react';
import MePanel from '../components/panels/MePanel';
import { Segment } from 'semantic-ui-react'
import DetailedActivity from './activities/DetailedActivity';
import ActivityGraph from './activities/ActivityGraph';
... | <MePanel me={this.props.me} loading={this.props.loading} />
</Segment>
<Segment padded loading={this.props.loading} basic>
<ActivityGraph |
<|file_name|>extended_encoder.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from __future__ import absolute_import
from __future__ import unicode_literals
from gnuradio import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.