text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
import matplotlib.cm
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .signal_psd import signal_psd
def signal_power(
signal,
frequency_band,
sampling_rate=1000,
continuous=False,
show=False,
normalize=True,
**kwargs,
):
"""Compute th... |
import datetime
import pandas as pd
class Client:
""" This Class input Bank's clients.
Attributes:
client_name (string) represents clients name.
age (int) represents client's age.
balance (float) represents client's initially balance.
cli... |
/**
* Copyright 2019-2020 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 applicabl... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, October 27, 2021 at 3:17:26 PM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/PrivateFrameworks/HomeKit... |
# A GLWidget drawable that draws a set of agents
from OpenGL.GL import *
from ObjSlice import AABB
from primitives import Vector3
class AgentSet:
'''A GLWidget drawable that draws a set of agents.'''
COLORS = ( (0.7, 0.0, 0.0 ), # red
## (0.7, 0.35, 0.0 ), # orange
(0.7, 0.7, 0.0... |
#!/usr/bin/env python
"""Tests for ApiCallRobotRouter."""
from grr.lib import flags
from grr.lib.rdfvalues import file_finder as rdf_file_finder
from grr.server.grr_response_server import access_control
from grr.server.grr_response_server import artifact_utils
from grr.server.grr_response_server import flow
from gr... |
module.exports = {
title: '白银乡成就Fate抽奖系统',
/**
* @type {boolean} true | false
* @description Whether fix the header
*/
fixedHeader: false,
/**
* @type {boolean} true | false
* @description Whether show the logo in sidebar
*/
sidebarLogo: false
}
|
var categoryMgr=(function(config,functions){
function remove(id,pId){
functions.showLoading();
var me=this;
$.ajax({
url:config.ajaxUrls.categoryDelete.replace(":id",id),
type:"post",
data:{
parentId:pId,
id:id
}... |
/* vi:set ts=8 sts=4 sw=4 noet:
*
* VIM - Vi IMproved by Bram Moolenaar
*
* Do ":help uganda" in Vim to read copying and usage conditions.
* Do ":help credits" in Vim to see a list of people who contributed.
* See README.txt for an overview of the Vim source code.
*
* Blowfish encryption for Vim; in Blowfish c... |
###########################################################################
#
# Copyright (c) 2015 Adobe Systems Incorporated. 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 Licens... |
'use strict'
const opentracing = require('opentracing')
const now = require('performance-now')
const Span = opentracing.Span
const SpanContext = require('./span_context')
const metrics = require('../metrics')
const constants = require('../constants')
const id = require('../id')
const tagger = require('../tagger')
con... |
"""
WSGI config for prokaryote project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SE... |
# coding: utf-8
## @package FaBoLCD_PCF8574
# This is a library for the FaBo LCD I2C Brick.
#
# http://fabo.io/212.html
#
# Released under APACHE LICENSE, VERSION 2.0
#
# http://www.apache.org/licenses/
#
# FaBo <info@fabo.io>
import FaBoLCD_PCF8574
import time
import sys
heart=[
0b00000,
0b01010,
0b... |
from setuptools import setup, find_packages
version = '0.1'
setup(
name='duo_auth',
version=version,
description="2 Factor Auth for Django using twilio SMS",
#long_description=open('readme').read(),
keywords='',
author='Preston Holmes',
author_email='preston@ptone.com',
url='',
li... |
import matplotlib.pyplot as plt
import numpy as np
def plot_scree(eigenvals, total_var, ncomp=None, x_label='factor'):
"""
Plot of the ordered eigenvalues and variance explained for the loadings
Parameters
----------
eigenvals : array_like
THe eigenvalues
total_var : float
the... |
export default money => {
return `R$ ${money
.toFixed(2)
.trim()
.replace('.', ',')}`
}
|
import React from 'react';
import PropTypes from 'prop-types';
import Icon from './Icon';
const DashboardOutline = props => (
<g>
<path
{...props}
d="M16,32H5a1,1,0,0,1-1-1V20a1,1,0,0,1,1-1H16a1,1,0,0,1,1,1V31A1,1,0,0,1,16,32ZM6,30h9V21H6Z"
/>
<path
{...props}
d="M16,17H5a1,1,0,0,... |
#ifndef FILESEARCH_H
#define FILESEARCH_H
#include <QDialog>
#include <QDir>
class QComboBox;
class QLabel;
class QPushButton;
class QTableWidget;
class QTableWidgetItem;
class FileSearch : public QDialog
{
Q_OBJECT
public:
FileSearch(QWidget *parent = 0);
~FileSearch();
private slots:
void browse();
void fin... |
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the 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 math
from fairseq import u... |
import React, { useReducer } from 'react';
import { fromBinary } from '../../utils/base64encoder';
import CartContext from './CartContext';
import {
ADD_PRODUCT,
CLEAR_CART,
DECREASE_QUANTITY,
INCREASE_QUANTITY,
LOAD_PRODUCTS,
REMOVE_PRODUCT,
SHOW_CART
} from './actionTypes';
import { cartReducer } from '... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 28, 2021 at 9:09:34 PM Mountain Standard Time
* Operating System: Version 14.5 (Build 18L204)
* Image Source: /System/Library/PrivateFrameworks/PhotoAnaly... |
###################################################
#
# (c) 2016, Alberto Riva, ariva@ufl.edu
# DiBiG, ICBR Bioinformatics, University of Florida
#
# See the LICENSE file for license information.
###################################################
# A class to generate a slider for multiple images.
# Two subclasses ar... |
# encoding: utf8
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
... |
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
root: true,
env: {
node: true,
jest:... |
export {default} from './shopping_basket' |
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 17 10:46:33 2021
@author: qizhe
"""
class Solution:
def countMaxOrSubsets(self, nums) -> int:
"""
感觉按位或的最大值就是所有元素或起来的最大值呢
集合自身一定满足这个条件
暴力搜索试试
"""
aim = 0
for i in nums:
aim |=i
d... |
"""
DB CONNECTION MANAGER UTILITY.
Utilities for managing connections to db.
"""
from sqlite3 import connect
# from .path_manager import db_paths as paths
def connection_preset(db_con):
"""
Preset the connection by disabling rollback journal, setting the locking mode to exclusive,
disabling syn... |
// @flow
import P from 'parsimmon'
import IdentifierParser from './identifier'
import type { VariableNodeType } from '../types'
export default P.string('$')
.then(IdentifierParser.atMost(1))
.map((value: Array<{value: string}>): VariableNodeType => ({
name: 'variable',
value: value && value.length ? `$${... |
import EmberRouter from "@ember/routing/router"
import config from "./config/environment"
const Router = EmberRouter.extend({
location: config.locationType,
rootURL: config.rootURL
})
Router.map(function() {
this.route("word", { path: "word/:word" })
})
export default Router
|
# http://oregonarc.com/2011/02/command-line-tile-cutter-for-google-maps-improved/
# http://media.oregonarc.com/fish/tile.py
import math
def latlon2px(z,lat,lon):
x = 2**z*(float(lon)+180)/360*256
y = -(.5*math.log((1+math.sin(math.radians(float(lat))))/(1-math.sin(math.radians(float(lat)))))/math.pi-1)*256*2*... |
class Solution:
def maxPower(self, s: str) -> int:
prev = ""
max_cnt, cnt = 1, 0
for letter in s:
if letter == prev:
cnt += 1
max_cnt = max(max_cnt, cnt)
else:
cnt = 1
prev = letter
return max_cnt |
// pages/components/view/pages/steps/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面... |
import React from "react";
import { Text, View } from "react-native";
export default class Tab extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<View>
<Text>Company tab</Text>
<Text>Under development</Text>
... |
//
// Created by zhangrongxiang on 2018/3/15 11:18
// File 4
//
/*
编写strcpy函数(10分)
已知strcpy函数的原型是
char *strcpy(char *strDest, const char *strSrc);
其中strDest是目的字符串,strSrc是源字符串。
(1)不调用C++/C的字符串库函数,请编写函数 strcpy
(2)strcpy能把strSrc的内容复制到strDest,为什么还要char * 类型的返回值?
答:为了 实现链式表达式。 // 2分
例如 ... |
from struct import *
class WebSocketMessage:
""" Generates a binary web socket message.
Attributes:
message (bytearray): the message data.
type_header (int): a binary int, 0b10 if the message is binary or 0b1 if the message is text.
"""
__MAX_CHUNK_PAYLOAD_LENGTH = 2 ** 64 - 1
de... |
import React from 'react';
/**
* Site footer component
*/
const Footer = () => (
<footer>
<p>
© 2020 Prismic CMS + React App
</p>
</footer>
);
export default Footer;
|
"""
Transform SQLAlchemy Models to PFB Schema
"""
import os
import logging
import inspect
import subprocess
from collections import defaultdict
import timeit
from pprint import pformat
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.inspection import inspect as sqla_inspect
from sqlalchemy.orm.properti... |
/* file: spatial_pooling2d_layer_backward_kernel.h */
/*******************************************************************************
* Copyright 2014-2017 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 ... |
"""
Copyright, the CVXPY 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 writing, software
... |
'use strict';
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('weets', {
id: {
type: Sequelize.INTEGER,
primaryKey: true,
autoIncrement: true,
allowNull: false,
unique: true
},
content: {
type: Sequel... |
from filecmp import cmp
from nose.tools import with_setup
from os import makedirs
from os.path import dirname
from os.path import exists
from os.path import join
from shutil import rmtree
from anytree import Node
from anytree.exporter import DotExporter
TESTPATH = dirname(__file__)
GENPATH = join(TESTPATH, "dotexport... |
import graphene
from lingvodoc.schema.gql_holders import (
LingvodocObjectType,
CompositeIdHolder,
AdditionalMetadata,
CreatedAt,
MarkedForDeletion,
Relationship,
MovedTo,
fetch_object,
client_id_check,
del_object,
acl_check_by_id,
ResponseError,
LingvodocID,
Obj... |
"""
The ``mlflow.keras`` module provides an API for logging and loading Keras models. This module
exports Keras models with the following flavors:
Keras (native) format
This is the main flavor that can be loaded back into Keras.
:py:mod:`mlflow.pyfunc`
Produced for use by generic pyfunc-based deployment tools ... |
import requests
import json
from flask import request, Response, stream_with_context, current_app as app, jsonify
from flask_restplus import Resource, Namespace
from flask_jwt_extended import jwt_required, get_jwt_claims
api = Namespace('services', description='services')
batch_server = 'http://batch:5010/api'
datas... |
import argparse
import re
def process_qasm(fname):
qgates = ['H','X','CNOT','Y','Z','S','T','Tdag','Sdag','Rz','PrepX','PrepZ','MeasX','MeasZ','Toffoli','Fredkin']
qgates_1 = ['H','X','Y','Z','S','T','Tdag']
qgates_1a = ['Sdag']
qgates_2 = ['CNOT']
qgates_3 = ['Toffoli','Fredkin']
qga... |
import axios from 'axios'
/**
* ACTION TYPES
*/
const GET_ALL_USERS = 'GET_ALL_USERS'
const DELETE_USER = 'DELETE_USER'
const PROMOTE_USER = 'PROMOTE_USER'
/**
* INITIAL STATE
*/
const allUsers = []
/**
* ACTION CREATORS
*/
const getAllUsers = users => ({type: GET_ALL_USERS, users})
const deleteUser = id => ({... |
#!/usr/bin/env python
#Controlling the properties of axis text using handles
# See examples/text_themes.py for a more elegant, pythonic way to control
# fonts. After all, if we were slaves to MATLAB , we wouldn't be
# using python!
from pylab import *
def f(t):
s1 = sin(2*pi*t)
e1 = exp(-t)
return mult... |
"""
Django settings for profiles_project project.
Generated by 'django-admin startproject' using Django 2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
impor... |
# Load in model weights and evaluate its goodness (ECE, MCE, error) also saves logits
import numpy as np
import collections
import pickle
from resnet_sd import resnet_sd_model
from sklearn.model_selection import train_test_split
from keras.models import Model
from keras.optimizers import SGD
from keras.datasets impor... |
import _ from 'lodash';
import {GET_USER_LIST} from '../actionTypes';
import initialState from '../initialState';
export default (state = initialState.users, action) => {
switch (action.type) {
case GET_USER_LIST:
return _.mapKeys(action.payload, 'id');
default:
return state;
}
};
|
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the prioritisetransaction mining RPC."""
from test_framework.test_framework import BitcoinTestFra... |
/*
* This header is generated by classdump-dyld 1.0
* on Wednesday, March 22, 2017 at 9:06:51 AM Mountain Standard Time
* Operating System: Version 10.1 (Build 14U593)
* Image Source: /System/Library/PrivateFrameworks/UIAccessibility.framework/UIAccessibility
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2... |
// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
env: cloud.DYNAMIC_CURRENT_ENV
})
const db = cloud.database()
// 云函数入口函数
exports.main = async (event, context) => {
return await db.collection(event.collectionName).where({
Status: 1
}).count()
} |
export default {
uniqueText(length) {
var randomChars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
var result = "";
for (var i = 0; i < length; i++) {
result += randomChars.charAt(
Math.floor(Math.random() * randomChars.length)
... |
const axios = require('axios');
const remote = {
address: process.env.REACT_APP_API_URL
}
const getRequests = (api) => {
let token = localStorage.getItem('token')
const apiUrl = remote.address + api
let promise = new Promise((resolve, reject) => {
axios.get(apiUrl, { headers: { "Authorization": `${token}`... |
#
# Copyright 2018 Analytics Zoo 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... |
"""
Constructs a new python project.
Based on user input this module constructs a new directory structure
including all files and folders required to start development of a new
python project. It has been built to overcome the ongoing obstacle of
starting a new python project. It takes too long to setup boilerplate
... |
//*****************************************************************************
//
// usbdmsc.h - USB mass storage device class driver.
//
// Copyright (c) 2009-2020 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solel... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "leprikon.site.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... |
from decouple import config
from flask import Flask, render_template, request
from .models import Name, DB
def create_app():
app = Flask (__name__)
#config to database
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite:///db.sqlite3"
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///baby_names_database... |
import unittest
from django.urls import reverse
import ftc.tests
from findthatcharity.utils import list_to_string, to_titlecase
class TestUtils(unittest.TestCase):
def test_to_titlecase(self):
names = (
("THE CHARITY THE NAME", "The Charity the Name"),
("CHARITY UK LT... |
import os
import unittest
import networkx as nx
import time
import random
import string
import json
from graphene import graphgen
node_mapper_filename = './node_mapper.json'
clique_mapper_filename = './clique_mapper.json'
def randomString(stringLength = 10):
"""Generate a random string with the combination of l... |
# Copyright 1997 - 2018 by IXIA Keysight
#
# 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, p... |
require('../start/bootstrap');
module.exports = {
/*
|--------------------------------------------------------------------------
| Dialect
|--------------------------------------------------------------------------
|
| Dialect is the bank that will connect to your application when the
| default is postgr... |
import numpy as np
import audioread
import scipy.io.wavfile
class Signal(object):
"""
Class to represent signals as a python object
"""
name = 'signal'
filePath = '.'
sampleRate = 0
length = 0
values = np.array([])
start = 0 # start marker for analysis
stop = 0 ... |
r"""
``cotk.metrics`` provides classes and functions evaluating results of models. It provides
a fair metric for every model.
"""
import random
import multiprocessing
from multiprocessing import Pool
import numpy as np
from nltk.translate.bleu_score import corpus_bleu, sentence_bleu, SmoothingFunction
from .._utils.un... |
import { hexToRgb, whiteColor } from '../../material-dashboard-react.js';
const customTabsStyle = {
cardTitle: {
float: 'left',
padding: '10px 10px 10px 0px',
lineHeight: '24px'
},
cardTitleRTL: {
float: 'right',
padding: '10px 0px 10px 10px !important'
},
displayNone: {
display: 'non... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* o... |
/**
* Copyright JS Foundation and other contributors, http://js.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 r... |
module.exports = {
name: "пустое-сообщение",
description: "Буквально отправляет пустое сообщение.",
category: "fun",
run: async (bot, message, args) => {
message.channel.send("** **")
}
} |
// SPDX-License-Identifier: GPL-2.0-only
/*
* MMC35240 - MEMSIC 3-axis Magnetic Sensor
*
* Copyright (c) 2015, Intel Corporation.
*
* IIO driver for MMC35240 (7-bit I2C slave address 0x30).
*
* TODO: offset, ACPI, continuous measurement mode, PM
*/
#include <linux/module.h>
#include <linux/init.h>
#include <li... |
import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
// creates a beautiful scrollbar
import PerfectScrollbar from 'perfect-scrollbar';
import 'perfect-scrollbar/css/perfect-scrollbar.css';
// @material-ui/core components
import { makeStyles } from '@material-ui/core/styles';
// core c... |
# -*- coding: utf-8 -*-
import numpy as np
import pandas as pd
import json, re
from sys import stdout
# Visit data
visit_drepano = pd.read_csv("../before_03_07_2017/data_init/CVO_stay.csv")
visit_drepano_init = visit_drepano.copy()
print("Visit data:")
print(visit_drepano.shape)
print(visit_drepano.head(... |
#environemnt information
from dotenv import load_dotenv
load_dotenv()
import requests
import time
import json
import os
time.sleep(15)
eia_doc = str(requests.get("http://ir.eia.gov/ngs/wngsr.json").content) # makes request for EIA json
eia_str = eia_doc[eia_doc.find("{"):-1] # splices the string-request by the first... |
const Reasons = require('./reasons-model.js');
const Users = require('./users-model.js');
const db = require('../data/dbConfig.js');
describe('reasons model', () => {
describe('add', () => {
it('should add the reason into the db', async () => {
await Users.add({
email: 'hello@email.com',
pa... |
#!/usr/bin/env python3
import genben
if __name__ == "__main__":
genben.main()
|
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
raise Runtime... |
# cython: language_level=3
# Copyright (c) 2014-2018, Dr Alex Meakins, Raysect Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the ab... |
// Copyright 2019 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 {relativeTime} from
'elements/chops/chops-timestamp/chops-timestamp-helpers.js';
import {labelRefsToStrings, issueRefsToStrings, componentRefsToS... |
(function(){var Stream = require('stream')
module.exports = MuteStream
// var out = new MuteStream(process.stdout)
// argument auto-pipes
function MuteStream (opts) {
Stream.apply(this)
opts = opts || {}
this.writable = this.readable = true
this.muted = false
this.on('pipe', this._onpipe)
this.replace = o... |
#
# PySNMP MIB module Dlink-IMPB-FEATURES (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Dlink-IMPB-FEATURES
# Produced by pysmi-0.3.4 at Wed May 1 12:58:15 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default... |
import re
p = re.compile('a[e]c')
m = p.match('adec')
print(m.group()) |
import webpack from 'webpack'
import HtmlWebpackPlugin from 'html-webpack-plugin'
import ExtractTextPlugin from 'extract-text-webpack-plugin'
import autoprefixer from 'autoprefixer'
import path from 'path'
import CopyWebpackPlugin from 'copy-webpack-plugin'
export default {
devtool: 'eval-source-map',
resolve: ... |
import Ember from 'ember';
export default Ember.Component.extend({
// -------------------------------------------------------------------------
// Dependencies
/**
* @property {ClassActivityService}
*/
classActivityService: Ember.inject.service('api-sdk/class-activity'),
/**
* @property {classServ... |
# To make python 2 and python 3 compatible code
from __future__ import absolute_import
from threading import Thread
import sys
if sys.version_info[0] < 3: # e.g python version <3
import cv2
else:
import cv2
from cv2 import cv2
# pylint: disable=E1101
# pylint: disable=E0401
# Disabling linting that is not... |
//Default SDP imports
import Context from '../../../context.js';
import { getSelectedLayers, createGrid, selectLayers } from '../../../library/layers'
import { populateLayers } from '../../../library/populator';
import Options, * as OPTIONS from '../../../library/options';
//Twitch imports
import { TWITCH_POPULATE_TYP... |
(function() {
var $filter, ArrayDescriptor, Descriptor, EnumFilter, InputError, InputFilter, _, filters, runFilter, runImpl,
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent... |
"""Provides the hardware abstraction layer"""
from time import sleep
import time
import numpy as np
import pystorm
from pystorm.PyDriver import bddriver as bd
from pystorm.hal.neuromorph.core import Core
from pystorm.hal.neuromorph.core_pars import CORE_PARAMETERS
from pystorm.hal.cal_db import CalibrationDB
import lo... |
# covid19.py
# Módulo para cargar y limpiar datos del COVID-19 desde los ficheros PDF del Ministerio de Sanidad
# nelson.lopez@dataxbi.com
import datetime
import tabula
import pandas as pd
import re
from azure.storage.blob import BlobServiceClient
import secrets
# fecha del primer fichero PDF
pdf_file_first_date = d... |
# Copyright 2013-2022 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.package import *
class PyH2(PythonPackage):
"""HTTP/2 State-Machine based protocol implementation"""
... |
#!/usr/bin/env python
# Copyright 2014-2018 The PySCF Developers. 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
#
# U... |
/**
* Created by victor on 28-11-2015.
*/
placeApp.controller('postPlaceListController', function($scope) {
$scope.substateHello = 'Hola desde postPlaceListController.';
}); |
/**
* Extracts (key, value) pairs from a plain object.
*/
export function * extract (obj) {
for (const key in obj) {
if (obj.hasOwnProperty(key)) {
yield [key, obj[key]]
}
}
}
|
/*
* Copyright (C) 2007-2021 S[&]T, The Netherlands.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this... |
real = float(input('Quanto dinheiro você tem na carteira? R$'))
dolar = real / 5.57
print('Com R${:.2f} você pode comprar US${:.2f}'.format(real, dolar))
|
#!/usr/bin/env python3
# Copyright (c) 2013-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.
import biplist
from ds_store import DSStore
from mac_alias import Alias
import sys
output_file = sys.argv... |
tinyMCE.addI18n('gl.advanced_dlg',{"link_list":"Lista de hiperv\u00ednculos","link_is_external":"A URL introducida semella ser un v\u00ednculo externo, \u00bfDesexa engadi-lo prefixo necesario http://?","link_is_email":"A URL introducida semella ser un enderezo de e-mail, \u00bfDesexa engadi-lo prefixo necesario mailto... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from typing import List, NamedTuple, Optional, Sequence, Tuple
from pytext.config.component import Component, ComponentType
from pytext.config.field_config import FeatureConfig
class InputRecord(NamedTuple):
"""Input da... |
{
"name": "scene.js",
"url": "https://github.com/olav/scene.js.git"
}
|