text stringlengths 1 1.05M |
|---|
def add_num_to_list(list, num):
new_list = []
for x in list:
new_list.append(x + num)
return new_list
list = [1,2,3,4,5]
result = add_num_to_list(list, 10)
print(result) |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package bean;
import Models.Alimento;
import java.sql.Date;
import java.util.ArrayList;
/**
*
* @author Marcelo
*/
... |
<reponame>conductiveresearch/abstractions
SELECT aave.insert_aave_tokens(
NOW() - interval '3 days',
NOW());
SELECT aave.insert_aave_daily_interest_rates(
DATE_TRUNC('day',NOW()) - interval '3 days',
DATE_TRUNC('day',NOW()) );
SELECT aave.insert_aave_daily_atoken_balances(
DATE... |
class GeneticDataProcessor:
def __init__(self, server, dataset):
self.server = server
self.dataset = dataset
def query_snp(self, rsid_list, verbose=False):
if verbose:
print("query_snp parameter: %s" % rsid_list)
response = self.dataset.search({
'filters... |
#!/bin/bash
# Copyright 2015 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... |
<gh_stars>100-1000
Page({
data: {
array:["天海新世纪号","歌诗达邮轮•大西洋号","歌诗达邮轮•幸运号","歌诗达邮轮•维多利亚号","歌诗达邮轮•赛琳娜号","海洋量子号","海洋水手号","蓝宝石公主号"],
index:0
},
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value
})
}
}) |
<gh_stars>0
import nc from 'next-connect'
import cache from 'memory-cache'
import imageToBase64 from 'image-to-base64'
import { renderToStaticMarkup } from 'react-dom/server'
import fortyTwo from '../../middlewares/42'
import Profile from '../../components/cards/Profile'
const handler = nc()
handler.use(fortyTwo)
h... |
<filename>app/models/service.rb
class Service < ActiveRecord::Base
validates :service_name, :user_id, presence: true
has_many :domain_names
belongs_to :user, class_name: "user", foreign_key: "user_id"
private
end
|
<gh_stars>0
class ProductCharacteristic < ApplicationRecord
belongs_to :product
belongs_to :color
belongs_to :size
end
|
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: [ './app.component.css' ]
})
export class AppComponent {
name = 'Angular';
fruits = ['apple', 'banana', 'orange', 'strawberry', 'grape'];
sortFruits() {
this.fruits.sort();
}
}... |
// Copyright 2014 <NAME>, <NAME>.
// Copyright 2015-2021 <NAME>.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "../b2_workarounds.hpp"
//[callplugcpp_tutorial3
#include <boost/dll/import.hpp> // fo... |
import React from 'react'
import './styles.css'
import Banner from '../../components/Banner'
import Card from '../../components/Card'
const cardInfos = [
{
src: 'https://a0.muscache.com/im/pictures/eb9c7c6a-ee33-414a-b1ba-14e8860d59b3.jpg?im_w=720',
title: 'Online Experiences',
descript... |
using System;
using System.Text;
public class UniqueIdGenerator
{
public string GenerateRequestId()
{
const string prefix = "REQ-";
const string suffix = "-2022";
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
Random random = new Random();
StringBuilder req... |
#!/usr/bin/env bash
set -o noclobber -o noglob -o nounset -o pipefail
IFS=$'\n'
# If the option `use_preview_script` is set to `true`,
# then this script will be called and its output will be displayed in ranger.
# ANSI color codes are supported.
# STDIN is disabled, so interactive scripts won't work properly
# This... |
import TodoList from '../components/TodoList';
import {Link as RouterLink} from 'react-router-dom';
import React from 'react';
import FirebaseTodoListStore from '../stores/FirebaseTodoListStore';
import {Link, Typography} from '@mui/material';
function FirebasePage() {
return (
<>
<main>
... |
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.Froalacharts = {}));
}(this, (function (exports) { 'use strict';
function ... |
package pepperlint
import (
"go/ast"
)
// RangeStmtRules is a list of type RangeStmtRule.
type RangeStmtRules []RangeStmtRule
// ValidateRangeStmt will iterate through the list of array types and call
// ValidateRangeStmt. If an error is returned, then that error will be added
// to the batch of errors.
func (rules... |
<gh_stars>0
package models
import (
"github.com/astaxie/beego/orm"
"log"
"time"
)
type SdtBdiResult struct {
Id int `form:"id"` //主键
BdiId int `form:"bdiId"` //指标Id
TableName string `form:"tableName"` //表名
TableLabel string `form:"tableLabel"` //中文表名
BdiTypeId int `form:"... |
ln -s ~/notebooks/home/ksong/GoogleNews-vectors-negative300.bin GoogleNews-vectors-negative300.bin
|
<reponame>duraspace/lambdora
package org.fcrepo.lambdora.service.aws;
import org.fcrepo.lambdora.service.api.Container;
import org.fcrepo.lambdora.service.api.FedoraResourceImpl;
import org.fcrepo.lambdora.service.dao.ResourceTripleDao;
import java.net.URI;
/**
* AWS-based concrete implementation of the Container i... |
<reponame>xwf20050250/SmallUtils
package com.smallcake.utils;
import java.math.BigDecimal;
/**
* MyApplication -- com.smallcake.utils
* Created by <NAME> on 2018/3/17 15:04.
*/
public class FloatUtils {
/**
* 相乘
* 两个float的高精度算法
* @param f1
* @param f2
* @return
*/
public st... |
#!/usr/bin/env bash
# Dependencies:
# LGWebOSRemote: https://github.com/klattimer/LGWebOSRemote
# Recommended installation:
# Use pipx (https://github.com/pypa/pipx) to install the package system-wide:
# pipx install git+https://github.com/klattimer/LGWebOSRemote
# Required parameters:
# @raycast.schemaVersion 1
# ... |
import React from "react";
import Img from "gatsby-image";
import { useStaticQuery, graphql } from "gatsby";
const Spinner = ({ direction }) => {
const data = useStaticQuery(graphql`
query {
placeholderImage: file(relativePath: { eq: "spinner.png" }) {
childImageSharp {
fluid(quality: 90,... |
#!/usr/bin/with-contenv bashio
##########
# INIT #
##########
# Define preferences line
cd /config/qBittorrent/
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
LINE=$((LINE + 1))
##################
# Default folder #
##################
if bashio::config.has_value 'SavePath'; then
DOWNLOADS=$(bashio::config 'Sa... |
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setCont... |
<reponame>softls/FogFrame-2.0
package at.ac.tuwien.infosys;
import at.ac.tuwien.infosys.database.IDatabaseService;
import at.ac.tuwien.infosys.fogactioncontrol.IFogActionControlService;
import at.ac.tuwien.infosys.model.*;
import at.ac.tuwien.infosys.reasoner.IReasonerService;
import at.ac.tuwien.infosys.sharedstorag... |
<filename>applications/physbam/physbam-lib/Public_Library/PhysBAM_Solids/PhysBAM_Deformables/Collisions_And_Interactions/TRIANGLE_REPULSIONS_AND_COLLISIONS_GEOMETRY.cpp
//#####################################################################
// Copyright 2002-2007, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>,... |
<reponame>aoxiangflysky/onedata
"""Package with performance tests of onedata.
"""
__author__ = "<NAME>"
__copyright__ = "Copyright (C) 2016 ACK CYFRONET AGH"
__license__ = "This software is released under the MIT license cited in " \
"LICENSE.txt"
|
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
#network interface on which to limit traffic
IF="eth0"
#limit of the network interface in question
LINKCEIL="1gbit"
#... |
#!/bin/bash
# Download source file.
mkdir -p data
mkdir -p tmp
if [ ! -f tmp/source.zip ]; then
wget -O "tmp/source.zip" "hanbit.co.kr/lib/examFileDown.php?hed_idx=3801"
fi
cd tmp
unzip "source.zip"
# Move data files into data directory.
data_dir="../data"
mkdir -p ${data_dir}
mv "2.MovAvgFilter/SonarAlt.mat" ${data_... |
/***************************************************************************
* (C) Copyright 2007-2012 - Marauroa *
***************************************************************************
***************************************************************************
* ... |
<gh_stars>0
/* * -* *- *- *- *- *- *- * * ** -* -* -* - *- *- *-* - ** - *- - * *- */
/* * _ _ +\ */
/* - | |_ ___ ___ ___ ___ ___ ___ ___ _| |___ ___ ___ ___ + */
/* + | _| _| .'| |_ -| _| -_| | . | -_| | _| -_| /* ... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { fetchFlickrData } from './../actions/flickDataActions';
import './../css/flickrData.css';
class FlickrData extends Component {
componentDidMount() {
this.props.fetchFlickrData();
}
render() {
const flickrData = thi... |
import { parseString } from "xml2js";
import Constants from "../Constants";
import dispatcher from "../dispatcher";
import { checkStatus } from "../FetchHelpers";
export function updateAdvisories() {
const url = "https://api.bart.gov/api/bsa.aspx?cmd=bsa&key=MW9S-E7SL-26DU-VV8V&date=today"
const options = {
metho... |
package org.rs2server.rs2.domain.service.impl.skill;
import org.rs2server.rs2.domain.service.api.skill.MiningService;
import org.rs2server.rs2.model.Item;
import org.rs2server.rs2.model.container.Container;
import org.rs2server.rs2.model.container.Equipment;
import org.rs2server.rs2.model.player.Player;
import org.rs2... |
#!/bin/bash
BUCKET=$1
aws s3api list-multipart-uploads --bucket $BUCKET |
jq -r '.Uploads[] | "\(.UploadId) \(.Key)"' |
while read id key; do
echo KEY: $key, ID $id
aws s3api abort-multipart-upload --bucket $BUCKET --key $key --upload-id $id
done
|
<gh_stars>0
/**
* Package for calculate test.
*
* @author <NAME> ( https://vk.com/id428714363)
* @version 1.5
* @since 16.03.2019
*/
package ru.job4j.calculate; |
// @flow
type BoolType = { uid: string, name: "bool" };
export const boolT = (uid: string): BoolType => ({ name: "bool", uid });
export const isBoolT = (ty: Type) => ty.name === "bool";
type ErrType = { uid: string, name: "err", lower: Type, upper: Type };
export const errT = (uid: string, lower: Type, upper: Type): ... |
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
#loading the data
data = pd.read_csv('input.csv')
#Feature extraction
vectorizer = CountVectorizer(ngram_range=(2,2))
X = vectorizer.fit_transform(data)
#Training the model
from sklearn.naive_bayes import MultinomialNB
clf = Multinom... |
<reponame>hispindia/BIHAR-2.7
package org.hisp.dhis.common;
import org.hisp.dhis.DhisSpringTest;
import org.hisp.dhis.dataelement.DataElement;
import org.hisp.dhis.dataelement.DataElementGroup;
import org.hisp.dhis.dataelement.DataElementService;
import org.junit.Test;
import org.springframework.beans.factory.annotati... |
<reponame>pathawks/podcast<filename>lib/jekyll-podcast/episode.rb
# frozen_string_literal: true
require "mp3info"
require "yaml"
module JekyllPodcast
class Episode
def initialize(e_filename)
@episode = {"audio"=>{}}
Mp3Info.open(e_filename) do |mp3|
@episode["title"] = mp3.tag.title
... |
<gh_stars>0
import { createStyled } from "./styled";
const styled = createStyled();
export interface ButtonProps {
type?: "primary" | "secondary";
}
export const Button = styled.button<ButtonProps>`
background: black;
border: none;
padding: 4px;
&[type="primary"] {
background: blue;
}
&[type="sec... |
/*
* MIT License
*
* Copyright (c) 2018 <NAME> (@smallcreep) <<EMAIL>>
*
* 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
*... |
#!/bin/bash
set -euxo pipefail
VM_CONNECTORS_HADOOP_DIR=/usr/lib/hadoop/lib
VM_CONNECTORS_DATAPROC_DIR=/usr/local/share/google/dataproc/lib
declare -A MIN_CONNECTOR_VERSIONS
MIN_CONNECTOR_VERSIONS=(
["bigquery"]="0.11.0"
["gcs"]="1.7.0")
# Starting from these versions connectors name changed:
# "...-<version>-h... |
<filename>node_modules/react-map-gl/node_modules/mapbox-gl/js/util/util.js
'use strict';
var UnitBezier = require('unitbezier');
var Coordinate = require('../geo/coordinate');
/**
* Given a value `t` that varies between 0 and 1, return
* an interpolation function that eases between 0 and 1 in a pleasing
* cubic in... |
#!/bin/sh
# ----------------------------------------------------------------------------
# --
# -- Copyright (c) 2018-2022 Silvio Brandani <support@tcapture.net>. All rights reserved.
# --
# ----------------------------------------------------------------------------
runJREApplication()
{
verifyJRE "$JAVA_EXE... |
#!/bin/bash
set -e
cmd="$@"
# This entrypoint is used to play nicely with the current cookiecutter configuration.
# Since docker-compose relies heavily on environment variables itself for configuration, we'd have to define multiple
# environment variables just to support cookiecutter out of the box. That makes no sens... |
<filename>core/src/main/java/brooklyn/entity/rebind/PersisterDeltaImpl.java
/*
* 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 f... |
import http from "@/common/http";
import authHeader from "@/common/auth.header";
const SERVICE_API_URL = "/api/oauth";
class OauthService {
login(params = {}) {
return http.post(SERVICE_API_URL + "/login", params, {
headers: authHeader()
});
}
logout(params = {}) {
return http.get(... |
alias p='pod'
alias pi='pod install'
alias pclean='rm -rf Pods/'
alias pedit='e Podfile'
|
#!/usr/bin/env bash
# Copyright 2020 The Jetstack cert-manager contributors.
#
# 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 req... |
<reponame>gtm7712/team-project-d-2191-swen-261-11-d
package com.webcheckers.appl;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.HashMap;
import com.webcheckers.model.Player;
import org.junit.jupiter.api.Tag;
import org.jun... |
import css from 'styled-jsx/css';
// eslint-disable-next-line no-unused-vars
import React from 'react';
import { colors, mq } from '../../tokens';
export default css`
footer {
background-color: ${colors.blue};
color: white;
padding-bottom: 4rem;
padding-top: 1rem;
}
@media ${mq.phone} {
foo... |
ctrlapp.register.controller('barPolarRealEstateController', ['$remote', '$scope', function ($remote, $scope) {
$scope.initMethod = function () {
var size = 600;
var painter = $$("#palette")
// 设置画布大小
.attr({
width: size,
height: size
})
// 获取画笔
.painter();
... |
import { Field, Float, InputType } from '@nestjs/graphql';
import { GraphQLUpload, FileUpload } from 'graphql-upload';
@InputType()
export class CreateFillingInput {
@Field(() => String)
name: string;
@Field(() => Float)
price: number;
@Field(() => Float)
weight: number;
@Field(() => GraphQLUpload)
... |
<reponame>agus-setiawan-desu/brapi-Java-TestServer
package org.brapi.test.BrAPITestServer.model.entity.germ;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import org.brapi.test.BrAPITestServer.... |
<reponame>rcarlosdasilva/weixin
package io.github.rcarlosdasilva.weixin.api.weixin.impl;
import java.io.File;
import java.io.InputStream;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
imp... |
#!/bin/bash -eu
# remove legacy file
rm -f /root/.teslaCamRsyncConfig
|
export const WalletInvoiceFactory = (walletId: WalletId): WalletInvoiceFactory => {
const create = ({
registeredInvoice,
}: {
registeredInvoice: RegisteredInvoice
}): WalletInvoice => ({
paymentHash: registeredInvoice.invoice.paymentHash,
walletId,
selfGenerated: true,
pubkey: registeredIn... |
public class QueueUsingStacks<T> {
private Stack<T> s1;
private Stack<T> s2;
public QueueUsingStacks() {
s1 = new Stack<T>();
s2 = new Stack<T>();
}
public void enqueue(T item) {
s1.push(item);
}
public T dequeue()... |
/*
* Copyright 2016 <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 to in wr... |
#! /bin/bash
OMP_NUM_THREADS=8 CUDA_VISIBLE_DEVICES=1 python main_nerf.py data/nerf_synthetic/lego --workspace trial_nerf_lego -O --bound 1.0 --scale 0.67 --dt_gamma 0 --mode blender --gui
#OMP_NUM_THREADS=8 CUDA_VISIBLE_DEVICES=1 python main_nerf.py data/nerf_synthetic/lego --workspace trial_nerf_lego -O --bound 1.0 ... |
<gh_stars>0
import { JsonApiService } from "./json-api.service";
import { WebStorageService } from "./web-storage.service";
import { Injectable } from '@angular/core';
import { Observable } from "rxjs/Rx";
import { CustomRequestOptions } from "./interfaces";
@Injectable()
export class AjaxService{
constructor(privat... |
#!/usr/bin/env sh
apk add --update --no-cache elixir postgresql-client git
mix local.hex --force
mix local.rebar --force
mkdir /opencov |
from lorenz import functions
import numpy as np
class Reservoir:
def __init__(self, N=500, alpha=400, NetSR=0.6, bias_scale=0.4, inp_scale=1.2, conn=None):
self.N = N
self.alpha = alpha
self.NetSR = NetSR
self.bias_scale = bias_scale
self.inp_scale = inp_scale
if ... |
#!/usr/bin/env bash
# Variables
PG_VERSION=9.5
PROJECT_NAME=wordtori
ENV_USERNAME=ubuntu
#
# Create a symbolic link to the working directory
#
ln -s /vagrant /$PROJECT_NAME
#
# Keep package list information up to date
#
sudo apt-get update
#
# Utilities
#
sudo apt-get install -y build-essential # Required f... |
#!/bin/bash -e
: ${LOGFILE:=/var/log/recipes/gcs-p12.log}
: ${TARGET_DIR:=/usr/lib/hadoop/lib}
main(){
mkdir -p $TARGET_DIR
echo $P12KEY | base64 -d > $TARGET_DIR/gcp.p12
echo "p12 file successfully saved to $TARGET_DIR/gcp.p12"
}
exec &>> "$LOGFILE"
[[ "$0" == "$BASH_SOURCE" ]] && main "$@"
|
<filename>src/components/ConnectedStep.tsx
import * as React from 'react'
import { BorderRadiusObject, Shape } from '../types'
import { ITourGuideContext } from './TourGuideContext'
declare var __TEST__: boolean
interface Props {
name: string
text: string
title?: string
order: number
active?: boolean
shap... |
#!/bin/bash
# -*- Mode: Bash; tab-width: 2; indent-tabs-mode: nil -*- vim:sta:et:sw=2:ts=2:syntax=sh
#
SCRIPT=$(basename "$0")
function check_dependency {
typeset D="$1"
if ( which "$D" 2>&1 | grep -e "^which: no " -e "^no ")
then
echo "${SCRIPT}: Aborting - unable to resolve dependency: $D" >&2
exit... |
import json
import math
import os
from matplotlib.pyplot import imshow, show
from matplotlib import cm
from numpy import arange, zeros
from scipy import ndimage
from scipy import misc
def pixelate_image(img_fn,bins=20) :
img = misc.imread(img_fn)
print "img is [h,w]:",img.shape
# convert to single ... |
#!/bin/sh
#
# $Id$
#
# mkgdaldist.sh - prepares GDAL source distribution package
#
# Doxgen 1.7.1 has a bug related to man pages. See https://trac.osgeo.org/gdal/ticket/6048
echo $(doxygen --version) | xargs python -c "import sys; v = sys.argv[1].split('.'); v=int(v[0])*10000+int(v[1])*100+int(v[2]); sys.exit(v < 1070... |
<filename>splashpy/routers/objects.py
#
# Copyright (C) 2015-2020 Splash Sync <www.splashsync.com>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# For the full copyright ... |
<gh_stars>0
import { NextFSDirectory } from './NextFSDirectory';
import { NextFSFile } from './NextFSFile';
import { NextFSObject } from './NextFSObject';
export class NextFSManager {
public async get(path: string): Promise<NextFSObject> {
return null;
}
public async exists(path: string): Promise<... |
<reponame>hugleMr/Eazax-cases<gh_stars>0
const { ccclass, property, executionOrder } = cc._decorator;
/**
* 后期处理
* @author 陈皮皮 (ifaswind)
* @version 20211128
* @see PostProcessing.ts https://gitee.com/ifaswind/eazax-ccc/blob/master/components/effects/PostProcessing.ts
*/
@ccclass
@executionOrder(-1)
export defaul... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_snooze_outline = void 0;
var ic_snooze_outline = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []
}, {
"name": "p... |
let app = new Vue({
el: "#home",
data: {
message: "REFACE",
},
});
|
python test_widerface_40_100.py --gpu=3 --network=net5 --thresh=0.5 --prefix=model/resnet_retina/resnet_retina --epoch=999 --output=./test_out_dic/resnet_retina_epoch_999
|
# frozen_string_literal: true
require 'spec_helper'
describe ScenarioAttachment do
let(:scenario) { FactoryBot.create(:scenario) }
let(:source) { FactoryBot.create(:scenario) }
let(:metadata) do
{
source_scenario_id: source.id,
source_saved_scenario_id: 1,
source_scenario_title: 'a',
... |
package orbidder
import (
"encoding/json"
"github.com/eugene-fedorenko/prebid-server/openrtb_ext"
"testing"
)
// This file actually intends to test static/bidder-params/orbidder.json
//
// These also validate the format of the external API: request.imp[i].ext.orbidder
// TestValidParams makes sure that the orbidd... |
echo 'Bem vindo Usuario'
echo
echo
echo 'Porfavor digite a opcao do turno'
echo
echo '[1] Manha'
echo '[2] Tarde'
echo '[3] Noite'
echo
read turno
if [ $turno='1' ]; then
echo 'Camila pode atender na parte da manha'
elif [ $turno='2']; then
echo 'Joao pode atender na parte da tarde'
else
echo 'Marcos pode atender na... |
#!/bin/bash
echo "This requires the chia python virtual environment."
echo "Execute '. ./activate' if you have not already, before running."
echo "This version of Timelord requires CMake 3.14+ to compile vdf_client"
PYTHON_VERSION=$(python -c 'import sys; print(f"python{sys.version_info.major}.{sys.version_info.minor}... |
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.linear_model import LogisticRegression
# Read the data
data = pd.read_csv('data.csv')
# Convert the data to a matrix of feature vectors
vectorizer = CountVectorizer(min_df=0, lowercase=False)
x = vectorizer.fit_transform(data... |
import sys
from settings import YamlReader
from simulation import Pdb2gmx
def main():
if len(sys.argv) != 7:
print("Usage: python setup_simulation.py <system> <step> <properties_file> <input_structure_pdb_path> <output_gro_path> <output_top_zip_path>")
return
system = sys.argv[1]
step = sy... |
#!/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"); y... |
#!/bin/bash
cd "${BASH_SOURCE%/*}" || exit
./walletresetkmd.sh &
./listassetchains | while read chain; do
./walletresetac.sh ${chain} &
done
|
#!/bin/bash
# Copyright
# 2018 Johns Hopkins University (Author: Jesus Villalba)
# 2017 David Snyder
# 2017 Johns Hopkins University (Author: Daniel Garcia-Romero)
# 2017 Johns Hopkins University (Author: Daniel Povey)
# Apache 2.0.
#
. ./cmd.sh
. ./pa... |
package com.genersoft.iot.vmp.vmanager.service;
import com.alibaba.fastjson.JSONObject;
/**
* 点播处理
*/
public interface IPlayService {
void onPublishHandlerForPlayBack(JSONObject resonse, String deviceId, String channelId, String uuid);
void onPublishHandlerForPlay(JSONObject resonse, String deviceId, Strin... |
#!/bin/bash -e
cyclecloud_profile=/tmp/cyclecloud.profile
set +e
source $cyclecloud_profile
set -e
custom_script_uri=$(jetpack config lsf.custom_script_uri 0)
if [ $custom_script_uri == 0 ]; then
echo lsf.custom_script_uri is not defined, exiting.
exit
fi
echo running $custom_script_uri...
curl -L $custom_script... |
"""
Django settings for tr_sys project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os
#... |
<filename>app/models/utils.go
package models
import (
"aahframework.org/aah.v0"
"aahframework.org/log.v0"
"github.com/nats-io/go-nats"
)
var (
Conn *nats.Conn
)
type Response struct {
// MessageJSON - json data for outputting
Success bool `json:"success"` // Wether an error occured or not
Message strin... |
#!/bin/bash
#
# Copyright (C) 2013 Intel Corporation
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this list
# of conditions and the followin... |
<gh_stars>100-1000
require 'spec_helper'
describe Travis::RedisPool do
let(:redis) {Travis::RedisPool.new}
let(:unpooled_redis) {Redis.new}
it "increases the metric for number of operations" do
expect {
redis.get('test')
}.to change {Metriks.timer('redis.operations').count}.by(1)
end
it "forw... |
#!/bin/bash
docker-compose -f docker/quickstart.yml up -d
|
def keep_track():
x = 0
y = 0
z = 0
while True:
# do something to x, y and z
... |
./build/PDFWriterTestPlayground/PDFWriterTestPlayground -b . -c PDF ObjectContext
|
/**
* @class Router
* @classdesc Routes all incoming messages to the consumers
*/
declare class Router {
private config;
private notifications;
private subscriptions;
constructor(params: any);
/**
* Entry point for all incoming messages
* @param {String} type - Type of incoming message
... |
import copy
from enum import Enum
from ayeaye.connectors import connector_factory
from ayeaye.connectors.models_connector import ModelsConnector
from ayeaye.connectors.multi_connector import MultiConnector
from ayeaye.connectors.placeholder import PlaceholderDataConnector
class Connect:
"""
Connect to a data... |
function removeDuplicates(arr) {
let seen = new Set();
let output = [];
arr.forEach(function(item) {
if(!seen.has(item)) {
seen.add(item);
output.push(item);
}
});
return output;
}
let myArray = [5, 1, 2, 3, 4, 5, 1, 6];
let res = removeDuplicates(myArray);... |
package application;
import javafx.scene.control.TextArea;
import modele.Console;
import modele.Object;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import static org.junit... |
package org.fade.demo.springframework.transaction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annot... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.