text stringlengths 3 1.05M |
|---|
#!/usr/bin/env python
# encoding: utf-8
'''
@file: test.py
@time: 2021/6/18 8:51
@author: SaKuraPan_
@desc:
'''
import requests
url = 'http://0.0.0.0:27519/1000/intent'
test_list = ['连接扫描仪','密码过期','密码过期','奖励管理','工作台','帮助','WiFi、无线网络','文件无法打开','邮件撤回','密码过期','4A被篡改','无法登录数据中心','移动应用','IE浏览器','Excel表报错','Excel... |
// Copyright (c) 2014-2017 The ClintonCash developers
// Distributed under the MIT software license, see the accompanying
#ifndef CCASHNTONCASH_HDCHAIN_H
#define CCASHNTONCASH_HDCHAIN_H
#include "key.h"
#include "sync.h"
/* hd account data model */
class CHDAccount
{
public:
uint32_t nExternalChainCounter;
ui... |
/*
* Copyright 2009-2017 Alibaba Cloud 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... |
var Dlgs = {};
//improved app.CreateYesNoDialog
CreateConfirmDialog = function( title, choices, callback ) {
var dlg = app.CreateDialog( title );
dlg.reply = null; dlg.btn = null; dlg.btns = [];
dlg.SetOnTouch = function( callback ) { dlg.callback = callback; };
dlg.Cancel = function() {
this.Dismiss();
if( ... |
#pragma once
#include <unordered_map>
#include <ichor/Service.h>
#include <ichor/optional_bundles/logging_bundle/Logger.h>
#include <ichor/optional_bundles/timer_bundle/TimerService.h>
#include <chrono>
namespace Ichor {
struct StatisticEntry {
StatisticEntry() = default;
StatisticEntry(int64_t _... |
#!/usr/bin/env python3
import os
import signal
import subprocess
import sys
import time
from typing import List, cast
import requests
import cereal.messaging as messaging
import selfdrive.manager as manager
from cereal import car
from common.basedir import BASEDIR
from common.params import Params
from selfdrive.car.c... |
# Steps to get the deleted forecast files
# Step 0: open terminal at the root directory of the project
# Step 1: git log --diff-filter=D --summary -- "data-processed" > code/misc/file_delete.txt
# Step 2: python code/misc/extract_deletion_information.py
import pandas as pd
from itertools import groupby, chain
from dat... |
module.exports = [
'youtube',
'd.tube',
];
|
// Copyright 2021 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.
/**
* @fileoverview Defines constants used throughout the tutorial.
*/
/**
* The various curriculums for the ChromeVox tutorial.
* @enum {string}
*/... |
/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'undo', 'lt', {
redo: 'Atstatyti',
undo: 'Atšaukti'
});
|
def kwtest(*args, **kwargs):
return kwargs
def function_with_a_dash():
pass
|
define({
"commonCore": {
"common": {
"add": "Dodaj",
"edit": "Uredi",
"save": "Spremi",
"next": "Sljedeće",
"cancel": "Odustani",
"back": "Natrag",
"apply": "Primijeni",
"close": "Zatvori",
"open": "Otvori",
"start": "Početak",
"loading": "Učitavan... |
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
"""
Created on 2 Mar. 2018
@author: oliver
"""
class ClassifiedLine(object):
"""
classdocs
"""
def __init__(self, filename, line_number, classification):
"""
Constructor
"""
self.filename = filename
self.line_number = line_number
self.classification = ... |
#!/usr/bin/env python
# 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.
class TemplateWriter(object):
'''Abstract base class for writing policy templates in various formats.
The methods of this clas... |
"""timeresp_test.py - test time response functions"""
from copy import copy
from distutils.version import StrictVersion
import numpy as np
import pytest
import scipy as sp
import control as ct
from control import StateSpace, TransferFunction, c2d, isctime, ss2tf, tf2ss
from control.exception import slycot_check
from... |
// flow-typed signature: ba8fc1878461afd950f39a34054cee81
// flow-typed version: <<STUB>>/localtunnel_v1.8.1/flow_v0.43.1
/**
* This is an autogenerated libdef stub for:
*
* 'localtunnel'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the... |
import sys
if sys.version_info < (3, 6):
raise ImportError("Can't use AsyncMinHashLSH module. Python version should be >=3.6")
import os
import asyncio
from itertools import chain
from datasketch.storage import UnorderedStorage, OrderedStorage, _random_name
from abc import ABCMeta
ABC = ABCMeta('ABC', (object,... |
from .answer_types import AnswerTypes
from .database import Database
from .emotions import Emotions
from .bot import Bot, Bots
from .sentence import Sentence
from .category import Category
from .entries import Entries
from .domain import Domains |
from dags.spark.union_transactions import union_transactions
from dags.spark.enrich_transactions import enrich_transactions
from dags.spark.filter_countries import filter_countries
def test_filter_countries(spark):
spark.sql("USE tst_app").collect()
union_transactions(spark, "tst")
enrich_transactions(spa... |
import { __removeClass, __toggleClass } from '../lib/utils';
import Component from './component';
export default class TemplateClass extends Component {
constructor(id, element, opts) {
super(element);
this.id = id;
this.opts = Object.assign({}, Card.defaults, opts);
}
init() {
console.log (... |
from oeqa.oetest import oeSDKTest, skipModule
from oeqa.utils.decorators import *
from oeqa.utils.targetbuild import SDKBuildProject
def setUpModule():
if not oeSDKTest.hasPackage("gtk\+"):
skipModule("Image doesn't have gtk+ in manifest")
class SudokuTest(oeSDKTest):
@classmethod
def setUpClass(... |
#!/Users/robertpoenaru/.pyenv/shims/python
import numpy as np
import matplotlib.pyplot as plt
def Omega_Rot(spin, I1):
return float(spin / I1)
def Omega_Wob(spin, I1, I2, I3):
w_rot = Omega_Rot(spin, I1)
delta = float((I1 - I2) * (I1 - I3))
I23 = I2 * I3
w_wob = w_rot * np.sqrt(delta / I23)
... |
from collections import Counter
from math import sqrt
from pymath.get_next_prime import get_next_prime
def is_triangle_number(number):
"""
Checks if a number is a triangle number, Returns False fo any input that is not an integer
An example
>>> is_triangle_number(8)
False
Returns False for ... |
import numpy as np
from statsmodels.base import model
import statsmodels.base.wrapper as wrap
class DimReductionRegression(model.Model):
def __init__(self, endog, exog, **kwargs):
super(DimReductionRegression, self).__init__(endog, exog, **kwargs)
def _prep(self, n_slice):
# Sort the data by... |
#include "network/client.h"
void diep(char *s)
{
perror(s);
exit(1);
}
/* diep(), #includes and #defines like in the server */
void launch_client()
{
struct timeval start,checkpoint;
long long diff;
struct sockaddr_in si_other;
int s, slen=sizeof(si_other);
char buf[BUFLEN];
int i;
int id = 0;
int lost =... |
// ==================================================
// GazeImg v1.4.2
//
// 采用 GPLv3 许可证供开源使用
// 或用于商业用途的 GazeImg 商业许可证
// 所有商业应用程序(包括您计划出售的网站,主题和应用程序)
// 都需要具有商业许可证。
//
// Licensed GPLv3 for open source use
// or GazeImg Commercial License for commercial use
//
// http://www.ganxiaozhe.com/p/gazeimg/
// Copyright 2... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = require("express");
function helloApi() {
const api = express_1.Router();
api.get('/', (req, res) => {
const body = {
express: 'Hello From Express from TS'
};
res.json(body);
})... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
# -*- coding: utf-8 -*-
#
#
# BEGIN CONFIG
# ------------
#
# REQUIRED: Your class/lab name
classname = "VDI the F5 Way"
# OPTIONAL: The URL to the GitHub Repository for this class
github_repo = "https://github.com/dungfucious/f5-agility-labs-vdi-2018"
# OPTIONAL: Google Analytics
# googleanalytics_id = 'UA-85156643-... |
# Copyright 2019 Huawei Technologies Co., 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 applicable law or agreed to... |
import pytest
import yfinance
from sqlalchemy import Column, ForeignKey, Integer, String, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from app.backtest import Backtest, IngestConfig
from app.exceptions import ConfigError
def test_configure(backtest_co... |
var tape = require('tape')
, workerFarm = require('../')
, childPath = require.resolve('./child')
, fs = require('fs')
, uniq = function (ar) {
var a = [], i, j
o: for (i = 0; i < ar.length; ++i) {
for (j = 0; j < a.length; ++j) if (a[j] == ar[i]) continue o
a[a.lengt... |
from ruamel.yaml import YAML
def parse_options(path_to_options_file):
with open(path_to_options_file, 'r') as f:
yaml = YAML()
options = yaml.load(f)
return options |
function createDAExamRegister()
{
// var school_id;
var school_name;
if($("#is_private").val() =="true" ){
// school_id = $("#selected_school_id").val();
school_name = $("input[name=private_school_name]").val();
}
else{
// school_id = 0;
school_name = " ";
}
v... |
class InvalidUsage(Exception):
def __init__(self, message, logger):
Exception.__init__(self)
logger.error(message)
|
'use strict';
const { expect } = require('chai');
const { randomBytes } = require('crypto');
const signing = require('../signing');
const { Transaction, Block, Blockchain } = require('../blockchain');
describe('Blockchain module', function() {
describe('Transaction', function() {
let signer = null;
let re... |
import matplotlib.pyplot as plt
import torch
from torchvision import datasets
import numpy as py
dataset=datasets.MNIST('../data')
x=dataset.data[8888]
print(x.shape)
#print("pic info",x)
#x.save("imageexample.png") |
(function () {
'use strict';
/* jshint undef: true, unused: true */
/* globals QUnit, Rx, asyncTest, start, equal, ok, RSVP */
QUnit.module('toPromise');
var Observable = Rx.Observable;
asyncTest('promise Success', function () {
var source = Observable.just(42);
var promise = source.toPromise(RSV... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
load("bf4b12814bc95f34eeb130127d8438ab.js");
load("93fae755edd261212639eed30afa2ca4.js");
// Copyright (c) 2012 Ecma International. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es5id: 15.2.3.3-2-29
description: >
Object.getOwnPropertyDescriptor - argument 'P' i... |
import React from "react";
export default (({
styles = {},
...props
}) => <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" style={{
width: "1.5rem",
height: "1.5rem"
}} {...props}><path d="M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2zm-4.561 8.561a1.5 1.5 0 1 1 .486.325 1.5 1.5 0 0 1-.486-.325zM15 17H... |
import asyncio
import aiohttp
from pyrogram import Filters, Message
from userbot import UserBot
from userbot.helpers.PyroHelpers import ReplyCheck, GetChatID
from userbot.plugins.help import add_command_help
@UserBot.on_message(Filters.command(['pat', 'pats'], '.') & Filters.me)
async def give_pats(bot: UserBot, me... |
# -*- coding: utf-8 -*-
# Quod Libet Telepathy Plugin
# Copyright 2012 Nick Boultbee, Christoph Reiter
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation
import os
if os.name == "nt"... |
/* @flow */
export default function getPrefixedKeyframes(
browserName: string,
browserVersion: number,
cssPrefix: string
): string {
const prefixedKeyframes = 'keyframes'
if (
(browserName === 'chrome' && browserVersion < 43) ||
((browserName === 'safari' || browserName === 'ios_saf') &&
browse... |
import sys
from subprocess import PIPE
from delfino.constants import PYPROJECT_TOML_FILENAME
from delfino.execution import OnError, run
if sys.version_info <= (3, 8):
import importlib_metadata as metadata
else:
from importlib import metadata
def pyproject_toml_key_missing(key: str):
return f"Key '{key}'... |
import React, { useCallback, useEffect, useState } from "react";
import UserHeader from "./UserHeader";
import { Link } from "react-router-dom";
import {
getParticipantbyUser,
updateParticipant,
} from "../config/api/vaccine-post";
import { toast } from "react-toastify";
import Loading from "../style/Loading";
impo... |
# Copyright(C) 1999-2020 National Technology & Engineering Solutions
# of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
# NTESS, the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provide... |
# Generated by Django 3.1.1 on 2021-02-15 14:31
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... |
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace CLRSketcher {
/// <summary>
/// Summary for PenDialog
///
/// WARNING: If you change ... |
import sys
import fileinput
import requests
import json
from bs4 import BeautifulSoup
# perform a lookup of the site against Bluecoat and return the current category
# note: Bluecoat will rate-limit you if there are lots of requests.
class SiteReview(object):
def __init__(self):
self.baseurl = "http://site... |
# Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Martin Barisits, <m... |
// NPM modules
import React, { createContext, useReducer } from 'react'
// Components
import LoginReducer from './LoginReducer'
// Initial login state.
const initialState = {
userName: '',
isClientLoggedIn: false
}
// Create login context
export const LoginContext = createContext(initialState)
// Create the pro... |
// ----------------------------------------------------------------------
//
// Copyright (C) 2010 Fons Adriaensen <fons@linuxaudio.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
// the Free Software Foundat... |
--eval
|
from django.db import models
from django.db.models.fields import related
class DeferredCommit(object):
"""Differentiates a non-direct related object that should be deferred
during the commit phase.
"""
def __init__(self, value):
self.value = value
def __repr__(self):
return '<Defe... |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... |
char* writeInMemories(int position, char* buffer, int tam_buffer);
char* readMemories(int position, int tam);
char* executeInstruction(char* instruction, char** params);
char* sendMessageToNode(int port, char* message);
int isSair(char* input);
char* findInstruction(char* socketMessage);
char** findParams(char* socketM... |
function view_transaction_logs( appraisal_id, user_id )
{
$.blockUI({ message: loading_message(),
onBlock: function(){
var data = {
appraisal_id: appraisal_id,
user_id:user_id
};
$.ajax({
url: base_url + module.get('route'... |
# -*- coding: utf-8 -*-
"""
.. _tut-event-arrays:
Working with events
===================
This tutorial describes event representation and how event arrays are used to
subselect data.
As usual we'll start by importing the modules we need, loading some
:ref:`example data <sample-dataset>`, and cropping the :class:`~m... |
import pickle
from typing import Any, List
import torch
__all__ = ['to_byte_tensor', 'serialise_byte_tensor', 'deserialise_byte_tensor']
def to_byte_tensor(data: Any, *, device='cuda') -> torch.ByteTensor:
return torch.ByteTensor(
torch.ByteStorage.from_buffer(pickle.dumps(data) # gets a byte representatio... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><circle cx="20" cy="12" r="2" /><circle cx="4" cy="12" r="2" /><circle cx="12" cy="20" r="2" /><path d="M13.943 8.619l4.4045-4.3919 1.4122 1.4162-4.4044 4.392zM8.32 9.68l.31.32 1.42-1.41-4... |
const fs = require("fs")
const AWS = require("aws-sdk")
var s3Key = ""
var s3Secret = ""
var buck = 'awsbois2'
//takes a file path to be uploaded
function Upload(filepath) {
var isErr = false
var errData = {}
var theLog = fs.readFileSync(filepath)
var s3 = new AWS.S3();
var manUp = s3.upload({ Bucket: buck,... |
# coding=utf-8
# Copyright 2019 The Google Research 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
import React, { useEffect, useMemo } from 'react'
import { Errors } from 'forge-core'
import { useHistory, useLocation, useParams } from 'react-router'
import { useMutation } from 'react-apollo'
import { Box, Text } from 'grommet'
import { LoopingLogo } from '../utils/AnimatedLogo'
import { CREATE_OAUTH } from './qu... |
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 28, 2021 at 9:04:26 PM Mountain Standard Time
* Operating System: Version 14.5 (Build 18L204)
* Image Source: /System/Library/PrivateFrameworks/PhotosForm... |
import React from "react"
import { Element } from "react-scroll"
import { Link } from "gatsby"
import Layout from "../../../components/layout"
import SEO from "../../../components/seo"
import ExternalLink from "../../../components/external-link"
const VotingGuide = () => (
<Layout title="Our Proposals" color="yello... |
"""
pilink - OSC to midi for the Raspberry Pi
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... |
#!/usr/bin/python3
# Copyright (C) 2016 Hong Xu <hong@topbug.net>
# This file is not part of GNU Emacs.
# 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
# the Free Software Foundation, either version 3 of the License, or
# ... |
# Dictionary Comprehension em Python - ( compreensão de dicionários)
print('-=-'* 30)
# exemplo 1
l1 = [ ('chave1','valor1'), ('chave2','valor2'), ]
d1 = {x: y for x, y in l1}
print(d1)
print('-=-'* 30)
# exemplo 2 - Gerando SET
d1 = {x for x in range(5)}
print(d1, type(d1))
print('-=-'* 30)
# exemplo 2- Gerando D... |
/**
* 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 "A... |
import platform
from typing import List, Optional
import attr
from click.utils import LazyFile
from junit_xml import TestCase, TestSuite, to_xml_report_file
from ..models import Status
from ..runner import events
from .handlers import EventHandler, ExecutionContext, get_unique_failures
@attr.s(slots=True) # pragma... |
from decimal import Decimal
_ = lambda x:x
#from i18n import _
from uwallet.wallet import WalletStorage, Wallet
from uwallet.util import format_satoshis, set_verbosity, StoreDict
from uwallet.bitcoin import is_valid, COIN, TYPE_ADDRESS
from uwallet.network import filter_protocol
import sys, getpass, datetime
# minimal... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python version: 3.6
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import copy
import numpy as np
from torchvision import datasets, transforms
import torch
from utils.sampling import mnist_iid, mnist_noniid, cifar_iid
from utils.options import a... |
// Copyright (c) 2020 The Jaeger 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agree... |
import { createGlobalStyle } from 'styled-components'
export const GlobalStyle = createGlobalStyle`
*{
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Original Surfer', cursive;
html, body {
... |
# Copyright 2021, Guillermo Adrián Molina
#
# 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 ... |
# While
passwd = input("Please enter a password : ")
print("Ok, Password Seved")
password = input("Please enter your password : ")
while password != passwd:
print("Wrong Password ! :( ")
password = input("Please re enter your password : ")
if password == passwd:
print("\nLogin Succes... |
var map = { "type": "FeatureCollection", "features": [
{ "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[67.6416, 34.2564], [67.8546, 34.1448], [67.9595, 34.1657], [68.0324, 34.203], [68.0692, 34.1904], [68.1838, 34.0946], [68.1289, 34.0114], [68.1452, 33.9563], [68.2304, 33.9269], [68.28... |
import React from 'react';
import ReactDOM from 'react-dom';
import PositionSelect from '../components/PositionSelect';
import PosModel from '../components/PosModel';
// import {PositionSelect,PosModel} from "../tmp/index";
import { spaceTree, spaceTree2, space3, initData,init2 } from '../mockData';
import 'antd-mobil... |
const toPull = require('stream-to-pull-stream')
const { ipcRenderer, remote } = require('electron')
const readdir = require('recursive-readdir')
const fs = require('fs-extra')
const path = require('path')
const screenshotHook = require('./screenshot')
const connectionHook = require('./connection-status')
const { COUNTL... |
#!/usr/bin/env python3
import os
import time
def ensure_st_up_to_date():
from panda import Panda, PandaDFU, BASEDIR
with open(os.path.join(BASEDIR, "VERSION")) as f:
repo_version = f.read()
repo_version += "-EON" if os.path.isfile('/EON') else "-DEV"
panda = None
panda_dfu = None
while 1:
# bre... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
def prefix_with_hash(apps, schema_editor):
Season = apps.get_model("competition", "Season")
for season in Season.objects.exclude(hashtag__isnull=True):
season.hashtag... |
/*
* MIT License
*
* Copyright (c) 2018 VisualGPS, LLC
*
* 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, modi... |
export default {
props: {
filters: {
type: Array,
required: true
},
},
methods: {
selectFilters(headers, filterValueField) {
let statusFilters = [];
headers.filter(header => !!header.filterName).forEach(header => {
header.isFiltered = this.filters.some(filter => filter ... |
Prism.languages['t4-vb'] = Prism.languages['t4-templating'].createT4('vbnet');
|
doc = dict(
__class__="""
The naive Bayes classifier assumes independence between predictor variables
conditional on the response, and a Gaussian distribution of numeric predictors with
mean and standard deviation computed from the training dataset. When building a naive
Bayes classifier, every row in the training ... |
class GRU(nn.Module): # Implement a stacked GRU RNN
"""
Follow the same instructions as for RNN (above), but use the equations for
GRU, not Vanilla RNN.
"""
def __init__(self, emb_size, hidden_size, seq_len, batch_size, vocab_size, num_layers, dp_keep_prob):
super(GRU, self).__init__()
# TODO ======... |
from __future__ import unicode_literals
import re
import pytz
from unittest import skipUnless
from mezzanine.core.middleware import FetchFromCacheMiddleware
from mezzanine.core.templatetags.mezzanine_tags import initialize_nevercache
from mezzanine.utils.cache import cache_installed
from mezzanine.utils.sites import ... |
# 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 t... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "m4 18 8.5-6L4 6v12zm9-12v12l8.5-6L13 6z"
}), 'FastForwardSharp'); |
(function($) {
"use strict"; // Start of use strict
// Open book animation
$('#open-book-button').click(function(){
$('.book span').addClass('animation');
setTimeout(function(){
window.open('knjiga.pdf','_self');
}, 3000);
})
})(jQuery); // End of use strict
|
"""
Dict array is a recursive dict array (numpy or torch.Tensor).
Example:
x = {'a': [1, 0, 0], 'b': {'c': {'d': [1, 0, 0]}}}
In the replay buffer, each key with non-dict value is a
np.ndarray with shape == [capacity, *(element_shape)]
(if element is scalar, then shape == [capacity])
"""
import numpy as np
from .s... |
"use strict";
/*!
* @license
* Copyright 2018 Alfresco Software, 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... |
# -*- coding: utf-8 -*-
"""Command line interface for Bio2BEL PFAM.
Why does this file exist, and why not put this in ``bio2bel_pfam.__main__``?
You might be tempted to import things from ``bio2bel_pfam.__main__`` later,
but that will cause problems - the code will get executed twice:
- When you run ``python3 -m bi... |
from setuptools import setup
setup(name='devhttp',
version='0.0.1', # version string
description='Development HTTP Server Library',
url='https://github.com/shearern/devhttp',
author='Nathan Shearer',
author_email='shearern@gmail.com',
license='MIT',
packages=['devhttp', 'devht... |
// ==UserScript==
// @name VedaZilla
// @namespace https://github.com/d-faure/VedaZilla/
// @version 0.21.4
// @description Veda guild's quick'n'dirty (Violent|Tamper)Monkey userscript for MountyHall
// @author disciple
// @copyright 2019+
// @match http://games.mountyhall.com/*
// @match ... |
import VueRouter from 'vue-router';
import Root from './pages/Root.vue'
import Character from './pages/Character.vue'
export default new VueRouter({
mode: "history",
routes: [
{ path: "/", component: Root },
{ path: "/character", component: Character },
{ path: "/character/:slug", comp... |
import{r as t,h as s,H as i,g as a}from"./p-33b9aa6b.js";import{Logger as e,Hub as n}from"@aws-amplify/core";import{A as r}from"./p-417bb5ea.js";import{appendToCognitoUserAgent as o,Auth as h}from"@aws-amplify/auth";import"./p-956a9917.js";import{T as c,U as u,A as l,N as p}from"./p-900152ca.js";import{d as m,o as f}fr... |
print("1. 다음 코드의 실행 결과는 무엇입니까?")
print("a=0\nif a:\n print(\"1\")\nelse:\n print(\"2\")")
a=0
if a:
print("1")
else:
print("2")
print("")
print("2. 다음과 같은 결과를 출력하는 프로그램을 작성하세요.")
#*
#**
#***
#****
#*****
count=0
while count<5:
count=count+1
for i in range(count):
print("*",end="",)
print()
print("")
print... |