text
stringlengths
1
1.05M
<gh_stars>1-10 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Created by alex on 6/7/17. */ require("./app/css/app-styles.css"); require("bootstrap"); require("./app/css/_sassy.sass"); //# sourceMappingURL=styles.js.map
#!/bin/sh NAMESERVER=$(awk '/nameserver/{print $2}' /etc/resolv.conf | tr '\\n' ' ') RESOLVER_CONFIG="/etc/nginx/conf.d/resolver.conf" echo Got nameserver $NAMESERVER from resolv.conf echo Writing include file at $RESOLVER_CONFIG echo "resolver $NAMESERVER;" > $RESOLVER_CONFIG nginx -g 'daemon off;'
#!/bin/bash ADB=$ANDROID_HOME/platform-tools/adb # This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use # Then it'll pass whatever commands to that specific device or emulator. # Run adb devices once, in event adb hasn't been started yet BLAH=$($ADB ...
<reponame>osak/mikutterd<filename>core/boot/shell/spec.rb # -*- coding: utf-8 -*- # specファイル自動生成 require "fileutils" require 'ripper' miquire :core, "userconfig" # イカサマ依存関係自動解決クラス。 # あまり頼りにしないでくれ、Rubyのパース面倒なんだよ class Depend < Ripper::Filter attr_reader :spec def initialize(*args) @last_const = "" super en...
# Add boot script # sudo cp /tmp/boot.sh /var/lib/cloud/scripts/per-boot/boot.sh # sudo chmod 744 /var/lib/cloud/scripts/per-boot/boot.sh # Install MongoDB Libraries sudo cp /tmp/mongodb-org-5.0.repo /etc/yum.repos.d/mongodb-org-5.0.repo sudo yum install -y mongodb-org-${MONGO_VERSION} sudo cp /tmp/mongod.conf /etc/mo...
<gh_stars>10-100 from unittest import TestCase from altimeter.core.config import ( AWSConfig, InvalidConfigException, ScanConfig, ) class TestScanConfig(TestCase): def test_from_dict(self): scan_config_dict = { "accounts": ["123", "456"], "regions": ["us-west-2", "us-w...
package org.apache.ddlutils.task; /* * 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, V...
<gh_stars>100-1000 // @ts-ignore import Tap from 'tap'; import { makeSpectacle } from '../../src'; import { loadEvents } from '../utils'; import { InMemoryOpticContextBuilder } from '../../src/in-memory'; import * as OpticEngine from '../../../optic-engine-wasm/build'; import { generateOpenApi } from '../../src/openapi...
#!/bin/bash dieharder -d 207 -g 59 -S 1643896274
package io.opensphere.analysis.listtool.view; import java.awt.Color; import java.awt.Point; import java.io.Serializable; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; import javafx.beans.property.BooleanProperty; imp...
word = input() ans, forbidden = '', 'CAMBRIDGE' for i in word: if i not in forbidden: ans += i print(ans)
#!/bin/bash mkdir -p data mkdir -p data/logs if [ -f ./config/currentView ] ; then rm ./config/currentView fi /opt/gopath/src/github.com/hyperledger/hyperledger-bftsmart-orderering/startReplica.sh 3 > data/logs/replica-3.success 2>&1 &
const _shortner = (text) => { if (text && text.length > 500) { return text.substring(0, 500) + "..." } else { return text ? text : "No description" } } module.exports = { _shortner }
<gh_stars>0 from django.contrib import admin from .models import Vocabularies admin.site.register(Vocabularies)
fn format_column_values(columns: Vec<&str>) -> String { format!("VALUES ({})", columns.join(", ")) }
import React from 'react' import { userSettingsAreaRoutes } from '../../../user/settings/routes' import { UserSettingsAreaRoute } from '../../../user/settings/UserSettingsArea' import { SHOW_BUSINESS_FEATURES } from '../../dotcom/productSubscriptions/features' import { authExp } from '../../site-admin/SiteAdminAuthenti...
package com.hadas.krzysztof.session; import com.hadas.krzysztof.utils.RestHelper; import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.JsonNode; import com.mashape.unirest.http.Unirest; import com.mashape.unirest.request.HttpRequest; import com.mashape.unirest.request.HttpRequestWithBody; pub...
<filename>src/cal/diagnosis-response.ts<gh_stars>1-10 export interface DiagnosisResponse { name: string; version: string; timestamp: string; // ISO 8601 checks: CheckResult[]; } export interface CheckResult { name: string; desc: string; result: boolean; }
// Copyright (C) 2019 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distri...
<gh_stars>0 var ADLmappingGraph = (function () { var self = {} self.initMappedProperties = function () { self.mappedProperties = {mappings: {}, model: {}} } self.attrs = { table: {shape: "ellipse", color: "grey"}, column: {shape: "box", color: "#9edae5"}, literal: {sh...
<reponame>nihei9/vartan package spec import ( "strings" "testing" verr "github.com/nihei9/vartan/error" ) func TestLexer_Run(t *testing.T) { idTok := func(text string) *token { return newIDToken(text, newPosition(1, 0)) } termPatTok := func(text string) *token { return newTerminalPatternToken(text, newPos...
<gh_stars>1-10 # File: D (Python 2.4) from pirates.instance import DistributedInstanceWorld class DistributedMiniGameWorld(DistributedInstanceWorld.DistributedInstanceWorld): def __init__(self, cr): DistributedInstanceWorld.DistributedInstanceWorld.__init__(self, cr) self._turnOnWorldGrid = T...
<filename>src/javascript/lib/nej/util/cache/cache.js /* * ------------------------------------------ * 缓存管理基类实现文件 * @version 1.0 * @author genify(<EMAIL>) * ------------------------------------------ */ /** @module util/cache/cache */ NEJ.define([ 'base/global', 'base/klass', 'base/util', 'uti...
function extractVersion(codeSnippet) { const versionRegex = /const version = '(\d+\.\d+\.\d+)'/; const match = codeSnippet.match(versionRegex); if (match) { return match[1]; } else { return "Version number not found"; } } // Test the function with the provided example const codeSnippet = "dgmartin/de...
/* * rest_client_not_implemented.h * * Created on: 22 Oct 2015 * Author: dhsmith */ #ifndef REST_CLIENT_NOT_IMPLEMENTED_H_ #define REST_CLIENT_NOT_IMPLEMENTED_H_ #include <exception> #include <string> #include "cli_exception.h" namespace fts3 { namespace cli { /** * A Exception class used when the req...
<gh_stars>0 require "simple_discovery/version" require "simple_discovery/announcer" require "simple_discovery/browser" module Discovery PORT = 2512 end
#!/bin/bash # Pass in name and status function die { echo $1: status $2 ; exit $2; } (cmsRun ${LOCAL_TEST_DIR}/transition_test_cfg.py 0 ) || die 'Failure running cmsRun transition_test_cfg.py 0' $? (cmsRun ${LOCAL_TEST_DIR}/transition_test_cfg.py 1 ) || die 'Failure running cmsRun transition_test_cfg.py 1' $? (cmsRu...
import React from 'react'; import ReactModal from 'react-modal'; import { FaCalendarAlt, FaMapMarker, FaAngleRight, FaTimes } from 'react-icons/fa'; import Img from "gatsby-image" import './experienceItem.scss'; export default class extends React.Component { constructor(props) { super(props); this.state = ...
#ifndef parent_window_h #define parent_window_h #include <QWidget> #include "checksum_data.h" #include "checksum_window.h" class parent_window : public QWidget { Q_OBJECT public: parent_window(); private: checksum_window *window; checksum_data data; }; #endif
/* * CPAchecker is a tool for configurable software verification. * This file is part of CPAchecker. * * Copyright (C) 2007-2014 <NAME> * 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...
import { setupApp, teardownApp } from './firestore.setup'; import './helpers'; describe('firestore', () => { let db; afterEach(async () => { await teardownApp(); }); describe('default rules', () => { let ref; beforeEach(async () => { db = await setupApp(); ...
<reponame>smagill/opensphere-desktop<filename>open-sphere-base/core/src/main/java/io/opensphere/core/model/BoundingBox.java package io.opensphere.core.model; import io.opensphere.core.math.Vector3d; /** * Interface for an object that models a rectangle in 2D or a box in 3D. * * @param <T> position type of t...
<gh_stars>1-10 /// <reference types="react" /> /** * Appends the ownerState object to the props, merging with the existing one if necessary. * * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node, `ownerState` are not applied. * @param existingProps Props of the eleme...
import requests from bs4 import BeautifulSoup # Get the HTML from the webpage page = requests.get('https://example.com') soup = BeautifulSoup(page.text, 'html.parser') # Isolate the product information product_list = soup.find_all('div', class_='product') # Extract the product information products = [] for product ...
const mongoose = require('mongoose'); const RecordSchema = new mongoose.Schema({ title: { type: String, required: true }, description: { type: String, required: true } }); const Record = mongoose.model('Record', RecordSchema); module.exports = Record; // create record exports.createRecord = (req, res) => { ...
#!/bin/bash XORSLP_EC=../target/release/xorslp_ec set -eu cargo build --release --features 2048block for i in 4 3 2; do echo "< RS(8, $i) >" $XORSLP_EC --data-block 8 --parity-block $i --enc-dec echo "</ RS(8, $i) >" echo "" echo "< RS(9, $i) >" $XORSLP_EC --data-block 9 --parity-block $i -...
<reponame>jb1361/memelon from imageai.Classification.Custom import ClassificationModelTrainer import tensorflow as tf import os # This will disable the gpu # os.environ["CUDA_VISIBLE_DEVICES"] = "-1" print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU'))) model_trainer = ClassificationMo...
#!/bin/sh docker cp ./dist/. tms-finder-ue:/usr/share/nginx/html
<reponame>appigram/windmill-react-ui import React from 'react'; export interface HelperTextProps extends React.HTMLAttributes<HTMLSpanElement> { /** * Defines the color of the helper text (the same as with Input, Select, etc.) */ valid?: boolean; } declare const HelperText: React.ForwardRefExoticCompo...
function finalPosition($commands) { $x = 0; // Initial x-coordinate $y = 0; // Initial y-coordinate // Iterate through each command and update the position accordingly for ($i = 0; $i < strlen($commands); $i++) { $command = $commands[$i]; if ($command === 'U') { $y++; // Mov...
require "spec_helper" describe "GitAppTest" do it "can deploy git app to the main branch" do Hatchet::GitApp.new("lock_fail_main", allow_failure: true).deploy do |app| expect(app.output).to match("INTENTIONAL ERROR") end end it "returns the correct branch name on circle CI" do skip("only runs ...
import time from win10toast import ToastNotifier def set_reminder(): rem = str(input("Enter your reminder message: ")) # Prompt user for reminder message print("In how many minutes?") local_time = float(input()) # Prompt user for time in minutes local_time *= 60 # Convert time to seconds print('...
<form> <label for="name">Name:</label> <input type="text" id="name"> <label for="email">Email:</label> <input type="text" id="email"> <input type="submit" value="Submit"> </form>
package vcs.citydb.wfs.kvp; import net.opengis.fes._2.AbstractQueryExpressionType; import net.opengis.fes._2.FilterType; import net.opengis.fes._2.SortByType; import net.opengis.wfs._2.ParameterType; import net.opengis.wfs._2.PropertyName; import net.opengis.wfs._2.QueryType; import net.opengis.wfs._2.StoredQueryType;...
<html> <head> <title>Timer</title> <script> // function to display the timer element function displayTimer() { let minutes = 30; let seconds = 0; // get the timer element const timerElement = document.getElementById("timer"); // set the interval to subtract one second setInterval(() => { seconds ...
#!/bin/bash usage() { echo echo "USAGE: $0 <archive_format> <student_media_dir>[,<student_media_dir>,...]" echo echo " Archive Formats:" echo " 7z -7zip with LZMA compression split into 2G files" echo " 7zma2 -7zip with LZMA2 compression split into 2G files" echo " 7zcopy -7zip wi...
#!/bin/sh DT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../.." if [ "$1" = "debug" ]; then DEBUG="debug" else OUT_DIR=$1 DEBUG=$2 fi # If not run from DataTables build script, redirect to there if [ -z "$DT_BUILD" ]; then cd $DT_DIR/build ./make.sh extension AutoFill $DEBUG cd - exit fi # Change i...
<reponame>astrionic/advent-of-code-2020 package astrionic.adventofcode2020.solutions.day15 import astrionic.adventofcode2020.framework.AdventSolution import scala.collection.mutable object Day15 extends AdventSolution { override def solvePart1(input: String): String = solve(input, 2020) // Takes about 250 time...
#!/bin/bash STR="Test 1 " echo $STR ./hello
require 'spec_helper' describe RuboCop::Cop::DarkFinger::MigrationConstants do let(:config) { RuboCop::Config.new } def offenses_for(source) cop = described_class.new(config) processed_source = parse_source(source) _investigate(cop, processed_source) cop.offenses end def expect_no_offenses_fo...
<gh_stars>1-10 var fontSize = 15; var width = 1400; var height = 750; var tree = d3.layout.tree() .size([height, width - 160]); var diagonal = d3.svg.diagonal() .projection(function(d) { return [d.y, d.x]; }); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) ...
#!/bin/bash # Downloads a version of Bochs patched to be used with Pintos and builds and installs two variants # of it to /usr/local. set -e TMPDIR=$(mktemp -d) trap "rm -rf $TMPDIR" EXIT cd "$TMPDIR" wget -O "bochs-2.2.6-pintos-unix-patched.tar.gz" "https://drive.google.com/uc?export=download&id=1nPFKg5XxicgxRF4Gey...
# Generated by Django 3.2.6 on 2021-09-02 10:44 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("catalog", "0016_add_gin_gist"), ] operations = [ migrations.AlterModelOptions( name="index", options={ "orde...
/*! * urllib-sync - request.js * Copyright(c) Alibaba Group Holding Limited. * Author: busi.hyy <<EMAIL>> */ 'use strict'; /** * Module dependencies. */ var utility = require('utility'); var urllib = require('urllib'); var path = require('path'); var util = require('util'); var fs = require('fs'); var os = req...
<filename>tests/java/org/pantsbuild/testing/EasyMockTestTest.java // Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). // Licensed under the Apache License, Version 2.0 (see LICENSE). package org.pantsbuild.testing; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import com.go...
<reponame>marcinbunsch/things-client require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Things" do it "should load appropriate classes and modules" do lambda do Things::App Things::Todo Things::List Things::Status Things::Area Things::Project Th...
function countVowels(str) { let count = 0; const vowels = ["a", "e", "i", "o", "u"]; for (let char of str) { if(vowels.includes(char.toLowerCase())) { count += 1; } } return count; }
package gov.cms.bfd.pipeline.rda.grpc; import com.codahale.metrics.MetricRegistry; import gov.cms.bfd.model.rda.PreAdjMcsClaim; import gov.cms.mpsm.rda.v1.McsClaimChange; import java.util.concurrent.Callable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * PipelineJob requires that the class of the jo...
var classCatch_1_1Generators_1_1MapGenerator = [ [ "MapGenerator", "classCatch_1_1Generators_1_1MapGenerator.html#a525c7eaf53ad220ee7add534aff2522c", null ], [ "get", "classCatch_1_1Generators_1_1MapGenerator.html#a199d377afba00519f202c59b4b488235", null ], [ "next", "classCatch_1_1Generators_1_1MapGenerato...
sap.ui.define([ "../util/Api", "../util/RestClient", ], function (Api, RestClient) { "use strict"; var eventApi = Api.define("restService", { /** * Get code list by its name * * @param {string} name Code list name * @returns {Promise<CodeInfo[]>} Code list */ getCodeListByName...
# vim: set ts=4 sw=4 et: run_func() { local func="$1" desc="$2" funcname="$3" restoretrap= logpipe= logfile= teepid= : ${funcname:=$func} logpipe=$(mktemp -u -p ${XBPS_STATEDIR} ${pkgname}_${XBPS_CROSS_BUILD}_XXXXXXXX.logpipe) || exit 1 logfile=${XBPS_STATEDIR}/${pkgname}_${XBPS_CROSS_BUILD}_${funcna...
package main import ( "fmt" "strconv" ) func main() { fmt.Println("Learning Primitive Datatypes") var a bool = true fmt.Printf("%v , %T\n", a, a) // bit operators var ( b int64 = 10 c int64 = 3 ) fmt.Println("b = " + strconv.FormatInt(b, 2)) fmt.Println("c = " + strconv.FormatInt(c, 2)) fmt.Println(...
#!/bin/sh #With DSCL# userList=`dscl . list /Users AuthenticationAuthority | awk '$2~/LocalCachedUser/ {print $1}'` echo "Listing account and home directory for the following users..." for a in $userList ; do echo "$a" done
#!/bin/bash # Script to automate cryptocurrency mining using Docker # Source configuration from hellminer.conf . ./hellminer.conf # Check for the presence of Docker DOCKER=$(which docker) if [ -z "${DOCKER}" ]; then echo "ERROR: Docker does not seem to be installed. Please download and install Docker CE as outlin...
XBPS_CFLAGS="-O2 -pipe -fstack-protector -march=armv7-a -mfpu=vfpv3 -mfloat-abi=hard" XBPS_CXXFLAGS="$XBPS_CFLAGS" XBPS_TRIPLET="armv7l-unknown-linux-musleabi"
#!/bin/bash if [ "$CI" != "true" ]; then echo "" echo "Can only use the tag release script on CI" echo "" exit 1 fi PACKAGE_VERSION=$(node ./scripts/getPackageVersion.js) TAG_EXISTS=$(./scripts/tag_exists.sh v$PACKAGE_VERSION) if [[ $TAG_EXISTS == "false" ]]; then git tag v$PACKAGE_VERSION PACKAGE_MINOR_V...
/* * Copyright 2018 The boardgame.io Authors * * Use of this source code is governed by a MIT-style * license that can be found in the LICENSE file or at * https://opensource.org/licenses/MIT. */ import { getAllNeighbors, getDistance, getRange, getReachable, createCoordinate, } from './hex-utils'; tes...
import React from "react"; import { Row, Statistic, Progress } from "antd"; const HeaderStatistics = ({ rp_activity, mesure_time, rp_vol, rp_half_life, now, total, }) => { return ( <> <Row> <Statistic title="RP Activity" suffix="MBq" value={rp_activity} ...
package io.opensphere.core.projection; import org.apache.log4j.Logger; import io.opensphere.core.math.Vector3d; import io.opensphere.core.model.Altitude.ReferenceLevel; import io.opensphere.core.model.GeographicPosition; import io.opensphere.core.model.LineType; import io.opensphere.core.model.Tessera; import io.open...
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/autoconf/autoconf.html TERMUX_PKG_DESCRIPTION="Creator of shell scripts to configure source code packages" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_VERSION=2.69 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/autoconf/autoconf-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA2...
#!/usr/bin/env bash ############################################################################## # diff-example.sh # # Custom diff command which strips the first N lines from each file # before comparing the files # # Usage: # bash diff-example.sh n input-file-1 input-file-2 #####################################...
try: inputNumber = int(input("Please enter a number: ")) except ValueError: print("Please enter a valid number")
#!/bin/sh set -e set -u set -o pipefail if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy # frameworks to, so exit 0 (signalling the script phase was successful). exit 0 fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_P...
setenforce 0 sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config modprobe br_netfilter echo "net.bridge.bridge-nf-call-iptables=1" | sudo tee -a /etc/sysctl.conf echo "net.bridge.bridge-nf-call-ip6tables=1" | sudo tee -a /etc/sysctl.conf echo "net.bridge.bridge-nf-call-arptables=1" | sudo tee -a /etc/sysctl....
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { ModalModule } from 'ng2-bootstrap'; import { PaginationModule } from 'ng2-bootstrap'; import { SharedModule } from './shared.module'; import { CommentTableComponent } from '....
/* * Copyright 2017 Red Hat, Inc. and/or its affiliates. * * 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 app...
<reponame>FenixFinance/types export enum BridgeTool { nxtp = 'nxtp', hop = 'hop', anyswap = 'anyswap', cbridge = 'cbridge', horizon = 'horizon', } export interface Bridge { key: BridgeTool name: string logoURI: string bridgeUrl?: string discordUrl?: string supportUrl?: string docsUrl?: string ...
<gh_stars>100-1000 package com.github.messenger4j.send.message.template.receipt; import static java.util.Optional.empty; import java.util.Optional; import lombok.EqualsAndHashCode; import lombok.NonNull; import lombok.ToString; /** * @author <NAME> * @since 1.0.0 */ @ToString @EqualsAndHashCode public final class...
<gh_stars>1-10 // Author : XuBenHao // Version : 1.0.0 // Mail : <EMAIL> // Copyright : XuBenHao 2020 - 2030 // #ifndef MYSQL_AGENT_MYSQLAGENT_H #define MYSQL_AGENT_MYSQLAGENT_H #include "header.h" class MySqlAgent { public: public: MySqlAgent( char* pStrHost_, int nHostLen_, char* pStrUs...
#!/bin/bash # # Copyright 2017 Istio 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 app...
def do_GET(self): """ Call on a GET request and parses the URL parameters of the request. It then calls the GET() method. """ parsed_url = urlparse(self.path) query_params = parse_qs(parsed_url.query) # Assuming GET() method is implemented elsewhere # Call the GET method with the p...
#!/bin/sh setup_git() { git config --global user.email "45767933+joshswimlane@users.noreply.github.com" git config --global user.name "joshswimlane" } commit_website_files() { git add generated_attck_data.json git commit --message "Travis build: $TRAVIS_BUILD_NUMBER" } upload_files() { git push origin mast...
def check_duplicates(A): seen = set() for elem in A: if elem in seen: return True seen.add(elem) return False
import React from 'react'; import { Grid } from '@material-ui/core'; import stock1 from '../../../assets/images/stock-photos/stock-6.jpg'; import stock2 from '../../../assets/images/stock-photos/stock-7.jpg'; export default function LivePreviewExample() { return ( <> <div className="mb-spacing-6"> ...
<reponame>ttiurani/extendedmind /* Copyright 2013-2016 Extended Mind Technologies Oy * * 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 ...
def permutations(arr): result = [] if len(arr) == 1: result = [arr] else: for item in arr: sub_list = list(arr) sub_list.remove(item) for per in permutations(sub_list): result.append([item] + per) return result print(permutations([1, 2...
using System; using System.Collections.Generic; using System.Text.RegularExpressions; public class EntityNameExtractor { public List<string> ExtractEntityNames(string codeSnippet) { List<string> entityNames = new List<string>(); // Define the pattern to match the modelBuilder.Entity method cal...
<filename>voltcraft/__init__.py """voltcraft python module""" try: from voltcraft._version import version as __version__ except ImportError: __version__ = "not-installed" __author__ = "<NAME>"
<filename>src/test/java/io/bdrc/xmltoldmigration/MigrationTest.java package io.bdrc.xmltoldmigration; import static io.bdrc.libraries.LangStrings.EWTS_TAG; import static io.bdrc.xmltoldmigration.MigrationHelpers.OUTPUT_STTL; import static io.bdrc.xmltoldmigration.MigrationHelpers.OUTPUT_TRIG; import static io.bdrc.lib...
<reponame>1aurabrown/ervell import React, { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import StickyBreadcrumbPath from 'react/components/UI/StickyBreadcrumbPath'; import WithCurrentRoute from 'react/hocs/WithCurrentRoute'; import WithLoginStatus from 'react/h...
<filename>moisturizer/utils.py PRIMITIVES = [int, bool, float, str, dict, list, type(None)] def flatten_dict(nested, separator='.'): def items(): for key, value in nested.items(): if isinstance(value, dict): for subkey, subvalue in flatten_dict(value).items(): ...
<filename>track_oracle/file_formats/track_mitre_xml/file_format_mitre_xml.h /*ckwg +5 * Copyright 2012-2016 by Kitware, Inc. All Rights Reserved. Please refer to * KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, * Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. */ #ifndef INCL...
package mim.auth.service.configuration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframewo...
#!/usr/bin/env bash # .node bin: if [ -d "$HOME/.node/bin" ]; then export PATH="$HOME/.node/bin:$PATH" fi # .node node_modules: if [ -d "$HOME/.node/lib/node_modules" ]; then export NODE_PATH="$HOME/.node/lib/node_modules:$NODE_PATH" fi # If Homebrew has NOT installed npm, you should supplement # your NODE_PATH ...
# MIT License # Copyright (c) 2020 Synergy Lab | Georgia Institute of Technology # Author: William Won (william.won@gatech.edu) # 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 restr...
<gh_stars>1-10 import React, {useEffect, useState} from "react"; import Workshop from "./Workshop"; import axios from "./AxiosInterceptor"; import {Button, Form, Table} from "react-bootstrap"; const WorkshopsList = props => { const [workshops, setWorkshops] = useState([]); const [workshopTitle, setWorkshopTi...
def max_list(list): max = list[0] for i in list: if i > max: max = i return max list = [15, -9, 58] print("Max number in list is : ", max_list(list))
<gh_stars>0 package eu.le_tian.iConsoleOS.data; import androidx.room.Entity; import androidx.room.PrimaryKey; @Entity(tableName = "Exercise") public class Exercise { @PrimaryKey(autoGenerate = true) private long exerciseID; private long exStartDateTime; private long exStopDateTime; private String ...
#include <stdio.h> int main() { char sentence[100]; // Input sentence printf("Enter a sentence: "); scanf("%[^\n]s", sentence); // Iterate through the sentence to find vowels for(int i = 0; i < strlen(sentence); i++) { // If vowel is detected, print it if(sentence[i] == 'a' || sentence[i] == 'e' || sentence...
package com.cjy.flb.activity; import android.app.Activity; import android.os.Handler; import android.os.Message; import android.view.View; import android.widget.Button; import com.cjy.flb.R; import com.cjy.flb.utils.MHttpUtils; import com.cjy.flb.utils.SharedPreUtil; import com.cjy.flb.utils.ToastUtil; import java.l...