prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>_baseIsMatch.js<|end_file_name|><|fim▁begin|>'use strict'; const Stack = require('./_Stack'); const baseIsEqual = require('./_baseIsEqual'); /** Used to compose bitmasks for comparison styles. */ const UNORDERED_COMPARE_FLAG = 1; const PARTIAL_COMPARE_FLAG = 2; /** * The base implementation of `_.isMa...
return false; }
<|file_name|>query.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google Inc. 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 */ // We are temporarily importing the existing viewEngine_from core...
<|file_name|>set.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for @ag-grid-community/core v25.0.1 // Project: http://www.ag-grid.com/ // Definitions by: Niall Crosby <https://github.com/ag-grid/><|fim▁hole|><|fim▁end|>
export declare function convertToSet<T>(list: T[]): Set<T>;
<|file_name|>word-order.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict <|fim▁hole|>n = int(input()) occurrences = OrderedDict() for _ in range(0, n): word = input().strip() occurrences[word] = occurrences.get(word, 0) + 1 print(len(occurrences)) print(sep=' ', *[count for _, count in occurr...
<|file_name|>attention_allocation.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The ML Fairness Gym Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://w...
]) for i in range(params.n_locations) ] incidents_occurred, reported_incidents = np.hsplit(np.asarray(crimes), 2)
<|file_name|>CanvasDisplay.ts<|end_file_name|><|fim▁begin|>import {Display} from "./display"; const DISPLAY_WIDTH = 64; const DISPLAY_HEIGHT = 32; const EMPTY_FILL_COLOR = 'black'; const PIXEL_COLOR = 'yellow'; export default class CanvasDisplay implements Display{ private frameBuffer: Array<Array<number>> = [];...
} const collision = (this.frameBuffer[y][x] & value); return collision
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>/** * libjass * * https://github.com/Arnavion/libjass * * Copyright 2013 Arnav Singh * * 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 a...
scriptPath = _scriptNode.src; }
<|file_name|>plugins.js<|end_file_name|><|fim▁begin|>// Avoid `console` errors in browsers that lack a console. (function() { var method; var noop = function () {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEn...
while (length--) { method = methods[length];
<|file_name|>rsvp.js<|end_file_name|><|fim▁begin|>import * as RSVP from 'rsvp'; import { backburner, _rsvpErrorQueue } from '@ember/runloop'; import { getDispatchOverride } from '@ember/-internals/error-handling'; import { assert } from '@ember/debug'; RSVP.configure('async', (callback, promise) => { backburner.sche...
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import json import unittest from mopidy.models import ( Album, Artist, ModelJSONEncoder, Playlist, Ref, SearchResult, TlTrack, Track, model_json_decoder) class GenericCopyTest(unittest.TestCase): def compare...
with self.assertRaises(AttributeError):
<|file_name|>geminiUploadToS3.ts<|end_file_name|><|fim▁begin|>import { AssetCredentials } from "./Gemini/getGeminiCredentialsForEnvironment" export { getGeminiCredentialsForEnvironment } from "./Gemini/getGeminiCredentialsForEnvironment" export { createGeminiAssetWithS3Credentials } from "./Gemini/createGeminiAssetWit...
// e.g. https://artsy-media-uploads.s3.amazonaws.com/A3tfuXp0t5OuUKv07XaBOw%2F%24%7Bfilename%7D const url = e.target.responseHeaders.Location resolve({
<|file_name|>length_limit.rs<|end_file_name|><|fim▁begin|>//! See [`HtmlWithLimit`]. use std::fmt::Write; use std::ops::ControlFlow; use crate::html::escape::Escape; /// A buffer that allows generating HTML with a length limit. /// /// This buffer ensures that: /// /// * all tags are closed, /// * tags are closed in...
/// Close all unclosed tags. fn close_all_tags(&mut self) {
<|file_name|>serlo_i18n.js<|end_file_name|><|fim▁begin|>/** * Dont edit this file! * This module generates itself from lang.js files!<|fim▁hole|> **/ /*global define*/ define(function () { "use strict"; var i18n = {}; i18n.de = { "Visit %s overview" : "Zur %s Übersicht", "An error occured, please reload." :...
* Instead edit the language files in /lang/
<|file_name|>test_main.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- from autopilot.matchers import Eventually from testtools.matchers import Equals from bmicalc import tests class MainViewTestCase(tests.BaseTestCase): """Tests for the mainview"""<|fim...
<|file_name|>play.go<|end_file_name|><|fim▁begin|>package main import ( "fmt" "time" "net/http" "encoding/json" "io/ioutil" "github.com/gorilla/mux" ) <|fim▁hole|> PlayTypeKey string `json:"play_type_key" redis:"play_type_key"` EpisodeKey string `json:"episode_key" re...
type Play struct { Key string `json:"key" redis:"-"` SeasonKey string `json:"season_key" redis:"season_key"` QueenKey string `json:"queen_key" redis:"queen_key"`
<|file_name|>heart.js<|end_file_name|><|fim▁begin|>/*global window*/ (function($){ 'use strict'; var Observable = function(){ this.observers = {}; }; Observable.prototype.on = function(event, observer){ (this.observers[event] = this.observers[event] || []).push(observer); }; Obs...
<|file_name|>test_designation.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors<|fim▁hole|><|fim▁end|>
# License: GNU General Public License v3. See license.txt test_records = [[{"doctype":"Designation", "designation_name":"_Test Designation"}]]
<|file_name|>KafkaExampleUtil.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 You un...
* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software
<|file_name|>db-connect.js<|end_file_name|><|fim▁begin|>var mongodb = require("mongodb"), config = require("./config"), connectArr = []; module.exports = function(server){ connectArr.push("mongodb://"); if(config.dbUser){ connectArr.push(config.dbUser); connectArr.push("@"); } if(config.dbPwd){ connectArr....
<|file_name|>create_oms.py<|end_file_name|><|fim▁begin|>''' Created on Jun 27, 2010 @author: jnaous ''' from openflow.dummyom.models import DummyOM <|fim▁hole|> def run(): for om in DummyOM.objects.all(): om.delete() for i in xrange(3): om = DummyOM.objects.create() om.popu...
<|file_name|>argv.js<|end_file_name|><|fim▁begin|>import { module, test } from "qunit"; import argvInjector from "inject-loader?nwjs/App!nwjs/argv"; module( "nwjs/argv" ); <|fim▁hole|> test( "Default values", assert => { const argv = argvInjector({ "nwjs/App": { argv: [] } }); assert.propEqual( argv.ar...
<|file_name|>either.rs<|end_file_name|><|fim▁begin|>// Serkr - An automated theorem prover. Copyright (C) 2015-2016 Mikko Aarnos. // // Serkr is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 ...
Right(R) } impl<L, R> Either<L, R> {
<|file_name|>fakers.js<|end_file_name|><|fim▁begin|>import { faker } from 'ember-cli-mirage'; import lodash from 'npm:lodash'; export const CONTAINER_MEMORY = 8023089152; export function getPorts(isContainer=false) { let ports = []; for (let j = 1; j <= faker.random.number({ max: 3 }); j++) { let obj = { ...
return {
<|file_name|>csv1POJO1446411691328.java<|end_file_name|><|fim▁begin|>package DynamicFlink; public class csv1POJO1446411691328{ String latitude; public void setLatitude(String latitude) { this.latitude = latitude; } public String getLatitude() { return this.latitude; } String longitude; public void setLongitude(String l...
String city_name;
<|file_name|>raw.py<|end_file_name|><|fim▁begin|># this is a virtual module that is entirely implemented server side DOCUMENTATION = ''' --- module: raw version_added: historical short_description: Executes a low-down and dirty SSH command options: free_form: description: - the raw module takes a free form...
required: true executable:
<|file_name|>dataset.ts<|end_file_name|><|fim▁begin|>/* Copyright 2015 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2....
private _load() { var url = this.urlGenerator(this.tag, this.run);
<|file_name|>ubluepy_scan.py<|end_file_name|><|fim▁begin|>from ubluepy import Scanner, constants def bytes_to_str(bytes): string = "" for b in bytes: string += chr(b) return string def get_device_names(scan_entries): dev_names = [] for e in scan_entries: scan = e.getScanData() ...
dev_names.append((e, bytes_to_str(s[2])))
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 astonbitecode // This file is part of rust-keylock password manager. // // rust-keylock 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, eith...
version: "3".to_string(), }; let res4 = synchronizer_action( &wdr4,
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- #<|fim▁hole|># mdfjr - admin.py # # Created by PyCharm. # User: fajar # Date: 5/13/17 # Time: 3:50 PM # # from django.contrib import admin from . import models @admin.register(models.OAuthUser) class OAuthUserAdmin...
<|file_name|>adding-development.js<|end_file_name|><|fim▁begin|>// These tests require the client to be built and served with additional // redirect configuration. The Cypress action in .github/workflows/cypress.yml // contains the necessary commands to do this. describe('Legacy redirects', () => { it('should redire...
cy.visit('learn/apis-and-microservices/managing-packages-with-npm'); cy.location().should(loc => { expect(loc.pathname).to.eq( '/learn/back-end-development-and-apis/managing-packages-with-npm/'
<|file_name|>module.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
"package1.subpackage.module"
<|file_name|>sha.py<|end_file_name|><|fim▁begin|>import hashlib f = open('file_path', 'rb') sh = hashlib.sha256()<|fim▁hole|>f.close()<|fim▁end|>
sh.update(f.read()) print(sh.hexdigest())
<|file_name|>ChampionDto.java<|end_file_name|><|fim▁begin|>package lol4j.protocol.dto.champion; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * Created by Aaron Corley on 12/10/13. */ @JsonIgnoreProperties(ignoreUnknown = true) public class ChampionDto { private boolean active; private b...
public boolean isRankedPlayEnabled() { return rankedPlayEnabled; }
<|file_name|>add.go<|end_file_name|><|fim▁begin|>package command import ( "github.com/matsu-chara/gol/operations" "github.com/matsu-chara/gol/util" "github.com/urfave/cli"<|fim▁hole|>func CmdAdd(c *cli.Context) { filepath := c.GlobalString("datapath") key := c.Args().Get(0) link := c.Args().Get(1) registeredBy ...
) // CmdAdd add key value
<|file_name|>config.go<|end_file_name|><|fim▁begin|>package entity type Config struct{ //DefaultCredential stores default credential info // which used by ssh extension. // If credential info omitted at YAML confi, // credential info decided following order. // 1. If the host name matches one of "Hosts" map ent...
config := new(Config) config.DefaultCredential = new(Credential) config.Hosts = make(map[string]*Credential)
<|file_name|>typelevel.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Serulian Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package formatter import ( "github.com/serulian/compiler/sourceshape" ) // emitField emits the s...
sf.append(" ") sf.emitNode(node.getChild(sourceshape.NodePredicateBody)) }
<|file_name|>snphylo.py<|end_file_name|><|fim▁begin|>## # Copyright 2009-2018 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc),<|fim▁hole|># the Flemish Supercomputer Centre (V...
<|file_name|>test_filters.py<|end_file_name|><|fim▁begin|>from django.test import TestCase from tenancy.filters import * from tenancy.models import Tenant, TenantGroup class TenantGroupTestCase(TestCase): queryset = TenantGroup.objects.all() filterset = TenantGroupFilterSet @classmethod def setUpTes...
) for tenantgroup in tenant_groups: tenantgroup.save()
<|file_name|>maintenance_schedule.py<|end_file_name|><|fim▁begin|># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import add_days, cstr, getdate from webnotes.m...
email_map[d.incharge_name] = webnotes.bean("Sales Person", d.incharge_name).run_method("get_email_id") scheduled_date =webnotes.conn.sql("select scheduled_date from `tabMaintenance Schedule Detail` \
<|file_name|>JSONStringNode.js<|end_file_name|><|fim▁begin|>'use strict'; exports.__esModule = true; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key...
<|file_name|>struct_jmcpp_1_1_group_info_updated_event.js<|end_file_name|><|fim▁begin|>var struct_jmcpp_1_1_group_info_updated_event = [ [ "fromUser", "struct_jmcpp_1_1_group_info_updated_event.html#a01d445e6f171e3f38103f38d1f82e041", null ], [ "groupId", "struct_jmcpp_1_1_group_info_updated_event.html#a7775458...
];
<|file_name|>parameter_scaling.py<|end_file_name|><|fim▁begin|># coding: utf8 # Copyright 2014-2020 CERN. This software is distributed under the # terms of the GNU General Public Licence version 3 (GPL Version 3), # copied verbatim in the file LICENCE.md. # In applying this licence, CERN does not waive the privile...
self.rbBunchLength.setGeometry(QtCore.QRect(260, 250, 140, 22)) self.rbBunchLength.setObjectName("rbBunchLength")
<|file_name|>facetedSearch.stories.js<|end_file_name|><|fim▁begin|>import React from 'react'; import { within, userEvent } from '@storybook/testing-library'; import { action } from '@storybook/addon-actions'; import { Badge } from '@talend/react-components'; import { useTranslation } from 'react-i18next'; import set fr...
} </FacetedSearch.Faceted> );
<|file_name|>reductions.rs<|end_file_name|><|fim▁begin|>//! Reductions<|fim▁hole|>mod integer_arithmetic; #[macro_use] mod bitwise; #[macro_use] mod mask; #[macro_use] mod min_max;<|fim▁end|>
#[macro_use] mod float_arithmetic; #[macro_use]
<|file_name|>msnodesql.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.9.3 (function() { var CONNECTION_STRING_NAMED_INSTANCE, CONNECTION_STRING_PORT, DECLARATIONS, EMPTY_BUFFER, ISOLATION_LEVEL, Pool, TYPES, UDT, castParameter, createColumns, declare, isolationLevelDeclaration, msnodesql, ref, util, v...
<|file_name|>mui.js<|end_file_name|><|fim▁begin|>(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s...
controlsAttrKey = 'data-mui-controls', activeClass = 'mui--is-active',
<|file_name|>engine.go<|end_file_name|><|fim▁begin|>package g3 import ( "os" ) const ( SystemQuit = iota ) type SystemEvent struct { Type int } type FrameEvent struct { DeltaTime float32 } type MouseEvent struct { X, Y int32 Dx, Dy int32 Button int32 } type KeyEvent struct { Key uint32 Type uint32 } ...
FullScreen bool Caption string }
<|file_name|>threads.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/license...
println!("main thread exiting");
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, include, url<|fim▁hole|> urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), # (r'^statinfo/$', 'appname.views.stat_info'), (r'^login/$', 'django.contrib.auth.views.login'), (r'^logout/$', 'django....
from django.contrib import admin admin.autodiscover()
<|file_name|>default_environment.py<|end_file_name|><|fim▁begin|>import abc from default_metrics import DefaultMetrics class DefaultEnvironment(object): """ Abstract class for environments. All environments must implement these methods to be able to work with SBB. """ __metaclass__ = abc....
"""
<|file_name|>bithdtv.py<|end_file_name|><|fim▁begin|>################################################################################################### # Author: Jodi Jones <venom@gen-x.co.nz> # URL: https://github.com/VeNoMouS/Sick-Beard # # This file is part of Sick Beard. # # Sick Beard is free software: you can re...
def _get_episode_search_strings(self, ep_obj): search_string = []
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![cfg_attr(feature = "nightly-testing", feature(plugin))] #![cfg_attr(feature = "nightly-testing", plugin(clippy))] #![cfg_attr(not(feature = "unstable"), deny(warnings))] //! Types for loading and managing AWS access credentials for API requests. extern crate chrono;...
<|file_name|>CanvasController.ts<|end_file_name|><|fim▁begin|>/// <reference path="../jquery.d.ts" /> /// <reference path="../jqueryui.d.ts" /> class DeviceCanvas { private _dom: HTMLElement; public get DOM() { return this._dom; } public set DOM(val) { this._dom = val; } constructor(dom: HTMLElement)...
stop: function (event, ui) { console.log("STOP: drag of element id: " + ui.id + "."); } });
<|file_name|>indices_delete.go<|end_file_name|><|fim▁begin|>// Copyright 2012-present Oliver Eilhard. All rights reserved. // Use of this source code is governed by a MIT-license. // See http://olivere.mit-license.org/license.txt for details. package elastic import ( "fmt" "net/url" "strings" "golang.org/x/net/c...
<|file_name|>omp.py<|end_file_name|><|fim▁begin|>"""Orthogonal matching pursuit algorithms """ # Author: Vlad Niculae # # License: BSD 3 clause import warnings import numpy as np from scipy import linalg from scipy.linalg.lapack import get_lapack_funcs from .base import LinearModel, _pre_fit from ..base import Regr...
OrthogonalMatchingPursuit orthogonal_mp_gram
<|file_name|>pyRobotC.py<|end_file_name|><|fim▁begin|>import ast import traceback import os import sys userFunctions = {} renames = ['vex.pragma','vex.motor','vex.slaveMotors','vex.motorReversed'] classNames = [] indent = ' ' sameLineBraces = True compiled = {} def module_rename(aNode): if aNode.func.print_c() ==...
asC += '/*\n' asC += ast.get_docstring(self) self.body.pop(0)
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Product Code Unique", "summary": "Add the unique property to default_code field", "version": "9.0.1.0.0", "category":...
<|file_name|>file_tags.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import logging import posixpath from collections import defaultdict from seaserv import seafile_api from seahub.base.templatetags.seahub_tags import email2nickname, email2contact_email from seahub.utils.timeutils import timestamp_to_isofor...
<|file_name|>PanZoomSpec.js<|end_file_name|><|fim▁begin|>/* global describe */ /* global module */ /* global beforeEach */ /* global inject */ /* global it */ /* global expect */ describe('PanZoom specs', function () { var $scope = null; var $compile = null; var $interval = null; var PanZoomService = n...
jQuery.fx.stop = function () {
<|file_name|>reactor.rs<|end_file_name|><|fim▁begin|>use std::io::{Result}; use std::net::ToSocketAddrs; use mio::{Sender, Evented, EventLoop, EventLoopConfig, Token, TimerResult, Timeout}; use reactor_handler::{ReactorHandler}; use context::{Context}; use reactor_ctrl::{ReactorCtrl, ReactorConfig, ...
<|file_name|>protocol.py<|end_file_name|><|fim▁begin|># # Copyright 2013 Quantopian, 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/LICENSE-2.0 # ...
<|file_name|>user.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ gateway tests - Users Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import unittest import omero import gatewaytest.library as lib from omero.gateway.scripts...
<|file_name|>plotBiasVarTradeoff.py<|end_file_name|><|fim▁begin|>def plotLearningCurve(Xtrn, Ytrn, model, param_name, param_range): ''' Plot the bias/variance tradeoff for a given model. This curve is the training and test error (via split) of the model as a function of model complexity. Wrapper fo...
return
<|file_name|>hanoi_prototype4.py<|end_file_name|><|fim▁begin|>def hanoi(n, source, helper, target): if n > 0: # move tower of size n - 1 to helper hanoi(n - 1, source, target, helper) # move disk from source peg to target peg if source: target.append(source.pop()) ...
<|file_name|>nb.py<|end_file_name|><|fim▁begin|>import sys from csv_data import Data from csv_utilities import readIntegerCSV from csv_utilities import convertToZeroOne from statistics import mean from math import log def dotProduct( arr1, arr2 ): return sum( [ arr1[idx] * arr2[idx] for idx in range( len( arr1 ) ) ] ...
return ( probabilityXisOne( dataSubsetWithY( data, y ), idx, beta ) if x == 1 else probabilityXisZero( dataSubsetWithY( data, y ), idx, beta ) ) #
<|file_name|>headphonemon.py<|end_file_name|><|fim▁begin|># Copyright 2015 Christoph Reiter # 2017 Nick Boultbee # # 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 version 2 of t...
def enabled(self): self._was_paused = False
<|file_name|>simpleSound.py<|end_file_name|><|fim▁begin|># simpleSound.py # Plays audio files on Linux and Windows. # Written Jan-2008 by Timothy Weber. # Based on (reconstituted) code posted by Bill Dandreta at <http://www.velocityreviews.com/forums/t337346-how-to-play-sound-in-python.html>.<|fim▁hole|> if platform.sy...
import platform
<|file_name|>devscan.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # ...
entry = dom.createElement('name')
<|file_name|>test_aws_acm.py<|end_file_name|><|fim▁begin|># (c) 2019 Telstra Corporation Limited # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
pprint(chain['split']) print("path: %s" % chain['path']) print("Expected chain length: %d" % chain['length'])
<|file_name|>test_local.py<|end_file_name|><|fim▁begin|>import numpy as np def test_prepare_abi_connectivity_maps(): from samri.fetch.local import prepare_abi_connectivity_maps prepare_abi_connectivity_maps('Ventral_tegmental_area', invert_lr_experiments=[ "127651139", "127796728", "127798146", "127867...
<|file_name|>frame_filters.py<|end_file_name|><|fim▁begin|># Frame-filter commands. # Copyright (C) 2013-2019 Free Software Foundation, Inc. # 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; eith...
return "Yes" else: return "No"
<|file_name|>associated-types-normalize-in-bounds.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // ...
// we didn't, the call to `self.split2()` fails to type check.
<|file_name|>core.py<|end_file_name|><|fim▁begin|># framework/core.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 Fou...
"""
<|file_name|>Merriam_Webster_api.py<|end_file_name|><|fim▁begin|>from lxml import etree import requests import re #coding utf-8 def getResource(word): r = requests.get("http://www.dictionaryapi.com/api/v1/references/learners/xml/"+word+"?key=508b6e11-3920-41fe-a57a-d379deacf188") return r.text[39:] def isWord(...
root = etree.XML(getResource(word), etree.XMLParser(remove_blank_text=True))
<|file_name|>0018_auto_20170329_1549.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import contents.models class Migration(migrations.Migration): <|fim▁hole|> ('contents', '0017_auto_20170329_1504'), ] operation...
dependencies = [
<|file_name|>podlogartifact.go<|end_file_name|><|fim▁begin|>/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
type jobAgent interface { GetProwJob(job string, id string) (kube.ProwJob, error) GetJobLog(job string, id string) ([]byte, error) GetJobLogTail(job string, id string, n int64) ([]byte, error)
<|file_name|>rc_skip_last.py<|end_file_name|><|fim▁begin|>""" Follow Me activity for Sugar Copyright (C) 2010 Peter Hewitt 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 ...
<|file_name|>index.py<|end_file_name|><|fim▁begin|>from flask import Blueprint, render_template,request,Response,make_response,session,flash,redirect,url_for index = Blueprint('index', __name__) from models.User import User from models.Company import Company from models.Comments import Comments import time,serials @...
user_id=request.form["user_id"] company_id=request.form["company_id"] contents=request.form["contents"]
<|file_name|>SSTableScanner.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 you ...
<|file_name|>scheduler.go<|end_file_name|><|fim▁begin|>/* Copyright 2019 The Vitess Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless r...
return nil }
<|file_name|>cli-trailbuilder.js<|end_file_name|><|fim▁begin|>$("#btnAddButton").on('click', addButton); $("#btnRemoveButton").on('click', removeButton); $('#btnAddTrail').on('click', loadFiles); $(document).ready(function() { }); var counter = 0; function addButton(event) { if(counter >= 10){ alert("On...
elem.style.color="white";
<|file_name|>elec.js<|end_file_name|><|fim▁begin|>'use strict'; var packager = require('electron-packager'); var options = { 'arch': 'ia32', 'platform': 'win32', 'dir': './', 'app-copyright': 'Paulo Galdo', 'app-version': '2.2.5', 'asar': true, 'icon': './app.ico', 'name': 'Tie...
'ProductName': 'Tierra de colores',
<|file_name|>ISynchronizeOutputCollector.java<|end_file_name|><|fim▁begin|>package backtype.storm.state; import java.util.List; public interface ISynchronizeOutputCollector {<|fim▁hole|><|fim▁end|>
void add(int streamId, Object id, List<Object> tuple); }
<|file_name|>middlewares.rs<|end_file_name|><|fim▁begin|>use iron::prelude::*; use iron::AfterMiddleware; use iron::status; use hbs::Template; // custom 404 not found. pub struct Custom404; impl AfterMiddleware for Custom404 { fn catch(&self, _: &mut Request, err: IronError) -> IronResult<Response> {<|fim▁hole|>...
use std::collections::BTreeMap;
<|file_name|>orientable.rs<|end_file_name|><|fim▁begin|>// This file is part of rgtk. // // rgtk is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option)...
fn get_orientation(&self) -> Orientation {
<|file_name|>data_out_base.cc<|end_file_name|><|fim▁begin|>// --------------------------------------------------------------------- // // Copyright (C) 1999 - 2015 by the deal.II authors // // This file is part of the deal.II library. // // The deal.II library is free software; you can use it, redistribute // it, and/o...
patch->data(flags.height_vector,i1*d1 + (i2+1)*d2) * flags.z_scaling : 0; heights[3] = patch->data.n_rows() != 0 ? patch->data(flags.height_vector,(i1+1)*d1 + (i2+1)*d2) * flags.z_scaling
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import * as boom from "boom"; import * as hapi from "hapi"; import * as intacctapi from "intacct-api"; import * as Joi from "joi"; import * as pkg from "../package.json"; export * from "./joi"; export type Partial<T> = { [P in keyof T]?: T[P]; }; export interface I...
<|file_name|>price.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute ...
total += sum
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from ..models import models class RasterModel(models.Model): rast = models.RasterField('A Verbose Raster Name', null=True, srid=4326, spatial_index=True, blank=True) class Meta: required_db_features = ['supports_raster'] <|fim▁hole|> def __str__(...
<|file_name|>config.rs<|end_file_name|><|fim▁begin|>use dirs; use serde_derive::{Deserialize, Serialize}; use std::default::Default; use std::fs::File; use std::io::Read; use toml; use crate::errors::*; use crate::slack::config::SlackConfig; use crate::todoist::config::TodoistConfig; use crate::toggl::config::TogglCon...
pub struct MessageTemplate { title_daily_tasks: String,
<|file_name|>treefy.js<|end_file_name|><|fim▁begin|>function tree(tasks) {<|fim▁hole|> nodes: Object.keys(tasks[task]).map(function(x){ return x; }) }); return prev; }, { nodes: [], }); } module.exports = tree;<|fim▁end|>
return Object.keys(tasks) .reduce(function(prev, task) { prev.nodes.push({ label: task,
<|file_name|>dialogueprocessor.py<|end_file_name|><|fim▁begin|># This file is part of PARPG. # # PARPG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
def runDialogueActions(self, dialogue_node):
<|file_name|>model.ts<|end_file_name|><|fim▁begin|>import { apiBase, versionApi } from '../commons';<|fim▁hole|>const apiMonitoring = `${apiBase}/${versionApi}/monitoring`; export { apiMonitoringBeta, apiMonitoring };<|fim▁end|>
const apiMonitoringBeta = `${apiBase}/beta/monitoring`;
<|file_name|>class-poly-methods-cross-crate.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 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|>// except according to those terms. // run-pass // aux-build:...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>auth.py<|end_file_name|><|fim▁begin|>from annoying.functions import get_object_or_None from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.db.models import Q # Class to permit the authentication using email or username, with case sensitive and ...
user = case_sensitive.first()
<|file_name|>request.go<|end_file_name|><|fim▁begin|>package apiutils import ( "encoding/json" "fmt" "regexp" "strconv" "strings" "net/http" "net/url" ) type Request struct { UserID int64 Sort []string Filter map[string][]string Device string Callback string PageNumber int PageSize ...
PageLimit int PageOffset int }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate byteorder; extern crate rand; extern crate mio; use std::io; use std::fmt; pub mod dnsresolv; pub mod dnsparser; pub mod httpclient; #[derive(Debug)] pub enum DnsError { Io(io::Error), InvalidFormat(String), InvalidResource(), } impl From<io::...
<|file_name|>Page.java<|end_file_name|><|fim▁begin|>/** * DynamicReports - Free Java reporting library for creating reports dynamically * * Copyright (C) 2010 - 2015 Ricardo Mariaca * http://www.dynamicreports.org * * This file is part of DynamicReports. * * DynamicReports is free software: you can redi...
<|file_name|>mdbcache.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import logging __author__ = 'rolandh' from pymongo import Connection #import cjson import time from datetime import datetime from saml2 import time_util from saml2.cache import ToOld from saml2.time_util import TIME_FORMAT logger = logging....
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import re import logging from google.appengine.ext import db from google.appengine.api import users, memcache from handler import Handler, SlashRedirect from webapp2_extras.routes import RedirectRoute, PathPrefixRoute import webapp2 from webapp2_extras.routes import Re...
def get(self): logging.debug('%s'%self.request) if 'main' in self.request.url: self.redirect('/')