text
stringlengths
1
1.05M
$ v run recursion.v 5040
package api import ( "encoding/json" "fmt" "net/http" "github.com/ManuStoessel/wirvsvirus/backend/entity" "github.com/gorilla/mux" log "github.com/sirupsen/logrus" ) func getUser(w http.ResponseWriter, r *http.Request) { queries := mux.Vars(r) w.Header().Set("Content-Type", "application/json") if id, ok :...
import hashlib import json import six from copy import copy from datetime import datetime from itertools import product from logging import getLogger from threading import Thread, Event from time import time from typing import List, Set, Union, Any, Sequence, Optional, Mapping, Callable from .job import TrainsJob from...
package com.java.study.algorithm.zuo.dadvanced.advanced_class_01; import java.util.Objects; /** * 给一个字符串str,代表一个整数,找到除了这个数之外,绝对值和这个数相差 最小的回文数。 * 例如: * str = “123” * 返回“121” * 注意: 假设字符串str一定能变成long类型 */ public class Code_07_Find_the_Closest_Palindrome4 { public static String Find_the_Closest_Palindrome(Stri...
/* * Copyright 2011 <NAME> * * 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 ...
/*! * \file * \author <NAME> * \date 20.10.2012 */ #ifndef _MESSAGE_ #define _MESSAGE_ #include <iostream> /*! for the simplified construction of a Message use this Macro*/ #define _ping_ __FILE__, __LINE__ namespace spectral { /*! @brief class intended for the use in throw statements * * @ingroup exception...
<reponame>isandlaTech/cohorte-runtime /** * File: AbstractExtensibleSCAElement.java * Author: <NAME> * Date: 6 janv. 2012 */ package org.psem2m.sca.converter.model; /** * Basic class for extensible SCA elements * * @author <NAME> */ public abstract class AbstractExtensibleSCAElement extends AbstractSCAEle...
<filename>app/routes/posts.server.routes.js 'use strict'; module.exports = function(app) { var users = require('../../app/controllers/users.server.controller'); var posts = require('../../app/controllers/posts.server.controller'); // Posts Routes app.route('/posts') .get(posts.list) .post(users.requiresLogin,...
void initTestCase() { // Implement the initialization of the test case environment here // This could include setting up mock objects, initializing variables, opening files, etc. // For example: // MockObject::initialize(); // TestEnvironment::setup(); // FileHandler::openFile("testfile.txt"); }
<gh_stars>1-10 import { Nullable } from "@babylonjs/core/types"; import { Matrix, Vector2 } from "@babylonjs/core/Maths/math.vector"; import { Color3 } from "@babylonjs/core/Maths/math.color"; import { IAnimatable } from '@babylonjs/core/Animations/animatable.interface'; import { SmartArray } from "@babylonjs/core/Misc...
#!/usr/bin/env bash set -eu -o pipefail # -e: exits if a command fails # -u: errors if an variable is referenced before being set # -o pipefail: causes a pipeline to produce a failure return code if any command errors readonly PACKAGES=${@:?"No package names specified"} readonly RULES_NODEJS_DIR=$(cd $(dirname "$0")...
/*: * @plugindesc <RS_MultiTouch> * @author biud436 * @help * This plugin allows you to make sure that interact three finger or more in the touch screen-based devices. * But Just remember that this plugin is not finished a development yet, so maybe it is a lot of bugs. * * Here is a list of available functions....
# optimized algorithm using dynamic programming def fibonacci(n): # intialize array for memoization memo = [0] * (n+1) # base cases memo[0] = 0 memo[1] = 1 # fill the memo array for i in range(2, n+1): memo[i] = memo[i-1] + memo[i-2] # return the last element of the memo ar...
package flect import "unicode" // Capitalize will cap the first letter of string // user = User // <NAME> = <NAME> // widget_id = Widget_id func Capitalize(s string) string { return New(s).Capitalize().String() } // Capitalize will cap the first letter of string // user = User // <NAME> = <NAME> // widget_id = Widg...
import React from 'react'; import { useDispatch } from 'react-redux'; import { deleteContact } from '../redux/contact/contact'; const ContactItem = (props: ContactItemProps) => { const dispatch = useDispatch(); const deleteFromContact = (contact: Contact) => { dispatch(deleteContact(contact)); }; return ( ...
import simple_test def run_test(): test_name = "test29" command_line_args = ["-h"] test_output = simple_test.test(test_name, command_line_args) print(test_output) run_test()
import { newIndex } from './constants.js'; //REGION LINE GRAPH export default class LineGraph { constructor(regionCount) { if(regionCount[0].name === "Hokkaido") { const array_1 = regionCount[0].dailyConfirmedCount; const straw5 = array_1.map(i => i / 2); ...
/* * @Descripttion: 地图 * @version: 1.0.0 * @Author: LSC * @Date: 2021-06-10 10:06:31 * @LastEditors: LSC * @LastEditTime: 2021-06-10 10:13:53 */ import view from '@/components/view.vue' export default { title: '地图分布', path: 'mapDistribution', name: 'mapDistribution', component: view, children: [ { ...
#!/bin/bash declare -r JBOL='/usr/local/share/jbol' for t in *.json do #echo $t 1>&2 jq -L $JBOL \ --arg TEST $t \ --from-file run.jq \ --raw-output \ $t echo done | grep . # vim:syntax=sh:ai:sw=4:ts=4:et
<reponame>rafaeltorquato/javaee7-template //package study.client.jaxws; // //public class PersonJaxWsClient { // // /** // * @param args the command line arguments // */ // public static void main(String[] args) { // listAllPersons(); // } // // private static void listAllPersons() { // ...
import Phaser from 'phaser' export default class CallbackParameters extends Phaser.Scene { preload() { this.load.atlas('gems','/assets/tests/columns/gems.png','/assets/tests/columns/gems.json') } create() { const marker = this.add.sprite(400, 400, 'gems', 'ruby_0000') const animConfig: Phaser.Types.Animat...
# -*- coding: utf-8 -*- # # Copyright (c) 2017 - 2019 Karlsruhe Institute of Technology - Steinbuch Centre for Computing # This code is distributed under the MIT License # Please, see the LICENSE file # # Created on Thu Feb 28 09:18:17 2019 # @author: valentin.kozlov # # 1. (done) Set number of requests # 2. (done) Re...
cleos push action blockcoined close '{"host":"eoszhiminzou", "challenger":"bob"}' -p eoszhiminzou@active
require 'rails_helper' RSpec.describe ProviderInterface::ConditionsComponent do describe 'rendered component' do let(:conditions) { ['Fitness to teach check'] } it 'renders the conditions' do application_with_conditions_met = build(:application_choice, status: 'recruited', offer: { 'conditions' => con...
#!/bin/bash # Don't show items on Desktop defaults write com.apple.finder CreateDesktop -bool false # Open a new Finder window in home directory defaults write com.apple.finder NewWindowTarget -string "PfHm" defaults write com.apple.finder NewWindowTargetPath -string "file://${HOME}/" # Show all files defaults write...
<reponame>Josephat-n/worthit from django.test import TestCase from .models import Profile, Project from django.contrib.auth.models import User # Create your tests here. class ProfileTestClass(TestCase): # Setup Method def setUp(self): # self.name=User(id = 1) self.profile_one=Profile(bio= '<PASSWORD>...
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <stdbool.h> #include <time.h> #define SERVER_PORT 1500 //porta do servidor(padronizada) #...
package net.anatolich.subscriptions.security.domain.model; import javax.persistence.Embeddable; import lombok.AccessLevel; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; /** * Value class to hold an identifier of the current user. */ @Embeddable @NoAr...
from typing import List, Tuple, Dict def find_highest_versions(file_list: List[Tuple[str, int]]) -> Dict[str, int]: highest_versions = {} for file, version in file_list: if file in highest_versions: highest_versions[file] = max(highest_versions[file], version) else: high...
#!/bin/bash while [[ $# > 1 ]] do key="$1" case $key in -c|--config) CONFIGFILE="$2" shift ;; *) # unknown option ;; esac shift done source ${CONFIGFILE} echo "Setting up swap space..." fallocate -l 8G /swapfile chmod 600 /swapfile mkswap /swapfile swapon /swapfile echo "Setting...
package org.multibit.hd.ui.models; /** * <p>Interface to provide the following to UI:</p> * <ul> * <li>Identification of generic Model</li> * </ul> * * @since 0.0.1 * */ public interface Model<M> { /** * @return The value of the model (usually user data) */ M getValue(); /** * @param value The...
<filename>src/pages/Experience7/index.js<gh_stars>0 /** * @module Experiences/Experience0 */ import React, { Profiler } from 'react' import { Observable, Subject } from 'rxjs' const onRender = (id, phase, actualDuration) => { console.log(id, phase, actualDuration) } const subject = new Subject() subject.subscrib...
#!/bin/bash # This script will generate dummy PNG icons from a set of SVG files. # Only run this once after cloning. cd -P "$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" # check utils for i in inkscape convert; do type $i &>/dev/null [ $? -ne 0 ] && echo "ERROR: \`$i\` not found." >&2 && exit 1 done _confirm_...
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { GooseGameEditorComponentModule } from './goose-game/components/goose-game-editor/goose-game-editor.module'; import { MemoryGameEditorPageModule } from './memory-game/components/memory-game-editor/memory-game-editor.module...
# Gemfile gem 'devise' # command line bundle install rails generate devise:install rails generate devise User rake db:migrate # routes.rb Rails.application.routes.draw do devise_for :users # other routes end # controller class ApplicationController < ActionController::Base before_action :authenticate_user! end
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestClassifier # Load and clean the data data = pd.read_csv('patient_data.csv') data.dropna(inplace=True) # Define the X and y datasets X = data.drop(columns=['has_heart_attack']) y = data['has_heart_attack'] # Instantiate the model model = ...
/* micropolisJS. Adapted by <NAME> from Micropolis. * * This code is released under the GNU GPL v3, with some additional terms. * Please see the files LICENSE and COPYING for details. Alternatively, * consult http://micropolisjs.graememcc.co.uk/LICENSE and * http://micropolisjs.graememcc.co.uk/COPYING * */ Micr...
import { Address } from '@graphprotocol/graph-ts' import { DistributedReward, RemovedFundManager, Whitelisted, } from '../../generated/RewardsDistributor/RewardsDistributor' import { StakingRewards as StakingRewardsTemplate, StakingRewardsWithPlatformToken as StakingRewardsWithPlatformTokenTemplate, } from '....
$gate->define('read-work', function($user, $work){ return $user->id === $work->user_id; });
<reponame>df-service-e2e-test/x_khu2_9th_stress_test_5<gh_stars>1-10 /* * Copyright (c) 2008-2019, Hazelcast, 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 *...
class ForemanSubnetModule(ParametersMixin, ForemanTaxonomicEntityAnsibleModule): def __init__(self, parameters): super().__init__(parameters) # Initialize the subnet module with the given parameters # Additional initialization code as per requirements def configure_subnet(self, subnet_i...
package com.goranzuri.anime.anidb.resolve.service; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserC...
$(document).ready(function () { $('#serviceForm').off().submit(e => { e.preventDefault(); createServiceRequest(); }); getServiceRequest(); pagination.getFn(getServiceRequest); }); let keyword = ''; async function createServiceRequest() { const Service = new FormData($('#serviceForm')...
<gh_stars>0 """NVIDIA Autonomous Driving Dataset. Written by <NAME> BoxParser written by <NAME> Copyright (c) 2020 NVIDIA CORPORATION. All rights reserved. This is v2, removing to rgb because the data is rgb """ from copy import deepcopy import os from pathlib import Path from PIL import Image # import sys # sys...
#!/usr/bin/env bash # Make sure we exit if there is a failure set -e function usage() { echo "Usage: $0 [--disable-inlining] [--ipdse] [--ai-dce] [--devirt VAL1] [--inter-spec VAL2] [--intra-spec VAL2] [--help]" echo " VAL1=none|dsa|cha_dsa" echo " VAL2=none|aggressive|nonrec-aggressive" }...
import 'materialize-css/dist/js/materialize'; import '../scss/dashboard.scss'; import './components';
!function() { function debug(str) { //dump('mozIccManager: ' + str + '\n'); } var iccs = { 111: { _retryCount: 3, cardState: 'ready', iccInfo: { iccid: true, msisdn: '5555555555' }, setCardLock: function() { debug('setCardLock'); }, getCa...
SHORT_COMMIT_ID=$(git rev-parse --short HEAD) npm install -g appdmg mkdir -p _publish appdmg _release/appdmg.json _publish/Onivim2-$SHORT_COMMIT_ID.dmg tar -C _release -cvzf _publish/Onivim2-$SHORT_COMMIT_ID-darwin.tar.gz Onivim2.app
package dijkstra; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import model.Grafo; import model.Vertice; public class Dijkstra { private static Dijkstra dijkstra; private G...
<reponame>DawChihLiou/ci-boilerplate<filename>app/js/home/index.spec.js import React from 'react'; import Home from './index'; import { shallow } from 'enzyme'; describe('<Home />', () => { const home = shallow(<Home />); it('should have one header', () => { expect(home.find('h1').length).toBe(1); }); it...
<reponame>snowwayne1231/WerewolfHelper<gh_stars>0 // Import F7 import Framework7 from 'framework7/framework7.esm.bundle.js'; // Import F7 Styles import 'framework7/css/framework7.bundle.css'; // Import Icons and App Custom Styles import './css/icons.css'; import './css/app.css'; import './stylus/app.styl'; // Import...
# -*- coding: utf-8 -*- # @Time : 2022/3/7 19:18 # @Author : hyx # @File : page.py # @desc : web page implement import json import time from urllib.parse import urlparse import flybirds.core.global_resource as global_resource import flybirds.core.global_resource as gr import flybirds.utils.flybirds_log as log import f...
/* * CPAchecker is a tool for configurable software verification. * This file is part of CPAchecker. * * Copyright (C) 2007-2014 <NAME> * 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...
<gh_stars>10-100 import { Component } from '@angular/core'; import { ResponsibleParty } from '../../../model/iso'; import { ContactList } from '../../../model/sml'; import { ConfigurationService } from '../../../services/ConfigurationService'; import { VocabularyType } from '../../../services/vocabulary/model'; import...
<reponame>newave986/highlighter import React, { useEffect, useState } from "react"; import { Route, Link, useHistory, useLocation } from "react-router-dom"; import './showResult.css'; import axios from "axios"; import Loading from './components/loading'; import logoImg from "./images/logo.png"; import Facebook_logo fro...
const router = require('express').Router(); const teamController = require('../controller/teamController') /** * @swagger * /team/employs/ : * get: * tags: * - "team" * summary : Get all players of a team * responses : * 200: * description : Succesfully * 500: *...
CREATE TABLE products( id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, description TEXT NOT NULL, price DECIMAL(7,2) NOT NULL, discount FLOAT NOT NULL );
<filename>server/src/main/java/com/decathlon/ara/postman/bean/Info.java package com.decathlon.ara.postman.bean; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Wither; @Data @Wither @NoArgsC...
<filename>pinax/apps/blog/management.py from django.conf import settings from django.db.models import signals from django.utils.translation import ugettext_noop as _ if "notification" in settings.INSTALLED_APPS: from notification import models as notification def create_notice_types(app, created_models,...
timing_test(function() { at(0, function() { assert_styles( '.anim', [{'transform':'matrix(1, 0, 0, 1, 0, 0)'}, {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, {'transform':'matrix(1, 0, 0, 1, 0, 0)'}, {'transform':'matrix(1, 0, 0, 1, 0, 0)'}]); }, "Autogenerated"); at(0.4, function(...
// https://github.com/jekyll/github-metadata/blob/master/docs/site.github.md // https://octokit.github.io/rest.js/v18#repos-get-latest-release const fs = require('fs'); const path = require('path'); const { Octokit } = require('@octokit/rest'); const NodeCache = require('node-cache'); // Does the cache persist over sev...
export * from './grid'; export * from './make-theme'; export * from './media'; export * from './mixins'; export * from './native'; export * from './pagenav'; export * from './tokens/palette'; export * from './type';
<reponame>chayakornwc/Admin import React, { Component } from 'react' import ReportFilter from '../../../components/Report/ReportFilter'; import ReportTable from '../../../components/Report/ReportTable'; import {loadOrders} from '../../../redux/actions/courseorderActions'; import {loadCourse} from '../../../redux/action...
package kata.java; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import java.util.Optional; import java.util.stream.IntStream; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; public class LinkedArrayDequeTest { private LinkedArrayDeque deq...
<gh_stars>10-100 #!/usr/bin/python3 # Note: Always use unittest.sh to run the tests! import unittest from helpers.chordInterval import * from helpers.storage import Storage import datetime import imp class TestStorage(unittest.TestCase): def test_property_get(self): storage = Storage() # insert some ...
package main import ( "bytes" "fmt" "html/template" "io" "net/http" "github.com/murphybytes/saml/examples/svcprovider/generated" "github.com/pkg/errors" ) type homepageHandler struct{} func newHomepageHandler() http.Handler { return &homepageHandler{} } func (h *homepageHandler) ServeHTTP(w http.ResponseWr...
SELECT state, COUNT(*) FROM orders GROUP BY state;
<gh_stars>0 module DataImport class MyDramaList module Extractor module Helpers extend ActiveSupport::Concern private def original_for(src) src.sub(/_[a-z0-9]+\./, '_f.') end end end end end
<gh_stars>1-10 import { Colleague } from '../dist' class Tester extends Colleague { test() { this.emit('log', 'test emitted!') } } export default Tester
<gh_stars>1-10 // // NSObject+DefaultValue.h // Example // // Created by zhangferry on 2021/3/14. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN typedef NS_OPTIONS(NSUInteger, YYPropertyType) { YYPropertyTypeNone = 1 << 0, YYPropertyTypeNSString = 1 << 1, YYPropertyTypeNSNumb...
#!/bin/bash if [ -z ${1+x} ] then echo "Please define semver to release. eg: ./dockerPushImages.sh 1.0.1" exit 1 else echo "pushing versions to dockerhub '$1'" ../ringface-gui/dockerImagesPush.sh $1 ../ringface-classifier/dockerImagePush.sh $1 ../ringface-connector/dockerImagesPush.sh $1 fi
class MessageFormatter { private $message; private $dateCreated; private $posterName; public function setMessage($message) { $this->message = $message; } public function setDateCreated($dateCreated) { $this->dateCreated = $dateCreated; } public function setPosterName($...
import { helper } from '@ember/component/helper'; import { htmlSafe } from '@ember/string'; export function eeoHtmlSafe([str]/*, hash*/) { return htmlSafe(str); } export default helper(eeoHtmlSafe);
<reponame>maztohir/sample-sql-translator # Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_phonelink_off_outline = void 0; var ic_phonelink_off_outline = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M0 0h24v24H0V0zm0 0h24v24H0V0z", "fill": "none" }, "childr...
<filename>pecado-ims/pecado-ims-web/src/main/java/me/batizhao/ims/service/UserRoleService.java package me.batizhao.ims.service; import com.baomidou.mybatisplus.extension.service.IService; import me.batizhao.ims.api.domain.UserRole; import java.util.List; /** * @author batizhao * @since 2020-09-14 **/ public inter...
# frozen_string_literal: true # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
@Component({ selector: 'app-confirmation-button', template: ` <button (click)="showConfirmation()">Confirm</button> <div *ngIf="showDialog"> Are you sure you want to proceed? <button (click)="confirm()">Yes</button> <button (click)="cancel()">No</button> </div> ` }) export class ConfirmationButtonComponent ...
<gh_stars>1-10 def linha(): print() print('=' * 80) print() linha() ano = int(input('Ano de nascimento: ')) idade = 2021 - ano print() print(f'Você tem {idade} anos de idade.') if idade > 18: print('Já passou do tempo de se alistar') p = 2021 - (ano + 18) print(f'Faz {p} anos que você se alis...
<reponame>biril/backbone-proxy /*jshint browser:true, devel:true */ /*global define:false */ define(['backbone', 'backbone-proxy'], function (Backbone, BackboneProxy) { 'use strict'; return { run: function () { var User, user, UserProxy, userProxy; User = Backbone.Model.extend({ defaults...
import { createStore, combineReducers, applyMiddleware } from 'redux'; import thunk from 'redux-thunk'; import messageReducer from './pf-lib/message/messageReducer'; import modalReducer from './pf-lib/modal/modalReducer'; import movieReducer from './movieRating/movieReducers'; import addRatingReducer from './addRating/...
module.exports = { publicPath: "/fiks-validator/" };
#!/bin/sh # https://docs.celeryproject.org/en/latest/userguide/workers.html set -o errexit set -o nounset celery -A orm_blog.taskapp worker \ --loglevel=${CELERY_LEVEL:-INFO} \ --concurrency=${CELERY_CONCURRENCY:-2}
class Params: def __init__(self): self._params = {} def load_preprocessor_params(self, preprocessor_type): if preprocessor_type == "standard": return {"mean": 0, "std": 1} elif preprocessor_type == "min_max": return {"min_val": 0, "max_val": 1} else: ...
<reponame>mvakili/ngx-magic import { Directive, Input, Renderer2, ElementRef } from '@angular/core'; import {OrderDirection} from './../models/enum'; @Directive({ selector: '[setDirection]' }) export class DirectionDirective { constructor(private renderer: Renderer2, private el: ElementRef) { } _direction...
import React, { useState } from 'react'; function Fibonacci() { const [input, setInput] = useState(''); const [result, setResult] = useState(''); function handleChange(e) { setInput(e.target.value); } function handleSubmit(e) { e.preventDefault(); let n = input; let arr = [0, 1]; ...
<reponame>seek-oss/scoobie import 'braid-design-system/reset'; import 'loki/configure-react'; import React from 'react'; import { ReactNode } from 'react'; import { BraidArgs, MdxArgs, defaultArgTypes, defaultArgs, } from '../storybook/controls'; import { BraidStorybookProvider, MdxStorybookProvider, wi...
#! /bin/bash # Copyright 2019 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...
<filename>commonlib/src/main/java/com/common/biz/message/MessageApi.java package com.common.biz.message; /** * @author Administrator */ public interface MessageApi { }
package com.backend.fitpet.model; import java.io.Serializable; import java.util.Date; /** * Created by David on 7/11/2015. */ public class Pet implements Serializable { private String name; private double price; private Date expiryDate; private String description; private boolean enabled; pr...
<gh_stars>0 /* * Copyright (c) 2019 Ford Motor Company * * 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 appli...
def jaccard_index(str1, str2): s1 = set(str1) s2 = set(str2) x = len(s1.intersection(s2)) y = len(s1.union(s2)) return x/y
<filename>src/reader/test_cases/test_unbound_bible_import.py<gh_stars>1-10 from . import TestReader from reader.importer.unbound_bible import UnboundBibleTextImporter from reader.models import Author, Work, Division, Verse from reader.importer.batch_import import JSONImportPolicy from reader import language_tools clas...
#!/bin/bash # lokeshjindal15 # use /system/bin/sh with Asimbench disk image # use /bin/bash with arm_ubuntu_natty_headless disk image # # This is a tricky script to understand. When run in M5, it creates # a checkpoint after Linux boot up, but before any benchmarks have # been run. By playing around with environment ...
gpu=$1 shift CUDA_VISIBLE_DEVICES="$gpu" nohup /data/anaconda/envs/py35/bin/python $@ &
const grpc = require('@grpc/grpc-js'); var protoLoader = require('@grpc/proto-loader'); const PROTO_PATH = './news.proto'; const options = { keepCase: true, longs: String, enums: String, defaults: true, oneofs: true, }; var packageDefinition = protoLoader.loadSync(PROTO_PATH, options); const NewsService = ...
#!/bin/bash # # Copyright 2020 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 t...
#!/bin/bash # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. if ! [[ "$2" =~ ^(git@)?(www.)?github.com(:|/)Bitcreds/BCRS(.git)?$ ]]; then exit 0 fi while read LINE; do ...
<filename>core/src/test/java/org/mammon/math/util/PrimeFactorsTest.java<gh_stars>1-10 package org.mammon.math.util; import java.math.BigInteger; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterize...
import React from "react"; import { useFetch } from "./useFetch"; import { CountryTable } from "./CountryTable"; const App = () => { const { loading, error, data } = useFetch( "https://example.com/countries.json" ); if (loading) return <p>Loading...</p>; if (error) return <p>Error!</p>; return ( <div> <C...