prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>websitepage.py<|end_file_name|><|fim▁begin|># ===========================================================================
# eXe
# Copyright 2004-2005, University of Auckland
# Copyright 2004-2007 eXe Project, New Zealand Tertiary Education Commission
#
# This program is free software; you can redistribute... | Generate the left navigation string for this page
"""
if inSameLevelTitle: |
<|file_name|>aes_test.py<|end_file_name|><|fim▁begin|>from Crypto import Random
from src.aes import encrypt_message, decrypt_message
def test_integrity():
plaintext = 'Test Text'<|fim▁hole|> key = Random.new().read(16)
# Ensure that D(k, E(k, p)) == p
assert decrypt_message(key, encrypt_message(key, ... | |
<|file_name|>3.4.py<|end_file_name|><|fim▁begin|>import os<|fim▁hole|>print help(os)<|fim▁end|> | import sys
print help(sys) |
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout,Submit
from .models import Details, Feedback
from crispy_forms.bootstrap import TabHolder, Tab
from crispy_forms.bootstrap import AppendedText, PrependedText, For... | exclude = ['']
|
<|file_name|>client.js<|end_file_name|><|fim▁begin|>const handleError = (message) => {
$("#errorMessage").text(message);
$("#domoMessage").animate({width:'toggle'},350);
}
const sendAjax = (action, data) => {
$.ajax({
cache: false,
type: "POST",
url: action,
data: data,
dataType: "json",
... | |
<|file_name|>did.rs<|end_file_name|><|fim▁begin|>use indy::did;
use indy::IndyError;
use indy::future::Future;
pub fn create_and_store_my_did(wallet_handle: i32, seed: Option<&str>) -> Result<(String, String), IndyError> {
let my_did_json = seed.map_or("{}".to_string(), |seed| format!("{{\"seed\":\"{}\" }}", seed)... | did::create_and_store_my_did(wallet_handle, &my_did_json).wait() |
<|file_name|>ssap_score_accuracy_test.cpp<|end_file_name|><|fim▁begin|>/// \file
/// \brief The ssap_score_accuracy test suite
/// \copyright
/// CATH Tools - Protein structure comparison tools such as SSAP and SNAP
/// Copyright (C) 2011, Orengo Group, University College London
///
/// This program is free software: ... | #include "cath/score/aligned_pair_score/ssap_score/ssap_score_accuracy.hpp"
|
<|file_name|>extra.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
@author: mthh
"""
import matplotlib
import numpy as np
from geopandas import GeoDataFrame, pd
from shapely.geometry import MultiPolygon, Polygon, Point
from . import RequestConfig, Point as _Point
from .core import table<|fim▁hole|>import m... |
if not matplotlib.get_backend():
matplotlib.use('Agg') |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __version__ = '1.2.8' |
<|file_name|>export_test.go<|end_file_name|><|fim▁begin|>package reboot
import (
"github.com/juju/juju/api/base/testing"
)
// PatchFacadeCall patches the State's facade such that
// FacadeCall method calls are diverted to the provided
// function.<|fim▁hole|>func PatchFacadeCall(p testing.Patcher, st *State, f func(... | |
<|file_name|>pipeline-deploy-os-server-ubuntu.py<|end_file_name|><|fim▁begin|>'''
Copyright (C) 2016 Quinn D Granfor <spootdev@gmail.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
version 2, as published by the Free Software Founda... |
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
<|file_name|>sessionManager.js<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2013, FeedHenry Ltd. All Rights Reserved.
*
* Class which exposes collection of utility / helper functions for managing user sessions.
* - Creates new session for valid user.
* - Validates session for incoming requests.
* - Returns th... |
if (config.currentEnv != null) {
currentEnv = config.currentEnv;
} |
<|file_name|>solflag.py<|end_file_name|><|fim▁begin|># solflag.py:
#
# Copyright (C) 2007
# ASTRON (Netherlands Institute for Radio Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it and/or
# ... | # Compute median of the absolute distance to the median. |
<|file_name|>go-utils_test.go<|end_file_name|><|fim▁begin|>/*
Basically a copy of github/segmentio's test cases.
Thank you @tj for switching to Go just before we did! ;)
*/
package utils
import (
"strconv"
"testing"
)
type sample struct {
str, out string
}
func TestSlug(t *testing.T) {
samples := []sample{
{... | |
<|file_name|>Canvas.cpp<|end_file_name|><|fim▁begin|>#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "../include/evasxx/Object.h"
#include "../include/evasxx/Canvas.h"
using namespace std;
using namespace Eflxx;
namespace Evasxx {
Canvas::Canvas()
:Eflxx::Trackable( "Canvas" ),
mFree (true)
{
AllocTa... | Dout( dc::notice, "Canvas::~Canvas - freeing Evas" );
evas_free (o); |
<|file_name|>BasicIf.java<|end_file_name|><|fim▁begin|>package com.nosolojava.fsm.impl.runtime.executable.basic;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import com.nosolojava.fsm.runtime.Context;
import com.nosolojava.fsm.runtime.executable.Elif;
import com.nosolojava.fsm... |
@Override
public boolean runIf(Context context) {
boolean result = false;
|
<|file_name|>package.cpp<|end_file_name|><|fim▁begin|>/***************************************************************************
* Copyright © 2010-2011 Jonathan Thomas <echidnaman@kubuntu.org> *
* Heavily inspired by Synaptic library code ;-) *
* ... |
if (Ver.end()) |
<|file_name|>result.go<|end_file_name|><|fim▁begin|>package scanner
import (
"fmt"
"os"
"path"
"path/filepath"
"github.com/bitrise-io/bitrise-init/analytics"
"github.com/bitrise-io/bitrise-init/errormapper"
"github.com/bitrise-io/bitrise-init/models"
"github.com/bitrise-io/bitrise-init/output"
"github.com/bi... | "github.com/bitrise-io/go-utils/log"
)
// GenerateScanResult runs the scanner, returns the results and if any platform was detected. |
<|file_name|>conversation-header.component.js<|end_file_name|><|fim▁begin|>"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {<|fim▁hole|> else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(... | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); |
<|file_name|>JavaSEMain.java<|end_file_name|><|fim▁begin|>package org.test;
import org.test.act.MainGame;
import loon.LSetting;
import loon.LSystem;
import loon.LazyLoading;
import loon.Screen;
import loon.javase.Loon;<|fim▁hole|>
public class JavaSEMain {
public static void main(String[]args){
LSetting setting ... | |
<|file_name|>stockday.rs<|end_file_name|><|fim▁begin|>use polars::prelude::{
ChunkCompare, CsvReader, DataFrame, DataType, Field, NamedFrom, ParquetCompression,
ParquetReader, ParquetWriter, Result as PolarResult, RollingOptions, Schema, SerReader, Series,
};
use polars::series::ops::NullBehavior;
use rayon::p... | limit_down: Vec<f32>,
num_trades: Vec<f32>,
volume: Vec<f32>,
total_turnover: Vec<f32>, |
<|file_name|>mod_power_of_2_pow.rs<|end_file_name|><|fim▁begin|>use malachite_base::num::arithmetic::traits::{
ModPowerOf2, ModPowerOf2IsReduced, ModPowerOf2Mul, ModPowerOf2Neg, ModPowerOf2Pow,
ModPowerOf2PowAssign, Parity,
};
use malachite_base::num::basic::integers::PrimitiveInt;
use malachite_base::num::basi... | use malachite_base_test_util::generators::{
unsigned_triple_gen_var_16, unsigned_vec_pair_gen_var_3, |
<|file_name|>webrelayAsync_handler.ts<|end_file_name|><|fim▁begin|>//------------------------------------------------------------------------
// Name: webrelay
// Author: ProtocolGenerator (by jjuiddong)
// Date:
//------------------------------------------------------------------------
import TypeVariant from ... | handler.ReqPing(parsePacket)
}) |
<|file_name|>ParseRemoveOperation.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015-present, Parse, LLC.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be ... | } else {
throw new IllegalArgumentException("You can only add an item to a List or JSONArray.");
} |
<|file_name|>no-zotero.js<|end_file_name|><|fim▁begin|>'use strict';
/**
* Tests for when Zotero is down/inaccessible
*/
const assert = require('../../utils/assert.js');
const Server = require('../../utils/server.js');
describe('Zotero service down or disabled:', function () {
describe('unreachable', function... | }); |
<|file_name|>app-jobs.js<|end_file_name|><|fim▁begin|>//= require ../store
(function () {
"use strict";
var AppJobs = FlynnDashboard.Stores.AppJobs = FlynnDashboard.Store.createClass({
displayName: "Stores.AppJobs",
getState: function () {
return this.state;
},
willInitialize: function () {
this.props = {
... | var res = args[0]; |
<|file_name|>run.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# coding: utf-8
from datetime import datetime
from distutils import spawn
import argparse
import json
import os
import platform
import shutil
import socket
import sys
import urllib
import urllib2
import main
from main import config
#############... | if split_ext: |
<|file_name|>selectize.plugin.disable-options.js<|end_file_name|><|fim▁begin|>/**
* Plugin: "disable_options" (selectize.js)
* Copyright (c) 2013 Mondo Robot & contributors
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
* file except in compliance with the License. You may... |
self.setDisabledOptions = function( values ) {
options.disableOptions = values
} |
<|file_name|>MBrecha.js<|end_file_name|><|fim▁begin|>$(document).on("ready" ,function(){
listaBrecha();// LLamar al metodo para listar las brechas
//Inicio cargar combo servicio public
$("#btn-NuevaBrecha").click(function()//para que cargue el como una vez echo click sino rep... | });
BrechaData("#table-brecha",table); //TRAER LA DATA DE LAS BRECHAS PARA ACTUALIZAR
EliminarBrechaLista("#table-brecha",table);//TRAER LA DATA DE LAS BRECHAS PARA ELIMINAR
} |
<|file_name|>playback.go<|end_file_name|><|fim▁begin|>/*
Copyright 2020 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless re... | var f EventFields
err := utils.FastUnmarshal(scanner.Bytes(), &f) |
<|file_name|>Transports.java<|end_file_name|><|fim▁begin|>package com.riskvis.entity;
// Generated May 12, 2014 11:45:38 PM by Hibernate Tools 4.0.0
import static javax.persistence.GenerationType.IDENTITY;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Enti... | import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany; |
<|file_name|>return-nil.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/lice... | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Exonum Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//<|fim▁hole|>// WITHOUT WARRANTIES OR CONDITIONS OF ANY... | // http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>"""
API views for badges
"""
from edx_rest_framework_extensions.auth.session.authentication import SessionAuthenticationAllowInactiveUser
from opaque_keys import InvalidKeyError
from opaque_keys.edx.django.models import CourseKeyField
from opaque_keys.edx.keys import C... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { NgModule, Component, OnInit } from '@angular/core';
import { RouterModule } from '@angular/router';
import { AuthGuard } from '../../../_service/authguard-service';
import { AddDebitNote } from './aded/adddebitnote.comp';
import { ViewDebitNote } from './view/... | canActivate: [AuthGuard],
data: { "module": "accs" },
children: [ |
<|file_name|>linuxdeviceconfigurations.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
**
** Contact: Nokia Corporation (info@qt.nokia.com)
**
**
** ... | } |
<|file_name|>enter_vars.rs<|end_file_name|><|fim▁begin|>use tableau::tables::Table;
pub fn enter_var_pivot_optimal(table: &Table) -> usize {
let table_rows = table.get_rows();<|fim▁hole|> let last_row_index = table_rows.len() - 1;
// Select the most negative cell in the objective function row.
let mut c... | |
<|file_name|>boxed_cast.hpp<|end_file_name|><|fim▁begin|>// This file is distributed under the BSD License.
// See "license.txt" for details.
// Copyright 2009-2012, Jonathan Turner (jonathan@emptycrate.com)
// Copyright 2009-2015, Jason Turner (jason@emptycrate.com)
// http://www.chaiscript.com
#ifndef CHAISCRIPT_BOX... |
} |
<|file_name|>test_copy.py<|end_file_name|><|fim▁begin|>"""Unit tests for the copy module."""
import sys
import copy
import copy_reg
import unittest
from test import test_support
class TestCopy(unittest.TestCase):
# Attempt full line coverage of copy.py from top to bottom
def test_exceptions(self):
... | |
<|file_name|>platformSettings.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2016 eyeOS
This file is part of Open365.
Open365 is free software: you can redistribute it and/or modify<|fim▁hole|> License, or (at your option) any later version.
This program is distributed in the hope that it will b... | it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the |
<|file_name|>code.rs<|end_file_name|><|fim▁begin|>use parser::Inline;
use parser::patterns::CODE_PATTERN;
pub fn parse_code(text: &str) -> Option<(Inline, usize)> {
if CODE_PATTERN.is_match(text) {
let caps = CODE_PATTERN.captures(text).unwrap();
let code = caps.name("code").unwrap();
Some... | } else {
None
}
} |
<|file_name|>TextFactory.java<|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... | e.printStackTrace();
|
<|file_name|>aiplatform_generated_aiplatform_v1beta1_metadata_service_query_artifact_lineage_subgraph_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# 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 Li... | # [START aiplatform_generated_aiplatform_v1beta1_MetadataService_QueryArtifactLineageSubgraph_async] |
<|file_name|>Preloader.js<|end_file_name|><|fim▁begin|>var React = require('react'),
cx = require('classnames'),
constants = require('./constants');
var Preloader = React.createClass({
propTypes: {
size: React.PropTypes.oneOf(constants.SCALES),
active: React.PropTypes.bool,
colors: React.PropType... |
render() {
var classes = {
'preloader-wrapper': true, |
<|file_name|>tangram.js<|end_file_name|><|fim▁begin|>/* GCompris - tangram.js
*
* Copyright (C) 2016 Bruno Coudoin <bruno.coudoin@gcompris.net>
*
* Authors:
* Yves Combe / Philippe Banwarth (GTK+ version)
* Bruno Coudoin <bruno.coudoin@gcompris.net> (Qt Quick port)
*
* This program is free software; you c... | function processPressedKey(event) {
|
<|file_name|>CompactBidiGraph.java<|end_file_name|><|fim▁begin|>/* Copyright (C) 2013-2022 TU Dortmund
* This file is part of AutomataLib, http://www.automatalib.net/.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may ob... | * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License. |
<|file_name|>ElementMatchers.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2011 Nicholas Okunew
* All rights reserved.
*
* This file is part of the com.atomicleopard.webelemental library
*
* The com.atomicleopard.webelemental library is free software: you
* can redistribute it and/or modi... | *
* You should have received a copy of the GNU Lesser General Public License
|
<|file_name|>soccerbase.cpp<|end_file_name|><|fim▁begin|>/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
this file is part of rcssserver3D
Fri May 9 2003
Copyright (C) 2002,2003 Koblenz University
Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
$Id$
This program is free ... | return false;
} |
<|file_name|>comptool.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from .mininode import *
from .blockstore import BlockStore, TxStore
from .util import p2p_port
'... | raise AssertionError("Mempool test failed at test %d" % test_number)
print "Test %d: PASS" % test_number, [ c.rpc.getblockcount() for c in self.connections ] |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, division
from klein.app import Klein, run, route, resource
from klein._plating import Plating
from ._version import __version__ as _incremental_version
# Make it a str, for backwards compatibility
__version__ = _incremental... | __copyright__ = "Copyright 2016 {0}".format(__author__)
__all__ = [
'Klein', |
<|file_name|>listtransactions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from t... | tx.deserialize(f)
return tx |
<|file_name|>instance_uldaman.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
* Copyright (C) 2006-2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the G... |
uint64 GetData64(uint32 identifier) const OVERRIDE |
<|file_name|>settings.component.ts<|end_file_name|><|fim▁begin|>import {Component,Input} from '@angular/core';
import { WindowService } from "../services/window.service";
import { ActivatedRoute, Router } from "@angular/router";
import { RestService } from "../services/rest.service";
import { Title } from '@ang... | subscription;
constitutionId
|
<|file_name|>CrudController.java<|end_file_name|><|fim▁begin|>package me.puras.common.controller;
import me.puras.common.domain.DomainModel;
import me.puras.common.error.BaseErrCode;
import me.puras.common.json.Response;
import me.puras.common.json.ResponseHelper;
import me.puras.common.service.CrudService;
import me.... |
return ResponseHelper.createSuccessResponse(t); |
<|file_name|>ConsumeJmsMapMessageTest.java<|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 t... | |
<|file_name|>entity.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr;
use std::fmt::{self, Display};
<|fim▁hole|>/// Preceding the first double quote is an optional weakness indicator,
/// which always looks like this: W/
/// See also: https://tools.ietf.org/html/rfc7232#section-2.3
#[derive(Clone, PartialEq, Debu... | /// An entity tag
///
/// An Etag consists of a string enclosed by two literal double quotes. |
<|file_name|>EnvExample.cpp<|end_file_name|><|fim▁begin|>/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1997, 1998, 1999, 2000
* Sleepycat Software. All rights reserved.
*
* $Id: EnvExample.cpp,v 11.12 2000/10/27 20:32:00 dda Exp $
*/
#include "db_config.h"
#ifndef NO_SYSTEM_INCL... | void db_setup(char *, char *, ostream&);
void db_teardown(char *, char *, ostream&);
|
<|file_name|>vmware_deploy_ovf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Matt Martz <matt@sivel.net>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__... | |
<|file_name|>appointment-list.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, Input } from '@angular/core';
import { FormControl, FormGroup, Validators} from '@angular/forms';
import { AppointmentService, AlertService, AuthenticationService } from '../../services';<|fim▁hole|> selector: 'appoin... | import { Appointment } from '../../models';
import { Router, ActivatedRoute } from "@angular/router";
@Component({ |
<|file_name|>resources.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement
import logging
import warnings
import django
from django.conf import settings
from django.conf.urls.defaults import patterns, url
from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, ValidationError
f... | if self._meta.api_name is not None:
kwargs['api_name'] = self._meta.api_name |
<|file_name|>vpabsd.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
fn vpabsd_1() {
run_test(&Instruction { mnemonic: Mnemonic::VPABSD, op... | run_test(&Instruction { mnemonic: Mnemonic::VPABSD, operand1: Some(Direct(YMM5)), operand2: Some(IndirectDisplaced(EDI, 1087832104, Some(OperandSize::Ymmword), None)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[196, 226, 125, 30, ... |
<|file_name|>ghosthunter-nodependency.js<|end_file_name|><|fim▁begin|>/**
* ghostHunter - 0.4.0
* Copyright (C) 2014 Jamal Neufeld (jamal@i11u.me)
* MIT Licensed
* @license
*/
(function( $ ) {
/* Include the Lunr library */
var lunr=require('./lunr.min.js');
//This is the main plugin definition
$.fn.ghostHunter... | |
<|file_name|>tutorial_20.cpp<|end_file_name|><|fim▁begin|>#include <iostream>
#include <seqan/graph_types.h>
#include <seqan/graph_algorithms.h>
#include <seqan/find_motif.h>
using namespace seqan;
int main ()
{
typedef unsigned int TCargo;
typedef Graph<Undirected<TCargo> > TGraph;
typedef Vert... | char letters[]={'a','b','c','d','e','f','g','h'};
String<char>map;
assignVertexMap(g, map, letters);
TVertexDescriptor start = 0;
|
<|file_name|>capabilities.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; coding: iso-8859-1 -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Stoqdrivers
# Copyright (C) 2005 Async Open Source <http://www.async.com.br>
# All rights reserved
#
# This program is free software; you can redistribute it and/or modify
# it under the ... | "min_size, digits or decimals") |
<|file_name|>embedding.py<|end_file_name|><|fim▁begin|>import glob
import os
import numpy as np
def load_emebeddings(folder):
files = [filename for filename in glob.iglob(folder + '**', recursive=True) if not os.path.isdir(filename)]
w2v = {}
for file in files:
with open(file, "r", encoding='utf8'... | return res |
<|file_name|>populate.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
from fbposter.models import FacebookStatus
import facebook
import datetime
class Command(BaseCommand):<|fim▁hole|> if len(args) < 1:
self.stdout.write... | args = ''
help = 'Gets fresh messages from Reddit'
def handle(self, *args, **options): |
<|file_name|>test_hmm.py<|end_file_name|><|fim▁begin|>import numpy as np
from numpy.testing import assert_array_equal, assert_array_almost_equal
from unittest import TestCase
from sklearn.datasets.samples_generator import make_spd_matrix
from sklearn import hmm
from sklearn import mixture
from sklearn.utils.extmath i... | # picks the actual component used to generate the observations.
h.means_ = 20 * h.means_
gaussidx = np.repeat(range(self.n_components), 5) |
<|file_name|>IntegerDomain.java<|end_file_name|><|fim▁begin|>package edacc.parameterspace.domain;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@SuppressWarnings("serial")
public class IntegerDomain extends Domain {
protected Integer low, high;
public static final String name = "Integ... | if (numberSamples >= (high - low + 1)) {
return getDiscreteValues();
}
List<Object> vals = new LinkedList<Object>(); |
<|file_name|>Tree.js<|end_file_name|><|fim▁begin|>/*!
* ${copyright}
*/
// Provides control sap.ui.commons.Tree.
sap.ui.define(['jquery.sap.global', './library', 'sap/ui/core/Control'],
function(jQuery, library, Control) {
"use strict";
/**
* Constructor for a new Tree.
*
* @param {string} [sId] id for t... | /**
* Removes the references inside the expanded node of its selected children, because
* they are no longer needed. |
<|file_name|>pool.rs<|end_file_name|><|fim▁begin|>#[macro_use]
mod utils;
inject_indy_dependencies!();
extern crate indyrs as indy;
extern crate indyrs as api;
use self::indy::ErrorCode;
use crate::utils::{environment, pool};
use crate::utils::constants::*;
use crate::utils::Setup;
mod high_cases {
use super::... | |
<|file_name|>_compat.py<|end_file_name|><|fim▁begin|>"""
Compatibility helpers for older Python versions.
"""
import sys
<|fim▁hole|><|fim▁end|> |
PY2 = sys.version_info[0] == 2 |
<|file_name|>package.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PerlWwwRobotrules(PerlPackage):
"""Database of robots.txt-derived permissions"""
homepage = "http://deps.cpantesters.org/?module=WWW%3A%3ARobotRules;perl=latest"
ur... | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details. |
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewEncapsulation } from '@angular/core';
@Component({
moduleId: module.id,
selector: 'my-app',<|fim▁hole|> `,
encapsulation: ViewEncapsulation.None
})
export class AppComponent { }<|fim▁end|> | template: `
<router-outlet></router-outlet> |
<|file_name|>__init__.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 Apache... | |
<|file_name|>qlcplus_fi_FI.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="fi_FI">
<context>
<name>AboutBox</name>
<message>
<location filename="aboutbox.ui" line="14"/>
<source>About Q Light Controller Plus</source>
<oldso... | |
<|file_name|>facebook.js<|end_file_name|><|fim▁begin|>var Purest = require('purest');
function Facebook(opts) {
this._opts = opts || {};
this._opts.provider = 'facebook';
this._purest = new Purest(this._opts);
this._group = 'LIB:SOCIAL:FACEBOOK';
return this;
}
Facebook.prototype.user = function ... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __author__ = 'cgonzalez' |
<|file_name|>Epeople.py<|end_file_name|><|fim▁begin|>def main():
PEOPLE = insert_people()
sum_salary_all(PEOPLE)
list_people_by_city(PEOPLE)
def insert_people():
PEOPLE = []
while True:
NAMES = {}
NAMES["name"] = name = raw_input("Inserisci nome ")
NAMES["city"] = city ... |
PEOPLE.append(NAMES)
# print ("Name {name}, City {city}, Salary {salary} Annual {annual}".format(**NAMES)) |
<|file_name|>phenome.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 William Langhoff WildBill567@users.noreply.github.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, eit... | # (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, |
<|file_name|>20.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Title:信息加密
# 给你个小写英文字符串a和一个非负数b(0<=b<26), 将a中的每个小写字符替换成字母表中比它大b的字母。这里将字母表的z和a相连,如果超过了z就回到了a。
# 例如a="cagy", b=3,<|fim▁hole|>a, b="cagy",3
# Answer
e = []
for i in range(0,len(a)):
c = ord(a[i])+b # 转换成整数
if c> 122: # 如果大于z则减去26
... | # 则输出 :fdjb
# Test |
<|file_name|>PlotOptions.java<|end_file_name|><|fim▁begin|>/*
* #%L
* fujion
* %%<|fim▁hole|> * %%
* 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/license... | * Copyright (C) 2021 Fujion Framework |
<|file_name|>lc962-maximum-width-ramp.py<|end_file_name|><|fim▁begin|># coding=utf-8
import unittest
<|fim▁hole|>Given an array `A` of integers, a _ramp_ is a tuple `(i, j)` for which `i <
j` and `A[i] <= A[j]`. The width of such a ramp is `j - i`.
Find the maximum width of a ramp in `A`. If one doesn't exist, retu... | """962. Maximum Width Ramp
https://leetcode.com/problems/maximum-width-ramp/description/
|
<|file_name|>constellation.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/. */
//! The `Constellation`, Servo's Grand Central Station
... | Some((parent_id, _)) => pipeline_id = parent_id,
None => return self.root_frame_id,
},
None => { |
<|file_name|>default_iterable_differ.d.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { IterableChangeRecord, IterableChanges... | private _additionsHead;
private _additionsTail; |
<|file_name|>v2v.py<|end_file_name|><|fim▁begin|># Copyright 2014-2017 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any ... | err_name = 'JobNotDone'
|
<|file_name|>content_tag.d.ts<|end_file_name|><|fim▁begin|>import * as ldModule from './light_dom';
export declare class Content {
<|fim▁hole|> constructor(contentStartElement: any, select: string);
init(destinationLightDom: ldModule.LightDom): void;
nodes(): List<any>;
insert(nodes: List<any>): void... | contentStartElement: any;
select: string;
private _strategy;
|
<|file_name|>assign_tag.rs<|end_file_name|><|fim▁begin|>use std::io::Write;
use liquid_core::error::ResultLiquidExt;
use liquid_core::parser::FilterChain;
use liquid_core::Language;
use liquid_core::Renderable;
use liquid_core::Result;
use liquid_core::Runtime;
use liquid_core::{ParseTag, TagReflection, TagTokenIter};... |
let output = template.render(&runtime).unwrap(); |
<|file_name|>msgstore.py<|end_file_name|><|fim▁begin|>import os
import re
import asyncio
import logging
from collections import OrderedDict
from pypeman.message import Message
from pypeman.errors import PypemanConfigError
logger = logging.getLogger("pypeman.store")
DATE_FORMAT = '%Y%m%d_%H%M'
class MessageStoreFa... | |
<|file_name|>popup.js<|end_file_name|><|fim▁begin|>// start the popup specefic scripts
// safe to use $
jQuery(document).ready(function($) {
var vibes = {
loadVals: function()
{
var shortcode = $('#_vibe_shortcode').text(),
uShortcode = shortcode;
// fill in the gaps eg... | |
<|file_name|>decodeJPEGLS.js<|end_file_name|><|fim▁begin|>let charLS;
function jpegLSDecode (data, isSigned) {
// prepare input parameters
const dataPtr = charLS._malloc(data.length);
charLS.writeArrayToMemory(data, dataPtr);
// prepare output parameters
const imagePtrPtr = charLS._malloc(4);
const image... | return image; |
<|file_name|>fill_rule.rs<|end_file_name|><|fim▁begin|>#[repr(i32)]
pub enum FillRule {
Winding = 0,<|fim▁hole|> EvenOdd = 1
}<|fim▁end|> | |
<|file_name|>bug4959409.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.<|fim▁hole|> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU Gene... | |
<|file_name|>feedback.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.lis... | )
def __repr__(self): |
<|file_name|>file_reporter.py<|end_file_name|><|fim▁begin|># Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, ... | _reporter = None
|
<|file_name|>const.py<|end_file_name|><|fim▁begin|>__author__ = 'brandon.corfman'
# Global constants used across the application.
AVERAGED_OVER_ALL_AZIMUTHS = -1
AVERAGED_ON_NON_ZERO_AVS = 0<|fim▁hole|>WHITE = (1.0, 1.0, 1.0)
CMPID, R1, R2, R3, Z1, Z2 = range(6)<|fim▁end|> | BY_AZIMUTH = 1
GYPSY_PINK = (0.6745, 0.196, 0.3882) # color coveted by JJS; used for blast volumes |
<|file_name|>test_rflink.py<|end_file_name|><|fim▁begin|>"""Common functions for Rflink component tests and generic platform tests."""
import asyncio
from unittest.mock import Mock
from homeassistant.bootstrap import async_setup_component
from homeassistant.components.rflink import CONF_RECONNECT_INTERVAL
from homeas... | config = {
'rflink': { |
<|file_name|>bio.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Imperial College London
# 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 retain ... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import time
import json
import pytz
from datetime import datetime, timedelta
from django.utils import timezone
from django.conf import settings
from rest_framework import status
from rest_framework.decorators import api_view, permission_classes
from rest_framework.re... | def incorrectlogins_data(request):
date_start_raw = request.GET.get('date_start')
date_end_raw = request.GET.get('date_end')
|
<|file_name|>gui.rs<|end_file_name|><|fim▁begin|>use edit::Editor;
use std::fmt::Write;
use gtk::{self, Widget, Window, Frame, EventBox, DrawingArea, WindowPosition};
use gtk::signal::Inhibit;
use gtk::traits::*;
use gdk::EventType;
use cairo::{Context, Antialias};
use cairo::enums::{FontSlant, FontWeight};
pub stru... |
Inhibit(false) |
<|file_name|>Open file.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys<|fim▁hole|>
with open(sys.argv[1], 'r') as my_file:
print(my_file.read())<|fim▁end|> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.