prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>alert.js<|end_file_name|><|fim▁begin|>angular.module("ui.bootstrap.alert", []).directive('alert', function () { return { restrict:'EA', templateUrl:'template/alert/alert.html', transclude:true, replace:true, scope: { type: '=',<|fim▁hole|> close: '&' }, link: functi...
<|file_name|>version.go<|end_file_name|><|fim▁begin|>// Copyright 2014 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/lic...
// See the License for the specific language governing permissions and // limitations under the License. package version
<|file_name|>addunit.go<|end_file_name|><|fim▁begin|>// Copyright 2012, 2013 Canonical Ltd. // Licensed under the AGPLv3, see LICENCE file for details. package main import ( "errors" "fmt" "launchpad.net/gnuflag" <|fim▁hole|> "launchpad.net/juju-core/cmd" "launchpad.net/juju-core/juju" "launchpad.net/juju-core/...
<|file_name|>quantum.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 co...
<|file_name|>IdleController.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('upsConsole') .controller('IdleController', function(Keepalive, Idle, $rootScope, $scope, $log, appConfig, Auth) { var self = this; self.config = appConfig; /** * idle service, keepalive, auth token refresh ...
$rootScope.$on('IdleWarn', function() { $log.debug('idleWarn'); $scope.$apply(function() { self.idleCountdown = self.idleCountdown - 1;
<|file_name|>Composing.ts<|end_file_name|><|fim▁begin|>import * as Behaviour from './Behaviour'; import * as ComposeApis from '../../behaviour/composing/ComposeApis'; import { ComposeSchema } from '../../behaviour/composing/ComposeSchema'; import { ComposingBehaviour } from '../../behaviour/composing/ComposingTypes';<|...
<|file_name|>mpf.rs<|end_file_name|><|fim▁begin|>use libc::{c_double, c_int, c_long, c_ulong, c_void}; use std::mem::uninitialized; use std::cmp; use std::cmp::Ordering::{self, Greater, Less, Equal}; use std::ops::{Div, Mul, Add, Sub, Neg}; use super::mpz::mp_bitcnt_t; type mp_exp_t = c_long; #[repr(C)] pub struct mp...
} impl<'a, 'b> Mul<&'a Mpf> for &'b Mpf {
<|file_name|>test_compute_utils.py<|end_file_name|><|fim▁begin|># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. #<|fim▁hole|># not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may
<|file_name|>scope.cc<|end_file_name|><|fim▁begin|>// Copyright 2010 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 //...
Object* obj = src->entry_at(i);
<|file_name|>test_translate.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import unittest from openerp.tools.translate import quote, unquote, xml_translate class TranslationToolsTestCase(unittest.TestCase): def test_quote_unquot...
test_string("""test \nall kinds\n \n o\r \\\\ nope\n\n"
<|file_name|>WifiPeerListListener.java<|end_file_name|><|fim▁begin|><|fim▁hole|> import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import android.net.wifi.p2p.WifiP2pDeviceList; import android.net.wifi.p2p.WifiP2pManager.PeerListListener; import android.util.Log; /* * @author NickHua...
package hrylab.xjtu.wifip2papp.wifidirect;
<|file_name|>static-methods-in-traits.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.a...
<|file_name|>overlay.js<|end_file_name|><|fim▁begin|>/** * @module popoff/overlay * * Because overlay-component is hopelessly out of date. * This is modern rewrite. */ const Emitter = require('events').EventEmitter; const inherits = require('inherits'); const extend = require('xtend/mutable'); module.exports =...
that.emit('afterHide'); } return this;
<|file_name|>special.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ****************...
log.debug("Executing the script remotely ...") # Execute the script file remotely remote.execute("python " + remote_script_path, output=False, show_output=True)
<|file_name|>config.go<|end_file_name|><|fim▁begin|>package main import ( "io/ioutil" "github.com/BurntSushi/toml" ) // ServerConfig defining configuration for pop, imap type ServerConfig struct { POP pop IMAP imapClient DB db HTTP httpClient } type pop struct { Port int TLS bool Cert string Key stri...
panic("unable to read config: " + err.Error())
<|file_name|>test_base_output.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # This tool helps you to rebase package to the latest version # Copyright (C) 2013-2014 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
old_rpm_data = {'rpm': ['rpm-0.1.0.x86_64.rpm', ' rpm-devel-0.1.0.x86_64.rpm'], 'srpm': 'rpm-0.1.0.src.rpm',
<|file_name|>exportWCON.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Created on Mon Aug 15 20:55:19 2016 @author: ajaver """ import json import os from collections import OrderedDict import zipfile import numpy as np import pandas as pd import tables from tierpsy.helper.misc import print_flush from t...
features_file = '/Users/ajaver/OneDrive - Imperial College London/Local_Videos/single_worm/global_sample_v3/883 RC301 on food R_2011_03_07__11_10_27___8___1_features.hdf5' #exportWCON(features_file)
<|file_name|>mrp_bom.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 Trustcode - www.trustcode.com.br # #...
<|file_name|>memozo.py<|end_file_name|><|fim▁begin|>import os import functools import codecs import pickle<|fim▁hole|>class Memozo(object): def __init__(self, path='./'): self.base_path = path memozo_file = os.path.join(self.base_path, utils.MEMOZO_FILE_NAME) if not os.path.exists(memozo_f...
from . import utils
<|file_name|>fileimport.py<|end_file_name|><|fim▁begin|># Copyright (C) 2018-2019 Matthias Klumpp <matthias@tenstral.net> # # Licensed under the GNU Lesser General Public License Version 3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public Lice...
<|file_name|>latest_blessed_model_strategy_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 Google LLC. 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:...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2015 Corey Farwell // // 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 // // Unl...
buf: String, }
<|file_name|>issue-4446.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. //<|fim▁hole|>// except according to those terms. // pretty-expanded FIXME #23616 #![feature(old_io...
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed
<|file_name|>xSlidingWindowMaximum.py<|end_file_name|><|fim▁begin|>''' Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position. For example, Given n...
<|file_name|>merge_measures_blockbox.py<|end_file_name|><|fim▁begin|>from django.core.management.base import BaseCommand from lizard_blockbox import import_helpers class Command(BaseCommand): args = "" help = "Merge the measure shapes to get one json." <|fim▁hole|><|fim▁end|>
def handle(self, *args, **kwargs): import_helpers.merge_measures_blockbox(self.stdout)
<|file_name|>mixup.py<|end_file_name|><|fim▁begin|># Copyright 2019 Google 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
import os
<|file_name|>activation.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::EventBinding::EventM...
self.canceled_activation();
<|file_name|>tokenizer.rs<|end_file_name|><|fim▁begin|>use std::collections::hashmap::HashMap; use std::char::is_digit; use super::token; use super::token::XPathToken; pub struct XPathTokenizer { xpath: XPathString, start: uint, prefer_recognition_of_operator_names: bool, } pub type TokenResult = Result<...
Some(self.substr(start, end))
<|file_name|>bench_native.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT<|fim▁hole|>// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or dis...
// 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
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-04 09:48 from __future__ import unicode_literals <|fim▁hole|> class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_...
import api.utils from django.conf import settings from django.db import migrations, models import django.db.models.deletion
<|file_name|>user.ts<|end_file_name|><|fim▁begin|><|fim▁hole|> loginName?: string; loginPassword?: string; userId?: number; }<|fim▁end|>
export class User {
<|file_name|>mock_api.py<|end_file_name|><|fim▁begin|>from contextlib import contextmanager import json import mock # Mock tastypi API. class ProjectData(object): def get(self): return dict() def mock_version(repo): class MockVersion(object): def __init__(self, x=None): pass ...
"repo_type": "git",
<|file_name|>messages.py<|end_file_name|><|fim▁begin|>"""ACME protocol messages.""" import collections import six from acme import challenges from acme import errors from acme import fields from acme import jose from acme import util OLD_ERROR_PREFIX = "urn:acme:error:" ERROR_PREFIX = "urn:ietf:params:acme:error:" E...
class Registration(ResourceBody): """Registration Resource Body.
<|file_name|>abstract.py<|end_file_name|><|fim▁begin|>import sys #from OpenGL.GLUT import * #from OpenGL.GLU import * #from OpenGL.GL import * class abstract: params = {} windowId = None terminated = False def initParams(self): return self def __init__(self): self.ini...
def idle(self): return
<|file_name|>generator.rs<|end_file_name|><|fim▁begin|>// Copyright 2015, 2016 Ethcore (UK) Ltd. // This file is part of Parity. // Parity 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...
// GNU General Public License for more details.
<|file_name|>mapapi.shape.js<|end_file_name|><|fim▁begin|>/** * License and Terms of Use * * Copyright (c) 2011 SignpostMarv * * 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 restrict...
} if(typeof strokeStyle == 'string'){ var diff = this['opts']['strokeStyle'] != strokeStyle; this['opts']['strokeStyle'] = strokeStyle;
<|file_name|>hmac_plugin.py<|end_file_name|><|fim▁begin|># Copyright (C) 2014 Google Inc. # # This file is part of ycmd. # # ycmd is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
<|file_name|>test_pipeline_files.py<|end_file_name|><|fim▁begin|>import os import random import time import hashlib import warnings from tempfile import mkdtemp from shutil import rmtree from six.moves.urllib.parse import urlparse from six import BytesIO from twisted.trial import unittest from twisted.internet import ...
self.assertNotEqual(result['files'][0]['checksum'], 'abc') for p in patchers:
<|file_name|>cheese.py<|end_file_name|><|fim▁begin|>""" Contains CheesePreprocessor """ #----------------------------------------------------------------------------- # Copyright (c) 2013, the IPython Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPY...
<|file_name|>jquery.zclip.js<|end_file_name|><|fim▁begin|>/* * zClip :: jQuery ZeroClipboard v1.1.1 * http://steamdev.com/zclip * * Copyright 2011, SteamDev * Released under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Date: Wed Jun 01, 2011 */ (function ($) { ...
zIndex = parseInt(this.domElement.style.zIndex, 10) + 1; }
<|file_name|>NodeListTest.java<|end_file_name|><|fim▁begin|>package ru.job4j.pro.collections.list; import org.junit.Test; import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; /** * NodeListTest class. * * @author Vladimir Ivanov * @version 0.1 * @since 30.08.2017 */ public class No...
<|file_name|>map.py<|end_file_name|><|fim▁begin|>import json import math __author__ = 'apostol3' class Map: def __init__(self, w, h): self.max_time = 120 self.size = (w, h) self.walls = [] self.headline = [] self.cars = [] self.finish = [] self.objects = []...
map.max_time = doc['max_time'] map.walls = doc['walls'] map.finish = doc['finish'] map.headline = doc['headline']
<|file_name|>util.py<|end_file_name|><|fim▁begin|>import json from dateutil import parser as datetime_parser<|fim▁hole|> from occam.app import get_redis from occam.runtime import OCCAM_SERVER_CONFIG_KEY def get_servers(): redis = get_redis() servers = json.loads(redis.get(OCCAM_SERVER_CONFIG_KEY)) retur...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|><|fim▁hole|># 2015 by Pablo Martín <goinnn@gmail.com> # This program 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 ...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2013 by Yaco Sistemas <goinnn@gmail.com>
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.shortcuts import render def index(request):<|fim▁hole|><|fim▁end|>
return render(request, 'first.html')
<|file_name|>AWSInterface.java<|end_file_name|><|fim▁begin|>package edu.purdue.eaps.weatherpipe; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; impo...
transMan = new TransferManager(s3client);
<|file_name|>form.element.view.hidden.js<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2011-2013 Lp digital system * * This file is part of BackBee. * * BackBee 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 Fou...
} });
<|file_name|>summarize.py<|end_file_name|><|fim▁begin|>import numpy as np import re import sys import operator import matplotlib.pyplot as plt def parse_transposes(fn): size = re.compile('(\d+) x (\d+)') tp = re.compile('Throughput: ([\d\.]+) GB')<|fim▁hole|> for l in f: s = size.search(l) ...
sizes = [] tps = [] with open(fn, 'r') as f:
<|file_name|>main.js<|end_file_name|><|fim▁begin|>var dropzoneOverlay = document.querySelector('.dropzone-overlay'); function getDataTransferFiles(event) { var dataTransferItemsList = []; if (event.dataTransfer) { var dt = event.dataTransfer; if (dt.files && dt.files.length) { dataT...
<|file_name|>pep8.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012-2013 Paul Tagliamonte <paultag@debian.org> # Copyright (c) 2013 Leo Cavaille <leo@cavaille.net> # # Permission is hereby granted, free of charge, to any person obtaining a<|fim▁hole|># and/or sell copies of the Software, and to permit persons to who...
# copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify, merge, publish, distribute, sublicense,
<|file_name|>rnn_char_windowing.py<|end_file_name|><|fim▁begin|># coding: utf-8 # # Simple Character-level Language Model using vanilla RNN # 2017-04-21 jkang # Python3.5 # TensorFlow1.0.1 # # - <p style="color:red">Different window sizes were applied</p> e.g. n_window = 3 (three-character window) # - input: ...
x_batch, y_batch, n_examples = make_window_batch(char_input, char_output, n_window) for ibatch in range(x_batch.shape[0]): x_train = x_batch[ibatch, :, :].reshape((1,-1,n_input_dim))
<|file_name|>Transfers.java<|end_file_name|><|fim▁begin|>//############################################################################# //# # //# Copyright (C) <2014> <IMS MAXIMS> # //# ...
{ int count = 0; if(this.patienttransfers != null) count++;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------...
self.body = ''
<|file_name|>0027_merge.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [<|fim▁hole|> ] operations = [ ]<|fim▁end|>
('ccx', '0026_auto_20170831_0420'), ('ccx', '0026_auto_20170831_0554'),
<|file_name|>include.js<|end_file_name|><|fim▁begin|>function TableSort(id) { this.tbl = document.getElementById(id); this.lastSortedTh = null; if (this.tbl && this.tbl.nodeName == "TABLE") { var headings = this.tbl.tHead.rows[0].cells; for (var i=0; headings[i]; i++) { if (headings[i].class...
* one for everything else (alphabetic). Store both the actual data * that will be used for comparison by the sort algorithm (thus the need * to parseFloat() the numeric data) as well as a reference to the * element's parent row. The row reference will be used after the new
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Sh...
self.del_comment(c.id)
<|file_name|>stats_views_dataverses.py<|end_file_name|><|fim▁begin|>from .stats_view_base import StatsViewSwagger, StatsViewSwaggerKeyRequired from .stats_util_dataverses import StatsMakerDataverses class DataverseCountByMonthView(StatsViewSwaggerKeyRequired): """API View - Dataverse counts by Month.""" # De...
<|file_name|>nb.py<|end_file_name|><|fim▁begin|>import numpy as np import util from datetime import datetime from scipy.stats import norm import better_exceptions from scipy.stats import multivariate_normal as mvn class NaiveBayers(object): def __init__(self): # Gaussian deviation self.gaussians =...
# Calculate Log of the probability density function, all at once
<|file_name|>p2p-feefilter.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.mininode import * from test_f...
<|file_name|>ketabir.py<|end_file_name|><|fim▁begin|>"""All things that are specifically related to adinebook website""" from collections import defaultdict from logging import getLogger from typing import Optional from langid import classify from regex import compile as regex_compile from requests import RequestExce...
r = request(ketabir_url) except RequestException:
<|file_name|>controlbuf.go<|end_file_name|><|fim▁begin|>/* * * Copyright 2014 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICE...
b.deleteSelf() return b
<|file_name|>creation.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.db.backends.postgresql_psycopg2.creation import DatabaseCreation from django.utils.functional import cached_property class PostGISCreation(DatabaseCreation): geom_index_type = 'GIST' geom_index_ops = 'GIST_GEOME...
geom_index_ops_nd = 'GIST_GEOMETRY_OPS_ND' @cached_property def template_postgis(self):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright(C) 2014 Bezleputh # # This file is part of a weboob module. # # This weboob module 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 F...
<|file_name|>networks.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2022 The TensorFlow GAN 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...
return tf.clip_by_value(block_id - progress, 0.0, 1.0)
<|file_name|>encoding.py<|end_file_name|><|fim▁begin|>from .spec import BASIC_PROPS_SET, encode_basic_properties def encode_message(frame, headers, body, frame_size): """Encode message headers and body as a sequence of frames.""" for f in frame.encode(): yield f props, headers = split_headers(head...
while body:
<|file_name|>HeatMap.py<|end_file_name|><|fim▁begin|>import redis class BetaRedis(redis.StrictRedis):<|fim▁hole|> return self.execute_command('GEOADD', name, *values) def geopos(self, name, *values): return self.execute_command('GEOPOS', name, *values) class RedisHeatMap: REDIS_KEY = 'heatma...
def georadius(self, name, *values): return self.execute_command('GEORADIUS', name, *values) def geoadd(self, name, *values):
<|file_name|>dn.py<|end_file_name|><|fim▁begin|># # Copyright 2015 Fasih # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
<|file_name|>ComponentWrapper.java<|end_file_name|><|fim▁begin|>/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package optas.gui.wizard; /** *<|fim▁hole|> * @author chris */ public class ComponentWrapper { public String componentName; public String compon...
<|file_name|>ForceLocalePreference.java<|end_file_name|><|fim▁begin|>/* * Geopaparazzi - Digital field mapping on Android based devices * Copyright (C) 2016 HydroloGIS (www.hydrologis.com) * * This program is free software: you can redistribute it and/or modify<|fim▁hole|> * This program is distributed in the hope...
* it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *
<|file_name|>LightboxGallery.stories.tsx<|end_file_name|><|fim▁begin|>// Copyright 2020 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; import { storiesOf } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { number } from '@storybook/ad...
url: '/fixtures/tina-rolf-269345-unsplash.jpg', caption: 'Still from The Lighthouse, starring Robert Pattinson and Willem Defoe.',
<|file_name|>people.tsx<|end_file_name|><|fim▁begin|>/// <reference path="../../../typings/index.d.ts" /> import * as React from 'react'; import * as ReactDOM from 'react-dom'; import { UserList } from '../components/users'; export class People extends React.Component<{}, {}> { render () { return ( <div...
</div>
<|file_name|>Bacon.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1<|fim▁hole|>size 89408<|fim▁end|>
oid sha256:5a4f668a21f7ea9a0b8ab69c0e5fec6461ab0f73f7836acd640fe43ea9919fcf
<|file_name|>settings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Scrapy settings for saymedia project # # For simplicity, this file contains only the most important settings by # default. All the other settings are documented here: # # http://doc.scrapy.org/en/latest/topics/settings.html # BOT_NAME...
<|file_name|>headless.rs<|end_file_name|><|fim▁begin|>use crate::errors::*; use crate::math::prelude::Vector2; use super::super::events::Event; use super::Visitor; pub struct HeadlessVisitor {} impl Visitor for HeadlessVisitor { #[inline] fn show(&self) {} #[inline] fn hide(&self) {} #[inline] ...
#[inline] fn dimensions(&self) -> Vector2<u32> {
<|file_name|>obfuscated_file_util.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webkit/browser/fileapi/obfuscated_file_util.h" #include <queue> #include ...
<|file_name|>test_cortex.py<|end_file_name|><|fim▁begin|>import time from cortex import * class MyDataHandler: def __init__(self): self.alldata = [] def MyErrorHandler(self, iLevel, msg): print("ERROR: ") print(iLevel, msg.contents) return 0 def MyDataHand...
Cortex_SetErrorMsgHandlerFunc(my_obj.MyErrorHandler) Cortex_SetDataHandlerFunc(my_obj.MyDataHandler)
<|file_name|>ns.py<|end_file_name|><|fim▁begin|>import numpy as np import matplotlib.pyplot as plt def readmesh(fname): """ input ----- fname: string gmsh file name output ------ V: array vertices E: array element ids<|fim▁hole|> mes...
""" import gmsh
<|file_name|>apachelogs_test.py<|end_file_name|><|fim▁begin|>''' Simple test for apachelogs ''' import unittest from apachelogs import ApacheLogFile class apachelogs_test(unittest.TestCase): def test_foo(self): log = ApacheLogFile('test.log') line = iter(log).next() self.assertEquals(lin...
self.assertEquals(line.http_response_code, '200') self.assertEquals(line.http_response_size, '2326')
<|file_name|>personalised-recommendations.js<|end_file_name|><|fim▁begin|>// Copyright 2020 Google 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 // // https://www.apache.org/lic...
<|file_name|>Repairing.py<|end_file_name|><|fim▁begin|>#This file is distributed under the terms of the GNU General Public license. #Copyright (C) 2011 Jekin Trivedi <jekintrivedi@gmail.com> (See the file COPYING for details). from atlas import * from physics import * from physics import Quaternion from physics import...
# FIXME Use weak references, once we have them self.target = server.world.get_object_ref(op[0].id) self.tool = op.to
<|file_name|>field_slider.js<|end_file_name|><|fim▁begin|>(function($) { "use strict"; // Return true for float value, false otherwise function is_float (mixed_var) { return +mixed_var === mixed_var && (!(isFinite(mixed_var))) || Boolean((mixed_var % 1)); } // Return number of integers a...
//} //j++; }
<|file_name|>hashivault_approle_role_get.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from ansible.module_utils.hashivault import hashivault_argspec from ansible.module_utils.hashivault import hashivault_auth_client from ansible.module_utils.hashivault import hashivault_init from ansible.module_utils.hashivaul...
@hashiwrapper
<|file_name|>tests.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals from django.contrib.gis.db.models import F, Collect, Count, Extent, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.geos import GEOSGeometry, MultiPoint, Point from django.db import connect...
srid=4326 ) pcity = City.objects.get(name='Aurora')
<|file_name|>Root.prod.js<|end_file_name|><|fim▁begin|>import React, { PropTypes } from 'react'; import { Provider } from 'react-redux'; import Routers from './Routers'; /** * Component is exported for conditional usage in Root.js */ const Root = ({ store }) => ( /** * Provider is a component provided to us by ...
};
<|file_name|>one_D_helmholtz.py<|end_file_name|><|fim▁begin|>from numpy import array, zeros, ones, sqrt, ravel, mod, random, inner, conjugate from scipy.sparse import csr_matrix, csc_matrix, coo_matrix, bmat, eye from scipy import rand, mat, real, imag, linspace, hstack, vstack, exp, cos, sin, pi from pyamg.util.linalg...
return xopt
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
#__all__ = [ 'search', 'ham_distance', 'lev_distance', 'distance', 'distance_matrix' ]
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__":<|fim▁hole|> from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)<|fim▁end|>
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "kitchen_sink.settings")
<|file_name|>require-dot-notation.js<|end_file_name|><|fim▁begin|>/** * Requires member expressions to use dot notation when possible * * Types: `Boolean` or `Object` * * Values: * - `true` * - `"except_snake_case"` (*deprecated* use `"allExcept": ["snake_case"]`) allow quoted snake cased identifiers * - `Ob...
* ##### Valid
<|file_name|>plugin.py<|end_file_name|><|fim▁begin|>""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 ...
<|file_name|>rmo.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/. //! Ref/Mut/Owned types.<|fim▁hole|><|fim▁end|>
pub use lrs_base::rmo::*;
<|file_name|>jquery.pagination.js<|end_file_name|><|fim▁begin|>/** * jQuery EasyUI 1.5.1 * * Copyright (c) 2009-2016 www.jeasyui.com. All rights reserved. * * Licensed under the freeware license: http://www.jeasyui.com/license_freeware.php * To use it on other terms please contact us: info@jeasyui.com * */ (fu...
<|file_name|>ActivitiesService.java<|end_file_name|><|fim▁begin|>package net.inpercima.runandfun.service; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_MEDIA; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_URL_PAGE_SIZE_ONE; import stat...
final Collection<AppActivity> activities = new ArrayList<>(); final String username = authService.getAppState(accessToken).getUsername();
<|file_name|>aiplatform_v1beta1_generated_job_service_update_model_deployment_monitoring_job_async.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
<|file_name|>resolver.js<|end_file_name|><|fim▁begin|>define("resolver", [], function() { "use strict"; /* * This module defines a subclass of Ember.DefaultResolver that adds two * important features: * * 1) The resolver makes the container aware of es6 modules via the AMD * output. The lo...
} }
<|file_name|>models.py<|end_file_name|><|fim▁begin|>"""Schedule models. Much of this module is derived from the work of Eldarion on the `Symposion <https://github.com/pinax/symposion>`_ project. Copyright (c) 2010-2014, Eldarion, Inc. and contributors All rights reserved. Redistribution and use in source and binary ...
"""Return the rooms for the day.""" return Room.query.join(rooms_slots, Slot).filter( Slot.day == self).order_by(Room.order).all()
<|file_name|>history_traversal.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_thread::{CommonScriptMsg, MainThreadScri...
<|file_name|>_configuration_profile_preferences_operations.py<|end_file_name|><|fim▁begin|># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for lic...
"""Retrieve a list of configuration profile preferences within a given resource group.
<|file_name|>builder.rs<|end_file_name|><|fim▁begin|>use llvm_sys::*; use llvm_sys::prelude::*; use llvm_sys::core as llvm; use super::*; macro_rules! build_op_str { ($op_name: ident, $fn: path, $($argn: ident: $argv: path),*) => { impl Builder { pub fn $op_name(&mut self, $($argn: $argv),*, n...
rhs: LLVMValueRef); build_op_str!(build_phi, llvm::LLVMBuildPhi, ty: LLVMTypeRef); //build_call is manually defined in impl Builder
<|file_name|>reconnecting.js<|end_file_name|><|fim▁begin|>module.exports = client => { console.log(`Reconnecting... [at ${new Date()}]`); <|fim▁hole|><|fim▁end|>
};
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>"""Module containing helper functions that are used by other parts of worker.""" import datetime import getpass import json import logging import signal import re from contextlib import contextmanager from os import path as os_path, walk, getcwd, chdir, environ as os_...
return not any(sub.startswith('.') for sub in item.split(os_path.sep))