prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>archive.ts<|end_file_name|><|fim▁begin|>import { spawn, debug7zArgs } from "../util/util" import { CompressionLevel } from "../metadata" import * as path from "path" import { unlink } from "fs-extra-p" import { path7za } from "7zip-bin" class CompressionDescriptor { constructor(public flag: string, publ...
else if (format === "zip") { if (compression === "maximum") {
<|file_name|>ARMISelDAGToDAG.cpp<|end_file_name|><|fim▁begin|>//===-- ARMISelDAGToDAG.cpp - A dag to dag inst selector for ARM ----------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apac...
N.getOperand(0).getOpcode() != ISD::TargetExternalSymbol && N.getOperand(0).getOpcode() != ISD::TargetGlobalTLSAddress) { Base = N.getOperand(0);
<|file_name|>version.go<|end_file_name|><|fim▁begin|>package terraform import ( "fmt" "github.com/hashicorp/go-version" ) // The main version number that is being run at the moment. const Version = "0.10.6" // A pre-release marker for the version. If this is "" (empty string) // then it means that it is a final r...
var VersionPrerelease = "dev"
<|file_name|>ColumnValueContainer.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 ...
* with the License. You may obtain a copy of the License at *
<|file_name|>multi_file_writer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """Defines ways to "convert" a file name to an input/output stream.""" from __future__ import absolute_import, division, print_function from builtins import range from io import TextIOBase import math import os from emLam.utils impo...
<|file_name|>commandpacket.cpp<|end_file_name|><|fim▁begin|>#include "precomp.h" #include "stdinc.h" #include "io_sfen.h" #include "commandpacket.h" namespace godwhale { const CommandPacket::CharSeparator CommandPacket::ms_separator(" ", ""); CommandPacket::CommandPacket(CommandType type) : m_type(type), m_posit...
}
<|file_name|>term.py<|end_file_name|><|fim▁begin|># Copyright 2019 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
} }
<|file_name|>727. Minimum Window Subsequence.py<|end_file_name|><|fim▁begin|>from collections import defaultdict class Solution(object): def minWindow(self, S, T): """ :type S: str :type T: str :rtype: str """ pre = defaultdict(list) for i, c in enumerate(T,...
return ''
<|file_name|>ionicSideMenuDelegate.js<|end_file_name|><|fim▁begin|>(function() { 'use strict'; angular.module('ionic.ui.service.sideMenuDelegate', []) .factory('$ionicSideMenuDelegate', ['$rootScope', '$timeout', '$q', function($rootScope, $timeout, $q) { return { getSideMenuController: function($scope) { ...
$scope.sideMenuController.openPercentage(-100); } } };
<|file_name|>underlying_type.cpp<|end_file_name|><|fim▁begin|>#include "underlying_type.hpp" TC_UNDERLYING_TYPE aUNDERLYING_TYPE; void TC_UNDERLYING_TYPE::finish_type (tree t) { cerr << "finish_type: UNDERLYING_TYPE" << t << endl; };<|fim▁hole|> void TC_UNDERLYING_TYPE::finish_decl (tree t) { cerr << "finish_decl:...
<|file_name|>set-alias.ts<|end_file_name|><|fim▁begin|>import { store } from '../store' import { escapeDots } from '../utils/common' import { logger } from '../logger' <|fim▁hole|> value: string ): Promise<void> => { store.set(`alias.${escapeDots(name)}`, value) logger.success(`Added alias '${name}'`) }<|fim▁end|>
export const setAlias = () => async ( name: string,
<|file_name|>examples_test.go<|end_file_name|><|fim▁begin|>package ctxlogrus_test import ( "context" "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus" "github.com/grpc-ecosystem/go-grpc-middleware/tags" ) // Simple unary handler that adds custom fields to the requests's context. These will b...
l.Info("some ping") l.Info("another ping") }
<|file_name|>loginDrc.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('myApp').directive('loginDirective',function(){ return{ templateUrl:'partials/tpl/login.tpl.html' <|fim▁hole|> });<|fim▁end|>
}
<|file_name|>loading-mask.js<|end_file_name|><|fim▁begin|>'use strict'; exports.__esModule = true; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }<|fim▁hole|> function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeErr...
<|file_name|>DraggableComponentButton.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtGui import QPixmap, QMouseEvent from PyQt5.QtWidgets import QToolButton from PyQt5.QtCore import Qt, pyqtSignal from models.components import * class DraggableComponentB...
self.mousePress.emit(self.componentType, event)
<|file_name|>package.py<|end_file_name|><|fim▁begin|># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Kcov(CMakePackage): """Code coverage ...
debugging information to collect and report data without special compilation options"""
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>#include <iostream> using namespace std; struct Node { int inf; Node *next; }*start,*newptr,*save,*ptr,*rear; Node* Create_New_Node(int n) { newptr=new Node; newptr->inf=n; newptr->next=NULL; return newptr; } void Insert_End(Node *np) { if(...
<|file_name|>examples.py<|end_file_name|><|fim▁begin|><|fim▁hole|> class Tile(Split): class left(Stack): weight = 3 priority = 0 limit = 1 class right(TileStack): pass class Max(Split): class main(Stack): tile = False class InstantMsg(Split): class left(Ti...
from .tile import Split, Stack, TileStack
<|file_name|>model_gateway_timeout.go<|end_file_name|><|fim▁begin|>package esilegacy /* Gateway timeout model */ type GatewayTimeout struct { /* Gateway timeout message */ Error_ string `json:"error,omitempty"` /* number of seconds the request was given */ Timeout int32 `json:"timeout,omitempty"`<|fim▁hole|><|...
}
<|file_name|>R3Align.cpp<|end_file_name|><|fim▁begin|>// Source file for alignment utility functions // Include files #include "R3Shapes.h" // Namespace namespace gaps { R3Box R3BoundingBox(const RNArray<R3Point *>& points) { // Compute bounding box R3Box bbox = R3null_box; for (int i = 0; i < points.N...
<|file_name|>solution4.cpp<|end_file_name|><|fim▁begin|>#include <iostream> #include <seqan/stream.h> using namespace seqan; int main(int argc, char const ** argv) { if (argc != 2) { std::cerr << "USAGE: tutorial_solution1 VALUE\n"; return 1; } // Lexical casting with the 1-argument l...
std::cout << "lexicalCast<double>(" << argv[1] << ") == " << d << '\n'; } // Lexical casting with the 2-argument lexicalCast().
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>import itertools import logging from django import forms from django.conf import settings from django.utils.translation import ugettext_lazy as _ from mypage.pages.models import Page, Widget from mypage.rsswidgets.models import RSSWidget from mypage.rsswidgets.forms ...
class TemplateForm(forms.Form):
<|file_name|>test-utils.js<|end_file_name|><|fim▁begin|>/* The Conflict of Interest (COI) module of Kuali Research Copyright © 2005-2016 Kuali, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Fo...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+ // | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> | // | | // | This file is part of Syste...
// | System Syzygy is distributed in the hope that it will be useful, but |
<|file_name|>UserGrid.ts<|end_file_name|><|fim▁begin|>namespace GestionEquestre.Administration { @Serenity.Decorators.registerClass() export class UserGrid extends Serenity.EntityGrid<UserRow, any> { protected getColumnsKey() { return "Administration.User"; } protected getDialogType() { return...
<|file_name|>latex_directory_1_2.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python "Module to aggregate all pdf figures of a directory \ into a single latex file, and compile it." from __future__ import division, print_function import os import sys import re from optparse import OptionParser _VERSION = '1.0' def...
if pattern.match(cur_file):
<|file_name|>style_layer_maker.py<|end_file_name|><|fim▁begin|>""" Given Style Rules, create an SLD in XML format add it to a layer """ if __name__=='__main__': import os, sys DJANGO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(DJANGO_ROOT) os.environ['DJANGO_SETTIN...
self.layer_metadata = None # LayerMetadata object
<|file_name|>x86_64.rs<|end_file_name|><|fim▁begin|>use error::{Error, Result}; pub unsafe fn syscall0(mut a: usize) -> Result<usize> { asm!("int 0x80" : "={rax}"(a) : "{rax}"(a) : "memory" : "intel", "volatile"); Error::demux(a) } pub unsafe fn syscall1(mut a: usize, b: usize...
pub unsafe fn syscall2(mut a: usize, b: usize, c: usize) -> Result<usize> {
<|file_name|>time.rs<|end_file_name|><|fim▁begin|>//! Time support use std::cmp::Ordering; use std::ops::{Add, Sub}; use std::ptr; use libc::timespec as c_timespec; use libc::{c_int, c_long, time_t}; use remacs_lib::current_timespec; use remacs_macros::lisp_fn; use crate::{ lisp::LispObject, numbers::MOST_N...
*pusec = usec;
<|file_name|>view.js<|end_file_name|><|fim▁begin|>(function(window) { var DEFAULT_ERROR_ID = 'error-default'; /** * Very simple base class for views. * Provides functionality for active/inactive. * * The first time the view is activated * the onactive function/event will fire. * * The .seen pr...
if (typeof(handler) === 'object') { var context = handler;
<|file_name|>qubit.py<|end_file_name|><|fim▁begin|>from functools import reduce import numpy as np # Qubit representation on a Ket or Bra state. Allows to create only # basis qubits |0> or |1>. By performing operations defined operations # it's possible to get other qubits or qubit registers. class Qubit: KET = Tr...
<|file_name|>GrammarCreator.java<|end_file_name|><|fim▁begin|>/* Grammatical Evolution in Java Release: GEVA-v1.2.zip Copyright (C) 2008 Michael O'Neill, Erik Hemberg, Anthony Brabazon, Conor Gilligan Contributors Patrick Middleburgh, Eliott Bartley, Jonathan Hugosson, Jeff Wrigh Separate licences for asm, bsf, antl...
<|file_name|>resource_google_project_iam_custom_role_test.go<|end_file_name|><|fim▁begin|>package google import ( "fmt" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/terraform" ) func TestAccProjectIamCustomRole_basic(t...
{
<|file_name|>test_forms.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict from django.contrib.auth.models import AnonymousUser from kitsune.questions.forms import NewQuestionForm, WatchQuestionForm from kitsune.questions.tests import TestCaseBase from kitsune.users.tests import UserFactory from nose....
<|file_name|>window_creation.rs<|end_file_name|><|fim▁begin|>// http://rosettacode.org/wiki/Window_creation #[cfg(feature = "gtk")]<|fim▁hole|> use self::gtk::traits::*; use self::gtk::{Inhibit, WidgetSignals, Window, WindowType}; pub fn create_window() { gtk::init().expect("Failed to initialize GT...
mod graphical { extern crate gtk;
<|file_name|>sentiment.py<|end_file_name|><|fim▁begin|>""" Sentiment prediction module """ import nltk import numpy as np from cPickle import load def get_word_index_array(words, word2index): u""" Transform the words into list of int(word index) <|fim▁hole|> >>> get_word_index_array(words, word2index) ...
Note: Unknown words are dropped >>> words = [u"I", u"love", u"you", u"RANDOM STUFF"] >>> word2index = {u"I": 0, u"love": 1, u"you": 2}
<|file_name|>test_faces.py<|end_file_name|><|fim▁begin|>import numpy as np from numpy.testing import assert_array_equal from nose.tools import (assert_equal, assert_raises, raises, assert_true, assert_false) try: from nose.tools import assert_is except ImportError: from landlab.testing....
def test_vertically_adjacent_cells(self):
<|file_name|>views.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.views.generic import View from django.http import HttpResponse from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import letter from reportlab.lib.styles import getSampleSt...
self.template_name,
<|file_name|>pkgutil.py<|end_file_name|><|fim▁begin|>"""Utilities to support packages.""" # NOTE: This module must remain compatible with Python 2.3, as it is shared # by setuptools for distribution with Python 2.3 and up. import os import sys import imp import os.path from types import ModuleType from org.python.cor...
<|file_name|>ConvergencePlot.py<|end_file_name|><|fim▁begin|>#* This file is part of the MOOSE framework #* https://www.mooseframework.org #*<|fim▁hole|>#* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENS...
<|file_name|>ArActionKeydrive.cpp<|end_file_name|><|fim▁begin|>/* Adept MobileRobots Robotics Interface for Applications (ARIA) Copyright (C) 2004-2005 ActivMedia Robotics LLC Copyright (C) 2006-2010 MobileRobots Inc. Copyright (C) 2011-2014 Adept Technology This program is free software; you can redistribute it ...
myDesiredSpeed += myDeltaVel; if (myDesiredSpeed > myTransVelMax) myDesiredSpeed = myTransVelMax; if (myDesiredSpeed < -myTransVelMax)
<|file_name|>nested.rs<|end_file_name|><|fim▁begin|><|fim▁hole|> mod inner { fn foo() { struct S; trait T { fn bar() {} } } }<|fim▁end|>
pub fn hello() -> String { "Hello".to_owned() }
<|file_name|>volumesnapshotspage.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 re...
return VolumesnapshotsTable(self.driver, self.conf) def switch_to_volumes_tab(self): self._get_element(*self._volumes_tab_locator).click()
<|file_name|>getattrAttribute.py<|end_file_name|><|fim▁begin|>class C(object): def f(self, name): return name <|fim▁hole|>print(c.foo) #pass<|fim▁end|>
__getattr__ = f c = C()
<|file_name|>xychart.js<|end_file_name|><|fim▁begin|>var d3 = require('d3') module.exports=xychart function xychart() { if (!xychart.id) xychart.id = 0; var margin = {top: 10, right: 10, bottom: 70, left: 160}, x, y = d3.scale.linear().range([100, 0]), id = xychart.id++, xaxis ...
.text(formatNumber(Math.floor(sumgroup.value()))) }
<|file_name|>Perl5Matcher.java<|end_file_name|><|fim▁begin|>/* * $Id: Perl5Matcher.java,v 1.27 2003/11/07 20:16:25 dfs Exp $ * * ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2000 The Apache Software Foundation. All rights ...
success = false; mustString = expression._mustString;
<|file_name|>DownloadManager.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010- Peer internet solutions * * This file is part of mixare. * * 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 ...
* for more details.
<|file_name|>lianjia.py<|end_file_name|><|fim▁begin|># -*- coding:utf-8 -*-<|fim▁hole|> import scrapy<|fim▁end|>
<|file_name|>test.py<|end_file_name|><|fim▁begin|><|fim▁hole|> """ Test that the nose runner is working. """ assert True<|fim▁end|>
import nose def test_nose_working():
<|file_name|>missing-main.rs<|end_file_name|><|fim▁begin|>// error-pattern: `main` function not found<|fim▁hole|><|fim▁end|>
fn mian() { }
<|file_name|>AbstractJobEntryDialog.java<|end_file_name|><|fim▁begin|>package org.datacleaner.kettle.ui; import java.util.ArrayList; import java.util.List; import org.eclipse.swt.SWT; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Image; impo...
stepNameLabelLayoutData.right = new FormAttachment(middle, -margin); stepNameLabelLayoutData.top = new FormAttachment(banner, margin * 2); stepNameLabel.setLayoutData(stepNameLabelLayoutData);
<|file_name|>TextPager.java<|end_file_name|><|fim▁begin|>package com.earth2me.essentials.textreader; import com.earth2me.essentials.CommandSource; import com.earth2me.essentials.I18n; import static com.earth2me.essentials.I18n._; import java.util.List; import java.util.Locale; import java.util.Map; public class Text...
chapterpage = 0; }
<|file_name|>github.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 CERN. # # Invenio 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 versi...
view="invenio_oauthclient.handlers:signup_handler",
<|file_name|>data_dao_testing.rs<|end_file_name|><|fim▁begin|>extern crate proton_cli; use proton_cli::dao::DataDao; use proton_cli::error::Error; /// Implementation of DataDao for testing purposes. Uses given functions to return values. /// Functions are boxed so their sizes are known (pointers). /// The general na...
<|file_name|>config.module.ts<|end_file_name|><|fim▁begin|>import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { SharedModule, ExamplesRouterViewerComponent } from '../../../shared'; import { AppModule } from './app.module'; import { AppComponent } from './app.component'; @...
}, { file: 'app.module.ts',
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Django settings for ember_demo project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings...
<|file_name|>C3DEffectManager.cpp<|end_file_name|><|fim▁begin|>#include "3d/Base.h" #include "3d/C3DEffect.h" #include "3d/C3DElementNode.h" #include "3d/C3DEffectManager.h" #include "3d/C3DElementNode.h" namespace cocos3d { static C3DEffectManager* __effectManagerInstance = NULL; C3DEffectManager::C3DEffectManager()...
return; } else {
<|file_name|>tile.js<|end_file_name|><|fim▁begin|>var Tile = function (type, x, y) { this.type = type; this.tint = 0; this.hover = false; this.isAllowed = undefined; this.isAllowedForBeat = undefined; this.x = x; this.y = y; this.graphic = new fabric.Rect({ left: Tile.size * x, top: Tile.size *...
<|file_name|>Tooltips.py<|end_file_name|><|fim▁begin|>from muntjac.ui.abstract_component import AbstractComponent from muntjac.demo.sampler.APIResource import APIResource from muntjac.demo.sampler.Feature import Feature, Version class Tooltips(Feature): def getSinceVersion(self): return Version.OLD ...
def getDescription(self):
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>use std::process::{Command, Stdio}; use std::env; fn main() { let ret = Command::new("make") .stdin(Stdio::inherit()) .stdout(Stdio::inherit())<|fim▁hole|> let out_dir = env::var("OUT_DIR").unwrap(); println!("cargo:rustc-flags=-L {} -l stat...
.stderr(Stdio::inherit()) .status() .unwrap(); assert!(ret.success());
<|file_name|>ui_highlowDialog.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Users\JohnnyG\Documents\XRDproject_Python_11June2010Release backup\highlowDialog.ui' # # Created: Mon Jun 14 16:20:37 2010 # by: PyQt4 UI code generator 4.5.4 # # WARNING!...
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) self.buttonBox.setObjectName("buttonBox")
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PushResult' db.create_table(u'noto...
'registration_id': ('django.db.models.fields.CharField', [], {'max_length': '4095'}), 'result': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['notos.PushResult']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ use fixture_tests::Fixture;<|fim▁hole|>use schema_print::print; pub fn transform_...
use schema::build_schema;
<|file_name|>MetaProperty.js<|end_file_name|><|fim▁begin|>class MetaProperty { constructor (options) { this.type = 'MetaProperty' Object.assign(this, options) } } <|fim▁hole|><|fim▁end|>
module.exports = MetaProperty
<|file_name|>JavaCalendarValue.java<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1998-2010 Caucho Technology -- all rights reserved * * This file is part of Resin(R) Open Source * * Each copy or derived work must preserve the copyright notice and this * notice unmodified. * * Resin Open Source is free softwa...
}
<|file_name|>estadisticas.py<|end_file_name|><|fim▁begin|>import pilas import json from pilas.escena import Base from general import General from individual import Individual class jugadores(Base): def __init__(self): Base.__init__(self) def fondo(self): pilas.fondos.Fondo("data/img/fondos/aplica...
def general(self): self.sonido_boton.reproducir() pilas.almacenar_escena(General())
<|file_name|>KieModuleIncrementalCompilationTest.java<|end_file_name|><|fim▁begin|>/* * Copyright 2015 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * * http://www.apache.org/license...
} }
<|file_name|>Where.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2016-2016, Roland Bock * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * * Redistributions of source code must reta...
<|file_name|>expr-match.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lice...
match false { true => { false } false => { match true { true => { true } false => { false } } } };
<|file_name|>schools_with_description_2020.py<|end_file_name|><|fim▁begin|>import logging from datetime import datetime import math import numpy as np import pandas as pd from flask_sqlalchemy import SQLAlchemy from ..models import SchoolWithDescription2020 from ..utilities import init_flask, time_delta, chunks, ItmT...
# get school_id df_schools = df_schools.drop_duplicates(school_fields["school_id"]) # sort by school_id df_schools = df_schools.sort_values(school_fields["school_id"], ascending=True)
<|file_name|>test_mount.rs<|end_file_name|><|fim▁begin|>// Impelmentation note: to allow unprivileged users to run it, this test makes // use of user and mount namespaces. On systems that allow unprivileged user // namespaces (Linux >= 3.8 compiled with CONFIG_USER_NS), the test should run // without root. extern crat...
umount(mount_point.path()).unwrap_or_else(|e| panic!("umount failed: {}", e)); }
<|file_name|>development.py<|end_file_name|><|fim▁begin|># coding: utf-8 def configure(app): if app.config.get('DEBUG_TOOLBAR_ENABLED'): try: from flask_debugtoolbar import DebugToolbarExtension DebugToolbarExtension(app) except ImportError: app.logger.info('fla...
)
<|file_name|>attention_test.py<|end_file_name|><|fim▁begin|># Copyright 2017 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 # ...
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """SciPy: Scientific Library for Python SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The ...
# avoid attempting to load components that aren't built yet. While ugly, it's # a lot more robust than what was previously being used. builtins.__SCIPY_SETUP__ = True
<|file_name|>simplesslocator.go<|end_file_name|><|fim▁begin|>package blobstoredbstatesnapshotio import ( "fmt" "golang.org/x/net/context" "github.com/nyaxt/otaru/metadata" ) func generateBlobpath() string { return fmt.Sprintf("%s_SimpleSSLocator", metadata.INodeDBSnapshotBlobpathPrefix) } var simplesslocatorTx...
} func (SimpleSSLocator) DeleteOld(ctx context.Context, threshold int, dryRun bool) ([]string, error) { return []string{}, nil
<|file_name|>example_long_selafin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ Use Telemac (selafin) output<|fim▁hole|> from datetime import timedelta, datetime from os import sep from pyproj import Proj from opendrift.readers import reader_telemac_selafin from opendrift.models.oceandrift import OceanDrift...
================================== """
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__author__ = 'mkrcah'
<|file_name|>trait-coercion-generic.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.apa...
pub fn main() { let a = Struct { x: 1, y: 2 }; let b: Box<Trait<&'static str>> = box a;
<|file_name|>poisson_p.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import from __future__ import division from builtins import object from past.utils import old_div from proteus import * from proteus.default_p import * import os try: from .parameters_for_poisson import * except: from paramet...
<|file_name|>views.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import csv from io import TextIOWrapper import six from django.contrib import messages from django.contrib.auth.decorators import login_required from django.urls import reverse from django.db import transaction from ...
)
<|file_name|>tf-hparams-query-pane.ts<|end_file_name|><|fim▁begin|>/* Copyright 2020 The TensorFlow 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.apac...
const utils = tf_hparams_utils;
<|file_name|>session.py<|end_file_name|><|fim▁begin|># # CORE # Copyright (c)2010-2013 the Boeing Company. # See the LICENSE file included in this distribution. # # authors: Tom Goff <thomas.goff@boeing.com> # Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' session.py: defines the Session class used by t...
nodenum) tlvdata += coreapi.CoreConfTlv.pack(coreapi.CORE_TLV_CONF_OPAQUE, opaque)
<|file_name|>Barcode.py<|end_file_name|><|fim▁begin|>""" Barcode Creation (PDF417) """ import os basedir = os.path.split(__file__)[0] bcdelib = os.path.join(basedir, 'psbcdelib.ps') <|fim▁hole|>class Barcode(object): __lib__ = open(bcdelib, 'r').read() @property def ps(self): raise NotImplemente...
<|file_name|>LoggerInitializedWithForeignClassInspection.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.siyeh.ig.logging; import com.intellij.codeInspection.CommonQuickFixBundle; ...
<|file_name|>border-horizontal.js<|end_file_name|><|fim▁begin|>var Icon = require('../icon'); var element = require('magic-virtual-element'); var clone = require('../clone'); exports.render = function render(component) {<|fim▁hole|> props, element('path', { d: 'M3 21h2v-2H3v2zM5 7H3v2h2V7zM3 17h2v-2H3v2zm4 4h2v...
var props = clone(component.props); delete props.children; return element( Icon,
<|file_name|>payload.py<|end_file_name|><|fim▁begin|>import asyncio import enum import io import json import mimetypes import os import warnings from abc import ABC, abstractmethod from itertools import chain from typing import ( IO, TYPE_CHECKING, Any, ByteString, Dict, Iterable, Optional, ...
<|file_name|>test_media_utils.py<|end_file_name|><|fim▁begin|>""" Test suite for the embedded <script> extraction """ from BeautifulSoup import BeautifulSoup from nose.tools import raises, eq_ from csxj.datasources.parser_tools import media_utils from csxj.datasources.parser_tools import twitter_utils from tests.datas...
<|file_name|>getNumberOfReminders.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose'), _ = require('lodash'), moment = require('moment'); module.exports = function (req, res) { var connectionDB = mongoose.connection.db; var today = moment().startOf('day'); var tomorrow = moment(today...
<|file_name|>webpack.config.js<|end_file_name|><|fim▁begin|>/* * Webpack development server configuration * * This file is set up for serving the webpack-dev-server, which will watch for changes and recompile as required if * the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically re...
}, {
<|file_name|>postoffice.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2020 DDN. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. use crate::{agent_error::ImlAgentError, env}; use std::collections::BTreeSet; use std::iter::FromIterator; use ...
Ok(()) }
<|file_name|>bar.Home.js<|end_file_name|><|fim▁begin|>if(Bar.app("Início")) throw "Barra já existe!"; /*/LOADING BAR $.get("http://hosts.medorc.org/xn--stio-vpa/json/bar.Home.json"), function(data){ //if(Bar.app(data.name)) throw "Barra já existe!"; $('#header').bar({ toolbox: data, callbac...
})(Remote.attr("requestHash")); // mostrar item IE apenas se o utilizador for "daniel" if(Situs.attr().user == "daniel") $("#isec-ei").show();
<|file_name|>track_object_distance.cc<|end_file_name|><|fim▁begin|>/****************************************************************************** * Copyright 2018 The Apollo Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compl...
} else if (IsCamera(sensor_object)) { if (lidar_object != nullptr) {
<|file_name|>gpu_timeline.py<|end_file_name|><|fim▁begin|># Copyright 2015 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 collections import math import sys from telemetry.timeline import model as model_module from...
if durations: results.AddValue(list_of_scalar_values.ListOfScalarValues(
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import user import inscription import notes<|fim▁hole|><|fim▁end|>
import util import stage # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
<|file_name|>makeUnique.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
const makeUnique = array => [...new Set(array)]; export default makeUnique;
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>/* Package defaults contains the BuildDefaults admission control plugin. The plugin allows setting default values for build setings like the git HTTP and HTTPS proxy URLs and additional environment variables for the build strategy Configuration Configuration is done v...
<|file_name|>base.ts<|end_file_name|><|fim▁begin|>import { assert, unreachable } from '../../../common/util/util.js'; import { kTextureFormatInfo } from '../../capability_info.js'; import { align } from '../../util/math.js'; import { reifyExtent3D } from '../../util/unions.js'; /** * Compute the maximum mip level cou...
/**
<|file_name|>work_multiplexer.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015-2019 William (B.J.) Snow Orvis // // 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.apa...
//! // sharding the original problem space //! let sharded = (0..100)
<|file_name|>resolver.go<|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 // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicabl...
type Resolver interface { // Resolve returns a list of addresses for a name Resolve(name string) ([]*Record, error) }
<|file_name|>ccode.py<|end_file_name|><|fim▁begin|>replacing='qwertyuiopasdfghjklzxcvbnm )([]\/{}!@#$%^&*' a='\/abcdefghijklmnopqrstuvwxyz() }{][*%$&^#@!' replacing=list(replacing) a=list(a) d={} e={} if len(replacing)==len(a): for x in range(len(a)): d[replacing[x]]=a[x] e[a[x]...
def decypt(dict,string):