text stringlengths 3 1.05M |
|---|
#!/usr/bin/python
import argparse
from dx.dex import Dex
from dx.printer import DexPrinter
def print_dump(args):
printer = DexPrinter(args.meta)
dex = Dex(args.dex_file)
if args.H:
printer.header(dex.header())
if args.X:
printer.maplist(dex.map_list())
if args.S:
for ... |
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
extern int global;
int bar(int);
void foo (int bound)
{
int i, ret = 0;
for (i = 0; i < bound; i++)
{
if (i > bound)
global += bar (i);
if (i >= bound + 2)
global += bar (i);
if (i > bound - 2)
global += bar ... |
#!/usr/bin/env python3
# Copyright (c) 2014-2018 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 RBF code."""
from decimal import Decimal
from test_framework.messages import COIN, COutPoint... |
if __name__ == "__main__":
numero = int(input("Introduzca un numero: "))
for contador in range(1, numero):
if contador % 2 == 0:
print(str(contador) + " es un numero par!")
else:
print(str(contador) + " es un numero impar!")
|
# *** WARNING: this file was generated by the Pulumi Kubernetes codegen tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
from typing import Optional
import pulumi
import pulumi.runtime
from pulumi import Input, ResourceOptions
from ... import tables, version
... |
// craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
} |
//>>built
define("dojox/drawing/defaults",{clickMode:!0,clickable:!0,current:null,currentHit:null,angleSnap:1,zAxis:!1,zAxisEnabled:!0,zAngle:225,renderHitLines:!0,renderHitLayer:!0,labelSameColor:!1,useSelectedStyle:!0,norm:{width:1,color:"#000000",style:"Solid",cap:"round",fill:"#CCCCCC"},selected:{width:6,color:"#00... |
import configureMockStore from 'redux-mock-store'
import thunk from 'redux-thunk'
import * as actions from '../companies'
import constants from '../../constants/companies'
import api from '../../lib/kitsu'
const middlewares = [thunk]
const mockStore = configureMockStore(middlewares)
describe('fetchCompanies', () => ... |
(function(global) {
global.Thunderjack = global.Thunderjack || {};
Thunderjack.HandUi = Thunderjack.HandUi || {};
//===========================================================================================
// "public"
//=====================================================================================... |
import * as React from 'react'
function SvgClose(props) {
return (
<svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" {...props}>
<path
fill="currentColor"
d="M13.414 12l5.793-5.793a1 1 0 00-1.414-1.414L12 10.586 6.207 4.793a1 1 0 00-1.414 1.414L10.586 12l-5.793 5.793a1 1 0 001.4... |
#!/usr/bin/env python
"""
A script to show how to create your own time domain source model.
A simple damped Gaussian signal is defined in the time domain, injected into
noise in two interferometers (LIGO Livingston and Hanford at design
sensitivity), and then recovered.
"""
import numpy as np
import bilby
# define t... |
'use strict';
var async = require('async');
var fs = require('fs');
var npm = require('npm');
var path = require('path');
var spawn = require('child_process').spawn;
var bitcore = require('bitcore-lib-dash');
var $ = bitcore.util.preconditions;
var _ = bitcore.deps._;
var utils = require('../utils');
/**
* Will remo... |
/**********************************************************************/
/* ____ ____ */
/* / /\/ / */
/* /___/ \ / */
/* \ \ \/ ... |
import mongoose from 'mongoose';
export default mongoose.model('Subscription', mongoose.Schema({
_id: {type: mongoose.Schema.Types.ObjectId, index: true, auto: true},
plan: {type: mongoose.Schema.Types.ObjectId, required: true, ref: 'Plan'},
paymentMethod: String,
timestamp: {type: Date, default: Date.now}
}))... |
import requests
import json
import logging
class AccountKeyClient:
ACCOUNT_KEY_URL = "https://account-key-service.herokuapp.com/v1/account"
def __init__(self):
self.logger = logging.getLogger(__name__)
def get_account_key(self, key, email):
try:
payload = {}
headers = {"Content-Type":"application/json"... |
from pathlib import Path
from typing import List, Optional, Tuple
import cv2
import numpy as np
from annotate_picture import Annotation
DRAW_CORORS = [
(80, 200, 200),
(200, 80, 200),
(200, 200, 80),
(80, 80, 200),
(80, 200, 80),
(200, 80, 80),
(150, 80, 200),
(80, 200, 150),
]
FONT =... |
const config = require("./themeConfig")
module.exports = {
purge: ["./src/**/*.{js,jsx,ts,tsx}"],
darkMode: false, // or 'media' or 'class'
theme: {
...config,
extend: {},
},
variants: {
extend: {},
},
plugins: [],
corePlugins: {
preflight: false,
},
}
|
import unittest
from os.path import join, dirname, abspath
import matplotlib.pyplot as plt
import numpy as np
import pystella as ps
__author__ = 'bakl'
class TestStellaLightCurves(unittest.TestCase):
def test_stella_curves(self):
name = 'cat_R500_M15_Ni006_E12'
path = join(dirname(abspath(__fil... |
import torch
import torch.nn as nn
from config import device, im_size
class conv2DBatchNormRelu(nn.Module):
def __init__(
self,
in_channels,
n_filters,
k_size,
stride,
padding,
bias=True,
dilation=1,
with_b... |
#
# Copyright(c) 2020 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
from core.test_run_utils import TestRun
from utils.installer import install_iotrace, check_if_installed
from utils.iotrace import IotracePlugin
from utils.misc import kill_all_io
from test_tools.fio.fio import Fio
def dut_prepare... |
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "fixed_grammar.asn"
* `asn1c -gen-PER`
*/
#include "BarringPerACDC-Category-r13.h"
static int
ac_BarringFactor_r13_4_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_fai... |
#pragma once
unsigned int cpp_div( const unsigned int left, const unsigned int right );
unsigned int asm_div( const unsigned int left, const unsigned int right );
unsigned int cpp_div_remainder( const unsigned int left, const unsigned int right );
unsigned int asm_div_remainder( const unsigned int left, const unsigne... |
import Document, { Html, Head, Main, NextScript } from 'next/document';
class MyDocument extends Document {
render() {
return (
<Html lang="ja" dir="ltr">
<Head />
<body>
<Main />
<NextScript />
</body>
... |
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
}; |
from django.http import JsonResponse
from django.core.exceptions import RequestDataTooBig
class CheckRequest(object):
def __init__(self, get_response):
self.get_response = get_response
def __call__(self, request):
response = self.get_response(request)
return response
def proce... |
/**
* || ____ _ __
* +------+ / __ )(_) /_______________ _____ ___
* | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
* +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
* || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
*
* Crazyflie control firmware
*
* Copyright (C) 2011-2012 Bi... |
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <mutex>
namespace metrics {
class MetricManager;
class UpdateHook {
const char* _name;
time_t _nextCall;
uint32_t _period;
friend class MetricManager;
... |
import torch
from torch.utils.data import Dataset, DataLoader
import torch.optim as torch_optim
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from timeit import default_timer as timer
import warnings
# from sklearn.model_selection._split import StratifiedShuffleSplit
# from experiments.expe... |
"""Common framework used to run hangups examples."""
import argparse
import asyncio
import logging
import os
import hangups
import appdirs
def run_example(example_coroutine, *extra_args):
"""Run a hangups example coroutine.
Args:
example_coroutine (coroutine): Coroutine to run with a connected
... |
# -*- coding: utf-8 -*-
__author__ = "Rogers de Pelle"
__contact__ = "@rogersdepelle"
import copy
import json
import sys
import math
import os
import re
import time
import warnings
from naive_bayes import learn, classify
def standard_deviation(s):
"""
s: Values list for calculate standard deviation
... |
/**
* Default property values of interactive objects
* Used by {@link PIXI.interaction.InteractionManager} to automatically give all DisplayObjects these properties
*
* @mixin
* @name interactiveTarget
* @memberof PIXI.interaction
* @example
* function MyObject() {}
*
* Object.assign(
* co... |
# Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
"""Userbot module containing hash and encode/decode commands."""
from subprocess import PIPE
from subprocess import ru... |
/*
* This header is generated by classdump-dyld 1.0
* on Tuesday, November 5, 2019 at 2:50:45 AM Mountain Standard Time
* Operating System: Version 13.0 (Build 17J586)
* Image Source: /System/Library/Frameworks/SceneKit.framework/SceneKit
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos.... |
import _extends from "@babel/runtime/helpers/esm/extends";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
/* eslint-disable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions *... |
/****************************************************************************
Copyright (c) 2011-2012 cocos2d-x.org
Copyright (c) 2013-2014 Chukong Technologies Inc.
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation... |
module.exports = {
/**************************CREATE CLAIM************************ */
'SelectedClaimState': {
'YesIntent': function () {
let SelectedClaimState = this.t('DoYouNeedAnAmbulance');
this.followUpState('NeedAmbulance').ask(SelectedClaimState);
},
'NoInt... |
#!/usr/bin/env python
import sys
from infopage import Infopage
if len(sys.argv) > 1 and '-h' in sys.argv[1:]:
print "Usage: schema.py [-d]"
print "-d Drops all tables before recreating them"
sys.exit(1)
dropping = len(sys.argv) > 1 and '-d' in sys.argv[1:]
ip = Infopage()
ip.loadconfig()
with ip:
i... |
const broadcastMerge = (parentVal, childVal, vm) => {
if (!childVal) {
return parentVal
}
if (!parentVal) {
return childVal
}
const result = parentVal
Object.keys(childVal).forEach((eventName) => {
if (!result[eventName]) {
result[eventName] = childVal[eventName]
} else {
const u... |
import { z } from 'zorium'
import * as _ from 'lodash-es'
import FormatService from 'frontend-shared/services/format'
if (typeof window !== 'undefined') { require('./index.styl') }
export default function $blocksOverview ({ timeScale, block }) {
return z('.z-block-overview', [
z('.metrics', _.map(block.metrics... |
# -*- coding: ascii -*-
#
# Copyright 2007, 2008, 2009, 2010, 2011
# Andr\xe9 Malo or his licensors, as applicable
#
# 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.or... |
import operator
from typing import TYPE_CHECKING, Type, Union
import numpy as np
from pandas._libs import lib, missing as libmissing
from pandas.core.dtypes.base import ExtensionDtype, register_extension_dtype
from pandas.core.dtypes.common import pandas_dtype
from pandas.core.dtypes.inference import is_array_like
... |
/*
id-splitter.c - Instruction-Data transaction splitter.
Copyright 2002-2007 Virtutech AB
The contents herein are Source Code which are a subset of Licensed
Software pursuant to the terms of the Virtutech Simics Software
License Agreement (the "Agreement"), and are being distributed under
the Agreement... |
// Copyright (c) 2009 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// You can redistribute it and/or modify it under the terms of the GNU
// General Public License as published by the Free Software Foundation,
// either version 3 of the License, or (at your op... |
module.exports={A:{A:{"2":"K C G E A B YB"},B:{"2":"D w Z I M H"},C:{"2":"WB AB F J K C G E A B D w Z I M H N O P Q R S T U V W X Y y a b UB OB","132":"0 1 3 5 6 7 8 c d e f L h i j k l m n o p q r s t u v z x"},D:{"2":"0 1 3 5 6 7 8 F J K C G E A B D w Z I M H N O P Q R S T U V W X Y y a b c d e f L h i j k l m n o p ... |
#!/usr/bin/env python
###########################
# This code block is a HACK (!), but is necessary to avoid code duplication. Do NOT alter these lines.
import os
from setuptools import setup
import importlib.util
filepath = os.path.abspath(os.path.dirname(__file__))
filepath_import = os.path.join(filepath, '..', 'core... |
# Copyright (C) 2009-2014 Wander Lairson Costa
#
# The following terms apply to all files associated
# with the software unless explicitly disclaimed in individual files.
#
# The authors hereby grant permission to use, copy, modify, distribute,
# and license this software and its documentation for any purpose, provided... |
# Copyright 2014 OpenStack Foundation
#
# 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 ... |
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import pipes
from recipe_engine.config import config_item_context, ConfigGroup
from recipe_engine.config import Dict, List, Single, Static, Set, BadConf
fro... |
const geoLocation = require("nativescript-geolocation");
const observableModule = require("tns-core-modules/data/observable");
const app = require("tns-core-modules/application");
const dialogs = require("tns-core-modules/ui/dialogs");
const appSettings = require("application-settings");
let page;
let viewModel;
let s... |
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.en');
goog.require('Blockly.Msg');
Blockly.Msg.ABOUT = "about";
Blockly.Msg.ACCELERATION_TOOLTIP = "Get the acceleration value in milli-gravities.";
Blockly.Msg.ACCELEROMETER_ROTATION_TOOLTIP = "Get the tilt or rotatio... |
/****************************************************************************
** CUBE http://www.scalasca.org/ **
*****************************************************************************
** Copyright (c) 1998-2016 **
** Fors... |
from math import sin, cos
from micropython import const
from microqiskit import QuantumCircuit, simulate
from time import sleep
import pew
pew.init()
qc = QuantumCircuit(1,1)
qc.h(0)
qc.measure(0,0)
def randGen():
digits = []
for _ in range(3):
counts = simulate(qc, shots=1, get='memo... |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(React.createElement("path", {
d: "M20 2.01L4 2v20h16V2.01zM18 20H6v-9.02h12V20zm0-11H6V4h12v5zM8 5h2v3H8V5zm0 7h2v5H8v-5z"
}), 'KitchenSharp'); |
import React from 'react'
import { Link, StaticQuery, graphql } from 'gatsby'
import Layout from '../components/layout'
function Introduction() {
return (
<StaticQuery
query={graphql`
{
allMarkdownRemark(
sort: { order: ASC, fields: [frontmatter___order] }
) {
... |
const alertUtils = (function () {
function showSiteAlerts(tabId, title, target, alertRisk) {
// Note that theres no need to load any tool data here
const config = {};
config.title = title;
config.risk = alertRisk;
utils.getUpgradedDomain(target)
.then(upgradedDomain => {
return apiCallWithResponse('... |
from typing import List
from resultinterpretation.model import TestStepResultItem
class TestStepResult:
"""
Aggregate results of one test step over the course of multiple executions of one CouchEditTestSuite
"""
def __init__(self, stepNumber: int, resultItems: List[TestStepResultItem]):
self.... |
# Copyright 2012 OpenStack Foundation
# 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 requ... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class IotVspOrgUserDeleteNotifyUserInfoRequest(object):
def __init__(self):
self._msg = None
self._state = None
self._vid = None
@property
def msg(self):
return... |
import {useSession} from '@/entities';
import {Button, Col, Row, Steps, Typography} from 'antd';
import React from 'react';
const {Title} = Typography;
import {remote} from 'electron';
const {Step} = Steps;
export default () =>
{
const [session, {login, logout}] = useSession();
return <>
<Title>My... |
/*
* Copyright (c) 2018, salesforce.com, inc.
* All rights reserved.
* SPDX-License-Identifier: MIT
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
const fs = require('fs');
const path = require('path');
const pluginUtils = require('@rollup/pluginutils');
co... |
import numpy as np
import h5py
class BaseDataLoader():
def __init__(self, data_root, iter_method='between_frames'):
pass
def __getitem__():
pass
def __len__(self):
return self.length
|
# -*- coding: utf-8 -*-
#
import numpy
import pytest
from optimesh import cpt
from meshes import simple0, simple1, simple2, simple3, pacman
@pytest.mark.parametrize(
"mesh, ref",
[(simple0, 5.0 / 18.0), (simple1, 17.0 / 60.0), (pacman, 7.320400634147646)],
)
def test_energy(mesh, ref):
X, cells = mesh()... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# imports.
from dev0s.classes.response import *
from dev0s.classes.defaults import objects
from dev0s.classes.response import response as _response_
# pip imports.
from bs4 import BeautifulSoup as bs4
import urllib
import requests as __requests__
# the requests class.
c... |
# preferences_dialog.py
#
# MIT License
#
# Copyright (c) 2020-2021 Andrey Maksimov <meamka@ya.ru>
#
# 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 lim... |
from torch import nn
import torch
import torch.nn.functional as F
import cv2
import numpy as np
from torchvision import transforms
from torchvision import models
from torch.autograd import Variable
from PIL import Image
from torchvision import utils
from torch.autograd import Variable
import torch.autograd as autograd
... |
from flask import Flask, render_template, Response, request, redirect, url_for
app = Flask(__name__)
@app.route("/")
def index():
return render_template('prediction.html')
@app.route("/forward/", methods=['POST'])
def predict():
#Moving forward code
forward_message = "Testing..."
return render_templat... |
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myblog.settings.local')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise I... |
from GodOfPython.P10_ModulePackage.smtpkg7 import *
def smart_on():
while True:
choice = input('what do you want?')
if choice=='0':
break
if choice=='1':
camera.camera.photo()
elif choice=='2':
phone.phone.makeacall()
elif choice=='3':
... |
module.exports = {
pathPrefix: '/',
siteMetadata: {
author: 'Kostas',
title: `Kostas' Blog`,
siteUrl: `https://cuocsonganvui.net`,
description: `I'm Kostas Bariotis, a web developer, a proud wanderer and a passionate doer. My mission is to write clean and efficient code, to solve problems on the web... |
/**
* @license angular-awesome-slider - v2.3.7
* (c) 2013 Julien VALERY https://github.com/darul75/angular-awesome-slider
* License: MIT
**/
!function(a){"use strict";a.module("angularAwesomeSlider",[]).directive("slider",["$compile","$templateCache","$timeout","$window","slider",function(b,c,d,e,f){return{restrict:"... |
"""
The basic building blocks making up the Widget system.
"""
# The classes defined here need more than 7 instance attributes,
# and there is no cyclic import during runtime.
# pylint: disable=too-many-instance-attributes, cyclic-import
from __future__ import annotations
from copy import deepcopy
from inspect impor... |
/**
* The stage for the application.
*/
function StageAssistant() { }
/**
* Setup up the stage.
*/
StageAssistant.prototype.setup = function() {
// Push the main scene.
this.controller.pushScene("main");
}; /* End setup(). */
|
"""
Copyright (c) 2018 Intel Corporation
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 writing,... |
# Copyright 2015 OpenStack Foundation.
# 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 req... |
export default class AccordionItem {
constructor(element) {
this.element = element;
this.closed = this.element.hasAttribute('data-accordion-closed');
this.open = this.element.hasAttribute('data-accordion-open');
if (this.closed) {
this.collapse();
}
if (this.open) {
this.expand()... |
"""Test cases for Zinnia's views"""
from datetime import date
from django.test import TestCase
from django.utils import timezone
from django.contrib import comments
from django.contrib.sites.models import Site
from django.test.utils import override_settings
from django.test.utils import restore_template_loaders
from d... |
/*
* Copyright (c) 2018, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at w... |
import linked_list_ADT as N
def split_chain(node_chain):
"""
Purpose:
Splits the given node chain in half, returning the second half.
If the given chain has an odd length, the extra node is part of
the second half of the chain.
Pre-conditions:
:param node_chain: a... |
// ---------------------- Requires, Includes and Globals ------------------------
var project = 'webmedia_2017';
var qtd_target = 100;
var activeTask = 4;
var kind = 'player';//Tasks 1, 2 and 3: 'job' ; Task 4: 'player'
var group = false;//Tasks 1, 3, 4: false; Task 2: true;
if(kind == 'job'){
var aggregation_method... |
import { Tracker } from 'meteor/tracker';
import { Session } from 'meteor/session';
import { Template } from 'meteor/templating';
Template.chatRoomItem.helpers({
roomData() {
let { name } = this;
if (this.fname) {
const realNameForDirectMessages = this.t === 'd' && RocketChat.settings.get('UI_Use_Real_Name');
... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
'use strict';
let totalClicks = 0;
let clicksAllowed = 10;
let allProducts = [];
let myContainer = document.querySelector('section');
let imageOne = document.querySelector('section img:first-child');
let imageTwo = document.querySelector('section img:nth-child(2)');
let imageThree = document.querySelector('section img... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d0645"],{"687d":function(e,t,n){"use strict";n.r(t),n.d(t,"conf",function(){return a}),n.d(t,"language",function(){return o});var a={comments:{blockComment:["\x3c!--","--\x3e"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",clo... |
# Copyright 2016 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 required by applica... |
"""Crie um programa que leia nome e duas notas de vários alunos e guarde tudo em uma lista composta. No final, mostre
um boletim contendo a média de cada um e permita que o usuário possa mostrar as notas de cada aluno individualmente."""
alunos = list()
cadastro = list()
media = 0
while True:
resp = ' '
nome =... |
from keras_applications import get_submodules_from_kwargs
from ._common_blocks import Conv2dBn
from ._utils import freeze_model, filter_keras_submodules
from ..backbones.backbones_factory import Backbones
backend = None
layers = None
models = None
keras_utils = None
# -----------------------------------------------... |
import { DicomMetadataStore } from '../services/DicomMetadataStore';
// TODO: Use above to inject so dependent datasources don't need to import or
// depend on @ohif/core?
/**
* Factory function that creates a new "Web API" data source.
* A "Web API" data source is any source that fetches data over
* HTTP. This fun... |
#!/usr/bin/python3
import sys
import numpy as np
from scipy.sparse import csr_matrix
from scipy.sparse import lil_matrix
from sklearn import preprocessing
from os import linesep
from threading import Thread
from threading import Lock
import time
import multiprocessing
import config
import db_connection as db_con
impo... |
# -*- coding: utf-8 -*-
from django.contrib.auth import get_permission_codename, get_user_model
from django.forms.models import model_to_dict
from django.test.utils import override_settings
from cms.models.permissionmodels import PageUser
from cms.test_utils.testcases import CMSTestCase
from cms.utils.urlutils import ... |
console.log("CIAO");
|
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Tests for the WinRAR Windows Registry plugin."""
from __future__ import unicode_literals
import unittest
from dfdatetime import filetime as dfdatetime_filetime
from dfwinreg import definitions as dfwinreg_definitions
from dfwinreg import fake as dfwinreg_fake
from plaso.... |
#!/usr/bin/env python
import sys
import json
from pprint import pprint
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import os
if len(sys.argv) < 2:
print('Usage: %s <results_base> sub_dirs...' % sys.argv[0])
sys.exit(1)
results_base = sys.argv[1]
print('Analyzing results in %s' % re... |
"""
数据库更新操作
更新操作用于更新数据表的的数据,以下实例将 TESTDB 表中 SEX 为 'M' 的 AGE 字段递增 1:
"""
import pymysql
# 打开数据库连接
db = pymysql.connect("localhost", "root", "", "TESTDB")
# 使用cursor()方法获取操作游标
cursor = db.cursor()
# SQL 更新语句
sql = "UPDATE EMPLOYEE SET AGE = AGE + 1 WHERE SEX = '%c'" % ('M')
try:
# 执行SQL语句
cursor.execute(sql)
... |
"""
Dialogue text with with player responses.
- necromancer
- rat
"""
from engine.initiate import player_name
# 80 characters for reference:
#------------------------------------------------------------------------------#
necromancer_dialogue = {
1: {
"text":
"""I have to say, I am impresse... |
#include <stdio.h>
#include "include/sonoff-s20.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
void app_main()
{
printf("Hello world!\n");
/* Print chip information */
esp_chip_info_t chip_info;
esp_chip_info(&chip_info);
printf("Thi... |
/*
** $Id: lapi.c,v 2.259 2016/02/29 14:27:14 roberto Exp $
** Lua API
** See Copyright Notice in lua.h
*/
#define lapi_c
#define LUA_CORE
#include "lprefix.h"
#include <stdarg.h>
#include <string.h>
#include "lua.h"
#include "lapi.h"
#include "ldebug.h"
#include "ldo.h"
#include "lfunc.h"
#include "lgc.h"
#inclu... |
const cheerio = require('cheerio');
const axios = require('axios');
exports.covid19 = () => axios.get('https://www.worldometers.info/coronavirus').then(response => {
let veri = [];
const $ = cheerio.load(response.data);
const table = $('#main_table_countries_today');
const tbodies = table.find('tbody');
const tb... |
# Copyright 2019 Huawei Technologies Co., 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 applicable law or agreed to... |
# Modified by Microsoft Corporation.
# Licensed under the MIT license.
import pydash as ps
import torch.nn as nn
from convlab.agent.net import net_util
from convlab.agent.net.base import Net
from convlab.lib import util
class RecurrentNet(Net, nn.Module):
'''
Class for generating arbitrary sized recurrent n... |