prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>bluetigers.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Author: raver2046 <raver2046@gmail.com>
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published... | provider = BlueTigersProvider() |
<|file_name|>list-workspaces.controller.ts<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015-2018 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Id... | if (!workspace.isLocked) {
let promiseWorkspace = this.cheAPI.getWorkspace().fetchWorkspaceDetails(workspace.id);
promises.push(promiseWorkspace);
} |
<|file_name|>common.py<|end_file_name|><|fim▁begin|>import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/dev/howto... | INSTALLED_APPS = [ |
<|file_name|>nav.ts<|end_file_name|><|fim▁begin|>/**
* Created by d.d on 18/07/2017.
*/
<|fim▁hole|> public name: string;
public title: string;
public path: string;
public event?: () => void;
constructor(name = '', title = '', path = '/', event = noon) {
this.name = name;
this.title = title;
this.path = pa... | const noon = () => { };
export class Item { |
<|file_name|>shootout-mandelbrot.rs<|end_file_name|><|fim▁begin|>// The Computer Language Benchmarks Game
// http://benchmarksgame.alioth.debian.org/
//
// contributed by the Rust Project Developers
// Copyright (c) 2012-2014 The Rust Project Developers
//
// All rights reserved.
//
// Redistribution and use in source... | // - Neither the name of "The Computer Language Benchmarks Game" nor
// the name of "The Computer Language Shootout Benchmarks" nor the
// names of its contributors may be used to endorse or promote
// products derived from this software without specific prior |
<|file_name|>menu.js<|end_file_name|><|fim▁begin|>import { addTimer } from './timer/timer';
import { showProfile } from './profile/profile';
import { showHelp } from './help/help';
import { getAllUsers } from './timer/listUtil/getAllUsers';
import { isWorking } from './timer/listUtil/isWorking';
import { timerTimeout ... |
// add reactions to message
for (const emoji in emojiMap) {
await menuMsg.react(emoji); |
<|file_name|>05-numpy35.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | np.identity(3) |
<|file_name|>command_test.go<|end_file_name|><|fim▁begin|>package cli_test
import (<|fim▁hole|> "github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/codegangsta/cli"
)
func TestCommandDoNotIgnoreFlags(t *testing.T) {
app := cli.NewApp()
set := flag.NewFlagSet("test", 0)
test := []string{"blah", "blah... | "flag"
"testing"
|
<|file_name|>function.js<|end_file_name|><|fim▁begin|>var contenedor = {};
var json = [];
var json_active = [];
var timeout;
var result = {};
$(document).ready(function() {
$('#buscador').keyup(function() {
if (timeout) {
clearTimeout(timeout);
timeout = null;
}... | load_content(json);
}
|
<|file_name|>stack-probes-lto.rs<|end_file_name|><|fim▁begin|>// run-pass
// ignore-arm
// ignore-aarch64
// ignore-mips
// ignore-mips64
// ignore-powerpc
// ignore-s390x
// ignore-sparc
// ignore-sparc64
// ignore-wasm
// ignore-emscripten no processes
// ignore-sgx no processes
// ignore-musl FIXME #31506
// ignore-... | include!("stack-probes.rs"); |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
setup(
name='flashback',
packages=['flashback'],
version='0.4',
description='The handiest Flashback scraper in the game',
author='Robin Linderborg',
author_email='robin.linderborg@gmail.com',
install_requires... | 'requests==2.8.0' |
<|file_name|>toggleEnabled.js<|end_file_name|><|fim▁begin|>/* Updates fields based on checkbox changes
*/
var PRFtoggleEnabled = function(cbox, id, type) {
oldval = cbox.checked ? 0 : 1;
var dataS = {
"action" : "toggleEnabled",
"id": id,
"type": type,
"oldval": oldval,
};
... | } |
<|file_name|>read.py<|end_file_name|><|fim▁begin|>import numpy as np
from skimage import io
def read_image(fn, normalize=True):
"""Read a CCD/CMOS image in .da format (Redshirt). [1_]
Parameters
----------
fn : string
The input filename.
Returns
-------
images : array, shape (nro... | |
<|file_name|>kyototycoon.py<|end_file_name|><|fim▁begin|>from functools import partial
import time
from ukt import KT_NONE
from ukt import KyotoTycoon
from huey.api import Huey
from huey.constants import EmptyData
from huey.storage import BaseStorage
from huey.utils import decode
<|fim▁hole|>
class KyotoTycoonStorage... | |
<|file_name|>setup.ts<|end_file_name|><|fim▁begin|>import 'aurelia-polyfills';
import 'aurelia-loader-webpack';
import {initialize} from 'aurelia-pal-browser';
import { PLATFORM } from 'aurelia-pal';
initialize();<|fim▁hole|><|fim▁end|> |
PLATFORM.moduleName('test/resources/view-model-1');
PLATFORM.moduleName('test/resources/view-model-1.html'); |
<|file_name|>build.d.ts<|end_file_name|><|fim▁begin|>import { MinifyOptions as TerserOptions } from "terser";
import { Configuration as WebpackConfiguration } from "webpack";
import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer";
import * as WebpackChain from "webpack-chain";
import { DefinedDefaultAlgorithmAn... | */
transformAssetsUrls?: Record<string, string | string[]>;
/** Show a progress bar while compiling. */
showProgress?: boolean; |
<|file_name|>Camera.ts<|end_file_name|><|fim▁begin|>export const Camera = `
<svg viewBox="0 0 28 28">
<g fill="none" fill-rule="evenodd"><|fim▁hole|> <path d="M3 3h22a2 2 0 012 2v18a2 2 0 01-2 2H3a2 2 0 01-2-2V5a2 2 0 012-2z" stroke="currentColor"/>
<circle stroke="currentColor" cx="14" cy="14" r="5"/>
<pa... | |
<|file_name|>BaseAppCompatActivity.java<|end_file_name|><|fim▁begin|>package com.bonepeople.android.sdcardcleaner.basic;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.os.Message;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx... |
/**
* 集成对Handler控制的基类 |
<|file_name|>account_report_account_balance.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free softwa... | |
<|file_name|>part.go<|end_file_name|><|fim▁begin|>package enmime
import (
"bufio"
"bytes"
"encoding/base64"
"fmt"
"io"
"mime"
"mime/multipart"
"net/textproto"
"strings"
"github.com/sloonz/go-qprintable"
)
// MIMEPart is the primary interface enmine clients will use. Each MIMEPart represents
// a node in t... | }
// Insert ourselves into tree, p is enmime's mime-part
p := NewMIMEPart(parent, mediatype) |
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>extern crate idna;
extern crate rustc_serialize;
extern crate test;<|fim▁hole|>mod punycode;
mod uts46;
fn main() {
let mut tests = Vec::new();
{
let mut add_test = |name, run| {
tests.push(test::TestDescAndFn {
desc: test::... | |
<|file_name|>lib.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/. */
#![feature(box_syntax)]
#![feature(custom_derive)]
#![feature(box... | /// Load a URL asynchronously and iterate over chunks of bytes from the response.
pub fn load_bytes_iter(pending: PendingAsyncLoad) -> (Metadata, ProgressMsgPortIterator) {
let input_port = pending.load();
let response = input_port.recv().unwrap(); |
<|file_name|>ES2ChildDataset.java<|end_file_name|><|fim▁begin|>package org.openlca.olcatdb.ecospold2;
import org.openlca.olcatdb.parsing.Context;
/**
* @Element childActivityDataset
* @ContentModel (activityDescription, flowData, modellingAndValidation,
* administrativeInformation, namespace:uri="##o... | |
<|file_name|>Log.cpp<|end_file_name|><|fim▁begin|>// (C) 2004 by Khaled Daham, <khaled@w-arts.com>
//
// Singleton
//
#include <iterator>
#include "Log.h"
#include <stdio.h>
#include <stdarg.h>
#include <windows.h>
namespace ps2emu
{
typedef std::map<int32, std::string>::iterator m_mapIterator;
//////////////////... | Log* Log::Instance() {
if(_instance == 0) {
_instance = new Log;
} |
<|file_name|>lc0796_rotate_string.py<|end_file_name|><|fim▁begin|>"""Leetcode 796. Rotate String
Easy
<|fim▁hole|>
A shift on A consists of taking string A and moving the leftmost character to
the rightmost position. For example, if A = 'abcde', then it will be 'bcdea'
after one shift on A. Return True if and only if A... | URL: https://leetcode.com/problems/rotate-string/
We are given two strings, A and B. |
<|file_name|>range1d.ts<|end_file_name|><|fim▁begin|>import {Range} from "./range"
import * as p from "core/properties"
export namespace Range1d {
export interface Attrs extends Range.Attrs {
start: number
end: number
}
export interface Props extends Range.Props {}
}
export interface Range1d extends Ra... |
Range1d.initClass() |
<|file_name|>sdn_test.go<|end_file_name|><|fim▁begin|>package integration
import (
"fmt"
"testing"
"time"
kapierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
utilwait "k8s.io/apimachinery/pkg/util/wait"
restclient "k8s.io/client-go/rest"
osclient "github.com/openshif... | t.Fatalf("expected unique NetIDs, got %d, %d, %d", origNetns1.NetID, origNetns2.NetID, origNetns3.NetID)
}
newNetns2, err := updateNetNamespace(osClient, origNetns2, sdnapi.JoinPodNetwork, "one") |
<|file_name|>resource_alicloud_ssl_vpn_client_cert_test.go<|end_file_name|><|fim▁begin|>package alicloud
import (
"fmt"
"testing"
"github.com/alibaba/terraform-provider/alicloud/connectivity"
"github.com/aliyun/alibaba-cloud-sdk-go/services/vpc"
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashi... | |
<|file_name|>executeContract.js<|end_file_name|><|fim▁begin|>/**
Template Controllers
@module Templates
*/
/**
The execute contract template
@class [template] elements_executeContract
@constructor
*/
Template['elements_executeContract'].onCreated(function(){
var template = this;
// Set Defaults
Templat... |
// Walk throught the jsonInterface and extract functions and constants
if(func.type == 'function') { |
<|file_name|>parser.rs<|end_file_name|><|fim▁begin|>#![plugin(peg_syntax_ext)]
use std::fmt;
use std::collections::HashMap;
peg_file! gremlin("gremlin.rustpeg");
pub fn parse(g: &str) -> Result<ParsedGraphQuery, gremlin::ParseError> {
let parsed = pre_parse(g);
// verify all the steps actually make sense
... | gremlin::query(g) |
<|file_name|>qps_interarrival_test.cc<|end_file_name|><|fim▁begin|>/*
*
* Copyright 2015 gRPC 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/li... | std::cout << "Value, Percentile" << std::endl; |
<|file_name|>SzabadsagokatOsszefuggoFelhasznaltSzabadnapReszletekkeKonvertaloTest.java<|end_file_name|><|fim▁begin|>package test.unit.hu.interconnect.hr.module.personaldata.vacations;
import static com.google.common.collect.Lists.newArrayList;
import static hu.interconnect.hr.backend.api.enumeration.KivetelnapTipus.MU... | |
<|file_name|>lto-unwind.rs<|end_file_name|><|fim▁begin|>// run-pass
#![allow(unused_variables)]
// compile-flags:-C lto -C panic=unwind
// needs-unwind
// no-prefer-dynamic
// ignore-emscripten no processes
// ignore-sgx no processes
use std::process::Command;
use std::env;
struct Bomb;
impl Drop for Bomb {
fn ... | if &*s == "foo" { |
<|file_name|>uri.hpp<|end_file_name|><|fim▁begin|>#pragma once
#include "net/uri.hpp"
<|fim▁hole|> using uri = net::uri;
}<|fim▁end|> | namespace http
{ |
<|file_name|>mixins.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from __future__ import absolute_import
from django.views.generic.base import TemplateResponseMixin
from wiki.core.plugins import registry
from wiki.conf import settings
class ArticleMixin(TemplateResponseMixin):
"""A mix... | self.article = article |
<|file_name|>borrowed-unique-basic.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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... | // gdb-check:$5 = -16
// gdb-command:print *i32_ref
// gdb-check:$6 = -32 |
<|file_name|>Graphics3dInterface.hh<|end_file_name|><|fim▁begin|>/*
* Copyright 2011 Nate Koenig & Andrew Howard
*
* 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.apac... | /// \brief Update this interface, publish new info. |
<|file_name|>16_UCSC_sources_to_ENCODE.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
#
# This file is part of Progesterone pipeline.
#
# Progesterone pipeline 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... | # now for each single entry, make parent point to encode file, and encode file's parent to encode exp |
<|file_name|>objdetect.rs<|end_file_name|><|fim▁begin|>//! Various object detection algorithms, such as Haar feature-based cascade
//! classifier for object detection and histogram of oriented gradients (HOG).
use super::core::*;
use super::errors::*;
use super::*;
use failure::Error;
use std::ffi::CString;
use std::o... | |
<|file_name|>main.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | # -*- coding:utf-8 -*-
print("Hello") |
<|file_name|>JobsAdminEntry.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2016 Singular Studios (a.k.a Atom Tecnologia) - www.opensingular.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the... | |
<|file_name|>mtucicoin_fr.ts<|end_file_name|><|fim▁begin|><TS language="fr" version="2.0">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Faites un clic droit pour modifier l'adresse ou l'étiquette</translation>
</message>
... | </message>
<message>
<source>Synchronization failed</source> |
<|file_name|>job_cache_anonymous_houseprint.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""
Script to cache anonymous houseprint data into hp_anonymous.pkl
Created on 05/07/2014 by Roel De Coninck
"""
import os, sys
import inspect
script_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.curren... | # -*- coding: utf-8 -*-
|
<|file_name|>angular2-socket.io.ts<|end_file_name|><|fim▁begin|>import { Injectable } from 'angular2/core';<|fim▁hole|>
@Injectable()
export class NgSocketIO {
socket: any;
constructor() {
this.socket = io.connect();
}
public on(event : string) {
return Rx.Observable.fromEvent(this.socket, event);... | import * as Rx from 'rxjs/Rx';
declare var io; |
<|file_name|>polySum.py<|end_file_name|><|fim▁begin|>'''
Week-2:Exercise-grader-polysum
A regular polygon has n number of sides. Each side has length s.
The area of a regular polygon is: (0.25∗n∗s^2)/tan(π/n)
The perimeter of a polygon is: length of the boundary of the polygon
Write a function called polysum that take... | |
<|file_name|>uritests.cpp<|end_file_name|><|fim▁begin|>#include "uritests.h"
#include "../guiutil.h"
#include "../walletmodel.h"
#include <QUrl>
void URITests::uriTests()
{
SendCoinsRecipient rv;
QUrl uri;
uri.setUrl(QString("mehcoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?req-dontexist="));
QVERIFY(!GUIUt... | |
<|file_name|>Workforce.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>// ==============================
var Workforce = function () {
if (this.constructor === Workforce) {
throw new Error("You cannot instantiate an abstract class!");
}
};
Workforce.prototype.assemblePC = function () {
th... |
// ==============================
// ABSTRACT PC BUILDER |
<|file_name|>webpack.js<|end_file_name|><|fim▁begin|>const gulp = require('gulp');
const spawn = require('../lib/spawn');
const config = require('../config');
gulp.task('webpack', (callback) => {
if (config.context === 'production') {
process.env.NODE_ENV = 'production';
}
process.env.WEBPACK_CO... | }); |
<|file_name|>conv_gpu_depthwise.d.ts<|end_file_name|><|fim▁begin|>import { Conv2DInfo } from '../../ops/conv_util';
import { GPGPUProgram } from './gpgpu_math';
export declare class DepthwiseConv2DProgram implements GPGPUProgram {
variableNames: string[];<|fim▁hole|> outputShape: number[];
userCode: string;
... | |
<|file_name|>validation.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 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... | |
<|file_name|>QueryVisitorFieldArgumentEnvironment.java<|end_file_name|><|fim▁begin|>package graphql.analysis;
import graphql.PublicApi;
import graphql.language.Argument;
import graphql.language.Node;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLSchem... | GraphQLFieldDefinition getFieldDefinition();
GraphQLArgument getGraphQLArgument(); |
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
import random
import time
from flask import Flask, request, render_template, session, flash, redirect, \
url_for, jsonify
from flask.ext.mail import Mail, Message
from flask.ext.sqlalchemy import SQLAlchemy
from celery import Celery
app = Flask(__name__)
... | app.run(debug=True) |
<|file_name|>test_extension.py<|end_file_name|><|fim▁begin|># Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import subprocess
import sys
from ....tests.helper import pytest
def test_wcsapi_extension(tmpdir)... | |
<|file_name|>space_map_disk.rs<|end_file_name|><|fim▁begin|>use anyhow::Result;
use crate::pdata::btree_builder::*;
use crate::pdata::space_map::*;
use crate::pdata::space_map_common::*;
use crate::write_batcher::*;
//------------------------------------------
pub fn write_disk_sm(w: &mut WriteBatcher, sm: &dyn Spac... | for (i, ie) in index_entries.iter().enumerate() {
index_builder.push_value(w, i as u64, *ie)?; |
<|file_name|>generic.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
# -*- coding: utf-8 -*-
#-----------------------------------------------------------------------------
# Name: Generic.py
# Purpose:
# Author: Fabien Marteau <fabien.marteau@armadeus.com>
# Created: 21/05/2008
#------------------------------... | __init__(self,parent,name) |
<|file_name|>weeklyRecurrenceSpec.js<|end_file_name|><|fim▁begin|>var deps = [
'common-ui/angular',
'test/karma/unit/angular-directives/templateUtil',
'common-ui/angular-ui-bootstrap',
'angular-mocks',
'common-ui/angular-directives/recurrence/recurrence'
];
define(deps, function (angular, templateU... |
});
|
<|file_name|>9c92c85163a9_events.py<|end_file_name|><|fim▁begin|>"""events
Revision ID: 9c92c85163a9
Revises: 666668eae682
Create Date: 2016-05-09 19:04:44.498817
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
# revision identifiers, used by Alembic.
revision = '9c92c85... | sa.Column('meta', postgresql.JSONB(), autoincrement=False, nullable=True), |
<|file_name|>UnserializableTargetObjectTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU Genera... | Resource resource3 = new Resource();
Method operationMethod = Resource.class.getMethod("operation");
Method getCountMethod = Resource.class.getMethod("getCount");
Method setCountMethod = Resource.class.getMethod("setCount", int.class); |
<|file_name|>speed.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
## Part of the pyprimes.py package.
##
## Copyright © 2014 Steven D'Aprano.
## See the file __init__.py for the licence terms for this software.
"""\
=====================================
Timing the speed of primes algorithms
==============... | YEAR100 = 100*365*24*60*60 # One hundred years, in seconds.
class Stopwatch(object): |
<|file_name|>NeedsPermission.java<|end_file_name|><|fim▁begin|>package org.jokar.permissiondispatcher.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**<|fim▁hole|> * Created by JokAr on 16/8/... | * Register some methods which permissions are needed. |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | """Tests for the input_boolean component.""" |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use communication::Message;
pub use self::counter::Counter;
<|fim▁hole|>/// The pullable design may need to be upgraded: right now there is no obvious connection between
/// subsequent calls to pull; although multiple calls may produce the same time, they don't need to
... | pub mod counter;
|
<|file_name|>MainNavigation.js<|end_file_name|><|fim▁begin|>'use strict';
const fs = require('fs');
const remote = require('electron').remote;
const mainProcess = remote.require('./main');
module.exports = {
template: `
<v-list dense class="pt-0">
<v-list-tile to="recent-projects" :router="true">
<v-list-ti... | |
<|file_name|>ncf_keras_main.py<|end_file_name|><|fim▁begin|># Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... |
grads = tape.gradient(loss, keras_model.trainable_variables)
if FLAGS.dtype == "fp16":
grads = optimizer.get_unscaled_gradients(grads) |
<|file_name|>StringPrintWriter.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2002-2004 The Apache Software Foundation.
*
* 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:... | return ((StringWriter) this.out).toString(); |
<|file_name|>Class.py<|end_file_name|><|fim▁begin|># GemRB - Infinity Engine Emulator
# Copyright (C) 2003 The GemRB Project
#
# 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
# ... | ClassID = 0
|
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in ... |
if 'GIRDER_MONGO_URI' in os.environ:
if 'database' not in cherrypy.config: |
<|file_name|>HomeController.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2012 the original author or 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.ap... | * @author Carlo Micieli
*/
@Controller
@RequestMapping("/") |
<|file_name|>test_api.py<|end_file_name|><|fim▁begin|># Copyright 2015 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.
from copy import deepcopy
from recipe_engine import recipe_test_api
class iOSTestApi(recipe_test_api.R... | }) |
<|file_name|>grammar.peg.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including wit... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod ast;
pub mod attr;
mod ctxt;
pub use self::ctxt::Ctxt;
mod case;
mod check;
mod symbol;
#[derive(Copy, Clone)]
pub enum Derive {
Serialize,
Deserialize,<|fim▁hole|><|fim▁end|> | } |
<|file_name|>IPPExportOptions.java<|end_file_name|><|fim▁begin|>/**
Copyright 2010 Christian Kästner
This file is part of CIDE.
CIDE 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, ver... | |
<|file_name|>test_sftp_big.py<|end_file_name|><|fim▁begin|># Copyright (C) 2003-2009 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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
# So... | self.assertEqual(sftp.stat('%s/hongry.txt' % FOLDER).st_size, 1024 * 1024)
self.assertNotEqual(t.H, t.session_id) |
<|file_name|>testbinding.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/. */
// check-tidy: no specs after this line
use core::nonzer... | |
<|file_name|>process.rs<|end_file_name|><|fim▁begin|>//! Extensions to `std::process` for Windows.
#![stable(feature = "process_extensions", since = "1.2.0")]
use crate::ffi::OsStr;
use crate::os::windows::io::{
AsHandle, AsRawHandle, BorrowedHandle, FromRawHandle, IntoRawHandle, OwnedHandle, RawHandle,
};
use cr... |
#[stable(feature = "process_extensions", since = "1.2.0")]
impl AsRawHandle for process::ChildStderr {
#[inline] |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LI... | |
<|file_name|>test_agg.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User
from pandas import read_csv, notnull, DataFrame
from numpy import isnan
from django.test import TestCase
from rhizome.models.campaign_models import Campaign, CampaignType, \
DataPointComputed, AggDataPoint
from rhizom... | name='Number of Deaths due to Hunger',
short_name='Number of Deaths due to Hunger',
data_format='int'
) |
<|file_name|>jsonconfig.py<|end_file_name|><|fim▁begin|>"""
Read a dictionary from a JSON file,
and add its contents to a Python dictionary.
"""
import json
import types
from instmakelib import rtimport
INSTMAKE_SITE_DIR = "instmakesite"
# These are the supported field names
# ===================================
# ... | return rtimport.rtimport(plugin_name) |
<|file_name|>faForceEquation.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
## #### ###### |
## ## ## | Copyright: ICE Stroemungsfoschungs GmbH
## ## #### |
## ## ## | http://www.ice-sf.at
## #### ######... | |
<|file_name|>use-mod-4.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/licen... | use foo::self;
//~^ ERROR expected identifier, found keyword `self`
fn main() {} |
<|file_name|>VerticalLinearizer2DTest.cpp<|end_file_name|><|fim▁begin|>#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include "utils/VerticalLinearizer2D.hpp"
#include <cstdlib>
void verticalLinearizer2D_test_array(const std::size_t width, const std::size_t height)
{<|fim▁hole|>
for(int y = -20; y ... | VerticalLinearizer2D linearizer (width, height, -10, -20);
std::size_t linearized = 0; |
<|file_name|>selector_matching.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/. */
//! Selector matching.
use dom::PresentationalHint... | }
// Step 3: User and author normal rules. |
<|file_name|>callee.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses... | _ => method.ty
},
None => panic!("method not found in trans_method_call") |
<|file_name|>umbmediagrid.directive.js<|end_file_name|><|fim▁begin|><|fim▁hole|> function MediaGridDirective($filter, mediaHelper) {
function link(scope, el, attr, ctrl) {
var itemDefaultHeight = 200;
var itemDefaultWidth = 200;
var itemMaxWidth = 200;
var it... | (function() {
'use strict';
|
<|file_name|>graphvizexport.hpp<|end_file_name|><|fim▁begin|>/*******************************************************************************
* ISPTAP - Instruction Scratchpad Timing Analysis Program
* Copyright (C) 2013 Stefan Metzlaff, University of Augsburg, Germany
* URL: <https://github.com/smetzlaff/isptap>
*... | * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* |
<|file_name|>lib.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/. */
// Servo, the mighty web browser engine from the future.
//
// Th... | mod export { |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from mezzanine.core.views import direct_to_template
from mezzanine.conf import settings
from h... |
)
# Adds ``STATIC_URL`` to the context of error pages, so that error |
<|file_name|>htmldatalistelement.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 dom::bindings::codegen::Bindings::HTMLDataLis... | }
#[allow(unrooted_must_root)] |
<|file_name|>eclipse.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects... | |
<|file_name|>model_link_volume_response.go<|end_file_name|><|fim▁begin|>/*
* 3DS OUTSCALE API
*
* Welcome to the 3DS OUTSCALE's API documentation.<br /><br /> The 3DS OUTSCALE API enables you to manage your resources in the 3DS OUTSCALE Cloud. This documentation describes the different actions available along with ... | * |
<|file_name|>use-effect.ts<|end_file_name|><|fim▁begin|>import { TRAM_HOOK_KEY, TRAM_EFFECT_QUEUE } from './engine-names';
import { getEffectStore } from './effect-store';<|fim▁hole|>import { Effect } from './types';
/**
* @name useEffect
* @link https://tram-one.io/#use-effect
* @description
* Hook that triggers ... | import { getWorkingKeyValue, incrementWorkingKeyBranch } from './working-key';
|
<|file_name|>Rule.js<|end_file_name|><|fim▁begin|>"use strict";
var Q = require("q");
var winston = require("winston");
var check = require('validator').check;
var Rule = function() {};
Rule.prototype.initializeFromJson = function(json) {
var self = this;
return Q.fcall(function() {
if(!json) throw ... |
Rule.prototype.getUrlReplacement = function() {
return this.rules.replaceUrls;
}; |
<|file_name|>GodTemperDB.java<|end_file_name|><|fim▁begin|>package com.example.godtemper.db;
import java.util.ArrayList;
import java.util.List;
import com.example.godtemper.model.City;
import com.example.godtemper.model.County;
import com.example.godtemper.model.Province;
import android.R.integer;
import android.con... | public class GodTemperDB {
/** |
<|file_name|>g1RemSet.hpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Publ... | enum SomePrivateConstants {
UpdateRStoMergeSync = 0, |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>########################################################################################################################
# VECNet CI - Prototype
# Date: 4/5/2013
# Institution: University of Notre Dame
# Primary Authors:
#############################################... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render
from django.views import View
<|fim▁hole|><|fim▁end|> |
class SiteUpdateNotifier(View):
def get(self, request):
pass |
<|file_name|>supersized.images.js<|end_file_name|><|fim▁begin|>jQuery(function($){
$.supersized({
<|fim▁hole|> stop_loop : 0, // Pauses slideshow on last slide
random : 0, // Randomize slide order (Ignores start slide)
slide_interval : 12000, // Length between transiti... | // Functionality
slideshow : 1, // Slideshow on/off
autoplay : 1, // Slideshow starts playing automatically
start_slide : 1, // Start slide (0 is random) |
<|file_name|>Recap.py<|end_file_name|><|fim▁begin|># $Id$
#
# Copyright (c) 2007, Novartis Institutes for BioMedical Research Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * ... | self.assertTrue('[*]C1CC1' in ks) |
<|file_name|>0002_phonenumber_related_sim.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-11-01 20:02
from __future__ import unicode_literals
<|fim▁hole|>
class Migration(migrations.Migration):
initial = True
dependencies = [
('phone_numbers', '0001_initial')... | from django.db import migrations, models
import django.db.models.deletion
|
<|file_name|>ChangePasswordScreenController.js<|end_file_name|><|fim▁begin|>Ext.define('Healthsurvey.view.mobileview.login.ChangePasswordScreenController', {
extend : 'Ext.app.ViewController',
alias : 'controller.changePasswordScreenController',
onChangePasswordClick : function(btn, opts) {
debugger;
var form =... | this.getView().getForm().reset();
}
}); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.