text stringlengths 3 1.05M |
|---|
import _default from './replaceSubstitutionTransformer';
export { _default as default };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZXBsYWNlU3Vic3RpdHV0aW9uVHJhbnNmb3JtZXIvaW5kZXguanMiXSwibmFtZXMiOlsiZGVmYXVsdCJdLCJtYXBwaW5ncyI6InFCQUFvQixrQztxQkFBYkE... |
import React from 'react'
import styled from 'styled-components'
import { Button } from './Button'
const Section = styled.section`
width:100%;
heigth:100%;
background-color: bisque;
padding: 4rem 0rem;
`;
const Container = styled.div`
display:grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 8... |
# model settings
model = dict(
type='CascadeRCNN',
pretrained=None,
backbone=dict(
type='SwinTransformer',
embed_dims=96,
depths=[2, 2, 6, 2],
num_heads=[3, 6, 12, 24],
window_size=7,
mlp_ratio=4.,
qkv_bias=True,
qk_scale=None,
drop_rat... |
//= require spree/backend
//= require spree/backend/spree_product_assembly/index
|
import base64
import json
from locust import HttpUser, TaskSet, task, constant, LoadTestShape
from random import randint, choice
class MyCustomShape(LoadTestShape):
time_limit = 300
spawn_rate = 20
def tick(self):
run_time = self.get_run_time()
if run_time < self.time_limit:
... |
#ifndef _POSITIONBASEDELASTICRODSCONSTRAINTS_H
#define _POSITIONBASEDELASTICRODSCONSTRAINTS_H
#include <Eigen/Dense>
#include "Demos/Simulation/Constraints.h"
#include "PositionBasedElasticRodsModel.h"
namespace PBD
{
class SimulationModel;
class GhostPointEdgeDistanceConstraint : public Constraint
{
public:
s... |
import numpy as np
import torch
import torch.nn.functional as F
# https://github.com/kmaninis/OSVOS-PyTorch
def class_balanced_cross_entropy_loss(output, label, size_average=True, batch_average=True):
"""Define the class balanced cross entropy loss to train the network
Args:
output: Output of the network
... |
import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '../helpers/start-app';
var application;
module('Acceptance: ApplicationRendersTest', {
beforeEach: function() {
application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
}
});
test('v... |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-07-16 18:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
class Migration(migrations.Migration):
initial = True
... |
// Dragon Robes - Based off of Storm Robes - LoKi
#include <std.h>
inherit PARMOUR;
object ARMO;
void init(){
::init();
if(interactive(ETO))
{
TO->add_item_owner(ETOQN);
}
}
void create(){
::create();
set_heart_beat(1);
set_name("robes");
set_id(({"robe","robes","dragon robe","dragon robes"... |
'''
This code runs pre-trained MGN.
If you use this code please cite:
"Multi-Garment Net: Learning to Dress 3D People from Images", ICCV 2019
Code author: Bharat
'''
import tensorflow as tf
import numpy as np
import pickle as pkl # Python 3 change
from network.base_network import PoseShapeOffsetModel
fro... |
from ctypes import *
from ctypes.wintypes import BYTE, WORD, DWORD, HANDLE, LPVOID, ULONG, LONG
# Let's map the Microsoft types to ctypes for clarity
# common types now imported from ctypes.wintypes
LPBYTE = POINTER(c_ubyte)
LPTSTR = POINTER(c_char)
PVOID = c_void_p
UINT_PTR = c_ulong
SIZE_T = c_ulong
DW... |
#include "config.h"
#include <bitcoin/feerate.h>
#include <bitcoin/script.h>
#include <ccan/cast/cast.h>
#include <ccan/mem/mem.h>
#include <ccan/tal/str/str.h>
#include <channeld/channeld_wiregen.h>
#include <closingd/closingd_wiregen.h>
#include <common/close_tx.h>
#include <common/closing_fee.h>
#include <common/fee... |
'''
Process raw data into dictionary: {state => {lga => {weekly rent bin => count}}}
e.g. {'New South Wales' => {'North Sydney' => {'$450-$549' => 2790}}}
'''
import csv
import os
def process():
file = open(os.path.dirname(os.path.realpath(__file__)) + '/data.csv', 'r')
isfirst = True
reader = csv.reader(... |
# -*- coding: utf-8 -*-
"""
Profile: http://hl7.org/fhir/StructureDefinition/ClinicalImpression
Release: STU3
Version: 3.0.2
Revision: 11917
Last updated: 2019-10-24T11:53:00+11:00
"""
import typing
from pydantic import Field, root_validator
from pydantic.error_wrappers import ErrorWrapper, ValidationError
from pydant... |
import tensorflow as tf
from vit_keras import vit
def test_saving():
inp = tf.keras.layers.Input(shape=(256, 256, 3))
base = vit.vit_b16( # type: ignore
image_size=256,
pretrained=False,
include_top=False,
pretrained_top=False,
)
x = base(inp)
x = tf.keras.layers.... |
//*************************************************************************
//* Summary of definitions which are used in each peripheral *
//*************************************************************************
#ifndef peripheral_definitions_h
#define peripheral_definitions_h
typedef unsigned char U... |
# CPython example
from py4j.clientserver import ClientServer, JavaParameters, PythonParameters
import os
PY4J_JAVA_PORT = int(os.getenv("PY4J_JAVA_PORT", -1))
PY4J_PYTHON_PORT = int(os.getenv("PY4J_PYTHON_PORT", -1))
PY4J_AUTH_TOKEN = os.getenv("PY4J_AUTH_TOKEN")
class PythonService(object):
def toUpperCase(self... |
import os
import sys
import random
import traceback
import numpy as np
from scipy.stats import rankdata
import math
from math import log
import argparse
from datashape.coretypes import real
random.seed(42)
import threading
import configs
import codecs
import logging
logger = logging.getLogger(__name__)
logging.basicCon... |
fin = open("input")
fout = open("output", "w")
n = int(fin.readline())
fout.write("#" * n)
fout.close()
|
from __future__ import generators
import os, random
import images, gamesrv
from images import ActiveSprite
import boards
from boards import CELL, HALFCELL, bget
from player import Dragon, BubPlayer
from mnstrmap import Monky
from bubbles import Bubble
from bonuses import Bonus
LocalDir = os.path.basename(os.path.dirna... |
# Third Party Imports
from cms.toolbar_base import CMSToolbar
from cms.toolbar.items import Break
from cms.toolbar_pool import toolbar_pool
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from .models import GuestList
@toolbar_pool.register
class GuestListToolbar(CM... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -------------------------------------------------------------------... |
'use strict';
var Analytics = require('@segment/analytics.js-core').constructor;
var integration = require('@segment/analytics.js-integration');
var tester = require('@segment/analytics.js-integration-tester');
var sandbox = require('@segment/clear-env');
var MouseStats = require('../lib/');
describe('MouseStats', fu... |
"""
Turing Machine Package Handler
Author: Max Miller
Purpose: To allow for packages and code organization in large TM processes
"""
import os
import fnmatch
IMPORT_STATEMENT = "#import "
PACKAGE_EXTENSION = ".tmpk"
def find_local_packages(local_file):
current_directory_path = os.path.dirna... |
// 0.0.15
var Module = (function() {
var _scriptDir = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : undefined;
return (
function(Module) {
Module = Module || {};
var c;c||(c=typeof Module !== 'undefined' ? Module : {});
c.compileGLSLZeroCopy=function(a,b,d,e){d=!!d;swi... |
import React from 'react';
import {browserHistory} from 'react-router';
import PropTypes from 'prop-types';
import ButtonGroupAction from '../../components/common/ButtonGroupAction';
let self;
class ListRole extends React.Component {
constructor(props, context) {
super(props, context);
self = this... |
################################################################
# File: mangapanda.py
# Title: MANGAdownloader's site scraper
# Author: ASL97/ASL <asl97@outlook.com>
# Version: 2
# Notes : DON'T EMAIL ME UNLESS YOU NEED TO
# TODO: *blank*
################################################################
import re
impo... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PutBucketMetricsConfigurationCommand = void 0;
const models_0_1 = require("../models/models_0");
const Aws_restXml_1 = require("../protocols/Aws_restXml");
const middleware_bucket_endpoint_1 = require("@aws-sdk/middleware-bucket-endpoi... |
const assert = require('assert');
const path = require('path');
const fs = require('@parcel/fs');
const {bundle, run, assertBundleTree} = require('@parcel/test-utils');
describe('less', function() {
it('should support requiring less files', async function() {
let b = await bundle(path.join(__dirname, '/integrati... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Mar 20 12:20:38 2021
@author: enprietop
"""
from DJSFunctions import extract_preprocess_data, ankle_DJS
from plot_dynamics import plot_ankle_DJS
import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors a... |
# Generated by Django 2.2 on 2020-04-22 09:53
from django.db import migrations
import django.db.models.manager
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='entry',
managers... |
/*
* aciTree jQuery Plugin v4.5.0-rc.7
* http://acoderinsights.ro
*
* Copyright (c) 2014 Dragos Ursu
* Dual licensed under the MIT or GPL Version 2 licenses.
*
* Require jQuery Library >= v1.9.0 http://jquery.com
* + aciPlugin >= v1.5.1 https://github.com/dragosu/jquery-aciPlugin
*/
/*
* This extension adds... |
from __future__ import unicode_literals
import os
from distutils.spawn import find_executable
from tempfile import mkstemp
import click
import six
from pyinfra import logger
from pyinfra.api.exceptions import InventoryError
from pyinfra.api.util import get_file_io
from .util import (
get_sudo_password,
mak... |
/*!
* OpenUI5
* (c) Copyright 2009-2020 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(["sap/ui/core/mvc/Controller","sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils"],function(C,E){"use strict";return C.extend("sap.ui.fl.support.apps.... |
import importlib
import inspect
import json
import logging
import glob
import os
import pkgutil
from pathlib import Path
import subprocess
import sys
import types
import tempfile
import re
from typing import Dict, Any, Optional, List
# Because I'm subprocessing myself, I need to do weird thing as import.
try:
# If... |
import info
class subinfo(info.infoclass):
def setTargets(self):
self.versionInfo.setDefaultValues()
self.description = "Solid"
def setDependencies(self):
self.buildDependencies["virtual/base"] = None
self.buildDependencies["kde/frameworks/extra-cmake-modules"] = None
... |
import {request} from './request'
export function getDetail(iid) {
return request({
url: '/detail',
params: {
iid
}
})
}
export class Goods {
constructor(itemInfo, columns, services) {
this.title = itemInfo.title
this.desc = itemInfo.desc
this.newPrice = itemInfo.price
this.old... |
import { createIcon } from '../createIcon';
export const OutlinedFileAudioIconConfig = {
name: 'OutlinedFileAudioIcon',
height: 512,
width: 384,
svgPath: 'M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.05... |
"use strict";function H264Decoder(){function a(){debug.log("Construct H264 Codec"),b=Module.cwrap("init_jsFFmpeg","void",[]),c=Module.cwrap("context_jsFFmpeg","number",["number"]),d=Module.cwrap("decode_video_jsFFmpeg","number",["number","array","number","number"]),e=Module.cwrap("get_width","number",["number"]),f=Modu... |
#pragma once
#ifndef DISABLE_PLAYFABENTITY_API
#include <playfab/PlayFabEventPipeline.h>
#include <unordered_map>
namespace PlayFab
{
/// <summary>
/// The enumeration of all built-in event pipelines
/// </summary>
enum class EventPipelineKey
{
PlayFabPlayStream, // PlayFab (PlayStream) ... |
from django.shortcuts import render, redirect
from post.models import Post
from post.form import PostForm
# Create your views here.
def post(request):
data = Post.objects.all()
context = {
'data': data
}
return render(request, 'postTemplate.html', context)
def createPost(request):
if reques... |
/*
* PCIe host controller driver for Xilinx AXI PCIe Bridge
*
* Copyright (c) 2012 - 2014 Xilinx, Inc.
*
* Based on the Tegra PCIe driver
*
* Bits taken from Synopsys Designware Host controller driver and
* ARM PCI Host generic driver.
*
* This program is free software: you can redistribute it and/or modify
... |
import pytest
from mock import create_autospec, patch
import dcoscli.marathon.main as main
from dcos import marathon
from dcos.errors import DCOSException, DCOSHTTPException
from ..common import file_bytes
from ..fixtures.marathon import pod_list_fixture
def test_pod_add_invoked_successfully():
_assert_pod_add_... |
"""OsservaPrezzi class for aio_osservaprezzi."""
from .const import ENDPOINT, REGIONS
from .models import Station
from .exceptions import (
RegionNotFoundException,
StationsNotFoundException,
OsservaPrezziConnectionError,
OsservaPrezziException,
)
from typing import Any
import asyncio
import aiohttp
im... |
# coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... |
from views import *
from app import app
if __name__ == '__main__':
db.bind(**app.config['PONY'])
db.generate_mapping(create_tables=True)
app.run(port=8080, host='127.0.0.1')
|
from rest_framework import generics
from rest_framework.response import Response
from rest_framework.reverse import reverse
from drones import views
class ApiRootVersion2(generics.GenericAPIView):
name = 'api-root'
def get(self, request, *args, **kwargs):
return Response({
'vehicle-categ... |
# Untested
from libsubmit.channels import SSHInteractiveLoginChannel
from libsubmit.providers import CobaltProvider
from libsubmit.launchers import SingleNodeLauncher
from parsl.config import Config
from parsl.executors.ipp import IPyParallelExecutor
from parsl.executors.ipp_controller import Controller
from parsl.tes... |
(function () {
var hostname = window.location.hostname;
var origin = window.location.protocol + '//' + hostname + (window.location.port ? ':' + window.location.port : '');
BR.conf = {};
// Switch for intermodal routing demo
BR.conf.transit = false;
// or as query parameter (index.html?transit=... |
# Courtesy of hecanjob/pippi.pd
import socket
class PdSend():
pdhost = 'localhost'
#pdhost = "192.168.0.33"
sport = 3000
rport = 3001
pd = None
connected = False
def __init__(self):
self.connect()
def connect(self):
print 'connecting to pd'
try:
self... |
##
#
# File: testBinaryCifWriter.py
# Author: J. Westbrook
# Date: 16-May-2021
##
import logging
import os
import sys
import time
import unittest
from mmcif.api.DataCategoryTyped import DataCategoryTyped
from mmcif.api.DictionaryApi import DictionaryApi
from mmcif.api.PdbxContainers import DataContainer
from mmci... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: Bertrand256
# Created on: 2017-04
"""
Handles caching different data from application forms.
"""
import copy
import json
import threading
import time
import logging
from typing import Optional
from PyQt5.QtWidgets import QSplitter, QDialog
from PyQt5.QtCore ... |
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2018, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file networkstatus.c
* \brief Functions and structures for handling ... |
$(document).on("ready", function(){
$("footer").ready(loadtabla);
$("#calculoahora").click(cargapage);
$("#cerrarmodal").click(cargapage);
arreglorespuestascliente = ["Se requiere de un flujo de efectivo" , "" , ""];
});
function loadtabla(){
var elementosnuevos =[];
var requeridosp = [];
url =now + "in... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{"8ILM":function(t,e){e.__esModule=!0,e.default={body:'<path d="M7.801 14.539c1.586-1.984 4.832-2.37 7.145-2.827c1.941-.384 4.049-.612 5.881-1.394c2.596-1 2.48-4.931 3.268-4.931c.588 0 2.697 3.019 4.549 3.019c1.58 0 2.58-3.697 3.453-3.697c.877 0 1.871 3.697 3.451 ... |
import json
print('MRPC ==========================================')
with open('/Users/lpmayos/code/structural-probes/structural-probes/lpmayos_probes_experiments/analyze_results/bert_base_cased_finetuned_glue_results.json') as f:
data = json.load(f)
for run in data:
for task in data[run]:
... |
#pragma once
#ifndef BOX_H
#define BOX_H
#include "rtweekend.h"
#include "aarect.h"
#include "hittable_list.h"
class box : public hittable {
public:
box() {}
box(const point3& p0, const point3& p1, shared_ptr<material> ptr);
virtual bool hit(const ray& r, double t_min, double t_max, hit_record& rec) co... |
const sequelize = require('../config/conexion');
const { deleteData } = require('./delete.script');
const deleteCities = require('./deleteCities.script');
const deleteCountries = {
region: async(idRegion) => {
try {
const paises = await sequelize.query(
`SELECT idPais FROM paise... |
from .iqr_server import IqrService # noqa: F401
|
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.http import HttpResponse, HttpResponsePermanentRedirect
from graphite.url_shortener.baseconv import base62
from graphite.url_shortener.models import Link
import re
def follow(request, link_id):
"""Follow existi... |
import sys, os
sys.path.append(os.path.realpath(os.path.dirname(__file__)+"/."))
from embedding import *
def test_order_local():
V = np.array([[1, 2, 3], [4, 5, 6]])
Vt = np.empty((2, 3, 5))
Vt[:, :, 4] = V * 3
Vt[:, :, 3] = V * 2
Vt[:, :, 2] = V + 5
Vt[:, :, 1] = V + 0.5
Vt[:, :, 0] = V
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
# from django import forms
from django.core.exceptions import (
ImproperlyConfigured,
)
from django.forms.formsets import formset_factory
from django.forms.models import _get_foreign_key as _dj_get_foreign_key
from django.forms.models import (
BaseModelFormSet, InlineForeignKeyField, capfirst
)
from restorm.ex... |
# coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online # noqa: E501
OpenAPI spec version: 0.8.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
impo... |
import React, { useState, useEffect } from "react";
import {
View,
Image,
Text,
Alert,
StyleSheet,
TouchableOpacity,
FlatList,
} from "react-native";
import { ListItem, Icon, Button } from "react-native-elements";
import {
heightPercentageToDP,
widthPercentageToDP,
} from "react-native-responsive-scre... |
# Generated by Django 3.2.4 on 2021-06-23 13:18
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('vax_control', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='MedicalStaffData'... |
"use strict"
CKEDITOR.plugins.setLang( 'bt_table', 'ca', {
"compactStyle": "Taula condensada",
"addBorders": "Taula amb vores",
"addStripes": "Taula estil zebra",
"addHover": "Taula dinàmica",
});
|
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Configuration file for ipython-kernel."""
import logging
import os
from pathlib import Path
from platform import platform
from IPython.core.getipython import get_ipython
from traitlets.config import get_config
# even if we're not using them now we will
# from ipykerne... |
# -*- coding: utf-8 -*-
'''Code to perform basic stemming of Arabic tweets
Running time ~4m for 400k tweets on Macbook Pro
Input file <name>.txt; output <name>_normalised.txt'''
#################
import csv,re,sys,os
import string
import codecs
import collections
from regex import *
import argparse
############
def get... |
import pytest
import torch
from d3rlpy.algos.torch.bcq_impl import BCQImpl, DiscreteBCQImpl
from d3rlpy.models.encoders import DefaultEncoderFactory
from d3rlpy.models.optimizers import AdamFactory
from d3rlpy.models.q_functions import create_q_func_factory
from tests.algos.algo_test import (
DummyActionScaler,
... |
from django.contrib import admin
from .models import ArticleModel, SiteNewsModel, FAQModel
from watson.admin import SearchAdmin
from django.core.mail import EmailMessage, get_connection
from blog_zapravschika.forms import EmailSend
from django.shortcuts import render
from django.urls import path
from django.contrib.aut... |
// @flow
import { StyleSheet } from 'react-native'
export default StyleSheet.create({
footer: {
marginTop: 12,
marginLeft: 12,
marginRight: 12,
marginBottom: 12,
height: 48,
},
rate: {
flex: 1,
flexDirection: 'row',
alignItems: 'stretch',
justifyContent: 'center',
alignC... |
def problem450():
"""
A hypocycloid is the curve drawn by a point on a small circle rolling
inside a larger circle. The parametric equations of a hypocycloid centered
at the origin, and starting at the right most point is given by:
$x(t) = (R - r) \\cos(t) + r \\cos(\\frac {R ... |
# Copyright 2020 Google LLC
#
# 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, softw... |
const util = require('util');
exports.setApp = function (app, pool) {
app.get('/searchHlsEvals', function (req, res) {
var searchParams = req.query;
var course = searchParams["course"];
course = course.replace(/[^-a-z0-9 \/]/g , "");
var professor = searchParams["professor"]
professor = professo... |
# -*- coding: utf-8 -*-
from pybrain.supervised.trainers import BackpropTrainer
from pybrain.tools.shortcuts import buildNetwork
from pybrain.structure import TanhLayer
from pybrain.structure import LinearLayer
from pybrain.structure import SigmoidLayer
from pybrain.datasets import SupervisedDataSet
from Tkinter import... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... |
CKEDITOR.plugins.setLang("a11yhelp","et",{title:"Accessibility Instructions",contents:"Abi sisu. Selle dialoogi sulgemiseks vajuta ESC klahvi.",legend:[{name:"\u00dcldine",items:[{name:"Editor Toolbar",legend:"Press ${toolbarFocus} to navigate to the toolbar. Move to the next and previous toolbar group with TAB and SHI... |
const router = require('express').Router();
const { logger } = require('../../lib/logger');
const auth = require('../../middleware/check-auth');
const axios = require('axios');
const qs = require('querystring');
const dotenv = require('dotenv');
dotenv.config();
var host = process.env.KEYCLOAK_HOST;
var realm = proces... |
/**
* Generic state manager to be used with a separate list of states
* @class Utils.stateMachine
*/
const LOG_TAG = '\x1b[35m' + '[utils/stateMachine]' + '\x1b[39;49m ';
var StateMachine = function (_states) {
// +-------------------
// | Private members.
// +-------------------
/**
* @property {Object} st... |
if(_area_jsonp_370705){_area_jsonp_370705({"370705001":"东关街道","370705002":"大虞街道","370705003":"梨园街道","370705004":"廿里堡街道","370705005":"潍州路街道","370705006":"北苑街道","370705007":"广文街道","370705009":"新城街道","370705010":"清池街道","370705012":"北海路街道"})} |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... |
from typing import List
class Solution:
def minOperations(self, nums: List[int], x: int) -> int:
target, size, win_sum, lo, n = sum(nums) - x, -1, 0, -1, len(nums)
for hi, num in enumerate(nums):
win_sum += num
while lo + 1 < n and win_sum > target:
lo += 1
... |
/*
* BinaryInputOutputPort.h - <binary input/output port>
*
* Copyright (c) 2009 Higepon(Taro Minowa) <higepon@users.sourceforge.jp>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistri... |
# encoding: utf8
from rest_framework import filters, exceptions as rest_exceptions
from pyparsing import ParseException
from django.core import exceptions as django_exceptions
from django.db.models import Q, F
from rest_framework.serializers import as_serializer_error
from .exceptions import BadQuery
from . import p... |
OPTIMAL = False
CONFIGS = [
# alt_lazy_ff_cg
(49, ["--evaluator", "hff=ff(transform=H_COST_TRANSFORM)",
"--evaluator", "hcg=cg(transform=H_COST_TRANSFORM)", "--search",
"lazy_greedy([hff,hcg],preferred=[hff,hcg],cost_type=S_COST_TYPE,bound=BOUND)"]),
# lazy_greedy_ff_1
(171, ["--evalu... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.companySchema = undefined;
var _mongoose = require("mongoose");
var companySchema = exports.companySchema = new _mongoose.Schema({
name: String,
deliveryLocations: [],
deliveryDays: [],
description: String,
c... |
import pyglet
import random
import math
from . import resources
def distance(point_1=(0, 0), point_2=(0, 0)):
"""Returns the distance between two points"""
return math.sqrt((point_1[0] - point_2[0]) ** 2 + (point_1[1] - point_2[1]) ** 2)
def asteroids(num_asteroids, player_position):
"""Generate asteroi... |
const express = require('express');
const path = require('path');
const bcrypt = require('bcrypt');
const crypto = require('crypto');
const OAuthServer = require('oauth2-server');
const AccessDeniedError = require('oauth2-server/lib/errors/access-denied-error');
const Request = OAuthServer.Request;
const Response = OA... |
# -*- coding: utf-8 -*-
'''
Connection module for Amazon S3
:configuration: This module accepts explicit s3 credentials but can also utilize
IAM roles assigned to the instance through Instance Profiles. Dynamic
credentials are then automatically obtained from AWS API and no further
configuration is necessa... |
__version__ = '2018.001'
|
# Copyright (c) Ingmar Nitze and Konrad Heidler
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import matplotlib.pyplot as plt
import numpy as np
import os
import pandas as pd
import torch
from matplotlib.ticker import MaxNLocator
from matpl... |
from logging import captureWarnings
from aws_cdk import (
aws_s3 as s3,
aws_kinesis as kinesis,
aws_kinesisfirehose as firehose,
aws_iam as iam,
core,
)
import resource_resolver
PREFIX = resource_resolver.PREFIX
# Create necessary testing resources - s3 bucket, data streams and delivery streams
cl... |
class GH_SimplifyTreeComponent_OBSOLETE(GH_Component,IGH_InstanceDescription,GH_ISerializable,IGH_DocumentObject,IGH_ActiveObject,IGH_Component,IGH_PreviewObject,IGH_BakeAwareObject):
""" GH_SimplifyTreeComponent_OBSOLETE() """
def AfterSolveInstance(self,*args):
""" AfterSolveInstance(self: GH_Component) """
... |
import { detectCollision } from './../utils/utils.js';
import * as Constants from './../constants.js';
import Tower1 from './../entity/towers/Tower1.js';
import Tower2 from './../entity/towers/Tower2.js';
import Tower3 from './../entity/towers/Tower3.js';
import Tower4 from './../entity/towers/Tower4.js';
import Tower5... |
require('dotenv').load()
const path = require('path')
const express = require('express')
const bodyParser = require('body-parser')
const middleware = require('./middleware')
const app = express()
const port = process.env.PORT || 3000
if (!process.env.DISABLE_AUTH || process.env.DISABLE_AUTH === "0") {
console.log(... |
searchNodes=[{"doc":"This module defines the behaviour for providing event bridging functionality, allowing a supervised process (implemented via bondy_subscriber) to consume WAMP events based on a normal subscription to publish (or produce) those events to an external system, e.g. another message broker, by previously... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* AMD Memory Encryption Support
*
* Copyright (C) 2016 Advanced Micro Devices, Inc.
*
* Author: Tom Lendacky <thomas.lendacky@amd.com>
*/
#define DISABLE_BRANCH_PROFILING
/*
* Since we're dealing with identity mappings, physical and virtual
* addresses are the same,... |
import json
def load_multi_topics_file(filepath, model_type):
topic_file = json.load(open(filepath))
# first set of keys are the datasets
datasets = {
key: [
{
"topic_id": idx,
"terms": topic,
"model_name": key,
"mo... |