text stringlengths 3 1.05M |
|---|
import React from 'react';
import {
ApolloClient,
ApolloProvider,
InMemoryCache,
createHttpLink,
} from '@apollo/client';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import { setContext } from '@apollo/client/link/context';
// import { ApolloProvider } from '@apollo/react-hooks';
... |
from pythoncalculator import multiply
def test_multiply():
assert multiply(10, 3) == 30
|
$(function() {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
... |
// 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 IOS_WEB_PUBLIC_TEST_MOCK_IMAGE_DATA_FETCHER_H_
#define IOS_WEB_PUBLIC_TEST_MOCK_IMAGE_DATA_FETCHER_H_
#import "ios/web/public/image_fetcher/image... |
module.exports={A:{A:{"2":"I D F E A B kB"},B:{"1":"M z N WB LB T","2":"C O H Q J K L"},C:{"1":"3 4 5 6 7 8 9 AB BB YB DB KB FB GB HB IB EB CB V U S MB NB OB PB QB JB SB TB M z N jB","16":"dB","33":"0 1 2 RB G X I D F E A B C O H Q J K L Y Z a b c d e f g h i j k l m n o p q r s t u v w x y P rB tB"},D:{"1":"IB EB CB V... |
// Copyright (c) 2012 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 UI_NATIVE_THEME_FALLBACK_THEME_H_
#define UI_NATIVE_THEME_FALLBACK_THEME_H_
#include "ui/native_theme/native_theme_base.h"
namespace ui {
/... |
import unittest
import random
import datetime as dt
from src import Client
class ClientTestCase(unittest.TestCase):
c = Client()
def setUp(self):
self.c.setSandBox()
self.c.setApiKey(config('prd_api_key'))
def test_pingApi(self):
res = self.c.pingApi()
json = res.json()... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
#
import json
import pytest
from parameters import CONNECTION_PARAMETERS
from snowflake.sqlalchemy import ARRAY, OBJECT, VARIANT
from sqlalchemy import Column, Integer, MetaData, Table, inspect
from ... |
/*
* MIT License
*
* Alexandria.org
*
* Copyright (c) 2021 Josef Cullhed, <info@alexandria.org>, et al.
*
* 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, includi... |
import os
import base64
def decodeIMG(base, path):
imgdata = base64.b64decode(base)
filename = path + "/avatar.png"
with open(filename, "wb") as f:
f.write(imgdata)
def fill(data, media_path=None):
if media_path == None:
full_path = os.path.realpath(__file__)
pa... |
# Copyright (c) OpenMMLab. All rights reserved.
import math
import warnings
import torch
import torch.nn as nn
import torch.utils.checkpoint as cp
from mmcv.cnn import Conv2d, build_activation_layer, build_norm_layer
from mmcv.cnn.bricks.drop import build_dropout
from mmcv.cnn.bricks.transformer import MultiheadAttent... |
/**
* \file
*
* \brief Board configuration.
*
* Copyright (c) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Re... |
import struct
from .utilites import unpack_bitstring, pack_bitstring
# from six import int2byte, byte2int
# class ReadRegistersRequestBase(ModbusRequest):
class ReadRegistersRequestBase:
'''
Base class for reading a modbus register
'''
_rtu_frame_size = 8
function_code = None
def __init__(sel... |
from sklearn.model_selection import StratifiedKFold
from sklearn.preprocessing import LabelEncoder
from pathlib import Path
from collections import Counter
import numpy as np
def X_y(path, suffix="JPEG"):
"""generate X and y from walking a <path_>, the path is expected
to contain images that end on <suffix>, ... |
HipaaAuditLog = {
configure: function (configObject) {
if (Meteor.isClient) {
Session.set('HipaaAuditLogConfig', configObject);
}
}
}
if (Meteor.isClient) {
Session.setDefault('HipaaAuditLogConfig', {
classes: {
input: "",
select: "",
ribbon: ""
},
highlightColor: "",
... |
"""Functions for plotting PEtab measurement files and simulation results in
the same format."""
from typing import Dict, Union, Optional, List
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from .helper_functions import (create_figure,
handle_dataset_plot,
... |
"""
Day 14 - Part 2
https://adventofcode.com/2021/day/14#part2
By NORXND @ 14.12.2021
(C) NORXND 2021 - Under The MIT License
"""
import math
input_file = open("Day14/input.txt", "r")
input_segments = input_file.read().split("\n\n")
template = input_segments[0]
rules = {}
connections = {}
bases = {}
for raw_rule in... |
import React from 'react';
import renderer from 'react-test-renderer';
import CreateMap from '../pages/CreateMap';
//import Link from 'react-router-dom/Link';
let BrowserRouter = require('react-router-dom').BrowserRouter;
let Link = require('react-router-dom').Link;
let Route = require('react-router-dom').Route;
tes... |
# -*- coding: utf-8 -*-
# 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 o... |
# To add a new cell, type '# %%'
# To add a new markdown cell, type '# %% [markdown]'
# %%
#class 1 - converts client's information into score
class creditRating:
"""
A class used to convert home buyer's financial characteristics into individual credit score components
...
Attributes
---------... |
#!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# capable Trace security capabilitiy checks (cap_capable()).
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: capable [-h] [-v] [-p PID] [-K] [-U]
#
# Copyright 2016 Netflix, Inc.
# Licensed under the Apache License, Version 2.0 (the "Licen... |
import re
import time
from pyquery import PyQuery as pq
from policy_crawl.common.fetch import get,post
from policy_crawl.common.save import save
from policy_crawl.common.logger import alllog,errorlog
def parse_detail(html,url):
alllog.logger.info("湖北省税务局: %s"%url)
doc=pq(html)
data={}
data["title"]=d... |
#!/usr/bin/python
from examples import (
Q35Project_2_6_0,
Q35MachineNode_2_6_0
)
from widgets import (
GitVerSelDialog,
QDCGUISignalHelper,
DescNameWatcher,
GUIPOp_SetBuildPath,
Statusbar,
GUIProjectHistoryTracker,
HistoryWindow,
askyesno,
askopen,
asksaveas,
askdir... |
import MarkerModel from './MarkerModel';
export default MarkerModel.extend({
type: 'markArea',
defaultOption: {
zlevel: 0,
// PENDING
z: 1,
tooltip: {
trigger: 'item'
},
// markArea should fixed on the coordinate system
animation: false,
... |
# :coding: utf-8
# :copyright: Copyright (c) 2015 ftrack
import math
import pytest
import ftrack_api
import ftrack_api.query
import ftrack_api.exception
def test_index(session):
'''Index into query result.'''
results = session.query('User')
assert isinstance(results[2], session.types['User'])
def tes... |
var path = require('path');
var exec = require('child_process').exec;
var url = require('url');
var gulp = require('gulp');
var gutil = require('gulp-util');
var express = require('express');
var proxy = require('express-http-proxy');
var webpack = require('webpack');
var through = require('through2');
var br = requir... |
from __future__ import absolute_import, division, print_function, unicode_literals
import numpy as np
import torch
from torch.nn import functional as F
import logging
from torch import optim
import madminer.utils
from madminer.utils.ml import losses
logger = logging.getLogger(__name__)
def get_activation_function(... |
#! /usr/bin/env node
var fs = require('fs')
var path = require('path')
var pull = require('pull-stream')
var toPull = require('stream-to-pull-stream')
var File = require('pull-file')
var explain = require('explain-error')
var Config = require('ssb-config/inject')
var ... |
#ifndef __ModuleWindow_H__
#define __ModuleWindow_H__
#include "Module.h"
#include "SDL/include/SDL.h"
class Application;
class ModuleWindow : public Module
{
public:
ModuleWindow(bool start_enabled = true);
// Destructor
virtual ~ModuleWindow();
bool Init();
bool CleanUp();
int Width() const;
int Height()... |
/*
Copyright (C) 2016 Thomas Hauth. All Rights Reserved.
* Written by Thomas Hauth (Thomas.Hauth@web.de)
This file is part of Kung Foo Barracuda.
Kung Foo Barracuda 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... |
const url = require('url');
const { waterfall } = require('async');
const httpProxy = require('http-proxy');
const { auth, errors, s3routes, policies } = require('arsenal');
const { config } = require('../Config');
const constants = require('../../constants');
const vault = require('../auth/vault');
const RequestConte... |
# Copyright 2016 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... |
export default class Ninja extends Phaser.Physics.Arcade.Sprite {
constructor(scene, x, y, texture, frame) {
super(scene, x, y, texture, frame)
this.setDataEnabled();
this.setData({
velocity: 80,
acceleration: 100,
direction: null
});
sc... |
# -*- coding: utf-8 -*-
"""
tablib.core
~~~~~~~~~~~
This module implements the central Tablib objects.
:copyright: (c) 2014 by Kenneth Reitz.
:license: MIT, see LICENSE for more details.
"""
from copy import copy
from operator import itemgetter
from tablib import formats
from tablib.compat impo... |
// helpers
var _ = require('lodash');
var log = require('../core/log');
var util = require('../core/util');
var fs = require('fs');
var toml = require('toml');
var getConfig = function(strat) {
return toml.parse(fs.readFileSync(util.dirs().config + 'strategies/' + strat + '.toml'));
};
// configuration
var config ... |
//-
// ==========================================================================
// Copyright (C) 1995 - 2006 Autodesk, Inc. and/or its licensors. All
// rights reserved.
//
// The coded instructions, statements, computer programs, and/or related
// material (collectively the "Data") in these files contain un... |
# coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import unittest
import os
import copy
from monty.serialization import loadfn#, dumpfn
from pymatgen.command_line.critic2_caller import Critic2Output
from pym... |
// Solution
class Node {
constructor(data, next = null) {
this.data = data;
this.next = next;
}
}
class LinkedList {
constructor() {
this.head = null;
}
size() {
let counter = 0;
let node = this.head;
while (node) {
counter += 1;
node = node.next;
}
return counter... |
######### SEEDS
import numpy as np
import tensorflow as tf
import random as rn
import os
os.environ['PYTHONHASHSEED'] = '0'
seed = 16122017
np.random.seed(seed)
rn.seed(seed)
session_conf = tf.ConfigProto(intra_op_parallelism_threads=1, inter_op_parallelism_threads=1)
from keras import backend as K
tf.set_random_seed(... |
# -*- coding: utf-8 -*-
import functools
from vcr import VCR
from debug_toolbar.panels import Panel
from vcr.cassette import CassetteContextDecorator, Cassette
class MemoryCassette(Cassette):
"""A simple memory cassette"""
_records = {}
@classmethod
def clear_records(cls, path):
del cls._re... |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EventEmitter } from 'events';
import { Job } from './job';
i... |
module.exports = {
domain: 'A',
title: 'Hòa đồng',
shortDescription: 'Tính hòa đồng phản ánh sự khác biệt của tính cách liên quan đến sự hợp tác và hòa hợp trong cộng đồng và xã hội. Những người dễ mến coi trọng việc hòa đồng với những người khác.',
description: `Họ rất chu đáo, thân thiện,
hào phóng, hữu ích v... |
import os
from flask import Flask, jsonify, request
import logging
import Queue
import json
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
from email.utils import formataddr
from string import Template
import time
from emailSegments im... |
# -*- coding: utf-8 -*-
# This file was generated
import ctypes
import nitclk.errors as errors
import threading
from nitclk._visatype import * # noqa: F403,H303
class Library(object):
'''Library
Wrapper around driver library.
Class will setup the correct ctypes information for every function on first ... |
process.env.NODE_ENV = 'test';
const sinon = require('sinon');
const chai = require('chai');
const chaiHttp = require('chai-http');
const sinonChai = require("sinon-chai");
chai.use(chaiHttp);
chai.use(sinonChai);
const config = require('../../../../config/config');
const datastore = require('../../../../... |
from datetime import datetime
import peewee as pw
from envparse import env
from telegram.update import Update
env.read_envfile()
db = pw.SqliteDatabase(env("DATABASE_URL"))
def _utcnow():
return datetime.utcnow()
class BaseModel(pw.Model):
created = pw.DateTimeField(default=_utcnow)
modified = pw.Dat... |
# -*- coding: utf-8 -*-
"""
fungiform.tests
~~~~~~~~~~~~~~~
The fungiform test suite.
:copyright: (c) 2010 by the Fungiform Team.
:license: BSD, see LICENSE for more details.
"""
import doctest
import unittest
def suite():
from fungiform.tests import forms, utils, widgets
pkg_prefix = ''... |
import { useMutation } from '@apollo/react-hooks'
import gql from 'graphql-tag'
import styled from 'styled-components'
import { ALL_POSTS_QUERY, allPostsQueryVars } from './PostList'
const CREATE_POST_MUTATION = gql`
mutation createPost($title: String!, $url: String!) {
createPost(title: $title, url: $url) {
... |
#!/usr/bin/env python3
# Copyright (c) 2014-2017 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Script to generate list of seed nodes for chainparams.cpp.
This script expects two text files in the dir... |
/*
* ClientLayout Messages
*
* This contains all the text for the ClientLayout component.
*/
import { defineMessages } from 'react-intl';
export const scope = 'app.components.ClientLayout';
export default defineMessages({
header: {
id: `${scope}.header`,
defaultMessage: 'This is the ClientLayout compon... |
from django.contrib import admin
from .models import License
# Register your models here.
class LicenseAdmin(admin.ModelAdmin):
pass
admin.site.register(License, LicenseAdmin) |
let _this;
const ADDRESS_PREFIX = "CYB"; // 修改此处会修改包括各种key生成在内的前缀;
const PREFIX_OF_CHAIN = {
"90be01e82b981c8f201c9a78a3d31f655743b29ff3274727b1439b093d04aa23": "CYB",
"59e27e3883fc5ec4dbff68855f83961303157df9a64a3ecf49982affd8e8d490": "CYB"
};
const Network = class {
constructor(chain_id, core_asset) {
th... |
import styles from './template.css';
import template from './template';
import AoflElement from '@aofl/web-components/aofl-element';
/**
* @summary IconBaselineAirlineSeatReclineExtraElement
* @class IconBaselineAirlineSeatReclineExtraElement
* @extends {AoflElement}
*/
class IconBaselineAirlineSeatReclineExtraEle... |
import pandas
pandas.options.mode.chained_assignment = None # chained_warning_disbaled
# local-imports
from .loader import print_task,get_url,ULCA_MDL_CONTRIB_URL,perform_webpage_function
from .loader import show_all_data_from_table,print_output
from .loader import elements_mdl_contrib as ele
def repair_df(df):
... |
#!/usr/bin/env python3
#
## @file
# __init__.py
#
# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
|
import { useParams } from "react-router-dom";
import { useContext, useEffect } from "react";
import Loader from "react-loader-spinner";
import CustomerContext from "../context/customer/customerContext";
import UserAuthContext from "../context/userAuth/userAuthContext";
import CustomerHeader from "../components/Customer... |
///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2010, Jason Mora Saragih, all rights reserved.
//
// This file is part of FaceTracker.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following con... |
/*
* SPDX-License-Identifier: Apache-2.0
*
* The OpenSearch Contributors require contributions made to
* this file be licensed under the Apache-2.0 license or a
* compatible open source license.
*
* Any modifications Copyright OpenSearch Contributors. See
* GitHub history for details.
*/
/*
* Licensed to Ela... |
# -*- coding: utf-8 -*-
# Copyright 2018 ICON Foundation
#
# 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 ... |
(function($) {
$.fn.kanban = function(options) {
// defaults
var $this = $(this);
var settings = $.extend({
titles: ['Block 1', 'Block 2', 'Block 3', 'Block 4'],
colours: [],
items: []
}, options)
var classes = {
kanban_boar... |
import io
import os
import shlex
import sys
import tempfile
import tokenize
import tkinter.filedialog as tkFileDialog
import tkinter.messagebox as tkMessageBox
from tkinter.simpledialog import askstring
import idlelib
from idlelib.config import idleConf
encoding = 'utf-8'
if sys.platform == 'win32':
... |
"""
A Baby class and methods that use the Baby class.
Authors: David Mutchler, Dave Fisher, Valerie Galluzzi, Amanda Stouder,
their colleagues and Ryan Walter.
""" # done: 1. PUT YOUR NAME IN THE ABOVE LINE.
def main():
"""
After you have made the Baby class, run this module. If your Baby
c... |
import Element from '../../element/mixins/Element'
export default {
mixins: [Element],
data(){
return {
formKey: 0
}
},
props: {
success: {}, //injected javascript function to be executed on success
error: {} //injected javascript function to be execute... |
#pragma once
#include <Windows.h>
#include <TlHelp32.h>
#include <vector>
#include <string>
#include "Vector.h"
using namespace std;
#define MAX_PROCESSES 4096
typedef void (*callbackFunc)(WCHAR* exeName);
struct CachedProcName {
WCHAR* procName;
DWORD procPID;
};
struct CallbackInfo {
DWORD* procList;
callba... |
#!D:\Think\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
lo... |
#!/usr/bin/python
""".DBF creation helpers.
Note: this is a legacy interface. New code should use Dbf class
for table creation (see examples in dbf.py)
TODO:
- handle Memo fields.
- check length of the fields accoring to the
`http://www.clicketyclick.dk/databases/xbase/format/data_types.html`
"""
"""His... |
/**
* @license
* Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be f... |
# Written in 2003 by Andrew Dalke, Dalke Scientific Software, LLC.
# This software has been released to the public domain. No
# copyright is asserted.
from __future__ import generators
# Implementation inheritence -- not asserting a class hierarchy here
#
# If there is a class hierarchy, OrderedMultiDict is a child ... |
# <snippet_imports>
import asyncio
import io
import glob
import os
import sys
import time
import uuid
import requests
from urllib.parse import urlparse
from io import BytesIO
from PIL import Image, ImageDraw
from azure.cognitiveservices.vision.face import FaceClient
from msrest.authentication import CognitiveServicesCr... |
#!/usr/bin/python
# -*- encoding: utf-8 -*-
from genericpath import isfile
import torch
from torch.utils import data
from torch.utils.data import Dataset
import torchvision.transforms as transforms
import os.path as osp
import os
from PIL import Image
import numpy as np
import json
import tqdm
import pandas as pd
im... |
#ifndef __LIB_SHARED_INVERTER_H__
#define __LIB_SHARED_INVERTER_H__
#include "lib_sandia.h"
#include "lib_pvinv.h"
#include "lib_ondinv.h"
#include <vector>
/**
*
* \class SharedInverter
*
* A SharedInverter describes a PV inverter that can be optionally hooked up to a DC-connected battery which
* combines with the... |
import datetime
from django.test import TestCase
from django.urls import reverse
from django.contrib.auth import get_user_model
from core.models import MatierePremiere, Biocarburant, Pays, Entity, ProductionSite, Depot
from certificates.models import ISCCCertificate, DBSCertificate
from api.v3.common.urls import urlpa... |
""" .. _findpeaks:
FindPeaksCWT --- Peak finding with continuous wavelet transforms.
-----------------------------------------------------------------
This module defines a wrapper class for the scipy.signal.find_peaks_cwt
method.
"""
import types
import numpy as np
try:
from scipy.signal import fi... |
"""Annotation class, modules & related functions"""
import os
import re
from pathlib import Path
from typing import Iterable, Optional, Union
import numpy as np
import pandas as pd
from loguru import logger
from genomepy.annotation.mygene import map_genes as _map_genes
from genomepy.annotation.mygene import query_myg... |
from os.path import join, exists
from os import makedirs, remove
from warnings import warn
from math import log10, isnan
import subprocess
from collections import defaultdict
from .logger import LOGGER
from .workspace import get_workspace_object_data
# E values of less than 1E-200 are treated as 1E-200 to avoid log o... |
"""Retrieves package summary and licensing information from pypi repository
Accepts semicolon separated list of module;version such as
celery;4.0.2
requests;2.14.2
multiprocessing;2.6.2.1
scipy;0.18.1
Outputs a CSV with name, version, license_info, summary, homepage information
"""
import sys
import fileinput
import c... |
// spy on console warnings
jest.spyOn(console, 'info').mockImplementation(text => text);
import sprintsModule from '@/store/modules/sprints';
import { mockResponse } from '../../util';
describe('The sprints module', () => {
it('returns a correct new template', () => {
const template = sprintsModule.getter... |
import React from "react"
import { Link } from "gatsby"
import { Button } from "../../styles"
export function AllStoresBtn() {
return (
<Link to="/lugares">
<Button>Ver todos los lugares!</Button>
</Link>
)
}
|
#!/usr/bin/python
# Copyright: Ansible Project
# 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
import copy
import yaml
__metaclass__ = type
HAS_SDK = True
try:
import ionoscloud
from ionoscloud impo... |
"""This module contains the general information for LstorageVirtualDriveDef ManagedObject."""
import sys, os
from ...ucsmo import ManagedObject
from ...ucscoremeta import UcsVersion, MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class LstorageVirtualDriveDefConsts():
ACCESS_POLICY_BLOCKED = "blocked"... |
/// <reference path="../../observable.ts"/>
/// <reference path="../../concurrency/scheduler.ts" />
(function () {
var o;
var so = o.windowWithTimeOrCount(100, 200);
var so = o.windowWithTimeOrCount(100, 200, Rx.Scheduler.default);
});
//# sourceMappingURL=windowwithtimeorcount.js.map |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const index_1 = require("../index");
const blockstack = require('blockstack');
async function putFile(path, contents, encrypt = true) {
try {
await blockstack.putFile(path, JSON.stringify(contents), { encrypt });
}
catch (e... |
import React from 'react'
import Search from '../../../comps/Search'
import FollowCard from './FollowCard'
import TrendingCard from './TrendingCard'
import './Sidebar.css'
import { useLocation } from 'react-router-dom'
function Sidebar() {
const location = useLocation();
return (
<div className="Sideb... |
var Brewer = Brewer || {};
Brewer.MaskMoney = (function (){
function MaskMoney(){
this.decimal = $('.js-decimal');
this.plain = $('.js-plain');
}
MaskMoney.prototype.enable = function(){
this.decimal.maskMoney({decimal: ',', thousands: '.'});
this.plain.maskMoney({precision:0, thousands: '.'});
}
retur... |
Vue.component("folder-item", {
props: ["item", "selected"],
template: "\n<li class=\"dd-item expanded\" :class=\"{ active: item.id === selected, expanded: item.isExpanded || item.items.length === 0 }\" :data-id=\"item.id\">\n <a v-if=\"!item.edit\" class=\"droppable\" v-on:click.prevent=\"piranha.media.load(item... |
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class P... |
#!/usr/bin/env python
# Copyright 2015-2016 Yelp 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 ... |
/*!-----------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.6.1(8f43cf5d0d3d233c9ba1c9085f2bb529f834c841)
* Released under the MIT license
* https://github.com/Microsoft/vscode/blob/master/LICENSE.txt
*-------------------------------------... |
#!/usr/bin/env python3
import os
import json
import subprocess
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
CONFIG_DIR = os.path.join(CURRENT_PATH, "..", "..", "config")
if __name__ == "__main__":
submitty_config = os.path.join(CONFIG_DIR, 'submitty.json')
json_dir = os.path.join(CONFIG_DIR, "versi... |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
/**
*
* @class Material.components.Checkbox
*
* This class is to define an existing control, checkbox, with a totally template of HTML structure
* */
Ext.define('Material.components.Checkbox', {
extend: 'Ext.Component',
xtype: 'md-checkbox',
template: [
{
tag: 'div',
... |
"""
Logging unit tests.
Copyright (c) 2018 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are met:
* Redistributions of ... |
# Generated by Django 2.0.5 on 2019-01-28 09:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0029_auto_20190128_1850'),
]
operations = [
migrations.AlterField(
model_name='user',
name='gender',
... |
// @flow
import chalk from 'chalk';
const enabled: boolean = chalk.enabled;
const supportsColor: boolean = chalk.supportsColor;
const hasColor = chalk.hasColor("a maybe colorful string");
const noColor = chalk.stripColor("a colorful string");
const colorfulString = chalk.red.bgGreen("a soon to be colorful string");... |
/*
* Generated by asn1c-0.9.24 (http://lionet.info/asn1c)
* From ASN.1 module "EUTRA-RRC-Definitions"
* found in "fixed_grammar.asn"
* `asn1c -gen-PER`
*/
#include "Q-QualMin-r9.h"
int
Q_QualMin_r9_constraint(asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) ... |
const ProvinceCard = require('../../provincecard.js');
const AbilityDsl = require('../../abilitydsl.js');
class SeekingEnlightenment extends ProvinceCard {
setupCardAbilities() {
this.reaction({
title: 'Force opponent to lose fate equal to the number of attackers',
when: {
... |
#include <sys/mmu.h>
enum {
// The GPIO registers base address.
GPIO_BASE_OFF = 0x00200000,
// The offsets for reach register.
// Controls actuation of pull up/down to ALL GPIO pins.
GPPUD = (GPIO_BASE_OFF + 0x94),
// Controls actuation of pull up/down for specific GPIO pin.
GPPUDCLK0 = (GPIO_BASE_OFF + 0x9... |
const user = 'bpeacedev@gmail.com'
const refreshToken = '1/6M2zR8mREje7jJQ_v-q93MrA3Xpl7RDsB3GEoFN8P7k'
const accessToken =
'ya29.GltgBWX7T9eFEByrlZg1SSBOOvtPjpednFztUhfZLbu1jy0KCIlFOpyN5qyM5lMglZjf1E5CPdVoDJAw59G67BByY7i6vwe1xSSgjdnqWZVE6Y4KpgPUGC_xaSjn'
const clientId =
'512185239099-rvahg31ka3cqt58bkh7mfh11m9j1v... |
YUI.add("attribute-complex",function(b){var a=b.Object,c=".";b.Attribute.Complex=function(){};b.Attribute.Complex.prototype={_normAttrVals:function(g){var i={},h={},j,d,f,e;if(g){for(e in g){if(g.hasOwnProperty(e)){if(e.indexOf(c)!==-1){j=e.split(c);d=j.shift();f=h[d]=h[d]||[];f[f.length]={path:j,value:g[e]};}else{i[e]... |
import unittest
from leetcode.common import TreeNode
class Solution:
"""
This recursive depth-first solution compares the two passed
nodes against each other. If they are equal then the function
calls itself recursively with its children taking into account
that the children may be flipped, i.e. ... |