text
stringlengths
1
1.05M
<gh_stars>0 import { LitElement, html, css } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; import { repeat } from 'lit/directives/repeat.js'; import { Message, MessageType } from '../models/Message'; import { UserType, User } from '../models/User'; import { scrollStyle } from '../styl...
<filename>src/context/index.ts<gh_stars>1-10 export * from './client-config' export * from './env-enum' export * from './log-config'
def calculate_logits(self, inputs): model = madry_model.MadryModel(n_classes=self.n_classes) # Instantiate MadryModel with the number of classes logits = model.fprop(inputs) # Calculate logits using the fprop method of MadryModel return logits
def linear_search(arr, x): for i in range(len(arr)): if arr[i] == x: return i return -1
class smart_attr(object): name = None def __init__(self, factory, *a, **k): self.creation_data = factory, a, k def __get__(self, obj, clas=None): if self.name is None: raise RuntimeError, ("class %r uses a smart_attr, so its " "metaclass should be MetaSmart, but i...
#!/bin/bash -u set -e # # Copyright (c) 2010, 2011 Tresys Technology LLC, Columbia, Maryland, USA # # This software was developed by Tresys Technology LLC # with U.S. Government sponsorship. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public ...
# Output single horizontally-arranged image and the JSON # bounding boxes found. ./datapiece -i pngs/contract2.png -b boxes_contract.json -o out/contract2_one_line.png --dpi 300 --jsonout out/contract2.json # Output series of images named out/contract2_<field>.png with --split. Clean a 2 pixel border around each out...
import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class PoductsService { public essenceQuantities = []; public caloporteursQuantities = []; public dieselQuantities = []; public graissesQuantities = []; public hmgazQuantities = []; public htransmissionQuantities = []; public httem...
AFRAME.registerComponent('camera-logger', { schema: { timestamp: {type: 'int'}, seconds: {type: 'int'} // default 0 }, log : function () { var cameraEl = this.el.sceneEl.camera.el; var rotation = cameraEl.getAttribute('rotation'); var worldPos = new THREE.Vector3(); w...
<gh_stars>0 # taxon.py from Bio import Entrez def format_name(name): genus = name.split()[0] rest = name.split()[1:] return genus[0]+'. '+' '.join(rest) def get_tax_dict(id_list,reformat=True): handle = Entrez.efetch(db='taxonomy',id=[str(x) for x in id_list]) record = Entrez.read(handle) ...
#!/bin/zsh #$ -l h_gpu=1 #$ -l m_mem_free=45G #$ -cwd #$ -V #$ -e error_log_$JOB_ID #$ -o out_log_$JOB_ID #$ -l h_rt=12:00:00 ###$ -l hostname=maxg01 ###$ -l cuda_name=Tesla-V100-SXM2-16GB export CUDA_VISIBLE_DEVICES=0 python run_auccpvloss.py "$@" retVal=$? if [ $retVal -ne 0 ]; then echo "Error" exit 100 fi
import re def remove_characters(s): pattern = r'[^a-zA-Z0-9]' return re.sub(pattern, '', s) s_new = remove_characters(";Hello world!@#$") print(s_new) # Output: Hello world
require 'net/http' module DataFetchers class Civic def variants page = get_page(1) Enumerator.new(page.total_count) do |y| page.variants.each { |v| y << v } while page.current_page_num < page.total_pages do page = get_page(page.current_page_num + 1) page.variants.e...
<reponame>objektwerks/python.scikit.learn """ Random Selection test on ads click-thru-rate data. """ import random import matplotlib.pyplot as plt import pandas as pd df = pd.read_csv('./../../data/ads.ctr.csv') N = 10000 d = 10 ads_selected = [] total_reward = 0 for n in range(0, N): ad = random.randrange(d ...
import { Component, OnInit } from '@angular/core'; import {ActivatedRoute, Params, Router} from "@angular/router"; import {AuthenticationService} from "../_services/authentication.service"; @Component({ selector: 'app-reset', templateUrl: './reset.component.html', styleUrls: ['./reset.component.scss'] }) export ...
<reponame>Wayne-Sun/api-hub<gh_stars>0 /** * Copyright 2021 Wayne * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * Unles...
<reponame>navikt/familie-felles-frontend<gh_stars>1-10 // Enum export enum AdresseType { BOSTEDSADRESSE = 'BOSTEDSADRESSE', MIDLERTIDIG_POSTADRESSE_NORGE = 'MIDLERTIDIG_POSTADRESSE_NORGE', MIDLERTIDIG_POSTADRESSE_UTLAND = 'MIDLERTIDIG_POSTADRESSE_UTLAND', POSTADRESSE = 'POSTADRESSE', POSTADRESSE_UTL...
interface Entity { id: number; } export interface EntityMap<T> { [id: number]: T; } export function entityArrayToObject<T extends Entity>( array: T[] ): EntityMap<T> { return array.reduce((obj: EntityMap<T>, item) => { obj[item.id] = item; return obj; }, {}); } export function entityObjectToArray<...
#!/bin/bash set -e # Create a Certificate Signing Request (CSR) for our admission webhook service # See https://kubernetes.io/docs/tasks/tls/managing-tls-in-a-cluster/ for more detail CSR_NAME='demo-csr.kube-exec-controller' kubectl delete csr $CSR_NAME 2>/dev/null || true rm -rf server* # Install cfssl/cfssljson tool...
const webpack = require('webpack') const merge = require('webpack-merge') const path = require('path') const config = require('../config') const webpackBaseConfig = require('./webpack.base.conf') const HtmlWebpackPlugin = require('html-webpack-plugin') const CleanWebpackPlugin = require('clean-webpack-plugin') const Fr...
// Copyright © 2021 The Things Network Foundation, The Things Industries B.V. // // 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 // // Un...
#!/bin/bash # profiles = xccdf_org.ssgproject.content_profile_C2S # remediation = bash . $SHARED/auditd_utils.sh prepare_auditd_test_enviroment set_parameters_value /etc/audit/auditd.conf "admin_space_left_action" "syslog"
#!/usr/bin/env bash # Attempt to migration from legacy to latest LEGACY_OUT=`./snabb lwaftr migrate-configuration -f legacy \ program/lwaftr/tests/configdata/legacy.conf` if [[ "$?" -ne "0" ]]; then echo "Legacy configuration migration failed (status code != 0)" echo "$LEGACY_OUT" exit 1 fi # Attempt to migrate...
# ================================================================ # Custom user config # ================================================================
<gh_stars>1-10 // // Copyright 2021 <NAME> <<EMAIL>> // // 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 applica...
fn create_new_xkb_state(conn: &Connection, xkb_context: &Context, xkb_device_id: i32) -> (Keymap, State) { // Retrieve the XKB keymap for the specified device using the XKB context and connection let keymap_str = xkb::x11::get_keymap(conn, xkb_device_id, xkb::x11::KEYMAP_COMPILE_NO_FLAGS); let xkb_keymap = ...
/* * Copyright 2018 Akashic 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 applicable law or agr...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Movie List</title> <style> .card{ width: 300px; height:200px; padding: 0.5em; margin: 0.5em; border: 2px solid #cccccc; background-color: #cccccc; ...
<filename>springcloud-alibaba/shop-order/src/main/java/com/ylesb/service/fallback/ProductServiceFallbackFactory.java package com.ylesb.service.fallback; /** * @title: ProductServiceFallbackFactory * @projectName springcloud-alibaba * @description: TODO * @author White * @site : [www.ylesb.com] * @date 2022/1/1216...
describe('Add Content Tests', () => { beforeEach(() => { // give a logged in editor and the site root cy.autologin(); cy.visit('/'); cy.waitForResourceToLoad('@navigation'); cy.waitForResourceToLoad('@breadcrumbs'); cy.waitForResourceToLoad('@actions'); cy.waitForResourceToLoad('@types'); ...
def is_convex(points): n = len(points) # There must be at least 3 points if n < 3 : return False # Store the first point to compare with rest prev = points[0] # Traverse the other points for i in range(1, n): curr = points[i] # Finding cross prod...
export const traceSector = sector => (ctx, offset) => { const { left, top } = sector.getBoundingBox(offset); ctx.beginPath(); ctx.moveTo(left + sector.radius, top + sector.radius); ctx.arc( left + sector.radius, top + sector.radius, sector.radius - sector.borderWidth / 2, (sector.startAngle ?? 0...
<reponame>RenukaGurumurthy/Gooru-Core-API package org.ednovo.gooru.core.exception; import java.io.Serializable; public class ErrorObject implements Serializable { /** * */ private static final long serialVersionUID = 2324523124118900807L; private int code; private String status; public ErrorObject(int ...
def add_numbers(x,y): a = x b = y return a+b
#!/usr/bin/env bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH #================================================= # System Required: All # Description: Python HTTP Server # Version: 1.0.2 # Author: Toyo #================================================= ...
<filename>UnSynGAN/utils/patches.py """ This software is governed by the CeCILL-B license under French law and abiding by the rules of distribution of free software. You can use, modify and/ or redistribute the software under the terms of the CeCILL-B license as circulated by CEA, CNRS and INRIA at the follow...
# We want /usr/local/bin before /usr/bin PATH="/usr/local/bin:$PATH" # Xcode & Developer tools. # # https://developer.apple.com/technologies/tools/ # Tools like gcc or make are under this directory. These tools are provided # by Apple once Xcode is installed. # PATH="/Applications/Xcode.app/Contents/Developer/usr/bin:...
import Phaser from 'phaser' export default class ExportJson extends Phaser.Scene { preload() { this.load.atlas('gems','/assets/tests/columns/gems.png','/assets/tests/columns/gems.json') } create() { this.anims.create({ key: 'diamond', frames: this.anims.generateFrameNames('gems', { prefix: 'diamond_', end: 1...
const {EventEmitter} = require('events') const event = new EventEmitter() event.on('saySomething', (name) => { console.log(`Eu ouvi você ${name}`) }) event.emit('saySomething', "Christian") event.emit('saySomething', "Thayná")
<reponame>OotinnyoO1/N64Wasm var ROMLIST = [ /* {url:"roms/baserom.us.z64",title:"Game 1"}, */ ];
#!/bin/bash while read p; do OBJECT=$p triple=$(grep "$p" yagoLabels.ttl | grep rdfs:label) echo $triple >> label-triples.txt label=$(echo $triple | cut -d '"' -f 2) # | sed 's/@.*$//' | sed 's/^.//' | sed 's/.$//') echo $label >> labels.txt done < objects-no-namespace-10.txt
#!/bin/bash set -e echo "Starting deploy" # Building the library npm run test npm run build CURRENTDIR=~/blindfold2 SERVEDIR=~/serve_content/blindfold2 cd $CURRENTDIR rm -rf $SERVEDIR mkdir $SERVEDIR cp -r $CURRENTDIR/serve_content/prod $SERVEDIR cp -r $CURRENTDIR/serve_content/shared $SERVEDIR cp -r $CURRENTDIR/se...
<reponame>newonexd/jDesign<gh_stars>1-10 package behavior.observer; public abstract class Observer { protected Subject subject; public abstract void update(); } class Observer1 extends Observer{ private String name; public Observer1(String name,Subject subject){ this.name = name; this....
/** * 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"); you may...
<filename>console/src/boost_1_78_0/libs/lexical_cast/test/typedefed_wchar_test.cpp // Unit test for boost::lexical_cast. // // See http://www.boost.org for most recent version, including documentation. // // Copyright <NAME>, 2011-2021. // // Distributed under the Boost // Software License, Version 1.0. (See accom...
<reponame>arthurflor23/spelling-correction """Dataset reader and process""" import os import html import string import numpy as np import xml.etree.ElementTree as ET from glob import glob from data import preproc as pp class Dataset(): def __init__(self, source): self.source = os.path.splitext(source)[...
<filename>sphinx-sources/Examples/Commands/plotresults.py from LightPipes import * import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import numpy as np GridSize = 10*mm GridDimension = 128 lambda_ = 1000*nm #lambda_ is used because lambda is a Python build-in function. R=2.5*mm xs=0*mm; ys=0*mm ...
var searchData= [ ['ecc_5fdisabled',['ECC_DISABLED',['../core__ca_8h.html#ga06d94c0eaa22d713636acaff81485409a48ce2ec8ec49f0167a7d571081a9301f',1,'core_ca.h']]], ['ecc_5fenabled',['ECC_ENABLED',['../core__ca_8h.html#ga06d94c0eaa22d713636acaff81485409af0e84d9540ed9d79f01caad9841d414d',1,'core_ca.h']]], ['ethernet_5...
def is_subset(string1, string2): result = False for i in range(len(string1)): if string1[i].issubset(string2): result = True return result
#!/bin/bash BASEDIR=$(dirname -- "$(readlink -f -- "${BASH_SOURCE}")") mkdir -p $BASEDIR/logs log_file=$(date "+%Y_%m_%d-%H_%M_%S") echo '[*] Backend has been deployed.' $BASEDIR/env/bin/python $BASEDIR/manage.py runserver 2>&1 | tee $BASEDIR/logs/$log_file.log
<reponame>Bernardinhouessou/Projets_Autres /* Copyright (c) 2001-2014, The HSQL Development Group * 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 reta...
#!/bin/bash # Module specific variables go here # Files: file=/path/to/file # Arrays: declare -a array_name # Strings: foo="bar" # Integers: x=9 ############################################### # Bootstrapping environment setup ############################################### # Get our working directory cwd="$(pwd)"...
package io.opensphere.mantle.data.merge; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.Objects; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; ...
import json def to_json(data): return json.dumps(data) def from_json(data): return json.loads(data)
<filename>src/com/opengamma/analytics/financial/curve/generator/GeneratorCurveAddYieldNb.java /** * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.curve.generator; import java.util.Arrays; i...
<filename>astropyp/db_utils/index.py """ Build or load an index of decam files """ import os import logging import warnings logger = logging.getLogger('astropyp.index') def init_connection(connection, echo=False): from astropy.extern import six if isinstance(connection, six.string_types): from sqlalch...
#!/bin/bash #for the complete dataset ;) #rm -f ./data/WDI* #rm ./data/ip_jrn_art.csv #rm ./data/sp_pop_totl #load WDI data #wget --directory-prefix=./data http://databank.worldbank.org/data/download/WDI_csv.zip #unzip ./data/WDI_csv.zip -d ./data declare -a indicators=("IC.ISV.DURS" "SE.TER.ENRL.TC.ZS" "IP.PAT.RESD"...
#!/usr/bin/env bashio # ------------------------------------------------------------------------------ # Create the backup name by replacing all name patterns. # # Returns the final name on stdout # ------------------------------------------------------------------------------ function generate-backup-name { local...
package libs.trustconnector.scdp.util.tlv.simpletlv; import libs.trustconnector.scdp.util.tlv.*; import libs.trustconnector.scdp.util.tlv.bertlv.*; import libs.trustconnector.scdp.util.*; import libs.trustconnector.scdp.util.ByteArray; import libs.trustconnector.scdp.util.StringFormat; import libs.trustconnector.scdp...
#!/usr/bin/env python3 import logging import yaml from os import environ as env from typing import List from fire import Fire from gitlabdata.orchestration_utils import snowflake_engine_factory from sqlalchemy.engine import Engine def get_list_of_dbs_to_keep(yaml_path="analytics/load/snowflake/roles.yml"): with...
// ----------------------------------------------------------------------------- // MIT License // // Copyright (c) 2020 <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 r...
#!/usr/bin/env bash python search.py --phase train --dataroot database/maps \ --restore_G_path logs/pix2pix/map2sat/supernet/checkpoints/latest_net_G.pth \ --output_path logs/pix2pix/map2sat/supernet/result.pkl \ --direction BtoA --batch_size 32 \ --config_set channels-48 \ --real_stat_path real_stat/maps_sub...
<reponame>Jarunik/sm-team-finder package org.slos.battle.abilities.attack; import org.slos.battle.abilities.Ability; import org.slos.battle.abilities.AbilityClassification; import org.slos.battle.abilities.AbilityEffect; import org.slos.battle.abilities.AbilityType; import org.slos.battle.abilities.rule.target.SnaredR...
#!/bin/bash # Copyright 2012 Arnab Ghoshal # Copyright 2010-2011 Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # TH...
#!/bin/sh -eux apt-get install -y xubuntu-desktop; apt-get install -y xrdp; systemctl enable xrdp;
<reponame>dogezhou/lil-vue<gh_stars>0 interface Student { name: string, age: number, } const target: Student = { name: 'haha', age: 12, } const handler: ProxyHandler<Student> = { get(obj, prop: keyof Student) { console.log(`=== get target.${prop} ===`) return obj[prop] }, s...
// Profile collection db.createCollection('users_profiles') db.users_profiles.insert({ name: String, email: String, password: String }) // Settings collection db.createCollection('users_settings') db.users_settings.insert({ user_id: ObjectId, theme: String, notifications: Boolean }) // Activities collection db....
model = Sequential() model.add(Dense(8, input_dim=1, activation='relu')) model.add(Dense(4, activation='relu')) model.add(Dense(1, activation='sigmoid')) model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) model.fit(X_train, y_train, epochs=50, verbose=0)
import coremltools as ct def convert_and_save_models(tf_model_paths, dimensions): saved_mlmodel_paths = [] for i in range(len(tf_model_paths)): tf_model_path = tf_model_paths[i] height, width = dimensions[i] mlmodel = ct.convert(tf_model_path, source='tensorflow') saved_mlmodel_...
#!/bin/bash if test -z "$BASH_VERSION"; then echo "Please run this script using bash, not sh or any other shell." >&2 exit 1 fi install() { set -euo pipefail dst_dir="${K14SIO_INSTALL_BIN_DIR:-/usr/local/bin}" if [ -x "$(command -v wget)" ]; then dl_bin="wget -nv -O-" else dl_bin="curl -s -L" ...
python transformers/examples/language-modeling/run_language_modeling.py --model_name_or_path train-outputs/1024+0+512-shuffled-N/7-model --tokenizer_name model-configs/1536-config --eval_data_file ../data/wikitext-103-raw/wiki.valid.raw --output_dir eval-outputs/1024+0+512-shuffled-N/7-512+512+512-shuffled-256 --do_eva...
#!/bin/sh echo "replace {REDIS_HOST} to $REDIS_HOST" eval sed -i -e 's/\{REDIS_HOST\}/$REDIS_HOST/' /usr/local/skywalking/cache-server/config/config.properties echo "replace {REDIS_PORT} to $REDIS_PORT" eval sed -i -e 's/\{REDIS_PORT\}/$REDIS_PORT/' /usr/local/skywalking/cache-server/config/config.properties echo "r...
#!/bin/bash # Change trail pictures' permissions #url="http://localhost:8080" #url="http://localhost:3000" url="https://jatrailmap.com:443" if [ $# -lt 3 ]; then echo "usage: $0 username password trailid" exit 1 fi user=$1 pass=$2 trailid=$3 cookie_file=cookie get_cookie() { token="" while IFS='' read ...
#!/bin/sh file_name="cd-guidelines-$(git describe --abbrev=0 --tags)-$(date +'%Y%m%d-%H%M%S')" mkdir -p build gitbook pdf . build/${file_name}.pdf
#! /usr/bin/python import os, sys, wave, struct, pandas from contextlib import closing usage = """ Segments wave file based on csv file provided Usage: python SplitWave.py /path/to/csv Example: python SplitWave.py ~/Desktop/example.csv """ #Recursively get file name def getFileNames(path,fileExt): dirList = ...
export TF_VAR_project_name="${PROJECT_NAME}" export TF_VAR_project_environment="${PROJECT_ENVIRONMENT}" export AWS_CREDENTIALS_FILE="/home/${SHELL_USER}/.aws_credentials" if [ ! -f "${AWS_CREDENTIALS_FILE}" ] then create_credentials_file="" while \ [ "${create_credentials_file}" != "y" ] && [ "${cre...
#!/bin/bash set -ex export my_zone=us-central1-a export my_cluster=standard-cluster-1 gcloud container clusters resize $my_cluster --zone $my_zone --num-nodes=4 -y
<gh_stars>0 function CSVToArray ( inputToJson, DelimiterOfCsv ) { DelimiterOfCsv = (DelimiterOfCsv || ","); var RegexBase = new RegExp( ( "(\\" + DelimiterOfCsv + "|\\r?\\n|\\r|^)" + "(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|" + "...
<reponame>soyacen/grpc-middleware package grpcsonybreaker import ( "context" "github.com/sony/gobreaker" "google.golang.org/grpc" ) func UnaryClientInterceptor(Name string, opts ...Option) grpc.UnaryClientInterceptor { st := defaultSettings(Name) apply(st, opts...) cb := gobreaker.NewCircuitBreaker(*st) retur...
# Find python file alias pyfind='find . -name "*.py"' # Remove python compiled byte-code and mypy cache in either current directory or in a # list of specified directories function pyclean() { ZSH_PYCLEAN_PLACES=${*:-'.'} find ${ZSH_PYCLEAN_PLACES} -type f -name "*.py[co]" -delete find ${ZSH_PYCLEAN_PLACES...
package com.ytzb.chart.dataset; /** * Created by xinxin.wang on 18/5/2. */ public interface IBarDataSet extends IDataSet { int getPositiveColor(); int getNegativeColor(); }
/** * <a href="http://www.openolat.org"> * OpenOLAT - Online Learning and Training</a><br> * <p> * Licensed under the Apache License, Version 2.0 (the "License"); <br> * you may not use this file except in compliance with the License.<br> * You may obtain a copy of the License at the * <a href="http://www.apache...
def permutations(elements): # Calculate the number of permutations elements_permutation = len(elements)**len(elements) # Generate a list for all permutations permutations = [] # Iterate through the number of permutations for i in range(elements_permutation): permutation = [] # Cr...
<gh_stars>0 import {createFetcher, FetchArgs} from "./fetcher/fetcher" import {Zealot, ZealotPayload, SearchFormat} from "./types" import {createTime} from "./util/time" import {createZealot} from "./zealot" import {createZealotMock, ZealotMock} from "./zealot_mock" import * as zjson from "./zjson" import * as zng from...
#!/bin/bash echo "Async!!" sh test-runner.sh $1 $2 &
const express = require('express') const Utils = require('./utils') const Params = require('./params') const Middleware = require('./middleware') const CustomValidator = require('./custom.validator') const Router = require('./router') const ModuleChildren = require('./module.children') class Module { constructor ...
/* * 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, software * distribut...
#!/usr/bin/env bash # # Copyright (C) 2016 The CyanogenMod Project # Copyright (C) 2017 The LineageOS Project # # 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/li...
<reponame>wolfchinaliu/gameCenter package weixin.mailmanager; import org.apache.log4j.Logger; import org.jeecgframework.core.common.controller.BaseController; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMap...
def max_subarray_sum(array): current_max = array[0] global_max = array[0] for i in range(1, len(array)): current_max = max(array[i], current_max + array[i]) if current_max > global_max: global_max = current_max return global_max
import React from 'react'; import OuterContainer from './OuterContainer'; import style from '../styles/About.module.css'; import BackButton from './BackButton'; const About = () => ( <OuterContainer> <BackButton to="/" /> <div className={style.container}> <h2 style={{ textAlign: 'center' }}>About</h2> ...
name=speaker flag="--attn soft --angleFeatSize 128 --feature_size 512 --feature_extract img_features/CLIP-ViT-B-16-views.tsv --aug_env img_features/CLIP-ViT-B-16-views-st-samefilter.tsv --train speaker --style_embedding style_original.tsv --train_env both --valid_env original ...
#!/usr/bin/env bash set -e systemd=0 if [ "init-$(ps -o comm= 1)" == "init-systemd" ]; then systemd=1 fi which docker >/dev/null || ./getdocker.sh restart=0 target=/opt/docker mkdir -p "$target" if [ ! -z "$(git diff "$target/config" "config" 2>&1 || echo "new")" ]; then echo "docker config changed" restart...
<filename>google/ads/googleads/v8/googleads-ruby/lib/google/ads/googleads/v8/errors/conversion_value_rule_error_pb.rb # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v8/errors/conversion_value_rule_error.proto require 'google/api/annotations_pb' require 'google/protobuf' Goog...
docker build -t ino99/myweb-k8s:v2 .
<reponame>mini-crm/mini-crm /* * This file is generated by jOOQ. */ package tr.com.minicrm.productgroup.data.postgresql.generated.tables.pojos; import java.io.Serializable; /** * This class is generated by jOOQ. */ @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class ProductGroupTable implements S...
<filename>src/tree/Tree.js import React, { Component } from 'react'; import TreeNode from './TreeNode'; import './Tree.css'; class Tree extends Component { render() { const nodes = this.props.nodes || []; const className = `tree ${this.props.className}`; const TreeNodes = nodes.map((node, index) => ...
<filename>simulate_noisy_exp_growth.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- """Simple simulation on fitting exponential growth on noisy discrete samples. Background: growth of the AY.33 SARS-CoV-2 variant relative to other lineages, in the Netherlands. So far, we have collected about 400 samples of this line...
<gh_stars>0 import { Router } from 'express'; import { celebrate, Segments, Joi } from 'celebrate'; import ensureAuthenticated from '@modules/users/infra/http/middlewares/ensureAuthenticated'; import PetsController from '../controllers/PetsController'; import PetsUserController from '../controllers/PetsUserController'...
#!/usr/bin/sh BASEDIR=$(dirname "$0") # 切換目錄 # cd "$BASEDIR"/libraries/ cd "$BASEDIR"/../.. [ ! -d "libraries" ] && mkdir "libraries" # 更新 # -- hahalib cd "$BASEDIR"/../../libraries/hahalib git pull # pwd # read