text stringlengths 1 1.05M |
|---|
<gh_stars>1-10
"""Used as an example of ring experiment.
This example consists of 22 IDM cars on a ring creating shockwaves.
"""
from flow.controllers import IDMController, ContinuousRouter
from flow.core.params import SumoParams, EnvParams, InitialConfig, NetParams
from flow.core.params import VehicleParams
from flo... |
<reponame>syberflea/materials<filename>build-a-django-content-aggregator/source_code_step_7/podcasts/admin.py
from django.contrib import admin
from .models import Episode
@admin.register(Episode)
class EpisodeAdmin(admin.ModelAdmin):
list_display = ("podcast_name", "title", "pub_date")
|
#!/bin/sh
itShouldCheckThatAllInstalledSoftwareExists() {
doesCommandExist node
doesCommandExist npm
}
itShouldMatchTheDesiredVersions() {
doesMatchVersion node v12.22.12
doesMatchVersion npm 6.14.16
}
doesCommandExist() {
if ! [ -x "$(command -v $1)" ]; then
echo "Error: $1 is not installed." ... |
/**
* @module botframework-streaming
*/
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { IReceiveResponse } from '../interfaces/IReceiveResponse';
/**
* Orchestrates and manages pending streaming requests.
*/
export declare class RequestMana... |
import React from 'react';
import ReactDOM from 'react-dom';
import {BrowserRouter} from 'react-router-dom'
import App from './App';
import createStore from './store';
import { Provider } from 'react-redux';
import registerServiceWorker from './registerServiceWorker';
ReactDOM.render(
<Provider store={createStore()}>
... |
# Author: Bela Ban
#!/bin/bash
JG=$HOME/JGroups
jgroups.sh org.jgroups.util.DumpData $* |
<reponame>EmanuelCampos/nft-contract-boilerplate<gh_stars>1-10
require("@nomiclabs/hardhat-waffle");
const fs = require("fs")
const privateKey = fs.readFileSync(".secret").toString()
const projectId =
module.exports = {
networks: {
hardhat: {
chainId: 1337
},
rinkeby: {
url: `https://rinkeb... |
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <gtest/gtest.h>
#include <string>
#include <utility>
#include "ml/soda_proto_mojom_conversion.h"
namespace ml {
using speech::soda::chrome:... |
<filename>projetoBhaw/src/tis/bhaw/DataAccessObject/ConnectionFactory.java
package tis.bhaw.DataAccessObject;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Connection;
import javax.management.RuntimeErrorException;
public class ConnectionFactory {
public Connection getConnection() t... |
# For build.sh
mode_name="zen"
package_base="linux-zen"
mode_desc="Select and use the packages for the linux-zen kernel"
# pkgrel for ZEN packages
pkgrel="1"
# pkgrel for GIT packages
pkgrel_git="1"
zfs_git_commit=""
zfs_git_url="https://github.com/zfsonlinux/zfs.git"
header="\
# Maintainer: Jan Houben <jan@nexttrex... |
<filename>jsx/imageEdit/editorLoader.tsx
import uploadcare from 'uploadcare-widget/uploadcare'
import config from '../uc-config';
import UcConfig from '../interfaces/UcConfig';
import WpMediaModel from '../interfaces/WpMediaModel';
import uploadcareTabEffects from 'uploadcare-widget-tab-effects'
import UcUploader from ... |
sudo python3 train_xgboost.py --train_name train --val_name val --n_estimators 512 --max_depth 12 --learning_rate 0.1 --subsample 0.3 --colsample_bytree 0.5 --gamma 10 --scale_pos_weight 1 --min_child_weight 5 --gpu
sudo python3 train_xgboost.py --train_name train --val_name val --n_estimators 512 --max_depth 12 --le... |
// Generated from Java8.g4 by ANTLR 4.7
package sarf.lexer.lang;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.df... |
<filename>node_modules/react-icons-kit/md/ic_perm_identity_twotone.js<gh_stars>0
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_perm_identity_twotone = void 0;
var ic_perm_identity_twotone = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
... |
<gh_stars>0
import React, {useState} from 'react';
import {divesParams} from '../../../functions/exec/process';
import {makeStyles} from '@material-ui/core/styles';
import DiveLength from './DiveLengthInput';
import DiveMaxDepth from './DiveMaxDepthInput';
import DiveRequiredDepth from './DiveRequiredDepthInput';
cons... |
#!/usr/bin/env bats
#
# Copyright 2020 Appvia Ltd <info@appvia.io>
#
# 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 appl... |
<reponame>haedaal/locutus
// Execute: test:module
// To test this in a local terminal
var effectiveness = 'futile'
var location = '../../src'
var locutus = require(location)
var php = require(location + '/php')
var strings = require(location + '/php/strings')
var sprintf = require(location + '/php/strings/sprintf')
va... |
package de.saxsys.mvvmfx.examples.jigsaw.circle;
import de.saxsys.mvvmfx.ViewModel;
import javafx.beans.property.ReadOnlyStringWrapper;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import java.util.regex.Pattern;
public class CircleViewModel implements ViewModel {
... |
The best sorting algorithm to use in this case is the Bubble Sort algorithm. The basic idea behind the Bubble Sort algorithm is to traverse through the array, compare adjacent elements and swap them if the element on the left is greater than the one on the right. This will continue until the whole array is sorted. To a... |
import requests
from flask import Flask, Blueprint, request, jsonify
from utils.utils import Utils
from utils.constants import URL_OPENBUS, URL_OPENGEO, ENDPOINTS_BUS, ENDPOINTS_GEO
from utils.config import PARAMS
OPEN_BUS_EMT_MAD = Blueprint('open_bus_emt_mad', __name__)
class OpenBusEmtMad(object):
... |
SELECT category, COUNT(name) as total
FROM products
WHERE category IN ('food', 'electronics', 'clothing')
GROUP BY category; |
<gh_stars>0
package owlmoney.logic.command.bond;
import static owlmoney.commons.log.LogsCenter.getLogger;
import java.util.logging.Logger;
import owlmoney.logic.command.Command;
import owlmoney.model.bank.exception.BankException;
import owlmoney.model.bond.exception.BondException;
import owlmoney.model.profile.Profi... |
import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load, load_module, reload_module, get_stdout, check_source
from functools import reduce
import os
import textwrap
from random import choice, randint
exercise = 'src.transpose_matrix'
function = 'transpose'
def get_correct(te... |
<filename>open-sphere-base/mantle/src/main/java/io/opensphere/mantle/crust/MetaDataProviderAdapter.java<gh_stars>10-100
package io.opensphere.mantle.crust;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import io.opensphere.core.util.collections.New;
import io.o... |
#!/usr/bin/env sh
#
# Import the given feed file (in `snownews` format).
#
# Author: Alastair Hughes
# Contact: hobbitalastair at yandex dot com
[ -z "${FEED_DIR}" ] && FEED_DIR="${XDG_CONFIG_DIR:-${HOME}/.config}/feeds/"
if [ "$#" -ne 1 ]; then
printf 'usage: %s urls\n' "$0"
exit 1
fi
while IFS='|' read ... |
#!/bin/bash
# Directorios de trabajo
BASE_DIR="/backup"
BACKUP_DIR=$BASE_DIR"/data"
# Obtener el nombre del directorio/archivo a resguardar
if [ $# -lt 1 ]
then
echo "uso: $0 DIR"
exit -1
fi
# Eliminar las barras (/) del nombre
DIR=$1
DIR_C=$(echo $DIR | sed 's/\///g')
# Obtener la fecha y hora actual
DATE=$(da... |
<reponame>yunsean/yoga<filename>yoga-business/yoga-admin/src/main/java/com/yoga/admin/user/dto/UserSignatureSetDto.java
package com.yoga.admin.user.dto;
import com.yoga.core.base.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
... |
<reponame>brandcast/react-higher-event-built
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ReactHigherEventProxy = exports.ReactHigherEventContainer = exports.ReactHigherEvent = undefined;
var _ReactHigherEvent = require("./ReactHigherEvent");
var _ReactHigherEvent2 = _intero... |
//
// LTFramerProperty.h
// Pods
//
// Created by <NAME> on 07/09/16.
//
//
#import "LTFramerProperty.h"
typedef NS_ENUM(NSUInteger, LTFramerSize) {
LTFramerSizeExact,
LTFramerSizeScaleToFill,
LTFramerSizeScaleToFit
};
@interface LTFramerSizeProperty : LTFramerProperty
@property (nonatomic, assign) L... |
import { SimpleUINode } from 'fomir-simple-ui'
import { type } from 'os'
type CustomNode = SimpleUINode
declare module 'fomir' {
interface CustomTypes {
Node:
| CustomNode
| {
component: CustomNode['component'] | ({} & string)
[key: string]: any
}
}
interface Validato... |
Scalr.regPage('Scalr.ui.farms.builder.addrole.dbmsr', function () {
return {
xtype: 'container',
itemId: 'dbmsr',
isExtraSettings: true,
hidden: true,
suspendUpdateEvent: 0,
layout: 'anchor',
isVisibleForRole: function(record) {
return record.isD... |
<reponame>MccreeFei/jframe<gh_stars>10-100
/**
*
*/
package jframe.activemq.service;
import jframe.core.plugin.annotation.Service;
/**
* @author dzh
* @date Jul 31, 2015 1:23:33 PM
* @since 1.0
*/
@Service(clazz = "jframe.activemq.service.ActivemqServiceImpl", id = "jframe.service.activemq")
public interface A... |
// Copyright (C) 2017, ccpaging <<EMAIL>>. All rights reserved.
package file
import (
"bytes"
"fmt"
"os"
"path"
"time"
l4g "github.com/ccpaging/nxlog4go"
"github.com/ccpaging/nxlog4go/driver"
"github.com/ccpaging/nxlog4go/patt"
"github.com/ccpaging/nxlog4go/rolling"
)
var (
// EvaluateLineLength is the a... |
#!/bin/sh
if<caret> |
<gh_stars>1-10
""" Global constants """
import os
# Example list for immune system pathways
IMMUNE_SYSTEM_PATHWAYS = {
"04640": "Hematopoietic cell lineage",
"04610": "Complement and coagulation cascades",
"04611": "Platelet activation",
"04620": "Toll-like receptor signaling pathway",
"... |
#include <iostream>
#include <unordered_map>
using namespace std;
int longestUniquePlaylist(int playlist[], int n) {
unordered_map<int, int> songIndex;
int maxLength = 0, start = 0;
for (int end = 0; end < n; end++) {
if (songIndex.find(playlist[end]) != songIndex.end()) {
start = max(... |
<reponame>wayveai/concourse<filename>atc/worker/volume.go
package worker
import (
"context"
"io"
"github.com/concourse/concourse/tracing"
"code.cloudfoundry.org/lager"
"github.com/concourse/concourse/atc/db"
"github.com/concourse/concourse/worker/baggageclaim"
)
//counterfeiter:generate . Volume
type Volume i... |
#!/bin/bash
#
# Description:
# Configure iptables firewall
#
# What to expect from this configuration:
# - Default deny policy
# - Only accepts outbound Tor traffic from the 'debian-tor' user
# - UDP port 53 (DNS) for the root user is redirected to a Tor DNSPort, this is to allow outbound Apt and Git traffic
# - UDP po... |
/**
* Created by liguangyao on 2017/3/6
*/
;(function (factory) {
if (typeof exports == "object" && typeof module == "object")
// CommonJS
factory(require("jquery"));
else if (typeof define == "function" && define.amd)
// AMD
define(["jquery"], factory);
else
// 全局模式
fa... |
<filename>2-resources/_External-learning-resources/00-Javascript/Node.js_Design_Patterns/Chapter11/05_fanout_fanin/worker.js
"use strict";
const zmq = require('zmq');
const crypto = require('crypto');
const fromVentilator = zmq.socket('pull');
const toSink = zmq.socket('push');
fromVentilator.connect('tcp://localhost... |
#!/usr/bin/env bash
cdrkit_version=1.1.11
cdrkit_download_path=http://distro.ibiblio.org/fatdog/source/600/c
cdrkit_file_name=cdrkit-${cdrkit_version}.tar.bz2
cdrkit_sha256_hash=b50d64c214a65b1a79afe3a964c691931a4233e2ba605d793eb85d0ac3652564
cdrkit_patches=cdrkit-deterministic.patch
genisoimage=genisoimage-$cdrkit_ve... |
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var core = require('@ucast/core');
var js = require('@ucast/js');
var extra = require('@casl/ability/extra');
var ability = require('@casl/ability');
class ParsingQueryError extends Error {
static invalidArgument(operatorName, value, expe... |
#!/bin/bash
#
# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
#
# This script does everything required to run the fabric CA sample.
#
# By default, this test is run with the latest released docker images.
#
# To run against a specific fabric/fabric-ca version:
# export FABRIC_TA... |
package cache
import (
"github.com/pip-services/pip-services-runtime-go"
)
type AbstractCache struct {
runtime.AbstractComponent
}
func NewAbstractCache(id string, config *runtime.DynamicMap) *AbstractCache {
return &AbstractCache { AbstractComponent: *runtime.NewAbstractComponent(id, config) }
}
|
$(document).ready(function() {
$(document.body).dblclick(function() {
fullScreen();
});
});
/* -- sidebar -- */
function toggleSidebar(direction, id){
if($("body").hasClass("acvs")) return;
if(direction == null){
$(document.body).removeClass('toggle-left toggle-right');
}else{
if(direction == 'right')... |
package rds
import (
"encoding/json"
)
// Config struct used to provide AWS Configuration Credentials
type Config struct {
ResourceArn string `json:"resource_arn"`
SecretArn string `json:"secret_arn"`
Database string `json:"database"`
AWSRegion string `json:"aws_region"`
ParseTime bool `json:"parse_t... |
const Vue = require('vue')
Vue.config.devtools = false
// Vue.prototype.$http = require('../../resources/js/http')
require('jsdom-global')()
|
// https://cses.fi/problemset/task/1203/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef tuple<ll,ll> ii;
typedef tuple<ll,ll,ll> iii;
typedef vector<bool> vb;
typedef vector<ll> vi;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<vi> vvi;
typedef vector<vii> vvii;
typedef... |
<filename>src/cf/commands/organization/list_quotas.go
package organization
import (
"cf/api"
"cf/configuration"
"cf/formatters"
"cf/requirements"
"cf/terminal"
"github.com/codegangsta/cli"
)
type ListQuotas struct {
ui terminal.UI
config configuration.Reader
quotaRepo api.QuotaRepository
}
func Ne... |
def generate_postgresql_schema(columns):
table_name = "table_name" # Replace with actual table name
schema_script = f"CREATE TABLE {table_name} (\n"
for column in columns:
column_name = column["name"]
column_type = column["type"]
constraints = " ".join(column["constraints"])
... |
<gh_stars>10-100
package github
import (
"fmt"
"os"
"testing"
)
func TestInitialize(t *testing.T) {
l, err := Initialize(os.Getenv("GITHUB_TOKEN"))
fmt.Println(err)
l.LoveOrganization("kubernetes")
}
|
package me.bxbc.interceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* Author: <NAME>
* Date 2021/2/20
*/
@Configuration
public class We... |
<filename>node_modules/react-icons-kit/icomoon/history.js
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.history = void 0;
var history = {
"viewBox": "0 0 17 16",
"children": [{
"name": "path",
"attribs": {
"fill": "#000000",
"d": "M10 1c3.866 0 7 3.134 7... |
public class ContactsActivity extends AppCompatActivity {
ContactAdapter adapter;
List<Contact> contactsList;
RecyclerView recyclerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_contacts);
// Set up RecyclerView
re... |
#!/bin/bash -x
# Create Image
sudo docker build -t $1 ..
LOGIN=$(aws ecr get-login --no-include-email --region eu-west-1)
echo $LOGIN
LOGIN_RES=$(sudo $LOGIN)
echo $LOGIN_RES
# TAG
sudo docker tag $1 944222683591.dkr.ecr.eu-west-1.amazonaws.com/d2d-backend-stage
# PUSH
sudo docker push 944222683591.dkr.ecr.eu-west-... |
let array = [1, 2, 3, 4, 5];
let iterator = array[Symbol.iterator]();
while(true) {
let next = iterator.next();
if (next.done) {
break;
}
console.log(next.value);
} |
package cyclops.stream.operator;
import static org.junit.Assert.assertTrue;
import cyclops.stream.type.PausableConnectable;
import cyclops.reactive.ReactiveSeq;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.A... |
<reponame>itchio/itchio.go<filename>hook_game_test.go
package itchio
import (
"encoding/json"
"testing"
"time"
"github.com/mitchellh/mapstructure"
"github.com/stretchr/testify/assert"
)
func Test_GameHook(t *testing.T) {
ref := Game{
ID: 123,
InPressSystem: true,
Platforms: Platforms{
Linu... |
<reponame>lananh265/social-network
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ic_offline_pin_outline = void 0;
var ic_offline_pin_outline = {
"viewBox": "0 0 24 24",
"children": [{
"name": "path",
"attribs": {
"d": "M0 0h24v24H0z",
"fill": "none"
... |
#!/usr/bin/env bash
oc new-build --strategy=docker https://github.com/buuhsmead/ocp-eap-base.git -e MY_BASE_VERSION=0.1.0 --name=eap-base
|
package org.rs2server.http;
import java.net.InetSocketAddress;
import java.util.concurrent.Executors;
import java.util.logging.Logger;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory;
import org.rs2server.Server;
public class HTTPServer {
... |
<filename>src/xrGame/smart_cover_planner_target_provider.cpp<gh_stars>1-10
////////////////////////////////////////////////////////////////////////////
// Module : smart_cover_planner_target_provider.cpp
// Created : 18.09.2007
// Author : <NAME>
// Description : Target provider for target selector
///////////... |
<gh_stars>0
package com.twitter.finatra.http.internal.exceptions
import com.google.common.net.MediaType
import com.twitter.finagle.http.{Request, Response}
import com.twitter.finagle.{CancelledRequestException, Failure}
import com.twitter.finatra.http.exceptions.{DefaultExceptionMapper, HttpException, HttpResponseExce... |
<reponame>exaxorg/filedups
datasets = (['source'],)
description='''
Convert a dataset list into a dataset chain.
'''
def synthesis(job):
assert len(datasets.source) >= 1, 'Needs at least one dataset!'
source = datasets.source
last = source.pop(-1)
previous = None
for ix, ds in enumerate(source):
previous = d... |
public static void main(String[] args) {
String str = "abc123";
int letters = 0;
int digits = 0;
for(int i = 0; i < str.length(); i++) {
char ch = str.charAt(i);
if(Character.isLetter(ch)) {
letters++;
}
else if(Character.isDigit(ch)) {
digits++;
}
}
System.out.println("Letters: " + letters + ", Dig... |
<filename>lib/oci/container_engine/models/node_pool_node_config_details.rb
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as sho... |
#!/bin/sh
sh /usr/ccsp/mta/mta_overcurrentfault_status.sh &
|
<reponame>quan-vu/ProTasks
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HomeRoutingModule } from './home-routing.module';
// Material
import ... |
<gh_stars>1-10
#include "stdafx.h"
#include "NativeVehicle.h"
#define Validation(ret) if(GetVehicle() == 0) return ret
float NativeVehicle::GetSpeed()
{
Validation(0.0f);
auto vehicle = GetVehicle();
float x = 0.0f;
float y = 0.0f;
float z = 0.0f;
x = *(float*)(vehicle + 0x44);
y = *(float*)(vehicle + 0x48);... |
<filename>src/pages/index.js
import React from 'react'
import { graphql } from 'gatsby'
import get from 'lodash/get'
import Hemlet from 'react-helmet'
import Layout from '../components/Layout'
import DisplayImage from './../assets/images/boston_mickey.jpg'
import favicon16 from "../assets/favicon-16.png"
class SiteIn... |
#!/bin/bash
#SBATCH --account=rlmolecule
#SBATCH --time=4:00:00
#SBATCH --job-name az_stability
# --- Policy Trainer ---
#SBATCH --nodes=1
#SBATCH --gres=gpu:2
# --- MCTS Rollouts ---
#SBATCH hetjob
#SBATCH -n 90
#SBATCH -c 4
export WORKING_DIR=/scratch/$USER/rlmolecule
export START_POLICY_SCRIPT="$SLURM_SUBMIT_DIR/$J... |
#ifndef CS_H_GUARD
#define CS_H_GUARD
//#include <string.h>
//#include <stdlib.h>
typedef struct cs_sparse /* matrix in compressed-column or triplet form */
{
int nzmax ; /* maximum number of entries */
int m ; /* number of rows */
int n ; /* number of columns */
int *p ; ... |
<reponame>Simon-Bin/nestjs_template
import * as path from 'path';
import * as dotenv from 'dotenv';
import * as fs from 'fs';
import { EnvConfig } from './config.interface';
export class ConfigService {
private readonly envConfig: { [key: string]: string };
constructor() {
const baseEnvFile = path.resolve(__d... |
<?php
function fibonacci($n) {
if ($n < 0)
return -1;
if ($n == 0)
return 0;
if ($n == 1)
return 1;
else
return fibonacci($n - 1) + fibonacci($n - 2);
}
$num = 10;
echo fibonacci($num); // Output: 34
?> |
wget https://alice-open.oss-cn-zhangjiakou.aliyuncs.com/StructBERT/en_model
mkdir ./models
mv en_model ./models |
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { UserEntity } from '../models/user.entity';
import { Repository } from 'typeorm';
import { User } from '../models/user.interface';
import { from, Observable, throwError } from 'rxjs';
import { AuthService } from 'sr... |
<gh_stars>0
package employeet;
import employeet.data.*;
import employeet.data.entry.Entry;
import employeet.data.entry.FloatEntry;
import employeet.data.entry.IntEntry;
import employeet.data.entry.LiteralEntry;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
... |
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import Dialog, {
DialogActions,
DialogContent,
DialogTitle,
withMobileDialog,
} from 'material-ui/Dialog';
import { Icon } from 'antd';
import Divider from 'material-ui/Divider';
import { withStyles } from 'material-ui/styles';
imp... |
#!/bin/bash
sleep 20
echo "############################################################################"
echo "############################################################################"
echo "################################ CREATED DB ################################"
echo "#########################################... |
#!/usr/bin/env bash
set -x
set -e
echo "Running Doc build script..."
sudo -E apt-get -yq update
sudo apt-get install libav-tools
#sudo apt-get install build-essential python-dev python-setuptools
#- sudo apt-get install python-numpy python-scipy python-dev python-matplotlib
#- sudo apt-get install python-nose pyth... |
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { Button, DropdownButton, MenuItem } from 'react-bootstrap';
import { GlobeIcon, LockIcon } from 'components/icons';
import './style.scss';
class PublicSwitch extends PureComponent {
stati... |
#! /bin/sh -ex
PROGRAM=restic-service
dev_path=$PWD
if test "x$1" = "x--systemd"; then
systemd=1
fi
target=`mktemp -d`
cd $target
cat > Gemfile <<GEMFILE
source "https://rubygems.org"
gem '${PROGRAM}', path: "$dev_path"
GEMFILE
bundler install --binstubs --without development --path vendor
for i in vendor/ruby... |
<gh_stars>1-10
import os
import sys
muxpy_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '../'))
sys.path.insert(0, muxpy_dir)
from muxpy import main
main.run()
|
#!/usr/bin/env 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"... |
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
</body>
</html> |
\b[a-zA-Z0-9_+&*-]+(?:.[a-zA-Z0-9_+&*-]+)*@(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,7}\b |
def factorial(n):
if n < 1:
return 1
else:
return n * factorial(n - 1) |
const dbConfig = {
dialect: 'postgres',
host: 'localhost',
port: 5432,
username: 'postgres',
password: '<PASSWORD>',
database: 'pqr_system',
user: 'postgres',
};
module.exports.dbConfig = dbConfig;
|
bnc_name=`basename $(pwd)` ;
lnk_name="$bnc_name.rbc" ;
prf_name="$bnc_name.ibc" ;
obj_name="$bnc_name.o" ;
exe_name="$bnc_name.exe" ;
source_files=($(ls *.c)) ;
CXXFLAGS=" -lm " ;
RUN_OPTIONS=" " ;
|
<reponame>starsoft35/quark
import { produce } from 'immer';
import { AnyAction } from 'redux';
import { SectionStateEnum } from '@vdfor/util';
import {
REFRESH_LIST_FAIL,
REFRESH_LIST_REQUEST,
REFRESH_LIST_SUCCESS,
RESET_LIST_FAIL,
RESET_LIST_REQUEST,
RESET_LIST_SUCCESS,
LOAD_MORE_LIST_SUCCESS,
LOAD_MOR... |
package com.meterware.httpunit;
/********************************************************************************************************************
* $Id: EncodingTest.java 813 2007-12-30 17:33:18Z wolfgang_fahl $
*
* Copyright (c) 2004, <NAME>
*
* Permission is hereby granted, free of charge, to any person obta... |
<!DOCTYPE html>
<html>
<head>
<title>Product Table</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script>
$(document).ready(function(){
$("#filter").on("keyup", function() {
var value = $(this).val().toLowerCase();
$("#table tr").filter(function() {
$(this).toggle($(this).t... |
import "../App.css";
import "bootstrap";
import "react-bootstrap";
import data from "../data-objects/data";
import React from "react"
const OfferProducts = () => {
return data.map((product) => {
const { identity, name, image, price } = product;
return (
<div className="display-offer" key={ide... |
<gh_stars>1-10
import hslToHex from '../hslToHex';
import {
HEX_TEAL,
HEX_WHITE,
HEX_BLACK,
HSL_BLACK,
HSL_RED,
HSL_TEAL,
HSL_WHITE,
} from './data/colors';
/**
* HSL to HEX
*/
describe('hslToHex', () => {
test('hslToHex - color', () => {
const teal = hslToHex(HSL_TEAL.hue, HSL_TEAL.saturation, H... |
<filename>Code Challenges/python/(not done)check_perfect_square_binsech.py
Check if Number Is Perfect Square
Given an integer n, return whether n = k * k for some integer k.
This should be done without using built-in square root function.
Constrainnts
0 ≤ n < 2 ** 31
Example 1
Input
n = 25
Output
True
Explanation
... |
<gh_stars>0
package com.lothrazar.cyclicmagic.block.batterycheat;
import com.lothrazar.cyclicmagic.IContent;
import com.lothrazar.cyclicmagic.block.core.BlockBaseHasTile;
import com.lothrazar.cyclicmagic.data.IHasRecipe;
import com.lothrazar.cyclicmagic.guide.GuideCategory;
import com.lothrazar.cyclicmagic.registry.Bl... |
/* eslint-disable import/prefer-default-export */
export { default as UriUtil } from './uri-util';
|
<gh_stars>0
package com.irmansyah.kamusku.ui.translete;
import android.arch.lifecycle.Observer;
import android.arch.lifecycle.ViewModelProvider;
import android.arch.lifecycle.ViewModelProviders;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.su... |
#!/bin/bash
# Copyright 2018 The Kubernetes 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 ... |
#!/bin/bash
#=====================================================
# This script outputs a pretty terse and fairly stable
# reprentation of the security relevant configuration
#=====================================================
# AppliesTo: linux
# RemoveExtension: True
#============================================... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.