text stringlengths 3 1.05M |
|---|
/*!
* Simple-Jekyll-Search
* Copyright 2015-2020, Christian Fei
* Licensed under the MIT License.
*/
!function(){"use strict";var f={compile:function(r){return i.template.replace(i.pattern,function(t,e){var n=i.middleware(e,r[e],i.template);return void 0!==n?n:r[e]||t})},setOptions:function(t){i.pattern=t.... |
/**
* @file codec_zstd.h
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2018-2021 Omics Data Automation, Inc.
*
* 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 Softwa... |
/*!
* Ext JS Library 3.0.3
* Copyright(c) 2006-2009 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
/**
* @class Ext.tree.TreeNodeUI
* This class provides the default UI implementation for Ext TreeNodes.
* The TreeNode UI implementation is separate from the
* tree implementation, and allows... |
from django.http import HttpResponse
import subprocess
def index(request):
return HttpResponse("Hello, world. You're at the query index.")
def numUavs(request):
cmd = '''cat /simulation/inputs/parameters/swarm.sh | grep num_uavs | grep -o -E '([0-9]|[1-9][0-9])' | tail -n1 '''
try:
p1 = subprocess.Popen(['ca... |
# coding=utf-8
# Copyright 2022 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... |
/*
* @lc app=leetcode id=151 lang=javascript
*
* [151] Reverse Words in a String
*/
// @lc code=start
/**
* @param {string} s
* @return {string}
*/
var reverseWords = function(s) {
// Regex capture group for words
// then reverse
// O(n) time
// O(n) space
return s.match(/\w+/g).revers... |
const baseUrl = window.g.ApiUrl
export { baseUrl }
|
OPUS_MONO_DA = {
"date" : "18-10-2019",
"data" : "opus_mono_da",
"corpuses": {
"bible-uedin": {
"url": "https://object.pouta.csc.fi/OPUS-bible-uedin/v1/mono/da.txt.gz",
"md5_checksum": "f037e2987b9b6eb6d2ef5500a1415bbb",
"size": 1207703,
"file_extensio... |
import Layout from '@/layout';
const systemRouter = {
path: '/system',
redirect: '/system/institution',
component: Layout,
alwaysShow: true,
name: 'system',
meta: {
title: '系统管理',
icon: 'table',
roles: ['admin']
},
children: [
{
path: 'institution',
component: () => import('... |
var searchData=
[
['modo_5fexecutar',['MODO_EXECUTAR',['../main_8c.html#a0d6e3476df2238905c1272b7330fc84c',1,'main.c']]]
];
|
import axios from "axios";
import { GET_MEDIA_LOAD, GET_MEDIA_SUCCESS, GET_MEDIA_FAIL, HANDLE_MODAL_IS_OPEN } from "../constants/actionTypes";
import { BASE_MOVIE, BASE_TVSHOW } from "../constants/api";
export const getMedia = (id, mediaType) => async (dispatch) => {
try {
dispatch({ type: GET_MEDIA_LOAD }... |
const $newTodo = document.querySelector('#new-todo-title');
const $todoCount = document.querySelector('.todo-count strong');
const $filter = document.querySelector('.count-container .filters');
const $todoList = document.querySelector('#todo-list');
let timer;
let todoList;
let renderList;
let selection = 'all';
const... |
import os
from automation.parse_spark_configs import extract, serialize
def test_extract():
curr_path = os.path.dirname(__file__)
with open(os.path.join(curr_path, '__snapshots__', 'spark_confs.md'), 'r') as f:
spark_conf_markdown = f.read()
result = extract(spark_conf_markdown)
assert not r... |
# Copyright DataStax, Inc.
#
# 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, softwa... |
/**
* @ngdoc controller
* @name Umbraco.Editors.Dictionary.CreateController
* @function
*
* @description
* The controller for creating dictionary items
*/
function DictionaryCreateController($scope, $location, dictionaryResource, navigationService, notificationsService, formHelper, appState) {
var vm = th... |
"""ADUROLIGHT Adurolight_NCC device."""
from zigpy.profiles import zha
from zigpy.profiles.zha import DeviceType
from zigpy.quirks import CustomDevice
from zigpy.zcl.clusters.general import Basic, Groups, Identify, LevelControl, OnOff
from zigpy.zcl.clusters.lightlink import LightLink
from zhaquirks.const import (
... |
import json
from collections import namedtuple
from typing import Union, Dict
from unittest.mock import call, patch, MagicMock
import httpretty
import pytest
from slack_sdk.errors import SlackApiError
from slack_sdk.web import SlackResponse
import reconcile
from reconcile.utils.slack_api import SlackApi, MAX_RETRIES,... |
import collections
from copy import copy
from pprint import pformat as prettyformat
from functools import partial
from itertools import chain
from pathlib import Path
import warnings
import gc
import xarray as xr
import animatplot as amp
from matplotlib import pyplot as plt
from matplotlib.animation import PillowWrite... |
exports.info = { FormatID: '1023',
FormatName: 'netCDF-3 64-bit',
FormatVersion: '',
FormatAliases: '',
FormatFamilies: '',
FormatTypes: 'Dataset',
FormatDisclosure: '',
FormatDescription: 'This is an outline record only, and requires further details, research or authentication to provide information that... |
"""
Utility functions for the training process
@author: DevelopmentSeed
Code modified from Keras module
"""
import numpy as np
import tensorflow.keras
import tensorflow.keras.backend as K
import tensorflow as tf
from sklearn.metrics import (precision_recall_fscore_support,
#f1_score, fb... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[349],{3957:function(e,t,n){"use strict";n.r(t),n.d(t,"icon",(function(){return c}));n(12),n(4),n(2),n(6),n(3),n(10);var r=n(0),l=n.n(r);function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.proto... |
'''
File name: gin_rummy/judge.py
Author: William Hale
Date created: 2/12/2020
'''
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from .game import GinRummyGame
from typing import List, Tuple
from .utils.action_event import *
from .utils.scorers import GinRummyScorer
from .utils import melding
fr... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'CharakterWaffen.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCo... |
!function(e){function r(r){for(var n,c,u=r[0],i=r[1],f=r[2],s=0,p=[];s<u.length;s++)c=u[s],Object.prototype.hasOwnProperty.call(o,c)&&o[c]&&p.push(o[c][0]),o[c]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(r);p.length;)p.shift()();return a.push.apply(a,f||[]),t()}function t(){for(var e,r... |
/*
* 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... |
// TODO: Write code to define and export the Intern class. HINT: This class should inherit from Employee.
const Employee = require("./Employee");
class Intern extends Employee {
constructor(name, id, email, school){
super(name, id, email);
this.school = school;
}
getRole(){
retu... |
from __future__ import print_function
import argparse
import sys
from sudokutools.shell import Shell
def main():
"""Run the sudokutools shell."""
parser = argparse.ArgumentParser(description=main.__doc__)
parser.add_argument(
"filename", nargs="?",
help="If provided, commands will be re... |
import axios from "axios";
const token = localStorage.getItem("laravelMVCtoken") || null;
const axiosInstance = axios.create({
baseURL: `${process.env.MIX_APP_URL}/api/`,
timeout: 5000
});
axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
export default axiosInstance;
|
import os
import sqlite3
import time
import urllib.request
from bs4 import BeautifulSoup
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from tqdm import tqdm
class ScrollScraper:
"""
Scraper of Scroll News Articles
Dependencies: Chromedriver
Args:
driver_... |
#ifndef SPEEDOMETER_H
#define SPEEDOMETER_H
#include "Observer.h"
#include <QLCDNumber>
class Speedometer : public Observer, public QLCDNumber
{
public:
Speedometer(QWidget* parent = nullptr);
public slots:
void update(QVariant data) final;
};
#endif // SPEEDOMETER_H
|
# coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
from pants.backend.j... |
# -*- coding: utf-8 -*-
import logging
import numpy as np
from .base import BaseProcessor
from ..utils.setup_logging import setup_logging
setup_logging()
logger = logging.getLogger(__name__)
class WordVectorsProcessor(BaseProcessor):
name = u"Word Vectors Processor"
def __init__(self, corpus, word2vec_mod... |
import torch
import torch.nn as nn
import torch.nn.functional as F
class UNet(nn.Module):
def __init__(self, *args, **kwargs):
"""UNet for MRI segmentation:
For more information:
- https://www.sciencedirect.com/science/article/abs/pii/S0010482519301520?via%3Dihub
"""
s... |
# Licensed to the StackStorm, Inc ('StackStorm') 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 th... |
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///spectrum.db'
db = SQLAlchemy(app)
from spectrum import routes |
import { PageObjectSkeleton } from './skeleton.po';
const config = require('../protractor.conf').config;
describe('tro-peaks.com', () => {
// let poWelcome;
let poSkeleton;
beforeEach(async () => {
poSkeleton = new PageObjectSkeleton();
// poWelcome = new PageObjectWelcome();
await browser.loadAn... |
__all__ = ['Console']
from ._console import Console
|
export default {
data() {
return {
catalogs: null
}
},
methods: {
Catalogs() {
var self = this;
this.$root.$emit('loading', true);
axios.get('/api/catalogs')
.then(function (response) {
self.catalogs ... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[172],{Ufe5:function(c,t,a){"use strict";a.r(t);var e=a("q1tI"),n={icon:function(c,t){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.... |
from flask import Blueprint, render_template
app = Blueprint('farhan', __name__)
@app.route('/farhan')
def februariasik():
return render_template("ghifari.html") |
/*!
* @pixi/filter-fxaa - v6.1.1
* Compiled Fri, 06 Aug 2021 03:30:25 UTC
*
* @pixi/filter-fxaa is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
*/
import { Filter } from '@pixi/core';
/*! *****************************************************************************
Copyright (... |
import channels.layers
from asgiref.sync import async_to_sync
from v1.self_configurations.helpers.self_configuration import get_self_configuration
from v1.status_updates.consumers.primary_validator_updated import PrimaryValidatorUpdatedConsumer
from v1.validators.serializers.validator import ValidatorSerializer
from .... |
from izi.apps.voucher.abstract_models import (
AbstractVoucher, AbstractVoucherApplication, AbstractVoucherSet)
from izi.core.loading import is_model_registered
__all__ = []
if not is_model_registered('voucher', 'VoucherSet'):
class VoucherSet(AbstractVoucherSet):
pass
__all__.append('VoucherSet'... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... |
const async = require('async')
const mysql = require('mysql')
const db = require('./../db.json')
var connection = mysql.createConnection({
host : db.server,
user : db.user,
password : db.password,
database : db.database
})
module.exports = {
'getAllDatabaseTables': getAllDatabaseTables,
}
... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ExtensionMethods_1 = require("../ExtensionMethods");
/**
* Class Feature
*/
var SchemaChange = /** @class */ (function () {
function SchemaChange(serverVersionOrserverBuild) {
/**
* Gets the minimum server version.
... |
import React from 'react'
import getSortFunction from '../utils/sort'
import Comment from './Comment'
import SortForm from './SortForm'
function CommentList(props) {
const {
parentId,
comments,
sortForm,
onInputChange,
addCommentStart,
editCommentStart,
deleteCommentStart,
voteCommen... |
import six
import types
import inspect
from zope.interface import interface, providedBy, implementer
from foolscap.constraint import Constraint, OpenerConstraint, nothingTaster, \
IConstraint, IRemoteMethodConstraint, Optional, Any
from foolscap.tokens import Violation, InvalidRemoteInterface
from foolscap.schema... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import Fab from '@material-ui/core/Fab';
/**
*
*/
export class AuthenticationLogout extends Component {
/** */
constructor(props) {
super(props);
this.handleLogout = this.handleLogout.bind(this);
}
/** */
handleLogout()... |
from tkinter import *
# Configuración de la raíz
root = Tk()
menubar = Menu(root)
root.config(menu=menubar)
filemenu = Menu(menubar, tearoff=0)
filemenu.add_command(label="Nuevo")
filemenu.add_command(label="Abrir")
filemenu.add_command(label="Guardar")
filemenu.add_command(label="Cerrar")
filemenu.add_... |
//
// QBMPushTokenQuery.h
// MessagesService
//
// Copyright 2010 QuickBlox team. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "QBQuery.h"
@interface QBMPushTokenQuery : QBQuery {
}
@end
|
/**
******************************************************************************
* @file system_stm32f4xx.h
* @author MCD Application Team
* @version V1.0.0RC1
* @date 25-August-2011
* @brief CMSIS Cortex-M4 Device System Source File for STM32F4xx devices.
************************************... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import argparse
import src.common as commonutils
"""
PyDashing CLI Parser.
---------------------
"""
class PyDashingCli(object):
"""
PyDashing CLI Parser.
"""
def __init__(self):
"""
Initialize PyDashing CLI.
... |
import struct
import math
import renderdoc as rd
import rdtest
class D3D12_List_Alloc_Tests(rdtest.TestCase):
demos_test_name = 'D3D12_List_Alloc_Tests'
demos_frame_cap = 40
def check_capture(self):
action = self.find_action("Draw")
self.check(action is not None)
action = action... |
from django import forms
from django.conf.urls import url
from django.contrib import messages
from django.contrib.messages.views import SuccessMessageMixin
from django.http import HttpResponse, HttpResponseRedirect
from django.template import engines
from django.template.response import TemplateResponse
from dja... |
from unittest.mock import ANY
from uuid import uuid4
import graphene
import pytest
from graphene.utils.str_converters import to_camel_case
from saleor.product.error_codes import ProductErrorCode
from saleor.product.models import ProductVariant
from saleor.product.utils.attributes import associate_attribute_values_to_... |
module.exports = {
rootDir: './src',
setupFilesAfterEnv: ['<rootDir>/tests/jest.setup.js'],
verbose: true,
moduleFileExtensions: ['js', 'json', 'jsx', 'node'],
collectCoverage: true,
collectCoverageFrom: [
'<rootDir>/**/*.{js,jsx}',
'!<rootDir>/**/*.stories.js',
'!<rootDi... |
/*!
* FormValidation (http://formvalidation.io)
* The best jQuery plugin to validate form fields. Support Bootstrap, Foundation, Pure, SemanticUI, UIKit and custom frameworks
*
* @version v0.7.1-dev, built on 2015-08-01 5:22:37 PM
* @author https://twitter.com/formvalidation
* @copyright (c) 2013 - 201... |
// Copyright (C) 2021 Igalia, S.L. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-Intl.DateTimeFormat.prototype.formatToParts
description: TypeError thrown if timeZone.getOffsetNanosecondsFor is not callable
features: [Temporal]
---*/
const formatter = new ... |
"""The Test file for The New Parser (Lexing steps)."""
import pytest
import logging
from sqlfluff.core.parser import Lexer, CodeSegment, NewlineSegment
from sqlfluff.core.parser.lexer import (
StringLexer,
LexMatch,
RegexLexer,
)
from sqlfluff.core import SQLLexError, FluffConfig
def assert_matches(inst... |
/*
This code is released under the terms of the MIT license.
See COPYING.txt for details.
*/
#ifndef VERSION_H
#define VERSION_H
#define INFO_TITLE "TriStar"
#define INFO_MYNAME "Devin Acker (Revenant)\0"
#define INFO_LEGAL "Copyright 2014 by Revenant\0"
#define INFO_DESC "Kirby: Triple Deluxe map viewer... |
import unittest
PAGE_SIZE = 16
class BtreeList(object):
def __init__(self):
self._root = Page(True)
def __iadd__(self, item):
right = self._root.add_item(item)
if right is not self._root:
left = self._root
self._root = Page(False)
self._root.add_pa... |
#ifndef __DIALOGS_H
#define __DIALOGS_H
#include "include/dia.h"
enum UI_ITEMS {
UIID_BTN_CANCEL = 0,
UIID_BTN_OK,
UICFG_THEME = 10,
UICFG_LANG,
UICFG_SCROLL,
UICFG_BGCOL,
UICFG_UICOL,
UICFG_TXTCOL,
UICFG_SELCOL,
UICFG_AUTOSORT,
UICFG_COVERART,
UICFG_WIDESCREEN,
UI... |
!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";var r=n(1)["default"],o=n(2),i=r(o);window.Cignium=i["default"]},function(e,t){"use strict"... |
/*
* Class LINKED_LIST [INTEGER_32]
*/
#include "eif_macros.h"
#ifdef __cplusplus
extern "C" {
#endif
static const EIF_TYPE_INDEX egt_0_824 [] = {0xFF01,232,0xFFFF};
static const EIF_TYPE_INDEX egt_1_824 [] = {0xFF01,245,823,218,0xFFFF};
static const EIF_TYPE_INDEX egt_2_824 [] = {0xFF01,823,218,0xFFFF};
static c... |
import request from 'request'
import responseHandler from '../../helpers/responsehandler'
export default class MpesaController {
static async getAccessToken(req,res){
let url = ""
let auth = ""
request(
{
url: url,
headers: {
"A... |
import mock
import uuid
from click.testing import CliRunner
import pytest
import apd.aggregation.cli
from apd.aggregation.database import Deployment, deployment_table
@pytest.mark.functional
def test_sensors_are_passed_to_get_data_points(db_uri):
runner = CliRunner()
with mock.patch("apd.aggregation.collect... |
const got = require('@/utils/got');
const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
const { art } = require('@/utils/render');
const path = require('path');
// 各地区url信息
const basicInfoDict = {
绵竹市: {
rootUrl: 'https://www.mz.gov.cn',
infoUrl: 'https://www.mz... |
def test_gvgaiENV():
try:
import gym
import gym_gvgai
env = gym.make('gvgai-aliens-lvl0-v0')
env.reset()
action_id = env.action_space.sample()
env.step(action_id)
return True
except Exception as er:
assert False, er
|
import React from 'react'
import { Link } from 'gatsby'
const FeaturesMatchDate = () => {
return (
<div className="features-section">
<div className="container1">
<div className="wrap">
<div className="description">
<h2>Reasons to Use ... |
/* The contents of this file are subject to the Netscape Public License
* Version 1.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.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS"
*... |
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
import re
import upsidedown
VERSION = str(upsidedown.__version__)
(AUTHOR, EMAIL) = re.match('^(.*?)\s*<(.*)>$', upsidedown.__author__).groups()
URL = upsidedown.__url__
LICENSE = upsidedown.__license__
setup(name='upsidedown',
vers... |
from __future__ import absolute_import, division, print_function
__all__ = [
"__title__", "__summary__", "__uri__", "__version__", "__author__",
"__email__", "__license__",
]
__title__ = "tattle"
__summary__ = ("AWS ECR reporting tool")
__uri__ = "https://github.com/kcraley/tattle"
__version__ = "0.0.1"
__a... |
import React from 'react';
import { useStaticQuery, graphql} from 'gatsby';
import Posts from './posts';
import Certificate from './certificate';
import Course from './course';
export default () => {
const data = useStaticQuery(graphql` {
codigoFacilitoJson {
data {
courses {
... |
import re
import os
import datetime
from distutils.version import LooseVersion as V
from .python import PythonBuildPack
class RBuildPack(PythonBuildPack):
"""
Setup R for use with a repository
This sets up R + RStudio + IRKernel for a repository that contains:
1. A `runtime.txt` file with the text... |
import json
import requests
from altfe.interface.root import interRoot
@interRoot.bind("api/biu/get/outdated/", "PLUGIN")
class outdated(interRoot):
def run(self, cmd):
r = []
try:
r = json.loads(
requests.get("https://biu.tls.moe/d/biuinfo.json", timeout=10).text
... |
const path = require('path');
const express = require('express');
const morgan = require('morgan');
const app = express();
module.exports = app;
// logging middleware
app.use(morgan('dev'));
// body parsing middleware
app.use(express.json());
//use ejs renderer in order to pass data html files
app.engine('html', req... |
# -*- coding: utf-8 -*-
"""
Created on Tue Jan 29 11:26:41 2013
@author: wangronin
"""
import numpy as np
# import hello as h
from ..utils import boundary_handling
from scipy.stats import chi
#from function import rand_orth_mat
from numpy.linalg import eigh, LinAlgError, qr, cond
from numpy.random import randn, rand,... |
import jax.numpy as np
from jax import random
from jax import jit, grad, vmap
from jax.experimental.stax import logsoftmax, softmax
from jax.tree_util import tree_flatten, tree_multimap
from functools import partial
from network import mlp, conv_net
from data import sinusoid_task, taskbatch, omniglot_task, load_omnigl... |
import numpy as np
import paddle
import logging
from paddleslim.common import get_logger
__all__ = ["UnstructuredPruner", "GMPUnstructuredPruner"]
_logger = get_logger(__name__, level=logging.INFO)
NORMS_ALL = [
'BatchNorm', 'GroupNorm', 'LayerNorm', 'SpectralNorm', 'BatchNorm1D',
'BatchNorm2D', 'BatchNorm3D... |
import { createMuiTheme } from '@material-ui/core/styles'
import { teal, orange } from '@material-ui/core/colors'
const theme = createMuiTheme({
palette: {
primary: {
light: '#52c7b8',
main: '#009688',
dark: '#00675b',
contrastText: '#fff',
},
secondary: {
li... |
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module(
'Unit | Route | administrative-units/administrative-unit/related-organizations/edit',
function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
let route = this.owner.lookup(
'route:admini... |
"""
Colin Weinshenker -- caweinshenker@email.wm.edu
11/27/2016
Manages SQLite3 database connections
"""
import sqlite3
class SQLiteManager(object):
"""Uses context manager pattern to handle database transactions"""
def __init__(self, database_file):
"""Stores database file location"""
self.db = database_file... |
#pragma once
// Name: S, Version: b
#ifdef _MSC_VER
#pragma pack(push, 0x01)
#endif
/*!!HELPER_DEF!!*/
/*!!DEFINE!!*/
namespace UFT
{
//---------------------------------------------------------------------------
// Classes
//---------------------------------------------------------------------------
// Blueprin... |
/*
给定两个单词(beginWord 和 endWord)和一个字典,找到从 beginWord 到 endWord 的最短转换序列的长度。转换需遵循如下规则:
每次转换只能改变一个字母。
转换过程中的中间单词必须是字典中的单词。
说明:
如果不存在这样的转换序列,返回 0。
所有单词具有相同的长度。
所有单词只由小写字母组成。
字典中不存在重复的单词。
你可以假设 beginWord 和 endWord 是非空的,且二者不相同。
示例 1:
输入:
beginWord = "hit",
endWord = "cog",
wordList = ["hot","dot","dog","lot","log","cog"]
输出... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.Xrp = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColor"... |
"""
# BEGIN FUNC_DESCRIPTOR_DEMO
>>> word = Text('forward')
>>> word # <1>
Text('forward')
>>> word.reverse() # <2>
Text('drawrof')
>>> Text.reverse(Text('backward')) # <3>
Text('drawkcab')
>>> type(Text.reverse), type(word.reverse) # <4>
(<class 'function'>, <class 'method'>)
... |
function get_counter() {
$.ajax({
url: 'https://www.hackerspace.gr/api.php?action=query&prop=revisions&rvprop=content&format=json&titles=Network/Leases',
dataType: 'jsonp',
crossDomain: true,
cache: false
}).done(function(json) {
var count = json.query.pages[168].revisions[0]["*"];
var split... |
"""This script contains function for aggregation of the Lisflood
Damage modelling efforts as well as the OSM-line aggregation approach"""
from collections import OrderedDict
import geopandas as gpd
import numpy as np
import os as os
import pandas as pd
import pickle
from pdb import * #for debugging
import time as tim... |
let array=[]
let soma = []
for (let i= 1 ;i<=25 ; i++){
soma.push(i/2)
}
console.log(soma) |
import folium
# m = folium.Map()
m = folium.Map(location=(22.6273, 120.3014), zoom_start=16)
m.save("docs/index.html")
|
#define GLI_INCLUDE_GLCORE3_0
///////////////////////////////////////////////////////////////////////////////
// Masks
///////////////////////////////////////////////////////////////////////////////
enum Mask_Access {
GL_MAP_READ_BIT = 0x0001,
GL_MAP_WRITE_BIT = 0x0002,
GL_MAP_INVALIDAT... |
define([
'jquery',
'base/js/namespace',
'base/js/dialog',
'base/js/utils'
], function ($, Jupyter, dialog, utils) {
"use strict";
var nbgrader_version = "0.7.0.dev";
var ajax = utils.ajax || $.ajax;
// Notebook v4.3.1 enabled xsrf so use notebooks ajax that includes the
// xsrf to... |
const React = require('react')
const PropTypes = require('prop-types')
const objss = require('objss')
const cssobj = require('css-to-object')
class CSSEditor extends React.Component {
state = {
css: objss(this.props.value, {
newline: true
})
}
onChange = e => {
const { value } = e.target
t... |
import uuid
import time
import logging
from django.utils import timezone
from django.core.management.base import BaseCommand
from django.conf import settings
from api.models import Resource
from api.tasks import send_measurements
logger = logging.getLogger(__name__)
class Command(BaseCommand):
"""Management comm... |
#!/usr/bin/env python3 #For Unix
""" #!C:\Python34\python.exe #For Windows"""
"""
@author: Othmane Ouenzar, Soufiane Benhaddou
"""
import feedparser, hashlib
from elasticsearch import Elasticsearch
# Getting RSS urls from file
def getUrls(lang, debug):
if lang == 'en':
file = open("lists/list_en.url.txt",... |
// 热搜列表
module.exports = (query, request) => {
const data = {}
return request(
'POST',
`https://music.163.com/weapi/hotsearchlist/get`,
data,
{
crypto: 'weapi',
cookie: query.cookie,
proxy: query.proxy,
realIP: query.realIP,
},
)
}
|
from flask import render_template, redirect, request, url_for, flash
from flask_login import login_user, logout_user, login_required, \
current_user
from . import auth
from .. import db
from ..models import User
from ..email import send_email
from .forms import LoginForm, RegistrationForm, ChangePasswordForm,\
... |
/**
* Created by yadirhb on 2/17/2016.
*/
NoConflict.ready(function(System){
var Class = System.Class;
var Log = System.utils.Log;
var deps = {map:[], getRes : function(){}};
function using(dep){
}
System.Loader.load(["System/utils/Assert"], function(){
Atom.utils.Assert.fight();
... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision
from torch.autograd import Variable
import torchvision.transforms as transforms
import argparse
from torchvision import datasets
# 定义是否使用GPU
device = torch.device("cuda" if torch.cuda.is_available() else "... |