prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>protobuf-bin-gen-rust.rs<|end_file_name|><|fim▁begin|>#![crate_type = "bin"] #![feature(globs)] extern crate protobuf; extern crate getopts; use std::io::fs::*; use std::io::Reader; use std::io::Writer; use std::path::Path; use std::os; use protobuf::parse_from_reader; use protobuf::descriptor::*; use p...
_ => panic!("must have exactly one argument")
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for Dropzone 5.0.0 // Project: http://www.dropzonejs.com/ // Definitions by: Natan Vivo <https://github.com/nvivo>, Andy Hawkins <https://github.com/a904guy/,http://a904guy.com/,http://www.bmbsqd.com>, Vasya Aksyonov <https://github.com/outring>, ...
resizeMethod?: string; filesizeBase?: number;
<|file_name|>california_housing.py<|end_file_name|><|fim▁begin|>"""California housing dataset. The original database is available from StatLib http://lib.stat.cmu.edu/ The data contains 20,640 observations on 9 variables. This dataset contains the average house value as target variable and the following input v...
<|file_name|>BookEdit.js<|end_file_name|><|fim▁begin|>import React from 'react'; import HomeLayout from '../layouts/HomeLayout'; import BookEditor from '../components/BookEditor'; import { get } from '../utils/request'; class BookEdit extends React.Component { constructor(props) { super(props);<|fim▁hole|>...
<|file_name|>imported-xml-component.spec.ts<|end_file_name|><|fim▁begin|>import { expect } from "chai"; import { Element, xml2js } from "xml-js"; import { EMPTY_OBJECT, ImportedXmlComponent } from "./"; import { IContext } from "./base"; import { convertToXmlComponent } from "./imported-xml-component"; const xmlStrin...
importedXmlComponent = new ImportedXmlComponent("w:test", attributes);
<|file_name|>data.py<|end_file_name|><|fim▁begin|>from lazyrunner import pmodule, PModule, preset, presetTree, defaults from treedict import TreeDict p = defaults() p.data_defaults.a = 1 p.data_defaults.b = 2 @preset def change_default_a(p): p.data_defaults.a = 10 @pmodule class Data(PModule): # Use this ...
) @classmethod
<|file_name|>local-modularized-tricky-pass-2.rs<|end_file_name|><|fim▁begin|>// check-pass // // `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed // into the root module soon enough to act as usual items and shadow globs and preludes. #![feature(decl_macro)] // `macro_export` s...
} } // `macro_export` shadows std prelude
<|file_name|>ScoreTransfer.js<|end_file_name|><|fim▁begin|>#pragma strict var playerFinalScore: int; var Users: List.< GameObject >; var userData: GameObject[]; var maxPlayers: int; var gameManager: GameObject; var currentPlayer: int; var currentName: String; function Awake () { //var users :GameObject = GameObject.Fi...
if(i!=0)Users[i].SetActive(false); Users[i].name = userData[i].name; currentName = Users[0].name;
<|file_name|>github.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
update_issue(token, issue_number, data={'state': 'closed'})
<|file_name|>fetcher.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import errno import hashlib import os import re import shutil im...
full_file_list.add(target_name) if copy_if_different(full_name, target_name): change_status.record_change(target_name)
<|file_name|>get-lang-arg.js<|end_file_name|><|fim▁begin|>/* This utility processes the argument passed with the `lang` option in ember-cli, i.e. `ember (new||init||addon) app-name --lang=langArg` Execution Context (usage, input, output, error handling, etc.): - called directly by `init` IFF `--lang` flag is used i...
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import easy_thumbnails.fields from django.conf import settings import zds.utils.models class Migration(migrations.Migration): dependencies = [ ...
<|file_name|>mojo_app_connection_impl.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 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 "content/browser/mojo/mojo_app_connection_impl.h" #include <stdint.h> #inc...
<|file_name|>forum.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
export * from './src/forum';
<|file_name|>FileBrowser.cpp<|end_file_name|><|fim▁begin|>/* * FileBrowser.cpp - implementation of the project-, preset- and * sample-file-browser * * Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net> * * This file is part of LMMS - http://lmms.io * * This program is...
FileItem * f = dynamic_cast<FileItem *>( itemAt( e->pos() ) );
<|file_name|>RegexValidation.java<|end_file_name|><|fim▁begin|>package servicios.validacion; public final class RegexValidation { public static final class ValidaNombres { private ValidaNombres() { } // public static final String INICIALES = "[a-z,A-Z,ñ,Ñ]{2}$+"; public static final String NOMBRE = "[...
} public static final class ValidaTel { private ValidaTel() {
<|file_name|>File.py<|end_file_name|><|fim▁begin|># Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Code for more fancy file handles. Class...
raise StopIteration return next def readlines(self, *args, **keywds):
<|file_name|>WeatherActivity.java<|end_file_name|><|fim▁begin|>package com.ppweather.app.activity; import com.ppweather.app.R; import com.ppweather.app.service.AutoUpdateService; import com.ppweather.app.util.HttpCallbackListener; import com.ppweather.app.util.HttpUtil; import com.ppweather.app.util.Utility; import a...
<|file_name|>FileDocumentManagerImpl.java<|end_file_name|><|fim▁begin|>/* * Copyright 2000-2017 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.o...
<|file_name|>lockhandler.py<|end_file_name|><|fim▁begin|>""" A *lock* defines access to a particular subsystem or property of Evennia. For example, the "owner" property can be impmemented as a lock. Or the disability to lift an object or to ban users. A lock consists of three parts: - access_type - this defines wha...
A lock is executed in the follwoing way: Parsing the lockstring, we (during cache) extract the valid lock functions and store their function objects in the right
<|file_name|>db.js<|end_file_name|><|fim▁begin|>import util from 'util' import mongoose from 'mongoose' import seedData from '../seedData' const debug = require('debug')('api:server:db') mongoose.Promise = require('bluebird') const host = process.env.MONGO_HOST || 'localhost' const database = process.env.MONGO_DATABA...
const configureMongo = () => {
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from django.contrib.contenttypes import generic from models import Attribute, BaseModel from django.utils.translation import ugettext_lazy as _ class MetaInline(generic.GenericTabularInline): model = Attribute extra = 0 class ...
<|file_name|>fis-conf.js<|end_file_name|><|fim▁begin|>require('fis3-smarty')(fis); <|fim▁hole|><|fim▁end|>
fis.set('namespace', 'common');
<|file_name|>momentum_indicators.rs<|end_file_name|><|fim▁begin|>extern crate tars; use tars::momentum_indicators::rsi::rsi; use tars::helpers::round_array; // Some randomly generated data to test against TA-Lib (see generate_data.py & correct_values.py) const OPEN: &[f64] = &[1984.03, 1959.83, 2041.42, 2019.04, 1969...
2456.25, 2691.53, 2572.81, 2494.14, 2845.93, 2682.66, 2527.13, 2455.68, 2607.54, 2872.17, 3004.26, 3036.05]; const LOW: &[f64] = &[1934.7, 1921.02, 1793.77, 1887.36, 1919.72, 1868.23, 1991.19, 2011.08, 2193.91, 2183.96, 2223.15, 2363.19, 2240.03, 2208....
<|file_name|>APIInstall.js<|end_file_name|><|fim▁begin|>var APIInstall = ServiceCaller.extend( { key_name: 'Install', className: 'APIInstall', getLicense: function() { return this.argumentsHandler( this.className, 'getLicense', arguments ); }, getRequirements: function() { return this.argumentsHandler( t...
return this.argumentsHandler( this.className, 'setSystemSettings', arguments ); },
<|file_name|>stager.go<|end_file_name|><|fim▁begin|>package stager import ( "crypto/md5" "fmt" "io" "log" "os" "github.com/hatofmonkeys/cloudfocker/utils" "github.com/cloudfoundry-incubator/linux-circus/buildpackrunner" "github.com/cloudfoundry-incubator/runtime-schema/models" ) type BuildpackRunner interfa...
func NewBuildpackRunner(buildpackDir string) *buildpackrunner.Runner { prepareMd5BuildpacksDir(buildpackDir, "/tmp/buildpacks")
<|file_name|>timeout.go<|end_file_name|><|fim▁begin|>package guard import ( "time" "gopkg.in/workanator/go-floc.v2" "gopkg.in/workanator/go-floc.v2/errors" ) // TimeoutTrigger triggers when the execution of the job timed out. type TimeoutTrigger func(ctx floc.Context, ctrl floc.Control, id interface{}) // Timeou...
// until the job finished or time went out or the flow is finished. func OnTimeout(when WhenTimeoutFunc, id interface{}, job floc.Job, timeoutTrigger TimeoutTrigger) floc.Job {
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <xpcc/architecture/platform.hpp> #include <xpcc/debug/logger.hpp> // ---------------------------------------------------------------------------- // Set the log level #undef XPCC_LOG_LEVEL #define XPCC_LOG_LEVEL xpcc::log::INFO typedef GpioInputC0 Adc1In; t...
xpcc::IODeviceWrapper< Usart2, xpcc::IOBuffer::BlockIfFull > loggerDevice; xpcc::log::Logger xpcc::log::info(loggerDevice);
<|file_name|>ship.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 *-* from pyglet.window import key from pyglet import clock from . import util, physicalobject from . import resources class Ship(physicalobject.PhysicalObject): """A class for the player""" def __init__(self, thrust_image=None, *args, **kwa...
resources.bullet_sound.play() forward = util.angle_to_vector(self.rotation)
<|file_name|>config.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (C) 2015 Luis López <luis@cuarentaydos.com> # # 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 vers...
<|file_name|>xbox-one-webdriver-server.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node /** * 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...
checkPlatformRequirements(); }
<|file_name|>test_smart_step_into_native_function_in_return.py<|end_file_name|><|fim▁begin|>def f(s): s = s[::-1] return s.swapcase() <|fim▁hole|><|fim▁end|>
result = f(f(f(f(f('abcdef'))))) # breakpoint
<|file_name|>parallel_reader.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2016 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 # # ...
<|file_name|>SalesByDayOfWeekData.ts<|end_file_name|><|fim▁begin|>/* * Power BI Visualizations * * Copyright (c) Microsoft Corporation * All rights reserved. * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ...
source: dataViewMetadata.columns[1], // Sales Amount for 2014 values: this.sampleData1[0], },
<|file_name|>app.po.ts<|end_file_name|><|fim▁begin|>import { browser, by, element } from 'protractor'; export class CustomLibraryPage { navigateTo() { return browser.get('/'); } getParagraphText() { return element(by.css('app-root h1')).getText(); }<|fim▁hole|><|fim▁end|>
}
<|file_name|>benefits.py<|end_file_name|><|fim▁begin|>""" This module holds models related to benefits features and configurations """ from django import forms from django.db import models from django.db.models import UniqueConstraint from django.urls import reverse from polymorphic.models import PolymorphicModel from...
<|file_name|>email.go<|end_file_name|><|fim▁begin|>package email import ( "bytes" "crypto/tls" "html/template" "net" "net/mail" "net/smtp" "time" "github.com/labstack/gommon/random" ) type ( Email struct { Auth smtp.Auth Header map[string]string Template *template.Template smtpAddress...
}
<|file_name|>manage_topics.js<|end_file_name|><|fim▁begin|>/* Copyright (C) 2014 PencilBlue, LLC 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 3 of the License, or ...
<|file_name|>gym_test5.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from gym import envs print(envs.registry.all())<|fim▁end|>
<|file_name|>a.py<|end_file_name|><|fim▁begin|><|fim▁hole|> prev_dict = {} cur_dict = {} for i in xrange(n): ri = n-1-i for j in xrange(m): if i == 0: cur_dict[power[ri][j]] = power[ri][j] else: new_k = power[ri][j] for k...
#!/usr/bin/env python def run_test(n, m, power, bullet):
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""Support for switches through the SmartThings cloud API.""" from __future__ import annotations from collections.abc import Sequence from pysmartthings import Capability<|fim▁hole|>from . import SmartThingsEntity from .const import DATA_BROKERS, DOMAIN async def ...
from homeassistant.components.switch import SwitchEntity
<|file_name|>update.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. // source: update.proto // DO NOT EDIT! package fgupdate import proto "code.google.com/p/goprotobuf/proto" import json "encoding/json" import math "math" // Reference proto, json, and math imports to suppress error if they are...
GameId *string `protobuf:"bytes,5,req,name=game_id" json:"game_id,omitempty"` AppOsType *string `protobuf:"bytes,6,req,name=app_os_type" json:"app_os_type,omitempty"` AppOsVer *string `protobuf:"bytes,7,req,name=app_os_ver" json:"app_os_ver,omitempty"`
<|file_name|>BehaviorTask.cpp<|end_file_name|><|fim▁begin|>#include "core\Singularity.Core.h" using namespace Singularity::Components; namespace Singularity { IMPLEMENT_OBJECT_TYPE(Singularity, BehaviorTask, Singularity::Threading::Task); #pragma region Static Variables BehaviorTask* BehaviorTask::g_pInstance = N...
<|file_name|>Source.cpp<|end_file_name|><|fim▁begin|>#ident "file_id $Id: Source.cpp,v 1.3 2004/01/16 21:45:27 djain Exp $" // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- // // File: Source.cpp // Author: mgross...
//noop }
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>import game import pygame from pygame.locals import * class Resources: <<<<<<< HEAD def cambiar(self,imagen): sheet = game.load_image(imagen) rects = [pygame.Rect(112,2,26,40), pygame.Rect(112,2,26,40), pygame....
[quieto_der, quieto_izq],
<|file_name|>adam_optimizer.d.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2018 Google Inc. 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://...
/** @nocollapse */ static fromConfig<T extends Serializable>(cls: SerializableConstructor<T>, config: ConfigDict): T; }
<|file_name|>wager_test_01.py<|end_file_name|><|fim▁begin|>import os import sys import pygame import signal import time import ConfigParser from twython import TwythonStreamer #----------------------------------------------------------------------------- # Import custom modules #---------------------------------------...
<|file_name|>text.d.ts<|end_file_name|><|fim▁begin|>import Node from "./node"; import { toMap } from "@ckeditor/ckeditor5-utils"; export default class Text extends Node { readonly data: string; constructor(data: string, attrs?: Parameters<typeof toMap>[0]); is(type: string): boolean; toJSON(): ReturnT...
<|file_name|>bitcoin_fa.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.1"> <context> <name>AboutDialog</name> <message> <source>About POND Core</source> <translation type="unfinished"/> </message> <message> <source>&lt;b&gt;POND Co...
</message>
<|file_name|>marshal.go<|end_file_name|><|fim▁begin|>// Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package asn1 import ( "bytes" "errors" "fmt" "io" "math/big" "reflect" "time" "unicode/utf8" ) //...
<|file_name|>StrStrHashMapSerializer.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 licens...
for i in range(0, len(keysAndValues), 2): m[keysAndValues[i]] = keysAndValues[i+1]
<|file_name|>amcache.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """File containing a Windows Registry plugin to parse the AMCache.hve file.""" from __future__ import unicode_literals import pyregf from dfdatetime import filetime from dfdatetime import posix_time from dfwinreg import definitions as dfwin...
program_identifier (str): GUID of entry under Root/Program key file belongs
<|file_name|>cubature_multidim.cpp<|end_file_name|><|fim▁begin|>/* Tests multidimensional numerical integration using cubature. Copyright 2014 Ilja Honkonen 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 Found...
// integrate over the faces of the unit cube from start to end std::array< std::pair<
<|file_name|>loginForm.py<|end_file_name|><|fim▁begin|>from flask.ext.wtf import Form from wtforms import StringField, BooleanField, PasswordField from wtforms.validators import DataRequired<|fim▁hole|> remember_me = BooleanField('remember_me', default=False)<|fim▁end|>
class LoginForm(Form): email = StringField('email', validators=[DataRequired()]) password = PasswordField('password', validators=[DataRequired()])
<|file_name|>sample.py<|end_file_name|><|fim▁begin|>import json from typing import NamedTuple from collections import namedtuple import kfp import kfp.dsl as dsl from kfp import components from kfp.dsl.types import Integer def get_current_namespace(): """Returns current namespace if available, else kubeflow""" ...
<|file_name|>services.py<|end_file_name|><|fim▁begin|>import time import json import tornado.httpclient http_client = tornado.httpclient.HTTPClient() class HTTPServiceProxy(object): def __init__(self, host='localhost', port=6999, cache_timeout=5.0): self._host = host self._port = port se...
return None
<|file_name|>svg_example.py<|end_file_name|><|fim▁begin|># Example made by OssiLehtinen # from svgpathtools import svg2paths, wsvg import numpy as np import uArmRobot import time #Configure Serial Port #serialport = "com3" # for windows serialport = "/dev/ttyACM0" # for linux like system # Connect to uA...
# Back to the starting point (and turn the laser off)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>callback_functions = ["collision_enter", "collision_stay", "collision_exit"] length_area_world = 75 raise_exception = False # import all required modules from game import * from gameobject import * from contracts import * from configuration import * from component...
<|file_name|>pythonrc.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python r""" PYTHONRC ======== Initialization script for the interactive Python interpreter. Its main purpose is to enhance the overall user experience when working in such an environment by adding some niceties to the standard console. It also works with...
elif text[0] in ('"', "'"): value = self.complete_files(text, state) else: value = self.complete_keywords(text, state)
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1]))<|fim▁end|>
# -*- coding: utf-8 -*- VERSION = (0, 1, 6, 'final') if VERSION[-1] != "final": # pragma: no cover
<|file_name|>solve-dialog.component.spec.ts<|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...
fixture.debugElement.query(By.css('.submit-button')).nativeElement.click();
<|file_name|>geoWidgets.py<|end_file_name|><|fim▁begin|># -*- coding: ISO-8859-1 -*-<|fim▁hole|># A class that corresponds to an HTML form widget, # e.g. <input type="text"> or <textarea>. # This handles rendering of the widget as HTML. import json from django.template.loader import render_to_string from .conf impor...
""" Form Widget classes specific to the geoSite admin site. """
<|file_name|>TestOpenStackClientCloudLive.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ SlipStream Client ===== Copyright (C) 2015 SixSq Sarl (sixsq.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 obta...
openstack.ssh.username = ubuntu openstack.ssh.password = yyy """ # pylint: disable=pointless-string-statement
<|file_name|>apps.py<|end_file_name|><|fim▁begin|>from django.apps import AppConfig <|fim▁hole|>class CirculoConfig(AppConfig): name = 'circulo'<|fim▁end|>
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(not(feature = "with-syntex"), feature(rustc_private))] #![deny(warnings)] extern crate dotenv; #[cfg(feature = "with-syntex")] extern crate syntex; #[cfg(feature = "with-syntex")] extern crate syntex_syntax as syntax; #[cfg(not(feature = "with-syntex"))] ...
<|file_name|>regions-bounded-by-send.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.ap...
// lifetime pointers with 'static lifetime are ok
<|file_name|>test_pattern_matching.py<|end_file_name|><|fim▁begin|>from collections import namedtuple from cytomine.models._utilities.pattern_matching import resolve_pattern class TestPatternMatching: def get_fake_type(self): return namedtuple("fakeobj", ["lst", "atomstr", "atomfloat"]) def test_no_...
<|file_name|>comment.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Ernest Micklei // // MIT License // // 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, includin...
p.nextPut(pos, tok, lit) }
<|file_name|>action-types.js<|end_file_name|><|fim▁begin|>export const GET_RESOURCE_TO_VERIFY = 'verificationPortal/GET_RESOURCE_TO_VERIFY'<|fim▁hole|>export const CLEAR_RESOURCE = 'verificationPortal/CLEAR_RESOURCE'<|fim▁end|>
export const FORM_SUCCESSFULLY_SUBMITTED = 'FORM_SUCCESSFULLY_SUBMITTED'
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var express = require('express'); var path = require('path'); var favicon = require('serve-favicon'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); // Database var mongo = require('mongodb'); var mon...
var db = monk('localhost:27017/mydb'); var index = require('./routes/index'); var buyer = require('./routes/buyer');
<|file_name|>stepA_mal.rs<|end_file_name|><|fim▁begin|>#![allow(non_snake_case)] extern crate mal; use std::collections::HashMap; use std::env as stdenv; use std::process as process; use mal::types::{MalVal, MalRet, MalError, err_str}; use mal::types::{symbol, _nil, string, list, vector, hash_map, malfunc, malfuncd}...
Sym(_) => { let r = try!(eval(exp.clone(), let_env.clone())); env_set(&let_env, b.clone(), r); },
<|file_name|>Qualifiers.hpp<|end_file_name|><|fim▁begin|>/******************************************************************************* * refn - All content 2016 Trent Reed, all rights reserved. *------------------------------------------------------------------------------ * A type containing information for type...
<|file_name|>test.js<|end_file_name|><|fim▁begin|>'use strict'; const AWS = require('aws-sdk'); let x = "/delegationset/NHKXBB6SHGKLN"; console.log(x.replace('/delegationset/', '')); return; const route53 = new AWS.Route53(); route53.listHostedZones({}).promise() .then(response => { console.log(response); ...
}); }) .catch(err => {
<|file_name|>cef_request_handler.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of sou...
pub fn get_resource_handler(&self, browser: interfaces::CefBrowser, frame: interfaces::CefFrame, request: interfaces::CefRequest) -> interfaces::CefResourceHandler { if self.c_object.is_null() {
<|file_name|>ActionGoto.java<|end_file_name|><|fim▁begin|>package me.mrdaniel.npcs.actions; import javax.annotation.Nonnull; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.text.Text; import org.spongepowered.api.text.action.TextActions; import org.spongepowered.api.text.format....
return Text.builder().append(Text.of(TextColors.GOLD, "Goto: "),
<|file_name|>test_content_type.py<|end_file_name|><|fim▁begin|># Copyright (c) 2008, 2012 testtools developers. See LICENSE for details. from testtools import TestCase from testtools.matchers import Equals, MatchesException, Raises from testtools.content_type import ( ContentType, JSON, UTF8_TEXT, ) ...
<|file_name|>Gate AND.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------- # PROJECT: VHDL Code Generator # NAME: Dynamic AND Gate # # LICENSE: GNU-GPL V3 #------------------------------------------------------------------------------- __isBloc...
super().__init__() self.ui = uic.loadUi("blocks\\Standard Library\\Gate.ui",self)
<|file_name|>movies.publications.js<|end_file_name|><|fim▁begin|><|fim▁hole|> this.autorun(autorun); return; function validate() { new SimpleSchema({ movieId: ML.fields.id }).validate({ movieId }); } function autorun(computation) { if (!this.userId) { ...
Meteor.publish('movieDetails.user', publishUserMovieDetails); function publishUserMovieDetails({ movieId }) { validate();
<|file_name|>tango_fe.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of the bliss project # # Copyright (c) 2016 Beamline Control Unit, ESRF<|fim▁hole|> class tango_fe(TangoAttrCounter): def __init__(self, name, config): TangoAttrCounter.__init__(self, name, config)<|fim▁end|>
# Distributed under the GNU LGPLv3. See LICENSE for more info. from bliss.controllers.tango_attr_as_counter import TangoAttrCounter
<|file_name|>jsb_cocos2d_extension.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2014 Chukong Technologies Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restri...
<|file_name|>_hoverlabel.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="sankey", **kwargs): super(HoverlabelValidator, self).__init__( plotl...
Sets the horizontal alignment of the text content within hover label box. Has an effect
<|file_name|>force_https.py<|end_file_name|><|fim▁begin|>"""An example of using a middleware to require HTTPS connections. requires https://github.com/falconry/falcon-require-https to be installed via pip install falcon-require-https """ import hug from falcon_require_https import RequireHTTPS hug.API(__name__...
<|file_name|>walknote.js<|end_file_name|><|fim▁begin|>/** * React Static Boilerplate * https://github.com/koistya/react-static-boilerplate * Copyright (c) Konstantin Tarkus (@koistya) | MIT license */ import React, { Component } from 'react' import { Col, Row } from 'react-bootstrap' import WorkPageLayout from '.....
rel="noopener noreferrer" > walknote: CD屋の試聴機が、自分向けになって手元に到着。そんな曲探しアプリ。無料。
<|file_name|>base.py<|end_file_name|><|fim▁begin|>""" Django settings for tiny_hands_pac project. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os from os....
WAGTAILSEARCH_RESULTS_TEMPLATE = 'utils/tags/search/search_results.html'
<|file_name|>manticore_protocol_cerberus_DeviceUptime__req_from_wire.rs<|end_file_name|><|fim▁begin|>// Copyright lowRISC contributors. // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 // !! DO NOT EDIT !! // To regenerate this file, run `fuzz/generate_...
use manticore::protocol::cerberus::DeviceUptime as C;
<|file_name|>route_network_test.go<|end_file_name|><|fim▁begin|>// Copyright 2017 flannel 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/...
t.Fatal(nw.routes[0]) } // change gateway of previous route nw.handleSubnetEvents([]subnet.Event{
<|file_name|>Main.java<|end_file_name|><|fim▁begin|>package cz.devaty.projects.gio; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.stream.Collectors; public class Main { /** * předmět a ...
} else {
<|file_name|>cross-global-for-in.js<|end_file_name|><|fim▁begin|><|fim▁hole|>var ArrayIteratorPrototype = Object.getPrototypeOf(arrayIter); var arrayIterProtoBase = Object.getPrototypeOf(ArrayIteratorPrototype); var IteratorPrototype = arrayIterProtoBase; delete IteratorPrototype.next; var obj = global.eval('({a: 1})'...
var global = newGlobal(); var arrayIter = (new global.Array())[global.Symbol.iterator]();
<|file_name|>image.go<|end_file_name|><|fim▁begin|>package astar import ( "os" "image" //"fmt" ) import _ "image/png" func openImage(filename string) (image.Image) { f, err := os.Open(filename) if err != nil { return nil } defer f.Close() img, _, _ := image.Decode(f) return img } func parseImage(img imag...
} }
<|file_name|>theodolite.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { TheodoliteComponent } from './theodolite/theodolite.component'; import { MarkdownSlideComponent } from './slide/markdown/markdownSlide.component'; import { CodeSlideComponent } from './slide/code/codeSlide....
import { ControlsComponent } from './controls/controls.component';
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate gl_generator; extern crate khronos_api; use std::env; use std::fs::File; use std::io::BufReader; use std::io::Write; use std::path::Path; use gl_generator::generators::Generator; mod textures; fn main() { let dest = env::var("OUT_DIR").unwrap(); ...
gl_generator::registry::Registry::from_xml(reader, ns, Some(filter)) };
<|file_name|>dnssec_keyscan.go<|end_file_name|><|fim▁begin|>package dns import ( "crypto" "crypto/dsa" "crypto/ecdsa" "crypto/rsa" "io" "math/big" "strconv" "strings" ) // NewPrivateKey returns a PrivateKey by parsing the string s. // s should be in the same form of the BIND private key files. func (k *DNSKEY...
} l.value = zValue l.token = str
<|file_name|>struct-destructuring-cross-crate.rs<|end_file_name|><|fim▁begin|>// run-pass // aux-build:struct_destructuring_cross_crate.rs extern crate struct_destructuring_cross_crate; pub fn main() { let x = struct_destructuring_cross_crate::S { x: 1, y: 2 }; let struct_destructuring_cross_crate::S { x: a,...
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>"""Store various constants here""" from enum import Enum # Maximum file upload size (in bytes). MAX_CONTENT_LENGTH = 1 * 1024 * 1024 * 1024 # Authentication/account creation constants PWD_HASH_ALGORITHM = 'pbkdf2_sha256' SALT_SIZE = 24 MIN_USERNAME_LENGTH = 2 MAX...
"""Value of members.gender if member is male"""
<|file_name|>test_packing.py<|end_file_name|><|fim▁begin|>import pytest import pwny target_little_endian = pwny.Target(arch=pwny.Target.Arch.unknown, endian=pwny.Target.Endian.little) target_big_endian = pwny.Target(arch=pwny.Target.Arch.unknown, endian=pwny.Target.Endian.big) def test_pack(): assert pwny.pack...
yield check_short_form_pack_endian, 'p', -66052, b'\xfc\xfd\xfe\xff', pwny.Target.Endian.little yield check_short_form_pack_endian, 'p', -66052, b'\xff\xfe\xfd\xfc', pwny.Target.Endian.big yield check_short_form_pack, 'P', 4294901244, b'\xfc\xfd\xfe\xff'
<|file_name|>delete_user_form.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django import forms from datetime import date from dateutil.relativedelta import * from django.contrib.auth.models import User from custom_form_app.forms.base_form_class import * from account_app.models import * from website.exc...
def delete_user(self): """Function to delete user""" return_var = False
<|file_name|>Header.js<|end_file_name|><|fim▁begin|>import React, {PropTypes} from 'react'; import { Link, IndexLink } from 'react-router'; // import {Navbar, Nav, NavItem, NavDropdown, MenuItem} from 'react-bootstrap'; class Header extends React.Component { constructor(props) { super(props); } render() { ...
<|file_name|>protocol.py<|end_file_name|><|fim▁begin|># Copyright (C) 2005-2010 MISG/ICTI/EIA-FR # See LICENSE for details. """ Factories for AMQ clients, Thrift clients and SMAC Clients and servers. @author: Jonathan Stoppani <jonathan.stoppani@edu.hefr.ch> """ import weakref from twisted.internet.protocol impor...
<|file_name|>square_free_string.py<|end_file_name|><|fim▁begin|>class SquareFreeString: def isSquareFree(self, s): for i in range(0, len(s)): for length in range(1, len(s)):<|fim▁hole|> if second == first: return "not square-free" return "square-free"<...
first = s[i:length + i] second = s[i+length:i+length+length]
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2013 University of Maryland. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE.TXT file. import os from framework.Targets import ApacheTarget class Target(ApacheTarget): def get_...
name = "eXtplorer 2.1"