repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
Partmedia/bag | src/bag/layout/util.py | <gh_stars>0
# SPDX-License-Identifier: BSD-3-Clause AND Apache-2.0
# Copyright 2018 Regents of the University of California
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of... |
sailxjx/DI-engine | dizoo/image_classification/data/sampler.py | import math
import torch
from torch.utils.data import Sampler
from ding.utils import get_rank, get_world_size
class DistributedSampler(Sampler):
"""Sampler that restricts data loading to a subset of the dataset.
It is especially useful in conjunction with
:class:`torch.nn.parallel.DistributedDataParallel... |
Almadanmp/frontend | src/views/GeographicArea/Area.js | <reponame>Almadanmp/frontend<filename>src/views/GeographicArea/Area.js
import React, {Component} from 'react';
import US001 from "./US001";
import US002 from './US002';
import US004 from './US004';
import US006 from './US006';
import US006Redux from './US006Redux/US006Redux';
import US007Redux from './US007Redux/US007... |
viticm/web-pap | server/Common/Packets/CGPlayerShopAskForRecord.h | <filename>server/Common/Packets/CGPlayerShopAskForRecord.h
// CGPlayerShopAskForRecord.h
//
// 向服务器申请创建玩家商店
//
//////////////////////////////////////////////////////
#ifndef __CGPLAYERSHOPASKFORRECORD_H__
#define __CGPLAYERSHOPASKFORRECORD_H__
#include "Type.h"
#include "Packet.h"
#include "PacketFactory.h"
#includ... |
scjalliance/resourceful | enforcer/properties_windows.go | //go:build windows
// +build windows
package enforcer
import (
"github.com/gentlemanautomaton/winproc"
"github.com/scjalliance/resourceful/lease"
)
// Properties returns the lease properties for p.
func Properties(p winproc.Process, environment lease.Properties) lease.Properties {
props := make(lease.Properties, ... |
setonup/PicoKit | Examples/AWSECommerce/AWSECommerce/com/amazon/webservices/awsecommerceservice/_2011_08_01/Offer.h | <reponame>setonup/PicoKit
// Generated by xsd compiler for ios/objective-c
// DO NOT CHANGE!
#import <Foundation/Foundation.h>
#import "PicoClassSchema.h"
#import "PicoPropertySchema.h"
#import "PicoConstants.h"
#import "PicoBindable.h"
@class OfferListing;
@class Merchant;
@class Promotions;
@class OfferAttributes;... |
ericbrandwein/CodeforcesAPI | examples/load_hacks_for_contest/main.py | #!/usr/bin/env python3
"""
In this example we are loading hacks for contest by it's id
"""
import os
import sys
from codeforces import CodeforcesAPI
def main(argv):
api = CodeforcesAPI()
contest_id = int(argv[1])
hacks = api.contest_hacks(contest_id)
for h in hacks:
print("[{:^30}] hacke... |
consensusnetworks/accumulate | cmd/cli/cmd/util.go | <filename>cmd/cli/cmd/util.go
package cmd
import (
"context"
"encoding"
"encoding/json"
"errors"
"fmt"
"log"
"math"
"math/big"
"strconv"
"time"
api2 "github.com/AccumulateNetwork/accumulate/internal/api/v2"
url2 "github.com/AccumulateNetwork/accumulate/internal/url"
"github.com/AccumulateNetwork/accumula... |
Pancor/airApp | app/src/main/java/pl/pancor/android/air/nearest_station/NearestStationPresenter.java | <reponame>Pancor/airApp<filename>app/src/main/java/pl/pancor/android/air/nearest_station/NearestStationPresenter.java
package pl.pancor.android.air.nearest_station;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.util.Log;
import javax.inject.Inject;
import io.re... |
FAD95/NEXT.JS-Course | node_modules/@iconify/icons-mdi/src/file-sync.js | let data = {
"body": "<path d=\"M11 17.5c0-3.6 2.9-6.5 6.5-6.5c.9 0 1.7.2 2.5.5V8l-6-6H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h6.8c-1.1-1.2-1.8-2.8-1.8-4.5m2-14L18.5 9H13V3.5m4 8.5v1.5c2.2 0 4 1.8 4 4c0 .8-.2 1.6-.7 2.2l-1.1-1.1c.2-.3.3-.7.3-1.1c0-1.4-1.1-2.5-2.5-2.5v1.5l-2.2-2.2L17 12m0 11v-1.5c-2.2 0-4-1.8-4-4c0-.8.2-1.6... |
ruijis/buildsimhub_python_api | test/hvac_swap_zone_group_test.py | <gh_stars>10-100
import BuildSimHubAPI as bshapi
import pandas as pd
# project_key can be found in every project (click the information icon next to project name)
project_api_key = 'c39dceed-242b-4ea3-9fd4-e2076f89c29b'
# model_key can be found in each model information bar
model_api_key = 'dca5f246-e6b5-44de-8a31-b9... |
yp2211/javabasics | lesson5/src/com/training/Dog.java | <filename>lesson5/src/com/training/Dog.java
package com.training;
public class Dog extends Animal{
protected String type = "DOG";
public Dog(String name) {
super(name);
}
@Override
public void eat() {
System.out.println(title+ " " + name + " is eating bone.");
}
@Override... |
thl/cultural_network | app/models/feature_object_type.rb | class FeatureObjectType < CategoryFeature
#
#
# Associations
#
#
belongs_to :perspective
after_save do |record|
record.feature.update_object_type_positions if !record.skip_update
end
end
# == Schema Info
# Schema version: 20110923232332
#
# Table name: category_features
#
# id :i... |
wizardxz/pythran | pythran/pythonic/types/int.hpp | <gh_stars>0
#ifndef PYTHONIC_TYPES_INT_HPP
#define PYTHONIC_TYPES_INT_HPP
#include "pythonic/include/types/int.hpp"
#include "pythonic/types/attr.hpp"
PYTHONIC_NS_BEGIN
namespace __builtin__
{
template <class T>
typename std::enable_if<std::is_integral<T>::value, T>::type
getattr(types::attr::REAL, T self)
{
... |
kxen42/Learn-Python-Programming-Third-Edition | ch09/jwt/claims_time.py | <reponame>kxen42/Learn-Python-Programming-Third-Edition
# jwt/claims_time.py
from datetime import datetime, timedelta, timezone
from time import sleep, time
import jwt
iat = datetime.now(tz=timezone.utc)
nfb = iat + timedelta(seconds=1)
exp = iat + timedelta(seconds=3)
data = {'payload': 'data', 'nbf': nfb, 'exp':... |
specs-feup/matisse | MatlabToCLV2/src/org/specs/matlabtocl/v2/codegen/ssatocrules/OverrideGpuBufferContentsProcessor.java | <filename>MatlabToCLV2/src/org/specs/matlabtocl/v2/codegen/ssatocrules/OverrideGpuBufferContentsProcessor.java
/**
* Copyright 2015 SPeCS.
*
* 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
... |
sobolevn/putout | packages/plugin-convert-for-to-for-of/lib/n/fixture/remove-useless-arguments-fix.js | <filename>packages/plugin-convert-for-to-for-of/lib/n/fixture/remove-useless-arguments-fix.js
module.exports = async function runTests(tests) {
const total = tests.length;
for (const {
fn,
message,
} of tests) {
await runOneTest({
fn,
message
});
... |
OregonShakespeareFestival/sufia | spec/services/noid_spec.rb | <gh_stars>0
require 'spec_helper'
describe Sufia::Noid do
describe "#namespaceize" do
subject { Sufia::Noid.namespaceize(id) }
context "when the passed in pid doesn't have a namespace" do
let(:id) { 'abc123' }
it { is_expected.to eq 'sufia:abc123' }
end
context "when the passed in pid ha... |
PetrykinVictor/incubator-druid | api/src/main/java/io/druid/data/input/impl/DimensionSchema.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"); you ... |
zabrewer/batfish | projects/batfish/src/main/java/org/batfish/bddreachability/BDDReverseFlowTransformationFactory.java | <reponame>zabrewer/batfish
package org.batfish.bddreachability;
import javax.annotation.Nonnull;
import org.batfish.bddreachability.transition.Transition;
interface BDDReverseFlowTransformationFactory {
@Nonnull
Transition reverseFlowIncomingTransformation(String hostname, String iface);
@Nonnull
Transition ... |
zayez/galigens | src/components/Rovers/RoverItem.js | import React from "react"
import { Link, useNavigate } from "react-router-dom"
import { getRoverImage } from "../../utils/roverUtils"
import RoverDetails from "../Rover/RoverDetails"
const RoverItem = ({ rover }) => {
const roverLink = `/rover/${rover.name.toLowerCase()}`
const roverImage = getRoverImage(rover.nam... |
ricksyuan/heap-overflow | app/models/comment.rb | # == Schema Information
#
# Table name: comments
#
# id :bigint(8) not null, primary key
# author_id :integer not null
# commentable_type :string
# commentable_id :bigint(8)
# body :string not null
# created_at :datetime not null
# update... |
rohansachdeva1990/art-of-code | refactoring/kata-one/src/main/java/com/rohan/aoc/refactoring/kataone/refactored/specs/Specs.java | package com.rohan.aoc.refactoring.kataone.refactored.specs;
import com.rohan.aoc.refactoring.kataone.refactored.EstateMaterial;
import com.rohan.aoc.refactoring.kataone.refactored.EstatePlacement;
import com.rohan.aoc.refactoring.kataone.refactored.EstateType;
import com.rohan.aoc.refactoring.kataone.refactored.Spec;... |
ihmcrobotics/acsell | src/main/java/us/ihmc/acsell/hardware/state/AcsellState.java | package us.ihmc.acsell.hardware.state;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.EnumMap;
import org.ejml.data.DenseMatrix64F;
import us.ihmc.acsell.hardware.AcsellActuator;
import us.ihmc.acsell.hardware.AcsellJoint;
import us.ihmc.acsell.hardware.configuration.AcsellRobot;
import us.... |
lilsweetcaligula/The-C-Exercises | March-31st-2016/K-and-R/readLines.c | #include <string.h>
#include <stdlib.h>
#include <stdio.h>
/*K&R C (<NAME> & <NAME>)
Exercise 5-7. Rewrite readlines to store lines in an array supplied by main,
rather than calling alloc to maintain storage.
*/
#define BUFFER_SIZE 128
int ReadLines(FILE* stream, char* buffers[], size_t bufferLen, size_t buffersC... |
szczepix1983/quitsmoker | src/test/java/com/szczepix/quitsmoker/enums/HealthProgressTypeTest.java | package com.szczepix.quitsmoker.enums;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class HealthProgressTypeTest {
@Test
public void getDuration() {
HealthProgressType[] types = HealthProgressType.class.getEnumConstants();
for (HealthProgressType ty... |
msrecec/infokarta-backend-spring | web/client/epics/__tests__/mapcatalog-test.js | <filename>web/client/epics/__tests__/mapcatalog-test.js
/**
* Copyright 2020, GeoSolutions Sas.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
import expect from 'expect';
import { testEpic } from './e... |
matvaibhav/pensieve | dash_client/player_code_noMPC/test/js/streaming/Capabilities_Suite.js | // The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license.
//
// Copyright (c) 2013, Microsoft Open Technologies, Inc.
//
// All rig... |
kiranrraj/100Days_Of_Coding | Day_20/jump_search_2.py | # Title : Jump search
# Author : <NAME>.
# Date : 03:11:2020
import math
def jump_search(arr, num):
prev =0
jump = int(math.sqrt(len(arr)))
length = len(arr)
for i in range(0, length, jump):
if arr[i] < num:
prev = i
elif arr[i] == num:
return f"Found {arr[... |
YtGz/apexcharts.js | src/modules/Responsive.js | <reponame>YtGz/apexcharts.js
import Config from './settings/Config'
import Utils from '../utils/Utils'
import CoreUtils from './CoreUtils'
/**
* ApexCharts Responsive Class to override options for different screen sizes.
*
* @module Responsive
**/
export default class Responsive {
constructor(ctx) {
this.ct... |
EDGEDevInteractive/RenCode | html-src/TL/lastAction.js | <gh_stars>0
// Get Elements
var iconElem = document.getElementById("LastActionImg");
var TextElem = document.getElementById("LastActionText");
// Get Images
var Img_Cancel = "../../Icons1/Cancel.png"
var Img_FileCheck = "../../Icons1/File-Check.png"
var Img_Gear = "../../Icons1/Gear.png"
var Img_Info = "../../Icons1/I... |
qualitybargain/blightstatus | spec/lib/tasks/foreclosures_rake_spec.rb | <gh_stars>1-10
require "./spec/support/shared_contexts/rake.rb"
describe "foreclosures:load" do
include_context "rake"
describe "foreclosures:load" do
it "creates foreclosures" do
#figure out how to test things here
end
end
end
|
masud-technope/ACER-Replication-Package-ASE2017 | corpus/class/ecf/789.java | <reponame>masud-technope/ACER-Replication-Package-ASE2017<filename>corpus/class/ecf/789.java
/****************************************************************************
* Copyright (c) 2007, 2009 Composent, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available und... |
datphan/moviecrab | tests/unit/mgr/__init__.py | # -*- coding:utf-8 -*-
"""unit tests for manager"""
|
souzamonteiro/guash | src/mpi/mpi.c | /**
* File:
* mpi.c
*
* Package:
* Mpi
*
* Description:
* This file implements a GuaraScript extension.
*
* Copyright:
* Copyright (c) 2019 <NAME>, <NAME>.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided th... |
U-Ar/Cpresto | cpc/sysdep/GNUAssembler.py | from .Assembler import Assembler
from utils.CommandUtils import CommandUtils
class GNUAssembler(Assembler):
def __init__(self,h):
self.error_handler = h
def assemble(self,srcpath,destpath,opts):
cmd = []
cmd.append("as")
cmd += opts.args
cmd.append("-o")
cmd... |
DAKSHSEMWAL/Vegidel | app/src/main/java/app/kurosaki/developer/vegidel/ui/activities/AddAddressActivity.java | <reponame>DAKSHSEMWAL/Vegidel
package app.kurosaki.developer.vegidel.ui.activities;
import android.os.Bundle;
import androidx.databinding.DataBindingUtil;
import java.util.ArrayList;
import app.kurosaki.developer.vegidel.R;
import app.kurosaki.developer.vegidel.core.BaseActivity;
import app.kurosaki.developer.vegid... |
ScalablyTyped/SlinkyTyped | j/jquery_dot_fancytree/src/main/scala/typingsSlinky/jqueryFancytree/Fancytree/NodePatch.scala | package typingsSlinky.jqueryFancytree.Fancytree
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
/** Data object similar to NodeData, but with additional options.
* May be pas... |
sridmad/envoy | source/common/router/config_utility.cc | #include "common/router/config_utility.h"
#include <regex>
#include <string>
#include <vector>
#include "common/common/assert.h"
namespace Envoy {
namespace Router {
bool ConfigUtility::QueryParameterMatcher::matches(
const Http::Utility::QueryParams& request_query_params) const {
auto query_param = request_q... |
JeromeGobeil/SENG401Chess | src/main/java/com/leokom/games/chess/player/legal/brain/normalized/NormalizedEvaluatorFactory.java | <reponame>JeromeGobeil/SENG401Chess
package com.leokom.games.chess.player.legal.brain.normalized;
import com.google.common.collect.Maps;
import com.leokom.games.chess.player.legal.brain.common.Evaluator;
import com.leokom.games.chess.player.legal.brain.common.EvaluatorFactory;
import com.leokom.games.chess.player.lega... |
JaxVanYang/acm | jax/codeforces/uncategorized/cf-714/a.cc | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 2e5 + 5;
int a[maxn], b[maxn];
char s[maxn], t[maxn];
void solve() {
int n, k;
cin >> n >> k;
int cnt = (n - 1) / 2;
if (cnt < k) {
puts("-1");
return;
}
int num = n;
for (int i = 0; i < k... |
hardfish/justTest | profitbricks/src/test/java/org/jclouds/profitbricks/http/parser/server/ServerInfoResponseHandlerTest.java | <gh_stars>0
/*
* 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... |
Mananananana/yutou_library | yutou_library/apis/v1/__init__.py | <gh_stars>1-10
from flask import Blueprint
api_v1 = Blueprint("api_v1", __name__)
from yutou_library.apis.v1 import resources
|
jelmerterwal/org.hl7.fhir.core | org.hl7.fhir.convertors/src/main/java/org/hl7/fhir/convertors/conv10_50/datatypes10_50/complextypes10_50/Quantity10_50.java | package org.hl7.fhir.convertors.conv10_50.datatypes10_50.complextypes10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.Element10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Code10_50;
import org.hl7.fhir.convertors.conv10_50.datatypes10_50.primitivetypes10_50.Decimal10_... |
bhoske/changeGLTF | node_modules/mjs-volume/runtime/scene.js | // Copyright (c) 2013, <NAME>
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and ... |
alibaba/tsmock | src/main/java/com/alibaba/tsmock/concurrent/HttpMockServerThread.java | <reponame>alibaba/tsmock
/**
* Copyright © 2017 Alibaba Inc . All rights reserved.
*
* @Title: HttpMockServerThread.java
* @Prject: tsmock
* @Package: com.alibaba.tsmock.cocurrent
* @Description: TODO
* @author: qinjun.qj
* @date: 2017年1月9日上午9:56:31
* @version: v1.0
*/
package com.alibaba.tsmock.concurrent;
... |
dolanor-galaxy/ledger-1 | cmd/server_start.go | package cmd
import (
"context"
"github.com/numary/ledger/pkg/api"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"go.uber.org/fx"
"net"
"net/http"
)
func NewServerStart() *cobra.Command {
return &cobra.Command{
Use: "start",
RunE: func(cmd *cobra.Command, args []string) error {
app := NewContainer(
... |
svrc/bosh-vsphere-cpi-release | src/vsphere_cpi/lib/nsxt_policy_client/nsxt_policy_client/api/policy_networking_connectivity_tier1_gateways_interfaces_dad_state_api.rb | <gh_stars>10-100
=begin
#NSX-T Data Center Policy API
#VMware NSX-T Data Center Policy REST API
OpenAPI spec version: 3.1.0.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.19
=end
require 'uri'
module NSXTPolicy
class PolicyNetworkingConnectivityTier1GatewaysInt... |
nemOoO-wang/MMLive | MeMeDa/Entrance/Home/Square/___Root___/cells/SquareHeaderCell.h | <filename>MeMeDa/Entrance/Home/Square/___Root___/cells/SquareHeaderCell.h
//
// SquareHeaderCell.h
// MeMeDa
//
// Created by <NAME> on 5/8/18.
// Copyright © 2018 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef enum : NSUInteger {
SquareHeaderTypeShuRen,
SquareHeaderTypeReMen,
Square... |
tsegismont/rhq-metrics | job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/RepeatingTrigger.java | <reponame>tsegismont/rhq-metrics
/*
* Copyright 2014-2016 Red Hat, Inc. and/or its affiliates
* and other contributors as indicated by the @author tags.
*
* 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... |
zswhcb/portal | web/lib/macro.js | <filename>web/lib/macro.js
/*!
* hnzswh-dolalive
* Copyright(c) 2015 hnzswh-dolalive <<EMAIL>>
* MIT Licensed
*/
'use strict';
var fs = require('fs'),
velocity = require('velocityjs'),
util = require('speedt-utils'),
cwd = process.cwd();
var conf = require('../settings');
module.exports = {
parse: function(f... |
unaussprechlich/prumpo | app/src/main/java/de/uni_stuttgart/informatik/sopra/sopraapp/app/MainActivityModule.java | <filename>app/src/main/java/de/uni_stuttgart/informatik/sopra/sopraapp/app/MainActivityModule.java<gh_stars>0
package de.uni_stuttgart.informatik.sopra.sopraapp.app;
import dagger.Module;
import dagger.Provides;
import dagger.android.ContributesAndroidInjector;
import de.uni_stuttgart.informatik.sopra.sopraapp.depend... |
jbrandwood/kickc | src/main/kc/include/c64-basic-floats.h | /// @file
/// Library wrapping the BASIC floating point functions
///
/// See https://www.c64-wiki.com/wiki/Floating_point_arithmetic
/// See http://www.pagetable.com/c64rom/c64rom_sc.html
/// Prepare MEM pointers for operations using MEM
inline void prepareMEM(unsigned int mem);
/// FAC = unsigned int
/// Set the FA... |
biker2000on/vue-test | src/plugins/apollo.js | import Vue from 'vue'
import AWSAppSyncClient, { AUTH_TYPE } from 'aws-appsync'
import VueApollo from 'vue-apollo'
import AppSyncConfig from '../aws-exports'
import Amplify from 'aws-amplify'
const configApollo = {
url: AppSyncConfig.aws_appsync_graphqlEndpoint,
region: AppSyncConfig.aws_appsync_region,
auth: {... |
portocodes/rubygems.org | app/models/ownership.rb | class Ownership < ApplicationRecord
belongs_to :rubygem
belongs_to :user
validates :user_id, uniqueness: { scope: :rubygem_id }
def safe_destroy
rubygem.owners.many? && destroy
end
end
|
FredEscobar/hbfl | scripts/09/helpers.js | <filename>scripts/09/helpers.js
const {
IAMClient,
AttachRolePolicyCommand,
CreateRoleCommand
} = require('@aws-sdk/client-iam')
const { SQSClient } = require('@aws-sdk/client-sqs')
const { KinesisClient } = require('@aws-sdk/client-kinesis')
const { LambdaClient } = require('@aws-sdk/client-lambda')
const archiv... |
transitanalystisarel/TransitAnalystIsrael | root/transitscore_txt2jsobject_v1.py | <reponame>transitanalystisarel/TransitAnalystIsrael
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# convert transitscore txt grid file - transit_score_yyyymmdd.txt - to js object with gridlatlon as key to look up transitscore property from 1-100
# output ts_lookup.js
#
print('----------------- convert grid file to ... |
OttoWinter/esphomeyaml | esphome/components/midea_ac/climate.py | import esphome.config_validation as cv
CONFIG_SCHEMA = cv.invalid("This platform has been renamed to midea in 2021.9")
|
soyastudio/kurl | curl-application/src/main/java/soya/framework/curl/application/CurlApplication.java | package soya.framework.curl.application;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication(scanBasePackages = {"soya.framework.curl.application"})
public class CurlApplication {
public static void main(String[] args) {
... |
konradkalemba/tabler-icons-react | src/icons/paint.js | <reponame>konradkalemba/tabler-icons-react
import React from 'react';
export default function Paint({
size = 24,
color = 'currentColor',
...restProps
}) {
return (
<svg
xmlns='http://www.w3.org/2000/svg'
className='icon icon-tabler icon-tabler-paint'
width={size}
height={size}
... |
saqsun/overlap2d | src/com/uwsoft/editor/gdx/ui/thumbnailbox/ImageThumbnailBox.java | <gh_stars>1-10
/*
* ******************************************************************************
* * Copyright 2015 See AUTHORS file.
* *
* * 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... |
aburbanol/staart | packages/staart/src/components/forgot-password.js | <reponame>aburbanol/staart
import React, {Component} from 'react'
import {withOoth} from 'ooth-client-react'
import {compose} from 'recompose'
import withI18n from '../hocs/i18n'
const ForgotPasswordComponent = ({__}) => (
<div style={{
maxWidth: '300px',
margin: 'auto'
}}>
<h1>{__('for... |
a982338665/multithreading | src/main/java/pers/li/thread/timetask/callablefuture/testCallable.java | package pers.li.thread.timetask.callablefuture;
import java.util.Random;
import java.util.concurrent.Callable;
import java.util.concurrent.CompletionService;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorCompletionService;
import java.util.concurrent.ExecutorService;
import java.u... |
shang1219178163/MapTemplet | MapModule/MapView/NNPOIAnnotation.h | <gh_stars>1-10
//
// NNPOIAnnotation.h
// VehicleBonus
//
// Created by <NAME> on 2019/3/19.
// Copyright © 2019 Xi'an iRain IOT Technology Service CO., Ltd. . All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MAMapKit/MAMapKit.h>
#import <AMapSearchKit/AMapCommonObj.h>
typedef NS_ENUM(NSInteger... |
reels-research/iOS-Private-Frameworks | HealthUI.framework/HKElectrocardiogramTableViewCell.h | <reponame>reels-research/iOS-Private-Frameworks
/* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/HealthUI.framework/HealthUI
*/
@interface HKElectrocardiogramTableViewCell : UITableViewCell {
NSLayoutConstraint * _bottomPaddingConstraint;
bool _bottomPaddingDisabled;
HKElectroca... |
KAtana-Karlsruhe/AADC_2015_KAtana | src/adtfBase/AADC_ADTF_BaseFilters/src/helper/AADC_CarVisualization/displaywidget.cpp | <reponame>KAtana-Karlsruhe/AADC_2015_KAtana<gh_stars>1-10
/**
Copyright (c)
Audi Autonomous Driving Cup. 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 ... |
vikusss/sub4.3 | node_modules/@subql/common/dist/project/load.js | <reponame>vikusss/sub4.3<filename>node_modules/@subql/common/dist/project/load.js
"use strict";
// Copyright 2020-2021 OnFinality Limited authors & contributors
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "d... |
SXiaoXu/java-unified-sdk | core/src/main/java/cn/leancloud/types/AVNull.java | <filename>core/src/main/java/cn/leancloud/types/AVNull.java<gh_stars>0
package cn.leancloud.types;
public final class AVNull {
private static final AVNull INSTANCE = new AVNull();
public static AVNull getINSTANCE() {
return INSTANCE;
}
}
|
CBIIT/cadsr-cdecurate | src/gov/nih/nci/cadsr/persist/vm/VmVO.java | /*L
* Copyright ScenPro Inc, SAIC-F
*
* Distributed under the OSI-approved BSD 3-Clause License.
* See http://ncip.github.com/cadsr-cdecurate/LICENSE.txt for details.
*/
package gov.nih.nci.cadsr.persist.vm;
import java.sql.Timestamp;
import gov.nih.nci.cadsr.persist.common.BaseVO;
@SuppressWarnings("serial"... |
bartoszherba/messages-service | app/models/message.js | <filename>app/models/message.js
'use strict';
const mongoose = require('mongoose');
const Status = require('../data/status');
const Type = require('../data/type');
const messageSchema = new mongoose.Schema({
identifier: {
type: String,
required: true,
},
message: {
type: String,
... |
amochtar/adventofcode | 2018/day-02/part2.py | <gh_stars>1-10
from itertools import combinations
def solve(input):
combs = combinations(input, 2)
for (a, b) in combs:
if distance(a,b) == 1:
print(a, b)
result = ""
for (n, m) in zip(a, b):
if n == m:
result += n
pri... |
RinHizakura/riscv-emulator | src/virtio_blk.c | #include <assert.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "cpu.h"
#include "macros.h"
#include "memmap.h"
#define ALIGN_UP(n, m) ((((n) + (m) -1) / (m)) * (m))
static void reset_virtio_blk(riscv_virtio_blk *virtio_blk)
{
/* FIXME: Can't find the content of reset sequence in documen... |
jkennaly/ft-api-lb | common/models/intention.js | <filename>common/models/intention.js
// intention.js
const _ = require('lodash')
module.exports = function(Intention){
Intention.batchCreate = function(req, data, cb) {
//console.log('Intention.batchCreate')
//console.log(data)
const userId = req && req.user && req.user.ftUserId
data... |
mufty/Framework | vendors/galaxy/Docs/GalaxyExport_8h.js | var GalaxyExport_8h =
[
[ "GALAXY_CALLTYPE", "GalaxyExport_8h.html#a8b1c00d8c18fa44e1762e7e7163e5065", null ],
[ "GALAXY_DLL_EXPORT", "GalaxyExport_8h.html#ad4fe29abd38af8e52004db26ea275486", null ]
]; |
brickviking/TinkersConstruct | src/main/java/slimeknights/tconstruct/library/data/material/package-info.java | <reponame>brickviking/TinkersConstruct<filename>src/main/java/slimeknights/tconstruct/library/data/material/package-info.java
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
package slimeknights.tconstruct.library.data.material;
import net.minecraft.MethodsReturnNonnullByDefault;
import javax.annotation... |
isabelleh/atlas | src/test/java/org/openstreetmap/atlas/tags/oneway/OneWayTagTest.java | <reponame>isabelleh/atlas
package org.openstreetmap.atlas.tags.oneway;
import org.junit.Assert;
import org.junit.Test;
import org.openstreetmap.atlas.tags.HighwayTag;
import org.openstreetmap.atlas.tags.Taggable;
import org.openstreetmap.atlas.tags.oneway.bicycle.BicycleOneWayTag;
import org.openstreetmap.atlas.tags.o... |
cineris/wro4j | wro4j-core/src/test/java/ro/isdc/wro/model/resource/processor/decorator/TestSupportAwareProcessorDecorator.java | <reponame>cineris/wro4j
package ro.isdc.wro.model.resource.processor.decorator;
import static org.junit.Assert.assertTrue;
import java.io.Reader;
import java.io.Writer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Mock... |
pranavsadavarte221b/xv6 | doxygen/html/search/files_f.js | <reponame>pranavsadavarte221b/xv6
var searchData=
[
['uart_2ec_846',['uart.c',['../d1/d87/uart_8c.html',1,'']]],
['uart_2ed_847',['uart.d',['../d3/de3/uart_8d.html',1,'']]],
['ulib_2ec_848',['ulib.c',['../db/d8a/ulib_8c.html',1,'']]],
['ulib_2ed_849',['ulib.d',['../d8/d0c/ulib_8d.html',1,'']]],
['umalloc_2ec_... |
etkeys/cs417-in-python | python/tests/solvers/__init__.py | import pytest
import src.matrix_operations as matops
from src.solvers import Result, ResultAttributes
from tests.utils import create_matrix
def assert_iterations_count(act_count, exp_count):
if isinstance(exp_count, int):
assert act_count == exp_count
elif isinstance(exp_count, list):
assert ... |
WinterChenS/photography-site | common/src/main/java/com/winterchen/common/base/ResponseCodeInterface.java | <filename>common/src/main/java/com/winterchen/common/base/ResponseCodeInterface.java<gh_stars>0
package com.winterchen.common.base;
/**
* @author winterchen
* @version 1.0
* @date 2021/1/19 3:52 下午
* @description 异常代码接口
**/
public interface ResponseCodeInterface {
int getCode();
String getMessage();
}
|
lawrencejones/pg2pubsub | pkg/sinks/bigquery/schema_builders.go | <reponame>lawrencejones/pg2pubsub
package bigquery
import (
"bytes"
"fmt"
"sort"
"strings"
"github.com/lawrencejones/pgsink/pkg/changelog"
"github.com/lawrencejones/pgsink/pkg/decode"
bq "cloud.google.com/go/bigquery"
"github.com/alecthomas/template"
)
// buildRawMetadata generates a BigQuery schema from an... |
greifentor/blueprints | java-code-parser-antlr/src/main/java/de/ollie/blueprints/codereader/java/model/CompilationUnit.java | package de.ollie.blueprints.codereader.java.model;
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
import lombok.Generated;
import lombok.experimental.Accessors;
/**
* A container for the compilation unit information.
*
* @author ollie (13.04.2020)
*/
@Accessors(chain = true)
@Data
@Genera... |
KimJinYounga/SNS_gooroomee | src/main/java/com/gooroomee/api/error/entity/ErrorLogService.java | <filename>src/main/java/com/gooroomee/api/error/entity/ErrorLogService.java
package com.gooroomee.api.error.entity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class Erro... |
nulab/backlog-migration-common | core/src/main/scala/com/nulabinc/backlog/migration/common/service/PriorityService.scala | <gh_stars>1-10
package com.nulabinc.backlog.migration.common.service
import com.nulabinc.backlog4j.Priority
/**
* @author
* uchida
*/
trait PriorityService {
def allPriorities(): Seq[Priority]
}
|
zephyriot/zephyr-bluetooth | drivers/clock_control/stm32f107xx_clock.c | /*
* Copyright (c) 2016 RnDity Sp. z o.o.
*
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @brief Driver for Reset & Clock Control of STM32F10x family processor.
*
* Based on reference manual:
* STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and STM32F107xx
* advanced ARM ® -based 32-bit MCUs
*
* Ch... |
chowdud/intrigue-ident | checks/ip/ganglia.rb | <gh_stars>0
module Intrigue
module Ident
module IpCheck
class Ganglia < Intrigue::Ident::IpCheck::Base
def generate_checks
[
{
type: 'fingerprint',
category: 'application',
tags: %w[Network Tcp Ganglia],
vendor: 'Ganglia',... |
phetsims/scenery-phet | js/sceneryPhetQueryParameters.js | // Copyright 2016-2020, University of Colorado Boulder
/**
* Query parameters for the scenery-phet demo application.
*
* @author <NAME> (PixelZoom, Inc.)
*/
import sceneryPhet from './sceneryPhet.js';
const sceneryPhetQueryParameters = QueryStringMachine.getAll( {
// background color of the screens
backgrou... |
rgm93/CleanersDApp | origin-dapp/src/components/modals/offer-modals.js | import React from 'react'
import { Link } from 'react-router-dom'
import { FormattedMessage } from 'react-intl'
import Modal from 'components/modal'
export const WithdrawModal = ({ isOpen = false, onCancel, onSubmit }) => (
<Modal
className="offer-modal withdraw"
isOpen={isOpen}
handleToggle={onCancel}
... |
kylinmac/leetCode | src/main/java/com/mc/code/MedianOfTwoSortedArrays.java | <reponame>kylinmac/leetCode
package com.mc.code;
/**
* @author macheng
* @date 2020/11/25 10:20
* @desc 给定两个大小为 m 和 n 的正序(从小到大)数组 nums1 和 nums2。请你找出并返回这两个正序数组的中位数。
*/
public class MedianOfTwoSortedArrays {
public double findMedianSortedArrays(int[] nums1, int[] nums2) {
return find(nums1, nums2);
... |
FengYen-Chang/dldt | inference-engine/src/mkldnn_plugin/nodes/mkldnn_eltwise_node.cpp | // Copyright (C) 2018-2019 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "mkldnn_eltwise_node.h"
#include <ie_layers.h>
#include <string>
#include <vector>
#include <memory>
#include <algorithm>
#include <cmath>
#include <mkldnn_types.h>
#include <mkldnn_extension_utils.h>
#include "ie_parallel.... |
phumoonlight/ossuary | university-c-training/HwLab/HwLab2.1_353.c | #include<stdio.h>
int main ()
{
char pro[20];
float price,total,dis,amount;
int unit;
printf("Enter product = ");
scanf("%s",pro);
printf("Enter price = ");
scanf("%f",&price);
printf("Enter unit = ");
scanf("%d",&unit);
total=price*unit;
if(total>=1&&total<=100)
{
... |
andBrandCo/AMA-txtdata | react-src/src/redux/actions/recordsActions.js | <reponame>andBrandCo/AMA-txtdata
export const types = {
GET_ALL_RECORD: "GET_ALL_RECORD",
GET_ALL_RECORD_CSV: "GET_ALL_RECORD_CSV",
SEND_REPORT_TO_SERVER: "SEND_REPORT_TO_SERVER"
};
const getAllRecordRequest = payload => ({
type: `${types.GET_ALL_RECORD}_REQUEST`,
payload
});
const getAllRecordSuccess = payl... |
Zenitram-Oriaj/Room-Finder-And-Scheduler | server/applications/Controllers/services/monitor.js | <gh_stars>0
/**
* Created by <NAME> on 10/13/14.
*/
var async = require('async');
var xml2js = require('xml2js');
var log = {};
var cfg = {};
function XmlToJson(xml, cb) {
var parser = new xml2js.Parser({
mergeAttrs: true
});
parser.parseString(xml, function (err, result) {
if (err) {
cb(null, err);
} ... |
huangbop/seadroid-build | seadroid/src/main/java/com/seafile/seadroid2/ui/activity/AccountDetailActivity.java | <filename>seadroid/src/main/java/com/seafile/seadroid2/ui/activity/AccountDetailActivity.java
package com.seafile.seadroid2.ui.activity;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import android.content.Context;
import android.content.Int... |
koty08/JAVA_PBP | week8-lambda_stream/hw/com/fm/unit/Player.java | <reponame>koty08/JAVA_PBP
public class Player {
public static int ID = 0;
public static int NAME = 1;
public static int HEIGHT = 2;
public static int NATIONALITY = 3;
public static int CLUB = 4;
public static int OVERALL = 5;
public static int POSITION = 6;
private final int id;
pri... |
givanse/ember-simple-auth | packages/ember-simple-auth/tests/simple-auth/utils/objects-are-equal-test.js | import objectsAreEqual from 'simple-auth/utils/objects-are-equal';
describe('Utils.objectsAreEqual', function() {
it('is true for equal objects', function() {
expect(objectsAreEqual({ a: 'b', c: 'd' }, { a: 'b', c: 'd' })).to.be.true;
});
it('is true for equal objects regardless of property order', function... |
LigthWarrior/frontend-course-2020 | homeworks/daria.zahrebelna_Angel-88/4-modules/script.js | import {
getFridaysOfMonth,
isMonthLong,
fullWeeksNumberInMonth,
shortestWeekDaysNumber,
} from './time.js';
const date = document.querySelector('[data-date]');
const buttonGetMonthFridays = document.querySelector('[data-button-get-month-fridays]');
const fridaysInMonth = document.querySelector('[data-... |
saqsham/one | src/fireedge/src/public/containers/Application/Deploy.js | /* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */
/* */
/* 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 ... |
hamidgasmi/training.computerscience.algorithms-datastructures | 02-data-sructures-fundamentals/5_binary_search_trees/is_bst.py | <reponame>hamidgasmi/training.computerscience.algorithms-datastructures
import sys, threading
# In Order Traversal of the Tree:
# Time Complexity: O(n)
# Space Complxity: O(height)
def IsBinarySearchTree(tree, v, inOrderTraversal):
if len(tree) < 2:
return True
if tree[v][1] != -1 and not IsBinarySearchTree(t... |
plbogen/MinorThird | src/main/java/LBJ2/classify/RealReferrer.java | <filename>src/main/java/LBJ2/classify/RealReferrer.java
package LBJ2.classify;
import LBJ2.learn.ChildLexicon;
import LBJ2.learn.Lexicon;
import LBJ2.util.ByteString;
import LBJ2.util.ExceptionlessInputStream;
import LBJ2.util.ExceptionlessOutputStream;
/**
* A referring real feature is one that has its own identi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.