prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>morphism.py<|end_file_name|><|fim▁begin|>from .path import Path class Morphism(object): def __init__(self, arrows): self.arrows = arrows def __call__(self, domain): codomain = {} for arrow in self.arrows: codomain = arrow.apply(domain, codomain) retur...
source_paths = []
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2006-2020 Talend Inc. - www.talend.com * * 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...
root: `${__dirname}/../public/`, dotfiles: 'deny',
<|file_name|>sentiment_by_tencent.py<|end_file_name|><|fim▁begin|># !/usr/bin/python # -*- coding: utf-8 -*- # # Created on Nov 19, 2015 # @author: Bo Zhao # @email: bo_zhao@hks.harvard.edu # @website: http://yenching.org # @organization: Harvard Kennedy School import sys from wbcrawler.sentiment impo...
reload(sys) sys.setdefaultencoding('utf-8')
<|file_name|>angular-drag-and-drop-lists.js<|end_file_name|><|fim▁begin|>/** * angular-drag-and-drop-lists v1.4.0 * * Copyright (c) 2014 Marcel Juenemann marcel@juenemann.cc * Copyright (c) 2014-2016 Google Inc. * https://github.com/marceljuenemann/angular-drag-and-drop-lists * * License: MIT */ angular.module(...
while (listItemNode.parentNode !== listNode && listItemNode.parentNode) { listItemNode = listItemNode.parentNode; }
<|file_name|>release.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Release information about mse version = '1.0' # description = "Your plan to rule the world" # long_description = "More description about your plan" # author = "Your Name Here"<|fim▁hole|># email = "YourEmail@YourDomain" # copyright = "Copy...
<|file_name|>custom_properties.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use cssparser::{Parser, ParserInput}; use servo_ar...
#[bench]
<|file_name|>App.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import update from 'immutability-helper'; class ListItemBullet extends Component { render() { let cssClasses = `listbullet`; const bulletStyle = { border: `5px s...
<|file_name|>StyleScope.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 1999 Lars Knoll (knoll@kde.org) * (C) 1999 Antti Koivisto (koivisto@kde.org) * (C) 2001 Dirk Mueller (mueller@kde.org) * (C) 2006 Alexey Proskuryakov (ap@webkit.org) * Copyright (C) 2004-2009, 2011-2012, 2015-...
} void Scope::updateActiveStyleSheets(UpdateType updateType)
<|file_name|>construct.py<|end_file_name|><|fim▁begin|># Copyright (c) 2020, Manfred Moitzi # License: MIT License import sys import time from datetime import datetime from pathlib import Path from ezdxf.acc import USE_C_EXT from ezdxf.render.forms import ellipse if USE_C_EXT is False: print("C-extension disabled...
return t1 - t0
<|file_name|>dmrlink_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # ############################################################################### # Copyright (C) 2016-2018 Cortney T. Buffington, N0MJS <n0mjs@me.com> # # This program is free software; you can redistribute it and/or modify # it u...
CONFIG = {}
<|file_name|>ec2_role_provider.go<|end_file_name|><|fim▁begin|>package ec2rolecreds import ( "bufio" "encoding/json" "fmt" "path" "strings" "time" "github.com/coreos/mantle/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws/awserr" "github.com/coreos/mantle/Godeps/_workspace/src/github.com/aws/aws-sdk-go/aws...
// // Do not use early expiry of credentials. If a non zero value is
<|file_name|>handlers.go<|end_file_name|><|fim▁begin|>package request <|fim▁hole|> "bytes" "encoding/json" "io/ioutil" ) // A Handlers provides a collection of handlers for various stages of handling requests. type Handlers struct { RequestHandler func(*Request, *interface{}) error ResponseHandler ...
import (
<|file_name|>test_packbits.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, print_function import numpy as np from numpy.testing import assert_array_equal, assert_equal, assert_raises def test_packbits(): # Copied from the docstring. a = [[[1, 0, 1], [0, 1, 0]], [[1,...
((0, 10, 20), [(0, 10, 20), (0, 2, 20), (0, 10, 3)]),
<|file_name|>play.service.spec.ts<|end_file_name|><|fim▁begin|>import { PlayService } from './play.service'; describe('Play Service', () => { let playService: PlayService; let mockedSeed: any; beforeAll(() => { playService = new PlayService(); mockedSeed = [ [ { coordinates: {x:...
<|file_name|>String2.java<|end_file_name|><|fim▁begin|>package com.codingbat; public final class String2 { /* * http://codingbat.com/prob/p165312 * * Given a string, return a string where for every char in the original, * there are two chars. * * doubleChar("The") → "TThhee" * * doubleChar("AAbb") ...
return 0; }
<|file_name|>cp861.py<|end_file_name|><|fim▁begin|>""" Python Character Mapping Codec generated from 'CP861.TXT' with gencodec.py. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. (c) Copyright 2000 Guido van Rossum. """#" import codecs ### Codec APIs class Co...
0x00d0: 0x2568, # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE 0x00d1: 0x2564, # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE 0x00d2: 0x2565, # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
<|file_name|>OrderedOrConstraintTestCase.java<|end_file_name|><|fim▁begin|>/* This file is part of the db4o object database http://www.db4o.com Copyright (C) 2004 - 2011 Versant Corporation http://www.versant.com db4o is free software; you can redistribute it and/or modify it under the terms of version 3 of the GNU ...
<|file_name|>update_database.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys,sqlite3,os if __name__ == "__main__": if len(sys.argv) != 3: print ("usage: update_database database_name division") print ("\t\tdatabase_name = any database name that will be referred to later") print ("\t\tdivision ...
os.system("./ungz_send_to_update_all_gb_files "+database+" . "+div)
<|file_name|>bulk.go<|end_file_name|><|fim▁begin|>package elasticsearch import ( "encoding/json" "fmt" "github.com/luopengift/gohttp" ) const ( enter = '\n' ) type Meta struct { Index string `json:"_index"` Type string `json:"_type"` Id string `json:"_id,omitempty"` } func NewMeta(_index, _type, _id str...
<|file_name|>test_ple.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|> This tests that all the PLE games launch, except for doom; we explicitly check that it isn't defined. """ import nose import numpy as np import unittest NUM_STEPS=150 class NaiveAgent(): def __init__(self, actions): se...
"""
<|file_name|>PopulationConfigService.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2018 OBiBa. All rights reserved. * * This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0. * * You should have received a copy of the GNU General Public License * a...
} }
<|file_name|>service.py<|end_file_name|><|fim▁begin|>import psutil def is_up(ps_name):<|fim▁hole|><|fim▁end|>
return True in [psutil.Process(pid).name() == ps_name for pid in psutil.get_pid_list()]
<|file_name|>too_many_threads.rs<|end_file_name|><|fim▁begin|>extern crate ralloc; #[global_allocator] static ALLOCATOR: ralloc::Allocator = ralloc::Allocator; mod util; use std::thread;<|fim▁hole|> thread::spawn(|| { let mut vec = Vec::new(); for i in 0..0xFFF { util::acid(|| { ...
fn make_thread() -> thread::JoinHandle<()> {
<|file_name|>AnimateImageView.java<|end_file_name|><|fim▁begin|>package com.bzu.yhd.pocketcampus.bottomnav.user.view; import android.content.Context; import android.util.AttributeSet; import com.facebook.rebound.SimpleSpringListener; import com.facebook.rebound.Spring; import com.facebook.rebound.SpringSystem; impor...
springY.setEndValue(yPos); } }; }
<|file_name|>GeminiQuery.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys import sqlite3 import re import itertools import collections import json import abc import re import numpy as np # gemini imports import gemini_utils as util from gemini_constants import * from gemini_utils import Orde...
<|file_name|>questionnaire_manager.py<|end_file_name|><|fim▁begin|>import logging from flask import g from flask_login import current_user from app.globals import get_answer_store, get_answers, get_metadata, get_questionnaire_store from app.questionnaire.path_finder import PathFinder from app.schema.block import Bloc...
for answer in self.get_state_answers(location.block_id):
<|file_name|>session.go<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015, Alcatel-Lucent Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<|fim▁hole|> * Redistributions of source code mu...
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/* setInterval(function() { console.log(document.activeElement); }, 1000); */ /* * Notes regarding app state/modes, activeElements, focusing etc. * ============================================================== * * 1) There is always exactly one item selected. All...
* Keyboard shortcuts are disabled. * 2b) Current item is being edited. It is contentEditable and focused. * Blurring ends the edit mode. * 2c) ELSE the Clipboard is focused (its invisible textarea)
<|file_name|>chrome_cache.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Google Chrome Cache files event formatter.""" import unittest from plaso.formatters import chrome_cache from tests.formatters import test_lib class ChromeCacheEntryEventFormatterTest(test_lib.EventF...
<|file_name|>function.rs<|end_file_name|><|fim▁begin|>//! Defines the `FunctionProto` type, which is a garbage-collected version of core's `FnData`, as //! well as the `Function` type, which is an instantiated, runnable function inside the VM. use lea_core::fndata::{UpvalDesc, FnData}; use lea_core::opcode::*; use me...
} /// An active Upvalue #[derive(Debug, Clone, Copy)]
<|file_name|>type-params-in-different-spaces-2.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 // htt...
trait Tr<T> { fn op(T) -> Self; }
<|file_name|>autocomplete.py<|end_file_name|><|fim▁begin|>"""Customized autocomplete widgets""" # Standard Library import re<|fim▁hole|># MuckRock from muckrock.jurisdiction.models import Jurisdiction class MRSelect2Mixin: """MuckRock Model Select2 mixin""" def __init__(self, *args, **kwargs): attrs...
# Third Party from dal import autocomplete
<|file_name|>manager.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation # # 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/...
return crypto.revoke_certs_by_project(project_id) def revoke_certs_by_user_and_project(self, context, user_id, project_id):
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "github.com/mitchellh/packer/packer/plugin" ) func main() {<|fim▁hole|> server.RegisterProvisioner(new(Provisioner)) server.Serve() }<|fim▁end|>
server, err := plugin.Server() if err != nil { panic(err) }
<|file_name|>GeneralToSMTRunnerEventsConvertor.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.execution.testframework.sm.runner; import com.intellij.execution.testframewo...
if (testProxy == null) { logProblem("Test wasn't started! TestOutput event: name = {" + testName + "}, " +
<|file_name|>main.py<|end_file_name|><|fim▁begin|># Copyright 2016 Sam Parkinson <sam@sam.today> # # This file is part of Something for Reddit. # # Something for Reddit 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 Foun...
parts = uri.split('/')[1:] if len(parts) <= 3: # /u/*/*, /r/*, /r/*/*(sorting)
<|file_name|>geo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ eve.io.mongo.geo ~~~~~~~~~~~~~~~~~~~ Geospatial functions and classes for mongo IO layer :copyright: (c) 2017 by Nicola Iarocci. :license: BSD, see LICENSE for more details. """ <|fim▁hole|>class GeoJSON(dict): def _...
<|file_name|>Control Panel.component.js<|end_file_name|><|fim▁begin|>/*{"name":"Control Panel","elements":[{"name":"Components link"},{"name":"Features link"},{"name":"Step Definitions link"},{"name":"Mock Data link"},{"name":"Run Protractor button"},{"name":"Server Status badge"}],"actions":[{"name":"go to Components"...
}; ControlPanel.prototype.goToMockData = function () { var self = this;
<|file_name|>derive-struct.rs<|end_file_name|><|fim▁begin|>/// Test crate for derive(FieldByField). extern crate field_by_field; #[macro_use] extern crate field_by_field_derive; use field_by_field::EqualFieldByField; #[derive(FieldByField, Debug)] struct Something { hello: String, val: i8, val2: i8, ...
<|file_name|>classes-cross-crate.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...
let mut nyan = cat(0u, 2, ~"nyan"); nyan.eat(); assert!((!nyan.eat())); for _ in range(1u, 10u) { nyan.speak(); };
<|file_name|>comp-4274.component.spec.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. All Rights Reserved. * * 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 { async, ComponentFixture, TestBed } fr...
component = fixture.componentInstance; fixture.detectChanges();
<|file_name|>zwave.py<|end_file_name|><|fim▁begin|>""" Support for Z-Wave. For more details about this component, please refer to the documentation at https://home-assistant.io/components/zwave/ """ import logging import os.path import time from pprint import pprint from homeassistant.const import ( ATTR_BATTERY_...
<|file_name|>unfused.hpp<|end_file_name|><|fim▁begin|>/*============================================================================= Copyright (c) 2010 Christopher Schmidt Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/...
#include <boost/fusion/functional/adapter/unfused.hpp>
<|file_name|>useMountedEffect.ts<|end_file_name|><|fim▁begin|>import { useEffect, useLayoutEffect, useRef, EffectCallback, DependencyList, } from 'react' /* Behaves like `useEffect`, but won't fire after the initial render of a component. */ export const useMountedEffect = ( effect: EffectCallback, i...
const isFirstRender = useRef(true) useEffect(() => {
<|file_name|>PromocionPst.java<|end_file_name|><|fim▁begin|>package com.atux.desktop.promocion; import com.atux.bean.precios.Local; import com.atux.bean.precios.LocalFlt; import com.atux.bean.promocion.Promocion; import com.atux.bean.promocion.PromocionDetalle; import com.atux.bean.promocion.PromocionLocal; imp...
<|file_name|>carenet.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from indivo.views import * from indivo.lib.utils import MethodDispatcher urlpatterns = patterns('', (r'^$', MethodDispatcher({ 'DELETE' : carenet_delete})), (r'^/rename$', MethodDispatcher({ 'POST' : carenet_renam...
from django.conf.urls.defaults import *
<|file_name|>TelephoneValidator.java<|end_file_name|><|fim▁begin|>package es.uniovi.asw.gui.util.form.validator.specific; import es.uniovi.asw.gui.util.form.validator.composite.CheckAllValidator; import es.uniovi.asw.gui.util.form.validator.simple.LengthValidator; import es.uniovi.asw.gui.util.form.validator.simple.Nu...
}
<|file_name|>ThinObject.cpp<|end_file_name|><|fim▁begin|>#include "ThinObject.h" #include "Object.h" #include "SnowString.h" #include "Exception.h" namespace snow { static volatile uintx global_object_id_counter = 1;<|fim▁hole|> void ThinObject::init() { m_Info.frozen = false; m_Info.gc_lock = false; // XXX: W...
<|file_name|>lhp.controller.ts<|end_file_name|><|fim▁begin|>/** * Created by akabeera on 2/18/2016. */ /// <reference path="../../typings/browser.d.ts" /> /// <reference path="../data/gifs-data-model.ts" /> /// <reference path="../services/gif-data.ts" /> module app.Controllers { export interface ILhpController...
} }
<|file_name|>digest.go<|end_file_name|><|fim▁begin|>// Copyright 2021 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 // /...
// Write adds more data to the running hashes. // It never returns an error. func (d *Digest) Write(p []byte) (int, error) {
<|file_name|>stop_iteration_inside_generator.py<|end_file_name|><|fim▁begin|>""" Test that no StopIteration is raised inside a generator """ # pylint: disable=missing-docstring,invalid-name,import-error, try-except-raise, wrong-import-position,not-callable,raise-missing-from import asyncio class RebornStopIteration(St...
<|file_name|>Transmitter.java<|end_file_name|><|fim▁begin|>package mekanism.common.transmitters; import mekanism.api.transmitters.DynamicNetwork;<|fim▁hole|> public N theNetwork = null; public boolean orphaned = true; @Override public N getTransmitterNetwork() { return theNetwork; } @Override public boolea...
import mekanism.api.transmitters.IGridTransmitter; public abstract class Transmitter<A, N extends DynamicNetwork<A, N>> implements IGridTransmitter<A, N> {
<|file_name|>const_after.rs<|end_file_name|><|fim▁begin|>struct FooBar; <|fim▁hole|><|fim▁end|>
const C: FooBar
<|file_name|>nmaptocsv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of nmaptocsv. # # Copyright (C) 2012, 2019 Thomas Debize <tdebize at mail.com> # All rights reserved. # # nmaptocsv is free software: you can redistribute it and/or modify # it under the terms of t...
<|file_name|>console.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::ConsoleBinding; use dom::bindings...
} pub fn Debug(&self, message: DOMString) {
<|file_name|>TypeAnnotation.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Gener...
n += 1; // TargetType tag is a byte switch (pos.type) {
<|file_name|>BlockL.cpp<|end_file_name|><|fim▁begin|>#include "StdAfx.h" #include "Tetris.h" #include "TetrisDlg.h" /* case dir when 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . * x * . . . . . . . . . * . . . . . . . . . ...
case 2: prevRow[col + 1] = 0; thisRow[col + 1] = 0;
<|file_name|>PropertyNode.d.ts<|end_file_name|><|fim▁begin|>import { InputNode } from '../core/InputNode'; export class PropertyNode extends InputNode { constructor( object: object, property: string, type: string ); object: object; property: string; nodeType: string; value: any; <|fim▁hole|>}<|fim▁end|>
<|file_name|>LogRowContext.tsx<|end_file_name|><|fim▁begin|>import React, { useRef, useState, useLayoutEffect, useEffect } from 'react'; import { GrafanaTheme, DataQueryError, LogRowModel, textUtil } from '@grafana/data'; import { css, cx } from '@emotion/css'; import { Alert } from '../Alert/Alert'; import { LogRowCo...
`; return {
<|file_name|>common.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import os, re, time, sys import hashlib, bencode import requests from bs4 import BeautifulSoup reload(sys) #print sys.getdefaultencoding() #sys.setdefaultencoding('utf-8') print sys.getdefaultencoding() ...
def comparelist(src,des): #src: ["file"]
<|file_name|>image_label.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: UTF-8 -*- #==============================================================================# # # # Copyright 2011 Carlos Alberto da Costa Filho ...
<|file_name|>quotable_queries.py<|end_file_name|><|fim▁begin|>import pymongo from pprint import pprint def mongo_conn(db, collection): conn = pymongo.MongoClient('localhost', 27017) db_conn = conn[db] coll_conn = db_conn[collection] print coll_conn return coll_conn def list_and_count(coll_field,...
# def list_imdb(coll_conn): # curr_conn = coll_conn # print curr_conn
<|file_name|>dynamic_array.js<|end_file_name|><|fim▁begin|><rtl code> var m = function (){ function T(){ this.a = []; } var r = new T(); var a = RTL$.makeArray(3, 0); var dynamicInt = []; var dynamicString = []; var dynamicChar = []; var dynamicByte = []; var dynamicRecord = []; var dynamicArrayOfStaticArrayInt = []; ...
dynamicString.push("\""); dynamicString.push(s);
<|file_name|>debug.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
version https://git-lfs.github.com/spec/v1 oid sha256:1371b661d4ebad753ee72a0b75d51aca5ca885cbb51d046e634951057b5314f6 size 144
<|file_name|>publish_message_with_expiration.py<|end_file_name|><|fim▁begin|><|fim▁hole|> logging.basicConfig(level=logging.INFO) with Connection('localhost', 'guest', 'guest') as connection: with connection.channel() as channel: # Declare a queue called, 'simple_queue'. channel.queue.declare('simp...
import logging from amqpstorm import Connection from amqpstorm import Message
<|file_name|>lib.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/. */ // For simd (currently x86_64/aarch64) #![cfg_attr(any(target_os ...
#![feature(range_contains)] #![feature(unique)] #![plugin(heapsize_plugin)]
<|file_name|>l3.py<|end_file_name|><|fim▁begin|># Copyright 2016 NOKIA # # Licensed under the Apache License, Version 2.0 (the "License"); you may<|fim▁hole|># # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# not use this file except in compliance with the License. You may obtain # a copy of the License at
<|file_name|>PVRState.py<|end_file_name|><|fim▁begin|>from Screen import Screen from Components.Label import Label class PVRState(Screen): def __init__(self, session): Screen.__init__(self, session) self["state"] = Label(text="")<|fim▁hole|> class TimeshiftState(PVRState): pass<|fim▁end|>
<|file_name|>test_client_rendering.py<|end_file_name|><|fim▁begin|>from funcweb.widget_validation import WidgetSchemaFactory from funcweb.widget_automation import WidgetListFactory,RemoteFormAutomation,RemoteFormFactory from func.overlord.client import Overlord, Minions import socket import func.utils class TestClient...
print "Getting the modules that has exported arguments" for module in modules.itervalues(): for mod in module:
<|file_name|>test_cover.py<|end_file_name|><|fim▁begin|>"""Test for RFLink cover components. Test setup of RFLink covers component/platform. State tracking and control of RFLink cover devices. """ import logging from homeassistant.components.rflink import EVENT_BUTTON_PRESSED from homeassistant.const import ( A...
await hass.async_block_till_done()
<|file_name|>parameter_config.py<|end_file_name|><|fim▁begin|>"""ParameterConfig wraps ParameterConfig and ParameterSpec protos.""" import collections import copy import enum import math from typing import Generator, List, Optional, Sequence, Tuple, Union from absl import logging import attr from vizier.pyvizier.sha...
init=True,
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-17 17:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import spectator.core.fields class Migration(migrations.Migration): i...
to="spectator_reading.Publication", ), ),
<|file_name|>test_l_artist_release.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from ..models import l_artist_release<|fim▁hole|> """ Set up the test subject. """ self.subject = l_artist_release() def test__l_artist_release__instance(self): self.assertIsIn...
class test_l_artist_release(TestCase): def setUp(self):
<|file_name|>test_status.py<|end_file_name|><|fim▁begin|>from flask_webapi import status from unittest import TestCase class TestStatus(TestCase): def test_is_informational(self): self.assertFalse(status.is_informational(99)) self.assertFalse(status.is_informational(200)) for i in range(1...
for i in range(400, 499): self.assertTrue(status.is_client_error(i))
<|file_name|>test_regex.py<|end_file_name|><|fim▁begin|>import unittest from xcolor.xparser import Xparser class TestXcolorRegex(unittest.TestCase): # expected output for the tested patterns expected = dict(name='color5', value='aabbcc') def test_comments(self): line = ";*color5: rgb:aa/bb/cc" ...
self.assertTrue(Xparser.valid(line))
<|file_name|>PasswordPolicyUtils.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2010-2013 Evolveum * * 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.apach...
if (lims.getLimit() == null || lims.getLimit().isEmpty()){
<|file_name|>_inputstream.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division, unicode_literals import codecs import re from io import StringIO from pip._vendor import webencodings from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib fr...
<|file_name|>SignUpPanel.java<|end_file_name|><|fim▁begin|>package layout; import java.awt.BorderLayout; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; i...
jbok = new JButton("确定"); JPanel p1 = new JPanel(new GridLayout(count,2,5,5));
<|file_name|>http_get_request.hpp<|end_file_name|><|fim▁begin|>// ==================================================================================================================== // Copyright (C) 2015 Lukas Georgieff // Last modified: 06/04/2015 // Description: Declares a class for an HTTP GET request to the trans...
class HttpGetRequest : public HttpRequest { public: // === Constructors and destructor ==================================================================================
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict'; // MODULES // var tape = require( 'tape' ); var pow = require( 'math-power' ); var MAX_INT16 = require( './../lib' ); // TESTS // tape( 'the main export is a number', function test( t ) { t.ok( true, __filename ); t.equal( typeof MAX_INT16, 'number'...
});
<|file_name|>MensajeAmistad.java<|end_file_name|><|fim▁begin|>package abd.p1.model; import java.util.Date; import javax.persistence.*; @Entity public class MensajeAmistad extends Mensaje{ @Column private boolean aceptado; public MensajeAmistad(){ super(); } public MensajeAmistad(Usuario usu, Usuario amigo...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from flask import (Blueprint, current_app as app, g, request, make_response, jsonify, session) from ..models import ModelError, Session from ..models.post import Post, Draft, PostOperator from .helpers import (require_int, JumpDirec...
status_code.append(Post.STATUS_PRIVATE) if not g.is_admin: raise JumpDirectly(jsonify_error('admin required', 403))
<|file_name|>template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re from jinja2 import Environment from .observable import Observable def get_attribute(render_data, variable): levels = variable.split('.') r = render_data for level in levels: if hasattr(r, level): r ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = """Kevin Wierman""" __email__ = 'kevin.wierman@pnnl.gov'<|fim▁hole|><|fim▁end|>
__version__ = '0.1.0'
<|file_name|>arm_32_arm_capstone.py<|end_file_name|><|fim▁begin|># ScratchABit - interactive disassembler # # Copyright (c) 2018 Paul Sokolovsky # # 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,...
<|file_name|>test_css.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ CSS Testing :copyright: (C) 2014 by Openlabs Technologies & Consulting (P) Limited :license: BSD, see LICENSE for more details. """ from os.path import join from cssutils import CSSParser import unittest import trytond.tests...
class CSSTest(unittest.TestCase): """ Test case for CSS. """
<|file_name|>geant4.py<|end_file_name|><|fim▁begin|>## # Copyright 2009-2013 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https:/...
# the Free Software Foundation v2.
<|file_name|>bitcoin_es_UY.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es_UY" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Neocoin</source> <translation type="unfin...
</message> <message>
<|file_name|>20.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export { Query20 as default } from "../../";
<|file_name|>proxy_crawler.py<|end_file_name|><|fim▁begin|>import asyncio from itertools import compress import traceback from proxypool.rules.rule_base import CrawlerRuleBase from proxypool.utils import page_download, page_download_phantomjs, logger, Result class ProxyCrawler(object): """Crawl proxies according...
self._rules = rules if rules else CrawlerRuleBase.__subclasses__()
<|file_name|>cstore.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
RequireDynamic => src.dylib.clone().map(|p| p.0),
<|file_name|>CLogin.py<|end_file_name|><|fim▁begin|>############################################################################# # # Copyright (C) 2013 Navi-X # # This file is part of Navi-X. # # Navi-X is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
from string import * import sys, os.path import urllib
<|file_name|>crypto.rs<|end_file_name|><|fim▁begin|>use crypto::{symmetriccipher, buffer, aes, blockmodes}; use crypto::buffer::{ReadBuffer, WriteBuffer, BufferResult}; // use rand::{ Rng, OsRng }; // use std::str; // use rustc_serialize::base64::{Config, Newline, FromBase64, ToBase64, STANDARD, URL_SAFE}; use rustc_se...
-> Result<Vec<u8>, symmetriccipher::SymmetricCipherError> { // let mut key: [u8; 32] = [10; 32];
<|file_name|>colors.py<|end_file_name|><|fim▁begin|>def RGB01ToHex(rgb): """<|fim▁hole|> """ return '#%02x%02x%02x' % tuple([int(x * 255) for x in rgb]) def hexToRGB01(hexColor): """ Return a hex color string as an RGB tuple of floats in the range 0..1 """ h = hexColor.lstrip('#') retur...
Return an RGB color value as a hex color string.
<|file_name|>ajax.js<|end_file_name|><|fim▁begin|>function redrawFromSelection(obj, url, current_selection) { /* Create the selection */ var new_selection = {}; $.each(obj.exp_selection, function(ekey,evalue) { $.each(evalue.exp_data, function(dkey,dvalue) { if (dvalue.selected) { ...
success: obj.redrawFromSelectionCallback });
<|file_name|>update-google-chart.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import json import gspread from oauth2client.client import SignedJwtAssertionCredentials import datetime from participantCollection import ParticipantCollection # Edit Me! participantFileNames = ['../stayclean-2014-november/participants...
<|file_name|>ban.routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { BanComponent } from "app/quan-ly/ban/ban.component"; import { DanhSachBanComponent } from "app/quan-ly/ban/danh-sach/danh-sach.component"; import { T...
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 Serpent Consulting Services Pvt. Ltd. (<http://www.serpentcs.com>) # Copyright (C) 20...
"security/ir.model.access.csv", "views/product_brand.xml", "views/brand_page.xml",
<|file_name|>jquery.js<|end_file_name|><|fim▁begin|>/*! * jQuery JavaScript Library v2.2.4 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-05-20T17:23Z */ (f...
compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { var i,
<|file_name|>reward.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; var total = 0; export default Ember.Controller.extend({ isShowingHelp: false, isShowingModal: false, actions: { toggleModal: function() { this.toggleProperty('isShowingModal'); }, togg...
array.push({ rewardtitle: item.rewardtitle, rewardamount: item.rewardamount, rewarddescription: item.rewarddescription