text stringlengths 3 1.05M |
|---|
!function(e){function r(r){for(var n,a,u=r[0],i=r[1],f=r[2],s=0,p=[];s<u.length;s++)o[a=u[s]]&&p.push(o[a][0]),o[a]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(l&&l(r);p.length;)p.shift()();return c.push.apply(c,f||[]),t()}function t(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,u=1;u<... |
window.peopleAlsoBoughtJSON = [{"asin":"B01GS5YY0W","authors":"Andy Remic","cover":"61IM1zsgXnL","length":"4 hrs and 52 mins","narrators":"Tim Gerard Reynolds","title":"Return of Souls"},{"asin":"B07VYMVXK6","authors":"Brandon Sanderson","cover":"51QNIbZh6XL","length":"14 hrs and 30 mins","narrators":"Suzy Jackson","ti... |
import smart_imports
smart_imports.all()
class TestRequestsBase(utils_testcase.TestCase):
def setUp(self):
super(TestRequestsBase, self).setUp()
game_logic.create_test_map()
forum_category = forum_models.Category.objects.create(caption='category-1', slug='category-1')
forum_mo... |
'use strict'
/* ------------------------------------------------------------------------
NB: initially, I used objects for options passing:
decimalToPrecision ('123.456', { digits: 2, round: true, afterPoint: true })
...but it turns out it's hard to port that across different languages and it i... |
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "VKResponse.h"
@class VKCountries;
@interface database_getCountriesById_res : VKResponse
{
VKCountries *_response;
}
@property(retain, nonatomic) VKCountries *respons... |
import { expect } from "chai"
import { toLegendState } from "./stacked-legend"
describe("Stacked Legend", () => {
describe("toLegendState helper", () => {
it("should nominal", () => {
expect(
toLegendState([
{
type: "ordinal",
domain: ["en", "pt", "es", "in", "und"... |
import pandas as pd
import matplotlib.pyplot as plt
from data import games
attendance = games.loc[(games['type'] == 'info') & (games['multi2'] == 'attendance'), ['year', 'multi3']]
attendance.columns = ['year', 'attendance']
attendance.loc[:, 'attendance'] = pd.to_numeric(attendance.loc[:, 'attendance'])
attendance... |
# Copyright 2017 The Abseil 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 applicable law or agreed to in ... |
//01-MODULOS INDIVIDUALES MODULO CONTROLADOR })();
var controladorPresupuesto = (function() {
var Gasto = function(id, descripcion, valor) {
this.id = id;
this.descripcion = descripcion;
this.valor = valor;
};
var Ingreso = function(id, descripcion, valor) {
this.id = id;
this.descripcion = d... |
import numpy as np
from random import shuffle
import scipy.sparse
def softmax_loss_naive(theta, X, y, reg):
"""
Softmax loss function, naive implementation (with loops)
Inputs:
- theta: d x K parameter matrix. Each column is a coefficient vector for class k
- X: m x d array of data. Data are d-dime... |
class Hello:
def __init__(self):
while True:
print("Hello!")
|
window.__NUXT__=(function(a,b,c,d,e){return {staticAssetsBase:"https:\u002F\u002Fwww.baca-quran.id\u002Fstatic\u002F1627814429",layout:"default",error:b,state:{notification:{show:a,title:c,message:c},isShowSidebar:a,isSupportWebShare:a,headerTitle:"Baca Qur'an",page:"home",lastReadVerse:b,settingActiveTheme:{name:"dark... |
"""
Funds API For Digital Portals
Search for mutual funds and ETFs using one single consolidated API, including a criteria-based screener. The API provides also base data, key figures, and holdings. A separate endpoint returns the possible values and value range for the parameters that the endpoint /fund/nota... |
_base_ = [
'../_base_/models/dcgan_64x64.py',
'../_base_/datasets/unconditional_imgs_64x64.py',
'../_base_/default_runtime.py'
]
model = dict(
discriminator=dict(output_scale=4, out_channels=1),
gan_loss=dict(type='GANLoss', gan_type='lsgan'))
# define dataset
# you must set `samples_per_gpu` and `i... |
from __future__ import print_function
from caffe import layers as L, params as P, to_proto
from caffe.proto import caffe_pb2
import caffe
import numpy as np
import matplotlib.pyplot as plt
import time
import datetime
from PIL import Image
import sys
sys.setrecursionlimit(150000)
# helper function for common structures... |
import logging
import math
import cmath
import os
from functools import reduce
from six import string_types
import numpy as np
# Ditto imports
from ditto.readers.abstract_reader import AbstractReader
from ditto.store import Store
from ditto.models.position import Position
from ditto.models.node import Node
from ditt... |
/* Vivien suggested a non affine bounded domain...
*
* Here is a case with 8 points in 2-D, same as rotation01 but with
* assignments intead of updates.
*
* The case should be trivial for ASPIC because the number of states
* is bounded and small.
*
* The case is much harder for a transformer-based approach, bec... |
import arviz
import numpy as np
import pandas
import seaborn as sns
import torch
import torch.distributions as dist
from matplotlib import pyplot
import test_stan
import generate_data
sns.set()
# np.random.seed(1)
def user_simulator_typezero(action, W, a, educability=0.6):
# action is either a tuple, or -1 for... |
/**
* PHP Email Form Validation - v2.0
* URL: https://bootstrapmade.com/php-email-form/
* Author: BootstrapMade.com
*/
!(function($) {
"use strict";
$('form.php-email-form').submit(function(e) {
e.preventDefault();
var f = $(this).find('.form-group'),
ferror = false,
... |
# Copyright (C) 2015-2022 by Vd.
# This file is part of Rocketgram, the modern Telegram bot framework.
# Rocketgram is released under the MIT License (see LICENSE).
import re
MD_RE = re.compile(r"([*_`\[])")
MD2_RE = re.compile(r"([_*\[\]()~`>#+\-=|{}.!\\])")
def html(text: str) -> str:
"""Helper function to ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
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 ("va... |
new Vue({
el: '#app',
created() {
},
data: {
show:false,
dynamic:"dynamic"
},
computed:{
},
methods: {
}
}); |
// Copyright (c) 2014-2016 The Dash Developers
// Copyright (c) 2016-2017 The PIVX developers
// Copyright (c) 2018-2019 The Ion developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef OBFUSCATIONCONFIG_H
#define OBFU... |
import unittest
import warnings
import numpy as np
from pydrake.solvers import mathematicalprogram as mp
from pydrake.solvers.clp import ClpSolver
class TestClpSolver(unittest.TestCase):
def _make_prog(self):
prog = mp.MathematicalProgram()
x = prog.NewContinuousVariables(4, "x")
prog.Ad... |
# Auto generated by generator.py. Delete this line if you make modification.
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
XPATH = {
'name' : "//h1[@id='rptZone_ctl03_ctl00_h1Title']",
'price' : "//div[@class='right']/p[@class='pCode']|//div[@class='right']/p[3]",
'categor... |
# Copyright 2020 InterDigital Communications, 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 ... |
//
// UserAvatarController.h
// iOSPrinciple_AVFoundation
//
// Created by WhatsXie on 2018/6/13.
// Copyright © 2018年 WhatsXie. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UserAvatarController : UIViewController
@end
|
export { default as SendButton } from './Send';
export { default as RespondForm } from './RespondForm';
|
module.exports={D:{"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0.00543,"26":0,"27":0,"28":0,"29":0.01086,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0,"37":0.00543,"38":0.00543,"39":0.00543,"40":0.00543,"41":0.00543... |
# -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates.
import logging
import numpy as np
import time
import weakref
from typing import Dict, List, Optional
import torch
from torch.nn.parallel import DataParallel, DistributedDataParallel
import detectron2.utils.comm as comm
from detectron2.utils.ev... |
"""Custom Pydantic Fields/Types."""
# Standard Library
import re
from typing import TypeVar
# Third Party
from pydantic import StrictInt, StrictFloat, constr
IntFloat = TypeVar("IntFloat", StrictInt, StrictFloat)
SupportedDriver = constr(regex=r"(scrapli|netmiko|hyperglass_agent)")
class StrictBytes(bytes):
"... |
import React, {Component} from 'react';
class NotFound extends Component {
render() {
return (
<h1>404</h1>
);
}
}
export default NotFound;
|
'use strict'
const { Order } = require('bfx-api-node-models')
const { args: { apiKey, apiSecret }, debug } = require('../util/setup')
const WSv2 = require('../../lib/transports/ws2')
const oA = new Order({
symbol: 'tBTCUSD',
price: 200,
amount: 1,
type: 'EXCHANGE LIMIT'
})
const oB = new Order({
symbol: 't... |
"""
Given a parent directory, return all the paths to
image class paths
"""
import sys
import glob
if __name__ == "__main__":
parent_dir = sys.argv[1]
all_dirs = glob.glob(parent_dir + "/*/*/*")
for i in all_dirs:
print(i)
|
/***************************************************************************//**
* @file
* @brief EFR32ZG13P_RTC_COMP register and bit field definitions
*******************************************************************************
* # License
* <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
****... |
# coding: utf-8
"""
Strava API v3
The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe... |
# Copyright 2020-present, Apstra, Inc. All rights reserved.
#
# This source code is licensed under End User License Agreement found in the
# LICENSE file at http://www.apstra.com/eula
import json
from aos.client import AosClient
from scripts.utils import deserialize_fixture, render_jinja_template
import urllib3
urlli... |
from setuptools import setup, find_packages
def main():
setup(
name='lieu',
version='1.1.1',
install_requires=[
'six',
'postal>=1.1.6',
'rocksdb',
'python-geohash',
'phonenumbers',
'mrjob',
],
package_d... |
import json
import logging
from collections import defaultdict
import requests
from requests.exceptions import ConnectionError
from pythonapm.metrics import METRIC_TYPE
from . import Surfacer
logger = logging.getLogger(__name__)
class RequestScopedHTTPSurfacer(Surfacer):
def __init__(self,
... |
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { MoralisProvider } from "react-moralis";
import "./index.css";
import { MoralisDappProvider } from "./providers/MoralisDappProvider/MoralisDappProvider";
/** Get your free Moralis Account https://moralis.io/ */
cons... |
/* v3_skey.c */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
* 1999.
*/
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
... |
def timer(f):
import functools
@functools.wraps(f)
def f2(*args, **kwargs):
import time
import inspect
t0 = time.time()
result = f(*args, **kwargs)
t1 = time.time()
fname = inspect.stack()[1][4][0].split('(')[0].strip()
print 'time for %s = %.2f' % (f... |
/*
BootstrapWebPage.h
Created by John Romkey - https://romkey.com/
December 6 2017
MIT License
*/
#ifndef BOOTSTRAP_WEB_PAGE_H
#define BOOTSTRAP_WEB_PAGE_H
#include <Arduino.h>
#include <BootstrapWebSite.h>
class BootstrapWebPage {
public:
BootstrapWebPage(BootstrapWebSite* webSite);
BootstrapWebP... |
from typing import Dict
from pytest import fixture
from blurr.core.errors import InvalidTypeError, RequiredAttributeError, SpecNotFoundError
from blurr.core.field_simple import IntegerFieldSchema
from blurr.core.schema_loader import SchemaLoader
from blurr.core.transformer_streaming import StreamingTransformerSchema
... |
import module3 from '../src/module-3';
describe('module-3', () => {
it('needs tests');
});
|
import serial, time
ser = serial.Serial ('/dev/ttyUSB0',9600, timeout=.5)
while True:
ser.write("L")
readText = ser.read(10)
line = ser.readline()
print readText, "Line: ",line
time.sleep(3)
|
// @flow
export { default as StatelessAvatar } from './StatelessAvatar';
|
# -*- coding: utf-8 -*-
'''
fantastic Add-on
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 Software Foundation, either version 3 of the License, or
(at your option) any later version.
This pro... |
import React from 'react'
import './Footer.css'
export default function Header(){
return(
<div className="footer-class">
<ul class="foot-top-nav foot-nav-ul">
<li class="foot-li"><a href="/" class="footer-link" data-track="footer-about">About</a></li>
<li class="foot-li"><a href="/" cla... |
/*
* Driver for Analog Devices ADV748X video decoder and HDMI receiver
*
* Copyright (C) 2017 Renesas Electronics Corp.
*
* 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 Software Foundation; either versi... |
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
)
setup(**d)
|
export function rIC(callback) {
if ('requestIdleCallback' in window) {
window.requestIdleCallback(callback);
}
else {
setTimeout(callback, 32);
}
}
export function hasShadowDom(el) {
return !!el.shadowRoot && !!el.attachShadow;
}
export function findItemLabel(componentEl) {
const... |
import { REQUEST_STATUS } from '~/util/constants'
export class ComputeBadgeValueConverter {
toView(value) {
switch(value) {
case REQUEST_STATUS.APPROVED:
return 'list-group-item-success';
case REQUEST_STATUS.REJECTED:
return 'list-group-item-danger';... |
import Controller from "./wrappers/Controller";
export default rootPath => {
return wrapClass => new Controller(wrapClass, rootPath)
} |
from elasticsearch import Elasticsearch
import time
import json
es = Elasticsearch(['<host:port>'])
print(es)
#Create index
if es.indices.exists(index='customer'):
es.indices.delete(index='customer')
create_index = es.indices.create(
index='customer',
body={
"settings" : {
"index" : {... |
def test_seek_offset(self):
"""Tests the seek_offset function."""
if not unittest.source:
return
${library_name_suffix}_${type_name} = ${python_module_name}.${type_name}()
${library_name_suffix}_${type_name}.open(unittest.source)
file_size = ${library_name_suffix}_${type_name}.get_size()... |
import {
MODE_ERASER, MODE_REDUCER, MODE_WRITE,
Actions, AUTO_SIZE, REDUCE_RATIO, MOVE_COUNT,
} from "./index";
import * as utils from "./utils";
import Drawer from "./drawer";
import PlotTable from "./plot_table";
import History from "./history";
export default class Manager {
constructor(height, width, maxCoun... |
/* @generated */
// prettier-ignore
if (Intl.RelativeTimeFormat && typeof Intl.RelativeTimeFormat.__addLocaleData === 'function') {
Intl.RelativeTimeFormat.__addLocaleData({"data":{"qu-EC":{"nu":["latn"],"year":{"0":"kunan wata","1":"hamuq wata","future":{"other":"+{0} y"},"past":{"other":"-{0} y"},"-1":"qayna wata"... |
// Copyright (c) 2019 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_
#define SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_
#include <map>
#include <memory>
#include <set>
#include <string>
#in... |
import processRadioSchedule, {
getLink,
getProgramState,
} from './processRadioSchedule';
import persianRadioScheduleData from '#data/persian/bbc_persian_radio/schedule.json';
describe('getLink', () => {
let program;
let service;
beforeAll(() => {
service = 'persian';
program = {
...persianRad... |
import React from 'react'
const Main = ({ children }) => (
<div className="container">
{children}
<style jsx>
{`
.container {
width: 87vw;
margin: 0 auto;
margin-top: 16px;
display: grid;
grid-template-columns: repeat(6, 0.1666667fr);
... |
const defaultTheme = require("tailwindcss/defaultTheme");
const plugin = require("tailwindcss/plugin");
const Color = require("color");
module.exports = {
purge: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./resou... |
from django.conf.urls import url
from . import views
urlpatterns=[
url(r'^login/$', views.login_view, name='login'),
url(r'^logout/$', views.logout_view, name='logout'),
url(r'^register/$', views.register_view, name='register'),
url(r'board/$', views.board, name='board'),
url(r'board/post/$', view... |
import datetime
import re
def regex_proc(reg, txt, postproc=None):
found = re.search(reg, txt, flags=re.IGNORECASE)
if found:
target = found.group(1)
return postproc(target) if postproc else target
return None
def _liter_pp(v):
return _tofloat(v) * 1000
def _cl_pp(v):
return _tofloat(v) * 10
def _toflo... |
# from django.forms import ModelForm
from django.conf import settings
from django.contrib.gis import forms
from django.contrib.gis.geos import GEOSGeometry
from django.forms import ValidationError
from django.contrib.auth.models import User
from django.contrib.gis.forms.widgets import OSMWidget
from djcelery.models im... |
const menuIcon = document.getElementById("menu-icon");
const slideoutMenu = document.getElementById("slideout-menu");
const searchIcon = document.getElementById("search-icon");
const searchBox = document.getElementById("searchbox");
searchIcon.addEventListener("click", function() {
if (searchBox.style.top == "72px")... |
import os
import re
import sys
import time
import copy
import thread
import socket
import threading
import logging
import inspect
import argparse
import telnetlib
import redis
import random
import redis
import json
import glob
import commands
from collections import defaultdict
from argparse import RawTextHelpFormatte... |
"""Fixtures for test case
@Author: NguyenKhacThanh
"""
import os
import json
import pytest
from wipm import create_app
@pytest.fixture(scope="class")
def inject_client(request):
"""Inject flask client app into test case class
"""
if not hasattr(request.cls, "client"):
app = create_app()
a... |
#pragma once
#include <stdio.h>
#include <string.h>
#include <assert.h>
#ifdef _WINDOWS
#include <WinSock2.h>
#include <Mswsock.h>
#include <io.h>
#else //_WINDOWS
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
#include <sys/types.h>
#include <sys/socket.h>
#... |
/*
* This definitions of the PIC18F4455 MCU.
*
* This file is part of the GNU PIC library for SDCC, originally
* created by Molnar Karoly <molnarkaroly@users.sf.net> 2016.
*
* This file is generated automatically by the cinc2h.pl, 2016-04-13 17:23:46 UTC.
*
* SDCC is licensed under the GNU Public license (GPL) ... |
(function() {
'use strict';
angular
.module('antidote')
.factory('DrugsService', DrugsService);
/** @ngInject */
function DrugsService($resource) {
return $resource('/api/drugs/:id',
{
id: '@id'
},
{
update: {
... |
from __future__ import unicode_literals
from django.db import models
from django.db import transaction
from django.contrib.auth.models import (AbstractBaseUser, PermissionsMixin, BaseUserManager)
from django.conf import settings
from datetime import datetime as date_time, timedelta
import jwt
class UserManager(BaseU... |
"""empty message
Revision ID: ed87b85aedc7
Revises: None
Create Date: 2019-06-25 13:30:30.898811
"""
# revision identifiers, used by Alembic.
revision = 'ed87b85aedc7'
down_revision = None
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! #... |
//
// 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 <objc/NSObject.h>
@class MMTimer, NSDate, NSMutableData, NSString, NSURLConnection, ProtobufCGIWrap;
@protocol NotifyFromPrtlD... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import RestoreIcon from '@material-ui/icons/Restore';
import Paper from '@material-ui/core/Paper';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core... |
import Route from '@ember/routing/route';
import $ from 'jquery';
import RSVP from 'rsvp';
export default Route.extend({
model() {
let { symbol } = this.paramsFor('dashboard.research');
const newsStoriesURL = '/api/getStories?symbol=' + symbol;
const basicInfoURL = '/api/basicInfo?symbol... |
from django.shortcuts import render
# Create your views here.
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from apps.user.models import WxUserProfile, UserProfile
from apps.user.serializers import WxLoginSerializer
from apps.utils.wxChecker im... |
# SPDX-License-Identifier: Apache-2.0
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import functools
class FunctionStaticVariable(object):
def __init__(self, *args, **kwargs):
self.variable = args[0]
def __call__(self, fu... |
#ifndef __MODULEINPUT_H__
#define __MODULEINPUT_H__
#include "Module.h"
#include "Globals.h"
#define MAX_MOUSE_BUTTONS 5
enum KEY_STATE
{
KEY_IDLE = 0,
KEY_DOWN,
KEY_REPEAT,
KEY_UP
};
class ModuleInput : public Module
{
public:
ModuleInput(Application* app, bool start_enabled = true);
~ModuleInput();
boo... |
import styled from 'styled-components';
export const Container = styled.div`
display: flex;
flex-direction: row;
background: #fff;
width: 28%;
position: absolute;
left: 2%;
top: 3%;
height: 94%;
box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.25);
border-radius: 5px;
overflow: auto;
ul {
marg... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
class Hepmc(CMakePackage):
"""The HepMC package is an object oriented, C++ event record for
High Energy Physic... |
/**
* Copyright 2014 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 applica... |
#!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
from dbcol import *
# -----------------------------DATABASE-ROW-------------------------------#
class DBRow:
@staticmethod
def dict(columns, values):
if (values is not None):
if (len(co... |
from .prez_model import PrezModel
from .vocprez import *
__all__ = [
"PrezModel",
] |
export const UNITS = Object.freeze({
REM: `rem`,
EM: `em`,
PX: `px`,
})
export const FONT_SIZE_FOR_OFFSET = 16
export const ERROR_PREFIX = `[cssapi-baseline]`
export const CONFIGURE_PREFIX = `configure()`
export const API_PREFIX = `api()`
export const CONFIGURATION_ARG_NAMES = Object.freeze({
CONFIG: `config... |
from django.conf.urls import patterns, url, include
from django.contrib.auth.views import login, logout
from django.contrib import admin
from aws_policy_manager import urls as awsurls
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^$', 'ssheepdog.views.view_a... |
define(function (require) {
// todo Dropping this file when developing.
'use strict';
var Backbone = require('backbone');
var models = {};
models.Sample = Backbone.Model.extend({
urlRoot: '/api/samples'
});
return models;
});
|
# (C) Copyright 2021 Hewlett Packard Enterprise Development LP.
# 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 React, { Component } from 'react'
export default class SearchResultList extends Component {
render() {
let list = this.props.results.map(item =>
<li><a href={item.data.url}><h3>{item.data.title}</h3><p>{item.data.ups}</p></a></li>)
return (
<div className="results">
<ul>{list}</ul... |
#!/usr/bin/env python
from django.urls import path
from . import views
app_name = "comments"
urlpatterns = [
# url(r'^po456stcomment/(?P<article_id>\d+)$', views.CommentPostView.as_view(), name='postcomment'),
path('article/<int:article_id>/postcomment', views.CommentPostView.as_view(), name='postcomment'),
]... |
class Packer(object):
"""Pack/Unpack data for WIZNet devices"""
def pack(self, s2e):
output = []
for field in s2e._fields:
name = field[0]
packer = getattr(self, "pack_%s" % (field[1],))
fieldvalue = getattr(s2e, name)
packed = packer(fieldvalue, *... |
import EventEmitter from 'events'
class FileUploadEmitter extends EventEmitter {}
export default FileUploadEmitter |
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""pex support for interacting with interpreters."""
from __future__ import absolute_import
import hashlib
import json
import os
import platform
import re
import subprocess
import sys
fr... |
// ax5.ui.calendar
(function () {
const UI = ax5.ui;
const U = ax5.util;
let CALENDAR;
UI.addClass({
className: "calendar"
}, (function () {
/**
* @class ax5calendar
* @classdesc
* @author tom@axisj.com
* @logs
* 2014-06-21 tom : 시작
... |
/* permutation/gsl_permute_vector_double.h
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Brian Gough
*
* 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 Software Foundation; either version 3 of the Lice... |
import sys
import time
from collections import defaultdict
import numpy as np
import psutil
import ray
import scipy.signal
import tensorflow as tf
config = tf.compat.v1.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.compat.v1.Session(config=config)
num_trials = 5
# Count the number of physical CP... |
import datetime
from django.contrib.auth.models import AbstractUser
from django.contrib.postgres.fields import ArrayField
from django.contrib.gis.db import models
from django.contrib.gis.geos import Point
class User(AbstractUser):
STUDENT = 'student'
TUTOR = 'tutor'
TYPES = [
(STUDENT, 'Student')... |
import networkx as nx, math, sys, time
verbosed_flag = False
class AnytimeSCANGraph(nx.Graph):
'''Specific Graph Class for Anytime SCAN algorithm
attributes:
untouched_nodes: set, initial value includes all nodes
unprocessed_nodes: set, includes all nodes from which it has not expanded, initial... |
// Basic JavaScript: Concatenating Strings with the Plus Equals Operator
/*
Build myStr over several lines by concatenating these two strings: "This is the first sentence.
" and "This is the second sentence." using the += operator.
Use the += operator similar to how it is shown in the editor.
Start by assigning the ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (function (uid, money, message) {
if (message === void 0) { message = ''; }
var data = JSON.stringify({
g: uid,
c: money,
m: message
});
return "+$" + data;
});
|