prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>amp-shadow-babel.js<|end_file_name|><|fim▁begin|>/** * Copyright 2016 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|> * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writi...
* you may not use this file except in compliance with the License. * You may obtain a copy of the License at *
<|file_name|>demo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import sys import getpass import helper from argparse import ArgumentParser if __name__ == "__main__": parser = ArgumentParser(description="Simple file password based encryption/decryption tools. When run as pipe, use standard in/out.") parse...
op_type = helper.Type.with_password
<|file_name|>functions.py<|end_file_name|><|fim▁begin|>import re def snake_to_camel(snake, upper_first=False): # title-cased words words = [word.title() for word in snake.split('_')] if words and not upper_first: words[0] = words[0].lower() <|fim▁hole|> def camel_to_snake(camel): # first upp...
return ''.join(words)
<|file_name|>pData.py<|end_file_name|><|fim▁begin|>import os from . import SoccerFSA from . import DataStates class SoccerPlayer(SoccerFSA.SoccerFSA): def __init__(self, brain): SoccerFSA.SoccerFSA.__init__(self,brain) self.addStates(DataStates) self.setName('pData') self.postDistan...
filename = "/home/root/postDistData" + str(self.postDistance) + ".csv" # need to remove it if it exists already and make way # for new data
<|file_name|>02_MMSA.js<|end_file_name|><|fim▁begin|>function solve(args){ var i, array = []; for(i = 0; i < args.length; i++){ array[i] = +args[i]; } var sum = 0, count = 0, min = array[0], max = array[0], avg = 0; for(i = 0; i < array.length; i++)...
console.log('sum=' + Number(sum).toFixed(2));
<|file_name|>19_solution-1.ts<|end_file_name|><|fim▁begin|>namespace AdventOfCode2019_19_1 { const DAY = 19; const PROBLEM = 1; export async function run() { let input = await AdventOfCode.getInput(DAY); if (input == null) return; const code = input.trim().split(",").map(p => parseInt(p.trim())); let...
for(let y=0; y<50; y++) { for(let x=0; x<50; x++) {
<|file_name|>types.go<|end_file_name|><|fim▁begin|>package instance import ( "encoding/json" ) // ID is the identifier for an instance. type ID string // Description contains details about an instance. type Description struct { ID ID LogicalID *LogicalID Tags map[string]string } // LogicalID is the ...
// Spec is a specification of an instance to be provisioned type Spec struct {
<|file_name|>policy.py<|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.org...
```
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from django.contrib.auth.views import login, \ logout, \ logout_then_login, \<|fim▁hole|> password_reset_done, \ ...
password_change, \ password_change_done, \ password_reset, \
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apach...
pub fn main() { #[cfg(feature = "cli")] repl::main() }
<|file_name|>stability_cfg1.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/...
#![cfg_attr(not(foo), stable(feature = "test_feature", since = "1.0.0"))]
<|file_name|>test_model.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # -*- encoding: utf-8 -*- import unittest from model import * from example_data import expenses, payments, participations, persons, events kasse = Gruppenkasse.create_new() kasse.fill_with(expenses, payments, participations) class TestGruppen...
self.assertTrue(name in persons, msg=name) def test_events(self): print(kasse.person_dict)
<|file_name|>status.go<|end_file_name|><|fim▁begin|>package git import ( "fmt" "os" "github.com/Originate/git-town/src/command" "github.com/Originate/git-town/src/util" ) // EnsureDoesNotHaveConflicts asserts that the workspace // has no unresolved merge conflicts. func EnsureDoesNotHaveConflicts() { util.Ensur...
<|file_name|>db.py<|end_file_name|><|fim▁begin|>import pymysql.cursors from model.group import Group from model.contact import Contact class DbFixture: def __init__(self, host, name, user, password): self.host = host self.name = name self.user = user self.password = password ...
finally: cursor.close()
<|file_name|>radix_sort.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/Sorting_algorithms/Radix_sort fn merge(in1: Vec<i32>, in2: Vec<i32>, out: &mut [i32]) { let (left, right) = out.split_at_mut(in1.len()); left.clone_from_slice(in1.as_slice()); right.clone_from_slice(in2.as_slice()); } /...
} fn main() { let mut data = [170, 45, 75, -90, -802, 24, 2, 66, -17, 2];
<|file_name|>test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*-<|fim▁hole|>if __name__ == '__main__': for index in range(0, 50): print(sql_template0.format(index)) print("------") for index in range(50, 100): print(sql_template0.format(index))<|fim▁end|>
sql_template0 = """alter table _shadow_orders_{0}_ modify fingerprint text DEFAULT '' COMMENT '下单fingerprint';"""
<|file_name|>servercore.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of Soprano Project. * * Copyright (C) 2007-2010 Sebastian Trueg <trueg@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by...
#include <QtNetwork/QTcpSocket> #include <QtDBus/QtDBus>
<|file_name|>open_command.rs<|end_file_name|><|fim▁begin|>use super::CommandHelpers; use crate::{ actions::{self, ActionOutput}, entity::{EntityRef, Realm}, };<|fim▁hole|> /// Opens an exit. /// /// Example: `open door` pub fn open(realm: &mut Realm, player_ref: EntityRef, helpers: CommandHelpers) -> ActionOutp...
<|file_name|>simpleScene.js<|end_file_name|><|fim▁begin|>function report(str) { console.log(str); } function vec3(x,y,z) { return new THREE.Vector3(x,y,z); } SCENE = {}; SCENE.getCard = function(boxW, boxH, rotZ) { boxD = 0.1; if (!rotZ) rotZ = 0; //report("getImageCard "+imageUrl); var materi...
renderer.shadowMap.enabled = true;
<|file_name|>sysconfig.py<|end_file_name|><|fim▁begin|>""" Sysconfig - files in ``/etc/sysconfig/`` ======================================== This is a collection of parsers that all deal with the system's configuration files under the ``/etc/sysconfig/`` folder. Parsers included in this module are: ChronydSysconfig ...
#
<|file_name|>quips_quarantine.js<|end_file_name|><|fim▁begin|>var mongodb = require('mongodb'), ObjectId = mongodb.ObjectId; /** * Quips Quarantine **/ var quips_quarantine = function ( app ) { /** * Return a list of all (for now) quips in quips_quarantine **/ app.get('/v1/quips_quarantine', function ( req, ...
db.close(); });
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! FFI bindings to dwmapi. #![no_std] #![experimental]<|fim▁hole|>extern crate winapi; use winapi::*; extern "system" { }<|fim▁end|>
<|file_name|>parse_test.rs<|end_file_name|><|fim▁begin|>extern crate mair; use std::fs::*; use std::path::{Path, PathBuf}; use std::io::{self, Read, Write}; use std::ffi::OsStr; use mair::parse::str_ptr_diff; use mair::parse::error::*; use mair::parse::lexer::*; use mair::parse::parser::*; use mair::parse::ast::*; fn ...
}
<|file_name|>partner_ai_1.cpp<|end_file_name|><|fim▁begin|>#include <math.h> #include <stdlib.h> #include "camp_judge.h" #include "game_event.h" #include "monster_ai.h" #include "monster_manager.h" #include "path_algorithm.h" #include "player_manager.h" #include "time_helper.h" #include "partner.h" #include "check_rang...
<|file_name|>detector.py<|end_file_name|><|fim▁begin|>import sys import os import cv2 import numpy as np class Detector: def detect(self, src): raise NotImplementedError("Every Detector must implement the detect method.") class SkinDetector(Detector): """ Implements common color thresholding rul...
for i, r in enumerate(detector.detect(img)): x0, y0, x1, y1 = r cv2.rectangle(imgOut, (x0, y0), (x1, y1), (0, 255, 0), 1)
<|file_name|>DBHelper.js<|end_file_name|><|fim▁begin|>var db=require('./dbDatabase'); var mysql=require('mysql'); var connect_pool=mysql.createPool(db.options);<|fim▁hole|> if(err){ console.log(err.message); setTimeout(getConnection,2000); } callback(client); }) } exports.getConnection=getConne...
connect_pool.connectionLimit=100; //准备好20个链接 connect_pool.queueLimit=100; //最大链接数 function getConnection(callback){ connect_pool.getConnection(function(err,client){
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models from tweets.models import Tweet class Tag(models.Model): name = models.CharField(max_length=255, unique=True, db_index=True) is_hashtag = models.BooleanField(default=False) tweets = models.ManyToMany...
class Meta:
<|file_name|>regions-bounds.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<|fim▁hole|>// <LICENSE-MI...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>IterateStatement.java<|end_file_name|><|fim▁begin|>/** */ package com.euclideanspace.spad.editor; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Iterate Statement</b></em>'. * <!-- end-user-doc --> * * <p> * The following features...
void setStname(String value);
<|file_name|>apps.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class BattlenetclientConfig(AppConfig): name = 'battlenetclient'<|fim▁end|>
from django.apps import AppConfig
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup import re def read(filename): with open(filename) as f: return f.read() __version__ = re.search(r'^__version__ = ([\'"])(?P<version>.*)\1$', read('numtraits.py'), re.M).groupdict()['version'] try: ...
setup( version=__version__,
<|file_name|>memoize.js<|end_file_name|><|fim▁begin|>/** * m59peacemaker's memoize<|fim▁hole|> */ angular.module('syncthing.core') .factory('pmkr.memoize', [ function() { function service() { return memoizeFactory.apply(this, arguments); } function memoiz...
* * See https://github.com/m59peacemaker/angular-pmkr-components/tree/master/src/memoize * Released under the MIT license
<|file_name|>GuideCategory.ts<|end_file_name|><|fim▁begin|>import {Content} from './Content'; export interface GuideCategory { id: number; name: string; content: Content; displayOrder: number;<|fim▁hole|> description: string; additionalInfo: string; icon: string; }<|fim▁end|>
summary: string;
<|file_name|>test_model.py<|end_file_name|><|fim▁begin|>import os from countershape import model from countershape import state from countershape import widgets from . import testpages, tutils class TestContext(testpages.DummyState): def setUp(self): testpages.DummyState.setUp(self) def tearDown(self...
) self.application = model.BaseApplication(self.r) def test_pageexception(self):
<|file_name|>04_zap_vyp_event_detect.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- import RPi.GPIO as GPIO import time BUTTON_PIN = 11 LED_PIN = 7 def stisknuto_callback(channel): global sviti sviti = int(not sviti) GPIO.output(LED_PIN,sviti) if sviti == 1: print "LED dioda ZA...
GPIO.setwarnings(False)
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * from corehq import AccountingAdminInterfaceDispatcher from corehq.apps.accounting.views import * urlpatterns = patterns('corehq.apps.accounting.views', url(r'^$', 'accounting_default', name='accounting_default'), url(r'^...
url(r'^software_plans/new/$', NewSoftwarePlanView.as_view(), name=NewSoftwarePlanView.urlname), url(r'^software_plans/(\d+)/$', EditSoftwarePlanView.as_view(), name=EditSoftwarePlanView.urlname),
<|file_name|>CompatibilityWaila.java<|end_file_name|><|fim▁begin|>package tehnut.resourceful.crops.compat; import mcp.mobius.waila.api.*; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; import n...
import java.util.List;
<|file_name|>benchmark-dbg-insert.py<|end_file_name|><|fim▁begin|>import argparse from goetia import libgoetia from goetia.dbg import dBG from goetia.hashing import StrandAware, FwdLemireShifter, CanLemireShifter from goetia.parsing import iter_fastx_inputs, get_fastx_args from goetia.storage import * from goetia.time...
hasher = hasher_t(31) if storage_t is BitStorage: storage = storage_t.build(int(1e9), 4)
<|file_name|>SettingsActionTest.java<|end_file_name|><|fim▁begin|>package org.herac.tuxguitar.app.Tests; import java.awt.AWTEvent; import java.awt.event.ActionEvent; import java.awt.event.MouseEvent; import junit.framework.TestCase; import org.herac.tuxguitar.app.actions.settings.SettingsAction; import org.herac.tux...
<|file_name|>nacl_types.cc<|end_file_name|><|fim▁begin|>// Copyright 2013 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 "build/build_config.h" #include "components/nacl/common/nacl_types.h" #include "ipc/ipc_p...
plugin_pid(plugin_pid), plugin_child_id(plugin_child_id), crash_info_shmem_handle(crash_info_shmem_handle) { }
<|file_name|>ethiopic.js<|end_file_name|><|fim▁begin|>define( //begin v1.x content { "field-sat-relative+0": "เสาร์นี้", "field-sat-relative+1": "เสาร์หน้า", "field-dayperiod": "ช่วงวัน", "field-sun-relative+-1": "อาทิตย์ที่แล้ว", "field-mon-relative+-1": "จันทร์ที่แล้ว", "field-minute": "นาที", "field-...
"13" ], "field-era": "สมัย",
<|file_name|>text_format.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
<|file_name|>main.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 ASMlover. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // // * Redistributions of source code must retain the above ...
// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
<|file_name|>docs.route.ts<|end_file_name|><|fim▁begin|>import { Route } from '@angular/router'; import { DocsComponent } from './docs.component'; export const docsRoute: Route = { path: '', component: DocsComponent, data: { pageTitle: 'global.menu.admin.apidocs',<|fim▁hole|><|fim▁end|>
}, };
<|file_name|>foreach-external-iterators-hashmap-break-restart.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-A...
let mut i = h.iter();
<|file_name|>FilteredListSection.tsx<|end_file_name|><|fim▁begin|><|fim▁hole|> import * as React from 'react'; import * as c from 'classnames'; interface Props { className?: string; title?: string; } export class FilteredListSection extends React.Component<Props, {}> { public render() { const { ...
import './FilteredListSection.css';
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms <|fim▁hole|> class SignupForm(forms.ModelForm): pass_type = forms.ModelChoiceField( queryset=PassType.objects.filter(active=True), widget=forms.widgets.RadioSelect(), ) class Meta: model = Registration ...
from .models import PassType, Registration
<|file_name|>enum-nullable-simplifycfg-misopt.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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...
/*! * This is a regression test for a bug in LLVM, fixed in upstream r179587, * where the switch instructions generated for destructuring enums * represented with nullable pointers could be misoptimized in some cases.
<|file_name|>dd-drop-plugin-min.js<|end_file_name|><|fim▁begin|><|fim▁hole|>http://yuilibrary.com/license/ */ YUI.add("dd-drop-plugin",function(e,t){var n=function(e){e.node=e.host,n.superclass.constructor.apply(this,arguments)};n.NAME="dd-drop-plugin",n.NS="drop",e.extend(n,e.DD.Drop),e.namespace("Plugin"),e.Plugin.Dr...
/* YUI 3.8.0pr2 (build 154) Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License.
<|file_name|>it.js<|end_file_name|><|fim▁begin|>/** * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'magicline', 'it', {<|fim▁hole|><|fim▁end|>
title: 'Inserisci paragrafo qui' } );
<|file_name|>fields.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Fields represent CronTrigger options which map to :class:`~datetime.datetime` fields. """ from calendar import monthrange from apscheduler.triggers.cron.expressions import ( AllExpression, RangeExpression, WeekdayPositionExpression, LastDayOf...
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#encoding:utf-8 from utils import weighted_random_subreddit t_channel = '@pythondaily' subreddit = weighted_random_subreddit({ 'flask': 3, 'Python': 6, 'django': 4,<|fim▁hole|> 'djangolearning': 1, 'IPython': 5, 'pystats': 4, 'JupyterNoteboo...
'MachineLearning': 1,
<|file_name|>pruning.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test pruning code # ******** # WARNING: # This t...
blocks_to_mine = first_reorg_height + 1 - self.mainchainheight print("Rewind node 0 to prev main chain to mine longer chain to trigger redownload. Blocks needed:", blocks_to_mine) self.nodes[0].invalidateblock(curchainhash) assert(self.nodes[0].getblockcount() == self.mai...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup setup( name='sequencehelpers', py_modules=['sequencehelpers'], version='0.2.1', description="A library consisting of functions for interacting with sequences and iterables.", author='Zach Swift', author_email='cras.zswift@g...
download_url='https://github.com/2achary/sequence/tarball/0.2.1',
<|file_name|>TestWebDAVAccess.py<|end_file_name|><|fim▁begin|># $Id: TestWebDAVAccess.py 1047 2009-01-15 14:48:58Z graham $ # # Unit testing for FileAccess module # import os # Make sure python-kerberos package is installed import kerberos import sys import httplib import urllib2 import urllib2_kerberos import re impo...
f.close() self.assertEqual(l, 'Test creation of file\n', 'Unexpected file content')
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(const_fn)] #![feature(filling_drop)] #![feature(unicode)] #![feature(str_escape)] #![feature(optin_builtin_traits)] #[macro_use] extern crate bitflags; extern crate env_logger; #[macro_use ] extern crate itertools; #[macro_use] extern crate log; extern crate ...
<|file_name|>constraint.ts<|end_file_name|><|fim▁begin|>import { prettyPrint, types } from 'recast'; import { emitConstrainedTranslation } from '../../src/emitting/constraint'; import Context from '../../src/emitting/context'; import { EqualityNode, IgnoreNode, IneqNode, ValueNode } from '../../src/trees/constraint'; ...
operand: {
<|file_name|>arachne_webmaster.py<|end_file_name|><|fim▁begin|>import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vecto...
templates.add('object/mobile/shared_arachne_hatchling.iff') mobileTemplate.setTemplates(templates)
<|file_name|>RadioButton.js<|end_file_name|><|fim▁begin|>import NativeObject from '../NativeObject'; import Widget from '../Widget'; import {JSX} from '../JsxProcessor'; export default class RadioButton extends Widget { get _nativeType() { return 'tabris.RadioButton'; } _getXMLAttributes() { return sup...
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python __author__ = 'Radoslaw Matusiak' __copyright__ = 'Copyright (c) 2016 Radoslaw Matusiak' __license__ = 'MIT' __version__ = '0.5' import cmd import functools import os import sys from polar import Device from polar.pb import de...
<|file_name|>production.js<|end_file_name|><|fim▁begin|>var config = require('../config') var gulp = require('gulp') var gulpSequence = require('gulp-sequence') var getEnabledTasks = require('../lib/getEnabledTasks') var productionTask = function(cb) {<|fim▁hole|>gulp.task('production', productionTask) m...
var tasks = getEnabledTasks('production') gulpSequence('clean', tasks.assetTasks, tasks.codeTasks, 'rev', 'static', cb) }
<|file_name|>pressure.py<|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 # # Unles...
# pylint: disable=g-bare-generic
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for celery_http_gateway project. DEBUG = True TEMPLATE_DEBUG = DEBUG CARROT_BACKEND = "amqp" CELERY_RESULT_BACKEND = "database" BROKER_HOST = "localhost" BROKER_VHOST = "/" BROKER_USER = "guest" BROKER_PASSWORD = "guest" ADMINS = ( # ('Your ...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 """ __init__.py The MIT License (MIT) Copyright (c) 2013 Matt Ryan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal i...
class AddFileHandler(BasicHandler):
<|file_name|>RowLevelSecurityService.java<|end_file_name|><|fim▁begin|>/* * #%L * BroadleafCommerce Open Admin Platform * %% * Copyright (C) 2009 - 2014 Broadleaf Commerce * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * ...
import java.util.List; /**
<|file_name|>plugit_tags.py<|end_file_name|><|fim▁begin|>from django import template from django.template.base import Node, Template, TemplateSyntaxError from django.conf import settings register = template.Library() class PlugItIncludeNode(Node): def __init__(self, action): self.action = action def...
# Load plugIt object if settings.PIAPI_STANDALONE: # Import objects form the view from plugit_proxy.views import plugIt, baseURI
<|file_name|>facoingui.cpp<|end_file_name|><|fim▁begin|>/* * Qt4 facoin GUI. * * W.J. van der Laan 2011-2012 * The Facoin Developers 2011-2012 */ #include "facoingui.h" #include "transactiontablemodel.h" #include "addressbookpage.h" #include "sendcoinsdialog.h" #include "signverifymessagedialog.h" #include "option...
connect(exportAction, SIGNAL(triggered()), transactionView, SLOT(exportClicked())); } void FacoinGUI::gotoAddressBookPage()
<|file_name|>bitcoin_bg.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="bg" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Entrustcoin</source> <translation type="unfinis...
<|file_name|>locked-versions.ts<|end_file_name|><|fim▁begin|>import { valid } from 'semver'; import { logger } from '../../../logger'; import type { PackageFile } from '../../types'; import { getNpmLock } from './npm'; import type { LockFile } from './types'; import { getYarnLock } from './yarn'; export async function...
} } else if (npmLock) { logger.debug('Found ' + npmLock + ' for ' + packageFile.packageFile); lockFiles.push(npmLock);
<|file_name|>arm.py<|end_file_name|><|fim▁begin|>""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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...
'-I%s' % ARM_INC
<|file_name|>macro-use-both.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or dist...
// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>filesys_windows.go<|end_file_name|><|fim▁begin|>package system // import "github.com/docker/docker/pkg/system" import ( "os" "path/filepath" "regexp" "strconv" "strings" "sync" "syscall" "time" "unsafe" winio "github.com/Microsoft/go-winio" "golang.org/x/sys/windows" ) const ( // SddlAdminis...
return OpenFileSequential(name, os.O_RDONLY, 0) } // OpenFileSequential is the generalized open call; most users will use Open
<|file_name|>Update_WinSCP.py<|end_file_name|><|fim▁begin|># Released under the GNU General Public License version 3 by J2897. def get_page(page): import urllib2 source = urllib2.urlopen(page) return source.read() title = 'WinSCP Updater' target = 'Downloading WinSCP' url = 'http://winscp.net/eng/download.php' pr...
<|file_name|>complexHeuristic.py<|end_file_name|><|fim▁begin|>import numpy import pandas import statsmodels.api as sm def complex_heuristic(file_path): ''' You are given a list of Titantic passengers and their associating information. More information about the data can be seen at the link below: http:...
predictions[passenger['PassengerId']] = 1
<|file_name|>InputEventsMap.cpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2012 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or ...
} void
<|file_name|>mailsend.py<|end_file_name|><|fim▁begin|>from boto.ses import SESConnection import os def sendmail(name, comment):<|fim▁hole|> to_addresses = ["patte.wilhelm@googlemail.com"] connection = SESConnection(aws_access_key_id=os.environ['AWS_ACCESS_KEY'], aws_secret_access...
source = "patte.wilhelm@googlemail.com" subject = "Kommentar eingegangen" body = 'Es wurde ein neues Wetter bewertet. Von: ' + name + ': ' + comment
<|file_name|>tags_extra_css_tests.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from django.utils.timezone import now from promises.models import Promise, Category from popolo.models import Person from taggit.models import Tag from ..models import TagExtraCss nownow = now() class TagsExtraCssTestCa...
self.person = Person.objects.create(name=u"A person")
<|file_name|>ca.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'elementspath', 'ca', { eleLabel: 'Ruta dels elements', eleTitle: '%1 element'<|fim▁hole|><|fim▁end|...
} );
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core';<|fim▁hole|>import { SharedModule } from 'app/shared'; import { NoticeModule } from 'app/core/components/notice'; import { ConfigurationIconModule } from 'app/core/components/configuration-icon'; import { TransactionShortInfoMod...
import { RouterModule } from '@angular/router'; import { AngularSplitModule } from 'angular-split';
<|file_name|>nlt.py<|end_file_name|><|fim▁begin|># Copyright 2020 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 req...
return ids_split
<|file_name|>myform.py<|end_file_name|><|fim▁begin|>import random import zope.schema import zope.interface from zope.i18nmessageid import MessageFactory from zope.component import getUtility, getMultiAdapter from zope.browserpage.viewpagetemplatefile import ViewPageTemplateFile as Zope3PageTemplateFile from Products....
from smtplib import SMTPException, SMTPRecipientsRefused
<|file_name|>kibana_export.py<|end_file_name|><|fim▁begin|>''' Copyright(C) 2016, Stamus Networks Written by Laurent Defert <lds@stamus-networks.com> This file is part of Scirius. Scirius is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the F...
GNU General Public License for more details.
<|file_name|>define_config_dataclass_basic.py<|end_file_name|><|fim▁begin|># Copyright 2022 The ML Collections 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.apac...
import dataclasses from typing import Any, Mapping, Sequence
<|file_name|>model_control_one_enabled_None_Lag1Trend_Seasonal_DayOfWeek_AR.py<|end_file_name|><|fim▁begin|>import tests.model_control.test_ozone_custom_models_enabled as testmod<|fim▁hole|> testmod.build_model( ['None'] , ['Lag1Trend'] , ['Seasonal_DayOfWeek'] , ['AR'] );<|fim▁end|>
<|file_name|>server_kickstart.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2008--2012 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 FI...
action_name="Schedule install of rhn-virtualization-host package.", delta_time=0, scheduler=scheduler, org_id=org_id, ) elif ks_type == 'para_guest':
<|file_name|>cssmin.js<|end_file_name|><|fim▁begin|>'use strict'; var main = { expand:true, cwd: './build/styles/', src:['*.css'],<|fim▁hole|>module.exports = { main:main };<|fim▁end|>
dest: './build/styles/' };
<|file_name|>widget-skin-min.js<|end_file_name|><|fim▁begin|>/*<|fim▁hole|>http://yuilibrary.com/license/ */ YUI.add("widget-skin",function(e){var d="boundingBox",b="contentBox",a="skin",c=e.ClassNameManager.getClassName;e.Widget.prototype.getSkinName=function(){var f=this.get(b)||this.get(d),h=new RegExp("\\b"+c(a)+"-...
YUI 3.6.0 (build 5521) Copyright 2012 Yahoo! Inc. All rights reserved. Licensed under the BSD License.
<|file_name|>KalturaUiConfAdminFilter.java<|end_file_name|><|fim▁begin|>// =================================================================================================== // _ __ _ _ // | |/ /__ _| | |_ _ _ _ _ __ _ // | ' </ _` | | ...
// You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>GreetingsView.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.views.generic import View from django.http import HttpResponseBadRequest class GreetingsView(View): template_name = 'greeting.html' def get(self, request): gender = request.GET.get('gender', No...
elif gender == 'f': context['male_greeting'] = False else:
<|file_name|>test_array_from_pyobj.py<|end_file_name|><|fim▁begin|>import unittest import os import sys import copy import nose from numpy.testing import * from numpy import array, alltrue, ndarray, asarray, can_cast,zeros, dtype from numpy.core.multiarray import typeinfo import util wrap = None def s...
if intent.is_intent('cache'):
<|file_name|>case901.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2004 SIPfoundry Inc. # Licensed by SIPfoundry under the GPL license. # # Copyright (C) 2004 SIP Forum # Licensed to SIPfoundry under a Contributor Agreement.<|fim▁hole|># This file is part of SIP Forum User Agent Basic Test Suite which # belongs to ...
# #
<|file_name|>mssdk.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining<|fim▁hole|># "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, pu...
# a copy of this software and associated documentation files (the
<|file_name|>test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2017 Phyks (Lucas Verney) # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by ...
l = list(self.backend.iter_gauges())
<|file_name|>editor.js<|end_file_name|><|fim▁begin|>define(["ace/ace"], function(ace) {<|fim▁hole|> var editor = ace.edit(element); editor.setTheme("ace/theme/eclipse"); editor.getSession().setMode("ace/mode/python"); editor.getSession().setUseSoftTabs(true); editor.getSession().setTabSize(4); editor.setShow...
return function(element) {
<|file_name|>fuser_t.py<|end_file_name|><|fim▁begin|><|fim▁hole|>while True: raw_input("press <RETURN> to open file") fh = open("/tmp/test.txt",'w') print "Opened /tmp/test.txt..." raw_input("press <RETURN> to close") fh.close()<|fim▁end|>
#!/usr/local/bin/python2 import os print "PID:",str(os.getpid())
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from pyperator.utils import InputPort, OutputPort import pyperator.components<|fim▁end|>
from pyperator.decorators import inport, outport, component, run_once from pyperator.nodes import Component from pyperator.DAG import Multigraph
<|file_name|>contexts.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2019 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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, in...
* :const:`TABLE_CELL_LINE_CONTEXTS` * :const:`HTML_ENTITY`
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use super::Numeric; use std::ops::{Add, Sub, Mul, Div, Rem}; use std::ops; use std::convert; use std::mem::transmute; #[cfg(test)] mod test; #[macro_use] mod macros; pub trait Matrix<N>: Sized { fn nrows(&self) -> usize; fn ncols(&self) -> usize; } //#[cfg(...
// #[repr(C)] // #[derive(Clone, Copy, Eq, PartialEq, PartialOrd, Debug, Hash)] //pub struct Matrix4<N> {
<|file_name|>fmt.rs<|end_file_name|><|fim▁begin|>#![deny(warnings)] use std::cell::RefCell; use std::fmt::{self, Write}; #[test] fn test_format() { let s = fmt::format(format_args!("Hello, {}!", "world")); assert_eq!(s, "Hello, world!"); } struct A; struct B; struct C; struct D; impl fmt::LowerHex for A { ...
<|file_name|>set_properties.js<|end_file_name|><|fim▁begin|>import { changeProperties } from './property_events'; import { set } from './property_set'; /** Set a list of properties on an object. These properties are set inside a single `beginPropertyChanges` and `endPropertyChanges` batch, so observers will be b...
@param obj