prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>test_amino_acids.py<|end_file_name|><|fim▁begin|>from nose.tools import eq_<|fim▁hole|> canonical_amino_acids, canonical_amino_acid_letters, extended_amino_acids, extended_amino_acid_letters, ) def test_canonical_amino_acids(): assert len(canonical_amino_acids) == 20 def test_canonical...
from pepdata.amino_acid_alphabet import (
<|file_name|>blogger-gen.go<|end_file_name|><|fim▁begin|>// Package blogger provides access to the Blogger API. // // See https://developers.google.com/blogger/docs/3.0/getting_started // // Usage example: // // import "code.google.com/p/google-api-go-client/blogger/v3" // ... // bloggerService, err := blogger.Ne...
<|file_name|>canonize.js<|end_file_name|><|fim▁begin|>var urls = [ "https://vk.com/igor.suvorov", "https://twitter.com/suvorovigor", "https://telegram.me/skillbranch", "@skillbranch", "https://vk.com/skillbranch?w=wall-117903599_1076",]; function getName(url) { const reg = /(@|\/)?[\w\9.]+/ig; const reg1 = /[\w\9....
export default function canonize(url) {
<|file_name|>launch.js<|end_file_name|><|fim▁begin|>require.config({ baseUrl: 'vendor', waitSeconds: 10, paths: { core: '../core', lang: '../lang', root: '..' }, shim: { 'backbone': { deps: ['underscore', 'jquery'], exports: 'Backbone' },...
//Can't use Utils.log here : log messages by hand :
<|file_name|>basic_types.hpp<|end_file_name|><|fim▁begin|>// basic_types.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Copyright 2015 Andrey Semashev // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LIC...
#else // defined( BOOST_USE_WINDOWS_H )
<|file_name|>SolverResult.hpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2021 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or m...
<|file_name|>nginx.go<|end_file_name|><|fim▁begin|>package mpnginx import ( "bufio" "flag" "fmt" "io" "errors" "net/http" "regexp" "strconv" "strings" mp "github.com/mackerelio/go-mackerel-plugin-helper" ) var graphdef = map[string]mp.Graphs{ "nginx.connections": { Label: "Nginx Connections", Unit: ...
<|file_name|>caching.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from fam.buffer import buffered_db cache = buffered_db
<|file_name|>counters.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> ...
content.push(ContentItem::String(value.as_ref().to_owned())) } Ok(Token::Function(ref name)) => { let result = match_ignore_ascii_case! { &name,
<|file_name|>uses_inline_crate.rs<|end_file_name|><|fim▁begin|>#![allow(unused_assignments, unused_variables)] // compile-flags: -C opt-level=3 # validates coverage now works with optimizations extern crate used_inline_crate; fn main() { used_inline_crate::used_function(); used_inline_crate::used_inline_func...
}
<|file_name|>client_test.go<|end_file_name|><|fim▁begin|>package nats import ( "nats/test" "net" "sync" "testing" ) type testClient struct { *testing.T // Test client c *Client // Channel to receive the return value of cl() ec chan error // Channel to pass client side of the connection to Dialer ncc cha...
if ok { t.Error("Expected failure") }
<|file_name|>sysw32fs.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2003-2013 Runtime Revolution Ltd. This file is part of LiveCode. LiveCode is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v3 as published by the Free Software Foundation. LiveCode is d...
{
<|file_name|>pyext.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ use std::slice; use cpython::PyBytes; use cpython::PyModule; use cpython::PyObject; use...
let buf = self.nodemap(py).build_incrementally().map_pyerr(py)?; let slice = unsafe { slice::from_raw_parts(buf.as_ptr() as *const u8, buf.len() * 4) };
<|file_name|>SunshineNewPostsList.tsx<|end_file_name|><|fim▁begin|>import { Components, registerComponent } from '../../lib/vulcan-lib'; import { useMulti } from '../../lib/crud/withMulti'; import React from 'react'; import { userCanDo } from '../../lib/vulcan-users/permissions'; import { useCurrentUser } from '../comm...
)} </div>
<|file_name|>quaternion.rs<|end_file_name|><|fim▁begin|>// Anima Engine. The quirky game engine // Copyright (C) 2016 Dragoș Tiselice // // 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://mo...
/// ``` pub fn dot(&self, other: Quaternion) -> f32 { self.x * other.x +
<|file_name|>notestyle.py<|end_file_name|><|fim▁begin|>from gi.repository import Gtk, Gdk,GObject,Pango import commands import time import sys,os import threading import sqlite3 from config_note import Config config_note = Config() path = "/usr/share/gnome-shell/extensions/turbonote@iksws.com.br/turbonote-adds/" path_...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import httplib import logging from error import HapiError <|fim▁hole|> pass def get_log(name): logger = logging.getLogger(name) logger.addHandler(NullHandler()) return logger<|fim▁end|>
class NullHandler(logging.Handler): def emit(self, record):
<|file_name|>fb_oauth.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """Facebook OAuth interface.""" # System imports import json import logging try: from urllib import quote_plus except ImportError: from urllib.parse import quote_plus import oauth2 as oauth<|fim▁hole|># Project...
from django.conf import settings
<|file_name|>AircraftStateFilter.cpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2011 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and...
y += vec.Bearing.cos() * vec.Distance; v_x = x_low_pass.update(x_diff_filter.update(x));
<|file_name|>Go.java<|end_file_name|><|fim▁begin|>package com.planet_ink.coffee_mud.Commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.pla...
<|file_name|>AgeDetectedIssueCode.java<|end_file_name|><|fim▁begin|>package org.hl7.v3; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>AgeDetectedIssueCodeのJavaクラス。 * * <p>次のスキーマ・フラグメントは、このクラス内に含まれる予期されるコンテンツを指定します。 * <p> * <pre> * &lt;simpleType name=...
@XmlType(name = "AgeDetectedIssueCode") @XmlEnum
<|file_name|>exampleLoaderTemplate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'exampleLoaderTemplate.ui' # # Created: Sat Dec 17 23:46:27 2011 # by: PyQt4 UI code generator 4.8.3 # # WARNING! All changes made in this file will be lost! from PyQt4 ...
self.gridLayout.setSpacing(0) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) self.splitter = QtGui.QSplitter(Form) self.splitter.setOrientation(QtCore.Qt.Horizontal)
<|file_name|>regex_debug.cpp<|end_file_name|><|fim▁begin|>/* * * Copyright (c) 1998-2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCA...
std::cout << "\n\n"; print_separator(); std::cout << "Regex library build configuration:\n\n"; regex_lib_main2();
<|file_name|>deltaApp.py<|end_file_name|><|fim▁begin|>from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.properties import ObjectProperty from kivy.uix.tabbedpanel import TabbedPanel from kivy.uix.widget import Widget from kivy.clock import Clock import os import dynamixel import sys import sub...
ultimoCodigo.close() #########################################aqui ha de venir el movimiento de bolitas!!!! self.robot.quitar_bolitas(codigo, self.nuevas)
<|file_name|>string.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...
#[stable(feature = "rust1", since = "1.0.0")] pub trait ToString {
<|file_name|>MonolithApplication.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017 the original author or 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://w...
import java.math.BigDecimal; import org.springframework.boot.CommandLineRunner;
<|file_name|>EffectChams.cpp<|end_file_name|><|fim▁begin|>/* * EffectChams.cpp * * Created on: Apr 16, 2017 * Author: nullifiedcat */ #include <visual/EffectChams.hpp> #include <MiscTemporary.hpp> #include <settings/Bool.hpp> #include "common.hpp" #include "Backtrack.hpp" namespace effect_chams { static se...
return false;
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Pngwriter(CMakePackage): """PNGwriter...
<|file_name|>problema2crocha.py<|end_file_name|><|fim▁begin|>#Hecho en python 3.5 from gutenberg.acquire import load_etext from gutenberg.cleanup import strip_headers librosCodigo = {"Francés":[13735,13808],"Español":[24925,15027],"Portugés":[14904,16384],"Inglés":[10422,1013]} dic_idiomas={} #hola dos for idioma in ...
<|file_name|>FileSystemCommandOptions.java<|end_file_name|><|fim▁begin|>/* * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0 * (the "License"). You may not use this work except in compliance with the License, which is * available at www.apache.org/licenses/LICENSE-2.0 * * This ...
public void setPersistOptions(PersistCommandOptions persistCommandOptions) { mPersistCommandOptions = persistCommandOptions;
<|file_name|>spellcheck_ui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'spellcheck.ui' # # Created: Thu Jul 30 01:27:24 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtG...
self.gridLayout_3.setSpacing(4) self.gridLayout_3.setContentsMargins(4, 0, 4, 0)
<|file_name|>test_data_root.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope tha...
def setUp(self): self.setUpEndpoint() self.master.data.rootLinks = [
<|file_name|>changepassword.spec.js<|end_file_name|><|fim▁begin|>'use strict'; describe('E2E testing: Change password', function () { var constants = require('../../../testConstants'); var loginPage = require('../../pages/loginPage'); var header = require('../../pages/pageHeader'); var cha...
<|file_name|>htmltextareaelement.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 dom::attr::Attr; use dom::bindings::cell::Dom...
unsafe { (*self.upcast::<Element>().unsafe_get()) .get_attr_for_layout(&ns!(), &local_name!("rows")) .map_or(DEFAULT_ROWS, AttrValue::as_uint)
<|file_name|>joexx_traits.t.cpp<|end_file_name|><|fim▁begin|>// ---------------------------------------------------------------------------- // Copyright (C) 2014 Bloomberg Finance L.P. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation fi...
<|file_name|>appflowcollector.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2008-2015 Citrix Systems, 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...
raise e @name.setter def name(self, name) :
<|file_name|>electron-publish.d.ts<|end_file_name|><|fim▁begin|>declare module "electron-publish/out/multiProgress" { export class MultiProgress { private readonly stream private cursor private totalLines private isLogListenerAdded private barCount createBar(format: string, options: any): a...
abstract upload(file: string, safeArtifactName?: string): Promise<any> protected createProgressBar(fileName: string, fileStat: Stats): ProgressBar | null protected createReadStreamAndProgressBar(file: string, fileStat: Stats, progressBar: ProgressBar | null, reject: (error: Error) => void): NodeJS.ReadableS...
<|file_name|>index_mut.rs<|end_file_name|><|fim▁begin|>#![feature(core)] extern crate core; #[cfg(test)] mod tests { use core::ops::Index; use core::ops::IndexMut; struct Pixel<T> {<|fim▁hole|> b: T } impl Index<usize> for Pixel<T> { type Output = T; fn index<'a>(&'a self, index: usize) -> &'a...
r: T, g: T,
<|file_name|>students.routing.ts<|end_file_name|><|fim▁begin|>import { Routes, RouterModule } from '@angular/router'; import { StudentsHomeComponent } from './index'; import { StudentsComponent } from './index'; import { StudentsProfileComponent } from './index'; import { StudentsSponsorLettersComponent } from './index...
path: 'students', component: StudentsComponent, canActivate: [CanActivateViaStudentAuthGuard], children: [
<|file_name|>Valeur_.java<|end_file_name|><|fim▁begin|>package com.github.cunvoas.iam.persistance.entity; import com.github.cunvoas.iam.persistance.entity.RessourceValeur; import javax.annotation.Generated; import javax.persistence.metamodel.ListAttribute; import javax.persistence.metamodel.SingularAttribute; import j...
public static volatile SingularAttribute<Valeur, Integer> id; public static volatile SingularAttribute<Valeur, String> valeur;
<|file_name|>explicit.py<|end_file_name|><|fim▁begin|>""" Sample a specific geometry or set of geometries. """ import numpy as np import nomad.core.glbl as glbl import nomad.core.trajectory as trajectory import nomad.core.log as log def set_initial_coords(wfn): """Takes initial position and momentum from geometry...
<|file_name|>xlib_window_system.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate log; extern crate libc; extern crate x11; extern crate wtftw_core; use std::borrow::ToOwned; use wtftw_core::config::GeneralConfig; use libc::{ c_char, c_uchar, c_int, c_uint, c_long, c_ulong }; use x11::xlib; use x11::xinerama;...
xlib::XSync(self.display, 0); while xlib::XCheckMaskEvent(self.display, 0x40, &mut event) != 0 { } } }
<|file_name|>angular-sanitize.js<|end_file_name|><|fim▁begin|>/** * @license AngularJS v1.5.9 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ (function(window, angular) {'use strict'; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Any commits to this file sh...
var blockElements = extend({}, optionalEndTagBlockElements, toMap('address,article,' +
<|file_name|>Parameters.go<|end_file_name|><|fim▁begin|>package HologramGo type Parameters struct { items []string values []string<|fim▁hole|><|fim▁end|>
}
<|file_name|>replication_helper_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Jan lehnardt <jan@apache.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Si...
if database in server: del server[database]
<|file_name|>HttpSession.java<|end_file_name|><|fim▁begin|>package jdt.mantis.appmanager; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpGet; import org.apache.http.c...
import java.io.IOException; import java.util.ArrayList;
<|file_name|>fvtk.py<|end_file_name|><|fim▁begin|>''' Fvtk module implements simple visualization functions using VTK. The main idea is the following: A window can have one or more renderers. A renderer can have none, one or more actors. Examples of actors are a sphere, line, point etc. You basically add actors in a r...
compositeFunction = vtk.vtkVolumeRayCastCompositeFunction()
<|file_name|>CloudProviderRegistry.ts<|end_file_name|><|fim▁begin|>/* tslint:disable: no-console */ import { cloneDeep, get, isNil, set } from 'lodash'; import { SETTINGS } from '../config/settings'; export interface ICloudProviderLogo { path: string; } export interface ICloudProviderConfig { name: string; log...
console.warn(`Cannot override "${key}" for provider "${cloudProvider}" (provider not registered)`); return; } set(this.providers.get(cloudProvider), key, overrideValue);
<|file_name|>heartbeats.go<|end_file_name|><|fim▁begin|>// // Copyright © 2011-2019 Guy M. Allard // // 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/...
} // End of for c.log("Heartbeat Receive Ends", time.Now()) return }
<|file_name|>query.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! Utilities for querying the layout, as needed by the layout ...
border_left_width: left_width, .. } = *fragment.style.get_border(); self.client_rect.origin.y = top_width.0.to_px();
<|file_name|>oaipmh.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2015 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this...
'identifier': './/dc:identifier', 'dateStamp': './/dct:modified',
<|file_name|>forms.py<|end_file_name|><|fim▁begin|><|fim▁hole|># This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from wtforms.fields import StringField from...
<|file_name|>rpn.rs<|end_file_name|><|fim▁begin|>//! Uses RPN expression extern crate rand; fn main() { use rand::Rng; use std::io::{self, Write}; let mut rng = rand::thread_rng(); let stdin = io::stdin(); let mut stdout = io::stdout(); // generating 4 numbers let choices: Vec<u32> = (0....
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from odoo import models, fields, api class fixing_issues_view(models.Model):<|fim▁hole|> _inherit = 'project.issue'<|fim▁end|>
<|file_name|>Sprite.java<|end_file_name|><|fim▁begin|>/* * ProGuard -- shrinking, optimization, obfuscation, and preverification * of Java bytecode. * * Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare * * This program is free software; you can redistribute it and/or modify it * under the terms o...
*/ package proguard.gui.splash;
<|file_name|>node_array.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Liu Dong <ddliuhb@gmail.com>. // Licensed under the MIT license. package flydb import ( "fmt" ) func NewArrayNode(v []interface{}) (*ArrayNode, error) { node := &ArrayNode { } if err := node.SetRaw(v); err != nil { ret...
}
<|file_name|>reset.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <plog/Log.h> #include "libaps2.h" #include "../C++/helpers.h" #include "../C++/optionparser.h" #include <concol.h> using std::cout; using std::endl; enum optionIndex { UNKNOWN, HELP, IP_ADDR, RESET_MODE, LOG_LEVEL }; const option::Des...
<|file_name|>test_sagemaker_base.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 und...
def failed_states(self): return ['FAILED'] def get_sagemaker_response(self):
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible<|fim▁hole|>@python_2_unicode_compatible class DockerServer(models.Model): name = models.CharField(max_length=255, unique=True) v...
import docker
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from third_party.bi_att_flow.my.tensorflow import *
<|file_name|>file.ts<|end_file_name|><|fim▁begin|>export function mockGlobalFile() { // @ts-ignore global.File = class MockFile { name: string; size: number; type: string; parts: (string | Blob | ArrayBuffer | ArrayBufferView)[]; properties?: FilePropertyBag; ...
this.properties = properties; this.lastModified = 1234567890000; // Sat Feb 13 2009 23:31:30 GMT+0000. }
<|file_name|>global.js<|end_file_name|><|fim▁begin|>/** * Created by LPAC006013 on 23/11/14. */ /* * wiring Super fish to menu */ var sfvar = jQuery('div.menu'); var phoneSize = 600; jQuery(document).ready(function($) { //if screen size is bigger than phone's screen (Tablet,Desktop) if($(document).width(...
// enable superfish sfvar.superfish({
<|file_name|>uncoded.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ''' Uncoded Add-on 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 ...
elif action == 'tvSearch':
<|file_name|>appointment_tags.py<|end_file_name|><|fim▁begin|># # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/...
<|file_name|>Tx3gDecoderTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 The Android Open Source Project * * 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://w...
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.testutil.TestUtil;
<|file_name|>Xfplot2DPanel.java<|end_file_name|><|fim▁begin|>//--------------------------------------------------------------------------------// // COPYRIGHT NOTICE // //--------------------------------------------------------------------------------// // C...
/** * Código asociado a la clase serializable */
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main import ( "github.com/kataras/iris/v12" "github.com/kataras/iris/v12/middleware/requestid" "github.com/kataras/golog" ) func main() {<|fim▁hole|> // app.Logger().RegisterFormatter(golog.Formatter...) // Also, see app.Logger().SetLevelOutput(level str...
app := iris.New() app.Logger().SetLevel("debug") app.Logger().SetFormat("json", " ") // to register a custom Formatter:
<|file_name|>ext-lang-zh_CN.js<|end_file_name|><|fim▁begin|>/* * Simplified Chinese translation * By DavidHu * 09 April 2007<|fim▁hole|> */ Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">加载中...</div>'; if(Ext.View){ Ext.View.prototype.emptyText = ""; } if(Ext.grid.Grid){ Ext.grid...
<|file_name|>textNoteEditView.js<|end_file_name|><|fim▁begin|>/** * * Note Edit View * * noteEditView.js * @author Kerri Shotts * @version 3.0.0 * * Copyright (c) 2013 Packt Publishing * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentatio...
<|file_name|>1280_tidy_up_latent.py<|end_file_name|><|fim▁begin|>"""tidy_up_latent Tidy up a latent migration not previously picked up by alembic or ignored. Revision ID: 1280 Revises: 1270 Create Date: 2019-06-10 15:51:48.661665 """<|fim▁hole|>from alembic import op import sqlalchemy as sa # revision identifiers...
<|file_name|>composites.py<|end_file_name|><|fim▁begin|># # This source file is part of the EdgeDB open source project. # # Copyright 2008-present MagicStack Inc. and the EdgeDB authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...
from .. import common
<|file_name|>footnote.go<|end_file_name|><|fim▁begin|>package ast import ( "fmt" gast "github.com/yuin/goldmark/ast" ) // A FootnoteLink struct represents a link to a footnote of Markdown // (PHP Markdown Extra) text. type FootnoteLink struct { gast.BaseInline Index int RefCount int<|fim▁hole|>} // Dump imp...
<|file_name|>serverhub.cpp<|end_file_name|><|fim▁begin|>/************************************************************************** ** ** This file is part of . ** https://github.com/HamedMasafi/ ** ** is free software: you can redistribute it and/or modify ** it under the terms of the GNU Lesser General Public Licens...
#include <QtNetwork/QTcpSocket>
<|file_name|>setup_win32.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import glob import os import site from cx_Freeze import setup, Executable import meld.build_helpers import meld.conf site_dir = site.getsitepackages()[1] include_dll_path = os.path.join(site_dir, "gnome") missing_dll = [ 'libgtk-3-0...
description='Visual diff and merge tool', author='The Meld project', author_email='meld-list@gnome.org',
<|file_name|>conversion-test.py<|end_file_name|><|fim▁begin|>import unittest converter = __import__("obj-to-sm-conversion") model = """ # Blender v2.71 (sub 0) OBJ File: # www.blender.org mtllib object.mtl o Cube v 1.000000 -1.000000 -1.000000 v 1.000000 -1.000000 1.000000 v -1.000000 -1.000000 1.000000 v -1.000000 -1...
v 1.000000 1.000000 -0.999999 v 0.999999 1.000000 1.000001 v -1.000000 1.000000 1.000000
<|file_name|>CustomEvent.js<|end_file_name|><|fim▁begin|>(function () { describe('CustomEvent tests - future rule?', function () { context('ignores safe patterns', function () { context(null, function () { var good = 'var a = "CustomEvent";'; it(good, function () { chai.expect(Scan...
}); }); });
<|file_name|>farewells.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> "Sayonara!".to_string() }<|fim▁end|>
pub fn goodbye() -> String {
<|file_name|>JsonIgnore.java<|end_file_name|><|fim▁begin|>package com.jsoniter.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention;<|fim▁hole|>import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD...
<|file_name|>pyrarcr-0.2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 ##### ##### ##### ##### #### #### # # # # # # # # # # #### #### # # # ##### #### ##### ##### ##### # # # # #### # # # # # # # # # # # # # # # # # # # # # #...
#checking if the file exists/running the function
<|file_name|>assignment04_159201_final_version.cpp<|end_file_name|><|fim▁begin|>//! //! @author Wang Weixu 13114633, Xiufeng Zhang 06197620, Boxi Zhang, 12238967 //! @date 12.12.2014 //! //! @brief This code implemented Big Number using linked list as underlying //! data structure. //! //! Assign...
<|file_name|>date-parser.js<|end_file_name|><|fim▁begin|>define(['../../moduleDef', 'angular'], function(module, angular) { 'use strict'; module.provider('$dateParser', function() { var proto = Date.prototype; function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); } var defaults = this.def...
'd' : proto.setDate,
<|file_name|>base_model.py<|end_file_name|><|fim▁begin|>import logging from django.db import models class BaseModel(models.Model): class Meta: # Makes django recognize model in split modules app_label = 'sdn' # Turns this into an abstract model (does not create table for it) abstra...
self.msg = msg self.logger.warning(msg) def __str__(self):
<|file_name|>test_rpc_util.py<|end_file_name|><|fim▁begin|>""" Test rpc_util functions """ __author__ = 'Dan Gunter <dkgunter@lbl.gov>' __date__ = '8/28/15' # Imports # stdlib import re # third-party from nose.tools import raises # local from doekbase.data_api import rpc_util from thrift.Thrift import TType class Me...
thrift_spec = (
<|file_name|>no_tmp_typemap_GeometricFields.hpp<|end_file_name|><|fim▁begin|>// pythonFlu - Python wrapping for OpenFOAM C++ API // Copyright (C) 2010- Alexey Petrov // Copyright (C) 2009-2010 Pebble Bed Modular Reactor (Pty) Limited (PBMR) // // This program is free software: you can redistribute it and/or modif...
//------------------------------------------------------------------------------- #endif
<|file_name|>TaoParser.java<|end_file_name|><|fim▁begin|>/* * generated by Xtext */ package org.eclectic.frontend.parser.antlr; import com.google.inject.Inject; import org.eclipse.xtext.parser.antlr.XtextTokenStream; import org.eclectic.frontend.services.TaoGrammarAccess; public class TaoParser extends org.eclipse.x...
@Override protected org.eclectic.frontend.parser.antlr.internal.InternalTaoParser createParser(XtextTokenStream stream) { return new org.eclectic.frontend.parser.antlr.internal.InternalTaoParser(stream, getGrammarAccess());
<|file_name|>commons.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ocitysmap, city map and street index generator from OpenStreetMap data # Copyright (C) 2010 David Decotigny # Copyright (C) 2010 Frédéric Lehobey<|fim▁hole|># Copyright (C) 2010 Thomas Petazzoni # Copyright (C) 2010 Gaël Utard # This p...
# Copyright (C) 2010 Pierre Mauduit # Copyright (C) 2010 David Mentré # Copyright (C) 2010 Maxime Petazzoni
<|file_name|>client.py<|end_file_name|><|fim▁begin|>from .company import Company<|fim▁hole|>from .contact import Contact from .deal import Deal from .note import Note from .requester import Requester class AgileCRM: def __init__(self, domain, email, api_key): requester = Requester(domain, email, api_key) ...
<|file_name|>http-response.test.js<|end_file_name|><|fim▁begin|>'use strict'; const assert = require('assert'); const HttpResponse = require('./http-response'); describe('HttpResponse', () => { const mockResponse = { version: '1.0', status: '200 OK' }; it('should create an instance', () => { const ...
describe('getHeaders()', () => { it('should return all headers', () => {
<|file_name|>dunces-and-dungeons.py<|end_file_name|><|fim▁begin|>from dungeon.dungeon import Dungeon, Hub from entity.player.players import Player, Party import entity.item.items as items import sys, os import base import web.server try: import dill except: dill = None PARTY = Party() class Manager: def __init__(...
except: base.put("could not reach the update service :'(") return latest
<|file_name|>fft.rs<|end_file_name|><|fim▁begin|>#[cfg(test)] mod tests {<|fim▁hole|> fn it_works() { assert!(true); } }<|fim▁end|>
#[test]
<|file_name|>mock.js<|end_file_name|><|fim▁begin|>module.exports = { // mock开发配置 'GET /login?$user&$password': { ok: { code: 100, msg: 'ok', data: { a: 1, b: 2 } }, fail: { code: 200, msg: 'fail' } }, 'POST /signup?$user&$password': { ok: {...
a: 1, b: 2
<|file_name|>aboutDialog.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #-*- coding:utf-8 -*- import os import sys from constants import * #For using unicode utf-8 reload(sys).setdefaultencoding("utf-8") from PyQt4 import QtCore from PyQt4 import QtGui from uiQt_aboutdialog import Ui_aboutDialog class aboutD...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* * nodekit.io * * Copyright (c) 2016 OffGrid Networks. 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 * * ...
server.listen();
<|file_name|>App.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import Header from './Header'; import MainSection from './MainSection'; export default class App extends Component { render() {<|fim▁hole|> <MainSection/> </div> ); } }<|fim▁end|>
return ( <div> <Header/>
<|file_name|>FunctionalAction.java<|end_file_name|><|fim▁begin|>package org.aslab.om.metacontrol.action; import java.util.HashSet; import java.util.Set; import org.aslab.om.ecl.action.Action; import org.aslab.om.ecl.action.ActionFeedback; import org.aslab.om.ecl.action.ActionResult; import org.aslab.om.metacontrol.va...
* <!-- begin-UML-doc -->
<|file_name|>connection.rs<|end_file_name|><|fim▁begin|>//! The connection module contains the Connection struct, that provides an interface for a Server //! Query connection. use channel::ChannelList; use client::ClientList; use command::Command; use error; use error::{Error, SQError}; use map::*; use std::fmt; use s...
self.send_command(&format!("use {}", id)).map(|_| ())
<|file_name|>highlightable.ts<|end_file_name|><|fim▁begin|>import { ChangeDetectorRef, SimpleChanges, NgZone, } from '@angular/core'; import {highlightTime} from '../../utils/configuration'; const initialTimespan = highlightTime; export abstract class Highlightable { isUpdated = false; private timespan = ...
this.resetUpdateState = null; this.isUpdated = false;
<|file_name|>SwipeListView.java<|end_file_name|><|fim▁begin|>package com.longluo.demo.widget.swipelistview; import android.content.Context; import android.content.res.TypedArray; import android.database.DataSetObserver; import android.support.v4.view.MotionEventCompat; import android.support.v4.view.ViewConfigurationC...
*/ public SwipeListView(Context context, int swipeBackView, int swipeFrontView) { super(context); this.swipeFrontView = swipeFrontView;
<|file_name|>attach_loopback.go<|end_file_name|><|fim▁begin|>// +build linux,cgo package loopback import ( "errors" "fmt" "os" "github.com/Sirupsen/logrus" "golang.org/x/sys/unix" ) // Loopback related errors var ( ErrAttachLoopbackDevice = errors.New("loopback attach failed") ErrGetLoopbackBackingFile = e...
// Set the status of the loopback device
<|file_name|>numbers_test.go<|end_file_name|><|fim▁begin|>package internal_test import ( "math" "testing" "github.com/twpayne/go-geom/xy/internal" ) func TestIsSameSignAndNonZero(t *testing.T) { for i, tc := range []struct { i, j float64 expected bool }{ { i: 0, j: 0, expected: false, }, { ...