identifier stringlengths 42 383 | collection stringclasses 1
value | open_type stringclasses 1
value | license stringlengths 0 1.81k | date float64 1.99k 2.02k ⌀ | title stringlengths 0 100 | creator stringlengths 1 39 | language stringclasses 157
values | language_type stringclasses 2
values | word_count int64 1 20k | token_count int64 4 1.32M | text stringlengths 5 1.53M | __index_level_0__ int64 0 57.5k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/cephalicmarble/pleg/blob/master/webapp/webpack.config.js | Github Open Source | Open Source | MIT | null | pleg | cephalicmarble | JavaScript | Code | 236 | 1,325 | var path = require('path');
var webpack = require('webpack');
var utils = require('./utils');
var projectRoot = path.resolve(__dirname);
var context = path.resolve(process.cwd(), 'resources/assets/');
var glob = require("glob");
require('./resources/assets/js/nodeextend');
var config = require('./webpack_config').dev._... | 10,221 |
https://github.com/jsjqian/scheme-compiler/blob/master/tests/release/or-2.scm | Github Open Source | Open Source | MIT | null | scheme-compiler | jsjqian | Scheme | Code | 3 | 9 | (or '1 '2)
| 29,576 |
https://github.com/nataren/mono/blob/master/mcs/class/System.ServiceModel.Web/Test/System.ServiceModel.Syndication/SyndicationElementExtensionTest.cs | Github Open Source | Open Source | Apache-2.0 | 2,017 | mono | nataren | C# | Code | 738 | 2,228 | //
// SyndicationElementExtensionTest.cs
//
// Author:
// Atsushi Enomoto <atsushi@ximian.com>
//
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to d... | 17,086 |
https://github.com/codecop/BankOCR-Outside-in-Kata/blob/master/Scheme/test/scheme-unit-test.scm | Github Open Source | Open Source | BSD-3-Clause | 2,021 | BankOCR-Outside-in-Kata | codecop | Scheme | Code | 17 | 43 | (include "assert-r5rs.scm")
;; Test the unit test infrastructure.
(test-case "sample unit test"
(assert= 2 (+ 1 1)))
| 23,220 |
https://github.com/bopopescu/spark1.6-2/blob/master/core/target/java/org/apache/spark/util/SparkExitCode.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | spark1.6-2 | bopopescu | Java | Code | 88 | 177 | package org.apache.spark.util;
// no position
class SparkExitCode {
/** The default uncaught exception handler was reached. */
static public int UNCAUGHT_EXCEPTION () { throw new RuntimeException(); }
/** The default uncaught exception handler was called and an exception was encountered while
* @return (und... | 15,841 |
https://github.com/akhilkumarpilli/hub/blob/master/x/subscription/expected/keeper.go | Github Open Source | Open Source | Apache-2.0 | null | hub | akhilkumarpilli | Go | Code | 103 | 405 | package expected
import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/exported"
hub "github.com/sentinel-official/hub/types"
node "github.com/sentinel-official/hub/x/node/types"
plan "github.com/sentinel-official/hub/x/plan/types"
)
type AccountKeeper interface {
GetAccount(ct... | 47,380 |
https://github.com/gsedometov/minesweeper/blob/master/game.py | Github Open Source | Open Source | MIT | null | minesweeper | gsedometov | Python | Code | 247 | 791 | import io
import random
from itertools import chain, product
class Board:
def __init__(self, rows, columns, mines):
self.total_mines = mines
self.revealed_count = 0
self.free_cells_count = rows*columns - mines
self.rows = rows
self.columns = columns
self.cells = [[0... | 3,487 |
https://github.com/nagaikenshin/schemaOrg/blob/master/schemaOrgDomaConv/src/org/kyojo/schemaorg/m3n4/doma/core/clazz/SteeringPositionValueConverter.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | schemaOrg | nagaikenshin | Java | Code | 38 | 216 | package org.kyojo.schemaorg.m3n4.doma.core.clazz;
import org.seasar.doma.ExternalDomain;
import org.seasar.doma.jdbc.domain.DomainConverter;
import org.kyojo.schemaorg.m3n4.core.impl.STEERING_POSITION_VALUE;
import org.kyojo.schemaorg.m3n4.core.Clazz.SteeringPositionValue;
@ExternalDomain
public class SteeringPositi... | 46,967 |
https://github.com/KMoszczyc/Memo-Game/blob/master/Memo (open with unity)/Assets/Scripts/GameManager.cs | Github Open Source | Open Source | MIT | null | Memo-Game | KMoszczyc | C# | Code | 560 | 2,023 |
using UnityEngine.SceneManagement;
using UnityEngine;
using UnityEngine.UI;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using UnityEngine.EventSystems;
using System.Collections;
using UnityEngine.InputSystem;
public static class ALL
{
public static int value = 1;
}
public class GameMan... | 11,919 |
https://github.com/forestlzj/meltano/blob/master/src/meltano/core/db.py | Github Open Source | Open Source | MIT | 2,021 | meltano | forestlzj | Python | Code | 308 | 981 | """Defines helpers related to the system database."""
import logging
import time
from sqlalchemy import create_engine
from sqlalchemy.engine import Engine
from sqlalchemy.exc import OperationalError
from sqlalchemy.orm import sessionmaker
from sqlalchemy.sql import text
from .project_settings_service import ProjectS... | 29,134 |
https://github.com/icesun963/OpWeb/blob/master/Web/nedbLib/nedbSync.js | Github Open Source | Open Source | MIT | 2,020 | OpWeb | icesun963 | JavaScript | Code | 146 | 573 | var HashTable = Hashtable;
var OpItem = function (opid){
var unique_id = (function() {
return function (){
function _p8(s) {
var p = (Math.random().toString(16)+"000000000").substr(2,8);
return s ? "" + p.substr(0,4) + "" + p.substr(4,4) : p ;
}
... | 4,892 |
https://github.com/albertsalgueda/GeoLift_execution/blob/master/cfg.R | Github Open Source | Open Source | MIT | 2,021 | GeoLift_execution | albertsalgueda | R | Code | 104 | 253 | # File holds all constants that will be used throughout the code pipeline.
##############################
## Set working dir & Params ##
##############################
# Local dirs
# Note: here (and henceforth) we assume the working dir is this current file's
# directory
CURR_DIR <- getwd()
IN_DIR <- file.path(CURR_DI... | 14,481 |
https://github.com/biancahng/turma-de-elite-frontend/blob/master/src/app/manager/students/components/students-form/students-form.component.ts | Github Open Source | Open Source | MIT | null | turma-de-elite-frontend | biancahng | TypeScript | Code | 271 | 1,147 | import {Component, EventEmitter, Input, OnInit, Output, SimpleChanges} from '@angular/core';
import {FormBuilder, Validators} from "@angular/forms";
import {of} from "rxjs";
import School from "../../../../shared/model/school";
import {ActivatedRoute, Router} from "@angular/router";
import {SchoolService} from "../../.... | 18,396 |
https://github.com/kkcookies99/UAST/blob/master/Dataset/Leetcode/valid/121/454.java | Github Open Source | Open Source | MIT | null | UAST | kkcookies99 | Java | Code | 60 | 214 | class Solution {
public int XXX(int[] prices) {
// dp[i]表示第i天卖出时的最大收益.如果计算出来的为负数,则置为0.
int dp[] = new int[prices.length];
int ret = 0;
for (int i = 1; i < prices.length; i++) {
// 如果dp[i - 1] + prices[i] - prices[i - 1]小于0,则表示price[i]是最低价格了,下一天则以这个价格建仓。
dp[i]... | 2,798 |
https://github.com/TartaricAcid/Practical-Logistics-2/blob/master/src/main/java/sonar/logistics/connections/channels/FluidNetworkChannels.java | Github Open Source | Open Source | MIT | 2,018 | Practical-Logistics-2 | TartaricAcid | Java | Code | 23 | 129 | package sonar.logistics.connections.channels;
import sonar.logistics.api.networks.ILogisticsNetwork;
import sonar.logistics.connections.handlers.FluidNetworkHandler;
import sonar.logistics.info.types.MonitoredFluidStack;
public class FluidNetworkChannels extends ListNetworkChannels<MonitoredFluidStack, FluidNetworkHa... | 16,613 |
https://github.com/dayoungMM/TIL/blob/master/python/review_02_list.py | Github Open Source | Open Source | MIT | null | TIL | dayoungMM | Python | Code | 106 | 551 | ## list
array = [1,2,3,"four","five","six",True]
print(array[:3])
dust = {
'영등포구': 50,
'강남구' : 40
}
## Dictionary
print(dust['영등포구'])
dust2 = dict(abc=50)
print(dust2)
## 랜덤으로 coffee메뉴 3개 뽑기
import random
coffee = ['아아','뜨아','라떼','믹스','핫초코']
coffee_fav=coffee[1:4] #내가 좋아하는 메뉴 일부 출력
print(coffee_fav)
ls... | 6,297 |
https://github.com/FinTecSystems/xs2a-java/blob/master/src/main/kotlin/com/fintecsystems/xs2a/java/services/RiskService.kt | Github Open Source | Open Source | MIT | 2,022 | xs2a-java | FinTecSystems | Kotlin | Code | 893 | 2,171 | package com.fintecsystems.xs2a.java.services
import com.fintecsystems.xs2a.java.helper.JsonSerializer.parseJson
import com.fintecsystems.xs2a.java.helper.JsonSerializer.toJson
import com.fintecsystems.xs2a.java.models.*
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
class RiskService(
pr... | 45,742 |
https://github.com/tbindrup/ka-table/blob/master/src/lib/Utils/Virtualize.test.ts | Github Open Source | Open Source | MIT | null | ka-table | tbindrup | TypeScript | Code | 133 | 396 | import { VirtualScrolling } from '../Models/VirtualScrolling';
import { getVirtualized } from './Virtualize';
describe('Virtualize', () => {
const data: any[] = new Array(100).fill(0).map((_, index) => index);
describe('getVirtualized', () => {
it('scrollPosition 0', () => {
const virtualScrolling: Virtu... | 20,829 |
https://github.com/JasDesc/XPTraining-battle/blob/master/Battle/Weapons/Sword.cs | Github Open Source | Open Source | MIT | null | XPTraining-battle | JasDesc | C# | Code | 17 | 36 | namespace Battle.Weapons
{
public class Sword : Weapon
{
public override int Damage => 2;
}
} | 45,322 |
https://github.com/Note45/hours-counter-backend/blob/master/src/shared/core/domain/value-object.ts | Github Open Source | Open Source | MIT | null | hours-counter-backend | Note45 | TypeScript | Code | 94 | 233 | /* eslint-disable @typescript-eslint/no-explicit-any */
import { Injectable } from '@nestjs/common';
import { shallowEqual } from 'shallow-equal-object';
interface IValueObjectProps {
[index: string]: any;
}
/**
* @desc ValueObjects are objects that we determine their
* equality through their structrual property.... | 38,452 |
https://github.com/saudet/tensorflow-java/blob/master/tensorflow-framework/src/test/java/org/tensorflow/framework/op/LinalgOpsTest.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | tensorflow-java | saudet | Java | Code | 171 | 888 | package org.tensorflow.framework.op;
import org.junit.jupiter.api.Test;
import org.tensorflow.Operand;
import org.tensorflow.framework.utils.TestSession;
import org.tensorflow.op.Ops;
import org.tensorflow.types.TFloat32;
import org.tensorflow.types.TFloat64;
class LinalgOpsTest {
private final TestSession.Mode[] t... | 10,279 |
https://github.com/emerson-eps/videx-wellog/blob/master/test/utils.spec.ts | Github Open Source | Open Source | MIT | 2,022 | videx-wellog | emerson-eps | TypeScript | Code | 118 | 382 | import { expect } from 'chai';
import {
round,
numberFormatter,
hashString,
debouncer,
} from '../src/utils/utils';
describe('Utils', () => {
it('should be able to round to a specified decimal', () => {
expect(round(Math.PI, 2)).to.eq(3.14);
expect(round(1.123456789, 5)).to.eq(1.12346);
});
it(... | 36,208 |
https://github.com/cheechang/cppcc/blob/master/vs2017/PCH5/src/renderer/ui/components/avatar/Avatar.vue | Github Open Source | Open Source | MIT | null | cppcc | cheechang | Vue | Code | 211 | 719 | <template>
<div class="avatar v-ripple" :class="[size, shape, type]" @click="handleIconClick">
<slot></slot>
<img v-if="type==='is-image'" :class="{'is-offline': offline}" draggable="false" class="imgs" :src="handleSrc" alt="Image" @error="imgError">
<span v-else class="content">{{userInitial}}</span>
<... | 23,611 |
https://github.com/t-site/psaudo-quantum-deblur/blob/master/qdeblur.h | Github Open Source | Open Source | MIT | null | psaudo-quantum-deblur | t-site | C | Code | 2 | 17 | gdImagePtr quantum_deblur(gdImagePtr,int);
| 38,747 |
https://github.com/alvarojoao/socialCollector/blob/master/app/controllers/FacebookCollector.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | socialCollector | alvarojoao | Java | Code | 589 | 2,781 | package controllers;
import org.joda.time.DateTime;
import org.springframework.social.facebook.api.Comment;
import org.springframework.social.facebook.api.Facebook;
import org.springframework.social.facebook.api.PagedList;
import org.springframework.social.facebook.api.PagingParameters;
import org.springframework.soci... | 21,344 |
https://github.com/TsvetanMilanov/TelerikAcademyHW/blob/master/01.CSharpPartOne/02_PrimitiveDataTypesAndVariables/PrimitiveDataTypesAndVariables/02FloatOrDouble/FloatOrDouble.cs | Github Open Source | Open Source | MIT | 2,015 | TelerikAcademyHW | TsvetanMilanov | C# | Code | 81 | 197 | using System;
/*Problem 2. Float or Double?
Which of the following values can be assigned to a variable of type float and which to a variable of type double:
34.567839023, 12.345, 8923.1234857, 3456.091?
Write a program to assign the numbers in variables and print them to ensure no precision is lost.*/
class FloatO... | 29,348 |
https://github.com/sidorovis/stsc.news.feedzilla/blob/master/storage/src/test/java/stsc/news/feedzilla/FeedzillaSubcategoriesToDownloadTest.java | Github Open Source | Open Source | Apache-2.0 | 2,015 | stsc.news.feedzilla | sidorovis | Java | Code | 64 | 305 | package stsc.news.feedzilla;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
public class FeedzillaSubcategoriesToDownloadTest {
@Test
public void testFeedzillaSubcategoriesToDownload() throws IOException {
final FeedzillaSubcategoriesToDownload std = new FeedzillaSubcategoriesToDown... | 40,283 |
https://github.com/adyta-lda/openmls/blob/master/tls-codec/src/hpke.rs | Github Open Source | Open Source | MIT | 2,021 | openmls | adyta-lda | Rust | Code | 50 | 185 | //! TLS Codec for HPKE primitives
use super::*;
use hpke_rs::HPKEPublicKey;
impl Serialize for HPKEPublicKey {
fn tls_serialize(&self, buffer: &mut Vec<u8>) -> Result<(), Error> {
let value = TlsVecU16::from(self.as_slice());
value.tls_serialize(buffer)
}
}
impl Deserialize for HPKEPublicKey ... | 29,329 |
https://github.com/qwertasdfgTian/pochi/blob/master/pochi-admin/src/views/market/coupon/shop-coupon-list.vue | Github Open Source | Open Source | MIT | 2,021 | pochi | qwertasdfgTian | Vue | Code | 420 | 2,100 | <template>
<div>
<!-- 搜索表单 -->
<div class="search-form">
<el-form :model="page.params" :inline="true" size="small">
<el-form-item>
<el-input v-model="page.params.name" clearable placeholder="" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="e... | 20,459 |
https://github.com/g7ltt/nanoIO/blob/master/Arduino Code/constants.h | Github Open Source | Open Source | MIT | null | nanoIO | g7ltt | C | Code | 579 | 1,317 | /***********************************************************************
nanoIO
CW / FSK interface sketch for use either stand alone or with fldigi.
It is designed to fit within the RAM and I/O constraints of an Arduino
Nano circuit board. It generates either CW 5 to 100 WPM Morse code,
or FSK Baudot ha... | 19,206 |
https://github.com/Redth/XamarinComponents/blob/master/XPlat/Estimote/iOS/source/Source.enums.cs | Github Open Source | Open Source | MIT | 2,020 | XamarinComponents | Redth | C# | Code | 1,956 | 6,470 | using ObjCRuntime;
using System;
namespace Estimote
{
public enum Color
{
Unknown,
MintCocktail,
IcyMarshmallow,
BlueberryPie,
SweetBeetroot,
CandyFloss,
LemonTart,
VanillaJello,
LiquoriceSwirl,
White,
Black,
CoconutPuff,
Transparent
}
public enum ConnectionStatus
{
Disconnected,
Co... | 9,507 |
https://github.com/Beth3346/elr-scss-data-lists/blob/master/src/_main.scss | Github Open Source | Open Source | MIT | null | elr-scss-data-lists | Beth3346 | SCSS | Code | 245 | 946 | @import "elr-scss-functions/src/main";
@import "elr-scss-config/src/main";
@mixin elr-data-list($config: ()) {
$config: extend(
(
color: $text-color,
background-color: $main-background,
max-width: 100%,
max-height: 100%,
),
$config
);
$color: map-get($config, color);
$backg... | 26,506 |
https://github.com/wwangerhua/StackStorm3/blob/master/modules/st2-filter-expandable/is-expandable.filter.js | Github Open Source | Open Source | Apache-2.0 | null | StackStorm3 | wwangerhua | JavaScript | Code | 28 | 97 | 'use strict';
var _ = require('lodash')
;
module.exports = function isExpandable() {
return function (record) {
var runnerWithChilds = ['workflow', 'action-chain', 'mistral-v1', 'mistral-v2'];
return _.contains(runnerWithChilds, record.action.runner_type);
};
};
| 2,054 |
https://github.com/saxix/django-regex/blob/master/tests/demoapp/demo/settings.py | Github Open Source | Open Source | MIT | 2,018 | django-regex | saxix | Python | Code | 200 | 1,180 | import os
HERE = os.path.abspath(os.path.dirname(__file__))
BASE_DIR = os.path.join(HERE, os.pardir, os.pardir, os.pardir)
SRC_DIR = os.path.join(BASE_DIR, 'src')
PACKAGE_DIR = os.path.join(SRC_DIR, 'django_regex')
DEBUG = True
STATIC_URL = '/static/'
SITE_ID = 1
ROOT_URLCONF = 'demo.urls'
SECRET_KEY = 'abc'
STATIC_... | 25,487 |
https://github.com/CartoDB/observatory-extension/blob/master/release/observatory--0.0.5.sql | Github Open Source | Open Source | BSD-3-Clause | 2,021 | observatory-extension | CartoDB | PLpgSQL | Code | 5,458 | 17,638 | --DO NOT MODIFY THIS FILE, IT IS GENERATED AUTOMATICALLY FROM SOURCES
-- Complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION observatory" to load this file. \quit
-- Version number of the extension release
CREATE OR REPLACE FUNCTION cdb_observatory_version()
RETURNS text ... | 3,528 |
https://github.com/longtime55/researchfreelancer.com/blob/master/storage/framework/views/3f9000db18e4f5d62585eb15e3c2533a84d8a4d0.php | Github Open Source | Open Source | MIT | 2,021 | researchfreelancer.com | longtime55 | PHP | Code | 307 | 1,870 | <?php $__env->startSection('content'); ?>
<div class="freelancer-profile wt-dbsectionspace" id="user_profile">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-9">
<div class="wt-dashboardbox wt-dashboardtabsholder">
<?php if(file_exists(reso... | 44,251 |
https://github.com/prakharkohq/pulsar/blob/master/pulsar-client-cpp/include/pulsar/c/consumer_configuration.h | Github Open Source | Open Source | Apache-2.0 | 2,017 | pulsar | prakharkohq | C | Code | 1,038 | 2,532 | /**
* 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... | 50,882 |
https://github.com/walmis/xpcc/blob/master/src/xpcc/driver/storage/fat.cpp | Github Open Source | Open Source | BSD-3-Clause | null | xpcc | walmis | C++ | Code | 635 | 1,606 | // coding: utf-8
// ----------------------------------------------------------------------------
/* Copyright (c) 2011, Roboterclub Aachen e.V.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
... | 992 |
https://github.com/iq9891/lEditor/blob/master/src/assets/styles/palette.scss | Github Open Source | Open Source | MIT | 2,021 | lEditor | iq9891 | SCSS | Code | 197 | 663 | .#{$prefix}palette {
min-width: 158px;
border: 1px solid $border-color;
position: absolute;
top: 33px;
left: calc(50% - 80px);
user-select: none;
background: $white;
&-ok {
border: 1px solid $border-color;
border-radius: 1px;
text-decoration: none;
text-align: center;
height: 16px;
... | 49,018 |
https://github.com/ybordag/CoderDojoLeaderboard/blob/master/src/app/src/main/java/com/example/test2/MainActivity.java | Github Open Source | Open Source | BSD-3-Clause | 2,015 | CoderDojoLeaderboard | ybordag | Java | Code | 273 | 1,066 | package com.example.test2;
import java.util.ArrayList;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import dataSources.KidsDataSource;
public class MainActivity extends Activity {
private fi... | 3,731 |
https://github.com/dudulacerdadl/Curso-JavaScript/blob/master/CursoEmVideo/aula17/objeto01.js | Github Open Source | Open Source | MIT | null | Curso-JavaScript | dudulacerdadl | JavaScript | Code | 21 | 91 | let amiga = {
nome: 'Maria',
sexo: 'F',
peso: 60,
engordar(p){
console.log('Engordou')
this.peso += p
}
}
amiga.engordar(2)
console.log(`${amiga.nome} pesa ${amiga.peso}Kg`) | 12,209 |
https://github.com/ramtinak/InstagramApiSharp/blob/master/src/InstagramApiSharp/Classes/Models/Feed/InstaTopicalExploreFeed.cs | Github Open Source | Open Source | MIT | 2,023 | InstagramApiSharp | ramtinak | C# | Code | 125 | 337 | /*
* Developer: Ramtin Jokar [ Ramtinak@live.com ] [ RamtinJokar@outlook.com ]
*
* Github source: https://github.com/ramtinak/InstagramApiSharp
* Nuget package: https://www.nuget.org/packages/InstagramApiSharp
*
* IRANIAN DEVELOPERS
*/
using System.Collections.Generic;
namespace InstagramApiSharp.Classes.M... | 10,388 |
https://github.com/steve-madden/opentelemetry-cpp/blob/master/sdk/test/metrics/controller_test.cc | Github Open Source | Open Source | Apache-2.0 | null | opentelemetry-cpp | steve-madden | C++ | Code | 112 | 468 | #ifdef ENABLE_METRICS_PREVIEW
# include "opentelemetry/sdk/metrics/controller.h"
# include "opentelemetry/sdk/metrics/meter.h"
# include "opentelemetry/sdk/metrics/ungrouped_processor.h"
# include <gtest/gtest.h>
# include <numeric>
# include <thread>
// #include <chrono>
namespace metrics_api = opentelemetry::... | 21,791 |
https://github.com/fauxparse/matchy_matchy/blob/master/lib/matchy_matchy/match_list.rb | Github Open Source | Open Source | MIT | null | matchy_matchy | fauxparse | Ruby | Code | 192 | 447 | module MatchyMatchy
# A sorted list of matches with a strict capacity.
class MatchList
include Enumerable
# Initializes the list.
#
# @param capacity [Integer] The maximum number of matches this list can hold
def initialize(capacity = 1)
@matches = []
@capacity = capacity
end
... | 42,934 |
https://github.com/chengzhongnan/loda/blob/master/programs/oeis/118/A118754.asm | Github Open Source | Open Source | Apache-2.0 | 2,021 | loda | chengzhongnan | Assembly | Code | 28 | 173 | ; A118754: Smallest prime >= 5*n.
; 2,5,11,17,23,29,31,37,41,47,53,59,61,67,71,79,83,89,97,97,101,107,113,127,127,127,131,137,149,149,151,157,163,167,173,179,181,191,191,197,211,211,211,223,223,227,233,239,241,251,251,257,263,269,271,277,281
mul $0,5
trn $0,1
seq $0,151800 ; Least prime > n (version 2 of the "next pri... | 32,492 |
https://github.com/ThemBig/bookself-api/blob/master/src/books/dto/update-book.dto.spec.ts | Github Open Source | Open Source | MIT | null | bookself-api | ThemBig | TypeScript | Code | 20 | 56 | import { UpdateBookDto } from './update-book.dto';
describe('UpdateBookDto', () => {
it('should be defined', () => {
expect(new UpdateBookDto()).toBeDefined();
});
});
| 15,878 |
https://github.com/theopenconversationkit/tock-react-kit/blob/master/src/components/ChatInput/index.ts | Github Open Source | Open Source | MIT | 2,023 | tock-react-kit | theopenconversationkit | TypeScript | Code | 11 | 25 | import ChatInput from './ChatInput';
export * from './ChatInput';
export default ChatInput;
| 28,725 |
https://github.com/klamerin/KLMPortalRevamped/blob/master/KLMPortal/src/main/java/com/klm/KLMPortal/views/InfoView.java | Github Open Source | Open Source | Unlicense | 2,019 | KLMPortalRevamped | klamerin | Java | Code | 379 | 1,351 | package com.klm.KLMPortal.views;
import com.vaadin.flow.component.dependency.HtmlImport;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.router.RouterLink;
@Route(StartView.GEN_INFO)
@HtmlImport("frontend://styles/shared-styles.html")
public class InfoView extends AbstractView {
/**
*
*/
private s... | 50,746 |
https://github.com/pawan-nirpal-031/Algorithms-And-ProblemSolving/blob/master/Archives/KthSymbolOfGrmrItreativeDp.cpp | Github Open Source | Open Source | Apache-2.0 | 2,021 | Algorithms-And-ProblemSolving | pawan-nirpal-031 | C++ | Code | 84 | 362 | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;
#define mod 1000000007
#define pub(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define getl(s) getline(cin,s);
/*
Problem is solely based on observational skills
*/
int main(){
... | 10,592 |
https://github.com/PieterjanDeconinck/quarkus/blob/master/integration-tests/main/src/test/java/io/quarkus/it/main/OpenTracingITCase.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | quarkus | PieterjanDeconinck | Java | Code | 12 | 52 | package io.quarkus.it.main;
import io.quarkus.test.junit.NativeImageTest;
@NativeImageTest
public class OpenTracingITCase extends OpenTracingTestCase {
}
| 8,055 |
https://github.com/patrickfly/usingOAuth/blob/master/TripGallery.MVCClient/Models/PictureCreateViewModel.cs | Github Open Source | Open Source | Apache-2.0 | null | usingOAuth | patrickfly | C# | Code | 61 | 174 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using TripGallery.DTO;
namespace TripGallery.MVCClient.Models
{
public class PictureCreateViewModel
{
public HttpPostedFileBase PictureFile { get; set; }
public... | 31,671 |
https://github.com/ofek-b/vomBuch-insAnki/blob/master/ankiconnect.py | Github Open Source | Open Source | MIT | null | vomBuch-insAnki | ofek-b | Python | Code | 315 | 1,215 | import json
import urllib.request
import subprocess
from time import sleep
from constants import ANKI_USER, DECK_NAME
NOTE_TYPE = 'vomBuch-insAnki Note'
ANKI_APP = None
def request(action, **params): # from AnkiConnect's page
return {'action': action, 'params': params, 'version': 6}
def invoke(action, **para... | 50,663 |
https://github.com/da-x/name-assign.vim/blob/master/plugin/name-assign.vim | Github Open Source | Open Source | Unlicense | 2,020 | name-assign.vim | da-x | Vim Script | Code | 327 | 897 | " name-assign.vim - A helper around extracting expressions to assignments
"
" Maintainer: Dan Aloni <alonid@gmail.com>
if exists("g:loaded_name_assign") || &cp || v:version < 700
finish
endif
let g:loaded_name_assign = 1
let g:name_assign_filetypes = {
\ "rust": {
\ "prefix" : "let %s = ",
\ ... | 49,954 |
https://github.com/SikandarNiaz/ICEPortals/blob/master/src/app/layout/dashboard/innerComponents/stat-charts/stat-charts.component.ts | Github Open Source | Open Source | Apache-2.0 | null | ICEPortals | SikandarNiaz | TypeScript | Code | 29 | 101 | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-stat-charts',
templateUrl: './stat-charts.component.html',
styleUrls: ['./stat-charts.component.scss']
})
export class StatChartsComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
| 5,715 |
https://github.com/hmcts/finrem-document-generator-client/blob/master/src/test/java/uk/gov/hmcts/reform/finrem/documentgenerator/model/DocumentTest.java | Github Open Source | Open Source | MIT | 2,023 | finrem-document-generator-client | hmcts | Java | Code | 46 | 267 | package uk.gov.hmcts.reform.finrem.documentgenerator.model;
import org.junit.Test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static uk.gov.hmcts.reform.finrem.documentgenerator.TestResource.BINARY_URL;
import static... | 29,855 |
https://github.com/netique/ggplot2/blob/master/R/plot-build.r | Github Open Source | Open Source | MIT | null | ggplot2 | netique | R | Code | 1,981 | 5,723 | #' Build ggplot for rendering.
#'
#' `ggplot_build()` takes the plot object, and performs all steps necessary
#' to produce an object that can be rendered. This function outputs two pieces:
#' a list of data frames (one for each layer), and a panel object, which
#' contain all information about axis limits, breaks etc... | 14,378 |
https://github.com/crs-tools/crs-scripts/blob/master/scripts/script-E-tagging.pl | Github Open Source | Open Source | Apache-2.0 | 2,017 | crs-scripts | crs-tools | Perl | Code | 154 | 537 | #!/usr/bin/perl -W
use CRS::Tracker::Client;
use CRS::Executor;
use boolean;
my $tracker = CRS::Tracker::Client->new();
my $ticket;
if (defined($ENV{'CRS_ROOM'}) && $ENV{'CRS_ROOM'} ne '') {
my $filter = {};
$filter->{'Fahrplan.Room'} = $ENV{'CRS_ROOM'};
$ticket = $tracker->assignNextUnassigne... | 39,591 |
https://github.com/wojnosystems/go-retry/blob/master/retryError/again_test.go | Github Open Source | Open Source | CC-BY-4.0 | null | go-retry | wojnosystems | Go | Code | 91 | 377 | package retryError
import (
"errors"
. "github.com/onsi/gomega"
"testing"
)
var errFake = errors.New("fake")
func TestAgain_Err(t *testing.T) {
g := NewWithT(t)
err := Again(errFake)
g.Expect(err).Should(HaveOccurred())
g.Expect(err.Unwrap()).Should(Equal(errFake))
}
func TestAgain_Error(t *testing.T) {
g :... | 50,276 |
https://github.com/nknr/triviums/blob/master/app/src/test/java/com/app/horizon/main/stage/StageRepositoryTest.java | Github Open Source | Open Source | MIT | 2,021 | triviums | nknr | Java | Code | 7 | 24 | package com.app.horizon.main.stage;
public class StageRepositoryTest {
}
| 5,777 |
https://github.com/quantum5/cava/blob/master/input/fifo.h | Github Open Source | Open Source | MIT | null | cava | quantum5 | C | Code | 17 | 56 | //header files for fifo, part of cava
void* input_fifo(void* data);
int write_to_fftw_input_buffers(int16_t buf[], int16_t frames, void* data);
| 31,832 |
https://github.com/romariogomes/Projeto_de_Software_pt1/blob/master/src/TPIS_Trab1/Domain/Exception/ProductIdAlreadyExistsException.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | Projeto_de_Software_pt1 | romariogomes | Java | Code | 15 | 58 |
package TPIS_Trab1.Domain.Exception;
public class ProductIdAlreadyExistsException extends ProductException {
public ProductIdAlreadyExistsException(String message) {
super(message);
}
}
| 13,855 |
https://github.com/Exef/platform-contracts/blob/master/contracts/test/ICBM/TestICBMTimedStateMachine.sol | Github Open Source | Open Source | MIT | 2,022 | platform-contracts | Exef | Solidity | Code | 124 | 515 | pragma solidity ^0.4.15;
import "../../ICBM/Commitment/ICBMTimedStateMachine.sol";
contract TestICBMTimedStateMachine is
ICBMTimedStateMachine
{
////////////////////////
// Constructor
////////////////////////
constructor(int256 whitelistStart)
ICBMTimedStateMachine(whitelistStart)
... | 34,780 |
https://github.com/bitbegin/source_location/blob/master/examples/CMakeLists.txt | Github Open Source | Open Source | MIT | 2,020 | source_location | bitbegin | CMake | Code | 34 | 242 | cmake_minimum_required(VERSION 3.5)
project(source_location_examples)
set(CMAKE_CXX_STANDARD 11)
set(EXAMPLE_APPLICATION_SOURCES
example_app.cpp
)
add_executable(source_location_example.app ${EXAMPLE_APPLICATION_SOURCES})
if(EXAMPLES_USE_CMAKE_CMAKE_CONFIG)
message("Using exported cmake config.")
find_p... | 13,704 |
https://github.com/ministryofjustice/django-govuk-template/blob/master/govuk_template_base/migrations/0001_initial.py | Github Open Source | Open Source | MIT, LicenseRef-scancode-unknown-license-reference | 2,018 | django-govuk-template | ministryofjustice | Python | Code | 115 | 665 | from django.db import migrations, models
import govuk_template_base.service_settings
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name='Link',
fields=[
('id', models.AutoField(auto_created=Tr... | 12,149 |
https://github.com/blegoh/SkripSweet/blob/master/resources/views/pengajuan/sempro.blade.php | Github Open Source | Open Source | MIT | null | SkripSweet | blegoh | PHP | Code | 128 | 662 | @extends('master')
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="panel panel-default" data-widget='{"draggable": "false"}'>
<div class="panel-editbox" data-widget-controls=""></div>
... | 17,092 |
https://github.com/PhilippauxAdrien/ProjetPOO/blob/master/src/java/servlets/ManageFee.java | Github Open Source | Open Source | MIT | null | ProjetPOO | PhilippauxAdrien | Java | Code | 132 | 650 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package servlets;
import dao.FeeDao;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
i... | 14,757 |
https://github.com/harryEth/magic-js/blob/master/src/types/modules/index.ts | Github Open Source | Open Source | MIT | 2,020 | magic-js | harryEth | TypeScript | Code | 12 | 31 | export * from './auth-types';
export * from './user-types';
export * from './rpc-provider-types';
| 14,609 |
https://github.com/JMazzy/heap-it-up/blob/master/spec/min_heap_spec.rb | Github Open Source | Open Source | MIT | 2,016 | heap-it-up | JMazzy | Ruby | Code | 103 | 381 | require 'min_heap'
describe "MinHeap" do
let(:heap) { MinHeap.new([10,9,8,7,6,5,4,3,2,1,0]) }
describe "#initialize" do
it "puts the lowest value in the root (index 0)" do
expect(heap.item_at_index(0)).to eq(0)
end
end
describe "#add" do
it "adding a lower item changes the root item" do
... | 26,226 |
https://github.com/pulumi/pulumi-awsguard/blob/master/integration-tests/database/index.ts | Github Open Source | Open Source | Apache-2.0 | 2,021 | pulumi-awsguard | pulumi | TypeScript | Code | 341 | 895 | // Copyright 2016-2019, Pulumi Corporation.
//
// 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... | 27,283 |
https://github.com/MarkOates/allegro_flare/blob/master/tests/AllegroFlare/ShaderTest.cpp | Github Open Source | Open Source | MIT | 2,019 | allegro_flare | MarkOates | C++ | Code | 348 | 1,454 |
#include <gtest/gtest.h>
#define ASSERT_THROW_WITH_MESSAGE(code, raised_exception_type, raised_exception_message) \
try { code; FAIL() << "Expected " # raised_exception_type; } \
catch ( raised_exception_type const &err ) { EXPECT_EQ(err.what(), std::string( raised_exception_message )); } \
catch (...) { FA... | 46,821 |
https://github.com/outdoorsy/ember-cli-crowdin/blob/master/blueprints/ember-cli-crowdin/index.js | Github Open Source | Open Source | MIT | 2,017 | ember-cli-crowdin | outdoorsy | JavaScript | Code | 15 | 41 | /*jshint node:true*/
module.exports = {
normalizeEntityName: function() {},
supportsAddon: function() { return true; }
};
| 22,299 |
https://github.com/awakentrue/simple-hackathon-vue/blob/master/src/components/TheSidebar.vue | Github Open Source | Open Source | MIT | 2,022 | simple-hackathon-vue | awakentrue | Vue | Code | 49 | 206 | <template>
<div class="box">
<UiSidebar class="m-2">
<UiSidebarItem to="/" name="Home" icon="home" />
<UiSidebarItem to="/profile" name="Profile" icon="user" />
<UiSidebarItem to="/messages" name="Messages" icon="envelope" />
<UiSidebarItem to="/settings" name="Settings" icon="cogs" />
... | 13,824 |
https://github.com/elf-feb/elf-website-nextjs/blob/master/saga/reducer.ts | Github Open Source | Open Source | MIT | null | elf-website-nextjs | elf-feb | TypeScript | Code | 127 | 404 | import { fromJS } from 'immutable'
import { actionTypes } from './actions'
type Action = {
type: string,
lang: 'en' | 'fr' | 'zh' | 'ja',
light?: boolean,
ts?: number,
data?: Array<any>,
error?: boolean,
}
export const exampleInitialState = {
count: 0,
error: false,
lastUpdate: 0,
light: false,
... | 13,270 |
https://github.com/RatanMasanta/DataStructure-StudyPlan-Leetcode/blob/master/src/com/masanta/ratan/leetcode/study/plan/programming/skills/day/two/ImplementStringOfString.java | Github Open Source | Open Source | MIT | null | DataStructure-StudyPlan-Leetcode | RatanMasanta | Java | Code | 62 | 174 | package com.masanta.ratan.leetcode.study.plan.programming.skills.day.two;
public class ImplementStringOfString {
/*
* Given two strings needle and haystack, return
* the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.
*
*/
public static void main(String[] ar... | 30,094 |
https://github.com/sanmuru/yande.re-Desktop/blob/master/src/Launcher.ctrlib/Data/BindingCodeDom/BindingCodeDomSkipFlowController.cs | Github Open Source | Open Source | MIT | 2,018 | yande.re-Desktop | sanmuru | C# | Code | 41 | 124 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Launcher.Data.BindingCodeDom
{
public class BindingCodeDomSkipFlowController : BindingCodeDomFlowController
{
public virtual int SkipCount { get; set; } = 0;
protected... | 43,761 |
https://github.com/vdedyukhin/rtc-everywhere/blob/master/util/onStreamLoaded/hasValidTrack.js | Github Open Source | Open Source | MIT | 2,018 | rtc-everywhere | vdedyukhin | JavaScript | Code | 28 | 92 | 'use strict';
function isTrackEnabled(type, t){
return t.kind === type && t.enabled &&
!t.muted && t.readyState !== 'ended';
}
function hasValidTrack(stream, type){
return stream.getTracks().some(isTrackEnabled.bind(null, type));
}
module.exports = hasValidTrack;
| 18,899 |
https://github.com/SpacePassport/unity-algorand-sdk/blob/master/Runtime/CareBoo.AlgoSdk/Transaction/TransactionSignature.AlgoApiFormatters.gen.cs | Github Open Source | Open Source | MIT | null | unity-algorand-sdk | SpacePassport | C# | Code | 108 | 364 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//---... | 22,595 |
https://github.com/alfredosc8/dd-trace-java/blob/master/dd-trace/src/main/java/datadog/trace/tracer/sampling/AllSampler.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | dd-trace-java | alfredosc8 | Java | Code | 28 | 76 | package datadog.trace.tracer.sampling;
import datadog.trace.tracer.Trace;
/** Sampler that samples all traces. */
public class AllSampler implements Sampler {
@Override
public boolean sample(final Trace trace) {
return true;
}
}
| 37,633 |
https://github.com/19coders/EnvatoMarket-PHP-Client/blob/master/src/API/Forum.php | Github Open Source | Open Source | MIT | 2,017 | EnvatoMarket-PHP-Client | 19coders | PHP | Code | 109 | 337 | <?php
declare(strict_types=1);
/*
* This file is part of Envato Market PHP Client.
*
* (c) Brian Faust <hello@brianfaust.me>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BrianFaust\EnvatoMarket\API;
use BrianFaust\... | 6,053 |
https://github.com/eecelik/esem/blob/master/Esem/UI/Views/Product/urunEkle.cshtml | Github Open Source | Open Source | MIT | 2,018 | esem | eecelik | HTML+Razor | Code | 260 | 937 | @model Entities.Product
@{
ViewBag.Title = "urunEkle";
}
<h2>urunEkle</h2>
@using (Html.BeginForm("urunEkle", "Product", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.AntiForgeryToken()
<div class="form-horizontal">
<h4>Product</h4>
<hr />
@Html.Validati... | 29,624 |
https://github.com/FrancisBehnen/cloudburst/blob/master/tests/shared/test_serializer.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | cloudburst | FrancisBehnen | Python | Code | 292 | 861 | # Copyright 2019 U.C. Berkeley RISE Lab
#
# 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... | 1,223 |
https://github.com/khiem2/quanlyhocsinh/blob/master/cms_form/Web_CMS/Formosa/Client/Modules/Panel/BlockSearch.ascx.cs | Github Open Source | Open Source | MIT | null | quanlyhocsinh | khiem2 | C# | Code | 220 | 688 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Fomusa.Client.Modules.Panel
{
public partial class BlockSearch : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
... | 29,193 |
https://github.com/rakesh-kumar/cbra-web/blob/master/frontend/config/routes.rb | Github Open Source | Open Source | MIT | 2,019 | cbra-web | rakesh-kumar | Ruby | Code | 7 | 25 | Frontend::Engine.routes.draw do
resources :posts
resources :products
end
| 26,015 |
https://github.com/PearsonDevelopersNetwork/LearningStudio-HelloWorld-Ruby/blob/master/helloworld/Gemfile | Github Open Source | Open Source | Apache-2.0 | 2,014 | LearningStudio-HelloWorld-Ruby | PearsonDevelopersNetwork | Ruby | Code | 29 | 111 | source 'https://rubygems.org'
gem 'sinatra', '~> 1.4.5'
gem 'sinatra-contrib'
gem 'httpclient', '~> 2.4'
gem 'unicorn'
gem "rake", "~> 10.3", ">=10.3.1"
gem "rake-compiler"
group :test do
gem "minitest-reporters"
gem "simplecov"
end
| 1,682 |
https://github.com/lorcQc/Orc.EFCore.VB.Sample/blob/master/Modeling/FluentAPI/AlternateKeyComposite.vb | Github Open Source | Open Source | MIT | null | Orc.EFCore.VB.Sample | lorcQc | Visual Basic | Code | 69 | 174 | Imports Microsoft.EntityFrameworkCore
Namespace AlternateKeyComposite
Friend Class MyContext
Inherits DbContext
Public Property Cars As DbSet(Of Car)
#Region "AlternateKeyComposite"
Protected Overrides Sub OnModelCreating(modelBuilder As ModelBuilder)
modelBuilder.
... | 32,913 |
https://github.com/17630929962/ModelYouthCrmAngular/blob/master/src/style-icons-auto.ts | Github Open Source | Open Source | MIT | 2,019 | ModelYouthCrmAngular | 17630929962 | TypeScript | Code | 124 | 759 | /*
* Automatically generated by 'ng g ng-alain:plugin icon'
* @see https://ng-alain.com/cli/plugin#icon
*/
import {
AlipayCircleOutline,
ApiOutline,
AppstoreOutline,
ArrowDownOutline,
BookOutline,
CloudOutline,
CopyrightOutline,
CustomerServiceOutline,
DashboardOutline,
Database... | 11,878 |
https://github.com/Superjaviergf/dp1-2020-g3-02/blob/master/src/main/java/org/springframework/samples/petclinic/service/EquipoService.java | Github Open Source | Open Source | Apache-2.0 | null | dp1-2020-g3-02 | Superjaviergf | Java | Code | 62 | 269 | package org.springframework.samples.petclinic.service;
import java.util.List;
import org.springframework.samples.petclinic.model.Capitan;
import org.springframework.samples.petclinic.model.Equipo;
import org.springframework.samples.petclinic.model.Jugador;
import org.springframework.samples.petclinic.service.base.Bas... | 15,789 |
https://github.com/Zequez/ggfilter-client/blob/master/src/FilterApp/filter/stateTypes.ts | Github Open Source | Open Source | MIT | null | ggfilter-client | Zequez | TypeScript | Code | 111 | 289 | import definitions, { FiltersNames } from '../../Definitions';
import { AnyQuery } from '../../Api';
export interface FilterConfig {
query: AnyQuery | null;
hl: boolean;
column: boolean;
sort: boolean | null;
}
export interface PartialFilterConfig {
query?: {} | null;
hl?: boolean;
column?: boolean;
s... | 2,765 |
https://github.com/tqcenglish/Portfolio/blob/master/.gitignore | Github Open Source | Open Source | MIT | 2,017 | Portfolio | tqcenglish | Ignore List | Code | 40 | 139 | node_modules*
bower_components
# runing files
.tmp
# webstorm files
.idea
ZycooCallCenter.iml
# ignore eclipse files
.project
.classpath
.settings
.metadata
# npm
npm-debug.log
# log
logs/*
#env
config/local.js
#debug log
*.log
#deploy
deploy
deploy.zip
#vscode
.vscode
jsconfig.json
# ui test
ui_test/**/*.pn... | 50,230 |
https://github.com/tylerben/streamster/blob/master/packages/usgs/src/lib/formatTimeSeries/formatTimeSeries.ts | Github Open Source | Open Source | MIT | 2,021 | streamster | tylerben | TypeScript | Code | 112 | 257 | /**
* Restructures the data into an array of objects aka a time series
* @param {any} data data to restructure
* @returns {array}
*/
export default (data: any) => {
const { timeSeries } = data.value;
const series = timeSeries.map((series: any) => {
const { sourceInfo, variable, values } = series;
const ... | 42,798 |
https://github.com/fkromer/strictdoc/blob/master/strictdoc/backend/reqif/stage2/fm_studio/parser.py | Github Open Source | Open Source | Apache-2.0 | 2,022 | strictdoc | fkromer | Python | Code | 407 | 1,774 | from reqif.reqif_bundle import ReqIFBundle
from strictdoc.backend.sdoc.models.document import Document
from strictdoc.backend.sdoc.models.requirement import Requirement
from strictdoc.backend.sdoc.models.section import FreeText, Section
from strictdoc.helpers.html import prettify_html_fragment
from strictdoc.backend.r... | 16,685 |
https://github.com/relo-san/dinDoctrineModulePlugin/blob/master/data/generator/sfDoctrineModule/admin/parts/deleteAction.php | Github Open Source | Open Source | MIT | 2,010 | dinDoctrineModulePlugin | relo-san | PHP | Code | 43 | 168 |
public function executeDelete( sfWebRequest $request )
{
$request->checkCSRFProtection();
$this->dispatcher->notify( new sfEvent( $this, 'admin.delete_object', array( 'object' => $this->getRoute()->getObject() ) ) );
if ( $this->getRoute()->getObject()->delete() )
{
... | 27,693 |
https://github.com/umm/active_timeline/blob/master/Assets/Scripts/Playables/ActiveClipBase.cs | Github Open Source | Open Source | MIT | 2,020 | active_timeline | umm | C# | Code | 97 | 296 | using System.Text.RegularExpressions;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
namespace ActiveTimeline.Playables
{
public abstract class ActiveClipBase<T> : PlayableAsset, ITimelineClipAsset, ILabelProvider, ITrackHolder
where T : ActiveBehaviourBase, new()
{
... | 37,665 |
https://github.com/1pkg/gofire/blob/master/generators/reftype/tcases/echo_complex_params/main.go | Github Open Source | Open Source | MIT | 2,022 | gofire | 1pkg | Go | Code | 26 | 79 | //go:build tcases
package main
import (
"context"
"fmt"
)
func echo(_ context.Context, a *[]int, b *[][]int, c map[string][]string) int {
fmt.Println(*a, *b, c)
return 0
}
| 8,733 |
https://github.com/haugenmitch/adventofcode2019/blob/master/day09/part1/os.py | Github Open Source | Open Source | MIT | null | adventofcode2019 | haugenmitch | Python | Code | 23 | 70 | import sys
from computer import Computer
with open(sys.argv[1]) as f:
program = [int(n) for n in f.read().strip().split(',')]
c = Computer(program, [2])
c.run()
print(c.output())
| 45,617 |
https://github.com/RaphAbb/TradingBot/blob/master/main.py | Github Open Source | Open Source | MIT | null | TradingBot | RaphAbb | Python | Code | 689 | 2,247 | from alpha_vantage.timeseries import TimeSeries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from pandas.plotting import register_matplotlib_converters
from my_utils import get_sharpe, get_calmar
class crossval:
def __init__(self, data, agent, test_split_dates):
... | 43,719 |
https://github.com/hysmichael/MHKit/blob/master/MHKitExample/Pods/Headers/Public/MHKit/MHView.h | Github Open Source | Open Source | MIT | null | MHKit | hysmichael | C | Code | 59 | 190 | //
// MHView.h
// MHKit
//
// Created by Michael Hong on 3/3/15.
// Copyright (c) 2015 Michael Hong. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MHViewLayoutManager.h"
@interface MHView : UIView
- (void) initialize;
- (void) addSubviews:(NSArray *)views;
@property (nonatomic, copy) void(^draw_block... | 30,887 |
https://github.com/yii2-tools/yii2-community-cms/blob/master/default_site/modules/site/modules/design/modules/packs/source/default/templates/forum/topic/_pagination.twig | Github Open Source | Open Source | MIT | null | yii2-community-cms | yii2-tools | Twig | Code | 43 | 157 |
{%- if topic.postsCount > topic.postsPerPage -%}
({%- for page in 1..topic.lastPage -%}
{{- a(page, {
0: route('SITE_FORUM_TOPICS_SHOW'),
'section': topic.subforum.section.slug,
'subforum': topic.subforum.slug,
'topic': topic.slug,
'page': page,
... | 47,504 |
https://github.com/XrosLiang/ultraopt/blob/master/experiments/tabular_benchmarks/plot.py | Github Open Source | Open Source | BSD-3-Clause | 2,021 | ultraopt | XrosLiang | Python | Code | 168 | 692 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : qichun tang
# @Contact : tqichun@gmail.com
import json
from pathlib import Path
import pandas as pd
import pylab as plt
info = {
"tpe": ("HyperOpt-TPE", "r",),
"ultraopt_ETPE": ("UltraOpt-ETPE", "g",),
"ultraopt_Random": ("Random", "b",),
}
plt... | 30,260 |
https://github.com/chuchienshu/ml-algs/blob/master/k-means/k-means.py | Github Open Source | Open Source | MIT | 2,020 | ml-algs | chuchienshu | Python | Code | 371 | 1,127 | # Function: K Means
# author chuchienshu
# date 19/4/3
import numpy as np
import matplotlib.pyplot as plt
import random
MAX_ITERATIONS = 100
def getRandomCentroids(x, y , k):
assert k > 0
seeds = {}
for indx in range(k):
# seed_x = random.sample(list(x), 1)
# seed_y = random.sample(list(y... | 3,275 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.