text
stringlengths
1
1.05M
<filename>src/app/services/chrome-storage.service.ts import { Injectable } from '@angular/core'; import { watch } from 'fs'; @Injectable({ providedIn: 'root', }) export class ChromeStorageService { constructor() {} chromeStorageSwitch = true; updateWatchHistory(petIdList, petsFromSite) { if (this.chromeS...
/** * Write a description of FourthRatings here. * * @author (your name) * @version (a version number or a date) */ import edu.duke.*; import java.util.*; import org.apache.commons.csv.*; public class FourthRatings { private double getAverageByID(String id, int minimalRaters){ ...
#!/bin/bash cd /twio/scripts/ import_env(){ # Import .env vars -> Carries over to docker-compose.yml FILE=./.env if [ -f $FILE ]; then echo "Loading variables from $FILE" set -o allexport source $FILE set +o allexport else echo "Please setup a .env file according to the README.md" exi...
/** * Copyright © 2014-2021 The SiteWhere 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...
#!/bin/bash # # Kubernetes Join Worker # SERVER_IP=$(sudo cat /var/lib/cloud/instance/datasource | cut -d: -f3 | cut -d/ -f3) MASTER=$(hostname | cut -d- -f 3,4) # Master vorhanden? if [ "${SERVER_IP}" != "" ] && [ "${MASTER}" != "" ] then # Master statt Worker Node mounten sudo umount /home/ubuntu/data ...
<reponame>Krzychu81/knex-expo<filename>lib/helpers.js 'use strict'; exports.__esModule = true; var _isTypedArray2 = require('lodash/isTypedArray'); var _isTypedArray3 = _interopRequireDefault(_isTypedArray2); var _isArray2 = require('lodash/isArray'); var _isArray3 = _interopRequireDefault(_isArray2); var _isPlai...
import tensorflow as tf from tensorflow.keras.datasets import mnist # Load the data (X_train, y_train), (X_test, y_test) = mnist.load_data() # Reshape the data X_train = X_train.reshape(60000, 28, 28, 1) X_test = X_test.reshape(10000, 28, 28, 1) # Normalize the data X_train = X_train / 255.0 X_test = X_test / 255.0 ...
import React from 'react'; import {View, Text, StyleSheet, Alert, Platform} from 'react-native'; import { Constants, Location, Permissions } from 'expo'; export default class App extends React.Component { constructor(props) { super(props); this.state = { location: null }; } componentDidMount() { if (Platform.OS...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_view_column_twotone = void 0; var ic_view_column_twotone = { "viewBox": "0 0 24 24", "children": [{ "name": "path", "attribs": { "d": "M0 0h24v24H0V0z", "fill": "none" }, "children": [] }, { ...
<reponame>pk762/epizza<gh_stars>0 package epizza.order.checkout; import com.google.common.base.MoreObjects; import javax.money.MonetaryAmount; import javax.persistence.Access; import javax.persistence.AccessType; import javax.persistence.Basic; import javax.persistence.Embeddable; import javax.persistence.FetchType; ...
import React from 'react'; import { Menu, MenuContent, MenuList, MenuItem, Divider, DrilldownMenu } from '@patternfly/react-core'; import StorageDomainIcon from '@patternfly/react-icons/dist/esm/icons/storage-domain-icon'; import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon'; import Laye...
module Gitrob module Github class Repository attr_reader :owner, :name, :http_client def initialize(owner, name, http_client) @owner, @name, @http_client = owner, name, http_client end def contents if !@contents @contents = [] response = JSON.parse(htt...
#!/bin/sh oc_installed=false kubectl_installed=false platform="kubectl" secrets="hidden" oc &>/dev/null if [ $? -eq 0 ]; then oc_installed=true platform="oc" fi kubectl &>/dev/null if [ $? -eq 0 ]; then # we will use kubectl with priority (?) kubectl_installed=true platform="kubectl" fi if [[ $oc_installed = ...
<gh_stars>1-10 package gameClient.util; import api.geo_location; /** * This class represents a 2D Range, composed from two 1D Ranges. */ public class Range2D { private Range _y_range; private Range _x_range; public Range2D(Range x, Range y) { _x_range = new Range(x); _y_range = new Range(y); } public Rang...
SELECT DISTINCT t1.team_name, t2.team_name FROM teams t1 INNER JOIN teams t2 ON t1.school = t2.school WHERE t1.member <> t2.member GROUP BY t1.team_name, t2.team_name HAVING COUNT(*) > 4;
import java.io.File; import net.runelite.mapping.Export; import net.runelite.mapping.Implements; import net.runelite.mapping.ObfuscatedGetter; import net.runelite.mapping.ObfuscatedName; import net.runelite.mapping.ObfuscatedSignature; @ObfuscatedName("js") @Implements("InvDefinition") public class InvDefinition exten...
// Copyright (c) 2021 rookie-ninja // // Use of this source code is governed by an Apache-style // license that can be found in the LICENSE file. // Package rkmidmeta is a middleware for metadata package rkmidmeta import ( "fmt" "github.com/rookie-ninja/rk-common/common" "github.com/rookie-ninja/rk-entry/entry" "...
#!/bin/bash docker rm -f bean || true docker rm -f chat-app || true
import Vue from 'vue' import options, { i18n } from '@/config' import messages from '@/messages.json' const config = options(Vue) /** * Tests internationalization */ describe('I18N', () => { it('is loaded', () => { expect(i18n).to.be.a('object') expect(i18n.t).to.be.a('function') }) i...
def handle_agent_request(player, agent, agent_id): if player.name == 'Charlie' and not agent.in_safehouse() and agent.player.name == 'Alpha': return json.jsonify( id=agent.id, x=agent.x, y=agent.y, packages=len(agent.packages), ) elif not player.na...
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for DSA-2453-2 # # Security announcement date: 2012-04-19 00:00:00 UTC # Script generation date: 2017-01-01 21:06:23 UTC # # Operating System: Debian 6 (Squeeze) # Architecture: x86_64 # # Vulnerable packages fix on version: # - gajim:0.13.4-3+squeeze3 # # Last v...
<gh_stars>10-100 import { BigNumber, providers } from 'ethers'; import BaseService from '../commons/BaseService'; import { ERC20Validator } from '../commons/validators/methodValidators'; import { isEthAddress } from '../commons/validators/paramValidators'; import { IERC202612 } from './typechain/IERC202612'; import { I...
#!/bin/sh PATH=$PATH:/opt/bin SCRIPT_PATH=$(realpath "$0") SCRIPT_HOME=$(dirname "$SCRIPT_PATH") CACHE_FILE=$SCRIPT_HOME/.project-cache if [[ -f "$CACHE_FILE" ]] && [[ "$(find $CACHE_FILE -mmin +1440 | wc -l)" == "0" ]]; then #use the cache CHOSEN=$(cat $CACHE_FILE | rofi -dmenu) else #override the cache CHO...
<gh_stars>10-100 /* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, sof...
from pathlib import Path from django.core.management.base import BaseCommand, CommandError from hill.data.apt.apt_client import AptClient from hill.data.common.http_client import HttpClient from hill.data.common.local_cache import LocalCache, LocalCacheTime from hill.data.common.logger import Logger from hill.data.pg...
<reponame>ArchieMedes/sistop-2021-1<gh_stars>1-10 # -*- encoding: Latin-1 """ Created on Thu Jan 8 15:37:48 2021 @author: Jonathan """ import os.path # Se utiliza para asignar rutas en el sistema from math import ceil#Se utiliza ceil para asignar el valor del cluster #Cuerpo del programa if os.path.exists("fiuna...
import { AppRegistry } from 'react-native'; import App from './App'; AppRegistry.registerComponent('BReactNative', () => App);
<filename>docs/search/all_e.js var searchData= [ ['searchagent',['SearchAgent',['../classsearch_agents_1_1_search_agent.html',1,'searchAgents']]], ['searchproblem',['SearchProblem',['../classsearch_1_1_search_problem.html',1,'search']]], ['sortedkeys',['sortedKeys',['../classutil_1_1_counter.html#a8e32d106f34cb7c...
#!/bin/bash #SBATCH -p amd_256 #SBATCH -N 1 #SBATCH -n 64 #SBATCH -o run.log #SBATCH -e err.log echo working directory: `pwd` source /public1/soft/openfoam/OpenFOAM7-fgl/OpenFOAM-7/etc/rebashrc . $WM_PROJECT_USER_DIR/utilities/scripts/postProcessFunctions blockMesh # renumberMesh -overwrite -noFields # not update...
#!/bin/bash # the script uses COPASISE to import an SBML file # and reexport it COPASISE=$1 FILENAME=$2 OUTFILE=$3 LOGFILE=$4 if [ -e $COPASISE ];then if [ -e $FILENAME ];then $COPASISE --importSBML ${FILENAME} --oldExportSBML ${OUTFILE} 2>&1 | sed '1,4d' > ${LOGFILE} fi fi
import time from django.conf import settings from drawquest.tests.tests_helpers import (CanvasTestCase, create_content, create_user, create_group, create_comment, create_staff, create_quest, create_quest_comment, action_recipients) ...
import pandas as pd from sklearn.linear_model import LinearRegression from sklearn.preprocessing import StandardScaler # load the data for the Wikipedia page page_data = pd.read_csv('page_data.csv') # extract the features X = page_data[['edits', 'views']] # set the target y = page_data['popularity'] # use the Linea...
require('./bootstrap'); window.Vue = require('vue'); import Vuex from 'vuex' import VueRouter from 'vue-router' import Vuetify from 'vuetify' window.iziToast = require('iziToast'); Vue.use(Vuex) Vue.use(Vuetify) Vue.use(VueRouter); Vue.component('example-component', require('./components/ExampleComponent.vue').de...
#!/usr/bin/env bash set -eo pipefail downloadBundlesListedInFile() { bucket=$1 downloads_file=$2 awk -v bucket="$bucket" '{print bucket "/bundle-" $1 ".tgz"}' < "$downloads_file" \ | gsutil -m cp -I "$bundles_dir" || true } getNumFailedDownloads() { find "$bundles_dir"/*.gstmp 2> /dev/null |...
#!/bin/tcsh setenv CI_SEP - setenv CI_BUILD_TYPE release setenv CI_BUILD_SUFFIX build setenv CI_INSTALL_SUFFIX install setenv CI_MACHINE_ARCH x86 setenv CI_COMPILER_FAMILY intel setenv CI_COMPILER_VER 19.0.5 setenv CI_COMPILER_NAME $CI_COMPILER_FAMILY$CI_SEP$CI_COMPILER_VER$CI_SEP setenv CI_CUDA_PREFIX cuda setenv CI_C...
const DrawCard = require('../../../drawcard.js'); class ADragonIsNoSlave extends DrawCard { setupCardAbilities(ability) { this.action({ title: 'Give -2 STR', phase: 'challenge', target: { activePromptTitle: 'Select a character', cardCondit...
<reponame>lterrac/system-autoscaler package main import ( "flag" "time" "github.com/kubernetes-sigs/custom-metrics-apiserver/pkg/dynamicmapper" informers2 "github.com/lterrac/system-autoscaler/pkg/informers" sainformers "github.com/lterrac/system-autoscaler/pkg/generated/informers/externalversions" cm "github...
<reponame>sturmundbraem/kursausschreibung<gh_stars>1-10 import Component from '@ember/component'; import { observer } from '@ember/object'; import { getString } from 'kursausschreibung/framework/translate'; const statuses = { green: { tooltip: getString('greenLamp'), className: 'lamp-green', icon: 'pencil' }, char...
from typing import List, Dict def count_license_terms(file_path: str, terms: List[str]) -> Dict[str, int]: term_counts = {term.lower(): 0 for term in terms} # Initialize counts for each term with open(file_path, 'r') as file: file_content = file.read().lower() # Read file content and convert to lower...
package com.pickth.comepennyrenewal.util; /** * Created by Kim on 2016-11-11. */ public class StaticUrl { public static final String BASE_URL = "http://pickth.com"; public static final String FILE_URL = "https://s3.ap-northeast-2.amazonaws.com/comepenny"; }
package com.qtimes.pavilion.base.layout; /** * Created by liutao on 2017/2/25. */ public interface BaseView { /** * 当自定义view实现此方法时,调用改方法释放相应的资源 * 通常在BaseActivity或者baseFragment中释放 * * */ void release(); /** * 判断资源释放已经释放,防止重复调用释放方法 * 调用release之前需要先调用此方法进行判断 * @retu...
<reponame>melkishengue/cpachecker public class FunctionCall_true_assert { public static void main(String[] args) { int n1 = 1; int n2 = 1; int n3 = 2; if (n1 == n2) { if (n1 != n3) { n3 = 1; des(); } if (n1 == n3) { des(); n1 = n1 + n2 + n3; // n...
package set summary "Lightning memory-mapped database: key-value data store" package set webpage "https://symas.com/lmdb" package set src.url "https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.28/openldap-LMDB_0.9.28.tar.bz2" package set src.sum "54f4a3a927793db950288e9254c0dfe35afc75af12cd92b8aaae0d1e99018...
#!/usr/bin/env bash # server_functions.bash # Primarily intended to be sourced by other scripts # Provides functions to use for communicating with the game server # Include guard [[ -n "${MINECRAFT_SERVER_COMMON_FUNCTIONS}" ]] && return MINECRAFT_SERVER_COMMON_FUNCTIONS=true # shellcheck source=./common_vars.bash . "...
#!/usr/bin/env bash # # Bump latest version to # - _sass/jekyll-theme-chirpy.scss # - assets/js/_commons/_copyright.js # - assets/js/dist/*.js # - jekyll-theme-chirpy.gemspec # # Required: gulp set -eu ASSETS=( "_sass/jekyll-theme-chirpy.scss" "assets/js/.copyright" ) GEM_SPEC="jekyll-theme-chirpy.gemspe...
from typing import List from html.parser import HTMLParser class HTMLTextExtractor(HTMLParser): def __init__(self): super().__init__() self.text_content = [] def handle_data(self, data): self.text_content.append(data.strip()) def extract_text_from_html(html: str) -> List[s...
#!/bin/sh -e DIR=$PWD config_enable () { ret=$(./scripts/config --state ${config}) if [ ! "x${ret}" = "xy" ] ; then echo "Setting: ${config}=y" ./scripts/config --enable ${config} fi } config_disable () { ret=$(./scripts/config --state ${config}) if [ ! "x${ret}" = "xn" ] ; then echo "Setting: ${config}=n...
package kvraft import ( "6.824/labgob" "6.824/labrpc" "6.824/raft" "bytes" "fmt" "log" "sync" "sync/atomic" "time" ) const ( OpGet = "Get" OpPut = "Put" OpAppend = "Append" REQUEST_TIMEOUT = time.Duration(time.Millisecond * 500) ) type Op struct { // Your definitions here. // Field names must st...
import React from "react" import { storiesOf } from "@storybook/react" import Dialog, { DialogHeader, DialogBody, DialogActions } from "../src" storiesOf("Dialog", module).add("Basic", () => <Dialog visible={true}> <DialogHeader>Dialog Header</DialogHeader> <DialogBody> <p>lorem ipsum...</p> </Dia...
The network should be a Recurrent Neural Network (RNN) such as a Long Short-Term Memory (LSTM) network. This type of network is designed to process a sequence of data points, which can be used to predict the next character in a character sequence. The network should have an input layer, an output layer, and at least o...
class EventSchedule24 { events: Map<string, { startTime: Date; endTime: Date }>; constructor() { this.events = new Map(); } addEvent(id: string, startTime: Date, endTime: Date): void { if (this.hasConflictingEvents(id)) { throw new Error(`Event with ID ${id} conflicts with existing events`); ...
<reponame>l0stbitz/cliently-symfony //User Data var UserData = null; var accounts; var current_account_index = null; var current_account_id = null; var workspaces; var current_workspace_index = null; var current_workspace_id = null; var current_account_workspace_id = null; var pipelines; var current_pipeline_index ...
<filename>spark/core/src/test/scala/org/elasticsearch/spark/cfg/SparkConfigTest.scala /* * Licensed to Elasticsearch under one or more contributor * license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright * ownership. Elasticsearch licenses this file to yo...
<reponame>RotaNova/rotanova-UI<filename>src/api/noticeManage/systemMessages.js import Axios from '../http' export default { getAnnouncementItemPage: params => Axios.post(`/v1/sysAnnouncementSys/getAnnouncementItemPage`, params), //获取系统接口权限列表 updateAnnouncement: params => Axios.post(`/v1/sysAnnouncementSys/upd...
#!/usr/bin/env bash set -e TARGET_IP=$(kubectl get pod -n kube-system -o wide| grep kube-controller | head -n 1 | awk '{print $6}') sed "s/TARGETIP/$TARGET_IP/g" deploy/deployment.yaml > deploy/deployment.yamlg mv deploy/deployment.yamlg deploy/deployment.yaml kubectl apply -f deploy/ while [[ $(kubectl get pods ...
const api = { getStadions(callback) { $.get('/logic/api/v1/stadion', (stadions, result) => { if (result === 'success') { callback(stadions); } else { console.log('ERROR: fetch stadions:'); } }); }, getStadionTimes(stadionId, callback) { $.get(`/logic/api/v1/stadion/$...
#!/bin/bash folder=/home/roott/watDivQueries # initial id k=$1 # number of vms; step between local ids x=$2 # technique h=${3} s=${h}-client-eval a=$4 # number of clients per vm n=$5 c=$6 t=$7 e="http://172.19.2.112:8890/sparql?default-graph-uri=http%3A%2F%2Fwatdiv10M&query=" m=$8 o=$9 f=${10} cd /home/roott/Client.j...
def palindrome_detect(arr): '''This function will detect the presence of a palindrome in an array.''' palindromes = set() for i in range(len(arr)): for j in range(i+1, len(arr)): word = arr[i:j+1] word_reverse = word[::-1] if word == word_reverse: ...
CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT NOT NULL, email TEXT NOT NULL, age INTEGER NOT NULL, gender TEXT NOT NULL, location TEXT NOT NULL, preferences TEXT );
float total = 0.0f; float average; foreach (float number in List) { total += number; } average = total / List.Length; return average;
public static String reverseWords(String sentence) { String[] words = sentence.split(" "); String reversedString = ""; for (int i = words.length - 1; i >= 0; i--) { reversedString += words[i] + " "; } return reversedString; } String originalString = "This is a sentence."; String rever...
package com.nils.engine.main; import java.awt.Font; import java.awt.FontFormatException; import java.awt.GraphicsEnvironment; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.BufferedInputStream; import java.io.File; import jav...
# # Color grep results # GREP_OPTIONS="--color=auto" # avoid VCS folders (if the necessary grep flags are available) grep-flag-available() { echo | grep $1 "" >/dev/null 2>&1 } if grep-flag-available --exclude-dir=.cvs; then for PATTERN in .cvs .git .hg .svn; do GREP_OPTIONS+=" --exclude-dir=$PATTERN"...
<reponame>p2b2/p2b2-webapp<filename>src/app/ranking/ranking.component.ts import { Component, OnInit } from '@angular/core'; import {EthereumAnalysisService} from "../../services/ethereum-analysis.service"; @Component({ selector: 'app-ranking', templateUrl: './ranking.component.html', styleUrls: ['./ranking.compo...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.merge = void 0; var merge = { "viewBox": "0 0 20 20", "children": [{ "name": "path", "attribs": { "d": "M17.8896484,17.7070312L16.8916016,20C13.7548828,18.6341553,11.3964844,16.8476562,10,14.7250977\r\n\tC8.6035156...
#!/bin/bash # # Copyright (c) 2020 The Orbit Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Fail on any error. set -euo pipefail readonly REPO_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../../" >/dev/null 2>&1 && pwd )" reado...
import React from 'react'; import { NavLink } from "react-router-dom"; export class NavBar extends React.Component { render() { return ( <nav> <div className="title">Quizzer</div> <NavLink exact to="/"> Home </NavLink> <NavLink to="/help">Help</NavLink> </nav...
#!/usr/bin/env bash export RENDERER_HOME=$PWD mkdir -p ${RENDERER_HOME}/tmp pushd $(mktemp -p ${RENDERER_HOME}/tmp -d) export TEMP_DIR=$PWD mkdir -p ./input mkdir -p ./output/html pushd ./input git clone https://github.com/DSchau/blog.git ./main touch layout.json popd docker run --rm \ -ti \ ...
<gh_stars>0 /* _____ __________.___ _____ ______________________ _____ _____ / _ \\______ \ | / _ \ \__ ___/\_ _____/ / _ \ / \ / /_\ \| _/ |/ /_\ \ | | | __)_ / /_\ \ / \ / \ ...
package subscriber import ( "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/sqs" "github.com/aws/aws-sdk-go/aws/credentials" "encoding/json" "github.com/revel/revel" "github.com/jrallison/go-workers" ) func SqsSubscribe(){ sess := session.New(&aws.Con...
<gh_stars>1-10 package fwcd.fructose.time; import java.time.Duration; import java.time.LocalTime; import fwcd.fructose.util.CompareUtils; /** * A fixed, half-open interval between two {@link LocalTime}s. */ public class LocalTimeInterval { private final LocalTime startInclusive; private final LocalTime endExclus...
class TodoAdapter(private val list: ArrayList<Todo>) : RecyclerView.Adapter<TodoAdapter.TodoViewHolder>() { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): TodoViewHolder { val itemView = LayoutInflater.from(parent.context).inflate(R.layout.todo_item, parent, false) return TodoVi...
<filename>opentaps/purchasing/src/org/opentaps/purchasing/mrp/OpentapsProposedOrder.java /* * 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,...
<html> <head> <title>Calculator</title> <style> .calculator { width: 250px; margin: 0 auto; } .calculator input { font-size: 1.3rem; text-align: right; } .calculator button { font-size: 1.3rem; } </style> </head> <body> <div class="calculator"> <input ty...
#!/usr/bin/env bash set -eux apt-get purge -qq '^mysql*' '^libmysql*' rm -fr /etc/mysql rm -fr /var/lib/mysql apt-get update -qq apt-get install -qq mysql-server-5.5 mysql-client-core-5.5 mysql-client-5.5 libmysqlclient-dev
from typing import Any, Union import sys if sys.version_info < (3, 8): from typing_extensions import Protocol else: from typing import Protocol class WithAsyncWrite(Protocol): async def write(self, __b: str) -> Any: ... class WithAsyncRead(Protocol): async def read(self, __size: int) -> Union[str, ...
<filename>common/test/tb_utils.cpp // tb_utils.cpp // Common utilities for layer testbenches #include "global_defines.h" #include <math.h> // Initialize input data to random values between 0 and 1 void gen_random_inputs(data_t *ifmaps, int len) { for (int i = 0; i < len; ++i) { ifmaps[i] = (data_t)((double)ra...
<filename>learn/src/main/java/org/ruogu/learn/lang/exception/ExceptionExample.java package org.ruogu.learn.lang.exception; /** * ExceptionExample * * @author xueyintao 2016年2月5日 下午7:53:43 */ public class ExceptionExample { /** * @param args */ public static void main(String[] args) { Throwable throwAble ...
#!/bin/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 # "License");...
// SPDX-License-Identifier: Apache-2.0 // YAPION // Copyright (C) 2019,2020 yoyosource package yapion.packet; import yapion.annotations.deserialize.YAPIONLoadExclude; import yapion.annotations.serialize.YAPIONSaveExclude; import java.util.function.Consumer; @YAPIONLoadExclude(context = "*") @YAPIONSaveExclude(conte...
# Reload function function rfunc() { if [ $# -ne 1 ]; then echo "usage: $0 <function name>" 1>&2 return 1 fi unfunction $1 >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "$1 is not defined" 1>&2 return 1 fi autoload +X $1 return 0 }
<filename>devilry/devilry_student/tests/test_dashboard/test_allperiods.py from datetime import timedelta from django import test from django.conf import settings from cradmin_legacy import cradmin_testhelpers from cradmin_legacy.crinstance import reverse_cradmin_url from cradmin_legacy import crapp from model_bakery...
int containsDuplicates(int arr[], int n, int k) { unordered_set<int> hash; for (int i = 0; i < n; i++) { if (hash.find(arr[i]) != hash.end()) return 1; hash.insert(arr[i]); if (i >= k) hash.erase(arr[i - k]); } return 0; }
#!/bin/bash mkdir -p .build/src mkdir -p .build/tarballs if [[ $(uname) == Darwin ]]; then DOWNLOADER="curl -SL" DOWNLOADER_INSECURE=${DOWNLOADER}" --insecure" DOWNLOADER_OUT="-C - -o" else DOWNLOADER="wget -c" DOWNLOADER_INSECURE=${DOWNLOADER}" --no-check-certificate" DOWNLOADER_OUT="-O" fi mkdir -p ${S...
gold_amr=$1 hyp_amr=$2 python eval_smatch.py $gold_amr $hyp_amr
from .sorting_algorithms import * class Policy: context = None def __init__(self, context): self.context = context def configure(self): if len(self.context.numbers) > 10: print('More than 10 numbers, choosing merge sort!') self.context.sorting_algorithm = MergeSor...
require 'spec_helper' describe Travis::Services::FindBranches do include Support::ActiveRecord let(:repo) { Factory(:repository, :owner_name => 'travis-ci', :name => 'travis-core') } let!(:build) { Factory(:build, :repository => repo, :state => :finished) } let(:service) { described_class.new(stub('user')...
import React from 'react'; import axios from 'axios'; class App extends React.Component { constructor(props) { super(props); this.state = { data: [], sortBy: 'name', reverseOrder: false, }; } componentDidMount() { axios.get('https://api.example.com/data') .then((response) => { this.setState({ data: resp...
words = ["apple", "pie", "is", "delicious"] for word in words: print(len(word))
<reponame>joergdev/MoSy-backend-standalone package de.joergdev.mosy.backend.standalone.pool; /** * Klasse fuer ein Object im Pool. * * @author <NAME> * * @param <T> */ class PoolObject<T> { //eigentliches object private T obj; //Flag ob freigegeben private boolean locked; //timeStamp seit wa...
#!/usr/bin/env bash pkill -f runserver sudo lsof -t -i tcp:8000 | xargs kill -9
package com.gank.gankly.bean; /** * Create by LingYan on 2016-11-21 * Email:<EMAIL> */ public class JianDanBean { private String url; private String title; private String type; private String imgUrl; public JianDanBean(String url, String title, String type, String imgUrl) { this.url = ...
#!/bin/bash #============================================================================= # Copyright 2014 Istituto Italiano di Tecnologia (IIT) # Authors: Daniele E. Domenichelli <daniele.domenichelli@iit.it> # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt ...
var _parser_flatbuffers_fixture_8hpp = [ [ "ParserFlatbuffersFixture", "struct_parser_flatbuffers_fixture.xhtml", "struct_parser_flatbuffers_fixture" ], [ "TensorRawPtr", "_parser_flatbuffers_fixture_8hpp.xhtml#ac3486e6c1a291aa67efd8b280ffb83cc", null ] ];
<reponame>ikim1991/my-golf-tracker export const checkInputFields = () => { if(document.querySelector("#numOfHoles").value === ""){ document.querySelector("#numOfHoles").classList.add("border", "border-danger") } else{ document.querySelector("#numOfHoles").classList.remove("border", "border-danger") } f...
/* * Copyright 2016-present Open Networking Foundation * * 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 appli...
#!/bin/bash # # IHMTerminal.sh # Programa para ler informações de pontos analógicos e digitais e também efetuar comandos no SAGE # # Igor Siqueira Stevanato <igorstevanato@gmail.com> # 03/08/2019 # # Versão 0.1: lê informações de pontos digitais # # #Mensagem de ajuda # while getopts ac:f: OPCAO; do c...
#!/bin/sh # # Copyright (C) 2004, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2000, 2001 Internet Software Consortium. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and t...
import type { ListrTask, ListrRendererFactory } from 'listr2'; import { LockData } from '@@install/utils/lock'; import type { VersionInfo } from '@request/request-npm'; interface Context { resolvedDeps: VersionInfo[]; diff: VersionInfo[]; lockData: LockData; } declare const diffLocalFiles: <T extends Contex...
"use strict"; exports.__esModule = true; exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _propTypes = _interopRequireDefault(require("prop-types")); var _classnames = _interopRequireDefault(require("classnames")); var _dates = _interopRequireDefault(require("./util/dates")); f...