text stringlengths 1 1.05M |
|---|
package com.example.appausa.actializaciones;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.wi... |
<filename>src/main/java/vectorwing/farmersdelight/common/block/RiceBaleBlock.java<gh_stars>0
package vectorwing.farmersdelight.common.block;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity;
import ne... |
import BaseValidator from '../validators/-base';
export class NotValidator extends BaseValidator {
constructor(validator) {
super();
this.validator = validator;
}
check(value) {
return !this.validator.check(value);
}
}
export default function not(validator) {
return new NotValidator(validator)... |
def print_pattern(N):
for i in range(N):
for j in range(i+1):
print("*", end = " ")
print()
print_pattern(5) |
<filename>quadrupedal/inverse_dynamics.py
import numpy as np
import sympy as sy
import scipy.linalg as la
#3DoF Inverse Dynamics
class InverseDynamics:
def __init__(self,jointVectorList,linkInertiaList, comVectorList,linkMassList, positionGain=900,velocityGain=5):
#set to matrix
self.b1=jointVectorL... |
#!/usr/bin/env bash
# set -x
function set_power() {
iface=$1 # interface
co=$2 # country
pwr=$3 # power
iw reg set $co # BO/GY
sleep 3
iwconfig $iface txpower $pwr
sleep 3
iw reg get
}
function run_mdk() {
iface=$1
cnt=$2
bssid=$3
essid=$4
pckts=$5
for (... |
#!/bin/sh
TRAIN_DATA_DIR=../../data/train/
TRAIN_FILE=../../data/traindata-5.txt
DETECTOR_BIN=../algo/dist/detector
OUTPUT_FOLDER=../../data/trained-data/
TRAINER_JAR=./target/tester-1.0-SNAPSHOT.jar
java -cp $TRAINER_JAR gov.nasa.asteroid.tester.AsteroidDetectorTester -folder $TRAIN_DATA_DIR"/" -train $TRAIN_FILE -... |
#! /bin/sh
export KSROOT=/jffs/koolshare
if [ ! -L "$KSROOT/init.d/S99Shellinabox.sh" ]; then
ln -sf $KSROOT/shellinabox/shellinabox_start.sh $KSROOT/init.d/S99Shellinabox.sh
fi
case $ACTION in
start)
killall shellinaboxd
$KSROOT/shellinabox/shellinaboxd --css=/jffs/koolshare/shellinabox/white-on-black.css -b
;;
s... |
"""
OSC input/output utility.
Server implementation to capture OSC.
Function implementation to replay OSC.
"""
import time
import logging
import numpy as np
import liblo
from .base import TimeSeriesBundle
from .collector import Collector
log = logging.getLogger(__name__)
handler = logging.StreamHandler()
formatter =... |
package dev.webfx.kit.mapper.peers.javafxgraphics.gwt.html;
import elemental2.dom.CSSProperties;
import elemental2.dom.HTMLElement;
import dev.webfx.kit.mapper.peers.javafxgraphics.gwt.util.HtmlUtil;
import javafx.scene.shape.Rectangle;
import dev.webfx.kit.mapper.peers.javafxgraphics.base.RectanglePeerBase;
import de... |
import java.util.Stack;
public class MinMaxStack<T extends Comparable<T>> {
private Stack<T> stack;
private Stack<T> minStack;
private Stack<T> maxStack;
public MinMaxStack() {
stack = new Stack<>();
minStack = new Stack<>();
maxStack = new Stack<>();
}
public void pus... |
class FotaUpdater:
# ... (other methods remain unchanged)
def parse_tool_options(self):
if self._ota_element is None:
raise FotaError("missing ota_element")
# Extract tool options from self._ota_element and return them
tool_options = self._ota_element.get_tool_options() # E... |
def reverse(string):
new_string=""
for i in string:
new_string = i + new_string
return new_string |
#!/bin/bash
export PYTHONPATH=$(dirname "$0")/mpd
python3 ~/git/mpd-script/dislike.py >> ~/.mpd/dislike
|
class PackageInfo:
def __init__(self):
self.revision = 1
self.sources = None
self.patches = tuple()
self.dependencies = tuple()
self.homepage = None
self.envvars = None
self.build_envvars = None
def set_sources(self, sources):
self.sources = sourc... |
def lowest_unique_numbers(array)
auxiliar= [0]*9
lowest_unique_int = 0
lowest_unique_int_pos = 0
for x in 0..array.length()-1
actual_int = array[x].to_i
auxiliar[actual_int-1] += 1
end
for x in 0..8
if(auxiliar[x] == 1)
lowest_unique_int = x+1
break
end
end
... |
const session = require("express-session");
const FileStore = require("session-file-store")(session);
const mongoose = require("mongoose");
const User = require("../models/user");
const cookieCleaner = (req, res, next) => {
if (req.cookies?.user_sid && !req.session.email) {
res.clearCookie("user_sid");
}
nex... |
#!/bin/bash
set -e
function start() {
# Start
docker-compose -f docker-compose.1.yml -f docker-compose.2.yml -f docker-compose.cnf.yml -f docker-compose.shard.yml up -d
}
function logs() {
# Display logs
docker-compose -f docker-compose.1.yml -f docker-compose.2.yml -f docker-compose.cnf.yml -f docker-compose.s... |
module.exports = application => {
application.get('/', (req, res) => {
application.src.controllers.index.home(application, req, res)
})
} |
# frozen_string_literal: true
require_relative "../support/command_testing"
using CommandTesting
describe "edge/proposed features via require" do
it "proposed features" do
cmd = <<~CMD
ruby -rbundler/setup -I#{File.join(__dir__, "../../../lib")} -r #{File.join(__dir__, "fixtures", "proposed.rb")} \
... |
package com.inner.lovetao.index.activity;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import com.alibaba.android.arouter.launcher.ARouter;
import com.inner.lovetao.R;
import com.inner.lovetao.config.ArouterConfig;
import com.inner.lovetao.config.ConfigInfo;
import com.inner.lov... |
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lice... |
import json
import os
import time
import pytest
from src import client
@pytest.mark.run(order=4)
class TestStockClient:
PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), "testdata")
def __assert(self, rawdata, testdata):
if rawdata is None:
return
for row in rawdat... |
#!/usr/bin/env bash
# Set DISTNAME, BRANCH and MAKEOPTS to the desired settings
DISTNAME=astral-2.0.3
MAKEOPTS="-j4"
BRANCH=master
clear
if [[ $EUID -ne 0 ]]; then
echo "This script must be run with sudo"
exit 1
fi
if [[ $PWD != $HOME ]]; then
echo "This script must be run from ~/"
exit 1
fi
if [ ! -f ~/Mac... |
#!/usr/bin/env bash
set -e
git clean -xfd
dotnet clean --configuration Release
dotnet restore
|
1293;
1207;
1623;
1675;
1842;
1410;
85;
1108;
557;
1217;
1506;
1956;
1579;
1614;
1360;
1544;
1946;
1666;
1972;
1814;
1699;
1778;
1529;
2002;
1768;
1173;
1407;
1201;
1264;
1739;
1774;
1951;
1980;
1428;
1381;
1714;
884;
1939;
1295;
1694;
1168;
1971;
1352;
1462;
1828;
1402;
1433;
1542;
1144;
1331;
1427;
1261;
1663;
1820;
... |
<reponame>shin-kinoshita/dbflute-core
/*
* Copyright 2014-2018 the original author or 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/LI... |
'''
Created on Jul 30, 2015
@author: Mikhail
'''
import unittest
import re
from json_file_generator import MyOwnJSONProcessing as json_processing
from json_file_generator import __version__ as json_file_generator_version
from unittest.case import skip, skipIf
class GenerateAndLoadJSONTestUpdateFour(unittest.TestCase)... |
cp Makefile.slow Makefile
make |
#!/usr/bin/env bash
git pull
sh ./mvnw clean install -U
export JAVA_OPTS="-server -Xms1024M -Xmx1024M -Xss512k -XX:PermSize=256M -XX:MaxPermSize=512M -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -Dcom.sun.management.jmxremote.port=5006 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.ma... |
<filename>MfgToolLib/CString.h<gh_stars>0
/*
* Copyright 2016 Freescale Semiconductor, Inc.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice... |
import numpy as np
class LaneDetector:
def __init__(self):
# was the line detected in the last iteration?
self.detected = False
# recent polynomial coefficients
self.recent_fit = []
# polynomial coefficients averaged over the last n iterations
self.best_fit = None
... |
use std::path::Path;
struct DataSource {
load_url_with_config_dir: fn(&Path, bool) -> String,
}
struct Config {
subject: SubjectConfig,
}
struct SubjectConfig {
datasources: Vec<DataSource>,
}
fn construct_url(config: &Config, config_dir_path: &Path, from_env: bool) -> String {
if let Some(first_dat... |
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
#ifndef _FA_ACTIONSARRAY_STATIC_H_
#define _FA_ACTIONSARRAY_STATIC_H_
#include "FAConfig.h"
#include "FAActionsArrayA.h"
namespace BlingFire
{
///
/// Implementation based on static array.
///
... |
const express = require('express');
const router = express.Router();
// Get list of all tasks
router.get('/', (req, res) => {
// Code for fetching tasks
});
// Get a single task by id
router.get('/:id', (req, res) => {
// Code for fetching a single task
});
// Create a new task
router.post('/', (req, res) => {
... |
<filename>src/components/danekalendarz.js<gh_stars>0
import React from 'react';
import { useStaticQuery, graphql, StaticQuery } from "gatsby";
import styled from 'styled-components'
const Kalendarzdane = styled.div`
@media (min-width: 1200px){
width: 100vw;
min-height: 35vw;
}
`
const Miesiac = styled.div`
@media... |
package resolvers
import (
"errors"
"github.com/bradpurchase/grocerytime-backend/internal/pkg/auth"
"github.com/bradpurchase/grocerytime-backend/internal/pkg/notifications"
"github.com/graphql-go/graphql"
)
// NotifyTripUpdatedItemsAddedResolver resolves the notifyTripUpdatedItemsAdded mutation
func NotifyTripUp... |
#!/bin/bash
#
# MIT License
#
# (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
#
# 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 limi... |
<filename>min-triangle-sum/triangle-sum-day06/src/main/java/ua/kata/MinTriangleSum.java
package ua.kata;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
public class MinTriangleSum {
private final List<List<Integer>> triangle;
MinTriangleS... |
#!/bin/bash
AUTO_CONF="${AUTO_CONF:-true}"
DB_ADAPTER="${DB_ADAPTER:-mysql2}"
DB_POOL="${DB_POOL:-5}"
DB_HOST="${DB_HOST:-database}"
DB_USER="${DB_USER:-staytus}"
DB_PASSWORD="${DB_PASSWORD:-staytus}"
DB_DATABASE="${DB_DATABASE:-staytus}"
cd /opt/staytus/staytus || { echo "staytus directory not found."; exit 1; }
if ... |
#!/bin/sh
sed -i "s/{FRONTEND_TITLE}/${FRONTEND_TITLE?UNKNOWN}/g" /usr/share/nginx/html/frontend/main.js
sed -i "s/{FRONTEND_DESCRIPTION}/${FRONTEND_DESCRIPTION?UNKNOWN}/g" /usr/share/nginx/html/frontend/main.js
exec "$@"
|
import React, { ReactNode, createContext, useContext } from 'react';
const LIST_TYPES = ['number', 'alpha', 'roman'] as const;
const DEFAULT_LIST_TYPE = LIST_TYPES[0];
type ListType = typeof LIST_TYPES[number];
const nextListType = (type: ListType): ListType =>
LIST_TYPES[LIST_TYPES.indexOf(type) + 1] ?? DEFAULT_... |
<reponame>zangiboy/learning_testing<filename>spec/triangle-spec.js<gh_stars>0
import { Triangle } from './../src/project.js';
describe('Triangle', function() {
it('should return equilateral for a triangle which has three equal sides', function() {
let equal = new Triangle(3, 3, 3);
expect(equal.ch... |
<reponame>INSO-TUWien/EffortBurst
export const ItemNodeType = {
EPIC: 'epic',
ISSUE: 'issue',
PROJECT: 'project',
SUB_TASK: 'subTask'
}; |
<gh_stars>0
from werkzeug.wrappers import Response
import frappe
from frappe import _
from frappe.contacts.doctype.contact.contact import get_contact_with_phone_number
from .twilio_handler import Twilio, IncomingCall, TwilioCallDetails
@frappe.whitelist()
def get_twilio_phone_numbers():
twilio = Twilio.connect()
re... |
public static boolean isVowelPresent(String str) {
// Counts the number of vowels present
int count = 0;
for (int i = 0; i < str.length(); i++) {
// Checks whether a char is a vowel
if (str.charAt(i) == 'a' || str.charAt(i) == 'e'
|| str.charAt(i) == 'i' || str.ch... |
#include <iostream>
using namespace std;
bool isPrime(int n) {
for (int i = 2; i <= n / 2; ++i) {
if (n%i == 0)
return false;
}
return true;
}
int main()
{
cout << "Prime numbers from 0 to 100 are: ";
for (int i = 0; i <= 100; ++i) {
if (isPrime(i))
cout << i << ", ";
}
r... |
def fibonacci_series(n):
a = 0
b = 1
if n < 0:
return
elif n == 0:
return 0
elif n == 1:
return 1
else:
for i in range(2,n+1):
c = a + b
a = b
b = c
fibonacci_series = b
return fibonacci_series |
<reponame>tcmRyan/OpenOLAT<filename>src/main/java/org/olat/repository/manager/RepositoryEntryStatisticsDAO.java
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except ... |
<reponame>m-wrona/hevicado<filename>fe/test/unit/modules/commons/spinner/http-progress-watcher-spec.js
'use strict';
describe('http-progress-watcher-spec:', function () {
//prepare module for testing
beforeEach(angular.mock.module('commons.spinner'));
describe('HttpProgressWatcher-spec:', function () {
... |
PROGRESS_FILE=/tmp/dependancy_camera_in_progress
if [ ! -z $1 ]; then
PROGRESS_FILE=$1
fi
touch ${PROGRESS_FILE}
echo 0 > ${PROGRESS_FILE}
echo "Launch install of MusicCast dependancy"
echo 100 > ${PROGRESS_FILE}
echo "Everything is successfully installed!"
rm ${PROGRESS_FILE}
|
mvn install -Dmaven.test.skip=true |
# Set an automatic timeout so we don't have idle boxes sitting around
echo "*********************************************************"
echo "* Welcome to the Online Learning Environment *"
echo "* *"
echo "* This shell has a 5 minute timeout. ... |
#!/usr/bin/env 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 ... |
def maximumOfThree(num1, num2, num3):
max = num1
if(num2 > max):
max = num2
if(num3 > max):
max = num3
return max |
<gh_stars>1-10
import argonaut._
import Argonaut._
object FindNonaccepted {
val commaSep = "(.*), (.*)".r
val disambig = "(.*) \\((.*)\\)".r
def main(args : Array[String]) {
val wn = io.Source.fromFile("wordnet.json").mkString("").
decodeOption[Map[String, WordNetEntry]].get
val accepted = i... |
package aserg.gtf.dao.authorship;
import java.util.List;
import javax.persistence.Query;
import aserg.gtf.dao.GenericDAO;
import aserg.gtf.dao.PersistThread;
import aserg.gtf.model.authorship.Developer;
public class DeveloperDAO extends GenericDAO<Developer> {
@Override
public void persist(Developer o) {
i... |
<reponame>jschoolcraft/urlagg<gh_stars>1-10
require 'email_spec'
require 'email_spec/cucumber'
require 'factory_girl'
Dir[File.expand_path(File.dirname(__FILE__) + "/../../spec/factories/*.rb")].each {|f| require f}
After("@show-page") do |scenario|
if scenario.failed?
save_and_open_page
end
end |
package com.abubusoft.kripton.samples.paging2.com.abubusoft.kripton.widgetx;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
import com.abubusoft.kripton.android.KriptonLibrary;
import com.abubusoft.kripton.android.Logger;
import com.abubusoft.k... |
#!/bin/bash
dieharder -d 208 -g 208 -S 2140661553
|
/* eslint arrow-body-style: ["error", "as-needed"] */
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import { getHtmlLedetekst, getLedetekst } from '@navikt/digisyfo-npm';
import { Hovedknapp } from 'nav-frontend-knapper';
import Alertstripe from 'na... |
#!/bin/bash -e
#
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... |
#!/bin/bash
# Verbose Logging - Add parameters to /etc/chrome_dev.conf that increase logging verbosity.
# Run this script on a Chromebook:
# 1. Put Chromebook in developer mode - https://www.chromium.org/chromium-os/poking-around-your-chrome-os-device
# 2. Log into device. Press CTRL+ALT+T to open crosh shell.
# 3. T... |
#!/bin/bash
# Build Borsa React App Project
cd ./borsa-app/
npm run build
cd ..
# Build Borsa Service Project
APPS="borsa-service"
# First ensure dependencies loaded since .m2 may be empty
mvn dependency:tree -Ddetail=true
mvn help:evaluate -Dexpression=project.version
# Clean repo from builds
./clean.sh
#
# Conf... |
<gh_stars>1-10
package org.firstinspires.ftc.teamcode;
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
@Autonomous
public class GoldHitMiddle extends AutoOpMode {
@Override
public void runOpMode() throws InterruptedException {
initialize();
waitForStart();
moveTime(1500, .... |
#ifndef _WORLD_H_
#define _WORLD_H_
#if defined(_MSC_VER)
#pragma once
#endif
/*
* LEGAL NOTICE
* This computer software was prepared by Battelle Memorial Institute,
* hereinafter the Contractor, under Contract No. DE-AC05-76RL0 1830
* with the Department of Energy (DOE). NEITHER THE GOVERNMENT NOR THE
* CONTRACT... |
import assertType from '../utils/assert-type';
import assertNotNull from '../utils/assert-not-null';
import forOf from '../utils/for-of';
import {identityFunction} from './helper-functions';
export default function aggregateIterator(source, seed, func, resultSelector) {
assertNotNull(source);
assertType(func, ... |
<reponame>FLSoz/terratech-steam-mod-loader
import { app, Menu, shell, BrowserWindow, MenuItemConstructorOptions } from 'electron';
import checkForUpdates from './updater';
import { ValidChannel } from '../model';
interface DarwinMenuItemConstructorOptions extends MenuItemConstructorOptions {
selector?: string;
subm... |
class Visitor:
def visit(self, element):
pass
class ConcreteVisitor(Visitor):
def visit(self, element):
if isinstance(element, ConcreteElementA):
self.visit_concrete_element_a(element)
elif isinstance(element, ConcreteElementB):
self.visit_concrete_element_b(elem... |
<filename>nexus/lib/memory.py
##################################################################
## (c) Copyright 2015- by <NAME> ##
##################################################################
######################################################################
# The following is adapted... |
export { EditorNavbar } from "./EditorNavbar";
export { EditorPanel } from "./EditorPanel";
export { PreviewSpace } from "./PreviewSpace";
export { HomeNavbar } from "./HomeNavbar";
export { SlideNavigator } from "./SlideNavigator";
export { Slide } from "./Slide";
export { Logo } from "./Logo";
export { PrimaryButton ... |
<filename>src/map.js
const equals = require('shallow-equals');
class BaseMap {
merge(opts) {
let isUnequal = false;
for (let key of Object.keys(opts)) {
if (this.__props[key] !== opts[key]) {
isUnequal = true;
break;
}
}
if (!isUnequal) return this;
return IMap({ ..... |
package native
import (
"os"
"os/exec"
"strconv"
"sync"
"syscall"
"time"
docker "github.com/fsouza/go-dockerclient"
units "github.com/docker/go-units"
log "github.com/xuperchain/log15"
"github.com/xuperchain/xupercore/kernel/contract/bridge"
)
var (
dockerOnce sync.Once
dockerClient *docker.Client
)
... |
export default {
name: 'AuthenticatorApp',
components: {
},
methods: {
onNext () {
this.$router.replace('/account/authentication/qrcode')
},
onCancel () {
this.$router.replace('/account/authentication/preferences')
}
}
}
|
#!/bin/bash
TASK=19
MODEL=ctrl_vilbert
MODEL_CONFIG=ctrl_vilbert_base
TASKS_CONFIG=iglue_test_tasks_boxes36.dtu
TRTASK=XVNLI
TETASK=XVNLIar
TEXT_PATH=/home/projects/ku_00062/data/XVNLI/annotations/ar/test.jsonl
PRETRAINED=/home/projects/ku_00062/checkpoints/iglue/zero_shot/xvnli/${MODEL}/${TRTASK}_${MODEL_CONFIG}/pyto... |
#!/bin/bash
source ./constant.sh
# create network
docker network create --subnet=${REDIS_NETWORK_IP}/24 ${REDIS_NETWORK}
# create rerdis-cluster
# master:slave 1:1
redis-cli --cluster create 169.69.2.2:7001 169.69.2.3:7002 169.69.2.4:7003 169.69.2.5:7004 169.69.2.6:7005 169.69.2.7:7006 --cluster-replicas 1
|
<reponame>smagill/opensphere-desktop
package io.opensphere.mantle.data;
import java.awt.Component;
import java.util.List;
import javax.swing.Icon;
/**
* A way for a data type to provide additional functionality, such as additional
* UIs.
*/
public interface DataTypeInfoAssistant
{
/**
* Get... |
from django_chuck.template.base import BaseEngine
from django_chuck.utils import write_to_file
from django_chuck.exceptions import TemplateError
import os
import re
class TemplateEngine(BaseEngine):
input_file = ""
base_file = ""
extension_file = ""
line_count = ""
input = ""
output = ""
k... |
import { getSession } from "../neo4j";
import { StreamObject } from "../types";
export const createTweet = async (streamObject: StreamObject) => {
const session = getSession();
const { id, created_at, text, author_id } = streamObject.data;
const tweet = {
id,
created_at,
text,
author_id,
};
t... |
<reponame>Ojonathan/Startlight
#include "gameview.h"
#include "ui_gameview.h"
#include "metier_abs/mirror.h"
#include <QPixmap>
#include <QMessageBox>
#include <iostream>
#include <QWidget>
#include <QObject>
#include <vector>
#include <cmath>
#define PI (3.141592653589793)
gameView::gameView(Level * level, QWidget ... |
The most significant implications of deep learning are:
• Improved accuracy and speed of analytics
• Ability to extract and analyze data from large and diverse data sets
• Ability to identify patterns and structures from data that are not visible to traditional analytical methods
• Improved automation and decision ... |
module KubeDSL::DSL::Extensions
autoload :V1beta1, 'kube-dsl/dsl/extensions/v1beta1'
end
|
export SBT_OPTS="-XX:+CMSClassUnloadingEnabled"
|
#!/usr/bin/env node
var KrakenClient = require('kraken-api')
var kraken = new KrakenClient()
var mapping
var products = []
function addProduct(base, quote, altname, min_size, increment) {
products.push({
asset: base,
currency: quote,
min_size: parseFloat(min_size).toFixed(10),
increment: (10 ** (-1... |
<reponame>sercaneraslan/svelte
/* generated by Svelte vX.Y.Z */
import {
SvelteComponentDev,
add_location,
append_dev,
destroy_each,
detach_dev,
dispatch_dev,
element,
init,
insert_dev,
noop,
safe_not_equal,
set_data_dev,
space,
text
} from "svelte/internal";
const file = undefined;
function get_each_co... |
/*
* Tencent is pleased to support the open source community by making Blueking Container Service available.
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
* Licensed under the MIT License (the "License"); you may not use this file except
* in compliance with the License. You may obta... |
<filename>acmicpc.net/source/14614.cpp
// 14614. Calculate!
// 2021.12.03
// 수학
#include<iostream>
using namespace std;
int main()
{
int a, b;
string c;
cin >> a >> b >> c;
// 같은 수를 짝수번 XOR 연산한 값은 0이다.
int k = c[c.size() - 1] - '0';
if (k % 2 == 0)
{
cout << a << endl;
}
e... |
/**
* 200 (OK) Response
*
* Usage:
* return res.ok();
* return res.ok(data);
*
* @param {Object} data
**/
module.exports = function sendOk(data) {
return this.res.status(200).json(data);
};
|
import React from "react";
const StarsConfig = ({data, updateData, simple}) => (
<div>
<label>Viewport Angle</label>
<input
onChange={evt =>
updateData(
JSON.stringify({...JSON.parse(data), angle: evt.target.value}),
)
}
defaultValue={JSON.parse(data).angle}
/>
... |
#!/usr/bin/env bats
DOCKER_COMPOSE_FILE="${BATS_TEST_DIRNAME}/php-7.1_ini_redis_on.yml"
container() {
echo "$(docker-compose -f ${DOCKER_COMPOSE_FILE} ps php | grep php | awk '{ print $1 }')"
}
setup() {
docker-compose -f "${DOCKER_COMPOSE_FILE}" up -d
sleep 20
}
teardown() {
docker-compose -f "${DOCKER_CO... |
<filename>opencga-analysis/src/main/java/org/opencb/opencga/analysis/files/FileScanner.java
package org.opencb.opencga.analysis.files;
import org.opencb.datastore.core.ObjectMap;
import org.opencb.datastore.core.QueryOptions;
import org.opencb.datastore.core.QueryResult;
import org.opencb.opencga.catalog.db.api.Catalo... |
<filename>lecture6/videoVTT-refactored/core-components/video-viewer.js<gh_stars>0
import { LitElement, html, css } from 'lit-element';
/**
* Wrapper around the video tag.
* Takes the video file, type and vtt file as parameters.
* When a new vtt file has been loaded it fires a "cuesUpdated" event containing
* an ar... |
<filename>node_modules/botbuilder-core/lib/extendedUserTokenProvider.d.ts<gh_stars>1-10
/**
* @module botbuilder
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { CoreAppCredentials } from './coreAppCredentials';
import { IUserTokenProvider } from './u... |
import UIKit
protocol AppListRouterProtocol: AnyObject {
func navigateToAppDetail(with appId: String)
func navigateToSettings()
}
final class AppListRouter: AppListRouterProtocol {
weak var viewController: UIViewController!
func navigateToAppDetail(with appId: String) {
// Navigate to the app... |
#! /bin/sh
#SBATCH -t 3:00:00
#SBATCH --nodes=1
#SBATCH --tasks-per-node=1
#SBATCH --cpus-per-task=1
#SBATCH -A p_readex
#SBATCH --mem=62000
#SBATCH --mail-user=diethelm@gns-mbh.com # email address
#SBATCH --mail-type=BEGIN,FAIL,END
#SBATCH --partition=haswell
#
# Installation on Taurus
# 1) Modules and Variables
m... |
<reponame>pengge/ztSDP
// +build !linux android
/* SPDX-License-Identifier: MIT
*
* Copyright (C) 2017-2019 ZtSDP LLC. All Rights Reserved.
*/
package device
import (
"net"
"os"
"syscall"
)
/* This code is meant to be a temporary solution
* on platforms for which the sticky socket / source caching behavior
... |
#!/bin/bash
echo "Extracting tests.zip..."
unzip -o tests.zip
echo "Installing requirements"
chmod 0755 resources/requirements.txt
pip3 install -r resources/requirements.txt
## start Appium server
echo "Starting Appium ..."
appium --log-no-colors --log-timestamp --command-timeout 120
## Start test execution
echo "... |
<filename>src/skidesign.py
"""
ID: isaiahl1
LANG: PYTHON2
TASK: skidesign
"""
TASK = 'skidesign'
def readints(fin):
return tuple(int(x) for x in fin.readline().split())
def readint(fin):
return int(fin.readline())
def main(fin, fout):
N = readint(fin)
hills = []
for _ in xrange(N):
hills.append(readint(fin))
... |
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-N-VB/13-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-N-VB/13-512+512+512-shuffled-N-VB-1 --do_eval --per... |
#!/bin/bash
# -*-mode: Shell-script; indent-tabs-mode: nil; sh-basic-offset: 2 -*-
# Find the base directory while avoiding subtle variations in $0:
dollar0=`which $0`; PACKAGE_DIR=$(cd $(dirname $dollar0); pwd) # NEVER export PACKAGE_DIR
# Set defaults for BUILD_DIR and INSTALL_DIR environment variables and
# define... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.