text stringlengths 1 1.05M |
|---|
#!/bin/bash -e
# Copyright 2017-2018 by SDRausty. All rights reserved. ๐ ๐ ๐ ๐ ๐บ
# Hosting https://sdrausty.github.io/TermuxArch courtesy https://pages.github.com
# https://sdrausty.github.io/TermuxArch/CONTRIBUTORS Thank you for your help.
# https://sdrausty.github.io/TermuxArch/README has information about th... |
/**
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - G... |
package org.queasy.core.network;
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import java.util.Iterator;
import java.util.List;
/**
* @author saroskar
* Created on: 2021-03-24
*/
public enum Command {
DEQUEUE;
private final String cmd;
private static final Sp... |
#!/usr/bin/env bash
source activate vqa
CUDA_VISIBLE_DEVICES=0 python -u test_net.py \
--dataset CLEVR \
--net res101 \
--checksession 1 \
--checkepoch 11 \
--checkpoint 34999 \
--cuda \
--load_dir /hdd/robik/FasterRCNN/models \
--num_images 1000
# Takes 1115 MB GPU mem |
#!/bin/bash -xe
## on master branch: analyzes all cpp files
## on other branches: analyzes cpp files changed in this branch, in comparison to master
function get_abs_path(){
echo $(echo "$(cd "$(dirname "$1")"; pwd -P)/$(basename "$1")")
}
function get_files(){
local head=$(git rev-parse --abbrev-ref HEAD)
... |
#!/usr/bin/env bash
# Load the environment variables for the dev containers
ACE2_ENV_PATH="$HOME/.ace2.env"
set -a
source "$ACE2_ENV_PATH"
set +a
# Start the entire application and then pause until the database is accessible.
# NOTE: If you changed the mapped port for the "db" service in the docker-compose-dev.yml
# ... |
#include <iostream>
class Weapon {
private:
int durability;
public:
// Constructor to initialize the durability
Weapon(int initialDurability) : durability(initialDurability) {}
// Method to decrease the durability by 5 units
void useWeapon() {
if (durability >= 5) {
durability... |
struct Connection {
id: u32,
nat_addr: ([u8; 4], [u8; 4]),
nat_port: (u16, u16),
}
impl Connection {
fn new(id: u32, nat_addr: ([u8; 4], [u8; 4]), nat_port: (u16, u16)) -> Self {
Connection {
id,
nat_addr,
nat_port,
}
}
fn update_nat_addr(&mu... |
#!/bin/bash
set -e
example_name="cifar10_fast"
# The training arguments
# 1. Usually we set the epochs:2, batch_size:2, max_train_steps_per_epoch:10
# 2. The expression for the above setup is "-p epochs 2 -p batch_size 8 -p max_train_steps_per_epoch 10"
# 3. The arguement will re-declare the variable right after the ... |
<reponame>viniarck/fluxory
package ofp
import (
"encoding/binary"
"errors"
)
type ErrorMsg struct {
Header
Type uint16
Code uint16
Data uint8
}
func NewErrorMsg(version uint8, xid uint32, errType uint16, code uint16, data uint8) *ErrorMsg {
m := new(ErrorMsg)
m.Header = Header{version, OFPT_ERROR, m.Size(), ... |
#!/usr/bin/env bash
# Start all Yosemite daemons.
# Run this on the master nde
bin=`dirname "$0"`
bin=`cd "$bin"; pwd`
# Load the Varys configuration
. "$bin/Yosemite-config.sh"
# Stop the slaves, then the master
"$bin"/stop-slaves.sh
"$bin"/stop-master.sh
|
var webpack = require('webpack');
var path = require('path');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
devtool: 'inline-source-map',
entry: [
'./resources/assets/js/index.jsx'
],
output: {
path: "./public/build",
publicPath: "http://localhost:5995/_assets... |
#!/bin/bash
source local.config
VBOX_OSTYPE="Windows10_64"
VBOX_NAME="$CORP Windows 10"
VBOX_NAME_ALPHANUMERIC="acmewin2012"
VBOX_ISO="${HOME}/Downloads/ISO/18362.30.190401-1528.19h1_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us.iso"
VBOX_NIC_MACADDRESS=0800272389CC
VBOX_MEMORY=1024
VBoxManage create... |
<reponame>NYCMOTI/open-bid
require "rails_helper"
describe WebAuthenticator, type: :model do
let(:session) { { user_id: user.id } }
let(:controller) { double('controller', session: session) }
let(:authenticator) { WebAuthenticator.new(controller) }
describe 'require_authentication' do
context 'when no cur... |
/*
* @Description: Created By Pony
* @Author: Pony
* @Date: 2021-08-09 21:07:23
* @LastEditors: Pony
* @LastEditTime: 2021-08-09 21:07:36
*/
import { Button, Result } from 'antd';
import React from 'react';
import { history } from 'umi';
const NoFoundPage: React.FC<{}> = () => (
<Result
status="404"
ti... |
#!/bin/bash
NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt)
cd /opt/vid
git pull
cd /opt
docker pull mariadb:10
docker login -u $NEXUS_USERNAME... |
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks=4
#SBATCH --ntasks-per-node=4
#SBATCH --cpus-per-task=24
#SBATCH --output=./output/sh3d-%j.out
#SBATCH --error=./output/sh3d-%j.err
#SBATCH --time=23:00:00
#SBATCH --partition=dc-gpu
#SBATCH --gres=gpu:4
#SBATCH --account=delia-mp
# export HOROVOD_MPI_THREADS_DISABLE=0
# s... |
import {ActionContext} from "./ControllerAttributes";
import {injectable} from "inversify";
/**
* A basic controller class to be used with express
*/
@injectable()
export default class Controller {
public basePath: string = "";
public getBaseUrl(context: ActionContext, siteroot: string = "/"): string {
... |
package core.identifier.identifiers.statements;
import core.Block;
import core.identifier.Identifier;
import core.identifier.IdentifierType;
import tokenizer.Token;
import java.util.ArrayList;
/**
* Created by zvekete on 7.1.2017..
*/
public class Null extends Identifier<Null> {
public Null() {
super("... |
from django.db.models import Manager, QuerySet
from django.db.models.expressions import RawSQL
from .constants import NONCONNECTABLE_IFACE_TYPES
# Regular expressions for parsing Interface names
TYPE_RE = r"SUBSTRING({} FROM '^([^0-9\.:]+)')"
SLOT_RE = r"COALESCE(CAST(SUBSTRING({} FROM '^(?:[^0-9]+)?(\d{{1,9}})/') AS... |
def calculate_total_cost(base_price, discount_type, discount_value, shipping_cost):
if discount_type == "percentage":
discounted_price = base_price - (base_price * (discount_value / 100))
elif discount_type == "fixed":
discounted_price = base_price - discount_value
else:
raise ValueE... |
<gh_stars>0
package com.tactbug.ddd.common.avro;
import com.tactbug.ddd.common.avro.product.CategoryCreatedAvro;
import com.tactbug.ddd.common.exceptions.TactException;
import org.apache.avro.io.DatumReader;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.specific.Sp... |
#!/bin/bash
clear;
echo '################################################################################'
if [ "$#" -eq "0" ]
then
git --no-pager log --graph --all --color --pretty=format:"%C(auto)%H %C(auto)%d (%C(magenta)%an%Creset - %cr):%Cgreen'%s'%Creset" --date=relative -35;
else
git --no-pager lo... |
<gh_stars>0
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.nn.parameter import Parameter
from torch_geometric.nn.inits import glorot
from layers import GraphAttentionLayer, SpGraphAttentionLayer, NMF_Nodes, AltGraphAttentionLayer
from torch_geometric.nn.models import InnerProductDecoder
f... |
#!/usr/bin/env bash
#Config
sshConfigFile=~/.ssh/config
WorkFolder=~/my_server
RemoteDir=~/
sshname=myremoteserver
#Functions:
function helpme {
echo "how to:"
echo "keyfile - file with the ssh key"
echo "workdir - directory, where we gonna mount the drive"
echo "sshname - name of your part of ssh config. Lik... |
<reponame>pillieshwar/SaleStat
package com.javatechie.spring.orm.api.controller;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.spring... |
<reponame>salesforce/DataHardness
import numpy as np
import LinConGauss as lcg
import argparse
import torch
from scipy.linalg import sqrtm
class GaussianBayes:
def __init__(self, means, cov, marginals=None):
self.means = means
self.cov = cov
self.cov_inv = np.linalg.inv(self.cov)
s... |
package io.opensphere.geopackage.model;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import org.junit.Test;
import io.opensphere.cor... |
<reponame>ncufresh/ncufresh14
$(function(){
window.app = {};
dataSection = $('#data-section');
var userId = getTransferData('user-id');
var userName = getTransferData('user-name');
var lastSend = 0;
if(userId == undefined){
userId = 0;
userName = '้ๅฎข';
}
if("WebSocket" in window){
var path = $('#chat... |
import requests
def fetch_detailed_info(attribute):
# Simulated function to fetch detailed information for the given attribute from an external source
# Replace this with actual API calls or data retrieval logic
return f"Detailed information for {attribute}"
def expand_product(product):
for attribute ... |
<reponame>wandering-sage/Node-School
const process = require("process");
const http = require("http");
const fs = require("fs");
var port = process.argv[2];
const server = http.createServer(doOnReq);
server.listen(port);
function doOnReq(req, res) {
if (req.method == "POST") {
var body = "";
req.on("data", (ch... |
<gh_stars>0
package algorithms.ilp;
import org.junit.Assert;
import org.junit.Test;
public class SolverTest {
private static final int TIMEOUT_IN_MILISECONDS = 100;
@Test
public void solveExampleProblemWithBreadthFirst() {
solveExampleProblem(TraversingStrategy.BREADTH_FIRST);
}
@Test
public void solveExamp... |
public class SearchableItem {
private String name;
private Boolean searchable;
public void setName(String name) {
if (name == null || name.isEmpty()) {
throw new IllegalArgumentException("Name cannot be null or empty");
}
this.name = name;
}
public void setSearc... |
package fr.syncrase.ecosyst.repository;
import fr.syncrase.ecosyst.domain.Reproduction;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
/**
* Spring Data SQL repository for the Reproduction entity.
*/
@SuppressWarnings("unused")
@Repository
public interface Reprod... |
require 'bundler'
Bundler.setup
require 'rom-viewpoint'
require 'minitest/autorun'
|
VERSION=$(node -e "x = `cat package.json`; console.log('v' + x.version)")
git commit -a
git tag ${VERSION}
git push
git push origin ${VERSION}
apm publish -t ${VERSION}
|
<!DOCTYPE html>
<html>
<head>
<title>Email Template</title>
<style>
h1 {
font-size: 20px;
}
h2 {
font-size: 15px;
font-weight: bold;
}
.cta {
background-color: #0000cc;
padding: 10px;
font-size: 17px;
color: #ffffff;
border-radius: 5px;
}
</s... |
#!/bin/bash
dieharder -d 15 -g 61 -S 538426622
|
#!/bin/bash
# Name: xtra_back_mysql.sh
# Desc:่ฏฅ่ๆฌไฝฟ็จxtrabackupๅทฅๅ
ทๅฏนmysqlๆฐๆฎๅบ่ฟ่กๅข้ๅคไปฝ๏ผๆ นๆฎ่ชๅทฑ้ๆฑๅฏไปฅ่ช่กไฟฎๆน
# Path:่ฏพๅ ็ฌ่ฎฐ็ฎๅฝ้
# Usage:./xtra_back_mysql.sh
# Author:MissHou
# Update:2018-08-05
# ๅคไปฝ็ญ็ฅ๏ผๅจ3ใๅจ5ใๅจๆฅๅ
จๅค๏ผๅจ1๏ผๅจ2๏ผๅจ4,ๅจ6ๅขๅค
#ๅ้ๅฎไน
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
conf_file=/usr/local/mysql/my.cnf
xtra_full_dir=/my... |
<filename>pkg/ofp15/errormsg.go<gh_stars>0
package ofp15
import (
"github.com/viniarck/fluxory/pkg/ofp"
)
func NewErrorMsg(xid uint32, errType uint16, code uint16, data uint8) *ofp.ErrorMsg {
m := new(ofp.ErrorMsg)
m.Header = ofp.Header{OFPP_V15, OFPT_ERROR, m.Size(), xid}
m.Type = errType
m.Code = code
m.Data ... |
<gh_stars>1000+
from dagster.core.utils import check_dagster_package_version
from .event_log import MySQLEventLogStorage
from .run_storage import MySQLRunStorage
from .schedule_storage import MySQLScheduleStorage
from .version import __version__
check_dagster_package_version("dagster-mysql", __version__)
__all__ = ["... |
<reponame>LiuFang07/bk-cmdb
package matchers_test
import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/matchers"
)
var _ = Describe("BeElementOf", func() {
Context("when passed a supported type", func() {
It("should do the right thing", func() {
Expect(2).Should(BeElementO... |
<filename>js/index.js<gh_stars>0
$(document).ready(function () {
var $monthsSinceGraduation = $('#monthsSinceGraduation');
var $monthsSinceStartingChordsing = $('#monthsSinceStartingChordsing');
var $yearsOfAge = $('#yearsOfAge');
var now = moment();
var calculateDiff = function (startDate, unitOfT... |
import styled from 'styled-components';
import { size } from 'styled-theme';
export const ViewPanelWrapper = styled.div`
display: flex;
flex-direction: column;
min-height: ${size('panelHeight', '500px')};
`;
|
#!/usr/bin/env bash
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
<filename>example.py
"""
Example application showing Python 3.10 structural pattern matching.
"""
import shlex
from dataclasses import dataclass
from typing import List
def run_command_v1(command: str) -> None:
match command:
case "quit":
print("Quitting the program.")
case "reset":
... |
require 'rails_helper'
RSpec.describe ApiController, type: :controller do
describe "GET #user" do
it "returns http success" do
get :user, params: { name: 'user_name' }
expect(response).to have_http_status(:success)
end
it "returns name provided in params" do
get :user, params: { name: 'user_name' }
res_body... |
<reponame>jonathantneal/postcss-font-weight-names<filename>.tape.js
module.exports = {
'postcss-font-weights': {
'basic': {
message: 'supports basic usage'
},
'basic:w-prefix': {
message: 'ignores basic usage when { prefix: "x" }',
options: {
prefix: 'x'
}
},
'custom': {
message: 'supports... |
<gh_stars>1-10
import React from "react";
function Profile() {
return (
<div className=" flex flex-col max-w-xl border-r-2 border-gray-100 h-full">
<span className="sticky z-10 top-0 bg-white border-b-2 w-full text-lg font-bold p-4">
Profile
</span>
</div>
... |
#!/bin/bash
dirs="/gws/nopw/j04/c3s311a_lot2/data/cdmlite/r201910/land
/gws/smf/j04/c3s311a_lot2/cdmlite/log/prep/land
/gws/smf/j04/c3s311a_lot2/cdmlite/log/prep/lotus-land"
for dr in $dirs; do
if [ -d $dr ]; then
echo "[WARN] Removing directory and its contents: $dr"
rm -fr $dr
fi
done
r... |
package core.framework.internal.log;
import core.framework.log.Markers;
import core.framework.log.message.ActionLogMessage;
import core.framework.log.message.PerformanceStatMessage;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
/... |
<reponame>gdsimoes/fullstackopen
import React, { useState } from "react";
const Button = ({ handleClick, text }) => {
return <button onClick={handleClick}>{text}</button>;
};
const App = () => {
const anecdotes = [
"If it hurts, do it more often",
"Adding manpower to a late software project ma... |
/* tslint:disable: ordered-imports*/
import { NgModule } from "@angular/core";
import { Routes, RouterModule, ExtraOptions } from "@angular/router";
/* Module */
import { MudlerModule } from "./mulder.module";
/* Containers */
import * as mulderContainers from "./containers";
import { BlogComponent } from "./containe... |
<reponame>xuChaoPang/algorithm<gh_stars>1-10
package com.ray.leetcode;
/**
* Created by xuChaoPang on 2019/4/19.
*
* Jump Game II -Level H
* Given an array of non-negative integers, you are initially positioned at the first index of the array.
* Each element in the array represents your maximum jump length at tha... |
import React from "react";
import { IFilterField, IFilterObject } from "../utils/models";
interface ITagProps {
dir: "ltr" | "rtl";
filter: IFilterObject;
fields: IFilterField[];
placement: "bottomLeft" | "bottomRight";
onRemove: () => void;
onChange: (filter: IFilterObject) => void;
primary... |
<reponame>johanchouquet/angularfire2
const { rollup } = require('rollup');
const { spawn } = require('child_process');
const { Observable, from, forkJoin } = require('rxjs');
const { switchMap, switchMapTo, tap } = require('rxjs/operators');
const { copy, readFileSync, writeFile, statSync } = require('fs-extra');
const... |
<filename>hedera-node/src/test/java/com/hedera/services/store/models/OwnershipTrackerTest.java
package com.hedera.services.store.models;
/*-
* โ
* Hedera Services Node
* โ
* Copyright (C) 2018 - 2021 <NAME>, LLC
* โ
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file ex... |
/*
* VMware SD-WAN Orchestrator API v1
*
* API version: 4.4.0
*/
package vcoclient
import (
"context"
"net/http"
"strings"
//"log"
)
type LoginApiService service
func (a *LoginApiService) LoginEnterpriseLogin(ctx context.Context, authorization AuthObject) (*http.Response, error) {
var (
localVarHttpMetho... |
<filename>spec/factories/address.rb
FactoryBot.define do
factory :address do
association :user
postal_code {Faker::Address.postcode}
prefectures {"ๆฑไบฌ้ฝ"}
municipality {"ๆธ่ฐทๅบ"}
house_number {"333"}
building {"ใขใธใขใใซ"}
end
end |
class BankAccount:
def __init__(self, initial_balance):
self.balance = initial_balance
def deposit(self, amount):
self.balance += amount
def withdraw(self, amount):
if amount <= self.balance:
self.balance -= amount
else:
print("Insufficient funds")
... |
<gh_stars>0
import { line, curveLinearClosed } from 'd3-shape';
export default function () {
var _lineConstructor = line();
var _xAccessor = function (d) {return d.x};
var _yAccessor = function (d) {return d.y};
var _rAccessor = function (d) {return d.r};
var _curve = curveLinearClosed;
function _streamline(pat... |
import { Uploader } from '@/utils/Uploader';
import { Input } from 'antd';
import React, { useEffect, useRef, useState } from 'react';
import { UploadOutlined, LoadingOutlined } from '@ant-design/icons';
export interface UploadFieldProps {
onChange: (val: string) => void;
value: string;
inputDisabled?: boolean;
... |
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
docker system prune -a -f |
<filename>src/main/scala/Hascalator/Prelude/Ordering.scala<gh_stars>1-10
package Hascalator.Prelude
/**
* Created by Glavo on 17-7-26.
*
* @author Glavo
* @since 0.1.0
*/
final class Ordering private[Prelude](override val toString: String,
override val hashCode: Int)
ob... |
#!/bin/bash
# Copyright 2018 The Knative Authors
#
# 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 a... |
def sort_string(sentence):
words = sentence.split()
words.sort()
return ' '.join(words) |
#!/usr/bin/env bash
#
# Onix Config Manager - OxTerra - Terraform Http Backend for Onix
# Copyright (c) 2018-2020 by www.gatblau.org
#
# 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 Licens... |
#!/bin/sh
exec < /dev/null
export COLUMNS=80
( for n in test/[A-Z]*.nim; do
echo "Test: $n"
nim c "$@" --run $n --help 2>&1 | grep -v '^CC:'
echo "===================================="
done
./test/FullyAutoMulti help 2>&1 ) |
grep -v 'Warning: \(expr\|stmt\) is deprecated' |
grep -v '^Hint: ' |
sed '... |
#!/bin/bash
#
# A script to run Drupal VM functional tests.
# Set defaults if they're not set upstream.
CONFIG="${CONFIG:-tests/config.yml}"
MAKEFILE="${MAKEFILE:-example.drupal.make.yml}"
COMPOSERFILE="${COMPOSERFILE:-example.drupal.composer.json}"
HOSTNAME="${HOSTNAME:-drupalvm.test}"
MACHINE_NAME="${MACHINE_NAME:-d... |
# This script has shell commands to get most of the basics folder items from github.
wget https://raw.githubusercontent.com/MXET/SCUTTLE/master/software/python/basics/L0_mjpg_streamer_filter.py
wget https://raw.githubusercontent.com/MXET/SCUTTLE/master/software/python/basics/L1_adc.py
wget https://raw.githubuserconten... |
package com.example.ts.grallery;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import ... |
#!/bin/bash
JOB_HOME="."
SERV_NAME="MiddleManager-server"
OUT_LOG="logs/middleManager.log"
RUN_PID="run/middleManager"
function startJob() {
echo "prepare to start ..."
java `cat conf/druid/middleManager/jvm.config | xargs` -cp conf/druid/_common:conf/druid/middleManager:lib/* org.apache.druid.cli.Main server mid... |
#!/bin/bash
set -ev
echo "Uploading documentation to FTP server"
if [[ $TRAVIS_PULL_REQUEST == "false" && $FTP_USER ]]; then
ncftpput -R -v -u $FTP_USER -p $FTP_PASSWORD 104.130.212.175 / output/*;
else
echo "On a PR, skipping upload. Only direct commits are uploaded.";
fi
|
#!/system/bin/sh
# MagiskHide Props Config
# Copyright (c) 2018-2019 Didgeridoohan @ XDA Developers
# Licence: MIT
PRINTSV=63
PRINTSTRANSF=350
# Certified fingerprints
PRINTSLIST="
Asus Zenfone 2 Laser (6.0.1)=asus/WW_Z00L/ASUS_Z00L_63:6.0.1/MMB29P/WW_user_21.40.1220.2196_20180308:user/release-keys
Asus Zenfone 3 Ma... |
#!/bin/sh
echo . > mtgapbeak30v$1.txt
echo . > mtgapbeak30v$1-main.txt
echo . > mtgapbeak30v$1-shift.txt
echo . > mtgapbeak30v$1-altGr.txt
# echo . > mtgapbeak$1-shiftAltGr.txt
|
# -*- coding: utf-8 -*-
import rest_framework.serializers as drf
import app.comments.serializers as serializers
import testutils.cases as cases
import testutils.factories as factories
import app.votes.models as votemodels
class CommentSerializerCreateTests(cases.SerializerTestCase):
"""Test cases for the creat... |
var restful = require('node-restful')
var mong = require('mongoose')
// app.jokes, /jokes
// app.images,/images
module.exports = function (app){
var mongoose = restful.mongoose
//databases
mongoose.connect("mongodb://localhost/jsjokes")
//collection 1,
var Jokes = app.blogs = restful.model(
'jokes', mong... |
#!/bin/bash
# Copyright (c) 2020, NVIDIA CORPORATION.
#########################################
# cuDF GPU build and test script for CI #
#########################################
set -e
NUMARGS=$#
ARGS=$*
# Logger function for build status output
function logger() {
echo -e "\n>>>> $@\n"
}
# Arg parsing function
f... |
export * from './init_controller';
export * from './init_guard';
export * from './init_shield';
export * from './init_wall';
|
class InvalidTimeException(Exception):
pass
class IterativeProcess:
def get_iterations(self, iteration_time, total_time):
if iteration_time <= total_time:
return int(total_time / iteration_time)
else:
raise InvalidTimeException("Iteration time exceeds total time")
# Exa... |
# This change from the default is for running Ceedling out of another folder.
PROJECT_CEEDLING_ROOT = "../../../.."
load "#{PROJECT_CEEDLING_ROOT}/lib/ceedling.rb"
Ceedling.load_project
task :default => %w[ test:all release ]
|
var arm_cm =
[
[ "Directories and Files", "arm-cm.html#arm-cm_files", null ],
[ "Interrupts in the QP Ports to ARM Cortex-M", "arm-cm.html#arm-cm_int", [
[ "\"Kernel-Aware\" and \"Kernel-Unaware\" Interrupts", "arm-cm.html#arm-cm_kernel-aware", null ],
[ "Assigning Interrupt Priorities", "arm-cm.htm... |
import React from 'react';
import "../../assets/usuarios.css"
export default function index() {
return (
<div className="container d-flex justify-content-center align-items-center col-12">
<div className="TablaContenedor col-8">
<table className="table table-bordered table-hover table-succe... |
import styled from 'styled-components';
import Image from '@crystallize/react-image';
import { responsive } from 'ui';
export const Outer = styled.a`
display: flex;
height: 100%;
color: var(--color-main-background);
position: relative;
padding: 20px;
justify-content: center;
background: var(--color-box-... |
#!/bin/bash
# ---------------------------------------------------------------------------
# Trivadis AG, Infrastructure Managed Services
# Saegereistrasse 29, 8152 Glattbrugg, Switzerland
# ---------------------------------------------------------------------------
# Name.......: create_OUD_instance.sh
# Author.....: ... |
<filename>lib/net/ftp/list/parser.rb
require 'date'
# Abstract FTP LIST parser. It really just defines and documents the interface.
class Net::FTP::List::Parser
class << self
# Returns registered parsers.
def parsers
@parsers ||= []
end
# Manuall register a parser.
def register(parser)
... |
<filename>bowling-game-kata/iteration-1/bowling-game-day-9/src/main/java/ua/kata/BowlingGame.java
package ua.kata;
import java.util.stream.IntStream;
import io.reactivex.Observable;
public class BowlingGame {
private static final int NUMBER_OF_FRAMES = 10;
private int[] rolls = new int[21];
private int current... |
#!/bin/bash
gem uninstall remove_double_blank
bin/setup
echo '-----------------'
echo 'BEGIN TESTING gem'
rake
echo 'FINISHED TESTING gem'
echo '--------------------'
|
#include <algorithm>
#include "gtest/gtest.h"
#include "ScaFES_GridTest1D.hpp"
#include "ScaFES_Ntuple.hpp"
#include "ScaFES_Grid.hpp"
namespace ScaFES_test
{
const double EPS = 2.2e-14;
/*******************************************************************************
* TESTS OF GETTER METHODS.
*... |
<reponame>astrionic/advent-of-code-2020
package astrionic.adventofcode2020.solutions.day02
import astrionic.adventofcode2020.framework.AdventSolution
object Day02 extends AdventSolution {
override def solvePart1(input: String): String = {
val passwords = parseInput(input)
val validPasswords = passwords.fil... |
import requests
from termcolor import colored # Assuming the use of the termcolor library for colored output
def search_books_by_title(title):
# Make a request to the book database API to search for books with the given title
response = requests.get('https://book-database-api.com/search', params={'title': tit... |
package org.hzero.sso.core.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = SsoProperties.PREFIX)
public class SsoProperties {
public static final String PREFIX = "hzero.oauth";
private Login login = new Login();
private Sso sso = new... |
package com.hyperproteinenimia.qaservice.service;
import com.hyperproteinenimia.qaservice.entity.Answer;
import com.hyperproteinenimia.qaservice.exception.AnswerHaveNoFoundException;
import com.hyperproteinenimia.qaservice.repository.AnswerRepository;
import org.springframework.stereotype.Service;
import java.util.Li... |
#!/bin/bash
cd "$(dirname "$0")"
dotnet /Users/reapazor/Repositories/dotBunny/JARVIS.NET/JARVIS.Shard/bin/Debug/netcoreapp2.0/JARVIS.Shard.dll --host localhost --encrypt --wirecast --counters --output /Users/reapazor/Documents/StreamingData
exit $? |
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.commerce.educate.scene.user.query response.
*
* @author auto create
* @since 1.0, 2021-12-24 18:02:55
*/
public class AlipayCommerceEducateSceneUserQueryResponse exte... |
#!/bin/bash
# Source settings.conf file
. ./settings.conf
# Check for set settings
if [[ -z "$vpnUser" ]]; then
echo 'Error: No "$vpnUser" variable found'
exit 1
fi
if [[ -z "$vpnPass" ]]; then
echo 'Error: No "$vpnPass" variable found'
exit 1
fi
# Count VPN tunnels to add
echo "Attempting to add '${#piaNetwork... |
package ochk
import (
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"testing"
)
func TestAccSecurityGroupDataSource_read(t *testing.T) {
resourceName := "data.ochk_security_group.one_member"
displayName := generateRandName()
resource.ParallelTest(t, resource.TestCase{
ProviderFactories... |
#include <stdio.h>
void swapWithoutTemp(int *x, int *y)
{
// Code to swap 'x' and 'y'
*x = *x + *y;
*y = *x - *y;
*x = *x - *y;
}
// Driver code
int main()
{
int x = 5, y = 3;
printf("Before Swap\nx = %d\ny = %d\n", x, y);
// Calling swap function
swapWithoutTemp(&x,... |
const sinon = require('sinon');
const expect = require('expect');
const flat = require('flat');
const { ObjectId } = require('mongodb');
const { fn: momentProto } = require('moment');
const Customer = require('../../../src/models/Customer');
const Drive = require('../../../src/models/Google/Drive');
const ESign = requi... |
#/bin/bash
CUDA_HOME=/opt/cuda
TF_CFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))')
TF_LFLAGS=$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))')
nvcc tf_sampling_g.cu -o tf_sampling_g.cu.o -c -O2 -DGOOGLE_CUDA=1 -x cu -Xcompiler -fPIC
g+... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.