text stringlengths 3 1.05M |
|---|
/*
* QEMU TILE-Gx CPU
*
* Copyright (c) 2015 Chen Gang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later versio... |
from __future__ import absolute_import, unicode_literals
import io
import pygst
pygst.require('0.10')
import gst # noqa
from mopidy.compat import configparser
from mopidy.internal import validation
try:
import xml.etree.cElementTree as elementtree
except ImportError:
import xml.etree.ElementTree as element... |
"""
Copyright 2017-2018 Fizyr (https://fizyr.com)
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 agree... |
'''
Author: Jack Morikka.
This program is intended to take bulk collected data from an IMARIS batch
run that outputs channels (or spots) and convert it into a format ready for
LAM analysis. This bulk data consists of e.g. a Spots_1 directory which
contains .csv files such as 'Area.csv' and 'positio... |
"""
JSON serializer with Tagulous support
"""
from django.core.serializers import json as json_serializer
from . import base
class Serializer(base.SerializerMixin, json_serializer.Serializer):
"""
JSON serializer with tag field support
"""
pass
Deserializer = base.DeserializerWrapper(
json_ser... |
import _ from 'lodash';
import fs from 'fs';
import Graph from '../../data-structures/graph/Graph.js';
import {
createEdgesFromVerticesValues,
} from '../../data-structures/graph/utils/graph.js';
import {
getAllIndexes, removeArrayDuplicates,
getUniques,
} from '../arrays/arrays.js';
import {
objectReduce,
... |
/*
* Copyright (c) 2020 Pangeanic SL.
*
* This file is part of NEC TM
* (see https://github.com/shasha79/nectm).
*
* 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 copy... |
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyr... |
import React, {Component} from 'react';
// Components
import Link from 'next/link'
// Styles
import '../public/styles/global.css';
class Header extends Component {
constructor(props) {
super(props);
}
render() {
return (
<header className="pageHeader">
<nav ro... |
'use strict';
module.exports = function () {
return global.location.protocol === 'http:';
};
|
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, Inc.
# 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 res... |
"""
Copyright (c) 2018 Amazon. All rights reserved.
"""
import http.client
import http
from collections import defaultdict
class InvocationRequest(object):
def __init__(self, **kwds):
self.__dict__.update(kwds)
def __eq__(self, other):
return self.__dict__ == other.__dict__
class LambdaRun... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require... |
'use strict';
const rule = require('..');
const { messages, ruleName } = rule;
testRule(rule, {
ruleName,
config: ['0,1,0'],
accept: [
{
code: '.ab {}',
},
{
code: 'span a {}',
},
{
code: ':not(.b) {}',
},
{
code: ':not(.b, .c) {}',
},
{
code: ':matches(.b) {}',
},
{
code: ... |
"""Fonduer sentence context model."""
from builtins import object
from typing import Any, Dict
from sqlalchemy import Column, ForeignKey, Integer, String, Text, UniqueConstraint
from sqlalchemy.dialects import postgresql
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import backref, relations... |
# -*- coding: utf-8 -*-
"""
File Name: TreeNode
Author : jing
Date: 2020/3/19
"""
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
|
/*
** EPITECH PROJECT, 2017
** my_nbrlen.c
** File description:
** florent.poinsard@epitech.eu
*/
int my_nbrlen(int nb)
{
int result = nb;
int i = 0;
while (result > 0) {
result = result / 10;
i++;
}
return (i);
}
|
############################################################################
#
# Author: Ruth Huey
#
# Copyright: M. Sanner TSRI 2004
#
#############################################################################
#
# $Header: /opt/cvs/python/packages/share1.5/AutoDockTools/atomTypeTools.py,v 1.23 2010/09/22 21:44:17... |
import numpy as np
import quaternion
def rot_matrix_to_axan(data):
"""
Converts rotation matrices to axis angles
:param data: Rotation matrices. Shape: (Persons, Seq, 24, 3, 3)
:return: Axis angle representation of inpute matrices. Shape: (Persons, Seq, 24, 3)
"""
aa = quaternion.as_rotation_v... |
export const createFromCall = (call, suffix) => call + '_' + suffix;
const PREFIX = 'doggos/';
export const CALLS = {
GET_DOGGOS_IMAGES: PREFIX + 'GET_DOGGOS_IMAGES',
};
export const GET_DOGGOS_IMAGES = CALLS.GET_DOGGOS_IMAGES;
export const GET_DOGGOS_IMAGES_SUCCESS = createFromCall(CALLS.GET_DOGGOS_IMAGES, 'SUC... |
# coding: utf-8
# In[61]:
#!/usr/bin/env python
"""
Adapted from code sample code from the Pymodbus Examples
***Created by Andrew Shephard
"""
#---------------------------------------------------------------------------#
# import the required server implementation
#--------------------------------------------------... |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
(function(global) {
glo... |
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", className: className },
React.crea... |
# engine/default.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Default implementations of per-dialect sqlalchemy.engine classes.
These are se... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lakeformation/LakeFormation_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace LakeFormation
{
namespace Model
{
enum class Transaction... |
import sys
import string
import itertools
import logging
from dateutil.parser import parse as dateparser
from collections import OrderedDict
from namedentities import numeric_entities, named_entities
# some utility functions
letters = [ c for c in string.uppercase ]
double_aff = [ "%c%c" % (x,y) for (x,y) in itertool... |
from wtforms import BooleanField, PasswordField, SelectField, StringField
from wtforms.fields.html5 import EmailField
from wtforms.validators import InputRequired
from CTFd.forms import BaseForm
from CTFd.forms.fields import SubmitField
from CTFd.models import UserFieldEntries, UserFields
from CTFd.utils.countries imp... |
import React, {PropTypes, Component} from 'react';
import {
View,
Text,
ListView,
Dimensions,
} from 'react-native';
import Moment from 'moment';
import styles from './CalendarStyle';
import Month from './Month';
const {width} = Dimensions.get('window');
export default class MonthList extends Component {
cons... |
from setuptools import find_packages, setup
setup(
name = 'django-flat-theme',
packages = find_packages(),
version = __import__('flat').__version__,
author = 'Alex D',
author_email = 'mail@elky.me',
description = ('A flat theme for Django admin interface. Modern, fresh, simple.'),
license =... |
from dataclasses import dataclass, field
from datetime import datetime, timedelta
from typing import Dict, Optional, Tuple
import pendulum
from ja_timex.pattern.place import Pattern
@dataclass
class TIMEX:
type: str
value: str
text: str
tid: Optional[str] = None
freq: Optional[str] = None
q... |
describe('rxMultiSelect', function () {
var scope, compile, createDirective;
var transcludedTemplate = '<rx-multi-select ng-model="types">' +
'<rx-select-option value="A">Type A</rx-select-option>' +
'<rx-select-option value="B">Type B</rx-select-optio... |
// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef OPTIONSMODEL_H
#define OPTIONSMODEL_H
#include <QAbstractListModel>
extern bool fUseDarkTheme;
/** Interface from Q... |
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here
# has been referenced in documentation.
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL
from django.contrib.admin.options import StackedInline, TabularInli... |
//D:\PROJECTS\PRO-DEMO\node_api\demo\try_catch.js
try {
var async = function(fn, callback) {
// Code execution path breaks here.
setTimeout(function () {
callback(fn());
}, 0);
}
async(null, function (data) {
// Do something.
});
} catch (err) {
console.l... |
import collections
class NestD(dict, object):
_valid_key_types = (str,unicode,int,float,bool)
def __init__(self, data={}, convert_children=True, **kwargs):
"""
Wrapper for dict with methods adapted for the hierarchical nature of dictionaries.
data: {dict,list,iterator,NestD} if iterab... |
const { commands, prefix } = require('../config/config');
const { MessageEmbed } = require('discord.js');
const makeRequest = require('../utils/request');
const { generateToken, getCredentials } = require('../utils/utils');
function sayHi(username) {
return `Hey **${username}**, Am RoRbot. I am here to keep you comm... |
function camelToKebab( value ) {
return value.replace( /([a-z])([A-Z])/g, "$1-$2" ).toLowerCase();
}
|
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 14, 2021 at 2:26:09 PM Mountain Standard Time
* Operating System: Version 14.4 (Build 18K802)
* Image Source: /System/Library/PrivateFrameworks/AuthKitUI.... |
#ifdef __CINT__
#pragma link off all glols;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class AliFemtoBaryoniaAnalysis+;
#pragma link C++ class AliFemtoMultCorrAnalysis+;
#pragma link C++ class AliFemtoTrio+;
#pragma link C++ class AliFemtoTrioCut+;
#pragma link C++ class AliFemtoTr... |
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 29 19:23:36 2017
@author: mtkes
"""
import Astro
import numpy as np
# Stack the data tx1x9, which is easy for people to read
# sequence (or time) goes down the page and each row
# of numbers is the DCM value for each point in the sequence
# The interpretation is either ... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2020.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... |
from .wavenet import Wavenet
from .melencoder import MelEncoder
#from .dataset import dataset_dict |
#pragma once
// @generated by tools/codegen/gen.py from Function.h
#include <ATen/Context.h>
#include <ATen/DeviceGuard.h>
#include <ATen/TensorUtils.h>
#include <ATen/TracerMode.h>
#include <ATen/core/Generator.h>
#include <ATen/core/Reduction.h>
#include <ATen/core/Tensor.h>
#include <c10/core/Scalar.h>
#include <c... |
import math
import random
import time
import struct
import os.path
from os import listdir
from os.path import isfile, isdir, join, split, splitext
import json
from pathlib import Path
import threading
import re
from itertools import chain
from collections import Counter
import numpy as np
import cv2
import hnswlib
im... |
var file, files, io, path, port, server;
files = require('node-static');
port = process.env.PORT || 8080;
path = require('path');
file = void 0;
server = void 0;
io = void 0;
file = new files.Server(path.resolve(__dirname, 'public'));
server = require('http').createServer(function(req, res) {
req.addListener(... |
// Copyright (c) 2011-2016 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_WALLETMODEL_H
#define BITCOIN_QT_WALLETMODEL_H
#include "paymentrequestplus.h"
#include "walletmodeltrans... |
# Author: Hayk Aleksanyan
# color related aspects of word clouds are handled here
import random
def convert_hsl_to_rgb(h, s, l):
"""
convert from HSL (hue-saturation-luminosity) to RGB format
h, s, l are all in the range [0,1]
r, g, b will be in the range [0,255]
see https:... |
#ifndef BADGE_OTA_H
#define BADGE_OTA_H
extern void badge_ota_update(void);
#endif
|
__author__ = 'nasimrahaman'
__doc__ = \
"""
Module to assist in training neural models. Includes cost functions, optimization algorithms.
Contents:
Utils:
prepare data (prep)
Loss Functions
cross-entropy loss (ce)
max-likelihood loss (mll)
mea... |
from prototyper.plugins import PluginBase
class Plugin(PluginBase):
def on_build_complete(self):
print('Dummy plugin on_build_complete')
|
#pragma once
#include <WiFiManager.h>
class CaptivePortalManager
{
public:
static bool captivePortalCalled;
CaptivePortalManager(WiFiManager *wifiManager);
~CaptivePortalManager();
static void captivePortalManagerCallback(WiFiManager *wifiManager);
private:
WiFiManager *wifiManager = NULL;
... |
const pathModule = require('path');
const expect = require('../../unexpected-with-plugins');
const AssetGraph = require('../../../lib/AssetGraph');
describe('relations/HtmlAlternateLink', function () {
it('should handle a simple test case', async function () {
const assetGraph = new AssetGraph({
root: path... |
MQKEY=Key='emxb4PolrF4hR7zVof1VHBF5camA8xRZ';
MQCONFIGNUMBER=1;
if(window.MQPROTOCOL===undefined){ MQPROTOCOL=window.location.protocol==='https:'?'https://':'http://'; }
MQPLATFORMSERVER=MQPROTOCOL+"www.mapquestapi.com";
MQSTATICSERVER="https://www.mapquestapi.com/staticmap/";
MQTRAFFSERVER=TRAFFSERVER="https://www.map... |
require('./unit')
require('./integration')
|
//This module is "assocfile" instead of "associatefile", becase "associate" module is catching all commands starting with "associate"
exports.match = function(event, commandPrefix) {
if (event.arguments[0] === commandPrefix + 'assocfile') {
return true;
}
var s = event.body.toLowerCase();
for (var assoc in expo... |
"""Check if a server is ready."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import exceptions
from SoftLayer.CLI import helpers
@click.command()
@click.argument('identifier')
@click.option('--wait', default=0, show_default=T... |
"""Support for MySensors sensors."""
from __future__ import annotations
from datetime import datetime
from awesomeversion import AwesomeVersion
from homeassistant.components import mysensors
from homeassistant.components.sensor import (
DOMAIN,
STATE_CLASS_MEASUREMENT,
SensorEntity,
)
from homeassistant.... |
#!/usr/bin/env python
#
# File: $Id$
#
"""
Continuously plot powerwall and solar roof data via matplotlib.
"""
# system imports
#
import os
import json
from pathlib import Path
import pprint
from datetime import datetime
# 3rd party modules
#
import pytz
from tesla_powerwall import Powerwall, MeterType
from tesla_pow... |
var NAVTREEINDEX2 =
{
"group__l3gd20h__example__driver.html#ga36c2361a43bc5bb02b6727530ef9a6ab":[0,0,7,80],
"group__l3gd20h__example__driver.html#ga3a8fb98f8b98ccc126c4a73b824d08c7":[2,0,1,5,13],
"group__l3gd20h__example__driver.html#ga3a8fb98f8b98ccc126c4a73b824d08c7":[0,0,7,93],
"group__l3gd20h__example__driver.html#... |
var gridAppBuilder = function (opts) {
opts = opts ||
{
gridElement: '',
page: '',
controllerData: '',
controllerSchema: '',
offlineMode: false,
hideSelectionBoxColumn: false,
hideActionsColumn: false,
gridOption: {
//headerTemplate:'... |
# coding=utf-8
from datetime import datetime
import os
import traceback
import threading
import sys
# noinspection PyPackageRequirements
from websocket import WebSocketConnectionClosedException
import requests
from helpers import log, log_exception
from globalvars import GlobalVars
# noinspection PyProtectedMember
de... |
class Address(object):
def __init__(self):
self.street = None
self.number = None
self.complement = None
self.zip_code = None
self.city = None
self.state = None
self.country = None
|
/* ------------------------------------------------------------------------- */
/*
* tokenmap.h
*
* Copyright (c) 2004 - 2009, clown. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*... |
let express = require('express');
let router = express.Router();
let app = express();
let multiparty = require('multiparty');
let util = require('util');
let fs = require('fs');
let path = require('path');
let bodyParser = require('body-parser');
let publicPath = '';
app.use(bodyParser.json());
app.use(bodyParser.urlen... |
import React, { useState } from "react";
import { Modal, Form, Input } from "antd";
import { useSelector } from "react-redux";
import axiosWithAuth from "../utils/AxiosWithAuth";
const AddPromptModal = (props) => {
const [prompt, setPrompt] = useState({ question: "", description: "" });
const uid = useSelector((sta... |
var a = require( './a.js' );
var b = 2;
module.exports = {
a: a,
b: b,
c: a + b,
2: 1 + 1
};
|
import collections
import itertools
import numpy as np
from qecsim import paulitools as pt
import matplotlib.pyplot as plt
import qecsim
from qecsim import app
from qecsim.models.generic import PhaseFlipErrorModel,DepolarizingErrorModel,BiasedDepolarizingErrorModel,BiasedYXErrorModel
from qecsim.models.planar import Pl... |
typeSearchIndex = [{"p":"main","l":"ISBNRevised"}] |
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/09_vision.augment.ipynb (unless otherwise specified).
__all__ = ['RandTransform', 'TensorTypes', 'FlipItem', 'DihedralItem', 'PadMode', 'CropPad', 'RandomCrop',
'OldRandomCrop', 'ResizeMethod', 'Resize', 'RandomResizedCrop', 'RatioResize', 'AffineCoordTfm',
... |
# Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# 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 app... |
//*****************************************************************************
//
// simple_fs.c - Functions for simple FAT file system support
//
// Copyright (c) 2009-2013 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this softwa... |
# coding=utf-8
# Copyright 2019 The TensorFlow GAN 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-2.0
#
# Unless required by applicabl... |
/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined... |
"""
WSGI config for question_repo project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANG... |
import json
from enum import Enum
class PokemonData:
def __init__(self, pokemon, name, xp, moves):
self.pokemon = pokemon
self.name = name
self.xp = xp
self.moves = moves
class MoveData:
def __init__(self, move, pp):
self.name = move
self.move = Moves[move]
... |
# coding:utf-8
import os
import requests
import json
import urllib
import base64
import datetime
import configparser
import pandas as pd
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from QUANTAXIS.QAMarket.QAOrderHandler import QA... |
# -*- coding: utf-8 -*- #
# Copyright 2018 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 requir... |
const mysql = require('../database/connect')
const requireAPI = (req, res, next) => {
if (!req.get("x-api-key")) {
console.log("No X-API-KEY sent");
res.send("Invalid or No API Key provided");
return;
}
next();
}
module.exports = requireAPI |
const DataTypes = require('sequelize');
const { Model } = DataTypes;
module.exports = class Comment extends Model {
static init(sequelize) {
return super.init(
{
content: {
type: DataTypes.TEXT,
allowNull: false,
},
},
{
modelName: 'Comment',
... |
# Copyright (c) 2017-2018, SLAC National Accelerator Laboratory
# This file has been adapted from PyDM, and can be redistributed and/or
# modified in accordance with terms in conditions set forth in the BSD
# 3-Clause License. You can find the complete licence text in the LICENCES
# directory.
# Links:
# PyDM Proje... |
var group__NVIC__gr =
[
[ "CMSIS_NVIC_VIRTUAL", "group__NVIC__gr.html#gadc48b4ed09386aab48fa6b9c96d9034c", null ],
[ "CMSIS_VECTAB_VIRTUAL", "group__NVIC__gr.html#gad01d3aa220b50ef141b06c93888b268d", null ],
[ "IRQn_Type", "group__NVIC__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8", [
[ "NonMaskableInt_... |
"""
# autologon.py
# 目前仅支持同花顺官方的独立交易端的“多帐号”登录模式。
"""
__author__ = '睿瞳深邃'
__version__ = '0.4'
# coding: utf-8
import os
import subprocess
import time
import ctypes
api = ctypes.windll.user32
def autologon(target=None):
" 自动登录同花顺独立交易客户端 "
# 通过快捷方式运行独立交易客户端
path = os.path.split(os.path.realpath(__file__))[0... |
Search.setIndex({docnames:["coil","credits","display_output","index","install","intro","physics","segment","thing_it_does1","thing_it_does2","thing_it_does3","wire"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":5,"sphinx.domains.index":1,"sphinx.domains.... |
import { NotImplementedError } from '../extensions/index.js';
/**
* Create transformed array based on the control sequences that original
* array contains
*
* @param {Array} arr initial array
* @returns {Array} transformed array
*
* @example
*
* transform([1, 2, 3, '--double-next', 4, 5]) => [1, 2, 3, 4, 4... |
import pyttsx3
import threading
import speech_recognition as sr
import datetime
import os
import cv2
import webbrowser
import requests
import wikipedia
import winsound
import webbrowser
import pyautogui
from pyttsx3.drivers import sapi5
import pywhatkit
import pywikihow
from googlesearch import search
import webbrowser... |
const blur = () =>
{
SpinQuery.count(
() => $(".bui-slider .bui-track.bui-track-video-progress,.bilibili-player-video-control-bottom"),
2,
containers =>
{
if (!containers.hasClass("video-control-blur-container"))
{
containers.addClass("video-co... |
# Copyright (C) 2018-2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import re
from openvino.tools.mo.front.extractor import raise_no_node, raise_node_name_collision
from openvino.tools.mo.utils.error import Error
from openvino.frontend import InputModel # pylint: disable=no-name-in-module,import-error... |
import { registerDependencies } from 'mjml-validator'
import { BodyComponent } from 'mjml-core'
import LaborAdobeSection from './LaborAdobeSection'
registerDependencies({
'mj-body': ['labor-adobe-hero'],
'labor-adobe-hero': [],
})
export default class LaborAdobeHero extends BodyComponent {
static allowedAttribu... |
# Python - 3.6.0
Test.describe('Basic Tests')
Test.assert_equals(pillars(1, 10, 10), 0)
Test.assert_equals(pillars(2, 20, 25), 2000)
Test.assert_equals(pillars(11, 15, 30), 15270)
|
import React from 'react';
import { render } from 'enzyme';
import { requiredProps } from '../../test/required_props';
import { EuiLoadingChart, SIZES } from './loading_chart';
describe('EuiLoadingChart', function () {
test('is rendered', function () {
var component = render(React.createElement(EuiLoadingChart, r... |
/*
* linux/arch/arm/mm/consistent.c
*
* Copyright (C) 2000-2002 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* DMA uncached mapping support.
*/
#includ... |
Tridion.Type.registerNamespace("Tridion.Web.UI.Editors.CME.Constants.Popups");
Tridion.Web.UI.Editors.CME.Constants.Popups.CUSTOM_RESOLVER_SETTINGS = {
URL: $config.expandEditorPath("/Views/Popups/Settings/Settings.aspx", DXA.CM.Extensions.DXAResolver.Editors.Constants.EditorName),
FEATURES: "width=480px,heigh... |
# _________________________________________________________________________
#
# TEVA-SPOT Toolkit: Tools for Designing Contaminant Warning Systems
# Copyright (c) 2008 Sandia Corporation.
# This software is distributed under the BSD License.
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
... |
import torch
import numpy as np
import torch.nn as nn
import torch.utils.data as Data
from torch.optim import *
import torch.nn.functional as F
from torchstat import stat
import sklearn.metrics as sm
import os
torch.cuda.set_device(1)
n_gpu = torch.cuda.device_count()
print(n_gpu)
train_x = np.load('exp... |
export default {
// 导航栏
navbar: {
title: '自动化管理系统',
languageSwitch: '语言切换',
theme: '主题'
},
skin: {
Blue: '天空蓝',
Green: '典雅绿',
Red: '樱桃红',
Purple: '贵族紫',
Default: '默认'
},
route: {
contextmenu: '右键菜单',
simple: '基础',
divier: '分割线',
group: '按钮组',
submenu: '子菜... |
# model settings
model = dict(
type='CascadeRCNN',
num_stages=3,
pretrained='modelzoo://resnet50',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
style='pytorch',
dcn=dict(
modulated=Fal... |
# http://tryhelloworld.co.kr/challenge_codes/134
def Jaden_Case(s):
# 함수를 완성하세요
result = []
for word in s.split(" "):
lower_word = list(word.lower())
if ord(lower_word[0]) >= 65:
lower_word[0] = chr(ord(lower_word[0])-32)
result.append("".join(lower_word))
return ... |
""" # driver
Define a generic Driver class with some basic functionality built in.
"""
from cmd import Cmd
from datetime import datetime as dt
# import fileinput
import logging
import os
import os.path
from os import chdir, listdir
from pathlib import Path
import re
import shlex
from subprocess import check_output... |
#!/usr/bin/env python
import setuptools
setuptools.setup(setup_requires=['pbr>=5.0.0'], pbr=True)
|
"""
Modeled largely after
https://github.com/openai/gym/blob/master/gym/envs/toy_text/blackjack.py
Also, the github version draws with replacement, while I modified to not use replacement
Also, reference here for how to play blackjack
"""
from typing import Dict, List, Tuple
import gym
import numpy as np
from gym imp... |