text stringlengths 3 1.05M |
|---|
from __future__ import division
from datetime import timedelta
from django.utils import timezone
from django.contrib.auth import get_user_model
from django.db import models
from django.db.models import Count, Avg
from tracking.settings import TRACK_PAGEVIEWS, TRACK_ANONYMOUS_USERS
from tracking.cache import CacheManag... |
# -*- coding: utf-8 -*-
"""
DU task for ABP Table: doing jointly row BIESO and horizontal cuts
block2line edges do not cross another block.
The cut are based on baselines of text blocks.
- the labels of horizontal cuts are SIO (instead of SO in previous version)
Copyright Naver Labs... |
import React, { Component } from "react";
import { TouchableOpacity, View } from "react-native";
import Icon from "react-native-dynamic-vector-icons";
/**
* ? Local Imports
*/
import colors from "../styles/colors";
import styles from "./MiniButton.style";
import { shadowStyle } from "../styles/shared.style";
export ... |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
import { Router } from 'express';
import * as CommentController from '../controllers/comment.controller';
const router = new Router();
// Add a new Post
router.route('/comments').post(CommentController.addComment);
router.route('/comments/:cuid').get(CommentController.getComments);
export default router;
|
import mongoose from 'mongoose'
import { mongo } from '~/config'
export paginate from './plugins/paginate'
export gravatar from './plugins/gravatar'
export filter from './plugins/filter'
export ownership from './plugins/ownership'
const processMode = process.env.NODE_ENV
Object.keys(mongo.options).forEach(key => {
... |
import json
import mock
import pytest
from datetime import datetime
from dallinger.models import Participant
from dallinger.experiment import Experiment
class TestModuleFunctions(object):
@pytest.fixture
def mod(self):
from dallinger import recruiters
return recruiters
def test__get_queu... |
const { trueGray } = require('tailwindcss/colors');
const { colors } = require('tailwindcss/defaultTheme');
module.exports = {
darkMode: 'media',
mode: 'jit',
plugins: [
require('tailwindcss-only-child'),
require('@tailwindcss/typography'),
],
purge: ['./pages/**/*.tsx', './componen... |
import Controller from '@ember/controller';
import { computed, action } from '@ember-decorators/object';
import { A } from '@ember/array';
import faker from 'faker';
export default class FilteringController extends Controller {
numberOfRows = 10;
@computed('numberOfRows')
get data() {
return A(Array.from(Ar... |
# coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 3
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_0.models.settings_... |
/******/ (() => { // webpackBootstrap
/******/ var __webpack_modules__ = ({
/***/ 378:
/***/ ((module) => {
"use strict";
module.exports = require("external-replace/replaced/some-file");
/***/ }),
/***/ 830:
/***/ ((module) => {
"use strict";
module.exports = require("externalmapped");
/***/ }),
/***/ 958:
/***... |
# Generated by Django 3.0.6 on 2020-10-04 17:50
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0034_auto_20201004_1445'),
]
operations = [
migrations.AddField(
model_name='character... |
/*global d3, utils, bib, Worker */
"use strict";
var model;
// model specification
// -------------------
// data stored internally as follows:
// tw: array of d3.map()s keyed to words as strings
// alpha: alpha values for topics
// meta: object holding document citations
// graph: object stored topic nodes & links
... |
var structDetectUrilenData__ =
[
[ "mode", "structDetectUrilenData__.html#af2085cb62ee31cabc7c98eca1fe40072", null ],
[ "raw_buffer", "structDetectUrilenData__.html#a0406f3f262bf6eb17968a1cff9e697bb", null ],
[ "urilen1", "structDetectUrilenData__.html#a6912c9aaf26c81fe654b668ae9451da5", null ],
[ "uril... |
"""
This is a test plug-in that raises exceptions.
"""
def raise_exc(caller='unknown function'):
raise ValueError("Arbitrary exception occured during {}".format(caller))
def register(meta):
meta.name = "Exceptions"
meta.id = "test:exception_raiser"
#raise_exc("register")
def conf(*_, **__):
raise... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.random_packet = exports.packect_outtec = exports.activateSesionResponse = exports.activateSesionRequest = exports.packet_cs_6 = exports.closeSecureChannelResponse = exports.closeSecureChannelRequest1 = exports.getEndpointsRequest2_chun... |
# coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytest
import pandas as pd
import numpy as np
from pandas import (Series, date_range, isna, Index, Timestamp)
from pandas.compat import lrange, range
from pandas.core.dtypes.common import is_integer
from pandas.core.indexing import IndexingError
from pandas.ts... |
# Lint as: python2, python3
# Copyright 2020 Google LLC. 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 req... |
from .lexer import PokeLexer
from .tokens import tokens, ignore_tokens |
/**
* @module EasyES
* @description Exports functions to interact with AWS Elastic Cluster.
* @exports easyES
* @author Amit Phulera <amitp@smartjoules.in>
*/
const AWS = require('aws-sdk');
const { Client } = require('@elastic/elasticsearch');
const moment = require('moment-timezone');
const util = require('./ut... |
import numpy as np
# My imports
from atom import *
from laser import *
from gas import *
class ADK:
'''
Containts two adk calculations, the standard one and the modified one by Tong and Lin.
In general, they will return the ionization fraction using the cycle averaged rate
integrated over the pulse... |
!function(e){var n=e.spectrum.localization.dk={cancelText:"annuller",chooseText:"Vælg"};e.extend(e.fn.spectrum.defaults,n)}(jQuery); |
import { __assign } from "tslib";
import * as React from 'react';
import { StyledIconBase } from '@styled-icons/styled-icon';
export var Backspace = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor",
"xmlns": "http://www.w3.org/2000/svg",
};
return (React.createEl... |
const path = require('path');
const fs = require('fs');
function importsToPaths(imports, config) {
return Object.keys(imports)
.filter((cur) => typeof imports[cur] === 'string')
.reduce((acc, cur) => {
// Remove extensions
const importPath = imports[cur].replace(/\*\.(\w+)?$/i, '*');
// Bu... |
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ConnectedReactRouter=t():e.ConnectedReactRouter=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]... |
#!/usr/bin/env python3
from pwn import *
binary = context.binary = ELF('./mind-blown')
#context.log_level = 'DEBUG'
if args.REMOTE:
p = remote('ctf2021.hackpack.club', 10996)
#libc = ELF('./libc-2.31.so')
else:
p = process(binary.path)
libc = ELF('/lib/x86_64-linux-gnu/libc.so.6')
pop_rdi = next(binary.search(... |
from parameterized import parameterized
from kitsune.questions.models import Answer, Question
from kitsune.questions.tests import AnswerFactory, QuestionFactory
from kitsune.questions.utils import (
get_mobile_product_from_ua,
mark_content_as_spam,
num_answers,
num_questions,
num_solutions,
)
from ... |
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2015 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
... |
from django.conf.urls.defaults import patterns
from django.views.generic import TemplateView
from formsets import AddressFormSet
from views import AddressFormSetView, AddressFormSetViewNamed, ItemModelFormSetView, \
FormAndFormSetOverrideView, PagedModelFormSetView, OrderItemFormSetView, \
OrderCreateView, Orde... |
// Update with your config settings.
module.exports = {
development: {
client: 'pg',
// useNullAsDefault: true,
connection: {
// filename: './database/auth.db3',
host: '127.0.0.1',
user: 'postgres',
password: 'x',
database: 'wunderlist',
},
// pool: {
// afterC... |
import numpy as np
SEED = 0
rng = np.random.default_rng(SEED) |
# Generated by Django 2.2 on 2020-11-03 16:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('owner', '0008_auto_20201103_0113'),
]
operations = [
migrations.AlterField(
model_name='employee',
name='branches',
... |
#!/usr/bin/env python
#
# Copyright (c) 2018 grakiss.wanglei@huawei.com and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LIC... |
#!/usr/bin/env python3
# encoding: utf-8
"""
ARC - Automatic Rate Calculator
Conformational MD FF Optimization
written by Alon Grinberg Dana
To run this module, the server has to have AmberTools and Gromacs installed.
Refer to the installation guides for more details:
AmberTools19: http://ambermd.org/Manuals.php
Grom... |
// Copyright (c) 2012 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_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
#define CONTENT_RENDERER_MEDIA_MOCK_MEDIA_STREAM_DEPENDENCY_FACTORY_H_
#includ... |
var Code = {
Common: {
method: {
clone: function(c, w, h, params) {
var stage = new Canvas2d.Stage(c, w, h);
var sprite = new Canvas2d.Sprite('main');
var newRect, i = 0;
var label = new Canvas2d.DisplayObjects('label', false);
... |
"""Query config of a device."""
from typing import Dict, Callable, List, Any
import pytest
from nornir.core.filter import F
from nornir.core.task import MultiResult, Result
from nornir_napalm.plugins.tasks import napalm_get
from nuts.context import NornirNutsContext
from nuts.helpers.filters import filter_hosts
from ... |
import random
import json
import math
import warnings
def inSet(strings):
inputs = {}
for i in strings:
inputs[i] = InNode()
return inputs
def outSet(strings, activation_func="sigmoid"):
outputs = {}
for i in strings:
outputs[i] = OutNode(activation_func=activation_func)
retu... |
"""
MENet, implemented in PyTorch.
Original paper: 'Merging and Evolution: Improving Convolutional Neural Networks for Mobile Applications,'
https://arxiv.org/abs/1803.09127.
"""
__all__ = ['MENet', 'menet108_8x1_g3', 'menet128_8x1_g4', 'menet160_8x1_g8', 'menet228_12x1_g3', 'menet256_12x1_g4',
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _exportNames = {
runBuildingStep: true,
applyBuildingStep: true,
RxDBQueryBuilderPlugin: true
};
exports.runBuildingStep = runBuildingStep;
exports.applyBuildingStep = applyBuildingStep;
exports.RxDBQueryBuilderPlugin = void 0;
v... |
/*
*------------------------------------------------------------------
* vlib_api.c VLIB API implementation
*
* Copyright (c) 2009 Cisco and/or its affiliates.
* 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 c... |
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexscrollerplugin=e()}(this,function(){"use strict";function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.itera... |
import foo from "./foo.js";
export default import("./foo.js"); |
let url, satuan_produk = $("#satuan_produk").DataTable({
responsive: true,
scrollX: true,
ajax: readUrl,
columnDefs: [{
searcable: false,
orderable: false,
targets: 0
}],
order: [
[1, "asc"]
],
columns: [{
data: null
}, {
data: "satuan"... |
# DO NOT EDIT!!! built with `python _building/build_setup.py`
import setuptools
setuptools.setup(
name="k3zkutil",
packages=["k3zkutil"],
version="0.1.0",
license='MIT',
description='Some helper function to make life easier with zookeeper.',
long_description='# k3zkutil\n\n[
... |
shore = {1:['m1','m2','m3','c1','c2','c3'],2:[]}
boat = {1:True,2:False}
boat_cap = 0
boat_hold = []
choice = 'y'
count = 0
glob = 1
def pick():
print("Pick a person to put on boat/or press enter")
return input()
def check(person,flag,avail_p):
if(person in shore[flag] or person == "" or person in boat_hold... |
#!/usr/bin/env python
"""Unit test driver for the manic external status reporting module.
Note: this script assumes the path to the manic package is already in
the python path.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
from __future__ import print_function
import unittest
... |
import PropTypes from "prop-types";
import React, { PureComponent } from "react";
import {
Text,
View,
FlatList,
Animated,
Modal,
TouchableWithoutFeedback,
Dimensions,
Platform,
ViewPropTypes,
I18nManager
} from "react-native";
import Ripple from "react-native-material-ripple";
import { TextField } ... |
'use strict';
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, ... |
"""Let's Encrypt display."""
import os
import textwrap
import dialog
import zope.interface
from letsencrypt import interfaces
WIDTH = 72
HEIGHT = 20
# Display exit codes
OK = "ok"
"""Display exit code indicating user acceptance."""
CANCEL = "cancel"
"""Display exit code for a user canceling the display."""
HELP ... |
import angular from 'angular';
import _ from 'underscore';
import template from './random-loadout.html';
import './random-loadout.scss';
export const RandomLoadoutComponent = {
template,
controller: RandomLoadoutCtrl,
bindings: {
stores: '<'
}
};
function RandomLoadoutCtrl($window, $scope, dimStoreService... |
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { withStyles } from '@material-ui/core/styles';
import MenuItem from '@material-ui/core/MenuItem';
import TextField from '@material-ui/core/TextField';
import Input from '@material-ui/core/Input';
import Paper fro... |
from django.contrib.auth import get_user_model
from django.test import TestCase, Client
User = get_user_model()
class URLTests(TestCase):
def setUp(self):
self.guest_client = Client()
self.user = User.objects.create_user(username='Name')
self.authorized_client = Client()
self.aut... |
#ifdef COMPILE_FOR_TEST
#include <assert.h>
#define assume(cond) assert(cond)
#endif
void main(int argc, char* argv[]) {
int x_0_0;//sh_buf.outcnt
int x_0_1;//sh_buf.outcnt
int x_0_2;//sh_buf.outcnt
int x_0_3;//sh_buf.outcnt
int x_0_4;//sh_buf.outcnt
int x_0_5;//sh_buf.outcnt
int x_0_6;//sh_buf.outcnt
int x_1_0... |
let total_obat_satuan = 0
let total_obat_racik = 0
// Obat satuan
$('#tambah_obat_satuan_btn').on('click', function(){
total_obat_satuan += 1
// parent div
let div = document.createElement('div')
div.className = 'mt-2 form-group'
div.style = 'display: flex; flex-direction: column; align-items: cen... |
"""
QQ登陆
"""
from QQLoginTool.QQtool import OAuthQQ
# QQ登录参数
QQ_CLIENT_ID = '101474184'
QQ_CLIENT_SECRET = 'c6ce949e04e12ecc909ae6a8b09b637c'
QQ_REDIRECT_URI = 'http://www.meiduo.site:8080/oauth_callback.html'
# "https://graph.qq.com/oauth2.0/show?which=Login&display=pc&response_type=code&client_id=101474184&redirec... |
import React, { forwardRef } from 'react';
import PropTypes from 'prop-types';
const Slack = forwardRef(({ color = 'currentColor', size = 24, ...rest }, ref) => {
return (
<svg
ref={ref}
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox="0 0 24 24"
fill="no... |
from netapp.netapp_object import NetAppObject
class OutputTypedef0(NetAppObject):
"""
Output
"""
_zfield5 = None
@property
def zfield5(self):
"""
Generic/Dummy Field 5
Attributes: required-for-create, modifiable
"""
return self._zfield5
@zfield5.... |
'''
report: tests module.
Meant for use with py.test.
Organize tests into files, each named xxx_test.py
Read more here: http://pytest.org/
Copyright 2018, zguo
Licensed under MIT
''' |
import asyncio
import logging
import os
from http import HTTPStatus
from typing import Dict, List, Optional
import aiohttp
import async_timeout
from homeassistant.components.hassio.const import X_HASSIO
from . import DEFAULT_BACKUP_TIMEOUT_SECONDS
_LOGGER = logging.getLogger(__name__)
CHUNK_SIZE = 64 ... |
"""
WSGI config for sfcbackend 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.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SE... |
# -*- coding:utf-8 -*-
# Author: hankcs
# Date: 2019-12-28 19:26
__version__ = '2.0.0-alpha.8'
|
import ReadingTime from "./ReadingTime";
export default ReadingTime;
|
//--------------------------------------------------------------------------------------
// File: Effects.h
//
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkID=615561
//-------------------------------------------------------------------------... |
const requestIp = require('request-ip');
const anonymize = require('ip-anonymize');
import { dataStoreTrack as datastore } from '../datastore';
import queryParser from '../queryParser';
module.exports = async (req, res) => {
const {
programId,
sessionId,
locale,
kind,
affiliate,
url,
dime... |
import sys
import os
import os.path
try:
# py2.x
from urllib import pathname2url
from urllib import url2pathname
from urllib import quote
from urllib import unquote
pass
except ImportError:
# py3.x
from urllib.request import pathname2url
from urllib.request import url2pathname
f... |
"""
Please, before executing the code, refer to the config file `config.yml` on
the root folder and the request headers on `src/header.json`.
You can set the following variables on your configuration file:
-> Section: sections to be scraped
-> MinPage: starting page to start scraping
-> MaxPage: last page... |
#!/usr/bin/env python
from chalicelib.main import get_team
teams = ["nhl toronto", "mlb toronto", "football miami", "Toronto","Washington","NY","NYR","NYY","LA","Miami","garbage","my aneurysm"]
print("\n\n")
for t in teams:
print("Calling " + t)
try:
rval = get_team(t,debug=True)
print("Final return: " + rval... |
/* @preserve
* The MIT License (MIT)
*
* Copyright (c) 2013-2017 Petka Antonov
*
* 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... |
from OpenGL import GL as gl
import pangolin as pango
import cv2
import numpy as np
def main():
pango.CreateWindowAndBind('fake stereo', 640, 480)
gl.glEnable(gl.GL_DEPTH_TEST) #fixes point overlapping issue
# Projection and ModelView Matrices
scam = pango.OpenGlRenderState(
pango.Projection... |
"use strict";
var options = require("config-sets").init({
try_to_run: {
retrying: 10,
enabled: true
}
}).try_to_run;
var fs = require("fs");
var path = require("path");
var wt = require("worker_threads");
var timeout = null;
var counter = 0;
function try_to_run(filename, retrying = options.re... |
from typing import Tuple, FrozenSet
from collections import Iterable
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msat_make_not, msat_mak... |
# coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1.10.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import r... |
"""
tests the create_isotope_plot from plotting_utils in the same way the examples
use the function.
"""
import os
import sys
import unittest
from pathlib import Path
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
def _notebook... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'Click>=6.0',
'Pillow==4.0.0',
]
test_requirements = [
# TODO: ... |
var express = require("express")
var formidable = require('express-formidable')
var fs = require('fs');
var app = express();
app.use(formidable({
uploadDir: 'public'
}));
app.listen(3000, () => console.log('Server running'));
app.post('/upload', (req, res) => {
fs.rename(req.files.avatar.path, req.files.avatar.pat... |
// SPDX-License-Identifier: LGPL-2.1-or-later
/*
*
* BlueZ - Bluetooth protocol stack for Linux
*
* Copyright (C) 2011-2014 Intel Corporation
* Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
*
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#define _GNU_SOURCE
#include <stdio.h>
#incl... |
#!/usr/bin/env python3
from kubernetes import client, config
import argparse
import copy
import os
import subprocess
import sys
import yaml
def find_pods(v1):
"""Find pods started by us or at least running node-container"""
ret = v1.list_pod_for_all_namespaces(watch=False)
def pod_filter(p):
retur... |
(function(scope) {
var RS = window.RS;
var RapidSynapseDial = scope.RapidSynapseDial;
var Tuner = function(el, options) {
this.init.apply(this, arguments);
};
Tuner.prototype.init = function(el, options) {
this.options = options;
this.min = options.min || 0;
this.max = options.max || 100;
... |
"""
Check sys.platform name
"""
import support
import sys
n = sys.platform
if n[:4] != "java":
raise support.TestError("sys.platform name check failed: " + `n`)
|
# -*- utf-8 -*-
# Проверка графа на двудольность (использование DFS)
import sys
sys.stdin = open("bipartite.in")
N,m = map(int, input().split())
G = [[] for i in range(N+1)
c = [-1] * N # -1 - No color, 1 - first group, 2 - second
def dfs(v, color):
c[v] = color # Красим вершину
for u in G[v]:
if c[v] =... |
"""renty URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based v... |
const registerHandler = require('./../router').registerHandler
const findHandler = require('./../router').findHandler
registerHandler('Get', 'http://www.xxx.com/weibos', 'queryWeibo')
registerHandler('post', 'http://www.xxx.com/weibos', 'addWeibo')
registerHandler('Delete', 'http://www.xxx.com/weibos', 'deleteWeibo')
... |
# encoding: utf-8
# (c) 2017-2020 Open Risk, all rights reserved
#
# TransitionMatrix is licensed under the Apache 2.0 license a copy of which is included
# in the source distribution of TransitionMatrix. This is notwithstanding any licenses of
# third-party software included in this distribution. You may not use this... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import * as actions from './FormActions';
import { TextInput, Button } from './common';
class Login extends Component {
constructor(props) {
super(props);
this.state = {
email: '',
password: '... |
# 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
# d... |
import React from 'react';
import { Link } from 'react-router-dom';
import { Pagination } from 'react-bootstrap';
import { list, countpost } from '../../Api/Post';
import DefaultPost from '../../Images/mountains.jpg';
import { serverUrl } from '../../variables';
import './style.css';
// import { isAuthenticated } from... |
////////////////////////////////////////////////////////////////////////////
// Created : 31.03.2010
// Author : Alexander Maniluk
// Copyright (C) GSC Game World - 2010
////////////////////////////////////////////////////////////////////////////
#ifndef SIGNALLING_READER_INLINE_H_INCLUDED
#define SIGNALLING_... |
#pragma once
/*
* Rectifier.h
* Deals with the Stereo Rectification
* Created on: Dec 05, 2018
* Author: Aaron Boda
*/
#include "pch.h"
#ifndef RECTIFIER_H_
#define RECTIFIER_H_
// Function
/** PERFORM STEREO CAMERA RECTIFICATION
@param K_L, D_L, K_R, D_R Left and Right camera matrix and distortion parameter... |
# brain data
import os
from joblib import Parallel, delayed
import pandas as pd
from time import time
import numpy as np
from smtr import STL
from build_data import build_coefs, build_dataset
dataset = "camcan"
savedir_name = "5sources_%s" % dataset
compute_ot = True
positive = False
if os.path.exists("/home/pariet... |
#!/usr/bin/env python3
# FileName:task_master.py
# -*- coding: utf-8 -*-
""" 分布式进程 master进程"""
import random, time, queue
from multiprocessing.managers import BaseManager
task_queue = queue.Queue()
result_queue = queue.Queue()
class QueueManager(BaseManager):
pass
def get_task_queue():
return task_queue
... |
define("ace/mode/rst_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/lib/lang", "ace/mode/text_highlight_rules"], function(e, t, n) {
"use strict";
var r = e("../lib/oop"),
i = e("../lib/lang"),
s = e("./text_highlight_rules").TextHighlightRules,
o = function() {
var e = {
... |
// @ts-check
const { chalk, warn } = require('../../utils')
const { getLogMessage } = require('../log')
const DEFAULT_LAMBDA_OPTIONS = {
verboseLevel: 3,
}
const SECONDS_TO_MILLISECONDS = 1000
const detectAwsSdkError = ({ error }) => {
const isAwsSdkError = error && error.errorMessage && error.errorMessage.inclu... |
const mix = require('laravel-mix');
const fs = require('fs');
const path = require('path');
const tailwind = require('tailwindcss');
// https://codeanddeploy.com/blog/laravel/combine-the-nwidart-laravel-modules-assets-to-public-using-laravel-mix
const moduleFolder = './modules';
const dirs = p => fs.readdirSync(p).f... |
# (C) Copyright [2020] Hewlett Packard Enterprise Development LP
#
# 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,... |
from html_generators import add_to_source # type: ignore[import]
if __name__ == "__main__":
add_to_source.add_source_to_file()
|
class ApiResponse:
def __init__(self, data):
self.success = data['success']
self.data = data['data']
|
class CaseData:
"""
A test case.
Attributes
----------
selector : :class:`.Selector`
The selector to test.
population : :class:`tuple` of :class:`.MoleculeRecord`
The population from which batches are selected.
selected : :class:`tuple` of :class:`.Batch`
The b... |
import React, { Component } from 'react';
import ReactTable from 'react-table';
import numeral from 'numeral';
import 'react-table/react-table.css';
import './App.css';
import { getAccountBuilders as binanceAccountBuilders } from './binance/accountbuilder';
import { getAccountBuilders } from './cryptopia/accountbuild... |