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/maodaxiong/JT809/blob/master/src/JT809.Protocol/JT809Serializer.cs | Github Open Source | Open Source | MIT | 2,019 | JT809 | maodaxiong | C# | Code | 103 | 366 | using JT809.Protocol.Extensions;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Text;
namespace JT809.Protocol
{
/// <summary>
///
/// ref:https://adamsitnik.com/Array-Pool/
/// </summary>
public static class JT809Serializer
{
public static byte[] S... | 12,826 |
https://github.com/JAICHANGPARK/DTeacher/blob/master/DTeacher/app/src/main/java/com/dreamwalker/knu2018/dteacher/Utils/DrugWriteEvent.java | Github Open Source | Open Source | Apache-2.0 | 2,018 | DTeacher | JAICHANGPARK | Java | Code | 42 | 121 | package com.dreamwalker.knu2018.dteacher.Utils;
/**
* Created by KNU2017 on 2018-02-09.
*/
public class DrugWriteEvent {
public int valueUnit;
public String drugName;
public int position;
public DrugWriteEvent(int valueUnit, String drugName, int position) {
this.valueUnit = valueUnit;
... | 19,746 |
https://github.com/abrehman90/Student-Portal-LMS-in-Django/blob/master/lms/admin.py | Github Open Source | Open Source | MIT | 2,021 | Student-Portal-LMS-in-Django | abrehman90 | Python | Code | 22 | 71 | from django.contrib import admin
from .models import *
# Register your models here.
class Contactadmin(admin.ModelAdmin):
list_display = ['id','name','email','subject']
list_per_page = 15
admin.site.register(Contact,Contactadmin) | 38,603 |
https://github.com/ashraf-kabir/java-masterclass/blob/master/src/sixnseven/oop/polymorphism/challenge/Ford.java | Github Open Source | Open Source | MIT | 2,020 | java-masterclass | ashraf-kabir | Java | Code | 45 | 139 | package sixnseven.oop.polymorphism.challenge;
public class Ford extends Car {
public Ford(int cylinders, String name) {
super(cylinders, name);
}
@Override
public void startEngine() {
System.out.println("Ford -> startEngine()");
}
@Override
public void accelerate() {
... | 9,879 |
https://github.com/jmckaskill/subversion/blob/master/glib/tests/type-test.c | Github Open Source | Open Source | Apache-2.0 | 2,022 | subversion | jmckaskill | C | Code | 288 | 687 | /* GLIB - Library of useful routines for C programming
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; ... | 18,514 |
https://github.com/Gamerkuipers/opencart3-payments-plugin/blob/master/upload/admin/view/template/extension/payment/paypro.twig | Github Open Source | Open Source | MIT | null | opencart3-payments-plugin | Gamerkuipers | Twig | Code | 804 | 3,243 | {{ header }}{{ column_left }}
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right">
<button type="submit" form="form-paypro" data-toggle="tooltip" title="{{ button_save }}" class="btn btn-primary"><i class="fa fa-save"></i></button>
... | 32,327 |
https://github.com/axonintel/axon/blob/master/build/lib/axonbot/axonbot.py | Github Open Source | Open Source | MIT | 2,021 | axon | axonintel | Python | Code | 811 | 3,083 | import time
import cbpro
import queue
import logging
import datetime
from axonbot.axonwebsocket import AxonWebsocket
logging.basicConfig(format='%(asctime)s,%(msecs)d %(levelname)-8s [%(filename)s:%(lineno)d] %(message)s',
datefmt='%Y-%m-%d:%H:%M:%S',
level=logging.DEBUG,
... | 19,676 |
https://github.com/sarapayne/BookListRazor-Ms-Sql-Pipelines/blob/master/BookStore/Pages/BookList/Index.cshtml.cs | Github Open Source | Open Source | BSD-3-Clause | null | BookListRazor-Ms-Sql-Pipelines | sarapayne | C# | Code | 58 | 196 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using BookStore.Model;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace BookStore.Pages.... | 36,071 |
https://github.com/votdev/ceph-salt/blob/master/ceph_salt/validate/salt_minion.py | Github Open Source | Open Source | MIT | 2,022 | ceph-salt | votdev | Python | Code | 92 | 358 | import contextlib
from ..exceptions import ValidationException
from ..salt_utils import SaltClient
class UnableToSyncAll(ValidationException):
def __init__(self):
super(UnableToSyncAll, self).__init__(
"Sync failed, please run: "
"\"salt -G 'ceph-salt:member' saltutil.sync_all\" m... | 33,747 |
https://github.com/lollipop31/Shreder/blob/master/shreder/__main__.py | Github Open Source | Open Source | MIT | 2,021 | Shreder | lollipop31 | Python | Code | 321 | 703 | #!/usr/bin/env python3
#
# MIT License
#
# Copyright (c) 2020-2021 EntySec
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to... | 28,566 |
https://github.com/shaojiankui/iOS10-Runtime-Headers/blob/master/PrivateFrameworks/PreferencesUI.framework/LocationIndicatorSystemExplanationView.h | Github Open Source | Open Source | MIT | 2,018 | iOS10-Runtime-Headers | shaojiankui | C | Code | 27 | 141 | /* Generated by RuntimeBrowser
Image: /System/Library/PrivateFrameworks/PreferencesUI.framework/PreferencesUI
*/
@interface LocationIndicatorSystemExplanationView : LocationIndicatorExplanationView {
UILabel * _additionalInfoLabel;
}
- (void).cxx_destruct;
- (id)initWithSpecifier:(id)arg1;
- (void)layoutForWi... | 32,000 |
https://github.com/js-lib-com/commons/blob/master/src/main/java/js/log/LogFactory.java | Github Open Source | Open Source | Apache-2.0 | null | commons | js-lib-com | Java | Code | 621 | 1,124 | package js.log;
import java.util.ServiceLoader;
import js.lang.Config;
/**
* Logging system facade. To simplify integration log factory is a utility class; it provides static methods and is not
* instantiable. Log factory has a static reference to logger provider that is initialized at this class loading. If no
*... | 26,684 |
https://github.com/stanojevic/rotating-ccg/blob/master/src/main/scala/edin/ccg/representation/combinators/B4fwd.scala | Github Open Source | Open Source | Apache-2.0 | 2,021 | rotating-ccg | stanojevic | Scala | Code | 127 | 468 | package edin.ccg.representation.combinators
import edin.ccg.representation.category._
final case class B4fwd() extends CombinatorBinary with Forwards{
override val order: Int = 4
override def canApply(x: Category, y: Category): Boolean =
(x, y) match {
case (Functor2(_, Slash.FWD, x2), Functor5(y1, Sl... | 39,979 |
https://github.com/FallenAvatar/rp2-redux/blob/master/CoFHCore/src/main/java/cofh/core/client/gui/element/ElementFluidStorage.java | Github Open Source | Open Source | MIT | null | rp2-redux | FallenAvatar | Java | Code | 189 | 703 | package cofh.core.client.gui.element;
import cofh.core.util.helpers.FluidHelper;
import cofh.core.util.helpers.RenderHelper;
import cofh.lib.client.gui.IGuiAccess;
import cofh.lib.fluid.FluidStorageCoFH;
import cofh.lib.util.helpers.StringHelper;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import ... | 3,632 |
https://github.com/romut/ledger/blob/master/module/Core/src/Core/Model/FileRow.php | Github Open Source | Open Source | BSD-3-Clause | null | ledger | romut | PHP | Code | 679 | 2,123 | <?php
/**
* Created by PhpStorm.
* User: rom
* Date: 13.07.2016
* Time: 10:05
*/
namespace Core\Model;
class FileRow implements FileRowInterface {
private $rowNo, $maxColumn = 0;
/**
* @var FileInterface $file
*/
private $file;
/**
* @var int $currentCell
*/
private $cu... | 22,220 |
https://github.com/adiliogobira/testedevbhsoftware/blob/master/routes/web.php | Github Open Source | Open Source | MIT | null | testedevbhsoftware | adiliogobira | PHP | Code | 99 | 761 | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | 27,971 |
https://github.com/edwinchukus/RestAssuredBddBasedFramework/blob/master/PetStoreAPiTest/src/main/java/com/petstore/api/httpsVerbs/BaseVerb.java | Github Open Source | Open Source | MIT | null | RestAssuredBddBasedFramework | edwinchukus | Java | Code | 43 | 197 | package com.petstore.api.httpsVerbs;
import com.petstore.api.utils.EnvConfig;
import io.restassured.specification.RequestSpecification;
import static io.restassured.RestAssured.given;
public class BaseVerb {
protected RequestSpecification requestSpecification;
protected String mediaType = "application/json"... | 41,504 |
https://github.com/hydra-acn/hydra/blob/master/tests/directory.rs | Github Open Source | Open Source | BSD-3-Clause | null | hydra | hydra-acn | Rust | Code | 957 | 3,955 | use hmac::{Hmac, Mac, NewMac};
use hydra::crypto::key::{hkdf_sha256, Key};
use hydra::crypto::x448;
use hydra::defs::{DIR_AUTH_KEY_INFO, DIR_AUTH_KEY_SIZE, DIR_AUTH_UNREGISTER};
use hydra::directory::grpc;
use hydra::directory::state::{Config, State};
use hydra::epoch::MAX_EPOCH_NO;
use hydra::tonic_directory::director... | 24,515 |
https://github.com/telyn/unfat/blob/master/fat/dir/padding_test.go | Github Open Source | Open Source | MIT | null | unfat | telyn | Go | Code | 129 | 439 | package dir
import "testing"
func TestPadShortName(t *testing.T) {
tests := []struct {
in string
out string
}{{
in: "hi.wav",
out: "HI WAV",
}, {
in: "godwhack.gif",
out: "GODWHACKGIF",
}, {
in: "whizz",
out: "WHIZZ ",
}}
for _, test := range tests {
t.Run(test.in, func(t *testin... | 37,322 |
https://github.com/miaopp/CourseMange/blob/master/src/main/other/SQL.sql | Github Open Source | Open Source | Artistic-2.0 | 2,015 | CourseMange | miaopp | SQL | Code | 431 | 1,595 | CREATE TABLE `user` (
`user_id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id',
`user_name` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '用户名',
`user_password` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '密码',
`user_realname` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '真实姓名',
`user_class` ... | 25,628 |
https://github.com/mysma-9403/Infomarket/blob/master/app/Resources/views/common/fields/table/simple_link_field.html.twig | Github Open Source | Open Source | MIT | null | Infomarket | mysma-9403 | Twig | Code | 35 | 84 | {% set class = class|default('') %}
{% set subname = subname|default('') %}
<td class="{{ class }}">
{% include 'common/links/simple_link.html.twig' with { type: type, value: { id: id, name: name, subname: subname } } %}
</td> | 15,740 |
https://github.com/iamdb/musicbrainz_rs/blob/master/src/entity/relations.rs | Github Open Source | Open Source | MIT | 2,022 | musicbrainz_rs | iamdb | Rust | Code | 314 | 884 | use crate::date_format;
use crate::entity::area::Area;
use crate::entity::artist::Artist;
use crate::entity::event::Event;
use crate::entity::label::Label;
use crate::entity::place::Place;
use crate::entity::recording::Recording;
use crate::entity::release::Release;
use crate::entity::release_group::ReleaseGroup;
use c... | 30,770 |
https://github.com/cforth/web-spider/blob/master/old/text_spider.py | Github Open Source | Open Source | MIT | 2,017 | web-spider | cforth | Python | Code | 256 | 1,560 | #抓取股票关注 0.4版
#python3.4.1
import urllib.request #网络模块
import re #正则表达式模块
import codecs #文件编码转换
import sys
def get_stock_info(url):
"""抓取网页,利用正则表达式匹配股票信息。
网页请求头部为Chrome信息,网页编码为gb2312。
若网页中股票代码存在,返回股票信息。
"""
user_agent = 'Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHT... | 44,343 |
https://github.com/SauloSilva/generator-rails-marionette/blob/master/app/templates/javascripts/backbone/lib/utilities/_navigation.js | Github Open Source | Open Source | MIT | null | generator-rails-marionette | SauloSilva | JavaScript | Code | 93 | 291 | this.<%= appName %>.module('Utilities', function(Utilities, App, Backbone, Marionette, $, _) {
_.extend(App, {
navigate: function(route, options) {
if (_.isNull(options)) {
options = {};
}
Backbone.history.navigate(this.urlFor(route), options);
},
getCurrentRoute: function() {
... | 27,698 |
https://github.com/sedovalx/api/blob/master/generator/getters/gen.go | Github Open Source | Open Source | Apache-2.0 | 2,022 | api | sedovalx | Go | Code | 512 | 1,541 | package getters
import (
"bytes"
"fmt"
"github.com/devfile/api/generator/genutils"
"github.com/elliotchance/orderedmap"
"go/ast"
"sigs.k8s.io/controller-tools/pkg/genall"
"sigs.k8s.io/controller-tools/pkg/loader"
"sigs.k8s.io/controller-tools/pkg/markers"
"strconv"
)
//go:generate go run sigs.k8s.io/controll... | 36,782 |
https://github.com/wcnnkh/framework/blob/master/core/src/main/java/io/basc/framework/script/MathScriptFunction.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | framework | wcnnkh | Java | Code | 11 | 43 | package io.basc.framework.script;
import io.basc.framework.math.NumberHolder;
public interface MathScriptFunction extends ScriptFunction<NumberHolder> {
} | 9,661 |
https://github.com/liuyuns/keras-yolo3/blob/master/depends.sh | Github Open Source | Open Source | MIT | null | keras-yolo3 | liuyuns | Shell | Code | 15 | 43 | #!/bin/bash
pip3 install numpy h5py pillow keras pydot-ng
pip3 install --upgrade tensorflow
pip3 install pytesseract
| 35,222 |
https://github.com/ohkrab/krab/blob/master/spec/action_migrate_down_transaction_test.go | Github Open Source | Open Source | MIT | 2,021 | krab | ohkrab | Go | Code | 95 | 300 | package spec
import (
"testing"
)
func TestActionMigrateDownTransactions(t *testing.T) {
c := mockCli(mockConfig(`
migration "create_animals" {
version = "v1"
up { sql = "CREATE TABLE animals(name VARCHAR)" }
down { sql = "DROP TABLE animals" }
}
migration "add_index" {
version = "v2"
transaction = f... | 40,964 |
https://github.com/standakozak/tk_tools/blob/master/examples/gauge.py | Github Open Source | Open Source | MIT | 2,022 | tk_tools | standakozak | Python | Code | 234 | 797 | import tkinter as tk
import tk_tools
root = tk.Tk()
max_speed = 20000
# Typical one-sided gauge that you might be expecting for a
# speedometer or tachometer. Starts at zero and goes to
# max_value when full-scale.
speed_gauge = tk_tools.Gauge(root,
max_value=max_speed,
... | 4,098 |
https://github.com/oneseedfruit/UTMSPACE_2018-2019-sem2_SCSJ1013_Programming_Techniques_I/blob/master/assignment_06_extra_programs/05_fibonacci_numbers/main.c | Github Open Source | Open Source | MIT | 2,019 | UTMSPACE_2018-2019-sem2_SCSJ1013_Programming_Techniques_I | oneseedfruit | C | Code | 82 | 243 | // UTMSPACE_2018-2019-sem2_SCSJ1013_Programming_Techniques_I
// SX180357CSJS04
// Randy Tan Shaoxian
#include <stdio.h>
int get_fibonacci_numbers (int num);
int main (void)
{
int n;
printf("How many numbers in the Fibonacci sequence to generate?: ");
scanf("%d", &n);
printf("The first %d nu... | 7,280 |
https://github.com/Selinallg/webrtc_android-master/blob/master/webrtc-server/src/main/java/com/nolovr/core/webrtc/server/MemCons.java | Github Open Source | Open Source | MIT | 2,021 | webrtc_android-master | Selinallg | Java | Code | 33 | 153 | package com.nolovr.core.webrtc.server;
import com.nolovr.core.webrtc.server.bean.RoomInfo;
import com.nolovr.core.webrtc.server.bean.UserBean;
import java.util.concurrent.ConcurrentHashMap;
public class MemCons {
// 在线用户表
public static ConcurrentHashMap<String, UserBean> userBeans = new ConcurrentHashMap<... | 21,371 |
https://github.com/qbrick-cms/qbrick/blob/master/spec/lib/searchable_spec.rb | Github Open Source | Open Source | MIT | 2,020 | qbrick | qbrick-cms | Ruby | Code | 69 | 231 | require 'spec_helper'
describe Qbrick::Searchable do
context 'with missing includes' do
it 'raises exteption when class does not include Qbrick::Bricklist' do
expect do
class Foo
include Qbrick::Searchable
end
end.to raise_error(/needs Qbrick::BrickList to be included/)
... | 20,023 |
https://github.com/kacierae10/carbon-website/blob/master/plugins/gatsby-plugin-component-index/src/schema.js | Github Open Source | Open Source | Apache-2.0 | 2,022 | carbon-website | kacierae10 | JavaScript | Code | 79 | 361 | const Joi = require('joi');
const component = Joi.object({
aliases: Joi.array().items(Joi.string()).required(),
availability: Joi.string().valid('IBM Internal', 'Open Source'),
code_url: Joi.string().uri(),
date_added: Joi.date(),
description: Joi.string(),
design_asset: Joi.string().valid('Sketch', 'Adobe... | 34,184 |
https://github.com/jblaine/chef-repo/blob/master/cookbooks/syslog_handler/metadata.rb | Github Open Source | Open Source | Apache-2.0 | null | chef-repo | jblaine | Ruby | Code | 37 | 170 | name 'syslog_handler'
maintainer 'Jeff Blaine'
maintainer_email 'jblaine@kickflop.net'
license 'MIT'
description 'Installs/Configures syslog_handler'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.8'
depends "chef_handler"
supports "redha... | 2,006 |
https://github.com/OnelongX/demos/blob/master/Robot/Robot/src/com/agu/utils/DBUtils.java | Github Open Source | Open Source | MIT | null | demos | OnelongX | Java | Code | 148 | 496 | package com.agu.utils;
import java.sql.*;
import java.util.ResourceBundle;
/**
* Created by agu on 16/11/2.
*/
public class DBUtils {
// 数据库连接地址
public static String URL;
// 用户名
public static String USERNAME;
// 密码
public static String PASSWORD;
// mysql的驱动类
... | 37,350 |
https://github.com/JohNan/account-sdk-android/blob/master/core/src/main/java/com/schibsted/account/engine/integration/contract/LoginContract.kt | Github Open Source | Open Source | MIT | 2,020 | account-sdk-android | JohNan | Kotlin | Code | 66 | 209 | /*
* Copyright (c) 2018 Schibsted Products & Technology AS. Licensed under the terms of the MIT license. See LICENSE in the project root.
*/
package com.schibsted.account.engine.integration.contract
import com.schibsted.account.engine.input.Agreements
import com.schibsted.account.engine.input.Credentials
import com... | 33,309 |
https://github.com/cantona/NT6/blob/master/nitan/d/jingzhou/huayuan.c | Github Open Source | Open Source | MIT | 2,019 | NT6 | cantona | C | Code | 84 | 547 | // This program is a part of NT MudLIB
inherit ROOM;
void create()
{
set("short", "花園");
set("long", @LONG
這裏是翰林府的花園。院子裏種了各色名貴的菊花。黃菊有都勝、
金芍藥、報君知。白菊有月下白、一團雪、貂蟬拜月。紫菊有雙飛燕、
紫玉蓮、瑪瑙盤。紅菊有美人紅、醉貴妃、繡芙蓉。。。院中有幾盆
顏色特別嬌豔的黃花,花瓣黃得像金子一樣,花朵的樣子很像荷花。
那就是從天竺傳來的金波旬花。
LONG );
set("outdoors", "jingzhou");
set... | 27,789 |
https://github.com/AllanShweky/usaspending-api/blob/master/usaspending_api/awards/models/financial_accounts_by_awards.py | Github Open Source | Open Source | CC0-1.0 | 2,020 | usaspending-api | AllanShweky | Python | Code | 369 | 2,349 | from django.db import models
from usaspending_api.common.models import DataSourceTrackedModel
class FinancialAccountsByAwards(DataSourceTrackedModel):
financial_accounts_by_awards_id = models.AutoField(primary_key=True)
treasury_account = models.ForeignKey("accounts.TreasuryAppropriationAccount", models.CASC... | 46,295 |
https://github.com/tedesco8/agenciaViajes/blob/master/server/controllers/nosotrosControllers.js | Github Open Source | Open Source | MIT | 2,019 | agenciaViajes | tedesco8 | JavaScript | Code | 13 | 40 | exports.infoNosotros = (req, res) => {
res.render('nosotros', {
pagina: 'Sobre Nosotros'
});
} | 11,931 |
https://github.com/eugeniodepalo/colormaniac-ios/blob/master/Classes/RGBAColor.h | Github Open Source | Open Source | MIT | 2,015 | colormaniac-ios | eugeniodepalo | C | Code | 36 | 97 | /*
* RGBAColor.h
* ColorManiac
*
* Created by Eugenio Depalo on 21/02/11.
* Copyright 2011 Lucido, Inc. All rights reserved.
*
*/
typedef struct {
uint8_t red;
uint8_t green;
uint8_t blue;
uint8_t alpha;
} RGBAColor; | 28,041 |
https://github.com/AdobeAtAdobe/SimpleSensor_contrib/blob/master/collection_modules/btle_beacon/devices/bluegiga/__init__.py | Github Open Source | Open Source | Apache-2.0 | null | SimpleSensor_contrib | AdobeAtAdobe | Python | Code | 8 | 20 | from .bluegigaDevice import BluegigaDevice
from .deviceThread import DeviceThread | 24,459 |
https://github.com/Timmoth/Aptacode.TaskPlex/blob/master/TaskPlex/StoryBoard.cs | Github Open Source | Open Source | MIT | 2,019 | Aptacode.TaskPlex | Timmoth | C# | Code | 67 | 225 | using System.Collections.Generic;
using Aptacode.TaskPlex.Graphics;
using Aptacode.TaskPlex.Stories;
namespace Aptacode.TaskPlex
{
public class StoryBoard
{
private readonly Scene _scene;
private readonly Dictionary<string, BaseStory> _storyDictionary;
public StoryBoard(Scene scene)
... | 39,832 |
https://github.com/phpgeek254/curvybohemian/blob/master/app/Image.php | Github Open Source | Open Source | MIT | null | curvybohemian | phpgeek254 | PHP | Code | 44 | 146 | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
protected $fillable = ['url', 'imageble_id', 'imageble_type', 'caption'];
protected $with = ['comments', 'likes'];
public function imageble(){
return $this->morphTo();
}
public function comments() {... | 27,364 |
https://github.com/sm-alfariz/aldig/blob/master/.quasar-ide-helper/QItem.js | Github Open Source | Open Source | MIT | 2,021 | aldig | sm-alfariz | JavaScript | Code | 389 | 893 |
/**
* Quasar QItem component
*
* @see {@link https://v1.quasar-framework.org/vue-components/item|Quasar Docs} (Generated link, may not always work)
*/
export default {
name: 'QItem',
props: {
/**
* HTML tag to render; Suggestion: use 'label' when encapsulating a QCheckbox/QRadio/QToggle so that whe... | 5,747 |
https://github.com/ujtakk/kinpira/blob/master/api/examples/lenet_bare/main.c | Github Open Source | Open Source | MIT | null | kinpira | ujtakk | C | Code | 903 | 3,418 | #define ENABLE_COPRO
#include <stdio.h>
#include <limits.h>
#include <unistd.h>
#include <xparameters.h>
#include <xil_printf.h>
#include <kinpira.h>
#include <kprbare.h>
#include "platform.h"
#include "lenet.h"
// These arrays are defined as global variables.
/*
* s16 input_flat[IMHEI*IMWID];
* s16 pmap1_flat[N... | 10,341 |
https://github.com/lpi/codeforces-go/blob/master/leetcode/biweekly/51/b/b.go | Github Open Source | Open Source | MIT | 2,022 | codeforces-go | lpi | Go | Code | 90 | 262 | package main
import (
"container/heap"
"sort"
)
// github.com/EndlessCheng/codeforces-go
type hp struct{ sort.IntSlice }
func (h *hp) Push(v interface{}) { h.IntSlice = append(h.IntSlice, v.(int)) }
func (h *hp) Pop() interface{} { a := h.IntSlice; v := a[len(a)-1]; h.IntSlice = a[:len(a)-1]; return v }
type Se... | 3,298 |
https://github.com/samsonjs/instapaper/blob/master/lib/instapaper/http/headers.rb | Github Open Source | Open Source | MIT | 2,022 | instapaper | samsonjs | Ruby | Code | 78 | 303 | require 'addressable/uri'
require 'base64'
require 'simple_oauth'
module Instapaper
module HTTP
class Headers
def initialize(client, request_method, url, options = {})
@client = client
@request_method = request_method.to_sym
@uri = Addressable::URI.parse(url)
@options = opti... | 2,618 |
https://github.com/kodai12/dotfiles/blob/master/nvim/plugins/language_client.rc.vim | Github Open Source | Open Source | MIT | null | dotfiles | kodai12 | null | Spoken | 144 | 547 | let g:LanguageClient_autoStart = 1
let g:LanguageClient_autoStop = 1
let g:LanguageClient_changeThrottle = 0.5
let g:LanguageClient_completionPreferTextEdit = 0 " should be 0
let g:LanguageClient_diagnosticsList = 'Quickfix' " default: Quickfix, Location, Disabled
let g:LanguageClient_hasSnippetSupport = 0
let g:Lang... | 14,993 |
https://github.com/serbe/anet/blob/master/src/authority.rs | Github Open Source | Open Source | MIT | null | anet | serbe | Rust | Code | 361 | 1,308 | use std::fmt;
use std::ops::Range;
use std::str::FromStr;
use base64::encode;
use crate::errors::{Error, Result};
use crate::range::{get_chunks, RangeUsize};
#[derive(Clone, Debug, PartialEq)]
pub struct Authority {
inner: String,
username: Option<RangeUsize>,
password: Option<RangeUsize>,
host: Rang... | 2,196 |
https://github.com/bionabahaa/zadna/blob/master/public/styles/backEnd/dist/js/tablesfunc.js | Github Open Source | Open Source | MIT | null | zadna | bionabahaa | JavaScript | Code | 738 | 2,958 | var page,Tfilter,MyRows,RowLen;
$(document).ready(function () {
$(".mainTable tbody ").paginate({'perPage': 5});
$(".filter-form").one("click", function(){
intial($(this));
});
$(".filter2").on("change",function () {
filter2()
})
$(".filter1").on("change",function () {
var... | 34,472 |
https://github.com/tednaleid/spring-data-mapping/blob/master/grails-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DomainEventsSpec.groovy | Github Open Source | Open Source | Apache-2.0 | 2,015 | spring-data-mapping | tednaleid | Groovy | Code | 463 | 1,607 | package grails.gorm.tests
import org.grails.datastore.mapping.core.Session
/**
* @author graemerocher
*/
class DomainEventsSpec extends GormDatastoreSpec {
def setup() {
PersonEvent.resetStore()
}
void "Test modify property before save"() {
given:
session.datastore.mappingC... | 17,561 |
https://github.com/SaRobban/Yrgo-GP20/blob/master/Programming_Fundamentals/BasketBall/Assets/Scripts/cameraMovement.cs | Github Open Source | Open Source | MIT | 2,021 | Yrgo-GP20 | SaRobban | C# | Code | 77 | 206 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cameraMovement : MonoBehaviour
{
public Transform targetOne;
public Transform targetTwo;
public Transform ball;
Vector3 newCamPos;
// Start is called before the first frame update
void Start()
{
... | 16,326 |
https://github.com/mitapia/php/blob/master/inventory_app/database/seeds/SampleInvoicesSeeder.php | Github Open Source | Open Source | MIT | null | php | mitapia | PHP | Code | 397 | 1,848 | <?php
use Illuminate\Database\Seeder;
class SampleInvoicesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// Size matices required for the folowing batch of invoces
$matrix = new App\Size_Matrix;
$matrix->name ... | 41,010 |
https://github.com/shashfrankenstien/FatPanda/blob/master/fatpanda/sorting.py | Github Open Source | Open Source | MIT | null | FatPanda | shashfrankenstien | Python | Code | 30 | 100 |
class _SortOrder(object):
__slots__ = ['column', 'order', 'ascending']
def __init__(self, column, ascending=True):
self.column = column
self.ascending = ascending
self.order = "ASC" if ascending else "DESC"
@property
def definition(self):
return f"{self.column} {self... | 33,469 |
https://github.com/nagnagg/product_ai/blob/master/icrawler.py | Github Open Source | Open Source | MIT | null | product_ai | nagnagg | Python | Code | 10 | 74 | from icrawler.builtin import GoogleImageCrawler
crawler = GoogleImageCrawler(storage={"root_dir": "images"})
crawler.crawl(keyword="ここにダウンロードしたい画像名を入力", max_num=100)
| 8,901 |
https://github.com/MikeyAlmighty/schoolbus/blob/master/src/components/footer/index.stories.js | Github Open Source | Open Source | MIT | null | schoolbus | MikeyAlmighty | JavaScript | Code | 54 | 120 | import React from 'react'
import Footer from './'
export default {
title: 'Misc/ Footer',
component: Footer,
parameters: {
docs: {
description: {
component: 'Footer ',
},
},
},
}
export const Base = args => <Footer {...args} />
Base.args = {
copyright: 'Copyright here ',
}
expor... | 20,847 |
https://github.com/neuroinformatics/simpf-cloud-gateway/blob/master/libs/class/DirectoryUtils.php | Github Open Source | Open Source | MIT | null | simpf-cloud-gateway | neuroinformatics | PHP | Code | 144 | 486 | <?php
namespace SimPF;
class DirectoryUtils
{
/**
* remove file recursive.
*
* @param string $dir target directory
*/
public static function removeRecursive($dir)
{
$iterator = new \RecursiveIteratorIterator(
new \RecursiveDirectoryIterator($dir, \RecursiveDirectory... | 4,750 |
https://github.com/galstudio/ThinkSAAS-RUS/blob/master/app/user/action/role.php | Github Open Source | Open Source | MIT | 2,022 | ThinkSAAS-RUS | galstudio | PHP | Code | 13 | 54 | <?php
defined('IN_TS') or die('Access Denied.');
$arrRole = $new['user']->findAll('user_role');
$title = 'Статусы';
include template('role');
| 13,534 |
https://github.com/NathanOu/OGVKit/blob/master/Example/OGVKit Example/OGVExampleItem.h | Github Open Source | Open Source | MIT | 2,022 | OGVKit | NathanOu | C | Code | 56 | 195 | //
// OGVExampleItem.h
// OGVKit
//
// Created by Brion on 6/25/15.
// Copyright © 2015 Brion Vibber. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface OGVExampleItem : NSObject
@property (readonly) NSString *title;
@property (readonly) NSString *filename;
@property float playbackPosition;
-... | 25,607 |
https://github.com/elizabethesantos/reactjs-rocketseat/blob/master/node_modules/@firebase/performance/dist/src/public_types.d.ts | Github Open Source | Open Source | MIT | 2,022 | reactjs-rocketseat | elizabethesantos | TypeScript | Code | 679 | 1,159 | /**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ... | 9,734 |
https://github.com/faranjit/clean-android/blob/master/core/src/test/java/com/faranjit/clean/core/SingleEventTest.kt | Github Open Source | Open Source | MIT | null | clean-android | faranjit | Kotlin | Code | 81 | 319 | package com.faranjit.clean.core
import com.faranjit.clean.core.base.BaseUnitTest
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.core.Is.`is`
import org.junit.Assert.assertNull
import org.junit.Test
/**
* Created by Bulent Turkmen on 18.04.2020.
*/
class SingleEventTest: BaseUnitTest() {
@Test... | 45,508 |
https://github.com/ramity/wowah/blob/master/app/Resources/views/auction/index.html.twig | Github Open Source | Open Source | MIT | 2,017 | wowah | ramity | Twig | Code | 168 | 703 | {% extends 'base.html.twig' %}
{% block body %}
<h1>Auctions list</h1>
<table>
<thead>
<tr>
<th>Id</th>
<th>Auc</th>
<th>Item</th>
<th>Owner</th>
<th>OwnerRealm</th>
<th>Bid</th>
... | 43,850 |
https://github.com/MaxGoover/shop-yii2/blob/master/shop/useCases/manage/Shop/OrderManageService.php | Github Open Source | Open Source | BSD-3-Clause | null | shop-yii2 | MaxGoover | PHP | Code | 73 | 367 | <?php
namespace shop\useCases\manage\Shop;
use shop\entities\Shop\Order\CustomerData;
use shop\entities\Shop\Order\DeliveryData;
use shop\forms\manage\Shop\Order\OrderEditForm;
use shop\repositories\Shop\DeliveryMethodRepository;
use shop\repositories\Shop\OrderRepository;
class OrderManageService
{
private $_or... | 15,589 |
https://github.com/Andrei20544/Reactlab1/blob/master/routes/web.php | Github Open Source | Open Source | MIT | null | Reactlab1 | Andrei20544 | PHP | Code | 95 | 228 | <?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the Route... | 1,231 |
https://github.com/ckelner/random/blob/master/terraform/aws/elb/elb.tf | Github Open Source | Open Source | MIT | null | random | ckelner | HCL | Code | 333 | 1,064 | provider "aws" {
region = "${var.aws_region}"
}
module "vpc" {
source = "github.com/terraform-community-modules/tf_aws_vpc"
name = "kelnerhax"
cidr = "10.0.0.0/16"
public_subnets = ["10.0.1.0/24"]
enable_nat_gateway = "false"
azs = ["us-east-1a"]
tags {
"Terraform" = "true"
}
}
# Our elb securi... | 26,354 |
https://github.com/vucrr/mobile-next/blob/master/node_modules/antd-mobile/es/locale-provider/index.js | Github Open Source | Open Source | MIT | 2,021 | mobile-next | vucrr | JavaScript | Code | 7 | 18 | import LocaleProvider from './locale-provider';
export default LocaleProvider; | 28,005 |
https://github.com/HenryLiangzy/ITTF-Database-System/blob/master/FYP1/MatchData.py | Github Open Source | Open Source | Apache-2.0 | null | ITTF-Database-System | HenryLiangzy | Python | Code | 361 | 1,786 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# last modified 2018/06/11 10:23
# By Henry Leung
import urllib.request
import time
import random
from bs4 import BeautifulSoup
import sqlite3
def add_head(url):
url_full = urllib.request.Request(url, headers={
'Connection': 'Keep-Alive',
'Accept': '... | 17,581 |
https://github.com/mirkomaty/NDO/blob/master/ClassGenerator/AssemblyWizard/AssemblyWiz3.cs | Github Open Source | Open Source | MIT | null | NDO | mirkomaty | C# | Code | 577 | 1,663 | //
// Copyright (c) 2002-2016 Mirko Matytschak
// (www.netdataobjects.de)
//
// Author: Mirko Matytschak
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including w... | 36,795 |
https://github.com/Boakalis/Karthi-Electronics/blob/master/app/Models/admin/ImageUpload.php | Github Open Source | Open Source | MIT | null | Karthi-Electronics | Boakalis | PHP | Code | 44 | 192 | <?php
namespace App\Models\Admin;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\admin\Helper;
class ImageUpload extends Model
{
use HasFactory;
public static function upload( $imagedata,$filename = '' )
{
$file=$imagedata;
... | 16,053 |
https://github.com/hanseungwook/tre_code/blob/master/run_pipeline.py | Github Open Source | Open Source | MIT | 2,022 | tre_code | hanseungwook | Python | Code | 681 | 2,945 | import json
import os
import subprocess
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from __init__ import project_root
from os.path import join as path_join
from time import sleep
from make_slurm_scripts import main as make_slurm_scripts_main
from make_slurm_scripts import get_sorted_config_paths... | 46,768 |
https://github.com/bipbop/micro-base/blob/master/lib/index.d.ts | Github Open Source | Open Source | MIT | 2,020 | micro-base | bipbop | TypeScript | Code | 31 | 72 | declare global {
export namespace Nano {
interface Config {[key: string]: any}
interface Interface extends Config {
define<T>(name: string, value: T): void;
}
}
}
export default function (config?: Nano.Config): Nano.Interface | 13,618 |
https://github.com/nadvolod/driver-factory/blob/master/DriverFactory/DriverFactory.Tests/Core/Browser.cs | Github Open Source | Open Source | MIT | 2,021 | driver-factory | nadvolod | C# | Code | 12 | 40 | namespace DriverFactory.Tests.Core
{
public enum BrowserType
{
Chrome,
Safari,
Firefox
}
} | 20,485 |
https://github.com/callumj/cloudwatch-exporter/blob/master/mock/cloudwatch.go | Github Open Source | Open Source | Apache-2.0 | null | cloudwatch-exporter | callumj | Go | Code | 290 | 1,063 | package mock
import (
"context"
"reflect"
"strconv"
"github.com/aws/aws-sdk-go-v2/service/cloudwatch"
"github.com/aws/aws-sdk-go-v2/service/cloudwatch/types"
"github.com/aws/aws-sdk-go/aws"
)
type CloudwatchAPIClient struct {
cloudwatch.ListMetricsAPIClient
cloudwatch.GetMetricDataAPIClient
batchSize int
... | 40,093 |
https://github.com/huangtao/cloud-test/blob/master/vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/view/kScreen_1280_800/hall/moraGame/moraGameLayout.lua | Github Open Source | Open Source | Apache-2.0 | 2,018 | cloud-test | huangtao | Lua | Code | 131 | 3,625 | local moraGame_pin_map = require("qnFiles/qnPlist/hall/moraGame_pin");
local moraGameLayout=
{
name="moraGameLayout",type=0,typeName="View",time=0,x=0,y=0,width=1280,height=720,visible=1,fillParentWidth=1,fillParentHeight=1,nodeAlign=kAlignTopLeft,
{
name="shield",type=1,typeName="Image",time=0,x=0,y=0,width=1280,h... | 22,798 |
https://github.com/JayKickliter/pine-time-tock/blob/master/scripts/gdb.sh | Github Open Source | Open Source | Apache-2.0 | 2,020 | pine-time-tock | JayKickliter | Shell | Code | 16 | 76 | #!/bin/sh
while ! nc -t -z 127.0.0.1 2331; do
sleep 0.1
done
arm-none-eabi-gdb -x scripts/pinetime.gdb board/pinetime/target/thumbv7m-none-eabi/debug/pinetime.elf
| 35,831 |
https://github.com/dch/factor/blob/master/extra/file-picker/windows/windows.factor | Github Open Source | Open Source | BSD-2-Clause | null | factor | dch | null | Spoken | 210 | 793 | USING: accessors alien.c-types alien.data alien.strings
alien.syntax classes.struct destructors file-picker
io.encodings.string io.encodings.utf8 kernel libc literals math
system windows windows.kernel32 windows.shell32 windows.types
windows.user32 ;
IN: file-picker.windows
LIBRARY: shell32
TYPEDEF: void* PIDLIST_ABSO... | 8,919 |
https://github.com/Plutohook/dotnet-project-template/blob/master/template/content/src/PlutoNetCoreTemplate.Infrastructure/EntityFrameworkCore/DbContexts/SystemDbContext.cs | Github Open Source | Open Source | MIT | 2,020 | dotnet-project-template | Plutohook | C# | Code | 79 | 368 | namespace PlutoNetCoreTemplate.Infrastructure.EntityFrameworkCore
{
using Domain.Aggregates.SystemAggregate;
using EntityTypeConfigurations;
using Microsoft.EntityFrameworkCore;
using PlutoNetCoreTemplate.Domain.Aggregates.TenantAggregate;
using PlutoNetCoreTemplate.Domain.UnitOfWork;
public ... | 2,241 |
https://github.com/paoloalba/deployer_k8s/blob/master/tensorboard_component/run.sh | Github Open Source | Open Source | MIT | 2,020 | deployer_k8s | paoloalba | Shell | Code | 6 | 32 | #!/usr/bin/env sh
tensorboard --logdir=${EVENTS_DIR} --host 0.0.0.0
| 7,968 |
https://github.com/sshniro/javascript-action/blob/master/process.js | Github Open Source | Open Source | MIT | null | javascript-action | sshniro | JavaScript | Code | 203 | 703 | const core = require('@actions/core');
const exec = require('@actions/exec');
const wait = require('./wait');
const fs = require('fs');
const yaml = require('js-yaml')
const github = require('@actions/github');
const _ = require('lodash');
// most @actions toolkit packages have async methods
async function run() {
... | 8,610 |
https://github.com/alexburroughs/comp/blob/master/compilers/nim-comp/c_lib/memstack.h | Github Open Source | Open Source | MIT | null | comp | alexburroughs | C | Code | 45 | 144 | #ifndef MEMSTACK_H
#define MEMSTACK_H
typedef struct memnode
{
void* ptr;
void (*dealloc)(void*);
struct memnode* next;
} Memnode;
typedef struct memstack
{
Memnode* first;
Memnode* last;
int size;
} Memstack;
void free2(void* ptr);
void mem_pop(Memstack* stack);
void* mem_push(Memstack* stack, void* ptr, voi... | 560 |
https://github.com/merqwaardig/autototaalhaarlem/blob/master/src/Autoplan/SiteBundle/Resources/views/Newsletters/unsubscribe.html.twig | Github Open Source | Open Source | MIT | null | autototaalhaarlem | merqwaardig | Twig | Code | 70 | 265 | {% extends "AutoplanSiteBundle::layout.html.twig" %}
{% block content %}
<section id="small-visual" class="visible-sm visible-md visible-lg">
<div id="carousel-page" class="carousel slide" data-ride="carousel"> </div>
</section>
<main id="article">
<div class="container">
... | 1,173 |
https://github.com/mi-yo/thunderbird-subjectcleaner/blob/master/content/clean.js | Github Open Source | Open Source | MIT | 2,021 | thunderbird-subjectcleaner | mi-yo | JavaScript | Code | 62 | 220 | if("undefined" == typeof(SubjectCleanerClean)){
var SubjectCleanerClean = {
clean : function(srcSubject, removalList){
var dstSubject = srcSubject;
if(srcSubject === null || removalList === null || removalList.length === 0){
return dstSubject;
}
for(var i=0; i<removalList.length; ... | 12,180 |
https://github.com/bellachp/TopicLabeling/blob/master/model/struct_data.py | Github Open Source | Open Source | MIT | 2,020 | TopicLabeling | bellachp | Python | Code | 55 | 163 | # struct_data.py
class StructData:
"""
some low level data object for a data element
"""
def __init__(self):
self.idx = ""
self.param = 0
self.description = ""
self.params = {}
# prep for output
def map_to_single_row(self):
single_row = {}
... | 20,880 |
https://github.com/reediculous456/react-paginate/blob/master/react_components/index.js | Github Open Source | Open Source | MIT | 2,022 | react-paginate | reediculous456 | JavaScript | Code | 7 | 23 | import PaginationBoxView from './PaginationBoxView';
export default PaginationBoxView;
| 30,766 |
https://github.com/f32by/openizual/blob/master/src/ui/mod.rs | Github Open Source | Open Source | Apache-2.0, MIT-0, MIT | null | openizual | f32by | Rust | Code | 644 | 1,628 | // Copyright (c) 2021 The Lutino Projects
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.
use nh_common::mopa::MopaAny;
use nh_common::mopafy;
use nh_common::raw_file::RawFile;
use nh_ecs::Entity;
use nh_maths::{Ve... | 38,252 |
https://github.com/DavidAmison/adventofcode2021/blob/master/day16/src/packet.rs | Github Open Source | Open Source | MIT | null | adventofcode2021 | DavidAmison | Rust | Code | 833 | 2,611 | #[derive(Debug)]
pub enum ParsePacketError {
ParsePacketVersionError,
ParsePacketTypeError,
ParsePacketLengthError,
ParseLiteralError,
}
#[derive(Debug)]
pub enum Operation {
Sum,
Product,
Min,
Max,
Greater,
Less,
Equal,
}
#[derive(Debug)]
pub enum PacketType {
Literal,
... | 41,047 |
https://github.com/yh2866/RotNet/blob/master/train/train_street_view_regression.py | Github Open Source | Open Source | MIT | 2,022 | RotNet | yh2866 | Python | Code | 178 | 802 | from __future__ import print_function
import os
import sys
from keras.callbacks import ModelCheckpoint, EarlyStopping, TensorBoard
from keras.applications.resnet50 import ResNet50
from keras.applications.imagenet_utils import preprocess_input
from keras.models import Model
from keras.layers import Dense, Flatten
sys... | 18,217 |
https://github.com/smithWEBtek/rails-js-project/blob/master/db/seeds.rb | Github Open Source | Open Source | MIT | null | rails-js-project | smithWEBtek | Ruby | Code | 84 | 298 |
Client.create(name: "Max Charles")
Client.create(name: "Skai Jackson")
Client.create(name: "Kaleo Elam")
Client.create(name: "Megan Charpentier")
Manager.create(name: "Hayden Byerly", email: "HB@email", password: 'password')
Manager.create(name: "Tenzing Norgay Trainor", email: "TNT@email", password: 'password')
Mana... | 23,594 |
https://github.com/digitalpetri/netty-channel-fsm/blob/master/src/test/java/com/digitalpetri/netty/fsm/ConnectedActions.kt | Github Open Source | Open Source | Apache-2.0 | 2,022 | netty-channel-fsm | digitalpetri | Kotlin | Code | 370 | 1,314 | /*
* Copyright 2018 Kevin Herron
*
* 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... | 38,049 |
https://github.com/mailliw17/mtnreport/blob/master/application/models/M_auth.php | Github Open Source | Open Source | MIT | null | mtnreport | mailliw17 | PHP | Code | 141 | 442 | <?php
class M_auth extends CI_Model
{
public function auth_user($username, $password)
{
$query = $this->db->query("SELECT * FROM users WHERE username='$username' AND password=MD5('$password') LIMIT 1");
return $query;
}
public function register($data)
{
$query = $this->db->... | 27,515 |
https://github.com/haideralie/receiptregerator/blob/master/app/Receipts.php | Github Open Source | Open Source | MIT | null | receiptregerator | haideralie | PHP | Code | 19 | 141 | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Receipts extends Model
{
protected $fillable = [
'receipt_title', 'buyername', 'buyerfathername','buyeraddress','buyercontact','buyercnic','sellername','sellerfathername','sellercontact','sellercnic','plot_size','plot_totalprice','plot_to... | 3,887 |
https://github.com/xerc/aimeos-laravel/blob/master/src/views/catalog/tree.blade.php | Github Open Source | Open Source | MIT | 2,022 | aimeos-laravel | xerc | PHP | Code | 124 | 485 | @extends('shop::base')
@section('aimeos_header')
<?= $aiheader['locale/select'] ?? '' ?>
<?= $aiheader['basket/mini'] ?? '' ?>
<?= $aiheader['catalog/search'] ?? '' ?>
<?= $aiheader['catalog/tree'] ?? '' ?>
<?= $aiheader['catalog/price'] ?? '' ?>
<?= $aiheader['catalog/supplier'] ?? '' ?>
<... | 35,996 |
https://github.com/alexandru-dinu/PRML/blob/master/prml/nn/loss/softmax_cross_entropy.py | Github Open Source | Open Source | MIT | null | PRML | alexandru-dinu | Python | Code | 55 | 178 | import numpy as np
from scipy.special import logsumexp
from prml.nn.function import Function
class SoftmaxCrossEntropy(Function):
def _forward(self, x, t):
self.log_softmax = x - logsumexp(x, axis=-1, keepdims=True)
return -t * self.log_softmax
def _backward(self, delta, x, t):
dx = ... | 17,643 |
https://github.com/leawn/react/blob/master/react-projects/burger-builder-project/src/components/UI/Button/Button.js | Github Open Source | Open Source | MIT | null | react | leawn | JavaScript | Code | 24 | 74 | import React from 'react';
import {StyledButton} from "./StyledButton";
const Button = ({clicked, ...restProps}) => (
<StyledButton onClick={clicked} {...restProps}>
{restProps.children}
</StyledButton>
);
export default Button; | 32,838 |
https://github.com/gagandeepp/vonage-dotnet-sdk/blob/master/Nexmo.Api.Test.Unit/WebhookParserTests.cs | Github Open Source | Open Source | Apache-2.0 | 2,020 | vonage-dotnet-sdk | gagandeepp | C# | Code | 251 | 1,065 | using Microsoft.Extensions.Primitives;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using Xunit;
namespace Nexmo.Api.Test.Unit
{
public class WebhookParserTests
{
[Theo... | 14,306 |
https://github.com/alexjercan/haskell-rsa/blob/master/src/RSA.hs | Github Open Source | Open Source | MIT | null | haskell-rsa | alexjercan | Haskell | Code | 129 | 252 | module RSA where
import KeyGen (computeD, computeE, computeN)
keygen :: Integral a => a -> a -> ((a, a), (a, a))
keygen p q = ((n, e), (n, d))
where
n = computeN p q
e = computeE p q
d = computeD p q
encrypt :: (Integral a, Integral b) => (a, b) -> [a] -> [a]
encrypt key = map (encryptItem key)
decryp... | 34,432 |
https://github.com/hexmachina/EventBehavior/blob/master/Assets/com.tomwilhelm.eventbehavior/Runtime/Components/TallyEvent.cs | Github Open Source | Open Source | MIT | null | EventBehavior | hexmachina | C# | Code | 178 | 593 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
namespace EventBehavior
{
[AddComponentMenu("Event Behavior/Tally Event")]
public class TallyEvent : MonoBehaviour
{
public int startValue = 0;
public int minValue = 0;
public int maxValue = 5;
privat... | 35,378 |
https://github.com/Balq666/addfans-laravel-9/blob/master/app/Http/Controllers/UserNotificationController.php | Github Open Source | Open Source | MIT | null | addfans-laravel-9 | Balq666 | PHP | Code | 39 | 149 | <?php
namespace App\Http\Controllers;
use App\Models\Notification;
use Illuminate\Http\Request;
class UserNotificationController extends Controller
{
//
public function index(){
return view('user.notification.index',[
'title'=>'Notification page'
]);
}
public function show... | 17,023 |
https://github.com/Berson1990/alread/blob/master/app/Http/Controllers/AdminControllers/AdminControllers.php | Github Open Source | Open Source | MIT | null | alread | Berson1990 | PHP | Code | 191 | 753 | <?php
namespace App\Http\Controllers\AdminControllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Models\Users;
use App\Http\Models\Lesson;
use App\Http\Models\StudentQuestion;
use App\Http\Models\Answer;
use App\Http\Models\QuestionReport;
use App\Http\Models\TeacherAssgin;
clas... | 28,520 |
https://github.com/SkyRd1/Statistical_Functions/blob/master/Pearson_Correlation.py | Github Open Source | Open Source | MIT | null | Statistical_Functions | SkyRd1 | Python | Code | 104 | 370 | #Author: Sepehr Roudini.
#Date: 02/05/2018.
#University of Iowa.
#Department of Chemical Engineering.
#Purpose: Calculating Pearson correlation
#Coefficient for two sets of data
#--------------------------------------------------------------------------------------------#
#Defining function and importing necessary li... | 40,851 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.