prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>config.js<|end_file_name|><|fim▁begin|>// ***************************************************************** // Ox - A modular framework for developing templated, responsive, grid-based projects. // // ***************************************************************** // Project configuration var project ...
<|file_name|>windows.py<|end_file_name|><|fim▁begin|>import os import logging import claripy from ..errors import ( AngrSimOSError, TracerEnvironmentError, SimSegfaultException, SimUnsupportedError, SimZeroDivisionException, ) from .. import sim_options as o from ..tablespecs import StringTableSpe...
if env is None: env = {} # Prepare argc if argc is None:
<|file_name|>logmon_hook_test.go<|end_file_name|><|fim▁begin|>package taskrunner import ( "context" "encoding/json" "io/ioutil" "net" "os" "testing" plugin "github.com/hashicorp/go-plugin" "github.com/hashicorp/nomad/client/allocrunner/interfaces" "github.com/hashicorp/nomad/helper" "github.com/hashicorp/no...
Task: task, } resp := interfaces.TaskPrestartResponse{}
<|file_name|>UpdateUnitsTest.java<|end_file_name|><|fim▁begin|>/* * Copyright (C) 2016 Mkhytar Mkhoian * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.<|fim▁hole|> * You may obtain a copy of the License at * * http:/...
<|file_name|>ws_client_test.go<|end_file_name|><|fim▁begin|>package rpcclient import ( "context" "encoding/json" "net" "net/http" "net/http/httptest" "sync" "testing" "time" "github.com/gorilla/websocket" "github.com/stretchr/testify/require" "github.com/tendermint/tmlibs/log" types "github.com/tendermin...
<|file_name|>gump_scene.rs<|end_file_name|><|fim▁begin|>use cgmath::Point2; use ggez::event::{KeyCode, KeyMods}; use ggez::graphics::{self, Canvas, DrawParam, Text}; use ggez::{Context, GameResult}; use image_convert::image_to_surface; use scene::{BoxedScene, Scene, SceneChangeEvent, SceneName}; use std::fs::File; use ...
_engine_data: &mut (), ) -> GameResult<Option<SceneChangeEvent<SceneName>>> { if self.exiting {
<|file_name|>urls.py<|end_file_name|><|fim▁begin|># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
from django.conf.urls import url from dispatch.topology import views
<|file_name|>gschemas.py<|end_file_name|><|fim▁begin|>import glob import os from distutils.dep_util import newer from distutils.core import Command from distutils.spawn import find_executable from distutils.util import change_root class build_gschemas(Command): """build message catalog files Build message...
src = os.path.join(self.build_base, 'share', 'glib-2.0', 'schemas') dest = os.path.join(self.install_base, 'share', 'glib-2.0', 'schemas') if self.root != None:
<|file_name|>build.rs<|end_file_name|><|fim▁begin|>// Copyright © 2015, Peter Atashian<|fim▁hole|><|fim▁end|>
// Licensed under the MIT License <LICENSE.md> fn main() { println!("cargo:rustc-flags=-l scecli"); }
<|file_name|>pyDome.py<|end_file_name|><|fim▁begin|># pyDome: A geodesic dome calculator # Copyright (C) 2013 Daniel Williams # # 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, e...
sys.exit(-1)
<|file_name|>tables.py<|end_file_name|><|fim▁begin|>from horizon import tables from django.utils.translation import ugettext_lazy as _ import utils import whisper import time def get_vcpu_load_avgs(instance): cpu_files = utils.get_whisper_files_by_metric(<|fim▁hole|> utils.get_whisper_files_by_inst...
"cpu",
<|file_name|>mime_util_xdg.cc<|end_file_name|><|fim▁begin|>// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "base/nix/mime_util_xdg.h" #include <cstdlib> #include <list> #include <map> #inc...
public:
<|file_name|>controller.py<|end_file_name|><|fim▁begin|># Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
<|file_name|>0007_auto_20160811_1915.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-08-11 11:15 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('article', '0006_article_owner'), ...
]
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//! An in-memory event store, useful for testing //! //! # Example //! //! ```rust //! extern crate chronicle; //! extern crate chronicle_memory; //! extern crate futures; //! #[macro_use] //! extern crate lazy_static; //! extern crate uuid; //! //! //! use chronicle_mem...
sequence_number: sequence_number as SequenceNumber, payload: payload.clone(),
<|file_name|>commit_stats.py<|end_file_name|><|fim▁begin|># 统计一下提交代码量 import os import subprocess import pandas as pd os.chdir('../') # %% start_dt = '2019-05-01' end_dt = '2019-06-20' commits = subprocess.check_output( "git log --after={start_dt} --before={end_dt} --format='%s%cr'". format(start_dt=star...
<|file_name|>AbstractOverlayElement.ts<|end_file_name|><|fim▁begin|>declare var $:any; class AbstractOverlayElement { public $overlay:any; public $container:any; public containerId:string; constructor(width:number, height:number, containerId:string) { this.$overlay = $('#overlay'); ...
<|file_name|>vector-no-ann.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-2015 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....
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your // option. This file may not be copied, modified, or distributed // except according to those terms.
<|file_name|>test_supercell.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python """Tests for constructing supercell models.""" import itertools import numpy as np from numpy.testing import assert_allclose import pytest from parameters import KPT, T_VALUES<|fim▁hole|> import tbmodels def get_equivalent_k(k, super...
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import PartyBot from 'partybot-http-client'; import React, { PropTypes, Component } from 'react'; import cssModules from 'react-css-modules'; import styles from './index.module.scss'; import Heading from 'grommet/components/Heading'; import Box from 'grommet/components...
<Button label="Save Changes" primary={true} onClick={this.submitSave} />
<|file_name|>twit.py<|end_file_name|><|fim▁begin|>import sys, os import tweepy # File with colon-separaten consumer/access token and secret consumer_file='twitter.consumer' access_file='twitter.access' def __load_auth(file): if os.path.exists(file): with open(file) as f: tokens = f.readline()....
twit(' '.join(tokens))
<|file_name|>0009_footer.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-07-27 17:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0008_sponsor_primary_sponsor...
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('facebook_url', models.URLField(blank=True, null=True)),
<|file_name|>markdown_wiki_test.js<|end_file_name|><|fim▁begin|>'use strict'; var grunt = require('grunt'); /* ======== A Handy Little Nodeunit Reference ======== https://github.com/caolan/nodeunit Test methods: test.expect(numAssertions) test.done() Test assertions: test.ok(value, [message]) ...
<|file_name|>script.js<|end_file_name|><|fim▁begin|>const defaults = { base_css: true, // the base dark theme css inline_youtube: true, // makes youtube videos play inline the chat collapse_onebox: true, // can collapse collapse_onebox_default: false, // default option for collapse pause_youtube_...
<|file_name|>canvas_msg.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 canvas_paint_task::{FillOrStrokeStyle, LineCapStyle, L...
<|file_name|>print_records.py<|end_file_name|><|fim▁begin|>"""Print all records in the pickle for the specified test""" <|fim▁hole|> def main(): """Print all records corresponding to test given as an argument""" parser = argparse.ArgumentParser(description='Submit one or more jobs.') parser.add_argument('t...
import sys import argparse from autocms.core import (load_configuration, load_records)
<|file_name|>operators.cpp<|end_file_name|><|fim▁begin|>#include "operators.h" #define ROI_SIZE (100) Operator::Operator(cvb::CvID id):id_(id) { prev_label_ = cur_label_ = BACKGROUND; action_angle_ = -1.0; } void Operator::Process(const cv::Mat &frame) { ac_...
<|file_name|>twilio.py<|end_file_name|><|fim▁begin|>"""<|fim▁hole|> http://psa.matiasaguirre.net/docs/backends/twilio.html """ from re import sub from social.p3 import urlencode from social.backends.base import BaseAuth class TwilioAuth(BaseAuth): name = 'twilio' ID_KEY = 'AccountSid' def get_user_de...
Amazon auth backend, docs at:
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistr...
'test/case3_eur_eur.yml', 'test/case4_cad_chf.yml', 'test/case_eur_usd.yml', ],
<|file_name|>QCamera2HWI.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2012-2014, The Linux Foundataion. 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 ...
* FUNCTION : commitParameterChanges * * DESCRIPTION: commit parameter changes to the backend to take effect
<|file_name|>0001_initial.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-24 05:39 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True<|fim▁hole|> operations = [ migratio...
dependencies = [ ]
<|file_name|>variables_9.js<|end_file_name|><|fim▁begin|>var searchData= [ ['vertical_5fline',['vertical_line',['../class_abstract_board.html#a78c4d43cc32d9dc74d73156497db6d3f',1,'AbstractBoard']]]<|fim▁hole|><|fim▁end|>
];
<|file_name|>xsupport.py<|end_file_name|><|fim▁begin|>"""Assorted commands. """ import os import threading import sublime import sublime_plugin from Vintageous.state import _init_vintageous from Vintageous.state import State from Vintageous.vi import settings from Vintageous.vi import cmd_defs from Vintageous.vi.dot...
and not view.line(s.b).empty()): return sublime.Region(s.b - 1)
<|file_name|>gradient.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ """ import logging import numpy as np from numpy import ma from cotede.qctests import QCCheckVar try: import pandas as pd PANDAS_AVAILABL...
) flag = np.zeros(np.shape(self.data[self.varname]), dtype="i1")
<|file_name|>zh-hant.js<|end_file_name|><|fim▁begin|><|fim▁hole|>MSG.title = "Webduino Blockly 課程 1-3:控制兩顆 LED 燈"; MSG.subTitle = "課程 1-3:控制兩顆 LED 燈"; MSG.demoDescription = "點選下圖左右兩顆燈泡,分別控制兩顆 LED 的開或關";<|fim▁end|>
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- #--------------------------------------------------------------------# # This file is part of Py-cnotify. # # # # Copyright (C) 2007, 2008 P...
... name = Variable ()
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python __version__ = '0.0.1' import pysimplesoap.client import pysimplesoap.simplexml <|fim▁hole|>from zimbrasoap.soap import soap,admin,mail<|fim▁end|>
<|file_name|>SplittingXMLFilter.java<|end_file_name|><|fim▁begin|>/* * Copyright 2011-2015 The Trustees of the University of Pennsylvania * * 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 ...
t = consumerThrowable; consumerThrowable = null; }
<|file_name|>TagsArrayInput.tsx<|end_file_name|><|fim▁begin|>import React, {forwardRef, useCallback, useImperativeHandle, useMemo, useRef} from 'react' import {FormField} from '@sanity/base/components' import {useId} from '@reach/auto-id' import {TagInput} from '../components/tagInput' import PatchEvent, {set, unset} f...
<FormField level={level} title={type.title}
<|file_name|>store.ts<|end_file_name|><|fim▁begin|>/* * This file is part of CoCalc: Copyright © 2020 Sagemath, Inc. * License: AGPLv3 s.t. "Commons Clause" – see LICENSE.md for details */ // React libraries import { Store, redux } from "../app-framework"; // CoCalc libraries import { cmp, cmp_array, set } from "...
<|file_name|>spectral_normalization.py<|end_file_name|><|fim▁begin|>import numpy import chainer from chainer import backend from chainer import configuration import chainer.functions as F from chainer import link_hook import chainer.links as L from chainer import variable import chainerx from chainerx import _fallback...
def __exit__(self): raise NotImplementedError
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls import patterns, url from rest_framework.urlpatterns import format_suffix_patterns from snippets.v3_0 import views urlpatterns = patterns('', url(r'^v3_0/snippets/$', views.SnippetList.as_view()), url(r'^v3_0/snippets/(?P<pk>[0-9]+)/$', vi...
) urlpatterns = format_suffix_patterns(urlpatterns)
<|file_name|>jumble.py<|end_file_name|><|fim▁begin|>try: from collections import Counter except: from Counter import Counter # For Python < 2.7 import traceback import wordList import anagram import random import math import re # Allows channel members to play an acronym-based word game. # !jumble [min [max]] -- start...
def guess(self, server, respond, nick, word): if not self.word: return
<|file_name|>models.py<|end_file_name|><|fim▁begin|># Lint as: python3 # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICE...
LOGNORMAL_RATE: Lognormal model for the underlying rate.
<|file_name|>spatialFiltering.py<|end_file_name|><|fim▁begin|># Mustafa Hussain # Digital Image Processing with Dr. Anas Salah Eddin # FL Poly, Spring 2015 # # Homework 3: Spatial Filtering # # USAGE NOTES: #<|fim▁hole|># # Please ensure that the script is running as the same directory as the images # directory! impo...
# Written in Python 2.7
<|file_name|>resource_softlayer_lb_local_test.go<|end_file_name|><|fim▁begin|>package softlayer import ( "github.com/hashicorp/terraform/helper/resource" "testing" ) func TestAccSoftLayerLbLocalShared_Basic(t *testing.T) { resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers:...
<|file_name|>zt.megamenu.js<|end_file_name|><|fim▁begin|>var ZTMenu = function(boxTimer, xOffset, yOffset, smartBoxSuffix, smartBoxClose, isub, xduration, xtransition) { var smartBoxes = $(document.body).getElements('[id$=' + smartBoxSuffix + ']'); var closeElem = $(document.body).getElements('.' + smartBoxClose)...
<|file_name|>GridPartitionedBackupLoadSelfTest.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 th...
<|file_name|>headings.py<|end_file_name|><|fim▁begin|>#!/bin/env python """ Extract and tag References from a PDF. Created on Mar 1, 2010 @author: John Harrison Usage: headings.py OPTIONS FILEPATH OPTIONS: --help, -h Print help and exit --noxml Do not tag individual headings with XML tags. ...
pdf2heads(opts, args) except UsageError as err:
<|file_name|>UnaryMinusNode.java<|end_file_name|><|fim▁begin|>package compiler.ASTNodes.Operators; import compiler.ASTNodes.GeneralNodes.Node; import compiler.ASTNodes.GeneralNodes.UnaryNode; import compiler.ASTNodes.SyntaxNodes.ExprNode;<|fim▁hole|> public UnaryMinusNode(Node child) { super(child, null); } @Ove...
import compiler.Visitors.AbstractVisitor; public class UnaryMinusNode extends ExprNode {
<|file_name|>views.py<|end_file_name|><|fim▁begin|># # Copyright (C) 2010 Norwegian University of Science and Technology # Copyright (C) 2011-2015 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU ...
readonly = True
<|file_name|>random.spec.js<|end_file_name|><|fim▁begin|>"use strict"; const RandomStrategy = require("../../../src/strategies/random"); const { extendExpect } = require("../utils"); extendExpect(expect); describe("Test RandomStrategy", () => { it("test with empty opts", () => { <|fim▁hole|> { a: "hello" }, {...
const strategy = new RandomStrategy(); const list = [
<|file_name|>115_eas_twodevices_turn.py<|end_file_name|><|fim▁begin|>"""EAS two-devices turn Revision ID: 17dc9c049f8b Revises: ad7b856bcc0 Create Date: 2014-10-21 20:38:14.311747 """ # revision identifiers, used by Alembic. revision = '17dc9c049f8b' down_revision = 'ad7b856bcc0' from datetime import datetime<|fim▁...
<|file_name|>animation.py<|end_file_name|><|fim▁begin|>import os.path import pygame.image import time import ConfigParser from helpers import * from modules import Module class Animation(Module): def __init__(self, screen, folder, interval = None, autoplay = True): super(Animation, self).__init__(screen) if fold...
def load_interval(self): cfg = ConfigParser.ConfigParser()
<|file_name|>expr-match-generic.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....
// -*- rust -*-
<|file_name|>PermissionsWindow.js<|end_file_name|><|fim▁begin|>/* Copyright 2010-2012 Infracom & Eurotechnia (support@webcampak.com) This file is part of the Webcampak project. Webcampak is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Fr...
});
<|file_name|>groupbox.go<|end_file_name|><|fim▁begin|>// Copyright 2010 The Walk 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 windows package walk import ( "syscall" ) import ( "github.com/lxn/win" ) const groupBox...
gb.composite.SetDataBinder(dataBinder) }
<|file_name|>knmi_getdata.py<|end_file_name|><|fim▁begin|><|fim▁hole|> ''' Description: Author: Ronald van Haren, NLeSC (r.vanharen@esciencecenter.nl) Created: - Last Modified: - License: Apache 2.0 Notes: - ''' from lxml.html import parse import csv import urllib2 from lxml import html...
#!/usr/bin/env python2
<|file_name|>swift.py<|end_file_name|><|fim▁begin|>''' Add in /edx/app/edxapp/edx-platform/lms/envs/aws.py: ORA2_SWIFT_URL = AUTH_TOKENS["ORA2_SWIFT_URL"] ORA2_SWIFT_KEY = AUTH_TOKENS["ORA2_SWIFT_KEY"] Add in /edx/app/edxapp/lms.auth.json "ORA2_SWIFT_URL": "https://EXAMPLE", "ORA2_SWIFT_KEY": "EXAMPLE", ORA2_SWIFT_KE...
<|file_name|>util.js<|end_file_name|><|fim▁begin|>/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * ...
<|file_name|>instagram.ts<|end_file_name|><|fim▁begin|>(() => { /** * Use iframe.ly for instagram */ const instagramService = (iframelyService, $q) => { return { name: 'Instagram', patterns: ['(?:(?:http|https):\/\/)?(?:www.)?(?:instagr(?:\.am|am\.com))\/p\/.+'], // eslin...
(response) => { deferred.resolve(response);
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Root Module // // This file is part of AEx. // Copyright (C) 2017 Jeffrey Sharp<|fim▁hole|>// // AEx is free software: you can redistribute it and/or modify it // under the terms of the GNU General Public License as published // by the Free Software Foundation, either...
<|file_name|>EventDetectionWeb.py<|end_file_name|><|fim▁begin|>import sys; import os sys.path.insert(0, os.path.abspath('..')) sys.path.insert(0, os.path.abspath('.')) from flask import Flask, render_template, request, redirect import subprocess from Utils import subprocess_helpers from Utils.DataSource import * app...
@app.errorhandler(404)
<|file_name|>caffe.py<|end_file_name|><|fim▁begin|>from .util import DummyDict from .util import tprint import deepdish as dd import numpy as np # CAFFE WEIGHTS: O x I x H x W # TFLOW WEIGHTS: H x W x I x O def to_caffe(tfW, name=None, shape=None, color_layer='', conv_fc_transitionals=None, info=DummyDict()): ass...
assigns.append(biases.assign(bias)) loaded.append('{}:1 -> {}:biases{}'.format(key, local_key, init_str))
<|file_name|>feature_maxuploadtarget.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of -maxuploadtarget....
assert_equal(len(self.nodes[0].getpeerinfo()), 1) #node is still connected because of the whitelist
<|file_name|>el.js<|end_file_name|><|fim▁begin|>OC.L10N.register( "files_sharing", { "Server to server sharing is not enabled on this server" : "Ο διαμοιρασμός μεταξύ διακομιστών δεν έχει ενεργοποιηθεί σε αυτόν το διακομιστή", "The mountpoint name contains invalid characters." : "Το όνομα σημείου προσάρ...
"Public shared folder %1$s was downloaded" : "Ο δημόσιος διαμοιρασμένος φάκελος %1$s ελήφθη",
<|file_name|>0011_badgesbycoursemultilang.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BadgeByCourse.title_en' ...
'requirements_fr': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}), 'requirements_it': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}), 'requirements_pt': ('tinymce.models.HTMLField', [], {'null': 'True', 'blank': 'True'}),
<|file_name|>server_decoration.rs<|end_file_name|><|fim▁begin|>//! Support for the KDE Server Decoration Protocol use crate::wayland_sys::server::wl_display as wl_server_display; pub use wlroots_sys::protocols::server_decoration::server::org_kde_kwin_server_decoration_manager::Mode; use wlroots_sys::{ wl_display, ...
} impl Manager { pub(crate) unsafe fn new(display: *mut wl_server_display) -> Option<Self> {
<|file_name|>subscriber.py<|end_file_name|><|fim▁begin|>from collections import defaultdict<|fim▁hole|>import json import os import Pubnub as PB PUB_KEY = os.environ["PUB_KEY"] SUB_KEY = os.environ["SUB_KEY"] SEC_KEY = os.environ["SEC_KEY"] CHANNEL_NAME = os.environ["CHANNEL_NAME"] def frequency_count(text): "det...
import re
<|file_name|>test_types.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 Apac...
ty = pa.binary(5) assert ty.byte_width == 5
<|file_name|>tfont.py<|end_file_name|><|fim▁begin|># $Id: tfont.py,v 1.2 2003/09/14 04:31:39 riq Exp $ # # Tenes Empanadas Graciela # Copyright 2000,2003 Ricardo Quesada (riq@coresecurity.com)<|fim▁hole|># import pygame if not pygame.font.get_init(): pygame.font.init() TFont = { 'helvetica 8' : pygame.f...
<|file_name|>test_template.py<|end_file_name|><|fim▁begin|>import pytest import gen.template from gen.template import (For, Replacement, Switch, Tokenizer, UnsetParameter, parse_str) just_text = "foo" more_complex_text = "foo {" def get_tokens(str): return Tokenizer(str).tokens def t...
'c': { 'variables': {'d'}, 'sub_scopes': {} }
<|file_name|>cpu.rs<|end_file_name|><|fim▁begin|>use opcode::Opcode; use keypad::Keypad; use display::Display; use util; pub struct Cpu { pub memory: [u8; 4096], pub v: [u8; 16], pub i: usize, pub pc: usize, pub gfx: [u8; 64 * 32], pub delay_timer: u8, pub sound_timer: u8, pub stack: [u...
}
<|file_name|>time.go<|end_file_name|><|fim▁begin|>package null import ( "database/sql/driver" "encoding/json" "fmt" "reflect" "time" ) // Time is a nullable time.Time. It supports SQL and JSON serialization. // It will marshal to null if null. type Time struct { Time time.Time Valid bool } // Scan implements...
}
<|file_name|>dep_info.rs<|end_file_name|><|fim▁begin|>use cargotest::support::{basic_bin_manifest, execs, main_file, project}; use filetime::FileTime; use hamcrest::{assert_that, existing_file}; #[test] fn build_dep_info() { let p = project("foo") .file("Cargo.toml", &basic_bin_manifest("foo")) .fi...
authors = [] [[example]]
<|file_name|>ImagePhotoSizeSelectActual.js<|end_file_name|><|fim▁begin|>module.exports = { description: "", ns: "react-material-ui", type: "ReactNode", dependencies: { npm: { "material-ui/svg-icons/image/photo-size-select-actual": require('material-ui/svg-icons/image/photo-size-select-actual')<|fim▁ho...
<|file_name|>openstack.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- # Copyright: (c) 2014, Hewlett-Packard Development Company, L.P. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard openstack documentation fragmen...
type: str choices: [ admin, internal, public ]
<|file_name|>test_qgssettings.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- """ Test the QgsSettings class Run with: ctest -V -R PyQgsSettings .. note:: 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...
<|file_name|>GXRA.py<|end_file_name|><|fim▁begin|>### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generat...
Get next full line from `GXRA <geosoft.gxapi.GXRA>`
<|file_name|>tree.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 https://mozilla.org/MPL/2.0/. */ //! Traits that nodes must implement. Breaks the otherwise-cycl...
/// Whether we're matching on a pseudo-element.
<|file_name|>timer.rs<|end_file_name|><|fim▁begin|>// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or // http://www.apache.org/licenses/...
//! the worker thread in order to modify the same data structure. This has the //! side effect of "cancelling" the previous requests while allowing a
<|file_name|>Car.cpp<|end_file_name|><|fim▁begin|>/* Car.cpp - Library for IWM Rocket Avoidance Robot Car. Created by Steve Mullarkey, November 18, 2013. Copyright 2013 Steve Mullarkey Licensed under the Apache License, Version 2.0 */ #include "Arduino.h" #include <Servo.h> #include "Car.h" Car::Car(int f...
for(pos = 0; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees
<|file_name|>libembed.d.ts<|end_file_name|><|fim▁begin|>import '@phosphor/widgets/style/index.css'; import 'font-awesome/css/font-awesome.css'; import '@jupyter-widgets/controls/css/widgets.css'; import { WidgetManager } from './manager'; /** * Render the inline widgets inside a DOM element.<|fim▁hole|> * @param manag...
*
<|file_name|>config.js<|end_file_name|><|fim▁begin|>var _ = require('lodash'); var fs = require('fs'); var logger = require('./logger'); var jsonLoad = require('./json-load'); var config = module.exports; // defaults - can be overridden in config.json config.startServer = true; config.postgresqlUser = 'postgres'; con...
// Required, must be 'code', 'code id_token', 'id_token code' or 'id_token' azureResponseType: 'code id_token', // Required
<|file_name|>bravialib.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # # bravialib - Will Cooke - Whizzy Labs - @8none1 # http://www.whizzy.org # Copyright Will Cooke 2016. Released under the GPL. # # # My attempt to talk to the Sony Bravia web API. # # This is designed to be used by a long running process # So...
return host_ip
<|file_name|>error.rs<|end_file_name|><|fim▁begin|>// CITA // Copyright 2016-2017 Cryptape Technologies LLC. // This program is free software: you can redistribute it // and/or modify it under the terms of the GNU General Public // License as published by the Free Software Foundation, // either version 3 of the Licens...
/// Internal JSON-RPC error. InternalError,
<|file_name|>isdim.py<|end_file_name|><|fim▁begin|>import os from spinspy import local_data<|fim▁hole|> def isdim(dim): if os.path.isfile('{0:s}{1:s}grid'.format(local_data.path,dim)): return True else: return False<|fim▁end|>
<|file_name|>examples.routes.ts<|end_file_name|><|fim▁begin|>import { Routes, RouterModule } from '@angular/router'; import { ExamplesComponent } from './examples.component'; const routes: Routes = [ { path: '', component: ExamplesComponent, children: [ { path: 'animationexamples', loadChildre...
{ path: 'jquery', loadChildren: './jquery/jquery.module#JqueryModule' }, { path: 'googlemaps', loadChildren: './google-maps/google-maps.module#GoogleMapsModule' },
<|file_name|>km.js<|end_file_name|><|fim▁begin|>/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'pagebreak', 'km', { alt: 'បំបែក​ទំព័រ', toolbar: 'បន្ថែម​ការ​បំបែក​ទំព័រ​មុន​បោះពុម្ព'<|fim▁hole|><...
} );
<|file_name|>islamic.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of convertdate. # http://github.com/fitnr/convertdate # Licensed under the GPL-v3.0 license: # http://opensource.org/licenses/MIT # Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal> from math import...
<|file_name|>test_switch.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
transport_zones_config = [{'zone_uuid': _uuid(), 'transport_type': 'stt'}] lswitch = switchlib.create_lswitch(self.fake_cluster,
<|file_name|>test_environment.py<|end_file_name|><|fim▁begin|># Copyright 2013 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. """TestEnvironment classes. These classes abstract away the various setups needed to run the W...
# override def GetOS(self):
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- import re import datetime import logging from urlparse import parse_qsl from mamchecker.model import depth_1st, problemCtxObjs, keysOmit, table_entry, ctxkey from mamchecker.hlp import datefmt, last from mamchecker.util import PageBase from...
return qqf, keys, O, True
<|file_name|>app.js<|end_file_name|><|fim▁begin|>/** * App * * Root application file. * Load main controllers here. */ define([ "jquery", "modules/connected-devices/index" ], function( $, ConnectedDevices ) { "use strict"; var retriveData = function(callback) { var connecte...
connected_devices.update({ data: connected_devices_data });
<|file_name|>ph2.py<|end_file_name|><|fim▁begin|>import json import argparse import numpy import sys import copy from astropy.coordinates import SkyCoord from astropy import units import operator class Program(object): def __init__(self, runid="16BP06", pi_login="gladman"): self.config = {"runid": runid, ...
print "Total I-Time: {} hrs".format(total_itime/3600.) json.dump(program.config, open('program.json', 'w'), indent=4, sort_keys=True)
<|file_name|>PairDirectoryFile.java<|end_file_name|><|fim▁begin|>package com.stek101.projectzulu.common.core; /** * For usage see: {@link Pair} */ public class PairDirectoryFile<K, V> { private final K directory; private final V file; public static <K, V> PairDirectoryFile<K, V> createPair(K...
return directory; }
<|file_name|>Export2Excel.js<|end_file_name|><|fim▁begin|>function generateArray(table) { var out = []; var rows = table.querySelectorAll('tr'); var ranges = []; for (var R = 0; R < rows.length; ++R) { var outRow = []; var row = rows[R]; var columns = row.querySelectorAll('td'); ...
function s2ab(s) {
<|file_name|>crossBrowsers.js<|end_file_name|><|fim▁begin|>var crossBrowser = function (browser, x, y) { if (browser === 'Firefox 39') { x = x - 490; y = y + 10; } else if (browser === 'MSIE 10') { x = x - 588.7037353; y = y + 3 - 0.32638931; } else if (browser === 'IE 11') {...
return { x: x,
<|file_name|>qbittorrent_bg.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="bg"> <context> <name>AboutDlg</name> <message> <location filename="../gui/about.ui" line="21"/> <source>About qBittorrent</source> <translation>Отн...
<message> <location filename="../searchengine/supportedengines.h" line="56"/> <source>Music</source>
<|file_name|>server.py<|end_file_name|><|fim▁begin|>#----------------------------------------------------------- # Threaded, Gevent and Prefork Servers #----------------------------------------------------------- import datetime import errno import logging import os import os.path import platform import psutil import r...
def __init__(self, autoreload): self.autoreload = autoreload