prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>fi.js<|end_file_name|><|fim▁begin|>tinymce.addI18n('fi',{ "Cut": "Leikkaa", "Header 2": "Otsikko 2", "Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X\/C\/V keyboard shortcuts instead.": "Selaimesi ei tue leikekirjan suoraa k\u00e4ytt\u00e4mist\u00e4. Ole hyv\u00e4 ja k\u0...
"Replace all": "Korvaa kaikki", "Match case": "Erota isot ja pienet kirjaimet",
<|file_name|>Poster.java<|end_file_name|><|fim▁begin|>package rb; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Random; import java.util.Timer; import java.util.TimerTask; import javax.persistence.TypedQuery; import rb.helpers.ClassificationResult; import rb.helpe...
<|file_name|>SentenceScreenFitting_001.py<|end_file_name|><|fim▁begin|>class Solution(object): def wordsTyping(self, sentence, rows, cols): """ :type sentence: List[str] :type rows: int :type cols: int :rtype: int """ cnt = 0 start = 0 row_circ...
circle.append(cnt) if not start: break ncircle = len(circle)
<|file_name|>normalize_test.go<|end_file_name|><|fim▁begin|>// Copyright 2011 The Go 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 norm import ( "strings" "testing" ) type PositionTest struct { input string pos in...
func firstBoundaryF(rb *reorderBuffer, s string) int { return rb.f.form.FirstBoundary([]byte(s))
<|file_name|>doc-inside-trait-item.rs<|end_file_name|><|fim▁begin|>trait User{ fn test(); /// empty doc //~^ ERROR found a documentation comment that doesn't document anything }<|fim▁hole|>fn main() {}<|fim▁end|>
<|file_name|>SubusersGetRequest.py<|end_file_name|><|fim▁begin|>''' Created by auto_sdk on 2014-12-17 17:22:51 ''' from top.api.base import RestApi <|fim▁hole|>class SubusersGetRequest(RestApi): def __init__(self,domain='gw.api.taobao.com',port=80): RestApi.__init__(self,domain, port) self.user_nick = None ...
<|file_name|>pool.rs<|end_file_name|><|fim▁begin|>//! Client Connection Pooling use std::borrow::ToOwned; use std::collections::HashMap; use std::io::{self, Read, Write}; use std::net::{SocketAddr, Shutdown}; use std::sync::{Arc, Mutex}; use net::{NetworkConnector, NetworkStream, HttpConnector, ContextVerifier}; /// ...
self.inner.as_mut().unwrap().1.peer_addr() }
<|file_name|>apply.js<|end_file_name|><|fim▁begin|>// ***************************************************************************** // Copyright 2013-2019 Aerospike, 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 o...
<|file_name|>container.py<|end_file_name|><|fim▁begin|>from widget import Widget from gui_util import intersect # Simple container, list of children is not meant to be mutable class Container(Widget): def __init__(self, width, height): super(Container, self).__init__(width, height) self.children = ...
self.curFocus += 1 self.curFocus = 0
<|file_name|>_Bullseye.cpp<|end_file_name|><|fim▁begin|>/* * _Bullseye.cpp * * Created on: Aug 21, 2015 * Author: yankai */ #include "_Bullseye.h" #ifdef USE_OPENCV #ifdef USE_CUDA namespace kai { _Bullseye::_Bullseye() { m_abs = 90; m_scale1 = 0.25; m_scale2 = 0.0625; m_thr1 = 200; m_thr2 = 255; } ...
gThr.download(mThr); vector< vector< Point > > vvContours; findContours(mThr, vvContours, RETR_EXTERNAL, CHAIN_APPROX_NONE);
<|file_name|>build_gecko.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/. */ mod common { use std::env; use std::path::{Path, ...
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <string> using namespace std; int main(){ int n; string experiment; for(cin>>n; n>0; n--){ cin >> experiment; if (experiment.size() < 3) cout << '+' << endl; else{<|fim▁hole|> else{ s = s[1]; saux = e...
string s = experiment.substr(experiment.size()-2, 2); string saux; if(s == "35") cout << '-' << endl;
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms class ExampleForm(forms.Form):<|fim▁hole|> widget=forms.TextInput(attrs={ 'placeholder': "Must not be blank!", }), )<|fim▁end|>
non_blank_field = forms.CharField(max_length=100,
<|file_name|>groupby.js<|end_file_name|><|fim▁begin|>/* */ "format cjs"; /** * Groups the elements of an observable sequence according to a specified key selector function and comparer and selects the resulting elements by using a specified function. * * @example<|fim▁hole|> * 3 - observable.groupBy(fun...
* var res = observable.groupBy(function (x) { return x.id; }); * 2 - observable.groupBy(function (x) { return x.id; }), function (x) { return x.name; });
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ Setup script to build a standalone apdumanager.exe executable on windows using py2exe. Run: python.exe setup.py py2exe, to build executable file. __author__ = "http://www.gemalto.com" Copyright 2001-2012 gemalto Author: Jean-Daniel ...
import py2exe
<|file_name|>ContextWrapper.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006 The Android Open Source Project * * 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|>XInputGameController.cpp<|end_file_name|><|fim▁begin|>//Copyright (c) 2017 Finjin // //This file is part of Finjin Engine (finjin-engine). // //Finjin Engine is distributed in the hope that it will be useful, //but WITHOUT ANY WARRANTY; without even the implied warranty of //MERCHANTABILITY or FITNESS FOR ...
impl->instanceName += Convert::ToString(impl->index + 1);
<|file_name|>objects.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from math import e, exp, pi, cos, sin, sqrt, atan2 class Goal: def __init__(self, pos): self.pos= pos self.size = 8 self.theta = atan2(pos.y,pos.x) class Landmark: def __init__(self): self.pos= vec2d(0...
from vec2d import vec2d
<|file_name|>registry.py<|end_file_name|><|fim▁begin|># # Copyright 2014 Infoxchange Australia # # 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-...
""" self[name] = cls
<|file_name|>pandas 5 - Column Operations (Basic mathematics, moving averages).py<|end_file_name|><|fim▁begin|>import pandas as pd from pandas import DataFrame df = pd.read_csv('sp500_ohlc.csv', index_col = 'Date', parse_dates=True) #notice what i did, since it is an object df['H-L'] = df.High - df.Low<|fim▁hole|> ...
<|file_name|>LightBeam.js<|end_file_name|><|fim▁begin|>/** * Original shader from http://glsl.heroku.com/e#4122.10 * Tweaked, uniforms added and converted to Phaser/PIXI by Richard Davey */ Phaser.Filter.LightBeam = function (game) { Phaser.Filter.call(this, game); this.uniforms.alpha = { type: '1f', ...
set: function(value) {
<|file_name|>osresources.py<|end_file_name|><|fim▁begin|># 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.0...
def list_users(self): return self.client.users.list()
<|file_name|>UprightOrbiter.java<|end_file_name|><|fim▁begin|>package tim.prune.threedee; import java.awt.event.InputEvent; /* * Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the fol...
<|file_name|>pairwise.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Mathieu Blondel <mathieu@mblondel.org> # Robert Layton <robertlayton@gmail.com> # Andreas Mueller <amueller@ais.uni-bonn.de> # Philippe Gervais...
<|file_name|>FormatUtil.java<|end_file_name|><|fim▁begin|>package biz.dealnote.messenger.util; import android.content.Context; import android.text.Spannable; import java.text.DateFormat; import java.util.Date; import biz.dealnote.messenger.R; import biz.dealnote.messenger.link.internal.OwnerLinkSpanFactory; /** * ...
public static Spannable formatCommunityBanInfo(Context context, int adminId, String adminName, long endDate, OwnerLinkSpanFactory.ActionListener adminClickListener){
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use nickel::{HttpRouter, Router}; pub use config::{Config}; pub mod handlers; pub mod models; pub fn routers() -> Router<Config> { let mut router = Router::new(); router.get("/", handlers::main::get_main);<|fim▁hole|> router.get("/pages", handlers::pages:...
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Helper utilities and decorators.""" from flask import flash, render_template, current_app def flash_errors(form, category="warning"): """Flash all errors for a form.""" for field, errors in form.errors.items(): for error in ...
:param kwargs:
<|file_name|>rewriter.py<|end_file_name|><|fim▁begin|>import copy import os from visitor import * from stringstream import * class Rewriter(NodeVisitor): """ Class for rewriting of the original AST. Includes: 1. the initial small rewritings, 2. transformation into our representation, 3. transforming fr...
try: m[i] = k.name except AttributeError: try:
<|file_name|>SQLite.cpp<|end_file_name|><|fim▁begin|>/* * SQLite.cpp * * Created on: Aug 1, 2012 * Author: lion */ #include "SQLite.h" #include "ifs/db.h" #include "DBResult.h" #include "Buffer.h" namespace fibjs { #define SQLITE_OPEN_FLAGS \ SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | \ SQLITE_O...
connString += 7; obj_ptr<SQLite> db = new SQLite();
<|file_name|>get_software_catalogue.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
resource_get_info_product_instance = "/sdc/rest/vdc/" + vdc + "/productInstance/" + vm_fqn + '_' + product_name + '_' + product_version print('Get Product Instance Info. Product ' + product_name )
<|file_name|>project_info.py<|end_file_name|><|fim▁begin|>#-------------------------------------------------------------<|fim▁hole|># # 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 # rega...
<|file_name|>info.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 Klaudiusz Staniek # # 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|>QueryContextRequestVector_test.cpp<|end_file_name|><|fim▁begin|>/* * * Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U * * This file is part of Orion Context Broker. * * Orion Context Broker is free software: you can redistribute it and/or * modify it under the terms of the GNU Affero General P...
<|file_name|>BGAreaEditController.java<|end_file_name|><|fim▁begin|>/** * OLAT - Online Learning and Training<br> * http://www.olat.org * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the...
* initalize the group to area association tab
<|file_name|>Entity3D.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2006-2010 - Frictional Games * * This file is part of HPL1 Engine. * * HPL1 Engine 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 Foundatio...
<|file_name|>EliminationAsk.java<|end_file_name|><|fim▁begin|>package aima.core.probability.bayes.exact; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import aima.core.probability.CategoricalDistri...
<|file_name|>order.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Customer, CustomerService } from '../customer-manage/customer.service'; import { Material, MaterialService, Category } from '../material-manage/material.service'; import { copy } from '../common'; import { In...
<|file_name|>muv_common.py<|end_file_name|><|fim▁begin|># <pep8-80 compliant> # ##### BEGIN GPL LICENSE BLOCK ##### # # 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...
__date__ = "13 Nov 2016"
<|file_name|>find_extended.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # **********...
definition.add_section("region", "region") definition.sections["region"].add_optional("default_radius", "real", "default radius", 20.0)
<|file_name|>task.hpp<|end_file_name|><|fim▁begin|>/************************************************************************** * * * Grov - Google Reader offline viewer * * ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import datetime import os from django.conf import settings from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse from django.db import models from django.utils import timezone from comics.core.managers import ComicManag...
class Image(models.Model): # Required fields comic = models.ForeignKey(Comic) file = models.ImageField(
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, th...
import glob import nupic
<|file_name|>users.resource.js<|end_file_name|><|fim▁begin|>(function(){ 'use strict'; angular .module('app') .factory('ceUsers', ceUsers); ceUsers.$inject = ['$resource']; function ceUsers ($resource) {<|fim▁hole|> console.log('ok'); return $resource('https://mysterious-eyrie-9135.herokuapp.com...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from flask import Blueprint, current_app, request, render_template, abort, url_for, redirect from pymongo import DESCENDING import arrow from widukind_web import constants from widukind_web.extensions import auth from widukind_web.extensions ...
query_update["enable"] = True queries.col_datasets().find_one_and_update(query, {"$set": query_update})
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>import numpy as np from pysal.lib.common import requires @requires('matplotlib') def shift_colormap(cmap, start=0, midpoint=0.5, stop=1.0, name='shiftedcmap'): ''' Function to offset the "center" of a colormap. Useful for data with a negative min and posit...
path to save the figure. Default is None. Not to save figure. '''
<|file_name|>issue-25368.rs<|end_file_name|><|fim▁begin|>// Copyright 2014-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.or...
tx.send(Foo{ foo: PhantomData }); //~ ERROR E0282 }); }
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/* * Copyright 2013 Mirantis, 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...
from: '__COMMIT_SHA__', to: function() {
<|file_name|>dnsdisttests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2 import copy import Queue import os import socket import struct import subprocess import sys import threading import time import unittest import dns import dns.message import libnacl import libnacl.utils class DNSDistTest(unittest.TestCas...
return response
<|file_name|>expression.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {AbsoluteSourceSpan} from '@angular/compiler'; import ...
<|file_name|>ReactCompositeComponent.js<|end_file_name|><|fim▁begin|>/** * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be fo...
<|file_name|>dynamicCacheControl.test.ts<|end_file_name|><|fim▁begin|>import { GraphQLScalarType, GraphQLFieldResolver, GraphQLTypeResolver, GraphQLIsTypeOfFn, } from 'graphql'; import { makeExecutableSchemaWithCacheControlSupport } from './cacheControlSupport'; import { CacheScope } from '../'; import { colle...
it('should set the scope for a field from a dynamic cache hint', async () => { const typeDefs = ` type Query { droid(id: ID!): Droid @cacheControl(maxAge: 60)
<|file_name|>Label.js<|end_file_name|><|fim▁begin|>'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of'); var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf); var _classCallCheck2 = require('babel-runt...
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use std::env; use std::io::{stderr, Write}; use std::path::{Path}; use std::process::exit; use std::fs::metadata; use std::os::unix::fs::MetadataExt; use libc::getuid; use unshare::Command; use options::build_mode::build_mode; use config::find_config; use config::read_...
<|file_name|>browsertime.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node 'use strict'; const Engine = require('../').Engine; const browserScripts = require('../lib/support/browserScript'); const logging = require('../').logging; const cli = require('../lib/support/cli'); const StorageManager = require('../lib/supp...
if (testScript.setUp) {
<|file_name|>small_phrases.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from pypinyin.phrases_dict import phrases_dict from pypinyin import pinyin, TONE phrases_list = set() phrases_same = set() for han, pys in phrases_dict.items(): if pinyin(han, style=TONE, heteronym=True) != ...
phrases_list.add(han) else:
<|file_name|>filelistfilter.cpp<|end_file_name|><|fim▁begin|>/* Copyright (C) 2007 The SpringLobby Team. All rights reserved. */ // #ifndef NO_TORRENT_SYSTEM #ifdef _MSC_VER #ifndef NOMINMAX #define NOMINMAX #endif // NOMINMAX #include <winsock2.h> #endif // _MSC_VER #include <wx/stattext.h> #include <wx/sizer.h...
m_filter_type_sizer = new wxBoxSizer( wxHORIZONTAL );
<|file_name|>page-not-found.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit } from '@angular/core'; /** * Creator: ACN * Date: 1.12.2016<|fim▁hole|> selector: 'app-page-not-found-component', templateUrl: 'page-not-found.component.html', styleUrls: ['page-not-found.component.css'] }) export ...
*/ @Component({
<|file_name|>environ_network_test.go<|end_file_name|><|fim▁begin|>// Copyright 2020 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package azure_test import ( "github.com/Azure/azure-sdk-for-go/services/network/mgmt/2018-08-01/network" "github.com/Azure/go-autorest/autorest/to" "github....
c.Assert(ok, jc.IsTrue) subs, err := netEnv.Subnets(s.callCtx, instance.UnknownId, nil) c.Assert(err, jc.ErrorIsNil)
<|file_name|>command.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 The Gfx-rs Developers. // // 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/LICE...
<|file_name|>OutputStream.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012. Los Alamos National Security, LLC. # This material was produced under U.S. Government contract DE-AC52-06NA25396 # for Los Alamos National Laboratory (LANL), which is operated by Los Alamos # National Security, LLC for the U.S. Departmen...
self.output_str.write(str(token)); self.output_str.write(" "); core.output(sim_obj,record_type,self.output_str.getvalue()) self.output_str.truncate(0)
<|file_name|>lib.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/. */ #![feature(plugin)] #![plugin(plugins)] #![deny(unsafe_code)] e...
extern crate gfx_traits; extern crate gleam; extern crate ipc_channel; extern crate layers;
<|file_name|>lattice.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...
// option. This file may not be copied, modified, or distributed
<|file_name|>messenger.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2007, One Laptop Per Child # # 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 License,...
@dbus.service.method(dbus_interface=IFACE, in_signature='ssssssd', out_signature='')
<|file_name|>RequestBreakdown.js<|end_file_name|><|fim▁begin|>import React, { Component } from "react"; import formatter from "../formatter"; const labelStyle = { fg: "magenta", bold: true }; class RequestBreakdown extends Component { scroll(amount) { // nope } render() { const { respTime, sqlTime, ren...
<box top={4} height={1} left={0} width={19} content=" Rendering Time : " style={labelStyle} />
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>from django.conf.urls import patterns, url from views import * urlpatterns = patterns('', url(r'^index/$', FabricIndex.as_view(), name='fabric_index'), # Users url(r'^access/$', FabricAccessList.as_view(), name='fabric_acc...
""" """ from __future__ import unicode_literals
<|file_name|>ex31.py<|end_file_name|><|fim▁begin|>print "You enter a dark room with three doors. Do you go through door #1, door #2 or door #3?" door = raw_input("> ") if door == "1": print "There's a giant bear here eating a cheese cake. What do you do?" print "1. Take the cake." print "2. Scream at th...
<|file_name|>issue-7013.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/lice...
v.with_mut_borrow(|p| {p.v.set(w.clone());}) }
<|file_name|>test_utils.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2022 Google LLC *<|fim▁hole|> * 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/licens...
<|file_name|>test_box.py<|end_file_name|><|fim▁begin|># Copyright 2013 Donald Stufft and individual contributors # # 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/lice...
) def test_box_encryption( privalice, pubalice, privbob, pubbob, nonce, plaintext, ciphertext): pubalice = PublicKey(pubalice, encoder=HexEncoder)
<|file_name|>test_cluster_plugin_links_handler.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2015 Mirantis, 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 Licens...
self.assertEquals(d_e_query.count(), 0)
<|file_name|>widget.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2015, The Gtk-rs Project Developers. // See the COPYRIGHT file at the top-level directory of this distribution. // Licensed under the MIT license, see the LICENSE file or <http://opensource.org/licenses/MIT> use libc::c_int; use pango; use glib::tra...
fn get_direction(&self) -> ::TextDirection {
<|file_name|>bindings.rs<|end_file_name|><|fim▁begin|>use std::marker::PhantomData; use std::hash::Hash; use std::fmt::Debug; use error::*; use util::*; use traits::*; use expressions::*; use ast::*; #[allow(dead_code)] #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub enum ElementBinding<T> { Event(ElementEventBi...
where ExpressionValue<O>: TryEvalFrom<ExpressionValue<I>>,
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#[cfg(feature = "decimal")] pub use decimal::{Decimal};<|fim▁hole|> #[cfg(feature = "decimal")] pub mod decimal;<|fim▁end|>
<|file_name|>GmresPetscLinearEquationSolver.hpp<|end_file_name|><|fim▁begin|>/*========================================================================= Program: FEMUS Module: PetscLinearEquationSolver Authors: Eugenio Aulisa, Simone Bnà Copyright (c) FEMTTU All rights reserved. This software is distribu...
#ifdef HAVE_PETSC
<|file_name|>testsettings.py<|end_file_name|><|fim▁begin|>import os DEBUG = True TEMPLATE_DEBUG = True # SETTINGS_DIR allows media paths and so to be relative to this settings file # instead of hardcoded to c:\only\on\my\computer. SETTINGS_DIR = os.path.dirname(os.path.realpath(__file__)) # BUILDOUT_DIR is for acces...
} }
<|file_name|>ChooseCoin.js<|end_file_name|><|fim▁begin|>import { useQuery } from '@apollo/react-hooks' import { makeStyles } from '@material-ui/core' import { Formik, Form, Field } from 'formik' import gql from 'graphql-tag' import React, { useState } from 'react' import * as Yup from 'yup' import PromptWhenDirty from...
const schema = Yup.object().shape({
<|file_name|>base-demographic-estimate-controller.js<|end_file_name|><|fim▁begin|>/* * Electronic Logistics Management Information System (eLMIS) is a supply chain management system for health commodities in a developing country setting. * * Copyright (C) 2015 John Snow, Inc (JSI). This program was produced for the...
} BaseDemographicEstimateController.resolve = {
<|file_name|>config.py<|end_file_name|><|fim▁begin|># Copyright 2014 # The Cloudscaling Group, 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....
'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO', 'oslo.messaging=INFO', 'iso8601=WARN', 'requests.packages.urllib3.connectionpool=WARN',
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import chess <|fim▁hole|><|fim▁end|>
chess.run()
<|file_name|>beehive-hello.go<|end_file_name|><|fim▁begin|>/* * In The Name Of God * ======================================== * [] File Name : beehive-hello.go * * [] Creation Date : 13-11-2015 * * [] Created By : Parham Alvani (parham.alvani@gmail.com) * ======================================= */ /* * Copyri...
} // Broad represents a broadcast message in our hello world example.
<|file_name|>reverserlist.py<|end_file_name|><|fim▁begin|>from linkedlist import SinglyLinkedListNode def reverseList(head): tail=None last=None tempNode = head while tempNode is not None: currentNode, tempNode = tempNode, tempNode.next currentNode.next = tail tail = current...
tk-=1 if tempHead is not None: tempTail.next = last head.next = nextNode
<|file_name|>bitcoin_de.ts<|end_file_name|><|fim▁begin|><TS language="de" version="2.1"> <context> <name>AddressBookPage</name> <message> <source>Right-click to edit address or label</source> <translation>Rechtsklick zum Bearbeiten der Adresse oder der Bezeichnung</translation> </message> ...
<translation>Benutzerdefinierte Wechselgeld-Adresse</translation>
<|file_name|>query.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2014 Couchbase, 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 // ...
if hasConjuncts { var rv conjunctionQuery err := json.Unmarshal(input, &rv)
<|file_name|>RosterContact.java<|end_file_name|><|fim▁begin|>/** * Copyright (c) 2013, Redsolution LTD. All rights reserved. * * This file is part of Xabber project; you can redistribute it and/or * modify it under the terms of the GNU General Public License, Version 3. * * Xabber is distributed in the hope that ...
* along with this program. If not, see http://www.gnu.org/licenses/. */ package com.itracker.android.data.roster;
<|file_name|>HWGrid.js<|end_file_name|><|fim▁begin|>/** * */ Ext.define('hwork.view.HWGrid', { extend: 'Ext.grid.Panel', alias: 'widget.hwGrid', frame: true, autoWidth: true, autoHeight: true, //title: 'FileList', store: 'HWStore', //selType: 'checkboxmodel', columns: [ {header: '序号', xtyp...
<|file_name|>map_service.py<|end_file_name|><|fim▁begin|># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor<|fim▁hole|># # Licensed under the Apache License, Version 2.0 (the "License"); # ...
<|file_name|>clustering.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import requests import base64 import struct import random from sklearn.cluster import KMeans from sklearn.preprocessing import scale from dateutil.parser import parse class Tweet(object): def __init__(self, status): s...
<|file_name|>hiscores.cpp<|end_file_name|><|fim▁begin|>#include "hiscores.h" #include "nucleo.h" #include "galeria.h" Hi_Scores::Hi_Scores(Nucleo *nucleo) : Widget( nucleo->screen, (SDL_Rect) {200, 50, 430, 520} ) { this->nucleo = nucleo; fuente = nucleo->galeria->get_fuente(CHICA2); set_color(183, 238, 12...
static Image *fondo; fondo = nucleo->galeria->get_imagen (HI_SCORES);
<|file_name|>0010_forcefield_techs.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals <|fim▁hole|> def initial_data(apps, schema_editor): TC = apps.get_model('tech', 'TechCategory') T = apps.get_model('tech', 'Tech') tc = TC(name='Advanced Magnetism', cost=250, ...
from django.db import migrations
<|file_name|>entry_point.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 */ import * as ts from 'typescript'; import {AbsoluteFsPath} fr...
*/ export interface EntryPointPackageJson extends PackageJsonFormatProperties {
<|file_name|>test_press_dups.py<|end_file_name|><|fim▁begin|># coding=utf-8 """ Tests for wham_rad. """ import unittest import os from md_utils.md_common import silent_remove, diff_lines from md_utils.press_dups import avg_rows, compress_dups, main __author__ = 'mayes' DATA_DIR = os.path.join(os.path.dirname(__file...
class TestPressDups(unittest.TestCase):
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>#[cfg(target_arch = "wasm32")]<|fim▁hole|>pub mod web; #[cfg(not(target_arch = "wasm32"))] pub mod egl;<|fim▁end|>
<|file_name|>BezierPoint.ts<|end_file_name|><|fim▁begin|>/* * Copyright 2017 András Parditka. * * This file is part of Ecset. * * Ecset 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 o...
public handleIn: Point, public center: Point, public handleOut: Point,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>''' pysplat 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 option) any later version. pysplat is distributed in ...
along with kicad-footprint-generator. If not, see < http://www.gnu.org/licenses/ >.
<|file_name|>09_5_dictionary.py<|end_file_name|><|fim▁begin|>''' 9.5 First, you have to resolve assignment9_3. This is slightly different. This program records the domain name (instead of the address) where the message was sent from instead of who the mail came from (i.e., the whole email address). At the end of the pr...
try: flHand = open("mbox-short.txt") except:
<|file_name|>setup_matrix_multiply.py<|end_file_name|><|fim▁begin|>''' SASSIE Copyright (C) 2011 Joseph E. Curtis This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions; see http://www.gnu.org/licenses/gpl-3.0.html for det...
include_dirs = [numpy_include], )
<|file_name|>panic_in_result_fn_debug_assertions.rs<|end_file_name|><|fim▁begin|>#![warn(clippy::panic_in_result_fn)] #![allow(clippy::unnecessary_wraps)] // debug_assert should never trigger the `panic_in_result_fn` lint struct A; impl A { fn result_with_debug_assert_with_message(x: i32) -> Result<bool, String>...
fn other_with_debug_assert_eq(x: i32) { debug_assert_eq!(x, 5); }
<|file_name|>data.go<|end_file_name|><|fim▁begin|>package meta import ( "errors" "fmt" "net" "net/url" "sort" "strings" "sync" "time" "unicode" "github.com/gogo/protobuf/proto" "github.com/influxdata/influxdb" "github.com/influxdata/influxdb/influxql" "github.com/influxdata/influxdb/models" internal "gi...
} // unmarshal deserializes from a protobuf representation.
<|file_name|>apriori.py<|end_file_name|><|fim▁begin|>""" Encode any known changes to the database here to help the matching process """ renamed_modules = { 'base_calendar': 'calendar', 'mrp_jit': 'procurement_jit', 'project_mrp': 'sale_service', # OCA/account-invoicing 'invoice_validation_wkfl': 'a...
}
<|file_name|>subtitle.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styles from '../../build/styles'; export default class Subtitle extends Component { static propTypes = { children: PropTypes.any, className: PropTypes.string, size: P...
static defaultProps = { className: '',