text stringlengths 3 1.05M |
|---|
import React from 'react';
import configureStore from 'redux-mock-store';
import { create } from 'react-test-renderer';
import { shallow } from 'enzyme';
import withAuth from '../auth';
import * as routes from '../../constants/routes';
const mockStore = configureStore();
jest.mock('./../../actions', () => ({
auth:... |
// Copyright (c) 2018, Epoch and contributors
// For license information, please see license.txt
frappe.ui.form.on('UQC', {
refresh: function(frm) {
}
});
|
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {
compose,
lifecycle,
setPropTypes,
withHandlers
} from 'recompose';
import classNames from 'classnames';
import MessageWidget from '@ciscospark/widget-message';
... |
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed... |
from qt_ui.loginform import Ui_Form as LoginForm
from qt_ui.mainwindow import Ui_MainWindow as MainWindowForm
from qt_ui.comment import Ui_Form as CommentForm
from qt_ui.filters import Ui_Form as FilterForm
from qt_ui.follow_unfollow import Ui_Form as FollowUnfollowForm
from qt_ui.like import Ui_Form as LikeForm
from q... |
'use strict'
const { statAsync } = require('asfs')
/**
* Get size of file
* @memberof module:@the-/util-file
* @function fileSizeOf
* @param filename
* @returns {Promise<number>}
*/
async function fileSizeOf(filename) {
const stat = await statAsync(filename).catch(() => null)
return stat ? stat.size : null
... |
'use strict';
const path = require('path');
const { expect } = require('chai');
const fs = require('fs').promises;
const fse = require('fs-extra');
const spawn = require('child-process-ext/spawn');
const serverlessExec = require('../serverlessBinary');
const { getTmpDirPath, listZipFiles } = require('../utils/fs');
c... |
/**
* Copyright 2015 Telerik AD
*
* 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 ... |
/*
* Copyright (c) 2015-present, Parse, LLC.
* 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.
*
* @flow
*/
im... |
Input::
//// [/user/username/projects/reexport/src/tsconfig.json]
{
"files": [],
"include": [],
"references": [{ "path": "./pure" }, { "path": "./main" }]
}
//// [/user/username/projects/reexport/src/main/tsconfig.json]
{
"compilerOptions": {
"outDir": "../../out",
"rootDir": "../"
},
"includ... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{170:function(a,t,r){"use strict";r.r(t);var e=r(0),i=Object(e.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var a=this,t=a.$createElement,r=a._self._c||t;return r("div",{staticClass:"content"},[r("h1",{attrs:{id:"介绍"}},[r("a",{... |
"""The spotify integration."""
import logging
from spotipy import Spotify, SpotifyException
import voluptuous as vol
from homeassistant.components.media_player import DOMAIN as MEDIA_PLAYER_DOMAIN
from homeassistant.components.spotify import config_flow
from homeassistant.config_entries import ConfigEntry
from homeas... |
#!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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 witho... |
import axios from '@/libs/api.request'
const USER_MAP = {
super_admin: {
name: 'super_admin',
user_id: '1',
access: ['super_admin', 'admin'],
token: 'super_admin',
avatar: 'https://file.iviewui.com/dist/a0e88e83800f138b94d2414621bd9704.png'
},
admin: {
name: 'admin',
user_id: '2',
... |
"""
A Baby class and functions that use/test it.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Mark Hays, Amanda Stouder, Aaron Wilkin, their colleagues,
and Zichen.
""" # Done: 1. PUT YOUR NAME IN THE ABOVE LINE.
def main():
"""
After you have made the Baby class,... |
// http://stackoverflow.com/questions/46155/validate-email-address-in-javascript
function validateEmail(email) {
const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return reg.test(email);
}
export... |
#!/usr/bin/env python3
# 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.
class NspawnPlugin:
wrap_setup_subvol = None
wrap_setup = None
wrap_post_setup_popen = None
|
'use strict';
const BinaryWriter = require("./BinaryWriter");
function UpdatePos(playerTracker, x, y, scale) {
this.playerTracker = playerTracker,
this.x = x;
this.y = y;
this.scale = scale;
}
module.exports = UpdatePos;
UpdatePos.prototype.build = function (protocol) {
var writer = new BinaryWri... |
describe('TbUtils', function() {
var service;
beforeEach(function() {
module('VinculacionApp');
});
describe('fillListWithResponseData', function() {
it('should load the destiny list with the elements in origin', inject(function(TbUtils) {
let origin = [1, 2, 3];
let destiny = [];
TbUtils.fillListW... |
/* eslint no-console: 1 */
console.warn('You are using the default filter for the post service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console
module.exports = function (data, connection, hook) { // eslint-disable-line no-un... |
import {promises as fs} from 'fs';
import semver from 'semver';
import {info} from '@travi/cli-messages';
import {directoryExists, fileExists} from '@form8ion/core';
import execa from '../../thirdparty-wrappers/execa';
import scaffold from '../scaffolder';
function v3ConfigExists(precommit, commitmsg) {
return preco... |
const state = {
token: localStorage.getItem("access_token") || null,
user_id: localStorage.getItem("user_id") || null,
user_image: localStorage.getItem("user_image") || null,
user_likes: JSON.parse(localStorage.getItem("user_likes")) || null,
user_name: localStorage.getItem("user_name") || null,
... |
import Client from "../../models/client";
const searchClients = async () => {
const client = new Client();
return await client.search();
};
const findClient = async (root, { identification }) => {
const client = new Client({ identification });
const result = await client.find();
return result;
};
const add... |
import React, { Component } from "react";
import WinsByType from "./WinsByType.js";
import "../css/Stats.css";
class DoughnutGraph extends Component {
render() {
return (
<div>
<div className="doughnut">
<WinsByType />
</div>
</div>
);
}
}
export default DoughnutGraph;... |
export * from "https://cdn.jsdelivr.net/gh/lumeland/pug@v0.1.0/mod.js";
|
'''
Isotype Visualization
=====================
Isotype Visualization shows the distribution of animals across UK and US.
Inspired by [Only An Ocean Between, 1943](http://www.thomwhite.co.uk/?p=1303). Population Live Stock, p.13.
This is adapted from Vega-Lite example https://vega.github.io/editor/#/examples/vega-lite/... |
"use strict";
/* Generated from:
* ap-northeast-1 (https://d33vqc0rt9ld30.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json), version 4.3.0,
* ap-northeast-2 (https://d1ane3fvebulky.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json), version 4.3.0,
* ap-northeast-3 (https://d2zq80... |
# Copyright (c) 2016-2017, Neil Booth
# Copyright (c) 2017, the ElectrumX authors
#
# All rights reserved.
#
# The MIT License (MIT)
#
# 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 ... |
const HtmlWebpackPlugin = require("html-webpack-plugin");
const ModuleFederationPlugin = require("webpack").container
.ModuleFederationPlugin;
const HotModuleReplacementPlugin = require("webpack").HotModuleReplacementPlugin;
const path = require("path");
module.exports = {
entry: "./src/index",
resolve: {
... |
import React from 'react';
const Vote = ({ vote }) => (
<section className="Vote-listing">
<h3 className="name">{vote.row.num_votacao}</h3>
<section>
<p>{vote.row.obj_votacao}</p>
<p>{vote.row.ano}</p>
</section>
</section>
);
export default Vote;
|
import sys, time, os, json
import numpy as np
import matplotlib.pylab as plt
from PIL import Image
from keras.models import *
from keras.layers import *
from keras.optimizers import *
from google.colab import drive
def Generator(img_size, noise_dim, class_num):
def deconv2d(x, filters):
x = UpSa... |
# -*- coding: utf-8 -*-
"""
test all other .agg behavior
"""
from __future__ import print_function
import pytest
import datetime as dt
from functools import partial
import numpy as np
import pandas as pd
from pandas import (
date_range, DataFrame, Index, MultiIndex, PeriodIndex, period_range, Series
)
from pa... |
import Vue from 'vue'
import App from './App.vue'
import BootstrapVue from 'bootstrap-vue';
import router from './router'
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
import 'reset-css';
Vue.use(BootstrapVue);
Vue.config.productionTip = false
new Vue({
router,
rende... |
game.Entities = game.Entities || {};
game.Entities.Player = me.Entity.extend({
init() {
const image = me.loader.getImage('player');
this._super(me.Entity, 'init', [
me.game.viewport.width / 2 - image.width / 2,
me.game.viewport.height - image.height - game.data.player.positionOffset,
{
image,
wid... |
// ==UserScript==
// @name CosmicWin
// @version 1.03
// @namespace CosmicWin
// @description Makes the new YouTube homepage better.
// @match https://*.youtube.com/
// @match http://*.youtube.com/
// @match https://youtube.com/
// @match http://youtu... |
// Make sure MongoD starts with TLS 1.0 disabled (except w/ old OpenSSL).
(function() {
'use strict';
load("jstests/ssl/libs/ssl_helpers.js");
// There will be cases where a connect is impossible,
// let the test runner clean those up.
TestData.failIfUnterminatedProcesses = false;
const supp... |
module.exports.solutions = {}
module.exports.example = [
199,
200,
208,
210,
200,
207,
240,
269,
260,
263,
];
module.exports.input = [
104,
111,
124,
139,
142,
141,
144,
151,
152,
154,
157,
156,
157,
149,
123,
118,
129,
133,
134,
130,
124,
102,
103,
105,
104,
99,
100,
101,
103,
... |
window.onload=function(){
var value = [5,8,2,1,15,2,3,5,9,11,10,4,3,14,1,7,10,3,2,13];
var plane = document.getElementById('plane');
plane.width = value.length * 10;
plane.height = 20*10;
plane.background = 'red';
plane.style.backgroundColor = '#fcfcfc';
plane.style.height = '200px';
plane.style.width = pl... |
from layer import Layer
class Network:
"""Neural network"""
def __init__(self, model: list):
self.layers = [] # layers in neural network
self.model = model
for i in range(len(model)):
self.layers.append(Layer(model[i].get("nodeCount"), model[i].get("type")))
for i ... |
module.exports=function(e){var a={};function i(m){if(a[m])return a[m].exports;var c=a[m]={i:m,l:!1,exports:{}};return e[m].call(c.exports,c,c.exports,i),c.l=!0,c.exports}return i.m=e,i.c=a,i.d=function(e,a,m){i.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:m})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.... |
// Copyright(C) By Fajar Firdaus
// Native Components
import React, { Component } from 'react'
import { View, AsyncStorage, RefreshControl, Text, Image, TouchableOpacity, ScrollView, StatusBar, TextInput, Modal, Picker } from 'react-native'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
impor... |
/*
* jQuery UI 1.5.1
*
* Copyright (c) 2008 Paul Bakaus (ui.jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* http://docs.jquery.com/UI
*/
;(function($) {
$.ui = {
plugin: {
add: function(module, option, set) {
var proto = $.ui[module].prototype;
for... |
import React from 'react';
import { MenuOutlined } from '@ant-design/icons';
import Menu from './Menu';
export default function CustomHeader(props) {
const [showMenu, setShowMenu] = React.useState(false);
return (
<>
<div className="header" style={{ maxHeight: '20vh' }}>
<div className="header-in... |
import classNames from 'classnames';
import React from 'react';
import { Button } from '../../Button';
import ListView from '../ListView';
export const mockListItems = [
{
title: 'Item 1',
description: 'This is Item 1 description',
properties: { hosts: 3, clusters: 1, nodes: 7, images: 4 },
expanded... |
/**
* Implement Gatsby's SSR (Server Side Rendering) APIs in this file.
*
* See: https://www.gatsbyjs.com/docs/ssr-apis/
*/
// You can delete this file if you're not using it
import 'firebase/auth'
import 'firebase/database'
// import 'firebase/firestore'
import 'firebase/functions'
|
$(document).ready(function(){
$('#start_date, #end_date').datepicker({
todayBtn:'linked',
format: "yyyy-mm-dd",
autoclose: true
});
fetch_data('no');
function fetch_data(is_date_search, start_date='', end_date=''){
var dataTable = $('#sales_table').DataTable({
"processin... |
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
entry: path.resolve(__dirname, 'src/index.ts'),
output: {
path: path.resolve(__dirname, 'lib'),
filename: 'delven-transpiler.js',
libraryTarget: 'umd2',
library: "delven-transpile... |
const Unavailability = require('./unavailabilities.model')
const logger = require('../../modules/logger')
/**
* Fetches all of the Unavailability blocks for the current term.
* @param {Koa context} ctx
* @retuns A JSON list of unavailability blocks
*/
async function getUnavailabilities (ctx) {
const unavailabili... |
import argparse
import gym
import gymfc
import matplotlib.pyplot as plt
import numpy as np
from mpi4py import MPI
import math
import os
"""
This script evaluates a PID controller in the GymFC environment. This can be
used as a baseline for comparing to other control algorihtms in GymFC and also
to confirm the GymFC en... |
Search.setIndex({docnames:["commands","file-format","index","maps","sets"],envversion:53,filenames:["commands.rst","file-format.rst","index.rst","maps.rst","sets.rst"],objects:{"":{ip_map:[3,0,1,"c.ip_map"],ip_set:[4,0,1,"c.ip_set"],ipmap_done:[3,1,1,"c.ipmap_done"],ipmap_free:[3,1,1,"c.ipmap_free"],ipmap_get_ip:[3,1,1... |
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Standard library
from __future__ import absolute_import, division, print_function
import distutils.sysconfig
import os.path
import site
import sys
# Setup
try:
# Third-party
from setuptools import setup
except ImportError:
# Standard library
from... |
/**
* Split into declaration and initialization for better startup performance.
*/
const User = require('../models/User');
const _ = require('lodash');
const refresh = require('passport-oauth2-refresh');
const secrets = require('../config/secrets');
const google = require('googleapis');
const fs = require('fs');
con... |
var mongoose=require('mongoose');
var addressSchema=mongoose.Schema({
FlatNo:String,
Street:String,
City:String,
State:String,
Country:String,
pinCode:String,
});
var addressModel=mongoose.model('Address',addressSchema);
module.exports.Address = addressModel;
|
#!python
#
# MIT License
#
# Copyright (c) 2021 Max Mäusezahl
#
# 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, mo... |
# model8-3-logのベクトル化
# vector化はサンプリング部分、つまり"~"の部分を記述できればそれでよい。
# transformed parameters などでも用いられる代入演算では、
# ほとんど計算時間の短縮に寄与しない。
# 統計をとった計測の仕方はしていないが、今回のベクトル化で
# 書籍のデータを使うと、0.5秒程度の高速化となった。
# 非線形モデルの階層モデルを構築する
import numpy as np
import seaborn as sns
import pandas
import matplotlib.pyplot as plt
from matplotlib.figure imp... |
"""
Settings and configuration for Django.
Read values from the module specified by the DJANGO_SETTINGS_MODULE environment
variable, and then from django.conf.global_settings; see the global_settings.py
for a list of all possible variables.
"""
import importlib
import os
import time
import traceback
import warnings
f... |
function log(msj){
console.log(msj);
}
function tocar(event){
$(event).css("cursor", "move");
$(event).mouseup(function(){
$(event).css("cursor", "pointer");
});
}
var CONFIG = (function(){
var private = {
'ANP' : 'Acción No permitida',
'MSJ_ERR' : 'Comuníquese con alguna persona a cargo :(',
... |
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { createBook } from '../actions/index';
class BooksForm extends React.Component {
constructor(props) {
super(props);
this.state = {
title: '',
category: '',
};
this.handleChange.bi... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _ContentBlock = _interop... |
const EVENTLOADCHUNK = 5120;
let LASTBLOCK;
let ENDBLOCK;
const DEBUG = false;
export default function(contract,eventName,endingBlock,startingBlock,updateFn,filter){
LASTBLOCK=parseInt(startingBlock)
ENDBLOCK=parseInt(endingBlock)
loadDownTheChain(contract,eventName,updateFn,filter)
}
let loadDownTheChain = asy... |
$(document).ready(function(){
if (farmer_id != null) {
$.ajax({
async : false,
url : "/ctrl/Controller.php",
type: 'POST',
data: {
act: 'farmer_getDetail',
farmerId: farmer_id
},
dataType : "json",
... |
// Module imports
import * as firebase from 'firebase-admin'
// Local variables// Local variables
let app = null
let auth = null
let firestore = null
if (!firebase.apps.length) {
app = firebase.initializeApp({
credential: firebase.credential.cert({
auth_provider_x509_cert_url: process.env.FIREBASE_AUTH_... |
const doSomethingAsync = () => {
return new Promise((resolve, reject) => {
(true)
? setTimeout(() => resolve('Success async'), 3000)
: reject(new Error('Failue'))
});
};
const doSomething = async () => {
const something = await doSomethingAsync();
console.log(something);... |
module.exports = {
parser: 'babel-eslint',
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
plugins: ['prettier', 'qunit', 'mocha'],
extends: ['eslint:recommended', 'prettier'],
rules: {
'no-restricted-globals': ['error', { name: 'Promise', message: 'Global Promise does... |
function esPali(texto) {
// Array con cada palabra
let aDatos = texto.split(' ')
// Reconstruyo la frase
let frase = aDatos.join('')
// Array con cada letra
aDatos= frase.split('')
// Clon del array con cada letra
aClon = aDatos.join('|').split('|')
// Clon del array al reves
a... |
/* eslint-disable import/no-anonymous-default-export */
import React, { Component } from "react";
import { Chart } from "react-google-charts";
import { Card } from "antd";
export default class extends Component {
render() {
return (
<Card title="Combined Intervals Chart">
<Chart
width={"1... |
module.exports = {
meta: {
name: 'Status code suite'
},
configuration: {
scheme: 'http',
host: '127.0.0.1',
port: 3027
},
specs: [
{
name: 'correct response code',
request: {
path: '/',
method: 'get'
... |
// Dependencies
const fs = require('fs');
var data = JSON.parse(fs.readFileSync("./db/db.json", "utf8"));
module.exports = function (app) {
app.get('./api/notes', function (req, res) {
fs.readFile('./db/db.json', function (err, data) {
if (err) throw err;
dbData = JSON.parse(data);
... |
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter
class Command(BaseXpressDemocracyClubCsvImporter):
council_id = "WOI"
addresses_name = "2021-03-19T11:17:13.350243/Democracy_Club__06May2021.tsv"
stations_name = "2021-03-19T11:17:13.350243/Democracy_Club__06May2021.tsv"
... |
(function(d){d['da']=Object.assign(d['da']||{},{a:"Billedværktøjslinje",b:"Tabel værktøjslinje",c:"Vælg overskrift",d:"Overskrift",e:"Blot citat",f:"Fed",g:"Understreget",h:"Sænket skrift",i:"Kursiv",j:"Hævet skrift",k:"Fuld billedstørrelse",l:"Sidebillede",m:"Venstrestillet billede",n:"Centreret billede",o:"Højrestill... |
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/vue3-recommended',
'eslint:recommended',
'@vue/prettier',
'@vue/typescript/recommended',
'@vue/prettier/@typescript-eslint',
],
parserOptions: {
ecmaVersion: 2020,
},
rules: {
'no-console': proces... |
# -*- coding: utf8 -*-
# Copyright (c) 2019 Niklas Rosenstein
#
# 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, mo... |
/*
* Ext JS Library 2.0
* Copyright(c) 2006-2007, Ext JS, LLC.
* licensing@extjs.com
*
* http://extjs.com/license
*/
Ext.dd.ScrollManager=function(){var C=Ext.dd.DragDropMgr;var E={};var B=null;var H={};var G=function(K){B=null;A()};var I=function(){if(C.dragCurrent){C.refreshCache(C.dragCurrent.groups)... |
import React from 'react';
const VideoDetail = ({video}) => {
if(!video) {
return <div>Loading...</div>;
}
const videoId = video.id.videoId;
const url = `https://www.youtube.com/embed/${videoId}`;
return(
<div className="video-detail col-md-12">
<div className="embed-responsive embed-respons... |
exports.config = {
//allScriptsTimeout: 11000,
specs: [
'e2e/*.js'
],
capabilities: {
'browserName': 'chrome'
/*'browserName': 'firefox'*/
},
//chromeOnly: true,
baseUrl: 'http://localhost:85/',
framework: 'jasmine',
//jasmineNodeOpts: {
// defaultTimeoutInterval: 30000
//},
o... |
var searchData=
[
['handle',['Handle',['../group__lvtk.html#ga6c8769b63afca5cebd52888b0d43bfe9',1,'lvtk']]]
];
|
export default {
brand: {
900: "#1a365d",
800: "#153e75",
700: "#2a69ac",
},
header: {
100: "#20232a",
700: "#9aa2b5",
900: "#d5dbe8"
},
main: {
100: "#282c34",
},
};
|
import React, { Component } from 'react';
import emailjs from 'emailjs-com';
export default class Contact extends Component {
state = {
result: ''
}
sendEmail = (e) => {
e.preventDefault();
emailjs.sendForm(process.env.REACT_APP_EMAIL_JS_SERVICEID, process.env.REACT_APP_EMAIL_JS_TE... |
"""
Tar file support
"""
#*****************************************************************************
# Copyright (C) 2016 Volker Braun <vbraun.name@gmail.com>
#
# 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 F... |
// ==UserScript==
// @name Wanikani: Omega Reorder
// @namespace http://tampermonkey.net/
// @version 0.1.0
// @description Reorders n stuff
// @author Kumirei
// @include /^https://(www|preview).wanikani.com/(lesson|review)/session$/
// @grant none
// ==/UserScript==
;(function (wko... |
import Entity from 'core/Entity';
import cloneDeep from 'lodash/cloneDeep';
let displayCount = {};
export function resetDisplayCount() {
displayCount = {};
}
export default class Display extends Entity {
static create = (Type, config) => {
const { reactors = {} } = config;
const entity = Entity.create(Ty... |
// @ts-check
import {
sizeOfRect,
insetRect,
rectForCorners,
origin,
} from './geometry.js';
import {
transform,
identity,
translate,
flipY as flip,
transpose,
multiply,
} from './matrix.js';
/** @typedef { import("cdom/tiles").Rect } Rect */
/** @typedef { import("cdom/tiles").Point } Point */
/... |
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
import React from 'react';
import styled from 'styled-components';
export var Motorcycle = ... |
import Boolean from './Boolean';
import Break from './Break';
import Button from './Button';
import Checkbox from './Checkbox';
import CloseButton from './CloseButton';
import Color from './Color';
import Container from './Container';
import Control from './Control';
import Div from './Div';
import HorizontalRule from ... |
import Home from './home'
import China from './china'
import World from './world'
export const routes = {
trend_world: {
path: '/trends/world',
component: World,
exactly: true,
},
trend_china: {
path: '/trends/china',
component: China,
exactly: true,
},
trend_home: {
path: '/trend... |
var simplemdeToolbar;
$(function () {
simplemdeToolbar = [
{
name: "guide",
action: "https://simplemde.com/markdown-guide",
className: "fab fa-markdown fa-sm",
title: "Markdown Guide"
},
"|",
{
name: "undo",
act... |
class FontFamily(MarshalByRefObject,IDisposable):
"""
Defines a group of type faces having a similar basic design and certain variations in styles. This class cannot be inherited.
FontFamily(name: str)
FontFamily(name: str,fontCollection: FontCollection)
FontFamily(genericFamily: GenericFontFamilies)
... |
const { performance } = require("perf_hooks");
const { BaseAction } = require("./BaseAction");
class AssertDifferent extends BaseAction {
async eval(context) {
const t0 = performance.now();
let value;
try {
value = context.get(this.parameters.expression);
} catch (e) {
return {
ac... |
import importlib
import multiprocessing
import tornado.options
def load_default_scenes():
for scene in tornado.options.options.default_scenes:
module_name, class_name = scene.rsplit(".", 1)
module = importlib.import_module(module_name)
class_ = getattr(module, class_name)
process =... |
import { shallowMount } from '@vue/test-utils';
import VerifyMessageContainer from '@/layouts/InterfaceLayout/containers/VerifyMessageContainer/VerifyMessageContainer.vue';
import InterfaceContainerTitle from '@/layouts/InterfaceLayout/components/InterfaceContainerTitle/InterfaceContainerTitle.vue';
import InterfaceBot... |
module.exports = async function ({ ethers, getNamedAccounts, deployments }) {
const { deploy, log } = deployments;
const namedAccounts = await getNamedAccounts();
const { deployer } = namedAccounts;
const ADMIN_ADDRESS = process.env.ADMIN_ADDRESS
const SUSHI_ADDRESS = process.env.SUSHI_ADDRESS
c... |
/*
* Copyright (C) 2009 Google Inc. 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 conditio... |
import React, { Component, PropTypes } from 'react';
export default class RangePopups extends Component {
static propTypes = {
manuallySetActiveTab: PropTypes.func.isRequired,
};
render() {
return (
<div id="btnsPopupsHolder">
<div className="col pull-right no-right-padding">
<bu... |
import { GlModal, GlFormCheckbox } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import ExportRequirementsModal from 'ee/requirements/components/export_requirements_modal.vue';
const createComponent = ({ requirementCount = 42, email = 'admin@example.com' } = {}) =>
shallowMount(ExportRequiremen... |
class BaseEntity {
constructor(sprite, energy, x, y, vx = 0, vy = 0) {
this.x = x;
this.y = y;
this.vx = vx;
this.vy = vy;
this.sprite = sprite;
this.energy = energy;
this.baseFrame = Math.random() * 4;
this.creationTime = gameState.currentTime;
}
update() {
this.x += this.vx;... |
// source: https://medium.freecodecamp.org/reducing-css-bundle-size-70-by-cutting-the-class-names-and-using-scope-isolation-625440de600b
const incstr = require('incstr');
const createUniqueIdGenerator = () => {
const index = {};
const generateNextId = incstr.idGenerator({
// Removed "d" letter to avoid accide... |
{"1760000":[[13,"練馬区","","","Nerima Ward","",""]],"1760001":[[13,"練馬区","練馬","","Nerima Ward","Nerima",""]],"1760002":[[13,"練馬区","桜台","","Nerima Ward","Sakuradai",""]],"1760003":[[13,"練馬区","羽沢","","Nerima Ward","Hazawa",""]],"1760004":[[13,"練馬区","小竹町","","Nerima Ward","Kotakecho",""]],"1760005":[[13,"練馬区","旭丘","","Nerim... |
# below is valid micropython, but not OK for static type checking
# # ref https://github.dev/microsoft/pyright/blob/3cc4e6ccdde06315f5682d9cf61c51ce6fac2753/docs/builtins.md#L7
# OK: pyright 1.1.218 should be able to handle this
# PYRIGHT: - const withoputh import - Pylance should be able to handle this
FOO = const(... |
// MarionetteJS (Backbone.Marionette)
// ----------------------------------
// v3.3.1
//
// Copyright (c)2017 Derick Bailey, Muted Solutions, LLC.
// Distributed under MIT license
//
// http://marionettejs.com
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? mod... |
import React from "react";
import style from "./recipe.module.css";
const Recipe = ({ title, calories, image, ingredients }) => {
return (
<div className={style.recipe}>
<h1>{title}</h1>
<ol type="I">
{" "}
<p className="ingredientsName">Ingredients:</p>
{ingredients.map((ingr... |