repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
vampy/university | aspect-oriented-programming/labs/src/com/aop/controller/GUIController.java | package com.aop.controller;
import com.aop.log.Log;
import com.aop.model.Book;
import com.aop.model.Library;
import java.util.Observable;
import java.util.Observer;
public class GUIController extends AbstractController
{
private Library library;
private BooksMainTableModel tableModel;
public GUIControll... |
aukgit/scala-open-real-time-bidding-rtb | app/shared/com/ortb/model/wrappers/persistent/EntityWithJoinedTableRowsWrapperModel.scala | <filename>app/shared/com/ortb/model/wrappers/persistent/EntityWithJoinedTableRowsWrapperModel.scala
package shared.com.ortb.model.wrappers.persistent
import shared.io.helpers.EmptyValidateHelper
case class EntityWithJoinedTableRowsWrapperModel[TBase, TChildRowsType](
row : Option[TBase],
innerRows : Option[Seq[TC... |
derailed/gobot | event.go | <reponame>derailed/gobot
package gobot
type Event struct {
Chan chan interface{}
Callbacks []func(interface{})
}
func NewEvent() *Event {
e := &Event{
Chan: make(chan interface{}, 1),
Callbacks: []func(interface{}){},
}
go func() {
for {
e.Read()
}
}()
return e
}
func (e *Event) Write(dat... |
GuusLieben/DarwinServerSources | hartshorn-core/src/main/java/org/dockbox/hartshorn/application/ActivatorHolder.java | /*
* Copyright 2019-2022 the original author or 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... |
42iscool42/SpongeCommon | src/main/java/org/spongepowered/common/util/PathTokens.java | /*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... |
mjenrungrot/algorithm | UVa Online Judge/v126/12643.py | <reponame>mjenrungrot/algorithm
import sys
lines = sys.stdin.readlines()
for line in lines:
line = line.strip()
N, i, j = list(map(int, line.split()))
ans = 0
while i != j:
if i % 2:
i = (i + 1) // 2
else:
i = i // 2
if j % 2:
j = (j + 1) /... |
coinForRich/coin-for-rich | common/helpers/numbers.py | <reponame>coinForRich/coin-for-rich
# This module contains common number helpers
from decimal import Decimal
from typing import Union
def round_decimal(
number: Union[float, int, Decimal, str],
n_decimals: int=2
) -> Union[Decimal, None]:
'''
Rounds a `number` to `n_decimals` decimals
... |
synesenom/ranjs | src/dist/bradford.js | import Distribution from './_distribution'
/**
* Generator for the [Bradford distribution]{@link https://docs.scipy.org/doc/scipy/reference/tutorial/stats/continuous_bradford.html}:
*
* $$f(x; c) = \frac{c}{\ln(1 + c) (1 + c x)},$$
*
* with $c > 0$. Support: $x \in \[0, 1\]$.
*
* @class Bradford
* @memberof ra... |
JianYT/mobile-sdk | all/native/core/BinaryData.cpp | <gh_stars>100-1000
#include "BinaryData.h"
#include <algorithm>
#include <sstream>
namespace carto {
BinaryData::BinaryData() :
_dataPtr(std::make_shared<std::vector<unsigned char> >())
{
}
BinaryData::BinaryData(std::vector<unsigned char> data) :
_dataPtr(std::make_shared<std::vecto... |
lisongwang/java-core | src/main/java/com/lisong/learn/core/polymorphism/animal/Frog.java | package com.lisong.learn.core.polymorphism.animal;
import static com.lisong.learn.core.util.Print.print;
public class Frog extends Amphibian {
private Characteristic c = new Characteristic("Croaks");
private Description d = new Description("Eats Bugs");
public Frog() { print("Frog()"); }
@Override... |
bobmcwhirter/drools | drools-verifier/src/main/java/org/drools/verifier/dao/DataTree.java | <gh_stars>10-100
package org.drools.verifier.dao;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
public class DataTree<K, V> {
private Map<K, Set<V>> map = new TreeMap<K,... |
jleopold28/snippets-and-notes | puppet/conjur/conjur/lib/puppet/parser/functions/conjur_fetch.rb | module Puppet::Parser::Functions
newfunction(:conjur_fetch, type: :rvalue) do |args|
`/usr/local/bin/conjur variable value #{args[0]}/#{args[1]}`
end
end
|
kkcookies99/UAST | Dataset/Leetcode/test/9/152.py | class Solution(object):
def XXX(self,x):
if x<0:return False
stk=[]
cnt=0
while pow(10,cnt)<=x:
cnt+=1
cur=(x % pow(10,cnt))//pow(10,cnt-1)
stk.append(cur)
while stk!=[] and len(stk)!=1:
if stk[0]==stk[-1]:
stk.p... |
chingu-voyages/v19-geckos-team-04 | src/components/App/App.js | import React, { Component, useContext } from 'react';
import { BrowserRouter, Route } from 'react-router-dom';
import queryString from 'query-string';
import './App.scss';
import Dashboard from '../Dashboard/Dashboard';
import SignIn from '../LoggedOut/SignIn';
import ThemeContextProvider from '../../context/ThemeCont... |
todbot/Blink1Control2 | src/renderer/components/gui/blink1TabViews.js | <filename>src/renderer/components/gui/blink1TabViews.js
"use strict";
import React from 'react';
import { Tabs } from 'react-bootstrap';
import { Tab } from 'react-bootstrap';
import { Button } from 'react-bootstrap';
import BigButtonSet from './bigButtonSet';
import ToolTable from './toolTable';
import { ipcRender... |
ooibc88/Hyperledger-Fabric- | ustore_home/include/recovery/log_reader.h | <reponame>ooibc88/Hyperledger-Fabric-<gh_stars>100-1000
// Copyright (c) 2017 The Ustore Authors.
#ifndef USTORE_RECOVERY_LOG_READER_H_
#define USTORE_RECOVERY_LOG_READER_H_
#include "recovery/log_entry.h"
#include "recovery/log_cursor.h"
#include "recovery/single_log_reader.h"
namespace ustore {
namespace recovery ... |
openlibraryenvironment/rice | rice-framework/krad-app-framework/src/main/java/org/kuali/rice/krad/service/XmlObjectSerializerService.java | <reponame>openlibraryenvironment/rice<filename>rice-framework/krad-app-framework/src/main/java/org/kuali/rice/krad/service/XmlObjectSerializerService.java
/**
* Copyright 2005-2014 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file exc... |
kaustubh2708/serritor | src/main/java/com/github/peterbencze/serritor/internal/CrawlEvent.java | <reponame>kaustubh2708/serritor
/*
* Copyright 2017 <NAME>.
*
* 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... |
GaloisInc/adapt | legacy/tools/signal_completion.py | #! /usr/bin/env python3
# Copyright 2016, Palo Alto Research Center.
# Developed with sponsorship of DARPA.
#
# 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 w... |
zipated/src | components/viz/test/test_gpu_memory_buffer_manager.cc | <reponame>zipated/src
// Copyright 2014 The Chromium 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 "components/viz/test/test_gpu_memory_buffer_manager.h"
#include <stddef.h>
#include <stdint.h>
#include "base/logging.h"
... |
Huynhvantoan/uHotel | app/src/main/java/com/acuteksolutions/uhotel/ui/adapter/concierge/RoomAdapter.java | <gh_stars>0
package com.acuteksolutions.uhotel.ui.adapter.concierge;
import android.annotation.SuppressLint;
import android.view.View;
import android.widget.TextView;
import com.acuteksolutions.uhotel.R;
import com.acuteksolutions.uhotel.interfaces.SaveDataRoomListener;
import com.acuteksolutions.uhotel.interfaces.Vi... |
Kitingu/SendIT-Api | app/api/v1/views/user.py | from flask_restplus import Resource, Namespace, reqparse, fields
from werkzeug.security import check_password_hash, generate_password_hash
from flask import request
from app.api.utils.app_docs import v1_user, new_user, user_login
from app.api.utils.parcel_validator import UserSchema, LoginSchema, validator
from ..model... |
CoderHam/WebScraper | node_modules/webdriverio/test/spec/submitForm.js | <reponame>CoderHam/WebScraper<filename>node_modules/webdriverio/test/spec/submitForm.js
/* global beforeEach */
describe('submitForm', function() {
beforeEach(h.setup());
var elementShouldBeNotExisting = function (isExisting) {
/**
* because there was no element found isExisting is fal... |
zhuhanming/duchess | src/main/java/duke/util/MagicStrings.java | package duke.util;
/**
* The {@code Constants} class contains all magic constants.
*/
public class MagicStrings {
public static final String BLANK = "";
// Date time helper strings.
public static final String DATE_TIME_OVERDUE = " [OVERDUE]";
public static final String DATE_TIME_TODAY = "Today ";
... |
kipsigman/play-extensions | src/test/scala/kipsigman/play/mvc/AjaxHelperSpec.scala | package kipsigman.play.mvc
import scala.concurrent.Future
import org.scalatestplus.play.PlaySpec
import org.slf4j.LoggerFactory
import kipsigman.domain.entity.Category
import kipsigman.domain.entity.Role
import kipsigman.domain.entity.UserBasic
import play.api.Configuration
import play.api.Environment
import play.ap... |
snkmr/shirasagi | app/models/gws/qna/post.rb | <gh_stars>100-1000
# "Post" class for BBS. It represents "comment" models.
class Gws::Qna::Post
include Gws::Referenceable
include Gws::Qna::Postable
include Gws::Addon::Contributor
include SS::Addon::Markdown
include Gws::Addon::File
include Gws::Qna::DescendantsFileInfo
include Gws::Addon::GroupPermissi... |
nicoddemus/dependencies | tests/helpers/django_project/api/version.py | <reponame>nicoddemus/dependencies<filename>tests/helpers/django_project/api/version.py<gh_stars>0
from rest_framework.versioning import BaseVersioning
from django_project.api.exceptions import VersionError
class DenyVersion(BaseVersioning):
def determine_version(self, request, *args, **kwargs):
raise Ve... |
6l17ch-3xpl017/uchat | server/resources/libmx/src/mx_nbr_length.c | <reponame>6l17ch-3xpl017/uchat
#include "libmx.h"
int mx_nbr_length(int num) {
int len = 1;
while (num /= 10)
len++;
return len;
}
|
filscorporation/Engine | engine/source/Steel/Scene/UUID.h | <filename>engine/source/Steel/Scene/UUID.h
#pragma once
#include <cstdint>
#define NULL_UUID 0
using UUID = uint64_t;
|
WeilerP/cellrank | cellrank/tl/estimators/mixins/__init__.py | from cellrank.tl.estimators.mixins.decomposition import EigenMixin, SchurMixin
from cellrank.tl.estimators.mixins._lineage_drivers import LinDriversMixin
from cellrank.tl.estimators.mixins._absorption_probabilities import AbsProbsMixin
|
AlexArtaud-Dev/Genconf | src/main/java/fr/uga/iut2/genconf/modele/enums/TypeSession.java | <gh_stars>1-10
package fr.uga.iut2.genconf.modele.enums;
import java.util.Optional;
public enum TypeSession {
Keynote,
Article,
Tutorial;
public static Optional<TypeSession> parseFrom(final String token) {
switch (token.toLowerCase()){
case "keynote":
return Optio... |
suggestio/suggestio | src1/server/www/app/util/geo/GeoIpUtil.scala | package util.geo
import javax.inject.Inject
import io.suggest.geo.{IGeoFindIp, IGeoFindIpResult, MGeoLoc}
import io.suggest.geo.ipgeobase.IpgbUtil
import io.suggest.playx.CacheApiUtil
import io.suggest.util.logs.MacroLogsImpl
import play.api.inject.Injector
import scala.concurrent.{ExecutionContext, Future}
import sc... |
Show-vars/overstream | overstream-http/src/main/java/com/overstreamapp/http/support/ConnectionPoint.java | <filename>overstream-http/src/main/java/com/overstreamapp/http/support/ConnectionPoint.java<gh_stars>1-10
/*
* Copyright 2019 Bunjlabs
*
* 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 a... |
yangyahu-1994/Python-Crash-Course | VSCode_work/chapter7/chapter7_7_7.py | # 无限循环,小心使用
while True:
print(1) |
julienstroheker/azure-golang-sdk-sandbox | pkg/sdk/deployment_test.go | package sdk
import "testing"
func TestGetDeploy(t *testing.T) {
dc := getDeploymentClient()
getDeployment(dc, "55d30728-a303-48a3-a274-b1781dd03479")
}
|
DanIverson/OpenVnmrJ | src/vnmr/makeslice.c | <reponame>DanIverson/OpenVnmrJ
/*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the LICENSE file.
*
* For more information, see the LICENSE file.
*/
/* makeslice.c Manchester version 6.1B 20iv99... |
objectiser/scribble-java | scribble-core/src/main/java/org/scribble/ast/local/LChoice.java | /**
* Copyright 2008 The Scribble 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 or agreed ... |
fouadsan/ims-soft | ims_soft/products/utils.py | from django.http import JsonResponse
from .models import Category, Product
def objects_list_and_create(request, form):
instance = form.save(commit=False)
instance.created_by = request.user
instance = form.save()
print(instance)
if hasattr(instance, 'article_num'):
return JsonResponse({
... |
HiltonRoscoe/exchangerxml | src/com/cladonia/xngreditor/LatestNewsDialog.java | /*
* $Id: LatestNewsDialog.java,v 1.0 7 Jun 2007 09:59:20 Administrator Exp $
*
* Copyright (C) 2005, Cladonia Ltd. All rights reserved.
*
* This software is the proprietary information of Cladonia Ltd. Use is subject
* to license terms.
*/
package com.cladonia.xngreditor;
import java.awt.BorderLa... |
barryquan/jpa-springboot-code-generator | src/main/java/com/github/barry/akali/generator/db/DataBaseProperties.java | <gh_stars>0
package com.github.barry.akali.generator.db;
import lombok.Data;
/**
* 数据库的连接配置类
*
* @author barry
*
*/
@Data
public class DataBaseProperties {
/**
* 数据库连接,如:jdbc:mysql://localhost:3306/test?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
*/
private String jdbcUrl;
/**
... |
sosan/NoahGameFrame | NFComm/NFKernelPlugin/NFCEventModule.h | <reponame>sosan/NoahGameFrame<filename>NFComm/NFKernelPlugin/NFCEventModule.h
// -------------------------------------------------------------------------
// @FileName : NFCEventModule.h
// @Author : LvSheng.Huang
// @Date : 2012-12-15
// @Module : NFCEven... |
acearchive/acearchive.lgbt | assets/js/replayweb-url.js | import normalizeCid from "./normalize-cid";
const forms = document.querySelectorAll(".replayweb-url-form form");
for (const form of forms) {
const cidInputGroup = form.querySelector(".cid-input");
const cidInputElement = cidInputGroup.querySelector("input");
const filenameInputGroup = form.querySelector(".file... |
plegner/quizmaster | app/shared/src/main/scala/hydro/common/ScalaUtils.scala | <gh_stars>10-100
package hydro.common
import scala.concurrent._
object ScalaUtils {
/** Returns the name of the object as defined by "object X {}" */
def objectName(obj: AnyRef): String = {
obj.getClass.getSimpleName.replace("$", "")
}
def callbackSettingFuturePair(): (() => Unit, Future[Unit]) = {
... |
ankurqss2009/AUSK_NEW | modules/user/server-scala/src/main/scala/services/MessageTemplateService.scala | <gh_stars>1000+
package services
import com.github.jurajburian.mailer.{Content, Message}
import javax.mail.internet.InternetAddress
import model.User
class MessageTemplateService {
def createConfirmRegistrationMessage(user: User, appName: String, fromEmail: String, followLink: String): Message =
Message(
... |
guidojw/amber-api | spec/requests/v1/users_controller/activate_account_spec.rb | <filename>spec/requests/v1/users_controller/activate_account_spec.rb
require 'rails_helper'
describe V1::UsersController do
describe 'POST /users/:id/activate_account', version: 1 do
let(:activation_token) { Faker::Crypto.sha256 }
let(:record) do
create(:user, login_enabled: true,
a... |
ggj2010/javabase | thread/src/main/java/concurrent/AtomicBooleanTest.java | <reponame>ggj2010/javabase
package concurrent;
import java.util.concurrent.atomic.AtomicBoolean;
/**
* @author:gaoguangjin
* @date:2018/9/3
*/
public class AtomicBooleanTest {
private static AtomicBoolean flag = new AtomicBoolean();
//只能保证 可见性与有序性 不能保证原子性
private static volatile boolean notSafeflag ;... |
296114187/AndroidFramework | core/src/main/java/com/voidid/core/enums/EDBType.java | package com.voidid.core.enums;
/**
* 数据库类型枚举
*/
public enum EDBType {
NONE,
SQLite,
SQLCipher
}
|
zermelo-software/zermelo-app | www/touch/examples/touchstyle/app/view/Categories.js | Ext.define('TouchStyle.view.Categories', {
extend: 'Ext.dataview.DataView',
xtype: 'categories',
config: {
baseCls: 'categories-list',
itemTpl: [
'<div class="image" style="background-image:url(http://resources.shopstyle.com/static/mobile/image2-iPad/{urlId}.png)"></div>',
... |
AsahiOS/gate | usr/src/uts/common/io/pm.c | <reponame>AsahiOS/gate<filename>usr/src/uts/common/io/pm.c
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the licens... |
MICommunity/PSI-JAMI | jami-enricher/src/test/java/psidev/psi/mi/jami/enricher/impl/BasicExperimentEnricherTest.java | package psidev.psi.mi.jami.enricher.impl;
import junit.framework.Assert;
import org.junit.Before;
import org.junit.Test;
import psidev.psi.mi.jami.bridges.fetcher.mock.MockCvTermFetcher;
import psidev.psi.mi.jami.bridges.fetcher.mock.MockPublicationFetcher;
import psidev.psi.mi.jami.enricher.exception.EnricherExceptio... |
searKing/sole | pkg/appinfo/version.go | // Copyright 2021 The searKing Author. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package appinfo
import "github.com/searKing/golang/go/version"
var (
// Version
// NOTE: The $Format strings are replaced during 'git archive' thanks t... |
IanClark-fullStack/Outright | client/src/components/JailStat.js | import { useState, useEffect } from 'react';
import search from '../utils/API';
export default function JailStat({ currLocation, queryString }) {
const findCountyData = async (url) => {
const [countyData, setCountyData] = useState({
loading: true,
flip_code: undefined,
... |
cuiwow/quantum | quantum/db/servicetype_db.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/l... |
hdost/opentelemetry-java | api/all/src/main/java/io/opentelemetry/api/metrics/ObservableLongMeasurement.java | /*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.api.metrics;
import io.opentelemetry.api.common.Attributes;
/** An interface for observing measurements with {@code long} values. */
public interface ObservableLongMeasurement extends ObservableMeasurement {... |
objectiser/overlord-commons | overlord-commons-gwt/src/main/java/org/overlord/commons/gwt/client/local/widgets/ParagraphLabel.java | <gh_stars>0
/*
* Copyright 2013 JBoss 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 law or... |
hardikpthv/lion | packages/select-rich/test/lion-select-rich-interaction.test.js | import { Required } from '@lion/form-core';
import { expect, html, triggerBlurFor, triggerFocusFor, fixture } from '@open-wc/testing';
import '@lion/core/src/differentKeyEventNamesShimIE.js';
import '@lion/listbox/lion-option.js';
import '@lion/listbox/lion-options.js';
import '../lion-select-rich.js';
describe('lion... |
SebastianBienert/ProjectsMap | Android/ProjectsMap/app/src/main/java/project/projectsmap/FetchDataMap.java | package project.projectsmap;
import android.content.Context;
import android.os.AsyncTask;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStrea... |
AsahiOS/gate | usr/src/uts/sun4v/sys/machthread.h | <filename>usr/src/uts/sun4v/sys/machthread.h
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of th... |
reubenjs/fat_free_crm | app/models/entities/contact.rb | <reponame>reubenjs/fat_free_crm
# Copyright (c) 2008-2013 <NAME> and contributors.
#
# Fat Free CRM is freely distributable under the terms of MIT license.
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
#------------------------------------------------------------------------------
# == Sc... |
Xiaoyunnn/tp | src/main/java/seedu/address/model/person/exceptions/ClashingLessonException.java | <filename>src/main/java/seedu/address/model/person/exceptions/ClashingLessonException.java<gh_stars>0
package seedu.address.model.person.exceptions;
/**
* Signals that the operation will result in clashing lessons (Lessons are considered clashing if they have overlapping
* time range).
*/
public class ClashingLesso... |
esnet/netshell | kernel/src/main/java/net/es/netshell/kernel/acl/UserAccess.java | <reponame>esnet/netshell<gh_stars>1-10
/*
* ESnet Network Operating System (ENOS) Copyright (c) 2015, The Regents
* of the University of California, through Lawrence Berkeley National
* Laboratory (subject to receipt of any required approvals from the
* U.S. Dept. of Energy). All rights reserved.
*
* If you have... |
kkrampa/commcare-hq | corehq/apps/reports/filters/controllers.py | <reponame>kkrampa/commcare-hq
from __future__ import absolute_import
from __future__ import unicode_literals
import json
from memoized import memoized
from corehq.apps.es import UserES, GroupES, groups
from corehq.apps.locations.models import SQLLocation
from corehq.apps.reports.const import DEFAULT_PAGE_LIMIT
from ... |
engelhamer/robot-runner | experiments/mini_mission/turtlebot_runner/__main__.py | <reponame>engelhamer/robot-runner<filename>experiments/mini_mission/turtlebot_runner/__main__.py
import rospy
import signal
import subprocess
from mission.mission import Mission
from common.ClientMetricsController import ClientMetricsController
rospy.init_node("turtlebot3_custom")
mission = Mission()
metrics = Clien... |
gipert/remage | include/RMGManagementDetectorConstruction.hh | <filename>include/RMGManagementDetectorConstruction.hh
#ifndef _RMG_MANAGEMENT_DETECTOR_CONSTRUCTION_HH_
#define _RMG_MANAGEMENT_DETECTOR_CONSTRUCTION_HH_
#include <map>
#include <memory>
#include <vector>
#include "globals.hh"
#include "G4VUserDetectorConstruction.hh"
#include "RMGMaterialTable.hh"
#include "RMGNav... |
1370156363/TTNews1 | TTNews/Classes/NewWenDaViewController.h | <filename>TTNews/Classes/NewWenDaViewController.h
//
// NewWenDaViewController.h
// TTNews
//
// Created by mac on 2017/10/21.
// Copyright © 2017年 瑞文戴尔. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NewWenDaViewController : UIViewController
@end
|
andrey19972004/algorithms_structures | yandex/yandex_algorithms/4/H.py | from collections import Counter
def modify_dict(symbols_dict, temp_dict, symbol, modifier):
ans = 0
if symbol not in temp_dict:
temp_dict[symbol] = 0
if symbol in symbols_dict and symbols_dict[symbol] == temp_dict[symbol]:
ans = -1
temp_dict[symbol] += modifier
if symbol in symbols... |
av1m/cars | features/steps/US_0012.py | # coding: utf-8
import logging
from behave import *
from foods.formula import Formula
from foods.kebab import Kebab, TruckKebab
logger = logging.getLogger(__name__)
use_step_matcher("parse")
@given("An order placed in a kebab truck")
def step_impl(context):
context.kebab_truck = TruckKebab(
formulas=[... |
RickWieman/adyen-java-api-library | src/main/java/com/adyen/model/posterminalmanagement/GetTerminalsUnderAccountRequest.java | <gh_stars>10-100
/*
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###... |
ytorzuk-altran/openvino | src/core/tests/type_prop/result.cpp | <filename>src/core/tests/type_prop/result.cpp<gh_stars>1-10
// Copyright (C) 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "gtest/gtest.h"
#include "ngraph/ngraph.hpp"
#include "ngraph/opsets/opset1.hpp"
#include "util/type_prop.hpp"
using namespace std;
using namespace ngraph;
TEST(type_... |
manibhushan05/transiq | web/transiq/fileupload/views.py | # encoding: utf-8
from datetime import datetime, timedelta
from django.contrib.auth.models import User
from django.db.models import Q
from django.http import UnreadablePostError
from django.http.response import HttpResponseRedirect
from django.shortcuts import render
from django.utils.text import slugify
from django.vi... |
shiver-me-timbers/smt-cloudformation-parent | smt-cloudformation-generation/src/main/java/shiver/me/timbers/cloudformation/types/JavaTypes.java | package shiver.me.timbers.cloudformation.types;
import java.util.stream.IntStream;
import static java.util.stream.Collectors.joining;
public class JavaTypes {
private final String basePackage;
private final String defaultPackageName;
public JavaTypes(String basePackage, String defaultPackageName) {
... |
doodzik/google-cloud-ruby | google-cloud-bigquery/test/google/cloud/bigquery/service_test.rb | <reponame>doodzik/google-cloud-ruby
# Copyright 2018 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... |
sillsdev/crosswalk | sysapps/device_capabilities/device_capabilities_extension.cc | <reponame>sillsdev/crosswalk<gh_stars>1-10
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "xwalk/sysapps/device_capabilities/device_capabilities_extension.h"
#include "grit/xwalk_sysapps_res... |
kuangdai/AxiSEM3D | SOLVER/src/core/element/grad/Gradient.cpp | // Gradient.cpp
// created by Kuangdai on 19-May-2017
// elemental gradient
#include "Gradient.h"
#include "FluidElement.h"
#include "SolidElement.h"
Gradient::Gradient(const RDMatPP &dsdxii, const RDMatPP &dsdeta,
const RDMatPP &dzdxii, const RDMatPP &dzdeta,
const RDMatPP &i... |
steve-ord/askapsoft | Code/Base/accessors/current/dataaccess/TableDataIterator.h | /// @file
///
/// @brief Implementation of IDataIterator in the table-based case
/// @details
/// TableConstDataIterator: Allow read-only iteration across preselected data. Each
/// iteration step is represented by the IConstDataAccessor interface.
/// TableDataIterator extends the interface further to read-write oper... |
zkw012300/EnjoyMusic | app/src/main/java/com/zspirytus/enjoymusic/utils/StatusBarUtil.java | <filename>app/src/main/java/com/zspirytus/enjoymusic/utils/StatusBarUtil.java
package com.zspirytus.enjoymusic.utils;
import android.content.Context;
import java.lang.reflect.Method;
public class StatusBarUtil {
private StatusBarUtil() {
throw new AssertionError();
}
public static void collapse... |
fernandoj92/ltm-learning | src/main/java/research/ferjorosa/examples/learning/BridgedIslands/AsiaDataset.java | package research.ferjorosa.examples.learning.BridgedIslands;
import eu.amidst.core.datastream.Attribute;
import eu.amidst.core.datastream.DataInstance;
import eu.amidst.core.datastream.DataOnMemory;
import eu.amidst.core.datastream.DataStream;
import eu.amidst.core.io.DataStreamLoader;
import eu.amidst.core.learning.p... |
sergenyalcin/typewriter | pkg/cmd/builtin.go | <reponame>sergenyalcin/typewriter
// Copyright 2021 <NAME>
//
// 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 a... |
ShyamNandanKumar/coding-ninja2 | 25_number_theory_3/4_nth_fibonacci.cpp | <reponame>ShyamNandanKumar/coding-ninja2
/*
eg f(8)=21 => in O(log(n))
*/
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
#define mod 1000000007
void multiply(ll A[2][2],ll M[2][2]){
// find all 4 values and put back in an A
ll first=A[0][0]*M[0][0]+A[0][1]*M[1][0];
ll second=A... |
iscai-msft/azure-sdk-for-python | sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... |
mrtanweijie/Park | src/storage/models/News.js | import mongoose from 'mongoose'
const Schema = mongoose.Schema
const NewsSchema = new Schema(
{
title: { type: 'String', required: true },
url: { type: 'String', required: true },
summary: String,
recommend: { type: Boolean, default: false },
source: { type: Number, required: true, default: 0 },
... |
code-en-design/econobis | client-app/src/actions/document/DocumentFiltersActions.js | export const setFilterDocumentNumber = number => ({
type: 'SET_FILTER_DOCUMENT_NUMBER',
number,
});
export const setFilterDocumentDate = date => ({
type: 'SET_FILTER_DOCUMENT_DATE',
date,
});
export const setFilterDocumentFilename = filename => ({
type: 'SET_FILTER_DOCUMENT_FILENAME',
filename... |
S10MC2015/cms-django | src/cms/forms/offer_templates/offer_template_form.py | from django import forms
from ...models import OfferTemplate
from ...utils.slug_utils import generate_unique_slug
class OfferTemplateForm(forms.ModelForm):
"""
Form for creating and modifying offer template objects
"""
class Meta:
model = OfferTemplate
fields = ["name", "slug", "thum... |
Meira-JH/futureEats | futureEats/src/reducers/orders.js | const initialState = {
orders: [],
ordersHistory: [],
activeOrder: [],
};
const orders = (state = initialState, action) => {
switch (action.type) {
case "SET_ORDER": {
return { ...state, orders: [...state.orders, action.payload.orders] };
}
case "SET_ACTIVE_ORDER": {
return { ...state, ... |
Shaptic/py-stellar-base | tests/operation/test_create_claimable_balance.py | from decimal import Decimal
import pytest
from stellar_sdk import Claimant, ClaimPredicate, CreateClaimableBalance, Operation
from stellar_sdk.xdr.claim_predicate import ClaimPredicate as XdrClaimPredicate
from . import *
class TestCreateClaimableBalance:
@pytest.mark.parametrize(
"amount, source, xdr"... |
Chaffelson/cloudbreak | core/src/main/java/com/sequenceiq/cloudbreak/controller/PlatformParameterV1Controller.java | <reponame>Chaffelson/cloudbreak<filename>core/src/main/java/com/sequenceiq/cloudbreak/controller/PlatformParameterV1Controller.java
package com.sequenceiq.cloudbreak.controller;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import javax.inject.Inject;
import ... |
Semantria/sem5.java | src/main/java/com/lexalytics/semantria/client/dto/DocumentResult.java | <reponame>Semantria/sem5.java<filename>src/main/java/com/lexalytics/semantria/client/dto/DocumentResult.java<gh_stars>0
package com.lexalytics.semantria.client.dto;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTyp... |
khamutov/intellij-scala | scala/compiler-jps/src/org/jetbrains/jps/incremental/scala/sbtzinc/ModulesFedToZincStore.scala | <reponame>khamutov/intellij-scala
package org.jetbrains.jps.incremental.scala.sbtzinc
import java.util
import com.intellij.openapi.util.Key
import org.jetbrains.jps.ModuleChunk
import org.jetbrains.jps.incremental.CompileContext
import org.jetbrains.jps.incremental.scala.SourceDependenciesProviderService
import org.j... |
YGLLL/FunLive | app/src/main/java/com/github/yglll/funlive/view/widget/FunLiveWidget.java | <reponame>YGLLL/FunLive<gh_stars>10-100
package com.github.yglll.funlive.view.widget;
import android.app.PendingIntent;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.content.Intent;
import android.widget.RemoteViews;
import com.gi... |
neinteractiveliterature/intercode | app/policies/queries/query_manager.rb | # frozen_string_literal: true
class Queries::QueryManager
def self.query_methods
instance_methods(false)
end
attr_reader :user
def initialize(user:)
@user = user
end
end
|
WJ44/ElementalChemistry | src/main/java/com/wj44/echem/item/ItemElementContainer.java | package com.wj44.echem.item;
import com.wj44.echem.creativetab.ModCreativeTabs;
import com.wj44.echem.init.ModItems;
import com.wj44.echem.reference.Names;
import com.wj44.echem.reference.Textures;
import com.wj44.elementscore.api.Element;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.c... |
Jakubeeee/iotaccess | core/src/main/java/com/jakubeeee/iotaccess/core/misc/SortedProperties.java | package com.jakubeeee.iotaccess.core.misc;
import java.util.*;
import static java.util.Collections.enumeration;
import static java.util.Collections.unmodifiableSet;
import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toCollection;
public final class SortedProperties extends Proper... |
FanOfSilence/A-Stream-of-Torrents | astreamoftorrents/src/test/java/TestMagnet.java | import magnet.Magnet;
import org.junit.Before;
import org.junit.Test;
import java.net.URI;
/**
* Created by Jesper on 2017-06-03.
*/
public class TestMagnet {
private Magnet magnet;
@Before
public void setUp() {
URI uri = URI.create(MockMagnetString.magnetString);
String testString = ur... |
Rarestq/galaxy | galaxy-web/src/main/java/com/wuxiu/galaxy/web/biz/vo/ChargeCalculateRuleVO.java | <filename>galaxy-web/src/main/java/com/wuxiu/galaxy/web/biz/vo/ChargeCalculateRuleVO.java<gh_stars>1-10
package com.wuxiu.galaxy.web.biz.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 计费规则展示对象
*
* @author: wuxiu
*... |
Yelp/mycroft | mycroft/mycroft/logic/cluster_actions.py | # -*- coding: utf-8 -*-
"""
**logic.cluster_actions**
=========================
A collection of functions to handle actions relating to clusters
in the mycroft service. The C part of MVC for mycroft/clusters
"""
import simplejson
import re
from sherlock.common.redshift_psql import DEFAULT_NAMESPACE
MAX_CLUSTER_NAM... |
tglatt/emjpm | packages/knex/migrations/20190816180823_view_department_availability.js | <filename>packages/knex/migrations/20190816180823_view_department_availability.js
exports.up = async function(knex) {
return knex.raw(`
CREATE VIEW view_department_availability AS
SELECT department_id, sum(mesures_awaiting) mesures_awaiting, sum(mesures_in_progress) mesures_in_progress, sum(mesures_max) mesures_max
... |
nattyco/fermatold | CBP/library/api/fermat-cbp-api/src/main/java/com/bitdubai/fermat_cbp_api/layer/sub_app_module/crypto_broker_identity/interfaces/CryptoBrokerIdentityModuleManager.java | package com.bitdubai.fermat_cbp_api.layer.sub_app_module.crypto_broker_identity.interfaces;
import com.bitdubai.fermat_api.layer.modules.ModuleManager;
import com.bitdubai.fermat_cbp_api.layer.sub_app_module.crypto_broker_identity.exceptions.CantGetCryptoBrokerListException;
import com.bitdubai.fermat_cbp_api.layer.s... |
GitHub-LiuMing/E-Shop | src/main/java/com/liuming/eshop/controller/itemController/ItemController.java | <reponame>GitHub-LiuMing/E-Shop<filename>src/main/java/com/liuming/eshop/controller/itemController/ItemController.java
package com.liuming.eshop.controller.itemController;
import com.liuming.eshop.entity.itemEntity.Item;
import com.liuming.eshop.service.itemService.ItemService;
import com.liuming.eshop.utils.DataResul... |
CDK-Vonkil/libwebsockets | include/libwebsockets/lws-async-dns.h | /*
* libwebsockets - small server side websockets and web server implementation
*
* Copyright (C) 2010 - 2019 <NAME> <<EMAIL>>
*
* 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... |
YKato521/ironpython-stubs | release/stubs.min/System/Windows/Forms/__init___parts/WebBrowserDocumentCompletedEventArgs.py | <filename>release/stubs.min/System/Windows/Forms/__init___parts/WebBrowserDocumentCompletedEventArgs.py
class WebBrowserDocumentCompletedEventArgs(EventArgs):
"""
Provides data for the System.Windows.Forms.WebBrowser.DocumentCompleted event.
WebBrowserDocumentCompletedEventArgs(url: Uri)
"""
@s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.