prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>Forms.py<|end_file_name|><|fim▁begin|>from dolfin import * class Forms(object): """docstring for Forms""" def __init__(self, mesh, W,F_M,F_NS, u_k,b_k,params,options={}): assert type(options) is dict, 'options must be a dictionary object' self.mesh = mesh self.W = W ...
def printW(self, W): print W
<|file_name|>get_roles.js<|end_file_name|><|fim▁begin|>{ "status": { "error": false, "code": 200, "type": "success",<|fim▁hole|> "pagination": { "before_cursor": null, "after_cursor": null, "previous_link": null, "next_link": null }, "data": [ ...
"message": "Success" },
<|file_name|>TwitterSearchEndpoint.java<|end_file_name|><|fim▁begin|>/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to ...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>""" Copyright (C) 2009,2014 Andreas Engelbredt Dalsgaard <andreas.dalsgaard@gmail.com> Martin Toft <mt@martintoft.dk> Mads Chr. Olesen <mchro@cs.aau.dk> This program is free software: you can redistribute it and/or modify it under the terms of ...
while len(cur.children) == 2 and \
<|file_name|>config.js<|end_file_name|><|fim▁begin|>var _ = require('lodash'); var localConfig = {}; try { localConfig = require('./config.local'); } catch (e) { console.log(e.code === 'MODULE_NOT_FOUND'); if (e.code !== 'MODULE_NOT_FOUND' || e.message.indexOf('config.local') < 0) { //config.local m...
// }, ], frontend: { path: path.join(__dirname, 'public')
<|file_name|>layout.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ This scripts sets an initial layout for the ProEMOnline software. It uses the PyQtGraph dockarea system and was designed from the dockarea.py example.<|fim▁hole|>Contains: Left column: Observing Log Center column: Plots Right column: Image...
<|file_name|>sigar.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import datetime import logging import os from urllib.parse import urljoin from utils import utils, inspector # https://www.sigar.mil/ archive = 2008 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's ...
title = report_id
<|file_name|>ffi.rs<|end_file_name|><|fim▁begin|>#![allow(dead_code)] #![allow(non_snake_case)] #![allow(non_camel_case_types)] #![allow(non_upper_case_globals)] pub use self::glx::types::*; use libc; /// GLX bindings pub mod glx { include!(concat!(env!("OUT_DIR"), "/glx_bindings.rs")); } /// Functions that are ...
pub const XK_rightsinglequotemark: libc::c_uint = 0xad1;
<|file_name|>check-migration-strategies.js<|end_file_name|><|fim▁begin|>import { newRxTypeError, newRxError } from '../../rx-error'; import { getPreviousVersions } from '../../rx-schema'; /** * checks if the migrationStrategies are ok, throws if not * @throws {Error|TypeError} if not ok */ export function checkMigr...
previousVersions.map(function (vNr) { return { v: vNr,
<|file_name|>async-unsafe-fn-call-in-safe.rs<|end_file_name|><|fim▁begin|>// edition:2018 // revisions: mir thir // [thir]compile-flags: -Z thir-unsafeck struct S; <|fim▁hole|>async unsafe fn f() {} async fn g() { S::f(); //~ ERROR call to unsafe function is unsafe f(); //~ ERROR call to unsafe function is un...
impl S { async unsafe fn f() {} }
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! Raw bindings to C functions of the Fast Artificial Neural Network library //! //! //! # Creation/Execution //! //! The FANN library is designed to be very easy to use. //! A feedforward ANN can be created by a simple `fann_create_standard` function, while //! other A...
/// # Parameters ///
<|file_name|>WebForm.cpp<|end_file_name|><|fim▁begin|>#include "WebForm.h" WebForm::WebForm(void) :__pWeb(null), __phonegapCommand(null) { geolocation = null; device = null; accel = null; network = null; console = null; compass = null; contacts = null; } WebForm::~WebForm(void) { } bool WebForm::Initialize()...
}
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. __all__ = ['pdb'] __version__ = '0.9.0' import sys # backwards compatibility to suppor...
sys.modules['fairseq.meters'] = meters sys.modules['fairseq.metrics'] = metrics sys.modules['fairseq.progress_bar'] = progress_bar
<|file_name|>Notebook.cpp<|end_file_name|><|fim▁begin|>#include <SFGUI/Engines/BREW.hpp> #include <SFGUI/Context.hpp> #include <SFGUI/Renderer.hpp> #include <SFGUI/Notebook.hpp> namespace sfg { namespace eng { RenderQueue* BREW::CreateNotebookDrawable( SharedPtr<const Notebook> notebook ) const { sf::Color border_co...
sf::Color scroll_button_prelight( GetProperty<sf::Color>( "ScrollButtonPrelightColor", notebook ) );
<|file_name|>model.go<|end_file_name|><|fim▁begin|>// Copyright 2020 Istio Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // ...
Name string // Port number where the service can be reached. Does not necessarily // map to the corresponding port numbers for the instances behind the
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from colorama import Fore from rtxlib import info, error, debug from rtxlib.preprocessors.SparkPreProcessor import SparkPreProcessor def init_pre_processors(wf): """ we look into the workflows definition and run the required preprocessors """ if hasattr(w...
except AttributeError: pass
<|file_name|>base.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 ...
self._loader = loader else: self._loader = DataLoader()
<|file_name|>LoginActivity.java<|end_file_name|><|fim▁begin|>package com.ke2g.cued_recall; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import...
Toast.makeText(this, "Correct username and password", Toast.LENGTH_LONG).show(); } else {
<|file_name|>sorting.js<|end_file_name|><|fim▁begin|>const simple_sort = (key, a, b) => { if (a[key] < b[key]) return -1 if (a[key] > b[key]) return 1 return 0 } const name_sort = (a, b) => simple_sort('name', a, b) const skill_sort = (a, b) => simple_sort('skill', a, b) const speed_sort = (a, b) => simple_sort(...
speed_sort }
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import MapMesh from './MapMesh'; import { MapMeshOptions } from './MapMesh'; import DefaultMapViewController from "./DefaultMapViewController" import Grid from './Grid'; import {TileData} from "./interfaces" export { MapMesh, MapMeshOptions, Grid,<|fim▁hol...
DefaultMapViewController,
<|file_name|>capture-analysis-2.rs<|end_file_name|><|fim▁begin|>// edition:2021 #![feature(rustc_attrs)] #[derive(Debug)] struct Point { x: String, y: i32, } fn main() { let mut p = Point { x: String::new(), y: 10 }; let c = #[rustc_capture_analysis] //~^ ERROR: attributes on expressions are exp...
println!("{:?}", p); //~^ NOTE: Capturing p[] -> ImmBorrow //~| NOTE: Min Capture p[] -> ByValue //~| NOTE: p[] used here
<|file_name|>test_cargo_bench.rs<|end_file_name|><|fim▁begin|>use std::old_path; use std::str; use support::{project, execs, basic_bin_manifest, basic_lib_manifest}; use support::{COMPILING, cargo_dir, FRESH, RUNNING}; use support::paths::PathExt; use hamcrest::{assert_that, existing_file}; use cargo::util::process; ...
<|file_name|>lineroot.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it un...
<|file_name|>appsync.go<|end_file_name|><|fim▁begin|>package events import "encoding/json" // AppSyncResolverTemplate represents the requests from AppSync to Lambda type AppSyncResolverTemplate struct { Version string `json:"version"` Operation AppSyncOperation `json:"operation"` Payload json.RawMess...
// AppSyncIAMIdentity contains information about the caller authed via IAM. type AppSyncIAMIdentity struct { AccountID string `json:"accountId"` CognitoIdentityPoolID string `json:"cognitoIdentityPoolId"`
<|file_name|>gzip.rs<|end_file_name|><|fim▁begin|>extern crate extra; extern crate libflate; use extra::option::OptionalExt; use libflate::gzip::Encoder; use std::io::Write; use std::{env, fs, io, process}; fn main() { let mut stderr = io::stderr(); let mut keep = false; let mut files = Vec::new(); f...
eprintln!("gzip: no files provided"); process::exit(1);
<|file_name|>scrapertools.py<|end_file_name|><|fim▁begin|>#------------------------------------------------------------ # -*- coding: utf-8 -*- #------------------------------------------------------------ # Download Tools # Based on the code from VideoMonkey XBMC Plugin #----------------------------------------------...
fin = time.clock() logger.info("[scrapertools.py] 'Gzipped data' descomprimido en %d segundos " % (fin-inicio+1)) return data1
<|file_name|>settings.js<|end_file_name|><|fim▁begin|>module.exports = { token: 'TELEGRAM_BOT_TOKEN', polling: { timeout: 3,<|fim▁hole|><|fim▁end|>
limit: 100 } };
<|file_name|>state.ts<|end_file_name|><|fim▁begin|>import { Derivable, DerivableAtom, ErrorWrapper, ReactorOptions, State, unresolved } from '@politie/sherlock'; export type StateObject<V> = { value: V, errored: false, resolved: true } | { error: any, errored: true, resolved: true } | { errored: false, res...
export function materialize<V>(derivable: Derivable<V>): Derivable<StateObject<V>> { return derivable.mapState(toStateObject); }
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
__package__ = 'archivebox.core'
<|file_name|>PencilCodeEditor.ts<|end_file_name|><|fim▁begin|>// Copyright 2019 The Oppia 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://w...
<|file_name|>util.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals import numpy as np import param from ..core import (HoloMap, DynamicMap, CompositeOverlay, Layout, GridSpace, NdLayout, Store) from ..core.util import (match_spec, is_number, wrap_tuple, basestring, ...
if dim in ranges: main_range = ranges[dim]
<|file_name|>highlight.js<|end_file_name|><|fim▁begin|>/* Syntax highlighting with language autodetection. http://softwaremaniacs.org/soft/highlight/ */ var DEFAULT_LANGUAGES = ['python', 'ruby', 'perl', 'php', 'css', 'xml', 'html', 'django', 'javascript', 'java', 'cpp', 'sql', 'smalltalk']; var ALL_LANGUAGES = (DEFAU...
<|file_name|>event.go<|end_file_name|><|fim▁begin|>package instana import ( "time" ) // EventData is the construct serialized for the host agent type EventData struct { Title string `json:"title"` Text string `json:"text"` // Duration in milliseconds Duration int `json:"duration"` // Severity with value of -1,...
Text: text, Duration: int(duration / time.Millisecond), Severity: int(sev), })
<|file_name|>file_logger.rs<|end_file_name|><|fim▁begin|>use std::io::Write; use std::fs::{File, OpenOptions}; use {Logger, MessageType, format_message}; /// Write log to text file. pub struct FileLogger { log_file: String } impl FileLogger { pub fn new(file_path: &str) -> FileLogger { File::create(file_path)...
.write(true) .open(&self.log_file).unwrap(); file.write(format_message(msg_type, message).as_bytes()).unwrap();
<|file_name|>0011_auto_20170211_1640.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-02-11 15:40 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('reports', '0010_auto_20170211_030...
operations = [
<|file_name|>aiplatform_v1_generated_vizier_service_delete_study_sync.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the ...
client.delete_study(request=request)
<|file_name|>myDay.js<|end_file_name|><|fim▁begin|>import { Meteor } from 'meteor/meteor'; import { Template } from 'meteor/templating'; import { lodash } from 'meteor/stevezhu:lodash'; import { Bert } from 'meteor/themeteorchef:bert'; import { moment } from 'meteor/momentjs:moment'; import 'meteor/sacha:spin'; import...
questions.map((cur) => { cur.result.map((cur1) => {
<|file_name|>sample_get_operations.py<|end_file_name|><|fim▁begin|># coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -...
<|file_name|>jupyter_message.rs<|end_file_name|><|fim▁begin|>// Copyright 2020 The Evcxr 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 // // https://www.apache.org/licenses...
// See the License for the specific language governing permissions and
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import bawebauth.apps.bawebauth.fields class Migration(migrations.Migration): dependencies = [ migrations.sw...
]
<|file_name|>schema.py<|end_file_name|><|fim▁begin|>from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.models import NOT_PROVIDED class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_rename_table = "RENAME TABLE %(old_table)s TO %(new_table)s" sql_alter_column_null = "MO...
<|file_name|>general_steps.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U This file is part of Orion Context Broker. Orion Context Broker is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Pu...
""" send a API entry point request :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
<|file_name|>snake_oil_npv.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python from ecl.summary import EclSum OIL_PRICES = { "2010-01-01": 78.33, "2010-02-01": 76.39, "2010-03-01": 81.20, "2010-04-01": 84.29, "2010-05-01": 73.74, "2010-06-01": 75.34, "2010-07-01": 76.32, "2010-08-01":...
"2013-02-01": 95.31, "2013-03-01": 92.94,
<|file_name|>embed.py<|end_file_name|><|fim▁begin|># Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # # # Parts of this code is from IPyVolume (24.05.2017), used here under # this copyright and license with permission from the author # (see https://github.com/jupyter-...
<|file_name|>place_order.go<|end_file_name|><|fim▁begin|>// Code generated by go-swagger; DO NOT EDIT. package store // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command import ( "net/http" "github.com/go-openapi/runtime/middleware" ) // Pla...
o.Context.Respond(rw, r, route.Produces, route, err) return }
<|file_name|>hello-world.rs<|end_file_name|><|fim▁begin|>extern crate hello_world; #[test] fn test_no_name() { assert_eq!("Hello, World!", hello_world::hello(None)); } <|fim▁hole|> assert_eq!("Hello, Alice!", hello_world::hello(Some("Alice"))); } #[test] //#[ignore] fn test_other_same_name() { assert_eq!("...
#[test] //#[ignore] fn test_sample_name() {
<|file_name|>sonification.src.js<|end_file_name|><|fim▁begin|>/** * @license Highcharts JS v8.0.2 (2020-03-03) * @module highcharts/modules/sonification<|fim▁hole|> * * (c) 2012-2019 Øystein Moseng * * License: www.highcharts.com/license */ 'use strict'; import '../../modules/sonification/sonification.js';<|fim...
* @requires highcharts * * Sonification module
<|file_name|>metatype.py<|end_file_name|><|fim▁begin|>""" mediatum - a multimedia content repository Copyright (C) 2007 Arne Seifert <seiferta@in.tum.de> Copyright (C) 2007 Matthias Kramm <kramm@in.tum.de> Copyright (C) 2013 Iryna Feuerstein <feuersti@in.tum.de> This program is free software: you can redistribut...
if required: return 'True' else:
<|file_name|>inference.js<|end_file_name|><|fim▁begin|>import traverse from "../lib"; import assert from "assert"; import { parse } from "babylon"; import * as t from "babel-types"; function getPath(code) { const ast = parse(code, { plugins: ["flow", "asyncGenerators"] }); let path; traverse(ast, { Program: ...
it("should infer number from --x", function () {
<|file_name|>OvhHourlyEnum.java<|end_file_name|><|fim▁begin|>package net.minidev.ovh.api.price.dedicatedcloud._2014v1.sbg1a.infrastructure.filer; import com.fasterxml.jackson.annotation.JsonProperty; /** * Enum of Hourlys */ public enum OvhHourlyEnum { @JsonProperty("iscsi-1200-GB") iscsi_1200_GB("iscsi-1200-GB")...
}
<|file_name|>test_docx.py<|end_file_name|><|fim▁begin|>from datetime import datetime from zipfile import ZipFile from io import BytesIO from lxml import etree from docxgen import * from docxgen import nsmap from . import check_tag def test_init(): doc = Document() check_tag(doc.doc, ['document', 'body']) c...
<|file_name|>plotset.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import matplotlib.pyplot as plt from mpl_toolkits.basemap import cm import numpy as np# reshape from cstoolkit import drange from matplotlib.colors import LinearSegmentedColormap """ cmap_cs_precp = [ (242, 242, 242), (191, 239, 255), (178, 223...
"run_36":"NewSW", #"NewMOR", "run_37":"ACM", #"NewMOR", "run_38":"bedrock", #"NewMOR",
<|file_name|>unloadBleeps.ts<|end_file_name|><|fim▁begin|>import { BleepsGenerics } from '../../constants'; import { unloadBleep } from '../unloadBleep'; const unloadBleeps = (bleeps: BleepsGenerics): void => { Object.keys(bleeps).forEach(bleepName => unloadBleep(bleeps, bleepName));<|fim▁hole|><|fim▁end|>
}; export { unloadBleeps };
<|file_name|>0010_auto_20160906_1442.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-09-06 09:12 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hackerspace', '0009_verb...
<|file_name|>toolbar.js<|end_file_name|><|fim▁begin|>'use strict';<|fim▁hole|><|fim▁end|>
Editor.polymerElement({ });
<|file_name|>libtiff-prepare-test.py<|end_file_name|><|fim▁begin|># Copyright (C) 2016 Fan Long, Martin Rianrd and MIT CSAIL # Prophet # # This file is part of Prophet. # # Prophet is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
<|file_name|>external.go<|end_file_name|><|fim▁begin|>package main import ( "bufio" "crypto/tls" "io" "log" "net" "time" "unicode/utf8" ) const ( ONE_SECOND_NS = 1000 * 1000 * 1000 // One second in nanoseconds ) /******************* * ExternalManager * *******************/ type ExternalManager struct { c...
fromServer: fromServer, rawLog: rawLog, } conn.connect()
<|file_name|>logic.js<|end_file_name|><|fim▁begin|>const fs = require('fs'); const util = require('../../util'); // test equality function equal(a, b, options) {<|fim▁hole|> return options.inverse(this); } // great than function gt(a, b, options) { if (a >= b) { return options.fn(this); } return options.in...
if (a === b) { return options.fn(this); }
<|file_name|>datatype-date-format_fr-CA.js<|end_file_name|><|fim▁begin|>version https://git-lfs.github.com/spec/v1 oid sha256:866863ba9feea81e907968a3bc09f6876511c89dbf5be91d1ed9358a2b6ad4a3<|fim▁hole|><|fim▁end|>
size 563
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub mod xmobar; use sensors::battery::{PowerInfo};<|fim▁hole|> pub load: u32, pub cpus: u32, pub memused: u32, pub swpused: u32, pub net_rx: u32, pub net_tx: u32, } pub trait Output { fn refresh(&StatusData); }<|fim▁end|>
pub struct StatusData { pub power_info: PowerInfo, pub time: String,
<|file_name|>formclasswizarddialog.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 Us...
** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the
<|file_name|>test_duct.py<|end_file_name|><|fim▁begin|>import unittest from openmdao.main.api import set_as_top from openmdao.util.testutil import assert_rel_error from pycycle import duct, flowstation class DuctTestCase(unittest.TestCase): def test_start(self): comp = set_as_top(duct.Duct()) ...
fs = flowstation.FlowStation() fs.W = 1.080
<|file_name|>BrothComponents.tsx<|end_file_name|><|fim▁begin|>import { actions } from "common/actions";<|fim▁hole|>import Icon from "renderer/basics/Icon"; import { hook } from "renderer/hocs/hook"; import BrothComponent from "renderer/pages/PreferencesPage/BrothComponent"; import { T } from "renderer/t"; class BrothC...
import { Dispatch } from "common/types"; import React from "react";
<|file_name|>NavTabs.js<|end_file_name|><|fim▁begin|><Card> <Card.Header> <Nav variant="tabs" defaultActiveKey="#first"> <Nav.Item> <Nav.Link href="#first">Active</Nav.Link> </Nav.Item> <Nav.Item> <Nav.Link href="#link">Link</Nav.Link> </Nav.Item> <Nav.Item> <...
<|file_name|>astronomical-object.ts<|end_file_name|><|fim▁begin|>/** Holds the base definition of a generic astronomical object **/ export abstract class AstronomicalObject { /** * rotationTimeByEarthDays - how many earth days it takes for a full rotation * orbitTimeByEarthDays - how many earth days it takes for a...
<|file_name|>gimbal.py<|end_file_name|><|fim▁begin|>from os.path import join from math import pi from math import sqrt from math import radians import cv2 import numpy as np from numpy import dot from scipy.optimize import minimize from scipy.optimize import differential_evolution import matplotlib.pyplot as plt ...
return roll_vals, pitch_vals def generate(self):
<|file_name|>bencode.hpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2014, Arvid Norberg All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the abov...
// // Or, if you have a raw char buffer::
<|file_name|>server.rs<|end_file_name|><|fim▁begin|>use hyper::Uri; <|fim▁hole|> /// Track whether the upstream server wants the client host or server host header map_host: bool, } impl Server { pub fn new(url: Uri, map_host: bool) -> Self { Server { url: url, map_host: map_h...
#[derive(Clone, Debug, Eq, PartialEq, Hash)] pub struct Server { url: Uri,
<|file_name|>calendar.js<|end_file_name|><|fim▁begin|>/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo * ----------------------------------------------------------- * * The DHTML Calendar, version 1.0 "It is happening again" * * Details and latest version at: * www.dynarch.com/projects/calendar * *...
<|file_name|>0c431867c679_pets_now_have_a_description.py<|end_file_name|><|fim▁begin|>"""Pets now have a description Revision ID: 0c431867c679<|fim▁hole|>Create Date: 2016-11-07 18:36:25.912155 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0c431867c679' down...
Revises: 5b1bdc1f3125
<|file_name|>stream.rs<|end_file_name|><|fim▁begin|>use crate::future::poll_fn; use crate::io::{AsyncRead, AsyncWrite, Interest, PollEvented, ReadBuf, Ready}; use crate::net::unix::split::{split, ReadHalf, WriteHalf}; use crate::net::unix::split_owned::{split_owned, OwnedReadHalf, OwnedWriteHalf}; use crate::net::unix:...
<|file_name|>resources.rs<|end_file_name|><|fim▁begin|>// +--------------------------------------------------------------------------+ // | Copyright 2016 Matthew D. Steele <mdsteele@alum.mit.edu> | // | | // | This file is part of...
font }
<|file_name|>bootstrap-collapse.js<|end_file_name|><|fim▁begin|>/* ============================================================= * bootstrap-collapse.js v2.2.2 * http://twitter.github.com/bootstrap/javascript.html#collapse * ============================================================= * Copyright 2012 Twitter, Inc...
var dimension if (this.transitioning) return dimension = this.dimension() this.reset(this.$element[dimension]())
<|file_name|>common.go<|end_file_name|><|fim▁begin|>// Copyright 2016 Keybase Inc. All rights reserved. // Use of this source code is governed by a BSD // license that can be found in the LICENSE file. package libdokan import ( "strings" "time" "github.com/keybase/client/go/kbfs/data" "github.com/keybase/client/...
func stringReadFile(contents string) dokan.File { return &stringFile{data: contents}
<|file_name|>main.py<|end_file_name|><|fim▁begin|>import itertools import os.path import sys import time from . import core from . import file_io from . import geometry from . import stringconv from . import version # # Functions # def save_output(profileli, opt): """ Save a summary of results of evaluated profi...
<|file_name|>state.rs<|end_file_name|><|fim▁begin|>use nalgebra::{Point2, Scalar, Vector2}; use std::collections::HashSet; use std::hash::Hash; use event::{ElementState, React}; /// An atomic state of an input element. pub trait State: Copy + Eq { // TODO: Use a default type (`Self`) here once that feature stabil...
T: Input, T::State: InputState<E>, E: Element, {
<|file_name|>webcore.py<|end_file_name|><|fim▁begin|># Copyright 2011,2012 James McCauley # # This file is part of POX. # # POX 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, ...
class CoreHandler (SplitRequestHandler):
<|file_name|>dynamic_module_resolver_test.cc<|end_file_name|><|fim▁begin|>// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "third_party/blink/renderer/core/script/dynamic_module_resolver.h" #in...
<|file_name|>asignaturas_actuales.py<|end_file_name|><|fim▁begin|>import time t1=.3 t2=.1 path="~/Dropbox/Ingenieria/asignaturas_actuales"<|fim▁hole|>keyboard.send_keys(path) time.sleep(t1) keyboard.send_key("<enter>")<|fim▁end|>
time.sleep(t2) keyboard.send_key("<f6>") time.sleep(t2)
<|file_name|>completerlib.py<|end_file_name|><|fim▁begin|># encoding: utf-8 """Implementations for various useful completers. These are all loaded by default by IPython. """ #----------------------------------------------------------------------------- # Copyright (C) 2010-2011 The IPython Development Team. # # Dist...
m_is_init = hasattr(m, '__file__') and '__init__' in m.__file__ completions = []
<|file_name|>restyle_damage.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 restyle damage is a hint that tells layout whi...
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { let mut first_elem = true;
<|file_name|>forms.py<|end_file_name|><|fim▁begin|>from django import forms from django.contrib.auth.models import Group from common.forms import ModelFormWithHelper from common.helpers import SubmitCancelFormHelper from community.constants import COMMUNITY_ADMIN from community.models import Community, CommunityPage f...
for pk in group_pks: group = Group.objects.get(pk=pk) if not self.user.is_group_member(group.name): self.user.join_group(group)
<|file_name|>major_minor_demo1.py<|end_file_name|><|fim▁begin|>""" Demonstrate how to use major and minor tickers. The two relevant userland classes are Locators and Formatters. Locators determine where the ticks are and formatters control the formatting of ticks. Minor ticks are off by default (NullLocator and NullF...
plt.plot(t, s) ax.xaxis.set_major_locator(majorLocator) ax.xaxis.set_major_formatter(majorFormatter)
<|file_name|>driver.py<|end_file_name|><|fim▁begin|>""" HSA driver bridge implementation """ from collections.abc import Sequence import sys import atexit import os import ctypes import struct import traceback import weakref import logging from contextlib import contextmanager from collections import defaultdict, de...
while self._signals:
<|file_name|>graph.py<|end_file_name|><|fim▁begin|># This file is part of Androguard. # # Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # 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 m...
# TODO: In this situation, we should transform the condition node into
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/* * The MIT License (MIT) * * Copyright (c) 2015 Mattis Marjak (mattis.marjak@gmail.com) * * 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 Soft...
<|file_name|>resolutionCache.ts<|end_file_name|><|fim▁begin|>namespace ts.tscWatch { describe("unittests:: tsc-watch:: resolutionCache:: tsc-watch module resolution caching", () => { const scenario = "resolutionCache"; it("works", () => { const root = { path: "/a/d/f...
<|file_name|>google_services.py<|end_file_name|><|fim▁begin|>#!/usr/local/bin/python """ Handles Google Service Authentication """ # TODO(rrayborn): Better documentation __author__ = "Rob Rayborn" __copyright__ = "Copyright 2014, The Mozilla Foundation" __license__ = "MPLv2" __maintainer__ = "Rob Rayborn" __email__ ...
claims_json['exp'] = current_time + 3600 - 1 # Remember expiration self._expiration = current_time + 3600
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>// Copyright (c) The Diem Core Contributors // SPDX-License-Identifier: Apache-2.0 #![forbid(unsafe_code)] use diem_config::network_id::NetworkContext; use diem_crypto::{test_utils::TEST_SEED, x25519, Uniform as _}; use diem_logger::prelude::*; use diem_types::network_...
}; use rand::prelude::*; use std::{env, ffi::OsString, io, sync::Arc};
<|file_name|>train.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # based on ideas in https://github.com/lethienhoa/Very-Deep-Convolutional-Networks-for-Natural-Language-Processing/blob/master/train.py import tensorflow as tf from vdcnn import VDCNN import numpy as np import os import ...
<|file_name|>hashchangeevent.rs<|end_file_name|><|fim▁begin|>/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::EventBinding::E...
pub fn new( window: &Window, type_: Atom, bubbles: bool,
<|file_name|>jquery.backstretch.min.js<|end_file_name|><|fim▁begin|>/*! Backstretch - v2.0.4 - 2013-06-19 * http://srobbin.com/jquery-plugins/backstretch/ * Copyright (c) 2013 Scott Robbin; Licensed MIT */ (function (a, d, p) { a.fn.backstretch = function (c, b) { (c === p || 0 === c.length) && a.error("N...
this.$wrap.css({width: b, height: g}).find("img:not(.deleteable)").css({width: e, height: j}).css(a) } catch (h) { } return this
<|file_name|>interrupt_pause_script.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python from __future__ import print_function import RPi.GPIO as GPIO import time import Queue # https://pymotw.com/2/Queue/ #GPIO pins Taster1 = 24 Taster2 = 27 # GPIO-Nummer als Pinreferenz waehlen GPIO.setmode(GPIO.BCM) # GPIO vom SoC...
time.sleep(0.5) if not queue.empty(): job = queue.get() if job == Taster1:
<|file_name|>test_adapter.py<|end_file_name|><|fim▁begin|>############################################################################## # # Copyright (c) 2004 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A cop...
DocTestSuite('zope.security.adapter'),
<|file_name|>terminal.component.ts<|end_file_name|><|fim▁begin|>import { Component, OnInit, OnDestroy, ElementRef, ViewChild } from '@angular/core'; import { fromEvent } from 'rxjs'; import { debounceTime, distinctUntilChanged, takeWhile } from 'rxjs/operators'; import { Terminal } from 'xterm'; import * as fit from '...
<|file_name|>stats.py<|end_file_name|><|fim▁begin|>class Stats: """ Contains the stats that a character or monster may have. The stats tied to an agent are: * Health: The amount of damage the agent can withstand. The agent dies when their health falls to zero. This is the only stat that w...
""" Contains the stats that come from equipment. Only characters have equipment.
<|file_name|>roundrobin_router.go<|end_file_name|><|fim▁begin|>package router import ( "sync/atomic" "github.com/AsynkronIT/protoactor-go/actor" ) type roundRobinGroupRouter struct { GroupRouter } type roundRobinPoolRouter struct { PoolRouter } type roundRobinState struct { index int32 routees *actor.PIDSe...
}
<|file_name|>SSConsts.hpp<|end_file_name|><|fim▁begin|>#ifndef _SS_CONSTS_HPP_ #define _SS_CONSTS_HPP_ #include "StrideSearchConfig.h" namespace StrideSearch { /// Meters per second to Kilometers per hour conversion factor static const Real MPS2KPH = 3.6; /// Knots to meters per second conversion factor<|...
static const Real KTS2MPS = 0.5144444; /// Nautical miles to kilometers conversion factor static const Real NM2KM = 1.852; /// Pi
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2015 ERP|OPEN (www.erpopen.nl). # # This program is free software: you can redistribute i...
from . import models
<|file_name|>long-while.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/lice...
// option. This file may not be copied, modified, or distributed // except according to those terms.