prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>File.py<|end_file_name|><|fim▁begin|>#################################################################################################### # # PySpice - A Spice Package for Python # Copyright (C) 2014 Fabrice Salvaire # # This program is free software: you can redistribute it and/or modify # it under the te...
return self._path.split(os.path.sep) ##############################################
<|file_name|>sample.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python import os import json def main(): print("Sample Post Script") files = json.loads(os.environ.get('MH_FILES')) for filename in files:<|fim▁hole|> main()<|fim▁end|>
print(filename) if __name__ == "__main__":
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian // Licensed under the MIT License <LICENSE.md> extern crate build; fn main() { build::link("urlmon", true)<|fim▁hole|><|fim▁end|>
}
<|file_name|>courses.py<|end_file_name|><|fim▁begin|>from collections import defaultdict from fs.errors import ResourceNotFoundError import logging import inspect import re from path import path from django.http import Http404 from django.conf import settings from .module_render import get_module from xmodule.course_m...
Returns a list of courses available, sorted by course.number '''
<|file_name|>KeyDescriptor.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003, 2005 MySQL AB 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; version 2 of the License. This program is...
Uint32 attributeDescriptor;
<|file_name|>test_defaults.py<|end_file_name|><|fim▁begin|># Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: MIT. See LICENSE import frappe, unittest from frappe.defaults import * class TestDefaults(unittest.TestCase): def test_global(self): clear_user_default("key1") set_global_def...
clear_user_default("key5") self.assertEqual(get_user_default("key5"), None)
<|file_name|>ScrollOperatorFactoryChain.test.ts<|end_file_name|><|fim▁begin|>import ScrollOperatorFactoryChain from "../../../../src/content/operators/impls/ScrollOperatorFactoryChain"; import MockScrollPresenter from "../../mock/MockScrollPresenter"; import MockSettingRepository from "../../mock/MockSettingRepository"...
import ScrollToHomeOperator from "../../../../src/content/operators/impls/ScrollToHomeOperator";
<|file_name|>idl_schema.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # 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. import itertools import json import os.path import re import sys from jso...
parameter_comments = OrderedDict() for node in self.node.GetChildren():
<|file_name|>doc.go<|end_file_name|><|fim▁begin|>// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. // Package glacier provides the client and types for making API // requests to Amazon Glacier. // // Amazon Glacier is a storage solution for "cold data." // // Amazon Glacier is an extremely low-cost ...
// burdens of operating and scaling storage to AWS, so they don't have to worry // about capacity planning, hardware provisioning, data replication, hardware // failure and recovery, or time-consuming hardware migrations. //
<|file_name|>store.rs<|end_file_name|><|fim▁begin|>/* * Copyright (c) Meta Platforms, Inc. and affiliates.<|fim▁hole|> * GNU General Public License version 2. */ use crate::ErrorKind; use async_trait::async_trait; use bookmarks::BookmarkName; use bytes::Bytes; use changeset_info::ChangesetInfo; use context::CoreCon...
* * This software may be used and distributed according to the terms of the
<|file_name|>knn.py<|end_file_name|><|fim▁begin|>from ..dataset.arff import ArffFile from scipy.spatial import kdtree, distance from ..representations.intervalsProbability import IntervalsProbability import numpy as np from math import exp class IPKNN(object): """IPKNN implements a K-nearest neighbour method using...
"""evaluate the instances and return a list of probability intervals
<|file_name|>globalize.culture.id.js<|end_file_name|><|fim▁begin|>/* * Globalize Culture id * * http://github.com/jquery/globalize * * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * This file was generated by the Gl...
}
<|file_name|>test_bigtable.py<|end_file_name|><|fim▁begin|># # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the...
<|file_name|>fragments.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
///
<|file_name|>150_srtp_1_1.py<|end_file_name|><|fim▁begin|># $Id: 150_srtp_1_1.py 369517 2012-07-01 17:28:57Z file $<|fim▁hole|># from inc_cfg import * test_param = TestParam( "Callee=optional SRTP, caller=optional SRTP", [ InstanceParam("callee", "--null-audio --use-srtp=1 --srtp-secure=0 --max-calls=1"), In...
<|file_name|>SamplestackAuthenticationEntryPoint.java<|end_file_name|><|fim▁begin|><|fim▁hole|> * Copyright 2012-2014 MarkLogic Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at...
/*
<|file_name|>task.py<|end_file_name|><|fim▁begin|># (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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 ...
from ansible.playbook.task_include import TaskInclude if self._parent:
<|file_name|>reactive_socket_recvmsg_op.hpp<|end_file_name|><|fim▁begin|>// // detail/reactive_socket_recvmsg_op.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2013 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanyi...
static bool do_perform(reactor_op* base)
<|file_name|>hrtb_for_lifetimes.rs<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
fn foo<'a, 'b>() where for<'c> 'a : 'b {}
<|file_name|>warnings.py<|end_file_name|><|fim▁begin|>"""Python part of the warnings subsystem.""" # Note: function level imports should *not* be used # in this module as it may cause import lock deadlock. # See bug 683658. import linecache import sys __all__ = ["warn", "showwarning", "formatwarning", "filterwarnings...
setattr(self, attr, local_values[attr]) self._category_name = category.__name__ if category else None
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-06 11:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration):<|fim▁hole|> ] operations = [ migrations.CreateMode...
initial = True dependencies = [
<|file_name|>post-migration.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- <|fim▁hole|> def migrate(cr, version): if not version: return cr.execute('SELECT 1 ' 'FROM pg_class c,pg_attribute a ' 'WHERE c.relname=%s ' 'AND c.oid=a.attrelid ' ...
__name__ = "Remove useless IDENTIFIER column in table MEMBERSHIP_REQUEST"
<|file_name|>form-errors.module.ts<|end_file_name|><|fim▁begin|>import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormErrorsComponent } from './form-errors/form-errors.component'; import { PasswordCharacterMessageBuilderPipe } from './form-errors/password-character-messa...
], declarations: [
<|file_name|>tests.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from typing import Text from zerver.lib.test_classes import WebhookTestCase class HelloSignHookTests(WebhookTestCase): STREAM_NAME = 'hellosign' URL_TEMPLATE = "/api/v1/external/hellosign?stream={stream}&api_key={api_key}" FIXTURE_D...
def test_signatures_message(self): # type: () -> None expected_subject = "NDA with Acme Co."
<|file_name|>stubs_noasm.go<|end_file_name|><|fim▁begin|>// Copyright ©2016 The Gonum Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build !amd64 noasm gccgo safe package f64 import "math" // L1Norm is // for _, v := range x...
return dst }
<|file_name|>public-api.d.ts<|end_file_name|><|fim▁begin|>/** * @license * Copyright Google LLC All Rights Reserved.<|fim▁hole|> * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ export * from './checkbox-harness'; export * from...
<|file_name|>suite.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python """ ``climactic.suite`` ------------------- .. autoclass:: ClimacticTestSuite """ import logging import unittest from pathlib import Path from climactic.case import ClimacticTestCase logger = logging.getLogger(__name__) class ClimacticTestS...
<|file_name|>Grating.py<|end_file_name|><|fim▁begin|>class Grating: """A class that describing gratings. Sigma should be in lines/mm and the units of the dimensions should be mm. """ def __init__(self, name='', spacing=600, order=1, height=100, width=100, thickness=100, blaze=0, t...
self.blaze = blaze
<|file_name|>geo.py<|end_file_name|><|fim▁begin|>"""geo.py: Implementation of class AbstractTwitterGeoCommand and its subclasses. """ from argparse import ArgumentParser from . import (AbstractTwitterCommand, call_decorator) from ..parsers import (filter_args, cache) # GET geo/id/:place_id # POST geo/place DEPRECATE...
<|file_name|>l-te_id.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="id"> <context> <name>ColorDialog</name> <message> <location filename="../ColorDialog.ui" line="14"/> <source>Customize Colors</source> <translation>Atur W...
<translation>Buka Berkas</translation> </message> <message>
<|file_name|>ConflictException.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2010-2101 Alibaba Group Holding Limited. * * 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 * * htt...
private static final long serialVersionUID = -7288830284122672209L; private String errorCode;
<|file_name|>sched.rs<|end_file_name|><|fim▁begin|>use std::mem; use libc::{c_int, c_uint, c_void, c_ulong, pid_t}; use errno::Errno; use {Result, Error}; pub type CloneFlags = c_uint; pub static CLONE_VM: CloneFlags = 0x00000100; pub static CLONE_FS: CloneFlags = 0x00000200; pub static CLONE_...
if res != 0 { Err(Error::Sys(Errno::last())) } else {
<|file_name|>SessionAlarmReceiver.java<|end_file_name|><|fim▁begin|>/* * Copyright 2012 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/licen...
<|file_name|>PerunFormItem.java<|end_file_name|><|fim▁begin|>package cz.metacentrum.perun.wui.registrar.widgets.items; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; import cz.metacentrum.perun.wui.json.Events; import cz.metacentrum.perun.wui.model.beans.ApplicationFormItemData; im...
import cz.metacentrum.perun.wui.registrar.widgets.items.validators.PerunFormItemValidator;
<|file_name|>list.component.ts<|end_file_name|><|fim▁begin|>import { Component, Input } from '@angular/core'; import { ListItem } from './listItem'; import './list.component.scss'; @Component({ selector: 'list', templateUrl: './list.component.html' }) export class ListComponent { @Input() items: Array<Lis...
selectedItem: ListItem; constructor() {
<|file_name|>test_hsmm_wrappers.py<|end_file_name|><|fim▁begin|>import unittest import numpy as np from ..emissions import GaussianEmissions, MultinomialEmissions from ..hsmm import GaussianHSMM, MultinomialHSMM class TestHSMMWrappers(unittest.TestCase): def setUp(self): # Exact values don't matter ...
hsmm = GaussianHSMM(means, scales, self.durations, self.tmat)
<|file_name|>limit.py<|end_file_name|><|fim▁begin|>from .util import bucket as tokenbucket from . import wrappers class Limit(object): def __init__(self, command_limiting_initial_tokens, command_limiting_message_cost, command_limiting_restore_rate, override, permissions): """limit(20, 4, 0.13, ["admin"], ...
<|file_name|>simd.rs<|end_file_name|><|fim▁begin|>// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licen...
// check:$7 = {54, 55, 56, 57} // debugger:print/d u64x2 // check:$8 = {58, 59}
<|file_name|>base_test.go<|end_file_name|><|fim▁begin|>package utp import ( "bytes" "net" "sync" "testing" "time" ) func TestSharedConnRecvPacket(t *testing.T) { addr, err := ResolveAddr("utp", "127.0.0.1:0") if err != nil { t.Fatal(err) } c, err := getSharedBaseConn("utp", addr) if err != nil { t.Fata...
if err != nil {
<|file_name|>hg-rheads.py<|end_file_name|><|fim▁begin|>import sys from mercurial import hg, node, ui <|fim▁hole|> """print (possibly remote) heads Prints a series of lines consisting of hashes and branch names. Specify a local or remote repository, defaulting to the configured remote. """ repo ...
def main():
<|file_name|>NumericBookmarkSetTest.py<|end_file_name|><|fim▁begin|>########################################################################## # # Copyright (c) 2019, Cinesite VFX Ltd. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided t...
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.conf.urls import include, url<|fim▁hole|>from wagtail.wagtailcore import urls as wagtail_urls from privagal.core import urls as privagalcore_urls urlpatterns ...
from django.views.i18n import javascript_catalog from wagtail.wagtailadmin import urls as wagtailadmin_urls
<|file_name|>dimensions.js<|end_file_name|><|fim▁begin|>/** * Copyright 2020 The AMP HTML Authors. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://...
if (overlaps(axis, children[prevIndex], pos)) {
<|file_name|>test_zlib.py<|end_file_name|><|fim▁begin|>import zlib from test_support import TestFailed import sys import imp try: t = imp.find_module('test_zlib') file = t[0] except ImportError: file = open(__file__) buf = file.read() * 8 file.close() # test the checksums (hex so the test doesn't break on...
<|file_name|>point.js<|end_file_name|><|fim▁begin|>import F2 from '@antv/f2'; fetch('https://gw.alipayobjects.com/os/antfincdn/N81gEpw2Ef/income.json') .then(res => res.json()) .then(data => { const chart = new F2.Chart({ id: 'container', pixelRatio: window.devicePixelRatio }); chart.source...
offsetX: 10,
<|file_name|>local_resize_img.js<|end_file_name|><|fim▁begin|>/** * local_resize_img * by hefish@gmail.com * 2015-04-08 */ var MAX_SIZE = 600; var LIT_SIZE = 80; $.fn.local_resize_img = function(obj) { this.on('change', function() { var file_path = this.files[0]; load_image(file_path); ...
} var base64 = canvas.toDataURL("image/jpeg", 0.8);
<|file_name|>list_organism_data.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import json import argparse from webapollo import WAAuth, WebApolloInstance, AssertUser, accessible_organisms if __name__ == "__main__": parser = argparse.ArgumentParser( description="List all organisms available in an Ap...
parser.add_argument("email", help="User Email")
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/LI...
<|file_name|>MainActivity.java<|end_file_name|><|fim▁begin|>/* * MainActivity.java * * Copyright (C) 2013 6 Wunderkinder GmbH. * * @author Jose L Ugia - @Jl_Ugia * @author Antonio Consuegra - @aconsuegra * @author Cesar Valiente - @CesarValiente * @author Benedikt Lehnert - @blehnert * @a...
mSlidingLayer.closeLayer(true);
<|file_name|>rand.rs<|end_file_name|><|fim▁begin|>//! Utilities for generating random values //! //! This module provides a much, much simpler version of the very robust [`rand`] crate. The //! purpose of this is to give people teaching/learning Rust an easier target for doing interesting //! things with random numbers...
/// RandomRange::random_range(low, high) /// } /// }
<|file_name|>Element_ol.java<|end_file_name|><|fim▁begin|>package tmp.generated_people; import cide.gast.*; import cide.gparser.*; <|fim▁hole|> public abstract class Element_ol extends GenASTNode { protected Element_ol(Property[] p, Token firstToken, Token lastToken) { super(p, firstToken, lastToken); } protect...
import cide.greferences.*; import java.util.*;
<|file_name|>main.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import time from os import listdir from os.path import join from Queue import Queue, Empty from select import select from threading import Thread, Lock fr...
elif event.code == 42 or event.code == 54: # SHIFT device.shift = True elif event.code == 28: # ENTER, end of barcode
<|file_name|>testmodel.py<|end_file_name|><|fim▁begin|>from ticdat import TicDatFactory, Model, utils from ticdat.model import cplex, gurobi, xpress from ticdat.testing.ticdattestutils import dietSolver, nearlySame, netflowSolver from ticdat.testing.ticdattestutils import fail_to_debugger, flagged_as_run_alone import u...
<|file_name|>bmp_pixmap_fill.cpp<|end_file_name|><|fim▁begin|>/* * ===================================================================================== * * Filename: bmp_pixmap_fill.cpp * * Description: Fill the whole bmp with one color. * * Version: 1.0 * Created: 2009年04月11日 16时45分...
* Method: fill * Description: Fill the whole bmp with one color. *--------------------------------------------------------------------------------------
<|file_name|>RealisticBiomeAPLAdirondackBeach.java<|end_file_name|><|fim▁begin|>package appalachia.rtg.world.biome.realistic.appalachia.adirondack; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.world.biom...
this.getConfig().addProperty(this.getConfig().SURFACE_MIX_BLOCK).set("");
<|file_name|>VRConstructionKit.cpp<|end_file_name|><|fim▁begin|>#include "VRConstructionKit.h" #include "selection/VRSelector.h" #include "core/objects/geometry/VRGeometry.h" #include "core/objects/material/VRMaterial.h" #include "core/utils/toString.h" #include "core/utils/VRFunction.h" #include "core/setup/devices/V...
}
<|file_name|>第四集.py<|end_file_name|><|fim▁begin|>#第四集(包含部分文件3.py和部分第二集) # courses=['History','Math','Physics','Compsci']#此行代码在Mutable之前都要打开 # print(courses) # courses.append('Art')#在最后添加一个元素 # courses.insert(0,'English')#在0的位置添加一个元素 # courses_2=['Chinese','Education'] # courses.insert(1,courses_2)#看看这条代码与下面两条代码有什么不同 ...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! //! # Conrod //! //! An easy-to-use, immediate-mode, 2D GUI library featuring a range of useful widgets. //! #![deny(missing_copy_implementations)] #![warn(missing_docs)] #[macro_use] extern crate bitflags; extern crate clock_ticks; extern crate elmesque; extern cr...
<|file_name|>macros.rs<|end_file_name|><|fim▁begin|>#[macro_escape]; // A nice macro to define structs that are built from json objects macro_rules! from_json( ($name:ident, $($field:ident), +) => (<|fim▁hole|> Ok(v) => v, Err(e) => return Err(e) }...
impl ::util::json::FromJson for $name { fn from_json(json: &::extra::json::Json) -> Result<$name, ::util::json::ValueError> { Ok($name { $($field: match json.value(&stringify!($field).to_owned()).convert() {
<|file_name|>tasks.py<|end_file_name|><|fim▁begin|>from celery.task import Task import requests <|fim▁hole|> def run(self, url, data): requests.post(url + "/", data=data)<|fim▁end|>
class StracksFlushTask(Task):
<|file_name|>seq.rs<|end_file_name|><|fim▁begin|>use crate::seq::ExpectedRecord; use seq_io::Position; pub const FASTQ: &[u8] = b" @id desc ATGC + id IIII\r @id2 CGAT\r + IHII\r @id3 \r + id3 "; lazy_static! { pub static ref FASTQ_EXPECTED: [ExpectedRecord; 3] = [ ExpectedRecord { id: Ok("...
}
<|file_name|>translate.py<|end_file_name|><|fim▁begin|>############################################################################## #<|fim▁hole|># Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIME...
# Copyright (c) 2001, 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License,
<|file_name|>main.ts<|end_file_name|><|fim▁begin|>import 'reflect-metadata';<|fim▁hole|> import {App} from './app/app' // font faces and icons available site wide // .styl files will use the font-faces // .html file will use the icons // webpack will url-inline them into bundle.js import './assets/fonts/font_faces.styl...
// import {enableProdMode} from 'angular2/core'; import {bootstrap} from 'angular2/platform/browser'; import {ROUTER_PROVIDERS} from 'angular2/router';
<|file_name|>message.component.ts<|end_file_name|><|fim▁begin|>import { ChatMessage } from '../../shared/models/chat-message'; import { Component, ChangeDetectionStrategy, OnInit, Input } from '@angular/core'; import { UserService } from '../../shared/services/user.service'; @Component({ selector: 'ddo-message', t...
@Input() message: ChatMessage; constructor(public userService: UserService) { }
<|file_name|>Back-End.py<|end_file_name|><|fim▁begin|>from flask import Flask, render_template, request, redirect, url_for, flash, jsonify, Response from celery import Celery from werkzeug.utils import secure_filename from VideoPlayer import VideoPlayer from subprocess import Popen import os app = Flask(__name__) loca...
<|file_name|>extract-fileviewer-mappings.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Update plural forms expressions from the data collected by Unicode Consortium # (see http://www.unicode.org/cldr/charts/supplemental/language_plural_rules.html), # but from a JSON version by Transifex folks import os.pat...
output,
<|file_name|>DirectInputController.cpp<|end_file_name|><|fim▁begin|>#include "nilConfig.h" #include "nil.h" #include "nilUtil.h" #include "nilWindows.h" #ifdef NIL_PLATFORM_WINDOWS #define NIL_FIELD_OFFSET(type, field) ((LONG_PTR)&(((type*)0)->field)) #define NIL_DIJ2OFS_BUTTON(n) (NIL_FIELD_OFFSET(DIJOYSTATE2, rg...
{ case 0: state_.povs[pov].direction = POV::North; break;
<|file_name|>independentfeedrequest.cpp<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 Stuart Howarth <showarth@marxoft.co.uk> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as * published by the Free Software Foundati...
m_buffer.close();
<|file_name|>PhoneStatus.java<|end_file_name|><|fim▁begin|>// -*- mode: java; c-basic-offset: 2; -*- // Copyright 2009-2011 Google, All Rights reserved // Copyright 2011-2012 MIT, All rights reserved // Released under the MIT License https://raw.github.com/mit-cml/app-inventor/master/mitlicense.txt package com.google....
int s_ipAddress= ip.ipAddress; String ipAddress; if (isConnected()) ipAddress = intToIp(s_ipAddress);
<|file_name|>coder.go<|end_file_name|><|fim▁begin|>// Licensed to the Apache Software Foundation (ASF) under one or more // contributor license agreements. See the NOTICE file distributed with // this work for additional information regarding copyright ownership. // The ASF licenses this file to You under the Apache L...
func UnmarshalCoders(ids []string, m map[string]*pb.Coder) ([]*coder.Coder, error) {
<|file_name|>abstract_walker.ts<|end_file_name|><|fim▁begin|>// // Copyright 2015-21 Volker Sorge // // 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...
import { RebuildStree } from './rebuild_stree';
<|file_name|>parser_test.go<|end_file_name|><|fim▁begin|>package lib import ( "reflect" "testing" ) func TestStripComments(t *testing.T) { tests := []struct { // Test description. name string // Parameters. s string // Expected results. want string }{ { name: "String without comment", s: "a...
// Parameters. keyword string line string
<|file_name|>pysteg.py<|end_file_name|><|fim▁begin|>import sys import os print "-------------------------" print "StegHide Options"<|fim▁hole|>print "" print "To extract embedded data from stg.jpg: steghide extract -sf stg.jpg" cmd1 = os.system ("xterm ")<|fim▁end|>
print "-------------------------" print "Usage Example :" print "" print"To embed emb.txt in cvr.jpg: steghide embed -cf cvr.jpg -ef emb.txt"
<|file_name|>jsonschema.py<|end_file_name|><|fim▁begin|>__all__ = [ 'json_schema', ] import lollipop.types as lt import lollipop.validators as lv from lollipop.utils import identity from collections import OrderedDict from .compat import iteritems def find_validators(schema, validator_type): return [valida...
) if properties: js['properties'] = properties required = [
<|file_name|>asdriver_nofil.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Driver for ecoli.py import os, re, time, subprocess iterModDiv = 1 dirPathList = ["/home/tomas/documenten/modelling/diatomas_symlink/results/as_low_bridging_seed2"] for d in dirPathList: print(time.strftime('...
continue fAbs = dAbs + "/" + f
<|file_name|>categories.ts<|end_file_name|><|fim▁begin|>export class Categories { getCategoriesSaved() { return [ {text:"All Categories", checked:false, background:"5px solid #009688"}, {text:"Flat", checked:false, background:"5px solid #00BCD4"}, {text:"Leisure", checked:false, background:"5px solid #448A...
this.checked = checked; this.color = color;
<|file_name|>sms.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import import logging import requests from six.moves.urllib.parse import quote from sentry import options logger = logging.getLogger(__name__) def sms_available(): return bool(options.get('sms.twilio-account')) <|fim▁hole|> ...
def send_sms(body, to, from_=None):
<|file_name|>varinput.js<|end_file_name|><|fim▁begin|>// varinput.js // Javascript routines to handle variable rendering // $Id: //dev/EPS/js/varinput.js#48 $ function inspect() { form1.xml.value = '1'; SubmitFormSpecial('table'); } // global variable used for items that submit on change or selection var autosubm...
var autopublish = ''; var workspaceByPass = false;
<|file_name|>texture_expand_lfb_j2k.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: iso-8859-15 -*- import sys import math from subprocess import check_call from subprocess import CalledProcessError from MCTF_parser import MCTF_parser file = "" rate = 0.0 pictures = 33 pixels_in_x = 352 pixels_in_y = ...
sys.exit(-1)
<|file_name|>serve.ts<|end_file_name|><|fim▁begin|>import * as denodeify from 'denodeify'; const assign = require('lodash/assign'); const SilentError = require('silent-error'); const PortFinder = require('portfinder'); const Command = require('../ember-cli/lib/models/command'); import ServeWebpackTask from '../tasks/se...
availableOptions: [
<|file_name|>test_command.py<|end_file_name|><|fim▁begin|>import unittest import subprocess import os import platform import shutil from os.path import join, normpath, abspath, split import sys env_path = "/".join(os.path.dirname(os.path.abspath(__file__)).split('/')[:-1]) sys.path.insert(0, env_path) import littlech...
self.assertTrue(expected in error, resp + error) resp, error = self.execute([fix, 'node:testnode1', 'plugin:bad']) expected = "Found plugin 'bad', but it seems to have a syntax error:"
<|file_name|>event_handler.py<|end_file_name|><|fim▁begin|># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the A...
<|file_name|>regions-bounds.rs<|end_file_name|><|fim▁begin|>// Copyright 2012 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/...
fn a_fn3<'a,'b>(e: a_class<'a>) -> a_class<'b> { return e; //~ ERROR mismatched types }
<|file_name|>source_base_interface.py<|end_file_name|><|fim▁begin|># # Base object of all payload sources. # # Copyright (C) 2019 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public Lic...
# Public License for more details. You should have received a copy of the # GNU General Public License along with this program; if not, write to the
<|file_name|>0009_auto_20191023_0906.py<|end_file_name|><|fim▁begin|># Generated by Django 2.2.6 on 2019-10-23 09:06 from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import olympia.amo.models class Migration(migrations.Migration): dependencies = [ ('...
]
<|file_name|>cxx_regression_2.cpp<|end_file_name|><|fim▁begin|>/**************************************************************************** ** ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of Qt Creator. ** ** Commercial License Usage *...
** a written agreement between you and Digia. For licensing terms and
<|file_name|>fullblocks_test.go<|end_file_name|><|fim▁begin|>// Copyright (c) 2016 The btcsuite developers // Copyright (c) 2016-2020 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package blockchain_test import ( "bytes" "context" "errors" ...
<|file_name|>git.py<|end_file_name|><|fim▁begin|># cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License ...
try: shell.call('%s add --force -A .' % GIT, git_dir, env=CLEAN_ENV)
<|file_name|>set_union.rs<|end_file_name|><|fim▁begin|>use crate::{cmd, Command}; use ql2::term::TermType; pub trait Arg { fn arg(self) -> cmd::Arg<()>; } <|fim▁hole|>}<|fim▁end|>
impl Arg for Command { fn arg(self) -> cmd::Arg<()> { Self::new(TermType::SetUnion).with_arg(self).into_arg() }
<|file_name|>install-test.js<|end_file_name|><|fim▁begin|>// @flow (require('../../lib/git'): any).rebaseRepoMaster = jest.fn(); import { _clearCustomCacheDir as clearCustomCacheDir, _setCustomCacheDir as setCustomCacheDir, } from '../../lib/cacheRepoUtils'; import {copyDir, mkdirp} from '../../lib/fileUtils'; ...
path.join( FLOWPROJ_DIR, 'src',
<|file_name|>f06_classes.py<|end_file_name|><|fim▁begin|>from six import iteritems class MaxDisplacement(object): def __init__(self, data): self.translations = {} self.rotations = {} for line in data: sid = line[0] self.translations[sid] = line[1:4] ...
<|file_name|>ExceptionZhengwuDingdingMessage.java<|end_file_name|><|fim▁begin|>package com.x.message.assemble.communicate.jaxrs.connector; import com.x.base.core.project.exception.PromptException;<|fim▁hole|> class ExceptionZhengwuDingdingMessage extends PromptException { private static final long serialVersionUID =...
<|file_name|>admin.py<|end_file_name|><|fim▁begin|>from django.contrib import admin from courses.models import Course, Instructor, Page, Enrollment class CourseAdmin(admin.ModelAdmin): list_display = ['title', 'instructor', 'language', 'popularity', 'is_public', 'deleted'] prepopulated_fields = { 'slug...
if ordering:
<|file_name|>test_gui.py<|end_file_name|><|fim▁begin|>from __future__ import division, print_function, absolute_import import unittest from .. import common import tempfile import os import platform import numpy as num from pyrocko import util, model from pyrocko.pile import make_pile from pyrocko import config, trac...
'''
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2014, Rackspace, US, 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<|fim▁hole|># # http://www.apache.org/licenses/LI...
<|file_name|>test_ssh.py<|end_file_name|><|fim▁begin|># Copyright (c) 2012 Spotify AB # # 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...
context = RemoteContext( "some_host",
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-27 19:05 from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone clas...
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')), ('user_permissions', models.ManyToMan...
<|file_name|>layout_task.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/. */ //! The layout task. Performs layout on the DOM, builds d...
}
<|file_name|>standard.py<|end_file_name|><|fim▁begin|>from __future__ import division, absolute_import, unicode_literals import time from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from qtpy.QtWidgets import QDockWidget from .. impor...
class MainWindowMixin(WidgetMixin):
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.exceptions import ValidationError from django.test import TestCase from models import Student, StudyGroup, Task, Lab, Subject, GroupSubject class PortalTest(TestCase): def set...
task = Task(student=self.student1, lab=self.lab1) task.clean() task.save() except ValidationError: