text
stringlengths
3
1.05M
module.exports.location = "/Users/joshuaahatcher/.nvm/versions/node/v6.9.1/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs" module.exports.platform = "darwin" module.exports.arch = "x64"
/** * * Map Marker * */ import React from 'react'; export default function MapMarker(props) { return ( <div className="marker"> <img src={`http://openweathermap.org/img/w/${props.icon}.png`} alt={props.description} /> </div> ); }
'use strict' const transformers = require('./transformers') module.exports = (data, zones) => { const normalised = transformers.normaliseKeys(data) const byZone = transformers.indexByZone(normalised) const byZoneArea = transformers.indexByArea(byZone) const formatted = transformers.formatZones(byZoneArea) r...
# Copyright 2016 Google Inc. 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 applicable law or ag...
# coding=utf-8 # Copyright 2018 The TF-Agents Authors. # # 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...
const express = require('express') const router = new express.Router() router.get('/', (req, res) => { res.redirect(`/${req.feature}/${req.sprint}/have-any-payments-been-made-manually`) }) router.post('/have-any-payments-been-made-manually', (req, res) => { res.redirect(`/${req.feature}/${req.sprint}/set-up-a-pa...
const functions = require("firebase-functions"); const admin = require("firebase-admin"); admin.initializeApp(functions.config().firebase); const stripe = require("stripe")(functions.config().stripe.token); exports.stripeCharge = functions.firestore .document("/Payments/{paymentId}") .onCreate(async (event, con...
import { Scene, Marker } from '@antv/l7'; import { GaodeMap } from '@antv/l7-maps'; import * as G2 from '@antv/g2'; const scene = new Scene({ id: 'map', map: new GaodeMap({ style: 'light', center: [ 2.6125016864608597, 49.359131 ], pitch: 0, zoom: 4.19 }) }); scene.on('loaded', () => { addChart...
from django.contrib import admin from django.contrib.auth import admin as auth_admin from django.contrib.auth import get_user_model from conference_scrapper.users.forms import UserChangeForm, UserCreationForm User = get_user_model() @admin.register(User) class UserAdmin(auth_admin.UserAdmin): form = UserChang...
/*! * # Semantic UI 2.1.2 - Search * http://github.com/semantic-org/semantic-ui/ * * * Copyright 2015 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(e,t,s,n){"use strict";e.fn.search=function(r){var a,i=e(this),c=i.selector||"",o=(new Date).getTime(),u=[],l=ar...
# -*- coding: utf-8 -*- import mock import time import lumbermill.utils.DictUtils as DictUtils from tests.ModuleBaseTestCase import ModuleBaseTestCase from lumbermill.misc import Tarpit class TestTarpit(ModuleBaseTestCase): def setUp(self): super(TestTarpit, self).setUp(Tarpit.Tarpit(mock.Mock())) d...
""" Project Euler Problem 10: https://projecteuler.net/problem=10 Summation of primes The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. References: - https://en.wikipedia.org/wiki/Prime_number """ from math import sqrt def is_prime(n: int) -> bool: ""...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
import Image from 'next/image'; import Link from 'next/link'; import config from '../config'; const Pixelblock = ({pixelObj}) => { if (Object.getOwnPropertyNames(pixelObj).length === 0) { return (<></>); } const originalCost = `\$${pixelObj.size}.00`; const imageUrl = `/images/pixelblocks/${p...
/* * * 给定一个包含非负整数的数组,你的任务是统计其中可以组成三角形三条边的三元组个数。 * * 示例 1: * * * 输入: [2,2,3,4] * 输出: 3 * 解释: * 有效的组合是: * 2,3,4 (使用第一个 2) * 2,3,4 (使用第二个 2) * 2,2,3 * * * 注意: * * * 数组长度不超过1000。 * 数组里整数的范围为 [0, 1000]。 * * * */
/* * coreSNTP v1.0.0 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * 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 with...
import React from "react" import ReactDOM from "react-dom" import Tooltips from "./Tooltips" it("renders without crashing", () => { const div = document.createElement("div") document.body.appendChild(div) ReactDOM.render(<Tooltips />, div) ReactDOM.unmountComponentAtNode(div) })
"""Build wheels/sdists by installing build deps to a temporary environment. """ import logging import os import shutil import sys from subprocess import check_call from sysconfig import get_paths from tempfile import mkdtemp from pip._vendor import pytoml from .wrappers import Pep517HookCaller log = logging.getLogg...
import calendar if __name__ == '__main__': month, day, year = list(map(int, input().split(" "))) print(list(calendar.day_name)[calendar.weekday(year, month, day)].upper())
from __future__ import division def kin_vec(start_key, start_xyz, end_key, end_xyz, width=None): start_altloc = start_key[0:1] if start_altloc == ' ': start_altloc_txt = "" else: start_altloc_txt = " '%s'" % start_altloc.lower() end_altloc = end_key[0:1] if end_altloc == ' ': end_altloc_txt = "" ...
import Vue from "vue"; import { Pagination, Dialog, Autocomplete, Dropdown, DropdownMenu, DropdownItem, Menu, Submenu, MenuItem, MenuItemGroup, Input, InputNumber, Radio, RadioGroup, RadioButton, Checkbox, CheckboxButton, CheckboxGroup, Switch, Select, Option, OptionGroup, Button, ButtonGroup, ...
export function shotImage (shot) { const uri = shot.images.normal ? shot.images.normal : shot.images.teaser return { uri } } export function authorAvatar (player) { var uri; if (player) { uri = player.avatar_url return { uri } } else { uri = require('../styles/AuthorAvatar.png') return uri ...
/* eslint-env mocha */ /* eslint-disable func-names */ import { expect } from 'chai'; import { sum } from 'meteor/nog-example-2'; import { fakeOne, fakeTwo } from './testlib.js'; function describeCommonTests() { describe('common tests', function () { it('has sum()', function () { expect(sum(fakeOne, fake...
from pytest import fixture from starlette.config import environ from starlette.testclient import TestClient from app.db.mongodb import get_database from app.core.config import database_name, users_collection_name @fixture(scope="session") def test_user(): return { "user": { "email": "user1@exa...
'use strict'; // Call this function when the page loads (the "ready" event) $(document).ready(function() { initializePage(); }) /* * Function that is called when the document is ready. */ function initializePage() { console.log("Javascript connected!"); $('.friend-name').click(changeText); } function anagrammed...
import Vue from 'vue'; import Flash from '../../../flash'; import { __ } from '../../../locale'; import './lists_dropdown'; import { pluralize } from '../../../lib/utils/text_utility'; import ModalStore from '../../stores/modal_store'; import modalMixin from '../../mixins/modal_mixins'; gl.issueBoards.ModalFooter = Vu...
import os import arcpy from arcpy import env import time def splitGDB2(inputGDB,inputFrame,splitField,outputDir): # Get FCs to be cliped env.workspace = inputGDB inputFCs = arcpy.ListFeatureClasses() countFCs =len(inputFCs) cursor = arcpy.da.SearchCursor(inputFrame,["TID","SHAPE@"]) index...
from dagster import ( Array, Field, ModeDefinition, Noneable, ScalarUnion, Selector, Shape, pipeline, resource, solid, ) from dagster.config.config_type import ConfigTypeKind from dagster.config.field import resolve_to_config_type from dagster.core.snap import build_config_schema...
import * as React from "react" import Layout from "../components/layout" const AboutPage = () => { return ( <Layout pageTitle="About Me"> <p> Hi there! I'm the proud creator of this site, which I guilt with Gatsby. </p> </Layout> ) } export default AboutPage
""" this code is modified from https://github.com/utkuozbulak/pytorch-cnn-visualizations original author: Utku Ozbulak - github.com/utkuozbulak """ import sys sys.path.append("..") import torch from src.utils import tensor2cuda, one_hot class VanillaBackprop(): """ Produces gradients generated with van...
from setuptools import find_packages, setup setup( name="mypkg", version="0.0.1", description="", author="", url="", author_email="", license="MIT", install_requires=[ "pytest", "black", "blackdoc", "flake8", "mypy", "isort", ], pa...
/** * Generated by `createschema ticket.TicketComment 'ticket:Relationship:Ticket:CASCADE; user:Relationship:User:CASCADE; content:Text;'` */ const faker = require('faker') const { updateTestOrganizationEmployee } = require('@condo/domains/organization/utils/testSchema') const { createTestOrganizationWithAccessToAno...
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance w...
# coding=utf-8 # Copyright 2022 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 ...
import { Meal } from '../models' import { Op } from 'sequelize' import upload from '../services/upload' const getMeals = async (req, res) => { const { authUser } = req const meals = await authUser.getMeals({ attributes: ['mealId', 'name', 'price', 'imgUrl', 'description', 'ingredients', 'weight'] }) return res.s...
import request from '@/utils/request' export default { // 讲师列表 getTeacherListPage(current, limit, teacherQuery) { return request({ url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`, method: 'post', data: teacherQuery }) }, // 删除讲师 removeById(teacherId) { return...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ re...
$(document).ready(function(){ $('.users .del').live('click', function(){ if (!confirm($(this).attr('data-confirm'))) { return false; } }); });
# Copyright (c) 2015 SONATA-NFV, 5GTANGO, UBIWHERE, Paderborn University # 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...
import json import requests class TelegramAPI: def __init__(self, TOKEN): self.TOKEN = TOKEN self.URL = 'https://api.telegram.org/bot' + TOKEN + '/' def Update(self): resp = requests.get(self.URL+'getUpdates') r_json = resp.content.decode('utf8') r_dict = json.loads(r_json) return r_dict def readLastM...
/** * @author muwoo * Date: 2018/7/12 */ import {Super} from './super' import {constants} from '../utils' export class Text extends Super { constructor(drawStyle, text) { super(drawStyle) this.text = text this.font = this.drawStyle['font-size'] || this.drawStyle['fontSize'] || 12 this.height = thi...
# Copyright 2017 Google Inc. 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 applicable law or a...
/* eslint-disable @typescript-eslint/no-use-before-define */ /* eslint-disable @typescript-eslint/no-var-requires */ const {Expression, SimpleObjectMemory, FunctionUtils, Options } = require('../lib'); var {TimexProperty} = require('@microsoft/recognizers-text-data-types-timex-expression'); const assert = require('asse...
$(document).mouseup(function (e) { if (!$(".tree-menu").is(e.target) && $(".tree-menu").has(e.target).length === 0) { $(".tree-menu").removeClass("is-active"); } }); $(document).on("click", ".input-search", function () { $(".tree").find("ul").hide(); $(".tree-menu").removeClass("no-active"); ...
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
define(['ash'], function (Ash) { var ButtonHelper = Ash.Class.extend({ constructor: function (levelHelper) { this.levelHelper = levelHelper; }, getButtonSectorEntity: function (button) { var sector = $(button).attr("sector"); var sectorEntity = null...
'use strict'; const { getValueAsString } = require('./util'); function escapeString(str) { return str.replace(/\n/g, '\\n').replace(/\\(?!n)/g, '\\\\'); } function escapeLabelValue(str) { if (typeof str !== 'string') { return str; } return escapeString(str).replace(/"/g, '\\"'); } class Registry { constructor(...
""" Properties of the system """ from __future__ import division from pyomo.environ import ConcreteModel def get_model_with_properties(): """Attach properties to the model.""" m = ConcreteModel() # ------------------------------------------------------------------ # ...
_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[43],{Ix5F:function(e,s,c){"use strict";var t=c("nKUr"),a=(c("q1tI"),c("YFqc")),r=c.n(a);s.a=function(e){var s=e.pageTitle,c=e.homePageUrl,a=e.homePageText,n=e.activePageText;return Object(t.jsxs)("div",{className:"page-title-area",children:[Object(t.jsx)...
// Copyright 2013 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. #ifndef ASH_WM_MRU_WINDOW_TRACKER_H_ #define ASH_WM_MRU_WINDOW_TRACKER_H_ #include <vector> #include "ash/ash_export.h" #include "base/macros.h" #includ...
import getIchefUrl from './ichefUrl'; const createSrcset = ( originCode, locator, originalImageWidth, resolutions = [240, 320, 480, 624, 800], ) => { if (originCode === 'pips') { return null; } const requiredResolutions = resolutions.filter( resolution => resolution <= originalImageWidth, ); ...
import React from "react"; const Container = ({ children, spacing = false, x = 1, ...props }) => { const paddingInPx = 42; return ( <div className="quikkontainer" {...props}> {children} <style jsx>{` .quikkontainer { height: 100%; width: 100%; padding: ${spacin...
import zope.interface, logging from Houdini.Plugins import Plugin from Houdini.Handlers import Handlers from Houdini.Events import Events class Example(object): zope.interface.implements(Plugin) author = "Houdini Team" version = 0.1 description = "A plugin to verify plugin system functionality and dem...
############################################################### Sort ############################################### data = [1,4,2,3,5,9,8,7,0,6] # Sort data.sort() data.sort(reverse=True) # Create a new sorted data without sort old data d = sorted(data) #############################################################...
if(typeof cptable === 'undefined') cptable = {}; cptable[1253] = (function(){ var d = "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[...
#pragma once #include "PWidgetHLI.h" #include "PSliderEdit.h" CreateHLI(PDoubleSliderEdit, double); CreateHLI(PIntegerSliderEdit, long);
// --------------------------------------------------------- // KFixpal // // kfixcore.h // // By Kronoman - In loving memory of my father // Core functions to quantize and convert images // Revision: October-2003 // --------------------------------------------------------- #ifndef KFIXCORE_H #define KFIXCORE_H #incl...
n = int(input("Enter number : \t")) temp = n rev = 0 while(n>0): d = n%10 rev = rev*10+d n= n//10 if(temp==rev): print("The number is palindrome") else: print("The number is not palindrome")
"""Tests for :mod:`sitemap.serialize`.""" from unittest import TestCase, mock import os from xml.etree import ElementTree as etree import io from .. import serialize, load DATA_PATH = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'data') class TestSitemapXML(TestCase): """Tests for XML serializatio...
//// [augmentedTypesModules.js] var m1 = 1; var m1a; (function (m1a) { var y = 2; })(m1a || (m1a = {})); var m1a = 1; var m1b; (function (m1b) { m1b.y = 2; })(m1b || (m1b = {})); var m1b = 1; var m1c = 1; var m1d; (function (m1d) { var I = (function () { function I() { ...
import logging import numbers import uuid from abc import ABCMeta, abstractmethod from collections import defaultdict from datetime import datetime, timedelta from django.conf import settings from django.utils.translation import ugettext from lxml.builder import E from casexml.apps.phone.fixtures import FixtureProvi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def forwards_func(apps, schema_editor): EmailTemplate = apps.get_model("konfera", "EmailTemplate") db_alias = schema_editor.connection.alias text = """Dear {first_name} {last_name},\n\n order with your ticket...
const cards = document.querySelectorAll('.memory-card'); let flipLock = false; // this is to prevent a third card from flipping let hasFlipped = false; let firstCard, secondCard; // defining function to flip the cards function flipCard() { if (flipLock) return; if (this === firstCard) return; this....
# -*- coding: utf-8 -*- """User Route for Demo application.""" from flask import Blueprint from flask import Flask, request, jsonify, url_for, send_file from server.app.api import api from server.app.models.document import Document from server.app.models.content_element import ContentElement from server.app.services...
/** * Copyright 2021 Huawei Technologies Co., Ltd * * 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...
// // UIBarButtonItem+UIBarButtonItem_CustomImage.h // // Created by Tyler Barth on 2013-01-25. // // // Trying this http://stackoverflow.com/a/13626345/1016515 #import <UIKit/UIKit.h> @interface UIBarButtonItem (UIBarButtonItem_CustomImage) + (UIBarButtonItem*)barItemWithImage:(UIImage*)image target:(id)target act...
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from .const import USERNAME_BLACKLIST REGEX_EMAIL = re.compile(r'^(([^<>()[\]\\.,;:\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,}))$') REGEX_USERNAME = re.compile(r'^[A-Za-z0...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ Boot session from cache or build Session bootstraps info needed by common client side activities including permission, homepage, default variables, system defaults etc """ im...
""" Created on 19 Feb 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) """ from scs_core.osio.config.project_topic import ProjectTopic from scs_core.osio.data.device import Device from scs_core.osio.data.location import Location # ----------------------------------------------------------------------...
from unittest.mock import patch import unittest from jinja2 import Template from pathlib import Path import portinus class TestMonitorInit(unittest.TestCase): def setUp(self): pass @patch('systemd_unit.Unit') def test_init(self, fake_unit): res = portinus.monitor.Service('foo') @pa...
#!/usr/bin/env python # Wenchang Yang (wenchang@princeton.edu) # Thu Aug 8 11:18:41 EDT 2019 from .xlib.detrend import detrend from .xlib.find_peaks import find_peaks from .xlib.linregress import linregress from .xlib.power_spectrum import power_spectrum
import torch import torch.nn as nn import torch.nn.init as init import torch.nn.functional as F from collections import OrderedDict from torchvision.models import resnet18 class DefaultCNN(nn.Module): def __init__(self, imgH, nc, leakyRelu=False): super(DefaultCNN, self).__init__() assert imgH % 16...
from itertools import count import os import csv import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import imageio import math from .plot_ss import * def count_line(file_path): with open(file_path) as f: for line_count, _ in enumerate(f, 1): ...
'use strict'; var browserify = require('browserify') , del = require('del') , source = require('vinyl-source-stream') , vinylPaths = require('vinyl-paths') , gulp = require('gulp'); // Load all gulp plugins listed in package.json var gulpPlugins = require('gulp-load-plugins')({ pattern: ['gulp-*', 'gulp.*']...
#!/usr/bin/env python #-*-coding:utf-8-*- import rospy import math import tf2_ros from tf.transformations import euler_from_quaternion from std_msgs.msg import Float64 from geometry_msgs.msg import Twist from sensor_msgs.msg import Imu, JointState from nav_msgs.msg import Odometry from geometry_msgs.msg import Transfo...
// // -- An infix to postfix converter -- // #include <stdio.h> #include <str.h> // Template signatures can be renamed, such that long form // lst_str_push_back(lst_str*, ...) can be replaced with // the a convenient ls_push_back(ls*, ...). #define lst_str ls #define T str #include <lst.h> #define stk_str ss #defi...
!function(e){e&&e.prototype&&null==e.prototype.lastElementChild&&Object.defineProperty(e.prototype,"lastElementChild",{get:function(){for(var e,t=this.childNodes,n=t.length-1;e=t[n--];)if(1===e.nodeType)return e;return null}})}(window.Node||window.Element);
import React from 'react' import Searchbox from '../components/Searchbox' class PageNavigation extends React.Component { goBack(e) { e.preventDefault(); window.history.go(-1); } goForwards(e) { e.preventDefault(); window.history.go(1); } render() { return (...
import tensorflow as tf import numpy as np from tfdet.core.anchor import generate_anchors from ..head.retina import ClassNet, BoxNet from ..neck import FeatureAlign, fpn def conv(filters, kernel_size, strides = 1, padding = "same", use_bias = True, kernel_initializer = "he_normal", **kwargs): return tf.keras.laye...
#!/usr/bin/env python3 # # Copyright 2019-2020 PSB # # 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 ...
import anime from 'animejs'; const where = (e) => { return (e[1] + e[0]) / 2; } const translateY = (mv, t, crv) => { switch (crv) { case "cubic": return ( [ { value: [mv[0], mv[1]], duration: t * 3.5, easing: "easeInOutCubic", }, ]...
# coding=utf-8 # # @lc app=leetcode id=63 lang=python # # [63] Unique Paths II # # https://leetcode.com/problems/unique-paths-ii/description/ # # algorithms # Medium (33.22%) # Likes: 950 # Dislikes: 153 # Total Accepted: 216.2K # Total Submissions: 643.1K # Testcase Example: '[[0,0,0],[0,1,0],[0,0,0]]' # # A ro...
var Language = function(language) { for (var k of Object.keys(language)) { if(!this[k]) this[k] = ko.observable(language[k]); } // this.name = ko.observable(language.name); // this.credit = ko.observable(language.credit); // // this.header = ko.observable(language.header); }; var ViewModel ...
#include"io.h" int main(void) { long long rd, rs, rt; long long result; rs = 0x12345678; rt = 0x87654321; result = 0x456789AB; __asm ("subqh.w %0, %1, %2\n\t" : "=r"(rd) : "r"(rs), "r"(rt) ); if (rd != result) { printf("subqh.w error\n"); ...
import React, { useState, useEffect } from "react"; import ChartUtil from "./ChartUtil"; import CountryOptions from "./CountryOptions"; import { connect } from "react-redux"; import { getChartData } from "../../Redux/actionCreators"; const Chart = (props) => { const { chart_data } = props.ChartData; const { getCha...
import React, { Component } from 'react'; import { Redirect } from 'react-router'; import ServiceParameterItem from './ServiceParameterItem'; import { Button, Card, CardBody, CardFooter, CardHeader, Col, Form, FormGroup, Input, Label, Row, } from 'reactstrap'; import { dele...
str = "this is string example....wow!!!"; print (str.swapcase())
/** * 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 */ 'use strict'; const _require = require('../utils.js'), getValueFromTypes = _require.getValueFromTypes; functio...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Partially based on AboutMethods in the Ruby Koans # from runner.koan import * def my_global_function(a,b): return a + b class AboutMethods(Koan): def test_calling_a_global_function(self): self.assertEqual(5, my_global_function(2,3)) # NOTE: Wron...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import torch from torch import nn from torch.nn import functional as F from iPerceive.modeling import registry from iPerceive.modeling.backbone import resnet from iPerceive.modeling.poolers import Pooler from iPerceive.modeling.make_layers import ...
#!/bin/env python # Read the CMU pronounciation dictionary, count syllables (throwing away # phoneme and stress information), and pickle the result. # # # Copyright (c) 2009, Jonathan Feinberg <jdf@pobox.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # ...
//Antiquated New Account Schema export default { //Login Info email: "", password: "", securityCode: "", //Basic Info firstName: "", lastName: "", redId: "", major: "", dateJoined: "", school: "San Diego State University", //AGL Info username: "", roles: ["Undecided"], bio: "hi, im new!...
export * from './pipeline' export * from './applyToFunc' export * from './checkCall' export * from './complement' export * from './compareTo' export * from './isOrderable' export * from './eitherFunc' export * from './debounce' export * from './doIt' export * from './hasDomAccess' export * from './identity' export * fr...
// @flow import * as React from 'react' import * as Styles from '../../styles' import * as Kb from '../../common-adapters' import flags from '../../util/feature-flags' export type TlfProps = { openInFilesTab: () => void, isPublic: boolean, isSelf: boolean, text: string, } const Tlf = (props: TlfProps) => ( ...
import torch from tqdm import tqdm import time from torch.utils.data import Dataset, DataLoader from bert_seq2seq import Tokenizer, load_chinese_base_vocab from bert_seq2seq import load_bert data_path = "./corpus/相似句/simtrain_to05sts.txt" vocab_path = "./state_dict/roberta_wwm_vocab.txt" # roberta模型字典的位置 word2idx = l...
// JavaScript implementation of selection sort // // Author: Niezwan Abdul Wahid function selectionSort(arr){ let min, temp; let len = arr.length; for(let i = 0; i < len; i++){ min = i; for(let j = i+1; j<len; j++){ if(arr[j]<arr[min]){ min = j; } } temp = arr[i]; ar...
/** * Implement Gatsby's Browser APIs in this file. * * See: https://www.gatsbyjs.com/docs/browser-apis/ */ // You can delete this file if you're not using it const { createGlobalStyle } = require('styled-components') const React = require("react") const Layout = require("./src/components/layout").default const ...
exports.paragraph = paragraph; exports.run = run; exports.table = table; exports.bold = new Matcher("bold"); exports.italic = new Matcher("italic"); exports.underline = new Matcher("underline"); exports.strikethrough = new Matcher("strikethrough"); exports.smallCaps = new Matcher("smallCaps"); exports.commentReference ...
import { Block, View, Video } from '@tarojs/components' import Taro from '@tarojs/taro' import withWeapp from '@tarojs/with-weapp' import './index.scss' @withWeapp('Component') class _C extends Taro.Component { static defaultProps = { url: null } static externalClasses = ['mask-class', 'container-class'] _...
""" API for yt.frontends.athena++ """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #-------------...