prompt large_stringlengths 70 991k | completion large_stringlengths 0 1.02k |
|---|---|
<|file_name|>popup.service.ts<|end_file_name|><|fim▁begin|>import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
import { NgElement, WithProperties } from '@angular/elements';
import { PopupComponent } from './popup.component';
@Injectable()
export class PopupService {
cons... | // before adding the popup to the DOM.
showAsComponent(message: string) {
// Create element
const popup = document.createElement('popup-component'); |
<|file_name|>testCipher.py<|end_file_name|><|fim▁begin|>#Encryption algorithms transform their input data, or plaintext, in some way that
#is dependent on a variable key, producing ciphertext. This transformation can
#easily be reversed, if (and, hopefully, only if) one knows the key.
#The key can be varied by th... | #PGP mode
# Cipher Key Size/Block Size
|
<|file_name|>ping.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
A pure python ping implementation using raw socket.
Note that ICMP messages can only be sent from processes running as root.
Derived from ping.c distributed in Linux's netkit. That code is
copyright (c) 1989 by The Reg... | """ |
<|file_name|>htmllinkelement.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 cssparser::Parser as CssParser;
use document_load... | |
<|file_name|>JavaFormatterAlignmentTest.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.psi.formatter.java;
import com.intellij.ide.highlighter.JavaFileType;
import c... | |
<|file_name|>index.ts<|end_file_name|><|fim▁begin|>import classDisplayNameHandler from './classDisplayNameHandler'
import classMethodHandler from './classMethodHandler'
import classPropHandler from './classPropHandler'
import componentHandler from './componentHandler'
import displayNameHandler from './displayNameHandle... | displayNameHandler,
methodHandler,
propHandler, |
<|file_name|>InputEqualsAvoidNull.java<|end_file_name|><|fim▁begin|>package com.puppycrawl.tools.checkstyle.coding;
public class InputEqualsAvoidNull {
public boolean equals(Object o) {
return false;
}
/**
* methods that should get flagged
* @return
*/
public void flagF... | |
<|file_name|>main.js<|end_file_name|><|fim▁begin|>window.onload = function() {
document.getElementById('smile').innerHTML = ":)";<|fim▁hole|><|fim▁end|> | }; |
<|file_name|>PartnerSendQuestion.java<|end_file_name|><|fim▁begin|>package unagoclient.partner;
import unagoclient.Global;
import unagoclient.gui.*;
import javax.swing.*;
/**
* Displays a send dialog, when the partner presses "Send" in the GoFrame. The
* message is appended to the PartnerFrame.
*/
pu... | this.add("North", new MyLabel(Global.resourceString("Message_")));
|
<|file_name|>buildConfig.js<|end_file_name|><|fim▁begin|><|fim▁hole|> webpack_config: {
entry: './assets/src/app.js',
},
};<|fim▁end|> | module.exports = {
bundle_id: 'app', |
<|file_name|>multi_threaded_cert_verifier_unittest.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 "net/base/multi_threaded_cert_verifier.h"
#include "base/... | // 0 means key1 equals key2
// 1 means key1 is greater than key2
int expected_result;
} tests[] = { |
<|file_name|>filters.py<|end_file_name|><|fim▁begin|>import django_filters
from dal import autocomplete
from .models import SkosConcept, SkosConceptScheme
django_filters.filters.LOOKUP_TYPES = [
('', '---------'),
('exact', 'Is equal to'),
('iexact', 'Is equal to (case insensitive)'),
('not_exact', 'I... | ] |
<|file_name|>saltfpringfilter.py<|end_file_name|><|fim▁begin|>################################# LICENSE ##################################
# Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. #
# ... |
Updates: |
<|file_name|>scimpinyin.cpp<|end_file_name|><|fim▁begin|>#define Uses_STL_AUTOPTR
#define Uses_STL_FUNCTIONAL
#define Uses_STL_VECTOR
#define Uses_STL_IOSTREAM
#define Uses_STL_FSTREAM
#define Uses_STL_ALGORITHM
#define Uses_STL_MAP
#define Uses_STL_UTILITY
#define Uses_STL_IOMANIP
#define Uses_C_STDIO
#define Uses_SCI... | }
++ key_start;
} |
<|file_name|>test_playbookrunner.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
# Copyright (C) 2016 Matthias Luescher
#
# Authors:
# Matthias Luescher
#
# This file is part of edi.
#
# edi is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as... | |
<|file_name|>bitcoin_de.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ELcoin</source>
<translation>Über ELcoin</trans... | </message>
<message>
<location line="+18"/> |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>extern crate indy_api_types;
#[macro_use]
extern crate indy_utils;
#[macro_use]
extern crate log;
extern crate serde;
#[macro_use]
extern crate serde_derive;
use std::cell::RefCell;
use std::collections::HashMap;
use std::fs;
use std::io::BufReader;
use std::path::P... | assert_eq!("value1", record.get_value().unwrap()); |
<|file_name|>DataPairMgr.py<|end_file_name|><|fim▁begin|>'''
read the input data, parse to int list;
create mappings of (user,item) -> review int list
@author: roseck
@date Mar 15, 2017
'''
from __builtin__ import dict
import gzip
class DataPairMgr():
def _int_list(self,int_str):
'''utility fn for c... | |
<|file_name|>test_saferef.py<|end_file_name|><|fim▁begin|>import unittest
from django.dispatch.saferef import safeRef
from django.utils.six.moves import xrange
class Test1(object):
def x(self):
pass
def test2(obj):
pass
class Test2(object):
def __call__(self, obj):
pass
class Safere... | |
<|file_name|>problem11.rs<|end_file_name|><|fim▁begin|>// In the 20×20 grid below, four numbers along a diagonal line have been marked in red.
// The product of these numbers is 26 × 63 × 78 × 14 = 1788696.
//
// What is the greatest product of four adjacent numbers in the same direction (up, down, left, right, or diag... | if col <= vals.len() - range && row >= range {
let mut product: i64 = 1;
for i in 0..range {
product *= vals[col + i][row - i]; |
<|file_name|>installer.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys, os
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../master'))
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '../../../master/wkpf'))
print os.path.join(os.path.dirname(os... | comm.setFeature(15, WKPF_FEATURE_NATIVE_THRESHOLD, 0)
comm.setLocation(15, "WuKong")
|
<|file_name|>bigquery.py<|end_file_name|><|fim▁begin|>from datetime import timedelta, datetime
from airflow import DAG
from airflow.contrib.operators.bigquery_operator import BigQueryOperator
from airflow.contrib.operators.bigquery_to_gcs import BigQueryToCloudStorageOperator
from airflow.contrib.operators.gcs_to_bq i... | |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>__all__ = ['pwnedapi', 'utils']
from .pwnedapi import HaveIBeenPwnedApi<|fim▁end|> | |
<|file_name|>versions.js<|end_file_name|><|fim▁begin|>const React = require('react');
const CompLibrary = require('../../core/CompLibrary');
const Container = CompLibrary.Container;
const GridBlock = CompLibrary.GridBlock;
const CWD = process.cwd();
const translate = require('../../server/translate.js').translate;
... | </div>
);
} |
<|file_name|>BazelVariableSubstitutorTest.java<|end_file_name|><|fim▁begin|>package com.blackducksoftware.integration.hub.detect.tool.bazel;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Test;
public class BazelVariableSu... | } |
<|file_name|>aws_sqs.go<|end_file_name|><|fim▁begin|>package output
import (
"github.com/Jeffail/benthos/v3/internal/batch/policy"
"github.com/Jeffail/benthos/v3/internal/component/metrics"
"github.com/Jeffail/benthos/v3/internal/component/output"
"github.com/Jeffail/benthos/v3/internal/docs"
"github.com/Jeffail/... | set dynamically using
[function interpolations](/docs/configuration/interpolation#bloblang-queries), which are
resolved individually for each message of a batch. |
<|file_name|>ordering.spec.ts<|end_file_name|><|fim▁begin|>/// <reference path="../typings/main.d.ts" />
/// <reference path="../../../src/script/sums/ordering.ts" />
<|fim▁hole|> describe("to text", function() {
it("converts values to human readable text", function() {
expect(Sums.orderingToText... | describe("ordering", function() { |
<|file_name|>tee.rs<|end_file_name|><|fim▁begin|>#![crate_name = "uu_tee"]
/*
* This file is part of the uutils coreutils package.
*
* (c) Aleksander Bielawski <pabzdzdzwiagief@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code... | for writer in &mut self.writers { |
<|file_name|>git-archive.js<|end_file_name|><|fim▁begin|>var util = require("util"),
Super = require("./super");
function GitArchive() {
};
module.exports = GitArchive;
util.inherits(GitArchive, Super);
GitArchive.prototype.format = "zip";
GitArchive.prototype.tree = "master";<|fim▁hole|>
GitArchive.prot... |
GitArchive.prototype.fileCreated = false; |
<|file_name|>run_gpu_test.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# Copyright 2014 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 os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__),
... | if __name__ == '__main__': |
<|file_name|>canvasgradient.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 cssparser::RGBA;
use canvas_traits::{CanvasGradien... | // https://html.spec.whatwg.org/multipage/#canvasgradient
#[dom_struct] |
<|file_name|>app.module.ts<|end_file_name|><|fim▁begin|>/**
* @author Damien Dell'Amico <damien.dellamico@gmail.com>
* @copyright Copyright (c) 2017
* @license GPL-3.0
*/
import { NgModule } from '@angular/core';
import { IonicApp, IonicModule } from 'ionic-angular';
import { TaxiApp } from './app.component';... | |
<|file_name|>common.rs<|end_file_name|><|fim▁begin|>use ring::digest;
#[derive(Debug)]
pub struct Log {
pub description: String,
pub url: String,
pub is_google: bool,
}
pub fn sha256_hex(data: &[u8]) -> String {<|fim▁hole|>}<|fim▁end|> | hex::encode(digest::digest(&digest::SHA256, data).as_ref()) |
<|file_name|>test_connection.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright 2009-2013 Glencoe Software, Inc. All rights reserved.
Use is subject to license terms supplied in LICENSE.txt
pytest fixtures used as defined in conftest.py:
- gatewaywrapper
- autho... | c2.setGroupForSession(g)
c3 = gatewaywrapper.gateway.clone() |
<|file_name|>device_user_defined.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from PyQt5.Qt impo... | self._layout = QVBoxLayout(self) |
<|file_name|>shipvelocitybonusmi.py<|end_file_name|><|fim▁begin|># shipVelocityBonusMI
#
# Used by:
# Variations of ship: Mammoth (2 of 2)
# Ship: Hoarder
# Ship: Prowler<|fim▁hole|>def handler(fit, ship, context):
fit.ship.boostItemAttr("maxVelocity", ship.getModifiedItemAttr("shipBonusMI"), skill="Minmatar Indust... | type = "passive"
|
<|file_name|>NoteItem.js<|end_file_name|><|fim▁begin|>import React from 'react'
export default class NoteItem extends React.Component {
render () {
return (
<div>
<p>Category = {this.props.note.category}</p>
<p>The Note = {this.props.note.noteText}</p><|fim▁hole|> )
}
}<|fim▁end|> |
<hr />
</div> |
<|file_name|>AuthDataAccessor.java<|end_file_name|><|fim▁begin|>/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to yo... | |
<|file_name|>fptree.py<|end_file_name|><|fim▁begin|>""" in this file, we describe the data type of fp-tree nodes and present
an algorithm to build a fp-tree from existing datasets """
import fpgrowth
import Queue
def supfilter(dataset, minsup):
"""
supfilter : scan the items and drop the infrequent elements
... | if item[0] not in self.children:
self.children[item[0]] = Node(item[0], self, headertable) |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>extern crate getopts;
extern crate regex;
use std::os;
fn main() {
let args = os::args();
let program = args[0].clone();
let opt_matches = match getopts::getopts(args.tail(), options().as_slice()) {
Ok(m) => { m }
Err(f) => {
p... | };
if opt_matches.opt_present("h") {
print_usage(program.as_slice());
return; |
<|file_name|>dropck_tarena_cycle_checked.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://ww... | v: T
} |
<|file_name|>CheckerBase.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python3
import contextlib
import threading
import mwparserfromhell
import ws.ArchWiki.lang as lang
from ws.utils import LazyProperty
from ws.parser_helpers.title import canonicalize
from ws.parser_helpers.wikicode import get_parent_wikicode, ge... | # maybe we can create a wrapper class (e.g. ThreadSafeWikicode) which would transparently synchronize all method calls: https://stackoverflow.com/a/17494777 |
<|file_name|>test_errors.py<|end_file_name|><|fim▁begin|># Copyright 2015-2017 ProfitBricks GmbH
#
# 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... | bus='VIRTIO')
self.client.create_volume(datacenter_id=self.datacenter['id'], volume=i) |
<|file_name|>file_tasks.js<|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.
'use strict';
/**
* This object encapsulates everything related to tasks execution.
*
* TO... | continue;
task.iconType = 'pdf'; |
<|file_name|>20170323200721_expense_items.js<|end_file_name|><|fim▁begin|>let allExpenses
exports.up = (knex, Promise) => {
return knex('expenses').select('*')
.then(expenses => {
allExpenses = expenses
return knex.schema.createTable('expense_items', (table) => {
table.increments('id').prima... |
function createExpenseItem(knex, expense) {
return knex('expense_items')
.insert({ |
<|file_name|>findScriptUrls.js<|end_file_name|><|fim▁begin|>define('findScriptUrls', [], function () {
return function(pattern) {
var type = typeof pattern, i, tags = document.querySelectorAll("script"), matches = [], src;
for (i = 0; i < tags.length; i++) {
src = tags[i].src || "";
... | };
}); |
<|file_name|>setup_fast_likelihood.py<|end_file_name|><|fim▁begin|>from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy as np
import os
<|fim▁hole|> sourcefiles,
include_dirs = [np.get_include()]... | sourcefiles = [ 'fast_likelihood.pyx']
ext_modules = [Extension("fast_likelihood", |
<|file_name|>730.cpp<|end_file_name|><|fim▁begin|>// Copyright 2015 Adam Grandquist<|fim▁hole|>
#include "./catch.hpp"
#include "./ReQL.hpp"
using namespace ReQL;
TEST_CASE("cpp Regression tests for issue 106", "[cpp][ast]") {
}<|fim▁end|> | |
<|file_name|>ramda.js<|end_file_name|><|fim▁begin|>// ramda.js
// https://github.com/CrossEye/ramda
// (c) 2013-2014 Scott Sauyet and Michael Hurley
// Ramda may be freely distributed under the MIT license.
// Ramda
// -----
// A practical functional library for Javascript programmers. Ramda is a coll... | |
<|file_name|>minicircuits.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3.4
#
# Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.o... | This module has the class for controlling Mini-Circuits RCDAT series
attenuators over Telnet. |
<|file_name|>divisible_by_power_of_2.rs<|end_file_name|><|fim▁begin|>use integer::Integer;
use malachite_base::num::arithmetic::traits::DivisibleByPowerOf2;
impl<'a> DivisibleByPowerOf2 for &'a Integer {
/// Returns whether `self` is divisible by 2<sup>`pow`</sup>. If `self` is 0, the result is
/// always true... | } |
<|file_name|>tracing_controller.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# 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.
'''Tracing controller class. This class manages
multiple tracing agent... | |
<|file_name|>views.py<|end_file_name|><|fim▁begin|>from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from allauth.socialaccount import requests... | |
<|file_name|>solution.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# snippy - software development and maintenance notes manager.
# Copyright 2017-2020 Heikki J. Laaksonen <laaksonen.heikki.j@gmail.com>
#
# This program is free software: you can redistrib... | ' type => "argus.docker"',
' topics => ["dockerlogs"]', |
<|file_name|>importstates.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import simplejson
from django.core.management.base import BaseCommand
from django.contrib.gis.geos import MultiPolygon, Polygon
from ...models import State
class Command(BaseCommand):
args = 'filename'
help = 'Import states f... | state.geom = MultiPolygon(Polygon(feature['geometry'].get('coordinates')[0]))
state.save() |
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>URL = {
3304557: {
"production": "https://notacarioca.rio.gov.br/WSNacional/nfse.asmx?wsdl",
"sandbox": "https://homologacao.notacarioca.rio.gov.br/WSNacional/nfse.asmx?wsdl"
}<|fim▁hole|> 'status': "ConsultarNfseEnvio.xml",
'get_nfse'... | }
TEMPLATES = {
'send_rps': "GerarNfseEnvio.xml", |
<|file_name|>run.py<|end_file_name|><|fim▁begin|><|fim▁hole|>if __name__ == '__main__':
app.run()<|fim▁end|> | from mosaic import app
|
<|file_name|>policy_gradient.py<|end_file_name|><|fim▁begin|>import numpy as np
import numpy.linalg as la
import collections
import IPython
import tensorflow as tf
from utils import *
import time
from collections import defaultdict
class PolicyGradient(Utils):
"""
Calculates policy gradient
for given input state/... | self.total_bias_grad = curr_bias_grad
self.total_sq_bias_grad = np.square(curr_bias_grad)
else: |
<|file_name|>all_tests.py<|end_file_name|><|fim▁begin|>import unittest
from gremlin_rest import GremlinClient
class TestClient(unittest.TestCase):
def setUp(self):
self.client = GremlinClient('http://172.17.0.248:8182')
def tearDown(self):
for v in self.client.V().run():
self.clie... | self.client.delete_vertex(vertex_id = v1.vertex_id) |
<|file_name|>events.tsx<|end_file_name|><|fim▁begin|>import React from "react";
import Dropzone from "../../";
export class Events extends React.Component {
render() {
return (
<section>
<div className="dropzone">
<Dropzone
onDrop={(acceptedFiles, fileRejections, event) =>
... | } |
<|file_name|>networking.go<|end_file_name|><|fim▁begin|>// Copyright 2015-2016 Canonical Ltd.<|fim▁hole|>package rackspace
import (
"gopkg.in/goose.v2/nova"
"github.com/juju/juju/provider/openstack"
)
type rackspaceNetworkingDecorator struct{}
// DecorateNetworking is part of the openstack.NetworkingDecorator int... | // Licensed under the AGPLv3, see LICENCE file for details.
|
<|file_name|>common.py<|end_file_name|><|fim▁begin|># -*- mode: python; coding: utf-8; -*-
import os
APP_NAME = "SLog"
VERSION = "0.9.4"
WEBSITE = "http://vialinx.org"
<|fim▁hole|>SLog is a PyGTK-based GUI for the LightLang SL dictionary.
Copyright 2007 Nasyrov Renat <renatn@gmail.com>
This file is part of SLog.
SL... | LICENSE = """ |
<|file_name|>geniblocks-rsrc-task.js<|end_file_name|><|fim▁begin|>var gulp = require('gulp');
var blocksConfig = require('../config').geniblocksRsrc;
var gvConfig = require('../config').geniverseRsrc;
// Copy files directly simple
exports.geniblocksRsrc = function geniblocksRsrc() {
return... | |
<|file_name|>infinity.py<|end_file_name|><|fim▁begin|>my_inf = float('Inf')<|fim▁hole|>print my_neg_inf < -99999999
# True<|fim▁end|> | print 99999999 > my_inf
# False
my_neg_inf = float('-Inf') |
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>//#[feature(phase)];
#![crate_id = "freescale"]<|fim▁hole|>extern crate rustusb = "usb";
pub mod sim;
pub mod usb;<|fim▁end|> | #![crate_type = "rlib"]
#![license = "MIT"]
extern crate cortex; |
<|file_name|>test_adcpt_acfgm_dcl_pd8.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_adcpt_acfgm
@fid marine-integrations/mi/dataset/parser/test/test_adcpt_acfgm.py
@author Ronald Ronquillo
@brief Test code for a Adcpt_Acfgm_Dcl data parser
"""
from nose.plugins.attrib ... | |
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use binaryninja::architecture::Architecture;
use binaryninja::binaryview::{BinaryViewBase, BinaryViewExt};
fn main() {
println!("Loading plugins..."); // This loads all the core architecture, platform, etc plugins
binaryninja::headless::init();
println!("L... | .get_data(),
addr,
) { |
<|file_name|>testscript.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/TestScript) on 2017-03-22.
# 2017, SMART Health IT.
from . import domainresource
class TestScript(domainresource.DomainResource):
""... | resource_type = "TestScriptSetupActionAssertRuleParam"
def __init__(self, jsondict=None, strict=True): |
<|file_name|>errors.d.ts<|end_file_name|><|fim▁begin|>export declare const CLAMP_MIN_MAX: string;
export declare const ALERT_WARN_CANCEL_PROPS: string;<|fim▁hole|>export declare const CONTEXTMENU_WARN_DECORATOR_NO_METHOD: string;
export declare const HOTKEYS_HOTKEY_CHILDREN: string;
export declare const MENU_WARN_CHILD... | export declare const COLLAPSIBLE_LIST_INVALID_CHILD: string; |
<|file_name|>benchmark_bundle.js<|end_file_name|><|fim▁begin|>// modules are defined as an array
// [ module function, map of requireuires ]
//
// map of requireuires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the requireuire for prev... | // MODULES // |
<|file_name|>StringUtils.java<|end_file_name|><|fim▁begin|>package ch.hgdev.toposuite.utils;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* Useful static method for manipulating String.
*
* @author HGdev
*/
public class StringUtils {
public static final String UTF8_BOM = "\uFEFF";
... | |
<|file_name|>java_agent.java<|end_file_name|><|fim▁begin|>import ch.usi.overseer.OverAgent;
import ch.usi.overseer.OverHpc;
/**
* Overseer.OverAgent sample application.
* This example shows a basic usage of the OverAgent java agent to keep track of all the threads created
* by the JVM. Threads include garbage colle... | * append this option to your command-line: |
<|file_name|>refextract_cli.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published b... | # If necessary, locate the reference section: |
<|file_name|>ExecuteAsynchronousScript.spec.ts<|end_file_name|><|fim▁begin|>import 'mocha';
import { EventRecorder, expect } from '@integration/testing-tools';
import { Ensure, equals } from '@serenity-js/assertions';
import { actorCalled, Question, Serenity } from '@serenity-js/core';
import { ActivityFinished, Activ... | /** @test {ExecuteScript.async} */
/** @test {ExecuteAsynchronousScript} */
it('complains if the script has failed', () => |
<|file_name|>element.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/. */
//! Element nodes.
use devtools_traits::AttrInfo;
use dom::a... | }
if ancestor.is_parent_of(node) { |
<|file_name|>ANTES01.java<|end_file_name|><|fim▁begin|>import processing.core.*;
import processing.data.*;
import processing.event.*;
import processing.opengl.*;
import ddf.minim.spi.*;
import ddf.minim.signals.*;
import ddf.minim.*;
import ddf.minim.analysis.*;
import ddf.minim.ugens.*;
import ddf.minim.effe... | // WRAP
// Syphon/minim/fun000 |
<|file_name|>setup.py<|end_file_name|><|fim▁begin|># Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/... | # How mature is this project? Common values are |
<|file_name|>syst_rvr.rs<|end_file_name|><|fim▁begin|>#[doc = "Register `SYST_RVR` reader"]
pub struct R(crate::R<SYST_RVR_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<SYST_RVR_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<SYST_RVR_SPE... | |
<|file_name|>sequences.py<|end_file_name|><|fim▁begin|># encoding: utf-8
" This sub-module provides 'sequence awareness' for blessed."
__author__ = 'Jeff Quast <contact@jeffquast.com>'
__license__ = 'MIT'
__all__ = ('init_sequence_patterns', 'Sequence', 'SequenceTextWrapper',)
# built-ins
import functools
import tex... | '_re_wont_move': _re_wont_move,
'_re_cuf': _re_cuf,
'_re_cub': _re_cub,
'_cuf1': _cuf1, |
<|file_name|>view3_test.js<|end_file_name|><|fim▁begin|>'use strict';
describe('myApp.view3 module', function() {
var scope, view3Ctrl;
beforeEach(module('myApp.view3'));
beforeEach(module('matchingServices'));
beforeEach(inject(function ($controller, $rootScope) { // inject $rootScope
scope = $rootSc... | expect(view3Ctrl).toBeDefined();
});
|
<|file_name|>app.py<|end_file_name|><|fim▁begin|>import os
from flask import Flask, request, render_template
from flask.ext.sqlalchemy import SQLAlchemy
<|fim▁hole|>
app = Flask(__name__)
app.debug = True
app.threaded = True
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL', 'sqlite:////tmp/test.d... | |
<|file_name|>principe_de_superposition_lineaire.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
import os
"""
Illustration d'un exercice de TD visant à montrer l'évolution temporelle de la
densité de probabilité pour la superposition équiprobable d'un état n=1 et
d'un état n quelconque (à fixer) pour le puit... | |
<|file_name|>RedisFxApp.java<|end_file_name|><|fim▁begin|>package com.hyd.redisfx;
import com.hyd.fx.Fxml;
import com.hyd.fx.app.AppLogo;
import com.hyd.fx.app.AppPrimaryStage;
import com.hyd.redisfx.fx.BackgroundExecutor;
import com.hyd.redisfx.i18n.I18n;
import javafx.application.Application;
import javafx.fxml.FXML... | |
<|file_name|>stitching.js<|end_file_name|><|fim▁begin|>var taxi = require('..');
var chromedriver = require('chromedriver');
var fs = require('fs');
var user = process.env.SAUCE_USERNAME;
var accessKey = process.env.SAUCE_ACCESS_KEY;
var sauceLabsUrl = "http://" + user + ":" + accessKey + "@ondemand.saucelabs.com/wd/... | |
<|file_name|>helpers.rs<|end_file_name|><|fim▁begin|>#[derive(Debug)]
pub enum Entry {
// either a unique page and its link data
Page {
title: String,
children: Vec<u32>,
parents: Vec<u32>,
},
// or the redirect page and its address
// these will eventually be taken out of db... | Done = 5,
} |
<|file_name|>ajax.py<|end_file_name|><|fim▁begin|>from django.utils import simplejson
from dajaxice.decorators import dajaxice_register
from django.utils.translation import ugettext as _
from django.template.loader import render_to_string
from dajax.core import Dajax
from django.db import transaction
from darkoob.book... | transaction.commit() |
<|file_name|>mesonlib.py<|end_file_name|><|fim▁begin|># Copyright 2012-2015 The Meson development team
# 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/LIC... |
def is_linux():
return platform.system().lower() == 'linux'
|
<|file_name|>callback.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-
__author__ = 'Alex Starov'
try:
from django.utils.simplejson import dumps
# import simplejson as json
except ImportError:
from json import dumps
# import json
from django.http import HttpResponse
def callback_data_send(req... | phone=phone, )
else:
callback = CallBack.objects.create(sessionid=sessionid,
name=name, |
<|file_name|>client.py<|end_file_name|><|fim▁begin|># Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... | object is passed), falls back to the default inferred |
<|file_name|>base.py<|end_file_name|><|fim▁begin|>import numpy as np
#numpy is used for later classifiers
#Note: this is just a template with all required methods
#text is the text represented as a string
#textName is optional, indicate sthe name of the text, used for debug
#args are aditional arguments for the feature... |
def calc(self):
self.debugStart()
self.beginCalc() |
<|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/... | // held internally may invoke some scheduling operations. We can't take |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|>from ga_starters import *<|fim▁end|> | |
<|file_name|>unit-like-struct-drop-run.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.... | // Make sure the destructor is run for unit-like structs. |
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|> | __all__ = ('db', 'format', 'query', 'sync') |
<|file_name|>non-exhaustive-match-nested.rs<|end_file_name|><|fim▁begin|>// -*- rust -*-
// 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... | enum u { c, d } |
<|file_name|>RunnableWithResult.java<|end_file_name|><|fim▁begin|>package monitor;
public interface RunnableWithResult<T> {
<|fim▁hole|><|fim▁end|> | public T run() ;
} |
<|file_name|>neutron_clean_secgroups.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import sys # reads command-line args
import ConfigParser
import os
config = ConfigParser.ConfigParser()
config.read(['os.cfg',
os.path.expanduser('~/.os.cfg'),
'/etc/os-maint/os.cfg'])
os_user_name = config.ge... |
from keystoneclient.v2_0 import client as kclient
keystone = kclient.Client(username=os_user_name,
password=os_password, |
<|file_name|>ReactionsRemoveResponse.ts<|end_file_name|><|fim▁begin|>/* tslint:disable */
import { WebAPICallResult } from '../WebClient';
export type ReactionsRemoveResponse = WebAPICallResult & {<|fim▁hole|> needed?: string;
provided?: string;
};<|fim▁end|> | ok?: boolean;
error?: string; |
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python
import os
import sys<|fim▁hole|>if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "aalto_fitness.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)<|f... | |
<|file_name|>loader.e6.js<|end_file_name|><|fim▁begin|>import AMD from '../../amd/src/amd.e6';<|fim▁hole|>import Module from '../../modules/src/base.es6';
import ModulesApi from '../../modules/src/api.e6';
window.Moff = new Core();
window.Moff.amd = new AMD();
window.Moff.event = new Event();
window.Moff.Module = new ... | import Core from '../../core/src/core.e6';
import Event from '../../event/src/event.e6';
import Detect from '../../detect/src/detect.e6'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.