prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) {
grunt.initConfig({
sass: { // Task
dist: { // Target
files: { // Dictionary of files
'assets/stylesheets/styles.css':... | });
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin'); |
<|file_name|>IFunction.java<|end_file_name|><|fim▁begin|><|fim▁hole|>public interface IFunction extends ITwigCallable {
}<|fim▁end|> | package com.dubture.twig.core.model;
|
<|file_name|>payments.js<|end_file_name|><|fim▁begin|>import { create, visitable } from 'ember-cli-page-object';
import accountSetup from 'code-corps-ember/tests/pages/components/payments/account-setup';
export default create({
visit: visitable(':organization/:project/settings/donations/payments'),
accountSetup<|f... | }); |
<|file_name|>2-1-literals.rs<|end_file_name|><|fim▁begin|>fn main() {
// Addition with unsigned integer
println!("1 + 3 = {}", 1u32 + 3);
// Subtraction with signed integer<|fim▁hole|>
// Boolean logic
println!("true AND false is {}", true && false);
println!("true OR false is {}", true || fals... | // Rust refuses to compile if there is an overflow
println!("1 - 3 = {}", 1i32 - 3); |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from .namespace import RBoxNameSpaceListener
from .completion import RBoxCompletionListener, RBoxAutoComplete
from .popup import RBoxPopupListener, RBoxShowPopup
from .main_menu import RBoxMainMenuListener, RBoxPackageSendCodeCommand
from .render import RBoxRenderRm... | |
<|file_name|>PythonNatureStoreTest.java<|end_file_name|><|fim▁begin|>/**
* Copyright (c) 2005-2012 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Eclipse Public License (EPL).
* Please see the license.txt included with this distribution for details.
* Any modifications to this file mus... | "<pydev_pathproperty name=\"PyDevPluginID(null plugin).PROJECT_EXTERNAL_SOURCE_PATH\"/>\r\n"
+ |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>/*
* Copyright (C) 2015 Benjamin Fry <benjaminfry@me.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.<|fim▁hole|> *
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unle... | * You may obtain a copy of the License at |
<|file_name|>Rgaa30Rule011001.java<|end_file_name|><|fim▁begin|>/*
* Asqatasun - Automated webpage assessment
* Copyright (C) 2008-2020 Asqatasun.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free S... | * License, or (at your option) any later version.
* |
<|file_name|>example-pane-trigger.component.ts<|end_file_name|><|fim▁begin|>import { Component, ChangeDetectionStrategy, ViewChild, AfterViewInit } from '@angular/core';
import { DataService, Human } from '../data.service';
import { Observable } from 'rxjs';
import { Command, GridComponent, PaneComponent } from 'ng2-qg... | |
<|file_name|>instr_rsqrtps.rs<|end_file_name|><|fim▁begin|>use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
use ::test::run_test;
#[test]<|fim▁hole|>#[test]
fn rsqrtps_2() {
... | fn rsqrtps_1() {
run_test(&Instruction { mnemonic: Mnemonic::RSQRTPS, operand1: Some(Direct(XMM2)), operand2: Some(Direct(XMM6)), operand3: None, operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[15, 82, 214], OperandSize::Dword)
}
|
<|file_name|>damage-chart.rs<|end_file_name|><|fim▁begin|>use std::io::Write;
use world::{attack_damage, roll};
fn ev<F>(n: usize, f: F) -> f32
where
F: Fn(&mut rand::prelude::ThreadRng) -> f32,
{
let mut acc = 0.0;
let mut rng = rand::thread_rng();
for _ in 0..n {
acc += f(&mut rng);
}
... | fn main() {
print!(" "); |
<|file_name|>Metatable.go<|end_file_name|><|fim▁begin|>package lua<|fim▁hole|> TostringFunc Function
GCFunc Function
}
func (this *Metatable) Index() Function {
return this.IndexFunc
}
func (this *Metatable) Newindex() Function {
return this.NewindexFunc
}
func (this *Metatable) Tostring() Functio... |
type Metatable struct {
IndexFunc Function
NewindexFunc Function |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
This package supplies tools for working with automated services
connected to a server. It was written with IRC in mind, so it's not<|fim▁hole|>"""
__all__ = [
"irc",
"selector",
"connection",
"irc2num"
]<|fim▁end|> | very generic, in that it pretty much assumes a single client connected
to a central server, and it's not easy for a client to add further connections
at runtime (But possible, though you might have to avoid selector.Reactor.loop. |
<|file_name|>LSpec.java<|end_file_name|><|fim▁begin|>/*
* LSpec.java
*
* Created on April 24, 2007, 11:06 PM
*/
package org.das2.qds.util;
import java.util.LinkedHashMap;
import java.util.Map;
import org.das2.datum.Datum;
import org.das2.datum.Units;
import org.das2.qds.ArrayDataSet;
import org.das2.... | * @param lgrid desired uniform grid of L values.
* @param dir =1 increasing (outward) only, =-1 decreasing (inward) only, 0 both.
|
<|file_name|>mini.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import re
import traceback
class MiniObject(object):
def __init__(self, py_object, **meta):
( "The following python types map to the following mini types:\n"
" bool -> boolean\n"
" str -> ... | |
<|file_name|>bool.js<|end_file_name|><|fim▁begin|>/**
* This file is part of the Unit.js testing framework.
*
* (c) Nicolas Tallefourtane <dev@nicolab.net>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code
* or visit {@link http://uni... | * Expose all assertions
* @type {function}
* @param {mixed} actual Actual value tested |
<|file_name|>imp_warant_officer_ii_1st_class_33.py<|end_file_name|><|fim▁begin|>import sys
from services.spawn import MobileTemplate
from services.spawn import WeaponTemplate
from resources.datatables import WeaponType
from resources.datatables import Difficulty<|fim▁hole|>
def addTemplate(core):
mobileTemplate = Mob... | from resources.datatables import Options
from resources.datatables import FactionStatus
from java.util import Vector |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""
Example Directory
.. automodule:: pyatb.examples.get_current_price<|fim▁hole|><|fim▁end|> | """ |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate piston;
extern crate graphics;
extern crate glutin_window;
extern crate opengl_graphics;
use piston::window::WindowSettings;
use piston::event_loop::*;
use piston::input::*;
use glutin_window::GlutinWindow as Window;
use opengl_graphics::{ GlGraphics, Open... |
if let Some(u) = e.update_args() {
app.update(&u);
} |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setu... | |
<|file_name|>say.py<|end_file_name|><|fim▁begin|>import os
from .base import Output
class AppleSay(Output):
"""Speech output supporting the Apple Say subsystem."""
name = 'Apple Say'
def __init__(self, voice = 'Alex', rate = '300'):<|fim▁hole|> return not os.system('which say')
def speak(self, text, interrupt = 0... | self.voice = voice
self.rate = rate
super(AppleSay, self).__init__()
def is_active(self): |
<|file_name|>generate-data.py<|end_file_name|><|fim▁begin|>import pygraph.algorithms.generators as gen
import pygraph.algorithms.accessibility as acc
import pygraph.algorithms.minmax as minmax
graph = gen.generate(5000, 10000, weight_range=(50, 2000))
components = acc.connected_components(graph)
nodes = [g for g in gr... | |
<|file_name|>fake_esim_manager_remote.js<|end_file_name|><|fim▁begin|>// Copyright 2020 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.
cr.define('cellular_setup', function() {
/** @implements {ash.cellularSetup.mojom... | |
<|file_name|>mr.js<|end_file_name|><|fim▁begin|>// moment.js locale configuration
// locale : Marathi (mr)
// author : Harshad Kale : https://github.com/kalehv
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports ==... | monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'),
weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
|
<|file_name|>launchbar.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Tycho Andersen
# Copyright (c) 2014 dequis
# Copyright (c) 2014-2015 Joseph Razik
# Copyright (c) 2014 Sean Vig
# Copyright (c) 2015 reus
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and as... | |
<|file_name|>chapter_member.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from frappe.model.document import Document
<|fim▁hole|><|fim▁end|> | class ChapterMember(Document):
pass |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import * as angular from 'angular';
import {IRequestServiceProvider} from '../../common/utils/request-utils.provider';
import RecoveryPasswordComponent from './recovery-password.component';
import Core from '../../core';
import Utils from '../../common/utils';
export ... | |
<|file_name|>mod.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... | // Register obligations for the parameters. This will include the
// `Self` parameter, which in turn has a bound of the main trait,
// so this also effectively registers `obligation` as well. (We |
<|file_name|>elements.rs<|end_file_name|><|fim▁begin|>//! The elements of an Openstreetmap XML file.
//!
//! For now, the types only cotain a limited set of the most important
//! attributes.
use std::{borrow, hash, str};
use std::collections::{HashMap, HashSet};
//------------ Osm ----------------------------------... | |
<|file_name|>serverstats.js<|end_file_name|><|fim▁begin|>/**
*
*/
var $info = false;
function LoadServerStats() {
$.getJSON("phpsysinfo/xml.php?plugin=complete&json",
function (data) {
$info = data;
updateCPU($info.Vitals["@attributes"].LoadAvg, $info.Vitals["@attribut... | updateIP($info.Network.NetDevice);
updateUptime($info.Vitals["@attributes"].Uptime); |
<|file_name|>css.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|>reddit.rs<|end_file_name|><|fim▁begin|>extern crate ansi_term;
extern crate failure;
extern crate rawr;
use ansi_term::Colour::Blue;
use ansi_term::Colour::Green;
use ansi_term::Colour::Purple;
use configuration::Configuration;
use LibResult;
use rawr::options::ListingOptions;
use rawr::structures::com... | |
<|file_name|>badNgsi10Request_test.cpp<|end_file_name|><|fim▁begin|>/*
*
* Copyright 2013 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 Public Lic... | EXPECT_EQ("OK", testDataFromFile(expectedBuf, sizeof(expectedBuf), outfile1)) << "Error getting test data from '" << outfile1 << "'";
out = restService(&ci, rs); |
<|file_name|>ssid_traffic_history.py<|end_file_name|><|fim▁begin|>import time
import sqlite3
from base_model import BaseModel
from datetime import datetime
from contextlib import contextmanager
class SSIDTrafficHistory(BaseModel):
def __init__(self, dbfile, table_name, time_limit):
super(SSIDTrafficHistory, self)... | FROM {} |
<|file_name|>__init__.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 Apache... | # store the existing relationship between dashboards and charts
existing_relationships = session.execute(
select([dashboard_slices.c.dashboard_id, dashboard_slices.c.slice_id])
).fetchall() |
<|file_name|>events.service.ts<|end_file_name|><|fim▁begin|>import { Injectable } from '@angular/core';
/**
* Created by AAAA on 3/21/2017.
*/
//http://stackoverflow.com/questions/9671995/javascript-custom-event-listener
//http://www.typescriptlang.org/play/
class MyEvent{
private context:Object;
private cbs: ... | |
<|file_name|>app.component.ts<|end_file_name|><|fim▁begin|>import { Component, ViewChild } from '@angular/core';
import { Nav, Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { HomePage } from '../pages/home/home'... | this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available. |
<|file_name|>header.py<|end_file_name|><|fim▁begin|>import markdown
from markdown.blockprocessors import BlockProcessor
from markdown import util
import re
import logging
logger = logging.getLogger('MARKDOWN')
# copied from class markdown.blockprocessors.HashHeaderProcessor
class C2CHeaderProcessor(BlockProcessor):
... |
# Detect a header at start of any line in block
RE = re.compile(r'(^|\n)' |
<|file_name|>recipeEdit.js<|end_file_name|><|fim▁begin|>import _ from 'lodash';
import React from 'react';
import Reflux from 'reflux';
import { Navigation } from 'react-router';
import recipeActions from 'actions/recipe';
import recipeStore from 'stores/recipe';
import SapCalculator from 'components/sapCalculator';
... | }));
|
<|file_name|>Connection.js<|end_file_name|><|fim▁begin|>/**
The GPL License (GPL)
Copyright (c) 2012 Andreas Herz
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the Li... | * Return an objects with all important attributes for XML or JSON serialization
*
* @returns {Object} |
<|file_name|>containerView.ts<|end_file_name|><|fim▁begin|>/// <reference path="./fabricPlugin.ts"/>
/// <reference path="./profileHelpers.ts"/>
/// <reference path="./containerHelpers.ts"/>
/// <reference path="../../helpers/js/storageHelpers.ts"/>
/// <reference path="../../helpers/js/controllerHelpers.ts"/>
/// <ref... | localStorage: localStorage,
modelName: 'locationIdFilter',
paramName: 'locationIdFilter', |
<|file_name|>elementalid.py<|end_file_name|><|fim▁begin|>"""
XML handler for element id condition
"""
<|fim▁hole|>
# Third party modules.
# Local modules.
from pyhmsa.spec.condition.elementalid import ElementalID, ElementalIDXray
from pyhmsa.fileformat.xmlhandler.condition.condition import _ConditionXMLHandler
# Glob... | # Standard library modules. |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from django.conf import settings
from django.db import models
from django.core.urlresolvers import reverse
from django.db.models.signals import pre_save
from django.... | published_at = models.DateField(auto_now = False, auto_now_add = False)
updated = models.DateTimeField(auto_now = True, auto_now_add = False)
timestamp = models.DateTimeField(auto_now = False, auto_now_add = True) |
<|file_name|>comp_io.hpp<|end_file_name|><|fim▁begin|>#pragma once
//=====================================================================//
/*! @file
@brief R8C グループ・コンパレーター I/O 制御
@author 平松邦仁 (hira@rvf-rc45.net)
@copyright Copyright (C) 2015, 2017 Kunihito Hiramatsu @n
Released under the MIT license @n
... | } else {
WCB3INTR.WCB3INTEN = 0; |
<|file_name|>test.go<|end_file_name|><|fim▁begin|>/*
Reeve - Test Module
<|fim▁hole|>
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 req... | Copyright 2015 Evan Borgstrom |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright 2018 MaidSafe.net limited.
//
// This SAFE Network Software is licensed to you under The General Public License (GPL), version 3.
// Unless required by applicable law or agreed to in writing, the SAFE Network Software distributed
// under the GPL Licence is ... | let vec0 = unwrap!(generate_random_vector::<u8>(SIZE));
let vec1 = unwrap!(generate_random_vector::<u8>(SIZE)); |
<|file_name|>install.py<|end_file_name|><|fim▁begin|># $Id$
# installer for pmon<|fim▁hole|>def loader():
return ProcessMonitorInstaller()
class ProcessMonitorInstaller(ExtensionInstaller):
def __init__(self):
super(ProcessMonitorInstaller, self).__init__(
version="0.2",
name='p... | # Copyright 2014 Matthew Wall
from setup import ExtensionInstaller
|
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>mod data_vec;
pub mod array;
//pub mod error;
pub mod dimension;<|fim▁hole|><|fim▁end|> | pub mod matrix; |
<|file_name|>game.py<|end_file_name|><|fim▁begin|># painttheworld/game.py
#
# Represent and track the current game state.
import numpy as np
import datetime<|fim▁hole|>
''' Note that Latitude is North/South and Longitude is West/East'''
class GameState:
"""Keeps track of which teams have colored which areas of the... | import math
from painttheworld import constants
from painttheworld.constants import m1, m2, m3, m4, p1, p2, p3 |
<|file_name|>bit_packing.hh<|end_file_name|><|fim▁begin|>#ifndef UTIL_BIT_PACKING__
#define UTIL_BIT_PACKING__
/* Bit-level packing routines */
#include <assert.h>
#ifdef __APPLE__
#include <architecture/byte_order.h>
#elif __linux__
#include <endian.h>
#else
#include <arpa/nameser_compat.h>
#endif
#include <inttyp... | |
<|file_name|>bot.user.js<|end_file_name|><|fim▁begin|>/*
The MIT License (MIT)
Copyright (c) 2017 Adrian Paul Nutiu <nutiuadrianpaul@gmail.com>
http://adrianpaulnutiu.me/
*/
// ==UserScript==
// @name kartwars.io Bot
// @namespace https://github.com/kmataru/kartwars.io-bot/raw/pre-release/src/DracoolaArt.B... | jPlayButton.addClass('btn-none');
jPlayButton.after("<a href=\"#\" id=\"loading-bot\" class=\"btn btn-play btn-loading-bot\">Loading Bot. Please wait!</a>");
};
document.head.appendChild(remoteLink); |
<|file_name|>test_in_out.py<|end_file_name|><|fim▁begin|>from __future__ import print_function, division
from brian import (Network, NeuronGroup, SpikeMonitor,
PoissonGroup, Connection,
mV, ms, Hz)
import sys
import matplotlib.pyplot as plt
import numpy as np
import itertools as it... | reset = 0*mV
configs = [c for c in itt.product(Nin, fin, win)] |
<|file_name|>state_compatibility_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2018 The Kubernetes 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/LI... | t.Fatalf("could not create new file state: %v", err)
} |
<|file_name|>statefulset_utils.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 The Kubernetes 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... | c clientset.Interface
} |
<|file_name|>decorators.py<|end_file_name|><|fim▁begin|>class PermissionRequired(Exception):
"""
Exception to be thrown by views which check permissions internally.
Takes a single C{perm} argument which defines the permission that caused
the exception.
"""
def __init__(self, perm):
self.... | |
<|file_name|>media.py<|end_file_name|><|fim▁begin|>class movie:
"""Stores movie metadata"""
# The constructor takes
# - The Title
# - The youtube trailer
# - The poster image URL<|fim▁hole|> def __init__(self, title, youtube_trailer, poster_url):
self.title = title
self.t... | |
<|file_name|>transitionevent.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... | }
// https://dom.spec.whatwg.org/#dom-event-istrusted
fn IsTrusted(&self) -> bool { |
<|file_name|>segmentation_helper.py<|end_file_name|><|fim▁begin|>import cPickle as pkl
import networkx as nx
import numpy as np
import os
import scipy.spatial
from ..handler.basics import chunkify
from ..processing.general import single_conn_comp_img
from syconnmp.shared_mem import start_multiprocess_obj, start_multipr... | |
<|file_name|>tag_map.py<|end_file_name|><|fim▁begin|># encoding: utf8
from __future__ import unicode_literals
from ..symbols import *
TAG_MAP = {
# Explanation of Unidic tags:
# https://www.gavo.t.u-tokyo.ac.jp/~mine/japanese/nlp+slp/UNIDIC_manual.pdf
# Universal Dependencies Mapping:
# http://univer... | |
<|file_name|>Runner.java<|end_file_name|><|fim▁begin|>package org.orchestra.sm;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Ent... | public Runner(String command, List<String> args, Map<String, String> env, String workDir) {
this.command.add(command);
if(args != null) this.command.addAll(args);
this.env = env; |
<|file_name|>regen_atom_macro.py<|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/.
import re
import sys
if len(sys.argv) != 2:
print "us... |
with open(objdir_path + "/dist/include/nsGkAtomList.h") as f:
lines = [line for line in f.readlines() if line.startswith("GK_ATOM")] |
<|file_name|>PerforceURLProvider.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# Copyright 2021 Elliot Jordan
#
# 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.ap... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>from art_helpers.instructions_helper import InstructionsHelper, InstructionsHelperException
from art_helpers.program_helper import ProgramHelper, ProgramHelperException
from art_helpers.art_robot_helper import ArtRobotArmHelper, ArtRobotHelper, UnknownRobot,\
Ro... | |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-co... | files: {
'css/bootstrap-timepicker.min.css': ['less/*.less']
}
} |
<|file_name|>serialposix.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# backend for serial IO for POSIX compatible systems, like Linux, OSX
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2001-2016 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
#
#... | import array |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import
from django.core.exceptions import PermissionDenied
from django.db import models
from django.contrib.auth import authenticate
from django.contrib.sites.models import Site
from django.utils.encoding import python_2_unicode_compat... | authentication handshake. Note that this state may end up in the
url -- do not put any secrets in here. It currently only contains |
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
bowercopy: {
options: {
clean: false
},
glob: {
files: {
'static/libs/... | } |
<|file_name|>image_cache.py<|end_file_name|><|fim▁begin|># Author: Nic Wolfe <nic@wolfeden.ca>
# URL: https://sickrage.tv
# Git: https://github.com/SickRage/SickRage.git
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | if need_images[self.POSTER] or need_images[self.BANNER] or need_images[self.FANART]: |
<|file_name|>play_all_manual_examples.py<|end_file_name|><|fim▁begin|>import os
import sys
import time
import inspect
from pyo import *
# To automate audio output validation, every random has to be properly
# seeded for the examples to be determinitic.
def play_example(cls, dur=5, toprint=True, double=False):
"""... | toprint: boolean, optional
If True, the example script will be printed to the console.
Defaults to True. |
<|file_name|>PhotoShotRecyclerView.java<|end_file_name|><|fim▁begin|>package com.lht.dot.ui.view;
import android.content.Context;
import android.support.annotation.Nullable;<|fim▁hole|>
import com.bumptech.glide.Glide;
/**
* Created by lht-Mac on 2017/7/11.
*/
public class PhotoShotRecyclerView extends RecyclerVie... | import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View; |
<|file_name|>check_rec_stream.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#-*- coding: utf-8 -*-
import time
__author__ = 'mah'
__email__ = 'andrew.makhotin@gmail.com'
import MySQLdb as mdb
import sys
import ConfigParser
import logging
import logging.handlers
import re
import os
from ffprobe import FFProbe
... | |
<|file_name|>simple_example_synapses.py<|end_file_name|><|fim▁begin|>from brian2 import *
import brian2genn
set_device('genn', directory='simple_example_synapses')
#set_device('cpp_standalone')
N = 100
tau = 10*ms
eqs = '''
dV/dt = -V/tau + Iin/tau : 1
Iin : 1
'''
G = NeuronGroup(N, eqs, threshold='V>1', reset='V=0',... | p_pre = 30
S2 = Synapses(G2, G,
model=''' |
<|file_name|>bigint.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/lic... | let u = FromPrimitive::from_usize(403469000 + 3513).unwrap();
for _ in 0..1000 {
let n: BigUint = rng.gen_biguint_below(&u); |
<|file_name|>PRTO.cpp<|end_file_name|><|fim▁begin|>#include "simulation/Elements.h"
//#TPT-Directive ElementClass Element_PRTO PT_PRTO 110
Element_PRTO::Element_PRTO()
{
Identifier = "DEFAULT_PT_PRTO";
Name = "PRTO";
Colour = PIXPACK(0x0020EB);
MenuVisible = 1;
MenuSection = SC_SPECIAL;
Enabled ... |
Element_PRTO::~Element_PRTO() {} |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>/* @flow */
import * as React from 'react';
import Link from 'amo/components/Link';
import { addParamsToHeroURL, checkInternalURL } from 'amo/utils';
import tracking from 'core/tracking';
import LoadingText from 'ui/components/LoadingText';
import type {
HeroCallToA... | </Link>
)}
{!headline && ( |
<|file_name|>helpers.py<|end_file_name|><|fim▁begin|>import os.path
from flask import url_for
from npactflask import app
<|fim▁hole|>def vSTATIC():
def STATICV(filename):
if app.config['DEBUG']:
vnum = os.path.getmtime(os.path.join(app.static_folder, filename))
else:
vnum =... |
# TODO: I think this is more simply a template_global:
# http://flask.pocoo.org/docs/0.10/api/#flask.Flask.template_global
@app.context_processor |
<|file_name|>sutherland_viscosity_vec_unit.C<|end_file_name|><|fim▁begin|>//-----------------------------------------------------------------------bl-
//--------------------------------------------------------------------------
//
// Antioch - A Gas Dynamics Thermochemistry Library
//
// Copyright (C) 2013 The PECOS De... | vectester (MetaPhysicL::NumberArray<2*ANTIOCH_N_TUPLES, float> (0), "NumberArray<float>");
returnval = returnval ||
vectester (MetaPhysicL::NumberArray<2*ANTIOCH_N_TUPLES, double> (0), "NumberArray<double>"); |
<|file_name|>config_test.go<|end_file_name|><|fim▁begin|>/*
Copyright 2014 The Kubernetes 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
Un... | } |
<|file_name|>ar.js<|end_file_name|><|fim▁begin|>/*!
* froala_editor v3.0.6 (https://www.froala.com/wysiwyg-editor)
* License https://froala.com/wysiwyg-editor/terms/
* Copyright 2014-2019 Froala Labs
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('... | 'Grinning face with smiling eyes': "\u0645\u0628\u062A\u0633\u0645\u0627 \u0648\u062C\u0647 \u0645\u0639 \u064A\u0628\u062A\u0633\u0645 \u0627\u0644\u0639\u064A\u0646", |
<|file_name|>errorevent.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::cell::DOMRefCell;
use dom::bindings::co... | }
|
<|file_name|>index.present.js<|end_file_name|><|fim▁begin|>var present = require('present-express');
var Base = require('./base');
module.exports = present.extend(Base, function(data) {<|fim▁hole|> if (data.title) {
this.data.title = data.title;
}
})<|fim▁end|> | |
<|file_name|>examples.py<|end_file_name|><|fim▁begin|># coding: utf8
from prov.model import ProvBundle, Namespace, Literal, PROV, XSD, Identifier
import datetime
def primer_example():
# https://github.com/lucmoreau/ProvToolbox/blob/master/prov-n/src/test/resources/prov/primer.pn
#=============================... | def w3c_publication_2():
# https://github.com/lucmoreau/ProvToolbox/blob/master/asn/src/test/resources/prov/w3c-publication2.prov-asn
#===========================================================================
# bundle |
<|file_name|>json_serializer_test.js<|end_file_name|><|fim▁begin|>var get = Ember.get, set = Ember.set;
var Post, post, Comment, comment, env;
module("integration/serializer/json - JSONSerializer", {
setup: function() {
Post = DS.Model.extend({
title: DS.attr('string'),
comments: DS.hasMany('comment'... |
test("serializeAttribute respects keyForAttribute", function() {
env.container.register('serializer:post', DS.JSONSerializer.extend({ |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import versioneer
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def init... | 'console_scripts': [
'registry=registry.cli:main' |
<|file_name|>iam_grant_access.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# 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
#
# http://www.apache.org/... | # Add the given member with access permissions.
policy.bindings.add(role="roles/secretmanager.secretAccessor", members=[member]) |
<|file_name|>libssl.cc<|end_file_name|><|fim▁begin|>#include "config.h"
#include "libssl.hh"
#ifdef HAVE_LIBSSL
#include <atomic>
#include <fstream>
#include <cstring>
#include <mutex>
#include <pthread.h>
#include <openssl/conf.h>
#include <openssl/err.h>
#include <openssl/ocsp.h>
#include <openssl/rand.h>
#include... | }
if (!config.d_ciphers.empty() && SSL_CTX_set_cipher_list(ctx.get(), config.d_ciphers.c_str()) != 1) {
throw std::runtime_error("The TLS ciphers could not be set: " + config.d_ciphers); |
<|file_name|>a.cpp<|end_file_name|><|fim▁begin|>#include <bits/stdc++.h>
using namespace std;
#ifndef int64
#define int64 long long
#endif
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
int64 h1, h2, a, b;
cin >> h1 >> h2 >> a >> b;
h1 += a * 8;
if (a <= b && h1 < h2)... | |
<|file_name|>assert-trailing-junk.rs<|end_file_name|><|fim▁begin|>// Ensure assert macro does not ignore trailing garbage.
//
// See https://github.com/rust-lang/rust/issues/60024 for details.
fn main() {
assert!(true some extra junk, "whatever");
//~^ ERROR expected one of
assert!(true some extra junk);
... | } |
<|file_name|>SettlementDetails88.go<|end_file_name|><|fim▁begin|>package iso20022
<|fim▁hole|>type SettlementDetails88 struct {
// Indicates the date as known by the two parties to be used for matching purposes when settlement of securities occurs.
TradeDate *ISODateTime `xml:"TradDt"`
// Provides details on eithe... | // Parameters which explicitly state the conditions that must be fulfilled before a particular transaction of a financial instrument can be settled. These parameters are defined by the instructing party in compliance with settlement rules in the market the transaction will settle in. |
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright© 2016 ICTSTUDIO <http://www.ictstudio.eu>
# License: AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": 'Operating Unit - Changeable Invoice Line',
"version": "8.0.1.0.0",
"summary": "Default use operat... | "views/account_invoice.xml",
],
} |
<|file_name|>asset-deserializer.js<|end_file_name|><|fim▁begin|>'use strict'
import ObjectUtils from 'es-common-core/object-utils';
import Asset from 'rpgmv-asset-manager-core/datas/asset';
import AssetFileDeserializer from 'rpgmv-asset-manager-core/datas/asset-file-deserializer';
/**
* Asset Manager MV
* アセットデシリアライ... | var files = [];
for (var i = 0; i < data.files.length; i++) { |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|>"""Support Google Home units."""
import logging
import asyncio
import voluptuous as vol
from homeassistant.const import CONF_DEVICES, CONF_HOST
from homeassistant.helpers import discovery
import homeassistant.helpers.config_validation as cv
from homeassistant.helpe... | _LOGGER.debug("Updating Google Home info for %s", host)
session = async_get_clientsession(self.hass) |
<|file_name|>cseq_test.go<|end_file_name|><|fim▁begin|>// Copyright 2011, Shelby Ramsey. All rights reserved.
// Use of this code is governed by a BSD license that can be
// found in the LICENSE.txt file.
package sipparser
// Imports from the go standard library
import (
"testing"
)
func TestCseq(t *testing.T) {
... | t.Errorf("[TestCseq] Error parsing cseq: \"100 INVITE\". Method should be \"INVITE\".") |
<|file_name|>hello_world.rs<|end_file_name|><|fim▁begin|>use nickel::{Nickel, HttpRouter, Request, Response, MiddlewareResult};
fn hello_world(_req: &mut Request, res: Response) -> MiddlewareResult {
res.send("Hello World")
}
#[tokio::main]
async fn main() {<|fim▁hole|> server.get("**", hello_world);
serve... | let mut server = Nickel::new(); |
<|file_name|>test_reset_password.py<|end_file_name|><|fim▁begin|>from djangosanetesting.cases import HttpTestCase
from django.conf import settings
from django.core.urlresolvers import reverse
from django.core import mail
from accounts.tests import testdata
class TestResetPassword(HttpTestCase):
def __init__(self, ... | |
<|file_name|>h2o.init_test.py<|end_file_name|><|fim▁begin|>from __future__ import print_function
import sys
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
from h2o.utils.typechecks import assert_is_type
from h2o.exceptions import H2OConnectionError, H2OServerError, H2OValueError
import tempfil... | print("error message type is {0} and the error message is \n".format(e.__class__.__name__, e.args[0]))
assert_is_type(e, H2OConnectionError)
try: |
<|file_name|>project.rs<|end_file_name|><|fim▁begin|>// (c) 2016 Productize SPRL <joost@productize.be>
// extension: .pro
// format: special project format
// first line starts with:
// update=<|fim▁hole|>
// get from parent
use {str_error, KicadError};
/// a Kicad project
#[derive(Debug)]
pub struct Project {
/... | |
<|file_name|>tnaflix.py<|end_file_name|><|fim▁begin|>from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
fix_xml_ampersands,
)
class TNAFlixIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?tnaflix\.com/(?P<cat_id>[\w-]+)/(?P<displ... |
_TITLE_REGEX = r'<title>(.+?) - TNAFlix Porn Videos</title>' |
<|file_name|>CompleteCmd.cpp<|end_file_name|><|fim▁begin|>// Copyright (C) 2015 xaizek <xaizek@posteo.net>
//
// This file is part of dit.
//
// dit is free software: you can redistribute it and/or modify
// it under the terms of version 3 of the GNU Affero General Public
// License as published by the Free Software Fo... | namespace { |
<|file_name|>workerlocation.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::WorkerLocationBi... | // https://html.spec.whatwg.org/multipage/#worker-locations |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.