text
stringlengths
1
1.05M
import string def count_word_occurrences(file_name): word_counts = {} with open(file_name, 'r') as file: for line in file: words = line.lower().translate(str.maketrans('', '', string.punctuation)).split() for word in words: if word in word_counts: ...
#!/bin/bash routine () { rm -rf barrier # hard coded NUM_THREADS make NUM_THREADS="2" PROTECTED="$1" barrier if [ ! -f "barrier" ]; then echo "The build for binary file \"barrier\" failed!" exit 1 fi for i in {1..1000}; do diff --suppress-common-lines -c <(./barrier) ...
echo "Downloading latest MTProto scheme..." wget -O scheme.tl -q https://raw.githubusercontent.com/telegramdesktop/tdesktop/master/Telegram/Resources/scheme.tl echo "Generating Go file..." ./generate.sh > types.go
import random # Simulate rolling two dice and summing the values dice1 = random.randint(1, 6) # Generate a random number between 1 and 6 for the first die dice2 = random.randint(1, 6) # Generate a random number between 1 and 6 for the second die sumadeambos = dice1 + dice2 # Calculate the sum of the values obtained...
#!/bin/bash ################################## # Zabbix monitoring script # # iostat: # - IO # - running / blocked processes # - swap in / out # - block in / out # # Info: # - vmstat data are gathered via cron job ################################## # Contact: # vincent.viallet@gmail.com ##########################...
<filename>src/icons/PhGitCommit.js /* GENERATED FILE */ import { html, svg, define } from "hybrids"; const PhGitCommit = { color: "currentColor", size: "1em", weight: "regular", mirrored: false, render: ({ color, size, weight, mirrored }) => html` <svg xmlns="http://www.w3.org/2000/svg" width...
import React, {Component} from "react"; import html2canvas from 'html2canvas'; import ReactDOM from 'react-dom'; const fileType = { PNG: 'image/png', JPEG: 'image/jpeg', PDF: 'application/pdf' }; export default class ReactComponentToHTMLImageRenderer extends Component { static getHiddenContainer(){ ...
/* * 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 copyright * notice, this list of co...
using System; using System.Net; using System.Net.Sockets; namespace PostMessage { class Program { static void Main(string[] args) { // Get the user's message and the recipient's IP address and port Console.WriteLine("Enter message: "); string message = Consol...
<reponame>djalilhebal/zero /** * Master is like an interface to ZeroWorker (on 0.facebook.com windows/iframes) * * @example * const username = 'dreamski21' * const job = {fn: 'getProfileInfo', url: `https://0.facebook.com/${username}?v=info`} * const master = new Master(job) * master.getResponse().then( (res) =>...
def sum_of_squares(n, m): result = 0 for i in range(n, m+1): result += i*i return result print(sum_of_squares(n, m))
#!/usr/bin/env bash set -x -e pushd Course_01/ ./build.sh popd pushd Course_02/ ./build.sh popd pushd Course_03/ ./build.sh popd mkdir -p deploy cp Course_01/core0/core0_linux Course_01/core1/core1.bin Course_02/core0/core0_linux_c2 Course_03/core0/core0_linux_c3 Course_03/core0/core0_linux_c3_sockit deploy/...
<filename>json_test.go<gh_stars>1-10 package lytics import ( "encoding/json" "net/url" "testing" "github.com/bmizerany/assert" ) func TestJsonFlatten(t *testing.T) { msg := `{ "reach":4, "source":"http://twitter.com/tweetbutton", "tweet_id":"302601869862252544", "bigint":7000000000000000000000, "twuse...
<filename>sysinv/cgts-client/cgts-client/cgtsclient/v1/helm.py # # Copyright (c) 2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # -*- encoding: utf-8 -*- # from cgtsclient.common import base class Helm(base.Resource): def __repr__(self): return "<helm %s>" % self._info class He...
// @flow import type { AxiosRequestConfig, AxiosError, AxiosResponse, AxiosInstance, } from 'axios'; import axios from 'axios'; import Router from 'next/router'; import * as cookie from 'js-cookie'; import { JWT_TOKEN } from '../definations'; import { IsSSR } from '../utils'; export class HttpRequest {...
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. package edu.wpi.first.wpiutil.math; public final class MathUtil { private MathUtil() { throw new AssertionError("...
#!/bin/bash # https://adventofcode.com/days/day/7 puzzle #1 # See README.md in the parent directory in="${1:-${0%-[0-9].*}.input}"; [[ -e $in ]] || exit 1 #TEST: example 37 #TEST: input 336131 # brute force: we compute the rule for each position inside the crabs # array of positions of each crab read -r -a crabs < <...
#! /bin/sh #PBS -l nodes=1:ppn=1 #PBS -l walltime=40: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/run-0 ecoevolity --seed 56718824 --prefix ../../gekko-output/run-0 --relax-missing-sites --relax-...
const { execSync } = require('child_process'); const path = require('path'); const packJson = require(path.resolve(process.cwd(), './package.json')); // app name and build number are required const args = process.argv.slice(2); if (args.length<2) { console.log(`Missing required parameters, usage: node ${process.ar...
/** * Copyright 2020 The Magma Authors. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, ...
import asyncio import msgpack import pytest import websockets import wsrpc class SampleHandler: def __init__(self, rpc): self.remote = rpc async def rpc_add(self, a, b): await asyncio.sleep(0.001) return a + b async def rpc_foo(self): await asyncio.sleep(1) async def ...
<reponame>songkanggit/GodViewMap<filename>mapui/src/main/java/com/fhalo/application/adapter/IndexPagerAdapter.java package com.fhalo.application.adapter; import java.util.ArrayList; import java.util.List; import android.support.v4.view.PagerAdapter; import android.view.View; import android.view.ViewGroup; import andr...
#!/bin/bash set -e DEPLOY_DIR="__deploy" TMP_DIR="$DEPLOY_DIR/__tmp" COMMON_DIR="../docker-common" COMMON_OUT_DIR="common" COGSTACK_OUT_DIR="cogstack" DB_DIR="db_dump" # main entry point # echo "Generating deployment scripts" if [ -e $DEPLOY_DIR ]; then rm -rf $DEPLOY_DIR; fi mkdir $DEPLOY_DIR # used services #...
import { clearExecRoutes, clearMiddlewares, clearRoutes, getExecRoutes, getMiddlewareInitial, getMiddlewares, getRouterInitial, getRoutes, setApp, setMiddlewares, setParamsExecRoutes, setServer, } from "./entity.ts"; import { App } from "./app.ts"; import { DecorationApplication } from "./applic...
# Copyright Ⓒ 2020 "Sberbank Real Estate Center" Limited Liability Company. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to...
package dev.arkav.openoryx.net.packets.s2c; import dev.arkav.openoryx.net.data.Packet; import dev.arkav.openoryx.net.data.WorldPosData; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; public class GotoPacket implements Packet { public int objectId; public WorldPosData pos; ...
<filename>node_modules/react-icons-kit/md/ic_store_mall_directory_outline.js<gh_stars>0 "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ic_store_mall_directory_outline = void 0; var ic_store_mall_directory_outline = { "viewBox": "0 0 24 24", "children": [{ "name": "path",...
<reponame>muehleisen/OpenStudio /*********************************************************************************************************************** * OpenStudio(R), Copyright (c) 2008-2021, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved. * * Redistribution and use in source and...
// Function to check if a number is prime function isPrime(num) { if (num <= 1) return false; for (let i = 2; i <= Math.sqrt(num); i++) { if (num % i == 0) return false; } return true; } // Create an array let arr = []; // Iterate over numbers from 2 to 25 for (let i = 2; i <= 25; i++) { ...
export default ngModule => { ngModule.controller('PerfilCtrl', function PerfilCtrl ($state, StorageService, $scope, AuthService) { const vm = this; const loadUser = () => { AuthService.getCurrentUser().then( (response) => { vm.user = response.user; }); }; $scope.$on("$ionicView.beforeEnter", () => ...
from django.db import models class DataTracker: def __init__(self, event_model, snapshot, label): self.event_model = event_model self.snapshot = snapshot self.label = label def construct_sql_fields(self): fields = { f.column: f'{self.snapshot}."{f.column}"' ...
int sum = 0; for (int i = 0; i <= 1000; i += 2) { sum += i; } System.out.println(sum);
def extract_tlds(urls): tlds = [] for url in urls: parts = url.split('.') tlds.append(parts[-1]) return tlds tlds = extract_tlds(['https://www.example.com', 'http://www.example.org', 'https://example.net']) print(tlds)
const runExec = require('./run-exec') exports.devInstall = (packageName)=>{ runExec(`npm i --save-dev ${packageName}`) }
import { markdownToDsl } from "./markdownToDsl"; test("normal dsl", async () => { let sampleImportCode = `| name | scmUrl | language | branch | |-------|-------|---------|-------| | DDD Mono | https://github.com/archguard/ddd-monolithic-code-sample | Java | master | `; let dsl = markdownToDsl(sampleImportCode); ...
def generate_deployment_config(name, namespace, match_labels, template_spec_labels): deployment_config = { "metadata": { "name": name, "namespace": namespace }, "spec": { "selector": { "matchLabels": match_labels }, ...
## Note: for Anaconda user, please use -D_GLIBCXX_USE_CXX11_ABI=1 (instead of -D_GLIBCXX_USE_CXX11_ABI=0) ## ----------- Test with TF v1.8 TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') ) TF_LFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconf...
package com.yan.demo.service; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.yan.demo.dao.AllViewMapper; @Service public class AllViewService { @Autowired AllViewMapper allViewMapper; public L...
#!/bin/bash if [ -z $DOCKER_IMAGE ]; then # Run with native .travis/run_project_build.sh else # Run with docker docker run -v$(pwd):/home/conan $DOCKER_IMAGE bash -c "CC=${CC} CXX=${CXX} ASAN=${ASAN} .travis/run_project_build.sh" fi
import flask app = flask.Flask(__name__) @app.route('/celsius-to-fahrenheit/<int:celsius>', methods=['GET']) def celsius_to_fahrenheit(celsius): fahrenheit = celsius * 9/5 + 32 return flask.jsonify({'celsius': celsius, 'fahrenheit': fahrenheit}) if __name__ == '__main__': app.run()
#!/bin/sh set -x set -e cilium install --cluster-name "${CLUSTER_NAME}" --restart-unmanaged-pods=false --config monitor-aggregation=none --config tunnel=vxlan --native-routing-cidr="${CLUSTER_CIDR}" cilium clustermesh enable cilium clustermesh status --wait --wait-duration 5m cilium clustermesh vm create "${VM_NAME...
#!/bin/bash # # server mode test suite - all tests to be peformed from the CLI # of the WLAN Pi while switched in to server mode # # ########################## # User configurable vars ########################## MODULE=server VERSION=1.01 COMMENTS="server mode test suite to verify files & processes" SCRIPT_NAME=$(base...
<reponame>ch1huizong/learning #!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2009 <NAME> All rights reserved. # """ """ #end_pymotw_header import decimal import fractions for v in [ decimal.Decimal('0.1'), decimal.Decimal('0.5'), decimal.Decimal('1.5'), decimal.Decimal('...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package hermes.security.hash; /** * * @author <NAME> (d120041) <<EMAIL>> */ public class Hash { private static Hasher has...
#!/usr/bin/env bash # Copyright 2020 Huawei Technologies Co., Ltd # # 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...
<reponame>neal-siekierski/kwiver /*ckwg +29 * Copyright 2011-2013 by Kitware, Inc. * 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 abov...
#!/bin/bash #SBATCH -n 1 #SBATCH -t 00:10:00 #SBATCH --mem-per-cpu=2000 module load anaconda3 source activate crowd-development echo $1 echo $2 echo $3 python selection_deterministic.py $1 $2 $3 #rm *.out
const getFactors = (n) => { let result = []; for (let i = 1; i <= n; i++) { if (n % i === 0) { result.push(i); } } return result; } console.log(getFactors(10));
<reponame>LarsSaalbrink/Sub-IoT-sdu<filename>stack/modules/d7ap/d7asp.h /* * Copyright (c) 2015-2021 University of Antwerp, Aloxy NV. * * This file is part of Sub-IoT. * See https://github.com/Sub-IoT/Sub-IoT-Stack for further info. * * Licensed under the Apache License, Version 2.0 (the "License"); * you...
#!/bin/bash # global stuff CWD=$(pwd) PLUGINS_PATH="$CWD/plugins" DATA_PATH="$CWD/data" DEFAULT_SHELL="$HOME/.bashrc" PACKGE_MANAGER="apt-get" GO_DIR=~/go/bin # some function install_banner() { name=$1 echo -e "\033[1;32m[+] Installing $name \033[1;37m" } install_banner "git, nmap, masscan, chromium, npm, go...
/* eslint-disable */ import "bootstrap"; import "./style.css"; import "./assets/img/rigo-baby.jpg"; import "./assets/img/4geeks.ico"; function generateRandomNumber() { var number = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]; let indexNumber = Math.floor(Math.random() * number.length); return number[indexNumber...
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { DashboardTripsComponent } from './dashboard-trips.component'; describe('DashboardTripsComponent', () => { let component: DashboardTripsComponent; let fixture: ComponentFixture<DashboardTripsComponent>; beforeEach(async(() => { ...
import codecs import jieba def process_chinese_text(input_file, output_file): input_reader = codecs.open(input_file, 'r', encoding='utf-8') out_writer = codecs.open(output_file, 'w', encoding='utf-8') line = input_reader.readline() line_num = 1 while line: print('processing line: {l} a...
#!/bin/bash cd /tmp/libvmod-tbf ./bootstrap ./configure VARNISHSRC=/tmp/Varnish-Cache VMODDIR=/usr/local/lib/varnish/vmods make make install
user_input = int(input('Please give a number: ')) if (user_input < 0): user_input = 0
package com.flysea.gles; import java.util.ArrayList; /** * 模型对了 为引擎实现标准数据格式 * Created by Liangjun on 2016/1/18. */ public class ModelCollection { ArrayList<Model> _arrModel = new ArrayList<Model>(); public ModelCollection() { } public void AddModel(Model model) { _arrModel.add(model); } public A...
#!/bin/bash set -x set -e export PYTHONUNBUFFERED="True" export CUDA_VISIBLE_DEVICES=$1 LOG="experiments/logs/linemod_driller_det_train.txt.`date +'%Y-%m-%d_%H-%M-%S'`" exec &> >(tee -a "$LOG") echo Logging output to "$LOG" export LD_PRELOAD=/usr/lib/libtcmalloc.so.4 time ./tools/train_net.py --gpu 0 \ --network...
#!/bin/sh #!/bin/bash STACK_NAME="$1" if test "$#" -ne 2; then echo "Illegal number of parameters. Please provide all required parameters as follows:" echo "sh csye6225-aws-networking-teardown.sh <STACK_NAME> <AWS_REGION>" exit 1 fi # if [ -z "$STACK_NAME" ];then # echo "No parameters were given" # e...
#!/bin/bash # options explanation at http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail set -x git config --global user.name "$USER_NAME" git config --global user.email "$USER_EMAIL" git submodule init git submodule update bundle rake website:parse_tournaments rake website:parse_collection...
#include <iostream> #include <string> class Song { private: std::string title = ""; std::string artist = ""; int duration = 0; public: // constructors Song(std::string title, std::string artist, int duration) : title(title), artist(artist), duration(duration) {}; Song() {}; // ac...
import { setStyle } from '@/helpers/utils'; import { key } from '../config'; export default { value() { setStyle(this.tableEl, { filter: `drop-shadow(${this[key]})`, }); this.changeList[key].changed = false; }, };
import { bind, UIBorderlessTextField, UIColor, UIFlowCell, UIImage, UIPrimaryButton, UIRow, UISeparator, UISpacer, } from "typescene"; import { styles } from "../../../styles"; export default UIFlowCell.with( { hidden: bind("!userService.isLoggedIn"), borderColor: UIColor.Text.alpha(0.2), ...
#!/bin/bash echo ' ****************************************** * WELCOME TO TOOLBOX CONTAINER * ****************************************** ' echo OS: $(cat /etc/redhat-release) echo Time: $(date) echo ' ****** * ID * ****** ' id echo ' ********* * CAPSH * ********* ' capsh --print echo ' *************** * ENVIRONM...
<filename>models/Animal.js<gh_stars>0 // import important parts of sequelize library const { Model, DataTypes } = require('sequelize'); // import our database connection from config.js const sequelize = require('../config/connection'); // Initialize Category model (table) by extending off Sequelize's Model class class ...
#!/bin/sh svgDirectory="output/batch-one" pngDirectory="output/png-batch-one" for file in ${svgDirectory}/* ; do fileName=${file##*/} echo $fileName cairosvg ${svgDirectory}/${fileName} -f png -o ${pngDirectory}/${fileName}.png --width 512 --height 512 --output-width 512 --output-height 512 done
<reponame>vovajr11/swf-client import axios from 'axios'; import notificationTypes from '@components/Notification/notificationTypes'; import { ICreateQuiz } from '@interfaces/quizPuzzle.interface'; export const createQuiz = async (data: ICreateQuiz) => { try { console.log(data, 'data'); // await axios.p...
<filename>src/main/java/com/sinergise/sentinel/byoctool/ingestion/ByocIngestor.java package com.sinergise.sentinel.byoctool.ingestion; import com.sinergise.sentinel.byoctool.cli.CoverageTracingConfig; import com.sinergise.sentinel.byoctool.coverage.CoverageCalculator; import com.sinergise.sentinel.byoctool.ingestion.s...
<filename>src/stores/GameStore.js import { EventEmitter } from "events"; import dispatcher from "../AppDispatcher"; import actionTypes from "../actions/actionTypes"; const CHANGE_EVENT = "change"; let _game = { cards: [], players: [], currentPlayer: 0, visible: true, }; class GameStore extends EventEmitter { ...
<gh_stars>0 'use strict'; /*global console:true */ /*! * * Novicell JavaScript Library v0.5 * http://www.novicell.dk * * Copyright Novicell * */ // Prevent console errors in IE if (typeof (console) === 'undefined') { var console = {}; console.log = console.error = console.info = console.debug = console.wa...
#pragma once #include <condition_variable> #include <cstddef> #include <vector> #include <mutex> #include <atomic> constexpr unsigned CACHE_SIZE = 33101; class Frame { public: explicit Frame(unsigned b); char* get(); unsigned getBytes() const; void copyTo(void* dest); void remove(); private: bool _delete{fal...
export default { currentlyPlayedTrack(state, getters) { return state.currentPlaylist.find((track) => track.index === state.currentPlayIndex); }, remotePlaylist(state, getters) { return state.remotePlaylist; }, };
import streamlit as st import pandas as pd # Load the CSV file data = pd.read_csv('sales_data.csv') # Create the visualization dashboard st.title('Sales Dashboard') # Show the data table st.dataframe(data) # Show a line chart chart = st.line_chart(data) # Show a bar chart st.bar_chart(data) # Show a table of summ...
class Article < ActiveRecord::Base has_many :comments, dependent: :destroy validates :title, presence: true, length: { minimum: 5 } end
#!/usr/bin/env bash # # Start the bootstrap leader node # set -e here=$(dirname "$0") # shellcheck source=multinode-demo/common.sh source "$here"/common.sh if [[ -n $SOLANA_CUDA ]]; then program=$solana_validator_cuda else program=$solana_validator fi args=() while [[ -n $1 ]]; do if [[ ${1:0:1} = - ]]; then ...
#!/bin/bash #module load mpi/openmpi/3.1 module load mpi/impi/2018 #export I_MPI_HYDRA_BRANCH_COUNT=-1 path=/work/fh1-project-kalb/gw1960/data/#module executable="/home/fh1-project-kalb/gw1960/distributed-string-sorting/build/src/executables/prefix_doubling" numOfStrings=5000000 numOfIterations=3 byteEncoder=5 generat...
package com.decathlon.ara.service.mapper; import com.decathlon.ara.domain.Execution; import com.decathlon.ara.service.dto.execution.ExecutionHistoryPointDTO; import org.mapstruct.Mapper; /** * Mapper for the entity Execution and its DTO ExecutionHistoryPointDTO. */ @Mapper(uses = { QualityThresholdMapper.class, Qua...
<filename>znet/znet.go<gh_stars>1-10 // Package znet contains utilities for network communication. package znet import ( "fmt" "net" "strconv" "strings" "sync" "syscall" "time" "zgo.at/zstd/zstring" ) var ( privateCIDR []*net.IPNet privateCIDROnce sync.Once ) func setupPrivateCIDR() { // https://en.w...
<reponame>Frost-Lee/insulin_calculator import numpy as np import math import cv2 import ctypes import functools from . import config def center_crop(array): """ Crop the largest center square of an numpy array. Only the first two axis are considered. Args: array: The numpy array to crop...
$(document).ready(function(){ $('#table_id').DataTable( { buttons: [ { extend: 'print', } ] } ); });
<reponame>adtac/hollow-heap #ifndef _COMPARE_NODE_H_ #define _COMPARE_NODE_H_ #include <utility> /** * A comparison class that's used uniformly by Boost's heap data structures * to define the ordering between two keys of type pair<K, I>. */ template<class K, class I> struct compare_node { bool operator()(const...
bashelliteProviderWrapperGem() { local ruby_ver="2.5.1" local mirror_file="${HOME}/.gem/.mirrorrc" utilMsg INFO "$(utilTime)" "Copying config contents to ${HOME}/.gem/.mirrorrc" if [[ ! -d "${HOME}/.gem" ]]; then mkdir ${HOME}/.gem fi echo "---" > ${mirror_file} echo "- from: ${_n_repo_url}" >> ${mirr...
def calculate_precision(tp, fp, tn): try: precision = tp / (tp + fp) except ZeroDivisionError: precision = 0.0 return precision # Test cases print("Precision:", calculate_precision(25, 5, 70)) print("Precision:", calculate_precision(0, 0, 100))
<reponame>asheerrizvifhm9j/Arsylk<filename>app/src/main/java/com/arsylk/mammonsmite/Async/AsyncWithDialog.java package com.arsylk.mammonsmite.Async; import android.app.ProgressDialog; import android.content.Context; import android.os.AsyncTask; import com.arsylk.mammonsmite.utils.Utils; import java.lang.ref.WeakRefer...
import { forApp, forConsoleBase } from '@ali/console-base-messenger'; import _ from 'lodash'; import { getCookieValue } from '../utils/util'; import { regionList, regionIds, regionDomain } from '../global'; forApp.setRegions(regionList); export let regionId = (() => { let id = getCookieValue('currentRegionId'); ...
/******************************************************************************* * Copyright 2016 * Ubiquitous Knowledge Processing (UKP) Lab * Technische Universität Darmstadt * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. *...
# Kevin's ZSH theme # [DATE TIME] path/from/root/or/git (branch *) % autoload -U colors && colors setopt prompt_subst # Reevaluate prompt on each line # Prints either the full path from root/home, or the path from .git root function get_pwd() { git_root=$PWD while [[ $git_root != / && ! -e $git_root/.git ...
'use strict'; angular.module('copayApp.controllers').controller('createwalletController', function ($rootScope, $scope, $timeout, storageService, notification, profileService, bwcService, $log,gettext,go,gettextCatalog,isCordova) { var self = this; var successMsg = gettext('Backup words deleted'); ...
import random def random_number(): return random.randint(1, 10) if __name__ == '__main__': random_number = random_number() print('Random number : ', random_number)
#include<stdio.h> int main() { int n,i=1,c=0; while(c!=1500) { if(i%2==0 || i%3==0 || i%5==0) { c++; } i++; } printf("The 1500'th ugly number is %d.\n",i-1); return 0; }
console.error("HELP! DANGER! Do not proceed past GO!") console.log("Here's the expected console log") console.warn("Warning! You ought not to do that!")
#!/bin/sh exec 2>&1 export ODBCINI=/etc/odbc.ini cd `dirname $0`/engine python main.py $* cd ..
declare const NativeView: import("react").ComponentType<any>; export default NativeView;
#!/bin/sh case $1 in server1-arm) cmake -DCMAKE_TOOLCHAIN_FILE=CMakeArm.cmake . ;; server1-avr) cmake -DCMAKE_TOOLCHAIN_FILE=CMakeAvr.cmake . ;; server1-amd64) cmake . ;; *) echo "Unknown build target name $1"; exit -1; ...
package io.opensphere.mantle.data.geom.style; import io.opensphere.core.model.Altitude; /** * The Enum StyleAltitudeReference. */ public enum StyleAltitudeReference { /** Altitude is provided by the data source. */ AUTOMATIC(null, "Automatic: Provided by source data"), /** Altitude is relat...
package br.utfpr.gp.tsi.racing.screen.jpct; import br.utfpr.gp.tsi.racing.track.Track; import com.threed.jpct.Mesh; import com.threed.jpct.Object3D; import com.threed.jpct.Primitives; import com.threed.jpct.Texture; import com.threed.jpct.TextureManager; import com.threed.jpct.World; public class TrackBuilder { pri...
<gh_stars>0 import React, { Component } from "react"; import { Keyboard } from 'react-native'; import { connect } from "react-redux"; import { Footer, FooterTab, Button, Icon, Text, Badge } from 'native-base'; // import { BottomTabBar } from 'react-navigation-tabs'; import I18n from '../../../i18n'; import {actions} fr...
const QUnit = require("../node_modules/qunit/qunit/qunit.js"); const SeriesEntry = require("./SeriesEntry.js"); QUnit.module("SeriesEntry"); const PROPS = ["key", "entry"]; const createTestData = () => SeriesEntry.create(1, 2); QUnit.test("create()", (assert) => { // Run. const series = createTestData(); //...
def extractRights(license_agreement): rights = [] lines = license_agreement.split('\n') for line in lines: if line.startswith('//'): rights.append(line[2:].strip()) return rights
# Open a file named "output.txt" in write mode and clear its contents with open("output.txt", "w") as file: file.write('') # Start a web application using the app.run() method # Assuming 'app' is an instance of a Flask application app.run()
const { ipcMain } = require('electron'); const { connect } = require('hadouken-js-adapter'); exports = module.exports = new OpenFin(); let runtimes = {}; // used for fin object storage let request = {}; // used for passing information to listeners function OpenFin() {} // IPC Listeners ipcMain.on('openfin-connec...