prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>filter_linux.go<|end_file_name|><|fim▁begin|>package netlink import ( "bytes" "encoding/binary" "errors" "fmt" "syscall" "unsafe" "github.com/vishvananda/netlink/nl" "golang.org/x/sys/unix" ) // Constants used in TcU32Sel.Flags. const ( TC_U32_TERMINAL = nl.TC_U32_TERMINAL TC_U32_OFFSET = ...
<|file_name|>batch.py<|end_file_name|><|fim▁begin|>""" batch.py Batch simulation for M1 model using NetPyNE """ from netpyne.batch import Batch import numpy as np def runBatch(b, label, setup='mpi_bulletin'): b.batchLabel = label b.saveFolder = 'data/'+b.batchLabel b.method = 'grid' if setup == 'mp...
def batchNMDA(): params = {'tau1NMDA': [10, 15, 20, 25],
<|file_name|>tsxSpreadAttributesResolution5.tsx<|end_file_name|><|fim▁begin|>// @filename: file.tsx // @jsx: preserve // @noLib: true // @skipLibCheck: true // @libFiles: react.d.ts,lib.d.ts import React = require('react'); interface PoisonedProp { x: string; y: 2; } class Poisoned extends React.Component<Po...
prop1: false
<|file_name|>reference.py<|end_file_name|><|fim▁begin|>from six import string_types from pypif.obj.common.display_item import DisplayItem from pypif.obj.common.name import Name from pypif.obj.common.pages import Pages from pypif.obj.common.pio import Pio class Reference(Pio): """ Information about a reference...
self._validate_type('title', title, string_types) self._title = title
<|file_name|>rtdeps.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/licenses...
extern {}
<|file_name|>bitcoin_el_GR.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="el_GR" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Number7</sourc...
<translation>Ορίστε αρχείο ρυθμίσεων (προεπιλογή: number7.conf)</translation>
<|file_name|>table.rs<|end_file_name|><|fim▁begin|>use std::collections::HashMap; use rustc_serialize::json::Json; #[derive(Debug)] pub enum TableError { TableDoesNotExist, TableAlreadyExists, KeyAlreadyPresent, KeyDoesNotExist, }<|fim▁hole|> data: HashMap<String, HashMap<String, Json>> } impl Tabl...
pub struct Tables {
<|file_name|>isis3dataset.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * * Project: ISIS Version 3 Driver * Purpose: Implementation of ISIS3Dataset * Author: Trent Hare (thare@usgs.gov) * Frank Warmerdam (warmerdam@pobox.com) * ...
<|file_name|>calc_distance_hint.py<|end_file_name|><|fim▁begin|>def output_gpx(points, output_filename): """ Output a GPX file with latitude and longitude from the points DataFrame. """ from xml.dom.minidom import getDOMImplementation def append_trkpt(pt, trkseg, doc): trkpt = doc.createElem...
def main(): points = get_data(sys.argv[1])
<|file_name|>vec.py<|end_file_name|><|fim▁begin|>def getitem(v,d): "Returns the value of entry d in v" assert d in v.D return v.f[d] if d in v.f else 0 def setitem(v,d,val): "Set the element of v with label d to be val" assert d in v.D v.f[d] = val def equal(u,v): "Returns true iff u is eq...
"""
<|file_name|>selection.js<|end_file_name|><|fim▁begin|>/** * @file * Provides functions that enable the selection of elements on a webpage, which can then be manipulated. * * HTML elements on the webpage that have a class containing '.selectable' */ // JavaScript should be made compatible with libraries other t...
<|file_name|>validationGroup.ts<|end_file_name|><|fim▁begin|>import { Component, Input, Optional, OnInit, AfterViewInit, OnChanges, SimpleChange } from '@angular/core'; import { FormGroup, FormControl } from '@angular/forms'; import { services } from 'typescript-angular-utilities'; import __validation = services.valid...
@Input() validators: __validation.IObservableValidationHandler[];
<|file_name|>rust-indexer.rs<|end_file_name|><|fim▁begin|>#[macro_use] extern crate clap; extern crate env_logger; #[macro_use] extern crate log; extern crate rls_analysis; extern crate rls_data as data; extern crate tools; use crate::data::GlobalCrateId; use crate::data::{DefKind, ImplKind}; use rls_analysis::{Analys...
let maybe_nested = ignore_boring_spans(&nested_span); visit_def( &mut dataset, AnalysisKind::Def,
<|file_name|>travels.js<|end_file_name|><|fim▁begin|>angular.module('app.travels', ['pascalprecht.translate']) .controller('TravelsCtrl', function($scope, $http, $ionicModal, $timeout, $ionicLoading, $filter) { $scope.loadMorePagination = true; $scope.travels = []; $scope.page = 0; $scope.doRefresh ...
console.log($scope.page); $scope.doRefresh(); }else{ console.log("limit pagination reached");
<|file_name|>launch.py<|end_file_name|><|fim▁begin|>import subprocess, os, zipfile, requests ## Function Download def download(url, fichier): pass fileName = fichier req = requests.get(url) file = open(fileName, 'wb') for chunk in req.iter_content(100000):<|fim▁hole|>def unzip(source , destination): with zipfile...
file.write(chunk) file.close() print("The download is finish !") ## Function Unzip
<|file_name|>FluxIntegral.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** FluxIntegral.cpp - Integrates Lx dx L (x1, x2) = int^x2_x1 dx Lx ------------------- begin : December 2006 copyrig...
it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models from django.contrib.auth.models import User class OdooUser(models.Model): user = models.OneToOneField(User)<|fim▁hole|> username = models.CharField(max_length=256)<|fim▁end|>
odoo_id = models.BigIntegerField(primary_key=True)
<|file_name|>exists_movie.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals, division, absolute_import import os import re import logging from path import path from flexget import plugin from flexget.event import event from flexget.config_schema import one_or_more from flexget.plugin import get_...
movie = get_plugin_by_name('parsing').instance.parse_movie(entry['title'])
<|file_name|>list-question.client.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('applicant-test').controller('ApplicantTestController', ['$scope', '$stateParams', '$location', 'Authentication', 'Questions', '$http', function($scope, $stateParams, $location, Authentication, Questions, $http ) { ...
$scope.find = function(){
<|file_name|>tailf.py<|end_file_name|><|fim▁begin|>import os import io import stat import time import threading import sublime import sublime_plugin # Set of IDs of view that are being monitored. TAILF_VIEWS = set() STATUS_KEY = 'tailf' class TailF(sublime_plugin.TextCommand): ''' Start monitoring file in `...
<|file_name|>test-fsreqwrap-readFile.js<|end_file_name|><|fim▁begin|>'use strict'; const common = require('../common'); const assert = require('assert'); const tick = require('./tick'); const initHooks = require('./init-hooks'); const { checkInvocations } = require('./hook-checks'); const fs = require('fs'); const ho...
const as = hooks.activitiesOfTypes('FSREQWRAP'); let lastParent = 1; for (let i = 0; i < as.length; i++) {
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import {Component} from '@angular/core'; @Component({ selector: 'app-component', template: ` <div class="container"><|fim▁hole|> <a [routerLink]="['about']">About</a> </p> <router-outlet></router-outlet> </div>` }) ex...
<h1>Angular v4 boilerplate app</h1> <p> <a [routerLink]="['']">Example</a> |
<|file_name|>variables.py<|end_file_name|><|fim▁begin|>__author__ = 'sekely' ''' we are using variables almost everywhere in the code. variables are used to store results, calculations and many more. this of it as the famous "x" from high school x = 5, right? the only thing is, that in Python "x" can store anything ...
print(y)
<|file_name|>icon.rs<|end_file_name|><|fim▁begin|>use image::{Rgba, RgbaImage}; use imageproc::drawing::draw_text_mut; use image::imageops::resize; use rusttype::{Scale, Font}; use std::ptr::null_mut; use std::collections::HashMap; <|fim▁hole|>pub type GeneratedIcon = *mut winapi::shared::windef::HICON__; pub struct ...
<|file_name|>OrganizationTreeController.ts<|end_file_name|><|fim▁begin|>"use strict"; module ServiceRegister { export class OrganizationTreeController implements Affecto.Base.IController { public static $inject = ["$scope", "$routeParams", "$location", "organizationService", "busyIndicationService"]; ...
} public createSubOrganization($event: any, node: any): void {
<|file_name|>print_completion_loop.rs<|end_file_name|><|fim▁begin|>// // use async_std::prelude::*; // use async_std::fs; // use std::sync::Arc; // use eyre::{ // eyre, // Result, // // Context as _, // }; // // use bytes::BufMut; // use futures::stream::{StreamExt}; // use crate::models::VersionedModel; ...
<|file_name|>conv.cc<|end_file_name|><|fim▁begin|>#include <iostream> #include "DVB.hh" int main(int argc, char **argv) {<|fim▁hole|> con >> dvbd; // dvbd.set_outtype(VDR_OUT); cout << dvbd; }<|fim▁end|>
ifstream con(argv[1]); DVB dvbd(-1);
<|file_name|>test_domain_translation.py<|end_file_name|><|fim▁begin|>from wordbook.domain.models import Translation def test_translation_dto(): t = Translation( id=1, from_language='en', into_language='pl', word='apple', ipa='ejpyl', simplified='epyl', trans...
<|file_name|>fda_applications.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import<|fim▁hole|>from __future__ import print_function from __future__ import unicode_literals import pytest @pytest.fixture def fda_application(conn, organization): fda_application = { ...
from __future__ import division
<|file_name|>tanh_normal_projection_network.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2020 The PI-SAC 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://...
<|file_name|>testmagic.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import magic import sys m = magic.open(magic.MIME_TYPE) m.load() for f in sys.argv[1:]: try : print(f, m.file(f)) except : print("Except with %s" % f)<|fim▁end|>
#!/usr/bin/python
<|file_name|>Stylus.java<|end_file_name|><|fim▁begin|>/* * Pixel Dungeon * Copyright (C) 2012-2014 Oleg Dolya * * 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 Lic...
import com.watabou.legacy.Assets;
<|file_name|>borrowck-closures-unique-imm.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://w...
let p = &this.x; &mut this.x; //~ ERROR cannot borrow }; r()
<|file_name|>test_chart_date04.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from datetime import date from ..excel_comparsion_test import ExcelComparisonTest fr...
date(2013, 1, 10)] values = [10, 30, 20, 40, 20, 60, 50, 40, 30, 30]
<|file_name|>ioc.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import unicode_literals import glob import imp import inspect import os import sys from mb.config.config import get_default_config_file from mb.lib import logger from mb.lib import process _log = logger.get_logger...
if name in _defined_commands.keys():
<|file_name|>less.js<|end_file_name|><|fim▁begin|>/** * Compiles LESS files into CSS. * * --------------------------------------------------------------- * * Only the `assets/styles/importer.less` is compiled. * This allows you to control the ordering yourself, i.e. import your * dependencies, mixins, variables,...
<|file_name|>regress-441477-01.js<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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...
<|file_name|>base.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import urllib2 from lxml import etree class Scraper(object): # subclass must override this property url = None def scrape(self): stream = self.get_stream() doc = self.get_document(stream) return self.do_scrap...
return doc
<|file_name|>json_merge.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 TiKV Project Authors. Licensed under Apache-2.0. use super::{Json, JsonRef, JsonType}; use crate::codec::{Error, Result}; use std::collections::BTreeMap; impl Json { /// `merge` is the implementation for JSON_MERGE in mysql /// <https:/...
vec![r#"1"#, r#"[4]"#, r#"[1, 4]"#], vec![r#"4"#, r#"1"#, r#"[4, 1]"#], vec!["1", "2", "3", "[1, 2, 3]"], vec!["[1, 2]", "3", "[4, 5, 6]", "[1, 2, 3, 4, 5, 6]"],
<|file_name|>comp-4309.component.spec.ts<|end_file_name|><|fim▁begin|>/** * @license<|fim▁hole|> * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { async, ComponentFixture, T...
<|file_name|>base.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import class Newsletter(object): __all__ = ('is_enabled', 'get_subscriptions', 'update_subscription', 'create_or_update_subscription') DEFAULT_LIST_ID = 1 enabled = False def is_enabled(self): r...
def update_subscription(self, user, **kwargs): return None def create_or_update_subscription(self, user, **kwargs):
<|file_name|>wizard_nginx.go<|end_file_name|><|fim▁begin|>// Copyright 2017 The go-ethereum Authors // This file is part of go-ethereum. // // go-ethereum 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, eith...
import (
<|file_name|>lib.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/licens...
<|file_name|>csv_table.py<|end_file_name|><|fim▁begin|># -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # RecSQL -- a simple mash-up of sqlite and numpy.recsql # Copyright (C) 2007-2016 Oliver Beckstein <orbeckst@gmail.com> # Released under...
<|file_name|>GCEDescriptionParser.java<|end_file_name|><|fim▁begin|>package minerGCE; import org.xml.sax.SAXException; <|fim▁hole|>import ru.ispras.modis.NetBlox.parser.basicParsersAndUtils.XMLIntegerRangeStringProcessor; import ru.ispras.modis.NetBlox.parser.xmlParser.CommonXMLParser; import ru.ispras.modis.NetBlox.p...
import ru.ispras.modis.NetBlox.parser.basicParsersAndUtils.Utils;
<|file_name|>tkinter_gui.py<|end_file_name|><|fim▁begin|>from Tkinter import * root = Tk() root.title('first test window') #root.geometry('300x200') frm = Frame(root) frm_l = Frame(frm) Label(frm_l, text='left_top').pack(side=TOP) Label(frm_l, text='left_bottom').pack(side=BOTTOM) frm_l.pack(side=LEFT) frm_r = Frame...
frm3.pack(side=TOP) root.mainloop()
<|file_name|>exc.py<|end_file_name|><|fim▁begin|>#***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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|>update_api_docs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import import os import platform import sys import subprocess DIR_OF_THIS_SCRIPT = os.path....
return platform.system() == 'Windows'
<|file_name|>ParamHelper.java<|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 t...
length++; } if (length == 0)
<|file_name|>initializers.py<|end_file_name|><|fim▁begin|>#! /usr/bin/python # -*- coding: utf-8 -*- import numpy as np import tensorflow as tf __all__ = [ 'Initializer', 'Zeros', 'Ones', 'Constant', 'RandomUniform', 'RandomNormal', 'TruncatedNormal', 'deconv2d_bilinear_upsampling_initializer' ] class Initi...
def get_config(self): return {"mean": self.mean, "stddev": self.stddev, "seed": self.seed}
<|file_name|>glib_gobject.rs<|end_file_name|><|fim▁begin|>// GObject Introspection Rust bindings. // Copyright (C) 2014 Luis Araujo <araujoc.luisf@gmail.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 published by the Fr...
<|file_name|>mask.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree.<|fim▁hole|> FragmentDefinition, FragmentSpread, InlineFragment, OperationDefiniti...
*/ use crate::relay_directive::RelayDirective; use graphql_ir::{
<|file_name|>memfd.rs<|end_file_name|><|fim▁begin|>use libc; use std::os::unix::io::RawFd; use {Errno, Result};<|fim▁hole|>use std::ffi::CStr; bitflags!( pub struct MemFdCreateFlag: libc::c_uint { const MFD_CLOEXEC = 0x0001; const MFD_ALLOW_SEALING = 0x0002; } ); pub fn memfd_create(name...
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># This package will contain the spiders of your Scrapy project # # Please refer to the documentation for information on how to create and manage # your spiders. import json from urllib import urlencode from scrapy import log from scrapy.http import Request from sc...
uri=response.url,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""The Energy integration.""" from __future__ import annotations from homeassistant.components import frontend from homeassistant.core import HomeAssistant from homeassistant.helpers import discovery from homeassistant.helpers.typing import ConfigType from . impor...
"cost_sensors": {},
<|file_name|>fork_jit_tool.cpp<|end_file_name|><|fim▁begin|>/*BEGIN_LEGAL Intel Open Source License Copyright (c) 2002-2013 Intel Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistr...
<|file_name|>465-generate-image-assets.py<|end_file_name|><|fim▁begin|><|fim▁hole|> def run(): for chunk in chunked(Webapp.objects.all(), 50): for app in chunk: try: generate_image_assets.delay(app) except Exception: pass<|fim▁end|>
from amo.utils import chunked from mkt.developers.tasks import generate_image_assets from mkt.webapps.models import Webapp
<|file_name|>282 Expression Add Operators.py<|end_file_name|><|fim▁begin|>""" Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples: "123", 6 -> ["1+2+3", "1*2*3"] "232",...
<|file_name|>test_utils.py<|end_file_name|><|fim▁begin|>from sympy.core.numbers import comp, Rational from sympy.physics.optics.utils import (refraction_angle, fresnel_coefficients, deviation, brewster_angle, critical_angle, lens_makers_formula, mirror_formula, lens_formula, hyperfocal_distance, ...
<|file_name|>scale_gradient.py<|end_file_name|><|fim▁begin|># Copyright 2019 The Sonnet Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache....
Returns: A Tensor same as input, with scaled backward gradient. """
<|file_name|>test-stats-exporter.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2018 OpenCensus 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...
<|file_name|>praha_premierecinemas.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .base_premierecinemas import BasePremierecinemasCinemaSpider <|fim▁hole|>class Spider(BasePremierecinemasCinemaSpider): name = 'praha-premierecinemas' calendar_url = 'http://www.premierecinemas.cz/'<|fim▁end|>
<|file_name|>development.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from .base import * # memcache<|fim▁hole|> 'default' : { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' } }<|fim▁end|>
CACHES = {
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from flask import Blueprint, request, render_template from ..load import processing_results from ..abbr import get_abbr_map abbr_map = get_abbr_map() liner_mod = Blueprint('liner', __name__, template_folder='templates', static_folder='static') @liner_mod.route('/lin...
<|file_name|>timing_diagram.py<|end_file_name|><|fim▁begin|>import pdb class TimingDiagram: def print_diagram(self, xtsm_object): pdb.set_trace() seq = xtsm_object.XTSM.getActiveSequence() cMap=seq.getOwnerXTSM().getDescendentsByType("ChannelMap")[0] #channelHeir=cMap.createTimingG...
if edge.timing_group == ugc.timing_group and edge.channel_number == ugc.channel_number and edge.time == t.time: is_found = True
<|file_name|>Benchmark.ts<|end_file_name|><|fim▁begin|>namespace ZincDB { export class Benchmark { benchmarkContext: BenchmarkContext; sampleResults: number[]; defaultOptions: BenchmarkOptions; constructor(benchmarkContext: BenchmarkContext, options?: BenchmarkOptions) { this.benchmarkContext = benchmarkCo...
const testStartTime = Timer.getTimestamp(); do { // Setup
<|file_name|>oEmbed.js<|end_file_name|><|fim▁begin|>/* @flow */ import oEmbedStorage from './oEmbedStorage'; import getContentType from './getContentType'; import regexes from './regexes'; import providers from './providers'; import type { Embed } from './oEmbedTypes'; function getProperty(prop: string, type: ?string...
return data; }
<|file_name|>helloworld_grpc_pb.js<|end_file_name|><|fim▁begin|>// GENERATED CODE -- DO NOT EDIT! // Original file comments: // Copyright 2015, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditi...
<|file_name|>learning-experiment.py<|end_file_name|><|fim▁begin|><|fim▁hole|># This file is part of Lerot. # # Lerot 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 Software Foundation, either version 3 of the License, or #...
#!/usr/bin/python
<|file_name|>chats.py<|end_file_name|><|fim▁begin|>import asyncio import inspect import itertools import string import typing from .. import helpers, utils, hints from ..requestiter import RequestIter from ..tl import types, functions, custom if typing.TYPE_CHECKING: from .telegramclient import TelegramClient _M...
is_admin (`bool`, optional): Whether the user will be an admin in the chat. This will only work in small group chats.
<|file_name|>ModelDestination.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU Gen...
* accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation,
<|file_name|>ResponseCode.java<|end_file_name|><|fim▁begin|>/* * Copyright 1999-2020 Alibaba Group Holding 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.apac...
<|file_name|>loops-reject-labels-shadowing-lifetimes.rs<|end_file_name|><|fim▁begin|>// 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-APACHE or ...
fn meth_bad(&self) {
<|file_name|>TileWideSmallImageAndText01-success.js<|end_file_name|><|fim▁begin|>exports.setupMockScopes = function (nock) { var scopes = []; var scope; scope = nock('https://login.live.com:443') .post('/accesstoken.srf', "grant_type=client_credentials&client_id=ms-app%3A%2F%2Fs-1-15-2-145565886-1510793020-279771726...
'x-wns-msg-id': '72C92964293B8020',
<|file_name|>message_value.cpp<|end_file_name|><|fim▁begin|>#include "message_value.h" //#include <iostream> MessageValue::MessageValue() : message_array(NULL), sequence_name(NULL) {} MessageValue::MessageValue(char type, char* name) : message_type(type) { sequence_name = name; length = 1 + strlen(sequence_name) + ...
this -> length = rhs.length; this -> sequence_name = rhs.sequence_name; this -> message_type = rhs.message_type; if (this -> message_array != NULL) {
<|file_name|>bs_erf_numba_guvec_par.py<|end_file_name|><|fim▁begin|># Copyright (C) 2017-2018 Intel Corporation # # SPDX-License-Identifier: MIT import base_bs_erf import numba as nb from math import log, sqrt, exp, erf def black_scholes_numba_opt(price, strike, t, mr, sig_sig_two, vol, call, put): P = float...
base_bs_erf.run("Numba@guvec-par", black_scholes, pass_args=True)
<|file_name|>ObservedMethodsResouce.java<|end_file_name|><|fim▁begin|>package org.valuereporter.observation; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory....
} catch (IOException e) { log.error("Could not convert {} ObservedMethod to JSON.", observedMethods.size(), e);
<|file_name|>GFitsBinTable.hpp<|end_file_name|><|fim▁begin|>/*************************************************************************** * GFitsBinTable.hpp - FITS binary table class * * ----------------------------------------------------------------------- * * copyright (C) 2008-2018 b...
// Implemented pure virtual methods virtual void clear(void);
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import sys,os import numpy as np #os.environ["EPICS_CA_AUTO_ADDR_LIST"] = "NO" #os.environ["EPICS_CA_ADDR_LIST"] = "192.168.82.10"<|fim▁hole|> a = VIMC.velaINJMagnetController(True,False) print( np.array(a.getQuadNames()))<|fim▁end|>
#os.environ["EPICS_CA_MAX_ARRAY_BYTES"] = "10000000000" import velaINJMagnetControl as VIMC
<|file_name|>gcc_preprocess.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright 2013 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. import optparse import os import subprocess import sys from util import ...
<|file_name|>unpack_pak_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2018 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. import unpack_pak import unittest class UnpackPakTest(unittest.TestCase)...
<|file_name|>p24.rs<|end_file_name|><|fim▁begin|>use rand::{weak_rng, Rng, SeedableRng}; use util::{MT19937Rng, prng_crypt}; <|fim▁hole|>#[test] fn run() { let mut wk_rng = weak_rng(); // rng seeded from weak 16-bit seed let seed = wk_rng.next_u32() & 0xFFFF; let mut ks_rng = MT19937Rng::from_seed(seed...
<|file_name|>0260_auto_20180416_1839.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.10 on 2018-04-16 16:39 from __future__ import unicode_literals import base.models.learning_unit_year import django.core.validators from django.db import migrations, models import django.db.models.del...
),
<|file_name|>test_babymaker.py<|end_file_name|><|fim▁begin|>from babymaker import BabyMaker, EnumType, IntType, StringType, UUIDType, FieldType, DatetimeType, FloatType, EmbedType import unittest import string import sys from datetime import datetime, timedelta class TestMakeSomeBabies(unittest.TestCase): def te...
the_id = one.get("id") for char in the_id: self.assertTrue(char in string.digits)
<|file_name|>env.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python2<|fim▁hole|>import json, web from lib.log import Log class Env(object): @staticmethod def get(key): if key and key in web.ctx.env: return web.ctx.env[key] else: return web.ctx.env @staticmethod def set(key, value): web.ctx.env[key] ...
# -*- coding: utf-8 -*-
<|file_name|>step6.py<|end_file_name|><|fim▁begin|>import json f = open('text-stripped-3.json') out = open('text-lines.json', 'w') start_obj = json.load(f) <|fim▁hole|>characters_on_stage = [] currently_speaking = None last_scene = '1.1' for i in range(len(start_obj['data'])): obj = start_obj['data'][i] if obj['ty...
end_obj = {'data': []}
<|file_name|>zz.internal.local.fs.js<|end_file_name|><|fim▁begin|>var zz = { Internal: { Local: { FS: { File: {}, Directory: {} } } } }; zz.Internal.Local.FS.File.read = function(path, successCallback, errorCallback) { Ti.API.debug("ZZ...
null != successCallback && successCallback(blob);
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from zerver.lib.test_classes import WebhookTestCase class LidarrHookTests(WebhookTestCase): STREAM_NAME = "lidarr" URL_TEMPLATE = "/api/v1/external/lidarr?api_key={api_key}&stream={stream}" WEBHOOK_DIR_NAME = "lidarr" def test_lidarr_test(self) -> No...
* Scream * Billie Jean * The Way You Make Me Feel
<|file_name|>main.py<|end_file_name|><|fim▁begin|>from PySide import QtCore, QtGui from pysql_browser import MainWindow import sys def main(): app = QtGui.QApplication(sys.argv) window = MainWindow() window.show() sys.exit(app.exec_()) if __name__ == '__main__':<|fim▁hole|><|fim▁end|>
main()
<|file_name|>api-notes.js<|end_file_name|><|fim▁begin|>var joi = require('joi'); var _ = require('lodash'); module.exports = function(router, db) { // This is our "class" that accesses/modifies notes in the db var NoteService = require('../lib/db-notes') var noteService = new NoteService(db); // Joi is a wonderf...
if(err) return next(err);
<|file_name|>pizza.py<|end_file_name|><|fim▁begin|>import pygame from pygame import gfxdraw from .rangable import Rangable import random class Pizza(Rangable): """docstring for Pizza""" def __init__(self, context): Rangable.__init__(self) self.context = context self.pizza = self.context...
else:
<|file_name|>future.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 TiKV Project Authors. Licensed under Apache-2.0. use crate::callback::must_call; use futures::channel::mpsc; use futures::channel::oneshot as futures_oneshot; use futures::future::{self, BoxFuture, Future, FutureExt, TryFutureExt}; use futures::stre...
*future_slot = Some(future); } Poll::Ready(()) => {}
<|file_name|>SqlTypeToXmlType.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2013-2015 Josef Hardi <josef.hardi@gmail.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 of the License at * * ...
mTypeMapping.put(Types.TINYINT, DataType.BYTE); mTypeMapping.put(Types.REAL, DataType.FLOAT); mTypeMapping.put(Types.FLOAT, DataType.FLOAT); mTypeMapping.put(Types.DOUBLE, DataType.DOUBLE);
<|file_name|>latexdocvisitor.cpp<|end_file_name|><|fim▁begin|>/****************************************************************************** * * $Id: $ * * * Copyright (C) 1997-2012 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms ...
} } void LatexDocVisitor::endDotFile(bool hasCaption)
<|file_name|>default.js<|end_file_name|><|fim▁begin|>var index = require('express').Router(); var Member = require('../models/Member'); var sitemap = require('../middlewares/sitemap'); var utils = require('../middlewares/utils'); index.get('/', function (req, res) { res.redirect('/article'); }); index.get('/lang', ...
res.cookie('lang', setLang);
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import url from . import views urlpatterns = [<|fim▁hole|> url(r'^$', views.index, name='index'), url(r'^(?P<quiz_slug>[-A-Za-z0-9_]+)/$', views.quiz, name='quiz'), url(r'^(?P<quiz_slug>[-A-Za-z0-9_]+)/(?P<question_slug>[-A-Za-z0-9_]+)...
<|file_name|>list.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>/***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) * * Copyright (C) 2015 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it u...
<|file_name|>print.js<|end_file_name|><|fim▁begin|>#!/usr/bin/env node<|fim▁hole|>// // Test displaying DNS records var fs = require('fs') var tap = require('tap') var test = tap.test var util = require('util') var Message = require('../message') test('Display a message', function(t) { var file = 'oreilly.com-resp...
// // Copyright 2012 Iris Couch, all rights reserved.
<|file_name|>SaphireData.py<|end_file_name|><|fim▁begin|># Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
<|file_name|>editor.rs<|end_file_name|><|fim▁begin|>use std::env; use std::os; use std::process::{Command,Stdio}; use rand::Rng; use rand; use std::io::{Read,Write,BufReader,BufRead}; use std::fs; use std::path::{Path,PathBuf}; use std::fs::File; use super::Note;<|fim▁hole|>use std::io::Result; pub fn edit_note(note: ...
use super::util;