prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>comments.py<|end_file_name|><|fim▁begin|>import logging
from pylons import request, response, session, tmpl_context as c, url
from pylons.controllers.util import abort, redirect
from pylons.templating import render_mako_def
from kai.lib.base import BaseController, render
from kai.lib.helpers import texti... | |
<|file_name|>target_pool_suite_test.go<|end_file_name|><|fim▁begin|>package targetpool_test
import (
"testing"<|fim▁hole|> . "github.com/onsi/gomega"
)
func TestTargetPoolService(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Target Pool Service Suite")
}<|fim▁end|> |
. "github.com/onsi/ginkgo" |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
# Copyright (c) 2010-2016 openpyxl
<|fim▁hole|>from openpyxl.styles.alignment import Alignment
from openpyxl.styles.borders import Border, Side
from openpyxl.styles.colors import Color
from openpyxl.styles.fills import Pattern... | |
<|file_name|>test_ports.py<|end_file_name|><|fim▁begin|># Copyright 2014 OpenStack Foundation
# 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|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
requirements = [ 'pyte', 'docopt' ]
try:
import asyncio
except ImportError:
requirements.append('asyncio')
setup(
name='libpymux',
... | |
<|file_name|>GLSLNodeFunction.js<|end_file_name|><|fim▁begin|>import NodeFunction from '../core/NodeFunction.js';<|fim▁hole|>
const declarationRegexp = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i;
const propertiesRegexp = /[a-z_0-9]+/ig;
const pragmaMain = '#pragma main';
const parse ... | import NodeFunctionInput from '../core/NodeFunctionInput.js'; |
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from rapidsms.tests.scripted import TestScript
from apps.form.models import *
from apps.reporters.models import *
import apps.reporters.app as reporter_app
import apps.supply.app as supply_app
import apps.form.app as form_app
import apps.default.app as default_app
from... | kano = locations.get(type=state)
self.assertEqual("KANO", kano.name)
self.assertEqual(44, len(kano.children.all())) |
<|file_name|>render.rs<|end_file_name|><|fim▁begin|>use std::iter;
use brdgme_color::*;
use brdgme_game::Renderer;
use brdgme_markup::ast::{Col, Row};
use brdgme_markup::{Align as A, Node as N};
use crate::board::{Block, Board, BoardTile, Loc, TileOwner, BLOCKS};
use crate::card::casino_card_count;
use crate::casino:... | ),
(A::Left, vec![]), |
<|file_name|>BarLineChart.js<|end_file_name|><|fim▁begin|>/*!
* Copyright 2010 - 2015 Pentaho Corporation. 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... | this.base(); |
<|file_name|>data-table.spec.ts<|end_file_name|><|fim▁begin|>import { assert } from 'chai';
import { DataTable } from '../../src/group';
import { Text } from '../../src/question/text';
import { Required } from '../../src/validation';
describe('AngularForms :: Group :: DataTable', () => {
it('should be instantiable',... | it('should isRequired method', () => {
const dataTable1: DataTable = new DataTable('G-01', 'A simple group', [], [new Required('Required')]);
const dataTable2: DataTable = new DataTable('G-01', 'A simple group', [], []); |
<|file_name|>crel.js<|end_file_name|><|fim▁begin|>/* Copyright (C) 2012 Kory Nunn
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 limitation the rights to us... | key,
attribute;
|
<|file_name|>read_test.go<|end_file_name|><|fim▁begin|>package msgp
import (
"bytes"
"fmt"
"io"
"math"
"math/rand"
"reflect"
"testing"
"time"
)
func TestSanity(t *testing.T) {
if !isfixint(0) {
t.Fatal("WUT.")
}
}
func TestReadIntf(t *testing.T) {
// NOTE: if you include cases
// with, say, int32s, the... | func TestCopyNext(t *testing.T) {
var buf bytes.Buffer |
<|file_name|>dns_test.go<|end_file_name|><|fim▁begin|>package agent
import (
"fmt"
"net"
"os"
"strings"
"testing"
"time"
"github.com/hashicorp/consul/consul/structs"
"github.com/hashicorp/consul/testutil"
"github.com/miekg/dns"
)
func makeDNSServer(t *testing.T) (string, *DNSServer) {
return makeDNSServerC... | defer os.RemoveAll(dir)
defer srv.agent.Shutdown()
|
<|file_name|>main.js<|end_file_name|><|fim▁begin|>if($.cookie('age') !== 'pass') {
$('body').addClass('uh-oh');
$('#age-verify').show();
}
<|fim▁hole|> //set locations
var location = new google.maps.LatLng(39.90658,-105.09859);
var stylesArray = [
{
"stylers": [
{ "saturation": -100 }
... | //generate map
function showMap() { |
<|file_name|>reporter.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Adapted from a contribution of Johan Dahlin
import collections
import errno
import re
import sys
try:
import multiprocessing
except ImportError: # Python 2.5
multiprocessing = None
import pep8
__all__ = ['multiprocessing', 'B... | |
<|file_name|>camera_controller.hpp<|end_file_name|><|fim▁begin|>/*!
\file
\author Igor Mironchik (igor.mironchik at gmail dot com).
Copyright (c) 2017 Igor Mironchik
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 Fre... | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. |
<|file_name|>vehicle_type.py<|end_file_name|><|fim▁begin|>from enum import Enum
from typing import List, Union
import logging
import math
try:
from flask_babel import _
except ModuleNotFoundError:
pass
class VehicleType(Enum):
CAR = 1
TRUCK_UPTO_4 = 2
PICKUP_UPTO_4 = 3
TRUCK_4_TO_10 = 4
T... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>####################################################################################################
# neuropythy/datasets/__init__.py
# Datasets for neuropythy.<|fim▁hole|># mainly just to force these to load when datasets is loaded:
from .benson_winawer_2018 ... | # by Noah C. Benson
|
<|file_name|>AbilityEvent.js<|end_file_name|><|fim▁begin|>import GameEvent from './GameEvent';
import Creature from '../entities/creatures/Creature';
import Ability from '../abilities/Ability';
import Tile from '../tiles/Tile';
export default class AbilityEvent extends GameEvent {
/**
* @class AbilityEven... | getText(dungeon) {
var creature = this.getCreature();
var ability = this.getAbility(); |
<|file_name|>time.rs<|end_file_name|><|fim▁begin|>//! Temporal quantification.
//!
//! # Examples:
//!
//! There are multiple ways to create a new [`Duration`]:
//!
//! ```
//! # use std::time::Duration;
//! let five_seconds = Duration::from_secs(5);
//! assert_eq!(five_seconds, Duration::from_millis(5_000));
//! asser... | /// |
<|file_name|>exp.rs<|end_file_name|><|fim▁begin|>use ast::Op;
use environment::Environment;
use errors::{EvalError, YamlError};
use ast::lit::Lit;
#[derive(Debug, PartialEq, Clone)]
pub enum Exp {
/// A unary operator like !
UnaryOp(Op, Box<Exp>),
/// A binary operator like + or -
BinaryOp(Op, Box<Exp>... | let times_tree = Exp::BinaryOp(Op::Times,
Box::new(Exp::Lit(Lit::Number(5))),
Box::new(add_tree));
|
<|file_name|>DirectoryWatcher.js<|end_file_name|><|fim▁begin|>module('lively.ide.DirectoryWatcher').requires('lively.Network').toRun(function() {
// depends on the DirectoryWatcherServer
Object.extend(lively.ide.DirectoryWatcher, {
watchServerURL: new URL(Config.nodeJSURL+'/DirectoryWatchServer/'),
dirs: {},... | |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from south.db import db
from south.v2 import SchemaMigration
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()<|f... | |
<|file_name|>motor_primitive.py<|end_file_name|><|fim▁begin|>from numpy import linspace, array, arange, tile, dot, zeros
from .gaussian import Gaussian
from ..utils import rk4
class BasisFunctions(object):
def __init__(self, n_basis, duration, dt, sigma):
self.n_basis = n_basis
means = linspace(... | while i_t < self.duration / self.dt:
# print i_t, t, self.duration - self.dt
t, state = rk4(t, self.dt, state, self.acceleration)
# print state |
<|file_name|>Sample.py<|end_file_name|><|fim▁begin|>import math
from param import *
class Sample:
def __init__(self):
self.time = 0
self.home1_x = 0.0
self.home1_y = 0.0
self.home1_theta = 0.0
self.home2_x = 0.0
self.home2_y = 0.0
self.home2_theta = 0.0
... | self.home1_theta = round(degreeToRadian(data.home1_theta),3)
home1_x = pixelToMeter(data.home1_x)
home1_y = pixelToMeter(data.home1_y)
angleField = math.atan2(home1_y, home1_x) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import numpy as np
import tensorflow as tf<|fim▁hole|>
from misc import *<|fim▁end|> |
import dists |
<|file_name|>resnet-v1.py<|end_file_name|><|fim▁begin|>'''
Adapted from https://github.com/tornadomeet/ResNet/blob/master/symbol_resnet.py
(Original author Wei Wu) by Antti-Pekka Hynninen
Implementing the original resnet ILSVRC 2015 winning network from:
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun. "Deep Residu... | num_stages = 3
if (num_layers-2) % 9 == 0 and num_layers >= 164:
per_unit = [(num_layers-2)//9]
filter_list = [16, 64, 128, 256] |
<|file_name|>Config.cpp<|end_file_name|><|fim▁begin|>//
// Created by Giacomo Tanganelli on 04/01/17.
//
#include <FS.h> //must be the first include
#include "Config.h"
#include <ArduinoJson.h>
int Config::ReadConfig() {
#if DEBUG
Serial.println("mounting FS...");
#endif
if (SPIFFS.begin()) {
#if DEBUG
... | JsonObject &json = jsonBuffer.createObject();
json["ip"] = _cse_ip.toString();
json["port"] = String(_cse_port);
json["id"] = _cse_id; |
<|file_name|>train_imagenet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Example code of learning a large scale convnet from ILSVRC2012 dataset.
Prerequisite: To run this example, crop the center of ILSVRC2012 training and
validation images and scale them to 256x256, and make two lists of space-
separated ... | .format(train_count, train_count * args.batchsize,
timedelta(seconds=duration), throughput))
|
<|file_name|>watch.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The etcd Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
... | |
<|file_name|>testcase_base.py<|end_file_name|><|fim▁begin|>import os
import sys
import argparse
import ConfigParser
import testcase_service
from bantorra.util import define
from bantorra.util.log import LOG as L
class TestCase_Base(testcase_service.TestCaseUnit):
config = {}
"""
TestCase_Base.
... | cls.config[name] = value
|
<|file_name|>get_all_test.go<|end_file_name|><|fim▁begin|>/*
Copyright The Helm Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... | |
<|file_name|>osx.py<|end_file_name|><|fim▁begin|><|fim▁hole|>raise NotImplementedError<|fim▁end|> | from btcommon import *
|
<|file_name|>mappers.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | # Copyright 2011 OpenStack Foundation
# All Rights Reserved. |
<|file_name|>gis_visualization.js<|end_file_name|><|fim▁begin|>/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* @fileoverview functions used for visualizing GIS data
*
* @requires jquery
* @requires vendor/jquery/jquery.svg.js
* @requires vendor/jquery/jquery.mousewheel.js
* @requires vendor/jquery/... | }
|
<|file_name|>project.rs<|end_file_name|><|fim▁begin|>// Examples to illustrate project loading
extern crate r2api;
extern crate r2pipe;
extern crate radeco_lib;
use r2api::api_trait::R2Api;
use r2pipe::R2;
use radeco_lib::frontend::radeco_containers::{FunctionLoader, ModuleLoader, ProjectLoader};
use radeco_lib::fron... | }
}
} |
<|file_name|>timelines_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for the Timelines flow."""
from grr.lib import action_mocks
from grr.lib import aff4
from grr.lib import flags
from grr.lib import test_lib
# pylint: disable=unused-import
from grr.lib.fl... | # Now make a timeline |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Basic 2D object and shader.
use std::rc::Rc;
use glium::{ Display, Frame };
use texture::{ Texture, TextureRef };
use mesh::Mesh;
use shader::ShaderType;
use transform::Transform;
use renderer::{ Renderer, Renderable };<|fim▁hole|>
/// 2D Sprite vertex type
#[deriv... | use rect::Rect;
use cgmath::Matrix4;
use id::Id; |
<|file_name|>is-extensible.js<|end_file_name|><|fim▁begin|><|fim▁hole|>description: The [[IsExtensible]] internal method returns `false`
flags: [module]
---*/
import * as ns from './is-extensible.js';
assert.sameValue(Object.isExtensible(ns), false);<|fim▁end|> | // Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-module-namespace-exotic-objects-isextensible |
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2008--2015 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR... | if hashlib_has_usedforsecurity: |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md><|fim▁hole|>}<|fim▁end|> | extern crate build;
fn main() {
build::link("nddeapi", true) |
<|file_name|>_version.py<|end_file_name|><|fim▁begin|>"""Utility to compare (Numpy) version strings.
The NumpyVersion class allows properly comparing numpy version strings.
The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.
"""... | else:
vercmp = -1
elif self.major > other.major: |
<|file_name|>parallel_stmts_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Cockroach 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/l... | resErr := waitAndAssertEmptyWithErr(t, &pq)
if resErr != planErr {
t.Fatalf("expected plan1 to throw error %v, found %v", planErr, resErr) |
<|file_name|>input.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var Obj = {
myMethod(a, b) {
},
*myGenerator(a, b) {
}
}<|fim▁end|> | // methods (functions of objects)
// see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions
// http://www.ecma-international.org/ecma-262/6.0/#sec-method-definitions |
<|file_name|>data.js<|end_file_name|><|fim▁begin|>var chartPrevious = [
{"Name":"", "Description":"charts"},
{"Name":"1 hour", "Description":"1 hour"},
{"Name":"2 hours", "Description":"2 hours"},
{"Name":"10 hours", "Description":"10 hours"},
{"Name":"1 day", "Description":"1 day"},
{"Name":"2 days", "Description":"2 ... | |
<|file_name|>acrobot.py<|end_file_name|><|fim▁begin|>'''
Created on Jan 11, 2016
@author: Lucas Lehnert (lucas.lehnert@mail.mcgill.ca)
Control on the Acrobot domain.
'''
import numpy as np
import matplotlib.pyplot as plt
from mdp import MDPContinuousState
from basisfunction import getTiledStateActionBasisFunction
f... | print 'Running repeat ' + str( rep ) |
<|file_name|>face_quad9.C<|end_file_name|><|fim▁begin|>// The libMesh Finite Element Library.
// Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as publis... | }
|
<|file_name|>connector-definition-visitor.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License... |
/**
* Begin the visit and generate the source |
<|file_name|>harfbuzz.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/. */
#![allow(unsafe_code)]
use app_units::Au;
use euclid::Point... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright (C) Duncan Macleod (2015)
#
# This file is part of the GW DetChar python package.
#
# GW DetChar 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 Soft... | __author__ = 'Duncan Macleod <duncan.macleod@ligo.org>' |
<|file_name|>name.rs<|end_file_name|><|fim▁begin|>//! Types for the *m.room.name* event.
use ruma_events_macros::StateEventContent;
use serde::{Deserialize, Serialize};
use crate::{InvalidInput, StateEvent};
/// The room name is a human-friendly string designed to be displayed to the end-user.
pub type NameEvent = S... | ); |
<|file_name|>app.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*-
# Copyright © 2012 New Dream Network, LLC (DreamHost)
# 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... | )
return app
|
<|file_name|>oc_adm_registry.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# pylint: disable=missing-docstring
# flake8: noqa: T001
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|_... | return c
''' |
<|file_name|>gzip.go<|end_file_name|><|fim▁begin|>// Package compression defines a response compressing Handler.
// It compresses the body of the http response sent back to a client.
package compression
import (
"compress/gzip"
"io"
"net/http"
"strings"
"sync"
"github.com/atdiar/xhttp"
)
// Gzipper defines the... | |
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import { LoggerError } from './errors';
import { getConfiguration, setConfiguration } from './configuration';
import { Writer, Level, Record } from './models';
import { getLogger } from './logger';
export {
LoggerError,
getConfiguration,<|fim▁hole|> setConfigurati... | |
<|file_name|>lang.js<|end_file_name|><|fim▁begin|>var
utils = require('enyo/utils'),
kind = require('enyo/kind');
describe('language', function () {
describe('usage', function () {
describe('Callee', function () {
var dn = '';
var fn = function() {
dn = arguments.callee.displayName;
};
it('shou... | // - instanceof from another context |
<|file_name|>generate_md_functions.py<|end_file_name|><|fim▁begin|># encoding: UTF-8
__author__ = 'CHENXY'
from string import join
from sgit_struct import structDict
def processCallBack(line):
orignalLine = line
line = line.replace(' virtual void ', '') # 删除行首的无效内容
line = line.replace('{};\n', '')... | for key in struct.keys():
fprocess.write("\t"+ 'error["' + key + '"] = task_error.' + key + ';\n')
fprocess.write("\n") |
<|file_name|>included_urls2.py<|end_file_name|><|fim▁begin|>"""
These URL patterns are included in two different ways in the main urls.py, with
<|fim▁hole|>"""
from django.conf.urls import url
from .views import empty_view
urlpatterns = [
url(r'^part/(?P<value>\w+)/$', empty_view, name="part"),
url(... | an extra argument present in one case. Thus, there are two different ways for
each name to resolve and Django must distinguish the possibilities based on the
argument list.
|
<|file_name|>sms_manager.js<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
// License: GNU General Public License v3. See license.txt
erpnext.SMSManager = function SMSManager(doc) {
var me = this;
this.setup = function() {
var default_msg = {
'Lead' : '',
... | |
<|file_name|>momentum.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | grad.values,
grad.indices, |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>"""
Django settings for kboard project.
Generated by 'django-admin startproject' using Django 1.10.1.
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://docs.d... | |
<|file_name|>decode.rs<|end_file_name|><|fim▁begin|>//! Decodes a Bitterlemon-encoded byte stream into its original bit stream.
use std::iter::Iterator;
use std::result;
/// Decodes a Bitterlemon byte stream into an iterator of `bool`s.
/// `source` can be any iterator that yields `u8` values.
///
/// # Errors
///
//... | |
<|file_name|>bitcoin_sr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="sr">
<context>
<name>AboutDialog</name>
<message>
<source>About Peershares</source>
<translation type="vanished">О Peershares-у</translation>
</message>
... | </message>
<message>
<location filename="../forms/distributedivdialog.ui" line="105"/>
<source>Get List of Shareholders</source> |
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from celery import shared_task
import os.path
import logging
import csv
from django.core.exceptions import ObjectDoesNotExist
from .RandomAuthorSet import RandomAuthorSet<|fim▁hole|>
logger = logging.getLogger(__name__)
AUTHOR_SE... | from ..CitationFinder import CitationFinder, EmptyPublicationSetException
from scholarly_citation_finder import config
from scholarly_citation_finder.lib.file import create_dir |
<|file_name|>entries.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | resource=monitored_resource, |
<|file_name|>combineTarget.js<|end_file_name|><|fim▁begin|>var stream = require('stream');
var util = require('util');
function combineTarget(){
stream.Writable.call(this);
this.file = '';
}
util.inherits(combineTarget,stream.Writable);
combineTarget.prototype._write = function(chunk,encoding,callback){
this.fi... | callback();
}; |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _toast = require('./toast.container');
Object.defineProperty(exports, 'default', {
enumerable: true,
get: function get() {
return _interopRequireDefault(_toast).default;
}
}... | Object.defineProperty(exports, 'reducer', {
enumerable: true, |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>#### FORMS
from flask import current_app
from flask.ext.wtf import Form
from flask.ext.security.forms import RegisterForm, LoginForm, RegisterFormMixin
from wtforms import (SelectField, StringField, SubmitField, TextAreaField,
HiddenField, FileField, R... | class AddTenantForm(Form):
user=StringField('User', [DataRequired()])
apt=SelectField('Property', coerce=int) |
<|file_name|>Occurrence.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*-
###########################################################################
# This is the package latexparser
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | |
<|file_name|>new-box-syntax.rs<|end_file_name|><|fim▁begin|>/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
// Tests that the new `box` syntax works with unique pointers and GC pointers.
use std::gc::Gc;
use std::owned::HEAP;
struct Structure {
x: int,
... | let b: ~int = box()(1 + 2);
let c = box()(3 + 4);
let d = box(GC)(5 + 6);
} |
<|file_name|>PMDGWrapper.cpp<|end_file_name|><|fim▁begin|>#include "PMDGWrapper.h"
static enum DATA_REQUEST_ID {
DATA_REQUEST,
CONTROL_REQUEST,
AIR_PATH_REQUEST
};
static enum EVENT_ID {
EVENT_SIM_START, // used to track the loaded aircraft
};
HANDLE hSimConnect = NULL;
byte bQuit=false;
PMDG_NGX_Data sPmdgData... | |
<|file_name|>test_swver.py<|end_file_name|><|fim▁begin|>__author__ = "Nitin Kumar, Rick Sherman"
__credits__ = "Jeremy Schulman"
import unittest
from nose.plugins.attrib import attr
from mock import patch
import os
from jnpr.junos import Device
from jnpr.junos.facts.swver import facts_software_version as software_ver... | self.assertLessEqual(version_info('13.3-20131120'), (14, 1))
|
<|file_name|>perceval_gerrit_me.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3
from datetime import datetime, timedelta
from perceval.backends.core.gerrit import Gerrit
# hostname of the Gerrit instance
hostname = 'gerrit.opnfv.org'
# user for sshing to the Gerrit instance
user = 'd.arroyome'
# retrieve only... | repo = Gerrit(hostname=hostname, user=user)
# fetch all reviews as an iterator, and iterate it printing each review id |
<|file_name|>preprocessing.py<|end_file_name|><|fim▁begin|># coding: utf-8
# # Preprocessing Notebook
#
# ### Author: James Foster, jmfoster@gmail.com
#
# #### Install gomill: http://mjw.woodcraft.me.uk/gomill/doc/0.7.4/install.html
# In[1]:
import numpy as np
import pandas as pd
from gomill import sgf
from gomill... | |
<|file_name|>resource_op_lifting.cc<|end_file_name|><|fim▁begin|>/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/// Solutions to the [Cryptopals Challenges](https://cryptopals.com)
///
/// Written whilst leading the *A*spiring *R*ustacean *S*ocial *E*ducation group within LinkedIn
pub mod encode;
pub mod encrypt;
pub mod stat;
pub mod transform;
pub mod xor_cipher {
use super... | Ok(s) => {
if s.len() != b_len {
return Err(HistogramError::HistogramMismatch); |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>import sys
from cool_commits import info, find
if __name__ == '__main__':
command = sys.argv[1]
if command == 'find':
print(*find(sys.argv[2]))
elif command == 'info':
for info_text in info(sys.argv[2]):
print('='*60)<|fim▁h... | |
<|file_name|>start.js<|end_file_name|><|fim▁begin|>'use strict';
const gulp = require('gulp');
const sequence = require('run-sequence');<|fim▁hole|>});<|fim▁end|> |
gulp.task('start', cb => {
sequence('configure', 'build', 'install', cb); |
<|file_name|>GenCall.cpp<|end_file_name|><|fim▁begin|>//===--- GenCall.cpp - Swift IR Generation for Function Calls -------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with R... | llvm_unreachable("bad parameter convention"); |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate num;
use num::traits::{PrimInt, Zero};
fn horner<T: PrimInt + Zero>(cs: &[T], x: T) -> T {
cs.iter()
.rev()
.fold(Zero::zero(), |acc: T, c| (acc * x) + (*c))
}
fn main() {
println!("{}", horner(&[-19i32, 7, -4, 6], 3i32)); // 128
... | }
} |
<|file_name|>routes.py<|end_file_name|><|fim▁begin|>from app import celery
from flask import current_app as app
from datetime import timedelta
from celery.decorators import periodic_task
from flask import jsonify, request, abort
import requests
import json
@periodic_task(run_every=(timedelta(seconds=1)))
def ping():
... | response = requests.post("http://localhost:9000" + "/send_ping", headers=headers, data=json.dumps({})) |
<|file_name|>rect.rs<|end_file_name|><|fim▁begin|>use std::convert::From;
use graphics::math::{ self, Scalar };
use { Point, Size };
/// A rectangle.
#[derive(Clone, Copy, Debug)]
pub struct Rect {
/// The position of the top left corner of the rectangle.
pub pos: Point,
/// The width and height of the re... | h: 2.0 * radius,
}, |
<|file_name|>GRIDJava2.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | energymodels.GRIDJava2 |
<|file_name|>key_signature_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# 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 ... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
long_description = """
`termtool` helps you write subcommand-based command line tools in Python. It collects several Python libraries into a declarative syntax:
* `argparse`, the argument parsing module with subcommand support provid... | author='Mark Paschal',
author_email='markpasc@markpasc.org', |
<|file_name|>testorm-2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2.6
# -*- coding: utf-8 -*-
<|fim▁hole|># it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# Metagam is distributed in the hope that it ... | # This file is a part of Metagam project.
#
# Metagam is free software: you can redistribute it and/or modify |
<|file_name|>gtfs-update.js<|end_file_name|><|fim▁begin|>var http = require("http");
var path = require('path');
var fs = require('fs');
var mkdirp = require('mkdirp');
var pg = require('pg');
var exec = require('child_process').exec;
var sh = require("execSync")
var util = require('util');
var info = {"good_load":0,"... | }else{
//client.query('DROP SCHEMA "'+schemaName+'"'); |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(const_fn)]
#![feature(alloc, allocator_api)]
#![no_std]
#[cfg(test)]
#[macro_use]
extern crate std;
#[cfg(feature = "use_spin")]
extern crate spin;
extern crate alloc;
use alloc::alloc::{Alloc, AllocErr, Layout};
use core::alloc::{GlobalAlloc};
use core::m... | addr & !(align - 1)
} else if align == 0 { |
<|file_name|>help.go<|end_file_name|><|fim▁begin|>package repodelete
<|fim▁hole|>}
func GetArguments() string {
return ` repository pattern
Specifies the repositories that should be removed. You can use wildcards to specify multiple repositories.`
}<|fim▁end|> | var Usage = []string{"rt rdel <repository pattern>"}
func GetDescription() string {
return "Permanently delete repositories with all of their content from Artifactory." |
<|file_name|>package-info.java<|end_file_name|><|fim▁begin|>/*
* Copyright © 2014 - 2018 Leipzig University (Database Research Group)
*
* 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|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>}<|fim▁end|> | // Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
fn main() {
println!("cargo:rustc-flags=-l windows.data.pdf"); |
<|file_name|>config.py<|end_file_name|><|fim▁begin|>import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string'
MAIL_SERVER = os.environ.get('MAIL_SERVER', 'smtp.googlemail.com')
MAIL_PORT = int(os.environ.get('MAIL_PORT'... | 'development': DevelopmentConfig, |
<|file_name|>globals.py<|end_file_name|><|fim▁begin|># The Nexus software is licensed under the BSD 2-Clause license.
#<|fim▁hole|># http://opensource.org/licenses/bsd-license.php
import time
def Rank(self, parts, fromloc, overriderank, server=None):
username = parts[2].lower()
year = time.strftime("%Y")
... | # You should have recieved a copy of this license with the software.
# If you did not, you can find one at the following link.
# |
<|file_name|>content.js<|end_file_name|><|fim▁begin|>'use strict';
<|fim▁hole|> */
var hbs = require('express-hbs');
function content(options) {
return new hbs.handlebars.SafeString(this.html || '');
}
module.exports = content;
// downsize = Tag-safe truncation for HTML and XML. Works by word!<|fim▁end|> | /**
* Module dependencies |
<|file_name|>BlockStructure.java<|end_file_name|><|fim▁begin|>package fun.guruqu.portal.structures;
public class BlockStructure {
/**
* @param args<|fim▁hole|>
}<|fim▁end|> | */
public static void main(String[] args) {
} |
<|file_name|>migrations.js<|end_file_name|><|fim▁begin|>// Anytime you change the schema of one of the collection in a non-backward
// compatible way you have to write a migration in this file using the following
// API:
//
// Migrations.add(name, migrationCallback, optionalOrder);
// Note that we have extra migrati... | |
<|file_name|>DifferentNamespacesTestCases.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2011, 2012 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* te... |
return p;
}
|
<|file_name|>ico_task.js<|end_file_name|><|fim▁begin|>/**
* @file Generate ico image files.
* @memberof module:ci/tasks
* @function icoTask
* @param grunt
* @param {object} config - Task configuration.
* @param {function} callback - Callback when done.<|fim▁hole|> */
"use strict";
var ico = require('../../lib/c... | * |
<|file_name|>persistence.py<|end_file_name|><|fim▁begin|># orm/persistence.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""private module containi... | |
<|file_name|>view.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 "ui/views/view.h"
#include <algorithm>
#include "base/debug/trace_event.h"
#include "base... | if (count == 0) {
v->next_focusable_view_ = NULL;
v->previous_focusable_view_ = NULL; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.