prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>UserRole.java<|end_file_name|><|fim▁begin|>package net.demo.model; import javax.persistence.*; /** * Created by toannh on 10/9/14. */ @Entity @Table(name = "USER_ROLE") public class UserRole { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)<|fim▁hole|> private String role; @OneToOne(cas...
private int id; private String username;
<|file_name|>context_processors.py<|end_file_name|><|fim▁begin|>from django.conf import settings <|fim▁hole|> 'POSTHOG_API_URL': settings.POSTHOG_API_URL, }<|fim▁end|>
def posthog_configurations(request): return { 'POSTHOG_API_KEY': settings.POSTHOG_API_KEY,
<|file_name|>SessionToken.java<|end_file_name|><|fim▁begin|>package be.neutrinet.ispng.security; import be.neutrinet.ispng.vpn.Users; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; import org.apache.log4j.Logger; import java.sql.SQLException; import java.util.UUID; /** * C...
this.address = address; this.creationTime = System.currentTimeMillis();
<|file_name|>KsGLVertexBuffer.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2015 Preet Desai (preet.desai@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 http://ww...
// attribute (GL_BYTE, GL_UNSIGNED_BYTE, GL_FLOAT, etc)
<|file_name|>DisplayCallbackConfig.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * @property {Phaser.Types.GameObjects.BitmapText.TintConfig} tint - The tint of the character being rendered. Always zero in Canvas. * @property {number} index - The index of the character being rendered. * @property {number} charCode ...
* @typedef {object} Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig * @since 3.0.0 * * @property {Phaser.GameObjects.DynamicBitmapText} parent - The Dynamic Bitmap Text object that owns this character being rendered.
<|file_name|>udp.rs<|end_file_name|><|fim▁begin|>#[cfg(all(test, not(any(target_os = "emscripten", target_env = "sgx"))))] mod tests; use crate::fmt; use crate::io::{self, Error, ErrorKind}; use crate::net::{Ipv4Addr, Ipv6Addr, SocketAddr, ToSocketAddrs}; use crate::sys_common::net as net_imp; use crate::sys_common::{...
/// /// For more information about this option, see [`UdpSocket::set_multicast_ttl_v4`].
<|file_name|>QueryHelper.hpp<|end_file_name|><|fim▁begin|>#pragma once #ifndef GEODE_INTEGRATION_TEST_QUERYHELPER_H_ #define GEODE_INTEGRATION_TEST_QUERYHELPER_H_ /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this w...
printf("all puts done \n"); }
<|file_name|>mydb.go<|end_file_name|><|fim▁begin|>package db import ( "database/sql" "fmt" "log" "time" _ "github.com/go-sql-driver/mysql" ) var db *sql.DB const layout = "2006-01-02 15:04:05" func Connect(mdb, host, usr, pwd string) bool { var err error //fmt.Println(mdb, host, usr, pwd) s := fmt.Sprintf...
*/ func (v InoutItem) String() string {
<|file_name|>index.js<|end_file_name|><|fim▁begin|><|fim▁hole|>}); exports.default = function () { let root = arguments.length <= 0 || arguments[0] === undefined ? '.' : arguments[0]; let options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; root = (0, _path.normalize)((0, _pa...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true
<|file_name|>test_predict.py<|end_file_name|><|fim▁begin|>""" Tests that deepchem models make deterministic predictions. """ __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import os import tempfile import numpy as np import unittest import sklearn import shu...
These tests guard against failures like having dropout turned on at
<|file_name|>filter.go<|end_file_name|><|fim▁begin|>package async import ( "reflect" ) /* Filter allows you to filter out information from a slice in Waterfall mode. You must call the Done function with false as its first argument if you do not want the data to be present in the results. No other arguments will af...
routines = append(routines, func(id int) Routine {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .humannum import ( K, M, G, T, P, E, Z, Y, humannum, parsenum, parseint, value_to_unit, unit_to_value, ) <|fim▁hole|> 'K', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y', 'humannum', ...
__all__ = [
<|file_name|>testplay.py<|end_file_name|><|fim▁begin|>import alsaaudio from math import pi, sin, pow import getch SAMPLE_RATE = 44100 FORMAT = alsaaudio.PCM_FORMAT_U8 PERIOD_SIZE = 512 N_SAMPLES = 1024 notes = "abcdefg" frequencies = {} for i, note in enumerate(notes): frequencies[note] = 440 * pow(pow(2, 1/2), i...
<|file_name|>ssdata.cpp<|end_file_name|><|fim▁begin|>/* * Grace - GRaphing, Advanced Computation and Exploration of data * * Home page: http://plasma-gate.weizmann.ac.il/Grace/ * * Copyright (c) 1991-1995 Paul J Turner, Portland, OR * Copyright (c) 1996-2002 Grace Development Team * * Maintained by Evgeny St...
<|file_name|>detoursCache.py<|end_file_name|><|fim▁begin|>import os import threading from cachetools import LRUCache from customUtilities.logger import logger class Cache(): def __init__(self,cachefilename,CACHE_SIZE,logger=logger('detoursCache.log')): self.lock = threading.RLock() self.cachefilen...
try: self.hitcount+=1 finally:
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import { combineReducers } from 'redux'; import listAcceptors from './listAcceptors'; import me from './wxe-auth'; import acceptors from './acceptors'; import { doneForm, toastState } from './ceeRegistration/ceeRegistration'; import { reducer as formReducer } from 'red...
listAcceptors, me,
<|file_name|>driver.go<|end_file_name|><|fim▁begin|>package bridge import ( "fmt" "io/ioutil" "log" "net" "strings" "sync" "github.com/docker/libcontainer/netlink" "github.com/dotcloud/docker/daemon/networkdriver" "github.com/dotcloud/docker/daemon/networkdriver/ipallocator" "github.com/dotcloud/docker/daem...
// Network interface represents the networking stack of a container type networkInterface struct {
<|file_name|>ganeti.rapi.testutils_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 # # Copyright (C) 2012 Google 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: # # 1. Redistri...
luxi.REQ_SET_WATCHER_PAUSE, ])
<|file_name|>mtg.js<|end_file_name|><|fim▁begin|>var module = angular.module('mtg', ['ngRoute', 'timer']); DEBUG = true; module.controller('main', function($scope, $filter) { $scope.matches = []; $scope.players = [{}, {}]; var orderBy = $filter('orderBy'); $scope.importFromStorage = function() { console.log("...
};
<|file_name|>EUTelTLUDetector.cc<|end_file_name|><|fim▁begin|>// personal includes ".h" #include "EUTELESCOPE.h" #include "EUTelBaseDetector.h" #include "EUTelTLUDetector.h" // system includes <> #include <iostream> #include <iomanip> #include <vector> #include <string> using namespace std; using namespace eutelescop...
<< resetiosflags(ios::left) << " " << _firmwareID << endl << setw(w) << setiosflags(ios::left) << "TimeInterval " << resetiosflags(ios::left) << " " << _timeInterval << setfill(' ')
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # pyramid_sms documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all p...
# There are two options for replacing |today|: either, you set today to # some non-false value, then it is used: #today = ''
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>import logging import json from django.test.client import Client, RequestFactory from django.test.utils import override_settings from django.contrib.auth.models import User from django.core.management import call_command from django.core.urlresolvers import reverse fr...
def test_update_thread_empty_title(self, mock_request): self._test_request_error(
<|file_name|>test_long.py<|end_file_name|><|fim▁begin|>from test_support import verify, verbose, TestFailed from string import join from random import random, randint # SHIFT should match the value in longintrepr.h for best testing. SHIFT = 15 BASE = 2 ** SHIFT MASK = BASE - 1 # Max number of base BASE digits to use ...
except: raise TestFailed, "int(long(sys.maxint) + 1) didn't overflow" x = hugeneg_aslong - 1
<|file_name|>0003_monitoring_resources.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import migrations, models <|fim▁hole|> dependencies = [ ('monitoring', '0002_monitoring_update'), ] operations = [ migrations.RemoveField( model_name='requestevent', ...
class Migration(migrations.Migration):
<|file_name|>symbols.js<|end_file_name|><|fim▁begin|>/*========================================================================================= File Name: symbols.js Description: Flot symbols chart ---------------------------------------------------------------------------------------- Item Name: Stack...
for (var i = 0; i <= 50; ++i) { var x = start + i / 50 * (end - start); res.push([x, amplitude * Math.sin(x + offset)]); }
<|file_name|>affine_expr.cc<|end_file_name|><|fim▁begin|>#include "pmlc/dialect/pxa/analysis/affine_expr.h" namespace mlir { AffineValueExpr::AffineValueExpr(AffineExpr expr, ValueRange operands) : expr(expr), operands(operands.begin(), operands.end()) {} AffineValueExpr::AffineValueExpr(MLIRContext *ctx, int64_...
} AffineValueExpr AffineValueExpr::operator+(const AffineValueExpr &rhs) const { return AffineValueExpr(AffineExprKind::Add, *this, rhs);
<|file_name|>model_v1beta1_occurrence.go<|end_file_name|><|fim▁begin|>/* * proto/v1beta1/grafeas.proto * * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * API version: version not set * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-...
package grafeas import (
<|file_name|>filer_admin_tags.py<|end_file_name|><|fim▁begin|>from django.template import Library register = Library() <|fim▁hole|> """ Track the number of times the action field has been rendered on the page, so we know which value to use. """ context['action_index'] = context.get('action_index', -...
def filer_actions(context):
<|file_name|>test_switch_app.py<|end_file_name|><|fim▁begin|>from pages.treeherder import Treeherder <|fim▁hole|> page = Treeherder(selenium, base_url).open() assert page.header.active_app == 'Treeherder' page = page.switch_to_perfherder() assert page.header.active_app == 'Perfherder' page = page.sw...
def test_switch_app(base_url, selenium, test_repository): """Switch between Treeherder and Perfherder using header dropdown"""
<|file_name|>warnings-reemitted.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // 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, modif...
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //
<|file_name|>SaveQueryAnswersJSONRequestController.java<|end_file_name|><|fim▁begin|>package fi.metatavu.edelphi.jsons.queries; import java.util.Locale; import fi.metatavu.edelphi.smvcj.SmvcRuntimeException; import fi.metatavu.edelphi.smvcj.controllers.JSONRequestContext; import fi.metatavu.edelphi.DelfoiActionName; ...
public SaveQueryAnswersJSONRequestController() { super(); setAccessAction(DelfoiActionName.ACCESS_PANEL, DelfoiActionScope.PANEL);
<|file_name|>listResource.spec.js<|end_file_name|><|fim▁begin|>import { RESOURCE, SERVER_ERRORS, INITIAL_STATE_WITH_CACHED_LIST, INITIAL_STATE_WITH_LIST_BEING_FETCHED, INITIAL_STATE_WITH_CACHED_AND_SELECTED_LIST, } from '../mocks' import { generateListResourceActions } from './mocks' const request ...
initialState: INITIAL_STATE_WITH_CACHED_AND_SELECTED_LIST, }) expect(actions.length).toBe(0) })
<|file_name|>overrideTimeout.module.ts<|end_file_name|><|fim▁begin|>import { module } from 'angular'; import { react2angular } from 'react2angular'; import { OverrideTimeout } from './OverrideTimeout'; import { withErrorBoundary } from '../../../../presentation/SpinErrorBoundary'; export const OVERRIDE_TIMEOUT_COMPON...
);
<|file_name|>serialization.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2019 ThoughtWorks, 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/licenses...
import {ErrorsJSON} from "models/mixins/errors";
<|file_name|>transfer_user_in_request.py<|end_file_name|><|fim▁begin|>""" The Plaid API The Plaid REST API. Please see https://plaid.com/docs/api for more details. # noqa: E501 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from plaid.model_utils impor...
if args: raise ApiTypeError( "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( args,
<|file_name|>track-sections-demo-ctrl.js<|end_file_name|><|fim▁begin|>(function (window, document, angular, jQuery, undefined) { 'use strict'; <|fim▁hole|> '$window', '$document', '$scope', 'VisSense', function ($window, $document, $scope, VisSense) { $scope.scrollToElement = fun...
angular.module('vissensePlayground') .controller('TrackSectionsDemoCtrl', [
<|file_name|>test_common.py<|end_file_name|><|fim▁begin|>"""Common test objects.""" import copy from datetime import datetime import json from unittest.mock import ANY, patch from homeassistant.components import mqtt from homeassistant.components.mqtt import debug_info from homeassistant.components.mqtt.const import M...
if expected_state: assert state.state == expected_state if attributes: for (attr, value) in attributes:
<|file_name|>toolkit.py<|end_file_name|><|fim▁begin|>import datetime import os import subprocess import sys import warnings from typing import Optional, Union import click from ruamel.yaml import YAML from ruamel.yaml.compat import StringIO from great_expectations import exceptions as ge_exceptions from great_expecta...
f"""<red>An expectation suite named `{suite_name}` already exists.</red> - If you intend to edit the suite please use `great_expectations suite edit {suite_name}`."""
<|file_name|>KettleFileSystemConfigBuilderFactory.java<|end_file_name|><|fim▁begin|>/*! ****************************************************************************** * * Pentaho Data Integration * * Copyright (C) 2002-2013 by Pentaho : http://www.pentaho.com * ****************************************************...
// No custom parser requested, load default
<|file_name|>_spectral_py.py<|end_file_name|><|fim▁begin|>"""Tools for spectral analysis. """ import numpy as np from scipy import fft as sp_fft from . import _signaltools from .windows import get_window from ._spectral import _lombscargle from ._arraytools import const_ext, even_ext, odd_ext, zero_ext import warnings...
----- An appropriate amount of overlap will depend on the choice of window and on your requirements. For the default Hann window an overlap of
<|file_name|>files.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import re import sys import glob import argparse from copy import copy from decimal import Decimal,InvalidOperation number_pattern = re.compile("(-?\d+\.?\d*(e[\+|\-]?\d+)?)", re.IGNORECASE) # Search an input value for a number def fi...
args.column = args.infile.header.index(args.column) return args
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod memory; pub mod callbacks; pub mod traps;
<|file_name|>rules.js<|end_file_name|><|fim▁begin|>var _ = require('underscore'), check = require('validator').check, sanitize = require('validator').sanitize, later = require('later'), util = require('./util'), condition = require('./condition'); var Rules = { types: [ 'trigger', 'schedule' ], alertType...
return false;
<|file_name|>plugin.hpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. * * 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 restricti...
* DEALINGS IN THE SOFTWARE.
<|file_name|>ConsecutiveKPrimes.rs<|end_file_name|><|fim▁begin|>fn n_prime(mut n: i32) -> i32 { let mut result = 0; for i in 2..((n as f64).sqrt() as i32) + 1 { while n%i == 0 { result += 1; n /= i; } } if n > 1 { result += 1; } result } fn co...
} fn main() {
<|file_name|>AssociationRule.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Wed Jul 6 22:58:00 2016 @author: Diogo """ # -*- coding: utf-8 -*- """ Created on Sun Jun 26 19:08:00 2016 @author: Diogo """ def ImportGames(): games = list() user_games = dict() with open('C:\\...
games.append(board_game.replace('\t',' ').replace(' ', ' ')) if user not in user_games:
<|file_name|>psp.rs<|end_file_name|><|fim▁begin|>//! PSP C type definitions //! //! These type declarations are not enough, as they must be ultimately resolved //! by the linker. Crates that use these definitions must, somewhere in the //! crate graph, include a stub provider crate such as the `psp` crate. pub type c_...
<|file_name|>allocate_devices.js<|end_file_name|><|fim▁begin|>$('.attach_detach').on('click', function(){ var device_id = $(this).attr('device_id'); $('#device_id').val(device_id); }); <|fim▁hole|>$('.detach_customer').on('click', function(){ //get the attached customer name var customer_name = $(this).attr(...
<|file_name|>testcafe-automation.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export default window['%testCafeAutomation%'];
<|file_name|>NoReturnFunctionExtractionValidator.cpp<|end_file_name|><|fim▁begin|>#include "NoReturnFunctionExtractionValidator.hpp"<|fim▁hole|>#include <cppmanip/boundary/ExtractMethodError.hpp> #include <boost/range/adaptor/transformed.hpp> #include <boost/algorithm/string/join.hpp> #include <boost/range/algorithm_ex...
<|file_name|>static-assert.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/l...
<|file_name|>event-recipe.js<|end_file_name|><|fim▁begin|>/** * Created by ko on 2016-07-15. */ $(document).ready(function () { var pageNo= 1; // webtoon $("#recipe").on("click", function () { $("#travel_content").html(""); $("#youtube_content").html(""); $("#honbap_content").htm...
recipe_module.recipeTitle(); recipe_module.showRecipe(1); $(window).unbind('scroll');
<|file_name|>RadioButtonExample.java<|end_file_name|><|fim▁begin|>package com.github.bordertech.wcomponents.examples; import com.github.bordertech.wcomponents.RadioButtonGroup; import com.github.bordertech.wcomponents.Size; import com.github.bordertech.wcomponents.WLabel; import com.github.bordertech.wcomponents.WPane...
* {@link WRadioButton} example. *
<|file_name|>Blast.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2011-2019 Arx Libertatis Team (see the AUTHORS file) * * This file is part of Arx Libertatis. * * Arx Libertatis is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the ...
BlastResult blast(blast_in infun, void * inhow, blast_out outfun, void * outhow) { state s;
<|file_name|>lru.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2019 The Jaeger Authors. // Copyright (c) 2017 Uber 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 License at //...
<|file_name|>imap_attachment_to_s3_operator.py<|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 #...
"This module is deprecated. Please use `airflow.providers.amazon.aws.transfers.imap_attachment_to_s3`.", DeprecationWarning, stacklevel=2,
<|file_name|>bluetoothdevice.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 bluetooth_traits::{BluetoothCharacteristicMsg, Bl...
<|file_name|>borrowed_pointers.rs<|end_file_name|><|fim▁begin|>fn main() { fn plus_one(x: &int) -> int { *x + 1 } <|fim▁hole|>}<|fim▁end|>
let y = Box::new(10i); println!("{}", plus_one(y));
<|file_name|>frontend.rs<|end_file_name|><|fim▁begin|>use std::thread::JoinHandle; use std::sync::mpsc::{self, Sender, Receiver}; use glium::glutin::Event; use tungsten::{Frontend, EventDispatcher}; use runtime::FrontendRuntime; use {Key, ElementState, MouseButton}; pub struct CloseRequestEvent; pub struct KeyboardIn...
<|file_name|>distortion.py<|end_file_name|><|fim▁begin|>""" Module to handle distortions in diffraction patterns. """ import numpy as np import scipy.optimize def filter_ring(points, center, rminmax): """Filter points to be in a certain radial distance range from center. Parameters ---------- po...
List of filtered points, two column array. """
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .parameters import Parameters<|fim▁hole|>from .actionhandler import ActionHandler, ActionPolicy<|fim▁end|>
from .framebuffer import FrameBuffer
<|file_name|>window.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/. */ //! Off-screen windows. //! //! This is used for off-screen re...
} else { let mut rect = cef_rect_t::zero();
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.utils.html import escape from django.forms.utils import ErrorList from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from booktype.utils.misc import booktype_slugify from book...
def __unicode__(self): return unicode(self.as_spans())
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>try: from setuptools import setup except ImportError: from distutils.core import setup<|fim▁hole|>kw = { 'name': 'draw', 'version': '0.0.1', 'description': 'A drawing tool for IPython', 'long_description': "", 'author': 'Naoki Nishida', ...
<|file_name|>snack-bar.d.ts<|end_file_name|><|fim▁begin|>import { ComponentType, Overlay, LiveAnnouncer } from '../core'; import { MdSnackBarConfig } from './snack-bar-config'; import { MdSnackBarRef } from './snack-bar-ref'; import { SimpleSnackBar } from './simple-snack-bar'; /** * Service to dispatch Material Desig...
* Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
<|file_name|>SaveFilesForMakeInstances.py<|end_file_name|><|fim▁begin|>#FLM: Save Files for MakeInstances ################################################### ### THE VALUES BELOW CAN BE EDITED AS NEEDED ###### ################################################### kDefaultMMFontFileName = "mmfont.pfa" kInstancesDataFile...
print 'The font is not MM.' return else:
<|file_name|>main.js<|end_file_name|><|fim▁begin|>var $content, $deferred; $(document).ready(function() { // Bind ASAP events $(window).on("request.asap", pageRequested) .on("progress.asap", pageLoadProgress) .on("load.asap", pageLoaded) .on("render.asap", pageRendered) .on("error.a...
// update progress to reflect loading
<|file_name|>application_helpers.js<|end_file_name|><|fim▁begin|>/** Breaks up a long string @method breakUp @for Handlebars **/ Handlebars.registerHelper('breakUp', function(property, hint, options) { var prop = Ember.Handlebars.get(this, property, options); if (!prop) return ""; hint = Ember.Handlebars.g...
@method unboundAgeWithTooltip
<|file_name|>gutter.js<|end_file_name|><|fim▁begin|>/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the followin...
var fold = this.session.getNextFoldLine(i); var foldStart = fold ? fold.start.row : Infinity; var foldWidgets = this.$showFoldWidgets && this.session.foldWidgets;
<|file_name|>inspector.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2003-2008 Cies Breijs <cies AT kde DOT nl> 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 o...
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by<|fim▁hole|>// but WITHOUT ANY WARRANTY; witho...
// the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Parity is distributed in the hope that it will be useful,
<|file_name|>es.js<|end_file_name|><|fim▁begin|>/*! * This is a `i18n` language object. * * Spanish * * @author * Jalios (Twitter: @Jalios) * Sascha Greuel (Twitter: @SoftCreatR) * Rafael Miranda (GitHub: @rafa8626) * * @see core/i18n.js */ (function (exports) { if (exports.es === undefined) { expo...
'mejs.japanese': 'Japonés', 'mejs.korean': 'Coreano',
<|file_name|>4ae00001aee8e40f0fb90fff1d2d3b85d7f734e2.js<|end_file_name|><|fim▁begin|>var JobsList = React.createClass({displayName: "JobsList", render: function() { return ( React.createElement(JobItem, {title: "Trabalho Python", desc: "Descricao aqui"}) ); } }); <|fim▁hole|> ...
var JobItem = React.createClass({displayName: "JobItem", render: function() { React.createElement("div", {className: "panel panel-default"},
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from couchpotato import get_session from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification from couchpotato.core.settings.model import History as Hist import time lo...
db = get_session()
<|file_name|>rasterize_over.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ *************************************************************************** rasterize_over.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email ...
return [self.commandName(), GdalUtils.escapeAndJoin(arguments)]
<|file_name|>verifier_test.cc<|end_file_name|><|fim▁begin|>/* Copyright 2017 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/l...
<|file_name|>test.js<|end_file_name|><|fim▁begin|>var assert = require('assert'), cascade = require('../index'); var TestComplete = function(){} TestComplete.prototype = new Error(); TestComplete.prototype.constructor = TestComplete; var test = module.exports = { // generates a macro context "context" : f...
<|file_name|>module_scene_props.py<|end_file_name|><|fim▁begin|># -*- coding: cp1252 -*- from compiler import * #################################################################################################################### # Each scene prop record contains the following fields: # 1) Scene prop id: used for ref...
(call_script, "script_use_item", ":instance_id", ":agent_id"), #for only server itself----------------------------------------------------------------------------------------------- (get_max_players, ":num_players"), (try_for_range, ":player_no", 1, ":num_players"), #0 is server so starting from 1
<|file_name|>SlopeFloor.cc<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2009 Ronald Lamprecht * * 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 License, or (at...
<|file_name|>progressevent.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::codegen::Bindings::EventBind...
use crate::dom::event::{Event, EventBubbles, EventCancelable};
<|file_name|>flow_archive_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Test the flow archive.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from absl import app import mock from grr_response_core.lib import utils from grr_...
<|file_name|>main_window.py<|end_file_name|><|fim▁begin|># -*- coding:utf8 -*- """ Handels everthing related to the main Window """ from __future__ import unicode_literals import sys from urllib.parse import urlparse, urlunparse from PyQt5.QtWidgets import QMainWindow, QFileDialog, QMessageBox, QMessageBox from PyQt...
# would harm readability QMessageBox.warning(self, 'Auflösung ungültig', ('Die für die Skalierung angegebene Auflösung ist ungültig. '
<|file_name|>GmSimpleElevationGrid.java<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2007-2016 52North Initiative for Geospatial Open Source * Software GmbH * * 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 * ...
"Illegal grid element access. " + e.getMessage()); } }
<|file_name|>EntityModel.js<|end_file_name|><|fim▁begin|>/** * DO NOT EDIT THIS FILE. * See the following change record for more information, * https://www.drupal.org/node/2815083 * @preserve **/ (function (_, $, Backbone, Drupal) { Drupal.quickedit.EntityModel = Drupal.quickedit.BaseModel.extend({ defaults: { ...
Drupal.quickedit.util.networkErrorModal(Drupal.t('Network problem!'), message); } }); }
<|file_name|>Draggable.tsx<|end_file_name|><|fim▁begin|>import React, { useEffect, useRef, useState } from 'react' import { PigeonProps, Point } from '../types' function isDescendentOf(element, ancestor) { while (element) { if (element === ancestor) { return true } element = element.parentElement ...
} } const handleDragMove = (event: MouseEvent | TouchEvent) => {
<|file_name|>serverInterface.py<|end_file_name|><|fim▁begin|>__author__ = 'Frank Sehnke, sehnke@in.tum.de' from environment import Environment class GraphicalEnvironment(Environment): """ Special type of environment that has graphical output and therefore needs a renderer. """ def __init__(self): ...
@return: True if a renderer was set, False otherwise
<|file_name|>directed_percolation.cpp<|end_file_name|><|fim▁begin|>// Copyright Johannes Falk // example for directed percolation // one can choose the probability in the main // critical-value = 0.68 #include <stdlib.h> #include <stdio.h> #include <time.h> #include <algorithm> #include <cstdlib> #include <vector> #i...
int size = sites->size(); int even = time%2; for (int i = even; i < size; i += 2) { if (sites->at(i)) {
<|file_name|>test_utils.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 //! Internal module containing convenience utility functions mainly for testing use crate::traits::Uniform; use serde::{Deserialize, Serialize}; /// A deterministic seed for PRNG...
fn seed() -> &'static [u8; 32] { TEST_DIEM_CRYPTO_SEED.get_or_init(|| {
<|file_name|>auth.go<|end_file_name|><|fim▁begin|>package cmd import ( "github.com/drud/ddev/pkg/output" "github.com/drud/ddev/pkg/util" "github.com/spf13/cobra" ) // AuthCmd is the top-level "ddev auth" command var AuthCmd = &cobra.Command{ Use: "auth [command]", Short: "A collection of authentication com...
Use: "pantheon", Short: "ddev auth pantheon is no longer needed, see docs",
<|file_name|>test_engine.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (nested_scopes, generators, division, absolute_import, with_statement, ...
self.assertEqual(42, result)
<|file_name|>handle.rs<|end_file_name|><|fim▁begin|>pub mod prelude { pub use super::{Handle,HandleMut};<|fim▁hole|>/// This trait is intended to be used by structs that manage the ownership of a resource from a C /// library. Often, a pointer to the resource is needed to implement methods in other modules that ///...
} /// Types that manages access to a resource. ///
<|file_name|>mem.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licens...
<|file_name|>vertical.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Provides vertical object.""" from __future__ import absolute_import from ..entity import Entity class Vertical(Entity): """docstring for Vertical.""" collection = 'verticals' resource = 'vertical' _relations = { ...
super(Vertical, self).__init__(session, properties, **kwargs)
<|file_name|>def2.rs<|end_file_name|><|fim▁begin|>#pragma version(1) #pragma rs java_package_name(foo) // expected-error: different order(POD)<|fim▁hole|>typedef struct DifferentDefinition5{ float member2; int member1; } DifferentDefinition5; DifferentDefinition5 o5;<|fim▁end|>
<|file_name|>cryptocurrency-migration.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum 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 // // http://www.apache.org/licen...
<|file_name|>legacy.go<|end_file_name|><|fim▁begin|>// // Copyright (c) 2017 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 // // http://www.apache.org/licenses/LI...
var resources types.CiaoTenantResources url := client.buildComputeURL("%s/quotas", client.TenantID) err := client.getResource(url, "", nil, &resources)
<|file_name|>euclidean.rs<|end_file_name|><|fim▁begin|>// Using structs to represent 2D points<|fim▁hole|> pub struct Point { pub x: f64, pub y: f64, } pub fn euclidean(point_a: Point, point_b: Point) -> f64 { let value_sq = pow((point_a.x - point_b.x), 2) + pow((point_a.y - point_...
// and calculating the Euclidean distance between them mod pointutils { use std::num::pow;
<|file_name|>regularization.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2020, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code,...
<|file_name|>mixed.py<|end_file_name|><|fim▁begin|>""" MixedModuleStore allows for aggregation between multiple modulestores. In this way, courses can be served up both - say - XMLModuleStore or MongoModuleStore """ import logging from contextlib import contextmanager import itertools import functools from contracts...
Reverts an item to its last published version (recursively traversing all of its descendants). If no published version exists, an InvalidVersionError is thrown. If a published version exists but there is no draft version of this item or any of its descendants, this
<|file_name|>squeezenet_main.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.a...
if __name__ == "__main__": tf.logging.set_verbosity(tf.logging.INFO) app.run(main)