text stringlengths 3 1.05M |
|---|
import re
import json
def haha(vtext, cidtext):
ciddict_file = 'ciddict.json'
with open(ciddict_file) as json_file:
ciddict = json.load(json_file)
# print(ciddict)
print('-------')
cidtext = cidtext.replace('(cid:', '')
cids = cidtext.rsplit(')')[:-1]
# ciddict = dict()
for... |
"use strict";$(document).ready(function(){$.getJSON("/data/index.json",function(e){var t=elasticlunr.Index.load(e),r=window.location.search.replace("?","").split("=");if("query"==r[0]){var n=decodeURIComponent(r[1].replace("+"," ")),s=t.search(n);if(s.length>0){$("#results").show();var o=$("#result-template").html();Mu... |
import numpy as np
from sacred import Ingredient
config_ingredient = Ingredient("cfg")
@config_ingredient.config
def cfg():
# Base configuration
model_config = {"musdb_path" : "/mnt/windaten/Datasets/MUSDB18/", # SET MUSDB PATH HERE, AND SET CCMIXTER PATH IN CCMixter.xml
"estimates_path" :... |
/*-------------------------------------------------------------------------
*
* cdbpathlocus.c
*
* Copyright (c) 2005-2008, Greenplum inc
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "cdb/cdbcat.h" ... |
'use strict'
const EventEmitter = require('events')
const chalk = require('chalk')
const baseWidget = require('../baseWidget')
class myWidget extends baseWidget(EventEmitter) {
constructor ({ blessed = {}, contrib = {}, screen = {}, grid = {} }) {
super()
this.blessed = blessed
this.contrib = contrib
... |
module.exports = {
_: {
storage_is_encrypted: 'Tallennustilasi on salattu. Salasana vaaditaan sen purkamiseksi',
enter_password: 'Anna salasana',
bad_password: 'Väärä salasana, yritä uudelleen',
never: 'ei koskaan',
continue: 'Jatka',
ok: 'OK',
},
wallets: {
select_wallet: 'Valitse Lom... |
"""
Utils for working with static files.
"""
#from __future__ import unicode_literals
from django.templatetags.static import static
from django.conf import settings
from django.utils.functional import lazy
import six
# The 'static' template tag returns cache-busting file names, which prevents
# CDN's or browsers from ... |
"""Temporal-Difference module
Describes TDLearning and TDLearningLambda base classes for temporal
difference learning without and with eligibility traces.
See 'Reinforcement Learning: An Introduction by Richard S. Sutton and
Andrew G. Barto for more information.
"""
import random
from abc import ABCMeta, abstractmeth... |
# -*- coding: utf-8 -*-
import sqlalchemy as sa
import structlog
import toolz
logger = structlog.getLogger(__name__, source='YoDB')
from yo.db import metadata
from ..schema import NotificationType
desktop = sa.Table(
'desktop',
metadata,
sa.Column('dnid', sa.BigInteger(), primary_key=True),
sa.Col... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
"""
仿真环境配置管理口脚本
前提条件:
1、Linux执行机username: root, password: root
2、Linux执行机python 已安装,版本 3.5+,pip 正常使用
3、Linux执行机ssh 公钥和私钥已生成,且是3072位,公钥路径:/root/.ssh/id_rsa.pub
备注:
ssh 密钥生成命令 ssh-keygen -t rsa -b 3072
"""
import_flag = True
while import_flag:
try:
... |
/**
* \file
*
* \brief Component description for RSTC
*
* Copyright (c) 2017 Microchip Technology Inc.
*
* \asf_license_start
*
* \page License
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with ... |
// https://developer.mozilla.org/en-US/Add-ons/WebExtensions/Getting_started_with_web-ext
module.exports = {
// Global options:
verbose: false,
artifactsDir: 'build/',
sourceDir: 'add-on/',
ignoreFiles: [
'src/',
'*.map',
'manifest.*.json'
],
// Command options:
build: {
overwriteDest: t... |
import os
from setuptools import setup
from pushbullet import __version__, __project_name__, __project_link__
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name=__project_name__,
version=__version__,
author='Myles Braithwaite',
author_email='me@myles... |
# -*- coding: utf-8 -*-
"""Make some HI related plots from the cosmo runs"""
from __future__ import print_function
import matplotlib
matplotlib.use('PDF')
import matplotlib.pyplot as plt
import plot_spectra as ps
import dla_data
import os.path as path
import myname
from save_figure import save_figure
outdir = path.... |
from statistics import mean
from entities import Title
class GroupUpdateManager:
def __init__(self):
self.n_checks = 0
self.checks_limit = 2
def check(self):
self.n_checks += 1
def should_check(self):
return self.n_checks < self.checks_limit
def update(self):
... |
/**
* @fileoverview Control elements must be associated with a text label
* @author jessebeach
*/
// -----------------------------------------------------------------------------
// Requirements
// -----------------------------------------------------------------------------
import { RuleTester } from 'eslint';
im... |
from starling_sim.basemodel.input.dynamic_input import DynamicInput
class Input(DynamicInput):
def new_agent_input(self, feature):
new_agent = super().new_agent_input(feature)
input_dict = feature["properties"]
if input_dict["agent_type"] == "vehicle":
if "station" in input... |
/* globals Buffer */
/**
* A very dumb minimal implementation of the Windows Registry.
* Enough to run our tests
*/
'use strict';
var assert = require('assert'),
windef = require('../../lib/windef'),
types = require('../../lib/types'),
debug = require('debug')('windows-registry'),
ref = require('ref-... |
/*
* hostapd - IEEE 802.11r - Fast BSS Transition
* Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Alternatively, this s... |
from unittest.mock import patch
from post_timestamp_app_poc.commands.destroy import Destroy
from tests.helpers.output_capturing_test_case import OutputCapturingTestCase
class TestDestroy(OutputCapturingTestCase):
def setUp(self):
super().setUp()
self.destroy_command = Destroy(self.stdin, self.s... |
from django.urls import path
from .views import *
app_name = 'photo'
urlpatterns = [
path('like/<int:photo_id>/', PhotoLike.as_view(), name='like'),
path('favorite/<int:photo_id>/', PhotoSave.as_view(), name='favorite'),
path('create/', PhotoCreate.as_view(), name='create'),
path('update/<int:pk>/', ... |
from django.db.backends import BaseDatabaseIntrospection
from MySQLdb import ProgrammingError, OperationalError
from MySQLdb.constants import FIELD_TYPE
import re
foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)")
class DatabaseIntrospection(BaseDatabaseI... |
var test = require('tape');
var size = require('./');
test('size', function(t){
var bbox = [0, 0, 10, 10];
var sized = size(bbox, 2);
t.deepEqual(sized, [-5, -5, 15, 15], 'should double the size of a bbox at 0,0,10,10');
var bbox = [0, 0, 4, 4];
var sized = size(bbox, 1);
t.deepEqual(sized, [0, 0, 4, 4], ... |
from dataclasses import dataclass
from enum import Enum, auto
from typing import Tuple
from weakref import proxy, ProxyType
from frozendict import frozendict
from terrabot.sim.structure import StructureType
class Terrain(Enum):
MOUNTAIN = auto()
DESERT = auto()
FIELD = auto()
SWAMP = auto()
LAKE ... |
/*
* 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 distributed in the hope that it will be use... |
module.exports={A:{A:{"2":"H C G E A B EB"},B:{"1":"L N I","2":"D g w","516":"J"},C:{"1":"2 4 5 6 7 8 x y","2":"YB BB F K H C G E A B D g w J L N I O P Q R S T U V W X Y Z z b c d e f M h i j k l m n o p q r s t u WB QB","194":"0 1 v"},D:{"1":"5 6 7 8 y KB aB","2":"F K H C G E A B D g w J L N I O P Q R S T U V W X Y Z ... |
#!/usr/bin/env python
# Lint as: python3
"""This modules contains tests for config API handler."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from absl import app
import mock
from grr_response_core import config
from grr_response_core.lib import util... |
from rest_framework import serializers
from rest_polymorphic.serializers import PolymorphicSerializer
from .models import Content, Video, Text, Audio, Page
class ContentSerializer(serializers.ModelSerializer):
"""
Базовый сериализатор блока контента
От него должны наследоваться остальные блоки контента.
... |
from django.test import TestCase
from users.models import User, Profile
class ProfileModelTests(TestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
user = User.objects.create_user(username='TestUser')
cls.profile = Profile.objects.create(user=user)
def test_verbose_n... |
export const rampRight16F = "M4.83 8.278c-.124.156-.222.327-.33.492V3.5h2v2.703L5.34 7.646l-.004-.002zm3.187-5.154L9.45 4.128 5.613 8.904l-.002-.002A4.988 4.988 0 0 0 4.5 12.018V16h2v-3.982a3.062 3.062 0 0 1 .714-1.93l3.872-4.805 1.414.997V1.5z";
|
const path=require('path');
const webpack=require('webpack')
const poststylus=require('poststylus');
const autoprefixer = require('autoprefixer')
function resolve(dir) {
return path.join(__dirname,'..',dir)
}
module.exports.rootPath=resolve('src');
module.exports.stylusLoaderOptionsPlugin = new webpack.LoaderOptionsP... |
import numpy as np
import tensorflow as tf
MAPPING = {0:'neutral', 1:'anger', 2:'surprise', 3:'disgust', 4:'fear', 5:'happy', 6:'sadness'}
MP = './models/'
m1shape=[None, 128,128,1]
DEFAULT_PADDING = 'SAME'
TypeThreshold=100
#
def getModelPathForPrediction(mid=0):
if mid==900:
mp=MP+'D16_M1_N9... |
from setuptools import setup
setup(name='pincode_map',
version='1.0',
description='Validate and Mapping Pincode to Locality, City and State ',
url='https://github.com/manti/pincode_map',
author='Manti HS',
author_email='manti.rvce@gmail.com',
license='MIT',
zip_safe=False,
... |
// @flow
import React from "react";
import {shallow} from "enzyme";
import {WeightSlider} from "./WeightSlider";
import {EdgeTypeConfig, EdgeWeightSlider} from "./EdgeTypeConfig";
import {assemblesEdgeType} from "../../plugins/demo/declaration";
require("../../webutil/testUtil").configureEnzyme();
describe("explore... |
# -*- coding: utf-8 -*-
""" Sahana Eden Warehouses Module Automated Tests
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), ... |
#########
# Copyright (c) 2013 GigaSpaces Technologies Ltd. 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... |
import React, { useEffect, useState } from 'react';
import Button from '../../Button/Button';
function FinalStep({ goToLogin }) {
const [counter, setCounter] = useState(5);
const counterSetUp = () => {
const timer =
counter > 0 && setInterval(() => setCounter(counter - 1), 1000);
c... |
// How to get rid of BOUNDS ?
/************************** source code **************************/
#include<mpi.h>
#include<civl-mpi.cvh>
#include<civlc.cvh>
#include<string.h>
#define DATA_LIMIT 1024
#pragma CIVL ACSL
/*@
@ \mpi_collective(comm, P2P):
@ requires 0 <= root && root < \mpi_comm_size;
@ requir... |
//
// WARNING: This file is *NOT* processed through babel
//
require('@babel/register')
require('grind-framework')
const { HttpServer, HttpKernel } = require('grind-http')
new HttpServer(() => require('../app/Bootstrap').Bootstrap(HttpKernel)).start().catch(err => {
Log.error('Boot Error', err)
process.exit(1)
})
|
import macro from 'vtk.js/Sources/macro';
import vtkOpenGLRenderWindow from 'vtk.js/Sources/Rendering/OpenGL/RenderWindow';
import vtkRenderer from 'vtk.js/Sources/Rendering/Core/Renderer';
import vtkRenderWindow from 'vtk.js/Sources/Rendering/Core/RenderWindow';
import vtkRenderWindowInteractor from 'vtk.js/Sources/Re... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
import re
import warnings
from django.conf import settings
from django.http import HttpRequest, HttpResponse
from django.middleware.csrf import (
CSRF_TOKEN_LENGTH, REASON_BAD_TOKEN, REASON_NO_CSRF_COOKIE,
CsrfViewMiddleware, _comp... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
#include <Windows.h>
#include <msxml.h>
|
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
module('Integration | Component | simple table cell', function(hooks) {
setupRenderingTest(hooks);
test('it renders with sorting arrow... |
#!/usr/bin/env python
"""
Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import os
import re
import socket
import time
from extra.icmpsh.icmpsh_m import main as icmpshmaster
from lib.core.common import getLocalIP
from lib.core.common import getRem... |
"""PyTorch-compatible transforms and collate functions for ASR.
This module demonstrates how to create PyTorch-compatible datasets for speech
recognition using `audlib`.
"""
import numpy as np
from scipy.signal import lfilter
from scipy.fftpack import dct, idct
from audlib.sig.window import hamming
from audlib.sig.f... |
// 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 COMPONENTS_CRONET_ANDROID_TEST_TEST_UPLOAD_DATA_STREAM_HANDLER_H_
#define COMPONENTS_CRONET_ANDROID_TEST_TEST_UPLOAD_DATA_STREAM_HANDLER_H_
#incl... |
#!/usr/bin/env node
// 👆 Used to tell Node.js that this is a CLI tool Pull in our modules
const chalk = require('chalk')
const boxen = require('boxen')
// Define options for Boxen
const options = {
backgroundColor: 'black',
padding: 1,
margin: 1,
borderStyle: 'double'
}
// Text + chalk definitions
const dat... |
"""
trailing-spaces
"""
from typing import Any
from yamlfix.rules import new_lines
from yamllint.rules.trailing_spaces import ID # noqa: F401
from yamlfix.rules.new_lines import get_line_break
from yamlfix.rules.types import FormattingResult, FormattingRule
def count_trailing_spaces(text: str) -> int:
count =... |
import React from 'react';
import PropTypes from 'prop-types';
import { Label } from 'react-bootstrap';
export default class AccessTypeDisplay extends React.Component {
static propTypes = {
accessType: PropTypes.string.isRequired,
};
constructor(props) {
super(props);
this.getDisplayName = this.... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 11 01:19:11 2019
@author: matthieubriet
"""
import PIL
from PIL import Image
from PIL import ImageOps
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
h1=625
l1=1430
"""base de l'etape 2 quelques petites ... |
/**
* Copyright 2021 Brian Costabile
*
* 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, including without limitation the rights
* to use, copy, modify, merge, ... |
#!/usr/bin/python
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
import sys
import re
"""Baby Names exercise
Define the extract_names() function below and c... |
import MenuMaker
from MenuMaker import indent, writeFullMenu
menuFile = "~/.config/openbox/menu.xml"
def _map(x):
for d, s in (("&", "&"), ("\'", "\"")):
x = x.replace(s, d)
return x
class Sep(object):
def emit(self, level):
return ['%s<separator/>' % indent(level)]
class App(ob... |
/* Generated by RuntimeBrowser
Image: /System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/QuartzComposer
*/
@interface QCPatchRendererUI : QCInspector {
NSPopUpButton * executionMenu;
NSTextField * inputField;
NSPopUpButton * inputMenu;
NSTableView ... |
import SeamlessButton from "../src/SeamlessButton.js";
export default class ElixSeamlessButton extends SeamlessButton {}
customElements.define("elix-seamless-button", ElixSeamlessButton);
|
import { legacyMode } from 'consts/misc';
export const isCoreConnected = legacyMode
? ({ core: { info } }) =>
!!(info && (info.connections || info.connections === 0))
: ({ core }) =>
!!(
core &&
core.systemInfo &&
(core.systemInfo.connections || core.systemInfo.connections === 0... |
# Copyright 2014 OpenStack Foundation
# 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 requ... |
# Copyright (c) 2014 OpenStack Foundation. 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 ... |
/**
* @license Angular v11.2.7
* (c) 2010-2021 Google LLC. https://angular.io/
* License: MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/compiler")):"function"==typeof define&&define.amd?define("@angular/core/testing",["exports","@angu... |
import lib1
import lib2
def f():
pass
f() |
###############################################################################
#
# apogee.tools.download: download APOGEE data files
#
###############################################################################
import os
import sys
import shutil
import tempfile
import subprocess
import numpy
from apogee.tools im... |
import pytest
import boto3
import os
from common.config import DDB_SCHEDULE_TABLE
from common.utils import convert_csv_to_ddb
from ..app.find_expected_program import find_expected_program_for_looping_input
table_name = DDB_SCHEDULE_TABLE
TEST_DATA_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'data')
... |
const webpack = require('webpack')
const base = require('./webpack.base.conf')
const config = require('../config')
base.entry = {
lib: './src/main.js'
}
base.output = {
path: config.build.assetsRoot,
publicPath: config.build.assetsPublicPath,
filename: 'react-layout-justify-list.js',
library: 'ReactLayoutJu... |
"""
Django settings for mktplace project.
Generated by 'django-admin startproject' using Django 2.1.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
... |
// this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
// -- BEGIN LICENSE BLOCK ----------------------------------------------
/*!
* Copyright (C) 2018, SICK AG, Waldkirch
* Copyright (C) 2018, FZI Forschungszentrum Informatik, Karlsruhe, Germany
*
*
* Licensed under the Apache License, Versio... |
//! @version js-joda-timezone-2.1.1-2019a-10-year-range
//! @copyright (c) 2015-present, Philipp Thürwächter, Pattrick Hüper & js-joda contributors
//! @license BSD-3-Clause (see LICENSE in the root directory of this source tree)
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object... |
#!/usr/bin/python3
from src.File import File
class Directory():
def __init__(self, **kwargs):
self.children = []
for key in kwargs:
if key is not "_embedded":
setattr(self, key, kwargs[key])
if "_embedded" in kwargs:
for item in kwargs["_embedded"... |
// Copyright 2018 Hewlett Packard Enterprise Development LP
//
// 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,
// including without limitation the rights to use, copy,... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {Text, TouchableOpacity, View} from 'react-native';
import IonIcon from 'react-native-vector-icons/Ionicons';
import {e... |
import{S as t,i as e,s,D as l,e as r,c as a,a as n,d as o,b as c,f as i,E as f,v as g,r as h,k as m,j as u,H as d,n as p,m as x,F as v,o as w,w as I,G as b,t as $,g as E,I as y,J as D,K as V,L as j,M as k}from"../chunks/vendor-80c6efa6.js";function M(t){let e,s;const m=t[1].default,u=l(m,t,t[0],null);return{c(){e=r("di... |
#ifndef _TRANSITIONS_TEST_H_
#define _TRANSITIONS_TEST_H_
#include "../testBasic.h"
using namespace cocos2d;
class TransitionsTestScene : public TestScene
{
public:
virtual void runThisTest();
};
class TestLayer1 : public CCLayer
{
public:
TestLayer1(void);
~TestLayer1(void);
void restartCallback(C... |
//Copyright (c) 2019-2020 The PIVX developers
//Copyright (c) 2020 The ogcnode developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef MASTERNODESWIDGET_H
#define MASTERNODESWIDGET_H
#include "qt/ogcnode/pwidget.h"
#... |
import _plotly_utils.basevalidators
class HeightValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="height", parent_name="table.cells", **kwargs):
super(HeightValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... |
/*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* pinv.h
*
* Code generation for function 'pinv'
*
*/
#pragma once
/* Include files */
#inclu... |
"""Defines the unit tests for the :mod:`colour.plotting.diagrams` module."""
import unittest
from matplotlib.pyplot import Axes, Figure
from colour.colorimetry import (
MSDS_CMFS,
SDS_ILLUMINANTS,
SpectralShape,
reshape_msds,
)
from colour.plotting import (
plot_chromaticity_diagram_CIE1931,
p... |
console.log(Math.ceil(6.1))
const obj1 = {}
obj1.nome = 'Bola'
// obj1.['nome'] = 'Bola2'
console.log(obj1.nome)
function Obj(nome) {
this.nome = nome
this.exec = function() {
console.log('Exec...')
}
}
const obj2 = new Obj('Cadeira')
const obj3 = new Obj('Mesa')
console.log(obj2.nome)
console.lo... |
# -*- coding: utf-8 -*-
# Copyright 2015 Donne Martin. 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://www.apache.org/licenses/LICENSE-2.0
#
# or in the "lice... |
/**
* Kendo UI v2019.3.917 (http://www.telerik.com/kendo-ui)
* Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.... |
# Copyright 2013-2019 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)
from spack import *
import os
class PyPyside(PythonPackage):
"""Python bindings for Qt."""
homepage = "https://p... |
import React from 'react';
import ReactDOM from 'react-dom';
import Routes from './routes';
ReactDOM.render(
<Routes />,
document.getElementById('root'),
);
|
/** @jsx React.DOM */
var React = require('react/addons');
var UI = require('touchstonejs').UI;
var Spinner = require('../../components/Spinner');
module.exports = React.createClass({
displayName : 'Loading',
render : function () {
return (
<UI.FlexBlock>
<Spinner />
</UI.FlexBlock>
)
}
}) |
#!/usr/bin/env python
##############################################################################
# Copyright 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
################################... |
// eslint-disable-next-line no-unused-vars
const fixedMdDeprecated = [];
// eslint-disable-next-line no-unused-vars
const fixedSuggestionNamespacesDeprecated = [];
fixedMdDeprecated.push(
{
type: 'Property',
// NogScopeSymbolProperty UUID from `mdns` and `symbol`.
id: '$nogScopeSymbolPropertyId',
md... |
export default /* glsl */ `varying vec2 vSprite;
vec4 getSample(vec2 xy);
vec4 getSpriteColor() {
return getSample(vSprite);
}`; |
import "es6-shim";
import TransisObject from "../object";
import {PropsMixin, StateMixin} from "../react";
var Model = TransisObject.extend(function() {
this.prop('foo');
this.prop('bar');
this.prop('baz');
});
describe('PropsMixin', function() {
beforeEach(function() {
this.model = new Model;
this.co... |
//===- Value.h - Base of the SSA Value hierarchy ----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2021-2022, Geoffrey M. Poore
# All rights reserved.
#
# Licensed under the BSD 3-Clause License:
# http://opensource.org/licenses/BSD-3-Clause
#
'''
Python REPL emulation for Codebraid. Reads code interspersed with delimiters
from stdin. Writes code plus output interspersed ... |
import numpy as np
import statics2
lhs = np.array([
[0.8214, 0.1786, 0.7760],
[0.2500, 0.7500, 0.8660],
[0.5868, 0.4132, -0.9848]
])
rhs = np.array([
[-152],
[27],
[253]
]) * 1E-6 # factor here!
ans = np.dot(np.linalg.inv(lhs), rhs)
if __name__ == '__main__':
print(ans)
print(stat... |
# -*- coding: utf-8 -*-
import re
import urllib
import scrapy
from locations.items import GeojsonPointItem
class PPGPaintsSpider(scrapy.Spider):
name = "ppgpaints"
item_attributes = {"brand": "PPG Paints", "brand_wikidata": "Q83891559"}
allowed_domains = ["www.ppgpaints.com"]
start_urls = [
"... |
$(document).ready(function() {
$(".simplificado").mouseenter(function(){
$(".simplificado").css("display", "none");
$(".ampliado").css("display", "block");
});
$(".ampliado").mouseleave(function() {
$(".ampliado").css("display", "none");
$(".simplificado").css("display", "block");
});
... |
import hail as hl
from hail_scripts.utils.clinvar import download_and_import_latest_clinvar_vcf, CLINVAR_HT_PATH, CLINVAR_GOLD_STARS_LOOKUP
from hail_scripts.utils.hail_utils import write_ht
for genome_version in ["37", "38"]:
mt = download_and_import_latest_clinvar_vcf(genome_version)
timestamp = hl.eval(m... |
import { LocalStorageGetter } from "./LocalStorageGetter";
export const BatchStorageGetter = (props) => {
const names = LocalStorageGetter("names") || props.name;
const avatars = LocalStorageGetter("avatars") || props.avatar;
const ids = LocalStorageGetter("ids") || props.id;
const jobs = LocalStorageGetter("j... |
"""
d_send_email_on_fix.py: This script sends an email on a gps fix. After that
point it sends every 15 min an email with the latest gps fix in a simple text
format.
"""
__author__ = "Konstantinos Kagiampakis"
__license__ = """
Creative Commons Attribution 4.0 International
https://creativecommons.org/li... |
class Page(FrameworkElement,IResource,IAnimatable,IInputElement,IFrameworkInputElement,ISupportInitialize,IHaveResources,IQueryAmbient,IWindowService,IAddChild):
"""
Encapsulates a page of content that can be navigated to and hosted by Windows Internet Explorer,System.Windows.Navigation.NavigationWindow,and System.... |
(function() {
module.exports = {
findNimProjectFile: function(editorfile) {
var error, file, filepath, files, fs, name, path, stats, tfile, _i, _len;
path = require('path');
fs = require('fs');
try {
stats = fs.statSync(editorfile + "s");
return editorfile;
} catch (_... |
'use strict';
//Accessrules service used to communicate Accessrules REST endpoints
angular.module('accessrules').factory('Accessrules', ['$resource',
function($resource) {
return $resource('accessrules/:accessruleId', { accessruleId: '@_id'
}, {
update: {
method: 'PUT'
}
});
}
]); |
"""
Helpers for downsampling code.
"""
from toolz import compose
from operator import attrgetter, methodcaller
from zipline.utils.input_validation import expect_element
from zipline.utils.numpy_utils import changed_locations
from zipline.utils.sharedoc import (
templated_docstring,
PIPELINE_DOWNSAMPLING_FREQUE... |
from math import trunc
# Rounds value down to the desired number of decimals digits (controlled decimal_places) using math or truncate mode
def round_value(value, mode, decimal_places):
if mode == "math":
return round(value, decimal_places)
elif mode == "down":
# Check that decimal_places is a ... |
import sys
sys.path.append('../..')
from catalyst.isothermal_monolith_catalysis import *
#Importing all reaction dictionaries
from rxns_v5 import *
# Create dict to iterate through
rxn_list = {"r5f": r5f,"r5r": r5r,"r6f": r6f,"r6r": r6r,"r7": r7,"r8": r8,"r9": r9,
"r10": r10,"r11": r11,"r12": r12,"r13": ... |