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/PuttySoftware/gemma-rpg/blob/master/Gemma/src/com/puttysoftware/gemma/support/items/ArmorMaterialConstants.java | Github Open Source | Open Source | Apache-2.0 | null | gemma-rpg | PuttySoftware | Java | Code | 81 | 254 | /* Gemma: An RPG
Copyright (C) 2013-2014 Eric Ahnell
Any questions should be directed to the author via email at: support@puttysoftware.com
*/
package com.puttysoftware.gemma.support.items;
class ArmorMaterialConstants {
static final int MATERIAL_NONE = -1;
static final int MATERIALS_COUNT = 26;
stati... | 35,570 |
https://github.com/f0enix/DeviceCheckSample/blob/master/server/sampleServer.js | Github Open Source | Open Source | MIT | 2,021 | DeviceCheckSample | f0enix | JavaScript | Code | 440 | 1,470 | var fs = require('fs');
var jwt = require('jsonwebtoken');
var https = require('https');
const uuidv4 = require('uuid/v4');
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var http = require('http').createServer(app);
var versionRouter = express();
versionRouter.set('v... | 34,163 |
https://github.com/supermaxJ/idonsol/blob/master/idonsol/CardView.h | Github Open Source | Open Source | MIT | null | idonsol | supermaxJ | C | Code | 41 | 118 | //
// CardView.h
// idonsol
//
// Created by zemadr on 17/2/14.
// Copyright © 2017年 snakejay. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Card.h"
@interface CardView : UIView
@property (nonatomic, strong) Card *card;
@property (nonatomic, copy) void (^didClick)(CardView *cardView);
@end
| 29,150 |
https://github.com/asmodehn/sdlut/blob/master/SDLut/test/SDLtestVideo.cc | Github Open Source | Open Source | BSD-2-Clause, BSD-3-Clause | 2,013 | sdlut | asmodehn | C++ | Code | 290 | 960 | #include "SDL.hh"
#include "Logger.hh"
using namespace Core;
using namespace SDLut;
using namespace SDLut::video;
Core::Logger testlog("TestVideo");
class MyEngine
{
public:
std::auto_ptr<Image> loadedimage;
mutable Rect imagepos;
MyEngine( const std::string & imagefilename) : imagepos()
{
... | 44,538 |
https://github.com/Inveracity/flynt/blob/master/test/integration/expected_out/str_literal.py | Github Open Source | Open Source | MIT | 2,022 | flynt | Inveracity | Python | Code | 13 | 52 | mean_ser, mean_per = 1, 2
scores = f"{'Crossvalidation':>50} \t {mean_ser:>6} \t {mean_per:>6}\n"
print(scores)
| 39,132 |
https://github.com/pcarri4/programming-univbasics-nds-green-grocer-part-1-chi01-seng-ft-120720/blob/master/lib/grocer.rb | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-public-domain | 2,020 | programming-univbasics-nds-green-grocer-part-1-chi01-seng-ft-120720 | pcarri4 | Ruby | Code | 66 | 171 | def find_item_by_name_in_collection(name, collection)
# Implement me first!
#
# Consult README for inputs and outputs
cart = nil
collection.each do |item|
if item[:item] == name
cart = item
end
end
cart
end
def consolidate_cart(cart)
receipt = Array.new
cart.each do |item|
count = 0
if !it... | 25,910 |
https://github.com/iCrany/ICLabel/blob/master/Example/ICLabel/Module/Example/VC/ICDemoTableViewVC.h | Github Open Source | Open Source | MIT | null | ICLabel | iCrany | C | Code | 28 | 81 | //
// ICViewController.h
// ICLabel
//
// Created by iCrany on 10/08/2018.
// Copyright (c) 2018 iCrany. All rights reserved.
//
@import UIKit;
@interface ICDemoTableViewVC : UIViewController
@end
| 27,819 |
https://github.com/johanPaC115/Amazing-Feat-Tale1/blob/master/Assets/Scripts/cameraFollow.cs | Github Open Source | Open Source | MIT | null | Amazing-Feat-Tale1 | johanPaC115 | C# | Code | 53 | 170 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class cameraFollow : MonoBehaviour
{
[SerializeField]
private float xMax, yMax, xMin, yMin;
private Transform target;
// Start is called before the first frame update
void Start()
{
target = GameObje... | 19,398 |
https://github.com/thephpleague/iso3166/blob/master/phpstan-baseline.neon | Github Open Source | Open Source | MIT, CC-BY-SA-3.0, CC-BY-4.0 | 2,023 | iso3166 | thephpleague | null | Spoken | 96 | 446 | parameters:
ignoreErrors:
-
message: "#^Parameter \\#1 \\$alpha2 of static method League\\\\ISO3166\\\\Guards\\:\\:guardAgainstInvalidAlpha2\\(\\) expects string, mixed given\\.$#"
count: 1
path: src/ISO3166DataValidator.php
-
message: "#^Parameter \\#1 \\$alpha3 of static method League\\\\ISO3166\\\\... | 12,321 |
https://github.com/Fierce-Cat/LunaMultiPlayer/blob/master/Client/MainSystem.cs | Github Open Source | Open Source | MIT | null | LunaMultiPlayer | Fierce-Cat | C# | Code | 1,353 | 5,906 | using CommNet;
using LunaClient.Network;
using LunaClient.Systems;
using LunaClient.Systems.Flag;
using LunaClient.Systems.KerbalSys;
using LunaClient.Systems.Mod;
using LunaClient.Systems.Scenario;
using LunaClient.Systems.SettingsSys;
using LunaClient.Systems.Status;
using LunaClient.Systems.Toolbar;
using LunaClien... | 44,128 |
https://github.com/sam3d/orb/blob/master/src/edge/main.go | Github Open Source | Open Source | MIT | 2,022 | orb | sam3d | Go | Code | 594 | 1,448 | package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"path/filepath"
"orbit.sh/edge/nginx"
)
const (
// CertsPath is the directory where the SSL certificates are kept.
CertsPath = "/etc/nginx/certs"
// ChallengeFile is the file where the challenges (as "location" directives)
// are kept. This must be includ... | 33,529 |
https://github.com/the-eater/idea-php-toolbox/blob/master/src/main/java/de/espend/idea/php/toolbox/provider/presentation/ProviderPresentation.java | Github Open Source | Open Source | MIT | 2,022 | idea-php-toolbox | the-eater | Java | Code | 43 | 141 | package de.espend.idea.php.toolbox.provider.presentation;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
/**
* @author Daniel Espendiller <daniel@espendiller.net>
*/
public abstract class ProviderPresentation {
@Nullable
public Icon getIcon() {
return null;
}
@Nullable
... | 20,019 |
https://github.com/cebes/cebes-python/blob/master/setup.py | Github Open Source | Open Source | Apache-2.0 | 2,018 | cebes-python | cebes | Python | Code | 133 | 345 | # Copyright 2016 The Cebes Authors. All Rights Reserved.
#
# Licensed under the Apache License, version 2.0 (the "License").
# You may not use this work except in compliance with the License,
# which is available at www.apache.org/licenses/LICENSE-2.0
#
# This software is distributed on an "AS IS" basis, WITHOUT WARRAN... | 13,146 |
https://github.com/fpoppinga/pa/blob/master/matlab/chirp_eval.m | Github Open Source | Open Source | MIT | 2,016 | pa | fpoppinga | MATLAB | Code | 320 | 1,052 | % Chirp evaluations
% Lars Urbansky, 15.04.2016
clear all;
close all;
fs = 48e3; % 48kHz sampling freq
T = 0.005; % 5ms chirp
f1 = 1e3; % Lower freq symbol 1
f2 = 3e3; % Upper freq symbol 1
phi = 0; % initial phase
B = f2-f1; % Bandwidth
mu = 2*pi*B/T;
% Prepare chirps
t = 0:1/fs:T-1/fs;
x1 = cos(2*pi*f1*t+mu*t.^2/2... | 22,271 |
https://github.com/OpusCapita/react-crudeditor/blob/master/src/components/ResizableGrid/integrationWithCrudEditorStyles.less | Github Open Source | Open Source | Apache-2.0 | 2,022 | react-crudeditor | OpusCapita | Less | Code | 26 | 76 | .resizable-table-wrapper {
table thead tr th {
align-self: center;
border-bottom: 1px solid #ddd;
}
table thead tr th:not(:first-child) {
padding: 15px 5px 15px 5px;
}
}
| 27,597 |
https://github.com/npocmaka/Windows-Server-2003/blob/master/inetcore/digest/test/stress/main.hxx | Github Open Source | Open Source | Unlicense | 2,021 | Windows-Server-2003 | npocmaka | C++ | Code | 292 | 1,075 | #include <tchar.h>
#ifndef _THREAD_TEST
#define _THREAD_TEST
#include <windows.h>
#define SECURITY_WIN32
#include <sspi.h>
#include <issperr.h>
typedef struct _UI_CONTROL {
LPTSTR szUserName;
LPTSTR szPassword;
BOOL fPersist;
DWORD dwCount;
HWND hOK;
HWND hUserName;
HWND hPassword;
HWND hPasswordSav... | 6,454 |
https://github.com/nicolasrosa/StereoVision/blob/master/Qt Creator/sample/Eye_Drone-master/targetfinder.h | Github Open Source | Open Source | MIT | 2,021 | StereoVision | nicolasrosa | C | Code | 710 | 1,336 | #ifndef TARGETFINDER_H
#define TARGETFINDER_H
#include <iostream>
#include <cv.h>
#include <highgui.h>
#include <string>
#include <cstring>
#include <sstream>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <vector>
using namespace cv;
using namespace std;
/**
* @brief The Tar... | 40,167 |
https://github.com/sivakare/spartacus/blob/master/projects/core/src/organization/facade/org-unit.service.ts | Github Open Source | Open Source | Apache-2.0 | 2,020 | spartacus | sivakare | TypeScript | Code | 207 | 778 | import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';
import { Observable, queueScheduler } from 'rxjs';
import { filter, map, observeOn, take, tap } from 'rxjs/operators';
import { StateWithProcess } from '../../process/store/process-state';
import { LoaderState } from '../../state/utils/loa... | 19,548 |
https://github.com/CA-PM/Interface-Utilization-Busy-Times/blob/master/lib/caHelperFunctions.js | Github Open Source | Open Source | MIT | 2,018 | Interface-Utilization-Busy-Times | CA-PM | JavaScript | Code | 694 | 2,000 | // Function to parse attributes from the source URL
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if(pair[0] == variable){return pair[1];}
}
return(false);
}
// Func... | 2,666 |
https://github.com/mihaibuzgau/facter-ng/blob/master/spec/facter/resolvers/solaris/zfs_resolver_spec.rb | Github Open Source | Open Source | MIT | 2,021 | facter-ng | mihaibuzgau | Ruby | Code | 113 | 432 | # frozen_string_literal: true
describe Facter::Resolvers::Solaris::ZFS do
before do
status = double(Process::Status, to_s: st)
expect(Open3).to receive(:capture2)
.with('zfs upgrade -v')
.ordered
.and_return([output, status])
end
after do
Facter::Resolvers::Solaris::ZFS.invalidate_... | 3,886 |
https://github.com/ymclapp/E-Commerce-App/blob/master/E-Commerce/Pages/Item.cs | Github Open Source | Open Source | MIT | null | E-Commerce-App | ymclapp | C# | Code | 40 | 99 | using E_Commerce.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace E_Commerce.Pages
{
public class Item
{
public Product Product { get; set; }
public int Quantity { get; set; }
//public List<Product> Products { get; set; ... | 9,986 |
https://github.com/saeel123/concrete/blob/master/concrete/elements/collection_permissions.php | Github Open Source | Open Source | MIT | null | concrete | saeel123 | PHP | Code | 1,580 | 6,641 | <?php
defined('C5_EXECUTE') or die("Access Denied.");
Loader::model('collection_types');
$dh = Loader::helper('date');
$dt = Loader::helper('form/date_time');
if ($cp->canAdminPage()) {
// if it's composer mode and we have a target, then we hack the permissions collection id
if (isset($isComposer) && $isComposer) {... | 51,147 |
https://github.com/Farit/Spaced-Rehearsal/blob/master/src/mediator/english_mediator.py | Github Open Source | Open Source | MIT | 2,020 | Spaced-Rehearsal | Farit | Python | Code | 192 | 788 | import os
import os.path
from typing import List
from src.mediator.general_mediator import GeneralMediator
from src.flashcard import Flashcard
from src.actions import (
EnglishReviewAction,
EnglishCreateAction,
EnglishRussianCreateAction,
EnglishAlterAction,
)
class EnglishMediator(GeneralMediator)... | 2,451 |
https://github.com/lindar-open/well-rested-client/blob/master/src/main/java/com/lindar/wellrested/vo/WellRestedResponse.java | Github Open Source | Open Source | Apache-2.0 | 2,017 | well-rested-client | lindar-open | Java | Code | 629 | 1,617 | package com.lindar.wellrested.vo;
import com.google.gson.reflect.TypeToken;
import com.lindar.wellrested.json.JsonMapper;
import com.lindar.wellrested.util.type.CollectionWrapperType;
import com.lindar.wellrested.util.type.ResultWrapperType;
import com.lindar.wellrested.xml.WellRestedXMLUtil;
import lombok.EqualsAndHa... | 4,165 |
https://github.com/PetorSFZ/PhantasyEngineTestbed/blob/master/source/phantasy_engine/deferred_renderer/GLTexture.cpp | Github Open Source | Open Source | MIT, BSL-1.0, Zlib, BSD-3-Clause | null | PhantasyEngineTestbed | PetorSFZ | C++ | Code | 327 | 1,620 | // See 'LICENSE_PHANTASY_ENGINE' for copyright and contributors.
#include "phantasy_engine/deferred_renderer/GLTexture.hpp"
#include "sfz/gl/IncludeOpenGL.hpp"
namespace phe {
// GLTexture: Constructors & destructors
// ------------------------------------------------------------------------------------------------... | 21,817 |
https://github.com/haytastan/teiid-documents/blob/master/reference/r_criteria.adoc | Github Open Source | Open Source | Apache-2.0 | 2,021 | teiid-documents | haytastan | AsciiDoc | Code | 695 | 1,437 | // Module included in the following assemblies:
// as_sql-support.adoc
[id="sql-criteria"]
= Criteria
Criteria can be any of the following items:
* Predicates that evaluate to true or false.
* Logical criteria that combine criteria (AND, OR, NOT).
* A value expression of type Boolean.
.Usage
[source,sql]
----
crit... | 44,805 |
https://github.com/zeyademam/active_learning/blob/master/src/utils/generate_initial_pool.py | Github Open Source | Open Source | MIT | 2,022 | active_learning | zeyademam | Python | Code | 261 | 985 | import logging
import numpy as np
logger = logging.getLogger("ActiveLearning")
def generate_idxs(train_set, size, generation_type: str, avoid_idxs=None, random_seed=None):
rng = np.random.default_rng(random_seed)
available_idxs = np.arange(len(train_set))
if avoid_idxs is not None:
available_idx... | 31,392 |
https://github.com/Kunzamita/sistema-crediticio/blob/master/app/ventana.js | Github Open Source | Open Source | Apache-2.0 | null | sistema-crediticio | Kunzamita | JavaScript | Code | 150 | 513 | // librerias basicas
const electron = require ('electron');
const BrowserWindow = electron.BrowserWindow;
const ipcMain = electron.ipcMain;
//libreria administradora de ventanas
const ventanaAdmin = require ('electron-windows-manager');
// detecta si esta en modo desarrollo
const isDev = require('electron-is-dev');
... | 36,238 |
https://github.com/maggie-harrington/university-registrar/blob/master/views/courses.html.twig | Github Open Source | Open Source | MIT | 2,017 | university-registrar | maggie-harrington | Twig | Code | 154 | 673 | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css'>
<title>University Registrar</title>
</head>
<body>
<div class='container'>
<div class='jumbotron'>
... | 44,725 |
https://github.com/zhuyiyi1990/msb-mall/blob/master/mall-order/src/main/java/com/msb/mall/order/web/OrderWebController.java | Github Open Source | Open Source | Apache-2.0 | null | msb-mall | zhuyiyi1990 | Java | Code | 148 | 593 | package com.msb.mall.order.web;
import com.msb.common.exception.NoStockException;
import com.msb.mall.order.service.OrderService;
import com.msb.mall.order.vo.OrderConfirmVo;
import com.msb.mall.order.vo.OrderResponseVO;
import com.msb.mall.order.vo.OrderSubmitVO;
import org.springframework.beans.factory.annotation.Au... | 13,227 |
https://github.com/UCL-COMP0016-Team37/Mapping-Tool-Backend/blob/master/src/main/java/uk/ac/ucl/mappingtool/v2/domain/result/response/ResponseContent.java | Github Open Source | Open Source | MIT | 2,020 | Mapping-Tool-Backend | UCL-COMP0016-Team37 | Java | Code | 31 | 121 | package uk.ac.ucl.mappingtool.v2.domain.result.response;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ResponseContent {
private String iati_identifier;
private List<String> title_narrati... | 8,778 |
https://github.com/ranghivanhuy/first-project/blob/master/public/assets/css/pages/mypage/mypage-detail.scss | Github Open Source | Open Source | MIT | null | first-project | ranghivanhuy | SCSS | Code | 132 | 572 | .mypage-detail-top {
height: 60px;
width: 100%;
.mypage-detail-top-btn-back {
background-image: url('../../../images/btn_back.png');
width: 35px;
height: 35px;
margin-top: 15px;
position: absolute;
}
.mypage-detail-top-title {
text-align: center;
... | 10,676 |
https://github.com/ukyzky/performer/blob/master/src/apps/sequencer/model/NoteTrack.h | Github Open Source | Open Source | MIT | 2,022 | performer | ukyzky | C | Code | 757 | 3,030 | #pragma once
#include "Config.h"
#include "Types.h"
#include "NoteSequence.h"
#include "Serialize.h"
#include "Routing.h"
class NoteTrack {
public:
//----------------------------------------
// Types
//----------------------------------------
typedef std::array<NoteSequence, CONFIG_PATTERN_COUNT + CO... | 8,540 |
https://github.com/bugsbycarlin/SecretSalsa/blob/master/04_WorldBuilder/Source/mode.h | Github Open Source | Open Source | MIT | 2,019 | SecretSalsa | bugsbycarlin | C++ | Code | 44 | 114 | /*
Secret Salsa
Matthew Carlin
Copyright 2019
*/
#pragma once
// Standard libraries
#include <stdio.h>
#include <cstdlib>
#include <string>
#include "honey.h"
using namespace Honey;
using namespace std;
class Mode {
public:
Mode();
virtual void initialize();
virtual void logic();
virtual void rende... | 2,621 |
https://github.com/VictorZhanUnity/unimgpicker/blob/master/unimgpicker_android/unityLibrary/Unimgpicker/src/com/kakeragames/unimgpicker/Picker.java | Github Open Source | Open Source | MIT | 2,021 | unimgpicker | VictorZhanUnity | Java | Code | 297 | 1,008 | package com.kakeragames.unimgpicker;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Bundle;
... | 49,788 |
https://github.com/anggastika/mobile-cucumber-appium-webdriverio/blob/master/tests/e2e/features/Login.feature | Github Open Source | Open Source | Apache-2.0 | 2,021 | mobile-cucumber-appium-webdriverio | anggastika | Gherkin | Code | 83 | 154 | Feature: Login validations
Background:
Given I'm on the login screen
Scenario Outline: Displays warning message when logging in with invalid credentials
When I try to log in with credentials; email: '<Email>' and password: '<Password>'
Then app displays a message that the credentials are invalid
... | 52,263 |
https://github.com/bilibiliShen/CodeBank/blob/master/CodeForces/codeforces459B.cpp | Github Open Source | Open Source | MIT | 2,017 | CodeBank | bilibiliShen | C++ | Code | 271 | 588 | // <!--encoding UTF-8 UTF-8编码--!>
/*****************************************************************************
* ----Stay Hungry Stay Foolish---- *
* @author : Shen *
* @name : B ... | 35,337 |
https://github.com/ride-austin/android/blob/master/app/src/test/java/com/rideaustin/api/config/GeneralInformationTest.java | Github Open Source | Open Source | MIT | 2,021 | android | ride-austin | Java | Code | 359 | 1,021 | package com.rideaustin.api.config;
import com.google.gson.Gson;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* Created by crossover on 02/01/2017.
*/
public class GeneralInformationTest {
private static final lo... | 48,206 |
https://github.com/WillSmoka/FunctionHacker/blob/master/Function Hacker/Classes/Tabs/oTabExportFunction.cs | Github Open Source | Open Source | BSD-3-Clause | 2,021 | FunctionHacker | WillSmoka | C# | Code | 76 | 222 | using System.Windows.Forms;
using FunctionHacker.Controls;
namespace FunctionHacker.Classes.Tabs
{
internal class oTabExportFunction : oTab
{
private oFunction function;
public oTabExportFunction(oTabManager parent, ToolStrip toolStrip, Panel panelMain, ToolStrip mainToolStrip,
... | 17,247 |
https://github.com/enesyteam/QuickPlot/blob/master/src/Forms/PlotConfigUIBase.Designer.cs | Github Open Source | Open Source | CC0-1.0 | 2,019 | QuickPlot | enesyteam | C# | Code | 1,913 | 9,230 | namespace QuickPrint.Forms
{
partial class PlotConfigUIBase
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
... | 45,232 |
https://github.com/tskirvin/puppet-puppet/blob/master/spec/classes/puppet_agent_spec.rb | Github Open Source | Open Source | Apache-2.0 | 2,020 | puppet-puppet | tskirvin | Ruby | Code | 324 | 1,016 | require 'spec_helper'
cron_command = '/opt/puppetlabs/bin/puppet agent -t'
cron_command_noop = cron_command + ' --noop'
describe 'puppet::agent' do
let(:facts) { { osfamily: 'RedHat', operatingsystemmajrelease: '6' } }
context 'default params check' do
it 'include puppet::config' do
is_expected.to cont... | 27,245 |
https://github.com/lcx960324/leetcode-prob/blob/master/Algorithms/012-Integer to Roman.js | Github Open Source | Open Source | Apache-2.0 | null | leetcode-prob | lcx960324 | JavaScript | Code | 177 | 355 | /**
* @param {number} num
* @return {string}
*/
var intToRoman = function(num) {
let result = ''
while (num >= 1000) {
result += 'M'
num -= 1000
}
while (num >= 900) {
result += 'CM'
num -= 900
}
while (num >= 500) {
result += 'D'
num -= 500
... | 21,129 |
https://github.com/WillCoates/primefactors/blob/master/primefactors/__main__.py | Github Open Source | Open Source | MIT | 2,019 | primefactors | WillCoates | Python | Code | 40 | 136 | import argparse
from . import factorize
from .formatters import formats
parser = argparse.ArgumentParser()
parser.add_argument('integers', metavar='N', type=int, nargs='+', help='integers to be factorized')
parser.add_argument('-f', '--format', default='repr', choices=formats.keys(), help='how to format output')
args ... | 1,993 |
https://github.com/albertBarsegyan/armenianCodeAcademy/blob/master/tasks05.18/numberValidation.js | Github Open Source | Open Source | ISC | null | armenianCodeAcademy | albertBarsegyan | JavaScript | Code | 56 | 145 | /* Note, You can do it in one file.
Create a RegExp myRegExp to test if a string is a valid pin or not. A valid pin has:
Exactly 4 or 6 characters.
Only numerical characters (0-9).
No whitespace. */
let myRegExp = /^\d{4}|\d{6}/;
console.log(myRegExp.test('1234')); //true
myRegExp.test('45135'); //false
myRegExp.test(... | 22,348 |
https://github.com/mlcodepatterns/mlcodepatterns.github.io/blob/master/icse_sp3/7/51311/238540899.dot | Github Open Source | Open Source | Apache-2.0 | 2,022 | mlcodepatterns.github.io | mlcodepatterns | Graphviz (DOT) | Code | 82 | 294 | digraph G {
subgraph cluster0 {
1 [label="assert" a="32" s="1560,1666" l="11,1" shape="box"];
label = "Old";
style="dotted";
}
subgraph cluster1 {
2 [label="CrossValidation" a="32" s="1256,1300" l="16,1" shape="box"];
3 [label="NumberLiteral" a="34" s="1299" l="1" shape="ellipse"];
4 [label="{}" a="4" s="1291,1297" l="... | 51,073 |
https://github.com/dalloriam/rogue/blob/master/backends/roguepixel/camera.go | Github Open Source | Open Source | MIT | 2,020 | rogue | dalloriam | Go | Code | 186 | 503 | package roguepixel
import (
"github.com/faiface/pixel"
)
// Camera controls camera position in a pixel window.
type Camera struct {
Position pixel.Vec
Zoom float64
tileWidth int
tileHeight int
leftBound, rightBound, bottomBound, topBound float64
}
// NewCamera returns a new camera instance for a pixel w... | 12,515 |
https://github.com/CAFA1/afl/blob/master/qemu_mode/qemu-2.10.0/tests/test-io-task.c | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-generic-cla, GPL-2.0-only, LGPL-2.1-only, GPL-1.0-or-later, LGPL-2.0-or-later, LGPL-2.1-or-later, LicenseRef-scancode-other-copyleft, LicenseRef-scancode-warranty-disclaimer, LicenseRef-scancode-unknown-license-reference, BSD-3-Clause | 2,020 | afl | CAFA1 | C | Code | 611 | 2,100 | /*
* QEMU I/O task tests
*
* Copyright (c) 2015 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later ve... | 33,545 |
https://github.com/juhasipo/JMobster/blob/master/core/src/main/java/fi/vincit/jmobster/processor/model/ModelField.java | Github Open Source | Open Source | Apache-2.0 | 2,015 | JMobster | juhasipo | Java | Code | 260 | 605 | package fi.vincit.jmobster.processor.model;
/*
* Copyright 2012-2013 Juha Siponen
*
* 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
*
... | 50,801 |
https://github.com/colerau/nyc-sinatra-online-web-sp-000/blob/master/app/controllers/figures_controller.rb | Github Open Source | Open Source | LicenseRef-scancode-public-domain, LicenseRef-scancode-unknown-license-reference | 2,020 | nyc-sinatra-online-web-sp-000 | colerau | Ruby | Code | 142 | 583 | class FiguresController < ApplicationController
# add controller methods
get '/figures' do
@figures = Figure.all
erb :'/figures/index'
end
get '/figures/new' do
@landmarks = Landmark.all
@titles = Title.all
erb :'/figures/new'
end
post '/figures' do
@figure = Figure.create(params... | 17,217 |
https://github.com/cshung/ILSpy/blob/master/ILSpy/Commands/ShowPane.cs | Github Open Source | Open Source | MIT | 2,021 | ILSpy | cshung | C# | Code | 91 | 359 | using ICSharpCode.ILSpy.Docking;
using ICSharpCode.ILSpy.Properties;
using ICSharpCode.ILSpy.ViewModels;
namespace ICSharpCode.ILSpy.Commands
{
[ExportMainMenuCommand(Menu = nameof(Resources._Window), Header = nameof(Resources._Assemblies), MenuCategory = "pane", MenuOrder = 5000)]
class ShowAssemblies : SimpleComm... | 9,945 |
https://github.com/amit42/AlgorithmNotebook/blob/master/Standard C++/Template/debugging.cpp | Github Open Source | Open Source | MIT | 2,020 | AlgorithmNotebook | amit42 | C++ | Code | 233 | 572 | #include <bits/stdc++.h>
using namespace std;
//------------------------------------
#define debug(...) "[" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// To String
string to_string(string s) {
return '"' + s + '"';
}
string to_string(bool b) {
return (b ? "true" : "false");
}
template <typename A, type... | 10,484 |
https://github.com/PaddlePaddle/PaddleDetection/blob/master/ppdet/ext_op/unittest/test_matched_rbox_iou.py | Github Open Source | Open Source | Apache-2.0 | 2,023 | PaddleDetection | PaddlePaddle | Python | Code | 454 | 1,752 | import numpy as np
import sys
import time
from shapely.geometry import Polygon
import paddle
import unittest
from ext_op import matched_rbox_iou
def rbox2poly_single(rrect, get_best_begin_point=False):
"""
rrect:[x_ctr,y_ctr,w,h,angle]
to
poly:[x0,y0,x1,y1,x2,y2,x3,y3]
"""
x_ctr, y_ctr, width... | 35,613 |
https://github.com/pjexposito/timeboxed-watchface/blob/master/src/screen.c | Github Open Source | Open Source | MIT | null | timeboxed-watchface | pjexposito | C | Code | 149 | 802 | #include <pebble.h>
#include "screen.h"
#include "text.h"
#include "health.h"
#include "weather.h"
#include "locales.h"
#include "configs.h"
#include "keys.h"
#include "accel.h"
#include "compass.h"
void load_screen(bool from_configs, Window *watchface) {
load_locale();
update_time();
init_compass_service(... | 3,791 |
https://github.com/IamNatashaBTW/Shortcuts-app-button/blob/master/app fix/Form1.cs | Github Open Source | Open Source | MIT | null | Shortcuts-app-button | IamNatashaBTW | C# | Code | 87 | 282 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;
namespace app_fix
{
public partial class Game_Libary : Form
{
... | 43,243 |
https://github.com/0x727/metasploit-framework/blob/master/modules/auxiliary/scanner/http/coremail_user.rb | Github Open Source | Open Source | BSD-2-Clause, BSD-3-Clause | 2,022 | metasploit-framework | 0x727 | Ruby | Code | 237 | 933 | ##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Remote::HttpClient
include Msf::Auxiliary::Scanner
include Msf::Post::File
def initialize(... | 46,719 |
https://github.com/diegomalone/udacity-android-nd-popular-movies/blob/master/app/src/main/java/com/diegomalone/popularmovies/adapter/MovieGridAdapter.java | Github Open Source | Open Source | Apache-2.0 | null | udacity-android-nd-popular-movies | diegomalone | Java | Code | 119 | 510 | package com.diegomalone.popularmovies.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import com.diegomalone.popularmovies.customview.MovieCardView;
import com.diegomalone.popularmovies.model.Movie;
import java.util.Arra... | 18,883 |
https://github.com/pkropf/mqtt2sms/blob/master/mqtt2sms.sh | Github Open Source | Open Source | MIT | null | mqtt2sms | pkropf | Shell | Code | 11 | 76 | #! /bin/bash
SCRIPT_PATH=`dirname "${BASH_SOURCE[0]}"`
source $SCRIPT_PATH/../venvs/mqtt2sms/bin/activate
echo `type python3.7`
exec $SCRIPT_PATH/mqtt2sms.py
| 26,251 |
https://github.com/sidharthskumar/algos/blob/master/trie/trie.cpp | Github Open Source | Open Source | MIT | 2,017 | algos | sidharthskumar | C++ | Code | 544 | 1,267 | #include <iostream>
#include <cstring>
using namespace std;
// Determine size of array
#define ARRAY_SIZE(a) sizeof(a) / sizeof(a[0])
// Alphabet size (# of symbols)
#define ALPHABET_SIZE 26
// Convert char to int value
// only 'a' to 'z' are allowed chars
#define CHAR_TO_INT(c) ((int)c - (int)'a')
// TrieNode class
... | 29,715 |
https://github.com/chipfunk/nomios-web-uikit/blob/master/stories/button.js | Github Open Source | Open Source | MIT | 2,020 | nomios-web-uikit | chipfunk | JavaScript | Code | 186 | 508 | import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, boolean, select, text } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';
import { withReadme } from 'storybook-readme';
import { Button } from '../src';
import readme from '../src/components/but... | 41,004 |
https://github.com/drostron/quasar/blob/master/blueeyes/src/main/scala/quasar/precog/common/Path.scala | Github Open Source | Open Source | Apache-2.0 | null | quasar | drostron | Scala | Code | 308 | 787 | /*
* Copyright 2014–2017 SlamData 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 agr... | 11,351 |
https://github.com/lkd062819/decision/blob/master/decision-plugin/decision-serverinfo-plugin/src/main/java/com/decision/plugin/serverinfo/ServerInfoOfNacosPlugin.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | decision | lkd062819 | Java | Code | 149 | 859 | package com.decision.plugin.serverinfo;
import com.decision.core.plugin.DecisionPlugin;
import com.decision.core.plugin.DecisionPluginDefine;
import com.decision.core.plugin.PluginInterceptPoint;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import ne... | 992 |
https://github.com/ianfore/bio-model-discovery/blob/master/AnalyzeDataFrame.py | Github Open Source | Open Source | BSD-3-Clause | null | bio-model-discovery | ianfore | Python | Code | 390 | 1,022 | #!/usr/bin/python
import sys
import getopt
import pandas as pd
# Retrieve the attributes of the samples for a specified BioProject and summarize
# the values of those attributes across the project.
# The intent is to provide a report which will help a user
# 1. Identify the data model of the study
# 2. Identify if the... | 18,457 |
https://github.com/0xflotus/delta/blob/master/delta/layers/ops/kernels/jieba_op_test.py | Github Open Source | Open Source | Apache-2.0 | null | delta | 0xflotus | Python | Code | 361 | 1,417 | # Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
# 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/LI... | 23,415 |
https://github.com/seanlinmt/tradelr/blob/master/bajula/Models/contacts/ContactView.cs | Github Open Source | Open Source | Apache-2.0 | 2,022 | tradelr | seanlinmt | C# | Code | 64 | 118 | namespace tradelr.Models.contacts
{
public class ContactView
{
// user details
public string name { get; set; }
public string email { get; set; }
public string lastLogin { get; set; }
// organisation details
public string orgname { get; set; }
public str... | 16,276 |
https://github.com/srikanteswartalluri/container-orchestrator/blob/master/src/node-agent/utils/check_container_status_on_nodes.sh | Github Open Source | Open Source | Apache-2.0 | null | container-orchestrator | srikanteswartalluri | Shell | Code | 14 | 33 | for i in {12375..12379}
do
echo "$i" && docker exec co_node_$i docker ps
done | 11,235 |
https://github.com/bmeaut/sigstat/blob/master/src/SigStat.WpfSample/Common/DerivedSvc2004Features.cs | Github Open Source | Open Source | MIT | 2,018 | sigstat | bmeaut | C# | Code | 178 | 688 | using SigStat.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace SigStat.WpfSample.Common
{
public static class DerivableSvc2004Features
{
public static readonly FeatureDescriptor X = Features.X... | 44,937 |
https://github.com/ovh-ux/ovh-manager-telecom/blob/master/.eslintrc.json | Github Open Source | Open Source | BSD-3-Clause | 2,019 | ovh-manager-telecom | ovh-ux | null | Spoken | 53 | 207 | {
"root": true,
"extends": "airbnb-base",
"parser": "babel-eslint",
"plugins": ["angular"],
"env": {
"browser": true,
"jasmine": true,
"mocha": true,
"jquery": true,
"angular/mocks": true
},
"globals": {
"_": true,
"$": true,
"JSURL": true,
"angular": true,
"moment"... | 14,500 |
https://github.com/naushard/EclipsePOS/blob/master/V.1.0.8/EclipsePOS.WPF.PosWorkBench/EclipsePos.Data/TransItem.cs | Github Open Source | Open Source | MIT | 2,021 | EclipsePOS | naushard | C# | Code | 527 | 1,974 | using System;
using System.Data;
using System.Diagnostics;
namespace EclipsePos.Data
{
/// <summary>
/// Summary description for Trans_item.
/// </summary>
public class TransItem : IRelatableSet
{
private int trans_no;
private string store_no;
private string organization_no;
private int seq_n... | 30,420 |
https://github.com/enterstudio/cobol-iot-dashboard/blob/master/Dockerfile | Github Open Source | Open Source | MIT | 2,018 | cobol-iot-dashboard | enterstudio | Dockerfile | Code | 130 | 407 | FROM debian:jessie AS base
RUN apt-get update && apt-get -y install libcob1 libhiredis0.10
FROM base AS build-base
RUN apt-get -y install make gcc
FROM build-base AS build-cobol
RUN apt-get -y install open-cobol libhiredis-dev && \
mkdir -p /usr/src
WORKDIR /usr/src
COPY Makefile /usr/src
COPY src-c /usr/s... | 38,171 |
https://github.com/jacobhanshaw/LimitlessNewWorlds/blob/master/LNW/Assets/LeapMotion/cmake-3.1.0-rc3/Help/policy.meta | Github Open Source | Open Source | BSD-3-Clause | 2,014 | LimitlessNewWorlds | jacobhanshaw | Unity3D Asset | Code | 8 | 44 | fileFormatVersion: 2
guid: bdc4222bec0cfaa4d8be68f29a313040
folderAsset: yes
DefaultImporter:
userData:
| 27,448 |
https://github.com/deboyblog/frontend-tools/blob/master/app/src/renderer/vuex/mutation-types.js | Github Open Source | Open Source | MIT | 2,017 | frontend-tools | deboyblog | JavaScript | Code | 22 | 78 | export const WINDOW_ON_RESIZE = 'WINDOW_ON_RESIZE'
// settings
export const RE_LAYOUT = 'RE_LAYOUT'
export const TOGGLE_SLIDER = 'TOGGLE_SLIDER'
export const RESET_SETTINGS = 'RESET_SETTINGS'
| 111 |
https://github.com/ahmad0123123123/Final-Year/blob/master/Scripts/ConsumeEvents.cs | Github Open Source | Open Source | Unlicense | null | Final-Year | ahmad0123123123 | C# | Code | 127 | 448 |
using UnityEngine;
using UnityEngine.Events;
/// <summary>
/// This class automaticly creates listener for item use event.
/// When we will consume some item we will use reciver method from that script
/// </summary>
namespace DeadSilence
{
public class ConsumeEvents : MonoBehaviour
{
public enum C... | 25,598 |
https://github.com/TRex22/OldCodeArchive/blob/master/SchoolWork/2012/IT12/Inheritance Bird Sighting/myBirds/MammalSighting.java | Github Open Source | Open Source | MIT | 2,015 | OldCodeArchive | TRex22 | Java | Code | 175 | 603 | package myBirds;
public class MammalSighting {
private int sightingNo;
private int LodgeNo;
private char Species;
private String SpeciesDescr;
private String ValidCode;
//parm constructor
public MammalSighting (int s, int l, char S, String SD, String VC)
{
sightingNo = s;
LodgeNo = l;
Species = S;
... | 47,994 |
https://github.com/Israel-IT/dotnet-mockup-be/blob/master/DummyWebApp.BLL/Options/AccessTokenOptions.cs | Github Open Source | Open Source | MIT | null | dotnet-mockup-be | Israel-IT | C# | Code | 72 | 160 | namespace DummyWebApp.BLL.Options
{
public class AccessTokenOptions
{
public string? Issuer { get; set; }
public string? Audience { get; set; }
public int AccessTokenLifetime { get; set; }
public int RefreshTokenLifetime { get; set; }
public string? Key { get; set; }
... | 35,018 |
https://github.com/Pauan/Immutable/blob/master/src/Benchmark/Tuple.js | Github Open Source | Open Source | MIT | 2,015 | Immutable | Pauan | JavaScript | Code | 446 | 1,318 | var immutablejs = require("immutable");
var mori = require("mori");
var immutable = require("./Immutable.min.js");
import { group, message, time } from "./util";
import { nil } from "../Immutable/static";
import { Cons } from "../Immutable/Cons";
import { array_has, array_get, array_insert, array_modify, arra... | 28,772 |
https://github.com/werpu/tinydecscodegen/blob/master/codegen_plugin/src/main/java/net/werpu/tools/supportive/transformations/shared/modelHelpers/FirstOrderFunction.java | Github Open Source | Open Source | MIT | 2,019 | tinydecscodegen | werpu | Java | Code | 597 | 1,496 | /*
*
*
* Copyright 2019 Werner Punz
*
* 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, modify, merge, publi... | 49,570 |
https://github.com/Disolu/hu/blob/master/database/seeds/SedeSeed.php | Github Open Source | Open Source | MIT | null | hu | Disolu | PHP | Code | 35 | 155 | <?php
use Illuminate\Database\Seeder;
class SedeSeed extends Seeder
{
public function run()
{
DB::table('sede')->insert(
array(
array(
'nombre'=>'2do Sector',
'usercreate'=> '1',
'sede_direccion'=>'Villa El Salvador'
),
array(
... | 740 |
https://github.com/otaviobps/gym_scheduler_back/blob/master/src/controllers/ScheduleController.js | Github Open Source | Open Source | MIT | null | gym_scheduler_back | otaviobps | JavaScript | Code | 142 | 434 | const Cryptography = require("../lib/Cryptography");
const Schedule = require("../models/schedule");
module.exports = {
async saveSchedule(req, res) {
try {
const { name, apartment, password, startDate, endDate } = req.body;
const password_hash = await Cryptography.hash(password);
await Sched... | 5,886 |
https://github.com/gerasev-kirill/atlassian-connect-django/blob/master/atlassian_connect_django/router.py | Github Open Source | Open Source | MIT | null | atlassian-connect-django | gerasev-kirill | Python | Code | 190 | 709 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.db import connections
from atlassian_connect_django.models.djira import Issue
from atlassian_connect_django.models.confluence import Content
class Router(object):
def __init__(self):
self.db_jira_alias = None
self.db_confluence_... | 40,858 |
https://github.com/Embodimentgeniuslm3/GHOSTS/blob/master/src/Ghosts.Api/Infrastructure/Extensions/CorsExtensions.cs | Github Open Source | Open Source | BSD-3-Clause | 2,022 | GHOSTS | Embodimentgeniuslm3 | C# | Code | 136 | 402 | // Copyright 2017 Carnegie Mellon University. All Rights Reserved. See LICENSE.md file for terms.
using Microsoft.AspNetCore.Cors.Infrastructure;
using Microsoft.Extensions.Configuration;
namespace Ghosts.Api.Infrastructure.Extensions
{
public static class CorsPolicyExtensions
{
public static CorsOpt... | 25,009 |
https://github.com/ocliuziyang/adminlte_rabc/blob/master/resources/views/admin/permission/index.blade.php | Github Open Source | Open Source | MIT | null | adminlte_rabc | ocliuziyang | PHP | Code | 147 | 802 | @extends('admin.layouts.dashboard')
@section('content')
<div class="row" style="margin-top: 40px;">
<div class="col-md-1">
@include('admin.components.left_menu')
</div>
<div class="col-md-11">
<div class="box">
<div class="box-header">
... | 7,282 |
https://github.com/Pathoschild/smapi-mod-dump/blob/master/source/Farm Type Manager/FarmTypeManager/Events/ModMessageReceived.cs | Github Open Source | Open Source | MIT | 2,023 | smapi-mod-dump | Pathoschild | C# | Code | 218 | 449 | /*************************************************
**
** You're viewing a file in the SMAPI mod dump, which contains a copy of every open-source SMAPI mod
** for queries and analysis.
**
** This is *not* the original file, and not necessarily the latest version.
** Source repository: https://github.com/Esca-MMC/FarmTyp... | 39,400 |
https://github.com/dsoft20/DinDinTools/blob/master/dindin/Modules/notes.cs | Github Open Source | Open Source | MIT | 2,016 | DinDinTools | dsoft20 | C# | Code | 389 | 1,302 | using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections.Generic;
using System.IO;
namespace dindin.Modules
{
public partial class notes : Form
{
publ... | 45,819 |
https://github.com/leeonky/builder/blob/master/src/test/java/com/github/leeonky/javabuilder/spec/BuildWithRepository.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | builder | leeonky | Java | Code | 367 | 1,848 | package com.github.leeonky.javabuilder.spec;
import com.github.leeonky.javabuilder.BeanContext;
import com.github.leeonky.javabuilder.BeanSpecs;
import com.github.leeonky.javabuilder.Combination;
import com.github.leeonky.javabuilder.FactorySet;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Ac... | 27,493 |
https://github.com/qinwant/GokRuoYi/blob/master/rouyi-goods/src/main/java/com/ruoyi/goods/mapper/GokGoodsMapper.java | Github Open Source | Open Source | MIT | 2,020 | GokRuoYi | qinwant | Java | Code | 118 | 435 | package com.ruoyi.goods.mapper;
import com.ruoyi.goods.domain.GokGoods;
import java.util.List;
/**
* 商品Mapper接口
*
* @author ruoyi
* @date 2020-11-20
*/
public interface GokGoodsMapper
{
/**
* 查询商品
*
* @param id 商品ID
* @return 商品
*/
public GokGoods selectGokGoodsById(Long id);
... | 25,210 |
https://github.com/gthd/pawk/blob/master/text_files/filegen_REMOTE_21122.py | Github Open Source | Open Source | Apache-2.0 | 2,020 | pawk | gthd | Python | Code | 88 | 322 | import random
import string
class FileGenerator:
def genRandomDigits(self):
digits = "".join( [random.choice(string.digits) for i in range(random.randint(1,8))])
return digits
def genRandomChars(self):
chars = "".join( [random.choice(string.ascii_letters[:26]) for i in range(random.ra... | 2,709 |
https://github.com/andersontmachado/Python_na_PRATICA/blob/master/Ex046- AULA 13- ESTRUTURA DE REPETIÇÃO FOR.py | Github Open Source | Open Source | MIT | 2,021 | Python_na_PRATICA | andersontmachado | Python | Code | 13 | 69 | i=int(input('Inicio: '))
f=int(input('Fim: '))
p=int(input('Passo: '))
for c in range (i,f+1,p):
print(c)
print('FIM')
| 8,477 |
https://github.com/abhilater/spark-structured-streaming-timeouts/blob/master/src/main/java/com/abhilater/beans/FAQEvent.java | Github Open Source | Open Source | Apache-2.0 | null | spark-structured-streaming-timeouts | abhilater | Java | Code | 36 | 127 | package com.abhilater.beans;
import java.io.Serializable;
import java.sql.Timestamp;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class FAQEvent implements ... | 28,668 |
https://github.com/LauraCole1900/nosql-social-api/blob/master/models/thoughtModel.js | Github Open Source | Open Source | MIT | null | nosql-social-api | LauraCole1900 | JavaScript | Code | 87 | 275 | const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const reactions = require("./reactionModel");
const formatDate = require("../utils/helpers");
const thoughtSchema = new Schema(
{
thoughtText: {
type: String,
required: true,
minLength: 1,
maxLength: 280
},
user... | 25,788 |
https://github.com/DmitriyZaitsevWeb/mautic/blob/master/Views/Bar/index.html.php | Github Open Source | Open Source | MIT | 2,018 | mautic | DmitriyZaitsevWeb | PHP | Code | 145 | 649 | <?php
/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
$view->extend('MauticCoreBundle:Default:content.html.php');
if (!$view['slots']->get('mauticContent')) {
if (... | 43,826 |
https://github.com/BarexaS/Relize/blob/master/src/main/resources/public/node_modules/@angular/platform-browser/src/browser.d.ts | Github Open Source | Open Source | MIT | 2,017 | Relize | BarexaS | TypeScript | Code | 102 | 260 | import {ErrorHandler, PlatformRef, Provider} from "@angular/core";
import {AnimationDriver} from "../src/dom/animation_driver";
export declare const INTERNAL_BROWSER_PLATFORM_PROVIDERS:Provider[];
/**
* @security Replacing built-in sanitization providers exposes the application to XSS risks.
* Attacker-controlled dat... | 5,317 |
https://github.com/DancerDates/dolphin.pro/blob/master/modules/deano/deanos_facebook_connect/install/langs/fr.php | Github Open Source | Open Source | CC-BY-3.0 | null | dolphin.pro | DancerDates | PHP | Code | 1,159 | 3,467 | <?php
/***************************************************************************
* Date : Feb 21, 2013
* Copywrite : (c) 2013 by Dean J. Bassett Jr.
* Website : http://www.deanbassett.com
*
* Product Name : Deanos Facebook Connect
* Product Version : 4.2.7
*
* IMPORTANT: This is a commercial product made by D... | 45,083 |
https://github.com/JRetza/smile/blob/master/core/src/main/java/smile/projection/Projection.java | Github Open Source | Open Source | Apache-2.0 | 2,019 | smile | JRetza | Java | Code | 201 | 328 | /*******************************************************************************
* Copyright (c) 2010 Haifeng Li
*
* 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... | 32,596 |
https://github.com/jeryqwq/ice/blob/master/examples/with-react-miniapp-todos/src/pages/add-todo/index.jsx | Github Open Source | Open Source | MIT | 2,022 | ice | jeryqwq | JavaScript | Code | 116 | 395 | import React, { useState } from 'react';
import AddButton from '@/components/add-button';
import styles from './index.module.scss';
const AddTodo = () => {
// state
const [value, setValue] = useState('');
// handlers
const onChange = (e) => {
setValue(e.target.value);
};
const add = () => {
cons... | 26,977 |
https://github.com/kamil-mrzyglod/BattleSheet/blob/master/src/modules/modules.jsx | Github Open Source | Open Source | MIT | null | BattleSheet | kamil-mrzyglod | null | Spoken | 14 | 41 | import Start from './start/start';
import NewBattle from './battle/newBattle';
module.exports = {
Start,
NewBattle
}; | 43,979 |
https://github.com/Shsl4/MidnightEngine/blob/master/Source/Private/Core/StackTrace.cpp | Github Open Source | Open Source | MIT | 2,021 | MidnightEngine | Shsl4 | C++ | Code | 430 | 1,515 | #include <Core/StackTrace.h>
#include <Core/EngineMacros.h>
#include <Exception/Exception.h>
#include <fmt/format.h>
#ifdef _WIN64
#include <Windows.h>
#include <DbgHelp.h>
#include <winnt.h>
#else
#include <execinfo.h>
#include <cxxabi.h>
#endif
StackFrame::StackFrame(const char* function, const char* file, cons... | 5,277 |
https://github.com/lemon5920/0verAPI/blob/master/app/SchoolEditor.php | Github Open Source | Open Source | MIT | 2,017 | 0verAPI | lemon5920 | PHP | Code | 256 | 954 | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Carbon\Carbon;
/**
* App\SchoolEditor
*
* @property string $username
* @property string $password
* @property string $email
* @property string $chinese_name
* @property string $english_name
* @prop... | 43,034 |
https://github.com/mp40/PCCS-Helper/blob/master/src/helpers/testHelpers.jsx | Github Open Source | Open Source | MIT | null | PCCS-Helper | mp40 | null | Spoken | 73 | 172 | import React from 'react';
import { mount } from 'enzyme';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import reducers from '../reducers';
import App from '../components/App';
import { initialStore } from './initialStore';
export const getStore = (mockStore = initialStore) => createSto... | 43,510 |
https://github.com/AbidarYassine/e-commBackEnd/blob/master/app/Http/Resources/UserRessource.php | Github Open Source | Open Source | MIT | 2,022 | e-commBackEnd | AbidarYassine | PHP | Code | 45 | 142 | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class UserRessource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | 16,729 |
https://github.com/zoldello/d3jsTreePrototype/blob/master/node_modules/gramene-trees-client/node_modules/gramene-search-client/src/grameneSwaggerClient.js | Github Open Source | Open Source | MIT | null | d3jsTreePrototype | zoldello | JavaScript | Code | 55 | 162 | 'use strict';
var _ = require('lodash');
var Q = require('q');
var Validator = require('swagger-model-validator');
var serverUrl = require('./serverUrl');
var grameneSwaggerClient = (function() {
var Client = require('swagger-client');
var deferred = Q.defer();
var gramene = new Client({url: serverUrl(), succes... | 10,416 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.