text stringlengths 3 1.05M |
|---|
import random
import struct
import itertools
import re
import zlib
from collections import defaultdict
from World import World
from Rom import Rom
from Spoiler import Spoiler
from LocationList import business_scrubs
from Hints import writeGossipStoneHints, buildAltarHints, \
buildGanonText, getSimpleHintNoPref... |
export default {
appTitle: 'InfiniTV',
appDescription: 'Portal de integración para Homelabs/HTPC con información de TMDB',
tmdbApiUrl: 'https://api.themoviedb.org/3',
tmdbImageUrl: 'https://image.tmdb.org/t/p'
}
|
import {
getAdServerTargeting,
getBidRequests,
getBidResponses,
getBidResponsesFromAPI,
getTargetingKeys,
getTargetingKeysBidLandscape,
getAdUnits,
createBidReceived
} from 'test/fixtures/fixtures.js';
import { auctionManager, newAuctionManager } from 'src/auctionManager.js';
import { targeting, newTarg... |
# -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
/* eslint-disable no-process-env */
'use strict';
process.env.NODE_ENV = 'development';
const fs = require('fs');
const path = require('path');
const I18nextWebpackPlugin = require('i18next-scanner-webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const babel = require('@babel/core');
cons... |
import operator
from functools import partial
from typing import TYPE_CHECKING, Any, Dict, Iterable, Optional, Tuple
from pypika import Table
from pypika.enums import DatePart, SqlTypes
from pypika.functions import Cast, Extract, Upper
from pypika.terms import (
BasicCriterion,
Criterion,
Enum,
Equalit... |
var class_g_w2_e_i_parser_1_1_builders_1_1_json_models_1_1_json_log =
[
[ "BuffDesc", "class_g_w2_e_i_parser_1_1_builders_1_1_json_models_1_1_json_log_1_1_buff_desc.html", "class_g_w2_e_i_parser_1_1_builders_1_1_json_models_1_1_json_log_1_1_buff_desc" ],
[ "DamageModDesc", "class_g_w2_e_i_parser_1_1_builders_1_... |
import cx from 'classnames';
import {noop} from 'lodash';
import React from 'react';
import menuItemContainer from './containers/menuItemContainer';
class BaseMenuItem extends React.Component {
render() {
const {
active,
children,
className,
disabled,
onClick,
onMouseDown,
... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2022, pysat development team
# Full license can be found in License.md
# -----------------------------------------------------------------------------
"""Supporting functions for testing user inputs."""
def compare_mod_name_coordinates(data, mod_name):
... |
# -*- coding: utf-8 -*-
"""*[initial code]
*Created on Sat Oct 13 13:04:28 2018
@author: garci
"""
print('''
__ __ ___ .--. _..._ .--. _________ _...._
| |/ `.' `. |__| ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{91:function(t,e,n){var i;window,t.exports=(i=n(1),function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.de... |
(function() {
var _exec, child_process, jsonnetBinFilePath, path;
path = require('path');
child_process = require('child_process');
jsonnetBinFilePath = path.resolve(__filename, '../../bin/jsonnet');
_exec = function(args, sync) {
args = Array.prototype.slice.call(args);
if (typeof args[0] === 'st... |
import React from 'react';
import {Link} from 'react-router-dom'
import Styled from "styled-components";
const MajorDiv = Styled.div `
display:flex;
flex-direction: row;
`
const TitleContainer = Styled.div `
margin: 30px;
text-align: left;
padding: 20px;
background-color: #2d4059;
p... |
import React, { Component } from 'react';
class TabNav extends Component {
render() {
return (
<div className='tab-nav'>
<div className='tab-nav__tabs'>
{
this.props.tabs.map((tab, index) => {
const className = `tab-nav__tab ${tab.active ? 'tab-nav__acti... |
#pragma once
#include <QWidget>
namespace Ui { class EWalletItemAsset; };
class EWalletItemAsset : public QWidget
{
Q_OBJECT
public:
EWalletItemAsset(QWidget *parent = Q_NULLPTR);
~EWalletItemAsset();
void setData(QString iconPath, QString nameText, QString numberText,
QString nameCNYText, QString numberCNYT... |
'use strict';
/* App Module */
var jscalcApp = angular.module('jscalcApp', [
'angularytics',
'http-auth-interceptor',
'ngRoute',
'ngMaterial',
'ui.ace',
'ui.sortable',
'jscalcControllers',
'jscalcDirectives',
'jscalcServices',
'preloadedData',
'material.services.media'
])
.constant('DEFAULTS',... |
// Take a string as input, reverse the string, and return the new string.
// what to do if a string has a single middle thing?
function reverse(string) {
const len = string.length;
// what to do if a string has a single middle thing?
if (len < 2) return string;
const end = string[string.length - 1];
const st... |
"""Functions for computing normalization splines for Kepler light curves."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import warnings
import numpy as np
from pydl.pydlutils import bspline
from src.helpers.third_party.robust_mean import robust_mean
... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.PLACEHOLDER_APP_DIR = exports.ELECTRON_VERSION = exports.DEFAULT_APP_NAME = undefined;
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
function _interopRequireDefault(obj) { return obj && obj.__esModule ?... |
from jesse.config import config, reset_config
from jesse.enums import exchanges
from jesse.factories import fake_order
from jesse.store import store
def set_up():
reset_config()
config['app']['trading_exchanges'] = [exchanges.SANDBOX, exchanges.BITFINEX]
config['app']['trading_symbols'] = ['BTCUSD', 'ETHU... |
//
// Created by Shuhao Zhang on 8/9/19.
//
#ifndef ALLIANCEDB_SORTMERGEJOIN_MULTIWAY_SKEWHANDLING_H
#define ALLIANCEDB_SORTMERGEJOIN_MULTIWAY_SKEWHANDLING_H
#include "../utils/types.h" /* relation_t, tuple_t, result_t */
/**
* "m-may sort-merge join" + fine-grained skew handling mechanisms.
*
* A So... |
/*
* Copyright (c) 2021-2022, NVIDIA CORPORATION.
*
* 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... |
# --- Description ---
# Script to set all L2/L3 domains to maintenance mode
#
# --- Author ---
# Chow Lip Khin <lipkhin.chow@nokia.com>
#
# --- Version ---
# 20180920 - 1.0
#
# --- Requirements ---
# 1. Python 2.7
# 2. Nuage VSPK 5.0+ (pip install vspk)
#
# --- Usage ---
# run 'python nuage_maintenance_mode.py -h' for ... |
define('jira/ajs/layer/inline-layer/window-positioning', [
'jira/ajs/layer/inline-layer/standard-positioning',
'jquery'
], function(
StandardPositioning,
jQuery
) {
/**
* An {@see InlineLayer} positioning controller that ensures the layer doesn't overflow the bottom of the window.
*
... |
# Natural Language Toolkit: Interface to the Stanford Part-of-speech and Named-Entity Taggers
#
# Copyright (C) 2001-2021 NLTK Project
# Author: Nitin Madnani <nmadnani@ets.org>
# Rami Al-Rfou' <ralrfou@cs.stonybrook.edu>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT
"""
A module fo... |
# _*_ code:utf-8 _*_
#!/usr/local/bin/python
txt = input('请输入字符串:')
# method 1
print(txt == txt[::-1])
# method 2
for i in range(int(len(txt)/2)):
if txt[i] != txt[-1-i]:
print(False)
print(True)
# method 3
txt1 = ""
for i in txt:
txt1 = i + txt1
print(txt1 == txt) |
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %%
import os
import numpy
import SimpleITK
import matplotlib.pyplot as plt
# %%
def sitk_show(img, title=None, margin=0.05, dpi=40 ):
nda = SimpleITK.GetArrayFromImage(img)
spacing = img.GetSpacing()
figsize = (1 + mar... |
/*
* Copyright 2020-2022 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
/*
* numkeyboard 1.0
* Copyright (c) 2014 BowenLuo http://www.luobo.com/
* Date: 2014-06-08
* Example:$(".numkeyboard").numkeyboard();
*/
(function($){
$.fn.numkeyboard = function(options){
var defaults = {
}
var options = $.extend(defaults, options);
var keyboardRadix = options.keyboardRadix... |
# ----------------------------------------------------------------------
# |
# | ForStatement_IntegrationTest.py
# |
# | David Brownell <db@DavidBrownell.com>
# | 2021-10-12 14:56:20
# |
# ----------------------------------------------------------------------
# |
# | Copyright David Brownell 2021
# | ... |
""" this is a dummy, temporary file to solve some scoping problems when exporting the robot stats"""
class RobotStats:
def __init__(self, version):
self.version = version
|
from vcap import (
BaseCapsule,
NodeDescription,
DeviceMapper,
common_detector_options
)
from .backend import Backend
class Capsule(BaseCapsule):
name = "detector_face_openvino"
description = "✨ OpenVINO fast face detector."
version = 1
device_mapper = DeviceMapper.map_to_openvino_devi... |
#!/usr/bin/env python3
from .dummy_mujoco_env import MujocoEnv
from .ant_direction import AntDirectionEnv
from .ant_forward_backward import AntForwardBackwardEnv
from .halfcheetah_forward_backward import HalfCheetahForwardBackwardEnv
from .humanoid_direction import HumanoidDirectionEnv
from .humanoid_forward_backward ... |
# -*- coding: utf-8 -*-
# vispy: gallery 30
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------... |
import argparse
import os
import sys
import time
import pytest
import yaml
from ocs_ci import framework
from ocs_ci.ocs.constants import CONF_DIR
from ocs_ci.ocs.exceptions import MissingRequiredConfigKeyError
from ocs_ci.utility import utils
def check_config_requirements():
"""
Checking if all required par... |
import factory
from eth_account import Account
from factory.django import DjangoModelFactory
from gnosis.eth.tests.clients.mocks import sourcify_safe_metadata
from ..models import Contract, ContractAbi
class ContractAbiFactory(DjangoModelFactory):
class Meta:
model = ContractAbi
abi = sourcify_safe... |
# https://github.com/tensorflow/tensorflow/blob/r1.4/tensorflow/python/ops/nn_impl.py#L885
from typing import Set, Tuple
import numpy as np
import torch
from allennlp.common.checks import ConfigurationError
def _choice(num_words: int, num_samples: int) -> Tuple[np.ndarray, int]:
"""
Chooses ``num_samples``... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { fromJS } from 'immutable';
/* @dev Toggle function during scrolling
* @param scrollTopValue - control value when trigger onOverThreshold / onBelowThrashold
* @param onOverThreshold - callBack when scroll >= scrollTopValue
* @para... |
from .equity_pricing import EquityPricing, USEquityPricing
from .dataset import DataSet, Column, BoundColumn
__all__ = [
'BoundColumn',
'Column',
'DataSet',
'EquityPricing',
'USEquityPricing',
]
|
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file stm32f4xx_hal_msp.c
* @brief This file provides code for the MSP Initialization
* and de-Initialization codes.
**************************************************... |
const http = require('http');
const app = require('./app');
const port = process.env.PORT || 3000;
const server = http.createServer(app);
server.on('listening', () => {
console.log('Server start...');
});
server.listen(port);
|
import React from "react";
import "./style.css";
function Friends(props) {
return (
<div id="one">
<div className="col grid-item" id="left1">
<h4>Registered Users | View Friends</h4>
{props.users.map(people => (
<ul key={people.id}>
... |
# 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 not use ... |
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.writtenNumber=a()}}(function(){return function a(b,c,d)... |
const Location = require("../models").Location;
const BoxUser = require("../models").BoxUser;
const Box = require("../models").Box;
const { Op } = require("sequelize");
//Validation Location
locationValidate = (req, res) => {
let validationMessages = [];
if (!req.body.BoxUserID) {
validationMessages.push("Bo... |
import React, { Component } from 'react';
import Select from 'react-select';
import { Help } from './Help';
export class SelectInput extends Component {
state = {
error: null,
loading: false,
value: this.props.value || null,
values: (this.props.possibleValues || []).map(a => ({
label: a.label |... |
// @flow
import { FigureElementPrimitive } from '../Element';
import { CustomAnimationStep } from '../Animation/AnimationStep/CustomStep';
import AnimationManager from '../Animation/AnimationManager';
import type { OBJ_AnimationStep } from '../Animation/AnimationStep';
/**
* {@link FigureElementPrimitive} that can... |
# encoding: utf-8
"""
Test suite for the docx.text.run module
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
from docx.enum.style import WD_STYLE_TYPE
from docx.enum.text import WD_BREAK, WD_UNDERLINE
from docx.parts.document import DocumentPart
from docx.shape import ... |
/* fixed precision code. We use a combination of Sign 15.16 and Sign.31
precision here.
The WMA decoder does not always follow this convention, and occasionally
renormalizes values to other formats in order to maximize precision.
However, only the two precisions above are provided in this file.
*/
... |
$(document).ready(function(){console.log("jquery ready")}); |
# -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
#
# 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 applicab... |
import ctypes
import typing as tp
from typing import Any, Callable, Dict, Sequence, Type
import numpy as np
import pyarrow as pa
from _ctypes import _SimpleCData
try:
from polars.polars import PySeries
_DOCUMENTING = False
except ImportError:
_DOCUMENTING = True
__all__ = [
"DataType",
"Int8",
... |
"""
Policy decision point implementation
"""
from enum import Enum
from typing import List
from .context import EvaluationContext
from .provider.base import AttributeProvider
from .request import AccessRequest
from .storage.base import StorageBase
class EvaluationAlgorithm(Enum):
"""
Supported evalu... |
/*
* Linux/PA-RISC Project (http://www.parisc-linux.org/)
*
* Floating-point emulation code
* Copyright (C) 2001 Hewlett-Packard (Paul Bame) <bame@debian.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
'''
This module triggers a get request to Twitter API
Find name and location of user friends
'''
import requests
BASE_URL = 'https://api.twitter.com/'
def main(username: str, bearer_token: str) -> dict:
'''
Return a dict where is information about user's friends:
key - username of friend
value - locat... |
import Ext_Base from '../../Ext/Base.js';
export default class Ext_util_Memento extends Ext_Base {
static PROPERTIES() { return [
]};
static EVENTS() { return [
{name:'ready', parameters:'cmp,cmpObj'},
{name:'created', parameters:'cmp'}
]};
static getProperties(properties) {
properties = properti... |
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2019-07-19 Magicoe The first version for LPC55S6x
*/
#ifndef __DRV_LED_H__
#define __DRV_LED_H__
#include <rtthread.h>
#include <rtdevice.h>
int rt_... |
/**
* Copyright (c) 2015-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.
*/
#import <U... |
/*
* This source file is part of an OSTIS project. For the latest info, see http://ostis.net
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#pragma once
#include <QMainWindow>
#include <QMap>
#include <QDir>
#include "extendedtabwidget.h"... |
import os
import shutil
import subprocess
def main():
workspace = os.path.sep + "github" + os.path.sep + "workspace"
input_allure_results = os.environ["INPUT_ALLURE_RESULTS"]
input_gh_pages = os.environ["INPUT_GH_PAGES"]
input_github_run_num = os.environ["GITHUB_RUN_NUMBER"]
input_github_run_id =... |
const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('electron', {
ipcRenderer: {
addItem(name, def, slot) {
ipcRenderer.send('add-item', { name, def, slot });
},
minimize() {
ipcRenderer.send('window-minimize', null);
},
maximize() {
ipcRe... |
#!/usr/bin/python2.7
# Copyright 2011 Google Inc. 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 requi... |
# Lint as: python3
# Copyright 2020 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 ... |
export { MultiCodeBlock } from "./src/components/multi-code-block";
export {
ExpansionPanel,
ExpansionPanelList,
ExpansionPanelListItem
} from "./src/components/expansion-panel";
export {
NavItemTitle,
NavItemDescription,
NavItemsContext
} from "./src/components/page-layout";
export { NetworkStatus } fro... |
/*!
* Start Bootstrap - Creative Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
(function($) {
"use strict"; // Start of use strict
// jQuery for page scrolling feature - requires jQuery Easing pl... |
import unittest
from unittest.mock import AsyncMock, MagicMock, call, patch
from discord.ext.commands import errors
from bot.api import ResponseCodeError
from bot.errors import InvalidInfractedUser, LockedResourceError
from bot.exts.backend.error_handler import ErrorHandler, setup
from bot.exts.info.tags import Tags
... |
import math
from intersections import Intersection, Intersections
from point import Point
from shape import Shape
class Sphere(Shape):
def __init__(self,
center=Point(),
radius=1.0,
transform=None,
material=None):
super().__init__(transf... |
from numpy import *
def compute_error_for_given_points(b, m, points):
totalError = 0
for i in range(0, len(points)):
x = points[i, 0]
y = points[0, 1]
totalError += (y - (m * x + b)) ** 2
return totalError / float(len(points))
def step_gradient(b_current, m_curr... |
/**
* LaunchDarkly REST API
* # Overview ## Authentication All REST API resources are authenticated with either [personal or service access tokens](https://docs.launchdarkly.com/home/account-security/api-access-tokens), or session cookies. Other authentication mechanisms are not supported. You can manage personal a... |
/**
* @class Ext.chart.axis.Time
* @extend Ext.chart.axis.Numeric
* @alias axis.time
*
* A type of axis whose units are measured in time values. Use this axis
* for listing dates that you will want to group or dynamically change.
* If you just want to display dates as categories then use the
* Category class fo... |
from .store_crud import *
|
# -*- coding: utf-8 -*-
# © 2017-2019, ETH Zurich, Institut für Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Configuration file for pytest tests.
"""
pytest_plugins = ['aiida_pytest'] # pylint: disable=invalid-name
|
"""Provide a model for the Z-Wave JS controller."""
from typing import TYPE_CHECKING, Dict, List, Optional, TypedDict, cast
from ..event import Event, EventBase
from .association import (
AssociationGroup,
Association,
)
from .node import Node
if TYPE_CHECKING:
from ..client import Client
class Controll... |
var cradle = require('cradle')
, equality = require('equality')
, ideepequals = require('ignoring-deep-equals')
, assert = require('assert')
, config = require('../config')
, db_relax = new (require('relax'))(config.couch)
, pwhash = require('password-hash')
, hat = require('hat')
, unique = require('./... |
/*
* Handle the Rockwell binary packet format supported by the old Zodiac chipset
*
* Week counters are not limited to 10 bits. It's unknown what
* the firmware is doing to disambiguate them, if anything; it might just
* be adding a fixed offset based on a hidden epoch value, in which case
* unhappy things will o... |
import requests
from bs4 import BeautifulSoup
import re
import time
import os
class hdtscraper:
page_url = 'https://hdtorrents.xyz/index.php?page={}'
session = None
session_start = None
login_url = 'https://hdtorrents.xyz/takelogin.php'
home_url = 'https://hdtorrents.xyz'
session_length = 10 * 60
def __init__(... |
// This file was procedurally generated from the following sources:
// - src/identifier-names/finally-escaped.case
// - src/identifier-names/default/class-expression-method-def.template
/*---
description: finally is a valid identifier name, using escape (MethodDefinition)
esid: prod-PropertyDefinition
features: [class]... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import math
import torch
import torch.nn.functional as F
from fairseq import utils
from fairseq.criterions import FairseqCriterion, registe... |
#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='atlasapi',
version='0.13.2',
python_requires='>=3.6',
packages=find_packages(exclude=("tests",)),
install_requires=['requests', 'python-dateutil', 'isodate', 'future', 'pytz','coolname', 'nose'],
setup_requires=['wh... |
"""
Utility decorators for routes.
"""
import json
from flask import request, Response
from functools import wraps
from typing import Any, Callable, Iterable, Tuple, Union
from werkzeug.exceptions import RequestEntityTooLarge, UnsupportedMediaType
from ..exceptions import AuthenticationRequired
from ..utils import pros... |
import { mapState, mapGetters } from 'vuex'
import Countries from 'core/resource/countries.json'
export default {
name: 'Shipping',
props: {
isActive: {
type: Boolean,
required: true
}
},
created () {
this.$bus.$on('checkout-after-personalDetails', (receivedData) => {
if (!this.is... |
import {
JSONToFormData
} from '../helpers/formDataBuilder';
// Namespaced
const namespaced = true;
const ERROR_MODEL = 'companies';
const COMPANY = {
id: null,
vertical_id: null,
image: null,
company_progress_type_id: null,
slug: null,
name: null,
email: null,
url: null,
city: null,
country:... |
import hashlib
import random
from datetime import timedelta
from typing import Any, Dict, List, Mapping, Optional, Sequence, Set, Union
from unittest import mock
import orjson
from django.conf import settings
from django.core.exceptions import ValidationError
from django.http import HttpResponse
from django.utils.time... |
# -*- coding: utf-8 -*-
"""Catch22 test code."""
import numpy as np
from numpy import testing
from sktime.datasets import load_basic_motions, load_unit_test
from sktime.transformations.panel.catch22 import Catch22
def test_catch22_on_unit_test():
"""Test of Catch22 on unit test data."""
# load unit test data... |
#include <assert.h>
#include <fcntl.h>
#include <time.h>
#include <unistd.h>
#include <uthash.h>
#include "handler.h"
#include "handshake.h"
#include "ieee802.h"
#include "killer.h"
#include "params.h"
#include "terminal.h"
struct message {
zz_mac_addr station;
zz_mac_addr bssid;
zz_packet_outcome outcom... |
import React from 'react';
import PropTypes from 'prop-types';
import SvgIcon from '@material-ui/core/SvgIcon';
import { fade, makeStyles, withStyles } from '@material-ui/core/styles';
import TreeView from '@material-ui/lab/TreeView';
import TreeItem from '@material-ui/lab/TreeItem';
import Collapse from '@material-ui/... |
# 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 th... |
# Copyright 2021, 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... |
/*
* Copyright 2014 Two Blue Cubes Ltd
*
* 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)
*/
#ifdef __clang__
# ifdef __ICC // icpc defines the __clang__ macro
# pragma warning(push)
# pragma war... |
require('dotenv').config();
const path = require('path');
const { PATH_PREFIX = '/' } = process.env;
module.exports = {
pathPrefix: PATH_PREFIX,
siteMetadata: {
title: 'Carbon Design System',
titleInternal: 'IBM Product Design'
},
plugins: [
{
resolve: `gatsby-plugin-google-analytics`,
... |
# -*- coding: utf-8 -*-
"""
Module description
"""
# TODO:
# (+)
#---------
# NOTES:
# -
import os
from collections import OrderedDict
import io_utils.root_path as root_path
path_settings = \
{
('ESA_CCI_SM', 'v045', 'COMBINED', 'ADJUSTED', 'QCM', 'ERA5'):
# paths will be tried in this o... |
#ifdef HAVE_CONFIG_H
#include "../../ext_config.h"
#endif
#include <php.h>
#include "../../php_ext.h"
#include "../../ext.h"
#include <Zend/zend_operators.h>
#include <Zend/zend_exceptions.h>
#include <Zend/zend_interfaces.h>
#include "kernel/main.h"
#include "kernel/object.h"
ZEPHIR_INIT_CLASS(Test_Properties_Pr... |
import ctypes
from turtle import distance
import _ctypes
import pygame
import pygame.freetype
import sys
import time
import math
import threading
from queue import Empty, Queue
from dataclasses import dataclass
from pykinect2 import PyKinectV2, PyKinectRuntime
from pykinect2.PyKinectV2 import *
from PyQt5.QtCore impor... |
#!/usr/bin/env python
import os
import re
from dataclasses import dataclass, field
from decimal import Decimal
import aiohttp
from aiohttp_socks import SocksConnector
SOCKS5_PROXY_URL = os.environ.get('SOCKS5_PROXY_URL', '')
def split(value: str):
return [i.strip() for i in value.split(',') if i.strip()]
def ... |
"""
Proszę napisać funkcję, która otrzymując jako parametr wskazujący na początek listy dwukierunkowej,
usuwa z niej wszystkie elementy, w których wartość klucza w zapisie binarnym ma nieparzystą
ilość jedynek.
"""
class Node:
def __init__(self, value):
self.value = value
self.next = None
... |
# encoding: utf-8
"""
A script for running the following zero-shot domain transfer experiments:
* dataset: Overnight
* model: BART encoder + vanilla Transformer decoder for LF
* lexical token representations are computed based on lexicon
* training: normal (CE on teacher forced target)
"""
import faulthandler
impor... |
import logging
import socket
import ssl
import irc
from irc.client import InvalidCharacters
from irc.client import MessageTooLong
from irc.client import ServerNotConnectedError
from irc.connection import Factory
from ratelimiter import RateLimiter
from pajbot.tmi import TMI
log = logging.getLogger("pajbot")
class ... |
const { MessageEmbed } = require("discord.js");
const client = require("nekos.life");
const neko = new client();
module.exports = {
name: "cat-emoji",
aliases: [],
description: "Cats are cute",
category: "Fun",
usage: "cat-emoji",
run: async (client, message, args) => {
(async () => {
try {
let text = a... |
module.exports = class InvalidParamError extends Error {
constructor (paramName) {
super('InvalidParamError')
this.name = 'InvalidParamError'
}
}
|
#include <stdio.h>
/*
@ Description: A 8 point 1-D AAN DCT
@ Author: Pratyush Kumar Ranjan
@ Date: 15 Aug 2013
*/
typedef struct{
int row0;
int row1;
int row2;
int row3;
int row4;
int row5;
int row6;
int row7;
} dct_stage;
void dct_aan(int*, int* );
void dct_aan(int* input, int* output){
int i... |