text stringlengths 1 1.05M |
|---|
#!/usr/bin/bash
set -e
echo "Info: build-install-tree.sh"
# BUILD_ROOT is the build prefix e.g. /var/mock/xxx
BUILD_ROOT=${1:? build root}
# BIN, LIB, MAN1 and DESKTOPFILES are path on the target e.g. /usr/bin etc
BIN=${2? bin folder}
LIB=${3? lib folder}
MAN1=${4? man1 folder}
DOC=${5? doc folder}
DESKTOPFILES=${6? d... |
<filename>app/models/medical_treatment.rb
class MedicalTreatment < ActiveRecord::Base
belongs_to :medical_problem
has_many :tasks
has_many :bat_changes, :order => "date desc"
def self.current
find(:all, :conditions => 'date_closed is null')
end
def self.expired
find(:all, :conditions => 'date_c... |
#!/bin/bash -x
#
# Install various tools (Debian packages) used in the configuration.
#
# @author Michal Turek
#
apt-get update
apt-get install --yes acpi
apt-get install --yes alsa-utils
apt-get install --yes apt-file
apt-get install --yes arandr
apt-get install --yes autoconf
apt-get install --yes automake
apt-get... |
<reponame>smagill/opensphere-desktop
package io.opensphere.kml.datasource.controller;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.net.URL;
import java.security.GeneralSecurityException;
import javax.xml.stream.events.... |
package org.chzz.textview.util;
import android.util.Log;
import org.chzz.textview.BuildConfig;
/**
* Created by hanks on 15-12-14.
*/
public class HLog {
public static void i(Object s){
if(BuildConfig.DEBUG) {
Log.i("HLog", s.toString());
}
}
}
|
class Student:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, name):
if not isinstance(name, str) or not name:
raise ValueError("Name must be a non-empty string")
self._name = name |
import hashlib
import sys
def duplicate_sim(sim_name, sim_file, sim_args):
sim_info = sim_name + sim_file + ''.join(sim_args)
db_id = hashlib.md5(sim_info.encode()).hexdigest()
return db_id |
<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_golf_course_outline = void 0;
var ic_golf_course_outline = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0V0z",
"fill": "none"
},
"children": []... |
<reponame>Teemmer/pump-41
import numpy as np
from math import sqrt
class Delaunay:
def __init__(self, center=(0, 0), radius=9999):
""" Init and create a new frame to contain the triangulation
center -- Optional position for the center of the frame. Default (0,0)
radius -- Optional distan... |
import React from "react"
import renderer from "react-test-renderer"
import Metadata from "."
describe("components/Metadata", (): void => {
it.each([["<EMAIL>", "Foo Bar", "foo bar test", "Foo", "Bar"]])(
"data: %p",
(
author: string,
description: string,
keywords: string,
title: stri... |
import path from 'path';
import webpack from 'webpack';
export default {
devtool: 'cheap-module-eval-source-map',
entry: [
'./src/zoomer',
],
output: {
path: path.join(__dirname, 'static'),
library: 'Zoomer',
libraryTarget: 'umd',
umdNamedDefine: true,
filename: 'zoomer.js',
publicPath: '/',
},
plu... |
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
CREATE USER $API_USER PASSWORD '$API_PASS';
CREATE DATABASE $API_DB;
GRANT ALL PRIVILEGES ON DATABASE $API_DB TO $API_USER;
EOSQL
|
#!/bin/bash
ids_list=ids.conf
images_list=images.conf
sudo docker ps -aq > $ids_list
sudo docker images -q > $images_list
input=$ids_list
while IFS= read -r line
do
sudo docker stop $line
sudo docker rm $line
done < $input
input=$images_list
while IFS= read -r line
do
sudo docker rmi $line
done < $input
sudo... |
#
# Copyright 2016-2019 Crown Copyright
#
# 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 i... |
package com.donfyy.shrink;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ac... |
#!/bin/bash
install -d $PREFIX/bin
install -d $PREFIX/etc
install -d $PREFIX/lib
install -d $PREFIX/scripts
install -d $PREFIX/swift-t
build_dir='dev/build/'
cd ${build_dir}
bash init-settings.sh
# sed 's;SWIFT_T_PREFIX=/tmp/swift-t-install;SWIFT_T_PREFIX='"$PREFIX"'/swift-t;' -i swift-t-settings.sh
# sed 's;ENABLE_... |
create_user_with_ssh_private_key() {
USER=${1}
HOME=/home/${USER}
# create group
groupadd ${USER}
# create user
useradd -k /etc/skel -p NP -m -s /bin/zsh -g ${USER} ${USER}
# setup ssh key
mkdir -p /home/${USER}/.ssh/
ssh-keygen -N "" -t rsa -v -f ${HOME}/.ssh/id_rsa
mv ${HOME}/.ssh/id_rsa.pub $... |
class Hashmap {
constructor() {
this._storage = [];
}
get(key) {
const i = this.hashStr(key);
if (!this._storage[i]) return undefined;
for (let keyVal of this._storage[i]) {
if (keyVal[0] === key) return keyVal[1];
}
}
hashStr(str) {
return str.split('').reduce((a, c) => a + ... |
<reponame>ramirobg94/owasp-dependency-check
import sqlalchemy
from flask import Blueprint, current_app, request, jsonify
# from security_dependency_check import Project, celery, AVAILABLE_TASKS
from security_dependency_check import Project, celery
checker_app = Blueprint("checker_app", __name__)
@checker_app.rout... |
<reponame>Solidaric-org/ladenliebe-org
package api
import (
"encoding/json"
"fmt"
"net/http"
"github.com/ManuStoessel/wirvsvirus/backend/entity"
"github.com/gorilla/mux"
log "github.com/sirupsen/logrus"
)
func getImage(w http.ResponseWriter, r *http.Request) {
queries := mux.Vars(r)
w.Header().Set("Content-... |
def delete_values(arr, val):
i = 0
size = len(arr)
while i < size:
if arr[i] == val:
arr[i] = arr[size-1]
size-=1
else:
i+=1
# Remaining elements
while size:
arr.pop()
size-=1
return arr
# Driver Code
print(dele... |
<reponame>Shanfan/Illustrator-Scripts-Archive
// Tangents From A Point
// draws tangent lines from a selected anchor point to selected curved segments.
// This script tries to find a path with only 1 anchor selected,
// from foreground to background. And specifies the selected point
// of the path as starting p... |
#!/usr/bin/env bash
# Copyright Amazon.com Inc. or its affiliates. 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
#
#... |
<reponame>domonda/go-sqldb
package db
import (
"context"
"fmt"
"time"
"github.com/domonda/go-sqldb"
)
// SetConn sets the global connection returned by Conn
// if there is no other connection in the context passed to Conn.
func SetConn(c sqldb.Connection) {
if c == nil {
panic("must not set nil sqldb.Connecti... |
git config --global credential.helper "cache --timeout=10800"
git commit -a -m cambios
git push
|
/*
* Copyright (C) 2012 Sony Mobile Communications AB
*
* This file is part of ApkAnalyser.
*
* 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/LIC... |
#!/bin/bash
cd "$(dirname -- "$(dirname -- "$(readlink -f "$0")")")"
for cmd in black autopep8 isort; do
if [[ ! -x "$(which "$cmd")" ]]; then
echo "Could not find $cmd. Please make sure that black, autopep8, and isort are all installed."
exit 1
fi
done
# Order is important. There are a few th... |
# InOrderTraversal
def InOrderTraversal(root, res=[]):
if root is None:
return res
InOrderTraversal(root.left, res)
res.append(root.val)
InOrderTraversal(root.right, res)
return res
# PreOrderTraversal
def PreOrderTraversal(root, res=[]):
if root is None:
return res
res.appe... |
<filename>src/KSeq.ts
import {Ident, IdentSet, IdentGenerator, LSEQIdentGenerator, Segment} from './idents';
import {AtomList, ArrayAtomList} from './storage';
import {Op, OpKind, InsertOp, RemoveOp} from './Op';
/**
* A CmRDT sequence that supports concurrent simultaneous editing
* while preserving the intention of... |
#!/bin/bash
# - Update src/manifest.json with the new version number
# - Run the below command
# - Then the file /manifests.json also needs to be updated with the new manifest file
npm run dist && cp publish/org.joplinapp.plugins.RegisterCommandDemo.jpl ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.Register... |
package baggageclaimcmd
import (
"bufio"
"bytes"
"errors"
"fmt"
"io"
"os"
"os/exec"
"syscall"
"code.cloudfoundry.org/lager"
"github.com/concourse/concourse/worker/baggageclaim/fs"
"github.com/concourse/concourse/worker/baggageclaim/kernel"
"github.com/concourse/concourse/worker/baggageclaim/volume"
"gith... |
<gh_stars>1-10
/*
* Copyright 2017 ~ 2025 the original author or authors. <<EMAIL>, <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/LIC... |
#!/usr/bin/env bash
#
# Wrapper script for running problemtools directly from within the
# problemtools repo without installing it on the system. When
# installing problemtools on the system properly, this script should
# not be used.
export PYTHONPATH=$(readlink -f $(dirname $0)/..):$PYTHONPATH
exec python2 -m probl... |
#!/bin/bash
# ================================================
# Function to check and request sudo permission
#
# @usage
# needsSudoPermission
# ================================================
needsSudoPermission() {
# Check if we have sudo access
if ! hasSudo
then
# First, check for an existing ... |
#The command below this text says hello world.
echo hello world!
|
void readRegister(int memoryBank, int memoryAddress, int* output) {
// Perform read operation from the specified memory bank and address
// and store the data in the output array
// Pseudocode: output = memory[memoryBank][memoryAddress]
*output = memory[memoryBank][memoryAddress];
}
void writeRegister(... |
#!/bin/bash
# Copyright
# 2018 Johns Hopkins University (Author: Jesus Villalba)
# Apache 2.0.
#
. ./cmd.sh
. ./path.sh
set -e
stage=1
config_file=default_config.sh
use_gpu=false
xvec_chunk_length=12800
ft=0
. parse_options.sh || exit 1;
. $config_file
if [ "$use_gpu" == "true" ];then
xvec_args="... |
<gh_stars>10-100
from __future__ import print_function
if 1:
# deal with old files, forcing to numpy
import tables.flavor
tables.flavor.restrict_flavors(keep=["numpy"])
import numpy
import sys, os
import flydra_analysis.a2.core_analysis as core_analysis
import argparse
import flydra_analysis.analysis.fl... |
device=$1
boot_dir=`mktemp -d /tmp/BOOT.XXXXXXXXXX`
root_dir=`mktemp -d /tmp/ROOT.XXXXXXXXXX`
linux_dir=tmp/linux-5.10
linux_ver=5.10.46-xilinx
root_tar=ubuntu-base-20.04.2-base-armhf.tar.gz
root_url=http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/$root_tar
passwd=escondido
timezone=America/Argentina/M... |
<reponame>SammyVimes/ignite-3
/*
* 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.... |
#!/bin/sh
INSTANCE=$1
ROOM=$2
HOST=$3
JVMMS=$4
JVMMX=$5
VOXXR_HOME=~/dev/wkspace/voxxr/voxxr
SEED_IP=`cat $VOXXR_HOME/voxxr-room/current-seed-ip`
cd $VOXXR_HOME/voxxr-room && ant deps && cd -
cd $VOXXR_HOME && tar czvf out/production/voxxr-room.tgz voxxr-room && cd -
echo "starting instance"
ovhcloud instance start... |
const HtmlWebpackPlugin = require('html-webpack-plugin');
const paths = require('react-scripts/config/paths');
const rewireEntry = (entrys) => {
const entry = getEntryObject(entrys);
return {
rewireWebpackEntryConfig: (config, env) => {
config = rewireEntryConfig(entry, config, env);
config = rew... |
<gh_stars>0
/* An STM32 HAL library written for the the MAX30100 pulse oximeter and heart rate sensor. */
#include "max30100_for_stm32_hal.h"
#include "main.h"
#ifdef __cplusplus
extern "C"{
#endif
I2C_HandleTypeDef *_max30100_ui2c;
UART_HandleTypeDef *_max30100_uuart;
uint8_t _max30100_it_byte = 0x00;
uint8_t _max301... |
<reponame>MarcosRibas/Projeto100Exercicios<filename>Python/ex074.py
"""Ex074 Crie um programa que vai gerar cinco números aleatórios e colocar em uma tupla.
Depois disso, mostre a listagem de números gerados s também indique o menor e o maior valor que estão na tupla
"""
from random import randint
s = (randint(1,10), r... |
var fs = require('fs');
var fsp = require('path');
var input = fsp.join(__dirname, 'node_modules/@types/node/index.d.ts');
var output = fsp.join(__dirname, 'index.d.ts');
var openRe = /\{\s*$/;
var closeRe = /^\s*\}/;
var importRe = /^\s*import /;
var ns = false;
var skippingModule = false;
var result = fs.readFile... |
quickSort :: (Ord a) => [a] -> [a]
quickSort [] = []
quickSort (x:xs) =
let smallOrEqual = [a | a <- xs, a <= x]
larger = [a | a <- xs, a > x]
in quickSort smallOrEqual ++ [x] ++ quickSort larger |
#!/bin/sh
cat <<'EOF' >> /root/.bashrc
export NVM_DIR="/home/app/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
EOF
|
package trace
import (
"io"
"github.com/fighthorse/redisAdmin/component/conf"
"github.com/opentracing/opentracing-go"
)
var (
traceServiceName = "app"
traceFileName = "/data/logs/trace/trace_redis.log"
tracesamplingRate = 0.0001
traceCloser io.Closer
)
func Init() {
traceServiceName = conf.GConf... |
<gh_stars>1-10
export type Method = 'OPTIONS' | 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'TRACE' | 'CONNECT';
export interface Config {
contentType?: string;
/** 是否显示Toast */
useErrMsg?: boolean;
}
|
#! /bin/sh
#PBS -l nodes=1:ppn=1
#PBS -l walltime=1:00:00
#PBS -j oe
if [ -n "$PBS_JOBNAME" ]
then
source "${PBS_O_HOME}/.bash_profile"
cd "$PBS_O_WORKDIR"
module load gcc/5.3.0
fi
prefix=../../gekko-output/no-data-run-4
ecoevolity --seed 325760832 --prefix ../../gekko-output/no-data-run-4 --ignore-data ... |
<?php
$term = $_GET['term'];
$term = "%" . $term . "%";
$conn = mysqli_connect("localhost", "username", "password", "database");
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELECT title FROM books WHERE title LIKE ?;";
$stmt = mysqli_prepare($conn, $sql);
mysqli_stmt_bind_param($stm... |
<gh_stars>0
package py.edu.uca.lp3.service;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import py.edu.uca.lp3.domain.Ong;
import py.edu.uca.lp3.repository.OngRepository;
imp... |
public enum DataMode {
NORMAL,
HIGHLIGHTED,
COMPRESSED
}
public class ColumnBuilder {
private DataMode mode;
public ColumnBuilder setMode(DataMode mode) {
this.mode = mode;
return this;
}
public DataMode getMode() {
return mode;
}
} |
#!/bin/bash
function error {
printf "\e[91m$@\e[0m\n"
}
function usage {
echo "###############################################################################"
echo "# run 'verify.integ.graphql-schema.sh --start' to deploy #"
echo "# run 'verify.integ.graphql-schema.sh --check [APIKEY]... |
package drogaria;
import java.util.Scanner;
public class compra {
public String remedio;
public int qtdRemedio;
public float valorRemedio;
public String produto;
public int qtdProduto;
public float valorProduto;
Scanner ler = new Scanner(System.in);
public compra(String remed... |
<filename>src/imageTools/mouseWheelTool.js<gh_stars>1-10
(function($, cornerstone, cornerstoneTools) {
'use strict';
function mouseWheelTool(mouseWheelCallback) {
var toolInterface = {
activate: function(element) {
$(element).off('CornerstoneToolsMouseWheel', mouseWheelCall... |
<gh_stars>0
package com.meterware.httpunit;
/********************************************************************************************************************
* $Id: FrameSelector.java 688 2004-09-29 17:15:27Z russgold $
*
* Copyright (c) 2004, <NAME>
*
* Permission is hereby granted, free of charge, to any per... |
import click
from .cmd_key import cli as revoke
@click.command('revoke', short_help='Revoke API key')
@click.option('--api-key', '-K', required=True, help='API Key or UUID')
@click.pass_context
def cli(ctx, api_key):
ctx.invoke(revoke, delete=api_key)
|
<reponame>souzafcharles/Data-Structure
/*
Class title: Data Structure
Lecturer: Prof. Dr. <NAME>
Example adapted by: <NAME>
Date: October 26, 2021
*/
#include<stdio.h>
#include <stdlib.h>
typedef struct No {
int v;
struct No *prox;
} No;
typedef struct {
No **adjacencia;
int n;
} Grafo;
void inicia_... |
/**
* Java class representation of an employee
*/
public class Employee {
private String name;
private String address;
private int age;
private double salary;
public Employee(String name, String address, int age, double salary) {
this.name = name;
this.address = address;
... |
Ext.application({
name: "GeekFlicks",
appFolder: "app",
controllers: ['Movies'],
launch: function () {
Ext.create('Ext.container.Viewport', {
layout: 'fit',
items: [{
xtype: 'panel',
title: 'Top Geek Flicks of All Time',
ite... |
<gh_stars>1-10
# profile.py
import time
import os
import psutil
import inspect
def elapsed_since(start):
#return time.strftime("%H:%M:%S", time.gmtime(time.time() - start))
elapsed = time.time() - start
if elapsed < 1:
return str(round(elapsed*1000,2)) + "ms"
if elapsed < 60:
return st... |
#define _XOPEN_SOURCE 500 // usleep (>= 500)
#include <features.h>
#include <stdio.h>
#include <memory.h>
#include "defs.h"
#include <unistd.h> // ssize_t
#include <sys/select.h> // fd_set
#include "fakeconn.h"
#define VT100BUF_MAX 40
typedef struct vt100out vt100out_s;
struct vt100out {
char buf[VT100BUF_MAX];
siz... |
#!/bin/bash
git clone https://github.com/pyiron/pyiron_continuum "$HOME"/pyiron_continuum/
cp "$HOME"/pyiron_continuum/notebooks/fenics_tutorial.ipynb "$HOME"/
cp "$HOME"/pyiron_continuum/notebooks/damask_tutorial.ipynb "$HOME"/
rm -r "$HOME"/pyiron_continuum
rm "$HOME"/*.yml
rm "$HOME"/Dockerfile
rm "$HOME"/*.sh
|
# Install zip and start a virtual frame buffer.
if [ "$DRONE" = "true" ]; then
sudo apt-get -y -q install zip
sudo apt-get -y -q install libappindicator1
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo start xvfb
exp... |
<gh_stars>0
destination = input()
while destination != "End":
need_money = int(input())
money = 0
while money < need_money:
saved_money = int(input())
money += saved_money
else:
print(f"Going to {destination}")
destination = input() |
#!/bin/bash
# Copyright 2021 CYBERCRYPT
#
# 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 ... |
import Foundation
enum CharacterSetName: String, Decodable {
case letters, uppercaseLetters, lowercaseLetters, alphaNumerics, decimalDigits, whitespacesAndNewlines, whitespaces, newlines, backslash
}
struct Terminal: Decodable {
let name: String
let string: String
}
func countCharacterSets(in terminalStr... |
def print_primes(n):
for num in range(2, n+1):
if all(num % i != 0 for i in range(2, num)):
print(num, end=' ') |
<reponame>dvinubius/meta-multisig
import { oneRemInPx } from '~~/styles/styles';
export const remToPx = (v: number): number => oneRemInPx * v;
|
#!/usr/bin/env bash
### ===================
# Prepare the app package, including
#
# - IPA file
# - ".dsym.zip" file
### ===================
echo "iOS_BUILD = $iOS_BUILD"
if [ "$BUILD_APP" != true -o "$iOS_BUILD" != true ]; then
echo "Info: Can only run for iOS build. Skip~~~"
exit 0
fi
OUTPUTDIR="$P... |
'use strict'
/**
* adonis-websocket
*
* (c) <NAME> <<EMAIL>>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
const cluster = require('cluster')
const debug = require('debug')('adonis:websocket')
const receiver = require('./receive... |
class Leaderboard:
def __init__(self):
self.player_scores = []
def add_score(self, player_name, score):
for i, (name, _) in enumerate(self.player_scores):
if name == player_name:
self.player_scores[i] = (player_name, score)
break
else:
... |
HPARAMS_STR+="l1_dense_regularizer=true," |
# Authentication: $AMADEUS_CLIENT_ID & $AMADEUS_CLIENT_SECRET can be defined
# in your environmental variables or directly in your script
ACCESS_TOKEN=$(curl -H "Content-Type: application/x-www-form-urlencoded" \
https://test.api.amadeus.com/v1/security/oauth2/token \
-d "grant_type=client_credentials&client_id=$AMADEU... |
<filename>example37-three-to-handle-goroutine/Context/main.go
package main
import (
"context"
"fmt"
"time"
)
func foo(ctx context.Context, name string) {
go bar(ctx, name) // A calls B
for {
select {
case <-ctx.Done():
fmt.Println(name, "A Exit")
return
case <-time.After(1 * time.Second):
fmt.Prin... |
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<p>Enter search keyword:<input type="text" ng-model="keyword" /></p>
<button ng-click="search()">Search</button>
<ul>
<li ng-repeat="item in items">
... |
<reponame>RobertStivanson/CPP-Sorts
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <time.h>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
// Global Variables
// These are counters that are used when the sorting happens
int NUMBER_OF_COMPARISONS, NUMBER_OF_SWAPS;
cons... |
<reponame>coveo/tgf-images
import argparse
import logging
import os
import re
import subprocess
from contextlib import contextmanager
from pathlib import Path
from subprocess import CompletedProcess
from typing import Generator, List
TARGET_REGISTRY = "ghcr.io/coveooss/tgf"
def _run_command(command: List[str], captu... |
<reponame>zakiahmad857/Advanced-Video<gh_stars>100-1000
#pragma once
// CAssistantBox dialog
#include "AGButton.h"
#include "AgoraCameraManager.h"
#include "AgoraAudInputManager.h"
#include "AgoraPlayoutManager.h"
#include "CHookPlayerInstance.h"
class CAssistantBox : public CDialogEx
{
DECLARE_DYNAMIC(CAssistantB... |
#!/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)"... |
import sys
import os
import logging
from db.db_handler import *
from utils.crypto_utils import sign_senz
from config.config import *
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
filehandler = logging.FileHandler('logs/stock_exchange.logs')
filehandler.setLevel(logging.INFO)
# create a logging f... |
#!/bin/bash
wget -O last_model.pt https://www2.informatik.uni-hamburg.de/WTM/corpora/GASP/gazenet/models/saliency_prediction/gasp/checkpoints/pretrained_sequencegaspdamencgmualstmconv/SequenceGASPDAMEncGMUALSTMConv/53ea3d5639d647fc86e3974d6e1d1719/last_model.pt
|
package main;
import java.util.Scanner;
public class WindChillTemperature
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
System.out.print("Enter the temperature in Fahrenheit: ");
double temperature = input.nextDouble();
System.out.print("Enter the wind speed mil... |
package com.wmedya.javatools.test;
import org.junit.Before;
import org.junit.Test;
import com.wmedya.javatools.numbertoword.lang.EnglishNumberToWord;
import junit.framework.Assert;
public class EnglishNumberToWordTests {
private EnglishNumberToWord toWords;
@Before
public void setUp() {
toWords = new English... |
<reponame>dk123sw/hybrid-Development
package com.example.jingbin.webviewstudy.audio_record;
import android.Manifest;
import android.app.Activity;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.v4.app.ActivityCo... |
package com.github.peacetrue.beans.create;
import com.github.peacetrue.beans.properties.createtime.CreatedTime;
import com.github.peacetrue.beans.properties.creatorid.CreatorId;
/**
* @author peace
* @since 1.0
**/
public interface Create<T, S> extends
CreateCapable<T, S>, CreateAware<T, S>,
Creato... |
<gh_stars>1-10
/**
* <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="ht... |
public class Student {
private String name;
private int rollNo;
private int marks1, marks2, marks3;
public Student(String name, int rollNo, int marks1, int marks2, int marks3) {
this.name = name;
this.rollNo = rollNo;
this.marks1 = marks1;
this.marks2 = marks2;
this.marks3 = marks3;
}
public String ... |
#!/usr/bin/env bash
# Goal of the script :
# 1) Deploy Launcher mission control template using the parameters passed to authenticate the user,
# 2) Setup the Github identity (account & token) &
# 3) Patch jenkins to use admin as role
#
# Command to be used
# ./deploy_launcher_minishift.sh -p projectName -i username:pa... |
<gh_stars>1-10
# -*- coding: utf-8 -*-
# API REST:
from rest_framework import serializers
# Modelos:
from django.contrib.auth.models import User
from .models import Profile
class UserSerializer(serializers.HyperlinkedModelSerializer):
full_name = serializers.SerializerMethodField()
class Meta:
mod... |
class Game {
constructor() {}
getState(){
var gameState = database.ref('gameState')
gameState.on("value",function(data){
gameState = data.val()
})
}
start() {
player = new Player();
player.GetCount()
form = new Form();
form.display();
}
}
|
/*
Copyright 1991, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in suppor... |
package de.unibi.agbi.biodwh2.reactome.entities;
import org.neo4j.ogm.annotation.NodeEntity;
/**
* Created by manuel on 12.12.19.
*/
@NodeEntity(label = "URL")
public class URL extends Publication {
public String uniformResourceLoader;
public URL() {
}
public String getUniformResourceLoader() {
... |
<filename>OLD/js/config.template.js
// TO MAKE THE MAP APPEAR YOU MUST
// ADD YOUR ACCESS TOKEN FROM
// https://account.mapbox.com
const mapBoxToken = '<your access token here>';
|
<gh_stars>100-1000
/*
Package parsec provides a library of parser-combinators. The basic
idea behind parsec module is that, it allows programmers to compose
basic set of terminal parsers, a.k.a tokenizers and compose them
together as a tree of parsers, using combinators like: And,
OrdChoice, Kleene, Many, Maybe.
To be... |
require 'test_helper'
class StringExtensionTest < ActiveSupport::TestCase
test 'string#present_tense should exist' do
assert "".respond_to? :present_tense
end
test 'string#present_tense converts our words' do
assert "opened".present_tense == "open"
assert "reopened".present_tense == "reopen"
ass... |
import argparse
from typing import Optional
def add_parser(subparsers: Optional[argparse._SubParsersAction] = None):
subcommand_name = "filesystem"
subcommand_help = "ファイル操作関係(Web APIにアクセスしない)のサブコマンド"
description = "ファイル操作関係(Web APIにアクセスしない)のサブコマンド"
if subparsers is not None:
# Add the "filesy... |
import { ITableDataDescription } from './ITable';
/**
* Created by <NAME> on 04.08.2014.
*/
export declare class TableUtils {
static createDefaultTableDesc(): ITableDataDescription;
}
|
import ParliamentAPIUtils from 'api/ParliamentAPIUtils';
import { MemberOfParliament } from 'api/ParliamentTypes';
/**
* Politician Model
*/
export default class Politician {
private static readonly BASE_URL = 'MemberProfile';
private readonly _parliamentPolitician: MemberOfParliament;
constructor(parliament... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.