id stringlengths 64 64 | content stringlengths 500 100k | language stringclasses 29
values | path stringlengths 4 333 | repo stringlengths 5 116 | license stringclasses 15
values | size int64 500 100k | lines int64 26 8.06k | source stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|
1fdc2147cc258b5964ba2ada00e0e4081567dddce39cb96a6c923cf8c8e053bc | package main
import (
"database/sql"
"encoding/json"
"flag"
"fmt"
"html/template"
"io/ioutil"
"net/http"
"os"
"regexp"
"strings"
"time"
_ "github.com/mattn/go-sqlite3"
)
var settings struct {
DailyTarget int
Database string
Address string
}
func init() {
flag.IntVar(&settings.DailyTarget, "ta... | GO | 900words.go | heyLu/900words | mit | 11,778 | 554 | codeparrot/github-code |
cefdf7cd6040bd242f58633b2a1ac019bbc1f8298431c436136939b8ea1376e9 | // App.js
import React from 'react';
import { browserHistory } from 'react-router';
// import components
import NavBar from './navbar/components/NavBar';
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {}
this.getComponentsXHR = this.getComponentsXHR.bin... | JavaScript | admin/lib/App.js | synthesis-js/react-synthesis | mit | 2,467 | 101 | codeparrot/github-code |
f1d6ca6ab154e9b3969d1c572a8b555fad35b832ba7c0d0e257a0fbc207130aa | package core
import (
"database/sql"
"strconv"
)
//Migration represents migrations we will run up and down.
type Migration struct {
Identifier int64
Name string
Up func(tx *Tx)
Down func(tx *Tx)
}
//GetID Returns a string representation of the migration identifier.
func (m *Migration) GetID... | GO | core/migration.go | wawandco/transporter | mit | 1,081 | 41 | codeparrot/github-code |
97d55d0952042d5adf05efe269522a2c899496de0c42e8d81e04ac48311b4caf | // Copyright 2017 The nem-toolchain project authors. All rights reserved.
// Use of this source code is governed by a MIT license that can be found in the LICENSE file.
package main
import (
"bufio"
"encoding/hex"
"fmt"
"io/ioutil"
"math"
"os"
"runtime"
"strings"
"time"
"github.com/nem-toolchain/nem-toolch... | GO | cmd/nem/account.go | nem-toolchain/nem-toolchain | mit | 8,257 | 346 | codeparrot/github-code |
13a4a141c5ed387ce90c226a31cc1f65189d2ae2f18ddacd57b4820161cc5939 | using System;
using System.Collections.Generic;
using System.IO;
using Cake.Core.IO;
namespace Cake.Testing.Fakes
{
/// <summary>
/// Implementation of a fake <see cref="IFileSystem"/>.
/// </summary>
public sealed class FakeFileSystem : IFileSystem
{
private readonly Dictionary<DirectoryP... | C# | src/Cake.Testing/Fakes/FakeFileSystem.cs | manekovskiy/cake | mit | 6,704 | 197 | codeparrot/github-code |
952ee08d5c07986e7b7ed54c8f8e7e709c0085b59a1d04ad7f7676bcc0f56dbc | using System;
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
#if UITEST
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.Android;
#endif
namespace Xamarin.Forms.Controls.Issues
{
[Preserve (AllMembers=true)]
[Issue (IssueTracker.Github, 2809, "Secondary ToolbarItems cause app... | C# | Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue2809.cs | Hitcents/Xamarin.Forms | mit | 1,086 | 52 | codeparrot/github-code |
955ac9285d01ad7f71e5480bf0fbd5980142af96fe3bf359441381da5566ec2d | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSC301 Presentation</title>
<meta name="description" content="HTML Presentation">
<meta name="author" content="Rakshit Shukla">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-st... | HTML | index.html | cadz7/CSC301-Presentation | mit | 6,182 | 171 | codeparrot/github-code |
d20d43b521dc899cdfe221c5a1ee7b9fd3d1b44b70645426b076a6f81ccf145d | <div>
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Survey</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<div ng-controller="surveyController">
<ul id="specialMenu" class="hidden-xs nav nav-pills nav-wizard nav-justified navbar-fixed-top">
... | HTML | app/views/fullsurvey.html | Dyala/Test | mit | 15,204 | 431 | codeparrot/github-code |
52719afce591b7f21c53067b4661b1762d41400425d3c5e311620f4cb2bc3a22 | /*
*
* Christopher Lirette clirett
*
* RecursiveFlowers.java
*
* This program draws several flowers by mapping a curve 360 degrees at
* a center pivot point.
*
* The basic algorithm here is based on the Rose.java file from
* the Java: Introduction to Computer Sc... | Java | submission-2/RecursiveFlowers.java | climagiste/recursing-figures-java | mit | 3,903 | 107 | codeparrot/github-code |
9bb6a301f7ad57d95a5f1c14e14da7fdecee99bde1c29e7cdc78b440b57b0c32 | module TextWrap
export
wrap,
print_wrapped,
println_wrapped
function _expand_tabs(text::String, i0::Int)
out_buf = IOBuffer()
i = i0 % 8
for c in text
if c == '\t'
while i < 8
print(out_buf, ' ')
i += 1
end
i = 0
... | Julia | src/TextWrap.jl | sjkelly/TextWrap.jl | mit | 8,142 | 287 | codeparrot/github-code |
99fdfb7b8c1db61a59c4b2bdda12ff9beef6538f5b68c9744cc3cead323843e1 | 'use strict'
const t = require('tap')
const test = t.test
const FindMyWay = require('../')
test('case insensitive static routes of level 1', t => {
t.plan(1)
const findMyWay = FindMyWay({
caseSensitive: false,
defaultRoute: (req, res) => {
t.fail('Should not be defaultRoute')
}
})
findMyWa... | JavaScript | test/case-insensitive.test.js | delvedor/find-my-way | mit | 5,906 | 232 | codeparrot/github-code |
168e20fbeb7d710c6a7f5f31d29a20033c2baa3238210f4dd1b43cf9f9bdca7f | var entityMap = {
"&": "&",
"<": "<",
">": ">",
'"': '"',
"'": ''',
"/": '/'
};
function escapeHTML(string) {
return String(string).replace(/[&<>"'\/]/g, function (s) {
return entityMap[s];
});
}
function escapeCodeBlocks() {
var sections = document.querySelect... | JavaScript | example/index.js | kylealwyn/flexxed | mit | 2,396 | 86 | codeparrot/github-code |
2ff5f09b8bd0a584067e68097032a9dcb75fa9de3ba1556b89afd81506317104 | #!/usr/bin/env python
"""
RPG: Operation
These are any operations we want to carry out from our YAML files. Operations
are strings that are tied to Python code, to carry out things that arent
possible to easily make YAML tags for directly.
"""
from rpg_log import Log
import rpg_combat
def HandleOp... | Python | rpg_operation.py | ghowland/rpg | mit | 2,007 | 67 | codeparrot/github-code |
60551058287ad42410ed4f567ca528af744b4caeb875067deaa6083edf10a728 | import {
GET_POSTS,
GET_POST,
GET_POST_SLUG,
GET_TAGS,
GET_TAG,
GET_TAG_SLUG,
GET_USERS,
GET_USER,
GET_USER_SLUG,
RESET,
} from './action-types';
const initialData = { data: null, error: null, loading: false, meta: null };
const initialState = {
posts: initialData,
post: initialData,
tags: i... | JavaScript | src/reducer.js | oliverbenns/redux-ghost | mit | 1,962 | 87 | codeparrot/github-code |
29a8ade91ebb107e54baf774ffd817fb3426f3b1ef60d219bfa64b679585b7b3 | // This is *not* original work by Kirill Shlenskiy.
// It is taken in its entirety or derived from
// CoreFX (https://github.com/dotnet/corefx).
// Original license below:
// The MIT License (MIT)
// Copyright (c) .NET Foundation and Contributors
// Permission is hereby granted, free of charge, to any person obtai... | C# | src/Kirkin.Experimental/Threading/Tasks/Continuations.cs | KirillShlenskiy/Kirkin | mit | 4,188 | 95 | codeparrot/github-code |
def296838e5811a43e278b2a936598c66220d33c0236aad449c1f0f3caa1bf15 | # -*- coding: utf-8 -*-
# @date 161103 - Export excel with get_work_order_report function
"""
Data exportor (Excel, CSV...)
"""
import io
import math
from datetime import datetime
from xlsxwriter.workbook import Workbook
import tablib
from utils.tools import get_product_size
def get_customers(customer_list=None... | Python | website/utils/data_exportor.py | grtfou/data-analytics-web | mit | 7,737 | 236 | codeparrot/github-code |
b556fdf3f18de34cb757bb7731528eb842bb98f0d41f5d36174a75055f2a8c35 | // Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
/* fix vertical when not overflow
call fullscreenFix() if .fullscreen content changes */
function fullscreenFix(){
var h = $('body').height();
// set .fullscreen he... | JavaScript | app/assets/javascripts/welcome.js | mynock/playlister | mit | 1,794 | 54 | codeparrot/github-code |
b787003aca77543f85ec8e46ce787a9c22a3c0ca1ad061f10771b8b53c049e8c | //=============================================================================
// Copyright (c) 2016 Advanced Micro Devices, Inc. All rights reserved.
/// \author AMD Developer Tools Team
/// \file
/// \brief DLL Injection class implementation
//========================================================================... | C++ | Common/Src/AMDTInterceptor/mhook-dllInjector/dllInjector.cpp | ilangal-amd/CodeXL | mit | 12,743 | 239 | codeparrot/github-code |
658535d13a99bda3f22a69b5c436bfe821e697cb8ab3b6e3641c420b528d3ccc | /**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2014 Photon Storm Ltd.
* @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}
*/
/**
* The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.
* @... | JavaScript | src/input/InputHandler.js | BoldBigflank/attbee | mit | 45,014 | 1,393 | codeparrot/github-code |
ae965b37d7f4212fc5c30b0377c08d8e15581bd36440587d69bb51bddf36ad0a | require 'omniauth-oauth2'
module OmniAuth
module Strategies
class GitHub < OmniAuth::Strategies::OAuth2
option :client_options, {
:site => 'https://api.github.com',
:authorize_url => 'https://github.com/login/oauth/authorize',
:token_url => 'https://github.com/login/oauth/access_tok... | Ruby | lib/omniauth/strategies/github.rb | intridea/omniauth-github | mit | 2,191 | 85 | codeparrot/github-code |
58f7ca42b8c1f8920556aea1d743ee70dbc573590ecc5c1b85bdc897b8e672e3 | export interface ReactionsById_me_reactions_reactionKind {
__typename: "ReactionKind";
/**
* Id
*/
id: number;
/**
* Name of reaction example is like or dislike
*/
name: string;
}
export interface ReactionsById_me_reactions_study {
__typename: "Study";
briefTitle: string;
}
export interface ... | TypeScript | front/src/services/study/model/ReactionsById.ts | clinwiki-org/clinwiki | mit | 1,081 | 63 | codeparrot/github-code |
a4fbdee5892e42bb49ee3354733f600453d7c1a06cac28bbdc3a2951585ce40c | package mil.nga.geopackage.user.custom;
import android.database.Cursor;
import java.util.List;
import mil.nga.geopackage.user.UserCursor;
import mil.nga.geopackage.user.UserDao;
import mil.nga.geopackage.user.UserInvalidCursor;
/**
* User Custom Cursor to wrap a database Cursor for tile queries
*
* @author osbor... | Java | geopackage-sdk/src/main/java/mil/nga/geopackage/user/custom/UserCustomCursor.java | ngageoint/geopackage-android | mit | 2,317 | 78 | codeparrot/github-code |
8acc38e0f169940a2b365418535827d5a6b851983932b1252e56e8e6ccf864cf | var WorldClocks = {};
(function(w) {
function empty() {};
function msg(key, args) {
if (typeof(chrome) != "undefined" && typeof(chrome.i18n) != "undefined") {
return chrome.i18n.getMessage(key, args);
}
return key;
}
function setPref(key, value) {
try {
... | JavaScript | src/worldclocks.safariextension/worldclocks.js | makotokw/world-clocks | mit | 958 | 36 | codeparrot/github-code |
a6ec5b2e3c1e84fc98a8fff4538d8ba0d7f25a977f7a64505b23ab9856285998 | #region MIT License
// PropertyAccessor.cs
// Version: 0.01
// Last Modified: 2012/09/16 15:59
// Created: 2012/09/10 12:33
//
// Author: Jing-Jun Wei
// Mail: jingjunwei@outlook.com
// Homepage: http://jingjunwei.github.com/unity3d-trajectory-prototypes/
//
// MIT License
// Copyright (c) 2012 Jing-Jun... | C# | unity3d-trajectory-prototypes-0.0.1/Assets/Scripts/Message/PropertyAccessor.cs | jingjunwei/unity3d-trajectory-prototypes | mit | 1,845 | 43 | codeparrot/github-code |
4649f08243679bc8564a2b8d9b554ac967b21503b5d794ef9381da51ee6c803a | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>high-school-geometry: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boot... | HTML | clean/Linux-x86_64-4.04.2-2.0.5/released/8.6/high-school-geometry/1.0.0.html | coq-bench/coq-bench.github.io | mit | 7,000 | 174 | codeparrot/github-code |
47bd2c4fea4fd2b5e0f98ec064086f2252b014207e87538eebb65ad722a42d1c | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>automata: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" ... | HTML | clean/Linux-x86_64-4.05.0-2.0.6/released/8.7.2/automata/8.8.0.html | coq-bench/coq-bench.github.io | mit | 7,142 | 168 | codeparrot/github-code |
4cb3c8a78385e4dd89defbe11890b0650bb9270123f9d76b287c499120d9b25c | import React from 'react';
class MyPropertiesExample extends React.Component {
render() {
return (
<div>
<h1>Properties</h1>
My favourite dish is {this.props.dish}.
</div>
);
}
}
MyPropertiesExample.defaultProps = {
dish: 'shrimp with pasta'
};
MyPropertiesExample.propTypes ... | JavaScript | src/02-Properties.js | sericaia/react-msf-demos | mit | 539 | 31 | codeparrot/github-code |
5e327e3da07fc8de48fe73a2532b7cdfc93e598c35e07fac3465f8ff2acd843e | #if CORECLR
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
using System.Management.Automation;
using System.Net.Http;
using System.Text;
namespace... | C# | src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/CoreCLR/InvokeRestMethodCommand.CoreClr.cs | kmosher/PowerShell | mit | 4,300 | 115 | codeparrot/github-code |
b4106855c1720240461dc17c15816615b796c397f206516f30ad8194173dabfa | //Form JS File
function frmHome_stopWatch_onClick_seq0() {
alert("You clicked on stop watch");
};
function frmHome_button214149106640_onClick_seq0(eventobject) {
var a = frmHome.stopWatch.stopWatch();
alert(a);
};
function frmHome_button214149106641_onClick_seq0(eventobject) {
frmHome.stopWatch.startW... | JavaScript | StopWatchApp/jssrc/iphone/generated/frmHome.js | kony/Custom-stopwatch-widget | mit | 4,030 | 129 | codeparrot/github-code |
2aacc1d7f1c297f26de9242c12ea9d5cc04d833925f61926bb2efd81b8fae51d | /*
* Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... | C++ | Source/core/platform/mediastream/RTCPeerConnectionHandler.cpp | lordmos/blink | mit | 8,225 | 220 | codeparrot/github-code |
e96fedb1513b7351a357c14004bda624b06da5595b55c0e9af7774a190ba6ac5 | using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Caching;
using Cvv.WebUtility.Mini;
namespace Cvv.WebUtility.Mvc
{
public sealed class WebAppContext
{
private WebAppContext() { }
[ThreadStatic]
private static Controller _currentController;
p... | C# | WebUtility/Mvc/WebAppContext.cs | sskycn/minimvc | mit | 1,922 | 77 | codeparrot/github-code |
c1cd922e03ae9232107f85cdf6ee4bdc42c4269adf57c1c2c5e986f4f26ad2fd | """Non-application-specific convenience methods for GPkit"""
import numpy as np
def te_exp_minus1(posy, nterm):
"""Taylor expansion of e^{posy} - 1
Arguments
---------
posy : gpkit.Posynomial
Variable or expression to exponentiate
nterm : int
Number of non-constant terms in result... | Python | gpkit/tools/tools.py | hoburg/gpkit | mit | 3,097 | 113 | codeparrot/github-code |
20b33639e78ed1d0e1d84b1865a9dcd87801313fbd523a4af68ad3f272e61788 | <?php
declare(strict_types = 1);
namespace App\Handlers\Frontend\Auth;
use App\Mail\Auth\Confirmation;
use App\Repository\User\UserRepository;
use App\Services\Auth\Activator;
use App\Services\Auth\Exceptions\AlreadyActivatedException;
use App\Services\Auth\Exceptions\UserDoesNotExistException;
use Illuminate\Contrac... | PHP | app/Handlers/Frontend/Auth/RepeatActivationHandler.php | D3lph1/L-shop | mit | 1,326 | 53 | codeparrot/github-code |
0737428ddc64e6d8014049190571c1a0a6b5f5363de75d0334f960bec8f64e6d | 'use strict';
const Utils = require('./utils');
const _ = require('lodash');
const DataTypes = require('./data-types');
const SQLiteQueryInterface = require('./dialects/sqlite/query-interface');
const MSSSQLQueryInterface = require('./dialects/mssql/query-interface');
const MySQLQueryInterface = require('./dialects/my... | JavaScript | lib/query-interface.js | darwinserrano/sequelize | mit | 31,070 | 929 | codeparrot/github-code |
e56d060e8d6af60c400aaf3fe76f3c1a0b39d2e9f745ab106a0dd2e7c6e79bd6 |
<!DOCTYPE html>
<html xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<head>
<meta content="en-us" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-16" http-equiv="Content-Type" />
<title _locid="PortabilityAnalysis0">.NET Portability Report</title>
<style>
... | HTML | Reports/pu/pushernet.0.3.1/Pusher-netcore45.html | kuhlenh/port-to-core | mit | 9,627 | 240 | codeparrot/github-code |
3de61c122afb7c671eb6e5e71d75500193f514f88220c499c1f67447b06b3d44 | <div class="container">
<div class="row">
<div class="col-6">
<h1>
<a href="/{{ page.locale }}">
<img src="../img/consul_logo.svg" alt="{{ site.data.i18n[page.locale].header.consul }}">
</a>
</h1>
<p class="lead">{{ site.data.i18n[page.locale].header.description }}</p... | HTML | _includes/header.html | consul/website | mit | 2,372 | 65 | codeparrot/github-code |
c232688b6adab02f692e69bd6fa707462bb2edc02ba34fab1b74641a911849ac | //
// XMDatePicker.h
// XMDatePicker
//
// Created by guoran on 2017/3/6.
// Copyright © 2017年 hanna. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XMDateEnum.h"
typedef enum{
PickerViewTypeLongSperator = 1,//Default
PickerViewTypeDynamicSperator,
PickerViewTypeStaticSperator
} PickerViewTyp... | C | XMDatePicker/XMDatePicker.h | DreamOfXM/XMDatePicker | mit | 2,710 | 89 | codeparrot/github-code |
cc7ec9f6eb0dcc1e82e41037b1df4ac328d5c00e0381aa89325df02b831b3575 | <html>
<head>
<meta charset="utf-8">
<script src="../v/current/promise.js"></script>
<script src="../libs/esprima.js"></script>
<script src="../v/current/promisify.js"></script>
<script>
function test(a, b) {
var c = {alpha: a};
c.b... | HTML | samples/transpiler.html | cjwainwright/promise-js | mit | 852 | 30 | codeparrot/github-code |
4ea66cad96dcd05c7d06f64fe4bc116431ea92544d39816bf97716946dbfbb76 | #include "figure.h"
#define FIGURE_LENGTH 4
/*
0 1 2 3 0 1 1
4 5 6 7 5 6 4 5
8 9 A B 8
C D E F
*/
/* ------------------------------------------------------------------------ */
static unsigned int get_figure(int fig, int angle)
{
static const unsigned short c_figures[] = {... | C | figure.c | Holixus/tty-tetris-v2 | mit | 2,063 | 79 | codeparrot/github-code |
55e89f8f972d92c6d46c03a204459682748eac8d2446c9a5b232a4d0a7fe2aa4 | package com.bitlimit.NPCs;
import de.kumpelblase2.remoteentities.RemoteEntities;
import de.kumpelblase2.remoteentities.api.DespawnReason;
import de.kumpelblase2.remoteentities.api.RemoteEntity;
import de.kumpelblase2.remoteentities.api.thinking.InteractBehavior;
import de.kumpelblase2.remoteentities.api.thinking.goals... | Java | src/main/java/com/bitlimit/NPCs/BlacksmithInteractBehavior.java | BitLimit/NPCs | mit | 10,711 | 252 | codeparrot/github-code |
8b9f0e05acb770ff2ffb54da182d939381a7cff7598ca987cf0f86203cfd297c | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>lambek: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css"... | HTML | clean/Linux-x86_64-4.05.0-2.0.1/released/8.12.2/lambek/8.6.0.html | coq-bench/coq-bench.github.io | mit | 7,316 | 170 | codeparrot/github-code |
7521ce2960b15fd231a1cada5c57bdf4a119a6c6cd16b9345c50d07772088960 | /*global $, google, InfoBox */
var simulation_manager = (function(){
google.maps.visualRefresh = true;
var ua_is_mobile = navigator.userAgent.indexOf('iPhone') !== -1 || navigator.userAgent.indexOf('Android') !== -1;
var config = (function(){
var params = {};
return {
... | JavaScript | static/js/map.js | eubr-bigsea/transit-map | mit | 69,037 | 1,793 | codeparrot/github-code |
01a57d1feef92ca53b11c662f7ca826e58597e67df73150ac8c343ac88bea715 | //----------------------------------------------------------------------------
//
// License: See top level LICENSE.txt file.
//
// Author: David Burken
//
// Description: Test application to for projection classes.
//
//----------------------------------------------------------------------------
// $Id: ossim-projec... | C++ | test/src/projection/ossim-projection-test.cpp | ossimlabs/ossim | mit | 2,863 | 95 | codeparrot/github-code |
36c2c49c1d7292a237330483f126ca3256813afa8507766803203ace27a43d53 |
module SynapseClient
class RefreshedTokens
attr_accessor :old_access_token
attr_accessor :old_refresh_token
attr_accessor :new_access_token
attr_accessor :new_refresh_token
attr_accessor :new_expires_in
def initialize(options = {})
options = Map.new(options)
@old_access_token ... | Ruby | lib/synapse_client/refreshed_tokens.rb | milesmatthias/synapse_client | mit | 951 | 40 | codeparrot/github-code |
f89e17292d25733ee48af138ff513d7382b2464adac7d045411a5682ecde227d | <?php
namespace Syloc\Bundle\GooglePlacesBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PlaceType
*/
class PlaceType
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $type;
/**
* Get id
*
* @return integer
*/
public functio... | PHP | src/Syloc/Bundle/GooglePlacesBundle/Entity/PlaceType.php | drupality/syloc | mit | 769 | 62 | codeparrot/github-code |
03398b716f1f7681c620b9a6cfe03406b026814bd14e97cd569a011399fd7eec | 'use strict';
/*
* Regex
*/
var regex = {
facebookPattern: /(?:https?:\/\/)?(?:[\w\-]+\.)?facebook\.com\/(?:(?:\w)*#!\/)?(?:pages\/)?(?:[\w\-]*\/)*([\w\-\.]*)/, // jshint ignore:line
facebookPluginPattern: /.*%2F(\w+?)&/
};
module.exports = {
/**
* Returns the page id for a given URL
* e.g. : https:/... | JavaScript | index.js | Woorank/extract-facebook-pageid | mit | 979 | 42 | codeparrot/github-code |
fa5387adb4ba2c5eac2f87c48fc007849ace47698cd24052e93b00e51cf060e9 | package com.mck.ecalculon.evaluator;
import android.util.Log;
import java.util.ArrayList;
/**
* Created by mike on 5/11/2015.
*/
public abstract class Symbol implements Comparable<Symbol>{
protected final String token;
protected final SymbolType type;
protected final ArrayList<Symbol> resul... | Java | app/src/main/java/com/mck/ecalculon/evaluator/Symbol.java | iammck/ECalculon | mit | 1,755 | 56 | codeparrot/github-code |
0e8ad156550c0d88de339d99a0525070e78e6a11cd946737dce48f83b13e14ba | import atexit
from flask import Flask, jsonify, g, request, make_response
from flask_migrate import Migrate
from flask_sqlalchemy import SQLAlchemy
from flask_cors import CORS
from flask_jwt_extended import JWTManager, set_access_cookies, jwt_required, unset_jwt_cookies
from apscheduler.schedulers.background import Bac... | Python | main.py | patklaey/ZermattReservationAPI | mit | 1,957 | 66 | codeparrot/github-code |
246c1fd9fc90aeb9de70083848460cac4e39313eee39fab8b37e8fab95ce7b9a | var url = require('url');
var semver = require('semver');
var nijs = require('nijs');
var inherit = require('nijs/lib/ast/util/inherit.js').inherit;
var base64js = require('base64-js');
/**
* Creates a new source instance. This function should never be used directly,
* instead use: Source.constructSource to construc... | JavaScript | lib/sources/Source.js | svanderburg/npm2nix | mit | 7,017 | 132 | codeparrot/github-code |
bad80c12c7659d3fc33e076f4c8896b62e505315c8bd782b2c553d43ee6a5d03 | package si.gos.transpiler.core.transpiler;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.core.runtime.IConfigurationElement;
public class Option {
public static final String TYPE_BOOLEAN = "boolean";
public static final String TYPE_PARAM = "param";
public static final String TYPE_ENUM = ... | Java | si.gos.transpiler.core/src/si/gos/transpiler/core/transpiler/Option.java | gossi/eclipse-transpiler-plugin | mit | 1,691 | 84 | codeparrot/github-code |
fa9b5ce7c613b4318544cd8ade6784ad89d3e50b58cbfd068b8da8e4b618969a | package org.embulk.filter;
import org.embulk.config.Config;
import org.embulk.config.ConfigDefault;
import org.embulk.config.ConfigDiff;
import org.embulk.config.ConfigSource;
import org.embulk.config.Task;
import org.embulk.config.TaskSource;
import java.util.List;
import java.util.ArrayList;
import java.util.HashMa... | Java | src/main/java/org/embulk/filter/RowFilterPlugin.java | gradleupdate/embulk-filter-row | mit | 9,517 | 230 | codeparrot/github-code |
173fdc9ceed0d156010d9aee1ca7d7b2ef0ee3ea27ed312c03186d73f8841540 | <?php
namespace AppBundle\Controller;
use AppBundle\Entity\CfgTipoInfractor;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;use Symfony\Component\HttpFoundation\Request;
/**
* Cfgtipoin... | PHP | src/AppBundle/Controller/CfgTipoInfractorController.php | edosgn/colossus-sit | mit | 6,479 | 218 | codeparrot/github-code |
ab65e35296c8ea500d0e8770b426f5fbfd56ac02b76751fa3afbde1eb0d7f1dd | import Objects from './'
import Character from './Character'
import Actions from '../actions'
import Attacks from '../actions/Attacks'
import Dash from '../actions/Dash'
const addMoveAnimations = function () {
Object.keys(this.directions).map(
(direction) => this.atlasAnimations.add({
action: Actions.move,... | JavaScript | src/objects/Npc.js | RafaelDelboni/phaser-dungeon | mit | 1,172 | 61 | codeparrot/github-code |
b0782ef92ad472c5d69a3fc2e7e4b0fa537f41546cb61cc4ef0b9b60f80b0413 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | Python | CAAPR/CAAPR_AstroMagic/PTS/pts/modeling/fitting/modelgenerators/generator.py | Stargrazer82301/CAAPR | mit | 7,221 | 251 | codeparrot/github-code |
063d94e8269570b4e21a0c212bea97018b9ef436ba1a8357dd421031523cc03b | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package Entidades;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence... | Java | src/java/Entidades/InformeBi.java | csalgadolizana/MisOfertasWebService | mit | 3,393 | 109 | codeparrot/github-code |
b19c87237f4869144637de868030fcfbc3745e9a5569a82caf051db041b5a514 | {% extends 'base.html' %}
{% load static %}
{% block title %}
{% block title_google %}
{% block title_twitter %}
{% block title_opengraph %}
Retailers
{% endblock %}
{% endblock %}
{% endblock %}
{% endblock %}
{% block namespace %} retailers {% endblock %}
{% block content %}
<h2 class="moveout">Retailers</h2>
... | HTML | verellen/retailers/templates/retailers/home.html | Socialsquare/verellen.biz | mit | 4,882 | 143 | codeparrot/github-code |
b384f82fce789cae9d98fb8cac48ff572588c576bc4000d4c01841fb075b00d4 | <p>There would be cases that you may not want to use a <a href="Store.html">Store</a> or the database <a href="Api.html">Api</a>.<br />
There would be cases that you wished to be able to use directly the mongodb driver with all the features you may get.
</p>
<p>Each <a href="Store.html">Store</a> created, may expose it... | HTML | docs/tutorials/using-mongodb-driver.html | akonoupakis/mongodb-proxy | mit | 1,315 | 32 | codeparrot/github-code |
246431f8e9dd143b0169699b7d768320730f17694ee651a2e780f617acee8d51 | import {
Component,
EventEmitter,
Input,
Output,
ViewEncapsulation,
} from "@angular/core";
export interface IMdlTableColumn {
key: string;
name: string;
numeric?: boolean;
}
export interface IMdlTableModelItem {
selected: boolean;
}
export interface IMdlTableModel {
columns: IMdlTableColumn[];
... | TypeScript | projects/core/src/lib/table/mdl-table.component.ts | mseemann/angular2-mdl | mit | 3,371 | 135 | codeparrot/github-code |
b294ae61689b7bec83b7b0d8fd4351b55234fc403cd09c2dce53241fe270d2cb | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of SQLQueryGenerator
*
* @author Dan Kottke
*/
class SQLGen {
public static function Query($databaseType, $defaultDB = null, QuerySource $source = null)
{
... | PHP | library/querygenerator/SQLGen.class.php | USStateDept/thecurrent | mit | 1,312 | 54 | codeparrot/github-code |
fa5ceadb3e4ccfbf3ba63a3e1ae37815111f9720d267fb7018d447f79d290c73 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" con... | HTML | ePF_API_doxy-0.1.x-dev/html/dir_7e4f5ff0c6511ff780e8238da5e421a7.html | veriKami/ePF_API_doc | mit | 6,788 | 134 | codeparrot/github-code |
deb9dbadaa37aa21aa381368d1692c881134fa4fdf1c4a21cf888c4f1cccb6d4 |
/*
Author: Steve Wood <swood@cromulence.com>
Copyright (c) 2016 Cromulence LLC
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 us... | C | original-challenges/Filesystem_Command_Shell/src/filesystem.h | f0rki/cb-multios | mit | 4,689 | 180 | codeparrot/github-code |
9305b3891450e000d7f41165c4c5b787a05a39d6e797cbbe14a9bcccea5c9cab | <!DOCTYPE HTML>
<!--
Strata by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>About me - Basem Khirat</title>
<meta charset="utf-8" />
<meta name="description" content="Just a start!" />
<meta name="viewport" content="wi... | HTML | _site/me/2016/09/17/hello-world.html | basemkhirat/basemkhirat.github.io | mit | 5,759 | 174 | codeparrot/github-code |
de3792df033076772ac83565e6a26445d80f973193157490f3b8c4dd4691edab | var goods = [
{ GoodId: 1, Name: '玫瑰', Price: 100, Total: 100, SellCount: 0 },
{ GoodId: 2, Name: '康乃馨', Price: 200, Total: 50, SellCount: 0 },
{ GoodId: 3, Name: '满天星', Price: 100, Total: 50, SellCount: 0 },
{ GoodId: 4, Name: '百合', Price: 500, Total: 200, SellCount: 0 }
];
function randomGood() {
... | JavaScript | practice/C2C_Trade/main.js | sanrabbit/d3js-slides | mit | 11,815 | 326 | codeparrot/github-code |
755efb21c4b21204b6260a2c7daad776e688780b65ccc0feea8f43601a16c095 | Imports Transporter_AEHF.BurchfieldPositionerControl
Imports Transporter_AEHF.Objects.Enumerations
Imports Transporter_AEHF.Objects.Positioners
Imports NLog
Public Class PositionerConnectionForm
Private _addressType As PumaEnums.ConnectionType
Private _positionerModel As PumaEnums.PositionerModel
Private ... | Visual Basic | puma/src/Supporting Forms/Positioners/PositionerConnectionForm.vb | wboxx1/85-EIS-PUMA | mit | 5,688 | 133 | codeparrot/github-code |
7f8cde2985987bd169b800bb956270bb9267d727807d6073da73d9a51278cbbf | using System.Net;
using System.Threading;
using System.Threading.Tasks;
using tusdotnet.Adapters;
using tusdotnet.Extensions;
using tusdotnet.Interfaces;
using tusdotnet.Models;
using tusdotnet.Validation;
namespace tusdotnet.IntentHandlers
{
internal abstract class IntentHandler
{
internal static Int... | C# | Source/tusdotnet/IntentHandlers/IntentHandler.cs | smatsson/tusdotnet | mit | 1,873 | 70 | codeparrot/github-code |
3e4b20582e8fcc80cfb09d1673c4a6980022c6272c87edc86b523389ab763f32 | var PROPS = injectProps;
var hookOnReload = injectOnReload;
const io = require('socket.io-client');
const socket = io(`http://127.0.0.1:${PROPS.port}`);
const { id: ext_id } = chrome.runtime;
const onReload = (query = {}, cb) => {
query = Object.assign({
url: [`chrome-extension://${ext_id}/*`]
}, quer... | JavaScript | src/client.js | padurets/web-extension-webpack-plugin | mit | 793 | 31 | codeparrot/github-code |
52e543c6efd49a473453e9823719b2b7d6b17edbed5f8dee2bdd863732991509 | import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { UserService, LoginCallback, LoggedInCallback } from '../services/user.service';
@Component({
selector: 'login',
styleUrls: ['./login.component.css'],
templateUrl: './login.component.html'
})
export class LoginCo... | TypeScript | src/app/login/login.component.ts | UserUndefined/business-listings-app | mit | 1,995 | 66 | codeparrot/github-code |
0c5be47b6a069963877928d84f7dd4c47463894d06ae422c322524de6451c91d | #!/bin/bash
set -e
shopt -s expand_aliases
# Load environment vars.
source "$DEV_LIB_PATH"/bin/env.sh
# Load core functions.
source "$DEV_LIB_PATH"/bin/functions.sh
# Load travis commands.
source "$DEV_LIB_PATH"/travis/commands.sh
# Load customisation.
if [ -e .wordpoints-dev-lib-config.sh ]; then
source .word... | Shell | travis/before_script.sh | WordPoints/dev-lib | mit | 707 | 39 | codeparrot/github-code |
139e3b7216901c68e956637eb2da2e8af30de1c0eb2b0d41c832ca73fb6405e1 | package models
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"
"github.com/astaxie/beego"
"github.com/yaozijian/MiningOpt/distribution"
"github.com/yaozijian/relayr"
log "github.com/cihub/seelog"
)
func Init(webcfg *WebConfig) error {
switch webcfg.StartType {
case WebT... | GO | web/models/init.go | yaozijian/MiningOpt | mit | 2,338 | 121 | codeparrot/github-code |
922d0cfecba3a4daaa3fde3fce47e5ed3b69ce21788bc43b464ab0ef414385c9 | define(['views/Index','views/Cart','views/CategoryEdit','views/Categories','views/Product','views/Products','views/ProductEdit','views/ProductDetail','views/admin/Index','models/Product','models/Category','models/CartCollection','models/ProductCollection','models/CategoryCollection'], function(IndexView,CartView,Catego... | JavaScript | e-biz/public/js/router.js | williambai/beyond-webapp | mit | 3,019 | 97 | codeparrot/github-code |
a6d51b6a9d31b30085aa53a794409281f08b081ff7653f26b2ce8278249f7995 | module Accela
class ErrorHandler
attr_reader :response
def self.handle(response)
begin
new(response).handle
rescue
new(response).handle_unexpected_error
end
end
def initialize(response)
@response = response
end
def handle
if response.code >= 400... | Ruby | lib/accela/api/error_handler.rb | Accela-Inc/accela-rest-ruby | mit | 1,889 | 72 | codeparrot/github-code |
77f37cf47b3b57a3abb31eba5a53cbc2648210181025b06e36fe7775c56aa64c | <?php
namespace Coyote\FrontBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class RegistrationType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('username', null, array... | PHP | src/Coyote/Bundle/FrontBundle/Form/RegistrationType.php | Coyotealone/Coyote | mit | 3,307 | 66 | codeparrot/github-code |
e43eca2d4c7bfee860dc982218000585fff8fae31ff417705eb6ba4d693a7dc7 | package Arrays;
/**
* Given an array arr[] of integers, find out the difference between any two elements such that
* larger element appears after the smaller number in arr[].
*/
public class MaxDifference {
public static void main(String[] args) throws Exception {
int arr[] = {10, 2, 90, 10, 110, 1, 100... | Java | src/main/java/Arrays/MaxDifference.java | hakanmhmd/algorithms-and-data-structures | mit | 920 | 33 | codeparrot/github-code |
0afe5947c1c697440d87dfd23ace51a7a990f24c3caf481a246e5b431ee0ef84 | #include <iostream>
#include <string.h>
#include <stdio.h>
// S -> D{+ D} | D{- D}
// D -> T{* T} | T{/ T}
// T -> -N | N
// N -> [0-9]{[0-9]}
//n - iterator of the expression
int S(char* str, int n);
int D(char* str, int& n);
int T(char* str, int& n);
int N(char* str, int& n);
int S(char* str, int n){
int res = ... | C++ | homework/Soloviev/02/calc.cpp | mtrempoltsev/msu_cpp_autumn_2017 | mit | 2,286 | 142 | codeparrot/github-code |
8c1247a616299683ed4265523ffac70bd4fff7a10029df9edf159b8bb58e4bfd | #! /usr/bin/env python
import os.path
import os
import argparse
import pickle
from util import *
from collections import defaultdict
import base64
import logging
import sys
import json
import shelve
#from FeatureExtraction import Tf_Idf
from LangProc import docTerms
# todo : remove this assumptions
# Indexer assumes th... | Python | Indexer.py | zkmake520/SearchEngine | mit | 6,844 | 196 | codeparrot/github-code |
7d1fd0ef24462923444f606a7ef299b7c00a3938282e8f66b28f14e8d5490dfe | <?php
namespace Ctc\AppBundle\Controller\Admin\Hotel;
use Ctc\AppBundle\Controller\Admin\Common\CrudController;
use Ctc\AppBundle\Entity\Hotel\Hotel;
use Ctc\AppBundle\Form\Admin\Hotel\HotelType;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
/**
* Hotel\Hotel co... | PHP | src/Ctc/AppBundle/Controller/Admin/Hotel/HotelController.php | sandymoreno/ctcv3 | mit | 4,769 | 169 | codeparrot/github-code |
22b6515db776e6b25cd0ada18efc937926a45b02a3685a2897cdb7e864493534 | /*
* 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... | Java | src/main/java/org/spongepowered/common/event/filter/delegate/RootCauseFilterSourceDelegate.java | kamcio96/SpongeCommon | mit | 3,082 | 74 | codeparrot/github-code |
c1873190460d9d72bce39c386baf307a79df3615afe596f81aa6f2610239f64c | const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const resolve = (dir) => {
return path.join(__dirname, '..', dir)
};
const isProduction = process.env.NODE_ENV === 'production';
const config = {
output: {
path: path.join(__dirname, '..', 'dist', 'assets'),
filename:... | JavaScript | dev/webpack.base.config.js | mya-ake/vuejs-pwa-and-ssr-on-lambda | mit | 1,237 | 59 | codeparrot/github-code |
5e26e372f9acafa8f7c52f2d7f88da83c6b7bb0511012e64cbedd092f5b9e728 | <section class="content-header">
<h1>
机关人员工资
<small>列表</small>
</h1>
<ol class="breadcrumb">
<li><a href="${basePath}"><i class="fa fa-dashboard"></i> 首页</a></li>
<li><a href="#">劳务管理</a></li>
<li class="active">机关人员工资表</li>
</ol>
</section>
<section class="conte... | HTML | AdminEAP-web/src/main/webapp/WEB-INF/views/projectmanage/team/salary/organ/list.html | Squama/Master | mit | 5,394 | 134 | codeparrot/github-code |
49df52283b5659b35e72ea0b19a0420c1a0135015658a12d9d360ce2e19af130 | var expect = require("chai").expect;
var MoodleExporter = require('../../MoodleExporter');
var xml2js = require('xml2js');
describe('MoodleExporter', function () {
var validSeed = 'abcd1234';
var validQD = {
"version": "0.1",
"questions": [{
"question": "mc-change-of-base",
... | JavaScript | test/MoodleExporter/index.js | project-awesome/project-awesome | mit | 7,608 | 207 | codeparrot/github-code |
d811be6daa249ad4ba72a8e3648dc26ad6f08f351dd85430b46df0dbfb131928 | /*
Copyright(c) 2016-2020 Panos Karabelas
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, distrib... | C | Editor/WidgetsDeferred/FileDialog.h | PanosK92/Directus3D | mit | 8,499 | 261 | codeparrot/github-code |
399eb8e5b63f7e1f2410235749484fc7944beee58bce655dc59ac2f29794c951 | import chai from 'chai';
import chaiAsPromised from 'chai-as-promised';
import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import {BasePaginator, errors} from './base-paginator';
import PaginatorError from '../paginator-error';
import * as queryHandler from '../helpers/query-handler-stub';
import * as requ... | JavaScript | src/paginators/base-paginator-spec.js | yola/drf-paginator | mit | 10,685 | 386 | codeparrot/github-code |
6c6a6145212749aa891b3c40be992f8df5f9ed41004595e5e5888d94540754d4 | /*
* Copyright (C) 2017 - 2018 FIX94
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
#include <stdio.h>
#include <inttypes.h>
#include <stdbool.h>
#include "../ppu.h"
#include "../mapper.h"
#include "../mem.h"
#include "../mapper_h/mmc3... | C | mapper/mmc3add.c | FIX94/fixNES | mit | 13,613 | 577 | codeparrot/github-code |
11c6d16a31ab91e3a448d7d18883a5373392fba8f9d06649239c9daba9cf5207 | /* Importing core module */
import {Injectable} from 'angular2/core';
import {Response} from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import {HttpClient} from './http-client.service';
/* Importing model */
import {OrderModel} from '../model/order.model';
i... | TypeScript | app/service/order.service.ts | edeuxk/backend-shopopop | mit | 1,735 | 54 | codeparrot/github-code |
e613d5cd7d5706993d2eded4c9fb1fab0200e34f506e171c09bda04b5a6bb62e | #include <sys/inotify.h>
#include <unistd.h>
#include <limits.h>
#include <cups/cups.h>
#define BUF_LEN (sizeof(struct inotify_event) + NAME_MAX + 1)
#define WATCHPATH "/home/ian/.PRINT"
int main(int argc, char *argv[]) {
cups_dest_t *dest;
char *printer;
int notify = inotify_init();
if (inotify_add_watch(no... | C | src/printdird/printdird.c | ids1024/Utilities | mit | 1,022 | 43 | codeparrot/github-code |
578f96f522a8a149713785c3053a0bdcc67bcf643b992561619d939f13ee0d1d | using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class PlayerScript : MonoBehaviour
{
private int coins;
public Text coinsScore;
public GameObject coinSound;
public GameObject ouchSound;
public GameObjec... | C# | UnityGame2D/Assets/Scripts/PlayerScript.cs | iMitaka/UnityProject | mit | 3,664 | 145 | codeparrot/github-code |
1e91ec4f7d953a3ad24b2f07274ae960ba7188ec294c72e12d1539454857f553 | package io.kluska.bsc.forms.reply.stats.service.domain.model.replies;
import io.kluska.bsc.forms.form.api.dto.QuestionDTO;
import io.kluska.bsc.forms.form.api.dto.question.LinearScaleDTO;
import io.kluska.bsc.forms.reply.stats.service.api.exception.BadReplyTypeException;
import io.kluska.bsc.forms.reply.stats.service.... | Java | reply-stats-service/src/main/java/io/kluska/bsc/forms/reply/stats/service/domain/model/replies/LinearScaleReply.java | matkluska/bsc-forms-server | mit | 1,234 | 33 | codeparrot/github-code |
3ecfbbfaf4370c355d3ad8153ce94d4f2701aff7d61fdae3453a810060c47a66 | package me.etki.grac;
import me.etki.grac.common.Action;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
* @author Etki {@literal <etki@etki.name>}
* @version %I%, %G%
* @since 0.1.0
*/
public class Request<T> {
private String resource;
private Action action;
private Map<... | Java | src/main/java/me/etki/grac/Request.java | etki/grac | mit | 1,744 | 81 | codeparrot/github-code |
b34fbe95edb2adf9232b0425473e8a1e65f8143f226aa129d09635d542711f91 | // Copyright 2014 The Gogs Authors. All rights reserved.
// Copyright 2018 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package repo
import (
"fmt"
"io"
"path"
"strings"
"code.gitea.io/gitea/modules/base"
"code.g... | GO | routers/repo/download.go | vCaesar/gitea | mit | 4,475 | 169 | codeparrot/github-code |
75659587b81b08969b9403993f2ea0cb324233226946c43375e980047905213d | <script>
$(document).ready(function (){
$('#userlist_area').hide().delay(3500).fadeIn();
$('.s_delete').delay(3500).hide("slow");
$('#front_cover').hide();
$('#admin_list_area').hide();
});
</script>
<article class="s_delete">
<code class="check">
</code>
<h2>
<?php echo $sucees_update;?>
</h2><br>
<h3... | PHP | application/views/admin/main_page3.php | ryandingle09/Inventory | mit | 7,811 | 270 | codeparrot/github-code |
ed55fd842a5223d37a70a43b186d067ed1b6539c3fefb734df2440a430be3792 | "use strict"
/**
* `format` constructor.
*
* @api public
*/
const checkStatusCode = require('./helpers');
module.exports = {
create : (statusCode, error, message, data) => {
if(!statusCode) throw new Error('Status code is required')
if( isNaN( Number( statusCode))) throw new Error('Status code not a num... | JavaScript | lib/format.js | GJ2511/response-format | mit | 2,389 | 127 | codeparrot/github-code |
8baf0c6ad90a620d636dfd38c451ad501aa10f5038a4a4d6b722c8a628c452b8 | 'use strict';
var request = require('supertest'),
chai = require('chai'),
expect = chai.expect,
routeValidator = require('../lib/index'),
validator = require('validator'),
express = require('express'),
bodyParser = require('body-parser'),
async = require('async');
describe('INTEGRATION ind... | JavaScript | test/index.js | mmerkes/express-route-validator | mit | 33,849 | 1,071 | codeparrot/github-code |
98fa77ded5d45bb0533db340b09e00989d05b149b439e61b882bdb7c6684bc20 | /******************************************************************************
* $Id: ogrsfdriver.cpp 23413 2011-11-22 21:53:32Z rouault $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: The generic portions of the OGRSFDriver class.
* Author: Frank Warmerdam, warmerdam@pobox.com
*
... | C++ | gdal-1.10.0/ogr/ogrsf_frmts/generic/ogrsfdriver.cpp | TUW-GEO/OGRSpatialRef3D | mit | 8,862 | 234 | codeparrot/github-code |
0a3f0458f66da212942f0afdcd88db7bd00cbb516310f375f078cb98670ec0ff | const { Device, UdpServer } = require('tplink-smarthome-simulator');
function startSimulator() {
const port = null;
const emeter = {
realtime: {
current: 1.1256,
voltage: 122.049119,
power: 3.14,
total: 51.493,
},
};
const devices = [];
devices.push(
new Device({
po... | JavaScript | test/setup/simulator.js | plasticrake/homebridge-hs100 | mit | 2,234 | 122 | codeparrot/github-code |
1e005f6913ff89bcc7548a70e346a562c1d8a013ab5fafab0ba09585ef14ea9c | <?php
/**
* Created by PhpStorm.
* User: Frost Wong <frostwong@gmail.com>
* Date: 28/05/2017
* Time: 22:22
*/
namespace Hodor\HttpRequest\Middleware;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use Hodor\Log;
/... | PHP | src/Hodor/Request/Middleware/Retry.php | subtlephp/subtleframework | mit | 2,518 | 84 | codeparrot/github-code |
708879be337cff55786798f9dbfd6df9286c1d408a45a618c8286f3a241723df | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>paramcoq: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.cs... | HTML | clean/Linux-x86_64-4.02.3-2.0.6/released/8.5.2~camlp4/paramcoq/1.1.2+coq8.12.html | coq-bench/coq-bench.github.io | mit | 7,531 | 181 | codeparrot/github-code |
11d691c26f1c9dd6272e594d8d199c8ad3f6056c317faab55f1b9a26bfe4491f | import * as React from "react";
import {
BackHandler,
DeviceEventEmitter,
Dimensions,
FlatList,
Platform,
SectionList,
StatusBar,
StyleSheet,
Text,
TouchableOpacity,
View,
Geolocation
} from "react-native";
import {Icon, SocialIcon, Button} from "react-native-elements";
... | TypeScript | src/MainPage.tsx | ConnerE/crowder-android | mit | 11,264 | 348 | codeparrot/github-code |
b878c09ae60ee518b6034f8ef34122c655daf085ee508b8f184339182da477e6 | using System;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.DataProtection;
using WinAuthAndAzureAuthT... | C# | WinAuthAndAzureAuthTestForURCS/App_Start/IdenityConfig.cs | domshyra/WinAuthAndAzureAuthTestForURCS | mit | 4,563 | 109 | codeparrot/github-code |
2a124f6e1c6672090f902ae642d69a95010f635dadb7b64200a77b250bcd9f7e | from __future__ import unicode_literals
from django.db import models
from django.core.paginator import Paginator, PageNotAnInteger
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel
from wagtail.wagtailimages.edit_... | Python | event/models.py | samuelleeuwenburg/Samplate | mit | 1,665 | 55 | codeparrot/github-code |
0adf7fe33ccee0f27961e4035535d7e6d033328a031f9635fe8c416e1fc43437 | // PortView.cpp : implementation file
//
#define NODEDETAILPORT_DLL
#include "stdafx.h"
#include "PortView.h"
#include "Port.h"
/////////////////////////////////////////////////////////////////////////////
// CPortView
IMPLEMENT_DYNCREATE(CPortView, CFormView)
CPortView::CPortView()
: CFormView(CPortView::IDD)
{
... | C++ | Tools/NodeDetailPort/PortView.cpp | palestar/medusa | mit | 1,868 | 95 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.