prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>aria.js<|end_file_name|><|fim▁begin|>/** * aria support for slide * @author yiminghe@gmail.com */ KISSY.add("switchable-ext/slide/aria", function (S, DOM, Event, Switchable) { // var KEY_PAGEUP = 33; // var KEY_PAGEDOWN = 34; // var KEY_END = 35; // var KEY_HOME = 36; var KEY_LEFT ...
requires:["dom", "event", 'switchable'] });
<|file_name|>tuple.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/...
fn gt(&self, other: &(A,)) -> bool { other.lt(&(*self)) } }
<|file_name|>comprehension.py<|end_file_name|><|fim▁begin|>if __name__ == '__main__': x = int(input())<|fim▁hole|> z = int(input()) n = int(input()) L = [[a,b,c] for a in range(x+1) for b in range(y+1) for c in range(z+1)] L = list(filter(lambda x : sum(x) != n, L)) print(L)<|fim▁end|>
y = int(input())
<|file_name|>LineSegment.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Math.Float import Float # For fuzzy comparison of edge cases. ## Represents a line segment in 2D. # # The line segment is represented by two endpoint...
# \param b A different point on the line to intersect with. # \return True if the line segment intersects with the line, or False # otherwise.
<|file_name|>openscad.py<|end_file_name|><|fim▁begin|>import subprocess import os #from tailorscad.config import ScadConfig <|fim▁hole|> def build_with_openscad(state): args = build_args_from_state(state) out_call = '' for arg in args: out_call += ' ' + arg print 'args:', out_call try...
BASE_DIR = '/usr/bin/' DEFAULT = BASE_DIR + 'openscad'
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from copy import copy import silk.utils.six as six from silk.singleton import Singleton def default_permissions(user): if user: return user.is_staff return False class SilkyConfig(six.with_metaclass(Singleton, object)): defaults = { '...
def __init__(self): super(SilkyConfig, self).__init__() self._setup()
<|file_name|>test_generation.py<|end_file_name|><|fim▁begin|>def test_default(cookies): """ Checks if default configuration is working """ result = cookies.bake() assert result.exit_code == 0 assert result.project.isdir()<|fim▁hole|><|fim▁end|>
assert result.exception is None
<|file_name|>wanderer.py<|end_file_name|><|fim▁begin|>''' Created on Jan 19, 2013 @author: dsnowdon ''' import os import tempfile import datetime import json import logging from naoutil.jsonobj import to_json_string, from_json_string from naoutil.general import find_class import robotstate from event import * from ...
return from_json_string(env.memory.getData(MEM_CURRENT_ACTIONS))
<|file_name|>layout-1.ts<|end_file_name|><|fim▁begin|>export class Layout1ViewModel { el: Element;<|fim▁hole|> this.el.classList.add('layout-1'); } activate(params: any) { this.activate = params; } }<|fim▁end|>
attached() { this.el.classList.remove('view-only');
<|file_name|>getRenderProperties.js<|end_file_name|><|fim▁begin|>/* global HTMLImageElement */ /* global HTMLCanvasElement */ /* global SVGElement */ import getOptionsFromElement from "./getOptionsFromElement.js"; import renderers from "../renderers"; import {InvalidElementException} from "../exceptions/exceptions.js...
var selector = document.querySelectorAll(string);
<|file_name|>checksum_service.py<|end_file_name|><|fim▁begin|># coding=utf-8 from ..models.checksum import Checksum from ..models.address import Address from ..models.shopping_cart_item import ShoppingCartItem from ..models.shopping_cart import ShoppingCart from .paymill_service import PaymillService import json __auth...
We suggest to always use as it might cause problems, if your account does not support the same currencies as your merchants accounts. :param list checkout_options: Various options that determine behavior before/during/after checkout such as editability of address fields.
<|file_name|>processor.py<|end_file_name|><|fim▁begin|>import csv import decimal import os import datetime from stocker.common.events import EventStreamNew, EventStockOpen, EventStockClose from stocker.common.orders import OrderBuy, OrderSell from stocker.common.utils import Stream class CompanyProcessor(object): ...
<|file_name|>AddToLayerAction.java<|end_file_name|><|fim▁begin|>//======================================================================== // //File: $RCSfile: AddToLayerAction.java,v $ //Version: $Revision: 1.4 $ //Modified: $Date: 2013/01/10 23:05:58 $ // //Copyright (c) 2005-2014 Mentor Graphics Corpor...
<|file_name|>test_master_functional.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from subprocess import check_call <|fim▁hole|><|fim▁end|>
def test_shellstreaming_help(): check_call(["shellstreaming", "--help"])
<|file_name|>common.py<|end_file_name|><|fim▁begin|>import sys import time import sys num = 1000 print_granularity = 1000 count = 0 first = True start = 0 gran_start = 0 min = 0 max = 0 avg = 0 sum = 0 total = 0 def set_print_granularity(p): global print_granularity print_granularity = p print("%s: print granular...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::os::{iovec}; use {int_t, ssize_t}; #[cfg(target_os = "linux")] #[path = "linux/mod.rs"] mod os; pub fn readv(fd: int_t, iovec: &[iovec]) -> ssize_t { extern { fn readv(fd: int_t, iovec: *const iovec, count: int_t) -> ssize_t; }<|fim▁hole|> extern ...
unsafe { readv(fd, iovec.as_ptr(), iovec.len() as int_t) } } pub fn writev(fd: int_t, iovec: &[iovec]) -> ssize_t {
<|file_name|>daemon_set.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unl...
err = dsReaper.Stop(f.Namespace.Name, ds.Name, 0, nil) Expect(err).NotTo(HaveOccurred()) err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, &ds)) Expect(err).NotTo(HaveOccurred(), "error waiting for daemon pod to be reaped")
<|file_name|>analyze-migration.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Migration Stream Analyzer # # Copyright (c) 2015 Alexander Graf <agraf@suse.de> # # 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...
self.filename = filename self.file = open(self.filename, "rb")
<|file_name|>test_prometheus.py<|end_file_name|><|fim▁begin|># # Copyright 2016 IBM # # 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 # # Unl...
# TYPE gamma gauge gamma{resource_id="%s", project_id="test"} 5 # TYPE delta_epsilon gauge
<|file_name|>rollup.config.js<|end_file_name|><|fim▁begin|>import buble from 'rollup-plugin-buble'; import resolve from 'rollup-plugin-node-resolve'; import vue from 'rollup-plugin-vue'; export default { entry: 'index.js', dest: 'dist/v-tags.js', format: 'umd',<|fim▁hole|> plugins: [ vue({ compileTemp...
sourceMap: true, useStrict: true, moduleName: 'VTags',
<|file_name|>admin.v2.server.controller.js<|end_file_name|><|fim▁begin|>'use strict'; const path = require('path'), mongoose = require('mongoose'), Promise = require('bluebird'), errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')), _ = require('lodash'); ...
*/ exports.patchUser = (req, res) => {
<|file_name|>A.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
module.exports = "module-one-A-model";
<|file_name|>markdown.js<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////// // // Markdown to HTML converter demo (markdown widget) // // // IoT Manager https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager // // version : 1.0 // IoT Manager : 1.5.4 and above // ////////////...
}
<|file_name|>integration.ts<|end_file_name|><|fim▁begin|>import {describe, it, display} from "./framework" import {LayoutDOM, Row, Column, GridBox, Spacer, Tabs, Panel} from "@bokehjs/models/layouts/index" import {ToolbarBox} from "@bokehjs/models/tools/toolbar_box" import { Button, Toggle, Dropdown, CheckboxGroup...
/* XXX: fix "max" column policy it("should allow to expand when column policy is max", async () => { const s0 = spacer("fixed", "fixed", 80, 40)("red")
<|file_name|>regex_edit_dialog_component.ts<|end_file_name|><|fim▁begin|>/* Copyright 2021 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://ww...
@Input() regexString!: string; @Input() colorRunPairList!: ColorGroup[];
<|file_name|>records.py<|end_file_name|><|fim▁begin|>""" Records for SMART Reference EMR Ben Adida & Josh Mandel """ from base import * from django.utils import simplejson from django.conf import settings from smart.common.rdf_tools.rdf_ontology import ontology from smart.common.rdf_tools.util import rdf, foaf, vcard...
SELECT ?gn ?fn ?dob ?gender ?zipcode ?d WHERE {
<|file_name|>intphisucks.py<|end_file_name|><|fim▁begin|>import math from scipy import integrate, optimize import numpy as np import matplotlib.pyplot as plt import numpy. polynomial.chebyshev as cheb from matplotlib import rc iphi = lambda x: np.sqrt(9.8 / 8.) * (1. - np.cos(x)) / \ np.sqrt((x - np.sin(x)) * np....
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var map = [ [0x1, 0x8], [0x2, 0x10], [0x4, 0x20], [0x40, 0x80] ] function Canvas(width, height) { if(width%2 != 0) { throw new Error('Width must be multiple of 2!'); }<|fim▁hole|> this.width = width; this.height = height; this.content = new Buffer...
if(height%4 != 0) { throw new Error('Height must be multiple of 4!'); }
<|file_name|>open_gallery.py<|end_file_name|><|fim▁begin|>import subprocess subprocess.call(""" adb -d shell am start -n com.android.gallery/com.android.camera.GalleryPicker<|fim▁hole|><|fim▁end|>
""")
<|file_name|>globalize.culture.da.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:f5c198d5eef0ca0f41f87746ef8fefe819a727fcd59a6477c76b94b55d27128d size 1730
<|file_name|>pipes.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { SharedModule } from '../../shared/shared.module';<|fim▁hole|>import { AppendPipe } from './appendPipe'; @NgModule({ imports: [ SharedModule ], declarations: [ AppendPipe ], exports: [ Append...
<|file_name|>key_value_table_demo.py<|end_file_name|><|fim▁begin|>import json import pprint from a2qt import QtWidgets from a2widget.key_value_table import KeyValueTable from a2widget.a2text_field import A2CodeField _DEMO_DATA = { 'Name': 'Some Body', 'Surname': 'Body', 'Street. Nr': 'Thingstreet 8', ...
def get_data(self): data = self.key_value_table.get_data() print(data)
<|file_name|>pipe_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package cloudtail import ( "strings" "testing" . "github.com/smartystreets/goconvey/convey" ) ...
} So(text, ShouldResemble, []string{"line", "another", "last one"})
<|file_name|>axt.Ajax.spec.js<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2015 - Gabriel Reiser, greiser * * 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...
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions:
<|file_name|>0002_auto_20160113_0600.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-13 06:00 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): <|fim▁hole|> ] operations = [ ...
dependencies = [ ('MergeServer', '0001_initial'),
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # MouseTrap # # Copyright 2009 Flavio Percoco Premoli # # This file is part of mouseTrap. # # MouseTrap is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the F...
<|file_name|>lioncoin_ky.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ky" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Lioncoin Core</source> <translation type="unfi...
<translation type="unfinished"/> </message>
<|file_name|>EntryData.java<|end_file_name|><|fim▁begin|>package org.masterylearning.domain.data; import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes.Type;<|fim▁hole|>import org.masterylearning.dto.out.Ent...
import com.fasterxml.jackson.annotation.JsonTypeInfo; import org.masterylearning.domain.Entry;
<|file_name|>Result.java<|end_file_name|><|fim▁begin|>package org.ownprofile.boundary.owner.client; public class Result<T> { private boolean isSuccess; private T successValue; private Fail fail; public static Result<Void> success() { return success(null); } public static <S> Result<S> success(S successValue...
<|file_name|>default-method-simple.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apac...
struct A { x: int }
<|file_name|>project.rs<|end_file_name|><|fim▁begin|>// Evelyn: Your personal assistant, project manager and calendar // Copyright (C) 2017 Gregory Jensen // // 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 Softwa...
<|file_name|>test.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { MockBackend } from '@angular/http/testing'; import { Http, BaseRequestOptions } from '@angular/http'; @NgModule({ providers: [ MockBackend, BaseRequestOptions, { provide: ...
},
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from . import tests from . import defaults from .scripting import ( registeredTests, testGlyph, testLayer, testFont, formatGlyphReport, formatLayerReport, formatFontReport<|fim▁hole|>)<|fim▁end|>
<|file_name|>medications.py<|end_file_name|><|fim▁begin|>#(C) Copyright Syd Logan 2017-2020 #(C) Copyright Thousand Smiles Foundation 2017-2020 # #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 ...
data["name"] = 123
<|file_name|>createDrawAxes.ts<|end_file_name|><|fim▁begin|>import { vec3, vec4 } from 'gl-matrix'; // tslint:disable-next-line:import-name import REGL = require('regl'); interface Attributes { position: vec3; color: vec3; } /* * All the information needed to be able to draw axes to the screen */ export int...
<|file_name|>dev-server.js<|end_file_name|><|fim▁begin|>require('./check-versions')(); const config = require('../config'); if (!process.env.NODE_ENV) { process.env.NODE_ENV = JSON.stringify(config.dev.env.NODE_ENV); } const opn = require('opn'); const path = require('path'); const express = require('express'); ...
const hotMiddleware = require('webpack-hot-middleware')(compiler, { log: () => {}, });
<|file_name|>sandbox3.service.ts<|end_file_name|><|fim▁begin|>import { Inject, Injectable } from '@angular/core'; import { Http, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/operator/mergeMap'; import 'rxjs/operator/switchMap'; import 'rxjs/...
return this.data; } getSynchronousDataArg(arg: number) {
<|file_name|>runpack.py<|end_file_name|><|fim▁begin|>""" WARNING! this module is incomplete and may have rough edges. Use only if necessary """ import py from struct import unpack from rpython.rlib.rstruct.formatiterator import FormatIterator from rpython.rlib.rstruct.error import StructError class MasterReader(objec...
def runpack(fmt, input):
<|file_name|>MergeTrees.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <vector> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution {<|fim▁hole|> if (t2 == NULL) return t1; ...
public: TreeNode* mergeTrees(TreeNode* t1, TreeNode* t2) { if (t1 == NULL) return t2;
<|file_name|>flatten.py<|end_file_name|><|fim▁begin|>""" Read a snakefood dependencies file and output the list of all files. """ # This file is part of the Snakefood open source package. # See http://furius.ca/snakefood/ for licensing details. import sys from os.path import join from snakefood.depends import read_de...
parser = optparse.OptionParser(__doc__.strip()) opts, args = parser.parse_args()
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod data; mod item; mod child; mod _type; mod node; pub use self::data::RcData; pub use self::item::RcItem;<|fim▁hole|>pub use self::_type::DataType; pub use self::node::RcNode;<|fim▁end|>
pub use self::child::RcChild;
<|file_name|>bwa.py<|end_file_name|><|fim▁begin|>"""BWA (https://github.com/lh3/bwa) """ import os import signal import subprocess from bcbio.pipeline import config_utils from bcbio import bam, utils from bcbio.distributed import objectstore from bcbio.distributed.transaction import file_transaction, tx_tmpdir from bc...
type_flag = "" if bam.is_bam(align_file) else "S" base, ext = os.path.splitext(align_file) out_file = base + ".unique" + ext bed_file = dd.get_variant_regions(data) or dd.get_sample_callable(data)
<|file_name|>wma.src.js<|end_file_name|><|fim▁begin|>/** * @license Highstock JS v8.0.3 (2020-03-06)<|fim▁hole|> * @requires highcharts * @requires highcharts/modules/stock * * Indicator series type for Highstock * * (c) 2010-2019 Kacper Madej * * License: www.highcharts.com/license */ 'use strict'; import '.....
* @module highcharts/indicators/wma
<|file_name|>mutex.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/...
<|file_name|>remainder.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package math<|fim▁hole|>// The original C code and the comment below are from // FreeBSD's /usr/src/lib/m...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import setuptools from setuptools import setup, find_packages <|fim▁hole|> raise RuntimeError("setuptools must be newer than 0.7") version = "0.1.3" setup( name="pinger", version=version, author="Pedro Pal...
if setuptools.__version__ < '0.7':
<|file_name|>index_object.py<|end_file_name|><|fim▁begin|>import gc import numpy as np from pandas import ( DatetimeIndex, Float64Index, Index, IntervalIndex, MultiIndex, RangeIndex, Series, date_range, ) from .pandas_vb_common import tm class SetOperations: params = ( ...
<|file_name|>MNamed.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014 the original author or 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...
* distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>OutputDriver.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2011, Image Engine Design Inc. All rights reserved. // Copyright (c) 2012, John Haddon. All rights reserved. // // Redistribution and use in source and binary form...
// notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // * Neither the name of Image Engine Design nor the names of any
<|file_name|>CCTween.js<|end_file_name|><|fim▁begin|>/**************************************************************************** Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining ...
return true; }, /**
<|file_name|>_visual.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 """A ${VISUAL} placeholder that will use the text that was last visually selected and insert it here. If there was no text visually selected, this will be the empty string. """ import re import textwrap from UltiSnips import...
if self._mode == "v": # Normal selection. text = self._text else: # Block selection or line selection. text_before = _vim.buf[self.start.line][:self.start.col]
<|file_name|>getCurrentOrNextSemesterCX.py<|end_file_name|><|fim▁begin|># returns the current PeopleSoft semester code, as of today # if today is between semesters, returns the next semester code import cx_Oracle def getCurrentOrNextSemesterCX (self): file = open('/opt/Plone-2.5.5/zeocluster/client1/Extensions/Or...
for column_1 in cursor: try: return column_1[0] except:
<|file_name|>public.py<|end_file_name|><|fim▁begin|>from configurations import values from . import common, databases, email from .. import __version__ class Raven(object): """Report uncaught exceptions to the Sentry server.""" INSTALLED_APPS = common.Common.INSTALLED_APPS + ('raven.contrib.django.raven_com...
class SSL(object): """Settings for SSL."""
<|file_name|>bundled_crud_test.js<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2014 The Lovefield Project 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 L...
<|file_name|>glossary.py<|end_file_name|><|fim▁begin|>from flask_restplus import Namespace, Resource from flask import current_app from cea.glossary import read_glossary_df <|fim▁hole|> @api.route('/') class Glossary(Resource): def get(self): glossary = read_glossary_df(plugins=current_app.cea_config.plug...
api = Namespace('Glossary', description='Glossary for variables used in CEA')
<|file_name|>watchseries.py<|end_file_name|><|fim▁begin|># -*- coding: cp1252 -*- import urllib,re,string,sys,os import xbmc,xbmcgui,xbmcaddon,xbmcplugin from resources.libs import main #Mash Up - by Mash2k3 2012. addon_id = 'plugin.video.movie25' selfAddon = xbmcaddon.Addon(id=addon_id) art = main.art prettyName = '...
genre=genres[0] else:
<|file_name|>displayname.py<|end_file_name|><|fim▁begin|># Copyright (c) 2017 CorpNewt # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import discord def name(member : discord.Member): # A helper function to return the member's display name nick = name = None tr...
<|file_name|>SingleKeyToggable.java<|end_file_name|><|fim▁begin|>package clearvolume.renderer; /** * Overlays that implement this interface can declare a key binding that will be * used to toggle it's display on/off * * @author Loic Royer (2015) * */ public interface SingleKeyToggable { /** * Returns key cod...
<|file_name|>test_lists.py<|end_file_name|><|fim▁begin|>import unittest2 import helper import simplejson as json from nose.plugins.attrib import attr PORTAL_ID = 62515 class ListsClientTest(unittest2.TestCase): """ Unit tests for the HubSpot List API Python wrapper (hapipy) client. This file contains som...
# make a list to get dummy_data = json.dumps(dict( name='first_test_list', dynamic=False,
<|file_name|>SignOperation.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 the original author or 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.apa...
/** * Change the signatory for signature generation. */ public SignOperation signatory(Signatory signatory) {
<|file_name|>current-date-indicator.src.js<|end_file_name|><|fim▁begin|>/** * @license Highcharts Gantt JS v7.2.0 (2019-09-03) * * CurrentDateIndicator * * (c) 2010-2019 Lars A. V. Cabrera * * License: www.highcharts.com/license */ 'use strict'; (function (factory) { if (typeof module === 'object' && module...
<|file_name|>mac_os.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import platform as py_platform from spack.architecture import Operati...
'10.16': 'bigsur', '11': 'bigsur',
<|file_name|>image.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/. */ //! CSS handling for the computed value of //! [`image`][image]...
<|file_name|>join_group.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2018 acrazing <joking.young@gmail.com>. All rights reserved. # @since 2018-12-03 00:03:40 import time from dbapi.DoubanAPI import DoubanAPI class GroupAPI: def __init__(self): self.api = Dou...
<|file_name|>test_1d.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import division, print_function import finufft from finufft import interface import numpy as np import pytest __all__ = [ "test_nufft1d1", "test_nufft1d2", "test_nufft1d3", ] def test_nufft1d1(seed=42, iflag=1): n...
x = np.random.uniform(-np.pi, np.pi, n) c = np.random.uniform(-1.0, 1.0, n) + 1.0j*np.random.uniform(-1.0, 1.0, n) f = finufft.nufft1d1(x, c, ms, eps=tol, iflag=iflag)
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from app.app_and_db import app from flask import Blueprint, jsonify, render_template import datetime import random import requests dashboard = Blueprint('dashboard', __name__) cumtd_endpoint = 'https://developer.cumtd.com/api/{0}/{1}/{2}' cumtd_endpoint = cumtd_endp...
app.register_blueprint(dashboard, url_prefix='/dashboard')
<|file_name|>touch_helper.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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 vers...
self.__long_func(self.__long_args)
<|file_name|>SqlColumn.java<|end_file_name|><|fim▁begin|>package net.crowmagnumb.database; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.builder.ToStringBuilder; public class SqlColumn implements SqlComponent { private final String _name; private final SqlColumnType _ty...
private String _suffix = null;
<|file_name|>management.py<|end_file_name|><|fim▁begin|># This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import uuid from operator import attrgetter from ...
class RHContributions(ContributionListMixin, RHManageContributionsBase): """Display contributions management page."""
<|file_name|>git.py<|end_file_name|><|fim▁begin|># Copyright 2005-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import logging import subprocess import portage from portage import os from portage.util import writemsg_level from portage.output import create_color_func good =...
bad = create_color_func("BAD") warn = create_color_func("WARN") from portage.sync.syncbase import NewBase
<|file_name|>BaseRecyclerAdapter.java<|end_file_name|><|fim▁begin|>package pro.luxun.luxunanimation.presenter.adapter; import android.support.annotation.UiThread; import android.support.v7.widget.RecyclerView; import android.view.View; import android.view.ViewGroup; import java.util.ArrayList; import java.util.List; ...
@UiThread
<|file_name|>IdentifierProcessorBase.java<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------------+ | | | Copyright 2005-2011 The ConQAT Project | | ...
/** {@inheritDoc} */ @Override
<|file_name|>userCreateValidation.js<|end_file_name|><|fim▁begin|>/****************************************************************************** * $URL: https://source.sakaiproject.org/svn/user/tags/sakai-10.1/user-tool/tool/src/webapp/js/userCreateValidation.js $ * $Id: userCreateValidation.js 308075 2014-04-11 12:...
} else { submitButton.disabled = true; }
<|file_name|>BinaryArithmetic.java<|end_file_name|><|fim▁begin|>package io.indexr.query.expr.arith; import com.google.common.collect.Lists; import java.util.List; import io.indexr.query.expr.BinaryExpression; import io.indexr.query.expr.Expression; import io.indexr.query.types.DataType; public abstract class Binary...
return type1.ordinal() >= type2.ordinal() ? type1 : type2; } }
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|># Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.can...
# along with this program. If not, see <http://www.gnu.org/licenses/>. # # Stay tuned using # twitter @navitia
<|file_name|>nctp_bsd.py<|end_file_name|><|fim▁begin|>import time from ajenti.com import * from ajenti.ui import * from ajenti.utils import shell, str_fsize class BSDIfconfig(Plugin): platform = ['FreeBSD'] def get_info(self, iface): ui = UI.Container( UI.Formline( ...
<|file_name|>search.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl } from 'react-intl'; const messages = defineMessages({ placeholder: { id: 'search.placeholder', defaultMessage: 'Search' }, }); class Search extends React.PureCompon...
onKeyUp={this.handleKeyDown} onFocus={this.handleFocus} />
<|file_name|>sdch_dictionary_fetcher.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 "chrome/browser/net/sdch_dictionary_fetcher.h" #include "base/bind.h" #...
if (fetch_queue_.empty() || current_fetch_.get() || task_is_pending_) return; MessageLoop::current()->PostDelayedTask(FROM_HERE, base::Bind(&SdchDictionaryFetcher::StartFetching,
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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,...
"""Maps Django user groups to Teamspeak groups.""" tsserver = models.ForeignKey(TeamspeakServer, related_name="groupmaps")
<|file_name|>app.js<|end_file_name|><|fim▁begin|>// TODO split modules, controllers, services // info separate files and concat/uglify them let remote = require('remote') let fs = require('fs') let mysql = require('promise-mysql')<|fim▁hole|> let app = angular.module('ttableinstaller', ['ngRoute']) photon.start(docum...
<|file_name|>asm-out-assign-imm.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://w...
} foo(x); }
<|file_name|>vcap.go<|end_file_name|><|fim▁begin|>package poll import ( "encoding/json" "errors" "os" ) func getVCAPApplicationID() (string, error) { // Get the application name vcapJSONContainer := make(map[string]interface{}) err := json.Unmarshal([]byte(os.Getenv("VCAP_APPLICATION")), &vcapJSONContainer) if...
return "", errors.New("Error in reading VCAP Application properties: " + err.Error()) } appID, ok := vcapJSONContainer["application_id"].(string)
<|file_name|>info_logger.py<|end_file_name|><|fim▁begin|>""" Logger di varie info per ogni host """ from novaclient import client as novaclient from ceilometerclient import client as ceiloclient import os from os import environ as env import time def start(hosts, sleep_sec, base_dir): print 'You must be admin t...
<|file_name|>devices.py<|end_file_name|><|fim▁begin|># # rtlsdr_scan # # http://eartoearoak.com/software/rtlsdr-scanner # # Copyright 2012 -2015 Al Brown # # A frequency scanning GUI for the OsmoSDR rtl-sdr library at # http://sdr.osmocom.org/trac/wiki/rtl-sdr # #<|fim▁hole|># the Free Software Foundation, or (at your ...
# 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
<|file_name|>test_hashlib.py<|end_file_name|><|fim▁begin|># Test hashlib module # # $Id: test_hashlib.py 79216 2010-03-21 19:16:28Z georg.brandl $ # # Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org) # Licensed to PSF under a Contributor Agreement. # import hashlib import unittest from test imp...
self.assert_(computed == digest)
<|file_name|>test_dynamic_repeated_get_set.rs<|end_file_name|><|fim▁begin|>use protobuf::reflect::FileDescriptor; use protobuf::reflect::ReflectValueBox; use super::test_dynamic_repeated_get_set_pb; fn dynamic_file_descriptor() -> FileDescriptor { FileDescriptor::new_dynamic( test_dynamic_repeated_get_set...
assert_eq!(2, f.get_repeated(&*m).len()); assert_eq!(ReflectValueBox::U32(17), f.get_repeated(&*m).get(1)); assert_eq!(
<|file_name|>fit.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd from scipy.optimize import least_squares import re import lmfit class Calibrate: def __init__(self, model): """initialize Calibration class Parameters ---------- model : ttim.Model ...
<|file_name|>TRPreviewer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2004 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the TR Previewer main window. """ from __future__ import unicode_literals import os from PyQt5.QtCore import QDir, QTimer, QFileInfo, py...
<|file_name|>hallomatplotlib01.py<|end_file_name|><|fim▁begin|>import numpy as np<|fim▁hole|>plt.plot(x, y) plt.show()<|fim▁end|>
import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x)
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render_to_response, get_object_or_404 from django.http import JsonResponse, HttpResponseRedirect from django.template import RequestContext from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt fr...
if not form.is_valid():