text
stringlengths
3
1.05M
/* * /MathJax-v2/jax/output/SVG/fonts/TeX/Main/Italic/LetterlikeSymbols.js * * Copyright (c) 2009-2018 The MathJax Consortium * * 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 a...
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
import os import time import subprocess # nosec import logging from sqlalchemy import create_engine, text, inspect from sqlalchemy.orm import Session from sqlalchemy.exc import OperationalError from weconnect.elements import vehicle from weconnect.addressable import AddressableLeaf from weconnect.elements.range_stat...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
class Template extends nodefony.Service { constructor(container, engine, options) { super("TEMPLATE", container, container.get("notificationsCenter")); this.settings = options; this.engine = engine; } getEngine() { return this.engine; } extendFunction() { this.log("extendFunction You mu...
import React, { lazy } from 'react' import { CBadge, CButton, CButtonGroup, CCard, CCardBody, CCardFooter, CCardHeader, CCol, CProgress, CRow, CCallout } from '@coreui/react' import CIcon from '@coreui/icons-react' import MainChartExample from '../charts/MainChartExample.js' const WidgetsDropdow...
from discord.ext.commands import AutoShardedBot from mobiglas.context import Context class MobiGlasBot(AutoShardedBot): """Custom Discord Bot class for MobiGlasBot""" async def process_commands(self, message): """Processes commands that are registed with the bot and it's groups. Without thi...
#!/usr/bin/python # -*- coding: utf-8 -*- #用于进行http请求,以及MD5加密,生成签名的工具类 import http.client import urllib import json import hashlib import time def buildMySign(params,secretKey): sign = '' for key in sorted(params.keys()): sign += key + '=' + str(params[key]) +'&' data = sign+'secret_key='+secretKe...
/* * Example from compiler.rst. */ /*=== 321 123 ===*/ var foo = 123; var myfunc; function f(x) { eval(x); return function () { print(foo); } } // declare 'foo' in f(), returned closure sees this 'foo' instead // of the global one myfunc = f('var foo = 321'); myfunc(); // prints 321, not 123 // don't...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # File name : get_forkcms_paths.py # Author : Podalirius (@podalirius_) # Date created : 22 Nov 2021 import json import os import sys import requests import argparse from bs4 import BeautifulSoup def parseArgs(): parser = argparse.Argument...
/** * Copyright IBM Corp. 2019, 2020 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. * * Code generated by @carbon/icon-build-helpers. DO NOT EDIT. */ 'use strict'; function _interopDefault (ex) { return (ex && (typeof ex === '...
#!/usr/bin/env python2 from scapy.all import * import argparse, sys, re # I think these days, HSTS run tings (https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security). I find that request-attempts to Google using http versus https fail; seems to force HTTPS. # Script still written for ceremonious reasons. def ...
export * from '@styled-icons/material/InsertDriveFile';
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 29 2017 23:22:24). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <Foundation/NSURL.h> @interface NSURL (EncodeUrl) + (id)safeUrlWithString:(id)arg1; @end
import React from 'react' import { animated, useTransition } from 'react-spring' import MenuButton from './MenuButton' import Menu from './Menu' import useIsMobile from '../../hooks/useIsMobile' const SideMenu = ({ indexlinks, menuOpen, toggleMenu, closeMenu }) => { const isMobile = useIsMobile() const menuTran...
"""Network Authentication Helpers Contains interface (MultiDomainBasicAuth) and associated glue code for providing credentials in the context of network requests. """ import logging import urllib.parse from typing import Any, Dict, List, Optional, Tuple from pip._vendor.requests.auth import AuthBase, HTTPBasicAuth f...
# ------------------------------------------------------------- # # 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 unde...
import React,{useState, useEffect} from 'react'; import PropTypes from 'prop-types'; import { makeStyles } from '@material-ui/core/styles'; import Table from '@material-ui/core/Table'; import TableBody from '@material-ui/core/TableBody'; import TableCell from '@material-ui/core/TableCell'; import TableContainer from '@...
var searchData= [ ['dispatch',['dispatch',['../classracecontrol_1_1netcom_1_1Dispatcher.html#a1972a5b40129984301084ff41eab5824',1,'racecontrol::netcom::Dispatcher']]] ];
'''Classes to help define tag and coordinate families.''' from __future__ import print_function, absolute_import, division try: from builtins import range as iter_range except ImportError: from __builtin__ import xrange as iter_range from collections import defaultdict from collections import Counter from copy ...
Q_TRAINED = { (('4', '2', '1', '2', '1', '1', '2', '2'), 2):64.5822857908, (('2', '4', '2', '-1', '2', '2', '-1', '-1'), 1):15.688, (('1', '-1', '-1', '1', '-1', '-1', '4', '-1'), 2):239.669910452, (('1', '2', '0', '2', '4', '1', '1', '1'), 2):249.820586988, (('4', '0', '4', '1', '4', '4', '1', '0'), 1):0, (('1', '4', ...
import styled from "styled-components"; export const Category = styled.section` margin: 0 auto; margin-bottom: 2%; & > h2 { padding-left: 1.25%; } @media (max-width: ${({ theme }) => theme.mobile}) { margin-bottom: 5%; } `; export const Contact = styled.address` align-items: end; display: gr...
import os from discord.ext import commands @commands.command(help="Displays the URL to register the current guild.") async def register(ctx): if ctx.guild is None: await ctx.send(f"A siteadmin can register a guild at: {os.getenv('META_SERVICE_BASE_URL', '')}/guilds/new") else: await ctx.send(...
/** * fakerator v0.3.0 * https://github.com/icebob/fakerator * Released under the MIT License. */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([]...
var querystring = require("querystring"), fs = require("fs"); function music(response, request, query) { console.log("Request handler 'music' was called."); var params = query.split("&"); console.log("param = " + params); var m = {}; for (var i = 0; i<params.length; i++) { var p = params[i].split("="); m...
$(function() { var burger = $('.hamburger'); burger.click(function() { burger.toggleClass('hamburgerActive'); }); });
# Uses python3 import sys def lcm(a, b): #write your code here _gcd = gcd(a, b) return (a*b) // _gcd def gcd(a, b): max_number = max(a,b) min_number = min(a,b) result = max_number % min_number if (result == 1): return result if (result == 0): return min_number else:...
// 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. #ifndef COMPONENTS_EXO_SHELL_SURFACE_UTIL_H_ #define COMPONENTS_EXO_SHELL_SURFACE_UTIL_H_ #include <memory> #include <string> #include "build/chromeos_b...
/******/ (() => { // webpackBootstrap /******/ "use strict"; /*!******************************************************************!*\ !*** ../demo6/src/js/pages/crud/datatables/basic/paginations.js ***! \******************************************************************/ /*! unknown exports (runtime-defined) */ /*...
/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is property of Nordic Semiconductor ASA. * Terms and conditions of usage are described in detail in NORDIC * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. * * Licensees are granted free, non-transferab...
/* * This file is part of MXE. See LICENSE.md for licensing information. */ #include <archive.h> int main(int argc, char *argv[]) { struct archive *tgz; (void)argc; (void)argv; tgz = archive_write_new(); archive_write_set_options(tgz, "gzip=9"); archive_write_set_format_ustar(tgz); arc...
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[827],{lq7H:function(e,a,c){"use strict";c.r(a);var t=c("q1tI"),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-44.4 672C3...
/* * Copyright 2016 Google Inc. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
// Copyright 2019 Mathias Bynens. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- author: Mathias Bynens description: > Unicode property escapes for `Script_Extensions=Bhaiksuki` info: | Generated by https://github.com/mathiasbynens/unicode-property-escapes-tests ...
// 一个栈和一个 steque 实现的双向队列。使用一个栈和一个 steque 实现一个双向队列(请见练习 1.3.32),使得双向队列的每个操作所需的栈和 steque 操作均摊后为一个常数。 const Stack = require('../../LinkedStack'); class Steque { constructor() { this.leftStack = new Stack(); this.rightStack = new Stack(); this.size = 0; } _rightToLeft() { while...
import subprocess from typing import TYPE_CHECKING, Tuple from linz_logger import get_log from topo_processor.util.time import time_in_ms if TYPE_CHECKING: from .command import Command class ExecutionLocal: cmd: "Command" @staticmethod def run(cmd: "Command") -> Tuple[int, str, str]: start...
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"https://unpkg.com/iview@1.0.0/dist/==typeof define&&define.amd?define("iview",["vue"],t):"object"==typeof exports?exports.iview=t(require("vue")):e.iview=t(e.Vue)}(this,function(e){return function(e){function t(n...
elation.require(['engine.things.generic', 'utils.template', 'janusweb.parts'], function() { elation.template.add('janusweb.edit.object', '<Object id=^{id}^ js_id=^{js_id}^ alphatest=^{alphatest}^ locked=^false^ pos=^{pos.x} {pos.y} {pos.z}^ vel=^{vel.x} {vel.y} {vel.z}^ accel=^{accel.x} {accel.y} {accel.z}^ xd...
(function (jsGrid, $, undefined) { var Field = jsGrid.Field; function TextField(config) { Field.call(this, config); } TextField.prototype = new Field({ autosearch: true, readOnly: false, filterTemplate: function () { if (!this.filtering) r...
# coding=utf-8 # Copyright Huawei Noah's Ark Lab. """ Generates model predictions. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import time import sys import tensorflow as tf from noahnmt.utils import data_utils from noahnmt.utils import...
#ifndef _EXPLORER_H #define _EXPLORER_H struct Explorer { short x; short y; char direction; bool frame; char frameTime; bool active; short health; char nextHealthDecrease; }; void initialize_explorer(Explorer& obj); void update_explorer(Explorer& obj); void draw_explorer(Explorer& obj); void damage_explorer(Ex...
// SPDX-License-Identifier: GPL-2.0-only /**************************************************************************** * Driver for Solarflare network controllers and boards * Copyright 2005-2006 Fen Systems Ltd. * Copyright 2005-2013 Solarflare Communications Inc. */ #include <linux/pci.h> #include <linux/tcp.h> ...
// @flow import { add, div, lte, mul, sub } from 'biggystring' import { type Disklet } from 'disklet' import { bridgifyObject, onMethod, watchMethod } from 'yaob' import { type EdgeBalances, type EdgeCurrencyCodeOptions, type EdgeCurrencyEngine, type EdgeCurrencyInfo, type EdgeCurrencyPlugin, type EdgeCur...
""" Ishigami function (3 random inputs, scalar output) ====================================================================== In this example, we approximate the well-known Ishigami function with a total-degree Polynomial Chaos Expansion. """ # %% md # # Import necessary libraries. # %% import numpy as np import ...
# Copyright 2019 The Oppia 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 ...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt def doit(imagenb, name): image1 = imagenb image = dataset['images/test_set'][image1] lab = dataset['labels/test_set'][image1] other = np.where(dataset['labels/test_set'] == lab)[0][100] dest = dataset['images/test_set'][other]...
""" WSGI config for project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setting...
import osqp # solver import numpy as np from scipy import sparse from scipy.sparse import vstack, hstack, eye from warnings import warn class CCOCP: """ CC-OCP: chance-constrained optimal control problem Defines a CC-OCP and adds the model specific constraints and objectives. Parser f...
// log the pageview with their URL export const pageview = (url) => { window.gtag('config', process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS, { page_path: url, }) } // log specific events happening. export const event = ({ action, params }) => { window.gtag('event', action, params) }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.version = "pbkdf2/5.0.37"; //# sourceMappingURL=_version.js.map
import tensorflow as tf from utils import bbox_utils, landmark_utils def apply(img, gt_boxes, gt_landmarks): """Randomly applying data augmentation methods to image and ground truth boxes. inputs: img = (height, width, depth) gt_boxes = (ground_truth_object_count, [y1, x1, y2, x2]) ...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file : main.c * @brief : Main program body ****************************************************************************** ** This notice applies to any and all portions of this...
#pragma once #include "stdinc.h" NS_BEGIN(dcsutil) struct stackframe_info_t { string module; string func; size_t offset; void * addr; string info; stackframe_info_t(); const char * str(string & s); }; const char * stacktrace(string & str, int startlevel = 0, i...
//Find the distance between two points export function distance([x1, y1], [x2, y2]) { return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)) } //Gauss Jordan Eliminations on a system of equations //system is a 2-D array. //Each element in system depicts a row in the system of 8 linear equations. //Each row ...
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import models, fields class ResCompany(models.Model): _i...
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst """Separate tests specifically for equivalencies.""" from __future__ import (absolute_import, unicode_literals, division, print_function) from ...extern.six.moves import zip # THIRD-PARTY import pytest import nump...
""" Verify evaluation of BIND expressions of different types. See <http://www.w3.org/TR/sparql11-query/#rExpression>. """ from rdflib import Graph, URIRef, Literal, Variable def test_bind(): base = "http://example.org/" g = Graph() g.add((URIRef( base + "thing"), URIRef(base + "ns#comment"), Liter...
# qubit number=3 # total number=28 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collections import Counter from...
const devConfig = require('./webpack.dev.config.js'); const prodConfig = require('./webpack.prod.config.js'); let config = ''; switch (process.env.npm_lifecycle_event) { case 'start': config = devConfig; break; case 'build': config = prodConfig; break; default: con...
"Test the functionality of Python classes implementing operators." import unittest testmeths = [ # Binary operations "add", "radd", "sub", "rsub", "mul", "rmul", "matmul", "rmatmul", "truediv", "rtruediv", "floordiv", "rfloordiv", "mod", "...
/* * Backpack - Skyscanner's Design System * * Copyright 2018 Skyscanner 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 * * Un...
import torch import torch.nn as nn import torch.functional as F import matplotlib.pyplot as plt class CNN(nn.Module): def __init__(self): super(CNN, self).__init__() # self.nn = nn self.conv1 = nn.Sequential( nn.Conv2d(in_channels=3, out_channels=64, kern...
# interval list .tsv file column names contig_column_name = "CONTIG" start_column_name = "START" end_column_name = "END" count_column_name = "COUNT" # prefix for saving posteriors for multiple samples sample_folder_prefix = "SAMPLE_" # log copy number posterior matrix column name prefix for each integer copy number s...
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: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 15.5h-1.5V14h-1v3H8v-3H7v4.5H5.5v-5c0-.55.45...
"""Odin server asyncio utility functions. This module implements asyncio-based utility functions needed in odin-control when using asynchronous adapters. Tim Nicholls, STFC Detector System Software Group. """ import asyncio def wrap_async(object): """Wrap an object in an async future. This function wraps a...
import sancty.run as sancty_run if __name__ == '__main__': sancty_run.start_terminal()
var _ = require('underscore'); var $ = require('jquery'); var nodeIds = require('builder/value-objects/analysis-node-ids'); var MetricsTracker = require('builder/components/metrics/metrics-tracker'); var MetricsTypes = require('builder/components/metrics/metrics-types'); var SimpleStyleDefaults = require('builder/edit...
// you can use this file to add your custom webpack plugins, loaders and anything you like. // This is just the basic way to add additional webpack configurations. // For more information refer the docs: https://storybook.js.org/configurations/custom-webpack-config // IMPORTANT // When you add this file, we won't add ...
"""This file contains the app initialization logic""" import os from datetime import datetime from flask import Flask, send_from_directory, g, session, redirect, url_for, request from werkzeug import find_modules, import_string from playhouse.db_url import connect from config import * from flask_pw import Peewee from ...
const ERROR = "ERROR"; const SEND_SMS = "SEND_SMS"; const SMS_SENT = "SMS_SENT"; const SMS_RECIEVED = "SMS_RECIEVED"; module.exports = { ERROR, SEND_SMS, SMS_SENT, SMS_RECIEVED };
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <string.h> #include "ViennaRNA/fold_vars.h" #include "ViennaRNA/alphabet.h" #include "ViennaRNA/utils/basic.h" #include "ViennaRNA/constraints/hard.h" #include "ViennaRNA/constraints/sof...
from typing import ClassVar from pydantic import ValidationError, validator from odmantic import Model class SmallRectangle(Model): MAX_SIDE_SIZE: ClassVar[float] = 10 length: float width: float @validator("width", "length") def check_small_sides(cls, v): if v > cls.MAX_SIDE_SIZE: ...
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import time from typing import TYPE_CHECKING from .client_assertion import ClientAssertionCredential if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imp...
# coding: utf-8 import os import math import functools import collections import cairo import numpy from sqlalchemy import and_ from shapely import wkb from mapython import utils from mapython.database import session, OSMPoint, OSMLine, OSMPolygon from mapython.style import StyleSheet GEOM_TYPES = { 'point': OSMP...
# -*- coding: utf-8 -*- """ Created on Mon Feb 22 17:23:56 2016 @author: btq """ import numpy as np import pandas as pd # pandas import datetime as dt # module for manipulating dates and times import scipy.stats as stats import iso8601 import time import datetime as dt import requests """ Function -------- scrape_wea...
import os import time from datetime import datetime from pathlib import Path import ndjson import requests try: from secrets import lichess_api_token except ImportError: lichess_api_token = '' def get_json(username='kewko', game_mode="blitz", update=False, ensure_complete=False, maxnum=1000, analysed=None, ...
from typing import Any, TYPE_CHECKING import copy from ..config import Config from ..utils import RichStatus from .irresource import IRResource if TYPE_CHECKING: from .ir import IR # pragma: no cover class IRCORS (IRResource): def __init__(self, ir: 'IR', aconf: Config, rkey: str="ir.cor...
export default { addToCart(context, payload) { return new Promise((resolve, reject) => { //查找数组中是否有该元素,return 为 true 的话会返回该元素 let cartGoods = context.state.cartList.find(function(item) { return item.iid === payload.iid }) if (cartGoods) { resolve('加入购物车成功 ~') conte...
/** * Full HTML5 compatibility rule set * These rules define which tags and css classes are supported and which tags should be specially treated. * * Examples based on this rule set: * * <a href="http://foobar.com">foo</a> * ... becomes ... * <a href="http://foobar.com" target="_blank" rel="nofollow">f...
# ------------------------------------------------------------------------------ # CodeHawk Binary Analyzer # Author: Henny Sipma # ------------------------------------------------------------------------------ # The MIT License (MIT) # # Copyright (c) 2021 Aarno Labs LLC # # Permission is hereby granted, free of charg...
from typing import NewType import numpy as np Action = NewType('Action', int) Board = NewType('Board', np.ndarray) # 1D array of shape (9,) BoardForDqn = NewType('BoardForDqn', np.ndarray) # 1D array of shape (27,)
class NumMatrix(object): def __init__(self, matrix): if not matrix: return m, n = len(matrix), len(matrix[0]) self.sum = matrix for i in range(1, m): self.sum[i][0] = self.sum[i - 1][0] + matrix[i][0] for j in range(1, n): self.sum[0][j] = ...
import React from "react"; import { Link } from "react-router-dom"; import { bucket_url } from "../../../config.js"; import mdf from "../../../assets/musee-de-france.jpg"; export default ({ data }) => { const image = data.IMG.length ? `${bucket_url}${data.IMG[0]}` : require("../../../assets/noimage.jpg"); ...
/* CCKDUTIL.C (c) Copyright Roger Bowler, 1999-2012 */ /* ESA/390 Compressed CKD Common routines */ /* */ /* Released under "The Q Public License Version 1" */ /* (http://www.hercules-390.or...
/** * @author Hao Ren * 10 September, 2021 * * Definition for singly-linked list. * struct ListNode { * int val; * struct ListNode *next; * }; */ int getDecimalValue(struct ListNode *head) { int sum = 0; for (struct ListNode *curr = head; curr != NULL; curr = curr->next) { sum = sum <<...
import application.tests application.run
// @flow import path from 'path' import util from 'util' import spawn from 'cross-spawn' import fs from 'fs-extra' import ora from 'ora' import resolve from 'resolve' import runSeries from 'run-series' import merge from 'webpack-merge' import debug from './debug' import type {ErrBack} from './types' /** * Check if...
/** * Created by liekkas.zeng on 2015/1/7. */ angular.module('ng-echarts',[]) .directive('ngEcharts',[function(){ return { link: function(scope,element,attrs,ctrl){ function refreshChart(){ var theme = (scope.config && scope.config.theme) ...
import { login, logout, getInfo } from '@/api/user' import { getToken, setToken, removeToken } from '@/utils/auth' import router, { resetRouter } from '@/router' import default_avatar from '@/assets/platform/avatar.png'; const state = { token: getToken(), name: '', avatar: '', introduction: '', roles: [] } ...
/* * WPA Supplicant / Configuration parser and common functions * Copyright (c) 2003-2015, Jouni Malinen <j@w1.fi> * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #include "includes.h" #include "wpa_common.h" #include "utils/uuid.h" #include...
"""The module describes the ``gitlab`` error plugin plugin.""" import logging import os import sys import requests if sys.version_info[0] < 3: import urllib as urllib import urlparse as urlparse else: import urllib.parse as urllib urlparse = urllib try: import gitlab except ImportError: gitla...
import React from 'react'; import { cx, css } from '@emotion/css'; import Menu from './Menu'; export const Toolbar = React.forwardRef( ( { className, ...props }, ref ) => ( <Menu {...props} ref={ref} className={cx( className, css` position: fixed; width...
import { expect } from 'chai'; import { addWidget, removeWidget } from '../../lib/util'; function setup() { return { rows: [{ columns: [{ className: 'col-md-4 col-sm-6 col-xs-6', widgets: [{key: 'HelloWorld'}], }, { className: 'col-md-4 col-sm-6 col-xs-6', widgets: [],...
import click from parsec.commands.visual.get_visualizations import cli as get_visualizations from parsec.commands.visual.show_visualization import cli as show_visualization @click.group() def cli(): pass cli.add_command(get_visualizations) cli.add_command(show_visualization)
// Copyright (c) 2012, Compiler Explorer Authors // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // thi...
from setuptools import setup setup( name='tensorflow_hmm', version='0.1.1', description='Tensorflow and numpy implementations of the HMM viterbi and ' 'forward/backward algorithms', url='http://github.com/dwiel/tensorflow_hmm', author='Zach Dwiel', author_email='zdwiel@gmail.co...
import ErrorScreen from "ErrorScreen"; import TransactionPage from "./Page"; import { transactionPage } from "connectors"; const Transaction = ({ walletService, viewedTransaction, viewedDecodedTransaction, decodeRawTransactions, tsDate, fetchMissingStakeTxData }) => { if (!viewedDecodedTransaction) { decodeRa...
#!/usr/bin/env python3 import os class BaseConfig(object): def __init__(self): self.debug = True if os.environ['HASH_API_DEBUG'].lower() == 'true' else False self.host = os.environ['HASH_API_HOST'] self.port = int(os.environ['HASH_API_PORT']) self.application_secret = os.environ['HA...
f1 = open('_data/raw_scholarly.txt', 'r') f2 = open('scholar_data.txt', 'w') for line in f1: if line[0:9] == "- title: ": curr_tool = line[9:] f2.write(line) if line[2:5] == "doi": f2.write(line) if line[2:10] == "pub_year": f2.write(line) if line[2:9] == "citedby": ...
from __future__ import unicode_literals from django import forms from django.utils.encoding import force_text from django.utils.html import format_html from django.utils.safestring import mark_safe class DisableableSelectWidget(forms.SelectMultiple): allow_multiple_selected = True def __init__(self, *args, ...