prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Widget.js<|end_file_name|><|fim▁begin|>Ext.define('Ext.slider.Widget', { extend: 'Ext.Widget', alias: 'widget.sliderwidget', // Required to pull in the styles requires: [ 'Ext.slider.Multi' ], cachedConfig: { vertical: false, cls: Ext.baseCSSPrefix + 'sli...
values = [], i = 0, thumbs = me.thumbs, len = thumbs.length;
<|file_name|>logger.js<|end_file_name|><|fim▁begin|>/* Magic Mirror * Log * * This logger is very simple, but needs to be extended. * This system can eventually be used to push the log messages to an external target. * * By Michael Teeuw https://michaelteeuw.nl * MIT Licensed. */ (function (root, factory) { if...
return logLevel; });
<|file_name|>wls_reset.py<|end_file_name|><|fim▁begin|>############################################################################ # Generic script applicable on any Operating Environments (Unix, Windows) # ScriptName : wls_reset.py # Properties : weblogic.properties # Author : Kevin Yuan ################...
#=========================================================================== # Remove Data Sources using wlst on-line commonds
<|file_name|>update-dependencies-bad.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # update-dependencies-bad.py - Fails on bad.swift -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache Lic...
<|file_name|>GenomeFeatureComparatorServer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from wsgiref.simple_server import make_server import sys import json import traceback import datetime from multiprocessing import Process from getopt import getopt, GetoptError from jsonrpcbase import JSONRPCService, Invali...
rpc_result = "" else: request_body = environ['wsgi.input'].read(body_size)
<|file_name|>attachment_metadata.cc<|end_file_name|><|fim▁begin|>// Copyright 2014 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 <stddef.h><|fim▁hole|> namespace syncer { AttachmentMetadata::AttachmentMetadat...
#include "sync/api/attachments/attachment_metadata.h"
<|file_name|>tokenizer.rs<|end_file_name|><|fim▁begin|>use std::collections::HashSet; #[derive(PartialEq)] enum CharTypes { IsNumeric, IsAlphabetic, IsSpace, IsOther, } #[derive(Debug, PartialEq, Clone)] pub enum TokenType { IsVariable, IsNumeric, IsFunction, IsOperation, } #[derive(D...
} else if self.is_alphabetic() {
<|file_name|>PureEmergentHiveMindNeurons.ts<|end_file_name|><|fim▁begin|>import { IHiveMindNeuron, IHiveMindNeurons } from './HiveMindNeurons'; import { UserInput } from '../../BasicUserInput'; import { RequestContext } from '../../BasicRequestContext'; import { INeuronsResponse, ISingleNeuronsResponse, SingleNeuronsRe...
<|file_name|>filevideocapturer.cc<|end_file_name|><|fim▁begin|>// libjingle // Copyright 2004 Google Inc. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above...
<|file_name|>test_unitofworkv2.py<|end_file_name|><|fim▁begin|>from sqlalchemy.testing import eq_, assert_raises, assert_raises_message from sqlalchemy import testing from sqlalchemy.testing import engines from sqlalchemy.testing.schema import Table, Column from test.orm import _fixtures from sqlalchemy import exc from...
assert a1.bs[0].c is None def test_set_none_w_get_replaces_m2o(self): A, B, C = self._fixture()
<|file_name|>SpinningViewPager.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 Leszek Mzyk * Modifications Copyright (C) 2015 eccyan <g00.eccyan@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 obt...
int positionOffsetPixels) { int realPosition = position; if (mAdapter != null) { realPosition = mAdapter.toRealPosition(position);
<|file_name|>c.rs<|end_file_name|><|fim▁begin|>use super::{error, store::path, store::StorePath, util}; #[no_mangle] pub unsafe extern "C" fn ffi_String_new(s: &str, out: *mut String) { // FIXME: check whether 's' is valid UTF-8? out.write(s.to_string()) } #[no_mangle] pub unsafe extern "C" fn ffi_String_drop...
#[no_mangle] pub extern "C" fn ffi_StorePath_to_string(self_: &StorePath) -> Vec<u8> { let mut buf = vec![0; path::STORE_PATH_HASH_CHARS + 1 + self_.name.name().len()]; util::base32::encode_into(self_.hash.hash(), &mut buf[0..path::STORE_PATH_HASH_CHARS]);
<|file_name|>notifications-list.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input, EventEmitter, SimpleChanges, OnChanges } from '@angular/core'; import { ToasterService } from 'angular2-toaster'; import { TranslateService } from 'ng2-translate'; import { Notification } from '../notification.model'; ...
styleUrls: ['notifications-list.component.css']
<|file_name|>visualizations.py<|end_file_name|><|fim▁begin|>import logging import pandas as pd import matplotlib.pyplot as plt def running_total_comparison(df1, window=15): fig_size = [12,12] xlim = [0,365] ylim = [0,max(df1.Pages)] years = df1.Year.unique()[-window:].tolist() y = years.pop(0) ...
ax = _df.plot("Day", "Pages", figsize=fig_size, xlim=xlim, ylim=ylim, label=y) for y in years: _df = df1.loc[df1.Year == y] ax = _df.plot("Day", "Pages", figsize=fig_size, xlim=xlim, ylim=ylim, ax=ax, label=y)
<|file_name|>deref-rc.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/licens...
<|file_name|>additions.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
<|file_name|>os_subnet.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ver...
default: 4
<|file_name|>DateAlignedGraph.js<|end_file_name|><|fim▁begin|>import _ from 'underscore' import Base from '../graphs/base' import DayBinner from '../graphs/DayBinner' import WeekBinner from '../graphs/WeekBinner' import MonthBinner from '../graphs/MonthBinner' import ScaleByBins from '../graphs/ScaleByBins' import help...
} else { // in range
<|file_name|>card.go<|end_file_name|><|fim▁begin|>package main import ( "github.com/gin-gonic/gin" "github.com/loopfz/scecret/auth" "github.com/loopfz/scecret/models" ) type ListCardsIn struct { IDScenario int64 `path:"scenario, required"` } func ListCards(c *gin.Context, in *ListCardsIn) ([]*models.Card, error)...
X uint `json:"x" binding:"required"` Y uint `json:"y" binding:"required"`
<|file_name|>elfinder.ar.js<|end_file_name|><|fim▁begin|>/** * Arabic translation (Syrian Localization, it may differ if you aren't from Syria or any Country in Middle East) * @author Tawfek Daghistani <tawfekov@gmail.com> * @version 2011-07-09 */ if (elFinder && elFinder.prototype && typeof(elFinder.prototype.i18)...
<|file_name|>instructors_activity.py<|end_file_name|><|fim▁begin|>import os import logging from django.core.management.base import BaseCommand from django.core.mail import send_mail from django.template.loader import get_template from workshops.models import Badge, Person, Role logger = logging.getLogger() class C...
# write whole message out self.stdout.write(message + '\n')
<|file_name|>xinput.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------------- # Copyright (c) 2008 Andrew D. Straw and Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided th...
<|file_name|>negamax.rs<|end_file_name|><|fim▁begin|>use std::sync::atomic::{AtomicBool, Ordering}; use std::cmp::max; use game::{Position, Move, Score, ScoreUnit, NumPlies}; use types::InnerData; use transposition_table::TranspositionTable; #[derive(Copy, Clone, Debug)] pub enum Bound { Exact(Score), Lower(...
pub fn is_exact(self) -> bool { if let Bound::Exact(_) = self { true } else { false } }
<|file_name|>xpath_test.py<|end_file_name|><|fim▁begin|>from lxml import etree from okcupyd import xpath def test_selected_attribute(): node = xpath.XPathNode(element='element', selected_attribute='value') assert node.xpath == '//element/@value' tree = etree.XML("<top><container><element value='1'>" ...
assert result == []
<|file_name|>0006_phenotype_user.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-26 15:47 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion <|fim▁hole|>class Migration(migrat...
<|file_name|>datastructures.py<|end_file_name|><|fim▁begin|>import copy from types import GeneratorType class MergeDict(object): """ A simple class for creating new "virtual" dictionaries that actually look up values in more than one dictionary, passed in the constructor. If a key appears in more than...
for dict_ in self.dicts: if key in dict_: return True
<|file_name|>deeper.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict, Mapping, Container from pprint import pprint from sys import getsizeof def deep_compare(a, b, pointer='/'): if a == b: return if type(a) != type(b): reason = 'Different data types' extra = str((t...
x(pointer, reason, extra)
<|file_name|>Tools_todo_Model.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models from ..Models import *<|fim▁hole|> (1, u'New'), (2, u'Doing'), (3, u'Waiting'), (4, u'Done'), ) SPECIES_TYPES = ( (1, u'Task'), # 查询 (2, u'Check'), ...
from center.Exceptions.ModelsExceptions import * class Tools_todo(models.Model): STATUS_TYPES = (
<|file_name|>test_extcall.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Doctest for method/function calls. We're going the use these types for extra testing >>> from UserList import UserList >>> from UserDict import UserDict We're defining four helper functions >>> def e(a,b): ... ...
def test_main(): test_support.run_doctest(sys.modules[__name__], True) test_support.run_unittest(ExtCallTest)
<|file_name|>bookmark.js<|end_file_name|><|fim▁begin|>/** * Module dependancies */ var express = require('express') , models = require('../../models'); var router = express.Router() , Applicant = models.applicant() , JobPosting = models.jobPosting(); var ObjectIdBase64Conv = require('../../util').Objec...
*/
<|file_name|>do-for-no-args.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
pub fn main() {
<|file_name|>[search].ts<|end_file_name|><|fim▁begin|>import type { NextApiHandler } from 'next' import jwt from 'next-auth/jwt' import { isMember } from '../../../../src/auth/check-user' import { apiError } from '../../../../src/services/error-response' import MapModel from '../../../../src/models/map' const signingK...
const handler: NextApiHandler = async (req, res) => {
<|file_name|>before-after.test.js<|end_file_name|><|fim▁begin|>const test = require('tape') const nlp = require('../_lib') test('before-basic', function(t) { let doc = nlp('one two three four five. one three four') let arr = doc.before('three four').out('array') t.equal(arr.length, 2, 'two-matches') t.equal(ar...
// r = nlp('one two three four').before('.'); //tricky
<|file_name|>plugin.js<|end_file_name|><|fim▁begin|>/* * @package jsDAV * @subpackage CardDAV * @copyright Copyright(c) 2013 Mike de Boer. <info AT mikedeboer DOT nl> * @author Mike de Boer <info AT mikedeboer DOT nl> * @license http://github.com/mikedeboer/jsDAV/blob/master/LICENSE MIT License */ "use strict"; ...
<|file_name|>Row.js<|end_file_name|><|fim▁begin|>'use strict'; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }...
var _constants = require('../constants');
<|file_name|>weather.py<|end_file_name|><|fim▁begin|>"""Weather component that handles meteorological data for your location.""" from __future__ import annotations from abc import abstractmethod from collections.abc import Mapping from datetime import datetime from typing import Any, cast from pyclimacell.const impor...
CC_V3_ATTR_PRECIPITATION_TYPE,
<|file_name|>test_cloud.py<|end_file_name|><|fim▁begin|># -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ------------...
import multiprocessing from azure.cli.core.cloud import (Cloud,
<|file_name|>attachments.list.js<|end_file_name|><|fim▁begin|>/** * Nooku Platform - http://www.nooku.org/platform * * @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net) * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html> * @link https://githu...
method: 'get'
<|file_name|>Basic.js<|end_file_name|><|fim▁begin|>import {boolean, number, object, text, withKnobs} from '@storybook/addon-knobs'; import { BentoAccordion, BentoAccordionContent, BentoAccordionHeader, BentoAccordionSection, } from '#bento/components/bento-accordion/1.0/component'; import {BentoVideo} from '#b...
const width = text('width', '320px'); const height = text('height', '180px'); return ( <BentoAccordion expandSingleSection>
<|file_name|>ExportModelResponse.java<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/license...
}
<|file_name|>url_data.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Copyright (C) 2012 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import logging fro...
<|file_name|>introclass_95362737_003.java<|end_file_name|><|fim▁begin|>package ase2016.introclass.median; <|fim▁hole|> /*@ @ requires true; @ ensures ((\result == \old(a)) || (\result == \old(b)) || (\result == \old(c))); @ ensures ((\old(a)!=\old(b) || \old(a)!=\old(c)) ==> ( ((\old(a)==\old(b)) ==...
public class introclass_95362737_003 { public introclass_95362737_003() { }
<|file_name|>GrDawnBuffer.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2019 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/gpu/dawn/GrDawnBuffer.h" #include "src/gpu/dawn/GrDawnStagingBuffer.h" #include "src/gpu/dawn/GrDawnG...
.CopyBufferToBuffer(fStagingBuffer, fStagingOffset, fBuffer, 0, this->size()); }
<|file_name|>metricConfigurationDataView.js<|end_file_name|><|fim▁begin|>function MetricConfiguationDataView(metricConfiguration) { var DynamicPropertyType = { Boolean : 1, Int : 2,<|fim▁hole|> String : 4, Color : 5, Percent : 6 }; var _items = []; var _ro...
Double : 3,
<|file_name|>Alienwah.C<|end_file_name|><|fim▁begin|>/* ZynAddSubFX - a software synthesizer Alienwah.C - "AlienWah" effect Copyright (C) 2002-2005 Nasca Octavian Paul Author: Nasca Octavian Paul Modified for rakarrack by Josep Andreu This program is free software; you can redistribute it and/or modify ...
break; } }
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.utils.translation import gettext_lazy as _ from wagtail.admin.ui.tables import Column, StatusFlagColumn, TitleColumn from wagtail.admin.views import generic from wagtail.admin.viewsets.model import ModelViewSet from wagtail.core.models import Site from wag...
<|file_name|>apiexport.go<|end_file_name|><|fim▁begin|>package apimanagement // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause i...
return
<|file_name|>AnyServer.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////////////////////////////// /// @brief any server /// /// @file /// This file contains a server template. /// /// DISCLAIMER /// /// Copyright 2014 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGEN...
else { done = false; }
<|file_name|>OrderStatus4Code.go<|end_file_name|><|fim▁begin|><|fim▁hole|>type OrderStatus4Code string<|fim▁end|>
package iso20022
<|file_name|>face.rs<|end_file_name|><|fim▁begin|>use std::fmt; pub struct Face {<|fim▁hole|> pub v1: usize, pub vn1: usize, pub v2: usize, pub vn2: usize, pub v3: usize, pub vn3: usize } impl fmt::Display for Face { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Face({}, {}, {})", self.v...
<|file_name|>test_margins.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Aug 3 21:08:49 2017 Author: Josef Perktold """ import numpy as np from numpy.testing import assert_allclose # load data into module namespace from statsmodels.datasets.cpunish import load from statsmodels.discrete.d...
cls.rtol_fac = 1 cls.res1_slice = slice(None, None, None) cls.res1 = res_stata.results_poisson_margins_cont
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ #![crate_name = "js"] #![crate_type = "rlib"] #![feature(core_in...
pub const JSID_TYPE_STRING: i64 = 0;
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from distutils.core import setup from DistUtilsExtra.command import * import glob import os setup(name='unattended-upgrades', version='0.1', scripts=['unattended-upgrade'], data_files=[ ('../etc/apt/apt.conf.d/', ...
<|file_name|>describe_acls_v0.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 # to you under th...
class DescribeAclsV0Response(BaseResponse): schema = [
<|file_name|>custom.js<|end_file_name|><|fim▁begin|>jQuery(document).ready(function ($) { "use strict"; jQuery.browser={};(function(){jQuery.browser.msie=false; jQuery.browser.version=0;if(navigator.userAgent.match(/MSIE ([0-9]+)\./)){ jQuery.browser.msie=true;jQuery.browser.version=RegExp.$1;}})(); jQuery('#aja...
pagination: true, paginationNumbers: false });
<|file_name|>ddp_model.py<|end_file_name|><|fim▁begin|># Copyright The PyTorch Lightning 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/licenses/LICENSE-2...
from argparse import ArgumentParser
<|file_name|>crypto_verify_32.rs<|end_file_name|><|fim▁begin|>// crypto_verify_32.h pub const crypto_verify_32_BYTES: usize = 32; extern { pub fn crypto_verify_32_bytes() -> size_t;<|fim▁hole|>} #[test] fn test_crypto_verify_32_bytes() { assert_eq!(unsafe { crypto_verify_32_bytes() as usize }, ...
pub fn crypto_verify_32( x: *const [u8; crypto_verify_32_BYTES], y: *const [u8; crypto_verify_32_BYTES]) -> c_int;
<|file_name|>calc.rs<|end_file_name|><|fim▁begin|>use std::iter::Peekable; use std::str::Chars; #[derive(Debug)] pub enum Tokens { Number(f64), Add, Sub, Mul, Div, Mod, Pow, OpenParen, CloseParen, } #[derive(Debug)] pub enum Error { InvalidResult, InvalidOperation, D...
Ok(res) => { stack.push(res); }, Err(e) => { return Err(e); } }
<|file_name|>runtime.go<|end_file_name|><|fim▁begin|>// +build linux /* Copyright The containerd 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/l...
if !r.config.NoShim { var cgroup string if opts.Options != nil { v, err := typeurl.UnmarshalAny(opts.Options)
<|file_name|>user-experience-list.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { ExperienceService } from '../../services/experience.service'; import { Router } from '@angular/router'; import { Experience } from '../../models/experience-form-data'; import { AuthSe...
this.experienceService.getExperiencesByUserId(currentUser.uid) .subscribe(experienceList => { let returnExperiences: Experience[] = []; for (let experience of experienceList) {
<|file_name|>SkeletonBeliefPropagation.py<|end_file_name|><|fim▁begin|>import numpy as np ''' Belief Propagation on tree''' class Node: children = [] parent = -1 pos = -1 index = -1 depth = 0 msgsDown = {} msgUp = -1 psi = -1 belief = -1 def __init__(self, parent_=-1, index_=-1, children_=[], pos_=-1, de...
self.belief = -1 self.msgsDown = {}
<|file_name|>bitcoin_pam.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pam" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Fractalcoin Core</source> <translation type="...
</message>
<|file_name|>text_run.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 font::{Font, RunMetrics, FontMetrics}; use servo_util::g...
}
<|file_name|>test_fileinput.py<|end_file_name|><|fim▁begin|>''' Tests for fileinput module. Nick Mathewson ''' import unittest from test.support import verbose, TESTFN, run_unittest from test.support import unlink as safe_unlink import sys, re from io import StringIO from fileinput import FileInput, hook_encoded # Th...
## encoding = sys.getfilesystemencoding() ## if encoding is None:
<|file_name|>v1.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 Mirantis, 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/LICENSE-2.0 # # Unless r...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express'); var bodyParser = require('body-parser'); var fs = require('fs') var app = express(); var lostStolen = require('mastercard-lost-stolen'); var MasterCardAPI = lostStolen.MasterCardAPI; var dummyData = []; var dummyDataFiles = ['www/dat...
console.log('Example app listening on port 3000!'); });
<|file_name|>testimonial.module.ts<|end_file_name|><|fim▁begin|>import {NgModule} from '@angular/core'; import {TestimonialService} from "./testimonial.service"; import {TestimonialEditorComponent} from "./testimonial-editor.component"; import {TestimonialComponent} from "./testimonial-list.component"; import {Tes...
<|file_name|>echoserver.rs<|end_file_name|><|fim▁begin|>use std::net::{TcpListener, TcpStream}; use std::thread; // traits use std::io::Read; use std::io::Write; fn handle_client(mut stream: TcpStream) { let mut buf; loop { // clear out the buffer so we don't send garbage<|fim▁hole|> Err(e)...
buf = [0; 512]; let _ = match stream.read(&mut buf) {
<|file_name|>mod.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...
// // FIXME(#8888): Several of these functions have a parameter named
<|file_name|>movieTileController.js<|end_file_name|><|fim▁begin|>define( [ 'angular', 'ngRoute', 'config/config', 'tmdb/services/TMDBAPIService'], function( angular, $routeParams, config, TMDBAPIService ) { "use strict"; var MovieTileController = function($scope, TMDBA...
}; $scope.clickTwo = function(){
<|file_name|>instr_vpunpckldq.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*; use ::test::run_test; #[test] fn vpunpckldq_1() { run_test(&...
<|file_name|>check_modules.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Module to check modules existance. This exports this booleans: - has_reportlab -- True if reportlab is found - has_PIL -- True if PIL is found - has_pygtk -- True if pygtk is found Copyright (C) 2005-2008 Xosé Otero <xoseote...
<|file_name|>mod.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/. */ macro_rules! checklock ( ($e: expr) => { match $e { ...
<|file_name|>int-literal-too-large-span.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT<|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....
// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. //
<|file_name|>batchprocess.py<|end_file_name|><|fim▁begin|>""" Batch processors These commands implements the 'batch-command' and 'batch-code' processors, using the functionality in src.utils.batchprocessors. They allow for offline world-building. Batch-command is the simpler system. This reads a file (*.ev) containin...
else: step = 1
<|file_name|>Floater.py<|end_file_name|><|fim▁begin|>""" Floater Class: Velocity style controller for floating point values with a label, entry (validated), and scale """ __all__ = ['Floater', 'FloaterWidget', 'FloaterGroup'] from direct.showbase.TkGlobal import * from Tkinter import * from Valuator i...
self.updateTask = taskMgr.add(self.updateFloaterTask, 'updateFloater') self.updateTask.lastTime = globalClock.getFrameTime()
<|file_name|>input.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|># Copyright (c) <2013> <Martin de Bruyn> # # 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,...
################ # The MIT License (MIT) #
<|file_name|>array.helper.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="xrm" /><|fim▁hole|><|fim▁end|>
export declare function findIndex(handlers: Xrm.Events.ContextSensitiveHandler[], handler: Xrm.Events.ContextSensitiveHandler): number;
<|file_name|>rmsprop_test.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.apac...
(learning_rate, decay, momentum, epsilon, centered, _) = tuple( param_value) with self.session(use_gpu=True): # Initialize variables for numpy implementation.
<|file_name|>test_calendar.py<|end_file_name|><|fim▁begin|>import datetime from django.test import TestCase from django.utils import timezone from schedule.models import Event, Rule, Calendar, CalendarRelation class TestCalendar(TestCase): def setup(self): pass def __create_event(self, start, end):...
<|file_name|>test_bots.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import print_function import filecmp import os import ujson from django.core import mail from django.http import HttpResponse from django.test import override_settings from mock import patch from typing impor...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url,include from django.contrib import admin from cn_device import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^send/(?P<id_ras>[0-9]+)/$',views.payam,name='send condition'), url(r'^give/(?P<id_ras>[0-9]+)/(?P<b...
]
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>'use strict'; const path = require('path') const webpack = require('webpack') const pkg = require('./package.json') const HtmlWebpackPlugin = require('html-webpack-plugin') const WebpackNotifierPlugin = require('webpack-notifier') var paths = { dist: pat...
test: /\.(jsx|js)?$/,
<|file_name|>sct_initdb.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # by: Mohammad Riftadi <riftadi@jawdat.com> # Testing Database instance for CPE Manager from pymongo import MongoClient import hashlib client = MongoClient('mongodb://localhost:27017/') dbh = client.jawdat_internal #drop if collections exists ...
"first_login" : True, "jawdat_id" : "004",
<|file_name|>hints.py<|end_file_name|><|fim▁begin|>import datetime import typing from . import helpers from .tl import types, custom Phone = str Username = str PeerID = int Entity = typing.Union[types.User, types.Chat, types.Channel] FullEntity = typing.Union[types.UserFull, types.messages.ChatFull, types.ChatFull, t...
typing.BinaryIO, types.TypeMessageMedia, types.TypeInputFile,
<|file_name|>deriv_iso.py<|end_file_name|><|fim▁begin|># must use python 2 from classy import Class import matplotlib.pyplot as plt import numpy as np import math max_l = 5000 max_scalars = '5000' ell = np.array( range(1, max_l+1) ) def getDl( pii1=0.5e-10, pii2=1e-9, pri1=1e-13 ): # Define your cosmology (...
<|file_name|>Panel.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react' import PropTypes from 'prop-types' import { assign } from 'lodash' import autoBind from '../utils/autoBind' const styles = { 'ClosedPanelWrapper': { height: '40px' }, 'PanelWrapper': { position: 'relative' }, ...
const { isOpen, orderable } = this.props const { isOver } = this.state return ( <div
<|file_name|>Headline_facet.graphql.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */ import { ReaderFragment } from "relay-runtime"; import { FragmentRefs } from "relay-runtime"; export type Headline_facet = { readonly name?: string | null; readonly " $refType": "Headline_facet"; }; export type Headline_fa...
} ] }; })();
<|file_name|>mod.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|>SlowInputStream.java<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2017-2020 Yegor Bugayenko * * 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 ...
* SOFTWARE. */ package org.cactoos.io;
<|file_name|>Behavior.py<|end_file_name|><|fim▁begin|># GNU Enterprise Common Library - Schema support for PostgreSQL # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise is free software; you can redistribute it # and/or modify it under the terms of the GNU Gener...
# ---------------------------------------------------------------------------
<|file_name|>bcrypt.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> //! Cryptographic Primitive API Prototypes and Definitions pub const KDF_HASH_ALGORITHM: ::ULONG = 0x0; pub const KDF_SECRET_PREPEND: ::ULONG = 0x1; pub const KDF_SECRET_APPEND: ::ULONG...
<|file_name|>classification.py<|end_file_name|><|fim▁begin|>import theano, theano.tensor as T import numpy as np import pandas as pd import lasagne """ note: we are following the sklearn api for metrics/loss functions, where the first arg for a function is y true, and second value is y predicted. this is the opposite...
a_i = T.arange(y_true.shape[0], dtype='int8').dimshuffle(0, 'x', 'x', 'x') b_i = T.arange(y_true.shape[1], dtype='int8').dimshuffle('x', 0, 'x', 'x') c_i = T.arange(y_true.shape[2], dtype='int8').dimshuffle('x', 'x', 0, 'x')
<|file_name|>automata.rs<|end_file_name|><|fim▁begin|>// Transition table for a language consisting of strings having even number of zeroes ( that includes having no zeroes as well ) //____________ //S1 | 1 -> S1 //S1 | 0 -> S2 //S2 | 0 -> S1 //S2 | 1 -> S2 //------------ /*#[derive(Debug)] enum STATE { S0, ...
{state = S1;} else if i=='0' && assert_state(&state,S1) {state = S2;}
<|file_name|>ChildNodeInterface.js<|end_file_name|><|fim▁begin|>/* * Copyright 2013 The Polymer Authors. All rights reserved. * Use of this source code is goverened by a BSD-style * license that can be found in the LICENSE file. */ suite('ChildNodeInterface', function() { function getTree() {<|fim▁hole|> div...
var tree = {}; var div = tree.div = document.createElement('div');
<|file_name|>vkDeviceWaitIdle_test.py<|end_file_name|><|fim▁begin|><|fim▁hole|># you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, software # distributed...
# Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>moves-based-on-type-block-bad.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://...
x: Box<E> }
<|file_name|>test_auth.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ libG(oogle)Reader Copyright (C) 2010 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com Python library for working with the unofficial Google Reader API. Unit tests for oauth and ClientAuthMethod in libg...
#must be a working callback url for testing
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>/* eslint-disable @typescript-eslint/no-var-requires */ const path = require('path'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const webpack = require('webpack'); const { version, author, license } = require('./package.json'); module.exports ...
banner: [
<|file_name|>main.js<|end_file_name|><|fim▁begin|>'use strict'; // you have to require the utils module and call adapter function const utils = require('@iobroker/adapter-core'); // Get common adapter utils const adapterName = require('./package.json').name.split('.').pop(); // include node-ssdp and node-upnp-subscri...
deviceType: xmlDeviceType.toString(), manufacturer: xmlManufacturer.toString(), manufacturerURL: xmlManufacturerURL.toString(),