prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>maintenanceconfigurations.go<|end_file_name|><|fim▁begin|>package containerservice
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// ... | return
}
|
<|file_name|>code.py<|end_file_name|><|fim▁begin|><|fim▁hole|> print "Reach for the sky but don't burn your wings!"# this will make it much easier in future problems to see that something is actually happening<|fim▁end|> | def Woody():
# complete |
<|file_name|>FilePicker.js.uncompressed.js<|end_file_name|><|fim▁begin|>define(
"dojox/widget/nls/he/FilePicker", ({
name: "שם",
<|fim▁hole|> path: "נתיב",
size: "גודל (בבתים)"
})
);<|fim▁end|> | |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package sqs provides the client and types for making API
// requests to Amazon Simple Queue Service.
//
// Welcome to the Amazon Simple Queue Service API Reference.
//
// Amazon Simple Queue Service... | //
// See https://docs.aws.amazon.com/goto/WebAPI/sqs-2012-11-05 for more information on this service.
// |
<|file_name|>MulticastGroup.cpp<|end_file_name|><|fim▁begin|>/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/iotwireless/model/MulticastGroup.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws:... | namespace IoTWireless
{ |
<|file_name|>dump_csv.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/licens... | for &(id, ref path, ref_kind) in &paths_to_process {
self.process_path(id, path.span, path, ref_kind); |
<|file_name|>Layer.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2010 The Android Open Source Project
*
* 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... |
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
glDisable(GL_BLEND); |
<|file_name|>robot.rs<|end_file_name|><|fim▁begin|>use wpilib::wpilib_hal::*;
/// The base class from which all robots should be derived.
///
/// # Usage
///
/// ```
/// struct TestRobot {};
///
/// impl Robot for TestRobot {
/// fn new() -> TestRobot {
/// TestRobot{}
/// }
///
/// fn run(self) {
... | // Initialize HAL
unsafe { |
<|file_name|>metainfo_movie.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import
import logging
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from flexget import plugin
from flexget.event import event
try:
# NOTE: Importing other plu... | plugin.register(MetainfoMovie, 'metainfo_movie', api_ver=2) |
<|file_name|>metadata.rs<|end_file_name|><|fim▁begin|>use ape;
use id3;
use lewton::inside_ogg::OggStreamReader;
use metaflac;
use mp3_duration;
use regex::Regex;
use std::fs;
use std::path::Path;
use errors::*;
use utils;
use utils::AudioFormat;
#[derive(Debug, Clone, PartialEq)]
pub struct SongTags {
pub disc_numb... | let tag = metaflac::Tag::read_from_path(path)?;
let vorbis = tag.vorbis_comments().ok_or("Missing Vorbis comments")?;
let disc_number = vorbis |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | # w/ client side download when applicable |
<|file_name|>credentials.go<|end_file_name|><|fim▁begin|>package awsutil
import (
"fmt"
"os"
"sort"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/arn"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sts"
"path"
)
type sessionResult struct {
accountName string
acc... | } else {
accountId = arnV.AccountID |
<|file_name|>issue-64559.rs<|end_file_name|><|fim▁begin|>fn main() {
let orig = vec![true];
for _val in orig {}
let _closure = || orig;<|fim▁hole|><|fim▁end|> | //~^ ERROR use of moved value: `orig`
} |
<|file_name|>color.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 azure::AzFloat;
use azure::azure::AzColor;
#[inline]<|fim▁... | |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (... |
def get_events_backend(path:str=None, options:dict=None): |
<|file_name|>regular-modules.rs<|end_file_name|><|fim▁begin|>// We specify -C incremental here because we want to test the partitioning for
// incremental compilation
// compile-flags:-Zprint-mono-items=eager -Cincremental=tmp/partitioning-tests/regular-modules
#![allow(dead_code)]
#![crate_type="lib"]<|fim▁hole|>
//~... |
//~ MONO_ITEM fn foo @@ regular_modules[Internal]
fn foo() {} |
<|file_name|>Box.stories.tsx<|end_file_name|><|fim▁begin|>/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import { storiesOf } from '@storybook/react-native';<|fim▁hole|>
import CenteredContent from '$shared/CenteredContent';
import { Box } from '$shared/primitives';
storiesOf('Box',... | |
<|file_name|>0002_auto_20170919_0319.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-09-19 03:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion<|fim▁hole|>
class Migration(migrations.Migration):
depend... | |
<|file_name|>qt.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
#! This file is a literate Python program. You can compile the documentation
#! using mylit (http://pypi.python.org/pypi/mylit/).
## title = "glitter Example: Qt"
## stylesheet = "pygments_style.css"
# <h1><i>glitter... | # OpenGL rendering in Qt is through an OpenGL widget. Instead of subclassing
# <code>QGLWidget</code> directly, we inherit from <i>glitter</i>'s
# <code>QtWidget</code> which acts as a <i>glitter</i> <code>Context</code>. |
<|file_name|>CursorUtils.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2013 nohana, 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.a... | }
|
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup, Extension, Command
from distutils.command.build import build
from distutils.command.build_ext import build_ext
from distutils.command.config import config
from distutils.msvccompiler import MSVCCompiler
from distutils import sysconfig
... | author = "Gordon McMillan / Jean-Claude Wippler", |
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>use std::{
borrow::Cow,
collections::HashMap,
};
use parse_wiki_text::Node;
use crate::{Parameters, OtherTemplate};
// Why? Because MediaWiki (and thus Wikipedia) titles are case-sensitive in all
// but the first character.
pub fn uppercase_first_letter(str... | |
<|file_name|>reporter.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 cssparser::{Parser, SourcePosition};
use log;
use style_... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -*
# Copyright (c) 2012 NOEL-BARON Léo
# 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 source code... | prototypes = [p for p in prototypes if p.est_de_type("combustible")]
combustibles = []
choix = None
for proto in prototypes: |
<|file_name|>exsample.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
import subprocess
import os
from pathlib import Path
cwd = os.getcwd()<|fim▁hole|> subprocess.call(['make'])
# res = subprocess.check_output('uname -a',shell=True)
res = subprocess.check_output(
r"./darknet detector test c... | try:
print(os.getcwd()) |
<|file_name|>deglitch.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Deglitch utilities
=====================
"""
import numpy as np
import logging
_logger = logging.getLogger("sloth.math.deglitch")
def remove_spikes_medfilt1d(y_spiky, backend="silx", kernel_size=3, threshold=0.1... | _logger.warning("'kernel_size' must be odd -> adjusted to %d", kernel_size) |
<|file_name|>bundle.js<|end_file_name|><|fim▁begin|>const c = require('ansi-colors')
const glob = require('glob')
const path = require('path')
const terserVersion = require('terser/package.json').version
const TerserWebpackPlugin = require('terser-webpack-plugin')
const webpack = require('webpack')
const BundleAnalyzer... | ], |
<|file_name|>temp_test_ortho.py<|end_file_name|><|fim▁begin|>import rppy
import numpy as np
import matplotlib.pyplot as plt
vp1 = 3000
vs1 = 1500
p1 = 2000
e1_1 = 0.0
d1_1 = 0.0
y1_1 = 0.0
e2_1 = 0.0
d2_1 = 0.0
y2_1 = 0.0<|fim▁hole|>C1 = rppy.reflectivity.Cij(vp1, vs1, p1, e1_1, d1_1, y1_1, e2_1, d2_1, y2_1, d3_1)
vp... | d3_1 = 0.0
chi1 = 0.0 |
<|file_name|>fetcher_test.go<|end_file_name|><|fim▁begin|>// Copyright 2021 The LUCI 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/LIC... | ctx := context.Background()
f := fetcher{
change: 111,
host: "host", |
<|file_name|>EndpointIdIsRandomExpectTest.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 fi... | |
<|file_name|>subdomains.controller.js<|end_file_name|><|fim▁begin|>/* global _, angular */
angular.module('bidos')
.controller('Subdomains', Subdomains);
function Subdomains(Resources, $scope, $state) {
Resources.get().then(function(data) {
$scope.subdomains = _.filter(data.subdomains, {domain_id: parseInt($sta... | });
$scope.select = function (subdomain) {
$state.go('bidos.domains.subdomains.items', {subdomainId: parseInt(subdomain.id)}); |
<|file_name|>tldMap.service.js<|end_file_name|><|fim▁begin|>(function() {
'use strict';
angular
.module('tiny-leaflet-directive')
.factory('tldMapService', tldMapService);
tldMapService.$inject = ['tldHelpers'];
function tldMapService(tldHelpers) {
var maps = {};
retu... | defer.resolve(leafletMap);
tldHelpers.setResolvedDefer(maps, mapId); |
<|file_name|>test_deprecated.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import warnings
from builtin... | pass
def test_removal_version_non_dev(self):
with self.assertRaises(NonDevSemanticVersionError): |
<|file_name|>rand.cc<|end_file_name|><|fim▁begin|><|fim▁hole|> *
* This file is part of M3 (Microkernel-based SysteM for Heterogeneous Manycores).
*
* M3 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foun... | /*
* Copyright (C) 2016-2018, Nils Asmussen <nils@os.inf.tu-dresden.de>
* Economic rights: Technische Universitaet Dresden (Germany) |
<|file_name|>0006_auto_20160615_1321.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-15 20:21
from __future__ import unicode_literals
from django.db import migrations, models
import posts.models<|fim▁hole|>
dependencies = [
('posts', '0005_auto_20160615_1249')... |
class Migration(migrations.Migration): |
<|file_name|>_cusum.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
""" Methods for estimating structural breaks in time series regressions
TODO: extract and move Chow test from "commission test" over to here
"""
from __future__ import division
from collections import namedtuple
import logging
import numpy a... | x = x[1:]
j = np.linspace(0, 1, x.size + 1)[1:] |
<|file_name|>nat_monitor_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
import unittest
from unittest.mock import MagicMock
import logging
import nat_monitor
import utils
class NatInstanceTest(unittest.TestCase):
def setUp(self):
self.vpc_conn = MagicMock()
self.ec2_conn = MagicMock()... | def test_disable_source_dest_check(self):
self.nat_instance.disable_source_dest_check()
self.ec2_conn.modify_instance_attribute.assert_called_with(
self.instance_id, 'sourceDestCheck', False) |
<|file_name|>network.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
MicroSAN Network Module
"""
import socket, traceback
IPADDR_BROADCAST = '<broadcast>'
IPADDR_ANY = ''
SOCK_BUF_SIZE = 8192
SOCK_TIMEOUT = 1
MICROSAN_PORT = 20001
APP_PORT = 51000
class UDPSocket(object):
def __init__(self, addr =... | |
<|file_name|>structarm__dct4__instance__q31.js<|end_file_name|><|fim▁begin|>var structarm__dct4__instance__q31 =
[
[ "N", "structarm__dct4__instance__q31.html#a46a9f136457350676e2bfd3768ff9d6d", null ],
<|fim▁hole|> [ "Nby2", "structarm__dct4__instance__q31.html#a32d3268ba4629908dba056599f0a904d", null ],
... | |
<|file_name|>test_cryotank.py<|end_file_name|><|fim▁begin|>import synapse.common as s_common
import synapse.cryotank as s_cryotank
import synapse.lib.const as s_const
import synapse.tests.utils as s_t_utils
from synapse.tests.utils import alist
logger = s_cryotank.logger
cryodata = (('foo', {'bar': 10}), ('baz', {'... |
self.len(4, await alist(lprox.slice(0, 9999)))
|
<|file_name|>mod.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/LI... | #[inline] |
<|file_name|>mips.rs<|end_file_name|><|fim▁begin|>pub type c_char = i8;
pub type c_long = i32;
pub type c_ulong = u32;
pub type size_t = u32;
pub type ptrdiff_t = i32;
pub type clock_t = i32;
pub type time_t = i32;
pub type suseconds_t = i32;
pub type wchar_t = i32;
pub type intptr_t = i32;
pub type uintptr_t = u32;
pu... | pub const SA_ONSTACK: ::c_ulong = 0x08000000;
pub const SA_SIGINFO: ::c_ulong = 0x00000008; |
<|file_name|>bitcoin_el_GR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Wabcoin</sourc... | <source>Invalid -tor address: '%s'</source>
<translation>Δεν είναι έγκυρη η διεύθυνση διαμεσολαβητή: '%s'</translation> |
<|file_name|>CallNodeContextMenu.test.js<|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/. */
// @flow
import * as React from 'react';
imp... | expect(container.firstChild).toMatchSnapshot();
});
});
|
<|file_name|>mdl-table.component.ts<|end_file_name|><|fim▁begin|>import {
Component,
EventEmitter,
Input,
Output,
ViewEncapsulation,
} from "@angular/core";
export interface IMdlTableColumn {
key: string;
name: string;
numeric?: boolean;
}
export interface IMdlTableModelItem {
selected: boolean;
}
... | |
<|file_name|>mandelbrot_set.py<|end_file_name|><|fim▁begin|>import numpy as np
import moderngl
from ported._example import Example
class Fractal(Example):
title = "Mandelbrot"
gl_version = (3, 3)
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.prog = self.ctx.program(
... | fragment_shader='''
#version 330 |
<|file_name|>neproblem.rs<|end_file_name|><|fim▁begin|>use rand;
use rand::{Rng, StdRng, SeedableRng};
use ea::*;
use neuro::{ActivationFunctionType, MultilayeredNetwork, NeuralArchitecture, NeuralNetwork};
use problem::*;
//--------------------------------------------
/// Trait for problem where NN is a solution.
... | let x = rand_vector_std_gauss(input_size, &mut rng);
let y = net.compute(&x);
ys.push(y);
} |
<|file_name|>look_feel_ui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/yc/code/calibre/calibre/src/calibre/gui2/preferences/look_feel.ui'
#
# Created: Thu Oct 25 16:54:55 2012
# by: PyQt4 UI code generator 4.8.5
#
# WARNING! All changes made i... | self.opt_use_roman_numerals_for_series_number.setText(_("Use &Roman numerals for series"))
self.opt_use_roman_numerals_for_series_number.setChecked(True) |
<|file_name|>memory.go<|end_file_name|><|fim▁begin|>package storage
import (
"crypto/sha256"
"encoding/hex"
"fmt"
"sort"
"strconv"
"strings"
"sync"
"time"
"github.com/docker/notary/tuf/data"
)
type key struct {
algorithm string
public []byte
}
type ver struct {
version int
data []byte
... | |
<|file_name|>wwan_status.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Display current network and ip address for newer Huwei modems.
It is tested for Huawei E3276 (usb-id 12d1:1506) aka Telekom Speed
Stick LTE III but may work on other devices, too.
DEPENDENCIES:
- netifaces
- pyserial
Configu... | |
<|file_name|>log.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
""" Log Config
"""
__author__ = 'Zagfai'
__date__ = '2018-06'
<|fim▁hole|>
SANIC_LOGGING_CONFIG = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'default': {
'format':
... | |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2020, Met Office
#
# This file is part of cartopy.
#
# cartopy 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|>blame.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tga... | |
<|file_name|>climate.py<|end_file_name|><|fim▁begin|>"""MySensors platform that offers a Climate (MySensors-HVAC) component."""
from homeassistant.components import mysensors
from homeassistant.components.climate import ClimateDevice
from homeassistant.components.climate.const import (
ATTR_TARGET_TEMP_HIGH, ATTR_T... | |
<|file_name|>test_0050_general.js<|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/.
*/
/* General nsIUpdateCheckListener onload and onerr... | // connection refused - NS_ERROR_CONNECTION_REFUSED (2152398861) |
<|file_name|>datasets.py<|end_file_name|><|fim▁begin|>""" Simple datasets to be used for unit tests. """
__authors__ = "Ian Goodfellow"
__copyright__ = "Copyright 2010-2012, Universite de Montreal"
__credits__ = ["Ian Goodfellow"]
__license__ = "3-clause BSD"
__maintainer__ = "LISA Lab"
__email__ = "pylearn-dev@googleg... |
Parameters |
<|file_name|>all.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = {
app: {
title: 'Surf Around The Corner',
description: 'Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js',
keywords: 'MongoDB, Express, AngularJS, Node.js'
},
port: process.env.PORT || 3000,
templateEngine: 'sw... | 'http://fonts.googleapis.com/css?family=Playfair+Display',
'http://fonts.googleapis.com/css?family=Dancing+Script', |
<|file_name|>datadirsetup.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The rkt 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/LICENS... | |
<|file_name|>conversion_generated.go<|end_file_name|><|fim▁begin|>/*
Copyright 2015 The Kubernetes 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... | }
out.ClaimName = in.ClaimName
out.ReadOnly = in.ReadOnly
return nil |
<|file_name|>flags.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 base::prelude::*;
use core::ops::{BitOr, Not, BitAnd};
use fmt... | |
<|file_name|>spec_version.py<|end_file_name|><|fim▁begin|># ~autogen spec_version
spec_version = "spec: 0.9.3-pre-r2, kernel: v3.16.7-ckt16-7-ev3dev-ev3"<|fim▁hole|># ~autogen<|fim▁end|> | |
<|file_name|>trait-bounds-on-structs-and-enums-static.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... |
struct Foo<T:Trait> { |
<|file_name|>holder.js<|end_file_name|><|fim▁begin|><|fim▁hole|>version https://git-lfs.github.com/spec/v1
oid sha256:641860132ccb9772e708b19feb3d59bb6291f6c40eebbfcfa0982a4e8eeda219
size 69639<|fim▁end|> | |
<|file_name|>definitions.cpp<|end_file_name|><|fim▁begin|>#include "definitions.h"
CustomWeakForm::CustomWeakForm(std::vector<std::string> newton_boundaries, double heatcap, double rho, double tau,
double lambda, double alpha, double temp_ext, MeshFunctionSharedPtr<double> sln_prev_time, bool JFNK) : WeakForm<double... | {
this->set_ext(sln_prev_time);
// Jacobian forms - volumetric. |
<|file_name|>envsuite.go<|end_file_name|><|fim▁begin|>package envsuite
// Provides an EnvSuite type which makes sure this test suite gets an isolated
// environment settings. Settings will be saved on start and then cleared, and
// reset on tear down.
import (
. "launchpad.net/gocheck"
"os"
"strings"
)
type EnvSu... |
func (s *EnvSuite) SetUpTest(c *C) {
os.Clearenv()
} |
<|file_name|>Modal.js<|end_file_name|><|fim▁begin|>import React, {
Fragment,
Children,
cloneElement,
useRef,
useEffect
} from 'react';
import { createPortal } from 'react-dom';
import PropTypes from 'prop-types';
import cx from 'classnames';
import idgen from './idgen';
import Button from './Button';
import ... | e && e.preventDefault(); |
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>from django import forms
from django.conf import settings
from django.core.urlresolvers import reverse
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from django.utils.html import conditional_escape
from django.utils... | |
<|file_name|>converter.py<|end_file_name|><|fim▁begin|>from string import digits, ascii_letters
valid_values = list(digits + ascii_letters) # приводим строку к списку
radix = len(valid_values) #основание
def convert(number):<|fim▁hole|> number //= radix
return ''.join(result)
def inverse(number):
r... | result =[] #будем сюда складывать остатки от деления
while number:
result.insert(0,valid_values[number % radix]) |
<|file_name|>categorie.provider.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
import { ServiceProvider } from './service.provider';
import { Observable } from 'rxjs/Observable';
/**
* Model imports
*/
import { Categorie } from '../model/Categorie';
//service fournit les Categories
@... | |
<|file_name|>makeseeds.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# Copyright (c) 2013-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
... | ips.sort(key=lambda x: (x['uptime'], x['lastsuccess'], x['ip']), reverse=True)
# Filter out hosts with multiple bitcoin ports, these are likely abusive
ips = filtermultiport(ips) |
<|file_name|>std-sync-right-kind-impls.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.... | |
<|file_name|>manifest.rs<|end_file_name|><|fim▁begin|>use std::fmt;
use std::path::{PathBuf, Path};
use semver::Version;
use rustc_serialize::{Encoder, Encodable};
use core::{Dependency, PackageId, Summary, SourceId, PackageIdSpec};
use core::WorkspaceConfig;
use core::package_id::Metadata;
pub enum EitherManifest {... | #[derive(Clone, Hash, PartialEq, Eq, Debug)]
pub struct Target {
kind: TargetKind, |
<|file_name|>test_processes.py<|end_file_name|><|fim▁begin|>from .__meta__ import *
from tracer.resources.processes import Processes, Process
from tracer.resources.collections import ProcessesCollection
import os
import subprocess
@unittest.skipIf(True, "@TODO Create Mock for Processes class")
class TestProcesses(unit... | |
<|file_name|>0068_iaticheck.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import django.db.models.deletion
from django.db import models, migrations
import akvo.rsr.fields
class Migration(migrations.Migration):
dependencies = [
('rsr', '0067_auto_20160412_1858'),
]
operations = [
... | ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('status', models.PositiveSmallIntegerField(verbose_name='status')), |
<|file_name|>appconfig.py<|end_file_name|><|fim▁begin|>import os
import yaml
MONGO_USERNAME = os.getenv('MONGO_USERNAME', None)
MONGO_PASSWORD = os.getenv('MONGO_PASSWORD', None)
MONGODB_HOST = os.getenv('MONGODB_HOST', '127.0.0.1')
MONGODB_PORT = int(os.getenv('MONGODB_PORT', '27017'))
MONGODB_SERVERS = os.getenv('M... | MONGO_CONNECTOR_CONFIG = 'mongo-connector.json'
DEFAULTS = { |
<|file_name|>Iterator.js<|end_file_name|><|fim▁begin|>/*
* ! JSRT JavaScript Library 0.1.1 lico.atom@gmail.com
*
* Copyright 2008, 2014 Atom Union, Inc. Released under the MIT license
*
* Date: Feb 11, 2014
*/
Class.forName({
name: "class js.util.Iterator extends Object",
"private _element": null,
"priva... | } |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals<|fim▁hole|>
from django.db import models
# Create your models here.
class Urls(models.Model):
longurl = models.CharField(max_length=256)
shorturl = models.CharField(max_length=128)<|fim▁end|> | |
<|file_name|>exclusao.js<|end_file_name|><|fim▁begin|>$('#confirmacaoExclusaoModal').on('show.bs.modal', function(event) {
var button = $(event.relatedTarget);
var codigoVinho = button.data('codigo');
var nomeVinho = button.data('nome');
var modal = $(this);
var form = modal.find('form');
var action = form.da... | |
<|file_name|>Filter.java<|end_file_name|><|fim▁begin|>package logbook.server.proxy;
/**
* 動作に必要なデータのみ取得するためのフィルターです。
*
*/
public class Filter {
/** フィルターするContent-Type */
public static final String CONTENT_TYPE_FILTER = "text/plain";
/** キャプチャーするリクエストのバイトサイズ上限 */
public static final int MAX_POST_F... | * @return 取得が必要なデータか
*/
public static boolean isNeed(String name) {
if ((!isServerDetected() || (isServerDetected() && serverName.equals(name)))) { |
<|file_name|>reset-password-form.js<|end_file_name|><|fim▁begin|>import React, {Component} from 'react';
import {connect} from 'react-redux';
import Button from "../../../../../components/buttons/button";
import {Link} from "react-router-dom";
import {firebaseResetPasswordRequest} from "../../../../../redux/firebase/ac... | }; |
<|file_name|>test_input.py<|end_file_name|><|fim▁begin|>import numpy
import pytest<|fim▁hole|>
class TestInputLayer:
@pytest.fixture
def layer(self):
from lasagne.layers.input import InputLayer
return InputLayer((3, 2))
def test_input_var(self, layer):
assert layer.input_var.ndim =... | import theano |
<|file_name|>ResponseTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2016 Square, 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... | .body(responseBody)
.build();
} |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># coding: utf-8
from __future__ import unicode_literals
import asyncore
import email
import os
import shutil
import smtpd
import sys
import tempfile
import threading
from django.core import mail
from django.core.mail import (EmailMessage, mail_admins, mail_managers,
... | self.assertEqual(message.get_content_type(), 'text/plain')
self.assertEqual(message.get('subject'), 'Subject')
self.assertEqual(message.get('from'), 'from@example.com')
self.assertEqual(message.get('to'), 'to@example.com') |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Configure jemalloc as the `global_allocator` when configured. This is
// so that we use the sized deallocation apis jemalloc provides
// (namely `sdallocx`).
//
// The symbol overrides documented below are also performed so that we can
// ensure that we use a consist... |
#[used]
static _F7: unsafe extern "C" fn() = _rjem_je_zone_register; |
<|file_name|>ChangeGGIBoundary.py<|end_file_name|><|fim▁begin|>"""
Application-class that implements pyFoamChangeGGIBoundary.py
Modification of GGI and cyclicGGI interface parameters in
constant/polymesh/boundary file.
Author:
Martin Beaudoin, Hydro-Quebec, 2009. All rights reserved
"""
from PyFoam.Applications.... | if self.parser.getOptions().rotationAngle!=None:
val["rotationAngle"]=self.parser.getOptions().rotationAngle
if self.parser.getOptions().separationOffset!=None: |
<|file_name|>plot_ticpe_accises.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Mon Aug 17 15:48:31 2015
@author: thomas.douenne
"""
# L'objectif est de décrire l'évolution des montants des accises de la TICPE depuis 1993
# Import de fonctions spécifiques à Openfisca Indirect Taxation<|fim▁hol... | from openfisca_france_indirect_taxation.examples.utils_example import graph_builder_bar_list
from openfisca_france_indirect_taxation.examples.dataframes_from_legislation.get_accises import \
get_accise_ticpe_majoree
|
<|file_name|>SampleWindow.js<|end_file_name|><|fim▁begin|>/*
* Sample Window
*/
function SampleWindow(navController){
/*
* essentials
*/
var win = Titanium.UI.createWindow({
top: ULA_WIN_TOP,
title: 'Sample Window',<|fim▁hole|> var rootView = Titanium.UI.createView({
top: 10, bottom: 10, left: 10, right: ... | backgroundColor: 'red'
});
|
<|file_name|>ptr_as_ptr.rs<|end_file_name|><|fim▁begin|>// run-rustfix
#![warn(clippy::ptr_as_ptr)]
#![feature(custom_inner_attributes)]
fn main() {<|fim▁hole|>
let _ = ptr as *const i32;
let _ = mut_ptr as *mut i32;
// Make sure the lint can handle the difference in their operator precedences.
unsaf... | let ptr: *const u32 = &42_u32;
let mut_ptr: *mut u32 = &mut 42_u32; |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-tvdb',
version='0.1',<|fim▁hole|> ... | packages=['tvdb'],
include_package_data=True, |
<|file_name|>media_editing.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
################################################################################
# #
# media_editing ... | # This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # |
<|file_name|>test_artificial_32_Anscombe_PolyTrend_7__0.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds<|fim▁hole|>
art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "Anscombe", sigma = 0.0, exog_count = 0, ar_order = 0);<|fim▁end|> | import tests.artificial.process_artificial_dataset as art
|
<|file_name|>gather.go<|end_file_name|><|fim▁begin|>package main
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"crypto/md5"
"bytes"
"compress/gzip"
"encoding/json"
"log"
"github.com/rakyll/magicmime"
"github.com/garyburd/redigo/redis"
)
var global_hostname string
type FileStat struct {
Path... | |
<|file_name|>comm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original c... | line) |
<|file_name|>UnitAnimEvent.java<|end_file_name|><|fim▁begin|>package openra.server;
import openra.core.Unit;
public class UnitAnimEvent extends ActionEvent
{
private Unit un;
private UnitAnimEvent scheduled;
public UnitAnimEvent(int p, Unit un) {
super(p);
//logger->debug("UAE cons: this:%p u... | }
}
|
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2
# test.py
# nroberts 04/10/2017
# Instead of lighting up a bridge, we light up the terminal
from tennis_show import TennisShow
import current_bridge
from threading import Thread
import Queue
from colors import Colors
thread_continuing = True
class ... | thread.start()
|
<|file_name|>project_tree.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship ... | |
<|file_name|>dispatcher.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of the VecNet OpenMalaria Portal.<|fim▁hole|>#
# This Source Code Form is subject to the terms of the Mozilla Public
# License (MPL), version 2.0. If a copy of the MPL was not distributed
# with this file, You can obt... | # For copyright and licensing information about this package, see the
# NOTICE.txt and LICENSE.txt files in its top-level directory; they are
# available at https://github.com/vecnet/om |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># This file is part of Indico.
# Copyright (C) 2002 - 2022 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import os
from indico.core import signals
from indi... | from .oauth2 import require_oauth
__all__ = ['require_oauth'] |
<|file_name|>file_ssl_cert_key.py<|end_file_name|><|fim▁begin|>from a10sdk.common.A10BaseClass import A10BaseClass
class SslCertKey(A10BaseClass):
""" :param action: {"optional": true, "enum": ["create", "import", "export", "copy", "rename", "check", "replace", "delete"], "type": "string", "description": ... | self.ERROR_MSG = ""
self.required=[]
self.b_key = "ssl-cert-key" |
<|file_name|>fork.py<|end_file_name|><|fim▁begin|>from pwn.internal.shellcode_helper import *
@shellcode_reqs(arch=['i386', 'amd64'], os=['linux', 'freebsd'])
def fork(parent, child = None, os = None, arch = None):
"""Fork this shit."""
if arch == 'i386':
if os in ['linux', 'freebsd']:
ret... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.