text stringlengths 1 1.05M |
|---|
#!/bin/bash
##
#CF(Collaborate Filtering, ALS)
# run:
# spark-submit --class cn.ac.ict.bigdatabench.ALS $JAR_FILE <ratings_file> <rank> <iterations> [| <splits>]
#
# parameters:
# <ratings_file>: path of input data file
# <rank>: number of features to train t... |
/*
* [The "BSD licence"]
* Copyright (c) 2010 <NAME> (JesusFreke)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* ... |
<reponame>cbeer/web
// SyntaxHighlighter by <NAME>
//
//= require sh/XRegExp
//= require sh/shCore
//= require_tree ./brushes
|
<reponame>AliFrank608-TMW/RacingReact<filename>src/views/Horse/Public/HorseOverview/index.js
import horseView from 'views/Horse/View'
import HorsePublicOverview from '../HorsePublicOverview'
export default horseView(HorsePublicOverview)
|
enum TemperatureUnit {
case celsius
case fahrenheit
case kelvin
static let getAllUnits = [celsius, fahrenheit, kelvin]
}
struct Temperature {
let value: Double
let unit: TemperatureUnit
func converted(to unit: TemperatureUnit) -> Temperature {
var convertedValue: Double
... |
import discord
import asyncio
# Replace 'YOUR_DISCORD_TOKEN' with your actual Discord bot token
TOKEN = 'YOUR_DISCORD_TOKEN'
client = discord.Client()
async def spam_messages(channel, num_messages):
if num_messages > 16:
num_messages = 16 # Limit the number of messages to 16
for i in range(1, num_m... |
import { schema } from 'normalizr'
export const institution = new schema.Entity(
'institutions',
)
export const institutions = new schema.Array(institution) |
# frozen_string_literal: true
RSpec.describe App do
describe '#VERSION' do
it { expect(described_class::VERSION).not_to be_nil }
end
describe '#Math' do
it { expect(described_class::Math).not_to be_nil }
end
end
|
docker build -t $DOCKER_BUILD_TAG .
|
#!/bin/bash
CONTROL_PREFIX="=-.-="
echo "${CONTROL_PREFIX} PID $$"
function usage() {
echo "Usage: ${0} \\"
echo " JOB_NAME QUEUE_NAME COLLECTOR TOKEN_FILE LIFETIME PILOT_BIN \\"
echo " OWNERS NODES MULTI_PILOT_BIN ALLOCATION REQUEST_ID PASSWORD_FILE \\"
echo " [CPUS] [MEM_MB]"
e... |
#!/bin/bash
echo "[----------] BEGIN. RECORDERE NEWS parser script."
cd ../../../
php yii parserrec/news >> console/runtime/logs/parser.log
echo "[----------] END. RECORDERE NEWS parser script." |
echo "START: rotate CA certs on master"
set +x
. /etc/sysconfig/heat-params
set -x
set -eu -o pipefail
ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost"
export KUBECONFIG="/etc/kubernetes/admin.conf"
service_account_key=$kube_service_account_key_input
service_account_private_key=$kube_service_account_private_... |
#!/bin/bash
set -e
if [ $# -ne 2 ]
then
echo "arguments: SAVES_SRC JSON_DEST" 1>&2
exit 1
fi
mkdir -p $2
for i in $1/*.ck2
do
output="$2/$(basename -s '.ck2' $i).json"
echo "$i : $output"
# Create Json
./ck2json "$i" > "$output"
# Validate Json Syntax
printf "import sys\nimport jso... |
<filename>app/IPS/IPS.js
var PFlist = require('./Plugins/PFlist.js')
var ModSec = require('./Plugins/ModSec.js')
var HAProxy = require('./Plugins/HAProxy.js')
var CSV_Export = require('./Plugins/CSV_Export.js')
var IPTables = require('./Plugins/IPTables.js')
var Checkpoint = require('./Plugins/Checkpoint.js')
var Check... |
<reponame>thedigicraft/Rocket.Chat
import { Meteor } from 'meteor/meteor';
import peerClient from '../peerClient';
import peerServer from '../peerServer';
Meteor.methods({
federationSearchUsers(email) {
if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'federationSea... |
def to_uppercase(string):
return string.upper()
print(to_uppercase("hello World"))
# Outputs:
# HELLO WORLD |
import re
input_string = "There are 7 days in a week and 12 noon in a day."
pattern = r"\d+"
match = re.findall(pattern, input_string)
print (match)
# Output: ['7', '12'] |
parallel -j1 "conjure solve gen.essence --solver-options -randomiseorder ; mv gen.solution random{}.param" ::: $(seq -w 1 100)
|
import DashboardPageWidgetVO from "../../../../../../../shared/modules/DashboardBuilder/vos/DashboardPageWidgetVO";
import TableColumnDescVO from "../../../../../../../shared/modules/DashboardBuilder/vos/TableColumnDescVO";
import DefaultTranslation from "../../../../../../../shared/modules/Translation/vos/DefaultTrans... |
<filename>spec/i18n_spec.rb<gh_stars>1-10
require 'spec_helper'
include Persons
def __find__( clazz, what, name )
g = clazz.new name => 'bla'
f = g.send(what).detect{|w|w.name == name}
f.name.should == name
f
end
def check_local( en, de )
I18n.locale = :en
yield.should == en
I18n.locale = :de
yield.s... |
for combo in $(curl -s https://raw.githubusercontent.com/LightningFastRom/hudson/master/lineage-build-targets | sed -e 's/#.*$//' | grep cm-14.1 | awk '{printf "lineage_%s-%s\n", $1, $2}')
do
add_lunch_combo $combo
done
|
#!/bin/bash
EMAIL="" # Insert your email address here to receive notifications when the ffmpeg script is restarted
SERVICE="ffmpeg"
WEBCAM=192.168.86.219 #Change to your webcam IP address
RTSP_URL="rtsp://$WEBCAM/user=admin&password=tlJwpbo6&channel=2&stream=0.sdp?real_stream"
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/li... |
<gh_stars>10-100
package inventory
import (
"fmt"
"github.com/cbuschka/tfvm/internal/inventory/state"
"github.com/cbuschka/tfvm/internal/log"
platformPkg "github.com/cbuschka/tfvm/internal/platform"
"github.com/cbuschka/tfvm/internal/version"
"os"
"sort"
)
// GetMatchingTerraformRelease returns the terraform v... |
<reponame>vsilaev/tascalate-async-awa
/**
* Copyright 2015-2021 <NAME> (http://vsilaev.com)
*
* 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 notic... |
<filename>demo/src/app/treeTwo/treeTwoNode.service.ts
import {Injectable} from '@angular/core';
import {TreeLocalStorageNodeService} from '../localStorage/treeLocalStorage.service';
@Injectable()
export class TreeTwoNodeService extends TreeLocalStorageNodeService {
protected treeName = 'treeTwo';
public get treeI... |
package pantry
import (
"context"
"io"
"io/ioutil"
"github.com/yazver/golibs/reflect"
)
//var (
// ErrInvalid = errors.New("invalid argument") // methods on File will return this error when the receiver is nil
// ErrPermission = errors.New("permission denied")
// ErrExist = errors.New("file already exist... |
set -e -x
export TF_NEED_CUDA=0
export BAZEL_VC="C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/"
python -m pip install --default-timeout=1000 wheel setuptools tensorflow==$TF_VERSION
bash ./tools/testing/build_and_run_tests.sh
python configure.py
bazel.exe build --no-cache \
--noshow_progress... |
package com.example.ecommerce;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.View;
import android.view.Menu;
import android.widget.Toast;
import com.google.android.material.floatingactionbutton... |
/*
* 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"); you ... |
#!/bin/bash
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this
# software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the... |
#!/usr/bin/env bash
# Copyright Amazon.com Inc. or its affiliates. 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
#
#... |
#!/usr/bin/env bash
export CONFIG_PREFIX="stage_two_"
export NUMBER_OF_TRAININGS=5
cd `dirname "${BASH_SOURCE[0]}"`
./run_stage_generic.sh
|
<filename>frontend/app/scripts/controllers/profile.js<gh_stars>0
/**
* @ngdoc function
* @name foodCircle.controller:ProfileCtrl
* @description
* # ProfileCtrl
* Controller of the foodCircle
*/
/*global
angular
*/
(function () {
'use strict';
angular.module('foodCircle').controller('ProfileCtrl', ['... |
public class Employee
{
public string Name { get; }
public int Experience { get; private set; }
public Employee(string name, int experience)
{
Name = name;
Experience = experience;
}
public void GainExperience(int years)
{
// Ensure that the experience can only be i... |
<reponame>jason0539/Android-Plugin-Framework
package no.agens.depth.lib.tween.interpolators;
import android.animation.TimeInterpolator;
/**
* Created by danielzeller on 09.04.15.
*/
public class ExpoInOut implements TimeInterpolator {
@Override public float getInterpolation(float t) {
if (t == 0) return 0;
... |
def most_common_value(dict, key):
values = []
for i in dict:
values.append(dict[i][key])
return max(set(values), key = values.count)
dict = {
'a': {'name': 'John', 'color': 'blue'},
'b': {'name': 'Bob', 'color': 'green'},
'c': {'name': 'John', 'color': 'blue'},
'd': {'na... |
mkdir dataset
wget http://data.vision.ee.ethz.ch/timofter/AIM19ExtremeSR/trainHR_001to200.zip -P dataset/
wget http://data.vision.ee.ethz.ch/timofter/AIM19ExtremeSR/trainHR_201to400.zip -P dataset/
wget http://data.vision.ee.ethz.ch/timofter/AIM19ExtremeSR/trainHR_401to600.zip -P dataset/
wget http://data.vision.ee.eth... |
module JokerAPI
module Operations
module DomainGetProperty
# @param [String] domain Domain name
# @param [String] key Property name
def domain_get_property(domain, key)
response = perform_request('domain-get-property', {:domain => domain, :pname => key})
properties = response.bod... |
<gh_stars>1-10
//package com.touch.air.mall.gateway.config;
//
//import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
//import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.GatewayCallbackManager;
//import com.alibaba.fastjson.JSON;
//import org.springframework.context.annotation.Conf... |
import React from "react";
import { Grid } from "@material-ui/core";
// styles
import useStyles from "./styles";
// components
import PageTitle from "../../components/PageTitle";
import Widget from "../../components/Widget";
import { Typography } from "../../components/Wrappers";
export default function ImageClassif... |
#!/bin/bash
if [[ $EUID != 0 ]]; then
echo "Error: This script requires root privileges to run."
else
read -p "Enter the directory path: " directory_path
if [ -d "$directory_path" ]; then
echo "Contents of $directory_path:"
ls "$directory_path"
else
echo "Error: Invalid director... |
package br.com.zup.mercadolivre.detalheproduto;
import br.com.zup.mercadolivre.config.exception.ProdutoNotFoundException;
import br.com.zup.mercadolivre.opiniao.OpiniaoRepository;
import br.com.zup.mercadolivre.pergunta.PerguntaRepository;
import br.com.zup.mercadolivre.produto.CaracteristicaRepository;
import br.com.... |
#!/bin/bash
set -e
# install git-crypt and create a sim link
pushd /tmp
wget https://github.com/AGWA/git-crypt/archive/ccdcc76f8e1a639847a8accd801f5a284194e43f.zip -O git-crypt.zip
unzip git-crypt.zip
cd git-crypt-ccdcc76f8e1a639847a8accd801f5a284194e43f
make
sudo install git-crypt /usr/local/bin
popd
|
Pod::Spec.new do |s|
s.name = 'DevPlayer'
s.version = '0.0.1'
s.summary = 'A short description of Network.'
s.swift_version = '5.0'
s.description = "this is a group of extensions for apps, used as private pod, it contains extensions for Foundation, UIKit, AVFoundation,.... |
export * from './z-menu-material.component';
|
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: "My SAM application"
Parameters:
EnvironmentName:
Type: String
Globals:
Function:
Timeout: 3
Resources:
ServerlessFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: build/
Handler: index.handler
Runtime: n... |
#!/bin/bash
#
# Assuming you have a kubernetes cluser and kubectl installed
#
if kubectl get svc | grep gitlab > /dev/null 2>&1 ;
then
echo "gitlab service already exists."
else
for i in *.yml
do
kubectl create -f $i
done
fi
kubectl get pods
kubectl get svc
|
#!/usr/bin/env bash
# Make sure we exit if there is a failure
set -e
function usage() {
echo "Usage: $0 [--with-musllvm] [--disable-inlining] [--ipdse] [--ai-dce] [--use-pointer-analysis] [--inter-spec VAL] [--intra-spec VAL] [--enable-config-prime] [--help]"
echo " VAL=none|aggressive|nonrec-aggressive... |
def generate_url_mapping(url_patterns):
url_mapping = {}
for pattern in url_patterns:
url_mapping[pattern.regex.pattern] = pattern.callback.view_class.as_view()
return url_mapping |
<reponame>chendave/buildkit
package solver
import (
"sync"
digest "github.com/opencontainers/go-digest"
)
// NewCacheKey creates a new cache key for a specific output index
func NewCacheKey(dgst digest.Digest, output Index) *CacheKey {
return &CacheKey{
ID: rootKey(dgst, output).String(),
digest: dgst,
... |
<filename>app/actions/entities/user.js
/*
* @link https://libretask.org/
* @license https://github.com/LibreTask/desktop/blob/master/LICENSE.md
*/
export const CREATE_OR_UPDATE_PROFILE = "CREATE_OR_UPDATE_PROFILE";
/*
LibreTask aspires to be an offline-first application (i.e., no internet
connection is ever re... |
#!/bin/bash
# https://mochajs.org/#running-mocha-in-the-browser
wget https://unpkg.com/mocha/mocha.css --output-document=mocha.css
wget https://unpkg.com/mocha/mocha.js --output-document=mocha.js
|
<filename>2021-05-09/外卖小程序/SpiceSpirit/pages/index/index.js
const app = getApp()
let height = 0
Page({
data:{
foodCategorys:["虾蟹","特色美食","预订商品","主食酒水"],
current_id:0,
city:'北京市',
screenHeight:parseInt(app.globalData.height) * 2,
hot_goods:[
{
"name":"麻辣龙虾尾",
"price... |
import { IPanel, PanelStack } from '@blueprintjs/core'
import * as React from 'react'
import ChannelDetailsOverview from 'components/ChannelDetailsOverview'
import styled from 'styled'
/**
* ChannelDetailsPanels component.
*/
const ChannelDetailsPanels = styled(PanelStack)`
width: 300px;
height: 360px;
`
/**
... |
// @flow
import type { CounterTransaction } from 'resource-counter';
import { CounterImmutable } from 'resource-counter';
import { Map as MapI } from 'immutable';
import Reference from 'reference-pointer';
type Taggable = Object|null|void;
type TaggerTransaction = {
tag ({[string]: any}): void,
untag ({[string]... |
import { AnimatorState } from "./AnimatorState";
export interface AnimatorStateMap {
[key: string]: AnimatorState;
}
/**
* A graph controlling the interaction of states. Each state references a motion.
*/
export class AnimatorStateMachine {
/** The list of states. */
readonly states: AnimatorState[] = [];
/... |
# src/bash/sca-pola/funcs/gmail-package.spec.sh
# v1.0.9
# ---------------------------------------------------------
# todo: add doSpecGmailPackage comments ...
# ---------------------------------------------------------
doSpecGmailPackage(){
doLog "DEBUG START doSpecGmailPackage"
cat doc/txt/sca-pola/tmpl/gmail-... |
public class ArrayPrint{
int[] arr = {1, 2, 3, 4, 5};
public void printElements() {
for (int i : arr) {
System.out.println(i);
}
}
} |
<filename>src/j6libc/errno.c
/* _PDCLIB_errno
This file is part of the Public Domain C Library (PDCLib).
Permission is granted to use, modify, and / or redistribute at will.
*/
#include "j6libc/int.h"
int _PDCLIB_errno = 0;
int * _PDCLIB_errno_func()
{
return &_PDCLIB_errno;
}
|
package com.sawert.sandbox.spring.mvc.aspect;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
/**
* Sample aspect ... |
#!/bin/sh
# Package
PACKAGE="node"
DNAME="Node.js"
# Others
INSTALL_DIR="/usr/local/${PACKAGE}"
PATH="${INSTALL_DIR}/bin:${PATH}"
preinst ()
{
exit 0
}
postinst ()
{
# Link
ln -s ${SYNOPKG_PKGDEST} ${INSTALL_DIR}
# Correct the files ownership
chown -R root:root ${SYNOPKG_PKGDEST}
exit 0
}... |
package com.github.danildorogoy.template;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
public class PieceKing extends Piece {
private Image image;
public PieceKing(int type, int xPos, int yPos) {
super(type, xPos, yPos);
name = "King";
if (type == 1) {
... |
<gh_stars>1-10
import block from 'bem-cn';
import React from 'react';
import {SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
import { bind } from 'decko';
import { Button } from 'shared/view/elements';
import { IAnnouncement } from 'shared/types/models';
import './AnnouncementsList.s... |
<filename>open-sphere-base/core/src/main/java/io/opensphere/core/hud/framework/Panel.java
package io.opensphere.core.hud.framework;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import io.opensphere.core.geometry.Geometry;
import io.opensphere.core.model.Scre... |
<filename>experimental/coach/ideal/showcase/coach/reflections/element_reference.java
/*
* Copyright 2014-2020 The Ideal Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file or at
* https://developers.google.com/open-source/licenses/bsd... |
using UnityEngine;
using System.Collections;
public class VipItemUI : MonoBehaviour {
// Reference to the UI elements representing different VIP levels
public GameObject[] vipLevelUIElements;
// Method to update the UI based on the VIP level
public void UpdateVipUI(int vipLevel) {
// Ensure th... |
from django.forms.models import model_to_dict
class MerchantSerializer:
def serialize(self, merchant):
serialized_data = model_to_dict(merchant)
return serialized_data |
#!/bin/sh
rm -f nginx.conf fastcgi.conf proxy.conf
rm -f *.log
rm -rf logs/*
|
<reponame>Isaquehg/algorithms_and_data_structures
#include <iostream>
using namespace std;
void Insertion_Sort(int vetor[], int tam){
int i, j;//auxiliares
int chave;
for(j = 1; j < tam; j ++){
chave = vetor[j];
i = j - 1;
while((i >= 0) && (vetor[i] < chave)){
vetor[i ... |
//
// NSString+Levenshtein.h
//
// Created by <NAME> on Sat Aug 09 2003.
// <EMAIL>
@interface NSString (Levenshtein)
// calculate the smallest distance between all words in stringA and stringB
- (float) compareWithString: (NSString *) stringB;
// calculate the distance between two string treating them each as ... |
import { Vector3, Quaternion } from "@arche-engine/math";
import { ICollider } from "../ICollider";
/**
* a base interface providing common functionality for joints.
*/
export interface IJoint {
/**
* Set the actors for this joint.
* @param actor0 the first actor.
* @param actor1 the second actor
*/
... |
from typing import List
from unittest.mock import MagicMock
def process_directories(config: int, dirs: List[str], m_success: MagicMock) -> None:
if list(m_success.call_args) == [(config & set(dirs), ), {}]:
assert (
list(m_success.call_args)
== [(config & set(dirs), ), {}])
else... |
<gh_stars>1-10
import React from "react";
import footerLogo from "../../assets/img/MOIZALogo/koreanHorizontalTypeWhite.svg";
import * as F from "./Footer.style";
const Footer = () => {
return (
<F.Container>
<F.ItemContainer>
<F.LogoItem src={footerLogo} />
<F.TextItem>
이용약관 ... |
#!/usr/bin/env bash
## 导入通用变量与函数
#15 3,23 * * * jd_sharecode.sh
#new Env('获取互助码');
grep '6dylan6_1124' /ql/config/task_before.sh >/dev/null 2>&1
if [[ $? != 0 ]];then
cp /ql/repo/6dylan6_jdpro/docker/task_before.sh /ql/config/ >/dev/null 2>&1 || cp /ql/data/repo/6dylan6_jdpro/docker/task_before.sh /ql/data/config/
f... |
<reponame>chlds/util<gh_stars>0
/*
Get a byte or bytes for one character based on UTF-8 out of the key board.
*/
# define CAR
# include <stdio.h>
# include "../../../incl/config.h"
signed(__cdecl cli_i_r(signed char(**argp))) {
auto signed char *b;
auto signed r;
auto signed short flag;
if(!argp) return(0x00);
if... |
<reponame>danimartinc/chatroom-TFG<gh_stars>0
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { UsuarioModel } from '../models/usuario.model';
import { map} from "rxjs/operators";
@Injectable({ //No necesito importarlo en el app.module
providedIn: 'root'
})
//E... |
<form>
<div>
<label>Position 1: </label>
<input type="text" name="position1" />
</div>
<div>
<label>Position 2: </label>
<input type="text" name="position2" />
</div>
<div>
<label>Position 3: </label>
<input type="text" name="position3" />
</div>
<div>
<label>Start Date: </labe... |
tmux kill-session -t roughbot-discord
|
import os
import stat
def is_file_accessible(file_path: str) -> bool:
if not os.path.exists(file_path):
return False # File does not exist
try:
mode = os.stat(file_path)[stat.ST_MODE]
if (mode & stat.S_IRUSR) == 0:
return False # File is not readable by the current user
... |
#
# Cookbook: kubernetes-cluster
# License: Apache 2.0
#
# Copyright 2015-2016, Bloomberg Finance L.P.
#
default['kubernetes']['registry'].tap do |registry|
# Set port for registry
registry['port'] = '5000'
# Set number of workers for Gunicorn
registry['workers'] = '8'
# Set storage location base for image... |
<gh_stars>0
package com.imooc.o2o.service;
import com.imooc.o2o.BaseTest;
import com.imooc.o2o.dao.ShopDao;
import com.imooc.o2o.dto.ImageHolder;
import com.imooc.o2o.dto.ShopExecution;
import com.imooc.o2o.entity.Area;
import com.imooc.o2o.entity.PersonInfo;
import com.imooc.o2o.entity.Shop;
import com.imooc.o2o.enti... |
#include "main.h"
#include "project_hal.h"
#include "max30100_for_stm32_hal.h"
// Private vars
I2C_HandleTypeDef hI2C; // I2C Handler
TIM_HandleTypeDef hTIMER; // TIMER Handler
UART_HandleTypeDef hUART; // UART Handler
// Private functions declaration
void Error_Handler(void);
void SystemClock_Config(void);
st... |
<reponame>ironhack-project-three/ironhack-project-three<filename>client/src/Pages/createWine.js
import React from "react";
import AddWine from "../components/AddWine";
export default function createWine() {
return (
<div>
<AddWine />
</div>
);
}
|
<gh_stars>1-10
const MAX = 10000
const generate = () => {
return Math.floor(Math.random() * MAX)
}
// Existem diferentes formas disponíveis para exportar funções/objetos/variáveis do seu módulo
// module.exports = { generate }
// module.exports.generate = generate;
// exports.generate = generate;
module.exports ... |
<reponame>JoonasKajava/AdventureGame
#include "stdafx.h"
#include "Boss.h"
#include "Enemy.h"
#include "GameContext.h"
Boss::Boss()
{
Name = "<NAME>";
sf::Texture* CharacterTexture = new sf::Texture();
this->Health = 30;
this->MaxHealth = 30;
Attack = 6;
Defence = 3;
Speed = 2;
Luck = 0;
MovementSpeed = 0.... |
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
# Load the dataset
df = pd.read_csv('data.csv')
# Separate the target variable and input variables
X = df.drop('SuccessProb', axis=1)
y = df['SuccessProb']
# Split data i... |
var middle_names = ["anal","anus","arse","ass","ass-fucker","asses","asshole","ballbag","balls","ballsack","bastard","beastiality","bellend",
"bestiality","biatch","bitch","bitcher","bitches","bitchin","bitching","bloody","blow job","blowjob","bollock","boner","boob","bugger","bum",
"bunny fucker","butt","butthole","bu... |
import React from 'react';
class App extends React.Component {
render() {
return (
<div>
<nav>
<a href="/">Home</a> |
<a href="/about">About Us</a> |
<a href="/contact">Contact</a>
</nav>
</div>
);
}
}
export default App; |
#!/bin/bash
# $0 - Script Path, $1 - Package Path, $2 - Target Location, and $3 - Target Volumn
MADLIB_VERSION=1.8dev
find $2/usr/local/madlib/bin -type d -exec cp -RPf {} $2/usr/local/madlib/old_bin \; 2>/dev/null
find $2/usr/local/madlib/bin -depth -type d -exec rm -r {} \; 2>/dev/null
find $2/usr/local/madlib/do... |
/* TestFrame.cpp */
//----------------------------------------------------------------------------------------
//
// Project: UserPreference 1.00
//
// License: Boost Software License - Version 1.0 - August 17th, 2003
//
// see http://www.boost.org/LICENSE_1_0.txt or the local copy
//
// Copyright (c) 201... |
#!/bin/bash
# set -x
if [ "$#" -ne 1 ]; then
echo "syntax: $0 <TYPE>"
echo "<TYPE> should be either golang or python"
exit 1
fi
TYPE=$1
function golang_clusterloader() {
# Export kube config
export KUBECONFIG=${KUBECONFIG-$HOME/.kube/config}
#### OCP 4.2: new requirements to run golang cluster-loader fro... |
#!/bin/bash
echo "Halting all nodes.."
for node in `cat cluster.yml | grep -v '#' | grep ' address: ' | awk '{print $3}'`
do
echo "Node: $node"
timeout 1 ssh -o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -x -l root $node 'poweroff'
done |
var group__CMSIS__MPIDR =
[
[ "__get_MPIDR", "group__CMSIS__MPIDR.html#ga05394b4cb9fb0ba1329ec6521c76e571", null ]
]; |
function take () {
mkdir -p $1
cd $1
}
#
# Get the value of an alias.
#
# Arguments:
# 1. alias - The alias to get its value from
# STDOUT:
# The value of alias $1 (if it has one).
# Return value:
# 0 if the alias was found,
# 1 if it does not exist
#
function alias_value () {
alias "$1" | sed "s/^$1='\(.*\... |
<filename>test/fragments/custom/comments/obsolete.d.ts
/**
* Escape quotation marks
*
* @deprecated Hello "World"!
*/
export interface A {}
/**
* Multiline
*
* @deprecated
* Deprecated because
* of stuff
*/
export interface B {}
/**
* Multiple deprecated tags
*
* @deprecated Message 1
* @deprecated R... |
<reponame>nimbus-cloud/cli<filename>src/cf/commands/route/unmap_route.go
package route
import (
"cf/api"
"cf/configuration"
"cf/requirements"
"cf/terminal"
"errors"
"github.com/codegangsta/cli"
)
type UnmapRoute struct {
ui terminal.UI
config configuration.Reader
routeRepo api.RouteRepository
appR... |
#!/usr/bin/env bash
/bin/rm -rf dist build
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
|
<reponame>movisens/SmartGattLib<gh_stars>100-1000
package com.movisens.smartgattlib.attributes;
import com.movisens.smartgattlib.Characteristics;
import com.movisens.smartgattlib.helper.AbstractAttribute;
import com.movisens.smartgattlib.helper.Characteristic;
public class DefaultAttribute extends AbstractAttribute
{... |
$:.push File.expand_path("../lib", __FILE__)
# Maintain your gem's version:
require "kudzu/version"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "kudzu"
s.version = Kudzu::VERSION
s.authors = ["<NAME>"]
s.email = ["<EMAIL>"]
s.homepage = "h... |
<filename>node_modules/react-icons-kit/icomoon/aidKit.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.aidKit = void 0;
var aidKit = {
"viewBox": "0 0 16 16",
"children": [{
"name": "path",
"attribs": {
"fill": "#000000",
"d": "M14 4h-3v-2c0-0.55-0.45-1-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.