text stringlengths 3 1.05M |
|---|
'use strict';
angular.module('ncApp', [
'ngAnimate',
'ngRoute',
'core',
'phoneList',
'phoneDetail'
]); |
"""
With these settings, tests run faster.
"""
from .base import * # noqa
from .base import env
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = False
# https://docs.djangoproject.com/en/dev/ref/settings/#se... |
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
'... |
# Copyright The OpenTelemetry 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 applicable law or agreed to in ... |
# 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, Mapping, Optional, Sequence, Union, overload
from .. import... |
const Sequelize = require('sequelize');
require('dotenv').config();
let sequelize;
if (process.env.JAWSDB_URL) {
sequelize = new Sequelize(process.env.JAWSDB_URL);
} else {
sequelize = new Sequelize(
process.env.DB_NAME,
process.env.DB_USER,
process.env.DB_PASSWORD,
{
host: 'localhost',
... |
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: 'source-map',
}); |
#import <SenTestingKit/SenTestingKit.h>
@interface UnitTests : SenTestCase
{
// QCOpenGLContext *context;
}
@end
|
/* eslint-disable */
import React from 'react';
import { connect } from 'dva';
import { Button } from 'antd';
import styles from './Launcher.css';
class PnoteLancher extends React.Component {
constructor(props){
super(props);
//only once
// this.state = {
// title:'',
// content: props,
... |
# -*- coding: utf-8 -*-
def test_simple():
"""Simple test example"""
t1 = 1
t2 = 1
assert t1 == t2
|
# coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class AutoOrdersResponse(object... |
import { module } from 'qunit';
import {
setupRenderingTest
} from 'ember-qunit';
import { render, click, settled } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
import {
accordionClassFor,
accordionItemHeadClass,
test,
testBS3,
testBS4,
visibilityClass
} from '../../helpers/bo... |
#ifndef DZ04_NOSTATE_H
#define DZ04_NOSTATE_H
#include "../State.h"
#include "../../geometry/Vector2D.h"
class StandSneak : public State {
private:
Vector2D<double> m_dest;
public:
StandSneak(Vector2D<double> dest) : m_dest(dest) {};
void enter(Character* stateMachine) override;
void exit(Charac... |
/* */
"format cjs";
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")... |
# u-msgpack-python v2.5.1 - v at sergeev.io
# https://github.com/vsergeev/u-msgpack-python
#
# u-msgpack-python is a lightweight MessagePack serializer and deserializer
# module, compatible with both Python 2 and 3, as well CPython and PyPy
# implementations of Python. u-msgpack-python is fully compliant with the
# lat... |
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NGAP-PDU-Contents"
* found in "./support/ngap-r15.2.0/PDU-Definitions.asn1"
* `asn1c -D ./common -gen-PER -pdu=all -fcompound-names -findirect-choice -fno-include-deps -no-gen-example`
*/
#include "NGAP_DownlinkUEAssociatedNRPPaTrans... |
from django.db import models
from django.contrib.auth.models import User
from PIL import Image
class Post(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE)
title = models.CharField(max_length=150)
created = models.DateTimeField(auto_now_add=True, auto_now=False)
updated = models.DateTimeFiel... |
from django.contrib.auth import get_user_model
from django.test import Client, TestCase
from django.urls import reverse
from posts.forms import Post, PostForm
from posts.models import Group, Post
User = get_user_model()
class PostFormTest(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClas... |
/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/EBus/EBus.h>
#include <AzCore/std/string/string.h>
#include <AWSCoreB... |
print("x")
print("y")
|
import React from 'react'
export default function Header(props) {
return (
<header>
<h1>Be The Hero</h1>
</header>
)
}
|
import signal, sys
# For Python 2.X.X
if (sys.version_info[0] == 2):
import openmoc
import _openmoc_cuda
from openmoc_cuda_single import *
# For Python 3.X.X
else:
import openmoc.openmoc as openmoc
import _openmoc_cuda
from openmoc.cuda.openmoc_cuda_single import *
# Tell Python to recognize CTRL+C and st... |
"""
Migration script to add the history_dataset_association_history table.
"""
import datetime
import logging
from sqlalchemy import (
Column,
DateTime,
ForeignKey,
Integer,
MetaData,
Table,
)
from galaxy.model.custom_types import (
MetadataType,
TrimmedString,
)
from galaxy.model.mig... |
const CommonHelper = {
TrimStrings(str) {
return str.trim();
},
findDuplicates(substringArr) {
return substringArr.filter((item,index) => substringArr.imdexOf(item) !== index)
},
getAlert(){
alert('asdasdasd');
},
groupBy(objectArray, property) {
return objectArray.reduce(function (a... |
app.controller('countryCtrl', ['$scope', '$state', '$stateParams', 'Data', 'toaster', function($scope, $state, $stateParams, Data, toaster) {
//for OrderFunction
$scope.OrderRec = 'name';
$scope.itemsPerPage = 30;
$scope.pageNumber = 1;
$scope.noOfRows = 1;
$scope.pageChanged = function(pageNo... |
from flask import Blueprint
from flask import make_response
from src.app.api.localVariables import contentType
from src.app.domain.collections.positions import positionsDatabaseAccess
positions = Blueprint('positions', __name__, url_prefix = '/users')
@positions.route('/<userId>/positions/', methods = ['... |
"""Per-prefix data, mapping each prefix to a dict of locale:name.
Auto-generated file, do not edit by hand.
"""
from ..util import u
# Copyright (C) 2011-2018 The Libphonenumber Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the Licens... |
# Copyright (c) 2009 The Foundry Visionmongers Ltd. All Rights Reserved.
import nuke
# List of libraries which may be in the plugins directory that are dependencies,
# not plugins themselves
PLUGINS_FILTER = [
"Alembic_In",
"DNxHR",
"FnNukeCodecs"
]
def _filterPlugin(plugin):
for filter in PLUGINS_FILTER:
... |
#include "sofa.h"
void iauC2tpe(double tta, double ttb, double uta, double utb,
double dpsi, double deps, double xp, double yp,
double rc2t[3][3])
/*
** - - - - - - - - -
** i a u C 2 t p e
** - - - - - - - - -
**
** Form the celestial to terrestrial matrix given the date, the UT1,
** ... |
define(['knockout', 'text!./user-bar.html', 'appConfig'], function (ko, view, appConfig) {
function userBar(params) {
var self = this;
self.appConfig = appConfig;
}
var component = {
viewModel: userBar,
template: view
};
ko.components.register('user-bar', component);
return component;
}); |
// var triangle = [];
function results() {
var flength = parseFloat(document.getElementById('firstside').value);
var slength = parseFloat(document.getElementById('secondside').value);
var tlength = parseFloat(document.getElementById('thirdside').value);
var resul = document.querySelector("#para");
if ((fle... |
const path = require('path');
const express = require('express');
var exec = require('child_process').exec;
var nodeSsdp = require('node-ssdp');
var ip = require('ip').address();
const ssdpServerPort = 1900;
const restServerPort = 33333;
const descriptionFilePath = '/static/desc.xml';
const udn = 'uuid:362d9414-31a0-4... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class KoubeiMallScanpurchaseUserpreorderQueryModel(object):
def __init__(self):
self._advance_order_id = None
self._user_id = None
@property
def advance_order_id(... |
'use strict'
const eos = require('end-of-stream')
module.exports = streamToBuffer
streamToBuffer.onStream = onStream
function streamToBuffer (stream, cb) {
const buffers = []
stream.on('data', buffers.push.bind(buffers))
eos(stream, function (err) {
switch (buffers.length) {
case 0:
cb(err... |
global.scrollDebounce = {
fire: [],
pause: 100,
didScroll: false,
addEvent: function(func, params) {
this.fire.push([func, params]);
},
runFunctions: function() {
for (var i = 0; i < scrollDebounce.fire.length; i++) {
scrollDebounce.fire[i][0].apply(this, scrollDebounce.fire[i][1]);
}
},
didWindowScrol... |
#!/usr/bin/env python3
# encoding: utf-8
# pylint: skip-file
import unittest
from position import Position
class _MPBase:
def runTest(self):
obj = Position(*self.obj)
for pivot, delta, wanted in self.steps:
obj.move(Position(*pivot), Position(*delta))
self.assertEqual(Po... |
#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that setting SDKROOT works.
"""
from __future__ import print_function
import TestGyp
import os
import subprocess
import sys
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _timer = require('./timer');
Object.defineProperty(exports, 'Timer', {
enumerable: true,
get: function get() {
return _timer.Timer;
}
}); |
class Verbosity:
"""Verbosity level for the sake of logging."""
QUIET = 0
NORMAL = 1
VERBOSE = 2
VERY_VERBOSE = 3
DEBUG = 4
@staticmethod
def get() -> 'Verbosity':
"""Get the verbosity from RVConfig."""
from rastervision2.pipeline import rv_config
return rv_confi... |
BUF_SIZE = 1024
ENABLE_DEBUG = True
IP_ADDR = '127.0.0.1'
REQ_NET_NAME = '/api/netname/'
REQ_IXP_NETS = '/api/ixnets/'
REQ_IXPS = '/api/ix/'
def printDebug(dbgMsg):
'''
Funcao auxiliar para depuracao.
'''
if ENABLE_DEBUG:
print('[dbg]', dbgMsg)
|
# -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
import cohesity_management_sdk.models.guid_pair
class CompareAdObjectsRequest(object):
"""Implementation of the 'CompareAdObjectsRequest' model.
Specifies the request to compare AD objects from Snapshot and Production
AD.
Attributes:
re... |
import pandas as pd
import numpy as np
import yfinance as yf
from sklearn.linear_model import LinearRegression
import statsmodels
import statsmodels.api as sm
import statsmodels.tsa.stattools as ts
import datetime
import scipy.stats
import math
import openpyxl as pyxl
from scipy import signal
from scipy import stats... |
from plotly.basedatatypes import BaseTraceType as _BaseTraceType
import copy as _copy
class Heatmapgl(_BaseTraceType):
# class properties
# --------------------
_parent_path_str = ""
_path_str = "heatmapgl"
_valid_props = {
"autocolorscale",
"coloraxis",
"colorbar",
... |
import numpy as np
import ast
n,m = 3,3
s = raw_input("Enter space sep. matrix elements: ")
items = map(ast.literal_eval, s.split(' '))
assert(len(items) == n*m)
A = np.array(items).reshape((n,m))
print "User given Matrix: "
#print A
s=(n,m)
#L=np.zeros(s)
U=np.zeros(s)
#print L
#print U
L=np.identity(3)
for j ... |
var root = require('../root/root-routes');
var getTagsName = 'getTags';
var createTagsName = 'createTags';
var getTagName = 'getTag';
var deleteTagName = 'deleteTag';
var tagsPath = root.rootPath + 'tags';
var tagPath = tagsPath + '/:tagid';
function addRoutes (server) {
var tagController = require('./tag-controll... |
import numpy as np
from numpy import pi,sinh,cosh
from scipy import integrate
try:
import mkl
np.use_fastnumpy = True
except ImportError:
pass
def diff_central(x, y):
x0 = x[:-2]
x1 = x[1:-1]
x2 = x[2:]
y0 = y[:-2]
y1 = y[1:-1]
y2 = y[2:]
f = (x2 - x1)/(x2 - x0)
return (1-f... |
"""
URLconf for registration and activation, using django-registration's
default backend.
If the default behavior of these views is acceptable to you, simply
use a line like this in your root URLconf to set up the default URLs
for registration::
(r'^accounts/accounts/', include('registration.backends.defa... |
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from ebAlert import create_logger
from ebAlert.core.config import settings
log = create_logger(__name__)
engine = create_engine('sqlite:///{!s}'.format(settings.FILE_LOCATION), echo=F... |
/*
* Copyright © 2018 Valve Corporation
*
* 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, modify, merge, pub... |
from decimal import Decimal
from django.db.models import Q
from .models import CustomerInfo
import re
import zenhan
def ExtractNumber(org_str, data_type):
"""
引数で渡された文字列を半角に変換し、数字のみを抽出して返す。
param: org_str。例:'(0120)123-456
param: data_type。例:1=電話番号用、2=郵便番号用、3=法人番号用
return: org_strから数字のみを抽出した文字列。例:... |
#!/usr/bin/python
# -*- coding= utf-8 -*-
import ctypes
import win32con
from icom_ctrl_msg_id import *
user32 = ctypes.windll.user32
#FindWindow = user32.FindWindowW
#BringWindowToTop = user32.BringWindowToTop
#IsWindowVisible = user32.IsWindowVisible
#IsIconic = user32.IsIconic
#SetForegroundWindow = user3... |
# -*- coding: utf-8 -*-
#@+leo-ver=5-thin
#@+node:ekr.20140907131341.18707: * @file ../plugins/qt_tree.py
#@@first
'''Leo's Qt tree class.'''
#@+<< imports >>
#@+node:ekr.20140907131341.18709: ** << imports >> (qt_tree.py)
import leo.core.leoGlobals as g
import leo.core.leoFrame as leoFrame
import leo.core.leoNodes as ... |
export {};
//# sourceMappingURL=BaseConnectionOptions.js.map
|
#!/usr/bin/env python3
import click
import colorama
import threading
import yaml
from ects.cmds.passphrase_funcs import prompt_for_passphrase, read_passphrase_from_file
from ects.util.default_root import DEFAULT_KEYS_ROOT_PATH
from ects.util.file_keyring import FileKeyring
from ects.util.keyring_wrapper import DEFAUL... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// https://github.com/karma-runner/karma-chrome-launcher
process.env.CHROME_BIN = require("puppeteer").executablePath();
require("dotenv").config();
const {
jsonRecordingFilterFunction,
isPlaybackMode,
isSoftRecordMod... |
import time
from collections import namedtuple
Info = namedtuple('Info', ['total', 'passed', 'failed'])
def terminal_reporter_info(tr):
passed = len(tr.stats.get('passed', []))
failed = sum([len(tr.stats.get('failed', [])),
len(tr.stats.get('error', []))])
return Info(
total=pa... |
export class Repo {
id = null;
name = '';
clone_url = '';
constructor(repo){
Object.assign(this, repo)
}
render() {
const container = document.createElement('div');
container.id = `repo${this.id}: ${this.name}`;
const anchorEl = document.createElement('a');
anchorEl.href = this.clone_url;
anc... |
import argparse
from google_drive_downloader import GoogleDriveDownloader as gdd
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--faces', action='store_true', help='dl dafre faces')
parser.add_argument('--full', action='store_true', help='dl dafre full')
parser.add_argument('--moe... |
import os
import platform
from termcolor import colored
from glob import glob
import pydicom
from pydicom.dataelem import RawDataElement
from pydicom.valuerep import PersonName
import hashlib
def print_colored_text(message, color='red'):
print(colored(message, color))
def platform_slash():
if "Windows" in p... |
# Copyright 2018 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... |
from __future__ import unicode_literals
import logging
import sys
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.forms.widgets import Select
from djblets.db.query import... |
'''
Created on Feb 7, 2014
@author: sesuskic
'''
__all__ = ["InputInterface"]
class InputInterface(object):
def __init__(self):
raise RuntimeError("Not allowed to crate instance of this class")
def get_categories(self):
return self.__dict__.keys()
def get_category(self, name):
... |
"""
Soft Voting/Majority Rule classifier and Voting regressor.
This module contains:
- A Soft Voting/Majority Rule classifier for classification estimators.
- A Voting regressor for regression estimators.
"""
# Authors: Sebastian Raschka <se.raschka@gmail.com>,
# Gilles Louppe <g.louppe@gmail.com>,
# ... |
window.currentList = 0
async function openTask(event) {
let taskId = event.target.parentNode.getAttribute('data_id')
let response = await fetch(`/tasks/${taskId}`, {
method: "GET",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/... |
# -*- 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... |
import torch
class LayerNorm_(torch.nn.Module):
def __init__(self, normalized_shape, init_method, dp=4, eps=1e-5, scale=1e-3):
super(LayerNorm_, self).__init__()
# Initialize master weight
self.gamma = torch.empty(normalized_shape,
dtype=torch.float,
... |
import React , {Component , Fragment , lazy , Suspense} from "react"
import "./EasyFramer.css"
export default class FileUpload extends Component {
render(){
return (
<Fragment>
<h1>Managing File Upload and File Rendering With React</h1>
</Fragment>
)
}
... |
import contextlib
from ._blob import BlobUpath
class ResourceNotFoundError(Exception):
pass
class ResourceExistsError(Exception):
pass
class FakeBlobStore:
'''A in-memory blobstore for illustration purposes'''
def __init__(self):
self._data = {
'bucket_a': {},
'buc... |
import Ember from 'ember';
const { computed, Component, String: { htmlSafe } } = Ember;
export default Component.extend({
tagName: '',
barClass: computed('direction', function() {
let direction = this.get('direction');
if (direction) {
return `md-${direction}`;
}
}),
style: computed('leftPo... |
const Response = require('../../utils/response');
const Chat = require('../chat/chat.model');
const unreadChat = require('../chat/unreadchat.model');
const Screen = require('../screens/screens.model');
const User = require('../user/user.model')
const Joi = require('joi');
const FocusGroup = require('../focusGroup/focus... |
import buildQueryParams from './query';
describe('services/query', () => {
it('should build one query param', () => {
const obj = {
param1: 'ABC'
};
expect(buildQueryParams(obj)).toEqual('?param1=ABC');
});
it('should build several query params', () => {
const... |
# Copyright 2021 Alibaba Group Holding Limited. 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 ... |
import json
import requests
import os.path
from os import path
# if path.exists("courses.json"):
# with open("courses.json","r+") as count:
# data=json.load(count)
# # print(data)
# else:
url="http://saral.navgurukul.org/api/courses"
w = requests.get(url).text
# print (w)
with open("cours.json","w+") as count:
c... |
/* eslint quote-props: 0 */
'use strict';
const path = require('path');
const defaultMimeType = 'application/octet-stream';
const defaultExtension = 'bin';
const mimeTypes = new Map([
['application/acad', 'dwg'],
['application/applixware', 'aw'],
['application/arj', 'arj'],
['application/atom+xml', ... |
import React from 'react';
import styled from '@emotion/styled';
import CodeBlock from './codeBlock';
import AnchorTag from './anchor';
import FeaturesContainer from "./FeaturesContainer";
import Feature from './Feature';
import FlowStep from "./FlowStep";
import FlowService from './FlowService';
import YoutubeEmbed f... |
// Queue.h :
//////////////////////////////////////////////////////////////////////////
// Author : Francesco Rinaldi
// Created: Many many moons ago
// Purpose: doubly Linked List / Iterator class Implementation
//////////////////////////////////////////////////////////////////////////
#ifndef _LLIST_H_
#define _LLI... |
/**
* Created by bln on 16-6-28.
*/
const render = require('../../instances/render');
const auth = require('../../helpers/auth');
const db = require('../../models/index');
const Business = db.models.Business;
const BusinessKind = db.models.BusinessKind;
const co = require('co');
/**
* 将表示层也分层正是三层五层架构的思想
* @param ro... |
# Copyright 2013-2020 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 PerlNetScpExpect(PerlPackage):
"""Wrapper for scp that allows passwords via Expect."""
... |
# Mark Gaynor
|
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
from datetime import datetime, timedelta
import math
import os
import plotly.graph_objects as go
from plotly.subplots import make_subplots
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
import dash_b... |
# -*- 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... |
//
// Copyright (c) 2017 The nanoFramework project contributors
// See LICENSE file in the project root for full license information.
//
#ifndef HALCONF_NF_H
#define HALCONF_NF_H
// enables STM32 Flash driver
#if !defined(HAL_NF_USE_STM32_FLASH)
#define HAL_NF_USE_STM32_FLASH TRUE
#endif
#if !defined(HAL_NF... |
import React,{Component} from 'react';
class SearchBar extends Component{
constructor(props){
super(props);
this.state ={term: ''};
}
render() {
return (
<div className="search-bar">
<input
value = {this.state.term}
onChange={event=>this.onInputChange(event.target.value)}
... |
export default {
name: 'es-do',
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_N... |
from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
class LoginForm(forms.Form):
username = forms.CharField(label='Usuario')
password = forms.CharField(widget=forms.PasswordInput(), label='Contraseña')
class SignupForm(UserCreationForm... |
#!/usr/bin/env python3
import torch
from torch.autograd import Function
from ..utils.lanczos import lanczos_tridiag, lanczos_tridiag_to_diag
from .. import settings
class RootDecomposition(Function):
def __init__(
self,
representation_tree,
max_iter,
dtype,
device,
... |
import collections
import datetime
import gzip
import io
from urllib import parse
import boto
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from openedxstats.apps.sites.models import AccessLogAggregate, FilenameLog
"""
fetch_referrer_logs.py (based off load_logo_referrers_s... |
module.exports={C:{"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0.00338,"33":0,"34":0.00677,"35":0,"36":0,"37":0,"38":0,"39":0,"40":0.00338,"41":0,"42":0,"43"... |
import os
from losses import SSD_LOSS
from utils import data_utils
from networks import SSD_MOBILENET
from tensorflow.keras.optimizers import SGD
from data_generators import SSD_DATA_GENERATOR
from tensorflow.keras.callbacks import ModelCheckpoint
from tensorflow.keras.applications.mobilenet import preprocess_input
d... |
import pandas as pd
from typing import List
def success_rate(counterfactuals: pd.DataFrame) -> float:
"""
Computes success rate for all counterfactuals
Parameters
----------
counterfactuals: All counterfactual examples inclusive nan values
Returns
-------
% non-null
"""
retur... |
/******************************************************************************
* Copyright 2018 The Apollo 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
*... |
export const CREATE_QUESTION = 'CREATE_QUESTION';
export const UPDATE_QUESTION = 'UPDATE_QUESTION';
export const REMOVE_QUESTION = 'REMOVE_QUESTION';
|
#############################################################################
# Copyright (c) 2015 Ericsson AB and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available ... |
Acko.Effect.Visualizer = function () {
Acko.Effect.call(this);
this.order = -5;
this.display = null;
this.last = 0;
this.skip = 25;
this.fade = 10;
this.volume = 1;
this.rotate = 0;
this.fakelevels = [];
this.level = 0;
this.levels = [];
this.smooths = [];
this.phases = [];
this.finals =... |
/**
* @since 2016-11-17 11:36
* @author vivaxy
*/
import path from 'path';
import fse from 'fs-extra';
import fileExists from '../file/fileExists';
import { GT_HOME, CONFIG_FILE_NAME } from '../config';
const userConfigFile = path.join(GT_HOME, CONFIG_FILE_NAME);
export const read = () => {
return require(us... |
"use strict"
window.onload=function(){
const div = document.getElementById("svgArea");
const svgEl = document.getElementById("mySVG");
svgEl.setAttribute("width","700");
svgEl.setAttribute("height","600");
svgEl.setAttribute("viewBox"," -190 -165 380 330");
const inputParamFr = document.getElementById("param1");
con... |
import numpy as np
import pytest
from pandas.core.dtypes.dtypes import CategoricalDtype
from pandas import Categorical, CategoricalIndex, Index, Series, Timestamp
import pandas._testing as tm
class TestCategoricalDtypes:
def test_is_dtype_equal_deprecated(self):
# GH#37545
c1 = Categorical(list(... |
// This file configures a web server for testing the production build
// on your local machine.
import browserSync from 'browser-sync';
import historyApiFallback from 'connect-history-api-fallback';
import {chalkProcessing} from './chalkConfig';
/* eslint-disable no-console */
console.log(chalkProcessing('Opening pr... |
import { inject as service } from '@ember/service';
import Mixin from '@ember/object/mixin';
import { computed } from '@ember/object';
import { run } from '@ember/runloop';
export default Mixin.create({
deviceLayout: service('device/layout'),
width: 0,
inserted: false,
classNameBindings: ['breakpointClass'],
... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2019-06-13 19:21
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('cmdb', '0012_fittingssd_cache'),
]
operations = [
migrations.RemoveField(
... |