text
stringlengths
1
1.05M
#!/bin/bash set -euo pipefail IMAGE="php:7.3-apache" ID=$(docker run \ --rm -d \ -v $(pwd)/"${GOSS_EXE}":/bin/goss \ -v $(pwd):/app \ -v $(pwd)/httpd:/var/www/html \ "${IMAGE}") function clean { printf "\n" echo "Stop container..." docker stop "${ID}" } trap "clean...
object ReplaceSpaces { def replaceSpaces(str: String): String = { str.replaceAll("\\s", "-") } def main(args: Array[String]): Unit = { val str = "Hello World" println(replaceSpaces(str)) } }
#!/bin/bash ./redis-cli -h $(docker-machine ip redis-cluster-1) -p 6379 config set appendonly "yes" ./redis-cli -h $(docker-machine ip redis-cluster-2) -p 6379 config set appendonly "yes" ./redis-cli -h $(docker-machine ip redis-cluster-3) -p 6379 config set appendonly "yes" ./redis-cli -h $(docker-machine ip redis-clu...
#!/bin/bash TARGET="$(echo "$LANG" | grep -o ^..)" SEARCH="$(wofi -d -L 1 | sed 's/ /+/g')" SUGGESTION=$(curl "https://libretranslate.com/translate" -H "Content-Type: application/json" -d "{\"q\": \"${SEARCH}\", \"source\": \"en\", \"target\": \"${TARGET}\"}" | sed 's/^{"translatedText":"//g' | rev | sed 's/^}"//g'| re...
#!/usr/bin/env bash export PYTHONPATH="../":"${PYTHONPATH}" export BS=32 export GAS=1 python finetune.py \ --learning_rate=3e-5 \ --fp16 \ --gpus 1 \ --do_train \ --do_predict \ --val_check_interval 0.25 \ --n_val 500 \ --num_train_epochs 2 \ --freeze_encoder --freeze_embeds --data...
import sqlite3 conn = sqlite3.connect('orders.db') c = conn.cursor() # create the table to store orders c.execute("CREATE TABLE Orders (order_id integer PRIMARY KEY, customer_name text NOT NULL, order_date text NOT NULL, order_items text NOT NULL)") # commit changes conn.commit() # close connection conn.close() #...
<gh_stars>1-10 import {getDcDenom, IbcDenom} from "./denom.helper"; describe('getDcDenom', () => { describe('getDcDenom', () => { it('getDcDenom Test', async () => { const msg = { msg:{ 'packet':{ "source_port" : "transfer", ...
#!/usr/bin/env bash # SPDX-License-Identifier: BSD-3-Clause set -eufx echo -n "abcde12345abcde12345" > testdata # generate private key as PEM openssl genpkey -provider tpm2 -algorithm EC -pkeyopt group:P-256 -out testkey.priv # read PEM and export public key as PEM openssl pkey -provider tpm2 -provider base -in test...
#!/bin/bash python3 -m venv venv source venv/bin/activate export FLASK_APP=app.py export FLASK_ENV=development python3 -m flask run
# Function to compute the factorial of a positive integer n def factorial(n): # base case if n == 0: return 1 # recursive case else: return n * factorial(n-1) if __name__ == '__main__': num = 6 print(factorial(num))
<filename>users/admin.py from django.contrib import admin from .models import Users from django.contrib.auth.admin import UserAdmin from department.models import * # Register your models here. class UsersAdmin(UserAdmin): model = Users fieldsets = UserAdmin.fieldsets + ( ('Additional Info', { ...
def sort_numbers(nums): for i in range(len(nums)): for j in range(i+1, len(nums)): if nums[i] > nums[j]: temp = nums[j] nums[j] = nums[i] nums[i] = temp return nums print(sort_numbers([5, 7, 1, 6, 10, 4, 2]))
<reponame>lahosken/pants // Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.pantsbuild.testproject.workdirs.onedir; import org.junit.Test; import java.io.File; import static org.junit.Assert.assertTrue; /** * Ensure cwd w...
<gh_stars>0 package com.spmovy; import org.junit.Test; import org.mockito.Mockito; import javax.servlet.http.HttpServletResponse; import static org.junit.Assert.*; public class UtilsTest extends Mockito { @Test public void getDatabaseUtils() throws Exception { HttpServletResponse respo...
class Action: INSERT = "INSERT" UPSERT = "UPSERT" class NA: pass class RootItem: def __init__(self, action): self.action = action class DataSubItem: def __init__(self, root, saved): self.root = root self.saved = saved def inserting(data: DataSubItem) -> bool: return (...
<gh_stars>100-1000 // https://www.codechef.com/OCT17/problems/CHEFGP/ #include <iostream> using namespace std; void f() { string s; int x, y; cin >> s >> x >> y; int a = 0; int b = 0; for (int j = 0; j < s.size(); j++) { if (s[j] == 'a') a++; else b++; } int ca = (a + x - 1) / x; int cb = (b + ...
<reponame>theLambda/DBH-project1 # Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/...
<filename>src/visualizers/open-data-table-enum-visualizer.js /* @license Copyright (c) 2020 <NAME>. All rights reserved. */ import { html, css, LitElement } from 'lit-element'; import { OpenDataTableVisualizerController } from './open-data-table-visualizer-controller.js'; export class OpenDataTableEnumVisualizer exten...
#!/bin/sh # jenkins build helper script for osmo-bts-lc15 # shellcheck source=contrib/jenkins_common.sh . $(dirname "$0")/jenkins_common.sh osmo-build-dep.sh libosmocore "" --disable-doxygen export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$inst/lib" osmo-build-dep.sh libosmo-ab...
#!/bin/bash if ! netlify --version; then echo "You must install the netlify cli to test our docs build" echo "Try running:" echo "brew install npm" echo "npm install netlify-cli -g" fi here="$(dirname "${0}")" cd "${here}/.." netlify dev
#/bin/bash # Copyright (c) 2019 - The Procedural Generation for Gazebo authors # For information on the respective copyright owner see the NOTICE file # # 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 Lic...
<filename>src/guards/base.guard.ts import { ExecutionContext, mixin } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { AuthGuard, IAuthGuard, Type } from '@nestjs/passport'; import { RolesEnum } from 'enums/roles.enum'; import { Request } from 'express'; import memoize from 'lodash.me...
<reponame>joojis/cron-jobs const { SDK } = require("codechain-sdk"); const assert = require("assert"); async function main() { const toAddress = process.argv[2]; console.log(toAddress); try { SDK.Core.classes.PlatformAddress.fromString(toAddress); } catch (err) { console.error(`Invalid to address "${t...
#!/bin/bash # # Copyright 2016 The Bazel Authors. 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 required by...
<gh_stars>1-10 import os from datetime import datetime, timedelta from airflow import DAG from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator from airflow_utils import ( DATA_IMAGE, clone_and_setup_extraction_cmd, gitlab_defaults, slack_failed_task, ) from kube_secrets ...
import cv2 class VideoProcessor: def __init__(self, video): self.video = video def is_opened(self): """ Check if the video is ready. """ if self.video: return self.video.isOpened() def get_frame(self, gray=False): """ Return the current ...
<reponame>timherrm/geizhalscrawler<gh_stars>0 import unittest from random import uniform from time import sleep from tests.exception_decorator import except_httperror from geizhalscrawler import geizhals class TestStringMethods(unittest.TestCase): @except_httperror def test_URL_AT(self): id = geizhal...
public class IssueContainsKeywordsPredicate { private List<String> keywords; public IssueContainsKeywordsPredicate(List<String> keywords) { this.keywords = keywords; } public boolean test(Issue issue) { for (String keyword : keywords) { if (!issue.getDescription().contains(...
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm'; import { PhotoEntity } from './photo.entity'; @Entity() export class AlbumEntity { @PrimaryGeneratedColumn() id: number; @Column() name: string; @OneToMany(() => PhotoEntity, (photo) => photo.album) photos: PhotoEntity[]; add...
/* * Copyright 2014-2020 The Ideal Authors. All rights reserved. * * Use of this source code is governed by a BSD-style * license that can be found in the LICENSE file or at * https://developers.google.com/open-source/licenses/bsd */ package ideal.development.actions; import ideal.library.elements.*; import ide...
#coding:utf-8 import os import sys import time import pipes import subprocess import threading import pexpect import signal class ReturnContainer(): def __init__(self): self.value = None class Command(object): def __init__(self, cmd, fail_cmd, post_cmd=None, post_delay=0): self.cmd = cmd ...
<reponame>AllenElguira16/repairservicelocator<filename>Assets/js/Components/MyShop/Content.tsx import * as React from "react"; import DeleteConfirmation from "./DeleteConfirmation"; class Content extends React.Component<any, any>{ state: any = { activeId: null } fillForm(id: any){ this.props.fillForm(id)...
SELECT * FROM Employees ORDER BY Salary DESC LIMIT 0.1 * (SELECT COUNT(EmployeeID) FROM Employees);
<reponame>youaxa/ara-poc-open package com.decathlon.ara.repository.custom.impl; import com.decathlon.ara.domain.Functionality; import com.decathlon.ara.domain.QFunctionality; import com.decathlon.ara.domain.enumeration.FunctionalityType; import com.decathlon.ara.repository.custom.FunctionalityRepositoryCustom; import ...
<gh_stars>1-10 package org.firstinspires.ftc.teamcode.teleop; import com.qualcomm.robotcore.eventloop.opmode.TeleOp; import com.qualcomm.robotcore.util.RobotLog; import org.firstinspires.ftc.teamcode.botfunctionality.RecorderBot; @TeleOp (name="Record Wobble Deliveries", group="Recording") public class RecordWobbleDe...
<reponame>JLLeitschuh/Symfony-2-Eclipse-Plugin /******************************************************************************* * This file is part of the Symfony eclipse plugin. * * (c) <NAME> <<EMAIL>> * * For the full copyright and license information, please view the LICENSE * file that was distributed with...
<reponame>Mihailus2000/lab-01-parser #include <gtest/gtest.h> #include "Json.hpp" TEST(JsonObject, ExampleTest){ std::string json = R"({ "lastname" : "Ivanov", "firstname" : "Ivan", "age" : 25, "islegal" : false, "marks" : [ 4,5,5,5,2,3 ], "address" : { "city" : "Moscow", ...
import re def validate_email(emails): valid_emails = [] for email in emails: if re.match(r'^[a-zA-Z0-9]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$', email): valid_emails.append(email) return valid_emails # Test the function with the given example emails = ["john.doe@example.com", "jane.doe@company....
<filename>16 manipulateBits (go)/main.go package main import ( "github.com/dborzov/bitmanipulation" "fmt" ) func main() { i := bitmanipulation.BitInt(44) fmt.Printf("Behold 4: %s \n", i.String()) }
import tensorflow as tf # define features age = tf.feature_column.numeric_column("age") location = tf.feature_column.categorical_column_with_vocabulary_list( "location", ["usa", "uk", "india", "australia"] ) gender = tf.feature_column.categorical_column_with_vocabulary_list( "gender", ["male", "female"] ) # d...
<reponame>IT2901-Tiles/Tiles import {configure, shallow} from "enzyme" import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; import MainPage from '../Pages/MainPage'; import {cleanup} from '@testing-library/react'; import renderer from 'react-test-renderer'; import {BrowserRouter as Router} from "react-router-dom";...
def count_words_length(string): count = 0 words = string.split(" ") for word in words: if len(word) == 5: count += 1 return count string = "The quick brown fox jumped over the lazy dog." print(count_words_length(string))
#!/bin/bash ############################################################################## # (c) OPNFV, Yin Kanglin and others. # 14_ykl@tongji.edu.cn # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this dist...
<filename>a001/os_walk.py<gh_stars>0 import os cur_dp = os.getcwd() print (cur_dp) # sampleディレクトリの全階層にあるサブディレクトリとファイルの名前をすべて取得する for curDir, dirs, files in os.walk('./sample'): print('---') print(curDir) print(dirs) print(files)
module Slackware::Gui DOBBAGE_VERSION = "1.5" DOBBAGE_URL = "https://github.com/vbatts/dobbage" DOBBAGE_AUTHOR = "<NAME>, <EMAIL>" end
package types import ( "fmt" "github.com/lterrac/system-autoscaler/pkg/apis/systemautoscaler/v1beta1" ) // NodeScales is used to group podscales by node. type NodeScales struct { Node string PodScales []*v1beta1.PodScale } func (n *NodeScales) Contains(name, namespace string) bool { for _, podscale := ran...
#!/bin/bash FN="MAQCsubsetILM_1.32.0.tar.gz" URLS=( "https://bioconductor.org/packages/3.14/data/experiment/src/contrib/MAQCsubsetILM_1.32.0.tar.gz" "https://bioarchive.galaxyproject.org/MAQCsubsetILM_1.32.0.tar.gz" "https://depot.galaxyproject.org/software/bioconductor-maqcsubsetilm/bioconductor-maqcsubsetilm_1....
// Fill out your copyright notice in the Description page of Project Settings. #include "EliasTest.h" IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, EliasTest, "EliasTest" );
<filename>dist/stratification/index.d.ts /** * Created by sam on 26.12.2016. */ export * from './IStratification'; export * from './StratificationGroup'; export * from './StratificationCategoricalVector'; export * from './loader'; export * from './Stratification'; export * from './vector/ANameVector'; export * from '...
var path = require("path"); var webpack = require("webpack"); module.exports = { // Root folder of source code context: path.join(__dirname, "src"), // Entry point(s) entry: { // HTML html: "./index.html", // JS javascript: ["babel-polyfill", "./index.js"] }, /...
#!/usr/bin/env bash sudo chown -R vagrant /home/vagrant sudo chgrp -R vagrant /home/vagrant # Setup a swap partition sudo fallocate -l 8G /swapfile sudo dd if=/dev/zero of=/swapfile bs=1M count=8192 sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile # # Update & install dependencies # sudo apt-get ...
'use strict'; /* global IACHandler */ (function(exports) { /** * DialerComms allows the user to stop the ringtone from playing * by interacting with the hardware. When the user presses the sleep * or volumedown button, the ringtone will stop playing. * @class DialerComms * @requires IACHandler */ ...
#!/usr/bin/env bash # # Copyright (c) Microsoft Corporation. All rights reserved. # if [[ "$OSTYPE" == "darwin"* ]]; then realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"; } VSCODE_PATH=$(dirname $(dirname $(dirname $(dirname $(dirname $(realpath "$0")))))) else VSCODE_PATH=$(dirname $(dirname $(dirna...
__version__ = '0.1' __author__ = 'Tester' #home page FB Email_Phone_Field_To_Login = '//input[@id =\'email\']' Password_Field_To_Login = '//input[@id =\'pass\']' Login_Button = '//input[@value =\'Log In\']' Forgot_account = '//a[contains(text(), \'Forgot account?\')]' English_Link = '//a[@title=\'English (US)\']' ...
import {Response, NextFunction, Request} from "express"; import {v4 as uuid} from "uuid"; import logger from "../shared/Logger"; const requestMiddleware = async (req: Request, res: Response, next: NextFunction) => { req.requestId = uuid(); logger.info("Request Received - " + req.requestId); logger.info(req.method ...
import numpy as np matrix = np.array([[1,2,3], [4,5,6], [7,8,9]]) # Calulate the sum of the diagonals sum_diag = np.trace(matrix) # Print the output print(sum_diag)
<gh_stars>0 if RUBY_PLATFORM =~ /64/ puts "You have a 64-bit Architecture ruby" if RUBY_PLATFORM =~ /mswin/ || RUBY_PLATFORM =~ /mingw/ puts "With Windows" lib, path = 'stbDLL_x64.dll', "#{__dir__}/../dlls" elsif RUBY_PLATFORM =~ /linux/ || RUBY_PLATFORM =~ /cygwin/ puts "With Linux" lib, path ...
#!/bin/bash height=28 width=28 if [ `ls test-images/*/*.png 2> /dev/null | wc -l ` -gt 0 ]; then for file in test-images/*/*.png; do convert "$file" -resize "${width}x${height}"\! "${file%.*}.jpg" file "$file" #uncomment for testing rm "$file" done fi if [ `ls training-images/*/*.png 2> /dev/null | w...
import numpy as np import pandas as pd from keras.models import Sequential from keras.layers import Dense, Activation # Create dataframe from data df = pd.DataFrame({ 'Temperature': [36.6, 36.6, 37.2, 36.6], 'Time': ['6am', '6am', '6am', '6pm'], 'Location': ['Paris', 'Paris', 'London', 'Paris'], 'Activ...
#!/usr/bin/env bash gobuild (){ package=$1 if [[ -z "$package" ]]; then echo "usage: $0 <package-name>" exit 1 fi package_name=$package platforms=("linux/amd64" "windows/amd64") # "linux/arm64") for platform in "${platforms[@]}" do CGO_ENABLED=1 CC=gcc pl...
def update_op_field(data): paragraphs = data['data'][0]['paragraphs'] subquestions = [q['question'] for q in paragraphs[0]['qas'] if q['level'] == 'subquestion'] last_subquestion = subquestions[-1] paragraphs[0]['op'] = last_subquestion.replace(' ', '_').upper() return data
<gh_stars>0 from __future__ import absolute_import from __future__ import division from __future__ import print_function from scipy import misc import sys import os import argparse import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import numpy as np #import facenet import detect_face import random from time i...
<filename>collect_app/src/main/java/org/odk/collect/android/widgets/BarcodeWidget.java /* * Copyright (C) 2009 University of Washington * * 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 * ...
package com.reiser.daily.day04; import com.reiser.homework.linkedlist.ListNode; /** * @author: reiserx * Date:2020/9/11 * Des: */ public class MergeTwoLists { public static void main(String[] args) { MergeTwoLists solution = new MergeTwoLists(); } public ListNode mergeTwoLists(ListNode l1, Li...
/* * Copyright (C) 2012 Sony Mobile Communications AB * * This file is part of ApkAnalyser. * * 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/LIC...
public interface ITagRepository { IEnumerable<Tag> GetAllTags(); Tag GetTagById(int id); void CreateTag(Tag tag); void UpdateTag(Tag tag); void DeleteTag(int id); } public class TagsController : ControllerBase { private readonly ILogger<TagsController> _logger; private readonly ITagReposito...
#!/bin/bash # This script can be used to offload a job to the Condor batch # system. It assumes that all nodes that may recieve a job share the # relevant part of the file system with the node where Mosek Server # runs. This means that: # - The absolute path of the working directory and problem file must be # the ...
!/bin/bash # make sure you are in path "ytk-learn" # cd ../../.. sh demo/multiclass_linear/local_optimizer.sh
func requestHistory(beforeTimestamp: Int64, completion: @escaping ([MessageImpl], Bool) -> ()) { webimActions.requestHistory(beforeMessageTimestamp: beforeTimestamp) { [weak self] data in guard let self = self, let data = data, let json = try? JSONSerialization.jsonObject(wit...
public class MutualDependency { // Violation: BadModel and BadView are mutually dependent private static class BadModel { private int i; private BadView view; public int getI() { return i; } public void setI(int i) { this.i = i; if(view != null) view.modelChanged(); } public void setView(Bad...
#!/bin/sh set -e echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then local source="${BUILT_PRO...
package org.firstinspires.ftc.teamcode.subsystem.drive.drivecontroller.PID.consts; public class GyroPIDConstants implements PIDConstants { private double KP = 0.35; private double KI = 0.05; private double KD = 0.05; private double KF = 0.1; private double TOLERANCE = 5; //Degrees private doub...
<reponame>ch1huizong/learning #!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 <NAME> All rights reserved. # """ """ #end_pymotw_header import os from urllib import pathname2url, url2pathname print '== Default ==' path = '/a/b/c' print 'Original:', path print 'URL :', pathname2url(path) print 'Path...
import os import numpy as np def read_single_field_binary(filename, grid_coordinates): # Simulated function to read binary data from a file # Replace this with actual implementation for reading binary data # For the purpose of this problem, a placeholder return is provided data = np.random.rand(10, 10,...
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0 and the Server Side Public License, v 1; you may not use this file except * in compliance with, at your election, the Elastic License 2.0 or the Server...
<gh_stars>0 package com.breakersoft.plow.test.thrift.dao; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.List; import java.util.UUID; import javax.annotation.Resource; import org.junit.Test; import org.springframework.test.annotation.Rollback; import com.br...
<filename>Sample app/Reduxion-iOS sample app/Reduxion_iOS.h // // Reduxion_iOS.h // Reduxion-iOS // // Created by <NAME> on 8/25/18. // Copyright © 2018 <NAME>. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for Reduxion_iOS. FOUNDATION_EXPORT double Reduxion_iOSVersionNumber; //! Pro...
<reponame>syrflover/iterator-helper<gh_stars>1-10 import { assertEquals } from 'https://deno.land/std/testing/asserts.ts'; import { iterator } from '../mod.ts'; Deno.test(`flatMap() [\`it's Sunny in\`, '', 'California'] split(' ')`, async () => { const a = iterator([`it's Sunny in`, '', 'California']); const...
from pytest import fixture from selenium.webdriver.common.keys import Keys from mysign_app.models import Company, User from mysign_app.tests.frontend.helpers import authenticate_selenium @fixture(autouse=True) def user_setup(selenium, live_server): Company.objects.create(name="Mindhash", email="<EMAIL>") Com...
//go:build go1.7 // +build go1.7 package ini import ( "reflect" "testing" ) func TestSkipper(t *testing.T) { idTok, _, _ := newLitToken([]rune("id")) nlTok := newToken(TokenNL, []rune("\n"), NoneType) cases := []struct { name string Fn func(s *skipper) param Tok...
<gh_stars>1-10 """:mod:`crawler.serializers` --- Serializer for crawler data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import datetime def payload_serializer(*, type: str, id: int = None, link: str, count: int, title: str) -> dict: utc_now = datetime.datetime.now(...
<filename>src/add-ons/kernel/bus_managers/virtio/VirtioQueue.cpp /* * Copyright 2013, 2018, <NAME>, <EMAIL>. * Distributed under the terms of the MIT License. */ #include "VirtioPrivate.h" static inline uint32 round_to_pagesize(uint32 size) { return (size + B_PAGE_SIZE - 1) & ~(B_PAGE_SIZE - 1); } area_id all...
const { adapt } = require('../adapters/express-router-adapter') const CalculateRouterComposer = require('../composers/calculate-call-router-composer') module.exports = router => { router.post('/calculate-call', adapt(CalculateRouterComposer.compose())) }
/* Copyright (c) 2005-2021 Intel Corporation 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 la...
<reponame>lerages/anarchy-source package org.rs2server.rs2.model.container; import org.rs2server.rs2.model.container.Equipment.EquipmentType; import org.rs2server.rs2.model.player.Player; public class Dueling { public int duelStatus = 0; public int duelSpaceReq; /** * The is where we keep all our rule consta...
<reponame>tsmvision/spring-security-examples package com.example.corespringsecurity.repository; import com.example.corespringsecurity.domain.entity.AccessIp; import org.springframework.data.jpa.repository.JpaRepository; public interface AccessIpRepository extends JpaRepository<AccessIp, Long> { }
#!/bin/bash # Script to deploy VPC resources for an IBM Cloud solution tutorial # # (C) 2019 IBM # # Written by Henrik Loeser, hloeser@de.ibm.com # usage: $0 region ssh-key-name prefix-string [ naming-prefix [ resource-output-file [ user-data-file [ image-name ] ] ] ] # usage: $0 us-south-1 pfq testx default resource...
#!/usr/bin/env bash sudo apt update && sudo apt install curl gnupg2 lsb-release -y sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://pa...
import { Injectable } from '@angular/core'; import {environment} from '../../environments/environment'; import {LoginModel} from '../models/loginModel'; import {HttpClient} from '@angular/common/http'; import {TokenModel} from '../models/tokenModel'; import {Observable} from 'rxjs'; import {SingleResponseModel} from '....
import type { quat2 } from 'gl-matrix' class DualQuatUtil{ /** Used to get data from a flat buffer of matrices */ static fromBuf( out: quat2, ary : Array<number> | Float32Array, idx: number ) : quat2 { out[ 0 ] = ary[ idx ]; out[ 1 ] = ary[ idx + 1 ]; out[ 2 ] = ary[ idx + 2 ];...
#!/bin/bash set -e set -x # On osx we need to bring our own Python. # See: https://github.com/travis-ci/travis-ci/issues/2312 if [[ "$(Agent.OS)" == "Darwin" ]]; then # We use the official python.org installers to make sure our wheels are # going to be as widely compatible as possible PYTHON_PKG_36="http...
export { LayoutService } from './layout.service'; export { AnalyticsService } from './analytics.service'; export { PlayerService } from './player.service'; export { StateService } from './state.service'; export { SeoService } from './seo.service';
def unique_names(names): unique_list = [] for i in names: if i not in unique_list: unique_list.append(i) return unique_list
<reponame>Commutyble/thingmagic-client<filename>c/src/api/tmr_utils.h #ifndef _TMR_UTILS_H #define _TMR_UTILS_H /** * @file tmr_utils.h * @brief Mercury API - generic utilities * @author <NAME> * @date 12/1/2009 */ /* * Copyright (c) 2009 ThingMagic, Inc. * * Permission is hereby granted, free of charge, ...
package org.rs2server.rs2.content; import org.rs2server.rs2.model.Animation; import org.rs2server.rs2.model.GameObject; import org.rs2server.rs2.model.GroundItem; import org.rs2server.rs2.model.Item; import org.rs2server.rs2.model.World; import org.rs2server.rs2.model.player.Player; import org.rs2server.rs2.tickable.T...
<reponame>lananh265/social-network<filename>node_modules/react-icons-kit/icomoon/newspaper.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.newspaper = void 0; var newspaper = { "viewBox": "0 0 16 16", "children": [{ "name": "path", "attribs": { "fill": "#0000...
// Test1SampleQueue.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <string> #include <iostream> #include "Queue.h" #include "Customer.h" using namespace std; void registerCustomer(Queue& serviceQueue, int& queueNumber) { //to be implemented } void nextCustomer(Q...
<gh_stars>1-10 'use strict'; module.exports = { $schema: 'https://json.schemastore.org/eslintrc', rules: { 'no-underscore-dangle': 0, }, extends: ['@strapi-community', 'prettier'], };
<gh_stars>1-10 import { Helper } from "./helper"; export class Firewall { helper: any; constructor(config) { this.helper = new Helper(config); } async list(node, qemu) { const data = {}; const url = '/nodes/' + node + '/qemu/' + qemu + '/firewall'; return awa...
# Solution # The solution involves creating a new class called AlphaCoefficient that inherits from the FourierCoefficient class. from ._coefficient import FourierCoefficient class AlphaCoefficient(FourierCoefficient): pass