prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>deviceTX_wC2.py<|end_file_name|><|fim▁begin|>try: import RPi.GPIO as GPIO from lib_nrf24 import NRF24 from math import * import time import spidev import sys import os.path import numpy import pickle import sqlite3 import mat4py as m4p import os def compress(uncompressed): """Compress a str...
inFile = open("ElQuijote.txt", "rb") data2Tx = inFile.read() inFile.close()
<|file_name|>issue-36499.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/lic...
<|file_name|>population.py<|end_file_name|><|fim▁begin|>""" Implementaiton of a population for maintaining a GA population and proposing structures to pair. """ from random import randrange, random from math import tanh, sqrt, exp from operator import itemgetter import numpy as np from ase.db.core import now def cou...
def get_one_candidate(self, with_history=True):
<|file_name|>datatype.rs<|end_file_name|><|fim▁begin|>use error::Result; use handle::{Handle, ID, FromID, get_id_type}; use object::Object; use ffi::h5i::{H5I_DATATYPE, hid_t}; use ffi::h5t::{H5T_INTEGER, H5T_FLOAT, H5T_NO_CLASS, H5T_NCLASSES, H5T_ORDER_BE, H5T_ORDER_LE, H5T_SGN_2, H5Tcopy, H5Tget_class...
<|file_name|>generate.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node // var fs = require('fs'), path = require('path'), http = require('http'), BufferStream = require('bufferstream'), // http://www.ksu.ru/eng/departments/ktk/test/perl/lib/unicode/UCDFF301.html keys = ['value', 'name', 'category', '...
<|file_name|>free.rs<|end_file_name|><|fim▁begin|>// Copyleft (ↄ) meh. <meh@schizofreni.co> | http://meh.schizofreni.co // // This file is part of cancer. // // cancer 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 Fou...
self.empty.clone() }
<|file_name|>enable_management_service_ssh_acl_v4.py<|end_file_name|><|fim▁begin|>from a10sdk.common.A10BaseClass import A10BaseClass class VeCfg(A10BaseClass): """This class does not support CRUD Operations please use parent. :param ve_end: {"type": "number", "description": "VE port", "format": "number...
<|file_name|>test_transforms.py<|end_file_name|><|fim▁begin|>import pytest from spinner import transforms from spinner import coordinates from spinner import cabinet from example_cabinet_params import exact def test_hex_to_cartesian(): h = coordinates.Hexagonal c = coordinates.Cartesian2D # Test single element...
<|file_name|>bodyParser.js<|end_file_name|><|fim▁begin|>var connect = require('..'); var assert = require('assert'); var app = connect(); app.use(connect.bodyParser()); app.use(function(req, res){ res.end(JSON.stringify(req.body)); }); describe('connect.bodyParser()', function(){ it('should default to {}', func...
.write('user=tobi') .end(function(res){
<|file_name|>hue-states.ts<|end_file_name|><|fim▁begin|>var hue = require('node-hue-api'); var lightState = hue.lightState; // WHITE STATES var MID = 350; var WARM = 400; var X_WARM = 500; var BRIGHT = 250; // HUES const HUE = { BLOOD_ORANGE: 350, RED: 0, GREEN: 145, BLUE: 250, PURPLE: 280 } const BRIGHTNE...
<|file_name|>BookingDao.java<|end_file_name|><|fim▁begin|>/* * This file is part of "U Turismu" project. * * U Turismu is an enterprise application in support of calabrian tour operators. * This system aims to promote tourist services provided by the operators * and to develop and improve tourism in Calabria. *...
* * This program is free software: you can redistribute it and/or modify
<|file_name|>pem.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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 ...
of bytearrays, which may have zero elements if not PEM blocks are found. """ bList = []
<|file_name|>test_triangularbarkbands.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General ...
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. # # You should have received a copy of the Affero GNU General Public License
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>use std::error; use std::fmt; #[derive(Debug)] pub enum RouterError { RouteNotFound,<|fim▁hole|>} impl fmt::Display for RouterError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { RouterError::RouteNotFound => write!(f, "Route not found...
<|file_name|>expr-match-panic.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.or...
<|file_name|>efs.py<|end_file_name|><|fim▁begin|>from troposphere import Tags,FindInMap, Ref, Template, Parameter,ImportValue, Ref, Output from troposphere.efs import FileSystem, MountTarget from troposphere.ec2 import SecurityGroup, SecurityGroupRule, Instance, Subnet from create import export_ref, import_ref from cre...
# Create EFS FIleSystem efs_fs=FileSystem( title='{}{}'.format(ops.app_name, stack_name),
<|file_name|>example.rs<|end_file_name|><|fim▁begin|>#pragma version(1)<|fim▁hole|>#pragma rs java_package_name(com.renderscript.courses.tlp2k14.renderscriptfilter)<|fim▁end|>
<|file_name|>0008_cart_tax_percentage.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-21 14:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): <|fim▁hole|> ] operations = [ migratio...
dependencies = [ ('carts', '0007_auto_20161221_1337'),
<|file_name|>views.py<|end_file_name|><|fim▁begin|>import datetime import uuid import pytz import os import time from django.contrib.sites.shortcuts import get_current_site from django.core.servers.basehttp import FileWrapper from django.views.decorators.csrf import csrf_exempt from django.core.urlresolvers import reve...
<|file_name|>OServerCommandGetStaticContent.java<|end_file_name|><|fim▁begin|>/* * Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a c...
else if (path.endsWith(".ico")) type = "image/x-icon"; else if (path.endsWith(".otf")) type = "font/opentype";
<|file_name|>002.rs<|end_file_name|><|fim▁begin|>// Each new term in the Fibonacci sequence is generated by adding the previous two terms. // By starting with 1 and 2, the first 10 terms will be: // 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... // By considering the terms in the Fibonacci sequence whose values do not excee...
fn compute(limit: uint) -> uint {
<|file_name|>coros.py<|end_file_name|><|fim▁begin|># This module definitely remains in 1.0.x, probably in versions after that too. import warnings warnings.warn('gevent.coros has been renamed to gevent.lock', DeprecationWarning, stacklevel=2)<|fim▁hole|>from gevent.lock import __all__<|fim▁end|>
from gevent.lock import *
<|file_name|>sujet.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # 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 m...
def supprimer_fils(self, sujet): """Supprime le sujet des fils.""" self.__sujets_fils.remove(sujet)
<|file_name|>document_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/. */ //! Tracking of pending loads in a document. //! //! ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: ascii -*- u""" :Copyright: Copyright 2015 - 2021 Andr\xe9 Malo or his licensors, as applicable :License: Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the L...
<|file_name|>FBStringTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2016 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICEN...
randomString(&s, maxString); String s1; randomString(&s1, maxString);
<|file_name|>savedsearch.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function from django.db import models from django.utils import timezone from sentry.db.models import FlexibleForeignKey, Model, sane_repr from sentry.models.search_common import SearchType class SavedSearch(Model)...
return self._is_pinned
<|file_name|>editProxyDialog.js<|end_file_name|><|fim▁begin|>const Clutter = imports.gi.Clutter; const Lang = imports.lang; const ModalDialog = imports.ui.modalDialog; const Signals = imports.signals; const St = imports.gi.St; const Gettext = imports.gettext; const _ = Gettext.domain('gnome-shell-extensions-scriptprox...
let symbol = e.get_key_symbol(); if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) { if (this.action == 'add')
<|file_name|>_textfont.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="scattersmith", **kwargs): super(TextfontValidator, self).__init__( plotly_...
will only be able to apply a font if it is
<|file_name|>run_report_with_property_quota.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2021 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 Licen...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import sys import os from recommonmark.parser import CommonMarkParser # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # ...
<|file_name|>archive_unix.go<|end_file_name|><|fim▁begin|>// +build !windows package daemon import ( "os" "path/filepath" "github.com/docker/docker/container" ) // checkIfPathIsInAVolume checks if the path is in a volume. If it is, it // cannot be in a read-only volume. If it is not in a volume, the container /...
return err } doChownDestination := !destExisted || !destStat.IsDir()
<|file_name|>settings_production.py<|end_file_name|><|fim▁begin|>#inherits from standard local settings from bukkakegram.settings import * import dj_database_url DATABASES['default'] = dj_database_url.config() SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') ALLOWED_HOSTS = ['.herokuapp.com', '*',] DE...
# Static files deploy in S3 AWS AWS_ACCESS_KEY_ID = config('AWS_ACCESS_KEY_ID')
<|file_name|>icmp.py<|end_file_name|><|fim▁begin|># $Id: icmp.py,v 1.1.1.1 2005/10/29 18:20:48 provos Exp $ from dpkt import Packet, in_cksum as _icmp_cksum import ip # Types (icmp_type) and codes (icmp_code) - # http://www.iana.org/assignments/icmp-parameters ICMP_CODE_NONE = 0 # for types without codes ICMP_ECHO...
ICMP_UNREACH_PROTO = 2 # bad protocol ICMP_UNREACH_PORT = 3 # bad port ICMP_UNREACH_NEEDFRAG = 4 # IP_DF caused drop
<|file_name|>const.py<|end_file_name|><|fim▁begin|>"""Proides the constants needed for component.""" ATTR_APP_ID = "app_id" ATTR_APP_NAME = "app_name" ATTR_INPUT_SOURCE = "source" ATTR_INPUT_SOURCE_LIST = "source_list" ATTR_MEDIA_ALBUM_ARTIST = "media_album_artist" ATTR_MEDIA_ALBUM_NAME = "media_album_name" ATTR_MEDIA...
MEDIA_TYPE_MOVIE = "movie" MEDIA_TYPE_VIDEO = "video" MEDIA_TYPE_EPISODE = "episode" MEDIA_TYPE_CHANNEL = "channel"
<|file_name|>expn_asy.py<|end_file_name|><|fim▁begin|>"""Precompute the polynomials for the asymptotic expansion of the generalized exponential integral. Sources ------- [1] NIST, Digital Library of Mathematical Functions, http://dlmf.nist.gov/8.20#ii """ from __future__ import division, print_function, absolute_...
<|file_name|>ModelInstanceCollection.js<|end_file_name|><|fim▁begin|>/*global define*/ define([ '../Core/BoundingSphere', '../Core/Cartesian3', '../Core/clone', '../Core/Color', '../Core/ComponentDatatype', '../Core/defaultValue', '../Core/defined', '../Co...
}
<|file_name|>trait-item-with-defaultness-fail-semantic.rs<|end_file_name|><|fim▁begin|>#![feature(specialization)] //~ WARN the feature `specialization` is incomplete<|fim▁hole|>fn main() {} trait X { default const A: u8; //~ ERROR `default` is only allowed on items in trait impls default const B: u8 = 0; //~...
<|file_name|>annotation.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of...
<|file_name|>SubstanceSpinnerUI.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * o Redist...
/* * Copyright (c) 2005-2010 Substance Kirill Grouchnikov. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without
<|file_name|>404.js<|end_file_name|><|fim▁begin|>var React = require('react');<|fim▁hole|> render: function () { return ( <html lang="sv"> <head> <meta charSet="utf-8" /> <title>{this.props.title}</title> </head> <body style={{ width: 300 + 'px', margin...
module.exports = React.createClass({
<|file_name|>install_linux_sysroot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright 2018 The Crashpad Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Lic...
if os.path.isdir(sysroot): shutil.rmtree(sysroot) os.mkdir(sysroot)
<|file_name|>epubBundle.js<|end_file_name|><|fim▁begin|>/** * epubBundle *<|fim▁hole|> * * 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/LICENS...
* Copyright 2015 David Herron * * This file is part of epubtools (http://akashacms.com/).
<|file_name|>test.replace.js<|end_file_name|><|fim▁begin|>const should = require('should'); var Regex = require('../'); var conStr = 'dHello World'; describe( 'replace test', function () {<|fim▁hole|> regex.replace(conStr,'h').should.equal('dhello World'); } ); it( 'middle area', function () { ...
it( 'left area', function () { var regex = new Regex('H');
<|file_name|>setup_progress.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, json from frappe.model.document import Document class SetupP...
if d.action_name == action_name:
<|file_name|>keen-tracker.js<|end_file_name|><|fim▁begin|>/* eslint-disable no-unused-vars */ // This helps ember-browserify find npm modules in ember-cli addons import md5 from 'npm:js-md5'; import config from 'ember-get-config';<|fim▁hole|>export {default} from 'ember-osf/mixins/keen-tracker';<|fim▁end|>
import _get from 'npm:lodash/get'; import Cookie from 'npm:js-cookie'; import keenTracking from 'npm:keen-tracking';
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate bn; extern crate quickcheck; <|fim▁hole|><|fim▁end|>
mod ops;
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use std::error::Error as StdError; use std::fmt; use std::io; use std::time::Duration; pub use BaudRate::*; pub use CharSize::*; pub use Parity::*; pub use StopBits::*; pub use FlowControl::*; /// A module that exports traits that are useful to have in scope. /// /// I...
<|file_name|>util.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from reportlab.lib.colors import Color, CMYKColor, getAllNamedColors, toColor, \ HexColor from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY from reportlab.lib.units import inch, cm import base64 import httplib import lo...
""" box = data.get("-pdf-frame-box", []) if len(box) == 4:
<|file_name|>computer_system_1_0_0_system_type.py<|end_file_name|><|fim▁begin|># coding: utf-8 """ Copyright 2015 SmartBear Software 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 ...
""" return self.to_str()
<|file_name|>MainBigIntCs.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2009, 2014 Tim Tiemens. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Lesser Public License...
out.println(" -v print version on 1st line"); out.println(" -sepSpace outputs with spaces between values"); out.println(" -sepNewLine outputs with newlines between values [default]");
<|file_name|>listener.js<|end_file_name|><|fim▁begin|><|fim▁hole|>TF.listen();<|fim▁end|>
<|file_name|>test_bond.py<|end_file_name|><|fim▁begin|>import numpy as np STR_NOBOND = """AU 3 1 2 1 1 0.00000000 0.00000000 0.00000000 -0.66387672 0.00000000 -0.00000000 0.34509720 3.78326969 -0.00000000 -0.00000000 3.96610412 0.00000000 3.52668267 0.00000000 -0....
"ij,i", (self.r_bond - self.coc_bond), self.q_bond ) + self.d_bond.sum(axis=0) dip_nobond = np.einsum(
<|file_name|>newlambdas-ret-infer2.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<|fim▁hole|>// http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http...
<|file_name|>ssh_key.rs<|end_file_name|><|fim▁begin|>// id number This is a unique identification number for the // key. This can be used to reference a specific SSH key when you wish to embed // a key into a Droplet. // fingerprint string This attribute contains the fingerprint value // th...
write!(f, "ID: {:.0}\n\
<|file_name|>fuzzer-parse_json.cpp<|end_file_name|><|fim▁begin|>/* __ _____ _____ _____ __| | __| | | | JSON for Modern C++ (fuzz test support) | | |__ | | | | | | version 2.1.0 |_____|_____|_____|_|___| https://github.com/nlohmann/json This file implements a parser test suitable for fuzz testin...
std::string s2 = j2.dump();
<|file_name|>eigen.rs<|end_file_name|><|fim▁begin|>use std::cmp; use num; use num::traits::{Float, Signed}; use ApproxEq; use Matrix; use internalutil::{alloc_dirty_vec, hypot}; /// Eigenvalues and eigenvectors of a real matrix. /// /// Ported from JAMA. /// /// If A is symmetric, then A = V*D*V' where the eigenvalu...
// Accumulate transformations for i in low..(high + 1) {
<|file_name|>ModalOverlay.js<|end_file_name|><|fim▁begin|>import React, { PropTypes } from 'react'; import Spinner from './Spinner'; const ModalOverlay = (props) => { const isActive = props.active ? 'active' : ''; const spinner = props.spinner ? <Spinner /> : ''; return ( <div id="modal-overlay" className...
<|file_name|>0007_auto_20161223_1013.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-23 10:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
],
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|># Category, Ratings, Quote<|fim▁end|>
# from django.contrib import admin # from libraryapp.models import Author, Book, Interest, History, GoogleUser, \
<|file_name|>EventManager.py<|end_file_name|><|fim▁begin|>""" Module defining the Event class which is used to manage collissions and check their validity """ from itertools import combinations from copy import copy from particle import Particle class EventParticle(object): def __init__(self, particle1, part...
class EventWallX(object):
<|file_name|>feed_parse_extractDellstoriesWordpressCom.py<|end_file_name|><|fim▁begin|>def extractDellstoriesWordpressCom(item): ''' Parser for 'dellstories.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): ret...
return buildReleaseMessageWithType(item, name, vol, chp, frag=frag, postfix=postfix, tl_type=tl_type)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.3.3 (function() { var MAXSAMPLES, Point, STAGE_LOBBY, STAGE_PLAYING, baseObject, button, calcAvgTick, canvas, delta, difficulty, enemy, explosion, initialize, lastScore, lasttime, lives, missile, missileFired, mouseDown, mouseX, mouseY,...
samples++; return 0; } return ticksum / MAXSAMPLES;
<|file_name|>parity_signing.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity 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, eit...
<|file_name|>RTreeIndexExtensionCreateTest.java<|end_file_name|><|fim▁begin|>package mil.nga.geopackage.extension.rtree; import org.junit.Test; import java.sql.SQLException; import mil.nga.geopackage.CreateGeoPackageTestCase; /** * Test RTree Extension from a created database * * @author osbornb */ public class...
public RTreeIndexExtensionCreateTest() {
<|file_name|>test_del_group.py<|end_file_name|><|fim▁begin|>def test_delite_group(app): app.session.login( username="admin", password="secret")<|fim▁hole|> pytest.main('test_del_group.py')<|fim▁end|>
app.group.delete_first_group() app.session.logout() if __name__ == '__main__':
<|file_name|>s0095.go<|end_file_name|><|fim▁begin|>/* The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As the sum of these divisors is equal to 28, we call it a perfect number. Interestingly the sum of the proper divisors ...
} if _, ok := nums[x]; ok { break }
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import React from 'react' import { FormControl } from 'react-bootstrap' import './@FilterListInput.css' const FilterListInput = ({onFilter, searchValue}) => { let handleFilter = e => { onFilter(e.target.value)<|fim▁hole|>} export default FilterListInput<|fim▁en...
} return (<FormControl className='FilterListInput' type='text' defaultValue={searchValue} placeholder='Search within this list...' onChange={handleFilter.bind(this)} />)
<|file_name|>ball.js<|end_file_name|><|fim▁begin|>function drawBall() { ctx.beginPath(); ctx.arc(x, y, ballRadius, 0, Math.PI*2); ctx.fillStyle = color; ctx.strokeStyle = "#FF0000"; ctx.stroke(); ctx.fill(); ctx.closePath(); <|fim▁hole|><|fim▁end|>
}
<|file_name|>leak-box-as-tydesc.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....
<|file_name|>full_inspiration.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 """ Copyright 2015 SYSTRAN Software, 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...
if p != 'systran_types' and p != 'attribute_map': properties.append('{prop}={val!r}'.format(prop=p, val=self.__dict__[p]))
<|file_name|>mind.rs<|end_file_name|><|fim▁begin|>use std::f32::{INFINITY, NEG_INFINITY}; use std::cmp::Ordering; use std::default::Default; use std::fmt; use std::hash::BuildHasherDefault; use std::mem; use std::sync::Arc; use std::sync::mpsc; use std::thread; use std::time::Duration; use time; use lru_cache::LruCach...
#[derive(Clone)] pub struct Lodestar<T: Memory> {
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import os from common_helper_files import get_dir_of_file from pluginbase import PluginBase import logging class FilterSystem(): FILTER_TYPE = None def __init__(self, selected_filters): self._init_plugins() if selected_filters == 'all': ...
<|file_name|>seg_queue.rs<|end_file_name|><|fim▁begin|>use std::sync::atomic::Ordering::{Acquire, Release, Relaxed}; use std::sync::atomic::{AtomicBool, AtomicUsize}; use std::{ptr, mem}; use std::cmp; use std::cell::UnsafeCell; use mem::epoch::{self, Atomic, Owned}; const SEG_SIZE: usize = 32; /// A Michael-Scott q...
if elem <= cur { writeln!(stderr(), "{}: {} <= {}", t, elem, cur); } assert!(elem > cur);
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>// This is a part of rust-encoding. // Copyright (c) 2013-2014, Kang Seonghoon. // See README.md and LICENSE.txt for details. //! Internal utilities. #![macro_escape] use std::{str, mem}; use std::default::Default; use types; /// Unchecked conversion to `char`. pub ...
} } $(
<|file_name|>pad.py<|end_file_name|><|fim▁begin|>import numbers import numpy import cupy ############################################################################### # Private utility functions. def _round_if_needed(arr, dtype): """Rounds arr inplace if the destination dtype is an integer. """ if c...
<|file_name|>data_meeting_io.py<|end_file_name|><|fim▁begin|># Copyright 2020 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # ...
dataset = tf.data.Dataset.from_tensor_slices( (wav_paths, diarizations, spkindices, meeting_scales, start_samples,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils import log from distutils.core import setup from distutils.core import Command from distutils.command.build_py import build_py from distutils.command.install import install import os import zeroinstall class adjust_scripts_for_home(Command): """setup.p...
stream.close()
<|file_name|>morestatus.py<|end_file_name|><|fim▁begin|># Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. """make status give a bit more context This extension will wrap the status command to make it s...
% mergeliststr ) else:
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #![feature(ascii)] #![feature(as_unsafe_cell)] #![feature(borrow_...
pub fn init() {
<|file_name|>SkillTree.js<|end_file_name|><|fim▁begin|>angular.module('starter.controllers') .controller('skillTreeControl', function ($scope, $storageServices, $ionicModal, $analytics, $window) { $scope.showSkillMap = true; $analytics.trackView('Skill Tree'); $scope.ratings = 0; $scope.isInfinite =...
<|file_name|>shift-management.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import {MdDialog, MdDialogRef} from '@angular/material'; import { Shift } from './shift'; import { ShiftService } from './shift.service'; import { CreateShiftDialog } from './create-shift-dialog.c...
dialogRef.afterClosed().subscribe(res => {
<|file_name|>tpd_graph_xml2dot.py<|end_file_name|><|fim▁begin|>##############################################################################<|fim▁hole|># http://www.eclipse.org/legal/epl-v10.html # # Contributors: # Balasko, Jeno # Delic, Adam # #####################################################################...
# Copyright (c) 2000-2016 Ericsson Telecom AB # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at
<|file_name|>routerscheduler.py<|end_file_name|><|fim▁begin|># Copyright 2015 Cisco Systems. # 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://...
"""Remove a router from Hosting Device.""" shell_command = 'cisco-hosting-device-router-remove'
<|file_name|>gutters.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------------------------ # Copyright (c) 2010, Enthought Inc # All rights reserved. # # This software is provided without warranty under the terms of the BSD license. # # Author: Enthought Inc # Description: <En...
painter.fillRect(event.rect(), self.background_color) cw = self.parent()
<|file_name|>vulkan_ctx.rs<|end_file_name|><|fim▁begin|>extern crate vulkano; use grid; use scene; use std::path::Path; use std::sync::Arc; use tracers::{RaycastingShader, Tracer}; pub struct VulkanCtx<'a> { pub physical: vulkano::instance::PhysicalDevice<'a>, pub device: Arc<vulkano::device::Device>, pu...
model_path: &Path, predicate: P,
<|file_name|>next_back.rs<|end_file_name|><|fim▁begin|>#![feature(core, unboxed_closures)] extern crate core; #[cfg(test)] mod tests { use core::str::pattern::ReverseSearcher; use core::str::pattern::SearchStep::{Match, Reject, Done}; use core::str::pattern::CharPredicateSearcher; use core::str::patter...
// #[inline] // fn next_reject(&mut self) -> Option<(usize, usize)> { // self.0.next_reject()
<|file_name|>list.py<|end_file_name|><|fim▁begin|>#coding:utf-8 LIST_NUM = [(1,4),(5,1),(2,3),(6,9),(7,1)] ''' 用max函数获取到元素的最大值,然后用冒泡进行排序 ''' for j in range(len(LIST_NUM) -1): for i in range(len(LIST_NUM) -1):<|fim▁hole|> LIST_NUM[i] = LIST_NUM[i + 1] LIST_NUM[i + 1] = A print LIST_NUM<|...
if max(LIST_NUM[i]) > max(LIST_NUM[i + 1]): A = LIST_NUM[i]
<|file_name|>Customer1794Repository.java<|end_file_name|><|fim▁begin|>package example.repo; import example.model.Customer1794; import java.util.List;<|fim▁hole|>import org.springframework.data.repository.CrudRepository; public interface Customer1794Repository extends CrudRepository<Customer1794, Long> { List<Custo...
<|file_name|>home_languages_persian.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) This program is free software: you can redistribute it and/or modify it under the terms of...
<|file_name|>event.test.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-------...
});
<|file_name|>0002_auto_20191121_1640.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.7 on 2019-11-21 15:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('smmapdfs_edit', '0001_initial'), ] operations ...
]
<|file_name|>Constants.ts<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2017 The xterm.js authors. All rights reserved. * @license MIT */ export const INVERTED_DEFAULT_COLOR = 257; export const DIM_OPACITY = 0.5;<|fim▁hole|> export const CHAR_ATLAS_CELL_SPACING = 1;<|fim▁end|>
<|file_name|>extractor.py<|end_file_name|><|fim▁begin|>import json, codecs, re from abc import ABCMeta, abstractmethod from PIL import Image, ExifTags from witica.util import throw, sstr, suni #regular expressions regarding item ids RE_METAFILE = r'^meta\/[^\n]+$' RE_FIRST_ITEMID = r'(?!meta\/)[^\n?@.]+' RE_ITEMFILE...
def extract_metadata(self, filename):
<|file_name|>InformationExtractorJdbcDatabaseMetaDataImpl.java<|end_file_name|><|fim▁begin|>/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.ht...
if ( identifierToUse == null ) { identifierToUse = extractionContext.getDefaultSchema();
<|file_name|>utils_test.py<|end_file_name|><|fim▁begin|>"""This contains the unit tests for treadmill.utils. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import io import os import shutil import signal import s...
user='testproid', home='home', shell='shell',
<|file_name|>log.py<|end_file_name|><|fim▁begin|>""" Logger classes for the ZAP CLI. .. moduleauthor:: Daniel Grunwell (grunny) """ import logging<|fim▁hole|> class ColorStreamHandler(logging.StreamHandler): """ StreamHandler that prints color. This is used by the console client. """ level_map = { ...
import sys from termcolor import colored
<|file_name|>extendingClassFromAliasAndUsageInIndexer.js<|end_file_name|><|fim▁begin|>//// [tests/cases/compiler/extendingClassFromAliasAndUsageInIndexer.ts] //// //// [extendingClassFromAliasAndUsageInIndexer_backbone.ts] export class Model { public someData: string; } //// [extendingClassFromAliasAndUsageIn...
} //// [extendingClassFromAliasAndUsageInIndexer_moduleB.ts] import Backbone = require("./extendingClassFromAliasAndUsageInIndexer_backbone");
<|file_name|>eos_l3_interfaces.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ##...
<|file_name|>urwid_tui.py<|end_file_name|><|fim▁begin|># # SPDX-FileCopyrightText: 2020 Dmytro Kolomoiets <amerlyq@gmail.com> and contributors. # # SPDX-License-Identifier: GPL-3.0-only # import pickle import urwid import zmq from ..ifc import * def tui_client(src_uri, dst_uri, log_uri): set_current_thread_name...
_log = getLogger()