prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>app.js<|end_file_name|><|fim▁begin|>var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var api = require('./routes/api');
var app = expr... | });
|
<|file_name|>tags_test.go<|end_file_name|><|fim▁begin|>package docker
import (
"testing"
)
func TestLookupImage(t *testing.T) {
runtime, err := newTestRuntime()
if err != nil {
t.Fatal(err)
}
defer nuke(runtime)
if img, err := runtime.repositories.LookupImage(unitTestImageName); err != nil {
t.Fatal(err)
... | |
<|file_name|>test_volume_boot_pattern.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
#<|fim▁hole... | # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
<|file_name|>custom_delay.rs<|end_file_name|><|fim▁begin|>use std::{thread, time};
<|fim▁hole|>
impl Delay for CustomDelay {
fn delay_ns(ns: u16) {
thread::sleep(time::Duration::new(0, u32::from(ns)));
}
}<|fim▁end|> | use clerk::Delay;
pub struct CustomDelay; |
<|file_name|>BoundNodeCallbackObservable.ts<|end_file_name|><|fim▁begin|>import {Observable} from '../Observable';
import {Subscriber} from '../Subscriber';
import {Subscription} from '../Subscription';
import {Scheduler} from '../Scheduler';
import {tryCatch} from '../util/tryCatch';
import {errorObject} from '../util... | if (err) {
subject.error(err);
} else if (selector) {
const result = tryCatch(selector).apply(this, innerArgs); |
<|file_name|>agent.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
// The go-ethereum library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free S... |
func (self *CpuAgent) GetHashRate() int64 { |
<|file_name|>RouletteMaker.py<|end_file_name|><|fim▁begin|>index = 20
bets = 25
names = ("Plain", "Cheval H", "Cheval V", "Trans", "Trans S", "Carre", "Colonne", "Simple")
for bet in range(bets):
col = 40
# --------------------------------------- money
print("""
when %d =>
if bets_index > %d then
... | col += 1
# --------------------------------------- name
col += 1 |
<|file_name|>index.js<|end_file_name|><|fim▁begin|>import Colors from './Colors';
import Fonts from './Fonts';
import Metrics from './Metrics';<|fim▁hole|>import Images from './Images';
import ApplicationStyles from './ApplicationStyles';
export { Colors, Fonts, Images, Metrics, ApplicationStyles };<|fim▁end|> | |
<|file_name|>privacyCheckOnTypeParameterReferenceInConstructorParameter.js<|end_file_name|><|fim▁begin|>//// [privacyCheckOnTypeParameterReferenceInConstructorParameter.ts]
export class A<T1>{
constructor(callback: (self: A<T1>) => void) {
var child = new B(this);
}
}
export class B<T2> {<|fim▁hole|>/... | constructor(parent: T2) { }
}
|
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute... | def _configure_module(self, module_name, module_args, task_vars=None):
''' |
<|file_name|>AboutPage.js<|end_file_name|><|fim▁begin|>import React from 'react';
import {Link} from 'react-router';
import '../../styles/about-page.css';
<|fim▁hole|> return (
<div>
<h2 className="alt-header">About</h2>
<p>
This example app is part of the <a href="https://github.com/coryhouse/... | // Since this component is simple and static, there's no parent container for it.
const AboutPage = () => { |
<|file_name|>AllMembershipGroup.js<|end_file_name|><|fim▁begin|>module.exports = {
attributes: {
group: {
model: 'Group'
},
user: {
model: 'User'
},
synchronized: 'boolean',<|fim▁hole|> child_group: {
model: 'Group'
},
... | active: 'boolean', |
<|file_name|>merchant.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# 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... | my_port = config.getint('main','port')
database = config.get('sqlite3','database')
|
<|file_name|>ListContainersCmdHeaderTest.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 fi... | Mockito.verify(mockObject, Mockito.times(1)).withSince(Matchers.eq(since));
Mockito.verify(mockObject, Mockito.times(1)).withBefore(Matchers.eq(before));
} |
<|file_name|>mdn.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
from collections import defaultdict
import json
import logging
from ._compat import ElementTree, urlopen
MDN_SITEMAP = 'https://developer.mozilla.org/sitemaps/en-US/sitemap.xml'
SITEMAP_NS = 'http://www.sitemaps.org/schemas/sitemap/0.9'
log = l... | continue
url_suffix = url[81:]
parts = url_suffix.split('/') |
<|file_name|>v5.py<|end_file_name|><|fim▁begin|>from common2 import *
# NAME IDEA -> pooling/random/sparse/distributed hebbian/horde/crowd/fragment/sample memory
# FEATURES:
# + boost -- neurons with empty mem slots learn faster
# + noise --
# + dropout -- temporal disabling of neurons
# + decay -- remove from mem
#... |
def fit(self, X, Y):
cfg = self.cfg
for x,y in zip(X,Y): |
<|file_name|>uri.py<|end_file_name|><|fim▁begin|># vi: ts=8 sts=4 sw=4 et
#
# uri.py: various URI related utilties
#
# This file is part of Draco2. Draco2 is free software and is made available
# under the MIT license. Consult the file "LICENSE" that is distributed
# together with this file for the exact licensing term... | return query
|
<|file_name|>safemap_test.go<|end_file_name|><|fim▁begin|>// Copyright © 2011-12 Qtrac Ltd.
//
// This program or package and any associated files are licensed under the
// Apache License, Version 2.0 (the "License"); you may not use these files
// except in compliance with the License. You can get a copy of the Licen... | |
<|file_name|>hg-to-git.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
""" hg-to-git.py - A Mercurial to GIT converter
Copyright (C)2007 Stelian Pop <stelian@popies.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publ... |
sock = os.popen('hg tip --template "{rev}"')
tip = sock.read() |
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>pub use self::d3d11_0::*;
mod d3d11_0;
#[cfg(feature = "d3d11_1")]
pub use self::d3d11_1::*;
#[cfg(feature = "d3d11_1")]
mod d3d11_1;
#[cfg(feature = "d3d11_2")]
pub use self::d3d11_2::*;
#[cfg(feature = "d3d11_2")]
mod d3d11_2;
<|fim▁hole|>mod d3d11_3;<|fim▁end|> | #[cfg(feature = "d3d11_3")]
pub use self::d3d11_3::*;
#[cfg(feature = "d3d11_3")] |
<|file_name|>ItemCompShovel.java<|end_file_name|><|fim▁begin|>package com.iblowuptnt.tntMods.item;
import com.google.common.collect.Sets;
import com.iblowuptnt.tntMods.creativetab.CreativeTab;
import com.iblowuptnt.tntMods.reference.Material;
import com.iblowuptnt.tntMods.reference.Name;
import com.iblowuptnt.tntMods.... | import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister; |
<|file_name|>cc_salt_minion.py<|end_file_name|><|fim▁begin|># vi: ts=4 expandtab
#
# Copyright (C) 2014 Amazon.com, Inc. or its affiliates.
#
# Author: Jeff Bauer <jbauer@rubic.com>
# Author: Andrew Jorgensen <ajorgens@amazon.com>
#
# This program is free software: you can redistribute it and/or modify
# ... | # for config change. |
<|file_name|>setting.controller.js<|end_file_name|><|fim▁begin|>import Setting from '../models/setting';<|fim▁hole|>export function getSettings(req, res) {
Setting.find({ disable: false }).exec((err, settings) => {
if(err) {
res.json({ settings: [] });
} else {
res.json({ settings });
}
})
}... | import KhongDau from 'khong-dau';
|
<|file_name|>photos.js<|end_file_name|><|fim▁begin|>/* global $:true */
+ function($) {
var defaults;
var Photos = function(config) {
this.initConfig(config);
this.index = 0;
}
Photos.prototype = {
initConfig: function (config) {
this.config = $.extend({}, defaults, config);
this.acti... | tpl: '<div class="weui-photo-browser-modal">\ |
<|file_name|>cvs.py<|end_file_name|><|fim▁begin|># CVS conversion code inspired by hg-cvs-import and git-cvsimport
import os, locale, re, socket
from cStringIO import StringIO
from mercurial import util
from common import NoRepo, commit, converter_source, checktool
class convert_cvs(converter_source):
def __init... | |
<|file_name|>parse_shebang_test.py<|end_file_name|><|fim▁begin|>from __future__ import annotations
import contextlib
import os.path
import shutil
import sys
import pytest
from pre_commit import parse_shebang
from pre_commit.envcontext import envcontext
from pre_commit.envcontext import Var
from pre_commit.util impor... | |
<|file_name|>node_identifier_test.rs<|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.
*/
use common::FileKey;
use graphql_ir::{build, ExecutableDefinition... | |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>#![feature(nll)]
#![feature(native_link_modifiers)]
#![doc(html_root_url = "https://doc.rust-lang.org/nightly/nightly-rustc/")]
// NOTE: This crate only exists to allow linking on mingw targets.
use libc::{c_char, size_t};
use std::cell::RefCell;
use std::slice;
#[rep... | LLVMInitializeX86AsmParser
);
init_target!(
llvm_component = "arm", |
<|file_name|>array.d.ts<|end_file_name|><|fim▁begin|>/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license<|fim▁hole|><|fim▁end|> | */
/** Wraps the provided value in an array, unless the provided value is an array. */
export declare function coerceArray<T>(value: T | T[]): T[]; |
<|file_name|>oneview.py<|end_file_name|><|fim▁begin|># Copyright 2016 Intel Corporation
# Copyright 2015 Hewlett Packard Development Company, LP
# Copyright 2015 Universidade Federal de Campina Grande
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complia... | 'resources allocation in OneView.')), |
<|file_name|>Argonauta.java<|end_file_name|><|fim▁begin|>/*
* ISABEL: A group collaboration tool for the Internet
* Copyright (C) 2011 Agora System S.A.
*
* This file is part of Isabel.
*
* Isabel is free software: you can redistribute it and/or modify
* it under the terms of the Affero GNU General Public Lice... | filter = new FileNameExtensionFilter("Office", "ppt", "pptx", "doc",
"docx");
fc.addChoosableFileFilter(filter); |
<|file_name|>test.py<|end_file_name|><|fim▁begin|>import numpy as np
import cv2
from sys import argv
class Test:
def __init__(self, name, image):
self.image = image
self.name = name
self.list = []
def add(self, function):
self.list.append(function)
def run(sel... | cv2.waitKey()
self.image = function(self.image)
cv2.imshow(self.name, self.image)
cv2.waitKey()
|
<|file_name|>_createAggregator.js<|end_file_name|><|fim▁begin|>var arrayAggregator = require('./_arrayAggregator'),
baseAggregator = require('./_baseAggregator'),
baseIteratee = require('./_baseIteratee'),
isArray = require('./isArray');
/**
* Creates a function like `_.groupBy`.
*
* @private
... | return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator,
accumulator = initializer ? initializer() : {};
|
<|file_name|>dates.js<|end_file_name|><|fim▁begin|>/**
* @arliteam/arli v0.2.1
* https://github.com/arliteam/arli
*
* Copyright (c) Mohamed Elkebir (https://getsupercode.com)
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*... | * 30 12 2000 | 30 12 99
* |
<|file_name|>shader_source.rs<|end_file_name|><|fim▁begin|><|fim▁hole|>use gfx;
pub static VERTEX_SRC: gfx::ShaderSource = shaders! {
GLSL_150: b"
#version 150 core
in vec3 pos;
out vec2 v_uv;
uniform mat4 model_view_projection;
void main() {
gl_Position = model_view_projection * vec4(pos, 1.0);
}
"
};
pub s... | |
<|file_name|>GetPrefs.java<|end_file_name|><|fim▁begin|>package com.kensenter.p2poolwidget;
import android.content.Context;
import android.content.SharedPreferences;
<|fim▁hole|>public class GetPrefs {
public static final String PREFS_NAME = "p2poolwidgetprefs";
public String GetWidget(Context ctxt, int Widge... | |
<|file_name|>logout-test.js<|end_file_name|><|fim▁begin|>import Ember from "ember";
import { module, test } from 'qunit';
import startApp from '../helpers/start-app';
import { authenticateSession } from 'code-corps-ember/tests/helpers/ember-simple-auth';
import indexPage from '../pages/index';
<|fim▁hole|>
module('Acce... | let application; |
<|file_name|>convert_string_literal.rs<|end_file_name|><|fim▁begin|>use rstest::*;
use std::net::SocketAddr;
#[rstest]
#[case(true, "1.2.3.4:42")]
#[case(true, r#"4.3.2.1:24"#)]
#[case(false, "[2001:db8:85a3:8d3:1319:8a2e:370:7348]:443")]
#[case(false, r#"[2aa1:db8:85a3:8af:1319:8a2e:375:4873]:344"#)]
#[case(false, "t... | |
<|file_name|>convertingRawFStringQuotes_after.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | s = rf"f<caret>oo{'bar'}" |
<|file_name|>TruffleExceptionTest.java<|end_file_name|><|fim▁begin|>/*
* Copyright (c) 2020, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
*
* Subject to the condition set forth below... | for (int i = 0; i < stack.size(); i++) {
Object stackTraceElementObject = exceptions.readArrayElement(stackGuestObject, i); |
<|file_name|>test_case_operands.py<|end_file_name|><|fim▁begin|>import pytest, sys, os
sys.path.append(os.path.dirname(os.path.realpath(__file__)) + "/../")
from unittest import TestCase
from pylogic.case import Case
class TestBaseOperand(TestCase):
def test_eq_case(self):
case1 = Case("parent", "homer", ... | case2 = Case("parent", "homer", "bart")
assert case1 == case2
|
<|file_name|>git_cl_unittest.py<|end_file_name|><|fim▁begin|># Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from webkitpy.common.net.git_cl import GitCL
from webkitpy.common.system.execut... | |
<|file_name|>LuceneTestFixture.cpp<|end_file_name|><|fim▁begin|>/////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2009-2011 Alan Wright. All rights reserved.
// Distributable under the terms of either the Apache License (Version 2.0)
// or the GNU Lesser General Public Licen... | DateTools::setDateOrder(DateTools::DATEORDER_LOCALE);
if (ConcurrentMergeScheduler::anyUnhandledExceptions()) |
<|file_name|>web_media_stream_audio_sink.cc<|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.
#include "third_party/blink/public/platform/modules/mediastream/web_media_stream_... | DCHECK(track.Source().GetType() == blink::WebMediaStreamSource::kTypeAudio); |
<|file_name|>ko.js<|end_file_name|><|fim▁begin|>/*
<|fim▁hole|>Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'sourcearea', 'ko', {
toolbar: '소스'
} );<|fim▁end|> | |
<|file_name|>dataviz-spec.js<|end_file_name|><|fim▁begin|>/* globals: sinon */
var expect = require("chai").expect;
var Keen = require("../../../../src/core"),
keenHelper = require("../../helpers/test-config");
describe("Keen.Dataviz", function(){
beforeEach(function(){
this.project = new Keen({
proj... | it("should get the current color set", function(){ |
<|file_name|>malware_bazaar_search.py<|end_file_name|><|fim▁begin|>#python imports
import sys
import os
import time
import datetime
import subprocess
import json
import requests
from termcolor import colored<|fim▁hole|>
#third-party imports
#No third-party imports
#programmer generated imports
from logger import logge... | |
<|file_name|>plusminus.py<|end_file_name|><|fim▁begin|># Given code
n = int(input().strip())
arr = [int(arr_temp) for arr_temp in input().strip().split(' ')]
# Start
pos = 0.0
zero = 0.0
neg = 0.0
for i in arr:
if i == 0:
zero += 1<|fim▁hole|> elif i > 0:
pos += 1
else:
neg += 1
pri... | |
<|file_name|>realtime.js<|end_file_name|><|fim▁begin|>$(function() {
// When we're using HTTPS, use WSS too.
$('#all_messages').scrollTop($('#all_messages')[0].scrollHeight);
var to_focus = $("#message");
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
var chatsock = new Reconne... | //update logged in users list
user_list = data.payload.members; |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>"""Django module for the OS2datascanner project."""<|fim▁end|> | |
<|file_name|>exceptions.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | class PayPalFailure(Exception): pass |
<|file_name|>framedImage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
# coding: utf-8
import gi
gi.require_version('CinnamonDesktop', '3.0')
from gi.repository import Gtk, GdkPixbuf, Gio, GLib, GObject, Gdk
from util import utils, trackers
MAX_IMAGE_SIZE = 320
MAX_IMAGE_SIZE_LOW_RES = 200
class FramedImage(G... | pixbuf = None
scaled_max_size = self.max_size * self.get_scale_factor()
|
<|file_name|>configuration.test.js<|end_file_name|><|fim▁begin|>'use strict';
const chai = require('chai'),
expect = chai.expect,
config = require('../config/config'),
Support = require('./support'),
dialect = Support.getTestDialect(),
Sequelize = Support.Sequelize,
fs = require('fs'),
path = require('pa... | return Sequelize.Promise.promisify(fs.unlink)(p);
});
}); |
<|file_name|>models.py<|end_file_name|><|fim▁begin|>from django.db import models
from django.utils import timezone
from django.contrib import admin
from packages.generic import gmodels
from packages.generic.gmodels import content_file_name,content_file_name_same
from datetime import datetime
from django.core.validators... | import os
import Image as PImage
|
<|file_name|>utils.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
"""
Created on Wed Aug 19 17:08:36 2015
@author: jgimenez
"""
from PyQt4 import QtGui, QtCore
import os
import time
import subprocess
types = {}
types['p'] = 'scalar'
types['U'] = 'vector'
types['p_rgh'] = 'scalar'
types['k'] = 'scalar'
types... |
def get_screen_resolutions(): |
<|file_name|>topology.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import ipaddress
__all__ = [
'config_to_map',
'get_region'
]
def config_to_map(topology_config):
"""
args:
topology_config: dict
{
'region1': [
'10.1.1.0/24',
... | raises:
ValueError: raised by ipaddress if ip_str isn't a valid IP address
""" |
<|file_name|>liste.py<|end_file_name|><|fim▁begin|># -*-coding:Utf-8 -*
# Copyright (c) 2013 LE GOFF Vincent
# 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 m... | |
<|file_name|>test_passthrough.py<|end_file_name|><|fim▁begin|># #!/usr/bin/env python
# -*- coding: utf-8 -*-
# <HTTPretty - HTTP client mock for Python>
# Copyright (C) <2011-2018> Gabriel Falcão <gabriel@nacaolivre.org>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this softw... | (response4.content).should.equal(response1.content)
|
<|file_name|>shapes_test.py<|end_file_name|><|fim▁begin|># coding=utf-8
# Copyright 2022 The Trax 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/licens... | |
<|file_name|>gui_basic.py<|end_file_name|><|fim▁begin|>import pygame, sys
from pygame.locals import *
import re
import json
import imp
import copy
#chessboard = json.load(open("./common/initial_state.json"))
chessboard1 = json.load(open("./common/initial_state.json"))
chessboard2 = json.load(open("./common/initial... | helper = imp.load_source('helper_functions','./common/helper_functions.py') |
<|file_name|>lcg128xsl64.rs<|end_file_name|><|fim▁begin|>use rand_core::{RngCore, SeedableRng};
use rand_pcg::{Lcg128Xsl64, Pcg64};
#[test]
fn test_lcg128xsl64_advancing() {
for seed in 0..20 {
let mut rng1 = Lcg128Xsl64::seed_from_u64(seed);
let mut rng2 = rng1.clone();
for _ in 0..20 {
... | rng2.advance(20); |
<|file_name|>djvutext.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python3
"""
This bot uploads text from djvu files onto pages in the "Page" namespace.
It is intended to be used for Wikisource.
The following parameters are supported:
-index:... name of the index page (without the Index: prefix)
-djvu:... ... | options[opt[1:]] = True |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 1.9.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.dja... |
STATIC_ROOT = os.path.join(BASE_DIR, "public/static")
|
<|file_name|>zcopy.js<|end_file_name|><|fim▁begin|>jQuery( document ).ready(function($) {
/*
$( ".show-button" ).each(function() {
var id=jQuery(this).attr("id");
console.log('#copy-'+id);
$('#copy-'+id).zclip({
path:Drupal.settings.zclipcopy.moviepath,
copy:function(){<|fim▁hole|> retu... | conslode.log($('#copy-'+id).text()); |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|>from setuptools import setup, find_packages
setup(name='BIOMD0000000360',
version=20140916,<|fim▁hole|> packages=find_packages(),
package_data={'': ['*.xml', 'README.md']},
)<|fim▁end|> | description='BIOMD0000000360 from BioModels',
url='http://www.ebi.ac.uk/biomodels-main/BIOMD0000000360',
maintainer='Stanley Gu',
maintainer_url='stanleygu@gmail.com', |
<|file_name|>JSMethodInvocationHandler.java<|end_file_name|><|fim▁begin|>package sagex.phoenix.remote.services;
import java.lang.reflect.InvocationHandler;<|fim▁hole|>import java.util.HashMap;
import java.util.Map;
import javax.script.Invocable;
import javax.script.ScriptException;
import sagex.phoenix.util.PhoenixS... | import java.lang.reflect.Method; |
<|file_name|>zephyr_mirror_backend.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright (C) 2012 Zulip, Inc.
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction... | # trigger proper Markdown processing on things like
# bulleted lists
result += previous_line + "\n\n" |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | # Copyright (c) 2010-2017 openpyxl |
<|file_name|>AlunosPesoAlturaImc.py<|end_file_name|><|fim▁begin|>#Faça um programa que o usuário informe a quantidade de alunos de uma turma, o sistema deve ler o peso e altura de cada
# aluno, ao final informar o imc.
T= int(input("entre com a quantidade de alunos"))
x=0
soma=0
somapesos=0
somaltura=0
... | |
<|file_name|>adiabatic_flame.py<|end_file_name|><|fim▁begin|>#
# ADIABATIC_FLAME - A freely-propagating, premixed methane/air flat
# flame with multicomponent transport properties
#
from Cantera import *
from Cantera.OneD import *
from Cantera.OneD.FreeFlame import FreeFlame
##################################... | f.showStats() |
<|file_name|>format.js<|end_file_name|><|fim▁begin|>'use strict';
module.exports = function generate_format(it, $keyword) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSche... | out += ') { ';
}
}
var $$outStack = $$outStack || [];
|
<|file_name|>demo.py<|end_file_name|><|fim▁begin|>a = "nabb jasj jjs, jjsajdhh kjkda jj"
a1 = a.split(",")<|fim▁hole|>for i in range(0,len(a1)):
print (len(a1[i].split()))<|fim▁end|> | |
<|file_name|>ProfileAction.py<|end_file_name|><|fim▁begin|>from .Base_Action import *
<|fim▁hole|>class ProfileAction(Base_Action):
def __init__(self, action_xml, root_action=None):
super(self.__class__, self).__init__(action_xml, root_action)
self.shouldUseLaunchSchemeArgsEnv = self.contents.g... | |
<|file_name|>arc_auth_service.cc<|end_file_name|><|fim▁begin|>// Copyright 2015 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 "chrome/browser/ash/arc/auth/arc_auth_service.h"
#include <utility>
#include <vect... | void ArcAuthService::OnAuthorizationResult(mojom::ArcSignInResultPtr result,
mojom::ArcSignInAccountPtr account) {
ArcProvisioningResult provisioning_result(std::move(result));
|
<|file_name|>Gruntfile.js<|end_file_name|><|fim▁begin|>/*jshint camelcase: false*/
module.exports = (grunt) => {
'use strict';
// load all grunt tasks
require('time-grunt')(grunt);
require('load-grunt-tasks')(grunt);
// configurable paths
const config = {
app: 'app',
dist: 'dist',
distMac32: ... | appMacos32: { |
<|file_name|>fuse.rs<|end_file_name|><|fim▁begin|>use core::pin::Pin;
use futures_core::ready;
use futures_core::stream::{FusedStream, Stream};
use futures_core::task::{Context, Poll};
#[cfg(feature = "sink")]
use futures_sink::Sink;
use pin_project_lite::pin_project;<|fim▁hole|>
pin_project! {
/// Stream for the [... | |
<|file_name|>conftest.py<|end_file_name|><|fim▁begin|>###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to
# make it easier to submit large numbers of jobs on supercomputers.... | # It is able to organise and launch computational jobs on PBS and SLURM. |
<|file_name|>dreamcast.py<|end_file_name|><|fim▁begin|>import mmap
import os.path
import re
from collections import OrderedDict
from .base_handler import BaseHandler
from .iso9660 import ISO9660Handler
from utils import MmappedFile, ConcatenatedFile
class GDIParseError(ValueError):
pass
class GDIHandler(BaseHan... | if len(lines) == 1: |
<|file_name|>memory.rs<|end_file_name|><|fim▁begin|>use alloc::collections::{BTreeMap, BTreeSet};
use alloc::sync::{Arc, Weak};
use core::borrow::Borrow;
use core::cmp::{self, Eq, Ordering, PartialEq, PartialOrd};
use core::fmt::{self, Debug};
use core::intrinsics;
use core::ops::{Deref, DerefMut};
use spin::Mutex;
use... | |
<|file_name|>net.rs<|end_file_name|><|fim▁begin|>// Copyright 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.org/licenses/LI... | |
<|file_name|>myserver.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
<|fim▁hole|> s = socket.socket()
host = socket.gethostname()
port = 12345
s.bind((host, port))
s.listen(5)
while True:
c, addr = s.accept()
print c
print 'connect addr: ', addr
c.send('Welcome... | import socket
def server_test(): |
<|file_name|>DIAMOND_results_filter.py<|end_file_name|><|fim▁begin|>#!/usr/lib/python2.7
##########################################################################
#
# Copyright (C) 2015-2016 Sam Westreich
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General ... | ##########################################################################
# |
<|file_name|>latestupload.py<|end_file_name|><|fim▁begin|>import sys
from pymongo import MongoClient
# Connecting to the mongo client<|fim▁hole|>collection = db['userDB']
userEmail = sys.argv[1]
result = collection.find({'email':userEmail})
pIDs = result['personIDs']
if len(pIDs)==0:
exit(1)
print(pIDs.pop())
exit(... | client = MongoClient('localhost',27017)
# Connecting to the database
db = client['rescueHomeless']
# Connecting to the required collection |
<|file_name|>curly.ts<|end_file_name|><|fim▁begin|>import { privatize as P } from '@ember/-internals/container';
import { getOwner } from '@ember/-internals/owner';
import { guidFor } from '@ember/-internals/utils';
import {
addChildView,
OwnedTemplateMeta,
setElementView,
setViewElement,
} from '@ember/-intern... | );
props.elementId = props.id;
} |
<|file_name|>omd_livestatus.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
u"""
OMD Livestatus dynamic inventory script
=======================================
If running as an OMD site user, i.e. if ${OMD_ROOT} is set, we try to
connect to the Livestatus socket at the def... | |
<|file_name|>payload.test.ts<|end_file_name|><|fim▁begin|>import knex, { Knex } from 'knex';
import { MockClient, Tracker, getTracker } from 'knex-mock-client';
import { PayloadService } from '../../src/services';
jest.mock('../../src/database/index', () => {
return { getDatabaseClient: jest.fn().mockReturnValue('pos... |
expect(result).toBe('test,directus');
});
|
<|file_name|>test_multidb.py<|end_file_name|><|fim▁begin|>import unittest
from django.db import connection, migrations, models
from django.db.migrations.state import ProjectState
from django.test import override_settings
from .test_operations import OperationTestBase
try:
import sqlparse
except ImportError:
... |
class MigrateEverythingRouter(object): |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># MIT License
#
# Copyright (C) IBM Corporation 2019
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including witho... | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the following conditions: |
<|file_name|>http_client.py<|end_file_name|><|fim▁begin|>#
# Copyright (c) 2010-2011, 2015
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN),
# and Simone Basso <bassosimone@gmail.com>.
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute ... | from .stream_handler import StreamHandler
from .http_client_stream import HttpClientStream |
<|file_name|>generate.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys
sys.path.insert(
0,
os.path.join(
os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', 'common',
'security-features', 'tools'))
import generate
class ReferrerPolicyConfig(object):
de... | self.helper_js = '/referrer-policy/generic/test-case.sub.js'
# For debug target only.
self.sanity_checker_js = '/referrer-policy/generic/sanity-checker.js' |
<|file_name|>sensor.py<|end_file_name|><|fim▁begin|>"""
Get WHOIS information for a given host.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.whois/
"""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.c... | if 'nameservers' in response: |
<|file_name|>test_models.py<|end_file_name|><|fim▁begin|>import datetime
from decimal import Decimal
from django.utils import translation
import mock
from nose.tools import eq_, ok_
import amo
import amo.tests
from addons.models import Addon, AddonUser
from constants.payments import PROVIDER_BANGO, PROVIDER_BOKU
fro... | translation.activate('en_CA')
eq_(Price.objects.get(pk=1).get_price(), Decimal('0.99'))
eq_(Price.objects.get(pk=1).get_price_locale(), u'US$0.99') |
<|file_name|>test_fs.py<|end_file_name|><|fim▁begin|>__author__ = "Nitin Kumar, Rick Sherman"
__credits__ = "Jeremy Schulman"
import unittest
from nose.plugins.attrib import attr
import os
from ncclient.manager import Manager, make_device_handler
from ncclient.transport import SSHSession
from jnpr.junos import Devic... | self.assertEqual(self.fs.stat(path), None)
def test_ls_calling___decode_file(self): |
<|file_name|>stream.spec.js<|end_file_name|><|fim▁begin|>"use strict";
const readdir = require("../../");
const dir = require("../utils/dir");
const { expect } = require("chai");
const through2 = require("through2");
const fs = require("fs");
let nodeVersion = parseFloat(process.version.substr(1));
describe("Stream ... | |
<|file_name|>SharedCriterion.java<|end_file_name|><|fim▁begin|>package com.google.api.ads.adwords.jaxws.v201509.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
*
* Represents a criterion belonging to a ... | *
* @return
* possible object is |
<|file_name|>unwind-tup2.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/lic... | |
<|file_name|>builtin.py<|end_file_name|><|fim▁begin|>from django.template import Library
register = Library()
@register.simple_tag(takes_context=True)
def assign(context, **kwargs):
"""
Usage:
{% assign hello="Hello Django" %}
"""
for key, value in kwargs.items():
context[key] = value
... | Usage:
{% call object.method *args **kwargs %} |
<|file_name|>ganeti.rapi.client_unittest.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python
#
# Copyright (C) 2010, 2011 Google Inc.
#
# 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 vers... | |
<|file_name|>Utils.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Meran - MERAN UNLP is a ILS (Integrated Library System) wich provides Catalog,
# Circulation and User's Management. It's written in Perl, and uses Apache2
# Web-Server, MySQL database and Sphinx 2 indexing.
# Copyright (C) 2009-2013 Grupo de de... |
def to_list(sth):
if isinstance(sth, str): |
<|file_name|>testing.py<|end_file_name|><|fim▁begin|>"""
.15925 Editor
Copyright 2014 TechInvestLab.ru dot15926@gmail.com
.15925 Editor is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3.0 o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.