prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>### # Copyright (c) 2012, Valentin Lorentz # 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 code must retain ...
<|file_name|>imports.rs<|end_file_name|><|fim▁begin|>//! A bunch of methods and structures more or less related to resolving imports. use crate::diagnostics::Suggestion; use crate::Determinacy::{self, *}; use crate::Namespace::{self, MacroNS, TypeNS}; use crate::{module_to_string, names_to_string}; use crate::{Ambigui...
<|file_name|>event.go<|end_file_name|><|fim▁begin|>package models import ( "fmt" "github.com/confur-me/confur-api/db" "time" ) type Event struct { ID uint `gorm:"primary_key" json:"id"` ConferenceSlug *string `sql:"not null;index" binding:"required" json:"conference_slug"` Conference ...
if v, ok := this.params["conference"]; ok {
<|file_name|>Solution.py<|end_file_name|><|fim▁begin|>""" We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). Now given a string represented by several bits. Return whether the last character must be a one-bit character or...
def isOneBitCharacter(self, bits): """ :type bits: List[int]
<|file_name|>FeaturePropertyType.java<|end_file_name|><|fim▁begin|>/** * <copyright> * </copyright> * * $Id$ */ package net.opengis.gml; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.FeatureMap; import org.w3._1999.xlink.ActuateType; import org.w3._1999.xlink.ShowType; /** * <!-- begin...
*/ void setShow(ShowType value); /**
<|file_name|>call-functions.py<|end_file_name|><|fim▁begin|>print ("I'm not a function") def my_function():<|fim▁hole|>def brett(val): for i in range(val): print("I'm a function with args!") my_function() brett(5)<|fim▁end|>
print("Hey I'm a function!")
<|file_name|>NodePositionTest.java<|end_file_name|><|fim▁begin|>package net.mosstest.tests; import net.mosstest.scripting.NodePosition; import org.junit.Assert; import org.junit.Test; import java.io.IOException; import static org.junit.Assert.fail; public class NodePositionTest { public static final ...
<|file_name|>function_base.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from __future__ import division, absolute_import, print_function __all__ = ['logspace', 'linspace'] from . import numeric as _nx from .numeric import result_type, NaN def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None): ...
<|file_name|>problem_962.py<|end_file_name|><|fim▁begin|>"""962. Maximum Width Ramp https://leetcode.com/problems/maximum-width-ramp/ Given an array A of integers, a ramp is a tuple (i, j) for which i < j and A[i] <= A[j]. The width of such a ramp is j - i. Find the maximum width of a ramp in A. If one doesn't exis...
<|file_name|>plot_roc.py<|end_file_name|><|fim▁begin|>""" ======================================= Receiver Operating Characteristic (ROC) ======================================= Example of Receiver Operating Characteristic (ROC) metric to evaluate classifier output quality. ROC curves typically feature true positive ...
plt.plot(fpr[2], tpr[2], label='ROC curve (area = %0.2f)' % roc_auc[2])
<|file_name|>documentalesonline.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # ------------------------------------------------------------ import re from co...
data = re.sub(r"\n|\r|\t|\s{2}|-\s", "", data) pagination = scrapertools.find_single_match(data, '<div class="older"><a href="([^"]+)"')
<|file_name|>endian.rs<|end_file_name|><|fim▁begin|>use std::marker::PhantomData; use std::fmt; use std::cmp::Ordering; use std::hash::{Hash, Hasher}; use byteorder::{ByteOrder, LittleEndian, BigEndian, NativeEndian}; use uninitialized::uninitialized; use packed::{Unaligned, Aligned, Packed}; use pod::Pod; /// A type ...
/// A type alias for unaligned native endian primitives pub type Native<T> = EndianPrimitive<NativeEndian, T>;
<|file_name|>011.py<|end_file_name|><|fim▁begin|>import time def check_vertical(matrix): max_product = 0 for row in xrange(0, len(matrix)-3): for col in xrange(0, len(matrix)): product = matrix[row][col] * matrix[row+1][col] * matrix[row+2][col] * matrix[row+3][col] max_product = max(product, max_product) <...
return max_product def check_horizontal(matrix):
<|file_name|>reader.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import import csv from copy import copy from typing import List, Dict import typesystem from .types import PartialActor, ActorIssue, PartialIssue, IssuePosition, IssueDescription, Comment types = { Partia...
if issue_position.issue in self.issues: issue = self.issues[issue_position.issue]
<|file_name|>MI_example.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the foll...
dma_cntrl.responseFromDir = MessageBuffer(ordered = True) dma_cntrl.responseFromDir.slave = ruby_system.network.master
<|file_name|>registry.py<|end_file_name|><|fim▁begin|>import copy from threading import Lock from .metrics_core import Metric class CollectorRegistry(object): """Metric collector registry. Collectors must have a no-argument method 'collect' that returns a list of Metric objects. The returned metrics sho...
collectors = copy.copy(self._collector_to_names) for collector in collectors:
<|file_name|>AsyncHttpServer.java<|end_file_name|><|fim▁begin|>package com.koushikdutta.async.http.server; import android.annotation.TargetApi; import android.content.Context; import android.content.res.AssetManager; import android.os.Build; import android.text.TextUtils; import com.koushikdutta.async.AsyncSSLSocket;...
if (index != -1) { String e = path.substring(index + 1); String ct = mContentTypes.get(e); if (ct != null)
<|file_name|>sgash.rs<|end_file_name|><|fim▁begin|>/* kernel::sgash.rs */ #[allow(unused_imports)]; use core::*; use core::str::*; use core::option::{Some, Option, None}; use core::iter::Iterator; use kernel::*; use kernel::vec::Vec; use super::super::platform::*; use kernel::memory::Allocator; use kernel::memory::Bu...
} }
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descrip...
}, { key: 'destroy',
<|file_name|>issue-54943-1.rs<|end_file_name|><|fim▁begin|>// This test is a minimal version of an ICE in the dropck-eyepatch tests // found in the fix for #54943. <|fim▁hole|>// check-pass fn foo<T>(_t: T) { } fn main() { struct A<'a, B: 'a>(&'a B); let (a1, a2): (String, A<_>) = (String::from("auto"), A(&"t...
<|file_name|>bitcoin.cpp<|end_file_name|><|fim▁begin|>/* * W.J. van der Laan 2011-2012 */ #include <QApplication> #include "bitcoingui.h" #include "clientmodel.h" #include "walletmodel.h" #include "optionsmodel.h" #include "guiutil.h" #include "guiconstants.h" #include "init.h" #include "util.h" #include "ui_interf...
if(GetBoolArg("-min")) { window.showMinimized();
<|file_name|>expression-014.js<|end_file_name|><|fim▁begin|>/** File Name: expression-014.js Corresponds To: ecma/Expressions/11.2.2-9-n.js ECMA Section: 11.2.2. The new operator Description: Author: christine@netscape.com Date: 12 november 1997 */ ...
test();
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from django.contrib.auth import views as auth_views from app.views import IndexView, RegisterView, UserProfileView<|fim▁hole|> name='index'), url(r'^register/$', RegisterView.as_view(), name='register'), ...
urlpatterns = [ url(r'^$', IndexView.as_view(),
<|file_name|>synthrepo.py<|end_file_name|><|fim▁begin|># synthrepo.py - repo synthesis # # Copyright 2012 Facebook # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''synthesize structurally interesting change history This extensi...
wlock = repo.wlock()
<|file_name|>collections.js<|end_file_name|><|fim▁begin|>Products = new Mongo.Collection('products'); Cart = new Mongo.Collection('cart'); Orders = new Mongo.Collection('orders');<|fim▁hole|>Categories = new Mongo.Collection('categories');<|fim▁end|>
<|file_name|>test_call_template.py<|end_file_name|><|fim▁begin|>from Xml.Xslt import test_harness sheet_str = """<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <root> <xsl:apply-templates/> </root> </xsl:template> <xsl:template name="do...
source_str = """<?xml version = "1.0"?> <data> <item>b</item> <item>a</item>
<|file_name|>runner.rs<|end_file_name|><|fim▁begin|>use algebra::Operator; use common::dataset::DataSet; use common::err::{Result, Void}; use common::plugin::{Plugin, PluginManager}; use common::session::Session; pub trait QueryRunner { fn default_session(&self) -> Session; fn add_plugin(&mut self, package: Box<...
fn plugin_manager(&self) -> &PluginManager;
<|file_name|>res_users.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- # # OpenERP, Open Source Management Solution # This module copyright (C) 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the ...
_logger = logging.getLogger(__name__)
<|file_name|>Error.py<|end_file_name|><|fim▁begin|>import logging class Error(Exception): def __init__(self, message, data = {}): self.message = message self.data = data def __str__(self): return self.message + ": " + repr(self.data) <|fim▁hole|> @staticmethod def die(code, err...
<|file_name|>alternate_formats_country_code_set.rs<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 Guillaume Gomez //<|fim▁hole|>// 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 required by app...
// Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>container-toggler.module.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common'; import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { ContainerTogglerComponent } from './container-toggler.component'; @NgModule({ imports: [CommonModule], declarations: [Con...
}) export class ContainerTogglerModule {}
<|file_name|>client.js<|end_file_name|><|fim▁begin|>var crypto = require('crypto'); var EventEmitter = require('events').EventEmitter; var util = require('util'); var pgPass = require('pgpass'); var TypeOverrides = require('./type-overrides'); var ConnectionParameters = require('./connection-parameters'); var Query = ...
self.activeQuery.handlePortalSuspended(con);
<|file_name|>s3fs.py<|end_file_name|><|fim▁begin|># Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2...
else: to_delete = iter([])
<|file_name|>output2csv.py<|end_file_name|><|fim▁begin|>import os, re, csv # regular expressions for capturing the interesting quantities noise_pattern = 'noise: \[(.+)\]' res_pattern = '^([0-9.]+$)' search_dir = "output" results_file = '../results.csv' os.chdir( search_dir ) files = filter( os.path.isfile, os.listd...
results.append( [ res ] + noise ) writer = csv.writer( open( results_file, 'wb' ))
<|file_name|>OuterIterator.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1998-2011 Caucho Technology -- all rights reserved * * This file is part of Resin(R) Open Source * * Each copy or derived work must preserve the copyright notice and this<|fim▁hole|> * the Free Software Foundation; either version 2 of ...
* notice unmodified. * * Resin Open Source is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
<|file_name|>note.js<|end_file_name|><|fim▁begin|>OSM.Note = function (map) { var content = $("#sidebar_content"), page = {}, halo, currentNote; var noteIcons = { "new": L.icon({ iconUrl: OSM.NEW_NOTE_MARKER, iconSize: [25, 40], iconAnchor: [12, 40] }), "open": L.icon({ ...
page.pushstate = page.popstate = function (path) {
<|file_name|>spr2d.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2000-2001 by Jorrit Tyberghein This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the...
csVector3 new_pos = transform.This2Other (part_pos); UpdateLighting (lights, new_pos);
<|file_name|>lock.py<|end_file_name|><|fim▁begin|>from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-LockWorkStation', 'Author': ['@harmj0y'], 'Description': ("Locks the workstation's display."), ...
$SetLastError = [Runtime.InteropServices.DllImportAttribute].GetField('SetLastError') $SetLastErrorCustomAttribute = New-Object Reflection.Emit.CustomAttributeBuilder($DllImportConstructor,
<|file_name|>server.ts<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|> createConnection, IConnection, TextDocumentSyncKind, TextDocuments, Diagnostic, DiagnosticSeverity, TextDocumentPositionParams, InitializeParams, InitializeResult, CompletionItem, CompletionItemKind, Files, Definition, CodeActionParams, Co...
import { IPCMessageReader, IPCMessageWriter,
<|file_name|>listener.py<|end_file_name|><|fim▁begin|>from typing import Callable, Any from ..model import MetaEvent, Event from ..exceptions import PropertyStatechartError __all__ = ['InternalEventListener', 'PropertyStatechartListener'] class InternalEventListener: """ Listener that filters and propagat...
def __init__(self, interpreter) -> None:
<|file_name|>layer.go<|end_file_name|><|fim▁begin|>package storage import ( "sync" ) // layer is a storage primitive with optional passthrough // to underlying layers. // // Layer stores values that were modified locally and // uses recursive get() calls if the key wasn't found locally. // // When asked for commit()...
} t.data[key] = &value t.refreshCacheForValue(value)
<|file_name|>LanguagePackage.java<|end_file_name|><|fim▁begin|>/** */ package org.w3._2001.smil20.language; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.w3._2001.smil20.Smil20Package; /** * <...
<|file_name|>0004_labmandeploygeneralsettings_background_color.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('labman_setup', '0003_googlesearchscript'), ...
field=models.CharField(max_length=25, null=True, blank=True),
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![crate_name = "aws"] #![crate_type = "lib"] #![feature(convert)] #[macro_use] extern crate hyper; #[cfg(unix)] extern crate openssl; extern crate rustc_serialize as serialize; extern crate time; extern crate url; extern crate ini; #[macro_use] extern crate log; pu...
pub mod request;
<|file_name|>jest.config.js<|end_file_name|><|fim▁begin|>/** * @license Copyright 2018 The Lighthouse 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.apac...
'/test/',
<|file_name|>CacheFeederAgent.py<|end_file_name|><|fim▁begin|># $HeadURL: $ ''' CacheFeederAgent This agent feeds the Cache tables with the outputs of the cache commands. ''' from DIRAC import S_OK#, S_ERROR, gConfig from DIRAC.AccountingSystem.Client.ReportsCl...
<|file_name|>BestScoreSubSingleStatistic.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010 JBoss 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/...
listener = new BestScoreSubSingleStatisticListener(); }
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from datetime import datetime from django.http import HttpResponse, HttpResponseRedirect from django.views.generic import View, ListView, DetailView from django.views.generic.edit import CreateView, UpdateView from content.models import Sub, SubFollow, Post, Commit f...
class SubView(ListView):
<|file_name|>shell.py<|end_file_name|><|fim▁begin|>"""Output formatters using shell syntax. """ from .base import SingleFormatter import argparse import six class ShellFormatter(SingleFormatter): def add_argument_group(self, parser): group = parser.add_argument_group( title='shell formatter...
<|file_name|>nodejs_require.js<|end_file_name|><|fim▁begin|>var n = require('./nodejs'); n.a; n.b.c; exports.a2 = n.a; exports.b2 = n.b;<|fim▁hole|><|fim▁end|>
exports.c2 = n.b.c;
<|file_name|>make_colorscale_from_colors.py<|end_file_name|><|fim▁begin|>def make_colorscale_from_colors(colors): <|fim▁hole|> return tuple((i / (len(colors) - 1), color) for i, color in enumerate(colors))<|fim▁end|>
if len(colors) == 1: colors *= 2
<|file_name|>api_versions_request.go<|end_file_name|><|fim▁begin|>package sarama // ApiVersionsRequest ... type ApiVersionsRequest struct{} func (a *ApiVersionsRequest) encode(pe packetEncoder) error {<|fim▁hole|> return nil } func (a *ApiVersionsRequest) decode(pd packetDecoder, version int16) (err error) { return...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"""Subpackage with PS-specific BSMP objects."""
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>""" sentry.client.celery.tasks ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from celery.decorators import task from sentry.client.base import SentryClient from sentr...
def send(data):
<|file_name|>stats.py<|end_file_name|><|fim▁begin|>import numpy as np file = "/home/rishabh/IdeaProjects/jitd/java/benchmark_20151213_224704_freqWrites/benchmark_scatter_1024m.txt" # data = np.genfromtxt(file, dtype=(int, float, None), delimiter=',', names=['x', 'y', 'z'],) data = np.genfromtxt(file, dtype=None, delim...
read_count += 1
<|file_name|>selection.ts<|end_file_name|><|fim▁begin|>import NodeUtils from "../../components/graph/NodeUtils" import {getProcessToDisplay} from "../../reducers/selectors/graph" import {ThunkAction} from "../reduxTypes" import {deleteNodes} from "./node" import {reportEvent} from "./reportEvent" type Event = { catego...
clearTextSelection()
<|file_name|>account_bank_statement.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from openerp import api, fields, models, _ from openerp.osv import expression from openerp.tools import float_is_zero from openerp.tools import float_compare, float_round from openerp.tools.misc import formatLang from openerp.e...
""" # Domain to fetch registered payments (use case where you encode the payment before you get the bank statement) reconciliation_aml_accounts = [self.journal_id.default_credit_account_id.id, self.journal_id.default_debit_account_id.id]
<|file_name|>test_lastpass.py<|end_file_name|><|fim▁begin|># (c)2016 Andrew Zenk <azenk@umn.edu> # # This file is part of Ansible # # Ansible 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...
_mock_disconnected = False
<|file_name|>util_test.go<|end_file_name|><|fim▁begin|>package httpagent import ( "testing" "github.com/mesos/mesos-go/api/v1/lib/agent" ) func TestClassifyResponse(t *testing.T) { _, err := classifyResponse(nil) if err == nil { t.Fatal("expected error instead of nil") } for _, v := range agent.Call_Type_val...
_, err = classifyResponse(&agent.Call{Type: ct}) if ct == agent.Call_UNKNOWN {
<|file_name|>image.ts<|end_file_name|><|fim▁begin|>/** * Entry point for Embed Images */ /// <reference path="./embed.d.ts" /> // require('html5shiv'); //import _ = require('underscore'); let pym = require('pym.js'); import ConfigService from '../components/embed/config/service'; import ResizeEl from '../component...
<|file_name|>services.js<|end_file_name|><|fim▁begin|>[ { "title": "Ventes véhicules", "url": "", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/car2.jpg", "language": "fr-FR", "order": "1", "workplace": "All", "department": "All", "categoryPro": "All", ...
"department": "All",
<|file_name|>OutputStreamProxyFactory.java<|end_file_name|><|fim▁begin|>/* * HA-JDBC: High-Availability JDBC * Copyright (C) 2013 Paul Ferraro * * This program 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...
super(parentProxy, parent, invoker, outputs); }
<|file_name|>TodoList.js<|end_file_name|><|fim▁begin|><|fim▁hole|>import TodoItem from './TodoItem'; const TodoList = ({todos}) => ( <ul className="todo-list"> {todos.map(todo => <TodoItem key={todo.id} {...todo} /> )} </ul> ); TodoList.propTypes = { todos: PropTypes.array.isRequired } export de...
import React, { PropTypes } from 'react';
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate num_traits;<|fim▁hole|>// macro must be defined first to be usable in other modules #[macro_use] mod macros; // Nullable container mod nullvec; // Nullable scalar mod nullable; // Generic types mod generic; // common mod algos; mod traits; pub mod prelude...
<|file_name|>test_remove_duplicate_trackers.py<|end_file_name|><|fim▁begin|>import pytest import unittest from unittest import mock from django.conf import settings from django.core.management import call_command from oppia.test import OppiaTestCase from io import StringIO from oppia.models import Tracker class Remo...
mock_input.side_effect = input_response out = StringIO() call_command('remove_duplicate_trackers', stdout=out)
<|file_name|>mac_notification.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # 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 ...
<|file_name|>jssip.js<|end_file_name|><|fim▁begin|>/* * JsSIP v3.0.2 * the Javascript SIP library * Copyright: 2012-2017 José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan) * Homepage: http://jssip.net * License: MIT */ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module....
function parse_from_param() { var result0;
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "smarturl.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above im...
try: import django
<|file_name|>PackageJammerTask.java<|end_file_name|><|fim▁begin|>/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Web Client * Copyright (C) 2006, 2007, 2009, 2010 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this ...
public boolean isWrapped() { return this.wrap; }
<|file_name|>legacy.py<|end_file_name|><|fim▁begin|>""" Instructor Views """ ## NOTE: This is the code for the legacy instructor dashboard ## We are no longer supporting this file or accepting changes into it. from contextlib import contextmanager import csv import json import logging import os import re import reques...
# generate and return CSV file return return_csv('grades {name}.csv'.format(name=aname), datatable)
<|file_name|>PacketPlayOutEntityHeadRotation.java<|end_file_name|><|fim▁begin|>package net.minecraft.server; import java.io.IOException; public class PacketPlayOutEntityHeadRotation implements Packet<PacketListenerPlayOut> {<|fim▁hole|> private byte b; public PacketPlayOutEntityHeadRotation() {} public P...
private int a;
<|file_name|>gc.py<|end_file_name|><|fim▁begin|># Copyright 2011 Nicholas Bray # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
from . dfs import CFGDFS
<|file_name|>fmlogger.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from ..client import MODE_CHOICES from ..client.tasks import ReadChannelValues, WriteChannelValue from ..client.worker import Worker from ..utils.command import BaseCommand from ..values.channel import Channel from ..val...
action='store_const', dest='mode', const='rds', help='set rds mode') group.add_option('--stereo',
<|file_name|>uint.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/licen...
//! Operations and constants for architecture-sized unsigned integers (`uint` type) #![unstable]
<|file_name|>Storage.hpp<|end_file_name|><|fim▁begin|>/* -*- Mode: c; c-basic-offset: 2 -*- * * Storage.cpp - Redland C++ Storage class interface * * Copyright (C) 2008, David Beckett http://www.dajobe.org/ * * This package is Free Software and part of Redland http://librdf.org/ * * It is licensed under the f...
class MemoryStorage : public Storage { public: MemoryStorage(World* w, const std::string n="", const std::string opts="") throw(Exception);
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
""" msg_on_err = kwargs.pop("msg_on_err", None) debug_output = kwargs.pop("debug_output", True)
<|file_name|>delete.js<|end_file_name|><|fim▁begin|><|fim▁hole|>module.exports = function(uri,opt){ return yhr('DELETE',uri,null,opt); };<|fim▁end|>
var yhr = require('./main.js');
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>"use strict"; var chai = require('chai'), should = chai.should(), expect = chai.expect, XMLGrammers = require('../').XMLGrammers, Parameters = require('../').Parameters; describe('FMServerConstants', function(){ describe('XMLGrammers', functi...
it('should be frozen', function(){ expect(function(){
<|file_name|>saxenc.py<|end_file_name|><|fim▁begin|># This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # T...
<|file_name|>test_core.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # TextGridTools -- Read, write, and manipulate Praat TextGrid files # Copyright (C) 2013-2014 Hendrik Buschmeier, Marcin Włodarczak # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
def test_adding(self): t = Tier()
<|file_name|>Inuvik.py<|end_file_name|><|fim▁begin|>'''tzinfo timezone information for America/Inuvik.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Inuvik(DstTzInfo): '''America/Inuvik timezone definition. See datetime.tzin...
d(2023,11,5,8,0,0), d(2024,3,10,9,0,0), d(2024,11,3,8,0,0),
<|file_name|>image_reader.py<|end_file_name|><|fim▁begin|>from typing import Callable, Iterable, List, Optional import os import numpy as np from PIL import Image, ImageFile<|fim▁hole|> pad_w: Optional[int] = None, pad_h: Optional[int] = None, rescale_w: bool = False, ...
ImageFile.LOAD_TRUNCATED_IMAGES = True def image_reader(prefix="",
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>use std::{ iter::FromIterator, net::TcpListener, process, sync::mpsc, thread, time::Duration }; use std::convert::Infallible; use std::net::{IpAddr, SocketAddr}; use futures::channel::oneshot::channel; use hyper::server::Server; use hyper::service::make_s...
} }
<|file_name|>lib.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|> use ligature::{Ligature, WriteFn, QueryFn, LigatureError...
//! This module is the main module for the Ligature-SQLite project. //! It implements the traits supplied by Ligature and persists data via SQLite3. #![deny(missing_docs)]
<|file_name|>CrapsExperiment.java<|end_file_name|><|fim▁begin|>/**************************************************** Statistics Online Computational Resource (SOCR) http://www.StatisticsResource.org All SOCR programs, materials, tools and resources are developed by and freely disseminated to the entire community....
<|file_name|>module_with_multiple_exports.js<|end_file_name|><|fim▁begin|>/** * @module {Module} utils/math<|fim▁hole|> * @parent utils * * The module's description is the first paragraph. * * The body of the module's documentation. */ import _ from 'lodash'; /** * @function * * This function's description i...
<|file_name|>OderEvaluateActivity.java<|end_file_name|><|fim▁begin|>package com.melvin.share.ui.activity; import android.content.Context; import android.databinding.DataBindingUtil; import android.text.TextUtils; import android.view.View; import android.widget.LinearLayout; import com.bumptech.glide.Glide; import com...
* 描述: 订单评价页面
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(const_fn, plugin)]<|fim▁hole|>#![allow(unused_mut)] extern crate algorithms; #[macro_use] extern crate expectest; mod union_find; mod percolation; mod generator; mod collinear_points;<|fim▁end|>
#![plugin(stainless)] // for stainless
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os, sys from django.core.management import execute_manager sys.path.insert(0, os.path.abspath('./../../'))<|fim▁hole|>except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory contai...
try: import settings # Assumed to be in the same directory.
<|file_name|>resourceLimits.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) Microsoft Corporation. All rights reserved.<|fim▁hole|> * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is * regenerated. */ 'use strict'; /** * The res...
* Licensed under the MIT License. See License.txt in the project root for * license information.
<|file_name|>dvsighdl.cc<|end_file_name|><|fim▁begin|>/* * * Copyright (C) 2001-2010, OFFIS e.V. * All rights reserved. See COPYRIGHT file for details. * * * This software and supporting documentation were developed by * * OFFIS e.V. * R&D Division Health * Escherweg 2 * D-26121 Oldenburg, Ge...
const char *DVSignatureHandler::getCurrentSignatureValidationOverview() const
<|file_name|>second.py<|end_file_name|><|fim▁begin|>"""Second module, imported as inspect_recursive.a, with no contents""" import inspect_recursive.first as a import sys if sys.version_info >= (3, 7): # For some reason 3.6 says second doesn't exist yet. I get that, it's a # cyclic reference, but that works i...
from inspect_recursive import Foo as Bar
<|file_name|>Step2aCorr_Gilson_etal_2012.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' Based on: Gilson, Matthieu, Tomoki Fukai, and Anthony N. Burkitt. Spectral Analysis of Input Spike Trains by Spike-Timing-Dependent Plasticity. PLoS Comput Biol 8, no. 7 (July 5, 2012): e1002584. doi:10.1371/journal.pcbi....
# Network parameters: synaptic plasticity # ###########################################
<|file_name|>64350000.jsonp.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
jsonp({"cep":"64350000","cidade":"S\u00e3o Jo\u00e3o da Serra","uf":"PI","estado":"Piau\u00ed"});
<|file_name|>Str.ts<|end_file_name|><|fim▁begin|>// String validation import schemaStore from "../SchemaStore"; import * as _ from "lodash"; import * as Utils from "../utils"; import { ConstraintOptions } from "../ConstraintOptions"; export interface StringOptions extends ConstraintOptions{ length?: number; ...
path }) }
<|file_name|>kickstart_parser.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Pegasus utility functions for pasing a kickstart output file and return wanted information<|fim▁hole|># Copyright 2007-2010 University Of Southern California # # Licensed under the Apache License, Version 2.0 (the "License"); # ...
""" ##
<|file_name|>galaxycash.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2017 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <galaxycash.h> ...
<|file_name|>JsonUser.java<|end_file_name|><|fim▁begin|>package com.at.springboot.mybatis.po; public class JsonUser { /** * This field was generated by MyBatis Generator. This field corresponds to the database column JSON_USER.JSON_USER_ID * @mbg.generated Thu Aug 29 17:59:18 CST 2019 */ ...
public byte[] getJsonUserId() { return jsonUserId; }
<|file_name|>api_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.o...
self.evaluate(variables.global_variables_initializer()) self.assertAllEqual(True, self.evaluate(x))
<|file_name|>sensei_components.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # 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 # # Unles...
if not self.type: self.type = val_type