prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>var elixir = require('laravel-elixir'); var gulp = require("gulp"); require('laravel-elixir-wiredep'); /* |-------------------------------------------------------------------------- | Elixir Asset Management |-----------------------------------------------------...
var bowerDir = "public/vendor/"; var lessPaths = [
<|file_name|>missing_inline_executable.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::missing_inline_in_public_items)] <|fim▁hole|> fn main() {}<|fim▁end|>
pub fn foo() {}
<|file_name|>_inbound_nat_rules_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information...
<|file_name|>slim-loading-bar.service.spec.ts<|end_file_name|><|fim▁begin|>import { inject, fakeAsync, tick, TestBed } from '@angular/core/testing'; import {SlimLoadingBarService} from '../src/slim-loading-bar.service'; describe('SlimLoadingBarService', () => { let service: SlimLoadingBarService; let...
it('have 100 returned from progress after complete()', () => { service.start(); service.complete();
<|file_name|>builder.go<|end_file_name|><|fim▁begin|>package controllercmd import ( "fmt" "github.com/golang/glog" "k8s.io/apimachinery/pkg/util/wait" "k8s.io/client-go/rest" "k8s.io/client-go/tools/leaderelection" configv1 "github.com/openshift/api/config/v1" "github.com/openshift/library-go/pkg/config/clie...
<|file_name|>definition-list-fixtures.module.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { SkyDefinitionListModule } from '../definition-list.module'; import { SkyDefinitionListTestComponent } from './definition-list.component.fixtur...
<|file_name|>public.ts<|end_file_name|><|fim▁begin|>import {Router, Response, Request} from "express"; export const publicRouter = Router(); <|fim▁hole|>publicRouter.get("/", (req: Request, res: Response) => { res.json({ title: "greetings", text: "hello web" }); });<|fim▁end|>
<|file_name|>repoclosure.py<|end_file_name|><|fim▁begin|># repoclosure.py # DNF plugin adding a command to display a list of unresolved dependencies # for repositories. # # Copyright (C) 2015 Igor Gnatenko # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subje...
for k, v in unresolved.items()} return {k: v for k, v in unresolved_transition.items() if v}
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>pub use crate::tracker::TrackerMode; use serde::Deserialize; use std::collections::HashMap; #[derive(Deserialize)] pub struct UDPConfig { bind_address: String, announce_interval: u32, } impl UDPConfig { pub fn get_address(&self) -> &str { self.bi...
<|file_name|>range_set.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] //! A set library to aid character set manipulation. //! //! `range_set` aims to make it easier to handle set manipulation for characters //! over ranges. For example, a unicode library may expose character ranges such //! as `('0', '9')` as a...
impl Range { fn contains(&self, c: char) -> bool { self.0 <= c && self.1 >= c
<|file_name|>Roupa.java<|end_file_name|><|fim▁begin|><|fim▁hole|> /** * Created by felansu on 03/06/2015. */ public interface Roupa { void vestir(); }<|fim▁end|>
package padroesprojeto.criacional.abstractfactorymethod.outroexemplo.model;
<|file_name|>SceneReaderBinding.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2014, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitt...
<|file_name|>options.rs<|end_file_name|><|fim▁begin|>use scaly::containers::Ref; use scaly::memory::Region; use scaly::Equal; use scaly::Page; use scaly::{Array, String, Vector}; pub struct Options { pub files: Ref<Vector<String>>, pub output_name: Option<String>, pub directory: Option<String>, pub rep...
<|file_name|>more.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uu_more"] /* * This file is part of the uutils coreutils package. * * (c) Martin Kysel <code@martinkysel.com> * * For the full copyright and license information, please view the LICENSE file * that was distributed with this source code. */ exte...
#[derive(Clone, Eq, PartialEq)] pub enum Mode { More,
<|file_name|>1strandbushinga002.py<|end_file_name|><|fim▁begin|>#1strand Bushing Tool #Standalone program for minimized cruft import math print "This program is for printing the best possible circular bushings" print "Printer config values are hardcoded for ease of use (for me)" xpath = [] #These are initialized and ...
InnerDiameter = 0.0 N = 1 ActualExtrusionWidth = ExtrusionWidth
<|file_name|>RedisDistributedSystemService.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 ...
import java.io.IOException; import java.net.URL; import java.util.Collection;
<|file_name|>highlighter.rs<|end_file_name|><|fim▁begin|>//! Iterators and data structures for transforming parsing information into styled text. // Code based on https://github.com/defuz/sublimate/blob/master/src/core/syntax/highlighter.rs // released under the MIT license by @defuz use std::iter::Iterator; use std:...
/// /// Yields the [`Style`], the text and well as the `Range` of the text in the source string. /// /// It splits a line of text into different pieces each with a [`Style`]
<|file_name|>main.js<|end_file_name|><|fim▁begin|><|fim▁hole|>app.on('ready', function() { mainWindow = new BrowserWindow({width: 400, height: 360}); mainWindow.loadUrl('file://' + __dirname + '/manager.html'); });<|fim▁end|>
var app = require('app'); var BrowserWindow = require('browser-window'); var mainWindow = null;
<|file_name|>csssupportsrule.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, ParserInput}; use dom::bindin...
pub fn set_condition_text(&self, text: DOMString) {
<|file_name|>org_app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.5 # # Copyright 2011 the Melange 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.o...
#TODO: Rewrite this class while refactoring surveys def __init__(self, *args, **kwargs):
<|file_name|>RadonBear.py<|end_file_name|><|fim▁begin|>import radon.complexity import radon.visitors from coalib.bears.LocalBear import LocalBear from coalib.results.Result import Result from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.results.SourceRange import SourceRange from coalib.settings.S...
radon_ranks_info: typed_list(str)=(), radon_ranks_normal: typed_list(str)=('C', 'D'), radon_ranks_major: typed_list(str)=('E', 'F')): """
<|file_name|>MVCJComboBox.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2010 Daniel Murphy * * 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 withou...
return; } synchronized (lock) { for(int i=0; i<model.getSize();i ++){
<|file_name|>logger.py<|end_file_name|><|fim▁begin|># Copyright 2013 Mirantis, 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/LICE...
<|file_name|>test.py<|end_file_name|><|fim▁begin|><|fim▁hole|>../../../../../../share/pyshared/mx/DateTime/mxDateTime/test.py<|fim▁end|>
<|file_name|>parsego.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main import ( "go/ast" "go/parser" "go/token" "os" "path" "runtime" "strings" ) func isGo...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
# # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>mng_v2_test.go<|end_file_name|><|fim▁begin|>package dao import ( "context" "testing" "github.com/smartystreets/goconvey/convey" ) func TestDaoBusinessAllV2(t *testing.T) { convey.Convey("BusinessAllV2", t, func(convCtx convey.C) { var ( c = context.Background() ) convCtx.Convey("When everyt...
<|file_name|>alt_dir_ind.rs<|end_file_name|><|fim▁begin|>use std::io::{self, Read, Write}; use std::fmt; use instruction::parameter::{AltDirect, Indirect}; use instruction::parameter::{ParamType, ParamTypeOf}; use instruction::parameter::InvalidParamType; use instruction::parameter::ind_reg::Error; use instruction::mem...
use instruction::get_value::GetValue; use machine::Machine;
<|file_name|>KnownLayerWMS.js<|end_file_name|><|fim▁begin|>/** * A test for ensuring that the WMS's registered in Known Layers are working as expected */ Ext.define('admin.tests.KnownLayerWMS', { extend : 'admin.tests.SingleAJAXTest', <|fim▁hole|> }, getDescription : function() { var baseDe...
getTitle : function() { return 'Known layer WMS availability';
<|file_name|>containers_test.go<|end_file_name|><|fim▁begin|>package main import ( "bytes" "encoding/json" "fmt" "github.com/cdwlabs/armor/pkg/config" docker "github.com/fsouza/go-dockerclient" vaultapi "github.com/hashicorp/vault/api" "github.com/pborman/uuid" // "github.com/spf13/viper" "golang.org/x/net/co...
} type TCPListener struct {
<|file_name|>ProgressBarBase.ts<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright 2017 kuniaki. * * 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, in...
* * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software.
<|file_name|>form.js<|end_file_name|><|fim▁begin|>/** * This file contains JS functionality required by mforms and is included automatically * when required. */ // Namespace for the form bits and bobs M.form = M.form || {}; /** * Initialises the show advanced functionality and events. * This should only ever hap...
this._stateInput.set('value', '0');
<|file_name|>sw-KE.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. *<|fim▁hole|> * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // THIS CODE IS GENERATED - DO NOT MODIFY // See angula...
<|file_name|>IfExp.py<|end_file_name|><|fim▁begin|>""" IfExp astroid node An if statement written in an expression form. Attributes:<|fim▁hole|> - test (Node) - Holds a single node such as Compare. - Body (List[Node]) - A list of nodes that will execute if the condition passes. - orel...
<|file_name|>jquery.blockUI.d.ts<|end_file_name|><|fim▁begin|>// Typescript type definitions for jQuery.i18n.properties 2.55.0 by M. Alsup // Project: http://malsup.com/jquery/block/ // Definitions by: Naoshi Tabuchi // Definitions: https://bitbucket.org/ntabee/definitelytyped-clone.git /// <reference path='../jquer...
interface UnblockUI { (opts?: any): void; defaults: any;
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>import datetime import httplib2 import itertools from django.conf import settings from django.db import connection from django.db.models import Sum, Max from apiclient.discovery import build from elasticsearch.helpers import bulk_index from oauth2client.client import...
if qs: log.info('Indexing %s theme user counts for %s.' % (qs.count(), qs[0].date))
<|file_name|>NodeSerializationCodes.py<|end_file_name|><|fim▁begin|>from .Node import error SYNTAX_NODE_SERIALIZATION_CODES = { # 0 is 'Token'. Needs to be defined manually # 1 is 'Unknown'. Needs to be defined manually 'UnknownDecl': 2, 'TypealiasDecl': 3, 'AssociatedtypeDecl': 4, 'IfConfigDe...
<|file_name|>DisableDynamoDBTest.java<|end_file_name|><|fim▁begin|>package com.playtika.test.dynamodb; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.test.context.runner.ApplicationContextRunne...
<|file_name|>config.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless ...
// TLSConfig holds the information needed to set up a TLS transport. type TLSConfig struct { CAFile string // Path of the PEM-encoded server trusted root certificates. CertFile string // Path of the PEM-encoded client certificate.
<|file_name|>stream.rs<|end_file_name|><|fim▁begin|>use ffi::{sockaddr, socklen_t, AF_UNIX, SOCK_STREAM}; use core::{Endpoint, Protocol}; use socket_listener::SocketListener; use stream_socket::StreamSocket; use local::LocalEndpoint; use std::fmt; use std::mem; /// The stream-oriented UNIX domain protocol. /// /// # ...
}
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//! A helper tool for generating urls and sha256 checksums of cargo-bazel binaries and writing them to a module. use std::collections::HashMap; use std::io::{BufRead, BufReader}; use std::path::{Path, PathBuf}; use std::process::Command; use std::{env, fs}; use clap::...
let mut hasher = Sha256::new(); loop { let consummed = {
<|file_name|>withPropsOnChange.tsx<|end_file_name|><|fim▁begin|>/* tslint:disable: no-console */ /* tslint:disable: no-var-requires */ /* tslint:disable: only-arrow-functions */ import * as Benchmark from "benchmark"; import * as recompose from "recompose"; import * as recompact from "recompact"; import * as React fro...
// add tests suite .add("recompose", () => {
<|file_name|>trusts.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>import analytics import anyjson from channels import Group from django.conf import settings from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from lily.accounts.api.serializers import RelatedAccountSerializer from lil...
'help_text': 'Shows the date and time for when the case should be completed.', }, 'modified': {
<|file_name|>autoscaling-plans.rs<|end_file_name|><|fim▁begin|>#![cfg(feature = "autoscaling-plans")] extern crate rusoto_autoscaling_plans; extern crate rusoto_core;<|fim▁hole|> use rusoto_autoscaling_plans::{ AutoscalingPlans, AutoscalingPlansClient, DescribeScalingPlansRequest, }; use rusoto_core::Region; #[to...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/pkg/bin/python import os, sys, time from reportlab.graphics.barcode.common import * from reportlab.graphics.barcode.code39 import * from reportlab.graphics.barcode.code93 import * from reportlab.graphics.barcode.code128 import * from reportlab.graphics.barcode....
from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle, Preformatted, PageBreak
<|file_name|>ASTPath.cpp<|end_file_name|><|fim▁begin|>/************************************************************************** ** ** This file is part of Qt Creator ** ** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies). ** ** Contact: Nokia Corporation (qt-info@nokia.com) ** ** ** GNU Lesser General...
{
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './themes';
<|file_name|>filter_dates.py<|end_file_name|><|fim▁begin|>''' Filter text output by date ranges ''' import os import csv import sys import dateutil.parser import argparse import metadata settings = None def get_settings(): ''' Return command-line settings ''' parser = argparse.ArgumentParser(description='Filter t...
parser.add_argument('-o', dest='output', required=True, help='Output CSV for filtered results')
<|file_name|>KPassivePopupMessageHandler.py<|end_file_name|><|fim▁begin|># encoding: utf-8 # module PyKDE4.kdeui # from /usr/lib/python3/dist-packages/PyKDE4/kdeui.cpython-34m-x86_64-linux-gnu.so<|fim▁hole|>import PyKDE4.kdecore as __PyKDE4_kdecore import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtGui as __PyQt4_QtG...
# by generator 1.135 # no doc # imports
<|file_name|>MovementPacketBuilder.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013-2015 DeathCore <http://www.noffearrdeathproject.net/> * Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General...
data << last_idx; data << real_path[last_idx]; // destination
<|file_name|>partials.js<|end_file_name|><|fim▁begin|>var partialsTemp = [ "login", "profile" ]; exports.partialRender = function (req, res) { var pageIndex = req.params[0]; if (partialsTemp.indexOf("" + pageIndex) > -1) { res.render("partials/" + pageIndex, {}); } else {<|fim▁hole|> }...
res.render("common/404", {});
<|file_name|>OBC_main.py<|end_file_name|><|fim▁begin|>__author__ = 'Debha' from read_data import read_data, read_map, gene_muts, make_GO_map from cluster import make_cluster_mat, make_sub_mut_map, make_GO_cluster_mat, cluster_main, clean, pairwiseDist, clustered_GOs, sim_matrix import numpy as np data_file = "../inpu...
agg_sub_clusters = [] k = 3 iterations = 20
<|file_name|>views.py<|end_file_name|><|fim▁begin|># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import sys import traceback from StringIO import StringIO import re i...
event.add('summary').value = '%s Vacation' % make_entry_title(entry, user,
<|file_name|>lottery_v3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Example program for JDEV Mercurial tutorial """ from optparse import OptionParser def calculate_result(white_balls, power_ball): """ Computation is lauched here """ for ball in white_balls: if ball < 1 or ball > 59: ...
(_, args) = parser.parse_args() if len(args) != 6: parser.error("incorrect number of arguments")
<|file_name|>vec-matching-legal-tail-element-borrow.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 /...
} }
<|file_name|>snmp_mib_remote.py<|end_file_name|><|fim▁begin|>from ..remote import RemoteModel class SnmpMibRemote(RemoteModel): """ | ``id:`` none | ``attribute type:`` string | ``mib:`` none<|fim▁hole|> | ``attribute type:`` string | ``version:`` none | ``attribute type:`` strin...
<|file_name|>MigrationRunner.java<|end_file_name|><|fim▁begin|>package com.github.mmonkey.Automator.Migrations; import com.github.mmonkey.Automator.Automator; <|fim▁hole|> protected Automator plugin; protected int version; protected int latest = 0; public void run() { while (this.version != th...
public abstract class MigrationRunner {
<|file_name|>issue-17913.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/lic...
println!("{}", a[0xFFFFFF_usize]); }
<|file_name|>ami2stomp.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # vim: set expandtab shiftwidth=4: # http://www.voip-info.org/wiki/view/asterisk+manager+events import asterisk.manager import sys,os,time import simplejson as json from stompy.simple import Client import ConfigParser from sqlobject import * ...
import logging logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)-8s %(message)s',
<|file_name|>showCSV.js<|end_file_name|><|fim▁begin|>function processData(allText) { var allTextLines = allText.split(/\r\n|\n/); var headers = allTextLines[0].split(','); var lines = []; for (var i=1; i<allTextLines.length; i++) { var data = allTextLines[i].split(','); if (data.length ...
},
<|file_name|>CassandraEndpointUserTest.java<|end_file_name|><|fim▁begin|>/** * Copyright 2014-2016 CyberVision, 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:...
public class CassandraEndpointUserTest { @Test public void hashCodeEqualsTest(){
<|file_name|>Checkbox.stories.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { action } from '@storybook/addon-actions'; import Checkbox from '.'; const onChange = action('onChange'); const defaultProps = { id: 'id1', onChange, }; const intermediate = { id: 'id2', onChange, intermediate: true...
<|file_name|>files.js<|end_file_name|><|fim▁begin|>"use strict"; var chokidar = require("chokidar"), shell = require("shelljs"), files = { "./src/pages/schema-edit/parse-schema.js" : "./gen/parse-schema.js" }; exports.watch = function() { // Make sure files stay up to date in the /gen fold...
exports.copy = function() { Object.keys(files).forEach(function(file) {
<|file_name|>postcount.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|> 投稿件数ユースケース """ import niascape from niascape.repository import postcount from niascape.utility.database import get_db def day(option: dict) -> list: with get_db(niascape.ini['database']) as db: # type: ignore # XXX セクションぶっこむとmypyさんにおこられ 辞書化すべき...
niascape.usecase.postcount
<|file_name|>AccountApplyPaymentActionForm.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2005-2011 Grameen Foundation USA * 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 ...
* http://www.apache.org/licenses/LICENSE-2.0
<|file_name|>base_graph.py<|end_file_name|><|fim▁begin|>import tensorflow as tf class BaseGraph: """ A generic computation graph class, with only two constraints are 1. The requirements for net instance passed in: - net should have method of define_net - net should have method of...
# Loss try: self.losses['mse'] = tf.reduce_mean(tf.square(self.predictions - self.y_pl)) self.losses['cross_entropy'] = tf.reduce_mean(
<|file_name|>matrix_updates.rs<|end_file_name|><|fim▁begin|>#![doc="Implementation of matrix updates "] /// std imports // external imports use num::traits::Num; /// local imports use algebra::structure::{MagmaBase}; use error::SRResult; use error::SRError; use matrix::traits::{Shape, MatrixBuffer, Strided}; use ma...
}
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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 w...
and that string values are converted to python objects '''
<|file_name|>plotter2.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as pl import numpy as np import math from matplotlib.collections import LineCollection from matplotlib.colors import colorConverter def plot(X, m, x_star, t, z_t): fig = pl.figure(figsize=(10,10)) # Draw the grid first ax = pl...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User, Group import uuid import davvy import davvy.exceptions from lxml import etree # Create your models here. class Resource(models.Model): def generate_uuid(): return str(uuid.uuid4(...
break parts.insert(0, Resource.objects.get(pk=parent.id).name) parent = parent.parent parts.append(self.name)
<|file_name|>win.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.apache.org/licens...
_ => unreachable!() };
<|file_name|>winPhpAdd.js<|end_file_name|><|fim▁begin|>Ext.define('Rd.view.i18n.winPhpAdd', { extend: 'Ext.window.Window', alias : 'widget.winPhpAdd', title : i18n('sAdd_Msgid'), layout: 'fit', autoShow: true, width: 300, iconCls: 'add', glyph: Rd.config.icnAdd, initComponent: functi...
<|file_name|>shadowmaps.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "gm.h" #include "SkPathEffect.h" #include "SkPictureRecorder.h" #include "SkShadowPaintFilterCanvas.h" #incl...
SkVector3::Make(0.2f, 0.1f, 1.0f))); builder.add(SkLights::Light::MakeDirectional(SkColor3f::Make(0.4f, 0.3f, 0.2f), SkVector3::Make(0.1f, 0.2f, 1.0f))); builder.setAmbientLightColor(SkColor3f::Make...
<|file_name|>NQueens.java<|end_file_name|><|fim▁begin|>import net.sf.javabdd.*; /** * @author John Whaley */ public class NQueens { static BDDFactory B; static boolean TRACE; static int N; /* Size of the chess board */ static BDD[][] X; /* BDD variable array */ static BDD queen; /* N-queen probl...
X[i][j].free(); queen.free(); solution.free();
<|file_name|>middleware.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from tempfile import NamedTemporaryFile from django.contrib.sites.models import Site from django.template.loader import render_to_string from django.utils import translation import re, subprocess import cStringIO as StringIO from django.conf ...
header = request.GET.get("header", None)
<|file_name|>test_MatplotlibTimelines.py<|end_file_name|><|fim▁begin|>import unittest <|fim▁hole|>from PyFoam.Basics.MatplotlibTimelines import MatplotlibTimelines theSuite=unittest.TestSuite()<|fim▁end|>
<|file_name|>ui_live.py<|end_file_name|><|fim▁begin|><|fim▁hole|># proxy module from traitsui.qt4.ui_live import *<|fim▁end|>
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> fn main() {<|fim▁hole|><|fim▁end|>
println!("cargo:rustc-flags=-l eappprxy"); }
<|file_name|>client.tpl.js<|end_file_name|><|fim▁begin|>/* globals options */ /* eslint-disable comma-dangle */ var opt = options; var socket = new WebSocket('ws://localhost:' + opt.port); socket.addEventListener('message', function(event) { var ngHotReloadCore = (opt.root || window)[opt.ns].ngHotReloadCore;...
if (data.fileType === 'script') { // If this is a js file, update by creating a script tag
<|file_name|>ComponentDescriptorValidator.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2018 The Dagger 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.a...
}
<|file_name|>MyForm.cpp<|end_file_name|><|fim▁begin|>#include "MyForm.h" <|fim▁hole|>}<|fim▁end|>
int main(){
<|file_name|>from_model.py<|end_file_name|><|fim▁begin|># Authors: Gilles Louppe, Mathieu Blondel, Maheshakya Wijewardena # License: BSD 3 clause import numpy as np from .base import SelectorMixin from ..base import BaseEstimator, clone from ..externals import six from ..exceptions import NotFittedError from ..utils...
Parameters ---------- estimator : object
<|file_name|>autodiff.py<|end_file_name|><|fim▁begin|>import numpy as np try: from aurora.ndarray import gpu_op, ndarray except ImportError: pass class Node(object): """ Node object represents a node in the computational graph""" def __init__(self): """ New node will be created by Op objects ...
if node.trans_A: row_A, col_A = col_A, row_A (row_B, col_B) = input_shapes[1]
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import json import logging from typing import List, Optional from uuid import uuid4 from django import http from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.db.utils import Operational...
@login_maybe_required @apply_access_control @require_GET def upload_results(request, ds_id: int) -> http.HttpResponse:
<|file_name|>containers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # This file is part of PARPG. # PARPG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # ...
# You should have received a copy of the GNU General Public License # along with PARPG. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>RoboticMiddlewareImpl.java<|end_file_name|><|fim▁begin|>/** */ package org.eclipse.papyrus.RobotML.impl; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.papyrus.RobotML.RobotMLPackage; import o...
*/ @Override public void eSet(int featureID, Object newValue) { switch (featureID) {
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys if __name__ == "__main__": settings_name = "settings.local" if os.name == 'nt' else "settings.remote"<|fim▁hole|> os.environ.setdefault("DJANGO_SETTINGS_MODULE", settings_name) from django...
<|file_name|>InputUtils.java<|end_file_name|><|fim▁begin|>package com.buddycloud.utils; import android.app.Activity; import android.content.Context; import android.view.inputmethod.InputMethodManager; public class InputUtils { public static void hideKeyboard(Activity activity) { InputMethodManager imm = ...
imm.hideSoftInputFromWindow(activity.getCurrentFocus().getWindowToken(), 0); } public static boolean isActive(Activity activity) {
<|file_name|>qquickrectangle.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the QtQuick module of the Qt Toolkit. ** ** $...
\brief For specifying a pen used for drawing rectangle borders on a QQuickView
<|file_name|>ExifToolsScan.py<|end_file_name|><|fim▁begin|># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import division, absolute_import, with_stateme...
except subprocess.CalledProcessError as e:
<|file_name|>events.py<|end_file_name|><|fim▁begin|># sqlalchemy/events.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core event interfaces.""...
""" def do_execute_no_params(self, cursor, statement, context): """Receive a cursor to have execute() with no parameters called.
<|file_name|>extrema_pickle.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Fri July 6 11:04:03 2015 @author: boland """ import os import datetime import numpy as np import multiprocessing as mp import matplotlib.pyplot as plt from scipy import signal from obspy import read from scipy.signal ...
into a shapely.geometry.Point object and then checks if the coord
<|file_name|>pkg.develspace.context.pc.py<|end_file_name|><|fim▁begin|># generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if...
<|file_name|>common.go<|end_file_name|><|fim▁begin|>// Copyright 2020 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/LICENSE-2...
// Apply mutates `task` based on known experiments in b.Input.Experiments.
<|file_name|>clap_app.rs<|end_file_name|><|fim▁begin|>/* Precached - A Linux process monitor and pre-caching daemon Copyright (C) 2017-2020 the precached developers This file is part of precached. Precached is free software: you can redistribute it and/or modify it under the terms of the GNU Gener...
.setting(AppSettings::DeriveDisplayOrder) .arg( Arg::with_name("config")
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::fmt; use std::fs::File; use std::io::{BufReader, BufWriter, Write}; use std::path::{Path, PathBuf}; use log::{debug, warn}; use crate::errors::{Error, Result}; use crate::keywords::sanitize_keyword; use crate::parser::file_desc...
}
<|file_name|>style_property_map.cc<|end_file_name|><|fim▁begin|>// Copyright 2016 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. #include "third_party/blink/renderer/core/css/cssom/style_property_map.h" #include "third...
default: break; }
<|file_name|>test.py<|end_file_name|><|fim▁begin|>""" This module contains some assorted functions used in tests """ from __future__ import absolute_import import os from importlib import import_module from twisted.trial.unittest import SkipTest from scrapy.exceptions import NotConfigured from scrapy.utils.boto impo...
def get_crawler(spidercls=None, settings_dict=None):
<|file_name|>matrix_alga.rs<|end_file_name|><|fim▁begin|>#[cfg(all(feature = "alloc", not(feature = "std")))] use alloc::vec::Vec; use num::{One, Zero}; use alga::general::{ AbstractGroup, AbstractGroupAbelian, AbstractLoop, AbstractMagma, AbstractModule, AbstractMonoid, AbstractQuasigroup, AbstractSemigroup,...
)*} ); impl_multiplicative_structure!(