text stringlengths 3 1.05M |
|---|
# -*- coding: utf-8 -*-
"""
A short Python script
=====================
This demonstrates an example `.py` file that is not executed when gallery is
generated (see
[Parsing and executing examples via matching patterns](https://sphinx-gallery.github.io/stable/configuration.html#build-pattern))
but nevertheless gets inc... |
const {SchemaComposer} = require('graphql-compose');
const schemaComposer = new SchemaComposer()
const {UserQuery, UserMutation} = require("./user");
const {ProjectsManagmentQuery, ProjectsManagmentMutation} = require("./projectsManagment");
const {InscriptionQuery, InscriptionMutation} = require("./inscription... |
import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '../views/Layout.vue'
import Login from '../views/Login.vue'
import CategoryEdit from '../views/Category/CategoryEdit.vue'
import CategoryList from '../views/Category/CategoryList.vue'
import HeroEdit from '../views/Hero/HeroEdit.vue'
import H... |
/* global describe, it */
var wordomat = require('../')
var should = require('should')
var fieldTrip = ['Riley', 'orange juice', 'Marisol', 'pretzels', 'Dan', 'beer', 'Spencer', 'water', 'Kenneth', 'coffee', 'Frances', 'snacks']
var opts = { requiredLetters: 'oiS', sort: 'alphabetical', minLength: 1, maxLength: 100 }
... |
'use strict';
app.controller('HeaderCtrl', function ($scope, $location) {
$scope.$location = $location;
});
|
"""
Pyperclip
A cross-platform clipboard module for Python, with copy & paste functions for plain text.
By Al Sweigart al@inventwithpython.com
BSD License
Usage:
import pyperclip
pyperclip.copy('The text to be copied to the clipboard.')
spam = pyperclip.paste()
if not pyperclip.is_available():
print("Cop... |
import DenseBlock
import torch
import torch.nn as nn
class MDSGAFIN(nn.Module):
def __init__(self,
channel = 3,
filter_size = 3):
pass |
/*
* Copyright (c) 2017 Nikos Tasios
* Copyright (C) 2019 Edward LEI <edward_lei72@hotmail.com>
*
* The code is licensed under the MIT license
*/
#include <stdlib.h>
#include <string.h>
#include "type.h"
#include "vec3.h"
#include "quat.h"
#include "apex_memmove.h"
#include "shape.h"
/*----- static functions -... |
/******************************************************************************
(c) 2005-2014 Scientific Computation Research Center,
Rensselaer Polytechnic Institute. All rights reserved.
This work is open source software, licensed under the terms of the
BSD license as described in the LICENSE file i... |
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
"""
Purpose
Shows how to scan items in an Amazon DynamoDB table that stores movies and return
only items that pass a specified filter.
Items are filtered so that only movies within a specified range of release y... |
#Get the union and intersection of two sorted arrays
l1 = [1,2,3,4,5,6]
l2 = [4,5,6,7,9,10]
def union(l1, l2):
i=0
j=0
res = []
while i< len(l1) and j<len(l2):
if l1[i]==l2[j]:
res.append(l1[i])
i+=1
j+=1
elif l1[i]<l2[j]:
r... |
# -*- coding: utf-8 -*-
from __future__ import with_statement
import os
import sys
from logging.config import fileConfig
from sqlalchemy import engine_from_config, pool
from alembic import context
# Add working directory to import path so that we can find our domain models
sys.path.append(os.getcwd())
# this is the... |
/* Copyright (c) 2016 PaddlePaddle 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 agr... |
import tensorflow as tf
x_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=[], name="HoleX")
y_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=[], name="HoleY")
z_ = tf.compat.v1.placeholder(dtype=tf.float32, shape=[], name="HoleZ")
def fn1(a, b):
return tf.math.multiply(a, b, name="HoleM")
def fn2(a, b... |
export const gigasecond = (startDate) => new Date(startDate.getTime() + 1e12) |
from django.contrib.admin import ModelAdmin
from django.contrib.admin.sites import AdminSite
from django.contrib.auth import get_user_model
from django.test import SimpleTestCase
from django.test.client import RequestFactory
from ....admin.mixins import LabAdminAllowedMixin
class TestLabAdminAllowedMixin(SimpleTestC... |
$(document).ready(function() {
let unicorns = $('.unicorns path');
let intro1 = $('.intro1');
function changeUnicorns(unicorn, newColor) {
TweenMax.to(unicorn, 2, { fill: newColor, opacity: Math.random() });
}
function changeColor(newColor, $this) {
for (let i = 0; i < unicorns.l... |
import os
from DennDBLib.creator import har_only_training
from DennDBLib.utils import exists_or_download
HAR_PATH = os.path.join("_dbcache_","har")
def get_har(har_path):
if not os.path.exists(har_path):
os.makedirs(har_path)
exists_or_download(os.path.join(har_path,"UCI HAR Dataset.zip"),"https:... |
// Global vars
var pymChild = null;
var isMobile = false;
var skipLabels = [ 'label', 'values', 'offset' ];
/*
* Initialize the graphic.
*/
var onWindowLoaded = function() {
formatData();
pymChild = new pym.Child({
renderCallback: render
});
pymChild.onMessage('on-screen', function(bucket) ... |
export default {"name":"--pf-c-about-modal-box__close--sm--PaddingBottom","value":"4rem","var":"var(--pf-c-about-modal-box__close--sm--PaddingBottom)"}
|
# Copyright (c) 2016,2017,2018,2019 MetPy Developers.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Contains a collection of generally useful calculation tools."""
import functools
from operator import itemgetter
import numpy as np
from numpy.core.numeric import ... |
#!/usr/bin/env python2
# coding: utf-8
"""Test Semantics."""
import os
import unittest
from triton import *
def checkAstIntegrity(instruction):
"""
This function check if all ASTs under an Instruction class are still
available.
"""
try:
for se in instruction.getSymbolicExpressions():
... |
var Code = require('code'),
Lab = require('lab'),
lab = exports.lab = Lab.script(),
describe = lab.experiment,
// beforeEach = lab.beforeEach,
// before = lab.before,
// after = lab.after,
it = lab.test,
expect = Code.expect,
nock = require('nock'),
fixtures = require('../fixtures');
var Org = requ... |
from django.conf.urls.defaults import *
from cash.controllers import ExpenseController as controller
urlpatterns = patterns('',
(r'^stats$', controller.stats),
(r'^calc$', controller.calc),
(r'^monthCalc$', controller.monthCalc),
(r'^sixMonthCalc$', controller.sixMonthCalc),
url(r'^list$', controll... |
"use strict";
(function () {
app.controller("RondaCtrl", [
"$scope",
"$q",
"$log",
"$rootScope",
"$PptClient",
function (
$scope,
$q,
$log,
$rootScope,
$PptClient
) {
$scope.validacion = ... |
# ParentID: 1052014
# ObjectID: 1000001
# Character field ID when accessed: 193000000
# Object Position Y: 182
# Object Position X: 287
|
import numpy as np
import h5py
DATA_PATH = ".."
def load_dataset():
dataset = h5py.File(DATA_PATH, "r")
train_set_x_orig = np.array(dataset["train_img"][:])
train_set_y_orig = np.array(dataset["train_label"][:])
test_set_x_orig = np.array(dataset["test_img"][:])
return train_set_x_orig, train_se... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from .box_head import ROI_BOX_HEAD_REGISTRY, build_box_head
from .keypoint_head import (
ROI_KEYPOINT_HEAD_REGISTRY,
build_keypoint_head,
BaseKeypointRCNNHead,
KRCNNConvDeconvUpsampleHead,
)
from .mask_head import (
ROI_MASK_HEAD... |
const fs = require('fs');
const readline = require('readline');
const semver = require('semver')
const core = require('@actions/core');
const { Octokit, App } = require("octokit");
const github = require('@actions/github');
async function getVersionsFromChangelog(changelogFilePath) {
const fileStream = fs.createRe... |
"""Query the datapath about its current state."""
# System imports
# Third-party imports
from pyof.foundation.base import GenericMessage
from pyof.foundation.basic_types import BinaryData, UBInt16
# Local imports
from pyof.v0x01.common.header import Header, Type
from pyof.v0x01.controller2switch.common import (Aggre... |
'use strict';
/**
* Module dependencies.
*/
var _ = require('lodash'),
path = require('path'),
config = require(path.resolve('./config/config')),
errorHandler = require(path.resolve('./modules/core/server/controllers/errors.server.controller')),
mongoose = require('mongoose'),
passport = require('pa... |
from requests import Session, Response, exceptions
import webbrowser
import re
from unittest.mock import Mock
from generallibrary import loads
from generalbrowser.assets.base.client_and_server import _GeneralClientAndServer
from generalfile import Path
class GeneralClient(_GeneralClientAndServer):
""" Client me... |
var App=function(){var t,e=!1,o=!1,a=!1,i=!1,n=[],l="../assets/",s="global/img/",r="global/plugins/",c="global/css/",d={blue:"#89C4F4",red:"#F3565D",green:"#1bbc9b",purple:"#9b59b6",grey:"#95a5a6",yellow:"#F8CB00"},h=function(){"rtl"===$("body").css("direction")&&(e=!0),o=!!navigator.userAgent.match(/MSIE 8.0/),a=!!nav... |
import "./App.css";
import LeftHeader from "./components/leftHeader/LeftHeader";
import NotesList from "./components/notesList/NotesList";
import RightHeader from "./components/rightHeader/RightHeader";
import TextEditor from "./components/textEditor/TextEditor";
import { BrowserRouter as Router, Switch, Route } from "... |
define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var JavaScriptMode = require("./javascript").Mode;
var Tokenizer = require("../token... |
def VieAleatoireStop():
MoveRandomTimer.stopClock()
|
(function(d){ const l = d['th'] = d['th'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"","Align cell text to the bottom":"","Align cell text to the center":"","Align cell text to the left":"","Align cell text to the middle":"","Align cell text to the right":"","Align cell text to the top":"","Ali... |
define(["exports","./boot.js"],function(_exports,_boot){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.calculateSplices=calculateSplices;/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http:/... |
import chess
import reconchess
from reconchess.bots.trout_bot import TroutBot
from reconchess_tools.example_bot.bot import MhtBot
def play(p1, p2):
winner_color, win_reason, history = reconchess.play_local_game(p1(), p2())
winner = "Draw" if winner_color is None else chess.COLOR_NAMES[winner_color]
print... |
# -*- coding:utf-8 -*-
#--
# Copyright (c) 2012-2014 Net-ng.
# All rights reserved.
#
# This software is licensed under the BSD License, as described in
# the file LICENSE.txt, which you should have received as part of
# this distribution.
#--
import imghdr
import peak.rules
from nagare.i18n import _, _L
from nagare ... |
import React from 'react';
import {
Link
} from 'react-router';
import MyInfoNavbar from './MyInfoNavbar';
class MyNote extends React.Component {
render() {
return (<div>
<MyInfoNavbar title="我的笔记" action=""/>
<div>您还没有笔记</div>
</div>)
}
}
export default MyNote;
|
import sys
from setuptools_scm import get_version
# example: 1.0b5.dev225
def main():
windows = len(sys.argv) > 1 and "win" in sys.argv[1] # Special case windows to 0.1.6225
scm_full_version = get_version(root="..", relative_to=__file__)
# scm_full_version = "1.0.5.dev22"
left_full_version = scm_f... |
import React from 'react';
import translate from '../../../translate/translate';
import { connect } from 'react-redux';
import {
copyCoinAddress,
copyString,
apiElectrumKeys,
loginWithPin,
triggerToaster,
} from '../../../actions/actionCreators';
import Store from '../../../store';
import mainWindow from '../... |
const Intern = require('../lib/Intern');
describe("Intern", () => {
describe("Initialization / Constructor", () => {
it("Should create an object with properties name, ID, and email set to their respective arguments when called with the 'new' keyword", () => {
const name = 'Emma';
... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sun Jun 30 14:24:37 2019
@author: shaheer
"""
from flask import Flask,render_template,request,redirect,jsonify
import numpy as np
import pandas as pd
import pickle as p
from keras.models import load_model
import gensim.models.word2vec as wv
from keras imp... |
import unittest
import logging
from parameterized import parameterized_class
import numpy as np
import pandas as pd
from pandas import Series, DataFrame
from scipy import sparse
from backend.common.utils.type_conversion_utils import (
get_encoding_dtype_of_array,
get_schema_type_hint_of_array,
get_dtypes_... |
// Copyright 2018 The Abseil Authors.
//
// 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 agr... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import cherrypy
from cherrypy.lib import auth_basic
import json
import random
with open('config.json') as json_file:
data = json.load(json_file)
data['username']
data['password']
class Root(object):
@cherrypy.expose
def index(self):
return random.choice([
'よろづのことは... |
#!/usr/bin/env python3
"""Command logging functionality."""
import logging
FORMAT = "%(asctime)-15s: %(message)s"
formatter = logging.Formatter(FORMAT)
def setup(bot):
"""Sets up the extension."""
@bot.listen("on_command")
async def log_command(ctx):
message = (f"{ctx.message.content} | "
... |
import re
import sys
from typing import Optional
import attr
import pytest
from attrs_strict import type_validator
@pytest.mark.parametrize(
("type_", "good_value", "bad_value", "error_msg"),
[
(
str,
"str",
0xBAD,
f"value must be {str} (got 2989 that ... |
/*!
* OpenUI5
* (c) Copyright 2009-2019 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["../base/ManagedObject","sap/base/assert"],function(e,t){"use strict";var r={};var i=["sap.ui.comp.navpopover.SmartLink","sap.m.Link","sap.m.Label","sap.m... |
ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(acequire, exports, module) {
"use strict";
var oop = acequire("../lib/oop");
var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;
var DocCommentHighlightR... |
import React from 'react';
import IndexHeader from 'components/IndexHeader';
import Helmet from 'react-helmet';
export default () => (
<div>
<Helmet title="About Quran.com" />
<IndexHeader noSearch />
<div className="about-text container-fluid">
<div className="row">
<div className="col-md-... |
/*
* =========================================================================
* Copyright 2019 T-Mobile, US
*
* 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/lice... |
const readYaml = require('../read-yaml')
jest.mock('fs', () => {
const defaultConfig = `root: .
page:
`
const fs = {}
const existsSync = jest.fn()
existsSync.mockReturnValueOnce(true).mockReturnValueOnce(false)
fs.existsSync = existsSync
fs.readFileSync = jest.fn(() => defaultConfig)
return fs
})
test('... |
// Copyright 2015 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.
Polymer({
is: 'history-list',
properties: {
// The search term for the current query. Set when the query returns.
searchedTerm: {
type:... |
"""
MIT License
Copyright (c) 2021 Jake Sichley
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, merge, publish, ... |
(this["webpackJsonp@scaffold-eth/react-app"]=this["webpackJsonp@scaffold-eth/react-app"]||[]).push([[0],{1192:function(e,a){e.exports={messages:{"(The 6-day early exit fee has been waived. Network fees apply.)":"\u062a\u0645 \u0625\u0639\u0641\u0627\u0621 \u0631\u0633\u0648\u0645 \u0627\u0644\u0633\u062d\u0628 \u0627\u... |
//Mock localStorage
function localStorageMock() {
var storage = {};
Object.defineProperties(storage, {
setItem: {
value: function(key, value) {
storage[key] = value || '';
},
enumerable: false,
writable: true
},
getItem: {
value: function(key) {
return storage[key];
},
enumerable: f... |
'use strict';
const { expect } = require('chai');
const AwsDriverError = require('../lib/aws-driver-error');
describe('AwsDriverError', function() {
it('should set all properties', function() {
const cause = new Error('Oops');
const details = { foo: 'bar' };
const message = 'important message';
co... |
# generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "waypoint_loader"
PROJECT_SPACE_DIR = ... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# ========================================================================
"""
Copyright and other protections apply. Please see the accompanying
:doc:`LICENSE <LICENSE>` and :doc:`CREDITS <CREDITS>` file(s) for rights
and restrictions governing use of this software. All... |
/*
* This header is generated by classdump-dyld 1.0
* on Sunday, June 7, 2020 at 11:25:49 AM Mountain Standard Time
* Operating System: Version 13.4.5 (Build 17L562)
* Image Source: /System/Library/PrivateFrameworks/AppStoreDaemon.framework/AppStoreDaemon
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 ... |
#!/usr/bin/env python
""" See the file "LICENSE" for the full license governing this code.
Copyright 2011-2021 Ken Farmer
"""
#adjust pylint for pytest oddities:
#pylint: disable=missing-docstring
#pylint: disable=unused-argument
#pylint: disable=attribute-defined-outside-init
#pylint: disable=protected-access
#pyl... |
from dagster import ScheduleDefinition, pipeline, repository, solid
@solid
def do_something():
...
@pipeline
def do_it_all():
do_something()
do_it_all_schedule = ScheduleDefinition(
cron_schedule="0 0 * * *", pipeline_name="do_it_all"
)
@repository
def do_it_all_repository():
return [do_it_all, ... |
from sage.all import *
from Crypto.Util.number import getPrime, bytes_to_long
pin = bytes_to_long(b'{Wonder what goes here}')
e = 3
while True:
p = getPrime(512)
q = getPrime(512)
phi = (p-1)*(q-1)
try:
d = inverse_mod(e,phi)
break
except:
pass
N = p*q
print('Can you recover... |
// Copyright (c) 2021 Visiosto oy
// Licensed under the MIT License
import React from 'react';
import { App } from '@visiosto/react-components';
import 'normalize.css';
import checkHash from './src/util/anchor-link/checkHash';
import { colors } from './src/theme';
import scroller from './src/util/anchor-link/scrolle... |
"""
Examples code for experimenting with options to the csv.read() and csv.write() methods
"""
import csv
# Function that prints 2D table to console
def print_table(table):
"""
Echo a nested list to the console
"""
for row in table:
print(row)
# Options for reading a CSV file
def read_csv... |
#!/usr/bin/env python
'''
Created on 6Sep.,2016
@author:
'''
import argparse, re, os
def main():
'''Do something'''
print "running the main routine"
'''Get command line arguments'''
parser = argparse.ArgumentParser()
parser.add_argument("bases", help= "Maximum number of bases separating SNP... |
"""
WSGI config for mytodo 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.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTIN... |
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
public: { url: '/', static: true },
src: { url: '/dist' },
},
plugins: ['@snowpack/plugin-sass', '@snowpack/plugin-typescript'],
install: [
/* ... */
],
installOptions: {
installTypes: true,
},
devOptions: ... |
from allauth.socialaccount.providers.oauth.urls import default_urlpatterns
from .provider import EtsyProvider
urlpatterns = default_urlpatterns(EtsyProvider)
|
import torch
from scripts.study_case.ID_4.torch_geometric.data import Batch
from scripts.study_case.ID_4.torch_geometric.nn import max_pool_x, max_pool
def test_max_pool_x():
cluster = torch.tensor([0, 1, 0, 1, 2, 2])
x = torch.Tensor([[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]])
batch = torch.tens... |
from .isotope import Isotope
|
'use strict';
/**
* @module browser-command/generic-browser-commands
* @desc Defines custom browser commands that are made available through the global WebdriverIO browser object.
*/
const genericBrowserCommands = {
/**
* @function waitForVisible
* @desc waitForVisible on multiple elements
* @since 1.0.... |
#!/usr/bin/env vpython3
# Copyright 2019 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.
'''Unit test suite that collects all test cases for Polymer.'''
import os
import sys
CUR_DIR = os.path.dirname(os.path.realpath(__f... |
from __future__ import with_statement
import datetime
from django.conf import settings
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.http import Http404
from django.db import connection
from cms.models.placeholdermodel import Placeholder
from django import ... |
from typing import List
from pathlib import Path
import warnings
from datetime import datetime
import pytest
from compose.cli.command import project_from_options
from compose.container import Container
from compose.project import Project
from compose.service import ImageType
class ContainersAlreadyExist(Exception):
... |
from datetime import datetime
from aiogram import types
from aiogram.dispatcher import FSMContext
from aiogram.utils.exceptions import (MessageCantBeDeleted,
MessageToDeleteNotFound)
from app.api_client.exceptions import ServiceNotResponse
from app.core.misc import bot, api_clien... |
"""Livelossplot version number"""
__version__ = "0.5.5"
|
/*!
* FileInput Japanese Translations
*
* This file must be loaded after 'fileinput.js'. Patterns in braces '{}', or
* any HTML markup tags in the messages must not be converted or translated.
*
* @see http://github.com/kartik-v/bootstrap-fileinput
* @author Yuta Hoshina <hoshina@gmail.com>
*
* NOTE: ... |
var o = require('./proto');
o.z = 0;
var x:string = o.x;
var Bar = require('./function');
var a = new Bar(234);
a.x = 123;
a.y = 'abc'; // error, needs to be declared in Bar's constructor
(a.getX(): number);
(a.getY(): string);
|
/*
* Copyright IBM Corp. All Rights Reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
'use strict';
const cpcontract = require('./lib/carcontract.js');
module.exports.contracts = [cpcontract];
|
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
compat_str,
ExtractorError,
int_or_none,
str_or_none,
url_or_none,
)
import re
class EurozetArticleIE(InfoExtractor):
IE_NAME = 'eurozet:article'
_VALID_URL = r'https?://(?:[a-z... |
module.exports={A:{A:{"1":"C B A","2":"H E G WB"},B:{"1":"D u g I J K"},C:{"1":"0 1 2 3 4 5 6 I J K Y P f Q R S T U V W X v Z a b c d e O N h i j k l m n o p q r s t y L","2":"UB z F M H E G C B A D u g SB RB"},D:{"1":"0 1 2 3 4 5 6 Z a b c d e O N h i j k l m n o p q r s t y L GB AB CB VB DB EB","132":"F M H E G C B A... |
import requests
def readme():
resp = requests.get("https://raw.githubusercontent.com/JohnLockwood/getting-started-with-poetry/master/poetry-lambda-layer/README.rst")
if resp.status_code == requests.status_codes.codes.OK :
return resp.text
else:
return "Unable to get README content, stat... |
"""Support for Overkiz awnings."""
from __future__ import annotations
from typing import Any, cast
from pyoverkiz.enums import OverkizCommand, OverkizState
from homeassistant.components.cover import (
ATTR_POSITION,
DEVICE_CLASS_AWNING,
SUPPORT_CLOSE,
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
SUPPO... |
def delta(state, letter):
states, inputs = ['A', 'B', 'C', 'D', 'E'], ['b', '0', '1']
transition = [
['E', 'B', 'E'],
['C', 'E', 'E'],
['E', 'D', 'D'],
['E', 'D', 'D'],
['E', 'E', 'E']
]
return transition[states.index(state)][inputs.index(letter)]
def fsa(word):
... |
"""
WSGI config for fishkanban 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_SE... |
import { Link } from "react-router-dom";
import styled from "styled-components";
export const Header = styled.div`
background-color: rgba(0, 0, 0, 0.5);
`;
export const Form = styled.div`
width: 400px;
height: 400px;
background-color: yellow;
`;
export const Card = styled.div`
padding: 20px;
width: 100%;
... |
from dataclasses import dataclass, field
@dataclass
class Issue:
title: str
author: str
labels: list[str] = field(default_factory=list)
def __post_init__(self):
if len(self.title) < 1:
raise ValueError('Invalid title')
if len(self.author) < 1:
raise ValueError(... |
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
from typing import List, Pattern
import regex
from recognizers_number import BaseNumberExtractor, PortugueseCardinalExtractor
from recognizers_text.utilities import RegExpUtility
from ...resources.portuguese_date_t... |
import Gmaps from './components/gmaps';
import Marker from './components/marker';
import InfoWindow from './components/info-window';
import Circle from './components/circle';
import Polyline from './components/polyline';
import Polygon from './components/polygon';
export {Gmaps, Marker, InfoWindow, Circle, Polyline, P... |
// Author(s): Jeroen Keiren
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// 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)
//
/// \file sume... |
// Copyright 2018 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.
// clang-format off
// #import 'chrome://resources/cr_elements/cr_search_field/cr_search_field.m.js';
//
// #import {flush} from 'chrome://resources/polym... |
# Copyright (c) Facebook, Inc. and its affiliates.
import os
import pickle
import re
from collections import OrderedDict
from copy import deepcopy
from dataclasses import dataclass
from enum import Enum
from typing import Any
import torch
import torchvision
from mmf.common.registry import registry
# from mmf.models.fr... |
/* jshint -W097 */
/* jshint -W030 */
/* jshint strict:true */
/* jslint node: true */
/* jslint esversion: 6 */
'use strict';
const shellyHelper = require('../shelly-helper');
/**
* Default, used from all Shelly devices Gen 1
* https://shelly-api-docs.shelly.cloud/gen1/
*/
let defaultsgen1 = {
'gen': {
coap... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import warnings
from hestia.list_utils import to_list
from marshmallow import ValidationError, fields, validates_schema
from polyaxon_schemas.base import BaseConfig, BaseSchema
from polyaxon_schemas.ops.environments.outputs impo... |
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = r'Y\k\o N j\a'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = r'Y\k\o N j\a, H:i'
YEAR_MONTH_FORMAT = r'Y\k\o ... |
/**
* @copyright Copyright (c) 2021 Maxim Khorin (maksimovichu@gmail.com)
*/
'use strict';
const Base = require('areto/base/Base');
module.exports = class ClassVersion extends Base {
static create (source) {
const name = source.data.version;
const target = source.meta.getClass(name);
if... |