prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>pdAllConfigurationsI.H<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 201...
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
<|file_name|>trait-default-method-bound-subst.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...
impl A<i32> for i32 { } impl<T> A<T> for u32 { }
<|file_name|>setupplan.py<|end_file_name|><|fim▁begin|>import pytest def pytest_addoption(parser): group = parser.getgroup("debugconfig") group.addoption( "--setupplan", "--setup-plan", action="store_true", help="show what fixtures and tests would be executed but " "don...
# Will return a dummy fixture if the setuponly option is provided. if request.config.option.setupplan: my_cache_key = fixturedef.cache_key(request) fixturedef.cached_result = (None, my_cache_key, None)
<|file_name|>AgentTable.java<|end_file_name|><|fim▁begin|>/** * This class is generated by jOOQ */ package io.cattle.platform.core.model.tables; /** * This class is generated by jOOQ. */ @javax.annotation.Generated(value = { "http://www.jooq.org", "3.3.0" }, comments = "This class is...
/**
<|file_name|>dlg-content-template.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2012-2015 S-Core Co., Ltd. * * 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...
*/
<|file_name|>optparser.py<|end_file_name|><|fim▁begin|>class OptParser: """Parses the options in the given file and allowed for the content to be returned. The file is expected to contain key/value pairs. Empty lines, and lines where first non white space is a # are ignored. """ def __init__(self, filename): se...
return self.content if __name__ == '__main__':
<|file_name|>updatingPkgJson.ts<|end_file_name|><|fim▁begin|>import readPkg = require('read-pkg') import {installPkgs} from 'supi' import tape = require('tape') import promisifyTape from 'tape-promise' import { addDistTag, prepare, testDefaults, } from '../utils' const test = promisifyTape(tape) test('save to p...
const m = project.requireModule('rimraf') t.ok(typeof m === 'function', 'rimraf() is available') const pkgJson = await readPkg()
<|file_name|>vm.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ VM starter - start your virtual hosts based on config file -------------------------------------------------------------------------------- @author Petr Juhanak, http://www.hackerlab.cz @release 1.0, 20130808 @licence GPLv3 http:://www.gnu...
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "os" "github.com/PieterD/glimmer/gli" "github.com/PieterD/glimmer/raw/raw33" "github.com/PieterD/glimmer/window" "github.com/go-gl/glfw/v3.1/glfw" ) type Profile struct { window.DefaultProfile ctx *gli.Context vshader *gli.Sha...
if err != nil { return fmt.Errorf("Failed to create program: %v", err) }
<|file_name|>smartshuffle.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os.path import time import transmission as send import shelving as db def first_check(): if os.path.isfile('check.db') == False: db.prime() else: if send.passthru(['mode','?']) == 'play':<|fim▁hole|> else: perform_start_t...
db.update_shelf()
<|file_name|>common.js<|end_file_name|><|fim▁begin|>//Convenient comparisons<|fim▁hole|> Equal: function(o){ return o == this; }, StrictEqual: function(o){ return o === this; }, NotEqual: function(o){ return o != this; }, StrictNotEqual: function(o){ return o !...
Compare = {
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import json import traceback import sys import time import datetime import random # 这段代码是用于解决中文报错的问题 reload(sys) sys.setdefaultencoding("utf8") from datetime import date from scrapy.selector import Selector from dateutil.relativedelta...
call_time_change = call_time[0] + call_time[1] + '-' + call_time[2] + '-' + call_time[3] + ' ' + \ call_time[4] + ':' + call_time[5] + ':' + call_time[6] timeArray = time.strptime(call_time_change, "%Y-%m-%d %H:%M:%S") ca...
<|file_name|>Resource.cpp<|end_file_name|><|fim▁begin|>/* Resource.cpp Resource base class (c)2005 Palestar, Richard Lyle */ #define RESOURCE_DLL #include "Resource/Resource.h" #include "Factory/FactoryTypes.h"<|fim▁hole|> //------------------------------------------------------------------------------- IMPLEMENT...
<|file_name|>0002_auto__add_field_product_date_added.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): ...
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, ...
<|file_name|>playermanager.go<|end_file_name|><|fim▁begin|>package play import (<|fim▁hole|> . "types" ) var AllPlayerM = NewPlayersManager() type PlayerManager struct { Players map[IdString]*Player sync.Mutex } func NewPlayersManager() *PlayerManager { return &PlayerManager{ Players: make(map[IdString]*Player...
"gopkg.in/mgo.v2" "gopkg.in/mgo.v2/bson" "library/logger" "sync"
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright:<|fim▁hole|>""" from __future__ import (absolute_import, division, print_function) # NOQA from .adjoint_source import calculate_adjsrc_on_stream # NOQA from .adjoint_source import calculate...
Wenjie Lei (lei@princeton.edu), 2016 :license: GNU General Public License, Version 3 (http://www.gnu.org/copyleft/gpl.html)
<|file_name|>0005_blockmodel_difficulty.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('blocks', '0004_auto_20160305_2025'), ] operations = [ ...
]
<|file_name|>DescribeDeviceResult.java<|end_file_name|><|fim▁begin|>/* * Copyright 2014-2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is locat...
public java.util.Date getFirstAccessedTime() {
<|file_name|>test_screenshot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from os import getcwd, listdir from os.path import abspath, dirname, isdir, join as path_join from shutil import rmtree from sys import exc_info from tempfile import mkdtemp from unittest import TestCase from mock import patch, MagicM...
<|file_name|>ReportResponse.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export interface ReportResponse extends Response { settlements: Settlement[]; }<|fim▁end|>
import {Response} from './Response'; import {Settlement} from './Settlement';
<|file_name|>noUnnecessaryQualifierRule.js<|end_file_name|><|fim▁begin|>"use strict"; /** * @license * Copyright 2017 Palantir Technologies, 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 Li...
case ts.SyntaxKind.ModuleDeclaration:
<|file_name|>sock_serv.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Simple sockjs-tornado chat application. By default will listen on port 8080. """ import sys import os import json from urllib import urlencode import tornado.ioloop import tornado.web from tornado import gen from tornado.httpclient i...
DJ_BACKEND = 'http://localhost:8000' try:
<|file_name|>organiz.js<|end_file_name|><|fim▁begin|>function OrganizationController() { // injetando dependência 'ngInject'; <|fim▁hole|>} export default { name: 'OrganizationController', fn: OrganizationController };<|fim▁end|>
// ViewModel const vm = this; console.log('OrganizationController');
<|file_name|>schedules.py<|end_file_name|><|fim▁begin|><|fim▁hole|>SCHEDULE_MONTHLY = '0 0 1 * *' SCHEDULE_YEARLY = '0 0 1 1 *'<|fim▁end|>
SCHEDULE_NONE = None SCHEDULE_HOURLY = '0 * * * *' SCHEDULE_DAILY = '0 0 * * *' SCHEDULE_WEEKLY = '0 0 * * 0'
<|file_name|>boolean.js<|end_file_name|><|fim▁begin|>/* coerces a value into a boolean */ 'use strict'; var value = require('useful-value'); module.exports = function boolean(val) { val = value.coerce(val); return !!val;<|fim▁hole|><|fim▁end|>
};
<|file_name|>member_declaration_unqualified_id.hpp<|end_file_name|><|fim▁begin|>/* Scalpel - Source Code Analysis, Libre and PortablE Library Copyright © 2008 - 2010 Florian Goujeon This file is part of Scalpel. Scalpel is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser Gene...
<|file_name|>nn.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lic...
@@embedding_lookup_sparse
<|file_name|>query.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/. */ //! Utilities for querying the layout, as needed by the layout...
<|file_name|>params.go<|end_file_name|><|fim▁begin|>package vkutil import ( "fmt" "net/url" ) <|fim▁hole|> count = 1 } param := url.Values{ "count": {fmt.Sprint(count)}, } if len(offsets) > 0 && offsets[0] != 0 { param.Set("offset", fmt.Sprint(offsets[0])) } return param }<|fim▁end|>
// NewCountOffsetParams return params with setted count and offset(optional) func NewCountOffsetParams(count int, offsets ...int) url.Values { if count == 0 {
<|file_name|>ndjs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python try: from collections import OrderedDict import json except ImportError: from ordereddict import OrderedDict import simplejson as json import itertools import six from csvkit import CSVKitWriter def parse_object(obj, path=''): ...
<|file_name|>map.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://www.apache.org/licens...
<|file_name|>mavproxy_relay.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python '''relay handling module''' import time from pymavlink import mavutil from MAVProxy.modules.lib import mp_module class RelayModule(mp_module.MPModule): def __init__(self, mpstate): super(RelayModule, self).__init__(mpstate, ...
<|file_name|>fetch-access-control.py<|end_file_name|><|fim▁begin|>import base64 import json import os import six from wptserve.utils import isomorphic_decode, isomorphic_encode def decodebytes(s): if six.PY3: return base64.decodebytes(six.ensure_binary(s)) return base64.decodestring(s) def main(requ...
headers.append((b"Content-Type", b"video/webm"))
<|file_name|>commitlog_test.py<|end_file_name|><|fim▁begin|>import binascii import glob import os import stat import struct import time from distutils.version import LooseVersion import pytest import logging from cassandra import WriteTimeout from cassandra.cluster import NoHostAvailable, OperationTimedOut from ccmlib...
<|file_name|>magfit_motors.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' fit best estimate of magnetometer offsets, trying to take into account motor interference ''' import sys, time, os, math<|fim▁hole|>parser = ArgumentParser(description=__doc__) parser.add_argument("--no-timestamps",dest="notimestamps...
from argparse import ArgumentParser
<|file_name|>no-shadow.js<|end_file_name|><|fim▁begin|>/** * @fileoverview Rule to flag on declaring variables already declared in the outer scope<|fim▁hole|>"use strict"; //------------------------------------------------------------------------------ // Requirements //-----------------------------------------------...
* @author Ilya Volodin */
<|file_name|>server.py<|end_file_name|><|fim▁begin|>import hmac import json import urllib.parse import subprocess from .main import ( PullReqState, parse_commands, db_query, INTERRUPTED_BY_HOMU_RE, synchronize, ) from . import utils from . import gitlab from .utils import lazy_debug import jinja2 im...
rows.append({ 'status': state.get_status(), 'status_ext': status_ext, 'priority': 'rollup' if state.rollup else state.priority,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassi...
from . import advanced_query_mapping
<|file_name|>S3Operator.java<|end_file_name|><|fim▁begin|>/* * FILE: S3Operator * Copyright (c) 2015 - 2019 GeoSpark Development Team * * 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 * ...
import com.amazonaws.regions.Regions;
<|file_name|>SelectionBox.d.ts<|end_file_name|><|fim▁begin|>import { Camera, Frustum, Mesh, Object3D, Scene, Vector3 } from '../../../src/Three'; export class SelectionBox { constructor(camera: Camera, scene: Scene, deep?: number); camera: Camera; collection: Mesh[]; deep: number; endPoint: Vect...
searchChildInFrustum(frustum: Frustum, object: Object3D): void; }
<|file_name|>config.js<|end_file_name|><|fim▁begin|>/* Dopetrope 2.0 by HTML5 UP html5up.net | @n33co Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) */ <|fim▁hole|>window._skel_config = { preset: 'standard', prefix: DPT.theme + '/css/style', resetCSS: true, breakpo...
<|file_name|>cloudresourcemanager_v3_generated_folders_update_folder_sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 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 ...
# limitations under the License.
<|file_name|>wchar_t.cpp<|end_file_name|><|fim▁begin|>// RUN: %clang_cc1 -fsyntax-only -verify %s // RUN: %clang_cc1 -fsyntax-only -Wno-signed-unsigned-wchar -verify=allow-signed -DSKIP_ERROR_TESTS %s // allow-signed-no-diagnostics wchar_t x; void f(wchar_t p) { wchar_t x; unsigned wchar_t y; // expected-error {{'...
#ifndef SKIP_ERROR_TESTS // Verify that we do not crash when assigning wchar_t* to another pointer type. void assignment(wchar_t *x) {
<|file_name|>canvas_paint_thread.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::canvas_data::*; use canvas_traits::ca...
} pub struct CanvasPaintThread<'a> { canvases: HashMap<CanvasId, CanvasData<'a>>,
<|file_name|>marker.js<|end_file_name|><|fim▁begin|>Marker = function({ settings, rad }) { const long = settings.longMarker ? 'protractor-extension-marker-long' : ""; this.theta = rad - Math.PI / 2; this.phi = settings.phi; this.settings = settings; this.node = document.createElement('div'); t...
<|file_name|>Problem_37.py<|end_file_name|><|fim▁begin|>__author__ = 'Meemaw' import math def isPrime(stevilo): if stevilo == 1: return 0 meja = int(math.sqrt(stevilo)+1) if(stevilo > 2 and stevilo % 2 == 0): return 0 for i in range(3,meja,2): if stevilo % i == 0: r...
<|file_name|>EncryptionTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2003-2004 The Apache Software 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:...
System.setProperty("org.apache.xml.enc.test.elem", elem); } else if (args[i].startsWith("-i")) { String idx = args[i].substring(2).trim(); System.setProperty("org.apache.xml.enc.test.idx", idx);
<|file_name|>FixedItemCountTaskbarLayout.cpp<|end_file_name|><|fim▁begin|>/*********************************************************************************** * Smooth Tasks * Copyright (C) 2009 Mathias Panzenböck <grosser.meister.morti@gmx.net> * * This program is free software; you can redistribute it and/or * modify...
<|file_name|>gclient_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for gclient.py. See gclient_smoketest.py for integration t...
<|file_name|>user.rs<|end_file_name|><|fim▁begin|>use hyper::header::Cookie; use jwt::{encode, decode, Header, Validation}; use config::Config; use controller::context::{RequestContext, ResponseContext}; use model::entity::User; pub fn user_session<F>(mut request: RequestContext, seed: F) -> ResponseContext where...
} } response }
<|file_name|>Habit.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 Max Schafer, Ammar Mahdi, Riley Dixon, Steven Weikai Lu, Jiaxiong Yang * * 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 Softwar...
public Habit(String title, Date date) throws HabitFormatException{ this.setTitle(title);
<|file_name|>glcTestRunnerMain.cpp<|end_file_name|><|fim▁begin|>/*------------------------------------------------------------------------- * OpenGL Conformance Test Suite * ----------------------------- * * Copyright (c) 2016 Google Inc. * Copyright (c) 2016 The Khronos Group Inc. * * Licensed under the Apache ...
<|file_name|>0003_auto_20150403_2325.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('courses', '0002_auto_20150403_2321'), ] operations = [ ...
]
<|file_name|>mock_webhyphenator.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 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 "webkit/mocks/mock_webhyphenator.h" #include "base/logging.h" #include "base...
DCHECK(locale.isEmpty() || locale.equals("en") || locale.equals("en_US") || locale.equals("en_GB")); if (!hyphen_dictionary_) return 0;
<|file_name|>errors.py<|end_file_name|><|fim▁begin|>class ServiceError(Exception): """Base class for exceptions in this module.""" pass class UnsupportedFormatError(ServiceError): """Used to raise exceptions when a response doesn't match expected semantics or for failed version checks.""" p...
class MissingLayerError(ServiceError): """Used if expected layer could not be found in the service."""
<|file_name|>imgupload_ostest.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # ================================================================= # ================================================================= import httplib import json import logging import sys import requests import...
# to create a volume: # paxes-devcli cinder volume-create json scovolume42 42
<|file_name|>http.go<|end_file_name|><|fim▁begin|>package gui import ( "bytes" "crypto/tls" "fmt" "io/ioutil" "net" "net/http" "path/filepath" "strconv" "strings" "github.com/spolabs/spo/src/cipher" "github.com/spolabs/spo/src/daemon" "github.com/spolabs/spo/src/wallet" "github.com/spolabs/spo/src/util/...
}
<|file_name|>defchararray.py<|end_file_name|><|fim▁begin|>""" This module contains a set of functions for vectorized string operations and methods. .. note:: The `chararray` class exists for backwards compatibility with Numarray, it is not recommended for new development. Starting from numpy 1.4, if one needs...
<|file_name|>htmlfontelement.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::RGBA; use dom::attr::AttrValue; use do...
<|file_name|>pipeline_integration_test.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/bind.h" #include "base/command_line.h" #include "base/memory/sco...
<|file_name|>OrientationUtils.java<|end_file_name|><|fim▁begin|>package io.github.mayunfei.simple; /** * Created by mayunfei on 17-9-7. */ public class OrientationUtils {<|fim▁hole|><|fim▁end|>
}
<|file_name|>core.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # pylint: disable=C0302,fixme, protected-access """ The core module contains the SoCo class that implements the main entry to the SoCo functionality """ from __future__ import unicode_literals import socket import logging import re import reque...
<|file_name|>handler-compiler-arm.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 the V8 project 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 "src/v8.h" #if V8_TARGET_ARCH_ARM #include "src/ic/call-optimization.h" #in...
__ mov(scratch4(), scratch3()); __ Push(scratch3(), scratch4()); __ mov(scratch4(), Operand(ExternalReference::isolate_address(isolate())));
<|file_name|>kubelet_node_status_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/LI...
<|file_name|>PetriToPolicyConversionCommand.java<|end_file_name|><|fim▁begin|>package org.workcraft.plugins.policy.commands; import org.workcraft.commands.AbstractConversionCommand; import org.workcraft.plugins.petri.Petri; import org.workcraft.plugins.petri.VisualPetri; import org.workcraft.plugins.policy.Policy; imp...
public ModelEntry convert(ModelEntry me) { if (Hierarchy.isHierarchical(me)) {
<|file_name|>campaign.py<|end_file_name|><|fim▁begin|>"""ThreatConnect TI Campaign""" # standard library from typing import TYPE_CHECKING # first-party from tcex.api.tc.v2.threat_intelligence.mappings.group.group import Group<|fim▁hole|> class Campaign(Group): """Unique API calls for Campaign API Endpoints A...
if TYPE_CHECKING: # first-party from tcex.api.tc.v2.threat_intelligence.threat_intelligence import ThreatIntelligence
<|file_name|>widgets.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals import json from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from wagtail.wagtailadmin.widgets import AdminChooser class AdminSnippetChooser(Admin...
}) def render_js_init(self, id_, name, value):
<|file_name|>header.js<|end_file_name|><|fim▁begin|>'use strict'; innoApp .controller('HeaderCtrl',["$scope", "AuthService", function ($scope,AuthService) { // Fetching role name $scope.role = AuthService.getRole();<|fim▁hole|> //Setting menu for admin and other user dynamic if($scope.role === "admin")...
<|file_name|>animation.py<|end_file_name|><|fim▁begin|>''' Animation ========= :class:`Animation` and :class:`AnimationTransition` are used to animate :class:`~kivy.uix.widget.Widget` properties. You must specify at least a property name and target value. To use an Animation, follow these steps: * Setup an Animat...
self.stop(widget)
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # RADICAL-Pilot documentation build configuration file, created by # sphinx-quickstart on Mon Dec 3 21:55:42 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration ...
resources_rst.write("* **Resource label** : ``{0}``\n".format(resource_key))
<|file_name|>tcm_client.py<|end_file_name|><|fim▁begin|># -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
<|file_name|>diff_1C.js<|end_file_name|><|fim▁begin|>//engine: JScript //uname: diff_1C //dname: Backend к diff, типовое сравнение от 1С (mxl,txt,js,vbs) //addin: global global.connectGlobals(SelfScript) function СравнениеФайлов1С(Path1, Path2) { var file1 = v8New("File", Path1); var file2 = v8New("...
} //GetExtension function GetBackend() { return СравнениеФайлов1С
<|file_name|>main.py<|end_file_name|><|fim▁begin|># coding: utf-8 from gui import * import thread import color import time import os from PyQt4 import QtGui from PyQt4 import QtCore from PyQt4.QtGui import * from PyQt4.QtCore import * import YaoSpeech from dialogue import * class dialogue_thread(QThread): def _...
def run(self): self.dialogue.run() return None
<|file_name|>filter.test.js<|end_file_name|><|fim▁begin|>jest.unmock('../../src/filtering/filter'); import React from 'react'; import {shallow} from 'enzyme'; import {Filter} from '../../src/filtering/filter'; describe('Filter', () => { it('has empty filtering text by default', () => { // when co...
});
<|file_name|>package-info.java<|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 un...
<|file_name|>test_running_vm_backup_ops.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*- import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib<|fim▁hole|>vm_name = 'vm-' + vm.get_time_postfix() backup_list = ['backup-' + vm.get_time_postfix() for _ in range(2)] def test(): ...
vm = test_lib.lib_get_specific_stub('e2e_mini/vm', 'vm') vm_ops = None
<|file_name|>checker_tests_google_dict.py<|end_file_name|><|fim▁begin|>from common.persistence import from_pickle NWORDS = from_pickle('../data/en_dict.pkl') print(len(NWORDS)) print(NWORDS['word']) print(NWORDS['spell']) alphabet = 'abcdefghijklmnopqrstuvwxyz' def edits1(word): s = [(word[:i], word[i:]) for i ...
'neither': 'niether', 'approach': 'aproach', 'available': 'availble', 'recently': 'reciently', 'ability': 'ablity', 'nature': 'natior', 'commercial': 'comersial', 'agencies': 'agences', 'however': 'howeverr',
<|file_name|>website_event_ticket_details.js<|end_file_name|><|fim▁begin|>odoo.define('website_event.ticket_details', function (require) { var publicWidget = require('web.public.widget'); publicWidget.registry.ticketDetailsWidget = publicWidget.Widget.extend({ selector: '.o_wevent_js_ticket_details', ...
this.$('.custom-select').each(function (){
<|file_name|>UpdatePipeline.cc<|end_file_name|><|fim▁begin|>/* -*- c++ -*- * Copyright (C) 2007-2016 Hypertable, Inc. * * This file is part of Hypertable. * * Hypertable 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 Softw...
table_update->error = e.code(); table_update->error_msg = e.what();
<|file_name|>cgnv6_nat64_fragmentation_df_bit_transparency.py<|end_file_name|><|fim▁begin|>from a10sdk.common.A10BaseClass import A10BaseClass<|fim▁hole|> """Class Description:: Add an empty IPv6 fragmentation header if IPv4 DF bit is zero (default:disabled). Class df-bit-transparency supports CRUD Operatio...
class DfBitTransparency(A10BaseClass):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from cartodb import CartoDBAPIKey import json import datetime class CartoTransaction(object): _SQL_INSERT = "insert into %s ( the_geom, type, happened_at, message ) values( %s, %s, %s, %s);" def __init__(self, api_key, domain, table, debug = False): ...
def insert_point(self, point): the_geom = "ST_SetSRID(ST_Point(%s,%s), 4326)" %(point.longitude, point.latitude) insert = self._craft_insert(the_geom, "checkin", point.dateTime, point.message)
<|file_name|>register_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package btcjson_test import ( "reflect" "sort" "testing" "github.com/btcsuite/btcd/btcjson" ) // TestUsageFl...
{
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod cursor; pub mod raw; #[doc(hidden)] pub mod result; mod row; mod stmt; use std::ffi::CString; use std::os::raw as libc; use self::cursor::*; use self::raw::RawConnection; use self::result::PgResult; use self::stmt::Statement; use crate::connection::*; use crate::de...
<|file_name|>TestInetAddressUtilities.java<|end_file_name|><|fim▁begin|>package com.cedarsoftware.util; import org.junit.Assert; import org.junit.Test; import java.lang.reflect.Constructor; import java.lang.reflect.Modifier; import java.net.InetAddress; /** * useful InetAddress Utilities * * @author Kenneth Partl...
con.setAccessible(true);
<|file_name|>distance.py<|end_file_name|><|fim▁begin|># Hierarchical Agglomerative Cluster Analysis # # Copyright (C) 2013 Folgert Karsdorp # Author: Folgert Karsdorp <fbkarsdorp@gmail.com> # URL: <https://github.com/fbkarsdorp/HAC-python> # For licence information, see LICENCE.TXT import numpy from numpy import dot, ...
def binarize_vector(u): return u > 0
<|file_name|>node_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2017 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unle...
createNode1CSINode := func(client clientset.Interface) func() error { return func() error {
<|file_name|>cmd.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node 'use strict'; var program = require('commander'); var pluck = require('pluck-keys'); var credential = require('../credential'); var stdin = ''; program .command('hash [password]') .description('Hash password') .option('-w --work <work>', 'relati...
console.log('Verified'); });
<|file_name|>NavigationDrawerFragment.java<|end_file_name|><|fim▁begin|>package com.martin.lolli; import android.app.ActionBar; import android.app.Activity; import android.app.Fragment; import android.content.SharedPreferences; import android.content.res.Configuration; import android.os.Bundle; import android.prefere...
// ActionBarDrawerToggle ties together the the proper interactions
<|file_name|>award_complaint.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from logging import getLogger from cornice.resource import resource, view from openprocurement.api.models import Complaint, STAND_STILL_TIME, get_now from openprocurement.api.utils import ( apply_patch, save_tender, add_nex...
elif complaint.status in ['declined', 'invalid'] and tender.status == 'active.awarded': pending_complaints = [ i
<|file_name|>taskctrl.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- ''' @date: 2017-04-06 @author: Heysion Yuan @copyright: 2017, Heysion Yuan <heysions@gmail.com> @license: GPLv3 ''' from dab.webui import WebBase from dab.core.db.models import Task class TaskIndex(WebBase): def get(sel...
pass
<|file_name|>itastreaming.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #------------------------------------------------------------ #------------------------------------------------------------ import selenium from selenium import webdriver from selenium.webdriver.common.desired_capabilities import DesiredC...
fakeurl = re.findall('"((http)s?://.*?hdpass.link.*?)"', data) print fakeurl
<|file_name|>scientilla-document-affiliations.component.js<|end_file_name|><|fim▁begin|>(function () { "use strict"; angular .module('documents') .component('scientillaDocumentAffiliations', { templateUrl: 'partials/scientilla-document-affiliations.html', controller: con...
vm.affiliationInstitutes = [];
<|file_name|>reshape_transpose_test.py<|end_file_name|><|fim▁begin|># Copyright 2018 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:...
from tensorflow.python.framework import dtypes from tensorflow.python.ops import array_ops from tensorflow.python.ops import math_ops
<|file_name|>plasmaengine.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2007 Sebastian Sauer <mail@dipe.org> * * This file is part of SuperKaramba. * * SuperKaramba is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Soft...
//meter->setValue(format); } */ }
<|file_name|>notification.js<|end_file_name|><|fim▁begin|>var notificationschema = require('../model/notification_model.js'); var mailer = require('./mail.js'); // Mail Functionality var app = require('express')(); var server = require('http').Server(app); var io = require('socket.io')(server); var...
console.log('Page Name : notification.js'); console.log('API Name : sendVerificationEmail'); console.log('sendVerificationEmail API Hitted');
<|file_name|>make-l1profile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Hua Shao <hua.shao@mediatek.com> import sys import re import random l1conf = [] def parseconfig(conf): global l1conf l1conf.extend([[],[],[]]) with open(conf, "r") as fp: for line in fp: if line.startswith("CONFIG_first_car...
else: line = "INDEX{0}_{1}={2}".format(i, k, v) print(line)
<|file_name|>meus_marcados-service.ts<|end_file_name|><|fim▁begin|>import { MappingsService } from './_mappings-service'; import { VitrineVO } from './../../model/vitrineVO'; import { FirebaseService } from './../database/firebase-service'; import { Injectable } from '@angular/core'; @Injectable() export class MeusMar...
} }
<|file_name|>test_artificial_32_RelativeDifference_MovingAverage_5_12_20.py<|end_file_name|><|fim▁begin|>import pyaf.Bench.TS_datasets as tsds<|fim▁hole|> art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "MovingAverage", cycle_length = 5, transform = "RelativeDifference", sigma = 0.0, exog_count = 20, ar_...
import tests.artificial.process_artificial_dataset as art
<|file_name|>facebook.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2010 Facebook # # 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/licen...
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations
<|file_name|>test_datatables.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- from inspect import isgenerator from .testcase import DatatableViewTestCase from .test_app import models from ..exceptions import ColumnError from ..datatables import Datatable, ValuesDatatable from ..views import DatatableJSONRespo...
dt = DT(queryset, '/', query_config={'order[0][column]': '0', 'order[0][dir]': 'desc'}) # 'iSortingCols': '1', dt.populate_records()