text stringlengths 3 1.05M |
|---|
#
# btsnoop module
#
# TODO: Move stuff here to their corresponding modules
#
import binascii
from .logparse import logparse as bts
from .bt import hci_cmd as hci_cmd
from .bt import hci_uart as hci_uart
from .android.snoopphone import SnoopPhone
def get_ltk(path=None):
"""
Get the Long Term Key
"""
records = ge... |
import os
import pytest
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
CERTS = ['my-cert-1', 'my-cert-2']
CERT_OPTS = "no_subject,no_header,no_version,no_serial,no_signame,no_validity,no_issuer,no_pubkey... |
from django.urls import path
from rest_framework_simplejwt import views as jwt_views
from django_react_template.users.api.views import UserCreate, HelloWorld, LogoutAndBlacklistRefreshTokenForUserView
app_name = "users"
urlpatterns = [
path('create/', UserCreate.as_view(), name="create_user"),
path('token/o... |
/**
* videojs-contrib-eme
* @version 3.0.0
* @copyright 2017
* @license Apache-2.0
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:... |
module["exports"] = [
"###-###-####",
"(###) ###-####",
"1-###-###-####",
"###.###.####"
];
|
#pragma once
#include <cstdint>
class SensorBase {
public:
int32_t read() { return get_value(); }
int32_t get_value() const { return 0; }
void trigger() {}
int32_t get_index_pos() const { return 0; }
bool index_received() const { return false; }
};
|
(this["webpackJsonpcarbonphp-documentation-react"]=this["webpackJsonpcarbonphp-documentation-react"]||[]).push([[61],{914:function(e,t,o){"use strict";function r(e){e.languages.io={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbe... |
#!/usr/bin/env python3
# Copyright (c) 2016-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test Hierarchical Deterministic wallet function."""
import os
import shutil
from test_framework.test_... |
#coding: utf-8
from __future__ import unicode_literals, absolute_import
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from fias.fields import UUIDField
from fias.models.house import House
from fias.models.status import OperStat
__all__ = ['Room', 'FlatType', 'RoomType']
... |
import { expect } from 'chai';
import { describeModule, it } from 'ember-mocha';
describeModule('route:s/templates/create', 'STemplatesCreateRoute', {
// needs: ['controller:foo']
}, function () {
it('exists', function () {
var route = this.subject();
expect(route).to.be.ok;
});
});
|
def main() -> int:
from light_tests import tests
return tests.main()
if __name__ == '__main__':
exit(main())
|
/*!
* reveal.js 2.6.1 (2015-06-16, 14:10)
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
*/
var Reveal=function(){"use strict";function a(a){if(b(),!eb.transforms2d&&!eb.transforms3d)return void document.body.setAttribute("class","no-transforms");window.addE... |
import cv2
import streamlit as st
import albumentations as A
from control import param2func
from utils import get_images_list, load_image, upload_image
def show_logo():
st.image(load_image("logo.png", "../images"), format="PNG")
def select_image(path_to_images: str, interface_type: str = "Simple"):
""" Sh... |
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :... |
/*
* BlueALSA - log.c
* Copyright (c) 2016-2018 Arkadiusz Bokowy
*
* This file is a part of bluez-alsa.
*
* This project is licensed under the terms of the MIT license.
*
*/
#include "shared/log.h"
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sy... |
// COPYRIGHT © 2017 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute... |
import React from 'react'
import BaseTemplate from './baseTemplate'
import Curriculum from 'src/components/curriculum/CurriculumAdvancedReact'
import TargetAudienceList from 'src/components/curriculum/CurriculumAdvancedReact/TargetAudienceList'
import { REACT_WORKSHOP, ADVANCED_REACT, REACT_BOOTCAMP } from 'src/config/... |
from django.conf import settings
import requests
# Exception
class CaptchaError(Exception):
pass
class CaptchaMissingSecret(CaptchaError):
def __init__(self, message="The secret parameter is missing."):
self.message = message
super().__init__(self.message)
class CaptchaInvalidSecret(CaptchaE... |
// Copyright 2011 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
#define V8_MIPS_REGEXP_MACRO_ASSEMBLER_MIPS_H_
#include "src/macro-assembler.h"
#include "src/mips/asse... |
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from django.views import defaults as default_views
from django.views.generic import TemplateView
urlpatterns = [
path("", TemplateView.as_view(template_name="pages/home... |
#!/usr/bin/python
#
# Copyright 2013 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/LICENSE-2.0
#
# Unless required b... |
from setuptools import setup, Extension
from platform import system
from numpy import get_include
from glob import glob
import os
import shutil as sh
from subprocess import call
'''
Define macros
'''
# Pass EMBEDDED flag to cmake to generate glob_opts.h file
cmake_args = []
embedded_flag = EMBEDDED_FLAG
cmake_args +=... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import torch
import numpy as np
from models.losses import FocalLoss
from models.losses import RegL1Loss, RegLoss, NormRegL1Loss, RegWeightedL1Loss
from models.decode import ctdet_decode
from models.utils impor... |
import sys
import os
import nanomsg as nn
from nanomsg import wrapper as nn_wrapper
import logging
import time
import sys
from node_hardware import NodeHardware
parent = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, parent)
from lib.bonjour_detect import BonjourResolver
import lib.re... |
"""Some helper functions for PyTorch, including:
- get_mean_and_std: calculate the mean and std value of dataset.
- msr_init: net parameter initialization.
- progress_bar: progress bar mimic xlua.progress.
Inspired from https://github.com/kuangliu/pytorch-cifar
"""
import os
import sys
import time
imp... |
import os
import nose
import numpy as np
from pandas.compat import zip
from pandas import Series, Index
import pandas.util.testing as tm
from pandas.util.testing import assertRaisesRegexp
import pandas.core.common as com
from pandas.core.algorithms import quantile
from pandas.tools.tile import cut, qcut
import panda... |
from functools import partial
import random
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, \
Type, TypeVar, Union
from unittest import loader, runner
from unittest.result import TestResult
from django.conf import settings
from django.db import connections, ProgrammingError
from django.urls.re... |
class Link{
constructor(bodyA, bodyB){
var lastLink = bodyA.body.bodies.length-2
this.Link = Constraint.create({
bodyA:bodyA.body.bodies[lastLink],
pointA:{x:0,y:0},
bodyB:bodyB.body,
pointB:{x:0,y:0},
length:10,
stiffn... |
#
# Copyright (C) 2009-2020 the sqlparse authors and contributors
# <see AUTHORS file>
#
# This module is part of python-sqlparse and is released under
# the BSD License: https://opensource.org/licenses/BSD-3-Clause
import re
from sqlparse import sql, tokens as T
# FIXME: Doesn't work
class RightMarginFilter:
k... |
import React from 'react';
import './styles.css';
export default ({ black }) => {
return (
<header className={black ? 'black' : 'transparent'}>
<div className="header--logo">
<a href="#">
<img
src="https://image.tmdb.org/t/p/w500/wwemzKWzjKYJFfCeiB57q3r4Bcm.png"
al... |
/**
* DevExtreme (localization/default_date_names.js)
* Version: 18.2.3
* Build date: Wed Nov 07 2018
*
* Copyright (c) 2012 - 2018 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
"use strict";
var iteratorUtils = require("../core/utils/i... |
"""
Methods for preprocessing impedance data from instrument files
"""
import numpy as np
def readFile(filename, instrument=None):
""" A wrapper for reading in many common types of impedance files
Parameters
----------
filename: string
Filename to extract impedance data from
instrument: ... |
#ifndef _GRAPH_H_
#define _GRAPH_H_
#include <math.h>
#include <stdio.h>
#include <limits.h>
#include <float.h>
#include "cb.h"
#include "file.h"
#include "graph.h"
#include "knngraph.h"
#include "memctrl.h"
#include "random.h"
//Graph *ReadGraphFileHeader(FILE *f)
//{
//int nvec, k, dim, i;
//Graph *g;
//fs... |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Static()
result.template = "object/static/destructible/shared_destructible_tato_drum_dented.iff"
result.attribute... |
import shapeworks as sw
import numpy as np
import os
def create_data_matrix(file_list):
"""Reads data from files in given list and turns into one np matrix"""
data_matrix = []
for file in file_list:
data_matrix.append(np.loadtxt(file))
return np.array(data_matrix)
def pad_index(index):
"""Pad index"""
name ... |
'use strict'
const test = require('ava')
const { MODEL_S, MODEL_X, MODEL_Y, MODEL_3 } = require('tesla-title')
const teslaSpec = require('../')
const cars = [].concat(
Object.keys(MODEL_S),
Object.keys(MODEL_X),
Object.keys(MODEL_Y),
Object.keys(MODEL_3)
)
const omit = ['Model S Plaid+']
cars.forEach(car ... |
import collections
from .descriptors import Alias
class DotDict(object):
""" An attribute-accessible dictionary that preserves insertion order
"""
def __init__(self, *args, **kwargs):
self._od = collections.OrderedDict(*args, **kwargs)
self._init = True
def __delattr__(self, item):
... |
export default {
// Global page headers: https://go.nuxtjs.dev/config-head
head: {
title: 'study_example',
htmlAttrs: {
lang: 'en'
},
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description',... |
/* unzip.h -- IO for uncompress .zip files using zlib
Version 1.01e, February 12th, 2005
Copyright (C) 1998-2005 Gilles Vollant
This unzip package allow extract file from .ZIP file, compatible with PKZip 2.04g
WinZip, InfoZip tools and compatible.
Multi volume ZipFile (span) are not supported.
En... |
const { matchify } = require('../utils')
module.exports = [
// function-call . function-call
matchify({
query: 'f().g()',
source: `
[+] f().g()
[+] f("Hello!").g()
[+] f().g().h()
[ ] f().h()
[ ] f()
[ ] g().g()
[ ] g().f()
[ ] g()
`,
}),
// T . func... |
# -*- coding: utf-8 -*-
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
from os import path
from shutil import rmtree
import sys
from setuptools import setup
import lstail
NAME = 'lstail'
VERSION = lstail.__version__
here = path.abspath(pa... |
cube = lambda x: x**3
def fibonacci(n):
fib = [0,1]
[fib.append(sum(fib[-2:])) for f in range(2,n)]
return fib[:n]
if __name__ == '__main__':
n = int(input())
# print(fibonacci(n))
print(list(map(cube, fibonacci(n))))
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{286:function(module,exports,__webpack_require__){__webpack_require__(287),__webpack_require__(433),module.exports=__webpack_require__(434)},351:function(module,exports){},434:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require_... |
import AuthPolicies from '../../../constants/AuthPolicies';
import GlitterCompose from '../../../components/glitter/GlitterCompose';
import RouteGuard from '../../../components/RouteGuard';
const Glitter = () => {
return (
<RouteGuard authPolicy={AuthPolicies.AUTHENTICATED_WITH_PROFILE_ONLY}>
<GlitterCompo... |
"""Support for monitoring the local system."""
from __future__ import annotations
import asyncio
from dataclasses import dataclass
import datetime
from functools import lru_cache
import logging
import os
import socket
import sys
from typing import Any, Callable, cast
import psutil
import voluptuous as vol
from homea... |
#!/usr/bin/env python3
from argparse import ArgumentParser
import copy
import csv
import json
from itertools import groupby, chain
from math import floor, log10
import os
import sys
from time import time
import profile_strategy
try:
import yaml
except:
sys.stderr.write('YAML output not available. Install pyyaml... |
/******************************************************************************
* Copyright (c) 2020 Fabian Schiebel.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of LICENSE.txt.
*
* Contributors:
* Fabian Schiebel and others
************************... |
import React, { Component } from 'react'
import { Button, Card, CardBody, Col, Row, Form, FormGroup } from 'reactstrap'
import ReactTable from 'react-table'
import 'react-table/react-table.css'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { Redirect } from 'react-router-dom'
import Se... |
#ifndef _ESCAPER_INCLUDE
#define _ESCAPER_INCLUDE
#include "Job.h"
#include "SoundManager.h"
class Escaper : public Job
{
public:
void initAnims(ShaderProgram &shaderProgram);
void updateStateMachine(int deltaTime);
void setWalkingRight(bool value);
string getName();
private:
enum EscaperState
{
ESCAPING_S... |
/**
* @license Highcharts JS v4.1.9 (2015-10-07)
* Client side exporting module
*
* (c) 2015 Torstein Honsi / Oystein Moseng
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global Highcharts, HighchartsAdapter, document, window, Blob, MSBlobBuilder */
(function (Highcharts) {
// Dummy object s... |
const Discord = require('discord.js');
exports.run = function(client, message) {
if(message.channel.type == "dm") return;
if(message.channel.type !== "text") return;
const embed = new Discord.RichEmbed()
.setDescription("**SUNUCU ICONU**")
.setImage(message.guild.iconURL)
messa... |
// Binary: cache/js-dbg-32-82ff7c27fcb0-linux
// Flags:
//
var x = new Int32Array();
x.set(x);
|
# Licensed under a 3-clause BSD style license - see PYFITS.rst
import operator
import warnings
from astropy.utils import indent
from astropy.utils.exceptions import AstropyUserWarning
class VerifyError(Exception):
"""
Verify exception class.
"""
class VerifyWarning(AstropyUserWarning):
"""
Ver... |
import React from 'react';
import { createShallow } from '@material-ui/core/test-utils';
import IconButton from '@material-ui/core/IconButton';
import Header from './Header';
import HeaderNavigation from './Navigation/HeaderNavigation';
import HeaderSearch from './Search/HeaderSearch';
import HeaderAuthButton from './... |
/*
* SignalHelper.c
*
* Created on: Apr 19, 2017
* Author: haskap
*/
#include "SignalHelper.h"
#include <signal.h>
#include <stddef.h> // for NULL definition
void
SetSignalsHandler ( __sighandler_t handler )
{
struct sigaction sigAction;
sigAction.sa_handler = handler;
sigemptyset( &sigAction.sa_mas... |
"""
Unit and regression test for the dftml package.
"""
# Import package, test suite, and other packages as needed
import dftml
import pytest
import sys
def test_dftml_imported():
"""Sample test, will always pass so long as import statement worked"""
assert "dftml" in sys.modules
|
"""
Module: '_onewire' on micropython-v1.11-esp32
"""
# MCU: {'ver': 'v1.11', 'build': '', 'platform': 'esp32', 'port': 'esp32', 'machine': 'ESP32 module with ESP32', 'release': '1.11.0', 'nodename': 'esp32', 'name': 'micropython', 'family': 'micropython', 'sysname': 'esp32', 'version': '1.11.0'}
# Stubber: 1.5.4
from ... |
async f => expect((await f())).toBe(1) |
/*
*
* Copyright (c) 2021 Project CHIP 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/licenses/LICENSE... |
import torch
import torch.nn as nn
import torch.nn.functional as F
class SeparableConv2d(nn.Module):
def __init__(self, in_channels, out_channels, kernel_size=1, stride=1, padding=0, dilation=1, bias=False):
super(SeparableConv2d,self).__init__()
# separable convolution from groups=in_channels
... |
import string
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from tensorflow.keras.preprocessing.sequence import pad_sequences
from tensorflow.keras.preprocessing.text import Tokenizer
def preprocess(s):
return strip_punctuation(remove_br(s... |
import pytest
from hypothesis import assume, given, settings
from hypothesis import strategies as st
from vyper import ast as vy_ast
from vyper import builtin_functions as vy_fn
st_uint256 = st.integers(min_value=0, max_value=2 ** 256 - 1)
@pytest.mark.fuzzing
@settings(max_examples=50, deadline=1000)
@given(a=st_u... |
const express = require('express');
const auth = require('../../middlewares/auth');
const validate = require('../../middlewares/validate');
const stationValidation = require('../../validations/station.validation');
const stationController = require('../../controllers/station.controller');
const router = express.Router... |
/*
* jpeg.h
*
* Created on: Jun 25, 2015
* Author: lukas
*/
#ifndef OPTDETECT_TEST_TESTDATA_ACCESS_JPEG_H_
#define OPTDETECT_TEST_TESTDATA_ACCESS_JPEG_H_
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <sys/types.h>
#include <jpeglib.h>
void free_array_2d(size_t n... |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.9/esri/copyright.txt for details.
//>>built
define(["require","exports","./ObjectPool"],function(b,f,e){b=function(){function a(c,a){void 0===c&&(c=50);void 0===a&&(a=50);this._pool=new e(Map,!1,function(a){r... |
// const validColors = require('./src/style/colorsPalette').colorsPalette;
// const extraFixColorsMap = require('./src/style/colorsPalette').extraFixColorsMap;
// const assetsDepJson = require('./eslint-rules/tests/assets_deprecation.json');
// const deprecationsJson = require('./eslint-rules/tests/component_deprecatio... |
import sys
import re
class Patch:
def __init__(self):
self.func = ''
self.reg = ''
self.reg_list = []
self.reg_some_var = ''
self.patch_type = ''
self.some_var = ''
self.describ = ''
self.lists = []
def set_func(self, func: str):
self.fu... |
# Adapted from https://github.com/rafaelpadilla/Object-Detection-Metrics
from .evaluator import Evaluator
from .bbox import BoundingBox, BoundingBoxes
from .utils import BBType, BBFormat, CoordinatesType
|
"""Check the authorization information passed along via the cookie headers.
When the information is not present or an error occurs due to verification a new
request to Cognito will be made to authorize the user. The user will be taken
to the Cognito login page to enter their information, and so long as it is valid,
t... |
import argparse
import numpy as np
import pandas as pd
from skimage.transform import resize
from skimage.morphology import label
from keras.models import Model, load_model
from preprocessing.generator import preprocess_test
IMG_WIDTH = IMG_HEIGHT = 256
IMG_CHANNELS = 3
def rle_encoding(x):
'''
x: numpy a... |
import datetime
import os.path as osp
from collections import OrderedDict
import torch
import torch.distributed as dist
import mmcv
from .base import LoggerHook
class TextLoggerHook(LoggerHook):
def __init__(self, interval=10, ignore_last=True, reset_flag=False):
super(TextLoggerHook, self).__init__(in... |
var assert = require('should');
var constants = require('../lib/constants');
var MODULE_PATH = '../lib/helpers';
describe('helpers: advancePlayer', function () {
var unit, state;
beforeEach(function () {
unit = require(MODULE_PATH)
state = {
player: 0,
players: [0,1,2,3],
history: [],
... |
/*
* Text for Feature component
*/
import { defineMessages } from 'react-intl';
export default defineMessages({
demo: {
id: 'app.components.Feature.act',
defaultMessage: 'Chat with us.',
},
header: {
id: 'app.components.Feature.header',
defaultMessage: 'Create a library of data',
},
primar... |
// @flow
import path from 'path';
import R from 'ramda';
import semver from 'semver';
import ComponentMap from '../../../bit-map/component-map';
import { BitId } from '../../../../bit-id';
import Component from '../../../component';
import logger from '../../../../logger/logger';
import { Consumer } from '../../../../c... |
/*
* Copyright 2016 John Coker for ThrustCurve.org
* Licensed under the ISC License, https://opensource.org/licenses/ISC
*/
'use strict';
const fs = require('fs');
// https://github.com/monperrus/crawler-user-agents/
var crawlers = JSON.parse(fs.readFileSync(__dirname + '/crawler-user-agents.json', 'utf8'));
crawl... |
//// [derivedClassWithoutExplicitConstructor2.ts]
class Base {
a = 1;
constructor(x: number, y?: number, z?: number);
constructor(x: number, y?: number);
constructor(x: number) { this.a = x; }
}
class Derived extends Base {
x = 1
y = 'hello';
}
var r = new Derived(); // error
var r2 = new Der... |
const nodemailer = require('nodemailer');
const transporter = nodemailer.createTransport({
service: 'SendGrid',
auth: {
user: process.env.SENDGRID_USER,
pass: process.env.SENDGRID_PASSWORD
}
});
let fs = require('fs');
let notice = '';
exports.getContact = (req, res) => {
fs.readFile('./data/notice... |
from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from waffle.utils import get_setting
from django.apps import apps as django_apps
VERSION = (0, 20, 0)
__version__ = '.'.join(map(str, VERSION))
default_app_config = 'waffle.apps.WaffleConfig'
def flag_is_active(request,... |
/*
* Copyright 2009-2017 Alibaba Cloud 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/LICENSE-2.0
*
* Unless required... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "superfifa.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... |
import os
import sys
import numpy as np
from densenet.utils import processArguments, read_data
from imageio import imread, imsave
params = {
'db_root_dir': '/home/abhineet/N/Datasets/617/',
'src_dir': '',
'dst_dir': '',
'images_ext': 'png',
'labels_ext': 'png',
'n_classes': 3,
'n_indices': ... |
# modified mexican hat wavelet test.py
# spectral analysis for RADAR and WRF patterns
# NO plotting - just saving the results: LOG-response spectra for each sigma and max-LOG response numerical spectra
import os, shutil
import time, datetime
import pickle
import numpy as np
from scipy import signal, ndimage
imp... |
'use strict';
var should = require('chai').should();
var sinon = require('sinon');
var bitcore = require('simple-bitcore-lib');
var Networks = bitcore.Networks;
var proxyquire = require('proxyquire');
var util = require('util');
var BaseService = require('../lib/service');
var index = require('../lib');
var log = inde... |
##############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... |
Object.defineProperty (module.exports, "__esModule", { value: true });
module.exports.ClipboardTransferMode = module.exports.default = {
CLONE_ONLY: 0,
CLONE_PREFERRED: 1,
ORIGINAL_ONLY: 2,
ORIGINAL_PREFERRED: 3
}; |
# check some code some day, if bought, how much I earn
def review_code(code):
pass
if __name__ == '__main__':
review_code() |
import * as THREE from 'three';
export default {
init(props) {
const {camera} = props;
const TrackballControls = new THREE.TrackballControls(camera);
TrackballControls.updateProperty = this.updateProperty;
return TrackballControls;
},
updateProperty(key, value) {
if (Object.hasOwnProperty.cal... |
# -*- coding: utf-8 -*-
import re
import pytest
from mimesis import Internet, data
from mimesis.enums import Layer, MimeType, PortRange, TLDType
from mimesis.exceptions import NonEnumerableError
from . import patterns
class TestInternet(object):
@pytest.fixture
def net(self):
return Internet()
... |
/*
* Copyright (C) 2008 Maarten Maathuis.
* All Rights Reserved.
*
* 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 the rights to use... |
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... |
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: alert_rule.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... |
/****************************************************************************
****************************************************************************
***
*** This header was automatically generated from a Linux kernel header
*** of the same name, to make information necessary for userspace to
*** call i... |
import React from 'react'
import Link from 'gatsby-link'
const Header = ({ siteTitle }) => (
<div
style={{
background: 'white',
marginBottom: '3rem',
borderBottom: '2px solid #e6e6e6',
}}
>
<div
style={{
margin: '0 auto',
maxWidth: 980,
padding: '1.45rem ... |
import pytest
from sanic import Sanic
from sanic.config import Config
from sanic.errorpages import HTMLRenderer, exception_response
from sanic.exceptions import NotFound, SanicException
from sanic.handlers import ErrorHandler
from sanic.request import Request
from sanic.response import HTTPResponse, html, json, text
... |
// SponsorList
import {
Badge,
Card,
CardHeader,
DropdownMenu,
DropdownItem,
UncontrolledDropdown,
DropdownToggle,
Media,
Table,
Container,
Row,
Col,
Modal,
Button,
} from "reactstrap";
// core components
import UserHeaderSponsorsList from "components/Headers/UserHeaderSponsorsList.js";
imp... |
fieldValidations();
var campaignID = $('#CampaignID').val();
//CampaignClientID
var campaignClientID = $("#CampaignClientID").val()
var campaign_goal = $('#campaign_goal').val();
var temp = [];
$('.backToSettings').on('click', function() {
$('.dataTableClass').DataTable().page.len(10).draw();
$(".Campa... |
/* */
(function(process) {
'use strict';
var invariant = require("./invariant");
function monitorCodeUse(eventName, data) {
!(eventName && !/[^a-z0-9_]/.test(eventName)) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'You must provide an eventName using only the characters [a-z0-9_]') : invariant... |
// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by a... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import sortedm2m.fields
import sortedm2m.operations
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('altersortedmanytomanyfield_tests', '0001_initial'),
]
operations = [
sor... |
import matplotlib.pyplot as plt
import matplotlib
from matplotlib import patches
import tempfile
import shutil
import os
import sys
# Load some user parameters / defaults
# By default figurefirst will load the figurefirst_user_parameters.py file from the figurefirst/figurefirst directory.
# If you would like to set ... |