prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>MchBaseResult.java<|end_file_name|><|fim▁begin|>package weixin.popular.bean.paymch; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "xml") @XmlAccessorType(XmlAccessType.FIELD) public...
}
<|file_name|>builder_test.go<|end_file_name|><|fim▁begin|>/* Copyright 2014 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/LICEN...
<|file_name|>pattern.rs<|end_file_name|><|fim▁begin|>peg::parser!( grammar test() for str { pub rule alphanumeric() = ['a'..='z' | 'A'..='Z' | '0'..='9']* pub rule inverted_pat() -> &'input str = "(" s:$([^')']*) ")" {s} pub rule capture() -> char = ['a'..='z'] pub rule capture2() -> (char, char) = a:[...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>__author__ = 'Brian Wickman' from process_provider_ps import ProcessProvider_PS from process_provider_procfs import ProcessProvider_Procfs class ProcessProviderFactory(object): """ A factory for producing platform-appropriate ProcessProviders. Typical u...
228642.19999999998 """
<|file_name|>autocompleteRenderer.js<|end_file_name|><|fim▁begin|>import {addClass, hasClass, empty} from './../helpers/dom/element'; import {eventManager as eventManagerObject} from './../eventManager'; import {getRenderer, registerRenderer} from './../renderers'; import {WalkontableCellCoords} from './../3rdparty/wal...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>//! Sodium is a next generation Vi-like editor. #![feature(stmt_expr_attributes)] #![deny(warnings)] #![deny(missing_docs)] #[cfg(feature = "orbital")] extern crate orbclient; /// Core functionality. #[macro_use] pub mod core; /// Carret primitives.<|fim▁hole|>pub mo...
<|file_name|>json.rs<|end_file_name|><|fim▁begin|>//! Experimental loader which takes a program specification in Json form. use crate::architecture::*; use crate::loader::*; use crate::memory::backing::*; use crate::memory::MemoryPermissions; use serde_json::Value; use std::fs::File; use std::io::Read; use std::path::...
if let Value::Array(ref functions) = root["functions"] { for function in functions { let address = match function["address"] {
<|file_name|>test_aws_redshift_cluster_sensor.py<|end_file_name|><|fim▁begin|># -*- coding: 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 ownership. Th...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # coding: utf-8 import os import sys from distutils.core import setup from distutils.command.install import install VERSION_NUMBER = "1.6.3" class CustomInstall(install): def run(self): install.run(self) for script in self...
translations_dir = "guicavane/Translations"
<|file_name|>listenerCollection.js<|end_file_name|><|fim▁begin|>/*! * Copyright(c) 2014 Jan Blaha */ define(["async", "underscore"], function(async, _) { var ListenerCollection = function () { this._listeners = []; }; ListenerCollection.prototype.add = function (context, listener) { ...
var currentArgs = args.slice(0); currentArgs.push(next);
<|file_name|>marker.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
/// Generalizing the latter case, any type implementing `Drop` can't be `Copy`, because it's /// managing some resource besides its own `size_of::<T>()` bytes.
<|file_name|>behaviors.js<|end_file_name|><|fim▁begin|>var sys = require('sys'), child_process = require('child_process'), vm = require('vm'), http = require('http'), querystring = require('querystring'), Persistence = require('./persistence/persistence'), request = require('request'), xml2j...
'$' + String(result.quote.latestPrice) + ' ' +
<|file_name|>celery_setup.py<|end_file_name|><|fim▁begin|>import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_secretary.settings') app = Celery('test_secretary') # Using a strin...
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
<|file_name|>extension.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; process.env.debug_sql = true; var Class = require('ee-class') , log = require('ee-log') , assert = require('assert') , fs = require('fs') , QueryCon...
}); });
<|file_name|>mininet_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import random import unittest import networkx from mininet.topo import Topo from clib.mininet_test_watcher import TopologyWatcher from clib.mininet_test_base_topo import FaucetTopoTestBase class FaucetFaultToleranceBaseTest(FaucetTop...
""" self.verify_stack_up() self.fault_events = fault_events
<|file_name|>tables.py<|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 by applicable law or ...
from django.utils.http import urlencode
<|file_name|>test_data.py<|end_file_name|><|fim▁begin|>from jupyter_workflow.data import get_fremont_data<|fim▁hole|> data = get_fremont_data() assert all(data.columns == ['West','East','Total']) assert isinstance(data.index,pd.DatetimeIndex)<|fim▁end|>
import pandas as pd def test_fremont_data():
<|file_name|>index.js<|end_file_name|><|fim▁begin|>module.exports = middleware; var states = { STANDBY: 0, BUSY: 1<|fim▁hole|> var regio = require('regio'), tessel = require('tessel'), camera = require('camera-vc0706').use(tessel.port[options.port]), app = regio.router(), hwReady = false, ...
}; function middleware(options) {
<|file_name|>kubernetes.go<|end_file_name|><|fim▁begin|>// Copyright 2017 Istio 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....
<|file_name|>perfcountertest.py<|end_file_name|><|fim▁begin|>import time import find_remove_find5<|fim▁hole|>import walk_through7 def time_find_two_smallest(find_func, lst): ...<|fim▁end|>
import sort_then_find3
<|file_name|>test_simple09.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelCompari...
<|file_name|>contact.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of...
class Contacts(Items): name_property = "contact_name" inner_class = Contact
<|file_name|>menu_login.py<|end_file_name|><|fim▁begin|>""" Menu-driven login system Contribution - Griatch 2011 This is an alternative login system for Evennia, using the contrib.menusystem module. As opposed to the default system it doesn't use emails for authentication and also don't auto-creates a Character with...
def func(self): "Execute the command" player = managers.players.get_player_from_name(self.args) if not player:
<|file_name|>CalcRSI.java<|end_file_name|><|fim▁begin|>package com.chariotinstruments.markets; import java.util.ArrayList; /**<|fim▁hole|> private MarketDay marketDay; private ArrayList<MarketCandle> marketCandles; private double gainAverage; private double lossAverage; public CalcRSI(MarketDay m...
* Created by user on 1/30/16. */ public class CalcRSI {
<|file_name|>main.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>fn main() { let mut numbers = Vec::new(); for arg in std::env::args().skip(1) { numbers.push(u64::from_str(&arg).expect("error parsing argument")); } if numbers.len() == 0 { writeln!(std::io::stderr(), "Usage: gcd NUMBER ......
use std::io::Write; use std::str::FromStr;
<|file_name|>win32.py<|end_file_name|><|fim▁begin|>"""SCons.Platform.win32 Platform-specific initialization for Win32 systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, ...
for arg in args: # are there more possibilities to redirect stdout ? if (string.find( arg, ">", 0, 1 ) != -1 or string.find( arg, "1>", 0, 2 ) != -1):
<|file_name|>TangramToolWindow.cpp<|end_file_name|><|fim▁begin|>/******************************************************************************** * Tangram Library - version 8.0 * ********************************************************************************* * Copyright (C) 2002-2015 by Tangram Team. ...
#include "TangramToolWindow.h" #include "TangramVSIApp.h"
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate nickel; extern crate tera; extern crate postgres; use postgres::{Connection, SslMode}; use nickel::{Nickel, HttpRouter, StaticFilesHandler, FormBody}; use tera::{Tera, Context}; use std::collections::HashMap; //use std::str; fn main() { ...
<|file_name|>role.doc.js<|end_file_name|><|fim▁begin|>/** * getRoles - get all roles * * @api {get} /roles Get all roles * @apiName GetRoles * @apiGroup Role * * * @apiSuccess {Array[Role]} raw Return table of roles * @apiSuccessExample {json} Success-Response: * HTTP/1.1 200 OK * [ * { * ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db.models import Q from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.utils.timezone import now from django.conf import settings from django i...
message_id = message_id or \ "msg-%s-%s@%s" % (template_name, MDT(), site.domain) # create
<|file_name|>Ask_For_Record_Details_Confirmation.py<|end_file_name|><|fim▁begin|>## This file is part of Invenio. ## Copyright (C) 2008, 2010, 2011 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 Software Fou...
rec_title = "".join(["%s<br />\n" % cgi.escape(title.strip()) for title in \
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ConservationFeature' db.create_t...
'Meta': {'object_name': 'ConservationFeature'}, 'dbf_fieldname': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True', 'blank': 'True'}), 'level1': ('django.db.models.fields.CharField', [], {'max_length': '99'}),
<|file_name|>rename_resources.py<|end_file_name|><|fim▁begin|>import os import sys import fnmatch directory = os.path.dirname(os.path.realpath(sys.argv[0])) #get the directory of your script for subdir, dirs, files in os.walk(directory): print(files)<|fim▁hole|> newFilePath = filePath.replace("mpsdk_","px_") #create...
for filename in files: if fnmatch.fnmatch(filename,'mpsdk_*') > 0: subdirectoryPath = os.path.relpath(subdir, directory) #get the path to your subdirectory filePath = os.path.join(subdirectoryPath, filename) #get the path to your file
<|file_name|>ntil.js<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2015, Legendum Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the...
wait = waitSecs, calls = 0; function next() {
<|file_name|>shader_test.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python '''Tests rendering using shader objects from core GL or extensions Uses the: Lighthouse 3D Tutorial toon shader http://www.lighthouse3d.com/opengl/glsl/index.php?toon2 By way of: http://www.pygame.org/wiki/GLSLExample ''' ...
<|file_name|>news_item.py<|end_file_name|><|fim▁begin|>import re import string import nltk from bs4 import BeautifulSoup __author__ = 'nolram' class NewsItem: def __init__(self, news, stop_words): self.all_words = [] self.stop_words = stop_words self.regex = re.compile('[%s]' % re.escap...
for w in freqs.keys(): l.append("%-20s %d" % (w, freqs.get(w)))
<|file_name|>frameRedirect.ts<|end_file_name|><|fim▁begin|>import * as angular from 'angular'; import appConfig from './config/app.config'; import adalConfig from './config/app.config.adal'; import routeConfig from './config/app.config.routes'; import '@uirouter/core'; import '@uirouter/angularjs'; import 'adal-angu...
<|file_name|>logging-enabled.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.org...
// xfail-fast // exec-env:RUST_LOG=logging-enabled=info use std::logging;
<|file_name|>aivdmDecode.js<|end_file_name|><|fim▁begin|>var _ = require('underscore'); var colors = require('colors'); var sprintf = require('sprintf-js').sprintf; /** * used to decode AIS messages. * Currently decodes types 1,2,3,4,5,9,18,19,21,24,27 * Currently does not decode 6,7,8,10,11,12,13,14,15,16,1...
<|file_name|>cellGcmSys.cpp<|end_file_name|><|fim▁begin|>#include "stdafx.h" #include "Emu/SysCalls/SysCalls.h" #include "Emu/SysCalls/SC_FUNC.h" #include "Emu/GS/GCM.h" void cellGcmSys_init(); void cellGcmSys_load(); void cellGcmSys_unload(); Module cellGcmSys(0x0010, cellGcmSys_init, cellGcmSys_load, cellGcmSys_unlo...
{ return CELL_GCM_ERROR_INVALID_VALUE; }
<|file_name|>common_test.go<|end_file_name|><|fim▁begin|>package connectors import ( "regexp" "sync" "testing" "github.com/etcinit/phabulous/app/interfaces" "github.com/etcinit/phabulous/app/testing/mocks" "github.com/golang/mock/gomock" "github.com/stretchr/testify/assert" ) func Test_processMessage_WithSelf...
var wg sync.WaitGroup
<|file_name|>test_api_system.py<|end_file_name|><|fim▁begin|># # Copyright (c) 2014, Arista Networks, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code mu...
<|file_name|>gui5.py<|end_file_name|><|fim▁begin|>"""Tables, Widgets, and Groups! An example of tables and most of the included widgets. """ import pygame from pygame.locals import * # the following line is not needed if pgu is installed import sys; sys.path.insert(0, "..") from pgu import gui # Load an alternate t...
c.tr() c.td(gui.Label("Slider")) c.td(gui.HSlider(value=23,min=0,max=100,size=20,width=120),colspan=3)
<|file_name|>presale.rs<|end_file_name|><|fim▁begin|>// Copyright 2015-2017 Parity Technologies (UK) Ltd. // This file is part of Parity. // Parity is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either ver...
// You should have received a copy of the GNU General Public License
<|file_name|>AsyncHTTPClient.cpp<|end_file_name|><|fim▁begin|>#include "AsyncHTTPClient.h" #include "../httprequest.h" #include "../GlobalFuncs.h" #include <comutil.h> #include <winhttp.h> AsyncHTTPClient::AsyncHTTPClient() : m_url(""), m_currentStatus(AsyncHTTPClient::HTTP_READY), m_response(""), m_respo...
long dims = SafeArrayGetDim(responseRaw.parray); if (dims == 1) {
<|file_name|>test_agraph.py<|end_file_name|><|fim▁begin|>"""Unit tests for PyGraphviz interface.""" import os import tempfile import pytest import pytest pygraphviz = pytest.importorskip('pygraphviz') from networkx.testing import assert_edges_equal, assert_nodes_equal, \ assert_graphs_equal import networkx a...
A = nx.nx_agraph.to_agraph(G) H = nx.nx_agraph.from_agraph(A) self.assert_equal(G, H)
<|file_name|>about_test.go<|end_file_name|><|fim▁begin|><|fim▁hole|> "bytes" "testing" "github.com/Masterminds/glide/msg" ) func TestAbout(t *testing.T) { var buf bytes.Buffer old := msg.Default.Stdout msg.Default.Stdout = &buf About() if buf.Len() < len(aboutMessage) { t.Errorf("expected this to match abou...
package action import (
<|file_name|>ExtendedImplementation.java<|end_file_name|><|fim▁begin|>package org.apache.sftp.protocol.packetdata; <|fim▁hole|> import org.apache.sftp.protocol.Response; public interface ExtendedImplementation<T extends Extended<T, S>, S extends Response<S>> extends Implementation<T> { public Stri...
<|file_name|>message.py<|end_file_name|><|fim▁begin|># Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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 restriction, includi...
HeaderName: HeaderValue This variation encodes/decodes the body of the message in base64 automatically.
<|file_name|>NewList.py<|end_file_name|><|fim▁begin|># Simple class SimgleList class SingleList: """Documentation for SingleList """ def __init__(self, initial_list=None): self.__list = [] if initial_list: for value in initial_list: if value not in self.__...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2013-2015 Julian Metzler """ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the Licens...
url = metadata['url'], keywords = metadata['keywords'], packages = find_packages(),
<|file_name|>forwarding_rule_rules_scanner_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 The Forseti Security 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 Licens...
violations = scanner._find_violations(gcp_forwarding_rules_resource_objs) self.assertEqual(4, len(violations))
<|file_name|>modeling.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2014 The ProteinDF development team. # see also AUTHORS and README if provided. # # This file is a part of the ProteinDF software package. # # The ProteinDF is free software: you can redistribute it and/...
<|file_name|>族語辭典1轉檔.py<|end_file_name|><|fim▁begin|>from os import makedirs from os.path import join from posix import listdir from django.conf import settings from django.core.management.base import BaseCommand from libavwrapper.avconv import Input, Output, AVConv from libavwrapper.codec import AudioCodec, NO_VIDEO...
for 檔名 in sorted(listdir(語料目錄)): if 檔名.endswith('.mp3'):
<|file_name|>waves.js<|end_file_name|><|fim▁begin|>/*! * Waves v0.5.3 * http://fian.my.id/Waves * * Copyright 2014 Alfiana E. Sibuea and other contributors * Released under the MIT license * https://github.com/fians/Waves/blob/master/LICENSE */ ;(function(window) { 'use strict'; var Waves = Waves ...
wrapper.appendChild(el);
<|file_name|>CreateInstanceRequestOrBuilder.java<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache....
* <code>string instance_id = 2 [(.google.api.field_behavior) = REQUIRED];</code> *
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate gfx; extern crate gfx_support; extern crate image; use std::io::Cursor; use std::time::Instant; use gfx::format::Rgba8; use gfx_support::{BackbufferView, ColorFormat}; use gfx::{Bundle, GraphicsPoolExt}; gfx_defines!{<|fim▁hole|> } co...
vertex Vertex { pos: [f32; 2] = "a_Pos", uv: [f32; 2] = "a_Uv",
<|file_name|>types.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Netflix, 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 //<...
// Unless required by applicable law or agreed to in writing, software
<|file_name|>PathOpsOpCubicThreadedTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright 2012 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "PathOpsExtendedTest.h" #include "PathOpsThreadedCommon.h" static void testOpCubicsMain(PathO...
<|file_name|>validate-header.hook.ts<|end_file_name|><|fim▁begin|>// FoalTS import { ValidateFunction } from 'ajv'; import { ApiParameter, ApiResponse, Context, Hook, HookDecorator, HttpResponseBadRequest, IApiHeaderParameter, OpenApi, ServiceManager } from '../../core'; import { getAjvInstance } from...
required: required ? [ name ] : [], type: 'object',
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>import lxml.html from .bills import NHBillScraper from .legislators import NHLegislatorScraper from .committees import NHCommitteeScraper metadata = { 'abbreviation': 'nh', 'name': 'New Hampshire', 'capitol_timezone': 'America/New_York', 'legislatur...
<|file_name|>0004_auto__add_item__add_time.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Item' db.create_t...
<|file_name|>field_mixins.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.forms import fields from django.forms import widgets from djng.forms import field_mixins from . import widgets as bs3widgets class BooleanFieldMixin(field_mixins.BooleanFieldMixin): def get_converted_widget(self): ...
if isinstance(self.widget, widgets.RadioSelect): self.widget_css_classes = None if not isinstance(self.widget, bs3widgets.RadioSelect):
<|file_name|>test_qipackage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Test QiPackage """ from __future__ import absolute_import f...
dest = tmpdir.join("dest")
<|file_name|>0008_auto_20151224_1528.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-24 15:28 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('emailer', '0007_auto_20150...
operations = [ migrations.AlterField(
<|file_name|>icon.js<|end_file_name|><|fim▁begin|>import { Class } from '../mixin/index'; export default function (UIkit) { UIkit.component('icon', UIkit.components.svg.extend({ mixins: [Class], name: 'icon', args: 'icon', <|fim▁hole|> defaults: {exclude: ['id', 'style'...
props: ['icon'],
<|file_name|>auth.ts<|end_file_name|><|fim▁begin|>import fetch from './util/fetch-wrapper'; import config, { baseUrl, clientAuthorization, isTokenExpired, token, } from './util/config'; import qsEncode from './util/qs-encode'; export interface IAOuthToken { access_token: string; refresh_token: string; expires_...
isTokenExpired() { return isTokenExpired(); },
<|file_name|>log.cpp<|end_file_name|><|fim▁begin|>#include "log.h" #include <iostream> using WhatsAcppi::Util::Log; using std::cout; using std::endl;<|fim▁hole|>} Log::~Log(){ cout << this->ss.str() << endl; } void Log::setLogLevel(Log::LogMsgType level){ Log::logLevel = level; }<|fim▁end|>
Log::LogMsgType Log::logLevel = CriticalMsg; Log::Log(Log::LogMsgType type) : level(type) {
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import pytest from pontoon.test import factories @pytest.fixture def admin(): """Admin - a superuser""" return factories.UserFactory.create(username="admin", is_superuser=True,) @pytest.fixture def client_superuser(client, admin): """Provides a client w...
def resource_b(project_b): return factories.ResourceFactory(
<|file_name|>string-lit.rs<|end_file_name|><|fim▁begin|>// rustfmt-force_format_strings: true // rustfmt-error_on_line_overflow: false // Long string literals fn main() -> &'static str { let str = "AAAAAAAAAAAAAAaAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAaAA \ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAa...
} }
<|file_name|>api_mock.py<|end_file_name|><|fim▁begin|>import datetime class FakeHeatTemplateManager(object): def __init__(self): self.templates = { 1: 'Dummy description #1.', 3: 'Dummy description #3.', 4: 'Dummy description #4.', 6: 'Dummy description #6.'...
self.expired_stacks = {} return purged def extend_stack_validity(self, name, days):
<|file_name|>ScoreBox.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import { onlyInParentGroup, ScoreHistory, ScoreHistoryEntry } from '../../../../definitions/ScoreSystem' import { text } from '../../../utils/text' import { BatchScores, ScoreDetails } from '../../../../calculators/calcScore' import {...
const HistoryEntry = (props: { entry: ScoreHistoryEntry }) => (
<|file_name|>say.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Michael DeHaan <michael@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type...
<|file_name|>xhrio.js<|end_file_name|><|fim▁begin|>// Copyright 2006 The Closure Library 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://ww...
<|file_name|>17.py<|end_file_name|><|fim▁begin|>import struct<|fim▁hole|> ''' Refer to docs for all the exact formats. There are many so check them out before converting things yourself ''' ''' If there's a specific offset you want to do things from, use pack_into and unack_into from the docs ''' #Integer to string i1...
<|file_name|>atom.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ werkzeug.contrib.atom ~~~~~~~~~~~~~~~~~~~~~ This module provides a class called :class:`AtomFeed` which can be used to generate feeds in the Atom syndication format (see :rfc:`4287`). Example:: def atom_feed(req...
yield ' </author>\n' if self.subtitle: yield ' ' + _make_text_block('subtitle', self.subtitle,
<|file_name|>regionmanip.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/lic...
} }
<|file_name|>lxd.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. // +build go1.3 package lxd import ( "github.com/juju/loggo" "github.com/juju/juju/environs/tags" "github.com/juju/juju/provider/lxd/lxdclient" ) // The metadata keys use...
)
<|file_name|>images.d.ts<|end_file_name|><|fim▁begin|>declare module "*.png"<|fim▁hole|><|fim▁end|>
declare module "*.webp"
<|file_name|>cargo_common_metadata.rs<|end_file_name|><|fim▁begin|>//! lint on missing cargo common metadata use clippy_utils::{diagnostics::span_lint, is_lint_allowed}; use rustc_hir::hir_id::CRATE_HIR_ID; use rustc_lint::{LateContext, LateLintPass}; use rustc_session::{declare_tool_lint, impl_lint_pass}; use rustc_s...
missing_warning(cx, &package, "package.description");
<|file_name|>mnist_model.py<|end_file_name|><|fim▁begin|># Copyright 2017 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.apach...
return x # TODO(chrisying): objective score (e.g. MNIST score)
<|file_name|>qt4.py<|end_file_name|><|fim▁begin|># Copyright 2015 The Meson development team # 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 ...
raise MesonException('Rcc compiler is not for Qt 4. Output:\n%s\n%s' % (stdout, stderr))
<|file_name|>create_restore.py<|end_file_name|><|fim▁begin|>''' Dialogs and widgets Responsible for creation, restoration of accounts are defined here. Namely: CreateAccountDialog, CreateRestoreDialog, RestoreSeedDialog ''' from functools import partial from kivy.app import App from kivy.clock import Clock from kivy...
#:import Window kivy.core.window.Window #:import _ electrum.i18n._
<|file_name|>RiskScatterPanel.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 und...
import pprint import random import wx import armid
<|file_name|>suite.spec.js<|end_file_name|><|fim▁begin|>'use strict'; var assert = require('assert'); var run = require('./helpers').runMocha; var args = []; describe('suite w/no callback', function() { it('should throw a helpful error message when a callback for suite is not supplied', function(done) { run( ...
args, function(err, res) { if (err) { return done(err);
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import division <|fim▁hole|><|fim▁end|>
__author__ = 'youval.dar'
<|file_name|>CodeImpl.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * Copyright (c) 2006, 2009 David A Carlson * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License ...
* @generated */ @Override protected EClass eStaticClass() {
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Implements counterwallet asset-related support as a counterblock plugin DEPENDENCIES: This module requires the assets module to be loaded before it. Python 2.x, as counterblock is still python 2.x """ import os import sys import time import datetime import log...
result[i]['count'], midline[i] ])
<|file_name|>mutations.js<|end_file_name|><|fim▁begin|>export default { cache: function (state, payload) { state.apiCache[payload.api_url] = payload.api_response; }, addConfiguredType: function (state, type) { state.configuredTypes.push(type); }, removeConfiguredType: function (state, index) { ...
state.configuredTypes.splice(i, 1); state.configuredTypes.push(type); // Avoid too keep looping over a spliced array
<|file_name|>not_understood.rs<|end_file_name|><|fim▁begin|>use crate::messages::Message; use serde_derive::{Deserialize, Serialize}; #[derive(Clone, Debug, Deserialize, Serialize)] pub struct NotUnderstood { pub path: Vec<String>, } impl Message for NotUnderstood { fn name(&self) -> String { String::...
// Assert assert_eq!(outgoing.result_type, "NOT_UNDERSTOOD");
<|file_name|>ScrollText.cpp<|end_file_name|><|fim▁begin|>// ScrollText.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "ScrollText.h" #include "ScrollTextDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ////////...
//{{AFX_MSG_MAP(CScrollTextApp)
<|file_name|>macros.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/. */ #[macro_export] macro_rules! make_getter( ( $attr:ident, $...
let mut $name = $crate::dom::bindings::trace::RootedVec::new(&mut root); }; (let $name:ident <- $iter:expr) => {
<|file_name|>scalar.rs<|end_file_name|><|fim▁begin|>use std::cmp; use std::fmt; use std::ops; use num; use math::common::LinearInterpolate; pub type IntScalar = i32; #[cfg(not(feature = "float64"))] pub type FloatScalar = f32; #[cfg(feature = "float64")]<|fim▁hole|> Self: Copy + Clone + fmt::Debug + cmp::PartialOr...
pub type FloatScalar = f64; pub trait BaseNum where
<|file_name|>Init.cpp<|end_file_name|><|fim▁begin|>/* Copyright_License { XCSoar Glide Computer - http://www.xcsoar.org/ Copyright (C) 2000-2016 The XCSoar Project A detailed list of copyright holders can be found in the file "AUTHORS". This program is free software; you can redistribute it and/or modify it...
{
<|file_name|>i386_apple_ios.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 // http://www.apache.org/...
// option. This file may not be copied, modified, or distributed // except according to those terms. use target::Target;
<|file_name|>CorporateActionRate21.go<|end_file_name|><|fim▁begin|>package iso20022 // Specifies rate details. type CorporateActionRate21 struct { // Quantity of additional intermediate securities/new equities awarded for a given quantity of securities derived from subscription. AdditionalQuantityForSubscribedResul...
}
<|file_name|>frames.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict as odict from values import decode_kv_pairs, encode_kv_pairs from loops import decode_loops, encode_loops<|fim▁hole|>def split_frames(lines): ''' splits a list of lines into lines that are not part of a frame, and a list...
<|file_name|>test_03_filter6.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python #encoding:utf8 # # file: filter6_tests.py # author: sl0 # date: 2013-03-06 # import unittest from adm6.filter6 import IP6_Filter, Ip6_Filter_Rule from sys import stdout from os.path import expanduser as homedir from ipaddr import I...
fr['Destin'] = "2001:db8:2::1" fr['Protocol'] = "ip6" fr['dport'] = "all" fr['System-Forward'] = True
<|file_name|>DebianPackageManagerData.cpp<|end_file_name|><|fim▁begin|>//%2005//////////////////////////////////////////////////////////////////////// // // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Copyright (c) 2003 BMC Sof...
PEGASUS_NAMESPACE_END
<|file_name|>SpellAuras.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2005-2013 MaNGOS <http://getmangos.com/> * * 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 th...
if (target->GetTypeId() != TYPEID_PLAYER)