text stringlengths 3 1.05M |
|---|
/*
* This file is derived from crc32.c from the zlib-1.1.3 distribution
* by Jean-loup Gailly and Mark Adler.
*/
/* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#ifndef USE_HOSTCC /* S... |
# For detailed comments on animation and the techniqes used here, see
# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations
import os
import sys
#import matplotlib
#matplotlib.use('Qt4Agg')
from matplotlib.figure import Figure
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCa... |
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Margo Seltzer.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... |
# Generated by Django 2.2.7 on 2019-11-30 18:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cars_rent_app', '0002_auto_20191130_2111'),
]
operations = [
migrations.AlterField(
model_name='user',
name='first_n... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.FileFind = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentC... |
// See LICENSE for license details.
#ifndef RISCV_CSR_ENCODING_H
#define RISCV_CSR_ENCODING_H
#define MSTATUS_UIE 0x00000001
#define MSTATUS_SIE 0x00000002
#define MSTATUS_HIE 0x00000004
#define MSTATUS_MIE 0x00000008
#define MSTATUS_UPIE 0x00000010
#define MSTATUS_SPIE 0... |
const Post = require("../models/post");
const { body, validationResult } = require("express-validator");
exports.getPosts = (req, res, next) => {
const posts = Post.find()
.then((posts) => {
res.json({ posts: posts });
})
.catch((err) => console.log(err));
};
exports.createPost = (req, res, next) ... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CreateDocumentDialog = void 0;
var _keyBy2 = _interopRequireDefault(require("lodash/keyBy"));
var _react = _interopRequireWildcard(require("react"));
var _ui = require("@sanity/ui");
var _components = require("@sanity/base/compo... |
import { wrapFontAwesomeIcon } from './icon-wrappers'
import { faCarAlt } from '@fortawesome/free-solid-svg-icons/faCarAlt'
const CarAltSolid = wrapFontAwesomeIcon(faCarAlt, 'Solid')
export default CarAltSolid
|
import random
from cards import initial_card_deck
class CardDeck:
def __init__(self):
self.shuffled = False
self.starting_cards = initial_card_deck
self.cards = self.starting_cards
@property
def cards(self) -> list:
return self._cards
@cards.setter
def cards(self,... |
/**********************************************************************************************************************
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. *
* ... |
__author__ = 'patras'
from domain_exploreEnv import *
from timer import DURATION
from state import state
DURATION.TIME = {
'survey': 5, # for domain EE
'monitor': 5,
'screen': 5,
'sample': 5,
'process': 5,
'fly': 3,
'deposit': 1,
'transferData': 1,
'take': 2,
'put': 2,
'mov... |
/**
* Everything related to ajax calls resides in this script. All ajax calls
* must go through the ajaxCall method.
*
* @author Robb Krasnow
* @version 2.0
*/
/*********************
***** HELPERS *****
*********************/
/**
* Ajax utility used to make all ajax calls to server.
*
* @param getPost ... |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import az... |
import sys
sys.path.append("../../")
from appJar import gui
def press(): pass
app = gui()
app.addFileEntry("fe1")
app.addLabel("hello", "hello")
app.setLabelBg('hello', 'red')
app.setLabelHeight('hello', 17)
app.setEntryAlign("fe1", 'right')
app.setEntryAnchor("fe1", 'e')
app.setEntryWidth("fe1", 40)
app.setEntryHeig... |
/*
* Copyright 2015 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 Sequelize from 'sequelize';
import User from '../app/models/User';
import Recipient from '../app/models/Recipient';
import File from '../app/models/File';
import Deliverer from '../app/models/Deliverer';
import Order from '../app/models/Order';
import DeliveryProblem from '../app/models/DeliveryProblem';
impor... |
var IdleTimeout = function () {
return {
//main function to initiate the module
init: function () {
// cache a reference to the countdown element so we don't have to query the DOM for it on each ping.
var $countdown;
$('body').append('<div class="modal fade" i... |
var P = (function() {
'use strict';
var SCALE = window.devicePixelRatio || 1;
var hasTouchEvents = 'ontouchstart' in document;
var inherits = function(cla, sup) {
cla.prototype = Object.create(sup.prototype);
cla.parent = sup;
cla.base = function(self, method /*, args... */) {
return sup.pr... |
var fs = require('fs'),
path = require('path');
exports.homepage = function(req, res, next) {
try {
res.render("index");
} catch(err) {
var html = '<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Document</title></head><body><div style="text-align: center;font-size: 30px;">Wel... |
/* Copyright 2015 The TensorFlow 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 law or a... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],[function(e,t,n){"use strict";e.exports=n(116)},function(e,t,n){n(43),n(62),n(97),n(63);var r=n(101),o=n(2).publicLoader,i=o.getResourcesForPathname,a=o.getResourcesForPathnameSync,l=o.getResourceURLsForPathname;t.apiRunner=function(e,t,n,o){void 0===t&&(t={}),win... |
/*
* Copyright (C) 2008 Karel Zak <kzak@redhat.com>
*
* Inspired by libvolume_id by
* Kay Sievers <kay.sievers@vrfy.org>
*
* This file may be redistributed under the terms of the
* GNU Lesser General Public License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <... |
class TestEndpointsHandlerWithAuth(AsyncHTTPTestCase):
@classmethod
def setUpClass(cls):
cls.patcher = patch("tabpy.tabpy_server.app.app.TabPyApp._parse_cli_arguments", return_value=Namespace(config=None))
cls.patcher.start()
prefix = "__TestEndpointsHandlerWithAuth_"
cls.pwd_file = tempfile.NamedTemporaryFil... |
from musictaxonomy.auth import service as auth_service
from musictaxonomy.handlers import BaseAPIHandler
from musictaxonomy.spotify import service as spotify_service
class LoginHandler(BaseAPIHandler):
async def get(self):
"""
Before using Music Taxonomy, a user must authenticate with Spotify's Oa... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) The James Hutton Institute 2016-2019
# (c) University of Strathclyde 2019-2020
# Author: Leighton Pritchard
#
# Contact:
# leighton.pritchard@strath.ac.uk
#
# Leighton Pritchard,
# Strathclyde Institute for Pharmacy and Biomedical Sciences,
# 161 Cathedral Street,
# ... |
"""
@author: Leon Elaiza
@license: MIT license
@contact: xiayin_lou@stu.pku.edu.cn
@file: map_streetview_spider.py
@time: 2020/9/10 3:50 下午
@desc: An spider for acquiring streetview images
"""
from typing import List, Dict
import os
import requests
from requests import Response
from urllib.request import urlretrieve
fr... |
from django.contrib.auth import get_user_model
from django.db.models import Q
def search_users(region, query):
"""
Searches for all users that match the given `query`.
If region is None, all users are searched.
:param region: The current region
:type region: ~integreat_cms.cms.models.regions.regio... |
class ValidationError(Exception):
pass
class CaptchaError(Exception):
pass
|
import styles from 'styles/Share.module.css'
export default function Share() {
const params = new URLSearchParams({
url: 'https://covid-vacuna-chile.vercel.app',
text: '¡Sigue aquí el estado y progreso de vacunación contra el COVID19 en Chile! 👩⚕️💉'
})
const url = `https://twitter.com/s... |
import pickle, copy, os, datetime, subprocess, json
from collections import defaultdict
import numpy as np
import pandas as pd
from scipy.stats import entropy
import time
from io import StringIO
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_table_experiments ... |
{ // AXIS
getAxis(1, 0, 0, 20)
// getAxis(1, 1, pilot)
function getAxis (needGlobalAxis=true, needLocalAxis=false, origin=false, globalSize=8, localSize=2) {
if (needGlobalAxis) {
globalAxis(globalSize)
}
if (needLocalAxis && origin) {
const localOrigin = lo... |
# Configuration file for ipython-nbconvert.
c = get_config()
#------------------------------------------------------------------------------
# NbConvertApp configuration
#------------------------------------------------------------------------------
# This application is used to convert notebook files (*.ipynb) to v... |
#ifndef __CONFIG_REQUEST
#define __CONFIG_REQUEST
#include <stdlib.h>
uint8_t getVideoMode();
uint8_t getLineCount();
#endif
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const team_detail_nop = {
"resource": "teamplayerdashboard",
"parameters": {
"MeasureType": "Base",
"PerMode": "PerGame",
"PlusMinus": "N",
"PaceAdjust": "N",
"Rank": "N",
"LeagueID": "00... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/classify_images.py
#
# PROGRAMMER: Jhon Alexander Holguin B.
# DATE CREATED: 26/12/2018
# REVISED DATE:
# PU... |
/**
* Simple benchmark which compares eventloop speed with Fibers sync
*
* Note: Using process.nextTick in sum() function is not represents the real
* situation. In real live our we use I/O with external sources like
* network or fs. There's no need to use Sync/Fibers with code without I/O.
... |
import sys, wx
sys.path.append('../../')
from sciwx.widgets import ParaDialog
if __name__ == '__main__':
para = {'name':'yxdragon', 'age':10, 'h':1.72, 'w':70, 'sport':True, 'sys':'Mac', 'lan':['C/C++', 'Python'], 'c':(255,0,0)}
view = [('lab', 'lab', 'This is a questionnaire'),
(str, 'name', 'na... |
/**
* 网络请求的公共方法
* 1.基本请求
* 2.为了后续获取数据方便,promise处理:fetch axios基于promise
* 3.对获取数据的状态处理:loadding toast
* 4.对请求头的处理!!!机型、大小、系统、屏幕
*/
let store = require("../utils/store.js")
let system = store.getSystemInfo();
const clientInfo = {
"clientType": "mp",
"appnm": "iwen",
"model": system.model,
"os"... |
# Copyright 2018 The TensorFlow 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 applica... |
#!/usr/bin/env python
"""
Author : Ken Youens-Clark <kyclark@gmail.com>
Purpose: Python program to write a Python program
"""
import argparse
import os
import re
import subprocess
import sys
from datetime import date
from pathlib import Path
from typing import NamedTuple
class Args(NamedTuple):
program: str
... |
# -*- coding: utf-8 -*-
#
# setup.py
# xman
#
# Created by Alan D Snow, 2017.
# BSD 3-Clause
from setuptools import setup, find_packages
requires = [
'descartes',
'gazar',
'matplotlib',
'numpy',
'shapely',
]
setup(name='xman',
version='0.0.1',
description="Cross section (X-Section... |
from ordered_set import OrderedSet
from modelindex.models.BaseModelIndex import BaseModelIndex
from modelindex.models.CollectionList import CollectionList
from modelindex.models.Library import Library
from modelindex.models.ModelList import ModelList
from modelindex.utils import lowercase_keys, load_any_file, full_fil... |
import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(self, plotly_name='name', parent_name='streamtube', **kwargs):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
edi... |
class HTTPClientError(Exception):
pass
class TooManyRedirects(HTTPClientError):
pass
class StreamAlreadyConsumed(HTTPClientError):
pass
class TooManyConnections(HTTPClientError):
pass
class RequestTimeout(HTTPClientError):
pass
class TooManyInvalidResponses(HTTPClientError):
pass
c... |
"""
20210511: This script is intended to run an example version of end-to-end processing.
TODO: MTH5 updated so that run provides a channel which returns a channel response.
It seems like we need both a Run and a RunTS object to be able to access calibration
info and data in the same environment
TO ACCESS CHANNEL-SPE... |
// File name: ExtremeC_exampels_chapter1_3.c
// Description: Example 1.3
#include <stdio.h>
#define PRINT(a) printf("%d\n", a);
#define LOOP(v, s, e) for (int v = s; v <= e; v++) {
#define ENDLOOP }
int main(int argc, char** argv) {
LOOP(counter, 1, 10)
PRINT(counter)
ENDLOOP
return 0;
}
|
from .typehoon import Typehoon
|
# this code cracks the affine cipher
import re
from ngram_score import ngram_score
fitness = ngram_score('quadgrams.txt') # load our quadgram statistics
from pycipher import Affine
def break_affine(ctext):
# make sure ciphertext has all spacing/punc removed and is uppercase
ctext = re.sub('[^A-... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[794],{"drX/":function(a,o,e){var s,i,n;!function(r){if("object"==typeof a.exports){var d=r(0,o);void 0!==d&&(a.exports=d)}else i=[e,o],void 0===(n="function"==typeof(s=r)?s.apply(o,i):s)||(a.exports=n)}(function(a,o){"use strict";Object.defineProperty(o,"__esModule",... |
from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^administrator/$', views.administrator, name='administrator'),
url(r'^administrator/(?P<userRequest_student_id>\d+)/okay/$', views.okay, name='okay'),
url(r'^administrator/(?P<user_student_id>\d+)/detail/$',views.detail,name='detai... |
import Types from '../../src/types';
import sinon from 'sinon';
import { urls, testMPID, apiKey } from './config';
var mockServer;
describe('Server Model', function() {
var event = {
messageType: Types.MessageType.PageEvent,
name: 'foo page',
data: { 'foo-attr': 'foo-val' },
eventT... |
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).firebase=t()}(this,function(){"use strict";var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&func... |
/**
* @file llplacesfolderview.h
* @brief llplacesfolderview used within llplacesinventorypanel
* @author Gilbert@lindenlab.com
*
* $LicenseInfo:firstyear=2012&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2012, Linden Research, Inc.
*
* This library is free software; you can redistribute it ... |
#!/usr/bin/python3
def square_matrix_simple(matrix=[]):
if matrix:
new = []
for rows in matrix:
new.append([n ** 2 for n in rows])
return new
|
"""
Reporter for CSV output that can be opened with MS Excel or other tools.
"""
import csv
from typing import List
from tracematrix.item import TraceItem
from tracematrix.reporters.base_reporter import Reporter
class CsvReporter(Reporter):
"""Creates reports in .csv format"""
@staticmethod
def write(
... |
from typing import Any, List, Optional
from fastapi import APIRouter, Depends, HTTPException
from sqlalchemy.orm import Session
from abing import crud, models, schemas
from abing.routes import deps
router = APIRouter()
@router.get("/", response_model=List[schemas.Arm])
async def get_arms(
db: Session = Depends(... |
var searchData=
[
['gesture_2ehpp',['gesture.hpp',['../gesture_8hpp.html',1,'']]],
['givereadable',['giveReadable',['../classlimited__paj7620.html#a56be0ef14ee4d319862dd46ef67e7fe0',1,'limited_paj7620']]]
];
|
import Vue from 'vue'
import axios from 'axios'
import {
getToken
} from '@/utils/auth'
import {
MessageBox
} from 'element-ui'
import router from '../router'
var interceptorsNum = 0
const $axios = axios.create({
withCredentials: false,
baseURL: process.env.BASE_API
})
// request interceptor
$axios.interceptors... |
import logging
import requests
import json
from requests.exceptions import HTTPError, ConnectionError
import traceback
from decimal import Decimal as D
from django.db import transaction
from django.conf import settings
from django.core.validators import URLValidator
from django.utils import six
from django.contrib impo... |
import { useNavigation } from '@react-navigation/native'
import React, { useEffect } from 'react'
import { View, StyleSheet, Dimensions, Pressable } from 'react-native'
import { PanGestureHandler } from 'react-native-gesture-handler'
import Animated, { runOnJS, useAnimatedGestureHandler, useAnimatedStyle, useSharedValu... |
from sympy import symbols, Symbol, nan, oo, zoo, I, sinh, sin, acot, pi, atan, \
acos, Rational, sqrt, asin, acot, cot, coth, E, S, tan, tanh, cos, \
cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im
def test_sin():
x, y = symbols('x,y')
r = Symbol('r', real=True)
k = ... |
// REACT
// OPEN LAYERS
import Feature from "ol/Feature";
import * as ol from "ol";
import { Image as ImageLayer } from "ol/layer.js";
import ImageWMS from "ol/source/ImageWMS.js";
import { GeoJSON } from "ol/format.js";
import { Tile,OSM, TileArcGISRest, TileImage, Vector as VectorSource } from "ol/source.js";
import ... |
/*eslint max-nested-callbacks: [2, 4]*/
/*global clearInterval: false, clearTimeout: false, document: false, event: false, frames: false, history: false, Image: false, location: false, name: false, navigator: false, Option: false, parent: false, screen: false, setInterval: false, setTimeout: false, window: false, XMLH... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AnttechAiCvOcrBusinesslicenseIdentifyModel import AnttechAiCvOcrBusinesslicenseIdentifyModel
class AnttechAiCvOcrBusinesslicenseIden... |
!function(t){"use strict";function i(i){this.$pins=i,this.tasks=[],this.timerId=null,this.deferred=new t.Deferred}function n(t){this.img=t,this.initialWidth=t.width,this.initialHeight=t.height,this.img.isError=!1,this.img.onerror=function(){this.isError=!0}}var e=e||{now:Date.now||function(){return(new Date).getTime()}... |
"""This file contains all information for a GraphicsView with additional features.
These features contain:
- Default scene
- Quick addition of graphviz code
- Default drag mode = scrollhanddrag
- Zooming
==> Inspired on https://stackoverflow.com/a/19114517
Author: Randy Paredis
Date: 01/01/2... |
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright noti... |
import styled from "styled-components/native";
import { Button } from "react-native-paper";
import { Block, Text } from "galio-framework";
import { Content, Thumbnail } from "native-base";
import { Card } from "react-native-paper";
export const Container = styled.View`
flex: 1;
justify-content: center;
align-con... |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 2
# of the License, or (at your option) any later version.
#
# This program is distrib... |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/components/engine/shared_eng_freitek_dual_jet.iff"
result.attr... |
# Copyright 2021 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, ... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.Reset = exports.STATUS_REJECTED = exports.STATUS_ACCEPTED = exports.TYPE_SOFT = exports.TYPE_HARD = undefined;
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
var _getPrototypeOf2 = _interopRequireD... |
import React from "react";
import { NavLink } from "react-router-dom";
import TransferList from "./TransferList";
function Sidebar() {
return (
<>
<div class="sidebar">
<NavLink to="/data"><h3>TRANSFER</h3></NavLink>
<NavLink to="/profile"><h3>Profile</h3></NavLink>
... |
// @flow
import { Given, When, Then } from 'cucumber';
import { expect } from 'chai';
import { navigateTo } from '../../../navigation/e2e/steps/helpers';
import {
waitUntilWaletNamesEqual,
getNameOfActiveWalletInSidebar,
} from '../../../wallets/e2e/steps/helpers';
import type { Daedalus } from '../../../types';
d... |
/**
* Kendo UI v2016.2.714 (http://www.telerik.com/kendo-ui)
* Copyright 2016 Telerik AD. All rights reserved. ... |
define({
root: ({
_widgetLabel: "Coordinate Conversion"
}),
});
|
from src.config import ExperimentConfig
from tensorflow.python.keras.layers.core import Dropout, Masking
from src.features.sequences.transformer import SequenceMetadata
import tensorflow as tf
from typing import Any, List, Dict
from .metrics import (
MulticlassAccuracy,
MulticlassTrueNegativeRate,
Multiclas... |
"""
Kakuru puzzle in cpmpy.
http://en.wikipedia.org/wiki/Kakuro
'''
The object of the puzzle is to insert a digit from 1 to 9 inclusive
into each white cell such that the sum of the numbers in each entry
matches the clue associated with it and that no digit is duplicated in
any entry. It is that lack of duplication th... |
import {Container} from 'unstated'
import {server, apiErrorAlert, defaultEventSort} from '../constants/Server'
import {baseURL} from '../constants/config'
import {DateTime} from 'luxon'
import {map} from 'lodash'
const LOCATIONS_FETCH_MIN_MINUTES = 15
const _SAMPLE_AVATARS = [
require('../../assets/avatar-female.pn... |
from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:21948")
pwd = raw_input("Enter old wallet passphrase: ")
pwd2 = raw_input("Enter new wallet passphrase: ")
access.walletpassphrasechange(pwd, pwd2)
|
/* ========================================================================
* Tutorial specific Javascript
*
* ========================================================================
* Copyright 2015 Bootbites.com (unless otherwise stated)
* For license information see: http://bootbites.com/license
* ===========... |
# Copyright (c) 2014 Mirantis, 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... |
from flask import Blueprint
example_ext: Blueprint = Blueprint("example", __name__, static_folder="static", template_folder="templates")
from .views_api import * # noqa
from .views import * # noqa
|
pkgname = "xtrans"
pkgver = "1.4.0"
pkgrel = 0
build_style = "gnu_configure"
hostmakedepends = ["pkgconf"]
pkgdesc = "Network API translation layer to insulate X"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://xorg.freedesktop.org"
source = f"$(XORG_SITE)/lib/{pkgname}-{pkgver}.tar.bz2"
sha25... |
Package.describe({
summary: "Base64 encoding and decoding",
version: '1.0.2-ipc.0'
});
Package.on_use(function (api) {
api.export('Base64');
api.add_files('base64.js', ['client', 'server']);
});
Package.on_test(function (api) {
api.use('base64', ['client', 'server']);
api.use(['tinytest', 'underscore', 'e... |
# Copyright 2021 The TensorFlow 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 applica... |
from django.contrib.syndication.views import Feed
from django.conf import settings
from django.urls import reverse
from weblog.models import BlogPost, Translation, Category, CategoryTranslation
from weblog.apps import SETTINGS as blog_settings
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
from ... |
'''
Mingde's Matrix Mashup
'''
def lambdamatrices(N):
'''
Generates a lambda basis for an N-level quantum system,
returns list of <N^2-1> NxN matrices (double-lists), each
representing some basis vector for a traceless hamiltonian matrix
'''
M = []
# generate the non-diagonal elements... |
(window.OnFileBrowserReady=function(){"TInterface"in window&&"adminscreen"in TInterface?TInterface.adminscreen.AddPanel(4,"File Browser",function(){this.TransitionTo("<div>...</div>",function(a){})}):window.setTimeout(window.OnFileBrowserReady,50)})();
|
#!/usr/bin/env node
// Build site
const crypto = require("crypto");
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const html_minify = require("html-minifier").minify;
const css_minify = new (require("clean-css"))({ level: 2 });
const js_minify = require("uglif... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import torch
def save_checkpoint(state, checkpoint='checkpoint', filename='checkpoint.pth.tar'):
filepath = os.path.join(chec... |
#pragma once
/*
Copyright (C) 2018 Pharap (@Pharap)
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... |
// Copyright 2015 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 BASE_TASK_SEQUENCE_MANAGER_WORK_QUEUE_H_
#define BASE_TASK_SEQUENCE_MANAGER_WORK_QUEUE_H_
#include "base/base_export.h"
#include "base/task/commo... |
from typing import Tuple
from chiavdf import prove
from ecostake.consensus.constants import ConsensusConstants
from ecostake.types.blockchain_format.classgroup import ClassgroupElement
from ecostake.types.blockchain_format.sized_bytes import bytes32
from ecostake.types.blockchain_format.vdf import VDFInfo, VDFProof
f... |
define(
"dojo/cldr/nls/ko/currency", //begin v1.x content
{
"AUD_displayName": "호주 달러",
"CAD_displayName": "캐나다 달러",
"CHF_displayName": "스위스 프랑",
"CNY_displayName": "중국 위안 인민폐",
"EUR_displayName": "유로화",
"GBP_displayName": "영국령 파운드 스털링",
"HKD_displayName": "홍콩 달러",
"JPY_displayName": "일본 엔화",
"USD_displayName"... |
function Min (A, B)
{
let Result = A;
if (B < A)
{
Result = B;
}
return Result;
}
function IsNewline (Char)
{
return ((Char == '\n') || (Char == '\r'));
}
function TokensEqual (ContentsFile, Index, Token)
{
let Start = Index;
let End = Min(Index + Token.length, ContentsFile.length);
let Result = true;
for... |
from DAEpy.solvers.ocp import ocp_solver
import os
import argparse
import numpy as np
import matplotlib.pyplot as plt
"""
This is a simple demonstration of the proposed method for solving index 1
differential algebraic equations.
In this example a first order reaction is used, for which there is an
explicit solution... |
import logging
import importlib.util
from typing import Optional, Union, List, Dict
logger = logging.getLogger(__name__)
def is_wandb_available():
return importlib.util.find_spec("wandb") is not None
class WandbLogger(object):
"""Weights & Biases Logger.
This is a logger class that can be passed into the ... |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller
// fixes from Paul Irish and Tino Zijdel
(function() {
var lastTime = 0;
var vendors = ['ms', 'mo... |