prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>feed_parse_extractMtllightnovelCom.py<|end_file_name|><|fim▁begin|>def extractMtllightnovelCom(item): ''' Parser for 'mtllightnovel.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ...
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type) return False
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import Y...
base=TypedListType( allowed_type=RestrictedClassType( base_type=six.text_type,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"""Tests for the HomematicIP Cloud component."""
<|file_name|>process.py<|end_file_name|><|fim▁begin|># Copyright 2014 Red Hat, 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...
This view displays process models defined by :class:`openstack.common.report.models.process.ProcessModel` """
<|file_name|>issue-43483.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
#![allow(unused_variables)] trait VecN {
<|file_name|>flow_log_status_parameters.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....
'target_resource_id': {'required': True}, }
<|file_name|>mt_system.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- DOCUMENTATION = ''' module: mt_system.py author: - "Valentin Gurmeza" version_added: "2.4" short_description: Manage mikrotik system endpoints requirements: - mt_api description: - manage mikrotik system parameters options:<|fim▁hole|>...
hostname: description:
<|file_name|>midnight_caravan_superscraper.js<|end_file_name|><|fim▁begin|>var casper = require('casper').create(), x = require('casper').selectXPath, config = require('config.json'),<|fim▁hole|> moment = require('moment'); casper.start("http://caravantomidnight.com/show-archive/"); var currentMonthUrl = "http:/...
fs = require('fs'),
<|file_name|>response_test.py<|end_file_name|><|fim▁begin|>from contextlib import contextmanager from _pytest.python import FixtureRequest import mock from mock import Mock import pyramid.testing from webob.multidict import MultiDict import pyramid_swagger import pyramid_swagger.tween import pytest<|fim▁hole|>from pyr...
import simplejson from pyramid.config import Configurator from pyramid.interfaces import IRoutesMapper from pyramid.registry import Registry
<|file_name|>lightbox.js<|end_file_name|><|fim▁begin|>// ----------------------------------------------------------------------------------- // // Lightbox v2.04 // by Lokesh Dhakar - http://www.lokeshdhakar.com // Last Modification: 2/9/08 // // For more information, visit: // http://lokeshdhakar.com/projects/lightbox...
} else {
<|file_name|>test_commands_prime.py<|end_file_name|><|fim▁begin|># -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by...
'Expected a part directory for the build0 part')
<|file_name|>sprite.rs<|end_file_name|><|fim▁begin|>/* use glium::texture::Texture2d; use glium; use glium::backend::glutin_backend::GlutinFacade; use glium::{VertexBuffer, IndexBuffer}; use graphics::vertex::Vertex; pub struct Sprite { texture: Texture2d, vertex_buffer: VertexBuffer<Vertex>, index_buffer...
pos: [0.5, -0.5], tex_coords: [0.0, 1.0], };
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># Imports from django.conf.urls import url from .models import OurFoto from .views import HomeFoto, ShowFoto, DeleteFoto, AddFoto, \ EditFoto, SearchFoto # Urls for app urlpatterns = [ url(r'^$', HomeFoto.as_view(model = OurFoto), name = 'index'), url(r'^...
url(r'^edit_foto/(?P<pk>\d+)/$', EditFoto.as_view(model = OurFoto), name = 'edit_foto'), url(r'^search_foto/$', SearchFoto.as_view(), name = 'search_foto'), url(r'^delete_foto/(?P<pk>\d+)/$', DeleteFoto.as_view(model = OurFoto), name = 'delete_foto')
<|file_name|>lockutils.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # 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 co...
<|file_name|>blueprints.js<|end_file_name|><|fim▁begin|>/** * Blueprint API Configuration * (sails.config.blueprints) * * These settings are for the global configuration of blueprint routes and * request options (which impact the behavior of blueprint actions). * * You may also override any of these settings on ...
* * * `rest` blueprint routes are enabled by default, and are suitable for use * * in a production scenario, as long you take standard security precautions *
<|file_name|>InternalAdminActions.java<|end_file_name|><|fim▁begin|>package net.alloyggp.tournament.internal.admin; import net.alloyggp.escaperope.Delimiters; import net.alloyggp.escaperope.RopeDelimiter; import net.alloyggp.escaperope.rope.Rope; import net.alloyggp.escaperope.rope.ropify.SubclassWeaver; import net.al...
public class InternalAdminActions { private InternalAdminActions() { //Not instantiable
<|file_name|>base.py<|end_file_name|><|fim▁begin|>try: from StringIO import StringIO except ImportError: from io import StringIO from inspect import isgenerator class Element(object): tag = '' self_closing = False def __init__(self, *children, **attrs): if children and isinstance(children...
def __call__(self, *children): self.add_children(children) return self
<|file_name|>regular_rods.py<|end_file_name|><|fim▁begin|># * ************************************************************* # * # * Soft Active Mater on Surfaces (SAMoS) # * # * Author: Rastko Sknepnek # * # * Division of Physics # * School of Engineering, Physics and Mathematics # * University of Dund...
def __init__(self, Lx, Ly, N, lx, ly, sigma, l): self.L = (Lx,Ly) self.N = N self.lx = lx
<|file_name|>pipelines.js<|end_file_name|><|fim▁begin|>const log = require('../logger').gateway; const policies = require('../policies'); const EgContextBase = require('./context'); const express = require('express'); const vhost = require('vhost'); const ConfigurationError = require('../errors').ConfigurationError; /...
const gatewayConfig = config.gatewayConfig;
<|file_name|>bench.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python import pygame from pygame.locals import * import time def init(): pygame.display.set_mode((800, 600)) def test_1(): def test(pressed, i): if i == 0: return if pressed[K_a]: print "K_a" if pressed[K_b]: print "K_b" test(pr...
# test 2 differents keys test(pressed, 100) def test_2():
<|file_name|>gcc.py<|end_file_name|><|fim▁begin|># Build Code import os import subprocess import re class GCC: def __init__(self): self.enter_match = re.compile(r'Entering directory') self.leave_match = re.compile(r'Leaving directory') def can_build(self, dirname, ext): if ext in (".c", ".h", ".cpp", ".hpp"...
return errorLines
<|file_name|>base_model.py<|end_file_name|><|fim▁begin|>""" Models initializer. """ from functools import wraps from flask_sqlalchemy import SQLAlchemy from server import app from utils import time_to_json from errors import DataBaseException DB = SQLAlchemy(app) def db_factory_func(func): """ Database conne...
<|file_name|>angular-locale_luo.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); retur...
<|file_name|>scssNavigation.js<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *---...
uri.with({ path: uri.path + 'index.scss' }).toString(), uri.with({ path: uri.path + '_index.scss' }).toString()
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 # # ...
.filter_by(instance_uuid=instance))
<|file_name|>006_ZigZag_Conversion.py<|end_file_name|><|fim▁begin|>class Solution(object): # def convert(self, s, numRows): # """ # :type s: str # :type numRows: int # :rtype: str # """ # ls = len(s) # if ls <= 1 or numRows == 1: # return s # ...
# col += 1 # row -= 1
<|file_name|>event.ts<|end_file_name|><|fim▁begin|>export interface IEvent { EventId: number; Name: string; Description: string; StartTime: Date;<|fim▁hole|><|fim▁end|>
EndTime: Date; }
<|file_name|>common.go<|end_file_name|><|fim▁begin|>package ipns import ( "context" "github.com/ipfs/go-ipfs/core" nsys "github.com/ipfs/go-ipfs/namesys" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" path "gx/ipfs/QmT3rzed1ppXefourpmoZ7tyVQfsGPQZ1pHDngLmCvXxd3/go-path" ft "gx/ipfs...
err = n.Pinning.Flush()
<|file_name|>MonsterHeadingCalculator.Tests.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include <gtest/gtest.h> #include "MonsterHeadingCalculator.h" namespace PacMan { namespace Logic { namespace Tests { using namespace Logic; void test_calculate_sets_heading...
Row{1},
<|file_name|>annotation.py<|end_file_name|><|fim▁begin|>from bson import ObjectId import jsonschema import numpy from girder.exceptions import ValidationException from girder.models.file import File from girder.models.model_base import Model from girder.models.upload import Upload from girder.utility.acl_mixin import ...
if featureValue == 1.0 ]) superpixelsLabelData = Image().superpixelsData(image)
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import re def pythonize_camelcase_name(name): """ GetProperty -> get_property """ def repl(match): return '_' + match.group(0).lower() s = re.sub(r'([A-Z])', repl, name) if s.startswith('_'): return s[1:] else:<|fim▁hol...
return s
<|file_name|>note-search.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnChanges } from '@angular/core'; import 'rxjs/add/observable/of'; import { Observable } from 'rxjs/Observable'; import { Subject } from 'rxjs/Subject'; // Observable operators import 'rxjs/add/operator/catch...
this.notes = null; this.ngOnChanges();
<|file_name|>model_io.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'maxim' import os # noinspection PyUnresolvedReferences from models import * from util import * class ModelInfo(object): def __init__(self, path, model_class, model_params, run_params): self.path ...
<|file_name|>lc993-cousins-in-binary-tree.py<|end_file_name|><|fim▁begin|># coding=utf-8 import unittest """993. Cousins in Binary Tree https://leetcode.com/problems/cousins-in-binary-tree/description/ In a binary tree, the root node is at depth `0`, and children of each depth `k` node are at depth `k+1`. Two nodes ...
<|file_name|>base-paginator-spec.js<|end_file_name|><|fim▁begin|>import chai from 'chai'; import chaiAsPromised from 'chai-as-promised'; import sinon from 'sinon'; import sinonChai from 'sinon-chai'; import {BasePaginator, errors} from './base-paginator'; import PaginatorError from '../paginator-error'; import * as qu...
<|file_name|>solver_03_precondition_sor.cc<|end_file_name|><|fim▁begin|>// --------------------------------------------------------------------- // // Copyright (C) 2004 - 2015 by the deal.II authors // // This file is part of the deal.II library. // // The deal.II library is free software; you can use it, redistribute...
// version 2.1 of the License, or (at your option) any later version. // The full text of the license can be found in the file LICENSE at // the top level of the deal.II distribution.
<|file_name|>bitcoin_et.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="et" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Catcoin</source> ...
</message>
<|file_name|>ClipStackTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "Test.h" #if SK_SUPPORT_GPU #include "GrReducedClip.h" #endif #include "SkClipStack.h" #include "SkPat...
stack.clipDevRect(rectA, SkRegion::kIntersect_Op, false); stack.clipDevRect(rectB, gOps[op], false);
<|file_name|>MetricsControllerTest.java<|end_file_name|><|fim▁begin|>package mcia.building.viewer.controller; import mcia.building.viewer.domain.Point; import mcia.building.viewer.metrics.MetricsRepository; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.bean...
Map<String, Point> result = new HashMap<>(); result.put("test1", new Point(1000, 24.7));
<|file_name|>test_source_data_file.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import datetime import django from django.utils.timezone import now from django.test import TransactionTestCase from mock import call, patch from job.seed.metadata import SeedMetadata from source.configuration....
'dataEnded': ended, 'dataTypes': types, 'newWorkspacePath': new_workspace_path }
<|file_name|>dcxtab.cpp<|end_file_name|><|fim▁begin|>/*! * \file dcxtab.cpp * \brief blah * * blah * * \author David Legault ( clickhere at scriptsdb dot org ) * \version 1.0 * * \b Revisions * * © ScriptsDB.org - 2006 */ #include "defines.h" #include "Classes/dcxtab.h" #include "Classes/dcxd...
//DrawText(idata->hDC, label.to_chr(), label.len(), &rect, DT_SINGLELINE | DT_TOP | DT_NOPREFIX); // allow mirc formatted text.
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/** * #config * * Copyright (c)2011, by Branko Vukelic * * Configuration methods and settings for Postfinance. All startup configuration * settings are set using the `config.configure()` and `config.option()` * methods. Most options can only be set once, and s...
// Do not allow unknown options to be set throw new PostFinanceError('system', 'Unrecognized configuration option', option); } }
<|file_name|>func_noerror_query_heir.py<|end_file_name|><|fim▁begin|># pylint:disable=R0201 from OpenOrange import * from User import User from RetroactiveAccounts import RetroactiveAccounts class HeirFinder(RetroactiveAccounts): def doReplacements(self, txt): d = {1:"ONE", 2:"TWO"} us = User.bri...
#pylint:disable=E6601 query8.open() #there will be missing tables here
<|file_name|>feed_parse_extractRoontalesCom.py<|end_file_name|><|fim▁begin|>def extractRoontalesCom(item): '''<|fim▁hole|> if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated'), ('Loiterous', 'Loiterous', 'oel'),...
Parser for 'roontales.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
<|file_name|>oldinstans.js<|end_file_name|><|fim▁begin|>function addClass(elem, className) { elem.attr('class', function(index, classNames) { if (typeof classNames == 'undefined') { classNames = ''; } var newcls = classNames + ' ' + className; console.log('ClassNamesA = ' + newcls); return newcls;}); } fun...
<|file_name|>jsonp.js<|end_file_name|><|fim▁begin|>// Copyright 2012 Mark Cavage, Inc. All rights reserved. 'use strict'; ///--- Exports /** * JSONP formatter. like JSON, but with a callback invocation. * * Unicode escapes line and paragraph separators. * * @public * @function formatJSONP * @param {Object...
res.setHeader('Content-Length', Buffer.byteLength(data));
<|file_name|>Messages.tsx<|end_file_name|><|fim▁begin|>import React from "react" import { Dimensions, FlatList, RefreshControl, ViewStyle } from "react-native" import { createPaginationContainer, graphql, RelayPaginationProp } from "react-relay" import styled from "styled-components/native" import { PAGE_SIZE } from "...
onContentSizeChange={(_width, height) => { this.setState({ shouldStickFirstMessageToTop: height < this.flatListHeight,
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>from multiprocessing import Process import pytest from .mock_server.server import start <|fim▁hole|>@pytest.hookimpl def pytest_sessionstart(session): global server_process server_process = Process(target=start) server_process.start() @pytest.hookimpl ...
server_process = None
<|file_name|>tcp.go<|end_file_name|><|fim▁begin|>package tcp import ( "expvar" "fmt" "time" "github.com/elastic/beats/libbeat/common" "github.com/elastic/beats/libbeat/logp" "github.com/elastic/beats/packetbeat/flows" "github.com/elastic/beats/packetbeat/protos" "github.com/tsg/gopacket/layers" ) const TCP...
<|file_name|>GitHubService.java<|end_file_name|><|fim▁begin|>package com.kkk.retrofitdemo; import com.kkk.retrofitdemo.bean.Repo; import com.kkk.retrofitdemo.bean.SearchRepoResult; import java.util.List; import retrofit2.Call; import retrofit2.http.GET;<|fim▁hole|>import retrofit2.http.Query; import rx.Observable; ...
import retrofit2.http.Path;
<|file_name|>makeplot.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import numpy as np import pdb if __name__ == "__main__": fig, ax = plt.subplots(figsize=(10,5)) for clients in (10, 50, 100, 200): median_data = np.zeros(5) for k in (1, 2, 3, 4, 5): data = np...
axes = plt.gca() axes.set_ylim([0, 0.5])
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>""" Utilities for instructor unit tests """ import datetime import json import random import six from pytz import UTC from util.date_utils import get_default_time_display<|fim▁hole|> FEATURES = [] def __init__(self): for feature in self.FEATURES: ...
class FakeInfo(object): """Parent class for faking objects used in tests"""
<|file_name|>backup_config.go<|end_file_name|><|fim▁begin|>// This file is part of the Smart Home // Program complex distribution https://github.com/e154/smart-home // Copyright (C) 2016-2021, Filippov Alex // // This library is free software: you can redistribute it and/or // modify it under the terms of the GNU Lesse...
Path: cfg.SnapshotDir, PgUser: cfg.PgUser, PgPass: cfg.PgPass,
<|file_name|>polyint.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy.special import factorial from scipy.lib.six import xrange __all__ = ["KroghInterpolator", "krogh_interpolate", "BarycentricInterpolator", "b...
def __call__(self, x): """ Evaluate the interpolant
<|file_name|>test_make_movie.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Integration test which checks the various parameters for makemovie.py Copyright 2010-2013 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ im...
Requires Pillow being installed """ def setup_method(self, method):
<|file_name|>flake8.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tg...
<|file_name|>check_static_recursion.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<|fim▁hole|>// // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE...
// http://rust-lang.org/COPYRIGHT.
<|file_name|>co_group_by_key_test.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...
import json
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># encoding=utf8 # pylint: disable=W0611 """ The utility Author: lipixun Created Time : 日 2/12 14:14:50 2017 File Name: utils.py<|fim▁hole|> from spec import DataPath # Import json try: import simplejson as json except ImportError: import json # ...
Description: """
<|file_name|>fd-uml-diagram-test.js<|end_file_name|><|fim▁begin|>import { moduleForComponent, test } from 'ember-qunit'; //import hbs from 'htmlbars-inline-precompile'; moduleForComponent('fd-uml-diagram', 'Integration | Component | fd-uml-diagram', { integration: true }); test('it renders', function(assert) { //...
// enableEditLinks = mockLinkFunction // enableWrapBaseLinks = mockLinkFunction // disableEditLinks = mockLinkFunction //}}`);
<|file_name|>calculate_md5_hashes.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 """ Note: This does not sort the output. For sorting simply run: $ sort md5sums.txt > md5sums_sorted.txt """ import sys import glob import csv import hashlib from multiprocessing import Pool def md5_file(filename...
image_files = glob.iglob("{}/{}/*".format(base_directory,d)) for hash_and_name in pool.imap(md5_file, image_files):
<|file_name|>gcp_spanner_database_facts.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*-<|fim▁hole|># GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GE...
# # Copyright (C) 2017 Google
<|file_name|>PersonalFiles.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react' import PropTypes from 'prop-types' import ModalsContainer from '../containers/ModalsContainer' import { bytesToSize } from '../common' const Store = window.require('electron-store') <|fim▁hole|>import './ViewSwitcher.c...
<|file_name|>UnitOfWork.ts<|end_file_name|><|fim▁begin|>/* eslint-disable @typescript-eslint/no-explicit-any */ import { diff } from 'deep-diff'; import { isImmutable } from './isImmutable'; import Mapping from './Mapping'; import ClassMetadata, { DefaultSerializedModelType, } from './Mapping/ClassMetadata'; import A...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # gedit CodeCompletion plugin # Copyright (C) 2011 Fabio Zendhi Nagao # # 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 Foundatio...
# 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|>generate-api.py<|end_file_name|><|fim▁begin|>import datetime import sys import os.path import pprint from inspect import getmembers, isclass from collections import defaultdict from optparse import make_option from django.core.management.base import BaseCommand, CommandErr...
plural = str(obj._meta.verbose_name_plural) else: plural = obj.__name__
<|file_name|>boot.js<|end_file_name|><|fim▁begin|>module.exports = function Boot(game) { return { preload: function(){ game.load.image('mars', '/assets/images/mars.png'); }, create: function(){ //This is just like any other Phaser create function console.log('Boot was just loaded'); ...
}, update: function(){ //Game logic goes here this.mars.x += 1;
<|file_name|>postcss.config.js<|end_file_name|><|fim▁begin|>module.exports = { plugins: [<|fim▁hole|> require('autoprefixer'), require('postcss-nested') ] }<|fim▁end|>
<|file_name|>bitcoin_ca_ES.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ca_ES" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Chromium</sour...
</message> <message> <location line="+0"/> <source>Do you want to proceed?</source>
<|file_name|>boss_emerald_dragons.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014-2017 StormCore * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, ...
* --- * --- Dragonspecific scripts and handling: LETHON * --- *
<|file_name|>summaries.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::{ abstract_state::{AbstractState, AbstractValue, BorrowState, Mutability}, error::VMError, function_instantiation_for_state, state_control_flow, state_create_...
unpack_instantiation_for_state!(),
<|file_name|>NettyWSTransport.java<|end_file_name|><|fim▁begin|>/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You un...
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "flag" "os" "os/exec" "time" ) const HardTimeout = 5 * time.Minute var (<|fim▁hole|> SubProcess bool ExitCode int Message string ) func init() { flag.DurationVar(&LoopInterval, "loop", time.Millisecond*250, "Loop interval") f...
LoopInterval time.Duration DieAfter time.Duration
<|file_name|>cashier.js<|end_file_name|><|fim▁begin|>function loadCashier(){ var data = 'action=loadCashier'; data += '&' + $('#osForm').serialize(); $.ajax({ url: 'OverShortCashierPage.php', data: data, success: function(response){<|fim▁hole|> $('#display').html(response); $('#countSCA').focus(); }...
<|file_name|>rank.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2014 Daniele Simonetti # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License...
for s in self.skills: out['skills'].append( s.to_dict() )
<|file_name|>effect.js<|end_file_name|><|fim▁begin|>///////////////////////////////////////////////////////////////////////////////<|fim▁hole|>/////////////////////////////////////////////////////////////////////////////// //// IMPORTS ////////////////////////////////////////////////////////////////// import { toJs }...
// // Effect //
<|file_name|>ICell.java<|end_file_name|><|fim▁begin|>package gov.ic.geoint.spreadsheet; /** * */<|fim▁hole|> * * @return */ public int getColumnNum(); /** * * @return */ public int getRowNum(); /** * * @return */ public String getValue(); }<|fim▁end|...
public interface ICell extends Hashable { /**
<|file_name|>message.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either ver...
header.size = payload.len() as u16;
<|file_name|>wrapper.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/. */ //! A safe wrapper for DOM nodes that prevents layout from mu...
<|file_name|>index-tests.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import { Timeline, TimelineEvent, TimelineBlip } from "."; export const UseTimelineBlip = ( <Timeline> <TimelineBlip title="Remove PropTypes warning" iconStyle={{ marginLeft: 1, marginTop: 0 }} icon={<i cl...
> I received the payment for $543. Should be shipping the item within a couple of hours.
<|file_name|>TrayNotifierCore.py<|end_file_name|><|fim▁begin|># coding=utf-8 ##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets, QtGui import logging ##################################### # Global Variables #################...
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime import json import mock import pytest import requests_mock from constance.test import override_config from django.conf import settings from django.contrib.sites.models import Site from django.core import mail from django.te...
<|file_name|>ExampleUnitTest.java<|end_file_name|><|fim▁begin|>package com.example.android.popularmoviesapp; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest {<|fim▁hole|> public void additi...
@Test
<|file_name|>camel_case_splitter.py<|end_file_name|><|fim▁begin|>def split_camel_case(input): def remove_camel_case(camel_case_input): no_camel_case = "" if len(camel_case_input) <= 0: return "" no_camel_case += camel_case_input[0].lower()<|fim▁hole|> no_camel_case...
for c in camel_case_input[1:]: if c.isupper(): no_camel_case += "_" + c.lower() else:
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>""" Tests for course_info """ from django.test.utils import override_settings from django.core.urlresolvers import reverse from rest_framework.test import APITestCase from xmodule.modulestore.tests.factories import CourseFactory from xmodule.modulestore.tests.django_ut...
Tests for /api/mobile/v0.5/course_info/... """ def setUp(self):
<|file_name|>api_op_ImportKeyPair.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package ec2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ImportKeyPairInput struct { _ struct{} `type:"structure"...
// A unique name for the key pair. // // KeyName is a required field
<|file_name|>rootnode.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009 Ashley J. Wilson # This software is licensed as described in the file COPYING in the root # directory of this distribution. from storenode import StoreNode from bundlenode import BundleNode from packagenode import PackageNode class RootNode(St...
"""
<|file_name|>updates.js<|end_file_name|><|fim▁begin|>'use strict'; // Modules const _ = require('lodash'); const GitHubApi = require('github'); const Promise = require('./promise'); const semver = require('semver'); module.exports = class UpdateManager { /* * Constructor */ constructor() { this.githubAp...
<|file_name|>tpu_outside_compilation_test.py<|end_file_name|><|fim▁begin|># Copyright 2020 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 # # ...
<|file_name|>edit_distance_op_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
self._testEditDistance( hypothesis=(hypothesis_indices, hypothesis_values, hypothesis_shape), truth=(truth_indices, truth_values, truth_shape),
<|file_name|>signer.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either vers...
} /// Check if the given address is the signing address. pub fn is_address(&self, address: &Address) -> bool {
<|file_name|>e621.py<|end_file_name|><|fim▁begin|>################################################################ # File: e621.py # Title: MANGAdownloader's site scraper # Author: ASL97/ASL <asl97@outlook.com> # Version: 1 # Notes : DON'T EMAIL ME UNLESS YOU NEED TO # TODO: *blank* ####################################...
id_supported = False _type = ["1","10"]
<|file_name|>halfscale.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). ** Contact: Qt Software Information (qt-info@nokia.com) ** ** This file is part of the Graphics Dojo project on Qt...
} }
<|file_name|>GitDocument.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (C) 2008, 2009 Robin Rosenberg <robin.rosenberg@dewire.com> * * All rights reserved. This program and the accompanying materials * are made available under the term...
<|file_name|>cudf.py<|end_file_name|><|fim▁begin|>import sys import warnings try: import itertools.izip as zip except ImportError: pass from itertools import product import numpy as np from .. import util from ..dimension import dimension_name from ..element import Element from ..ndmapping import NdMapping,...
nvdim = vdim_param.bounds[1] if isinstance(vdim_param.bounds[1], int) else None
<|file_name|>wal.rs<|end_file_name|><|fim▁begin|>// CITA // Copyright 2016-2017 Cryptape Technologies LLC. // This program is free software: you can redistribute it // and/or modify it under the terms of the GNU General Public // License as published by the Free Software Foundation, // either version 3 of the License,...
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE. See the GNU General Public License for more details.
<|file_name|>VaesTolorro.js<|end_file_name|><|fim▁begin|>const DrawCard = require('../../drawcard.js'); class VaesTolorro extends DrawCard { setupCardAbilities(ability) { this.interrupt({ when: { onCharacterKilled: event => event.card.getPower() >= 1 }, c...
this.game.addMessage('{0} kneels {1} to move {2} power from {3} to {1}', this.controller, this, power, pendingCard);
<|file_name|>buildlocal.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013-2015 Red Hat, Inc. # Copyright (C) 2015 Thomas Spura # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or ...
for loc in locations: ret = subprocess.call(["mock", loc]) if ret != 0:
<|file_name|>decisions_to_data_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 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:...
<|file_name|>baseUI.py<|end_file_name|><|fim▁begin|>''' Created on 5/03/2014 @author: Alex Montes Barrios ''' import sys import os import Tkinter as tk import tkMessageBox import tkFileDialog import tkSimpleDialog import ttk import tkFont import keyword import pickle import re NORM_PROMPT = '>>> ' CELL_PROMPT = '... ...