code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
"""Functions for manipulating FGONG files. These are provided through
the **FGONG** object and a module function to read an **FGONG** object
from a file.
"""
import numpy as np
import warnings
from .adipls import fgong_to_amdl
from .constants import G_DEFAULT
from .utils import integrate, to... | warrickball/tomso | tomso/fgong.py | Python | mit | 22,737 |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | joseph00713/Sponge | src/main/java/org/spongepowered/mod/mixin/core/world/MixinWorld.java | Java | mit | 3,950 |
namespace Tharga.Toolkit.Console.Entities
{
public class Position
{
public int Left { get; }
public int Top { get; }
public int? Width { get; }
public int? Height { get; }
public int? BufferWidth { get; }
public int? BufferHeight { get; }
public Position(... | poxet/tharga-console | Tharga.Toolkit.Console/Entities/Position.cs | C# | mit | 640 |
"""Automatically format references in a LaTeX file."""
import argparse
from multiprocessing import Pool
from reference_utils import Reference, extract_bibtex_items
from latex_utils import read_latex_file, write_latex_file
class ReferenceFormatter:
def __init__(self, add_arxiv):
self.add_arxiv = add_arxi... | teunzwart/latex-production-tools | reference_formatter.py | Python | mit | 1,870 |
<!-- SECTION Judul-->
<!--===============================================================-->
<div class="section-heading-page">
<div class="container">
<div class="row">
<div class="col-sm-6">
<h1 class="heading-page text-center-xs">Dashboard</h1>
</div>
... | reeganaga/tokoonline | application/views/front/history/content_detail.php | PHP | mit | 10,478 |
import sqlite3
import requests
from random import sample
import textwrap
from printer import ThermalPrinter
LINE_WIDTH = 32
potm = "http://creepypasta.wikia.com/api/v1/Articles/List?category=PotM&limit=1000"
spotlighted = "http://creepypasta.wikia.com/api/v1/Articles/List?category=Spotlighted_Pastas&limit=1000"
def g... | AngryLawyer/creepypasta-strainer | src_python/strainer.py | Python | mit | 2,457 |
<?php
class CM_WP_Exception_PluginNotRegisteredException extends
Exception
{
/**
* Plugin slug
*
* @var string
*/
protected $slug;
/**
* [__construct description]
*
* @param string $slug
*/
public function __construct( $slug ) {
$this->slug = $slug;
... | cubicmushroom/wordpress-helper | src/CM/WP/Exception/PluginNotRegisteredException.php | PHP | mit | 504 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("01.... | Steffkn/SoftUni | 01.ProgrammingBasicsC#/Exams/17July2016/01.Money/Properties/AssemblyInfo.cs | C# | mit | 1,387 |
import { NgModule } from '@angular/core';
import {
ToolbarModule
} from 'primeng/primeng';
import { PageToolbarComponent } from './page-toolbar.component';
@NgModule({
exports: [PageToolbarComponent],
declarations: [PageToolbarComponent],
imports: [
ToolbarModule
]
})
export class PageToolbarModule {
}... | dreamer99x/ceb | src/app/shared/components/page-toolbar/index.ts | TypeScript | mit | 321 |
class ParseException < Exception
end | ably-forks/cloudyscripts | lib/audit/lib/parser/parse_exception.rb | Ruby | mit | 36 |
# Copyright 2016 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 applica... | hkhpub/show_and_tell_korean | webdemo/webdemo/inference_wrapper.py | Python | mit | 1,658 |
#include <cstdlib>
#include <stack>
#include <vector>
using namespace std;
#include "binary_tree_inorder_traversal.h"
#include "../util/util_tree.h"
vector<int>
BinaryTreeInorderTraversal::inorderTraversalRecursive(TreeNode *root) {
vector<int> traversal_history;
if (root == NULL)
return traversal_history;
... | metacpp/LeetCpp | src/tree/binary_tree_inorder_traversal.cc | C++ | mit | 1,826 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
ERROR - 2015-11-08 00:53:15 --> 404 Page Not Found --> robots.txt
ERROR - 2015-11-08 02:46:43 --> 404 Page Not Found --> robots.txt
ERROR - 2015-11-08 02:47:31 --> 404 Page Not Found --> robots.txt
ERROR - 2015-11-08 03:10:36 --> 404 Page N... | cmorenokkatoo/kkatooapp | application/logs/log-2015-11-08.php | PHP | mit | 2,507 |
#include <iostream>
#include <stdlib.h>
int main()
{
// int a = 1;
// int *b = &a;
int *b = (int *) malloc(sizeof(int));
*b = 5;
int *c = b;
int *d = c;
free (d);
// *b = 7;
std::cout << *b << std::endl;
}
| lindsayad/programming | cpp/lots_of_pointers.cpp | C++ | mit | 225 |
package no.notanumber.sosql;
import java.util.Objects;
public class Join {
public final DatabaseColumn primary;
public final DatabaseColumn foreign;
public Join(DatabaseColumn primary, DatabaseColumn foreign) {
this.primary = primary;
this.foreign = foreign;
}
@Override
publ... | NotANumber-no/sosql | src/main/java/no/notanumber/sosql/Join.java | Java | mit | 803 |
package com.bitdubai.fermat_dmp_plugin.layer.world.crypto_index.developer.bitdubai;
import com.bitdubai.fermat_api.Plugin;
import com.bitdubai.fermat_api.PluginDeveloper;
import com.bitdubai.fermat_api.layer.all_definition.enums.CryptoCurrency;
import com.bitdubai.fermat_api.layer.all_definition.enums.TimeFrequency;
i... | fvasquezjatar/fermat-unused | DMP/plugin/world/fermat-dmp-plugin-world-crypto-index-bitdubai/src/main/java/com/bitdubai/fermat_dmp_plugin/layer/world/crypto_index/developer/bitdubai/DeveloperBitDubai.java | Java | mit | 1,395 |
'use strict';
/**
* @ngdoc directive
* @name myDashingApp.directive:widgetText
* @description
* # widgetText
*/
angular.module('myDashingApp')
.directive('widgetText', function () {
return {
template: '<div><div class="title">{{data.title}}</div><div class="value">{{data.value}}</div><div ... | GuyMograbi/ng-dashing | app/scripts/directives/widgettext.js | JavaScript | mit | 482 |
<?php
/* SMASMABundle:Public:about2.html.twig */
class __TwigTemplate_95bc6be8200ffe9eef6c99c778e963bf4ee22d5d533dcb62c75dbe15624dff5e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("SMASMABundle:... | matsuyuki/smanegeri11 | app/cache/dev/twig/95/bc/6be8200ffe9eef6c99c778e963bf4ee22d5d533dcb62c75dbe15624dff5e.php | PHP | mit | 2,653 |
window.dev1(1);
| delambo/gettit | test/assets/dev1/js/test2.js | JavaScript | mit | 16 |
/*
* The MIT License
*
* Copyright 2014 Kamnev Georgiy (nt.gocha@gmail.com).
*
* Данная лицензия разрешает, безвозмездно, лицам, получившим копию данного программного
* обеспечения и сопутствующей документации (в дальнейшем именуемыми "Программное Обеспечение"),
* использовать Программное Обеспечение без огра... | gochaorg/lang2 | src/main/java/xyz/cofe/lang2/parser/SyntaxTreeDump.java | Java | mit | 5,610 |
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.office;
import com.wilutions.com.*;
/**
* MsoTextTabAlign.
*
*/
@SuppressWarnings("all")
@CoInterface(guid="{00000000-0000-0000-0000-000000000000}")
public class MsoTextTabAlign implements ComEnum {
static boolean __typelib__loade... | wolfgangimig/joa | java/joa/src-gen/com/wilutions/mslib/office/MsoTextTabAlign.java | Java | mit | 2,449 |
#include "optionsdialog.h"
#include "ui_optionsdialog.h"
#include "bitcoinunits.h"
#include "monitoreddatamapper.h"
#include "netbase.h"
#include "optionsmodel.h"
#include <QDir>
#include <QIntValidator>
#include <QLocale>
#include <QMessageBox>
OptionsDialog::OptionsDialog(QWidget *parent) :
QDialog(parent),
... | max-winderbaum/maxcoin | src/qt/optionsdialog.cpp | C++ | mit | 8,952 |
describe ApiGuardian::Helpers::Digits do
let(:subject) do
ApiGuardian::Helpers::Digits.new(
auth_url,
auth_header
)
end
let(:auth_url) { 'https://api.digits.com/v1/something.json' }
let(:auth_header) { 'OAuth oauth_consumer_key="foo"' }
it { should have_attr_reader(:auth_url) }
it { sh... | lookitsatravis/api_guardian | spec/lib/helpers/digits_spec.rb | Ruby | mit | 2,828 |
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Ínteres por tipo de alimento</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box... | adrianturnes/menorcagastronomic | resources/views/backend/partials/donutChart.blade.php | PHP | mit | 1,877 |
var searchData=
[
['parseprocinfo',['ParseProcInfo',['../tinyoslib_8h.html#ab98738d69f4b198fbcad1a6f2e20a44d',1,'tinyoslib.c']]],
['pipe',['Pipe',['../group__syscalls.html#gab6355ce54e047c31538ed5ed9108b5b3',1,'Pipe(pipe_t *pipe): kernel_pipe.c'],['../group__syscalls.html#gab6355ce54e047c31538ed5ed9108b5b3',1,... | TedPap/opsys | doc/html/search/functions_b.js | JavaScript | mit | 367 |
var util = require('util')
, StoreError = require('jsr-error')
, CommandArgLength = StoreError.CommandArgLength
, InvalidFloat = StoreError.InvalidFloat
, Constants = require('jsr-constants')
, AbstractCommand = require('jsr-exec').DatabaseCommand;
/**
* Handler for the ZADD command.
*/
function SortedSet... | freeformsystems/jsr-server | lib/command/database/zset/zadd.js | JavaScript | mit | 907 |
var expect = require('expect.js'),
_ = require('lodash'),
RevisionGuard = require('../../lib/revisionGuard'),
revGuardStore = require('../../lib/revisionGuardStore');
describe('revisionGuard', function () {
var store;
before(function (done) {
revGuardStore.create(function (err, s) {
store = s... | togusafish/adrai-_-node-cqrs-saga | test/unit/revisionGuardTest.js | JavaScript | mit | 10,450 |
/**
* Copyright 2016 Facebook, Inc.
*
* You are hereby granted a non-exclusive, worldwide, royalty-free license to
* use, copy, modify, and distribute this software in source code or binary
* form for use in connection with the web services and APIs provided by
* Facebook.
*
* As with any software that integrat... | josedab/react-native-examples | meetup-information/js/rating/RatingCard.js | JavaScript | mit | 2,905 |
#ifndef __ciri_graphics_CullMode__
#define __ciri_graphics_CullMode__
namespace ciri {
/**
* Triangle winding order cull mode.
*/
enum class CullMode {
None, /**< Do not cull triangles regardless of vertex ordering. */
Clockwise, /**< Cull triangles with clockwise vertex ordering. */
CounterCloc... | KasumiL5x/ciri | ciri/inc/ciri/graphics/CullMode.hpp | C++ | mit | 402 |
#region Copyright (c) 2007 Ryan Williams <drcforbin@gmail.com>
/// <copyright>
/// Copyright (c) 2007 Ryan Williams <drcforbin@gmail.com>
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Sof... | remobjects/Obfuscar | Obfuscar/Project.cs | C# | mit | 8,875 |
#include <iostream>
#include <unordered_map>
#include <string>
using namespace std;
vector <string> computeKMostFrequentQueries(vector <string> queries) {
}
| tzhenghao/InterviewQuestionExercises | ElementsOfProgrammingInterviews/Chapter13/ComputeKMostFrequentQueries.cpp | C++ | mit | 162 |
namespace Reusable.Diagnostics
{
public static class DebuggerDisplayString
{
public const string DefaultNoQuotes = "{DebuggerDisplay,nq}";
}
} | he-dev/Reusable | Reusable.Core/src/Diagnostics/DebuggerDisplayString.cs | C# | mit | 162 |
/*
* RPCType.cpp
*
* Created on: 30 Apr 2014
* Author: meltuhamy
*/
#include <string>
#include "ppapi/cpp/var.h"
#include "RPCType.h"
#include <vector>
namespace pprpc{
//TODO - right now all the integer type marshaling is just wrapping the int32_t type!
// byte
pp::Var ByteType::AsVar(const ValidType<in... | meltuhamy/native-calls | cpp/RPCType.cpp | C++ | mit | 5,999 |
package org.knowm.xchange.gemini.v1.service;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.stream.Collectors;
import lombok.Getter;
import lombok.Setter;
import org.knowm.xchange.Exchange;
import org.knowm.xchange.c... | stachon/XChange | xchange-gemini/src/main/java/org/knowm/xchange/gemini/v1/service/GeminiTradeService.java | Java | mit | 9,136 |
#include <map>
#include <set>
#include <vector>
#include <memory>
#include <gumbo.h>
#include <goosepp/contentExtraction/BoostChecker.h>
#include <goosepp/contentExtraction/NodeTextCleaner.h>
#include <goosepp/contentExtraction/TextNodeCollector.h>
#include <goosepp/util/gumboUtils.h>
#include <goosepp/stopwords/stop... | scivey/goosepp | src/contentExtraction/BoostChecker.cpp | C++ | mit | 2,214 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-19.js | JavaScript | mit | 707 |
$(document).ready(function(){
$('#environment,#language').change(function(){
var environment = $('#environment').val();
var language = $('#language').val();
if(environment==0)
return true;
$('#file').parent('div').addClass('hidden');
$('#load').addClass('hidden');
... | cobonto/public | admin/js/translate.js | JavaScript | mit | 1,275 |
using System;
namespace Nancy.Swagger.ObjectModel.Attributes
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Enum, AllowMultiple = false, Inherited = true)]
public class SwaggerDataAttribute : Attribute { }
} | pinnstrat/snap-nancy-swagger | src/Nancy.Swagger/ObjectModel/Attributes/SwaggerDataAttribute.cs | C# | mit | 261 |
/**
* @author Joe Adams
*/
goog.provide('CrunchJS.Systems.PathfindingSystem');
goog.require('CrunchJS.System');
goog.require('CrunchJS.Components.Path');
goog.require('goog.structs');
goog.require('goog.array');
goog.require('goog.math');
/**
* Creates a new Pathfinding System
* @constructor
* @class
*/
Crun... | jadmz/CrunchJS | app/js/engine/systems/PathfindingSystem.js | JavaScript | mit | 5,422 |
using System;
using System.Windows.Forms;
namespace DocumentExplorerExample
{
/// <summary>
/// Provides full information about application exception.
/// </summary>
public class ExceptionDialog : Form
{
#region Windows Form Designer generated code
private System.ComponentModel.Container components = null... | assadvirgo/Aspose_Words_NET | Examples/CSharp/Viewers-Visualizers/Document-Explorer/ExceptionDialog.cs | C# | mit | 3,308 |
#define PROTOTYPE
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using ProBuilder2.Common;
using ProBuilder2.MeshOperations;
namespace ProBuilder2.Examples
{
[RequireComponent(typeof(AudioSource))]
public class IcoBumpin : MonoBehaviour
{
pb_Object ico; // A r... | hakur/shooter | Assets/ProCore/ProBuilder/API Examples/Icosphere FFT/Scripts/IcoBumpin.cs | C# | mit | 8,702 |
require 'rails_helper'
RSpec.describe OnlineApplicationPolicy, type: :policy do
subject(:policy) { described_class.new(user, online_application) }
let(:online_application) { build_stubbed(:online_application) }
context 'for staff' do
let(:user) { build_stubbed(:staff) }
it { is_expected.to permit_acti... | ministryofjustice/fr-staffapp | spec/policies/online_application_policy_spec.rb | Ruby | mit | 1,255 |
require "active_record"
require "active_record/mass_assignment_security/associations"
require "active_record/mass_assignment_security/attribute_assignment"
require "active_record/mass_assignment_security/core"
require "active_record/mass_assignment_security/nested_attributes"
require "active_record/mass_assignment_sec... | rails/protected_attributes | lib/active_record/mass_assignment_security.rb | Ruby | mit | 1,126 |
/**
* Created by james on 3/11/15.
*/
var crypto = Npm.require('crypto');
IntercomHash = function(user, secret) {
var secret = new Buffer(secret, 'utf8')
return crypto.createHmac('sha256', secret)
.update(user._id).digest('hex');
}
| jamesoy/Microscope | packages/intercom/intercom_server.js | JavaScript | mit | 251 |
using System;
using System.Drawing.Imaging;
using System.IO;
using System.Text;
namespace TeknikProgramlama.Tools.Image {
public static class Utils {
public static string Image2Base64(this System.Drawing.Image image, ImageFormat format) {
var imgBytes = image.ToBytes(format);
var b... | teknikprogramlama/Teknikprogramlama.Tools | TeknikProgramlama.Tools/Image/Utils.cs | C# | mit | 1,121 |
using UnityEngine;
using System.Collections;
public class sample : MonoBehaviour {
// Use this for initialization
void Start () {
Vector3 startPos = new Vector3(0,0,0);
Vector3 endPos = new Vector3(10,-10,0);
Vector3 center = Vector3.Lerp(startPos, endPos, 0.5f);
Vector3 cut = (endPos - startPos)... | HackathonHC/team-z | Assets/sample.cs | C# | mit | 985 |
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-2016 Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
import 'babel-core/polyfill';
import path from 'path';
imp... | cheshire137/cheevo-plotter | src/server.js | JavaScript | mit | 3,191 |
package com.github.robocup_atan.atan.parser.objects;
/*
* #%L
* Atan
* %%
* Copyright (C) 2003 - 2014 Atan
* %%
* 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, i... | robocup-atan/atan | src/main/java/com/github/robocup_atan/atan/parser/objects/ObjNameFlagGoalWest.java | Java | mit | 4,455 |
#pragma once
#include <app/common.hpp>
#include <app/LedDisplay.hpp>
#include <audio.hpp>
namespace rack {
namespace app {
struct AudioWidget : LedDisplay {
LedDisplayChoice* driverChoice;
LedDisplaySeparator* driverSeparator;
LedDisplayChoice* deviceChoice;
LedDisplaySeparator* deviceSeparator;
LedDisplayChoi... | AndrewBelt/Rack | include/app/AudioWidget.hpp | C++ | mit | 505 |
// @flow
/* eslint-disable no-console */
import chalk from "chalk";
import createWatcher from "./watch";
import loadWatches from "./load-watches";
import hasWatchman from "./utils/has-watchman";
import type { WatchDefinition } from "./load-watches";
import getConfig from "./config";
type Targets = {
[target: string]... | laat/nurture | src/index.js | JavaScript | mit | 1,846 |
$(document).ready(function(){
initUploadExcerptPhoto();
initUploadMedia();
$('#edcomment_save').removeAttr('disabled');
$(document).on('click', '.js-single-click', function(){
$(this).attr('disabled', 'disabled');
});
$(document).on('submit', '.js-single-submit', function(){
va... | NegMozzie/tapha | src/BlogBundle/Resources/public/js/fe-general.js | JavaScript | mit | 10,917 |
<?php
namespace Arthem\GoogleApi\Infrastructure\Client;
use Arthem\GoogleApi\Infrastructure\Client\Decoder\DecoderInterface;
use Arthem\GoogleApi\Infrastructure\Client\Exception\ClientErrorException;
use GuzzleHttp\ClientInterface;
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
abstract class Client ... | 4rthem/google-api | src/Infrastructure/Client/Client.php | PHP | mit | 2,757 |
require 'brahma/web/fall'
class CmsController < ApplicationController
def index
@title = t('web.title.cms')
@fall_card = Brahma::Web::FallCard.new nil
lang = I18n.locale
Cms::Article.select(:id, :title, :summary, :logo).where(lang: lang).order(created: :desc).limit(20).each { |a| @fall_card.add cms_... | chonglou/portal | app/controllers/cms_controller.rb | Ruby | mit | 468 |
var statusItems = initStatusItems();
module.exports = {
// check for an item completion
checkItems: function(content, callback) {
// iterate each status item to check for matches
for (var i = 0; i < statusItems.length; i++) {
var item = statusItems[i];
// skip item if it... | ScopeXL/sugarbuild | lib/phantom-install-helper.js | JavaScript | mit | 2,815 |
import numpy as np
def random_flips(X):
"""
Take random x-y flips of images.
Input:
- X: (N, C, H, W) array of image data.
Output:
- An array of the same shape as X, containing a copy of the data in X,
but with half the examples flipped along the horizontal direction.
"""
N, C, H... | UltronAI/Deep-Learning | CS231n/reference/cnn_assignments-master/assignment3/cs231n/data_augmentation.py | Python | mit | 4,178 |
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.1.1 (2019-10-28)
*/
(function (domGlobals) {
'use st... | cdnjs/cdnjs | ajax/libs/tinymce/5.1.1/plugins/textcolor/plugin.js | JavaScript | mit | 650 |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using ZSUIFramework;
public class CreatRoomGUI : ZSUI
{
public Button mBtnClose = null;
public override void Init()
{
ZSUIListener.AddClickEvent( mBtnClose.gameObject, Close );
}
}
| zhanshu233/ZSUIFramework | Assets/Example/Scripts/UI/CreatRoomGUI.cs | C# | mit | 293 |
export {NavbarItemComponent} from './navbar-item/navbar-item.component';
export {NavbarComponent} from './navbar.component';
| Hertox82/Lortom | angular-backend/src/app/backend-module/navbar/index.ts | TypeScript | mit | 125 |
# frozen_string_literal: true
module DropletKit
class AccountMapping
include Kartograph::DSL
kartograph do
root_key singular: 'account', scopes: [:read]
mapping Account
scoped :read do
property :droplet_limit
property :floating_ip_limit
property :email
prop... | digitalocean/droplet_kit | lib/droplet_kit/mappings/account_mapping.rb | Ruby | mit | 392 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-09-07 00:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('payments', '0004_auto_20160904_0048'),
]
operations = [
migrations.AlterFiel... | CCrypto/ccvpn3 | payments/migrations/0005_auto_20160907_0018.py | Python | mit | 612 |
#!/usr/bin/python
import requests
import json
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
user_title = form.getvalue('search_title')
print "Content-type: text/html\n\n";
# Setting attributes to send to Wik... | azimos/geddit | old/geddit-backend.py | Python | mit | 3,469 |
/*
Copyright (c) 2013 Chris Wraith
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, publish, distribute, su... | jacksonps4/jutils | src/main/java/com/minorityhobbies/util/URLUtils.java | Java | mit | 2,996 |
#region Usings
using System;
using Xunit;
#endregion
namespace Extend.Testing
{
public partial class StringExTest
{
[Fact]
public void SubstringLeftSafeTest()
{
var actual = "testabc".SubstringLeftSafe( 4 );
Assert.Equal( "test", actual );
actual ... | DaveSenn/Extend | .Src/Extend.Testing/System.String/String.SubstringLeftSafe.Test.cs | C# | mit | 1,814 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Pr... | BiserSirakov/TelerikAcademyHomeworks | C# - Part 1/Intro-Programming-Homework/04.PrintFirstAndLastName/Properties/AssemblyInfo.cs | C# | mit | 1,418 |
// # Demo Particles 011
// Tracer entity: generation and functionality
// [Run code](../../demo/particles-011.html)
import * as scrawl from '../source/scrawl.js'
import { reportSpeed } from './utilities.js';
// Get Scrawl-canvas to recognise and act on device pixel ratios greater than 1
scrawl.setIgnorePixelRatio(f... | KaliedaRik/Scrawl-canvas | demo/particles-011.js | JavaScript | mit | 5,771 |
'use strict';
/**
* Module dependencies.
*/
const express = require('express');
const session = require('express-session');
const compression = require('compression');
const morgan = require('morgan');
const cookieParser = require('cookie-parser');
const cookieSession = require('cookie-session');
const bodyParser =... | kyue1005/accedotv-demo | config/express.js | JavaScript | mit | 2,588 |
namespace Nancy.Serialization.ServiceStack
{
using System.Collections.Generic;
using System.IO;
using global::ServiceStack.Text;
using Responses.Negotiation;
public class ServiceStackJsonSerializer : ISerializer
{
/// <summary>
/// Whether the serializer can serialize... | NancyFx/Nancy.Serialization.ServiceStack | src/Nancy.Serialization.ServiceStack/ServiceStackJsonSerializer.cs | C# | mit | 1,570 |
/*
* Copyright (c) 2017-2019 by Botorabi. All rights reserved.
* https://github.com/botorabi/Meet4Eat
*
* License: MIT License (MIT), read the LICENSE text in
* main directory for more details.
*/
package net.m4e.update.rest.comm;
import org.junit.jupiter.api.*;
import javax.json.bind.*;
import java.ti... | botorabi/Meet4Eat | src/test/java/net/m4e/update/rest/comm/UpdateCheckResultTest.java | Java | mit | 1,790 |
#!/usr/bin/env python
import os
import sys
from setuptools import setup
os.system('make rst')
try:
readme = open('README.rst').read()
except FileNotFoundError:
readme = ""
setup(
name='leicaautomator',
version='0.0.2',
description='Automate scans on Leica SPX microscopes',
long_description=r... | arve0/leicaautomator | setup.py | Python | mit | 1,212 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Class Jwt
* jwt加密类
*/
class Jwt
{
/**
* @var int
*/
public static $leeway = 0;
/**
* @var null
*/
public static $timestamp = null;
/**
* @var array
*/
public static $supported_algs = a... | wuanlife/wuanlife_api | application/libraries/Jwt.php | PHP | mit | 9,916 |
<aside id="featured" class="body">
<article>
<figure>
<img src="img/logo/<?= $prj->slug ?>.png" alt="<?= sprintf(_('Project’s logo for %s'), $prj->name) ?>" />
</figure>
<hgroup>
<h2><?= $prj->name ?></h2>
<h3><?= $prj->short ?></h3>
</hgroup>
<p><... | malenkiki/reine | templates/WebProjectsShow.php | PHP | mit | 3,223 |
class Solution {
public:
vector<int> addNegabinary(vector<int>& arr1, vector<int>& arr2) {
vector<int> result;
int i = arr1.size() - 1, j = arr2.size() - 1, carry = 0;
while (i >= 0 || j >= 0 || carry) {
int s = carry;
if (i >= 0) {
s += arr1[i--];
... | jiadaizhao/LeetCode | 1001-1100/1073-Adding Two Negabinary Numbers/1073-Adding Two Negabinary Numbers.cpp | C++ | mit | 660 |
"""Forms of the aps_bom app."""
from csv import DictReader
from django import forms
from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as __
from .models import BOM, BOMItem, CBOM, CBOMItem, EPN, IPN, Unit
class BaseUploadForm(forms.ModelForm):
csv_file = forms.FileField(... | bitmazk/django-aps-bom | aps_bom/forms.py | Python | mit | 6,549 |
class RenameBillingPeriodReferences < ActiveRecord::Migration
def up
rename_column :billing_schedules, :billing_period_id, :billing_period_range_id
rename_column :bills, :billing_period_id, :billing_period_range_id
end
def down
rename_column :billing_schedules, :billing_period_range_id, :billing_peri... | jbrowning/billy | db/migrate/20130305040107_rename_billing_period_references.rb | Ruby | mit | 407 |
require "test_helper"
class CrossCrusadeOverallTest < ActiveSupport::TestCase
def test_recalc_with_no_series
competition_count = Competition.count
CrossCrusadeOverall.calculate!
CrossCrusadeOverall.calculate!(2007)
assert_equal(competition_count, Competition.count, "Should add no new Competition if... | alpendergrass/montanacycling-racing_on_rails | test/unit/competitions/cross_crusade_overall_test.rb | Ruby | mit | 17,950 |
package api
import (
"time"
"github.com/boilingrip/boiling-api/db"
)
type Release struct {
ID int `json:"id"`
ReleaseGroup ReleaseGroup `json:"release_group"`
Edition *string `json:"edition,omitempty"`
Medium string `json:"medium"`
ReleaseDate time.Time... | boilingrip/boiling-api | api/release.go | GO | mit | 1,389 |
<?php
namespace SlowDB\Bundle\ApiBundle\Controller;
use FOS\RestBundle\Controller\Annotations as Rest,
FOS\RestBundle\Controller\FOSRestController,
FOS\RestBundle\Request\ParamFetcher;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\JsonResponse;
/**
* @auth... | kmfk/slowdb-api | src/Controller/DatabaseController.php | PHP | mit | 1,837 |
<?php
// require composer autoloader for loading classes
require realpath(__DIR__ . '/../vendor/autoload.php');
| slimdash/payum-payeezy | tests/bootstrap.php | PHP | mit | 112 |
var
LinkedInStrategy = require('passport-linkedin-oauth2').Strategy,
linkOAuthProfile = require('./helpers').linkOAuthProfile,
OAuth2 = require('oauth').OAuth2,
crypto = require('crypto');
function preprocessProfile(linkedInProfile){
var skills = [];
if(linkedInProfile.skills){
skills = linkedInProfile... | muhammadghazali/kabam-kernel | core/strategies/linkedin.js | JavaScript | mit | 2,946 |
const deepCopy = require('./deep-copy');
const sorting = require('./sort');
/* Sorts an array of objects by two keys
** dir = 'asc' yields sort order A, B, C or 1, 2, 3
** dir = 'des' yields sort order C, B, A or 3, 2, 1
** type = 'character' for character sorting, type = 'numeric' or 'bool'
** for boolean sorting for... | knightjdr/gene-info | database/helpers/arr-sort-by-two-keys.js | JavaScript | mit | 1,260 |
require "test_helper"
module RuleIo
class CustomizationTest < Minitest::Test
def setup
stub_request(:get, /#{RuleIo.base_url}\/customizations\?apikey=*/)
.to_return(status: 200, body: fixture("customizations.json"))
end
def test_all_returns_customizations
customizations = Customizati... | varvet/rule_io | test/rule_io/customization_test.rb | Ruby | mit | 955 |
package es.carm.mydom.filters.utils;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.apache.naming.resources.Resource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Dispatcher... | maltimor/mydom-server | src/main/java/es/carm/mydom/filters/utils/Dispatcher.java | Java | mit | 2,187 |
# coding: utf-8
from django.db import models
from django.utils import timezone
from .cores import OssManager
_oss_manager = OssManager()
class StsToken(models.Model):
arn = models.CharField(max_length=500)
assumed_role_id = models.CharField(max_length=500)
access_key_id = models.CharField(max_length=50... | zhaowenxiang/chisch | oss/models.py | Python | mit | 677 |
/*
* (C) Copyright 2015 Richard Greenlees
*
* 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,... | RGreenlees/JUMI-Java-Model-Importer | src/com/jumi/scene/objects/JUMIBone.java | Java | mit | 5,488 |
import assert from 'assert';
import proxyquire from 'proxyquire';
import sinon from 'sinon';
import sinonStubPromise from 'sinon-stub-promise';
import mockMbaasClient from './mocks/fhMbaasClientMock';
sinonStubPromise(sinon);
const appEnvVarsStub = sinon.stub();
const primaryNodeStub = sinon.stub().returnsPromise();
c... | feedhenry/fh-dataman | src/middleware/dbConnection/test/mbaas_test.js | JavaScript | mit | 3,372 |
import React, { Component, PropTypes } from 'react'
import { Router } from 'react-router'
import { Provider } from 'react-redux'
import routes from 'routes'
class AppContainer extends Component {
static propTypes = {
store : PropTypes.object.isRe... | bartushk/memmi | client-side/src/containers/AppContainer.js | JavaScript | mit | 639 |
<?php
/*
Safe sample
input : get the field userData from the variable $_GET via an object
sanitize : use of ternary condition
construction : concatenation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and dist... | stivalet/PHP-Vulnerability-test-suite | Injection/CWE_90/safe/CWE_90__object-classicGet__ternary_white_list__userByCN-concatenation_simple_quote.php | PHP | mit | 1,569 |
var sizes;
var searchKey = '';
if(window.location.search!=''){
$("#searchKey").val(decodeURIComponent(window.location.search.substr(11)))
}
if (window.location.search != "") {
searchKey = window.location.search.substr(11)
}
$.ajax({
url: '/sizes?searchKey=' + searchKey,
async: false,
method: 'get',
... | dounine/japi | node/js/index.js | JavaScript | mit | 10,577 |
import React from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import { Polygon } from 'react-google-maps';
import {map, filter} from './../../../actions';
class Region extends React.Component {
constructor(props) {
super(props);
this.state = {
... | Haaarp/geo | client/analytics/components/partials/maps/Region.js | JavaScript | mit | 2,127 |
namespace Squirrel.Nodes
{
public interface INode
{
}
}
| escamilla/squirrel | src/library/Nodes/INode.cs | C# | mit | 71 |
<?php
namespace zikmont\ContabilidadBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="ctb_movimientos_resumen")
* @ORM\Entity(repositoryClass="zikmont\ContabilidadBundle\Repository\CtbMovimientosResumenRepository")
*/
class CtbMovimientosResumen
{
/**
* @ORM\Id
* @ORM\Colum... | wariox3/zikmont | src/zikmont/ContabilidadBundle/Entity/CtbMovimientosResumen.php | PHP | mit | 5,658 |
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Abp.Application.Services;
using Abp.Application.Services.Dto;
using Abp.Authorization;
using Abp.Domain.Entities;
using Abp.Domain.Repositories;
using Abp.Extensions;
using Abp.IdentityFramewo... | aspnetboilerplate/aspnetboilerplate-samples | IdentityServerWithEfCoreDemo/aspnet-core/src/IdentityServerWithEfCoreDemo.Application/Users/UserAppService.cs | C# | mit | 8,506 |
/*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2015 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global', 'sap/ui/core/Renderer'],
function(jQuery, Renderer) {
"use strict";
/**
* ObjectNumber ren... | marinho/german-articles | webapp/resources/sap/m/ObjectNumberRenderer-dbg.js | JavaScript | mit | 3,233 |
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2017 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Component\Server\Tests\Stub\Event;
use OAuth2Framework\Comp... | OAuth2-Framework/server-library | Tests/Stub/Event/AccessTokenRevokedEventHandler.php | PHP | mit | 606 |
"""Controller for rendering pod content."""
import datetime
import mimetypes
import os
import sys
import time
from grow.common import utils
from grow.documents import static_document
from grow.pods import errors
from grow.rendering import rendered_document
from grow.templates import doc_dependency
from grow.templates ... | grow/grow | grow/rendering/render_controller.py | Python | mit | 21,264 |
class AddPublishToSiteVersion < ActiveRecord::Migration[5.0]
def change
remove_column :author_site_storages, :publish
add_column :author_site_versions, :published, :boolean
end
end
| teamco/anthill_layout | db/migrate/20160425125336_add_publish_to_site_version.rb | Ruby | mit | 193 |
# Copyright (C) 2012 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
from nose.tools import *
from libpepper import builtins
from libpepper.environment import PepEnvironment
from libpepper.vals.all_values import *
def PlusEquals_increases_int_value___te... | andybalaam/pepper | old/pepper1/src/test/evaluation/test_plusequals.py | Python | mit | 1,124 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
namespace Microsoft.Azure.Management.Search.Fluent
{
using Microsoft.Azure.Management.ResourceManager.Fluent.Core;
using Microsoft.Azure.Management.Search.... | hovsepm/azure-libraries-for-net | src/ResourceManagement/Search/Domain/ICheckNameAvailabilityResult.cs | C# | mit | 1,305 |
# -*- encoding : utf-8 -*-
require 'tmail/version'
require 'tmail/mail'
require 'tmail/mailbox'
require 'tmail/core_extensions'
require 'tmail/net'
| liquidware/saasy | vendor/rails/actionmailer/lib/action_mailer/vendor/tmail-1.2.3/tmail.rb | Ruby | mit | 148 |
using Newtonsoft.Json.Linq;
using SolrExpress.Search;
using SolrExpress.Search.Parameter;
using SolrExpress.Search.Parameter.Validation;
using SolrExpress.Utility;
namespace SolrExpress.Solr5.Search.Parameter
{
[AllowMultipleInstances]
public sealed class FilterParameter<TDocument> : BaseFilterParameter<TDocu... | solr-express/solr-express | src/SolrExpress.Solr5/Search/Parameter/FilterParameter.cs | C# | mit | 817 |