text
stringlengths
1
1.05M
<reponame>AlexJenter/mr-anderson import nullMatrix from "./null"; import map from "./map"; const identity = (numRows, numCols) => map(nullMatrix(numRows, numCols), (_, rowIndex, columnIndex) => Number(rowIndex === columnIndex) ); export default identity;
# CLI support for JIRA interaction # # See README.md for details function jira() { emulate -L zsh local action jira_url jira_prefix if [[ -n "$1" ]]; then action=$1 elif [[ -f .jira-default-action ]]; then action=$(cat .jira-default-action) elif [[ -f ~/.jira-default-action ]]; then action=$(cat ...
/** * @file serial_transport_win32.c * @brief Mercury API - Serial transport over local serial port on Win32 * @author <NAME> * @date 10/20/2009 */ /* * Copyright (c) 2010 ThingMagic, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated d...
<reponame>RolandTaverner/D3dTiles<filename>D3dTiles/src/Region.cpp<gh_stars>1-10 #include "stdafx.h" #include <boost/geometry/algorithms/within.hpp> #include <boost/geometry/algorithms/overlaps.hpp> #include "D3dTiles/Region.h" #include "D3dTiles/RendererBase.h" namespace TileEngine { Region::Region() : Region(We...
<filename>test/suites/info.js const assert = require('assert'); const uuid = require('uuid'); // helpers const { startService, stopService, inspectPromise, owner, modelData, bindSend, finishUpload, processUpload, initUpload, updateAccess, } = require('../helpers/utils'); const route = 'files.info'...
#!/bin/bash set -e SCRIPT="$(readlink -f "$0")" SCRIPT_PATH="$(dirname $SCRIPT)" pushd $SCRIPT_PATH 1>&2 2>/dev/null || exit 1 #启用自建的一些方便函数 . $SCRIPT_PATH/work/tools/functions.sh #判断是否有root的权限 if ! HasRootPremission; then if IsCommandExists sudo; then sudo bash "$0" exit $? else ray_e...
package io.renren.modules.sys.controller; import java.util.Arrays; import java.util.Map; import io.renren.common.validator.ValidatorUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PathVar...
package krakend import ( "context" "fmt" amqp "github.com/devopsfaith/krakend-amqp/v2" cel "github.com/devopsfaith/krakend-cel/v2" cb "github.com/devopsfaith/krakend-circuitbreaker/v2/gobreaker/proxy" lambda "github.com/devopsfaith/krakend-lambda/v2" lua "github.com/devopsfaith/krakend-lua/v2/proxy" martian "...
<filename>src/main/java/gex/newsml/NewsMLException.java package gex.newsml; public class NewsMLException extends Exception { private static final long serialVersionUID = 1022133291415943221L; public NewsMLException(Throwable cause) { super(cause); } public NewsMLException(String message, Throwable cause) { ...
<reponame>danwatt/chain-pattern<filename>src/main/java/com/googlecode/chainpattern/impl/ChainBase.java /* * Copyright 2001-2004 The Apache Software 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 ob...
def delete_divisible_by_5(my_list): new_list = [] for i in my_list: if i % 5 != 0: new_list.append(i) return new_list # Test my_list = [1, 10, 15, 20, 25] new_list = delete_divisible_by_5(my_list) print("List after deletion: " + str(new_list))
<reponame>chirag-singhal/-Data-Structures-and-Algorithms<filename>Miscellaneous/InterviewBit/Maths/ExcelColumnNumber.cpp #include <bits/stdc++.h> int titleToNumber(std::string A) { int ans = 0; for(int i = 0; i < A.length(); i++) { ans = ans * 26 + (A[i] - 'A' + 1); } return ans; }
if [ ! -f "./package.json" ]; then echo "you should run this from project root"; exit 1; fi docker run -it -v `pwd`:/var/local libarchive-llvm
import tensorflow as tf # create the model model = tf.keras.Sequential([ tf.keras.layers.Dense(32, activation='sigmoid', input_shape=(2,)), tf.keras.layers.Dense(32, activation='sigmoid'), tf.keras.layers.Dense(1) ]) # compile the model model.compile(optimizer='adam', loss='mse', metrics=['accuracy']) ...
/* jshint strict:false, globalstrict:false */ /* global describe, it, beforeEach, inject, module */ describe('BoardCtrl', function () { var boardCtrl, scope; beforeEach(module('memory')); beforeEach(inject(function ($injector) { scope = $injector.get('$rootScope'); boardCtrl = function () { ...
#!/bin/bash set -ev #------------------------------------------------------------------------------- # Force no insight #------------------------------------------------------------------------------- mkdir -p "$HOME"/.config/configstore/ mv "$JHIPSTER_TRAVIS"/configstore/*.json "$HOME"/.config/configstore/ #---------...
# frozen_string_literal: true RSpec.describe RuboCop::Cop::Metrics::CyclomaticComplexity, :config do context 'when Max is 1' do let(:cop_config) { { 'Max' => 1 } } it 'accepts a method with no decision points' do expect_no_offenses(<<~RUBY) def method_name call_foo end ...
#!/bin/bash $DR_ENGINE $DR_HOME/dist/directory-repository.py --list $1;
# TODO: Make this compatible with rvm. # Run sudo gem on the system ruby, not the active ruby. alias sgem='sudo gem' # Find ruby file alias rfind='find . -name "*.rb" | xargs grep -n'
<reponame>lgarciaaco/cos-fleetshard package org.bf2.cos.fleetshard.operator.debezium; import io.quarkus.runtime.Quarkus; import io.quarkus.runtime.QuarkusApplication; import io.quarkus.runtime.annotations.QuarkusMain; @QuarkusMain public class Main implements QuarkusApplication { @Override public int run(Stri...
<filename>app/src/main/java/com/acmvit/acm_app/service/NetworkChangeReceiver.java package com.acmvit.acm_app.service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.util.Log; import androidx.lifecycle.LiveD...
def isPalindrome(s: str) -> bool: # Remove spaces and punctuation and convert to lowercase s = ''.join(e for e in s if e.isalnum()).lower() # Check if the string is equal to its reverse return s == s[::-1]
#!/bin/bash FILE=$1 if [[ -z $FILE ]]; then echo "usage style_check.sh <file name>" exit 1 fi filters=-readability/streams,-build/include_what_you_use,-whitespace/comments,-runtime/references,-runtime/rtti $(dirname $0)/cpplint.py --filter=${filters} "$@"
def kml2latlon(ifile): """Read lon lat from kml file with single path""" from fastkml import kml, geometry with open(ifile, 'rt') as myfile: doc = myfile.read() k = kml.KML() k.from_string(doc) features = list(k.features()) placemarks = list(features[0].features()) coordinates ...
docker push mohitsethi/simplecv:latest
<reponame>AlbertoCortes13/node const log = require('../__utils__/logger'); const seqModels = require('../__utils__/sequelizeConf'); // TODO: Identify on how to destructure this object properly // eslint-disable-next-line prefer-destructuring const userModel = seqModels.user; seqModels.sequelize.authenticate().th...
#!/bin/sh docker-compose exec -T webpage python3 manage.py updateKeycloak
<reponame>lxlx704034204/zheng-master-diy0 package com.zheng.common.util; import com.alibaba.druid.pool.DruidDataSource; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; import javax.crypto.*; import javax.crypto.spec.SecretKeySpec; import java.io.IOException; import java.io.UnsupportedEncodingException; ...
<reponame>part-blockchain/chainsqld //------------------------------------------------------------------------------ /* This file is part of rippled: https://github.com/ripple/rippled Copyright (c) 2016 Ripple Labs Inc. Permission to use, copy, modify, and/or distribute this software for any purpose w...
Ext.onReady(function () { //计薪表头 //WPQtyHeader_Model var isAdminRoot = WpConfig.UserDefault[GlobalVar.NowUserId].root == '管理员'; var EditingWQ = null; var CalInscrease = true; var TableType = '计件分成'; var OnFormInit = function () { EditingWQ = null; EditingWQ = Ext.create('WP...
#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
package com.goldencarp.lingqianbao.model.bean; /** * Created by sks on 2017/12/2. */ public class ProductBean { private String name;//产品名称 private String rate;//预期年化收益率 private int time;//投资时间 public ProductBean() { super(); } public ProductBean(String name, String rate, int time) ...
import random def random_shuffle(arr): for i in range(len(arr)-1, 0, -1): j = random.randint(0, i+1) arr[i], arr[j] = arr[j], arr[i] return arr arr = [1, 2, 3, 4, 5] random_shuffle(arr) print(arr)
<filename>source/ui/src/components/__test__/Header.test.tsx<gh_stars>1-10 // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 import { I18n } from '@aws-amplify/core'; import { render } from '@testing-library/react'; import { MemoryRouter } from 'react-router-do...
# file: src/bash/qto/funcs/dev/create-ctags.func.sh # v0.8.5 #------------------------------------------------------------------------------ # creates the ctags file for the projet #------------------------------------------------------------------------------ doCreateCtags(){ ctags --help >/dev/null 2>&1 || { d...
#!/usr/bin/env bash # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License...
/** * toNumber-funktion yksikkötestit * * @group unit */ import toNumber from "../../src/toNumber.js"; import isObject from "../../src/isObject.js"; import isSymbol from "../../src/isSymbol.js"; jest.mock("../../src/isObject.js"); jest.mock("../../src/isSymbol.js"); describe("unit/toNumber", () => { isSym...
#!/bin/sh set -e echo $BUILD_URL echo $JOB_URL echo $WORKSPACE VERSION_NAME=$(cat ./android/local.properties | grep versionName | cut -d'=' -f2) LOCAL_IP=$(ipconfig getifaddr en0) APK_PATH=app/$VERSION_NAME WEBAPP_DIR=/Users/hawk/Library/apache-tomcat-9.0.17/webapps SHARE_HOST=http://$LOCAL_IP/$APK_PATH WEB_DIR...
#!/bin/sh parallel -j 4 "export CUDA_VISIBLE_DEVICES=0,1,2,3; python -m bound experiment.target_weight_file={1} experiment.gpu_id={#} dataset=cifar10 experiment.seed=7" :::: ../scripts/cifar10/eval/seed-7/all_weights.txt
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.commonservices.generichandlers; import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler; import org.odpi.openmetadata.commonservices.repositoryhandler.RepositoryHandler; imp...
<reponame>balankarthikeyan/pencil-art-porfolio export * from './About' export * from './Header' export * from './Contact' export * from './Portfolio' export * from './GridLayout'
/** * Copyright (c) 2012-2013 <NAME> * * This file is part of css.java. * * 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 * * Unles...
var searchData= [ ['hash',['hash',['../structgeopm__region__info__s.html#a90c009e856bd20774b560ab279d35cce',1,'geopm_region_info_s']]], ['hint',['hint',['../structgeopm__region__info__s.html#ab558192f5e29fc7c5a63054bd7fc8d91',1,'geopm_region_info_s']]] ];
package com.sphereon.factom.identity.did.request; import com.sphereon.factom.identity.did.DIDVersion; import com.sphereon.factom.identity.did.IdentityFactory; import com.sphereon.factom.identity.did.entry.CreateFactomDIDEntry; import foundation.identity.did.DID; import foundation.identity.did.DIDDocument; import org.b...
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/dlp/deid.py # https://cloud.google.com/docs/authentication/production # https://cloud.google.com/dlp/docs/infotypes-reference pip install --upgrade google-cloud-dlp python deidentify_with_mask.py deid_mask \ '[PROJECT_ID]' \ 'My name is Alic...
# routes.rb Rails.application.routes.draw do # posts resource resources :posts end # posts_controller.rb class PostsController < ApplicationController # create post def create @post = Post.create(post_params) render json: @post, status: :created end # show post def show render json: Post.find(params[...
#pragma once #include <typed-geometry/types/vec.hh> namespace tg { namespace detail { template <class ScalarT> constexpr ScalarT& csubscript(vec<1, ScalarT>& v, int) { return v.x; } template <class ScalarT> constexpr ScalarT const& csubscript(vec<1, ScalarT> const& v, int) { return v.x; } template <class Scal...
<reponame>belliappa/promotego-org<filename>vendor/plugins/geokit/test/base_geocoder_test.rb require 'test/unit' require 'net/http' require 'rubygems' require 'mocha' require File.join(File.dirname(__FILE__), '../../../../config/environment') class MockSuccess < Net::HTTPSuccess #:nodoc: all def initialize end end...
#!/bin/bash set -euo pipefail anchor build mkdir -p app/src/lib/idl for file in todo; do METADATA=$(solana address -k target/deploy/${file}-keypair.json) jq --arg id ${METADATA} '. + {"metadata":{ "address": $id }}' target/idl/${file}.json > app/src/lib/idl/${file}.json done
<gh_stars>1-10 package com.zutubi.android.ant; import static java.util.Arrays.asList; import static junit.framework.Assert.assertEquals; import org.junit.Test; import java.util.ArrayList; public class VersionTest { @Test(expected = IllegalArgumentException.class) public void testParseEmpty() { new V...
<reponame>lananh265/social-network<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.steamSquare = void 0; var steamSquare = { "viewBox": "0 0 1536 1792", "children": [{ "name": "path", "attribs": { "d": "M1242 647q0-80-57-136.5t-137-56.5-136.5 57-56...
#!/bin/bash set -euo pipefail make-gitconfig() { local alias_body='' local alias_name='' local base_filename='' gitconfig_path='' local -r script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" local temp_alias_file='' local global_flg=0 local -r red=$(tput setaf 1) local ...
#!/bin/bash set -e INIT_SEM=/tmp/initialized.sem PACKAGE_FILE=Gopkg.lock log () { echo -e "\033[0;33m$(date "+%H:%M:%S")\033[0;37m ==> $1." } dependencies_up_to_date() { # It it up to date if the package file is older than # the last time the container was initialized [ ! $PACKAGE_FILE -nt $INIT_SEM ] } if [...
"use strict"; //# sourceMappingURL=my-component2.es5.js.map
#!/bin/bash cd /home/steam # perform config /bin/bash /assets/config.sh MODS=$(echo "$MODS" | sed 's|;|\\;|g') # check the setup echo "My IP = $IP" echo "Target ServerIP = $SERVER_IP" echo "Target ServerPORT = $SERVER_PORT" echo "MODS = $MODS" #tail -f /var/steam/log/console/arma3-server-console.log cd /home/stea...
<filename>cmd/applier/main.go package main import ( "flag" "fmt" "io/ioutil" "os" "path/filepath" "time" "github.com/open-cluster-management/library-go/pkg/applier" libgoclient "github.com/open-cluster-management/library-go/pkg/client" "github.com/open-cluster-management/library-go/pkg/templateprocessor" "g...
#!/bin/bash geth --rpc --rpcaddr "0.0.0.0" --rpcport "8080" --rpccorsdomain "*" --datadir "chains/devtest" --port "2402" --ipcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "db,eth,net,web3" --networkid 1001201 console
<reponame>lgoldstein/communitychest /* * */ package net.community.chest.ui.components.dialog.manifest; import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellRenderer; import net.community.chest.CoVariantReturn; import net.community.chest.ui.helpers.table.EnumTableColumn; import org.w3c.dom.Ele...
package animalfarm; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { try (BufferedReader bfr = new BufferedReader(new InputStreamReader(System.in))) { var name = bfr.readLine(); ...
package hub import ( "fmt" "sort" "strconv" ) const ( ConfigHubName = "hub.name" ConfigHubDesc = "hub.desc" ConfigHubTopic = "hub.topic" ConfigHubOwner = "hub.owner" ConfigHubWebsite = "hub.website" ConfigHubEmail = "hub.email" ConfigHubMOTD = "hub.motd" ) const ( ConfigZlibLevel = "zlib.le...
package net.ninjacat.omg.errors; import net.ninjacat.omg.conditions.Condition; import net.ninjacat.omg.conditions.Conditions; import net.ninjacat.omg.patterns.CompilingStrategy; import net.ninjacat.omg.patterns.PatternCompiler; import net.ninjacat.omg.patterns.Patterns; import org.immutables.value.Value; import org.ju...
<reponame>BrunoGrisci/EngineeringDesignusingMultiObjectiveEvolutionaryAlgorithms /* Copyright 2009-2015 <NAME> * * This file is part of the MOEA Framework. * * The MOEA Framework is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published ...
<filename>server/src/main/java/com/decathlon/ara/repository/TeamRepository.java package com.decathlon.ara.repository; import com.decathlon.ara.domain.Team; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; /** * Spring Data JPA repo...
# Sample usage of the FileMetadata class # Initialize file metadata with default creation time file1 = FileMetadata('text', filepath='example.txt', comments=['Sample file']) file1.addprop('size', '1024KB') # Initialize file metadata with specified creation time custom_time = datetime.datetime(2022, 1, 1, 12, 0, 0) fil...
<gh_stars>1-10 """ WSGI config for swhweb project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/ """ import os import sys # import paths from settings.py from .local_settings import D...
<gh_stars>0 import React from 'react'; import styled from 'styled-components'; import CurrentTime from './CurrentTime'; import Users from './Users'; const Dashboard = () => ( <> <h1>Example React App</h1> {window.env.ENABLE_DEBUG_MODE === 'true' && <div>debug mode enabled</div>} <Container> <Curre...
<html> <head> <script> function submitForm(){ // Get the values entered in the input fields let name = document.getElementById('name').value; let age = document.getElementById('age').value; let table = document.getElementById('results'); let row = table.insertRow(); let cell1...
#!/bin/bash -e install_requirements() { echo "Installing requirements" # Ubuntu's cloud images has cloud-init doing an apt-get update / upgrade on first boot echo "Waiting for apt-get update, this may take a few minutes" while pgrep apt >/dev/null 2>&1 ; do sleep 0.5 done sudo apt-get ...
<filename>DeviceCode/Drivers/Display/TX09D71VM1CCA/TX09D71VM1CCA.h //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Copyright (c) Microsoft Corporation. All rights...
#!/bin/sh docker run --rm -p 8083:8083 -p 8093:8093 \ --env AGENT_CONFIG='https://raw.githubusercontent.com/pambrose/prometheus-proxy/master/examples/simple.conf' \ --env PROXY_HOSTNAME=mymachine.lan \ pambrose/prometheus-agent:1.10.1
SELECT COUNT(*) FROM users WHERE JOINED_DATE BETWEEN '2019-12-02' AND '2019-12-31'
<gh_stars>1-10 /* * Copyright (c) 2019, FinancialForce.com, 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...
installNodeAndYarn () { echo "Installing nodejs and yarn..." sudo curl -sL https://deb.nodesource.com/setup_8.x | sudo bash - sudo apt-get install -y nodejs npm sudo curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - sudo echo "deb https://dl.yarnpkg.com/debian/ stable main" | su...
<gh_stars>1-10 package cim4j; import java.util.List; import java.util.Map; import java.util.HashMap; import cim4j.ExcitationSystemDynamics; import java.lang.ArrayIndexOutOfBoundsException; import java.lang.IllegalArgumentException; import cim4j.PU; import cim4j.Seconds; import cim4j.Boolean; /* The class represen...
# This script will use rsync to # copy the files for the Jenkins job workspace to the provided target server:directory, # excluding the files listed in exclude.txt (regular expression list) # setting proper file owner and permissions # 1 - Location of the build checkout - double quoted, no trailing slash # 2 - Rela...
import React from 'react'; import {FormGroup, Label, Col, Input } from 'reactstrap'; //renderField จะรับ props ต่างๆ ของ Field ที่ได้จาก redux-form const renderFieldGroup = ({ input, label, type, holder, meta: { touched, error } }) => { return ( <div> <FormGroup row> <Col md="2"> ...
# Copyright (c) 2013 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. #network interface on which to limit traffic IF="eth0" #limit of the network interface in question LINKCEIL="1gbit" #limit outbound B...
package auth import java.net.URI import com.gu.mediaservice.lib.argo.ArgoHelpers import com.gu.mediaservice.lib.argo.model.Link import com.gu.mediaservice.lib.auth.Authentication.{MachinePrincipal, UserPrincipal} import com.gu.mediaservice.lib.auth.provider.AuthenticationProviders import com.gu.mediaservice.lib.auth.{...
package chylex.hee.entity.projectile; import net.minecraft.client.entity.EntityClientPlayerMP; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityEnderPearl; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPl...
<reponame>linuzri/samourai-wallet-android<filename>app/src/main/java/com/samourai/codescanner/CodeScannerView.java /* * MIT License * * Copyright (c) 2017 <NAME> [<EMAIL>] * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "S...
class MappedFeatureCreatorId: def __init__(self, dataset_id): self.dataset_id = dataset_id def load_or_create(self): # Implement feature loading or creation logic based on the dataset_id # Example: Load feature data from the dataset if it exists; otherwise, create the feature data ...
from flask import Flask, request from flask_sqlalchemy import SQLAlchemy from flask_bcrypt import Bcrypt from flask_marshmallow import Marshmallow from .config import config_by_name from flask.app import Flask db = SQLAlchemy() ma = Marshmallow() flask_bcrypt = Bcrypt() def create_app(config_name: str) -> Flask: ...
<gh_stars>0 import React, { useState } from 'react'; import styled, { css, withTheme } from 'styled-components'; import { useDispatch } from 'react-redux'; import { View, Text } from 'react-native'; import { TextInput } from 'react-native-gesture-handler'; import LayoutWrapper from 'sharedUI/LayoutWrapper'; import Ico...
<gh_stars>1-10 package malte0811.controlengineering.blockentity.base; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nullable; public interface IHasMaster<T extends BlockEntity> extends IHasMasterBase { @Nullable T c...
#!/bin/bash # Copyright 2022 The BladeDISC Authors. 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 applic...
curl --include --request POST http://localhost:3000/foods \ --header "Content-Type: application/json" \ --data '{ "food" : { "desc" : "new food", "calories" : "1", "grams_per_serving" : "1", "fat_sat" : "1", "fat_mono" : "1", "fat_poly" : "1", "carbs" : "1", "sug...
#!/usr/bin/env bash # persist.sh # run container without making it a daemon - useful to see logging output # we are adding a named volume for /data in the container so the # counter persists between runs. docker run \ --rm \ -p8086:80 \ --name="chapter2" \ -v `pwd`:/home/app \ -v name:/data \ ...
class ModelProcessor: def __init__(self, input_model_path, output_results_path, input_dataset_path=None, properties=None, **kwargs) -> None: self.input_model_path = input_model_path self.output_results_path = output_results_path self.input_dataset_path = input_dataset_path ...
The best course of action for this query is to use an inner join in order to join the Employees table with the Departments table, based on the department_id of an employee. This will retrieve the employee's name, salary, and the department name associated with them.
<filename>app/components/callout/callout.rb # frozen_string_literal: true module Callout class Callout < ApplicationComponent; end end
from pioneer.das.api.interpolators import nearest_interpolator from pioneer.das.api.samples.annotations.box_3d import Box3d from pioneer.das.api.samples.annotations.box_2d import Box2d from pioneer.das.api.samples.annotations.poly_2d import Poly2d from pioneer.das.api.samples.annotations.seg_2d import Seg2d from pionee...
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # ...
#!/bin/bash rm GeoLite2-Country.mmdb.gz wget http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz gunzip GeoLite2-Country.mmdb.gz php script.php
package com.ibm.streamsx.objectstorage.writer; import static com.ibm.streamsx.objectstorage.Utils.getParamSingleBoolValue; import static com.ibm.streamsx.objectstorage.Utils.getParamSingleIntValue; import static com.ibm.streamsx.objectstorage.Utils.getParamSingleStringValue; import org.apache.hadoop.fs.Path; import j...
package com.infamous.zod.media.streaming.endpoint.impl; import com.infamous.zod.base.rest.RestEndPoint; import com.infamous.zod.media.streaming.controller.MediaStreamingController; import com.infamous.zod.media.streaming.endpoint.MediaStreamingEndPointV1; import java.net.URLDecoder; import java.nio.charset.StandardCha...
import pkg from '../package.json'; export default { deploy: { ghPages: { /* none */ } }, template: { version: pkg.version, title: 'FANTOM CAT', webcomponents: false } };
var dataSexism = [ {id: 'sexism', x: 1999, and:77, overall:77}, {id: 'sexism', x: 2000, and:109, overall:109}, {id: 'sexism', x: 2001, and:120, overall:120}, {id: 'sexism', x: 2002, and:114, overall:114}, {id: 'sexism', x: 2003, and:119, overall:119}, {id: 'sexism', x: 2004, and:159, overall:159}, {id: 's...
const db = require('../data') const { AP } = require('../ledgers') const mapAccountCodes = async (paymentRequest) => { for (const invoiceLine of paymentRequest.invoiceLines) { const accountCode = await db.accountCode.findOne({ include: [{ model: db.schemeCode, as: 'schemeCode' }], ...
<reponame>DeIaube/YiXing<filename>lib_base/src/main/java/baselib/base2/IRepository.java package baselib.base2; public interface IRepository { }
<filename>addon/extensions/route.js import Ember from 'ember'; import { DS_ROUTE_ACTIVATED, DS_ROUTE_DEACTIVATED, DS_ROUTE_PARAMS_LOADED } from '../constants/actions'; export default { redux: Ember.inject.service('redux'), model(params, transition) { const redux = this.get('redux'); redux.dispatch({...