prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>classes_d.js<|end_file_name|><|fim▁begin|><|fim▁hole|> ['packedaccessrecord',['PackedAccessRecord',['../structPackedAccessRecord.html',1,'']]], ['partinfo',['PartInfo',['../structPartInfo.html',1,'']]], ['partitioner',['Partitioner',['../classPartitioner.html',1,'']]], ['partitionevent',['PartitionE...
var searchData= [
<|file_name|>api.js<|end_file_name|><|fim▁begin|>/** * Framework APIs (global - app.*) * * Note: View APIs are in view.js (view - view.*) * * @author Tim Lauv * @created 2015.07.29 * @updated 2017.04.04 */ ;(function(app){ /** * Universal app object creation api entry point * ---------------------------...
},
<|file_name|>mixins.py<|end_file_name|><|fim▁begin|>"""Mixin classes for custom array types that don't inherit from ndarray.""" from numpy.core import umath as um __all__ = ['NDArrayOperatorsMixin'] def _disables_array_ufunc(obj): """True when __array_ufunc__ is set to None.""" try: return obj.__arr...
>>> x = ArrayLike([1, 2, 3]) >>> x - 1
<|file_name|>frame_inspect_test.py<|end_file_name|><|fim▁begin|># vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # 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 # #     ...
if __name__ == "__main__": unittest.main()
<|file_name|>Providers.py<|end_file_name|><|fim▁begin|>""" The provider bits of TileStache. A Provider is the part of TileStache that actually renders imagery. A few default providers are found here, but it's possible to define your own and pull them into TileStache dynamically by class name. Built-in providers: - ma...
try: from PIL import Image except ImportError: # On some systems, PIL.Image is known as Image.
<|file_name|>mavutil.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' mavlink python utility functions Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' import socket, math, struct, time, os, fnmatch, array, sys, errno from math import * from mavextra import * if os.getenv('MAVLIN...
def close(self): self.f.close()
<|file_name|>bluetoothpermissionresult.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 crate::dom::bindings::cell::DomRefCell...
self, BluetoothPermissionResultMethods, }; use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::codegen::Bindings::PermissionStatusBinding::PermissionStatusBinding::PermissionStatusMethods;
<|file_name|>GatewayDAO.java<|end_file_name|><|fim▁begin|>/* * #-------------------------------------------------------------------------- * # Copyright (c) 2013 VITRO FP7 Consortium. * # All rights reserved. This program and the accompanying materials * # are made available under the terms of the GNU Lesser Public...
return result;
<|file_name|>test_mon_network.py<|end_file_name|><|fim▁begin|>import io import os import difflib import pytest from jinja2 import Template import testutils securedrop_test_vars = testutils.securedrop_test_vars testinfra_hosts = [securedrop_test_vars.monitor_hostname] @pytest.mark.skip_in_prod def test_mon_iptables_...
and ossec-authd. Helper services such as postfix are checked separately. Note that the SSH check will fail if run against a prod host, due
<|file_name|>Cdd_Viewer_.cpp<|end_file_name|><|fim▁begin|>/* $Id$ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Governme...
ADD_ENUM_VALUE("cd-info", eCtrl_cd_info); ADD_ENUM_VALUE("align-annot", eCtrl_align_annot); ADD_ENUM_VALUE("seq-list", eCtrl_seq_list);
<|file_name|>functions.go<|end_file_name|><|fim▁begin|>package fields import ( "regexp" "time" ) func UseDefaultKeyIfCustomKeyIsEmpty(defaultKey, customKey string) string { if "" != customKey { return customKey } return defaultKey } func ExecFuncIfErrIsNotNil(err error, fn func()) (b bool) { if nil != err { ...
if nil == locationByString || "" == *locationByString {
<|file_name|>random.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function(grunt) { // Please see the Grunt documentation for more information regarding task // creation: http://gruntjs.com/creating-tasks function random(min, max) { min = min || 0; max = max || 1; var r...
};
<|file_name|>SchedulingService.java<|end_file_name|><|fim▁begin|>package in.iamkelv.balances.alarms; import android.app.IntentService; import android.app.NotificationManager; import android.app.PendingIntent; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import ...
<|file_name|>RedissonCacheTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016. Sunghyouk Bae <sunghyouk.bae@gmail.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 * * ...
@Inject UserRepository userRepo;
<|file_name|>libraries.js<|end_file_name|><|fim▁begin|>/** * Exports lists of modules to be bundled as external "dynamic" libraries * * (@see webpack DllPlugin and DllReferencePlugin) */ module.exports = { 'angular_dll': [ 'angular', 'angular/angular.min', 'angular-animate', 'angular-bootstrap', ...
'angular-data-table/release/dataTable.helpers.min', 'angular-dragula', 'angular-loading-bar', 'angular-resource',
<|file_name|>make_char_corpus.py<|end_file_name|><|fim▁begin|>__author__ = 'Sun' from sandbox.dynamic_title.creator.char_corpus import CharacterCorpus import cPickle import click @click.command() @click.argument("text_file", type=click.File(mode='r', encoding='gb18030')) @click.argument("char_cropus_file", type=cli...
cPickle.dump(corpus, char_cropus_file, protocol=cPickle.HIGHEST_PROTOCOL)
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil import relativedelta from odoo import fields, models, api class LeadTest(models.Model): _name = "base.automation.lead.test" _description = ...
name = fields.Char(string='Subject', required=True, index=True) user_id = fields.Many2one('res.users', string='Responsible')
<|file_name|>06-field-state.js<|end_file_name|><|fim▁begin|>var formInstance = ( <Form> <Input placeholder="验证成功" label="验证成功" validation="success" /> <Input placeholder="验证警告" label="验证警告" validation="warning" /> <Input placeholder="验证失败" label="验证失败" validation="error" /> <FormGroup validation="succ...
<|file_name|>denodeify-tests.ts<|end_file_name|><|fim▁begin|>/// <reference path="denodeify.d.ts" /> /// <reference path="../node/node.d.ts" /> <|fim▁hole|>import cp = require('child_process'); const readFile = denodeify<string,string,string>(fs.readFile); const exec = denodeify<string,string>(cp.exec, (err, stdout, s...
import denodeify = require("denodeify"); import fs = require('fs');
<|file_name|>TeXworks_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="de_DE"> <context> <name>CompletingEdit</name> <message> <location filename="../src/CompletingEdit.cpp" line="929"/> <source>No suggestions</source> <t...
<translation>Zeilennummern anzeigen</translation> </message> <message> <location filename="../src/PrefsDialog.ui" line="373"/>
<|file_name|>Array.js<|end_file_name|><|fim▁begin|>/* This file is part of Ext JS 4.2 Copyright (c) 2011-2014 Sencha Inc Contact: http://www.sencha.com/contact Commercial Usage Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with th...
return [value];
<|file_name|>depswriter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2009 The Closure Library 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...
objects. """
<|file_name|>csssupportsrule.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 cssparser::{Parser, ParserInput}; use dom::bindin...
<|file_name|>trackedrepo.go<|end_file_name|><|fim▁begin|><|fim▁hole|> // TrackedRepo identifies a git remote repository. type TrackedRepo string<|fim▁end|>
package misc
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import React, { FC } from 'react'; import styled from 'styled-components'; import { useTranslation } from 'react-i18next'; import { FedRoles } from 'typings/auth'; import { MixinCircle, MixinFlexAlignCenter } from 'styles/mixins'; import { Crown, User } from 'componen...
<|file_name|>party.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2008-2016 Vana Development Team 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; version 2 of the License. This program is distrib...
<|file_name|>realTimeAudio.py<|end_file_name|><|fim▁begin|>import ui_plot import sys import numpy from PyQt4 import QtCore, QtGui import PyQt4.Qwt5 as Qwt from recorder import * def plotSomething(): if SR.newAudio==False: return xs,ys=SR.fft() c.setData(xs,ys) uiplot.qwtPlot.re...
win_plot.show() code=app.exec_()
<|file_name|>get-metadata.py<|end_file_name|><|fim▁begin|>import json, io, re, requests from bs4 import BeautifulSoup from datetime import datetime def get_datasets(url): r = requests.get(url.format(0)) soup = BeautifulSoup(r.text) href = soup.select('#block-system-main a')[-1]['href'] last_page = int...
# write json file with io.open('daten-berlin_metadata.json', 'w', encoding='utf8') as json_file:
<|file_name|>filesettingsbase.cpp<|end_file_name|><|fim▁begin|>/* WZPlayer, GUI front-end for mplayer and MPV. Parts copyright (C) 2006-2015 Ricardo Villalba <rvm@users.sourceforge.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
TFileSettingsBase::TFileSettingsBase(const QString& filename) : QSettings(filename, QSettings::IniFormat) {
<|file_name|>op.rs<|end_file_name|><|fim▁begin|>pub const HALT: u8 = 0b111111; pub const PUSHENV: u8 = 1; pub const POPENV: u8 = 1; pub const GETVAR: u8 = 2; pub const SETVAR: u8 = 3; pub const NEWENV: u8 = 4; pub const GETELEM: u8 = 5; pub const SETELEM: u8 = 6; pub const PUSHLIT: u8 = 7; pub const CALL: u8 = 8; pub c...
<|file_name|>test_language_service_client_v1beta2.py<|end_file_name|><|fim▁begin|># Copyright 2017, Google LLC 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 # # htt...
with pytest.raises(CustomException): client.analyze_sentiment(document)
<|file_name|>withseccomp_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 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....
<|file_name|>tsunami-simple-timing-dual.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006-2007 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redist...
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # Authors: Steve Reinhardt
<|file_name|>CeTask.java<|end_file_name|><|fim▁begin|>/* * SonarQube * Copyright (C) 2009-2017 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Soft...
<|file_name|>eventmgr.py<|end_file_name|><|fim▁begin|>"""Listens to Treadmill server events. There is single event manager process per server node. Each server subscribes to the content of /servers/<servername> Zookeeper node. The content contains the list of all apps currently scheduled to run on the server. Appli...
def _synchronize(self, zkclient, expected, check_existing=False): """Synchronize local app cache with the expected list.
<|file_name|>test_basic.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import get_user, get_user_model from django.contrib.auth.models import AnonymousUser, User from django.core.exceptions import ImproperlyConfigured from django.db import IntegrityError from django.http import HttpRequest from django.test im...
User.objects.all() @override_settings(AUTH_USER_MODEL='badsetting') def test_swappable_user_bad_setting(self):
<|file_name|>project.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Http, Headers, RequestOptions, Response } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/catch'; import 'rxjs/add/observable/t...
<|file_name|>ACommand.java<|end_file_name|><|fim▁begin|>package com.jpattern.core.command; import com.jpattern.core.IProvider; import com.jpattern.core.exception.NullProviderException; import com.jpattern.logger.ILogger; import com.jpattern.logger.SystemOutLoggerFactory; /** * * @author Francesco Cina' * * 11/se...
}
<|file_name|>cancel.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limit...
('tracing', common.tracing_rw), # tracing:24
<|file_name|>pulldom.py<|end_file_name|><|fim▁begin|>import xml.sax import xml.sax.handler import types try: _StringTypes = [types.StringType, types.UnicodeType] except AttributeError: _StringTypes = [types.StringType] START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUM...
self.pulldom.clear() del self.pulldom self.parser = None self.stream = None
<|file_name|>wkb.py<|end_file_name|><|fim▁begin|>from struct import pack from sqlite3 import Binary def pts(c): return ["dd",[c.X,c.Y]] <|fim▁hole|>def pt4mp(c): return ["Bidd",[1,1,c.X,c.Y]] def mp(coordinates): partCount=coordinates.partCount i=0 out = ["I",[0]] while i<partCount: ...
<|file_name|>race0.go<|end_file_name|><|fim▁begin|>// Copyright 2012 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. // +build plan9,!race package plan9 import (<|fim▁hole|>const raceenabled = false func raceAcquire(addr u...
"unsafe" )
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! # libgit2 bindings for Rust //! //! This library contains bindings to the [libgit2][1] C library which is used //! to manage git repositories. The library itself is a work in progress and is //! likely lacking some bindings here and there, so be warned. //! //! [1]: ...
mod oid; mod pathspec; mod reference; mod reflog;
<|file_name|>nodehandling.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 node handling # from test_framework.t...
if __name__ == '__main__':
<|file_name|>_mocks.py<|end_file_name|><|fim▁begin|>""" Legalese -------- Copyright (c) 2015, 2016 Genome Research Ltd. Author: Colin Nolan <cn13@sanger.ac.uk> This file is part of Cookie Monster. Cookie Monster is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
priority=priority )
<|file_name|>RemoteFileUtil.java<|end_file_name|><|fim▁begin|>package org.jumbune.common.utils; import static org.jumbune.common.utils.Constants.AT_OP; import static org.jumbune.common.utils.Constants.COLON; import static org.jumbune.common.utils.Constants.CPU_DUMP_FILE; import static org.jumbune.common.utils.Constant...
command = "scp -r " + jumbuneRequest.getJobConfig().getOperatingUser() + "@" + workerHost + ":"
<|file_name|>deriving-meta-multiple.rs<|end_file_name|><|fim▁begin|>// Copyright 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://ww...
use std::hash::{Hash, SipHasher}; // testing multiple separate deriving attributes
<|file_name|>box.cc<|end_file_name|><|fim▁begin|>/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * Copyright (c) 2009 Dan Broyles * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free...
<|file_name|>l2domaintemplate.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: * Redistributions of source code must...
package vspk import "github.com/nuagenetworks/go-bambou/bambou"
<|file_name|>mailgun.py<|end_file_name|><|fim▁begin|>def send_simple_message(): return requests.post( "https://api.mailgun.net/v3/sandbox049ff464a4d54974bb0143935f9577ef.mailgun.org/messages", auth=("api", "key-679dc79b890e700f11f001a6bf86f4a1"), data={"from": "Mailgun Sandbox <postmaster@sa...
"to": "nick <nicorellius@gmail.com>", "subject": "Hello nick", "text": "Congratulations nick, you just sent an email with Mailgun! You are truly awesome! You can see a record of this email in your logs: https://mailgun.com/cp/log . You can send up to 300 emails/day from this...
<|file_name|>executable.ts<|end_file_name|><|fim▁begin|>import {Target} from '@openmicrostep/msbuildsystem.core';<|fim▁hole|>import {CXXTarget, CXXLinkType} from '../index.priv'; export class CXXExecutable extends CXXTarget { linkType = CXXLinkType.EXECUTABLE; } Target.register(["cxx-executable"], CXXExecutable, {})...
<|file_name|>shell-controller_test.js<|end_file_name|><|fim▁begin|>/*"use strict"; var expect = require("expect.js"), ShellController = require("../lib/shell-controller"), testView = require("./test-shell-view"); describe("ShellController", function() { var ctrl; it("is defined", function() { expect(ShellCont...
testView.invokeCommand("ls test/files --color");
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ /** * @file Horizontal Page Break */ // Register a plugin named "pagebreak". CKEDITOR.plugins.add( 'pagebrea...
'clear: both;' + 'display: block;' + 'float: none;' +
<|file_name|>collections.py<|end_file_name|><|fim▁begin|>__all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __a...
<|file_name|>managed-pointer-within-unique.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://...
// however, if they contain managed pointers.
<|file_name|>davidson_pw.py<|end_file_name|><|fim▁begin|>from ase import Atom, Atoms from gpaw import GPAW from gpaw.test import equal a = 4.05 d = a / 2**0.5 bulk = Atoms([Atom('Al', (0, 0, 0)), Atom('Al', (0.5, 0.5, 0.5))], pbc=True) bulk.set_cell((d, d, a), scale_atoms=True) h = 0.25 calc = GPAW(mode=...
assert 10 <= niter1 <= 24, niter1
<|file_name|>wasm.rs<|end_file_name|><|fim▁begin|>use crate::*; use std::alloc::Layout; pub static mut APPS2: Vec<Application> = Vec::new(); static LOGGER: WebConsoleLogger = WebConsoleLogger {}; struct WebConsoleLogger {} impl log::Log for WebConsoleLogger { fn enabled(&self, metadata: &log::Metadata) -> bool {...
let block = Self { ptr: ptr_start as *mut u8,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import os import requests import sys structure_template = 'src/{}/kotlin/solutions/day{}' solver_template = """ package solutions.{package} import solutions.Solver class {clazz}: Solver {{ override fun solve(input: List<String>, partTwo: Boo...
token = sys.argv[1] day = sys.argv[2]
<|file_name|>GEOSDistanceTest.cpp<|end_file_name|><|fim▁begin|>// // Test Suite for C-API GEOSDistance #include <tut.hpp> // geos #include <geos_c.h> // std #include <cstdarg> #include <cstdio> #include <cstdlib> #include <memory> #include <math.h> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif namesp...
GEOSGeometry* g1 = random_polygon(-3, -8, 7, 1000); GEOSGeometry* g2 = random_polygon(14, 22, 6, 500);
<|file_name|>home.component.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common'; import { ToDoItem } from './../shared/models/to-do-item'; import { ToDoService } from './../shared/services/to-do.service'; import { Component, OnInit } from '@angular/core'; import { Status } from "app/shared/mo...
styleUrls: ['./home.component.css'] })
<|file_name|>factories.py<|end_file_name|><|fim▁begin|>from datetime import timedelta import json from django.utils import timezone import factory from factory.django import DjangoModelFactory from opaque_keys.edx.locator import CourseLocator from ..models import CourseOverview<|fim▁hole|>class CourseOverviewFactory(...
<|file_name|>EmbeddedJPAPersisterTest.java<|end_file_name|><|fim▁begin|>/*** * * Copyright 2014 Andrew Hall * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
<|file_name|>network.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Parts Copyright 2016 C. Strassburg (lib.utils) c.strassburg@gmx.de # Copyright 2017- Serg...
:param url: Optional URL to fetch from. Default is to use baseurl given to constructor.
<|file_name|>eig.rs<|end_file_name|><|fim▁begin|>use super::lobpcg::{lobpcg, LobpcgResult, Order}; use crate::{generate, Scalar}; use lax::Lapack; ///! Implements truncated eigenvalue decomposition /// use ndarray::prelude::*; use ndarray::stack; use ndarray::ScalarOperand; use num_traits::{Float, NumCast}; /// Trunc...
TruncatedEig { precision: 1e-5, maxiter: problem.len_of(Axis(0)) * 2, preconditioner: None,
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('usermodule', '0002_auto_20151108_2019'), ] operations = [ migratio...
('name', models.CharField(max_length=10)),
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.contrib.auth.models import User from django.core.urlresolvers import reverse<|fim▁hole|> class Location(models.Model): address = models.CharField(blank=True) latitude = models.DecimalField(max_digits=10, decimal_places=6) longitude = models.Dec...
from django.db import models
<|file_name|>op.rs<|end_file_name|><|fim▁begin|>/* * niepce - engine/library/op.rs * * Copyright (C) 2017-2019 Hubert Figuière<|fim▁hole|> * 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, ei...
*
<|file_name|>text-routing.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; <|fim▁hole|>import { TextsViewComponent } from './texts-view.component'; @NgModule({ imports: [RouterModule.forChild([ { path: 'text/create', component: ...
import { OlmService } from '../services/olm.service'; import { TextCreateComponent } from './text-create.component'; import { TextEditComponent } from './text-edit.component';
<|file_name|>bigip_ike_peer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = ty...
self.argument_spec.update(f5_argument_spec) self.argument_spec.update(argument_spec)
<|file_name|>settings_parser.rs<|end_file_name|><|fim▁begin|>use getopts::Options; use std::{fmt, env}; #[derive(Debug)] pub enum SettingsParserErrorKind { NotEnoughArguments, MissingFromField, MissingToField, MissingSubjectField, MissingBodyField, SetupMissingClientId, SetupMissingClientSe...
return Err(SettingsParserError { kind: SettingsParserErrorKind::PrintHelp }); } if matches.opt_present("setup") { if !matches.opt_present("client_id") {
<|file_name|>manifest.rs<|end_file_name|><|fim▁begin|>// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 //! Structs for reading and writing manifests of flash boot stage images. //! //! Note: The structs below must matc...
assert_eq!(offset_of!(Manifest, entry_point), 892); assert_eq!(size_of::<Manifest>(), MANIFEST_SIZE as usize);
<|file_name|>streamlines_3D.py<|end_file_name|><|fim▁begin|># -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the fi...
y_index_current_sheet = 0 # sub row
<|file_name|>applicative.py<|end_file_name|><|fim▁begin|>from abc import abstractmethod from typing import Callable, TypeVar, Protocol from typing_extensions import runtime_checkable TSource = TypeVar('TSource') TResult = TypeVar('TResult') @runtime_checkable class Applicative(Protocol[TSource, TResult]): """Ap...
raise NotImplementedError
<|file_name|>security.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from operator import itemgetter import re def isRealRoom(name, checksum): if len(checksum) != 5: raise Exception totals = defaultdict(int)<|fim▁hole|> alphaPairs = sorted(pairs, key=itemgetter(0)) freqPairs...
for c in name: if c != '-': totals[c] += 1 pairs = zip(totals.keys(), totals.values())
<|file_name|>applicationactions.hpp<|end_file_name|><|fim▁begin|>/* Gobby - GTK-based collaborative text editor * Copyright (C) 2008-2014 Armin Burgmeier <armin@arbur.net> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the ...
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
<|file_name|>datetemplate.py<|end_file_name|><|fim▁begin|># emacs: -*- mode: python; coding: utf-8; py-indent-offset: 4; indent-tabs-mode: t -*- # vi: set ft=python sts=4 ts=4 sw=4 noet : # This file is part of Fail2Ban. # # Fail2Ban is free software; you can redistribute it and/or modify # it under the terms of the G...
regex = property(getRegex, setRegex, doc= """Regex used to search for date. """)
<|file_name|>jws.go<|end_file_name|><|fim▁begin|>package secure import ( "crypto" "crypto/ecdsa" "crypto/elliptic" "crypto/rsa" "encoding/base64" "errors" "fmt" "github.com/xenolf/lego/acme/api/internal/nonces" jose "gopkg.in/square/go-jose.v2" ) // JWS Represents a JWS. type JWS struct { privKey crypto.Pr...
signed, err := signer.Sign(content)
<|file_name|>test_datasets.py<|end_file_name|><|fim▁begin|>""" Tests related specifically to the FacilityDataset model. """ from django.db.utils import IntegrityError from django.test import TestCase<|fim▁hole|>from ..models import FacilityDataset from ..models import FacilityUser from ..models import LearnerGroup cl...
from ..models import Classroom from ..models import Facility
<|file_name|>darwin_hid.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes import pyglet from pyglet.libs.darwin import carbon, _oscheck, create_cfstring from pyglet.libs.darwin.constants import * from base import Device, Control, A...
usage = get_property(properties, 'Usage')
<|file_name|>CheckButton.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys sys.path.insert(0, "../..") DEBUG = 0 if len(sys.argv) > 1: DEBUG = 1 from Kiwi.initgtk import gtk from Kiwi.Proxies import Proxy from Kiwi.Models import Model class Foo(Model): A = 1 B = 0 class CheckProxy(Proxy):...
<|file_name|>InvalidRulePackage.java<|end_file_name|><|fim▁begin|>package org.drools.rule; /* * Copyright 2005 JBoss 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 * * htt...
super( summary ); }
<|file_name|>smallest-hello-world.rs<|end_file_name|><|fim▁begin|>// Copyright 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<|fim▁hole|> //...
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>test_task.cpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2021 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 modi...
TaskManager task_manager(task_behaviour, waypoints); task_manager.SetGlidePolar(glide_polar);
<|file_name|>Noun.java<|end_file_name|><|fim▁begin|>package grammar.model.nouns; import grammar.model.Multiplicity; import grammar.model.PseudoEnum; import grammar.model.SubjectGender; import grammar.util.Utilities; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; public...
<|file_name|>Series_reactorNameEditPart.java<|end_file_name|><|fim▁begin|>package visGrid.diagram.edit.parts; import java.io.File; import java.util.Collections; import java.util.List; import org.eclipse.draw2d.IFigure; import org.eclipse.draw2d.Label; import org.eclipse.draw2d.geometry.Dimension; import org.eclip...
for (int i = 0; i < parserElements.size(); i++) {
<|file_name|>translation.pipe.ts<|end_file_name|><|fim▁begin|>import { Pipe, PipeTransform } from '@angular/core'; import {TranslationService} from "../services/translation.service"; @Pipe({ name: 'translate', pure: false // impure pipe, update value when we change language }) export class TranslationPipe impleme...
constructor(private _translate: TranslationService) { } transform(value: string, args: any[]): any {
<|file_name|>config.py<|end_file_name|><|fim▁begin|>from character import Trait, Perk __author__ = "Johannes Hackbarth" ALL_RACES = {"Deathclaw", "Dog", "Ghoul", "Half Mutant", "Human", "Robot", "Super Mutant"} ANIMALS = {"Deathclaw", "Dog"} ROBOTS = {"Robot"} # TODO: Add all effects to traits TRAIT_LIST = [ Tra...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.db import models from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ from churchill.apps.core.models import BaseModel from churchill.apps.currencies.services import get_defaul...
default=settings.AVG_ALCOHOL_CONSUMPTION, help_text=_("Average alcohol consumption in ml per year"),
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from wtforms import validators from ..forms import ModelForm from digits import utils class ImageModelForm(ModelForm): """ Defines the form used to c...
default='image', tooltip="Subtract the mean file or mean pixel for this dataset from each image." )
<|file_name|>drawLine.py<|end_file_name|><|fim▁begin|>import sys import pygame from pygame.locals import * pygame.init() screen = pygame.display.set_mode((600, 500)) pygame.display.set_caption("Drawing Lines") screen.fill((0, 80, 0)) # draw the line color = 100, 255, 200 width = 8 pygame.draw.line(scree...
for event in pygame.event.get():
<|file_name|>list_issues.rs<|end_file_name|><|fim▁begin|>extern crate gitlab_api as gitlab; use std::env; #[macro_use] extern crate log; extern crate env_logger; use gitlab::GitLab; // use gitlab::Pagination; use gitlab::issues; use gitlab::Lister; use gitlab::errors::*; fn main() { if let Err(ref e) = run() {...
println!("group_issues: {:?}", group_issues);
<|file_name|>get_pollers_responses.go<|end_file_name|><|fim▁begin|>package get // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "io" "github.com/go-openapi/runtime" strfmt "github.com/go-openapi/strfmt" "github....
<|file_name|>constants.py<|end_file_name|><|fim▁begin|># Constant indices within mmap buffers. _POS_VALUE_LEN = 8 _READ_POS_IDX = 0<|fim▁hole|> # Item size constants. _ITEM_SIZE_LEN = 4 # struct.[un]pack format string for length fields _POS_VALUE_FORMAT = "q" _ITEM_SIZE_FORMAT = "i"<|fim▁end|>
_WRITE_POS_IDX = _POS_VALUE_LEN _HEADER_LEN = _POS_VALUE_LEN * 2
<|file_name|>toolbar.py<|end_file_name|><|fim▁begin|># -*- mode: python; indent-tabs-mode: nil; tab-width: 3 -*- # vim: set tabstop=3 shiftwidth=3 expandtab: # # Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom, # and Karl MacMillan # # This program is free software; you can redistrib...
self.Layout() self.GetParent().Layout()
<|file_name|>TargetPredicateTest.java<|end_file_name|><|fim▁begin|>/* * The MIT License * * Copyright (c) 2016 Marcelo "Ataxexe" Guimarães <ataxexe@devnull.tools> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * ...
public void initialize() {
<|file_name|>slider.py<|end_file_name|><|fim▁begin|>import wx # type: ignore from gooey.gui import formatters from gooey.gui.components.widgets.bases import TextContainer from gooey.python_bindings import types as t class Slider(TextContainer): """ An integer input field """ widget_class = wx.Slider...
<|file_name|>HttpOptions.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2015 Marten Gajda <marten@dmfs.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 version 2 of the L...
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details.
<|file_name|>transport.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Jeff Forcier <jeff@bitprophet.org> # # This file is part of ssh. # # 'ssh' is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; ei...
kind = m.get_string() chanid = m.get_int() initial_window_size = m.get_int() max_packet_size = m.get_int()
<|file_name|>fake_companion.py<|end_file_name|><|fim▁begin|>from __future__ import division import numpy as np,opticstools,matplotlib.pyplot as plt,math,scipy.ndimage,copy from skimage.measure import block_reduce import astropy.io.fits as pyfits import os,sys,contratio as crat nameList = sys.argv[5:len(sys.argv)] if le...
xShift = -int(sep*np.cos((math.pi/180)*angle))
<|file_name|>searches.py<|end_file_name|><|fim▁begin|>"""JSON implementations of assessment.authoring searches.""" # pylint: disable=no-init # Numerous classes don't require __init__. # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: dis...
# self._results = [r for r in results] self._namespace = 'assessment.authoring.SequenceRule' self._results = results