prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>proxyLinda.py<|end_file_name|><|fim▁begin|>''' PyDALI proxyLinda module to encapsulate DALI agent communication in the ASP solver case study Licensed with Apache Public License by AAAI Research Group Department of Information Engineering and Computer Science and Mathematics University of L'Aq...
<|file_name|>test_ecs_operator.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # 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 ...
) wait_mock.assert_called_once_with() check_mock.assert_called_once_with()
<|file_name|>sankey-chart.component.ts<|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 requ...
<|file_name|>testNotifyTCPServer.py<|end_file_name|><|fim▁begin|>#coding=utf-8 #-*- encoding: utf-8 -*- import tornado.ioloop import tornado.iostream import socket import struct import NotifyTCPServer def readPacketHeader(): stream.read_bytes(NotifyTCPServer.PACKET_HEADER_LEN, parsePacketHeader) def parsePacketH...
command=0
<|file_name|>GEMglTexCoord3s.cpp<|end_file_name|><|fim▁begin|>//////////////////////////////////////////////////////// // // GEM - Graphics Environment for Multimedia // // Implementation file // // Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at // zmoelnig@iem.kug.ac.at // For i...
CPPEXTERN_NEW_WITH_THREE_ARGS ( GEMglTexCoord3s , t_floatarg, A_DEFFLOAT, t_floatarg, A_DEFFLOAT, t_floatarg, A_DEFFLOAT);
<|file_name|>sql_group_concat.py<|end_file_name|><|fim▁begin|>from django.db.models import Aggregate, CharField class Sql_GroupConcat(Aggregate):<|fim▁hole|> def __init__(self, expression, separator, distinct=False, ordering=None, **extra): self.separator = separator super(Sql_GroupConcat, self).__...
function = 'GROUP_CONCAT' allow_distinct = True
<|file_name|>paymentserver.cpp<|end_file_name|><|fim▁begin|>// Copyright (c) 2011-2014 The Testcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "paymentserver.h" #include "Testcoinunits.h" #include ...
}
<|file_name|>stomp_planner_manager.cpp<|end_file_name|><|fim▁begin|>/** * @file stomp_planner_manager.cpp * @brief This defines the stomp planning manager for MoveIt * * @author Jorge Nicho * @date April 5, 2016 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2016, Southwest Research Institut...
void StompPlannerManager::setPlannerConfigurations(const planning_interface::PlannerConfigurationMap &pcs) { ROS_WARN_STREAM("The "<<__FUNCTION__<<" method is not applicable"); }
<|file_name|>DeterministicSeed.java<|end_file_name|><|fim▁begin|>/** * Copyright 2014 Google Inc. * Copyright 2014 Andreas Schildbach * * 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 * ...
public DeterministicSeed(byte[] entropy, String passphrase, long creationTimeSeconds) {
<|file_name|>GreetingController.java<|end_file_name|><|fim▁begin|>package org.jta.testspringhateoas.hello; import org.springframework.http.HttpEntity;<|fim▁hole|>import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation...
import org.springframework.http.HttpStatus;
<|file_name|>group.py<|end_file_name|><|fim▁begin|># This file is part of Booktype. # Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org> # # Booktype is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the F...
try: sputnik.sadd("sputnik:channel:%s:users" % message["channel"], request.user.username)
<|file_name|>process.py<|end_file_name|><|fim▁begin|>#============================================================================== # Principles of the new `climlab` API design: # # * `climlab.Process` object has several iterable dictionaries of named, # gridded variables: # # * `process.state` # # ...
# - `process.integrate_years()` etc will automate time-stepping
<|file_name|>0014_auto__add_field_userprofile_wiki_profile_url.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Use...
'registration_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'twitter_account': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '16', 'blank': 'True'}),
<|file_name|>user-profile-bio.js<|end_file_name|><|fim▁begin|>import Component from '@ember/component'; import { computed } from '@ember/object'; import { inject as service } from '@ember/service'; import { isEmpty } from '@ember/utils'; import { all } from 'rsvp'; import { task, timeout } from 'ember-concurrency'; imp...
classNameBindings: [':user-profile-bio', ':small-component', 'hasSavedRecently:has-saved:has-not-saved'],
<|file_name|>storage.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python3 # STL imports import datetime import json import logging import pprint # Package imports import dateutil.parser import sqlalchemy from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import (relationship, scoped_sessio...
# self.page_id = page_id
<|file_name|>meanfunc_tests.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, James Hensman # Licensed under the BSD 3-clause license (see LICENSE.txt) import unittest import numpy as np import GPy class MFtests(unittest.TestCase): def test_simple_mean_function(self): """ The simplest possible...
k =GPy.kern.RBF(1) lik = GPy.likelihoods.Gaussian() m = GPy.core.GP(X, Y, kernel=k, likelihood=lik, mean_function=mf)
<|file_name|>diagnostic.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 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/lice...
Ok(())
<|file_name|>lxc-patch.py<|end_file_name|><|fim▁begin|># Yum plugin to re-patch container rootfs after a yum update is done # # Copyright (C) 2012 Oracle # # Authors: # Dwight Engen <dwight.engen@oracle.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
pkgs = [] patch_required = False
<|file_name|>session.go<|end_file_name|><|fim▁begin|>package helper import ( "errors" "encoding/json" log "github.com/sirupsen/logrus" "github.com/Cepave/open-falcon-backend/modules/f2e-api/app/model/uic" "github.com/Cepave/open-falcon-backend/modules/f2e-api/config" "github.com/gin-gonic/gin" ) type WebSess...
var session uic.Session db.Table("session").Where("sig = ? and uid = ?", websessio.Sig, user.ID).Scan(&session) if session.ID == 0 {
<|file_name|>XML.java<|end_file_name|><|fim▁begin|>package org.com.json; /* Copyright (c) 2002 JSON.org 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 restriction, including without limi...
for (i = 0; i < length; i += 1) {
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|>""" yubistack.exceptions ~~~~~~~~~~~~~~~~~~~~ List all custom exceptions here """<|fim▁hole|> STATUS_CODES = { # YKAuth 'BAD_PASSWORD': 'Invalid password', 'DISABLED_TOKEN': 'Token is disabled', 'UNKNOWN_USER': 'Unknown user', 'INVALID_TOKEN'...
<|file_name|>tsd.d.ts<|end_file_name|><|fim▁begin|>/// <reference path="assertion-error/assertion-error.d.ts" /><|fim▁hole|>/// <reference path="dat-gui/dat-gui.d.ts" /> /// <reference path="node/node.d.ts" /><|fim▁end|>
/// <reference path="chai/chai.d.ts" />
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for react-native-elements v1.0.0-beta // Project: https://github.com/react-native-training/react-native-elements#readme // Definitions by: Kyle Roach <https://github.com/iRoachie> // Ifiok Jr. <https://github.com/ifiokjr> // Defini...
<|file_name|>script_task.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The script task is the task that owns the DOM in memo...
failure_msg: Failure, resource_task: ResourceTask,
<|file_name|>Collision.java<|end_file_name|><|fim▁begin|>package drawing; import math.VectorMath; /** * * @author Mark Traquair - Started in 2013/14 */ public class Collision { VectorMath math = new VectorMath(); private boolean doTheMath(Point point1, Point point2){ //This is ...
}
<|file_name|>loader.js<|end_file_name|><|fim▁begin|>/** * Created by plter on 6/13/16. */ (function () { var files = ["hello.js", "app.js"]; files.forEach(function (file) { var scriptTag = document.createElement("script"); scriptTag.async = false; scriptTag.src = file; docu...
});
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider <|fim▁hole|>class Provider(PhoneNumberProvider): phonenumber_prefixes = [134, 135, 136, 137, 138, 139, 147, 150, 151, 152,...
<|file_name|>device_tracker.py<|end_file_name|><|fim▁begin|>"""Support for OpenWRT (ubus) routers.""" import logging import re from openwrt.ubus import Ubus import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA, DeviceScanner, ) f...
def get_scanner(hass, config): """Validate the configuration and return an ubus scanner.""" dhcp_sw = config[DOMAIN][CONF_DHCP_SOFTWARE] if dhcp_sw == "dnsmasq":
<|file_name|>mds.cpp<|end_file_name|><|fim▁begin|>#include "cdi.h" #include "mds_reader.h" #include "common.h" SessionInfo mds_ses; TocInfo mds_toc; DiscType mds_Disctype=CdRom; struct file_TrackInfo { u32 FAD; u32 Offset; u32 SectorSize; }; file_TrackInfo mds_Track[101]; FILE* fp_mdf=0; u8 mds_SecTemp[5120]; u3...
for (u32 i=0;i<mds_TrackCount;i++) {
<|file_name|>test_storage_passwords.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2011-2015 Splunk, 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://w...
p = self.storage_passwords.create("changeme", username, realm)
<|file_name|>ice-3747.rs<|end_file_name|><|fim▁begin|>/// Test for https://github.com/rust-lang/rust-clippy/issues/3747<|fim▁hole|> }; } macro_rules! b { () => { a! { pub } }; } b! {} fn main() {}<|fim▁end|>
macro_rules! a { ( $pub:tt $($attr:tt)* ) => { $($attr)* $pub fn say_hello() {}
<|file_name|>bot.js<|end_file_name|><|fim▁begin|>'use strict'; import assert from 'assert'; import bot from '../bot.js'; import * as interval from '../interval.js'; import FakeClient from './util/fakeclient.js'; import FakeMessage from './util/fakemessage.js'; describe('./bot.js', () => { let client; beforeEach(()...
});
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use bytes::{Buf, Bytes}; use diem_infallible::Mutex; use futures::{ channel::mpsc::{self, UnboundedReceiver, UnboundedSender}, io::{AsyncRead, AsyncWrite, Error, ErrorKind, Result...
Ok(Self { incoming: receiver, port,
<|file_name|>DistributedPartyJukeboxActivityBaseAI.py<|end_file_name|><|fim▁begin|>from direct.directnotify import DirectNotifyGlobal from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI from direct.task import Task import PartyGlobals class DistributedPartyJukeboxActivityBaseAI(Distribut...
DistributedPartyActivityAI.__init__(self, air, parent, activityTuple) self.music = PartyGlobals.PhaseToMusicData40
<|file_name|>test_subnet_service_types.py<|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 # # Unl...
service_type = 'compute:foo' if fallback: # Create a subnet with no service types res = self._create_service_subnet(network=network)
<|file_name|>csv_mat.py<|end_file_name|><|fim▁begin|># @author: Milinda Fernando # School of Computing, University of Utah. # generate all the slurm jobs for the sc16 poster, energy measurements, import argparse from subprocess import call import os if __name__ == "__main__": parser = argparse.ArgumentParser(prog='s...
fout.close() print 'OK'
<|file_name|>checklist.addfiles.view.js<|end_file_name|><|fim▁begin|>/** * */ define(['jquery', 'dropzone', 'pica', 'bootstrap'], function($, dropzone, pica, bootstrap) { 'use strict'; var Dropzone = window.Dropzone; Dropzone.autoDiscover = false; function dataURItoBlob(dataURI) { // conver...
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; // write the bytes of the string to a typed array
<|file_name|>offer.actions.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Action } from '@ngrx/store'; import {Offer} from '../model/backend-typings'; @Injectable() export class OfferActions { static LOAD_OFFERS = '[Offer] Load Offers'; loadOffers(): Action { return { ...
<|file_name|>api.ts<|end_file_name|><|fim▁begin|>export interface ParseResponse { parse: { title: string pageid: number text: string } } export interface QueryRevisionResponse { query: { normalized: { fromencoded: boolean from: string to: string } pages: Array<{ pa...
}} }>
<|file_name|>HeadTag.java<|end_file_name|><|fim▁begin|><|fim▁hole|>// HTMLParser Library - A java-based parser for HTML // http://htmlparser.org // Copyright (C) 2006 Dhaval Udani // // Revision Control Information // // $URL: file:///svn/p/htmlparser/code/tags/HTMLParserProject-2.1/parser/src/main/java/org/htmlp...
<|file_name|>lifenote.py<|end_file_name|><|fim▁begin|># -*- coding: UTF-8 -*- from __future__ import with_statement from __future__ import division import pyejdb import os.path from datetime import datetime from datetime import timedelta from datetime import date as pydate import json import sys reload(sys) sys.setd...
msg = self.template_kit.check_instance(self.template_cur, text) if len(msg):
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file # with ope...
# Pick your license as you wish (should match "license" above)
<|file_name|>modisprepare.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ Ingest data from the command-line. """ from __future__ import absolute_import, division import uuid import logging from xml.etree import ElementTree from pathlib import Path import yaml import click from osgeo import gdal, osr from dateutil i...
<|file_name|>pythonCode.py<|end_file_name|><|fim▁begin|>import sys <|fim▁hole|> n = raw_input() for i in range(0, int(n)): print "\x11" + str(m) + ": " + raw_input() + "\x11" #sys.stdout.flush()<|fim▁end|>
for m in range(0, 2):
<|file_name|>Element.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 * and open the template in the editor. */ package net.daw.bean; import com.google.gson.annotations.Expose; /** * * @au...
public void setTagClass(String clase) { this.clase = clase; }
<|file_name|>galma-cluster.js<|end_file_name|><|fim▁begin|>class GalmaCluster extends Cluster{ constructor(params){ super(params); var self = this; //---------------------------------- this.children = []; Loader.objLoader.load('assets/models/clusters/galma-cluster.obj', f...
<|file_name|>dump-adt-brace-struct.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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.apac...
SomeStruct::<u32> { t: 22 }; //~ ERROR [u32]
<|file_name|>model_control_one_enabled_Integration_PolyTrend_Seasonal_Minute_NoAR.py<|end_file_name|><|fim▁begin|>import tests.model_control.test_ozone_custom_models_enabled as testmod<|fim▁hole|> testmod.build_model( ['Integration'] , ['PolyTrend'] , ['Seasonal_Minute'] , ['NoAR'] );<|fim▁end|>
<|file_name|>UserdetailsControllerTest.java<|end_file_name|><|fim▁begin|>package ua.clinic.tests.integration; import com.fasterxml.jackson.databind.ObjectMapper; import org.junit.Test; import org.junit.runner.RunWith; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.fact...
<|file_name|>about_loader.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use file_loader; use mime_classifier::MIMEClassifier; us...
use hyper::mime::{Mime, TopLevel, SubLevel}; use url::Url; use util::resource_files::resources_dir_path;
<|file_name|>run_failure.py<|end_file_name|><|fim▁begin|>import os import sys def test(arg): return os.system('bin/nosetests -s -d -v %s' % arg) def main(args):<|fim▁hole|> return arg = args[0] i = 0 while 1: i += 1 print('Run number: %s' % i) ret = test(arg) i...
if not args: print("Run as bin/python run_failure.py <test>, for example: \n" "bin/python run_failure.py " "kazoo.tests.test_watchers:KazooChildrenWatcherTests")
<|file_name|>0010_auto_20190716_1418.py<|end_file_name|><|fim▁begin|><|fim▁hole|> from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('scheduler', '0009_auto_20190607_1518'), ] operations = [ migrations.RenameField( model_name='smpost', ...
# Generated by Django 2.0.4 on 2019-07-16 21:18
<|file_name|>itasserprep.py<|end_file_name|><|fim▁begin|>from __future__ import print_function import getpass import logging import os import os.path as op from ssbio.protein.sequence.utils import fasta as fasta log = logging.getLogger(__name__) class ITASSERPrep(): """Prepare a protein sequence for an I-TASSE...
# execute_dir = ip.prep_folder(sequence) # ip.prep_script_local(itasser_loc='/home/nathan/software/I-TASSER4.4',
<|file_name|>types.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 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 r...
"fmt" "sort"
<|file_name|>MethodInvocationRecorderTest.java<|end_file_name|><|fim▁begin|>package com.github.ruediste.c3java.invocationRecording; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.lang.annotation.ElementType; import org.j...
@Test public void testEnum() {
<|file_name|>FullWidthButtonContainer.tsx<|end_file_name|><|fim▁begin|>import React, { FC } from 'react'; import { css, cx } from '@emotion/css'; import { stylesFactory } from '../../themes'; export interface Props { className?: string; } export const FullWidthButtonContainer: FC<Props> = ({ className, children }) ...
}
<|file_name|>metadata.py<|end_file_name|><|fim▁begin|>import io import os import re import abc import csv import sys import email import pathlib import zipfile import operator import functools import itertools import collections from configparser import ConfigParser from contextlib import suppress from importlib impor...
text = self.read_text('RECORD') return text and text.splitlines()
<|file_name|>modbus_rtu.rs<|end_file_name|><|fim▁begin|>use crate::prelude::*; use libc::{c_char, c_int}; use libmodbus_sys as ffi; use std::ffi::CString; use std::str; #[derive(Debug, PartialEq)] #[allow(non_camel_case_types)] pub enum SerialMode { RtuRS232 = ffi::MODBUS_RTU_RS232 as isize, RtuRS485 = ffi::MO...
pub enum RequestToSendMode { RtuRtsNone = ffi::MODBUS_RTU_RTS_NONE as isize, RtuRtsUp = ffi::MODBUS_RTU_RTS_UP as isize, RtuRtsDown = ffi::MODBUS_RTU_RTS_DOWN as isize,
<|file_name|>actions.js<|end_file_name|><|fim▁begin|>const actions = { // Video ended ended({dispatch,commit}, video) { video.isPlaying = false; dispatch('next', video); commit('PLAYING',video); }, // Add video to queue addToQueue({state, dispatch, commi...
state.localStorage.getItem('favs').then(function(list) {
<|file_name|>0003_googlemap_cms_page.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2016-12-06 09:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='cms.Page'),
<|file_name|>attrs.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate glium; use glium::Surface; use glium::index::PrimitiveType; mod support; #[test] #[should_panic(expected = "The program attribute `field1` does not match the vertex format")] fn attribute_types_mismatch() { let display = support::build_...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from __future__ import with_statement, absolute_import from django.contrib import admin from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.views.main import ChangeList, SEARCH_VAR, ALL_VAR from django.contrib.auth.models impor...
request = self.factory.get('/child/')
<|file_name|>GetPolicyOptions.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 required by appl...
*/
<|file_name|>in_tail.go<|end_file_name|><|fim▁begin|>package main import ( "github.com/ActiveState/tail" "github.com/ugorji/go/codec" "io/ioutil" "log" "os" "reflect" "regexp" "strconv" "strings" "time" ) type inputTail struct { path string format string tag string pos_file string offset ...
} func (self *inputTail) Run(runner InputRunner) error {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ CritSend test proyect urls. Copyright (C) 2013 Nicolas Valcárcel Scerpella Authors: Nicolas Valcárcel Scerpella <nvalcarcel@gmail.com> """ # Standard library imports # Framework imports from django.conf.urls import patterns, include, url from d...
'', url(r'^', include('upload.urls')),
<|file_name|>csp_media-src_corss-origin_audio_allowed_ext.py<|end_file_name|><|fim▁begin|>def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = ...
* Redistributions of works must retain the original copyright notice, this list
<|file_name|>ContourTracer.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011-2016, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
// storage for contour private List<Point2D_I32> contour;
<|file_name|>buffertools.js<|end_file_name|><|fim▁begin|>if (!Buffer.concat) { Buffer.concat = function(buffers) { const buffersCount = buffers.length; let length = 0; for (let i = 0; i < buffersCount; i++) { const buffer = buffers[i]; length += buffer.length; } const result = new Bu...
<|file_name|>license.py<|end_file_name|><|fim▁begin|>import copy import six from eclcli.common import command from eclcli.common import utils class ListLicense(command.Lister): def get_parser(self, prog_name): parser = super(ListLicense, self).get_parser(prog_name) parser.add_argument( ...
class ListLicenseType(command.Lister):
<|file_name|>utils.js<|end_file_name|><|fim▁begin|>"use strict"; var assert = require('assert') , _ = require('underscore') describe('Autocompleter widget', function () { var Autocompleter = require('../utils/autocomplete_widget') describe('instance', function () { var testAutocompleter = new Autocompleter...
global.document.body.appendChild(sandbox);
<|file_name|>archive.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ Write the collected stats to a locally stored log file. Rotate the log file every night and remove after 7 days. """ from Handler import Handler import logging import logging.handlers class ArchiveHandler(Handler): """ Implements the Ha...
<|file_name|>DataStoreInit.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from pymongo import MongoClient import pymongo HOST = "wfSciwoncWiki:enw1989@172.31.2.76:27001/?authSource=admin" c = MongoClient('mongodb://'+HOST) dbname = "wiki" sessions = "sessions" contributors = "contributors" user_sessions = ...
c[dbname].drop_collection(user_sessions) c[dbname].create_collection(user_sessions) c[dbname].drop_collection(top_sessions)
<|file_name|>download_url.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import os import urllib.request import path_utils # credit: https://stackoverflow.com/questions/22676/how-to-download-a-file-over-http def download_url(source_url, target_path): if os.path.exists(target_path): r...
return True, None
<|file_name|>webuploader.html5only.js<|end_file_name|><|fim▁begin|>/*! WebUploader 0.1.7-alpha */ /** * @fileOverview 让内部各个部件的代码可以用[amd](https://github.com/amdjs/amdjs-api/wiki/AMD)模块定义方式组织起来。 * * AMD API 内部的简单不完全实现,请忽略。只有当WebUploader被合并成一个文件的时候才会引入。 */ (function( root, factory ) { var modules = {}, ...
<|file_name|>bitcoin_lt.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="lt" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Baecoin</source> ...
<|file_name|>path.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ if(!dojo._hasResource["dojox.gfx.path"]){ dojo._hasResource["dojo...
this.segments.push(_e);
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Utility methods, for compatibility between Python version :author: Thomas Calmant :copyright: Copyright 2017, Thomas Calmant :license: Apache License 2.0 :version: 0.3.1 .. Copyright 2017 Thomas Calmant ...
tuple )
<|file_name|>arraysetops.py<|end_file_name|><|fim▁begin|>""" Set operations for 1D numeric arrays based on sorting. :Contains: ediff1d, unique, intersect1d, setxor1d, in1d, union1d, setdiff1d :Notes: For floating point arrays, inaccurate results may appear due to usual round-off and floating point comp...
<|file_name|>info_test.go<|end_file_name|><|fim▁begin|>// Copyright 2015-2018 Kuzzle // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // ...
func TestInfoQueryError(t *testing.T) { c := &internal.MockedConnection{ MockSend: func(query []byte, options types.QueryOptions) *types.KuzzleResponse {
<|file_name|>builder.js<|end_file_name|><|fim▁begin|>(function (subdivision) { 'use strict'; var count = 0; var builders; var defaultBuilder; function buildInternal(type, addin, options, meta) { var builder = subdivision.getBuilder(type); if (builder.preBuildTarget) { a...
*/
<|file_name|>octree.rs<|end_file_name|><|fim▁begin|>use cgmath::{Point3}; use collision::{Aabb3}; use std::fmt::Debug; use std::ptr; pub const MIN_CELL_WIDTH: f32 = 0.1; fn aabb_overlap(aabb1: &Aabb3<f32>, aabb2: &Aabb3<f32>) -> bool { true && aabb1.min.x < aabb2.max.x && aabb1.min.y < aabb2.max.y && aabb1.mi...
} else { unsafe { assert!(!self.parent.is_null()); (*self.parent).on_mut_ancestor(bounds, f)
<|file_name|>user.js<|end_file_name|><|fim▁begin|>import nextConnect from 'next-connect' import auth from '../../middleware/auth' import { deleteUser, updateUserByUsername } from '../../lib/db' const handler = nextConnect() handler .use(auth) .get((req, res) => { // You do not generally want to return the who...
export default handler
<|file_name|>FBXLoader.d.ts<|end_file_name|><|fim▁begin|>import { Group,<|fim▁hole|>} from '../../../src/Three'; export class FBXLoader extends Loader { constructor( manager?: LoadingManager ); load( url: string, onLoad: ( object: Group ) => void, onProgress?: ( event: ProgressEvent ) => void, onError?: ( event: ...
Loader, LoadingManager
<|file_name|>walk_test.go<|end_file_name|><|fim▁begin|>// Copyright (C) 2014 The Syncthing Authors. // // 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/. package scanne...
defer os.RemoveAll("testdata/normalization")
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>''' from .audio import (AudioTrimmingFilter, AudioResamplingFilter) from .base import TemporalTrimmingFilter from .image import (ImageCroppingFilter, ImageResizingFilter, PillowImageFilter) fr...
''' The `Filter` hierarchy contains Transformer classes that take a `Stim` of one type as input and return a `Stim` of the same type as output (but with some changes to its data).
<|file_name|>rita.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ rita Pipeline .. module:: rita :synopsis: rita pipeline .. moduleauthor:: Adolfo De Unánue <nanounanue@gmail.com> """ import os import subprocess from pathlib import Path <|fim▁hole|>import boto3 import zipfile import io import csv import ...
<|file_name|>angular-locale_en-bw.js<|end_file_name|><|fim▁begin|>angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; $provide.value("$locale", { "DATETIME_FORMATS": { "AMPMS": [ "AM", ...
<|file_name|>plot_weighted_samples.py<|end_file_name|><|fim▁begin|>""" ===================== SVM: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. """ print __doc__ import numpy as np import pylab as pl from sklearn import svm...
Z = clf.decision_function(np.c_[xx.ravel(), yy.ravel()])
<|file_name|>first_lab.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- from __future__ import division import itertools import operator import collections debug = True to_bin = lambda integer: zero_filler(bin(integer)[2:]) def zero_filler(filling_string): result = "" if len(filling_string) != 4: ...
# print(result) return result
<|file_name|>constants.py<|end_file_name|><|fim▁begin|>######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 # # ...
INTERFACES = 'interfaces'
<|file_name|>test_edw_hash.py<|end_file_name|><|fim▁begin|>import pytest TEST_HASHES = { "test": "Jnh+8wNnELksNFVbxkya8RDrxJNL13dUWTXhp5DCx/quTM2/cYn7azzl2Uk3I2zc", "test2": "sh33L5uQeLr//jJULb7mAnbVADkkWZrgcXx97DCacueGtEU5G2HtqUv73UTS0EI0",<|fim▁hole|>@pytest.mark.parametrize(('password', 'pwhash'), TEST_HASH...
"testing100" * 10: "5rznDSIcDPd/9rjom6P/qkJGtJSV47y/u5+KlkILROaqQ6axhEyVIQTahuBYerLG", }
<|file_name|>index-plain.js<|end_file_name|><|fim▁begin|>var plain = require('./workers/plain.js'); var NodeMover = require('./modules/NodeMover').NodeMover; var PixiGraphics = require('./modules/PixiGraphics').PixiGraphics; module.exports.main = function () { var _layoutIterations = 1000; var _layoutStepsPerM...
var _nodeMovers = {}; $.getJSON('data/graph.json', function (jsonData) {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Main entry point """ from pyramid.config import Configurator def main(global_config, **settings): config = Configurator(settings=settings) config.include("cornice")<|fim▁hole|><|fim▁end|>
config.scan("pyramidSparkBot.views") return config.make_wsgi_app()
<|file_name|>test_production_order.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import flt, get_datetime from erpnex...
<|file_name|>read-scale.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
unsafe { display = (xlib.XOpenDisplay)(ptr::null_mut()); // Enumerate all properties.
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages with open("README.rst") as readme: long_description = readme.read() setup( name='algos-py', version='0.4.5',<|fim▁hole|> author_email='all3fox@gmail.com', url='https://github.com/all3fox/algos-py', pa...
license='MIT', author='Aleksandr Lisianoi',
<|file_name|>test_limits.py<|end_file_name|><|fim▁begin|>import random from gevent.pool import Group from base import TestCase, declares_queues from nucleon.amqp import Connection from nucleon.amqp.spec import FrameQueueDeclareOk qname = 'test%s' % (random.random(),) queues = [qname + '.%s' % (i,) for i in xrange(1...
g = Group() res = g.map(declare, queues) assert len(res) == len(queues)
<|file_name|>matrixDFS.py<|end_file_name|><|fim▁begin|># Importing standard libraries import sys ''' Returns the index of the element in the grid. Element passed in must have a unique position. If not present returns [-1, -1]. If multiple occurences present, returns the first one ''' def findIndex(...
<|file_name|>nfs.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2017 Open Information Security Foundation * * You can copy, redistribute or modify this Program 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...
let c_event_name: &CStr = unsafe { CStr::from_ptr(event_name) }; let event = match c_event_name.to_str() { Ok(s) => {
<|file_name|>bitcoin_sk.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="sk"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Gl...
<location line="+7"/> <source>Signature</source> <translation type="unfinished"></translation> </message>