prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>EnvironmentAuthenticationResponse.java<|end_file_name|><|fim▁begin|>package com.sequenceiq.environment.api.v1.environment.model.response;
import java.io.Serializable;
import com.sequenceiq.environment.api.doc.environment.EnvironmentModelDescription;
import io.swagger.annotations.ApiModel;
import io.swag... | |
<|file_name|>BlockedComForce.hpp<|end_file_name|><|fim▁begin|>int ObservableBlockedComForce::actual_calculate(PartCfg & partCfg) {
double* A = last_value;
unsigned int i;
unsigned int block;
unsigned int n_blocks;
unsigned int blocksize;
unsigned int id;
IntList* ids;
if (!sortPartCfg()) {
runtime... | id = ids->e[block*blocksize+i];
if (ids->e[i] >= n_part) |
<|file_name|>SignTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright (C) 2013 Rohan Padhye
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* Licens... | "-p", "cg.spark", "simulate-natives",
"-p", "cg", "safe-forname", |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod stdthunk_x64;<|fim▁hole|>pub mod stdthunk_x86;
pub mod thunk_pool;
#[cfg(target_arch = "x86_64")]
pub use self::stdthunk_x64::imp::Thunk;
#[cfg(target_arch = "x86")]
pub use self::stdthunk_x86::imp::Thunk;
pub use self::thunk_pool::{get_thunk, put_back, set_th... | |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (<|fim▁hole|> "encoding/gob"
"encoding/json"
"log"
"os"
"sort"
"github.com/tsenart/vegeta/lib"
)
func main() {
var res vegeta.Results
if err := gob.NewDecoder(os.Stdin).Decode(&res); err != nil {
log.Fatal(err)
}
sort.Sort(res)
if err ... | |
<|file_name|>AgencyRegistrationProcessDao.java<|end_file_name|><|fim▁begin|>package com.abm.mainet.agency.dao;
import com.abm.mainet.agency.dto.TPAgencyReqDTO;
import com.abm.mainet.agency.dto.TPAgencyResDTO;
import com.abm.mainet.common.domain.Employee;
/**
* @author Arun.Chavda
*
*/
public interface Ag... | Employee saveAgnEmployeeDetails(Employee employee);
TPAgencyResDTO getAuthStatus(TPAgencyReqDTO requestDTO);
void updatedAuthStatus(Long empId, Long orgId, String flag);
|
<|file_name|>bip9-softforks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import Comparis... | Connect to a single node.
regtest lock-in with 108/144 block signalling
activation after a further 144 blocks |
<|file_name|>HeadsetTester.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from Headset import Headset
import logging
import time
puerto = 'COM3'
headset = Headset(logging.INFO)
try:
headset.connect(puerto, 115200)<|fim▁hole|>print "-----------------------------------------"
headset.startReading(persist_... | except Exception, e:
raise e
print "Is conected? " + str(headset.isConnected()) |
<|file_name|>crypto.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 vers... | where E: Error |
<|file_name|>moveconnectionlabel.py<|end_file_name|><|fim▁begin|>from umlfri2.application.commands.base import Command
from umlfri2.application.events.diagram import ConnectionMovedEvent
class MoveConnectionLabelCommand(Command):
def __init__(self, connection_label, delta):
self.__diagram_name = connectio... | @property
def description(self):
return "Moved label on connection in diagram {0}".format(self.__diagram_name)
|
<|file_name|>slice_hound.py<|end_file_name|><|fim▁begin|>import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty
from resources.datatables import Options
from java.util import Vector
def addT... | mobileTemplate.setDeathblow(False)
mobileTemplate.setScale(1)
mobileTemplate.setMeatType("Carnivore Meat")
mobileTemplate.setMeatAmount(65) |
<|file_name|>automated_params.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
module that specified how we choose paramaters based on current search database
properties
"""
from __future__ import absolute_import, division, print_function
#import six
import utool as ut
#import numpy as np
#import vtool as vt... | K = num_names_slope * num_names
else:
K = K_max
|
<|file_name|>node_netbsd.go<|end_file_name|><|fim▁begin|>package restic
import "syscall"
func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespec) error {
return nil
}
func (node Node) device() int {
return int(node.Device)
}
func (s statUnix) atim() syscall.Timespec { return s.Atimespec ... | |
<|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... | } |
<|file_name|>jss-plugin-props-sort.js<|end_file_name|><|fim▁begin|>(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : ... | exports.default = jssPropsSort;
|
<|file_name|>E0608.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT lic... | // http://rust-lang.org/COPYRIGHT.
// |
<|file_name|>length_parameter.py<|end_file_name|><|fim▁begin|>import numpy as np
import bpy
from bpy.props import FloatProperty, EnumProperty, IntProperty, BoolProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode, zip_long_repeat, ensure_nesting_level
from sverch... | ] |
<|file_name|>scan.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding=utf-8
# code by kbdancer@92ez.com
from threading import Thread
from telnetlib import Telnet
import requests
import sqlite3
import queue
import time
import sys
import os
def ip2num(ip):
ip = [int(x) for x in ip.split('.')]
return... | |
<|file_name|>test-hyperscript.js<|end_file_name|><|fim▁begin|>"use strict"
var o = require("ospec")
var m = require("../../render/hyperscript")
o.spec("hyperscript", function() {
o.spec("selector", function() {
o("throws on null selector", function(done) {
try {m(null)} catch(e) {done()}
})
o("throws on non... | o(vnode.children).deepEquals([null])
})
o("handles undefined single child", function() { |
<|file_name|>small_blurry_image.cc<|end_file_name|><|fim▁begin|>// Copyright 2008 Isis Innovation Limited
#include "ptam/construct/small_blurry_image.h"
#include <cvd/utility.h>
#include <cvd/convolution.h>
#include <cvd/vision.h>
#include <TooN/se2.h>
#include <TooN/Cholesky.h>
#include <TooN/wls.h>
//using namespace... |
TooN::Vector<2> v2SumGrad = 0.25 * (v2CurrentGrad + other.mimImageJacs[ir]);
// Why 0.25? This is from missing 0.5 factors: One for |
<|file_name|>hr_time_conversion.py<|end_file_name|><|fim▁begin|># hackerrank - Algorithms: Time Conversion
# Written by James Andreou, University of Waterloo
S = raw_input()
TYPE = S[len(S)-2]
if S[:2] == "12":
if TYPE == "A":
print "00" + S[2:-2]
else:
print S[:-2]
elif TYPE == "P":
HOUR = int(S[:2]) + 12
pri... | print S[:-2] |
<|file_name|>textblock.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
* 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... | int matches = text.indexOf(QRegExp(breakStr));
if (matches >= 0) {
// check that last part of string matches, if not, then |
<|file_name|>parser_test.ts<|end_file_name|><|fim▁begin|>import {Datum} from "../ast/datum";
import {
ASSIGNMENT,
CONDITIONAL,
DEFINITION,
FORMALS,
LAMBDA_EXPRESSION,
MACRO_BLOCK,
Nonterminal,
PATTERN,
PATTERN_DATUM,
PATTERN_IDENTIFIER,
PROCEDURE_CALL,
PROGRAM,
QUASIQUOTATION,
QUOTATION,
S... | '()))', |
<|file_name|>0018_auto_20161212_0725.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-12-12 13:25
from __future__ import unicode_literals
from django.db import migrations
from django.utils.text import slugify<|fim▁hole|>
def create_slugs(apps, schema_editor):
Value = app... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.generic import ListView, TemplateView<|fim▁hole|>
class IndexView(TemplateView):
template_name = 'index.html'<|fim▁end|> | |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import npyscreen
import os
import re
import sys
import time
from docker.errors import DockerException
from npyscreen import notify_confirm
from threading import Thread
from vent.api.actions import Action
from vent.api.menu_helpers import MenuHelper
from vent.helpers.m... | forms = ['LOGS']
form_args = {'color': "STANDOUT", 'name': "Logs"} |
<|file_name|>vertex_buffer.hpp<|end_file_name|><|fim▁begin|>#pragma once
<|fim▁hole|>#include <r4/vector.hpp>
#include <morda/render/vertex_buffer.hpp>
#include "opengl_buffer.hpp"
namespace morda{ namespace render_opengl2{
class vertex_buffer : public morda::vertex_buffer, public opengl_buffer{
public:
const GLin... | #include <utki/span.hpp>
|
<|file_name|>device.rs<|end_file_name|><|fim▁begin|>use std::str;
use std::ffi::{CStr, OsStr};
use std::marker::PhantomData;
use std::path::Path;
use std::str::FromStr;
use libc::{c_char, dev_t};
use ::context::Context;
use ::handle::Handle;
pub unsafe fn from_raw(device: *mut ::ffi::udev_device) -> Device {
:... | }
else {
None |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 Tigera, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/lice... | // http://127.0.0.1:2379. For alternative backend access details, set the appropriate
// ENV variables specified in the CalicoAPIConfigSpec structure.
client, err := client.NewFromEnv() |
<|file_name|>tables.go<|end_file_name|><|fim▁begin|>/*
Copyright 2016 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0... | "tools": true,
"to_start_extensions": true,
"visibility": true, |
<|file_name|>poly.rs<|end_file_name|><|fim▁begin|>use data::IntPoint;
use draw::RGB;
#[derive(Debug, Clone)]
pub struct Poly {
pub contours: Vec<Vec<IntPoint>>,
pub color: RGB,
}
impl Poly {
#[inline]
pub fn new(contours: Vec<Vec<IntPoint>>, color: RGB) -> Self {
Poly {
contours: contours,<... | |
<|file_name|>SessionsInvalidationTestGenerated.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.... | |
<|file_name|>dfg-compare-final-object-to-final-object-or-other-when-proven-final-object.js<|end_file_name|><|fim▁begin|>description(
"Tests that the CompareEq optimization for the case where one side is predicted final object and the other side is predicted either final object or other (i.e. null or undefined) doesn't ... | shouldBe("foo(o, o)", "[42, true]"); |
<|file_name|>Student.java<|end_file_name|><|fim▁begin|>/**
* Created by txs on 2016/10/17.
*/
public class Student {
String name;
int grade;
@Override
public String toString() {
String temp = "";
temp += "name: " + name + "\n";
temp += "grade: " + grade + "\n";
return ... | |
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Tests flow of API keys',
'category': 'Tools',<|fim▁hole|><|fim▁end|> | 'depends': ['web_tour'],
'data': ['views/assets.xml'],
} |
<|file_name|>issue-16441.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http... | //
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from django.conf.urls import include, url
from tastypie.api import Api
from locations.api import v1, v2
from locations.api.sword import views
v1_api = Api(api_name="v1")
v1_api.register(v1.SpaceResource())
v1_api.register(v1.Loca... | v1_api.register(v1.PipelineResource())
v1_api.register(v1.AsyncResource())
v2_api = Api(api_name="v2") |
<|file_name|>x86_64.js<|end_file_name|><|fim▁begin|><|fim▁hole|> "r15": "int64",
"r14": "int64",
"r13": "int64",
"r12": "int64",
"rbp": "int64",
"rbx": "int64",
"r11": "int64",
"r10": "int64",
"r9": "int64",
"r8": "int64",
"rax": "int64",
"rcx": "int64",
"rdx": "int64",
"rsi": "int64",
"rdi... | import Struct from "ref-struct-napi";
const Registers = Struct({ |
<|file_name|>style_format.py<|end_file_name|><|fim▁begin|># Copyright 2019 The Chromium 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.path
import subprocess
import sys
_enable_style_format = None
_clang_format_command_path... | |
<|file_name|>MainTest.java<|end_file_name|><|fim▁begin|>/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the... | // lets make a simple route |
<|file_name|>dht_bencode.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-
def decode(data):
try:
value, idx = __decode(data, 0)
retval = (True, value)
except Exception as e:
retval = (False, e.message)
finally:
return retval
def encode(data):
try:
value ... | value = __encode_dict(data)
elif isinstance(data, list): |
<|file_name|>gzip.hpp<|end_file_name|><|fim▁begin|>// (C) Copyright Jonathan Turkanis 2003.
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
// See http://www.boost.org/libs/iostreams for documentation.
// C... | using namespace std;
|
<|file_name|>multiple_files.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/... |
for _ in range(0, 100) {
{ |
<|file_name|>test_corpora_dictionary.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Unit tests for the `corpora.Dictionary` class.
"""
from collections import Mapping
import logging
import unittest
import ... | self.assertEqual(d.doc2bow([u'\u017elu\u0165ou\u010dk\xfd']), [(0, 1)])
def test_saveAsText(self):
"""`Dictionary` can be saved as textfile. """ |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""anagram_solver.__main__: executed when directory is called as script."""
from .anagram_solver import main
<|fim▁hole|><|fim▁end|> | main() |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>"""
Setup Module
This module is used to make a distribution of
the game using distutils.
"""
from distutils.core import setup
setup(
name = 'Breakout',
version = '1.0',
description = 'A remake of the classic video game',
... | 'Intended Audience :: Education',
'License :: OSI Approved :: GNU General Public License (GPL)', |
<|file_name|>test_page.py<|end_file_name|><|fim▁begin|>import fbchat
from fbchat import PageData
<|fim▁hole|> "id": "123456",
"name": "Some school",
"profile_picture": {"uri": "https://scontent-arn2-1.xx.fbcdn.net/v/..."},
"url": "https://www.facebook.com/some-school/",
"category... | def test_page_from_graphql(session):
data = { |
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>/*
*
* HomeItemPage constants<|fim▁hole|>export const DEFAULT_ACTION = 'app/HomeItemPage/DEFAULT_ACTION';<|fim▁end|> | *
*/
|
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import { Zerotorescue } from 'CONTRIBUTORS';
import NewsRegularArticle from 'interface/NewsRegularArticle';
import React from 'react';
export const title = 'A note about unlisted logs';
export default (
<NewsRegularArticle title={title} publishedAt="2017-01-31" pu... | either be unlisted or public if you want to analyze them. If your guild has private logs you
will have to <a href="https://www.warcraftlogs.com/help/start/">upload your own logs</a> or |
<|file_name|>makerTemplateViewBuilder.py<|end_file_name|><|fim▁begin|>from makerUtilities import writeFile
from makerUtilities import readFile
import os
def scaffold(systemDir, defaultTheme):
return (
"""<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src='file://"""<|fim... | |
<|file_name|>cli.rs<|end_file_name|><|fim▁begin|>use clap;
use clap::{App, Arg, Error, SubCommand};
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};
use std::str::FromStr;
use std::{ffi::OsString, path::PathBuf};
#[derive(Debug, Clone)]
pub struct Server {
pub bind_addr: String,
pub port: u16,
pub key: String,
... | .unwrap();
let port_str = matches |
<|file_name|>cstring.rs<|end_file_name|><|fim▁begin|>use libc::c_char;
use std::ffi::CStr;
use std::str::Utf8Error;
use std::ffi::CString;
pub struct CStringUtils {}
impl CStringUtils {
pub fn c_str_to_string(cstr: *const c_char) -> Result<Option<String>, Utf8Error> {
if cstr.is_null() {
retu... | }
}
pub fn string_to_cstring(s: String) -> CString { |
<|file_name|>Sector.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2014 Wouter Pinnoo
*
* 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... | public Sector(AreaType type, String code) {
this.type = type;
this.code = code; |
<|file_name|>serviceworkerglobalscope.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use devtools;
use devtools_traits::DevtoolSc... |
#[allow(unsafe_code)]
pub fn new(init: WorkerGlobalScopeInit,
worker_url: ServoUrl, |
<|file_name|>api.hpp<|end_file_name|><|fim▁begin|>#pragma once
#include "base/worker_thread.hpp"<|fim▁hole|>#include "ugc/types.hpp"
#include <functional>
class Index;
struct FeatureID;
namespace ugc
{
class Api
{
public:
using UGCCallback = std::function<void(UGC const &)>;
using UGCUpdateCallback = std::funct... |
#include "ugc/storage.hpp" |
<|file_name|>random_primitive_float_range.rs<|end_file_name|><|fim▁begin|>use itertools::Itertools;
use malachite_base::num::basic::floats::PrimitiveFloat;
use malachite_base::num::float::NiceFloat;
use malachite_base::num::random::random_primitive_float_range;
use malachite_base::random::EXAMPLE_SEED;
use malachite_ba... | skewness: NiceFloat(-0.003221278138738849),
excess_kurtosis: NiceFloat(-1.2016989304148467),
};
random_primitive_float_range_helper::<f32>( |
<|file_name|>service.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package personalize
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
"gi... |
// Run custom request initialization if present
if initRequest != nil { |
<|file_name|>cp437.py<|end_file_name|><|fim▁begin|>""" Python Character Mapping Codec cp437 generated from 'VENDORS/MICSFT/PC/CP437.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,enco... | '\xe8' # 0x008a -> LATIN SMALL LETTER E WITH GRAVE
'\xef' # 0x008b -> LATIN SMALL LETTER I WITH DIAERESIS |
<|file_name|>second.py<|end_file_name|><|fim▁begin|>from flask import Flask
from flask.ext.admin import Admin, BaseView, expose<|fim▁hole|>
class MyView(BaseView):
@expose('/')
def index(self):
return self.render('index.html')
app = Flask(__name__)
admin = Admin(app)
admin.add_view(MyView(name='Hello... | |
<|file_name|>basic_socket.hpp<|end_file_name|><|fim▁begin|>//
// basic_socket.hpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.o... | * @par Example
* Getting the value of the SOL_SOCKET/SO_KEEPALIVE option:
* @code |
<|file_name|>Router.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2015-present, Pavel Aksonov
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import React, {
Component,
PropTypes,
} from 'rea... |
const propTypes = {
dispatch: PropTypes.func, |
<|file_name|>git.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*-
# Copyright (C) 2007, 2009, 2011-2012 J. David Ibáñez <jdavid.ibp@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 Founda... | for key in removed:
if not key.endswith('metadata') or TEST_DB_WITHOUT_COMMITS: |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-08-01 07:59
from __future__ import unicode_literals
<|fim▁hole|>from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import proso.django.models
cl... | import datetime |
<|file_name|>VariantStoreVariant.java<|end_file_name|><|fim▁begin|>/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License a... | |
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import aaargh
from app import Negi
app = aaargh.App(description="Jinja2+JSON powered static HTML build tool")<|fim▁hole|>
@app.cmd(help='Parse JSON and build HTML')
@app.cmd_arg('-d','--data_dir',default='./data',help='JSON data dirctory(defaul... | |
<|file_name|>storage_management_client.py<|end_file_name|><|fim▁begin|># coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# ---... | |
<|file_name|>unreachable_asm_2.rs<|end_file_name|><|fim▁begin|>#![feature(llvm_asm)]
enum Empty {}
fn empty() -> Option<Empty> {
None
}
// EMIT_MIR unreachable_asm_2.main.UnreachablePropagation.diff
fn main() {
if let Some(_x) = empty() {
let mut _y;
if true {
// asm instruction ... | // asm instruction stops unreachable propagation to block bb3.
unsafe { llvm_asm!("NOP"); }
_y = 42;
} |
<|file_name|>process_message.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|>use types::cef_string_t;
cef_stub_static_method_impls! {
fn cef_process_message_create(name: *const cef_string_t) -> *mut cef_process_message_t;
}<|fim▁end|> | * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use interfaces::cef_process_message_t; |
<|file_name|>empty.py<|end_file_name|><|fim▁begin|># vim:ts=4:et
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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
# of the License, or... | if not obj.parent:
return True
return obj.parent.name not in objects
|
<|file_name|>registry.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2014, 2015 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 the Free Software Foundation... | ModuleAutoDiscoveryRegistry,
PkgResourcesDirDiscoveryRegistry,
RegistryProxy, |
<|file_name|>Consumer.java<|end_file_name|><|fim▁begin|>package com.salesforce.dva.argus.service.mq.kafka;
import com.fasterxml.jackson.databind.JavaType;
<|fim▁hole|>import java.io.Serializable;
import java.util.List;
public interface Consumer {
<T extends Serializable> List<T> dequeueFromBuffer(String topic, Cl... | |
<|file_name|>test_sns_operations.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2013 Amazon.com, Inc. or its affiliates. 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 d... | self.assertEqual(kwargs['operation'], op)
self.assertEqual(kwargs['endpoint'], endpoint)
self.assertEqual(kwargs['params']['TopicArn'], 'topic_arn') |
<|file_name|>misc_test.go<|end_file_name|><|fim▁begin|>package gofakeit
import (
"fmt"
"reflect"
"sort"
"testing"
"github.com/brianvoe/gofakeit/v6/data"
)
func ExampleBool() {
Seed(11)
fmt.Println(Bool())
// Output: true
}
func ExampleFaker_Bool() {
f := New(11)
fmt.Println(f.Bool())
// Output: true
}
f... | |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>const LdapStrategy = require('./LdapStrategy');
const MoodleStrategy = require('./MoodleStrategy');
const IservStrategy = require('./IservStrategy');
const TSPStrategy = require('./TSPStrategy');
const ApiKeyStrategy = require('./ApiKeyStrategy');
module.exports = {
... | }; |
<|file_name|>messagehandler.py<|end_file_name|><|fim▁begin|>from functions import logger, config
import asyncio
class MessageHandler:
def __init__(self, client, message, command, args):
''' Create a new messagehandler which handles the required parts for the commands.
disabling this module will fuc... | An messageobject if the message has been sent, None otherwise.'''
message = None
text = str(text) |
<|file_name|>burst_tagger_cc_base.cpp<|end_file_name|><|fim▁begin|>/*
* This file is protected by Copyright. Please refer to the COPYRIGHT file
* distributed with this source distribution.
*
* This file is part of GNUHAWK.
*
* GNUHAWK is free software: you can redistribute it and/or modify is under the
* term... | return ((n + multiple - 1) / multiple) * multiple;
}
|
<|file_name|>borrowck-loan-of-static-data-issue-27616.rs<|end_file_name|><|fim▁begin|>use std::mem;<|fim▁hole|> let inner = &mut *b as *mut _;
mem::forget(b);
unsafe { &mut *inner }
}
fn evil(mut s: &'static mut String)
{
// create alias
let alias: &'static mut String = s;
let inner: &str = &ali... |
fn leak<T>(mut b: Box<T>) -> &'static mut T {
// isn't this supposed to be safe? |
<|file_name|>gitrepository.cpp<|end_file_name|><|fim▁begin|>#include "gitrepository.h"
#include <qtcacheexception.h>
#include <git2.h>
inline void git_eval(int err){
if (err) {
const git_error* err = giterr_last();
throw QtC::QtCacheException(err->message);
}
}
template<typename T> ... | |
<|file_name|>column.mako.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/. */
<%namespace name="helpers" file="/helpers.mako.rs" />
<%... | BorderWidth::Medium |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import './accounts-config.js';
import './i18n.js';<|fim▁hole|><|fim▁end|> | import './routes.js';
import '../../ui/iso3d/phaser-plugin-isometric.min.js'; |
<|file_name|>Binding.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the KDE project
Copyright 2007 Stefan Nikolaus <stefan.nikolaus@kdemail.net>
Copyright (C) 2008 Thomas Zander <zander@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Li... | |
<|file_name|>mul_add.rs<|end_file_name|><|fim▁begin|>//! Implements vertical (lane-wise) floating-point `mul_add`.
macro_rules! impl_math_float_mul_add {
([$elem_ty:ident; $elem_count:expr]: $id:ident | $test_tt:tt) => {
impl $id {
/// Fused multiply add: `self * y + z`
#[inline]
... |
assert_eq!(t, o.mul_add(o, o));
assert_eq!(t, o.mul_add(t, z)); |
<|file_name|>format.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | Wrap `file` in a "real" so stuff can be added to it after creation.
"""
|
<|file_name|>tls.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate log;
extern crate env_logger;
extern crate futures;
extern crate lapin_futures as lapin;
extern crate rustls;<|fim▁hole|>extern crate tokio_core;
extern crate tokio_rustls;
extern crate webpki_roots;
use futures::future::Future;
use lapin::clie... | |
<|file_name|>wmb.comment.js<|end_file_name|><|fim▁begin|>/**************************************************
* Funkcje związane z geolokalizacją GPS
**************************************************/
WMB.Comment = {
/**
* Funkcja dodająca nowy komentarz do zgłoszenia
*
* @method onAddSubmit
*/
onAddSubmit: funct... | window.location.href = WEBSITE_URL + 'comments'; |
<|file_name|>line.js<|end_file_name|><|fim▁begin|>uv.LineGraph = function (graphdef, config) {
var self = this;
uv.Graph.call(self, graphdef, config).setDefaults().init();
self.linegroups = {};
self.dataset = uv.util.getDataArray(self.graphdef);
var linegroup, linepath, linefunc, idx, len = self.categories.... | |
<|file_name|>task.go<|end_file_name|><|fim▁begin|>// Copyright 2018 The OpenPitrix Authors. All rights reserved.
// Use of this source code is governed by a Apache license
// that can be found in the LICENSE file.
package models
import (
"time"
"openpitrix.io/openpitrix/pkg/constants"
"openpitrix.io/openpitrix/pk... | }
|
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse
from django.utils import unittest
from django.test.client import Client
from postleware import PostResponseCachebusterMiddleware
class PostResponseMiddleware(unittest.TestCase):
def setUp(self):
self.client = Client()
... | self.method = method |
<|file_name|>iam.go<|end_file_name|><|fim▁begin|>package iam
import (<|fim▁hole|> // "github.com/quintilesims/layer0/api/config"
"strings"
"github.com/quintilesims/layer0/common/aws/provider"
)
type Provider interface {
UploadServerCertificate(string, string, string, string, *string) (*ServerCertificateMetadata, ... | "fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/iam" |
<|file_name|>rest_providers.py<|end_file_name|><|fim▁begin|># Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... | score['weight'] * score['score'])
ranked_students = {kv[0]: rank for rank, kv in |
<|file_name|>OrderedMap-test.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2013-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in t... | |
<|file_name|>luiza.py<|end_file_name|><|fim▁begin|>import asyncio
import sys
import config
import sender
import receiver
print(sys.argv)<|fim▁hole|>
async def receiveMessageFromSerial():
return "Message"
def help():
print('Luiza 1.0 - (luiza.santost@hotmail.com)')
print('Usage: python3 app.py [Options][Me... | |
<|file_name|>script_msg.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use canvas_traits::CanvasMsg;
use euclid::point::Point2D;
... | use msg::constellation_msg::{Failure, MozBrowserEvent, PipelineId};
use msg::constellation_msg::{LoadData, SubpageId};
use msg::constellation_msg::{MouseButton, MouseEventType};
use offscreen_gl_context::GLContextAttributes; |
<|file_name|>editor.js<|end_file_name|><|fim▁begin|>(function(customer_id) {
tinymce.create('tinymce.plugins.ItStream_AttachToPost', {
customer_id: customer_id,
init : function(editor, plugin_url) {
editor.addButton('player_scheduling', {
title : 'Embed ItStream Pl... | var winHeight = win.height();
|
<|file_name|>color.js<|end_file_name|><|fim▁begin|>/**
Copyright (c) 2007 Bill Orcutt (http://lilyapp.org, http://publicbeta.cx)
Permission is hereby granted, free of charge, to any person obtaining<|fim▁hole|>distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is f... | a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish, |
<|file_name|>MathTools.H<|end_file_name|><|fim▁begin|>#ifndef ATOOLS_Math_MathTools_H
#define ATOOLS_Math_MathTools_H
/* Declarations for discrete functions */
#ifdef __GNUC__
// GNU C++ Compiler
#include <cmath>
#include <cstdlib>
/*
if __GNUC__ == 3 && __GNUC_MINOR__ == 0.
if defined __GNUC__ &... | } |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | //! Mathematical helper functions and types.
pub mod nq;
pub mod utils; |
<|file_name|>rt_gen.go<|end_file_name|><|fim▁begin|>package btree
// NOTE: THIS FILE WAS PRODUCED BY THE
// MSGP CODE GENERATION TOOL (github.com/tinylib/msgp)
// DO NOT EDIT
import (
"github.com/tinylib/msgp/msgp"
)
// MarshalMsg implements msgp.Marshaler
func (z *Tr) MarshalMsg(b []byte) (o []byte, err error) {
... | for isz > 0 { |
<|file_name|>sidebar-items.js<|end_file_name|><|fim▁begin|><|fim▁hole|>initSidebarItems({"mod":[["big5","Big5 and HKSCS."]]});<|fim▁end|> | |
<|file_name|>UserTest.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Adam Schubert <adam.schubert@sg1-game.net>
#
# 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 Li... | #delete
userData = self.user.token({'password': params['password'], 'username': params['username']}) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.