prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>client.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import datetime import jwt import re import logging from six.moves.urllib.parse import parse_qs, urlparse, urlsplit from sentry.integrations.atlassian_connect import get_query_hash from sentry.shared_integrations.exceptions im...
cache_time = 240 def __init__(self, base_url, jira_style, verify_ssl, logging_context=None):
<|file_name|>log-knows-the-names-of-variants-in-std.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the ...
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
<|file_name|>IPoint.java<|end_file_name|><|fim▁begin|>/*--- iGeo - http://igeo.jp Copyright (c) 2002-2013 Satoru Sugihara This file is part of iGeo. iGeo 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 Fr...
synchronized public String toString(){ if(pos==null) return super.toString(); return pos.toString();
<|file_name|>server.js<|end_file_name|><|fim▁begin|>// Get dependencies const express = require('express'); const path = require('path'); const http = require('http'); const bodyParser = require('body-parser'); // Get our API routes const api = require('./server/routes/api'); <|fim▁hole|>app.use(bodyParser.urlencoded(...
const app = express(); // Parsers for POST data app.use(bodyParser.json());
<|file_name|>xxx.js<|end_file_name|><|fim▁begin|>onst bcrypt = require('bcrypt-nodejs'); const crypto = require('crypto'); console.log('start'); <|fim▁hole|> console.log(hash); }); });<|fim▁end|>
bcrypt.genSalt(10, (err, salt) => { bcrypt.hash('passwd', salt, null, (err, hash) => {
<|file_name|>validation.ts<|end_file_name|><|fim▁begin|>/* * Copyright © 2018 Lisk Foundation * * See the LICENSE file at the top-level directory of this distribution * for licensing information. * * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, * no part of this software, inc...
<|file_name|>a_quick_test5.py<|end_file_name|><|fim▁begin|>""" This example uses OpenGL via Pyglet and draws a bunch of rectangles on the screen. """ import random import time import pyglet.gl as GL import pyglet import ctypes # Set up the constants SCREEN_WIDTH = 700 SCREEN_HEIGHT = 500 RECT_WIDTH = 50 RECT_HEIGHT ...
GL.glDrawArrays(GL.GL_QUADS, 0, shape.size)
<|file_name|>urls.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ChartReaderingView, export_view, ListReaderingView, DeleteBeehiveView, \ ModifyBeehiveView, summary_view urlpatterns = [ url(r'^ajouter$', AddBeehiveView.as_view(), name='add-beehive'), url(r'^(?P<pk>\d+)/$', summary_view, name='summary'), ...
from django.conf.urls import url from rpi.beehive.views import AddBeehiveView, delete_readering_view, \
<|file_name|>test_response.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from emojibot.utils.response import Response <|fim▁hole|> response = Response() assert isinstance(response, Response)<|fim▁end|>
def test_constructor():
<|file_name|>test_shared_network_extension.py<|end_file_name|><|fim▁begin|># Copyright 2015 Hewlett-Packard Development Company, L.P.dsvsv # Copyright 2015 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complian...
self.assertEqual(self.shared_network['id'], show_shared_net['id']) self.assertTrue(show_shared_net['shared'])
<|file_name|>generate.rs<|end_file_name|><|fim▁begin|>//! Generate valid parse trees. use grammar::repr::*; use rand::{self, Rng}; use std::iter::Iterator; #[derive(PartialEq, Eq)] pub enum ParseTree { Nonterminal(NonterminalString, Vec<ParseTree>), Terminal(TerminalString), } pub fn random_parse_tree(gramma...
} } }
<|file_name|>SeekBarPreference.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2013 The OmniROM Project * * 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 the Licen...
changer.onPreferenceChange(this, Integer.toString(currentValue)); } }
<|file_name|>MimeMapperTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain...
<|file_name|>Dot.js<|end_file_name|><|fim▁begin|>var React = require('react-native'); var { StyleSheet, View, Animated, } = React; var Dot = React.createClass({ propTypes: { isPlacedCorrectly: React.PropTypes.bool.isRequired, }, getInitialState: function() { return { scale: new Animated....
<|file_name|>news_u.cpp<|end_file_name|><|fim▁begin|>// Copyright 2014 Citra Emulator Project<|fim▁hole|> #include "common/log.h" #include "core/hle/hle.h" #include "core/hle/service/news_u.h" //////////////////////////////////////////////////////////////////////////////////////////////////// // Namespace NEWS_U name...
// Licensed under GPLv2 or any later version // Refer to the license.txt file included.
<|file_name|>_bgcolor.py<|end_file_name|><|fim▁begin|>import _plotly_utils.basevalidators class BgcolorValidator(_plotly_utils.basevalidators.ColorValidator): def __init__( self, plotly_name="bgcolor", parent_name="sankey.node.hoverlabel", **kwargs<|fim▁hole|> super(BgcolorValidator, self).__init__...
):
<|file_name|>pool.go<|end_file_name|><|fim▁begin|>package pool import ( "context" "errors" "net" "sync" "sync/atomic" "time" "github.com/go-redis/redis/v8/internal" ) var ( // ErrClosed performs any operation on the closed client will return this error. ErrClosed = errors.New("redis: client is closed") //...
p.conns = append(p.conns[:i], p.conns[i+1:]...) if cn.pooled {
<|file_name|>api.pb.cc<|end_file_name|><|fim▁begin|>// Generated by the protocol buffer compiler. DO NOT EDIT! // source: cockroach/proto/api.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION #include "cockroach/proto/api.pb.h" #include <algorithm> #include <google/protobuf/stubs/common.h> #include <google...
GOOGLE_SAFE_CONCURRENT_WRITES_END();
<|file_name|>hide_top_overlay.d.ts<|end_file_name|><|fim▁begin|>/** * DevExtreme (mobile/hide_top_overlay.d.ts) * Version: 16.2.5 * Build date: Mon Feb 27 2017 * * Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED * EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml */ import DevExpress fr...
export default DevExpress.hideTopOverlay;
<|file_name|>possible_browser.py<|end_file_name|><|fim▁begin|># Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.internal.app import possible_app class PossibleBrowser(possible_app.PossibleAp...
pass def UpdateExecutableIfNeeded(self):
<|file_name|>serious-widget.js<|end_file_name|><|fim▁begin|>// Generated by CoffeeScript 1.4.0 var isDefined, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __slice = [].slice, __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in t...
} }
<|file_name|>basic-ontology.ts<|end_file_name|><|fim▁begin|>import { JsonObject, JsonProperty } from 'json2typescript'; @JsonObject('PropertyItem') export class PropertyItem { @JsonProperty('name', String) public name: string = undefined; @JsonProperty('guiorder', Number) public guiorder: number = un...
@JsonProperty('label', String) public label: string = undefined;
<|file_name|>bbcodetag.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Copyright (c) 2009 Sergio Gabriel Teves All rights reserved. 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, ei...
@register.inclusion_tag('tags/smileysrender.html') def smileyrender():
<|file_name|>document.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 cookie_rs; use core::nonzero::NonZero; use devtools_trai...
<|file_name|>measurematrix.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- """ .. module:: measurematrix.py .. moduleauthor:: Jozsef Attila Janko, Bence Takacs, Zoltan Siki (code optimalization) Sample application of Ulyxes PyAPI to measure within a rectangular area :param argv[1] (in...
else: wrt = EchoWriter(angle='DEG', dist='.3f')
<|file_name|>db.cc<|end_file_name|><|fim▁begin|>#include "db/db.h" Database::Database() { this->records_tree_ = nullptr; } void Database::Read(DatabaseReader &reader) { this->records_tree_ = reader.ReadIndex(); } Record *Database::GetRecordsTree() const { return this->records_tree_; } <|fim▁hole|>}<|fim▁end|>
void Database::SetRecordsTree(Record *records_tree) { this->records_tree_ = records_tree;
<|file_name|>tfidf_smbkmeans.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import os import sys import inspect cmd_folder = os.path.realpath( os.path.abspath( os.path.split( inspect.getfile( inspect.currentframe() ) )[0] ...
<|file_name|>logging.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::Error; use consensus_types::common::{Author, Round}; use diem_logger::Schema; use diem_types::waypoint::Waypoint; use serde::Serialize; #[derive(Schema)] pub struct Safety...
}
<|file_name|>main.go<|end_file_name|><|fim▁begin|>// span-reshape is a dumbed down span-import. package main import ( "bufio" "encoding" "flag" "fmt" "io" "io/ioutil" "log" "os" "runtime" "runtime/pprof" "sort" "github.com/lytics/logrus" "github.com/miku/span" "github.com/miku/span/formats/ceeol" "gith...
os.Exit(0) } if *logfile != "" {
<|file_name|>AuditLogEntryFactoryTest.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright 2016 Intuit * <p> * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. ...
<|file_name|>cache.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = 'hal9000' __all__ = ['Cache', 'CacheServer'] import socket import time import json import hashlib from sqlite3 import dbapi2 as sqlite import xbmc import log import gui import system SOCKET = '127.0.0.1', 59999 CLEAR = 60*60*2...
<|file_name|>static-mut-not-pat.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 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....
East, South, West
<|file_name|>sha1Hash_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: iso-8859-1 -*- """ sha1Hash_test.py Unit tests for sha1.py """ from crypto.hash.sha1Hash import SHA1 import unittest import struct assert struct.calcsize('!IIIII') == 20, '5 integers should be 20 bytes' clas...
""" SHA-1 tests from FIPS180-1 Appendix A, B and C """
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from flask import Flask __version__ = '0.1.1' <|fim▁hole|>app.config.from_object('frijoles.default_settings') app.config.from_envvar('FRIJOLES_SETTINGS', silent=True) import frijoles.views<|fim▁end|>
app = Flask(__name__)
<|file_name|>applicationsettings.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use clap::ArgMatches; use crate::io::constants::{APP_INFO, SCALE}; use std::path::PathBuf; use log::LevelFilter; use log4rs; use log4rs::append::console::ConsoleAppender; use log4rs::config::{Appender, Config, Root}; use log4rs::encode::patte...
//! Stores all settings related to the application from a user perspective use app_dirs::*;
<|file_name|>get_permission_response.rs<|end_file_name|><|fim▁begin|>use crate::from_headers::*; use crate::permission::CosmosPermission; use crate::Permission; use azure_sdk_core::errors::AzureError; use azure_sdk_core::{etag_from_headers, session_token_from_headers}; use http::HeaderMap; use std::borrow::Cow; #[deri...
pub content_path: String, pub alt_content_path: String, }
<|file_name|>LetterHandler.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "DBAgent.h" using std::string; void CUser::LetterSystem(Packet & pkt) { uint8 opcode = pkt.read<uint8>(); switch (opcode) { case LETTER_UNREAD: case LETTER_LIST: case LETTER_HISTORY: case LETTER_READ: case LETTER_GET_ITE...
<|file_name|>72_Edit_Distance.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def minDistance(self, word1, word2): """ :type word1: str :type word2: str :rtype: int """ row = len(word1) + 1 col = len(word2) + 1 dp = [[0] * col for _ in range(row)] ...
class Solution(object):
<|file_name|>ITrigger.ts<|end_file_name|><|fim▁begin|>import { IArtifact, IExecution, ITemplateInheritable } from 'core/domain'; export interface ITrigger extends ITemplateInheritable { artifacts?: IArtifact[]; description?: string; enabled: boolean; rebake?: boolean; user?: string; type: string; expecte...
hash?: string;
<|file_name|>day24.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate clap; use clap::App; extern crate regex; use std::error::Error; use std::fs::File; use std::io::prelude::*; use std::collections::HashSet; fn main() { let yaml = load_yaml!("cli.yml"); let matches = App::from_yaml(yaml).get_matches()...
} else if target - p > 0{ let new_vec = packages[i+1..packages.len()].to_vec(); let mut group = potential.clone();
<|file_name|>json_filter.py<|end_file_name|><|fim▁begin|># Copyright (c) 2011 Openstack, LLC. # 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:...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import json def load(ctx): with open(ctx.obj["data_location"], "r") as f:<|fim▁hole|> with open(ctx.obj["data_location"], "w") as f: json.dump(map_obj, f, indent=4)<|fim▁end|>
return json.load(f) def save(ctx, map_obj):
<|file_name|>riscv32i_unknown_none_elf.rs<|end_file_name|><|fim▁begin|>use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel}; use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv3...
emit_debug_gdb_scripts: false,
<|file_name|>non_max_suppression_async_test.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright 2020 Google LLC. 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...
<|file_name|>mongodbUpgrade.js<|end_file_name|><|fim▁begin|>// This code is largely borrowed from: github.com/louischatriot/nedb-to-mongodb // This code moves your data from NeDB to MongoDB // You will first need to create the MongoDB connection in your /routes/config.json file // You then need to ensure your MongoDB ...
<|file_name|>loop.py<|end_file_name|><|fim▁begin|># RUN: %python -m artiq.compiler.testbench.signature %s >%t # RUN: OutputCheck %s --file-to-check=%t # CHECK-L: f: ()->NoneType delay(30 mu) def f(): for _ in range(10): delay_mu(3)<|fim▁hole|> # CHECK-L: g: ()->NoneType delay(60 mu) def g(): for _ in r...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------...
graph is created in a consistent, predictable way. However, regardless of what interface is used, it is possible to put Bokeh models together in ways that are incomplete, or that do not make sense in some way.
<|file_name|>discoveryclient.api.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2014 Juniper Networks, Inc. All rights reserved. */ var global = require('./global'), config = process.mainModule.exports.config, commonUtils = require('../utils/common.utils'), logutils = require('../utils/log.utils'); ...
case global.label.OPSERVER: serviceType = global.DISC_SERVICE_TYPE_OP_SERVER;
<|file_name|>conversation.py<|end_file_name|><|fim▁begin|>""" Support for functionality to have conversations with Home Assistant. For more details about this component, please refer to the documentation at https://home-assistant.io/components/conversation/ """ import logging import re import warnings import voluptuo...
from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_TURN_OFF, SERVICE_TURN_ON) import homeassistant.helpers.config_validation as cv
<|file_name|>app_config.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Project-wide application configuration. DO NOT STORE SECRETS, PASSWORDS, ETC. IN THIS FILE. They will be exposed to users. Use environment variables instead. See get_secrets() below for a fast way to access them. """ import os """ NAM...
<|file_name|>muting.py<|end_file_name|><|fim▁begin|>from django.http import HttpResponse, HttpRequest from typing import Optional import ujson from django.utils.translation import ugettext as _ from zerver.lib.actions import do_mute_topic, do_unmute_topic from zerver.lib.request import has_request_variables, REQ from...
<|file_name|>move_generating.rs<|end_file_name|><|fim▁begin|>extern crate pleco; use pleco::SQ; use pleco::core::*; use pleco::core::piece_move::*; use pleco::board::{Board,RandBoard}; #[test] fn test_movegen_captures() { let vec = RandBoard::default().no_check().many(9); vec.iter().for_each(|b| { ...
<|file_name|>websocket.py<|end_file_name|><|fim▁begin|>"""Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. WebSockets are supported in the current versions of all major browsers, although older versions ...
<|file_name|>app.py<|end_file_name|><|fim▁begin|>#Camera App #copyright (c) 2015 Tyler Spadgenske # MIT License import sys import pygame import picamera import io import yuv2rgb import os import time from subprocess import Popen class Stream(): def __init__(self): self.mode = 'capture' self.delete...
# Buffers for viewfinder data self.rgb = bytearray(320 * 480 * 3)
<|file_name|>e2e.cli.snippet.js<|end_file_name|><|fim▁begin|>"use strict"; var path = require("path"); var assert = require("chai").assert; var request = require("supertest"); var fork = require("child_process").fork; var index = path.resolve(__dirname + "/../../../index.js"); describe.skip("E2E CLI Snippet...
<|file_name|>cli.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 CERN. # # Invenio 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 Softwa...
<|file_name|>store.js<|end_file_name|><|fim▁begin|>import { applyMiddleware, createStore, compose } from "redux"; //Connect react router with redux import { syncHistoryWithStore } from "react-router-redux"; import { browserHistory } from "react-router"; import logger from "redux-logger"; import thunk from "redux-thu...
//If making an initial state and passing as a preloadedState to createStore, need to make a reducer //for each property in the intial state. The reason being the reducer has access to the state. So
<|file_name|>associate_params.go<|end_file_name|><|fim▁begin|>package model // ArgBind bind args. type ArgBind struct { OpenID string OutOpenID string AppID int64 } // ArgBindInfo bind info args. type ArgBindInfo struct { Mid int64 AppID int64 }<|fim▁hole|>type ArgThirdPrizeGrant struct { Mid int...
// ArgThirdPrizeGrant prize grant args.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('My Name', 'your_email@domain.com'), ) MANAGERS = ADMINS import tempfile, os from django import contrib tempdata = tempfile.mkdtemp() approot = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) adminroo...
version=1, disable_existing_loggers=False,
<|file_name|>FontWarnings.js<|end_file_name|><|fim▁begin|>/* * ../../../..//localization/cy/FontWarnings.js * * Copyright (c) 2009-2018 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obta...
* * MathJax/localization/cy/FontWarnings.js
<|file_name|>pyng.py<|end_file_name|><|fim▁begin|>__author__ = "davide" import struct import socket import argparse import sys from datetime import datetime import time from collections import defaultdict from signal import signal, SIGINT, SIG_IGN ICMP_ECHO_REQUEST = 8, 0 ICMP_ECHO_RESPONSE = 0, 0 __all__ = ["ICMPPa...
<|file_name|>Content.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'; import { connectStyle } from 'native-base-shoutem-theme'; import mapPropsToStyleNames from '../Utils/mapPropsToStyleNames'; class Content ext...
render() { return ( <KeyboardAwareScrollView automaticallyAdjustContentInsets={false}
<|file_name|>twitter.py<|end_file_name|><|fim▁begin|>from twython import Twython from django.conf import settings from .base import BaseSource <|fim▁hole|> raise ValueError self.uid = uid self.screen_name = screen_name def fetch(self): APP_KEY = settings.SOCIAL_AUTH_TWITTER_KE...
class TwitterSource(BaseSource): def __init__(self, uid=None, screen_name=None): if uid is None and screen_name is None:
<|file_name|>annotate_old_bird_calls.py<|end_file_name|><|fim▁begin|>""" Annotates Old Bird call detections in the BirdVox-70k archive. The annotations classify clips detected by the Old Bird Tseep and Thrush detectors according to the archive's ground truth call clips. This script must be run from the archive direct...
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Nefertari documentation build configuration file, created by # sphinx-quickstart on Fri Mar 27 11:16:31 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration va...
# General information about the project.
<|file_name|>_utils.py<|end_file_name|><|fim▁begin|>import sys import types import typing as t import decorator as deco from gssapi.raw.misc import GSSError if t.TYPE_CHECKING: from gssapi.sec_contexts import SecurityContext def import_gssapi_extension( name: str, ) -> t.Optional[types.ModuleType]: """...
else:
<|file_name|>test_policies.py<|end_file_name|><|fim▁begin|># Licensed to the StackStorm, Inc ('StackStorm') 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...
from st2common.persistence.action import Action
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use anyhow::*; use diesel::r2d2::{self, ConnectionManager, PooledConnection}; use diesel::sqlite::SqliteConnection; use diesel::RunQueryDsl; use std::path::Path; mod schema; pub use self::schema::*; #[allow(dead_code)] const DB_MIGRATIONS_PATH: &str = "migrations"; em...
PRAGMA busy_timeout = 60000; PRAGMA journal_mode = WAL;
<|file_name|>test_recordElement.py<|end_file_name|><|fim▁begin|>from unittest import TestCase from plivo import plivoxml from tests import PlivoXmlTestCase class RecordElementTest(TestCase, PlivoXmlTestCase): def test_set_methods(self): expected_response = '<Response><Record action="https://foo.example.co...
transcriptionType).set_transcription_url(transcriptionUrl) .set_transcription_method(transcriptionMethod).set_callback_url(
<|file_name|>lt.js<|end_file_name|><|fim▁begin|>'use strict'; var convert = require('./convert'), func = convert('lt', require('../lt')); func.placeholder = require('./placeholder'); module.exports = func;<|fim▁hole|><|fim▁end|>
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2ZwL2x0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsSUFBSSxVQUFVLFFBQVEsV0FBUixDQUFWO0lBQ0EsT0FBTyxRQUFRLElBQVIsRUFBYyxRQUFRLE9BQVIsQ0FBZCxDQUFQOztBQUVKLEtBQUssV0FBTCxHQUFtQixRQUFRLGVBQVIsQ0FBbk...
<|file_name|>cxx.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Xavier Claessens * * This library 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 2.1 of the License, or (at ...
int main (int argc, char *argv[]) { g_test_init (&argc, &argv, NULL);
<|file_name|>card.py<|end_file_name|><|fim▁begin|># img # trigger = attributes[12] # http://ws-tcg.com/en/cardlist # edit import os import requests import sqlite3 def get_card(browser): attributes = browser.find_elements_by_xpath('//table[@class="status"]/tbody/tr/td') image = attributes[0].find_element_by...
expansion = attributes[4].text if attributes[4].text else None if attributes[5].find_element_by_xpath('./img').get_attribute("src") == "http://ws-tcg.com/en/cardlist/partimages/w.gif":
<|file_name|>Fl_Fill_Dial.H<|end_file_name|><|fim▁begin|>// // "$Id: Fl_Fill_Dial.H 9637 2012-07-24 04:37:22Z matt $" <|fim▁hole|>// // Filled dial header file for the Fast Light Tool Kit (FLTK). // // Copyright 1998-2010 by Bill Spitzak and others. // // This library is free software. Distribution and use rights...
<|file_name|>generate_data_driven_dependency_metadata_test.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<<4a921be6b2ef...
test_fixture(transform_fixture, "module-without-match.graphql", "generate_data_driven_dependency_metadata/fixtures/module-without-match.expected", input, expected); }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""Module with Caffe models.""" from django.db import models from employees.models import Employee class Caffe(models.Model): """Stores one cafe.""" name = models.CharField(max_length=100, unique=True) city = models.CharField(max_length=100) stree...
related_name='my_caffe', default=None, blank=False, null=True)
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use minigrep::Config; use std::{env, process}; fn main() { let args: Vec<String> = env::args().collect(); let config = Config::new(&args).unwrap_or_else(|err| { eprintln!("problem parsing arguments: {}", err); process::exit(1); }); <|fim▁ho...
if let Err(err) = minigrep::run(config) {
<|file_name|>main.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # PROJETO LAVAGEM A SECO # # MAIN # # Felipe Bandeira da Silva # 26 jul 15 # import logging import tornado.escape import tornado.ioloop import tornado.web import tornado.options import tornado.websocket import tornado.htt...
<|file_name|>test_update_coordinator.py<|end_file_name|><|fim▁begin|>"""Tests for the update coordinator.""" import asyncio from datetime import timedelta import logging import urllib.error import aiohttp import pytest import requests from homeassistant.helpers import update_coordinator from homeassistant.util.dt imp...
await crd.async_refresh() assert crd.last_update_success is True
<|file_name|>GoogleJsonResponseExceptionFactoryTesting.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 Google 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.apa...
<|file_name|>buddhist.js<|end_file_name|><|fim▁begin|>define( //begin v1.x content { "dateFormatItem-yyyyMMMEd": "E, d MMM y G", "dateFormatItem-MMMEd": "E, d MMM", "dateFormatItem-hms": "hh:mm:ss a", "days-standAlone-wide": [ "niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobo...
"Ś", "C", "P",
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[no_mangle] pub extern "C" fn add_u32s(lhs: u32, rhs: u32) -> u32 {<|fim▁hole|>#[no_mangle] pub static TEST_VALUE: u32 = 100;<|fim▁end|>
lhs + rhs }
<|file_name|>desktop_macosx64.py<|end_file_name|><|fim▁begin|>import os import sys config = { ######################################################################### ######## MACOSX GENERIC CONFIG KEYS/VAlUES 'default_actions': [ 'clobber', 'clone-tools', 'checkout-sources', ...
}, "check_test_env": {
<|file_name|>downloadGames.js<|end_file_name|><|fim▁begin|>var fs = require('fs') var d3 = require('d3') var request = require('request') var cheerio = require('cheerio') var queue = require('queue-async') var _ = require('underscore') var glob = require("glob") var games = [] glob.sync(__dirname + "/raw-series/*")...
var href = $(this).attr('href') if (str == 'box scores' || !~href.indexOf('/boxscores/') || i % 2) return
<|file_name|>moc_mimepart.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** Meta object code from reading C++ file 'mimepart.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.7.0) ** ** WARNING! All changes made in this file will be lost! *...
static const qt_meta_stringdata_MimePart_t qt_meta_stringdata_MimePart = { { QT_MOC_LITERAL(0, 0, 8) // "MimePart"
<|file_name|>storage.go<|end_file_name|><|fim▁begin|>/* Copyright 2015 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 Unless...
limitations under the License. */ package storage
<|file_name|>test_structure.py<|end_file_name|><|fim▁begin|>import copy, time, StringIO import unittest from datetime import datetime from datetime import date from nive.utils.dataPool2.structure import * from nive.tests import __local from nive.utils.dataPool2.tests import test_Base ftypes = {} ftypes[u"data2"] =...
self.assert_(self.structure.deserialize(u"pool_meta", u"somevalue", value)[0]==u"aaa") self.assert_(self.structure.deserialize(u"pool_meta", u"somevalue", "somevalue")==u"somevalue")
<|file_name|>destructuring.rs<|end_file_name|><|fim▁begin|>fn main() { let pair = (4u32, 5u32); let (a, b) = pair; let (b, a) = (a, b); // Swap let smaller = match pair { (x, y) if x < y => x,<|fim▁hole|> match pair { (0, 0) => println!("Origin"), (0, y) => println!("Y-axis, coordin...
(_, y) => y }; }
<|file_name|>configParse.py<|end_file_name|><|fim▁begin|># # configparse.py # # an example of using the parsing module to be able to process a .INI configuration file # # Copyright (c) 2003, Paul McGuire # from pyparsing import \ Literal, Word, ZeroOrMore, Group, Dict, Optional, \ printables,...
nonrbrack = "".join( [ c for c in printables if c != "]" ] ) + " \t" nonequals = "".join( [ c for c in printables if c != "=" ] ) + " \t"
<|file_name|>slider.component.spec.ts<|end_file_name|><|fim▁begin|>/* tslint:disable:no-unused-variable */ import {SliderComponent} from "./slider.component"; describe('Component: Slider', () => { it('should create an instance', () => { let component = new SliderComponent(null, null); expect(component).toBeT...
<|file_name|>vimsupport.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011-2012 Google Inc. # 2016 YouCompleteMe contributors # # This file is part of YouCompleteMe. # # YouCompleteMe is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
# We prefix the command with 'keepjumps' so that opening the file is not # recorded in the jumplist. So when we open the file and move the cursor to # a location in it, the user can use CTRL-O to jump back to the original
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Flexx setup script. """ import os from os import path as op try: # use setuptools namespace, allows for "develop" import setuptools # noqa, analysis:ignore except ImportError: pass # it's not essential for installation from ...
long_description=__doc__, platforms='any', provides=[name],
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// src/test/os/mod.rs<|fim▁hole|> // =========================================================================== // Imports // =========================================================================== // Stdlib imports // Third-party imports // Local imports // us...
// Copyright (C) 2017 authors and contributors (see AUTHORS file) // // This file is released under the MIT License.
<|file_name|>net.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2017 The Sarielsaz Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test RPC calls related to net. Tests correspond to code ...
<|file_name|>test_buffered_pipe.py<|end_file_name|><|fim▁begin|># Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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...
self.assertEquals(b'plu', p.read(3)) self.assertEquals(b's/m', p.read(3)) self.assertEquals(b'inus', p.read(4))
<|file_name|>vsserror.rs<|end_file_name|><|fim▁begin|>// 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. // All files in the project carrying such notice may not be...
pub const VSS_E_NOT_SUPPORTED: HRESULT = 0x8004232F; pub const VSS_E_WRITERERROR_PARTIAL_FAILURE: HRESULT = 0x80042336; pub const VSS_E_ASRERROR_DISK_ASSIGNMENT_FAILED: HRESULT = 0x80042401; pub const VSS_E_ASRERROR_DISK_RECREATION_FAILED: HRESULT = 0x80042402;
<|file_name|>classes_63.js<|end_file_name|><|fim▁begin|>var searchData= [<|fim▁hole|>];<|fim▁end|>
['cache',['Cache',['../classCache.html',1,'']]], ['conversation',['Conversation',['../classConversation.html',1,'']]]
<|file_name|>ImpQual.java<|end_file_name|><|fim▁begin|>import java.util.*; import Jakarta.util.FixDosOutputStream; import java.io.*; public class ImpQual { <|fim▁hole|> public String GetName() { String result = ( ( AST_QualifiedName ) arg[0] ).GetName(); if ( arg[1].arg[0] != null ) ...
/* returns name of AST_QualifiedName */
<|file_name|>temperature-mpl115a2.js<|end_file_name|><|fim▁begin|>var five = require("../lib/johnny-five.js"); var board = new five.Board(); <|fim▁hole|> }); temperature.on("data", function() { console.log("temperature"); console.log(" celsius : ", this.celsius); console.log(" fahrenheit : ", t...
board.on("ready", function() { var temperature = new five.Temperature({ controller: "MPL115A2"
<|file_name|>test_loadbalance.py<|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 th...
<|file_name|>test_unmarshall_inquiry.py<|end_file_name|><|fim▁begin|># coding: utf-8 # Copyright (C) 2014 by Ronnie Sahlberg <ronniesahlberg@gmail.com> # Copyright (C) 2015 by Markus Rosjat <markus.rosjat@gmail.com> # SPDX-FileCopyrightText: 2014 The python-scsi Authors # # SPDX-License-Identifier: LGPL-2.1-or-later ...