text stringlengths 3 1.05M |
|---|
import fs from 'fs';
import * as utils from './utils';
import stateDoc from './utils/stateDoc';
export const parse = function(file) {
const source = fs.readFileSync(file, { encoding: 'utf-8' });
if (source === '') {
throw new Error('The document is empty');
}
stateDoc.file = file;
stateDoc.saveComponent(source,... |
"""BoPress URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... |
/*
* Created on Tue Nov 10 2020
*
* The MIT License (MIT)
* Copyright (c) 2020 André Antakli, Alex Grethen (German Research Center for Artificial Intelligence, DFKI).
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the "Softw... |
'use strict';
const {logoSmall, screenshot} = require('./assets');
class InstallEndElement extends HTMLElement {
constructor(name) {
super();
this.name = name;
this.innerHTML = `
<div class="welcome-to-kite">
<div class="welcome-title">
<h3>Welcome to Kite!</h3>
<div class="ti... |
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 25 12:18:37 2016
@author: virati
This script will try to import raw hdEEG data in a continuous way, preprocess it, and generate the figures needed for "Aim 2" - Mapping Cortical Responses/Signatures to Stimulation Parameters
THIS IS AN UPDATED FILE NOW SPECIFIC TO 906 unt... |
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/*************************************************************
*
* MathJax/extensions/fast-preview.js
*
* Implements a fast preview using the PreviewHTML output jax
* and then a slower update to the mo... |
# cfg80211 P2P Device
# Copyright (c) 2013-2015, Jouni Malinen <j@w1.fi>
#
# This software may be distributed under the terms of the BSD license.
# See README for more details.
import logging
logger = logging.getLogger()
import time
from wpasupplicant import WpaSupplicant
from p2p_utils import *
from test_nfc_p2p imp... |
// Copyright 2017 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.
var LineChartTest = LineChartTest || {};
LineChartTest.Menu = function() {
test('Menu integration test', function() {
const menu = new LineChart.Me... |
function initializevbox1288931495129() {
vbox1288931495129 = new kony.ui.Box({
"enableCache": false,
"id": "vbox1288931495129",
"isVisible": true,
"orientation": constants.BOX_LAYOUT_VERTICAL,
"position": constants.BOX_POSITION_AS_NORMAL
}, {
"containerWeight": 10... |
const axios = require("axios").default;
axios.defaults.baseURL = "https://api.illyasviel.pw/api/";
axios.defaults.headers = {
"Content-Type": "application/json",
};
const AxiosService = async (url) => {
try {
const response = await axios.get(url);
if (response.status === 200) {
return Promise.resolv... |
var __extends=this&&this.__extends||(function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)i.hasOwnProperty(n)&&(e[n]=i[n])};return function(i,n){function t(){this.constructor=i}e(i,n),i.prototype=null===n?Object.create(n):(t.prototype=n.proto... |
// Global vars
var pymChild = null;
var isMobile = false;
var isPromo = false;
var skipLabels = [ 'label', 'values', 'offset', 'chart' ];
var charts = [];
/*
* Initialize the graphic.
*/
var onWindowLoaded = function() {
if (d3.select('body').classed('promo')) {
isPromo = true;
}
if (Modernizr.svg... |
// utils for posts
import { formatDistance, differenceInCalendarDays } from 'date-fns'
const fixedDate = date => (typeof date === 'string' ? new Date(date) : date)
export const isNewPost = date =>
differenceInCalendarDays(new Date(), fixedDate(date)) < 14
export const formatDate = date => {
const days = formatDi... |
'use strict';
var React = require('react');
var mui = require('material-ui');
var SvgIcon = mui.SvgIcon;
var DeviceSignalCellular4Bar = React.createClass({
displayName: 'DeviceSignalCellular4Bar',
render: function render() {
return React.createElement(
SvgIcon,
this.props,
React.createEleme... |
(()=>{
var management = false;
return {
data(){
return{}
},
methods:{
showIconUpdate(ele){
let id = bbn.fn.search(this.source.listUpdate, 'title', ele.name);
if ( id !== -1 ){
return `<div class='bbn-c'><i title='` + this.source.listUpdate[id]['latest'] + `' class=... |
$(function() {
UnableToPurchase();
$('.form-control').click(function() {
var hashtable = {};
hashtable['Select'] = '0';
hashtable['Vanilla Ice Cream with Caramel Ripple and Almonds'] = '5';
hashtable['Vanilla Ice Cream with Cherry Dark Chocolate Ice Cream'] = '7';
hasht... |
chrome.runtime.onMessage.addListener(receiveMessage);
chrome.runtime.onInstalled.addListener(init);
chrome.runtime.onStartup.addListener(init);
chrome.alarms.onAlarm.addListener(onAlarm);
var userData = {};
var themeSettings;
function init(){
chrome.alarms.create("refresh",{periodInMinutes:2});
refreshMessageCount();... |
const log = require("./login.js");
test('Successful login', () => {
expect(log("admin","admin")).toBeTruthy();
});
test('Unsuccessful login - nothing is correct', () =>{
expect(log("pass","word")).toBeFalsy();
});
test('Unsuccessful login - only username is correct', () =>{
expect(log("admin","word")).toBeFals... |
Package.describe({
name: "rocketchat:accounts-rocketchat",
summary: "Login service for Rocket.Chat accounts",
version: "1.0.0"
});
Package.onUse(function (api) {
api.use(['underscore', 'random']);
api.use('oauth2', ['client', 'server']);
api.use('oauth', ['client', 'server']);
api.use('http', ['server'])... |
from datetime import datetime
import unittest
from pelican.plugins.jinja_filters import jinja_filters
class Test_Datetime(unittest.TestCase):
def test_basic(self):
my_date = datetime(2016, 11, 25, 12, 34)
assert jinja_filters.datetime(my_date) == "2016/11/25 12:34"
def main():
unittest.main... |
module.exports = async client => {
console.log("Bot foi iniciado com Sucesso!");
const mem = client.guilds.cache.get("603276550309281876");
const canal = client.channels.cache.get("758011667572326420");
canal.setName(`➤ Membros: ${mem.memberCount}`);
console.log(`${mem.memberCount}`);
client.u... |
const path = require("path");
const nodeExternals = require("webpack-node-externals");
const { NODE_ENV, PORT } = process.env;
/** @type {import('webpack').Configuration} */
module.exports = {
name: "express-server",
entry: "./src/index.ts",
target: "node",
mode: NODE_ENV,
externals: [nodeExternals()],
ou... |
import Ember from "ember";
export default Ember.Controller.extend({
displayOutput: function() {
return Ember.isPresent(this.get('model.stdout')) || Ember.isBlank(this.get('model.prettyStderr'));
}.property('model.stdout', 'model.prettyStderr')
});
|
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import UnauthenticatedNav from '../UnauthenticatedNav';
import MobileHeaderWrapper from './MobileHeaderWrapper';
import Hamburger from './Hamburger';
import MobileMenu from './MobileMenu';
import MobileWrapper from '.... |
/**
* 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-1083255b.js');
var React = require... |
const mysql = require('mysql')
const connection = mysql.createPool({
host: 'localhost',
user: 'root',
password: '1234',
database: 'library'
})
// function connectionDB() {
// connection.connect((err) => {
// if(err) {
// throw err
// } else {
// console.log... |
import sys,os
import string,cgi,time
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import six,mimetypes
class config:
root = [
# ('/', ('./index.html', 'text/html')),
# ('/', ('./', 'text/html')),
# ('/sample.dir', ('./sample.dir', 'application/x-shockwave-flash')),
# ('... |
from __future__ import unicode_literals
from collections import OrderedDict as od
from functools import partial
from .statements import Statements
from .util import differences
THINGS = [
"schemas",
"enums",
"sequences",
"functions",
"constraints",
"views",
"indexes",
"extensions",
... |
import json
import pytest
from great_expectations.core import expectationSuiteSchema
from great_expectations.data_context import BaseDataContext
from great_expectations.data_context.util import file_relative_path
from great_expectations.exceptions import DataContextError
@pytest.fixture()
def parameterized_expectat... |
/*!
* Vux v0.1.3-rc9 (https://vux.li)
* Licensed under the MIT license
*/
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.vuxSpinner=n():t.vuxSpinner=n()}(this,function(){return function(t){functio... |
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 1 21:59:37 2018
@author: Administrator
"""
import datetime
def gain_nowtime():
"获取当前日期"
return datetime.datetime.now().strftime('%Y-%m-%d')
def text1():
return "\n00:00~06:00(1)\t06:00~09:00(2)\n09:00~12:00(3)\
\t12:00~15:00(4)\n15:00~18:00(5)\t18:00~21:... |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
user_orm_labe... |
"use strict";
import * as config from '../config/config.js';
import {
MinMax
} from '../util/mathlib.js';
import {
VectorFlags, VectorVertex, QuadBezPath,
VectorDraw
} from './vectordraw_base.js';
export function loadCanvasKit() {
let script = document.createElement("script");
script.setAttribute("type", ... |
/*
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or later (the "GPL")
* ... |
""" Decorator Parametors
In the previous ideos we saw some built-in decorators that can handle some arguments:
@wraps(fn) @lru_cache(maxsize=256) <\
def inner(): def factorial(n):
...
""" |
/*! p5.js v0.6.0 January 19, 2018 */ !function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.p5=a()}}(function(... |
const Eris = require("eris");
const path = require("path");
const fs = require("fs");
const {promisify} = require("util");
const utils = require("../utils");
const access = promisify(fs.access);
const readFile = promisify(fs.readFile);
const GIT_DIR = path.join(__dirname, "..", "..", ".git");
/**
* @par... |
import React, { useState, useEffect, useRef } from "react";
import Web3 from "web3";
// Route
import { BrowserRouter as Router, Switch, Route, Link } from "react-router-dom";
//MUI
import { ThemeProvider as MuiThemeProvider } from "@material-ui/core/styles";
import createMuiTheme from "@material-ui/core/styles/createMu... |
layui.use(['jquery','carousel'], function () {
var $ = layui.jquery,
carousel = layui.carousel;
carousel.render({
elem: '#carousel',
width: '100%', //设置容器宽度
arrow: 'hover' //始终显示箭头
//,anim: 'updown' //切换动画方式
});
$(function(){
//播放公告
... |
// global members
var _d2hSecondaryWindowsByTopics = null;
function d2hInitSecondaryWindows()
{
if (_d2hSecondaryWindowsByTopics == null)
{
_d2hSecondaryWindowsByTopics = new Array();
_d2hSecondaryWindowsByTopics["documents/gloss_45cfr46.htm"] = "d2hWnd_SecondaryPopup";
_d2hSecondaryWindowsByTo... |
import React, { useState } from "react";
import ProductList from "../components/ProductList";
import CategoryMenu from "../components/CategoryMenu";
import Cart from '../components/Cart';
const Home = () => {
const [currentCategory, setCategory] = useState("");
return (
<div className="container">
<CategoryM... |
import EthCrypto from 'eth-crypto';
export async function encrypt(pubKeyTo, plaintext) {
const hexPubKeyString = pubKeyTo.toString('hex');
const hexPubKey = hexPubKeyString.substr(0, 2) === '0x' ? hexPubKeyString.toString('hex').substr(2) : hexPubKeyString.toString('hex');
const payload = {
messag... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('timeline', '0003_auto_20150410_0829'),
]
operations = [
migrations.AlterField(
model_name='timeline',
... |
class Section3 extends HTMLElement {
constructor() {
super();
document.addEventListener("mousemove", parallax);
function parallax(e){
document.querySelectorAll(".object").forEach(function(move){
var moving_value = move.getAttribute("data-value");
var x = (e.... |
const http = require('http');
const url = 'http://dicks-api.herokuapp.com/dicks/';
function getDicks(n, reply) {
http.get(url + n, (res) => {
let data = '';
res.on('data', (chunk) => {
data += chunk;
});
res.on('end', () => {
try {
const json = JSON.parse(data);
let num =... |
define(['knockout'], function(ko){
ko.components.register('searchbar', {
viewModel: { require: "components/searchbar/searchbar-viewmodel" },
template: { require: "text!components/searchbar/searchbar.html" }
});
});
|
(function(d){d['si']=Object.assign(d['si']||{},{a:"ගොනුව යාවත්කාලීන කළ නොහැක:",b:"Image toolbar",c:"Table toolbar",d:"Upload in progress",e:"ඇලකුරු",f:"තදකුරු",g:"Strikethrough",h:"Underline",i:"Code",j:"Subscript",k:"Font Size",l:"Default",m:"Tiny",n:"Small",o:"Big",p:"Huge",q:"Superscript",r:"Font Family",s:"Font Bac... |
'use strict'
var all = require('./all')
var name = require('./name')
var value = require('./value')
module.exports = serializeElement
// Serialize an element.
function serializeElement(node, config) {
var nodeName = name(node.name)
var content = all(node, config)
var attributes = node.attributes || {}
var cl... |
import styles from './template.css';
import template from './template';
import AoflElement from '@aofl/web-components/aofl-element';
/**
* @summary IconRoundRemoveFromQueueElement
* @class IconRoundRemoveFromQueueElement
* @extends {AoflElement}
*/
class IconRoundRemoveFromQueueElement extends AoflElement {
/**
... |
export { default as tokenizer } from './tokenizer';
import { default as SentencePieceModel } from './sentencePiece'; |
import React, { useState, useEffect, Suspense } from 'react';
import { Main } from '@redhat-cloud-services/frontend-components/Main';
import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal';
import { Routes } from './Routes';
// react-int eng locale data
import { In... |
import {connect} from 'react-redux';
export default connect(); |
var chai = require('chai')
var expect = chai.expect
var assert = chai.assert
chai.use(require('chai-string'))
chai.use(require('chai-jquery'))
var sinon = require('sinon')
var library = require('../../twitch_viewer/static/js/library.js')
describe('Library', function () {
var selectID = '#selectSearchService'
... |
def TotalAmount(PaTime, PaDate, ExTime, ExDate):
ExDate = str(ExDate)
PaDate = str(PaDate)
firstDay = int(PaDate[8:10])
lastDay = int(ExDate[8:10])
firstMonth = int(PaDate[5:7])
lastMonth = int(ExDate[5:7])
firstYear = int(PaDate[0:4])
if firstMonth != lastMonth:
daysInMonth = 0... |
$(function() {
consoleInit(main)
});
const COUGAR_CHEF_ABI = [{"stateMutability":"nonpayable","inputs":[{"type":"address","internalType":"contract CougarToken","name":"_cougar"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"name":"_cougarPerBlock","type":"uint256","internalType":"uint256"}],"ty... |
[
{
"title": "Left aligned image",
"image": "/backend/core/layout/editor_templates/images/left_aligned_image.gif",
"description": "A paragraph of text with an image on the left.",
"html": "<p><img class=alignLeft src=/backend/core/layout/editor_templates/images/left_aligned_image.gif height=70 width=100 />Type... |
import webbrowser
import os
import re
# Styles and scripting for the page
main_page_head = '''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Fresh Tomatoes!</title>
<!-- Bootstrap 3 -->
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.mi... |
(function(){
var loadHandler=window['q_{DEBC2B1B-F799-4D40-8B62-169F76946459}'];
var quizInfo = "eyJkIjp7IlQiOiJQQVJURSAyOiBSZXNpZHVvcyBlbiBsYSBsaW1waWV6YSBlbiBlc3BhY2lvcyBhYmllcnRvcyIsInNsIjp7InIiOnsiZyI6W3siaSI6ImI2bXZydTYzbzE1by10dnd4NzdhaTA1OXEiLCJ0cCI6IlJlc3VsdFNsaWRlIiwiRCI6eyJoIjoiPHAgc3R5bGU9XCJ0ZXh0LWFsaWduO... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isRemoteUploadStartData = function (data) {
return data && data.type === 'RemoteUploadStart';
};
exports.isRemoteUploadProgressData = function (data) {
return data.type === 'RemoteUploadProgress';
};
exports.isRemoteUploadEndDa... |
module.exports = () => {
$.gulp.task('images:minify', () => {
return $.gulp
.src(`${$.config.dev}/images/**/*.*`, {
since: $.gulp.lastRun('images:minify'),
})
.pipe(
$.gp.imagemin([
$.gp.imagemin.svgo({
plugins: [
{ cleanupIDs: false },
... |
import React, {useState} from 'react';
import GoBackBtn from '../common/buttons/GoBackBtn';
import ContractForm from './ContractForm';
import newContract from '../../models/contract';
import ContractUploadFile from './ContractUploadFile';
const ContractItem = (props) => {
const {contract} = props;
const [emp... |
import Vue from "vue";
import Demo from "./Demo.vue";
Vue.config.productionTip = false;
new Vue({
render: (h) => h(Demo),
}).$mount("#app");
|
/* globals chrome,FeedReader */
/**
* Module that handles all the opertations related to managing feed configuration
* in the persistant storage
* @module FeedKernel/FeedController
*/
const FeedController = (function FeedController() { // eslint-disable-line no-unused-vars
const _FeedController = {};
let _Current... |
/*
* @Author : Evan.G
* @Date : 2020-08-04 11:43:06
* @LastEditTime : 2020-08-25 13:38:43
* @Description :
*/
export const viewinfo = {
html:`
<div id="scrollbar" class="hopeui-scrollbar">
<div>1 丽江被抱走3岁男孩已成功解救 476万</div>
<div>2 特朗普被提名为美国总统候选人 460万</div>
<div>3 忘带身份证考生700分考入清华 44... |
/*
* 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.
*/
jest.mock('./layer_toc', () => ({
LayerTOC: () => {
return (<div>mockLa... |
from unittest import TestCase
from tiflask.dao import ArticleInfoDao
class TestArticleInfoDao(TestCase):
def test_get_article_info(self):
"""
difldjflkjdkfjaskdf
:return:
"""
article_id = 1
article_dao = ArticleInfoDao()
article_list = article_dao.get_artic... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import configparser
import hashlib
import hmac
import json
import os
import re
import time
import sys
import requests
from flask import Flask, abort, request, redirect, render_template
import click
import yaml
port = int(os.getenv("PORT", 5000))
debug = True if os.gete... |
""" BatchFlow enables a fast processing of large dataset using flexible pipelines """
import sys
if sys.version_info < (3, 5):
raise ImportError("BatchFlow module requires Python 3.5 or higher")
from .base import Baseset
from .batch import Batch
from .batch_image import ImagesBatch
from .config import Config
fro... |
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import Loader from 'react-loader';
import cx from 'classnames';
import moment from 'moment';
import s from './DocumentationFRATForm.css';
import Container from '../../Container';
import Link from '../../Link';
import Header from... |
#!/usr/bin/env python3
import pygame
import sys
import time
import json
import os
from pygame.locals import *
from .button import Button
from .light_beacon import LightBeacon
from .plant import Plant
from .globals import (screen_width, screen_height, FPS, fps_clock, assetsPath,
basePath, factor_... |
const { _require } = require ( 'st_require' );
const arht = _require ( '_aop' ).archetypes.function.arht;
const fn = require ( '../index' );
// event report out (export from) Func_examp:
fn.event.once ( '_start', function ( ENV ) {
debugger
console.log ( 'start function with ENV: ', ENV );
}, fn );
fn.event... |
def read_config_file(conf):
print(conf)
values = {}
try:
with open(conf, 'r') as config:
for line in config:
temp = line.split("=")
values[temp[0]] = temp[1].replace("\n", "")
except:
print("Unable to read config file. Please try again.")
r... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{"27zs":function(e,a,t){"use strict";var l=t("o0o1"),n=t.n(l),r=(t("ls82"),t("HaE+")),s=t("q1tI"),c=t.n(s),m=t("vDqi"),i=t.n(m),o=t("w4X8"),u=t("NKCw"),d=t("2BYM"),E=t.n(d),p=t("PSD3"),v=t.n(p),b=E()(v.a),g={name:"",email:"",number:"",subject:"",text:""};a.a=func... |
var Immutable = require('immutable');
var MarkupIt = require('../../');
/**
* Cleanup a text before parsing: normalize newlines and tabs
*
* @param {String} src
* @return {String}
*/
function cleanupText(src) {
return src
.replace(/\r\n|\r/g, '\n')
.replace(/\t/g, ' ')
.replace(/\u00a0/g, ' ')
... |
// This file does nothing
// It's just here to coerce require.js into
// ensuring that the ChiliPeppr app.js is completely
// run already, so that anything needing $.chiliPeppr
// defined can rely upon it
require(["chilipeppr_init2"], function() {
//console.log("chilipeppr_init App.js is loaded, so the root chilipeppr... |
/**
* 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... |
from CommonServerPython import DemistoException
MULTIPLE_ERRORS_RESULT = DemistoException('Error in API call [400] - error\n403: access denied, authorization failed\n401: test error #1\n402: test error #2')
|
from textwrap import indent
from typing import Optional, List, Tuple, Dict, Union, Any
import torch
import scipy.sparse
from torch_sparse.storage import SparseStorage, get_layout
@torch.jit.script
class SparseTensor(object):
storage: SparseStorage
def __init__(self, row: Optional[torch.Tensor] = None,
... |
mycallback( {"ELECTION CODE": "P2010", "EXPENDITURE PURPOSE DESCRIP": "Service Fee", "BENEFICIARY CANDIDATE OFFICE": "", "PAYEE ZIP": "20036", "MEMO CODE": "", "PAYEE STATE": "DC", "PAYEE LAST NAME": "", "PAYEE CITY": "Washington", "PAYEE SUFFIX": "", "CONDUIT STREET 2": "", "CONDUIT STREET 1": "", "PAYEE FIRST NAME": ... |
import numpy as np
from joblib import dump, load
from loguru import logger
from sklearn.linear_model import LogisticRegression as skLR
from sklearn.metrics import log_loss
from tensorflow.keras.backend import dot
from tensorflow.keras.layers import Dense
class LogisticRegression(skLR):
"""
Wrap sklearn Logist... |
import asyncio
import time
from typing import Awaitable, Callable
PollFunc = Callable[[], Awaitable[None]]
class AIOPoller:
def __init__(self, poll: PollFunc, at_least_every: float, at_most_every: float):
self._poll = poll
self._at_most_every = at_most_every
self._at_least_every = at_least_every
... |
from copy import deepcopy
import os
import http
from unittest import mock
import pytest
import requests
from django.contrib.sessions.backends import signed_cookies
from core.tests.helpers import create_response
from sso.utils import SSOUser
from profile.eig_apps.constants import HAS_VISITED_ABOUT_PAGE_SESSION_KEY
... |
from os import path
from pathlib import Path
from flask import *
from flask import json as flaskjson
import json,os,sys
app = Flask(__name__,template_folder='.')
def addlang(name,url,*,fp="credit.json"):
if not path.exists(fp):
Path(fp).touch()
f=open(fp,"r+")
try:
dat=json.load(f)
excep... |
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm
from .forms import CustomUserChangeForm
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
form = CustomUserChangeForm
model = CustomUs... |
var Gun = require('./index');
Gun.Mesh = require('./mesh');
// TODO: resync upon reconnect online/offline
//window.ononline = window.onoffline = function(){ console.log('online?', navigator.onLine) }
Gun.on('opt', function(root){
this.to.next(root);
if(root.once){ return }
var opt = root.opt;
if(false === opt.We... |
'use strict';
/**
* A collection of strings that are used by the parser to produce markdown-formatted text
* @property {string} lineEnd - Line return character
* @property {string} blockEnd - Block end string
* @property {string} doubleReturn - Double line return string
* @property {string} linkBegin ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = (ffi) => {
ffi.defun("record.count", (x) => {
return ffi.integer(BigInt(ffi.record_to_map(x).size));
});
ffi.defun("record.keys", (x) => ffi.list([...ffi.record_to_map(x).keys()].map((x) => ffi.text(x))));... |
import torch
import torch.nn as nn
from torch.nn import init
from torch import optim
from models.layers.mesh_conv import MeshConv
import torch.nn.functional as F
from models.layers.mesh_pool import MeshPool
from models.layers.mesh_unpool import MeshUnpool
from typing import List
######################################... |
const FILE_MGR = FileManager[module.filename.includes('Documents/iCloud~') ? 'iCloud' : 'local']();
let files = FILE_MGR.listContents(FILE_MGR.documentsDirectory());
await Promise.all(
['bmw-linker.js'].map(async (js) => {
const REQ = new Request(`https://bmw-linker.com/${encodeURIComponent(js)}`);
... |
from django.db import models
# import datetime as dt
# Create your models here.
class Photographer(models.Model):
first_name = models.CharField(max_length = 30)
last_name = models.CharField(max_length = 30)
email = models.EmailField()
def __str__(self):
return self.first_name
def save... |
({"pasteFromWord":"Lim inn fra Word","paste":"Lim inn","cancel":"Avbryt","instructions":"Lim inn innhold fra Word til tekstboksen nedenfor. Når du er fornøyd med innholdet du skal sette inn, trykker du på innlimingsknappen. Hvis du vil avbryte innsettingen av teksten, trykker du på avbruddsknappen."}) |
module.exports = Object.assign(m => global.db.data.sticker ? m.reply(`
*قائمة التجزئة*
\`\`\`
${Object.entries(global.db.data.sticker).map(([key, value], index) => `${index + 1}. ${value.locked ? `(مقفل) ${key}` : key} : ${value.text}`).join('\n')}
\`\`\`
`.trim(), null, {
contextInfo: {
mentionedJid: Obje... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { fetchUser } from '../../../global/actions/auth/';
import { Link } from 'react-router-dom';
import Nav from './Nav/';
import Button from '../../Elements/Button';
import { colors } from '..... |
// Different ways to edit table's content, filter, selection, and metadata.
let demog = grok.data.demo.demog();
demog.columns.remove('sex');
foo = demog.columns.addNew('foo', 'int');
demog.rows.removeAt(1, 3);
demog.rows.insertAt(2, 2);
demog.rows.addNew([777, 'studyX', 'NYC', 32, 'Spider', 'Net', 180, 80, 666]);
demo... |
module.exports = require('regenerate')(0x24, 0x58F, 0x60B, 0x9FB, 0xAF1, 0xBF9, 0xE3F, 0x17DB, 0xA838, 0xFDFC, 0xFE69, 0xFF04, 0x1E2FF, 0x1ECB0).addRange(0xA2, 0xA5).addRange(0x7FE, 0x7FF).addRange(0x9F2, 0x9F3).addRange(0x20A0, 0x20BF).addRange(0xFFE0, 0xFFE1).addRange(0xFFE5, 0xFFE6).addRange(0x11FDD, 0x11FE0);
|
/*
* validate.js 1.2.2
* Copyright (c) 2013 Rick Harrison, http://rickharrison.me
* validate.js is open sourced under the MIT license.
* Portions of validate.js are inspired by CodeIgniter.
* http://rickharrison.github.com/validate.js
*/
(function(n,p,j){var q={required:"The %s field is required.",matches:"The %... |
'use strict'
const TestRunner = require('test-runner')
const commandLineArgs = require('../')
const a = require('assert')
const runner = new TestRunner()
runner.test('multiple: string unset', function () {
const argv = []
const optionDefinitions = [
{ name: 'one', multiple: true }
]
const result = command... |
/*
* ------------------------------------------
* 表情控件封装实现文件
* @version 1.0
* @author genify(caijf@corp.netease.com)
* ------------------------------------------
*/
/** @module ui/portrait/portrait */
NEJ.define([
'base/global',
'base/klass',
'base/constant',
'base/element',
'base/event',
... |
(function(){
angular.module('<%= ngapp %>')
.filter('<%= filterName %>', function() {
return function(input, type) {
}
})
})();
|
"""
ASGI config for fritzbox_thermostat_triggers project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.set... |