text stringlengths 1 1.05M |
|---|
from sys import setprofile
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from .drawers import Drawer
from .positioners import Limiter, ChartPositioner
from .models import Line, Candle
from .factories import VertexesFactory
from PyQt5.QtGui import QBrush, QColor, QPainter
from PyQt5.QtWidgets import QWidget
from .... |
<reponame>phamvinhphat/SOS-BE-
const mongoose = require('mongoose');;
const {createServer} = require('http')
const express = require('express');
const server = express();
const httpServer = createServer(server);
const { Server } = require("socket.io");
const createSocketIO =(httpServer) => {
const io = new Server(... |
#include <stdio.h>
// A function to print all prime numbers
// less than or equal to 'n'
void printPrimes(int n)
{
// Create an array of size n and
// initialize all elements as 0
int arr[n];
for (int i = 0; i < n; i++)
arr[i] = 0;
// Traverse every number from 2 to n
// and mark them ... |
words = ['This', 'is', 'sentence', 'with', 'many', 'words'] |
#!/bin/bash
# Dump environment on to file so that we can load it up on the crontab
printenv > /etc/docker-env
# Run cron & tail logs
cron
touch /var/log/cert-update.log
tail -f /var/log/cert-update.log
|
#!/bin/bash
mkdir -p templates/plugins
cp ../../*/assets/* templates/plugins/
# cp ../../automod/assets/* templates/plugins/
# cp ../../automod_legacy/assets/* templates/plugins/
# cp ../../autorole/assets/* templates/plugins/
# cp ../../commands/assets/* templates/plugins/
# cp ../../customcommands/assets/* templat... |
<reponame>go-xe2/xfw<gh_stars>0
// 表单过滤库
package xfilter
import (
"encoding/json"
"github.com/gogf/gf/g/os/glog"
"github.com/gogf/gf/g/text/gstr"
"github.com/gogf/gf/g/util/gconv"
"github.com/gogf/gf/g/util/gvalid"
"reflect"
"strings"
)
const XFilterTagName = "filter"
const XOrmTagName = "orm"
// 检查是否包含字段
fun... |
declare -a array=()
declare -a array=("uniform" "bias" "struct")
for ((i = 0; i < ${#array[@]}; i++)) {
echo "type = ${array[i]}" >> log.txt
a=0
while [ $a -lt 10 ]
do
b=`echo "scale=1; $a / 10 " | bc`
echo $b >> log.txt
python run_link_pred.py --rate $b --type ${array[i]} --dat... |
<filename>public/gulp/routers/a.js<gh_stars>1-10
var _ = require('underscore');
var fs = require('fs');
module.exports = function(router){ |
import React, {useState} from 'react';
const QuoteList = () => {
const [quotes, setQuotes] = useState([
{ name: 'Albert Einstein', text: 'Life is like riding a bicycle. To keep your balance, you must keep moving.'},
{ name: 'Oscar Wilde', text: 'Be yourself; everyone else is already taken.'}
]);
const addQuote =... |
import { writable } from 'svelte/store';
const rates = writable([]);
export { rates as default };
|
<reponame>pradeep-gr/mbed-os5-onsemi<filename>features/storage/FEATURE_STORAGE/flash-journal/flash-journal-strategy-sequential/flash_journal_private.h<gh_stars>10-100
/*
* Copyright (c) 2006-2016, ARM Limited, All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2... |
class StringList:
def __init__(self, string):
self.stringlist = [string]
def printString(self):
for s in self.stringlist:
print(s + ' was stored')
mylist = StringList('Hello World')
mylist.printString() |
<reponame>zonesgame/StendhalArcClient<gh_stars>1-10
package z.system;
import arc.Core;
import arc.Events;
import arc.math.Mathf;
import arc.struct.ObjectMap;
import arc.util.serialization.XmlReader;
import mindustry.game.EventType;
import mindustry.world.Tile;
import static mindustry.Vars.world;
/**
* 解决原版Floor不包含... |
#!/bin/bash
FUNC_TEST_DIR=$(dirname $0)/../ironicclient/tests/functional/
CONFIG_FILE=$FUNC_TEST_DIR/test.conf
if [[ -n "$OS_AUTH_TOKEN" ]] && [[ -n "$IRONIC_URL" ]]; then
cat <<END >$CONFIG_FILE
[functional]
api_version = 1
auth_strategy=noauth
os_auth_token=$OS_AUTH_TOKEN
ironic_url=$IRONIC_URL
END
else
cat <<END >... |
#!/bin/bash
#
# Copyright 2019 The FATE 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 requ... |
class BaseApi {
public data: any
constructor(private status: number, private description: string) {
//
}
}
export = BaseApi
|
#!/bin/sh
if [ "$2" = "" ]; then
echo "usage: $0 <unused> <ssh-key-name>"
exit 1
fi
name=$2
key=/etc/polynimbus/ssh/id_oracle_$name
if [ -f $name ] || [ -f $key ]; then
echo "warning: ssh key $key already exists"
exit 0
fi
ssh-keygen -q -t rsa -f $key -N "" -C ubuntu@`hostname`
|
#!/bin/bash
# 1080p Anime with ASS Subtitles to DVD converter script.
# Written by Robert Ian Hawdon (https://robertianhawdon.me.uk) 2016
# Tested on Ubuntu 16.04
# Requires ffmpeg, mencoder
########
# NTSC #
########
# Resize video to 480p at 23.976 FPS.
mencoder -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf sca... |
<filename>src/main/java/wood/poulos/webcrawler/WebCrawler.java
/*
* MIT License
*
* Copyright (c) 2017 <NAME>, <NAME>
*
* 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 restrict... |
package org.hisp.dhis.de.action;
/*
* Copyright (c) 2004-2012, University of Oslo
* 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 co... |
package ${basePackage}.domain.user.auth;
import ${basePackage}.domain.BaseJpaModel;
import com.chequer.axboot.core.annotations.ColumnPosition;
import com.chequer.axboot.core.annotations.Comment;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations... |
<filename>src/middlewares/check-in-token.js
import status from 'http-status'
import auth from '../lib/auth'
import r from '../lib/resjson'
export default () => {
return (req, res, next) => {
let response
if (!req.headers.token) {
response = r('missing token')
return res.status(status.BAD... |
#!/bin/bash
source .env
docker-compose -f nts-ng-docker-image-build-ubuntu.yaml build --build-arg NTS_BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') --build-arg NTS_BUILD_VERSION=$NTS_BUILD_VERSION
|
<gh_stars>10-100
const args = process.argv.slice(2);
const start = async () => {
const [hubIpAddress, securityId, coapClientPath] = args;
if (!hubIpAddress) {
console.log('Please provide the ip address of the Tradfri hub as the first argument!')
return;
}
if (!securityId) {
console.log('Please pr... |
<gh_stars>0
/* eslint-disable no-undef */
// sc: https://ru.hexlet.io/courses/js-advanced-testing/lessons/stub/exercise_unit
// tests/getUserMainLanguage.test.js
// Протестируйте функцию getUserMainLanguage(username, client), которая определяет
// язык на котором пользователь создал больше всего репозиториев. Для реал... |
export default () => {
const emptyState = {
balances: {
search: {
visible: false,
query: ``
}
},
blocks: {
search: {
visible: false,
query: ``
}
},
delegates: {
search: {
visible: false,
query: ``
}
},
prop... |
<reponame>iotshaman/node-primer
// THIS FILE IS JUST AN ENTRY POINT FOR RUNNING ALL OF THE LESSONS
// IF YOU JUST WANT TO RUN 1 LESSON, USE "npm run lesson [lesson number]"
var lessons = [
require("./lessons/1.importing"),
require("./lessons/2.truthiness-and-falsiness"),
require("./lessons/3.arrays"),
require("... |
<filename>App.js<gh_stars>0
'use strict';
const GA = require('./algorithm/GA');
const City = require('./algorithm/City');
const Population = require('./algorithm/Population');
const RouteManager = require('./algorithm/RouteManager');
const Point = require('./Point');
class App {
static reset() {
App.points = [];... |
#!/bin/bash
# given (a) a list of benchmarks, (b) a compile mode, and (c) a target apisspec, determine the compile time and place it in an output file.
if [[ $# -ne 3 ]]; then
echo "Usge: $0 <benchmark list (newline separated)> <compile settings file> <target apispec>"
exit 1
fi
mkdir -p binding_candidates
pushd .... |
<reponame>opulencesix/escalate<gh_stars>0
package com.o6.dto;
import java.util.ArrayList;
import java.util.List;
/*
* User profiles, and currently selected profile.
*
*/
public class UserProfileDTO {
List<ProfileTemplate> allProfiles = new ArrayList<ProfileTemplate>();
String currentProfileName;
public U... |
<reponame>m-nakagawa/sample
/*
* 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 ... |
<reponame>nofurtherinformation/netlify-express
'use strict';
const express = require('express');
const path = require('path');
const serverless = require('serverless-http');
const app = express();
const bodyParser = require('body-parser');
const initSqlJs = require('sql.js');
var fs = require('fs');
// get date range ... |
#!/bin/bash
# LinuxGSM fix_ut2.sh function
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Resolves various issues with configs in Unreal Tournament 3.
local commandname="FIX"
local commandaction="Fix"
local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_parms(){
parms="... |
<gh_stars>0
import axios from './axios'
const filterParams = params => {
let resultParams = {}
for (const k of Object.keys(params)) {
if (params[k] === '') {
continue
}
resultParams[k] = params[k]
}
return resultParams
}
const create = (url, params) => {
retur... |
rosrun moveit_ikfast create_ikfast_moveit_plugin.py fetch arm fetch_ikfast_plugin /home/hanhong/indigo/src/fetch_ikfast_plugin/src/fetch_arm_ikfast_solver.cpp |
package cucumber.runtime.java;
import cucumber.api.java8.StepdefBody;
import cucumber.runtime.CucumberException;
import cucumber.runtime.JdkPatternArgumentMatcher;
import cucumber.runtime.ParameterInfo;
import cucumber.runtime.StepDefinition;
import cucumber.runtime.Utils;
import gherkin.I18n;
import gherkin.formatter... |
<reponame>HiAwesome/kotlin-demo
package com.moqi.java.ch08;
import kotlin.jvm.functions.Function1;
import static com.moqi.kotlin.ch08.ProcessTheAnswer.*;
/**
* Java ProcessTheAnswerJava
*
* @author moqi On 12/8/20 15:34
*/
public class ProcessTheAnswerJava {
public static void main(String[] args) {
... |
#Generate Virtual Environment
virtualenv -p python3 environment
source environment/bin/activate
pip3 install -r requirements.txt
deactivate
|
class EdiTransactionSetsController < ApplicationController
def index
# @edi_transaction_sets = EdiTransactionSet.all
@edi_transaction_sets = Protocols::X12::TransactionSetEnrollment.limit(100)
respond_to do |format|
format.html # index.html.erb
format.json { render json: @edi_transaction_sets }
... |
import java.util.*;
public class Main {
public static void main(String[] args) {
int[] nums = {4, 7, 10, 11, 24};
List<Integer> list = new ArrayList<>();
for(int num : nums) {
list.add(num);
}
System.out.println(list);
}
} |
<reponame>realAaronWu/pravega-operator
// +build !ignore_autogenerated
// Code generated by operator-sdk. DO NOT EDIT.
package v1beta1
import (
v1 "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must... |
# -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... |
#!/bin/bash -e
#
# Purpose: Pack a Chromium extension directory into crx format
crx="archive.crx"
pub="publickey.tmp"
sig="signature.tmp"
zip="../compressed-standard/archive.zip"
key="./key"
# signature
openssl sha1 -sha1 -binary -sign key.pem < "$zip" > "$sig"
# public key
openssl rsa -pubout -outform DER < key.pem... |
<gh_stars>0
import {
Module,
NestModule,
MiddlewareConsumer,
RequestMapping,
RequestMethod,
} from '@nestjs/common';
import CatsModule from './cat/cats.module';
import LoggerMiddleware from './common/middleware/logger.middleware';
import { CatsController } from './cat/cats.controller';
@Module({
imports: [... |
def sum_natural(n):
return n * (n+1)//2
result = sum_natural(7)
print(result) |
package net.natroutter.hubcore.features.SelectorItems;
import java.util.*;
import net.natroutter.hubcore.Handler;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.inventory.Inventory;
import net.natroutter.hubcore.features.gadgets.Gadget;
import net.natroutter.hubcore.features.gadgets.G... |
#!/bin/bash
set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately
PROJECT_NAME=TestProject
# Clean up.
rm -rf $PROJECT_NAME
mkdir -p $PROJECT_NAME && cd $PROJECT_NAME
# Create a new Xcode project.
swift package init
swift package generate-xcodeproj
# Create a Podfile with ... |
/*
* 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 ed.biodare2.backend.repo.dao;
import com.fasterxml.jackson.databind.ObjectMapper;
import ed.biodare2.backend.features.... |
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.info"
on_chroot << EOF
/etc/init.d/fake-hwclock stop
hardlink -t /usr/share/doc
EOF
if [ -d "${ROOTFS_DIR}/home/${MAIN_USER}/.config" ]; then
chmod 700 "${ROOTFS_DIR... |
<reponame>nortal/spring-mvc-component-web
package com.nortal.spring.cw.jsp.web.portal.support.file;
import java.io.InputStream;
import com.nortal.spring.cw.core.model.FileHolderModel;
import com.nortal.spring.cw.core.web.component.support.file.FileDownloadStream;
import com.nortal.spring.cw.core.web.util.BeanUtil;
im... |
#!/bin/bash
#
# setup_after_boot.sh will run after boot and only once the network is online.
# The script runs as the root user.
# Log all output.
exec 2> /var/log/setup_after_boot.log 1>&2
# Stop on any failure.
set -euxo pipefail
echo "Running epoxy client"
/usr/bin/epoxy_client -action epoxy.stage3
|
// winescrape.js
// Scrapes wine.com website
const axios = require("axios");
const cheerio = require("cheerio");
async function scrapeAll() {
var allWines = [];
var colors = ["red", "white", "rose", "sparkling"];
for (var c = 0; c < colors.length; c++) {
var color = colors[c];
for (var i ... |
'''
MIT License
Copyright (c) 2018-2019 Onur
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, merge, publish, dis... |
MAXTOKENS=3200
FRQ=8
# users' code dir
UDIR="deepnmt"
# translation task
TASK="adv_translation"
# model arch
ARCH="adv_transformer_wmt_en_de"
# Transformer Large
#ARCH="adv_transformer_vaswani_wmt_en_de_big"
MODEL_PATH="/mnt/data/admin-data/models/wmt14-en-fr-admin-60-12l"
LOG="/mnt/data/admin-data/logs/wmt14-en-... |
func getPowerSet(arr: [Int]) -> [[Int]] {
if arr.isEmpty {
return [[]]
}
let firstElement = arr[0]
var powerSet = [[Int]]()
for subset in getPowerSet(arr: Array(arr.dropFirst())) {
powerSet.append(subset)
powerSet.append(subset + [firstElement])
}
return powerSet
}
... |
<gh_stars>0
package deployment
import (
"fmt"
"reflect"
"testing"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
fakeclientapps "k8s.io/client-go/kubernetes/fake"
)
func Test_HasDeploymentsInNamespace(t *testing.T) {
deploy... |
#!/usr/bin/env bash
# Functions to get first 10 files in current directory and function to display the array of files and displays with a counter
function getFiles() {
# define global variable
FILES=`ls -1 | sort | head -10`
}
function displayFiles() {
local COUNT=1
for FILE in $@
do
echo "File#$COUNT = $FILE"
... |
<filename>src/globus-client-java/src/main/java/org/globus/jsonUtil/GlobusJsonDateDeserializer.java<gh_stars>0
/**
* Copyright 2014 University of Chicago
* All rights reserved.
* Created Aug 21, 2014 by pruyne
*/
package org.globus.jsonUtil;
import java.io.IOException;
import java.text.ParseException;
import java.... |
# SPDX-License-Identifier: BSD-3-Clause
if [ "`uname`" == "FreeBSD" ]; then
exit 77
fi
source helpers.sh
nv_test_index=0x1500018
large_file_name="nv.test_large_w"
large_file_read_name="nv.test_large_r"
pcr_specification=sha256:0,1,2,3+sha1:0,1,2,3
file_pcr_value=pcr.bin
file_policy=policy.data
cleanup() {... |
<gh_stars>10-100
#include <iostream>
#include <exception>
#include <string>
#include <sqlitepp/sqlitepp.hpp>
struct employee
{
std::string name;
int age;
float salary;
};
std::ostream& operator<<(std::ostream& os, employee const& e)
{
return os << e.name << ": " << e.age << ", earns " << e.salary ... |
from util.utils import Region, Utils
from util.logger import Logger
from util.stats import Stats
from util.config import Config
class HeadquartersModule(object):
def __init__(self, config, stats):
"""Initializes the HQ module.
Args:
config (Config): ALAuto Config instance
... |
<reponame>danieldiamond/gitlab-analytics
import sys
import re
from io import StringIO
import json
import time
from logging import error, info, basicConfig, getLogger, warning
from os import environ as env
from typing import Dict, Tuple, List
from yaml import load, safe_load, YAMLError
import boto3
import gspread
impor... |
'use strict'
import _ from 'lodash'
import config from 'config'
import nodeDebug from 'debug'
import Twit from 'twit'
import TweetsService from './TweetsService'
const debug = nodeDebug('tweetwall:services:TweetsWorker')
const {
auth: twitterAuth,
hashtags: twitterHashtags,
retweets
} = config.get('tweetwall.t... |
def sum_of_numbers(n):
# base case
if(n == 0):
return 0
# recursive case
else:
return n + sum_of_numbers(n-1) |
#!/bin/bash
#--------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#----------------------... |
#! /bin/bash
#SBATCH -J sdenet
#SBATCH -o result/sdenet_train.out
#SBATCH -p compute
#SBATCH --qos=debug
#SBATCH -N 1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=12
#SBATCH -w node1_3060
#SBATCH -t 24:00:00
python... |
#!/bin/bash
# Name of the software
software_name="java"
# Path of the software
soft_path=$(which $software_name)
# Check to see if the software is already installed
if [ -z "$soft_path" ]; then
# Install the software
sudo apt-get install $software_name
fi |
<gh_stars>10-100
# Copyright (c) 2017-2019 <NAME>
#
# SPDX-License-Identifier: BSD-3-Clause
# The BSD-3-Clause license for this file can be found in the LICENSE file included with this distribution
# or at https://spdx.org/licenses/BSD-3-Clause.html#licenseText
from struct import pack, unpack_from
from hashlib import ... |
<gh_stars>100-1000
import * as React from "react";
import Automation from "../../_helpers/automation-attribute";
import styled from "../../styled";
import { colors, fonts } from "../../tokens";
const BaseHeading = styled.h1`
margin: 1em 0;
color: ${colors.text.default};
font-weight: ${fonts.weight.normal};
li... |
/**
* @typedef {import('../store/initialState').DefaultSessionData} DefaultSessionData
*/
/**
* @param {number} milliseconds Expiration date
* @returns {boolean} Returns if still valid.
*/
const isExpirationValid = (milliseconds) => {
let currentTime = new Date().getTime();
return currentTime < milliseconds;
}... |
#include "Utils.hh"
#include "Types.hh"
#include "HiveMind.hh"
#include "Colony.hh"
#include "Z.hh"
#include <iostream>
#include <fstream>
#include <random>
#include <thread>
#include <mutex>
// TODO: Precompiled header
void PrintMenu();
int main(int argc, char* argv[])
{
try
{
std::ifstream... |
cargo watch --ignore frontend --ignore migrations -x run |
<gh_stars>10-100
// the angular2-template-loader translates templateUrl into require() calls
declare function require(id: string): any;
// set using the Webpack DefinePlugin
declare var build: {
mode: string;
target: string;
};
|
<reponame>ukoloff/docpad
var structdbs_1_1i_1_1_r26 =
[
[ "name", "structdbs_1_1i_1_1_r26.html#a612a39e36f67da721ba0ac0038d31cd9", null ],
[ "name", "structdbs_1_1i_1_1_r26.html#a2dc70c51881c2808d727a905ce6ed1a0", null ],
[ "partid", "structdbs_1_1i_1_1_r26.html#aeaef0161ba244cb90e8f62c76f308af0", null ]
]; |
<filename>src/main/java/org/codingmatters/tests/reflect/matchers/impl/FieldMatcherImpl.java
package org.codingmatters.tests.reflect.matchers.impl;
import org.codingmatters.tests.reflect.matchers.FieldMatcher;
import org.codingmatters.tests.reflect.matchers.TypeMatcher;
import org.codingmatters.tests.reflect.matchers.s... |
#include <stdio.h>
int main (int argc, char * argv[]) {
int number1 = atoi(argv[1]);
int number2 = atoi(argv[2]);
printf("The sum is %d", number1 + number2);
return 0;
} |
#include <vector>
template<class T>
class Stack {
private:
std::vector<T> m_Stack;
unsigned int m_Index;
public:
Stack() : m_Index(0) {}
void push(const T& obj, bool override) {
if (override || m_Stack.size() == 0)
m_Stack.push_back(obj);
else
m_Stack.push_back... |
<gh_stars>10-100
package test161
import (
"fmt"
"io/ioutil"
"log"
"os"
"path"
"path/filepath"
"strings"
)
// TestEnvironment encapsultes the environment tests runs in. Much of the
// environment is global - commands, targets, etc. However, some state
// is local, such as the secure keyMap and OS/161 root direc... |
def generate_debug_command(docstring, selectable):
if selectable:
return "start_server --debug"
else:
return "" |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-SS-N/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-SS-N/13-512+0+512-ST-first-256 --do_eval --per_device... |
<form>
<label>Name:</label>
<input type="text" name="name" />
<label>Age:</label>
<input type="number" name="age" />
<input type="submit" value="Submit" />
</form> |
declare const _default: (req: any, res: any) => Promise<void>;
/**
* @oas [post] /orders/{id}/swaps/{swap_id}/fulfillments
* operationId: "PostOrdersOrderSwapsSwapFulfillments"
* summary: "Create a Swap Fulfillment"
* description: "Creates a Fulfillment for a Swap."
* x-authenticated: true
* parameters:
* - (p... |
<filename>main.go
// Package main initializes the cli of terragen
package main
import (
cli "github.com/nikhilsbhat/terragen/cmd"
)
// This function is responsible for starting the application.
func main() {
cli.Main()
}
|
import re
import requests
from .baseclient import BaseClient
class FishCClient(BaseClient):
def __init__(self, reload_history=True, **kwargs):
super(FishCClient, self).__init__(website_name='fishc', reload_history=reload_history, **kwargs)
def checksessionstatus(self, session, infos_return):
u... |
def sort_array(arr):
"""
Sorts an array in ascending order.
Parameters:
arr (list): the input array
Returns:
list: sorted array
"""
# iterate over the array
for i in range(len(arr)):
# find the minimum element in the array
min_idx = i
for j in range(i+1... |
#!/bin/bash
array=($@)
IFS=$'\n' sorted=($(sort <<<"${array[*]}"))
unset IFS
echo "${sorted[@]}" |
<reponame>girish-kamble/C-language
#include<stdio.h>
#include<assert.h>
int main(){
int a=3,b=3,c=0;
c=a+b;
assert(c); //assert function checks if the value of c is true or not.
// it can also check directly assert(a+b);
// if the value is true or non-zero, then ... |
<gh_stars>0
import makeStyles from '@material-ui/styles/makeStyles';
import TablePagination from '@material-ui/core/TablePagination';
import * as React from 'react';
import { ITbTableInstance } from 'tubular-react-common';
import { useResolutionSwitch } from 'uno-react';
import { AdvancePaginationActions } from './Adva... |
use nalgebra::{Matrix, MatrixView};
struct NeuralNetwork(Matrix<f64>);
impl NeuralNetwork {
fn new(weights: Matrix<f64>) -> Self {
NeuralNetwork(weights)
}
fn weights(&self) -> Matrix<f64> {
self.0.clone() // Return a clone of the weights matrix
}
fn weights_view(&self) -> Matri... |
import { Message } from 'node-nats-streaming';
import { BaseListener, ItemUpdatedEvent, Subjects } from '../../common';
import { Item } from '../../models/item';
import { queueGroupName } from './queue-group-name';
export class ItemUpdatedListener extends BaseListener<ItemUpdatedEvent> {
readonly subject = Subjects.... |
#!/bin/sh
set -e
pkgname=perl
version=5.32.1
ext=tar.gz
url=ftp://ftp.jaist.ac.jp/pub/CPAN/authors/id/S/SH/SHAY/${pkgname}-${version}.${ext}
if [ ! -e archives/${pkgname}-${version}.${ext} ]; then
ftp -o archives/${pkgname}-${version}.tar.gz ${url}
else
echo skip download
fi
echo extract ${pkgname}-${version}.... |
#!/bin/bash
set -eo pipefail
shopt -s nullglob
# if command starts with an option, prepend mysqld
if [ "${1:0:1}" = '-' ]; then
set -- mysqld "$@"
fi
# skip setup if they want an option that stops mysqld
wantHelp=
for arg; do
case "$arg" in
-'?'|--help|--print-defaults|-V|--version)
wantHelp=1
break
;;
... |
#!/bin/bash
cd ~/rtp++
mkdir -p log/traces
hosts=$(cat 195.148.127.98_hosts.txt)
echo $hosts
dt=`eval date +%Y%m%d"_"%H_%M_%S`
for host in $hosts
do
sh tr.sh $host $dt
done
|
#!/usr/bin/env -S bash -euET -o pipefail -O inherit_errexit
SCRIPT=$(readlink -f "$0") && cd $(dirname "$SCRIPT")
# --- Script Init ---
mkdir -p log
rm -R -f log/*
touch log/stderror.err
ktools_monitor.sh $$ & pid0=$!
exit_handler(){
exit_code=$?
kill -9 $pid0 2> /dev/null
if [ "$exit_code" -gt 0 ]; then
... |
<filename>src/components/showDevice.js
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import { devicesURl } from './Constants';
export default class showDevice extends Component{
constructor(serial){
super();
this.state={
device: []
}
}
... |
package file_fetcher
import (
"context"
"encoding/json"
"fmt"
"testing"
"github.com/eugene-fedorenko/prebid-server/stored_requests"
"github.com/stretchr/testify/assert"
)
func TestFileFetcher(t *testing.T) {
fetcher, err := NewFileFetcher("./test")
if err != nil {
t.Errorf("Failed to create a Fetcher: %v",... |
using UnityEngine;
public class FallingObject : MonoBehaviour
{
public bool onceOnly = false;
public Transform targetCenter;
public Transform baseTransform;
public Transform fallenDownTransform;
public float fallTime = 0.5f;
private const float targetRadius = 0.25f;
private bool targetEnabl... |
var Vue = require('../../../node_modules/vue/dist/vue.min.js');
require('../../../node_modules/material-design-lite/material.min.js');
require('../common/user-story.js');
/* rquire style */
// require('../../../node_modules/material-design-lite/material.min.css');
// require('./../styles/styles.css'... |
#!/usr/bin/env bash
git checkout gh-pages
rm -r src
rm -r art
rm -r lib
git checkout master -- src art lib index.html |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.