prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>BaristaCardView.js<|end_file_name|><|fim▁begin|>/** * card_view = new BaristaCardView({el: $("target_selector", url:"", title:"", subtitle:"", fg_color: "#1b9e77", image:"", span_class: "col-lg-12"}); * * A Backbone View that displays a card of infor...
// set up the span size
<|file_name|>Edges-test.cpp<|end_file_name|><|fim▁begin|>////////////////////////////////////////////////////////////////////////// // This file is part of openPSTD. // // // // openPSTD is free software: you can ...
// You should have received a copy of the GNU General Public License //
<|file_name|>remove-system-libs.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # @author: Martin Siggel <martin.siggel@dlr.de> # # This script fixes the cmake exports file by # removing explicit linking to system libraries import sys, re def remove_absolute_paths(line): """ Removes libraries from the ...
<|file_name|>TestTaskNotRestarted.java<|end_file_name|><|fim▁begin|>package functionaltests.job; import java.io.Serializable; import org.ow2.proactive.scheduler.common.Scheduler; import org.ow2.proactive.scheduler.common.job.JobId; import org.ow2.proactive.scheduler.common.job.JobState; import org.ow2.proactive.sched...
} @Test
<|file_name|>OpPanel.tsx<|end_file_name|><|fim▁begin|>import * as React from "react"; import { Actions } from "./types"; export default class OpPanel extends React.Component<{ actions: Actions; step: number; }> { addCnt = () => this.props.actions.addCnt(this.props.step); render() { return ( <div ...
padding: "1rem", border: "solid #000 1px" }} >
<|file_name|>structure_analysis.py<|end_file_name|><|fim▁begin|># Standard import os import sys # Third Party import numpy as np import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns import pyfilm as pf from skimage.measure import label from skimage import filters plt.rcParams.u...
nblobs = np.empty(run.nt, dtype=int) for it in range(run.nt):
<|file_name|>prefs.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 resource_files::resources_dir_path; use rustc_serialize::js...
<|file_name|>mod.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...
/// /// // (8388608, -22, 1)
<|file_name|>gameprofile.py<|end_file_name|><|fim▁begin|># Orbotor - arcade with orbit mechanics # Copyright (C) 2014 mr555ru # # 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, eit...
pygame.display.update()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2014-2015 University of Chicago # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
return [] else: return package_candidates else:
<|file_name|>levenshtein.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2011 Andrei Mackenzie Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation th...
if(a.length == 0) return b.length; if(b.length == 0) return a.length;
<|file_name|>exercise.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import unicode_literals import os def wait(): raw_input('\nPress Enter to continue...\n\n') os.system(['clear', 'cls'][os.name == 'nt']) # Create a class to handle items in a wallet class BaseWalletHandler(object): d...
wallet_handler.add_item('Driver\'s License')
<|file_name|>DashboardCtrl.js<|end_file_name|><|fim▁begin|>define(['modules/dashboard/module'], function (module) { "use strict"; module.registerController('DashboardCtrl', ['$scope', '$log', '$moment', 'Socket', 'toastr', 'Device', function ($scope, $log, $moment, Socket, toastr, Device) { $(".view").css("min...
Device.getMeasures() .$promise .then(function(value, responseHeaders) {
<|file_name|>0239_auto_20211110_1921.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2021-11-10 19:21 from __future__ import unicode_literals from django.db import migrations, models <|fim▁hole|> dependencies = [ ('osf', '0238_abstractprovider_allow_updates'), ]...
class Migration(migrations.Migration):
<|file_name|>realty_bundle_gmap.js<|end_file_name|><|fim▁begin|>var map; $(document).ready(function(){ var a=document.getElementById('map'); map = new GMaps({el: a, //el: '#map', lat: 55.763585, lng: 37.560883, zoom: 12, mapTypeId: google.maps.MapTypeId.ROADMAP, ...
var markers=$('#PagesAllGoogleMap').val(); markers= JSON.parse(markers);
<|file_name|>SimpleErrorReporter.java<|end_file_name|><|fim▁begin|>/* * * ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may ob...
message, sourceName, line, lineSource, lineOffset)); }
<|file_name|>public_api.d.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>/** * @license * 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 */ export * from './slide-toggle-module'; export *...
<|file_name|>server_state.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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...
try: self.GetFiletypeCompleter( filetypes ) return True
<|file_name|>IconPulser.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2014 The Android Open Source Project * * 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.ap...
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<|file_name|>GetCoinbaseAddress.java<|end_file_name|><|fim▁begin|>/* * This file is part of RskJ * Copyright (C) 2019 RSK Labs Ltd. * (derived from ethereumJ library, Copyright (c) 2016 <ether.camp>) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser Ge...
* along with this program. If not, see <http://www.gnu.org/licenses/>. */
<|file_name|>0003_snoopedelection_extra.py<|end_file_name|><|fim▁begin|><|fim▁hole|># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-03-14 17:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("election_snooper"...
<|file_name|>declrender.ts<|end_file_name|><|fim▁begin|>///<reference path='refs.ts'/> module TDev { export class DeclEntry { public icon = "svg:hammer,white,clip=50"; public iconArtId: string; public color = "blue"; public description = ""; public classAdd = ""; ...
export function colorByPersistence(icon: string, pers: AST.RecordPersistence): string { return AST.RecordDef.colorByPersistence(icon, pers);
<|file_name|>models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.db import models import django.template.defaultfilters from django.db.models import Max from django.utils.functional import cached_property # Create your models here. from django.conf import settings from django.contrib.contenttyp...
return
<|file_name|>websockets_chat_async.py<|end_file_name|><|fim▁begin|>#!./uwsgi --http-socket :9090 --async 100 ... # same chat example but using uwsgi async api # for pypy + continulets just run: # uwsgi --http-socket :9090 --pypy-home /opt/pypy --pypy-wsgi-file tests/websockets_chat_async.py --pypy-eval "uwsgi_pypy_setu...
return output.encode('latin1') return output
<|file_name|>os_solaris.inline.hpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 1997, 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...
}
<|file_name|>slide.hpp<|end_file_name|><|fim▁begin|><|fim▁hole|>#include <nt2/memory/include/functions/slide.hpp> #include <nt2/memory/include/functions/scalar/slide.hpp> #include <nt2/memory/include/functions/simd/slide.hpp> #endif<|fim▁end|>
#ifndef NT2_INCLUDE_FUNCTIONS_SLIDE_HPP_INCLUDED #define NT2_INCLUDE_FUNCTIONS_SLIDE_HPP_INCLUDED
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|> import os from django_nyt import VERSION from setuptools import setup, find_packages # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in t...
from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals # -*- coding: utf-8 -*-
<|file_name|>link.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from .generic import * from criacao.forms import * from criacao.models import * from gerenciamento.models import * logger = logging.getLogger(__name__) class LinkView(GenericView): def criar(self, requ...
}, }
<|file_name|>test_rocket1.py<|end_file_name|><|fim▁begin|>from rocketlander import RocketLander from constants import LEFT_GROUND_CONTACT, RIGHT_GROUND_CONTACT import numpy as np import pyglet if __name__ == "__main__":<|fim▁hole|> 'Starting Y-Pos Constant': 1, 'Initial Force': 'random'}...
# Settings holds all the settings for the rocket lander environment. settings = {'Side Engines': True, 'Clouds': True, 'Vectorized Nozzle': True,
<|file_name|>test_JMXDataSource.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (C) Zenoss, Inc. 2015, all rights reserved. # # This content is made available according to terms specified in # License.zenoss under the directory where your Zeno...
<|file_name|>InputTransformer.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located a...
if (obj instanceof InputTransformer == false) return false; InputTransformer other = (InputTransformer) obj;
<|file_name|>TriAppSkeleton.cpp<|end_file_name|><|fim▁begin|>// TriAppSkeleton.cpp #ifdef _WIN32 # define WINDOWS_LEAN_AND_MEAN # define NOMINMAX # include <windows.h> #endif #include <GL/glew.h> #include "AppSkeleton.h" #include "GL/GLUtils.h" #include "GL/ShaderFunctions.h" #include "MatrixMath.h" #include "ut...
{ which_button = -1; } }
<|file_name|>systemviews.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: UTF-8 -*- import importlib from django.apps import apps def get_seo_views(metadata_class): return get_view_names(metadata_class._meta.seo_views) def get_view_names(seo_views): output = [] for name in seo_views:...
else: for url in urls:
<|file_name|>tests.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|>};<|fim▁end|>
exports.fixShould = function fixShould(str) { var segs = str.split('var should = require(\'should\');'); return segs.join('require(\'should\');');
<|file_name|>TestDatastream.py<|end_file_name|><|fim▁begin|>import os import unittest import random import xmlrunner host = os.environ['FALKONRY_HOST_URL'] # host url token = os.environ['FALKONRY_TOKEN'] # auth token class TestDatastream(unittest.TestCase): def setUp(self): self.created_datastream...
time.set_identifier("time") time.set_format("iso_8601") signal.set_signalIdentifier("signal") signal.set_valueIdentifier("value")
<|file_name|>input.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 script_traits::MouseButton; use std::path::Path; use std::...
sender.send( WindowEvent::MouseWindowEventClass( MouseWindowEvent::MouseDown(MouseButton::Left, click_pt))).ok().unwrap(); sender.send(
<|file_name|>FaceDetection+BackgroundReduction.py<|end_file_name|><|fim▁begin|>import numpy as np import cv2 from matplotlib import pyplot as plt face_cascade = cv2.CascadeClassifier('/home/tianyiz/user/601project/c/haarcascade_frontalface_alt.xml') cap = cv2.VideoCapture(0) fgbg = cv2.createBackgroundSubtractorMOG2(...
roi_gray = gray[y:y+h, x:x+w] roi_color = img[y:y+h, x:x+w] cv2.imshow('img',img)
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>package com.example.nm_gql_go_link_example; import io.flutter.embedding.android.FlutterActivity;<|fim▁hole|><|fim▁end|>
public class MainActivity extends FlutterActivity { }
<|file_name|>NamedThreadFactory.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011 Ning, Inc. * * Ning licenses this file to you 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://w...
}
<|file_name|>config_handler.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 MaidSafe.net limited. // // This SAFE Network Software is licensed to you under The General Public License (GPL), version 3. // Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed // under the GPL ...
/// Set a custom path for the config files.
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from delta_variance import DeltaVariance, DeltaVariance_Distance
<|file_name|>TextToPDF.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 the...
<|file_name|>const.ts<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ export const DUMMY_SECRET = `[SECRET HIDDEN]`;<|fim▁end|>
<|file_name|>na.js<|end_file_name|><|fim▁begin|>var fs = require('fs'); var assert = require('assert'); var JSZip = require('jszip'); var path = require('path') var compareWorkbooks = require('./util/compareworkbooks.js') var excelbuilder = require('..'); describe('It generates a simple workbook', function () { i...
fs.writeFile(OUTFILE, buffer, function (err) {
<|file_name|>modules.py<|end_file_name|><|fim▁begin|># Copyright 2019 Google LLC #<|fim▁hole|># http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS O...
# 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 #
<|file_name|>low-priority.js<|end_file_name|><|fim▁begin|>'use strict'; <|fim▁hole|>Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _pure = require('recompose/pure'); var _pure2 = _interopRequireDefault(_pure); var _S...
<|file_name|>maildir.rs<|end_file_name|><|fim▁begin|>use std::time::Duration; use crossbeam_channel::Sender; use maildir::Maildir as ExtMaildir; use serde_derive::Deserialize; use crate::blocks::{Block, ConfigBlock, Update}; use crate::config::SharedConfig; use crate::de::deserialize_duration; use crate::errors::*; u...
use crate::widgets::{I3BarWidget, State};
<|file_name|>test_wrappers.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from werkzeug.contrib import wrappers from werkzeug import routing from werkzeug.wrappers import Request, Response def test_reverse_slash_behavior(): """Test ReverseSlashBehaviorRequestMixin""" class MyRequest(wrappers.Reverse...
assert req.script_root == '/test/' # make sure the routing system works with the slashes in # reverse order as well.
<|file_name|>image_reorientation.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Thu Aug 1 16:10:56 2013 @author: vterzopoulos, abrys """ # To ignore numpy errors: # pylint: disable=E1101 import nibabel import numpy from dicom2nifti.image_volume import load, SliceType, ImageVolume def re...
if new_image.ndim > 3: # do not squeeze single slice data new_image = new_image.squeeze()
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import {Server, Config} from "./server"; import * as path from "path"; /**<|fim▁hole|> const configPath = path.join(__dirname, process.argv[2]); console.info("loading configuration file: " + configPath); config = require(configPath); }else { console.error("no ...
* Load configuration file given as command line parameter */ let config: Config; if (process.argv.length > 2) {
<|file_name|>resource_arm_loadbalancer_nat_pool.go<|end_file_name|><|fim▁begin|>package azurerm import ( "fmt" "log" "time" "github.com/Azure/azure-sdk-for-go/arm/network" "github.com/hashicorp/errwrap" "github.com/r3labs/terraform/helper/resource" "github.com/r3labs/terraform/helper/schema" "github.com/jen20...
}
<|file_name|>solution-table-cell-directive.js<|end_file_name|><|fim▁begin|>/** * Created by eirikskogland on 24.09.15. */ angular.module('ExamApp').directive('solutionTableCell', function() { return { restrict: 'E', templateUrl: 'templates/directives/solution-table-cell.html', scope: { ...
<|file_name|>deriving-span-Rand-enum-struct-variant.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 /...
#![feature(struct_variant)] extern crate rand;
<|file_name|>progresshud.py<|end_file_name|><|fim▁begin|>import os from kivy.lang import Builder from kivy.properties import NumericProperty, StringProperty from kivy.uix.anchorlayout import AnchorLayout from cobiv.modules.core.hud import Hud Builder.load_file(os.path.abspath(os.path.join(os.path.dirname(__file__), '...
def __init__(self, **kwargs): super(ProgressHud, self).__init__(**kwargs)
<|file_name|>issue-16098.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/lic...
$n + prob1!($n - 1); //~ ERROR recursion limit reached while expanding the macro `prob1` } else { prob1!($n - 1); }
<|file_name|>EigenDecompositor.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011-2013, by Vladimir Kostyukov and Contributors. * * This file is part of la4j project (http://la4j.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * You may not use this file except in compliance with the...
for (int j = n - 1; j < nn; j++) { z = H.get(n - 1, j); H.set(n - 1, j, q * z + p * H.get(n, j));
<|file_name|>targetsegfault.py<|end_file_name|><|fim▁begin|>def getitem(list, index): return list[index] def entry_point(i): return getitem([i, 2, 3, 4], 2) + getitem(None, i) def target(*args): return entry_point, [int] def get_llinterp_args(): return [1] # _____ Run translated _____ def run(c_entr...
c_entry_point(0)
<|file_name|>powerball.py<|end_file_name|><|fim▁begin|>"""Author: Ben Johnstone""" #TODO # 1 Do argparse for main # 3 Figure out what statistics should be reported # 4 set up logger # 5 winnings calculator??? # 6 Speed benchmarking?? # 7 Get drawings file from internet # 8 Graph count of each ball # Database def Main...
<|file_name|>RegisterScreen.tsx<|end_file_name|><|fim▁begin|>import React from 'react'; import { connect } from 'react-redux'; import { View } from 'react-native'; import sb from 'react-native-style-block'; import { TButton, TFormGroup } from '../components/TComponent'; import { showLoading, showAlert, hideAlert } from...
<|file_name|>Converter.cc<|end_file_name|><|fim▁begin|>#include "Converter.h" #include <TFormula.h> #include <iomanip> #include <sstream> std::string Converter::doubleToString(double x,int precision,bool scientifiStyle) { std::stringstream xs; if(scientifiStyle) xs<<std::scientific; else xs<<std::fixed; ...
}
<|file_name|>client.go<|end_file_name|><|fim▁begin|>/* Copyright 2016 The Kubernetes 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/LICENSE-2.0 Unless ...
return api.ParameterCodec.EncodeParameters(obj, v1.SchemeGroupVersion) }
<|file_name|>native-menu-ref.ts<|end_file_name|><|fim▁begin|>import { NgZone } from '@angular/core'; import { Menu, MenuItem, MenuItemConstructorOptions, PopupOptions, remote } from 'electron'; import { Observable, Subject } from 'rxjs'; let uniqueId = 0; interface MenuItemWithId extends MenuItem { id?: string;...
} afterClosed(): Observable<MenuItemWithId | null> { return this._afterClosed.asObservable();
<|file_name|>dataobject.py<|end_file_name|><|fim▁begin|># Copyright (c) 2009-2010 Six Apart Ltd. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain th...
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
<|file_name|>notification.model.ts<|end_file_name|><|fim▁begin|>import { Utilities } from "../services/utilities"; export class Notification { public static Create(data: {}) { let n = new Notification(); Object.assign(n, data); if (n.date) n.date = Utilities.parseDate(n.date...
public body: string; public isRead: boolean; public isPinned: boolean;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># coding=utf8 from django.views.generic import ListView, DetailView, CreateView from django.db.models import Q from django.http import JsonResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from django.shortcuts import render from pure_pagin...
def get_queryset(self): queryset = super(PublishListView, self).get_queryset() self.keyword = self.request.GET.get('keyword', '').strip()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># vim:ts=4:sts=4:sw=4:expandtab import os import satori.web.setup def manage(): from django.core.management import execute_manager import satori.web.settings as settings # HACK import django.core.management old_fmm = django.core.management.fi...
<|file_name|>pidPyart.py<|end_file_name|><|fim▁begin|># lots to do: # __ native drawLines # __ add native drawCurve method # __ native rectangle/round rect method # __ native drawEllipse # __ native drawArc # __ drawImage support (work on Pyart side of things) from __future__ import print_function impor...
if bool: self._pycan.gsave()
<|file_name|>MD-MuellerBrown.py<|end_file_name|><|fim▁begin|>from MuellerBrown import getPotentialAndForces from PlotUtils import PlotUtils import numpy as np import matplotlib.pyplot as plt import MuellerBrown as mbpot <|fim▁hole|>def getKineticEnergy(velocity): return 0.5*m*(velocity[0]**2+velocity[1]**2) dt =...
m=1.0
<|file_name|>IProjectVariables.java<|end_file_name|><|fim▁begin|>package flow; /** * This interface is used to define the name of variables that are * declared in the call flow. All variables are defined as * <code>public static final String</code>, which allows user-defined * code to reference variable names b...
public static final String SESSION_FIELD_VIDEOFARFMTP = "videofarfmtp"; public static final String SESSION_FIELD_VIDEOFORMAT = "videoformat"; public static final String SESSION_FIELD_VIDEOFPS = "videofps"; public static final String SESSION_FIELD_VIDEOHEIGHT = "videoheight";
<|file_name|>listing4.02.js<|end_file_name|><|fim▁begin|>/* Get Programming with JavaScript * Listing 4.02 * Displaying information from similar objects */ var movie1; var movie2; var movie3; movie1 = { title: "Inside Out", actors: "Amy Poehler, Bill Hader", directors: "Pete Doctor, Ronaldo Del Carmen"...
console.log("Actors: " + movie3.actors);
<|file_name|>238_productArrayExceptSelf.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. class Solution(object): # @param {integer[]} nums # @return ...
output.append(p)
<|file_name|>XMLXMLCOSTCATEGORYID.java<|end_file_name|><|fim▁begin|>/******************************************************************************* * HELIUM V, Open Source ERP software for sustained success * at small and medium-sized enterprises. * Copyright (C) 2004 - 2015 HELIUM V IT-Solutions GmbH * * This p...
*/
<|file_name|>RequiredRowOrdering.java<|end_file_name|><|fim▁begin|>/* * This file is part of Splice Machine. * Splice Machine 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 Foundation, either * version 3, or (at...
* * @return SORT_REQUIRED if sorting is required,
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/** * @authors JayChenFE * @date 2017-03-21 11:17:13 * @version $1.0$ */ /** * 主要核心逻辑入口 **/ const fs = require('fs'); const path = require('path'); const staticServer = require('./static-server'); class App { constructor() { } initServer() { //方便增...
<|file_name|>BlueBanana.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python ''' BlueBanana Rat Config Decoder ''' __description__ = 'BlueBanana Rat Config Extractor' __author__ = 'Kevin Breen http://techanarchy.net http://malwareconfig.com' __version__ = '0.1' __date__ = '2014/04/10' #Standard Imports Go Here impo...
''' def run(data):
<|file_name|>conanfile.py<|end_file_name|><|fim▁begin|>from conans import ConanFile, AutoToolsBuildEnvironment, tools import os class LibHaruConn(ConanFile): name = "libharu" version = "2.3.0" license = "ZLIB https://github.com/libharu/libharu/blob/master/LICENCE" url = "https://github.com/trigger-happ...
def source(self): pkgLink = 'https://github.com/libharu/libharu/archive/RELEASE_2_3_0.tar.gz' self.run("curl -JOL " + pkgLink)
<|file_name|>Fractal.cpp<|end_file_name|><|fim▁begin|>#include "Fractal.h" Color::Color() : r(0.0), g(0.0), b(0.0) {} Color::Color(double rin, double gin, double bin) : r(rin), g(gin), b(bin) {} Fractal::Fractal(int width, int height) : width_(width), height_(height), center_x_(0.0), center_y_(0.0), max_dis...
void Fractal::ZoomIn(double x, double y) { RecalcCenter(x, y); pixel_size_ /= 2.0; RecalcMins();
<|file_name|>svgsvgelement.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::attr::Attr; use dom::bindings::codegen::Bindin...
#[allow(unrooted_must_root)] pub fn new(local_name: LocalName, prefix: Option<Prefix>, document: &Document) -> Root<SVGSVGElement> {
<|file_name|>shareDialog.js<|end_file_name|><|fim▁begin|>const html = require('choo/html'); module.exports = function(name, url) { const dialog = function(state, emit, close) { return html` <send-share-dialog class="flex flex-col items-center text-center p-4 max-w-sm m-auto" > <h1 cla...
<|file_name|>tdAppliance1.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # $Id: tdAppliance1.py $ """ VirtualBox Validation Kit - IAppliance Test #1 """ <|fim▁hole|>This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free s...
__copyright__ = \ """ Copyright (C) 2010-2015 Oracle Corporation
<|file_name|>privacy.rs<|end_file_name|><|fim▁begin|>// Test that we do not get a privacy error here. Initially, we did, // because we inferred an outlives predciate of `<Foo<'a> as // Private>::Out: 'a`, but the private trait is -- well -- private, // and hence it was not something that a pub trait could refer to. //...
#![allow(dead_code)]
<|file_name|>graph_builder_apply.go<|end_file_name|><|fim▁begin|>package terraform import ( "github.com/hashicorp/terraform/addrs" "github.com/hashicorp/terraform/configs" "github.com/hashicorp/terraform/dag" "github.com/hashicorp/terraform/plans" "github.com/hashicorp/terraform/states" "github.com/hashicorp/ter...
}
<|file_name|>index.js<|end_file_name|><|fim▁begin|>// Dependencies const queryValidation = require('./libs/query-validation.js'); const utils = require('./libs/utilities'); /** * Create an instance of Behance * @param {string} token - authentication for Behance API * @public */ const Behance = function behance(tok...
* Get a list of projects/creatives/users/collections * @param {object} opts - queries
<|file_name|>AliPMDHitsRead.C<|end_file_name|><|fim▁begin|>// // This macro reads the Hits Tree // void AliPMDHitsRead(Int_t nevt = 1) { TStopwatch timer; timer.Start(); TH2F *h2 = new TH2F("h2"," Y vs. X",200,-100.,100.,200,-100.,100.); // FILE *fpw = fopen("alipmdhits.dat","w"); AliRunLoader *fRunLoad...
if ((idmo == kGamma || idmo == -11 || idmo == 11) && vx == 0. && vy == 0. && vz == 0.)
<|file_name|>rich_transport.go<|end_file_name|><|fim▁begin|>/*<|fim▁hole|> * regarding copyright ownership. The ASF licenses this file * to you 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...
* 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
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os from setuptools import setup from subprocess import call from sys import platform, argv def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() SCRIPTS = ["src/bg_daemon/background_daemon.py"] # only ...
"python-crontab", "mock",
<|file_name|>cftime_offsets.py<|end_file_name|><|fim▁begin|>"""Time offset classes for use with cftime.datetime objects""" # The offset classes and mechanisms for generating time ranges defined in # this module were copied/adapted from those defined in pandas. See in # particular the objects and methods defined in pan...
# We follow that behavior here. _default_month = 3
<|file_name|>lunche24.py<|end_file_name|><|fim▁begin|>from comics.aggregator.crawler import CrawlerBase, CrawlerImage from comics.core.comic_data import ComicDataBase class ComicData(ComicDataBase): name = "Lunch (e24.no)" language = "no" url = "http://www.e24.no/lunch/" start_date = "2009-10-21" ...
<|file_name|>user.cpp<|end_file_name|><|fim▁begin|>#include <boost/lexical_cast.hpp> #include <disccord/models/user.hpp> namespace disccord { namespace models { user::user() : username(""), avatar(), email(), discriminator(0), bot(false), mfa_enabled(), verified() { } ...
} else { \ var = decltype(var)::no_value(); \ } \ } else { \
<|file_name|>ioreg.rs<|end_file_name|><|fim▁begin|>// Zinc, the bare metal stack for rust. // Copyright 2014 Ben Gamari <bgamari@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...
address register
<|file_name|>models.py<|end_file_name|><|fim▁begin|>import hashlib import json import sys import traceback from datetime import datetime, timedelta from functools import wraps from uuid import uuid4 import newrelic.agent import waffle from constance import config from django.apps import apps from django.conf import se...
self.document and self.document.original except Document.DoesNotExist:
<|file_name|>transition.js<|end_file_name|><|fim▁begin|>import Ember from "ember"; export default Ember.Object.extend({ targetRoute: null, params: null, isSingleResource: Ember.computed.match( 'targetRoute',<|fim▁hole|> hasParams: Ember.computed.bool('params') });<|fim▁end|>
/(?:^(?!.*s\b))(?:^(?!index)).*$/ ),
<|file_name|>x86.rs<|end_file_name|><|fim▁begin|>// This file is part of libfringe, a low-level green threading library. // Copyright (c) Nathan Zadoks <nathan@nathan7.eu>, // whitequark <whitequark@whitequark.org> // Amanieu d'Antras <amanieu@gmail.com> // Licensed under the Apache License,...
.cfi_offset %ebp, -8 nop nop
<|file_name|>demo_active_information_storage.py<|end_file_name|><|fim▁begin|># Import classes from idtxl.active_information_storage import ActiveInformationStorage from idtxl.data import Data # a) Generate test data data = Data()<|fim▁hole|># b) Initialise analysis object and define settings network_analysis = ActiveI...
data.generate_mute_data(n_samples=1000, n_replications=5)
<|file_name|>HTTPDownstreamSessionTest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can...
<|file_name|>sarray_reader_buffer.hpp<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2016 Turi * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef GRAPHLAB_SARRAY_READER_BUFFER #define GRAPHLAB_SARRAY_READER_...
/// The initial starting point. clear() will reset row_start to here. size_t m_original_row_start = 0; /// Start row of the remaining chunk.
<|file_name|>conference.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com...
# and import getUserId from it
<|file_name|>google.js<|end_file_name|><|fim▁begin|>import { postToServer } from "../app/utils"; import { wait } from "../app/utils"; /** * Google Authentication and linking module * @returns {{link: function:object, login: function}} */ const googleProvider = new firebase.auth.GoogleAuthProvider(); function call...
login
<|file_name|>tools.py<|end_file_name|><|fim▁begin|>''' Created on 15.11.2021 @author: michael ''' from alexandriabase.daos import DocumentDao, DaoModule, DOCUMENT_TABLE,\ DocumentFileInfoDao from injector import Injector, inject from alexandriabase import AlexBaseModule from alexandriabase.services import ServiceM...
events = self.reference_service.get_events_referenced_by_document(record) self.print_record(record, events) self.close_file()
<|file_name|>WelcomePanel.java<|end_file_name|><|fim▁begin|>package view; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.Graphics; import java.awt.Image; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.Observable;...
private JLabel loadingLabel; private Image friendlyShipImage;