prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>zip.js<|end_file_name|><|fim▁begin|>/* */
"use strict";
var __extends = (this && this.__extends) || function(d, b) {
for (var p in b)
if (b.hasOwnProperty(p))
d[p] = b[p];
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototyp... | |
<|file_name|>User.js<|end_file_name|><|fim▁begin|>"use strict";
var EventEmitter = require('events').EventEmitter;
var util = require( './util' );
/**
* Single user on the server.
*/
var User = function(data, client) {
this.client = client;
this._applyProperties(data);
};
User.prototype = Object.create(Eve... | |
<|file_name|>SortMe.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h>
template<typename T> T gcd(T a, T b) {
if(!b) return a;
return gcd(b, a % b);
}
template<typename T> T lcm(T a, T b) {
return a * b / gcd(a, b);
}
template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; }
template<type... | |
<|file_name|>validator.py<|end_file_name|><|fim▁begin|>"""Routines for bubble format validation"""
import os
import itertools as it
from collections import Counter
from bubbletools.bbltree import BubbleTree
from bubbletools import utils
def validate(bbllines:iter, *, profiling=False):
"""Yield lines of warnings... | [1, 3]
|
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub struct RailFence;
impl RailFence {
pub fn new(rails: u32) -> RailFence {<|fim▁hole|> }
pub fn encode(&self, text: &str) -> String {
unimplemented!("Encode this text: {}", text)
}
pub fn decode(&self, cipher: &str) -> String {
uni... | unimplemented!("Construct a new fence with {} rails", rails) |
<|file_name|>ex4_9.go<|end_file_name|><|fim▁begin|>package main
import (
"bufio"
"os"
"fmt"
)
func main() {
counts := make(map[string]int)
<|fim▁hole|> }
defer fileReader.Close()
scanner := bufio.NewScanner(fileReader)
// Set the split function for the scanning operation.
scanner.Split(bufio.ScanWords)
for... | fileReader, err := os.Open("words.txt")
if err != nil {
fmt.Println(err)
os.Exit(1) |
<|file_name|>phases.py<|end_file_name|><|fim▁begin|>from base import Phase
<|fim▁hole|>preparation = Phase('Preparation', 'Initializing connections, fetching data etc.')
volume_creation = Phase('Volume creation', 'Creating the volume to bootstrap onto')
volume_preparation = Phase('Volume preparation', 'Formatting the b... | |
<|file_name|>TaskCondition.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>
interface TaskCondition{
onAccept(task: TaskConditionContext);
}
class NPCTalkTaskCondition implements TaskCondition{
onAccept(task:TaskConditionContext){
task.onFinish();
}
}
class KillMonsterTaskCondition implements TaskCondi... | interface TaskConditionContext{
setCurrent():void;
onFinish():void;
} |
<|file_name|>bin.py<|end_file_name|><|fim▁begin|>#PROJECT
from outcome import Outcome
from odds import Odds
class Bin:
def __init__(
self,
*outcomes
):
self.outcomes = set([outcome for outcome in outcomes])
def add_outcome(
self,
outcome
):
self.outcome... | self.line_bets()
self.dozen_bets()
self.column_bets()
self.even_money_bets() |
<|file_name|>NCBITaxResult.java<|end_file_name|><|fim▁begin|>package uk.ac.ebi.ddi.extservices.entrez.ncbiresult;
<|fim▁hole|> * @author Yasset Perez-Riverol (ypriverol@gmail.com)
* @date 18/05/2015
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class NCBITaxResult {
@JsonProperty("header")
NCBIHeade... | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/** |
<|file_name|>StructType.ts<|end_file_name|><|fim▁begin|>import { Type } from '~/syntax/types/Type';
import INodeVisitor from '~/syntax/INodeVisitor';
import { nonTerminal, parser, exp, ParseResult } from '~/parser/Parser';
import { TokenType, Token } from '~/parser/Tokenizer';
const Field = {
typeNode: exp(Type, ... | this.fields.push({ type: field.typeNode as Type, name: name.image });
this.registerLocation(`field_${name}`, name.getLocation());
}
} |
<|file_name|>HTMLShadowElement.js<|end_file_name|><|fim▁begin|>/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is goverened by a BSD-style
* license that can be found in the LICENSE file.
*/
suite('HTMLShadowElement', function() {
<|fim▁hole|> host.innerHTML = '<a>a</a><b... | var unwrap = ShadowDOMPolyfill.unwrap;
test('olderShadowRoot', function() {
var host = document.createElement('div'); |
<|file_name|>i18n.js<|end_file_name|><|fim▁begin|>define([], function() {
return function($translateProvider) {
$translateProvider.translations('en', {
WELCOME_TO_PIO: 'Welcome to PIO',
SIGN_IN: 'Sign in',
SIGN_UP: 'Sign up',
SIGN_OUT: 'Sign out',
... | |
<|file_name|>RelayDefaultNetworkLayer.js<|end_file_name|><|fim▁begin|>/**
* Copyright 2013-2015, Facebook, Inc.
* 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 f... | ).then(payload => {
if (payload.hasOwnProperty('errors')) { |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* Asserts that device property values match properties in |expectedProperties|.
* The method will ... | chrome.test.assertEq(0, deviceChangedListener.eventCount); |
<|file_name|>crate_a2.rs<|end_file_name|><|fim▁begin|>pub struct Foo;
pub trait Bar{}
pub fn bar() -> Box<Bar> {<|fim▁hole|>}<|fim▁end|> | unimplemented!() |
<|file_name|>JpaUtil.java<|end_file_name|><|fim▁begin|>package com.target.control;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
<|fim▁hole|> static {
try {
factory = Persistence.createEntityManagerFactory("jpa");
em = fact... | public class JpaUtil {
private static EntityManager em;
private static EntityManagerFactory factory;
|
<|file_name|>buffer-concat.js<|end_file_name|><|fim▁begin|>'use strict';
const common = require('../common.js');
const bench = common.createBenchmark(main, {
pieces: [1, 4, 16],
pieceSize: [1, 16, 256],
withTotalLength: [0, 1],
n: [1024]
});
function main(conf) {<|fim▁hole|> const pieces = +conf.pieces;
c... | const n = +conf.n;
const size = +conf.pieceSize; |
<|file_name|>AddIn.cpp<|end_file_name|><|fim▁begin|>//Copyright (c) Microsoft Corporation. All rights reserved.
// AddIn.cpp : Implementation of DLL Exports.
#include "stdafx.h"
#include "resource.h"
#include "AddIn.h"
CAddInModule _AtlModule;
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance,... |
// Get the short module name.
TCHAR moduleShortName[_MAX_PATH];
ptr = _tcsrchr(moduleName, '\\'); |
<|file_name|>_9_3_normal_visualization.rs<|end_file_name|><|fim▁begin|>#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
use std::ffi::CStr;
extern crate glfw;
use self::glfw::Context;
extern crate gl;
use cgmath::{Matrix4, Deg, vec3, Point3, perspective};
use common::{process_events, processInput};
use ... | // render
// ------
unsafe {
gl::ClearColor(0.1, 0.1, 0.1, 1.0); |
<|file_name|>iPushable.cpp<|end_file_name|><|fim▁begin|>/*----------------------------------------------------------------------------------*/
//This code is part of a larger project whose main purpose is to entretain either //
//by working on it and helping it be better or by playing it in it's actual state // ... | }
std::pair<int, int> iPushable::onPush(Entity *ent, Direction dir){
// mover en base al stepPushDist si no estamos locked
|
<|file_name|>babel.config.js<|end_file_name|><|fim▁begin|>module.exports = (api) => {
api.cache(true);
return {
presets: [
[
"@babel/preset-env",
{
useBuiltIns: "usage",
corejs: 3,
},
],
],<|fim▁hole|><|fim▁end|> | };
}; |
<|file_name|>upgrade.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
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 u... | "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf-8
from __future__ import absolute_import
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under term... | },
"octoprint.server.util.flask": { |
<|file_name|>mixer.js<|end_file_name|><|fim▁begin|>/*
* Copyright © 2020 Luciano Iam <oss@lucianoiam.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, ... | } else { |
<|file_name|>pool.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 std::collections::HashMap;
use std::iter::FromIterator;
use std... | |
<|file_name|>papatcher.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
# vim:fileencoding=utf-8:ts=8:et:sw=4:sts=4:tw=79
"""
papatcher.py: simple python PA patcher
Copyright (c) 2014 Pyrus <pyrus@coffee-break.at>
See the file LICENSE for copying permission.
"""
from argparse import ArgumentParser
from concurr... | for stream in result["Streams"]}
return self._streams
|
<|file_name|>UsersFullAccount.cpp<|end_file_name|><|fim▁begin|>/**********************************************************
DO NOT EDIT
This file was generated from stone specification "users"
www.prokarpaty.net
***********************************************************/
#include "dropbox/users/UsersFullAccount.h"
... |
}//users |
<|file_name|>EntityAITradePlayer.java<|end_file_name|><|fim▁begin|>package net.minecraft.entity.ai;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
public class EntityAITradePlay... | } else {
EntityPlayer var1 = this.field_75276_a.func_70931_l_();
return var1 == null?false:(this.field_75276_a.func_70068_e(var1) > 16.0D?false:var1.field_71070_bA instanceof Container);
} |
<|file_name|>new_task.rs<|end_file_name|><|fim▁begin|>use lapin::{options::*, types::FieldTable, BasicProperties, Connection, ConnectionProperties};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args: Vec<_> = std::env::args().skip(1).collect();<|fim▁hole|> };
let addr = "a... | let message = match args.len() {
0 => b"hello".to_vec(),
_ => args.join(" ").into_bytes(), |
<|file_name|>base.py<|end_file_name|><|fim▁begin|># This file is part of xmpp-backends (https://github.com/mathiasertl/xmpp-backends).
#
# xmpp-backends 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 ver... | """Check the email address of a user.
**Note:** Most backends don't implement this feature.
|
<|file_name|>rtdeps.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015 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/lic... | #![unstable(feature = "std_misc")] |
<|file_name|>products-edit.js<|end_file_name|><|fim▁begin|>var EcommerceProductsEdit = function () {
var handleImages = function() {
// see http://www.plupload.com/
var uploader = new plupload.Uploader({
runtimes : 'html5,html4',
browse_button : document.getElement... | errorPlacement: function(error, element) {
if(element.parent('.input-group').length) {
error.insertAfter(element.parent()); |
<|file_name|>FunnelChart.tsx<|end_file_name|><|fim▁begin|>/**
* @fileOverview Funnel Chart
*/
import { generateCategoricalChart } from './generateCategoricalChart';
import { Funnel } from '../numberAxis/Funnel';<|fim▁hole|>export const FunnelChart = generateCategoricalChart({
chartName: 'FunnelChart',
GraphicalCh... | import { CategoricalChartOptions } from '../util/types';
|
<|file_name|>ShutdownHooks.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2002-2015, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* http://www.opensource.org/licenses/bsd-licen... | // Iterate through copy of tasks list |
<|file_name|>sndhdr.py<|end_file_name|><|fim▁begin|>"""Routines to help recognizing sound files.
Function whathdr() recognizes various types of sound file headers.
It understands almost all headers that SOX can decode.
The return tuple contains the following items, in this order:
- file type (as SOX understands it)
-... | f.seek(0)
try: |
<|file_name|>testes_notificacao.py<|end_file_name|><|fim▁begin|># coding=utf-8
# ---------------------------------------------------------------
# Desenvolvedor: Arannã Sousa Santos
# Mês: 12
# Ano: 2015
# Projeto: pagseguro_xml
# e-mail: asousas@live.com
# --------------... | PAGSEGURO_API_TOKEN_PRODUCAO = u''
PAGSEGURO_API_TOKEN_SANDBOX = u'' |
<|file_name|>test-03.logfile.js<|end_file_name|><|fim▁begin|>'use strict';
var
lab = require('lab'),
describe = lab.describe,
it = lab.it,
demand = require('must'),
bole = require('bole'),
fs = require('fs'),
LogOutput = require('../lib/output-logfile'),
mkd... | |
<|file_name|>k.py<|end_file_name|><|fim▁begin|>n = int(input())
st = [(-1, -2)]
s = 0
for i, h in enumerate(map(int, input().split() + [' -1'])):
if h > st[-1][1]:
st.append((i, h))<|fim▁hole|> while st[-1][1] >= h:
r = st.pop()
s = max(s, (i - r[0]) * r[1])
st.append(... | else: |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from flask import render_template, flash, redirect, request, url_for, abort
from flask_login import login_user, logout_user, login_required, current_user
from . import loans
from forms import LoanApplicationForm, ApproveLoan, RepayLoan
from ..models import db
from ..mo... | if not current_user.is_approved:
abort(404) |
<|file_name|>BibColoringPreferencePage.java<|end_file_name|><|fim▁begin|>/*
* $Id$
*
* Copyright (c) 2004-2005 by the TeXlapse Team.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and... | */
public void init(IWorkbench workbench) { |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub mod math;
pub mod system;
pub mod renderer;
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
}
#[test]
fn fs_tests() {
use system::filesystem;
use system::config;<|fim▁hole|> // read random file
let s = filesystem:... | |
<|file_name|>imtools.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import logging
import inspect
import numpy as np
#from matplotlib import _cntr as cntr
#from contours.core import shapely_formatter as shapely_fmt
#from contours.quad import QuadContourGenerator
from astropy.coordinates import Angle
from astr... | # #c = cntr.Cntr(x, y, z)
#
# segments = [] |
<|file_name|>feed_parse_extractDlscanlationsCom.py<|end_file_name|><|fim▁begin|>def extractDlscanlationsCom(item):
'''
Parser for 'dlscanlations.com'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None<|fim▁hole|>
... | |
<|file_name|>packing.js<|end_file_name|><|fim▁begin|>var global = require('../../global');
module.exports = function (packing, offset) {
var items = [].concat.apply([], packing.items);
var iso = "FM.FP-GJ-15-003";
// var number = packing.code;
// var colorName = packing.colorName;
var orderType ... | |
<|file_name|>Chat.java<|end_file_name|><|fim▁begin|>/**
*
* Copyright 2003-2007 Jive Software.
*
* 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/L... | * @deprecated use <code>org.jivesoftware.smack.chat2.Chat</code> from <code>smack-extensions</code> instead.
*/
@Deprecated
public class Chat { |
<|file_name|>privateStaticNameShadowing.ts<|end_file_name|><|fim▁begin|>// @target: es2015
class X {
<|fim▁hole|> constructor() {
X.#m();
}
static #m() {
const X: any = {}; // shadow the class
const _a: any = {}; // shadow the first generated var
X.#m(); // Should check with ... | static #f = X.#m();
|
<|file_name|>IndexManager.java<|end_file_name|><|fim▁begin|>package listener;
/**
* Created by pengshu on 2016/11/11.<|fim▁hole|> */
public class IndexManager implements EntryListener {
/**
* 博客文章被创建
*
* @param entryevent
*/
@Override
public void entryAdded(EntryEvent entryevent) {
... | |
<|file_name|>MultiHandler.java<|end_file_name|><|fim▁begin|>/*
* 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
* (at your option) any later versio... | reset();
}
|
<|file_name|>LocalUriHandler.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2016 Netflix, 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/... | public class LocalUriHandler implements UriHandler {
@Override |
<|file_name|>adalogo.py<|end_file_name|><|fim▁begin|>width = 75
height = 75
data = [
0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0xf0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0xf8,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x0... | |
<|file_name|>pmod_led8.py<|end_file_name|><|fim▁begin|># Copyright (c) 2016, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must re... | |
<|file_name|>RedirectForwardSpec.js<|end_file_name|><|fim▁begin|>var helper = require("../../specRuntime/testHelper"),
Browser = require("zombie");
describe("A redirect page", () => {
helper.startServerBeforeAll(__filename, [
"./TemporaryRedirectPage",
"./TemporaryRedirectWithDocumentPage",
"./PermanentRedire... |
it("gets the right body for a permanent redirect", done => {
(new Browser).on("redirect", (req, res) => {
res.text().then(text => { |
<|file_name|>dirac-rss-list-status.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
dirac-rss-list-status
Script that dumps the DB information for the elements into the standard output.
If returns information concerning the StatusType and Status attributes.
Usage:
dirac-rss-list-status
... | #Bye |
<|file_name|>11.4.1-5-a-27-s.js<|end_file_name|><|fim▁begin|>/// Copyright (c) 2012 Ecma International. All rights reserved.
/**
* @path ch11/11.4/11.4.1/11.4.1-5-a-27-s.js
* @description Strict Mode - TypeError is thrown after deleting a property, calling preventExtensions, and attempting to reassign the property
... | a.x = 1;
return false; |
<|file_name|>interfaces.go<|end_file_name|><|fim▁begin|>package network
// Copyright (c) Microsoft and contributors. 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... | autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}", pathParameters),
autorest.WithQueryParameters(queryParamet... |
<|file_name|>CreateClusteredTableIT.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/... | private PrintStream originalPrintStream;
|
<|file_name|>user.js<|end_file_name|><|fim▁begin|>app.service('UserService', ['$http', function($http) {
return {
getLogged: function(successCallback) {
$http.get('/api/user/logged').then(successCallback);
},
<|fim▁hole|> $http.post('/api/user/pin/', user).then(successCallback... | putPin: function(user, successCallback) { |
<|file_name|>TimelineCtrl.ts<|end_file_name|><|fim▁begin|>module Timeline {
declare var vis;
export interface ITimelineScope extends ng.IScope {
vm: TimelineCtrl;
numberOfItems: number;
timeline: any;
datePickerOptions: any;
datePickerDate: Date;
}
/** Interface... | contentProperty?: string;
}
/** Interface for every group and timeline item. */ |
<|file_name|>print_needed_variables.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# print_needed_variables.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#
import os
import sys
if __name__ == '__main__' and __package__ is N... | |
<|file_name|>sample.wsgi.py<|end_file_name|><|fim▁begin|>"""
WSGI config for server_proj project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` com... | framework. |
<|file_name|>user_blackbox_test.go<|end_file_name|><|fim▁begin|>package controller_test
import (
"context"
"path/filepath"
"testing"
"github.com/fabric8-services/fabric8-wit/app/test"
"github.com/fabric8-services/fabric8-wit/gormtestsupport"
errs "github.com/pkg/errors"
uuid "github.com/satori/go.uuid"
"gith... | })
})
|
<|file_name|>Ekin_map.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Protein Engineering Analysis Tool DataBase (PEATDB)
# Copyright (C) 2010 Damien Farrell & Jens Erik Nielsen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | # -----
# |
<|file_name|>virtual-scroll-viewport.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC 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 {ListRange} from '@angular/cdk/collection... | this._rawRenderedContentTransform = transform;
this._renderedContentTransform = this._sanitizer.bypassSecurityTrustStyle(transform);
this._markChangeDetectionNeeded(() => { |
<|file_name|>Sbs.py<|end_file_name|><|fim▁begin|>class Sbs:
def __init__(self, sbsFilename, sbc_filename, newSbsFilename):
import xml.etree.ElementTree as ET
import Sbc
self.mySbc = Sbc.Sbc(sbc_filename)
self.sbsTree = ET.parse(sbsFilename)
self.sbsRoot = self.sbsTree.getr... | else:
print("\t ##### has no grid size")
# print ("writing tree out to %s" % newSbsFileName) |
<|file_name|>sitemaps.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.sitemaps import Sitemap
from . import models
class BlogSitemap(Sitemap):
changefreq = "daily"
priority = 0.5
def items(self):
return models.Post.objects.filter(is_draft=False)
... |
sitemaps = {
'blog': BlogSitemap, |
<|file_name|>problems.py<|end_file_name|><|fim▁begin|>from transitfeed import TYPE_ERROR, TYPE_WARNING, TYPE_NOTICE
from oba_rvtd_monitor.feedvalidator import LimitPerTypeProblemAccumulator
<|fim▁hole|><|fim▁end|> | class MonitoringProblemAccumulator(LimitPerTypeProblemAccumulator):
pass |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from urllib.parse import urlparse
<|fim▁hole|>from allauth.socialaccount.providers.oauth2.views import (
OAuth2CallbackView,
OAuth2LoginView,
)
from kuma.core.decorators import redirect_in_maintenance_mode
from kuma.core.ga_tracking import ACTION_AUTH_STARTED,... | from allauth.socialaccount.providers.google.views import GoogleOAuth2Adapter |
<|file_name|>orffasta.py<|end_file_name|><|fim▁begin|>"""
Creates fasta file from orfs
"""
import argparse<|fim▁hole|>import sys
import site
import re
import numpy as np
import numpy.random
base_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
base_path="%s/src"%base_path
for directory_name in os.li... | import os |
<|file_name|>transform.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 https://mozilla.org/MPL/2.0/. */
//! Generic types for CSS values that are related to trans... | } else if v.is_parallel_to(&DirectionVector::new(0., 0., 1.)) {
dest.write_char('z')?;
} else {
x.to_css(dest)?; |
<|file_name|>two.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#encoding=utf-8
from onefile import *
def two():
print "at two\n",
def second():
print "at second\n",<|fim▁hole|>if __name__ == '__main__':
two()
#one()
#first()<|fim▁end|> | |
<|file_name|>test_volcano_point_building.py<|end_file_name|><|fim▁begin|># coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- **Impact function Test Cases.**
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Genera... | |
<|file_name|>CWE369_Divide_by_Zero__int_zero_modulo_82_goodB2G.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_zero_modulo_82_goodB2G.cpp
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-82_goodB2G.tmpl.cpp
<|fim▁hole|>... | */
|
<|file_name|>stripe-card.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export { default } from 'ember-stripe-elements/components/stripe-card'; |
<|file_name|>login.page-objects.ts<|end_file_name|><|fim▁begin|>import { browser, element, by, ElementFinder, protractor, $ } from 'protractor';
import { PageObject } from "./page-object";
export class LoginPageObject extends PageObject {
browseToPage(): void{
browser.get('');
let EC = protractor.ExpectedCon... | getRegisterButton(): ElementFinder {
return element(by.css('.register-btn'));
}
|
<|file_name|>GeometryFactory.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2011 by The Authors.
* Published under the LGPL 2.1 license.
* See /license-notice.txt for the full text of the license notice.
* See /license.txt for the full text of the license.
*/
/**
* Supplies a set of utility methods for building... |
return new jsts.geom.MultiPoint(points, this);
};
|
<|file_name|>list-patients.client.controller.js<|end_file_name|><|fim▁begin|>(function () {
'use strict';
angular
.module('patients')
.controller('PatientsListController', PatientsListController);
PatientsListController.$inject = ['PatientsService'];
function PatientsListController(PatientsService) {... | } |
<|file_name|>yaku.py<|end_file_name|><|fim▁begin|>import warnings
class Yaku:
yaku_id = None
tenhou_id = None
name = None
han_open = None
han_closed = None
is_yakuman = None
def __init__(self, yaku_id=None):
self.tenhou_id = None
self.yaku_id = yaku_id
self.set_at... | """ |
<|file_name|>extdeps.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 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/license... | }
}
} |
<|file_name|>UserAbilitiesParser.java<|end_file_name|><|fim▁begin|>/**
* Copyright 2017, 2018, 2019, 2020 Stephen Powis https://github.com/Crim/pardot-java-client
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), ... | @Override
public UserAbilitiesResponse.Result parseResponse(final String responseStr) throws IOException {
return JacksonFactory.newInstance().readValue(responseStr, UserAbilitiesResponse.class).getResult(); |
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// softlayer_network_storage_iscsi - SoftLayer's iscsi product extends upon the base functionality of
// SoftLayer offerings by providing snapshot and replication capabilities. An iscsi volume is mounted
// through SoftLayer's private network and allows for block level a... | // mounted read-only or used for an immediate volume data restore. This high-end Storage offering is
// also capable of being configured for remote data replication to any of SoftLayer's datacenters to |
<|file_name|>inputstream.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
import codecs
import re
import types
import sys
from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase
from .constants import encodings, ReparseException
from . import utils
from io import StringIO
try:... | |
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url
from views import calendarpage, jsonsearch, fcdragmodify, EventManager, event_view
event_manager = EventManager.as_view()
urlpatterns = [
url(r'^$', calendarpage, name='events'),
url(r'^json/', jsonsearch, name='jsonsearch'),
url... | url(r'^new/', event_manager, name='newevent'), |
<|file_name|>app.ts<|end_file_name|><|fim▁begin|>//import 'bootstrap';
//import 'bootstrap/css/bootstrap.css!';
export class App {<|fim▁hole|> router;
configureRouter(config, router){
config.title = 'Aurelia';
config.map([
{ route: ['','layout'], moduleId: 'views/layout', nav: true, title:'Com... | |
<|file_name|>import3.py<|end_file_name|><|fim▁begin|>from....import a
from...import b
from..import c
from.import d
from : keyword.control.import.python, source.python
.... : punctuation.separator.period.python, source.python
import : keyword.control.import.python, source.python
... | from : keyword.control.import.python, source.python
... : punctuation.separator.period.python, source.python
import : keyword.control.import.python, source.python
: source.python |
<|file_name|>temperature_server.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3
from flask import Flask, request, render_template
import os
import json
import time
import datetime
from smarthomemongo import SmartHomeDB
app = Flask(__name__)
smartDB = SmartHomeDB()
@app.route('/')
def index():
records = smart... | @app.route('/line_graph')
def get_line_graph():
return render_template('graph.html') |
<|file_name|>attachments.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core';
import { environment } from 'src/environments/environment';
import { ImageService } from 'src/app/maincontent/image';
@Component({
selector: 'app-attachments',
templateUrl: 'attachments.component.h... | * https://css-tricks.com/responsive-images-youre-just-changing-resolutions-use-srcset/
*/
public getThumbnailSrcSet(picture: any): string { |
<|file_name|>nodes.js<|end_file_name|><|fim▁begin|>function f() {
console.log(1);
console.log(2);<|fim▁hole|><|fim▁end|> | } |
<|file_name|>issue-182.ts<|end_file_name|><|fim▁begin|>import "reflect-metadata";
import {createTestingConnections, closeTestingConnections, reloadTestingDatabases} from "../../utils/test-utils";
import {Connection} from "../../../src/connection/Connection";
import {Post} from "./entity/Post";
import {expect} from "cha... | beforeEach(() => reloadTestingDatabases(connections)); |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! Encoding of portable pixmap Images
pub use self::encoder::PPMEncoder as PPMEncoder;
pub use self::decoder::PPMDecoder as PPMDecoder;
mod encoder;
mod decoder;<|fim▁hole|>mod test {
use color::ColorType;
use image::{ImageDecoder, DecodingResult};
#[test... |
#[cfg(test)] |
<|file_name|>top.hh<|end_file_name|><|fim▁begin|>#ifndef _SDD_DD_TOP_HH_
#define _SDD_DD_TOP_HH_
#include <exception>
#include <memory> // make_shared, shared_ptr
#include <sstream>
#include <string>
#include <vector>
#include "sdd/dd/definition_fwd.hh"
namespace sdd {
/*--------------------------------------------... | |
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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/licen... | panic!("Cannot determine OS from triple"); |
<|file_name|>insert3_neg.cc<|end_file_name|><|fim▁begin|>// Copyright (C) 2010-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// F... | #include <debug/checks.h>
|
<|file_name|>Use0004.rs<|end_file_name|><|fim▁begin|>use a::b::{c, d, e};
use foo::bar::{self, moo, goo};
use foo::bar::{moo, self, goo};
use a::b::{;
use a::b::};
use a::b::{};
use a::{super};
use a::{*};
<|fim▁hole|><|fim▁end|> | use a::{b}::c; |
<|file_name|>BackHomeButton.test.js<|end_file_name|><|fim▁begin|>import React from 'react';
import { mount } from 'enzyme';
import { Link, HashRouter as Router } from 'react-router-dom';
import { Button } from 'react-bootstrap';
import BackHomeButton from '../BackHomeButton';
describe('<BackHomeButton/>', () => {
it... | |
<|file_name|>lint-stability.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-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... | foo.trait_experimental_text(); |
<|file_name|>number.js<|end_file_name|><|fim▁begin|>/*
Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
<|fim▁hole|>//>>built
define("dojo/cldr/nls/nl/number",{"group":".","percentSign":"%","exponential":"E","scientificFormat":"#E0","percentFormat":"#,##0%","list":";","infinity":"∞","minusSign":"-",... | Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
|
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2021 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 Serf(SConsPackage):
"""Apache Serf - ... | # on its own anyway.
args['CC'] = self.compiler.cc |
<|file_name|>VisibleSpecifiedColumnElementForStg.py<|end_file_name|><|fim▁begin|>from Elements.STG.Base.IElementForStg import IElementForStg
class VisibleSpecifiedColumnElementForStg(IElementForStg):
def __init__(self, templates, settingsObject):
self.typeName = "Specified"<|fim▁hole|> super(VisibleSpecifiedColumn... | self.templateName = "SpecifiedVisibledColumn"
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
The OpenMP package does contain all code templates required for the openMP
code generation in ANNarchy.
BaseTemplates:
defines the basic defintions common to all sparse matrix formates, e. g. projection header
[FORMAT]_SingleThread:
defines the forma... |
* LIL: list-in-list
* COO: coordinate |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.