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/ryanhun7er/noteTaker/blob/master/server.js | Github Open Source | Open Source | MIT | 2,020 | noteTaker | ryanhun7er | JavaScript | Code | 210 | 630 | const express = require("express");
const path = require("path");
const fs = require("fs");
const util = require("util");
const uuid = require("uuid/v4");
const writeFileAsync = util.promisify(fs.writeFile);
// Tells node that we are creating an "express" server
const app = express();
// Sets an initial port
const... | 13,980 |
https://github.com/dreedyman/Rio/blob/master/rio-platform/src/main/java/edu/emory/mathcs/util/classloader/URIClassLoader.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | Rio | dreedyman | Java | Code | 1,738 | 3,840 | /*
* Copyright to the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | 3,055 |
https://github.com/wdg/GlobalChat/blob/master/GlobalChat/Cores/make.php | Github Open Source | Open Source | MIT | null | GlobalChat | wdg | PHP | Code | 81 | 268 | <?php
function generateRandomString($length = 65) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-+()~><';
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, strlen($characters) - 1)];
}
return $randomString;
}
for ( ... | 42,268 |
https://github.com/msimacek/PA165-LibraryManager/blob/master/service/src/main/java/cz/muni/fi/pa165/service/BookService.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | PA165-LibraryManager | msimacek | Java | Code | 180 | 388 | package cz.muni.fi.pa165.service;
import java.util.List;
import cz.muni.fi.pa165.entity.Book;
import cz.muni.fi.pa165.enums.BookState;
/**
* Service layer for Book entity
*
* @author Michael Simacek
*
*/
public interface BookService {
/**
* Persists book into database
*
* @param book
* ... | 12,934 |
https://github.com/SatyamRai1/javamasterclassprograms/blob/master/objectOrientedProgramming/constructors/Complex_addsub/ComplexNumber.java | Github Open Source | Open Source | MIT | null | javamasterclassprograms | SatyamRai1 | Java | Code | 61 | 224 | public class ComplexNumber {
private double real;
private double imaginary;
public ComplexNumber(double real, double imaginary){
this.real=real;
this.imaginary=imaginary;
}
public double getReal(){
return this.real;
}
public double getImaginary(){
return th... | 44,145 |
https://github.com/purple-technology/phoenix-components/blob/master/src/components/common/Button/index.tsx | Github Open Source | Open Source | MIT | 2,021 | phoenix-components | purple-technology | TypeScript | Code | 171 | 447 | import React from 'react'
import { ButtonColorTheme } from '../../../types/ColorTheme'
import { ComponentSize } from '../../../types/ComponentSize'
import { IconAlignment } from '../../../types/IconAlignment'
import { IconType } from '../../../types/IconType'
import { Spinner } from '../../Spinner'
import { MarginProp... | 7,897 |
https://github.com/EL-BID/Nexso/blob/master/VS2013_PROJECT/NZPortalWeb/DesktopModules/Nexso/NZGenWrapper/NZGenWrapper.ascx.cs | Github Open Source | Open Source | MIT | 2,021 | Nexso | EL-BID | C# | Code | 569 | 2,097 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Localization;
using DotNetNuke.Entities.Modules.Actions;
using DotNetNuke.Security;
using NexsoProDAL;
using NexsoProBLL... | 25,774 |
https://github.com/cruzdanilo/decentraland/blob/master/unity-client/Assets/Scripts/MainScripts/DCL/Environment/PlatformContextFactory.cs | Github Open Source | Open Source | Apache-2.0 | null | decentraland | cruzdanilo | C# | Code | 37 | 122 | using DCL.Rendering;
namespace DCL
{
public static class PlatformContextFactory
{
public static PlatformContext CreateDefault()
{
return new PlatformContext(
memoryManager: new MemoryManager(),
cullingController: CullingController.Create(),
... | 19,402 |
https://github.com/nicoandmee/de4js/blob/master/_sass/magic-check/sass/_radio.scss | Github Open Source | Open Source | MIT | 2,020 | de4js | nicoandmee | SCSS | Code | 54 | 194 | .magic-radio + label {
&:before {
border-radius: 50%;
}
&:after {
top: 7px;
left: 7px;
width: $magic-dot-size;
height: $magic-dot-size;
border-radius: 50%;
background: $magic-main-color;
}
}
.magic-radio:checked + label {
&:before {
border: 1px solid $magic-main-color;
}
}
.... | 50,850 |
https://github.com/jsvitak/jbpm-6-examples/blob/master/rewards-basic/src/main/java/org/jbpm/examples/util/StartupBean.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | jbpm-6-examples | jsvitak | Java | Code | 153 | 452 | /**
* Copyright 2015, Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... | 55,197 |
https://github.com/gz-ezg/ezg-pc-cloud/blob/master/build/webpack.dev.conf.js | Github Open Source | Open Source | MIT | 2,021 | ezg-pc-cloud | gz-ezg | JavaScript | Code | 119 | 447 | const merge = require('webpack-merge');
const path = require('path');
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');
const baseConfig = require('./webpack.base.conf');
const config = require('../config/config')
console.log(process.argv[6].split("=")[1])
const env = process.argv[6].split("=")[... | 26,995 |
https://github.com/MagicNow/Magic_BildSys/blob/master/app/Repositories/WorkflowAprovacaoRepository.php | Github Open Source | Open Source | MIT | null | Magic_BildSys | MagicNow | PHP | Code | 2,095 | 9,276 | <?php
namespace App\Repositories;
use App\Models\User;
use App\Models\WorkflowAlcada;
use App\Models\WorkflowAprovacao;
use App\Models\WorkflowUsuario;
use App\Notifications\WorkflowNotificationAprovado;
use Illuminate\Support\Facades\DB;
use phpDocumentor\Reflection\Types\Array_;
use phpDocumentor\Reflection\Types\I... | 4,951 |
https://github.com/stefaniexin/incubator-iotdb/blob/master/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/NativeRestorableIOWriter.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | incubator-iotdb | stefaniexin | Java | Code | 369 | 927 | /**
* 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... | 39,590 |
https://github.com/gaganlokesh/CatchUp/blob/master/libraries/gemoji/build.gradle.kts | Github Open Source | Open Source | Apache-2.0 | 2,021 | CatchUp | gaganlokesh | Kotlin | Code | 131 | 402 | /*
* Copyright (c) 2018 Zac Sweers
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to... | 33,386 |
https://github.com/3mdeb/talos-hostboot/blob/master/src/usr/isteps/tod/TodTrace.H | Github Open Source | Open Source | Apache-2.0 | 2,018 | talos-hostboot | 3mdeb | C++ | Code | 235 | 772 | /* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
/* $Source: src/usr/isteps/tod/TodTrace.H $ */
/* ... | 43,388 |
https://github.com/kotlin-playground/kotlin/blob/master/compiler/testData/codegen/boxWithStdlib/reflection/annotations/retentions.kt | Github Open Source | Open Source | Apache-2.0 | null | kotlin | kotlin-playground | Kotlin | Code | 29 | 132 | import kotlin.test.assertEquals
@Retention(AnnotationRetention.SOURCE)
annotation class SourceAnno
@Retention(AnnotationRetention.BINARY)
annotation class BinaryAnno
@Retention(AnnotationRetention.RUNTIME)
annotation class RuntimeAnno
@SourceAnno
@BinaryAnno
@RuntimeAnno
fun box(): String {
assertEquals(listOf(... | 38,426 |
https://github.com/InsightSoftwareConsortium/LesionSizingToolkit/blob/master/include/itkFastMarchingAndShapeDetectionLevelSetSegmentationModule.hxx | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-warranty-disclaimer | 2,022 | LesionSizingToolkit | InsightSoftwareConsortium | C++ | Code | 207 | 958 | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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.o... | 18,107 |
https://github.com/lyraproj/aws-example/blob/master/cmd/goplugin-aws/resource/instance.go | Github Open Source | Open Source | Apache-2.0 | 2,019 | aws-example | lyraproj | Go | Code | 1,923 | 7,082 | package resource
import (
"encoding/base64"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/davecgh/go-spew/spew"
hclog "github.com/hashicorp/go-hclog"
)
//InstanceHandler creates, reads and deletes the Instance Resource
type InstanceHandler struct{}
// Create Instanc... | 7,900 |
https://github.com/Overcrash86/XiaomiTokenFinder/blob/master/pom.xml | Github Open Source | Open Source | MIT | 2,021 | XiaomiTokenFinder | Overcrash86 | null | Spoken | 50 | 562 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>XiaomiTokenFinder</groupId>
<artifactId>XiaomiTokenFinder</artif... | 21,361 |
https://github.com/facebook/hhvm/blob/master/hphp/hack/src/typing/write_symbol_info/symbol_gencode.ml | Github Open Source | Open Source | PHP-3.01, Zend-2.0, MIT | 2,023 | hhvm | facebook | OCaml | Code | 265 | 640 | (*
* Copyright (c) Meta, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the "hack" directory of this source tree.
*
*)
open Hh_prelude
type t = {
mutable is_generated: bool;
mutable fully_generated: bool;
mutable source: string option;
mutab... | 50,465 |
https://github.com/trinhhungfischer/NMCNPM.KSTN.20211-Nhom5/blob/master/src/views/HoKhauManagerFrame/ChangeListPeopleJframe.java | Github Open Source | Open Source | MIT | 2,022 | NMCNPM.KSTN.20211-Nhom5 | trinhhungfischer | Java | Code | 465 | 2,633 | /*
* 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 views.HoKhauManagerFrame;
import Bean.MemOfFamily;
import controllers.HoKhauManagerController.ChangeListPeopleController;
impo... | 16,184 |
https://github.com/yeslogic/allsorts/blob/master/tests/shape.rs | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,023 | allsorts | yeslogic | Rust | Code | 128 | 486 | use allsorts::error::ParseError;
use allsorts::gsub::{GlyphOrigin, RawGlyph};
use allsorts::tables::cmap::CmapSubtable;
use tinyvec::tiny_vec;
// Variant of `bin/shape::map_glyph`
pub fn map_glyph(
cmap_subtable: &CmapSubtable,
ch: char,
) -> Result<Option<RawGlyph<()>>, ParseError> {
// If the ZWNJ glyph... | 56,303 |
https://github.com/oradrs/tpt-oracle/blob/master/ast/02_join_nested_loops.sql | Github Open Source | Open Source | Apache-2.0 | 2,023 | tpt-oracle | oradrs | SQL | Code | 174 | 603 | -- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
set echo on
select
t.owner, t.created, i.last_ddl_time
from
test_objects t
, indexed_objects i
where
t.object_id = i.obj... | 53,204 |
https://github.com/Connor3001/origins-fabric/blob/master/src/main/java/io/github/apace100/origins/entity/EnderianPearlEntity.java | Github Open Source | Open Source | MIT | 2,022 | origins-fabric | Connor3001 | Java | Code | 212 | 864 | package io.github.apace100.origins.entity;
import io.github.apace100.origins.registry.ModEntities;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.play... | 55,902 |
https://github.com/onego/php-sdk/blob/master/src/OneGoSDK/JSON.php | Github Open Source | Open Source | MIT, Unlicense | null | php-sdk | onego | PHP | Code | 48 | 170 | <?php
final class OneGoSDK_JSON
{
public static function encode($data)
{
if (function_exists('json_encode')) {
return json_encode($data);
} else {
$json = new Services_JSON(SERVICES_JSON_IN_OBJ);
return $json->encode($data);
}
}
public sta... | 19,481 |
https://github.com/bmwcarit/joynr/blob/master/cpp/tests/systemintegration-tests/AwaitGlobalRegistrationTest.cpp | Github Open Source | Open Source | Apache-2.0 | 2,023 | joynr | bmwcarit | C++ | Code | 216 | 692 | /*
* #%L
* %%
* Copyright (C) 2018 BMW Car IT GmbH
* %%
* 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 app... | 17,634 |
https://github.com/CrisisCleanup/crisiscleanup-3-awsconnect/blob/master/src/__tests__/main.tests.js | Github Open Source | Open Source | Apache-2.0 | 2,021 | crisiscleanup-3-awsconnect | CrisisCleanup | JavaScript | Code | 1,326 | 5,017 | /**
* main.tests.js
* Main Tests
*/
import { Agent, Outbound, Metrics, Client } from '../api';
import { Dynamo } from '../utils';
import Handler, { agentStreamHandler, clientStreamHandler } from '../index';
import { advanceTo, clear } from 'jest-date-mock';
import { send } from '../ws/socket';
jest.mock('../ws');
... | 44,062 |
https://github.com/Rune-Status/Sickday-rune.rb/blob/master/app/network/isaac.rb | Github Open Source | Open Source | BSD-3-Clause | 2,020 | Sickday-rune.rb | Rune-Status | Ruby | Code | 1,129 | 2,182 | module RuneRb::Network
# An implementation of an ISAAC cipher used to generate random numbers for message interchange.
class ISAAC
using RuneRb::System::Patches::IntegerRefinements
# Called when a new ISAAC Cipher is created.
def initialize(seed)
@aa = 0
@bb = 0
@cc = 0
@mm = []... | 41,313 |
https://github.com/yamaha5/fawikipedia/blob/master/wikifyer-cmd.py | Github Open Source | Open Source | MIT | null | fawikipedia | yamaha5 | Python | Code | 1,218 | 6,488 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# # Reza (User:yamaha5) , 2013
#
# Distributed under the terms of the CC-BY-SA 3.0 .
# -*- coding: utf-8 -*-
import wikipedia,pagegenerators,re,pywikibot,query,json
import fa_cosmetic_changes,sys,codecs,string,login,time
wikipedia.config.put_throttle = 0
wikipedia.put... | 22,238 |
https://github.com/aozero/ozero-reflex/blob/master/app/src/main/java/com/example/ozero_reflex/ReactionTestActivity.java | Github Open Source | Open Source | Apache-2.0 | null | ozero-reflex | aozero | Java | Code | 356 | 967 | /*
Copyright 2015 Alexander Ozero
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 agr... | 21,478 |
https://github.com/mvashishth/Tutorials/blob/master/bokeh/node_modules/underscore.template/lib/index.js | Github Open Source | Open Source | MIT | 2,020 | Tutorials | mvashishth | JavaScript | Code | 73 | 163 | 'use strict';
var _ = require('./underscore.template');
var UnderscoreTemplate = _.template;
function Template(text, data, settings) {
return UnderscoreTemplate(text, data, settings);
}
Template._ = _;
module.exports = Template;
// If we're in the browser,
// define it if we're using AMD, otherwise leak a global.... | 26,934 |
https://github.com/mswjs/msw/blob/master/test/browser/graphql-api/response-patching.mocks.ts | Github Open Source | Open Source | MIT | 2,023 | msw | mswjs | TypeScript | Code | 113 | 305 | import { setupWorker, graphql } from 'msw'
// import { createGraphQLClient, gql } from '../../support/graphql'
interface GetUserQuery {
user: {
firstName: string
lastName: string
}
}
const worker = setupWorker(
graphql.query<GetUserQuery>('GetUser', async (req, res, ctx) => {
const originalResponse ... | 2,396 |
https://github.com/accessible-react/arc-dropdown/blob/master/playground/examples/example3.js | Github Open Source | Open Source | MIT | 2,017 | arc-dropdown | accessible-react | JavaScript | Code | 117 | 401 | import Dropdown, {DropdownItem} from '../../dist';
import React from 'react';
const options = [{
label : <span>
<b> <span className='glyphicon glyphicon-play-circle'></span> Option One </b>
</span>,
text : `Option One`,
},{
label : <span>
<b> <span className='glyphicon glyphicon-file'></span> Option ... | 2,612 |
https://github.com/AskNature/AN-React/blob/master/client/scripts/components/admin/researcher.js | Github Open Source | Open Source | MIT | 2,019 | AN-React | AskNature | JavaScript | Code | 66 | 290 | 'use strict';
var List = {
'plural_name' : 'R&D Teams',
'singular_name' : 'R&D Team',
'slug': 'researcher',
'columns' : [
{columnName:'masterid', displayName:'id', type:'id'},
{columnName:'name', displayName:'Name', type:'link'},
{columnName:'institution', displayName:'Institution', t... | 22,058 |
https://github.com/nondanee/Jike-Patcher/blob/master/smali/cn/jiguang/verifysdk/b/a.smali | Github Open Source | Open Source | MIT | 2,020 | Jike-Patcher | nondanee | Smali | Code | 206 | 1,212 | .class public Lcn/jiguang/verifysdk/b/a;
.super Ljava/lang/Object;
# static fields
.field private static a:Ljava/lang/String; = null
.field private static b:Z = false
# direct methods
.method static constructor <clinit>()V
.locals 0
return-void
.end method
.method public static a()Ljava/lang/String;
... | 55,937 |
https://github.com/bkort/zindagi/blob/master/src/Zindagi.SeedWork/Entities/AggregateBase.cs | Github Open Source | Open Source | MIT | 2,021 | zindagi | bkort | C# | Code | 13 | 30 | namespace Zindagi.SeedWork
{
public abstract class AggregateBase : Entity, IAggregateRoot { }
} | 35,381 |
https://github.com/NVIDIA/aistore/blob/master/fs/walk_test.go | Github Open Source | Open Source | MIT | 2,023 | aistore | NVIDIA | Go | Code | 506 | 2,047 | // Package fs provides mountpath and FQN abstractions and methods to resolve/map stored content
/*
* Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
*/
package fs_test
import (
"math/rand"
"os"
"path/filepath"
"reflect"
"sort"
"testing"
"github.com/NVIDIA/aistore/api/apc"
"github.com/NVIDI... | 39,828 |
https://github.com/Kijacode/mobile/blob/master/lib/widgets/button_widget.dart | Github Open Source | Open Source | Apache-2.0 | 2,021 | mobile | Kijacode | Dart | Code | 81 | 324 | import 'package:mobile/utils/index.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ResponsiveButton extends StatefulWidget {
final String title;
final IconData iconData;
final Color textColor;
final GestureTapCallback tapCallback;
const ResponsiveButton(String s... | 44,244 |
https://github.com/gboubaker/php-schema.org-mapping/blob/master/tests/Classes/PhysicalTherapyTest.php | Github Open Source | Open Source | MIT | 2,016 | php-schema.org-mapping | gboubaker | PHP | Code | 205 | 990 | <?php
/**
* Author: Nil Portugués Calderó <contact@nilportugues.com>
* Date: 12/18/15
* Time: 11:36 PM.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NilPortugues\Tests\SchemaOrg\Classes;
use NilPortugues\SchemaOrg\Cl... | 4,800 |
https://github.com/tapansriv/penelope2021/blob/master/script/scaling_test/updateNumNodes.sh | Github Open Source | Open Source | Apache-2.0 | 2,021 | penelope2021 | tapansriv | Shell | Code | 19 | 144 | hostArray=($(grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' ~/penelope/script/hostnames_raw.txt))
num=$1
python3 scalingHostFile.py $num
for hostname in "${hostArray[@]}"
do
scp ~/penelope/script/hostnames_scaling.txt $hostname:/home/cc/penelope/script &
done
wait
| 12,227 |
https://github.com/fallahn/osgc/blob/master/space_racers/include/MapParser.hpp | Github Open Source | Open Source | Zlib | 2,021 | osgc | fallahn | C++ | Code | 270 | 943 | /*********************************************************************
Copyright 2019 Matt Marchant
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/L... | 48,995 |
https://github.com/tomvothecoder/pcmdi_metrics/blob/master/pcmdi_metrics/devel/example_dev/lib/file1.py | Github Open Source | Open Source | BSD-3-Clause | 2,022 | pcmdi_metrics | tomvothecoder | Python | Code | 11 | 29 | def example(a, b):
print("Adding", a, "to", b)
return a + b
| 34,040 |
https://github.com/cottalucas/iOS/blob/master/alienAdventure/Alien Adventure/LeastValuableItem.swift | Github Open Source | Open Source | MIT | 2,017 | iOS | cottalucas | Swift | Code | 86 | 219 | //
// LeastValuableItem.swift
// Alien Adventure
//
// Created by Jarrod Parkes on 9/30/15.
// Changed by Lucas Cotta on 3/9/17.
// Copyright © 2015 Udacity. All rights reserved.
//
extension Hero {
func leastValuableItem(inventory: [UDItem]) -> UDItem? {
var leastValuableArray = [Int]()
... | 29,580 |
https://github.com/esnya/nekotaku2/blob/master/packages/core/types/Message.ts | Github Open Source | Open Source | MIT | 2,019 | nekotaku2 | esnya | TypeScript | Code | 55 | 149 | import DiceResult from './DiceResult';
import Game from './Game';
import ChatName from './ChatName';
interface MessageNodeBase<T extends string> {
type: T;
text: string;
}
export type MessageTextNode = MessageNodeBase<'text'>;
export interface MessageDiceResultNode extends MessageNodeBase<'dice_result'> {
game... | 16,654 |
https://github.com/joo-yongjae/frontend16/blob/master/node_modules/qlobber/bench/options/check-mapval.js | Github Open Source | Open Source | MIT | 2,022 | frontend16 | joo-yongjae | JavaScript | Code | 12 | 41 | /*jslint node: true */
module.exports = {
Matcher: require('./_mapval').MapValQlobber,
check: true
};
| 35,805 |
https://github.com/lhiny/pomodoro/blob/master/src/digit.h | Github Open Source | Open Source | MIT | null | pomodoro | lhiny | C | Code | 33 | 89 | #pragma once
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define DIGIT_HEIGHT 5
#define DIGIT_WIDTH 6
// Get a specific digit's representation
int get_digit_text(int digit, char* out);
// Read all digits into array
int init_digits(); | 34,187 |
https://github.com/intel/llvm/blob/master/clang/lib/CodeGen/CGSYCLRuntime.h | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, NCSA, LLVM-exception, Apache-2.0 | 2,023 | llvm | intel | C++ | Code | 204 | 592 | //===----- CGSYCLRuntime.h - Interface to SYCL Runtimes ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | 41,812 |
https://github.com/isabella232/msgraph-beta-sdk-java/blob/master/src/main/java/com/microsoft/graph/requests/extensions/EducationSynchronizationProfileRequestBuilder.java | Github Open Source | Open Source | MIT | null | msgraph-beta-sdk-java | isabella232 | Java | Code | 313 | 1,187 | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
pa... | 6,128 |
https://github.com/gpp8p/jwt_dev/blob/master/app/CardInstances.php | Github Open Source | Open Source | MIT | null | jwt_dev | gpp8p | PHP | Code | 185 | 787 | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use App\ViewType;
class CardInstances extends Model
{
public function viewType()
{
return $this->belongsTo('App\ViewType');
}
public function params()
{
return $this->hasMany(InstanceP... | 16,080 |
https://github.com/Suzukaze1/mirai-api-tugas-akhir/blob/master/app/Models/V1/Poli.php | Github Open Source | Open Source | MIT | null | mirai-api-tugas-akhir | Suzukaze1 | PHP | Code | 54 | 185 | <?php
namespace App\Models\V1;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Poli extends Model
{
use HasFactory;
protected $table = 'mirai_pasien.dm_poli';
protected $primaryKey = 'id';
/**
* The attributes that are mass assignable.
... | 12,638 |
https://github.com/apache/netbeans/blob/master/java/maven.grammar/nbproject/org-netbeans-modules-maven-grammar.sig | Github Open Source | Open Source | Apache-2.0 | 2,023 | netbeans | apache | null | Spoken | 1,404 | 5,980 | #Signature file v4.1
#Version 1.67.0
CLSS public java.lang.Object
cons public init()
meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
meth protected void finalize() throws java.lang.Throwable
meth public boolean equals(java.lang.Object)
meth public final java.lang.Class<?> getClass()... | 56,286 |
https://github.com/Youngemmy5956/cryptos/blob/master/database/seeders/PermissionTableSeeder.php | Github Open Source | Open Source | MIT | null | cryptos | Youngemmy5956 | PHP | Code | 331 | 1,254 | <?php
namespace Database\Seeders;
use App\Services\Auth\AuthorizationService;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Permission;
class PermissionTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data =... | 2,972 |
https://github.com/PacktPublishing/Hands-On-Microservices-with-CSharp/blob/master/MicroServiceEcoSystem/AdvancedFileMonitoringMicroservice/Program.cs | Github Open Source | Open Source | MIT | 2,023 | Hands-On-Microservices-with-CSharp | PacktPublishing | C# | Code | 43 | 134 | namespace AdvancedFileMonitoringMicroservice
{
using Grumpy.ServiceBase;
/// <summary> A program. </summary>
class Program
{
////////////////////////////////////////////////////////////////////////////////////////////////////
/// <summary> Main entry-point for this application. </s... | 17,964 |
https://github.com/adbre/cab42/blob/master/CAB42/CAB42/Windows.Forms/BuildForm.Designer.cs | Github Open Source | Open Source | Apache-2.0 | 2,012 | cab42 | adbre | C# | Code | 543 | 2,492 | namespace C42A.CAB42.Windows.Forms
{
partial class BuildForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
... | 37,327 |
https://github.com/dfdf0202/Uniz-Service/blob/master/src/main/java/com/uniz/service/UnizService.java | Github Open Source | Open Source | MIT | 2,021 | Uniz-Service | dfdf0202 | Java | Code | 53 | 219 | package com.uniz.service;
import java.util.List;
import com.uniz.domain.MyUnizPoint;
import com.uniz.domain.UnizVO;
public interface UnizService {
public boolean registerNoseq(UnizVO uniz);
public boolean registerSelectKey(UnizVO uniz);
public UnizVO get(Long unizSN);
public UnizVO findByKeywordForUserUnizIn... | 55,014 |
https://github.com/American/springboot3/blob/master/src/main/java/com/lsh/enums/UserSexEnum.java | Github Open Source | Open Source | Apache-2.0 | null | springboot3 | American | Java | Code | 17 | 44 | package com.lsh.enums;
/**
* Created by houbank on 2018/3/27.
*/
public enum UserSexEnum {
MAN, WOMAN
}
| 6,092 |
https://github.com/camaech/flambe/blob/master/src/flambe/platform/ComponentBuilder.hx | Github Open Source | Open Source | BSD-2-Clause | 2,012 | flambe | camaech | Haxe | Code | 395 | 1,137 | //
// Flambe - Rapid game development
// https://github.com/aduros/flambe/blob/master/LICENSE.txt
package flambe.platform;
#if macro
import haxe.macro.Expr;
import haxe.macro.Context;
import haxe.macro.Type;
using Lambda;
using flambe.util.Iterables;
#end
class ComponentBuilder
{
@:macro public static function ... | 48,300 |
https://github.com/ShaliniPandurangan/Deep-Convolutional-Neural-Networks/blob/master/scripts/fbdec_l.m | Github Open Source | Open Source | MIT | 2,021 | Deep-Convolutional-Neural-Networks | ShaliniPandurangan | MATLAB | Code | 97 | 277 | function [y0, y1] = fbdec_l(x, f, type1, type2, extmod)
% Modulate f
f(1:2:end) = -f(1:2:end);
if min(size(x)) == 1
error('Input is a vector, unpredicted output!');
end
if ~exist('extmod', 'var')
extmod = 'per';
end
% Polyphase decomposition of the input image
switch lower(type1(1))
case 'q'
% Qu... | 32,613 |
https://github.com/forever0523/hasor/blob/master/hasor-dataql/dataql-runtime/src/main/java/net/hasor/dataql/runtime/mem/RefCall.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | hasor | forever0523 | Java | Code | 253 | 676 | /*
* Copyright 2008-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 36,576 |
https://github.com/CalderWhite/Simple-AES-Cipher/blob/master/example/sample.py | Github Open Source | Open Source | MIT | 2,020 | Simple-AES-Cipher | CalderWhite | Python | Code | 53 | 203 | import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../')
from simple_aes_cipher import AESCipher, generate_secret_key
pass_phrase = "hogefuga"
secret_key = generate_secret_key(pass_phrase)
# generate cipher
cipher = AESCipher(secret_key)
raw_text = "abcdefg"
encrypt_text = cipher.en... | 29,990 |
https://github.com/RoseLeBlood/rap/blob/master/RapSharp/View/frmOpenStream.xaml.cs | Github Open Source | Open Source | MIT | null | rap | RoseLeBlood | C# | Code | 243 | 693 | /*abgewandelte MIT-Licens
NON-COMMERCIAL LICENSE
Ramona Audio Player Copyright (c) 2013 Philipp Schröck <philsch@hotmail.de>
1.0 Hiermit wird unentgeltlich, jeder Person, die eine Kopie der Software und der zugehörigen
Dokumentationen (die \"Software\") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu benutz... | 51,403 |
https://github.com/anthonycanino1/entbench-pi/blob/master/batik/badapt_classes/org/apache/batik/parser/PreserveAspectRatioHandler.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | entbench-pi | anthonycanino1 | Java | Code | 557 | 12,045 | package org.apache.batik.parser;
public interface PreserveAspectRatioHandler {
void startPreserveAspectRatio() throws org.apache.batik.parser.ParseException;
void none() throws org.apache.batik.parser.ParseException;
void xMaxYMax() throws org.apache.batik.parser.ParseException;
void xMaxYMid() throws o... | 11,444 |
https://github.com/push-based/user-flow/blob/master/packages/sandbox-setup/src/lib/user-flows-static-dist/sandbox-setup-static-dist.uf.ts | Github Open Source | Open Source | MIT | 2,022 | user-flow | push-based | TypeScript | Code | 108 | 270 | module.exports = {
flowOptions: {
name: 'Sandbox Setup StaticDist',
config: {
settings: {
budgets: undefined
}
}
},
interactions: async (ctx: any): Promise<void> => {
const { flow, collectOptions, page } = ctx as any;
const { url } = collectOptions;
const testUrl = `${u... | 10,028 |
https://github.com/CornelZ/mangopay2-java-sdk/blob/master/src/test/java/com/mangopay/core/RefundApiImplTest.java | Github Open Source | Open Source | MIT | 2,021 | mangopay2-java-sdk | CornelZ | Java | Code | 115 | 617 | package com.mangopay.core;
import com.mangopay.core.enumerations.InitialTransactionType;
import com.mangopay.core.enumerations.RefundReasonType;
import com.mangopay.core.enumerations.TransactionType;
import com.mangopay.entities.PayIn;
import com.mangopay.entities.Refund;
import com.mangopay.entities.Transfer;
import ... | 27,601 |
https://github.com/filipomar/jest-file-matcher/blob/master/src/index.ts | Github Open Source | Open Source | MIT | null | jest-file-matcher | filipomar | TypeScript | Code | 32 | 102 | import { ToBeFileOptions, toBeFile } from './toBeFile';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace jest {
interface Matchers<R> {
toBeFile(expected: File, args?: ToBeFileOptions): Promise<R>;
}
}
}
expect.extend({ toBeFile });
export... | 54,043 |
https://github.com/richaelguitar/custom/blob/master/src/com/travel/system/model/SysApplication.java | Github Open Source | Open Source | Apache-2.0 | null | custom | richaelguitar | Java | Code | 244 | 780 | package com.travel.system.model;
// Generated 2019-1-25 21:47:24 by Hibernate Tools 5.0.6.Final
import java.util.Date;
/**
* SysApplication generated by hbm2java
*/
public class SysApplication implements java.io.Serializable {
private Integer appId;
private String appCode;
private String appName;
private Strin... | 15,064 |
https://github.com/open-zhy/tpl/blob/master/Makefile | Github Open Source | Open Source | MIT | null | tpl | open-zhy | Makefile | Code | 115 | 495 | .PHONY: build
# Build targets
TARGETS ?= darwin/amd64 linux/amd64 linux/386 linux/arm linux/arm64 windows/amd64
TARGET_OBJS ?= darwin-amd64.tar.gz darwin-amd64.tar.gz.sha256 linux-amd64.tar.gz linux-amd64.tar.gz.sha256 linux-386.tar.gz linux-386.tar.gz.sha256 linux-arm.tar.gz linux-arm.tar.gz.sha256 linux-arm64.tar.gz... | 37,383 |
https://github.com/zx648383079/PHP-ZoDream/blob/master/Module/Legwork/Domain/Repositories/ProviderRepository.php | Github Open Source | Open Source | MIT | 2,023 | PHP-ZoDream | zx648383079 | PHP | Code | 530 | 1,991 | <?php
declare(strict_types=1);
namespace Module\Legwork\Domain\Repositories;
use Domain\Model\SearchModel;
use Exception;
use Module\Legwork\Domain\Model\CategoryModel;
use Module\Legwork\Domain\Model\CategoryProviderModel;
use Module\Legwork\Domain\Model\OrderLogModel;
use Module\Legwork\Domain\Model\OrderModel;
use ... | 17,650 |
https://github.com/paularce/uswds-react/blob/master/lib/utils/validators.js | Github Open Source | Open Source | MIT | 2,020 | uswds-react | paularce | JavaScript | Code | 264 | 642 | /**
* A Validator object contains a test pattern and a message to display is the test fails
*/
class Validator {
/**
* constructor method
* @param {regex} pattern the test pattern
* @param {string} message message to display is the test fails
*/
constructor(pattern, message) {
this.pattern = patt... | 27,838 |
https://github.com/dti-unilab/pit/blob/master/src/components/DataProfessional.jsx | Github Open Source | Open Source | MIT | null | pit | dti-unilab | null | Spoken | 154 | 548 | import { TextField, Button } from "@material-ui/core";
import { Autocomplete } from "@material-ui/lab";
import React, { useState } from "react";
const periodos = [{ descricao: "2021.1" }];
const regimes = [
{ descricao: "20 horas" },
{ descricao: "40 horas" },
{ descricao: "40 horas DE" },
];
function DataProfes... | 8,339 |
https://github.com/jbreitbart/libhermit-rs/blob/master/src/config.rs | Github Open Source | Open Source | MIT, Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,020 | libhermit-rs | jbreitbart | Rust | Code | 21 | 83 | #[allow(dead_code)]
pub const KERNEL_STACK_SIZE: usize = 32_768;
#[allow(dead_code)]
pub const DEFAULT_STACK_SIZE: usize = 32_768;
#[allow(dead_code)]
pub const USER_STACK_SIZE: usize = 1_048_576;
| 42,245 |
https://github.com/peterbillam/pjb_arrangements/blob/master/rec_exercises/make_samples | Github Open Source | Open Source | Artistic-2.0 | 2,018 | pjb_arrangements | peterbillam | Perl | Code | 194 | 413 | #! /usr/bin/perl
#########################################################################
# This Perl script is Copyright (c) 1998, Peter J Billam #
# c/o P J B Computing, GPO Box 669, Hobart TAS 7001, Australia #
# #
# Permi... | 35,803 |
https://github.com/doniexun/furnace/blob/master/lib/furnace/ssa/basic_block.rb | Github Open Source | Open Source | MIT | 2,013 | furnace | doniexun | Ruby | Code | 225 | 861 | module Furnace
class SSA::BasicBlock < SSA::NamedValue
def initialize(insns=[], name=nil)
@instructions = insns.to_a
super(name)
end
def initialize_copy(original)
@instructions = []
super
end
def to_a
@instructions.dup
end
def function=(function)
if... | 38,174 |
https://github.com/RyanOatz99/terraform-oci-bastion/blob/master/ons.tf | Github Open Source | Open Source | UPL-1.0, LicenseRef-scancode-unknown-license-reference | 2,021 | terraform-oci-bastion | RyanOatz99 | HCL | Code | 185 | 602 | # Copyright 2019, 2021 Oracle Corporation and/or affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
resource "oci_ons_notification_topic" "bastion_notification" {
compartment_id = var.compartment_id
name = var.label_p... | 39,500 |
https://github.com/jorgemauricio/python/blob/master/Exams/Respuestas/ejercicio_11_r.py | Github Open Source | Open Source | MIT | null | python | jorgemauricio | Python | Code | 103 | 246 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Jul 17 16:17:25 2017
@author: jorgemauricio
- Escribe un programa que calcule el valor neto de una cuenta de banco basado
en las transacciones que se ingresan en la consola de comandos.
Ej:
D 200
D 250
P 300
D 100
P 200
Donde:
D = Deposito
P... | 31,920 |
https://github.com/France-ioi/algorea-backend/blob/master/app/database/group_manager_store.go | Github Open Source | Open Source | MIT | null | algorea-backend | France-ioi | Go | Code | 91 | 251 | package database
// GroupManagerStore implements database operations on `group_managers`
// (which stores group managers and their permissions).
type GroupManagerStore struct {
*DataStore
}
// CanManageIndexByName returns the index of the given group manager permission from the `can_manage` enum
func (s *GroupManage... | 45,448 |
https://github.com/Citingdude/laravel-breeze/blob/master/node_modules/tailwindcss/jit/corePlugins/placeSelf.js | Github Open Source | Open Source | MIT | 2,022 | laravel-breeze | Citingdude | JavaScript | Code | 35 | 152 | const { createSimpleStaticUtilityPlugin } = require('../pluginUtils')
module.exports = createSimpleStaticUtilityPlugin({
'.place-self-auto': {
'place-self': 'auto',
},
'.place-self-start': {
'place-self': 'start',
},
'.place-self-end': {
'place-self': 'end',
},
'.place-self-center': {
'pl... | 49,155 |
https://github.com/resolvetosavelives/redapp/blob/master/app/src/main/java/org/simple/clinic/recentpatient/AllRecentPatientsEffect.kt | Github Open Source | Open Source | MIT | 2,018 | redapp | resolvetosavelives | Kotlin | Code | 34 | 140 | package org.simple.clinic.recentpatient
import androidx.paging.PagingData
import org.simple.clinic.patient.RecentPatient
import java.util.UUID
sealed class AllRecentPatientsEffect
object LoadAllRecentPatients : AllRecentPatientsEffect()
sealed class AllRecentPatientsViewEffect : AllRecentPatientsEffect()
data clas... | 11,134 |
https://github.com/marcos-sb/leetcode/blob/master/self-dividing-numbers/Solution.scala | Github Open Source | Open Source | Apache-2.0 | 2,019 | leetcode | marcos-sb | Scala | Code | 78 | 195 | object Solution {
def selfDividingNumbers(left: Int, right: Int): List[Int] = {
if (left > right) List[Int]()
else {
def digits(n: Int): List[Int] = {
import scala.collection.mutable.ListBuffer
val _ret = ListBuffer[Int]()
var _n = n
var _div = 10
while (_n > 0) {... | 33,664 |
https://github.com/hnsm99/Leae/blob/master/application/views/Home/login.php | Github Open Source | Open Source | MIT | null | Leae | hnsm99 | PHP | Code | 106 | 537 | <?php if($this->session->flashdata('Mensaje')!=null){
echo "<script>
setTimeout(function() {
$('#mensaje').fadeOut(1500);
},3000);</script>";
}else{
echo "<script>$('#mensaje').fadeOut();</script>";
}?>
<div id="demo" class="carousel slide" data-ride="carousel" >
... | 43,733 |
https://github.com/liuyangyang2015/applicationDemos/blob/master/springbootdemo/src/main/java/com/bigroad/springbootdemo/SpringBootDemoApplication.java | Github Open Source | Open Source | Apache-2.0 | null | applicationDemos | liuyangyang2015 | Java | Code | 28 | 134 | package com.bigroad.springbootdemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableAsync;
@SpringBootApplication
@En... | 4,693 |
https://github.com/afeldman/Karel_Package_Config/blob/master/cmd/source.go | Github Open Source | Open Source | MIT | 2,019 | Karel_Package_Config | afeldman | Go | Code | 133 | 358 | package cmd
import (
"fmt"
"log"
"github.com/afeldman/Makoto/makoto"
"github.com/spf13/cobra"
)
var source = &cobra.Command{
Use: "source [KPC PACKAGE NAME]",
Short: "Source repo url",
Long: `
The package URL can differ from the actual repository url.
This tag makes clear where to find the sourcecode of the... | 13,415 |
https://github.com/yFiLES/Visualisation-Cross-Recurrence-Quantification-Analysis/blob/master/Cross_Recurrent_Plot_Thresholding/PreProcess.java | Github Open Source | Open Source | MIT | 2,019 | Visualisation-Cross-Recurrence-Quantification-Analysis | yFiLES | Java | Code | 38 | 185 | abstract class PreProcess{
public static LimitedQueue<Float> downSample(LimitedQueue<Float> ts, int rate){
LimitedQueue<Float> out=new LimitedQueue<Float>(ts.size()/rate);
for(int i=0;i<ts.size();i+=rate){
out.add(ts.get(i));
}
return out;
}
public static LimitedQueue<Float> dimension(... | 46,262 |
https://github.com/Diomarciano/handbo/blob/master/bower_components/yaml_2/src/yaml.js | Github Open Source | Open Source | MIT | 2,019 | handbo | Diomarciano | JavaScript | Code | 124 | 308 | // YAML - Core -
// Copyright TJ Holowaychuk <tj@vision-media.ca> (MIT Licensed)
// Copyright Mohsen Azimi <mohsen@mohsenweb.com> (MIT Licensed)
var assemble = require('./assembler');
var AST = require('./ast');
var tokenize = require('./lexer').tokenize;
/**
* Version triplet.
*/
exports.version = '0.3.0';
/**
... | 24,837 |
https://github.com/billynugrahas/oped_quadruped/blob/master/oped_teleop/oped_teleop.py | Github Open Source | Open Source | BSD-3-Clause | 2,021 | oped_quadruped | billynugrahas | Python | Code | 681 | 2,651 | #!/usr/bin/env python
#credits to: https://github.com/ros-teleop/teleop_twist_keyboard/blob/master/teleop_twist_keyboard.py and https://github.com/chvmp/champ_teleop
from __future__ import print_function
import roslib; roslib.load_manifest('oped_teleop')
import rospy
from sensor_msgs.msg import Joy
from geometry_msg... | 50,874 |
https://github.com/isaacew/COVID19/blob/master/importfile1.m | Github Open Source | Open Source | MIT | 2,021 | COVID19 | isaacew | MATLAB | Code | 238 | 649 | function usdaily = importfile1(filename, dataLines)
%IMPORTFILE Import data from a text file
% USDAILY = IMPORTFILE(FILENAME) reads data from text file FILENAME for
% the default selection. Returns the data as a table.
%
% USDAILY = IMPORTFILE(FILE, DATALINES) reads data for the specified
% row interval(s) of text... | 40,337 |
https://github.com/markhorsfield/py4e/blob/master/py4e102/w3.e7.2.py | Github Open Source | Open Source | MIT | 2,020 | py4e | markhorsfield | Python | Code | 140 | 310 | #!/usr/bin/python3
# debug only
# skip user input for the filename
#fhandle = open('mbox-short.txt','r')
# handle user input for the filename
fname = input("Read file: ")
try:
fhandle = open(fname, 'r')
except:
print('File cannot be opened', fname)
exit()
count = 0
iter = 0
for line in fhandle:
# ign... | 15,001 |
https://github.com/msfrisbie/at-src/blob/master/controllers/main.js | Github Open Source | Open Source | MIT | null | at-src | msfrisbie | JavaScript | Code | 151 | 535 | const express = require('express');
const router = express.Router();
const auth = require('../middleware/auth');
const models = require('../models');
const constants = require('../util/constants');
// Above the Fold
router.get('/', (req, res) => {
models.Article.findAll({
where: {
'is_public': true
},
... | 45,980 |
https://github.com/pcastillol/X-Serv-Python-Multiplica/blob/master/multiplica.py | Github Open Source | Open Source | Apache-2.0 | 2,018 | X-Serv-Python-Multiplica | pcastillol | Python | Code | 19 | 69 | #!/usr/bin/python3
for numero1 in range(1,11):
print("La tabla del ", numero1)
for numero2 in range(1,11):
print(numero1, "por", numero2, "es", numero1*numero2)
| 34,100 |
https://github.com/evandroz/Horizon/blob/master/Horizon/Program.cs | Github Open Source | Open Source | MIT | 2,023 | Horizon | evandroz | C# | Code | 1,328 | 4,112 | // Copyright (c) 2016 California Polytechnic State University
// Authors: Morgan Yost (morgan.yost125@gmail.com) Eric A. Mehiel (emehiel@calpoly.edu)
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml;
using System.Text;
using HSFScheduler;
using MissionElements;
using UserModel;
using ... | 21,943 |
https://github.com/crystalwwj/AndroidMalware/blob/master/Sample/Messenger Lite Free Calls Messages_v47.0.0.14.193_apkpure.com/smali/com/facebook/mlite/threadview/a/k.smali | Github Open Source | Open Source | MIT | 2,021 | AndroidMalware | crystalwwj | Smali | Code | 67 | 250 | .class public interface abstract Lcom/facebook/mlite/threadview/a/k;
.super Ljava/lang/Object;
.source ""
# virtual methods
.method public abstract a(Landroid/app/Activity;Lcom/facebook/mlite/mediadownload/api/model/c;)V
.annotation build Landroid/support/annotation/UiThread;
.end annotation
.end method
.met... | 47,095 |
https://github.com/BahMamadouBank/BLOGMANAGEMENT/blob/master/resources/views/pages/roles/liste.blade.php | Github Open Source | Open Source | MIT | null | BLOGMANAGEMENT | BahMamadouBank | PHP | Code | 41 | 189 | @extends('home')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
@foreach($roles as $role)
<div>
<h1>{{ $role->name }}</h1>
<p>
{{($role->description) }}
</p>... | 1,790 |
https://github.com/adiv413/ml-algorithms/blob/master/NeuralNetworks/neural_net.py | Github Open Source | Open Source | MIT | null | ml-algorithms | adiv413 | Python | Code | 402 | 1,302 | import numpy as np
import csv
def most(x):
most = x[0]
pos = 0
for i in range(len(x)):
if(x[i] > most):
most = x[i]
pos = i
return pos
def l_relu(x):
return max(0.01 * x, x)
def l_relu_dx(x):
return 1 if x > 0 else 0.01
def forward(val, w1, w2, b1, b2):
x = np.matmul(w1, val) + b1
for i in range(l... | 56,295 |
https://github.com/stephanerenou/cf-drain-cli/blob/master/internal/command/push_space_drain.go | Github Open Source | Open Source | Apache-2.0 | 2,020 | cf-drain-cli | stephanerenou | Go | Code | 329 | 1,160 | package command
import (
"fmt"
"path"
"strconv"
"strings"
flags "github.com/jessevdk/go-flags"
"code.cloudfoundry.org/cli/plugin"
"code.cloudfoundry.org/cli/plugin/models"
)
type Downloader interface {
Download(assetName string) string
}
type RefreshTokenFetcher interface {
RefreshToken() (string, error)
... | 52,107 |
https://github.com/juarezmeneses/ArCatchExperiment/blob/master/hwsrc/HealthWatcherOO_03/src/healthwatcher/model/healthguide/HealthUnit.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | ArCatchExperiment | juarezmeneses | Java | Code | 113 | 335 | package healthwatcher.model.healthguide;
import java.util.Iterator;
import java.util.List;
public class HealthUnit implements java.io.Serializable {
private int code;
private String description;
private List specialities;
public HealthUnit() {
}
public HealthUnit(String description, List specialities) {
... | 55,537 |
https://github.com/Brmm/react-isometric-projection/blob/master/src/meshLib/Group.js | Github Open Source | Open Source | MIT | 2,017 | react-isometric-projection | Brmm | JavaScript | Code | 44 | 126 | import flattenSubarraysIntoParent from './flattenSubarraysIntoParent'
import parseVector from './parseVector'
export default ({ viewBoxDimensions = '1 1 1', dimensions = '1 1 1', position = '0 0 0', children }) => {
return {
type: 'GROUP',
viewBoxDimensions: parseVector(viewBoxDimensions),
dimensions: pa... | 32,494 |
https://github.com/dimagi/commcare-hq/blob/master/corehq/form_processor/migrations/0089_migrate_balance_5_alter_field.py | Github Open Source | Open Source | BSD-3-Clause | 2,023 | commcare-hq | dimagi | Python | Code | 26 | 128 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('form_processor', '0088_migrate_balance_4_switch_columns'),
]
operations = [
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.AlterField(
... | 22,150 |
https://github.com/SilverioBaltazar/siinap-v2/blob/master/app/Exports/BladeExport.php | Github Open Source | Open Source | MIT | null | siinap-v2 | SilverioBaltazar | PHP | Code | 80 | 305 | <?php
namespace App\Exports;
use App\regAgendaModel;
use Illuminate\Contracts\View\View;
use Maatwebsite\Excel\Concerns\Exportable;
use Maatwebsite\Excel\Concerns\FromView;
class BladeExport implements FromView
{
//private $data;
//public function __construct($data)
//{
// $this->data = $data;
... | 42,716 |
https://github.com/renciebautista/allocation2/blob/master/app/models/SobFilter.php | Github Open Source | Open Source | MIT | null | allocation2 | renciebautista | PHP | Code | 148 | 694 | <?php
class SobFilter extends \Eloquent {
protected $fillable = [];
public $timestamps = false;
public function sobGroup(){
return $this->belongsTo('SobGroup','sob_group_id','id');
}
public static function import($records){
DB::beginTransaction();
try {
DB::table('sob_filters')->truncate();
$reco... | 48,276 |
https://github.com/ApexRMS/carmove/blob/master/src/OutputOptionsDataFeedView.Designer.vb | Github Open Source | Open Source | MIT | null | carmove | ApexRMS | Visual Basic | Code | 267 | 1,156 | <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class OutputOptionsDataFeedView
Inherits SyncroSim.Core.Forms.DataFeedView
'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal dis... | 34,067 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.