prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>4_4_Using_Cpp_NSGA.py<|end_file_name|><|fim▁begin|># This file is part of DEAP. # # DEAP is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 3 of # the License, or...
def main(): random.seed(64)
<|file_name|>AnalogClockLCD.py<|end_file_name|><|fim▁begin|># original code is from openmips gb Team: [OMaClockLcd] Renderer # # Thx to arn354 # import math from Components.Renderer.Renderer import Renderer from skin import parseColor from enigma import eCanvas, eSize, gRGB, eRect class AnalogClockLCD(Renderer): de...
a = (w * 6) z = (math.pi / 180) x = int(round((r * math.sin((a * z))))) y = int(round((r * math.cos((a * z)))))
<|file_name|>index.js<|end_file_name|><|fim▁begin|>var express = require('express'); var request = require('request'); // Constants var PORT = 8080; // App var app = express(); app.get('/', function (req, res) { res.send('A prototype of a micro-service hosting service. An example can be retrieved from https://fun...
url: 'https://api.github.com/gists/' + req.params.gist_id,
<|file_name|>test_controller.py<|end_file_name|><|fim▁begin|>import unittest import syzoj import hashlib from random import randint class TestRegister(unittest.TestCase):<|fim▁hole|> def test_register(self): user = "tester_%d" % randint(1, int(1e9)) pw = self.md5_pass("123_%d" % randint(1, 100)) ...
def md5_pass(self, password): md5 = hashlib.md5() md5.update(password) return md5.hexdigest()
<|file_name|>other.d.ts<|end_file_name|><|fim▁begin|>declare module 'all:part:@sanity/base/absolutes' { const components: React.ComponentType[] export default components } declare module 'all:part:@sanity/base/component' declare module 'all:part:@sanity/desk-tool/filter-fields-fn?' { declare const filterFields: ...
export declare const getDraftId: (str: string) => string export declare const isDraftId: (str: string) => boolean export declare const isPublishedId: (str: string) => boolean }
<|file_name|>mthreading.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 ######################################################################### # File Name: mthreading.py # Author: ly # Created Time: Wed 05 Jul 2017 08:46:57 PM CST # Description: #############################################...
if __name__=='__main__': t1=threading.Thread(target=play, args=('t1',10))
<|file_name|>bitcoin_zh_TW.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="zh_TW" version="2.0"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About GulfCoin</source> <translation>關於位元幣</tra...
<message>
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # yara documentation build configuration file, created by # sphinx-quickstart on Tue Jul 8 11:04:03 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values ...
# Custom sidebar templates, maps document names to template names.
<|file_name|>ai.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\...
qp.drawLine(-w, h / 2, 3 * w, h / 2)
<|file_name|>mailTest.js<|end_file_name|><|fim▁begin|>var Component = new Brick.Component();<|fim▁hole|> ] }; Component.entryPoint = function(NS){ var Y = Brick.YUI, COMPONENT = this, SYS = Brick.mod.sys; NS.MailTestWidget = Y.Base.create('MailTestWidget', SYS.AppWidget, [], { onIni...
Component.requires = { mod: [ {name: '{C#MODNAME}', files: ['mail.js']}
<|file_name|>CWE401_Memory_Leak__new_twoIntsStruct_52b.cpp<|end_file_name|><|fim▁begin|>/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE401_Memory_Leak__new_twoIntsStruct_52b.cpp Label Definition File: CWE401_Memory_Leak__new.label.xml Template File: sources-sinks-52b.tmpl.cpp */ /* * @description * CWE: 401 ...
/* goodG2B uses the GoodSource with the BadSink */ void goodG2BSink_c(twoIntsStruct * data);
<|file_name|>TopicStruct.java<|end_file_name|><|fim▁begin|>package org.zarroboogs.weibo.hot.bean.hotweibo; import org.json.*; public class TopicStruct { private String topicTitle; private String topicUrl; public TopicStruct () { } public TopicStruct (JSONObject json) { ...
}
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate env_logger; extern crate glutin; extern crate gfx; extern crate gfx_window_glutin; extern crate claymore_game as game; pub fn main() { use gfx::traits::*; env_logger::init().unwrap(); println!("Initializing the window..."); let window = g...
_ => (), } }
<|file_name|>descriptor.cc<|end_file_name|><|fim▁begin|>// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // https://developers.google.com/protocol-buffers/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted pr...
(PyCFunction)FindExtensionByName, METH_O, C("Searches for extension descriptor by full name.") }, {NULL}
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/// <reference types="chai" /> declare module "chai-bytes" { function chaiBytes(chai: any, utils: any): void; export = chaiBytes; } <|fim▁hole|> interface Assertion extends LanguageChains, NumericComparison, TypeComparison { equalBytes(expect...
declare namespace Chai { // For BDD API
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) <|fim▁hole|>class RDoparallel(RPackage): """Provides a parallel ba...
from spack import *
<|file_name|>test_cert.py<|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/. import unittest from cert import test_user_agent class Logger(ob...
def test_status(this, *args): pass
<|file_name|>TramoView.js<|end_file_name|><|fim▁begin|>define(function() { var TramoView = Backbone.View.extend({ <|fim▁hole|> events: {}, initialize: function() {}, render: function(index) { $(this.el).html(this.template(this.model.toJSON())) .addClass((index %...
tagName: 'tr', template: _.template($('#tramo-tmpl').html()),
<|file_name|>test_tree.py<|end_file_name|><|fim▁begin|>""" Testing for the tree module (sklearn.tree). """ import numpy as np from numpy.testing import assert_array_equal from numpy.testing import assert_array_almost_equal from numpy.testing import assert_almost_equal from numpy.testing import assert_equal from nose.t...
clf.fit(X, y, sample_mask=sample_mask) assert_array_equal(clf.predict(T), true_result)
<|file_name|>_CommandFemMeshGmshFromShape.py<|end_file_name|><|fim▁begin|># *************************************************************************** # * *<|fim▁hole|># * Copyright (c) 2016 - Bernd Hahnebach <bernd@bimstatik.org> * #...
<|file_name|>file.py<|end_file_name|><|fim▁begin|>from qit.base.type import Type class File(Type): <|fim▁hole|> pass_by_value = True def build(self, builder): return "FILE*"<|fim▁end|>
<|file_name|>ops_invokevirtual.py<|end_file_name|><|fim▁begin|># PyJVM (pyjvm.org) Java Virtual Machine implemented in pure Python # Copyright (C) 2014 Andrew Romanenco (andrew@romanenco.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
if obj_mon.fields["@monitor"] == frame.thread: obj_mon.fields["@monitor_count"] += 1 else: index = 0
<|file_name|>init.go<|end_file_name|><|fim▁begin|><|fim▁hole|> "github.com/lmorg/murex/lang/stdio" "github.com/lmorg/murex/lang/types" ) func init() { // Register data type stdio.RegisterWriteArray(types.Null, newArrayWriter) }<|fim▁end|>
package null import (
<|file_name|>ActionAddClientDependencyAction.java<|end_file_name|><|fim▁begin|>// $Id: ActionAddClientDependencyAction.java 41 2010-04-03 20:04:12Z marcusvnac $ // Copyright (c) 2007 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software ...
// documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents
<|file_name|>forms.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Forms for the votes application. """ # standard library # django from django import forms # models from .models import Vote # views from base.forms import BaseModelForm class VoteForm(BaseModelForm): """ Form Vote model. ""...
model = Vote
<|file_name|>example.py<|end_file_name|><|fim▁begin|>#/usr/bin/env python from fsm import Machine states = ["q1", "q2", "q3"] alphabet = ["0","1"] transitions = { "q1": {"0": "q1", "1": "q2"},<|fim▁hole|>start = "q1" end = ["q2"] machine = Machine.from_arguments(states, alphabet, transitions, start, end) machi...
"q2": {"0": "q3", "1": "q2"}, "q3": {"0": "q2", "1": "q2"}, }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Miscellaneous Rust utilities //! //! [Repository](https://github.com/spearman/rs-utils) #![feature(decl_macro)] extern crate generic_array; extern crate typenum;<|fim▁hole|>#[cfg(test)] extern crate tempdir; pub mod array; pub mod file; pub mod numeric; pub mod m...
#[cfg(test)] extern crate quickcheck; #[cfg(test)] extern crate quickcheck_macros;
<|file_name|>beam.py<|end_file_name|><|fim▁begin|># pylint: disable=R0904,R0902,E1101,E1103,C0111,C0302,C0103,W0101 from six import string_types import numpy as np from numpy.linalg import norm from pyNastran.utils import integer_types from pyNastran.bdf.cards.elements.bars import CBAR, LineElement from pyNastr...
at end B relative to end A. For beam p-elements ONLY! None : offt is active pa / pb : int; default=0
<|file_name|>edit-attributes.js<|end_file_name|><|fim▁begin|>/************************************************************************ * This file is part of EspoCRM. * * EspoCRM - Open Source CRM application. * Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko * Website: http://www.espocr...
* The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU General Public License version 3. *
<|file_name|>db.go<|end_file_name|><|fim▁begin|>package bolt import ( "errors" "fmt" "hash/fnv" "log" "os" "runtime" "runtime/debug" "strings" "sync" "time" "unsafe" ) // The largest step that can be taken when remapping the mmap. const maxMmapStep = 1 << 30 // 1GB // The data file format version. const v...
// If the package global IgnoreNoSync constant is true, this value is
<|file_name|>bigip_snmp_trap.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) <|fim▁hole|>from __future__ import absolute_import, division, print_function __metacl...
<|file_name|>test_wapi_metrics.py<|end_file_name|><|fim▁begin|>import uuid from unithelper import DBTestCase from unithelper import mocker from unithelper import requestor from unithelper import hashable_dict from bc import database from bc import metrics from bc_wapi import wapi_metrics class Test(DBTestCase): ...
def test_metric_add(self):
<|file_name|>sendData.js<|end_file_name|><|fim▁begin|>var request = require('request'), log = require('bole')('npme-send-data'), config = require('../../../config') module.exports = function (formGuid, data, callback) { var hubspot = config.license.hubspot.forms .replace(":portal_id", config.license.hu...
}
<|file_name|>time_encoder.go<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------*\ | | | hprose | | | | Official WebSite...
if t.Location() == time.UTC { loc = TagUTC }
<|file_name|>ContainerPlayer.java<|end_file_name|><|fim▁begin|>package net.minecraft.inventory; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.init.Blocks; import net...
this.addSlotToContainer(new Slot(this.craftMatrix, j + i * 2, 88 + j * 18, 26 + i * 18));
<|file_name|>noop.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The Prometheus 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 //...
return noopChunkQuerier{} }
<|file_name|>Agent.py<|end_file_name|><|fim▁begin|>''' Created on Sep 15, 2012 Agent classes. Contains references to instances of classes containing observer handlers and code Agent Instances are created automatically. Create a named Handler instance under the Agent, as an instance of the desired handler class, b...
<|file_name|>store.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../typings/redux/redux.d.ts" /> declare var module: any; declare var require: (modulePath: string) => any; import { Store, Reducer, createStore } from 'redux'; import rootReducer from '../reducers/index' export default function configureStore...
});
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Rust-GNOME 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> #![allow(non_camel_case_types)] extern ...
//========================================================================= pub fn g_list_free (list: *mut GList);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ getname ~~~~~~~<|fim▁hole|> :copyright: (c) 2015 by lord63. :license: MIT, see LICENSE for more details. """ from getname.main import random_name __title__ = "getname" __version__ = '0.1.1' __author...
Get popular cat/dog/superhero/supervillain names.
<|file_name|>easy_install.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https:...
return
<|file_name|>MainMemoryReplaceDatabase.java<|end_file_name|><|fim▁begin|>package it.unibas.lunatic.model.chase.chasede.operators.mainmemory;<|fim▁hole|>import it.unibas.lunatic.Scenario; import it.unibas.lunatic.model.chase.chasede.operators.IReplaceDatabase; import java.util.Iterator; import org.slf4j.Logger; import o...
<|file_name|>custom_reporter.cpp<|end_file_name|><|fim▁begin|><|fim▁hole|> namespace { class MyReporter : public sltbench::reporter::IReporter { public: MyReporter() = default; ~MyReporter() override = default; public: void ReportBenchmarkStarted() override { // for example, ignore this event } void ReportB...
#include <sltbench/Bench.h> #include <iomanip> #include <iostream>
<|file_name|>DefaultOAuthCodeFactory.java<|end_file_name|><|fim▁begin|>package org.apereo.cas.ticket.code; import org.apereo.cas.authentication.Authentication; import org.apereo.cas.authentication.principal.Service; import org.apereo.cas.ticket.ExpirationPolicy; import org.apereo.cas.ticket.Ticket; import org.apereo.c...
public DefaultOAuthCodeFactory(final ExpirationPolicy expirationPolicy) { this(new DefaultUniqueTicketIdGenerator(), expirationPolicy);
<|file_name|>htmloptionelement.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 dom::attr::Attr; use dom::attr::AttrHelpers; us...
}
<|file_name|>taskbar_window_thumbnailer_win.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 "chrome/browser/ui/views/panels/taskbar_window_thumbnailer_win.h"...
continue; if (iter == snapshot_hwnds_.begin()) { enclosing_x = bounds.left;
<|file_name|>ListService.js<|end_file_name|><|fim▁begin|>(function(){ 'use strict'; function ListService($http){ this.getList = function(list_id){ return $http.get('/lists/' + list_id + ".json") } } ListService.$inject = ['$http'] angular<|fim▁hole|><|fim▁end|>
.module('app') .service('ListService', ListService) }())
<|file_name|>FMM.py<|end_file_name|><|fim▁begin|>import numpy as np import pygame<|fim▁hole|>def emFit(results, numComponents): if len(results) == 0: return None m =np.matrix(results) gmm = GMM(numComponents,covariance_type='full', n_iter= 100, n_init = 4) gmm.fit(results) components = []...
from sklearn.mixture import GMM from math import sqrt, atan, pi
<|file_name|>test_temperature.py<|end_file_name|><|fim▁begin|>from unittest import TestCase from rfxcom.protocol.temperature import Temperature from rfxcom.exceptions import (InvalidPacketLength, UnknownPacketSubtype, UnknownPacketType) class TemperatureTestCase(TestCase): def se...
'packet_type': 80, 'packet_type_name': 'Temperature sensors',
<|file_name|>dark-green.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:5f2b413f8d0cfe55ce8c84acbcfabcff78bd6d2a8f389d8201cb728b429b9bd5<|fim▁hole|><|fim▁end|>
size 4323
<|file_name|>demo_contact-vi-snes.py<|end_file_name|><|fim▁begin|>"""This demo program uses the interface to SNES solver for variational inequalities to solve a contact mechanics problems in FEniCS. The example considers a heavy hyperelastic circle in a box of the same size""" # Copyright (C) 2012 Corrado Maurini ...
<|file_name|>test_classes.py<|end_file_name|><|fim▁begin|>"""Test inter-conversion of different polynomial classes. This tests the convert and cast methods of all the polynomial classes. """ import operator as op from numbers import Number import pytest import numpy as np from numpy.polynomial import ( Polynomia...
assert_raises(TypeError, op.truediv, s, p2) for stype in [complex]: s = stype(5, 0)
<|file_name|>acl.go<|end_file_name|><|fim▁begin|>package app import ( "errors" "net/http" "strings" "github.com/h2object/h2object/httpext" ) func acl_filter(ctx *context, c *ext.Controller, filters []filter) { if done := do_authentic(ctx, c); done { ctx.Info("request (%s) (%s) done by acl", c.Request.MethodToL...
case "system":
<|file_name|>derive.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 Syn Developers // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be c...
Some("derive input")
<|file_name|>parseUrl.js<|end_file_name|><|fim▁begin|>export default (original) => { <|fim▁hole|> let [path, params] = url.split('?'); if (path.length >= 2) { path = path.replace(/\/$/, ''); } if (params) { params = parseSearchParams(params); } else { params = {} } const actual = path + joi...
const url = getHashUrl(original);
<|file_name|>coherence-tuple-conflict.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.a...
<|file_name|>builder.py<|end_file_name|><|fim▁begin|>import os class generic(object): def __init__(self,myspec): self.settings=myspec self.settings.setdefault('CHROOT', 'chroot') def setarch(self, arch): """Set the chroot wrapper to run through `setarch |arch|`<|fim▁hole|> self.settings['CHROOT'] = 'setarch...
Useful for building x86-on-amd64 and such. """ if os.uname()[0] == 'Linux':
<|file_name|>managers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship info...
from django.utils.lru_cache import lru_cache
<|file_name|>NetInfo.java<|end_file_name|><|fim▁begin|>package edu.ut.mobile.network; public class NetInfo{ //public static byte[] IPAddress = {Integer.valueOf("54").byteValue(),Integer.valueOf("73").byteValue(),Integer.valueOf("28").byteValue(),Integer.valueOf("236").byteValue()}; static byte[] IPAddress = {Integ...
static int waitTime = 100000;
<|file_name|>test_bug_1896463.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 # # Unless required by applicable...
<|file_name|>unit-students-editor.component.ts<|end_file_name|><|fim▁begin|>import { Unit, csvUploadModalService, csvResultModalService, unitStudentEnrolmentModal, } from './../../../../../ajs-upgraded-providers'; import { ViewChild, Component, Input, Inject } from '@angular/core'; import { MatTable, MatTableDa...
<|file_name|>libARDrone.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ python library for the AR.Drone 1.0 (1.11.5) and 2.0 (2.2.9). parts of code from Bastian Venthur, Jean-Baptiste Passot, Florian Lacrampe. tested with Python 2.7.3 and AR.Drone vanilla firmware 1.11.5. """ # < im...
elif ( 'd' == lc_c ): lo_drone.move_right ()
<|file_name|>TPlus.java<|end_file_name|><|fim▁begin|>/* This file was generated by SableCC (http://www.sablecc.org/). */ package com.bju.cps450.node; import com.bju.cps450.analysis.*; @SuppressWarnings("nls") public final class TPlus extends Token { public TPlus() { super.setText("+"); }<|fim▁hol...
<|file_name|>0047_add_system_stats.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 model 'SystemStats' db.cre...
'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
<|file_name|>plot2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 from glob import glob import re import matplotlib.pyplot as plt import numpy as np from sys import argv def get_a1(pattern): a1 = {} for fit_file in glob(pattern): with open(fit_file) as f: line = f.readline() ...
fit_params = fit_file.split('-')
<|file_name|>environment.js<|end_file_name|><|fim▁begin|>const { environment } = require('@rails/webpacker') const webpack = require('webpack') // excluding node_modules from being transpiled by babel-loader.<|fim▁hole|> new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', jquery: "jquery", Popper: ['pop...
environment.loaders.delete("nodeModules"); environment.plugins.prepend('Provide',
<|file_name|>pyunit_binop2_plus.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(1, "../../../") import h2o def binop_plus(ip,port): # Connect to h2o h2o.init(ip,port) iris = h2o.import_frame(path=h2o.locate("smalldata/iris/iris_wheader_65_rows.csv")) rows, cols = iris.dim() iris.show() ...
res = 1.2 + iris[2] res2 = iris[1] + res[21,:] res2.show()
<|file_name|>crateC.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.apache.org/licenses...
// This tests the extra note reported when a type error deals with // seemingly identical types. // The main use case of this error is when there are two crates // (generally different versions of the same crate) with the same name
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin<|fim▁hole|> admin.site.register(Comment)<|fim▁end|>
from comments.models import Comment # Register your models here.
<|file_name|>calculator.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys import logging from warnings import warn import six from scss.ast import Literal from scss.cssdefs import _expr_glob_re, _interpolate...
if v: if not isinstance(v, Value): raise TypeError( "Somehow got a variable {0!r} "
<|file_name|>sns.py<|end_file_name|><|fim▁begin|># Copyright 2016 Capital One Services, LLC # # 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 # # ...
SNS.filter_registry.register('cross-account', CrossAccountAccessFilter)
<|file_name|>objimport.py<|end_file_name|><|fim▁begin|># # Copyright 2011-2019 Universidad Complutense de Madrid # # This file is part of Numina #<|fim▁hole|># """Import objects by name""" import importlib import inspect import warnings def import_object(path): """Import an object given its fully qualified name...
# SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod util; pub mod tools; pub mod uidmap;<|fim▁hole|><|fim▁end|>
pub mod mount; pub mod root; pub mod nsutil; pub mod vagga;
<|file_name|>corrplot.py<|end_file_name|><|fim▁begin|>import seaborn as sns import matplotlib.pyplot as plt <|fim▁hole|> size=None, figsize=(12, 9), *args, **kwargs): """ Plot correlation matrix of the dataset see doc at https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.hea...
def plot_corrmatrix(df, square=True, linewidths=0.1, annot=True,
<|file_name|>scanner_test.go<|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/. package biglog import ( "bytes" "fmt" "os" "sync" "te...
if !sc.Scan() { t.Errorf("Scanner finished before end of loop: i=%d k=%d\n", i, k) continue }
<|file_name|>cube.test.js<|end_file_name|><|fim▁begin|>// test cube var assert = require('assert'), math = require('../../../index'), error = require('../../../lib/error/index'), unit = math.unit, bignumber = math.bignumber, matrix = math.matrix, range = math.range, cube = math.cube; descri...
}); it('should throw an error with units', function() { assert.throws(function () {cube(unit('5cm'))});
<|file_name|>main.js<|end_file_name|><|fim▁begin|>import React from 'react' import ReactDOM from 'react-dom' import createBrowserHistory from 'history/lib/createBrowserHistory' import { useRouterHistory } from 'react-router' import { mySyncHistoryWithStore, default as createStore } from './store/createStore' import...
// react-router-redux reducer under the routerKey "router" in src/routes/index.js, // so we need to provide a custom `selectLocationState` to inform // react-router-redux of its location.
<|file_name|>FactoredParser.java<|end_file_name|><|fim▁begin|>// StanfordLexicalizedParser -- a probabilistic lexicalized NL CFG parser // Copyright (c) 2002, 2003, 2004, 2005 The Board of Trustees of // The Leland Stanford Junior University. All Rights Reserved. // // This program is free software; you can redistribut...
i += 2; } else { i = op.setOptionOrWarn(args, i); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>#import webdemo<|fim▁end|>
<|file_name|>plSDL.cpp<|end_file_name|><|fim▁begin|>/* This file is part of HSPlasma. * * HSPlasma 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 option) an...
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License
<|file_name|>geo.py<|end_file_name|><|fim▁begin|>import re from blaze import resource, DataFrame import pandas as pd from snakemakelib.odo.pandas import annotate_by_uri <|fim▁hole|> with open(uri): data = pd.read_csv(uri, sep=",", index_col=["fileName"]) return DataFrame(data)<|fim▁end|>
@resource.register('.+fastq.summary') @annotate_by_uri def resource_fastqc_summary(uri, **kwargs):
<|file_name|>riordan_avoiding_patterns.py<|end_file_name|><|fim▁begin|>from sage.misc.functional import symbolic_sum from sage.calculus import var def from_pattern_family_10j_1(j, variable=var('t')): """ This function allow to build a pair of functions (d, h) to build a Riordan array for the pattern famil...
return d,h
<|file_name|>expander.rs<|end_file_name|><|fim▁begin|>// Our use cases use super::stream; pub const WAVE_FORMAT_PCM: usize = 1; #[derive(Default)] pub struct WaveFormatEx { pub format_tag: u16, pub channels: u16, pub samples_per_second: i32, pub average_bytes_per_second: i32, pub block_align: u16,...
SoundExpander { memb_20: 0, memb_24: 0, memb_28: 0,
<|file_name|>thrift-tests.ts<|end_file_name|><|fim▁begin|>// Currently, the thrift bindings are minimal just to support the thrift generated // evernote bindings. Add more tests if you flesh out and plan to use the thrift // bindings more deeply. <|fim▁hole|>1 + 1;<|fim▁end|>
import evernote = require("evernote");
<|file_name|>loaders.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2019 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify i...
import os.path
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; <|fim▁hole|><|fim▁end|>
angular .module('app.core') .constant('STATIC_URL', '/static/js/'); })();
<|file_name|>menubutton.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option)...
impl gtk::ContainerTrait for MenuButton {} impl gtk::ButtonTrait for MenuButton {}
<|file_name|>run_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Execute the tests for the razers2 program. The golden test outputs are generated by the script generate_outputs.sh. You have to give the root paths to the source and the binaries as arguments to the program. These are the paths to the di...
ph.inFile('adeno-reads%d_1.fa' % rl), ph.inFile('adeno-reads%d_2.fa' % rl), '-o', ph.outFile('pe-adeno-reads%d_2-id-so%d.razers' % (rl, so))],
<|file_name|>ValidationMappingGrid.java<|end_file_name|><|fim▁begin|>package org.activityinfo.ui.client.component.importDialog.validation; /* * #%L * ActivityInfo Server * %% * Copyright (C) 2009 - 2013 UNICEF * %% * This program is free software: you can redistribute it and/or modify * it under the terms of the...
*
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from distutils.core import setup from dangagearman import __version__ as version setup( name = 'danga-gearman', version = version, description = 'Client for the Danga (Perl) Gearman implementation', author = 'Samuel Stauffer', ...
classifiers = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License',
<|file_name|>wall.js<|end_file_name|><|fim▁begin|>var Phaser = require('phaser-unofficial'); <|fim▁hole|>/** * Wall class. * @param {object} game * @param {number} x * @param {number} y */ Wall = function (game, x, y) { Phaser.Sprite.call(this, game, x, y, 'paddle'); this.game.physics.arcade.enable(this);...
<|file_name|>main_window.cpp<|end_file_name|><|fim▁begin|>#include <QApplication> #include <QMenuBar> #include <QMessageBox> #include <QFileDialog> #include <QVBoxLayout> #include <QDockWidget> #include <QProgressDialog> #include <QDesktopWidget> #include "vfs_dialog.h" #include "save_manager_dialog.h" #include "kerne...
scope_thread worker("PKG Installer", [&] { if (pkg_install(pkg_f, local_path + '/', progress, path))
<|file_name|>routermodelbase.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # rsak - Router Swiss Army Knife # Copyright (C) 2011 Pablo Castellano <pablo@anche.no> # # This program is free software: you can redistribute it and/or modify<|fim▁hole|># This program is distributed in the hope that it will be useful,...
# 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 option) any later version. #
<|file_name|>09-mock-timer.js<|end_file_name|><|fim▁begin|>export default (callback) => { setTimeout(() => { callback(); setTimeout(() => { callback(); }, 3000); }, 3000);<|fim▁hole|><|fim▁end|>
}
<|file_name|>bitcoin_fi.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About MasterDoge</source> <translation>Tietoa MasterD...
<translation>Lisää debug-tulosteiden alkuun aikaleimat</translation> </message>
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * App routes. */ var homepage = require('./homepage'); var user = require('./user'); var news = require('./news'); var test = require('./test'); var passport = require('passport'); function ensureAuthenticated(req, res, next) { if (req.isAuthenticated()) { ...
req.user.username == req.params.id)
<|file_name|>ThemeBuilder.tsx<|end_file_name|><|fim▁begin|>import { ReactElement } from "react"; import { Grid } from "@react-md/utils"; import scssVariables from "@react-md/theme/dist/scssVariables"; import { useTheme } from "components/Theme"; import ThemeConfiguration from "./ThemeConfiguration"; import Preview fr...
const primaryColor = scssVariables[primaryName]; const secondaryName = `rmd-${secondary}-a-${accent}` as "rmd-pink-a-200"; const secondaryColor = scssVariables[secondaryName];
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>/** * @author gyb(mocheer) * @email mocheer@foxmail.com * @since 2017.3.16 */ /// <reference path="tree.d.ts" /> declare var $: T; declare var ACTION_INIT: 'init';<|fim▁hole|>declare var GET: 'GET'; declare var POST: 'POST'; declare var PI, max, min, floor, ce...
declare var ACTION_LOAD: 'load'; declare var ACTION_SUSPEND: 'suspend'; declare var ACTION_RESUME: 'resume';
<|file_name|>ricoLocale_ua.js<|end_file_name|><|fim▁begin|>/***************************************************************** Page : ricoLocale_ua.js Description : ukrainian localization strings Version 0.1 (revisions by Alexey Uvarov,Illiya Gannitskiy) If you would like to include translations for another languag...
RicoTranslate.langCode='ua'; // used in ricoLiveGrid.js
<|file_name|>plan.go<|end_file_name|><|fim▁begin|>package command import ( "context" "fmt" "strings" "github.com/hashicorp/terraform/backend" "github.com/hashicorp/terraform/config/module" ) // PlanCommand is a Command implementation that compares a Terraform // configuration to an actual infrastructure and sho...