text stringlengths 1 1.05M |
|---|
<reponame>ajayaradhya/portfolio-app
import React from 'react'
import Icon1 from '../../images/svg-2.svg'
import Icon2 from '../../images/svg-3.svg'
import Icon3 from '../../images/svg-4.svg'
import { ServicesCard, ServicesContainer, ServicesIcon, ServicesP, ServicesWrapper, ServicesH1, ServicesH2} from './ServiceEleme... |
<reponame>zrwusa/expo-bunny
export * from './FollowUpSearchBar';
|
#!/bin/sh
#loop with counter
for count in $(seq 10)
do
echo "rida $count"
done
echo "-------------------"
# foreach filename...
for file in *
do
# echo "found file: $file"
file $file
done
echo "-------------------"
for file in $(ls -a p*)
do
echo "file: $file"
done
echo "-------------------"
# fore... |
<gh_stars>1-10
var gulp = require('gulp'),
karma = require('karma').server,
operation = require('./operationalyzer'),
jsufon = require('./jsufonify');
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*']
});
gulp.task('coffee', function() {
return gulp.src('src/**/*.coffee')
.pipe($.coffee({bare: true})... |
// Create a hashmap to store the words and their frequencies
const frequencies = {};
// Split input string into an array of words
const words = input.split(' ');
// Iterate through the array of words
words.forEach(word => {
// Convert word to lowercase
const wordLowercase = word.toLowerCase();
// If the word alre... |
#!/usr/bin/env bash
ganache-cli -d -p 7545 -h 0.0.0.0 -i 577 -e 1000 \
--mnemonic="guess tonight return rude vast goat shadow grant comfort december uniform bronze"
|
let urlPattern = new RegExp('^(https?:\\/\\/)[\\w.-]+(\\.[\\w\\.-]+)+[\\w\\-\\._~:/?#[\\]@!\\$&\'\\(\\)\\*\\+,;=.]+$'); |
<reponame>Hannah-Abi/python-pro-21
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout, check_source
from functools import reduce
from random import randint
exercise = 'src.change_value_of_item'
def f(d):
return '\n'.join(d)
def get... |
package com.java.study.algorithm.zuo.fsenior.class01;
public class Code04_DistinctSubseq{
} |
<filename>src/resources/simulators/valueObjects/simulatorIdentifier.test.ts<gh_stars>0
import { expect } from 'chai';
import fc from 'fast-check';
import { ErrorCode } from '../../../core/AppError';
import isURL from 'validator/lib/isURL';
import { SimulatorIdentifier } from './simulatorIdentifier';
describe('Simulato... |
<reponame>bitbrain/braingdx
package de.bitbrain.braingdx.input.keyboard;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.InputAdapter;
import de.bitbrain.braingdx.ui.Navigateable;
/**
* Provides keyboard support for a given {@link Navigateable}
*/
public class NavigateableKeyboardInput extends InputAdapter {... |
<reponame>cliffclick/h2osql<gh_stars>0
package org.cliffc.sql;
import org.joda.time.DateTime;
import water.*;
import water.fvec.*;
import water.rapids.Merge;
import water.nbhm.NonBlockingHashMapLong;
import water.util.SB;
import java.util.Arrays;
/**
def q11 = count[person1, person2, person3:
person_knows_person(... |
<filename>IGRP-Template/src/main/java/nosi/webapps/catalogo_igrp/pages/group_components/Group_componentsController.java
package nosi.webapps.catalogo_igrp.pages.group_components;
import nosi.core.webapp.Controller;
import nosi.core.webapp.databse.helpers.ResultSet;
import nosi.core.webapp.databse.helpers.QueryInterfac... |
<reponame>ciaranm/glasgow-constraint-solver
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
#include <gcs/constraints/all_different.hh>
#include <gcs/constraints/comparison.hh>
#include <gcs/constraints/linear_equality.hh>
#include <gcs/problem.hh>
#include <gcs/solve.hh>
#include <cstdlib>
#include <fstream>
#inclu... |
'use strict';
const _ = require('lodash');
const config = require('../../../config/config');
const {Payment} = require('../../../common/classes/payment.class');
const Factory = require('../../../common/classes/factory');
module.exports = async (ctx, next) => {
try {
const user = Factory.User(ctx, _.get(c... |
<filename>ZQUIKit/ZQHoverViewController/ZQHoverViewController.h
//
// ZQHoverViewController.h
// ZQFoundation
//
// Created by 张泉(Macro) on 2019/10/30.
//
#import "BaseViewController.h"
#import "ZQHoverScrollView.h"
NS_ASSUME_NONNULL_BEGIN
@interface ZQHoverViewController : BaseViewController
@property (nonatomi... |
package clientAPI.impl;
import java.nio.charset.StandardCharsets;
import javax.smartcardio.Card;
import javax.smartcardio.CardException;
import javax.smartcardio.ResponseAPDU;
import clientAPI.PersonalData;
import clientAPI.impl.OncardAPI.PersonalDataOncard;
/**
* Implementierung von {@code clientAPI.P... |
sudo apt update --fix-missing && sudo apt upgrade -y
# force the package manager to find any missing dependencies or broken packages and install them
sudo apt-get install -f
export CONDA_ENV=snowflakes
sudo apt-get update
sudo apt-get -y install git-all
sudo apt-get -y install build-essential
sudo apt-get -y insta... |
const arraySum = arr =>
arr.reduce((total, currElement) => total + currElement, 0);
// example
arraySum([1,2,3,4,5]); // returns 15 |
import { useParams } from "react-router-dom";
import { useEffect, useState } from "react";
import { RecipeModel } from "../../common/models/recipe.form";
import { LayoutPage } from "../../common/layout/layout-page";
import Box from "@mui/material/Box";
import Grid from "@mui/material/Grid";
import Typography from "@mui... |
import { Cartesian3, Cartographic, Math, ImageryLayer } from 'cesium'
import CoordinateTransform from '@/libs/utils/CoordinateTransform'
export enum CoordinateType {
Wgs84,
Gcj02,
Bd09,
}
class ImageryLayerCoordinateTransform {
protected layer: ImageryLayer
private projectionTransform: (x: number, y: numbe... |
class GuessingGame:
def __init__(self, target: int):
self._target = target
self._high = float('inf')
self._low = float('-inf')
def guess(self, number: int) -> str:
if number == self._target:
return "BINGO"
elif number > self._target:
self._high = ... |
#!/bin/bash
DBNAME="idsrv";
PODNAME=$1
ENVFILE=$2
function run_psql_script() {
if [ "${PODNAME}" == "" ]; then
psql -d "${DBNAME}" -q -f "$1";
else
podman run -it --rm --pod "${PODNAME}" --env-file "${ENVFILE}" -v "$(pwd)":/tmp/context:ro --security-opt label=disable postgres:12.2 psql -h 127.0... |
#!/usr/bin/env bash
source ~/ENV/bin/activate
cd ~/MultiModesPreferenceEstimation
python tune_parameters.py --data-dir data/amazon/digital_music/ --save-path amazon/digital_music/tuning_general/mmp-part205.csv --parameters config/amazon/digital_music/mmp-part205.yml
|
#!/bin/bash
# ========== Experiment Seq. Idx. 3107 / 60.5.5.0 / N. 0 - _S=60.5.5.0 D1_N=38 a=1 b=-1 c=1 d=1 e=-1 f=-1 D3_N=6 g=1 h=1 i=-1 D4_N=4 j=4 D5_N=0 ==========
set -u
# Prints header
echo -e '\n\n========== Experiment Seq. Idx. 3107 / 60.5.5.0 / N. 0 - _S=60.5.5.0 D1_N=38 a=1 b=-1 c=1 d=1 e=-1 f=-1 D3_N=6 g=1 h... |
# Load after the other completions to understand what needs to be completed
cite about-plugin
about-plugin 'Automatic completion of aliases'
# References:
# http://superuser.com/a/437508/119764
# http://stackoverflow.com/a/1793178/1228454
# This needs to be a plugin so it gets executed after the completions and the ... |
<gh_stars>10-100
/*
* 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 "Li... |
#!/bin/bash
source /usr/lib/hustler/bin/qubole-bash-lib.sh
source /usr/lib/qubole/bootstrap-functions/hive/hiveserver2.sh
##
# Installs Hive Glue Catalog Sync Agent
# param1 - Region for AWS Athena. Defaults to us-east-1
# Requires Hive 2.x
#
function install_glue_sync() {
aws_region=${1:-us-east-1}
is_maste... |
<reponame>igorivaniuk/md-to-quill-delta
export { markdownToQuillDelta } from './parser'
|
#! /bin/sh
for i in $(ls O90); do
ly musicxml O90/$i/$i.ly -o $i.xml
done
|
rm ms.synctex.gz ms.log ms.out ms.aux ms.blg
|
<reponame>mohamedkhairy/dhis2-android-sdk
/*
* Copyright (c) 2004-2021, University of Oslo
* 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 t... |
def is_palindrome(s):
s = s.lower().replace(" ", "") # Convert to lowercase and remove spaces
return s == s[::-1] # Check if the string is equal to its reverse
def main():
input_str = input("Enter a string: ")
if is_palindrome(input_str):
print("yes, it is a palindrome")
else:
pri... |
#include <iostream>
using namespace std;
// Function to find maximum element in given array
int findMax(int arr[], int n)
{
// Initialize maximum element
int max = arr[0];
// Iterate over array and compare maximum
// with all elements of given array
for (int i = 1; i < n; i++)
i... |
import Phaser from 'phaser'
export default class ShiftPosition extends Phaser.Scene
{
private group!: Phaser.GameObjects.Group
private x = 0
private y = 0
private move = 0
preload()
{
this.load.image('sky','/assets/skies/deepblue.png')
this.load.image('ball','/assets/demoscene/ball-tlb.png')
}
creat... |
<gh_stars>0
import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { GoalsSummaryActions as goalsSummaryActions } from '../actions';
import { catchError, map, switchMap } from 'rxjs/operators';
import { of } from 'rxjs';
import { GoalsSummaryService } from 'src... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {MatMenuModule} from '@angular/material/menu';
import {MatToolbarModule} from '@angular/material/toolbar';
import {MatBadgeModule} from '@angular/material/bad... |
aws dynamodb delete-table --table-name users
aws dynamodb delete-table --table-name politicians
|
#!/bin/sh
# enable location services
/bin/launchctl unload /System/Library/LaunchDaemons/com.apple.locationd.plist
uuid=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Hardware UUID" | cut -c22-57)
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd."$uuid" LocationServicesE... |
<gh_stars>0
const express = require('express');
const jwt = require('jsonwebtoken');
const mySql = require('mysql');
const router = express.Router();
const checkAuth = require("../middleware/check-auth");
const { route } = require('./user');
//create connection Pool
const pool = mySql.createPool({
host ... |
import React from 'react';
import { AppRegistry, SafeAreaView } from 'react-native';
import { Provider } from 'react-redux';
import { isIphoneX } from 'react-native-iphone-x-helper';
import numeral from 'numeral';
import moment from 'moment';
import { resetTo, forwardTo } from './src/store/actions/common';
import i18n ... |
from app import app
from gevent.pywsgi import WSGIServer
import setting
if __name__ == "__main__":
app.debug = setting.DEBUG
WSGIServer(('0.0.0.0',setting.FlaskSettings.PORT), app).serve_forever() |
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int num = in.nextInt();
if (num > 0) {
System.out.println("The number is positive.");
}
}
} |
from .map import Labyrinth, MapBlock
import numpy as np
class MapGenerator:
MOVES = np.array([[-1, 0], [1, 0], [0, -1], [0, 1]], dtype=np.int32)
def __init__(self):
self.is_visited = None
self.rand_directions = None
self.rows = None
self.columns = None
self.prob = None... |
#!/bin/bash
SCRIPTDIR=$(cd $(dirname "$0") && pwd)
HOMEDIR="$SCRIPTDIR/../../../"
cd $HOMEDIR
# shallow clone OpenWhisk repo.
git clone --depth 1 https://github.com/apache/incubator-openwhisk.git openwhisk
cd openwhisk
./tools/travis/setup.sh
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Map;
import java.util.TreeMap;
public class SpaceshipCrafting {
private static final String ALUMINIUM = "Aluminium";
private static fin... |
<reponame>sergiorpleon/react-redux-shopping
import React, { Component } from 'react';
import { connect } from 'react-redux';
class EditCategoryComponent extends Component {
handleEdit = (e) => {
e.preventDefault();
const newTitle = this.getTitle.value;
const newDescription = this.getDescription.value;
const d... |
#!/bin/sh
# 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... |
import React, { useContext } from "react"
import SEO from "../../../../components/layout/seo"
import {
How,
HowLong,
HowMuch,
Introduction,
SectionContent,
Visit,
WhatTimeOfYear,
When,
Where,
WhereToHave,
WhereToStay,
} from "../../../../components/core/section"
import { Conclusion } from "../../.... |
#!/bin/bash
#PBS -q kayvon
#PBS -N interpolate
stochastic.sh interpolate
|
private void TipTiming()
{
if (tipTime > 0)
{
tipTime -= Time.deltaTime; // Decrease tipTime by the time elapsed since the last frame
if (tipTime <= 0)
{
GenerateTip(); // Call the method to generate a tip
}
}
}
private void GenerateTip()
{
// Implement the l... |
<gh_stars>100-1000
/* eslint @typescript-eslint/no-explicit-any: 0 */
/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */
export function isStackError(error: any): error is Error {
return typeof error !== 'undefined' && error !== null && 'message' in error;
}
export function isFetchError(error: any): ... |
class AscendingOrder:
def __init__(self, capacity):
self.arr = [0 for i in range(capacity)]
self.size = 0
def insert(self, x):
self.arr[self.size]=x
self.size += 1
self.arr.sort()
def print(self):
for i in range(self.size):
print(self.arr[i], end = " ") |
#!/bin/sh
wget https://dl.google.com/android/repository/android-ndk-r17-linux-x86_64.zip
wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip
wget https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
wget https://dl.google.com/android/repository/android-ndk-r14b-linux-x8... |
type WebAttribute<T, U, V> = {
Attribute: T;
Type: U;
Formatted?: V;
};
type WebResource_Select = {
createdby_guid: WebAttribute<"createdby_guid", string | null, { createdby_formatted?: string }>;
createdon: WebAttribute<"createdon", Date | null, { createdon_formatted?: string }>;
createdonbehalfby_guid: W... |
i=1
classpath="$(java -cp build/main \
edu.washington.escience.myria.tool.EclipseClasspathReader \
.classpath)"
libpath="$(java -cp build/main \
edu.washington.escience.myria.tool.EclipseClasspathReader \
.classpath lib)"
true
while [[ $? -eq 0 ]]
do
echo starting number $i round
java -ea -Xdebug \
-Xru... |
#!/bin/sh
JOB=' {"seed": { "nodes": [ {"status":"new","type":"id","value":"somevaluehere1"},{"status":"new","type":"id","value":"somevaluehere2"} ], "edges": []}, "job_config":{"depth": 4, "ttl":0, "description":"job descripion", "adapters": { "HelloWorld":{}, "PlusBang": {} }}}'
curl -H "Content-Type: application/... |
<filename>keggtools/resolver.py<gh_stars>1-10
""" Resolve requests to KEGG data Api """
import logging
from .utils import parse_tsv, request
from .storage import KEGGDataStorage
from .models import KEGGPathway
class KEGGPathwayResolver:
"""
KEGGPathwayResolver
Request interface for KEGG API en... |
#!/bin/bash
# Archived program command-line for experiment
# Copyright 2016 Xiang Zhang
#
# Usage: bash {this_file} [additional_options]
set -x;
set -e;
qlua main.lua -driver_location models/amazonbinary/temporal8length486feature256 -driver_variation small -train_data_file data/amazon/binary_train_code.t7b -test_dat... |
<reponame>krishna8421/OfflinePayApp
export const URL = 'https://offline-pay.vercel.app';
|
class Product:
def __init__(self, name, price, quantity):
self.name = name
self.price = price
self.quantity = quantity
def update_price(self, new_price):
self.price = new_price
def update_quantity(self, new_quantity):
self.quantity = new_quantity
def remove_pro... |
// security.js
function checkAccess(username) {
const authorizedUsers = ['admin', 'user1', 'user2']; // Predefined list of authorized users
return authorizedUsers.includes(username);
} |
// Importações.
const Usuario = require('../api/models/Usuario');
const ContaLocal = require('../api/models/ContaLocal');
const ContaFacebook = require('../api/models/ContaFacebook');
const ContaGoogle = require('../api/models/ContaGoogle');
const EnderecoUsuario = require('../api/models/EnderecoUsu... |
<filename>src/main/java/br/com/alinesolutions/anotaai/metadata/io/ResponseEntity.java
package br.com.alinesolutions.anotaai.metadata.io;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.Js... |
<reponame>gautiselvaraj/nag-me
import React from 'react';
import styled from 'styled-components';
const Heading = styled.h1`
color: ${props => props.theme.white};
font-size: 1.25rem;
margin-top: 0;
margin-bottom: 0;
`;
export default ({ children, ...otherProps }) => (
<Heading {...otherProps}>{children}</He... |
import React from 'react'
import { Link as GatsbyLink, graphql, useStaticQuery } from 'gatsby'
import { MenuDataQuery } from 'autogenerated/graphql-types'
export type LinkType = {
label: string
url: string
className: string
}
const Link: React.FC<LinkType> = ({ url, label, className }) => {
return (
<Gat... |
package io.smallrye.mutiny.operators;
import org.testng.annotations.Test;
import io.smallrye.mutiny.Uni;
public class UniNeverTest {
@Test
public void testTheBehaviorOfNever() {
UniAssertSubscriber<Void> subscriber = UniAssertSubscriber.create();
Uni.createFrom().<Void> nothing()
... |
<gh_stars>0
package actors
import akka.actor._
import play.api._
import play.api.Play.current
import play.api.libs.iteratee._
import play.api.libs.iteratee.Concurrent.Broadcaster
import play.api.libs.json._
import play.api.libs.oauth._
import play.api.libs.ws.WS
import play.extras.iteratees._
import play.api.libs.conc... |
<filename>app/ErrorHandler.scala
import com.cognism.common.utils.ApplicationException
import play.api.http.HttpErrorHandler
import play.api.mvc._
import play.api.mvc.Results._
import scala.concurrent._
import javax.inject.Singleton
@Singleton
class ErrorHandler extends HttpErrorHandler {
def onClientError(request:... |
<gh_stars>1-10
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator';
import HourRange from '../../../../../shared/modules/DataRender/vos/HourRange';
import VueComponentBase from '../../VueComponentBase';
import '../RangesComponent.scss';
@Component({
template: require('./HourR... |
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-2-Clause
# shellcheck disable=SC1091
#set -x
DIR="$(dirname "$0")"
ROOT="${DIR}/.."
source "${ROOT}/common.sh"
check_ima_support
setup_busybox_container \
"${ROOT}/ns-common.sh" \
"${ROOT}/check.sh" \
"${DIR}/reappraise-after-host-file-signing.sh" \
"${ROOT}/... |
#!/bin/bash
cmake -GNinja -DBOARD=$1 ${ZEPHYR_BASE}/../bootloader/mcuboot/boot/zephyr -DCONFIG_MCUBOOT_SERIAL=y -DCONFIG_UART_CONSOLE=n -DCONFIG_BOOT_SERIAL_DETECT_PIN_VAL=1 -DCONFIG_HW_STACK_PROTECTION=y -DCONFIG_CONSOLE_HANDLER=n
ninja
|
#!/bin/bash
# Create a resource group
az group create --name myResourceGroup --location eastus
# Create a scale set
# Network resources such as an Azure load balancer are automatically created
# Two data disks are created and attach - a 64Gb disk and a 128Gb disk
az vmss create \
--resource-group myResourceGroup \
... |
#!/bin/bash
FRUIT_VERSION=3.5.0
# To authenticate:
# conan user -p <BINTRAY_API_KEY_HERE> -r fruit-bintray polettimarco
for build_type in Release Debug
do
for is_shared in True False
do
for use_boost in True False
do
conan create . google/stable -o fruit:shared=$is_shared -o fruit... |
#!/usr/bin/env bash
# 1. Parse command line arguments
# 2. cd to the test directory
# 3. run tests
# 4. Print summary of successes and failures, exit with 0 if
# all tests pass, else exit with 1
# Uncomment the line below if you want more debugging information
# about this script.
#set -x
# The name of this test... |
function minBits(number) {
let count = 0;
while (number) {
count++;
number >>= 1;
}
return count;
}
let numBits = minBits(15);
console.log(numBits); // Output: 4 |
package starter.search;
import org.openqa.selenium.By;
class SearchResultList {
static By RESULT_TITLES = By.cssSelector("#links .result__title a:nth-child(1)");
}
|
<gh_stars>0
import { GetTextByPathPipe } from '@openchannel/angular-common-components/src/lib/common-components/pipe/get-text-by-path.pipe';
describe('GetTextByPathPipe', () => {
let pipe: GetTextByPathPipe;
let value: any;
beforeEach(() => {
pipe = new GetTextByPathPipe();
value = {
... |
//
// AppsViewController.h
// Connect SDK Sampler App
//
// Created by <NAME> on 9/17/13.
// Connect SDK Sample App by LG Electronics
//
// To the extent possible under law, the person who associated CC0 with
// this sample app has waived all copyright and related or neighboring rights
// to the sample app.
//
/... |
#!/bin/bash
# Run all datasets with the default parameters
cd ..
source activate graph
# Best parameter in isolated default search
batch_size=32
num_layers=5
lr=0.01
num_mlp_layers=2
hidden_dim=32
final_dropout=0
epochs=20
for fold in 0
do
echo Processing MUTAG at fold $fold ...
python main.py --dataset MUTAG ... |
<reponame>louiethe17th/data-structures-and-algorithms<filename>src/day9/LinkedListTest.java<gh_stars>0
package day9;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class LinkedListTest {
@Test
void hasLoop() {
ListNode n1 = new ListNode(1);
ListNode n2 =... |
<reponame>UsulPro/netherlands-weather
import React from 'react';
import { Query } from 'react-apollo';
import styled from '@emotion/styled';
import { createIcon } from '../common/weather-icon';
import DateInput from './DateInput';
import query from './city.gql';
const Container = styled.header`
width: 50%;
displa... |
import java.util.Scanner;
public class LargestPalindromeProduct
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
int tests = Integer.parseInt(scanner.nextLine());
for (int i = 0; i < tests; i++)
{
int number = Integer.parseInt(scanner.nextLine());
System.out.println(... |
class Vehicle:
def __init__(self, make, model, year, color, mileage):
self.make = make
self.model = model
self.year = year
self.color = color
self.mileage = mileage
def get_make(self):
return self.make
def get_model(self):
return self.model
def ... |
package weixin.weicar.entity;
import java.math.BigDecimal;
import java.util.Date;
import java.lang.String;
import java.lang.Double;
import java.lang.Integer;
import java.math.BigDecimal;
import javax.xml.soap.Text;
import java.sql.Blob;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.... |
<reponame>AliFrank608-TMW/RacingReact
/**
* @module configureStore
*/
import configureStore from 'store/ConfigureStore'
/**
* Testing utilities
*/
import { expect } from 'chai'
describe('Store - configuration', () => {
it('it should exist', () => {
expect(configureStore).to.exist
})
it('it should be an... |
#!/bin/bash
sudo ip netns add fpga_lb
sudo ip link set enp2s0 netns fpga_lb
sudo ip netns exec fpga_lb ip link set up enp2s0
sudo ip netns exec fpga_lb ip addr add 10.0.100.1 dev enp2s0
|
#!/usr/bin/env bash
export CODE_TESTS_PATH="./client/out/test"
export CODE_TESTS_WORKSPACE="./client/testFixture"
node.exe "./client/out/test/runTest" |
package io.opensphere.mantle.util;
import java.awt.Component;
import javax.swing.JCheckBox;
import io.opensphere.core.util.swing.OptionDialog;
/**
* Activation dialog.
*/
public class ActivationDialog extends OptionDialog
{
/** The serialVersionUID. */
private static final long serialVersionUID = 1L;
... |
alias gradleclean="rm -rf $HOME/.gradle/caches/"
alias adbota="adb kill-server && adb tcpip 5555 && sleep 5 && adb shell ip route | awk '{print $9}' | xargs adb connect" |
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log('Chatbot is ready!');
});
client.on('message', message => {
// Check if the message was sent by a user
if (message.author.bot) return;
// Step 1: the chatbot should detect and respond to greetings
... |
<reponame>rmlmcfadden/triumfpp
#include <triumf/nmr/dipole_dipole.hpp>
#include <boost/math/constants/constants.hpp>
#include <cmath>
double dipole_dipole(const double *x, const double *par) {
double omega_d = std::abs(par[2] * par[3] * par[0] * par[0]);
double factor = par[1] * (3.0 / 10.0);
double normalizat... |
#!/bin/bash
set -e
# copy source and geometry files to install dir
cp -r src "${PREFIX}"
cp -rv data "${PREFIX}"
# set graphics library to link
if [ "$(uname)" == "Linux" ]; then
export CXXFLAGS="${CXXFLAGS}"
else
CMAKE_ARGS+=" -DCMAKE_OSX_SYSROOT=${CONDA_BUILD_SYSROOT} -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_OSX... |
<gh_stars>1-10
/* Helpers for validator layer */
const yaml = require('js-yaml');
const fs = require('fs');
const h = require('./helpers.js');
const env = process.env;
exports.events = yaml.load(fs.readFileSync('./events.yml', 'utf-8'));
exports.createSnsParams = createSnsParams;
exports.handleValidatorResults = han... |
def formatReaction(voter, userRating=None, candidate, candidateRating=None):
reaction = f"{voter} {f'({userRating}) ' if userRating else ''}reacted to a message from {candidate} {f'({candidateRating}) ' if candidateRating else ''}"
return reaction
# Test cases
print(formatReaction('Alice', 5, 'Bob', 4)) # Out... |
module KubeDSL::DSL::Storage::V1beta1
autoload :CSIDriver, 'kube-dsl/dsl/storage/v1beta1/csi_driver'
autoload :CSIDriverList, 'kube-dsl/dsl/storage/v1beta1/csi_driver_list'
autoload :CSIDriverSpec, 'kube-dsl/dsl/storage/v1beta1/csi_driver_spec'
autoload :CSINode, 'kube-dsl/dsl/storage/v1beta1/csi_node'
autolo... |
/**
*
* @project iterlife-xspring
* @file com.iterlife.xspring.servlet.XServletOutputStream.java
* @version 1.0.0
* Copyright 2019 - 2019 for <NAME>
* https://www.iterlife.com
*
**/
package com.iterlife.zeus.spring.servlet;
import java.io.CharConversionException;
import java.io.IOException;
import java.io.Outp... |
package org.liveontologies.protege.explanation.proof.editing;
/*-
* #%L
* This file is part of the OWL API.
* The contents of this file are subject to the LGPL License, Version 3.0.
* $Id:$
* $HeadURL:$
* %%
* Copyright (C) 2014 The University of Manchester
* %%
* Licensed under the Apache License, Version 2.... |
#!/usr/bin/env bash
mkdir -p ./db/node1 ./db/node2 ./db/node3 ./db/node4 ./db/node5
mkdir -p ./logs/node1 ./logs/node2 ./logs/node3 ./logs/node4 ./logs/node5
export FBA_VALs=./scripts/configs/local/fba_validators.json
printf "Launching node 1 at 127.0.0.1:9650\n"
export WEB3_API=enabled
./build/flare --network-id=lo... |
def permutation(s):
if len(s) == 1:
return s
res = []
for i, c in enumerate(s):
for cc in permutation(s[:i] + s[i+1:]):
res.append(c + cc)
return res |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.