text stringlengths 1 1.05M |
|---|
<reponame>openstreetcam/android<filename>app/src/main/java/com/telenav/osv/upload/operation/UploadOperationSequence.java<gh_stars>10-100
package com.telenav.osv.upload.operation;
import androidx.annotation.NonNull;
import androidx.core.util.Consumer;
import com.telenav.osv.common.event.SimpleEventBus;
import com.tele... |
def get_last_five(my_list):
return my_list[-5:] |
#!/usr/bin/env bash
set -e
# TODO: Set to URL of git repo.
PROJECT_GIT_URL='https://github.com/shahabbahrami-project/profiles-rest-api.git'
PROJECT_BASE_PATH='/usr/local/apps/profiles-rest-api'
echo "Installing dependencies..."
apt-get update
apt-get install -y python3-dev python3-venv sqlite python-pip supervisor ... |
import json
import requests
import time
def parse_json_data(url):
max_retries = 3
retries = 0
while retries < max_retries:
try:
r = requests.get(url)
r.raise_for_status() # Raise an exception for 4xx or 5xx status codes
data = json.loads(r.text)
retu... |
<gh_stars>10-100
/**
* @module
*/
/* eslint-disable require-await */
import * as plugin from "../plugin/vimeo.js";
import { matchPattern } from "../tools/matchpattern.js";
/**
* Extrait les informations nécessaire pour lire une vidéo sur Kodi. Seul les
* URLs des vidéos intégrées sont gérées car pour les URLs ver... |
import { Encrypter, Decrypter, HasherCompare, Hasher } from '@/data/protocols/cryptography'
export const mockHasher = (): Hasher => {
class HasherStub implements Hasher {
async hash (value: string): Promise<string> {
return Promise.resolve('hashed_password')
}
}
return new HasherStub()
}
export co... |
/*\
module-type: relinkfilteroperator
Given a title as an operand, returns all non-shadow tiddlers that have any
sort of updatable reference to it.
`relink:backreferences[]]`
`relink:references[]]`
Returns all tiddlers that reference `fromTiddler` somewhere inside them.
Input is ignored. Maybe it shouldn't do this.... |
import type { IActionHttp, IActorHttpOutput } from '@comunica/bus-http';
import { ActorHttp } from '@comunica/bus-http';
import { KeysHttpProxy } from '@comunica/context-entries';
import type { IActorArgs, IActorTest, Mediator } from '@comunica/core';
import type { IMediatorTypeTime } from '@comunica/mediatortype-time'... |
#!/bin/bash
# maintainer: zhaoyafei (https://github.com/walkoncross, zhaoyafei0210@gmail.com)
s=16
m=0.5
n=0
b=0
lambda=0
gpu=0
epoch=200
loss_type=cosface
python train_large_margin_zyf.py --cifar-dir ./data \
--net resnet20_cifar10_nofc \
--gpu-ids ${gpu} \
--lr-scheduler cosine \
--lr 0.1 \
--n... |
import React from 'react';
interface Props {
address: string;
genesisHash: string;
className?: string;
size?: string | number;
style?: React.CSSProperties;
}
declare function DisplayAddress({ address, className, genesisHash, size, style }: Props): React.ReactElement<Props> | null;
export declare con... |
import matplotlib.pyplot as plt
# Function to create and display the plot based on user input
def create_custom_plot():
plot_type = input("Enter the type of plot (line/scatter/bar): ").lower()
# Prompt user for data points
data_points = input("Enter the data points (comma-separated values): ").split('... |
#!/bin/bash
# Copyright 2016 - 2018 Crunchy Data Solutions, Inc.
# 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... |
require_relative 'sql'
module Sequent
module Migrations
##
# The executor is the implementation of the 3-phase deploy in Sequent.
# is responsible for executing the `Planner::Plan`.
#
class Executor
include Sql
def execute_online(plan)
plan.replay_tables.each do |migration|
... |
public boolean isPalindrome(int num) {
int rev = 0;
int temp = num;
while (temp != 0) {
rev = rev * 10 + temp % 10;
temp /= 10;
}
return (num == rev);
} |
swift download -o data_in/wrfout_d01_2017-12-09_00:00:00 wrf_long_run wrfout_d01_2017-12-09_00:00:00
swift download -o data_in/wrfout_d01_2017-12-09_01:00:00 wrf_long_run wrfout_d01_2017-12-09_01:00:00
swift download -o data_in/wrfout_d01_2017-12-09_02:00:00 wrf_long_run wrfout_d01_2017-12-09_02:00:00
swift download -o... |
#!/bin/sh
DIR=P02
name=p02
PREFIX=/local/Shared
(cd $PREFIX/output/gridded/$DIR; gzip *xyz)
for year in 1993 2004 2013
do
(cd $PREFIX/output/reported/work; zip ../$DIR/${name}_${year}_ct1.zip ${name}_${year}_????_ct1.csv; rm -fr ${name}_${year}_????_ct1.csv)
done
rm -f $PREFIX/output/reported/work/LOCK
|
<filename>client/src/App.js
import React, { useState, useEffect } from "react";
import GlobalStyle from "./GlobalStyle";
import SplashPage from "./pages/SplashPage";
import StartPage from "./pages/StartPage";
import ChoosingPage from "./pages/ChoosingPage";
import RoulettePage from "./pages/RoulettePage";
import Filter... |
class StringConverter {
public:
StringConverter(string str) {
m_str = str;
}
string toUpper() {
for (char& c : m_str) {
c = toupper(c);
}
return m_str;
}
private:
string m_str;
}; |
<reponame>amitksingh1490/Proptics<gh_stars>0
package optics
import cats.instances.either._
import cats.syntax.either._
import proptics.Iso
import proptics.Iso._
import proptics.instances.field2._
import proptics.instances.reverse._
import proptics.specs.PropticsSuite
import proptics.std.either._
import proptics.std.l... |
<reponame>PinoEire/archi<gh_stars>1-10
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.editor.diagram.figures;
import org.eclipse.draw2d.ColorConstants;
import org.eclips... |
<filename>.local/share/Trash/files/ch17/join.rb<gh_stars>0
# The Book of Ruby - http://www.sapphiresteel.com
words = ["hello", "world", "goodbye", "mars" ]
numbers = [1,2,3,4,5,6,7,8,9,10]
Thread.new{
words.each{ |word| puts( word ) }
}.join
Thread.new{
numbers.each{ |number| puts( number ) }
}.join |
$(function(){
$('#searchBtn').on('tap',function(){
//获取搜索的内容
var content = $(this).next().val();
//判断搜索内容是否为空
if(!content || $.trim(content)==''){
alert("请输入关键字");
return;
}
//将搜索的内容存入本地,如果有keys就存,没有就新创建一个
if(localStorage.getItem('keys')){
var current = JSON.parse(localStorage.getItem('keys'));
... |
// converted golang begin
package writer
import(
// "errors"
"fmt"
"encoding/json"
_core "nodejs/core"
JSON "nodejs/json"
"nodejs/console"
. "github.com/byteball/go-byteballcore/types"
)
import(
// _ "lodash"
// "async"
"github.com/byteball/go-byteballcore/constants"
"github.com/byteball/go-byteball... |
/////////////////////////////////////////////////////////////////////////////
// Name: src/osx/carbon/font.cpp
// Purpose: wxFont class
// Author: <NAME>
// Modified by:
// Created: 1998-01-01
// Copyright: (c) <NAME>
// Licence: wxWindows licence
//////////////////////////////////////////////... |
#!/usr/bin/env bash
# This script automatically detect the EasyEffects presets directory and installs the presets
GIT_REPOSITORY="https://raw.githubusercontent.com/JackHack96/PulseEffects-Presets/master"
check_installation() {
if command -v flatpak &> /dev/null; then
if flatpak list | grep -q "com.github.... |
#!/usr/bin/env bash
#
# Copyright (c) 2020 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compli... |
<reponame>DLSZY/flwoable
import { parse } from 'querystring';
import pathRegexp from 'path-to-regexp';
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=... |
///
/// [SIMINOV FRAMEWORK]
/// Copyright [2014-2016] [Siminov Software Solution LLP|<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/license... |
#
# From:
#
# https://lobste.rs/s/xhtim1/problems_with_shells_test_builtin_what
# http://alangrow.com/blog/shell-quirk-assign-from-heredoc
#### Blog Post Example
paths=`tr '\n' ':' | sed -e 's/:$//'`<<EOPATHS
/foo
/bar
/baz
EOPATHS
echo "$paths"
## stdout: /foo:/bar:/baz
#### Blog Post Example Fix
paths=`tr '\n' ':' ... |
<filename>src/styleParser.js<gh_stars>0
const axios = window.axios
axios.interceptors.response.use(function (response) {
const data = response.data
if (data.success) {
if (data.payload.css.errors && data.payload.css.errors.length) {
return {
success: false,
error: data.payload.css.errors.m... |
#!/bin/bash
# tool: sudo apt-get install valgrind; sudo apt-get install tee
name_comp='HMC_Model_V2_$RUN.x'
name_exec='HMC_Model_V2_MemoryTest.x'
# Settings
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/netcdf-4.1.2/lib/
ulimit -s unlimited
# Control executable file existence
if [ -f $name_exec ];
then
ec... |
<filename>android/guava/src/com/google/common/collect/RegularImmutableMap.java
/*
* Copyright (C) 2008 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.... |
package refinedstorage.integration.tesla;
import net.darkhax.tesla.api.ITeslaConsumer;
import net.darkhax.tesla.api.ITeslaHolder;
import net.minecraft.item.ItemStack;
import refinedstorage.item.ItemWirelessGrid;
public class WirelessGridEnergyTesla implements ITeslaHolder, ITeslaConsumer {
private ItemWirelessGri... |
#!/usr/bin/env zsh
main() {
ask_for_sudo
clone_dotfiles_repo
install_homebrew
install_packages_with_brewfile
setup_macOS_defaults
configure_zsh
configure_git
configure_ssh
configure_vscode
finish
}
DOTFILES_REPO=$HOME/.dotfiles
function ask_for_sudo() {
step "Prompting for... |
<gh_stars>0
declare const webkitAudioContext: typeof AudioContext;
type F = ( ctx: AudioContext ) => void;
export default class Context {
private readyQueue: F[] = [];
private started: Promise<AudioContext>;
public isSafari = typeof AudioContext === 'undefined' && !!webkitAudioContext;
public context: AudioCont... |
import { StateController } from 'trimop';
export type DB = { readonly [key: string]: unknown };
export function clearKV(db: StateController<DB>): undefined {
return db.set({});
}
export function deleteRecordKV(db: StateController<DB>, key: string): undefined {
return db.set(Object.fromEntries(Object.entries(db.g... |
#!/bin/sh
openssl req -batch -config postgres-client.cnf -newkey rsa:2048 -sha256 -out postgresclientcert.csr -outform PEM -nodes
|
<reponame>git-lt/weui-react<gh_stars>10-100
import React from 'react'
import { PopupPicker, Group, Cell } from '../../../src'
import Page from '../../component/page'
import chinaAddress from '../../../src/components/picker/china_address.json'
var Demo = React.createClass({
getInitialState(){
// console.log(chin... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for USN-3103-1
#
# Security announcement date: 2016-10-13 00:00:00 UTC
# Script generation date: 2017-01-01 21:05:39 UTC
#
# Operating System: Ubuntu 12.04 LTS
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - libdbd-mysql-perl:4.020-1ubuntu0.1
#... |
#ifndef INOUT_H
#define INOUT_H
#include "sinais.h"
void salvarSinais(Sinais *sinaisSaida, FILE *arqSaida);
Sinais* carregaEntradas(FILE *arquivo);
extern "C" Sinais* carregaArquivoSinais(const char* path);
#endif // INOUT_H
|
<gh_stars>0
export default {
elem: 'svg',
attrs: {
xmlns: 'http://www.w3.org/2000/svg',
viewBox: '0 0 24 24',
width: 24,
height: 24,
},
content: [
{
elem: 'path',
attrs: {
d:
'M20.8 7L17 3.2c-.1-.1-.3-.2-.5-.2h-12C3.7 3 3 3.7 3 4.5v15c0 .8.7 1.5 1.5 1.5h15c.8 0 ... |
import listChannels, { facts } from "../../api/methods/channel/list_channels"
import { TurboServer } from "../../turbo"
import { getRemoteIpAddress } from "../../remoteIpAddress"
export default (server: TurboServer) => {
server.get(facts, async (req, res, params) => {
const remoteIpAddress = getRemoteIpAd... |
<gh_stars>1-10
// Hibernation Setup Tool
// Sets up a swap area suitable to hibernate a Linux system.
//
// Copyright (c) 2021 Microsoft Corp.
// Licensed under the terms of the MIT license.
#define _GNU_SOURCE
/* sys/mount.h has to be included before linux/fs.h
* https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=89... |
import argparse
import os
import shutil
def main():
parser = argparse.ArgumentParser(description='File handling utility')
parser.add_argument('source', help='Path to the source file')
parser.add_argument('destination', help='Path to the destination file')
parser.add_argument('--overwrite', action='stor... |
require File.expand_path('../../../spec_helper', __FILE__)
require File.expand_path('../shared/succ', __FILE__)
describe "Symbol#succ" do
it_behaves_like :symbol_succ, :succ
end
|
class SqlInterface:
def __init__(self, database):
self.database = database
def query(self, query_string):
# Create and open a connection to the specified database
conn = sqlite3.connect(self.database)
# Create a cursor
c = conn.cursor()
# Execute the sql statement
c.execute(query_string)
# Retrieve t... |
<gh_stars>0
package com.trackorjargh.javaclass;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import java... |
import { useCreateQueryConfig, useMutation } from '@sarair/shared/hooks'
import { sarairRequest } from '@sarair/shared/request'
import { useTaskListQueryKey } from '.'
import type { Task } from '../../types'
export const useTaskCreate = () => {
const queryKey = useTaskListQueryKey()
const { isLoading, mutate... |
/* eslint-disable-next-line import/prefer-default-export,@typescript-eslint/no-explicit-any */
export type EnvOrDefault = (variableName: string, defaultValue?: any) => any;
|
#!/bin/bash
trap "echo exit;exit 0" SIGINT
apt-get install expect -y
echo "*/admin *" >> /etc/krb5kdc/kadm5.acl
yes CONTINUUM | krb5_newrealm
echo '
spawn kadmin.local
expect "kadmin.local:"
send "ank admin/admin\r"
expect "Enter password for principal"
send "CONTINUUM\r"
expect "Re-enter password for principal"
sen... |
import {useEffect, useState} from "react";
export const useIsMobileView = (): boolean => {
const [, update] = useState();
useEffect(() => {
const listener = () => update({});
window.addEventListener("resize", listener);
return () => window.removeEventListener("resize", listener);
})... |
#!/usr/bin/env bash
set -e -o pipefail
# shellcheck source=_config.sh
source "$(dirname "${BASH_SOURCE[0]}")/_config.sh"
cd "$ROOT"
cd "$DEV_FIXTURES_SERVER_ROOT"
echo "launching fixtures server for development (silent mode) in '$DEV_FIXTURES_SERVER_ROOT'"
set -x
python -m http.server "$DEV_FIXTURES_SERVER_PORT" ... |
<filename>message_bridge/jenkins_message_source.py
#!/usr/bin/python
import subprocess
import json
import base64
import uuid
import os
import redis
class RedisQueue(object):
"""Simple Queue with Redis Backend"""
def __init__(self, name, namespace='queue', **redis_kwargs):
"""The default connection para... |
# generate_exceRpt_lsf_sub_v5.sh
# Dan Spakowicz
# 15 Jan 2017
# This script generates the submission scripts for all of the data
OUTPATH=$DEF_DIR
for D in `find Sample* -type d ` ; do
echo '#BSUB -M 96000' >> $OUTPATH/${D}_exceRpt.sh
echo '#BSUB -R "span[hosts=1]"' >> $OUTPATH/${D}_exceRpt.sh
echo "#B... |
#!/bin/bash
set -eu
source $(cd $(dirname $0) && pwd)/helpers.sh
REPO_PATH=$1
${VMTEST_ROOT}/checkout_latest_kernel.sh ${REPO_PATH}
cd ${REPO_PATH}
if [[ "${KERNEL}" = 'LATEST' ]]; then
travis_fold start build_kernel "Kernel build"
cp ${VMTEST_ROOT}/configs/latest.config .config
make -j $((4*$(nproc))) olddefc... |
def foo(my_list):
return [item for item in my_list if item % 2 == 0] |
#!/usr/bin/env bash
#/ --update_script.sh--
#/ Pulls changes from remote main branch and then updates the local python package
#/
#/ Usage: update_script.sh [options]
#/
#/ Options
#/ -s|--skip-deps Skips update of dependencies.
#/ -v|--version Prints script... |
<filename>src/components/home/Product.tsx
import * as React from 'react';
import styled from 'styled-components';
import { ProductType } from '../../types';
import Img from 'gatsby-image';
import { StyledBtn } from '../styles/Buttons';
interface Props {
product: ProductType;
}
const StyledProduct = styled.section`
... |
import { FileReader } from '../../utils';
import { Challenge } from '../../utils/Challenge';
export default class Challenge28 implements Challenge {
private readonly input: string[] = new FileReader(14).getFileAsArray().filter((line) => line !== '');
private template: string[] = [];
private occurrences: { [key:... |
#!/usr/bin/env bash
# Copyright 2020 The Knative Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
def lis(input_array):
# Length of input Array
n = len(input_array)
# Declare the list (array) for storing the increasing subsequence
lis = [1]*n
# Compute longest increasing subsequence values in bottom up manner
for i in range (1 , n):
for j in range(0 , i):
if input_arra... |
# part of thin-farm.eye config
def thin(proxy, port)
name = "thin-#{port}"
opts = [
'-l thins.log',
"-p #{port}",
"-P #{name}.pid",
'-d',
'-R thin.ru',
"--tag #{proxy.app.name}.#{proxy.name}",
'-t 60',
"-e #{proxy.env['RAILS_ENV']}",
"-c #{proxy.working_dir}",
'-a 127.0.0.1... |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for DSA-3379-1
#
# Security announcement date: 2015-10-25 00:00:00 UTC
# Script generation date: 2017-01-01 21:07:35 UTC
#
# Operating System: Debian 8 (Jessie)
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - miniupnpc:1.9.20140610-2+deb8u1
# ... |
<filename>db/migrate/20151203001139_make_organisation_content_ids_not_null.rb<gh_stars>1-10
class MakeOrganisationContentIdsNotNull < ActiveRecord::Migration[5.0]
def change
change_column :organisations, :content_id, :string, limit: 255, null: false
end
end
|
//#####################################################################
// Copyright 2004. <NAME>, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#ifnd... |
import React from 'react'
import Layout from '../components/layout'
import { Typography, Box } from '@material-ui/core'
import Spacer from '../components/basic/Spacer'
import SiteContainer from '../components/SiteContainer'
import gif from '../images/Garage Lights/screenshot.gif'
import ViewSourceCodeButton from '../co... |
#!/bin/sh
MYABSPATH=$(readlink -f "$0")
PATCHBASE=$(dirname "$MYABSPATH")
CMBASE=$(readlink -f "$PATCHBASE/../../../../")
for i in $(find "$PATCHBASE"/* -type d); do
PATCHNAME=$(basename "$i")
PATCHTARGET=$PATCHNAME
for i in $(seq 4); do
PATCHTARGET=$(echo $PATCHTARGET | sed 's/_/\//')
if [ -d "$CMBASE/$PATCHT... |
// Copyright (c) 2018-2019 WING All Rights Reserved.
//
// Author : yangping
// Email : <EMAIL>
//
// Prismy.No | Date | Modified by. | Description
// -------------------------------------------------------------------
// 00001 2019/05/22 yangping New version
// 00002 2019/06/30 zhaixing ... |
import mongoose from 'mongoose';
import { ENV } from '@/utils/validateEnv';
const initDB = () => {
const options = {
autoIndex: false, // Don't build indexes
maxPoolSize: 10, // Maintain up to 10 socket connections
serverSelectionTimeoutMS: 5000, // Keep trying to send operations for 5... |
<reponame>akokhanovskyi/kaa
/*
* Copyright 2014-2016 CyberVision, Inc.
*
* 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 ... |
<reponame>tiancihe/X6
import type { Morpher } from '../morpher/morpher'
export type PrepareMethod<TAnimator> = (
this: TAnimator,
animator: TAnimator,
) => any
export type RunMethod<TAnimator> = (
this: TAnimator,
animator: TAnimator,
positionOrDelta: number,
) => any
export type RetargetMethod<TAnimator, ... |
<filename>second-example-application/src/test/java/com/github/robindevilliers/welcometohell/steps/BalletQuestion.java
package com.github.robindevilliers.welcometohell.steps;
import com.github.robindevilliers.cascade.annotations.*;
import com.github.robindevilliers.welcometohell.Utilities;
import org.openqa.selenium.By... |
/********************************************************************************************************
* @file adc.h
*
* @brief for TLSR chips
*
* @author telink
*
* @par Copyright (c) Telink Semiconductor (Shanghai) Co., Ltd.
* All rights reserved.
*
* The information... |
<filename>trash/_client/src/components/Board/List.js
import React from 'react';
import { Table, Row, Col, Button, Container, Badge } from 'react-bootstrap';
import { useHistory, useLocation } from "react-router-dom";
export default function List() {
const history = useHistory();
const location = useLocation();
... |
import _ from 'lodash';
import { Validator } from 'vee-validate';
import BigNumber from 'bignumber.js';
import Numeral from './numeral';
import Localize from '../localize';
import LocalStorageUtils from '../LocalStorageUtils';
export default {
setI18nLocale (locale) {
LocalStorageUtils.saveItem('user.locale', {... |
#!/bin/bash
# Get TF Lite model and labels
curl -O http://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
rm coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
# Get a labels file with corrected indices, delet... |
#!/usr/bin/env bash
# Exit immediately if a pipeline, which may consist of a single simple command,
# a list, or a compound command returns a non-zero status
set -e
readonly MONIKER=plantuml
readonly VERSION=1.2021.5
readonly STUFF=plantuml.$VERSION.jar
readonly INSTALLER_DIR=$(dirname "$(realpath "$0")")
readonly TA... |
package com.li.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
/**
*
* @Title: ExcelField.java
* @Package com.li.excel.annota... |
public class Person {
private String name;
private int age;
private String gender;
public Person(String name, int age, String gender) {
this.name = name;
this.age = age;
this.gender = gender;
}
public String getName() {
return name;
}
public int getAge() {
return age;
}
public String getGender() ... |
import matplotlib.pyplot as plt
def generate_seismic_visualization(prop: str, tag: str, depth: float, lon: float, lat: float) -> None:
# Create a figure and axis for the plot
fig, ax = plt.subplots()
# Set the title of the plot
ax.set_title('CVM%s %.0f m depth' % (tag, depth))
# Set the a... |
#!/usr/bin/env bash
cd www/ && npm run build && rm -rf ../docs && cp -r dist ../docs && cp -r roms ../docs |
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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 ... |
cite about-plugin
about-plugin 'Better bash history behaviors'
## shell history
# Don't record some commands in history
HISTIGNORE='exit:fg:bg:ls:sl:pwd:history:clear'
# don't put duplicate lines in the history. See bash(1) for more options
HISTCONTROL=ignoredups
# for setting history length see HISTSIZE and HISTFILES... |
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* Write a description of class zomb_gen here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class zomb_gen extends Actor
{
/**
* Act - do whatever the zomb_gen wants to do. This method is cal... |
<reponame>jumpyapple/gallant-grasshoppers
import sys
from blessed import Terminal
class BasePage:
"""Base class for a page."""
def __init__(self, state: object, term: Terminal, renderstate: object):
self.state = state
self.term = term
self.renderstate = renderstate
def render(se... |
export KALDI_ROOT=/home/kaldi/
[ -f $KALDI_ROOT/tools/env.sh ] && . $KALDI_ROOT/tools/env.sh
export PATH=$PWD/utils/:$KALDI_ROOT/tools/openfst/bin:$PWD:$PATH
[ ! -f $KALDI_ROOT/tools/config/common_path.sh ] && echo >&2 "The standard file $KALDI_ROOT/tools/config/common_path.sh is not present -> Exit!" && exit 1
. $KALD... |
<filename>test/integration/auth/pages/login.tsx
import login from "app/mutations/login"
import logout from "app/mutations/logout"
import getCurrentUser from "app/queries/getCurrentUser"
import {useMutation, useQuery, useRouter} from "blitz"
import {Suspense, useState} from "react"
function Content() {
const router =... |
// Copyright 2021 Security Scorecard Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... |
import { BasePage } from "./base";
import { ProductDetailsModel } from "../models/productDetailsModel";
export class ProductDetailsPage extends BasePage {
addToCart(){
$('button[name="add_cart_product"]').click();
browser.pause(1000);
}
public getProductPrice(): number {
return par... |
import re
def extract_information(html_content: str) -> (int, str):
# Extract GitHub stars
stars_match = re.search(r'<gh_stars>(\d+)', html_content)
stars = int(stars_match.group(1)) if stars_match else 0
# Extract welcome message
message_match = re.search(r'<span style="color:#fff;">(.*?)&nbs... |
<gh_stars>1000+
//
// CSVConfiguration.h
// Table Tool
//
// Created by <NAME> on 21.07.15.
// Copyright (c) 2015 Egger Apps. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CSVConfiguration : NSObject <NSCopying>
@property NSStringEncoding encoding;
@property NSString *columnSeparator;
@pro... |
<reponame>ooooo-youwillsee/leetcode
/**
* @author ooooo
* @date 2021/3/6 13:05
*/
#ifndef CPP_0503__SOLUTION1_H_
#define CPP_0503__SOLUTION1_H_
#include <iostream>
#include <vector>
#include <stack>
using namespace std;
// 单调栈 ,底部元素最大
class Solution {
public:
vector<int> nextGreaterElements(vector<int> &nums)... |
/*
* 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 ... |
#!/bin/sh
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Safecrex-Qt.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
OUTROOT=osx
if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
echo "example: $0 -s MyIdentity"
exit 1
fi
rm -rf ${TEMPDIR} ${TEMPLIST}
mkdir -p ${T... |
/*
* Copyright 2017-2018 IBM 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
*
* Unless required by applicable law or agree... |
<gh_stars>10-100
/*
* The MIT License - http://www.opensource.org/licenses/mit-license
* Copyright (c) 2017 <NAME>.
*/
/*global WorldWind*/
/**
* BookmarkDialog presents a dialog that displays a given url and
* provides a button that copies it to the clipboard.
*
* @param {Knockout} ko
* @param {JQuery} $
... |
from __future__ import absolute_import, division, print_function, unicode_literals
from decimal import Decimal
import unittest
from amaascore.assets.synthetic import Synthetic
from amaascore.tools.generate_asset import generate_synthetic
class SyntheticTest(unittest.TestCase):
def setUp(self):
self.lon... |
class StateMachine:
def __init__(self, state_action_type):
self.state_action_type = state_action_type
self.column = 0
def state(self, action):
if self.state_action_type == 1:
if action == 1:
return (True, 2)
elif action == 2:
retur... |
<reponame>nervmaster/minesweeper<gh_stars>0
module MineSweeper
require_relative "PrettyPrinter"
require_relative "minesweeper"
require_relative "States_Constants"
def self.parse_bombs(board_state)
bomb_cells = []
board_state.each_index do |x|
board_state[0].each_index do |y|... |
export { default } from 'components/Dropdown/Dropdown';
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.