text stringlengths 3 1.05M |
|---|
import React from 'react';
import { withMetadata } from 'react-router-dispatcher-metadata';
const About = (/*props*/) => {
return (
<div>
<h1>About what?</h1>
</div>
);
};
About.getMetadata = (/*match, props*/) => {
return {
title: 'About Page'
};
};
export default w... |
#This Lambda function reads the Kinesis Firehose records as Input, decrypt the log records using KMS key, unzip the records and then categories the event type into S3 folder structure.
from __future__ import print_function
import json
import boto3
import base64
import zlib
import aws_encryption_sdk
from aws_encryption... |
sub_264 = df_a[df_a.system==264][['wavelength', 'x', 'vshift', 'sigma']].copy()
sub_264['x_1000'] = sub_264.x + 6000.0
!rm ../img/*transition.png
calc_array = np.linspace(0.0, 2.0 * np.pi, 150)
def fraction(index):
return (np.cos(index) + 1.0) / 2.0
xlimmin = []
xlimmax = []
for index, infrac in enumerate(cal... |
import {create} from "ember-metal/platform";
var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];
/**
A subclass of the JavaScript Error object for use in Ember.
@class Error
@namespace Ember
@extends Error
@constructor
*/
var EmberError = function() {
var tmp... |
# module import
import re
class Validators:
def valid_name(self, username):
""" Valid username """
return re.match("^[a-zA-Z]+$", username)
def valid_password(self, password):
"""validate for password """
# positive look ahead
return re.match("^(?=.*[A-Z])(?=.*[a-z])(?... |
"""
Module with an entire Negative Response Code (NRC) data parameters implementation.
.. note:: Explanation of :ref:`NRC <knowledge-base-nrc>` values meaning is located in appendix A1 of
ISO 14229-1 standard.
"""
__all__ = ["NRC"]
from aenum import unique
from uds.utilities import ByteEnum, ValidatedEnum, Exte... |
/**
* The MIT License (MIT)
* Copyright (c) 2016 Krypto Fin ry and the FIMK Developers
*
* 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 limitatio... |
import os
import site
import sys
os.environ['CELERY_LOADER'] = 'django'
# Add the app dir to the python path so we can import manage.
wsgidir = os.path.dirname(__file__)
path = lambda *x: os.path.join(os.path.dirname(
os.path.realpath(__file__)), '..', *x)
site.addsitedir(path('.'))
site.addsitedir(path('..'))
... |
import numpy as np
from tqdm import tqdm
from .abc_interpreter import InputGradientInterpreter
from ..data_processor.readers import images_transform_pipeline, preprocess_save_path
from ..data_processor.visualizer import explanation_to_vis, show_vis_explanation, save_image
class SmoothGradInterpreter(InputGradientInt... |
"""
Django settings for arenablog project.
Generated by 'django-admin startproject' usign Django 3.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
from pathl... |
var class_s_k_put_listener =
[
[ "SKPutListener", "class_s_k_put_listener.html#a14ade429e684accf52aa54d28a5b1ddd", null ],
[ "get_sk_path", "class_s_k_put_listener.html#a8b2e945cf373b7fb72fc1223f3b302a5", null ],
[ "parse_value", "class_s_k_put_listener.html#a08077510565094f8c65b0e6b5783b7a5", null ],
[... |
'use strict'
const co = require('co')
const cli = require('..')
const vars = require('./vars')
function basicAuth (username, password) {
let auth = [username, password].join(':')
auth = Buffer.from(auth).toString('base64')
return `Basic ${auth}`
}
function createOAuthToken (username, password, expiresIn, secon... |
export default {
// v-dialog-drag: 弹窗拖拽
bind (el, binding, vnode, oldVnode) {
const value = binding.value
if (value == false) return
// 获取拖拽内容头部
const dialogHeaderEl = el.querySelector('.el-dialog__header');
const dragDom = el.querySelector('.el-dialog');
dialogHeaderEl.style.cursor = 'move... |
/**
* qapi_fs_types.h
* @brief Datatypes for QAPI FS.
* @details This file defines the datatypes for QAPI wrapper layer.
*/
/*==========================================================================
* Copyright (C) 2017 Qualcomm Technologies, Inc.
* All Rights Reserved.
* Confidential and Proprietary - Qualco... |
import os
import sys
import argparse
import time
import json
import tvm
import numpy as np
from tvm import rpc
from flextensor.utils import Config, RpcInfo
from flextensor.task import Task, TASK_TABLE
from flextensor.scheduler import schedule, schedule_with_config
from flextensor.measure import _evaluate
from flextens... |
import ProtectedRoute from './ProtectedRoute'
export default ProtectedRoute
|
# Copyright 2017 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 required by applicable law or ... |
from rest_framework import routers
from django.conf.urls import url
from .api import GuestPostViewSet, GuestSpeakingApplicationView, UnpublishPostView
router = routers.DefaultRouter()
router.register('guest-posts', GuestPostViewSet)
urlpatterns = router.urls + [
url(r'speaking-application/', GuestSpeakingApplicat... |
const express = require('express');
const router = express.Router();
const registerController = require('../controllers/registerController');
// Render Signup Page
router.get('/', (req, res) =>{
res.title('Signup').render('signup');
});
// Signup Page
router.post('/create', registerController.create);
// Redirec... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file."""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... |
#!/usr/bin/env python2
from __future__ import print_function
import ctypes
import rospkg
import numpy as np
import cv2
import tensorrt as trt
import pycuda.driver as cuda
import pycuda.autoinit
rospack = rospkg.RosPack()
plugin_path = rospack.get_path("yolo_trt_ros") + "/plugins/libyolo_layer.so"
try:
ctypes.c... |
/*! animateCSS - v1.2.1 - 2015-03-23
* https://github.com/craigmdennis/animateCSS
* Copyright (c) 2015 Craig Dennis; Licensed MIT */
(function(){"use strict";var a;a=jQuery,a.fn.extend({animateCSS:function(b,c){var d,e,f,g,h,i,j,k,l,m;return k={effect:b,delay:0,animationClass:"animated",infinite:!1,callback:c,duration... |
import { isDefined } from '../../core/utils/type';
import { PdfTable } from './pdf_table';
export class PdfGrid {
constructor(splitByColumns) {
this._splitByColumns = splitByColumns ?? [];
this._newPageTables = [];
this._tables = [];
this._currentHorizontalTables = null;
}
... |
// Sequelize model for creating albums in our database
module.exports = function (sequelize, DataTypes) {
var Album = sequelize.define("Album", {
// Giving artist id as primary key and name as string
title: {
type: DataTypes.STRING,
allowNull: false,
validate: {
... |
from const import gofile_path
def genGolangfile(protos):
fileContent = ""
fileContent += (
'package msg'
'\n'
'import (\n'
' "github.com/name5566/leaf/network/protobuf"\n'
')'
'\n\n'
'var (\n'
' Processor = protobuf.NewProcessor()\n'
')\n'
'\n'
'func init() {'
'... |
# Copyright 2021 ZBW – Leibniz Information Centre for Economics
#
# 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... |
# Copyright 2016 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 required by applicable law or a... |
const yt = require("ytdl-core")
const yts = require("yt-search")
async function ytMp3(url) {
return new Promise((resolve, reject) => {
try {
const id = yt.getVideoID(url)
const yutub = yt.getInfo(`https://www.youtube.com/watch?v=${id}`)
.then((data) => {
let pormat = data.formats
let audio = []
... |
/*
* module to include the modules
*/
config_require(if-mib/ifTable/ifTable)
|
import json
import math
import time
# TODO: define coordinate system
#############################
### MODULE PARAMETERS ###
#############################
CONTROL_PARAMETERS_FILENAME = "control_parameters_ddr.json"
RECORDED_TRAJECTORY_FILENAME = "recorded_trajectory_ddr.json"
PEDAL_POSITION_ERROR_TOLERANCE = 10... |
#Copyright 2017 Zhonghao Guo gzh1994@bu.edu
import numpy as np
import scipy.io.wavfile as wav
def dialer(file_name, frame_rate, phone, tone_time):
if phone == '321':
t = np.linspace(0, tone_time, tone_time*frame_rate, dtype='float32',endpoint = False )
else:
t = np.linspace(0, tone_time, tone_time*frame_rate, d... |
define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var reservedKeywords = exports.reserved... |
# coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class LoginProtectResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key... |
// Copyright 2014 the V8 project 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 V8_IC_HANDLER_COMPILER_H_
#define V8_IC_HANDLER_COMPILER_H_
#include "src/ic/access-compiler.h"
#include "src/ic/ic-state.h"
namespace v8 {
na... |
# Copyright 2013 Rackspace, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
var searchData=
[
['triple_2064_20bit_20index_20table',['Triple 64 bit Index Table',['../group__dbi64i64i64.html',1,'']]],
['token_20api',['Token API',['../group__tokens.html',1,'']]],
['transaction_20api',['Transaction API',['../group__transactionapi.html',1,'']]],
['transaction_20c_20api',['Transaction C API'... |
from .__meta__ import version as __version__
from .py_isfreader import read_file, split_isf_header, parse_isf_header, parse_isf_data
|
import os
import torch
import numpy as np
from torch.utils.data import Dataset
from torch.utils import data
import random
# taken from https://github.com/optas/latent_3d_points/blob/8e8f29f8124ed5fc59439e8551ba7ef7567c9a37/src/in_out.py
synsetid_to_cate = {
'02691156': 'airplane', '02773838': 'bag', '02801938': 'b... |
/*
* The copyright in this software is being made available under the 3-clauses
* BSD License, included below. This software may be subject to other third
* party and contributor rights, including patent rights, and no such rights
* are granted under this license.
*
* Copyright (c) 1987, 1993, 1994
* The Regen... |
from IPython.display import Image, display
from IPython.core.display import HTML
def display_images(images):
imagesList=''.join(
["<div>\
<img style='width:170px; float: left; border: 1px solid black;' src='%s'>\
<h3 style='width:0px; position: relative; top:-25px; right:165px; float: left;'... |
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/anchor-is-valid */
/* eslint-disable jsx-a11y/anchor-has-content */
/* eslint-disable react/jsx-no-target-blank */
// TODO: re-enable rules
import React from 'react';
import { Link, useLocation } from 'react-router-dom';
import { __... |
/**
* Copyright (c) 2017, Łukasz Marcin Podkalicki <lpodkalicki@gmail.com>
* ATtiny13/017
* Digital DC ampmeter with LED tube display based on MAX7219/MAX7221.
*/
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "max7219.h"
#define AMPMETER_PIN PB4
#define AMPMETER_R1 (10000U) // ... |
var ReplicaSetManager = require('../../test/tools/replica_set_manager').ReplicaSetManager;
var mongo = require('../../lib/mongodb'),
// website = new mongo.Db('simplereach_website_production', new mongo.Server('localhost', 27017, {auto_reconnect:true, poolSize:5})),
// adserver = new mongo.Db('adserver', new mongo... |
"""Helper methods related to User model."""
from functools import wraps
from flask import request
from flask_api.exceptions import NotAuthenticated, AuthenticationFailed
from app.users.user_models import User
def authenticate(f): # pylint: disable=invalid-name
"""Decorate API route calls requiring authenticat... |
import uuid
import pytest
from sqlalchemy.exc import SQLAlchemyError
from app.dao.service_sms_sender_dao import (
archive_sms_sender,
dao_add_sms_sender_for_service,
dao_update_service_sms_sender,
dao_get_service_sms_sender_by_id,
dao_get_sms_senders_by_service_id,
dao_get_sms_sender_by_servic... |
load("@bazel_skylib//lib:types.bzl", "types")
load(":maybe_export_file.bzl", "maybe_export_file")
# Note to users: all callsites accepting `image.source` objects also accept
# plain strings, which are interpreted as `image.source(<the string>)`.
def _image_source_impl(
# Buck target outputting file or director... |
module.exports = {
reactStrictMode: true,
eslint: {
ignoreDuringBuilds: true,
},
images: {
domains: ['lh3.googleusercontent.com','image.tmdb.org','assets.nflxext.com'],
},
}
|
from flask import Flask
app = Flask(__name__)
from app import neuroner
|
Package.describe({
name: 'nathantreid:caching-html-compiler',
version: '0.0.8',
// last MDG version: '1.0.6',
// Brief, one-line summary of the package.
summary: 'Pluggable class for compiling HTML into templates',
// By default, Meteor will default to using README.md for documentation.
// To avoid submit... |
import re
import time
import requests
import random
import sys
from requests.exceptions import RequestException, HTTPError
from lxml.html import fromstring
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
# import pdb
def get_proxies():
url = 'https://free-proxy-list.net/'
response = request... |
/*
* OpenUI5
* (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define([
"sap/ui/fl/write/_internal/transport/TransportSelection"
], function(
TransportSelection
) {
"use strict";
/**
* @public
* @deprecated Since vers... |
# Modules
## enviroment:
import numpy as np
import sys
## local:
import genGenerate as ggt
import genPlot as gpt
import genNetwork as gnt
from sklearn.cluster import AgglomerativeClustering
def main():
N_g = 30 # length of each genome in base pairs
N_p = 5 # size of pan genome
# generate data:
p = np.concatenat... |
/* YUI 3.9.0pr1 (build 202) Copyright 2013 Yahoo! Inc. http://yuilibrary.com/license/ */
if (typeof _yuitest_coverage == "undefined"){
_yuitest_coverage = {};
_yuitest_coverline = function(src, line){
var coverage = _yuitest_coverage[src];
if (!coverage.lines[line]){
coverage.calledL... |
# Copyright 2018 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, s... |
import discord
from helpers import get_gif
commands = ["givecoffee"]
requires_mention = False
accepts_mention = False
description = "givecoffee by Vincent#0212"
async def execute(message):
gif = get_gif("anime coffee", lmt=25, pos=0, wo_anime=True)
embed = discord.Embed()
if accepts_mention:
if... |
/*
* Copyright (c) 1998-2003 by The XFree86 Project, Inc.
* Copyright © 2013 Red Hat
* Copyright © 2014 Intel Corporation
* Copyright © 2016 Red Hat
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal ... |
import logging
class SequenceStrategy(object):
def __init__(self, strategy_name, instance_id, instance_sequences, max_sequence_id):
if len(instance_sequences) != len(set(instance_sequences.values())):
raise RuntimeError("precondition check failed: instance_sequences contains duplicate sequenc... |
/home/runner/.cache/pip/pool/34/45/57/f48de8e1b9686ddd7c17dd8d0088cd635b06cbb626cc4e51ac3e747cca |
# uncompyle6 version 3.2.0
# Python bytecode 2.4 (62061)
# Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)]
# Embedded file name: pirates.effects.DarkWaterFog
from pandac.PandaModules import *
from direct.showbase.DirectObject import *
from direct.interval.IntervalG... |
from compas.com import MatlabSession
m = MatlabSession('test')
print(m.session_name)
print(m.isprime(17))
|
import BaseRepository from '.';
import Utils from '../utils';
class LikeRepository extends BaseRepository {
constructor() {
super('Likes');
}
async toggleLike(findQuery, userId) {
try {
let existingLike = await this.findOne(findQuery);
if (existingLike) {
let users = existingLike.use... |
# import os
# import sys
#
# sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
#
# from click.testing import CliRunner
# from nose import with_setup
#
# from superhub.cli import cli
#
# runner = CliRunner()
#
#
# def run(args, expected=[], unexpected=[], fail=False):
# prefix = ["--pas... |
import os
os.chdir('/Users/icepitproductions/Documents/GitHub/Projects/python/client-project/')
|
# -*- coding: utf-8 -*-
import re
industries = (
u"网络游戏",
u"耐用消费品",
u"零售/批发",
u"媒体/出版/影视/文化传播",
u"旅游/度假",
u"家居/室内设计/装饰装潢",
u"快速消费品",
u"基金/证券/期货/投资",
u"教育/培训/院校",
)
cities = (
u"上海",
u"北京",
u"广州",
u"杭州",
u"深圳",
)
item_dict = {
u'地点': 'location',
u'性质':... |
/*
Copyright (c) 2014-present, salesforce.com, inc. All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this lis... |
import torch
from vision.ssd.vgg_ssd import create_vgg_ssd, create_vgg_ssd_predictor
from vision.ssd.mobilenetv1_ssd import create_mobilenetv1_ssd, create_mobilenetv1_ssd_predictor
from vision.ssd.mobilenetv1_ssd_lite import create_mobilenetv1_ssd_lite, create_mobilenetv1_ssd_lite_predictor
from vision.ssd.squeezenet_s... |
#include "pairing.h"
void ColorPairToString(const ColorPair* colorPair, char* buffer)
{
sprintf(buffer, "%s %s",
MajorColorNames[colorPair->majorColor],
MinorColorNames[colorPair->minorColor]);
}
ColorPair GetColorFromPairNumber(int pairNumber)
{
ColorPair colorPair;
int zeroBasedP... |
"""Abode sensor device."""
import re
from abodepy.devices.binary_sensor import AbodeBinarySensor
import abodepy.helpers.constants as CONST
class AbodeSensor(AbodeBinarySensor):
"""Class to represent a sensor device."""
@property
def motion(self):
"""Motion detected."""
value = self._json... |
from sqlalchemy import *
from app.database import Base
class Drug(Base):
__tablename__ = "drugs"
id = Column(Integer, primary_key=True, autoincrement=True)
name = Column(String, nullable=False, unique=True, index=True)
unit = Column(String)
|
import pytest
from util import read_puzzle_input
from year_2021.day06.lanternfish import (
get_num_lanternfish,
)
@pytest.mark.parametrize(
"num_days,expected_output",
[
(0, 5),
(18, 26),
(80, 5934),
(256, 26984457539),
],
)
def test_get_num_lanternfish(num_days, expec... |
var layouts = require("../layouts"),
mailer = require("nodemailer");
/**
* SMTP Appender. Sends logging events using SMTP protocol.
* It can either send an email on each event or group several logging events gathered during specified interval.
*
* @param recipients comma separated list of email recipients
* @param s... |
# -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... |
# This sample tests the type checker's "type var scoring" mechanism
# whereby it attempts to solve type variables with the simplest
# possible solution.
from typing import Union, List, TypeVar, Type
T = TypeVar('T')
def to_list1(obj_type: Type[T], obj: Union[List[T], T]) -> List[T]:
return []
def to_list2(obj_... |
import json
import pandas as pd
#!!! This giant block of imports should be something simpler, such as:
# from great_exepectations.helpers.expectation_creation import *
from great_expectations.execution_engine import PandasExecutionEngine
from great_expectations.expectations.expectation import (
ColumnMapExpectatio... |
#ifndef __barycenter_h
#define __barycenter_h
#include "drawing.h"
//! Class barycenter drawing for any kind of graph
class BarycenterDrawing:public Drawing
{
private:
map<int, struct Point> fixedVertices; // fixed vertices
//! Set fixed coordinates
/*! \param map<int, bool>& reference to x updating variable
... |
/**
* The list of supported data transfer data types.
* @attribute DATA_TRANSFER_DATA_TYPE
* @param {String} BINARY_STRING <small>Value <code>"binaryString"</code></small>
* The value of data transfer data type when Blob binary data chunks encoded to Base64 encoded string are
* sent or received over the Datach... |
import { app, ipcMain, BrowserWindow, Menu, dialog } from "electron";
import { version, productName } from "../../package.json";
import { Backend } from "./modules/backend";
import { checkForUpdate } from "./auto-updater";
import menuTemplate from "./menu";
import isDev from "electron-is-dev";
const portscanner = requi... |
# Server Specific Configurations
server = {
'port': '8080',
'host': '0.0.0.0'
}
# Pecan Application Configurations
app = {
'root': 'designer_family.controllers.root.RootController',
'modules': ['designer_family'],
'static_root': '%(confdir)s/public',
'template_path': '%(confdir)s/designer_famil... |
# coding=utf-8
# Copyright 2021 The Google Research 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 applicab... |
# Author: Kevin Köck
# Copyright Kevin Köck 2019 Released under the MIT license
# Created on 2018-12-19
__updated__ = "2018-12-19"
__version__ = "0.0"
import asyncio
import logging
import time
import math
from server.server_generic import getNetwork as _getNetwork
from server.generic_clients.client import Client, C... |
!function (e) {
var t = {};
function n(r) {
if (t[r])
return t[r].exports;
var o = t[r] = {
i: r,
l: !1,
exports: {}
};
return e[r].call(o.exports, o, o.exports, n),
o.l = !0,
o.exports
}
n.m = e,
n.c = t,
n.d = function (e, t, r) {
n.o(e, t) || Object.defineProperty(e, t, {
enu... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
from django.contrib.auth import get_user_model, authenticate
# from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
'''Serializer for the users object'''
class Meta:
model = get_user_model()
fields =... |
/* eslint-disable max-len */
import CliTextResponseHandler from '../response-handlers/cli/text-response-handler';
import CliOptionsResponseHandler from '../response-handlers/cli/options-response-handler';
import UserStateResponseHandler from '../response-handlers/user-state-response-handler';
import NotImplementedRespo... |
import pyttsx3
en = pyttsx3.init()
en.setProperty('rate', 50)
en.say("Fala galera do projeto peti aluno maker digital, estamos evoluindo para processamento de linguagem natural e esse é o primeiro teste")
en.setProperty('voice', b'brazil')
en.runAndWait()
|
import * as actions from '../actions';
const facebookInfo = (state={}, action) => {
switch (action.type) {
case actions.FACEBOOK_API_ME:
case actions.FACEBOOK_GET_LOGIN_STATUS:
case actions.FACEBOOK_LOGIN:
return {
...state,
...action.facebook
... |
/*
** ###################################################################
** Processors: MIMXRT1011CAE4A
** MIMXRT1011DAE5A
**
** Compilers: Freescale C/C++ for Embedded ARM
** GNU C Compiler
** IAR ANSI C/C++ Compiler... |
class Solution:
def isMonotonic(self, A):
"""
:type A: List[int]
:rtype: bool
"""
flag = []
for i in range(len(A) - 1):
if A[i + 1] != A[i]:
flag.append(A[i + 1] > A[i])
for i in range(len(flag) - 1):
if flag[i] != flag... |
/*
==============================================================================
This file is part of the JUCE library.
Copyright (c) 2020 - Raw Material Software Limited
JUCE is an open source library subject to commercial or open-source
licensing.
By using JUCE, you agree to the terms of both the... |
# Source: https://github.com/tartley/colorama/blob/master/colorama/ansi.py
# Copyright: Jonathan Hartley 2013. BSD 3-Clause license.
#
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with... |
/*
* 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 <AssetBuilderSDK/AssetBuilderSDK.h>
namespace ... |
# pylint: disable=too-many-instance-attributes
from .awards import AwardsService, NewAward
from .channels import ChannelsService
from .configs import ConfigsService
from .games import GamesService
from .guilds import GuildsService
from .plays import PlaysService
from .users import UsersService
from .verifies import Ve... |
from django.contrib import admin
from .models import Notification,PrivRepNotification
admin.site.register(Notification)
admin.site.register(PrivRepNotification)
|
var searchData=
[
['accuracymeter_57',['accuracyMeter',['../class_genetic.html#a9473a2b82e139d6c746cc329be60b054',1,'Genetic']]]
];
|
import json
import math
from pandas.io.json import json_normalize
import pandas as pd
from src.data.fetch_trend_data_utils import display_max_cols, save_dictionary_to_csv, rename_duplicate_keys
display_max_cols(10)
file = "/home/randilu/fyp_impact analysis module/impact_analysis_module/data/external/events/kelani_vall... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M19 8H5v14h14V8zm-6 12.5h-2V19h2v1.5zm0-2.5h-2c0-1.5-2.5-3-2.5-5 0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5c0 2-2.5 3.5-2.5 5zm5-11.5H6V5h12v1.5zm-1-3H7V2h10v1.5z" />
, 'BatchPredictionSharp');
|
# Copyright 2021 AlQuraishi Laboratory
# Copyright 2021 DeepMind Technologies Limited
#
# 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
#
# U... |
import React from 'react';
import ReactDOM from 'react-dom';
import JqxGrid from '../../../jqwidgets-react/react_jqxgrid.js';
class App extends React.Component {
render() {
let data = new Array();
let firstNames =
[
'Andrew', 'Nancy', 'Shelley', 'Regina', 'Yos... |
/* file : describe-test.js
MIT License
Copyright (c) 2018 Thomas Minier
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, ... |
# testing suite
import unittest
import os
import tempfile
import shutil
from pymei import MeiElement, MeiDocument, MeiAttribute
from pymei import documentToFile, documentFromFile, documentToText
from pymei.exceptions import DocumentRootNotSetException, FileWriteFailureException
class XmlExportTest(unittest.TestCase):... |