prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>invalidation_map.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/. */
//! Code for invalidations due to state or attribute... | }, quirks_mode);
} |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>mod linking_rust;<|fim▁end|> | |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/*===============================================================================================*/
// Copyright 2016 Kyle Finlay
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// ... |
/*===============================================================================================*/
//! The window module.
//! |
<|file_name|>identity.js<|end_file_name|><|fim▁begin|>// Copyright 2017 Joyent, Inc.
module.exports = Identity;
var assert = require('assert-plus');
var algs = require('./algs');
var crypto = require('crypto');
var Fingerprint = require('./fingerprint');
var Signature = require('./signature');
var errs = require('./e... | return (false);
if (other.components.length !== this.components.length) |
<|file_name|>selectrow.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
import sys
import os
if len(sys.argv) >= 4 :
filename = sys.argv[1]
row_i = int(sys.argv[2])-1
target_ls_filename = sys.argv[3]
output_filename = sys.argv[4]
else:
print("usage: python selectrow.py filename row_i target_ls_fi... | if not dt.has_key(id):
print id
continue |
<|file_name|>image_ops.py<|end_file_name|><|fim▁begin|># Copyright 2015 The TensorFlow 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
#
# http://www.apache.... | @@draw_bounding_boxes
@@non_max_suppression
@@sample_distorted_bounding_box |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.<|fim▁hole|># Licensed under the Apache Lic... | #
# Copyright 2012 Nebula, Inc.
# |
<|file_name|>LeafTypeProviderImpl.java<|end_file_name|><|fim▁begin|>package com.github.fhtw.swp.tutorium.guice;
import com.github.fhtw.swp.tutorium.composite.Leaf;
import com.github.fhtw.swp.tutorium.composite.LeafTypeProvider;
import com.github.fhtw.swp.tutorium.reflection.AnnotatedTypeFinder;
import org.reflections.... | import java.util.Set; |
<|file_name|>bootstrap-table-en-US.js<|end_file_name|><|fim▁begin|>(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
typeof define === 'function' && define.amd ? define(['jquery'], factory) :
(global = global || self, factory(global.jQuery));
}(... | var enforceInternalState = internalState.enforce;
var TEMPLATE = String(String).split('String'); |
<|file_name|>pyunit_xgboost_gbm_monotone.py<|end_file_name|><|fim▁begin|>from h2o.estimators.xgboost import *
from h2o.estimators.gbm import *
from tests import pyunit_utils
def xgboost_vs_gbm_monotone_test():
assert H2OXGBoostEstimator.available() is True
monotone_constraints = {
"AGE": 1
}
... | assert abs(xgb_varimp_percentage["AGE"] - gbm_varimp_percentage["AGE"]) < 0.02
|
<|file_name|>common.go<|end_file_name|><|fim▁begin|>// Copyright 2016 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free ... | return errors.New("index out of bounds")
}
a.addresses[index] = address.address
return nil |
<|file_name|>bcompos1.cpp<|end_file_name|><|fim▁begin|>// STLport regression testsuite component.
// To compile as a separate example, please #define MAIN.
#include <algorithm>
#include <iostream>
#include "unary.h"
#ifdef MAIN
#define bcompos1_test main
#endif
#if !defined (STLPORT) || defined(__STL... | b = binary_compose<logical_and<bool>, odd, positive>
(logical_and<bool>(), odd(), positive());
|
<|file_name|>query.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- encoding: utf-8 -*-<|fim▁hole|>
# 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 own... | |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { MatToolbarModule, MatButtonModule, MatListModule } from '@angular/materia... | ],
unprotectedResources: ["https://www.microsoft.com/en-us/"],
protectedResourceMap, |
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*-
import datetime
import os
import os.path
import subprocess
from collections import defaultdict
from django.conf import settings as dsettings
from django.core import exceptions
from django.core.cache import cache
from django.db import connectio... | date = models.DateField()
description = models.TextField(blank=True)
|
<|file_name|>ddm_mla_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
Copyright (C) 2017, California Institute of Technology
This file is part of addm_toolbox.
addm_toolbox 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... | The output of DDM.get_model_log_likelihood(). |
<|file_name|>projectfuture.py<|end_file_name|><|fim▁begin|># SPDX-License-Identifier: MIT
# Copyright (C) 2019-2020 Tobias Gruetzmacher
# Copyright (C) 2019-2020 Daniel Ring
from .common import _ParserScraper
class ProjectFuture(_ParserScraper):
imageSearch = '//td[@class="tamid"]/img'
prevSearch = '//a[./img... | @classmethod |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[doc = r" Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r" Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::CMAR3 {
#[doc = r" Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&se... | |
<|file_name|>text_tag.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT
use Justification;
use TextDirection;
use TextIter;
use WrapMode;
use ffi;
use gdk;
use gdk_ffi;
use glib;
use glib::GString;
us... | unsafe extern "C" fn notify_background_full_height_set_trampoline<P, F: Fn(&P) + 'static>(this: *mut ffi::GtkTextTag, _param_spec: glib_ffi::gpointer, f: glib_ffi::gpointer) |
<|file_name|>timestamped.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils import timezone
class TimeStampedModel(models.Model):<|fim▁hole|> created_at = models.DateTimeField(default=timezone.now)
updated_at = models.DateTimeField(default=timezone.now)
class Meta:
abstr... | |
<|file_name|>shadow.go<|end_file_name|><|fim▁begin|>// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
This file contains the code to check for shadowed variables.
A shadowed variable is a variable declared i... | |
<|file_name|>docker_cli_update_test.go<|end_file_name|><|fim▁begin|>package main
import (
"strings"
"time"
<|fim▁hole|> "github.com/docker/docker/integration-cli/checker"
"github.com/docker/docker/integration-cli/cli"
"github.com/go-check/check"
"github.com/gotestyourself/gotestyourself/icmd"
)
func (s *DockerSu... | |
<|file_name|>pdfdify.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node
var child_process = require('child_process');
var argv = require('yargs')
.boolean(['readability', 'open'])
.argv;
var pdfdify = require('../lib');
var srcUrl = argv._[0];<|fim▁hole|> title:argv.title|| srcUrl,
readability:argv.readability,... | console.log("Convertering: '"+srcUrl+"'");
pdfdify.convert({ |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | from reads.conf.development import * # NOQA |
<|file_name|>test.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/. */
pub use dom::bindings::str::{ByteString, DOMString};
pub use dom... | pub use dom::bindings::cell::DomRefCell;
pub use dom::bindings::root::Dom;
pub use dom::node::Node;
pub use dom::bindings::refcounted::TrustedPromise; |
<|file_name|>sync.py<|end_file_name|><|fim▁begin|># !/usr/bin/python
# -*- coding=utf-8 -*-
import json
import urllib2
<|fim▁hole|>from books.models import Book
domain = "http://smartebook.zmapp.com:9026"
# 同步图书详情
def sync_book(bid, cm):
# 完结了的图书不更新信息
if Book.objects.filter(id=bid, status=1).count() == 0:
... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export { ImageUploadComponent } from './src/components/image-upload/image-upload.component';<|fim▁end|> | export { ImageUploadModule } from './src/image-upload.module'; |
<|file_name|>0017_userprofile_exp_data.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-01-24 07:34
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('appauth', '0016_userp... | ]
operations = [
migrations.AddField( |
<|file_name|>test_images_tags_negative.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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
#
# ... | |
<|file_name|>issue-70942-trait-vs-impl-mismatch.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> const VALUE: usize;
}
struct Zero;
impl Nat for Zero {
const VALUE: i32 = 0;
//~^ ERROR implemented const `VALUE` has an incompatible type for trait
}
fn main() {
let _: [i32; Zero::VALUE] = [];
}<|fim▁end|> | trait Nat { |
<|file_name|>multiModuleClodule1.ts<|end_file_name|><|fim▁begin|>class C {
constructor(x: number) { }
foo() { }
bar() { }
static boo() { }
}
module C {
export var x = 1;
var y = 2;
}
module C {
export function foo() { }<|fim▁hole|>
var c = new C(C.x);
c.foo = C.foo;<|fim▁end|> | function baz() { return ''; }
} |
<|file_name|>CorePolicy.hpp<|end_file_name|><|fim▁begin|>/*
* OpenSplice DDS
*
* This software and documentation are Copyright 2006 to 2012 PrismTech
* Limited and its licensees. All rights reserved. See file:
*
* $OSPL_HOME/LICENSE
*
* for full copyright notice and lic... | }
|
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>import 'tachyons';<|fim▁end|> | import 'marky'; |
<|file_name|>config.ts<|end_file_name|><|fim▁begin|>export class Config {
id: string = "";<|fim▁hole|><|fim▁end|> | name: string = "";
module: string = "";
value: string = "";
} |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of
JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data
interchange format.
:mod:`simplejson` exposes an API familiar to users of the standard library
:mod:`marshal` and :mod:`pickle... | encoding='utf-8',
default=None,
)
|
<|file_name|>bitcoin_es_CL.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="es_CL" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Bitcoin</sourc... | </message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source> |
<|file_name|>slide_7.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | jQuery(document).ready(function($){$(".slide8").remove();}); |
<|file_name|>challenge5.rs<|end_file_name|><|fim▁begin|>use super::challenge2::xor_bytes;
pub fn encode(data: &Vec<u8>, key: &Vec<u8>) -> Vec<u8> {
xor_bytes(data, &key.iter().cloned().cycle().take(data.len()).collect())
}
#[cfg(test)]
mod test {<|fim▁hole|> #[test]
fn test_encode() {
let input = b... | use super::super::shared::bytes_to_hex_string;
use super::encode;
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>function render(node){
console.log(node);
};<|fim▁hole|><|fim▁end|> |
export default render; |
<|file_name|>packageListContainer.js<|end_file_name|><|fim▁begin|>import React from "react";
import { composeWithTracker } from "@reactioncommerce/reaction-components";
import { Template } from "meteor/templating";
import { Roles } from "meteor/alanning:roles";
import { Reaction } from "/client/api";
/**
* Push packa... | * @private
*/ |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | from .ppo import PPOAgent |
<|file_name|>issue-11612.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distrib... | // http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license |
<|file_name|>owners_finder_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env vpython3
# 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.
"""Unit tests for owners_finder.py."""
import os
import sys
import u... | class TestClient(owners_client.OwnersClient):
def __init__(self):
super(TestClient, self).__init__() |
<|file_name|>test_hiframes.py<|end_file_name|><|fim▁begin|># *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the f... |
@skip_numba_jit
def test_getitem_bool_series(self): |
<|file_name|>CourseCurriculum.py<|end_file_name|><|fim▁begin|>from django.core import serializers
from django.http import HttpResponse, JsonResponse
from Course.models import *
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST, require_GET
import json
@csrf_exe... | def deleteCourseCurriculum(request):
response_data = {} |
<|file_name|>service.go<|end_file_name|><|fim▁begin|>package health
<|fim▁hole|>)
// Service struct keeps db object to avoid passing it around
type Service struct {
db *gorm.DB
}
// NewService returns a new Service instance
func NewService(db *gorm.DB) *Service {
return &Service{db: db}
}
// Close stops any runnin... | import (
"github.com/jinzhu/gorm" |
<|file_name|>network_security_group_vnic.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved.
// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 ... | // The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the VNIC. |
<|file_name|>sleeptimer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import t... | ## END - generated method body
return _dummyTrans and trans.response().getvalue() or "" |
<|file_name|>debug_gui.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2002-2015 The DOSBox Team
*
* 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, ... | |
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# pi-manage documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 11 19:10:09 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration va... | # One entry per manual page. List of tuples |
<|file_name|>qquote.rs<|end_file_name|><|fim▁begin|>// Copyright 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/licenses... | // quote_block! |
<|file_name|>filter_tasks_api.py<|end_file_name|><|fim▁begin|>import web
from inginious.frontend.plugins.utils.admin_api import AdminApi
from inginious.frontend.plugins.utils import get_mandatory_parameter
class FilterTasksApi(AdminApi):
def API_POST(self):
parameters = web.input()
task_query =... | |
<|file_name|>serializers.py<|end_file_name|><|fim▁begin|>from datetime import datetime
from rest_framework import serializers
from rest_framework.settings import api_settings
from api.models import VenueList, EventList
class VenueListSerializer(serializers.Serializer):
id = serializers.IntegerField(read_only=Tr... | def create(self, validated_data):
return EventList.objects.create(**validated_data)
def update(self, instance, validated_data): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
This version of julian is currently in development and is not considered stable.
<|fim▁hole|><|fim▁end|> | """ |
<|file_name|>test_file_for.go<|end_file_name|><|fim▁begin|>package cases
import (
"io/ioutil"
"path/filepath"
"regexp"<|fim▁hole|> "strings"
"testing"
)
func testFilesFor(t testing.TB, dirname string, includes, ignores []string) []string {
files, err := ioutil.ReadDir(dirname)
if err != nil {
t.Fatal(err)
}... | |
<|file_name|>App.java<|end_file_name|><|fim▁begin|><|fim▁hole|>
import android.annotation.TargetApi;
import android.app.Application;
import android.os.Build;
/**
* Created by nubor on 13/02/2017.
*/
public class App extends Application {
@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) @Override public void onCr... | package testPpermission; |
<|file_name|>json.py<|end_file_name|><|fim▁begin|>from ... import types as sqltypes
class JSON(sqltypes.JSON):
"""SQLite JSON type.
SQLite supports JSON as of version 3.9 through its JSON1_ extension. Note
that JSON1_ is a
`loadable extension <https://www.sqlite.org/loadext.html>`_ and as such
ma... | return "$%s" % ( |
<|file_name|>BinomialTree.cpp<|end_file_name|><|fim▁begin|>/**
* Programmer: Minhas Kamal (BSSE0509,IIT,DU)
* Date: 30-Mar-2014
**/
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
#define X 3
struct node{
int value;
int depth;
<|fim▁hole|> node *next[X];
} ... | node *previous;
|
<|file_name|>item-inside-macro.rs<|end_file_name|><|fim▁begin|>// run-pass
// Issue #34183
macro_rules! foo {
() => {
fn foo() { }
}
}
macro_rules! bar {
() => {
fn bar();
}
}
trait Bleh {
foo!();
bar!();
}
struct Test;
impl Bleh for Test {
fn bar() {}
}
fn main() {<|fi... | |
<|file_name|>test_alembic.py<|end_file_name|><|fim▁begin|># (c) 2017 - Copyright 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
# version 2 as published by the Free Software Foundation.
#
# This program is distributed in the hop... | # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# |
<|file_name|>supplier-list.ts<|end_file_name|><|fim▁begin|>import {Component, OnInit} from '@angular/core';
import {KendoGrid} from '../kendo/kendo-grid';
import {ViewDefinition} from '../../../services/view-definition';
import {KendoColumn} from '../../../services/view-definition';
@Component({
selector: 'suppli... | this.viewDefinition.className = 'supplier';
this.viewDefinition.detailRoute = '../SupplierDetail'; |
<|file_name|>minimal-config.ts<|end_file_name|><|fim▁begin|>import { writeFile, writeMultipleFiles } from '../../utils/fs';
import { ng } from '../../utils/process';
export default function () {
// TODO(architect): Figure out what a minimal config is for architect apps.
return;
return Promise.resolve()
.th... | ]
}],
e2e: { protractor: { config: './protractor.conf.js' } }
}))) |
<|file_name|>test_user.py<|end_file_name|><|fim▁begin|># project/server/tests/test_user.py
import datetime
import unittest
from flask_login import current_user
from base import BaseTestCase
from project.server import bcrypt
from project.server.models import User
from project.server.user.forms import LoginForm
cla... | # Ensure that registered_on is a datetime.
with self.client: |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub fn is_leap_year(year: u64) -> bool {
year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)<|fim▁hole|><|fim▁end|> | } |
<|file_name|>mail.py<|end_file_name|><|fim▁begin|>#!/bin/env python
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Billy Olsen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without re... | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
<|file_name|>util.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>
pub fn read_tag<R: io::BufRead>(input: &mut R, tag: &[u8]) -> io::Result<bool> {
let mut buf = vec![0; tag.len()];
input.read_exact(buf.as_mut_slice())?;
Ok(buf.as_slice() == tag)
}
pub fn is_eof<R: io::BufRead>(input: &mut R) -> io::Result<boo... | use std::hash;
use std::io; |
<|file_name|>main.go<|end_file_name|><|fim▁begin|>package main
import (
"github.com/AntonioLangiu/odgbot/bot"
"github.com/AntonioLangiu/odgbot/common"
)
func main() {<|fim▁hole|> bot.LoadBot(configuration)
}<|fim▁end|> | configuration := common.LoadConfiguration()
db := bot.LoadDb(configuration)
defer db.Close() |
<|file_name|>admin.js<|end_file_name|><|fim▁begin|>const router = require('express').Router();
const db1 = require('../db');
// GET - Get All Students Info (Admin)
// response:
// [] students:
// account_id: uuid
// user_id: uuid
// first_name: string
// last_name: string
// homet... | console.log(error);
return res.status(400).send('Error: Problem executing Query'); |
<|file_name|>Endpoint.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) Microsoft Corporation
*
* 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/LI... | |
<|file_name|>tasks.spec.ts<|end_file_name|><|fim▁begin|>describe('Tasks/Jobs', () => {
/**
* Before hook
* Setup the context
*/
before(() => {
cy.apps();
cy.importAppsTask();
});
/**
* After hook
* Clean the context
*/
after(() => {
// Clean up all executions
cy.cleanupTaskE... | it('Should create and launch a task job', () => {
cy.createTask('job-sample', 'timestamp-batch'); |
<|file_name|>Kangaroo.java<|end_file_name|><|fim▁begin|>/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates<|fim▁hole|>
import java.util.Scanner;
/**
*
* @author samas
*/
public class Kangaroo {
/**
* @param args the ... | * and open the template in the editor.
*/
package mx.neftaly.hackerrank.algorithms; |
<|file_name|>Solution.py<|end_file_name|><|fim▁begin|>"""
Given an array nums, partition it into two (contiguous) subarrays left and right so that:
Every element in left is less than or equal to every element in right.
left and right are non-empty.
left has the smallest possible size.
Return the length of left after s... | ms = list(reversed(ms))
for i, n in enumerate(mx):
if i >= len(A) - 1:
continue |
<|file_name|>mininet_multicast_dynamic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
from groupflow_shared import *
from mininet.net import *
from mininet.node import OVSSwitch, UserSwitch
from mininet.link import TCLink
from mininet.log import setLogLevel
from mininet.cli import CLI
from mininet.node import No... |
# Generate the test groups, and launch the sender applications |
<|file_name|>migration.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except... | path = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'migrate_repo') |
<|file_name|>Renderer.py<|end_file_name|><|fim▁begin|>from ctypes import c_void_p
import math
import numpy as np
from OpenGL.GL import *
from OpenGL.GLU import *
from PyEngine3D.Common import logger, COMMAND
from PyEngine3D.Common.Constants import *
from PyEngine3D.Utilities import *
from PyEngine3D.OpenGLContext im... | |
<|file_name|>cli.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import click
from twentyfourhourvideo import video
@click.command(help='Plays a video.')
@click.argument('input', type=click.Path())
def main(input):
video.play(input)<|fim▁end|> | |
<|file_name|>zip.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# th... | for unit in store.unit_iter():
yield unit |
<|file_name|>gears.js.uncompressed.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | version https://git-lfs.github.com/spec/v1
oid sha256:ba35426ce7731b677aeb9fca46043dc31d9cd6a87abedb15382e4c3bc001b548
size 1760 |
<|file_name|>b58.rs<|end_file_name|><|fim▁begin|>// Rust Bitcoin Library
// Written in 2014 by
// Andrew Poelstra <apoelstra@wpsoftware.net>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This... | assert_eq!(from("111211").ok(), Some(vec![0u8, 0, 0, 13, 36]));
// Addresses |
<|file_name|>package.py<|end_file_name|><|fim▁begin|>##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, t... | """S4 generic functions needed by Bioconductor proteomics packages."""
homepage = "https://bioconductor.org/packages/ProtGenerics/" |
<|file_name|>qvm-stop.py<|end_file_name|><|fim▁begin|>import os
import re
import cmd
import sys
import time
import util
host = sys.argv[1]
cmd.run ("virsh shutdown %s"%(host))
while util.vm_is_running(host):<|fim▁hole|><|fim▁end|> | time.sleep(1) |
<|file_name|>yDragBoxLayerTests.ts<|end_file_name|><|fim▁begin|>///<reference path="../testReference.ts" />
describe("Interactive Components", () => {
describe("YDragBoxLayer", () => {
let SVG_WIDTH = 400;
let SVG_HEIGHT = 400;
it("bounds()", () => {
let svg = TestMethods.generateSVG(SVG_WIDTH, SV... | it("throws error on setting x scale", () => {
let dbl = new Plottable.Components.YDragBoxLayer(); |
<|file_name|>F2.py<|end_file_name|><|fim▁begin|>import fechbase
class Records(fechbase.RecordsBase):
def __init__(self):
fechbase.RecordsBase.__init__(self)
self.fields = [
{'name': 'FORM TYPE', 'number': '1'},
{'name': 'FILER FEC CAND ID', 'number': '2'},
{'name'... | |
<|file_name|>test_config_flow.py<|end_file_name|><|fim▁begin|>"""Tests for the Linky config flow."""
from pylinky.exceptions import (
PyLinkyAccessException,
PyLinkyEnedisException,
PyLinkyException,
PyLinkyWrongLoginException,
)
import pytest
from homeassistant import data_entry_flow
from homeassistan... | |
<|file_name|>LuaNodeEmitter.cpp<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2010, Anima Games, Benjamin Karaban, Laurent Schneider,
* Jérémie Comarmond, Didier Colin.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided tha... | {
Ptr<NodeStorm> pStorm(getNodeStorm(L));
pStorm->setPeriod(luat_tofloat(L, 1), luat_tofloat(L, 2));
}
|
<|file_name|>stackvec.rs<|end_file_name|><|fim▁begin|>use minimal_lexical::bigint;
#[cfg(feature = "alloc")]
pub use minimal_lexical::heapvec::HeapVec as VecType;
#[cfg(not(feature = "alloc"))]
pub use minimal_lexical::stackvec::StackVec as VecType;
pub fn vec_from_u32(x: &[u32]) -> VecType {
let mut vec = VecType... | vec.try_push((xi1 << 32) | xi0).unwrap() |
<|file_name|>apputil.py<|end_file_name|><|fim▁begin|>from project_cron.utils import processutil
def open(app_name):
script = '''
if application "%s" is not running then
tell application "%s" to activate
end if
''' % (app_name, app_name)
processutil.call(['/usr/bin/osascrip... | processutil.call(['/usr/bin/osascript', '-e', script]) |
<|file_name|>solver.py<|end_file_name|><|fim▁begin|>'''Copyright (C) 2015 by Wesley Tansey
This file is part of the GFL library.
The GFL library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundat... | self.alpha, self.inflate, self.maxsteps, self.converge,
self.beta, self.z, self.u)
else: |
<|file_name|>sphericalHarmonics.py<|end_file_name|><|fim▁begin|># ------------------- Information --------------------- #
# Author: Joey Dumont <joey.dumont@gmail.com> #
# Date created: October 18th, 2013 #
# Date mod. October 18th, 2013 #
# Description: We plot the times it took to compute #
# sets of Wigner symb... | minorLocator = AutoMinorLocator()
ax1.xaxis.set_minor_locator(minorLocator)
ax1.set_xlabel(r"$\ell$") |
<|file_name|>standard_trainer.py<|end_file_name|><|fim▁begin|>'''@file standard_trainer.py
contains the StandardTrainer'''
from nabu.neuralnetworks.trainers import trainer
class StandardTrainer(trainer.Trainer):
'''a trainer with no added functionality'''
def aditional_loss(self):
'''
add an ... | |
<|file_name|>create-lang-edit-link.js<|end_file_name|><|fim▁begin|>/**
* create edit language file link
*/
export default (lang) => {<|fim▁hole|> return `https://github.com/electerm/electerm-locales/edit/master/locales/${lang}.js`
}<|fim▁end|> | |
<|file_name|>qprotractor_ru.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ru_RU">
<context>
<name>AboutDialog</name>
<message>
<location filename="about.ui" line="20"/>
<source>About QProtractor</source>
<translation>О QP... | <source>E&xit</source>
<translation>Выход (&X)</translation> |
<|file_name|>append-test.js<|end_file_name|><|fim▁begin|>import { set } from 'ember-metal';
import { jQuery } from 'ember-views';
import { moduleFor, RenderingTest } from '../../utils/test-case';
import { Component, compile } from '../../utils/helpers';
import { strip } from '../../utils/abstract-test-case';
class Abs... |
}); |
<|file_name|>elf.rs<|end_file_name|><|fim▁begin|>pub const ELF_CLASS: u8 = 2;
pub type ElfAddr = u64;
pub type ElfOff = u64;
pub type ElfHalf = u16;
pub type ElfWord = u32;
pub type ElfXword = u64;
/// An ELF header
#[repr(packed)]
#[derive(Debug)]
pub struct ElfHeader {
/// The "magic number" (4 bytes)
pub ma... | pub h_len: ElfHalf,
/// The program header table entry length
pub ph_ent_len: ElfHalf,
/// The program head table length |
<|file_name|>libraries.py<|end_file_name|><|fim▁begin|># Copyright 2006 Joe Wreschnig
# 2013 Nick Boultbee
# 2013,2014 Christoph Reiter
#
# 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 ... | |
<|file_name|>StatisticConfigurationCacheByUuidLoaderWriter.java<|end_file_name|><|fim▁begin|>/*
* Copyright 2017 Crown Copyright
*
* This file is part of Stroom-Stats.
*
* Stroom-Stats is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*... | @Override
public void writeAll(final Iterable<? extends Map.Entry<? extends String, ? extends StatisticConfiguration>> entries) throws Exception {
throw new UnsupportedOperationException("CRUD operations are not currently supported on this cache");
} |
<|file_name|>TestSchedule.java<|end_file_name|><|fim▁begin|>package testing;
/**
* Copyright (C) 2015 Matthew Mussomele
*
* This file is part of ChoiceOptimizationAlgorithm
*
* ChoiceOptimizationAlgorithm is free software: you can redistribute it
* and/or modify it under the terms of the GNU General Public... | }
assertNotNull(test); |
<|file_name|>italianhello.py<|end_file_name|><|fim▁begin|>def italianhello():
i01.setHandSpeed("left", 0.60, 0.60, 1.0, 1.0, 1.0, 1.0)
i01.setHandSpeed("right", 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)
i01.setArmSpeed("left", 1.0, 1.0, 1.0, 1.0)
i01.setArmSpeed("right", 1.0, 1.0, 1.0, 1.0)
i01.setHeadSpeed(0.65, 0.75)
... | i01.moveHand("right",0,0,0,50,82,180)
ear.pauseListening()
sleep(1)
|
<|file_name|>util.go<|end_file_name|><|fim▁begin|>package command
import (
"fmt"
"io/ioutil"
"os"
"path"
"runtime"
"time"
getter "github.com/hashicorp/go-getter"
"github.com/hashicorp/nomad/helper/discover"
)
// fetchBinary fetches the nomad binary and returns the temporary directory where it exists
func fet... | bin, err = discover.NomadExecutable() |
<|file_name|>resolver.js<|end_file_name|><|fim▁begin|>'use strict';
var fetchUrl = require('fetch').fetchUrl;<|fim▁hole|>var httpStatusCodes = require('./http.json');
var urllib = require('url');
var mime = require('mime');
// Expose to the world
module.exports.resolve = resolve;
module.exports.removeParams = removeP... | var packageInfo = require('../package.json'); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.