text stringlengths 3 1.05M |
|---|
(function() {var implementors = {};
implementors["elrond"] = [];
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
|
import mongoose from "mongoose";
require("dotenv").config();
export default async (req, res) => {
let uri = process.env.DB;
var connect = "offline";
await mongoose
.connect(uri, {
dbName: "lenk-cf",
useNewUrlParser: true,
useUnifiedTopology: true,
useCreateIndex: true,
})
.then... |
import matplotlib as mpl
import numpy as np
mpl.use('Agg')
import matplotlib.pyplot as plt
class Graficos():
def CriarGraficoBarras(self, z,Graficoname):
y_axis = z
x_axis = range(len(y_axis))
width_n = 0.4
bar_color = 'blue'
plt.bar(x_axis, y_axis, width=width_n, color=bar... |
window._ = require('lodash');
try {
window.$ = window.jQuery = require('jquery');
require('bootstrap')
} catch (e) {}
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; |
import pymongo
con = pymongo.MongoClient("mongodb://localhost:27111")
bigcollection = con['test']['bigcollection']
while True:
print "Inserting"
for i in range(1000):
bigcollection.insert_one({ "a": "bbbbbbbbbbbbbbbbbbbb", "b": "CCCCCCCCCCCCCCCCCC"})
print "Removing"
res = bigcollection.delete_... |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
from __future__ import print_function
import numpy as np
import cntk as C
... |
import math
from .base_page import BasePage
from .locators import ProductPageLocators
from selenium.common.exceptions import NoAlertPresentException
class ProductPage(BasePage):
def should_be_product_page(self):
self.should_be_promo_url()
self.should_be_basket_form()
self.should_be_add_but... |
#ifndef _PIC_H_INCLUDED
# define _PIC_H_INCLUDED
//8259 Programmable Interrupt Controller handling
#include <stdint.h>
// Devices connected to the PICs. May be useful
// when enabling and disabling irq's
// The following devices use PIC 1 to generate interrupts
#define I86_PIC_IRQ_TIMER 0
#define I86_PIC_IRQ_KE... |
from agents.TD3 import TD3
from agents.TD3_vary import TD3_vary
from agents.PPO import PPO
from agents.DDQN import DDQN
from agents.DDQN_vary import DDQN_vary
from agents.DuelingDDQN import DuelingDDQN
from agents.DuelingDDQN_vary import DuelingDDQN_vary
from agents.TD3_discrete_vary import TD3_discrete_vary
from agent... |
#!/usr/bin/env python
# encoding: utf-8
from werkzeug.security import generate_password_hash, check_password_hash
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from flask import current_app
from flask_redis import FlaskRedis
db = FlaskRedis()
class User(object):
"""represents a user of ... |
from typing import Optional
from . import BasicType
class InputMessageContent(BasicType):
def __init__(self, obj=None):
super(InputMessageContent, self).__init__(obj)
class InputTextMessageContent(InputMessageContent):
fields = {
'message_text': str,
'parse_mode': str,
'disa... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2016, Martin Guenther
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistrib... |
/*-------------------------------------------------------------------------
*
* system.c
* support routines for SYSTEM tablesample method
*
* To ensure repeatability of samples, it is necessary that selection of a
* given tuple be history-independent; otherwise syncscanning would break
* repeatability, to say ... |
# Generated by Django 3.0.8 on 2020-09-29 17:50
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('auctions', '0020_auto_20200929_1745'),
]
operations = [
migrations.RenameField(
model_name='watchlist',
old_name='lists',
... |
import React from 'react';
import SVG from './SVG';
export default props => (
<SVG viewBox="0 0 1000 1000" fill="black" {...props}>
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g>
<path d="M990,503.4c0,25.9-21,46.9-46.9,46.9H56.9c-25.9,0-46.9-21-46.9-46.9v-4.6c0-25.9,21... |
__author__ = 'aymgal'
from lensmodelapi.api.fits_file import PixelFitsFile
from lensmodelapi.api.base import APIBaseObject
class Noise(APIBaseObject):
"""
Generic class for characterizing the noise of an Observation
All supported noise types correspond to the classes below
"""
def __init__(self,... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, June 1, 2019 at 6:44:22 PM Mountain Standard Time
* Operating System: Version 12.1.1 (Build 16C5050a)
* Image Source: /System/Library/PrivateFrameworks/SAObjects.framework/SAObjects
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elia... |
import 'isomorphic-fetch';
import { get, post, remove } from 'utils/request';
export default class ToolsService {
constructor(options = {}) {
this.opts = options;
}
// GET ALL DATA
fetchAllData() {
return new Promise((resolve, reject) => {
get({
url: `${process.env.API_URL}/tools/?publi... |
const { CompartmentDefinitionResourceSchema } = require('./allSchemaHeaders.js');
const { CompartmentTypeSchema } = require('./allSchemaHeaders.js');
const { ContactDetailSchema } = require('./allSchemaHeaders.js');
const { DomainResourceSchema } = require('./DomainResource');
const { PrimitiveBooleanSchema } = require... |
function qName(source, getQualified) {
var arr;
var qualified;
if (typeof source == "string") {
qualified = source;
} else if (typeof source == "object" && typeof source.qualified == "string") {
qualified = source.qualified;
}
if (!getQualified && (typeof qualified == "string" &... |
'use strict';
// Simple string signatures
exports.hook_data = function (next, connection) {
// enable mail body parsing
connection.transaction.parse_body = true;
next();
}
exports.hook_data_post = function (next, connection) {
const sigs = this.config.get('data.signatures', 'list');
if (check_sig... |
(function () {
window.QuillFunctions = {
createQuill: function (
dotnet, quillElement, toolBar, readOnly,
placeholder, theme, debugLevel, onContentChanged) {
Quill.register('modules/blotFormatter', QuillBlotFormatter.default);
Quill.register("modul... |
module.exports = {
...require("./jest-common"),
displayName: "server",
testEnvironment: "jest-environment-node",
testMatch: [
"**/(etc|lib)/**/__tests__/*.test.(ts|tsx|js|jsx)",
"!**/lib/__tests__/gtm.test.ts",
],
};
|
const STABLE = new Set([
'claimsParameter',
'clientCredentials',
'deviceFlow',
'devInteractions',
'encryption',
'introspection',
'jwtUserinfo',
'mTLS',
'registration',
'registrationManagement',
'requestObjects',
'revocation',
'ropCredentials',
'userinfo',
]);
const DRAFTS = new Map(Object.e... |
# 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... |
#include<stdio.h>
#include<stdlib.h>
#include<windows.h>
int i,j;
int main_exit;
void menu();
struct date
{
int month,day,year;
};
struct
{
char name[60];
int acc_no,age;
char address[60];
char citizenship[15];
double phone;
char acc_type[10];
float amt;
struct date dob;
s... |
"""Auto-generated file, do not edit by hand. 255 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_255 = [NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{4})', format='\\1 \\2 \\3', leading_digits_pattern=['[67]']), NumberFormat(pattern='(\\d{2})(\\d{4})(\\d{3})', format='\\1 \\2 \\3', leading_digits_pa... |
/*
* Kendo UI v2015.1.318 (http://www.telerik.com/kendo-ui)
* Copyright 2015 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial licen... |
const socket = io();
let MONEDA = "S/.";
let ENVIO = 0;
let USER = null;
let PRODUCTO = null;
let NCHECK = 0;
let FILTROS = [{ "nombre": "Ofertas Exclusivas", "option": [{ "name": "Cupon ahorro" }, { "name": "Mas kilos gratis" }, { "name": "Mejor precio" }, { "name": "Top ventas" }, { "name": "Novedades" }] }, ... |
var load = {
preload: function() {
game.load.image('road', 'assets/longroad.jpg');
game.load.image('playercar', 'assets/newcar.png');
game.load.image('whitecar', 'assets/shucar3.png');
game.load.image('bluecar', 'assets/redcar.png');
game.load.image('redcar', 'assets/bluecar.png');
game.load.i... |
#ifndef __GPU_HEADER__
#define __GPU_HEADER__
#include <stdio.h>
#include "matrix.h"
#include "options.h"
#define HANDLE_ERROR( err ) (HandleError( err, __FILE__, __LINE__ ))
void HandleError(cudaError_t err, const char *file, int line);
class Gpu {
cudaEvent_t start, stop;
int myId;
void printInfoDevice(i... |
"""Inky e-Ink Display Drivers."""
from . import inky # noqa: F401
from .phat import InkyPHAT # noqa: F401
from .what import InkyWHAT # noqa: F401
from .mock import InkyMockPHAT, InkyMockWHAT # noqa: F401
__version__ = '0.0.5.1+pipuck2'
try:
from pkg_resources import declare_namespace
declare_namespace(_... |
module.exports = (function(document) {
'use strict';
document.body.innerHTML = 'hello world';
})(this.document);
|
/*
* Copyright © 2021 Amazon.com, Inc. or its affiliates.
* 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
... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Provider } from 'react-redux';
import 'normalize.css';
import App from './components/App';
import './i18n';
import configureStore from './redux/store';
async function init() {
const store = await configureStore();
ReactDOM.render(
<Provider... |
/**
* takes a score and a number of questions
* renders the score to a DIV
* @param {number} score
* @param {number} numberOfQuestions
* @returns {HTMLDivElement}
*/
function scoreRender(score, numberOfQuestions) {
// calculate the amount of question percent answered by the user
const scorePerCent = Math.roun... |
"""Handles all the entities objects (structs) of the anonymizer."""
from .invalid_exception import InvalidParamException
from .engine.pii_entity import PIIEntity
from .engine.operator_config import OperatorConfig
from .engine.recognizer_result import RecognizerResult
from .engine.result.engine_result import EngineResul... |
# -*- coding: utf-8 -*-
#
# dfss documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a de... |
// This file is part of the Orbbec Astra SDK [https://orbbec3d.com]
// Copyright (c) 2015-2017 Orbbec 3D
//
// 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/licens... |
var assert = require('assert');
var R = require('..');
var eq = require('./shared/eq');
describe('test', function() {
it('returns true if string matches pattern', function() {
eq(R.test(/^x/, 'xyz'), true);
});
it('returns false if string does not match pattern', function() {
eq(R.test(/^y/, 'xyz'), ... |
module.exports = {
"0.20.0": "39.0.2171.65",
"0.20.1": "39.0.2171.65",
"0.20.2": "39.0.2171.65",
"0.20.3": "39.0.2171.65",
"0.20.4": "39.0.2171.65",
"0.20.5": "39.0.2171.65",
"0.20.6": "39.0.2171.65",
"0.20.7": "39.0.2171.65",
"0.20.8": "39.0.2171.65",
"0.21.0": "40.0.2214.91",
"0.21.1": "40.0.2214.91",
"0.... |
!function(e){function t(t){for(var r,o,u=t[0],s=t[1],i=t[2],l=0,p=[];l<u.length;l++)o=u[l],a[o]&&p.push(a[o][0]),a[o]=0;for(r in s)Object.prototype.hasOwnProperty.call(s,r)&&(e[r]=s[r]);for(f&&f(t);p.length;)p.shift()();return c.push.apply(c,i||[]),n()}function n(){for(var e,t=0;t<c.length;t++){for(var n=c[t],r=!0,o=1;... |
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#pragma once
#include "td/telegram/DialogId.h"
#include "td/... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... |
# -*- coding: utf-8 -*-
# Copyright (c) 2021, just back and Contributors
# See license.txt
from __future__ import unicode_literals
# import frappe
import unittest
class TestResort(unittest.TestCase):
pass
|
# Copyright 2013 Red Hat, 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 agre... |
import json
import itertools
import pandas as pd
from datetime import datetime
from traceback import print_exc
from pyramid import threadlocal
from sqlalchemy import select, and_, insert
from sqlalchemy.exc import IntegrityError
from ecoreleve_server.core import dbConfig
from ..stations.station_model import Station
fr... |
import React, { PropTypes } from 'react';
import injectSheet from 'react-jss';
import Button from 'react-mdl/lib/Button';
import { breakpoints } from 'modules/common/styles';
import Address from './address';
const Addresses = ({ user: { addresses }, openDialog, createAddress, updateAddress, setDefaultAddress, onAddres... |
import React from "react";
import { screen, userEvent } from "@storybook/testing-library";
import { Title, ArgsTable } from "@storybook/addon-docs";
import { action } from "@storybook/addon-actions";
import { Search } from "../../components/search";
import { responses } from "./responses";
export default {
title: "M... |
// File generated from our OpenAPI spec
'use strict';
const StripeResource = require('../StripeResource');
const stripeMethod = StripeResource.method;
module.exports = StripeResource.extend({
path: 'coupons',
create: stripeMethod({
method: 'POST',
path: '',
}),
retrieve: stripeMethod({
method: ... |
/**
* Clean-css - https://github.com/GoalSmashers/clean-css
* Released under the terms of MIT license
*
* Copyright (C) 2011-2013 GoalSmashers.com
*/
var fs = require('fs');
var path = require('path');
var existsSync = fs.existsSync || path.existsSync;
var CleanCSS = {
colors: {
toHex: {
aqua: '#0ff'... |
import Grid from './grid';
import moment from 'moment';
import Pusher from '../mixins/pusher';
export default {
template: `
<grid :position="grid">
<section :class="online? 'up': 'down' | modify-class 'internet-connection' ">
<div class="internet-connection__icon">
... |
import ptrading
import datetime
def test_config_init():
time_unit = ptrading.utils.TimeUnit.ONE_MINUTE
tickers = ["AAPL", "MSFT"]
pre_market = False
start_date = datetime.datetime(2020, 3, 18)
end_date = datetime.datetime(2020, 4, 20)
config = ptrading.config.Config(tickers, pre_market, time_unit, start_date, e... |
/*
* Copyright (c) 2018, Sensirion AG
* All rights reserved.
*
* Redistribution and use 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
* list of conditio... |
import match from './match';
import league from './league';
import favorite from './favorite';
const fetchData = (page) => {
switch (page) {
case "match":
match();
break;
case "league":
league();
break;
case "favorite":
favorite();... |
import { createAction, createReducer } from 'redux-act';
const POST_FIX = `HOME/`;
const getHomePageAct = createAction(`${POST_FIX}GET_HOME_PAGE`);
export const getHomePage = () => dispatch => {
dispatch(getHomePageAct({ test: "CCCC" }));
}
const initialState = {
data: {},
ui: {}
};
export default createRedu... |
from tastypie.resources import ModelResource
from tastypie.authorization import Authorization
from tastypie.authentication import Authentication
from app.models import LocationModel
class LocationResource(ModelResource):
class Meta:
queryset = LocationModel.objects.all()
resource_name = 'location'... |
import json
import logging
with open('eth_settings.json') as f:
config = json.load(f)
blockchain = config['blockchain']
blockchain_type = blockchain['type']
contract_owner = blockchain['contract_owner']
private_key = blockchain['private_key']
contract_owner_hex = blockchain['contract_owner_hex']
contract_address... |
var ObjectId = require('mongodb').ObjectId;
/**
*
* @typedef {Object} UpdateSigned
* @property {Date} updateDate - the initial date of the shipping
* @property {String} lastUpdateHash - one of the steps in your new habit
* @property {transactionDescriptor} shippmentUpdateDescriptor - description of the update... |
var maxBsonObjectSize = db.isMaster().maxBsonObjectSize;
var docOverhead = Object.bsonsize({_id: new ObjectId(), x: ''});
var maxStrSize = maxBsonObjectSize - docOverhead;
var maxStr = 'a'.repeat(maxStrSize);
var coll = db.max_doc_size;
coll.drop();
var res = db.runCommand({insert: coll.getName(), documents: [{_id: ne... |
//// [superCalls.ts]
class Base {
x = 43;
constructor(n: string) {
}
}
function v(): void { }
class Derived extends Base {
//super call in class constructor of derived type
constructor(public q: number) {
super('');
//type of super call expression is void
var p = super('')... |
import enchant from '../enchantjs/enchant';
import { fetchDataURL } from './feeles';
import game from './game';
import { getHack } from './get-hack';
import { errorInEvent } from './stdlog';
/*
function blobToDataURL(blob, callback) {
var a = new FileReader();
a.onload = function(e) { callback(e.target.result); }
a... |
tot18 = toth = totm20 = 0
while True:
idade = int(input('Idade: '))
sexo = ' '
while sexo not in 'MF':
sexo = str(input('Sexo: [M/F]')).strip().upper()[0]
if idade >= 18:
tot18 += 1
if sexo == 'M':
toth += 1
if sexo == 'F' and idade < 20:
totm20 += 1
resp = ' ... |
#!/usr/bin/env python3
import os
from PIL import Image
figures_dir = "Figures"
filenames = ["figure2", "supplementalFigure4"]
for f in filenames:
img = Image.open(os.path.join(figures_dir, f + ".png")).convert("RGB")
img.save(os.path.join(figures_dir, f + ".tiff"))
|
import { expect } from 'chai';
import { newBidder } from 'src/adapters/bidderFactory';
import { spec } from 'modules/gumgumBidAdapter';
const ENDPOINT = 'https://g2.gumgum.com/hbid/imp';
describe('gumgumAdapter', function () {
const adapter = newBidder(spec);
describe('inherited functions', function () {
it(... |
macDetailCallback("0050c2362000/36",[{"a":"Zirovnicka 2/3146 Prague CZ 106 17","o":"AZD Praha s.r.o.","d":"2008-07-30","t":"add","s":"ieee","c":"CZ"}]);
|
import React, { useState, useRef } from "react";
import { useDispatch, useSelector } from "react-redux";
import { WARNING } from "Constants/SnackBarVariant";
import { fetchUpdateTodoItem, fetchDeleteTodoItem } from "actions/todoAction";
import { setSnackBarState } from "actions/snackBarAction";
import TodoComponent fro... |
import copy
import datetime
import os
import string
import xlsxwriter
from clockwork import db, lock_file, spreadsheet_helper, utils
from clockwork.common_data import allowed_sequencing_instruments
class Error(Exception):
pass
def create_template_spreadsheet(filename):
workbook = xlsxwriter.Workbook(filenam... |
#
# Copyright 2016 Quantopian, 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 wr... |
/*******************************************************/
/* "C" Language Integrated Production System */
/* */
/* CLIPS Version 6.30 08/16/14 */
/* */
/* ... |
import unittest
import sys
from src.grammar_tester.parsevaluate import *
parse_no_wall = """tuna isa fish .
0 tuna 1 isa
1 isa 2 fish
2 fish 3 .
"""
parse_with_wall = """tuna isa fish .
0 ###LEFT-WALL### 1 tuna
1 tuna 2 isa
2 isa 3 fish
3 fish 4 .
"""
# parse_with_wall = """tuna isa fish .
# 0 ###LEFT-WALL### 1 t... |
from flask import render_template,redirect,url_for,flash,request
from . import auth
from ..models import User
from .forms import RegistrationForm,LoginForm
from flask_login import login_user,login_required, logout_user, current_user
from .. import db
@auth.route('/login',methods=['GET','POST'])
def login():
login... |
/* nbdkit
* Copyright (C) 2013-2019 Red Hat Inc.
*
* Redistribution and use 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 list of conditions and the f... |
/**
* 枚举相关
*/
export const mainOrderStatus = {
1: '待支付',
2: '已支付',
3: '确认订单',
4: '交易成功',
5: '订单完成',
6: '交易关闭',
7: '订单取消',
8: '订单失效'
}
export const detailsEnum = {
articleCategoryId: '505072580818894848' // 感兴趣的活动
}
|
import { Stroke, Fill, Circle, RegularShape, Text, Style } from 'ol/style';
import { transform, get as getProj, METERS_PER_UNIT, transformExtent } from 'ol/proj';
import { WMSCapabilities, WMTSCapabilities } from 'ol/format';
import VectorLayer from 'ol/layer/Vector';
import WFS from 'ol/format';
import { Cluster, Vect... |
webpackJsonp([7],{534:function(e,t,i){function n(e){i(786)}var r=i(220)(i(718),i(830),n,"data-v-5ef966ff",null);e.exports=r.exports},539:function(e,t,i){var n=i(548);e.exports=function(e,t,i){return void 0===i?n(e,t,!1):n(e,i,!1!==t)}},540:function(e,t,i){"use strict";t.__esModule=!0;var n=i(13),r=function(e){return e&... |
import React from 'react';
import { Link } from 'gatsby';
import { ReactComponent as ArrowR } from '../svg/arrowR.svg';
import '../scss/style.scss';
export default function EndContent({
links, what, cta, device,
}) {
return (
<div className="container-fluid" style={{ height: '90vh' }}>
<div className="ro... |
// @flow
/* eslint-env shared-node-browser */
import React from 'react'
import {mount} from 'enzyme'
import {expect} from 'chai'
import {Router, Route, IndexRoute, Link, createMemoryHistory} from 'react-router'
import Drilldown from '../src'
function delay(ms: number): Promise<void> {
return new Promise(resolve =>... |
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.sv');
goog.require('Blockly.Msg');
Blockly.Msg.ABOUT = "om";
Blockly.Msg.ACCELERATION_TOOLTIP = "Få accelerationsvärdet i mili-gravities";
Blockly.Msg.ACCELEROMETER_ROTATION_TOOLTIP = "Get the tilt or rotations in degr... |
"use strict";
const utils = require("./doc-utils");
const willBreak = utils.willBreak;
function assertDoc(val) {
if (
!(typeof val === "string" || (val != null && typeof val.type === "string"))
) {
throw new Error(
"Value " + JSON.stringify(val) + " is not a valid document"
);
}
}
function co... |
from django.core.management.base import BaseCommand, CommandError
from polls.models import Question as Poll
class Command(BaseCommand):
help = 'Closes the specified poll for voting'
requires_migrations_checks = True
def add_arguments(self, parser):
# Positional arguments
parser.add_argume... |
"""
This is a wrapper around the individual backend transactions,
switching on the connection type.
"""
from django.db import (
DEFAULT_DB_ALIAS,
connections,
)
from django.db.transaction import TransactionManagementError
from gcloudc.context_decorator import ContextDecorator
from gcloudc.db.backends.d... |
# Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
from __future__ import a... |
/**
* 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
* "License"); you... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 9
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_2
from i... |
from dataclasses import dataclass
from app.domain.model import AppAuthorization
@dataclass
class Command:
pass
@dataclass
class CreateUser(Command):
id: str
password: str
first_name: str
last_name: str
email: str
@dataclass
class AddAuthorizationToUser(Command):
user_id: str
auth:... |
import re
import json
import typing as t
from functools import partial
from collections import OrderedDict
from ..directives import get_deprecated
from ..graph import Graph, Root, Node, Link, Option, Field, Nothing
from ..graph import GraphVisitor, GraphTransformer
from ..types import (
TypeRef,
String,
S... |
import Radio from 'backbone.radio';
import View from '../../common/view';
import Model from '../../common/model';
import template from './template.hbs';
export default View.extend({
template: template,
initialize() {
this.model = new Model(this.options);
Radio.request('modal', 'open', this);
},
event... |
class TestClass:
"""Класс пыщ-пыщ"""
all_created_clases = []
def __init__(self, magic=10):
"""Создание экземпляра класса"""
self.magic = magic
TestClass.all_created_clases.append(self)
#self.__class__.all_created_clases.append(self)
def square_magic(self):
"""Воз... |
import React, { PropTypes } from 'react';
import { Switch, Route } from 'react-router-dom';
import NotFound from 'routes/not-found';
import BlogList from './blog-list';
import Blog from './blog';
const BlogsRoutes = ({ match }) => (
<div>
<Switch>
<Route exact path={`${match.url}/:id`} component={Blog} />... |
import path from 'path'
import fs from 'fs-extra'
import consola from 'consola'
import Youch from '@nuxtjs/youch'
export default ({ resources, options }) => async function errorMiddleware (err, req, res, next) {
// ensure statusCode, message and name fields
const error = {
statusCode: err.statusCode || 500,
... |
// Source: https://github.com/Program-AR/blockly-to-svg
// MIT License
// Copyright (c) 2019 Team Uroboros
// 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 ... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
r"""
Utility functions for constrained optimization.
"""
from functools import partial
from typing import Callable, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
from scipy.optimize import Bounds
from ... |
from gradgpad.foundations.annotations.coarse_grained_pai import CoarseGrainedPai
from gradgpad.foundations.annotations.dataset import Dataset
from gradgpad.foundations.annotations.demographic import Demographic
from gradgpad.foundations.annotations.device import Device
from gradgpad.foundations.metrics.metrics import M... |
# -*- coding: utf-8 -*-
import scrapy
import os
from ..Util.VideoHelper import ParseVideo,VideoGot
from ..items import TumblrItem
from redis import *
from ..Util.Conf import Config
origin_url='https://www.tumblr.com'
origin_video_url='https://vtt.tumblr.com/{0}.mp4'
redis_db = StrictRedis(host='127.0.0.1', port=6379, ... |
"""Flask app for adopt app."""
from flask import Flask, url_for, render_template, redirect, flash, jsonify
from flask_debugtoolbar import DebugToolbarExtension
from models import db, connect_db, Pet
from forms import AddPetForm, EditPetForm
app = Flask(__name__)
app.config['SECRET_KEY'] = "abcdef"
app.config['SQL... |
## ## Meta-Programming Configuration
##
## The `FA2_config` class holds the meta-programming configuration.
##
## See the FA2 standard definition:
## <https://gitlab.com/tzip/tzip/-/blob/master/proposals/tzip-12/>
##
import smartpy as sp
class FA2_config:
def __init__(self,
debug_mode ... |
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 8.01.0626 */
/* @@MIDL_FILE_HEADING( ) */
/* verify that the <rpcndr.h> version is high enough to compile this file*/
#ifndef __REQUIRED_RPCNDR_H_VERSION__
#define __REQUIRED_RPCNDR_H_VERSION__... |
/*
* Copyright 2016 IBM Corp.
*
* 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 i... |
//------------------------------------------------------------------Inputs---------------------------------------------------------
$(document).ready(function() {
var max_fields = 10; //maximum input boxes allowed
var wrapper = $("#telefonos_vertice"); //Fields wrapper
var add_button = $("... |