text stringlengths 3 1.05M |
|---|
# Generated by Django 2.2.1 on 2019-09-11 11:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('common', '0004_auto_20190911_1145'),
]
operations = [
migrations.AlterField(
model_name='channel',
name='order',
... |
from nltk.tokenize import word_tokenize
class TextParser:
def tokenize(input):
list = word_tokenize(input)
return list
def extractKeywords(list):
stopList = set(line.strip() for line in open('stoplist'))
filtered_words = [word for word in list if word not in stopList]
... |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/calibration.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf... |
import argparse
import sys, os
import imageio
import tensorflow as tf
import Classification_BatchDataset
import TensorflowUtils as utils
import pickle
import time
from tensorflow.keras.models import Sequential, Model
from tensorflow.keras.layers import Conv2D, MaxPool2D, Dropout, Flatten, Dense, Input, Lambda,Batch... |
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/resiliencehub/ResilienceHub_EXPORTS.h>
#include <aws/resiliencehub/ResilienceHubRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
#include <aws/... |
from rl_coach.agents.rainbow_dqn_agent import RainbowDQNAgentParameters
from rl_coach.base_parameters import VisualizationParameters, PresetValidationParameters
from rl_coach.core_types import EnvironmentSteps
from rl_coach.environments.environment import SingleLevelSelection
from rl_coach.environments.gym_environment ... |
export default function (value, defaultValue) {
if (!value) {
return defaultValue
}
return value
}
|
import tensorflow as tf
class Attention(object):
"""A generic attention module for a decoder in seq2seq models"""
def __init__(self, dim, use_tanh=False, C=10,_name='Attention',_scope=''):
self.use_tanh = use_tanh
self._scope = _scope
with tf.variable_scope(_scope+_name):
#... |
from typing import Any, Dict, List, Optional, Union
import httpx
from ...client import AuthenticatedClient
from ...models.audit import Audit
from ...types import UNSET, Response, Unset
def _get_kwargs(
*,
client: AuthenticatedClient,
limit: Union[Unset, None, int] = UNSET,
actor: Union[Unset, None, ... |
import React from 'react';
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import Home from './pages/home/';
import Cart from './pages/cart';
import Header from './components/Header';
import colors from './styles/colors';
const Routes = createAppC... |
import React from "react";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import ckeditor, { CKEditor } from "@ckeditor/ckeditor5-react";
//Bootstrap and jQuery libraries
import "bootstrap/dist/css/bootstrap.min.css";
import "jquery/dist/jquery.min.js";
import $ from "jquery";
class EditArticle extends ... |
import React, {Component, lazy, Suspense, Fragment} from "react";
import Button from "antd/es/button"; // 加载 JS
import "antd/es/button/style"; // 加载 LESS
// Context 可以让我们无须明确地传遍每一个组件,就能将值深入传递进组件树。
// 为当前的 theme 创建一个 context(“primary”为默认值)。
// 只有当组件所处的树中没有匹配到 Provider 时,其 defaultValue 参数才会生效。这有助于在不使用 Provider 包装组件的情况下对... |
#ifndef LIBC_SYS_CDEFS_H
#define LIBC_SYS_CDEFS_H
#include <shared/cdefs.h>
#endif
|
'use strict';
const expect = require('chai').expect;
const PluginManager = require('../../lib/classes/PluginManager');
const Serverless = require('../../lib/Serverless');
const Create = require('../../lib/plugins/create/create');
const path = require('path');
const fse = require('fs-extra');
const execSync = require(... |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for
# full license information.
import getopt
class OptionError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def ge... |
const Alexa = require('ask-sdk-core');
const i18n = require('i18next');
const LaunchRequestHandler = {
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === "LaunchRequest";
},
handle(handlerInput) {
console.log("Launch Request Handler Called");
let speechText =
"Hell... |
"""
Helper functions to close (i.e. claim rewards from) all mines
of a given user
"""
from src.common.logger import logger
from src.common.txLogger import txLogger, logTx
from src.helpers.sms import sendSms
from src.helpers.instantMessage import sendIM
from src.common.clients import makeCrabadaWeb3Client
from src.help... |
module.exports = {
// 为我们提供运行环境,一个环境定义了一组预定义的全局变量
env: {
browser: true,
es6: true
},
// 一个配置文件可以被基础配置中的已启用的规则继承。
// extends: ['airbnb', 'plugin:prettier/recommended'],
extends: ['airbnb', 'prettier', 'prettier/react'],
// 自定义全局变量
globals: {
_: true,
$: true
},
// ESLint 默认使用Espree作为其... |
"""
WSGI config for storyteller 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/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_S... |
import { XLabel } from './label';
import { XFormElem } from './form-elem';
import $ from 'jquery';
/**
* Instantiates a new XInfo to show additional information for a given field
* @class
* @augments XFormElem
*/
function XInfo(text, type) {
XLabel.call(this, text);
this.type = type;
}
XInfo.prototype = Objec... |
import functools
import math
import warnings
import numpy as np
import cupy
from cupy.cuda import cufft
from cupy.fft import config
from cupy.fft._cache import get_plan_cache
_reduce = functools.reduce
_prod = cupy.core.internal.prod
@cupy._util.memoize()
def _output_dtype(dtype, value_type):
if value_type !=... |
"""
``fn.monad.Option`` represents optional values, each instance of
``Option`` can be either instance of ``Full`` or ``Empty``.
It provides you with simple way to write long computation sequences
and get rid of many ``if/else`` blocks. See usage examples below.
Assume that you have ``Request`` class that gives yo... |
# Platform-specific build configurations.
load("@com_google_protobuf//:protobuf.bzl", "proto_gen")
load("//tensorflow:tensorflow.bzl", "clean_dep", "if_not_windows")
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda")
load("@local_config_rocm... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 16 11:39:35 2019
@author: shrinidhikr
"""
import speech_recognition as sr
import cv2
#import firebase_con as fb
#import os
import numpy as np
def database_con(write_data,name,obs):
file = open(name+".txt","w")
file.writelin... |
import { assert } from "@jsenv/assert"
import { urlToExtension } from "@jsenv/util"
{
const actual = urlToExtension("http://example.com/dir/file.js?page=1")
const expected = ".js"
assert({ actual, expected })
}
{
const actual = urlToExtension("http://example.com/dir/file.")
const expected = "."
assert({ a... |
"""
Authors M Sanner
March 2010
copyright TSRI
usage: python mkMesh PDBFile
"""
""" Graham Modified the mesh settings 8/30/10 to make the thin proteins show up and the proteins in general very light weight. Proteins with details like glycosylation or lipids fare best with
isovalue = ~3, resolution = -0.3, and grid... |
require('./abi-test')
require('./download-test')
require('./gypbuild-test')
require('./pack-test')
require('./rc-test')
require('./strip-test')
require('./upload-test')
require('./util-test')
|
import numpy as np
from kamodo import Kamodo, kamodofy, gridify
import time
from scipy.interpolate import RegularGridInterpolator, interp1d
from datetime import datetime,timedelta
# pip install pytiegcm
from tiegcm.tiegcm import TIEGCM
# 'UN', 'VN', 'O1', 'NO', 'N4S', 'HE', 'NE', 'TE', 'TI', 'TEC', 'O2', 'O2P_ELD', ... |
const assert = require('assert');
const tasks = require('../src/04-date-tasks');
it.optional = require('../extensions/it-optional');
describe('04-date-tasks', () => {
it.optional('parseDataFromRfc2822 should parse rfc2822 string into a date value', () => {
assert.equal(
tasks.parseDataFromRfc2822('December... |
from django.shortcuts import render, redirect
from django.contrib.auth import login,authenticate,logout
from django.contrib.auth.decorators import login_required
from django.contrib import messages
from .models import *
def index(request):
return render(request, 'user_account/index.html')
#registration and login... |
import numpy as np
class ContigencyMatrix:
def __init__(self, y_true, y_pred):
"""
Contigency matrix calculated as intersection of indices
Matrix:
rows: prediction labels
cols: ground truth labels
Example:
ground truth labels: [0,0,0,1,1,1]
... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'table', 'zh', {
border: '框線大小',
caption: '標題',
cell: {
menu: '儲存格',
insertBefore: '前方插入儲存格',
insertAfter: '後方插入儲存格',
deleteCell: '刪除儲存格',
... |
function WebSocketFileUploader(file_container, block_size)
{
// Initialize
var uploader = this;
var cancelled_upload;
var paused_upload;
var wsc;
var reader;
var start_time;
var file;
var file_index;
var start_file_index;
var file_progress_bar = $('.file_progress_bar', file_container);
va... |
import logging
from optparse import Values
from typing import List
from pip._vendor.packaging.utils import canonicalize_name
from pip._internal.cli import cmdoptions
from pip._internal.cli.base_command import Command
from pip._internal.cli.req_command import SessionCommandMixin, warn_if_run_as_root
from pip._internal... |
from panda3d.core import *
from direct.interval.IntervalGlobal import *
from BattleBase import *
from BattleProps import *
from BattleSounds import *
from toontown.toon.ToonDNA import *
from toontown.suit.SuitDNA import *
from direct.directnotify import DirectNotifyGlobal
import random, MovieCamera, MovieUtil
from Movi... |
module.exports = {
process(src, filename) {
return `module.exports = '${filename}';`;
},
getCacheKey(src, filename) {
return filename;
}
};
|
#!/usr/bin/env python
# Copyright (c) 2013 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.
import argparse
import multiprocessing
import os
import posixpath
import sys
import urllib2
import buildbot_common
import build_ve... |
import React from 'react';
import { connect } from 'react-redux';
import { reduxForm, getFormValues } from 'redux-form';
import * as ExpensesAction from '../../actions';
import * as CategoriesAction from '../../../settings/actions';
import { colors } from '@/styles';
import { Expenses } from '../../components/Expenses'... |
class AppTestRandom:
spaceconfig = {
"usemodules": ['_random', 'time'],
}
def test_dict(self):
import _random
_random.__dict__ # crashes if entries in __init__.py can't be resolved
def test_random(self):
import _random
# XXX quite a bad test
rnd = _rand... |
/**
* CSS-JSON Converter for JavaScript
* Converts CSS to JSON and back.
* Version 2.1
*
* Released under the MIT license.
*
* Copyright (c) 2013 Aram Kocharyan, http://aramk.com/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (t... |
import React from 'react';
import { Link } from '../router/HnRouter';
export default class HomePage extends React.Component {
constructor(props) {
super(props);
this.state= {
number: 0
}
this.btnClickHandler= this.btnClickHandler.bind(this);
}
btnClickHandler() {
if(this.state.number == 5) {
t... |
#!/usr/bin/python3
"""Change chromosome names in BigWig header from ENSEMBL or NCBI to UCSC."""
import argparse
import os
import sys
import pyBigWig
from resolwe_runtime_utils import send_message, warning
MAPPINGS_DIR = "/opt/chrom_mappings/assets/"
MAPPINGS_FILES = {
"Homo sapiens": [
"GRCh38.p12_ensemb... |
import contextlib
import pytest
from celery.result import AsyncResult
from django.urls import reverse
from rozbieznosci_dyscyplin.admin import (
DYSCYPLINA_AUTORA,
OFFLOAD_TASKS_WITH_THIS_ELEMENTS_OR_MORE,
SUBDYSCYPLINA_AUTORA,
RozbieznosciViewAdmin,
parse_object_id,
ustaw_druga_dyscypline,
... |
from django.db import models
# Create your models here.
class Item(models.Model):
text = models.TextField(default='')
|
/* Copyright (C) 2013-2016, The Regents of The University of Michigan.
All rights reserved.
This software was developed in the APRIL Robotics Lab under the
direction of Edwin Olson, ebolson@umich.edu. This software may be
available under alternative licensing terms; contact the address above.
Redistribution and use i... |
const glob = require('glob')
const mongoose = require('mongoose')
const config = require('./config')
mongoose.Promise = Promise
console.log(`Connecting to database: ${config.db}`)
mongoose.connect(config.db, { useNewUrlParser: true, useUnifiedTopology: true, useCreateIndex: true })
module.exports.db = mongoose.conne... |
from typing import Union, List, Optional
from pyspark.sql.types import (
StructType,
StructField,
StringType,
ArrayType,
DateType,
BooleanType,
DataType,
)
# This file is auto-generated by generate_schema so do not edit manually
# noinspection PyPep8Naming
class MeasureSchema:
"""
... |
# Copyright 2021 The HuggingFace Team. 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 applicabl... |
import net from "@utils/net";
import { CALL_WEBSOCKET } from "@constants/constants";
import { Socket } from "wya-socket";
import { EventStore } from 'wya-ps';
import API_ROOT from "@stores/apis/root";
import { Message } from "iview";
// eslint-disable-next-line import/no-cycle
import { getCallTab, mousePosition, handle... |
import tensorflow as tf
import numpy as np
from tf_nn_distance import nn_distance
class GroupPointTest(tf.test.TestCase):
def test(self):
pass
def test_grad(self):
with self.test_session():
pts_1 = np.random.random((4, 128, 3)).astype(np.float32)
pts_2 = np.random.random((4, 128... |
/*************************************************************************/ /*!
@Title Hardware defs for SGX540.
@Copyright Copyright (c) Imagination Technologies Ltd. All Rights Reserved
@License Dual MIT/GPLv2
The contents of this file are subject to the MIT license as set out below.
Permission... |
import { ReduceStore } from 'flux/utils';
import Dispatcher from '../common/dispatcher/Dispatcher';
class AnalyticsStore extends ReduceStore {
getInitialState () {
return {
isSignedIn: false,
};
}
getIsSignedIn () {
const { isSignedIn } = this.getState();
return isSignedIn;
}
reduce ... |
import paramiko
class lazy_sftp_connect :
"""SFTP connection for lazy_SFTP"""
def __init__(self, host_name, username, password, port) :
self.host_name, self.username, self.password, self.port = host_name, username, password,port
def __enter__(self) :
self.transport = paramiko.Tran... |
/*页面的ready函数执行之后再执行*/
$(function () {
// checkbox 事件绑定
if ($(".check-box").length > 0) {
$(".check-box").iCheck({
checkboxClass: 'icheckbox-blue',
radioClass: 'iradio-blue',
});
}
// radio 事件绑定
if ($(".radio-box").length > 0) {
$(".radio-box").iCheck... |
import { Reflection } from "../util/Reflection"
const RESTOCK_PERIOD = 20 * 60 * 1000
// if at least RESTOCK PERIOD has passed, reset inventories
class TraderRestock {
constructor(ai, gameEngine) {
this.ai = ai
this.gameEngine = gameEngine
this.lastTime = 0
}
run(aliveActors, time... |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistribut... |
import numpy as np
from multiprocessing import Process, Pipe
from . import VecEnv, CloudpickleWrapper
from baselines.common.tile_images import tile_images
import time
USE_IMMITATION_ENV = True
if USE_IMMITATION_ENV:
from TDCFeaturizer import TDCFeaturizer
from train_featurizer import generate_dataset
def work... |
import sqlite3
DATABASE_NAME = "./data/oil_and_gas.db"
def get_db():
conn = sqlite3.connect(DATABASE_NAME)
return conn |
import React,{useEffect, useMemo,useState} from 'react';
import axios from 'axios';
const MemoHook =()=>{
const [data,setData] = useState("");
const [toggle,setToggle] = useState(false);
useEffect(()=>{
axios.get("https://jsonplaceholder.typicode.com/comments")
.then((response)=>{
... |
mycallback( {"CONTRIBUTOR OCCUPATION": "Retired Attorney", "CONTRIBUTION AMOUNT (F3L Bundled)": "2500.00", "ELECTION CODE": "P2012", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "N/A", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "225 Greenspring Valley Rd", "CONTRIBUTOR MIDDLE NAME": "M.", "DONOR CANDIDATE FEC ID"... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
__author__ = ("Boyan Zhou (boyanzhou1992@gmail.com)")
__version__ = '1.1'
__date__ = '01 June 2021'
import argparse
import os
def arg_parsed():
parser = argparse.ArgumentParser(prog="LongStrain",
description=
... |
import unittest
import logging
import os
import os.path
import numpy as np
import numpy.testing as nptest
import yaml
from skpar.core.parameters import get_parameters, update_template
from skpar.core.parameters import update_parameters, substitute_template
logging.basicConfig(level=logging.DEBUG)
logging.basicConfig(f... |
const router = require("express").Router();
const { User, Post, Comment } = require("../models");
const sequelize = require("../config/connection");
const withAuth = require("../utils/auth");
//home route server homepage
router.get("/", (req, res) => {
console.log("herreee")
//we need to get all posts
Post.find... |
import Factory from './gameobjects/shape/customshapes/Factory.js';
import Creator from './gameobjects/shape/customshapes/Creator.js';
import CustomShapes from './gameobjects/shape/customshapes/CustomShapes.js';
import SetValue from './utils/object/SetValue.js';
class CustomShapesPlugin extends Phaser.Plugins.BasePlugi... |
cities = [
'Rome',
'Milan',
'Naples',
'Turin',
'Palermo',
'Genoa',
'Bologna',
'Florence',
'Catania',
'Bari',
'Messina',
'Verona',
'Padova',
'Trieste',
'Brescia',
'Prato',
'Taranto',
'Reggio Calabria',
'Modena',
'Livorno',
'Cagliari',
... |
from powerline_shell.themes.default import DefaultColor
class Color(DefaultColor):
"""Basic theme which only uses colors in 0-15 range"""
USERNAME_FG = 8
USERNAME_BG = 15
USERNAME_ROOT_BG = 1
HOSTNAME_FG = 8
HOSTNAME_BG = 7
HOME_SPECIAL_DISPLAY = False
PATH_BG = 8 # dark grey
PA... |
'use strict';
const Users = require('./users');
// const users = new Users();
module.exports = (req, res, next) => {
if(!req.headers.authorization) {
next('User is not loggedin');
return;
}
console.log('req.headers.authorization:::: ', req.headers.authorization);
let bearerToken =... |
import logging
import heapq
import math
import numpy as np
from collections import defaultdict
from google.appengine.ext import ndb
from consts.award_type import AwardType
from consts.district_point_values import DistrictPointValues
from consts.event_type import EventType
from helpers.event_helper import EventHelpe... |
import { mount } from '@vue/test-utils';
import MockDate from 'mockdate';
import base from '@/examples/calendar/demos/base.vue';
import card from '@/examples/calendar/demos/card.vue';
import cell from '@/examples/calendar/demos/cell.vue';
import cellAppend from '@/examples/calendar/demos/cell-append.vue';
import contro... |
# Tests event stream operations
#
# Copyright (c) 2015 Aubrey Barnard. This is free software. See
# LICENSE for details.
import itertools as itools
import unittest
from . import data
from esal import engine
from esal import streams
class EventStreamOperationsTest(unittest.TestCase):
def test_collect_sequence... |
import typing as t
from ....extensions import ExtensionMixin
from ...extensions.admin import AdminExtension, AdminFlarumUserMixin
from ...flarum.core.forum import Forum
from ...flarum.core import BaseFlarumIndividualObject
from ....error_handler import parse_request
class Achievement(BaseFlarumIndividualObject):
... |
# This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import datetime
from enum import Enum
import six
from crypto... |
({}.a = b);
(({}.a = b)());
(function () {}.a = b);
((function () {}.a = b)());
|
import sqlite3
import urllib
import re
from urllib.request import urlopen
from bs4 import BeautifulSoup, NavigableString
import nltk
nltk.download('punkt')
from nltk import sent_tokenize
def parseRes2(soup, title, url, cur, author, date, collectiontitle):
chapter = 0
sen = ""
num = 1
[e.extract() fo... |
!function(e){const i=e.el=e.el||{};i.dictionary=Object.assign(i.dictionary||{},{"%0 of %1":"",Aquamarine:"",Black:"","Block quote":"Περιοχή παράθεσης",Blue:"",Bold:"Έντονη","Bulleted List":"Λίστα κουκκίδων",Cancel:"Ακύρωση","Centered image":"","Change image text alternative":"Αλλαγή εναλλακτικού κείμενου","Choose headi... |
import requests
STATES = [
'created',
'waiting',
'processing',
'success', # end state
'failed', # end state
'cancelled' # end state
]
AC_CALLBACK_TYPES = [
'started',
'files_retrieved',
'processed',
'results_sent'
]
DC_CALLBACK_TYPES = [
'starte... |
import pygame
class Button:
DARK_GREY = (29,29,29)
def __init__(self, screen, x, y, width, height, text="", color=(DARK_GREY), hover=()):
self.screen = screen
self.clicked = False
self.height = height
self.width = width
self.text = text
self.color = color
... |
import os
import time
import sys
import cv2
import requests
import numpy as np
class Detector():
def __init__(self, winName = None, DELTA_COUNT_THRESHOLD = 1000, pathToSave = None,
freq_t = 3, freq_count = 1, secs_to_alert = 3, triggerAlert = None):
self.start_time = time.time(... |
from tests.support.asserts import assert_error, assert_success
from tests.support.inline import inline
_input = inline("<input id=i1>")
def get_element_property(session, element_id, prop):
return session.transport.send(
"GET", "session/{session_id}/element/{element_id}/property/{prop}".format(
... |
from click.testing import CliRunner
from regparser.commands.outline_depths import outline_depths
def test_produces_usage_message_with_no_arg():
result = CliRunner().invoke(outline_depths)
assert result.exit_code == 2
assert 'Usage' in result.output
def test_returns_simple_result_for_a_simple_outline():... |
// 向上滚动的时候显示header
// Navigation Scripts to Show Header on Scroll-Up
jQuery(document).ready(function ($) {
var MQL = 1170;
//primary navigation slide-in effect
if ($(window).width() > MQL) {
var headerHeight = $('.navbar-custom').height();
$(window).on('scroll', {
prev... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import MintUI from 'mint-ui'
import '../node_modules/mint-ui/lib/style.css'
import axios from 'axios'
im... |
import io
import time
import threading
import time
w=320
h=240
class myThread (threading.Thread):
def __init__(self,threadID,name):
threading.Thread.__init__(self)
self.threadID = threadID
self.name = name
self._stop = threading.Event()
self._req = threading.Event()
self.frames = [open(f + '.jpg', 'rb').r... |
import React from "react";
import Decks from "../../../../components/views/ShipStructure/core";
const DecksWrapped = ({ selectedSimulator: sim }) => {
return (
<div className="decks">
<Decks simulator={sim} />
</div>
);
};
export default DecksWrapped;
|
#!/usr/bin/env node
const OctoDash = require("octodash")
const packageJSON = require("./package.json")
const ReleaseService = require("./lib/services/release-service")
const ProjectHelper = require("./lib/helpers/project-helper")
const semverHelper = require("./lib/helpers/semver-helper")
const Spinner = require("./li... |
# -*- coding: utf-8 -*-
# Copyright 2017, IBM.
#
# This source code is licensed under the Apache License, Version 2.0 found in
# the LICENSE.txt file in the root directory of this source tree.
"""
controlled-rz gate.
"""
from qiskit import Gate
from qiskit import QuantumCircuit
from qiskit._instructionset import Inst... |
/* IMPORT */
import Puzzle from '../dist/index.js';
/* MAIN */
const main = async ( difficulty, iterations ) => {
console.time ( 'generation' );
for ( let i = 0; i < 1000000; i++ ) {
await Puzzle.generate ( difficulty );
}
console.timeEnd ( 'generation' );
const totalStart = Date.now ();
let ... |
//
// VENHomePageSignViewController.h
// XingTingYi
//
// Created by YVEN on 2020/1/29.
// Copyright © 2020 Hefei Haiba Network Technology Co., Ltd. All rights reserved.
//
#import "VENBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface VENHomePageSignViewController : VENBaseViewController
@end
NS_ASSUME_... |
var _ = require('lodash')
var events = require('events')
var fs = require('fs')
var filesize = require('filesize')
var Gamedig = require('gamedig')
var usage = require('pidusage')
var fsExtra = require('fs.extra')
var Gamedig = require('gamedig')
var glob = require('glob')
var path = require('path')
var slugify = requi... |
"""
Useful form fields for use with the mongoengine.
"""
from gettext import gettext as _
import json
import sys
from wtforms import widgets
from wtforms.fields import SelectFieldBase, TextAreaField, StringField
from wtforms.validators import ValidationError
from mongoengine.queryset import DoesNotExist
from mongoeng... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
#ifndef CULTURAL_UNION_H
#define CULTURAL_UNION_H
#include "newParser.h"
namespace mappers
{
class CulturalUnion: commonItems::parser
{
public:
explicit CulturalUnion(std::istream& theStream);
[[nodiscard]] const auto& getUnion() const { return theUnion; }
private:
std::string culture;
std::vector<std... |
const User = require('./user');
const Zone = require('./zone');
const Collection = require('./collection');
const Players = require('./players');
const {Image, Dice} = require('./cards');
const {Union, Duplicator} = require('./union');
const EventEmitter = require('events');
const {makeId, shuffle, getRandomInt} = requ... |
'use strict';
const NotFoundError = require('../../lib/error/notfound-error');
module.exports = () => {
const _strategies = [{ name: 'default', editable: false, parameters: {} }];
return {
getStrategies: () => Promise.resolve(_strategies),
getEditableStrategies: () =>
Promise.reso... |
"""A collection of ZeroMQ servers
test_notification_service - send out notifications of test status changes
- Registers a PULL socket that model.py sends notifications of tests to.
- Registers a PUB socket that broadcasts notifications to cluster_api websocket subscribers.
console_monitor_service - monitor the cons... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
"use strict";
// Third Party
const include = require("include")(__dirname);
module.exports = config => Object.freeze({
preview() {
return include("api/markup/preview")(config);
}
});
|
/* include the enumerator headers. */
#include "enum.h"
#include "enum-thread.h"
#include "enum-write.h"
/* state_div(): divide the size of a thread state into uniform pieces,
* storing the result into the index of the thread state.
*
* arguments:
* @state: thread state to operate on.
* @len: number of element... |
from flask import render_template
from . import main
@main.errorhandler(403)
def forbidden_access(error):
'''
Function to handles 403 error
'''
return render_template('errors.html',error='page')
@main.errorhandler(404)
def four_Ow_four(error):
'''
Function to handles 404 error
'''
ret... |
import pandas as pd
import cv2
df = pd.read_csv("Inception.csv")
namelist = df['n'].tolist()
reglist = df['r'].tolist()
worklist = df['a'].tolist()
for i in range(len(namelist)):
image = cv2.imread("scam.png")
cv2.putText(image,'PERMITS ONE',(650,60+45),cv2.FONT_HERSHEY_SIMPLEX,0.5,(0,0,0),1,cv2.... |