text stringlengths 3 1.05M |
|---|
'''Advent of Code - Day 7 2017'''
# Part 2
children = []
parents = []
weight = {}
tower = {}
total_weight = {}
total_parts = {}
with open('day07input.txt') as f:
for line in f:
group = line.strip('\n').split('->')
item = group[0].split(' (')
key = item[0]
value = item[1].strip(')... |
# -*- coding: utf-8 -*-
import scrapy
from scrapy import Request, Selector
from lxml import etree
import re
import json
from urllib.parse import quote,unquote
class VSpider(scrapy.Spider):
name = 'v'
custom_settings = {
'COOKIES_ENABLED': False, # use my create cookie in headers
}
def start... |
import Dom from './dom';
const dom = new Dom();
export default class Maze {
constructor(size) {
this.maze = [];
this.stack = [];
this.size = size;
}
generateMaze() {
dom.updateContainerWidth(this.size);
for (let row = 0; row < this.size; row += 1) {
this.maze[row] = [];
for (le... |
from kafka import KafkaProducer
import json
from dubhe_sdk.config import *
import uuid
import time
import datetime
def msg_id():
return uuid.uuid1().int>>64
# 模型状态信息
def model_ready_data():
"""
{
"action": "READY" # START, END ,
"status": 200 # 200: 正常 /300: 异常,
"msg": "content"
}
:return:
... |
import datetime
import random
import time
from collections import OrderedDict
import pandas as pd
from pytdx.hq import TdxHq_API
from DyCommon.DyCommon import DyLogData
class DyStockDataTdx:
"""
We keep connection open to get high performance until consecutive errors happened.
"""
class Api:
... |
#!coding:utf8
#author:yqq
#date:2020/5/13 0013 20:26
#description: ETH 和 ERC20区块扫描的 实现类
import logging
import time
import traceback
from binascii import unhexlify, hexlify
from datetime import datetime
from decimal import Decimal
from typing import List, Union
import redis
from eth_bloom import BloomF... |
import program from 'commander'
import co from 'co'
import prompt from 'co-prompt'
import chalk from 'chalk'
require('datejs')
import { convertSecondsToHrsMins, startOfWeek, logWorklog } from './utils'
import config from './config'
import { getUserWorklogs } from './jira'
// Create program
program
.option('-c, --co... |
#
# @lc app=leetcode id=304 lang=python3
#
# [304] Range Sum Query 2D - Immutable
#
# https://leetcode.com/problems/range-sum-query-2d-immutable/description/
#
# algorithms
# Medium (40.30%)
# Likes: 1413
# Dislikes: 207
# Total Accepted: 145.5K
# Total Submissions: 357.9K
# Testcase Example: '["NumMatrix","sumR... |
from mpi4py import MPI
from numpy import empty
from pyccel.decorators import types
# TODO: avoid declaration of integer variables 'ierr' and 'rank'
# TODO: allow access to process rank through property 'comm.rank'
# TODO: allow passing MPI communicator to functions
# TODO: understand that 'recvbuf' has intent(inout)... |
"use strict";
var $___46__46__47_syntax_47_trees_47_ParseTreeType_46_js__,
$__TempVarTransformer_46_js__,
$__ParseTreeFactory_46_js__,
$__PlaceholderParser_46_js__,
$___46__46__47_syntax_47_trees_47_ParseTrees_46_js__;
var $__1 = ($___46__46__47_syntax_47_trees_47_ParseTreeType_46_js__ = require("../syn... |
class PasswordChecker:
def __init__(self,password):
self.password = password
def isvulnerable(self):
with open('passwords.txt') as f:
for i in f:
i = i.strip()
if(i == self.password):
return True
return False
def ... |
import requests
from tools import *
from urllib.parse import quote
class TaobaoSearch(BaseSearch):
def __init__(self, query):
super(TaobaoSearch, self).__init__(query)
self.reqeust_url = "https://suggest.taobao.com/sug?code=utf-8&q=" + str(self.query)
def runDefault(self):
result_arr ... |
# -*- coding: utf-8 -*-
import requests
class GroupsMembers(object):
def __init__(self, cfg, users, groups):
super(GroupsMembers, self).__init__()
self.api = 'http://%s/api/v4/groups/%s/members?per_page=100'
self.api_add = 'http://%s/api/v4/groups/%s/members'
self.source = cfg['source']
self.target = cfg['... |
"""Provides the repository macro to import TFRT."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo():
"""Imports TFRT."""
# Attention: tools parse and update these lines.
TFRT_COMMIT = "ad9fd97c4ae5bb2f68558b3827f33bd80370ab9b"
TFRT_SHA256 = "0ec79f8b01ab635f0357efd0760c7efa9c6dc6b35c91b3... |
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py 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 late... |
var _ = require('lodash');
var chai = require('chai');
var sinon = require('sinon');
var assert = require('assert');
var should = chai.should;
var AddressTranslator = require('../lib/addresstranslator');
describe('#AddressTranslator', function() {
it('should translate address from polis to bch', function() {
v... |
function login()
{
var isFound =false;
var userID ;
$.post(
{
url: "api/emp/getByLogin.php",
data:
{
Pseudo : $("#Pseudo").val(),
Password : $("#Password").val()
},
success: function(result)
... |
/*
* Arm SCP/MCP Software
* Copyright (c) 2017-2021, Arm Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SGM775_PIK_VPU_H
#define SGM775_PIK_VPU_H
#include <fwk_macros.h>
#include <stdint.h>
/*!
* \brief VPU PIK register definitions
*/
struct pik_vpu_reg {
... |
"""thiswebsite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-b... |
/*
* Spline.h
*
* This file is part of the "GeometronLib" project (Copyright (c) 2015 by Lukas Hermanns)
* See "LICENSE.txt" for license information.
*/
#ifndef GM_SPLINE_H
#define GM_SPLINE_H
#include "Macros.h"
#include <Gauss/Real.h>
#include <Gauss/Vector2.h>
#include <Gauss/Vector3.h>
namespace Gm
{
... |
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... |
from typing import Union, List, Optional
from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
# This file is auto-generated by generate_schema so do not edit manually
# noinspection PyPep8Naming
class TestScript_Rule3Schema:
"""
A structured set of tests against a FHIR serve... |
"""
@brief test log(time=19s)
@author Xavier Dupre
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.helpgen.sphinx_main import process_notebooks
from pyquickhelper.pycode import is_travis_or_appveyor, get_temp_folder, ExtTestCase
class TestNoteBooksBugPdf(ExtTestCas... |
const express = require('express');
const axios = require('axios');
const fs = require('fs');
const winston = require('winston');
const moment = require('moment');
const app = express();
const port = 3001;
const getQueryParams = (query) =>
Object.entries(query).reduce((prev, [key, value], currIdx) => {
if (curr... |
import csv
from django.conf.urls.static import settings
from django.core.management.base import BaseCommand
# Import the model
from extra.models import Links as PD
ALREDY_LOADED_ERROR_MESSAGE = """
If you need to reload the Links data from the CSV file, first delete the POSTGRES data file to destroy the database. Th... |
"""
An assortment of common input pickers.
"""
# ======================================================================= #
# Copyright (C) 2019 Hoverset Group. #
# ======================================================================= #
import hoverset.util.color as color
import ... |
# 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 applica... |
#https://www.hackerrank.com/challenges/re-start-re-end/problem
import re
string, substring = input(), input()
pattern = re.compile(substring)
match = pattern.search(string)
if not match:
print('(-1, -1)')
while match:
print('({0}, {1})'.format(match.start(), match.end() - 1))
match = pattern.search(st... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('cloop', '0002_course_owner'),
]
operations = [
migrations.CreateModel(
name='PedagogyHelper',
fields... |
#include <std.h>
inherit TOWNSMAN;
void create() {
::create();
set_nwp("healing", 15);
set_name("Pojo");
set_id(({"pojo","healer",}));
set_short("Pojo, healer of Torm");
set("aggressive", 0);
set_level(19);
set_long(
" Pojo is a diminuative human, so small and wrinkled as to almost think him a gnom... |
from django.http import QueryDict
from django.shortcuts import render, redirect
from . import forms
from . import models
from django.contrib.auth.forms import PasswordChangeForm
from django.contrib import messages
from django.contrib.auth import update_session_auth_hash
from profiles.models import Status, MoneyTransfer... |
# -*- coding: utf-8 -*-
#
# 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, software
... |
import React from "react";
import { Row, Col, Table, Grid } from "react-bootstrap";
import { thArray, tdArray } from "../variables/Variables.jsx";
import { Link } from "react-router-dom";
const MyMOC = () => {
return (
<div>
<Grid fluid style={{ padding: "50px", overflowX: "scroll" }}>
<Row>
... |
/*
* linux/arch/arm/mach-at91/board-sam9261ek.c
*
* Copyright (C) 2005 SAN People
* Copyright (C) 2006 Atmel
*
* 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 L... |
// spin_lock.h
/**
* Copyright (C) 2008 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will ... |
import express from 'express';
import swaggerUi from 'swagger-ui-express';
import logger from 'morgan';
import bodyParser from 'body-parser';
import cookieParser from 'cookie-parser';
import compress from 'compression';
import jsyaml from 'js-yaml';
import methodOverride from 'method-override';
import cors from 'cors';... |
const config = require('../config');
const { toCamel } = require('./utils');
const portfinder = require('portfinder');
const serve = require('rollup-plugin-serve');
const rollupConfig = require('./rollup.base');
const packageJson = require('../package.json');
const livereload = require('rollup-plugin-livereload');
con... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("@styled-icons/typicons/At"), exports);
|
import React from 'react';
import { fade, makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import IconButton from '@material-ui/core/IconButton';
import Typography from '@material-ui/core/Typography';
import Badge from '@materi... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ----------------------------------------------------------------... |
#!/usr/bin/python
#
# Copyright (C) 2007 SIOS Technology, 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 appli... |
import sys
import os
# add current directry to import path
code_dir = os.path.dirname(__file__)
sys.path.append(code_dir)
from tethered_cell import tethered_cell
path = os.path.join(code_dir, 'test_movies/1103_pH6.5_2016.04.15_17.17.19S.ihvideo-2.tif')
frame_number = 100
FrameRate = 100.0
CCW = 1
tethered_cell(path, ... |
# 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 ... |
#!/usr/bin/env python
# coding=utf-8
from __future__ import unicode_literals
from pyecharts import Line
from test.constants import CLOTHES, WEEK
clothes_v1 = [5, 20, 36, 10, 10, 100]
clothes_v2 = [55, 60, 16, 20, 15, 80]
def test_line_marks():
line = Line("折线图示例")
line.add("商家A", CLOTHES, clothes_v1, mark_... |
/* ============================================================================= */
/* ======================== START: Gulp File =================================== */
/* ============================================================================= */
//this brings in all the needed functionality for the tasks to run.... |
//
// Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20).
//
// Copyright (C) 1997-2019 Steve Nygard.
//
#import <objc/NSObject.h>
#import "NRBTLinkPreferencesAgentDelegate-Protocol.h"
#import "NRLinkDelegate-Protocol.h"
#import "NRLinkManagerBluetoot... |
import uuid
from django.test import TestCase
from kafka.common import KafkaUnavailableError
from mock import MagicMock
from corehq.apps.change_feed import topics
from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed, KafkaCheckpointEventHandler
from corehq.apps.change_feed.producer import producer
from co... |
/**
* Copyright (c) 2014, Facebook, Inc. All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
*
*/
'use strict';
... |
mergeInto(LibraryManager.library, {
GetLocalStorageItem: function (key) {
var itemValue = localStorage.getItem(UTF8ToString(key));
if (itemValue == null) itemValue = "";
var bufferSize = lengthBytesUTF8(itemValue) + 1;
var buffer = _malloc(bufferSize);
string... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
from celery import Celery
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'trading_bot.settings')
app = Celery('trading_bot')
app.conf.task_default_queue = 't... |
import { compile } from "ember-template-compiler";
QUnit.module('ember-template-compiler: transform-input-on');
QUnit.test("Using `action` without `on` provides a deprecation", function() {
expect(1);
expectDeprecation(function() {
compile('{{input action="foo"}}', {
moduleName: 'foo/bar/baz'
});
... |
//
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
#import "NSObject.h"
#import "NSCopying.h"
@class NSString, TAGPBArray;
@interface TAGPBDescriptor : NSObject <NSCopying>
{
TAGPBArray *fields_;
Class messageClass_;
... |
# -*- coding: utf-8 -*-
""".. moduleauthor:: Artur Lissin"""
from typing import Dict
from rewowr.public.errors.custom_errors import CheckExtraArgsDictError
def check_extra_args_dict(dict_cont: Dict, /) -> None:
for key, value in dict_cont.items():
if not (isinstance(key, str) and isinstance(value, str)):... |
import atexit
import os
import subprocess
import sys
import time
from lib import audio
from lib import config
from lib import twt
from lib import led
from lib.constants import Sequence
SEQUENCE = None
PROCESS = None
STREAM = None
LAST_TWEET_ID = None
def persist_last_tweet_id(tweet_id):
with open('./last_tweet.tx... |
from .parsers import CSVTextParser
from threading import stack_size
from .firebase import *
from django.shortcuts import render
from rest_framework import status, views
from rest_framework.decorators import api_view, parser_classes
from rest_framework.response import Response
import logging
from .config import *
# C... |
import pytest
import time
import yaml
import tempfile
import shutil
import unittest
import ray
from ray.tests.test_autoscaler import SMALL_CLUSTER, MockProvider, \
MockProcessRunner
from ray.autoscaler.autoscaler import StandardAutoscaler
from ray.autoscaler.load_metrics import LoadMetrics
from ray.autoscaler.node... |
/*
+----------------------------------------------------------------------+
| Copyright (c) 1997-2018 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundl... |
//
// ViewController.h
// Demo
//
// Created by JianRongCao on 1/16/17.
// Copyright © 2017 JianRongCao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Cisco Systems
# GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.action import ActionBase
try:
... |
dojo.provide("wuhi.designer.dijit.layout.TabContainer");
dojo.require("wuhi.designer._Widget");
dojo.require("wuhi.designer.dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
dojo.declare("wuhi.designer.dijit.layout.TabContainer", [dijit.layout.TabContainer, wuhi.designer._Widget], {
dojoClass:... |
///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
/// Auto-generated by Stone, do not modify.
///
#import <Foundation/Foundation.h>
#import "DBSerializableProtocol.h"
@class DBTEAMLOGSharedContentAddLinkExpiryDetails;
NS_ASSUME_NONNULL_BEGIN
#pragma mark - API Object
///
/// The `SharedContentAddL... |
from PySide2.QtCore import Qt
from PySide2.QtWidgets import QProgressDialog
class ProgressDialog(QProgressDialog):
def __init__(self, parent=None):
super(ProgressDialog, self).__init__(parent)
# Some default window title and text
self.setWindowTitle('Hexrd')
self.setLabelText('Pl... |
import dask.array as da
from dask.array.svg import draw_sizes
import xml.etree.ElementTree
import pytest
def parses(text):
cleaned = text.replace("→", "") # xml doesn't like righarrow character
assert xml.etree.ElementTree.fromstring(cleaned) is not None # parses cleanly
def test_basic():
parses(... |
import React, { useEffect, useState } from 'react';
import logo from './logo.svg';
import 'fontsource-roboto';
import './App.css';
import { fetchDogs } from './services/dogs';
import DogCard from './components/DogCard';
function App() {
// Declare new state variables: isLoading, dogs
const [isLoading, setIsLoading... |
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license.
"""
from django.utils.decorators import method_decorator
from drf_yasg.utils import swagger_auto_schema
from drf_yasg import openapi
from io_storages.a... |
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \L\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* ... |
from setuptools import setup, find_packages
from codecs import open
from os import path
__author__ = 'Giulio Rossetti'
__license__ = "BSD-2-Clause"
__email__ = "giulio.rossetti@gmail.com"
def get_requirements(remove_links=True):
"""
lists the requirements to install.
"""
try:
with open('requ... |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/lbleier/cFS/tools/cFS-GroundSystem/MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
d... |
# 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... |
/* @flow */
import React from 'react';
import { Switch, Route } from 'react-router-dom';
import ContainerizedRoute from './routes/ContainerizedRoute';
import ProtectedRoute from './routes/ProtectedRoute';
import UserPage from '../profile/UserPage';
import Auth from '../login/Auth';
import AlbumPage from '../album/Alb... |
'use strict';
const Joi = require('joi');
const { get } = require('lodash');
const { formFactory, fields } = require('shared/lib/forms');
const session = require('../lib/session');
const { addressSources } = require('shared/lib/constants');
const { postcodeSchema } = require('../lib/postcode-validator');
const isFac... |
from HDPython.ast.ast_classes.ast_base import v_ast_base, add_class,gIndent
import HDPython.hdl_converter as hdl
from HDPython.base import *
from HDPython.v_enum import *
from HDPython.to_v_object import *
from HDPython.v_symbol import *
class v_for(v_ast_base):
range_counter = 0
def __init__(self,arg,b... |
#include<stdio.h>
#include<stdlib.h>
//Node represents a term of the Polynomial
struct Node
{
int coefficient;// stores the coeffcient
int exponent ; //exponent
struct Node * link;//link to new Node
} typedef Node;
//Polynomial represents a polynomial , contains the pointer to the first Node of the pol... |
//
// UserDetailTableViewController.h
// Auth
//
// Created by Sun Jin on 11/27/15.
//
//
#import <UIKit/UIKit.h>
@interface UserDetailTableViewController : UITableViewController
@end
|
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'watchhood.settings')
try:
from django.core.management import execute_from_command_line
except Im... |
# coding: utf8
from __future__ import unicode_literals
from ...attrs import LIKE_NUM
_num_words = [
"զրո",
"մեկ",
"երկու",
"երեք",
"չորս",
"հինգ",
"վեց",
"յոթ",
"ութ",
"ինը",
"տասը",
"տասնմեկ",
"տասներկու",
"տասներեք",
"տասնչորս",
"տասնհինգ",
"տասնվ... |
#!/usr/bin/env python
import sys
try:
import cPickle as pickle
except ImportError:
import pickle as pickle
import codecs
import six
## CMapConverter
##
class CMapConverter(object):
def __init__(self, enc2codec={}):
self.enc2codec = enc2codec
self.code2cid = {} # {'cmapname': ...}
... |
# Copyright 2012 by Jeff Hussmann. All rights reserved.
# Revisions copyright 2013-2016 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""Tests for SffIO module... |
// dear imgui, v1.60 WIP
// (internals)
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
// Set:
// #define IMGUI_DEFINE_MATH_OPERATORS
// To implement maths operators for ImVec2 (disabled by default to not collide with using IM_VEC2_... |
const exposes = require('../lib/exposes');
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const tz = require('../converters/toZigbee');
const globalStore = require('../lib/store');
const constants = require('../lib/constants');
const reporting = require('../lib/reporti... |
/*! @license Firebase v4.0.0
Build: rev-c054dab
Terms: https://firebase.google.com/terms/ */
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { re... |
"use strict";
const express = require('express');
const app = express();
const cors = require('cors');
const notFound = require('./errorHandler/404');
const errorHandler = require('./errorHandler/404');
const signup = require('./auth/Router/signup');
const signin = require('./auth/Router/signin');
const secret = requir... |
/**
* Isomorphic CSS style loader for Webpack
*
* Copyright © 2015-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
const prefix = 's';
const inserted = {};
// Base64 encoding and decodi... |
import logging
import sys
from ws_status_to_influxdb.common.logfilters import SingleLevelFilter
from ws_status_to_influxdb.config import config
log = logging.getLogger(__name__)
log.setLevel(config.logging_level)
formatter = logging.Formatter('%(asctime)s - %(levelname)s: %(message)s')
general_handler = logging.Stre... |
const fs = require('fs');
const helpers = require('./global-setup');
const path = require('path');
const { expect } = require('chai');
const temp = require('temp').track();
const describe = global.describe;
const it = global.it;
const before = global.before;
const after = global.after;
describe('window commands', fun... |
import six
if six.PY3:
import unittest
else:
import unittest2 as unittest
from datetime import datetime
from datetime import date
from twilio.rest.resources import parse_date
from twilio.rest.resources import transform_params
from twilio.rest.resources import convert_keys
from twilio.rest.resources import conve... |
from __future__ import absolute_import
import struct
from collections import namedtuple
from . import _enum_base
ofp_oxm_class = type("ofp_oxm_class", (_enum_base,), {
"prefix": "OFPXMC",
"numbers": {
"NXM_0": 0x0000,
"NXM_1": 0x0001,
"OPENFLOW_BASIC": 0x8000,
"EXPERIMENTER": 0... |
import mimetypes
import StringIO
import unittest
import sys
from test import test_support
# Tell it we don't know about external files:
mimetypes.knownfiles = []
mimetypes.inited = False
mimetypes._default_mime_types()
class MimeTypesTestCase(unittest.TestCase):
def setUp(self):
self.db = mimetypes.Mime... |
# ============================================================================
# FILE: default.py
# AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com>
# License: MIT license
# ============================================================================
import re
import typing
from denite.util import echo, error, c... |
# python
import os
# 3rd party
import pytest
import unittest
# label_studio
from label_studio import blueprint as server
from label_studio.tests.base import goc_project
from label_studio.tests.e2e_actions import (
prepare,
action_config, action_config_test,
action_import, action_import_test,
action_ge... |
# coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class GitHubPullRequ... |
from boto.ec2 import EC2Connection, get_region
import logging
import subprocess
import urllib2
from mako.template import Template
__version__ = '0.4.1'
def get_self_instance_id():
'''
Get this instance's id.
'''
logging.debug('get_self_instance_id()')
response = urllib2.urlopen('http://169.254.169... |
"""Verify properties of type arguments, like 'int' in C[int] being valid.
This must happen after semantic analysis since there can be placeholder
types until the end of semantic analysis, and these break various type
operations, including subtype checks.
"""
from typing import List, Optional, Set
from mypy.nodes imp... |
'''
MNRAS parsing example
'''
from pyingest.parsers.oup import OUPJATSParser
from pyingest.serializers.classic import Tagged
from pyingest.serializers.refwriter import ReferenceWriter
import argparse
outfile = 'mnras.tag'
test_files = ['/proj/ads/abstracts/data/MNRAS/504.1/TagTextFiles/stab770.xml',
'/p... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var quotes_component_1 = require("./quotes.component");
var Observable_1 = require("rxjs/Observable");
var mock_app_store_1 = require("../../../store/spec-helpers/mock-app.store");
function main() {
describe('Quotes Component', function ()... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: Matt Flood
import os, random, sys, time, urlparse
from selenium import webdriver
from bs4 import BeautifulSoup
from random import shuffle
from os.path import join, dirname
from dotenv import load_dotenv
dotenv_path = join(dirname(__file__), '.env')
load_dotenv(dot... |
from rest_framework import permissions, \
viewsets, generics, status
from rest_framework.response import Response
from rest_framework.views import APIView
from .serializers import PostSerializer, CommentSerializer, AuthorSerializer
from core.models import Post, Comment
from .permissions import IsOwnerOrReadOnly, Is... |
import importlib
__author__ = "James \"clug\" <clug@clug.xyz>"
__version__ = "1.0.0"
__all__ = ["_datetime", "_string", "collection", "number"]
from . import collection, _datetime as datetime, number, _string as string
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('recipes', '0005_auto_20150510_0200'),
]
operations = [
migrations.AlterField(
model_name='ingredient',
... |
#
# 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, software
# distributed under ... |