text stringlengths 1 1.05M |
|---|
<filename>src/app/Services/common-function-my-profile.ts
import { Injectable } from '@angular/core';
import { LocationResponseData } from '../models/locations/location-response-data';
import { Railcard } from '../models/journey/railcards/railcard';
import { ResponseData } from '../models/common/response';
import { Http... |
<filename>WinSort/WinSort/FileName.cpp
#include "stdafx.h"
#include "FileName.h"
#include <algorithm>
#include "utils.h"
#include <iostream>
#include <stdlib.h>
#include <Shlwapi.h>
FileName::FileName(const wchar_t *file_name, bool isFolder) {
this->fileName = file_name;
this->isFolder = isFolder;
}
FileName::~Fi... |
package uk.org.ulcompsoc.ld32.systems;
import uk.org.ulcompsoc.ld32.components.Position;
import uk.org.ulcompsoc.ld32.components.Renderable;
import uk.org.ulcompsoc.ld32.util.Mappers;
import com.badlogic.ashley.core.Entity;
import com.badlogic.ashley.core.Family;
import com.badlogic.ashley.systems.IteratingSystem;
im... |
#!/bin/sh
echo 'Running yapf with google style'
yapf -ir .. --style google -vv
echo 'Reformatting completed'
echo 'Retrieving, preprocessing and segregating data...'
mlflow run ../executor/. -P config_name=eda_config.yaml
echo 'Data pipeline executed'
echo 'Generating pandas-profiling report for train dataset...'
... |
import numpy as np
# define the function
def f(x):
return np.power(x,2) - 2*x + 2
# set the parameters
# initial parameter
x_start = 4
# learning rate
alpha = 0.01
# iterations
iterations = 100
# store all parameters
parameters = []
# begin the optimization process
x = x_start
for i in range(iterations):
grad = 2... |
package libs.trustconnector.scdp.testsuite;
import libs.trustconnector.scdp.*;
import libs.trustconnector.scdp.SCDP;
import libs.trustconnector.scdp.TestSuite;
import libs.trustconnector.scdp.TestSuiteEntry;
public class Repeater extends TestSuite
{
@Override
public boolean ExcTest(final String[] param) {
... |
/**
* 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
# run_raspir_SLURM.sh
# last updated: 28 July 2021
# set partition
#SBATCH -p normal
# set run on x MB node only
#SBATCH --mem 30000
# set run x cpus
#SBATCH --cpus-per-task 8
# set name of job
#SBATCH --job-name=raspir_run
# Add miniconda3 to PATH. TODO - autodetection
. /mnt/ngsnfs/tools/miniconda3/... |
/**
* @file 二元表达式操作函数
* @author errorrik(<EMAIL>)
*/
/**
* 二元表达式操作函数
*
* @type {Object}
*/
var BinaryOp = {
/* eslint-disable */
43: function (a, b) {
return a + b;
},
45: function (a, b) {
return a - b;
},
42: function (a, b) {
return a * b;
},
47: functi... |
def mean(nums):
total = 0
for num in nums:
total += num
return total/len(nums)
print(mean([2,3,5,7])) |
function GpuTimer(app) {
this._gl = app.graphicsDevice.gl;
this._ext = app.graphicsDevice.extDisjointTimerQuery;
this._freeQueries = []; // pool of free queries
this._frameQueries = []; // current frame's queries
this._frames = []; // ... |
import subprocess
def heroku_deploy(app_name: str) -> None:
push_command = f"heroku container:push web --app {app_name}"
release_command = f"heroku container:release web --app {app_name}"
try:
subprocess.run(push_command, shell=True, check=True)
subprocess.run(release_command, shell=True, ... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for CESA-2015:1634
#
# Security announcement date: 2015-08-17 15:33:32 UTC
# Script generation date: 2017-01-01 21:11:33 UTC
#
# Operating System: CentOS 6
# Architecture: i386
#
# Vulnerable packages fix on version:
# - lemon.i686:3.6.20-1.el6_7.2
# - sqlite.i... |
#!/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"); you... |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Nap Schema
*/
var NapSchema = new Schema({
clanname: {
type: String,
default: '',
required: 'Please fill clanname'
},
clantag: {
type: String,
def... |
<reponame>mcanlas/doodle<gh_stars>0
package doodle
package core
package transform
import org.scalatest._
import org.scalatest.prop.Checkers
class TransformSpec extends FlatSpec with Matchers with Checkers {
import doodle.arbitrary._
import doodle.syntax.approximatelyEqual._
"scale" should "scale the x and y co... |
def lorentzian(x, amplitude, x0, sigma, background):
# A lorentzian peak with:
# Constant Background : background
return amplitude / (1 + ((x - x0) / sigma) ** 2) + background |
<html>
<head>
<title>My Table</title>
</head>
<body>
<table>
<tr>
<th>Name</th>
<th>Age</th>
<th>City</th>
</tr>
</table>
</body>
</html> |
public class ArrayOptimizer {
public static void main(String[] args) {
int[] array = {1, 7, 3, 2, 0, 4, 8, 5};
// Sort the array
int temp = 0;
for (int i = 0; i < array.length; i++) {
for (int j = i + 1; j < array.length; j++) {
if (array[i] > array[j]) ... |
package com.nortal.spring.cw.core.web.exception;
import com.nortal.spring.cw.core.exception.AppBaseRuntimeException;
/**
* @author <NAME>
* @since 25.02.2013
*/
@SuppressWarnings("serial")
public class WrongQueryException extends AppBaseRuntimeException {
public WrongQueryException(String errorMessageCode, Objec... |
/**
* Copyright 2019 The AMP HTML 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... |
public class TopThree {
public static void main(String[] args) {
int[] arr = {4, 5, 8, 1, 2, 9, 6, 3};
int max1=arr[0], max2=arr[0], max3=arr[0];
for(int i=0; i<arr.length; i++)
{
if(arr[i]>max1)
{
max3=max2;
max2=max1;
max1=arr[i];
}
else if(arr[i]>max2)
{
max3=max2;
max... |
# NOTE: This script expects environment variables to be passed for the Salesforce
# credentials to the orgs: feature, master, packaging, beta, prod such as...
# SF_USERNAME_FEATURE
# SF_PASSWORD_MASTER
# SF_SERVERURL_PACKAGING
# Setup variables for branch naming conventions using env overrides if set
if [ "$MASTER_BRA... |
<reponame>Alexlogvin2019/find2
/*
* (c) Copyright 2015 Micro Focus or one of its affiliates.
*
* Licensed under the MIT License (the "License"); you may not use this file
* except in compliance with the License.
*
* The only warranties for products and services of Micro Focus and its affiliates
* and licensors (... |
#!/bin/bash
dest=${TARGET-/kb/runtime}
echo "using $dest as installation directory";
mkdir -p $dest
# downlownload version
VERSION='v4.6.1-2012-08-27'
rm -rf cd-hit-${VERSION}*
wget "https://cdhit.googlecode.com/files/cd-hit-${VERSION}.tgz"
tar -zxvf cd-hit-${VERSION}.tgz
# compile and copy binaries
pushd cd-hit-${V... |
#!/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 "Licen... |
<gh_stars>1-10
T = int(input())
def dfs(graph, start):
candidates = [start]
visited = [False] * (len(graph)+1)
while candidates:
curr = candidates.pop()
for node in graph[curr]:
if not visited[node]:
visited[node] = True
candidates.append(node)
... |
<reponame>h4ckh0use/webapp<filename>src/components/SignupPage.js<gh_stars>0
import React, { useState } from 'react'
import { useHistory } from 'react-router-dom'
import styled from 'styled-components'
import Button from './Button'
import { CirclePicker } from 'react-color'
const SignupTitle = styled.h1`
font-family:... |
cd ..
cd ./cmake.linux/
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make
cd ..
cd BuildScript |
/** @ignore */ /** */
export { At } from './At';
export { Join } from './Join';
export { Length } from './Length';
export { Replace } from './Replace';
export { Split } from './Split';
|
# Application Builder Configuration File. Customized for: unpackerr
# Each line must have an export clause.
# This file is parsed and sourced by the Makefile, Docker and Homebrew builds.
# Powered by Application Builder: https://golift.io/application-builder
# Bring in dynamic repo/pull/source info.
source $(dirname "... |
#!/bin/bash -ex
APP_PATH="/app"
LOGS_PATH="/logs"
ENVVARS="${APP_PATH}/.env"
DOCKERCOMPOSE="${APP_PATH}/docker-compose.yml"
CERTS="${APP_PATH}/certs"
PFX="${CERTS}/tls.pfx"
CERT="${CERTS}/tls.crt"
PKEY="${CERTS}/tls.key"
UNSAFE="false"
ADMIN=$USER
REGISTRY_PREFIX=
# ===================================================... |
<gh_stars>0
// Generated file. DO NOT MODIFY IT BY HAND.
export interface Payload {
/**
* A UUID (unique user ID) specified by you. **Note:** If you send a request with a user ID that is not in the Amplitude system yet, then the user tied to that ID will not be marked new until their first event. Required unless ... |
<gh_stars>0
const property: CarProperty = {
name: 'color',
columnName: 'vari',
valueLabels: {
0: { fi: 'Musta', sv: 'Svart', en: 'Black' },
1: { fi: 'Ruskea (beige)', sv: 'Brun (beige)', en: 'Brown (beige)' },
2: { fi: 'Punainen', sv: 'Röd', en: 'Red' },
3: { fi: 'Oranssi', sv: 'Orange', en: 'Oran... |
/**
* Certificate Transparency Utilities
* Test SignedCertificateTimestamp
*
* By <NAME> <<EMAIL>>
*/
require('babel-polyfill');
const assert = require('assert');
const fs = require('fs');
const pvutils = require('pvutils');
const CTUtils = require('..');
const WebCrypto = require('node-webcrypto-ossl');
const w... |
#!/bin/bash
# Copyright (c) 2006-2013 Regents of the University of Minnesota.
# For licensing terms, see the file LICENSE.
# ABOUT:
#
# Run this script to create and install TileCache and MapServer
# config files and to generate cached tiles for specific Cyclopath
# installations and branches.
#
# This script is some... |
var classarmnn_1_1_elementwise_base_layer =
[
[ "ElementwiseBaseLayer", "classarmnn_1_1_elementwise_base_layer.xhtml#a6aa67447c0f7d3aa62124c535e5b550b", null ],
[ "~ElementwiseBaseLayer", "classarmnn_1_1_elementwise_base_layer.xhtml#a70745c21e09e36c3a83aff0c9848514c", null ],
[ "InferOutputShapes", "classar... |
<filename>src/main/java/com/alipay/api/domain/AlipayEcoRebateBalanceSendModel.java<gh_stars>0
package com.alipay.api.domain;
import java.util.List;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
/**
* 更新可领取的集分宝余额
*... |
def fibonacci(num: Int): Int = {
if (num <= 1)
num
else
fibonacci(num - 1) + fibonacci(num - 2)
}
def printFibo(num: Int) = {
println(s"$num numbers of Fibonacci series: ");
for (i <- 0 to num-1) {
println(fibonacci(i));
}
}
printFibo(20) |
#!/bin/bash
[ -n "$DEBUG" ] && set -x
set -o errexit
# working environment
export WORKSPACE=${WORKSPACE:-$(pwd)}
export TF_CONFIG_DIR="${WORKSPACE}/.tf"
export TF_DEVENV_PROFILE="${TF_CONFIG_DIR}/dev.env"
[ -e "$TF_DEVENV_PROFILE" ] && source "$TF_DEVENV_PROFILE"
# determined variables
export DISTRO=$(cat /etc/*re... |
package io.hnfmr.chapter4
import cats.Id
object MonadEx extends App {
def pure[A](value: A): Id[A] = value
def map[A, B](ia: Id[A])(f: A => B): Id[B] = f(ia)
def flatMap[A, B](ia: Id[A])(f: A => Id[B]): Id[B] = f(ia)
}
|
<filename>user_tools/tiled_csv_to_tilemap.py
# Turns a .csv file exported from Tiled into a .tilemap text file for use with our Tile-RAM.
# This program is very strict about the format of the input file.
# The input file must be:
# * A .csv file.
# * Each comma separated entry has a single 32-bit integer.
# * The first... |
#!/bin/bash
echo "📄 Creating upfile..."
# Prompt the user to enter the file name
read -p "Enter the file name: " fileName
# Validate the file name to ensure it does not contain any special characters or spaces
if [[ $fileName =~ ^[a-zA-Z0-9_]+$ ]]; then
# Prompt the user to enter the content of the file
rea... |
<reponame>geoand/quarkus-config-extensions<gh_stars>1000+
package io.quarkus.consul.config.runtime;
import java.util.Collections;
import org.eclipse.microprofile.config.spi.ConfigSource;
import org.eclipse.microprofile.config.spi.ConfigSourceProvider;
import org.jboss.logging.Logger;
import io.quarkus.runtime.Runtim... |
def validate_password(password):
# Check the length of the password
if len(password) < 8:
return False
# Check for at least 1 uppercase
if not any(letter.isupper() for letter in password):
return False
# Check for at least 1 lowercase
if not any(letter.islower() for letter in password):
re... |
<html>
<head>
<title>Best Programming Practices</title>
</head>
<body>
<h1>Best Programming Practices</h1>
<h2>By John Smith</h2>
<h3>May 8, 2021</h3>
<p>Learning good programming practices is essential for writing efficient, maintainable code. This post will provide some tips for good programming practices.</p>
</body... |
#!/bin/bash
cd "$NiftyMatch_BUILD_DIR"
make install
rm -rf "$Test_REPO_DIR"
git clone git@cmiclab.cs.ucl.ac.uk:GIFT-Surg/NiftyMatch-Test.git "$Test_REPO_DIR" --branch dev
rm -rf "$Test_BUILD_DIR"
mkdir -p "$Test_BUILD_DIR"
cd "$Test_BUILD_DIR"
cmake -D NiftyMatch_DIR="$NiftyMatch_DIR" -D BUILD_TESTS=ON "$Test_SOURCE_DI... |
import React, {useState} from 'react';
import axios from 'axios';
const App = () => {
const [inputA, setInputA] = useState('');
const [inputB, setInputB] = useState('');
const submitInputs = async () => {
const data = {
inputA: inputA,
inputB: inputB
};
try {
const response = await axios.post('https://examp... |
const cloud = require('wx-server-sdk')
cloud.init({
traceUser: true,
})
const md5 = require('md5-node')
const db = cloud.database()
const usersTable = db.collection("jingzhi-user")
const _ = db.command
// 云函数入口函数
exports.main = async (event, context) => {
console.log(event)
const wxContext = cloud.getWXContext()... |
<filename>src/4-Database-Git/Exercises/3-API-with-Mongoose/src/Routes/StudentRoute.js
import { Router } from 'express'
import { docs } from './docs.js'
import { Student } from '../Models/Student.js'
import { generateID } from '../utils/generateID.js'
export const studentRouter = Router()
.get('/', docs)
.post(... |
<gh_stars>10-100
package protobuf
import (
"bufio"
"context"
"encoding/binary"
"fmt"
"io"
"github.com/christianalexander/kvdb/stores"
"github.com/gogo/protobuf/proto"
)
type protoReader struct {
reader io.Reader
}
func NewReader(reader io.Reader) stores.Reader {
return protoReader{reader}
}
func (r protoR... |
<filename>src/cts-utils.h
/*
* Contacts Service
*
* Copyright (c) 2010 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
*
* Contact: <NAME> <<EMAIL>>
*
* 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 ... |
package study.business.domain.model.person;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.util.UUID;
@Getter
@Setter
@ToString
@NoArgsConstructor
public class PersonDeletedEvent implements Serializable {
... |
package string_handle;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author minchoba
* 백준 11575번: Affine Cipher
*
* @see https://www.acmicpc.net/problem/11575/
*
*/
public class Boj11575 {
private static final String NEW_LINE = "\n";
private stat... |
<filename>dataset.py<gh_stars>1-10
#!/usr/bin/env python
import os
import numpy as np
import PIL.Image
import torch
from torch.utils import data
class MyData(data.Dataset):
"""
对训练集数据进行获取/处理操作
"""
mean = np.array([0.485, 0.456, 0.406])
std = np.array([0.229, 0.224, 0.225])
def __init__(self, ... |
<gh_stars>10-100
import asyncio
import os
import re
import time
from bleak import discover, BleakClient
from .exceptions import MirobotError, MirobotAlarm, MirobotReset, InvalidBluetoothAddressError
os_is_posix = os.name == 'posix'
def chunks(lst, n):
"""Yield successive n-sized chunks from lst.
Paramete... |
<gh_stars>0
import { combineEpics } from 'redux-observable'
import { todosEpic } from './ToDosEpic/index'
export default combineEpics(todosEpic)
|
import engine from 'store/src/store-engine';
const localStorage = require('store/storages/localStorage');
const localStorages = [localStorage];
export const localStore: StoreJsAPI = engine.createStore(localStorages);
// ########localStore###########
/**
* 保存数据
* @param key
* @param value
*/
export const localSa... |
#!/bin/bash
# extract-chromosomes-3 0.0.1
# Generated by dx-app-wizard.
#
# Basic execution pattern: Your app will run on a single machine from
# beginning to end.
#
# Your job's input variables (if any) will be loaded as environment
# variables before this script runs. Any array inputs will be loaded
# as bash arrays... |
<reponame>julioxavierr/use-input-mask<filename>docs/Date.js
import React, { useRef } from 'react'
import useInputMask from '../src'
import { createAutoCorrectedDatePipe } from 'text-mask-addons'
const DateInput = props => {
const input = useRef(null)
const autoCorrectedDatePipe = createAutoCorrectedDatePipe('dd... |
<reponame>CarsonChu1/Team-Earth-App-Project<filename>BCFoodie/app/src/main/java/com/example/produceapp/MainActivity.java
package com.example.produceapp;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import andr... |
const getUsers = (users) => {
return users.filter(user => user.age > 25);
};
//Example Usage
let users = [
{
"id": 1,
"name": "Bob",
"age": 25
},
{
"id": 2,
"name": "John",
"age": 55
},
{
"id": 3,
"name": "Alice",
"age": 32
}
];
let filteredUsers = getUsers(users);
cons... |
<reponame>dbulaja98/ISA-2020-TEAM19
package com.pharmacySystem.model.medicine;
import com.pharmacySystem.model.pharmacy.Pharmacy;
import com.pharmacySystem.model.user.Patient;
import java.util.Date;
import javax.persistence.*;
@Entity
@Table(name = "medicineReservations")
public class MedicineReservation {
@Id
@... |
#!/bin/bash
set -xeuo pipefail
./load_sql.sh single-user-bootstrap.sql account-types.sql accounts.sql action-categories.sql
|
package com.example.basicbeans.proxy_print_obj_ref;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
pu... |
#!/bin/sh
export DISPLAY=:0.0
/usr/local/bin/ctest -V -VV -S /Dashboards/farsight-trunk-nightly/DashboardScripts/farsight-ubuntu-1_gcc43_rel_static_nightly.cmake > /Dashboards/Logs/rel_static_nightly.log 2>&1
/usr/local/bin/ctest -V -VV -S /Dashboards/farsight-trunk-nightly/DashboardScripts/farsight-ubuntu-1_gcc43_dbg_... |
function deploy_current_branch_to_staging() {
capistrano_make_current_branch_deploy_to_staging || return $?
bundle exec cap staging deploy || return $?
git checkout config/deploy/staging.rb || return $?
}
|
<reponame>acouvreur/skeleton-generator
package org.sklsft.generator.bc.validation.rules.impl;
import org.sklsft.generator.bc.validation.rules.ProjectMetaDataRuleChecker;
import org.sklsft.generator.model.metadata.PackageMetaData;
import org.sklsft.generator.model.metadata.ProjectMetaData;
import org.sklsft.genera... |
<gh_stars>0
#include "gfx/legato/generated/le_gen_scheme.h"
const leScheme RedScheme =
{
{
{ { 0x36, 0xCF, 0xFF, 0x80, 0x40, 0x36, 0xE1, 0x80, 0xFF, 0xE1, 0xCF, 0x36, 0x12, 0xFF, 0xE1, 0x91 } }, // GS_8
{ { 0xE0, 0xBA, 0xFF, 0x92, 0x49, 0xE0, 0xDB, 0x92, 0xFF, 0xDB, 0xBA, 0xE0, 0x3, 0xFF, 0xDB, 0x... |
#!/usr/bin/env bash
echo "Running $0..."
test_files=(
__init__.py
sublime.py
sublime_plugin.py
)
for file in "${test_files[@]}"; do
mv "./tests/${file}" ./
done
py.test
exitcode=$?
for file in "${test_files[@]}"; do
mv "${file}" ./tests/
done
exit $exitcode
|
<gh_stars>1-10
// SPDX-License-Identifier: Apache-2.0
// YAPION
// Copyright (C) 2019,2020 yoyosource
package yapion.serializing.serializer.object.other;
import yapion.annotations.deserialize.YAPIONLoadExclude;
import yapion.annotations.serialize.YAPIONSaveExclude;
import yapion.hierarchy.typegroups.YAPIONAnyType;
im... |
#!/bin/bash
openssl genrsa -out privkey.pem 2048
openssl rsa -pubout -in privkey.pem -out pubkey.pem
SIGNING_KEY=$(cat privkey.pem)
VERIFICATION_KEY=$(cat pubkey.pem)
JWT_SIGNING_KEYS=$(cat <<EOF
jwt:
token:
signing-key: |
$(echo "$SIGNING_KEY" | awk '{printf " %s\n", $0}')
verification-key: |
$(... |
source $BS_ZSH_BASE/zsh-config/dirmark.sh
source $BS_ZSH_BASE/zsh-config/chinese_characters_adapter.sh
source $BS_ZSH_BASE/zsh-config/find.sh
source $BS_ZSH_BASE/zsh-config/git.sh
source $BS_ZSH_BASE/zsh-config/grep.sh
source $BS_ZSH_BASE/zsh-config/misc.sh
source $BS_ZSH_BASE/zsh-config/tools.sh
source $BS_ZSH_BASE/z... |
<filename>NChart3D_OSX.framework/Versions/A/Headers/NChartDataSmoother.h
/**
* This file is the part of NChart3D Framework
* http://www.nchart3d.com
*
* File: NChartDataSmoother.h
* Version: "2.9.1"
*
* Copyright (C) 2017 Nulana LTD. All Rights Reserved.
*/
#import "NChartTypes.h"
/**
* The NChartDataSmooth... |
<gh_stars>1-10
package router
import (
"fmt"
"github.com/raythorn/zebra/context"
"github.com/raythorn/zebra/oss"
"regexp"
"strings"
)
type Route struct {
pattern string
regexp *regexp.Regexp
actions map[string]Handler
group *Group
oss *oss.Oss
}
func newRoute() *Route {
return &Route{"", nil, make(... |
<reponame>kh1iu/vrl
import logging
import sys
sys.path.append('..')
import os
import argparse
import numpy as np
import tensorflow as tf
import ipdb
from lib.vis_utils import *
from lib.logging_utils import *
from lib.common_utils import *
from lib.data_utils import *
from data.load_data import *
import model.vrl as... |
echo Entrando na pasta backend
cd backend
echo Entrando na pasta backend
sudo docker-compose up -d
echo Executando run.sh
sudo chmod +x ./run.sh
sudo ./run.sh
echo Entrando na pasta mobile
cd .. && cd mobile
echo instalando dependências
yarn
echo Entrando na pasta frontend
cd .. && cd frontend
echo instalando dep... |
package net.oiyou.day002;
public class Day002 {
public ListNode addTwoNumbers(ListNode l1, ListNode l2) {
ListNode dummyHead = new ListNode(0);
ListNode cur = dummyHead;
int carry = 0;
while (l1 != null || l2 != null) {
int sum = carry;
if (l1 != null) {
... |
#!/bin/bash
VERSION=${VERSION-master}
CMDS="
time -v shards install --production
VERSION=${VERSION} time -v shards build --static --release --stats --time
mv bin/gluster-metrics-exporter bin/gluster-metrics-exporter-amd64
"
docker run --rm -it -v $PWD:/workspace -w /workspace crystallang/crystal:0.35.1-alpine /bin/sh ... |
# frozen_string_literal: true
RSpec.describe RuboCop::Cop::Lint::DeprecatedClassMethods, :config do
context 'prefer `File.exist?` over `File.exists?`' do
it 'registers an offense and corrects File.exists?' do
expect_offense(<<~RUBY)
File.exists?(o)
^^^^^^^ `File.exists?` is deprecated ... |
#
# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Softwar... |
<filename>src/main/java/org/ringingmaster/util/javafx/dialog/EditMode.java
package org.ringingmaster.util.javafx.dialog;
/**
* TODO Comments
*
* @author <NAME>
*/
public enum EditMode {
ADD("Add"),
EDIT("Edit");
private final String editText;
EditMode(String editText) {
this.editText = e... |
#! /usr/bin/env zsh
HZ_BANNER[version]="Show the current version of Hz."
hz-version() { --hz-version }
HZ_BANNER[commands]="Show all commands known to Hz."
hz-commands()
{
--hz-once!
hz-help
}
HZ_BANNER[install]="Install Hz configuration."
hz-install()
{
--hz-ruby-hz "Hz::Installer.run('${HZ_ROOT}', '${HZ_TARG... |
import logging
import rlp
from eth_rpc_client import Client as EthereumRpcClient
from .node import NodeProcess
log = logging.getLogger('golem.ethereum')
class Client(EthereumRpcClient):
""" RPC interface client for Ethereum node."""
STATIC_NODES = ["enode://f1fbbeff7e9777a3a930f1e55a5486476845f799f7d603f7... |
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
# Load data
df = pd.read_csv('car_data.csv')
X = df[['cylinders', 'displacement', 'horsepower', 'w... |
#!/bin/sh
# compat.sh
#
# Copyright The Mbed TLS Contributors
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
#!/bin/bash
echo "Waiting nexus to launch on 19999..."
while ! curl -s http://localhost:19999 > /dev/null; do
sleep 1 # wait for 1 second before check again
done
echo "Nexus launched"
|
import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/Components/Views/Home.vue'
import Login from '@/Components/Views/Login.vue'
import Register from '@/Components/Views/Register.vue'
import DahboardLayout from '@/Components/Layouts/Layout.vue'
import Dashboard from '@/Components/Views... |
#!/usr/bin/env bash
if [[ ! -f main.go ]]; then
echo "invalid dir"
exit 1
fi
if [[ -f logdog ]]; then
echo "logdog exists, remove"
rm logdog
fi
if [[ -f logdog.tar.gz ]]; then
echo "logdog.tar.gz exists, remove"
rm logdog.tar.gz
fi
go build -o logdog ./
tar czf logdog.tar.gz logdog logdog.to... |
<gh_stars>0
package com.moecrow.demo.model.dto;
import lombok.Data;
/**
* @author willz
* @date 2020.11.12
*/
@Data
public class BattleStartMessage {
private String mapId;
}
|
#!/usr/bin/env bash
# Migrate Atlassian Bitbucket Server to Bitbucket Cloud
# Copyright 2018 Shawn Woodford
# https://github.com/swoodford
# Requires curl, git, jq, bc openssl
# It is recommended to run this script as root directly on your Bitbucket Server (Linux only)
# TERMS AND CONDITIONS FOR USE, REPRODUCTION,... |
<filename>lib/legion/data.rb
require 'legion/data/version'
require 'legion/data/settings'
require 'sequel'
require 'legion/data/connection'
require 'legion/data/model'
require 'legion/data/migration'
module Legion
module Data
class << self
def setup
connection_setup
migrate
load_mo... |
SELECT AVG(quantity)
FROM orders
WHERE region = 'National'; |
function dec(value, context) {
context.addInitializer(function() {
this[context.name + '_' + context.kind + 'Context'] = context;
});
if (context.kind === 'getter') {
return function () {
return value.call(this) + 1;
}
} else {
return function (v) {
return value.call(this, v + 1);
... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _icons = require("@buffetjs/icons");
var _Div = _interopRequireDefault(require("./Di... |
/**
*
*/
package jframe.pushy.impl;
import jframe.pushy.Fields;
import jframe.pushy.MultiPushyConf;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.relayrides.pushy.apns.ApnsEnvironment;
import com.relayrides.pushy.apns.PushManager;
import com.relayrides.pushy.apns.PushManagerConfiguration;
im... |
<reponame>riordanalfredo/MeetupsForPetsIONIC<gh_stars>0
import org.jsoup.Jsoup;
import org.jsoup.nodes.Attribute;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.w3c.dom.Attr;
import java.io.*;
import java.nio.file.*;
public class Parser {
private sta... |
<filename>src/hooks/useNetworkListener.js
import { useState, useEffect } from 'react';
import NetInfo from "@react-native-community/netinfo";
import device from 'src/utils/device';
export default () => {
const [ connected, setConnected ] = useState(true);
useEffect(() => {
const webWeAreLive = () => setConne... |
#!/usr/bin/env bash
usage() {
cat <<'HEREDOC'
NAME
delete-linux-account.sh -- remove a Linux account and the home directory of a user
SYNOPSIS
sudo delete-linux-account.sh [-n] username group
delete-linux-account.sh -h: display this help
DESCRIPTION
Remove a Linux account and the home directory.... |
#!/bin/bash
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
. ./test-lib.sh
setup_initgit
setup_gitgit
(
set -e
cd git-git
git checkout -q --track -b work origin
echo "some work done... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.