prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>dummy_plugin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# This file is part of Knitlib.
#
# Knitlib 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 Li... | return {"$schema": "http://json-schema.org/schema#", "type": "object"} |
<|file_name|>plugin_asset_util.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved.<|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
#
# ... | |
<|file_name|>auth.service.js<|end_file_name|><|fim▁begin|>'use strict';
angular.module('terminaaliApp')
.factory('Auth', function Auth($location, $rootScope, $http, User, $cookieStore, $q) {
var currentUser = {};
if($cookieStore.get('token')) {
currentUser = User.get();
}
return {
/**
... | currentUser = {}; |
<|file_name|>lc996-number-of-squareful-arrays.py<|end_file_name|><|fim▁begin|># coding=utf-8
import unittest
"""996. Number of Squareful Arrays
https://leetcode.com/problems/number-of-squareful-arrays/description/
Given an array `A` of non-negative integers, the array is _squareful_ if for
every pair of adjacent elem... | **Note:**
1. `1 <= A.length <= 12` |
<|file_name|>KeyboardController.java<|end_file_name|><|fim▁begin|>package com.pix.mind.controllers;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input.Keys;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.InputListener;
import com.badlogic.gdx.scenes.scene2d.Stage;
imp... | // eliminate inercy. |
<|file_name|>button.py<|end_file_name|><|fim▁begin|>'''
Button Behavior
===============
The :class:`~kivy.uix.behaviors.button.ButtonBehavior`
`mixin <https://en.wikipedia.org/wiki/Mixin>`_ class provides
:class:`~kivy.uix.button.Button` behavior. You can combine this class with
other widgets, such as an :class:`~kivy... | if touchtime < self.min_state_time:
self.__state_event = Clock.schedule_once(
self._do_release, self.min_state_time - touchtime)
else: |
<|file_name|>iompi.py<|end_file_name|><|fim▁begin|>##
# Copyright 2012-2021 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://... | def is_deprecated(self): |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>/*
Global variables
*/
var phonePort = 8666;
var phoneIp;
var phone;
// Holds all the function objects with an id
var callbacks = [];
// Array with all the contacts by their id
var contacts = [];
// An array with all the favourites and their id
var favourites = [];
... | function phoneError(data) {
changeStatusDiv("error");
console.error("[-] Error: " + data); |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#if UNIT_TEST_PROG == true
#include "tests/unit_tests.hpp"
#endif
#include <utility>
#include "common/global/program_data.hpp"
#include "menus/budget_menu.hpp"
namespace
{
global::program_data load_program_data();
int start_prog();
/**
* ... | } |
<|file_name|>assertion.py<|end_file_name|><|fim▁begin|>import re
from . import expression
class AssertionBase:
pass
class RowAssertion(AssertionBase):
def __init__(self, config, assert_config):
assert assert_config["type"] == "row"
self.config = config
self.assert_config = assert_co... | @property
def type(self):
return self.assert_config["f"]
|
<|file_name|>tops.py<|end_file_name|><|fim▁begin|>from lfmconf.lfmconf import get_lastfm_conf
query_play_count_by_month = """
select * from view_play_count_by_month v
where substr(v.yr_month, 1, 4) =
"""
query_top_with_remaining = """
with top as (
{query_top}
),
total_count as (
{... |
def build_query_top_albums_for_duration_with_remaining(duration): |
<|file_name|>github_stats.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Simple tools to query github.com and gather stats about issues.
"""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
... | tag = None
if len(sys.argv) > 1: |
<|file_name|>annotations.py<|end_file_name|><|fim▁begin|>''' Renderers for various kinds of annotations that can be added to
Bokeh plots
'''
from __future__ import absolute_import
from six import string_types
from ..core.enums import (AngleUnits, Dimension, FontStyle, LegendClickPolicy, LegendLocation,
... | The %s values for the polygon.
""")
|
<|file_name|>metadata.py<|end_file_name|><|fim▁begin|># @license
# Copyright 2020 Google LLC. 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/lice... |
# Convert and store model to file.
args = [
'tensorflowjs_converter', |
<|file_name|>TextMarkerActivity.java<|end_file_name|><|fim▁begin|>package tk.zielony.carbonsamples.feature;
import android.app.Activity;
import android.os.Bundle;
import tk.zielony.carbonsamples.R;
/**
* Created by Marcin on 2016-03-13.<|fim▁hole|>public class TextMarkerActivity extends Activity {
@Override
... | */ |
<|file_name|>default.py<|end_file_name|><|fim▁begin|>from src.settings import Colors
def league_color(league: str) -> Colors:<|fim▁hole|> if league in [
]:
return Colors.GREEN
if league in [
'1 CFL (Montenegro)',
'A Lyga (Lithuania)',
'Bikar (Iceland)',
'Coupe de la... | |
<|file_name|>CompFormDate.js<|end_file_name|><|fim▁begin|>import React, { Component, PropTypes } from 'react';
import DatePicker from 'material-ui/lib/date-picker/date-picker';
import * as layouts from '../../store/db_layouts.js';
function fmtDate( dt ) {
return dt.toLocaleDateString();
}
const CompFormDate = (pro... | value: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired
};
|
<|file_name|>panels.py<|end_file_name|><|fim▁begin|>from debug_toolbar.panels.templates import TemplatesPanel as BaseTemplatesPanel
class TemplatesPanel(BaseTemplatesPanel):
def generate_stats(self, *args):
template = self.templates[0]['template']
if not hasattr(template, 'engine') and hasattr(tem... | return super().generate_stats(*args) |
<|file_name|>context-menus-main.js<|end_file_name|><|fim▁begin|>const {ipcFuncMain, ipcFuncMainCb, getIpcNameFunc, sendToBackgroundPage} = require('./util-main')
const {ipcMain} = require('electron')
const getIpcName = getIpcNameFunc('ContextMenus')
const extInfos = require('../../extensionInfos')
const sharedState = r... | console.log('contextMenu', 'create', extensionId, createProperties)
const manifest = extInfos[extensionId].manifest |
<|file_name|>grover_example.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""Grover's quantum search algorithm example."""
from sympy import pprint
from sympy.physics.quantum import qapply
from sympy.physics.quantum.qubit import IntQubit
from sympy.physics.quantum.grover import (OracleGate, superposition_basi... | psi = superposition_basis(nqubits)
print('psi:')
pprint(psi) |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | from oplogreplayer import OplogReplayer |
<|file_name|>proxy_ssh.go<|end_file_name|><|fim▁begin|>package glutton
import (
"bytes"
"context"
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"fmt"
"io"
"net"
"net/url"
"github.com/lunixbochs/vtclean"
"go.uber.org/zap"
"golang.org/x/crypto/ssh"
)
type sshProxy struct {
logger *zap.Logge... | |
<|file_name|>FastPartitioner.java<|end_file_name|><|fim▁begin|>/*******************************************************************************
* Copyright (c) 2000, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse... | |
<|file_name|>bigbob9_c.py<|end_file_name|><|fim▁begin|>#/* bigbob9.py - demo ranger interface
# * K. Nickels 7/24/13
# */
# Check with "locate playerc.py"
import sys,os
sys.path.append('/usr/local/lib/python2.7/site-packages/')
sys.path.append('/usr/local/lib64/python2.7/site-packages/')
import math
from playerc impo... | toothProxy = playerc_ranger(robot,1)
if toothProxy.subscribe(PLAYERC_OPEN_MODE):
raise Exception(playerc_error_str())
laserProxy = playerc_ranger(robot,2) |
<|file_name|>browserify.js<|end_file_name|><|fim▁begin|>/* jshint multistr:true */
/* jshint -W040 */
'use strict';
var envify = require('envify/custom');
var es3ify = require('es3ify');
var grunt = require('grunt');
var UglifyJS = require('uglify-js');
var uglifyify = require('uglifyify');
var derequire = require('d... | |
<|file_name|>zones_rest.py<|end_file_name|><|fim▁begin|># =============================================================================
# Copyright [2013] [Kevin Carter]
# License Information :
# This software has no warranty, it is provided 'as is'. It is your
# responsibility to validate the behavior of the routines ... | |
<|file_name|>test_views.py<|end_file_name|><|fim▁begin|>from django.contrib.auth import get_user_model
# from django.urls import reverse
from model_bakery import baker
from tenant_schemas.test.cases import TenantTestCase
from tenant_schemas.test.client import TenantClient
# from siteconfig.models import SiteConfig
fro... | self.assert200('djcytoscape:quest_map_personalized', args=[self.map.id, self.test_student1.id])
# need to build interlinked maps to test this. Do in own test
# self.assert200('djcytoscape:quest_map_interlink', args=[1, 1, 1]) |
<|file_name|>x86.cpp<|end_file_name|><|fim▁begin|>// x86.cpp
<|fim▁hole|>UInt32 CBCJ_x86_Encoder::SubFilter(Byte *data, UInt32 size)
{
return (UInt32)::x86_Convert(data, size, _bufferPos, &_prevMask, 1);
}
UInt32 CBCJ_x86_Decoder::SubFilter(Byte *data, UInt32 size)
{
return (UInt32)::x86_Convert(data, size, _buffe... | #include "StdAfx.h"
#include "x86.h"
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""The application's model objects"""
from zope.sqlalchemy import ZopeTransactionExtension
from sqlalchemy.orm import scoped_session, sessionmaker
# from sqlalchemy import MetaData
from sqlalchemy.ext.declarative import declarative_base
# G... | |
<|file_name|>pipeline.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 bluetooth_traits::BluetoothRequest;
use compositing::Com... |
/// A channel to the compositor.
pub compositor_proxy: Box<CompositorProxy + 'static + Send>,
|
<|file_name|>.eslintrc.js<|end_file_name|><|fim▁begin|>module.exports = {
ignorePatterns: ['bin', 'commitlint.config.js'],
extends: [
'plugin:@typescript-eslint/recommended',
'prettier',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
parser: '@typescript-eslint/parser',
parse... | plugins: ['@typescript-eslint', 'prettier'],
rules: { |
<|file_name|>convert_obj_three.py<|end_file_name|><|fim▁begin|>"""Convert Wavefront OBJ / MTL files into Three.js (JSON model version, to be used with ascii / binary loader)
-------------------------
How to use this converter
-------------------------
python convert_obj_three.py -i infile.obj -o outfile.js [-m "morph... | |
<|file_name|>main.hpp<|end_file_name|><|fim▁begin|>#ifndef __MAIN_HPP__
#define __MAIN_HPP__
#include <iostream>
#include <unistd.h>
#include <string>
#include <vector>
#include <stdint.h> // Para usar uint64_t
#include "hanoi.hpp"
#include "statistical.hpp"
#include "ClaseTiempo.hpp"
#define cls() system("clear");
... |
long long combinatorio_recursivo_2(const int &n, const int &k, std::vector<std::vector< long long > > &aux){
int a; |
<|file_name|>ResteasyConstraintViolation.java<|end_file_name|><|fim▁begin|>package org.jboss.resteasy.api.validation;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author <a href... | this.constraintType = constraintType;
this.path = path;
this.message = message;
this.value = value; |
<|file_name|>148.js<|end_file_name|><|fim▁begin|>require("./18.js");
require("./37.js");
require("./74.js");
require("./147.js");<|fim▁hole|><|fim▁end|> | module.exports = 148; |
<|file_name|>ServiceGestionConteo.java<|end_file_name|><|fim▁begin|>package org.mivotocuenta.client.service;
import org.mivotocuenta.server.beans.Conteo;
import org.mivotocuenta.shared.UnknownException;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePat... | @RemoteServiceRelativePath("servicegestionconteo")
public interface ServiceGestionConteo extends RemoteService {
Boolean insertarVoto(Conteo bean) throws UnknownException;
} |
<|file_name|>projection-no-regions-closure.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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://... | |
<|file_name|>align.py<|end_file_name|><|fim▁begin|>'''
alignment utility functions
'''
import os
import sys
import subprocess
import logging
import mmap
import gzip
import multiprocessing
from operator import itemgetter
import numpy as np
## public functions ##
def pair_alignment(paths, args):
""" creates the al... | for line in fin: |
<|file_name|>test_sleepiq.py<|end_file_name|><|fim▁begin|>"""The tests for SleepIQ binary sensor platform."""
import unittest
from unittest.mock import MagicMock
import requests_mock
from homeassistant.setup import setup_component
from homeassistant.components.binary_sensor import sleepiq
from tests.components.test_... | from tests.common import get_test_home_assistant
|
<|file_name|>world.rs<|end_file_name|><|fim▁begin|>use Scalar;
use maths::Vec3D;
use utils::{Ref, Handle};
use dynamics::{DynamicBody, FixedBodyDef, RigidBodyDef};
use collisions::Contact;
use collisions::shapes::Ray;<|fim▁hole|>pub trait World<T> where T: DynamicBody {
fn update(&mut self, time_step: Scalar) -> Ve... | |
<|file_name|>search_column.js<|end_file_name|><|fim▁begin|>define(function (require) {
'use strict';
/**
* Module dependencies
*/
var defineComponent = require('flight/lib/component');
var tweetItems = require('component/tweet_items');
var templates = require('templates');
var _ = require('undersco... | this.select('titleSelector')[0].childNodes[0].bind( |
<|file_name|>pyunit_DEPRECATED_link_functions_binomialGLM.py<|end_file_name|><|fim▁begin|>import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
import pandas as pd
import zipfile
import statsmodels.api as sm
def link_functions_binomial():
print("Read in prostate data.")
h2o... | |
<|file_name|>path.rs<|end_file_name|><|fim▁begin|>use std::io::fs::PathExtensions;
<|fim▁hole|>fn main() {
// Create a `Path` from an `&'static str`
let path = Path::new(".");
// The `display` method returns a `Show`able structure
let display = path.display();
// Check if the path exists
if pa... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import { tools as _, eventsApi } from '../../object-plus'
export * from './any'
export * from './owned'
export * from './date'
export * from './basic'
export * from './shared'
export * from './updates'
export * from './attrDef'
import { AnyType } from './any'
import ... | |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.contrib.auth.models import User
class StockStatus(models.Model):
date = models.DateTimeField(auto_now_add=True)
price = models.FloatField()
change = models.FloatField()
volume = models.IntegerField()
averag... | history = models.ManyToManyField(Order)
positions = models.ManyToManyField(Position)
value = models.FloatField() |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from rest_framework import serializers
from .models import Community, Objective, SocialNetwork, Sector<|fim▁hole|> model = Objective
class CommunitySerializer(serializers.ModelSerializer):
objectives = ObjectiveSerializer(many=True)
class Meta:
... |
class ObjectiveSerializer(serializers.ModelSerializer):
class Meta: |
<|file_name|>PaqueteDeViajeBL.java<|end_file_name|><|fim▁begin|>package co.edu.udea.ingenieriaweb.admitravel.bl;
import java.util.List;
import co.edu.udea.ingenieriaweb.admitravel.dto.PaqueteDeViaje;
import co.edu.udea.ingenieriaweb.admitravel.util.exception.IWBLException;
import co.edu.udea.ingenieriaweb.admitravel.... |
PaqueteDeViaje obtener(String idPaquete) throws IWDaoException, IWBLException;
|
<|file_name|>securestring.py<|end_file_name|><|fim▁begin|># Copyright 2015, Nashwan Azhari.
# Licensed under the GPLv2, see LICENSE file for details.
"""
A pure Python implementation of the functionality of the ConvertTo-SecureString
and ConvertFrom-SecureString PoweShell commandlets.
Usage example:
from securestring... | def decrypt(input):
"""Decrypts the given hexadecimally-encoded string in conformity
with CryptUnprotectData. |
<|file_name|>GUIError.java<|end_file_name|><|fim▁begin|>import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextPane;
import java.awt.SystemCo... | JTextPane textError = new JTextPane();
textError.setText(errorMessage); |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) {
grunt.initConfig({
// package.json is shared by all examples
pkg: grunt.file.readJSON('../../package.json'),
// Uglify the file at `src/foo.js` and output the result to `dist/foo.min.js`
//
// It's likely t... | files: {
'dist/foo.min.js': 'src/foo.js' // destination: source
} |
<|file_name|>autoLayerDriver.C<|end_file_name|><|fim▁begin|>/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright held by orig... | Info<< nl
<< "Undo iteration " << iteration << nl
<< "----------------" << endl;
|
<|file_name|>career.js<|end_file_name|><|fim▁begin|>import { combineReducers } from 'redux';
import { ADDED_ACCEPTOR_CAREER,
DELETED_ACCEPTOR_CAREER,
INIT_ACCEPTOR_CAREER_HISTORY,
FETCH_FAILED, FETCHING } from '../../constants';
const error = (state = null, action) => {
switch (action.type) {
case FETCH_FA... | name !== action.career.name || year !== action.career.year);
default:
return state; |
<|file_name|>_msiecookiejar.py<|end_file_name|><|fim▁begin|>"""Microsoft Internet Explorer cookie loading on Windows.
Copyright 2002-2003 Johnny Lee <typo_pl@hotmail.com> (MSIE Perl code)
Copyright 2002-2006 John J Lee <jjl@pobox.com> (The Python port)
This code is free software; you can redistribute it and/or modify... | index = open(filename, "rb")
try: |
<|file_name|>karma.conf.js<|end_file_name|><|fim▁begin|>// Karma configuration
// Generated on Wed Jun 01 2016 16:04:37 GMT-0400 (EDT)
module.exports = function (config) {
config.set({
basePath: '',
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['moch... | },
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['mocha'], |
<|file_name|>bignum.rs<|end_file_name|><|fim▁begin|>// Adapted from https://github.com/Alexhuszagh/rust-lexical.
//! Big integer type definition.
use super::math::*;
use alloc::vec::Vec;
/// Storage for a big integer type.
#[derive(Clone, PartialEq, Eq)]
pub(crate) struct Bigint {
/// Internal storage for the Bi... | |
<|file_name|>html.py<|end_file_name|><|fim▁begin|>from django.utils.safestring import mark_safe
from django.contrib.staticfiles.templatetags.staticfiles import static<|fim▁hole|> static('manager/padlock_close.png')
))
def unlocked():
return mark_safe('<img src="%s" alt="locked" style="border:0px; margi... |
def locked():
return mark_safe('<img src="%s" alt="locked" style="border:0px; margin: 0px; padding: 0px"/>' % ( |
<|file_name|>benchmark.rs<|end_file_name|><|fim▁begin|>#![feature(test)]
extern crate test;
extern crate tinysegmenter;
use std::io::prelude::*;
use std::fs::File;
use test::Bencher;
#[bench]
fn run(b: &mut Bencher) {
// http://www.genpaku.org/timemachine/timemachineu8j.txt
let mut f =
File::open("benchmark/... | |
<|file_name|>bfe_comments.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License ... | nb_reviews = nbReviews
if nb_reviews.isdigit():
nb_reviews = int(nb_reviews)
nb_comments = nbComments |
<|file_name|>CorpusFolder.java<|end_file_name|><|fim▁begin|>/*
* Copyright Anatoly Starostin (c) 2017.
*/
package treeton.prosody.corpus;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import treeton.core.config.BasicConfiguration;
import treeton.core.util.xml.XMLParser;
import j... | Element parent = doc.createElement("parent");
parent.setTextContent(parentFolder.getGuid());
result.appendChild(parent); |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2021 Luca Falavigna
#
# Author: Luca Falavigna <dktrkranz@debian.org>
#<|fim▁hole|># it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 3 of the License.
#
# This pr... | # This program is free software; you can redistribute it and/or modify |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from io import open
from setuptools import setup
about = {}
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'stringsheet', '__init__.py'), encoding='utf-8') as f:
for line in f:
if line.startswith('__'):
... | import os
|
<|file_name|>mocha.js<|end_file_name|><|fim▁begin|>import { describe, it, beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import startApp from 'my-app/tests/helpers/start-app';
import { run } from '@ember/runloop';
describe('Acceptance | foo', function () {
let application;
beforeEach(functio... | });
afterEach(function () { |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.<|fim▁hole|># Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-647188
#
# For details, see ... | # Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack. |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2018 Benjamin Fry <benjaminfry -@- me.com>
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. Thi... |
pub mod authority;
mod config; |
<|file_name|>script.js<|end_file_name|><|fim▁begin|>angular.module('listDemo1', ['ngMaterial'])
.config(function($mdIconProvider) {
$mdIconProvider
.iconSet('communication', 'img/icons/sets/communication-icons.svg', 24);
})
.controller('AppCtrl', function($scope) {
var imagePath = 'img/60.jpeg';
$scope.p... | |
<|file_name|>suggestions.py<|end_file_name|><|fim▁begin|># 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 indico.core.db import db
from indico.util.st... | )
# relationship backrefs:
# - user (User.suggested_categories) |
<|file_name|>ScrollAwareFABBehavior.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");<|fim▁hole|> *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distri... | * 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 |
<|file_name|>TestPrms.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2010-2015 Pivotal Software, 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
*
* htt... | *
* A class used to store keys for Admin API region "keep alive" Tests
*
*/ |
<|file_name|>snapshot.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# pylint: disable=invalid-name
# Copyright 2017 IBM RESEARCH. 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... | qubit[1])) |
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Generated by typings
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/7d23177b1abff1b80b9a2d6ffbc881f6562a2359/hapi/hapi.d.ts
declare module "hapi" {
import http = require("http");
import stream = require("stream");
import Events = r... | // server.mime.path('file.npm').type === 'node/module'*/
mime: any;
/**server.plugins |
<|file_name|>v8-convert.hpp<|end_file_name|><|fim▁begin|>#if !defined(CODE_GOOGLE_COM_P_V8_CONVERT_V8_CONVERT_HPP_INCLUDED)
#define CODE_GOOGLE_COM_P_V8_CONVERT_V8_CONVERT_HPP_INCLUDED 1
// Doxygen REFUSES to use this block as namespace docs: @namespace cvv8
/** @mainpage libv8-convert (cvv8)
The cvv8 namespace (form... | #endif /* CODE_GOOGLE_COM_P_V8_CONVERT_V8_CONVERT_HPP_INCLUDED */ |
<|file_name|>issue-4570.ts<|end_file_name|><|fim▁begin|>import "reflect-metadata";
import {expect} from "chai";
import {ColumnOptions, PrimaryColumn} from "../../../src";
describe("github issues > #4570 Fix PrimaryColumn decorator modifies passed option", () => {
it("should not modify passed options to PrimaryCol... | @PrimaryColumn(options)
pkey: string; |
<|file_name|>cpu.rs<|end_file_name|><|fim▁begin|>extern crate rand;
use self::rand::ThreadRng;
use self::rand::Rng;
pub struct Cpu {
pub registers: Reg,
rng: ThreadRng,
}
impl Cpu {
pub fn init() -> Self {<|fim▁hole|> Cpu {
registers: Reg::default(),
rng: rand::thread_rng(... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.generic import ListView<|fim▁hole|>from models import Project
# Create your views here.
class ListProjectView(ListView):
model = Project
template_name = 'cmsplugin_vfoss_project/project_list.html'<|fim▁end|> | |
<|file_name|>center_page.js<|end_file_name|><|fim▁begin|>(function() {
var head = document.head || document.getElementsByTagName('head')[0];
var style = null;
var mobileScreenWidth = 768;
// Make sure this value is equal to the width of .wy-nav-content in overrides.css.
var initialContentWidth = 960;
// Ma... | modifiers: [
interact.modifiers.restrictEdges({
outer: 'parent',
endOnly: true |
<|file_name|>betaserialization.py<|end_file_name|><|fim▁begin|>"""
extend TiddlyWiki serialization to optionally use beta or
externalized releases and add the UniversalBackstage.
activated via "twrelease=beta" URL parameter or ServerSettings,
see build_config_var
"""
import logging
from tiddlyweb.util import read_u... |
def _get_wiki(self):
beta = external = False |
<|file_name|>tpm.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python
"""Team Password Manager API
To simplify usage of Team Password Manager API.
You can authenticate with username and password
>>> import tpm
>>> URL = "https://mypasswordmanager.example.com"
>>> USER = 'MyUser'
>>> PASS = 'Secret'
... | NewID = self.post('users_ldap.json', data).get('id') |
<|file_name|>rect.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The sdl2-rs Developers.
//
// 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/LICENS... | }
|
<|file_name|>layer_function_generator.py<|end_file_name|><|fim▁begin|># Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... | if not isinstance(val, list) and not isinstance(val, tuple): |
<|file_name|>ParseFileService.js<|end_file_name|><|fim▁begin|>'use strict';
/* global Parse */
angular.module('main').factory('ParseFile', function ($q) {
return {
upload: function (base64) {
var defer = $q.defer();
var parseFile = new Parse.File('image.jpg', { base64: base64 });
parseFile.s... | defer.resolve(savedFile);
}, |
<|file_name|>transformconst.py<|end_file_name|><|fim▁begin|>"""treetools: Tools for transforming treebank trees.
transformations: constants and utilities
Author: Wolfgang Maier <maierw@hhu.de>
"""
from . import trees
# Head rules for PTB (WSJ) from Collins (1999, p. 240)
HEAD_RULES_PTB = {
'adjp' : [('left-to-ri... | 'ql' : [('right-to-left', '')], |
<|file_name|>mode-asciidoc.js<|end_file_name|><|fim▁begin|>"use strict";
define("ace/mode/asciidoc_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules... | |
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>const path = require("path");
const webpack = require("webpack");
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const CopyWebpackPlugin = require('copy-webpack-plugin');
var babelOpt... | ]),
devServer: {
contentBase: './static/', |
<|file_name|>categories_request_body.py<|end_file_name|><|fim▁begin|># coding: utf-8
"""
Salt Edge Account Information API
API Reference for services # noqa: E501
OpenAPI spec version: 5.0.0
Contact: support@saltedge.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
impor... |
def __repr__(self):
"""For `print` and `pprint`""" |
<|file_name|>acceptancetest.py<|end_file_name|><|fim▁begin|>import hashlib
import shutil
import os
from datetime import datetime
list_of_paths_and_strings = [
["assignment1.cpp", "main()"]
]
def main():
if acceptance_test():
make_txt_file()
zip_dir()
<|fim▁hole|> # opening file
file_to_hash = open(... |
def get_md5_hash(file):
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Clustalw modules
"""
A set of classes to interact with the multiple alignment command
line program clustalw.
Clustalw is the command line version of the graphical Clustalx
aligment program.
This requires clustalw available from:
ftp://ftp-igbmc.u-strasbg.fr/... | # general options
if self.type: |
<|file_name|>analysis.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, os
my_site = os.path.join(os.environ["HOME"], ".local/lib/python2.7/site-packages")
sys.path.insert(0, my_site)
import h5py
import networkx as nx
import numpy as np
import pycuda.driver as cuda
import scipy... | |
<|file_name|>adjglobals.py<|end_file_name|><|fim▁begin|>import coeffstore
import expressions
import caching
import libadjoint
from dolfin_adjoint import backend
if backend.__name__ == "dolfin":
import lusolver
# Create the adjointer, the central object that records the forward solve
# as it happens.
adjointer = li... | return adjointer.to_html(*args, **kwargs)
def adj_reset():
'''Forget all annotation, and reset the entire dolfin-adjoint state.''' |
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># Generated by Django 3.2 on 2021-08-25 20:55<|fim▁hole|>from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ville... | |
<|file_name|>script_thread.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 script thread is the thread that owns the DOM i... | cancelled: Arc<AtomicBool>,
inner: Box<T>,
} |
<|file_name|>__main__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys<|fim▁hole|>
from . import main
if __name__ == '__main__':
sys.exit(main.main())<|fim▁end|> | |
<|file_name|>social.go<|end_file_name|><|fim▁begin|>// Copyright 2014 beego 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
//... | func (this *SocialAuth) getProvider(ctx *context.Context) Provider {
path := ctx.Input.Param(":splat") |
<|file_name|>AeseXMLImportHandler.java<|end_file_name|><|fim▁begin|>/* This file is part of calliope.
*
* calliope 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
* ... | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. |
<|file_name|>ex_heap1.py<|end_file_name|><|fim▁begin|>from pwn import *
#change the host IP to your IP
sh = ssh(host='192.168.1.104', user='root',
password='godmode', port=22)
cmd = sh.set_working_directory('/opt/protostar/bin')
e = ELF("./heap1")
puts_add = p32(e.got["puts"])
winner = pack(0x8048494)... | |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (c) 2009, Purdue University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source co... | #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import *
from models import Entry, Tag
from django.views.generic.dates import ArchiveIndexView, DateDetailView
from django.views.generic import TemplateView
urlpatterns = patterns('',
url(r'^/?$', ArchiveIndexView.as_view(model=Entry,... | url(r'^(?P<year>\d+)/(?P<month>[-\w]+)/(?P<day>\d+)/(?P<pk>\d+)/$',
DateDetailView.as_view(model=Entry, date_field="published_on"),
name="news_detail"), |
<|file_name|>elmongo.js<|end_file_name|><|fim▁begin|>var request = require('request'),
mongoose = require('mongoose'),
util = require('util'),
url = require('url'),
helpers = require('./helpers'),
sync = require('./sync')
// turn off request pooling
request.defaults({ agent:false })
// cache elast... | return
}
self.emit('elmongo-unindexed', body) |
<|file_name|>default_settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os.path
from btb.log_filter import skip_unreadable_post
BASE_DIR = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
TEST_RUNNER = 'btb.test_runner.BtbTestRunner'
#
# Locale
#
TIME_ZONE = 'US/Eastern'
LANGUAGE_CODE ... | 'sorl.thumbnail', |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Licensed under the MIT License <LICENSE.md>
//! FFI bindings to schannel.
#![no_std]
#![experimental]
extern crate winapi;
use winapi::*;
extern "system" {
}<|fim▁end|> | // Copyright © 2015, Peter Atashian |
<|file_name|>DefaultBuilderStrategySupport.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.ap... | final String builderMethodName = AnnotationUtil.getDeclaredStringAttributeValue(annotation, "builderMethodName");
return StringUtil.isEmpty(builderMethodName) ? "builder" : builderMethodName; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.