text
stringlengths
1
1.05M
/* * Copyright (c) 2016, 2017, 2018, 2019 FabricMC * * 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 applicabl...
import Foundation func timeAgoSinceDate(_ date: Date, currentDate: Date) -> String { let calendar = Calendar.current let components = calendar.dateComponents([.year, .month, .day, .hour, .minute, .second], from: date, to: currentDate) if let years = components.year, years > 0 { return years == 1 ?...
dependencies() { echo command -v zip > /dev/null 2>&1 || { echo -e >&2 "\e[94m➟ \e[92mNeed ZIP installing it....." && apt install zip > /dev/null 2>&1;} command -v php > /dev/null 2>...
# append to history file, don't overwrite it setopt appendhistory # automatically cd to directories matching command names setopt autocd # treat #, -, and ^ as filename glob patterns setopt extendedglob # print an error if filename expansion fails, instead of leaving it as-is setopt nomatch # DIE, FOUL BELL unsetopt be...
#!/usr/bin/env bash CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" online_option_string="@online_icon" offline_option_string="@offline_icon" ping_timeout_string="@ping_timeout" route_to_ping_string="@route_to_ping" online_icon_osx="✅ " online_icon="✔" offline_icon_osx="⛔️ " offline_icon_cygwin="X" o...
#!/bin/sh gpg --batch --use-agent --decrypt ~/.vault_key.gpg
/** * Created by <EMAIL> on 2019/3/18. */ import "./style.less"; import React,{PureComponent} from 'react'; import extensionizer from 'extensionizer'; import popup from "../../../../../popup"; export default class More extends PureComponent{ constructor(props){ super(props); } render(){ const {locale,...
#!/bin/bash # Copyright 2018 Datawire. 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 applicab...
#!/bin/sh # # Vivado(TM) # runme.sh: a Vivado-generated Runs Script for UNIX # Copyright 1986-2018 Xilinx, Inc. All Rights Reserved. # echo "This script was generated under a different operating system." echo "Please update the PATH and LD_LIBRARY_PATH variables below, before executing this script" exit if [ -z "$...
#!/bin/bash set -eou pipefail DIR=$HOME/tempi_results OUT=$DIR/measure_system.txt set -x mkdir -p $DIR echo "" > $OUT #MPIRUN="$HOME/software/mvapich2-2.3.4/bin/mpirun -n 2" MPIRUN="$HOME/software/openmpi-4.0.5/bin/mpirun -n 2" $MPIRUN ../../build/bin/measure-system | tee -a $OUT
#!/bin/bash echo " ############################################################################################################## # # FortiGate Azure deployment using ARM Template # Multi HUB - Fortigate Active/Passive cluster with Azure Route Server # ###################################################################...
<reponame>DinhLantstk789/codelibrary<filename>java/structures/DisjointSetsRank.java package structures; public class DisjointSetsRank { int[] p; int[] rank; public DisjointSetsRank(int size) { p = new int[size]; for (int i = 0; i < size; i++) p[i] = i; rank = new int[s...
#! /bin/bash # This script is used by cloud build to push Docker images into Docker hub tag_and_push() { tag=$1 docker tag gcr.io/$PROJECT_ID/graph-node:$SHORT_SHA \ graphprotocol/graph-node:$tag docker push graphprotocol/graph-node:$tag docker tag gcr.io/$PROJECT_ID/graph-node-debug:$SHOR...
import os class CustomLogger: def __init__(self, out_dir, render, filename_header): self.out_dir = out_dir self.render = render self.filename_header = filename_header self.log_file = os.path.join(out_dir, f"{filename_header}_log.txt") def on_reset(self, obs, image_frame): ...
import os import sys import argparse import csv def extract_built_residues(pdb_file): # Implement the logic to extract information about the built residues from the PDB file # Return a list of dictionaries, where each dictionary represents information about a built residue def generate_csv_report(pdb_files): ...
#!/bin/ksh # Description : # A simple script to update the local(gif) tunnel with the new WAN IP # and also update HE(tunnelbroker) with the new end point IP # This also depends on a line in /etc/rc.local : # "/sbin/ifconfig ix0 | grep inet | cut -c 7-21 | xargs > /tmp/.wan-ip" # where ix0 is my WAN interface...
#!/bin/bash # Copyright 2021 The Kubernetes 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 require...
import UIKit class CustomDrawingViewController: UIViewController { let rectanglePopoverParent = UIView() let leftToolbarParent = UIView() let rectangleButton = UIButton() let rectanglePopoverToolbar = UIStackView() override func viewDidLoad() { super.viewDidLoad() // Create and po...
#!/bin/bash # SPDX-license-identifier: Apache-2.0 ############################################################################## # Copyright (c) 2019 # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distri...
// // Created by ooooo on 2019/12/5. // #ifndef CPP_0338_SOLUTION1_H #define CPP_0338_SOLUTION1_H #include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> countBits(int num) { vector<int> res = vector<int>(num + 1, 0); for (int i = 1; i <= num; i++) { ...
<filename>frontend/src/actions/events-search.spec.js import 'babel-polyfill' import Mappersmith from 'mappersmith' import 'mappersmith/fixtures' import configureMockStore from 'redux-mock-store' import thunk from 'redux-thunk' import { EVENTS_SEARCH_LIMIT } from 'api' const middlewares = [ thunk ] const mockStore = co...
#!/bin/sh rm -rf lcmtest
import hashlib key = hashlib.md5("Hello World!".encode()) print(key.hexdigest()) # 0a4d55a8d778e5022fab701977c5d840
/* * Copyright 2018 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ import React from 'react'; import * as THREE from 'three'; import { Client } from 'boardgame.io/client'; import TicTa...
#!/bin/bash -x nvidia-smi echo "-------------------- running as Docker to test also: -----------" sudo -i nvidia-smi -pm 1 sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi
<filename>src/main/java/w/bot/longpoll/SimpleVkBotLongPoll.java /* * Copyright 2022 Whilein * * 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...
import ReactDOM from 'react-dom'; import App from '../app'; import React from 'react'; jest.mock('react-dom'); describe('index', () => { it('initialises the react App', () => { document.getElementById = jest.fn(); (document.getElementById as jest.Mock).mockReturnValue( 'test getElementB...
#!/usr/bin/env bash # Copyright (c) 2017 ZipRecruiter # # 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, modify, m...
package com.outjected.email; import java.io.IOException; import java.util.UUID; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.xml.bind.JAXBException; import org.junit.Assert; import org.junit.Test; import com.google.common.io.Resources; import com.outjected.em...
<filename>src/main/java/de/core23/dicewars/misc/Game.java package de.core23.dicewars.misc; public interface Game { final int[] COLORS = {0x2255FF, 0xCC4444, 0x44CC44, 0xAA22EE, 0xDDDD00, 0xFF8833, 0x777777, 0x55DDCC}; final int DICE_START = 3; final int DICE_MAX = 8; final int PLAYER_MAX = 8; final int PLAYER...
set -x kubectl rollout history deployment hello-deploy
<filename>build/types/utils/set_compare.d.ts export declare function set_compare<T>(a: Set<T>, b: Set<T>): boolean;
#!/usr/bin/env bash # Install Gruntwrok Installer # See https://github.com/gruntwork-io/gruntwork-installer # Install after Golang installation # For colors, see https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux RED='\033[0;31m' YELLOW='\033[1;33m' GREEN='\033[0;32m' GRAY='\0...
<reponame>arp242/zstd<filename>zbyte/zbyte_test.go package zbyte import ( "testing" ) func TestBinary(t *testing.T) { tests := []struct { in []byte want bool }{ {[]byte(""), false}, {[]byte("€"), false}, {[]byte("helllo\x00"), true}, } for _, tt := range tests { t.Run("", func(t *testing.T) { h...
import express, { Application } from 'express'; import http from 'http'; import os from 'os'; import socketIo, { Server } from 'socket.io'; import { SessionMessage, SessionJoinMessage, SessionLeaveMessage, SessionDeleteMessage, CardsUpdateMessage, PlayersUpdateMessage, ServerOptions, GameSessionsPersist...
"use strict"; import React from 'react'; class Application extends React.Component { static displayName = "@Application"; constructor() { super(); const response = app("response"); this._isMounted = false; this._mountedCallback = null; this._event = app("even...
#ifndef MMTIMER_H #define MMTIMER_H #include <windows.h> #include <mmsystem.h> #include <QObject> class MMTimer : public QObject { Q_OBJECT public: friend void WINAPI CALLBACK mmtimer_proc(uint, uint, DWORD_PTR user, DWORD_PTR, DWORD_PTR); explicit MMTimer(int interval, QObject *parent=nul...
def search_list(head, val): if head is None: return False if head.data == val: return True return search_list(head.next, val)
<reponame>NickGraeff/launchkey-java package com.iovation.launchkey.sdk.crypto; import org.apache.commons.codec.binary.Base64; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.util.encoders.Hex; import org.bouncycastle.util.io.pem.PemObject; import org.bouncycastle.util.io.pem.PemReade...
#!/bin/bash # Copyright 2014 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Command for unit test echo $(basename $0) "$@" | sed "s#/tmp/test_fw\..\{6\}#temp_dir#g"
<reponame>philly-d/kustomer-bank-challenge<gh_stars>0 import React from 'react'; import { normalizeAmount } from '../reducers/transactions'; // App header (shows user balance) const Header = ({ balance }) => { return ( <div className="content-block"> <div classNamze="column"> <h...
#!/bin/bash ## ## Copyright 2019 International Business Machines ## ## 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 require...
#!/bin/sh # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=C:\src\flutter\1.17.4" export "FLUTTER_APPLICATION_PATH=C:\Users\shafi\AndroidStudioProjects\B2GSoft\Flutter\quick_rider" export "FLUTTER_TARGET=lib\main.dart" export "FLUTTER_BUILD_DIR=build" export "SYMROOT=${SOURCE_...
/* * Copyright OpenSearch Contributors * SPDX-License-Identifier: Apache-2.0 */ package com.amazon.dataprepper.plugins.processor.aggregate; class AggregateGroup implements AggregateActionInput { private final GroupState groupState; AggregateGroup() { this.groupState = new DefaultGroupState(); ...
import requests import time API_URL = 'https://example.com/api/' class HTTPClient: def __init__(self): self.s = requests.Session() self.last_response = None def send_request(self, endpoint, verify=True): while True: try: if verify: respo...
// // TTAudioTool.h // TT // // Created by 张福润 on 2017/4/6. // Copyright © 2017年 张福润. All rights reserved. // #import <Foundation/Foundation.h> typedef void(^ComplitionBlock)(BOOL success, NSString *msg); @protocol TTAudioToolDelegate <NSObject> @optional - (void)audioToolProgress:(float)progress currentTime:(NS...
# -*- coding: utf-8 -*- # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # """ Created on Sat Sep 19 20:55:56 2015 @author: liangshiyu """ from __future__ import print_function...
<gh_stars>10-100 package capabilities import ( "github.com/Masterminds/semver" "github.com/giantswarm/microerror" ) var couldNotFetchFeatures = &microerror.Error{ Kind: "couldNotFetchFeatures", } // IsCouldNotFetchFeatures asserts couldNotFetchFeatures. func IsCouldNotFetchFeatures(err error) bool { return micro...
#!/bin/bash -eu set -o pipefail # Delete old jar ORIGDIR=${PWD} BDS_JAR="${ORIGDIR}/build/bds.jar" BDS_BIN="${ORIGDIR}/build/bds" rm -f "$BDS_JAR" || true # Make sure 'bin' dir exists mkdir bin || true # Build Jar file echo Building JAR file ant # Build go program echo echo Building bds wrapper: Compiling GO prog...
<filename>cmd/cmd.go package cmd import ( "fmt" "log" "os" "strings" "github.com/dutchcoders/transfer.sh/server" "github.com/fatih/color" "github.com/minio/cli" "google.golang.org/api/googleapi" ) var Version = "0.1" var helpTemplate = `NAME: {{.Name}} - {{.Usage}} DESCRIPTION: {{.Description}} USAGE: {{.N...
import subprocess def launch_chromium_kiosk(screen_width, screen_height, url): command = f"/usr/bin/chromium/chrome --window-size={screen_width},{screen_height} -remote-debugging-port=9999 --kiosk {url}" subprocess.run(command, shell=True) # Example usage launch_chromium_kiosk(1920, 1080, "https://example.com...
<filename>src/state/ReduxWrapper.js /* eslint-disable react/display-name */ import React from 'react'; import { Provider } from 'react-redux'; import { createStore, applyMiddleware, compose, } from 'redux'; import createSagaMiddleware from 'redux-saga'; import appReducer from './reducers'; import rootSaga from '....
const webpack = require('webpack'); const path = require('path'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); const VueLoaderPlugin = require('vue-loader/lib/plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const isPro = () => { return process.env.NODE_ENV = 'production'; }; const co...
import { TestBed, ComponentFixture } from '@angular/core/testing'; import { FilterEventTwoComponent } from 'path-to-filter-event-two-component'; // Replace with the actual path describe('FilterEventTwoComponent', () => { let fixture: ComponentFixture<FilterEventTwoComponent>; let component: FilterEventTwoComponent...
package net.kardexo.kardexotools.tasks; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import net.kardexo.kardexotools.KardExo; import net.kardexo.kardexotools.property.BaseAccess; import net.kardexo.kardexotools.prope...
<filename>src/app/dashboard/index/index.component.ts import {Component} from '@angular/core'; import { indexService } from '../index/services/index.service'; import {Router} from '@angular/router'; @Component({ templateUrl: "app/dashboard/index/index.component.html", styleUrls: ["app/dashboard/index/index.componen...
# -*- coding: utf-8 -*- """ @author: efourrier Purpose : Create toolbox functions to use for the different pieces of code ot the package """ import warnings from numpy.random import normal from numpy.random import choice import time import pandas as pd import numpy as np def removena_numpy(array): return arra...
export function PageHeader(props: any) { return ( <div></div> ) }
import numpy as np class CostComputation: def __init__(self, m, lambdaRate): self.m = m self.lambdaRate = lambdaRate def compute_distances(self, theta, y): distances = np.abs(np.subtract(theta, y)) return distances def regularize_cost(self, cost, theta): if self.la...
#!/bin/bash # fail the build on any failed command set -e usage() { echo "usage: $0 [-e <path/to/file>] [-v <version string>] [-p] [-b <path/to/build>]" 1>&2 exit 1 } # default build directory BUILD="dist/" # default version REACT_APP_VERSION="latest" # validates versioning e.g. v0.1.0 validate_version() { #...
import { maintenanceReminder, logOutRequest } from '../../lib/api'; const App = getApp(); Page({ /** * 页面的初始数据 */ data: { errorStatus: null, maintainMileage: "", distance: "", }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 更新保养提醒信息 */ updateMai...
import pandas as pd import numpy as np from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression # Load the data data = pd.read_csv("data.csv") X = data[['Market Index','Interest Rates']].values y = data['Price'].values # Split the data into training and test sets X_train,...
def remove_duplicates(strs): new_strs = [] for i in strs: if i not in new_strs: new_strs.append(i) return new_strs # Driver Code strs = ["Hello", "World", "Hello", "Goodbye", "Goodbye", "Welcome"] print(remove_duplicates(strs))
#!/bin/bash # ========== Experiment Seq. Idx. 755 / 37.5.1 / N. 48/6/1 - _S=37.5.1 D1_N=48 a=-1 b=-1 c=-1 d=-1 e=-1 f=1 D3_N=6 g=1 h=1 i=-1 D4_N=1 j=1 ========== set -u # Prints header echo -e '\n\n========== Experiment Seq. Idx. 755 / 37.5.1 / N. 48/6/1 - _S=37.5.1 D1_N=48 a=-1 b=-1 c=-1 d=-1 e=-1 f=1 D3_N=6 g=1 h=1...
import unittest from you_get.common import any_download class WeishiTest(unittest.TestCase): def test_download(self): any_download('https://www.bilibili.com/video/BV14v411W7F8?p=1&share_medium=iphone&share_plat=ios&share_session_id=9E81771B-C798-47AB-A238-29AED9C5CF3F&share_source=WEIXIN&share_tag=s_i&t...
/* * Copyright 2002 Sun Microsystems, 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 con...
echo 'KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE:="0666", GROUP:="dialout", SYMLINK+="rplidar"' >/etc/udev/rules.d/rplidar.rules service udev reload sleep 2 service udev restart
<reponame>hunterbdm/crypto-streamdeck<filename>classes/data.js<gh_stars>1-10 const request = require('request'); const WebSocket = require('ws'); let data = {}; let lastBTCPrice; data.allCoins = []; data.binancePairs = []; data.bittrexPairs = []; data.cryptopiaPairs = []; /* https://api.coinmarketcap.com/v1/ticker/...
package com.darian.springbootjmx.dynamicBean; import lombok.Data; @Data public class DefaultData implements com.darian.springbootjmx.dynamicBean.Data { private Long id; private String name; private Integer age; }
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64 groovy g.groovy
#!/bin/sh -e MRTGDIR=/etc/mrtg WEBDIR=/usr/share/nginx/html MRTGCFG=${MRTGDIR}/mrtg.cfg [[ ! -d "${MRTGDIR}" ]] && mkdir -p ${MRTGDIR} [[ ! -d "${WEBDIR}" ]] && mkdir -p ${WEBDIR} if [ -n "${HOSTS}" ]; then hosts=$(echo ${HOSTS} | tr '[,;]' ' ') for asset in ${hosts}; do COMMUNITY=$(echo $asset | cut...
import Phaser from 'phaser-ce'; import Human from 'src/app/chars/base/human'; import { MovementMouse, MovementKeys } from 'src/app/sprites/human'; import UIIngame from 'src/app/sprites/ui/ingame'; import { get as getItem, getAll as getAllItems, Item } from 'src/app/chars/items'; interface Equips { armor: Item; w...
package sshutil // HostGroup defines expected attributes for a host group that a host might belong to. type HostGroup struct { ID string Name string } // Host defines expected attributes for an ssh host. type Host struct { HostID string `json:"hid"` HostGroups []HostGroup `json:"host_groups"` Hostname...
#!/usr/bin/env bash set -e # Sanity checks for required environment variables. if [ -z "$BUILD_TYPE" ]; then echo "Error: Environment variable BUILD_TYPE is unset." exit 1 fi if [ -z "$BUILD_DARTPY" ]; then echo "Info: Environment variable BUILD_DARTPY is unset. Using OFF by default." BUILD_DARTPY=OFF fi if ...
// Controller for handling user authentication with Reddit public class RedditAuthController : Controller { private readonly IRedditAuthService _redditAuthService; public RedditAuthController(IRedditAuthService redditAuthService) { _redditAuthService = redditAuthService; } public IActionRe...
// Define routes in web.php Route::get('/user/profile', 'UserProfileController@showProfile')->name('user.profile'); Route::post('/user/profile/update-picture', 'UserProfileController@updateProfilePicture')->name('user.profile.update-picture'); Route::get('/user/change-password/{id}', 'UserProfileController@showChangePa...
#### 51 python3.8 train.py \ --algorithm astar-near \ --exp_name ballscreen_og_22_d8 \ --trial 1 \ --train_data data/helpers/allskip5/train_fullfeatures_2.npy \ --valid_data data/helpers/allskip5/test_fullfeatures_2.npy \ --test_data data/helpers/allskip5/test_fullfeatures_2.npy \ --train_labels data/helpers/allskip5...
def is_element_of(string, s): if string in s: return True else: return False result = is_element_of("orange", ["apple", "banana", "orange"]) print(result)
#!/bin/sh export PATH=/bin:/usr/bin:/usr/local/bin export d=`date +%m-%d-%Y` if [ -e /scratch/roma/stapl_nightly_timing/hydra_dir/$d.0025.done ] #if [ -e /scratch/roma/stapl_nightly_timing/hydra_dir/03-07-2010.0025.done ] then #the sleep is needed so the new times can be inserted into the db. sleep 300 /usr/bin/p...
<filename>sources/ReviewZ/src/main/java/vn/com/reviewz/dao/ProductDAO.java package vn.com.reviewz.dao; public interface ProductDAO { }
#!/bin/sh ;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit...
import os from flask import Flask, render_template, request from sqlalchemy import create_engine app = Flask(__name__) # Database setup engine = create_engine(os.environ['DATABASE_URL']) @app.route('/') def index(): # Get the list of products from database products = engine.execute("SELECT * FROM products").fetchal...
// Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed ...
#!/bin/bash ## ## This script evaluate the insert size of the PE sequences by: ## 4. formatting the results ## Got the results: ## echo '#LANE NUM_of_PAIRS MEAN MEDIAN SD' > 2.eva/res_ins.txt cat $(ls 2.eva/*.eis) | grep -v '^#' >> 2.eva/res_ins.txt ## ## Got ALL the results: ## ## Remove the '_read' from the ...
<reponame>DistrictDataLabs/04-team1 var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 960 - margin.left - margin.right, height = 500 - margin.top - margin.bottom; // setup x var xValue = function(d) { return d.Sentiment; console.log(d);}, // data -> value xScale = d3.scale.linear().range...
<reponame>ideacrew/pa_edidb carrier_ids = Carrier.where({ :abbrev => {"$ne" => "GHMSI"} }).map(&:id) puts carrier_ids plan_ids = Plan.where(:carrier_id => {"$in" => carrier_ids}).map(&:id) eligible_m_pols = pols = Policy.where({ :enrollees => {"$elemMatch" => { :rel_code => "self", :coverage_start => {"$g...
#!/bin/bash cd ~/Projects/chippyash/source/simple-accounts-3/ vendor/phpunit/phpunit/phpunit -c test/php/local-phpunit.xml --testdox-html contract.html test/php tdconv -t "Simple Accounts V3" contract.html docs/Test-Contract.md rm contract.html
library(ggplot2) # load cars dataset data <- read.table('cars.txt', header = TRUE) # linear regression model model <- lm(distance ~ speed, data = data) # plot the model ggplot(data, aes(x = speed, y = distance)) + geom_point(colour = 'darkblue') + geom_smooth(method = lm, se = FALSE, colour = 'red')
<gh_stars>0 // // JJShebeixiangqing2Cell.h // shebeijiance // // Created by 杨剑 on 2019/3/28. // Copyright © 2019 jjyangjian. All rights reserved. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface JJShebeixiangqing2Cell : UITableViewCell @end NS_ASSUME_NONNULL_END
import tensorflow as tf # Parameters learning_rate = 0.001 epochs = 2000 batch_size = 100 # Placeholders X = tf.placeholder(tf.float32, [None, n_features]) y = tf.placeholder(tf.float32, [None]) # Weights and bias W = tf.Variable(tf.random_normal([n_features, 1])) b = tf.Variable(tf.random_normal([1])) # Model y_pr...
# /initialize.sh if [ -d "/home/ubuntu/build" ]; then rm -Rf "/home/ubuntu/build"; fi
<reponame>Louayarbash/saint-sauveur # typed: false # frozen_string_literal: true require "keg_relocate" require "language/python" require "lock_file" require "ostruct" require "extend/cachable" # Installation prefix of a formula. # # @api private class Keg extend T::Sig extend Cachable # Error for when a keg ...
<reponame>msaglJS/msagl-js import {GeomGraph} from '../../../src' import {GeomObject} from '../../../src/layout/core/geomObject' import {SvgDebugWriter} from '../../utils/svgDebugWriter' import {runMDSLayout, outputGraph} from '../../utils/testUtils' import {sortedList} from '../sortedBySizeListOfgvFiles' import {join}...
#!/usr/bin/env bash # For more information on arrays see: # https://www.gnu.org/software/bash/manual/html_node/Arrays.html MIN_VERSION=4 if (( ${BASH_VERSION%%.*} < MIN_VERSION )); then echo "This script needs bash >= $MIN_VERSION" exit 1 fi # Note: this works on bash >= 4 # make 'distros' an associative arr...
<reponame>smagill/opensphere-desktop<filename>open-sphere-plugins/open-sensor-hub/src/main/java/io/opensphere/osh/results/video/ByteUtilities.java package io.opensphere.osh.results.video; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.PushbackInputStream; /*...
#!/bin/sh set -e set -u set -o pipefail if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P...
package com.lai.mtc.mvp.presenter; import com.lai.mtc.api.ComicApi; import com.lai.mtc.bean.ComicListDetail; import com.lai.mtc.comm.ApiException; import com.lai.mtc.comm.HttpRxObserver; import com.lai.mtc.mvp.base.impl.BasePresenter; import com.lai.mtc.mvp.contract.ComicsListDetailContract; import com.lai.mtc.mvp.utl...
dictionary = { 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9, 'ten': 10 }
string = "Hello World" output = string[5] print(output)
""" Create a radar chart to illustrate the performance of the data-driven methods """ from math import pi import matplotlib.pyplot as plt import pandas as pd plt.rc('text', usetex=True) plt.rcParams.update({'font.size': 14}) df = pd.DataFrame({ 'group': ['DD-v2-03','DD-v1-03'], 'nIoU': [0.772, 0.774], r"$F_\b...