prompt
large_stringlengths
70
991k
completion
large_stringlengths
0
1.02k
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from django.conf.urls.defaults import * from availablejob.views import * urlpatterns = patterns("availablejob.views", url(r"^sendcv/$",send_cv),<|fim▁hole|> url(r"^$", 'index', name="vacancy-index"), )<|fim▁end|>
url(r"^detail/(?P<id>\d+)/$", 'detail',name="job-detail"), url(r"^apply/(?P<id>\d+)/$", 'show_form',name="show-form"),
<|file_name|>as.java<|end_file_name|><|fim▁begin|>// Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) package MJDecompiler; import java.io.IOException; // Referenced classes of package MJDecompiler: // bm, bf, bh, bj, // bc<|fim▁hole|>{ as(ClazzInputStre...
final class as extends CpField
<|file_name|>mod.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2015, The Radare Project. All rights reserved. // See the COPYING file at the top-level directory of this distribution.<|fim▁hole|>// This file may not be copied, modified, or distributed // except according to those terms. //! Components converting SSA...
// Licensed under the BSD 3-Clause License: // <http://opensource.org/licenses/BSD-3-Clause>
<|file_name|>nrsalPrimitives.cpp<|end_file_name|><|fim▁begin|>/* Copyright (c) 2015 "Naftoreiclag" https://github.com/Naftoreiclag * * Distributed under the Apache License Version 2.0 (http://www.apache.org/licenses/) * See accompanying file LICENSE */ #include "nrsalPrimitives.h" nrsalPrimitives::nrsalPrimitives...
{
<|file_name|>prs.py<|end_file_name|><|fim▁begin|>import arrow import settings from . import misc from . import voting from . import comments from . import exceptions as exc def merge_pr(api, urn, pr, votes, total, threshold): """ merge a pull request, if possible, and use a nice detailed merge commit message ...
yield reaction def post_accepted_status(api, urn, pr, voting_window, votes, total, threshold):
<|file_name|>serializer.py<|end_file_name|><|fim▁begin|>import os from chainer import serializers from chainer import utils def save_and_load(src, dst, filename, saver, loader): """Saves ``src`` and loads it to ``dst`` using a de/serializer. This function simply runs a serialization and deserialization to c...
def save_and_load_npz(src, dst): """Saves ``src`` to an NPZ file and loads it to ``dst``.
<|file_name|>GridRowBuilder.ts<|end_file_name|><|fim▁begin|>import {PhotoDTO} from '../../../../../common/entities/PhotoDTO'; import {MediaDTO} from '../../../../../common/entities/MediaDTO'; export class GridRowBuilder { private photoRow: MediaDTO[] = []; private photoIndex = 0; // index of the last pushed medi...
<|file_name|>Two arrays.py<|end_file_name|><|fim▁begin|>""" ou are given two integer arrays, A and B, each containing N integers. The size of the array is less than or equal to 1000. You are free to permute the order of the elements in the arrays. Now here's the real question: Is there an permutation A', B' possible o...
<|file_name|>qdisc.py<|end_file_name|><|fim▁begin|>HTBRootQdisc = """\ tc qdisc add dev {interface!s} root handle 1: \ htb default {default_class!s}\ """ HTBQdisc = """\ tc qdisc add dev {interface!s} parent {parent!s} handle {handle!s} \ htb default {default_class!s}\ """ NetemDelayQdisc = """\ tc qdisc add dev {int...
IngressQdisc = "tc qdisc add dev {interface!s} ingress"
<|file_name|>gen_data.py<|end_file_name|><|fim▁begin|>from csv import DictReader from datetime import datetime, timedelta from collections import defaultdict import cPickle as pickle from math import exp, log, sqrt import random, gc from util import read_dump, write_dump, cache, read_tsv, convert_ts, data, next_row, ge...
<|file_name|>test-host-denied-error.js<|end_file_name|><|fim▁begin|>var common = require('../common'); var connection = common.createConnection({port: common.fakeServerPort}); var assert = require('assert');<|fim▁hole|>var server = common.createFakeServer(); var connectErr; server.listen(common.fakeServerPort,...
<|file_name|>scanner.go<|end_file_name|><|fim▁begin|>// // Copyright (c) 2014-2016 Brian W. Wolter, All rights reserved. // Ego - an embedded Go parser / compiler // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // ...
return s.text[start:s.index], nil
<|file_name|>timeout_check.rs<|end_file_name|><|fim▁begin|>use crate::{ bot::BotEnv, tasks::{RunsTask, Wait}, database::models::Timeout,<|fim▁hole|>}; use chrono::{ Duration, prelude::*, }; use diesel::prelude::*; use std::{ sync::Arc, thread, }; #[derive(Default)] pub struct TimeoutCheckTask { ran_...
<|file_name|>lib.rs<|end_file_name|><|fim▁begin|>use habitat_core::{self as hab_core, util}; use habitat_http_client as hab_http; #[macro_use] extern crate log; #[macro_use] extern crate serde_derive; #[allow(unused_imports)] #[macro_use] extern crate serde_json; mod allow_std_io; pub mod builder;...
<|file_name|>airgraph-ng.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python __author__ = 'Ben "TheX1le" Smith' __email__ = 'thex1le@gmail.com' __website__= 'http://trac.aircrack-ng.org/browser/trunk/scripts/airgraph-ng/' __date__ = '03/02/09' __version__ = '' __file__ = 'airgraph-ng' __data__ = 'This is the main airgrap...
sys.exit(1) fileOpenResults = airDumpOpen(inFile) parsedResults = airDumpParse(fileOpenResults)
<|file_name|>render_text.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 "ui/gfx/render_text.h" #include <algorithm> #include <climits> #include "base/comm...
return text_direction_;
<|file_name|>InfluxDbEndpoint.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 You u...
@Override public Consumer createConsumer(Processor processor) throws Exception {
<|file_name|>tyencode.rs<|end_file_name|><|fim▁begin|>// Copyright 2012-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/l...
<|file_name|>NeovimProcessSpawner.ts<|end_file_name|><|fim▁begin|>import { ChildProcess } from "child_process" import * as net from "net" import * as path from "path" import * as Log from "oni-core-logging" import * as Platform from "./../Platform" import Process from "./../Plugins/Api/Process" import { Session } fr...
<|file_name|>HNacExampleRuleLHS.py<|end_file_name|><|fim▁begin|>from core.himesis import Himesis, HimesisPreConditionPatternLHS import cPickle as pickle from uuid import UUID class HNacExampleRuleLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the ...
# If the constraint relies on attribute values from other nodes, # use the LHS/NAC constraint instead. # The given constraint must evaluate to a boolean expression.
<|file_name|>cninit.py<|end_file_name|><|fim▁begin|>__author__ = 'bptripp' import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from keras.models import Sequential from keras.layer...
<|file_name|>api.py<|end_file_name|><|fim▁begin|>from cool_commits.parsers import all_parsers from cool_commits.utils import git_all_commits def find(path): commits_list = git_all_commits(path) for parser in all_parsers: yield str(parser(commits_list, path)) <|fim▁hole|> commits_list = git_all_co...
def info(path):
<|file_name|>version.cc<|end_file_name|><|fim▁begin|><|fim▁hole|>#ifdef NDEBUG "RELEASE" #else "DEBUG" #endif ); }<|fim▁end|>
#include "common/common/version.h" std::string VersionInfo::version() { return fmt::format("{}/{}", GIT_SHA.substr(0, 6),
<|file_name|>utils_test.py<|end_file_name|><|fim▁begin|># Copyright 2021 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/licenses/LICENSE-2.0 # # Unl...
[n.name for n in loading_session.graph.as_graph_def().node]) def test_save_graph_model_default_session(self): x = tf.placeholder(shape=[None, 10], dtype=tf.float32, name='inp')
<|file_name|>task-perf-alloc-unwind.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.apa...
<|file_name|>test_discover.py<|end_file_name|><|fim▁begin|># Copyright 2013 IBM Corp. # # 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/LICEN...
suite.addTests(loader.discover(test_dir, top_level_dir=top_path)) else: suite.addTests(loader.discover(test_dir, pattern=pattern, top_level_dir=top_path))
<|file_name|>GridClassFactory.spec.js<|end_file_name|><|fim▁begin|>describe('gridClassFactory', function() { var gridClassFactory; beforeEach(module('ui.grid.ie')); beforeEach(inject(function(_gridClassFactory_) { gridClassFactory = _gridClassFactory_; })); describe('createGrid', function() { var g...
gridClassFactory.defaultColumnBuilder( testSetup.colDef, testSetup.col, testSetup.gridOptions );
<|file_name|>font.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 geom::{Point2D, Rect, Size2D}; use std::mem; use std::string...
<|file_name|>AboutRemarkableDialog.py<|end_file_name|><|fim▁begin|># -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2016 <Jamie McGowan> <jamiemcgowan.dev@gmail.com> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
import logging logger = logging.getLogger('remarkable')
<|file_name|>__init__.py<|end_file_name|><|fim▁begin|># Copyright 2019 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.o...
from REDACTED.tf2_bert.modeling.networks.encoder_scaffold import EncoderScaffold from REDACTED.tf2_bert.modeling.networks.masked_lm import MaskedLM from REDACTED.tf2_bert.modeling.networks.span_labeling import SpanLabeling from REDACTED.tf2_bert.modeling.networks.transformer_encoder import TransformerEncoder
<|file_name|>RuntimeConfigurationException.java<|end_file_name|><|fim▁begin|>// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license. package com.intellij.execution.configurations; import com.intellij.execution.ExecutionBundle; import com.intellij.openapi...
catch (ProcessCanceledException e) { throw e; } catch (Throwable t) {
<|file_name|>ascii_chars_increasing.rs<|end_file_name|><|fim▁begin|>use malachite_base::chars::exhaustive::ascii_chars_increasing; #[test] fn test_ascii_chars_increasing() { assert_eq!( ascii_chars_increasing().collect::<String>(), "\u{0}\u{1}\u{2}\u{3}\u{4}\u{5}\u{6}\u{7}\u{8}\t\n\u{b}\u{c}\r\u{e}...
);
<|file_name|>ImportVanKasteren.java<|end_file_name|><|fim▁begin|>package scatterbox.utils; import java.io.BufferedReader; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.InputStreamReader; import java.sql.Connection; import java....
int id = Integer.parseInt(readingArray[2]); //The reason for -1 is because, kasteren starts id names at 1, not 0, but the array starts at 0.
<|file_name|>qrcodedialog.cpp<|end_file_name|><|fim▁begin|>#include "qrcodedialog.h" #include "ui_qrcodedialog.h" #include "bitcoinunits.h" #include "guiconstants.h" #include "guiutil.h" #include "optionsmodel.h" #include <QPixmap> #include <QUrl> #include <qrencode.h> QRCodeDialog::QRCodeDialog(const QString &addr...
<|file_name|>addons.py<|end_file_name|><|fim▁begin|>from __future__ import absolute_import, print_function, division from mitmproxy import exceptions import pprint def _get_name(itm): return getattr(itm, "name", itm.__class__.__name__) class Addons(object): def __init__(self, master): sel...
<|file_name|>metadata.py<|end_file_name|><|fim▁begin|># Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2013 OpenStack Foundation # Copyright 2013 Intel Corporation # # Licensed under the Apache L...
object_id = _get_resource_id(objects_table, namespace_id, object['name']) if not object_id: values.update({'created_at': timeutils.utcnow()})
<|file_name|>misc.py<|end_file_name|><|fim▁begin|># misc.py # Copyright (C) 2012-2016 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later vers...
class GenericHolder(object): """Generic Holder class used to hold other objects of known types
<|file_name|>drop.go<|end_file_name|><|fim▁begin|>// Copyright 2015 The Cockroach 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...
}
<|file_name|>NLopt.py<|end_file_name|><|fim▁begin|>''' Nonlinear optimization by use of Affine DualAveraging <|fim▁hole|>@date: May 13, 2015 ''' import numpy as np from .Domains import nBox class NLoptProblem(): """ Basic class describing a Nonlinear Optimization problem. """ def __init__(self, domain, ...
@author: Maximilian Balandat
<|file_name|>manage.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "devproject.settings")<|fim▁hole|> except ImportError: # The above import may fail for some other reason. Ensure that the # is...
try: from django.core.management import execute_from_command_line
<|file_name|>Base64Encode.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- ############################################################################### # # Base64Encode # Returns the specified text or file as a Base64 encoded string. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licen...
class Base64Encode(Choreography):
<|file_name|>rightLogShift.js<|end_file_name|><|fim▁begin|>'use strict'; module.exports = function (math, config) { var util = require('../../util/index'), Matrix = math.type.Matrix, Unit = require('../../type/Unit'), collection = math.collection, isBoolean = util['boolean'].isBoolean, ...
*
<|file_name|>run.py<|end_file_name|><|fim▁begin|>import asyncio import logging from typing import Text from rasa.core.agent import Agent from rasa.shared.utils.cli import print_info, print_success from rasa.shared.utils.io import json_to_string logger = logging.getLogger(__name__) def run_cmdline(model_path: Text) ...
<|file_name|>constants.js<|end_file_name|><|fim▁begin|>// PYRAMID // Constants const path = require("path"); const DATA_ROOT = path.join(__dirname, "..", "data"); module.exports = { DEBUG: false, FILE_ENCODING: "utf8", PROJECT_ROOT: path.join(__dirname, ".."), DATA_ROOT, LOG_ROOT: path.join(__dirname, "..", "p...
RELATIONSHIP_NONE: 0,
<|file_name|>angular-locale_os.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module("ngLocale", [], ["$provide", function($provide) { var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"}; function getDecimals(n) { n = n + ''; var i = n.indexOf('.'); ...
"MONTH": [ "\u044f\u043d\u0432\u0430\u0440\u044b", "\u0444\u0435\u0432\u0440\u0430\u043b\u044b",
<|file_name|>treeitems.py<|end_file_name|><|fim▁begin|>import logging from argos.external import six from argos.utils.cls import check_class, check_is_a_string logger = logging.getLogger(__name__) class BaseTreeItem(object): """ Base class for storing item data in a tree form. Each tree item represents a row ...
self.childItems[position].finalize() self.childItems.pop(position)
<|file_name|>rotate-key.rs<|end_file_name|><|fim▁begin|>/* Example demonstrating how to do the key rotation on the ledger. Steward already exists on the ledger and its DID/Verkey are obtained using seed. Trust Anchor's DID/Verkey pair is generated and stored into wallet. Stewards builds NYM request in order to add Tru...
println!("16. Comparing Trust Anchor verkeys"); let refresh_json: Value = serde_json::from_str(&refresh_build_nym_response).unwrap(); let refresh_data: Value = serde_json::from_str(refresh_json["result"]["data"].as_str().unwrap()).unwrap(); let trustee_verkey_from_ledger = refresh_data["verkey"].as_str(...
<|file_name|>unique-autoderef-index.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.apa...
let i = ~~[100]; assert_eq!(i[0], 100); }
<|file_name|>unwind_type.hpp<|end_file_name|><|fim▁begin|>// Copyright David Abrahams 2002. // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef UNWIND_TYPE_DWA200222_HPP # define UNWIND_TYPE_DWA200222_HPP # ...
<|file_name|>generic-alias-box.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.o...
<|file_name|>manager.py<|end_file_name|><|fim▁begin|>from django.db.models import manager from .query import QuerySet __all__ = 'Manager', class Manager(manager.Manager.from_queryset(QuerySet)):<|fim▁hole|><|fim▁end|>
use_for_related_fields = True use_in_migrations = True
<|file_name|>unicode_data.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # -*- coding: utf-8 -*-# # Copyright 2014 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...
if tokens[2]: ctx = tokens[2] if ctx.find("isolate") != -1:
<|file_name|>connection_test.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8; -*- # # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this fil...
"<Connection <Client ['http://localhost:4201', " + "'http://localhost:4202']>>", repr(conn.connection))
<|file_name|>__openerp__.py<|end_file_name|><|fim▁begin|>{ 'name' : 'Product status at website shop', 'version' : '1.0.1',<|fim▁hole|> 'website' : 'https://yelizariev.github.io', 'depends' : ['website_sale', 'stock'], 'data':[ 'website_sale_stock_status_views.xml', 'website_sale_stock...
'author' : 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category' : 'Sale',
<|file_name|>session.cpp<|end_file_name|><|fim▁begin|>// Copyright Daniel Wallin, Arvid Norberg 2006. Use, modification and distribution is // subject to the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include <boost/python.hpp> #incl...
dict get_utp_stats(session_status const& st) { dict ret; ret["num_idle"] = st.utp_stats.num_idle;
<|file_name|>splitgeometry.hpp<|end_file_name|><|fim▁begin|>// Copyright 2019 Google LLC & Bastiaan Konings // 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/li...
#define _HPP_UTILS_SPLITGEOMETRY
<|file_name|>get_file_list.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python import sys, random if len(sys.argv) != 3: sys.stderr.write("Must provide file with list of filenames and number of files to pick\n") sys.exit(1) file_list = open(sys.argv[1]) file_array = [] for filepath in file_list: file_arr...
sys.exit(1)
<|file_name|>theme.js<|end_file_name|><|fim▁begin|>/** * @author Chine */ function switchTheme(theme) { $.cookie('blog_theme', theme, { expires: 30 }); location.href = location.href;<|fim▁hole|><|fim▁end|>
}
<|file_name|>message.py<|end_file_name|><|fim▁begin|>{ "register": { "email": "email address already exists", "password": "password's length must longer than six characters", "username": "{ username } already exists" }, "login": {<|fim▁hole|> } }<|fim▁end|>
"email": "email address not exists", "password": "password is not correct"
<|file_name|>ActivityFallHeight.java<|end_file_name|><|fim▁begin|>package ie.lc.fallApp; import java.text.DecimalFormat; import android.os.Bundle; import android.app.Activity; import android.content.Intent; import android.text.Editable; import android.view.Menu; import android.view.View; import android.view.View.OnCli...
}
<|file_name|>download.rs<|end_file_name|><|fim▁begin|>// Copyright (c) 2017 Jason White // // 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 without limitation...
use serde::{Deserialize, Serialize}; use tempfile::NamedTempFile;
<|file_name|>urls.py<|end_file_name|><|fim▁begin|>from rest_framework import routers from . import views class SecretsRootView(routers.APIRootView): """<|fim▁hole|> router = routers.DefaultRouter() router.APIRootView = SecretsRootView # Field choices router.register(r'_choices', views.SecretsFieldChoicesViewSe...
Secrets API root view """ def get_view_name(self): return 'Secrets'
<|file_name|>problem404.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*-<|fim▁hole|># Published on Sunday, 2nd December 2012, 01:00 am # # Ea is an ellipse with an equation of the form x2 + 4y2 = 4a2. Ea' is the # rotated image of Ea by θ degrees counterclockwise around the origin O(0, 0) # for 0° θ 90°. ...
# ProjectEuler/src/python/problem404.py # # Crisscross Ellipses # ===================
<|file_name|>agent.js<|end_file_name|><|fim▁begin|>define(['jquery'], function ($) { if (!Array.prototype.reduce) { /** * Array.prototype.reduce polyfill * * @param {Function} callback * @param {Value} [initialValue] * @return {Value} * * @see h...
return agent; });
<|file_name|>abundance-dist.py<|end_file_name|><|fim▁begin|>#! /usr/bin/env python # This file is part of khmer, https://github.com/dib-lab/khmer/, and is # Copyright (C) 2010-2015, Michigan State University. # Copyright (C) 2015, The Regents of the University of California. # # Redistribution and use in source and bin...
# of its contributors may be used to endorse or promote products # derived from this software without specific prior written # permission. #
<|file_name|>test_node_wiki_list.py<|end_file_name|><|fim▁begin|>import mock import pytest from rest_framework import exceptions from addons.wiki.models import WikiPage from addons.wiki.tests.factories import WikiFactory, WikiVersionFactory from api.base.settings.defaults import API_BASE from api_tests.wikis.views.te...
<|file_name|>beg3.rs<|end_file_name|><|fim▁begin|>pub fn main() {<|fim▁hole|> let string = format!("my friend"); greet(&string); greet(&string); greet(&string[3..]); } // Question: &str vs &std::string::String fn greet(name: &str) { println!("Hello, {}!", name); } // Goal #1: Convert `greet` to use...
<|file_name|>VariantTable.js<|end_file_name|><|fim▁begin|>/*global module: false, require: false, console: false */ 'use strict'; var React = require('react'); var PureRenderMixin = require('./PureRenderMixin'); var DataTable = require('react-data-components-bd2k').DataTable; require('react-data-components-bd2k/css/ta...
var VariantTable = React.createClass({ mixins: [PureRenderMixin], getData: function () { return this.refs.table.state.data;
<|file_name|>parse_shear.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Usage parse_shear sequences.fna a2t.txt emb_output.b6 import sys import csv from collections import Counter, defaultdict sequences = sys.argv[1] accession2taxonomy = sys.argv[2] alignment = sys.argv[3] with open(accession2taxon...
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use std::thread; use std::thread::JoinHandle; mod factorial; use factorial::util::t_log; use factorial::find_factors; fn get_chunk(index: u64, chunk_size: u64, max: u64) -> Option<(u64, u64)> { let mut result = None; let low = chunk_size * (index - 1); le...
<|file_name|>ziv_service.py<|end_file_name|><|fim▁begin|>from requests import post<|fim▁hole|>import base64 class ZivService(object): def __init__(self, cnc_url, user=None, password=None, sync=True): self.cnc_url = cnc_url self.sync = sync self.auth = None if user and password: ...
import io
<|file_name|>xmas.py<|end_file_name|><|fim▁begin|># asciixmas # December 1989 Larry Bartz Indianapolis, IN # # $Id: xmas.py 36559 2004-07-18 05:56:09Z tim_one $ # # I'm dreaming of an ascii character-based monochrome Christmas, # Just like the one's I used to know! # Via a full duplex communicatio...
w_del_msg.refresh() dotdeer0.erase() dotdeer0.refresh() w_del_msg.refresh()
<|file_name|>write_csv_to_db.py<|end_file_name|><|fim▁begin|>import csv, datetime from cStringIO import StringIO # this must match formdata.db_worker_settings : FIELDDIR_LOCATION # the variable is set by the formdata/management/commands/generate_field_name_list.py # the assumption here is that this is being executed f...
<|file_name|>aci_access_port_to_interface_policy_leaf_profile.py<|end_file_name|><|fim▁begin|>#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import ...
host: apic username: admin password: SomeSecretPassword
<|file_name|>cli.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python # Copyright 2017, Major Hayden <major@mhtx.net> # # 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.apach...
exit_code = result['exit_code'] else:
<|file_name|>puremask.js<|end_file_name|><|fim▁begin|>/* ======================================================================== * Pure Mask JS: puremask.js v0.1 * http://romulobrasil.com * Copyright (c) 2014 Rômulo Brasil * ======================================================================== */ 'use ...
}
<|file_name|>test_compat.py<|end_file_name|><|fim▁begin|>""" Test cases adapted from the test_bsddb.py module in Python's regression test suite. """ import sys, os, string import unittest import tempfile from test_all import verbose try: # For Python 2.3 from bsddb import db, hashopen, btopen, rnopen except ...
def badKey(f): rec = f[15] self.assertRaises(TypeError, badKey, f)
<|file_name|>runtornado.py<|end_file_name|><|fim▁begin|>import logging import sys from typing import Any, Callable from django.conf import settings from django.core.management.base import BaseCommand, \ CommandError, CommandParser from tornado import ioloop from tornado.log import app_log # We must call zerver.to...
instance.start()
<|file_name|>rakamUret.js<|end_file_name|><|fim▁begin|>/* BBY261 */<|fim▁hole|>//Çekiliş yapılacak sayıların dizisi var rakamlar = new Array(49); //Oynanacak kolonun dizisi var loto = new Array(6); document.write('<center><img src="sayisalloto.jpg" width=70% ></center>'); //Rakam havuzunun oluşturu...
/* Sayısal Loto Uygulaması */
<|file_name|>main.rs<|end_file_name|><|fim▁begin|>use axum::{ routing::{get, post}, Router, }; use cloudevents::Event; use http::StatusCode; use std::net::SocketAddr; use tower_http::trace::TraceLayer; fn echo_app() -> Router { Router::new() .route("/", get(|| async { "hello from cloudevents server...
.layer(TraceLayer::new_for_http()) }
<|file_name|>bitcoin_sq.ts<|end_file_name|><|fim▁begin|><?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="sq"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About wzcoin</source> <translation ...
</message> <message> <location line="+49"/> <source>Open the Shadow debug log file from the current data directory. This can take a few seconds for large log files.</source>
<|file_name|>NamedPathsConfig.js<|end_file_name|><|fim▁begin|>'use strict'; const utils = require("./utils"); const logger = utils.createLogger({sourceFilePath : __filename}); const path = require("path"); const fs = require("fs"); class NamedPathsConfig{ /** * * @param {CachedTextFile} configReader ...
} extractNamedPathUrlChild(url) {
<|file_name|>realtime_handler.go<|end_file_name|><|fim▁begin|>//go:generate go-bindata -pkg realtime -o realtime_embed.go realtime.js package realtime import ( "encoding/json" "fmt" "io" "io/ioutil" "net/http" "reflect" "strconv" "sync" "time" "golang.org/x/net/websocket" ) var proto = "v1" type Config s...
}
<|file_name|>feed.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from datetime import datetime from app.model import db class FeedRecord(db.Model): __tablename__ = 'feeds' id = db.Column(db.Integer, primary_key=True) time = db.Column(db.DateTime, default=datetime.now()) quant = db.Column(db.Integer) <|...
def __repr__(self): return 'At %s eat %d ml' % (str(self.time), self.quant)
<|file_name|>sidebar.js<|end_file_name|><|fim▁begin|>/** * Iniciar panel de navegación (menú) */ function initSideBar(nav) { //-------------- Declaraciones ------------// let addMenuItem = function(menu, icon, label, click){ let li = $('<li><a href="javascript:void(0)"><i class="fa '+icon+' fa-fw"></i> '+label+'<...
); }); });
<|file_name|>Searchlights.py<|end_file_name|><|fim▁begin|>from bibliopixel.colors import COLORS as _COLORS from bibliopixel.colors.arithmetic import color_scale from bibliopixel.animation.strip import Strip import random class Searchlights(Strip): """Three search lights sweeping at different speeds""" COLORS...
self._ledcolors[self._currentpos[i] + j] = list(map(lambda x, y: (x + y) // 2, self._ledcolors[self._currentpos[i] + j], color_scale(color, 255 - (self._fadeAmt * j)))) if self._start + self._steps[i] >= self._end: self._direction[i] = -1 elif self._start + se...
<|file_name|>list-directive.js<|end_file_name|><|fim▁begin|>'use strict'; angular.module('user-filters') .directive('zoUserFilters', function(){ return { restrict: 'E', replace: true, templateUrl: 'app/user-filters/list-directive.html', controller: 'UserFiltersDirectiveCtrl' ...
.controller('UserFiltersDirectiveCtrl', ['$scope', function($scope){
<|file_name|>DDTElement.ts<|end_file_name|><|fim▁begin|>/// <reference path='../ddt.ts' /> import ddt = require('../ddt'); import chai = require('chai'); describe('DDTElement', function() { var expect = chai.expect; var DDTElement = ddt.DDTElement; describe('#getNode()', function() { it('should r...
<|file_name|>selector.js<|end_file_name|><|fim▁begin|>import React, { PropTypes, Component } from 'react'; import { View, ScrollView, Text, TouchableOpacity, Keyboard, ListView, Platform, AsyncStorage } from 'react-native'; import getEmojiData from './data'; import ScrollableTabView from 'react-native-scrollable-tab-v...
renderRow={this._renderRow.bind(this)} initialListSize={1000}
<|file_name|>sampler.ts<|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...
ioConfig: deepGet(spec, 'spec.ioConfig'),
<|file_name|>Player.java<|end_file_name|><|fim▁begin|>package me.anthonybruno.soccerSim.team.member; import me.anthonybruno.soccerSim.models.Range; /** * Player is a class that contains information about a player. */ public class Player extends TeamMember { private final Range shotRange; private final int ...
}
<|file_name|>SSD1351.py<|end_file_name|><|fim▁begin|># Copyright (c) 2014 Adafruit Industries # Author: Tony DiCola # # 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, incl...
# SSD1351 Commands SSD1351_SETCOLUMN = 0x15 SSD1351_SETROW = 0x75
<|file_name|>dht.go<|end_file_name|><|fim▁begin|>package dht import ( "context" "fmt" "math" "math/rand" "sync" "time" "github.com/libp2p/go-libp2p-core/host" "github.com/libp2p/go-libp2p-core/network" "github.com/libp2p/go-libp2p-core/peer" "github.com/libp2p/go-libp2p-core/peerstore" "github.com/libp2p/g...
<|file_name|>optaa_dj_cspp_telemetered_driver.py<|end_file_name|><|fim▁begin|>""" @package mi.dataset.driver.optaa_dj.cspp @file mi-dataset/mi/dataset/driver/optaa_dj/cspp/optaa_dj_cspp_telemetered_driver.py @author Joe Padula @brief Telemetered driver for the optaa_dj_cspp instrument Release notes: Initial Release "...
}
<|file_name|>0007_auto_20171119_0852.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('merchants', '0006_classfy'), ] operations = [ migratio...
'db_table': 'T_region', },
<|file_name|>phone_number_detection.py<|end_file_name|><|fim▁begin|># -*- coding: utf-8 -*- from __future__ import absolute_import import re try: import regex _regex_available = True except ImportError: _regex_available = False import phonenumbers from six.moves import zip from language_utilities.const...
self.phone, self.original_phone_text = self.check_for_alphas()
<|file_name|>extern-fn-reachable.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...
// except according to those terms. // xfail-fast // xfail-linux apparently dlsym doesn't work on program symbols?
<|file_name|>settings.py<|end_file_name|><|fim▁begin|>import os DOWNLOAD_TMP_DIR = '/tmp' REPOSITORY_PUBLIC_KEY = '/root/keys/cloud_key.pub' LOCAL_REPOSITORY_DIR = '/pkgs' HTML_DIR = '/usr/share/mod-pacmanager/html/' IHM_RESET_SCRIPT = '/root/reset.py' if os.path.exists("/root/repository"): fh = open("/root/repo...
def check_environment(): for dirname in (DOWNLOAD_TMP_DIR, LOCAL_REPOSITORY_DIR): if not os.path.exists(dirname):
<|file_name|>datamodel.py<|end_file_name|><|fim▁begin|><|fim▁hole|><|fim▁end|>
../../../../share/pyshared/zeitgeist/datamodel.py
<|file_name|>workflowregistry.py<|end_file_name|><|fim▁begin|>class WorkflowRegistry(object): def __init__(self): self.workflows = {} self.class_index = {} def add(self, name, cls): self.workflows[id(cls)] = self.workflows.get(id(cls), set()) self.workflows[id(cls)].add(name) ...
workflow_registry = WorkflowRegistry()