text stringlengths 3 1.05M |
|---|
import store from '@/store'
import storage from 'store'
import {
ACCESS_TOKEN,
APP_LANGUAGE,
TOGGLE_CONTENT_WIDTH,
TOGGLE_FIXED_HEADER,
TOGGLE_FIXED_SIDEBAR, TOGGLE_HIDE_HEADER,
TOGGLE_LAYOUT, TOGGLE_NAV_THEME, TOGGLE_WEAK,
TOGGLE_COLOR, TOGGLE_MULTI_TAB
} from '@/appCore/store/mutation-types'
import defa... |
'use strict';
/* Controllers */
//an app controller is useful for providing default - e.g. AppName, Page Titles?
// function AppCtrl($scope, $http) {
// $http.get('/api/name')
// .success(function(data, status, headers, config) {
// $scope.name = data.name;
// })
// .error(function(data, status, h... |
/**
* @author : weiwzhang@Ctrip.com
* @editor : Sublime Text
* @updated : 2016.11.30
* @description : Cute ui
*
*/
;
(function ($, global) {
var docs = (function () {
var $side = $(".side-area"),
$mask = $("#mask"),
$tips = $("#tips"),
$tab = $("#tab... |
'use strict';
import { quizData } from '../data.js';
import createDOMElement from '../utils/createDOMElement.js';
import getDOMElement from '../utils/getDOMElement.js';
const score = createDOMElement('h3', { id: 'user-score' });
export const createQuestionElement = (question) => {
const container = createDOMElement... |
'use strict';
module.exports = {
classesContainer: {
methods: {
/**
* Set the definition of a class.
*
* @param {string} id The id of the class.
* @param {function} class The class.
*/
setDefinition: {
... |
from matplotlib.ticker import MaxNLocator
import matplotlib.pyplot as plt
import os
import statistics
import matplotlib
import numpy as np
matplotlib.rcParams['text.usetex'] = True
# Path for criterion
main_path = './compile_time'
# Get all directories in main_path
directories = os.listdir(main_path)
# Lists for plo... |
import "foo" \u{61}ssert { type: "json" };
|
import Ember from 'ember';
export default Ember.Controller.extend({
// -------------------------------------------------------------------------
// Dependencies
queryParams: ['unitId', 'lessonId'],
// -------------------------------------------------------------------------
// Actions
actions: {
/**
... |
"""
Tooling to quickly discover datasets in a given blob store.
"""
import logging
from typing import Callable, Dict, Iterable, Optional, Set, Tuple, Union
from simplekv import KeyValueStore
from kartothek.api.consistency import check_datasets
from kartothek.core.cube.constants import (
KTK_CUBE_METADATA_DIMENSIO... |
const db = require('./db');
exports.getLastsArticles = (limit) => {
return new Promise((resolve, reject) => {
db.query('SELECT * FROM articles WHERE status = 1 ORDER BY date_insert DESC LIMIT ?', [limit], (err, result) => {
if (err) return reject(err.message)
else {
... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
/* eslint-disable react/no-array-index-key */
import React from 'react';
import { Row, Card, CardBody, CardTitle } from 'reactstrap';
import IntlMessages from '../../../../helpers/IntlMessages';
import {
Colxx,
Separator,
} from '../../../../components/common/CustomBootstrap';
import Breadcrumb from '../../../../co... |
from rest_framework.generics import RetrieveAPIView, RetrieveUpdateDestroyAPIView, ListCreateAPIView
from rest_framework import permissions
from api.models import PDUser, Scenario
from api.serializers import LevelSerializer, PDUserSerializer
from api.permissions import IsOwnerOrReadOnly
class UserList(ListCreateAPIV... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.rexloadingprogressplugin = factory());
})(this,... |
import { FormGroup, withStyles } from '@material-ui/core';
export default withStyles({
root: {}
})(FormGroup);
|
from glob import glob
import numpy as np
import scipy
import keras
import os
import Network
import utls
import time
import cv2
import argparse
from tqdm import tqdm
from keras.backend.tensorflow_backend import set_session
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth ... |
!function(r){const e=r["pt-br"]=r["pt-br"]||{};e.dictionary=Object.assign(e.dictionary||{},{"%0 of %1":"%0 de %1",Aquamarine:"Água-marinha",Black:"Preto",Blue:"Azul",Cancel:"Cancelar","Cannot upload file:":"Não foi possível enviar o arquivo:","Dim grey":"Cinza escuro","Dropdown toolbar":"Barra de Ferramentas da Lista S... |
/* eslint-disable no-console */
/* eslint-disable no-unused-vars */
/* eslint-disable react/prop-types */
import React, { useState, useEffect } from 'react';
import axios from 'axios';
import Button from '../Button';
import Main from '../Main';
import { cepMask } from '../Form/mask';
import './help.css';
export defaul... |
# coding: utf-8
import pandas as pd
import matplotlib.pyplot as plt
from mlxtend.plotting import scatterplotmatrix
import numpy as np
from mlxtend.plotting import heatmap
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LinearRegression
from sklearn.linear_model import RANSACRegressor... |
module.exports = {
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"body-max-line-length": [
0,
"always",
100
],
"type-enum": [
0,
"always",
[
"content",
"docs",
"feat",
"fix",
"layouts",
"refactor",
... |
'use strict';
const {join} = require('path');
const {lstat} = require('fs').promises;
const getCacacheInfo = require('cacache').get.info;
const npmCachePath = require('.');
const test = require('tape');
test('npmCachePath()', async t => {
const path = await npmCachePath();
t.ok(
(await lstat(path)).isDirectory(... |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
determine_ext,
ExtractorError,
int_or_none,
)
class HotStarBaseIE(InfoExtractor):
_GEO_COUNTRIES = ['IN']
def _download_json(self, *args, **k... |
// here database is attaining connection and also create a schema
// for mongodb
const mongoose = require("mongoose");
module.exports = {
// connect database
connectDatabase: (connectUrl) => {
return new Promise((resolve, reject) => {
mongoose.connect(
connectUrl,
{ useNewUrlParser: tru... |
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {PureComponent} from 'react';
import PropTypes from 'prop-types';
import {
Platform,
Text,
TouchableOpacity,
View,
} from 'react-native';
import {getFullName} from 'mattermost-r... |
const { MessageType } = require('@adiwajshing/baileys')
const PhoneNumber = require('awesome-phonenumber')
async function handler(m) {
let name = 'NO KE 2 GW'
number = owner[0].replace(/[^0-9]/g, '')
let njid = number + '@s.whatsapp.net'
let onW = await this.isOnWhatsApp(njid) || { isBusiness: false }
let na... |
/**
* Bootstrap based calendar full view.
*
* https://github.com/Serhioromano/bootstrap-calendar
*
* User: Sergey Romanov <serg4172@mail.ru>
*/
"use strict";
Date.prototype.getWeek = function() {
var onejan = new Date(this.getFullYear(), 0, 1);
return Math.ceil((((this.getTime() - onejan.getTime()) / 86400000)... |
# 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 ... |
/* eslint no-console: [2, { allow: ["log", "warn", "error", "assert"] }] */
import amqp from 'amqplib';
import async from 'async';
import _ from 'underscore';
import { getTaskId } from '../common/task';
// class for sending messages to rabbit exchange
// the class contains an internal queue
// where messages are store... |
import React from 'react';
import { View , Text, StyleSheet, Button } from 'react-native';
import { useSelector, useDispatch } from 'react-redux';
import { addition , subtraction , reset} from './store/actions';
const Counter = (props) => {
const data = useSelector((state) => state.counter);
const dispatch = useDi... |
it('testa a página da política de privavidade de forma independente', function(){
cy.visit("./src/privacy.html");
cy.contains('Talking About Testing').should('be.visible')
}) |
from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer): # converts data input into Python obj and vice versa
"""
Serializes a name field to test POST functionality of APIView
"""
name = serializers.CharField(max_length=10)
class UserPro... |
// Copyright 2017 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Basic matching cases with Unicode groups
esid: prod-GroupSpecifier
features: [regexp-named-groups]
includes: [compareArray.js]
---*/
assert.compareArray(
"bab".mat... |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-15 16:15
from django.db import migrations
def ensure_slugs(apps, schema_editor):
ProductCategory = apps.get_model('shop', 'ProductCategory')
Product = apps.get_model('shop', 'Product')
for category in ProductCategory.objects.all():
... |
import React from "react";
export function clamp(number, lowerBound, upperBound) {
return Math.max(lowerBound, Math.min(number, upperBound));
}
export const getOnDemandLazySlides = spec => {
let onDemandSlides = [];
let startIndex = lazyStartIndex(spec);
let endIndex = lazyEndIndex(spec);
for (let slideInde... |
#!/usr/bin/env python
# Copyright 2012 - 2017, New York University and the TUF contributors
# SPDX-License-Identifier: MIT OR Apache-2.0
"""
<Program Name>
formats.py
<Author>
Geremy Condra
Vladimir Diaz <vladimir.v.diaz@gmail.com>
<Started>
Refactored April 30, 2012. -vladimir.v.diaz
<Copyright>
See LIC... |
'use strict';
// Declare app level module which depends on views, and components
angular.module('rx-angular-example', [
'ngRoute',
'rx',
'rx-angular-example.wikipedia',
'infra.wikipedia'
]).
config(['$routeProvider', $routeProvider =>
$routeProvider.otherwise({redirectTo: '/wikipedia'})
]);
|
# -*- coding: utf-8 -*-
# cython: language_level=3
# Copyright (c) 2020 Nekokatt
# Copyright (c) 2021-present davfsa
#
# 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, inc... |
export * from './casing'
|
var searchData=
[
['varying_5fparams_2ecpp_303',['varying_params.cpp',['../varying__params_8cpp.html',1,'']]]
];
|
import babelJest from 'babel-jest';
export default babelJest.createTransformer({
presets: [
[
require.resolve('babel-preset-umi'),
{
commonjs: true,
disableTransform: true,
},
],
],
plugins: [
[
require.resolve('babel-plugin-module-resolver'),
{
a... |
// First, we must import the schema creator
import createSchema from 'part:@sanity/base/schema-creator'
// Then import schema types from any plugins that might expose them
import schemaTypes from 'all:part:@sanity/base/schema-type'
// We import object and document schemas
import blockContent from './blockContent'
impo... |
const fs = require('fs');
const { google } = require('googleapis');
const { authenticate } = require('./auth');
/**
* Call the "testRunner" to test function on the deployed script.
* @param {google.auth.OAuth2} auth An authorized OAuth2 client.
* @return [Number] Exit with the number of failed tests
*/
function ca... |
"use strict";
class Scrambler {
constructor() {
this.leet = [
{k: 'A', u: '4', l: '@'},
{k: 'B', u: '8', l: '6'},
{k: 'C', u: '(', l: '<'},
{k: 'D', u: 'l)', l: 'ol'},
{k: 'E', u: '3', l: '3'},
{k: 'F', u: 'l"', l: 'l"'},
{k: 'G', u: '(,', l: '(,'},
{k: 'H', u: '4... |
const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: path.resolve(__dirname, 'src/index.js'),
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: ['babel-loader'],
... |
/**
* @fileoverview Tests for no-confusing-arrow rule.
* @author Jxck <https://github.com/Jxck>
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const rule = require(".... |
import sys
from bin.corona_esmda import get_calibration_modes
from src.io_func import load_config, load_data, hospital_forecast_to_txt, save_input_data
from src.parse import parse_config, reshape_prior
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
import os
from vis.general import plot_poste... |
from surrortg import Game # First we need import the Game
from surrortg.inputs import Joystick, Directions # and our preferred input(s)
# Create a custom Joystick, it really can do what ever you want.
class MyJoystick(Joystick):
"""
Advanced game documentation
"""
def __init__(self, io):
se... |
import Myr from "../myr/Myr";
const myr = new Myr();
let colorRegEx = new RegExp("#([0-9]|[A-F]|[a-f]){6}");
const defaultCursor = {
color: "red",
texture: "",
transparency: 0,
position: {
x: 0,
y: 0,
z: 0
},
scale: {
x: 1,
y: 1,
z: 1
},
... |
# Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.
# Example:
# Input: 38
# Output: 2
# Explanation: The process is like: 3 + 8 = 11, 1 + 1 = 2.
# Since 2 has only one digit, return it.
class Solution(object):
def addDigits(self, num):
"... |
const { SlashCommandBuilder } = require('@discordjs/builders');
const Discord = require("discord.js")
const db = require("quick.db")
const Canvas = require('canvas');
Canvas.registerFont('./data/font/OpenSans-SemiBoldItalic.ttf', { family: 'OpenSans-SemiBoldItalic' })
const { OWNER } = require('../data/config.json')
m... |
/* *
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
import H from './Globals.js';
import './Utilities.js';
import './Color.js';
import './Legend.js';
import './Series.js';
import './Options.js';
var color = H.color,
LegendSymbolMixin = H.LegendSymbolMixin,
pick = ... |
import React, { useEffect, useState } from "react";
import { useMoralis } from "react-moralis";
import MoralisDappContext from "./context";
function MoralisDappProvider({ children }) {
const { web3, Moralis, user } = useMoralis();
const [walletAddress, setWalletAddress] = useState();
const [chainId, setChainId] ... |
(function() {
VimeoVideo = function(domObject, url) {
this.domObject = domObject;
this.url = url;
};
VimeoVideo.vimeoRegEx = new RegExp('^http://(?:www\\.)?vimeo\\.com/.+clip_id=(\\d+)');
VimeoVideo.prototype.canHandle = function() {
console.log('url: ' + this.url);
console.log('result: ' + VimeoVideo.vimeoReg... |
const data = {
name: "fr-BI",
identity: {
language: "fr",
territory: "BI"
},
territory: "BI",
numbers: {
symbols: {
decimal: ",",
group: " ",
list: ";",
percentSign: "%",
plusSign: "+",
minusSign: "-",
... |
import React, { useContext, useState, useEffect } from "react";
import { ChartContext } from "../../../../context/chartContext";
import Dropdown from "../../TabGeral/components/dropdown/dropdown";
import OverlapWrapper from "../../../../components/chartWrapper/overlapWrapper";
function LapDivision() {
const chartVal... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
import { Notes } from '../lib/Notes';
import { Piano_500 } from '../lib/Audio/Audio_500';
let notes = new Notes();
notes.loadAudio([
Piano_500
]);
export default notes; |
import React from "react";
import freesewing from "@freesewing/core";
import Workbench from "@freesewing/components/Workbench";
import "typeface-roboto-condensed";
import "@freesewing/css-theme";
import Pattern from "pattern";
const App = props => {
let instance = new Pattern();
let config = instance.config;
re... |
# Copyright 2018 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
from tools import RaspEnum
Python27Path = "C:\Python27\python.exe"
Python27_64Path = "C:\Python27_64\python.exe"
Service_Phase = float(9999)
Time_My_Code = False
number_of_contingencies_for_screening = 6
class ComponentStatusEnum(RaspEnum):
ReconnectedService = (-2, "ReconnectedService")
Reconnected = (-1, "... |
import ast
from os import listdir
from os.path import isfile, join
directory = "/home/known/Desktop/Masters/Code/Actual/memory_capacity_retention_rnns/Notebooks/backup_15_11_2018_2000"
onlyfiles = [f for f in listdir(directory) if isfile(join(directory, f))]
with open('/home/known/Desktop/Masters/Code/Actual/memory_c... |
# 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 ... |
const a = require('./a');
console.log(a.name);
exports.name = 'b';
|
// Copyright 2021 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 or agreed to in ... |
def test():
x = 1
f = lambda: x
x = 2
print(f())
def test2(omit=None):
def scrub(attrs):
return tuple(a for a in attrs if a not in omit)
omit = omit or ()
print(scrub('abc'))
def test3():
for i in range(3):
j = i
print(i, j)
def test4(param=1):
def inner(... |
'use strict';
module.exports = function (app) {
// Root routing
var core = require('../controllers/core.server.controller');
// Define error pages
app.route('/server-error').get(core.renderServerError);
// Return a 404 for all undefined api, module or lib routes
app.route('/:url(api|modules|lib)/*').get(... |
export { default } from 'ember-flexberry-gis/components/map-commands-dialogs/search-settings/wfs';
|
import { Component } from 'react';
import './App.css';
import Previousoutputs from './components/previousoutputs/previousoutputs.component'
import { db } from './firebase'
import Buttons from './components/buttons/buttons.component'
import firebase from 'firebase'
class App extends Component {
constructor(){
s... |
import React, { Component } from 'react';
import * as PropTypes from 'prop-types';
import graphql from 'babel-plugin-relay/macro';
import { createFragmentContainer } from 'react-relay';
import { Formik, Field, Form } from 'formik';
import { withStyles } from '@material-ui/core/styles';
import { compose, pick } from 'ra... |
// Copyright 2014 the V8 project authors. 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 of ... |
import Vue from 'vue'
import App from './App.vue'
Vue.directive('highlight', {
bind(el, binding, vnode) {
// el.style.backgroundColor = binding.value;
var delay = 0;
if(binding.modifiers['delayed']){
delay = 3000;
}
setTimeout(() => {
if(binding.arg == 'background'){
el.style.... |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @noflow
* @flow-weak
* @jsdoc
*/
'use strict';
import NativeAsyncStorage from './NativeAsyncStorage';
import inva... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { arc } from 'd3-shape';
import { select, selectAll, event } from 'd3-selection'; // eslint-disable-line
import { interpolate } from 'd3-interpolate';
import { scaleSqrt, scaleLinear, scaleOrdina... |
#! /usr/local/bin/python
"""
See LICENSE file for copyright and license details.
"""
from modules.constant import *
from generic.modules.calculator_finance import *
from decimal import Decimal
from generic.modules.function import print_in_columns
class Printer():
"""
Printer class
"""
def __in... |
angular
.module('cms.documents', ['ngRoute', 'cms.shared'])
.constant('_', window._)
.constant('documents.modulePath', '/Admin/Modules/Documents/Js/');
angular.module('cms.documents').config([
'$routeProvider',
'shared.routingUtilities',
'documents.modulePath',
function (
$routeProvider,
... |
const function504 = function (t, e, i) {
"use strict";
var n = this && this.__extends || function () {
var t = Object.setPrototypeOf || {
__proto__: []
}
instanceof Array && function (t, e) {
t.__proto__ = e
} || function (t, e) {
for ... |
from ..open_oas.builder.builder import OasBuilder
from unittest import TestCase
from ..tests.schemas.schemas import (
ErrorSchema,
GistSchema,
gistObj1,
)
from ..open_oas.decorators import Deferred, component_response
class TestComponentResponse(TestCase):
def run_tests(self, builder: OasBuilder):
... |
/**
* Cherry framework script inits
*/
(function($){
"use strict";
CHERRY_API.utilites.namespace('tools.popup');
CHERRY_API.utilites.namespace('tools.slider');
CHERRY_API.utilites.namespace('tools.stickup');
CHERRY_API.utilites.namespace('tools.navigation');
// Init magnific popup
CHERRY_API.tools.popup = {... |
# -*- coding: utf-8 -*-
# SPDX-License-Identifier: BSD-2-Clause
"""Custom docutils writer for ReStructuredText.
"""
from __future__ import (print_function, unicode_literals, absolute_import)
import os
import sys
import re
import textwrap
import logging
from docutils import nodes, writers
from sphinx import addnode... |
def particion(arr, low, high):
i = (low-1)
pivot = arr[high]
for j in range(low, high):
if arr[j] <= pivot:
i = i+1
arr[i], arr[j] = arr[j], arr[i]
arr[i+1], arr[high] = arr[high], arr[i+1]
return (i+1)
def quicksort(arr, low, high):
if low < high:
pi =... |
/**
* secsy-webclient
*
* Copyright (c) 2016 Reto Inderbitzin <mail@indr.ch>
*
* For the full copyright and licence information, please view
* the LICENSE file that was distributed with this source code.
*/
import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service(),
... |
import React from 'react';
import { mount } from 'enzyme';
import { cloneDeep, set } from 'lodash';
import { BenefitsLines } from '../../../forms/output/BenefitsLines';
import { CLIENT_DEFAULTS } from '../../../utils/CLIENT_DEFAULTS';
// Skipping till highcharts testing is worked out
describe.skip('<BenefitsLines>', ... |
/*!
* devextreme-angular
* Version: 19.1.6
* Build date: Tue Oct 22 2019
*
* Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://git... |
/* @flow strict */
import styles from './styles.module.scss';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { isNull } from '../../../lib/is';
import { UserDetails } from '../Details';
import { enforceString } from '../../../lib/enforce';
import { routes, ROUTE_PARAMS } from '../../.... |
/**
* config for scripts/bundle.js
*/
const path = require("path"),
fs = require("fs-extra"),
webpack = require("webpack"),
_ = require("lodash"),
VirtualModulePlugin = require("virtual-module-webpack-plugin");
const PKGS = {
LIFE_EVENTS: "@life-events",
SHARED: "@shared",
SENDER: "@send... |
'use strict';
require('./warnAboutDeprecatedCJSRequire.js')('LocationUtils');
module.exports = require('./index.js').LocationUtils;
|
#!/usr/bin/python
import sys
import Adafruit_DHT
import httplib, urllib
import subprocess
import re
import os
import time
import MySQLdb as mdb
import datetime
databaseUsername="dbusrname"
databasePassword="dbpw"
databaseName="dbname"
key = 'thingspeak key'
sensor=Adafruit_DHT.DHT11
pinNum=4
def save(humidi... |
var webAudioMediaStreamSources = [];
function convertToAudioStream(mediaStream) {
if (!mediaStream) throw 'MediaStream is mandatory.';
if (mediaStream.getVideoTracks && !mediaStream.getVideoTracks().length) {
return mediaStream;
}
var context = new AudioContext();
var mediaStreamSource = ... |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
#
# 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, ... |
/* global describe it before */
var expect = require('chai').expect
var net = require('net')
var EventEmitter = require('events').EventEmitter
/* this is a private module, so load directly */
var MessageSocket = require('../lib/jet/message-socket').MessageSocket
var jet = require('../lib/jet')
var http = require('http'... |
exports.min = function min(array) {
if (!array) {
return 0;
}
if (array.length == 0) {
return 0;
}
let res = array[0];
array.forEach(element => {
if (res > element) {
res = element;
}
});
return res;
}
exports.max = function max(array) {
if (!array) {
return 0;
}
if (a... |
"""
main.py
Run the full model-training and evaluation pipeline. Note that you must've run the processing of the data first!
"""
import argparse
import random
import numpy as np
import pandas as pd
import torch
from data.process import main as process_data
from model.evaluate import main as evaluate
from model.setup... |
import sqlite3
import datetime
import pytz
import pickle
db = sqlite3.connect("accounts.sqlite", detect_types=sqlite3.PARSE_DECLTYPES)
db.execute("CREATE TABLE IF NOT EXISTS accounts (name TEXT PRIMARY KEY NOT NULL, balance INTEGER NOT NULL)")
db.execute("CREATE TABLE IF NOT EXISTS transactions (time TIMESTAMP NOT NUL... |
//used as dedicated worker : debugger, console.log supported (and DOM, anonymous function.. are not supported)
//importScripts("jay_common.js") //jQuery is not defined
//w_winid is unique id for window(tab) which is saved and used in Redis.
//w_winid는 브라우저의 각 윈도우(탭)의 유니크한 ID이며 Redis에도 저장, 사용됨
let w_cnt = 0, w_winid
co... |
export const appealHasDeathDismissal = (appeal) => {
return appeal.decisionIssues?.some((decisionIssue) =>
decisionIssue.disposition === 'dismissed_death');
};
export const appealSupportsSubstitution = (appeal) => {
return (
// AMA-only
!appeal.isLegacyAppeal &&
// Currently only allow substitution... |
const path = require("path");
exports.createPages = ({ graphql, actions }) => {
const { createPage } = actions;
return new Promise((resolve, reject) => {
graphql(`
{
allContentfulService {
edges {
node {
slug
}
}
}
allConte... |
var reqId
var timeoutPeriod = 35 * 1000;
function onQuerySubmitFromWebpage(queryType) {
$("#resultList").empty();
reqId = "0"
console.log("Value submitted:" + $("#queryInput").val());
$.ajax
({
url : "/data",
type : 'POST',
dataType: 'json',
data : JSON.st... |
import React, { useState, useEffect, useMemo } from 'react';
import { Field, TextInput, Select, ButtonGroup, Button, Box, Icon, Callout, FieldGroup } from '@rocket.chat/fuselage';
import { css } from '@rocket.chat/css-in-js';
import { useMutableCallback } from '@rocket.chat/fuselage-hooks';
import VerticalBar from '..... |
import React from 'react';
import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom';
import withContext from './Context';
import PrivateRoute from './PrivateRoute';
/* Import components. */
import Header from './components/Header';
import UserSignUp from './components/UserSignUp';
import UserSignIn ... |
const { Client, Collection } = require("discord.js");
const { readdirSync } = require("fs");
// client class
class Nero extends Client {
constructor (opt) {
super (opt);
this.util = require("./handle/util");
this.snek = require('node-superfetch');
}
}
// const client
const client = new Ne... |