text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
# Copyright (c) 2017, masonarmani38@gmail.com and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestSalesWeeklyReportOutlets(unittest.TestCase):
pass
|
/* Named export */
export const steps = [
'Basic knowledge',
'Installation',
'Create default build',
'Using npx',
'Using ES6 Modules',
'Using lodash',
'Add configuration',
'Using npm scripts',
'Using Dev Server',
'Loading CSS',
'Extract CSS',
'Using Handlebars',
'Loa... |
const cons = require('../../common/constants');
const Game = require('../game');
let game = module.exports = new Game(cons.Game.BCBM());
// game.registerClass('room.db', require('./room/db'));
game.registerClass('room.robot', require('./room/robot'));
game.registerClass('room.robotManager', require('./room/robotMana... |
import {createStore, combineReducers, applyMiddleware, compose} from 'redux'
import createHistory from 'history/createBrowserHistory'
import {routerReducer, routerMiddleware} from 'react-router-redux'
import thunk from 'redux-thunk'
import createSagaMiddleware from 'redux-saga'
import reducers from '../redux/reducers'
... |
#ifndef __UHOOK_OS_H__
#define __UHOOK_OS_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "defs.h"
#include <stddef.h>
/**
* @brief Alloc a block of memory that has EXEC attribute
* @param[in] size Memory size
* @return Address
*/
API_LOCAL void* _alloc_execute_memory(size_t size);
... |
# -*- coding: utf-8 -*-
'''
Minion side functions for salt-cp
'''
# Import python libs
from __future__ import absolute_import
import os
import logging
import fnmatch
# Import salt libs
import salt.minion
import salt.fileclient
import salt.utils
import salt.utils.url
import salt.crypt
import salt.transport
from salt.e... |
# -*- coding: utf-8 -*-
#
# PyFR documentation build configuration file, created by
# sphinx-quickstart on Sat Oct 6 23:44:12 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All co... |
("undefined"==typeof window?global:window).__07e029149e7b50ff5008626a55c0874d=function(){function e(e){return e&&e.__esModule?e:{default:e}}var t={},i=e(__ce09c80fb835cb76cda82f0f0d4a1ea3),n=e(__7a6521db1039cb333e437aa8031353cf);return function(){function e(e){String(e.value).trim().length||(e.value=e.getAttribute("pla... |
"""Module containing helpers for dealing with GitHub Apps.
https://developer.github.com/apps/building-github-apps/
"""
import time
from jwcrypto import jwk
from jwcrypto import jwt
from . import models
from . import users
TEN_MINUTES_AS_SECONDS = 10 * 60
DEFAULT_JWT_TOKEN_EXPIRATION = TEN_MINUTES_AS_SECONDS
APP_PRE... |
import emoji
import math
import random
print(emoji.emojize("Olá Mojao :heartbeat:", use_aliases=True))
print(emoji.emojize("sorriso :grinning:", use_aliases=True))
print(emoji.emojize("beijo :kissing:", use_aliases=True))
#num=float(input("Digite um numero: "))
#num2=float(input("digit um numero: "))
#num3=math.floor... |
/*
Template Name: Uplon - Responsive Bootstrap 4 Admin Dashboard
Author: CoderThemes
Version: 2.0.0
Website: https://coderthemes.com/
Contact: support@coderthemes.com
File: Morris chart init js
*/
!function($) {
"use strict";
var MorrisCharts = function() {};
//creates line chart
MorrisCharts.protot... |
/* global describe, it */
var pkg = require('..');
var expect = require('chai').expect;
describe('oauth2orize-crossorigin', function() {
it('should export hello world', function() {
expect(pkg.hello).to.equal('world');
});
});
|
#!/usr/bin/env python
from setuptools import setup, find_packages
TEST_REQUIRES = [
'flexmock>=0.9.7',
'nose',
'coverage'
]
INSTALL_REQUIRES = [
'requests>=1.0.0',
'pycrypto>=2.5',
'python-dateutil>=1.5'
]
setup(
name='uber.py',
version='1.0.3',
author='Tal Shiri',
author_ema... |
/*
Based on Urban by TEMPLATED
templated.co @templatedco
Released for free under the Creative Commons Attribution 3.0 license (templated.co/license)
*/
(function($) {
skel.breakpoints({
xlarge: '(max-width: 1680px)',
large: '(max-width: 1280px)',
medium: '(max-width: 980px)',
small: '(max-widt... |
try:
from html import escape
except ImportError:
from cgi import escape
from braintree.apple_pay_options import ApplePayOptions
from braintree.error_result import ErrorResult
from braintree.successful_result import SuccessfulResult
from braintree.exceptions.unexpected_error import UnexpectedError
class AppleP... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import storages.backends.s3boto
import users.models
class Migration(migrations.Migration):
dependencies = [
('users', '0018_auto_20160406_1016'),
]
operations = [
migrations.AlterFie... |
# ------------------------------------------------------------------------
# Copyright (c) 2021 4669 (for eccv submission only). All Rights Reserved.
# ------------------------------------------------------------------------
# Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR)
# Copyri... |
import { CommonModule } from '@angular/common';
import { Component, ViewEncapsulation, ChangeDetectionStrategy, ElementRef, Directive, ChangeDetectorRef, Optional, ContentChildren, ContentChild, forwardRef, Inject, ViewChild, Input, EventEmitter, Attribute, Output, NgModule } from '@angular/core';
import { mixinDisable... |
import os
from routes import url_for
from paste import fixture
from paste.deploy import loadapp
import pytest
from ddtrace.ext import http, errors
from ddtrace.constants import SAMPLING_PRIORITY_KEY, ANALYTICS_SAMPLE_RATE_KEY
from ddtrace.contrib.pylons import PylonsTraceMiddleware
from tests.opentracer.utils import... |
# Lint as: python3
# 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.org/licenses/LICENSE-2.0
#
# Unless ... |
#!/usr/bin/env node
const yargs = require('yargs');
const { hideBin } = require('yargs/helpers');
const pkg = require('../package.json');
const checkUserInput = require('./process-input');
/**
* Gets the user input from the command line and checks the input, printing an error message if the input argument is invalid... |
#ifndef __CONFIG_H__
#define __CONFIG_H__
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include <time.h>
#include <errno.h>
/*size and limit settings*/
#define MAX_NAME_SIZE 50+1
#define MAX_OPTION_MENU_SIZE 50
#define TOTAL_OPTION_MAIN_MENU 6
#define MAX_USERNAME_SIZE... |
# Copyright 2013 Novo Nordisk Foundation Center for Biosustainability,
# Technical University of Denmark.
#
# 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... |
export default {
'menu.welcome': '歡迎',
// 'menu.more-blocks': '更多區塊',
'menu.product.manage': '产品管理',
'menu.product.entry': '产品录入',
'menu.product.inquiry': '产品查询',
'menu.list': '列表',
'menu.list.order': '订单列表',
'menu.list.policy': '保单列表',
'menu.account.center': '個人中心',
'menu.account.settings': '個人設置'... |
import mz
P = mz.Parameter
class SignalWithEnvelope(mz.BaseModule):
src: mz.BaseModule
env: mz.BaseModule
def out(self, clock_signal: mz.ClockSignal):
# This defines the length!
env = self.env(clock_signal)
fake_clock_signal = clock_signal.change_length(env.shape[0])
sr... |
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include <ddk/mmio-buffer.h>
#include <ddk/protocol/pci.h>
#include <stdio.h>
#include <zircon/syscalls.h>
__BEGIN_CDECLS
static inline zx_... |
import requests
import json
import re
import pandas as pd
class Data:
"""
This module retrieves statistics of cases of the 2019 Novel Coronavirus.
Data Source: https://view.inews.qq.com/g2/getOnsInfo?name=disease_h5
...
Attributes
----------
statistics : dict
The raw data... |
define("ace/ext/spellcheck", ["require", "exports", "module", "ace/lib/event", "ace/editor", "ace/config"], function (e, t, n) {
"use strict";
var r = e("../lib/event");
t.contextMenuHandler = function (e) {
var t = e.target, n = t.textInput.getElement();
if (!t.selection.isEmpty()) return;
var i = t.... |
const path = require('path');
const globalJestConfig = require('../../../jest.config');
const finalJestConfig = globalJestConfig;
finalJestConfig.rootDir = path.join(__dirname, '../../..');
finalJestConfig.testMatch = [
'<rootDir>/examples/official-storybook/image-snapshots/storyshots-image.runner.js',
];
module.e... |
# Copyright 2016 F5 Networks 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... |
// words-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
module.exports = function (app) {
const mongooseClient = app.get('mongooseClient');
const { Schema } = mongooseClient;
const words = new Schema({
userId: {
type: Schema.Types.Objec... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import App from './components/App';
//redux
import store from './redux/store';
import './styles.css';
ReactDOM.render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root'),
);
|
/**
* vue-touch-keyboard v0.3.0
* https://github.com/icebob/vue-touch-keyboard
* Released under the MIT License.
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueTouchKeyboard=e():t.VueTouch... |
# coding=utf-8
# *** WARNING: this file was generated by crd2pulumi. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
SNAKE_TO_CAMEL_CASE_TABLE = {
"api_version": "apiVersion",
"application_selector": "applicationSelector",
"backing_service_selector": "backingServiceSele... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('echarts/lib/echarts'), require('echarts/lib/component/tooltip'), require('echarts/lib/component/legend'), require('echarts/lib/chart/bar')) :
typeof define === 'function' && define.amd ? defi... |
"""
Output Script Descriptors
*************************
HWI has a more limited implementation of descriptors.
See `Bitcoin Core's documentation <https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md>`_ for more details on descriptors.
This implementation only supports ``sh()``, ``wsh()``, ``pkh()``, ``wpk... |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... |
#pragma once
namespace Kore {
namespace Graphics4 {
class PipelineState;
}
class PipelineStateImpl;
class ShaderImpl {
public:
ShaderImpl(void* data, int length);
ShaderImpl(const char* source);
virtual ~ShaderImpl();
uint _glid;
const char* source;
int length;
friend class Grap... |
(this["webpackJsonpsafe-react"]=this["webpackJsonpsafe-react"]||[]).push([[84],{1444:function(e,n,t){"use strict";t.r(n);var r=t(1),a=t.n(r),o=t(1506);function i(e,n,t,r,a,o,i){try{var l=e[o](i),s=l.value}catch(c){return void t(c)}l.done?n(s):Promise.resolve(s).then(r,a)}n.default=function(e){var n=e.preferred,r=e.labe... |
import re
f = open('04.txt')
rows = f.readlines()
f.close()
validCount = 0
byr = iyr = eyr = hgt = hcl = ecl = pid = cid = False
i = 0
while i < len(rows):
row = str(rows[i])
i +=1 # next line
if len(row) < 2: #end of passport entry or end of file
if byr and iyr and eyr and hgt and hcl and ecl and pid:
v... |
"""Test different accessory types: Media Players."""
from homeassistant.components.homekit.const import (
ATTR_VALUE,
CONF_FEATURE_LIST,
FEATURE_ON_OFF,
FEATURE_PLAY_PAUSE,
FEATURE_PLAY_STOP,
FEATURE_TOGGLE_MUTE,
)
from homeassistant.components.homekit.type_media_players import (
MediaPlaye... |
import customAttributes, { CustomAttributeRegistry } from './index.js';
window.customAttributes = customAttributes;
window.CustomAttributeRegistry = CustomAttributeRegistry;
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var typescript_1 = require("../../typescript");
var NodeHandlerHelper = /** @class */ (function () {
function NodeHandlerHelper(compilerFactory) {
this.compilerFactory = compilerFactory;
}
NodeHandlerHelper.prototype.handle... |
module.exports = {
blog: {
posts: [],
},
}
|
"""
Functions to slice a mesh. For now, computes planar cross-section
"""
import numpy as np
import numpy.linalg as la
import collections
# ---- Geometry datastructures
def make_edge(v1, v2):
"""
We store edges as tuple where the vertex indices are sorted (so
the edge going from v1 to v2 and v2 to v1 is ... |
import pytest
import numpy as np
from tbats.bats import Components
class TestComponents(object):
def test_period_normalization(self):
periods = [2.2, 3.3, 1.0]
c = Components(seasonal_periods=periods)
assert np.array_equal([2, 3, 1], c.seasonal_periods)
@pytest.mark.parametrize(
... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Dcmtk(CMakePackage):
"""DCMTK is a collection of libraries and applications implementing l... |
import asyncio, discord, os, re, psutil, platform, time, sys, fnmatch, subprocess, speedtest, json, struct, shutil, tempfile
from PIL import Image
from discord.ext import commands
from Cogs import Utils, Settings, DisplayName, ReadableTime, GetImage, ProgressBar, UserTime, Message, DL
try:
from urll... |
""" Simple RAW image processing module"""
import sys
import os
import scipy
from scipy import signal
import numpy as np
from numpy.lib.stride_tricks import as_strided
import rawpy
""" Process RAW file into a image file.
Example usage:
raw = read("sample.ARW")
rgb = process(raw)
write(rgb, "output.ARW")
"""
def read... |
/*
* Wi-Fi Direct - P2P Invitation procedure
* Copyright (c) 2010, Atheros Communications
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#include "includes.h"
#include "common.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl... |
// Copyright (c) 2011-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.
#ifndef BITCOIN_QT_WALLETMODELTRANSACTION_H
#define BITCOIN_QT_WALLETMODELTRANSACTION_H
#include <qt/walletmodel.h>
#includ... |
from powerpy.synchronize import synchronized, synchronize_ensure, synchronize_release
class Observer:
def update(self, *args, **kwargs):
pass
class Observable:
def __init__(self):
self.observers = []
self.changed = False
@synchronized
def add_observer(self, observer):
... |
from south.db import db
from django.db import models
class Migration:
def forwards(self):
db.alter_column("fakeapp_spam", 'weight', models.FloatField(null=True))
def backwards(self):
db.alter_column("fakeapp_spam", 'weight', models.FloatField())
models = {
... |
#!/usr/bin/env python3
import sys
import secrets
from requests import Session
import re
limit = 128
offset = 0
ip = sys.argv[1]
find_fileinfo_regexp = re.compile(r'<div class="filenames">(.*)</div>')
new_filename_link = re.compile(r'<div class="message">Your fanfic was uploaded to (uploads/.*)</div>')
url = f'http:/... |
/**
=========================================================
* Material Dashboard 2 React - v2.0.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-react
* Copyright 2021 Creative Tim (https://www.creative-tim.com)
Coded by www.creative... |
"""Support for Xiaomi Mi Flora BLE plant sensor."""
from datetime import timedelta
import logging
import btlewrap
from btlewrap import BluetoothBackendException
from miflora import miflora_poller
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
... |
import React, { useState, useEffect } from 'react';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import {
Grid,
Paper,
Typography
} from '@material-ui/core';
import moment from 'moment';
import { concat, flatten } from 'lodash/array';
import { orderBy } from 'lodash/collection';... |
import numpy as np
import h5py
#
def normalization(data):
_range = np.max(data) - np.min(data)
return (data - np.min(data)) / _range
def onehot(data_y):
# one-hot encoding sleep stages
data_y=[data_y]
temp_y = []
for i in range(len(data_y)):
temp_ = []
for j in rang... |
# Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
#
# 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, copy, m... |
export const piedPiper = {"viewBox":"0 0 2304 1792","children":[{"name":"path","attribs":{"d":"M2304 0q-69 46-125 92t-89 81-59.5 71.5-37.5 57.5-22 44.5-14 29.5q-10 18-35.5 136.5t-48.5 164.5q-15 29-50 60.5t-67.5 50.5-72.5 41-48 28q-47 31-151 231-341-14-630 158-92 53-303 179 47-16 86-31t55-22l15-7q71-27 163-64.5t133.5-53... |
// @flow
import { FieldTextStateless } from '@atlaskit/field-text';
import React, { Component } from 'react';
import { withTranslation } from 'react-i18next';
import { connect } from 'react-redux';
import type { Dispatch } from 'redux';
import { compose } from 'redux';
import config from '../../config';
import { get... |
import numpy as np
import pandas as pd
from functools import reduce
import seaborn as sns
from scipy.stats import multivariate_normal
import csv
def read_data(year,data_path):
path_name = data_path+'ENIGH'+year+'/'
hog = pd.read_csv(path_name+'hogares.csv', index_col = 'folioviv',
low_mem... |
(this.webpackJsonpdashboard=this.webpackJsonpdashboard||[]).push([[83],{495:function(e,t,o){"use strict";function r(e){e.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy... |
# -*- coding: utf-8 -*-
from .render.console import ConsoleRender
from . import themes
def prompt(questions, render=None, answers=None,
theme=themes.Default(), raise_keyboard_interrupt=False):
render = render or ConsoleRender(theme=theme)
answers = answers or {}
try:
for question in q... |
from django.db import models
from django.contrib.auth.models import User
from PIL import Image
class Profile(models.Model):
user=models.OneToOneField(User,on_delete=models.CASCADE)
image=models.ImageField(default='default.jpg',upload_to='profiles_pics')
def __str__(self):
return f'{self.user.user... |
from .conditional_abunmatch_bin_based import *
from .noisy_percentile import *
from .engines import cython_bin_free_cam_kernel
from .bin_free_cam import conditional_abunmatch
|
import 'prismjs'
import 'prismjs/plugins/line-highlight/prism-line-highlight'
import './common/icons.css'
import Inferno from 'inferno'
import Debugger from './components/Debugger'
document.body.removeChild(document.querySelector('#error'))
Inferno.render((
<Debugger />
), document.getElementById('root'))
|
#include "certificate.h"
#include <errno.h>
#include <stdint.h> /* SIZE_MAX */
#include <time.h>
#include <openssl/asn1.h>
#include <sys/socket.h>
#include "algorithm.h"
#include "config.h"
#include "extension.h"
#include "log.h"
#include "nid.h"
#include "reqs_errors.h"
#include "str_token.h"
#include "thread_var.h"... |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
# -*- coding: utf-8 -*-
class Solution:
def replaceDigits(self, s: str) -> str:
result = list(s)
for i in range(1, len(result), 2):
result[i] = self.shift(result[i - 1], int(result[i]))
return ''.join(result)
def shift(self, c: str, x: int) -> str:
return chr(ord(c)... |
import React from "react";
import { OutboundLink } from "gatsby-plugin-google-analytics";
import { Link } from "gatsby";
import Layout from "../../components/layout";
import ChoiceSupport from "../../components/ChoiceSupport";
import SEO from "../../components/seo";
import GlobalStyles from "../../styles/Global.module.... |
"""SCons.Environment
Base class for construction Environments. These are
the primary objects used to communicate dependency and
construction information to the build engine.
Keyword arguments supplied when the construction Environment
is created are construction variables used to initialize the
Environment
"""
#
# ... |
import codecs
import os
import re
from setuptools import find_packages, setup
HERE = os.path.abspath(os.path.dirname(__file__))
def read(*parts):
"""
Build an absolute path from *parts* and and return the contents of the
resulting file. Assume UTF-8 encoding.
"""
with codecs.open(os.pa... |
const React = require('react'); const Component = React.Component;
const { Platform, TouchableOpacity, Linking, View, Switch, Slider, StyleSheet, Text, Button, ScrollView, TextInput } = require('react-native');
const { connect } = require('react-redux');
const { ScreenHeader } = require('lib/components/screen-header.js... |
export const ic_motion_photos_pause_outline = {"viewBox":"0 0 24 24","children":[{"name":"rect","attribs":{"fill":"none","height":"24","width":"24"},"children":[]},{"name":"path","attribs":{"d":"M2.88,7.88l1.54,1.54C4.15,10.23,4,11.1,4,12c0,4.41,3.59,8,8,8s8-3.59,8-8s-3.59-8-8-8c-0.9,0-1.77,0.15-2.58,0.42 L7.89,2.89C9.... |
/*******************************************************************************
* @license
* Copyright (c) 2011, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials are made
* available under the terms of the Eclipse Public License v1.0
* (http://www.eclipse.org/l... |
from act import Act
from sample.projectcode import ProjectCode
from utils.inout import *
class BCBuilder(Act):
def start(self):
projects_dir = join_path(self.arguments.data_dir, self.arguments.projects_dir)
dir_names = get_directories(projects_dir)
for dir_name in dir_names:
... |
/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENS... |
#!/usr/bin/python
"""
@file routecheck.py
@author Michael Behrisch
@author Jakob Erdmann
@author Yun-Pang Floetteroed
@date 2007-03-09
@version $Id$
This script does simple checks for the routes on a given network.
Warnings will be issued if there is an unknown edge in the route,
if the route is disconnected,... |
//=======================================================
// File Name : wcard.h
//=======================================================
#ifndef __WCARD_H_
#define __WCARD_H_
#include <stdio.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
#include ... |
export default {
'dictionary.yiji': 'Lớp 1',
'dictionary.erji': 'Thể loại phụ',
'dictionary.table.add': 'Thêm',
'dictionary.table.col1': 'Sắp xếp',
'dictionary.table.col2': 'Tên',
'dictionary.table.col3': 'Bí danh song ngữ',
'dictionary.table.col4': 'Có nên bắt đầu không',
'dictionary.table.col5': 'Tạ... |
#!/usr/bin/env python3
from __future__ import print_function
import unittest
import torch
from captum.attr._models.base import (
InterpretableEmbeddingBase,
configure_interpretable_embedding_layer,
remove_interpretable_embedding_layer,
)
from tests.helpers.basic import assertTensorAlmostEqual
from tests.... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# File: _test.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import logging
import tensorflow as tf
import unittest
class TestModel(unittest.TestCase):
def run_variable(self, var):
sess = tf.Session()
sess.run(tf.global_variables_initializer())
i... |
import sublime
import sublime_plugin
import re
SETTINGS_FILE = 'wrap_it.sublime-settings'
PREFS = sublime.load_settings(SETTINGS_FILE)
DEFINITIONS = PREFS.get('definitions')
SELECTION_TAG = "<sel>"
def detect_syntax(window):
""" Detects syntax and returns wrappers. """
active_syntax = window.active_view().se... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.views.static import serve
from filer.utils.compatibility import GTE_DJANGO_1_9
admin.autodiscover()
admin_urls = admin.site.urls
if not... |
import React, { Component } from 'react';
class Info extends Component {
render() {
return (
<div>
这里是测试动态路由功能。
动态路由的值是:{this.props.match.params.value}
</div>
)
}
}
export default Info; |
import { get } from '@ember/object';
import { run } from '@ember/runloop';
import RSVP, { resolve } from 'rsvp';
import setupStore from 'dummy/tests/helpers/store';
import { module, test } from 'qunit';
import JSONAPIAdapter from 'ember-data/adapters/json-api';
import JSONAPISerializer from 'ember-data/serializers/json... |
#!/usr/bin/env python3
# Copyright (c) 2018-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 the blocksdir option.
"""
import os
import shutil
from test_framework.test_framework import Floc... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Dict, List, Mapping, Optional, Tuple, Union
from .. import ... |
##########################################################################
#
# Copyright (c) 2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... |
# coding=utf-8
import time
import re
import logging
from error import DiamondException
class Metric(object):
_METRIC_TYPES = ['COUNTER', 'GAUGE']
def __init__(self, path, value, raw_value=None, timestamp=None, precision=0,
metric_type='COUNTER', ttl=None, host="ignored"):
"""
... |
#!/usr/bin/env python3
"""
Build call-back mechanism for f2py2e.
Copyright 2000 Pearu Peterson all rights reserved,
Pearu Peterson <pearu@ioc.ee>
Permission to use, modify, and distribute this software is given under the
terms of the NumPy License.
NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK... |
from .utils import memory_usage, write_log
__all__ = ["memory_usage", "write_log"] |
// requirements
var gulp = require('gulp'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
less = require('gulp-less'),
path = require('path');
// run
gulp.task('default', function() {
// easier to read variable
var themeName = 'simple';
// less
gulp.src('./assets/l... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright (c) 2014-2022 Megvii Inc. All rights reserved.
import torch.nn as nn
from exps.model.tal_head import TALHead
from exps.model.dfp_pafpn import DFPPAFPN
class YOLOX(nn.Module):
"""
YOLOX model module. The module list is defined by create_yolov3_modul... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Optional, Union, Dict
from dbas.database import DBDiscussionSession
from dbas.database.discussion_model import ClickedStatement, ClickedArgument, User, MarkedArgument, MarkedStatement, \
Argument, Statement
from dbas.lib import get_author_data, Relat... |
import aerosandbox as asb
import aerosandbox.numpy as np
n_timesteps = 301
mass_block = 1
opti = asb.Opti()
time = np.cosspace(0, 1, n_timesteps)
position = opti.variable(
init_guess=np.linspace(0, 1, n_timesteps)
)
velocity = opti.derivative_of(
position,
with_respect_to=time,
derivative_init_gues... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = require("react");
const wrapIcon_1 = require("../utils/wrapIcon");
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 24, height: 24, viewBox: "0 0 24 ... |
from matplotlib import pyplot as plt
def plot(name, values):
fig, ax = plt.subplots()
ax.plot(values)
ax.set(xlabel='days', ylabel='infected', title=name)
ax.grid()
plt.show()
|
# -*- coding: utf-8 -*-
"""
werkzeug.debug.console
~~~~~~~~~~~~~~~~~~~~~~
Interactive console support.
:copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD.
"""
import sys
import code
from types import CodeType
from werkzeug.utils import escape
from werkzeug.local... |