prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>derive-helper-legacy-spurious.rs<|end_file_name|><|fim▁begin|>// aux-build:test-macros.rs #![dummy] //~ ERROR cannot find attribute `dummy` in this scope <|fim▁hole|>#[macro_use] extern crate test_macros; #[derive(Empty)] //~ ERROR cannot determine resolution for the attribute macro `derive` #[empty_help...
<|file_name|>pending.rs<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2017 AltOS-Rust Team * * 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 3 of the License, or * (at your opti...
<|file_name|>linkAccountButton.directive.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../references.d.ts" /> module user { interface LinkAccountButtonScope extends ng.IScope { type?: string; text?: string; size?: string; } export class LinkAccountButtonDirective { ...
break; case 'BLOCK': scope.size = 'btn-block';
<|file_name|>counters.py<|end_file_name|><|fim▁begin|>from baroque.entities.event import Event class EventCounter: """A counter of events.""" def __init__(self): self.events_count = 0<|fim▁hole|> def increment_counting(self, event): """Counts an event Args: event (:ob...
self.events_count_by_type = dict()
<|file_name|>aboutdialog.cpp<|end_file_name|><|fim▁begin|>/* * aboutdialog.cpp * * Created on: 26.07.2010 * Author: Mike Shatohin (brunql) * Project: Lightpack * * Lightpack is very simple implementation of the backlight for a laptop * * Copyright (c) 2010, 2011 Mike Shatohin, mikeshatohin [at] gm...
#include "debug.h"
<|file_name|>redis_client.cc<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016, https://github.com/nebula-im/nebula * 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 Lice...
#include "nebula/redis_client/redis_client.h"
<|file_name|>index_object.py<|end_file_name|><|fim▁begin|>from .pandas_vb_common import * class SetOperations(object): goal_time = 0.2 def setup(self): self.rng = date_range('1/1/2000', periods=10000, freq='T') self.rng2 = self.rng[:(-1)] # object index with datetime values i...
self.mi = MultiIndex.from_product([self.level1, self.level2])
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>use co_slog; pub fn simulate_server() { let log = co_slog::logger(); let server = log.new(o!("host" => "localhost", "port" => "8080")); let _log = co_slog::set_logger(server); info!("starting");<|fim▁hole|> info!("listening"); let log = co_slog...
<|file_name|>test_control_flow.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest from flypy import jit class TestControlFlow(unittest.TestCase): def test_loop_carried_dep_promotion(self): @jit def f(n): ...
<|file_name|>conference.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com...
user_key = ndb.Key(Profile, user_id) # Get the user's wishlist
<|file_name|>TraceEvent.java<|end_file_name|><|fim▁begin|>// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.base; import android.os.Looper; import android.os.MessageQueue; import and...
} /** * Enables or disabled Android systrace path of Chrome tracing. If enabled, all Chrome
<|file_name|>test_tools.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Tests for the engine module """ import numpy as np import scipy.sparse as ssp import re import mock from nipype.pipeline....
expected_crashfile = re.compile('.*/crash-.*-an_id-[0-9a-f\-]*.pklz')
<|file_name|>test_check.py<|end_file_name|><|fim▁begin|>"""Tests for distutils.command.check.""" import os import textwrap import unittest from test.support import run_unittest from distutils.command.check import check, HAS_DOCUTILS from distutils.tests import support from distutils.errors import DistutilsSetupError ...
broken_rest = 'title\n===\n\ntest' msgs = cmd._check_rst_data(broken_rest) self.assertEqual(len(msgs), 1)
<|file_name|>bc_gen_feature_rep_xls.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Generate report in Excel format (from xml input) # import sys,os,shelve import re,dfxml,fiwalk from bc_utils import filename_from_path from openpyxl.workbook import Workbook from openpyxl.writer.excel import ExcelWriter fr...
feature = row[1] else:
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import transaction from .base import BaseForm from .composite import CompositeForm from .formset import FormSet class BaseModelForm(BaseForm): def save(self, commit=True): retval = [] with transaction.atomic(): for for...
kwargs['instance'] = self._instances[i]
<|file_name|>scale sprite 3.ts<|end_file_name|><|fim▁begin|>/// <reference path="../../Phaser/Game.ts" /> (function () { var game = new Phaser.Game(this, 'game', 800, 600, preload, create); function preload() { // Using Phasers asset loader we load up a PNG from the assets folder game.load....
} var bunny: Phaser.Sprite;
<|file_name|>if_statement.py<|end_file_name|><|fim▁begin|>from vsg import parser class if_label(parser.label): ''' unique_id = if_statement : if_label ''' def __init__(self, sString): parser.label.__init__(self, sString) class label_colon(parser.label_colon): ''' unique_id = if_stat...
<|file_name|>Nyaa.py<|end_file_name|><|fim▁begin|>""" 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 3 of the License, or (at your option) any later version. This program is distribut...
m = self.process_page(url) return m
<|file_name|>WeatherDescription.java<|end_file_name|><|fim▁begin|>package com.example.kb.clearsky.model.api_specific; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class WeatherDescription {<|fim▁hole|> @SerializedName("id") @Expose private Integer wea...
<|file_name|>first_run_linux.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/first_run/first_run.h" <|fim▁hole|>#include "base/file_util.h" #...
#include "base/command_line.h"
<|file_name|>grtracklight.cpp<|end_file_name|><|fim▁begin|>#ifndef TRUE #define TRUE 1 #endif //TRUE #ifndef FALSE #define FALSE 0 #endif //FALSE #include <plib/ssg.h> #include <plib/sg.h> #include <raceman.h> #include <track.h> #include "grscene.h" typedef struct LightInfo { int index; ssgVtxTable *light; //ssgS...
} current = startlights->st_green; onoff = active && s->_raceType != RM_TYPE_RACE;
<|file_name|>font.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use app_units::Au; use euclid::{Point2D, Rect, Size2D}; use font...
pub fn new(advance: Au, ascent: Au, descent: Au) -> RunMetrics { let bounds = Rect::new(Point2D::new(Au(0), -ascent), Size2D::new(advance, ascent + descent));
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use std::hash::Hash; /// Returns the most common element a collection implementing /// `IntoIterator<Item=T>`, where `T` must implement the `Eq` and `Hash` traits /// /// ``` /// let v1 = vec![1,3,6,6,6,6,7,7,12,12,17]; /// println!("{}",...
map.into_iter() .filter(|&(_, v)| v == max) .map(|(k, _)| k)
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>//! Contains several types used throughout the library. use std::fmt; use std::error; /// Represents a thing which has a position inside some textual document. /// <|fim▁hole|>pub trait HasPosition { /// Returns a line number inside the document. fn ...
/// This trait is implemented by parsers, lexers and errors. It is used primarily to create /// error objects.
<|file_name|>TodoList.js<|end_file_name|><|fim▁begin|>/** * Created by larry on 2017/1/6. */ import React from 'react';<|fim▁hole|>import Todo from './Todo'; //圆括号里面要写大括号 const TodoList = ({todos, onTodoClick}) => { return ( <ul> { todos.map ( ...
<|file_name|>issue-40845.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 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|>gxml_exporter_plugin.py<|end_file_name|><|fim▁begin|>import re from gourmet.plugin import ExporterPlugin from gourmet.convert import seconds_to_timestring, float_to_frac from . import gxml2_exporter from gettext import gettext as _ GXML = _('Gourmet XML File') class GourmetExportChecker: def check_...
for att in ['preptime','cooktime']: if getattr(self.rec,att): tstr = seconds_to_timestring(getattr(self.rec,att))
<|file_name|>leakcheck.go<|end_file_name|><|fim▁begin|>/* * * Copyright 2017 gRPC 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/LICEN...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate hyper; extern crate url; use url::Url; use hyper::client::Request; use hyper::method::Method::{Get, Post, Delete, Put, Patch}; use std::io::{Read, Write}; use std::fmt::{Display, Formatter}; use std::fmt::Error as FmtError; use std::io::Error as IoError; u...
match resp.read_to_string(&mut resp_body) { Ok(_) => (), Err(err) => return Err(RestError::HttpIoError(err)) };
<|file_name|>0004_auto_20150529_1416.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals <|fim▁hole|>from django.db import models, migrations #import tagging_autocomplete.models import datetime class Migration(migrations.Migration): dependencies = [ ('thedirecto...
<|file_name|>benchmarks.rs<|end_file_name|><|fim▁begin|>extern crate ostrov; extern crate test; use ostrov::runtime::Runtime; use test::Bencher; static NESTED_IFS: &'static str = " (if (if (if (if (if (if ...
<|file_name|>data.rs<|end_file_name|><|fim▁begin|>//! Contains types related to ICE's projected data representation. use crate::{ common::*, data::{Data, Sample}, }; /// Projected data to classify. /// /// Used by the learner to reason on a single predicate. #[derive(Clone)] pub struct CData { /// Positiv...
if q_pos + q_neg == 0. || nq_pos + nq_neg == 0. { Ok(None)
<|file_name|>index.js<|end_file_name|><|fim▁begin|>'use strict'; let datafire = require('datafire'); let openapi = require('./openapi.json'); let aws = require('aws-sdk'); const INTEGRATION_ID = 'amazonaws_data_jobs_iot'; const SDK_ID = 'IoTJobsDataPlane'; let integ = module.exports = new datafire.Integration({ id...
<|file_name|>gio_futures_await.rs<|end_file_name|><|fim▁begin|>extern crate gio; extern crate glib; use gio::prelude::*; use futures::prelude::*; use std::str; // Throughout our chained futures, we convert all errors to strings // via map_err() return them directly. async fn read_file(file: gio::File) -> Result<(), ...
<|file_name|>vee-validate.js<|end_file_name|><|fim▁begin|>/** * vee-validate vundefined * (c) 2020 Abdelrahman Awad * @license MIT */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) : typeof define === 'function' && define.amd ? d...
});
<|file_name|>gradient.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/. */ // FIXME(rust-lang/rust#26264): Remove GenericEndingShape an...
} /// Returns the distance to the nearest or farthest sides depending on the comparator. ///
<|file_name|>tabs-demo.ts<|end_file_name|><|fim▁begin|>import {Component, ViewEncapsulation} from '@angular/core'; import {Router} from '@angular/router'; import {Observable} from 'rxjs/Observable'; @Component({ moduleId: module.id, selector: 'tabs-demo', templateUrl: 'tabs-demo.html', styleUrls: ['tabs-demo.c...
<|file_name|>MetalinkParserStateMachine.cc<|end_file_name|><|fim▁begin|>/* <!-- copyright */ /* * aria2 - The high speed download utility * * Copyright (C) 2006 Tatsuhiro Tsujikawa * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as pu...
<|file_name|>ruckus_fastiron.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import re import time from netmiko.cisco_base_connection import CiscoSSHConnection class RuckusFastironBase(CiscoSSHConnection): """Ruckus FastIron aka ICX support.""" def session_preparation(self): ""...
self.write_channel(self.normalize_cmd(self.secret)) output += self.read_until_prompt() return output time.sleep(1)
<|file_name|>empty-kind-2.rs<|end_file_name|><|fim▁begin|>// Unspecified kind should fail with an error // compile-flags: -l :+bundle=mylib // error-pattern: unknown library kind ``, expected one of dylib, framework, or static <|fim▁hole|><|fim▁end|>
fn main() {}
<|file_name|>day.go<|end_file_name|><|fim▁begin|>package plugin /* usage: !day */ import ( "strings" "time"<|fim▁hole|> "github.com/microamp/gerri/data" ) func ReplyDay(pm data.Privmsg, config *data.Config) (string, error) { return cmd.Privmsg(pm.Target, strings.ToLower(time.Now().Weekday().String())), nil }<|fim...
"github.com/microamp/gerri/cmd"
<|file_name|>README_generate_completion_reports.py<|end_file_name|><|fim▁begin|>Dependencies Python2.7 Python Requests python-rt https://gitlab.labs.nic.cz/labs/python-rt (should have a local copy installed on tsbackup, unntested with newer versions) jsondb<|fim▁hole|> configure EMAIL, WEEKLYDB, MONTHLYDB on installed ...
request_tracker these last two are in the freegeek github repostitory
<|file_name|>select.go<|end_file_name|><|fim▁begin|>package query import ( "bytes" "fmt" "strconv" "strings" "sync" ) var selects map[string]*SelectQuery = map[string]*SelectQuery{} var selectsMutex *sync.Mutex = &sync.Mutex{} func GetSelectQuery(name string) (*SelectQuery, bool) { selectsMutex.Lock() q, ok :...
case *Token: c.str = "(" + b.str + ")"
<|file_name|>webModifySqlAPI.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ webModifySqlAPI ~~~~~~~~~~~~~~ 为web应用与后台数据库操作(插入,更新,删除操作)的接口 api_functions 中的DataApiFunc.py为其接口函数汇聚点,所有全局变量设置都在此;所有后台函数调用都在此设置 Implementation helpers for the JSON support in Flask. :copyright: (c) 2015 by A...
"""
<|file_name|>free.hpp<|end_file_name|><|fim▁begin|>// Boost.TypeErasure library // // Copyright 2012 Steven Watanabe // // 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) // // $Id$ #ifndef BOOST_TYPE_ERASURE_FREE_H...
>::type... \ >::type _boost_type_erasure_free_p_idx; \ friend typename ::boost::type_erasure::rebind_any<Base, R>::type\
<|file_name|>htmloptionscollection.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::ElementBi...
<|file_name|>resource_aws_acm_certificate_test.go<|end_file_name|><|fim▁begin|>package aws import ( "fmt" "strconv" "strings" "testing" "os" "regexp" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/acm" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helpe...
resourceName := "aws_acm_certificate.test"
<|file_name|>euclid.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publishe...
costheta = 1 theta = math.acos(costheta) if abs(theta) < 0.01:
<|file_name|>difference_engine_5_inorder.py<|end_file_name|><|fim▁begin|>import hashlib import os import sys if len(sys.argv) < 3: #1 print("You need to specify two directories:") #1 print(sys.argv[0], "<directory 1> <directory 2>") #1 sys.exit() ...
<|file_name|>bfe_inspire_conferences_date.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ## ## This file is part of INSPIRE. ## Copyright (C) 2015 CERN. ## ## INSPIRE 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 Soft...
fdate = printaddress['y'] fday = fdate[-2:] fmonth = fdate[5:7] fyear = fdate[:4]
<|file_name|>upstream.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>// Make this function extern "C", public, and no-mangle, so that it gets // exported from the downstream staticlib. #[no_mangle] pub extern "C" fn issue64153_test_function(x: u32) -> u32 { x + 1 }<|fim▁end|>
<|file_name|>gulpfile.js<|end_file_name|><|fim▁begin|>const gulp = require('gulp'); const nodemon = require('gulp-nodemon'); const mocha = require('gulp-spawn-mocha'); gulp.task('start', () => { nodemon({ script: 'server.js', ext: 'html js ejs css', ignore: ['node_modules'], }) .on('restart', () => ...
<|file_name|>TestMonitorNotifyEvent.java<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright 2015 Kieker Project (http://kieker-monitoring.net) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in ...
final MonitorNotifyEvent event1 = new MonitorNotifyEvent(TSTAMP, TRACE_ID, ORDER_INDEX, LOCK_ID);
<|file_name|>mod.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/. */ //! Generic types that share their serialization implementations ...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>//! Implementations of data structures and algorithms from Chapter 3: Searching. pub mod binary; pub mod hashtable; pub mod sequential;<|fim▁end|>
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup import os os.system('cp config/.lircrc ~/.lircrc') os.system('cp config/hardware.conf /etc/lirc/hardware.conf') os.system('cp config/lircd.conf /etc/lirc/lircd.conf') os.system('cp config/lir...
<|file_name|>connection_settings.go<|end_file_name|><|fim▁begin|>package client import ( "time" ) var DefaultConnectionSettings = CreateConnectionSettings().Build() type ConnectionSettings struct { verboseLogging bool maxQueueSize int maxConcurrentItem int maxRetries ...
}
<|file_name|>DocumentQueryExecutionContextFactory.java<|end_file_name|><|fim▁begin|>// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. package com.azure.data.cosmos.internal.query; import com.azure.data.cosmos.BadRequestException; import com.azure.data.cosmos.BridgeInternal...
// The partitionKeyRangeIdInternal is no more a public API on FeedOptions, but have the below condition // for handling ParallelDocumentQueryTest#partitionKeyRangeId if (feedOptions != null && !StringUtils.isEmpty(CommonsBridgeInt...
<|file_name|>shtest-format.py<|end_file_name|><|fim▁begin|># Check the various features of the ShTest format. # # RUN: not %{lit} -j 1 -v %{inputs}/shtest-format > %t.out # RUN: FileCheck < %t.out %s # # END. # CHECK: -- Testing: # CHECK: FAIL: shtest-format :: external_shell/fail.txt # CHECK: *** TEST 'shtest-format...
# CHECK: shtest-format :: fail.txt
<|file_name|>util.rs<|end_file_name|><|fim▁begin|>use std::ffi::OsStr; use config::UsbBus; pub fn parse_hex(s: &OsStr) -> Option<u16> { let s = match s.to_str() { Some(s) => s, None => return None };<|fim▁hole|> u16::from_str_radix(s, 16).ok() } } pub fn usable_ports(bus: UsbBus) -...
if s.starts_with("0x") { u16::from_str_radix(&s[2..], 16).ok() } else {
<|file_name|>TemplateRenderer.java<|end_file_name|><|fim▁begin|>package com.codedpoetry.maven.dockerplugin.templates; import java.io.StringWriter;<|fim▁hole|> StringWriter renderTemplate(String templateUrl, Map context); }<|fim▁end|>
import java.util.Map; public interface TemplateRenderer {
<|file_name|>user.py<|end_file_name|><|fim▁begin|>from flask.ext.login import UserMixin, AnonymousUserMixin from codeta import app, auth, logger from codeta.models.course import Course class User(UserMixin): def __init__(self, user_id, username, password, email, fname, lname, active=True, courses=[]): sel...
def is_authenticated(self): return True
<|file_name|>test_base.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import six if six.PY3: from unittest import TestCase, mock else: import sys if sys.version_info < (2, 7, 0): from unittest2 import TestCase else: from unittest import TestCase import mock...
<|file_name|>calendarTruncateEventTitle.js<|end_file_name|><|fim▁begin|>'use strict'; angular .module('reflect.calendar')<|fim▁hole|> return ''; } //Only truncate if if actually needs truncating if (string.length >= length && string.length / 20 > boxHeight / 30) { return string.subs...
.filter('calendarTruncateEventTitle', function() { return function(string, length, boxHeight) { if (!string) {
<|file_name|>NoAdvancedTabTest.ts<|end_file_name|><|fim▁begin|>import { Chain, Pipeline, UiFinder, Log } from '@ephox/agar'; import { UnitTest } from '@ephox/bedrock'; import { Editor, UiChains } from '@ephox/mcagar'; import { Body } from '@ephox/sugar'; import Plugin from 'tinymce/plugins/media/Plugin'; import Theme f...
]
<|file_name|>when.go<|end_file_name|><|fim▁begin|>package hook import ( "regexp" rspec "github.com/opencontainers/runtime-spec/specs-go" "github.com/pkg/errors" ) // When holds hook-injection conditions. type When struct { Always *bool `json:"always,omitempty"`<|fim▁hole|> // Or enables any-of...
Annotations map[string]string `json:"annotations,omitempty"` Commands []string `json:"commands,omitempty"` HasBindMounts *bool `json:"hasBindMounts,omitempty"`
<|file_name|>import_text_dialog.cpp<|end_file_name|><|fim▁begin|>/* import_text_dialog.cpp * * $Id$ * * Wireshark - Network traffic analyzer * By Gerald Combs <gerald@wireshark.org> * Copyright 1998 Gerald Combs * * This program is free software; you can redistribute it and/or * modify it under the terms of th...
#include "ui/last_open_dir.h"
<|file_name|>qrc_teamworkpmtimer.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** Resource object code ** ** Created: Tue May 21 13:17:21 2013 ** by: The Resource Compiler for Qt version 4.8.2 ** ** WARNING! All changes made in this file will be lost...
{ return 1; }
<|file_name|>fontina.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import csv import datetime import os import copy class Trip: dols = [] dists = [] gals = [] octs = [] eths = [] drivers = [] tires = [] miles = 0 gallons = 0 actualGals = 0 days = 0 octane = 0 snowtires = 0 make = 0 model = 0 ...
for file in os.listdir(dir): if not file.endswith('.csv'):
<|file_name|>flatpipes.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/licen...
}
<|file_name|>pages-data.js<|end_file_name|><|fim▁begin|>'use strict'; // Meta data used by the AngularJS docs app angular.module('pagesData', []) .value('NG_PAGES', { "api": { "name": "API Reference", "area": "api", "path": "api" }, "error/$animate/nocb": { "name": "nocb", "area": "error", ...
"error/ng/cpi": { "name": "cpi", "area": "error",
<|file_name|>utils.cpp<|end_file_name|><|fim▁begin|>// DXQuake3 Source // Copyright (c) 2003 Richard Geary (richard.geary@dial.pipex.com) // // // Useful Utilities for DQ // #include "stdafx.h" //'a'-'A' = 97 - 65 = 32 #define DQLowerCase( in ) ( ( (in)>='a' && (in)<='z' ) ? (in)-32 : (in) ) //Copy pSrc ...
{ int pos = 0;
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>use game::{Position, Move, Score, NumPlies, NumMoves}; #[derive(PartialEq, Eq, PartialOrd, Ord, Copy, Clone, Debug)] pub struct NumNodes(pub u64); #[derive(Clone, Debug)] pub struct State { pub pos: Position, pub prev_pos: Option<Position>, pub prev_move...
<|file_name|>Decompressor.java<|end_file_name|><|fim▁begin|>package wikokit.base.wikt.db; import android.util.Log; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; /** Decompress ziped file. * ...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>"""Ask Admin URL.""" from django.conf.urls.defaults import url, patterns urlpatterns = patterns('', url(r'^my_question/$', 'apps.widgets.AskedQuestions.views.send_question', name="ask_que_question"),<|fim▁hole|><|fim▁end|>
)
<|file_name|>treebuilder.rs<|end_file_name|><|fim▁begin|>//! A convenience struct to create symbolic trees. use ketos::{ Error, Interpreter, ModuleLoader, FromValue, }; use std::collections::HashSet; use std::fmt::Debug; use std::rc::Rc; use std::cell::RefCell; use std::mem; use tree::{ Tree, E...
<|file_name|>application.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __author__ = 'ogaidukov' import os.path import argparse import tornado.ioloop import tornado.httpserver import tornado.web from commonlib import configparser, logmaker from rotabanner.lib import route import redis import pygeoip config ...
template_path=os.path.join(os.path.dirname(__file__), "templates") application = TornadoApp(debug=args.debug, template_path=template_path) http_server = tornado.httpserver.HTTPServer(application) http_server.listen(listen_port, address=listen_addr)
<|file_name|>clone.rs<|end_file_name|><|fim▁begin|>// A unit struct without resources #[deriving(Show, Copy)] struct Nil; // A tuple struct with resources that implements the `Clone` trait<|fim▁hole|>fn main() { // Instantiate `Nil` let nil = Nil; // Copy `Nil`, there are no resources to move let copie...
#[deriving(Clone,Show)] struct Pair(Box<int>, Box<int>);
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>import { BrowserModule, Title } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { FormsModule } from '@angular/forms'; import { AppRoutingModule } from './app-routing.modu...
bootstrap: [AppComponent] }) export class AppModule { }
<|file_name|>WorkListStrategy.java<|end_file_name|><|fim▁begin|>/* * Copyright 2009-2013 Aarhus University * * 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...
<|file_name|>color.js<|end_file_name|><|fim▁begin|>// LOL import leftPad from 'left-pad'; export function stringToVec(string) { // TODO: Handle #rgb form. We may want to use rgb(r, g, b) form, but // it's not necessary. if (string == null) return new Float32Array(3); let r = parseInt(string.slice(1, 3), 16); ...
<|file_name|>large_gpu_cifar10_ffn.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from __future__ import print_function """ Batch Normalization + SVRG on MNIST Independent Study May 24, 2016 Yintai Ma """ """ # Use SGD AdaGrad instead """ """ under folder of batch_normalization Before merge; number 1 have op...
return updates
<|file_name|>CfgWeapons.hpp<|end_file_name|><|fim▁begin|>class CfgWeapons { // Base classes class ItemCore; class H_HelmetB; class H_Cap_red; class H_Bandanna_khk; class rhs_booniehat2_marpatd; // RHSSAF class rhssaf_helmet_base : H_HelmetB{ rgoc_canAcceptNVG = 1; }; class rhssaf_helmet_m59_85_nocamo : rh...
class rhssaf_helmet_m97_olive_nocamo_black_ess : rhssaf_helmet_base{ rgoc_canAcceptNVG = 1; }; class rhssaf_helmet_m97_olive_nocamo_black_ess_bare: rhssaf_helmet_m97_olive_nocamo_black_ess{
<|file_name|>webelement.py<|end_file_name|><|fim▁begin|># Copyright 2008-2013 Software freedom conservancy # # 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...
else:
<|file_name|>js_trYML-tyi_lsxuEEYX3YJChhmBiEWLjQ6cxOAGnjOVU.js<|end_file_name|><|fim▁begin|>(function ($) { /** * Drag and drop table rows with field manipulation. * * Using the drupal_add_tabledrag() function, any table with weights or parent * relationships may be made into draggable tables. Columns containing a...
/**
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|># # Copyright 2013 Radware LTD. # # 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...
driver = self._get_driver_for_pool(context, v['pool_id']) driver.delete_vip(context, v) def _get_provider_name(self, context, pool):
<|file_name|>unique-strings.cpp<|end_file_name|><|fim▁begin|>// cpu/test/unique-strings.cpp -*-C++-*- // ---------------------------------------------------------------------------- // Copyright (C) 2015 Dietmar Kuehl http://www.dietmar-kuehl.de // ...
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
<|file_name|>resource.py<|end_file_name|><|fim▁begin|>try: import json except ImportError: import simplejson as json from UserList import UserList class Resource(object): """Object wrapper for resources. Provides an object interface to resources returned by the Soundcloud API. """ def __init...
# not JSON content = response.content if isinstance(content, list):
<|file_name|>popup.component.js<|end_file_name|><|fim▁begin|>import template from './popup.html'; import controller from './popup.controller.js'; import './popup.less'; export default { restrict: 'E', bindings: {}, template,<|fim▁hole|><|fim▁end|>
controller, controllerAs: 'vm' };
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute it and/or modif...
############################################################################## #
<|file_name|>symbollist.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # Request for symbolList. Currently RFA only support refresh messages # for symbolList. Hence, polling is required and symbolListRequest is called # internally by getSymbolList. # # IMAGE/REFRESH: # ({'MTYPE':'REFRESH','RIC':'0#BMD','SERVICE'...
symbolList = p.getSymbolList(RIC) print("\n=======\n" + RIC + "\n=======") print(symbolList.replace(" ","\n"))
<|file_name|>enqueue_test.py<|end_file_name|><|fim▁begin|>from unittest.mock import patch from superdesk.tests import TestCase from apps.publish.enqueue.enqueue_service import EnqueueService class NoTakesEnqueueTestCase(TestCase): def setUp(self): super().setUp() self.product_ids = self.app.data....
<|file_name|>DataBaseHelper.java<|end_file_name|><|fim▁begin|>package com.dank.festivalapp.lib; <|fim▁hole|>import android.util.Log; public class DataBaseHelper extends SQLiteOpenHelper{ //The Android's default system path of your application database. private static final String DATABASE_NAME = "FestivalApp....
import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper;
<|file_name|>filter.js<|end_file_name|><|fim▁begin|>/** * Module dependencies. */ var Emitter = require('emitter'); var render = require('render'); var events = require('events'); var empty = require('empty'); var filter = require('laws-filter'); var template = require('./filter-container'); var o = require('query')...
old.remove(); var obj = o('li[data-sort="closing-soon"]', this.el);
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use gl_generator::{Api, Fallbacks, Profile, Registry}; use std::env; use std::fs::File; use std::path::PathBuf; fn main() { let target = env::var("TARGET").unwrap(); let dest = PathBuf::from(&env::var("OUT_DIR").unwrap()); println!("cargo:rerun-if-changed...
Registry::new(Api::Wgl, (1, 0), Profile::Core, Fallbacks::All, []) .write_bindings(gl_generator::StaticGenerator, &mut file) .unwrap();
<|file_name|>test_pitchtools_PitchClass_is_pitch_class_number.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_PitchClass_is_pitch_class_number_01():<|fim▁hole|> assert pitchtools.PitchClass.is_pitch_class_number(0) assert pitchtools.PitchClass.is_pitch_class_n...
<|file_name|>register.py<|end_file_name|><|fim▁begin|>''' Created on Nov 2, 2012 @author: maodouzi ''' import logging from keystoneclient.v2_0 import client as keystone_client from novaclient.v1_1 import client as nova_client from cinderclient.v1 import client as cinder_client from keystoneclient.exceptions import B...
self.phoneNum = phoneNum self.corpName = corpName self.applyReason = applyReason
<|file_name|>RunJob.py<|end_file_name|><|fim▁begin|># Class definition: # RunJob # This is the main RunJob class; RunJobEvent etc will inherit from this class # Note: at the moment, this class is essentially the old runJob module turned object oriented. # The class will later become RunJobNormal, ie respo...
return True def cleanup(self, job, rf=None):
<|file_name|>ws.go<|end_file_name|><|fim▁begin|>/*Package websocket implements Websocket transport<|fim▁hole|> Websocket transport implements an HTTP(S) compliable, surveillance proof transport method with plausible deniability. */ package websocket //go:generate go run v2ray.com/core/common/errors/errorgen<|fim▁end|>
<|file_name|>create.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*-<|fim▁hole|> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ アプリケーションを新たに作成する create コマンド 各コマンドモジュールは共通インターフェースとして Command クラスを持ちます。 =============================== """ import os import sys import errno import shuti...
u""" =============================== Shimehari.core.manage.commands.create