text stringlengths 3 1.05M |
|---|
/*
* This header is generated by classdump-dyld 1.5
* on Wednesday, April 14, 2021 at 2:35:53 PM Mountain Standard Time
* Operating System: Version 14.4 (Build 18K802)
* Image Source: /System/Library/PrivateFrameworks/SharingUI.... |
"""
Test suite.
- Do not put 'mailer' in INSTALLED_APPS, it disturbs the emails counting.
- Make sure these templates are accessible:
registration/login.html
base.html
404.html
To have a fast test session, set a minimal configuration as:
DATABASES = {
'default': {
'ENGINE': 'django.db.backend... |
import unittest
from PyInstaller.lib.modulegraph import modulegraph
import pkg_resources
import os
import imp
import sys
import shutil
import warnings
from altgraph import Graph
from PyInstaller.compat import is_win
import textwrap
from lxml import etree
import pickle
try:
bytes
except NameError:
bytes = str
... |
/*
* NumberArray.h
*
* Created on: Nov 16, 2012
* Author: Mitchell Wills
*/
#ifndef NUMBERARRAY_H_
#define NUMBERARRAY_H_
#include "networktables2/type/ArrayData.h"
#include "networktables2/type/ArrayEntryType.h"
/**
*
* @author Mitchell
*/
class NumberArray : public ArrayData{
public:
static const T... |
# Copyright 2016-2021 The Matrix.org Foundation C.I.C.
#
# 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... |
import {
always,
} from '@roseys/futils'
import {
isResponsiveType,
isTruthy,
} from './utils'
import { responsiveReducer } from './responsiveHelpers'
export const responsive = (toMq, defaultBreakPoints) => ({
value,
defaultValue,
cssProp,
transformer = always,
breakpoints = defaultBreakPoints
}... |
/**
* Copyright 2016 Telerik AD
* ... |
const Promise = require('bluebird');
const Queue = require('bee-queue');
const cassandra = require('cassandra-driver');
const cst = require('../lib/cassandra.js');
const fs = require('fs');
const logger = require('wraplog')('outbound-notifier');
const outboundNotify = require('../lib/outboundNotify.js');
const pmxProbe... |
from django.db import models
from django.contrib.auth import get_user_model
from django.conf import settings
def get_custom_user():
"""Generates as instance of user
Returns:
user -- an instance of the user
"""
return get_user_model().objects.get_or_create(username='deleted')[0]
class Class... |
import sys
class Node(object):
def __init__(self, data = None):
self.data = data
self.children = [None, None]
self.parent = None
class BinaryTree(object):
def __init__(self):
self.root = None
def _insert_node(self, root, data):
if root is None:
root = N... |
/*
Copyright (c) 1999 - 2010, Vodafone Group Services Ltd
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list... |
"""Shared functionality for model classes."""
from typing import Any
from sqlalchemy.ext.declarative import declarative_base
# mypy doesn't play nice with dynamic base classes, so we just call it Any
Base: Any = declarative_base()
class ValidationError(Exception):
"""Error for failed validation checks."""
|
'use strict';
var fs = require('fs');
var winston = require('winston');
winston.add(winston.transports.File, { filename: 'benchmarks/benchmarks.log' });
winston.log('info', 'Running speed tests on levenshtein distance calculations.');
var wordListPath = require('word-list');
var shuffle = require('knuth-shuffle').knut... |
import '../styles/Sign.css';
let base64 = require('base-64');
// eslint-disable-next-line import/no-anonymous-default-export
export default () => {
const state = {
username: "",
password: ""
}
const setUsername = (event) => {
state.username = event.target.value;
}
const se... |
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#ifndef __IPIFCONS_H__
#define __IPIFCONS_H__
#ifdef __cplusplus
extern "C" {
#endif
typedef ULONG IFT... |
# 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... |
class Context(dict):
def __getattr__(self,item):
try:
return self[item]
except KeyError:
raise AttributeError('Attribute {} Not Found'.format(item))
def __setattr__(self,key,value):
self[key] = value
class NestedContext(Context):
def __init__(self,globalconte... |
from django.views.generic import RedirectView
from django.urls import reverse_lazy
from ietf.mailtrigger import views
from ietf.utils.urls import url
urlpatterns = [
url(r'^$', RedirectView.as_view(url=reverse_lazy('ietf.mailtrigger.views.show_triggers'), permanent=True)),
url(r'^name/$', views.show_triggers)... |
default_app_config = "wagtail_legacy_hallo_editor.apps.WagtailLegacyHalloEditorAppConfig"
VERSION = (0, 1, 0)
__version__ = ".".join(map(str, VERSION))
|
import {
getRandomEntry,
getRandomNoun,
getRandomNounCapitalized,
getRandomVerb,
getRandomVerbCapitalized,
getRandomLogLine,
} from "./helpers";
export default class PHP {
static getRandomNamespace() {
return `namespace ${getRandomNounCapitalized()}\\${getRandomNounCapitalized()};`;
}
static get... |
/* Copyright (c) 2016 Richard Rodger, MIT License */
'use strict'
const Lab = require('@hapi/lab')
const Code = require('@hapi/code')
var lab = (exports.lab = Lab.script())
var describe = lab.describe
var expect = Code.expect
var Shared = require('./shared')
var it = Shared.make_it(lab)
var Seneca = require('..')
... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 NEC Corporation. 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.or... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
var Icon = require('../Icon-399ca71f.js');
var React = require... |
import os
import shutil
from glob import glob
from egcg_core.exceptions import EGCGError
from egcg_core.app_logging import logging_default as log_cfg
app_logger = log_cfg.get_logger(__name__)
def check_if_nested(data):
"""Check whether a data structure contains lists/dicts."""
if isinstance(data, dict):
... |
import abc
class AWikiApi(abc.ABC):
"""
Abstract Class for Wikipedia APIs
"""
def load(self):
"""
Does whatever loading the API need to do. This method is expected to potentially take some time.
By default does nothing, but can be overridden if the subclass needs to do some se... |
module.exports={A:{A:{"1":"A B","2":"I D F E iB"},B:{"1":"C O H Q J K L V y M WB S"},C:{"1":"0 1 2 3 4 5 6 7 8 9 m n o p q r s t u v w x P z AB LB CB JB EB FB GB HB DB U N T MB NB OB PB QB RB SB TB UB V y M","2":"sB KB pB hB","33":"Q J K L X Y Z a b c d e f g h i j k l","164":"G W I D F E A B C O H"},D:{"1":"0 1 2 3 4 ... |
import OpenGL.GL as GL
import OpenGL.GLU as GLU
import OpenGL.GLUT as GLUT
from pydart2.gui.opengl.renderer import Renderer
from pydart2.gui.trackball import Trackball
class OpenGLScene(object):
def __init__(self, width, height, window=None):
self.width = width
self.height = height
self.w... |
import requests
from xml.dom import minidom
from ..habanero_utils import make_ua
def citation_count(doi, url = "http://www.crossref.org/openurl/",
key = "cboettig@ropensci.org", **kwargs):
'''
Get a citation count with a DOI
:param doi: [String] DOI, digital object identifier
:param url: [String] ... |
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.manip=e()}}(function(){var define,module,exports;retu... |
import _plotly_utils.basevalidators
class TicklabelpositionValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="ticklabelposition", parent_name="cone.colorbar", **kwargs
):
super(TicklabelpositionValidator, self).__init__(
plotly_name=plotly... |
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
def hidden_init(layer):
fan_in = layer.weight.data.size()[0]
lim = 1. / np.sqrt(fan_in)
return (-lim, lim)
class Actor(nn.Module):
"""Actor (Policy) Model."""
def __init__(self, state_size, action_size, seed, f... |
/**
* Copyright (C) Mellanox Technologies Ltd. 2001-2013. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2014. ALL RIGHTS RESERVED.
* See file LICENSE for terms.
*/
#ifndef UCS_MEMTRACK_H_
#define UCS_MEMTRACK_H_
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <ucs/sys/compiler_def.h>
#include <s... |
'''
golden cross buy; dead cross sell
'''
import os
import numpy as np
import pandas as pd
import pytz
from datetime import datetime, timezone
import multiprocessing
import quanttrader as qt
import matplotlib.pyplot as plt
import empyrical as ep
import pyfolio as pf
import pickle
# set browser full width
from IPython.c... |
from ..Model.ClasificacionModel import ClasificacionSchema
from ..Model.ClasificacionModel import ClasificacionSchema
from flask import Blueprint , Response , jsonify ,current_app as app
from flask.globals import request
from ..Logic import clasificacionService
from marshmallow import Schema, fields, ValidationError
fr... |
/*
* Copyright (c) AXA Group Operations Spain S.A.
*
* 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,... |
# coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
from ... |
import gym
import random
import numpy as np
from gym_env.wrapper import NormalizedActionWrapper
from gym.spaces import Box
class MultiAgentMuJoCo(object):
"""Multiagent MuJoCo environment that converts single agent MuJoCo env's into
multiagent settins
Args:
args (argparse): Python argparse th... |
const { defineModel } = require('mythix');
const uuid = require('uuid');
const {
hashUserToken,
} = require('../utils');
module.exports = defineModel('User', ({ Parent, Type }) => {
return class User extends Parent {
static fields = {
id: {
type: Type.UUID,
default... |
'use strict';
const numbers = [7, 10, 1, 5, 2];
numbers.forEach((item, i, arr) => {
console.log(i, arr, item);
});
[7, 10, 1].forEach((x) => {
console.log(x);
});
[7, 10, 1].forEach((x) => console.log(x));
const log = (x) => console.log(x);
[7, 10, 1].forEach(log);
|
#include <config.h>
#include <breakr.h>
#include <pthread.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <search.h>
void hdestroy(void)
{
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static void (*func) (void) = NULL;
breakr_action(__FUNCTION__);
if (func == NULL)
{
LOCK(&lock);
if (func =... |
# configuring PYTHONPATH (By default, this will add the src and lib directory for each of your dependencies to your PYTHONPATH)
import roslib; roslib.load_manifest('saap_pkg')
# import client library
import rospy
# import messages
import auction_msgs.msg
# import services
import auction_srvs.srv
# import auxiliar l... |
import torch
import tensorrt as trt
import atexit
def torch_dtype_to_trt(dtype):
if dtype == torch.int8:
return trt.int8
elif dtype == torch.int32:
return trt.int32
elif dtype == torch.float16:
return trt.float16
elif dtype == torch.float32:
return trt.float32
else:... |
"""
Tests for the course viewset
"""
from unittest import mock
from django.db import connection
from django.test import TestCase
from richie.apps.core.factories import UserFactory
from richie.apps.courses.factories import (
CategoryFactory,
CourseFactory,
OrganizationFactory,
PersonFactory,
)
from ric... |
import base64
import hashlib
from datetime import datetime
from pathlib import Path
from urllib.parse import urlencode
import pytz
from deluge_client import DelugeRPCClient, LocalDelugeRPCClient
from deluge_client.client import DelugeClientException
from ..baseclient import BaseClient
from ..bencode import bencode
fr... |
import redis
from reddit_dashboard.settings import REDIS_DATABASE, REDIS_HOST, REDIS_PORT
REDIS_CONNECTION = redis.Redis(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DATABASE)
class RedisConsts(object):
DISCORD_PUSH = 'discord:push'
SERVER_PUSH = 'django:model'
|
"""Testing for Linear regression """
# Authors: Daniel Emaasit <daniel.emaasit@gmail.com>
#
# License: BSD 3 clause
import pytest
import numpy.testing as npt
import pandas.testing as pdt
import shutil
import tempfile
import numpy as np
from pymc3 import summary
from sklearn.linear_model import LinearRegression as sk... |
const path = require(`path`)
require("dotenv").config({
path: `.env`,
})
module.exports = {
siteMetadata: {
title: `Summer Lights`,
description: `Accesorios made in Spain`,
author: `@summerlights`,
},
/* Your site config here */
plugins: [
`gatsby-plugin-postcss`,
{
resolve: `gatsby... |
from django.contrib import admin
from .models import *
admin.site.register(Algorithm)
admin.site.register(Record) |
import re
import sys
import timeit
from collections import Counter
from textwrap import wrap
from django.conf import settings
from django.db import connections
from django.utils import termcolors
from . qc_settings import QC_SETTINGS
try:
from django.utils.deprecation import MiddlewareMixin
except ImportError:
... |
import base64
import json
from flask import Flask, jsonify, request
app = Flask(__name__)
VALIDATION_OK_MSG = 'Validation succeeded'
VALIDATION_ERROR_MSG = 'Required label env is not set or its value is invalid'
@app.route('/validate', methods=['POST'])
def validate():
try:
req = request.get_json()
... |
window.onload=function(){
top1();
setPro();
setCity(document.getElementById("pro").value);
setArea();
cityb();
cityc();
a();
b();
c();
joba();
jobb();
ja();
jb();
anniu();
}
function top1(){
document.getElementById("top1").onclick=function(){
window.history.go(-1);
}
}
var... |
#!/usr/bin/python
"""Script that forms part of pwb_tests."""
#
# (C) Pywikibot team, 2015-2020
#
# Distributed under the terms of the MIT license.
#
import os
import sys
from pywikibot.tools import first_upper
def main():
"""Print environment variables."""
_pwb_dir = os.path.abspath(os.path.join(
os.... |
/**
*
* @authors Chaoyang Zhu (zcy_2013@163.com)
* @date 2017-02-21 10:00:00
* @tel 15903620494
*/
define([],function(){
$(".user_setting .exit").click(function(){
layer.confirm("确定退出登录?",{
title : '提示',
move : false
},function(index){
// var loadIngTips = setTimeout(function(){
// layer.m... |
'use strict';
var stub = require('./stub');
var logger = require('../../logger');
var ResultStore = require('../../result_store');
var connection = exports;
function Connection(client, server) {
this.client = client;
this.server = server;
this.relaying = false;
this.notes = {};
this.results = n... |
# Generated by Django 2.1.10 on 2020-04-03 12:04
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0004_recipe'),
]
operations = [
migrations.RenameField(
model_name='recipe',
old_name='ingredinents',
n... |
//
// DXUpdateActViewReallyModel.h
// DXQ
//
// Created by rason on 8/13/15.
// Copyright (c) 2015 rason. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface DXUpdateActViewReallyModel : NSObject
@property (nonatomic, assign) NSInteger LCLICK;
@property (nonatomic, copy) NSString *LTIME;
@prop... |
export default class Film {
constructor(url) {
this.url = url;
}
} |
/* zip.c -- IO on .zip files using zlib
Version 1.01e, February 12th, 2005
27 Dec 2004 Rolf Kalbermatter
Modification to zipOpen2 to support globalComment retrieval.
Copyright (C) 1998-2005 Gilles Vollant
Read zip.h for more info
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010-2014 Facebook, Inc. (http://www.facebook.com) |
+---------... |
/* */
"format cjs";
export class CssAnimationOptions {
constructor() {
/** classes to be added to the element */
this.classesToAdd = [];
/** classes to be removed from the element */
this.classesToRemove = [];
/** classes to be added for the duration of the animation */
... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "lazada_erpnext_connector"
app_title = "Lazada ERPNext Connector"
app_publisher = "Raaj Tailor"
app_description = "Lazada Ecommerce Platform Integration witH E"
app_icon = "octicon octicon-file-directory... |
from .ReferenceMethod import ReferenceMethod
from .SimpleContent import (
PreparationEndDate,
PreparationStartDate,
SubstanceDilutionFactor
)
from .WQXTime import WQXTime
from yattag import Doc
class LabSamplePreparation:
"""Describes Lab Sample Preparation procedures which may alter the original state of the ... |
#ifndef THORS_SERIALIZER_TWITTER_H
#define THORS_SERIALIZER_TWITTER_H
#include "ThorSerialize/Traits.h"
#include "ThorSerialize/SerUtil.h"
#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <memory>
using IntVec = std::vector<int>;
template<typename T>
using Opt = std::unique_ptr<T... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torchvision.models as models
from torch.nn.modules.loss import _Loss
def MSE(para):
"""
L2 loss
"""
return nn.MSELoss()
def L1(para):
"""
L1 loss
"""
return nn.L1L... |
# This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from sqlalchemy.orm import joinedload, noload
from indico.core.db import db
from indico.modules.events.ti... |
import functools
from datetime import date, datetime
from typing import List, Union
import pandas as pd
from logzero import logger
from sqlalchemy import and_, desc, asc, func, String, DateTime, cast
from sqlalchemy.engine.default import DefaultDialect
from sqlalchemy.orm import Session, aliased
from sqlalchemy.sql.sql... |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
export default from './TooltipDefinition';
|
/*
* @author Niklas von Hertzen <niklas at hertzen.com>
* @created 20.7.2012
* @website http://hertzen.com
*/
PHP.Parser.prototype.Node_Expr_Variable = function( a ) {
return {
type: "Node_Expr_Variable",
name: arguments[ 0 ],
attributes: arguments[ 1 ]
};
};
PHP.Parser.prototype.Nod... |
from django.template.loader import render_to_string
from django.template.defaultfilters import striptags
from django.core.mail import EmailMultiAlternatives
from django.conf import settings
def send_mail_template(
subject
, template_name
, context
, recipient_list
, from_email=settings.DEFAULT_FROM_EMAIL
,... |
# Module to run tests on surveys
# Most of these are *not* done with Travis yet
# TEST_UNICODE_LITERALS
import astropy
import pytest
import os, warnings
from astropy.table import Table
from astropy.coordinates import SkyCoord
from astropy import units
from astropy.io.fits.hdu.image import PrimaryHDU
from frb.survey... |
/*
* Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. 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
... |
'use strict';
var fs = require('fs');
var path = require('path');
var expect = require('chai').expect;
var storage = require('../lib/storage.file');
storage.path = path.join(__dirname, '../feeds');
function getFile(feedname) {
try {
return JSON.parse(fs.readFileSync(path.join(storage.path, feedname), ... |
/*
Template Name: Color Admin - Responsive Admin Dashboard Template build with Twitter Bootstrap 4
Version: 4.3.0
Author: Sean Ngu
Website: http://www.seantheme.com/color-admin-v4.3/admin/
*/Chart.defaults.global.defaultFontColor=COLOR_BLACK,Chart.defaults.global.defaultFontFamily=FONT_FAMILY,Chart.defaults.global.defa... |
const discord = require('discord.js');
const error = require('../utils/embed.js')
module.exports.run = async (miya, message, query) => {
let filter = (reaction, user) => (reaction.emoji.name === '❌' || reaction.emoji.name === '⭕') && user.id === message.author.id
const text = query.message.slice(query.com... |
import os
import argparse
import tensorflow as tf
from baselines.ppo2 import ppo2
from baselines.common.models import build_impala_cnn
from baselines.common.mpi_util import setup_mpi_gpus
from baselines.common.vec_env import VecExtractDictObs, VecMonitor, VecNormalize
from baselines import logger
from procgen import P... |
import { delayMounts, pageState, _getApp } from './utils';
export function onBeforeRender(fiber) {
let type = fiber.type;
let instance = fiber.stateNode;
if (type.reactInstances) {
let uuid = fiber.props['data-instance-uid'] || null;
if (!instance.instanceUid) {
instance.instance... |
from django_filters import rest_framework as filters
from rest_framework import viewsets, mixins
from rest_framework.permissions import AllowAny
from .models import User
from .permissions import IsUserOrReadOnly
from .serializers import CreateUserSerializer, UserSerializer
class UserViewSet(mixins.RetrieveModelMixin,... |
// const { spawn } = require('child_process');
// const childPython = spawn('python', ['matching.py']);
// childPython.stdout.on('data', (data) => {
// console.log(`stdout: ${data}`);
// });
// childPython.stderr.on('data', (data) => {
// console.error(`stderr: ${data}`);
// });
// childPython.on('close', ... |
import React from 'react';
import {
View,
Text,
StyleSheet
} from 'react-native';
function VerticalSeparator(props) {
return(
<View style={[
styles.separator,
{
borderTopColor: (props.color) ? props.color : '#eaeaea'
}
]}>
</View>
)
}
const styles = StyleSheet.create({
separator: {
... |
(function($) {
'use strict';
jQuery(document).on('ready', function(){
/*PRELOADER JS*/
$(window).on('load', function() {
$('.preloader').fadeOut();
$('.status-mes').delay(350).fadeOut('slow');
});
/*END PRELOADER JS*/
/*DROPDOWN JS*/
/*Start Search JS*/
window.REMODAL_GLOBALS = {
NAMESPACE:... |
const passport = require('passport');
const LocalStrategy = require('passport-local').Strategy;
const knex = require('../database/config');
const db = require('../database/utils')(knex);
const bcrypt = require('bcryptjs');
require('dotenv').config();
function setup() {
const strategy = new LocalStrategy((username, p... |
import scrapy
class DocSectionItem(scrapy.Item):
title = scrapy.Field()
company = scrapy.Field()
location = scrapy.Field()
class MySpider(scrapy.Spider):
name = 'myspider'
start_urls = ['https://stackoverflow.com/jobs?med=site-ui&ref=jobs-tab']
def parse(self, response):
for a_el in r... |
import Users from '../store/users/reducer'
import createLogger from 'redux-logger'
import thunkMiddleware from 'redux-thunk'
import apiMiddleware from '../store/middlewares/api'
import {createStore, applyMiddleware, combineReducers} from 'redux'
let Middlewares
// if production or load by server
if(process.env.NODE_... |
/**
* @author mr.doob / http://mrdoob.com/
* @author alteredq / http://alteredqualia.com/
*/
THREE.Fog = function ( hex, near, far ) {
this.color = new THREE.Color( hex );
this.near = near || 1;
this.far = far || 1000;
};
|
import yaml
import os
import lenstronomy
# in case the xdg library is installed, the import statement with pyxdg can raise an error
# to avoid it, we draw back to the ~/.config directory in case this import fails.
# TODO come up with more permanent solution of path to configuration directory
try:
from xdg.BaseDir... |
'use strict';
var raf = require('raf');
var test = require('tape');
var document = require('global/document');
var event = require('synthetic-dom-events');
if (typeof window === 'undefined') {
require('./lib/load-hook.js');
}
var embedComponent = require('./lib/embed-component.js');
var bmiCounter = require('../... |
#ifndef _AUDIOSTREAMREADER
#define _AUDIOSTREAMREADER
#include <stdint.h>
#define AUDIOREADER_MAXCHUNK 128
#define AUDIOREADER_MAXBYTESPERMESSAGE (AUDIOREADER_MAXCHUNK + 4 + 4 + 4)
#define AUDIOREADER_INTERRUPTMS 0.05
#define AUDIOREADER_INTERRUPTRATE ((int)((float)1000.0/(float)AUDIOREADER_INTERRUPTMS))
#... |
# The MIT License (MIT)
#
# Copyright (c) 2019 Limor Fried for Adafruit Industries, Kevin J. Walters
#
# 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 l... |
/// Copyright (c) 2009 Microsoft Corporation
///
/// Redistribution and use in source and binary forms, with or without modification, are permitted provided
/// that the following conditions are met:
/// * Redistributions of source code must retain the above copyright notice, this list of conditions and
/// ... |
from app.main import app
from fastapi.testclient import TestClient
client = TestClient(app)
def test_read_main():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"msg": "Hello World"}
|
from pathlib import Path
from typing import Dict
def public_ssl_paths(path: Path, config: Dict):
return (
path / config["ssl"]["public_crt"],
path / config["ssl"]["public_key"],
)
def private_ssl_paths(path: Path, config: Dict):
return (
path / config["ssl"]["private_crt"],
... |
Ext.define('SCM.view.SupplierStockAdjust.EditUI', {
extend : 'Ext.window.Window',
requires : ['SCM.extend.toolbar.SaveToolbar', 'SCM.extend.toolbar.GridEditToolbar', 'SCM.ux.combobox.ComboGrid', 'SCM.ux.grid.ComboColumn'],
alias : 'widget.supplierstockadjustedit',
height : 550,
width : 815,
titl... |
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: {
app: './src/index.js',
},
devtool: 'inline-source-map',
devServer... |
/*
+----------------------------------------------------------------------+
| HipHop for PHP |
+----------------------------------------------------------------------+
| Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |
| Copyrigh... |
const CARDS = [
{
id: 1,
name: 'javascript',
img: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/74196/js-logo.png'
},
{
id: 2,
name: 'css3',
img: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/74196/css3-logo.png'
},
{
id: 3,
name: 'html5',
img: 'https://s3-us-west-2.amazona... |
import Deselect from './Deselect'
import OpenIndicator from './OpenIndicator'
export default {
Deselect,
OpenIndicator,
}
|
var EE = require('events').EventEmitter;
var inherits = require('inherits');
var SSEStream = require('../lib/stream/sse');
var resolveData = require('./data').resolveData;
function EventStreamEmitter() {
}
inherits(EventStreamEmitter, EE);
EventStreamEmitter.prototype.handleEventStream = function(req, res, opts) {
... |
const got = require('@/utils/got');
const cheerio = require('cheerio');
const categoryList = {
'combined-print-and-e-book-nonfiction': '非虚构类 - 综合',
'hardcover-nonfiction': '非虚构类 - 精装本',
'paperback-nonfiction': '非虚构类 - 平装本',
'advice-how-to-and-miscellaneous': '工具类',
'combined-print-and-e-book-fictio... |
/*
Mocha integration test from: hreview-aggregate.html
The test was built on Thu Sep 19 2013 15:09:18 GMT+0100 (BST)
*/
var assert = chai.assert;
describe('Minimum properties (hreview-aggregate parsing test)', function() {
var htmlFragment = "\n<p class=\"hreview-aggregate\">\n <span class=\"item\">\n... |
export function LineChart(canvasid, chartInfo) {
console.log(chartInfo);
var lineChart = new Chart(canvasid, {
type: "line",
data: {
labels: chartInfo.xAxis.values,
datasets: [{
lineTension: 0,
label: chartInfo.yAxis[0].title,
... |