text
stringlengths
1
1.05M
if [ -z "$DISABLE_VALGRIND" ]; then VALGRIND=valgrind VALGRIND_OPTS="-q --error-exitcode=1 --leak-check=full --show-reachable=yes" fi
""" Use a machine learning algorithm to classify the name of a sports team into the type of sport it plays """ # imports import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.tree import DecisionTreeClassifier # create dataframe df = pd.DataFrame( {'team_name': ['Manchester United', 'Or...
CREATE TABLE products ( product_id SERIAL PRIMARY KEY, product_name TEXT NOT NULL, product_price INTEGER NOT NULL; ); CREATE TABLE sales ( sale_id SERIAL PRIMARY KEY, product_id INTEGER REFERENCES products (product_id), quantity INTEGER NOT NULL, sale_date DATE NOT NULL; );
#!/bin/bash curl -v "http://127.0.0.1/threshold/set?threshold=0.8"
#include <Godunov.H> #include <PLM.H> #include <PPM.H> using namespace amrex; extern void trace_ppm(const Box& bx, const int idir, Array4<Real const> const& q_arr, Array4<Real const> const& srcQ, Array4<Real> const& qm, Array4<Real> const& qp, const Box& vbx...
#!/bin/bash set -e STACKNAME=$(npx @cdk-turnkey/stackname@1.2.0 --suffix webapp) TABLE_NAME=$(aws cloudformation describe-stacks \ --stack-name ${STACKNAME} | \ jq '.Stacks[0].Outputs | map(select(.OutputKey == "TableName"))[0].OutputValue' | \ tr -d \") BUCKET_NAME=$(aws cloudformation describe-stacks \ --stac...
<reponame>LuChangliCN/medas-iot package com.foxconn.iot.sso.model; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.se...
#!/bin/bash set -eo pipefail bash <(curl -s -L https://detect.synopsys.com/detect.sh) \ --detect.source.path="${WORKSPACE}/cactus/modules/$1" \ --detect.yarn.prod.only=true \ --detect.project.name="github.com/repaygithub/cactus" \ --detect.project.version.name="master" \ --detect.code.location.name...
<gh_stars>0 let origin = location.origin; let URLWord = 'https://localhost:8080'; // let URLWord = ''; let ejecution = false; const avanzar = 'forward'; const retroceder = 'backward'; const giro_derecha = 'turn-right'; const giro_izquierda = 'turn-left'; var params = new URLSearchParams(location.search); // con...
module Capistrano VERSION = "3.8.2".freeze end
# TED-Talks Dataset Setting SRC=${1?Error: no source language given} TGT=${2?Error: no target langauge given} AFFIX=${3?Error: Affix} gpu=${4} bpe=${5} # Download and prepare the data cd examples/translation/ bash prepare-tedtalks.sh $SRC $TGT $bpe cd ../.. # Preprocess/binarize the data --> later, will make it langu...
from django.contrib.auth import authenticate, login from django.shortcuts import render, HttpResponseRedirect, reverse def login_view(request): if request.method == "POST": username = request.POST.get('username') password = request.POST.get('password') user = authenticate(request, username=...
<reponame>PrincetonUniversity/PMagnet materials = { # material => (k_i, alpha, beta) '3C90': (0.042177, 1.5424, 2.6152), '3C94': (0.012263, 1.6159, 2.4982), '3E6': (0.00015324, 1.9098, 2.0903), '3F4': (0.75798, 1.4146, 3.1455), '77': (0.053696, 1.5269, 2.519), '78': (0.016878, 1.609, 2.5432)...
package org.rudogma.bytownite.decoders import java.nio.charset.Charset import org.rudogma.bytownite.Nullable class StringDecoder(charset: Charset) extends Decoder[String] with HeaderBasedDecoder[String] with Nullable { override def decodeBody(bytes: Array[Byte]) = new String(bytes, charset) } object StringDecoder...
import { __extends } from "tslib"; import { registerPlotType } from '../../base/global'; import { getGeom } from '../../geoms/factory'; import TinyLayer from '../tiny-layer'; import * as EventParser from './event'; var GEOM_MAP = { line: 'line', }; var TinyLineLayer = /** @class */ (function (_super) { __extend...
<reponame>vharsh/cattle2 package io.cattle.platform.allocator.constraint; import io.cattle.platform.allocator.port.PortManager; import io.cattle.platform.allocator.service.AllocationCandidate; import io.cattle.platform.core.util.PortSpec; import java.util.List; public class PortsConstraint extends HardConstraint imp...
# This shell script executes Slurm jobs for thresholding # predictions of NTT-like convolutional # neural network on BirdVox-70k full audio # with logmelspec input. # Augmentation kind: none. # Test unit: unit05. # Trial ID: 5. sbatch 042_aug-none_test-unit05_predict-unit05_trial-5.sbatch sbatch 042_aug-none_test-unit...
#!/bin/tcsh source ${PULP_PATH}/vsim/vcompile/colors.csh ############################################################################## # Settings ############################################################################## set IP=pulpino set IP_NAME="PULPino" ##########################################...
<html> <head> <title>URL Validator</title> </head> <body> <form action="validateUrl.php" method="POST"> <input type="text" name="url" placeholder="Enter URL" /> <input type="submit" value="Validate" /> </form> <div id="output"></div> </body> </html> <script> const form = docum...
//PARAMETROS ADICIONAIS NO N1 IMPEDEM DE CASO NAO POR UM DOS PARAMETROS RETORNAR O VALOR function soma (n1=0,n2=0) { return n1 + n2 } //EXEMPLO DE APENAS UM PARAMETRO INFORMADO console.log(soma(2))
#!/bin/bash browserify --insert-globals -t brfs fontkit-browserify.js -o fontkit.js browserify --insert-globals jspdf-browserify.js -o jspdf.js
#!/usr/bin/env python # # -*- coding: utf-8 -*- # # file: hos_utils.py # created: 2014/10/10 <NAME> <<EMAIL>'at'<EMAIL>> # Copyright (C) 2014 <NAME> # See LICENSE for details # # purpose: Plotting accuracy analyses of different Central Difference # advection schemes implemented in a NWP and RCM model #...
<filename>isomorfeus-data/lib/data_uri/uri.rb module URI class Data < Generic COMPONENT = [:scheme, :opaque].freeze MIME_TYPE_RE = %r{^([-\w.+]+/[-\w.+]*)}.freeze MIME_PARAM_RE = /^;([-\w.+]+)=([^;,]+)/.freeze attr_reader :content_type, :data def initialize(*args) if args.length == 1 ...
<filename>src/Screens/Invoices.js import React, { useState, useEffect, useContext } from "react"; import { getPaymentRequestByCompanyId } from "../API/Plans"; import { useSelector } from "react-redux"; import { balanceSvg } from "Assets"; import UserContext from "Context/UserContext"; import { CustomError } from "./Toa...
package com.misakiga.husky.provider; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import tk.mybatis.spring.annotation.MapperScan; @SpringBootApplication(scanBasePackageClasses = ProviderAdminLoginLogBootstrap.class) @MapperScan(basePackages = ...
package com.github.chen0040.leetcode.day16.medium; import java.util.HashMap; /** * Created by xschen on 11/8/2017. * * link: https://leetcode.com/problems/fraction-to-recurring-decimal/description/ */ public class FractionToRecurring { public class Solution { public String fractionToDecimal(int num, in...
#!/bin/sh umask 0002 # Copy settings.py (settings.py copied to allow for legacy installs and customizations) cd /app TARGET_SETTINGS_FILE=dojo/settings/settings.py if [ ! -f ${TARGET_SETTINGS_FILE} ]; then echo "Creating settings.py" cp dojo/settings/settings.dist.py dojo/settings/settings.py fi while ping -c1 i...
#!/bin/bash set -eu # @description Install item assets # # @example # assets-install # # @arg $1 Task: "brief", "help" or "exec" # # @exitcode The result of the assets installation # # @stdout "Not implemented" message if the requested task is not implemented # function assets-install() { # Init local brie...
<reponame>sraashis/coinstac const { populate } = require('./populate'); populate();
/******************************************************************************* Copyright (c) 2017, Honda Research Institute Europe GmbH 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...
package chylex.hee.world.structure.island.biome.feature.forest.ravageddungeon; // TODO update stuff public final class RavagedDungeonPlacer/* implements ITileEntityGenerator*/{ //private static final byte radEntrance = 2, radHallway = 2, radRoom = 7; /*private final byte hallHeight; private byte level; public ...
<gh_stars>0 #include "Common.hpp" // returns maximal entropy score for random sequences which is log2|A| where A is the alphabet // returns something close to 0 for highly repetitive sequences double getEntropy(const char* s, const size_t len){ double counts[4] = {0, 0, 0, 0}; double logs[4]; for (size_t i = 0; i...
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JAction2 extends JFrame implements ActionListener { JLabel label = new JLabel("Name?"); JTextField field = new JTextField(12); JButton button = new JButton("OK"); boolean readyToQuit = false; public JAction2() { ...
# Shows user's password aging information chage -l USERNAME # To enforce pasword change every 30 days we modify the file: nano /etc/login.defs " # Maximum days before password change PASS_MAX_DAYS 30 # Minimum days before password change PASS_MIN_DAYS 2 # Warn user 7 days before expiration PASS_WARN_AGE 7 # Enforce min...
function processPixelData(imageData, color, amp) { for (let j = 0; j < imageData.length; j += 3) { const pixelIdx = j; if (j < amp) { imageData[pixelIdx + 0] = color.r; imageData[pixelIdx + 1] = color.g; imageData[pixelIdx + 2] = color.b; } else { imageData[pixelIdx + 0] = imageDat...
// Copyright 2017 The TIE 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 appl...
<filename>trees-and-graphs/bst-sequences.py import sys from queue import Queue def problem(): """ BST Sequences: A binary search tree was created by traversing through an array from left to right and inserting each element. Given a binary search tree with distinct elements, print all possible arrays t...
<gh_stars>0 package com.dmitrybrant.response.sessionResponse; public class DeleteSessionRes { }
#!/bin/bash # # Copyright (c) 2020, Arm Limited and affiliates. # SPDX-License-Identifier: Apache-2.0 # # 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/L...
<filename>node_modules/react-icons-kit/metrize/arrowCycle.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.arrowCycle = void 0; var arrowCycle = { "viewBox": "0 0 512 512", "children": [{ "name": "g", "attribs": {}, "children": [{ "name": "path", "at...
<!DOCTYPE html> <html> <head> <title>My Bootstrap Page</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> </head> <body> <nav class="navbar navbar-expand-lg navbar-light bg-light"> <a class="navbar-brand" href...
import React from "react"; import { LightningBoltIcon } from "@heroicons/react/solid"; import LoadingIcon from "../assets/icons/spinner-2.svg"; export default function Button(props) { return ( <button className={`items-center gap-2 ${ props.dark ? "bg-slate-900 text-white hover:ring-gray-...
import React from 'react'; import LottieView from 'lottie-react-native'; import { LoadingAnimation } from '@assets/animations'; import * as Atoms from '@components/atoms'; import { useLottieAnimation } from '@hooks/useLottieAnimation'; function Loading() { const animation = useLottieAnimation(); return ( <A...
#ifndef _z2c2_ErrorReporter_h_ #define _z2c2_ErrorReporter_h_ #include <Core/Core.h> namespace Z2 { using namespace Upp; class Assembly; class ZClass; class Method; class Node; class Overload; class ZSyntaxError: Moveable<ZSyntaxError> { public: String Path; String Error; Point ErrorPoint; Overload* Context ...
<gh_stars>1-10 const {wait} = require("./utils"); const {error} = require("./utils"); module.exports = { uuidv4: function () { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { const r = Math.random() * 16 | 0, v = c === 'x' ? r : (r & 0x3 | 0x8); return v...
package ru.job4j.tracker; public class Item { private String id; private String name; private String desc; private long time; public Item(String name, String desc, long time) { this.name = name; this.desc = desc; this.time = time; } public Item(String name) { ...
<gh_stars>0 import React from 'react'; import Sidebar from '../../components/Sidebar'; import './styles.css'; import ContribExtra from '../../assets/images/contribextra.png'; import ContribBas from '../../assets/images/contribbas.png'; function Dashboard() { return ( <> <Sidebar /> <div id="dashboar...
#!/bin/bash if [[ $# -ne 1 ]]; then echo "Usage: ./umulov1 <num-bits>" exit 1 fi if [[ $1 -lt 1 ]]; then echo "Number of bits must be greater than 0" exit 1 fi numbits=$1 ((numbits2 = numbits * 2)) echo "1 var $numbits" echo "2 var $numbits" echo "3 zero $numbits" echo "4 concat $numbits2 3 1" echo "5 conca...
<filename>extras/apidoc/html/search/all_11.js var searchData= [ ['waitinterrupr_472',['waitInterrupr',['../class_s_i4735.html#ad2e95c88de0dfa58ff7aa36988071421',1,'SI4735']]], ['waittosend_473',['waitToSend',['../group__group06.html#ga7b45c1b22c3c1a3f2326bee913d1e1e0',1,'SI4735']]], ['word_474',['word',['../group...
package io.cattle.platform.process.volume; import io.cattle.platform.core.constants.StoragePoolConstants; import io.cattle.platform.core.constants.VolumeConstants; import io.cattle.platform.core.dao.StoragePoolDao; import io.cattle.platform.core.dao.VolumeDao; import io.cattle.platform.core.model.Mount; import io.catt...
package com.touch.air.mall.ssoserver.controller; import cn.hutool.core.util.StrUtil; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.CookieValue; import org.springframew...
package xredis import ( "encoding/json" "github.com/gogf/gf/g/util/gconv" "time" ) // 设置值 func Set(key string, v interface{}, expiration ...time.Duration) (bool, error) { redis := Client().DB() n := 0 * time.Second if len(expiration) > 0 { n = expiration[0] } data := gconv.String(v) err := redis.Set(key, ...
<reponame>octavioturra/simple-worker<gh_stars>0 //simple-worker
public class ArraySum { public static void main(String[] args) { // Array of size 5 int arr[] = { 1, 2, 3,4,5 }; // Variable to store the sum int sum = 0; // Iterate through the array for (int i = 0; i < arr.length; i++) // Add eac...
import java.util.concurrent.Callable; public class CallableTask implements Callable<String> { public String call() throws Exception { // Just like run() of Thread or Runnable Thread.sleep(10000); System.out.println("Executing call() !!!"); /* * if(1==1) throw new java.lang.Exceptio...
import { useState } from "react" type UseStageManagerProps = { initialStage : STAGE | null, } export type STAGE = "SIGNIN" | "SIGNUP" | "VERIFY" | "REQUEST_NEW_PASSWORD" | "NEW_PASSWORD" | "ENTRANCE" | "CREATE_MEETING_ROOM" | "WAITING_ROOM" | "MEETING_ROOM" | "MEETING_MAN...
import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) export const state = () => ({ access_token: '', // token hasLogin: false, // 是否已登录 userInfo: { // 用户信息 _id: 'ObjectId', username: '', avatar: '', introduce: '', createTime: '', updateTime: '' }, currentArticle: null, route...
package io.opensphere.xyztile.model; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; /** * Unit test for {@link XYZDataTypeInfo}. */ public class XYZDataTypeInfoTest { /** * Test. ...
import { GET_PLAN_REQUEST, GET_PLAN_SUCCESS, GET_PLAN_FAILURE, GET_PLAN_MSG_REQUEST, GET_PLAN_MSG_SUCCESS, GET_PLAN_MSG_FAILURE, POST_PLAN_MSG_REQUEST, POST_PLAN_MSG_SUCCESS, POST_PLAN_MSG_FAILURE, PATCH_PLAN_MSG_REQUEST, PATCH_PLAN_MSG_SUCCESS, PATCH_PLAN_MSG_FAILURE, DELETE_PLAN_MSG_REQUEST,...
package bnetp; public enum BNetProtocolPacketId implements _PacketId { SID_NULL, SID_UNKNOWN_0x01, SID_STOPADV, SID_UNKNOWN_0x03, SID_UNKNOWN_0x04, SID_CLIENTID, SID_STARTVERSIONING, SID_REPORTVERSION, SID_STARTADVEX, SID_GETADVLISTEX, SID_ENTERCHAT, SID_GETCHANNELLIST, ...
<filename>test/hash_function/main.cc /* * Copyright 2013 Stanford University. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * - Redistributions of source code must retain the above c...
<gh_stars>1-10 package breadth_first_search; import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; /** * * @author minchoba * 백준 13565번: 침투 * * @see https://www.acmicpc.net/problem/13565/ * */ public class Boj135...
#!/usr/bin/env bash set -e set -x export GH_USERNAME="jenkins-x-versions-bot-test" export GH_EMAIL="jenkins-x@googlegroups.com" export GH_OWNER="jenkins-x-versions-bot-test" # fix broken `BUILD_NUMBER` env var export BUILD_NUMBER="$BUILD_ID" JX_HOME="/tmp/jxhome" KUBECONFIG="/tmp/jxhome/config" # lets avoid the git...
<reponame>alterem/smartCityService package com.zhcs.entity; import java.io.Serializable; import java.util.Date; //***************************************************************************** /** * <p>Title:PartyEntity</p> * <p>Description: 甲方</p> * <p>Copyright: Copyright (c) 2017</p> * <p>Company: 深圳市智慧城市管家信息科...
#!/bin/bash if [ "${APACHE_VERSION}" = "2.4.x" ]; then default=/etc/apache2/sites-enabled/000-default.conf conf=${TRAVIS_BUILD_DIR}/tests/conf/test.2.4.conf else default=/etc/apache2/sites-enabled/000-default conf=${TRAVIS_BUILD_DIR}/tests/conf/test.2.2.conf fi sudo cp -f ${conf} ${default} sudo mkdir -p /var...
#!/bin/sh -e : ${S3_BUCKET:=my-bucket} : ${S3_ENDPOINT:=https://s3.amazonaws.com} : ${AWS_ACCESS_KEY_ID=} : ${AWS_SECRET_ACCESS_KEY=} echo "bucket:$S3_BUCKET on $S3_ENDPOINT" exec /usr/bin/s3fs -f "$S3_BUCKET" /srv -ourl="$S3_ENDPOINT" & echo "> $@" && exec "$@"
<filename>src/index.js const { cronsFromConfig, loadConfigFromPath } = require('./lib/services/MediaClerkService'); const moment = require('moment-timezone'); const { flatten } = require('./lib/util/ArrayUtils'); const cronOpts = { timeZone: moment.tz.guess(), }; const loadConfigs = paths => flatten(paths.map(loadC...
package helm import ( "github.com/caos/orbos/pkg/kubernetes/k8s" ) type Values struct { ReplicaCount int `yaml:"replicaCount"` Image Image `yaml:"image"` ImagePullSecrets []string `yaml:"imagePullSecrets"` NameOverride string `yaml:"nameOverride"` ...
<reponame>paulopinheiro1234/hasneto-loader<filename>src/org/hadatac/hasneto/loader/ValueCellProcessing.java<gh_stars>0 package org.hadatac.hasneto.loader; import java.util.Map; import java.util.StringTokenizer; import java.util.Vector; import org.apache.poi.ss.usermodel.Cell; public class ValueCellProcessing { bo...
weather () { (curl -s wttr.in/$([ -z "$1" ] && echo $LOCATION || echo "$1")?0 || (echo && ([ $(tput cols) -gt 43 ] && cowsay -f bud-frogs 'Could not get info about current weather' || cowsay -f tux 'No weather info') | lolcat -ftS -26)) | tail -n +2 }
package mvedua.msu.com.spartansafety; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.design.widget.BottomNavigationView; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android....
#!/usr/bin/env bash get_git_revision() { local branch shorthash revcount latesttag branch=$(git -C "$BASEDIR" rev-parse --abbrev-ref HEAD) shorthash=$(git -C "$BASEDIR" log --pretty=format:'%h' -n 1) revcount=$(git -C "$BASEDIR" log --oneline | wc -l) latesttag=$(git -C "$BASEDIR" describe --tags --abbrev=0)...
#!/usr/bin/env bash #------------------------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. #-----------------...
/* * 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...
<filename>Lib/site-packages/PyQt5/examples/sql/querymodel.py #!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This...
package com.frewing.dump.core; import android.content.ContentProvider; import android.content.ContentValues; import android.database.Cursor; import android.database.MatrixCursor; import android.net.Uri; import android.os.ParcelFileDescriptor; import android.provider.OpenableColumns; import java.io.File; import java.i...
#!/bin/bash set -e ganache-cli --gasLimit 47000000000 2> /dev/null 1> /dev/null & sleep 5 # to make sure ganache-cli is up and running before compiling rm -rf build truffle compile truffle migrate --reset --network development truffle test kill -9 $(lsof -t -i:8545)
<gh_stars>0 # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> # License: BSD 3 clause """ Detect centrosomes spots in the GFP images. """ import os import argparse from utils import check_directories, initialize_script, end_script from loader import get_fov_names import bigfish.stack as stack import bigfish.detecti...
<gh_stars>0 package cmd import ( "github.com/spf13/cobra" ) // fmtCmd represents the fmt command var fmtCmd = &cobra.Command{ Use: "fmt", Short: "fmt formats graphql document files to std out", } func init() { rootCmd.AddCommand(fmtCmd) }
<gh_stars>1-10 /* * hdhomerun_os_windows.c * * Copyright © 2006-2010 Silicondust USA Inc. <www.silicondust.com>. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version...
import sys import numpy as np from sklearn import svm def angle(x, y): """Compute angle in degrees for points x,y on unit circle""" if x < 0: return 180 - np.arcsin(y) * 360 / (2 * np.pi) else: return (0 if y >= 0 else 360) + np.arcsin(y) * 360 / (2 * np.pi) def compute_loss(inputfile, ou...
<reponame>LightDestory/Personal-Portfolio import {Howl, Howler} from 'howler'; import {utilsInstance} from "./utils"; import {DataSound} from "./dataset"; interface soundFile { readonly file: string, readonly name: string, readonly loop: boolean, readonly autoplay: boolean, readonly volume: number ...
#!/usr/bin/env bash rm db.sqlite3 rm report/migrations/ -fr ./manage.py makemigrations report ./manage.py migrate echo "enter new password for admin" ./manage.py createsuperuser --username admin --email ""
<filename>client/components/yearlySpend.js import React, {Component} from 'react' import {Bar} from 'react-chartjs-2' import {connect} from 'react-redux' import {yearly} from '../store/yearly' const moment = require('moment') class YearlySpend extends Component { async componentDidMount() { await this.props.year...
<filename>javascript/util.js /* Title: Genetic Algorithm to calculate the shortest route Autor: <NAME> Data: 31/05/2018 License: The MIT License (MIT) */ /*************************************************************************************************/ /*Utilitarian Functions*/ function orderByProperty(prop) { var a...
<reponame>Itzbenz/Atomic-Library package Atom.Utility; import java.util.Arrays; import java.util.Collections; import java.util.List; public class Meth { public static long max(Long[] arr) { List<Long> b = Arrays.asList(arr); return Collections.max(b); } public static long min(Lon...
class BufferWriter: def __init__(self): self.buffer = [] def _buffer_write(self, text): # Append the given text to the internal buffer self.buffer.append(text) def flush(self): # Return the contents of the buffer and clear it content = ''.join(self.buffer) s...
def validate_expression(expression: str) -> bool: stack = [] opening_brackets = "({[" closing_brackets = ")}]" bracket_pairs = {')': '(', '}': '{', ']': '['} for char in expression: if char in opening_brackets: stack.append(char) elif char in closing_brackets: ...
<gh_stars>0 import { Component, OnInit, OnDestroy } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute } from '@angular/router'; import { tap } from 'rxjs/operators'; import { Subscription } from 'rxjs'; import { IDinoDetails } from '../../data/dino.interface'; import { Api...
<reponame>g-k/rust-libs<filename>lib/database.rb require 'json' require 'active_support' require 'active_support/core_ext/date/calculations' require 'active_support/core_ext/time/calculations' require 'lib/core_extensions' require 'lib/path_helper' require 'lib/mash' require 'lib/category' require 'lib/entry' class Da...
import random def generate_password(at_least_one_letter, at_least_one_number, at_least_one_punctuation, letters, numbers, punctuation): valid_characters = "" if at_least_one_letter: valid_characters += letters if at_least_one_number: valid_characters += numbers if at_least_one_punctuati...
<reponame>ItsYoungDaddy/Templar-Cosmetics-Beta package tae.cosmetics.guiscreen; import java.awt.Color; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.clien...
<reponame>dereekb/dbcomponents<gh_stars>0 export * from './model'; export * from './model.copy'; export * from './model.conversion'; export * from './model.conversion.field'; export * from './model.modify'; export * from './id.batch';
#!/usr/bin/env bash b5:module_load docker DOCKER_COMPOSER_SERVICE="php" DOCKER_COMPOSER_USER="www-data" DOCKER_COMPOSER_PATH="/app/build" DOCKER_COMPOSER_VENDOR_DIR="/app/vendor" DOCKER_COMPOSER_RUNBIN_SCRIPT="/opt/composer_runbin.sh" docker_composer:docker_container_run() { docker:container_run \ ...
/****************************************************************************** * * * Program: MoveLabel * * Programmer: <NAME> * Date: 05/25/2018 * School: Northwest Guilford High School * * * Description: This class creates a MoveLabel object by extending HBox. it is basically * a s...
#!/bin/sh -e set -o errexit ### # Copyright (c) 2015-2019, Antoine "vv221/vv222" Le Gonidec # Copyright (c) 2016-2019, Solène "Mopi" Huault # 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. ...
#!/usr/bin/env bash # Terminate already running bar instances killall -q polybar # Wait until the processes have been shut down while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done # Launch the bar polybar -q main -c "$HOME"/.config/polybar/nordic/config.ini &
const revisions = require('puppeteer/lib/cjs/puppeteer/revisions.js'); const args = process.argv.slice(2); console.log(revisions['PUPPETEER_REVISIONS'][args[0]]);
#import the necessary libraries import math from collections import Counter #function to calculate the inverse document frequency def inverse_document_frequency(term, documents): num_documents_containing_term = 0 for document in documents: if term in document: num_documents_containing_term ...
<reponame>wejs/we-core /** * Session store loader file * only load session store modules if session are enabled */ module.exports = function sessionStoreLoader(we, weExpress) { if (we.config.session) { const session = require('express-session'); // - default session storage // To change the session s...