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/ndleon09/TopApps/blob/master/TopApps/App.swift | Github Open Source | Open Source | MIT | 2,016 | TopApps | ndleon09 | Swift | Code | 99 | 266 | //
// App.swift
// TopApps
//
// Created by Nelson Dominguez on 24/04/16.
// Copyright © 2016 Nelson Dominguez. All rights reserved.
//
import Foundation
import RealmSwift
import SwiftyJSON
class App: Object
{
dynamic var id: Int = 0
dynamic var name: String?
dynamic var category: String?
dynamic ... | 37,722 |
https://github.com/Celia95/TinyHeroKernel/blob/master/src/main/java/com/raincoatmoon/Core/BotAction.java | Github Open Source | Open Source | Apache-2.0 | 2,018 | TinyHeroKernel | Celia95 | Java | Code | 77 | 206 | package com.raincoatmoon.Core;
import com.raincoatmoon.Keyboards.KeyboardData;
public class BotAction {
protected String name;
protected String description;
protected Action action;
public BotAction(String name, String description, Action action) {
this.name = name;
this.description =... | 1,492 |
https://github.com/eugeneego/Blocks/blob/master/EEBlocks/UIActionSheet+EEBlocks.h | Github Open Source | Open Source | MIT | null | Blocks | eugeneego | C | Code | 36 | 154 | //
// UIActionSheet+EEBlocks.h
// EEBlocks
//
// Copyright (c) 2014 Eugene Egorov. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^EEUIActionSheetBlock)(UIActionSheet *actionSheet);
typedef void (^EEUIActionSheetCompletionBlock)(UIActionSheet *actionSheet, NSInteger buttonIndex);
@interface ... | 49,555 |
https://github.com/ScalablyTyped/SlinkyTyped/blob/master/i/instagram-private-api/src/main/scala/typingsSlinky/instagramPrivateApi/tagFeedResponseMod/TagFeedResponseImageVersions2.scala | Github Open Source | Open Source | MIT | 2,021 | SlinkyTyped | ScalablyTyped | Scala | Code | 77 | 362 | package typingsSlinky.instagramPrivateApi.tagFeedResponseMod
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.`|`
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
@js.native
trait TagFeedResponseImageVersions2 extends StObject {
... | 32,963 |
https://github.com/starsoftdev/study-web/blob/master/app/containers/PaymentInformationPage/tests/selectors.test.js | Github Open Source | Open Source | MIT | 2,018 | study-web | starsoftdev | JavaScript | Code | 46 | 124 | import expect from 'expect';
import { selectPaymentInformationPageDomain } from '../selectors';
// const selector = selectPaymentInformationPageDomain();
describe('selectPaymentInformationPageDomain', () => {
const paymentInformationPageDomainSelector = selectPaymentInformationPageDomain();
it('should select Paym... | 42,264 |
https://github.com/mazhuda/siakad/blob/master/application/models/M_upload_berkasta.php | Github Open Source | Open Source | LicenseRef-scancode-unknown-license-reference, MIT, Apache-2.0 | 2,018 | siakad | mazhuda | PHP | Code | 147 | 915 | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class M_upload_berkasta extends CI_Model{
public function simpansidang($data)
{
$this->db->insert ("berkas",$data);
$idberkas = $this->db->insert_id();
return $idberkas;
}
public function simpan($data)
{
$thi... | 33,010 |
https://github.com/k-angama/MotionTracking/blob/master/MotionTracking WatchKit Extension/Home/HomeViewModel.swift | Github Open Source | Open Source | MIT | 2,022 | MotionTracking | k-angama | Swift | Code | 165 | 534 | //
// HomeViewModel.swift
// MotionTracking WatchKit Extension
//
// Created by Karim Angama on 31/01/2022.
//
import Foundation
import WatchKit
import Combine
class HomeViewModel: BaseViewModel {
/// Propertie
var motionManager:MotionManager?
/// Output
@Published var numberFileSending =... | 40,873 |
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/c/c_api_internal.h | Github Open Source | Open Source | Apache-2.0, LicenseRef-scancode-generic-cla, BSD-2-Clause | 2,023 | tensorflow | tensorflow | C++ | Code | 1,354 | 3,694 | /* Copyright 2018 The TensorFlow Authors. 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.0
Unless required by applicable law or a... | 15,922 |
https://github.com/Sniffing/project/blob/master/code/OpenCV/opencv-2.4.11/samples/c/CMakeFiles/example_delaunay.dir/build.make | Github Open Source | Open Source | BSD-3-Clause | 2,015 | project | Sniffing | Makefile | Code | 418 | 2,967 | # CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.8
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Remove some rules from gmake that... | 24,716 |
https://github.com/CooCOccO/aliyun-oss-ruby-sdk/blob/master/lib/aliyun_oss/common/struct.rb | Github Open Source | Open Source | MIT | null | aliyun-oss-ruby-sdk | CooCOccO | Ruby | Code | 180 | 456 | # -*- encoding: utf-8 -*-
module AliyunOSS
module Common
# Common structs used. It provides a 'attrs' helper method for
# subclass to define its attributes. 'attrs' is based on
# attr_reader and provide additional functionalities for classes
# that inherits Struct::Base :
# * the constuctor is p... | 49,583 |
https://github.com/bacta/pre-cu-archive/blob/master/src/main/java/com/ocdsoft/bacta/swg/server/controller/game/client/ConnectPlayerMessageController.java | Github Open Source | Open Source | MIT | 2,021 | pre-cu-archive | bacta | Java | Code | 112 | 611 | package com.ocdsoft.bacta.swg.server.controller.game.client;
import com.google.inject.Inject;
import com.ocdsoft.bacta.engine.conf.BactaConfiguration;
import com.ocdsoft.bacta.swg.server.message.game.client.ConnectPlayerResponseMessage;
import com.ocdsoft.bacta.swg.shared.network.messages.chat.ChatAvatarId;
import org... | 27,622 |
https://github.com/manarimo/ICFPC2021/blob/master/amylase/analysis.py | Github Open Source | Open Source | MIT | null | ICFPC2021 | manarimo | Python | Code | 63 | 238 | import math
from pathlib import Path
import json
def main():
header = ["name", "hole_vs", "fig_es", "fig_vs", "eps", "max_score"]
print(", ".join(header))
for file in Path("../problems").iterdir():
if not file.name.endswith(".json"):
continue
with file.open() as f:
... | 44,535 |
https://github.com/terotests/Ranger/blob/master/adventofcode/day1/bin/LambdaSignature3.java | Github Open Source | Open Source | MIT | 2,022 | Ranger | terotests | Java | Code | 17 | 31 | public interface LambdaSignature3 {
public Integer run( final Integer left, final Integer right, final Integer index);
}
| 5,555 |
https://github.com/hynra/SendBird-JavaScript/blob/master/react-native-redux-sample/ReactNativeWithSendBird/src/sendbirdActions/groupChannel.js | Github Open Source | Open Source | MIT | 2,020 | SendBird-JavaScript | hynra | JavaScript | Code | 283 | 820 | import SendBird from 'sendbird';
export const sbCreateGroupChannelListQuery = () => {
const sb = SendBird.getInstance();
return sb.GroupChannel.createMyGroupChannelListQuery();
}
export const sbGetGroupChannelList = (groupChannelListQuery) => {
return new Promise((resolve, reject) => {
groupChanne... | 37,890 |
https://github.com/zhanghai/Douya/blob/master/app/src/main/java/me/zhanghai/android/douya/network/api/info/frodo/SimpleAward.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | Douya | zhanghai | Java | Code | 108 | 394 | /*
* Copyright (c) 2017 Zhang Hai <Dreaming.in.Code.ZH@Gmail.com>
* All Rights Reserved.
*/
package me.zhanghai.android.douya.network.api.info.frodo;
import android.os.Parcel;
import com.google.gson.annotations.SerializedName;
public class SimpleAward extends BaseItem {
@SerializedName("number")
public ... | 10,488 |
https://github.com/finworks/glass/blob/master/repository/XML-Parser.g.package/XMLTokenizer.class/instance/handleEntity.in..st | Github Open Source | Open Source | MIT | 2,016 | glass | finworks | null | Spoken | 34 | 87 | entities
handleEntity: referenceString in: parsingContext
| entity entityValue |
entity _ self entity: referenceString.
entityValue _ entity valueForContext: parsingContext.
(self class isCharEscape: entityValue)
ifTrue: [entityValue _ entity reference].
self pushStream: (ReadStream on: entityValue asString) | 1,806 |
https://github.com/Dauniusha/basic-js/blob/master/src/vigenere-cipher.js | Github Open Source | Open Source | MIT | null | basic-js | Dauniusha | JavaScript | Code | 163 | 467 | const CustomError = require("../extensions/custom-error");
class VigenereCipheringMachine {
constructor(value) {
this.value = value;
}
encrypt(message, key) {
if (message == undefined || key == undefined)
throw Error;
message = message.split('');
let j = 0;
for (let i = 0; i < message... | 26,423 |
https://github.com/berry120/esp32-solenoid-pcb/blob/master/untitled.sch | Github Open Source | Open Source | MIT | 2,020 | esp32-solenoid-pcb | berry120 | Eagle | Code | 20,000 | 112,485 | <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE eagle SYSTEM "eagle.dtd"> <eagle version="7.3.0"> <drawing> <settings> <setting alwaysvectorfont="no"/> <setting verticaltext="up"/> </settings> <grid distance="0.1" unitdist="inch" unit="inch" style="lines" multiple="1" display="no" altdistance="0.01" altunitdist="inch"... | 40,588 |
https://github.com/Blue64/Space_Engineers/blob/master/AppData/Local/Temp/SpaceEngineers/926970631.sbm_EnergyShields/Log.cs | Github Open Source | Open Source | MIT | null | Space_Engineers | Blue64 | C# | Code | 157 | 438 | using System;
using System.IO;
using Sandbox.ModAPI;
namespace Cython.EnergyShields
{
public class Log
{
private static Log INSTANCE = null;
private TextWriter file = null;
private string fileName = "";
private Log() {
}
private static Log getInstance() {
if (Log.INSTANCE == null) {
Log.INSTANCE... | 29,656 |
https://github.com/JetBrains/kotlin-wrappers/blob/master/kotlin-node/src/jsMain/generatedLegacy/node/workerThreads/markAsUntransferable.kt | Github Open Source | Open Source | Apache-2.0 | 2,023 | kotlin-wrappers | JetBrains | Kotlin | Code | 200 | 408 | // Automatically generated - do not modify!
@file:JsModule("node:worker_threads")
package node.workerThreads
/**
* Mark an object as not transferable. If `object` occurs in the transfer list of
* a `port.postMessage()` call, it is ignored.
*
* In particular, this makes sense for objects that can be cloned, rathe... | 19,649 |
https://github.com/ChiHuoMeiShi/FoodiesCate/blob/master/吃货美食/吃货美食/Class/Discover/Controller/cell/dis/ArticalController/Controller/CHArticalViewController.h | Github Open Source | Open Source | Apache-2.0 | 2,016 | FoodiesCate | ChiHuoMeiShi | Objective-C | Code | 32 | 117 | //
// CHArticalViewController.h
// 吃货美食
//
// Created by eric on 16/5/12.
// Copyright © 2016年 赵天. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CHCArticalData.h"
@interface CHArticalViewController : UIViewController
@property(nonatomic,strong)CHCArticalData *data;
@end
| 18,782 |
https://github.com/theM1st/dev.personaloakademija.lt/blob/master/database/seeds/ItknowledgesData.php | Github Open Source | Open Source | MIT | null | dev.personaloakademija.lt | theM1st | PHP | Code | 714 | 2,262 | <?php
$data = array();
$knowledges = array();
$knowledges[] = array('name_lt' => 'Word', 'position' => 1);
$knowledges[] = array('name_lt' => 'Excel', 'position' => 2);
$knowledges[] = array('name_lt' => 'PowerPoint', 'position' => 3);
$knowledges[] = array('name_lt' => 'Access', 'position' =>... | 14,952 |
https://github.com/ryanorsinger/protor-laravel/blob/master/app/views/users/index.blade.php | Github Open Source | Open Source | MIT | null | protor-laravel | ryanorsinger | PHP | Code | 1 | 25 | /vagrant/sites/protor.dev/app/views/users/index.blade.php | 35,757 |
https://github.com/atruskie/IdSharpCore/blob/master/IdSharp.Tagging/ID3v2/Classes/Frames/Lists/AudioTextBindingList.cs | Github Open Source | Open Source | MIT | 2,022 | IdSharpCore | atruskie | C# | Code | 78 | 287 | using System.Collections.Generic;
using System.ComponentModel;
namespace IdSharp.Tagging.ID3v2.Frames.Lists
{
internal sealed class AudioTextBindingList : BindingList<IAudioText>
{
public AudioTextBindingList()
{
AllowNew = true;
}
public AudioTextBindingList(IList<... | 9,651 |
https://github.com/Durzot/MT_NMF/blob/master/src/VariantsNMF.jl | Github Open Source | Open Source | MIT | null | MT_NMF | Durzot | Julia | Code | 112 | 478 | module VariantsNMF
using Clustering
using DataFrames
using Distances
using Distributed
using Distributions
using LinearAlgebra: diag, norm, svd, transpose
using LinearAlgebra.BLAS: dot
using Printf: @printf
using ProgressMeter
using Random
using Statistics: mean, cor
export β_divergence
export α_divergence
#### comm... | 34,517 |
https://github.com/tudngn/IKTF-NN/blob/master/DQN_Agent_Keras_with_regulators.py | Github Open Source | Open Source | MIT | 2,021 | IKTF-NN | tudngn | Python | Code | 900 | 3,411 | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 21 11:19:36 2019
@author: Lab User
"""
import numpy as np
import math
import cdd
import copy
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Activation
from tensorflow.keras.optimizers import Adam
from Memory import ReplayBuffer
... | 3,432 |
https://github.com/bonomali/squidex/blob/master/src/Squidex.Domain.Apps.Core.Operations/ValidateContent/Validators/ReferencesValidator.cs | Github Open Source | Open Source | MIT | 2,019 | squidex | bonomali | C# | Code | 118 | 347 | // ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ============================... | 45,690 |
https://github.com/kaola-fed/moky/blob/master/src/middleware/async.js | Github Open Source | Open Source | MIT | 2,020 | moky | kaola-fed | JavaScript | Code | 189 | 577 | const url = require('url')
const Proxy = require('../lib/proxy')
const u = require('../lib/utils')
module.exports = (options) => {
const proxy = Proxy(options, true)
return async ctx => {
let target = ''
let isProxyLocalPort = false
if (options.proxyRules) {
isProxyLocalPort = true
for (le... | 24,018 |
https://github.com/baby636/ipfs-p2wdb-service/blob/master/src/use-cases/entry/read-entry.js | Github Open Source | Open Source | MIT | 2,021 | ipfs-p2wdb-service | baby636 | JavaScript | Code | 176 | 466 | /*
This is the Class Library for the read-entry use-cases. This is when a user
of this service wants to read an Entry or Entries from the database.
*/
// const DBEntry = require('../entities/db-entry')
// let _this
class ReadEntry {
constructor (localConfig = {}) {
if (!localConfig.p2wdbAdapter) {
th... | 29,282 |
https://github.com/KATSU0411/MegurimasuGame/blob/master/Kyogi/CButton.h | Github Open Source | Open Source | BSD-3-Clause, libtiff, IJG | 2,019 | MegurimasuGame | KATSU0411 | C++ | Code | 70 | 254 | //////////////////////////////////////////////
// ボタンクラス
// ボタンの作成とクリックの判定を行う
// 使用するテクスチャハンドラと名前を所持している
//////////////////////////////////////////////
#pragma once
#include "DxLib.h"
#include "Region.h"
#include <string>
class CButton {
public:
CButton(){};
~CButton(){}
bool OnCursor(POINT cursor) {
REC... | 18,983 |
https://github.com/zkenstein/data-pesticides/blob/master/src/DataPesticides/Dataset/TriplesConverter/TriplesConverterInterface.php | Github Open Source | Open Source | MIT | 2,017 | data-pesticides | zkenstein | PHP | Code | 55 | 143 | <?php
namespace Neveldo\DataPesticides\Dataset\TriplesConverter;
use Neveldo\DataPesticides\Dataset\Triple;
/**
* Interface TriplesConverterInterface
* Allow to convert array of data into array of RDF triples
* @package Neveldo\DataPesticides\Dataset\TriplesConverter
*/
interface TriplesConverterInterface
{
/... | 24,740 |
https://github.com/jdkoren/sqlite-parser/blob/master/src/test/resources/pager1.test_99.sql | Github Open Source | Open Source | MIT | 2,022 | sqlite-parser | jdkoren | SQL | Code | 42 | 107 | -- pager1.test
--
-- execsql {
-- UPDATE x1 SET z = a_string(300) WHERE rowid>40;
-- COMMIT;
-- PRAGMA integrity_check;
-- SELECT count(*) FROM x1;
-- }
UPDATE x1 SET z = a_string(300) WHERE rowid>40;
COMMIT;
PRAGMA integrity_check;
SELECT count(*) FROM x1; | 39,985 |
https://github.com/tlodge/react-native-wg/blob/master/ios/Wg.h | Github Open Source | Open Source | MIT | null | react-native-wg | tlodge | C | Code | 8 | 36 | #import <React/RCTBridgeModule.h>
@interface Wg : NSObject <RCTBridgeModule>
@end
| 37,424 |
https://github.com/LiangChenLove/ningmengcode/blob/master/application/admin/model/Periodexerciseinfo.php | Github Open Source | Open Source | Apache-2.0 | null | ningmengcode | LiangChenLove | PHP | Code | 786 | 4,032 | <?php
namespace app\admin\model;
use think\Db;
use think\Model;
use think\Validate;
use app\admin\model\Exercisesubject;
use app\admin\model\Exercisesubjectoptions;
use app\admin\model\Schedulinglessoninfo;
/*
* 分类Model
* @ lc
*/
class Periodexerciseinfo extends Model {
protected $table = 'nm_periodexerciseinfo';
... | 11,947 |
https://github.com/chazu/docker-images/blob/master/pipework/Dockerfile | Github Open Source | Open Source | MIT | 2,019 | docker-images | chazu | Dockerfile | Code | 189 | 558 | FROM ubuntu:18.04
MAINTAINER dreamcat4 <dreamcat4@gmail.com>
ENV _clean="rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*"
ENV _apt_clean="eval apt-get clean && $_clean"
# Install gnupg2
RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -qqy gnupg2 && $_apt_clean
# Install docker
RUN apt-get upda... | 42,349 |
https://github.com/JeremyKimotho/musixmatch/blob/master/src/app/tracks.ts | Github Open Source | Open Source | MIT | null | musixmatch | JeremyKimotho | TypeScript | Code | 18 | 46 | export class Tracks {
constructor(public rank:number, public track_name: string, public artist_name: string, public image_path: string, public video_id){}
}
| 16,276 |
https://github.com/birdhumming/usaco/blob/master/done/convention2.cpp | Github Open Source | Open Source | OLDAP-2.2.1 | null | usaco | birdhumming | C++ | Code | 255 | 745 | #include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define ii pair<int, int>
#define ll long long
#define vi vector<int>
#define vc vector<char>
#define pb push_back
#define rz resize
#define mp make_pair
#define FOR(n) for (int i = 0; i < n; i++)
#define FOR1(n) for (int... | 51,137 |
https://github.com/bpbp-boop/network-weathermap/blob/master/websrc/cacti-user/src/reducers/DisplayReducer.js | Github Open Source | Open Source | MIT, CC-BY-2.5, LicenseRef-scancode-unknown-license-reference | 2,020 | network-weathermap | bpbp-boop | JavaScript | Code | 28 | 74 |
const INITIAL_STATE = {
cycling: false,
cycle_group: 0,
cycle_controls_visible: false,
fullscreen: false
};
export default function (state = INITIAL_STATE, action) {
// No actions yet!
return state;
}; | 20,234 |
https://github.com/bondrogeen/vuesp/blob/master/vue/src/store/modules/app.js | Github Open Source | Open Source | Unlicense, MIT | null | vuesp | bondrogeen | JavaScript | Code | 184 | 463 | export default {
namespaced: true,
state: () => ({
name: 'Vuesp',
info: {},
settings: {},
ping: 0,
progress: 0,
connected: false,
overlay: false,
scanList: {}
}),
mutations: {
SET_CONNECT: (state, value) => {
state.connected = value;
},
SET_PING: (state) => {
... | 43,755 |
https://github.com/rsahlin/graphics-by-opengl/blob/master/graphics-by-opengl-j2se/src/main/java/com/nucleus/vulkan/structs/Extent3D.java | Github Open Source | Open Source | Apache-2.0 | 2,022 | graphics-by-opengl | rsahlin | Java | Code | 31 | 85 | package com.nucleus.vulkan.structs;
public class Extent3D {
final int[] values = new int[3];
public Extent3D(int width, int height, int depth) {
values[0] = width;
values[1] = height;
values[2] = depth;
}
} | 47,593 |
https://github.com/ashwinimore/chpl-api/blob/master/chpl/chpl-service/src/main/java/gov/healthit/chpl/scheduler/job/xmlgenerator/TestParticipantXmlGenerator.java | Github Open Source | Open Source | BSD-2-Clause-FreeBSD | 2,021 | chpl-api | ashwinimore | Java | Code | 102 | 483 | package gov.healthit.chpl.scheduler.job.xmlgenerator;
import java.util.List;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamWriter;
import gov.healthit.chpl.domain.TestParticipant;
public class TestParticipantXmlGenerator extends XmlGenerator {
public static void add(List<TestParti... | 7,759 |
https://github.com/weisdd/defsec/blob/master/adapters/cloudformation/aws/autoscaling/autoscaling.go | Github Open Source | Open Source | MIT | null | defsec | weisdd | Go | Code | 22 | 111 | package autoscaling
import (
"github.com/aquasecurity/defsec/parsers/cloudformation/parser"
"github.com/aquasecurity/defsec/providers/aws/autoscaling"
)
// Adapt ...
func Adapt(cfFile parser.FileContext) (result autoscaling.Autoscaling) {
result.LaunchConfigurations = getLaunchConfigurations(cfFile)
return result... | 46,145 |
https://github.com/owsas/opensource/blob/master/packages/parse-cloud-class/src/util/requireLogin.ts | Github Open Source | Open Source | MIT | 2,022 | opensource | owsas | TypeScript | Code | 45 | 101 | export const PLEASE_LOGIN = 'Please login';
/**
* Requires the request to have ben sent by an user or by a master key
* @param req
*/
export default function requireLogin(req: Parse.Cloud.BeforeSaveRequest | Parse.Cloud.BeforeDeleteRequest) {
if (!req.user && !req.master) {
throw new Error(PLEASE_LOGIN);
}
... | 45,604 |
https://github.com/lalittech/ThreadPool/blob/master/ThreadPool.hpp | Github Open Source | Open Source | Zlib | 2,016 | ThreadPool | lalittech | C++ | Code | 210 | 733 | #pragma once
#include <vector>
#include <queue>
#include <memory>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <future>
#include <functional>
#include <stdexcept>
class ThreadPool final {
public:
// the constructor just launches some amount of workers
ThreadPool(size_t threads_n =... | 10,535 |
https://github.com/smartcommunitylab/sco.comuneintasca/blob/master/src/main/java/it/smartcommunitylab/comuneintasca/connector/scripts/HotelsScript.java | Github Open Source | Open Source | Apache-2.0 | 2,021 | sco.comuneintasca | smartcommunitylab | Java | Code | 363 | 1,404 | /*******************************************************************************
* Copyright 2012-2014 Trento RISE
*
* 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
*
* ... | 11,674 |
https://github.com/schooofs/omron-rpm/blob/master/assets/js/common.js | Github Open Source | Open Source | MIT | 2,020 | omron-rpm | schooofs | JavaScript | Code | 59 | 213 | function appendDataToConsole() {
for (i = 0; i <= sessionStorage.length - 1; i++) {
var key = sessionStorage.key(i);
var val = JSON.parse(sessionStorage.getItem(key));
$.each(val, function(index, value) {
console.log(value.functionName);
});
}
}
// $(document).ready(... | 52,277 |
https://github.com/bouchaet/ExtensionSample/blob/master/Entities/IManager.cs | Github Open Source | Open Source | MIT | 2,018 | ExtensionSample | bouchaet | C# | Code | 21 | 59 | using System.Collections.Generic;
namespace Entities
{
public interface IManager<T>
{
void Add(T item);
IEnumerable<T> Items { get; }
void Clear();
}
}
| 25,912 |
https://github.com/wakfi/Bulbbot/blob/master/src/commands/Configuration/override/remove.js | Github Open Source | Open Source | MIT | null | Bulbbot | wakfi | JavaScript | Code | 84 | 430 | const RemoveCommandOverride = require("../../../utils/clearance/commands/RemoveCommandOverride");
const RemoveModOverride = require("../../../utils/clearance/user/RemoveModOverride");
const { NonDigits } = require("../../../utils/Regex");
module.exports = async (client, message, args) => {
const part = args[1];
cons... | 16,394 |
https://github.com/motesp/prebid-mobile-ios/blob/master/PrebidMobileTests/RenderingTests/Tests/Prebid/DemandResponseInfoTest.swift | Github Open Source | Open Source | Apache-2.0 | null | prebid-mobile-ios | motesp | Swift | Code | 490 | 1,658 | /* Copyright 2018-2021 Prebid.org, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | 48,810 |
https://github.com/Clivern/Beaver/blob/master/core/api/channel.go | Github Open Source | Open Source | MIT | 2,023 | Beaver | Clivern | Go | Code | 1,012 | 2,964 | // Copyright 2021 Clivern. All rights reserved.
// Use of this source code is governed by the MIT
// license that can be found in the LICENSE file.
package api
import (
"encoding/json"
"fmt"
"github.com/clivern/beaver/core/driver"
"github.com/clivern/beaver/core/util"
"github.com/go-redis/redis"
log "github.c... | 8,376 |
https://github.com/Spronghi/Sei/blob/master/Kiu/app/src/main/java/com/spronghi/kiu/json/PlaceJSONParser.java | Github Open Source | Open Source | MIT | null | Sei | Spronghi | Java | Code | 107 | 401 | package com.spronghi.kiu.json;
import android.util.Log;
import com.spronghi.kiu.model.Place;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Created by MatteoSemolaArena on 16/09/2016.
*/
public class PlaceJSONParser extends JSONParser<Place> {
@Override
public Place parse(String jsonStri... | 8,241 |
https://github.com/wms/Fluture/blob/master/src/encase.js | Github Open Source | Open Source | MIT | 2,022 | Fluture | wms | JavaScript | Code | 67 | 191 | import {noop} from './internal/utils.js';
import {createInterpreter, application1, application, func, any} from './future.js';
export var Encase = createInterpreter(2, 'encase', function Encase$interpret(rec, rej, res){
var fn = this.$1, r;
try{ r = fn(this.$2) }catch(e){ rej(e); return noop }
res(r);
return n... | 17,765 |
https://github.com/prraadeepp/news/blob/master/admin/logout.php | Github Open Source | Open Source | CC-BY-3.0 | null | news | prraadeepp | PHP | Code | 19 | 56 | <?php
include 'header.php';
session_destroy();
session_start();
$_SESSION['error']="you can Log in again by entering your username and password!";
header("location:login.php");
exit;
?> | 30,506 |
https://github.com/aimin987/UnityGameFramework/blob/master/Scripts/Runtime/Variable/VarULong.cs | Github Open Source | Open Source | MIT | 2,020 | UnityGameFramework | aimin987 | C# | Code | 106 | 346 | //------------------------------------------------------------
// Game Framework
// Copyright © 2013-2020 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using GameFramework;
namespace Uni... | 30,505 |
https://github.com/etclabscore/evm_llvm/blob/master/test/CodeGen/X86/movntdq-no-avx.ll | Github Open Source | Open Source | NCSA, LLVM-exception, Apache-2.0 | 2,020 | evm_llvm | etclabscore | LLVM | Code | 57 | 145 | ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
; Test that we produce a movntdq, not a vmovntdq
; CHECK-NOT: vmovntdq
define void @test(<2 x i64>* nocapture %a, <2 x i64> %b) nounwind optsize {
entry:
store <2 x i64> %b, <2 x i64>* %a, align 32, !nontemporal !0
ret void
}
!0 = !{i32 1}
| 43,451 |
https://github.com/JaatSoft/XPMTranslator/blob/master/source/XPM.h | Github Open Source | Open Source | LicenseRef-scancode-public-domain | 2,019 | XPMTranslator | JaatSoft | C | Code | 19 | 81 | // XPM.h
#ifndef XPM_H
#define XPM_H
#include <be/TranslationKit.h>
#include <be/SupportKit.h>
#define XPM_HEADER "/* XPM */"
#define phi 0.61803399
#endif | 293 |
https://github.com/DevonGrant/Monkey-Bloon-Defense/blob/master/Monkey-Bloon-Defense/Assets/Scripts/Monkeys/DartMonkey.cs | Github Open Source | Open Source | MIT | null | Monkey-Bloon-Defense | DevonGrant | C# | Code | 84 | 261 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using enums;
public class DartMonkey : Tower
{
private void Awake()
{
balloon = GameObject.FindGameObjectWithTag("Player");
rateOfFire = 3.0f;
timeSinceLastShot = 100.0f;
//range = 5.0f; //set in in... | 50,923 |
https://github.com/bilsaboob/nemerle/blob/master/testsuite/frommcs/test-412.n | Github Open Source | Open Source | BSD-2-Clause, MIT | 2,019 | nemerle | bilsaboob | null | Spoken | 36 | 107 | // REFERENCE: test-412-lib.dll
using System;
using System.Runtime.InteropServices;
namespace Foo {
public class Baz {
[DllImport("foo.so", CallingConvention=Bar.CConv)]
public static extern doFoo() : void;
public static Main () : void
{ }
}
}
/*
BEGIN-OUTPUT
END-OUTPUT
*/
| 16,662 |
https://github.com/Deepak003/istanbul-code-coverage-example/blob/master/aura/tsm/ProcessArticles/ProcessArticlesController.js | Github Open Source | Open Source | MIT | 2,019 | istanbul-code-coverage-example | Deepak003 | JavaScript | Code | 119 | 611 | ({
doInit : function(component, event, helper) {
helper.constructArticleParameter(component, event, $A.get("$Label.c.KNOWLEDGE_ARTICLE_PROCESS_EDITED"));
helper.constructArticleParameter(component, event, $A.get("$Label.c.KNOWLEDGE_ARTICLE_PROCESS_NEW"));
window.setInterval(
... | 42,485 |
https://github.com/flyingfz/Mastering-PhoneGap-Code-Package/blob/master/logology-v05/src/www/scss/lib/_glyphs.scss | Github Open Source | Open Source | MIT, LicenseRef-scancode-unknown-license-reference, LicenseRef-scancode-wordnet | 2,015 | Mastering-PhoneGap-Code-Package | flyingfz | SCSS | Code | 98 | 441 | y-icon-text, [is="y-icon-text"] {
display: inline-block;
position: relative;
&:before {
vertical-align: middle;
margin: auto;
min-width: 2rem;
min-height: 2rem;
display: inline-block;
padding: 0.5rem;
content: '';
background-color: currentColor;
mask-repeat: no-repeat;
mask... | 47,143 |
https://github.com/ellipsys/ZoomEyeAndroid/blob/master/app/src/main/java/org/droiders/zoomeye/di/ApiModule.java | Github Open Source | Open Source | Apache-2.0 | 2,016 | ZoomEyeAndroid | ellipsys | Java | Code | 123 | 578 | package org.droiders.zoomeye.di;
import com.google.gson.Gson;
import dagger.Module;
import dagger.Provides;
import javax.inject.Named;
import javax.inject.Singleton;
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import org.droiders.zoomeye.data.OauthInterceptor;
import org.zoomeye.api.ErrorBodyHandler;
import o... | 17,826 |
https://github.com/SpriteMaster-Ext/StructLinq/blob/master/src/StructLinq/IVisitor.cs | Github Open Source | Open Source | MIT | 2,022 | StructLinq | SpriteMaster-Ext | C# | Code | 13 | 35 | namespace StructLinq
{
public interface IVisitor<in T>
{
bool Visit(T input);
}
}
| 8,048 |
https://github.com/davidgroves/infoblox-netmri/blob/master/infoblox_netmri/api/remote/models/script_module_remote.py | Github Open Source | Open Source | Apache-2.0 | 2,021 | infoblox-netmri | davidgroves | Python | Code | 144 | 349 | from ..remote import RemoteModel
class ScriptModuleRemote(RemoteModel):
"""
Script module library information.
| ``id:`` The internal NetMRI identifier of the Script Module.
| ``attribute type:`` number
| ``name:`` The unique name of the Script Module.
| ``attribute type:`` string
... | 44,771 |
https://github.com/hermixy/QtMvvm/blob/master/ProjectTemplate/control.cpp | Github Open Source | Open Source | BSD-3-Clause | 2,017 | QtMvvm | hermixy | C++ | Code | 84 | 285 | #include "%{ControlHdrName}"
@if '%{UseSettings}'
#include <settingscontrol.h>
@endif
%{ControlCn}::%{ControlCn}(QObject *parent) :
Control(parent),
_text(QStringLiteral("hello world"))
{}
QString %{ControlCn}::text() const
{
return _text;
}
@if '%{UseSettings}'
void %{ControlCn}::showSettings()
{
auto settings ... | 30,356 |
https://github.com/nmldiegues/jvm-stm/blob/master/tinySTM-1.0.0/src/mod_cb.c | Github Open Source | Open Source | Apache-2.0 | 2,017 | jvm-stm | nmldiegues | C | Code | 548 | 1,724 | /*
* File:
* mod_cb.c
* Author(s):
* Pascal Felber <pascal.felber@unine.ch>
* Description:
* Module for user callback.
*
* Copyright (c) 2007-2009.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free... | 51,797 |
https://github.com/bidlom/Mendel2019-ES/blob/master/CZ-9x9-TAB/optimized/2-8-ES-06STATES-04-STEPS15.tab | Github Open Source | Open Source | BSD-3-Clause | null | Mendel2019-ES | bidlom | SQL | Code | 6,998 | 8,166 | 2 6
0 0 0 0 0 2
0 0 0 0 1 3
0 0 0 0 3 4
0 0 0 1 0 5
0 0 0 1 1 3
0 0 0 2 0 4
0 0 0 2 2 4
0 0 0 5 1 4
0 0 1 0 0 5
0 0 1 0 4 0
0 0 1 0 5 4
0 0 1 3 1 3
0 0 1 3 4 5
0 0 1 4 2 3
0 0 2 0 0 5
0 0 2 0 1 3
0 0 2 3 1 5
0 0 2 4 0 1
0 0 2 5 1 5
0 0 3 0 0 1
0 0 3 0 4 5
0 0 3 1 3 4
0 0 3 3 1 2
0 0 3 4 0 4
0 0 3 4 4 2
0 0 3 5 1 1
0 0 ... | 4,700 |
https://github.com/lechium/tvOS124Headers/blob/master/System/Library/PrivateFrameworks/SiriUI.framework/SiriUIDownloadableImageView.h | Github Open Source | Open Source | MIT | 2,021 | tvOS124Headers | lechium | C | Code | 86 | 340 | /*
* This header is generated by classdump-dyld 1.0
* on Saturday, August 24, 2019 at 9:47:54 PM Mountain Standard Time
* Operating System: Version 12.4 (Build 16M568)
* Image Source: /System/Library/PrivateFrameworks/SiriUI.framework/SiriUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limne... | 36,150 |
https://github.com/springkim/Heliostemp/blob/master/cgi-bin/login/user_info.pl | Github Open Source | Open Source | Apache-2.0 | 2,016 | Heliostemp | springkim | Perl | Code | 590 | 3,167 | #!/usr/bin/perl
#
# @Project : Helios
# @Architecture : Kim Bom
# user_info.pl
#
# @Created by KimBom On 2016. 2. 19...
# @Copyright (C) 2015 KimBom. All rights reserved.
#
use strict;
use warnings;
use CGI;
use DBI;
use File::Copy;
use Digest::SHA3 qw(sha3_512_hex);
use Crypt::Salt;
require 'info.pl';
require 'aes.pl... | 29,022 |
https://github.com/dreamsxin/ultimatepp/blob/master/uppdev/plugin/pixman/lib/pixman-transformed-accessors.c | Github Open Source | Open Source | BSD-2-Clause | 2,020 | ultimatepp | dreamsxin | C | Code | 4 | 26 | #define PIXMAN_FB_ACCESSORS
#include "pixman-transformed.c"
| 390 |
https://github.com/dicristomanuel/rock/blob/master/src/registry/domain/sanitiser.js | Github Open Source | Open Source | MIT | null | rock | dicristomanuel | JavaScript | Code | 99 | 347 | 'use strict';
var _ = require('underscore');
var sanitise = {
booleanParameter: function(variable){
if(_.isString(variable)){
if(variable === 'true'){
return true;
} else if(variable === 'false'){
return false;
}
}
return variable;
},
numberParameter: function(vari... | 12,595 |
https://github.com/dclnet/guardq/blob/master/R/guardq.R | Github Open Source | Open Source | MIT | 2,021 | guardq | dclnet | R | Code | 25 | 78 |
myAdd <- function(a, b, r) {
RES <- .C("myAdd2", A = as.integer(a), B = as.integer(b))
RES$A
}
myTestPrint <- function(msg) {
print(paste("<<<", msg, ">>>"))
}
| 41,065 |
https://github.com/onMouseEnter/FlappyBird/blob/master/Assets/SCRIPTS/ObstaclePool.cs | Github Open Source | Open Source | MIT | null | FlappyBird | onMouseEnter | C# | Code | 277 | 674 | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObstaclePool : MonoBehaviour {
public GameObject[] obstaclePrefabs; // The obstacle game object
public int obstaclePoolSize = 5; // How many columns to keep on standby
public float spawnRate1 = ... | 33,260 |
https://github.com/Samcbehrens/CPDBv2_frontend/blob/master/src/js/components/search-page/preview-pane/widgets/wrapper-link.js | Github Open Source | Open Source | Apache-2.0 | 2,019 | CPDBv2_frontend | Samcbehrens | JavaScript | Code | 77 | 182 | import React, { Component, PropTypes } from 'react';
import { Link } from 'react-router';
import { linkStyle } from './wrapper-link.style';
import OutboundLink from 'components/common/outbound-link';
export default class WrapperLink extends Component {
render() {
const { url, to, children } = this.props;
r... | 37,581 |
https://github.com/Gurrimo/Luminaire/blob/master/Assets/Editor/Generated/Black/Sequence/Action/Menu/SequenceActionActorUIControl.generated.cs | Github Open Source | Open Source | MIT | null | Luminaire | Gurrimo | C# | Code | 708 | 3,928 | //----------------------
// <auto-generated>
// This file was automatically generated. Any changes to it will be lost if and when the file is regenerated.
// </auto-generated>
//----------------------
#pragma warning disable
using System;
using SQEX.Luminous.Core.Object;
using System.Collections.Generic;
using CodeDom... | 32,220 |
https://github.com/rishipuri/mockbin/blob/master/lib/routes/bins.js | Github Open Source | Open Source | MIT | 2,017 | mockbin | rishipuri | JavaScript | Code | 162 | 511 | 'use strict'
var debug = require('debug-log')('mockbin')
var express = require('express')
var mw = require('../middleware')
var redis = require('redis')
var routes = require('./bins/')
var url = require('url')
module.exports = function bins (dsn_str) {
// parse redis dsn
var dsn = url.parse(dsn_str)
// connect... | 30,430 |
https://github.com/Geforce132/SecurityCraft/blob/master/src/main/java/net/geforcemods/securitycraft/api/IReinforcedBlock.java | Github Open Source | Open Source | MIT | 2,023 | SecurityCraft | Geforce132 | Java | Code | 111 | 457 | package net.geforcemods.securitycraft.api;
import java.util.LinkedHashMap;
import java.util.Map;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.sta... | 31,686 |
https://github.com/fccm/ocaml-clanlib/blob/master/src/CL_Vec3f_stub.hpp | Github Open Source | Open Source | Zlib, OLDAP-2.2.1 | 2,020 | ocaml-clanlib | fccm | C++ | Code | 26 | 172 | #ifndef _CL_VEC3F_INC
#define _CL_VEC3F_INC
#include <ClanLib/Core/Math/vec3.h>
#ifdef CL_WRAP_POINTERS
#define Val_CL_Vec3f(v) (Val_ptr<CL_Vec3f>(v))
#define CL_Vec3f_val(v) (Ptr_val<CL_Vec3f>(v))
#else
#define Val_CL_Vec3f(v) ((value)(v))
#define CL_Vec3f_val(v) ((CL_Vec3f *)(v))
#endif
#endif // _CL_VEC3F_INC... | 37,945 |
https://github.com/kalil1/Tavelfever/blob/master/vendor/bundle/ruby/2.4.0/gems/flickraw-0.9.9/lib/flickraw/api.rb | Github Open Source | Open Source | MIT | 2,018 | Tavelfever | kalil1 | Ruby | Code | 861 | 3,460 | module FlickRaw
END_POINT='http://api.flickr.com/services'.freeze
END_POINT2='http://www.flickr.com/services'.freeze
END_POINT_SECURE='https://api.flickr.com/services'.freeze
FLICKR_OAUTH_REQUEST_TOKEN=(END_POINT2 + '/oauth/request_token').freeze
FLICKR_OAUTH_AUTHORIZE=(END_POINT2 + '/oauth/authorize').fre... | 1,479 |
https://github.com/baswerc/routes/blob/master/src/main/java/org/baswell/routes/MatchedRoute.java | Github Open Source | Open Source | Apache-2.0 | 2,023 | routes | baswerc | Java | Code | 138 | 301 | /*
* Copyright 2015 Corey Baswell
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | 20,405 |
https://github.com/pulumi/pulumi-alicloud/blob/master/sdk/java/src/main/java/com/pulumi/alicloud/ddos/DdosCooInstance.java | Github Open Source | Open Source | Apache-2.0, MPL-2.0, BSD-3-Clause | 2,023 | pulumi-alicloud | pulumi | Java | Code | 1,064 | 2,759 | // *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.alicloud.ddos;
import com.pulumi.alicloud.Utilities;
import com.pulumi.alicloud.ddos.DdosCooInstanceArgs;
import com.pulumi.alicloud.ddos.inputs.DdosCooI... | 31,563 |
https://github.com/assaad/javaBlasLapack/blob/master/src/main/java/org/netlib/lapack/Slargv.java | Github Open Source | Open Source | BSD-3-Clause | 2,018 | javaBlasLapack | assaad | Java | Code | 287 | 772 | package org.netlib.lapack;
public final class Slargv
{
public static void slargv(int paramInt1, float[] paramArrayOfFloat1, int paramInt2, int paramInt3, float[] paramArrayOfFloat2, int paramInt4, int paramInt5, float[] paramArrayOfFloat3, int paramInt6, int paramInt7)
{
int i = 0;
int j = 0;
int k = 0... | 23,702 |
https://github.com/ScalablyTyped/Distribution/blob/master/s/stremio-addon-sdk/src/main/scala/typings/stremioAddonSdk/anon/VideoHash.scala | Github Open Source | Open Source | MIT | 2,023 | Distribution | ScalablyTyped | Scala | Code | 99 | 309 | package typings.stremioAddonSdk.anon
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
trait VideoHash extends StObject {
/**
* OpenSubtitles file hash for the video.
*/
var videoHash: String... | 28,969 |
https://github.com/RahulGera/RWRider/blob/master/RWRider.xcframework/ios-x86_64-simulator/RWRider.framework/Headers/RAAddress.h | Github Open Source | Open Source | MIT | 2,020 | RWRider | RahulGera | C | Code | 60 | 206 | //
// RAAddress.h
// Ride
//
// Created by Roberto Abreu on 10/26/17.
// Copyright © 2017 RideAustin.com. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <GoogleMaps/GMSAddress.h>
@interface RAAddress : NSObject
@property (nonatomic, strong) NSString *address;
@property (nonatomic, strong) NSSt... | 19,012 |
https://github.com/ekiwi/maltese/blob/master/src/maltese/SymbolTable.scala | Github Open Source | Open Source | BSD-3-Clause | null | maltese | ekiwi | Scala | Code | 43 | 108 | // Copyright 2020 The Regents of the University of California
// released under BSD 3-Clause License
// author: Kevin Laeufer <laeufer@cs.berkeley.edu>
package maltese
class SymbolTable private(nameToId: Seq[(String, Int)]) {
}
object SymbolTable {
def scan(sys: mc.TransitionSystem): SymbolTable = {
new Symbo... | 419 |
https://github.com/l3p-cv/lost/blob/master/frontend/lost/src/containers/pipeline/running/2/nodes/DatasourceNode.js | Github Open Source | Open Source | MIT | 2,023 | lost | l3p-cv | JavaScript | Code | 63 | 262 | import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faFolderOpen, faHdd } from '@fortawesome/free-solid-svg-icons'
import NodeFooter from './NodeFooter'
const DatasourceNode = (props) => {
return (
<div className="graph-node">
<div className="grap... | 737 |
https://github.com/st3v3nmw/algorithms/blob/master/src/sorting/counting.rs | Github Open Source | Open Source | MIT | 2,021 | algorithms | st3v3nmw | Rust | Code | 100 | 287 | pub fn counting_sort(arr: &[i64], lower_bound: i64, upper_bound: i64) -> Vec<i64> {
let mut count_arr: Vec<i64> = vec![0; (upper_bound - lower_bound) as usize];
for e in arr {
count_arr[(*e - lower_bound) as usize] += 1;
}
let mut sorted: Vec<i64> = vec![];
for i in 0..count_arr.len() {
... | 41,860 |
https://github.com/drewnoakes/metadata-extractor-dotnet/blob/master/MetadataExtractor/IO/IndexedSeekingReader.cs | Github Open Source | Open Source | Apache-2.0 | 2,023 | metadata-extractor-dotnet | drewnoakes | C# | Code | 332 | 886 | // Copyright (c) Drew Noakes and contributors. All Rights Reserved. Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.
namespace MetadataExtractor.IO
{
/// <summary>
/// Provides methods to read data types from a <see cref="Stream"/> by indexing into the da... | 25,484 |
https://github.com/brendan-kellam/mlrd/blob/master/mlrd/__main__.py | Github Open Source | Open Source | MIT | null | mlrd | brendan-kellam | Python | Code | 62 | 180 | import argparse
from .mlrd import run
def start():
parser = argparse.ArgumentParser(
description="A tool to download MyCourses lecture recordings"
)
parser.add_argument("course_id", help="The LRS course id", type=int)
# todo: need to expand '~' in dir (absolute path resolution)
parser.add... | 7,351 |
https://github.com/aohuoyun/nodejs-express-mysql/blob/master/model/user.js | Github Open Source | Open Source | MIT | null | nodejs-express-mysql | aohuoyun | JavaScript | Code | 82 | 297 | /**
* Created by aohuoyun on 19/02/20.
*/
var BaseModelConfig= require('./base');
var User = BaseModelConfig.sequelize.define('user', {
id: {
type: BaseModelConfig.sequelizeinit.BIGINT,
primaryKey: true,
},
mail: {
type: BaseModelConfig.sequelizeinit.STRING(50),
allowNull... | 12,987 |
https://github.com/jakeswenson/envelope-encryption/blob/master/go/appencryption/pkg/persistence/dynamodb_test.go | Github Open Source | Open Source | MIT | 2,022 | envelope-encryption | jakeswenson | Go | Code | 102 | 503 | package persistence_test
import (
"testing"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/stretchr/testify/assert"
"github.com/godaddy/asherah/go/appencryption/pkg/persistence"
)
func TestDynamoDBMetastore_WithDynamoDBRegionSuffix(t *testing.T) {
s := getSession()
m1 := ... | 4,739 |
https://github.com/egormkn/forcsensei/blob/master/forcsensei/utils.py | Github Open Source | Open Source | MIT | 2,021 | forcsensei | egormkn | Python | Code | 1,358 | 5,769 | import pandas as pd
import codecs as cd
import numpy as np
#### NEW ROUTINES JAN2020 ####
def header_keywords(X):
keywords = {}
defaults = {}
keywords['units'] = ('Units of measure ','Units of measure:')
defaults['units'] = 'SI'
keywords['mass'] = ('Mass:','Mass ','Mass =')
de... | 5,651 |
https://github.com/tirtavium/SwiftUI-Combine-CleanMVVM/blob/master/CleanMVVM/Screens/NoteBookViewModel.swift | Github Open Source | Open Source | MIT | 2,022 | SwiftUI-Combine-CleanMVVM | tirtavium | Swift | Code | 228 | 701 | //
// NoteBookViewModel.swift
// CleanMVVM
//
// Created by Tirta A Gunawan on 22/06/20.
// Copyright © 2020 iOS Dev Team. All rights reserved.
//
import Combine
import Foundation
protocol NoteBookViewModelCommand: class {
func fetchNotes()
func saveNote()
func deleteNote(index: Int)
func refreshN... | 23,175 |
https://github.com/luyu-fan/fsoccermot/blob/master/src/lib/trainer/main_trainer.py | Github Open Source | Open Source | MIT | null | fsoccermot | luyu-fan | Python | Code | 118 | 591 | """
MOT训练器 定义MOT训练核心操作
"""
from ..models.utils.decode import mot_decode
from ..models.losses.losses import DetLoss, MotLoss
from .base_trainer import BaseTrainer
from ..utils.post_process import ctdet_post_process
class MotTrainer(BaseTrainer):
def __init__(self, opt, model, optimizer = None):
super(MotT... | 17,680 |
https://github.com/2000xinxin/pythonProject/blob/master/学习代码/func_test.py | Github Open Source | Open Source | MIT | 2,021 | pythonProject | 2000xinxin | Python | Code | 262 | 1,176 | # 迭代器
# 创建一个步长为小数的迭代器
# def float_range(start, stop, step):
# x = start
# while x < stop:
# yield x
# x += step
#
#
# for i in float_range(10, 20, 0.5):
# print(i)
# 定义函数
# def describe_pet(animal_type, pet_name):
# """显示宠物的信息""" # 描述
# print(f"\nI have a {animal_type}.")
# ... | 20,700 |
https://github.com/FNSKtZH/apflora/blob/master/src/modules/setzeAutocompleteFuerEwmsApliste.js | Github Open Source | Open Source | MIT, ISC | 2,017 | apflora | FNSKtZH | JavaScript | Code | 105 | 333 | 'use strict'
var $ = require('jquery')
var _ = require('underscore')
module.exports = function (programm) {
$('#ewmsApWaehlenText').autocomplete({
minLength: 0,
delay: 500,
source: window.apf.apliste[programm],
select: function (event, ui) {
$(this).val(ui.item.label)
$('#ewmsApWaehlen')... | 49,205 |
https://github.com/skiqh/envoy/blob/master/test/env.js | Github Open Source | Open Source | Apache-2.0 | 2,020 | envoy | skiqh | JavaScript | Code | 354 | 1,356 | /* eslint-env mocha */
'use strict'
var assert = require('assert')
var env = require('../lib/env.js')
describe('environment variable tests - Bluemix mode', function (done) {
var originalEnv
before(function (done) {
originalEnv = Object.assign({}, process.env)
process.env.VCAP_SERVICES = '{"cloudantNoSQLD... | 36,654 |
https://github.com/BitBagCommerce/SyliusByrdShippingExportPlugin/blob/master/spec/Entity/ByrdProductMappingSpec.php | Github Open Source | Open Source | MIT | null | SyliusByrdShippingExportPlugin | BitBagCommerce | PHP | Code | 95 | 329 | <?php
/*
* This file was created by developers working at BitBag
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/
declare... | 34,913 |
https://github.com/cfka/Help-Desk-Fapco/blob/master/app/Http/Controllers/assetsController.php | Github Open Source | Open Source | MIT | null | Help-Desk-Fapco | cfka | PHP | Code | 1,899 | 12,352 | <?php
namespace Helpdesk\Http\Controllers;
use Helpdesk\modeloAsset_history;
use Helpdesk\modeloAsset_type;
use Helpdesk\modeloBrand;
use Helpdesk\modeloCeco;
use Helpdesk\modeloCola;
use Helpdesk\modeloCompany;
use Helpdesk\modeloConsumable;
use Helpdesk\modeloConsumables_type;
use Helpdesk\modeloDepartment;
use Hel... | 7,674 |
https://github.com/cdli-gh/mtaac_cdli_ur3_corpus/blob/master/ur3_corpus_data/conll/P453660.conll | Github Open Source | Open Source | CC0-1.0, LicenseRef-scancode-public-domain | 2,022 | mtaac_cdli_ur3_corpus | cdli-gh | null | Spoken | 73 | 388 | #new_text=P453660
# ID FORM SEGM XPOSTAG HEAD DEPREL MISC
o.1.1 1(asz)
o.1.2 gu2
o.1.3 3(u)
o.1.4 9(disz)
o.1.5 ma-na
o.1.6 1(u)
o.1.7 3(disz)
o.1.8 1/3(disz)
o.1.9 gin2
o.1.10 sa
o.2.1 sa
o.2.2 gu4
o.2.3 udu
o.2.4 sa2-du11
o.2.5 szu-a-gi-na
o.2.6 nig2-dab5
o.2.7 u4
o.2.8 sakar
o.2.9 u3
o.2.10 nig2-ezem-ma
o.3.1 {d}nin... | 28,653 |
https://github.com/BIURoboCup/2016/blob/master/RoboCup2016/GoalKeeper2016/Vision/Vision.h | Github Open Source | Open Source | Apache-2.0 | 2,017 | 2016 | BIURoboCup | C | Code | 56 | 250 | #include "GateDetector.h"
#include "BallDetector.h"
#include "SharedMemory.h"
#pragma once
void RunVision();
class Vision
{
public:
// Singletone
static Vision* GetInstance();
DetectedObject* SafeGetDetectedBall();
DetectedObject* SafeGetDetectedGate();
void TerminateVisionThread();
~Vision();
GateDetecto... | 19,131 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.