prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>jobshandler.go<|end_file_name|><|fim▁begin|>package api
import (
"fmt"
"github.com/gorilla/mux"
"github.com/ofux/deluge/repov2"
"github.com/ofux/deluge/worker"
uuid "github.com/satori/go.uuid"
"net/http"
"net/url"
"sort"
)
// JobsHandler handles requests for 'jobs' resource
type JobsHandler struc... | |
<|file_name|>valve_util.py<|end_file_name|><|fim▁begin|>"""Utility functions for FAUCET."""
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2018 The Contributors
#
# Licensed under the Apache Licen... | # limitations under the License.
import logging
from logging.handlers import WatchedFileHandler |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! An ergonomic API for reading and writing ZIP files.
//!
//! The current implementation is based on [PKWARE's APPNOTE.TXT v6.3.9](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)
// TODO(#184): Decide on the crate's bias: Do we prioritise permissiveness/co... | pub use crate::write::ZipWriter;
mod compression;
mod cp437; |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from .extensions import db, resizer
class Upload(db.Model):
__tablename__ = 'upload'
id = db.Column(db.Integer, autoincrement=True, primary_key=True)
name = db.Column(db.Unicode(255), nullable=False)
url = db.Column(db.Unicode(255), nullable=False)
... | setattr(Upload, size + '_url', db.Column(db.Unicode(255))) |
<|file_name|>SystemMessageRenderer.js<|end_file_name|><|fim▁begin|>pinion.on("create.message.systemMessagesList", function(data) {
data.element.settings.data = pinion.messages.reverse();
});
pinion.backend.renderer.SystemMessageRenderer = (function($) {
var constr,
modules = pinion.php.modules;
... | var data = settings.data;
|
<|file_name|>linear.rs<|end_file_name|><|fim▁begin|>use autograd::{Function, FuncIntf, FuncDelegate, FIWrap};
use tensor::{OptTensorKindList, TensorKindList};
impl_func!(LinearF);
impl FuncIntf for LinearF {
fn forward(&mut self, input_list: &mut TensorKindList) -> TensorKindList {
self.save_for_backward(... | output
} |
<|file_name|>oraclejavasource.py<|end_file_name|><|fim▁begin|>from oracleplsqlsource import OraclePLSQLSource
<|fim▁hole|> #debug_message("debug: generating java source ")
OraclePLSQLSource.__init__(self,source)<|fim▁end|> | class OracleJavaSource(OraclePLSQLSource):
def __init__(self, name, source):
self.name = name |
<|file_name|>relation-set_test.go<|end_file_name|><|fim▁begin|>// Copyright 2012, 2013 Canonical Ltd.
// Copyright 2014 Cloudbase Solutions SRL
// Licensed under the AGPLv3, see LICENCE file for details.
package jujuc_test
import (
"bytes"
"fmt"
"io/ioutil"
"path/filepath"
"github.com/juju/cmd/v3"
"github.com/... | deprecated format flag
-r, --relation (= %s)
specify a relation by id |
<|file_name|>abusehelper.py<|end_file_name|><|fim▁begin|>from flask import request, current_app, url_for
from flask_jsonschema import validate
from .. import db
from ..models import AHBot as Bot
from .decorators import json_response
from . import api
@api.route('/abusehelper', methods=['GET'])
@json_response
def get_... | return a.serialize()
|
<|file_name|>OLPreloadArchive.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) Robert Adams
* 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 retain the above copyright
* ... | }
} |
<|file_name|>0026_crowdsource_ask_public.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2020-03-04 21:13
# Django
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('crowdsource', '0025_auto_20191209_1647'),
]
... | ), |
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
{
'name': 'Export Inventory Costs',
'version': '3.0.0.0',
'category': "Warehouse Management",
'description': """
Export Inventory Costs
""",
'author': 'Didotech SRL',
'website': 'http://www.didotech.c... | "depends": [
'base', |
<|file_name|>meps_ie.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
import argparse
import datetime
from lxml import etree, html
from lxml.html.clean import Cleaner
import fnmatch # To match files by pattern
import re
import time
import pandas as pd
def timeit(method):
"""Time methods."""
... | |
<|file_name|>Logger.js<|end_file_name|><|fim▁begin|>"use strict";
/*
* Copyright (C) 2014 Riccardo Re <kingrichard1980.gmail.com>
* This file is part of "Ancilla Libary".
*
* "Ancilla Libary" is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publis... | sHeaderStyleBackground: 'black', |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import {Aurelia} from 'aurelia-framework';
import {HttpClient} from 'aurelia-fetch-client';
import {UnhandledExceptionProvider} from './utils/module';
import {UnhandledExceptionHandler} from './utils/module';
import 'fetch';
import 'toastr';
import 'bootstrap';
import "... | .developmentLogging()
.plugin('aurelia-animator-velocity', instance => {
instance.options.duration = 300;
instance.options.easing = "linear"; |
<|file_name|>XmlAccessType.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 1998-2012 Caucho Technology -- all rights reserved
*
* This file is part of Resin(R) Open Source
*
* Each copy or derived work must preserve the copyright notice and this
* notice unmodified.
*
* Resin Open Source is free software; you can ... | |
<|file_name|>server6127.js<|end_file_name|><|fim▁begin|>/*
* SERVER-6127 : $project uasserts if an expected nested field has a non object parent in a document
*
* This test validates the SERVER-6127 ticket. Return undefined when retrieving a field along a
* path, when the subpath does not exist (this is what happen... | // Populate db
db.s6127.save({a:1}); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
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, including w... | Copyright (c) 2015 Axel Mendoza <aekroft@gmail.com> |
<|file_name|>DrawObject.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2015, Alexander Orzechowski.
*
* 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... |
/** |
<|file_name|>ftp.py<|end_file_name|><|fim▁begin|>#*************************************************************************
#* Dionaea
#* - catches bugs -
#*
#*
#*
# Copyright (c) 2009 Markus Koetter
# Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# Copyrig... | def finish(self):
if self.con: |
<|file_name|>hello.rs<|end_file_name|><|fim▁begin|>/*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
*... | panic!("No connection to hypervisor: code {}, message: {}",
e.code,
e.message) |
<|file_name|>LawbotOfficeLobby_Trap00.py<|end_file_name|><|fim▁begin|>from toontown.coghq.SpecImports import *
GlobalEntities = {1000: {'type': 'levelMgr',
'name': 'LevelMgr',
'comment': '',
'parentEntId': 0,
'cogLevel': 0,
'farPlaneDistance': 1500,
'modelFilename': 'phas... | 'pos': Point3(62.3555, 30.4101, 0),
'hpr': Vec3(0, 0, 0), |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import re, os
PACKAGE_PATH = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(PACKAGE_PATH, 'pythonvideoannotator','__init__.py'), 'r') as fd:
content = fd.... | 'scipy',
'sklearn',
'confapp', |
<|file_name|>NeuralTrain.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# 3章 ニューラルネットワーク
import numpy as np
class NeuralTrain:
def step_function(self, x):
return np.array(x > 0, dtype=np.int)
<|fim▁hole|> def sigmoid_function(self, x):
return 1 / (1 + np.exp(-x))
def relu_function... | |
<|file_name|>test_config_flow.py<|end_file_name|><|fim▁begin|>"""Test the Waze Travel Time config flow."""
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.waze_travel_time.const import (
CONF_AVOID_FERRIES,
CONF_AVOID_SUBSCRIPTION_ROADS,
CONF_AVOID_TOLL_ROADS,
CON... | CONF_ORIGIN: "location1",
CONF_DESTINATION: "location2",
CONF_REGION: "US",
}, |
<|file_name|>ConditionsOfSaleCheckbox.tsx<|end_file_name|><|fim▁begin|>import { Checkbox, CheckboxProps, Link, Text } from "@artsy/palette"
import * as React from "react"
import { data as sd } from "sharify"
export const ConditionsOfSaleCheckbox: React.FC<CheckboxProps> = ({
selected,
onSelect,
}) => {
return (
... | |
<|file_name|>state_codes.py<|end_file_name|><|fim▁begin|># Tiger/Line country shapefiles' "statefp" field is the FIPS code.
# The following is http://www.epa.gov/enviro/html/codes/state.html
data = """
State Abbreviation FIPS Code State Name
AK 02 ALASKA
AL 01 ALABAMA
AR 05 ARKANSAS
AS 60 AMERICAN SAMOA
AZ 04 ARIZONA... | GA 13 GEORGIA
GU 66 GUAM
HI 15 HAWAII
IA 19 IOWA |
<|file_name|>printer.py<|end_file_name|><|fim▁begin|># coding=utf-8
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
from flask import request, jsonify, make_response
import re
from octoprint.settings import settings, valid_boolean_tru... | validated_values = {}
for tool, value in offsets.iteritems(): |
<|file_name|>rest.py<|end_file_name|><|fim▁begin|>import shutil
import json
from rest_framework import routers, serializers, viewsets, parsers, filters
from rest_framework.views import APIView
from rest_framework.exceptions import APIException
from rest_framework.response import Response
from django.core.exceptions i... | if crawls:
message = "The Crawl Model is being used by the following Crawls and cannot be deleted: " |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>"""
Tests for coursewarehistoryextended
Many aspects of this app are covered by the courseware tests,
but these are specific to the new storage model with multiple
backend tables.
"""
import json
from unittest import skipUnless
from unittest.mock import patch
from d... | def test_get_history_true_false(self):
student_module = StudentModule.objects.all()
history = BaseStudentModuleHistory.get_history(student_module)
assert len(history) == 3 |
<|file_name|>artist.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Module for calling Artist related last.fm web services API methods"""
__author__ = "Abhinav Sarkar <abhinav@abhinavsarkar.net>"
__version__ = "0.2"
__license__ = "GNU Lesser General Public License"
__package__ = "lastfm"
from lastfm.... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># __init__.py is a special Python file that allows a directory to become<|fim▁hole|><|fim▁end|> | # a Python package so it can be accessed using the 'import' statement. |
<|file_name|>image-to-gcode.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
## image-to-gcode 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, or (at your
## option) any la... | w, h = im.size |
<|file_name|>sqlalchemy2189.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope tha... | |
<|file_name|>audio.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
#
# Copyright © 2017 jared <jared@jared-devstation>
#
from pydub import AudioSegment, scipy_effects, effects
import os
import settings, util
# combine two audio samples with a crossfade
def combine_samples(acc, file2, CROSSFADE_DUR=100):
util.d... | # os.rename(new_file, fname)
# return new_file[1] |
<|file_name|>tms_client.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | #
# Unless required by applicable law or agreed to in writing, software |
<|file_name|>sha256.js<|end_file_name|><|fim▁begin|>/*
* A JavaScript implementation of the SHA256 hash function.
*
* FILE: sha256.js
* VERSION: 0.8
* AUTHOR: Christoph Bichlmeier <informatik@zombiearena.de>
*
* NOTE: This version is not tested thoroughly!
*
* Copyright (c) 2003, Christoph Bichlmeier
* All rights reser... | |
<|file_name|>shim.js<|end_file_name|><|fim▁begin|>'use strict';
var ArrayIterator = require('es6-iterator/array');
<|fim▁hole|><|fim▁end|> | module.exports = function () { return new ArrayIterator(this, 'value'); }; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Channels from './Channels'
export default Channels
export ChannelBackButton from './ChannelBackButton'
export ChannelBalance from './ChannelBalance'
export ChannelCapacity from './ChannelCapacity'
export ChannelCardList from './ChannelCardList'
export ChannelCa... | export ChannelHeader from './ChannelHeader'
export ChannelMoreButton from './ChannelMoreButton'
export ChannelNodeSearch from './ChannelNodeSearch'
export ChannelSearch from './ChannelSearch' |
<|file_name|>build-bundle-app.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|>const gulp = require("gulp");
const sourcemaps = require("gulp-sourcemaps");
const uglify = require("gulp-uglify");
const path = require("path");
const through2 = require("through2");
const buffer = require("vinyl-buffer");
const source = requ... | * Gulp tasks for wrapping Browserify modules.
*/
const browserify = require("browserify"); |
<|file_name|>iterators.py<|end_file_name|><|fim▁begin|>from scrapy.http import Response
from scrapy.selector import Selector
def xmliter_lxml(obj, nodename, namespace=None, prefix='x'):
from lxml import etree
reader = _StreamReader(obj)
tag = '{%s}%s' % (namespace, nodename) if namespace else nodename
... | else: |
<|file_name|>svgmap.js<|end_file_name|><|fim▁begin|>// svgmap.js 0.2.0
//
// Copyright (c) 2014 jalal @ gnomedia
//
// 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.or... | |
<|file_name|>issue-57523.rs<|end_file_name|><|fim▁begin|>// check-pass
struct S(u8);
impl S {
fn method1() -> Self {
Self(0)
}
}
macro_rules! define_method { () => {
impl S {
fn method2() -> Self {
Self(0) // OK<|fim▁hole|>
define_method!();
fn main() {}<|fim▁end|> | }
}
}} |
<|file_name|>spectral_clusterer.py<|end_file_name|><|fim▁begin|>"""A spectral clusterer class to perform clustering."""
import numpy as np
from spectralcluster import constraint
from spectralcluster import custom_distance_kmeans
from spectralcluster import laplacian
from spectralcluster import refinement
from spectral... | # Use Auto-tuning method to find a good p_percentile. |
<|file_name|>mox.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Copyright 2008 Google 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/L... | ensures that every expected method was called; otherwise, an exception |
<|file_name|>vaapi_video_decode_accelerator.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 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 "base/bind.h"
#include "base/debug/trace_event.h"
#include "base/... | #include "ui/gl/scoped_binders.h"
static void ReportToUMA( |
<|file_name|>apiendpoint.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <utility>
namespace dota2
{
template<typename Backend>
class APIEndpoint
{
public:
template<typename T>
APIEndpoint(T &&backend) :
backend(std::forward<T>(backend)) { }
... | #ifndef APIENDPOINT_HPP_7PXYTQE5
#define APIENDPOINT_HPP_7PXYTQE5 |
<|file_name|>mustBeNonNullObject.js<|end_file_name|><|fim▁begin|>import { isNull } from '../checks/isNull';
import { isObject } from '../checks/isObject';
import { mustSatisfy } from '../checks/mustSatisfy';
/**
* @hidden
*/
function beObject() {
return "be a non-null `object`";
}
/**<|fim▁hole|> * @hidden
*/
ex... | |
<|file_name|>1_main.py<|end_file_name|><|fim▁begin|>from JumpScale.portal.macrolib import div_base
def main(j, args, params, *other_args):
<|fim▁hole|> 'pattern': r"^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)+$"})
def match(j, args, params... | return div_base.macro(j, args, params, self_closing=True, tag='input',
additional_tag_params={'type': 'email',
|
<|file_name|>all-parcel-requests.component.ts<|end_file_name|><|fim▁begin|>/**
* Created by Abhi on 10/16/16.
*/
/**
* Created by Abhi on 10/16/16.
*/
import {Component} from '@angular/core';
import {Panel} from "../profile/panel";
import {RequestsService} from "../services/request.service";
import {GoogleApiServic... | templateUrl: './all-parcel-requests.component.html', |
<|file_name|>org_test.go<|end_file_name|><|fim▁begin|>package kv_test
import (
"context"
"testing"
"github.com/influxdata/influxdb"
"github.com/influxdata/influxdb/kv"
influxdbtesting "github.com/influxdata/influxdb/testing"
)
func TestBoltOrganizationService(t *testing.T) {
influxdbtesting.OrganizationService... | |
<|file_name|>lib.go<|end_file_name|><|fim▁begin|>// Copyright 2016 - 2018 The excelize 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 excelize providing a set of functions that allow you to write to
// and read from XLS... | for _, v := range r.File { |
<|file_name|>basic_modules.py<|end_file_name|><|fim▁begin|>###############################################################################
##
## Copyright (C) 2014-2015, New York University.
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact... | |
<|file_name|>cloudminingstatus.py<|end_file_name|><|fim▁begin|>'''
cloudminingstatus.py
@summary: Show selected API data from cloudhasher and miningpool.
@author: Andreas Krueger
@since: 12 Feb 2017
@contact: https://github.com/drandreaskrueger
@copyright: @author @since @license
@license: ... | ('workers' , (lambda x: "%s last beat" % (humanTime(x['0']['lastBeat'])))),
('workers' , (lambda x: "%s Online" % (not bool(x['0']['offline'])))),
('workersTotal', (lambda x:x)),
]
|
<|file_name|>storage.js<|end_file_name|><|fim▁begin|>const AWS = require('aws-sdk');
const s3 = new AWS.S3();
const conf = require('./config');
const { tmpdir } = require('os');
const fs = require('fs');
const path = require('path');
const mozlog = require('./log');
const log = mozlog('send.storage');
const redis =... | |
<|file_name|>schematic.d.ts<|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
*/
import { Observable } from 'rxjs/Observable';
import... | * |
<|file_name|>test_json_renderer.py<|end_file_name|><|fim▁begin|>import unittest<|fim▁hole|>from tornadowebapi.renderers import JSONRenderer
class TestJSONRenderer(unittest.TestCase):
def test_basic_rendering(self):
renderer = JSONRenderer()
self.assertEqual(renderer.render({}), "{}")
self.... | |
<|file_name|>na_elementsw_node.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or
# https://www.gnu.org/licenses/gpl-3.0.txt)
'''
Element Software Node Operation
'''
from __future__ import absolute_import, division, print_function
__metaclass__ ... | |
<|file_name|>validate.py<|end_file_name|><|fim▁begin|>from matplotlib import pyplot
from .algo import _bs_fit
def axes_object(ax):
""" Checks if a value if an Axes. If None, a new one is created.
Both the figure and axes are returned (in that order).
"""
if ax is None:
ax = pyplot.gca()
... | an invalid value. Returns the lower case version of valid values.
"""
|
<|file_name|>localImportInlineFunctionBody.after.py<|end_file_name|><|fim▁begin|>def func():
import module
module<|fim▁hole|><|fim▁end|> | # <ref> |
<|file_name|>DifferentialEvolutionAbstract.py<|end_file_name|><|fim▁begin|>import numpy
class DifferentialEvolutionAbstract:
amount_of_individuals = None
f = None
p = None
end_method = None
def __init__(self, min_element=-1, max_element=1):
self.min_element = min_element
self.max_... | |
<|file_name|>windows.py<|end_file_name|><|fim▁begin|>## Copyright (c) 2003 Henk Punt
## 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
## without limitati... | GetClassName = windll.user32.GetClassNameA
EndDialog = windll.user32.EndDialog
ShowScrollBar = windll.user32.ShowScrollBar |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from __future__ import print_function
# -*- coding: utf-8 -*-
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://et... | New algorithms and methods to estimate maximum-likelihood phylogenies:
assessing the performance of PhyML 3.0. Syst Biol. 2010
May;59(3):307-21."""
FASTTREE_CITE = u"""Price MN, Dehal PS, Arkin AP. FastTree 2 - |
<|file_name|>NoticeItem.java<|end_file_name|><|fim▁begin|>package org.kareha.hareka.server.game.item;
import org.kareha.hareka.field.TileType;
import org.kareha.hareka.game.ItemType;<|fim▁hole|>import org.kareha.hareka.wait.WaitType;
public class NoticeItem implements Item {
private final Name name;
public Notice... | import org.kareha.hareka.server.game.entity.CharacterEntity;
import org.kareha.hareka.server.game.entity.FieldEntity;
import org.kareha.hareka.server.game.entity.ItemEntity;
import org.kareha.hareka.util.Name; |
<|file_name|>share.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import base64
import json
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
from behave import *
@step('I share... | |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>export { Microb } from "./Microb"
export { Cellpack } from "./Cellpack"
export { Request } from "./Request"
export { Response } from "./Response"
export { ResponseJSON } from "./ResponseJSON"
export { Connection } from "./Connection"
export { ParameterExpense } from "./... | |
<|file_name|>cico_gitlab_trigger.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
import json
import os
import datetime
import time
from pprint import pprint
default_os = '8-stream'
##next_os = 'RHEL8.4'
#next_branch_base = 'rhel-8'
jenkins_url = 'https://jenkins-networkmanager.apps.ocp.ci.centos.or... | message = None |
<|file_name|>PtFlagEncoder.java<|end_file_name|><|fim▁begin|>/*
* Licensed to GraphHopper GmbH under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* GraphHopper GmbH licenses this file to you under the ... |
public class PtFlagEncoder extends AbstractFlagEncoder {
private IntEncodedValue timeEnc; |
<|file_name|>BeanShellLanguage.java<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2016 Google 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/... | |
<|file_name|>Plane.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the LGPLv3 or higher.
<|fim▁hole|>from UM.Math.Vector import Vector
from UM.Math.Float import Float
class Plane:
"""Plane representation using normal and distance."""
def __init__(s... | |
<|file_name|>location.js<|end_file_name|><|fim▁begin|>var Location = function (jsonInFeed) {
var jsonContent = JSON.parse(jsonInFeed);
this.globalid = jsonContent.identifier[0].value;
this.name = jsonContent.name;
this.parentId = jsonContent.managingOrganization.reference;
this.fullName = function ... |
Location.loadAll = function (url) {
var FeedReader = require(__dirname + '/feed-reader'); |
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Yan Yan'
'''
Deployment toolkit.
'''
import os, re
from datetime import datetime
from fabric.api import *
env.user = 'michael'
env.sudo_user = 'root'
env.hosts = ['192.168.0.3']
db_user = 'www-data'
db... |
def build():
'''
Build dist package. |
<|file_name|>message.panel.js<|end_file_name|><|fim▁begin|>import React from 'react';
export function MessagePanel(props, context) {
let message = context.messenger.getMessage();
let messagePanel;
if (message !== undefined) {
messagePanel = (
<div className={ 'alert alert-' + message.type }>
... |
context.messenger.clearMessages(); |
<|file_name|>LuceneTemplateResolverIT.java<|end_file_name|><|fim▁begin|>package com.s24.search.solr.response;
import java.util.ArrayList;
import java.util.List;
import org.apache.lucene.analysis.util.ResourceLoader;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.core.SolrResourceLoader;
import org.juni... | } |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
from future.moves.urllib.parse import quote
import uuid
import ssl
from pymongo import MongoClient
import requests
from django.apps import apps
from addons.wiki import settings as wiki_settings
from addons.wiki.exceptions import Inva... | # Content fetched and rendered by front-end |
<|file_name|>game.js<|end_file_name|><|fim▁begin|>// Design Basic Game Solo Challenge
// This is a solo challenge
// Your mission description:To complete a line of the same figure, horizontal, diagonal or vertical
// Overall mission: To win all the time :)
// Goals: make a line of the same kind before computer does
/... | vertical = 0
} else if (vertical == "B"){ |
<|file_name|>webpack-subresource-integrity-tests.ts<|end_file_name|><|fim▁begin|>import * as webpack from 'webpack';
import SriPlugin = require('webpack-subresource-integrity');
const config: webpack.Configuration = {
plugins: [
new SriPlugin(),
new SriPlugin({
hashFuncNames: ['sha256',... | |
<|file_name|>files.js<|end_file_name|><|fim▁begin|>var files =
[
[ "Code", "dir_a44bec13de8698b1b3f25058862347f8.html", "dir_a44bec13de8698b1b3f25058862347f8" ]<|fim▁hole|><|fim▁end|> | ]; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import generators
"""
httplib2
A caching http interface that supports ETags and gzip
to conserve bandwidth.
Requires Python 2.3 or later
Changelog:
2007-08-18, Rick: Modified so it's able to use a socks proxy if needed.
"""
__author__ = "Joe Gre... | username, password = ident.split(':', 1)
else:
password = ident
else: |
<|file_name|>hr_language.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
###############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free s... | #
###############################################################################
|
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|> name='jerboa',
packages=['jerboa'], # this must be the same as the name above
version='0.2.1-alpha',
description='',
author='Matt Badger',
author_email='foss@lighthouseuk.net',
url='https://github.com/LighthouseUK/jerboa', # us... | from distutils.core import setup
setup( |
<|file_name|>haus.go<|end_file_name|><|fim▁begin|>// Package haus reads a yaml file describing docker architecture and
// generates from templates docker-compose and RepoTsar files.
package haus
import(
"fmt"
"os"
"strings"
"time"
)
// Haus represents an instance of the haus application.
type Haus struct{
Config... | sem <-err
return err
}
|
<|file_name|>BadRequestException.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2015 IBM Corp.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LIC... | |
<|file_name|>PouchDbApi.d.ts<|end_file_name|><|fim▁begin|>import { LocalStore, LocalStoreShareInfo, LocalStoreSetupInfo, LocalStoreType } from "../LocalStoreApi";
import { IdGeneration } from "../IdGenerator";
/**
* Created by Papa on 5/28/2016.
*/
export declare class PouchDbStoreShareInfo implements LocalStoreShare... | delete(entity: any): Promise<any>;
update(entity: any): Promise<any>;
query(query: any): Promise<any>; |
<|file_name|>schema.js<|end_file_name|><|fim▁begin|>import should from 'should';
import Schema from '../../src/schema';
const SIMPEL_OBJECT = {
type: 'object',
properties: {
name: { type: 'string' }
}
};
describe('Schema', () => {
describe('#getType', () => {<|fim▁hole|> });
describe('#isObject', () =>... | it('should return string type for child', () => {
const schema = new Schema(SIMPEL_OBJECT);
schema.getType('name').should.equal('string');
}); |
<|file_name|>builders.rs<|end_file_name|><|fim▁begin|>//! Functions to generate expressions
use crate::rules::RuleName;
use super::*;
use terminal::*;
/// Returns a final::Literal expression
///
/// Single literal exact
/// ```
/// extern crate parkit;
/// use parkit::expr::builders::*;
/// use parkit::*;... | // println!("Hello, world!"); |
<|file_name|>test_quota.py<|end_file_name|><|fim▁begin|># Copyright 2013, Red Hat, 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.... | self.fail('Should have raised the quota exception')
except exception.StorageQuotaFull:
pass
|
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>"""
Django settings for plasystem project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://doc... | |
<|file_name|>ex5.py<|end_file_name|><|fim▁begin|>my_name = 'Zed A. Shaw'
my_age = 35 # not a lie
my_height = 74 # Inches
my_weight = 180 # lbs
my_eyes = 'Blue'
my_teeth = 'White'
my_hair = 'Brown'
print "Let's talk about %s." % my_name
print "He's %d inches tall." % my_height
print "He's %d pounds heavy." % my_weight
... | print "His teeth are usually %s depending on the coffee." % my_teeth
|
<|file_name|>ScriptEngineLessCompilationEngine.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2013 Houbrechts IT
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... | |
<|file_name|>sabpn.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright (c) 2011 Chris D. Lasher & Phillip Whisenhunt
#
# This software is released under the MIT License. Please see
# LICENSE.txt for details.
"""A program to detect Process Linkage Networks using
Simulated Anneali... | |
<|file_name|>rename_discharge_date_in_ip_record.py<|end_file_name|><|fim▁begin|>import frappe<|fim▁hole|>
def execute():
frappe.reload_doc("Healthcare", "doctype", "Inpatient Record")
if frappe.db.has_column("Inpatient Record", "discharge_date"):
rename_field("Inpatient Record", "discharge_date", "discharge_datetim... | from frappe.model.utils.rename_field import rename_field
|
<|file_name|>TestMimeMessage.java<|end_file_name|><|fim▁begin|>/*
* $Id$
*/
/*
Copyright (c) 2000-2004 Board of Trustees of Leland Stanford Jr. University,
all rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Sof... | void assertHeader(MimeMessage msg) {
assertHeader(null, null, msg);
}
|
<|file_name|>test_commontypes.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import py, os, cffi, re
import _cffi_backend
def getlines():
try:
f = open(os.path.join(os.path.dirname(cffi.__file__),
'..', 'c', 'commontypes.c'))
except IOError:
py.test.skip("cannot find... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod helpers;<|fim▁end|> | //! The rjs execution engine.
pub mod engine;
pub mod frame; |
<|file_name|>fingered_temp.py<|end_file_name|><|fim▁begin|>#!/Users/vishnu/anaconda/bin/python
import random
import sys
"""class schema:
files=[]
def __init__(self):
pass
def addFile(self,file):
self.files.append(file)
def setForeignKey(self,primaryFile,theOtherOne):
pass"""
class JoinReq:
def __ini... |
while t1 is not None: |
<|file_name|>vimeo.py<|end_file_name|><|fim▁begin|>import logging
import re
from streamlink.compat import html_unescape, urlparse
from streamlink.plugin import Plugin, PluginArguments, PluginArgument
from streamlink.plugin.api import validate
from streamlink.stream import DASHStream, HLSStream, HTTPStream
from streaml... | def _get_streams(self):
if "player.vimeo.com" in self.url:
data = self.session.http.get(self.url, schema=self._player_schema) |
<|file_name|>test_custom_profile_data.py<|end_file_name|><|fim▁begin|>from typing import Any, Dict, List, Union
from unittest import mock
import orjson
from zerver.lib.actions import (
do_remove_realm_custom_profile_field,
do_update_user_custom_profile_data_if_changed,
try_add_realm_custom_profile_field,
... | self.assert_json_error(result, "Bad value for 'field_data': invalid") |
<|file_name|>fabfile.py<|end_file_name|><|fim▁begin|># This Python file uses the following encoding: utf-8
"""
Copyright 2013 Giacomo Antolini <giacomo.antolini@gmail.com>.
This file is part of flocca_dot_com.
flocca_dot_com is free software: you can redistribute it and/or modify
it under the terms o... | # Helpers |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from datetime import datetime, timedelta
from itertools import chain, cycle
from django.shortcuts import render_to_response
from django.utils.translation import ugettext, ugettext_lazy as _
from django.http import HttpResponseRedirect, Http404
from django import forms... | """
Question form with all its choices |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.