text
stringlengths
1
1.05M
<gh_stars>0 package main import ( "fmt" "log" "os" "courseScheduling/dev/dummy" "courseScheduling/models" "courseScheduling/scheduling" ) var ( courses map[string]*models.Course instructs map[int]*models.Instruct clazzes map[string]*models.Clazz ) // dummy data includes only the primary key, the functi...
import football from './football/api' export default { football, }
<reponame>fuergaosi233/uptime-monitor export declare const tempFixes: () => Promise<void>;
def palindrome_finder(sentence): words = sentence.split(' ') palindrome_words = [] for word in words: if word == word[::-1]: palindrome_words.append(word) return palindrome_words
#!/usr/bin/env bash # Get project root PROJECT_ROOT_DIR=$(git rev-parse --show-toplevel) # Should have no "latest" tags grep -R "tag: latest" "$PROJECT_ROOT_DIR"/infra/charts || true COUNT=$(grep -R "tag: latest" "$PROJECT_ROOT_DIR"/infra/charts | wc -l) if [ "$COUNT" -gt 0 ]; then echo 'Found more than one instan...
<reponame>wmn7/Traffic-Classification<gh_stars>1-10 ''' @Author: <NAME> @Date: 2021-01-07 15:04:21 @Description: 训练模型的整个流程, 单个模型的训练 @LastEditTime: 2021-03-25 12:04:33 ''' import os import torch from torch import nn, optim from TrafficFlowClassification.TrafficLog.setLog import logger from TrafficFlowClassification.ut...
#!/bin/sh set -e UNSIGNED=$1 SIGNATURE=$2 ARCH=x86_64 ROOTDIR=dist BUNDLE=${ROOTDIR}/mire-Qt.app TEMPDIR=signed.temp OUTDIR=signed-app if [ -z "$UNSIGNED" ]; then echo "usage: $0 <unsigned app> <signature>" exit 1 fi if [ -z "$SIGNATURE" ]; then echo "usage: $0 <unsigned app> <signature>" exit 1 fi rm -rf $...
# Implement quicksort to sort the array in ascending order def quicksort(arr): if len(arr) <= 1: return arr pivot = arr[0] left = [x for x in arr[1:] if x < pivot] right = [x for x in arr[1:] if x >= pivot] return quicksort(left) + [pivot] + quicksort(right) # Test array arr = [3, 2, 7...
module.exports = { devServer: { // 设置主机地址 host: "0.0.0.0", // 设置默认端口 port: 8080, // 设置代理 proxy: { "/api": { // 目标 API 地址 target: "http://127.0.0.1:80/", // 如果要代理 websockets ws: true, // 将主机标头的原点更改为目标URL changeOrigin: false } } }...
#!/bin/bash # Run_AMP24_Dhrystone.sh # Check Environment if [ -z ${IMPERAS_HOME} ]; then echo "IMPERAS_HOME not set. Please check environment setup." exit fi ${IMPERAS_ISS} --verbose --output imperas.log \ --program ../../../Applications/dhrystone_microblaze/dhrystone_microblaze.MICROBLAZE-O2-g.elf \ --pr...
#!/bin/bash set -ex buildifier -showlog -mode=check $(find . -type f \( -name 'BUILD' -or -name 'WORKSPACE' -or -wholename '.*bazel' -or -wholename '.*bzl' \) -print ) NUM_CPU=$(getconf _NPROCESSORS_ONLN) gometalinter --concurrency=${NUM_CPU} --enable-gc --deadline=300s --disable-all\ --enable=aligncheck\ --enab...
/* * Copyright © 2020 Lisk Foundation * * See the LICENSE file at the top-level directory of this distribution * for licensing information. * * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation, * no part of this software, including this file, may be copied, modified, * propagated...
<gh_stars>0 #ifndef TEST_CLEAR_COLOUR_H #define TEST_CLEAR_COLOUR_H #include "test.h" void test_clear_colour_setup (struct test_data *t) { unsigned int i = 0; t->colour[i++] = 0.2f; t->colour[i++] = 0.3f; t->colour[i++] = 0.8f; t->colour[i++] = 1.0f; } void test_clear_colour_update (struct t...
#!/bin/sh # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. set -e ROOTDIR=dist BUNDLE="${ROOTDIR}/BitcoinGenghis-Qt.app" CODESIGN=codesign TEMPDIR=sign.temp TEMPLIST=${TEMPDIR}...
#!/bin/bash #PBS -l walltime=00:30:00 #PBS -l nodes=1:ppn=4 #PBS -m ae -M fb1n15@soton.ac.uk #PBS -o /home/fb1n15/simulation-resource-allocation-multi-agent-RL/output_log_of_tasks/ #PBS -e /home/fb1n15/simulation-resource-allocation-multi-agent-RL/error_log_of_tasks/ #Change to directory from which job was submitted...
#!/bin/bash # Do NOT Change. New Version will need these variables #CATALOGURL="https://swscan.apple.com/content/catalogs/others/index-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz" COREBRIGHTNESS="/System/Library/PrivateFrameworks/CoreBrightness.framework" COREBRIGHTNESS_A="...
#!/bin/bash . ./tests/common.sh [ "${1}" == "" ] && echo "specify how many wallets to use" && exit 2 num_wlts="${1}" check_enough_wlts [ "${2}" == "" ] && echo "specify how many times make the call" && exit 2 num_calls="${2}" report_basename="txnotes" gen_report_dir entrypoint="${UTILS_DIR}/txnotes.sh" loop_msg="r...
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.merchant.department.create response. * * @author <NAME> * @since 1.0, 2021-10-26 12:00:07 */ public class KoubeiMerchantDepartmentCreateResponse extends A...
<reponame>dariosilva/spring-framework-5 package com.dams.controllers; import com.dams.exceptions.NotFoundException; import com.dams.services.RecipeService; import com.dams.commands.RecipeCommand; import com.dams.domain.Recipe; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito....
#! /bin/bash chmod a+x "$@"
def count_num(arr, num): count = 0 for row in arr: for col in row: if col == num: count += 1 return count
#!/bin/bash -e # ----------------------------------------------------------------------------- # # Package : zxcvbn-go # Version : ae427f1e4c1d # Source repo : https://github.com/nbutton23/zxcvbn-go.git # Tested on : ubi 8.5 # Language : go # Travis-Check : true # Script License: Apache License,...
#! /bin/bash # # makePlatformPrivateKey.sh -- Translate key to PuTTY format # # Copyright (c) 2022 Riverbed Technology LLC # # This software is licensed under the terms and conditions of the MIT License # accompanying the software ("License"). This software is distributed "AS IS" # as set forth in the License. # if [...
struct SessionState { var map: MapState var trip: Trip? var selectedOrderId: Order.ID? var places: PlacesSummary? var placesPresentation: PlacesPresentation var selectedPlace: Place? var addPlace: AddPlace? var history: History? var tab: TabSelection var publishableKey: Publishab...
# -*- coding: utf-8 -*- """ Feature file parser. One Feature file parser instance is able to parse one feature file. """ from __future__ import unicode_literals import os import io import re import json import filecmp import copy from .compat import RecursionError from .exceptions import RadishError, Featur...
#!/bin/bash # ============LICENSE_START=============================================== # Copyright (C) 2020 Nordix Foundation. All rights reserved. # ======================================================================== # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this fi...
<reponame>JakeStanger/Reactive-Gallery<filename>src/pages/gallery/controls/visibility/IVisibilityProps.ts<gh_stars>0 interface IVisibilityProps { showLocation: boolean; showTime: boolean; showDescription: boolean; showTags: boolean; onChangeShowLocation: (show: boolean) => void; onChangeShowTime: (show: bo...
package com.wx.wheelview.demo; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; import com.wx.wheelview.widget.WheelView; import java.util.ArrayList; import java.util.List; @SuppressWarnings("unchecked") public class Main2Activity extends AppCompatActivity { ...
<reponame>ohms83/GLRayTrace #include "Camera.h" #include <glm/gtc/matrix_transform.hpp> // translate, rotate, scale, perspective void Camera::setViewPort(float width, float height) { _viewPort.center = { width * 0.5f, height * 0.5f }; _viewPort.width = width; _viewPort.height = height; _viewPort.inver...
// // SeasonsRootViewController.h // Hiyoko // // Created by 天々座理世 on 2018/08/30. // Copyright © 2018 MAL Updater OS X Group. All rights reserved. // #import <UIKit/UIKit.h> #import "SeasonsViewController.h" NS_ASSUME_NONNULL_BEGIN @interface SeasonsRootViewController : UINavigationController @property (strong) ...
import { SectionTitle } from 'components/molecules'; import React, { useContext, useEffect } from 'react'; import { SectionVariants } from 'components/molecules/SectionTitle'; import { RoundedButton, ContentTitle } from 'components/atoms'; import { LanguageContext } from 'contexts'; import ProjectCard from 'components/...
#!/bin/bash ##### # # Golang installation # by official suggested way... # ### #TODO(darin-m): it's better to get settings from command line arguments... password="" if [ -n "$1" ] then password=$1 shift echo "password: $password" else echo "You should define sudo password!" echo "Usage: cmd <sudo-pas...
#!/bin/bash #SBATCH --nodes=1 # number of nodes requested #SBATCH --ntasks=1 # number of tasks (default: 1) #SBATCH --cpus-per-task=40 # number of CPUs per task #SBATCH --partition=all # partition to run in (all or maxwell) #SBATCH --job-name=CO3-W...
#!/bin/bash G_AWK="${G_AWK:-awk}" function main { source "$(dirname $(realpath $0))/../../../bash/bashtest/bashtest.sh" if [ "$#" -gt -0 ]; then bt_set_verbose fi bt_enter bt_eval test_all bt_exit_success } function test_self_gen { # have to change dir to parent so the includes can be found pushd ../ >...
class Product: def __init__(self, name, price): self.name = name self.price = price def get_name(self): return self.name def set_name(self, name): self.name = name def get_price(self): return self.price def set_price(self, price): self.price =...
<filename>src/api/user.ts import axios from 'axios'; import { ISaveResultQuiz, ICompletedQuiz } from '@interfaces/quizzes.interface'; interface IGetCompletedQuizzes { completedQuizzes: ICompletedQuiz[]; } export const saveTheResultOfTheQuiz = async (data: ISaveResultQuiz) => { try { await axios.put(`/users/sa...
<reponame>zmike808/party-panel-2 /* * Copyright (c) 2020, TheStonedTurtle <https://github.com/TheStonedTurtle> * 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 sour...
<filename>src/vscripts/lib/client_util.d.ts declare function CreateEmptyTalents(hero: string): void; /** * Client-side implementation of some base NPC extensions. * Moddota types don't let me extend C_DOTA_BaseNPC. */ declare interface CDOTA_BaseNPC { HasTalent(talentName: string): boolean; FindTalentValue(t...
package com.platform.api; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.platform.annotation.IgnoreAuth; import com.platform.annotation.LoginUser; import com.platform.entity.*; import com.platform.service.*; import com.platform.util.ApiBaseAction; import com.platform.util.Api...
def search_string(s1, s2): if s2 in s1: return True else: return False
#include <iostream> int main() { int arr[] = {1, 2, 3, 4, 5}; int cumulativeSum = 0; for (int i = 0; i < 5; i++) { cumulativeSum += arr[i]; std::cout << "Cumulative Sum of " << arr[i] << " is " << cumulativeSum << "\n"; } return 0; }
<reponame>hotspacode/neeza<filename>neeza-spy/src/main/java/io/github/hotspacode/neeza/spy/init/HeartbeatSenderInit.java<gh_stars>1-10 package io.github.hotspacode.neeza.spy.init; import io.github.hotspacode.neeza.base.concurrent.NamedThreadFactory; import io.github.hotspacode.neeza.base.log.NeezaLog; import io.github...
import pandas as pd import matplotlib.pyplot as plt from bs4 import BeautifulSoup as BS import geopandas as gpd import requests ''' I believe a good way of organizing the code will be creating classes for the different kinds of map creation we've been using. Here I aggregate all maps I've made from scraping tables in ...
class ApiClient: def __init__(self, client): self._client = client def get_data(self, url, query_parameters, header_parameters, operation_config): request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if r...
// @flow /* eslint-disable no-unused-vars */ import React from 'react' import styled from 'styled-components' import Row from './Row' import Col from './Col' import { withBreakpoints } from './BreakpointProvider' import { divvy, breakpoint, passOn } from '../../utils' type Props = { children?: Array<React.Element<>>...
<filename>src/SplayLibrary/Core/Glsl.cpp #include <SplayLibrary/SplayLibrary.hpp> #include <SplayLibrary/Private/Private.hpp> #define SPLD_VEC(vecName, vecSize, eltType) \ SPLD_VEC_EXTERNAL_OP(vecName, vecSize, eltType) \ SPLD_VEC_SPECIAL_FUNC(vecName, vecS...
#!/bin/bash CD_CMD="cd "\\\"$(pwd)\\\"" && clear" if echo "$SHELL" | grep -E "/fish$" &> /dev/null; then CD_CMD="cd "\\\"$(pwd)\\\""; and clear" fi VERSION=$(sw_vers -productVersion) if (( $(expr $VERSION '<' 10.7.0) )); then IN_WINDOW="in window 1" fi osascript<<END try tell application "System Events" if (coun...
set -e RES=$1 RES_KB=$(($RES/1000)) mkdir -p binding_data cd binding_data for CELL_TYPE in Gm12878 K562 do if [ ! -e wgEncodeBroadHmm$CELL_TYPE"HMM".bed ] then curl http://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeBroadHmm/wgEncodeBroadHmm$CELL_TYPE"HMM".bed.gz -o wgEncodeBroadHmm$CELL_TYPE"HM...
#!/bin/bash # Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE file in the project root for full license information. build_root=$(cd "$(dirname "$0")/.." && pwd) cd $build_root build_folder=$build_root"/cmake/wolfssl" # Set the default cores CORES=$(grep -c ^processor /pro...
#!/bin/bash # Start up the server in a way that won't block Travis. npm start & sleep 1 echo Hobknob started
# curl http://localhost:5984/yomikatari/_all_docs?include_docs=true
import React from "react"; import { useIntl } from "react-intl"; import { Box } from "@material-ui/core"; import { Helmet } from "react-helmet"; import { FormattedMessage } from "react-intl"; import { Typography } from "@material-ui/core"; import "./404.scss"; import AnimalImage from "../../images/404/animal.svg"; impo...
#include "../comms/commands.h" #include "../comms/telegramBot.h" #include "../lights/lights.h" #include "../utils/time.h" const char* commands[] = { "/stats", "/geek_stats", "/toggle_lights", "/increase", "/decrease", "/toggle_timer", "/state" }; const uint8_t n_commands = sizeof(commands)/ sizeof(comm...
def most_common_words(text): words = text.split() frequency = {} for word in words: if word in frequency: frequency[word] += 1 else: frequency[word] = 1 # Sort the words by their frequency sorted_words = sorted(frequency.items(), key=lambda x: x[1], revers...
package segment_tree; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; /** * * @author minchoba * 백준 14427번: 수열과 쿼리 15 * * @see https://www.acmicpc.net/problem/14427/ * */ public class Boj14427 { private static final String NEW_LINE = "\n"; private static fi...
<reponame>huazai128/nest-emp2-wechat import { PipeTransform, Injectable, ArgumentMetadata } from '@nestjs/common'; import { get } from 'lodash'; import { Request } from 'express' /** * session 解析 * @export * @class SessionPipe * @implements {PipeTransform<IRequest, IRequest>} */ @Injectable() export class Session...
#!/bin/bash set -o xtrace set -o errexit export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" function print_failure { docker ps -a for failed in $(docker ps -a --format "{{.Names}}" --filter status=exited); do docker logs --tail=all $failed done echo "FAILED" exit 1...
def sort_numbers(numbers): return sorted(numbers)
import React from 'react'; export const sandboxIco = () => ( <svg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg' > <rect width='12' height='12' rx='2' fill='#FFC854' /> </svg> ); export const liveIco = () => ( <svg width='12' height='1...
#!/usr/bin/env bash if [ "$TRAVIS_BRANCH" = 'master' ] && [ "$TRAVIS_PULL_REQUEST" == 'false' ]; then openssl aes-256-cbc -K $encrypted_056348374494_key -iv $encrypted_056348374494_iv -in cd/codesigning.asc.enc -out cd/codesigning.asc -d gpg --fast-import cd/codesigning.asc fi
#!/usr/bin/env bash main() { make_keystore dks-keystore.jks extract_public_certificate dks-keystore.jks dks.crt make_truststore dks.crt make_keystore ucfs-claimant-kafka-consumer-keystore.jks extract_public_certificate ucfs-claimant-kafka-consumer-keystore.jks make_truststore ucfs-claimant-kaf...
class Test { constructor() { console.log('hello world'); } } export const test = new Test();
<reponame>rotationalio/whisper export * as createSecretStyles from "./createSecretStyles"; export * as footerStyles from "./footerStyles"; export * as createSecretFormStyles from "./createSecretFormStyles";
#!/bin/bash -x # # Generated - do not edit! # # Macros TOP=`pwd` CND_CONF=18F2550 CND_DISTDIR=dist TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging TMPDIRNAME=tmp-packaging OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/AccessB.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=AccessB.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ...
rosbag record /rosout_agg
<reponame>Paul-Browne/web-build-process module.exports = function (number) { return number + 21; };
<reponame>thuann-vn/react-native-stater import React from 'react' import { useDispatch, useSelector } from 'react-redux' import { AppleHeader } from '@freakycoder/react-native-header-view' import { Screen } from '@/Components' import { Layout } from '@/Theme' import { useTranslation } from 'react-i18next' import { Safe...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/512+0+512-N-VB-ADJ-ADV/13-model --tokenizer_name model-configs/1024-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/512+0+512-N-VB-ADJ-ADV/13-512+0+512-shuffled-N-256 --do...
def generate_most_active_html(all_most_active: list) -> str: most_active_html = '' for most_active in all_most_active: most_active_html += f'<div class="most-active-item">{most_active}</div>\n' return most_active_html
<gh_stars>0 /* ---------------------------------------------------------------- * <NAME> <<EMAIL>> Definition of kuu::rasperi::Controller class. * ---------------------------------------------------------------- */ #pragma once #include <vector> #include <memory> class QString; namespace kuu { namespace rasp...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = '<EMAIL> (<NAME>)' from datetime import datetime, time import endpoints f...
import { makeStyles, Theme } from "@material-ui/core"; export const useStyles = makeStyles((theme: Theme) => ({ form: { display: "flex", flexDirection: "column", gap: theme.spacing(2), maxWidth: 400, margin: "auto", "& .MuiTextField-root": { width: "100%" } }, height__full: { height: "100%" }, ...
target_burn_frontend --erase-all --verify -P 4444 --unlock --image=/home/kevin/amazon-freertos/vendors/andes/boards/corvette_f1_n25/aws_tests/aws_tests.bin --algorithm-bin=/home/kevin/amazon-freertos/vendors/andes/tools/target_bin/target_SPI_v5_32.bin
fn main() { // Create a new empty linked list let mut list: LinkedList<i32> = LinkedList::new(); // Add elements to the front of the linked list list.push_front(3); list.push_front(2); list.push_front(1); // Add elements to the back of the linked list list.push_back(4); list.push_b...
import os import numpy as np import argparse import random import sys from tqdm import tqdm import torch import torch.nn as nn import torch.nn.parallel import torch.optim as optim import torch.utils.data from datetime import datetime from PIL import Image, ImageDraw import seaborn as sns from box import Autoregressive...
<gh_stars>100-1000 /*! \brief Contains a automated container class for managing Gles buffers and textures for a model. \file PVRUtils/OpenGLES/ModelGles.h \author PowerVR by Imagination, Developer Technology Team \copyright Copyright (c) Imagination Technologies Limited. */ //!\cond NO_DOXYGEN #include "ModelGles.h" n...
<gh_stars>1-10 call log('create_index.sql','begin'); -- ################################### call create_index('term','CUI'); call create_index('term','Term'); call create_index('term','PreferredNameCHV'); call create_index('term','PreferredNameUMLS'); call create_index('term','PreferredByCHV'); call create_index('term...
#!/usr/bin/bash.exe set -e function finish { echo "disk space at end of build:" df -h } trap finish EXIT echo "disk space at beginning of build:" df -h # shellcheck source=ci/setup_cache.sh . "$(dirname "$0")"/setup_cache.sh [ -z "${ENVOY_SRCDIR}" ] && export ENVOY_SRCDIR=/c/source read -ra BAZEL_STARTUP_OPTI...
import { memoFetch, setExpirationTime, setMaxMemo } from '../dist/index.mjs'; (async () => { await setMaxMemo(10); await setExpirationTime(5000); const { data } = await memoFetch( 'https://naveropenapi.apigw.ntruss.com/map-geocode/v2/geocode?query=' + encodeURIComponent('양천구'), { filter: ({ ...
<gh_stars>1-10 package io.github.vampirestudios.obsidian.api.obsidian.world; import net.minecraft.util.Identifier; public class SoundInformation { public Identifier additionsSound; public Identifier loopSound; public Identifier moodSound; }
#!/bin/bash set -eu export PYTHONPATH=`dirname $0`/.. basedir=$1 for file in $( find ${basedir} -mindepth 1 -name "*.json" ); do python src/train_test_split_data.py \ --input_file=${file} done
<reponame>richardmarston/cim4j package cim4j; import java.util.List; import java.util.Map; import java.util.HashMap; import cim4j.BaseClass; import java.lang.ArrayIndexOutOfBoundsException; import java.lang.IllegalArgumentException; import cim4j.UnitSymbol; import cim4j.UnitMultiplier; import cim4j.Float; /* Capa...
#!/bin/bash # # Copyright 2018 IBM 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 applicable law or...
#!/usr/bin/env bash # disable transparent hugepage if (! grep -q 'disable transparent hugepage' /etc/rc.local); then echo 'never' >/sys/kernel/mm/transparent_hugepage/enabled echo 'never' >/sys/kernel/mm/transparent_hugepage/defrag cat >>/etc/rc.local <<-EOF # disable transparent hugepage echo 'never' > /sys/ke...
const conection = require('../helper/conection'); const AppError = require('../errors/AppErrors'); const CreateUser = require('../service/CreateUserService'); const AuthUser = require('../service/AuthUserService'); module.exports = { async auth(request,response){ const { email,senha } = request.body...
package styled import ( "strings" ) // Transform transforms a Text according to a transformer. It does nothing if // the transformer is not valid. func Transform(t Text, transformer string) Text { f := FindTransformer(transformer) if f == nil { return t } t = t.Clone() for _, seg := range t { f(seg) } ret...
#!/usr/bin/env bash mkdir -p generated cat ci/exe-from-jar.sh reactive-blerpc/build/libs/reactive-blerpc-jdk8.jar > generated/reactive-blerpc chmod +x generated/reactive-blerpc
<gh_stars>0 import { resolve, relative } from 'path'; import slug from 'slugify'; import { removeExtension } from './path'; export const getIconId = (filepath: string, root: string) => { let iconId = removeExtension(relative(resolve(root), resolve(filepath))).replace(/(\/|\\|\.)+/g, '-'); let matches = iconId.matc...
import hashlib def get_long_token(short_token): # Generate a long-lived access token based on the short-lived token # Example algorithm: Hash the short token using SHA-256 long_token = hashlib.sha256(short_token.encode('utf-8')).hexdigest() return long_token
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. package frc.robot; import edu.wpi.first.math.controller.PIDController; import edu.wpi.first.math.controller.RamseteCont...
#!/usr/bin/env bash # # Generated by: https://github.com/swagger-api/swagger-codegen.git # # 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 # ...
import requests from lxml import html url = "http://example.com" r = requests.get(url) tree = html.fromstring(r.content) # Scrape table with results table = tree.xpath('//table[@id="results-table"]')[0] # Access table entries rows = table.xpath('.//tr') for row in rows: cells = row.xpath('.//td') for cell in...
Yes, the sequence [1, 2, 3, 4, 5] is a Monotonically Increasing sequence.
module Bocu module Timelines class Explore include Her::Model include CommonScopes CATEGORIES = %i[coub_of_the_day newest random].freeze collection_path "#{Bocu::TIMELINE_ENDPOINT}/explore/:category_id" parse_root_in_json :coubs, format: :active_model_serializers CATEGORIES....
<filename>src/main/java/org/ringingmaster/util/javafx/propertyeditor/PropertyValueListener.java package org.ringingmaster.util.javafx.propertyeditor; /** * TODO Comments * * @author <NAME> */ public interface PropertyValueListener { void propertyValue_renderingChanged(PropertyValue propertyValue); }
def modify_string(name: str) -> str: if name.startswith('s'): name = name[1:-1] elif name.endswith('y'): name = name[:-1] + 'ies' else: name += 'ing' return name
var annotated_dup = [ [ "QActive", "struct_q_active.html", "struct_q_active" ], [ "QActiveDummy", "qs_8h.html#struct_q_active_dummy", "qs_8h_struct_q_active_dummy" ], [ "QActiveVtable", "struct_q_active_vtable.html", "struct_q_active_vtable" ], [ "QEQueue", "qequeue_8h.html#struct_q_e_queue", "qequeue_8...
<reponame>jrfaller/maracas package com.github.maracas.rest.data; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; public record PullRequestResponse( String message, MaracasReport report ) { public PullRequestResponse(String message) { this(message, null); } public String toJson...
<reponame>mbrodt/portfolio import React from 'react' import Arrow from './arrow' import SectionHeading from '../components/UI/SectionHeading' const Projects = ({ projects }) => { return ( <section data-aos="fade-up" data-aos-delay="300" id="projects" className="container text-center my-20...
<reponame>OSWeDev/oswedev export default interface IRenderedData { data_dateindex: number; }