text stringlengths 3 1.05M |
|---|
///////////////////////////////////////////////////////////////////////////////
// //
// This file is part of ModelBlocks. Copyright 2009, ModelBlocks developers. //
// //
... |
from __future__ import absolute_import, print_function
import math
from torch import optim
from torch.optim.lr_scheduler import _LRScheduler
AVAI_SCH = {'single_step', 'multi_step', 'cosine', 'warmup', 'cosine_cycle', 'reduce_on_plateau', 'onecycle'}
def build_lr_scheduler(optimizer, lr_scheduler, base_scheduler, **... |
/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
# https://viblo.asia/p/tim-hieu-ve-sql-injection-testing-RQqKLv90l7z
import pytest
from bs4 import BeautifulSoup as bs
from flask import url_for
def test_register_sqlinjection(app, client):
theurlstr = 'register_blp.reg'
with app.test_request_context():
# Test render without errors
assert clien... |
(function () {
'use strict';
angular.module('auth.user')
.controller('AuthorDraftsCtrl', function ($scope) {
var authorDrafts = this;
});
})();
|
# -*- coding: utf-8 -*-
# *****************************************************************************
# NICOS, the Networked Instrument Control System of the MLZ
# Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS)
#
# This program is free software; you can redistribute it and/or modify it under
# the t... |
from tinydb import TinyDB, Query
# Initialize db
alignment_settings_db = TinyDB('db/alignment-settings.json')
alignment_items = Query()
devices_db = TinyDB('db/devices.json')
devices_list = Query()
trajectories_db = TinyDB('db/trajectories.json')
trajectories_list = Query()
# TODO: how to store streaming data in db?
... |
import React from 'react'
const Loader = (props) => {
return (
<div className='loading-screen'>
<img src={require('../loader.gif')} alt='Loading. Please wait...' />
</div>
)
}
export default Loader; |
#### TESTED
import datetime
import pathlib
from pathlib import Path
from typing import List
import pandas as pd
from pandas import DataFrame
import targets
from dbnd import PythonTask, parameter, task
from dbnd_examples.data import data_repo
from targets import Target
from targets.types import PathStr
class Tes... |
#-------------------------------------#
# 对数据集进行训练
#-------------------------------------#
import os
import numpy as np
import time
import torch
from torch.autograd import Variable
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import torch.backends.cudnn as cudnn
fr... |
from django.shortcuts import render
from django.http import HttpResponse
from .models import Backpack
# Create your views here.
def hello_world(request):
return HttpResponse('Hello World!')
def hello_test(request):
# backpack_list = Backpack.objects.all()
return render(request, 'hello_test.html') |
/*
Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang( 'newpage', 'de', {
toolbar: 'Neue Seite'
} );
|
# 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
# distributed under the... |
import setuptools
with open('README.md') as readme:
long_description = readme.read()
setuptools.setup(
name='git-gud',
version='0.1',
author='Ben Thayer',
author_email='ben@benthayer.com',
description='A tool to learn git',
long_description=long_description,
long_description_content_ty... |
/* eslint-disable */
const withCss = require('@zeit/next-css')
module.exports = withCss({
webpack: (config, { isServer }) => {
if (isServer) {
const antStyles = /antd\/.*?\/style\/css.*?/
const origExternals = [...config.externals]
config.externals = [
(context, request, callback) => {
... |
import React, { Component } from 'react'
import A_Title from 'A_Title_H'
import SectionCounter from '../common/SectionCounter/index.js'
import InfoColumn from '../common/InfoColumn'
import './styles.scss'
import { cssClassName } from 'utils'
const cn = cssClassName('SE_Home_UseCases')
class SE_Home_UseCases extends C... |
"""
cat6k implementation of show_platform.py
"""
import re
from genie.metaparser import MetaParser
from genie.metaparser.util.schemaengine import Schema, Any, Optional
class ShowVersionSchema(MetaParser):
"""
Schema for show version
"""
schema = {
'version': {
'os': str,
... |
//
// HKLEIDataModel.h
// HongKZH_IOS
//
// Created by wanghui on 2018/8/23.
// Copyright © 2018年 hkzh. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HKLEIDataModel : NSObject
@property (nonatomic, strong)NSArray *dataArray;
@end
|
"""
Themes/Icon Definitions
=======================
.. seealso::
`Material Design Icons <https://materialdesignicons.com/>`_
.. image:: https://github.com/HeaTTheatR/KivyMD-data/raw/master/gallery/kivymddoc/material-icons.png
:align: center
List of icons from materialdesignicons.com. These expanded material ... |
from ..base import ShopifyResource
from shopify import mixins
class Payouts(ShopifyResource, mixins.Metafields):
_prefix_source = "/shopify_payments/"
|
// @ts-check
import { E } from '@agoric/eventual-send';
import { offerTo } from '@agoric/zoe/src/contractSupport/index.js';
import { AmountMath } from '@agoric/ertp';
import { Far } from '@agoric/marshal';
import { makeDefaultLiquidationStrategy } from './liquidation.js';
import { makeTracer } from './makeTracer.js';... |
from pydrill.client import PyDrill
from DataBase import createSchema as cs
from Configuration import Settings as Settings
from Runner import runTest
from Utils import Execution
from Utils import gpuMemory, skip_test, init_context
from pynvml import nvmlInit
from blazingsql import DataType
from Configuration import Exec... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015, ParaTools, 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,
# t... |
import '@fortawesome/fontawesome-free/js/fontawesome';
import '@fortawesome/fontawesome-free/js/solid';
import '@fortawesome/fontawesome-free/js/regular';
import '@fortawesome/fontawesome-free/js/brands';
import './css/bootstrap.min.css';
import './js/bootstrap.min.js';// eslint-disable-line import/extensions
import '.... |
import sys
from http.client import HTTPSConnection, HTTPResponse
import json
import re
import ssl
import dxf as DXP
import dippy as DP
import time
from requests import Session
from requests.auth import HTTPBasicAuth
#import pymex.psimi
import zeep
from zeep import Client as zClient, Settings as zSettings
from zeep.... |
/**
* Created by v.mauel on 16.05.2017.
*/
class JuHPLC {
constructor(chromatogram) {
this.chromatogram = chromatogram;
window.juhplc = this;
}
scaleGraphY(graphName){
this._addscaleGraphYModal();
$('#scaleGraphYModal').modal('show');
$('#sc... |
from django.contrib.auth.models import User
from django.test import TestCase
from apps.async_requests.constants import NEWSLETTER_LIST_ID
from apps.async_requests.factory import Factory
from apps.users.models import Profile
class NewsletterLogic(TestCase):
def setUp(self) -> None:
self.service = Factory.... |
int addition(int a, int b);
int subtraction(int a, int b);
int multiplication(int a, int b);
int division(int a, int b); |
from datetime import datetime
from random import seed
from fastapi import FastAPI
from utils.utils import OperationError, StatusError
from starlette.responses import JSONResponse
from routers import drivers, health
from config import AggregatorConfig, PREFIX_URL
app = FastAPI()
@app.exception_handler(OperationErr... |
class Solution:
def buddyStrings(self, s: str, goal: str) -> bool:
'''
if len(s) != len(goal): return False
Two possible cases:
1. if s == goal: repeated letters in s
2. is two different letters between s and goal: exchange them and see if s == goal
'''
... |
# @copyright@
# Copyright (c) 2006 - 2017 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
import stack.commands
import stack.util
from stack.exception import CommandError
class command(stack.commands.SwitchArgumentProcessor,
stack.c... |
var input = document.getElementById("input");
var res = document.getElementById("res");
var del = document.getElementById("delete");
var work = document.getElementsByClassName('work');
var delAll = document.getElementById("deleteAll");
var record = document.getElementById('record');
if(localStorage.getItem... |
// import "tailwindcss/tailwind.css"
import {createApp} from "vue";
import App from '../components/App.vue'
createApp(App).mount("#app") |
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 17 11:54:36 2021
@author: Robert https://github.com/rdzudzar
"""
# Package imports
import streamlit as st
import pandas as pd
import matplotlib.pyplot as plt
import cmasher as cmr
import numpy as np
#from scipy import stats
import scipy.stats
import math
import matplotlib... |
# -*- coding: utf-8 -*-
#
# django-oidc-provider documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 11 14:26:17 2016.
#
# 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
# autogenerate... |
window.onload = choosePic;
var myPix = new Array("img/01.jpg","img/02.jpg","img/03.jpg","img/04.jpg","img/05.jpg",
"img/06.jpg","img/07.jpg","img/08.jpg","img/09.jpg","img/10.jpg",
"img/11.jpg","img/12.jpg","img/13.jpg","img/14.jpg","img/15.jpg",
"... |
# MIT LICENSE
#
# Copyright 1997 - 2020 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,... |
from typing import (
List,
)
from .inheritance import (
GrandParent,
InvalidParentMultiple,
InvalidParentSingle,
IncompatibleChildA,
IncompatibleChildB,
)
__all__: List[str] = [
'GrandParent',
'InvalidParentMultiple',
'InvalidParentSingle',
'IncompatibleChildA',
'Incompatib... |
//
// THTViewController.h
// MGNetWorkStatusObserver
//
// Created by 1096462733@qq.com on 10/11/2017.
// Copyright (c) 2017 1096462733@qq.com. All rights reserved.
//
@import UIKit;
@interface THTViewController : UIViewController
@end
|
import torch
from torch import nn, einsum
from einops import rearrange
class SepConv2d(torch.nn.Module):
def __init__(self,
in_channels,
out_channels,
kernel_size,
stride=1,
padding=0,
dilation=1,):
super... |
import networkx as nx # type: ignore
import networkx.algorithms.connectivity as nxc # type: ignore
from collections.abc import Hashable, Iterable, Mapping, Callable
from typing import Optional
from itertools import chain
from ..topology.coords import Topology, ECoord, NCoord
from ..topology.graphs import en_connecti... |
from typing import Any, Dict, List, Optional
from datastore.shared.util import collection_from_fqid
from .. import (
BaseEvent,
BaseMigration,
CreateEvent,
DeleteFieldsEvent,
ListUpdateEvent,
UpdateEvent,
)
class RenameFieldMigration(BaseMigration):
"""
This migration renames a field... |
# Copyright 2015, Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
import React, { Component } from 'react';
class Header extends Component {
render() {
if(this.props.data){
var name = this.props.data.name;
var description= this.props.data.description;
var networks= this.props.data.social.map(function(network){
return <li key={network.name}><a ... |
import time
import datetime
import logging
from os import path
from collections import defaultdict
import util as util
def evaluate(config):
"""Evaluates the error in the synthetic microdata with respect to the sensitive microdata.
Produces output statistics (tsv) and graphics (svg) for preservation_by_lengt... |
import numpy as np
import tensorflow as tf
from utils.utils import store_args
class TrainedNetwork:
"""TrainedNetwork
Import pre-trained model for simulation only.
It does not include any training sequence.
"""
@store_args
def __init__(
self,
model_name,
input_tensor... |
'''
Columns shared by most/all models
'''
import datetime
from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
from sqlalchemy.orm import relationship
#from api import db
from database import db
from sqlalchemy.orm.attributes import QueryableAttribute
from log import logger, DEBUG
import json
# base cl... |
#ifndef _CDIPRO81_H
#define _CDIPRO81_H
///////////////////////////////////////////////////////////////////////////////////
// CDIPro81 : DirectInput8管理クラス for おとゲマ v2.01 //
// //
// このソースコードは自由に改変して使用可能です。 ... |
import os, shutil
path = "images"
moveto = "dataset"
print('Ищем файлы')
files = []
for d in map(lambda d: os.path.join(path, d), os.listdir(path)):
for f in os.listdir(d):
files.append(os.path.join(d, f))
print('Переносим файлы')
for i, f in enumerate(files):
src = f
dst = os.path.join(moveto, f'{... |
/**
* @file mip-ck-referrer 组件
* @author
*/
define(function (require) {
'use strict';
var customElement = require('customElement').create();
var $body = document.querySelector('body'); // 业务需求操作body元素的class
// 简单解析url
function parseUrl(url) {
var resObj = {
protocol: /([^\/... |
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
f... |
from __future__ import absolute_import
from datetime import (
datetime,
timedelta,
)
from django.utils import timezone
from exam import fixture
from freezegun import freeze_time
from sentry.api.serializers import serialize
from sentry.models.recentsearch import RecentSearch
from sentry.models.search_common i... |
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
import React from 'react';
import { Component, PropTypes, Transition, View } from '../../libs';
import But... |
import json
import traceback
from StockAnalysisSystem.core.config import Config
import StockAnalysisSystem.core.Utility.AnalyzerUtility as analyzer_util
def generate_result_page(result_path: str, name_dict_path: str, generate_sample: bool = False):
try:
print('Loading analyzer name table...')
wit... |
/*
* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" fil... |
const {XMLParser, XMLBuilder, XMLValidator} = require("../src/fxp");
describe("XMLParser", function() {
it("should parse <constructor> ", function(){
const xmlData = `<root><other /><constructor /></root>`;
const expected = { root: { other: '', constructor: '' } };
const parser =... |
# Lecture 6, slide 4
def findDivisors(n1, n2):
'''
assumes n1 and n2 are positive integers
returns tuple containing common divisors of n1 and n2
'''
divisors = () # The empty tuple.
for i in range(1, min(n1, n2) + 1):
if n1 % i == 0 and n2 % i == 0:
divisors += (i,)
retu... |
import valve.rcon
import random
import string
server_address = ("ip", 27015)
password = "rconpw"
def pw_generator(size=3, chars=string.ascii_letters + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def getpw():
length = random.randint(4,8)
pw = pw_generator(length)
with val... |
var t,n,e=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},i=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:n,delta:0,entries:[],id:e(),isFinal:!1}},a=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b)... |
const express = require('express');
const passport = require('passport');
const jwt = require('jsonwebtoken');
const router = express.Router();
router.post(
'/signup',
passport.authenticate('signup', { session: false }),
async (req, res, next) => {
res.json({
message: 'Signup successful',
user: ... |
#include <stdio.h>
typedef struct{
char* Name;
float CGPA;
}Record;
typedef struct{
int size;
int no_of_rec;
Record *arr[];
}Element;
void merge(Element *Ls1, int sz1, Element *Ls2, int sz2, Element *Ls);
Element* readFromFile(FILE *f);
Element* addEle(Element* l, char *name, float cg);
Element* resizeList(Eleme... |
module.exports = {
modern: {
src: "<%= settings.js.combine.modern.src %>",
dest: "<%= settings.js.combine.modern.dest %>"
},
legacy: {
src: "<%= settings.js.combine.legacy.src %>",
dest: "<%= settings.js.combine.legacy.dest %>"
}
} |
B_0801_9 = {0: {'A': 0, 'C': 0, 'E': 2, 'D': 0, 'G': 1, 'F': 1, 'I': 1, 'H': 1, 'K': 0, 'M': 0, 'L': 0, 'N': 0, 'Q': 0, 'P': 0, 'S': 2, 'R': 0, 'T': 0, 'W': 0, 'V': 1, 'Y': 0, 'X': 0}, 1: {'A': 4, 'C': 0, 'E': 0, 'D': 0, 'G': 0, 'F': 0, 'I': 4, 'H': 0, 'K': 0, 'M': 0, 'L': 6, 'N': 0, 'Q': 0, 'P': 6, 'S': 0, 'R': 0, 'T'... |
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import, division, print_function
import traceback as tb
from flask import ren... |
# model settings
model = dict(
type='TTFNet',
pretrained='modelzoo://resnet18',
backbone=dict(
type='ResNet',
depth=18,
num_stages=4,
local_conv_cfg=dict(type='DynDilaConv', param_multiply=100., alpha_scale=1e-4, split=8,
tau_end_epoch=2, tau=(3, 1... |
/**
* @module Application
*/
define([
'framework/BaseModel'
], function(BaseModel) {
/**
* @class DataVocab
* @extends BaseModel
*/
var DataVocab = BaseModel.extend({
/**
* @method initialize
*/
initialize: function() {},
/**
* @property id... |
const express = require("express");
const path = require("path");
const app = express();
const PORT = process.env.PORT || 3000;
app.use(express.static(path.join(__dirname, "build")));
app.get("/", function (req, res) {
res.sendFile(path.join(__dirname, "build", "index.html"));
});
app.listen(PORT, () => {
console.log... |
/*
@author : Dhanusha Perera
@date : 12/06/2021
*/
const {MongoClient} = require('mongodb');
const DATABASE = process.env.DATABASE;
const client = new MongoClient(DATABASE, {useNewUrlParser: true, useUnifiedTopology: true});
client.connect(err => {
if (err) {
console.log(err);
process.exit(-1);
... |
// https://projecteuler.net/problem=4
/* A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
Find the largest palindrome made from the product of two 3-digit numbers.
*/
function largestPalindromic(digits) {
let i
let n
le... |
/**
Ember Data
@module ember-data
@main ember-data
*/
if (Ember.VERSION.match(/^1\.[0-7]\./)) {
throw new Ember.Error("Ember Data requires at least Ember 1.8.0, but you have " +
Ember.VERSION +
". Please upgrade your version of Ember, then upgrade Ember Data");
}... |
import datetime
import re
import sys
from contextlib import contextmanager
from unittest import SkipTest, skipIf
from xml.dom.minidom import parseString
import pytz
from django.contrib.auth.models import User
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.db im... |
import json
def load_settings(json_paths, base=None):
"""
Return settings from the given JSON files as a dictionary. This function
expands placeholders: That is, if a settings file contains
{
"app_name": "MyApp",
"freeze_dir": "target/${app_name}"
}
then "freez... |
r"""
Manifold of linear subspaces.
The Grassmannian :math:`Gr(n, k)` is the manifold of k-dimensional
subspaces in n-dimensional Euclidean space.
:math:`Gr(n, k)` is represented by
:math:`n \times n` matrices
of rank :math:`k` satisfying :math:`P^2 = P` and :math:`P^T = P`.
Each :math:`P \in Gr(n, k)` is identified ... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
gTestfile = '15.9.5.23-13.js';
/*... |
from typing import Any
from typing import List
from fastapi import APIRouter
from fastapi import Depends
from fastapi import HTTPException
from fastapi import Path
from sqlalchemy.orm import Session
from app.api.dependencies import get_db
from app.core.utils.get_entity import get_entity_instance
from app.crud.emails ... |
brainfuckParser = /*
* Generated by PEG.js 0.10.0.
*
* http://pegjs.org/
*/
(function() {
"use strict";
function peg$subclass(child, parent) {
function ctor() { this.constructor = child; }
ctor.prototype = parent.prototype;
child.prototype = new ctor();
}
function peg$SyntaxError(message, expe... |
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 25 09:54:38 2019
@author: edward
"""
import time, logging
import torch
from arguments import parse_a2c_args
from multi_env import MultiEnv
from models import CNNPolicy
from a2c_agent import A2CAgent
from utils import initialize_logging
def train... |
'''
Created on Nov 9, 2018
@author: kjnether
'''
import pytest
import os.path
import json
@pytest.fixture()
def Kirk_Destinations():
destsFileJson = os.path.join(os.path.dirname(__file__), '..', 'test_data',
'destinations.json')
destsFileJson = os.path.realpath(dest... |
/**
* DO NOT EDIT THIS FILE as it will be overwritten by the Pbj compiler.
* @link https://github.com/gdbots/pbjc-php
*
* Returns an array of curies using mixin "triniti:ovp:mixin:search-videos-request:v1"
* @link https://schemas.toofab.com/json-schema/triniti/ovp/mixin/search-videos-request/1-0-0.json#
*/
expor... |
import React from 'react'
import { Helmet } from 'react-helmet'
import { Line } from 'peity-react'
class PeityItems extends React.Component {
render() {
return (
<div>
<Helmet title="Peity" />
<section className="card">
<div className="card-header">
<div className="uti... |
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2017 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$(document).ready(function(){AppMessage.run()}); |
"""
WSGI config for wargame_web 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/2.0/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... |
#ifndef __AP_INERTIAL_SENSOR_USER_INTERACT_STREAM_H__
#define __AP_INERTIAL_SENSOR_USER_INTERACT_STREAM_H__
#include <AP_HAL/AP_HAL.h>
#include "AP_InertialSensor_UserInteract.h"
/**
* AP_InertialSensor_UserInteract, implemented in terms of a BetterStream.
*/
class AP_InertialSensor_UserInteractStream :
public... |
/*!
* Masonry PACKAGED v4.0.0
* Cascading grid layout library
* http://masonry.desandro.com
* MIT License
* by David DeSandro
*/
!function(t,e){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(i){e(t,i)}):"object"==typeof module&&module.exports?module.exports=e(t,r... |
# Copyright 2014 Adobe. All rights reserved.
"""
Tools for processing "fontinfo" files. See "psautohint --doc-fddict", or the
MakeOTF user guide for details on this format.
The "fontinfo" file is expected to be in the same directory as the input
font file.
"""
from __future__ import print_function, absolute_import
... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[17,18],{Stme:function(t,e,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={ORG_LIST:"/mgr/WeBASE-Data-Fetcher"}},mHBk:function(t,e,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.chainGeneral=function(){return(0,n.get)({u... |
import os
import re
import time
import shutil
import shlex
import subprocess
import logging
def init_logger(file_name, verbose=1, name=None):
level_dict = {0: logging.DEBUG, 1: logging.INFO, 2: logging.WARNING}
formatter = logging.Formatter(
"[%(asctime)s][%(filename)s][%(levelname)s] %(message)s"
... |
// Copyright (c) 2018 The BITCREXCOIN developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCREXCOIN_ACCUMULATORCHECKPOINTS_H
#define BITCREXCOIN_ACCUMULATORCHECKPOINTS_H
#include <libzerocoin/bignum.h>
#include... |
var express = require("express");
var path = require("path");
var favicon = require("serve-favicon");
var logger = require("morgan");
var cookieParser = require("cookie-parser");
var bodyParser = require("body-parser");
var fs = require("fs");
var index = require("./routes/index");
var users = require("./routes/users"... |
/*!
* event.js. v1.0.0
*
* Copyright (c) 2020 Segu
* Released under the MIT license.
* see https://opensource.org/licenses/MIT
*/
const INTERVAL = 5000;
chrome.runtime.onMessage.addListener(
function(request, sender, sendResponse) {
console.log("Receive message"+ request.mode +".");
switch ... |
import requests
import json
from src.utils.config import config
# TODO use a util for creating index names
narrative_index_name = ''.join([
config['index_prefix'],
config['prefix_delimiter'],
config['global']['ws_type_to_indexes']['KBaseNarrative.Narrative'],
])
index_names = [
config['index_prefix']... |
"""
Regression test for the torsiondrive package to reproduce the examples
"""
import pytest
import os
import sys
import subprocess
import shutil
import filecmp
import json
import numpy as np
from torsiondrive.dihedral_scanner import DihedralScanner
from torsiondrive.qm_engine import EngineGaussian
@pytest.fixture(sc... |
#!/usr/bin/env python3
# Copyright (c) 2014-2019 The Luascoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there are cloned transactions with malleated scriptsigs."""
im... |
#!/usr/bin/env python
from __future__ import division
import xml.etree.ElementTree as ET
import sys
import datetime
import json
import matplotlib.pyplot as plt
from matplotlib import style
import numpy as np
from sklearn.cluster import KMeans
def total_seconds(time):
crtime = datetime.datetime.strptime(str(time),'%Y... |
import {
AUTH_USER,
UNAUTH_USER
} from './constants';
export function authUser(token){
return {
type: AUTH_USER,
payload: token
};
}
export function unAuthUser(){
return {
type: UNAUTH_USER
};
}
|
from komprenu.grammar import Grammar
class TestGrammar:
def setup(self):
self.grammar = Grammar(4, 4)
assert len(self.grammar.word_bits) > 0
def test_ingest(self):
assert set(self.grammar.ingest(1)) == {0, 1, 2, 3}
|
// @flow
import React, { Component } from 'react';
import { connect } from '../../base/redux';
import { createDeepLinkingPageEvent, sendAnalytics } from '../../analytics';
import { translate } from '../../base/i18n';
import { Platform } from '../../base/react';
import { DialInSummary } from '../../invite';
import { ... |
import { html } from 'https://unpkg.com/lit-html?module';
import { register } from '../api/data.js';
const registerTemplate = (onSubmit) => html`
<section id="register-page" class="content auth">
<h1>Register</h1>
<form id="register" action="#" method="" @submit=${onSubmit}>
... |