prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>BaseDrawerActivity.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2015 Ngewi Fet <ngewif@gmail.com>
*
* 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://ww... |
private class DrawerItemClickListener implements NavigationView.OnNavigationItemSelectedListener { |
<|file_name|>IConnectorAction.java<|end_file_name|><|fim▁begin|>package org.mo.jfa.face.database.connector;
import org.mo.web.core.container.AContainer;
import org.mo.web.core.webform.IFormPage;
import org.mo.web.protocol.context.IWebContext;
public interface IConnectorAction
{
String catalog(IWebContext context,
... | @AContainer(name = IFormPage.Page) FConnectorPage page);
} |
<|file_name|>content-paste.js<|end_file_name|><|fim▁begin|>'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _pure = require('recompose/pure');
var _pure2 = _interopRequireDefault(_pure);
<|fim▁hole|>
var ... | var _SvgIcon = require('../../SvgIcon'); |
<|file_name|>blank_line_after_class_required.py<|end_file_name|><|fim▁begin|># pylint:disable=missing-docstring,invalid-name,too-few-public-methods,old-style-class
class SomeClass: # [blank-line-after-class-required]
def __init__(self):<|fim▁hole|><|fim▁end|> | pass |
<|file_name|>elf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from elftools.elf.elffile import ELFFile
from elftools.common.exceptions import ELFError
from elftools.elf.segments import NoteSegment
class ReadELF(object):
def __init__(self, file):
self.elffile = ... |
def get_build(self): |
<|file_name|>sfp_template.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# -------------------------------------------------------------------------------
# Name: sfp_XXX
# Purpose: Description of the plug-in.
#
# Author: Name and e-mail address
#
# Created: Date
# Copyright: (c... |
# If you intend for this module to act on its own (e.g. not solely rely
# on events from other modules, then you need to have a start() method
# and within that method call self.checkForStop() to see if you've been
|
<|file_name|>angular-leaflet-directive.js<|end_file_name|><|fim▁begin|>var leafletDirective = angular.module("leaflet-directive", []);
leafletDirective.directive('leaflet', [
'$http', '$log', '$parse', '$rootScope', function ($http, $log, $parse, $rootScope) {
var defaults = {
maxZoom: 14,
min... | maxBounds: '=maxbounds',
bounds: '=bounds', |
<|file_name|>websiteParser.py<|end_file_name|><|fim▁begin|>from IPython.display import HTML
from bs4 import BeautifulSoup
import urllib
f = open('chars.txt', 'w')
r = urllib.urlopen('http://www.eventhubs.com/tiers/ssb4/').read()
soup = BeautifulSoup(r, "lxml")
characters = soup.find_all("td", class_="tierstdnorm")
c... | tierCharList.append(tierChar)
elif count%12==1: |
<|file_name|>slick.js<|end_file_name|><|fim▁begin|>/*
_ _ _ _
___| (_) ___| | __ (_)___
/ __| | |/ __| |/ / | / __|
\__ \ | | (__| < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
|__/
Version: 1.5.0
Author: Ken Wheeler
Website: http://kenwheeler.github.io
Docs: http://kenwheeler.github.io/slick
Repo... | |
<|file_name|>ex5.rs<|end_file_name|><|fim▁begin|>use std;
//==============================================================================
struct Complex {
real : f32,
imag : f32
}
impl Complex {
fn new(real: f32, imag: f32) -> Complex {
Complex { real: real, imag: imag }
}
fn to_string(&... | println!("pos1 == pos4 : {}", pos1 == pos4); |
<|file_name|>textureanimationtranslation.hpp<|end_file_name|><|fim▁begin|>/***************************************************************************
* Copyright (C) 2009 by Tamino Dauth *
* tamino@cdauth.eu *
* ... | ***************************************************************************/
#ifndef WC3LIB_MDLX_TEXTUREANIMATIONTRANSLATION_HPP
#define WC3LIB_MDLX_TEXTUREANIMATIONTRANSLATION_HPP |
<|file_name|>server.js<|end_file_name|><|fim▁begin|>/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import... | app.use((err, req, res, next) => { // eslint-disable-line no-unused-vars
console.log(pe.render(err)); // eslint-disable-line no-console |
<|file_name|>OrdersSetLineItemMetadataResponse.java<|end_file_name|><|fim▁begin|>/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless... |
/**
* Model definition for OrdersSetLineItemMetadataResponse. |
<|file_name|>color.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/. */
//! Specified color values.
use cssparser::{AngleOrNumber, Col... | CSSParserColor::RGBA(rgba) => Color::Numeric {
parsed: rgba,
authored: authored.map(|s| s.to_ascii_lowercase().into_boxed_str()),
}, |
<|file_name|>ping.rs<|end_file_name|><|fim▁begin|>extern crate mqttc;
extern crate netopt;
#[macro_use] extern crate log;
extern crate env_logger;
use std::env;
use std::process::exit;
use std::time::Duration;
use netopt::NetworkOptions;
use mqttc::{Client, ClientOptions, ReconnectMethod};
fn main() {
env_logger:... | opts.set_keep_alive(15); |
<|file_name|>ListProvider.ts<|end_file_name|><|fim▁begin|>import {Model} from '../../models/base/Model';
import {Subject} from 'rxjs/Subject';
import {BaseService} from '../BaseService';
import {ActivatedRoute, Router} from '@angular/router';
import {UserRights, UserService} from '../../services/UserService';
import {L... | this.currentPage = page;
this.dataLoaded = true;
}); |
<|file_name|>reppoints_moment_dcn_r101v1b_fpn_multiscale_2x.py<|end_file_name|><|fim▁begin|>from models.RepPoints.builder import RepPoints as Detector
from models.dcn.builder import DCNResNetFPN as Backbone
from models.RepPoints.builder import RepPointsNeck as Neck
from models.RepPoints.builder import RepPointsHead as ... | if is_train:
image_set = ("coco_train2017", )
else: |
<|file_name|>category_test.js<|end_file_name|><|fim▁begin|>import { expect } from 'chai'
import {List, Map} from 'immutable'
import categories from '../src/reducer.js'
describe("Category Test", () => {
it("should add a category", () => {
let initialState = Map({
user: 'Skye'
})
let expectedState = Map({
... | }) |
<|file_name|>u_boot_spl_nodtb.py<|end_file_name|><|fim▁begin|># SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for 'u-boot-nodtb.bin'
#
from entry import Entry
from blob import Entry_blob
class Entry_u_boot_spl_nodtb(Entry_blob):
... | Entry_blob.__init__(self, image, etype, node)
|
<|file_name|>secret.go<|end_file_name|><|fim▁begin|>/*
Copyright 2017 The Kubernetes 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
Unless ... | err = c.client.Put(). |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub mod liblz4;
pub mod decoder;
pub mod encoder;
pub use decoder::Decoder;
pub use encoder::Encoder;
pub use encoder::EncoderBuilder;<|fim▁hole|>pub use liblz4::ContentChecksum;
pub use liblz4::version;<|fim▁end|> | pub use liblz4::BlockSize;
pub use liblz4::BlockMode; |
<|file_name|>undef.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/.<|fim▁hole|>pub use lrs_base::undef::{UndefState};<|fim▁end|> | |
<|file_name|>message_dialog.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2016, The Gtk-rs Project Developers.
// See the COPYRIGHT file at the top-level directory of this distribution.
// Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT>
use libc::c_char;
use ffi;
use gl... | self.as_ref().to_glib_none().0, b"%s\0".as_ptr() as *const c_char, message.0, |
<|file_name|>update_device.rs<|end_file_name|><|fim▁begin|>//! `PUT /_matrix/client/*/devices/{deviceId}`
pub mod v3 {
//! `/v3/` ([spec])
//!
//! [spec]: https://spec.matrix.org/v1.2/client-server-api/#put_matrixclientv3devicesdeviceid<|fim▁hole|> use ruma_common::{api::ruma_api, DeviceId};
ruma_a... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>"""HTTP end-points for the User API. """
import copy
from opaque_keys import InvalidKeyError
from django.conf import settings
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.core.... | required (bool): Whether this field is required; defaults to True
|
<|file_name|>itembox.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright (C) 2014-2019 khalim19
#
# 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... |
@property |
<|file_name|>ForestryFabricatorRecipeAccessor.java<|end_file_name|><|fim▁begin|>/*
* This file is part of ThermalRecycling, licensed under the MIT License (MIT).
*
* Copyright (c) OreCruncher
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documen... | |
<|file_name|>httpoutput.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Output classes for ETL.
#
# Author: Just van den Broecke
#
from stetl.output import Output
from stetl.util import Util
from stetl.packet import FORMAT
import httplib
import base64
log = Util.get_log('httpoutput')
... | |
<|file_name|>direct_irq.rs<|end_file_name|><|fim▁begin|>// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use base::{ioctl_with_ref, AsRawDescriptor, Event, RawDescriptor};
use data_model::vec_with_arr... | let u32_size = size_of::<u32>();
let mut irq_set = vec_with_array_field::<plat_irq_forward_set, u32>(count); |
<|file_name|>Users.js<|end_file_name|><|fim▁begin|>/**
* @param {Object} options
* @param {Number} options.size Max size of array to return
* @param {Number} options.page Location in pagination
* @param {String} options.first_name first name of user
* @param {String} options.last_name last name of user
* @param {... | } |
<|file_name|>uint.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/L... | #[inline(always)]
pub fn add_with_overflow(x: uint, y: uint) -> (uint, bool) {
let (a, b) = ::u32::add_with_overflow(x as u32, y as u32);
(a as uint, b) |
<|file_name|>matrix-coverage.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1
oid sha256:d1ae7db9f7928706e5601ba8c7d71d4c9fbd1c4463c6b6465b502115eae45c07<|fim▁hole|><|fim▁end|> | size 77153 |
<|file_name|>p2.py<|end_file_name|><|fim▁begin|># Even Fibonacci numbers
# Problem 2
# Each new term in the Fibonacci sequence is generated by adding the
# previous two terms. By starting with 1 and 2, the first 10 terms will be:
# 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
# By considering the terms in the Fibonacci se... | def fibs(): |
<|file_name|>BulkRequest.java<|end_file_name|><|fim▁begin|>/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch licenses this file to you under
* the Apache Licen... | * Requests that are part of this request. It is only possible to add things that are both {@link ActionRequest}s and
* {@link WriteRequest}s to this but java doesn't support syntax to declare that everything in the array has both types so we declare
* the one with the least casts. |
<|file_name|>bindings.py<|end_file_name|><|fim▁begin|>from pulp.bindings import auth, consumer, consumer_groups, repo_groups, repository
from pulp.bindings.actions import ActionsAPI
from pulp.bindings.content import OrphanContentAPI, ContentSourceAPI, ContentCatalogAPI
from pulp.bindings.event_listeners import EventLis... | self.content_catalog = ContentCatalogAPI(pulp_connection) |
<|file_name|>PDFTimestampServiceTest.java<|end_file_name|><|fim▁begin|>/**
* DSS - Digital Signature Services
* Copyright (C) 2015 European Commission, provided under the CEF programme
*
* This file is part of the "DSS - Digital Signature Services" project.
*
* This library is free software; you can redistribut... | |
<|file_name|>osstringext.rs<|end_file_name|><|fim▁begin|>use std::ffi::OsStr;
#[cfg(not(target_os = "windows"))]
use std::os::unix::ffi::OsStrExt;
#[cfg(target_os = "windows")]
use INVALID_UTF8;
#[cfg(target_os = "windows")]
trait OsStrExt3 {
fn from_bytes(b: &[u8]) -> &Self;
fn as_bytes(&self) -> &[u8];
}
#... |
fn trim_left_matches(&self, byte: u8) -> &OsStr { |
<|file_name|>definitions.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 Google 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
//
// https://www.apache.org/licenses/LICENSE-2.... | tcx: TyCtxt<'tcx>,
rerast_mod_symbol: Symbol, |
<|file_name|>PcapTimeline.py<|end_file_name|><|fim▁begin|>from scapy.all import *
import plotly
from datetime import datetime
import pandas as pd
#Read the packets from file
packets=rdpcap('mypcap.pcap')
#lists to hold packetinfo
pktBytes=[]
pktTimes=[]
#Read each packet and append to the lists
fo... | plotly.offline.plot({
"data":[plotly.graph_objs.Scatter(x=df2.index, y=df2['Bytes'])],
"layout":plotly.graph_objs.Layout(title="Bytes over Time ",
|
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>#
# farmwork/forms.py
#
from django import forms
from django.utils.text import slugify
from .models import Farmwork
# ========================================================
# FARMWORK FORM
# ========================================================
class FarmworkF... |
def save(self): |
<|file_name|>test_echo_server.rs<|end_file_name|><|fim▁begin|>use mio::*;
use mio::tcp::*;
use bytes::{Buf, ByteBuf, MutByteBuf, SliceBuf};
use mio::util::Slab;
use std::io;
use super::localhost;
const SERVER: Token = Token(0);
const CLIENT: Token = Token(1);
struct EchoConn {
sock: TcpStream,
buf: Option<Byt... | match self.sock.try_read_buf(&mut buf) {
Ok(None) => {
debug!("CONN : spurious read wakeup"); |
<|file_name|>Main.cpp<|end_file_name|><|fim▁begin|>/*=============================================================================
Copyright (c) 2002-2003 Joel de Guzman
http://spirit.sourceforge.net/
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See ac... | //
// Our calculator grammar using phoenix to do the semantics
//
// Note: The top rule propagates the expression result (value) upwards
|
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render, get_object_or_404
# import the custom context processor
from vehicles.context_processor import global_context_processor
from vehicles.models import Vehicle, VehicleMake, Category
from settings.models import SliderImage
from django.... | |
<|file_name|>zmqrpc.py<|end_file_name|><|fim▁begin|>import traceback
from datetime import datetime
from itertools import count
import zmq
def serve(procs, port=None, addr='tcp://*', context=None, debug=False):
"""Make some procedures available for remote calls via ØMQ."""
if context is None:
context ... |
print('Serving at {}:{}'.format(addr, port))
print('sending and receiving JSON')
|
<|file_name|>module.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
<|fim▁hole|>#
# This weboob module 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 Foundation, either version 3 of the License, or
# (at y... | # Copyright(C) 2012-2014 Romain Bignon
#
# This file is part of a weboob module. |
<|file_name|>modal.js<|end_file_name|><|fim▁begin|>/**
* @ngdoc service
* @name $ionicModal
* @module ionic
* @codepen gblny
* @description
*
* Related: {@link ionic.controller:ionicModal ionicModal controller}.
*
* The Modal is a content pane that can go over the user's main view
* temporarily. Usually used... | |
<|file_name|>TemplateService.java<|end_file_name|><|fim▁begin|>/*
* IIIFProducer
* Copyright (C) 2017 Leipzig University Library <info@ub.uni-leipzig.de>
*
* 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 Softw... | this.id = id;
}
} |
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import sys
import argparse
import time
sys.path.append('./bin/moabc')
import optimizer
#引数の処理
#parserの初期化
parser = argparse.ArgumentParser(description='This script optimizes bayesian network graph structure by MOABC')
#強化成功率表
parser.add_argument("infile_pt", type=st... | parser.add_argument("-na","--num_average", type=int, default=100)
#結果の出力先
# 最後のスラッシュいらない |
<|file_name|>ParallelCriterion.py<|end_file_name|><|fim▁begin|>import torch
from .Criterion import Criterion
from .utils import recursiveResizeAs, recursiveFill, recursiveAdd
class ParallelCriterion(Criterion):
def __init__(self, repeatTarget=False):
super(ParallelCriterion, self).__init__()
self... | return self.output |
<|file_name|>svd-pgm-avg.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import argparse
import numpy
import math
class Image:
def __init__(self, matrix=[[]], width=0, height=0, depth=0):
self.matrix = matrix
self.width = width
self.height = height
self.depth = depth
... | """
Write a decomposed matrix to file uncompressed as it would show compressed
|
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var eejs = require('ep_etherpad-lite/node/eejs')
/*
* Handle incoming delete requests from clients
*/
exports.handleMessage = function(hook_name, context, callback){
var Pad = require('ep_etherpad-lite/node/db/Pad.js').Pad
// Firstly ignore any request that aren'... | |
<|file_name|>generated_expansion.go<|end_file_name|><|fim▁begin|>/*
Copyright The Kubernetes 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
... | |
<|file_name|>subsystem.go<|end_file_name|><|fim▁begin|>package subsystems
// ResourceConfig is configs of resources.
type ResourceConfig struct {
MemoryLimit string
CPUShare string
CPUSet string
}
// SubSystem is cgourp subsystem, and path is a cgroup.
type SubSystem interface {
Name() string
Set(path st... | &MemorySubSystem{},
// &CpuSubSystem{},
}
) |
<|file_name|>decoding.rs<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the A... | |
<|file_name|>sqlite1.py<|end_file_name|><|fim▁begin|>import sqlite3
import os.path
import sys
import random
def makeDatabase(databaseName):
if databaseName[-3:] != ".db":
databaseName = databaseName + ".db"
conn = sqlite3.connect(databaseName)
conn.commit()
conn.close()
def listToString(list):
string = ""
for... | return False
else: |
<|file_name|>fetch.rs<|end_file_name|><|fim▁begin|>use bit_set::BitSet;
use byteorder::{ByteOrder, BigEndian, WriteBytesExt};
use futures::Stream;
use futures::sync::{oneshot, mpsc};
use futures::{Poll, Async, Future};
use std::cmp::min;
use std::fs;
use std::io::{self, Read, Write, Seek, SeekFrom};
use std::sync::{Arc... | assert!(new_index < self.shared.chunk_count);
{
let bitmap = self.shared.bitmap.lock().unwrap(); |
<|file_name|>report_converter.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python
from xml.sax.saxutils import escape
import re
def ConvertDiagnosticLineToSonqarqube(item):
try:
id, line, message, source_file = GetDiagnosticFieldsFromDiagnosticLine(item)
WriteDiagnosticFieldsToFile(id, line, messag... | for item in item_list: |
<|file_name|>DiffDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'DiffDialog.ui'
#
# Created: Tue Aug 30 12:04:37 2011
# by: PyQt4 UI code generator 4.8.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
... | self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.customButton = QtGui.QToolButton(DiffDialog) |
<|file_name|>tag.go<|end_file_name|><|fim▁begin|>package logging
import (
"time"
"github.com/urandom/readeef/content"
"github.com/urandom/readeef/content/repo"
"github.com/urandom/readeef/log"
)
type tagRepo struct {
repo.Tag
log log.Log
}
func (r tagRepo) Get(id content.TagID, user content.User) (content.Ta... | |
<|file_name|>bitcoin_en_GB.ts<|end_file_name|><|fim▁begin|><TS language="en_GB" version="2.1">
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>Right-click to edit address or label</translation>
</message>
<message>
... | </message>
</context>
<context> |
<|file_name|>calculator.py<|end_file_name|><|fim▁begin|>#
# calculator.py : A calculator module for the deskbar applet.
#
# Copyright (C) 2008 by Johannes Buchner
# Copyright (C) 2007 by Michael Hofmann
# Copyright (C) 2006 by Callum McKenzie
#
# This program is free software; you can redistribute it and/or modify... | since we have a generic parser we use that instead."""
return self._number_parser (match, 16)
|
<|file_name|>test_instructor_dashboard.py<|end_file_name|><|fim▁begin|>"""
End to end tests for Instructor Dashboard.
"""
from bok_choy.web_app_test import WebAppTest
from regression.pages.lms.course_page_lms import CourseHomePageExtended
from regression.pages.lms.dashboard_lms import DashboardPageExtended<|fim▁hole|... | |
<|file_name|>_color.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def __init__(
self, plotly_name="color", parent_name="histogram2dcontour.textfont", **kwargs
):
super(ColorValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edit_type=kw... | import _plotly_utils.basevalidators
class ColorValidator(_plotly_utils.basevalidators.ColorValidator): |
<|file_name|>user.rs<|end_file_name|><|fim▁begin|>use conduit::{Handler, Request, Method};
use cargo_registry::Model;
use cargo_registry::krate::EncodableCrate;
use cargo_registry::user::{User, EncodableUser};
use cargo_registry::db::RequestTransaction;
use cargo_registry::version::EncodableVersion;
#[derive(RustcDec... | fn me() {
let (_b, app, middle) = ::app(); |
<|file_name|>AP_Compass_LSM303D.cpp<|end_file_name|><|fim▁begin|>/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
/*
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 Foundatio... |
uint8_t tx[2];
uint8_t rx[2];
|
<|file_name|>xhr_impl.js<|end_file_name|><|fim▁begin|>'use strict';var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") return Reflect.decorate(decorators, target, key, desc);
switch (arguments.length)... | |
<|file_name|>show.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="hapi__joi" />
import Joi from '@hapi/joi';
import { Status as Tweet } from 'twitter-d';
import { AuthenticatedTwitterCallHandler } from '../../twitter-call-handler';
<|fim▁hole|> include_entities: boolean;
include_ext_alt_text: boolean... | export interface ShowOptions {
id: string;
trim_user: boolean;
include_my_retweet: boolean;
|
<|file_name|>grid-tile.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 {
Component,
ViewEncapsulation,
ElementRef,
Inp... | |
<|file_name|>data_wrangle_total.py<|end_file_name|><|fim▁begin|>import json
from pprint import pprint
import time
import io
# from http://www.codigomanso.com/en/2011/05/trucomanso-transformar-el-tiempo-en-formato-24h-a-formato-12h-python/
def ampmformat (hhmmss):
"""
This method converts time in 24h format to 12... | |
<|file_name|>201_ice_mismatch_1.py<|end_file_name|><|fim▁begin|># $Id: 201_ice_mismatch_1.py 2392 2008-12-22 18:54:58Z bennylp $
import inc_sip as sip
import inc_sdp as sdp<|fim▁hole|>v=0
o=- 0 0 IN IP4 127.0.0.1
s=pjmedia
c=IN IP4 127.0.0.1
t=0 0
m=audio 4000 RTP/AVP 0 101
a=ice-ufrag:1234
a=ice-pwd:5678
a=rtpmap:0 PC... |
sdp = \
""" |
<|file_name|>signature.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/Signature) on 2017-03-22.
# 2017, SMART Health IT.
from . import element
class Signature(element.Element):
""" A digital Signature - ... | electronic/cryptographic in nature, or a graphical image representing a
hand-written signature, or a signature process. Different signature
approaches have different utilities. |
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/*!
\file main.cpp
\author Standa Kubín
\date 31.03.2016
\brief server aplikace pro řízení okenních rolet
*/
#include <QCoreApplication>
#include <QSharedPointer>
#include <QThread>
#include <QFile>
#include <QUdpSocket>
#include <QDebug>
#include <QSemap... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># $Filename$
# $Authors$
#
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted... | """
|
<|file_name|>message.rs<|end_file_name|><|fim▁begin|>use linked_hash_map::LinkedHashMap;
use std::borrow::Cow;
use uuid::Uuid;
use chrono::{DateTime, UTC};
#[derive(Debug, Clone, PartialEq)]
pub struct Message<'a> {
timestamp: Option<Timestamp>,
expiration: Option<Timestamp>,
correlation_id: Option<Uuid>,
... | assert_eq!(message.headers().len(), 8);
assert_eq!(message.headers().get(&Key::from("Null")), Some(&Value::Null)); |
<|file_name|>helpers.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | export * from './helpers/ChaiModel'; |
<|file_name|>test_pbsea.py<|end_file_name|><|fim▁begin|>import numpy as np
import os
import pandas as pa
import scipy.stats as stats
import unittest
from pbsea import PandasBasedEnrichmentAnalysis, EnrichmentAnalysisExperimental, preprocessing_files
from unittest.mock import patch
test_data_directory = 'test_data/'
t... | '''
print("\nTesting hypergeometric sf on dataframe ")
counts_df = pa.read_csv(test_data_directory_sf + 'data_interest_test_sf_hypergeometric' + ".tsv", sep = "\t")
counts_df_reference = pa.read_csv(test_data_directory_sf + 'data_reference_test_sf_hypergeometric' + ".tsv", sep = "\t") |
<|file_name|>bug847425.js<|end_file_name|><|fim▁begin|>// |jit-test| allow-oom; allow-unhandlable-oom
gcparam("maxBytes", gcparam("gcBytes") + 4*1024);
var max = 400;
function f(b) {
if (b) {
f(b - 1);
} else {
g = {
apply:function(x,y) { }
};<|fim▁hole|>}
f(max - ... | }
g.apply(null, arguments); |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import logger from "./logger";
<|fim▁hole|>const middlewares = {
logger,
};
export default middlewares;<|fim▁end|> | |
<|file_name|>MacOSXCanvasImplementation.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2002-2008 LWJGL Project
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
<|fim▁hole|> * * ... | *
|
<|file_name|>script.js<|end_file_name|><|fim▁begin|>// requestAnim shim layer by Paul Irish
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequ... | if (inbounds=='true')
{ |
<|file_name|>_XDataPilotTables.java<|end_file_name|><|fim▁begin|>/*
* This file is part of the LibreOffice project.
*
* 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/... | import com.sun.star.sheet.XDataPilotDescriptor;
import com.sun.star.sheet.XDataPilotTables; |
<|file_name|>test.js<|end_file_name|><|fim▁begin|>"use strict";
var marvelNameGenerator = require('./index.js');<|fim▁hole|><|fim▁end|> | console.log("Expect to see a cool name:\n"+marvelNameGenerator()); |
<|file_name|>fluent-bmp180.js<|end_file_name|><|fim▁begin|>"use strict";
var Cylon = require("cylon");
Cylon
.robot()
.connection("arduino", { adaptor: "firmata", port: "/dev/ttyACM0" })
.device("bmp180", { driver: "bmp180" })
.on("ready", function(bot) {
bot.bmp180.getTemperature(function(err, val) {
... | }
}); |
<|file_name|>geo.py<|end_file_name|><|fim▁begin|>from django.conf import settings
from geopy import distance, geocoders<|fim▁hole|>
def get_geodata_by_ip(addr):
gi = pygeoip.GeoIP(settings.GEO_CITY_FILE, pygeoip.MEMORY_CACHE)
geodata = gi.record_by_addr(addr)
return geodata
def get_geodata_by_region(*a... | import pygeoip |
<|file_name|>manifest.rs<|end_file_name|><|fim▁begin|>use std::fmt;
use std::path::{PathBuf, Path};
use semver::Version;
use rustc_serialize::{Encoder, Encodable};
use core::{Dependency, PackageId, PackageIdSpec, Summary};
use core::package_id::Metadata;
use util::{CargoResult, human};
/// Contains all the informati... | fn default() -> Profile { |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import platform
import glob
from .io import DxlIO, Dxl320IO, DxlError
from .error import BaseErrorHandler
from .controller import BaseDxlController
from .motor import DxlMXMotor, DxlAXRXMotor, DxlXL320Motor
from ..robot import Robot
def _get_available_ports():
... | |
<|file_name|>CurveController.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2003-2009 jMonkeyEngine
* 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 ... | |
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>fn main() {
println!(r"cargo:rustc-link-search=.");
println!(r"cargo:rustc-link-search=/media/cb_Silverbox-OS/lib/libc");
println!(r"cargo:rustc-link-search=/media/cb_Silverbox-OS/lib/libos");
println!(r"cargo:rustc-link-lib=c");
<|fim▁hole|><|fim▁e... | println!(r"cargo:rustc-link-lib=os_init");
} |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#![feature(mpsc_select)]
extern crate time;
use std::thread;
use std::sync::mpsc;
use std::sync::mpsc::{SyncSender, Receiver};
use std::sync::mpsc::Select;
use std::io::prelude::*;
use std::fs::File;
use std::vec::Vec;
use time::PreciseTime;
struct StressedPacket {
... | |
<|file_name|>name.js<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 23.2.3.2
description: >
Set.prototype.clear ( )
17 ECMAScript Standard Built-in Objects
includes: [propertyHe... | assert.sameValue(Set.prototype.clear.name, "clear", "The value of `Set.prototype.clear.name` is `'clear'`");
verifyNotEnumerable(Set.prototype.clear, "name"); |
<|file_name|>error_test.go<|end_file_name|><|fim▁begin|>package api
import (
"errors"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
var _ = Describe("Error", func() {
Context("Marshalling", func() {
It("will be marshalled correctly with a wrapped error", func() {
apiErr := WrapErr(errors.New("boom... | expected := []byte(`{"errors":[ |
<|file_name|>solitaire15.test.py<|end_file_name|><|fim▁begin|>input = """
1 2 0 0
1 3 0 0
1 4 0 0
1 5 0 0
1 6 0 0
1 7 0 0
1 8 0 0
1 9 0 0
1 10 0 0
1 11 0 0
1 12 0 0
1 13 0 0
1 14 0 0
1 15 0 0
1 16 0 0
1 17 0 0
1 18 0 0
1 19 0 0
1 20 0 0
1 21 0 0
1 22 0 0
1 23 0 0
1 24 0 0
1 25 0 0
1 26 0 0
1 27 0 0
1 28 0 0
1 29 0 0
1 ... | 1 1 1 0 186
1 1 1 0 185 |
<|file_name|>Custom Message Tones.user.js<|end_file_name|><|fim▁begin|>// ==UserScript==
// @name Custom Message Tones
// @namespace pxgamer
// @version 0.5
// @description Adds options to load in custom tones when a message is received.
// @author pxgamer
// @include *kat.cr/*
// @grant ... | audio_element.pause();
audio_element.currentTime = 0; |
<|file_name|>app.routes.js<|end_file_name|><|fim▁begin|>/**
* Created by josip on 20.1.2017..
*/
angular.module('mainModule').config(function($routeProvider, $locationProvider){
$routeProvider
.when('/', {
templateUrl: '/home/home.view.html',
controller: 'homeCtrl',
co... | // use the HTML5 History API
$locationProvider.html5Mode(true);
}); |
<|file_name|>WalkableList.ts<|end_file_name|><|fim▁begin|>///<reference path='../definitions/JQuery.d.ts'/>
///<reference path='GetNextFreeId.ts'/>
///<reference path='IEntity.ts'/>
///<reference path='IWalkableList.ts'/>
///<reference path='IObservableRepository.ts'/>
module VjsPluginComponents {
//This Walkable l... |
remove(id: number) {
return this._repository.remove(id); |
<|file_name|>monitors_util.py<|end_file_name|><|fim▁begin|># Shared utility functions across monitors scripts.
import fcntl, os, re, select, signal, subprocess, sys, time
TERM_MSG = 'Console connection unexpectedly lost. Terminating monitor.'
class Error(Exception):
pass
class InvalidTimestampFormat(Error):
... |
Returns: function with a signature of (*params);
The format for a warning used here is:
%(timestamp)d\t%(msg_type)s\t%(status)s\n |
<|file_name|>zsys_openbsd.go<|end_file_name|><|fim▁begin|>// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs defs_openbsd.go
package ipv4
<|fim▁hole|>const (
sysIP_OPTIONS = 0x1
sysIP_HDRINCL = 0x2
sysIP_TOS = 0x3
sysIP_TTL = 0x4
sysIP_RECVOPTS = 0x5
sysIP_RECVRETOPTS = 0x6
sysIP_RECVDS... | |
<|file_name|>plastiqqcolormap.cpp<|end_file_name|><|fim▁begin|>#include "plastiqmethod.h"
#include "plastiqqcolormap.h"
#include <QColormap>
#include <QColor>
QHash<QByteArray, PlastiQMethod> PlastiQQColormap::plastiqConstructors = {
{ "QColormap(QColormap&)", { "QColormap", "QColormap&", "QColormap*", 0, Plasti... | QByteArray className = stack[1].s_bytearray;
QColormap *o = reinterpret_cast<QColormap*>(object->plastiq_data());
stack[0].s_voidp = Q_NULLPTR; |
<|file_name|>slice_visualization_ui.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'slice_visualization.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
cla... | |
<|file_name|>tfchart_datacontroler_simple.ts<|end_file_name|><|fim▁begin|>import { TFChartRange, TFChartRangeMake, TFChartIntersectionRange, TFChartEqualRanges, TFChartRangeMax, TFChartUnionRange, TFChartRangeInvalid } from '../tfchart_utils'
import { TFChartDataController, TFChartDataRequestType, TFChartDataAvailabili... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.