prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>WebStream.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2014 Netherlands eScience Center. * * 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 the following location: *...
* * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>LogsResource.java<|end_file_name|><|fim▁begin|>package com.falcon.cms.web.rest; import com.falcon.cms.web.rest.vm.LoggerVM; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; import com.codahale.metrics.annotation.Timed; import org.slf4j.LoggerFactory; import org.springfram...
<|file_name|>organization.rs<|end_file_name|><|fim▁begin|>//! WARNING: This file is generated, derived from table bazaar.organization, DO NOT EDIT use chrono::datetime::DateTime; use chrono::offset::utc::UTC; use gen::column; use gen::schema; use gen::table; use rustc_serialize::json::Json; use rustc_serialize::json::...
default: None, comment: None,
<|file_name|>model.rs<|end_file_name|><|fim▁begin|>use std::borrow::Cow; use std::env; use std::mem; use std::process::Command; use std::rc::Rc; use std::sync::Arc; use std::time::{Duration, Instant}; use chrono::Duration as TimerDuration; use defer_drop::DeferDrop; use regex::Regex; use timer::{Guard as TimerGuard, T...
const DELIMITER_STR: &str = r"[\t\n ]+";
<|file_name|>tempconv.js<|end_file_name|><|fim▁begin|>if (Meteor.isClient) { Session.setDefault('degF',-40); Session.setDefault('degC',-40); Template.temperatureBoxes.helpers({ degF: function(){ return Session.get('degF'); }, degC: function(){<|fim▁hole|> } }); Template.temperatureBoxe...
return Session.get('degC');
<|file_name|>main.js<|end_file_name|><|fim▁begin|>function divReplaceWith(selector, url) { $.get(url, function(response) {<|fim▁hole|>}<|fim▁end|>
$(selector).html(response); })
<|file_name|>explicit-fail-msg.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICE...
// file at the top-level directory of this distribution and at
<|file_name|>0011_auto_20160716_1025.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-07-16 10:25 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('testCon', '0010_auto_20160...
<|file_name|>module.js<|end_file_name|><|fim▁begin|>angular .module('eventApp', [ 'ngResource', 'ui.bootstrap', 'ui.select', 'ui.bootstrap.datetimepicker', 'global', 'messagingApp', 'datasetApp' ]) .constant('HEK_URL', 'http://www.lmsal.com/hek/her') .constant('HEK_QUERY_PARAMS', { 'cosec': 2, // ask for json ...
FA : 'Filament Activation', FL : 'Flare', C_FL : 'Flare (C1+)',
<|file_name|>test_core.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import absolute_import from django.apps import apps from django.conf import settings from sentry.models import Organization, Project, ProjectKey, Team, User from sentry.receivers.core import create_default_projects, DEFAULT_SENTRY...
assert project.public is False assert project.name == "Internal" assert project.slug == "internal" team = project.teams.first()
<|file_name|>index.module.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../typings/bundle.d.ts" /> /// <reference path="index.route.ts" /> /// <reference path="index.config.ts" /> /// <reference path="index.run.ts" /> /// <reference path="main/main.controller.ts" /> /// <reference path="./components/navbar...
.service('webDevTec', WebDevTecService) .controller('MainController', MainController) .directive('acmeNavbar', acmeNavbar) .directive('acmeMalarkey', acmeMalarkey);
<|file_name|>txsizes.go<|end_file_name|><|fim▁begin|>package spvwallet // Copyright (c) 2016 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. /* Copied here from a btcd internal package*/ import ( "github.com/btcsuite/btcd/wire" ) // Worst c...
changeSize
<|file_name|>de.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- { ' (late)': ' (verspätet)', '!=': '!=', '!langcode!': 'de', '!langname!': 'Deutsch (DE)', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '""Update" ist ein optionaler Ausdruck wi...
'File successfully uploaded!': 'Datei erfolgreich hochgeladen!', 'File to be uploaded': 'Hochzuladene Datei', 'File uploaded for task {task}': 'Datei hochgeladen für Aufgabe {task}', 'First name': 'Vorname',
<|file_name|>test_notifications.py<|end_file_name|><|fim▁begin|>import collections import datetime import mock import pytz from babel import dates, Locale from schema import Schema, And, Use, Or from modularodm import Q from modularodm.exceptions import NoResultsFound from nose.tools import * # noqa PEP8 asserts fro...
self.sub.email_digest.append(self.user_3) self.sub.save() utils.move_subscription(self.blank, 'xyz42_file_updated', self.project, 'abc42_file_updated', self.private_node)
<|file_name|>kiezkassen.py<|end_file_name|><|fim▁begin|>"""Mercator proposal.""" from adhocracy_core.resources import add_resource_type_to_registry from adhocracy_core.resources import process from adhocracy_core.resources import proposal from adhocracy_core.sheets.geo import IPoint from adhocracy_core.sheets.geo impor...
proposal_meta = proposal.proposal_meta._replace( iresource=IProposal,
<|file_name|>numeral.js<|end_file_name|><|fim▁begin|>// numeral.js // version : 1.4.8 // author : Adam Draper // license : MIT // http://adamwdraper.github.com/Numeral-js/ (function () { /************************************ Constants ************************************/ var numeral, VER...
return output; } function formatTime (n, format) {
<|file_name|>permission_bubble_media_access_handler.cc<|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. #include "chrome/browser/media/webrtc/permission_bubble_media_access_h...
<|file_name|>rpc_blockchain.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPCs related to blockchainstate. Test...
}, }, 'active': False} })
<|file_name|>new-box.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/license...
}
<|file_name|>persistent-object-attribute-presenter.ts<|end_file_name|><|fim▁begin|>namespace Vidyano.WebComponents { "use strict"; @WebComponent.register({ properties: { attribute: Object, noLabel: { type: Boolean, reflectToAttribute: true, ...
required: { type: Boolean,
<|file_name|>UserAuthenticationManager.java<|end_file_name|><|fim▁begin|>package fi.rivermouth.talous.auth; import java.util.ArrayList; import java.util.List; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToke...
@Override public Authentication authenticate(Authentication authentication) { List<GrantedAuthority> grantedAuths = new ArrayList<GrantedAuthority>();
<|file_name|>location.py<|end_file_name|><|fim▁begin|>################################################################################ ## ## ## This file is a part of TADEK. ## ## ...
def _getModuleContent(module):
<|file_name|>log.go<|end_file_name|><|fim▁begin|>// Package flog implements logging utilities for flamingo package flog import "github.com/Sirupsen/logrus" type Parameter interface { Convert() map[string]interface{} } type Fields struct { Event string Error error } func (f Fields) Convert() map[string]interface{...
}
<|file_name|>fn-simple.rs<|end_file_name|><|fim▁begin|>// rustfmt-normalize_comments: true fn simple(/*pre-comment on a function!?*/ i: i32/*yes, it's possible! */ ,response: NoWay /* hose */) { fn op(x: Typ, key : &[u8], upd : Box<Fn(Option<&memcache::Item>) -> (memcache::S...
}
<|file_name|>wxdash.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.7 from __future__ import print_function # -*- coding: utf-8 -*- import wx import threading import lcm import random import Forseti import configurator BLUE = (24, 25, 141) GOLD = (241, 169, 50) class TeamPanel(wx.Panel): def __init__(self, r...
<|file_name|>encodable.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
s.emit_field("id", 0, || s.emit_uint(self.id))
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; const style = { "padding": "0 2% 0", "fontSize": "100px", "color": "white", "textShadow": "white 0 0 9px", };<|fim▁hole|><|fim▁end|>
export default function L() { return <div style={style}>L</div>; }
<|file_name|>errors.rs<|end_file_name|><|fim▁begin|>use std::error::{FromError, Error}; use std::fmt; use std::io::IoError; use std::io::process::{ProcessOutput, ProcessExit, ExitStatus, ExitSignal}; use std::str; use semver; use rustc_serialize::json; use curl; use toml::Error as TomlError; use url; use git2; pub t...
<|file_name|>data_source.py<|end_file_name|><|fim▁begin|>from django.db import models from .common_info import CommonInfo from django.utils import timezone from django.urls import reverse from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.core.validato...
_("Quantity {} is not allowed".format(value)), params={"value": value} )
<|file_name|>device_service_service_broker.py<|end_file_name|><|fim▁begin|>from ..broker import Broker class DeviceServiceServiceBroker(Broker): controller = "device_service_services" def show(self, **kwargs): """Shows the details for the specified device service service. **Inputs** ...
:type val_c_SvsvTimestamp: String | ``api version min:`` None | ``api version max:`` None
<|file_name|>Book.java<|end_file_name|><|fim▁begin|>package cvut.fit.borrowsystem.domain.entity; import org.springframework.data.mongodb.core.mapping.Document; /** * Created by Jakub Tuček on 03/06/16. */ @Document(collection = "item") public class Book extends Item { private int isbn; public Book() { ...
<|file_name|>NotificationsRegistrationsAnonymousClient.ts<|end_file_name|><|fim▁begin|>/* globals module */ /** * @module notificationsRegistrationsAnonymousClient * @description Notifications Registrations Anonymous Client provides an easy way to consume Notifications REST API end-points. In order to obtain ne...
* @returns A promise that is resolved once the get action has been performed. * @example notificationsRegistrationsAnonymousClient.get('<registration-id>') .then(function (data) { // perform success action here
<|file_name|>zh.js<|end_file_name|><|fim▁begin|>// The translations in this file are added by default. 'use strict'; module.exports = { counterpart: { names: require('date-names/en'),<|fim▁hole|> default: '%a, %e %b %Y', long: '%A, %B %o, %Y', short: '%b %e',...
pluralize: require('pluralizers/en'), formats: { date: {
<|file_name|>app.component.spec.ts<|end_file_name|><|fim▁begin|>import { NO_ERRORS_SCHEMA } from '@angular/core';<|fim▁hole|>import { inject, async, TestBed, ComponentFixture } from '@angular/core/testing'; // Load the implementations that should be tested import { AppComponent } from './app.component'; import...
<|file_name|>_codeblock.py<|end_file_name|><|fim▁begin|>class CodeBlock: """Code fragment for the readable format. """ def __init__(self, head, codes):<|fim▁hole|> self._head = '' if head == '' else head + ' ' self._codes = codes def _to_str_list(self, indent_width=0): codes = [...
<|file_name|>errors.js<|end_file_name|><|fim▁begin|>class NotFoundError extends Error { <|fim▁hole|> if (Error.hasOwnProperty('captureStackTrace')) { Error.captureStackTrace(this, this.constructor); } else { Object.defineProperty(this, 'stack', { value : (new Error()).stack }); } Object.defi...
constructor(message) { super();
<|file_name|>MMCLEVVersionedItemComponent.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2013-2015 UAH Space Research Group. * All rights reserved. This program and the accompanying materials * are made available under the terms of t...
* @return the value of the '<em>Sw Interface URI</em>' attribute. * @see #setSwInterfaceURI(String) * @see es.uah.aut.srg.micobs.mclev.library.mclevlibrary.mclevlibraryPackage#getMMCLEVVersionedItemComponent_SwInterfaceURI()
<|file_name|>testRobotAfma6.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** * * ViSP, open source Visual Servoing Platform software.<|fim▁hole|> * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU Gener...
* Copyright (C) 2005 - 2019 by Inria. All rights reserved. *
<|file_name|>CT_TablePartStyle_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Baliance. All rights reserved.<|fim▁hole|>// DO NOT EDIT: generated by gooxml ECMA-376 generator // // Use of this source code is governed by the terms of the Affero GNU General // Public License version 3.0 as published by the Free S...
//
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # """ Django settings for pdc project. Generated by 'django-admin startproject' using Django 1.8.1. For more information on this file, see<|fim▁hole|>https:/...
https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see
<|file_name|>mtadv.py<|end_file_name|><|fim▁begin|>import sys from ..pakbase import Package class Mt3dAdv(Package): """ MT3DMS Advection Package Class. Parameters ---------- model : model object The model object (of type :class:`flopy.mt3d.mt.Mt3dms`) to which this packa...
if mixelm == 0: if len(line[30:40].strip()) > 0: nadvfd = int(line[30:40]) if model.verbose:
<|file_name|>plugins.rs<|end_file_name|><|fim▁begin|>use crate::{ config::{self}, prelude::*, }; use neon::{prelude::*, result::Throw}; use std::str::FromStr; use stencila::{ config::Config, tokio::sync::MutexGuard, }; use plugins::{self, Plugin, PluginInstallation, Plugins, PLUGINS}; /// Lock the glob...
{ Ok(_) => to_json(cx, plugins.list_plugins(aliases)), Err(error) => cx.throw_error(error.to_string()), }
<|file_name|>mark.go<|end_file_name|><|fim▁begin|>/* Copyright (c) 2016 VMware, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-...
func (cmd *mark) Usage() string { return "DEVICE_PATH" }
<|file_name|>date-parser.test.js<|end_file_name|><|fim▁begin|>import DateParser from '../date-parser.js'; import ParsedInfo from '../../parsed-info'; import moment from 'moment'; Date.now = jest.fn(() => 1527130897000) test('Parses 12 Jan', () => { const dateParser = new DateParser(); dateParser.parse('12 Jan', P...
.toEqual({ value: 1526927400, startIndex: 0, endIndex: 6 }); });
<|file_name|>auth.js<|end_file_name|><|fim▁begin|>import Immutable from 'immutable'; import * as ActionType from '../../actions/auth/auth'; const defaultState = Immutable.fromJS({ loggedIn: false, }); function authReducer(state = defaultState, action) { const { loggedIn, } = action; <|fim▁hole|> retur...
switch (action.type) { case ActionType.VERIFIED_LOGIN:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2009-2014, Erkan Ozgur Yilmaz # # This module is part of oyProjectManager and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause """ Database Module =============== This is where all the m...
<|file_name|>Pagination.tsx<|end_file_name|><|fim▁begin|>import Link from "next/link"; import { FunctionComponent } from "react"; import { PagedCollection } from "types/Collection"; interface Props { collection: PagedCollection<any>; } const Pagination: FunctionComponent<Props> = ({ collection }) => { const view ...
<|file_name|>JointPDFTest.cc<|end_file_name|><|fim▁begin|>/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus * * MAUS 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 ver...
class JointPDFTest : public ::testing::Test {
<|file_name|>test_window.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apac...
PandasNotImplementedError, "method.*Expanding.*{}.*not implemented( yet\\.|\\. .+)".format(name), ):
<|file_name|>sql_rewrite.cc<|end_file_name|><|fim▁begin|>/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 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; versi...
<|file_name|>AnalysisTool.hh<|end_file_name|><|fim▁begin|>#ifndef AnalysisTool_h #define AnalysisTool_h 1 #include "StackingTool.hh" #include <sstream> // stringstream using namespace std; class AnalysisTool { public:<|fim▁hole|> virtual bool getInterest(); virtual bool getInterest(int particle, int stu...
AnalysisTool(); virtual ~AnalysisTool(); virtual void PrintTool();
<|file_name|>certs.go<|end_file_name|><|fim▁begin|>package middleware import "github.com/gin-gonic/gin" import "github.com/helderfarias/ges/api/util" func CertifiedConfig(certs *util.Certified) gin.HandlerFunc { return func(c *gin.Context) { c.Set("certs", certs)<|fim▁hole|> c.Next() } }<|fim▁end|>
<|file_name|>RectTransform.ts<|end_file_name|><|fim▁begin|>/// <reference path="Transform.ts"/> module WOZLLA { /** * RectTransform is a subclass of {@link WOZLLA.Transform}, define a rect region * for {@WOZLLA.GameObject} and a anchor mode to specify how to related to it's parent. * @class WOZLLA.R...
<|file_name|>delta history.js<|end_file_name|><|fim▁begin|>var config = { type: Phaser.CANVAS, width: 800, height: 600, parent: 'phaser-example', backgroundColor: '#2d2d2d', useTicker: true, scene: {<|fim▁hole|> update: update } }; var image; var time; var delta; var speed = (600...
preload: preload, create: create,
<|file_name|>L10nLabel.tsx<|end_file_name|><|fim▁begin|><|fim▁hole|> interface IProps extends TypographyProps { english: string; l10nKey: string; } // Displays a Text field with the label localized (only works if label is a string). export const L10nLabel: React.FunctionComponent<IProps> = props => { const...
import * as React from "react"; import Typography, { TypographyProps } from "@material-ui/core/Typography"; import { useL10n } from "./l10nHooks";
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
default_app_config = 'django_tenants.apps.DjangoTenantsConfig'
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import { YsideBar, YrightBar } from 'yrui'; import { rightbarTabs, rightbarTabLists, projectList } from '../../models/models'; let userInfo = { logo: require('../../styles/images/usr.jpg'), name: 'test', email: '...
<|file_name|>igs036crypt.cpp<|end_file_name|><|fim▁begin|>// license:BSD-3-Clause // copyright-holders:Andreas Naive,David Haywood #include "emu.h" #include "igs036crypt.h" /**************************************************************************** IGS036 encryption emulation The encryption used by the IGS036 seems...
const int group13[] = {13,10, 6, 1}; const int group12[] = {12, 8, 4, 0}; // rotation depending on all the address bits
<|file_name|>storage.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::StorageBinding; use dom...
} }
<|file_name|>source_list.py<|end_file_name|><|fim▁begin|><|fim▁hole|># # Copyright 2014-2015 Boundary, 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/licen...
<|file_name|>Test_WebFSStat.py<|end_file_name|><|fim▁begin|>from webfs import WebFSStat import stat def Test_Basic(): fields = ('st_mode', 'st_ino', 'st_dev', 'st_nlink', 'st_uid', 'st_gid', 'st_size', 'st_atime', 'st_mtime', 'st_ctime')<|fim▁hole|> def Test_InitParam(): st = WebFSStat() ...
st = WebFSStat() print st.__dict__.keys() for field in fields: assert field in st.__dict__.keys(), 'field(%s) is not in members' % field
<|file_name|>sortController.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for ag-grid v15.0.0 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby <https://github.com/ag-grid/> import { Column } from "./entities/column"; export declare class SortController { private static DEFAULT_SORTING_ORD...
private getNextSortDirection(column); getSortModel(): { colId: string;
<|file_name|>date.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # Copyright (C) 2015 Alejandro López Espinosa (kudrom) import datetime import random class Date(object): """ Descriptor for a date datum """ def __init__(self, variance, **kwargs): """ @param variance...
<|file_name|>ex9_28.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <string> #include <forward_list> <|fim▁hole|>using namespace std; void insert(forward_list<string>& fst, const string& to_find, const string& to_add); int main() { forward_list<string> fst{ "pen", "pineapple", "apple", "pen" }; ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import codecs from setuptools import setup with codecs.open('README.rst', encoding='utf-8') as f: long_description = f.read() setup( name="shadowsocks", version="2.8.2.1", license='http://www.apache.org/licenses/LICENSE-2.0', description="A fast ...
'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy',
<|file_name|>xbmc_context.py<|end_file_name|><|fim▁begin|>import sys import urllib import urlparse<|fim▁hole|>import json import xbmc import xbmcaddon import xbmcplugin import xbmcvfs from ..abstract_context import AbstractContext from .xbmc_plugin_settings import XbmcPluginSettings from .xbmc_context_ui import XbmcC...
import weakref import datetime
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.contexthub.storageapp; import android.os.Bundle; import android.support.v4.app.FragmentManager; import android.support.v4.view.MenuItemCompat; import android.support.v7.app.ActionBarActivity; import android.support.v7.widget.SearchView; import and...
@Override public void onItemClick(VaultDocument<Person> document) { menuSearch.collapseActionView(); launchEditVaultItemFragment(document);
<|file_name|>BalancedBinaryTree_rec.py<|end_file_name|><|fim▁begin|>""" Definition of TreeNode: class TreeNode: def __init__(self, val): self.val = val self.left, self.right = None, None """ class Solution: """ @param root: The root of binary tree. @return: True if this Binary tree is Ba...
if abs(l_h - r_h) < 2: return True, max(l_h, r_h) + 1 return False, 0
<|file_name|>test_irc_channel.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ :Copyright: 2007-2015 `Jochen Kupperschmidt <http://homework.nwsnet.de/>`_ :License: MIT, see LICENSE for details.<|fim▁hole|>from __future__ import unicode_literals from unittest import TestCase from nose2.tools import params ...
"""
<|file_name|>export.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2015 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the t...
) for name, key in self.multiple: source_directory = os.path.join(base_path, name)
<|file_name|>test_quicklinks.py<|end_file_name|><|fim▁begin|># Copyright 2022 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.test import TransactionTestCase from myuw.models import VisitedLinkNew, CustomLink, PopularLink, User from myuw.test import get_request_with_user from myuw.dao...
<|file_name|>contexts.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Etalage -- Open Data POIs portal # By: Emmanuel Raviart <eraviart@easter-eggs.com> # # Copyright (C) 2011, 2012 Easter-eggs # http://gitorious.org/infos-pratiques/etalage # # This file is part of Etalage. # # Etalage is free software; you...
languages = self.lang if not languages: return gettext.NullTranslations() if not isinstance(languages, list):
<|file_name|>Tooltip.Props.js<|end_file_name|><|fim▁begin|>"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var TooltipDelay; (function (TooltipDelay) { TooltipDelay[TooltipDelay["zero"] = 0] = "zero"; TooltipDelay[TooltipDelay["medium"] = 1] = "medium"; })(TooltipDelay = exports.Too...
<|file_name|>references-test.ts<|end_file_name|><|fim▁begin|>import { CONSTANT_TAG, DirtyableTag, UpdatableTag, RevisionTag, Reference, CachedReference, combine } from '@glimmer/reference'; import { dict } from '@glimmer/util'; class UpdatableReference<T> implements Reference<T> { public tag: Rev...
<|file_name|>combination-sum-ii.py<|end_file_name|><|fim▁begin|># coding: utf-8 class Solution(object): @staticmethod def dfs(candidates, target, vis, res, cur_idx, sum): if sum > target: return if sum == target: ans = [candidates[i] for i in cur_idx if i >= 0] ...
vis[i] = 0 cur_idx.pop()
<|file_name|>frames-mips.cc<|end_file_name|><|fim▁begin|>// Copyright 2011 the V8 project authors. 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 must ...
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
<|file_name|>binary_16_byte.py<|end_file_name|><|fim▁begin|>""" Binary 16 byte is an export plugin to convert gcode into 16 byte binary segments. An export plugin is a script in the export_plugins folder which has the functions getOuput, isArchivable and writeOutput. It is meant to be run from the export tool. To en...
<|file_name|>test_cert_verification.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated do...
# in all copies or substantial portions of the Software. #
<|file_name|>database.py<|end_file_name|><|fim▁begin|>class DatabaseRouter(object): ''' These functions are called when Django accesses the database. Returns the name of the database to use depending on the app and model. Returning None means use default. ''' def db_for_read(self, model, **hin...
allow = allow and model._meta.app_label == 'OGRgeoConverter'
<|file_name|>ZEofHeader.java<|end_file_name|><|fim▁begin|>/* * Jermit * * The MIT License (MIT) *<|fim▁hole|> * 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, includ...
* Copyright (C) 2018 Kevin Lamonte *
<|file_name|>testMessageKeys.py<|end_file_name|><|fim▁begin|>import json import re packageJson = '../../../package.json' with open(packageJson) as data_file: data = json.load(data_file) config = '../../pkjs/config.js'<|fim▁hole|> suggestKey = re.search(r"messageKey\"\:(.[^,]*)", s) if suggestKey: ...
with open(config) as conf_file: s = conf_file.readline() keys = [] while (s):
<|file_name|>mod.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/licenses/LI...
pub use self::C::T;
<|file_name|>Ewens&uniform+RSK_rho_1.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Apr 27 13:35:59 2017 @author: mkammoun.lct """ import numpy as np import matplotlib.pyplot as pl from bisect import bisect import math n=200 n2=10000 def per(theta,n): perm=[] fo...
per(0.1,1000) def RSK(p): '''Given a permutation p, spit out a pair of Young tableaux'''
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import appActions from './application' import todosActions from './todos' import filterActions from './filter' import commentsActions from './comments' import userActions from './user' export { appActions, todosActions, filterActions, commentsActions, userAc...
export * from './todos'
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User<|fim▁hole|> from website.models import Issue # Create your models here. class Comment(models.Model): parent = models.ForeignKey('self', null=True, on_delete=models.CASCADE) issue = models.ForeignKey(Issue, on_dele...
from django.db import models from django.utils import timezone
<|file_name|>ODSOColumnImpl.java<|end_file_name|><|fim▁begin|>/* ** GENEREATED FILE - DO NOT MODIFY ** */ package com.wilutions.mslib.office.impl; import com.wilutions.com.*; @SuppressWarnings("all") @CoClass(guid="{C09B8C5A-A463-DB41-5DAE-69E7A5F7FCBC}") public class ODSOColumnImpl extends Dispatch implements c...
return (Integer)obj; }
<|file_name|>SpeedyshareCom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Test links: # http://speedy.sh/ep2qY/Zapp-Brannigan.jpg import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SpeedyshareCom(SimpleHoster): __name__ = "SpeedyshareCo...
LINK_FREE_PATTERN = r'<a href=\'(.*)\'><img src=/gf/slowdownload\.png alt=\'Slow Download\' border=0'
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.http import HttpResponse, HttpRequest, QueryDict, HttpResponseRedirect import json import conekta from store.models import * from store.forms import * ### PETICIONES API PARA EL CARRITO def delBasket(request): id = str(...
status = 'ok' request.session['basket'] = [id]
<|file_name|>fake_provisioner.go<|end_file_name|><|fim▁begin|>// Copyright 2012 tsuru 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 provisiontest import ( "fmt" "io" "io/ioutil" "net/url" "sort" "sync" "sync/atomic"...
stdout.Write(output) case fail := <-p.failures:
<|file_name|>htmlcollection.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::HTMLCollectionBi...
// Default values for the cache cached_version: Cell::new(root.inclusive_descendants_version()),
<|file_name|>api.go<|end_file_name|><|fim▁begin|>// Package api pulls 4chan board and thread data from the JSON API into native Go data structures. package api import ( "encoding/json" "fmt" "io" "net/http" pathpkg "path" "sync" "time" ) var ( // Whether or not to use HTTPS for requests. SSL bool = false //...
Posts []*jsonPost `json:"posts"` }
<|file_name|>p0012.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import math from collections import Counter import operator import functools DICT_FACTORS = dict() def factorize(n): if n in DICT_FACTORS: return DICT_FACTORS[n] cnt = Counter() sqrtn = int(math.sqrt(n)) + 1 for i in r...
else: cnt[n] += 1 DICT_FACTORS[n] = cnt
<|file_name|>http_cache.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 https://mozilla.org/MPL/2.0/. */ #![deny(missing_docs)] //! A memory cache implementing t...
return false;
<|file_name|>gpu_device_plugin_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 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/LICE...
framework.ExpectNoError(err)
<|file_name|>fetch_info.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # @Author: karthik # @Date: 2016-12-10 21:40:07 # @Last Modified by: chandan # @Last Modified time: 2016-12-11 12:55:27 from models.portfolio import Portfolio from models.company import Company from models.position import Position imp...
if len(symbols) >= 2: symbol_string = ", ".join(symbols[:-1]) + " and " + symbols[-1]
<|file_name|>issue-18576.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...
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
<|file_name|>test04-out-ds.js<|end_file_name|><|fim▁begin|>var $M = require("@effectful/debugger"), $x = $M.context, $ret = $M.ret, $unhandled = $M.unhandled, $brk = $M.brk, $lset = $M.lset, $mcall = $M.mcall, $m = $M.module("file.js", null, typeof module === "undefined" ? null : module, nul...
$.goto = 3; $p = ($x.call = eff)(2); $.state = 3;
<|file_name|>0006_auto__add_field_tttrip_date.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # A...
'trip_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'})
<|file_name|>rpcrawtransaction.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2013 The paccoin developer // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <boost/assign/...
if (params.size() > 1) fVerbose = (params[1].get_int() != 0); CTransaction tx;
<|file_name|>verbose_fixtures.py<|end_file_name|><|fim▁begin|>from contextional import GCM with GCM("A") as A: @GCM.add_setup def setUp(): pass @GCM.add_teardown def tearDown(): pass with GCM.add_group("B"): @GCM.add_setup def setUp(): pass ...
" # setup w/ description ",