repo_name
stringlengths
6
101
path
stringlengths
4
300
text
stringlengths
7
1.31M
Pittor052/SoftUni-Studies
FirstStepsInPython/Fundamentals/Lab/Lists Basics/04. Search.py
<filename>FirstStepsInPython/Fundamentals/Lab/Lists Basics/04. Search.py # # 01 solution using 2 lists and 1 for loop # lines = int(input()) # key = input() # word_list = [] # found_match = [] # for _ in range(lines): # words = input() # word_list.append(words) # if key in words: # found_match.appen...
toomuchsalt/ONE-1
runtime/onert/core/include/ir/OperandIndexSequence.h
<filename>runtime/onert/core/include/ir/OperandIndexSequence.h /* * Copyright (c) 2018 Samsung Electronics Co., Ltd. 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 ...
shulthz/gwallet
plugins/blinded/receiveblindtransfer.cpp
#include "include/receiveblindtransfer.hpp" #include "../include/panels/cli.hpp" #include <panels/commands.hpp> ReceiveBlindTransfer::ReceiveBlindTransfer(GWallet* gwallet) { p_GWallet = gwallet; InitWidgetsFromXRC((wxWindow *)p_GWallet); SetScrollRate(1,1); Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKE...
wilfredwilly/springboot-learn-by-example
chapter-03/conditional/src/test/java/com/sivalabs/demo/ConditionalTest.java
/** * */ package com.sivalabs.demo; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; import java.util.List; /** * @autho...
bravedragon623/react-frontend-ico-dashboard
src/redux/modules/auth/signIn.js
import { from } from 'seamless-immutable'; import { createReducer, createSubmitAction, createAction } from '../../../utils/actions'; export const INIT_SIGN_IN = 'auth/signIn/INIT_SIGN_IN'; export const VERIFY_SIGN_IN = 'auth/signIn/VERIFY_SIGN_IN'; export const CHANGE_STEP = 'auth/signIn/CHANGE_STEP'; export const RES...
dog-days/webpack-launcher
packages/webpack-launcher/bin/webpack-launcher-serve-build.js
#!/usr/bin/env node 'use strict'; require('../scripts/serveBuild.js');
marcinseweryn/Health-Center
HealthCenter/src/main/java/com/github/marcinseweryn/controllers/HomeController.java
package com.github.marcinseweryn.controllers; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.Errors; import org.springframework.web.bind.annotati...
propainter/cdap
cdap-app-fabric/src/test/java/io/cdap/cdap/internal/app/runtime/monitor/proxy/ServiceSocksProxyTest.java
/* * Copyright © 2019 <NAME>, 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 agreed to i...
dearbornlavern/zos
pkg/stubs/version_monitor_stub.go
package stubs import ( "context" semver "github.com/blang/semver" zbus "github.com/threefoldtech/zbus" ) type VersionMonitorStub struct { client zbus.Client module string object zbus.ObjectID } func NewVersionMonitorStub(client zbus.Client) *VersionMonitorStub { return &VersionMonitorStub{ client: client, ...
pdeljanov/Ayane
include/Ayane/SampleFormats.h
<reponame>pdeljanov/Ayane<filename>include/Ayane/SampleFormats.h /* * * Copyright (c) 2013 <NAME>. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. * */ #ifndef AYANE_SAMPLEFORMATS_H_ #define AYANE_SAMPLEFORMATS_H_ #include "Ayane/Attribu...
ranwise/djangochannel
backend/api/v2/courses/serializers.py
from rest_framework import serializers from backend.courses.models import Course, Category class ListCategoryCourseSerializer(serializers.ModelSerializer): """Сериализация списка категорий курсов""" class Meta: model = Category fields = ("id", "title", "slug") class ListCourseSerializer(se...
yanaspaula/rdf4j
core/spin/src/main/java/org/eclipse/rdf4j/spin/function/spif/Cast.java
/******************************************************************************* * Copyright (c) 2015 Eclipse RDF4J contributors, Aduna, and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Distribution License v1.0 * which accompanies th...
Morpheus-compiler/polycube
src/services/pcn-katran/src/MaglevBase.cpp
/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even th...
ilaotan/sumk
src/main/java/org/yx/db/sql/DBSettings.java
<reponame>ilaotan/sumk<gh_stars>0 /** * Copyright (C) 2016 - 2030 youtongluan. * * 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 ...
olgadanylova/ios-SDK
SDK/watchos/backendless/include/ReferenceCache.h
// // ReferenceCache.h // backendlessAPI /* * ********************************************************************************************************************* * * BACKENDLESS.COM CONFIDENTIAL * * **************************************************************************************************************...
FedericoCampanozzi/HotLineCesena2
app/src/main/java/hotlinecesena/model/inventory/Inventory.java
package hotlinecesena.model.inventory; import java.util.Optional; import hotlinecesena.model.entities.actors.Actor; import hotlinecesena.model.entities.items.Item; import hotlinecesena.model.entities.items.Weapon; /** * * Models an inventory for {@link Actor}s which may contain weapons and items. * */ public int...
TamaraAbells/okuna-api
openbook_auth/migrations/0028_user_uuid.py
# Generated by Django 2.2b1 on 2019-03-11 16:51 from django.db import migrations, models import uuid def create_uuid(apps, schema_editor): User = apps.get_model('openbook_auth', 'User') for user in User.objects.all(): user.uuid = uuid.uuid4() user.save() class Migration(migrations.Migration...
jpan127/RJD-MP3
SJone/firmware/mp3/L5_Application/drivers/uart.hpp
<gh_stars>0 #pragma once #include "FreeRTOS.h" #include "LPC17xx.h" #include "semphr.h" #include "singleton_template.hpp" #define DEFAULT_BAUDRATE (9600) // Interrupt Enable Bits #define IER_RBR_BIT (1 << 0) // RBR interrupt enable #define IER_THRE_BIT (1 << 1) // THRE interrupt enable #define IER_RX_LSR_...
WortNils/similarityComparator
sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/ontop/JDBCDatabaseGenerator.scala
<filename>sansa-query/sansa-query-spark/src/main/scala/net/sansa_stack/query/spark/ontop/JDBCDatabaseGenerator.scala package net.sansa_stack.query.spark.ontop import java.sql.{Connection, SQLException} import net.sansa_stack.rdf.common.partition.core.{RdfPartitionStateDefault, RdfPartitioner} import net.sansa_stack.r...
apache/uima-ruta
ruta-maven-plugin/src/it/multimodule/main/src/test/java/org/apache/uima/ruta/maven/OneEngineTest.java
/* * 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")...
DFE-Digital/get-help-with-tech
spec/controllers/support/schools/headteacher_controller_spec.rb
require 'rails_helper' RSpec.describe Support::Schools::HeadteacherController, type: :controller do let(:non_support_third_line_user) { create(:user, is_support: true, role: 'no') } let(:support_third_line_user) { create(:support_user, :third_line) } let!(:school) { create(:school) } describe '#edit' do c...
maltewirz/code-challenges
src/code-challenges/codewars/5KYU/sumPairs/test_sum_pairs.py
from sum_pairs import sum_pairs import unittest class Test(unittest.TestCase): def test_1(self): result = sum_pairs([4, 3, 2, 3, 4], 6) self.assertEqual(result, [4, 2]) def test_2(self): result = sum_pairs([10, 5, 2, 3, 7, 5], 10) self.assertEqual(result, [3, 7]) if __name__...
Teagum/chainsaddiction
src/chainsaddiction/utils/tests/runtest.c
<gh_stars>0 #include "unittest.h" #include "test-utils.h" int main (void) { SETUP; RUN_TEST (test__local_decoding); RUN_TEST (test__global_decoding); EVALUATE; }
your-code-is-my-property/celloverflow
src/firebase/helpers/questionHelper.js
<gh_stars>1-10 import { firestore, timestamp } from '../firebase'; export const saveQuestionToFirestore = (questionData) => { return new Promise((resolve, reject) => { const questionRef = firestore.collection('questions'); questionRef.add({ ...questionData, votes: 0, voters: {}, createdAt: timestamp.now() })...
Zix13/capital-components
src/fss-icons/forum_128.js
<reponame>Zix13/capital-components "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _extends() { _ex...
kyupid/oopinspring
workspace_springjava/paradise/src/main/java/com/heaven/mvc/board/controller/BoardController.java
package com.heaven.mvc.board.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotat...
softicar/platform
platform-common/src/main/java/com/softicar/platform/common/io/reader/IManagedReader.java
<gh_stars>1-10 package com.softicar.platform.common.io.reader; import com.softicar.platform.common.io.writer.ManagedWriter; import java.io.Closeable; import java.io.Reader; import java.util.Collection; /** * An {@link IManagedReader} is similar to a {@link Reader} but does not * implement {@link Closeable} or {@lin...
RippeR37/GLUL
src/GLUL/GUI/Events/TextInput.cpp
#include <GLUL/GUI/Events/TextInput.h> namespace GLUL { namespace GUI { namespace Event { TextInput::TextInput(const std::string& text) : text(text) { } } } }
dnadeau4/HELICS-src
src/helics/core/ipc/IpcBlockingPriorityQueueImpl.cpp
<reponame>dnadeau4/HELICS-src /* Copyright © 2017-2018, Battelle Memorial Institute; Lawrence Livermore National Security, LLC; Alliance for Sustainable Energy, LLC All rights reserved. See LICENSE file and DISCLAIMER for more details. */ #pragma once #include "IpcBlockingPriorityQueueImpl.hpp" #include <algorithm> #i...
Hower91/Apache-C-Standard-Library-4.2.x
include/loc/_messages.h
<filename>include/loc/_messages.h /*************************************************************************** * * _messages.h - definition of the std::messages class templates * * This is an internal header file used to implement the C++ Standard * Library. It should never be #included directly by a program. * ...
ZibraMax/FEM
FEM/Elements/Element.py
<reponame>ZibraMax/FEM<gh_stars>1-10 """Element class """ import numpy as np from typing import Tuple, Callable class Element(): """Generates a generic element. Args: coords (np.ndarray): Vertical coordinates matrix _coords (np.ndarray): Vertical coordinates matrix for graphical interfaces ...
valdisxp1/scapegoat
src/test/scala/com/sksamuel/scapegoat/inspections/collections/ReverseTakeReverseTest.scala
package com.sksamuel.scapegoat.inspections.collections import com.sksamuel.scapegoat.InspectionTest class ReverseTakeReverseTest extends InspectionTest { override val inspections = Seq(new ReverseTakeReverse) "ReverseTakeReverse" - { "should report warning" in { val code = """class Test { ...
gmzorz/MiniRT
sources/buffer/write_color_at.c
/* ************************************************************************** */ /* */ /* :::::::: */ /* write_color_at.c :+: :+: ...
sulmanweb/social-api
spec/graphql/mutations/users/follow_user_spec.rb
require 'rails_helper' module Mutations module Users RSpec.describe FollowUser, type: :request do describe '.resolve' do it 'current user will follow the given user' do user1 = FactoryBot.create(:user) user2 = FactoryBot.create(:user) session = FactoryBot.create(:sessi...
archaim/ember-flexberry
tests/unit/utils/run-after-test.js
<filename>tests/unit/utils/run-after-test.js import Ember from 'ember'; import { module, test } from 'qunit'; import runAfter from 'ember-flexberry/utils/run-after'; module('Unit | Utility | run-after'); test('possible condition', function(assert) { const done = assert.async(); let counter = 0; const conditio...
zakkudo/translation-static-analyzer
__mocks__/filesystem.js
<filename>__mocks__/filesystem.js<gh_stars>0 const AboutPage = ` export default class AboutPage extends Component { static get title() { return __('About'); } static get template() { return <div>{{__('Search')}} Welcome to the about page!</div>'; } }; `.trim(); const EmptyPage = `...
eflows4hpc/compss
compss/runtime/resources/commons/src/main/java/es/bsc/compss/types/resources/MasterResourceImpl.java
<filename>compss/runtime/resources/commons/src/main/java/es/bsc/compss/types/resources/MasterResourceImpl.java /* * Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licens...
ffpy/SqlPal
sqlpal/src/org/sqlpal/crud/SaveHandler.java
package org.sqlpal.crud; import org.sqlpal.common.ModelField; import org.sqlpal.crud.factory.SqlFactory; import org.sqlpal.manager.FactoryManager; import org.sqlpal.manager.ModelManager; import org.sqlpal.util.EmptyUtils; import org.sqlpal.util.StatementUtils; import com.sun.istack.internal.NotNull; import java.lang....
jmrico01/WurstScript
de.peeeq.wurstscript/src/main/java/de/peeeq/wurstio/jassinterpreter/providers/RegionProvider.java
package de.peeeq.wurstio.jassinterpreter.providers; import de.peeeq.wurstio.jassinterpreter.mocks.RegionMock; import de.peeeq.wurstscript.intermediatelang.IlConstHandle; import de.peeeq.wurstscript.intermediatelang.interpreter.AbstractInterpreter; public class RegionProvider extends Provider { public RegionProv...
RuntimeConverter/RuntimeConverterLaravelJava
laravel-converted/src/main/java/com/project/convertedCode/globalNamespace/namespaces/Faker/namespaces/Guesser/classes/Name.java
<reponame>RuntimeConverter/RuntimeConverterLaravelJava<filename>laravel-converted/src/main/java/com/project/convertedCode/globalNamespace/namespaces/Faker/namespaces/Guesser/classes/Name.java package com.project.convertedCode.globalNamespace.namespaces.Faker.namespaces.Guesser.classes; import com.runtimeconverter.runt...
bjerkio/go-tripletex
client/account/account_client.go
// Code generated by go-swagger; DO NOT EDIT. package account // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "fmt" "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) // New creates a new account API clie...
KingCosmic/BardsBalladMobile
src/modals/SideInfo/ChangeClass.js
<reponame>KingCosmic/BardsBalladMobile<gh_stars>0 import React, { Component } from 'react'; import styled from 'styled-components'; import T from '../../components/Text'; const BackDrop = styled.div` position: absolute; top: 0; left: 0; bottom: 0; right: 0; background-color: rgba(0, 0, 0, .6); display:...
rokath/trice
internal/emitter/remoteDisplay_test.go
// Copyright 2020 Thomas.Hoehenleitner [at] seerose.net // Use of this source code is governed by a license that can be found in the LICENSE file. // whitebox test for package emitter. package emitter import ( "fmt" "io/ioutil" "math/rand" "runtime" "strings" "testing" "time" ) func TestDummy(t *testing.T) { ...
GotanDev/msgraph-sdk-java
src/main/java/com/microsoft/graph/requests/OnenoteEntityHierarchyModelRequest.java
// Template Source: BaseEntityRequest.java.tt // ------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. // ------------------------------------...
shawnmullaney/forge
tests/terrain.py
# Copyright (C) 2013-2018 Internet Systems Consortium. # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET ...
searKing/golib
os_/file.go
<reponame>searKing/golib<filename>os_/file.go package os_ import ( "os" "path/filepath" ) func GetAbsBinDir() (dir string, err error) { return filepath.Abs(filepath.Dir(os.Args[0])) } func PathExists(path string) (bool, error) { _, err := os.Stat(path) if err == nil { return true, nil } if os.IsNotExist(err...
FliesenUI/FliesenUI-samples
HelloWorldAutoTest/JavaProject/gen_src/generated/fliesenui/core/FLUIApplication.java
<reponame>FliesenUI/FliesenUI-samples<filename>HelloWorldAutoTest/JavaProject/gen_src/generated/fliesenui/core/FLUIApplication.java package generated.fliesenui.core; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.scene.paint.Color; import javafx.stage.S...
549654033/RDHelp
src/src/Share/ShareLib/LinuxPublic/ACE_wrappers/ace/Proactor_Impl.cpp
// Proactor_Impl.cpp #include "ace/Proactor_Impl.h" #if ((defined (ACE_WIN32) && !defined (ACE_HAS_WINCE)) || (defined (ACE_HAS_AIO_CALLS) || defined(ACE_HAS_AIO_EMULATION))) // This only works on Win32 platforms and on Unix platforms supporting // aio calls. ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_Proactor_Impl::~A...
openml/openml.org
server/src/client/app/src/pages/search/MetaItems.js
import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Avatar, Tooltip, Chip } from "@material-ui/core"; export class MetaTag extends React.Component { render() { let icon; let prefix = ""; let suffix = ""; switch (this.props.type) { case "fo...
cl0udz/Lynx
node_modules/browser-pack-flat/test/simplify/asi.js
// If the `test` import is removed naively, the result will be alert(test), which is incorrect. alert var test = require('./hello'); (test)
LaudateCorpus1/devhub
src/components/Meta.js
import React from 'react'; import PropTypes from 'prop-types'; import { Helmet } from 'react-helmet'; const Meta = ({ nodeData: { options } }) => ( <Helmet> {Object.entries(options).map(([key, value]) => ( <meta key={key} name={key} content={value} /> ))} </Helmet> ); Meta.propType...
luhongbin/bidding
litemall-db/src/main/java/org/linlinjava/litemall/db/domain/LitemallPacking.java
package org.linlinjava.litemall.db.domain; import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Arrays; public class LitemallPacking { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table litemall_packing...
KiritoCyanPine/ipfs-gomobile-shipyard-modified
vendor/github.com/ipfs/go-unixfsnode/utils/utils.go
package utils import dagpb "github.com/ipld/go-codec-dagpb" // Lookup finds a name key in a list of dag pb links func Lookup(links dagpb.PBLinks, key string) dagpb.Link { li := links.Iterator() for !li.Done() { _, next := li.Next() name := "" if next.FieldName().Exists() { name = next.FieldName().Must().St...
MasterLogick/osu-laser-cpp
osu/desktop/logic/db/OsuDatabase.h
// // Created by Masterlogick on 2/13/20. // #ifndef OSU_LASER_C_OSUDATABASE_H #define OSU_LASER_C_OSUDATABASE_H #include <cstdint> #include <string> #include "Database.h" namespace osu { class OsuDatabase : Database { typedef std::pair<int, double> IDPair; struct TimingPoint { double...
frederickpek/tp
src/main/java/seedu/track2gather/model/person/attributes/NextOfKinName.java
package seedu.track2gather.model.person.attributes; import java.util.Optional; public class NextOfKinName extends Attribute<Optional<Name>> { /** * Constructs an {@code Attribute}. * * @param value A valid attribute value. */ public NextOfKinName(Optional<Name> value) { super(valu...
exebixel/oneparams
oneparams/one.py
<reponame>exebixel/oneparams #!/usr/bin/python import click import sys import pandas as pd from oneparams.reset import pw_reset from oneparams.api.login import login from oneparams.excel.card import cards from oneparams.excel.colaborador import colaborador from oneparams.excel.comissao import Comissao from oneparams....
YuriyLisovskiy/xalwart.base
src/unicode/_def_.h
<filename>src/unicode/_def_.h<gh_stars>0 /** * unicode/_def_.h * * Copyright (c) 2021 <NAME> * * Definitions of 'unicode' module. */ #pragma once // C++ libraries. #include <vector> #include "../_def_.h" // xw::unicode #define __UNICODE_BEGIN__ __MAIN_NAMESPACE_BEGIN__ namespace unicode { #define __UNICODE_EN...
tonioshikanlu/tubman-hack
sources/e/a/a/a/y0/j/y/h.java
<reponame>tonioshikanlu/tubman-hack package e.a.a.a.y0.j.y; import e.a.a.a.y0.l.i; import e.a.a.a.y0.l.m; import e.x.c.k; public final class h extends a { /* renamed from: b reason: collision with root package name */ public final i<i> f9456b; public static final class a extends k implements e.x.b.a<i>...
starlingx-staging/stx-ha
service-mgmt/sm-1.0.0/src/sm_service_group_go_standby.c
<reponame>starlingx-staging/stx-ha<filename>service-mgmt/sm-1.0.0/src/sm_service_group_go_standby.c // // Copyright (c) 2014 Wind River Systems, Inc. // // SPDX-License-Identifier: Apache-2.0 // #include "sm_service_group_go_standby.h" #include <stdio.h> #include "sm_types.h" #include "sm_debug.h" #include "sm_servic...
bumbeishvili/teamapps
teamapps-ui-dsl/src/main/java/org/teamapps/dto/generate/TeamAppsDtoModelValidator.java
/*- * ========================LICENSE_START================================= * TeamApps * --- * Copyright (C) 2014 - 2019 TeamApps.org * --- * 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...
two-code/grpc-go-clay
server/opts.go
package server import ( "net/http" "time" "github.com/utrack/clay/v3/server/middlewares/mwhttp" "github.com/utrack/clay/v3/transport" "github.com/go-chi/chi" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" "google.golang.org/grpc" ) // Option is an optional setting applied to the Server. type ...
jelic98/instafram
src/org/ljelic/instafram/view/adapter/tab/TabItem.java
package org.ljelic.instafram.view.adapter.tab; import org.ljelic.instafram.model.AbstractModel; import org.ljelic.instafram.view.adapter.action.BarItem; import org.ljelic.instafram.view.component.ScrollPanel; public class TabItem extends BarItem implements Comparable { private final AbstractModel model; priv...
genisysram/libyami
vaapi/vaapisurfaceallocator.cpp
<filename>vaapi/vaapisurfaceallocator.cpp<gh_stars>10-100 /* * Copyright (C) 2015 Intel Corporation. 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:/...
ibiscum/Crafting-Test-Driven-Software-with-Python
Chapter05/test_randomness.py
<filename>Chapter05/test_randomness.py import pytest def test_something(random_number_generator): a = random_number_generator() b = 10 assert a + b >= 10
RideGreg/LeetCode
Python/element-appearing-more-than-25-in-sorted-array.py
<reponame>RideGreg/LeetCode # Time: O(logn) # Space: O(1) # 1287 biweekly contest 15 12/14/2019 # # Given an integer array SORTED in non-decreasing order, there is exactly one integer in the array # that occurs more than 25% of the time. # # Return that integer. import bisect import collections class Solution(objec...
ScalablyTyped/SlinkyTyped
w/winrt-uwp/src/main/scala/typingsSlinky/winrtUwp/Windows/Management/Deployment/Preview.scala
<gh_stars>10-100 package typingsSlinky.winrtUwp.Windows.Management.Deployment import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} object Preview { @js.native trait ClassicAp...
deszhouandong/shop1
src/src/router/modules/search.js
export default [ { path: '/search', name: 'search', meta: { index: 17 }, component: () => import('@/views/search/index.vue') } ]
SpontaneousCMS/simultaneous
lib/simultaneous/task.rb
module Simultaneous module Task def self.task_name ENV[Simultaneous::ENV_TASK_NAME] end def self.pid $$ end def self.included(klass) Simultaneous.client = Simultaneous::SyncClient.new Simultaneous.set_pid(self.task_name, pid) if task_name at_exit { begin ...
Geomatys/constellation
modules/cstl-admin/grunt/src/js/admin/admin-processing.js
<gh_stars>10-100 /* * Constellation - An open source and standard compliant SDI * * http://www.constellation-sdi.org * * Copyright 2014 Geomatys * * 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...
georgejkaye/ballin-game
src/networking/ClientInformation.java
<gh_stars>0 package networking; import java.util.UUID; /** * This contains all the information about a particular client. * @author aaquibnaved * */ public class ClientInformation { private String id; private String name; private String sessionId; private boolean ready; private resources.Character.Class ch...
Joanguitar/docker-nextepc
virtual-UE-eNB/srsLTE-5d82f19988bc148d7f4cec7a0f29184375a64b40/lib/src/radio/radio_multi.cc
#include "srslte/radio/radio_multi.h" namespace srslte { bool radio_multi::init_multi(uint32_t nof_rx_antennas, char* args, char* devname) { if (srslte_rf_open_devname(&rf_device, devname, args, nof_rx_antennas)) { fprintf(stderr, "Error opening RF device\n"); return false; } tx_adv_negative = false...
Seviran/Advanced-Webdev
Section 23/College 262/script.js
<reponame>Seviran/Advanced-Webdev var minYear = d3.min(birthData, function(d) { return d.year; }); var maxYear = d3.max(birthData, function(d) { return d.year; }); var width = 600; var height = 600; var barPadding = 10; var numBars = 12; var barWidth = width / numBars - barPadding; var maxBirths = d3.max(birthData, f...
easyopsapis/easyops-api-python
database_delivery_sdk/api/dbtask/liquibase_task_callback_pb2.py
<reponame>easyopsapis/easyops-api-python # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: liquibase_task_callback.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.pro...
wreulicke/findbugs-slf4j
bug-pattern/src/main/java/jp/skypencil/findbugs/slf4j/CodepointIterator.java
<reponame>wreulicke/findbugs-slf4j package jp.skypencil.findbugs.slf4j; import java.util.Iterator; final class CodepointIterator implements Iterator<Integer> { private CharSequence sequence; private int index; CodepointIterator(CharSequence sequence) { this.sequence = sequence; } @Override public bo...
WrBug/GravityBox
app/src/main/java/com/wrbug/gravitybox/nougat/quicksettings/QsDetailAdapterProxy.java
<filename>app/src/main/java/com/wrbug/gravitybox/nougat/quicksettings/QsDetailAdapterProxy.java /* * Copyright (C) 2016 <NAME> for GravityBox Project (C3C076@xda) * 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...
wxf163/bareos
src/filed/authenticate.c
<reponame>wxf163/bareos /* BAREOS® - Backup Archiving REcovery Open Sourced Copyright (C) 2000-2010 Free Software Foundation Europe e.V. Copyright (C) 2011-2012 Planets Communications B.V. Copyright (C) 2013-2016 Bareos GmbH & Co. KG This program is Free Software; you can redistribute it and/or modi...
jivesoftware/amza
amza-api/src/main/java/com/jivesoftware/os/amza/api/wal/WALValue.java
<gh_stars>1-10 /* * Copyright 2013 <NAME>, 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...
eutro/jwasm
jwasm-tree/src/main/java/io/github/eutro/jwasm/tree/MemoriesNode.java
package io.github.eutro.jwasm.tree; import io.github.eutro.jwasm.Limits; import io.github.eutro.jwasm.MemoriesVisitor; import io.github.eutro.jwasm.ModuleVisitor; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; import java.util.Collections; import java....
svn2github/Escript
escriptcore/src/Pointers.h
<reponame>svn2github/Escript /***************************************************************************** * * Copyright (c) 2003-2018 by The University of Queensland * http://www.uq.edu.au * * Primary Business: Queensland, Australia * Licensed under the Apache License, version 2.0 * http://www.apache.org/licenses/LI...
lechium/iPhoneOS_12.1.1_Headers
System/Library/PrivateFrameworks/HealthUI.framework/HKDataMetadataReportAccessSection.h
/* * This header is generated by classdump-dyld 1.0 * on Saturday, June 1, 2019 at 6:50:58 PM Mountain Standard Time * Operating System: Version 12.1.1 (Build 16C5050a) * Image Source: /System/Library/PrivateFrameworks/HealthUI.framework/HealthUI * classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by <NAME>...
alphaho/TypeFlow
src/main/scala/com/github/notyy/typeflow/editor/GenJavaOutputEndpoint.scala
package com.github.notyy.typeflow.editor import com.github.notyy.typeflow.domain.OutputEndpoint class GenJavaOutputEndpoint(val genFormalParams: GenFormalParams) { def execute(packageName: PackageName, outputEndpoint: OutputEndpoint, codeTemplate: CodeTemplate): JavaCode = { val code = codeTemplate.value.replac...
JayLDoherty/VOOGASalad
src/testers/TestMultipleLevels.java
<reponame>JayLDoherty/VOOGASalad<gh_stars>0 package testers; import data.Game; import engine.game.gameloop.GameLoop; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.paint.Color; import javafx.stage.Stage; import player.score.Overlay; /** * Note to self...
DouglasRMiles/QuProlog
src/trace.cc
<filename>src/trace.cc // trace.cc - The Qu-Prolog Abstract Machine Tracer // // ##Copyright## // // Copyright 2000-2016 <NAME> (<EMAIL>) // // 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 ...
HaydeeLinkous/b
pseudonymization/common/metadata.go
/* * Copyright 2020, Cossack Labs Limited * * 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 agre...
DiegoOrtegoP/Software
catkin_ws/src/f4-devel/visual_odometry/tests/odometry_training_pairs_2csv_node.py
#!/usr/bin/env python import rospy import rospkg, os from duckietown_msgs.msg import Vsample, ThetaDotSample import csv class OdometryTrainingPairsNode(object): def __init__(self): self.node_name = rospy.get_name() #Init the files self.rpkg = rospkg.RosPack() self.v_sample_filenam...
JustinDunnWahoo/netsuite
lib/netsuite/records/inventory_item.rb
<gh_stars>0 module NetSuite module Records class InventoryItem include Support::Fields include Support::RecordRefs include Support::Records include Support::Actions include Namespaces::ListAcct # NOTE NetSuite doesn't have a InventoryItemSearch object. So we use # the It...
hakandrmz/CampNotes
rentacar/src/main/java/com/turkcell/rentacar/api/controller/CarMaintenancesController.java
package com.turkcell.rentacar.api.controller; import java.util.List; import javax.validation.Valid; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind....
ekholabs/elsie-dee
src/main/java/nl/ekholabs/nlp/client/StreamServicesFeignClient.java
package nl.ekholabs.nlp.client; import nl.ekholabs.nlp.client.configuration.JsonSupportConfig; import nl.ekholabs.nlp.model.ExtractSubtitlesRequest; import nl.ekholabs.nlp.model.Streams; import nl.ekholabs.nlp.model.VideoUrl; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.web.bi...
Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd
auto_nag/scripts/workflow/p2_no_activity.py
<reponame>Mozilla-GitHub-Standards/f9c78643f5862cda82001d4471255ac29ef0c6b2c6171e2c1cbecab3d2fef4dd # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from dateutil.relati...
xyzst/gvisor
pkg/sentry/kernel/timekeeper_state.go
// Copyright 2018 The gVisor 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 agree...
sleepy-monax/projet-jeu-video
src/game/inventory/Craft.h
#pragma once #include "utils/Vector.h" #include "game/components/Inventory.h" #include "game/inventory/Craft.h" namespace game { struct Craft { Stack result; utils::Vector<Stack> ingredients; bool can_be_made(Inventory inv) const { for (size_t i = 0; i < ingredien...
mjfwalsh/lemmini
Game/Music.java
package Game; import java.io.File; import java.io.FileFilter; /* * Copyright 2009 <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-...
uk-gov-mirror/hmcts.fpl-ccd-configuration
service/src/functionalTest/java/uk/gov/hmcts/reform/fpl/model/User.java
<reponame>uk-gov-mirror/hmcts.fpl-ccd-configuration package uk.gov.hmcts.reform.fpl.model; import lombok.Data; @Data public class User { String name; String password; }
ifnode/ifnode
examples/models_custom_schema/protected/extensions/custom-schema-without-constructor.js
var SCHEMA = require('./../../../../core/PLUGIN_TYPES').SCHEMA; module.exports[SCHEMA] = function(app, CustomSchemaWithoutConstructor) { CustomSchemaWithoutConstructor.schema = 'custom-schema-without-constructor'; CustomSchemaWithoutConstructor.prototype.compile = function compile() { return this; ...
oimchat/oim-fx
client/oim-client-base/src/main/java/com/onlyxiahui/im/message/server/ResultBodyMessage.java
package com.onlyxiahui.im.message.server; import com.only.common.result.Info; import com.onlyxiahui.im.message.AbstractMessage; import com.onlyxiahui.im.message.Head; /** * @author Only * @date 2016-05-19 04:12:15 */ public class ResultBodyMessage extends AbstractMessage { private Head head; private Info info =...
pnkosev/nutri-meter
src/main/java/pn/nutrimeter/data/models/User.java
package pn.nutrimeter.data.models; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.springframework.security.core.userdetails.UserDetails; import pn.nutrimeter.data.models.base.BaseEntity; import pn.nutrimeter.data.models.enums.ActivityLevel; import pn.nutrimeter.data.mod...
Apokalypser/go-ebay
integration_test.go
<reponame>Apokalypser/go-ebay package ebay import ( "flag" "testing" "github.com/stretchr/testify/suite" ) var devID, appID, certID, ruName, authToken string func init() { flag.StringVar(&devID, "devid", "", "EBay sandbox DevID") flag.StringVar(&devID, "appid", "", "EBay sandbox AppID") flag.StringVar(&devID,...
wdonne/pincette-common
src/main/java/net/pincette/cls/ExceptionHandler.java
<reponame>wdonne/pincette-common package net.pincette.cls; public class ExceptionHandler { short endPC; short handlerPC; short startPC; String type; public short getEndProgramCounter() { return endPC; } public short getHandlerProgramCounter() { return handlerPC; } public String getName() ...
mealdy/google-api-objectivec-client-for-rest
Source/GeneratedServices/Customsearch/GTLRCustomsearchObjects.h
<gh_stars>0 // NOTE: This file was generated by the ServiceGenerator. // ---------------------------------------------------------------------------- // API: // CustomSearch API (customsearch/v1) // Description: // Lets you search over a website or collection of websites // Documentation: // https://developers.g...
goranbjelanovic/jet
mysql/lock_statement.go
<reponame>goranbjelanovic/jet package mysql import "github.com/goranbjelanovic/jet/v2/internal/jet" // LockStatement is interface for MySQL LOCK tables type LockStatement interface { Statement READ() Statement WRITE() Statement } // LOCK creates LockStatement from list of tables func LOCK(tables ...jet.Serializer...