text stringlengths 3 1.05M |
|---|
from celery import shared_task
from wakeonlan import send_magic_packet
from . import pc_status
@shared_task
def wake_pc(mac, ip):
return send_magic_packet(mac, ip_address=ip)
@shared_task
def make_sleep(url, secret):
return pc_status.make_sleep(url, secret)
|
#vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2016 iXsystems
"""
Volume driver for iXsystems iSCSI storage systems.
This driver requires iXsystems storage systems with installed iSCSI licenses.
"""
from cinder import exception
from cinder.image import image_utils
from cinder import utils
from oslo_log ... |
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
engine = create_engine('postgresql://dbuser:dbpassword@localhost:5432/sqlalchemy-orm-tutorial')
# use session_factory() to get a new Session
_SessionFactory = sessionmaker(bind=engine)
... |
import Layout from '@/layout'
export default {
path: '/emAttendance',
component: Layout,
name: 'emAttendance',
children: [{
path: '',
component: () =>
import ('@/views/EmAttendance'),
name: 'emAttendance',
meta: {
title: '员... |
!function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h... |
from datetime import datetime
import json
import logging
import yaml
import os
from typing import Any, Dict, Optional
import mlflow
from mlflow.exceptions import MlflowException
from mlflow.utils.file_utils import TempDir
from mlflow.utils.databricks_utils import get_databricks_runtime
from mlflow.tracking._model_re... |
# qubit number=3
# total number=12
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... |
class dotContourPoint_t(object):
# no doc
Chamfer = None
Point = None
|
#import <UIKit/UIKit.h>
#import "GPUImageContext.h"
typedef NS_ENUM(NSUInteger, GPUImageFillModeType) {
kGPUImageFillModeStretch, // Stretch to fill the full view, which may distort the image outside of its normal aspect ratio
kGPUImageFillModePreserveAspectRatio, // Maintains t... |
from .core.pfline import PfLine, SinglePfLine, MultiPfLine
from .core.pfstate import PfState
from .core.mixins.plot import plot_pfstates
from .core import changefreq
from . import dev
from .core import basics # extend functionalty of pandas
basics.apply()
# Methods/attributes directly available at package root.
fr... |
exports.createPages = async ({ actions, graphql, reporter }) => {
const result = await graphql(`
query GET_CATEGORY_SLUG {
allWcProductsCategories(filter: { wordpress_parent_id: { eq: 0 } }) {
nodes {
slug
}
}
}
`);
if (result.errors) {
reporter.panic("No hubo re... |
/**
*
* AssetTypeDropdown
*
*/
import React, { memo, useEffect } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { compose } from 'redux';
import { useInjectSaga } from 'utils/injectSaga';
import { useInjectReduc... |
import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon( /*#__PURE__*/React.createElement("path", {
d: "M2 22h20V2L2 22z"
}), 'SignalCellular4BarTwoTone'); |
//=================================================================================================
/*!
// \file blaze/config/Assertion.h
// \brief Configuration of the run time assertion macros
//
// Copyright (C) 2012-2018 Klaus Iglberger - All Rights Reserved
//
// This file is part of the Blaze library. You can... |
/*
* Copyright (c) 2021 HopeBayTech.
*
* This file is part of Tera.
* See https://github.com/HopeBayMobile for further info.
*
* 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
*
* ... |
//引入gulp
var gulp = require('gulp');
// 引入组件
var uglify = require('gulp-uglify');
var less = require('gulp-less');
var autoprefix = require('gulp-autoprefixer');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var cssmin = require('gulp-minify-css');
var s... |
#!/usr/bin/env python
# Copyright (c) 2009-2019 Quan Xu <qxuchn@gmail.com>
#
# This module is free software. You can redistribute it and/or modify it under
# the terms of the MIT License, see the file COPYING included with this
# distribution.
"""Predict TF influence score"""
# Python imports
from __future__ import ... |
import router from './router'
import store from './store'
import { Message } from 'element-ui'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import { getToken } from '@/utils/auth' // get token from cookie
import getPageTitle from '@/utils/get-page-title'
NPro... |
import cssToReactNative from "css-to-react-native";
import kebabCase from "lodash/kebabCase";
import stringify from "stringify-object";
const SPACE = " ";
function toProperty(name) {
if (name.charAt(0) === "-") name = name.slice(0);
return name.replace(/[^a-z0-9]([a-z0-9])?/gi, function(v, l) {
if (l) return... |
#!/usr/bin/env python
"""
Southern California Earthquake Center Broadband Platform
Copyright 2010-2016 Southern California Earthquake Center
Generic container for Broadband's modules
$Id: module.py 1778 2017-01-09 21:47:59Z fsilva $
"""
from __future__ import division, print_function
# Import Python modules
import os... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2019-05-22 16:42
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('profiles', '0003_auto_20190520_2302'),
]
operations ... |
# coding: utf-8
"""
Line Items
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v3
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from hu... |
CALCITE_KEYWORDS = set(
[
"A",
"ABS",
"ABSOLUTE",
"ACTION",
"ADA",
"ADD",
"ADMIN",
"AFTER",
"ALL",
"ALLOCATE",
"ALLOW",
"ALTER",
"ALWAYS",
"AND",
"ANY",
"APPLY",
"ARE",
"AR... |
import json
openapi_spec = {
"openapi": "3.0.0",
"info": {"version": "1.0.0", "title": "Petstore"},
"paths": {
"/pets": {
"get": {
"summary": "List all pets",
"operationId": "listPets",
"responses": {"200": {"description": "ok"}},
... |
require('dotenv').load();
var express = require('express');
var app = express();
var path = require('path');
var http = require('http');
var fs = require('fs');
var bodyParser = require('body-parser');
var User = require('./models/userModel');
var passportLocal = require('passport-local');
var passport = require('passp... |
from av import ContainerFormat, formats_available
from .common import TestCase
class TestContainerFormats(TestCase):
def test_matroska(self):
fmt = ContainerFormat("matroska")
self.assertTrue(fmt.is_input)
self.assertTrue(fmt.is_output)
self.assertEqual(fmt.name, "matroska")
... |
/*
* TOPPERS/HRP Kernel
* Toyohashi Open Platform for Embedded Real-Time Systems/
* High Reliable system Profile Kernel
*
* Copyright (C) 2005-2015 by Embedded and Real-Time Systems Laboratory
* Graduate School of Information Science, Nagoya Univ., JAPAN
*
* 上記著作権者は,以下の(1)〜(4)の条件を満たす... |
# -*- coding: utf-8 -*-
#
# lager documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 27 18:10:24 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... |
// equivalent.h
// 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, softwar... |
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or t... |
import discord
import asyncio
from redbot.core import commands
from dislash import ActionRow, Button, ButtonStyle
import typing
from redbot.core.utils.predicates import MessagePredicate
from redbot.core.utils.menus import start_adding_reactions
class utils():
def __init__(self, bot):
self.bot = b... |
import os
import re
import csv
import json
from download import (TIMES_APPLIED_LOOKUP_FILE,
PAGES_TO_SCRAPE,
BASE_URL,
URL_PATTERN)
from bs4 import BeautifulSoup
CSV_FILE_OUT = 'co-redistricting-commission-applicants.csv'
CSV_HEADERS = [
'commis... |
# -*- coding: utf-8 -*-
import base64
import functools
import logging
import os
import re
import time
import warnings
import zipfile
from datetime import datetime
from getpass import getpass
from threading import Event, Thread
from urllib.parse import quote
from xml.etree import ElementTree
import requests
import xmlt... |
define(["./version.js","../../@polymer/polymer/lib/elements/custom-style.js"],function(_version,_customStyle){const $_documentContainer=document.createElement("template");$_documentContainer.innerHTML='<custom-style>\n <style is="custom-style">\n html {\n /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c... |
#! /usr/bin/env python
import sys
def main(args):
print args
if __name__=="__main__":
main(sys.argv)
|
/*
* Copyright 2016 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 contrib... |
import Vue from 'vue'
import Vuetify from 'vuetify'
import 'vuetify/dist/vuetify.min.css';
Vue.use(Vuetify)
const opts = {}
export default new Vuetify(opts) |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global'],function(q){"use strict";var R=function(){};R.render=function(r,o){var a=r;var n=o.getMaxValue();a... |
// test parse
var assert = require('assert');
var approx = require('../../tools/approx');
var math = require('../../index');
var ArgumentsError = require('../../lib/error/ArgumentsError');
var parse = math.expression.parse;
var ConditionalNode = math.expression.node.ConditionalNode;
var OperatorNode = math.expression.n... |
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.reverse import reverse
@api_view(['GET'])
def api_root(request, format=None):
return Response({
'users': reverse('user-list', request=request, format=format),
'profiles': reverse('profil... |
import numpy as np
import pandas as pd
import pytest
from numpy.testing import assert_almost_equal
from numpy.testing import assert_array_almost_equal
from ruspy.config import TEST_RESOURCES_DIR
from ruspy.estimation.estimation import estimate
TEST_FOLDER = TEST_RESOURCES_DIR + "replication_test/"
@pytest.fixture(... |
import { stream } from 'tvs-flow/dist/lib/utils/entity-reference';
import { activeNode, activeEntity, activeValue, watchingEntity, activeProcess } from './entity';
import { activeWindow, visibility, controlsPosition, treeWindow, graphWindow, entityWindow } from './gui';
import { metaEntity, enhancedGraphData, metaEntit... |
/*
* -*- coding: utf-8 -*- {{{
* vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et:
*
* Copyright 2018, Kisensum.
*
* 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.apach... |
/**
* @ngdoc directive
* @name bicycling-layer
* @param Attr2Options {service}
* convert html attribute to Google map api options
* @description
* Requires: map directive
* Restrict To: Element
*
* @example
*
* <map zoom="13" center="34.04924594193164, -118.24104309082031">
* <bicycling-layer>... |
'use strict';
// MODULES //
var debug = require( 'debug' )( 'wandbox-api:file' );
var copy = require( 'utils-copy' );
var cwd = require( 'utils-cwd' );
var readFile = require( 'utils-fs-read-file' );
var writeFile = require( 'fs' ).writeFile;
var request = require( 'request' );
var resolve = require( 'path' ).resolve... |
#!/usr/bin/env python
# -*- coding: latin-1 -*-
"""
Test all other test_*.py. (April 25, 2014)
Piece of SimpleGUICS2Pygame.
https://bitbucket.org/OPiMedia/simpleguics2pygame
GPLv3 --- Copyright (C) 2013, 2014 Olivier Pirson
http://www.opimedia.be/
"""
from __future__ import print_function
import datetime
import gl... |
import { resetData } from '../../src/module/checkbox/tool';
import store from '../../src/common/Store';
import getTableTestData from '../table-test.data.js';
import { getColumnMap } from '../table-config';
const _ = 'test';
describe('checkbox tool', () => {
describe('resetData', () => {
let tableData = nul... |
from utils import CanadianScraper, CanadianPerson as Person
import re
from urllib.parse import urljoin
COUNCIL_PAGE = 'https://www1.gnb.ca/legis/bios/59/index-e.asp' # update each election
PARTIES = {
'G': 'Green Party',
'IND': 'Independent',
'L': 'New Brunswick Liberal Association',
'PA': "People's... |
# -*- coding: utf-8 -*-
#==========================================================#
# Process: e+e- -> Z/gamma -> mu+mu-
# Author: Guojin Tseng
# Date: 2018.7.16
# Version: 1.0
#==========================================================#
#import guojin's module
import calc_dsigma, param_card, run_card
#... |
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or http://ckeditor.com/license
*/
/**
* This file was added automatically by CKEditor builder.
* You may re-use it at any time to build CKEditor again.
*
* If you would like to bu... |
/*
* Mesa 3-D graphics library
* Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* 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, in... |
#include "rpi.h"
void notmain(void) {
uart_init();
}
|
#pragma once
#include "../utility/IPv4Address.h"
#include "Snake.h"
#include <chrono>
#include <mutex>
#include <queue>
#include <sys/socket.h>
#include <thread>
#define MULTICAST_PORT 9192
#define MULTICAST_ADDRESS "239.192.0.4"
#define ERROR_DELAY 3
using namespace std::chrono;
class Client;
class Server {
priva... |
"""
sentry.conf.server
~~~~~~~~~~~~~~~~~~
These settings act as the default (base) settings for the Sentry-provided web-server
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.conf.global_se... |
import PropTypes from 'prop-types';
export default function Section({ title, children }) {
return (
<div>
{title && <h2>{title}</h2>}
{children}
</div>
);
}
Section.propTypes = {
title: PropTypes.string.isRequired,
};
|
export const InvestorsData = [
{}
] |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvg... |
# -*- coding: utf-8 -*-
"""bootstrap.bootstrap: provides entry point main()."""
__version__ = "0.2.0"
import sys
from .face_detect import FaceDetect
from .rectangle_detect import RectangleDetect
def main():
if sys.argv[1] == "face":
face_detect = FaceDetect(sys.argv[2])
face_detect.execute(... |
import re
from datetime import timedelta
from bumblebee.window import Window
import sqlparse
MERGE_AUTO_REPLACE_SCRIPT_QUERY_TEMPLATE = """\
-- Optimus generated
DECLARE partitions ARRAY<DATE>;
{header}
CREATE TEMP TABLE `opt__partitions` AS (
{sql_query}
);
SET (partitions) = (
SELECT AS STRUCT
array... |
import React from 'react'
import { Link } from 'gatsby'
import { Badge, Card, CardTitle, CardText, CardSubtitle, CardBody } from 'reactstrap'
import Img from 'gatsby-image'
import { slugify } from '../util/utilityFunctions'
const Post = ({ title, author, slug, date, body, fluid, tags }) => {
return (
<Card>
... |
import React, { Component } from 'react';
import { connect } from 'dva';
import Link from 'umi/link';
import router from 'umi/router';
import { Form, Input, Button, Select, Row, Col, Popover, Progress } from 'antd';
import styles from './Register.less';
const FormItem = Form.Item;
const { Option } = Select;
const Inpu... |
import './sw'
import App from './App.svelte';
const app = new App({
target: document.body
});
export default app; |
// deploy/00_deploy_your_contract.js
//const { utils } = require("ethers");
module.exports = async ({ getNamedAccounts, deployments }) => {
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
await deploy("YourContract", {
// Learn more about args here: https://www.npmjs.com/packa... |
(function() {
"use strict";
var util = require('util'),
express = require('express'),
app = express(),
http = require('http').Server(app),
io = require('socket.io')(http);
function analyticsAPI(){
return "{\"data\": \"none\"}";
}
function Server() {
... |
from modulefinder import Module
from typing import List, Optional, Type, Union, Dict, Any, Generator
import json
import logging
import time
from copy import deepcopy
from string import Template
import numpy as np
from scipy.special import expit
from tqdm.auto import tqdm
try:
from elasticsearch import Elasticsea... |
import math
import time
import torch
import torch.nn as nn
import torch.utils.model_zoo as model_zoo
import losses
from anchors import Anchors
from nms import nms
from utils import BasicBlock, BBoxTransform, Bottleneck, ClipBoxes
model_urls = {
'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.p... |
# run_args: -n
# statcheck: stats['slowpath_getattr'] <= 10
class C(object):
pass
c = C()
c.n = 1
C.m = 2
for i in xrange(1000):
print c.n, c.m
|
import Promise from 'bluebird';
import { setUserAction } from '../../redis';
function slap(client, evt) {
if (evt.message.channel.isPrivate) return evt.message.channel.sendMessage('', false, {color: 3901635, description: `\u2139 Use this command in a server!`});
let receiverArray = [];
if (evt.message.mentio... |
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_COLLISION_DETECTION_COLLISION_DETECTION_UTILS_H_
#define ASH_WM_COLLISION_DETECTION_COLLISION_DETECTION_UTILS_H_
#include "ash/ash_export.... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
(function (factory) {
if (typeof module === "object" && typeof module.exports === "object") {
var v = fact... |
function solve(args) {
let sum = +args[0],
cakeOne = +args[1],
cakeTwo = +args[2],
cakeThree = +args[3],
answer = 0,
i,
j,
k,
tempSum;
for (i = 0; i < sum / cakeThree; i += 1) {
for (j = 0; j < sum / cakeTwo; j += 1) {
for (k... |
import { setPropertiesFromJSON } from '../../json-helper';
import ObservationComponent from '../finding/ObservationComponent';
/**
* Generated class for shr.oncology.HeterogeneousSignals.
* @extends ObservationComponent
*/
class HeterogeneousSignals extends ObservationComponent {
/**
* Get the value (aliases... |
"""
Randomized smoothing estimators.
"""
from art.estimators.certification.randomized_smoothing.randomized_smoothing import RandomizedSmoothingMixin
from art.estimators.certification.randomized_smoothing.numpy import NumpyRandomizedSmoothing
from art.estimators.certification.randomized_smoothing.tensorflow import Tens... |
#!/usr/bin/env python
#
# tournament.py -- implementation of a Swiss-system tournament
#
import psycopg2
def connect():
"""Connect to the PostgreSQL database. Returns a database connection."""
return psycopg2.connect("dbname=tournament")
def deleteMatches():
"""Remove all the match records from the da... |
(function(d){d['ku']=Object.assign(d['ku']||{},{a:"پەڕگەکە ناتوانرێت باربکرێت:",b:"دەستکاری بلۆک",c:"کۆد",d:"قەڵەو",e:"وتەی وەرگیراو",f:"لار",g:"وێنە یان پەڕگە دابنێ",h:"پڕ بەقەبارەی وێنە",i:"لای وێنە",j:"ڕیزکردنی وێنە بۆ لای چەپ",k:"ناوەڕاستکراوی وێنە",l:"ڕیزکردنی وێنە بۆ لای ڕاست",m:"وێدجیتی وێنە",n:"وێنە دابنێ",o:"ل... |
const { constants, protocols } = require('hardlydifficult-ethereum-contracts')
const { reverts } = require('truffle-assertions')
const CodeRequiredHook = artifacts.require('CodeRequiredHook.sol')
contract('CodeRequiredHook', accounts => {
const lockCreator = accounts[1]
const keyBuyer = accounts[5]
let lock
l... |
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
// @inheritedComponent Tooltip
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { emphasize, withStyles... |
var blockly = require('blockly');
blockly.JavaScript.contract_details = function(block) {
var code = 'details';
return [code, blockly.JavaScript.ORDER_ATOMIC];
};
|
#pragma once
/// @cond
#ifndef __XTD_DRAWING_NATIVE_LIBRARY__
#error "Do not include this file: Internal use only"
#endif
/// @endcond
#include <cstdint>
#include <tuple>
#include <vector>
#include <xtd/static.h>
#include <xtd/drawing_native_export.h>
/// @brief The xtd namespace contains all fundamental classes to a... |
/*
* This file is part of the Black Magic Debug project.
*
* Copyright (C) 2019 Black Sphere Technologies Ltd.
* Written by Dave Marples <dave@marples.net>
*
* 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 ... |
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.definePrope... |
import logging
import os
import textwrap
import threading
import time
import pytest
import salt.loader
import salt.utils.atomicfile
import salt.utils.files
import salt.utils.path
import salt.utils.platform
import salt.utils.stringutils
log = logging.getLogger(__name__)
pytestmark = [
pytest.mark.windows_whiteli... |
import React, { useState } from "react";
import SideNav from "react-simple-sidenav";
import menu from "../assets/menu.png";
import { Link } from "react-router-dom";
//import { Carousel } from "react-bootstrap";
function SideBar() {
const [showNav, setShowNav] = useState();
const navItems = [
<Link to=... |
"""ParenMatch -- An IDLE extension for parenthesis matching.
When you hit a right paren, the cursor should move briefly to the left
paren. Paren here is used generically; the matching applies to
parentheses, square brackets, and curly braces.
WARNING: This extension will fight with the CallTips extension,
because th... |
from .application_command import *
from .base import *
from .message import *
from .modal import *
__all__ = []
__all__.extend(application_command.__all__)
__all__.extend(base.__all__)
__all__.extend(message.__all__)
__all__.extend(modal.__all__)
|
"""Superimpose histograms and curves"""
import numpy as np
from vedo.pyplot import histogram, plot
from vedo import settings
settings.defaultFont = "Bongas"
mu, sigma, n, bins = 100.0, 15.0, 600, 50
samples = np.random.normal(loc=mu, scale=sigma, size=n)
x = np.linspace(min(samples), max(samples), num=50)
y = 1/(sigm... |
var telegram = require('telegram-bot-api');
var util = require('util');
var _ = require('lodash');
// helper callback
function defaultApiCallback(err) {
if (err) {
logger.error("Error on API Callback: %j", err);
}
}
// bot object
function Bot(token) {
this.id = null;
this.name = null;
thi... |
const mongoose = require('mongoose');
const guildConfigSchema = mongoose.Schema({
guildId: {
type: mongoose.SchemaTypes.String,
required: true,
unique: true
},
moderation: {
mute_role: {
type: mongoose.SchemaTypes.String,
required: false,
default: null
},
dele... |
// @flow
import fs from "fs"
import path from "path"
import mkdirp from "mkdirp"
import glob from "glob"
import R from "ramda"
import type { LinguiConfig, CatalogApi } from "./types"
import * as locales from "./locales"
import { formats } from "."
export default (config: LinguiConfig): CatalogApi => {
const format ... |
import mitogen.core
import mitogen.select
import testlib
class BoolTest(testlib.RouterMixin, testlib.TestCase):
klass = mitogen.select.Select
def test_latch(self):
latch = mitogen.core.Latch() # oneshot
select = self.klass()
self.assertFalse(select)
select.add(latch)
... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import TreeView from '@material-ui/lab/TreeView';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import ChevronRightIcon from '@material-ui/icons/ChevronRight';
import TreeItem from '@material-ui/lab/TreeItem';
import codes f... |
import torch
import torch.nn.functional as F
from diagan.models.mnist import MNIST_DCGAN_Generator
from torch_mimicry.nets import sngan
from torch_mimicry.nets import infomax_gan
from torch_mimicry.nets import ssgan
from torch_mimicry.modules.losses import hinge_loss_dis, minimax_loss_dis
from torch_mimicry.nets.gan i... |
'use strict';
var jQuery = require('jquery');
var $ = jQuery;
var _ = require('underscore');
// require('tablesorter');
// require('tablesorterPager');
require('datatables');
//require('jquery.browser');
require('toolkit');
// require('../../node_modules/sidr/dist/jquery.sidr.min.js');
var Backbone = require('backbone... |
'''
Parser for our Exp1bytecode language
'''
# lookahead sets for parser
exp_lookahead = [
'ADD',
'SUB',
'MUL',
'DIV',
'NOT',
'EQ',
'LE',
'LPAREN',
'NAME',
'RVX',
'TSX',
'NUMBER',
]
instr_lookahead = [
'PRINT',
'STORE',
'INPUT',
'JUMPT',
'JUMPF',
... |
'use strict';
angular.module('in100gramApp')
.config(function ($stateProvider) {
$stateProvider
.state('error', {
parent: 'site',
url: '/error',
data: {
authorities: [],
pageTitle: 'Error page!'
... |
Object.defineProperty(exports, '__esModule', {value: true});
exports.URL = void 0;
var _whatwgUrlWithoutUnicode = require('whatwg-url-without-unicode');
var _reactNative = require('react-native');
var NativeBlobModule = _reactNative.NativeModules.NativeBlobModule;
var BLOB_URL_PREFIX = null;
if (
NativeBlobModule &&
... |
""" command line options, ini-file and conftest.py processing. """
import argparse
import contextlib
import copy
import enum
import inspect
import os
import shlex
import sys
import types
import warnings
from functools import lru_cache
from types import TracebackType
from typing import Any
from typing import Callable
fr... |
/**
* Hey! Welcome to @chakra-ui/vue Icon
*
* CIcon is used for rendering icons.
*
* Use the <CIcon> component to easily render <svg> icons.
*
* @see Docs https://vue.chakra-ui.com/icon
* @see Source https://github.com/chakra-ui/chakra-ui-vue/blob/master/packages/chakra-ui-core/src/CIcon/CIcon.js
*/
imp... |
/* Generated by CIL v. 1.7.0 */
/* print_CIL_Input is false */
struct _IO_FILE;
struct timeval;
extern float strtof(char const *str , char const *endptr ) ;
extern void signal(int sig , void *func ) ;
typedef struct _IO_FILE FILE;
extern int atoi(char const *s ) ;
extern double strtod(char const *str , char co... |
trackingID = null;
if (trackingID) {
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', trackingID, 'auto');
ga('set', 'anonymizeIp', true);
ga('send', 'pageview');
}
|