prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test_distance_clark.py<|end_file_name|><|fim▁begin|># Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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...
# GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Abydos. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>VertexShaderAssetData.hpp<|end_file_name|><|fim▁begin|>//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2022 Ryo Suzuki // Copyright (c) 2016-2022 OpenSiv3D Project // // Licensed under the MIT License. // //---------------------------...
# include "Asset.hpp" # include "ShaderCommon.hpp" # include "VertexShader.hpp"
<|file_name|>PrintSession.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006-2010 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Softw...
public static final int DefaultEntryCount = 20;
<|file_name|>backendtest.go<|end_file_name|><|fim▁begin|>// -*- Mode: Go; indent-tabs-mode: t -*- /* * Copyright (C) 2016-2017 Canonical Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software...
hooks: configure: plugs: [plug]
<|file_name|>DeleteWaterLog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################### # # DeleteWaterLog # Deletes a specified water log entry. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache L...
""" Set the value of the AccessToken input for this Choreo. ((required, string) The Access Token retrieved during the OAuth process.) """ super(DeleteWaterLogInputSet, self)._set_input('AccessToken', value)
<|file_name|>proxier.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 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://www.apache.org/licenses/LICENSE-2....
} func NewProxier(loadBalancer LoadBalancer) *Proxier { return &Proxier{loadBalancer: loadBalancer, serviceMap: make(map[string]int)}
<|file_name|>issue-filter.pipe.ts<|end_file_name|><|fim▁begin|>import { Pipe, PipeTransform } from '@angular/core'; import { Issue } from './issue'; @Pipe({ name: 'issueFilter' }) export class IssueFilterPipe implements PipeTransform { transform(value: Issue[], filterBy: string): Issue[] { filterBy = filterBy...
}
<|file_name|>vtm.py<|end_file_name|><|fim▁begin|>''' Created on Oct 21, 2011 @author: bolme ''' import time from collections import defaultdict import cProfile import traceback import shelve class EmptyData(object): def __str__(self): return "<MissingData>" class DefaultData(object): def __init__(s...
<|file_name|>fdb_pem_mogc.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2015-TODAY LasLabs Inc. # License MIT (https://opensource.org/licenses/MIT). from carepoint import Carepoint from sqlalchemy import (Column, Integer, Boolean, ...
<|file_name|>lrf_output.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import sys, os from calibre...
self.ignore_tables = opts.linearize_tables if opts.disable_font_rescaling:
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>use libc::{c_int, c_uint, c_void}; <|fim▁hole|>pub type GLenum = c_uint; pub type GLvoid = c_void;<|fim▁end|>
pub type GLint = c_int; pub type GLsizei = c_int;
<|file_name|>associated-types-binding-in-where-clause.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...
impl Foo for char { type A = Bar;
<|file_name|>regress-424311.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); yo...
{ enterFunc ('test'); printBugNumber(BUGNUMBER);
<|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/. */ //! This module contains traits in script used generically in the...
/// Describes the task that requested the TimerEvent. #[derive(Copy, Clone, HeapSizeOf)]
<|file_name|>cursor.go<|end_file_name|><|fim▁begin|>package kintone import ( "encoding/json" ) //Object Cursor structure type Cursor struct { Id string `json:"id"` TotalCount string `json:"totalCount"` } type GetRecordsCursorResponse struct { Records []*Record `json:"records"` Next bool `json:"ne...
//decodeCursor decodes JSON response for cursor api func decodeCursor(b []byte) (c *Cursor, err error) {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup setup( name='dramatis', version='0.1.1', author='Steven Parkes', author_email='smparkes@smparkes.net', url='http://dramatis.mischance.net', description="an actor library for ruby and python", pa...
)
<|file_name|>molutil.py<|end_file_name|><|fim▁begin|># # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2017 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is f...
<|file_name|>c1.rs<|end_file_name|><|fim▁begin|>extern crate cryptopals; use std::io; use cryptopals::util::{hex_string_to_base64}; <|fim▁hole|>fn main() { let mut hex = String::new(); io::stdin().read_line(&mut hex) .ok() .expect("Failed to read hex input"); println!("Hex: {}", hex); ...
#[cfg_attr(test, allow(dead_code))]
<|file_name|>AccessRecord.java<|end_file_name|><|fim▁begin|>package org.sagebionetworks.dashboard.model; public interface AccessRecord extends Record{ String getSessionId(); String getUserId(); String getObjectId();<|fim▁hole|> String getQueryString(); String getStatus(); Long getLatency(); ...
String getMethod(); String getUri();
<|file_name|>test_searchdialogbase.py<|end_file_name|><|fim▁begin|>'''Unittests for idlelib/SearchDialogBase.py Coverage: 99%. The only thing not covered is inconsequential -- testing skipping of suite when self.needwrapbutton is false. ''' import unittest from test.support import requires from tkinter import Tk, Top...
equal(label['text'], 'Test:') self.assertIn(entry.get(), 'hello')
<|file_name|>CleanMoviePrefix.py<|end_file_name|><|fim▁begin|># coding=gbk import os import re import string def isMov(filename): # ÅжÏÊÇ·ñΪµçÓ°Îļþ suffix = filename.split('.')[-1].lower() # ÌáÈ¡ºó׺ pattern = re.compile(r'mpg|mpeg|m2v|mkv|dat|vob|avi|wmv|rm|ram|rmvb|mov|avi|mp4|qt|viv') if pat...
os.rename(fp,fp[1:]) if cnt==1: print 'ûÓÐÐèÒª´¦ÀíµÄµçÓ°Îļþ'
<|file_name|>draw.py<|end_file_name|><|fim▁begin|>import random, math import gimp_be #from gimp_be.utils.quick import qL from gimp_be.image.layer import editLayerMask from effects import mirror import numpy as np import UndrawnTurtle as turtle def brushSize(size=-1): """" Set brush size """ image = gim...
for row in range(0,grid[0]): for columb in range(0,grid[1]): tile_centers.append([row_width*row+row_width/2,columb_height*columb+columb_height/2])
<|file_name|>dht22_pt.rs<|end_file_name|><|fim▁begin|>// Zinc, the bare metal stack for rust. // Copyright 2014 Vladimir "farcaller" Pouzanov <farcaller@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 ...
let typename = format!("zinc::drivers::dht22::DHT22");
<|file_name|>Regex.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf8 # (c) 2014 Dominic Springer # File licensed under GNU GPL (see HARP_License.txt) import re import numpy as np #look for: import re, re.search # HOW TO ================================== # 1) Paste line to https://pythex.org/ # 2...
def get_DimX_DimY_from_Filename(FN): #==========================================
<|file_name|>settings.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from ut_arena.settings import *
<|file_name|>db_fakes.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cloudbase Solutions Srl # # 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 Lice...
if 'instance_type' not in values: return
<|file_name|>volumes.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 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/licenses/LICENSE-2.0 Unless required b...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// needed for returning Iterator traits #![feature(conservative_impl_trait)] // needed for some Option methods (note: on track for stabilization) //#![feature(option_entry)] extern crate digest; extern crate jagged_array; extern crate llvm; extern crate llvm_sys; #[macr...
pub mod client; pub mod dispatch;
<|file_name|>test_networks.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # a hack for pytest to allow imports if __package__ is None: import sys import os.path sys.path[0:0] = [ os.path.dirname( # project_root os.path.dirname( # tests ...
@pytest.mark.parametrize("input_", ( "HELLO:123.123.123.123-123.123.123.255", "EVIL HACKER:150.250.250.250-150.251.250.250",
<|file_name|>config.py<|end_file_name|><|fim▁begin|>#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import imp from flask.config import ConfigAttribute, Config as ConfigBase # noqa class Config(ConfigBase): "Co...
<|file_name|>fake_adapter.rs<|end_file_name|><|fim▁begin|>//! An adapter to a non-existing device, whose state is entirely controlled programmatically. //! Used for testing. use adapter::*; use api::{ Error, User }; use selector::*; use services::*; use values::*; use transformable_channels::mpsc::*; use std::cell::...
fn version(&self) -> &[u32;4] {
<|file_name|>p017.rs<|end_file_name|><|fim▁begin|>use solutions::Solution; pub fn solve() -> Solution { let mut sum = 0; for n in 1..1001 { sum += wordify(n).len(); } Solution::new(&format!("{}", sum)) } /// Turns the given number (in the range [1,1000]) into a string with no spaces or dashes ...
s += numbers[n % 10]; n /= 10; s = tens[n % 10].to_string() + &s; n /= 10;
<|file_name|>core.js<|end_file_name|><|fim▁begin|>// setToken when re-connecting var originalReconnect = Meteor.connection.onReconnect; Meteor.connection.onReconnect = function() { setToken(); if(originalReconnect) { originalReconnect(); } }; if(Meteor.status().connected) { setToken(); } function setToken...
});
<|file_name|>permission.component.ts<|end_file_name|><|fim▁begin|>import { Component ,OnInit} from '@angular/core'; import {GlobalService} from '../_globals/global.service'; import {PermissionService} from './permission.service'; import {ContentTypeService} from '../content_types/content_type.service'; import {Permiss...
this.permissionService.edit(this.selectedPermission).subscribe( response=>(this.globalService.hideModal("#editPermissionModal"),this.globalService.displayResponseMessage(response)),//success error=>(this.globalService.displayResponseMessage(error)),//failure
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "flag" ) var BASE_SIZE = 10 var AUTO_SPAWN = true var EXIF_DIR = "./exif_tool/exiftool" var TEMP_DIR = "./temp" func main() { port := flag.String("port", "9999", "Enter a server port number") root_dir := flag.String("root", "/", "Enter defaul...
BASE_SIZE = *max_procs AUTO_SPAWN = *auto_spawn EXIF_DIR = *exif_dir
<|file_name|>data-set.js<|end_file_name|><|fim▁begin|>'use strict'; /** * data-set module * @module data-set * @see module:index */ const _ = require('lodash'); const try2get = require('try2get'); const Connector = require('../connector/base'); const util = require('../util/index'); function isValidDataSet(dataSet...
connectors.sort((a, b) => (b.priority - a.priority));
<|file_name|>TextGetOneCommand.java<|end_file_name|><|fim▁begin|>/** * Copyright [2009-2010] [dennis zhuang(killme2008@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://www.ap...
}
<|file_name|>audit_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unl...
f, err := ioutil.TempFile("", "k8s_audit_policy_test_") require.NoError(t, err, "creating temp file") require.NoError(t, stdjson.NewEncoder(f).Encode(pol), "writing policy file") require.NoError(t, f.Close())
<|file_name|>tweet.rs<|end_file_name|><|fim▁begin|>#![warn( bad_style, unused, unused_extern_crates, unused_import_braces, unused_qualifications, unused_results )] use color_eyre::{ eyre::{bail, eyre, Error, Result, WrapErr as _}, owo_colors::OwoColorize as _, }; use oauth_client::Token...
let conf_path = conf_file::path()?;
<|file_name|>shield.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Shield" prefix = "shield" class Action(BaseAction): def __init...
<|file_name|>test_fragments.py<|end_file_name|><|fim▁begin|># -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contri...
bonds.append((1 + base, 2 + base)) bonds.append((2 + base, 3 + base)) bonds.append((3 + base, 4 + base))
<|file_name|>predict.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd import tensorflow as tf import scipy.misc from keras.utils import plot_model from keras.preprocessing.image import ImageDataGenerator from keras.models import Model, Sequential from keras.layers import Input, Dropout, Activatio...
model.load_weights('v2.h5') model.compile(loss='mean_squared_error', optimizer=RMSprop())
<|file_name|>drop.go<|end_file_name|><|fim▁begin|>package sol import ( "fmt" "github.com/aodin/sol/dialect" ) // DropStmt is the internal representation of an DROP TABLE statement. type DropStmt struct { table *TableElem ifExists bool } // IfExists adds the IF EXISTS modifier to a DROP TABLE statement. func ...
return c
<|file_name|>snapshot.js<|end_file_name|><|fim▁begin|>/* * Snapshot multiple pages using arrays. * * Use an array to snapshot specific urls. * Use per-page selectors. * Use per-page output paths. * Remove all script tags from output. * Use javascript arrays. */ var path = require("path"); var util = require("u...
} ]; htmlSnapshots.run({
<|file_name|>response.js<|end_file_name|><|fim▁begin|>'use strict'; var util = require('util'), Transform = require('stream').Transform, Response = require('../response'); function ResponseStream (multiline) { this.multiline = multiline || false; var response; this._transform = function (chunk, encodin...
this._flush = function (callback) { this.push(response);
<|file_name|>view.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
<|file_name|>grid_layer.hpp<|end_file_name|><|fim▁begin|>/* * This file is part of rpgmapper. * See the LICENSE file for the software license. * (C) Copyright 2018-2019, Oliver Maurhart, dyle71@gmail.com */ #ifndef RPGMAPPER_MODEL_LAYER_GRID_LAYER_HPP #define RPGMAPPER_MODEL_LAYER_GRID_LAYER_HPP #include <QColor>...
/** * Draws the grid onto the map. *
<|file_name|>temporal_memory_test_machine.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this ...
<|file_name|>XnModuleLoader.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************** * * * OpenNI 1.x Alpha * * Copyright (C) 2012 ...
xnLogWarning(XN_MASK_MODULE_LOADER, "Production Node does not have the %s function!", \ XN_STRINGIFY(func)); \
<|file_name|>004-fullscreen.js<|end_file_name|><|fim▁begin|>/** * @name jQuery FullScreen Plugin * @author Martin Angelov * @version 1.0 * @url http://tutorialzine.com/2012/02/enhance-your-website-fullscreen-api/ * @license MIT License */ (function($){ // Adding a new test to the jQuery support object ...
else if (elem.webkitRequestFullScreen) { elem.webkitRequestFullScreen(); } }
<|file_name|>regress-474935.js<|end_file_name|><|fim▁begin|>/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */<|fim▁hole|> * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //----------------------------------------------------------------------------- var BUGNUMBER = 474935; var summary = 'Do not ass...
/* 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_name|>MTNEIConfig.java<|end_file_name|><|fim▁begin|>package maritech.nei; import mariculture.core.lib.Modules; import mariculture.factory.Factory; import net.minecraft.item.ItemStack; import net.minecraftforge.oredict.OreDictionary; import codechicken.nei.api.API; import codechicken.nei.api.IConfigureNEI; publ...
public String getName() {
<|file_name|>pair_lj_charmm_coul_long_omp.cpp<|end_file_name|><|fim▁begin|>/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov T...
#include "suffix.h" using namespace LAMMPS_NS;
<|file_name|>AtomicFormula.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2005, Regents of the University of California * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redis...
* the documentation and/or other materials provided with the * distribution.
<|file_name|>main.py<|end_file_name|><|fim▁begin|># coding: utf-8 #import pygame from Tkinter import * import ttk import time from PIL import ImageTk,Image from functools import partial import os import tkMessageBox from urllib2 import * from threading import Thread import urllib as u from window import * ###########...
{"buton":"IP location",
<|file_name|>GeolocationModule.java<|end_file_name|><|fim▁begin|>/** * Appcelerator Titanium Mobile * Copyright (c) 2009-2016 by Appcelerator, Inc. All Rights Reserved. * Licensed under the terms of the Apache Public License * Please see the LICENSE included with this distribution for details. */ package ti.module...
* @param callback Javascript function that will be invoked with the address * for the specified latitude and longitude if available
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <sstream> #include <vector> #include <cmath> #include <reader.hpp> #include <writer.hpp> using namespace std; using namespace jam; struct JoinK { JoinK(vector<vector<char>>&& input, int kIn) : g(input), k(kIn) { n = g.size(); } ...
ss >> numCases;
<|file_name|>parseBBC-Leagues.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Created on Jul 04, 2016 Modified on Aug 05, 2016 Version 0.01.b @author: rainier.madruga@gmail.com A simple Python Program to scrape the ESPN FC website for content. ### ============================================================...
response = requests.get(imageURL) if response.status_code == 200: print ('Downloading %s...' % (localFileName))
<|file_name|>templateStringInModuloES6.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// @target: ES6 var x = 1 % `abc${ 1 }def`;
<|file_name|>install.go<|end_file_name|><|fim▁begin|>package main import (<|fim▁hole|> "github.com/flynn/go-docopt" ) func init() { register("install", runInstaller, `usage: flynn install`) } func runInstaller(args *docopt.Args) error { fmt.Printf("DEPRECATED: `flynn install` has been deprecated.\nRefer to https:/...
"fmt"
<|file_name|>utils_disk.py<|end_file_name|><|fim▁begin|>""" Virtualization test - Virtual disk related utility functions :copyright: Red Hat Inc. """ import os import glob import shutil import stat import tempfile import logging import re try: import configparser as ConfigParser except ImportError: import Conf...
self.mount = tempfile.mkdtemp(prefix='cdrom_unattended_', dir=tmpdir)
<|file_name|>0023_upload_unique_random_filename.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-02-16 17:16 from __future__ import unicode_literals import base.utils from django.db import migrations, models class Migration(migrations.Migration):<|fim▁hole|> dependenci...
<|file_name|>_35_help_about.py<|end_file_name|><|fim▁begin|># The name of the dashboard to be added to HORIZON['dashboards']. Required. DASHBOARD = 'help_about' DISABLED = False # A list of applications to be added to INSTALLED_APPS.<|fim▁hole|> 'openstack_dashboard.dashboards.help_about', ]<|fim▁end|>
ADD_INSTALLED_APPS = [
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django.forms import ModelForm from .models import PakistaniPlace class PakistaniPlaceForm(ModelForm): """ Form for storing a Pakistani place. """<|fim▁hole|> 'phone', 'name')<|fim▁end|>
class Meta: model = PakistaniPlace fields = ('state', 'state_required', 'state_default', 'postcode', 'postcode_required', 'postcode_default',
<|file_name|>mainIndex.py<|end_file_name|><|fim▁begin|># coding: utf-8 '''<|fim▁hole|> @author: PC06 ''' from include import app from flask.templating import render_template from ec.edu.itsae.dao import PersonaDAO @app.route("/") def login(): return render_template("login.html") @app.route("/persona") def index()...
Created on 17/2/2015
<|file_name|>script.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ 将json文件中的数据存到数据库中 """ import requests import json import os from word.models import (Word, EnDefinition, CnDefinition, Audio, Pronunciation, Example, Note) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) prin...
if response.ok: # Something went wrong for block in response.iter_content(1024):
<|file_name|>production.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Production Configurations - Use Redis for cache """ from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat from django.utils import six from .common import * # noqa # SECRET...
CSRF_COOKIE_SECURE = True
<|file_name|>xor.cc<|end_file_name|><|fim▁begin|>#include <iostream> #include "Net.h" #include "InputLayer.h" #include "ForwardLayer.h" #include "RecurrentLayer.h" using namespace std; <|fim▁hole|> Net net; net.add_layer(new InputLayer(2)); net.add_layer(new ForwardLayer(3)); net.add_layer(new Forward...
int main() { // arma::arma_rng::set_seed(100); arma::arma_rng::set_seed_random();
<|file_name|>test.py<|end_file_name|><|fim▁begin|># ------------------------------------------------------------------------------------------------- # Rick, a Rust intercal compiler. Save your souls! # # Copyright (c) 2015-2021 Georg Brandl # # This program is free software; you can redistribute it and/or modify it u...
print('*** WARNING: found %s.chk, but not %s' % (testname, testcode))
<|file_name|>koenig-menu-content.js<|end_file_name|><|fim▁begin|>import Component from '@glimmer/component'; import {action} from '@ember/object'; export default class KoenigMenuContentComponent extends Component { @action<|fim▁hole|> element.scrollIntoView({ behavior: 'smooth', ...
scrollIntoView(element, [doScroll]) { if (doScroll) {
<|file_name|>odeint.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) import copy from ..util import import_<|fim▁hole|>from ._base import _NativeCodeBase, _NativeSysBase, _compile_kwargs pyodeint = import_('pyodeint') class NativeOdeintCode(...
<|file_name|>solarAdd.py<|end_file_name|><|fim▁begin|>from omf import feeder import omf.solvers.gridlabd feed = feeder.parse('GC-12.47-1.glm') maxKey = feeder.getMaxKey(feed) print(feed[1]) feed[maxKey + 1] = { 'object': 'node', 'name': 'test_solar_node', 'phases': 'ABCN', 'nominal_voltage': '7200' } feed[maxKey +...
''' output = open('GC-solarAdd.glm', 'w')
<|file_name|>ImportOCAFAssembly.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright (c) 2013 Werner Mayer <wmayer[at]users.sourceforge.net> * * * * This file is part o...
<|file_name|>renderer.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2016-2018 Bruce Stenning. 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. Redistributions of source code must re...
object.render_thread(renderer_arc.clone(), threaddata_arc);
<|file_name|>extE3.d.ts<|end_file_name|><|fim▁begin|>/** * @hidden * @param a0 * @param a1 * @param a2 * @param a3 * @param a4 * @param a5 * @param a6 * @param a7 * @param b0 * @param b1 * @param b2 * @param b3 * @param b4<|fim▁hole|> * @param index * @returns */ export declare function extE3(a0: number...
* @param b5 * @param b6 * @param b7
<|file_name|>image.rs<|end_file_name|><|fim▁begin|>// // // use geom::{Rect,Px}; use surface::Colour; pub enum Align { Left, Center, Right, } //enum Tile { // None, // Stretch, // Repeat, //} /// Static image wrapper pub struct Image<T: Buffer> { has_changed: ::std::cell::Cell<bool>, align_v: Align, align_h: A...
}}
<|file_name|>function_table.hpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2009 - 2012 by Bartosz Waresiak <dragonking@o2.pl> Part of the Battle for Wesnoth Project http://www.wesnoth.org/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public L...
expression_ptr create_function(const std::string& fn,
<|file_name|>test_workflow_export_csv.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Tests for workflow object exports.""" from os.path import abspath, dirname, join from flask.json import dumps from ggrc.app import a...
"ids": ["2"],
<|file_name|>_transform.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 the Apac...
if i < ngap: out[i] = data[i] else:
<|file_name|>CampaignFeedServiceInterface.java<|end_file_name|><|fim▁begin|>package com.google.api.ads.adwords.jaxws.v201406.cm; import java.util.List; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso;<|fim▁hole|...
import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper;
<|file_name|>ParticipantStats.java<|end_file_name|><|fim▁begin|>package com.mingweisamuel.zyra.matchV4; import com.google.common.base.Objects; import java.io.Serializable; import java.lang.Object; import java.lang.Override; /** * ParticipantStats.<br><br> * * This class was automatically generated from the <a href...
&& Objects.equal(pentaKills, other.pentaKills) && Objects.equal(perk0, other.perk0)
<|file_name|>db.py<|end_file_name|><|fim▁begin|>"""Database interface module. app/db.py """ # standard imports import os import sqlite3 from sqlite3 import Error from ast import literal_eval # 3rd party imports from termcolor import cprint # local imports from app.room import Office, Living from app.person import St...
records = cur.fetchall() for record in records: dictstaff[record[1]] = Staff(record[1], record[0], record[3])
<|file_name|>simple_test.rs<|end_file_name|><|fim▁begin|>extern crate rustorm; extern crate uuid; extern crate chrono; extern crate rustc_serialize; use uuid::Uuid; use rustorm::query::Query; use rustorm::query::Equality; use rustorm::dao::{Dao, IsDao}; use rustorm::pool::ManagedPool; use rustorm::table::{IsTable, T...
println!("{} {} {:?}", prod.product_id, prod.name.unwrap(), prod.description);
<|file_name|>arc.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/licenses/LI...
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from coveragit.application.console import Application <|fim▁hole|><|fim▁end|>
if __name__ == "__main__": Application().run()
<|file_name|>test_adapter.py<|end_file_name|><|fim▁begin|># (C) British Crown Copyright 2012 - 2013, Met Office # # This file is part of Biggus. # # Biggus is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation...
slice(None, 15))], (2, 3, 15, 40)], # Boolean indexing [(3, 4), [np.array([0, 1, 0], dtype=bool)], (1, 4)],
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import decimal try: import thread except ImportError: import dummy_thread as thread from threading import local from django.conf import settings from django.db import DEFAULT_DB_ALIAS from django.db.backends import util from django.db.transaction import Tra...
<|file_name|>shootout-fasta-redux.rs<|end_file_name|><|fim▁begin|>// The Computer Language Benchmarks Game<|fim▁hole|>// Copyright (c) 2013-2014 The Rust Project Developers // // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that th...
// http://benchmarksgame.alioth.debian.org/ // // contributed by the Rust Project Developers
<|file_name|>xgi_app.cc<|end_file_name|><|fim▁begin|>/** ****************************************************************************** * Xenia : Xbox 360 Emulator Research Project * ****************************************************************************** * Copyright 2021 Ben V...
uint32_t user_xuid = xe::load_and_swap<uint32_t>(buffer + 0x10); uint32_t session_info_ptr = xe::load_and_swap<uint32_t>(buffer + 0x14); uint32_t nonce_ptr = xe::load_and_swap<uint32_t>(buffer + 0x18);
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> Model: require('./model') };<|fim▁end|>
module.exports = {
<|file_name|>retrieve-room-by-sid.3.x.js<|end_file_name|><|fim▁begin|>// NOTE: This example uses the next generation Twilio helper library - for more // information on how to download and install this version, visit<|fim▁hole|>const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; const apiKeySecret = 'your_api_key_se...
// https://www.twilio.com/docs/libraries/node
<|file_name|>bitcoin-tx.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include "config/bitcoin-config.h" #endif...
if (argc < 2) { fprintf(stderr, "Error: too few parameters\n");
<|file_name|>CapEntry.cc<|end_file_name|><|fim▁begin|>/* -*- mode:C++; -*- */ /* MIT License -- MyThOS: The Many-Threads Operating System * * 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...
#include "objects/mlog.hh" #include "util/error-trace.hh" namespace mythos {
<|file_name|>taxa.go<|end_file_name|><|fim▁begin|>package ncbiutils import ( "bufio" "bytes" "io" "os" "path/filepath" "strings" ) var GCTABLES map[string]*GeneticCode type Taxa struct { Id string // node id in GenBank taxonomy database Name string // the unique variant ...
MitochondrialGC: gencodes[mgcid],
<|file_name|>oauth.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of scoopy. # # Scoopy 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 Licens...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2013-2015 Sandstorm Development Group, Inc. and contributors // Licensed under the 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...
//
<|file_name|>Game.java<|end_file_name|><|fim▁begin|>package org.squirrel; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.Timer; import org.squirrel.managers.Pr...
public Game(){ setFocusable(true); gameLoop = new Timer(10, this);
<|file_name|>sblim_sfcb.py<|end_file_name|><|fim▁begin|>#!/bin/python import os, subprocess import logging from autotest.client import test from autotest.client.shared import error, software_manager sm = software_manager.SoftwareManager() class sblim_sfcb(test.test): """ Autotest module for testing basic fun...
ret_val.communicate() if ret_val.returncode != 0: self.nfail += 1 logging.info('\n Test initialize successfully')
<|file_name|>FullSolveMultiApp.C<|end_file_name|><|fim▁begin|><|fim▁hole|>//* https://github.com/idaholab/moose/blob/master/COPYRIGHT //* //* Licensed under LGPL 2.1, please see LICENSE for details //* https://www.gnu.org/licenses/lgpl-2.1.html #include "FullSolveMultiApp.h" #include "LayeredSideFluxAverage.h" #includ...
//* This file is part of the MOOSE framework //* https://www.mooseframework.org //* //* All rights reserved, see COPYRIGHT for full restrictions
<|file_name|>RowAlign.ts<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2014-2015, Egret Technology Inc. // All rights reserved.<|fim▁hole|>// * Redistributions of source code must retain the above copyright // notice, ...
// Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: //