text stringlengths 3 1.05M |
|---|
//
// MASService.h
// MASFoundation
//
// Copyright (c) 2016 CA. All rights reserved.
//
// This software may be modified and distributed under the terms
// of the MIT license. See the LICENSE file for details.
//
@import Foundation;
/**
* The enumerated status for the Lifecycle of the micro services.
*/
type... |
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
def swig_im... |
from django.shortcuts import render, HttpResponse
import requests
# Create your views here.
# def ultrasonic(request):
# return render(request, "ultrasonic/ultrasonic.html")
def ultrasonic(request):
# Verifica si hay un parámetro value en la petición GET
if 'value' in request.GET:
value = request.... |
"""
45.把数组排成最小的数.py
时间复杂度:O(n)
空间复杂度:O(n)
"""
# -*- coding:utf-8 -*-
class LargeNumKey(str):
def __lt__(self, other):
return self + other < other + self # 要使”32“< "3"返回True,则"323" < "332"应返回True
class Solution:
def PrintMinNumber(self, numbers):
# write code here
if not numbers:
... |
import gzip
import os
from io import BytesIO
from unittest import mock
import pytest
pd = pytest.importorskip("pandas")
dd = pytest.importorskip("dask.dataframe")
from fsspec.compression import compr
from tlz import partition_all, valmap
import dask
import dask.dataframe as dd
from dask.base import compute_as_if_co... |
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["pages/home/allClass"],{
/***/ 352:
/*!****************************************************************************************!*\
!*** D:/workspace/course/course_miniweixin/main.js?{"page":"pages%2Fhome%2FallClass"} ***!
\*****************************... |
import React from 'react'
import { View, StatusBar } from 'react-native'
import Constants from 'expo-constants'
export default function AppStatusBar ({ backgroundColor, ...props }) {
return (
<View style={{backgroundColor, height: Constants.statusBarHeight }}>
<StatusBar
translucent backgroundColor... |
import json
import os
import re
from unittest import mock
import tempfile
from dev import update_ml_package_versions
class MockResponse:
def __init__(self, body):
self.body = json.dumps(body).encode("utf-8")
def read(self):
return self.body
def __enter__(self):
return self
... |
import Activity from '../activity/Activity';
import {cloneContent} from '../messageHelper';
export default function InclusiveGateway(activityDef, context) {
return new Activity(InclusiveGatewayBehaviour, activityDef, context);
}
export function InclusiveGatewayBehaviour(activity) {
const {id, type, broker} = acti... |
#!/usr/bin/env osascript -l JavaScript
ObjC.import("stdlib");
ObjC.import("Foundation");
const app = Application.currentApplication();
app.includeStandardAdditions = true;
function readFile (path, encoding) {
if (!encoding) encoding = $.NSUTF8StringEncoding;
const fm = $.NSFileManager.defaultManager;
const data = ... |
/* eslint-disable require-jsdoc */
const jwt = require('jsonwebtoken');
const HttpStatus = require('../HttpStatus');
const config = require('../config');
function getTokenFromHeaders(req) {
const token =
req.body.token || req.query.token || req.headers['master-token'];
if (!token) return '';
return to... |
__version__ = "0.1.0"
from mkninja._core import add_target_object, _Project, Target
|
import ujson
EVENT_PRE_TRIP_START = b"liftoff/trip/start/pre"
EVENT_TRIP_START = b"liftoff/trip/start"
EVENT_POST_TRIP_START = b"liftoff/trip/start/post"
EVENT_TRIP_READY = b"liftoff/trip/ready"
EVENT_PRE_TRIP_END = b"liftoff/trip/end/pre"
EVENT_TRIP_END = b"liftoff/trip/end/post"
EVENT_POST_TRIP_END = b"liftoff/post/... |
# Generated by Django 3.2.7 on 2021-11-15 17:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('melodic', '0003_remove_track_author'),
]
operations = [
migrations.AddField(
model_name='commen... |
import logging
import json
import time
import io
from unittest import mock, skip
from django.test import TestCase, TransactionTestCase, tag
from django.urls import reverse
from django.contrib.auth.models import User
from django.conf import settings
from rest_framework import status
from celery.contrib.testing.worker... |
'use strict';
const crypto = require('crypto');
/*!
* 对提交参数一层封装,当POST JSON,并且结果也为JSON时使用 */
exports.postJSON = function (data) {
return {
dataType: 'json',
method: 'POST',
data: JSON.stringify(data),
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
};
}... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_opcua_constants_1 = require("node-opcua-constants");
const node_opcua_nodeid_1 = require("node-opcua-nodeid");
function makeRefId(referenceTypeName) {
const nodeId = node_opcua_nodeid_1.makeNodeId(node_opcua_constants_1.Ref... |
import hpolib.benchmarks.synthetic_functions as hpobench
from febo.environment import ContinuousDomain
from febo.environment.benchmarks import BenchmarkEnvironment
from hpolib.benchmarks import synthetic_functions
import numpy as np
class HpolibBenchmark(BenchmarkEnvironment):
"""
Abstract class to convert H... |
/*!
=========================================================
* Paper Dashboard React - v1.3.0
=========================================================
* Product Page: https://www.creative-tim.com/product/paper-dashboard-react
* Copyright 2021 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https:... |
/**
* VexFlow - Accidental Tests
* Copyright Mohit Muthanna 2010 <mohit@muthanna.com>
*/
Vex.Flow.Test.Bend = {}
Vex.Flow.Test.Bend.Start = function() {
module("Bend");
Vex.Flow.Test.runTest("Double Bends", Vex.Flow.Test.Bend.doubleBends);
Vex.Flow.Test.runRaphaelTest("Double Bends (Raphael)",
Vex.Flow... |
/********************************************************************************
USB Host Audio v1.0 Class Driver Interface Definition
Company:
Microchip Technology Inc.
File Name:
usb_host_audio_v1_0.h
Summary:
USB Host Audio v1_0 Class Driver Interface Header
Description:
This header fi... |
# -*- coding: utf-8 -*-
from notifier import Notifier
from musicmode import *
from brain import Brain
from mpd import MPDClient
import str_formater
from modules.app_utils import *
class Conversation(object):
def __init__(self, mic, profile, logger):
self.persona = profile['persona']
self.mic = mic... |
/* APPLE LOCAL file v7 merge */
/* Test the `veoru8' ARM Neon intrinsic. */
/* This file was autogenerated by neon-testgen. */
/* { dg-do assemble } */
/* { dg-require-effective-target arm_neon_ok } */
/* { dg-options "-save-temps -O0 -mfpu=neon -mfloat-abi=softfp" } */
#include "arm_neon.h"
void test_veoru8 (void... |
import requests
import os
import tkinter.messagebox as tkmsg
import os.path
import sys
import tkinter as tk
from flask_sockets import Sockets
from time import sleep
from flask import Flask, session, redirect, render_template, request, make_response, jsonify
from bs4 import BeautifulSoup
from gevent import pywsgi
from g... |
# Generated by Django 3.0.7 on 2020-08-23 19:03
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('explore', '0023_searchre... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{710:function(t,e,n){"use strict";n.r(e);var o=n(623),c=n(0),r=n(114),l=c.a.extend({data:()=>({contact:r.contact}),methods:{parsePhoneNumberFromString:o.a,openCookiePrefs(){this.$store.commit("cookies/openMessage")}},head:()=>({title:"privacy"})}),h=n(4),componen... |
#!/usr/bin/env python3
# Copyright (c) 2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the behavior of RPC importprivkey on set and unset labels of
addresses.
It tests different cases in wh... |
import React from 'react'
import '../App.css'
export const Footer = () => {
return (
<div>
<section id="lab_social_icon_footer">
{/* <!-- Include Font Awesome Stylesheet in Header --> */}
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.cs... |
from __future__ import absolute_import, unicode_literals
import datetime
import logging
from django.utils.translation import ugettext_lazy as _, ungettext
from debug_toolbar.panels import Panel
from debug_toolbar.utils import ThreadCollector
try:
import threading
except ImportError:
threading = None
MESSAG... |
def f(x):
if x:
return
if x:
return
elif y:
return
if x:
return
else:
return
if x:
return
elif y:
return
else:
return
if x:
return
elif y:
return
elif z:
return
else:
return
... |
import random
from collections import OrderedDict
from datetime import datetime, timedelta
from django.conf import settings
from django.contrib.humanize.templatetags.humanize import naturaltime
from django.template import loader
from django.utils import translation
from django.utils.translation import ugettext, ugett... |
import React from "react"
import useSiteMetadata from "../static_queries/useSiteMetadata"
export default function Header(props) {
const siteMetadata = useSiteMetadata()
return (
<div className="header-container md:invisible md:h-0 lg:invisible lg:h-0">
<h1 className="header-title text-5xl logo-font text... |
from django.db import models
from django.db.models import F, Max, Min, Q
from django.db.transaction import atomic
from django.contrib.contenttypes.models import ContentType
from django.core import signing
from django.dispatch import receiver
from django.urls import reverse
from django.utils.translation import ugettext_... |
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef GrProcessorSet_DEFINED
#define GrProcessorSet_DEFINED
#include "include/private/SkTemplates.h"
#include "src/gpu/GrFragmentProcessor.h"
#include "src/gpu/GrPaint.h"
#... |
from typing import List
from ..shared import *
DEBUG = True
ALLOWED_HOSTS: List[str] = []
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'b=c(untxoz5s!9sudc9u!)b%(w=029(0d2pzodl04m(3x35e=l'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAM... |
#pragma once
#include "MreshEngine/Events/Event.h"
#include "MreshEngine/Core/Input.h"
namespace MreshEngine
{
class MouseMovedEvent : public Event
{
public:
MouseMovedEvent(float x, float y)
: m_MouseX(x), m_MouseY(y) {}
inline float GetX() const { return m_MouseX; }
inline float GetY() const { return m... |
import React from 'react'
import styled, { keyframes } from 'styled-components'
import { H1, MediumText } from '@styles/TextStyles'
import { themes } from '@styles/ColorStyles'
import PurchaseButton from '@components/buttons/PurchaseButton'
import MockupAnimation from '@components/animations/mockupAnimation'
import W... |
# -*- coding: utf-8 -*-
# Copyright 2018-2021 CERN
#
# 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... |
var widgets = require('@jupyter-widgets/base');
var _ = require('underscore');
var L = require('../leaflet.js');
var control = require('./Control.js');
var LeafletControlView = control.LeafletControlView;
var LeafletControlModel = control.LeafletControlModel;
L.Control.WidgetControl = L.Control.extend({
updateLayo... |
export default function isFilesSection(url) {
const u = new URL(url);
return u.pathname.includes("/pull") && u.pathname.includes("/files");
}
|
import axios from 'axios'
export function fetchTweets(params) {
return (dispatch) => {
return axios.get('/api/search', {params: params})
}
}
export function fetchUserTweets(params) {
return (dispatch) => {
return axios.get('/api/search/fetch_user_tweets', {params: params})
}
}
export function fetchUserArticl... |
# Copyright 2019 Zuru Tech HK 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 applicable la... |
import React from 'react';
import renderer from 'react-test-renderer';
import { Provider } from 'react-redux';
import '@testing-library/jest-dom/extend-expect';
import PokemonsContainer from '../components/PokemonsContainer';
import store from '../redux/configureStore';
describe('pokemons container component', () => {... |
"""
Title: GauGAN for conditional image generation
Author: [Soumik Rakshit](https://github.com/soumik12345), [Sayak Paul](https://twitter.com/RisingSayak)
Date created: 2021/12/26
Last modified: 2022/01/03
Description: Implementing a GauGAN for conditional image generation.
"""
"""
## Introduction
In this example, we ... |
// User Registration Profile model
module.exports = function(sequelize, DataTypes) {
const User_Registration_Profile = sequelize.define(
'User_Registration_Profile',
{
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true,
},
activation_key: {
... |
import React from "react"
import { Link } from "gatsby"
import Img from "gatsby-image"
export default function brand({ brand }) {
return (
<div className="col-10 col-sm-8 col-6 col-lg-4 mx-auto my-3">
<div className="card" style={{ minHeight: "100%" }}>
<Link to="/maboutique" className="image-link"... |
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { CommonModule } from "@angular/common";
import { NgModule } from "@angular/core";
import { ScrollObservableService } from "./service";
import { VirtualRowComponent } from "./virtualRow.component";
import { VirtualScrollComponent ... |
"""Provides OSS compatibile macros."""
load("//tools/build_defs:glob_defs.bzl", "subdir_glob")
load("//tools/build_defs/android:fb_xplat_cxx_library.bzl", "fb_xplat_cxx_library")
def profilo_path(dep):
return "//" + dep
def profilo_oss_android_library(**kwargs):
"""Delegates to the native android_library rul... |
#include "check_debug.h"
int copy_from_user(void *dest, void *src, int size){}
struct my_struct {
int x, y;
};
void *pointer;
struct my_struct *dest;
struct my_struct *returns_copy(void)
{
copy_from_user(dest, pointer, sizeof(*dest));
return dest;
}
struct my_struct *a;
void test(void)
{
a = returns_copy();
_... |
#if 0
//
// Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111
//
//
// fxc /nologo /E PS_FtoU_PM_RGBA_2D /T ps_4_0 /Fh
// compiled\multiplyalpha_ftou_pm_rgba_2d_ps.h MultiplyAlpha.hlsl
//
//
// Resource Bindings:
//
// Name Type Format Dim Slot Elemen... |
import random
def runRock(x):
""" Funkcja obsługująca grę w "Kamień, papier, nożyce".
Args:
x (int): Wybór gracza.
Returns:
str: Rezultat gry.
"""
var = int(x)
en = random.randint(1,3)
if var == 1:
mr = "Kamień"
elif var == 2:
mr = "P... |
from django.contrib.gis.geos import GeometryCollection, GEOSGeometry
from django.db import transaction
from rest_framework import serializers
from shapely.geometry import shape
from shapely.wkb import dumps
from .. import models
class RegionSerializer(serializers.BaseSerializer):
def to_internal_value(self, data... |
#!/usr/bin/env python3
import numpy as np
def load_data(latency_fn, features_fn, drop_fn):
latency_file = open(latency_fn)
features_file = open(features_fn)
drop_file = open(drop_fn)
x = []
y_l = []
y_d = []
y_e = []
for latency_line in latency_file.readlines(): #timestamp, latency, ... |
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double Pods_nanoUI_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_nanoUI_ExampleVersionS... |
locais = ["China", "Japão", "India", "Russia"]
print(locais)
print(sorted(locais))
print(locais)
print(sorted(locais, reverse=True))
locais.reverse()
print(locais)
locais.reverse()
print(locais)
locais.sort()
print(locais)
locais.sort(reverse=True)
print(locais)
|
# -*- coding:utf-8 -*-
# PROJECT_NAME : django-laravel-validator
# FILE_NAME :
# AUTHOR : younger shen
class BaseValidatorException(Exception):
pass
class InvalidValidateDataError(BaseValidatorException):
def __init__(self, message=None):
self.message = message if message else 'invalid va... |
import { useRef, useState } from 'react';
import { Link as RouterLink } from 'react-router-dom';
// material
import { Menu, MenuItem, IconButton, ListItemIcon, ListItemText, Backdrop, CircularProgress } from '@mui/material';
// component
import Iconify from '../../../components/Iconify';
import axios from '../../../axi... |
from django.db import migrations
def forwards_func(apps, schema_editor):
SensorType = apps.get_model("api", "SensorType")
db_alias = schema_editor.connection.alias
humidity = SensorType.objects.using(db_alias).get(sensor_type_id="humidity")
humidity.sensor_type_unit = "%"
humidity.save()
def rev... |
#===============================================================================
# @file protocol.py
#
# @brief Handle message protocol parsing.
#
# @author yves-marie.morgan@parrot.com
#
# Copyright (c) 2014 Parrot S.A.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# mod... |
import logging
import tensorflow as tf
from absl import logging as absl_logging
def get_logger():
"""Retrieves tensorflow logger and changes log formatting."""
formatting = "%(asctime)s: %(levelname)s %(filename)s:%(lineno)s] %(message)s"
formatter = logging.Formatter(formatting)
absl_logging.get_absl... |
const square = require("./square");
test ("square of 1 equals 1 * 1 =1", () => {
expect ( square(1)).toBe(1);
})
test ("square of 2 equals 2 *2 = 4", () => {
expect (square(2)).toBe(4);
}) |
import React from 'react';
import { Jumbotron, Container, CardColumns, Card, Button } from 'react-bootstrap';
import { useQuery, useMutation } from '@apollo/client';
import { GET_ME } from '../utils/queries';
import { REMOVE_BOOK } from '../utils/mutations';
import { removeBookId } from '../utils/localStorage';
import ... |
"""Module containing the internal data representation for an install configuration and install module.
"""
|
"""test utils"""
from django.shortcuts import reverse
from django.test import TestCase
from django.test.client import RequestFactory
from pyazo.root.celery import after_task_publish, config_loggers
from pyazo.utils import get_client_ip, get_reverse_dns
class UtilsTest(TestCase):
"""Test utils"""
def setUp(... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Views for CCDC file documetnation pages.
"""
# Django tricks
from django.apps import apps
from django.http import Http404
from django.urls import reverse
from calaccess_website.templatetags.calaccess_website_tags import slugify
# Models
from calaccess_processed.models ... |
var searchData=
[
['emg',['emg',['../structst__meas.html#a3d1b5e40ddbb5e34307f6b8e9cc116ff',1,'st_meas']]],
['emg_5fcalibration_5fflag',['emg_calibration_flag',['../structst__mem.html#a78f0b0c6db2a7118cd15ec0aa38ccdb9',1,'st_mem']]],
['emg_5fmax_5fvalue',['emg_max_value',['../structst__mem.html#aeb71cf2bff2584abb... |
# Python 3.8.3
from math import ceil
def get_input():
with open("input.txt", "r") as f:
lines = f.read().split()
earliest = int(lines[0])
ids = lines[1].split(",")
return earliest, [int(i) for i in ids if i.isnumeric()]
def main():
earliest_time, bus_ids = get_input()
d... |
const express = require('express');
const cluster = require('cluster');
const prom = require('prom-client');
const config = require('./config');
const logger = require('./logger');
const server = express();
const Registry = prom.Registry;
const AggregatorRegistry = prom.AggregatorRegistry;
const aggregatorRegistry = n... |
"""
Unit testing for BOM export functionality
"""
import csv
from django.test import TestCase
from django.urls import reverse
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
class BomExportTest(TestCase):
fixtures = [
'category',
'part',
'loc... |
const btn = document.querySelector("#Speak");
const text = document.querySelector("#userText");
var SpeechRecognition = window.SpeechRecognition || window.webkitSpeechRecognition
function Random(maximum){
Math.floor(Math.random() * maximum);
}
const recognition = new SpeechRecognition();
const greetingCommands =... |
#!/usr/bin/env python3
"""Defines the Review class."""
from models.base_model import Base, BaseModel
from sqlalchemy import Column, ForeignKey, String
from sqlalchemy.orm import relationship
class Review(BaseModel, Base):
"""Represents a review for a MySQL database.
Inherits from SQLAlchemy Base and links to... |
/**
* DevExtreme (esm/ui/form/components/label.js)
* Version: 21.2.5
* Build date: Mon Jan 17 2022
*
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
import _objectWithoutPropertiesLoose from "@babel/run... |
# Copyright 2020 The Magenta 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 ... |
import { Socket } from 'dgram';
export default class InterruptListener extends Socket {
constructor() {
super(...arguments);
}
}
|
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
*... |
# Generated by Django 3.2.9 on 2021-11-19 20:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main_app', '0003_alter_golfgroup_members'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='prof... |
# coding: utf-8
from __future__ import unicode_literals
from core.models import BaseManager, Category, Detail, Subcategory
from . import DETAIL_TYPE
class MaterialTypeManager(BaseManager):
def get_queryset(self):
q = super(MaterialTypeManager, self).get_queryset()
return q.filter(type=DETAIL_TYP... |
/**
* @module ol/format/KML
*/
import Feature from '../Feature.js';
import {extend, includes} from '../array.js';
import {assert} from '../asserts.js';
import {asArray} from '../color.js';
import {transformGeometryWithOptions} from './Feature.js';
import XMLFeature from './XMLFeature.js';
import {readDecimal, readBoo... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var React = _interopRequireWildcard(r... |
# -*- coding: utf-8 -*-
"""
[template]
[Template] classes for Astrodynamic Toolkit
Copyright (c) 2017 - Michael Kessel (mailto: the.rocketredneck@gmail.com)
a.k.a. RocketRedNeck, RocketRedNeck.com, RocketRedNeck.net
RocketRedNeck and MIT Licenses
RocketRedNeck hereby grants license for others to copy and modify t... |
# -*- coding: utf-8 -*-
"""
Unit tests for Aligned Hierarchies, assemble.py
"""
import unittest
import numpy as np
from repytah.assemble import breakup_overlaps_by_intersect
from repytah.assemble import check_overlaps
from repytah.assemble import __compare_and_cut as compare_and_cut
from repytah.assemble import __num... |
# Generated by Django 2.2.13 on 2020-06-06 11:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('front', '0003_auto_20200606_1118'),
]
operations = [
migrations.AddField(
model_name='hotel',
name='title_1',
... |
/**
* @depends StyleableBase.js
*/
////////////////////////////////////////////////////////
////////////////////ShapeBase///////////////////////////
/**
* @class ShapeBase
* @inherits StyleableBase
*
* Abstract base class for drawing vector shape paths.
* This is used by CanvasElements when dra... |
class ConfigMongoose {
constructor() {
this.Model = null;
this.populate = '';
Object.seal(this);
}
}
export default ConfigMongoose; |
"""
Test for the API views.
"""
from django.test import TestCase
from django.test.client import Client
from api.apiconsumer.models import APIConsumer
class NoTokenTest(TestCase):
def setUp(self):
self.client = Client()
def test_no_token_should_403(self):
response = self.client.get('/depts/'... |
import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
@testing.parameterize(*testing.product({
'in_shape': [(3, 4, 2)],
... |
import { POST, GET, DELETE, PUT } from "src/utils/api_calls";
import { ActionType } from "../../actions";
import { toast } from "react-toastify";
export default class CategoryAction {
static GetProviderAllExperiences = (token) => {
return async (dispatch) => {
console.log("get GetProviderAllExpe... |
import { h } from 'vue'
export default {
name: "TextHThreeFill",
vendor: "Ph",
type: "",
tags: ["text","h","three","fill"],
render() {
return h(
"svg",
{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 256 256","class":"v-icon","fill":"currentColor","data-name":"ph-text-h-three-fill","inner... |
# Account Management Providers
#
# Copyright (C) 2013-2014 Red Hat, Inc. 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... |
import sys
import re
import traceback
import os
from opsbro.util import lower_dict
from opsbro.collector import Collector
if os.name == 'nt':
import opsbro.misc.wmi as wmi
class Memory(Collector):
def launch(self):
logger = self.logger
# logger.debug('getMemoryUsage: start')
if os.na... |
import argparse
import base64
import re
import time
import requests
import rsa
class CheckIn(object):
client = requests.Session()
login_url = "https://cloud.189.cn/api/portal/loginUrl.action?" \
"redirectURL=https://cloud.189.cn/web/redirect.html?returnURL=/main.action"
submit_login_url =... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"8jRI":function(r,t,e){"use strict";var n=new RegExp("%[a-f0-9]{2}","gi"),o=new RegExp("(%[a-f0-9]{2})+","gi");function a(r,t){try{return decodeURIComponent(r.join(""))}catch(o){}if(1===r.length)return r;t=t||1;var e=r.slice(0,t),n=r.slice(t);return Array.protot... |
# coding=utf-8
# --------------------------------------------------------------------------
# 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 ... |
import firebase from 'firebase/app';
import 'firebase/firestore';
export default function initDb() {
const config = {
apiKey: process.env.API_KEY,
authDomain: process.env.AUTH_DOMAIN,
databaseURL: process.env.DATABASE_URL,
projectId: process.env.PROJECT_ID,
};
if (!firebase.apps.length) {
fi... |
from model import common
import torch.nn as nn
import torch
url = {
'r16f64x2': 'https://cv.snu.ac.kr/research/EDSR/models/edsr_baseline_x2-1bc95232.pt',
'r16f64x3': 'https://cv.snu.ac.kr/research/EDSR/models/edsr_baseline_x3-abf2a44e.pt',
'r16f64x4': 'https://cv.snu.ac.kr/research/EDSR/models/edsr_baseli... |
// Copyright 2016 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.
#ifndef CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_
#define CONTENT_RENDERER_DOM_STORAGE_LOCAL_STORAGE_NAMESPACE_H_
#include "base/macros.h"
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Script to plot the loss as a function of epoch (Reproduces Figure 2 of the article)
"""
import tensorflow as tf
import argparse
import matplotlib as mpl
import matplotlib.pyplot as plt
mpl.rcParams.update({'font.size': 7})
import fnmatch
import os
import numpy as np
fr... |
"""
This script creates a request.folder_id column which is a foreign
key to the library_folder table. This also adds a 'type' and 'layout' column
to the form_definition table.
"""
from __future__ import print_function
import logging
from sqlalchemy import (
Column,
ForeignKey,
Integer,
MetaData,
... |
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
* / __| | | | |_) | |
* | (__| |_| | _ <| |___
* \___|\... |
from django.contrib import admin
from models import IncomingSMS, OutgoingSMS, IncomingMMS, MMSFile
class IncomingSMSAdmin(admin.ModelAdmin):
list_display = ['sender', 'received_at']
class OutgoingSMSAdmin(admin.ModelAdmin):
list_display = ['recipient', 'message', 'sent_at', 'sent', 'delivery_status']
cla... |