text stringlengths 1 1.05M |
|---|
#!/bin/bash
mail -s "TrainTicket instance is setting up!" $(geni-get slice_email)
source /local/repository/aptSetup.sh
source /local/repository/shcSetup.sh
source /local/repository/dockerSetup.sh
source /local/repository/setupTrainTicket.sh
mail -s "TrainTicket instance finished setting up!" $(geni-get slice_email)
|
#!/usr/bin/env bash
set -eu
cd "$(dirname "${BASH_SOURCE[0]}")/../../../.."
SCRIPTDIR=$(realpath './internal/cmd/precise-code-intel-tester/scripts')
declare -A REVS=(
[etcd]='1044a8b07c56f3d32a1f3fe91c8ec849a8b17b5e dfb0a405096af39e694a501de5b0a46962b3050e fb77f9b1d56391318823c434f586ffe371750321'
[tidb]='2f9a487... |
package pers.ruikai.pwms.formatter;
import java.util.ArrayList;
import java.util.Formattable;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.jakewharton.fliptables.FlipTable;
import pers.ruikai.pwms.models.Category;
import pers.ruikai.pwms.models.Transaction;
import... |
def sum_of_squares(n):
total = 0
for i in range(n + 1):
total += i**2
return total |
package clientAPI.impl.OncardAPI;
import clientAPI.impl.CommandHeader;
import clientAPI.impl.CommandHeader.CmdType;
/**
* Schnittstelle zur Low-Level Bekanntmachung der Instruktionen und
* Fehlercodes des Bonuspunkte-Applets.
*
*/
public interface BonusCreditStoreOncard {
/**
* OnCard AID
... |
#include<bits/stdc++.h>
using namespace std;
int main () {
int n;
cin >> n;
vector < long long > ps(n, 0);
for(int i = 0; i < n; i++) {
int x;
cin >> x;
if(i)
ps[i] = ps[i - 1];
ps[i] += x;
}
int q;
cin >> q;
for(int i = 0; i < q; i++) {
... |
# models.py
from django.db import models
from main.models import Listing # Assuming the Listing model is defined in main app
class Labourer(models.Model):
# Define other fields for the Labourer model here
allproj = models.ManyToManyField(Listing, blank=True) |
const projectInput = (() => {
const createProjectId = () => {
const projectId = Math.round(Math.random() * 999999999999999999999, 0);
return projectId;
};
const getProjectName = () => {
const name = document.querySelector('#project-name').value;
return name;
};
return {
createProjectId,
... |
<reponame>midasplatform/MidasClient
/******************************************************************************
* Copyright 2011 Kitware Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the Lic... |
#!/bin/bash
TOP_DIR=${1:-tdir}
TMP_DIR="/tmp"
DURATION="2m"
CONCURRENTS=(32 64 128 256 512 1024)
LOCATIONS=("sequential" "random")
SIZES=(1 10 100)
echo "top test directory: $TOP_DIR"
if [ ! -d "$TOP_DIR" ]; then
mkdir -p "$TOP_DIR"
fi
start=$(date +"%Y-%m-%d %H:%M:%S")
echo "start benchmark: $start"
for concu... |
<filename>src/components/common/Navbar/Navbar.js
import React, { Component } from 'react';
import AnchorLink from 'react-anchor-link-smooth-scroll';
import Scrollspy from 'react-scrollspy';
import styled from 'styled-components';
import { Container } from '@components/global';
import {
Nav,
NavItem,
Brand,
Styl... |
SELECT department, MAX(salary)
FROM employees
GROUP BY department; |
from sklearn.ensemble import RandomForestClassifier
import joblib
def load_model(MODEL_NAME: str) -> RandomForestClassifier:
"""
Load a pre-trained RandomForestClassifier model from the given file path.
Args:
MODEL_NAME (str): The file path of the pre-trained model.
Returns:
RandomForestClass... |
import {Injectable} from 'angular2/core';
import {BackendService} from './backend';
import {User} from '../model/user';
@Injectable()
export class AuthenticationService {
private auth: {};
constructor(private backend: BackendService){}
login(username: string, password: string){
return this.backend.post({
... |
/*
* Activiti Modeler component part of the Activiti project
* Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; ei... |
#!/usr/bin/env bash
set -xe
make config.h CONFIG_WERROR=y
make -C test/lib/nvme/unit CONFIG_WERROR=y
test/lib/nvme/unit/nvme_c/nvme_ut
test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut
test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut
test/lib/nvme/unit/nvme_ns_cmd_c/nvme_ns_cmd_ut
test/lib/nvme/unit/nvme_qpair_c/n... |
/*
* Copyright (c) 2015, EURECOM (www.eurecom.fr)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* li... |
#!/usr/bin/env bash
source ./pip_common.sh
# -------------------------------------
echo "Ensuring PIP is upgraded"
pip install --upgrade pip
# -------------------------------------
./pip_uninstall_all.sh
# -------------------------------------
echo "Installing packages for development"
EXIT=""
for pkg in $PACKAGES;... |
package com.ty.fm.models;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonI... |
<filename>sputnik/vector_utils.h<gh_stars>100-1000
// Copyright 2020 The Sputnik 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-... |
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2021 Alessandro De Blasis <alex@deblasis.net>
#
# 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 ... |
#!/bin/sh
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee R... |
def find_duplicates(input_list):
duplicate = []
visited = set()
for item in input_list:
if item in visited:
duplicate.append(item)
else:
visited.add(item)
return duplicate
result = find_duplicates([2, 3, 5, 6, 7, 2, 6])
print(result) |
import logging
class Logger:
class LogHelper:
handler = logging.StreamHandler() # Assuming LogHelper has a predefined StreamHandler
@staticmethod
def get_logger(name, level=logging.DEBUG):
l = logging.getLogger(name)
l.setLevel(level)
l.addHandler(Logger.LogHelper.handler)... |
import React from "react";
import { connect } from "react-redux";
import { fetchNoticias } from "./actionCreator";
const FetchNoticia = ({ fetchNoticias }) => {
return <button onClick={fetchNoticias}>Fetch Noticias</button>;
};
const mapDispatchToProps = (dispatch) => {
return {
fetchNoticias() {
dispat... |
<filename>src/pages/BeerMap/styles.ts
import { Animated } from 'react-native'
import { RectButton } from 'react-native-gesture-handler'
import styled from 'styled-components/native'
export const Container = styled.View`
flex: 1;
align-items: center;
justify-content: center;
`
export const CalloutContainer = st... |
import { Field, ObjectType } from "type-graphql";
@ObjectType()
export default class User {
@Field(() => String)
id: String;
@Field(() => String)
name: String;
@Field(() => String)
username: String;
}
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.google.android.gms;
public final class R {
public static final class anim {
}
public static final class attr {
public sta... |
<reponame>lanpinguo/rootfs_build
/*
******************************************************************************
*
* isp_platform_drv.h
*
* Hawkview ISP - isp_platform_drv.h module
*
* Copyright (c) 2014 by Allwinnertech Co., Ltd. http:
*
* Version Author Date Description
*
* 2.0 <NA... |
<filename>code/iaas/model/src/main/java/io/cattle/platform/core/constants/HealthcheckConstants.java
package io.cattle.platform.core.constants;
public class HealthcheckConstants {
public static final String HEALTH_STATE_HEALTHY = "healthy";
public static final String HEALTH_STATE_UPDATING_HEALTHY = "updating-h... |
package weixin.business.service;
import weixin.business.entity.WeixinFoodEntity;
import org.jeecgframework.core.common.service.CommonService;
import java.io.Serializable;
import java.util.List;
public interface WeixinFoodServiceI extends CommonService{
public <T> void delete(T entity);
public <T> Serializab... |
package ru.zzz.demo.sber.shs.rest.dto;
import com.fasterxml.jackson.annotation.JsonGetter;
import org.springframework.lang.NonNull;
public class DeviceUnregistrationResponseDto {
private final boolean deviceExistedAndWasUnrigistered;
@NonNull
public static DeviceUnregistrationResponseDto ofReallyUnregist... |
package tree.declarations;
import tree.DefaultTreeNode;
import tree.symbols.TSAtomic;
import tree.symbols.TSConst;
import tree.symbols.TSRestrict;
import tree.symbols.TSVolatile;
public class TTypeQualifier extends DefaultTreeNode {
public TTypeQualifier(TTypeQualifier node) {
super(node);
}
public TTypeQuali... |
#!/bin/sh
YO="./parser_test"
binaryoutput="./a.out"
preproc_path="preprocessor.py"
# Set time limit for all operations
ulimit -t 30
globallog=testall.log
rm -f $globallog
error=0
globalerror=0
keep=0
Usage() {
echo "Usage: test.sh [options] [.yo files]"
echo "-k Keep intermediate files"
echo "-h ... |
<gh_stars>10-100
import mock
import requests_mock
from integration_mocks import IntegrationMocks
class GetAccessTokenTest(IntegrationMocks):
# real_http is required for the redirect in integration_mocks to work
@requests_mock.Mocker(real_http=True)
@mock.patch("builtins.print")
def test_get_access_tok... |
import HSVTypes from "./HSVTypes";
/*eslint no-unused-expressions: "off"*/
/*eslint no-sequences: "off"*/
export default class HSVTools {
static HSVtoRGB (c: HSVTypes.HSVColor): HSVTypes.RGBColor {
const {h, s, v} = c;
let i, f, p, q, t;
i = Math.floor(h * 6);
f = h * 6 - i;
... |
public class School
{
// School class implementation
}
public class SchoolDto
{
// SchoolDto class implementation
public School ToModel()
{
// Implement the conversion logic
School school = new School();
// Copy relevant properties from SchoolDto to School
school.Proper... |
#!/bin/bash
fw_depends mysql php7 nginx composer
sed -i 's|database_host: .*|database_host: '"${DBHOST}"'|g' app/config/parameters.yml
sed -i 's|root .*/FrameworkBenchmarks/php-symfony2| root '"${TROOT}"'|g' deploy/nginx.conf
sed -i 's|/usr/local/nginx/|'"${IROOT}"'/nginx/|g' deploy/nginx.conf
php bin/console cache:... |
/**
* @file LBInstallation.h
*
* @author <NAME>
* @copyright (c) 2013 StrongLoop. All rights reserved.
*/
#import "LBPersistedModel.h"
#import "LBRESTAdapter.h"
@class LBInstallation;
@class LBInstallationRepository;
/**
* LBInstallation represents the installation of a given app on the device. It
* connects... |
import numpy as np
# input data
X = np.array([[0.1, 0.9], [0.25, 0.12]])
# output data
y = np.array([1, 0])
# architecture of the network
model = tf.keras.Sequential([
tf.keras.layers.Dense(4, input_shape=(2,)),
tf.keras.layers.Dense(4, activation='sigmoid'),
tf.keras.layers.Dense(1, activation='sigmoid')
])
# ... |
import { sbClient } from "~/lib/supabase/index";
import {
Tables,
CustomFunction,
Link,
Page,
PageWithMetadata,
Theme,
User,
} from "@linkto/core";
import {
ChangePasswordDto,
CreateLinkDto,
ReorderLinkDto,
SignUpDto,
UpdateLinkDto,
UpdatePageDto,
UpdateUserDto,
} from "~/types";
/*********... |
import React from 'react';
import { radios } from '@storybook/addon-knobs';
import { storiesOf } from '@storybook/react';
import { Row } from 'antd';
import Logo from './logo';
storiesOf('Components/Logos', module)
.add('default', () => {
return (
<div>
<Row>
<Logo name="bepswap" type="... |
<reponame>hylophile/frontend<gh_stars>0
import PropTypes from 'prop-types';
import { connect } from 'react-redux';
import React, { Component } from 'react';
import { bindActionCreators } from 'redux';
import { Form as FinalForm } from 'react-final-form';
import { Button, Form } from 'react-bootstrap';
import {
Dashbo... |
import * as utils from "../core/utils";
const SeeAlso = function (placeHolder, translator, dispatch, { tools, selectedTool, onClick }) {
const templateHtml = `
<div class="see-also-block">
<h2 class="heading-2 see-also-heading" data-text="other_tools"></h2>
<div class="other-tools-container">
... |
class TradingOrder:
def __init__(self, pegPriceMax, pegPriceDeviation, cancelDuration, timestamp, orderID, stealth, triggerOrder, triggerPrice, triggerOriginalPrice, triggerOrderType, triggerTrailingStopDeviation):
self.pegPriceMax = pegPriceMax
self.pegPriceDeviation = pegPriceDeviation
sel... |
<gh_stars>0
package virtual_robot.controller;
import java.util.concurrent.TimeUnit;
import virtual_robot.controller.LinearOpMode;
import virtual_robot.hardware.HardwareMap;
import virtual_robot.hardware.Telemetry;
public class OpMode extends LinearOpMode {
// internal time tracking
private long _startTime =... |
/**
* @author ooooo
* @date 2020/9/12 10:44
*/
#ifndef CPP_0637__SOLUTION3_H_
#define CPP_0637__SOLUTION3_H_
#include "TreeNode.h"
class Solution3 {
public:
vector<double> averageOfLevels(TreeNode *root) {
vector<double> ans;
if (!root) return ans;
queue<TreeNode *> q;
q.push(root);
while (!q.empty(... |
<filename>src/main/java/br/com/alura/carteira/factory/ConnectionFactory.java<gh_stars>0
package br.com.alura.carteira.factory;
import java.sql.Connection;
import java.sql.DriverManager;
public class ConnectionFactory {
public Connection getConnection() {
try {
String url = "jdbc:mysql://localhost:3306/cart... |
<filename>src/ordt/output/systemverilog/common/SystemVerilogModule.java
/*
* Copyright (c) 2016 Juniper Networks, Inc. All rights reserved.
*/
package ordt.output.systemverilog.common;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
i... |
/**
* @copyright Copyright 2021 <NAME> <<EMAIL>>
* @license MIT
*/
import { isDeepStrictEqual } from 'util';
/** Manages named additions to defined components.
*/
export default class ComponentManager {
constructor(component) {
if (component === null
|| typeof component !== 'object'
|| Array.isA... |
#!/usr/bin/env bash
set -euo pipefail
exec $(nix-build `dirname $0`/. -A stackNixRegenerate --no-out-link)
|
def find_largest_number(numbers):
largestNumber = 0
for number in numbers:
if number > largestNumber:
largestNumber = number
return largestNumber
result = find_largest_number([2, 4, 8, 15, 16, 23, 42])
print(result) |
import numpy as np
import matplotlib.pyplot as plt
class Dombi:
def __init__(self, p):
self.p = p
def draw(self):
x = np.linspace(0, 1, 100)
y = 1 / (1 + ((1 - x) / x) ** (-self.p))
plt.plot(x, y, label=f'Dombi system with $p = {self.p}$')
plt.xlabel('x')
plt.yl... |
<filename>lib/request.js<gh_stars>1-10
const request = require('request')
const TIMEOUT = 10000
class Request {
constructor(siteid, apikey) {
this.siteid = siteid
this.apikey = apikey
this.auth = `Basic ${new Buffer(
this.siteid + ':' + this.apikey,
'utf8'
).toString('base64')}`
this.... |
<gh_stars>1-10
package info.javaspec.spec;
import de.bechte.junit.runners.context.HierarchicalContextRunner;
import info.javaspec.context.Context;
import info.javaspec.context.ContextFactory;
import info.javaspec.context.FakeContext;
import info.javaspec.spec.SpecFactory.AmbiguousFixture;
import info.javaspecproto.Con... |
echo -e "\e[0mregular\e[0m"
echo -e "\e[1mbold\e[0m"
echo -e "\e[3mitalic\e[0m"
echo -e "\e[4munderline\e[0m"
echo -e "\e[9mstrikethrough\e[0m"
echo -e "\e[31mHello World\e[0m"
echo -e "\x1B[31mHello World\e[0m"
|
#!/bin/bash
# Build oanhnn/php-stack:latest
docker pull $DOCKER_REPO:latest || true
docker build --pull --cache-from $DOCKER_REPO:latest --tag $DOCKER_REPO:latest .
# Build oanhnn/php-stack:laravel
docker build --tag $DOCKER_REPO:laravel laravel
|
#!/bin/sh
set -e
# Parse args.
args=$@
while [[ $# -gt 0 ]]; do
key="$1"
case $key in
-t|--target)
target="$2"
shift
shift
;;
--disable-pty)
disable_pty="yes"
shift
;;
*)
echo "Usage: ./build.sh [-t|--target <release|debug>] [--disable_pty]";
exit 1... |
# Creating a brand
# Check that we're in a bash shell
if [[ $SHELL != *"bash"* ]]; then
echo "PROBLEM: Run these scripts from within the bash shell."
fi
read -p "Please enter a new brand name [Sample Bash Corp. {date}]: " BRAND
BRAND=${BRAND:-"Sample Bash Corp. "$(date +%Y-%m-%d-%H:%M)}
export BRAND
# Step 1: Ob... |
<filename>plugins/com.ibm.socialcrm.notesintegration.ui/src/com/ibm/socialcrm/notesintegration/ui/views/NoSugarEntryViewPart.java
package com.ibm.socialcrm.notesintegration.ui.views;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.resource.JF... |
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo -e "\nProvisions the given host using the given Ansible playbook file.\n"
echo -e "Assumes that passwordless SSH is already setup for the host. (Use firstrun.sh for achieve that)\n"
echo -e "Usage: $0 <host> <playbook>\n"
exit 1
fi
HOST=$1
PLAYBOOK=$2
if [ ! -f "$PLAY... |
#
# Copyright (c) 2013-2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# All Rights Reserved.
#
from collections import OrderedDict
import os
from cgtsclient._i18n import _
from cgtsclient.common import constants
from cgtsclient.common import utils... |
# Add curl to the 'path'
if [ -d "/usr/local/opt/curl/bin" ] ; then
path=("/usr/local/opt/curl/bin" $path)
fi
|
<reponame>ThallesTorres/Linguagem_C
// Exercício 07 - Calcular o fatorial de um número fornecido pelo usuário. A função fatorial de
// um número natural n é o produto de todos os n primeiros números naturais.
#include <stdio.h>
int main(void)
{
int num, count, resp;
resp = 1;
printf("Digite um número: ");
... |
// Copyright 2008 The Apache Software Foundation
//
// 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 l... |
import json
import time
import pytest
from netdumplings import Dumpling, DumplingChef, DumplingDriver
from netdumplings.exceptions import InvalidDumpling, InvalidDumplingPayload
@pytest.fixture
def mock_kitchen(mocker):
kitchen = mocker.Mock()
kitchen.name = 'TestKitchen'
kitchen.interface = 'en0'
k... |
#!/bin/sh
for i in 0 1 2 3 4
do
python -m neuralparticles.tools.show_detail_csv src 2D_data/tmp/2018-08-27_14-13-57/eval/eval_patch_src_e000_d00${i}_t000.csv res 2D_data/tmp/2018-08-27_14-13-57/eval/eval_patch_res_e002_d00${i}_t000.csv idx $1 out details_d/detail_i%04d_%s_${i}
done |
import { Component } from '@angular/core';
import { NbDialogService } from '@nebular/theme';
import { PriceBookService } from '../../../@core/data/pricebook.service';
import { CreateLineItemComponent } from '../create-pricebook/line-item/line-item.component';
import { CreateLineItemGroupComponent } from '../create-pri... |
<reponame>Mdamman/APP_MakeTheChange
import { Component } from "@angular/core";
import { SplashScreen } from "@capacitor/splash-screen";
import { SeoService } from "./utils/seo/seo.service";
import { TranslateService, LangChangeEvent } from "@ngx-translate/core";
import { HistoryHelperService } from "./utils/history-hel... |
<filename>tests/lsshipper/test_connection.py
import pytest
import asyncio
from lsshipper.common.state import State
from lsshipper.connection import logstash_connection
import logging
logging.basicConfig(level=logging.DEBUG)
@pytest.mark.asyncio
async def test_read_common_file(event_loop, unused_tcp_port):
"""tr... |
########################################################################
# Copyright 2021, UChicago Argonne, LLC
#
# Licensed under the BSD-3 License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a
# copy of the License at
#
# https://opensource.org/licenses/BSD-... |
#!/usr/bin/env bash
SELECT 15 BETWEEN 1 AND 20;
SELECT 150 BETWEEN 1 AND 20;
SELECT 150 NOT BETWEEN 1 AND 20;
SELECT 10 IN(0,10,20,30);
SELECT 11 IN(0,10,20,30);
SELECT NULL IS NULL;
SELECT '' IS NULL;
SELECT 'NULL' IS NULL;
SELECT 0 IS NULL;
SELECT * FROM `test`;
SELECT * FROM `test` WHERE `first_name` IS NULL;
SE... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { space, alignSelf, width } from 'styled-system';
import OutsideClickHandler from 'react-outside-click-handler';
import { preset } from 'react/styles/functions';
import PulldownValue from 'reac... |
<gh_stars>0
import * as dotenv from "dotenv";
dotenv.config({ path: `${__dirname}/../.env` });
export const config = {
port: process.env.PORT || 5000,
dbUrl: process.env.DB_URL || "bolt://neo4j:7687",
};
|
# platform = Red Hat Enterprise Linux 6
#
# Disable dhcpd for all run levels
#
/sbin/chkconfig --level 0123456 dhcpd off
#
# Stop dhcpd if currently running
#
/sbin/service dhcpd stop
|
<reponame>maufonseca/haste
package com.maufonseca.haste.infrastructure;
import android.support.annotation.NonNull;
import android.util.Log;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.firestore.CollectionReference;
import com.google.fire... |
from typing import Type
class DefaultFeed:
pass
class LatestCommentFeed:
pass
feeds = {
'comments': LatestCommentFeed,
}
def get_feed_class(url_pattern: str) -> Type[FeedClass]:
return feeds.get(url_pattern, DefaultFeed) |
module.exports = async (d) => {
const data = d.util.aoiFunc(d);
if (data.err) return d.error(data.err);
let [
varname,
value,
userId = d.author?.id,
Id = d.guild?.id || "dm",
table = d.client.db.tables[0],
] = data.inside.splits;
value = value.addBrackets();
... |
<reponame>ES-UFABC/UFABCplanner
import { useCallback, useEffect, useState } from 'react';
import { ICredentials } from '../../interfaces/credentials';
import api from '../../services/api';
import { AuthContext } from './context';
interface Props {
children: React.ReactNode;
}
const AuthProvider = ({ children }: ... |
package org.librealsense;
public class StreamProfileList {
long streamProfileList;
protected StreamProfileList(long streamProfileList) {
this.streamProfileList = streamProfileList;
}
public int getSize() {
return Native.rs2GetStreamProfileCount(streamProfileList);
}
... |
firefox_da)
name="Firefox"
type="dmg"
downloadURL="https://download.mozilla.org/?product=firefox-latest&os=osx&lang=da"
appNewVersion=$(curl -fs https://www.mozilla.org/en-US/firefox/releases/ | grep '<html' | grep -o -i -e "data-latest-firefox=\"[0-9.]*\"" | cut -d '"' -f2)
expectedTeamID="... |
import random
def generate_password():
password = ""
characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+"
for i in range(0,8):
password += random.choice(characters)
return password |
module Ricer4::Plugins::Board
class Abbo < Ricer4::Plugin
is_add_abbo_trigger :for => Ricer4::Plugins::Board::Model::Board
end
end
|
import React, {Component} from 'react';
import {Form, Icon, Message, Button} from 'semantic-ui-react';
import StatusMessage from '../../components/statusmessage';
import './styles.css';
export default class Register extends Component {
constructor(props) {
super(props);
this.state = {
username: '',
... |
from datetime import datetime, timedelta
from django.conf import settings
from django.conf.urls import url, patterns, include
from django.contrib.auth.forms import PasswordChangeForm
from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext, ugettext_lazy as _, pgettext, pgettext_laz... |
def generate_migration(app_name, dependencies):
migration_content = f"class Migration(migrations.Migration):\n\n dependencies = [\n ('{app_name}', '{dependencies}'),\n # Additional dependencies go here\n ]\n\n # Other migration content goes here"
return migration_content |
#! /bin/bash
#получить все новости - здесь не нужны куки
curl -b 'sId=' -X GET http://localhost:3000/api/getOne/category3/12 |
<reponame>msnraju/al-productivity-tools<filename>src/commands/al-file-commands.ts
import * as vscode from "vscode";
import * as fs from "fs";
import * as path from "path";
import ALFileHelper from "./al-file-helper";
import simpleGit from "simple-git";
import { v4 as uuidv4 } from "uuid";
export default class ALFileCo... |
<gh_stars>0
# https://binarysearch.com/
#
# GGA 2020.10.28
#
# User Problem
# You have:
#
# You Need:
#
# You Must:
#
# Input/Output Example:
#
# Domino Placement
# You are given integers n and m representing a board
# of size n by m. You also have an unlimited number
# of 1 by 2 dominos.
# Return the maximum number o... |
import string
import random
def generatePassword(length):
password = []
characters = string.ascii_letters + '0123456789' + string.punctuation
for i in range(length):
password.append(random.choice(characters))
password.append('A')
password.append('a')
password.append('1')
password.a... |
<gh_stars>1-10
package com.kamikaze.yada;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.location.Address;
import android.location.Geocoder;
import android.location.Location;
impo... |
# Detect when we're not being sourced, print a hint and exit
# Based on https://stackoverflow.com/questions/2683279/how-to-detect-if-a-script-is-being-sourced#34642589
# When "return" fails (ie if not sourced), an error message is printed and
# caught by the if clause.
# In the normal mode of operation (ie if sourced),... |
#!/usr/bin/env
python3 -m venv venv
source venv/bin/activate
pip3 install numpy numexpr tqdm pygam scikit-learn networkx
pip3 install conditional_independence graphical_models graphical_model_learning
pip3 install twine wheel ipdb ipython
pip3 install jedi==0.17.2
# REPLACE WITH PATH TO OTHER PACKAGES
pip3 install -e... |
<filename>game-practice/src/components/Sidebar/SidebarMenu.js
import React, { Component } from 'react'
import {
BrowserRouter as Router,
Route,
NavLink
} from 'react-router-dom'
import '../../styles/SidebarMenu.css'
const routes = [
{
path: '/',
exact: true,
sidebar: () => <div>Home</div>,
main... |
<gh_stars>0
package cmd
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"os"
"regexp"
"strconv"
"strings"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/plumber-cd/github-apps-trampoline/helper"
"github.com/plumber-cd/github-apps-trampoline/logger"
)
var (
verbose bool
server ... |
#!/bin/bash
# Copyright 2016 - 2018 Crunchy Data Solutions, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... |
export default ({ spacing }) => ({
container: {
margin: 'auto',
paddingTop: 60,
paddingBottom: 60,
width: spacing.fullWidth,
},
secondButton: {
position: 'relative',
'& .backdrop': {
display: 'none',
},
'&:hover > .backdrop': {
cursor: 'pointer',
width: spacing.fu... |
<filename>src/main/java/io/github/rcarlosdasilva/weixin/model/response/certificate/JsTicketResponse.java
package io.github.rcarlosdasilva.weixin.model.response.certificate;
import io.github.rcarlosdasilva.weixin.model.JsTicket;
public class JsTicketResponse extends JsTicket {
private static final long serial... |
<filename>pirates/effects/EnergySpiral.py
# File: E (Python 2.4)
from pandac.PandaModules import *
from direct.interval.IntervalGlobal import *
from otp.otpbase import OTPRender
from EffectController import EffectController
from PooledEffect import PooledEffect
import random
class EnergySpiral(PooledEffect, EffectCon... |
from flask import Flask, request, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('form_page.html')
@app.route('/submit', methods=['POST'])
def submit():
if request.method == "POST":
name = request.form["name"]
email = request.form["email"]
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.