prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>deleterepositoryresponse.cpp<|end_file_name|><|fim▁begin|>/* Copyright 2013-2021 Paul Colby This file is part of QtAws. QtAws 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 Foundatio...
namespace QtAws { namespace ECRPublic { /*!
<|file_name|>octopus.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This software may be used and distributed according to the terms of the * GNU General Public License version 2. */ /// Return a DAG with cross and octopus merges. pub fn cross_octopus() -> Vec<Vec<usiz...
.map(|i| { parents[&format!("r{:02}", i)] .iter() .map(|p| p.trim_start_matches('r').parse::<usize>().unwrap())
<|file_name|>commands.py<|end_file_name|><|fim▁begin|>### # Copyright (c) 2002-2005, Jeremiah Fincher # Copyright (c) 2009, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redis...
'validChannel': validChannel, 'regexpReplacer': getReplacer, 'owner': owner,
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .mtproto_plain_sender import MtProtoPlainSender from .authenticator import do_authentication from .mtproto_sender import MtProtoSender<|fim▁hole|><|fim▁end|>
from .connection import Connection, ConnectionMode
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import pygame import src.sprite as game pygame.init() screen = pygame.display.set_mode((400,300)) done = False GameUpdateList = [] GameRenderList = [] catapult = game.Sprite("data/img/catapult.png", 5) boulder = None catapultAnim = game.Animation(catapult, 96, 96, ...
for event in pygame.event.get():
<|file_name|>default.rs<|end_file_name|><|fim▁begin|>use malachite_nz::natural::Natural; #[test] fn test_default() { let default = Natural::default(); assert!(default.is_valid());<|fim▁hole|><|fim▁end|>
assert_eq!(default, 0); assert_eq!(default.to_string(), "0"); }
<|file_name|>dijkstra.rs<|end_file_name|><|fim▁begin|>use std::hash::Hash; use collections::hashmap::HashMap; use collections::hashmap::HashSet; /// Build a Dijkstra map starting from the goal nodes and using the neighbors /// function to define the graph to up to limit distance. pub fn build_map<N: Hash + Eq + Clone>...
// Init goal nodes to zero score.
<|file_name|>traits.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Jason White // // 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 t...
/// Ideally, the *explicit* inputs and outputs are a subset of the /// *implicit* inputs and outputs. fn execute( &self,
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import codecs import os import re import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand here = os.path.abspath(os.path.dirname(__file__)) class PyTest(TestCommand): def finalize_options(self): Te...
"Topic :: Software Development :: Build Tools",
<|file_name|>test_hiddeninput.py<|end_file_name|><|fim▁begin|>from django.forms import HiddenInput from .base import WidgetTest class HiddenInputTest(WidgetTest): widget = HiddenInput()<|fim▁hole|> def test_use_required_attribute(self): # Always False to avoid browser validation on inputs hidden from...
def test_render(self): self.check_html(self.widget, 'email', '', html='<input type="hidden" name="email" />')
<|file_name|>sphere.rs<|end_file_name|><|fim▁begin|>use geometry::bbox::{BBox, PartialBoundingBox}; use geometry::prim::Prim; use material::Material; use mat4::{Mat4, Transform}; use raytracer::{Ray, Intersection}; use vec3::Vec3; #[cfg(test)] use material::materials::FlatMaterial; #[allow(dead_code)] pub struct Sphe...
}
<|file_name|>ntp.rs<|end_file_name|><|fim▁begin|>/* Copyright (C) 2017-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free * Software Foundation. * * This program is distributed in th...
} fn free_tx(&mut self, tx_id: u64) { let tx = self.transactions.iter().position(|tx| tx.id == tx_id + 1);
<|file_name|>Endpoints.java<|end_file_name|><|fim▁begin|>package com.mozu.api.utils; public class Endpoints {<|fim▁hole|> public static final String SITES_END_POINT = "api/platform/tenants/%s/sites"; public static final String ATTRIBUTE_END_POINT = "api/commerce/catalog/admin/attributedefinition/attributes"; ...
public static final String AUTH_URL = "api/platform/applications/authtickets"; public static final String AUTH_REFRESH_URL = "api/platform/applications/authtickets/refresh-ticket/%s"; public static final String TENANT_END_POINT = "api/platform/tenants";
<|file_name|>my_json.py<|end_file_name|><|fim▁begin|>from typing import Dict, Any from depccg.tree import Tree from depccg.cat import Category def _json_of_category(category: Category) -> Dict[str, Any]: def rec(node): if node.is_functor: return { 'slash': node.slash, ...
<|file_name|>make_confidence_report_bundle_examples.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 """ make_confidence_report_bundle_examples.py Usage: make_confidence_report_bundle_examples.py model.joblib a.npy make_confidence_report_bundle_examples.py model.joblib a.npy b.npy c.npy where model.joblib ...
factory.kwargs['test_start'] = FLAGS.test_start factory.kwargs['test_end'] = FLAGS.test_end
<|file_name|>cover.py<|end_file_name|><|fim▁begin|>"""Support for MySensors covers.""" from homeassistant.components import mysensors from homeassistant.components.cover import ATTR_POSITION, DOMAIN, CoverDevice from homeassistant.const import STATE_OFF, STATE_ON async def async_setup_platform( hass, config, ...
"""Return True if cover is closed.""" set_req = self.gateway.const.SetReq if set_req.V_DIMMER in self._values:
<|file_name|>saved_model_save_load_test.py<|end_file_name|><|fim▁begin|># Copyright 2019 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 # # h...
super(SavedModelSaveAndLoadTest, self).setUp()
<|file_name|>arrayprint.py<|end_file_name|><|fim▁begin|>"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ __all__ = ["array2string", "array_str", "array_repr", "set_string_function", "set_printoptions", "get_printoptions", "printoptions", "format_float_...
Controls post-processing trimming of trailing digits, as follows: * 'k' : keep trailing zeros, keep decimal point (no trimming)
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from django.conf.urls import re_path from . import views app_name = 'topic' urlpatterns = [ re_path(r'^$', views.deleted, name='index'), re_path(r'^deleted/$', views.deleted, name='deleted'),<|fim▁hole|> re_path(r'^closed/$', views...
<|file_name|>time.go<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
// Package time extends the time package in the stdlib. package time
<|file_name|>api.py<|end_file_name|><|fim▁begin|># pylint: disable=unused-import """ Python APIs exposed by the bulk_email app to other in-process apps. """ # Public Bulk Email Functions from __future__ import absolute_import from bulk_email.models_api import ( is_bulk_email_enabled_for_course, is_bulk_email_...
return None
<|file_name|>test_preview.py<|end_file_name|><|fim▁begin|>""" Tests for contentstore.views.preview.py """ import re from unittest import mock import ddt from django.test.client import Client, RequestFactory from web_fragments.fragment import Fragment from xblock.core import XBlock, XBlockAside from cms.djangoapps.c...
with self.store.default_store(ModuleStoreEnum.Type.split):
<|file_name|>trans_sync.py<|end_file_name|><|fim▁begin|>import os import os.path from django.db import transaction from bibliotik import manage_bibliotik from bibliotik.models import BibliotikTransTorrent, BibliotikTorrent from home.models import LogEntry, DownloadLocation def sync_instance_db(instance): b_torr...
if len(files):
<|file_name|>rtestcover.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """Called from datakortet\dkcoverage.bat to record regression test coverage data in dashboard. """ import re import os # import sys # import time import glob # from datakortet.dkdash.status import send_status # from datakortet.utils im...
if absfname not in _skiplist: fpath, name = os.path.split(fname) if name != '__init__.py' or os.stat(absfname).st_size > 0: return absfname
<|file_name|>tests.rs<|end_file_name|><|fim▁begin|>use libc; // use std::mem; // use std::ptr; use std::ffi::CString; use super::*; #[test] fn test_read_objid() { init(b"test"); unsafe { let input = CString::new("1.3.6").unwrap(); let mut objid: [oid; 256] = [0; 256]; let mut objid_siz...
<|file_name|>lakkucast.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python #credits : https://gist.github.com/TheCrazyT/11263599 import socket import ssl import select import time import re import sys from thread import start_new_thread from struct import pack from random import randint from subprocess import call impo...
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import patterns # noqa<|fim▁hole|>from django.conf.urls.defaults import url # noqa from openstack_dashboard.dashboards.fogbow.usage import views from openstack_dashboard.dashboards.fogbow.usage.views import IndexView urlpatterns = patt...
<|file_name|>Lang.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- MENU_FILE = "File" FILE_NEW = "New" FILE_OPEN = "Open" FILE_EXIT = "Exit"<|fim▁hole|> TAB_DATA = "Data" TAB_SQL = "SQL" BUTTON_EXIT = "Exit"<|fim▁end|>
<|file_name|>SetTablatureEnabledAction.java<|end_file_name|><|fim▁begin|>/* * Created on 17-dic-2005 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ package org.herac.tuxguitar.app.actions.layout; import org.herac.tuxguitar.app.actions.A...
layout.setStyle( ( layout.getStyle() ^ TGLayout.DISPLAY_SCORE ) ); }
<|file_name|>ConfigurationFileAnalyser.java<|end_file_name|><|fim▁begin|>/* * Unitex * * Copyright (C) 2001-2014 Université Paris-Est Marne-la-Vallée <unitex@univ-mlv.fr> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as pu...
}
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from django.views.generic import ListView, DetailView, CreateView, \ DeleteView, UpdateView, \ ArchiveIndexView, DateDetailView, \ DayArchiveView, MonthArchiveView, \ ...
office_editsave.mobile = form.cleaned_data['mobile'] office_editsave.office_email1 = form.cleaned_data['office_email1'] office_editsave.office_email2 = form.cleaned_data['office_email2'] office_editsave.sch_directorate = form.cleaned_data['sch_directorate']
<|file_name|>settingsmenu.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- from gui.dwidgets import DMenu class SettingsMenu(DMenu): """docstring for SettingsMenu""" def __init__(self, parent=None): super(SettingsMenu, self).__init__(parent) self.parent = parent ...
<|file_name|>linktest_rsp_header.py<|end_file_name|><|fim▁begin|>##################################################################### # linktest_rsp_header.py # # (c) Copyright 2021, Benjamin Parzella. All rights reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of...
# # This software is distributed in the hope that it will be useful,
<|file_name|>skpicture_printer_unittest.py<|end_file_name|><|fim▁begin|># Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import shutil import tempfile from telemetry import decorators from telemetry.testin...
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2017 The Xyrosource Team. // // 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 b...
match line.into() { InternalCommand::Empty => continue, InternalCommand::Invalid => { self.error = true;
<|file_name|>dead_code.rs<|end_file_name|><|fim▁begin|>use super::merge_block::merge_linear_blocks; use super::conditional_jump_conversion::convert_jumps; use super::dead_store::remove_dead_stores; use super::super::cfg::{CFG}; use crate::common::tac_code::{Function, Operand, Statement}; use std::collections...
<|file_name|>1139f0b4c9e3_order_name_not_unique.py<|end_file_name|><|fim▁begin|>"""order name not unique Revision ID: 1139f0b4c9e3 Revises: 220436d6dcdc Create Date: 2016-05-31 08:59:21.225314 """ # revision identifiers, used by Alembic. revision = '1139f0b4c9e3' down_revision = '220436d6dcdc' from alembic import o...
<|file_name|>El-Arreglo-de-Nieves.cpp<|end_file_name|><|fim▁begin|>//https://omegaup.com/arena/problem/El-Arreglo-de-Nieves #include <cstdio> #include <iostream> #include <stack> using namespace std; struct inf { int p, v; }; int nums, totes, mint, stval; int nlist[1000005], tol[1000005], tor[1000005], seen[100...
for(int i=1; i<=nums; i++) { if(tor[i]-tol[i]+1>tor[totes]-tol[totes]+1) totes=i;
<|file_name|>RestClient.py<|end_file_name|><|fim▁begin|>""" Liana REST API client Copyright Liana Technologies Ltd 2018 """ import json import hashlib import hmac import requests import time<|fim▁hole|> class APIException(Exception): pass class RestClient: def __init__(self, user_id, api_secret, api_url, a...
<|file_name|>element_spec.ts<|end_file_name|><|fim▁begin|>/** * @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 */ import {Injector, RenderComponentType, RootRenderer, Sanit...
[[BindingType.ElementClass, 'c1'], [BindingType.ElementClass, 'c2']]),
<|file_name|>jquery.tree.metadata.js<|end_file_name|><|fim▁begin|>(function ($) { if(typeof $.metadata == "undefined") throw "jsTree metadata: jQuery metadata plugin not included."; $.extend($.tree.plugins, {<|fim▁hole|> callbacks : { check : function(rule, obj, value, tree) { var opts = $.extend(true, {}...
"metadata" : { defaults : { attribute : "data" },
<|file_name|>requirements.py<|end_file_name|><|fim▁begin|>Flask==0.10.1 Jinja2==2.7.2 MarkupSafe==0.18 Werkzeug==0.9.4 distribute==0.6.31 itsdangerous==0.23 lxml==3.3.1 pygal==1.3.1<|fim▁hole|>wsgiref==0.1.2<|fim▁end|>
<|file_name|>hello_text.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import pygame pygame.display.init() pygame.font.init() modes_list = pygame.display.list_modes() #screen = pygame.display.set_mode(modes_list[0], pygame.FULLSCREEN) # the highest resolution with fullscreen screen = pygame.display.set_mode...
while True: # main loop (event loop)
<|file_name|>solve.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
def xo(s): s = s.lower() return s.count('x') == s.count('o')
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.core.urlresolvers import reverse from django.db import models from django.db.models import Q from core.models import TimeStampedModel from accounts.models import Account class Board(models.Model): def __str__(self): return 'Board Name: ' + s...
<|file_name|>font_chooser_dialog.rs<|end_file_name|><|fim▁begin|>// This file was generated by gir (5c017c9) from gir-files (71d73f0) // DO NOT EDIT use Bin; use Container; use Dialog; use FontChooser; use Widget; use Window; use ffi; use glib::object::Downcast;<|fim▁hole|> pub struct FontChooserDialog(Object<ffi::...
use glib::object::IsA; use glib::translate::*; glib_wrapper! {
<|file_name|>jaxb_gen.py<|end_file_name|><|fim▁begin|># coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, u...
dependencies=[], excludes=gentarget.payload.excludes
<|file_name|>Form_NewProject.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'Form_NewProject.ui' # # Created: Mon Sep 9 21:29:21 2013 # by: PyQt4 UI code generator 4.8.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCor...
self.gridLayout.addWidget(self.NewProject_browser, 1, 2, 1, 1) self.checkBox_WorkdirFiles = QtGui.QCheckBox(self.groupBox) self.checkBox_WorkdirFiles.setText(QtGui.QApplication.translate("NewProject", "Save nvrams including EtherSwitch VLANs and crypto keys", None, QtGui.QApplication.UnicodeUTF8...
<|file_name|>app.e2e-spec.ts<|end_file_name|><|fim▁begin|>import { browser, element, by } from 'protractor'; describe('QuickStart E2E Tests', function () { let expectedMsg = 'Hello Ungular'; beforeEach(function () { browser.get(''); });<|fim▁hole|> });<|fim▁end|>
it('should display: ' + expectedMsg, function () { expect(element(by.css('h1')).getText()).toEqual(expectedMsg); });
<|file_name|>session.go<|end_file_name|><|fim▁begin|>package registry import ( "bytes" "crypto/sha256" // this is required for some certificates _ "crypto/sha512" "encoding/hex" "encoding/json" "fmt" "io" "io/ioutil" "net/http" "net/http/cookiejar" "net/url" "strconv" "strings" "time" "github.com/Siru...
break } res.Body.Close()
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import patterns, url from snippets.base import views urlpatterns = patterns('', url(r'^$', views.index, name='base.index'), url(r'^(?P<startpage_version>[^/]+)/(?P<name>[^/]+)/(?P<version>[^/]+)/' '(?P<appbuildid>[^/]+)...
'(?P<channel>[^/]+)/(?P<os_version>[^/]+)/(?P<distribution>[^/]+)/' '(?P<distribution_version>[^/]+)/$', views.fetch_snippets,
<|file_name|>atari_wrappers.py<|end_file_name|><|fim▁begin|>from collections import deque import gym from gym import spaces import numpy as np from ray.rllib.utils.images import rgb2gray, resize def is_atari(env): if ( hasattr(env.observation_space, "shape") and env.observation_space.shape is not...
"""
<|file_name|>align.rs<|end_file_name|><|fim▁begin|>macro_rules! expand_align { () => { s! { #[cfg_attr( any( target_pointer_width = "32", target_arch = "x86_64" ), repr(align(4)))] #[cfg_attr( ...
<|file_name|>hw5.py<|end_file_name|><|fim▁begin|>from numpy import * from matplotlib.pyplot import * import scipy.constants as sc import copy import scipy.integrate as integ # test sun/earth with hw5(1.989e30,5.972e24,149.6e6,0.0167,1000) def hw5(m1, m2, a, e, tmax, tstep=0.001, tplot=0.025, method='leapfrog'): if...
timeCounter = 0 frameCounter = 0 while timeCounter < tmax: # plot positions if tplot time has passed
<|file_name|>manage.py<|end_file_name|><|fim▁begin|><|fim▁hole|>if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ownmusicweb.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other ...
#!/usr/bin/env python import os import sys
<|file_name|>allowSyntheticDefaultImports7.js<|end_file_name|><|fim▁begin|>//// [tests/cases/compiler/allowSyntheticDefaultImports7.ts] //// //// [b.d.ts] export function foo(); export function bar(); //// [a.ts] import { default as Foo } from "./b";<|fim▁hole|>Foo.foo(); //// [a.js] System.register(["./b"]...
Foo.bar();
<|file_name|>greetings.rs<|end_file_name|><|fim▁begin|>pub fn hello() -> String { "こんにちは".to_string() //konnichiwa<|fim▁hole|>}<|fim▁end|>
<|file_name|>supplier_feature_gen.py<|end_file_name|><|fim▁begin|>import pandas as pd from datetime import date, timedelta import time import numpy as np import re import psycopg2 import ConfigParser import argparse from sqlalchemy import create_engine import random import sql parser = argparse.ArgumentParser() parse...
<|file_name|>__manifest__.py<|end_file_name|><|fim▁begin|>{ 'name': 'Product Pack POS َfor IngAdhoc', 'summary': 'Product packs on POS', 'description': """ This module is extension َfor INGADHOC's module product_pack that will Process product_pack pickings َfrom POS sales. Note: this module works with Fixed...
'data': [],
<|file_name|>feature_format.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python """ A general tool for converting data from the dictionary format to an (n x k) python list that's ready for training an sklearn algorithm n--no. of key-value pairs in dictonary k--no. of features being extracted ...
<|file_name|>spa.py<|end_file_name|><|fim▁begin|>from urllib.request import urlopen from urllib.parse import urlparse, parse_qs from socket import error as SocketError import errno from bs4 import BeautifulSoup MAX_PAGES_TO_SEARCH = 3 def parse_news(item): '''Parse news item return is a tuple(id, title, url) ...
<|file_name|>regions-dependent-autoslice.rs<|end_file_name|><|fim▁begin|>// run-pass // Test lifetimes are linked properly when we autoslice a vector. // Issue #3148. fn subslice1<'r>(v: &'r [usize]) -> &'r [usize] { v }<|fim▁hole|>} pub fn main() { let v = vec![1,2,3]; both(&v); }<|fim▁end|>
fn both<'r>(v: &'r [usize]) -> &'r [usize] { subslice1(subslice1(v))
<|file_name|>buffer.rs<|end_file_name|><|fim▁begin|>use std::cmp; use std::iter; use std::io::{self, Read, BufRead}; pub struct BufReader<R> { inner: R, buf: Vec<u8>, pos: usize, cap: usize, } const INIT_BUFFER_SIZE: usize = 4096; const MAX_BUFFER_SIZE: usize = 8192 + 4096 * 100; impl<R: Read> BufRea...
struct SlowRead(u8);
<|file_name|>test_chart_bar10.py<|end_file_name|><|fim▁begin|>############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workb...
chart.add_series({'values': '=Sheet1!$A$1:$A$5'})
<|file_name|>cleanup_site_pins.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2022 F4PGA 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 Licens...
json.dumps(output_site_pins, indent=2, sort_keys=True)
<|file_name|>IndexMergeUtil.java<|end_file_name|><|fim▁begin|>package com.karniyarik.common.util; import java.io.InputStream; import java.net.URL; import java.net.URLConnection; import org.apache.commons.lang.StringUtils; import com.karniyarik.common.KarniyarikRepository; import com.karniyarik.common.config...
}
<|file_name|>test_harmonize.py<|end_file_name|><|fim▁begin|>import pandas as pd import numpy as np import numpy.testing as npt from aneris import harmonize from aneris import utils nvals = 6 <|fim▁hole|>_df = pd.DataFrame({ 'gas': ['BC'] * nvals, 'region': ['a'] * nvals, 'units': ['Mt'] * nvals, 'sec...
<|file_name|>webglbuffer.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/. */ // https://www.khronos.org/registry/webgl/specs/latest/1....
impl WebGLBuffer { fn new_inherited(renderer: IpcSender<CanvasMsg>, id: u32) -> WebGLBuffer { WebGLBuffer {
<|file_name|>issue-79187-2.rs<|end_file_name|><|fim▁begin|>trait Foo {} impl<F> Foo for F where F: Fn(&i32) -> &i32 {} fn take_foo(_: impl Foo) {} fn main() { take_foo(|a| a); //~ ERROR mismatched types take_foo(|a: &i32| a); //~ ERROR mismatched types take_foo(|a: &i32| -> &i32 { a }); //~ ERROR mismatc...
} }
<|file_name|>results.py<|end_file_name|><|fim▁begin|># This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it wi...
terminate = False
<|file_name|>poll_module.py<|end_file_name|><|fim▁begin|>"""Poll module is ungraded xmodule used by students to to do set of polls. On the client side we show: If student does not yet anwered - Question with set of choices. If student have answered - Question with statistics for each answers. """ import cgi import js...
<|file_name|>ImageManager.py<|end_file_name|><|fim▁begin|># for localized messages from boxbranding import getBoxType, getImageType, getImageDistro, getImageVersion, getImageBuild, getImageFolder, getImageFileSystem, getBrandOEM, getMachineBrand, getMachineName, getMachineBuild, getMachineMake, getMachineMtdRoot, getMa...
autoImageManagerTimer.backupupdate() else:
<|file_name|>view_shed.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////// // // // SAGA // // // // System for A...
if( m_Method != 0 && m_MaxRadius <= 0.0 ) {
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod backend; mod builds; mod renders;<|fim▁hole|><|fim▁end|>
pub use self::backend::Backend; pub use self::builds::Builds; pub use self::renders::Renders;
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>pub mod button;<|fim▁end|>
pub mod text_box;
<|file_name|>parser.js<|end_file_name|><|fim▁begin|>var expect = require('expect.js'), parse = require('../lib/parser.js'); describe('parser:', function() { it('should parse function with no arguments.', function() { expect(parse('(someFunc)')).to.eql([{ type: 'function', name: ...
it('should ignore multi-line comments', function() {
<|file_name|>Strong.java<|end_file_name|><|fim▁begin|>/* * #%L * Diana UI Core * %% * Copyright (C) 2014 Diana UI * %% * 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:/...
*/ public class Strong extends AbstractTextWidget {
<|file_name|>test_phonon.py<|end_file_name|><|fim▁begin|>from cstool.parse_input import (read_input, check_settings, cstool_model) from cstool.phonon import (phonon_cs_fn) from cslib import (units) import numpy as np def test_phonon_cs_fn_single(): """Tests that the phonon subroutine returns a function that c...
fn = phonon_cs_fn(settings)
<|file_name|>conf.py<|end_file_name|><|fim▁begin|>import subprocess, sys def run_doxygen(folder): """Run the doxygen make command in the designated folder""" try: retcode = subprocess.call("cd %s; make" % folder, shell=True) if retcode < 0: sys.stderr.write("doxygen terminated by s...
sys.stderr.write("doxygen execution failed: %s" % e) def generate_doxygen_xml(app):
<|file_name|>main.cpp<|end_file_name|><|fim▁begin|>/* Nihonium Engine This file is licensed under the terms of the MIT License. See LICENCE.txt for the full licence. */<|fim▁hole|>#include "../windows/windows_input.h" #include "../windows/windows_audio.h" int main(int argc, char** argv) { filesystem::instance = new...
#include "../common/object.h" #include "../common/screen.h" #include "../windows/windows_filesystem.h"
<|file_name|>DA.rs<|end_file_name|><|fim▁begin|>//#![feature(macro_rules)] //use std::any::{Any, TypeId}; use std::cmp::{Ordering, PartialOrd}; use std::collections::{HashMap, HashSet}; use std::ops::{Add, Deref, Sub}; /* {start: {to: {distance, path}}} */ type Detail<Value> = (Value, Vec<&'static str>); type Matrix<...
None => {
<|file_name|>iter.rs<|end_file_name|><|fim▁begin|>use std::sync::atomic::Ordering; use ::key::{hashkey_to_string}; use ::table::*; use ::state::SlotState; pub struct CounterIter<'a> { pub slots: &'a VectorTable, pub index: usize, } impl<'a> Iterator for CounterIter<'a> { type Item = (String, usize); ...
<|file_name|>checkWindow.js<|end_file_name|><|fim▁begin|>window.ww = window.innerWidth ? window.innerWidth: $(window).width(); window.wh = window.innerHeight ? window.innerHeight: $(window).height(); $(window).on('resize', function(){<|fim▁hole|>});<|fim▁end|>
window.ww = window.innerWidth ? window.innerWidth: $(window).width(); window.wh = window.innerHeight ? window.innerHeight: $(window).height();
<|file_name|>template.ts<|end_file_name|><|fim▁begin|>export type TemplateToken = string | TemplatePlaceholder; export interface TemplatePlaceholder { before: string; after: string; name: string; } interface TokenScanner { text: string; pos: number; } const enum TemplateChars { /** `[` charact...
scanner.pos++; } } }
<|file_name|>Message.java<|end_file_name|><|fim▁begin|>/* CoAP on Moterunner Demonstration * Copyright (c) 2013-2014, SAP AG * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistribu...
} return value;
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.template.defaultfilters import slugify from mptt.models import MPTTModel, TreeForeignKey class ForumCategory(MPTTModel): parent = TreeForeignK...
if category.parent is None: break category = category.parent
<|file_name|>gba.rs<|end_file_name|><|fim▁begin|>use super::mmu; use super::cpu; #[derive(Debug)] pub struct GameBoyAdvance { pub cpu: cpu::Cpu, mmu: mmu::Mmu // audio // graphics // network<|fim▁hole|> pub fn new(biosROM: Box<[u8]>, gameROM: Box<[u8]>) -> GameBoyAdvance { GameBoyAdvance...
} impl GameBoyAdvance {
<|file_name|>quiz.py<|end_file_name|><|fim▁begin|>import sys # this allows you to read the user input from keyboard also called "stdin" import classOne # This imports all the classOne functions import classTwo # This imports all the classTwo functions import classThree # This imports all the classThree functions imp...
try:
<|file_name|>accordionDirectives.js<|end_file_name|><|fim▁begin|>/* Accordion directive */ app.directive('vmfAccordionContainer', ['$compile', function($compile) { return { restrict: 'EA', scope: { type: '@', headers: '=', accData: '=', selAcc: '=', ...
$(accordionRows).show(); }
<|file_name|>functions_dir.py<|end_file_name|><|fim▁begin|>"""Modulo que contiene la clase directorio de funciones ----------------------------------------------------------------- Compilers Design Project Tec de Monterrey Julio Cesar Aguilar Villanueva A01152537 Jose Fernando Davila Orta A00999281 -------------...
self.evaluating = True
<|file_name|>BhTree.java<|end_file_name|><|fim▁begin|>package com.cocos2dj.module.btree; import java.util.HashMap; import com.badlogic.gdx.ai.btree.BehaviorTree; import com.badlogic.gdx.ai.btree.Task; import com.badlogic.gdx.ai.btree.branch.Parallel; import com.badlogic.gdx.ai.btree.branch.Parallel.Policy; import com...
<|file_name|>user_repository.py<|end_file_name|><|fim▁begin|>import sys from starstoloves.models import User as UserModel from starstoloves import model_repository from starstoloves.lib.track import lastfm_track_repository from .user import User def from_session_key(session_key): user_model, created = UserModel.o...
user_model = model_repository.from_user(user)
<|file_name|>ui_methods.py<|end_file_name|><|fim▁begin|>def authorized_to_manage_request(_, request, current_user, pushmaster=False): if pushmaster or \ request['user'] == current_user or \ (request['watchers'] and current_user in request['watchers'].split(',')): return True return False<|...
<|file_name|>WebBackend.cpp<|end_file_name|><|fim▁begin|>// =============================== // PC-BSD REST API Server // Available under the 3-clause BSD License // Written by: Ken Moore <ken@pcbsd.org> DEC 2015 // ================================= // Note: Don't forget to run "AUTHSYSTEM->hasFullAccess(SockAuthToken...
if(act=="cleanreleases"){ ok = true;
<|file_name|>Class_5188.java<|end_file_name|><|fim▁begin|>package fr.javatronic.blog.massive.annotation1.sub1; import fr.javatronic.blog.processor.Annotation_001; <|fim▁hole|>@Annotation_001 public class Class_5188 { }<|fim▁end|>
<|file_name|>test_common.py<|end_file_name|><|fim▁begin|>########################################################################## # Copyright (C) 2009 - 2014 Huygens ING & Gerbrandy S.R.L. # # This file is part of bioport. # # bioport is free software: you can redistribute it and/or modify # it under the terms of t...
# You should have received a copy of the GNU General Public
<|file_name|>vrrp_common.py<|end_file_name|><|fim▁begin|># Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2013 Isaku Yamahata <yamahata at valinux co jp> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License....
<|file_name|>switch.py<|end_file_name|><|fim▁begin|>"""Allows to configure a switch using RPi GPIO."""<|fim▁hole|>import logging import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA from homeassistant.components import rpi_gpio from homeassistant.const import DEVICE_DEFAULT_NAME from h...
<|file_name|>normalization.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Author ------ Bo Zhang Email ----- bozhang@nao.cas.cn Created on ---------- - Sat Sep 03 12:00:00 2016 Modifications ------------- - Sat Sep 03 12:00:00 2016 Aims ---- - normalization Notes ----- This is migrated from **SLAM** ...
ind_good_init = 1. * (ivar > 0.) * (flux > 0.) else:
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
from .binary_search_tree import BinarySearchTree