prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Slider.js<|end_file_name|><|fim▁begin|>(function ($, scope, undefined) { function NextendSmartSlider() { this.sliders = {}; this.readys = {}; this._resetCounters = []; } NextendSmartSlider.prototype.makeReady = function (id, slider) { <|fim▁hole|> fo...
this.sliders[id] = slider; if (typeof this.readys[id] !== 'undefined') {
<|file_name|>tryInfo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # pyCream - CREAM Client API Python # # Copyright (C) 2010, 2011 Maciej Sitarz # # Written by Maciej Sitarz # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
#
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from distutils.core import setup import sys import py2exe try: scriptName = sys.argv[3] except IndexError: print "Usage: python setup.py py2exe -i nombreApp" sys.exit(2) # Para crear el exe hay que ir al cmd y correr python setup.py py2e...
options={"py2exe": {"bundle_files": 1}}, zipfile=None,
<|file_name|>imagebackend.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Grid Dynamics # 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 ...
__imagebackend_opts = [
<|file_name|>underscore.js<|end_file_name|><|fim▁begin|><|fim▁hole|>version https://git-lfs.github.com/spec/v1 oid sha256:b63ef97b9f85b0d4a07926b186083c9952568e26bbb65d610b592d15208f79a9 size 24953<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#### PATTERN | WEB ################################################################################# # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac....
<|file_name|>gist.model.ts<|end_file_name|><|fim▁begin|>export interface Gist { url: string; forks_url: string; commits_url: string; id: string; node_id: string; git_pull_url: string; git_push_url: string; html_url: string; files: any;<|fim▁hole|> updated_at: Date; description...
public: boolean; created_at: Date;
<|file_name|>combined_open_ended_module.py<|end_file_name|><|fim▁begin|>import logging from lxml import etree from pkg_resources import resource_string from xmodule.raw_module import RawDescriptor from .x_module import XModule from xblock.core import Integer, Scope, String, List, Float, Boolean from xmodule.open_ende...
"student_attempts", "ready_to_reset", "old_task_states"]
<|file_name|>61. Rotate List.py<|end_file_name|><|fim▁begin|># Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def rotateRight(self, head, k): """ :type head: ListNode :type k: int :rtype: ListNode """ if ...
k = k % listLen # now k < listLen if k == 0: return head
<|file_name|>f25-abort.rs<|end_file_name|><|fim▁begin|>/// Figure 10.25 Implementation of POSIX.1 abort /// /// Status: compiles, not tested yet (assuming this function will be /// used in the future in the book) extern crate libc; extern crate apue; use libc::{SIG_DFL, SIGABRT, SIG_IGN, SIG_SETMASK}; use libc::{siga...
// if we're here, process caught SIGABRT and returned
<|file_name|>tbe_pl.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pl" version="2.1"> <context> <name>AbstractPolyObjectFactory</name> <message> <location filename="../src/model/PolyObject.cpp" line="51"/> <source>Bowling Pin</source> <translation type="...
<|file_name|>tar_benchmark_test.go<|end_file_name|><|fim▁begin|>package tartest import ( "io" "io/ioutil" "os" "testing" upTar "archive/tar" ourTar "github.com/vbatts/tar-split/archive/tar" ) var testfile = "./archive/tar/testdata/sparse-formats.tar" func BenchmarkUpstreamTar(b *testing.B) { for n := 0; n <...
for { _, err := tr.Next() if err != nil {
<|file_name|>datatests.py<|end_file_name|><|fim▁begin|>import pymake.data, pymake.functions, pymake.util import unittest import re def multitest(cls): for name in cls.testdata.keys(): def m(self, name=name): return self.runSingle(*self.testdata[name]) setattr(cls, 'test_%s' % name, m)...
e1.appendstr('foo')
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>import os import logging import tornado.options as opt from motherbrain.base import conf from motherbrain.base.conf import get_config SITE_CONF = conf.site_conf(os.getcwd()) DATADIR = SITE_CONF.get('env.motherbrain_data', '/tmp') API_URL = SITE_CONF.get('env.api_url'...
'help': 'Configuration File'},
<|file_name|>djvubzzdec.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python2 # coding: utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2011, Anthon van der Neut <A.van.der.Neut@ruamel.eu>' # Copyright (C) 2...
(0x0547, 0x0000, 49, 43), # 227: p=0.028571 ( 2, 79) (0x481a, 0x0000, 230, 246), # 228: p=0.363634 ( 2, 1) (0x07e2, 0x0000, 45, 37), # 229: p=0.042682 ( 2, 52)
<|file_name|>subscriber_client.go<|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.apa...
<|file_name|>__init__.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 c...
<|file_name|>ctc_ops.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow 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 License at # # http://www.apache.or...
raise TypeError("Expected labels (first argument) to be a SparseTensor")
<|file_name|>shared_lock.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/. */ //! Different objects protected by the same lock #[cfg(f...
#[cfg(feature = "gecko")]
<|file_name|>Product.java<|end_file_name|><|fim▁begin|>package me.ronggenliu.dp.creation.builder; /** * Created by garliu on 2017/5/29. */ public class Product { private String partA; private String partB; private String partC; public String getPartA() { return partA; } public void setPartA(String ...
return partB; } public void setPartB(String partB) {
<|file_name|>TestResitiveNetwork-circuits.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 SWIPO Project # # Authors (this file): # Stefan Schinkel <stefan.schinkel@gmail.com> """ Provides sanity checks for basic for parallel and serial circiuts. """ import numpy as...
# %.1f values for resistance val = np.round(np.random.ranf(len(i))*100)/10
<|file_name|>glutinteractivecontext.py<|end_file_name|><|fim▁begin|>"""Interactive context using the GLUT API (provides navigation support)""" from OpenGLContext import interactivecontext, glutcontext, context from OpenGLContext.move import viewplatformmixin from OpenGL.GLUT import * <|fim▁hole|>class GLUTInteractiveC...
<|file_name|>parse_ana_dump.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual pro...
<|file_name|>traversal_tests.py<|end_file_name|><|fim▁begin|>import graph from depth_first_search import depth_first_search from breadth_first_search import breadth_first_search <|fim▁hole|> start_vertex = G.get_vertex(0) breadth = breadth_first_search(G) breadth(G, start_vertex) depth = depth_first_search(G) ...
edges = [(0, 1), (0, 2), (0, 3), (1, 4), (1, 5), (2, 6), (2, 7), (3, 8), (3, 9), (4, 10), (4, 11)] G, _ = graph.create_graph(edges)
<|file_name|>computer_doctor_pane.py<|end_file_name|><|fim▁begin|>#coding: utf-8 # # Ailurus - a simple application installer and GNOME tweaker # # Copyright (C) 2009-2010, Ailurus developers and Ailurus contributors # Copyright (C) 2007-2010, Trusted Digital Technology Laboratory, Shanghai Jiao Tong University, China....
scroll.add(view)
<|file_name|>GetCatalogImportStatusRequestMarshaller.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. 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. A copy of t...
<|file_name|>Markov.py<|end_file_name|><|fim▁begin|>import numpy as np; np.set_printoptions(linewidth=40, precision=5, suppress=True) import pandas as pd; pd.options.display.max_rows=80;pd.options.display.expand_frame_repr=False;pd.options.display.max_columns=20 import pylab as plt; import os; home=os.pat...
plt.locator_params(nbins=3) pplt.annotate(r'$s={}$, $\nu_0=${}, $\tau$={}'.format(s, nu0, tau), loc=1, fontsize=fontsize) plt.xlabel('$s$')
<|file_name|>spec.js<|end_file_name|><|fim▁begin|>'use strict'; var assert = require('assert'), mongoose = require('mongoose'), mobgoose = require('../')(mongoose); var Foo = mongoose.model('Foo', new mongoose.Schema({}), 'foo_collection_name'); it('accepts configuration without url', function() { return m...
before(function() { return mobgoose({ host: 'localhost',
<|file_name|>exporting.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright: Damien Elmes <anki@ichi2.net> # Copyright © 2014 Roland Sieker <ospalh@gmail.com> # # License: GNU AGPL, version 3 or later; # http://www.gnu.org/licenses/agpl.html import os import re import shutil import zipfile from . impor...
def removeSystemTags(self, tags): return self.src.tags.remFromStr("marked leech", tags)
<|file_name|>AnalyzeController.js<|end_file_name|><|fim▁begin|>/** AnalyzeController.js */ application.controller('AnalyzeController', ['$scope', '$stateParams', 'PathService', function ($scope, $stateParams, PathService) { $scope.path = {}; <|fim▁hole|> EntityId: $stateParams.submissionId }) .s...
PathService.path({ Type: "SUBMISSION",
<|file_name|>bill_of_materials.pb.go<|end_file_name|><|fim▁begin|>// Code generated by protoc-gen-go. DO NOT EDIT. // source: google/devtools/containeranalysis/v1alpha1/bill_of_materials.proto package containeranalysis // import "google.golang.org/genproto/googleapis/devtools/containeranalysis/v1alpha1" import proto ...
var fileDescriptor_bill_of_materials_ffdc7b89323081b5 = []byte{
<|file_name|>env_to_xml.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os from AhsayTools import XmlConf, env_true, env_false # Map Enviroment Variables to server.xml > Xpath > attibute server_conf = XmlConf("/rdr/conf/server.xml") server_conf.set_attrib("Service/Connector", "port", "RDR_HTTP_PORT") server...
namespace = "http://java.sun.com/xml/ns/j2ee" elem = "security-constraint"
<|file_name|>DataModule.ts<|end_file_name|><|fim▁begin|>import Express = require("express"); import Geohash = require("latlon-geohash"); import Nconf = require("nconf"); import Path = require("path"); import * as multer from "multer"; import { Picnic } from "../../models/Picnic"; import { User } from "../../models/Us...
<|file_name|>StanfordPOStagging.py<|end_file_name|><|fim▁begin|>from bs4 import BeautifulSoup import httplib, codecs, datetime import cPickle as pickle import time def stan_tag(criteria, server): tagged = [] file_count = 47 for ix, c in enumerate(criteria[2250000:]): # initialize list of sentences ...
def main(): server = httplib.HTTPConnection('127.0.0.1:2020') criteria = codecs.open('data/stanford_sentence_list.csv','r').readlines()
<|file_name|>renderer.rs<|end_file_name|><|fim▁begin|>extern crate raster; use std::collections::LinkedList; use std::cell::RefCell; use std::rc::Rc; use geometric::Geometric2D; pub struct Renderer<'a> { vertices: LinkedList<&'a Rc<RefCell<Box<Geometric2D>>>>, image: raster::Image } impl<'a> Renderer<'a> {<|...
//Construct a new Renderer pub fn new(height: i32, width: i32) -> Renderer<'a> {
<|file_name|>oauth_web.rs<|end_file_name|><|fim▁begin|>extern crate rusthub; use std::process::Command; use rusthub::oauth_web; #[test] #[ignore] fn create_authorization() {<|fim▁hole|> "aaaaaaaaaxaaaaaaaaaxaaaaaaaaaxaaaaaaaaax".to_string(), 60 ); match result { Some(token) => println!(...
let result = oauth_web::capture_authorization( "aaaaaaaaaxaaaaaaaaax".to_string(),
<|file_name|>oop6a.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 class Employee: num_of_emps = 0 raise_amount = 1.04 def __init__(self,first,last): self.first = first self.last = last self.email = first + '.' + last + '@kellynoah.com' def fullname(self): re...
return '{} - {}'.format(self.fullname(), self.email) def __add__(self, other): return self.pay + other.pay
<|file_name|>arris_scraper.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>import BeautifulSoup import requests import time cm_time_format = '%a %Y-%m-%d %H:%M:%S' def get_status(baseurl): # Retrieve and process the page from the modem url = baseurl + 'status_cgi' pagedata = requests.get(...
# A library to scrape statistics from Arris CM820 and similar cable modems # Inspired by https://gist.github.com/berg/2651577
<|file_name|>sip_domains_example.py<|end_file_name|><|fim▁begin|>from zang.exceptions.zang_exception import ZangException from zang.configuration.configuration import Configuration from zang.connectors.connector_factory import ConnectorFactory from zang.domain.enums.http_method import HttpMethod from docs.examples.cre...
try: aclLists = sipDomainsConnector.listMappedIpAccessControlLists( 'TestDomainSid')
<|file_name|>TileEntityPresentRenderer.java<|end_file_name|><|fim▁begin|>package com.gildedgames.aether.client.renderer.tile_entities; import com.gildedgames.aether.client.models.entities.tile.ModelPresent; import com.gildedgames.aether.common.items.blocks.ItemBlockPresent; import com.gildedgames.aether.common.tiles.T...
if (present != null) {
<|file_name|>createTextMaskInputElement.spec.js<|end_file_name|><|fim▁begin|>require('babel-core/register')({plugins: ['babel-plugin-rewire']}) import packageJson from '../package.json' import conformToMask from '../src/conformToMask' import {placeholderChar} from '../src/constants' const createTextMaskInputElement =...
// change the mask
<|file_name|>issue-3953.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
}
<|file_name|>TalkEvent.java<|end_file_name|><|fim▁begin|>package com.nhpatt.myconference.entities; import com.google.gson.JsonArray; /** * @author Javier Gamarra */ public class TalkEvent { private final JsonArray talks; public TalkEvent(JsonArray talks) { this.talks = talks; } public Json...
return talks;
<|file_name|>test_latex.py<|end_file_name|><|fim▁begin|>from sympy import ( Abs, Chi, Ci, CosineTransform, Dict, Ei, Eq, FallingFactorial, FiniteSet, Float, FourierTransform, Function, Integral, Interval, InverseCosineTransform, InverseFourierTransform, InverseLaplaceTransform, InverseMellinTransform, I...
assert latex(Gamma * lmbda) == r"\Gamma \lambda" assert latex(Symbol('q21')) == r"q_{21}"
<|file_name|>select-button.component.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2021 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/licen...
const item = this._menuData[index]; if (!item) return; this.selected.emit(item); };
<|file_name|>blocks.py<|end_file_name|><|fim▁begin|>import json import sys if sys.version_info >= (3, 0): from urllib.request import urlopen else: from urllib2 import urlopen class Blocks: def __init__(self): self.version = None self.block_hash = None def load_info(self, block_number...
print('Error trying to read: ' + url +\ ' / Try to open in a browser to see what the error is.')
<|file_name|>noImplicitThisBigThis.ts<|end_file_name|><|fim▁begin|>// @declaration: true // @noImplicitThis: true <|fim▁hole|> // https://github.com/microsoft/TypeScript/issues/29902 function createObj() { return { func1() { return this; }, func2() { return...
<|file_name|>kv_delete.go<|end_file_name|><|fim▁begin|>package del import ( "flag" "fmt" "github.com/hashicorp/consul/api" "github.com/hashicorp/consul/command/flags" "github.com/mitchellh/cli" ) func New(ui cli.Ui) *cmd { c := &cmd{UI: ui} c.init() return c } type cmd struct { UI cli.Ui flags ...
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""Support for interface with a Gree climate systems.""" from __future__ import annotations from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, ...
@property def is_on(self) -> bool: """Return if the light is turned on."""
<|file_name|>lowest-common-ancestor-of-a-binary-tree.cc<|end_file_name|><|fim▁begin|>/** * dfs 找 LCA. 只有一次查询,所以不需要 tarjan 或者 rmq * 个人感觉 rmq 好理解一些,dfs标号一下然后转化成区间最小值。( u v 之间最短路径上深度最小的节点) */ using namespace std; /** * Definition for a binary tree node. * struct TreeNode { * int val;<|fim▁hole|> * }; */ clas...
* TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {}
<|file_name|>layerwidget_test.py<|end_file_name|><|fim▁begin|>############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is...
# See the files LICENSE.lgpl2 and LICENSE.lgpl3 for full text of the # GNU Lesser General Public License version 2.1 and 3 respectively.
<|file_name|>subcontractArrivalReject.routing.ts<|end_file_name|><|fim▁begin|>import { Routes, RouterModule } from '@angular/router'; import { SubcontractArrivalReject } from './subcontractArrivalReject.component'; import { SubcontractArrivalRejectForm } from './components/subcontractArrivalRejectForm/subcontractArriv...
] } ];
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .models import User<|fim▁hole|><|fim▁end|>
from .views import user from .constants import USER_ROLE, ADMIN, USER, USER_STATUS, NEW, ACTIVE
<|file_name|>CustomConnectorDestinationProperties.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/appflow/model/CustomConnectorDestinationProperties.h> #include <aws/core/utils/json/JsonSerializer.h> ...
{ m_errorHandlingConfig = jsonValue.GetObject("errorHandlingConfig");
<|file_name|>lr0.rs<|end_file_name|><|fim▁begin|>//! This module builds the LR(0) state machine for a given grammar. //! //! The state machine represents the state of the parser of the grammar, as tokens are produced by //! the lexer. (The details of the lexer are out of scope; for our purposes, all that is relevant is...
for &rule in &derives[j] {
<|file_name|>Agencia.java<|end_file_name|><|fim▁begin|>/* * Globalcode - "The Developers Company" * * Academia do Java * */ public abstract class Agencia { private String numero; private Banco banco; /** * @param num * Numero da agencia * @param bc * banco ao...
} } }
<|file_name|>nodepp_rfb.cpp<|end_file_name|><|fim▁begin|>// The MIT License (MIT) // // Copyright (c) 2014-2017 Darrell Wright // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files( the "Software" ), to deal // in the Software without r...
std::fill( m_buffer.begin( ), m_buffer.end( ), 0 );
<|file_name|>test_templating.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ tests.templating ~~~~~~~~~~~~~~~~ Template functionality :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask import logging from jinja2 import ...
<|file_name|>loss_ops_test.py<|end_file_name|><|fim▁begin|># Copyright 2016 The TensorFlow 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 License at # # http://www.apa...
class MeanSquaredErrorTest(tf.test.TestCase):
<|file_name|>csm_notation.py<|end_file_name|><|fim▁begin|>""" This file: csm_notation.py Last modified: November 8, 2010 Package: CurlySMILES Version 1.0.1 Author: Axel Drefahl E-mail: axeleratio@yahoo.com Internet: http://www.axeleratio.com/csm/proj/main.htm Python mo...
lstErr = [] if cmp(sType,'smi') == 0:
<|file_name|>managers.py<|end_file_name|><|fim▁begin|>from django.contrib.sites import models as site_models from django.db import models def _get_current_site(request): # Attempts to use monodjango.middleware.SiteProviderMiddleware try: return Site.objects.get_current(request) except TypeError: ...
def get_default(self): return self.get(default=True)
<|file_name|>SavedSearchSelect.js<|end_file_name|><|fim▁begin|>SavedSearchSelect.$inject = ['session', 'savedSearch']; export function SavedSearchSelect(session, savedSearch) { return { link: function(scope) { savedSearch.getUserSavedSearches(session.identity).then(function(res) { ...
}
<|file_name|>MainContainer.js<|end_file_name|><|fim▁begin|>import { connect } from 'react-redux'; import Main from './Main'; import * as userActions from '../../state/user/userActions'; const mapStateToProps = (state, ownProps) => { return { activeTab: ownProps.location.pathname.split('/')[2] }; }; const mapD...
<|file_name|>test_support.py<|end_file_name|><|fim▁begin|>"""Supporting definitions for the Python regression tests.""" if __name__ != 'test_support': raise ImportError, 'test_support must be imported from the test package' import sys class Error(Exception): """Base class for regression test exceptions.""" ...
import threading
<|file_name|>e34d28e9a167_rename_documentpage.py<|end_file_name|><|fim▁begin|>"""rename documentpage Revision ID: e34d28e9a167 Revises: a5ccf5eaa73f Create Date: 2016-03-08 10:22:16.063105 """ from alembic import op # revision identifiers, used by Alembic. revision = 'e34d28e9a167' down_revision = 'a5ccf5eaa73f' d...
<|file_name|>extrainfo.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #-*-coding:utf8-*-<|fim▁hole|>import sys import re """ Version xml de cfdi 3.3 """ class CFDI(object): def __init__(self, f): """ Constructor que requiere en el parámetro una cadena con el nombre del cfdi. """...
from bs4 import BeautifulSoup as Soup #import pandas as pd import glob
<|file_name|>DefaultApi.java<|end_file_name|><|fim▁begin|>package io.swagger.client.api; import com.sun.jersey.api.client.GenericType; import io.swagger.client.ApiException; import io.swagger.client.ApiClient; import io.swagger.client.Configuration; import io.swagger.client.Pair; import io.swagger.client.model.CodeS...
.replaceAll("\\{" + "code_snippet_uuid" + "\\}", apiClient.escapeString(codeSnippetUuid.toString()));
<|file_name|>name_tag.go<|end_file_name|><|fim▁begin|>package restful import ( "github.com/Cepave/open-falcon-backend/common/gin/mvc" "github.com/Cepave/open-falcon-backend/common/model" dbOwl "github.com/Cepave/open-falcon-backend/common/db/owl" ) func listNameTags( p *struct { Value string `mvc:"quer...
p *struct {
<|file_name|>Skeleton.py<|end_file_name|><|fim▁begin|>from erukar.system.engine import Enemy, BasicAI from ..templates.Undead import Undead from erukar.content.inventory import Shortsword, Buckler from erukar.content.modifiers import Steel, Oak class Skeleton(Undead): ClassName = 'Skeleton' ClassLevel = 1 ...
'slashing': (0.15, 0)
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/**<|fim▁hole|>var React = require('react'); var Contact = require('./contact/app-catalog'); var Cart = require('./cart/app-cart'); var Router = require('react-router-component'); var CatalogDetail = require('./product/app-catalogdetail'); var Template = require('./app-t...
* Created by siddharthsharma on 5/21/16. */
<|file_name|>cartStore.js<|end_file_name|><|fim▁begin|>import Reflux from 'Reflux'; import cartActions from '../actions/cartActions.js'; import _ from 'lodash'; // Items to fill onFillCart action let items = [ { title: 'Iphone 12', price: '129', id: 1 }, { title: 'Galaxy S14', price: '119', ...
// trigger component state change this.trigger({items}); }, addItem (item) {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" gof.py gof stands for Graph Optimization Framework The gof submodule of theano implements a framework for manipulating programs described as graphs. The gof module defines basic theano graph concepts: -Apply nodes, which represent the application of an Op ...
from theano.gof.destroyhandler import \ DestroyHandler
<|file_name|>mysql.py<|end_file_name|><|fim▁begin|>import MySQLdb as _mysql from collections import namedtuple import re # Only needs to compile one time so we put it here float_match = re.compile(r'[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?$').match def is_number(string): return bool(float_match(string)) class MySQLData...
""" Here we'll try to connect to the database using the variables that we passed through
<|file_name|>ExecutionContext.java<|end_file_name|><|fim▁begin|>/* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required ...
public ExecutionEntity getProcessInstance() { return execution.getProcessInstance();
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod eddington;<|fim▁hole|> pub trait Properties { fn mass() -> f64; fn ang_momentum() -> f64; } pub use self::eddington::EddingtonFinkelstein; pub use self::polar_eddington::{NearPole0EF, NearPolePiEF};<|fim▁end|>
mod polar_eddington;
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># Django settings for example_project project. import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import django DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Justin Quick', 'justquick@gmail.com'), ) EN...
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/// <reference path="typings/tsd.d.ts" /> 'use strict'; var gutil = require('gulp-util'); var path = require("path"); var through = require('through2'); var beautylog = require("beautylog"); module.exports = function (options, logBool:boolean = false) { //handle ...
return cb(); };
<|file_name|>active.rs<|end_file_name|><|fim▁begin|>//! Active (fully-registered) client connection handling use irc; use irc::driver::Client; use irc::send::Sender; use world::World; /// An active client<|fim▁hole|> _out: Sender, nick: String, } impl Active { /// Creates a new `Active` pub fn new(wo...
pub struct Active { world: World,
<|file_name|>test_cerbero_packages_wix.py<|end_file_name|><|fim▁begin|># cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library Gen...
<|file_name|>Container.ts<|end_file_name|><|fim▁begin|>import { Registration } from "./Models"; export class Container { private registrations: Array<Registration> = []; private createInstance<T extends object>(classType: {new (): T} | Function): T { return Reflect.construct(classType, []);<|fim▁hole|...
}
<|file_name|>user.hpp<|end_file_name|><|fim▁begin|>// Copyright Aleksey Gurtovoy 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Sour...
#define BOOST_NO_CONFIG
<|file_name|>TemplatesApiResource.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to...
<|file_name|>perspective_lab.py<|end_file_name|><|fim▁begin|>from image_mat_util import * from mat import Mat from vec import Vec import matutil from solver import solve ## Task 1 def move2board(v): ''' Input: - v: a vector with domain {'y1','y2','y3'}, the coordinate representation of a point q. ...
<|file_name|>stylesheet.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 {Prefix, Namespace}; use context::QuirksMode; use cssp...
<|file_name|>metricshandler.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright owner...
tmaster,
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache...
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from supervisorerrormiddleware import SupervisorErrorMiddleware import os import sys import paste.fixture class DummyOutput: def __init__(self): self._buffer = [] def write(self, data): self._buffer.append(data) def flush(self): se...
def test_with_supervisor():
<|file_name|>pe029_distinct_powers.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding=utf-8 """ Distinct powers Problem 29 Consider all integer combinations of ab for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16, 2^5=32 3^2=9, 3^3=27, 3^4=81, 3^5=243 4^2=16, 4^3=64, 4^4=256, 4^5=1024 5^2=...
for j in range(2, b): yield i ** j
<|file_name|>InteractiveWrapper.d.ts<|end_file_name|><|fim▁begin|>import { GameClient, IParticipant } from "beam-interactive-node2";<|fim▁hole|>import { InteractiveGroup } from "./InteractiveGroup"; export declare class InteractiveWrapper { readonly client: GameClient | undefined; readonly defaultScene: Interac...
import { Event } from "./common/utils/Event"; import { InteractiveScene } from "./InteractiveScene"; import { InteractiveUser } from "./InteractiveUser";
<|file_name|>robustness_isolation.py<|end_file_name|><|fim▁begin|>'''OpenGL extension ARB.robustness_isolation This module customises the behaviour of the OpenGL.raw.GL.ARB.robustness_isolation to provide a more Python-friendly API Overview (from the spec) GL_ARB_robustness and supporting window system extension...
The official definition of this extension is available here:
<|file_name|>views.py<|end_file_name|><|fim▁begin|># coding: utf-8 # maposmatic, the web front-end of the MapOSMatic city map generation system # Copyright (C) 2009 David Decotigny # Copyright (C) 2009 Frédéric Lehobey # Copyright (C) 2009 Pierre Mauduit # Copyright (C) 2009 David Mentré # Copyright (C) 2009 Maxi...
<|file_name|>rest_mod.rs<|end_file_name|><|fim▁begin|>///! A helper to make local computer browsing of file paths possible ///! on smarter devices a dialog would do it .... use dirs; use std::{fs, path::Path, string::String, vec::Vec}; pub fn return_directory(given: String) -> Vec<String> { let trying_path = if gi...
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|> if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "LaasFrontEnd.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
import os import sys
<|file_name|>command.go<|end_file_name|><|fim▁begin|>/* Copyright (c) 2014 VMware, 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/licenses/LICEN...
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and
<|file_name|>RadioButtonView.java<|end_file_name|><|fim▁begin|>/* * Copyright appNativa Inc. All Rights Reserved. * * This file is part of the Real-time Application Rendering Engine (RARE). * * RARE is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public Licens...
}
<|file_name|>PaymentMethodDialogCode.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # # FabLabKasse, a Point-of-Sale Software for FabLabs and other public and trust-based workshops. # Copyright (C) 2015 Julian Hammer <julian.hammer@fablab.fau.de> # Maximilian Gaukl...
button.setDefault(True) first_button = False
<|file_name|>AddingBthreads.js<|end_file_name|><|fim▁begin|>/* global bp, noEvents, emptySet */ /* * This little app adds bthreads dynamically. */ bp.log.info("Program Loaded"); // Define the events. var kidADone = bp.Event("kidADone"); var kidBDone = bp.Event("kidBDone"); var parentDone = bp.Event("parentDone...
bp.registerBThread( "kid b1", function() { bp.log.info("kid b1 started"); bp.sync({request:kidBDone, block:parentDone});
<|file_name|>NodeSelectionGeoAsyncCommands.java<|end_file_name|><|fim▁begin|>/* * Copyright 2017-2021 the original author or 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 * ...
* their locations a sorted set. * @return Long integer-reply the number of elements in the result. */ AsyncExecutions<Long> georadius(K key, double longitude, double latitude, double distance, GeoArgs.Unit unit, GeoRadiusStoreArgs<K> geoRadiusStoreArgs);
<|file_name|>context.js<|end_file_name|><|fim▁begin|>var axios = require('axios') module.exports = function (app) { app.get('/context_all.jsonld', function (req, res) { axios.get(app.API_URL + 'context_all.jsonld') .then(function (response) { res.type('application/ld+json') res.status(200)....
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contests', '0001_initial'), ] operations = [ migrations.CreateMode...
}, bases=(models.Model,),