prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>source.js<|end_file_name|><|fim▁begin|>import css from './source.css'; __export__ = css;<|fim▁hole|><|fim▁end|>
export default css;
<|file_name|>taskController.js<|end_file_name|><|fim▁begin|>/** * Created by Administrator on 2015/2/3. */ var Task = require('../models/task') ; //add task<|fim▁hole|>exports.addTask = function(req,res){ var title = req.body.title, content = req.body.content, date = req.body.date, durati...
<|file_name|>run_local_database.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Command-line tool for starting a local Vitess database for testing. USAGE: $ run_local_database --port 12345 \ --topology test_keyspace/-80:test_keyspace_0,test_keyspace/80-:test_keyspace_1 \ --schema_dir /path/to/sche...
'WARNING: %s: No empty line was received on stdin.'
<|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. #<|fim▁hole|>from spack import * class Dtbuild3(Package): """Simple package which acts as a build dependency""" ...
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
<|file_name|>main-sandbox.component.ts<|end_file_name|><|fim▁begin|>import { Component} from '@angular/core' <|fim▁hole|>}) export class MainSandBox { }<|fim▁end|>
@Component({ templateUrl: "./main-sandbox.component.html"
<|file_name|>conversions.rs<|end_file_name|><|fim▁begin|>use std::str::FromStr; use super::errors::TcpTransportError; use super::typedefs::TcpTransportResult; pub fn as_string(bytes: Vec<u8>) -> TcpTransportResult<String> { match String::from_utf8(bytes) { Ok(st) => Ok(st), Err(_) => Err(TcpTrans...
#[test] fn test_as_string() { // bytestring is utf8 let st = as_string(vec![b'a', b'b']).unwrap();
<|file_name|>vector_long16.rs<|end_file_name|><|fim▁begin|>use std; use ::*; impl Vector for long16 { type Scalar = i64; type Boolean = long16; type CharVector = char16; type ShortVector = short16; type IntVector = int16; type LongVector = long16; type UCharVector = uchar16; type UShortVector = ushor...
#[inline(always)]
<|file_name|>module.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python<|fim▁hole|># Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Sh...
# -*- coding: utf-8 -*-
<|file_name|>borrowed-ptr-pattern-infallible.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. //<|fim▁hole|>// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your //...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
<|file_name|>display.rs<|end_file_name|><|fim▁begin|>use std::fmt::{Display, Error, Formatter, Write}; use super::{Document, KeyMarkup, StringValue, TableKeyMarkup, BoolValue}; use super::{ValueRef, Container, DirectChild, InlineArray, FloatValue}; use super::{ContainerKind, InlineTable, IntegerValue, DatetimeValue, V...
<|file_name|>multicam.py<|end_file_name|><|fim▁begin|>import bpy from .utils import MultiCamContext class MultiCamFadeError(Exception): def __init__(self, msg): self.msg = msg def __str__(self): return repr(self.msg) class BlendObj(object): def __init__(self, **kwargs): se...
'start_frame':start_frame, 'end_frame':end_frame, 'start_source':prop_vals['start']['start_source'],
<|file_name|>DemoController.java<|end_file_name|><|fim▁begin|>package com.yueny.demo.job.controller; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org....
* @DATE 2016年2月16日 下午8:23:11 *
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>pub mod one; pub mod two; pub mod ffigen;<|fim▁hole|>#[no_mangle] pub extern fn test_u8(p: u8) -> u8 { p } #[no_mangle] pub extern fn test_u16(p: u16) -> u16 { p } #[no_mangle] pub extern fn test_u32(p: u32) -> u32 { p } #[no_mangle] pub extern fn test_i...
//Integer marshaling
<|file_name|>GWTUserConfig.java<|end_file_name|><|fim▁begin|>/**<|fim▁hole|> * OpenKM, Open Document Management System (http://www.openkm.com) * Copyright (c) 2006-2017 Paco Avila & Josep Llort * <p> * No bytes were intentionally harmed during the development of this application. * <p> * This program is free soft...
<|file_name|>ru_RU.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from .base import * # noqa # don't use an unicode string localeID = 'ru_RU' dateSep = ['-', '.'] timeSep = [':'] meridian = [] usesMeridian = False uses24 = True Weekdays = [ 'понедельник', 'вторник...
<|file_name|>regress-474771.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public<|fim▁hole|> * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one...
<|file_name|>cover.py<|end_file_name|><|fim▁begin|>"""Support for MySensors covers.""" from homeassistant.components import mysensors from homeassistant.components.cover import ATTR_POSITION, DOMAIN, CoverEntity from homeassistant.const import STATE_OFF, STATE_ON async def async_setup_platform(hass, config, async_add...
)
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from crispy_forms.helper import FormHelper from crispy_forms.layout import Fieldset, Layout from django import forms from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.contrib.auth.password_validation import...
u.save() usuario.save() return usuario
<|file_name|>Errors.py<|end_file_name|><|fim▁begin|><|fim▁hole|> pass<|fim▁end|>
class RepeatError(ValueError): pass class NoneError(ValueError):
<|file_name|>calculate_energy_new_coords_general.py<|end_file_name|><|fim▁begin|>import os,sys from trans_rot_coords import * import numpy as np from read_energy_force_new import * from grids_structures_general import DS,Grid_Quarts from orient_struct_2 import OrientDS as OrientDS_2 from orient_struct_3 import OrientDS...
if abs(ang-np.pi)<cut: ax = [1,0,0] else: ax = get_normal(vec, ax0) for i in range(self.natoms):
<|file_name|>CreativeTabBCT.java<|end_file_name|><|fim▁begin|>package com.calebmeyer.bettercrafting.creativetab; import com.calebmeyer.bettercrafting.constants.Project; import com.calebmeyer.bettercrafting.initialization.ModItems; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public ...
<|file_name|>EntityRef.java<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////// // JIST (Java In Simulation Time) Project // Timestamp: <EntityRef.java Sun 2005/03/13 11:10:16 barr rimbase.rimonbarr.com> // // Copyright (C) 2004 by Cornell University // All rights reserved. // Refer to LICE...
* Controller and Entity IDs. *
<|file_name|>api.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .httpclient import HTTPClient from .models import Video, Show __all__ = ['Funimation'] class Funimation(object): def __init__(self): super(Funimation, self).__init__() self.http = HTTPClient('http://www.funimation.com...
<|file_name|>light_controller.py<|end_file_name|><|fim▁begin|>import dmx import socket wash = dmx.EuroliteMovingHeadWash(base=1, color=(1, 1, 1), intensity=1) controller = dmx.DMXController(debug=True, fixtures=[wash], port='/dev/tty.usbmodem1421') controller.enabled = True server = socket.socket(socket.AF_INET, soc...
wash.color = (rgb >> 16) / 255., ((rgb >> 8) & 0xff) / 255., (rgb & 0xff) / 255. elif command == 'tilt': wash.tilt = int(argument) elif command == 'pan':
<|file_name|>tcp_message.py<|end_file_name|><|fim▁begin|>""" tcp_message Inline Script Hook API Demonstration ------------------------------------------------ * modifies packets containing "foo" to "bar" * prints various details for each packet. example cmdline invocation: mitmdump -T --host --tcp ".*" -q -s examples...
from mitmproxy.utils import strutils def tcp_message(tcp_msg):
<|file_name|>nodejs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2016 DIANA-HEP # # 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/LI...
import json import subprocess import tempfile
<|file_name|>APIMaker.ts<|end_file_name|><|fim▁begin|>import { isNumber } from "util"; import axios, { AxiosRequestConfig } from 'axios'; export interface SMethod { Name: string fnName: string QueryParameters: any[] PathParameters: any[] HeaderParameters: any[] RequiredArgs: number TotalArgs: number Verb:string...
<|file_name|>hr.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ CKEDITOR.plugins.setLang( 'colorbutton', 'hr', { auto: 'Automatski', bgColorTitle: 'Boja pozadine', color...
'F39C12': 'Narančasta', 'E67E22': 'Mrkva',
<|file_name|>AmendmentRequests.js<|end_file_name|><|fim▁begin|>/** GaiaEHR (Electronic Health Records) Copyright (C) 2013 Certun, LLC. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either vers...
<|file_name|>suffix.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {Directive} from '@angular/core'; <|fim▁hole|>}) export cl...
/** Suffix to be placed at the end of the form field. */ @Directive({ selector: '[matSuffix]',
<|file_name|>authentication.js<|end_file_name|><|fim▁begin|>const express = require('express'); const router = express.Router(); const bodyParser = require('body-parser'); const { validateSignInForm, isLoggedIn } = require('../middlewares/validation'); const { signOutUser } = require('../../models/helper-functions'); ...
res.render('sign-up', { error: false }); });
<|file_name|>edwards_fah_2013a.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # The Hazard Library # Copyright (C) 2013-2014, GEM Foundation # # This program 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...
from openquake.hazardlib.gsim.edwards_fah_2013a_coeffs import ( COEFFS_ALPINE_60Bars, COEFFS_ALPINE_10Bars,
<|file_name|>q-longStack-after.js<|end_file_name|><|fim▁begin|>var Q = require("q")<|fim▁hole|>Q.longStackSupport = true function a() { Q.delay(100).done(b) } function b() { throw new Error("foo") } a() // Error: foo // at b (/path/to/snippets/q-longStack-after.js:5:22) // From previous event: // at a (/path...
<|file_name|>generic-unique.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
<|file_name|>main.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; import { Router, ActivatedRouteSnapshot, NavigationEnd, RoutesRecognized } from '@angular/router'; import { Title } from '@angular/platform-browser'; import { StateStorageService } from '../../shared'; @Comp...
<|file_name|>query-milestones.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3 import argparse as ap import shared ACTIONS = dict() def action(key): def wrapper(function): ACTIONS[key] = function return function return wrapper def get_closed_issues(repo, milestone): issues_and_prs ...
prs_only = [i for i in issues_and_prs if i.pull_request is not None] return prs_only
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>// Recap: The Rules of References // 1. At any time, you can have *either* but not both of: // a. One mutable reference // b. Any number of immutable references // 2. References must always be valid. fn main() { references(); mutable_references(); mut...
// The following function compiles fine
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function (grunt) { "use strict"; grunt.initConfig({ dirs: { css: 'app/css', js: 'app/js', sass: 'app/sass', }, compass: { dist: { options: { config: 'config.rb', } } }, ...
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>#![feature(core)] #![feature(path_ext)] extern crate eve; extern crate getopts; extern crate url; extern crate core; use std::thread; use std::env; use std::fs::PathExt; use getopts::Options; use std::net::SocketAddr; use core::str::FromStr; use eve::server; use ev...
#[allow(dead_code)] fn main() {
<|file_name|>patch-buildtools_wafsamba_samba__conftests.py<|end_file_name|><|fim▁begin|>$NetBSD: patch-buildtools_wafsamba_samba__conftests.py,v 1.2 2019/11/10 17:01:58 adam Exp $ Ensure defines are strings to avoid assertion failure, some returned values are unicode. --- buildtools/wafsamba/samba_conftests.py.orig 2...
if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1', define,
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Generated by typings // Source: https://raw.githubusercontent.com/typed-typings/npm-assertion-error/105841317bd2bdd5d110bfb763e49e482a77230d/main.d.ts declare module '~chai~assertion-error' { // Type definitions for assertion-error 1.0.0 // Project: https://github...
declare module 'chai/lib/Assertion' {
<|file_name|>custom-adapters.component.spec.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common';<|fim▁hole|>import { MatMenuModule } from '@angular/material/menu'; import { MatTableModule } from '@angular/material/table'; import { MatToolbarModule } from '@angular/material/toolbar'; import { ...
import { NO_ERRORS_SCHEMA } from '@angular/core'; import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon';
<|file_name|>celeba_formatting.py<|end_file_name|><|fim▁begin|># Copyright 2016 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.apache.org/...
<|file_name|>torrent.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. import sys import datetime from core.transmissionrpc.constants import PRIORITY, RATIO_LIMIT, IDLE_LIMIT from core.transmissionrpc.utils import ...
eta = self._fields['eta'].value
<|file_name|>GLPlatformContext.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2012 Intel Corporation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code...
{ return true; }
<|file_name|>reportview.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """build query for doclistview and return results""" import frappe, json import frappe.permissions from frappe.model.db_qu...
@frappe.whitelist() def get_filter_dashboard_data(stats, doctype, filters=[]): """get tags info"""
<|file_name|>constellation.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ //! The `Constellation`, Servo's Grand Central Station ...
<|file_name|>test_unix_echo_server.rs<|end_file_name|><|fim▁begin|>use mio::*; use mio::unix::*; use bytes::{Buf, ByteBuf, MutByteBuf, SliceBuf}; use mio::util::Slab; use std::path::PathBuf; use std::io; use tempdir::TempDir; const SERVER: Token = Token(0); const CLIENT: Token = Token(1); struct EchoConn { sock: ...
if events.is_writable() { match token {
<|file_name|>pipe.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # pipe.py # # Copyright 2014 Giorgio Gilestro <gg@kozak> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free ...
return True except:
<|file_name|>index.js<|end_file_name|><|fim▁begin|>export default { name: 'help-view', data() { return {<|fim▁hole|> } }, methods: { } }<|fim▁end|>
<|file_name|>wsgi.py<|end_file_name|><|fim▁begin|>""" WSGI config for sitefinder_project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJAN...
if settings.DEBUG:
<|file_name|>exportevents.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (c) 2012-2013 Turbulenz Limited from logging import basicConfig, CRITICAL, INFO, WARNING import argparse from urllib3 import connection_from_url from urllib3.exceptions import HTTPError, SSLError from simplejson import loads a...
parser.add_argument("-w", "--overwrite", action="store_true", help="if a file to be downloaded exists in the output directory, " \ "overwrite instead of skipping it") parser.add_argument("--indent", action="store_true", help="apply indentation to the JSON out...
<|file_name|>advanced.js<|end_file_name|><|fim▁begin|>var Notify = require('../'); var notifier = new Notify(); notifier.notify({ "title": "Phil Coulson", "subtitle": "Agent of S.H.I.E.L.D.", "message": "If I come out, will you shoot me? 'Cause then I won't come out.", "sound": "Funk", // case sensitive "app...
"contentImage": __dirname + "/coulson.jpg", "open": "file://" + __dirname + "/coulson.jpg"
<|file_name|>upgrade.rs<|end_file_name|><|fim▁begin|>use header::{Header, HeaderFormat}; use std::fmt; use std::str::FromStr; use header::parsing::{from_comma_delimited, fmt_comma_delimited}; use unicase::UniCase; use self::Protocol::{WebSocket, ProtocolExt}; /// The `Upgrade` header. #[derive(Clone, PartialEq, Debug...
<|file_name|>Controlador_Conductor.java<|end_file_name|><|fim▁begin|>/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor.<|fim▁hole|>import proyectomio.accesoDatos.Controlador_BD; import proye...
*/ package proyectomio.controlador.operaciones;
<|file_name|>action.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Inforevealer # Copyright (C) 2010 Francois Boulogne <fboulogne at april dot org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Soft...
def CompleteReportAsRoot(run_as,tmp_configfile,gui=False):
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>use std::ops::Deref; use std::any::Any; use glium::Display; use timer::Ms; use render::Renderer; pub use glium::glutin::Event as WindowEvent; pub enum Event { Window (WindowEvent), Message (String), Something (String, Box<Any>), } pub struct EventStrea...
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Copyright 2013, 2014 Canonical Ltd. // Licensed under the LGPLv3, see LICENCE file for details. /* [godoc-link-here] The juju/errors provides an easy way to annotate errors without losing the orginal error context. The exported `New` and `Errorf` functions are desi...
yougam/libraries/juju/errors/annotation_test.go:197:
<|file_name|>pt.js<|end_file_name|><|fim▁begin|><|fim▁hole|>CKEDITOR.plugins.setLang( 'pagebreak', 'pt', { alt: 'Quebra de página', toolbar: 'Inserir quebra de página' } );<|fim▁end|>
/* Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */
<|file_name|>prf.py<|end_file_name|><|fim▁begin|># This file is part of Scapy # Copyright (C) 2007, 2008, 2009 Arnaud Ebalard # 2015, 2016, 2017 Maxence Tury # This program is published under a GPLv2 license """ TLS Pseudorandom Function. """ from __future__ import absolute_import from scapy.error import warning from...
md5 = _tls_hash_algs["MD5"]() sha1 = _tls_hash_algs["SHA"]()
<|file_name|>endpoint-manager.ts<|end_file_name|><|fim▁begin|>import {autoinject, bindable, child, children} from 'aurelia-framework'; import {CoreApiService} from '../../services/api/core-api-service'; import {ApiForm} from '../../services/api/form/api-form'; import {CoreApiModel} from '../../services/api/models/core-...
@child('[slot=form]') formControl: ApiForm<CoreApiModel>;
<|file_name|>jizhidezy.py<|end_file_name|><|fim▁begin|>#coding=utf-8 from PIL import Image#需要pillow库 import glob, os in_dir ='background'#源图片目录 out_dir = in_dir+'_out'#转换后图片目录 if not os.path.exists(out_dir): os.mkdir(out_dir) <|fim▁hole|>def main(): for files in glob.glob(in_dir+'/*'): filepath,filename = o...
#图片批处理
<|file_name|>nailgun_client.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, ...
try:
<|file_name|>mqtt.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2016 """ Publish and subscribe to MQTT messages. Additional information at http://mqtt.org and http://ibmstreams.github.io/streamsx.messaging """ from future.builtins import * from streamsx....
<|file_name|>stage-details-test.js<|end_file_name|><|fim▁begin|>import { moduleForComponent, test } from 'ember-qunit'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('stage-details', 'Integration | Component | stage details', {<|fim▁hole|>}); test('it renders', function(assert) { assert.expect(2)...
integration: true
<|file_name|>jaccard_similarity.py<|end_file_name|><|fim▁begin|>""" The Jaccard similarity coefficient is a commonly used indicator of the similarity between two sets. Let U be a set and A and B be subsets of U, then the Jaccard index/similarity is defined to be the ratio of the number of elements of their intersection...
the book Mining of Massive Datasets [MMDS 2nd Edition, Chapter 3]
<|file_name|>popup.js<|end_file_name|><|fim▁begin|>setTimeout(function() { $('.color-box').colpick({ layout:'hex', submit:0, colorScheme:'dark', onChange:function(hsb,hex,rgb,el,bySetColor) { $(el).css('background','#'+hex); // Fill the text box just if the co...
}); $("a.win-edit").click(function () {
<|file_name|>rtl8139.rs<|end_file_name|><|fim▁begin|>use alloc::boxed::Box; use arch::memory; use collections::slice; use collections::string::ToString; use collections::vec::Vec; use collections::vec_deque::VecDeque; use core::ptr; use common::debug; use drivers::pci::config::PciConfig; use drivers::io::{Io, Pio}...
outbound: VecDeque::new(), txds: Vec::new(), txd_i: 0,
<|file_name|>InputErrorSuffix.js<|end_file_name|><|fim▁begin|>import React from 'react'; import PropTypes from 'prop-types'; import Tooltip from '../Tooltip'; import SvgExclamation from '../svg/Exclamation.js'; import styles from './Input.scss'; class InputErrorSuffix extends React.Component { render() { return...
dataHook="input-tooltip" disabled={this.props.errorMessage.length === 0}
<|file_name|>NatsComponentConfigurer.java<|end_file_name|><|fim▁begin|>/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.nats; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.spi...
case "lazyStartProducer": return target.isLazyStartProducer(); case "servers": return target.getServers(); case "useglobalsslcontextparameters": case "useGlobalSslContextParameters": return target.isUseGlobalSslContextParameters();
<|file_name|>http_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 https://mozilla.org/MPL/2.0/. */ use crate::fetch; use crate::fetch_with_context; use cra...
<|file_name|>chance.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 OpenStack Foundation # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under th...
hosts = self._filter_hosts(request_spec, hosts, filter_properties) if not hosts:
<|file_name|>test_rowcount.py<|end_file_name|><|fim▁begin|>from sqlalchemy import * from test.lib import * class FoundRowsTest(fixtures.TestBase, AssertsExecutionResults): """tests rowcount functionality""" __requires__ = ('sane_rowcount', ) @classmethod def setup_class(cls): global employee...
('Chris', 'C') ] i = employees_table.insert() i.execute(*[{'name':n, 'department':d} for n, d in data])
<|file_name|>gunicorn_config.py<|end_file_name|><|fim▁begin|># Refer to the following link for help: # http://docs.gunicorn.org/en/latest/settings.html command = '/home/lucas/www/reddit.lucasou.com/reddit-env/bin/gunicorn' pythonpath = '/home/lucas/www/reddit.lucasou.com/reddit-env/flask_reddit' bind = '127.0.0.1:8040'...
accesslog = '/home/lucas/logs/reddit.lucasou.com/gunicorn-access.log' errorlog = '/home/lucas/logs/reddit.lucasou.com/gunicorn-error.log'
<|file_name|>L0FailsIfThereIsMkdirError.ts<|end_file_name|><|fim▁begin|>import fs = require('fs'); import mockanswer = require('azure-pipelines-task-lib/mock-answer'); import mockrun = require('azure-pipelines-task-lib/mock-run'); import path = require('path'); let taskPath = path.join(__dirname, '..', 'copyfiles.js')...
runner.registerMockExport('mkdirP', (p: string) => {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" KeepNote Extension new_file Extension allows adding new filetypes to a notebook<|fim▁hole|># # KeepNote # Copyright (c) 2008-2011 Matt Rasmussen # Author: Matt Rasmussen <rasmus@mit.edu> # # This program is free software; you can redistribute it...
"""
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(inclusive_range_syntax)] #![cfg_attr(test, feature(test))] #[cfg(test)] <|fim▁hole|>pub mod search; pub mod sort; pub mod data_structures;<|fim▁end|>
extern crate test; pub mod math; pub mod select;
<|file_name|>Draw.hpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2015 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or modify it...
*/ class WndOwnerDrawFrame : public PaintWindow { public: typedef void (*OnPaintCallback_t)(Canvas &canvas, const PixelRect &rc);
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # # <|fim▁hole|># This program 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 of the...
# Copyright (c) 2008 University of Dundee. #
<|file_name|>0006_auto_20150612_2307.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models, migrations <|fim▁hole|> class Migration(migrations.Migration): dependencies = [ ('entries', '0005_resultsmode_json'), ] operations = [ migrations.AlterField( ...
<|file_name|>cte.js<|end_file_name|><|fim▁begin|>'use strict'; const { expect } = require('chai'); const { getParsedSql } = require('./util'); describe('common table expressions', () => { it('should support single CTE', () => { const sql = ` WITH cte AS (SELECT 1) SELECT * FROM cte...
it('should support CTE with multiple columns', () => {
<|file_name|>value.rs<|end_file_name|><|fim▁begin|>use crate::ast::InputValue; use crate::{ parser::{ParseError, ParseResult, Parser, ScalarToken, SourcePosition, Spanning, Token}, schema::{<|fim▁hole|> meta::{InputObjectMeta, MetaType}, model::SchemaType, }, value::ScalarValue, }; pub ...
<|file_name|>core-export-f64-sqrt.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.apach...
// Regression test that f64 exports things properly pub fn main() {
<|file_name|>api-endpoints.js<|end_file_name|><|fim▁begin|>module.exports = function (client) { const baseUrl = '/api-endpoints/';<|fim▁hole|> .send(endpointConfig) .then(res => res.body); }, update (name, endpointConfig) { return this.create(name, endpointConfig); }, remove (name...
return { create (name, endpointConfig) { return client .put(`${baseUrl}${encodeURIComponent(name)}`)
<|file_name|>io-queue.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|>size 3654<|fim▁end|>
oid sha256:5f5740cfcc24e2a730f7ea590ae0dc07d66d256fd183c46facf3fdfeb0bd69d2
<|file_name|>unix.rs<|end_file_name|><|fim▁begin|>#![cfg(any( target_os = "linux", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", ))] use crate::platform::ContextTraitExt; pub use crate::platform_impl::{HeadlessContextExt, RawContextExt, RawHandle}; use...
unsafe fn get_egl_display(&self) -> Option<*const raw::c_void> { self.context.get_egl_display()
<|file_name|>services_test.go<|end_file_name|><|fim▁begin|>package services import ( "github.com/stretchr/testify/assert" "testing" ) func ReadJsonConfFileServiceTest(t *testing.T) { confFilename := "../testdata/fixtures/system.json" f, _ := ReadJsonConfFileService(confFilename) if len(f.Files) < 1 { t.Fatal...
var actual string = "" for i := 0; i < len(f.Files); i++ {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! //! A binding for the library `SDL2_gfx` //! //! //! Note that you need to build with the //! feature `gfx` for this module to be enabled, //! like so: //! //! ```bash //! $ cargo build --features "gfx" //! ``` //! //! If you want to use this with from inside your ow...
//! //! ```toml //! [dependencies.sdl2]
<|file_name|>roman_numerals3.py<|end_file_name|><|fim▁begin|># https://www.codewars.com/kata/roman-numerals-encoder/train/python def solution(n): # Print the arguments print('n = {}'.format(n)) roman_blueprint = [] # List of lists to store format structure: [[<letter>, <count>], ...] result = [] # Store the fin...
if (count >= 0): # If we have M's
<|file_name|>0082_global_disaggregations_data_migration.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.5 on 2019-12-26 20:45 from django.db import migrations, models import django.db.models.deletion def non_reversible_migration(apps, schema_editor): """Operation to "reverse" an unreversible change""" ...
try:
<|file_name|>gc_engine.py<|end_file_name|><|fim▁begin|># -*- encoding: UTF-8 -*- import re import sys import os import traceback from ..ibdawg import IBDAWG from ..echo import echo from . import gc_options __all__ = [ "lang", "locales", "pkg", "name", "version", "author", \ "load", "parse", "getDictiona...
m = _zPrevWord.search(s[:iEnd]) if not m:
<|file_name|>42. Trapping rain water.py<|end_file_name|><|fim▁begin|>class Solution(object): def trap(self, height): """ :type height: List[int] :rtype: int """ l=len(height) maxheight=[0 for i in range(l)] leftmax=0 rightmax=0 res=0 fo...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|> 'start': start, 'finish': finish, 'switch': switch, # 'publish': publish, }<|fim▁end|>
from gitbarry.reasons import start, finish, switch # , switch, publish REASONS = {
<|file_name|>tc.gam.widget-visibility-handler.js<|end_file_name|><|fim▁begin|>/*-------------------------------------------------------------------- Copyright (c) 2011 Local Projects. All rights reserved. Licensed under the Affero GNU GPL v3, see LICENSE for more details. ------------------------------------------...
self._setHash('show,home'); };
<|file_name|>connection.rs<|end_file_name|><|fim▁begin|>use libc; use std::{mem, net, ptr}; use std::io::{Error, Result}; use std::cell::RefCell; use std::ops::Deref; use Event; use socket; pub struct Connection { pub client_fd: i32, pub client_addr: net::SocketAddr,<|fim▁hole|> pub read_size: usize, ...
pub client_addr_len: u32, pub accept_total: usize,
<|file_name|>neighs_info.py<|end_file_name|><|fim▁begin|>""" neighs information ------------------ Auxiliar class in order to manage the information of the neighbourhood returned by the retrievers. Due to the complexity of the structure it is convenient to put altogether in a single class and manage in a centralized wa...
`k`. The standards to set that information are: * [(neighs{any form}, sp_relative_pos{any form})]
<|file_name|>list_box.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (5c017c9) from gir-files (71d73f0) // DO NOT EDIT #[cfg(feature = "v3_10")] use Adjustment; use Container; #[cfg(feature = "v3_10")] use ListBoxRow; use MovementStep; use SelectionMode; use Widget; use ffi; use glib; use glib::Valu...
fn connect_move_cursor<F: Fn(&Self, MovementStep, i32) + 'static>(&self, f: F) -> u64 { unsafe { let f: Box_<Box_<Fn(&Self, MovementStep, i32) + 'static>> = Box_::new(Box_::new(f));
<|file_name|>filter.rs<|end_file_name|><|fim▁begin|>use crate::fmt; use crate::iter::{adapters::SourceIter, FusedIterator, InPlaceIterable}; use crate::ops::Try; /// An iterator that filters the elements of `iter` with `predicate`. /// /// This `struct` is created by the [`filter`] method on [`Iterator`]. See its /// ...
{ #[inline] fn next_back(&mut self) -> Option<I::Item> { self.iter.rfind(&mut self.predicate)
<|file_name|>XDwgDirectReader.cpp<|end_file_name|><|fim▁begin|>// XDwgDirectReader.cpp: implementation of the XDwgDirectReader class. // ////////////////////////////////////////////////////////////////////// #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "atlb...
// ´´½¨ Blocknumber £¬¼Ç¼ÿ¸öBlock±àºÅ ipField.CreateInstance(CLSID_Field); ipFieldEdit = ipField;
<|file_name|>methods-are-with-self-type.rs<|end_file_name|><|fim▁begin|>// Currently, all generic functions are instantiated in each codegen unit that // uses them, even those not marked with #[inline], so this test does not make // much sense at the moment. // ignore-test // // We specify incremental here because we ...
}