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/ValentinMorozov/postgresql-hibernate-mapping/blob/master/src/main/scala/mv/data/jpa/hibernate/usertype/AbstractArrayDescriptor.scala
Github Open Source
Open Source
MIT
null
postgresql-hibernate-mapping
ValentinMorozov
Scala
Code
130
483
package mv.data.jpa.hibernate.usertype import java.util.Properties import org.hibernate.`type`.descriptor.java.{AbstractTypeDescriptor, MutabilityPlan, MutableMutabilityPlan} import org.hibernate.usertype.DynamicParameterizedType import org.hibernate.usertype.DynamicParameterizedType.{PARAMETER_TYPE} abstract class ...
13,314
https://github.com/PaddlePaddle/PaddleFL/blob/master/python/paddle_fl/mpc/tests/demo/mul/mul3/run.sh
Github Open Source
Open Source
Apache-2.0
2,023
PaddleFL
PaddlePaddle
Shell
Code
25
122
export TEST_REDIS_IP="127.0.0.1" export TEST_REDIS_PORT="6379" nohup python3 mul3_C0.py >> ./logs/console0.log 2>>./logs/error0.log & nohup python3 mul3_C1.py >> ./logs/console1.log 2>>./logs/error1.log & nohup python3 mul3_C2.py >> ./logs/console2.log 2>>./logs/error2.log &
33,831
https://github.com/amontano/basic_engine/blob/master/app/helpers/basic_engine_helper.rb
Github Open Source
Open Source
MIT
2,013
basic_engine
amontano
Ruby
Code
68
270
# Methods added to this helper will be available to all templates in the application. module BasicEngineHelper def stylesheet_files ['authenticated_system', 'base', 'language_support', 'jquery-ui'] end def javascript_files [:defaults] end def stylesheets return stylesheet_link_tag(*styleshee...
33,989
https://github.com/landsurveyorsunited/TumblrPostMap/blob/master/map.js
Github Open Source
Open Source
MIT
2,010
TumblrPostMap
landsurveyorsunited
JavaScript
Code
968
2,857
// Copyright (c) 2010 Claudio Gil <claudio.f.gil@gmail.com> // // 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 use, copy...
34,395
https://github.com/ozguryilmaz07/HukukOfficeassets/blob/master/Tracking/PDF/Parser.cs
Github Open Source
Open Source
Apache-2.0
null
HukukOfficeassets
ozguryilmaz07
C#
Code
134
486
 namespace OpenLawOffice.Assets.Tracking.PDF { using System.Collections.Generic; using System.IO; public class Parser { public static List<ImageContainer> Parse(string filepath) { List<ImageContainer> imageContainers = new List<ImageContainer>(); if (!File.Exis...
39,293
https://github.com/vanadium/core/blob/master/v23/vdl/bootstrapped.go
Github Open Source
Open Source
BSD-3-Clause
2,022
core
vanadium
Go
Code
68
187
// Copyright 2020 The Vanadium Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. //go:build !vdlbootstrapping && !vdltoolbootstrapping // +build !vdlbootstrapping,!vdltoolbootstrapping package vdl import "reflect" var ( rtCache = &...
51,825
https://github.com/qlik-oss/picasso.js/blob/master/packages/picasso.js/src/core/utils/__tests__/logger.spec.js
Github Open Source
Open Source
MIT
2,023
picasso.js
qlik-oss
JavaScript
Code
227
1,175
import loggerFn from '../logger'; describe('logger', () => { let logger; function log() { logger.log(0, 'a', 'aa'); logger.log(1, 'b', 'bb'); logger.log(2, 'c', 'cc'); logger.log(3, 'd', 'dd'); logger.log(4, 'e', 'ee'); } let pipe = { log: () => {}, warn: () => {}, info: () => ...
47,213
https://github.com/0x4e38/dpkt/blob/master/dpkt/ip.py
Github Open Source
Open Source
BSD-3-Clause
2,017
dpkt
0x4e38
Python
Code
1,465
5,093
# $Id$ """Internet Protocol.""" import dpkt class IP(dpkt.Packet): __hdr__ = ( ('v_hl', 'B', (4 << 4) | (20 >> 2)), ('tos', 'B', 0), ('len', 'H', 20), ('id', 'H', 0), ('off', 'H', 0), ('ttl', 'B', 64), ('p', 'B', 0), ('sum', 'H', 0), ('src',...
1,970
https://github.com/MaksymDryha/ui-eholdings/blob/master/test/bigtest/tests/custom-title-edit-test.js
Github Open Source
Open Source
Apache-2.0
null
ui-eholdings
MaksymDryha
JavaScript
Code
1,249
3,508
import { expect } from 'chai'; import { describe, beforeEach, it } from '@bigtest/mocha'; import setupApplication from '../helpers/setup-application'; import TitleShowPage from '../interactors/title-show'; import TitleEditPage from '../interactors/title-edit'; describe('CustomTitleEdit', () => { setupApplication();...
226
https://github.com/objectconnexions/expressive-objects/blob/master/core/runtime/src/main/java/uk/co/objectconnexions/expressiveobjects/core/runtime/persistence/objectstore/algorithm/PersistAlgorithmDefault.java
Github Open Source
Open Source
Apache-2.0
null
expressive-objects
objectconnexions
Java
Code
386
1,384
/* * 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")...
4,968
https://github.com/mmogib/NorahPhd.jl/blob/master/Examples/ExamplePlottingVerteces.jl
Github Open Source
Open Source
MIT
null
NorahPhd.jl
mmogib
Julia
Code
56
176
using Plots include("../src/Types.jl") @recipe function f(::Type{Vertex2D}, V::Vertex2D, add_marker = false) linecolor --> :blue seriestype := :scatter markershape --> (add_marker ? :circle : :none) delete!(plotattributes, :add_marker) vec.(V) end V = Vertex2D.([rand([-1, -2, 0, -3], 2) for i in 1:5...
14,796
https://github.com/hanjunlee/pr-sloth/blob/master/source/components/SigninForm.tsx
Github Open Source
Open Source
MIT
2,020
pr-sloth
hanjunlee
TypeScript
Code
105
311
import React from 'react'; import { Octokit } from '@octokit/rest' import { Form, Input, Button } from 'antd'; export type SigninFormProps = { signin(values: any): void; }; export default class SigninForm extends React.Component<SigninFormProps> { async validateToken(token: string) { const octokit = n...
43,856
https://github.com/Helene-33/it162-Spring2021/blob/master/fp/work.php
Github Open Source
Open Source
Apache-2.0
null
it162-Spring2021
Helene-33
PHP
Code
46
147
<?php include "includes/header.php";?> <h2>Work with me</h2> <p class="textpages">If you are interested in working with me, please don't hesitate to fill up the form below.</p> <?php include 'includes/contact_include.php'; #site keys & code here $toAddress = "helene.liobard33@gmail.com"; $toName = "M...
28,655
https://github.com/SCIInstitute/Seg3D/blob/master/src/Application/LayerIO/MatlabLayerImporter.cc
Github Open Source
Open Source
MIT
2,023
Seg3D
SCIInstitute
C++
Code
2,292
6,145
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2016 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software")...
23,398
https://github.com/asu-cactus/netsdb/blob/master/model-inference/decisionTree/experiments/higgs/Spark/project/plugins.sbt
Github Open Source
Open Source
Apache-2.0
2,022
netsdb
asu-cactus
Scala
Code
1
27
addSbtPlugin("com.eed3si9n"%"sbt-assembly"%"1.2.0")
44,286
https://github.com/rafaelgude/customers-fav-products/blob/master/src/main/java/com/rafaelgude/customersfavproducts/products/ProductDTO.java
Github Open Source
Open Source
Apache-2.0
null
customers-fav-products
rafaelgude
Java
Code
38
161
package com.rafaelgude.customersfavproducts.products; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude.Include; import lombok.*; import java.math.BigDecimal; @Getter @Setter @EqualsAndHashCode @ToString @Builder @AllArgsConstructor @NoArgsConstructor public cla...
2,451
https://github.com/Malejni/react_calc/blob/master/src/app/calculator/calculator.component.spec.ts
Github Open Source
Open Source
MIT
null
react_calc
Malejni
TypeScript
Code
194
898
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { CalculatorComponent } from './calculator.component'; describe('CalculatorComponent', () => { let component: CalculatorComponent; let fixture: ComponentFixture<CalculatorComponent>; ...
37,465
https://github.com/HaloImageEngine/EmpowerClaim-hotfix-1.25.1/blob/master/EmpowerBusiness/Models/Utils/MelissaData/MDAddressUtility.cs
Github Open Source
Open Source
Apache-2.0
null
EmpowerClaim-hotfix-1.25.1
HaloImageEngine
C#
Code
1,017
3,613
extern alias mdAddrNET; extern alias mdGeoNET; using System; using System.Collections.Generic; using System.Configuration; using System.IO; using System.Net; using System.Text.RegularExpressions; using EmpowerBusiness.Models.Common; using EmpowerBusiness.Models.Common.MelissaData; using EmpowerCore.CustomErrors; using ...
13,976
https://github.com/only4arunkumar/Testura.Android/blob/master/src/Testura.Android/Util/DependencyInstaller.cs
Github Open Source
Open Source
MIT
2,017
Testura.Android
only4arunkumar
C#
Code
84
373
using System; using System.IO; using Testura.Android.Device.Configurations; using Testura.Android.Device.Services; using Testura.Android.Util.Logging; namespace Testura.Android.Util { internal class DependencyInstaller { public void InstallDependencies(IAdbService adbService, DeviceConfiguration confi...
37,320
https://github.com/EnriqueF97/React-UI-Demo/blob/master/src/components/NavbarButton.jsx
Github Open Source
Open Source
Apache-2.0
null
React-UI-Demo
EnriqueF97
null
Spoken
94
330
import React from "react"; import { createUseStyles } from "react-jss"; export default function NavbarButton(props) { const classes = useStyles(props); return ( <li className={classes.li}> <span onClick={props.onSelect}>{props.text}</span> </li> ); } /**Estilos */ const useStyles = createUseStyles({ li: { ...
10,056
https://github.com/ScalablyTyped/SlinkyTyped/blob/master/v/vexflow/src/main/scala/typingsSlinky/vexflow/anon/Line.scala
Github Open Source
Open Source
MIT
2,021
SlinkyTyped
ScalablyTyped
Scala
Code
84
305
package typingsSlinky.vexflow.anon import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} @js.native trait Line extends StObject { var line: Double = js.native var `type`: S...
128
https://github.com/Tyagdit/bot/blob/master/scripts/deploy.sh
Github Open Source
Open Source
MIT
2,020
bot
Tyagdit
Shell
Code
32
100
#scp -r $TRAVIS_BUILD_DIR TG-bot@$HOSTNAME:/home/TG-bot/bot echo $TRAVIS_BRANCH ssh -i /tmp/deploy_rsa TG-bot@$HOSTNAME "screen -X -S $2 quit || true && screen -S $2 -dm bash -c 'cd $1; git pull origin $3; python3 main.py'"
4,965
https://github.com/per1234/serial-modem/blob/master/SerialModem/SerialModemClient.cpp
Github Open Source
Open Source
MIT
2,021
serial-modem
per1234
C++
Code
118
528
#include "SerialModem.h" #include "SerialModemClient.h" #include "platforms/platform.h" SerialModemClient::SerialModemClient() : _connected(false) { } int SerialModemClient::connect(IPAddress ip, uint16_t port) { char address[18]; sprintf(address, "%i.%i.%i.%i", ip[0], ip[1], ip[2], ip[3]); return connect(addr...
39,244
https://github.com/cdli-gh/mtaac_cdli_ur3_corpus/blob/master/ur3_corpus_data/annotated/morph/P140/P140383.conll
Github Open Source
Open Source
CC0-1.0, LicenseRef-scancode-public-domain
2,022
mtaac_cdli_ur3_corpus
cdli-gh
null
Spoken
126
494
#new_text=P140383 FORM SEGM XPOSTAG XPOSTAG POS 1/2(disz) 1/2(disz)[one] NU NU D ma-na mana[unit] N N D sze-gin2 szegin[paint] N N D im-ma _ V NF.V.PT Iabcdefgh ga2-ga2-de3 _ V NF.V.ABS.GEN.GEN Iabcdefg ki ki[place] N N D a-a-kal-la Ayakala[1] PN PN D aszgab-ta aszgab[leatherworker][-ak]-ta N N.GEN.ABL D sza3 szag[hear...
16,755
https://github.com/mihajlokolesar/bn-web/blob/master/src/components/pages/authentication/forms/LoginForm.js
Github Open Source
Open Source
BSD-3-Clause
null
bn-web
mihajlokolesar
JavaScript
Code
551
2,065
import React, { Component } from "react"; import PropTypes from "prop-types"; import { withStyles, Grid } from "@material-ui/core"; import InputGroup from "../../../common/form/InputGroup"; import Button from "../../../elements/Button"; import user from "../../../../stores/user"; import notifications from "../../../.....
45,896
https://github.com/plkumar/SecondMonitor/blob/master/Telemetry/TelemetryApplication/Controllers/MainWindow/Snapshot/IMainLapController.cs
Github Open Source
Open Source
MIT
2,021
SecondMonitor
plkumar
C#
Code
21
81
namespace SecondMonitor.Telemetry.TelemetryApplication.Controllers.MainWindow.Snapshot { using SecondMonitor.ViewModels.Controllers; using TelemetryManagement.DTO; public interface IMainLapController : IController { LapSummaryDto MainLap { get; set; } } }
6,113
https://github.com/898989/Hong.Framework/blob/master/src/Hong.Repository/Interface/IRepository.cs
Github Open Source
Open Source
Apache-2.0
2,018
Hong.Framework
898989
C#
Code
32
98
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace Hong.Repository { public interface IRepository<Service> { Service FindByID(long id); List<Service> Find(long[] ids); List<Service> Find(string condition, string order, int pageIn...
40,620
https://github.com/bharadwaj-pendyala/opentestdata-api/blob/master/api/db/init-dev.sql
Github Open Source
Open Source
MIT
2,020
opentestdata-api
bharadwaj-pendyala
SQL
Code
39
136
DROP DATABASE IF EXISTS otd_dev; DROP DATABASE IF EXISTS otd_test; DROP USER IF EXISTS 'otd_user'@'localhost'; CREATE DATABASE otd_dev; CREATE DATABASE otd_test; CREATE USER 'otd_user'@'localhost' IDENTIFIED BY 'otd_pass'; GRANT ALL ON otd_dev.* to 'otd_user'@'localhost'; GRANT ALL ON otd_test.* to 'otd_user'@'localh...
24,693
https://github.com/GerardDilla/SDCALMS/blob/master/application/views/login/Login_Body_Admin.php
Github Open Source
Open Source
MIT
null
SDCALMS
GerardDilla
PHP
Code
222
1,035
<body class="login-page"> <div class="login-box"> <div class="logo"> <br> <a href="">Learning Management System</a> <br> </div> <div class="card"> <div class="body"> <div class="msg"><span class="mssg">Create Account</span></d...
8,115
https://github.com/blueshu/wx-manager/blob/master/components/Setting.vue
Github Open Source
Open Source
MIT
2,018
wx-manager
blueshu
Vue
Code
1,749
8,668
<template> <div class="main-area"> <div class="setting-header"> <a href="javascript:;" v-link="{name: 'index'}">小程序首页</a> <a href="javascript:;">> 综合设置</a> </div> <div class="setting-area-item"> <h3 class="fl">广告位设置</h3> <a href="javascript:;" ...
33,386
https://github.com/mprusakov-rbc/artio/blob/master/artio-system-tests/src/perf/java/uk/co/real_logic/artio/TestData.java
Github Open Source
Open Source
Apache-2.0
null
artio
mprusakov-rbc
Java
Code
138
515
/* * Copyright 2015-2017 Real Logic Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agree...
10,553
https://github.com/P79N6A/oyph/blob/master/sp2p_sjzyj.finance/app/models/finance/entity/t_return_status.java
Github Open Source
Open Source
MIT
2,019
oyph
P79N6A
Java
Code
109
366
package models.finance.entity; import java.util.Date; import javax.persistence.Entity; import play.db.jpa.Model; @Entity public class t_return_status extends Model{ /**报文表名*/ public String report_name; /**报送类型(1 天 ,2 月 , 3季)*/ public Integer report_type; /**返回状态(0成功,1失败)*/ public Integer result_type; ...
20,659
https://github.com/julianschuler/MCP23S08/blob/master/MCP23S08.cpp
Github Open Source
Open Source
MIT
null
MCP23S08
julianschuler
C++
Code
348
1,294
/********************************************************************** * * This is the C++ part of the MCP23S08 library. * See MCP23S08.h and the example files for a full documentation. * *********************************************************************/ #include "MCP23S08.h" /*########################...
44,755
https://github.com/ScalablyTyped/SlinkyTyped/blob/master/c/commangular/src/main/scala/typingsSlinky/commangular/commangular.scala
Github Open Source
Open Source
MIT
2,021
SlinkyTyped
ScalablyTyped
Scala
Code
2,213
5,037
package typingsSlinky.commangular import typingsSlinky.angular.mod.IPromise import org.scalablytyped.runtime.StObject import scala.scalajs.js import scala.scalajs.js.`|` import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess} object commangular { @js.native trait ICommAn...
42,016
https://github.com/aboucaud/command-doc-generator/blob/master/ccsdoc/parameter.py
Github Open Source
Open Source
BSD-3-Clause
null
command-doc-generator
aboucaud
Python
Code
247
803
from typing import Optional from ccsdoc.text import clean_description, clean_quotes PARAM_HEADER: str = "class,name,type,description\n" CONFIG_PARAM_HEADER: str = "class,name,category,type,units,low,high,description\n" class Parameter: def __init__(self, name: str, ptype: str, description: Optional[str] = None)...
8,924
https://github.com/PeacefulNoob/FakultetNord/blob/master/resources/views/layouts/footer.blade.php
Github Open Source
Open Source
MIT
null
FakultetNord
PeacefulNoob
PHP
Code
44
331
<footer class="footer shadow-sm"> <script src="/js/jquery-3.3.1.min.js"></script> <script src="/js/jquery-migrate-3.0.1.min.js"></script> <script src="/js/jquery-ui.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/aos.js"></script> <script src="https://cdn.jsdelivr.ne...
11,370
https://github.com/Benehiko/Anzen-Learning/blob/master/_/sensei-panel/wp-content/plugins/ninja-forms/includes/MergeTags/QueryStrings.php
Github Open Source
Open Source
MIT
null
Anzen-Learning
Benehiko
PHP
Code
146
411
<?php if ( ! defined( 'ABSPATH' ) ) exit; /** * Class NF_MergeTags_QueryStrings */ final class NF_MergeTags_QueryStrings extends NF_Abstracts_MergeTags { protected $id = 'querystrings'; public function __construct() { parent::__construct(); $this->title = __( 'Query Strings', 'ninja-form...
32,254
https://github.com/Hellofafar/Leetcode/blob/master/Medium/565.py
Github Open Source
Open Source
CNRI-Python
2,019
Leetcode
Hellofafar
Python
Code
307
610
# ------------------------------ # 565. Array Nesting # # Description: # A zero-indexed array A of length N contains all integers from 0 to N-1. Find and return # the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[A[i]]], ... } subjected to # the rule below. # # Suppose the first element in S starts with...
34,283
https://github.com/intellifactory/ConnectDev16/blob/master/FrpDemo/RestBacked/RestApi.fs
Github Open Source
Open Source
Apache-2.0
null
ConnectDev16
intellifactory
null
Spoken
553
1,275
namespace RestBackend open System open System.Collections.Generic open WebSharper open WebSharper.Sitelets /// This module implements the tutorial REST API from http://websharper.com/tutorials/rest-api /// It's a full CRUD application maintaining a basic in-memory database of people. module RestApi = /// The typ...
5,276
https://github.com/HubPress/hubpress-plugin-template/blob/master/lib/helpers/index.js
Github Open Source
Open Source
MIT
2,018
hubpress-plugin-template
HubPress
JavaScript
Code
399
1,503
'use strict'; var handlebars = require('handlebars'), hbs = { handlebars: handlebars }, // Promise = require('bluebird'), // errors = require('../errors'), utils = require('./utils'), // i18n = require('../i18n'), coreHelpers = {}, registerHelpers; if (!utils.isProduction) { ...
45,410
https://github.com/php1301/nextjs-graphql-sample/blob/master/generated/apolloComponents.tsx
Github Open Source
Open Source
MIT
2,019
nextjs-graphql-sample
php1301
TSX
Code
972
3,375
export type Maybe<T> = T | null; export interface ChangePasswordInput { password: string; token: string; } export interface RegisterInput { password: string; firstName: string; lastName: string; email: string; } export interface ProductInput { name: string; } /** The `Upload` scalar type represent...
16,123
https://github.com/wiley/healthcat/blob/master/logger/zap.go
Github Open Source
Open Source
MIT
null
healthcat
wiley
Go
Code
375
1,174
// Package chczap provides log handling using zap package. // Code structure based on ginrus package. package chczap import ( "net" "net/http" "net/http/httputil" "os" "runtime/debug" "strings" "time" "github.com/go-chi/chi/middleware" "go.uber.org/zap" ) // Chczap returns a http.Handler (middleware) that l...
42,144
https://github.com/natac13/natac-electric/blob/master/src/pages/contact.tsx
Github Open Source
Open Source
0BSD
2,020
natac-electric
natac13
TSX
Code
778
2,931
import React, { useCallback } from 'react' import { PageProps, graphql } from 'gatsby' import Layout from '../components/Layout' import { makeStyles, useTheme, Typography, List, ListItem, TextField, Divider, } from '@material-ui/core' import BackgroundImage from 'gatsby-background-image' import { animated...
50,358
https://github.com/jogibear9988/SharpDevelop/blob/master/src/AddIns/Analysis/UnitTesting/Service/ITestService.cs
Github Open Source
Open Source
CC-BY-3.0, MIT, BSD-3-Clause
2,016
SharpDevelop
jogibear9988
C#
Code
345
670
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team // // 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 use, co...
13,758
https://github.com/cash2one/swRech/blob/master/script/character_exists.lua
Github Open Source
Open Source
Apache-2.0
2,016
swRech
cash2one
Lua
Code
11
31
if redis.call("EXISTS",KEYS[1]) == 1 then return 1 else return 2 end
37,643
https://github.com/gatarelib/infer/blob/master/infer/tests/codetoanalyze/cpp/frontend/builtin/new.cpp
Github Open Source
Open Source
MIT
2,022
infer
gatarelib
C++
Code
102
186
/* * Copyright (c) 2015-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ void test() { int x = 2; int* i = new int; new int; // this will be leak - test that it gets to cfg delete i; // int* i_a = ne...
40,257
https://github.com/seasarorg/dbflute-jdk15/blob/master/dbflute-jdk15/src/main/java/org/seasar/dbflute/task/manage/DfRefreshTask.java
Github Open Source
Open Source
Apache-2.0
2,014
dbflute-jdk15
seasarorg
Java
Code
335
1,116
/* * Copyright 2004-2007 the Seasar Foundation and the Others. * * 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 ...
46,810
https://github.com/prabhu-das/chef-server-image/blob/master/attributes/default.rb
Github Open Source
Open Source
Apache-2.0
2,015
chef-server-image
prabhu-das
Ruby
Code
157
440
# # Cookbook Name:: chef-server-image # Attributes:: default # # Copyright:: Copyright (c) 2014 Chef Software, 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.o...
34,126
https://github.com/enriquehidalgo7/scriptDH-Laravel/blob/master/app/Http/Controllers/SearchController.php
Github Open Source
Open Source
MIT
null
scriptDH-Laravel
enriquehidalgo7
PHP
Code
66
307
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Product; use App\Accesorie; class SearchController extends Controller { public function __construct() { $this->middleware('guest'); } public function seeker(Request $request) { $request->validate([ 'buscador' ...
15,671
https://github.com/simonduerr/stu3/blob/master/src/Module/Ship/Action/SalvageEmergencyPods/SalvageEmergencyPods.php
Github Open Source
Open Source
MIT
null
stu3
simonduerr
PHP
Code
135
631
<?php declare(strict_types=1); namespace Stu\Module\Ship\Action\SalvageEmergencyPods; use PM; use request; use Stu\Module\Control\ActionControllerInterface; use Stu\Module\Control\GameControllerInterface; use Stu\Module\Ship\Lib\ShipLoaderInterface; use Stu\Orm\Repository\ShipCrewRepositoryInterface; final class Sa...
23,396
https://github.com/hiventive/hvcommunication/blob/master/src/protocols/memory_mapped/memory_mapped_payload.h
Github Open Source
Open Source
MIT
null
hvcommunication
hiventive
C
Code
219
947
/** * @file memory_mapped_payload.h * @author Benjamin Barrois <benjamin.barrois@hiventive.com> * @date Sep, 2018 * @copyright Copyright (C) 2018, Hiventive. * * @brief Hiventive TLM Memory-Mapped Payload * * Memory-mapped payload */ #ifndef HV_PROTOCOLS_MEMORY_MAPPED_MEMORY_MAPPED_PAYLOAD_H_ #define HV_PROTO...
25,134
https://github.com/JordanLong1/quote-maker-react-lab-onl01-seng-pt-110319/blob/master/src/reducers/quotes.js
Github Open Source
Open Source
LicenseRef-scancode-public-domain, LicenseRef-scancode-unknown-license-reference
2,020
quote-maker-react-lab-onl01-seng-pt-110319
JordanLong1
JavaScript
Code
287
691
import { upvoteQuote } from "../actions/quotes"; export default (state = [], action) => { let index; let quote; switch(action.type) { case 'ADD_QUOTE': return [...state, action.quote] case 'REMOVE_QUOTE': return [ // ...state, ...state.filter((item) => item.id !== act...
3,899
https://github.com/SilviaHyde/MergeInfinity/blob/master/MergeInfinity/Kernel/init.m
Github Open Source
Open Source
MIT
2,020
MergeInfinity
SilviaHyde
Mathematica
Code
1
12
Get["MergeInfinity`MergeInfinity`"];
1,887
https://github.com/CheapHasz/elasticsearch-bundle/blob/master/src/Provider/IndexProvider.php
Github Open Source
Open Source
MIT
2,020
elasticsearch-bundle
CheapHasz
PHP
Code
466
1,251
<?php declare(strict_types=1); namespace Novaway\ElasticsearchBundle\Provider; use Elastica\Request; use Elastica\Client; use Elasticsearch\Endpoints\Indices\Alias\Exists; use Elasticsearch\Endpoints\Indices\Alias\Get; use Novaway\ElasticsearchBundle\Elastica\Index; use Symfony\Component\EventDispatcher\EventDispatc...
11,393
https://github.com/AndreasAugustin/Gherkin-Demos-cpp/blob/master/vendor/cucumber-cpp/include/cucumber-cpp/internal/CukeEngineImpl.hpp
Github Open Source
Open Source
MIT
2,016
Gherkin-Demos-cpp
AndreasAugustin
C++
Code
101
280
#ifndef CUKE_CUKEENGINE_IMPL_HPP_ #define CUKE_CUKEENGINE_IMPL_HPP_ #include "CukeEngine.hpp" #include "CukeCommands.hpp" namespace cucumber { namespace internal { /** * Default Engine Implementation * * Currently it is a wrapper around CukeCommands. It will have its own * implementation when feature #31 is comp...
27,178
https://github.com/DGideas/TMIPS/blob/master/interface.hpp
Github Open Source
Open Source
Apache-2.0
2,018
TMIPS
DGideas
C++
Code
86
350
// TMIPS interface header file // Used for multilanguage compile // Available language(using ISO 639-1 and ISO-3166-1): // zh_CN // en_US // dgideas@outlook.com #define zh_CN #define APP_NAME "TMIPS" #ifdef zh_CN #define LANGUAGE_LOCALNAME "中文/中国大陆" #define INTERFACE_WORD_VERSION "版本" #define INTERFACE_WORD_RUN_O...
45,866
https://github.com/rlesniak/interview/blob/master/app/modules/Trip/selectors.js
Github Open Source
Open Source
MIT
2,017
interview
rlesniak
JavaScript
Code
42
99
// @flow import { get } from 'lodash'; import type { StateType, PositionType } from './types'; export const getTrips = (state: StateType): { [tripId: string ]: PositionType[] } => get(state, 'tripHistory', {}); export const getActiveTripId = (state: StateType): ?string => get(state, 'activeTripId');
32,635
https://github.com/inogroup/SLib/blob/master/src/slib/ui/label_list_base_impl.h
Github Open Source
Open Source
MIT
null
SLib
inogroup
C
Code
1,474
5,833
/* * Copyright (c) 2008-2020 SLIBIO <https://github.com/SLIBIO> * * 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 * ...
6,083
https://github.com/oising/orleans/blob/master/test/Grains/TestInternalGrains/MultifacetFactoryTestGrain.cs
Github Open Source
Open Source
MIT
2,022
orleans
oising
C#
Code
98
407
using System; using System.Threading.Tasks; using Orleans; using UnitTests.GrainInterfaces; namespace UnitTests.Grains { [Serializable] [GenerateSerializer] public class MultifacetFactoryTestGrainState { [Id(0)] public IMultifacetReader Reader { get; set; } [Id(1)] publ...
34,056
https://github.com/szepeviktor/wp-query-builder/blob/master/src/Query.php
Github Open Source
Open Source
MIT
2,022
wp-query-builder
szepeviktor
PHP
Code
4,898
12,258
<?php namespace PluginEver\QueryBuilder; defined( 'ABSPATH' ) || exit(); class Query { /** * @var string */ protected $id; /** * @var array */ protected $select = []; /** * @var null */ protected $from = null; /** * @var array */ protected $join = []; /** * @var array */ protected $...
33
https://github.com/PowerDNS/elasticsearch-lua/blob/master/src/elasticsearch/endpoints/Indices/ExistsType.lua
Github Open Source
Open Source
MIT
2,022
elasticsearch-lua
PowerDNS
Lua
Code
158
355
------------------------------------------------------------------------------- -- Importing modules ------------------------------------------------------------------------------- local IndicesEndpoint = require "elasticsearch.endpoints.Indices.IndicesEndpoint" --------------------------------------------------------...
14,395
https://github.com/akshayvnayak/attn2d/blob/master/examples/pervasive/modules/archive/densenet.py
Github Open Source
Open Source
MIT
2,021
attn2d
akshayvnayak
Python
Code
433
1,494
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import t...
20,128
https://github.com/Zhiy-Zhang/mgeconvert/blob/master/mgeconvert/frontend/tm_to_ir/op_generators/base.py
Github Open Source
Open Source
Apache-2.0
2,022
mgeconvert
Zhiy-Zhang
Python
Code
236
778
# MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2020 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIES OR CONDITIONS OF ANY ...
44,072
https://github.com/regiontog/rust-analyzer/blob/master/crates/ra_hir/src/nameres/lower.rs
Github Open Source
Open Source
Apache-2.0, MIT
null
rust-analyzer
regiontog
Rust
Code
607
2,330
use std::sync::Arc; use ra_syntax::{ SyntaxKind, AstNode, SourceFile, TreeArc, ast::{self, ModuleItemOwner}, }; use ra_db::{SourceRootId, LocalSyntaxPtr}; use ra_arena::{Arena, RawId, impl_arena_id, map::ArenaMap}; use crate::{ SourceItemId, Path, ModuleSource, HirDatabase, Name, SourceFileItems, HirF...
43,394
https://github.com/mdissel/lucene.net/blob/master/src/Lucene.Net.Spatial/Util/ReciprocalFloatFunction.cs
Github Open Source
Open Source
Apache-2.0
2,016
lucene.net
mdissel
C#
Code
369
908
/* * 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 may ...
48,821
https://github.com/xierensong/learnPython/blob/master/data/hbase/HBASE-19505/HBASE-19505_V3.patch
Github Open Source
Open Source
MIT
null
learnPython
xierensong
null
Spoken
1,394
6,268
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java index 4282a8f..91c468f 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java +++ b/hbase-server/src/main/java/org/apache/...
42,014
https://github.com/ap6108/bce-sdk-java/blob/master/src/main/java/com/baidubce/services/kms/model/KeyMetadata.java
Github Open Source
Open Source
Apache-2.0
2,022
bce-sdk-java
ap6108
Java
Code
418
971
/* * Copyright 2018 Baidu, 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 agreed to in writ...
5,427
https://github.com/coolzoom/namigator/blob/master/parser/Adt/AdtChunk.cpp
Github Open Source
Open Source
MIT
null
namigator
coolzoom
C++
Code
35
110
#include "Adt/AdtChunk.hpp" #include "utility/Exception.hpp" namespace parser { namespace input { AdtChunk::AdtChunk(size_t position, utility::BinaryStream* reader) : Position(position) { reader->rpos(position); Type = reader->Read<unsigned int>(); Size = reader->Read<unsigned int>(); } } // namespac...
42,059
https://github.com/1446554749/jdk_11_src_read/blob/master/jdk11/openj9.dtfj/com/ibm/j9ddr/vm29/pointer/generated/MM_VerboseEventConcurrentKickOffPointer.java
Github Open Source
Open Source
Apache-2.0
null
jdk_11_src_read
1446554749
Java
Code
771
2,731
/******************************************************************************* * Copyright (c) 1991, 2021 IBM Corp. and others * * This program and the accompanying materials are made available under * the terms of the Eclipse Public License 2.0 which accompanies this * distribution and is available at https://w...
14,247
https://github.com/AhsanAyaz/ahsanayaz.io/blob/master/next.config.js
Github Open Source
Open Source
MIT
null
ahsanayaz.io
AhsanAyaz
JavaScript
Code
285
1,444
const withBundleAnalyzer = require('@next/bundle-analyzer')({ enabled: process.env.ANALYZE === 'true', }) const cwaBlogArticles = [ 'adding-comments-to-your-gatsbyjs-blog', 'tech-karo-first-meetup-2021', 'angular-unit-tests-constructor-not-compatible-with-angular-dependency-injection', 'the-most-easy-way-to-...
24,844
https://github.com/ladas-larry/homeday-blocks/blob/master/tests/unit/components/HdLazyImage.spec.js
Github Open Source
Open Source
MIT
null
homeday-blocks
ladas-larry
JavaScript
Code
50
170
import { mount } from '@vue/test-utils'; import HdLazyImage from '@/components/HdLazyImage.vue'; import ITEMS from '@/stories/mocks/GALLERY_ITEMS'; describe('HdLazyImage', () => { let wrapper; const sampleImage = ITEMS[2]; beforeEach(() => { wrapper = mount(HdLazyImage, { propsData: { src: sam...
18,283
https://github.com/dumbNickname/platform-frontend/blob/master/app/components/shared/forms/formField/FormFieldDate.tsx
Github Open Source
Open Source
MIT
null
platform-frontend
dumbNickname
TypeScript
Code
372
1,300
import { Field, FormikErrors, FormikProps, FormikTouched } from "formik"; import * as PropTypes from "prop-types"; import * as React from "react"; import { FormGroup, Input } from "reactstrap"; import * as styles from "./FormFieldDate.module.scss"; import * as errorStyles from "./FormStyles.module.scss"; interface IP...
20,019
https://github.com/phprojects/thinksns-plus/blob/master/resources/spa/src/components/common/btnSwitch.vue
Github Open Source
Open Source
Apache-2.0
2,020
thinksns-plus
phprojects
Vue
Code
412
1,765
<template> <div :class="[`${prefixCls}-wrap`]"> <span :class="[`${prefixCls}-text`]" @click="onClick"> <slot /> </span> <div :class="[`${prefixCls}-append`]"> <slot name="append" /> </div> <div :class="[`${prefixCls}`]"> <label ref="label" :for="id" :class...
20,845
https://github.com/hoangtuyb96/dd-trace-rb/blob/master/spec/ddtrace/profiling/pprof/builder_spec.rb
Github Open Source
Open Source
MIT, Apache-2.0, BSD-3-Clause
2,021
dd-trace-rb
hoangtuyb96
Ruby
Code
479
2,122
require 'spec_helper' require 'ddtrace/profiling' require 'ddtrace/profiling/events/stack' require 'ddtrace/profiling/pprof/builder' RSpec.describe Datadog::Profiling::Pprof::Builder do before do skip 'Profiling is not supported.' unless Datadog::Profiling.supported? end subject(:builder) { described_class...
11,068
https://github.com/andy-hanson/mason-compile/blob/master/lib/private/lex/lexNumber.js
Github Open Source
Open Source
Unlicense
null
mason-compile
andy-hanson
JavaScript
Code
158
586
(function (factory) { if (typeof module === 'object' && typeof module.exports === 'object') { var v = factory(require, exports);if (v !== undefined) module.exports = v; } else if (typeof define === 'function' && define.amd) { define(["require", "exports", 'esast/lib/Loc', '../token/Token', './gr...
32,778
https://github.com/sdojjy/tiflow/blob/master/engine/pkg/meta/metaclient/common.go
Github Open Source
Open Source
Apache-2.0
2,022
tiflow
sdojjy
Go
Code
727
1,533
// Copyright 2022 PingCAP, 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 agreed to i...
37,394
https://github.com/galak/sdk-ng/blob/master/meta-zephyr-sdk/recipes-devtools/qemu/files/0009-hw-sparc-leon-Fix-compilation-errors-with-qemu-6-cha.patch
Github Open Source
Open Source
Apache-2.0
2,022
sdk-ng
galak
null
Spoken
162
591
From fb9a3921040b1115db534f88a74997bffe3204be Mon Sep 17 00:00:00 2001 From: Kumar Gala <kumar.gala@linaro.org> Date: Thu, 25 Mar 2021 18:59:10 -0500 Subject: [PATCH 09/16] hw/sparc/leon: Fix compilation errors with qemu 6 changes Make updates to build due to upstream changes in qemu 6.0.0 Signed-off-by: Kumar Gala ...
31,793
https://github.com/ericsnowcurrently/mandelbrot/blob/master/tests/util.py
Github Open Source
Open Source
BSD-2-Clause
null
mandelbrot
ericsnowcurrently
Python
Code
15
59
class Stub: def __init__(self): self.calls = [] def _add_call(self, name, *args, **kwargs): self.calls.append((name, args, kwargs))
46,942
https://github.com/deepdik/cityapl/blob/master/static_cdn/js/app/resources/pricing/pricing.module.js
Github Open Source
Open Source
MIT
2,018
cityapl
deepdik
JavaScript
Code
3
18
'use strict'; angular.module('pricing.services',[]);
38,525
https://github.com/giuliacassara/CartoonGan-tensorflow/blob/master/take_snapshots.py
Github Open Source
Open Source
Apache-2.0
2,019
CartoonGan-tensorflow
giuliacassara
Python
Code
116
337
#!/usr/bin/python # Importing all necessary libraries import cv2 import os # Read the video from specified path cam = cv2.VideoCapture("./Samsara.2011.1080p.BRRip.x264.AAC-Ozlem.mp4") framerate=(int)(cam.get(5)) print(framerate) try: # creating a folder named data if not os.path.exists('imgs_ambient_full'): ...
28,307
https://github.com/mmarvo/xivapi.com/blob/master/src/Exception/ContentGoneException.php
Github Open Source
Open Source
MIT
2,022
xivapi.com
mmarvo
PHP
Code
28
73
<?php namespace App\Exception; use App\Common\Exceptions\ExceptionTrait; class ContentGoneException extends \Exception { use ExceptionTrait; const CODE = 410; const MESSAGE = 'The resource at this endpoint does not exist.'; }
29,355
https://github.com/VanshikaSingh10/DataStructures-Algorithms/blob/master/Striver Sheet/Day-16/Compare Version Numbers.cpp
Github Open Source
Open Source
MIT
2,021
DataStructures-Algorithms
VanshikaSingh10
C++
Code
567
1,144
/* Compare Version Numbers ======================= Given two version numbers, version1 and version2, compare them. Version numbers consist of one or more revisions joined by a dot '.'. Each revision consists of digits and may contain leading zeros. Every revision contains at least one character. Revisions are 0-index...
24,417
https://github.com/yoolk/yoolk_api/blob/master/lib/yoolk_api/resources/location.rb
Github Open Source
Open Source
MIT
2,014
yoolk_api
yoolk
Ruby
Code
12
34
module YoolkApi class Location < Resource has_many :listings, class_name: 'Listing' end end
39,930
https://github.com/erjohnso/stackdriver-tools/blob/master/src/stackdriver-nozzle/filter/filter_test.go
Github Open Source
Open Source
Apache-2.0, LicenseRef-scancode-unknown-license-reference
2,017
stackdriver-tools
erjohnso
Go
Code
338
1,516
/* * Copyright 2017 Google 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 agreed to i...
13,330
https://github.com/zwo/PKShortVideo/blob/master/PKShortVideo/GPUImage/GPUImage.h
Github Open Source
Open Source
MIT
2,018
PKShortVideo
zwo
Objective-C
Code
42
257
#import "GLProgram.h" #import "GPUImageBuffer.h" #import "GPUImageContext.h" #import "GPUImageFilter.h" #import "GPUImageFilterGroup.h" #import "GPUImageFilterPipeline.h" #import "GPUImageFourInputFilter.h" #import "GPUImageFramebuffer.h" #import "GPUImageFramebufferCache.h" #import "GPUImageMovieWriter.h" #import "GP...
46,707
https://github.com/Dukoia/simple-mall/blob/master/mall-pms/pms-boot/src/main/java/com/yqf/mall/pms/service/IPmsBrandService.java
Github Open Source
Open Source
Apache-2.0
2,022
simple-mall
Dukoia
Java
Code
13
83
package com.yqf.mall.pms.service; import com.baomidou.mybatisplus.extension.service.IService; import com.yqf.mall.pms.pojo.entity.PmsBrand; public interface IPmsBrandService extends IService<PmsBrand> { }
31,779
https://github.com/dl9pf/alexa-auto-sdk/blob/master/modules/contact-uploader/engine/src/ContactUploader/ContactUploaderEngineImpl.cpp
Github Open Source
Open Source
Apache-2.0
null
alexa-auto-sdk
dl9pf
C++
Code
1,911
7,531
/* * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0/ * * or in the "...
2,210
https://github.com/tianxiaogu/ape/blob/master/src/com/android/commands/monkey/ape/model/Model.java
Github Open Source
Open Source
Apache-2.0
2,022
ape
tianxiaogu
Java
Code
1,594
5,028
/* * Copyright 2020 Advanced Software Technologies Lab at ETH Zurich, Switzerland * * 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 * ...
20,251
https://github.com/antonioromeu/PO_1920/blob/master/m19-app/src/m19/app/App.java
Github Open Source
Open Source
MIT
null
PO_1920
antonioromeu
Java
Code
74
219
package m19.app; import static pt.tecnico.po.ui.Dialog.IO; import m19.LibraryManager; import m19.exceptions.ImportFileException; /** * Main driver for the library management application. */ public class App { public static void main(String[] args) { /** * @param args */ LibraryMa...
17,898
https://github.com/gatling/gatling-build-plugin/blob/master/src/sbt-test/scalafix/none/src/main/scala/Hello.scala
Github Open Source
Open Source
Apache-2.0
2,021
gatling-build-plugin
gatling
Scala
Code
22
65
import scala.io.Source import java.util.Random object Hello extends App { val src = Source.fromString("Hello").mkString("\n") val random = (new Random()).nextInt(100) println(src + random) }
20,249
https://github.com/deepkick/ridesharing-ios/blob/master/Rider/View/PermissionsView.swift
Github Open Source
Open Source
MIT
2,022
ridesharing-ios
deepkick
Swift
Code
105
263
import AppState import CommonModels import CommonViewComponents import CommonViews import HyperTrack import HyperTrackHelper import SwiftUI struct PermissionsView: View { /// LocationManager provide updates user locations private var locationManager: LocationManager /// Rider data store @ObservedObject var sto...
46,715
https://github.com/kevinlq/Qt-Creator-Opensource-Study/blob/master/qt-creator-opensource-src-4.6.1/tests/unit/unittest/projectpart-test.cpp
Github Open Source
Open Source
MIT
2,022
Qt-Creator-Opensource-Study
kevinlq
C++
Code
376
2,099
/**************************************************************************** ** ** Copyright (C) 2016 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance w...
30,244
https://github.com/bborumoore/fitness-tracker/blob/master/seed/seed.js
Github Open Source
Open Source
MIT
null
fitness-tracker
bborumoore
JavaScript
Code
166
569
const mongoose = require('mongoose'); const db = require('../models'); mongoose.connect('mongodb://localhost/workout', { useNewUrlParser: true, useFindAndModify: false, useUnifiedTopology: true, }); const workoutSeed = [ { day: new Date(new Date().setDate(new Date().getDate() - 5)), exercises: [ ...
25,439
https://github.com/omrialmog/Model-References/blob/master/TensorFlow/nlp/albert/albert_mrpc_main.py
Github Open Source
Open Source
Apache-2.0
2,021
Model-References
omrialmog
Python
Code
370
1,908
############################################################################### # Copyright (C) 2020-2021 Habana Labs, Ltd. an Intel Company ############################################################################### import os import sys from pathlib import Path import subprocess from central.habana_model_runner_u...
23,723
https://github.com/Shikhar10000/koalixcrm/blob/master/koalixcrm/crm/migrations/0002_auto_20170927_2042.py
Github Open Source
Open Source
BSD-3-Clause
2,020
koalixcrm
Shikhar10000
Python
Code
47
166
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-27 20:42 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crm', '0001_initial'), ] operations = [ migrations.AlterField( ...
9,041
https://github.com/hyskomv/go-gin-mgo/blob/master/config/middlewares/auth.go
Github Open Source
Open Source
MIT
null
go-gin-mgo
hyskomv
Go
Code
77
280
package middlewares import ( "github.com/gin-gonic/gin" "strings" ) func Authenticate(c *gin.Context) { authStr := c.GetHeader("Authorization") tokenStr := "" if strings.HasPrefix(authStr, "Bearer ") { tokenStr = authStr[7:] } if tokenStr == "" { c.Next() return } //token, err := jwt.Parse(tokenStr,...
12,250
https://github.com/johanek/puppet-parse/blob/master/lib/vendor/puppet/parser/functions/generate.rb
Github Open Source
Open Source
MIT
2,019
puppet-parse
johanek
Ruby
Code
190
452
# Runs an external command and returns the results Puppet::Parser::Functions::newfunction(:generate, :type => :rvalue, :doc => "Calls an external command on the Puppet master and returns the results of the command. Any arguments are passed to the external command as arguments. If the generator does not ex...
39,225
https://github.com/dimitarminchev/ITCareer/blob/master/05. Object Oriented Programming/2019/06. Working with Objects/635/Program.cs
Github Open Source
Open Source
MIT
2,022
ITCareer
dimitarminchev
C#
Code
91
373
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Reflection; namespace _635 { class Program { static void Main(string[] args) { Type type = typeof(HarvestingFields); FieldInfo[] info = type....
48,419
https://github.com/pulibrary/figgy/blob/master/app/assets/stylesheets/variables/typography.scss
Github Open Source
Open Source
Apache-2.0
2,023
figgy
pulibrary
SCSS
Code
30
132
$font-serif: 'Droid Serif', Georgia, Times, serif !default; $font-sans: 'Dejavu Sans', Helvetica, sans-serif !default; $font-mono: 'Lucida Console', Monaco, monospace !default; $text-color: #000 !default; $font-family-sans-serif: $font-sans; $font-family-serif: $font-serif; $bootstrap-sass-asset-helper: true; $font-siz...
50,334
https://github.com/harikrishnanjack/backend-bookstore/blob/master/services/user.service.js
Github Open Source
Open Source
MIT
2,021
backend-bookstore
harikrishnanjack
JavaScript
Code
43
98
const db = require("../models"); const User = db.user; // services for getting user details // username, user profile pic, email etc // Get user by id exports.getUserById = async (_userId, projectionParams = {}) => { projectionParams = {...projectionParams, password:0}; return await User.findById(_userId).se...
28,494