prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>simple.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from itertools import cycle import logging import random import six from six.moves import xrange from .base import Producer log = logging.getLogger(__name__) class SimpleProducer(Producer): """A simple, round-robin pro...
<|file_name|>border.mako.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/. */ <%namespace name="helpers" file="/helpers.mako.rs" /> <% ...
<|file_name|>dstr-let-obj-ptrn-id-init-unresolvable.js<|end_file_name|><|fim▁begin|>// This file was procedurally generated from the following sources: // - src/dstr-binding/obj-ptrn-id-init-unresolvable.case // - src/dstr-binding/error/for-of-let.template /*--- description: Destructuring initializer is an unresolvable...
3. Let destructuring be IsDestructuring of lhs.
<|file_name|>cnn.py<|end_file_name|><|fim▁begin|>import numpy as np import torch from torch import nn as nn from rlkit.policies.base import Policy from rlkit.pythonplusplus import identity from rlkit.torch.core import PyTorchModule, eval_np from rlkit.torch.data_management.normalizer import TorchFixedNormalizer from...
self.fc_layers = nn.ModuleList()
<|file_name|>observation_verifier_test.py<|end_file_name|><|fim▁begin|># Copyright 2015 Google Inc. 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.apa...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>""" Tests for users API """ import datetime import ddt import pytz from django.conf import settings from django.template import defaultfilters from django.test import RequestFactory, override_settings from django.utils import timezone from milestones.tests.utils impor...
MilestoneAccessError().error_code, # 'unfulfilled_milestones'
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># DO THIS FIRST to set project name !!! <|fim▁hole|> from askapdev.sphinx.conf import * version = 'current' release = 'current'<|fim▁end|>
import askapdev.sphinx # CAN NOT contain spaces! askapdev.sphinx.project = u'askap.parset'
<|file_name|>regex_iterator_example.cpp<|end_file_name|><|fim▁begin|>/* * * Copyright (c) 2003 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)<|fim▁hole|> * ...
<|file_name|>harmonicfolder.hpp<|end_file_name|><|fim▁begin|>#pragma once #include <data_types/fourierseries.hpp> #include <kernels/kernels.h> #include <kernels/defaults.h> #include <iostream> #include <utils/nvtx.hpp> class HarmonicFolder { private: unsigned int max_blocks; unsigned int max_threads; float** h_d...
POP_NVTX_RANGE }
<|file_name|>matching.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/. */ //! High-level interface to CSS selector matching. #![allow...
old_values.as_ref().map(|v| &**v),
<|file_name|>heuristics.py<|end_file_name|><|fim▁begin|>import polyglot import yaml class Heuristics (object): """ The Heuristics class receives a path to the file that is trying to be identified and an array of possible languages for that file. The disambiguate method will find the array with unambiguous strings...
<|file_name|>EntitySystemTest.java<|end_file_name|><|fim▁begin|>package com.artemis; import static org.junit.Assert.assertEquals; import java.util.NoSuchElementException; import com.artemis.systems.EntityProcessingSystem; import com.artemis.utils.IntBag; import org.junit.Test; import com.artemis.utils.ImmutableBag;...
@SuppressWarnings("static-method") @Test public void test_process_one_active() { World w = new World(new WorldConfiguration()
<|file_name|>managers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) from django.contrib.gis.db import m...
return self.add_filters(status='Completed')
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>extern crate clap; use std; use super::grammar; pub type Result<T> = std::result::Result<T, Error>; #[derive(Debug)] pub enum Error { AddrParse(std::net::AddrParseError), CLI(clap::Error), Env(std::env::VarError), IO(std::io::Error), Parse(gramm...
Error::AddrParse(ref err) => err.fmt(f), Error::CLI(ref err) => err.fmt(f), Error::Env(ref err) => err.fmt(f), Error::IO(ref err) => err.fmt(f),
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>'use strict' var gulp = require('gulp') var $ = require('gulp-load-plugins')() gulp.task('default', function() { gulp.src('./src/**/*.js') .pipe($.wrap('!function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b(...
.pipe($.jsbeautifier({ config: '.jsbeautifyrc' })) .pipe(gulp.dest('./dist'))
<|file_name|>enums.go<|end_file_name|><|fim▁begin|>package features // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect ...
// deployment is executed. The properties of the resource will not change. NoChange ChangeType = "NoChange"
<|file_name|>login_backend.py<|end_file_name|><|fim▁begin|>from .models import EmailUser class EmailOrPhoneModelBackend: def authenticate(self, username=None, password=None): if '@' in username: kwargs = {'email__iexact': username} else: kwargs = {'phone': username} ...
return EmailUser.objects.get(pk=user_id)
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|>############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
<|file_name|>vue-form.js<|end_file_name|><|fim▁begin|>import Vue from 'vue'; import VueForm from 'vue-form'; Vue.use(VueForm, { validators: { 'step': function(value, stepValue) { return stepValue === `any` || Number(value) % Number(stepValue) === 0; }, 'data-exclusive-minimum': function(value, excl...
}, 'no-fine-channel-name': function(value) {
<|file_name|>RedirectUtil.java<|end_file_name|><|fim▁begin|>/* * oxAuth is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text. * * Copyright (c) 2014, Gluu */ package org.gluu.oxauth.util;<|fim▁hole|> import org.gluu.oxauth.model.common.ResponseMode; import org.jboss.reste...
<|file_name|>html_elems.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager<|fim▁hole|>Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : b...
Description : Database manager plugin for QGIS
<|file_name|>applications_health_evaluation.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license informat...
from .health_evaluation import HealthEvaluation
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render<|fim▁hole|> def index(request): context = {} return render(request, 'waterfall_wall/index.html', context) class ImageViewSet(viewsets.ModelViewSet): """ API endpoint that allows images to be viewed. """ quer...
from rest_framework import viewsets from waterfall_wall.serializers import ImageSerializer from waterfall_wall.models import Image
<|file_name|>test_tile.py<|end_file_name|><|fim▁begin|>from core_tests_base import CoreTestsBase, FakeTessagon, FakeTileSubClass class TestTile(CoreTestsBase): # Note: these tests are highly dependent on the behavior of # FakeTessagon and FakeAdaptor def test_add_vert(self): tessagon = FakeTess...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding: utf-8 from collections import namedtuple from pandas.io.msgpack.exceptions import * # noqa from pandas.io.msgpack._version import version # noqa class ExtType(namedtuple("ExtType", "code data")): """ExtType represents ext type in msgpack.""" ...
if not 0 <= code <= 127: raise ValueError("code must be 0~127")
<|file_name|>FastMixerState.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012 The Android Open Source Project *<|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 b...
* Licensed under the Apache License, Version 2.0 (the "License");
<|file_name|>ssh.py<|end_file_name|><|fim▁begin|># (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com> # # 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 p...
:arg b_command: A list containing the command to add the new arguments to. This list will be modified by this method. :arg b_args: An iterable of new arguments to add. This iterable is used more than once so it must be persistent (ie: a list is okay but a
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![allow(unused_variables, unused_imports, dead_code)] use m3u8_rs::*; use nom::AsBytes; use std::collections::HashMap; use std::fs; use std::fs::File; use std::io::Read; use std::path; fn all_sample_m3u_playlists() -> Vec<path::PathBuf> { let path: std::path::Path...
// ----------------------------------------------------------------------------------------------- // Playlist type detection tests
<|file_name|>UpdateAttr.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General P...
casts.arg("x"); casts.arg("which").defaultError(MUST_BE_NONNULL_STRING, "name").mustBe(stringValue()).asStringVector().findFirst(); }
<|file_name|>test_repetition_unit.py<|end_file_name|><|fim▁begin|># This file is part of wger Workout Manager. # # wger Workout Manager 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 Free Software Foundation, either version 3 o...
'trainer3',
<|file_name|>wings.py<|end_file_name|><|fim▁begin|>"""Fake Wings component""" from threading import Thread import time # Use fake GPIO import GPIOSim.RPi.in_mem as GPIO from tuxeatpi.components.wings import Wings from tuxeatpi.fake_components.base import push_switch class FakeWings(Wings): """Fake wings class...
<|file_name|>Item.py<|end_file_name|><|fim▁begin|><|fim▁hole|> self.path = path self.name = name<|fim▁end|>
class Item(object): def __init__(self, path, name):
<|file_name|>service.ts<|end_file_name|><|fim▁begin|>// TODO debug only? import {assert} from './assert'; import {makeDecorator, getAnnotations, mergeAnnotations} from './reflection'; import {setIfInterface, isFunction} from './utils'; /** * Options available when decorating a class as a service */ export interface...
factory: Function = void 0; constructor(options: ServiceOptions) {
<|file_name|>spawn.rs<|end_file_name|><|fim▁begin|>//extern crate scoped_threadpool; extern crate threadpool; extern crate thread_local; extern crate hwloc; use matrix::{Scalar,Mat}; use core::marker::{PhantomData}; use thread_comm::{ThreadComm,ThreadInfo}; use composables::{GemmNode,AlgorithmStep}; use std::sync::{A...
<|file_name|>kexidatetimeformatter.cpp<|end_file_name|><|fim▁begin|>/* This file is part of the KDE project Copyright (C) 2006-2011 Jarosław Staniek <staniek@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as publish...
<|file_name|>navtreeindex3.js<|end_file_name|><|fim▁begin|>var NAVTREEINDEX3 = { "d4/db5/array_8hpp.html":[3,0,1,11], "d4/db5/array_8hpp.html#a0048463a9200ce90a34092d719fe9922":[3,0,1,11,1], "d4/db5/array_8hpp.html#a311d0610601290b2bb98f1808fc56d24":[3,0,1,11,3], "d4/db5/array_8hpp.html#a44c20174c4360e3d4ec9373839c493e...
<|file_name|>instr.cpp<|end_file_name|><|fim▁begin|>/* file "ia64/instr.cpp" */ /* Copyright (c) 2002 The President and Fellows of Harvard College All rights reserved. This software is provided under the terms described in the "machine/copyright.h" include file. */ #include <machine/copyright.h> #i...
int s = get_stem(o); switch (s) {
<|file_name|>test_prettyprint.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # This file is part of Gtfslib-python. # # Gtfslib-python 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, eithe...
# # You should have received a copy of the GNU General Public License # along with gtfslib-python. If not, see <http://www.gnu.org/licenses/>. """
<|file_name|>streaming.pass.cpp<|end_file_name|><|fim▁begin|>//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apach...
<|file_name|>YWeather.py<|end_file_name|><|fim▁begin|># YWeather by 2boom 2013 v.0.6 # xml from http://weather.yahooapis.com/forecastrss from Components.Converter.Converter import Converter from Components.Element import cached from Tools.Directories import fileExists from Poll import Poll import time import os class...
day3 = 21 date3 = 22 wtext4 = 23
<|file_name|>huffman2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- encoding: utf-8 -*- import os import marshal import cPickle import array class HuffmanNode(object): recurPrint = False def __init__(self, ch=None, fq=None, lnode=None, rnode=None, parent=None): self.L = lnode self.R ...
fp = open(filename, 'rb')
<|file_name|>cef_stream.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Marshall A. Greenblatt. 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 ...
// // Extra data. This will only be present for Rust instances!
<|file_name|>CreateApplicationListReportRuleProvider.java<|end_file_name|><|fim▁begin|>package org.jboss.windup.reporting.rules; import java.util.HashMap; import java.util.Map; import javax.inject.Inject; import org.jboss.forge.furnace.Furnace; import org.jboss.windup.config.AbstractRuleProvider; import org.jboss.wi...
{ public static final String APPLICATION_LIST_REPORT = "Application List"; private static final String OUTPUT_FILENAME = "../index.html"; public static final String TEMPLATE_PATH = "/reports/templates/application_list.ftl";
<|file_name|>INoise.d.ts<|end_file_name|><|fim▁begin|>import type { INoiseFactor } from "./INoiseFactor"; import type { IOptionLoader } from "../../IOptionLoader";<|fim▁hole|>export interface INoise extends IOptionLoader<INoise> { delay: INoiseDelay; enable: boolean; factor: INoiseFactor; }<|fim▁end|>
import type { INoiseDelay } from "./INoiseDelay";
<|file_name|>hub.js<|end_file_name|><|fim▁begin|>var debug = require('debug')('harmonyhubjs:client:login:hub') var Client = require('node-xmpp-client') var Q = require('q') var util = require('../util') /** PrivateFunction: getIdentity * Logs in to a Harmony hub as a guest and uses the userAuthToken from logitech's ...
<|file_name|>atomic_nand_acq.rs<|end_file_name|><|fim▁begin|>#![feature(core, core_intrinsics)] extern crate core; #[cfg(test)] mod tests { use core::intrinsics::atomic_nand_acq; use core::cell::UnsafeCell; use std::sync::Arc; use std::thread; // pub fn atomic_nand_acq<T>(dst: *mut T, src: T) -...
<|file_name|>strava-creds.d.ts<|end_file_name|><|fim▁begin|>import { EpochSeconds, Seconds } from './util'; export declare type StravaCredsData = { token_type: string; expires_at: EpochSeconds; expires_in: EpochSeconds; refresh_token: string; access_token: string;<|fim▁hole|> id?: string; ...
athlete: {
<|file_name|>test_sql.py<|end_file_name|><|fim▁begin|># # GeoCoon - GIS data analysis library based on Pandas and Shapely # # Copyright (C) 2014 by Artur Wroblewski <wrobell@pld-linux.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
# You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
<|file_name|>dazeus.rs<|end_file_name|><|fim▁begin|>use super::error::{Error, ReceiveError}; use super::event::{Event, EventType}; use super::handler::{Handler, Message}; use super::listener::{Listener, ListenerHandle}; use super::request::{ConfigGroup, Request}; use super::response::Response; use super::scope::Scope; ...
/// Remove a property stored in the bot database. fn unset_property(&self, name: &str, scope: Scope) -> Response;
<|file_name|>starting_hand.rs<|end_file_name|><|fim▁begin|>use crate::core::{Card, Hand, Suit, Value}; /// Enum to represent how the suits of a hand correspond to each other. /// `Suitedness::Suited` will mean that all cards have the same suit /// `Suitedness::OffSuit` will mean that all cards have the different suit ...
/// Starting hand struct to represent where it's one
<|file_name|>filesize.rs<|end_file_name|><|fim▁begin|>use std::fmt; #[derive(Debug)] enum FileSize { B, KB, MB, GB, TB, } impl fmt::Display for FileSize { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{:?}", self) } } impl FileSize { fn value(&self) -> u64 ...
FileSize::TB => 1_099_511_627_776, } } }
<|file_name|>18.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -8- """ By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 4 2 4 6 8 5 9 3 That is, 3 + 7 + 4 + 9 = 23. Find the maximum total fr...
20 04 82 47 65
<|file_name|>cover.py<|end_file_name|><|fim▁begin|>"""Support for ZHA covers.""" from __future__ import annotations import asyncio import functools import logging from zigpy.zcl.foundation import Status from homeassistant.components.cover import ( ATTR_CURRENT_POSITION, ATTR_POSITION, DEVICE_CLASS_DAMPER...
def async_restore_last_state(self, last_state): """Restore previous state."""
<|file_name|>dwellClick.js<|end_file_name|><|fim▁begin|>/* exported DwellClickIndicator */ const { Clutter, Gio, GLib, GObject, St } = imports.gi; const PanelMenu = imports.ui.panelMenu; const MOUSE_A11Y_SCHEMA = 'org.gnome.desktop.a11y.mouse'; const KEY_DWELL_CLICK_ENABLED = 'dwell-click-enabled'; const KEY_DW...
this.menu.addAction(mode.name, this._setClickType.bind(this, mode), mode.icon);
<|file_name|>form-password.min.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|><|fim▁end|>
oid sha256:5df6faea233808c6556f6ab7b79d7e126b054faf6651af82437fe36f225404cf size 1193
<|file_name|>dialect.go<|end_file_name|><|fim▁begin|>// Copyright 2015 CoreOS, Inc. All rights reserved. // Use of this source code is governed by the BSD 3-Clause license, // which can be found in the LICENSE file. package sqlbuilder type Dialect interface { EscapeCharacter() rune InsertReturningClause() string K...
escapeChar: '"', kind: "sqlite", name: &defaultName, }
<|file_name|>Books.cpp<|end_file_name|><|fim▁begin|>/* * Books.cpp * Author: suyashd95 */<|fim▁hole|> #include "Books.h" #include <iostream> #include <cstring> using namespace std; Books::Books() { stock = new int[size]; price = new float[size]; author = new const char*[size]; publisher = new const char*[siz...
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from flask import Flask, render_template, request, jsonify, session, redirect, escape, url_for import MySQLdb import bcrypt from esipy import App from esipy import EsiClient from esipy import EsiSecurity from esipy.exceptions import APIException imp...
# skillStartSP = (250 * math.pow(5.65685,currentlyTrainingLevel-1))
<|file_name|>parserSkippedTokens19.ts<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
\ declare var v;
<|file_name|>G_Timer.cpp<|end_file_name|><|fim▁begin|>// leave this line at the top for all g_xxxx.cpp files... #include "g_headers.h" #include "G_Local.h" typedef map < string, int > timer_m; timer_m g_timers[ MAX_GENTITIES ]; /* ------------------------- TIMER_Clear ------------------------- */ void TIMER_Clea...
<|file_name|>loader.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging, os, sys l = logging.getLogger(__name__) from django.conf import settings import json from django_lean.experiments.models import Experiment class ExperimentLoader(object): """ Loads the experiments from a file containi...
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.smbc.droid; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.support.v4.view.ViewPager; import android.view.Menu; import android.view.MenuItem; import android.view.View; import com.android.volley.toolbox.Ne...
@Override public boolean onOptionsItemSelected(MenuItem item) {
<|file_name|>ubinascii_unhexlify.py<|end_file_name|><|fim▁begin|>try: try: import ubinascii as binascii except ImportError: import binascii except ImportError: print("SKIP") raise SystemExit print(binascii.unhexlify(b'0001020304050607')) print(binascii.unhexlify(b'08090a0b0c0d0e0f')) pr...
<|file_name|>build.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> fn main() { println!("cargo:rustc-flags=-l wmip"); }<|fim▁end|>
<|file_name|>http.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import base64 import calendar import datetime import re import sys import unicodedata from binascii import Error as BinasciiError from email.utils import formatdate from django.utils import six from django.utils.datastructures i...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; fn group_by_sum(packages: &[usize], target: usize) -> Vec<Vec<usize>> { let mut results = Vec::new(); struct Iter<'a> { f: &'a Fn(&mut Iter, usize, usize, Vec<usize>) -> (), results: &'a mut Vec<Vec<usize>> } { let mut iter =...
} else if index < packages.len() { if packages[index] <= target - so_far { let mut current = current.clone();
<|file_name|>plotaw.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ plot magnetic lattice """ import matplotlib.pylab as plt import numpy as np <|fim▁hole|> plt.plot(data12[:,0], data12[:,1], 'r-', data12[:,0], data12[:,2], 'b-', linewidth=2) plt.xlim([110,240]) plt.ylim([1.5,1.53]) plt.legend([r'$a_u$...
f12 = 'AWDall.lat' data12 = np.loadtxt(f12)
<|file_name|>PromiseRejected.java<|end_file_name|><|fim▁begin|>/* * Aphelion * Copyright (c) 2013 Joris van der Wel * * This file is part of Aphelion * * Aphelion 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 Free S...
<|file_name|>simplify.go<|end_file_name|><|fim▁begin|>package simplify import "container/heap" func Simplify(input *Mesh, factor float64) *Mesh { // find distinct vertices vectorVertex := make(map[Vector]*Vertex) for _, t := range input.Triangles { vectorVertex[t.V1] = NewVertex(t.V1) vectorVertex[t.V2] = NewV...
vertexFaces := make(map[*Vertex][]*Face) for _, t := range input.Triangles { v1 := vectorVertex[t.V1]
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#__author__ = 'hello' # -*- coding: cp936 -*- import re import os import random import json import string import ctypes from myexception import * PATH = './img/' dm2 = ctypes.WinDLL('./CrackCaptchaAPI.dll') if not os.path.exists('./img'): os.mkdir('./img') def ...
content = getHid()+u'Ô¤¶©¸öÊý:'+str(count) msg = MIMEText(content,'plain','utf-8') msg['Subject'] = Header(subject,'utf-8')
<|file_name|>registers.rs<|end_file_name|><|fim▁begin|>#[derive(Debug, PartialEq, Clone, Copy)] pub enum Register {<|fim▁hole|> RC, RD, RE, RF, } impl From<String> for Register { fn from(string: String) -> Register { match string.as_ref() { "ra" => Register::RA, "rb"...
RA, RB,
<|file_name|>mime_classifier.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use std::borrow::ToOwned; use std::cmp::max; pub str...
<|file_name|>catalog_test.go<|end_file_name|><|fim▁begin|>package servicebroker import ( "reflect" "testing" schema "github.com/lestrrat/go-jsschema" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "github.com/openshift/origin/pkg/openservicebroker/api" templateapi "github.com/openshift/origin/pkg/template/api"...
Title: "Template service broker: requester username", Description: "OpenShift user requesting provision/bind", Type: schema.PrimitiveTypes{schema.StringType}, },
<|file_name|>plot_sparse_coding.py<|end_file_name|><|fim▁begin|>""" =========================================== Sparse coding with a precomputed dictionary =========================================== Transform a signal as a sparse combination of Ricker wavelets. This example visually compares different sparse coding m...
# (title, transform_algorithm, transform_alpha, transform_n_nozero_coefs) estimators = [('OMP', 'omp', None, 15), ('Lasso', 'lasso_cd', 2, None), ]
<|file_name|>stripe.d.ts<|end_file_name|><|fim▁begin|>export interface StripeCardTokenParams { /** * Card number */ number: string; /** * Expiry month */ expMonth: number; /** * Expiry year */ <|fim▁hole|> expYear: number; /** * CVC / CVV ...
<|file_name|>service.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013 eBay Software Foundation # 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 # # ...
status = self._get_status_from_couchbase(config_pwd) except exception.ProcessExecutionError: LOG.exception(_("Error getting Couchbase status using the " "password parsed from the native Couchbase "
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#-*- coding: utf-8 -*- # Author: Matt Earnshaw <matt@earnshaw.org.uk> from __future__ import absolute_import import os import sys import sunpy from PyQt4.QtGui import QApplication from sunpy.gui.mainwindow import MainWindow from sunpy.io import UnrecognizedFileType...
--------
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> export = differenceInMinutes }<|fim▁end|>
declare module 'date-fns/difference_in_minutes' { import {differenceInMinutes} from 'date-fns'
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.db import models<|fim▁hole|> from django_dropimages import settings as di_settings # if no custom image models is present I load my own if not di_settings.CONFIG['DROPIMAGEGALLERY_MODEL']: class DropimagesGallery(mode...
<|file_name|>guestbook.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2015 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 # # http://www.apache.o...
application = webapp2.WSGIApplication([
<|file_name|>non_sym_m0n.py<|end_file_name|><|fim▁begin|>from __future__ import division import conformal_blocks.cbbundle as cbd import cProfile, time, random #First test #---------- # def experiment(): """ Computes the rank and divisor of conformal block bundles with random weights. :return: Null """<...
rank = 5 level = 3 num_points = 10 tries = 100
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>default_app_config = 'providers.edu.iowaresearch.apps.AppConfig' """ Example Record <record> <header> <identifier>oai:ir.uiowa.edu:iwp_archive-1227</identifier> <datestamp>2016-07-05T19:23:14Z</datestamp> <setSpec>publication:iwp</setSp...
<dc:description> Excerpts from The Adventure of the Busts of Eva Perón and The Islands. </dc:description>
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>export * from "./logic" export * from "./strategies" export * from "./defaults"<|fim▁hole|><|fim▁end|>
export * from "./dragndrop"
<|file_name|>product_supplierinfo.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # © 2014 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # © 2016 ACSONE SA/NV (<http://acsone.eu>) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html ...
@api.onchange('name') @api.multi
<|file_name|>test03.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from ming import * import sys srcdir=sys.argv[1] m = SWFMovie(); font = SWFFont(srcdir + "/../Media/test.ttf")<|fim▁hole|> w = font.getStringWidth("The quick brown fox jumps over the lazy dog. 1234567890") text.setFont(font) text.setColor(0,0,0,...
text = SWFText(1)
<|file_name|>tcp.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
<|file_name|>test_import.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2005-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing boo...
""" % funcname + _template_ctypes_test
<|file_name|>text_buffer.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, 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 cast:...
}
<|file_name|>handlebars-require-express.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var exphbs = require('express-handlebars');
<|file_name|>host_content_settings_map_unittest.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/auto_reset.h" #include "base/command_line.h" #include "...
host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string())); // Reseting the pref to its previous value should update the cache. prefs->Set(GetPrefName(CONTENT_SETTINGS_TYPE_IMAGES), *new_value);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Hypertext Transfer Protocol (HTTP) These objects provide support for :rfc:`HTTP <2616>`. .. seealso:: :mod:`HTTP authentication <bedframe.auth.http>` """ <|fim▁hole|> from ._exc import * from ._services import *<|fim▁end|>
__copyright__ = "Copyright (C) 2014 Ivan D Vasin" __docformat__ = "restructuredtext"
<|file_name|>rusti.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2013 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...
}
<|file_name|>test_shared_group_details.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function from sentry.testutils import APITestCase class SharedGroupDetailsTest(APITestCase): def test_simple(self): self.login_as(user=self.user) group = self.create_group() ...
org = group.organization org.flags.disable_shared_issues = True
<|file_name|>Blog_LinearRegression.py<|end_file_name|><|fim▁begin|># coding: utf-8 # In[2]: # Import and read the datset import numpy as np from sklearn import linear_model import matplotlib.pyplot as plt import pandas as pd dataset = pd.read_csv("C://Users//Koyel//Desktop/MieRobotAdvert.csv") dataset.head() # In...
print('RMSE:', np.sqrt(metrics.mean_squared_error(y_test, predictions)))
<|file_name|>test_mnl.py<|end_file_name|><|fim▁begin|># ActivitySim # Copyright (C) 2014-2015 Synthicity, LLC # See full license in LICENSE.txt. import os.path import numpy as np import pandas as pd import pandas.util.testing as pdt import pytest from ..activitysim import eval_variables from .. import mnl # this i...
<|file_name|>packet.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ''' Copyright (c) 2013 Potential Ventures Ltd Copyright (c) 2013 SolarFlare Communications Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are ...
#!/usr/bin/env python
<|file_name|>Macro.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 #JMP:xkozub03 import sys import re import Config from Config import exit_err macro_list = {}; def init_list(redef_opt): def_macro = Macro("@def"); set_macro = Macro("@set"); let_macro = Macro("@let"); null_macro = Macro("@null"); _def_macro ...
def_macro.add_arg("$scnd"); def_macro.add_arg("$thrd");
<|file_name|>vfpclasssd.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*;<|fim▁hole|>use ::Reg::*; use ::RegScale::*; fn vfpclasssd_1() { run_test(&Instruction { mnemonic: M...
<|file_name|>GhostMailer.test.js<|end_file_name|><|fim▁begin|>const should = require('should'); const sinon = require('sinon'); const Promise = require('bluebird'); const mail = require('../../../../../core/server/services/mail'); const settingsCache = require('../../../../../core/shared/settings-cache'); const configU...
<|file_name|>statistics.py<|end_file_name|><|fim▁begin|># log moments (mean, variance, skewness, kurtosis) and quantiles # why am I spending time creating a complex quantile and histogram # estimator when I only need average, so far from math import sqrt from bisect import bisect_left import scipy.stats as st maxlon...
def __iter__(self): return self def __next__(self):