text stringlengths 3 1.05M |
|---|
"""
Utility methods for Qt inside maya
"""
import contextlib
from PySide2 import QtCore, QtWidgets
import shiboken2
import functools
import maya.cmds as cmds
import maya.OpenMayaUI as omui
def get_maya_window():
"""Get the main Maya window as a QtWidgets.QMainWindow instance
Returns:
[QtWidgets.QMain... |
import DefaultHandler from './default';
export const schema = {
type: 'array',
items: {
type: 'object',
properties: {
name: { type: 'string', minLength: 1, pattern: '[^<>]+' }
},
required: [ 'name' ]
}
};
export default class ClientHandler extends DefaultHandler {
constructor(config) {
... |
import math
import numbers
import torch
from torch import nn
import torch.nn.functional as F
from torch_butterfly import Butterfly
from torch_butterfly.multiply_base4 import butterfly_multiply_base4_torch
from torch_butterfly.multiply_base4 import twiddle_base2_to_base4
from torch_butterfly.complex_utils import real_... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <U... |
Docs = {"data":{"classes":[{"name":"Siesta.Harness","extends":null,"private":null,"icon":"icon-class"},{"name":"Siesta.Recorder.Recorder","extends":null,"private":null,"icon":"icon-class"},{"name":"Siesta.Recorder.ExtJS","extends":null,"private":null,"icon":"icon-class"},{"name":"Siesta.Recorder.TargetExtractor","exten... |
import React from 'react'
import Layout from '../../components/layout'
import SEO from '../../components/seo'
const NotFoundPage = () => (
<Layout>
<SEO
title="404: Not Found"
description="You've found a route that doesn't exist. Oh no!"
/>
<h1>NOT FOUND</h1>
<p>You just hit a route that... |
# -*- coding: utf-8 -*-
"""Tests for `codex-africanus` package."""
import numpy as np
import pytest
def test_fit_spi_components_vs_scipy():
"""
Here we just test the per component spi fitter against
a looped version of scipy's curve_fit
:return:
"""
from africanus.model.spi import fit_spi_co... |
/*
* CanJS - 1.1.3 (2012-12-11)
* http://canjs.us/
* Copyright (c) 2012 Bitovi
* Licensed MIT
*/
define(['can/util/can'], function (can) {
var core_hasOwn = Object.prototype.hasOwnProperty,
isWindow = function (obj) {
return obj != null && obj == obj.window;
},
isPlainObject = function (obj) {
// Must be a... |
from .getsecret import GetSecret
from .listsecrets import ListSecrets
|
const navigation = require('./navigation');
module.exports = {
navigation,
company: 'Endeavor Business Media, LLC',
logos: {
navbar: {
src: 'https://base.imgix.net/files/base/ebm/frn/image/static/logo/site_logo.png?h=45',
srcset: [
'https://base.imgix.net/files/base/ebm/frn/image/static/l... |
// pages/invitation/invitation.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
... |
# coding: utf-8
import sys, os
sys.path.append(os.pardir) # 親ディレクトリのファイルをインポートするための設定
import numpy as np
import matplotlib.pyplot as plt
from ch08.deep_convnet import DeepConvNet
from dataset.mnist import load_mnist
(x_train, t_train), (x_test, t_test) = load_mnist(flatten=False)
network = DeepConvNet()
network.loa... |
# model settings
model = dict(
type='FasterRCNN',
pretrained='open-mmlab://msra/hrnetv2_w18',
backbone=dict(
type='HRNet',
extra=dict(
stage1=dict(
num_modules=1,
num_branches=1,
block='BOTTLENECK',
num_bl... |
import { makeSelectReader, makeSelectIdentity } from 'containers/NetworkClient/selectors';
import { takeLatest, call, put, select, all, fork, join } from 'redux-saga/effects';
import { FETCH_STAKE } from './constants';
import { fetchedStake } from './actions';
const stakeTable = {
json: true,
scope: 'boidcomto... |
import {UPDATE_RATING_FILTER} from "../../../actions/courses/sidebar/sidebarRatingFilterActions";
const updateFilterValue = (state, payload) => {
return payload.newValue;
}
export const sidebarRatingFilterReducer = (state = "", action) => {
const {payload, type} = action;
switch (type) {
case UPD... |
import datetime
import json
import pathlib
import time
import typing
import webbrowser
import requests
from bs4 import BeautifulSoup as Soup
try:
import colorama as colour
except ImportError:
RED = ""
YELLOW = ""
GREEN = ""
BLUE = ""
RESET = ""
else:
colour.init()
RED = colour.Fore.LIG... |
/**
* Created by xj on 11/4/16 11:08 AM.
*/
function bindEventToButtonInListView(params) {
bindEventToFilterButton(params);
bindEventToSearchList(params);
bindEventToClearSearch(params);
dialogShowInformation(params.type);
}
function bindEventToShowAnnounceEdit() {
var $this = $(this);
if(!is... |
import logging
import json
from pyspark.sql import SparkSession
from pyspark.sql.types import *
import pyspark.sql.functions as psf
# TODO Create a schema for incoming resources
schema = StructType([
StructField("crime_id", StringType(), True),
StructField("original_crime_type_name", StringType(), True),
... |
import React, { Component } from 'react';
import IceContainer from '@icedesign/container';
import { Grid } from '@alifd/next';
const { Row, Col } = Grid;
const mockData = [
{
title: '总计邀请(个)',
value: '187',
},
{
title: '正在进行中(个)',
value: '62',
},
{
title: '已完成(个)',
value: '23',
},
... |
var path = require('path'),
gulp = require('gulp'),
gutil = require('gulp-util'),
mirror = require('gulp-mirror'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
source = require('vinyl-source-stream'),
sourcemaps = require('gulp-so... |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... |
exports.handler = async (event, context) => ({
statusCode: 200,
body: JSON.stringify({
NETLIFY: process.env.NETLIFY,
BUILD_ID: process.env.BUILD_ID,
CONTEXT: process.env.CONTEXT,
NODE_VERSION: process.env.NODE_VERSION,
URL: process.env.URL,
DEPLOY_URL: process.env.DEPLOY_URL,
}),
});
|
export Publish from './Publish'; |
# Copyright (c) 2020 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="mac-remote-command",
version="0.1.0",
author="Daniel Flanagan",
description="Client for embedded systems to facilitate remote configuration.",
long_description=long_descr... |
import sys
import urllib.request, urllib.error, urllib.parse
import urllib.request, urllib.parse, urllib.error
from http.cookiejar import CookieJar
import lxml.etree
import lxml.html
import re
from datetime import timedelta, date
from selenium import webdriver
from selenium.common.exceptions import StaleElementReferenc... |
"use strict";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
import _isEqual from "lodash-es/isEqual";
import { TileLayer } from 'leaflet';
import { withLeaflet } from './context';
import GridLa... |
//
// MNTaskRecordModel.h
// ManekiNeko
//
// Created by JackCheng on 16/2/19.
// Copyright © 2016年 HardTime. All rights reserved.
//
#import "MNBaseModel.h"
@interface MNTaskRecordModel : MNBaseModel
//uid = 'UID'
@property (nonatomic, strong)NSString *uid;
//token = 'TOKEN'
@property (nonatomic, strong)NSStri... |
/*
* linux/kernel/seccomp.c
*
* Copyright 2004-2005 Andrea Arcangeli <andrea@cpushare.com>
*
* Copyright (C) 2012 Google, Inc.
* Will Drewry <wad@chromium.org>
*
* This defines a simple but solid secure-computing facility.
*
* Mode 1 uses a fixed list of allowed system calls.
* Mode 2 allows user-defined sy... |
from abc import ABCMeta, abstractmethod
import json
from typing import Any, IO, Optional, Sequence, cast
from pytest_wdl.core import DataDirs, DataManager, DataResolver
from pytest_wdl.utils import ensure_path
from py.path import local
import pytest
from _pytest.fixtures import FixtureRequest
try:
from ruamel im... |
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{203:function(t,e,s){"use strict";s.r(e);var a=s(0),r=Object(a.a)({},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"content"},[t._m(0),t._v(" "),s("Bit"),t._v(" "),t._m(1),t._v(" "),t._m(2),t._v(" "),t._m(3),t._v(" "),t._m(4)... |
import { html } from 'lit-html';
import { DemoPage } from '@advanced-rest-client/arc-demo-helper';
import '@advanced-rest-client/arc-demo-helper/arc-interactive-demo.js';
import '@anypoint-web-components/anypoint-button/anypoint-button.js';
import '@anypoint-web-components/anypoint-checkbox/anypoint-checkbox.js';
impor... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.trimPath = exports.ensurePath = exports.toPath = undefined;
var _slicedToArray2 = require('babel-runtime/helpers/slicedToArray');
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _typeof2 = require('babel-runtim... |
import {graphql, useStaticQuery} from 'gatsby';
import _ from 'lodash/fp';
const useTextFile = () => {
const data = useStaticQuery(graphql`
query {
allTextFile {
nodes {
content
name
}
}
}
`);
return _.indexBy('name', data.allTextFile.nodes);
};
export de... |
/**************************************************************************/
/* */
/* WWIV Version 5 */
/* Copyright (C)1998-2020, WWIV Software Services */
/* ... |
// 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.
#ifndef GARNET_DRIVERS_WLAN_MEDIATEK_RALINK_DRIVER_H_
#define GARNET_DRIVERS_WLAN_MEDIATEK_RALINK_DRIVER_H_
#include <lib/async/dispatcher.h>
// Retrieve... |
#pragma once
#include "FEServiceInterface.h"
#include "FETextFontEffectFile.h"
#include "Kernel/ServiceBase.h"
#include "Kernel/Factory.h"
#include "Kernel/Hashtable2.h"
namespace Mengine
{
class FEService
: public ServiceBase<FEServiceInterface>
{
public:
FEService();
~FESer... |
/*global define */
/*
| Copyright 2012 Esri
|
| 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 o... |
#!/usr/bin/env python3
# (C) Copyright 2020 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status... |
from . import config
import pythreejs as p3
import numpy as np
def axes_1d(x, y, color="#000000", linewidth=1.5):
N = len(x)
pts = np.zeros([5, 3])
xmin = np.amin(x)
xmax = np.amax(x)
ymin = np.amin(y)
ymax = np.amax(y)
pts[:, 0] = x
pts[:, 1] = y
geometry = p3.BufferGeometry... |
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is goverened by a BSD-style
* license that can be found in the LICENSE file.
*/
suite('HTMLLegendElement', function() {
test('form', function() {
var form = document.createElement('form');
var fieldSet = document.cre... |
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from config import config_options
from flask_login import LoginManager
from flask_bootstrap import Bootstrap
from flask_bcrypt import Bcrypt
db = SQLAlchemy()
bcrypt = Bcrypt()
login_manager = LoginManager()
login_manager.session_protection = 'strong'
log... |
test ( "accessing cells on a 10x10 board", function() {
var life = Life({
xmax:10, // Sets the max x length
ymax:10, // Sets the max y length
initial: "zeros", // Starting values, "zeros", "ones", "random"
});
// Tests boundries
ok ( 0 == life.left_cell(1));
ok ( -1 == lif... |
function _refresh() {
let xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = () => {
if (xhttp.readyState == 4 && xhttp.status == 200) {
let data = JSON.parse(xhttp.responseText);
let table = document.getElementById("messages");
table.innerHTML = "";
... |
define(["exports", "@kinkajou/kinkajou/Kinkajou", "@kinkajou/svg-icon/SvgIcon"], function (_exports, _Kinkajou, _SvgIcon2) {
"use strict";
Object.defineProperty(_exports, "__esModule", {
value: true
});
_exports.Looks = void 0;
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.it... |
import CodigoJava from "show-sintax/src/modulos/CodigoJava"
(() => {
const inicializar = (config) => {
CodigoJava.iniciar(config)
}
const Java = {
iniciar: (config) => {
inicializar(config)
}
}
window.Java = Java
})()
export default Java |
# Generated by Django 3.0.9 on 2020-08-14 13:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('shopping', '0014_auto_20200814_1138'),
]
operations = [
migrations.RemoveField(
model_name='pri... |
from .common import BaseTask
import json
from paperboy.utils import name_to_class
from luigi.parameter import Parameter, ParameterVisibility
class DokkuTask(BaseTask):
report = Parameter(visibility=ParameterVisibility.HIDDEN)
config = Parameter()
def __init__(self, *args, **kwargs):
super(DokkuTa... |
# https://www.hackerrank.com/challenges/abbr/problem?h_l=interview&playlist_slugs%5B%5D%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D%5B%5D=dynamic-programming
#
class Solution():
def abbreviation(self, a, b):
m, n = len(a), len(b)
dp = [[False]*(m+1) for _ in range(n+1)]
dp[0][0] = ... |
"""
**Project Name:** MakeHuman
**Product Home Page:** http://www.makehuman.org/
**Code Home Page:** http://code.google.com/p/makehuman/
**Authors:** Thomas Larsson
**Copyright(c):** MakeHuman Team 2001-2009
**Licensing:** GPL3 (see also http://sites.google.com/site/makeh... |
# PYTRIS™ Copyright (c) 2017 Jason Kim All Rights Reserved.
import pygame
from mino import *
from random import *
from pygame.locals import *
# Define
block_size = 17 # Height, width of single block
width = 10 # Board width
height = 20 # Board height
framerate = 30 # Bigger -> Slower
pygame.init()
clock = pygame.ti... |
// components/check-info2/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
info: Object
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
|
// Imports
import { createReadStream, writeFileSync } from 'fs';
import { readFile } from 'fs/promises';
import { join, dirname } from 'path';
import { fileURLToPath } from 'url';
import OCL from 'openchemlib';
import { molecules } from 'sdf-parser';
// Import CID Spectra
const cidHigh = JSON.parse(await readFile('./... |
"""Config flow for Modern Forms."""
from __future__ import annotations
from typing import Any, cast
from aiomodernforms import ModernFormsConnectionError, ModernFormsDevice
import voluptuous as vol
from homeassistant.components import zeroconf
from homeassistant.config_entries import SOURCE_ZEROCONF, ConfigFlow
from... |
from app import app
from config import host, port, debug
if __name__ == "__main__":
app.run(host=host, port=port, debug=debug)
|
/* Code for WATS 3020 FizzBuzz Assignment */
let isInteger,
maxNumber,
fbResults,
fbText;
// TODO: Initialize a variable `isInteger` to use as a control value for the
// `while` loop. Set the initial value to `false`.
// TODO: Create a `while` loop so user will be prompted to enter a number until
// the... |
import operator
from operator import le, lt
import textwrap
from typing import TYPE_CHECKING, Optional, Tuple, Union, cast
import numpy as np
from pandas._config import get_option
from pandas._libs.interval import (
VALID_CLOSED,
Interval,
IntervalMixin,
intervals_to_interval_bounds,
)
from pandas._l... |
from django.contrib import admin
from .models import Item, Trait, VotedTrait
class VotedTraitInLine(admin.TabularInline):
model = Item.traits.through
extra = 3
class ItemAdmin(admin.ModelAdmin):
inlines = [VotedTraitInLine]
admin.site.register(Item, ItemAdmin)
admin.site.register(Trait)
|
# Copyright (c) 2021 PaddlePaddle 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 appli... |
"""
Django settings for classDeck project.
Generated by 'django-admin startproject' using Django 3.0.7.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
... |
from __future__ import division
from __future__ import print_function
# Preprocessing of Option Quotes
# ==============================
#
# This notebook demonstrates the preprocessing of equity options, in preparation for the estimation of the parameters of a stochastic model.
# A number of preliminary calculations m... |
var onePerRound = require('../index.js')({
maxPerRound: 1
})
var twoPerRound = require('../index.js')({
maxPerRound: 2
})
var odd = {
participants: [
{ id: 1, seed: 1000 },
{ id: 2, seed: 1050 },
{ id: 3, seed: 950 }
],
matches: [
{
round: 1,
home: { id: 1, points: 1 },
away... |
/**
* @name EmojiStatistics
* @author DevilBro
* @authorId 278543574059057154
* @version 2.9.7
* @description Shows you an Overview of Emojis and Emoji Servers
* @invite Jx3TjNS
* @donate https://www.paypal.me/MircoWittrien
* @patreon https://www.patreon.com/MircoWittrien
* @website https://mwittrien.github.io... |
from django.core.management.base import BaseCommand
from django.utils import timezone
from django.utils.dateparse import parse_duration
from payments.models import Payment
class Command(BaseCommand):
help = "Cancels expired Payments"
def add_arguments(self, parser):
parser.add_argument('-n', dest='s... |
#
# Generated with CustomWizardBlueprint
from dmt.blueprint import Blueprint
from dmt.dimension import Dimension
from dmt.attribute import Attribute
from dmt.enum_attribute import EnumAttribute
from dmt.blueprint_attribute import BlueprintAttribute
from sima.sima.blueprints.moao import MOAOBlueprint
class CustomWizar... |
#!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Compare two or more genesisds to each other.
To use, create a class that implements get_tests(), and p... |
//Copyright 2012-2016 <>< Charles Lohr Under the MIT/x11 License, NewBSD License or ColorChord License. You Choose.
#include "cnhttp.h"
#include <string.h>
#include <stdio.h>
#include "sha1.h"
struct HTTPConnection HTTPConnections[HTTP_CONNECTIONS];
#define HTDEBUG( x... ) printf( x )
//#define HTDEBUG( x... )
//#... |
# -*- coding: utf-8 -*-
"""
pygments.plugin
~~~~~~~~~~~~~~~
Pygments setuptools plugin interface. The methods defined
here also work if setuptools isn't installed but they just
return nothing.
lexer plugins::
[pygments.lexers]
yourlexer = yourmodule:YourLexer
... |
# Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
#!/usr/bin/env python
#
# Electrum - Lightweight Bitcoin Client
# Copyright (C) 2015 Thomas Voegtlin
#
# 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... |
"""Support for Buienradar.nl weather service."""
import logging
from buienradar.constants import (
CONDCODE,
CONDITION,
DATETIME,
MAX_TEMP,
MIN_TEMP,
RAIN,
WINDAZIMUTH,
WINDSPEED,
)
import voluptuous as vol
from homeassistant.components.weather import (
ATTR_FORECAST_CONDITION,
... |
/*!
* YieldFarming
* Boilerplate for a Static website using EJS and SASS
* https://yieldfarming.info
* @author Jongseung Lim -- https://yieldfarming.info
* Copyright 2021. MIT Licensed.
*/
$(function() {
consoleInit();
start(main);
});
const ALCX_POOL_ABI = [{"inputs":[{"internalType":"contract IMintableE... |
document.querySelector(".hamburguer").addEventListener("click", () =>
document.querySelector(".container").classList.toggle("show-menu")
);
document.querySelector("#qtde").addEventListener("change", atualizarPreco)
document.querySelector("#js").addEventListener("change", atualizarPreco)
document.querySelector("#l... |
module.exports.publishPrice = function(productId,productPrice)
{
var kafka = require('kafka-node')
var Producer = kafka.Producer
var KeyedMessage = kafka.KeyedMessage
var client = new kafka.KafkaClient()
var producer = new Producer(client)
var record = new KeyedMessage(prod... |
from datetime import datetime
from flask import current_app
from website import db, login_manager
from flask_login import UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
class User(db.Model, User... |
import torch
import torch.nn.functional as F
import argparse
import cv2
import numpy as np
from glob import glob
import matplotlib.pyplot as plt
num_classes = 2
img_height, img_width = 32, 32
channel = 3
GPU = True
torch.manual_seed(0)
class Mynet(torch.nn.Module):
def __init__(self):
super(Mynet, se... |
# Copyright (c) 2020, Manfred Moitzi
# License: MIT License
from typing import TYPE_CHECKING, Iterable, cast
from ezdxf import ARROWS
from ezdxf.entities import factory
from ezdxf.lldxf.const import BYBLOCK
from ezdxf.math import Vec3, fit_points_to_cad_cv
if TYPE_CHECKING:
from ezdxf.eztypes import DXFGraphic, L... |
# sqlalchemy/sql/events.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
from .base import SchemaEventTarget
from .. import event
class DDLEvents(... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
from django.urls import path
from . import views
#Redirecciones dentro de la app api
urlpatterns = [
path('', views.index, name='index'),
path('update_config/', views.update_config, name='update_config'),
path('obtener_informacion/', views.get_public_information, name='obtener_informacion'),
] |
import tensorflow as tf
import numpy as np
data = [
[ [0,0], [0] ],
[ [0,1], [1] ],
[ [1,0], [1] ],
[ [1,1], [0] ],
]
features = [i[0] for i in data]
labels = [i[1] for i in data]
model = tf.keras.Sequential([
tf.keras.layers.Dense(units=8, input_shape=(2,), activation='tanh'),
tf.keras.layers.Dense(units=1, ac... |
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow strict-local
*/
'use strict';
import type {IncomingMessage, ServerResponse} from 'http';
import type {Cache... |
module.exports = require('./src/nested-set')
|
/**
* Module dependencies
*/
var start = require('./common')
, Aggregate = require('../lib/aggregate')
, mongoose = start.mongoose
, Schema = mongoose.Schema
, assert = require('assert');
/**
* Test data
*/
var EmployeeSchema = new Schema({
name: String,
sal: Number,
dept: String,
customers: [Str... |
#Bubble sort em ordem descrescente com pilha#
from sys import maxsize
lista = [1,2,3,4,5,6,7,8,9,10]
def bubbleDecrescente(lista):
for i in range(len(lista)-1,0,-1):
for i in range(i):
if lista[i]<lista[i+1]:
aux = lista[i]
lista[i] = lista[i+1]
... |
// Contato menu
let ghost = document.getElementsByClassName('ghost')[0]
let main = document.getElementsByTagName('main')[0]
let teste = false
var ghost_disable = () =>{
document.body.style.backgroundColor = "whitesmoke"
main.style.display = "block";
ghost.style.display = "none";
}
var ghost_enable = () =... |
import logging
import sys
from config.configs import get_config
from src.pretrain import Pretrain_Trainer
#from src.finetune import Finetune_Trainer
def main(parser, usage_mode):
# TO BE UPDATED
supported_tasks = ['classification','summarization']
if usage_mode == 'pretrain':
sys.stdo... |
/* Copyright (C) 1997-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C 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 ... |
# encoding: UTF-8
from vnpy.trader import vtConstant
from xtpGateway import XtpGateway
gatewayClass = XtpGateway
gatewayName = 'XTP'
gatewayDisplayName = 'XTP'
gatewayType = vtConstant.GATEWAYTYPE_EQUITY
gatewayQryEnabled = True
|
# Generated by Django 2.1.7 on 2019-03-25 23:40
from django.db import migrations, models
import newsWebsite.models
class Migration(migrations.Migration):
dependencies = [
('newsWebsite', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='author',
... |
function unitTests(doneCallback) {
console.log('[Tester] unit test completed');
doneCallback(0);
}
function styleCheck(doneCallback) {
var exec = require('child_process').exec;
var cmd = 'jscs . --preset=google';
exec(cmd, function(error, stdout, stderr) {
if (stdout !== '' || stderr !== '') {
con... |
/*
* This file is part of the Nautilus AeroKernel developed
* by the Hobbes and V3VEE Projects with funding from the
* United States National Science Foundation and the Department of Energy.
*
* The V3VEE Project is a joint project between Northwestern University
* and the University of New Mexico. The Hobbes P... |
"""
ANSI - Gives colour to text.
Use the codes defined in ANSIPARSER in your text
to apply colour to text according to the ANSI standard.
Examples:
This is |rRed text|n and this is normal again.
This is {rRed text{n and this is normal again. # soon to be depreciated
This is %crRed text%cn and this is normal agai... |
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/scancode-toolkit for support or download.
# See https://aboutcode.org for more in... |
$(function() {
if( !!$.prototype.dropzone ){
$('.field_show .images-field .dropzone').dropzone({
url: "add-image",
dictDefaultMessage: '',
addRemoveLinks: false,
init: function(){
var field_value = this.element.attributes.field_value.nodeV... |
"""test_34111 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-ba... |
# -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
from typing import Any, Dict, List, Optional
from watchmen_model.chart import ChartTruncationType
from watchmen_model.console import Report, ReportDimension, ReportIndicator
from watchmen_utilities import ArrayHelper, is_blank
class ReportSchema:
def __init__(self, report: Report):
self.report = report
def get_... |
// Import React
import React from "react";
// Import Spectacle Core tags
import {
Appear,
BlockQuote,
Cite,
Code,
CodePane,
Deck,
Fill,
Fit,
Heading,
Image,
Layout,
Link,
ListItem,
List,
Markdown,
Quote,
Slide,
Spectacle,
Text
} from "spectacle";
// Import image preloader util
im... |