prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>bitcoin_tr.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0"> <defaultcodec>UTF-8</defaultcodec> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About Kashmircoin</source>...
<translation>Bu ay</translation>
<|file_name|>editprofile.js<|end_file_name|><|fim▁begin|>/*! * Copyright 2014 Apereo Foundation (AF) Licensed under the * Educational Community 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://opensour...
// Disable the form
<|file_name|>lbgpu.hpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010-2019 The ESPResSo project * * This file is part of ESPResSo. * * ESPResSo is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, eith...
<|file_name|>loopback_test.go<|end_file_name|><|fim▁begin|>// Copyright 2016 CNI 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...
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter)
<|file_name|>introspect.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749.endpoint.introspect ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An implementation of the OAuth 2.0 `Token Introspection`. .. _`Token Introspection`: https://tools.ietf.org/html/rfc7662 """ from __future__ impor...
class IntrospectEndpoint(BaseEndpoint):
<|file_name|>gobular_test.go<|end_file_name|><|fim▁begin|>package gobular import ( "testing" ) func testFit(t *testing.T, s string, must string, len uint32, align Alignment) { got := ansiEsc.ReplaceAllLiteralString(fitPad(len, align, s), "") if got != must { t.Errorf("Must:|%s| Got:|%s|\n", must, got) } } // T...
testFit(t, "123456", "123456 ", 10, HAlignLeft) testFit(t, "123456", " 123456 ", 10, HAlignCenter) testFit(t, "123456", " 123456", 10, HAlignRight)
<|file_name|>find_credentials_list.go<|end_file_name|><|fim▁begin|>package csb //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 requi...
//distributed under the License is distributed on an "AS IS" BASIS,
<|file_name|>issue-447.rs<|end_file_name|><|fim▁begin|>#![allow( dead_code, non_snake_case, non_camel_case_types, non_upper_case_globals )] #[allow(non_snake_case, non_camel_case_types, non_upper_case_globals)] pub mod root { #[allow(unused_imports)] use self::super::root;<|fim▁hole|> ...
pub mod mozilla { #[allow(unused_imports)] use self::super::super::root; pub mod detail {
<|file_name|>network_utils.py<|end_file_name|><|fim▁begin|># Copyright 2012 OpenStack Foundation. # 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 # # h...
>>> parse_host_port('[::1]:80') ('::1', 80)
<|file_name|>py-collections-ordereddict.py<|end_file_name|><|fim▁begin|>from collections import OrderedDict def main(): net_prices = OrderedDict() for _ in range(int(input())): item, price = input().rsplit(maxsplit=1) net_prices[item] = net_prices.get(item, 0) + int(price) for ite...
print(item, net_prices[item])
<|file_name|>Request.py<|end_file_name|><|fim▁begin|>class Request(object): def __init__(self, value): self.__value = value <|fim▁hole|> def get_value(self): return self.__value<|fim▁end|>
<|file_name|>unified.rs<|end_file_name|><|fim▁begin|>extern crate arrayfire as af; use af::*; #[allow(unused_must_use)] fn test_backend(){ info(); let num_rows: u64 = 10; let num_cols: u64 = 10; let dims = Dim4::new(&[num_rows, num_cols, 1, 1]); println!("Create a 10-by-10 matrix of random floats on the c...
Err(e) => println!("OpenCL backend error: {}", e), }; } }
<|file_name|>classification_train.py<|end_file_name|><|fim▁begin|>"""Classification training""" import os, sys sys.path.append('../') sys.path.append('../models/') sys.path.append('../util/') import time import json import importlib import argparse import tensorflow as tf import numpy as np from input_data import D...
return tf.reduce_mean(cross_entropy)
<|file_name|>borrowck-loan-rcvr.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....
fn main() {
<|file_name|>fetchdata.py<|end_file_name|><|fim▁begin|>''' Created on 15.02.2015 @author: diesel ''' import datetime from indexdata import IndexData, IndexHistory import indexdatabase def _selectTrue( idxData ): return True class FetchData(): ''' classdocs ''' def __init__(self, indexName): ...
Get a list of monthly index histories ''' def fetchMonthlyHistory(self, startDate, endDate, select=_selectTrue):
<|file_name|>devstack_docker.py<|end_file_name|><|fim▁begin|>""" Overrides for Docker-based devstack. """ from .devstack import * # pylint: disable=wildcard-import, unused-wildcard-import # Docker does not support the syslog socket at /dev/log. Rely on the console. LOGGING['handlers']['local'] = LOGGING['handlers'][...
<|file_name|>Identifier.py<|end_file_name|><|fim▁begin|>import numpy as np import pandas as pd from pandas import Series, DataFrame from scipy.spatial import distance import matplotlib.pyplot as plt from sklearn.cluster import DBSCAN from sklearn import metrics from sklearn.datasets.samples_generator import make_blobs...
#if walking event is completed, we
<|file_name|>shipping.py<|end_file_name|><|fim▁begin|>""" This code was generated by Codezu. Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. """ from mozurestsdk.mozuclient import default as default_client from mozurestsdk.mozuurl import MozuUrl; from m...
""" url = MozuUrl("/api/commerce/catalog/storefront/shipping/request-rates?responseFields={responseFields}", "POST", UrlLocation.TenantPod, False);
<|file_name|>vectorsim.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import division import math import signal import sys import numpy as np from scipy.spatial import distance from munkres import munkres from . import Matcher from itertools import izip from scipy.stats import kendalltau from matteau...
self.tsim = 1 - self.metric([self.s1["vec_sum"]], [self.s2["vec_sum"]])[0, 0] self.nmatches = -1 self.start = -1
<|file_name|>index.d.ts<|end_file_name|><|fim▁begin|>// Type definitions for change-emitter v0.1.2 // Project: https://github.com/acdlite/change-emitter // Definitions by: Iskander Sierra <https://github.com/iskandersierra> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare module 'change-emitt...
interface ChangeEmitterOf5<T1, T2, T3, T4, T5> {
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(box_patterns)] #![feature(in_band_lifetimes)] #![feature(iter_zip)] #![feature(rustc_private)] #![recursion_limit = "512"] #![cfg_attr(feature = "deny-warnings", deny(warnings))] #![allow(clippy::missing_errors_doc, clippy::missing_panics_doc, clippy::must_use...
<|file_name|>command_line.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse from datetime import timedelta, date import glob import os import sys import pyinotify from evernote.edam.error.ttypes import EDAMUserException from tomboy2evernote.tomboy2evernote import Evernot...
glob.glob(os.path.join(TOMBOY_DIR, "*.note"))))
<|file_name|>SlotDefinitionVisitor.java<|end_file_name|><|fim▁begin|>package clientdata.visitors; import java.nio.charset.Charset; import java.nio.charset.CharsetDecoder; import java.util.HashMap; import java.util.Map; import org.apache.mina.core.buffer.IoBuffer; import clientdata.VisitorInterface; public class SlotD...
public String slotName; public byte global; public byte canMod; public byte exclusive;
<|file_name|>thepiratebay.py<|end_file_name|><|fim▁begin|># Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
def _doSearch(self, search_strings, search_mode='eponly', epcount=0, age=0, epObj=None):
<|file_name|>MutationObserver.js<|end_file_name|><|fim▁begin|>import _WeakMap from "babel-runtime/core-js/weak-map"; /** * @license * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt * The comp...
if (!registrations) return;
<|file_name|>Handlers.java<|end_file_name|><|fim▁begin|>//############################################################################# //# # //# Copyright (C) <2015> <IMS MAXIMS> # //# ...
package ims.core.forms.vitalsignstprbp;
<|file_name|>AbstractGroupingProperty.java<|end_file_name|><|fim▁begin|>/* * Copyright 2009-2013 by The Regents of the University of California * 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 ...
public final void normalizeGroupingColumns(Map<LogicalVariable, EquivalenceClass> equivalenceClasses,
<|file_name|>_app.ts<|end_file_name|><|fim▁begin|>///<reference path='../typings/tsd.d.ts' /> module <%= moduleName %> { 'use strict'; /* @ngdoc object * @name <%= moduleName %> * @description * */ angular .module('<%= moduleName %>', [<% if (bower.indexOf('aria') > -1) { %> 'ngAria',<% } ...
'ui.bootstrap'<% } %><% if (framework === 'foundation') { %>, 'mm.foundation'<% } %> ]);
<|file_name|>es.py<|end_file_name|><|fim▁begin|># coding: utf-8 { '!langcode!': 'es', '!langname!': 'Español', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar ...
'Current response': 'Respuesta en curso', 'Current session': 'Sesión en curso',
<|file_name|>doc_controls.py<|end_file_name|><|fim▁begin|># Lint as: python3 # Copyright 2018 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 # # ...
Returns: obj """
<|file_name|>analyze_user_sessions.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """ Categorize and analyze user sessions. Read in ecfs_obfuscated_filtered.gz file, output some fancy results. """ from collections import defaultdict from collections import Counter import sys import time import os impo...
self.dir_cnt_puts = Counter()
<|file_name|>2696.cpp<|end_file_name|><|fim▁begin|>#include<cstdio> int t; char c[250][250],u[250]; char go(int v) { if(v==t)return 1; if(u[v])return 0; u[v]=1; for(int i=0;i<=t;i++) if(c[v][i]) { c[v][i]--; if(go(i)) { c[i][v]++; ...
scanf("%d %d",&i,&j); c[i][n+j]=1; } for(i=1;i<=n;i++)
<|file_name|>lc_add_clusters.py<|end_file_name|><|fim▁begin|>import h5py # HDF5 support import os<|fim▁hole|>import glob import numpy as n from scipy.interpolate import interp1d import sys from astropy.cosmology import FlatLambdaCDM import astropy.units as u cosmoMD = FlatLambdaCDM(H0=67.77*u.km/u.s/u.Mpc, Om0=0.307...
<|file_name|>test_cpe_sorter.py<|end_file_name|><|fim▁begin|>import unittest from matching.cpe_sorter import * unsorted_cpes = [{'wfn': {'version': '4.0', 'target_sw': 'android_marshmallow'}, 'uri_binding': 'cpe:/a:string_value_with\:double_points:internet_explorer:4.0:beta:~~~android_marshmallow~~'...
<|file_name|>MockIRRangeFinderSensor.cpp<|end_file_name|><|fim▁begin|>#include "include/MockIRRangeFinderSensor.h" #include "include/MockIRRangeFinderSensorMessage.h" MockIRRangeFinderSensor::MockIRRangeFinderSensor() { // Constructor } MockIRRangeFinderSensor::~MockIRRangeFinderSensor() { // Destructor } vo...
double MockIRRangeFinderSensor::getDistanceCM() { // No-Op return -1;
<|file_name|>ipsec.py<|end_file_name|><|fim▁begin|>## Copyright (C) 2007 Sadique Puthen <sputhenp@redhat.com> ### This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License...
class IPSec(Plugin):
<|file_name|>d.py<|end_file_name|><|fim▁begin|>import RPi.GPIO as GPIO<|fim▁hole|>GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(3,GPIO.OUT) state=True GPIO.output(3,True)<|fim▁end|>
import time
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! kaiseki -- literate programming preprocessing #[macro_use] extern crate error_chain; extern crate regex; pub mod input; pub mod list; <|fim▁hole|>mod parsing; pub mod processing_errors { error_chain! { errors { NotUTF8(file: String, lineno: usize) { ...
<|file_name|>test_timer.py<|end_file_name|><|fim▁begin|>from unittest import TestCase from common.timer import timed @timed def fib(n): ls = [1, 1] if n == 0: return 0 if n <= 2: return ls[n - 1] for i in range(3, n + 1): tmp = ls[1] ls[1] = ls[0] + ls[1] ls[0]...
# timed should not do anything to the decorated method,
<|file_name|>ListOfGamesGenerator.java<|end_file_name|><|fim▁begin|>package com.giantbomb.main; public class ListOfGamesGenerator { public static void main(final String[] args)<|fim▁hole|><|fim▁end|>
{ } }
<|file_name|>termbox.rs<|end_file_name|><|fim▁begin|>//! Some utilities for termbox use crate::config::Style; use termbox_simple::Termbox; pub(crate) fn print_chars<C>( tb: &mut Termbox, mut pos_x: i32, pos_y: i32, style: Style, chars: C, ) -> i32 where<|fim▁hole|> pos_x += 1; } po...
C: Iterator<Item = char>, { for char in chars { tb.change_cell(pos_x, pos_y, char, style.fg, style.bg);
<|file_name|>Spelling.py<|end_file_name|><|fim▁begin|>from coalib.bearlib.aspects import Root, Taste @Root.subaspect class Spelling: """ How words should be written. """ class docs: example = """ 'Tihs si surly som incoreclt speling. `Coala` is always written with a lowercase `...
<|file_name|>IPaddValidity_hex_bin.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python<|fim▁hole|>import fileinput class NotValidIP(Exception): pass class NotValidIPLength(Exception): pass while True: try: ip_addr = input("Enter a network IP address: ") ip_addr_split = ip_addr.split('.'...
<|file_name|>info.py<|end_file_name|><|fim▁begin|>## Automatically adapted for scipy Oct 21, 2005 by """ Integration routines ==================== Methods for Integrating Functions given function object. quad -- General purpose integration. dblquad -- General purpose double integration. tplq...
<|file_name|>cssnamespacerule.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::CSSNamespaceRu...
fn get_css(&self) -> DOMString { self.namespacerule.read().to_css_string().into() }
<|file_name|>models.js<|end_file_name|><|fim▁begin|>var mongoose = require('mongoose') , Schema = mongoose.Schema , ObjectId = Schema.ObjectId , relationships = require('../../index'); // require('mongoose-relationships'); /** * Blog Post Schema * "belongs to one author" */ var PostSchema = new Schema({ t...
/** * User Schema * "has many posts"
<|file_name|>test_localfile.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import nose.tools as ns import os from os.path import join from tempfile import gettempdir from relshell.record import Record from relshell.recorddef import RecordDef from relshell.batch import Batch from shellstreaming.core.batch_queue...
ostream = LocalFile(TEST_FILE, output_format='csv', input_queue=q) ostream.join()
<|file_name|>plot_nw.py<|end_file_name|><|fim▁begin|>import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import datetime from Bio.Seq import Seq if __name__ == '__main__': from needleman_wunsch import needleman_wunsch else: from .needleman_wunsch import needleman_wunsch #-----...
# Data headh = seq_alpha_col headv = seq_beta_row
<|file_name|>helper.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
pub mod helix_struct;
<|file_name|>hooks.ts<|end_file_name|><|fim▁begin|>import { invariant } from './util' import { normalizeCriteria } from './helpers' import { Fn, Criteria, CriteriaNormalized, CreateOptions, UpdateOptions } from './types' export type HookOptions = CreateOptions | UpdateOptions | {} export type OnQueryOption...
invariant(
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- __version__ = '0.8.0' __author__ = 'Steven Loria' __license__ = 'MIT'<|fim▁hole|> __all__ = ['Arg', 'WebargsError', 'ValidationError', 'Missing']<|fim▁end|>
from webargs.core import Arg, WebargsError, ValidationError, Missing
<|file_name|>chunk.js<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
var convert = require('./convert'); module.exports = convert('chunk', require('../chunk'));
<|file_name|>DummyPersonMoreComplexObject.java<|end_file_name|><|fim▁begin|>/** * Copyright 2008-2017 Qualogy Solutions B.V. * * 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:/...
* limitations under the License.
<|file_name|>vpp_ip.py<|end_file_name|><|fim▁begin|>""" IP Types """ import logging from ipaddress import ip_address from socket import AF_INET, AF_INET6 from vpp_papi import VppEnum from vpp_object import VppObject try: text_type = unicode except NameError: text_type = str _log = logging.getLogger(__name_...
def __ne__(self, other): return not (self == other)
<|file_name|>vmware_host_firewall_manager.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, divisio...
main()
<|file_name|>rhev-keyring.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # # Author: Pablo Iranzo Gomez (Pablo.Iranzo@redhat.com) # # Description: Script for setting the keyring password for RHEV scripts # # Requires: python keyring # # This program is free software; you can redistribute it and/or modify # it un...
<|file_name|>textChanges.ts<|end_file_name|><|fim▁begin|>/* @internal */ namespace ts.textChanges { /** * Currently for simplicity we store recovered positions on the node itself. * It can be changed to side-table later if we decide that current design is too invasive. */ function getPos(...
changes.deleteRange(sourceFile, { pos: previousToken.getStart(sourceFile), end: node.end });
<|file_name|>example_netlist.py<|end_file_name|><|fim▁begin|>#/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Id...
<|file_name|>test_keycloak_group.py<|end_file_name|><|fim▁begin|>import collections import os import unittest from ansible.modules.identity.keycloak.keycloak_group import * class KeycloakGroupTestCase(unittest.TestCase): def test_create_group(self): toCreate = { "username":"admin", ...
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
group.permissions.filter( codename='save_translation' ).exists() )
<|file_name|>tree.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Natural Language Toolkit: Text Trees # # Copyright (C) 2001-2015 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # Peter Ljunglöf <peter.ljunglof@gu.se> # Nathan Bodenstab <b...
return self._parent[parent_index+1] return None # no right sibling
<|file_name|>Peak.py<|end_file_name|><|fim▁begin|># pyeq2 is a collection of equations expressed as Python classes # # Copyright (C) 2012 James R. Phillips # 2548 Vera Cruz Drive # Birmingham, AL 35235 USA # # email: zunzun@zunzun.com # web: http://zunzun.com # # License: BSD-style (see LICENSE.txt...
baseEquationHasGlobalMultiplierOrDivisor_UsedInExtendedVersions = True autoGenerateOffsetForm = True autoGenerateReciprocalForm = True
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from client import get_client from client import ( BIGQUERY_SCOPE, BIGQUERY_SCOPE_READ_ONLY, JOB_CREATE_IF_NEEDED, JOB_CREATE_NEVER, JOB_SOURCE_FORMAT_NEWLINE_DELIMITED_JSON, JOB_SOURCE_FORMAT_DATASTORE_BACKUP, JOB_SOURCE_FORMAT_CSV, ...
<|file_name|>hr_attendance.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2011 Domsense srl (<http://www.domsense.com>) # Copyright 2011-15 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright 2017 OpenSynergy Indonesia (<https://opensynergy-indonesia.com>) # License AGPL-3.0 or later (...
<|file_name|>import-stack.controller.ts<|end_file_name|><|fim▁begin|>/* * Copyright (c) 2015-2018 Red Hat, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * htt...
* Contributors: * Red Hat, Inc. - initial API and implementation
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>""" Support for HomeMatic devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homematic/ """ import asyncio from datetime import timedelta from functools import partial import logging import os i...
<|file_name|>getDOMNodeID.js<|end_file_name|><|fim▁begin|>/** * Copyright 2013 Facebook, 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...
*/ "use strict";
<|file_name|>full0.py<|end_file_name|><|fim▁begin|>import tensorflow as tf from tensorflow.contrib import slim as slim from avb.ops import * import math def encoder(x, config, is_training=True): df_dim = config['df_dim'] z_dim = config['z_dim'] a_dim = config['iaf_a_dim'] # Center x at 0 x = 2*x -...
a = slim.fully_connected(net, a_dim, activation_fn=None) return zmean, log_zstd, a
<|file_name|>sysInfo.py<|end_file_name|><|fim▁begin|># (c) Copyright 2008-2015 Synapse Wireless, Inc. """System Info IDs - used in 'getInfo()' and 'getStat()' calls""" # Types SI_TYPE_VENDOR = 0 SI_TYPE_RADIO = 1 SI_TYPE_CPU = 2 SI_TYPE_PLATFORM = 3 SI_TYPE_BUI...
SI_RF200A_FLAG = 17 # Embedded nodes only SI_STDIN_HOOK_STATUS = 18 # Embedded nodes only
<|file_name|>util.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # encoding: utf-8 """ Copyright 2011, 2012 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 ...
self.process(item) except Queue.Empty, e:
<|file_name|>hooks.py<|end_file_name|><|fim▁begin|>import os import sys import re from bento.compat \ import \ inspect as compat_inspect from bento.commands.core \ import \ command SAFE_MODULE_NAME = re.compile("[^a-zA-Z_]") __HOOK_REGISTRY = {} __PRE_HOOK_REGISTRY = {} __POST_HOOK_REGISTRY =...
return decorator post_configure = _make_hook_decorator("configure", "post")
<|file_name|>DualVector3.hpp<|end_file_name|><|fim▁begin|>/* MoTo - Motion Toolkit Copyright (c) 2006-2019 Gino van den Bergen, DTECTA Source published under the terms of the MIT License. For details please see COPYING file or visit http://opensource.org/licenses/MIT */ #ifndef MT_DUALVECTOR3_HPP #...
template <typename Scalar> Vector3<Dual<Scalar> > makeIntersect(const Vector4<Scalar>& p, const Vector4<Scalar>& q);
<|file_name|>lib.rs<|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 // // http://www.apache.org/licenses/LICENSE-2.0 // // U...
<|file_name|>course-detail.ts<|end_file_name|><|fim▁begin|><|fim▁hole|>export class CourseDetail { static fromJsonList(array): CourseDetail[] { return array.map(CourseDetail.fromJson); } static fromJson({$key, description, alphabets, phonetics, words, lessons}): CourseDetail { return new CourseDetail($k...
<|file_name|>test_root.py<|end_file_name|><|fim▁begin|>import unittest from numpy import arange, linspace from numpy.random import seed from src.bases.root import Root from src.examples.example_setups import setup_stat_scm from src.utils.sem_utils.toy_sems import StationaryDependentSEM as StatSEM from src.utils.sequen...
#  Use STAT DAG to test Root class self.T = 3 # Time-steps in DAG
<|file_name|>version.go<|end_file_name|><|fim▁begin|><|fim▁hole|>package command import ( "bytes" "fmt" ) type VersionCommand struct { Meta Name string Version string Revision string } func (c *VersionCommand) Run(args []string) int { var versionString bytes.Buffer fmt.Fprintf(&versionString, "%s v%s"...
<|file_name|>fixedOrGrowContainer.styles.ts<|end_file_name|><|fim▁begin|>/** * Copyright (C) 2021 3D Repo Ltd * * 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 Foundation, either version 3 o...
import { Display } from '@/v5/ui/themes/media';
<|file_name|>utils.py<|end_file_name|><|fim▁begin|>from sha3 import sha3_256 from ethereum.utils import big_endian_to_int def sha3(seed): return sha3_256(bytes(seed)).digest() # colors FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m'<|fim▁hole|> def DEBUG(*args, **kargs): print(FAIL...
<|file_name|>navigation.fltr.js<|end_file_name|><|fim▁begin|>/** * Created by reuben on 10/11/14. */ "use strict"; angular.module('crookedFireApp.filters', []).filter('tabsFilter', function () { return function (tabs, roles) { var arr = []; //load public tabs for (var i = 0; i < tabs.le...
arr.push(tabs[i]); j = tabs[i].roles.length;
<|file_name|>qgsattributeformeditorwidget.cpp<|end_file_name|><|fim▁begin|>/*************************************************************************** qgsattributeformeditorwidget.cpp ------------------------------- Date : March 2016 Copyright : (C) 2016 Nyall Dawson Ema...
<|file_name|>xml-parser.ts<|end_file_name|><|fim▁begin|>/** * Copyright 2013-2019 GenieACS Inc. * * This file is part of GenieACS. * * GenieACS 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, ei...
state2 = state1;
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>import res_partner import account<|fim▁end|>
# -*- coding: utf-8 -*- # © 2016 Comunitea - Javier Colmenero <javier@comunitea.com> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
<|file_name|>test_functional.py<|end_file_name|><|fim▁begin|>import pytest @pytest.mark.parametrize( "method,path", [ ('get_html', '/'), ('get_html', '/parameters/GB020'), ('get_json', '/parameters/GB020.geojson'), ('get_json', '/parameters/GB020.geojson?domainelement=GB020-1')...
('get_dt', '/familys'), ('get_dt', '/values'), ('get_html', '/contributors/ML'),
<|file_name|>message.go<|end_file_name|><|fim▁begin|>package telemetry import ( "fmt" "strconv" "strings" "time" ) // ============================================================================================================================== // MESSAGE DATA // =============...
<|file_name|>img_url.test.js<|end_file_name|><|fim▁begin|>const should = require('should'); const sinon = require('sinon'); const configUtils = require('../../../utils/configUtils'); // Stuff we are testing const img_url = require('../../../../core/frontend/helpers/img_url'); const logging = require('@tryghost/loggin...
after(function () { configUtils.restore();
<|file_name|>subject.d.ts<|end_file_name|><|fim▁begin|>import * as React from 'react'; import { IconBaseProps } from 'react-icon-base';<|fim▁hole|><|fim▁end|>
declare class MdSubject extends React.Component<IconBaseProps> { } export = MdSubject;
<|file_name|>bog.domain.repositories.status.js<|end_file_name|><|fim▁begin|>var _base = require('./bog.domain.repositories._base.js'); var StatusDataRepo = require('../../data/repositories/bog.data.repositories.status'); var StatusRepository = function (current_user) { var self = this; var user = current_user;...
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from tower import ugettext_lazy as _lazy from kitsune.forums.models import Thread, Post from kitsune.sumo.form_fields import StrippedCharField MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') MSG_TITLE_SHORT = _lazy( u'Your title ...
<|file_name|>JSONExample.java<|end_file_name|><|fim▁begin|>/* * Copyright © 2014 - 2018 Leipzig University (Database Research Group) * * 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 * *...
* Example vertex JSON document: * * { * "id":"vertex-uuid-1",
<|file_name|>_components.language-nav.js<|end_file_name|><|fim▁begin|>(function(){ var languageNav = $('.js-language-nav'); languageNav.on('click', function(){<|fim▁hole|> languageNav.toggleClass('active'); }); //close opened stuff $(document).on('click', function(e) { if (!$(e.t...
<|file_name|>osp_settings.py<|end_file_name|><|fim▁begin|>from osp.conf.settings import * # Unique key used for salting passwords SECRET_KEY = 'Chac-8#haCa_Ra-e?-e+ucrur=gEFRasejayasaC?meMe!AC-a' # DEBUG should be False in production, True in development DEBUG = False # List of administrators who should receive erro...
TERM_CHOICES = [ ('fa', 'Fall'), ('sp', 'Spring'), ('su', 'Summer'),
<|file_name|>ProteinTranslator.java<|end_file_name|><|fim▁begin|>import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; class ProteinTranslator { private static final Integer CODON_LENGTH = 3; private static final Map<String, String> CODON_TO_PROTEIN = Map.ofEntries( ...
Map.entry("UUC", "Phenylalanine"), Map.entry("UUA", "Leucine"), Map.entry("UUG", "Leucine"),
<|file_name|>AdBannerAdapter.java<|end_file_name|><|fim▁begin|>package com.tincent.demo.adapter; import java.util.ArrayList; import java.util.List; import com.nostra13.universalimageloader.core.DisplayImageOptions; import com.nostra13.universalimageloader.core.ImageLoader; import com.nostra13.universalimageloader.cor...
bean2.imgul = "http://www.wahh.com.cn/UploadFiles/UploadADPic/201404090916310760.jpg"; //bean2.httpurl = "http://88.88.88.197:8010/ForTestRecover/index.html"; adList.add(bean);
<|file_name|>drumkitparser.cc<|end_file_name|><|fim▁begin|>/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /*************************************************************************** * drumkitparser.cc * * Tue Jul 22 16:24:59 CEST 2008 * Copyright 2008 Bent Bisballe Nye...
TEST_EQUAL_INT(kit.instruments.size(), 2, "How many instruments?"); unlink(FNAME);
<|file_name|>CollisionResolver.java<|end_file_name|><|fim▁begin|>package com.gustavomaciel.enterprise; import com.badlogic.gdx.utils.Array; import com.gustavomaciel.enterprise.CollisionGroups.CollisionGroup; /** * Created by Gustavo on 5/22/2016. */<|fim▁hole|>public class CollisionResolver { public static void...
<|file_name|>core.py<|end_file_name|><|fim▁begin|>""" Dtella - Core P2P Module Copyright (C) 2008 Dtella Labs (http://www.dtella.org) Copyright (C) 2008 Paul Marks $Id$ 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 ...
# Message is known.
<|file_name|>test_frames.py<|end_file_name|><|fim▁begin|>import io import unittest from payment_terminal.drivers.bbs.connection import read_frame, write_frame class TestBBSFrames(unittest.TestCase): def test_read_one(self): port = io.BytesIO(b'\x00\x0512345') self.assertEqual(read_frame(port), b'...
port = io.BytesIO()
<|file_name|>q_00006.ts<|end_file_name|><|fim▁begin|>import chance = require('../../extlibs/wrap_chance'); export class Question { num: number; constructor() { this.num = chance.natural({ min: 20, max: 20000 }); } get avg() { return this.num + 0.5; } get cans() { ...
<|file_name|>Common.cpp<|end_file_name|><|fim▁begin|>/* This file is part of cpp-ethereum. cpp-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) an...
Node::Node(NodeSpec const& _s, PeerType _p): id(_s.id()), endpoint(_s.nodeIPEndpoint()),
<|file_name|>overlay.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk window = Gtk.Window() window.set_default_size(200, 200)<|fim▁hole|>window.add(overlay) textview = Gtk.TextView() textview.set_wrap_mode(Gtk.WrapMode.WORD_CHAR) textbuffe...
window.connect("destroy", Gtk.main_quit) overlay = Gtk.Overlay()