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/markle12/random13/blob/master/r13.js | Github Open Source | Open Source | MIT | null | random13 | markle12 | JavaScript | Code | 182 | 492 | (() => {
const modes = {
garbage: () => {
// so-called 'developers'
return Math.random()+13;
},
pure: () => {
// me, an intellectual
var out = Math.random()*100;
return out >= 13 && out <= 14 ? out : modes.pure();
}
};
const r13 = function()
{
var precision = 4;
var count = 1;
var mode... | 36,240 |
https://github.com/jcallinan/CoreGameExamples/blob/master/APiratesLife/Data/Scripts/APIOutposts.lua | Github Open Source | Open Source | MIT | null | CoreGameExamples | jcallinan | Lua | Code | 98 | 298 | local API = {}
-- nil RegisterOutpost() [Client, Server]
function API.RegisterOutpost(id, functionTable)
-- Generate the table if it doesn't exist
if not _G.APIOutposts then
_G.APIOutposts = {}
end
if _G.APIOutposts[id] then
warn(string.format("Registering outpost with id: %s twice", id))
end
_G.APIOutpost... | 32,827 |
https://github.com/qpmnguyen/sc2meta/blob/master/consistency_replicability/consistency_replicability_songbird.bash | Github Open Source | Open Source | MIT | 2,020 | sc2meta | qpmnguyen | Shell | Code | 496 | 3,278 | #!/bin/bash
#SBATCH --job-name=songbird # Job name
#SBATCH -p normal # priority
#SBATCH --mail-type=ALL # Mail events (NONE, BEGIN, END, FAIL, ALL)
#SBATCH --mail-user=mcalgaro93@gmail.com # Where to send mail
#SBATCH --nodes=1 # Use one node
#SBATCH --ntasks=1 ... | 29,839 |
https://github.com/R3DP/point_cloud_viewer/blob/master/src/geometry/cube.rs | Github Open Source | Open Source | Apache-2.0 | 2,020 | point_cloud_viewer | R3DP | Rust | Code | 147 | 490 | //! An axis-aligned cube.
use cgmath::{Point3, Vector3};
use collision::{Aabb, Aabb3};
#[derive(Debug, Clone)]
pub struct Cube {
min: Point3<f64>,
edge_length: f64,
}
impl Cube {
pub fn bounding(aabb: &Aabb3<f64>) -> Self {
let edge_length = (aabb.max().x - aabb.min().x)
.max(aabb.max... | 24,215 |
https://github.com/InfectedBytes/GameJoltDotNetExamples/blob/master/SpaceShooter/Utils/External/MonoGameTextbox/Text.cs | Github Open Source | Open Source | MIT | null | GameJoltDotNetExamples | InfectedBytes | C# | Code | 542 | 1,231 | // ***************************************************************************
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any p... | 39,124 |
https://github.com/nadia-polikarpova/boogaloo/blob/master/Language/Boogie/Environment.hs | Github Open Source | Open Source | 2,020 | boogaloo | nadia-polikarpova | Haskell | Code | 1,927 | 4,312 | {-# LANGUAGE TemplateHaskell, Rank2Types, FlexibleInstances, TypeSynonymInstances #-}
-- | Execution state for the interpreter
module Language.Boogie.Environment (
Store,
emptyStore,
prettyFlatThunk,
prettyFlatStore,
MapInstance,
MapCache,
MapPointKind (..),
MapAux,
MapAuxCache,
Memory,
StoreL... | 40,419 | |
https://github.com/marianamn/marianamn-myblog-api/blob/master/server/src/utils/utils.js | Github Open Source | Open Source | MIT | 2,019 | marianamn-myblog-api | marianamn | JavaScript | Code | 101 | 347 | const path = require('path');
const constants = require('../common/constants');
const getMessages = require('../common/messages');
const fs = require('fs');
let message = getMessages('User');
module.exports = {
isRequestEmpty(requestBody) {
const zeroLength = 0;
if (Object.keys(requestBody).lengt... | 28,974 |
https://github.com/vmichalak/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/resources/testProject/incrementalMultiproject/app/src/main/kotlin/foo/fooUseB.kt | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,022 | kotlin | vmichalak | Kotlin | Code | 11 | 29 | package foo
import bar.*
private fun fooUseB(b: B) {
b.b()
} | 39,997 |
https://github.com/merx3/docker-manager/blob/master/resources/views/dockerfile/index.blade.php | Github Open Source | Open Source | MIT | null | docker-manager | merx3 | PHP | Code | 387 | 2,079 | <!DOCTYPE html>
<html>
<head>
<title>Laravel</title>
<link href="https://fonts.googleapis.com/css?family=Lato:100" rel="stylesheet" type="text/css">
<link href="css/app.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
... | 39,693 |
https://github.com/mcculic/millarowframework/blob/master/src/Millarow.Presentation.WPF/MVP/Framework/MessageBoxIconConverter.cs | Github Open Source | Open Source | MIT | null | millarowframework | mcculic | C# | Code | 55 | 211 | using Millarow.Presentation.MVP.Services;
using System;
using System.Windows;
namespace Millarow.Presentation.WPF.MVP.Framework
{
public static class MessageBoxIconConverter
{
public static MessageBoxImage Convert(this MessageBoxIcon icon)
{
switch (icon)
{
... | 48,109 |
https://github.com/LineageOS/android_frameworks_av/blob/master/drm/mediadrm/plugins/clearkey/hidl/include/DeviceFiles.h | Github Open Source | Open Source | LicenseRef-scancode-unicode, Apache-2.0 | 2,023 | android_frameworks_av | LineageOS | C++ | Code | 184 | 595 | // Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
//
#ifndef CLEARKEY_DEVICE_FILES_H_
#define CLEARKEY_DEVICE_FILES_H_
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
#include <set>
#in... | 38,868 |
https://github.com/ChristopherRabotin/GMAT/blob/master/src/gmatutil/util/SPADFileReader.hpp | Github Open Source | Open Source | Apache-2.0 | 2,022 | GMAT | ChristopherRabotin | C++ | Code | 729 | 1,629 | //------------------------------------------------------------------------------
// SPADFileReader
//------------------------------------------------------------------------------
// GMAT: General Mission Analysis Tool
//
// Copyright (c) 2002 - 2020 United States Government as represen... | 16,405 |
https://github.com/testingManager/notepad/blob/master/app/Http/Controllers/PromptController.php | Github Open Source | Open Source | MIT | null | notepad | testingManager | PHP | Code | 138 | 527 | <?php
namespace App\Http\Controllers;
use App\Http\Requests\NewPromptRequest;
use App\Http\Requests\UpdatePromptRequest;
use App\Repositories\PromptRepository;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class PromptController extends Controller
{
public fu... | 38,602 |
https://github.com/cctvzd7/aliyun-openapi-java-sdk/blob/master/aliyun-java-sdk-retailcloud/src/main/java/com/aliyuncs/retailcloud/transform/v20180313/ListDeployConfigResponseUnmarshaller.java | Github Open Source | Open Source | Apache-2.0 | 2,020 | aliyun-openapi-java-sdk | cctvzd7 | Java | Code | 239 | 1,263 | /*
* 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 writing, software
* distributed u... | 801 |
https://github.com/Flithor/FastXPCollection/blob/master/src/main/java/com/brianstweaks/fastXpCollection/Event.java | Github Open Source | Open Source | MIT | null | FastXPCollection | Flithor | Java | Code | 395 | 2,242 | package com.brianstweaks.fastXpCollection;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import scala.tools.nsc.doc.base.CommentFactoryBase.TagKey;
import scala.tools.nsc.typechecker.Tags;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.bloc... | 45,508 |
https://github.com/oliverswitzer/balloon-bot/blob/master/clients/lib/clients/slack/wrapper.rb | Github Open Source | Open Source | MIT | 2,020 | balloon-bot | oliverswitzer | Ruby | Code | 124 | 559 | module Clients
module Slack
class Wrapper
attr_reader :slack_web_client
def initialize(slack_web_client)
@slack_web_client = slack_web_client
end
def set_channel_topic(message:)
slack_web_client.channels_setTopic(
channel: "##{ENV['DEPLOYMENTS_CHANNEL']}",
... | 29,562 |
https://github.com/Nagato09/Vehicle-following-model-with-3DAnimation/blob/master/get_hitbox.m | Github Open Source | Open Source | BSD-3-Clause | 2,020 | Vehicle-following-model-with-3DAnimation | Nagato09 | MATLAB | Code | 58 | 227 | function Hitbox = get_hitbox(v_frame,v_pos)
centerP = [v_pos(1);v_pos(2)];
angle = v_pos(3); % Vehicle orientation in rad
a = v_frame(1)/2;
b = v_frame(2)/2;
p1 =[a; b];
p2 =[a; -b];
p3 =[-a; -b];
p4 =[-a; b];
Rmatrix = [cos(angle) -sin(angle); sin(angle) co... | 24,055 |
https://github.com/batin/NoisyNotes/blob/master/src/services/auth.js | Github Open Source | Open Source | MIT | 2,021 | NoisyNotes | batin | JavaScript | Code | 451 | 1,323 | import React, { useReducer, createContext } from "react"
const isBrowser = () => typeof window !== "undefined"
const setCookie = (cname, cvalue, hours) => {
const d = new Date()
d.setTime(d.getTime() + hours * 60 * 60 * 1000)
const expires = "expires=" + d.toUTCString()
document.cookie = cname + "=" + cvalue ... | 36,751 |
https://github.com/paddlelaw/bach/blob/master/com.github.sormuras.bach/main/java/com/github/sormuras/bach/tool/JPackageCall.java | Github Open Source | Open Source | MIT | 2,021 | bach | paddlelaw | Java | Code | 43 | 152 | package com.github.sormuras.bach.tool;
import com.github.sormuras.bach.ToolCall;
import java.util.List;
public record JPackageCall(List<String> arguments) implements ToolCall<JPackageCall> {
public JPackageCall() {
this(List.of());
}
@Override
public String name() {
return "jpackage";
}
@Overri... | 56,016 |
https://github.com/marcello-travaglini/spid-keycloak-provider/blob/master/src/main/java/org/keycloak/broker/spid/metadata/extensions/SpidBillingContactTypePrivateSP.java | Github Open Source | Open Source | Apache-2.0 | null | spid-keycloak-provider | marcello-travaglini | Java | Code | 176 | 1,061 | package org.keycloak.broker.spid.metadata.extensions;
import org.jboss.logging.Logger;
import org.keycloak.broker.spid.SpidIdentityProviderConfig;
import org.keycloak.saml.common.exceptions.ConfigurationException;
import org.keycloak.saml.common.util.StringUtil;
import org.w3c.dom.Element;
import java.util.Optional;
... | 6,349 |
https://github.com/weilLove/LWWXTool/blob/master/LWWXToolDemo/Pods/Headers/Public/LWWXTool/UIImage+ResizeImage.h | Github Open Source | Open Source | MIT | 2,018 | LWWXTool | weilLove | C | Code | 32 | 113 | //
// UIImage+ResizeImage.h
// LWWXToolDemo
//
// Created by weil on 2018/11/20.
// Copyright © 2018 allyoga. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (ResizeImage)
+ (NSData *)compressImage:(UIImage *)sourceImage toByte:(NSUInteger)maxLength;
@end
| 22,297 |
https://github.com/Alexander-Ignatyev/quiz/blob/master/src/View.elm | Github Open Source | Open Source | BSD-3-Clause | null | quiz | Alexander-Ignatyev | null | Spoken | 297 | 715 | module View exposing (..)
import RemoteData exposing (WebData)
import String
import Array exposing (Array)
import Dict exposing (Dict)
import Html exposing (Html, text, div)
import Html.Attributes exposing (class)
import Msgs exposing (Msg)
import Models exposing (Model, TestSuite, getAnswer, getAnswers)
import Views.... | 23,098 |
https://github.com/lbooker42/deephaven-core/blob/master/web/shared-beans/src/main/java/io/deephaven/web/shared/data/treetable/TreeTableRequest.java | Github Open Source | Open Source | MIT | null | deephaven-core | lbooker42 | Java | Code | 263 | 827 | /**
* Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending
*/
package io.deephaven.web.shared.data.treetable;
import io.deephaven.web.shared.data.FilterDescriptor;
import io.deephaven.web.shared.data.SortDescriptor;
import io.deephaven.web.shared.data.TableHandle;
import java.io.Serializable;
import java.... | 41,991 |
https://github.com/duong97/trackers/blob/master/models/UserTracking.php | Github Open Source | Open Source | BSD-3-Clause | null | trackers | duong97 | PHP | Code | 684 | 2,327 | <?php
/**
* Anivia *
* __.oOo.__
* /'( _ )`\
* / . \/^\/ . \
* / _)_`-'_(_ \
* /.-~ ).( ~-.\
* /' /\_/\ `\
* . "-V-"
*/
namespace app\models;
use Yii;
use app\models\Products;
use app\models\Loggers;
use app\helpers\Constants;
/**
* This is the model class for table "use... | 7,769 |
https://github.com/roydejong/MultiplayerCore/blob/master/MultiplayerCore/Beatmaps/NoInfoBeatmapLevel.cs | Github Open Source | Open Source | MIT | 2,022 | MultiplayerCore | roydejong | C# | Code | 54 | 145 | using MultiplayerCore.Beatmaps.Abstractions;
namespace MultiplayerCore.Beatmaps
{
public class NoInfoBeatmapLevel : MpBeatmapLevel
{
public override string levelHash { get; protected set; }
public override string songName => string.Empty;
public override string songSubName => string.Em... | 52,153 |
https://github.com/bingchunjin/1806_SDK/blob/master/linux-4.14.90-dev/linux-4.14.90/net/smc/smc_llc.h | Github Open Source | Open Source | MIT | 2,022 | 1806_SDK | bingchunjin | C | Code | 150 | 606 | /* SPDX-License-Identifier: GPL-2.0 */
/*
* Shared Memory Communications over RDMA (SMC-R) and RoCE
*
* Definitions for LLC (link layer control) message handling
*
* Copyright IBM Corp. 2016
*
* Author(s): Klaus Wacker <Klaus.Wacker@de.ibm.com>
* Ursula Braun <ubraun@linux.vnet.ibm.com>
*/
#... | 13,847 |
https://github.com/mihaioltean/basic-scad/blob/master/robot/arm/gripper.scad | Github Open Source | Open Source | MIT | null | basic-scad | mihaioltean | null | Spoken | 547 | 2,156 | // Author: Mihai Oltean, https://mihaioltean.github.io, mihai.oltean@gmail.com
// More details: https://jenny5.org, https://jenny5-robot.github.io/
// Source code: github.com/jenny5-robot
// License: MIT
//---------------------------------------------------------------
include <../../basic_scad/tolerance.scad>
use <..... | 4,138 |
https://github.com/jhcheung/superhero-battler-cli/blob/master/lib/fighter.rb | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-public-domain | 2,019 | superhero-battler-cli | jhcheung | Ruby | Code | 104 | 475 | class Fighter < ActiveRecord::Base
has_many :drafts
has_many :teams, through: :drafts
def superhero_image_dir #ternary statment, returns the name of the picture (which is set to id.jpg) or use placeholder
File.exist?("./imgs/#{id}.jpg") ? "./imgs/#{self.id}.jpg" : "./imgs/placeholder_both.jpg"
... | 15,684 |
https://github.com/striderarun/fictional-sports-store/blob/master/SportsCommon/src/main/java/com/arun/util/SecurityUtil.java | Github Open Source | Open Source | MIT | null | fictional-sports-store | striderarun | Java | Code | 126 | 434 | package com.arun.util;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
public class SecurityUtil {
private static final String HMAC_SHA1_ALGORITHM = "HmacSHA1";
... | 20,028 |
https://github.com/seihyunJeong/axiom/blob/master/src/components/header.js | Github Open Source | Open Source | MIT | null | axiom | seihyunJeong | JavaScript | Code | 106 | 316 | import React from 'react';
import styled from 'styled-components';
import Logo from '../images/logo.svg';
import { mediaQuery } from '../utils/style';
const Container = styled.header`
overflow: hidden;
margin: 0 calc(-1 * var(--pad-x));
`;
const Border1 = styled.div`
width: 100%;
height: 3px;
background-col... | 55,866 |
https://github.com/BackupTheBerlios/istuff-svn/blob/master/trunk/ProxyLauncher/PLMainFrame.java | Github Open Source | Open Source | Artistic-2.0 | 2,008 | istuff-svn | BackupTheBerlios | Java | Code | 3,887 | 13,602 | import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event... | 8,165 |
https://github.com/miamor/8dot/blob/master/assets/js/testNew.program.js | Github Open Source | Open Source | MIT | 2,014 | 8dot | miamor | JavaScript | Code | 107 | 560 | function submit_form_test_program () {
$('form.form-new-test-program').submit(function () {
$form = $(this);
c = $form.attr('data-c');
$form.find('.step:last').find('.required').not(':hidden .required').each(function() {
check_valid(this);
$(this).change(function () {
check_valid(this)
})
});
if... | 47,022 |
https://github.com/Li1989Xiang/mobile3-gao/blob/master/src/main/java/mobile/result/ResultHolder.java | Github Open Source | Open Source | MIT | 2,016 | mobile3-gao | Li1989Xiang | Java | Code | 66 | 227 | package mobile.result;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
public class ResultHolder {
private static Map<String, List<ResultBean>> mResultMap = new LinkedHashMap<>();
private ResultHolder() {}
public static void putResult(String testName, R... | 30,221 |
https://github.com/RRethy/ToonUp/blob/master/app/src/main/java/com/bonnetrouge/toonup/Commons/Ext/ToonUpExt.kt | Github Open Source | Open Source | Apache-2.0 | 2,022 | ToonUp | RRethy | Kotlin | Code | 23 | 94 | package com.bonnetrouge.toonup.Commons.Ext
import android.util.Log
import com.bonnetrouge.toonup.ToonUpApp
val app: ToonUpApp
get() = ToonUpApp.app
val DTAG = "quman"
fun dog(text: String) {
Log.d(DTAG, text)
}
| 15,998 |
https://github.com/Water-bamboo/trust-core/blob/master/Sources/Ethereum/EthereumTransaction.swift | Github Open Source | Open Source | MIT, GPL-3.0-only | 2,018 | trust-core | Water-bamboo | Swift | Code | 204 | 446 | // Copyright © 2017-2018 Trust.
//
// This file is part of Trust. The full Trust copyright notice, including
// terms governing use, modification, and redistribution, is contained in the
// file LICENSE at the root of the source code distribution tree.
import BigInt
/// Ethereum transaction.
public struct EthereumTra... | 19,273 |
https://github.com/sishenyihuba/Weibo/blob/master/Weibo/06-Compose(发布)/Emoticon/Model/Emoticon.swift | Github Open Source | Open Source | MIT | 2,017 | Weibo | sishenyihuba | Swift | Code | 183 | 550 | //
// Emoticon.swift
// 09-表情键盘
//
// Created by xiaomage on 16/4/12.
// Copyright © 2016年 小码哥. All rights reserved.
//
import UIKit
class Emoticon: NSObject {
// MARK:- 定义属性
var code : String? { // emoji的code
didSet {
guard let code = code else {
return
... | 10,116 |
https://github.com/AnneSophieS/manager/blob/master/packages/manager/apps/telecom/src/app/telecom/telephony/billingAccount/orderAlias/special/telecom-telephony-billing-account-orderAlias-special.controller.js | Github Open Source | Open Source | BSD-3-Clause | null | manager | AnneSophieS | JavaScript | Code | 608 | 2,415 | import filter from 'lodash/filter';
import find from 'lodash/find';
import forEach from 'lodash/forEach';
import head from 'lodash/head';
import map from 'lodash/map';
import pick from 'lodash/pick';
angular
.module('managerApp')
.controller(
'TelecomTelephonyAliasOrderSpecialCtrl',
function TelecomTelepho... | 52,200 |
https://github.com/coxo/ocean-player/blob/master/dependencies.js | Github Open Source | Open Source | Unlicense | null | ocean-player | coxo | JavaScript | Code | 13 | 39 | import pkg from './package.json'
export default {
...pkg.dependencies,
react: '',
'react-dom': '',
}
| 52,379 |
https://github.com/ryanhuellen/hpanel/blob/master/src/modules/Stats/liststatsbydomain.ts | Github Open Source | Open Source | MIT | 2,021 | hpanel | ryanhuellen | TypeScript | Code | 33 | 120 | // https://documentation.cpanel.net/display/DD/UAPI+Functions+-+Stats%3A%3Alist_stats_by_domain
export interface listStatsByDomainParameters {
engine: string;
domain: string;
ssl?: boolean;
}
import { execute } from './index';
export default (param: listStatsByDomainParameters) => {
return execute({
funct... | 52,251 |
https://github.com/quicoto/workout-tracker/blob/master/src/js/utils.js | Github Open Source | Open Source | MIT | null | workout-tracker | quicoto | JavaScript | Code | 80 | 265 | const VALUE_DAY_IN_MILLISECONDS = 86400000;
function getTwoDigitFormat(value) {
if (value < 10) {
return `0${value}`
}
return `${value}`
}
export function getDateAsYMD(dateObject) {
const year = dateObject.getUTCFullYear()
const month = getTwoDigitFormat(dateObject.getUTCMonth() + 1)
const day = getT... | 5,427 |
https://github.com/imos/icfpc2017/blob/master/iwiwi/src/agl/connectivity/strongly_connected_components.h | Github Open Source | Open Source | MIT | 2,017 | icfpc2017 | imos | C | Code | 169 | 590 | #pragma once
#include <stack>
#include "graph/graph.h"
namespace agl {
template<typename GraphT = G>
std::vector<V> strongly_connected_components(const GraphT& g) {
const V num_v = g.num_vertices();
std::vector<V> scc(num_v);
V num_visit = 0, num_scc = 0;
std::vector<V> ord(num_v, -1);
std::vector<V> low(n... | 51,096 |
https://github.com/hessamkhoobkar/Inline-text-editor/blob/master/script.js | Github Open Source | Open Source | MIT | null | Inline-text-editor | hessamkhoobkar | JavaScript | Code | 146 | 482 | function getSelectedText() {
var text = "";
if (typeof window.getSelection != "undefined") {
text = window.getSelection().toString();
} else if (typeof document.selection != "undefined" && document.selection.type == "Text") {
text = document.selection.createRange().text;
}
return tex... | 11,572 |
https://github.com/fjtirado/quarkus-openapi-generator/blob/master/deployment/src/test/java/io/quarkiverse/openapi/generator/deployment/assertions/Assertions.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | quarkus-openapi-generator | fjtirado | Java | Code | 27 | 139 | package io.quarkiverse.openapi.generator.deployment.assertions;
import com.github.javaparser.ast.body.MethodDeclaration;
import io.quarkiverse.openapi.generator.testutils.circuitbreaker.assertions.CircuitBreakerMethodAssert;
public final class Assertions extends org.assertj.core.api.Assertions {
private Asserti... | 34,865 |
https://github.com/nsoma97/hun-date-parser/blob/master/test/test_restricted_parsing.py | Github Open Source | Open Source | Apache-2.0 | null | hun-date-parser | nsoma97 | Python | Code | 353 | 1,390 | import pytest
from datetime import datetime
from hun_date_parser.date_parser.interval_restriction import extract_datetime_within_interval, ExtractWithinRangeSuccess
scenarios = [
({'start_date': datetime(2021, 10, 11), 'end_date': datetime(2021, 10, 18, 23, 59, 59)},
'kedden',
(ExtractWithi... | 21,105 |
https://github.com/spaceship-labs/actual-web/blob/master/app/scripts/controllers/category.js | Github Open Source | Open Source | MIT | null | actual-web | spaceship-labs | JavaScript | Code | 806 | 3,750 | 'use strict';
angular.module('actualWebApp')
.controller('CategoryCtrl', CategoryCtrl);
function CategoryCtrl(
$scope,
$routeParams,
$mdSidenav,
$timeout,
$rootScope,
categoriesService,
productService,
productSearchService,
metaTagsService,
breadcrumbService,
SITE
){
var vm = this;
... | 36,577 |
https://github.com/xxoolm/Thanox-1/blob/master/android/modules/module_locker/src/main/java/github/tornaco/practice/honeycomb/locker/ui/verify/Biometrics.kt | Github Open Source | Open Source | Apache-2.0 | 2,022 | Thanox-1 | xxoolm | Kotlin | Code | 145 | 712 | package github.tornaco.practice.honeycomb.locker.ui.verify
import android.content.Context
import androidx.biometric.BiometricManager
import androidx.biometric.BiometricPrompt
import androidx.core.content.ContextCompat
import androidx.fragment.app.FragmentActivity
import github.tornaco.android.thanos.core.pm.AppInfo
im... | 33,791 |
https://github.com/MochInzaghi/tracking/blob/master/app/Http/Controllers/VerifikasiController.php | Github Open Source | Open Source | MIT | null | tracking | MochInzaghi | PHP | Code | 67 | 301 | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class VerifikasiController extends Controller
{
public function create($id)
{
$verif = \App\Models\data_surat::find($id);
return view('layout.form.form_verifikasi_surat', ['data_surat' => $verif]);
}
public funct... | 45,121 |
https://github.com/kreuzhofer/homeautomation/blob/master/src/IoTApp/IoTHs.Plugin.Twilio/TwilioPlugin.cs | Github Open Source | Open Source | MIT | null | homeautomation | kreuzhofer | C# | Code | 50 | 210 | using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using IoTHs.Api.Shared;
using IoTHs.Core;
using IoTHs.Devices.Interfaces;
namespace IoTHs.Plugin.Twilio
{
public class TwilioPlugin : PluginBase
{
private string _accountSid;
private string _authToken;
public override as... | 41,674 |
https://github.com/cxs2549/twitter-vue/blob/master/src/components/Right/Follow.vue | Github Open Source | Open Source | MIT | null | twitter-vue | cxs2549 | Vue | Code | 175 | 855 | <template>
<div id="follow">
<div
class="flex items-center px-4 text-xl font-semibold border-b heading text-gray-basic border-gray-border"
>
Who to follow
</div>
<div
v-for="story in stories"
:key="story"
class="flex items-... | 48,416 |
https://github.com/wani-hackase/wanictf2021-writeup/blob/master/web/styled_memo/src/django/app/master/models.py | Github Open Source | Open Source | MIT | 2,021 | wanictf2021-writeup | wani-hackase | Python | Code | 107 | 422 | import os
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.core.files import File
from django.core.files.storage import FileSystemStorage
from django.db import models
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as... | 50,178 |
https://github.com/SimonBackx/zxcvbn/blob/master/packages/main/src/matching/DictionaryReverse.ts | Github Open Source | Open Source | MIT | null | zxcvbn | SimonBackx | TypeScript | Code | 98 | 254 | import { sorted } from '../helper'
import MatchDictionary from './Dictionary'
import { ExtendedMatch } from '../types'
interface DictionaryReverseMatchOptions {
password: string
}
/*
* -------------------------------------------------------------------------------
* Dictionary reverse ----------------------------... | 6,430 |
https://github.com/rhiroakidata/PiDjango/blob/master/EachSensor/testGasSensor.py | Github Open Source | Open Source | MIT | null | PiDjango | rhiroakidata | Python | Code | 28 | 124 | # coding: utf-8
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(16, GPIO.IN)
try:
while True:
print(GPIO.input(16))
if GPIO.input(16):
print('Ambiente bom')
time.sleep(0.2)
if GPIO.input(16)!=1:
print('Gás detectado')
except KeyboardInterru... | 38,023 |
https://github.com/clash-lang/clash-compiler/blob/master/tests/shouldwork/Basic/NORX.hs | Github Open Source | Open Source | BSD-2-Clause | 2,023 | clash-compiler | clash-lang | Haskell | Code | 327 | 1,099 | {-# LANGUAGE CPP #-}
module NORX where
import Data.Bits
import Clash.Prelude
import Clash.Explicit.Testbench
type W = Unsigned 32
norx :: Vec 16 W -> Vec 16 W
norx inp = iterate d5 f inp !! 4
f :: Vec 16 W -> Vec 16 W
f inp = result
where
(s0:>s1:>s2:>s3:>s4:>s5:>s6:>s7:>s8:>s9:>s10:>s11:>s12:>s13:>s14:>s15:>... | 47,244 |
https://github.com/Saloframes/Houseclub-roomStarter/blob/master/Houseclub/src/main/java/me/grishka/houseclub/api/methods/SearchClubs.java | Github Open Source | Open Source | Unlicense | 2,021 | Houseclub-roomStarter | Saloframes | Java | Code | 52 | 191 | package me.grishka.houseclub.api.methods;
import java.util.List;
import me.grishka.houseclub.api.ClubhouseAPIRequest;
import me.grishka.houseclub.api.model.Club;
public class SearchClubs extends ClubhouseAPIRequest<SearchClubs.Response> {
public SearchClubs(String query) {
super("POST", "search_clubs", Response.c... | 55,464 |
https://github.com/project-anuvaad/anuvaad/blob/master/anuvaad-fe/anuvaad-webapp/src/flux/actions/apis/view_digitized_document/copy_location.js | Github Open Source | Open Source | MIT | 2,023 | anuvaad | project-anuvaad | JavaScript | Code | 15 | 33 | import C from '../../constants';
export default () => {
return {
type: C.COPY_LOCATION
}
} | 50,892 |
https://github.com/prince-deriv/deriv-com/blob/master/src/pages/careers/besquare/static/style/_common.ts | Github Open Source | Open Source | Apache-2.0 | 2,021 | deriv-com | prince-deriv | TypeScript | Code | 145 | 453 | import styled from 'styled-components'
import { populateStyle, responsiveFallback } from 'common/utility'
import { Header, Text } from 'components/elements'
import device from 'themes/device'
export const TextWrapper = styled(Text)`
${(props) => {
const default_props_object = { font_size: '16px', line_heig... | 25,938 |
https://github.com/GameForPeople/room-server-framework/blob/master/RoomServer/NetworkManager.cpp | Github Open Source | Open Source | Apache-2.0 | 2,020 | room-server-framework | GameForPeople | C++ | Code | 297 | 1,378 | #include "stdafx.h"
#include "MemoryUnit.h"
#include "UserUnit.h"
#include "NetworkManager.h"
#include "Utils.h"
NetworkManager::NetworkManager()
: sendMemoryPool()
{
// Send에 사용할 메모리를 미리 할당합니다.
for (int i = 0; i < SEND_MEMORY_POOL_SIZE; ++i)
{
sendMemoryPool.push(new SendMemoryUnit);
}
#if MULTI_SEND_THREAD... | 964 |
https://github.com/svbackend/yii2-wschat/blob/master/views/index.php | Github Open Source | Open Source | MIT | 2,017 | yii2-wschat | svbackend | PHP | Code | 137 | 676 | <?php
use svbackend\wschat\ChatAsset;
/** \yii\web\View $this */
ChatAsset::register($this);
?>
<div class="row">
<div class="col-md-8 chat-wrapper">
<div class="col-md-12 jumbotron chat-container"></div>
<div class="col-md-12">
<div class="input-group">
<div class="inpu... | 41,322 |
https://github.com/brugere/manager/blob/master/packages/manager/apps/dedicated/client/app/account/user/emails/details/user-emails-details.controller.js | Github Open Source | Open Source | BSD-3-Clause | 2,022 | manager | brugere | JavaScript | Code | 156 | 772 | export default /* @ngInject */ function UserAccountEmailsDetailsController(
$scope,
$stateParams,
AccountUserEmailsService,
Alerter,
$location,
$translate,
) {
$scope.previousPage =
$location.search() && $location.search().previousPage
? $location.search().previousPage
: 1;
function par... | 4,727 |
https://github.com/Marc-AntoineA/voterpourleclimat/blob/master/src/pages/legal.jsx | Github Open Source | Open Source | MIT | 2,020 | voterpourleclimat | Marc-AntoineA | JavaScript | Code | 915 | 1,734 | import React from "react"
import { Segment, Container, Header } from "semantic-ui-react"
import partnerLists from "../constants/partners"
const Legal = () => (
<Segment vertical>
<Container verticalAlign="middle">
<Header>Éditeur et responsable de la publication</Header>
<p>
Collectif Voter ... | 11,357 |
https://github.com/imyjimmy/imyjimmy.github.io/blob/master/pages/comedy.js | Github Open Source | Open Source | MIT | null | imyjimmy.github.io | imyjimmy | JavaScript | Code | 34 | 94 | import { LayoutTheme } from 'components/Layout';
import styled from 'styled-components';
const LayoutThemeComedy = styled(LayoutTheme)`
color: #000;
`;
const Comedy = () => {
return (<LayoutThemeComedy><div>Welcome to My Secret Comedy Page</div></LayoutThemeComedy>)
}
export default Comedy; | 44,203 |
https://github.com/CTemplar/webclient/blob/master/src/styles/modules/comments/_comments.scss | Github Open Source | Open Source | Apache-2.0 | 2,022 | webclient | CTemplar | SCSS | Code | 225 | 782 | /**
* Comments modules scss file which includes style rules related to comment section
*/
.comment-row {
position: relative;
display: flex;
flex-wrap: wrap;
padding-bottom: 1.875rem;
&:not(:last-of-type) {
margin-bottom: 1.625rem;
}
@include media('>sm') {
padding-bottom: 0;
}
}
.comment-car... | 52,473 |
https://github.com/Sc4redd/Generator_liczb_pseudolosowych/blob/master/Projekt/Projekt/Window3.xaml.cs | Github Open Source | Open Source | MIT | null | Generator_liczb_pseudolosowych | Sc4redd | C# | Code | 321 | 1,281 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;... | 2,736 |
https://github.com/Spriea/iOSInterview/blob/master/iOSInterview/Classes/Category/NSBundle+RDLanguage.h | Github Open Source | Open Source | MIT | 2,022 | iOSInterview | Spriea | C | Code | 32 | 102 | //
// NSBundle+RDLanguage.h
// EduCare for Parents
//
// Created by Somer.King on 2018/2/23.
// Copyright © 2018年 Somer.King. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSBundle (RDLanguage)
+ (void)setLanguage:(NSString *)language;
@end
| 22,829 |
https://github.com/Team4Of5/Project/blob/master/Team4of5/src/Team4of5_Service/Chat.js | Github Open Source | Open Source | MIT | 2,017 | Project | Team4Of5 | JavaScript | Code | 1,209 | 4,015 |
import * as firebase from 'firebase';
import * as Config from './Config.js';
import * as Tools from '../Team4of5_App/Tools.js';
import * as userService from './Users.js';
let ref = firebase.app().database().ref();
let usersRef = ref.child('users');
let contactRef = ref.child('chatContact');
let chatroomRef = ref.chil... | 14,299 |
https://github.com/Shopify/shipit-engine/blob/master/app/models/shipit/unlimited_api_client.rb | Github Open Source | Open Source | MIT | 2,023 | shipit-engine | Shopify | Ruby | Code | 16 | 52 | # frozen_string_literal: true
module Shipit
class UnlimitedApiClient
def stack_id?
false
end
def check_permissions!(*)
end
end
end
| 19,593 |
https://github.com/UiL-OTS-labs/GrETEL-upload/blob/master/application/libraries/Ldap.php | Github Open Source | Open Source | MIT | 2,017 | GrETEL-upload | UiL-OTS-labs | PHP | Code | 215 | 790 | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Ldap
{
protected $CI;
protected $server;
protected $base_dn;
protected $bind_dn;
protected $bind_password;
protected $user_dn;
public function __construct()
{
$this->CI =& get_instance();
$this... | 3,931 |
https://github.com/1024-lab/smart-admin/blob/master/smart-admin-api/sa-admin/src/main/java/net/lab1024/sa/admin/module/system/department/domain/form/DepartmentAddForm.java | Github Open Source | Open Source | MIT | 2,023 | smart-admin | 1024-lab | Java | Code | 74 | 346 | package net.lab1024.sa.admin.module.system.department.domain.form;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotNull;
/**
* 部门 添加表单
*
* @Author 1024创新实验室-主任: 卓大
* @Date 2022-01-12 20:37:48
* @Wechat ... | 54,944 |
https://github.com/cthulhu-rider/neofs-sdk-go/blob/master/pkg/logger/option.go | Github Open Source | Open Source | Apache-2.0 | 2,021 | neofs-sdk-go | cthulhu-rider | Go | Code | 225 | 427 | package logger
import "go.uber.org/zap"
// WithSamplingInitial returns Option that sets sampling initial parameter.
func WithSamplingInitial(v int) Option { return func(o *options) { o.SamplingInitial = v } }
// WithSamplingThereafter returns Option that sets sampling thereafter parameter.
func WithSamplingThereafte... | 9,274 |
https://github.com/ScalablyTyped/ScalajsReactTyped/blob/master/d/detox/src/main/scala/typingsJapgolly/detox/mod/global/Detox/Expect.scala | Github Open Source | Open Source | MIT | 2,022 | ScalajsReactTyped | ScalablyTyped | Scala | Code | 479 | 1,234 | package typingsJapgolly.detox.mod.global.Detox
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait Expect[R] extends StObject {
/**
* Negate the expectation.
* @example await exp... | 23,176 |
https://github.com/thevalenciandev/design-patterns/blob/master/src/main/java/com/thevalenciandev/gof/observer/v1/OverdraftNotifier.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | design-patterns | thevalenciandev | Java | Code | 33 | 120 | package com.thevalenciandev.gof.observer.v1;
public class OverdraftNotifier {
private final BankAccount bankAccount;
public OverdraftNotifier(BankAccount bankAccountPublisher) {
this.bankAccount = bankAccountPublisher;
}
public void update() {
if (bankAccount.isInOverdraft())
... | 35,259 |
https://github.com/michaelkeevildown/logstash-document-lookup/blob/master/vendor/bundle/jruby/1.9/gems/tzinfo-data-1.2016.3/lib/tzinfo/data/definitions/Asia/Kolkata.rb | Github Open Source | Open Source | Apache-2.0 | 2,018 | logstash-document-lookup | michaelkeevildown | Ruby | Code | 99 | 315 | # encoding: UTF-8
# This file contains data derived from the IANA Time Zone Database
# (http://www.iana.org/time-zones).
module TZInfo
module Data
module Definitions
module Asia
module Kolkata
include TimezoneDefinition
timezone 'Asia/Kolkata' do |tz|
tz.... | 11,108 |
https://github.com/aalonzolu/JavaWEBMVC/blob/master/src/java/modelos/ConsultasUser.java | Github Open Source | Open Source | MIT | null | JavaWEBMVC | aalonzolu | Java | Code | 372 | 891 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package modelos;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
/**
*
* @author crismtl
*/
pu... | 15,493 |
https://github.com/rcrepaldi/FameActionBar/blob/master/src/br/com/crepaldi/frameactionbar/elements/ShadowAB.java | Github Open Source | Open Source | Unlicense | null | FameActionBar | rcrepaldi | Java | Code | 112 | 497 | package br.com.crepaldi.frameactionbar.elements;
import java.awt.Color;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import br.com.crepaldi.frameactionbar.A... | 9,849 |
https://github.com/Hesothread/H-PF/blob/master/H-PF.Prototype.WebAppCRUD/Controllers/WeatherForecastController.cs | Github Open Source | Open Source | MIT | 2,022 | H-PF | Hesothread | C# | Code | 125 | 540 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using H_PF.ToolLibs.HesoLogger.Domaine;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace H_PF.Prototype.WebAppCRUD.Controllers
{
[ApiController]
[Route("[controller]")]
public clas... | 27,696 |
https://github.com/liruiqing/gulp-terser/blob/master/test/src/es.js | Github Open Source | Open Source | MIT | 2,021 | gulp-terser | liruiqing | JavaScript | Code | 104 | 218 | // const
function add(x, y) {
const mid = 12;
return x + y + 12;
}
// let
function array(arr) {
let r = 0;
for (let i = 0; i < arr.length; i++) {
r += arr[i];
}
return r;
}
// arrow function
const pow = (a, b) => {
return a ** b;
};
// Promise
const promise = (number) => {
return new Promise((... | 32,660 |
https://github.com/Darkie/REST-TCC/blob/master/Nodejs Extensions/TCC extension package/index.js | Github Open Source | Open Source | MIT | 2,014 | REST-TCC | Darkie | JavaScript | Code | 3 | 13 |
module.exports = require('./lib/tcc'); | 55,615 |
https://github.com/calmisential/CRNN_TensorFlow2/blob/master/core/loss.py | Github Open Source | Open Source | MIT | 2,021 | CRNN_TensorFlow2 | calmisential | Python | Code | 31 | 155 | import tensorflow as tf
class CTCLoss:
def __call__(self, y_true, y_pred, *args, **kwargs):
batch_size = y_pred.shape[1]
logit_length = tf.fill(dims=[batch_size], value=y_pred.shape[0])
loss_value = tf.nn.ctc_loss(labels=y_true, logits=y_pred, label_length=None, logit_length=logit_length,... | 6,851 |
https://github.com/saranyaselva97/city-hardware/blob/master/public/assests/js/transaction_scripts.js | Github Open Source | Open Source | MIT | 2,020 | city-hardware | saranyaselva97 | JavaScript | Code | 1,489 | 6,154 | $(function() {
$("#customer_code").autocomplete({
source: function(request, response) {
$.ajax({
type: "POST",
url: "a_get_auto_complete_customer_code.php",
data: {
customer_code: request.term,
},
... | 10,609 |
https://github.com/jasperarmstrong/LD40/blob/master/Assets/Prefabs/Conveyor.prefab.meta | Github Open Source | Open Source | MIT | 2,019 | LD40 | jasperarmstrong | Unity3D Asset | Code | 16 | 82 | fileFormatVersion: 2
guid: fbd5c9ee2dfc04d55a9868689d705875
timeCreated: 1512264022
licenseType: Free
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
| 55,523 |
https://github.com/zhuruiboqq/romantic-factor_baseOnES/blob/master/web/src/main/java/com/sishuok/es/basedata/service/ArtistService.java | Github Open Source | Open Source | Apache-2.0 | null | romantic-factor_baseOnES | zhuruiboqq | Java | Code | 319 | 1,447 | /**
* Copyright (c) 2005-2012 https://github.com/zhuruiboqq
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
package com.sishuok.es.basedata.service;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.s... | 17,100 |
https://github.com/binaryage/badev/blob/master/lib/badev/commands/pushtags.rb | Github Open Source | Open Source | MIT | 2,016 | badev | binaryage | Ruby | Code | 83 | 255 | # frozen_string_literal: true
module Badev
module PushTags
extend Badev::Helpers
def self.walk_submodules(dir, level)
Dir.chdir dir do
indent do
puts "in #{dir.blue}"
submodules = []
submodules = `grep path .gitmodules | sed 's/.*= //'`.split "\n" if File.exist? ... | 8,222 |
https://github.com/sumeetkhatri/QuTIPy/blob/master/qutipy/channels/Choi_to_Natural.py | Github Open Source | Open Source | Apache-2.0 | 2,022 | QuTIPy | sumeetkhatri | Python | Code | 130 | 318 | '''
This code is part of QuTIpy.
(c) Copyright Sumeet Khatri, 2021
This code is licensed under the Apache License, Version 2.0. You may
obtain a copy of this license in the LICENSE.txt file in the root directory
of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
Any modifications or derivative wor... | 33,488 |
https://github.com/James9074/CTFd/blob/master/import.py | Github Open Source | Open Source | Apache-2.0 | 2,022 | CTFd | James9074 | Python | Code | 34 | 116 | """
python import.py export.zip challenges,teams,both,metadata
"""
from CTFd import create_app
from CTFd.utils import import_ctf
import sys
app = create_app()
with app.app_context():
if len(sys.argv) == 3:
segments = sys.argv[2].split(',')
else:
segments = None
import_ctf(sys.argv[1], seg... | 52,037 |
https://github.com/forcedotcom/salesforcedx-vscode/blob/master/packages/salesforcedx-vscode-core/src/util/authInfo.ts | Github Open Source | Open Source | 2,023 | salesforcedx-vscode | forcedotcom | TypeScript | Code | 452 | 1,507 | /*
* Copyright (c) 2019, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { AuthInfo, Connection, StateAggregator } from '@salesforce/core';
import {
Conf... | 9,405 | |
https://github.com/ifanrx/django-localflavor/blob/master/localflavor/tr/forms.py | Github Open Source | Open Source | BSD-3-Clause | null | django-localflavor | ifanrx | Python | Code | 376 | 1,203 | from __future__ import absolute_import, unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select, CharField
from django.utils.encoding import smart_text
from django.utils.translation import ugettext_la... | 5,157 |
https://github.com/colonyos/colonies/blob/master/internal/crypto/idendity.go | Github Open Source | Open Source | MIT | 2,022 | colonies | colonyos | Go | Code | 258 | 974 | package crypto
import (
"crypto/ecdsa"
"crypto/elliptic"
"crypto/rand"
"encoding/hex"
"errors"
"fmt"
"math/big"
mathrand "math/rand"
"time"
"github.com/btcsuite/btcd/btcec"
)
type Idendity struct {
prv *ecdsa.PrivateKey
id string
}
func CreateIdendity() (*Idendity, error) {
mathrand.Seed(time.Now().Un... | 11,756 |
https://github.com/crobby/ods-ci/blob/master/utils/scripts/polarion/createPolarionTestRun.py | Github Open Source | Open Source | MIT | 2,022 | ods-ci | crobby | Python | Code | 339 | 1,496 | # Script to create Test plan and Test Run in polarion
# Prerequisite: Clone https://github.com/RedHatQE/pylero.git
# Install pylero.
# Doc: https://github.com/RedHatQE/pylero#readme
import os
import ssl
import argparse
ssl._create_default_https_context = ssl._create_unverified_context
def parse_args():
"""Parse C... | 7,644 |
https://github.com/nithinvnath/PAVProject/blob/master/com.ibm.wala.core/src/com/ibm/wala/ipa/callgraph/AnalysisScope.java | Github Open Source | Open Source | MIT | null | PAVProject | nithinvnath | Java | Code | 1,624 | 4,880 | /*******************************************************************************
* Copyright (c) 2002 - 2006 IBM Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is avail... | 34,186 |
https://github.com/cerealcommas/django-doccloud/blob/master/doccloud/urls.py | Github Open Source | Open Source | Apache-2.0 | 2,018 | django-doccloud | cerealcommas | Python | Code | 40 | 207 | # from django.conf.urls import url, patterns
# from django.conf.urls.defaults import patterns
from django.urls import include, re_path
# from django.conf.urls.defaults import url
urlpatterns = [
re_path(r'^$', 'doccloud.views.list', name='docs_list'),
re_path(r'^list/$', 'doccloud.views.list', name='docs_list'... | 12,175 |
https://github.com/code-trekker/SULITravel/blob/master/src/app/models/package-item.ts | Github Open Source | Open Source | MIT | 2,018 | SULITravel | code-trekker | TypeScript | Code | 43 | 163 | export class PackageItem {
price:number;
name: string;
description: string;
pictures: Array<any>;
constructor(
name:string= 'Tinago Falls',
description:string = 'Located at Iligan City',
pictures: Array<any> = ['https://www.lakwatsero.com/wp-content/uploads/2014/07/Tinago-00... | 31,456 |
https://github.com/wilkeraziz/grasp/blob/master/examples/cfg/output.4 | Github Open Source | Open Source | Apache-2.0 | 2,021 | grasp | wilkeraziz | null | Spoken | 90 | 405 | [GOAL] ||| [S:0-4] ||| 1.0
[S:0-4] ||| [X:0-4] ||| 1.0
[X:0-4] ||| [X:0-1] [X:1-4] ||| 1.0
[X:0-4] ||| [X:0-2] [X:2-4] ||| 1.0
[X:0-4] ||| [X:0-3] [X:3-4] ||| 1.0
[X:0-3] ||| [X:0-1] [X:1-3] ||| 1.0
[X:0-3] ||| [X:0-2] [X:2-3] ||| 1.0
[X:1-4] ||| [X:1-2] [X:2-4] ||| 1.0
[X:1-4] ||| [X:1-3] [X:3-4] ||| 1.0
[X:0-2] ||| [... | 44,804 |
https://github.com/lizhifuabc/spring-boot-learn/blob/master/spring-boot-sentinel/src/main/java/com/boot/sentinel/SpringBootSentinelApplication.java | Github Open Source | Open Source | MIT | 2,021 | spring-boot-learn | lizhifuabc | Java | Code | 34 | 168 | package com.boot.sentinel;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* 启动程序
* 控制台:https://github.com/alibaba/Sentinel/releases
* 官方地址:https://sentinelguard.io/zh-cn/index.html
* @author lizhifu
* @date 2021/01/22
*/
@SpringBootApp... | 6,262 |
https://github.com/apache/systemds/blob/master/src/test/java/org/apache/sysds/test/component/tensor/DenseBlockCountNonZeroTest.java | Github Open Source | Open Source | Apache-2.0 | 2,023 | systemds | apache | Java | Code | 667 | 2,746 | /*
* 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 ... | 40,395 |
https://github.com/asynchresp/la5.2sampleapi/blob/master/app/Acls/UsersAcl.php | Github Open Source | Open Source | MIT | 2,018 | la5.2sampleapi | asynchresp | PHP | Code | 71 | 210 | <?php
namespace App\Acls;
use App\User;
class UsersAcl extends BaseAcl
{
protected function show()
{
$user = $this->route->parameter('users', new User);
if ($this->user->id != $user->id) {
return false;
}
return true;
}
protected function update()
{
... | 25,077 |
https://github.com/buzzonetwo/calcentral/blob/master/app/models/my_groups/merged.rb | Github Open Source | Open Source | ECL-2.0 | 2,021 | calcentral | buzzonetwo | Ruby | Code | 59 | 241 | module MyGroups
class Merged < UserSpecificModel
include Cache::CachedFeed
include Cache::UserCacheExpiry
include Cache::FilterJsonOutput
include MergedModel
def self.providers
[
MyGroups::Callink,
MyGroups::Canvas
]
end
def get_feed_internal
feed = {
... | 16,616 |
https://github.com/madhu2b4u/OpenWeather/blob/master/app/src/main/java/com/demo/openweather/forecast/data/model/Rain.kt | Github Open Source | Open Source | Unlicense | 2,020 | OpenWeather | madhu2b4u | Kotlin | Code | 9 | 31 | package com.demo.openweather.forecast.data.model
data class Rain(
val `3h`: Double
) | 56,227 |
https://github.com/PacktPublishing/Hands-On-WebAssembly-for-C-Programmers/blob/master/section3/video5/Makefile | Github Open Source | Open Source | MIT | 2,021 | Hands-On-WebAssembly-for-C-Programmers | PacktPublishing | Makefile | Code | 88 | 330 |
ifeq ($(DOCKER),1)
build: docker-build
docker run -v `pwd`:/data:rw -it emscripten ./upstream/emscripten/emcc /data/test.cpp -o /data/test.js --emrun --cache /data/.emscripten --std=c++17 --bind -s EXPORTED_FUNCTIONS="['_add']" --pre-js /data/pre.js
docker-build:
docker build -t emscripten .
run:
python3 -m http... | 56,121 |
https://github.com/omedphp/omed-old/blob/master/spec/Component/Employee/Model/EmployeeSpec.php | Github Open Source | Open Source | MIT | 2,021 | omed-old | omedphp | PHP | Code | 220 | 1,235 | <?php
/*
* This file is part of the Omed project.
*
* (c) Anthonius Munthi <https://itstoni.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace spec\Omed\Component\Employee\Model;
use Omed\Co... | 3,490 |
https://github.com/JoonVan/xip-libraries/blob/master/src/database/coregl/SoXipTransparentGeometryRenderer.cpp | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-unknown-license-reference | 2,013 | xip-libraries | JoonVan | C++ | Code | 2,148 | 9,305 | /*
Copyright (c) 2011, Siemens Corporate Research a Division of Siemens Corporation
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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.... | 54,856 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.