repo_name stringlengths 6 101 | path stringlengths 4 300 | text stringlengths 7 1.31M |
|---|---|---|
joonashak/vyardage | server/src/middlewares/errorHandling.js | <filename>server/src/middlewares/errorHandling.js
/**
* Middleware to handle errors.
* Designed to work with this module's CustomErrors and objection's errors.
* The error object consumed by this middleware should include the fields statusCode
* (HTTP status code), type (concise error type for UI logic) and message... |
majk1/netbeans-mmd-plugin | mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/ui/IconBlock.java | /*
* Copyright 2015-2018 <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 applicable law or agreed t... |
mosburn/turbot_tuils | examples/find_ec2_instance.py | #!/usr/bin/env python
import turbotutils.cluster
import turbotutils.account
import boto3
import argparse
import sys
def main(akey, skey, token, instance_id):
session = boto3.Session(aws_access_key_id=akey, aws_secret_access_key=skey, aws_session_token=token)
client = session.client('ec2', region_name='us-eas... |
rxzz0/QountersMinus-1.19.0 | include/Qounters/PBQounter.hpp | #pragma once
#include "util/logger.hpp"
#include "util/format.hpp"
#include "util/note_count.hpp"
#include "Qounter.hpp"
#include "QounterRegistry.hpp"
#include "custom-types/shared/macros.hpp"
#include "questui/shared/BeatSaberUI.hpp"
#include "UnityEngine/Color.hpp"
#include "GlobalNamespace/ScoreModel.hpp"
#inclu... |
achapero/laravel-new | resources/js/components/views/private/admins/PageBoarding/Clearent/PageBoardingClearentBoardingProcessSteps/StepBankAccountAddBank.js | import {
Button,
Card,
Checkbox,
Col,
Divider,
Form,
Input,
InputNumber,
notification,
Radio,
Row,
Space
} from "antd";
import React, { useEffect, useState } from "react";
import useAxiosQuery from "../../../../../../providers/useAxiosQuery";
import * as htmlToImage from ... |
BSFrance/BSFrance | stm32/libraries/OfficialCompatibility/src/PeripheralPins.h | #define NC 0xFF
#include "Arduino.h"
typedef uint8_t PinName;
typedef struct {
PinName pin;
uint8_t mode;
uint8_t pupd;
uint8_t afnum;
} PinMap;
extern const PinMap PinMap_Ethernet[];
inline PinName pin_pinName(const PinMap* map) {return map->pin;}
const PinMap *pinmap_function(PinName pin, const P... |
isabella232/jetty-hadoop-fix | modules/jsp-api-2.0/src/main/java/javax/servlet/jsp/el/VariableResolver.java | /**
*
* Copyright 2003-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required... |
OleksandrYehorovEPAM/stripes-components | lib/NavListItem/NavListItem.js | <reponame>OleksandrYehorovEPAM/stripes-components<gh_stars>0
/**
* Nav List Item
*/
import React from 'react';
import classnames from 'classnames';
import PropTypes from 'prop-types';
import Link from 'react-router-dom/Link';
import css from './NavListItem.css';
const propTypes = {
children: PropTypes.oneOfType([... |
tomaytotomatof/leonspoks | multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js | <reponame>tomaytotomatof/leonspoks
/*
* Copyright (C) 2022 Huawei Device Co., Ltd.
* 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
*
*... |
softicar/platform | platform-core-module/src/main/java/com/softicar/platform/core/module/email/EmailContentType.java | <filename>platform-core-module/src/main/java/com/softicar/platform/core/module/email/EmailContentType.java
package com.softicar.platform.core.module.email;
public enum EmailContentType {
PLAIN("text/plain;charset=utf-8"),
HTML("text/html;charset=utf-8"),
//
;
private String contentTypeString;
private EmailCon... |
MC-JY/aws-sdk-java | aws-java-sdk-iot/src/main/java/com/amazonaws/services/iot/model/ElasticsearchAction.java | <gh_stars>1000+
/*
* Copyright 2016-2021 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* ... |
gitaumoses4/Hospital-System | src/database/DatabaseFunctions.java | <reponame>gitaumoses4/Hospital-System<gh_stars>0
package database;
import hospitalsystem.Strings;
import hospitalsystem.User;
import java.sql.ResultSet;
/**
*
* @author <NAME>
*/
public class DatabaseFunctions {
private static final DatabaseConnection db = new DatabaseConnection(Strings.DATABAES_NAME);
p... |
marpme/lib-ledger-core | api/core/react-native/LibLedgerCore/android/binding/android/jni/jni/jni/Account.cpp | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from wallet.djinni
#include "Account.hpp" // my header
#include "AddressListCallback.hpp"
#include "AmountCallback.hpp"
#include "AmountListCallback.hpp"
#include "BitcoinLikeAccount.hpp"
#include "BlockCallback.hpp"
#include "ErrorCodeCallback.h... |
pradeepkumarcm-egov/DIGIT-Dev | finance/egov/egov-egi/src/main/java/org/egov/infra/microservice/models/StorageResponse.java | package org.egov.infra.microservice.models;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
public class StorageResponse {
private List<FileReq> files;
public List<FileReq> getFiles() {
return files;
}
public void setFiles(List<FileReq> files) {
... |
8pig/springboot-blog-java | parent-blog/api-blog/src/main/java/com/zhou/blog/service/impl/ArticleServiceImpl.java | <reponame>8pig/springboot-blog-java
package com.zhou.blog.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.util.BeanUtil;
... |
dunarel/dunphd-thesis | Chapter4/Supplementary/proc_hom/db/migrate/075_add_data_to_tree_order.rb | require 'faster_csv'
class AddDataToTreeOrder < ActiveRecord::Migration
def up
self.class.update_data()
end
def down
self.class.delete_data()
end
def self.update_data()
self.delete_data()
self.insert_data()
end
def self.update_data_csv()
csv_data = FasterCSV.open("#... |
smoe/nydax | frontend/src/components/Drawer/Drawer.js | /* eslint-disable css-modules/no-undef-class */
/* eslint-disable jsx-a11y/anchor-is-valid */
import React from 'react';
import PropTypes from 'prop-types';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import { connect } from 'react-redux';
import cx from 'classnames';
import s from './Drawer.css';
... |
CNResoy/Spicy | src/minecraft/spicy/module/modules/player/FastUse.java | <reponame>CNResoy/Spicy
package spicy.module.modules.player;
import com.darkmagician6.eventapi.SubscribeEvent;
import net.minecraft.item.ItemBow;
import net.minecraft.network.play.client.C03PacketPlayer;
import net.minecraft.network.play.client.C07PacketPlayerDigging;
import net.minecraft.util.BlockPos;
import net.min... |
lisaong/Accera | accera/value/src/Array.cpp | <filename>accera/value/src/Array.cpp
////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// Authors: <NAME>
///////... |
lucmichalski/go-prestashop | internal/models/shop_group.go | <filename>internal/models/shop_group.go
package models
import (
"context"
"fmt"
"gorm.io/gorm"
)
type _ShopGroupMgr struct {
*_BaseMgr
}
func ShopGroupMgr(db *gorm.DB) *_ShopGroupMgr {
if db == nil {
panic(fmt.Errorf("ShopGroupMgr need init by db"))
}
ctx, cancel := context.WithCancel(context.Background())... |
fransfilastap/pm5 | src/main/java/id/franspratama/geol/core/dao/DailyRegionJDBCAvailabilityRepository.java | package id.franspratama.geol.core.dao;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import org.springframework.beans.factory.annotation.Autowired;... |
gdonald/eldac | spec/factories/project_folders.rb | <gh_stars>0
# frozen_string_literal: true
FactoryBot.define do
factory :project_folder do
user { create(:user, :valid_user) }
project { create(:project, :valid_project) }
folder { create(:folder, :valid_folder) }
trait :valid_project_folder do
end
end
end
|
Pyroseza/Random | python_sed_example.py | <filename>python_sed_example.py
import os
test = "echo i\'m sexy and i know it, who i, boi yeah | sed 's/\\bi\\b/I/g'"
print(test)
os.system(test)
|
gravitationalwavedc/gwcloud_bilby | src/gw_bilby/production-settings.py | from .base import *
DEBUG = False
SITE_URL = "https://gw-cloud.org"
STATIC_URL = "/bilby/static/"
ALLOWED_HOSTS = ['*']
EMAIL_HOST = 'mail.swin.edu.au'
EMAIL_PORT = 25
GWCLOUD_JOB_CONTROLLER_API_URL = "http://gwcloud-job-server:8000/job/apiv1"
GWCLOUD_AUTH_API_URL = "http://gwcloud-auth:8000/auth/graphql"
GWCLOUD... |
mhradek/aurkitu | aurkitu-maven-plugin/src/test/java/com/michaelhradek/aurkitu/plugin/core/ComparatorsTest.java | package com.michaelhradek.aurkitu.plugin.core;
import com.michaelhradek.aurkitu.plugin.core.output.EnumDeclaration;
import com.michaelhradek.aurkitu.plugin.core.output.Schema;
import com.michaelhradek.aurkitu.plugin.core.output.TypeDeclaration;
import org.junit.Assert;
import org.junit.Test;
import java.util.ArrayLis... |
1690296356/jdk | test/langtools/tools/doclint/anchorTests/p/package-info.java | /* @test /nodynamiccopyright/
* @bug 8025246 8247957
* @summary doclint is showing error on anchor already defined when it's not
* @library ../..
* @modules jdk.javadoc/jdk.javadoc.internal.doclint
* @build DocLintTester
* @run main DocLintTester -ref package-info.out package-info.java
* @compile/fail/ref=packag... |
yossigil/Automata | test/automaton/instances/compound/abMany.java | <filename>test/automaton/instances/compound/abMany.java
package automaton.instances.compound;
import org.junit.jupiter.api.Test;
import automaton.Lexer;
public class abMany {
final Lexer abStar = Lexer.c('a').Then('b').many();
@Test void m1() { abStar.DFSA(); }
@Test void m2() { abStar.DFSA().minimal(); }
@... |
SebastianTirado/Cpp-Learning-Archive | Deitel/Chapter17/examples/17.09/fig17_11.cpp | /*
* =====================================================================================
*
* Filename:
*
* Description:
*
* Version: 1.0
* Created: Thanks to github you know it
* Revision: none
* Compiler: g++
*
* Author: <NAME> <EMAIL>
*
*
* ====... |
ibara1454/pyss | run_mpi_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Run this test with
# `mpiexec -n 1 python run_mpi_test.py`
#
from unittest import TestLoader, TextTestRunner
if __name__ == '__main__':
path = 'test/mpi'
loader = TestLoader()
test = loader.discover(path)
runner = TextTestRunner(verbosity=2)
runner.... |
jsatdapr/cadence | runtime/common/pathdomain_string.go | <gh_stars>100-1000
// Code generated by "stringer -type=PathDomain"; DO NOT EDIT.
package common
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[PathDomainUnknown... |
foruy/openflow-multiopenstack | openstack-dashboard/openstack_dashboard/dashboards/admin/instances/urls.py | <reponame>foruy/openflow-multiopenstack
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.admin.instances import views
urlpatterns = patterns('openstack_dashboard.dashboards.admin.instances.views',
url(r'^$', views.AdminIndexView.as_view(), name='index'),
)... |
jobial-io/cloudformation-template-generator | src/test/scala/com/monsanto/arch/cloudformation/model/resource/CodeCommit_UT.scala | <gh_stars>100-1000
package com.monsanto.arch.cloudformation.model.resource
import com.monsanto.arch.cloudformation.model.{ ResourceRef, Template, Token }
import org.scalatest.{ FunSpec, Matchers }
import spray.json._
class CodeCommit_UT extends FunSpec with Matchers {
val repo = `AWS::CodeCommit::Repository`(
n... |
lusing/mljs | js2/esp.js | const espree = require("espree");
const code = "for(let i=0;i<10;i+=1){console.log(i);}";
const ast = espree.parse(code, {ecmaVersion: 2020});
console.log(ast);
const tokens = espree.tokenize(code, {ecmaVersion: 2020});
console.log(tokens);
const code2 = 'function greet(input) {return input ?? "Hello world";}';
c... |
CCLDESTY/xml3d.js | src/renderer/renderer/canvas-handler.js | var MouseEvents = require("./events/mouse.js");
var TouchEvents = require("./events/touch.js");
var c_globalCanvasId = 0;
/**
* @param {Element} xml3dElement
* @constructor
*/
function AbstractCanvasHandler(xml3dElement, canvas) {
this._xml3dElement = xml3dElement;
this._canvas = canvas;
this.id = ++c_... |
danadi7/tp | src/main/java/seedu/schedar/model/task/DoneStatusCode.java | package seedu.schedar.model.task;
import java.util.HashMap;
import java.util.Map;
public enum DoneStatusCode {
NOT_DONE(0, "Not done"),
DONE(1, "Done"),
OVERDUE(2, "Overdue");
private static final Map<Integer, DoneStatusCode> BY_STATUS_CODE = new HashMap<>();
private final int statusCode;
pr... |
Freddy875/C | Archivos/ArchivosDeLectura/fgets.c | <reponame>Freddy875/C
/*
Lee cadenas de caracteres hasta n-1 caracteres
O hasta que lea un salto de linea "\n"
o el final del archivo EOF
char *fgets(char *buffer, int tamanio, FILE *archivo);
*/
#include <stdio.h>
#include <stdlib.h>
int main(void){
FILE *archivo;
char sCaracteres[100];
archivo = fopen("gen... |
alexkalderimis/lab | internal/stringset.go | <filename>internal/stringset.go
package stringset
type StringSet struct {
trie map[rune]*StringSet
}
func Singleton(s string) StringSet {
var set StringSet
set.Add(s)
return set
}
func (set *StringSet) Contains(item string) bool {
runes := []rune(item)
if len(runes) == 0 {
return true
}
s := set
ok := tru... |
jorrellz/JetfireTool | jetfiretool-cron/src/main/java/com/jetfiretool/cron/pattern/parser/ValueParser.java | package com.jetfiretool.cron.pattern.parser;
/**
* 值处理接口<br>
* 值处理用于限定表达式中相应位置的值范围,并转换表达式值为int值
*
* @author Jetfire
*/
public interface ValueParser {
/**
* 处理String值并转为int<br>
* 转换包括:
* <ol>
* <li>数字字符串转为数字</li>
* <li>别名转为对应的数字(如月份和星期)</li>
* </ol>
*
* @param value String值
* @return int
*/
... |
stumoodie/VisualLanguageToolkit | lib/antlr-3.4/tool/src/main/java/org/antlr/tool/AssignTokenTypesBehavior.java | <reponame>stumoodie/VisualLanguageToolkit
/*
* [The "BSD license"]
* Copyright (c) 2010 <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:
* 1. Redistributions of source code m... |
diable201/GolangDevelopment | HW_09/api/database/library.go | package database
import (
"anime-redis/api/models"
"context"
)
type Library interface {
Connect(url string) error
Close() error
Anime() AnimeRepository
Manga() MangaRepository
Genres() GenresRepository
}
type AnimeRepository interface {
Create(ctx context.Context, anime *models.Anime) error
All(ctx context.... |
Tarpelite/OJ_research | code/2987.c | #include <stdio.h>
int N(int b1,int c1,int l1,int n1);
int M(int b2,int c2,int l2,int n2);
int H(int x,int y);
int min1(int x1,int y1);
int max1(int x2,int y2);
int n;
int a[100000],b[10000],c[10000];
int main()
{
int l,r,k,m,o,i=0,min,max,Nr,Mr;
scanf("%d %d",&n,&k);
m=n;
while(m--)
{
scanf("%d",&a[i]);
... |
liyuanyuan11/Python | list/list14.py | nameList=["李若瑜","长子栋","王小明"]
IDList=["1","2","3"]
scoreList1=[94,100,99]
scoreList2=[93,100,95]
scoreList3=[100,94,100]
totalList=[scoreList1[0]+scoreList2[0]+scoreList3[0],scoreList1[1]+scoreList2[1]+scoreList3[1],scoreList1[2]+scoreList2[2]+scoreList3[2]]
print("现在已经有"+str(len(nameList))+"位同学的成绩,他们的得分如下:")
print("学号 ... |
kokog78/ibello-api | src/main/java/hu/ibello/core/Timeout.java | /*
* Ark-Sys Kft. licenses this file to you 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... |
qg0/EliteQuant_Excel | CppCoreLibrary/QLExtension/termstructures/commodity/commoditycurveext.cpp | <reponame>qg0/EliteQuant_Excel
#include <termstructures/commodity/commoditycurveext.hpp>
namespace QLExtension {
CommodityCurveExt::CommodityCurveExt(const std::string name,
const std::vector<Date>& dates,
const std::vector<Real>& prices,
... |
sopra-fs21-group-10/td-server | src/test/java/ch/uzh/ifi/hase/soprafs21/repository/UserRepositoryIntegrationTest.java | <filename>src/test/java/ch/uzh/ifi/hase/soprafs21/repository/UserRepositoryIntegrationTest.java
package ch.uzh.ifi.hase.soprafs21.repository;
import ch.uzh.ifi.hase.soprafs21.constant.UserStatus;
import ch.uzh.ifi.hase.soprafs21.entity.User;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.a... |
munkhuushmgl/java-dialogflow-cx | proto-google-cloud-dialogflow-cx-v3/src/main/java/com/google/cloud/dialogflow/cx/v3/WebhookProto.java | /*
* Copyright 2020 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 applicable law or agreed to ... |
sirikata/sirikata | libmesh/plugins/collada/ColladaSystem.cpp | <gh_stars>10-100
/* Sirikata libproxyobject -- COLLADA Models System
* ColladaSystem.cpp
*
* Copyright (c) 2009, <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:
*... |
vishalbelsare/minifold | minifold/html_table.py | <gh_stars>0
#!/usr/bin/env python3
#
# This file is part of the minifold project.
# https://github.com/nokia/minifold
__author__ = "<NAME>"
__maintainer__ = "<NAME>"
__email__ = "<EMAIL>"
__copyright__ = "Copyright (C) 2018, Nokia"
__license__ = "BSD-3"
from html.parser import HTMLPars... |
C-B4/unifiedpush-server | model/api/src/main/java/org/jboss/aerogear/unifiedpush/api/document/IDocumentList.java | package org.jboss.aerogear.unifiedpush.api.document;
import java.util.List;
public interface IDocumentList<T extends IDocument<?, ?>, I> {
List<T> getDocuments();
List<I> getIgnoredIds();
}
|
EGAlberts/some_bandits | some_bandits/bandits/EwS.py | <filename>some_bandits/bandits/EwS.py
import numpy as np
from random import sample
from some_bandits.bandit_options import bandit_args
from some_bandits.utilities import convert_conf, save_to_pickle, calculate_utility
from some_bandits.bandits.Bandit import Bandit
from some_bandits.bandits.Expert import Expert
from sta... |
android-nostalgic/platform_dalvik | libcore/icu/src/main/java/com/ibm/icu4jni/math/BigDecimal.java | package com.ibm.icu4jni.math;
public class BigDecimal extends Number {
@Override
public double doubleValue() {
// TODO Auto-generated method stub
return 0;
}
@Override
public float floatValue() {
// TODO Auto-generated method stub
return 0;
}
@Override
... |
NikolaVodenicharov/WeatherJavaApp | app/src/main/java/com/example/weath/ui/activities/WeatherFragment.java | <reponame>NikolaVodenicharov/WeatherJavaApp<filename>app/src/main/java/com/example/weath/ui/activities/WeatherFragment.java
package com.example.weath.ui.activities;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
im... |
tlalexander/stitchEm | lib/include/libvideostitch/profile.hpp | <gh_stars>100-1000
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
#ifndef PROFILE_HPP_
#define PROFILE_HPP_
#include "config.hpp"
#include <iosfwd>
#ifdef _MSC_VER
#include <Windows.h>
#else
#include <sys/time.h>
#endif
// macro-based profiling, enabled only when -DSIMPLEPROFILEON
#ifdef... |
tizenorg/platform.core.uifw.dali-toolkit | automated-tests/src/dali-toolkit/utc-Dali-CubeTransitionEffect.cpp | <reponame>tizenorg/platform.core.uifw.dali-toolkit
/*
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
*
* 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/licen... |
WarNote/StarsOfEternityBot | src/embeds/warframe/itemSearch/weapons/index.js | <reponame>WarNote/StarsOfEternityBot<gh_stars>0
const primeWeapon = require('./primeWeapon');
const weapon = require('./weapon');
module.exports = { weapon, primeWeapon };
|
DPlamenov/Homework-tasks | ProgrammingBasics02/NestedConditionalStatementsLab/TradeCommissions.java | <reponame>DPlamenov/Homework-tasks<gh_stars>0
package NestedConditionalStatementsLab;
import java.util.Scanner;
public class TradeCommissions {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String town = scanner.nextLine();
double sold = Double.parseDou... |
iu-uits-es/ojb | src/java/org/odmg/DMap.java | <reponame>iu-uits-es/ojb
package org.odmg;
/**
* The ODMG Map collection interface.
* All of the operations defined by the JavaSoft <code>Map</code>
* interface are supported by an ODMG implementation of <code>DMap</code>,
* the exception <code>UnsupportedOperationException</code> is not thrown when a
... |
GO-Eratosthenes/dhdt | dhdt/generic/handler_www.py | <reponame>GO-Eratosthenes/dhdt
# generic libraries
import os
import tarfile
import zipfile
import urllib.request
import ftps # for Copernicus FTP-download
# geospatial libaries
from osgeo import gdal
def get_file_from_ftps(url, user, password,
file_path, file_name, dump_dir=os.getcwd()):
... |
AZANIR/adwancer-selenium-webdriwer-test | src/test/java/com/herokuapp/theinternet/draganddroptests/DragAndDropTests.java | package com.herokuapp.theinternet.draganddroptests;
import org.testng.Assert;
import org.testng.annotations.Test;
import com.herokuapp.theinternet.base.TestUtilities;
import com.herokuapp.theinternet.pages.DragAndDropPage;
public class DragAndDropTests extends TestUtilities {
@Test
public void dragAToBTest() {
... |
wasong/cmpt433 | as2_final/display.c | #include "fileHandler.h"
#include "display.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void initDisplay() {
// writeToFile("/sys/devices/platform/bone_capemgr/slots", "BB-I2C1");
printf("Initiating display\n");
exportGPIOPin(61);
exportGPIOPin(44);
writeToFile(LEFT_DIGIT_DIR, "out");
writeToFil... |
maomanqi/azkaban | azkaban-db/src/main/java/azkaban/db/DatabaseOperatorImpl.java | <reponame>maomanqi/azkaban
/*
* Copyright 2017 LinkedIn Corp.
*
* 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 ap... |
EdgardOliveira/MedAlertApp | app/src/main/java/br/com/technologies/venom/medalertapp/models/Usuario.java | package br.com.technologies.venom.medalertapp.models;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.room.Ignore;
public class Usuario implements Parcelable {
private String nome;
private String email;
private String senha;
private String token;
public String getNome() {... |
BigSully/Spring-Security-Third-Edition | Chapter03/chapter03.03-calendar/src/main/java/com/packtpub/springsecurity/userdetails/CalendarUserDetailsService.java | package com.packtpub.springsecurity.userdetails;
import java.util.Collection;
import com.packtpub.springsecurity.core.authority.CalendarUserAuthorityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.G... |
seasuresh1/cov-backend | src/main/java/com/covid/dto/PatientProviderRelationshipDto.java | package com.covid.dto;
import java.util.Date;
public class PatientProviderRelationshipDto {
private int patientId;
private int providerId;
private String relationshipType;
private int locationId;
private Date relationshipStartDate;
private Date relationshipEndDate;
public int getPatientId() {
return patien... |
shisheng-1/guice-persist-orient | src/main/java/ru/vyarus/guice/persist/orient/db/scheme/initializer/core/spi/SchemeDescriptor.java | package ru.vyarus.guice.persist.orient.db.scheme.initializer.core.spi;
import com.google.common.collect.Maps;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.List;
import java.util.Map;
/**
* Model initialization descriptor.
*
* @author <NAME>
* @since 04.03.2015
*/
@SuppressWarnings... |
ZFGCCP/ZFGC3 | src/main/java/com/zfgc/mappers/AvatarStagingDbObjMapper.java | <filename>src/main/java/com/zfgc/mappers/AvatarStagingDbObjMapper.java
package com.zfgc.mappers;
import com.zfgc.dbobj.AvatarStagingDbObj;
import com.zfgc.dbobj.AvatarStagingDbObjExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AvatarStagingDbObjMapper {
/**
* This... |
instill-ai/pipeline-backend | pkg/datamodel/error.go | package datamodel
type Error struct {
Status int32 `json:"status,omitempty"`
Title string `json:"title,omitempty"`
Detail string `json:"detail,omitempty"`
}
|
faetools/go-hubspot | vendor/github.com/faetools/devtool/format/writers/state-writer.go | <filename>vendor/github.com/faetools/devtool/format/writers/state-writer.go
package writers
type (
// StateFunc is a function that writes and returns another state for the state writer.
StateFunc func([]byte) (StateFunc, []byte, int, error)
stateWriter struct{ state StateFunc }
)
var _ Writer = (*stateWriter)(nil... |
yelircaasi/cltk | src/cltk/alphabet/arb.py | """The Arabic alphabet. Sources:
- ``pyarabic`` `<https://github.com/linuxscout/pyarabic>`_
- ``arabicstemmer`` `<https://github.com/assem-ch/arabicstemmer/blob/master/algorithm/stemmer.sbl>`_
>>> from cltk.alphabet import arb
>>> arb.LETTERS[:5]
('ا', 'ب', 'ت', 'ة', 'ث')
>>> arb.PUNCTUATION_MARKS
['،', '؛', '؟']
>>>... |
ParradoxSVK/elite_buffer_vtrace | tests/stats_test.py | <reponame>ParradoxSVK/elite_buffer_vtrace<gh_stars>1-10
import shutil
import unittest
import os
from option_flags import change_args
from stats.stats import Statistics
from threading import Event
class TestStats(unittest.TestCase):
def setUp(self):
if not os.path.exists("temp"):
os.makedirs(... |
dweng0/game | node_modules/@babylonjs/core/Audio/Interfaces/ISoundOptions.js | export {};
//# sourceMappingURL=ISoundOptions.js.map |
danielogen/msc_research | selected projects/desktop/mars-sim-v3.1.0/mars-sim-core/org/mars_sim/msp/core/robot/ai/job/Makerbot.java | /**
* Mars Simulation Project
* Makerbot.java
* @version 3.1.0 2019-09-20
* @author <NAME>
*/
package org.mars_sim.msp.core.robot.ai.job;
import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.mars_sim.msp.core.robot.RoboticAttributeType;
import org.mars_sim.msp.core.robot.Robo... |
guokaia/Mekatok-V3 | foundation/mekatok-foundation-dic/mekatok-dic-declare/src/main/java/icu/guokai/mekatok/framework/dic/service/IDictionaryService.java | package icu.guokai.mekatok.framework.dic.service;
import icu.guokai.mekatok.framework.core.service.IService;
/**
* 字典功能暴露服务
* @author GuoKai
* @date 2021/8/19
*/
public interface IDictionaryService extends IService {
}
|
mountainash/web-scrobbler | src/core/i18n.js | <gh_stars>100-1000
'use strict';
/**
* Node attributes that define how node content will be localized.
*
* There're following supported attributes:
* - i18n: replace value of `textContent` property by localized text;
* - i18n-title: replace value of `title` attribute by localized text;
* - i18n-placeholder: r... |
Neusoft-Technology-Solutions/aws-sdk-cpp | aws-cpp-sdk-medialive/source/model/CreateMultiplexProgramRequest.cpp | /**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/medialive/model/CreateMultiplexProgramRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::MediaLive::Model;
using namespace Aws::Utils::J... |
dev10/lachesis | src/posposet/wire/frame.pb.go | <reponame>dev10/lachesis
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: frame.proto
package wire
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
... |
carlosProgrammer/sundaymart-admin-bo | resources/js/pages/Dashboard/Chart3.js | <filename>resources/js/pages/Dashboard/Chart3.js
import React from "react";
import { Card } from "antd";
import { Column } from "@antv/g2plot";
import { withTranslation } from "react-i18next";
class Chart3 extends React.Component {
data = [
{ type: "1-3秒", value: 0.16 },
{ type: "4-10秒", value: 0.1... |
wilebeast/FireFox-OS | B2G/gecko/xpcom/tests/TestID.cpp | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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/. */
#include <stdio.h>
#include "plstr.... |
grayledw/375RefactoringProject | src/DatabaseQueries/DatabaseQuery.java | package DatabaseQueries;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import Domain.DatabaseConnectionService;
import Logging.DatabaseQueryLogger;
import Logging.Logger;
public abstract class D... |
KoachieHealthSystemsNPO/bsis-1 | src/test/java/org/jembi/bsis/helpers/persisters/DivisionPersister.java | <reponame>KoachieHealthSystemsNPO/bsis-1<filename>src/test/java/org/jembi/bsis/helpers/persisters/DivisionPersister.java<gh_stars>1-10
package org.jembi.bsis.helpers.persisters;
import javax.persistence.EntityManager;
import org.jembi.bsis.model.location.Division;
public class DivisionPersister extends AbstractEntit... |
sleepxdq/BUCT | design-patterns/multithreading/observer/src/main/java/com/xdq/observer/Task.java | package com.xdq.observer;
/**
* @author Seven.Xu
* @version 2021/4/30
**/
@FunctionalInterface
public interface Task<R> {
/**
* 任务执行接口
* @return
*/
R call() throws InterruptedException;
}
|
bryamrrr/universyty | app/models/enrollment.rb | class Enrollment < ApplicationRecord
belongs_to :user
belongs_to :course
has_many :grades, :dependent => :destroy
before_save :default_values
def calcGrade
sum = 0
counter = 0
self.grades.each do |grade|
if grade[:score] >= 14
sum += grade[:score]
counter += 1
end
... |
gordon-n-stevenson/fetalReconstruction | source/IRTKSimple2/packages/registration/src/irtkConjugateGradientDescentOptimizer.cc | /*=========================================================================
Library : Image Registration Toolkit (IRTK)
Module : $Id$
Copyright : Imperial College, Department of Computing
Visual Information Processing (VIP), 2008 onwards
Date : $Date$
Version : $Revision$
Changes ... |
mondoo/Clove | clove/components/systems/ecs/include/Clove/ECS/ComponentContainer.inl | <gh_stars>10-100
#include "Clove/ECS/ECSEvents.hpp"
#include <Clove/Definitions.hpp>
#include <Clove/Event/EventDispatcher.hpp>
#include <Clove/Log/Log.hpp>
#include <type_traits>
CLOVE_DECLARE_LOG_CATEGORY(CloveEcs)
namespace clove {
bool ComponentContainerInterface::hasComponent(Entity entity) {
return... |
jarocho105/pre2 | erp_desktop_all/src_puntoventa/com/bydan/erp/puntoventa/presentation/web/jsf/sessionbean/report/CajaDiariaUsuarioSessionBean.java | /*
*AVISO LEGAL
© Copyright
*Este programa esta protegido por la ley de derechos de autor.
*La reproduccion o distribucion ilicita de este programa o de cualquiera de
*sus partes esta penado por la ley con severas sanciones civiles y penales,
*y seran objeto de todas las sanciones legales que correspondan.
*Su... |
vusec/firestarter | apps/mysql-5.1.65/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp | <reponame>vusec/firestarter
/* Copyright (C) 2003 MySQL AB
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 ... |
zoek1/unlock | smart-contracts/test/Lock/withdrawByAddress.js | <filename>smart-contracts/test/Lock/withdrawByAddress.js<gh_stars>0
const BigNumber = require('bignumber.js')
const deployLocks = require('../helpers/deployLocks')
const shouldFail = require('../helpers/shouldFail')
const unlockContract = artifacts.require('../Unlock.sol')
const TestErc20Token = artifacts.require('Te... |
angelopassaro/Hacktoberfest-1 | python/text_classification.py | import re
import pandas as pd
import docx2txt
import RAKE
import datetime
from tkinter import *
text = docx2txt.process("sample.docx")
sentences = re.split('\n',text)
dataset_sentences=pd.DataFrame(sentences,columns=["sentences"])
null_sentences=dataset_sentences["sentences"]!=''
dataset_sentences=dataset_sentences[nu... |
Waiviogit/waivio | src/client/object/ObjectGallery/GalleryAlbum.js | import { max, get } from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { Card } from 'antd';
import { getImagePath } from '../../helpers/image';
import DEFAULTS from '../../object/const/defaultValues';
import './GalleryAlbum.less';
const GalleryAlbum = ({ album }) => {
const filterI... |
CarbonStack/carbon-stack | components/issues/edit/EditIssueForm.js | <reponame>CarbonStack/carbon-stack
import React from 'react'
import {
sansSerifFontFamily,
errorColor
} from '../../../lib/styles/variables'
import MarkdownEditor from '../../shared/MarkdownEditor'
import Spinner from '../../shared/Spinner'
import DiffEditor from '../../shared/DiffEditor'
class EditIssueForm exten... |
mihai-constantin/ACS | PAJ/effective-java/src/com/luxoft/effectivejava/module01/item02/javabeans/Customer.java | <gh_stars>0
package com.luxoft.effectivejava.module01.item02.javabeans;
import java.util.Date;
public class Customer {
private Gender gender;
private String surname;
private String firstName;
private String middleName;
private Date birthday;
private Date becomeCustomer;
public Customer(Gender gen... |
karan/keys | user/store_test.go | package user_test
import (
"bytes"
"context"
"encoding/json"
"testing"
"github.com/keys-pub/keys"
"github.com/keys-pub/keys/ds"
"github.com/keys-pub/keys/user"
"github.com/keys-pub/keys/util"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
)
func testStore(t *testing.T, dst ds.DocumentStore, ... |
peombwa/Sample-Graph-Python-Client | src/users/models/microsoftgraphtime_off_reason.py | <gh_stars>0
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# ---------------------------------------------------------------------... |
fincd-aws/aws-alb-ingress-controller | internal/alb/generator/tag_test.go | <gh_stars>1-10
package generator
import (
"testing"
"github.com/stretchr/testify/assert"
)
func Test_TagLB(t *testing.T) {
gen := TagGenerator{
ClusterName: "cluster",
DefaultTags: map[string]string{
"key": "value",
},
}
expected := map[string]string{
"kubernetes.io/cluster/cluster": "owned",
TagKe... |
johsteffens/beth | lib/bcore/bcore_signal.c | /** Author and 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 applicable law or agree... |
lechium/tvOS10Headers | System/Library/PrivateFrameworks/GeoServices.framework/GEOSimpleTileRequester.h | <gh_stars>1-10
/*
* This header is generated by classdump-dyld 1.0
* on Wednesday, March 22, 2017 at 9:03:11 AM Mountain Standard Time
* Operating System: Version 10.1 (Build 14U593)
* Image Source: /System/Library/PrivateFrameworks/GeoServices.framework/GeoServices
* classdump-dyld is licensed under GPLv3, Copyright ©... |
olafurpg/algebird | algebird-test/src/test/scala/com/twitter/algebird/FirstLaws.scala | <reponame>olafurpg/algebird
package com.twitter.algebird
import com.twitter.algebird.BaseProperties._
import com.twitter.algebird.scalacheck.arbitrary._
import com.twitter.algebird.scalacheck.NonEmptyVector
import org.scalacheck.Prop.forAll
class FirstLaws extends CheckProperties {
property("First should sum proper... |
gina-alaska/ASSIST | db/migrate/20120307020458_change_obs_datetime_to_datetime_in_observations.rb | <gh_stars>0
class ChangeObsDatetimeToDatetimeInObservations < ActiveRecord::Migration
def up
change_column :observations, :obs_datetime, :datetime
end
def down
change_column :observations, :obs_datetime, :date
end
end
|
xswz8015/infra | go/src/infra/cros/internal/util/collections_test.go | <filename>go/src/infra/cros/internal/util/collections_test.go
// Copyright 2021 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package util
import (
"testing"
)
func TestUnorderedEqual(t *testing.T) {
a := []strin... |
hakanardo/pyvx | pyvx/backend/mock_backend.py | <reponame>hakanardo/pyvx
import pyvx
class Lib(object):
def vxCreateContext(self):
return 42
def __getattr__(self, item):
return -1
def _get_backend_version(self):
return pyvx.__backend_version__
def _get_backend_name(self):
return b"mock"
def _get_backend_instal... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.