prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>task_07_02.py<|end_file_name|><|fim▁begin|>import random from string import digits, ascii_letters, punctuation def password_generator(length): while True:<|fim▁hole|><|fim▁end|>
values = list(digits + ascii_letters + punctuation) yield ''.join([random.choice(values) for i in range(length)])
<|file_name|>response.go<|end_file_name|><|fim▁begin|>// Copyright 2009 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. // HTTP Response reading and parsing. package http import ( "bufio" "errors" "io" "net/textproto" "...
<|file_name|>client-example.py<|end_file_name|><|fim▁begin|>import sys sys.path.insert(0, "..") import logging import time try: from IPython import embed except ImportError: import code def embed(): vars = globals() vars.update(locals()) shell = code.InteractiveConsole(vars) ...
root = client.get_root_node() print("Root node is: ", root) objects = client.get_objects_node()
<|file_name|>instr_pminsb.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode}; use ::RegType::*; use ::instruction_def::*; use ::Operand::*; use ::Reg::*; use ::RegScale::*;<|fim▁hole|>use ::test::run_test; #[test] fn pminsb_1() { run_tes...
<|file_name|>context.go<|end_file_name|><|fim▁begin|><|fim▁hole|>} func (c *MemoryContext) Get(k string) (interface{}, error) { return c.data[k], nil } func (c *MemoryContext) Set(k string, d interface{}) error { if c.data == nil { c.data = make(map[string]interface{}) } c.data[k] = d return nil } func (c *Me...
package gooh type MemoryContext struct { data map[string]interface{}
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-09 11:32 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb<|fim▁hole|>import django.db.models.deletion class Migration(migrations.Migration): initial = True ...
from django.db import migrations, models
<|file_name|>liveness-use-after-move.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.ap...
y.clone(); }
<|file_name|>file1.py<|end_file_name|><|fim▁begin|>f = open("io/data/file1") print(f.read(5))<|fim▁hole|>print(f.read())<|fim▁end|>
print(f.readline())
<|file_name|>metadata_test.go<|end_file_name|><|fim▁begin|>// Copyright The OpenTelemetry 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...
"net/http" "net/http/httptest"
<|file_name|>FeetMeters.java<|end_file_name|><|fim▁begin|>import java.util.Scanner; public class FeetMeters {<|fim▁hole|> public static void main(String[] args) { Scanner keyboard = new Scanner(System.in); System.out.print("Number of feet: "); float feet = keyboard.nextInt(); float f...
<|file_name|>StartCheck.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import rospy from flexbe_core import EventState, Logger from flexbe_core.proxy import ProxyPublisher from smach import CBState class StartCheck(EventState): ''' Example for a state to demonstrate which functionality is available for s...
# If no outcome is returned, the state will stay active. ##if rospy.Time.now() - self._start_time < self._target_time: return 'succeeded' # One of the outcomes declared above.
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from video.models import Video<|fim▁hole|>class Comment(models.Model): author = models.ForeignKey(User) video = models.ForeignKey(Video) content = models.TextField() time = models...
# Create your models here.
<|file_name|>authentication.py<|end_file_name|><|fim▁begin|>''' Authentication by token for the serverland dashboard Web API. Project: MT Server Land prototype code<|fim▁hole|> Author: Will Roberts <William.Roberts@dfki.de> ''' from piston.utils import rc, translate_mime, MimerDataException from serverland.dashboard....
<|file_name|>sliceset.go<|end_file_name|><|fim▁begin|>// Copyright 2015 Kevin Gillette. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package sliceset provides a convenient []int set wrapper to aid in // testing and benchmarks, and to se...
<|file_name|>unreachable-static-msg.rs<|end_file_name|><|fim▁begin|>// run-fail // error-pattern:internal error: entered unreachable code: uhoh // ignore-emscripten no processes <|fim▁hole|><|fim▁end|>
fn main() { unreachable!("uhoh") }
<|file_name|>func_module.py<|end_file_name|><|fim▁begin|>## ## Copyright 2007, Red Hat, Inc ## see AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license.<|fim▁hole|>## import inspect from func import logger from func.config import read_config, BaseConfig from fun...
## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
<|file_name|>lookup.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand, CommandError from mangaki.models import Work, Rating from django.db import connection from django.db.models import Count from collections import Counter import sys <|fim▁hole|> def handle(self, *args, **options)...
class Command(BaseCommand): args = '' help = 'Lookup some work'
<|file_name|>crack.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import re from sys import argv from orig import strxor #Load dictionary for validation with open('cracklib-small', 'r') as fp: wordlist = set(fp.read().split('\n')) def isprintable(inp): words = inp.split(' ') if len(words) == 1: ...
<|file_name|>PatientDiagnosisStatusForReferralCodingVoBean.java<|end_file_name|><|fim▁begin|>//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> ...
this.id = vo.getBoId(); this.version = vo.getBoVersion();
<|file_name|>parser.py<|end_file_name|><|fim▁begin|># This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. #<|fim...
<|file_name|>test_long_future.py<|end_file_name|><|fim▁begin|>from __future__ import division # When true division is the default, get rid of this and add it to # test_long.py instead. In the meantime, it's too obscure to try to # trick just part of test_long into using future division. import sys import random impor...
# result of true division of ints is always correctly rounded. # This test should probably be considered CPython-specific.
<|file_name|>i686_unknown_linux_gnu.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.apa...
Target { data_layout: "e-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string(), llvm_target: "i686-unknown-linux-gnu".to_string(),
<|file_name|>schedule.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, ViewChild } from '@angular/core'; import { Schedule } from '../../../shared/model/schedule.model'; import { Task } from '../../../shared/model/task.model'; import { map, mergeMap } from 'rxjs/operators'; import { ActivatedRoute,...
this.schedule.name = params.id;
<|file_name|>org.kevoree.modeling.microframework.typescript.d.ts<|end_file_name|><|fim▁begin|>declare module org { module kevoree { module modeling { class KActionType { static CALL: KActionType; static CALL_RESPONSE: KActionType; static SET: KActi...
class AtomicGetIncrementResult implements org.kevoree.modeling.message.KMessage { id: number;
<|file_name|>axis.js<|end_file_name|><|fim▁begin|>// "horizontalaxis" : { // "id" : STRING, "type" : DATATYPE(number), "length" : RELLEN(1.0), "base" : POINT(-1,1), "anchor" : DOUBLE(-1), "position" : POINT(0,0), // "min" : DATAVALUEORAUTO(auto), "max" : DATAVALUEORAUTO(auto), "minposition" : RELPOS(-1.0), "maxp...
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>from concurrent.futures import ThreadPoolExecutor import grpc<|fim▁hole|>import pytest from crawler.services import Library import crawler_pb2_grpc @pytest.fixture(name='grpc_client', scope='session', autouse=True) def setup_grpc_client(): server = grpc.serv...
<|file_name|>md_docs_test.go<|end_file_name|><|fim▁begin|>package doc import ( "bytes" "fmt" "os" "strings" "testing" ) var _ = fmt.Println var _ = os.Stderr func TestGenMdDoc(t *testing.T) { c := initializeWithRootCmd() // Need two commands to run the command alphabetical sort cmdEcho.AddCommand(cmdTimes, c...
c.AddCommand(cmdPrint, cmdEcho) cmdRootWithRun.PersistentFlags().StringVarP(&flags2a, "rootflag", "r", "two", strtwoParentHelp)
<|file_name|>event.rs<|end_file_name|><|fim▁begin|>use events; use events::KeyModifiers; use cocoa::base::NSUInteger; use cocoa::appkit; pub fn modifierflag_to_element(flag: NSUInteger) -> KeyModifiers { let mut modifiers = KeyModifiers::empty(); if flag & appkit::NSShiftKeyMask as u64 == appkit::NSShiftKeyMas...
<|file_name|>pin.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** * Copyright (C) 2012 by santiago González * * santigoro@gmail.com * * ...
m_label->setPos(-4, 4 ); m_label->rotate( 180-dir ); m_label->setText("");//( QString("%1 v").arg(m_volt) );
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
public = {"is_public": True, "status": "active"} try:
<|file_name|>signal_unsupported.go<|end_file_name|><|fim▁begin|>// +build !linux,!darwin,!freebsd,!windows package signal import ( "syscall" ) <|fim▁hole|>var SignalMap = map[string]syscall.Signal{}<|fim▁end|>
// SignalMap is an empty map of signals for unsupported platform.
<|file_name|>bitcoin_pt_PT.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="pt_PT" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About ReturnCoin</source> <translation type="un...
<source>Open until %1</source> <translation>Aberto até %1</translation>
<|file_name|>utils.spec.ts<|end_file_name|><|fim▁begin|>import * as utils from '../utils'; import '@testing-library/jest-dom/extend-expect'; describe('isCoveredByReact', () => { it('should identify standard events as covered by React', () => { expect(utils.isCoveredByReact('click')).toEqual(true); }); it('sh...
<|file_name|>global-filter-test.js<|end_file_name|><|fim▁begin|>import { test } from 'ember-qunit'; import moduleForComponent from 'open-event-frontend/tests/helpers/component-helper'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('ui-table/global-filter', 'Integration | Component | ui table/global ...
test('it renders', function(assert) { this.set('messages', messages); this.render(hbs `{{ui-table/global-filter messages=messages}}`); assert.ok(this.$().html().trim().includes('Search'));
<|file_name|>fieldset.js<|end_file_name|><|fim▁begin|>/** * Copyright © 2016 Magento. All rights reserved. * See COPYING.txt for license details. */ define([ 'Magento_Ui/js/form/components/fieldset', 'Magento_Catalog/js/components/visible-on-option/strategy' ], function (Fieldset, strategy) { 'use strict...
return Fieldset.extend(strategy).extend( { defaults: { openOnShow: true
<|file_name|>workletglobalscope.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 devtools_traits::ScriptToDevtoolsControlMsg; u...
.evaluate_js_on_global_with_result(&*script, rval.handle_mut()) }
<|file_name|>interactive_correlation_plot.py<|end_file_name|><|fim▁begin|>### Interactively plot points ### to show the correlation between the x and y directions. ### By Rajeev Raizada, Jan.2011. ### Requires Python, with the Matplotlib and SciPy modules. ### You can download Python and those modules for free from ###...
<|file_name|>inkCssRipple.js<|end_file_name|><|fim▁begin|>angular.module('material.animations') .directive('inkRipple', [ '$materialInkRipple', InkRippleDirective<|fim▁hole|> '$window', '$$rAF', '$materialEffects', '$timeout', InkRippleService ]); function InkRippleDirective($materialInkRipple) { retur...
]) .factory('$materialInkRipple', [
<|file_name|>testModes.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. *--------...
public makeClone():ModelState2 { return new ModelState2(<ModelMode2>this.getMode(), this.prevLineContent); }
<|file_name|>color.rs<|end_file_name|><|fim▁begin|>use std::{borrow::Cow, str::FromStr}; /// The 8 standard colors. #[derive(Clone, Copy, Debug, PartialEq, Eq)] #[allow(missing_docs)] pub enum Color { Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, BrightBlack, BrightRed,...
$( #[test]
<|file_name|>watch.test.ts<|end_file_name|><|fim▁begin|>import * as Vue from 'vue' import { expect } from 'chai' import * as Utils from './_testutils' import { Watch } from '../src/watch' import { VueComponent } from '../src/vuecomponent' describe('Watch', function(){ @VueComponent class WatchTest{ ...
}
<|file_name|>box.spec.ts<|end_file_name|><|fim▁begin|>import 'mocha' import { assert } from 'chai' describe('Component: box', () => { let check: boolean beforeEach(() => { check = true })<|fim▁hole|> it('check test', () => { assert.equal(check, true) }) })<|fim▁end|>
<|file_name|>host.go<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Fabrício Godoy<|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/licenses/LICENSE-2.0 * ...
*
<|file_name|>test_AssetAPI.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under ...
def test_types_get(self): method = 'test_types_get' rv = self.app.get('/api/assets/types?session_id=test')
<|file_name|>create_sample_event.py<|end_file_name|><|fim▁begin|><|fim▁hole|> :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from django.core.management.base import BaseCommand, CommandError, make_option class Command(BaseCommand): help = 'C...
""" sentry.management.commands.create_sample_event ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<|file_name|>sinks.go<|end_file_name|><|fim▁begin|>/* Copyright 2012 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.0 Unless required by ...
s.v.b = b *s.sp = string(b)
<|file_name|>types.rs<|end_file_name|><|fim▁begin|>//! Common types used as input and output. use crate::render::input::{self, InputType}; use crate::render::output::{self, OutputType}; use crate::render::type_channel::TypeChan; /// One-dimensional integral output a.k.a. red channel. #[derive(Clone, Copy, Debug, Hash...
const OUTPUT: output::Type = output::Type::Float(TypeChan::Two); }
<|file_name|>consulalerta.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import json import os <|fim▁hole|> CONSUL_HOST = os.environ.get('CONSUL_HOST', '127.0.0.1') CONSUL_PORT = int(os.environ.get('CONSUL_PORT', 8500)) client = consul.Consul(host=CONSUL_HOST, port=CONSUL_PORT, token=None, scheme='http', consi...
import consul import sys import time from alertaclient.api import Client
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support for Wireless Sensor Tags.""" import logging from requests.exceptions import ConnectTimeout, HTTPError import voluptuous as vol from wirelesstagpy import NotificationConfig as NC from homeassistant import util from homeassistant.const import ( ATTR_B...
"""Base class for HA implementation for Wireless Sensor Tag.""" def __init__(self, api, tag): """Initialize a base sensor for Wireless Sensor Tag platform."""
<|file_name|>0057_auto__chg_field_project_slug__chg_field_task_assignee.py<|end_file_name|><|fim▁begin|># encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Chan...
'videos.subtitlelanguage': { 'Meta': {'unique_together': "(('video', 'language', 'standard_language'),)", 'object_name': 'SubtitleLanguage'}, 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'followers': ('django.db.models.f...
<|file_name|>params.go<|end_file_name|><|fim▁begin|>// Package parameters parses json into parameters object // usage: // 1) parse json to parameters: // parameters.MakeParsedReq(fn http.HandlerFunc) // 2) get the parameters: // params := parameters.GetParams(req) // val := params.GetXXX("key") package parameters ...
} } return slice, true
<|file_name|>BaseUrlManager.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 - 2021 TU Dortmund * * 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/licen...
} }
<|file_name|>replace-config-env-vars.js<|end_file_name|><|fim▁begin|>module.exports = function(context) { const fs = require('fs'); const cordova_util = context.requireCordovaModule('cordova-lib/src/cordova/util'); let projectRoot = cordova_util.isCordova(); let configXML = cordova_util.projectConfig(projectR...
<|file_name|>solution_test.go<|end_file_name|><|fim▁begin|>package main import ( "math" "testing" ) func TestExamplesInReadme(t *testing.T) { t.Run("Repeater", func(t *testing.T) { actual := Repeater("foo", ":")(3) expected := "foo:foo:foo" if expected != actual { t.Errorf("Expected `%s` but got `%s`", ...
actual := powerSum(1, 2, 3, 4) expected := 30 if expected != actual {
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os import re from setuptools import setup, find_packages THIS_DIR = os.path.dirname(os.path.realpath(__name__)) <|fim▁hole|> return f.read() def get_version(): return re.findall("__version__ = '([\d\.]+)'", read('marionette'...
def read(*parts): with open(os.path.join(THIS_DIR, *parts)) as f:
<|file_name|>ms_r50v1_fpn_1x.py<|end_file_name|><|fim▁begin|>from symbol.builder import add_anchor_to_arg from models.FPN.builder import MSRAResNet50V1FPN as Backbone from models.FPN.builder import FPNNeck as Neck from models.FPN.builder import FPNRoiAlign as RoiExtractor from models.FPN.builder import FPNBbox2fcHead a...
long = 1333
<|file_name|>ThreadingLongrunningTest.java<|end_file_name|><|fim▁begin|>package com.wirecard.acqp.two; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test;...
try { threads[i].join();
<|file_name|>testimony_markers.py<|end_file_name|><|fim▁begin|>import inspect import re import pytest from robottelo.logging import collection_logger as logger IMPORTANCE_LEVELS = [] def pytest_addoption(parser): """Add CLI options related to Testimony token based mark collection""" parser.addoption( ...
selected = []
<|file_name|>production.js<|end_file_name|><|fim▁begin|>var cred = require('./cred'); module.exports = { 'db': { 'host': 'pub-redis-10769.us-east-1-2.4.ec2.garantiadata.com', 'port': 10769,<|fim▁hole|><|fim▁end|>
'auth': cred.auth } };
<|file_name|>test_k_hnumbers.py<|end_file_name|><|fim▁begin|>import io import unittest from unittest.mock import patch from kattis import k_hnumbers ############################################################################### class SampleInput(unittest.TestCase): '''Problem statement sample inputs and outputs'...
outputs.append('789 62')
<|file_name|>conf.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Total Open Station documentation build configuration file, created by # sphinx-quickstart on Sat Feb 28 23:03:04 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configu...
<|file_name|>AmMixinsInternal.java<|end_file_name|><|fim▁begin|>/* * ADL2-core * Copyright (c) 2013-2014 Marand d.o.o. (www.marand.com) * * This file is part of ADL2-core. * * ADL2-core is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * pub...
} return result;
<|file_name|>js.js<|end_file_name|><|fim▁begin|>//Variables var chrome_points = 0; //Functions function test_chromepoints() { chrome_points = chrome_points + 1; } //HTML Updates window.setInterval(function(){ document.getElementById("chrome_points").innerHTML = chrome_points;<|fim▁hole|><|fim▁end|>
}, 1000);
<|file_name|>compare_predictions.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2018 The Google AI Language Team 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 # # h...
def main(unused_argv): gold_examples = tsv_utils.read_tsv(FLAGS.gold)
<|file_name|>sv-lumx-users-dropdown.js<|end_file_name|><|fim▁begin|>(function () { 'use strict'; angular.module('common') <|fim▁hole|> btnTitle: '@', actionCounter: '@', userAvatar: '@', userName: '@', userF...
.directive('svLumxUsersDropdown', function () { return { templateUrl: 'scripts/common/directives/sv-lumx-users-dropdown.html', scope: {
<|file_name|>bitcoin_ja.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="ja" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About CryptoBancor</source> <translation>ブラックコインについて...
<source>This setting will take effect after restarting CryptoBancor.</source>
<|file_name|>page2.js<|end_file_name|><|fim▁begin|>XO.View.define({<|fim▁hole|> cssHost:'body', init:function(){ XO.warn('View inited:'+this.id); } });<|fim▁end|>
pid:'home', vid:'page2', version:'20131209',
<|file_name|>Footer.js<|end_file_name|><|fim▁begin|><|fim▁hole|>const Footer = () => <p>Footer</p>; export default Footer;<|fim▁end|>
import React from 'react';
<|file_name|>loop-break-value.rs<|end_file_name|><|fim▁begin|>// Copyright 2016 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...
}
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import logging import utils import options _Warning = logging.Warning _Info = logging.Info #//===========================================================================// _site_setup = [] _user_setup = {} _tools_setup = {} _tools_post_setup = {} def ResetSetup...
return for f in setup_functions:
<|file_name|>prob3.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Written against python 3.3.1 # Matasano Problem 3 # The hex encoded string: # 1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736 # has been XOR'd against a single character. Find the key, decrypt # the message. # Some...
<|file_name|>org_eclipse_swt_events_MenuDetectListenerNative.go<|end_file_name|><|fim▁begin|><|fim▁hole|>import "unsafe" /* #include<stdint.h> extern void go_callback_EventsMenuDetectListenerNative_MenuDetected(void *env, uintptr_t obj, uintptr_t arg_0 ); */ import "C" //export go_callback_EventsMenuDetectListenerN...
package swt import "github.com/timob/javabind"
<|file_name|>amqp_detail.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this fi...
conn_detail.counts.drain += 1 def index_addresses(self):
<|file_name|>ls-service.js<|end_file_name|><|fim▁begin|>(function(){ 'use strict'; angular .module('app') .constant('LSVER', 1); angular .module('app') .constant('LSKEYS', { fontSize: 'fontSize', fontBold: 'fontBold', themeDarK: 'themeDarK', auth: 'auth', data: 'da...
function remove(key){ localStorage.removeItem(prefixKey(key)); }
<|file_name|>test_export_xlsx.py<|end_file_name|><|fim▁begin|>from aiohttp import web from dvhb_hybrid.export.xlsx import XLSXResponse async def handler1(request): async with XLSXResponse(request, filename='1.xlsx') as r: r.append({'x': 2, 'y': 3})<|fim▁hole|> r.append({'x': 'a', 'y': 'f'}) ret...
<|file_name|>OrderItemEndpoint.java<|end_file_name|><|fim▁begin|>/** * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless ...
<|file_name|>suggest.js<|end_file_name|><|fim▁begin|>import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { EuiSuggestItem } from './suggest_item'; import { EuiSuggestInput } from './suggest_input'; export class EuiSuggest extends Component { state = { value: '', status: 'unsa...
<|file_name|>DashIsoGroupSettings.cpp<|end_file_name|><|fim▁begin|>/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/mediaconvert/model/DashIsoGroupSettings.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using n...
m_segmentControlHasBeenSet(false), m_segmentLength(0), m_segmentLengthHasBeenSet(false), m_segmentLengthControl(DashIsoSegmentLengthControl::NOT_SET),
<|file_name|>0004_auto_20180109_1727.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-01-09 15:27 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|>class Migration(migrations.Migration): dependencies = [ ('helusers', '0...
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>import config from '@automattic/calypso-config'; import debugFactory from 'debug'; // Enable/disable ad-tracking // These should not be put in the json config as they must not differ across environments export const isGoogleAnalyticsEnabled = true;<|fim▁hole|>expo...
<|file_name|>matcher.py<|end_file_name|><|fim▁begin|>import itertools, logging from gibbs.models import CommonName, Compound, Enzyme from haystack.query import SearchQuerySet class Error(Exception): pass class IllegalQueryError(Error): pass class Match(object): """An object containing a string match a...
<|file_name|>TacticNotationsLexer.py<|end_file_name|><|fim▁begin|># Generated from TacticNotations.g by ANTLR 4.7.2 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u596...
symbolicNames = [ "<INVALID>", "LALT", "LGROUP", "LBRACE", "RBRACE", "ESCAPED", "PIPE", "ATOM", "ID", "SUB", "WHITESPACE" ]
<|file_name|>cell-manager.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core'; import { Cell, SpreadsheetColumn } from '../model'; @Injectable() export class CellManager { private cellList: Cell[] = []; constructor() { } <|fim▁hole|> getCellList() { return this.cellList.slice(0); }...
<|file_name|>application.js<|end_file_name|><|fim▁begin|>// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. //<|fim▁hole|>// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // compiled file. JavaScript code...
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's // vendor/assets/javascripts directory can be referenced here using a relative path. //
<|file_name|>entriesIn.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>module.exports = require('./toPairsIn'); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NsaWVudC9saWIvbG9kYXNoL2VudHJpZXNJbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLE9BQU8sT0FBUCxHQUFpQ...
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django_countries import CountryField from django.contrib.localflavor.us.models impo...
registration_due_by = models.DateTimeField(blank=True, null=True) registration_instructions = models.TextField(blank=True, null=True)
<|file_name|>tooltip.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for iview 3.1.0<|fim▁hole|>// Project: https://github.com/iview/iview // Definitions by: yangdan // Definitions: https://github.com/yangdan8/iview.git import Vue, { VNode } from 'vue'; export declare interface Tooltip extends Vue { /** * 显...
<|file_name|>advent_of_code_2015_day_05.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Advent of Code 2015 from http://adventofcode.com/2015/day/5 Author: James Walker Copyrighted 2017 under the MIT license: http://www.opensource.org/licenses/mit-license.php Execution: python adv...
<|file_name|>progress.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 def progress(pos, scale): pixels_per_char = 6 max_chars = 16 max_progress = max_chars * pixels_per_char progress = (pos/scale)*max_progress print(int ((pos/scale)*max_chars) ) for i in range(0,max_chars): if i==int((pos/scale)*max_ch...
{ c = 5;
<|file_name|>test_comment_views.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, unicode_literals import re from django.conf import settings from django.contrib.auth.models import User from django_comments import signals from django_comments.models import Comment from . import CommentTestCase...
""" The `next` key needs to handle already having an anchor. Refs #13411. """ # With a query string also.
<|file_name|>misc_endpoints.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright (C) 2014-2017 Shea G Craig # # 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...
"""Flush logs for an interval of time.
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import classnames from 'classnames'; import PropTypes from 'prop-types'; import React, { Component } from 'react'; import telephonyStatuses from 'ringcentral-integration/enums/telephonyStatus'; import callDirections from 'ringcentral-integration/enums/callDirections'; ...
} = nextProps; if (currentNotificationIdentify) { const { call = {} } = logNotification;
<|file_name|>joypad.rs<|end_file_name|><|fim▁begin|>// This file is part of Mooneye GB. // Copyright (C) 2014-2020 Joonas Javanainen <joonas.javanainen@gmail.com> // // Mooneye GB 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 ...
write!(f, "{:02X}", !self.register.bits) } }
<|file_name|>closure.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/li...
let freevars_ptr = &freevars; trans_closure(bcx.ccx(), decl,
<|file_name|>read_migrated_cache.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Read migrated cache file.""" import argparse import logging import sys import rss2irc def main(): """Try to read given cache file.""" args = parse_args() logger = logging.getLogger('read-migrated-cache') cache ...
'--cache', dest='cache', type=str, default=None, help='File which contains cache.' )
<|file_name|>bin.rs<|end_file_name|><|fim▁begin|>use super::{RmpWrite}; use crate::encode::{write_marker, ValueWriteError}; use crate::Marker; /// Encodes and attempts to write the most efficient binary array length implementation to the given /// write, returning the marker used. /// /// This function is useful when ...
write_marker(&mut *wr, Marker::Bin32)?;
<|file_name|>Events.js<|end_file_name|><|fim▁begin|>import React from 'react' <|fim▁hole|> import { Timeline, Alert } from 'antd' const Item = Timeline.Item @connect(state => ({ stage: state.config.stage, news: state.config.news, timeline: state.config.timeline })) class Events extends React.Component {...
import { connect } from 'react-redux'
<|file_name|>ifmt-bad-format-args.rs<|end_file_name|><|fim▁begin|>fn main() { format_args!(); //~ ERROR: requires at least a format string argument<|fim▁hole|>}<|fim▁end|>
format_args!(|| {}); //~ ERROR: must be a string literal
<|file_name|>bitcoin_af_ZA.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="af_ZA" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Vector</source> <translation type="unfini...
</message> </context> <context> <name>WalletModel</name>
<|file_name|>load.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use cpython::{PyDict, PyList, PyObject, PyResult, PyString, Python, PythonObject, ToPyObject}; use linked_hash_map::LinkedHashMap; use yaml_rust::{Yaml, YamlLoader}; fn convert_yaml_to_dict(py: Python, yaml: &LinkedHashMap<Yaml, Yaml>) -> PyDict { yaml....