text stringlengths 1 1.05M |
|---|
package org.firstinspires.ftc.teamcode.opmodes.tele;
import com.qualcomm.robotcore.eventloop.opmode.OpMode;
import org.firstinspires.ftc.teamcode.hardware.Robot;
import org.firstinspires.ftc.teamcode.hardware.gamepads.GamepadConfig;
import org.firstinspires.ftc.teamcode.opmodes.GameMode;
public abstract class BaseTe... |
#!/usr/bin/bash
# Copyright (c) 2021. Huawei Technologies Co.,Ltd.ALL rights reserved.
# This program is licensed under Mulan PSL v2.
# You can use it according to the terms and conditions of the Mulan PSL v2.
# http://license.coscl.org.cn/MulanPSL2
# THIS PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARR... |
import java.time.LocalDate;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class BuildVersion {
public static final String JAR_BUILD_DATE_FORMAT = "yyyy-MM-dd"; // Example format
private static BuildVersion instance;
private String buildDate;
// Othe... |
SELECT sc.username, cd.type
FROM student_course sc
JOIN course_detail cd ON sc.course_id = cd.id
WHERE cd.type = 'specific_type'; |
import { Either, left, right } from '@core/logic/Either'
import { Email } from '../../domain/user/email'
import { InvalidEmailError } from '../../domain/user/errors/InvalidEmailError'
import { InvalidNameError } from '../../domain/user/errors/InvalidNameError'
import { InvalidPasswordLengthError } from '../../domain/u... |
/*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
... |
/**
* Copyright 2016, 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 i... |
#!/bin/bash
set -v # print commands as they're executed
# Instead of exiting on any failure with "set -e", we'll call set_status after
# each command and exit $STATUS at the end.
STATUS=0
function set_status() {
local last_status=$?
if [[ $last_status -ne 0 ]]
then
echo "<<<<<<FAILED>>>>>> Exit cod... |
#!/bin/bash
########################################################################
#
# Linux on Hyper-V and Azure Test Code, ver. 1.0.0
# Copyright (c) Microsoft Corporation
#
# All rights reserved.
# Licensed under the Apache License, Version 2.0 (the ""License"");
# you may not use this file except in compliance w... |
import pprint
from twocode import utils
from twocode.utils.node import Node
import twocode.parser.grammar
import copy
LOG = set()
#LOG.add("PERF")
class Parser:
def __init__(self, rules):
"""
DESIGN:
finds ways to build symbols out of symbols for every position in the ... |
def get_fibonacci_partial_sum_fast(from_num, to_num):
pisano_period = 60 # Pisano period for modulo 10 is 60
from_num %= pisano_period
to_num %= pisano_period
if to_num < from_num:
to_num += pisano_period
fib_sum_to = [0, 1]
for i in range(2, to_num + 1):
fib_sum_to.append((fi... |
<reponame>scurker/scurker.com
var asteroids;
window.addEventListener('load', function() {
var canvas = document.getElementById('asteroids');
asteroids = new Asteroids(canvas);
asteroids.start();
}, false);
var Game = function() {
window.addEventListener('keydown', this.onKeyDown, false);
window.addEventList... |
class CommunicationManager {
constructor(handler) {
this.handler = handler;
}
say(speaker, command) {
}
shout(speaker, command) {
}
announce(message) {
}
}
module.exports = CommunicationManager;
|
import pandas as pd
class Estabelecimento:
def __init__(self, data):
self.data = data # Assuming data is available for the establishments
def get_df_estabelecimento_regiao_saude(self) -> pd.DataFrame:
# Assuming data retrieval logic from available data
# Sample data for demonstration ... |
#include <stdio.h>
int main()
{
double a, b;
printf("Enter with a 1ª number:\n");
scanf("%lf", &a);
printf("Enter with a 2ª number:\n");
scanf("%lf", &b);
printf("%lf\n", a + b);
return 0;
}
|
<!DOCTYPE html>
<html>
<head>
<title>Web page example</title>
</head>
<body>
<h1>Example Web page</h1>
<div>Section 1</div>
<div>Section 2</div>
</body>
</html> |
<filename>pkg/server/volume/impl/v1beta2/conversion_generated.go
// Code generated by csi-proxy-api-gen. DO NOT EDIT.
package v1beta2
import (
unsafe "unsafe"
v1beta2 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2"
impl "github.com/kubernetes-csi/csi-proxy/pkg/server/volume/impl"
)
func autoConve... |
/*
* omg: EnumStrategy.java
*
* Copyright 2019 <NAME> <<EMAIL>>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... |
let data = [1,2,3,2,2,3,2,1];
let bins = [];
// Count number of occurences for each bin
data.forEach((val) => {
if (bins[val] === undefined)
bins[val] = 1;
else
bins[val]++;
});
// Print histogram
for (let i = 0; i <= 3; i++) {
let bar = '';
let count = 0;
if (bins[i] !== undefined... |
<filename>internal/pkg/testing/config.go
package testing
import (
"fmt"
"strings"
)
// ConfigExpectation struct for testing: where to find the file and what we expect to find in it
type ConfigExpectation struct {
// name is not the Name in the loaded config, but only the "some-config" of "some-config:1.2"
Name st... |
<filename>demo/src/main/java/br/liveo/ndrawer/ui/adapter/BeaconDevice.java
package br.liveo.ndrawer.ui.adapter;
import android.util.Log;
/**
* Created by josephine.lee on 2015-10-20.
*/
public class BeaconDevice {
private String bdAddr;
private String bdName;
private Integer rssi;
private Integer tx... |
#!/bin/bash
cygwin=false;
linux=false;
case "`uname`" in
CYGWIN*)
bin_abs_path=`cd $(dirname $0); pwd`
cygwin=true
;;
Linux*)
bin_abs_path=$(readlink -f $(dirname $0))
linux=true
;;
*)
bin_abs_path=`cd $(dirname $0); pwd`
;;
esac
search_pid()... |
#cat /dev/null > /home/orasp02/alert/logs/abc.txt
. $HOME/.bash_profile
export DT=`date +%d%m%y_%H%M%S`
sqlplus -S "sys/ebsmanager123 as sysdba" << EOS
--set Heading off
set feedback off
set verify off
set echo off
set linesize 100
set pagesize 0
col DiskName for a10
col DiskGroup for a10
spool asm_disk.lst
sele... |
<gh_stars>1-10
package A;
@SuppressWarnings("WeakerAccess")
class AJava {
private int x;
public AJava(int x) {
this.x = x;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
}
|
package ml.banq.atm;
import java.util.ArrayList;
import java.util.HashMap;
// The static money utils class
public class MoneyUtils {
private MoneyUtils() {}
// Get ruble money symbol if the font support it
public static String getMoneySymbol() {
return Fonts.DEFAULT.canDisplay('₽') ? "₽" : "P";
... |
#!/usr/bin/env bash
export LC_ALL=C
set -euo pipefail
if [ -e secp256k1 ]; then
echo secp256k1 already exist in the current directory.
exit 1
fi
WORKDIR=$(mktemp -d)
function cleanup {
echo Deleting workdir ${WORKDIR}
rm -rf "${WORKDIR}"
}
trap cleanup EXIT
echo Using workdir ${WORKDIR}
# Find the ... |
#!/bin/sh
#
# Check prerequisites for using the Duktape makefile. Exit with an error
# and a useful error message for missing prerequisites.
#
ERRORS=0
WARNINGS=0
uname -a | grep -ni linux >/dev/null
RET=$?
if [ "x$RET" != "x0" ]; then
echo "*** Based on uname, you're not running on Linux. Duktape developer"
ec... |
<reponame>stnevans/BytecodeParser
package site.shadyside.bytecodeparser.exception.fields;
import site.shadyside.bytecodeparser.exception.MemberNotContainedException;
public class FieldNameNotFoundException extends FieldParsingException {
public FieldNameNotFoundException(MemberNotContainedException e) {
super(e);... |
def solve(grid):
"""solves a 9x9 sudoku grid
"""
row = 0
col = 0
# Initially searching for an unassigned position
while row<9:
while col<9:
# If the entry is empty
if grid[row][col]==0:
for num in range(1,10):
if che... |
#!/usr/bin/env bash
set -o errexit
set -o pipefail # Fail a pipe if any sub-command fails.
export TEST_INFRA_SOURCES_DIR="${KYMA_PROJECT_DIR}/test-infra"
export TEST_INFRA_CLUSTER_INTEGRATION_SCRIPTS="${TEST_INFRA_SOURCES_DIR}/prow/scripts/cluster-integration/helpers"
export KYMA_SOURCES_DIR="${KYMA_PROJECT_DIR}/kym... |
#!/bin/sh
set -e
set -u
set -o pipefail
if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then
# If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy
# frameworks to, so exit 0 (signalling the script phase was successful).
exit 0
fi
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P... |
<filename>lib/core_ext/date.rb
#--
# Copyright (c) 2010 <NAME>, Geni Inc
#
# 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 us... |
#!/bin/bash
find data/$1 -type f | wc -l
|
<gh_stars>0
# coding:utf-8
import time
from lxml import etree
from Xpath import *
from NewsComment import NewsComment
# from update_uel import update_uel
from Pipe import MongoDB
import requests
import NewsUrl
import json
import math
import urllib2
# import MySQLdb
import re
from bs4 import BeautifulSoup
import sys
... |
// 11656. 접미사 배열
// 2019.05.22
// 문자열 처리
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
string s;
cin >> s;
vector<string> ans;
// 접미사 배열을 저장
for (int i = 0; i < s.size(); i++)
{
ans.push_back(s.substr(i, s.size()));
}
// 정렬
sort(ans.begin(), ans.... |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created: Fri Apr 1 16:43:05 2011
# by: The Resource Compiler for PyQt (Qt v4.7.0)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x56\x27\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x4... |
<reponame>Seanstoppable/fbender
/*
Copyright (c) Facebook, Inc. and its affiliates.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
*/
package recorders
import (
"sync/atomic"
"github.com/pinterest/bender"
)
// Sta... |
/sbin/halt -h -p
|
#!/bin/bash
DATA_DIR="[REPLACE BY THE G1 ARTICLES DATASET PATH]" && \
JOB_PREFIX=gcom && \
JOB_ID=`whoami`_${JOB_PREFIX}_`date '+%Y_%m_%d_%H%M%S'` && \
MODEL_DIR='/tmp/chameleon/gcom/jobs/'${JOB_ID} && \
echo 'Running training job and outputing to '${MODEL_DIR} && \
python3 -m acr.acr_trainer_gcom \
--model_dir ${MOD... |
#!/usr/bin/env bash
################################################################################
# Author: Wenxuan Zhang #
# Email: wenxuangm@gmail.com #
# Created: 2019-12-01 10:33 ... |
#!/usr/bin/env bash
apt-get install libboost-all-dev libbotan1.10-dev libsqlite3-dev -y
wget https://raw.githubusercontent.com/fnc12/sqlite_orm/master/include/sqlite_orm/sqlite_orm.h
cp sqlite_orm.h /usr/include
rm sqlite_orm.h
|
/***************************************************************************
*
* Project _____ __ ____ _ _
* ( _ ) /__\ (_ _)_| |_ _| |_
* )(_)( /(__)\ )( (_ _)(_ _)
* (_____)(__)(__)(__) |_| |_|
*
*
* Copyright 2018-present, <NAME... |
<reponame>rjacobs91/baker
package com.ing.baker.baas.javadsl
import java.util.concurrent.CompletableFuture
import akka.actor.ActorSystem
import com.ing.baker.baas.common
import com.ing.baker.baas.scaladsl
import com.ing.baker.runtime.javadsl.InteractionInstance
import com.ing.baker.runtime.common.LanguageDataStructur... |
/*
* Pool.java
*
* Created on 15 July 2007, 3:50 PM PDT
*
* From "Multiprocessor Synchronization and Concurrent Data Structures",
* by <NAME> and <NAME>.
* Copyright 2007 Elsevier Inc. All rights reserved.
*/
package tamp.ch10.Queue.queue;
/**
* @param T item type
* @author mph
*/
public interface Pool<T> ... |
<gh_stars>1-10
const returnsUndefined = () => void 0;
const returnsNull = () => null;
const returnsFalse = () => false;
const returnsFunction = () => () => {};
expect(() => @returnsNull class {}).toThrow("class decorators must return a function or void 0")
expect(() => @returnsFalse class {}).toThrow("class decorators... |
package com.asadmshah.moviegur.injection.modules;
import android.app.Application;
import com.asadmshah.moviegur.BuildConfig;
import com.squareup.okhttp.Cache;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.logging.HttpLoggingInterceptor;
import javax.inject.Singleton;
import dagger.Module;
impo... |
<reponame>alkuhlani/cs
/*
* Copyright 2009-2014 PrimeTek.
*
* 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 applic... |
<filename>basic/src/components/css/flex.js
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faWifi } from '@fortawesome/free-solid-svg-icons'
import './flex.css';
export default function Flex(){
return(
<div className="cards">
<div className="card">
... |
package com.appdynamics.extensions.tibco;
import java.util.Hashtable;
import javax.naming.Context;
import com.tibco.tibjms.admin.ServerInfo;
import com.tibco.tibjms.admin.TibjmsAdmin;
import com.tibco.tibjms.admin.TibjmsAdminException;
import com.tibco.tibjms.naming.TibjmsContext;
public class TestingCon... |
<filename>src/io/ph/bot/commands/general/HowTo.java
package io.ph.bot.commands.general;
import java.awt.Color;
import io.ph.bot.Bot;
import io.ph.bot.commands.Command;
import io.ph.bot.commands.CommandCategory;
import io.ph.bot.commands.CommandData;
import io.ph.bot.model.GuildObject;
import io.ph.bot.model.... |
#!/bin/bash
curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1lOWH41KhNSgNZiymqqViPPBs3jxSCoaT" > /dev/null
CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1lOWH41KhNSgNZiymqqViPPBs3jxSCoaT" -o resources.tar.gz... |
package coolconf_test
import (
"os"
"testing"
"github.com/gustavohenrique/coolconf"
"github.com/gustavohenrique/coolconf/test/assert"
)
func TestLoadFromEnvWithoutGroup(t *testing.T) {
os.Setenv("SOME_INT", "9")
os.Setenv("SOME_STR", "hi")
os.Setenv("SOME_BOOL", "true")
type MyConfig struct {
Number int ... |
from typing import List, Tuple
import logging
def check_assumptions(assumptions: List[str], keyword: str) -> Tuple[List[int], List[str]]:
line_numbers = []
warning_messages = []
for i, assumption in enumerate(assumptions, start=1):
if keyword in assumption:
line_numbers.append(i)
... |
<filename>database/index.js
var mysql = require('mysql');
var connection = mysql.createConnection({
host: 'localhost',
user: 'student',
password: '<PASSWORD>',
database: 'test'
});
// var selectAll = function(callback) {
// connection.query("SELECT * FROM classes", function(err, results, fields) {
// if... |
#!/bin/sh
rm -f calzone.zip
cd plugin
zip -rv9 ../calzone.zip *
|
#!/usr/bin/env zsh
DOTFILES=$(dirname ${0:a})
# ctags
ln -sf ${DOTFILES}/.ctags ~/.ctags
# git
ln -sf ${DOTFILES}/.gitignore_global ~/.gitignore_global
ln -sf ${DOTFILES}/.gitconfig ~/.gitconfig
# git-prompt
[[ -f ~/.git-prompt.sh ]] || curl -fLo ~/.git-prompt.sh \
"https://raw.githubusercontent.com/git/git/mas... |
import mongoose from 'mongoose'
import 'dotenv/config'
const { MONGO_DB_URI, MONGO_DB_URI_TEST, NODE_ENV } = process.env
let connectionString: string
// If no values in .env then exit
if (MONGO_DB_URI && MONGO_DB_URI_TEST) {
connectionString = NODE_ENV === 'test' ? MONGO_DB_URI_TEST : MONGO_DB_URI
} el... |
class PostReply:
default_related_name = 'post_replies'
def __init__(self, body):
self.body = body
def __str__(self):
return self.body |
def is_anagram(s1, s2):
s1 = s1.lower()
s2 = s2.lower()
return sorted(s1) == sorted(s2)
print(is_anagram('listen', 'silent')) # Output: True |
<gh_stars>1-10
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.bookmark = void 0;
var bookmark = {
"viewBox": "0 0 1280 1792",
"children": [{
"name": "path",
"attribs": {
"d": "M1164 128q23 0 44 9 33 13 52.5 41t19.5 62v1289q0 34-19.5 62t-52.5 41q-19 8-44 8-48 0-... |
"""
Modules to support sqlite implementation
"""
import os.path as op
import sqlite3 as lite
import logging
import json
from collections import defaultdict
from seqcluster.libs.utils import safe_dirs
logger = logging.getLogger('report')
def _create_db(name):
"""
creater connection to sqlite
"""
con ... |
export function AuctionsUpdateByIdHandler({
auctionsService,
auctionsAdapter
}) {
return (req, res, next) =>
auctionsService.update(req.params.id, req.body).then(auction =>
res.json(auctionsAdapter.serialize(auction))
.status(202).end()
).catch(next);
}
export de... |
#!/bin/sh
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Suppo-Qt.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
OUTROOT=osx
if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
echo "example: $0 -s MyIdentity"
exit 1
fi
rm -rf ${TEMPDIR} ${TEMPLIST}
mkdir -p ${TEMP... |
// Define the Module interface
interface Module {
registerBindings(container: Container): void;
}
// Define the Container class
class Container {
private bindings: Map<string, any> = new Map();
bind<T>(key: string): BindingBuilder<T> {
return new BindingBuilder<T>(key, this);
}
load(module: Module): vo... |
# frozen_string_literal: true
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
include Pagy::Backend
include Authentication
include Authorization
include ErrorHandling
include CheckingSolution
include Sorting
end
|
<reponame>4-geeks/ARTS
from tool import createcsv
from config import inputimagefolder,csvoutputfolder,outpoutimagefolder
#########################
bootstrap_images_in_folder = inputimagefolder
bootstrap_csvs_out_folder = csvoutputfolder
bootstrap_images_out_folder = outpoutimagefolder
csv=createcsv(bootstrap_im... |
<gh_stars>1-10
/*
* Copyright (c) Open Source Strategies, Inc.
*
* Opentaps is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
... |
function toPathIfFileURL(fileURLOrPath) {
if (!(fileURLOrPath instanceof URL)) {
return fileURLOrPath; // Return the input as it is assumed to be a file path
}
return fileURLToPath(fileURLOrPath); // Call fileURLToPath to convert the URL to a file path
}
export default {
toPathIfFileURL,
}; |
<filename>2016/day_01_part1.py
#!/usr/bin/env python3
"""
My approach was to treat this like a street grid, tracking which direction
you have faced and the net forward/backward steps in that direction to
yield the final position.
"""
# Let's start with our coordinate position on the street grid
position = {'x':0, 'y... |
import { Picker as ReactPicker } from '@react-native-picker/picker';
import { useState } from 'react';
import { StyleSheet, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import type { StyleProp, ViewStyle } from 'react-native';
import ErrorText from './errorText';
i... |
<filename>App/src/main/java/com/honyum/elevatorMan/net/UploadFileRequest.java
package com.honyum.elevatorMan.net;
import com.honyum.elevatorMan.net.base.RequestBean;
import com.honyum.elevatorMan.net.base.RequestBody;
/**
* Created by Star on 2017/10/26.
*/
public class UploadFileRequest extends RequestBean {
... |
package com.amitness.photon;
import android.content.Intent;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7... |
package normalizer
import (
"log"
"reflect"
"regexp"
)
// Pattern is used to split a NormalizedString
type Pattern interface {
// FindMatches slices the given string in a list of pattern match positions, with
// a boolean indicating whether this is a match or not.
//
// NOTE. This method *must* cover the whole... |
<reponame>wanc/Objective-Gems<filename>Objective-Gems/KSProxyAndReference.h
//
// KSProxyAndReference.h
// Objective-Gems
//
// Created by <NAME> on 4/20/11.
//
// Copyright 2011 <NAME>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation... |
// Copyright (c) 2018-2019 WING All Rights Reserved.
//
// Author : yangping
// Email : <EMAIL>
//
// Prismy.No | Date | Modified by. | Description
// -------------------------------------------------------------------
// 00001 2019/05/22 yangping New version
// ------------------------------------... |
use std::time::{Instant, Duration};
trait Stopwatch {
fn check_and_reset(&mut self) -> Duration;
}
impl Stopwatch for Instant {
fn check_and_reset(&mut self) -> Duration {
let now = Instant::now();
let elapsed = now.duration_since(*self);
*self = now;
elapsed
}
}
pub fn me... |
<reponame>makiftutuncu/Morph-Http-Client<filename>morph-core/src/main/java/com/emt/morph/HttpResponseCloser.java
package com.emt.morph;
import org.apache.http.client.methods.CloseableHttpResponse;
public interface HttpResponseCloser {
void addToQueue(CloseableHttpResponse closeableHttpResponse);
void closeAll... |
#!/bin/bash
# ------------------------------------------
# Import Users & Groups in Bulk Script
# Author : Prince Nyeche
# Platform: Atlassian Cloud Users
# Version: 0.8
# ------------------------------------------
# If you want to debug Script uncomment set -x
# set -x
printf "########################################... |
#!/bin/bash
VM_HOSTNAME=$1
VBoxManage controlvm "$VM_HOSTNAME" poweroff
sleep 2
VBoxManage unregistervm "$VM_HOSTNAME" --delete |
from . import atmosphere
from . import flat_sphere
from . import flat_shading_scene
from . import pathtracing
from . import render_interactive |
# Copyright (c) 2019-2021, NVIDIA CORPORATION.
import warnings
from typing import Sequence, Union
import numpy as np
import pandas as pd
from pandas.core.tools.datetimes import _unit_map
import cudf
from cudf._lib.strings.convert.convert_integers import (
is_integer as cpp_is_integer,
)
from cudf.core import col... |
name = "Alice"
# print the length of the string
print(len(name)) |
/*
* Copyright (C) 2008-2020 Advanced Micro Devices, Inc. All rights reserved.
*
* 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 ... |
export const version = "units/5.0.3";
//# sourceMappingURL=_version.js.map |
from architecture_further_formulas import *
def lateralInhibition(ADDSObj, timeAndRefrac, latInhibSettings):
# Activate lateral inhibition upon a spike to inhibit other neurons from spiking. As brian's
# Inhibition inhibits before dend input can increase the signal to balance things out.
tNorm = timeAndRefrac.ti... |
/**
* Copyright 2014 <NAME>
*
* 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 agre... |
#div-animation {
animation: leftRight 2s linear 2;
}
@keyframes leftRight {
0% { transform: translateX(0%); }
50% { transform: translateX(100%); }
100% { transform: translateX(0%); }
} |
<reponame>MilosMladenovicWork/cubical-website
import React from 'react'
import styles from './blog-entry.module.scss'
import blogImg from '../../img/blog.jpg'
import Section from '../../components/Section'
import MarginContainer from '../../components/MarginContainer'
import RoofSVG from '../../components/RoofSVG'
imp... |
def validate_model_name(model_name):
if model_name[0].isdigit(): # Check if the first character is a digit
return "Invalid model name"
else:
return "Valid model name"
# Test cases
print(validate_model_name("3D_model")) # Output: "Invalid model name"
print(validate_model_name("model_3D")) # O... |
#include<bits/stdc++.h>
using namespace std;
int main() {
// freopen("test.in", "r", stdin);
// freopen("test.out", "w", stdout);
string s;
getline(cin, s);
int i = 0;
{
string t = "";
for(i = 0; i < s.size(); i++) {
if(s[i] == ',')
break;
t += s[i];
}
string a = "", b = "", c = "";
for(int ... |
<filename>src/main/scala/calc/Calc2.scala
package calc
import scala.collection.immutable.IndexedSeq
object Calc2 extends App {
val nums: Iterator[IndexedSeq[Int]] = (0 to 9).permutations
def rule(set: IndexedSeq[Int]): Boolean = {
val a = set(0) * set(1) * set(2)
val b = set(1) * set(6) * set(4)
val... |
<filename>src/lib/requests/mojaloopRequests.js
/**************************************************************************
* (C) Copyright ModusBox Inc. 2019 - All rights reserved. *
* *
* This file is made available under the ter... |
package com.scaleoutdata.spring.cloud.stream.kafka.streams.join_example.config;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.streams.KafkaStreams;
import org.springframework.cloud.stream.binder.kafka.properties.KafkaBinderConfigurationProperties;
import org.springframewo... |
python -m tools.deeplab_v3_extract_mask |
import Vue from 'vue'
import Vuex from 'vuex'
import {examTime, examList} from '../data/examData1'
import {examTime2, examList2} from '../data/examData2'
import mutations from './mutation'
Vue.use(Vuex)
const state = {
//当前题目索引
currendIndex: 0,
//题目列表
examList: [examList, examList2],
//保存的答案
s... |
#!/usr/bin/env bats
setup() {
eval "$(conda shell.bash hook)"
mkdir -p test/conda/envs
ENV=nose
ENV_DIR=`pwd`/test/conda/envs/$ENV
ENV_FILE=test/conda/${ENV}.yml
if [ ! -e "$ENV_DIF" -o "$ENV_FILE" -nt "$ENV_DIR" ]; then
rm -rf $ENV_DIR
conda env create -f $ENV_FILE -p $ENV_DIR -... |
#include <iostream>
using namespace std;
// Function to calculate the factorial of a given number
int factorial(int n) {
if (n == 0)
return 1;
return n * factorial(n - 1);
}
int main() {
int n;
cout << "Enter a number: ";
cin >> n;
int result = factorial(n);
cout << "The factorial of " << n << " is " << resu... |
<filename>transport/websocket.go
package transport
import (
"context"
"net/http"
"time"
"github.com/VolantMQ/volantmq/configuration"
"github.com/VolantMQ/volantmq/systree"
"github.com/gorilla/websocket"
"go.uber.org/zap"
)
type httpServer struct {
mux *http.ServeMux
http *http.Server
}
// ConfigWS listene... |
<gh_stars>1-10
const users = require("../../data/users")
const userSearch = {
"value[]": {
"user": "string",
"perms[]": {
"name": "string"
}
},
args: {
"user": "string",
"pw": "string"
},
func: async (args, mask) => {
console.log(mask)
... |
<reponame>AkaruiDevelopment/aoi.js
const {Perms: Permissions} = require('../../../utils/Constants.js');
module.exports = async d => {
const {code} = d.command;
const inside = d.unpack();
const err = d.inside(inside);
if (err) d.error(err);
let [guildId,returnId ="no", name, color, hoist = "no", pos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.