text stringlengths 1 1.05M |
|---|
#!/bin/bash
./node_modules/typescript/bin/tsc
./node_modules/mocha/bin/_mocha -u bdd --timeout 999999 --colors ./dist/test/code/Main.test.js |
#!/usr/bin/env bash
#
# blast_tax_slave.sh - assign taxonomy with BLAST in QIIME
#
# Version 1.0.0 (November, 27, 2015)
#
# Copyright (c) 2015-- Lela Andrews
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from... |
def missing_numbers(arr):
arr_set = set(arr)
for i in range(1, 101):
if i not in arr_set:
print(i)
missing_numbers([4,5,1,9, 8,5]) |
/*
let is new keyword to declare variables
Does away with hoisting :
variable/fun declarations are put into memory at compile phase,
See https://developer.mozilla.org/en-US/docs/Glossary/Hoisting
JavaScript only hoists declarations, not initializations
const :
blockscoping :
fat-arrow functions :
*/
"use s... |
<gh_stars>0
package com.globalcollect.gateway.sdk.java.gc.hostedcheckout.definitions;
import com.globalcollect.gateway.sdk.java.gc.hostedcheckout.definitions.DisplayedData;
import com.globalcollect.gateway.sdk.java.gc.payment.definitions.Payment;
import com.globalcollect.gateway.sdk.java.gc.payment.definitions.Payment... |
#!/bin/sh
# Directives
#PBS -N scf_talk_sim2
#PBS -W group_list=yetiastro
#PBS -l nodes=1:ppn=1,walltime=8:00:00,mem=8gb
#PBS -M amp2217@columbia.edu
#PBS -m abe
#PBS -V
# Set output and error directories
#PBS -o localhost:/vega/astro/users/amp2217/pbs_output
#PBS -e localhost:/vega/astro/users/amp2217/pbs_output
# ... |
package com.github.chen0040.leetcode.day06.easy;
/**
* Created by xschen on 1/8/2017.
*
* summary:
* Write a program to find the node at which the intersection of two singly linked lists begins.
*
* link: https://leetcode.com/problems/intersection-of-two-linked-lists/description/
*/
public class IntersectionOf... |
#!/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/*
# --- Setup run dirs ---
find output -type f -not -name '*summary-info*' -not -name '*.json' -exec rm -R -f {} +
rm -R -f fifo/*
rm -R -f work/*
mkdir ... |
def can_win_all_games(scores):
max_score = scores[0]
for score in scores[1:]:
if score <= max_score:
return "NO"
return "YES" |
// Created by <NAME> on 9/22/18 8:46 AM
export enum NotificationKind {
INFO = "info",
ERROR = "error"
}
export interface NotificationInfo {
kind: NotificationKind
content?: string | null
autoHideMillis?: number | null
}
|
# frozen_string_literal: true
# Copyright 2021 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 applicabl... |
package com.netcracker.ncstore.dto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Locale;
/**
* DTO Used to transfer price and Locale info
*/
@AllArgsConstructor
@Getter
public class PriceRegionDTO {
private final double price;
private final Locale region;
}
|
<reponame>shuanglongs/camera-for-android
package shuanglong.camera2.interfaces;
/**
* Created by jasonl on 2018/4/20.
*/
public interface IClickDialogYesBtuuon {
void clickDialogYesBtuuon();
}
|
#!/usr/bin/env python
#
# Public Domain 2014-2016 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compil... |
declare class Slasherror extends Error {
constructor(message: string);
}
export = Slasherror;
|
<reponame>mr-ice/pipython<filename>InteractiveProgramming/rpsls.py<gh_stars>0
# Rock-paper-scissors-lizard-Spock template
import random
# The key idea of this program is to equate the strings
# "rock", "paper", "scissors", "lizard", "Spock" to numbers
# as follows:
#
# 0 - rock
# 1 - Spock
# 2 - paper
# 3 - lizard
# 4... |
<reponame>hrand1005/training-notebook
import React, { Component } from 'react'
import Table from 'react-bootstrap/Table';
class SetList extends React.Component {
constructor(){
super();
this.state = {
sets: []
}
}
componentDidMount(){
fetch('/sets')
.th... |
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... |
import styles from './styles';
import combineStyles from '../internal/combine-styles';
const root = (depth = 1, overrideStyle) => {
let style = styles.root;
style = combineStyles(style, { boxShadow: styles.depthShadows[depth - 1] });
return combineStyles(style, overrideStyle);
};
export default {
root
};
|
var group__CMSIS__RTOS__Wait =
[
[ "osDelay", "group__CMSIS__RTOS__Wait.html#gaf6055a51390ef65b6b6edc28bf47322e", null ],
[ "osDelayUntil", "group__CMSIS__RTOS__Wait.html#ga3c807924c2d6d43bc2ffb49da3f7f3a1", null ]
]; |
# frozen_string_literal: true
# Copyright 2021 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 applicabl... |
import mongoose from 'mongoose';
const TransactionSchema = new mongoose.Schema({
text: {
type: String,
trim: true,
required: [true, 'Please add some text'],
},
amount: {
type: Number,
required: [true, 'Please add a positive or negative number'],
},
createdAt: {
type: Date,
default... |
def calculate_area(base, height):
return (1/2) * base * height |
SELECT * FROM `users` WHERE `country` = 'United States' |
#!/bin/sh
set -e
ROOTDIR=dist
BUNDLE=${ROOTDIR}/Altair-Qt.app
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
echo "example: $0 -s MyIdentity"
exit 1
fi
rm -rf ${TEMPDIR} ${TEMPLIST}
mkdir -p ${TEMPDIR}
${CODES... |
#pragma once
class CExtendAudioFrameObserver :
public agora::media::IAudioFrameObserver
{
public:
CExtendAudioFrameObserver();
~CExtendAudioFrameObserver();
LPBYTE pPlayerData;
int nPlayerDataLen;
bool bDebug;
virtual bool onRecordAudioFrame(AudioFrame& audioFrame);
virtual bool onPlaybackAudioFrame(Audi... |
from unihan_db.tables import (
UnhnLocation,
UnhnLocationkXHC1983,
UnhnReading,
kCantonese,
kCCCII,
kCheungBauer,
kCheungBauerIndex,
kCihaiT,
kDaeJaweon,
kDefinition,
kFenn,
kFennIndex,
kGSR,
kHanYu,
kHanyuPinlu,
kHanyuPinyin,
kHDZRadBreak,
kIICore... |
package com.datasift.client.pylon;
import com.fasterxml.jackson.annotation.JsonProperty;
public class PylonSampleInteractionParent {
@JsonProperty
protected String subtype;
@JsonProperty
protected String content;
public PylonSampleInteractionParent() { }
public String getSubtype() { return t... |
import numpy as np
import scipy.spatial.distance
def compute_connection_matrix_and_edges(P0, n_neighbour):
D0 = scipy.spatial.distance.cdist(P0, P0)
C0 = np.zeros(D0.shape, dtype=int)
S0 = []
for i in range(len(P0)):
nearest_neighbors = np.argsort(D0[i])[1:n_neighbour+1]
for j in neares... |
/*!
* \file Peripheral.c
*
* copyright Revised BSD License, see section \ref LICENSE
*
* copyright (c) 2020, <NAME> <EMAIL>
*
**************************************************************************************/
#include <stdio.h>
#include <string.h>
#include "Peripheral.h"
#include "utilities.h"
#incl... |
<reponame>DispatchMe/meteor-bound-document<gh_stars>1-10
describe('BoundDocument', function () {
var c = new Mongo.Collection('widgets');
c.attachSchema({
name: {type: String},
one: {
type: Object,
optional: true
},
'one.two': {
type: Object,
optional: true
},
'one.t... |
#!/bin/bash
set -e
# Import Secret ##########
mkdir /root/.ssh
chmod 700 /root/.ssh
cat /etc/secret-volume/id_rsa > /root/.ssh/id_rsa
cat /etc/secret-volume/authorized_keys > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/id_rsa
chmod 600 /root/.ssh/authorized_keys
chown -R root:root /root/.ssh
######################... |
#!/bin/bash
docker-compose run --no-deps --rm wpcli "$@" |
def dec_to_binary(number):
return bin(number)[2:]
binary = dec_to_binary(17)
print(binary) # 10001 |
<filename>api_resources.py
# coding=utf-8
import csv
import json
import time
import treetagger
import treetagger_wordnet
class Resources:
"""Sentimentwordnet bindind class
This class provides a binding to lookup sentiment meassure for
English and Spanish words
"""
def __init__(self):
"""... |
<reponame>ExternalRepositories/mesytec-mvlc
#include <errno.h>
#include <netinet/in.h>
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <unistd.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/sock_diag.h>
#include <linux/inet_diag.h>
#include <arpa/... |
<filename>src/test/java/de/lmu/cis/ocrd/ml/test/MockBaseOCRToken.java<gh_stars>1-10
package de.lmu.cis.ocrd.ml.test;
import de.lmu.cis.ocrd.ml.BaseOCRToken;
import de.lmu.cis.ocrd.ml.OCRWord;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
public class MockBaseOCRToken implements BaseOC... |
#!/bin/bash
# Get the pid file's name.
PIDFILE="pidfile.pid"
# Kill the process running at pid.
if [ -e $PIDFILE ]; then
kill "$(cat $PIDFILE 2>/dev/null)"
fi
# Write our pid to file.
echo $$ >$PIDFILE
# Run command.
node bin/www > hotlink.log
|
package core.checker.linearizability;
import core.checker.checker.Operation;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import java.util.Locale;
import java.util.Objects;
@Slf4j
@Data
@NoArgsConstructor
public class Op extends Operation {
private int process;
priva... |
import React from "react";
import API from "../utils/API";
import SearchBar from "./SearchBar";
//Search Results table in Act 19 is = table.js -Namita
class Table extends React.Component {
state = {
employees: [],
search: "",
ascending: true
};
// When this component mounts, sea... |
def count_ways_to_reach_stair(n):
a = [0 for i in range(n + 1)]
a[0] = 1
a[1] = 1
a[2] = 2
for i in range(3, n + 1):
a[i] = a[i - 1] + a[i - 2] + a[i - 3]
return a[n] |
<reponame>maevic/atom-watcher
'use strict';
var fs = require('fs');
var path = require('path');
var spawn = require('child_process').spawn;
var Task = require('atom').Task;
var Convert = require('ansi-to-html');
var convert;
var isWindows = /^win/.test(process.platform);
var WatcherView = require('./atom-watcher-vie... |
#!/bin/sh
# create image based jail in FreeBSD 7
# This script is obsolete
# Source: http://blog.sleeplessbeastie.eu/2011/03/16/how-to-do-some-work-in-each-active-jail/
ezjail="/usr/local/bin/ezjail-admin"
tail="/usr/bin/tail"
temp_file=`mktemp -q /tmp/jcreate.XXXXXX`
usage() {
echo "Usage:"
echo "jcreate.sh nam... |
tac ~/.surf/history* | dmenu -l 10 -b -i | cut -d ' ' -f 3
|
#!/usr/bin/env sh
# Script to export a release
set -e
mkdir -p ./release
space /_cmdline/ -e SPACE_MUTE_EXIT_MESSAGE=1 -d >./release/podc
chmod +x ./release/podc
space -f lib/podman-runtime.yaml /podman/ -e SPACE_MUTE_EXIT_MESSAGE=1 -d >./release/podc-podman-runtime
|
function configure_nomailcheck() {
local -n __var=$1
# stop bash from checking mail
# currently it is not needed anymore since by default
# bash doesn't do mail checking anymore
# References:
# - https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#index-MAILCHECK
if [ -n "${MAILCHECK}" ]
then... |
openInEnum = {
CURRENT_TAB : 0,
NEW_TAB : 1,
NEW_BGTAB : 2,
NEW_WINDOW : 3,
}
let openIn = openInEnum.CURRENT_TAB;
chrome.storage.local.get('openIn', item => {
if (item.openIn) {
openIn = item.openIn;
}
});
function logLastError() {
if (chrome.runtime.lastError) {
console.error('Resurrect e... |
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
cd ../doc
pdflatex annotation_gui.tex
bibtex annotation_gui
pdflatex annotation_gui.tex
pdflatex annotation_gui.tex
pdflatex administration_gui.tex
bibtex administration_gui
pdflatex administration_gui.tex
pdflatex administration_gui.tex
pdflatex installation.tex
bibtex installation
pdflatex installation.tex
pdflatex... |
"""
Given a list of integers, create a function that calculates the sum of each integer and returns the sum.
"""
def calc_sum(list_int):
total = 0
for n in list_int:
total += n
return total
if __name__ == '__main__':
list_int = [1, 2, 3, 4, 5]
print(calc_sum(list_int)) # 15 |
<filename>ExtLib/Aurora/Examples/SimpleTest/PhysicsManager.cpp
//
// Copyright (c) 2010-2011 <NAME> and <NAME>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
// Permission is gran... |
def isPalindrome(string):
left, right = 0, len(string)-1
while right >= left:
if not string[left] == string[right]:
return False
left += 1
right -= 1
return True |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.__PlaygroundIcon = void 0;
var _react = _interopRequireDefault(require("react"));
var _Icon = _interopRequireDefault(require("./Icon"));
var icons = _interopRequireWildcard(require("./md/"));
function _interopRequireWildcard(obj... |
<filename>internal/nodearmord/config.go
package nodearmord
import (
"fmt"
"log"
"os"
"os/user"
"path/filepath"
"github.com/spf13/viper"
)
const (
appName = "nodearmor"
configFileName = "settings"
defaultControllerURL = "wss://api.nodearmor.net/"
)
// Config : global configuration store
v... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for RHSA-2015:1945
#
# Security announcement date: 2015-10-27 20:24:53 UTC
# Script generation date: 2017-01-01 21:16:42 UTC
#
# Operating System: Red Hat 7
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - openshift.x86_64:3.0.2.0-0.git.20.656dc... |
<gh_stars>1-10
// Utilities for creating global IDs in systems that don't have them.
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
var _nodeNodeJs = require('./node/node.js');
Object.defineProperty(exports, 'globalIdType', {
enumerable: true,
get: function get() {
return _nod... |
import sys
import pygame
# Define constants
SCREEN_WIDTH = 400
SCREEN_HEIGHT = 500
FPS = 60
# Create the window
window = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))
pygame.display.set_caption('My Game')
# Create the game variables
is_game_over = False
# Initialize PyGame
pygame.init()
# Main loop
while... |
const BACK_END_URL = 'http://localhost:3000/api';
export enum FETCH_STATUS {
ERROR = 1,
NEED_UMBRELLA,
DO_NOT_NEED_UMBRELLA,
}
export default class RequestInterceptor {
#fetchStatus = FETCH_STATUS.NEED_UMBRELLA;
#page = page;
#callBackOnUmbrellaFetch = async (): Promise<void> => Promise.resolv... |
<gh_stars>1-10
package com.starbucks.api.service;
import com.starbucks.domain.TbUser;
public interface TbUserService {
/**
* 根据用户名或者邮箱查找用户信息
* @param str
* @return
*/
TbUser get(String str);
/**
* 添加
*
*/
void add(TbUser tbUser);
}
|
<filename>src/main/java/patron/users/guis/edit/UserEditController.java
package patron.users.guis.edit;
import patron.users.guis.edit.controllerExtend._50_StageControllerExtend;
import patron.users.models.User;
/**
* The type User edit controller.
*/
public class UserEditController extends _50_StageControl... |
rm test.txt.scores;
../src/fmpl -i test.txt 2>/dev/null ;
if ! cmp test.txt.scores test.txt.SCORES >/dev/null 2>&1; then
echo "test failed"
else
echo "test ok"
fi
|
<gh_stars>0
package main
import (
"time"
"github.com/YanickJair/intro/exclusion"
)
func main() {
mc := exclusion.New()
go exclusion.RunWriter(&mc, 20)
go exclusion.RunReader(&mc, 20)
go exclusion.RunReader(&mc, 20)
time.Sleep(15 * time.Second)
}
|
<?php
class InvoiceHandler {
private $title;
private $urlManager;
public function __construct($title, $urlManager) {
$this->title = $title;
$this->urlManager = $urlManager;
}
public function submitInvoice() {
return "Your invoice has been submitted, and someone will respon... |
/*
UI地址:\\192.168.6.119\产品管理\2_数据支撑\03_UI\职位推荐
引用方法:<script src="http://csdnimg.cn/jobreco/job_reco.js" type="text/javascript"></script>
调用方法:csdn.position.show({
sourceType: "", //博客blog,论坛discussion_topic, 下载 download,问答ask_topic, 个人空间space??, 英雄会hero??, 在线培训 course, csto
tplType: "", //模板类型,
博客详情:blog... |
#!/usr/bin/env bash
#import
source "${KOGITO_HOME}"/launch/logging.sh
function prepareEnv() {
# keep it on alphabetical order
unset KOGITO_DATAINDEX_HTTP_URL
}
function configure() {
configure_data_index_url
}
# Exit codes:
# 10 - invalid url
function configure_data_index_url {
url_simple_regex='(... |
#!/bin/python
def perform_operation(arr):
# Implementation of the operation: square each element in the list
modified_list = [x**2 for x in arr]
return modified_list
def find_max_value(arr):
# Find the maximum value in the modified list
max_value = max(arr)
return max_value
# Example usage
in... |
<filename>assets/eazax-ccc/components/popups/PopupBase.ts
const { ccclass, property } = cc._decorator;
/**
* @author (ifaswind)
* @version 20211011
* @see PopupBase.ts https://gitee.com/ifaswind/eazax-ccc/blob/master/components/popups/PopupBase.ts
* @see PopupManager.ts https://gitee.com/ifaswind/eazax-ccc/blob/ma... |
/**
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software... |
<reponame>mohamedkhairy/dhis2-android-sdk
/*
* Copyright (c) 2004-2021, 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 t... |
#include <iostream>
#include <cmath>
#include <string>
using namespace std;
int main()
{
int x, y;
cout << "Please enter your values for x and y: ";
cin >> x >> y;
// Polynomial expression
float expression = 3*pow(x, 2) + 4*x*y + 5*pow(y, 2);
cout << "The expression is: " << expression << endl;
return... |
public class ClothingItem
{
public virtual float WeightGrammsPerUnit { get; }
public virtual int WaterResistance { get; }
public virtual int ColdResistance { get; }
}
public class Jacket : ClothingItem
{
public override float WeightGrammsPerUnit
{
get { return 1615; }
}
public over... |
"""textutils URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-bas... |
#!/bin/sh
DESTDIR=${DESTDIR:-}
PREFIX=${PREFIX:-/usr}
install -d ${DESTDIR}${PREFIX}/bin
install -d ${DESTDIR}${PREFIX}/lib/vagga
install -m 755 vagga ${DESTDIR}${PREFIX}/lib/vagga/vagga
install -m 755 apk ${DESTDIR}${PREFIX}/lib/vagga/apk
install -m 755 busybox ${DESTDIR}${PREFIX}/lib/vagga/busybox
install -m 755 alp... |
<reponame>productiveprogrammer-net/common-dev-env
require_relative 'utilities'
require 'yaml'
THREAD_COUNT = 3
def update_apps(root_loc)
# Load configuration.yml into a Hash
config = YAML.load_file("#{root_loc}/dev-env-config/configuration.yml")
return unless config['applications']
output_mutex = Mutex.new
... |
-- ***************************************************************************
-- File: 12_12.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code, please rep... |
<gh_stars>0
import React, { Component, PropTypes } from 'react';
import { observer } from 'mobx-react';
import styles from './index.less';
@observer
export default class DetailModal extends Component {
static propTypes = {
visible: PropTypes.bool.isRequired,
title: PropTypes.string,
isNeedheight: PropType... |
package main
import (
"context"
"log"
"net"
"github.com/Wappsto/wedge-api/go/wedge"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
type wedgeServer struct{}
// func (*wedgeServer) SetModel(ctx context.Context, req *wedge.SetModelRequest) *wedge.Replay {
// return &... |
package com.idankorenisraeli.spyboard.input;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.NinePatchDrawable;
import android.inputmethodservice.Keyboard;
import... |
#!/bin/sh
#
# 1. find *.c or *.h file from current directory
# 2. if the file is utf-8 encoded file, then convert it to cp936 encoded.
#
# it will replace the original file.
#
# Author: wangjinle
# Usage: utf8tocp936.sh
#
find ./ -name "*."[ch] | while read fname ... |
package callback
import (
"errors"
"github.com/nspcc-dev/neo-go/pkg/core/interop"
"github.com/nspcc-dev/neo-go/pkg/vm"
"github.com/nspcc-dev/neo-go/pkg/vm/stackitem"
)
// SyscallCallback represents callback for a syscall.
type SyscallCallback struct {
desc *interop.Function
}
var _ Callback = (*SyscallCallback... |
export default interface Config {
enablePasswordless: boolean;
enable2FAWithFido2: boolean;
} |
<filename>BasicCucumberFramework/com.automationpractice/src/main/java/com/automationpractice/pages/SignInPage.java
package com.automationpractice.pages;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactor... |
<gh_stars>10-100
import os
import random
import string
from dotenv import load_dotenv
from twitter import Api
load_dotenv()
api = Api(
consumer_key=os.environ.get("TWITTER_CONSUMER_KEY"),
consumer_secret=os.environ.get("TWITTER_CONSUMER_SECRET"),
access_token_key=os.environ.get("TWITTER_ACCESS_TOKEN_KEY"... |
/** The picture file to be uploaded. */
var fileData = null;
$(function(){
initFileUpload();
initEvents();
});
function initFileUpload() {
$('#fileupload').fileupload({
autoUpload: false,
url: userPictureUploadUrl,
acceptFileTypes: /(\.|\/)(jpe?g|png)$/i,
maxFileSize: 1000000, ... |
#!/bin/bash
set -e
set -u
set -o pipefail
sed 's/<<<TAGPOST_GRPC_WEB_PORT>>>/'"$TAGPOST_GRPC_WEB_PORT"'/g;s/<<<TAGPOST_GRPC_WEB_HOST>>>/'"$TAGPOST_GRPC_WEB_HOST"'/g' \
/opt/bootstrap/default.conf.template \
> /etc/nginx/conf.d/default.conf
exec nginx -g "daemon off;"
|
#!/usr/bin/env bash
#SBATCH -p localLimited
#SBATCH -A ecortex
#SBATCH --mem=2G
#SBATCH --gres=gpu:1
#SBATCH --output=results_mlp_lesionp90.out
export HOME=`getent passwd $USER | cut -d':' -f6`
export PYTHONUNBUFFERED=1
echo Running on $HOSTNAME
source /usr/local/anaconda3/etc/profile.d/conda.sh
conda activate /home/... |
package httpserver
import (
"context"
"github.com/fighthorse/redisAdmin/component/httpclient"
"github.com/fighthorse/redisAdmin/component/log"
"github.com/fighthorse/redisAdmin/protos"
)
// 高德地图 api
// https://lbs.amap.com/api/webservice/guide/api/weatherinfo
type AmapClient struct {
*httpclient.Client
name s... |
#
set -e
set -x
./scripts/importbvi.py -o PipeClock.bsv -P pclk -I pclk -p pcie_lane \
xilinx/7x/pcie/source/pcie_7x_0_pipe_clock.v
|
// GlobalDailyReport the Global Daily Reports
export interface IGlobalDailyReport {
Code: number;
Message: string;
Document: IReport[];
}
// Report holds the cases data for each month (the reports inside document)
export interface IReport {
id: number;
province_state: string;
country_region: string;
last... |
export { default } from '../src/components/ComponentSandbox/ComponentSandbox.vue' |
#!/bin/sh
fpcore_dir="tests/scripts/fpcores/"
script_dir="tests/scripts/"
tmp_dir="/tmp/"
target="${script_dir}batch.txt"
test="${script_dir}test-toolserver.txt"
expected="${script_dir}test-toolserver.out.txt"
exp_file="${fpcore_dir}export.fpcore"
trans_file="${fpcore_dir}transform.fpcore"
eval_file="${fpcore_dir}ev... |
<reponame>mason-fish/brim
import {css} from "styled-components"
const headingSection = css`
font-family: system-ui, sans-serif;
font-size: 13px;
font-weight: 500;
letter-spacing: 1px;
`
const headingList = css`
font-family: system-ui, sans-serif;
font-size: 9px;
font-weight: 700;
letter-spacing: 0.8px... |
<filename>veriloggen/stream/visitor.py
from __future__ import absolute_import
from __future__ import print_function
from . import stypes
class _Visitor(object):
def __init__(self):
self.visited_node = set()
self.result_cache = {}
def generic_visit(self, node):
raise TypeError("Type ... |
#!/usr/bin/env python3
# Copyright 2020 <NAME>
# See LICENSE file for licensing details.
"""Charm for the ML Flow Server.
https://github.com/canonical/mlflow-operator
"""
import json
import logging
from base64 import b64encode
from oci_image import OCIImageResource, OCIImageResourceError
from ops.charm import Charm... |
<html>
<head>
<title>Table of Information</title>
<style type="text/css">
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
</style>
</head>
<body>
<h1>Table of Information</h1>
<table>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
<tr>
<td>John</td>
<td>3... |
<reponame>k-dominik/nifty<filename>src/python/lib/graph/opt/minstcut/minstcut.cxx
#include <pybind11/pybind11.h>
#include <iostream>
namespace py = pybind11;
PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
namespace nifty{
namespace graph{
namespace opt{
namespace minstcut{
void exportMinstcutObjective(py:... |
#!/bin/sh
PATH="/rescue"
kenv init_shell="/bin/sh" >/dev/null 2>/dev/null
if [ ! -d "/memdisk" ] ; then
mount -uw /
mdconfig -du md0
mdconfig -du md1
rm /init-reroot.sh
fi
exit 0
|
# The Book of Ruby - http://www.sapphiresteel.com
class MyClass
attr_accessor :name
attr_accessor :number
def initialize( aName, aNumber )
@name = aName
@number = aNumber
end
def ten
return 10
end
end
ob = MyClass.new( "<NAME>", "007" )
puts( "Double-quoted: My name is #{ob.name}... |
def find_largest_number(lst):
largest_num = 0
for num in lst:
if num > largest_num:
largest_num = num
return largest_num
result = find_largest_number([12, 34, 56, 78, 99])
print(result) |
#!/bin/bash
host=`hostname`
experiment_dir="../"
output_dir="results"
experiment_file=$experiment_dir/0.txt
output_dir=$output_dir/lse
data_dir="../data/output/"
gpu_id=0
numEntityTypes=1
includeEntityTypes=1
includeEntity=1
numEpoch=20
numFeatureTemplates=3
rnnHidSize=250
relationEmbeddingDim=25
entityTypeEmbeddingD... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.