text stringlengths 1 1.05M |
|---|
<filename>src/models/Tag.ts<gh_stars>0
/* eslint-disable no-underscore-dangle */
import { DataTypes, Model } from 'sequelize';
import { sequelize } from '../db';
interface TagAttr {
id: number;
tag: string;
type: string;
posts: number;
}
class Tag extends Model implements TagAttr {
public id!: number;
pu... |
#include <iostream>
#include <string>
#include <cctype>
bool isValidPreprocessorDirective(const std::string& directive) {
if (directive.empty() || directive[0] != '#') {
return false;
}
size_t pos = 1;
while (pos < directive.size() && std::isspace(directive[pos])) {
pos++;
}
i... |
#!/bin/bash
cd "$(dirname "$0")"
mkdir -p ../docs
if [ -f ../docs/CNAME ]; then
mv ../docs/CNAME ./CNAME_bak
fi
mdbook build . --dest-dir ../docs/
if [ -f ./CNAME ]; then
mv ./CNAME_bak ../docs/
fi
|
def find_dark_colors(colors):
dark_colors = []
for color in colors:
if color == 'Black' or color == 'Purple':
dark_colors.append(color)
return dark_colors
result = find_dark_colors(['Red', 'Orange', 'Green', 'Purple', 'Black', 'White'])
print(result) |
package gofiql
import "testing"
func TestFindToken(t *testing.T) {
s := "name==Joe"
i, b := findToken(&s)
if i != -1 {
t.Logf("Expected -1, got: %d", i)
t.Fail()
}
bb := string(b)
if string(b) != s {
t.Logf("Expected same string in output, got: %s", bb)
t.Fail()
}
s = "name==Joe,name=Tom"
i, b = fin... |
<reponame>wesleyskap/directlog<filename>lib/directlog/base.rb
module Directlog
class Base
attr_reader :response
class << self
%w(resource_name collection_name).each do |attribute|
define_method "#{attribute}=" do |param|
instance_variable_set "@#{attribute}", param
end
... |
#!/bin/sh
if [ -z $IFMAPCLI ]; then
echo "set IFMAPCLI environment with 'export IFMAPCLI=/path/to/ifmapcli/jars'"
exit 1
fi
COMMAND="java -jar $IFMAPCLI"
################################################################################
IP_ADDRESS=10.0.0.1
MAC_ADDRESS=ee:ee:ee:ee:ee:ee
USERNAME=joe
echo "pub... |
<filename>src/Lista.java
public class Lista {
private NodoLista cabeza; //Se crea un objeto inicial de tipo NodoLis
private NodoLista ultimo; //Se crea un objeto final de tipo NodoLis
public void insertar(InfoDoctor p) { //Mรฉtodo para ingresar doctores a la lista
... |
#!/usr/bin/env bash
###
# integration-runner.sh
#
# A basic integration test runner using docker-compose
###
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
##
# TEST_MODE
# Options:
# - default runs the tests as usual
# - wait sets up the docker-compose environment, but don't do anything (this allow... |
Dictionaries are used in Python to store data in the form of key-value pairs, where each key is associated with a specific value. Dictionaries can be used for a variety of tasks including representing complex data, creating lookup tables, and organizing information. The key-value pairs in a dictionary are mutable, mean... |
DROP VIEW archive;
ALTER TABLE archive2 RENAME TO archive;
ALTER TABLE archive ADD ar_len INTEGER;
|
#include <iostream>
#include <string>
class DebugUtility {
public:
void trace(const std::string& functionName) {
std::cout << "TRACE: " << functionName << std::endl;
}
};
#define UNIMPLEMENTED() std::cout << "ERROR: Function " << __FUNCTION__ << " is unimplemented!" << std::endl;
class Game {
Deb... |
<filename>src/layouts/Layout.js
import React from 'react'
import { withRouter } from 'react-router'
import Default from './Default'
import BodyStyle from 'components/common/BodyStyle'
import { isTouchDevice } from 'utils/domutils'
import ToastContainer from 'containers/Toast'
const getLayoutPerRoute = (props) => ... |
/**
* ISO 7816-4 command-response specific part
*
* Copyright (C) 2017, <NAME> <<EMAIL> >
*/
/**
* Build Extended ISO 7816-4 (command) APDU.
* - optionally create class with Uint8Array/ArrayBuffer containing apdu and prototype getter/setter for properties
* @param {Number} CLA Class Byte.
* @param ... |
def triangle_area(side1, side2, side3):
s = (side1 + side2 + side3) / 2
area = (s * (s - side1) * (s - side2) * (s - side3)) ** 0.5
return area |
<gh_stars>10-100
package mqtt
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"sync"
"time"
g "github.com/chryscloud/video-edge-ai-proxy/globals"
"github.com/chryscloud/video-edge-ai-proxy/models"
"github.com/chryscloud/video-edge-ai-proxy/services"
"github.com/chryscloud/video-edge-ai-proxy/utils"
... |
#!/bin/sh
cd /app
pip install -r requirements.txt
python -m flask run -h 0.0.0.0 -p 8080
|
#!/bin/bash
# shellcheck source=mulle-domain-compose.sh
. "${MULLE_DOMAIN_LIBEXEC_DIR}/mulle-domain-compose.sh" || exit 1
domain::resolve::initialize |
<filename>src/api/index.js
const {
checkUrl,
ISSUER_BASE_URL, // Auth0 Tenant Url
AUDIENCE,
API_PORT,
API_URL, // URL for Expenses API
REQUIRED_SCOPES,
} = require("./env-config");
const express = require("express");
const cors = require("cors");
const { createServer } = require("http");
const { auth , re... |
import React from 'react';
import { BrowserRouter as Router, Route, Link } from 'react-router-dom';
const App = () => {
return (
<Router>
<div>
<nav>
<ul>
<li><Link to="/">View Posts</Link></li>
<li><Link to="/create">Create Post</Link></li>
</ul>
... |
'use strict';
import Reflux from 'reflux';
import LiveListActions from 'app/actions/live-list';
const debug = require('debug')('AiC:Stores:LiveList');
const LiveListStore = Reflux.createStore({
// Base Store //
listenables: LiveListActions,
init() {
this.state = {};
this.state.liveList = {};
},
// Actio... |
'use strict';
var angular = require('angular');
var scopeTimeout = require('../util/scope-timeout');
var annotationMetadata = require('../annotation-metadata');
var memoize = require('../util/memoize');
// @ngInject
function AnnotationShareDialogController($element, $scope, analytics, session, store) {
var self = ... |
/**
* NOTE: This class is auto generated by the swagger code generator program (3.0.18).
* https://github.com/swagger-api/swagger-codegen
* Do not edit the class manually.
*/
package io.swagger.api.core;
import io.swagger.model.Model202AcceptedSearchResponse;
import io.swagger.model.core.PersonListResponse;
import... |
#!/bin/bash
# pmc
# 2019-03-25
# regex in bash
# scripts from the regex-bash lecture
# if [[ arg =~ pattern ]]
# match on > 2 also
#if [[ "$str" =~ [[:alpha:]]{2} ]] ; then
#if [[ "$str" =~ [[:alpha:]][[:alpha:]] ]] ; then
read -p "string " str
if [[ "$str" =~ ^[[:alpha:]]{2}$ ]] ; then
echo $str 2 alpha only... |
#!/bin/bash
# shellcheck disable=SC2006
# shellcheck disable=SC2086
set -e
BOLD_FONT="\e[1m"
GREEN_FONT="\e[92m"
RED_FONT="\e[31m"
PURPLE_FONT="\e[95m"
YELLOW_FONT="\e[93m"
RESET_FONT="\e[0m"
echo -e "$BOLD_FONT"
SSH_KEY=${1}
ARTIFACT=${2}
NODES=${3}
SSH_FLAGS="-4 -oStrictHostKeyChecking=no"
echo -e "$YELLOW_FON... |
#!/usr/bin/env bash
# This script runs clang-format and fixes copyright headers on all relevant files in the repo.
# This is the primary script responsible for fixing style violations.
set -uo pipefail
IFS=$'\n\t'
CLANG_FORMAT_FILE_EXTS=(".c" ".h" ".cpp" ".hpp" ".cc" ".hh" ".cxx" ".m" ".mm" ".inc" ".java" ".glsl")
... |
package com.inner.lovetao.loginregister.mvp.contract;
import com.inner.lovetao.config.UserInfo;
import com.inner.lovetao.core.TaoResponse;
import com.jess.arms.mvp.IModel;
import com.jess.arms.mvp.IView;
import io.reactivex.Observable;
/**
* desc:
* Created by xcz
* on 2019/01/28
*/
public interface BindPhoneAc... |
<filename>pkg/k8s/clusterresourcefactory_test.go<gh_stars>1-10
package k8s
import (
"strings"
"testing"
. "github.com/onsi/gomega"
)
func TestCloudFactoryValidation(t *testing.T) {
g := NewGomegaWithT(t)
testCases := []struct {
title string
option *ClusterResourceFactoryOptions
errExpected ... |
<gh_stars>10-100
package io.opensphere.core.pipeline.processor;
import io.opensphere.core.pipeline.renderer.AbstractRenderer;
import io.opensphere.core.pipeline.util.TextureGroup;
import io.opensphere.core.util.Utilities;
/**
* The model data for a texture geometry. This comprises the texture handles as
* well as t... |
"""
This function takes the head node of a singly linked list and returns the middle element of the list.
"""
def FindMiddle(head):
# Initialise two pointers fast and slow
fast = slow = head
# Move fast pointer twice as fast as slow pointer
while fast and fast.next:
fast = fast.next.next
... |
<?php
function isArmstrong($number)
{
$total = 0;
$original_number = $number;
while ($number > 0)
{
$remainder = $number % 10;
$total = $total + ($remainder * $remainder * $remainder);
$number = (int)($number / 10);
}
if ($total == $original_number)
{
re... |
#!/bin/bash
# Copyright 2019 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
//
// Created by kepler-br on 6/12/20.
//
#ifndef WOLFENSTEIN_WORLD_H
#define WOLFENSTEIN_WORLD_H
#include "types.h"
#include <glm/vec2.hpp>
class World
{
private:
Block *world;
size_t world_length;
glm::ivec2 world_dimensions;
int block_size = 512;
public:
World();
const size_t &get_world_l... |
<filename>src/app/pages/factures/liste-factures-fournisseurs/liste-factures-fournisseurs.component.ts
import { Component, OnInit } from '@angular/core';
import { UtilsServiceService } from '../../../utils-service.service';
import { DialogService } from 'primeng/dynamicdialog';
import { ConfirmationService } from 'prime... |
<gh_stars>0
/*
* Copyright (c) 2019 Ford Motor Company
*
* 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 appli... |
#include<stdio.h>
void main()
{
int i,j;
int n=5;
for(i=n/2;i<=n;i+=2)
{
for(j=1;j<n-i;j+=2)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("*");
}
for(j=1;j<=n-i;j++)
{
printf(" ");
}
for(j=1;j<=i;j++)
{
printf("*");
}
printf("\n");
}
for(i=n;i>=1;i--)
{
for(j=i;j<n;j++)
{
printf(" ");
}
fo... |
#!/usr/bin/env bash
curl -F 'image=@./02264090.jpg' -F 'id=999' http://localhost:8686/answer/blank | jq .
curl -F 'image=@./02263227.jpg' -F 'id=999' http://localhost:8686/answer/blank | jq .
curl -F 'image=@./0252ir.jpg' -F 'id=999' http://localhost:8686/answer/blank | jq .
curl -F 'image=@./02261092.jpg' -F ... |
import { Either, left, right } from '@core/logic/Either'
import { InvalidBodyLengthError } from './errors/InvalidBodyLengthError'
export class Body {
private readonly body: string
get value(): string {
return this.body
}
private constructor(body: string) {
this.body = body
}
static validate(bod... |
function _do_git_hook_before_repo_dir_add() {
local dir=${1?'dir arg required'}
local repo=${1?'repo arg required'}
_do_log_debug 'git' "_do_git_hook_before_repo_dir_add ${dir} ${repo}"
_do_dir_push "${dir}"
local git_dir
if git_dir=$(git rev-parse --show-toplevel) 2>/dev/null; then
if ! _do_repo_dir... |
<filename>api/v1beta1/foundationdb_version.go
/*
* foundationdb_version.go
*
* This source file is part of the FoundationDB open source project
*
* Copyright 2021 Apple Inc. and the FoundationDB project authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file excep... |
<reponame>dj-1087/MJU_Club_HomePage<gh_stars>0
import PropTypes from "prop-types";
import React from 'react';
import {Link} from "react-router-dom";
import BlogDetails from '../../components/Blog/BlogDetails.jsx';
import Comment from '../../components/Comment/Comment.jsx';
import SidebarWrap from '../../components/Side... |
#!/bin/sh
pep8 --filename=*.py --count --ignore=W293,E201,E202,E501 .
python -m compileall -f -q .
|
#!/usr/bin/env bash
dirs="./build ./dist ./utils3.egg-info"
# Check for existing build/dist directories.
printf "\nChecking for existing build directories ...\n\n"
for d in ${dirs}; do
# Delete the directory if it exists.
if [ -d "${d}" ]; then
printf "Deleting %s\n" ${d}
rm -rf "${d}"
fi
... |
#!/bin/bash
#
# Copyright 2013 The Flutter 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
# Needed because if it is set, cd may print the path it changed to.
unset CDPATH
# On Mac OS, readlink -f doesn't work, so follow_links... |
#!/bin/bash
# Exit if any of the intermediate steps fail
set -e
# Extract arguments from the input into shell variables.
# jq will ensure that the values are properly quoted
# and escaped for consumption by the shell.
eval "$(jq -r '@sh "INTERCONNECT_ATTACHMENT=\(.interconnect_name) REGION=\(.region) PROJECT_ID=\(.pr... |
#ifndef _TOS_VFS_ERR_H_
#define _TOS_VFS_ERR_H_
typedef enum vfs_err_en {
VFS_ERR_NONE,
VFS_ERR_BUFFER_NULL,
VFS_ERR_DEVICE_NOT_REGISTERED,
VFS_ERR_DEVICE_ALREADY_REGISTERED,
VFS_ERR_FILE_NO_AVAILABLE,
VFS_ERR_FILE_NOT_OPEN,
VFS_ERR_FS_ALREADY_MOUNTED,
VFS_ERR_FS_ALREADY_REGISTERED,
... |
#!/bin/sh
# Copyright 2005-2019 ECMWF.
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
#
# In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
# virtue of its status as an in... |
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.icon images/devutils.png
# @raycast.title String Inspector
# @raycast.mode silent
# @raycast.packageName DevUtils.app
# Documentation:
# @raycast.description Inspect your current clipboard string (length, words count, unicode, etc.)
# @raycast.a... |
/*
* Copyright 1&1 Internet AG, https://github.com/1and1/
*
* 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 ap... |
#!/bin/bash
# Copyright Amazon.com, Inc. or its affiliates.
#
# 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 notice,
# this list of conditions and... |
<gh_stars>10-100
//
// AppDelegate.h
// CIE ID
//
// Created by <NAME> on 11/12/2018. http://www.ugochirico.com
// Copyright ยฉ 2018 IPZS. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface AppDelegate : NSObject <NSApplicationDelegate>
@end
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: policyd_weight.sh,v 1.1.1.1 2007/07/06 13:49:46 xtraeme Exp $
#
# PROVIDE: policyd_weight
# BEFORE: mail
# REQUIRE: DAEMON LOGIN
. /etc/rc.subr
name="policyd_weight"
rcvar=$name
pidfile="@VARBASE@/run/policyd-weight.pid"
command_interpreter="@PREFIX@/bin/perl"
command="@PREFIX@/sbi... |
/*
* Copyright 2018 The boardgame.io Authors
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
import React from 'react';
import { HexGrid } from './hex';
import Token from './token';
import Enzyme from 'enzyme';... |
#!/bin/bash
echo -e "[RUBOCOP] --> Init (wait a second)"
# For now, only check Layout cops
# TODO: add other cops (and fix related issues), eg. Lint
if (bundle exec rubocop --only 'Layout' 2>/dev/null | grep 'no offenses detected' >/dev/null) ; then
echo -e "[RUBOCOP] --> ๐ approved."
exit 0
else
bundle e... |
#!/bin/bash
#SBATCH --account=def-dkulic
#SBATCH --mem=8000M # memory per node
#SBATCH --time=23:00:00 # time (DD-HH:MM)
#SBATCH --output=/project/6001934/lingheng/Double_DDPG_Job_output/continuous_RoboschoolHopper-v1_doule_ddpg_softcopy_action_noise_seed4_run4_%N-%j.out # %N for node name, %j for... |
package users
import (
"net/http"
"strconv"
"github.com/gin-gonic/gin"
"github.com/egnimos/book_store_users_api/domain/users"
"github.com/egnimos/book_store_users_api/services"
"github.com/egnimos/book_store_users_api/utils/errors"
"github.com/egnimos/bookstore-oauth-shared-library/oauth"
)
/*
NOTE:::: int64... |
<filename>Express Js Session/Members.js
const members = [
{
id: 1,
name: '<NAME>',
email: '<EMAIL>',
status: 'Active'
},
{
id: 2,
name: '<NAME>',
email: '<EMAIL>',
status: 'Inactive'
},
{
id: 3,
name: '<NAME>',
email: '<EMAIL>',
status: 'Active'
}
];
module.ex... |
<reponame>christinefeng/phoenix<gh_stars>1-10
/*
* 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... |
#!/bin/bash
rm -f failed_logs.txt
for log in /media/heimdal/Dataset1/*/Traverse/*/*.log; do
pocolog $log || echo $log >> failed_logs.txt
done |
<gh_stars>0
const routes = require('next-routes')();
routes
.add('/MemberPortal', '/portal/MemberPortal')
.add('/AgencyPortal', '/portal/AgencyPortal');
module.exports = routes;
|
#include <iostream>
int main() {
int num1, num2;
std::cout << "Enter two numbers: ";
std::cin >> num1 >> num2;
// print the sum
std::cout << "The sum is: " << num1 + num2 << std::endl;
// return the product
return num1 * num2;
} |
<reponame>gajduk/WirelessCooperation
package results_formatter;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
public class ParseResultsToMatlab {
public static void main(String[] args) {
try ( BufferedReader jin = new Buffere... |
<filename>client/templates/mall/mall.js<gh_stars>0
Template.mall.created = function () {
//console.log("mall.created:"+Router.current().url);
this.autorun(function () {
var mallParams = Session.get("mallParams");
var tmpmallParams = Router.current().params.query.mall;//for /?mall=0001
//console.log("mal... |
List<int> array = [3, 5, 2, 7];
// Reverse the array
List<int> reversedArray = array.reversed.toList();
for (int element in reversedArray){
print(element);
}
// Output: [7, 2, 5, 3] |
const express = require('express');
const bodyParser = require('body-parser');
const movieRoutes = require("./routes/movie");
const app = express();
app.use(bodyParser.json());
app.use((req, res, next) => {
res.setHeader('Access-Control-Allow-Origin', '*');
res.setHeader('Access-Control-Allow-Methods', 'GET, OP... |
#pragma once
#include <vector>
#include <string>
namespace qbus {
namespace pulsar {
inline std::string to_string(const std::vector<std::string>& v) {
std::string result = "[";
for (size_t i = 0; i < v.size(); i++) {
if (i > 0) result += ", ";
result += v[i];
}
result += "]";
retu... |
/**
*/
package tdt4250.mush.model;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Value Exchange</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link tdt4250.mush.model.ValueExchange#getCollection <em>Collection</em>}</... |
#!/bin/bash
STACK=$1
DCU=alpha # data coordinator universe or whatever
DSID=$2
COPY_NUMBER=$3
case $STACK in
"local" )
DCU=primus
CLUSTER="http://localhost:9200" ;;
"staging" )
CLUSTER="http://spandex.elasticsearch.aws-us-west-2-staging.socrata.net" ;;
"rc" )
CLUSTER="http://spandex.elasticsearc... |
<filename>apps/bfd-pipeline/bfd-pipeline-rda-bridge/src/main/java/gov/cms/bfd/pipeline/bridge/io/RifSource.java<gh_stars>0
package gov.cms.bfd.pipeline.bridge.io;
import java.io.BufferedReader;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
... |
"use strict";
const fs = require("fs");
const path = require("path");
const readMd = (page) =>
fs.readFileSync(path.join(__dirname, `${page}.md`), { encoding: "utf-8" });
const aboutPageAspect = {
pages: {
home: {
content: readMd("about"),
},
privacy: {
content: readMd("privacy"),
},
... |
use pairing::bls12_381::{Bls12, Fr, G1, G2, Fq12};
use pairing::{CurveAffine, PrimeField, Field, Engine};
use bls12_381::{Signature, PublicKey, verify};
pub fn noop_operation(tree: &CircuitAccountTree, acc_id: u32) -> Operation<Bn256> {
let signature_data = SignatureData::init_empty();
let first_sig_msg = Fr::... |
<reponame>matscus/preconfigured
package main
import (
"flag"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"github.com/joho/godotenv"
log "github.com/sirupsen/logrus"
)
var (
logLevel, service, path string
isServices bool
)
func main() {
flag.StringVar(&service, "service", ".", "PATH serv... |
function filterByType(people: (Person | Dependent)[], type: number): Dependent[] {
return people.filter((person) => {
if ('type' in person && person.type === type) {
return true;
}
return false;
}) as Dependent[];
} |
#!/usr/bin/env bash
# PLEASE NOTE: This script has been automatically generated by conda-smithy. Any changes here
# will be lost next time ``conda smithy rerender`` is run. If you would like to make permanent
# changes to this script, consider a proposal to conda-smithy so that other feedstocks can also
# benefit from... |
source activate ../../conda_env/ATLAS/
MSA=$1 #Sequences_cluster_smoking.txt
OUT=$2 #Smoking_probes.mat
#MSA=Sequences_cluster.txt
#OUT=Cluster3.mat
clustalo -i $MSA --distmat-out=$OUT --full
|
function validateForm(element) {
var result = true;
element.find('[required]').each(
function () {
var fieldElement = $(this);
//ๅฆๆไธบnullๅ่ฎพ็ฝฎไธบ''
var value = fieldElement.val() || '';
if (value) {
value = value.trim();
}
if (!value || value === fieldElement.attr('data-placeholder')) {
alert((... |
<gh_stars>0
/*
txtConfirmPassword: {
required: true,
equalTo: "#txtPassword",
minlength: 4,
maxlength: 32
},
*/
$( function() {
jQuery.validator.addMethod("alphanumeric", function(value, e... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-STWS/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-STWS/13-512+0+512-N-first-256 --do_eval --per_device_... |
<filename>packages/react-core/src/components/ApplicationLauncher/examples/ApplicationLauncherFavoritesAndSearch.tsx
import React from 'react';
import {
ApplicationLauncher,
ApplicationLauncherItem,
ApplicationLauncherGroup,
ApplicationLauncherSeparator
} from '@patternfly/react-core';
import pfLogoSm from './pf... |
<gh_stars>10-100
package network
import (
"bufio"
"fmt"
"net/http"
"testing"
"time"
)
func TestHttpServer(t *testing.T) {
go func() {
http.HandleFunc("/hello", hello)
http.HandleFunc("/headers", headers)
http.ListenAndServe(":8099", nil)
}()
time.Sleep(time.Second)
resp, err := http.Get("http://loca... |
#!/bin/sh
array_enum()
{
update "-p $PWD" array_enum
move_xml ArrayEnumE1Enum ArrayEnumE2Enum ArrayEnum1Array ArrayEnum2Array
}
array_ok()
{
update "-p $PWD" array_ok
indices=`seq 1 5`
move_xml ArrayOK1Array ArrayOK2Array ArrayOK3Array ArrayOK4Array ArrayOK5Array
}
array_struct()
{
update "-p $PWD" array... |
import plusnew from "@plusnew/core";
import enzymeAdapterPlusnew, { mount } from "@plusnew/enzyme-adapter";
import { configure } from "enzyme";
import stateFactory from "../../index";
import { promiseHandler, registerRequestIdleCallback } from "testHelper";
configure({ adapter: new enzymeAdapterPlusnew() });
type blo... |
<gh_stars>0
const express = require('express');
const router = express.Router();
var mongoose = require('mongoose');
const Food = require('../../../models/FNDDS/Food');
const FoodNut = require('../../../models/FNDDS/FoodNut');
// @route POST api/foods
// @desc Create a foods
// @access Public
router.post('/cr... |
#!/usr/bin/env bash
set -o errexit
: "${HELM_TILLER_SILENT:='false'}"
: "${HELM_TILLER_PORT:=44134}"
CURRENT_FOLDER=$(pwd)
cd "$HELM_PLUGIN_DIR"
function usage() {
if [[ -n "$1" ]]; then
printf "%s\\n\\n" "$1"
fi
cat <<' EOF'
Helm plugin for using Tiller locally
Usage:
helm tiller install
h... |
#!/bin/bash
if [ "$1" == '--locally' ]; then # Local installation
# Creates the directory
mkdir -p ~/.local/bin
mkdir -p ~/.local/applications
# Copies the files
cp android-connect ~/.local/bin/
cp interface/android-connect-pygtk ~/.local/bin/
cp rsc/android-connect.desktop ~/.local/share/applications/
else... |
cat << EOF
โโโโ โโโโโโ โโโโโโ โโโ โโโ โโโโโโ โโโโโโโโโ
โโโโโโโ โโ โ โโโ โ โโโโโโโ โโโโโโโโ โโโโ โ โ โโโ
โโโโ โโโโโโโ โโโ โโโ โโโโโ โโโโโโโโ โโโโ โ โโโโ
โโโโโโ โโโ โ โโโโโโโ โโโโ โโโโโโโ โโโ โโโ โ
โโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โโโโโโโโโโ โโ โโ โโ โโโโโ โโโ โโโ... |
#!/bin/bash
onedark_black="#282c34"
onedark_blue="#61afef"
onedark_yellow="#e5c07b"
onedark_red="#e06c75"
onedark_white="#aab2bf"
onedark_green="#98c379"
onedark_visual_grey="#3e4452"
onedark_comment_grey="#5c6370"
get() {
local option=$1
local default_value=$2
local option_value="$(tmux show-option -gqv "$op... |
<reponame>jneuendorf/pyllute
// function property(g, s, d) {
// console.log('this:', this)
// console.log(arguments.callee.caller)
// return {
// get: g,
// set: s,
// deleteProperty: d
// }
// }
//
// class A {
// x = property(
// function() {return this._x},
// function(x) {this._x... |
#! /usr/bin/bash
gunicorn -b 127.0.0.1:8000 -w 4 -k uvicorn.workers.UvicornWorker blog.main:app --name blogfolio_api --chdir /root/Documents/blogfolio/ --access-logfile /root/.config/blogfolio/logs/access.log --error-logfile /root/.config/blogfolio/logs/error.log --user root
|
package au.org.noojee.irrigation.weather.bureaus;
import java.util.ArrayList;
import java.util.List;
import au.org.noojee.irrigation.weather.bureaus.australia.BureauOfMeterologyAustralia;
public class WeatherBureaus
{
static private final List<WeatherBureau> bureaus = new ArrayList<>();
private static WeatherBurea... |
<filename>engine/api/notification/permission_test.go
package notification
import (
"context"
"testing"
"github.com/ovh/cds/engine/api/bootstrap"
"github.com/ovh/cds/engine/api/group"
"github.com/ovh/cds/engine/api/project"
"github.com/ovh/cds/engine/api/test"
"github.com/ovh/cds/engine/api/test/assets"
"githu... |
<reponame>MurmurationsNetwork/MurmurationsProfileGenerator
import {
Button,
HStack,
Image,
Input,
InputGroup,
InputRightElement,
Modal,
ModalBody,
ModalCloseButton,
ModalContent,
ModalFooter,
ModalHeader,
ModalOverlay,
Switch,
Text,
useToast,
VStack
} from '@chakra-ui/react'
import { u... |
#!/bin/sh
set -x
set -e
# create CA
# step 1 private key
openssl genrsa -out rootCA.key 2048
# step 2 certificate
openssl req -x509 -new -key rootCA.key -out rootCA.cer -days 730 -subj /CN="Example Custom CA"
# create certificate (authorised by CA)
# step 1 private key
openssl genrsa -out server.key 2048
subj=/CN=`h... |
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# usage: ./gen_crypto_cfg.sh [opt] [value]
#
function printHelp {
echo "Usage: "
echo " ./gen_crypto_cfg.sh [opt] [value] "
echo " -o: number of orderers, default=1"
echo " -p: number of peers per o... |
#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
# A script to bootstrap dokku.
# It expects to be run on Ubuntu 18.04/20.04, or CentOS 7 via 'sudo'
# If installing a tag higher than 0.3.13, it may install dokku via a package (so long as the package is higher than 0.3.13)
# It checks out the dokku source co... |
<reponame>mkmozgawa/luxmed-bot
package com.lbs.server.conversation
import java.time.format.TextStyle
import java.time.{LocalTime, ZonedDateTime}
import akka.actor.ActorSystem
import com.lbs.bot.model.Button
import com.lbs.bot.{Bot, _}
import com.lbs.server.conversation.DatePicker._
import com.lbs.server.conversation... |
<reponame>mausinixterra/letsencrypt<filename>certbot/client.py
"""Certbot client API."""
import logging
import os
import platform
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa
import OpenSSL
import zope.component
from acme import client as acme_clie... |
<filename>docs/reference/source/conf.py
# Configuration file for the Sphinx documentation builder.
#
# For a full list of all Sphinx configuration options see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
import sys
import datetime
import importlib
import sphinx_rtd_theme... |
#!/usr/bin/env 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
screen -p 0 -S GamemodeChanger -X quit
screen -p 0 -S MinecraftServer -X quit
screen -p 0 -S StopWatcher -X quit
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.