prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>regions-addr-of-self.rs<|end_file_name|><|fim▁begin|>struct Dog { cats_chased: usize, } impl Dog { pub fn chase_cat(&mut self) { let p: &'static mut usize = &mut self.cats_chased; //~ ERROR E0759 *p += 1; } pub fn chase_cat_2(&mut self) { let p: &mut usize = &mut s...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate encoding; extern crate minifb; extern crate cpal; extern crate futures; #[macro_use] extern crate clap; extern crate combine; extern crate rustual_boy_core; extern crate rustual_boy_middleware; mod argparse; #[macro_use] mod logging; mod command; mo...
<|file_name|>run_tests.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 import sys import os sys.path.append(os.path.realpath(".")) import unittest import cleanstream import tagger import pretransfer import transfer import interchunk import postchunk import adaptdocx if __name__ == "__main__": os.chdir(os...
failures = 0 for module in [tagger, pretransfer,
<|file_name|>post_to_rails.js<|end_file_name|><|fim▁begin|>var postData = querystring.stringify({ 'value' : '55', 'room_id' : '1' }); var options = { hostname: 'localhost', port: 80, path: '/temperatures', method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Content-Le...
<|file_name|>a.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/licenses/LICE...
pub x: i32 }
<|file_name|>mallocstacks.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # mallocstacks Trace malloc() calls in a process and print the full # stack trace for all callsites. # For Linux, uses BCC, eBPF. Embedded C. # # This script is a basic example of the new Linux 4.6+ BPF_STACK_TRAC...
<|file_name|>index.tsx<|end_file_name|><|fim▁begin|>import * as React from 'react' import * as css from './styles.scss' import { Classes } from 'helpers' export interface P { name?: string; type?: 'button' | 'checkbox' | 'file' | 'hidden' | 'password' | 'radio' | 'text'; label?: string; value?: string | numbe...
handleFocus = (e: any) => { if (this.props.handleFocus) {
<|file_name|>model_classes.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import sys import os import logging import random import PyQt4 from PyQt4.QtCore import * #from PyQt4.QtCore import QAbstractTableModel import constants class Model(QAbstractTableModel): keys = list() modelType = None ...
super(QAbstractTableModel, self).__init__(parent) def rowCount(self, parent = None): ''' '''
<|file_name|>routes.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011-2013 Lp digital system<|fim▁hole|> * 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. * * BackBuilder5 is distrib...
* * This file is part of BackBuilder5. * * BackBuilder5 is free software: you can redistribute it and/or modify
<|file_name|>copy_if.hpp<|end_file_name|><|fim▁begin|>#ifndef BOOST_MPL_COPY_IF_HPP_INCLUDED<|fim▁hole|>// Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://...
#define BOOST_MPL_COPY_IF_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004
<|file_name|>0005_auto__add_field_person_education__add_field_person_birthday.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): # Addi...
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
<|file_name|>value_prop_tests.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 use crate::values::{prop::layout_and_value_strategy, Value}; use move_core_types::value::MoveValue; use proptest::prelude::*; proptest! { #[test] fn serializer_round...
<|file_name|>senateisvp.py<|end_file_name|><|fim▁begin|># coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, unsmuggle_url, ) from ..compat import ( compat_parse_qs, compat_urlparse, ) class SenateISVPIE(InfoExtracto...
return entry[1:]
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.http import HttpResponse import json<|fim▁hole|> def services(request): return render(request, 'services/services.html', {})<|fim▁end|>
<|file_name|>match-bot.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// 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 MIT license // <LICENSE-MIT ...
// file at the top-level directory of this distribution and at
<|file_name|>test_caching.py<|end_file_name|><|fim▁begin|>import datetime import gzip from itertools import count import os curdir = os.path.join(os.getcwd(), os.path.dirname(__file__)) import sys import threading import time import urllib import cherrypy from cherrypy._cpcompat import next, ntob, quote, xrange from c...
'Etag'] = 'need_this_to_make_me_cacheable' return "Woops"
<|file_name|>newlambdas-ret-infer2.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.<|fim▁hole|>// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://...
//
<|file_name|>overlapping.cpp<|end_file_name|><|fim▁begin|>#include "overlapping.hpp" /* TODO: * grow seeds from edges, not nodes. * Why are the results changing? * Then, speed up delV * ZEntropy shouldn't consider the number of groups, that should be taken out to another function. * That factorial expre...
<|file_name|>__helper.py<|end_file_name|><|fim▁begin|>""" This provides some useful code used by other modules. This is not to be used by the end user which is why it is hidden. """ import string, sys class LinkError(Exception): pass def refine_import_err(mod_name, extension_name, exc): """ Checks to see if ...
- mod_name : The name of the Python module that was imported. - extension_name : The name of the extension module that is to be
<|file_name|>driver.py<|end_file_name|><|fim▁begin|># EMU code from https://github.com/rainforestautomation/Emu-Serial-API from emu import * import sys import json import msgpack from xbos import get_client from bw2python.bwtypes import PayloadObject import time with open("params.json") as f: try: params =...
emu_instance.start_serial()
<|file_name|>sfsetup.js<|end_file_name|><|fim▁begin|>"use strict"; var async = require('async'); var fs = require('fs'); var util = require('util'); var prompt = require('prompt'); var httpRequest = require('emsoap').subsystems.httpRequest; var common = require('./common'); var mms = require('./mms'); var mmscmd = req...
text = fs.readFileSync("salesforce.json"); } catch(err) { console.log('Error reading file salesforce.json:' + err); process.exit(1);
<|file_name|>clean.rs<|end_file_name|><|fim▁begin|>extern crate hamcrest; extern crate cargotest; use std::env; use cargotest::support::{git, project, execs, main_file, basic_bin_manifest}; use cargotest::support::registry::Package; use hamcrest::{assert_that, existing_dir, existing_file, is_not}; #[test] fn cargo_c...
Package::new("bar", "0.1.0").publish();
<|file_name|>dnsutils.py<|end_file_name|><|fim▁begin|># Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hp.com> # # 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...
<|file_name|>obj-hash.js<|end_file_name|><|fim▁begin|>import Ember from 'ember'; export default Ember.Object.extend({ content: {}, contentLength: 0, add: function(obj) { var id = this.generateId(); this.get('content')[id] = obj; this.incrementProperty("contentLength"); return id; }, getObj:...
<|file_name|>union_with_anon_unnamed_union_1_0.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] #[repr(C)] pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>); impl<T> __BindgenUnionField<T> { #[inline] pub fn new(...
"::",
<|file_name|>about.js<|end_file_name|><|fim▁begin|><|fim▁hole|> $(d.body).html(repl("<div>\ <p>"+__("Open Source Applications for the Web")+"</p> \ <p><i class='fa fa-globe fa-fw'></i>\ Website: <a href='https://frappe.io' target='_blank'>https://frappe.io</a></p>\ <p><i class='fa fa-github fa-fw'></i>\ ...
frappe.provide('frappe.ui.misc'); frappe.ui.misc.about = function() { if(!frappe.ui.misc.about_dialog) { var d = new frappe.ui.Dialog({title: __('Frappe Framework')});
<|file_name|>MovingObject.py<|end_file_name|><|fim▁begin|>__author__ = 'jmoran' from Asteroids import Object class MovingObject(Object): def __init__(self, window, game, init_point, slope): Object.__init__(self, window, game)<|fim▁hole|> self.point = init_point self.slope = slope<|fim▁end|...
<|file_name|>register.go<|end_file_name|><|fim▁begin|>package v1 import (<|fim▁hole|>) var ( GroupName = "operator.openshift.io" GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) // Install is a function which adds th...
configv1 "github.com/openshift/api/config/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema"
<|file_name|>request_utils.py<|end_file_name|><|fim▁begin|>import uuid from flask import g # Utility method to get source_ip from a request - first checks headers for forwarded IP, then uses remote_addr if not<|fim▁hole|>def get_source_ip(my_request): try: # First check for an X-Forwarded-For header provi...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use chrono::{offset::Utc, DateTime}; use diesel::{self, pg::PgConnection}; use serde_json::Value; use sql_types::{FollowPolicy, Url}; pub mod follow_request; pub mod follower; pub mod group; pub mod persona; use self::follower::Follower; use schema::base_actors; use u...
}
<|file_name|>test_bing_search.py<|end_file_name|><|fim▁begin|>from bing_search_api import BingSearchAPI <|fim▁hole|>my_key = "MEL5FOrb1H5G1E78YY8N5mkfcvUK2hNBYsZl1aAEEbE" def query(query_string): bing = BingSearchAPI(my_key) params = {'ImageFilters':'"Face:Face"', '$format': 'json', ...
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # 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...
# (at your option) any later version.
<|file_name|>icons.component.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>@Component({ templateUrl: './icons.component.html', styles: [` .icons-list { text-align: center; } .icons-list i { font-size: 2em; } .icons-list .ui-md-2 { paddi...
import {Component} from '@angular/core';
<|file_name|>pvrow.py<|end_file_name|><|fim▁begin|>"""Module will classes related to PV row geometries""" import numpy as np from pvfactors.config import COLOR_DIC from pvfactors.geometry.base import \ BaseSide, _coords_from_center_tilt_length, PVSegment from shapely.geometry import GeometryCollection, LineString ...
Parameters
<|file_name|>rendertiles.py<|end_file_name|><|fim▁begin|>import mapnik import subprocess,PIL.Image,cStringIO as StringIO import time,sys,os ew = 20037508.3428 tz = 8 def make_mapnik(fn, tabpp = None, scale=None, srs=None, mp=None, avoidEdges=False, abspath=True): cc=[l for l in subprocess.check_out...
<|file_name|>ReferenceType.java<|end_file_name|><|fim▁begin|>// // Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.2 generiert // Siehe <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a> // Änderungen an dieser Datei gehen bei einer Neu...
* allowed object is * {@link CodeType }
<|file_name|>break-value.rs<|end_file_name|><|fim▁begin|>// run-pass #![allow(unreachable_code)] // pretty-expanded FIXME #23616 fn int_id(x: isize) -> isize { return x; }<|fim▁hole|><|fim▁end|>
pub fn main() { loop { int_id(break); } }
<|file_name|>test_serializers.py<|end_file_name|><|fim▁begin|>""" Test cases to cover Accounts-related serializers of the User API application """ import logging from django.test import TestCase from django.test.client import RequestFactory from testfixtures import LogCapture from openedx.core.djangoapps.user_api.a...
from common.djangoapps.student.models import UserProfile from common.djangoapps.student.tests.factories import UserFactory LOGGER_NAME = "openedx.core.djangoapps.user_api.accounts.serializers"
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>//! A Collection of Header implementations for common HTTP Headers. //! //! ## Mime //! //! Several header fields use MIME values for their contents. Keeping with the //! strongly-typed theme, the [mime](http://seanmonstar.github.io/mime.rs) crate //! is used, such as `C...
fn bench_format(b: &mut Bencher) {
<|file_name|>48.time.go<|end_file_name|><|fim▁begin|>package main import ( "fmt"<|fim▁hole|> func main() { p := fmt.Println // We’ll start by getting the current time. now := time.Now() p(now) // You can build a time struct by providing the year, month, day, etc. // Times are always associated with a Location...
"time" )
<|file_name|>configurable.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import argparse from configparser import SafeConfigParser class Configurable(object): """ ...
argparser.add_argument('--config_file') # ====== # [OS]
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015-2016 Tigera, 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/li...
with the input data much simpler.
<|file_name|>test_country_field.py<|end_file_name|><|fim▁begin|>import sqlalchemy_utils from babel import Locale from wtforms import Form from tests import MultiDict from wtforms_alchemy import CountryField sqlalchemy_utils.i18n.get_locale = lambda: Locale('en') class TestCountryField(object): field_class = Cou...
return self.form_class
<|file_name|>npairsloss.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import division<|fim▁hole|> import paddle.fluid as fluid from utility import get_gpu_num class NpairsLoss(): def __init__(self, train_batch_size = 160, samples_each_cla...
from __future__ import print_function
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-06 02:47 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): ...
<|file_name|>test_validate.py<|end_file_name|><|fim▁begin|># THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 # ...
('PT10M10S', DurationFloat(610))]: assert validator.coerce_interval(value, ['whatever']) == result # The bad
<|file_name|>OFShell.py<|end_file_name|><|fim▁begin|>import threading import time import re from openflow.optin_manager.sfa.openflow_utils.CreateOFSliver import CreateOFSliver from openflow.optin_manager.sfa.openflow_utils.sliver_status import get_sliver_status from openflow.optin_manager.sfa.openflow_utils.delete_slic...
if str(sliver['datapath_id']) == str(switch[0]): #Avoiding Unicodes found = True break if found == False:
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod posts;
<|file_name|>host_mock.py<|end_file_name|><|fim▁begin|># Copyright (C) 2011 Google 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 must retain the abov...
# * Redistributions in binary form must reproduce the above
<|file_name|>gem.py<|end_file_name|><|fim▁begin|>''' Manage Ruby gem packages. (see https://rubygems.org/ ) ''' from pyinfra.api import operation from pyinfra.facts.gem import GemPackages from .util.packaging import ensure_packages @operation def packages(packages=None, present=True, latest=False, state=None, host=...
# Note: Assumes that 'gem' is installed. gem.packages(
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>//process.argv.forEach(function (val, index, array) { console.log(index + ': ' + val); }); var fs = require('fs'); (function () { function slugify(text) { text = text.replace(/[^-a-zA-Z0-9,&\s]+/ig, ''); text = text.replace(/-/gi, "_"); text = text.replac...
DocGen.start(); })();
<|file_name|>types.py<|end_file_name|><|fim▁begin|>from iota.crypto import FRAGMENT_LENGTH from iota.exceptions import with_context from iota.types import Hash, TryteString, TrytesCompatible __all__ = [ 'BundleHash', 'Fragment', 'TransactionHash', 'TransactionTrytes', 'Nonce' ] class BundleHash(H...
<|file_name|>podsecuritypolicytemplate.go<|end_file_name|><|fim▁begin|>/* Copyright 2022 Rancher Labs, 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/LICENS...
resource schema.GroupResource
<|file_name|>Flat.java<|end_file_name|><|fim▁begin|>/* * Copyright 2013 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...
{ public volatile Recorder recorder;
<|file_name|>MultilineChartOutlined.js<|end_file_name|><|fim▁begin|>"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");<|fim▁hole|> Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _createSvgIcon = _interopRequireDefault(req...
<|file_name|>converter_sosi2tsv.cpp<|end_file_name|><|fim▁begin|>/* * This file is part of the command-line tool sosicon. * Copyright (C) 2014 Espen Andersen, Norwegian Broadcast Corporation (NRK) * * This is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public L...
* the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful,
<|file_name|>razor.test.ts<|end_file_name|><|fim▁begin|>/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *-------...
<|file_name|>sessions.js<|end_file_name|><|fim▁begin|>/** * Copyright 2009 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.apache.org/licenses/LICENSE-2...
<|file_name|>longzhu.go<|end_file_name|><|fim▁begin|>package getters import ( "errors" "fmt" "regexp" "strings" ) //longzhu 龙珠直播 type longzhu struct{} //Site 实现接口 func (i *longzhu) Site() string { return "龙珠直播" } //SiteURL 实现接口 <|fim▁hole|>} //SiteIcon 实现接口 func (i *longzhu) SiteIcon() string...
func (i *longzhu) SiteURL() string { return "http://www.longzhu.com"
<|file_name|>groupSelection.js<|end_file_name|><|fim▁begin|>var module = angular.module("example", ["agGrid"]); module.controller("exampleCtrl", function($scope, $http) { var columnDefs = [ {headerName: "Gold", field: "gold", width: 100}, {headerName: "Silver", field: "silver", width: 100}, ...
function groupAggFunction(rows) { var sums = { gold: 0,
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var Handler, MiniEventEmitter; Handler = require("./handler"); MiniEventEmitter = (function() { function MiniEventEmitter(obj) { var handler; handler = new Handler(this, obj); this.on = handler.on; this.off = handler.off; this.emit = handler.emit;...
})();
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ================================================================================================== # Copyright 2013 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache Licen...
from twitter.common.rpc.finagle.protocol import (
<|file_name|>LL.py<|end_file_name|><|fim▁begin|>import os import sys import math import errno import subprocess import tkMessageBox import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.animation as animation from PIL import Image from matplotlib import style from datetime import...
close_handler(event) plt.draw()
<|file_name|>results.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from django import template from django.utils.safestring import mark_safe from censusreporter.apps.census.utils import parse_table_id, generic_table_description, table_link register = template.Library() @register.filter def fo...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ #![deny(warnings)] use ascii::AsciiString; use mercurial_types::{ blobs::HgBlobChange...
BonsaiSvnrevMapping, BonsaiHgMapping, Phases, HgMutationStore,
<|file_name|>service.go<|end_file_name|><|fim▁begin|>package docker import ( "fmt" "io" "io/ioutil" "os" "sort" "docker.io/go-docker/api/types" "docker.io/go-docker/api/types/filters" "docker.io/go-docker/api/types/swarm" "github.com/appcelerator/amp/docker/cli/cli/command" "github.com/appcelerator/amp/dock...
// ServiceScale scales a service func (d *Docker) ServiceScale(ctx context.Context, service string, scale uint64) error {
<|file_name|>scope_enclosed.ts<|end_file_name|><|fim▁begin|>function topfun() {<|fim▁hole|> let a = 12 } let a = 13 }<|fim▁end|>
function subfun() {
<|file_name|>implement.ctor.nseal.alias.js<|end_file_name|><|fim▁begin|>var Type = require("@kaoscript/runtime").Type; module.exports = function(expect) { class Shape {<|fim▁hole|> __ks_init_0() { this._color = ""; } __ks_init() { Shape.prototype.__ks_init_0.call(this); } __ks_cons_0(color) { if(argu...
constructor() { this.__ks_init(); this.__ks_cons(arguments); }
<|file_name|>crime.client.routes.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular .module('crimes.routes') .config(routeConfig); routeConfig.$inject = ['$stateProvider']; function routeConfig($stateProvider) { $stateProvider .state('crimes', { abstract: true, ...
data: {
<|file_name|>localstorage.js<|end_file_name|><|fim▁begin|>angular.module('appTesting').service("LoginLocalStorage", function () { "use strict"; var STORE_NAME = "login"; var setUser = function setUser(user) { localStorage.setItem(STORE_NAME, JSON.stringify(user)); } var getUser = function...
getUser: getUser
<|file_name|>test_autoupdate.py<|end_file_name|><|fim▁begin|># vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # Copyright 2015-2018 Alexander Cogneau (acogneau) <alexander.cogneau@gmail.com>: # # This file is part of qutebrowser. # # qutebrow...
def test_constructor(qapp): client = autoupdate.PyPIVersionClient() assert isinstance(client._client, httpclient.HTTPClient)
<|file_name|>page.spec.ts<|end_file_name|><|fim▁begin|>import { ChatPage } from './page'; declare var describe, beforeEach, it, expect; describe("ChatPage", () => { <|fim▁hole|> it("should contain 'Hello world!' in 'content' property", () => { expect(page.Text.PAGE_HOME_CONTENT).toEqual("Hello world!"); ...
let page: ChatPage; beforeEach(() => page = new ChatPage(null));
<|file_name|>server.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function (grunt) { grunt.registerTask('server', [ 'clean:server', 'configureProxies:livereload', 'concurrent:server', 'autoprefixer', 'connect:livereload', 'watch' ]); grunt....
'autoprefixer',
<|file_name|>use.py<|end_file_name|><|fim▁begin|>############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. #<|fim▁hole|># LLNL-CODE-647188 # # For details, see https://git...
# This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
<|file_name|>default_ty_param_dependent_defaults.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Copyright 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-AP...
<|file_name|>CommCalls.cc<|end_file_name|><|fim▁begin|>/* * Copyright (C) 1996-2016 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. * Please see the COPYING and CONTRIBUTORS files for det...
const CommTimeoutCbParams &aParams):
<|file_name|>lastilePro.py<|end_file_name|><|fim▁begin|># # lastilePro.py # # (c) 2013, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # uses lastile.exe to compute a tiling for a folder # worth of LiDAR files with a user-specified tile # size (and an optional buff...
### check if path exists if os.path.exists(lastools_path) == False:
<|file_name|>agent_connect_dlg.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'agent_connect_dlg.ui'<|fim▁hole|># # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_Dialog(object): def setupUi(self, Dialog)...
# # Created: Tue Oct 12 14:22:17 2010 # by: PyQt4 UI code generator 4.7.3
<|file_name|>methods_fixable.rs<|end_file_name|><|fim▁begin|>// run-rustfix #![warn(clippy::filter_next)] /// Checks implementation of `FILTER_NEXT` lint. fn main() { let v = vec![3, 2, 1, 0, -1, -2, -3]; // Single-line case.<|fim▁hole|><|fim▁end|>
let _ = v.iter().filter(|&x| *x < 0).next(); }
<|file_name|>lint-unused-mut-variables.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....
match 30 { mut x => {} //~ ERROR: variable does not need to be mutable }
<|file_name|>metadata.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
vals['topic_category'] = theme['themekey'][0] keywords.extend(theme['themekey'])
<|file_name|>config_installer.py<|end_file_name|><|fim▁begin|>import os from conans.tools import unzip import shutil from conans.util.files import rmdir, mkdir from conans.client.remote_registry import RemoteRegistry from conans import tools from conans.errors import ConanException def _handle_remotes(registry_path, ...
<|file_name|>anoncreds.rs<|end_file_name|><|fim▁begin|>extern crate libc; extern crate serde_json; use api::{ErrorCode, IndyHandle, CommandHandle, WalletHandle, SearchHandle}; use errors::prelude::*; use commands::{Command, CommandExecutor}; use commands::anoncreds::AnoncredsCommand; use commands::anoncreds::issuer::I...
cred_id: *const c_char, cb: Option<extern fn( command_handle_: CommandHandle, err: ErrorCode,
<|file_name|>directives.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 {Directive} from '@angular/core'; import {_MatMenuCont...
}, exportAs: 'matMenuTrigger' }) export class MatMenuTrigger extends _MatMenuTriggerBase {}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>############################################################################### ## ## Copyright 2012 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may...
<|file_name|>searchfilter.js<|end_file_name|><|fim▁begin|>//Libraries const React = require("react"); const _ = require("lodash"); const DataActions = require("../actions/data_actions"); const DataStore = require("../stores/data_store"); const FilterStore = require("../stores/filter_store"); const ColumnsSto...
// this.dropdown = this.toggleCss(this.dropdown); // let expanded = (this.state.expended === "true") ? "false" : "true"; // this.setState({ // dropdown:this.getClasses(this.dropdown),
<|file_name|>mmerge-sort-for-linked-list.py<|end_file_name|><|fim▁begin|># key point is to find the half node class Node: def __init__(self, val): self.val = val self.next = None class LinkList: def __init__(self): self.head = None def push(self, val): node = Node(val) ...
ll.push(15)
<|file_name|>display_common.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Urwid common display code # Copyright (C) 2004-2011 Ian Ward # # 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 Soft...
<|file_name|>debounce.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] extern crate fomo; extern crate tempdir; #[macro_use] mod utils; use fomo::notify::*; use std::sync::mpsc; use std::thread; use std::time::{Duration, Instant}; use tempdir::TempDir; use utils::*; const DELAY_MS: u64 = 1000; const TIMEOUT_MS:...
tdir.create_all(vec![ "dir1" ]); sleep_macos(35_000);
<|file_name|>actions.spec.js<|end_file_name|><|fim▁begin|>import * as actions from './actions' describe('App actions', () => { it('selectTerm should create SELECT_TERM action', () => { expect(actions.selectTerm('term')).toEqual({ type: 'SELECT_TERM', term: 'term' }) }) it('startFetch should...
let conceptNet = { lookup: successLookup }; let dispatch = (arg) => { expect(arg['type']).toEqual("RECEIVE_RESPONSE") }; actions.getIsA(dispatch, conceptNet, "next term"); })
<|file_name|>DefaultColumnQueryMapperBuilderTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2017 Otávio Santana and others * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Apache License v2.0 which accom...
*
<|file_name|>DislikeDialogFragment.java<|end_file_name|><|fim▁begin|>package doit.study.droid.fragments; import android.app.Activity; import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android....
mHostActivity = getActivity(); LayoutInflater inflater = mHostActivity.getLayoutInflater(); mView = inflater.inflate(R.layout.fragment_dialog_dislike, null);
<|file_name|>test_glazeddoorinterzone.py<|end_file_name|><|fim▁begin|>import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.thermal_zones_and_surfaces import GlazedDoorInterzone log = logging.getLogger(__name__) class TestGlazedDoo...
obj.construction_name = var_construction_name # object-list var_building_surface_name = "object-list|Building Surface Name"
<|file_name|>unwind-rec2.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...
struct Blk { node: ~[int], span: ~[int] } fn main() { let _blk = Blk {
<|file_name|>AJDebug.java<|end_file_name|><|fim▁begin|>/* * AJDebug.java * * This file is part of Tritonus: http://www.tritonus.org/ */ /* * Copyright (c) 1999 - 2002 by Matthias Pfisterer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library Gene...
*/ public aspect AJDebug extends Utils
<|file_name|>cordova_plugins.js<|end_file_name|><|fim▁begin|>cordova.define('cordova/plugin_list', function(require, exports, module) { module.exports = [ { "file": "plugins/cordova-plugin-whitelist/whitelist.js", "id": "cordova-plugin-whitelist.whitelist", "pluginId": "cordova-plugin-whitel...
// BOTTOM OF METADATA });
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! This crate reads DVD subtitles in VobSub format. These are typically //! stored as two files: an `*.idx` file summarizing the subtitles, and an //! MPEG-2 Program Stream containing the actual subtitle packets. //! //! ## Example code //! //! ``` //! extern crate ima...
//! same subtitle packet format, but the `*.idx` file is replaced by data //! stored in an IFO file. //! - Subtitles stored in the Matroska container format. Again, these use
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout, update_session_auth_hash from django.core.exceptions import ObjectDoesNotExist from...
Log the user in """ # Check if the user is authenticated
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .voxel_dir import task_dir, storage_dir, image_dir
<|file_name|>0014_auto_20160710_1200.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-07-10 12:00 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
model_name='annotation', name='comment',