text stringlengths 3 1.05M |
|---|
// import logo from './logo.svg';
import './App.css';
import React from 'react';
import Button from './Button.js';
import Radio from './Radio.js';
import Countdown from './Countdown.js';
import SurveyAnswer from "./SurveyAnswer.js";
class SurveyPage extends React.Component {
constructor(props) {
super(props);... |
import React from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { updateFilters } from '../../../services/filters/actions';
import Checkbox from '../../Checkbox';
import GithubStarButton from '../../github/StarButton';
import './style.scss';
const availableSizes = ['XS', ... |
#
# Copyright (C) 2001 greg Landrum
#
from rdkit.Dbase import DbConnection
from rdkit.ML.Data import Quantize
def runIt(namesAndTypes, dbConnect, nBounds, resCol, typesToDo=['float']):
results = map(lambda x: x[0], dbConnect.GetColumns(namesAndTypes[resCol][0]))
nPossibleRes = max(results) + 1
for cName, c... |
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
###############################################################################
# PURPOSE:
# Lambda function to perform Rekognition tasks on image and video files
#
########################################... |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... |
"""Build frontend for PEP-517"""
from __future__ import annotations
import json
from abc import ABC, abstractmethod
from contextlib import contextmanager
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
from time import sleep
from typing import Any, Dict, Iterator, List, NamedTuple,... |
//
// _RXDelegateProxy.h
// RxCocoa
//
// Created by Krunoslav Zaher on 7/4/15.
// Copyright (c) 2015 Krunoslav Zaher. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface _RXDelegateProxy : NSObject
@property (nonatomic, assign, readonly) id _forwardToDelegate;
-(void)_setForwardToDelegate:(id)... |
# -*- coding: utf-8 -*-
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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 require... |
def buildPage(style, content, width=690, fontSize=12, lineHeight=0.8):
page = "<!DOCTYPE html><html><head><title>Title of the document</title><style>"
page +=\
"""
*
{
margin: 0;
padding: 0;
}
body
{
width: """ + str(width) + """px;
margin-left: 10px;
margin-top: 10px;
}
body > div
{... |
from math import ceil
from typing import Optional
from typing import Tuple
import torch
from pfhedge._utils.doc import _set_attr_and_docstring
from pfhedge._utils.doc import _set_docstring
from pfhedge._utils.str import _format_float
from pfhedge._utils.typing import TensorOrScalar
from pfhedge.stochastic import gene... |
/*
* Copyright (c) 2015 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 copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... |
(function (global) {
var babelHelpers = global.babelHelpers = {};
babelHelpers.classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
babelHelpers.createClass = function () {
function define... |
import ee
def is_authorized():
try:
ee.Initialize()
print('Authorized')
except Exception as e:
print('You are not authorized: {}'.format(e))
exit(1)
return None
if __name__ == '__main__':
pass
# ========================= EOF ===========================================... |
from django.core.management.base import BaseCommand
from django.db import IntegrityError
import datetime
from meals.models import Meal
class Command(BaseCommand):
help = 'Deactivates the current menu so users cannot update their orders.'
def add_arguments(self, parser):
parser.add_argument('--any_d... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('assets', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='assetholder',
name='cr... |
import socket
import sys
import _thread
import time
import ssl
import queue
def main(handlerPort, proxyPort, certificate, privateKey):
_thread.start_new_thread(server, (handlerPort, proxyPort, certificate, privateKey))
while True:
time.sleep(60)
def handlerServer(q, handlerPort, certificate, private... |
from digicomm import calculateBer
import numpy as np
def test_calculateBer():
b0 = np.array([0,0,0,1,1,0,1,1])
b1 = np.array([0,0,0,1,0,1,0,0])
b2 = np.array([0,1,0,1,0,1,0,1])
b3 = np.array([0,1,0,1,0,1,0,0])
assert calculateBer(b0,b0) == 0/8
assert calculateBer(b0,b1) == 4/8
assert calcu... |
import * as React from 'react'
import { Link as GatsbyLink } from 'gatsby'
const Link = props => {
const internal = props.target !== '_blank' && /^\/(?!\/)/.test(props.href)
if (internal) {
return (
<GatsbyLink activeClassName="active-link" to={props.href} {...props} />
)
}
return <a {...props} /... |
import { Grid } from '@mui/material'
import React, { useEffect, useState } from 'react'
import ReceiptIcon from '@mui/icons-material/Receipt'
import { PageTitle } from '../../fragments/PageTitle'
import { MenuButton } from '../../fragments/Buttons/MenuButton'
import { useParams } from 'react-router-dom'
import { useDat... |
//>>built
define({"widgets/Summary/nls/strings":{_widgetLabel:"\u0627\u0644\u0645\u0644\u062e\u0635",filter:"\u062a\u0635\u0641\u064a\u0629",all:"\u0627\u0644\u0643\u0644",missingLayerInWebMap:"\u0644\u0627 \u062a\u0648\u062c\u062f \u0637\u0628\u0642\u0627\u062a \u062a\u0634\u063a\u064a\u0644\u064a\u0629 \u0641\u064a \... |
import React from 'react';
import PropTypes from 'prop-types';
import { cssModules } from '../helpers/cssModules';
import STYLES from './page-container.scss';
export const WIDTHS = {
default: 'default',
prose: 'prose',
fullWidth: 'fullWidth',
};
const getClassName = cssModules(STYLES);
const PageContainer = ... |
import datetime
import csv
# credits: https://github.com/s2t2/shopping-cart-screencast/pull/2/files
tax_rate = 0.06
#def time function
transaction_time =datetime.datetime.now()
def human_friendly_timestamp(x):
return x.strftime("%Y-%m-%d") #%H:%M
#def find_product finction
def to_usd(my_price):
return "${0:,... |
from termcolor import colored
class Runner(object):
def __init__(self):
self.__errors = []
@property
def errors(self):
return self.__errors
def run(self, test_suite):
for test in test_suite:
self.__executor(test)
def __executor(self, test):
module_ = ... |
import os
import unittest
import uuid
import pytest
from pytest_localserver import http
from doodledashboard.component import MissingRequiredOptionException
from doodledashboard.datafeeds.datafeed import Message
from doodledashboard.filters.contains_text import ContainsTextFilter
from doodledashboard.filters.matches_... |
# pylint:disable=too-many-arguments
import logging
from typing import Optional
import pkg_resources
import yaml
from aiohttp import web, web_exceptions
from simcore_service_director import exceptions, producer, registry_proxy, resources
from . import node_validator
log = logging.getLogger(__name__)
... |
/* C99 6.5.3 Unary operators. */
#include "dfp-dbg.h"
#define AUTO_INCREASE_DECREASE(TYPE,SUFFIX) \
do \
{ \
_Decimal##TYPE in_de_d##TYPE = 0.0##SUFFIX; \
if (in_de_d##TYPE++) FAILURE \
if (--in_de_d##TYPE) FAILU... |
var gui = require('nw.gui');
var path = require('path');
var assert = require('assert');
var fs = require('fs-extra');
var curDir = fs.realpathSync('.');
describe('gui.App', function() {
var server, child, result = false;
before(function(done) {
this.timeout(0);
server = createTCPServer(13013);
chil... |
/*
Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notic... |
const FileModel = require('../models/FileModel');
const UserModel = require('../models/UserModel');
const bucket = require('../routes/connection').bucket;
fileM = new FileModel();
userM = new UserModel();
datos = null;
extensionesBPC = ['pdf','txt','doc','docx','xlsx','js'];
async function cargar_lista(req, res){
... |
from django.contrib import admin
from core import models
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.utils.translation import gettext as _
class UserAdmin(BaseUserAdmin):
ordering = ['id']
list_display = ['email', 'name']
fieldsets = (
(None, {'fields': ['email', 'p... |
from decimal import Decimal
import drf_hal_json
from drf_tools.test.base import IncludeFields, ModelViewSetTest, AdvancedReadModelViewSetTestMixin, BaseRestTest
from .models import TestResource, RelatedResource1, RelatedResource2
class TestResourceViewSetTest(AdvancedReadModelViewSetTestMixin, ModelViewSetTest):
... |
#-- 모듈 만들기
# ● 사용자가 직접 모듈을 만들 수 있음
# ● 큰 프로젝트의 경우 모듈 단위로 일을 진행하기도 함
# ● 모듈은 일반적으로 <모듈이름>.py으로 지정
#-- Simpleset 모듈 만들기
# ● 텍스트 에디터를 이용해 교집합, 차집합, 합집합 함수를 만듦
# ● simpleset.py 이름으로 저장하고 simpleset.py를 파이썬 라이브러리 디렉터리에 옮김
# ● import 명령을 이용해 simpleset 모듈을 가지고 옴
#-- 모듈의 경로
# ● 모듈을 임포트 했을 때 모듈의 위치를 검색하는 경로
# ○ sys.path에 저장... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. 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/li... |
export const fix = ([val, digits = 0]) => {
return Number(val).toFixed(digits);
};
|
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _jsonp = require('jsonp');
var _jsonp2 = _interopRequireDefault(_jsonp);
var _objectToGetParams = require('./utils/objectToGetParams');
var _objectToGetParams2 = _interopRequireDefault(_objectToGetParams);
var _shareCountFactory = ... |
from django.contrib import admin
from django.db.models import Q
from django import forms
from .models import RuleSet, Rule, Chapter, Article, Clause, Discussion, Comment
class ChapterForm(forms.ModelForm):
class Meta:
model = Chapter
fields = '__all__'
def __init__(self, *args, **kwargs):
... |
'''
Implements the ColumnContainer. A ColumnContainer is a PositionTree that has nodes that are
either Columns or ColumnContainers.
'''
from mysite import settings as settings
from FileVersion.versioned_file import VersionedFile
from Tree.named_tree import NamedTree
from column import Column
import errors as er
im... |
#Copyright ReportLab Europe Ltd. 2000-2006
#see license.txt for license details
# $URI:$
__version__=''' $Id: utils.py 3771 2010-09-08 13:23:56Z rgbecker $ '''
__doc__='''Gazillions of miscellaneous internal utility functions'''
import os, sys, imp, time
try:
from hashlib import md5
except:
from md5 ... |
import { OrderModel } from '../models/Order';
export default (app) => {
app.post('/v1/orders', async (req, res) => {
if (req.body === undefined) {
req.status(400).end();
} else if (req.user === undefined) {
req.status(401).end();
} else {
const orderData = {
...req.body,
... |
/** Universidad de La Laguna
* Escuela Superior de Ingeniería y Tecnología
* Grado en Ingeniería Informática
* Asignatura: Programación de Aplicaciones Interactivas
* Curso: 3º
* Práctica 9 PAI - Random Walk
* @file random-walk.js
* @author Rafael Cala
* Correo: alu0101121901@ull.edu.es
* @since 20/04/20
* @v... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("uicolor","nb",{title:"Fargevelger for brukergrensesnitt",options:"Alternativer for farge",highlight:"Fremhevet",selected:"Valgt farge",predefined:"F... |
import typing
from ..base import BaseModel
from vkbottle.types import objects
class Fave(BaseModel):
added_date: int = None
seen: bool = None
type: str = None
link: objects.link.Link = None
tags: typing.List[str] = None
class Get(BaseModel):
count: int = None
items: typing.List[Fave] = N... |
const fs = require('fs');
const path = require('path');
const { toPosixPath } = require('./utils');
const symbolsLoaderScript = fs.readFileSync(
path.join(__dirname, '../symbols-loader.html'),
'utf8'
);
module.exports = function prepareSymbolLoaderScript(
rootURL,
outputFile,
isTestEnv
) {
const symbolsUr... |
const { is, guard, createEvent } = require('effector');
/**
* if — (payload: T) => boolean,
* if — Store<boolean>
* if — T
*/
function condition({
if: test,
then: thenBranch,
else: elseBranch,
source = createEvent({ named: 'source' }),
}) {
const checker =
is.unit(test) || isFunction(test) ? test : (... |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/deed/event_perk/shared_rsf_2x10_honorguard_deed.iff"
result.attribu... |
import numpy as np
import pandas as pd
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.feature_selection import VarianceThreshold
from sklearn.model_selection import train_test_split
from sklearn.pipeline import make_pipeline
from tpot.export_utils import set_param_recursive
# NOTE: Make sure that the o... |
import torch
from utils import convert2cpu
def parse_cfg(cfgfile):
blocks = []
fp = open(cfgfile, 'r')
block = None
line = fp.readline()
while line != '':
line = line.rstrip()
if line == '' or line[0] == '#':
line = fp.readline()
continue
eli... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov 4 16:47:31 2020
@author: suraj
"""
import numpy as np
import csv
import os
import matplotlib.pyplot as plt
from xfoil import XFoil
from xfoil.model import Airfoil
#%%
import glob
import os
#os.chdir(r'directory where the files are located')
myFil... |
#########
# Copyright (c) 2016 GigaSpaces Technologies Ltd. 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... |
"""ResNeXt in PyTorch.
See the paper "Aggregated Residual Transformations for Deep Neural Networks" for more details.
"""
import torch.nn as nn
import torch.nn.functional as F
__all__ = ["ResNeXt29_2x64d", "ResNeXt29_4x64d", "ResNeXt29_8x64d", "ResNeXt29_32x4d"]
class Block(nn.Module):
"""Grouped convolution bl... |
# Version 1.0; Erik Husby; Polar Geospatial Center, University of Minnesota; 2018
from __future__ import division
import argparse
import filecmp
import os
from datetime import datetime
import numpy as np
import lib.raster_array_tools as rat
from lib.scenes2strips import coregisterdems
from batch_scenes2strips impo... |
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/framework/remote_fused_graph_execute_info.proto
#ifndef PROTOBUF_tensorflow_2fcore_2fframework_2fremote_5ffused_5fgraph_5fexecute_5finfo_2eproto__INCLUDED
#define PROTOBUF_tensorflow_2fcore_2fframework_2fremote_5ffused_5fgraph_5fexe... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.initializeLayerList = initializeLayerList;
exports.getLayerWhere = getLayerWhere;
exports.getLayerList = getLayerList;
exports.getDisplayNamesOfFeatureAttributes = getDisplayNamesOfFeatureAttributes;
var _defaults = require("./de... |
#ifndef C0P_PARAM_OBJECTS_SURFER__US_15O58__SURFTIMECONST_4O0__REORIENTATIONTIME_0O5_GROUP_HOMOGENEOUS_MEMBER_AGENT_ACTIVE_PASSIVE_SPHEROID_PARAMETERS_H
#define C0P_PARAM_OBJECTS_SURFER__US_15O58__SURFTIMECONST_4O0__REORIENTATIONTIME_0O5_GROUP_HOMOGENEOUS_MEMBER_AGENT_ACTIVE_PASSIVE_SPHEROID_PARAMETERS_H
#pragma once
... |
import { TextItalic20 } from '..';
export default TextItalic20;
|
/**
* 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 may ... |
"""Emoji
Available Commands:
.wtf"""
from telethon import events
import asyncio
from userbot.utils import admin_cmd
@borg.on(admin_cmd("(.*)"))
async def _(event):
if event.fwd_from:
return
animation_interval = 0.3
animation_ttl = range(0, 5)
input_str = event.pattern_match.group(1)
if... |
// Copyright IBM Corp. 2019. All Rights Reserved.
// Node module: @loopback/cli
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
'use strict';
const path = require('path');
const assert = require('yeoman-assert');
const {expect, TestSandbox} = require('@... |
import re
import nltk
from nltk.tokenize import word_tokenize
# Used for printing results during testing
func_name_to_str = {
"combination4": 'Accents, Punctuation, lowercase all, remove parenthesis',
"combination1": 'Accents, Punctuation, lowercase all, remove parenthesis, stopwords',
"combination2": 'Acc... |
import React from "react";
import { Col, Container, Row } from "reactstrap";
import "./App.css";
import Tree from "./tree";
export default function App() {
return (
<div className="App">
<Container>
<Row>
<Col>
<img
alt="app-logo"
className="App-log... |
#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_UISliderColorPicker_TestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_UISliderCol... |
################################################################################
# Copyright (c) 2021 ContinualAI. #
# Copyrights licensed under the MIT License. #
# See the accompanying LICENSE file for terms. ... |
/*! jQuery UI - v1.9.0 - 2012-10-22
* http://jqueryui.com
* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.sortable.js
* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
(function(e,t){fun... |
"""Representation of Z-Wave sensors."""
from __future__ import annotations
import logging
from typing import cast
import voluptuous as vol
from zwave_js_server.client import Client as ZwaveClient
from zwave_js_server.const import CommandClass, ConfigurationValueType
from zwave_js_server.model.node import Node as Zwav... |
from telethon.tl.functions.messages import SaveDraftRequest
from . import *
@bot.on(hell_cmd(pattern="chain$"))
@bot.on(sudo_cmd(pattern="chain$", allow_sudo=True))
async def _(event):
if event.fwd_from:
return
hell = await eor(event, "Counting...")
count = -1
message = event.message
while... |
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
# # Lint as: python3
#
"""Generate FPV CSR read and write assertions from validated register JSON tree
"""
import logging as log
import operator
import sys
from mako impor... |
# there is no specific likelihood code for this experiment, because it
# falls in the category of CMB experiments described in the "mock CMB"
# format. The class below inherits the properties of a general class
# "Likelihood_mock_cmb", which knows how to deal with all experiments in
# "mock CMB" format.
from montepyth... |
import pytest
from ...core.tests import (
extract_global_id_input_fields,
extract_serializer_input_fields,
)
from .. import models, serializers
@pytest.mark.parametrize(
"question__type,question__configuration",
[
(models.Question.TYPE_INTEGER, {"max_value": 10, "min_value": 0}),
(mod... |
"""
Copyright 2013 Rwizi Information Systems
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... |
"""colheita_feliz URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
C... |
from Danpass import DanPASS
import os
import sys
import codecs
import optparse
SCRIPT = '[Transvar_extend.py]: '
parser = optparse.OptionParser()
parser.add_option('-o', '--output',
dest="fout",
default="transvar_extended",
)
parser.add_option('-t', '--tables',
... |
/*
YUI 3.17.1 (build 0eb5a52)
Copyright 2014 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add("widget-parent",function(e,t){function s(t){this.publish("addChild",{defaultTargetOnly:!0,defaultFn:this._defAddChildFn}),this.publish("removeChild",{defaultTargetOnly... |
from .distributed_sampler import TrainingSampler, InferenceSampler
|
"""
Sentry
~~~~~~
"""
try:
VERSION = __import__('pkg_resources') \
.get_distribution('django-sentry').version
except Exception, e:
VERSION = 'unknown' |
import asyncio
from contextlib import contextmanager
from collections import OrderedDict, namedtuple
import base64
import click
import hashlib
import inspect
import itertools
import json
import mergedeep
import os
import re
import shlex
import tempfile
import time
import types
import shutil
import urllib
import numbers... |
from os.path import dirname, join
import pandas as pd
from bokeh.models import ColumnDataSource, Panel, CustomJS
from bokeh.models.widgets import TableColumn, DataTable, Paragraph, Button, Select
from bokeh.layouts import column, row, WidgetBox
class TableGenerator:
def __init__(self, data):
self.source ... |
const express = require('express');
const http = require('http');
const path = require('path');
const app = express();
const server = http.createServer(app);
const {ExpressPeerServer} = require('peer');
const port = process.env.PORT || "8000";
const peerServer = ExpressPeerServer(server, {
proxied : true,
debu... |
angular.module("umbraco")
.controller("UmbracoForms.Dashboards.LicensingController",
function ($scope, $location, $routeParams, $cookieStore, formResource, licensingResource, updatesResource, notificationsService, userService, utilityService) {
$scope.overlay = {
show: false,
title:... |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2017-12-29 15:51
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("core", "0023_auto_20170908_1206"),
("core", "0023_auto_20161004_1437"),
]
operation... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes React and other helpers. It's a great starting point while
* building robust, powerful web applications using React + Laravel.
*/
require('./bootstrap');
/**
* Next, we will create a fresh React component instance and attach ... |
/*################################################################
#
# Ajax MySQL shoutbox for btit
# Version 1.0
# Author: miskotes
# Created: 11/07/2007
# Contact: miskotes [at] yahoo.co.uk
# Website: http://www.yu-corner.com
# Credits: linuxus... |
const moment = require('moment');
function formatMessage(username, text, userID) {
return {
userID,
username,
text,
time: moment().format('h:mm a')
}
}
module.exports = formatMessage;
|
from torchvision import datasets, transforms, models
import torch
from PIL import Image
import numpy as np
def process_train_test(train_dir, valid_dir, test_dir):
train_transforms = transforms.Compose([transforms.RandomHorizontalFlip(),
transforms.RandomResizedCrop(224),
... |
(self["webpackChunkwizzi_editor"] = self["webpackChunkwizzi_editor"] || []).push([["vendors-node_modules_monaco-editor_esm_vs_language_json_jsonMode_js"],{
/***/ "./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/edit.js":
/*!*********************************************************************... |
this["wc"] = this["wc"] || {}; this["wc"]["onboardingTaxNotice"] =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is ... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'ruler-vertical';
var width = 256;
var height = 512;
var aliases = [];
var unicode = 'f548';
var svgPathData = 'M0 48C0 21.49 21.49 0 48 0H208C234.5 0 256 21.49 256 48V96H176C167.2 96 160 103.2 160 112C160 12... |
x = int(input())
if x % 11 == 0:
print(x // 11 * 2)
else:
cnt = x // 11 * 2
x -= cnt // 2 * 11
assert(x < 11)
if x <= 6:
print(cnt + 1)
else:
print(cnt + 2)
|
module.exports = {
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4
],
... |
from setuptools import setup, find_packages
setup(
name="entry-point",
version="0.1.dev0",
description="Entry Point Test Fixture",
author="Martijn Faassen",
author_email="faassen@startifact.com",
license="BSD",
packages=find_packages(),
zip_safe=False,
install_requires=["setuptools"... |
from functools import lru_cache
from . import app, configure, request
from . import get_or_create, commit
from . import BaseIngestResource, QueryResource
from ..models.cinder import (
Snapshot, AvailabilityZone, Volume, VolumeSnapshot, VolumeStatus, VolumeState,
VolumeAttachment)
class SnapshotResource(Quer... |
const path = require('path');
const debug = process.env.NODE_ENV !== 'production';
const resolve = (dir) => path.join(__dirname, dir);
module.exports = {
publicPath: './', // 根域上下文目录
outputDir: 'dist', // 构建输出目录
assetsDir: 'assets', // 静态资源目录 (js, css, img, fonts)
lintOnSave: false, // 是否开启eslint保存检测,有效值:ture... |
from timeit import default_timer as timer
import numpy as np
import pandas as pd
import neurokit2 as nk
# Utility function
def time_function(
x,
fun=nk.fractal_petrosian,
index="FD_Petrosian",
name="nk_fractal_petrosian",
**kwargs,
):
t0 = timer()
rez, info = fun(x, **kwargs)
t1 = ti... |
/// Copyright (c) 2009 Microsoft Corporation
///
/// 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
///... |
# -*- coding: utf-8 -*-
"""
Author: Ang Ming Liang
Please run the following command before running the script
wget -q https://raw.githubusercontent.com/sayantanauddy/vae_lightning/main/data.py
or curl https://raw.githubusercontent.com/sayantanauddy/vae_lightning/main/data.py > data.py
Then, make sure to get your kag... |
/* global describe beforeEach it */
import { expect } from 'chai'
import React from 'react'
import enzyme, { shallow } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import ProblemsTable from '../../client/components/ProblemsTable'
const adapter = new Adapter()
enzyme.configure({ adapter })
describe('▒▒... |
# 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... |
#!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
/* Copyright JS Foundation and other contributors, http://js.foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless r... |
from collections import Counter
from kaichu.jira_lib import Client as JiraClient
def add_options(parser, env):
parser.add_option('--kaichu-jira-host',
action='store',
default=env.get('kaichu_jira_host', ''),
dest='kaichu_jira_host',
... |
from __future__ import unicode_literals
from django_evolution.mutations import ChangeMeta
MUTATIONS = [
ChangeMeta('Permission', 'unique_together',
[('content_type', 'codename')]),
]
|