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 |
|---|---|---|---|---|---|---|---|---|
c1a1ca7d4b2064c444c436a9ef0f798cafa66f77d760a4d5af7b635f359ef65b | #include "schemeMate_printer.h"
void sm_print(sm_obj o, bool oneLineMode)
{
switch (get_tag(o))
{
case TAG_INT:
printf("%ld", int_val(o));
break;
case TAG_NIL:
printf("()");
break;
case TAG_FALSE:
printf("#f");
break;
case TAG_TRUE:
printf("#t");
break;
case TAG_SYMBOL:
printf("%s", symbol_val... | C | src/schemeMate_printer.c | stefanseibert/schemeMate | mit | 2,021 | 113 | codeparrot/github-code |
5b55e67478edc126ab7907f927ef63cd7828a0714320c81e9abda3397562720a | -- The MIT License (MIT)
-- Copyright (c) 2015 Ryan M. Wackelin
local Class = require("soul/Class")
--------------------------------------------------------------------------
-- @module Mosaic
--
-- @desc A 2D buffer.
--
-- @summary Contains a 2D array of Cells.
--
-- @todo Create formal tests.
-- @t... | Lua | Mosaic.lua | majesty2450/OpenComputers-FSGL | mit | 1,642 | 71 | codeparrot/github-code |
245c226dfad3de255f2d01787af3ed0fc52f93863987ca424cf18e5a563533ef | package net.daw.dao.implementation;
import java.sql.Connection;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.HashMap;
import net.daw.bean.implementation.ReciboAfiliadoBean;
import net.daw.dao.publicinterface.TableDaoInterface;
import net.daw.dao.publicinterface.ViewDaoInterface;
import net.d... | Java | src/main/java/net/daw/dao/implementation/ReciboAfiliadoDao.java | FerP/cuotaAfiliado | mit | 8,235 | 188 | codeparrot/github-code |
7dfab6422ba1d2c4eb74c82649fb8b161257466828adf8fdfe563dd614e027a2 | <?php
namespace App\Extensions;
use Blade;
/**
* DouyasiBlade
* 扩展Blade标签
* 一般来说,标签都是使用正则来解析的,blade标签解析也是一样的
*
* @author raoyc <raoyc2009@gmail.com>
*/
class DouyasiBlade
{
public static function register()
{
# @datetime($var) : Laravel official example (官方帮助示例)
Blade::directive('dateti... | PHP | app/Extensions/DouyasiBlade.php | xiejiangchu/blog | mit | 2,011 | 69 | codeparrot/github-code |
9d230d4bb58c4acf541a3808c04f7ffbb4798d9bdb98a6922313c414039d1fae | # Most existing packages use kron(...) to compute the khatri-rao product. However,
# this appears roughly 2x slower than using for loops in Julia as demonstrated in this
# simple script.
####################################################################################
using BenchmarkTools
using TensorBase
function... | Julia | perf/A_kr_B.jl | JuliaTensors/TensorBase.jl | mit | 1,596 | 58 | codeparrot/github-code |
133d405dc7eaf8e3c10bca8edfd7d867f00cbdcc8b157616ef9d044b24dc5fcd | class RadHocQueryDecorator < LittleDecorator
include ActiveSupport::Inflector
attr_reader :show_view
def data
paged
end
def any_data?
data.any?
end
def field_names
result[:labels].keys
end
def labels
result[:labels].values
end
def linked
result[:linked]
end
def total_... | Ruby | app/decorators/rad_hoc_query_decorator.rb | radicalbear/rad_hoc_rails | mit | 1,623 | 62 | codeparrot/github-code |
8a76c035abda6b2da7e6ea50778871a69f54b5ff105b9f3985496021ec038702 | package gwf
import (
"net/http"
"strings"
)
// 使用一个Context对象把所有上下文都包括掉
type Context struct {
w http.ResponseWriter
r *http.Request
path []string
}
type Module interface {
Action(*Context)
}
type Dispatcher struct {
// module name => module interface
modules map[string]Module
}
func (c *Context) Request() ... | GO | gwf/dispatcher.go | awayhe/fsea | mit | 1,204 | 73 | codeparrot/github-code |
b32c52df91384c4bf2142218f105d0bb9930f52d8ef692766bef7083d51262a7 | /**
* PointEdgeViewer class, a visualizer for 3D point cloud and edges connecting
* them, implemented in SDL.
*
* Example usage:
* PointEdgeViewer viewer;
* viewer.Launch();
* viewer.AddPoints(...);
* viewer.AddEdges(...);
* viewer.CenterView();
*
* Keyboard and mouse interactions:
* ... | C | xyCppUtils/PointEdgeViewer.h | yxiong/xyMatlabUtils-release | mit | 4,245 | 135 | codeparrot/github-code |
b6bc38e3f973795481f005452586de717a2d237f31acba0285591f9ffc56ccc6 | module.exports = config;
function config($urlRouterProvider, $mdThemingProvider, $mdIconProvider) {
$urlRouterProvider.otherwise('/');
const customPrimary = {
'50': '#ffffff', // white background color for toolbar
'500': '#72b0d7', // blue color of the label and choices in select
'600': '#72b0d7', ... | JavaScript | src/desktop/desktop.config.js | DomoApps/advanced-sample-app | mit | 1,885 | 49 | codeparrot/github-code |
0cf2801e7046a172f2c0abe6f847a481d07723ea28dca5c8113027fbfa046eac | 'use strict';
var deap = require('deap');
var fs = require('fs');
var gutil = require('gulp-util');
var isObject = require('isobject');
var path = require('path');
var parser = require('tumblr-theme-parser');
var through = require('through2');
var PLUGIN_NAME = 'gulp-tumblr-theme-parser';
module.exports = function (... | JavaScript | index.js | ish1r0k1/gulp-tumblr-theme-parser | mit | 1,353 | 58 | codeparrot/github-code |
bb70595aa397b827f9273358f7e1cd16c143aef3b5e8eb2f5ac69f02cd443415 | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>"paths/Greeting" | ringcentral-ts API Reference</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link ... | HTML | docs/modules/_paths_greeting_.html | zengfenfei/ringcentral-ts | mit | 9,052 | 179 | codeparrot/github-code |
70a63a96604de95e0666f3945e63d1f9f5c99e283f0a257175652a116bd42eac | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""晨星基金评级数据,用来买基金作为参考"""
import _env
import copy
import heapq
import requests
from operator import itemgetter
from tornado.escape import utf8
from six import print_
from bs4 import BeautifulSoup
from web_util import get
def parse_html(html):
html = utf8(html)
sou... | Python | crawler/morningstar/morningstar.py | PegasusWang/pyhome | mit | 2,515 | 98 | codeparrot/github-code |
2d852b9029fc8dd8c31391611fc992a346e465b056cd19e9c46703b7f16ffed0 | """
There are a total of n courses you have to take, labeled from 0 to n - 1.
Some courses may have prerequisites, for example to take course 0 you have to first take course 1, which is expressed as a pair: [0,1]
Given the total number of courses and a list of prerequisite pairs, return the ordering of courses you sh... | Python | Algorithms/#210 CourseSchedule II/PythonCode.py | yingcuhk/LeetCode | mit | 2,023 | 55 | codeparrot/github-code |
4585e6e92b56abcfc4102e0beca1dcb1ced335ed7a4294dbb11b6a1d92e99f9e |
//generators
function emptyGenerator(x,y,z, res)
{
return false;
}
function cubeGenerator(x,y,z, res)
{
return true;
}
function sphereGenerator(x,y,z, res)
{
//spherical implicit surface x2+y2+z2=1
var dim = res;
var x = dim/2-x;
var y = dim/2-y;
var z = dim/2-z;
return x*x+y*y+z*z <= dim/2*dim/2 ?... | JavaScript | src/voxel.js | usco/voxel-exp | mit | 13,677 | 539 | codeparrot/github-code |
43cf54ef77a8f3f1f4e85120ac3b88cced762130c81652bc634b4f4f7ddf51a9 | package com.github.tfaga.lynx.test;
import com.github.tfaga.lynx.beans.QueryParameters;
import com.github.tfaga.lynx.enums.FilterOperation;
import com.github.tfaga.lynx.enums.OrderDirection;
import org.junit.Assert;
import org.junit.Test;
import java.util.HashSet;
import java.util.Set;
/**
* @author Tilen Faganel
... | Java | core/src/test/java/com/github/tfaga/lynx/test/QueryStringBuilderPredicatesTest.java | TFaga/lynx | mit | 3,850 | 97 | codeparrot/github-code |
1994af64d87f2342ff3824b2bd736a3176fff0008d568b778008ff160407556f | /* ========================================
* System Name : 化交线上平台
* SubSystem Name :化交服务核心工具集
* File Name: OrderField
* ----------------------------------------
* Create Date/Change History
* ----------------------------------------
* 04/29/16 池 永 Create
*
*
* --------------------------------------... | Java | gsm/src/main/java/com/shcem/mybatis/query/OrderField.java | judypol/jshcem | mit | 1,028 | 52 | codeparrot/github-code |
a834bee442f8854af18bed21deceb33d2343c9821297f76e8689d12f3d446ca6 | /**
A controller that you need to use when displaying an Flame.TableView. You need to
define _headers property and call pushDataBatch to render data (can be called
several times to render data in batches). The headers should be Flame.TableHeader
objects.
There are two refined subclasses of this controller, D... | JavaScript | controllers/table_controller.js | renotoaster/flame.js | mit | 7,762 | 179 | codeparrot/github-code |
e84b36028c4023886570d4e5c8ca07c3bb16071a2d199bbc1cf146820dbb2ef7 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="zh-TW">
<head>
<title>æè²é¨ãæèªå
¸ã</title>
<meta http-equiv="Pragma" content="no-cache">
<meta name="AUTHOR" content="FlySheet Information Services, Inc.">
<meta h... | HTML | cw-data/1000-1999/CW0000001577.html | BuzzAcademy/idioms-moe-unformatted-data | mit | 16,202 | 326 | codeparrot/github-code |
6f159d3b1d103d6216a584bfef804963f519b6d2c84f14533de7ccd742b04ecc | <!--
Copyright 2005-2008 Adobe Systems Incorporated
Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
or a copy at http://stlab.adobe.com/licenses.html)
Some files are held under additional license.
Please see "http://stlab.adobe.com/licenses.html" for more information.
-->... | HTML | documentation/html/group__merge.html | brycelelbach/asl | mit | 12,770 | 289 | codeparrot/github-code |
678e5b63d2af84fa5a2691c996a83f2df4cfe8d44ea1891e4e86db5aef21995d | using System;
using _02.Bank_of_Kurtovo_Konare.Customers;
namespace _02.Bank_of_Kurtovo_Konare.Accounts
{
public class MortgageAccount : Account
{
public MortgageAccount(Customer customer, decimal balance, decimal monthlyInterestRate)
: base(customer, balance, monthlyInterestRate)
{
}
public override de... | C# | 04. Encapsulation and Polymorphism/02. Bank of Kurtovo Konare/Accounts/MortgageAccount.cs | HouseBreaker/OOP | mit | 1,051 | 37 | codeparrot/github-code |
6b34e46253497c95e789f6c8628a47f54eea217c130ebf21283a508b2f90faed | package ltg.commons;
import org.fusesource.hawtbuf.Buffer;
import org.fusesource.hawtbuf.UTF8Buffer;
import org.fusesource.mqtt.client.*;
import java.io.UnsupportedEncodingException;
import java.net.URISyntaxException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.... | Java | src/main/java/ltg/commons/SimpleMQTTClient.java | tebemis/simple-java-mqtt-client | mit | 6,831 | 213 | codeparrot/github-code |
27c2f2cd2e0b0cdba4acd706812d4fecefe2189d45acda9087d28e7ce6f75112 | {% extends "site_base.html" %}
{% load url from future %}
{% load i18n %}
{% load bootstrap_tags %}
{% block head_title %}{% trans "Add Video" %}{% endblock %}
{% block extra_script %}
<script src="{{STATIC_URL}}js/assets/js/jquery-1.9.0.js"></script>
<script type="text/javascript">
$(documen... | HTML | camp/templates/add_video.html | zsuzhengdu/camp | mit | 2,032 | 64 | codeparrot/github-code |
4d6aea5e83ec825db38dc21e4f853506479954475542b40a770de63e264a0af8 | package com.example.diokey.sunshine.app;
import android.content.Intent;
import android.content.SharedPreferences;
import android.net.Uri;
import android.preference.PreferenceManager;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.app.ActionBar;
import android.support.v4.app.Fragment;
import... | Java | app/src/main/java/com/example/diokey/sunshine/app/MainActivity.java | diokey/sunshine | mit | 3,010 | 93 | codeparrot/github-code |
3b8bdd7aa5bc27ce3e810a8b492491dc620eed00d11cbdd9fe1837b47a46c6b5 | 'use strict';
var usersDomain = require('./users-domain'),
incidencesDomain = require('./incidences-domain'),
schoolDomain = require('./schools-domain'),
Q = require('q');
var RESULT_SUCCESS = "SUCCESS";
var RESULT_WARNING = "WARNING";
var RESULT_ERROR = "ERROR";
var _mailSender;
var subjectInterpreter = requi... | JavaScript | server/domain/mail-domain.js | daniboomerang/warg-helpdesk | mit | 4,316 | 136 | codeparrot/github-code |
cccbfb8f55f3c9ea752d1edd61173899be4d63812612a632e19246c3b03cffd7 | # -*- coding: utf-8 -*-
"""
unit_conversion.py
==================
Functions for checking and sanitizing units that do not follow the FITS specification.
This uses functions from ``astropy.unit`` to parse and handle units.
"""
import warnings
from astropy.units import Unit, UnrecognizedUnit
from astropy.io.fits.verify... | Python | fits2hdf/unit_conversion.py | telegraphic/fits2hdf | mit | 2,314 | 92 | codeparrot/github-code |
a264bb3cd1d82f56f2f55444120bb51811d0bee445e54addadf6c0a0c6fea28a | using System.Collections.Generic;
using System.Linq;
using System;
namespace Jsonics.FromJson.PropertyHashing
{
internal class PropertyHashFactory
{
internal PropertyHash FindBestHash(string[] properties)
{
var bestHash = new PropertyHash()
{
Column = 0,
... | C# | Jsonics/FromJson/PropertyHashing/PropertyHashFactory.cs | trampster/Jsonics | mit | 5,092 | 127 | codeparrot/github-code |
4c4d31651f02ce0f89ee5404e97481134aae909c4336992f50fab4cc7b45b539 |
/*******************************************************************************
* name: Terminal_9
* family: Terminal
* size: 10
* style: Normal
* --------------------------------------
* included characters: !"#$%&'()*+,-./0123456789:;<=>?\x0040ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~... | C | svis_teensy/dependencies/libraries/TFT_ILI9163C/_fonts/Terminal_9.c | jakeware/svis | mit | 37,137 | 1,481 | codeparrot/github-code |
5e00327ef2a52b3908c39a4fed590dc25cc124dacb0531d2bdb1bc23e2a354d3 | using System;
using System.Reflection;
using System.Windows.Forms;
using System.Collections.Generic;
using Microsoft.Win32;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using Extensibility;
using NetOffice;
using NetOffice.OfficeApi.Native... | C# | Misc/01 Super Addin Sample/IDTExtensibility2 SuperAddin/Addin.cs | NetOfficeFw/Samples | mit | 9,477 | 237 | codeparrot/github-code |
f372374eeb9415cc3453890e4470da1fda8a0b390dffaa2865bcb4edae8a5be7 | 'use strict';
const Joi = require('joi');
const Async = require('async');
const ObjectAssign = require('object-assign');
const BaseModel = require('hapi-mongo-models').BaseModel;
const AdminGroup = require('./admin-group');
const Admin = BaseModel.extend({
constructor: function (attrs) {
ObjectAssign(th... | JavaScript | server/models/admin.js | bigbassroller/Angular2-Frame-Backend | mit | 3,302 | 148 | codeparrot/github-code |
4f439ccb480ea67de318d3f2195db4ed838ea5cbd194112526cfe8155da9356d | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="syntax_highlig... | HTML | doc/readme.html | pius/connie | mit | 4,609 | 121 | codeparrot/github-code |
fa8db4a187dc76b633698d043b77cae41ff478334aceda846b991de0a27391df | #!/bin/bash
VERSION="$1"
SERVERSTART=0
SERVERCONNECT=0
SUCCESS=false
echo "Starting image with MySQL version $VERSION"
docker run -e MYSQL_ROOT_PASSWORD=rot --name=testserver -p 3306:3306 -d mysql/mysql-server:$VERSION
RES=$?
if [ ! $RES = 0 ]; then
echo "Server start failed with error code $RES"
else
SERVERSTART=1
... | Shell | mysql-server-5.7/test/testserver.sh | golden-tech-native/dtlib | mit | 961 | 53 | codeparrot/github-code |
b379bbd9d0c7bf6b038dcef2757def81985d5b6d2f0886266b4bfa5281b2a44f | package com.javarush.task.task28.task2810.model;
import com.javarush.task.task28.task2810.view.View;
import com.javarush.task.task28.task2810.vo.Vacancy;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Alexey on 10.05.2017.
*/
/*
2. Добавь два поля — 1) вью, 2) массив провайдеров.
3. Создай ко... | Java | 4.JavaCollections/src/com/javarush/task/task28/task2810/model/Model.java | avedensky/JavaRushTasks | mit | 1,268 | 45 | codeparrot/github-code |
8e5cc550c4e8f44fde9e0ef0258c4a7c36b91dcf5e8a59739ec98f7cade08b87 | package com.ly.java.javanio.c10datagramchannel;
import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.DatagramChannel;
/**
* 功能描述:
* <p color="red">
* 实现加载
* </p>
* 文件名称:服务器端代码.java
*
* @author ly
*/
... | Java | java/src/main/java/com/ly/java/javanio/c10datagramchannel/客户端端代码.java | liyong299/normal | mit | 1,905 | 80 | codeparrot/github-code |
d548821388e54e6176c141f7defd639520a528b0b9450ecb128f279de96fb63c | (function() {
'use strict';
/**
* This modules adds a cancel option to promises created by the {@link ng.$q} service.
*/
angular.module('cancelable-q', [])
/**
* @ngdoc service
* @name cancelableQ
*
* @description
* Adds a cancel method to promises created by the Angular's ng.$q service.
*
... | JavaScript | src/cancelableq.js | devatwork/angular-cancelable-q | mit | 2,211 | 70 | codeparrot/github-code |
0ec2e60b32de9a4a073237fb31d8726ca245ab6ae8482d49effb7a517c7b388f | <html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>啊 | Gridea</title>
<meta name="description" content="温故而知新" />
<link rel="shortcut icon" href="https://hi.1v1.design/favicon.ico">
<link rel="stylesheet" href="https://hi.1v1.design/styles/main.css... | HTML | post/a/index.html | fengyiyi/fengyiyi.github.io | mit | 13,435 | 317 | codeparrot/github-code |
fe3b092431038f1c4bac4a73a002cbccc3cbb572e2a4bdf3ad292deadb53c380 | class Admin::ApplicationSettingsController < Admin::ApplicationController
before_action :set_application_setting
def show
end
def update
if @application_setting.update_attributes(application_setting_params)
redirect_to admin_application_settings_path,
notice: 'Application settings saved succ... | Ruby | app/controllers/admin/application_settings_controller.rb | theodi/gitlabhq | mit | 1,322 | 52 | codeparrot/github-code |
ea4dc93ef8ce385c9e19272e3a0b91d643e2ac198a84f9e8f086836aaa304246 | <HTML><HEAD>
<TITLE>Review for Selena (1997)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0120094">Selena (1997)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Lim+Boon+Wee">Lim Boon We... | HTML | data science/machine_learning_for_the_web/chapter_4/movie/9998.html | xianjunzhengbackup/code | mit | 3,868 | 60 | codeparrot/github-code |
9baab100f9890b33896af0b75ed31704932de88766703b2c574696b3bdb04fa8 | /*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2014-2018 Paul Sokolovsky
*
* 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 ... | C | extmod/moductypes.c | trezor/micropython | mit | 30,020 | 779 | codeparrot/github-code |
a18bc752b942f6296180db6d92ae1dd490f37390d3f0256916858d22cca8383a | /**
* @file 程序运行时组件
* @author mengke01(kekee000@gmail.com)
*/
define(
function (require) {
var observable = require('common/observable');
function bindClick(components) {
var me = this;
document.body.addEventListener('click', function (e) {
if (!me.l... | JavaScript | src/fonteditor/widget/program.js | fontmoa/fonteditor | mit | 3,420 | 135 | codeparrot/github-code |
ed5d087f1e20ec8e29803bb83c85a8a3e8cd78593beff9bfb43122c2cc061d74 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "txdb.h"
#include "walletdb.h"
#include "bitcoinrpc.h"
#include "net.h"
#i... | C++ | src/init.cpp | Bit-Net/vash | mit | 56,936 | 1,528 | codeparrot/github-code |
7d630a6daf8fcdadad524069d3f4f9b4b397fdcb390b08716aaa20be24773f54 | package chapter_1;
import static org.junit.Assert.assertEquals;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import datastructures.util.InputUtil;
public class TestPalindromePermutation {
private static String inputFile = "input_files/chapter_1/palindrome_permutation/test_ca... | Java | cracking-the-coding-interview/test/chapter_1/TestPalindromePermutation.java | scaffeinate/crack-the-code | mit | 1,556 | 51 | codeparrot/github-code |
711dd095af30158770ca544edd631a2dd7d92198edc4ab53bbf4a503bcde3f70 | // ==========================================================================
// Project: MySystem.Link
// Copyright: ©2010 My Concord Consrtium, Inc.
// ==========================================================================
/*globals MySystem Forms SC*/
/** @class
@extends MySystem.Diagrammable
@version... | JavaScript | apps/my_system/models/link.js | concord-consortium/mysystem_sc | mit | 8,456 | 256 | codeparrot/github-code |
5dc1f0eff69e586327fe60e79fba0b59442e32853774732e259743512e933d9b | package no.nrpk.openingdays.api;
import com.ning.http.client.AsyncCompletionHandler;
import com.ning.http.client.AsyncHttpClient;
import com.ning.http.client.Response;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.json.JSONArray;
import org.json.JSONExceptio... | Java | src/test/java/no/nrpk/openingdays/api/OpeningDaysApiTest.java | Tmarty/nrpk-opening-days-api | mit | 2,267 | 73 | codeparrot/github-code |
aa320bf3bed96524f4e147f93d066ab0c7a002fbff6e38ff744cadaf0cef8c1c | // -----------------------------------------------------------------------------
// This file is part of vAmiga
//
// Copyright (C) Dirk W. Hoffmann. www.dirkwhoffmann.de
// Licensed under the GNU General Public License v3
//
// See https://www.gnu.org for license information
// ----------------------------------------... | C | src/addons/amiga/vamiga/Emulator/Peripherals/JoystickTypes.h | emoon/ProDBG | mit | 2,260 | 68 | codeparrot/github-code |
515f56f47e16c36f40cca19d49e7ddf4548a0dd79dc91feb8105b730edf7cfaa | <!doctype html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"><!--<!... | HTML | _layouts/post.html | tipgar/tipgar.github.io | mit | 3,829 | 73 | codeparrot/github-code |
45a6c41aa63b980df9ba140e9a126671a9de9b7386d4d7ed327d28a0d50d265a | <?php
namespace Apiarium\Parsers\Xml_Parsers;
use Apiarium\Models\Feed_Item;
class Asu_Now_Xml_Parser {
const ASU_PREFIX = 'https://asunow.asu.edu/';
public function __construct() {
}
public function can_parse( $url ) {
try {
if ( is_string( $url ) ) {
if ( starts_with( $url, self::ASU_P... | PHP | src/parsers/xml/asu-now-xml-parser.php | gios-asu/apiarium-wp-plugin | mit | 2,824 | 103 | codeparrot/github-code |
e4f48807f15d99c477ac78495ba96e7fd8bd487ef941699717e975a9d21316de | #!/usr/bin/env node
var workshop = process.argv.length > 2 ? process.argv[2] : 'learnyounode'
var challenge = process.argv.length > 3 ? process.argv[3] : '01'
if (challenge.length < 2) challenge = '0' + challenge
var username
if (process.argv.length > 4) {
username = process.argv[4]
} else {
username = require('..... | JavaScript | scripts/new.js | js-vn/workshop-tracker | mit | 1,846 | 75 | codeparrot/github-code |
56c98da863ff294fac72d63a3b204cd5fcba0d1d3a7429a9c10b83198305115a | // @flow
import type { DraftBlockType } from 'draft-js/lib/DraftBlockType';
import { BLOCK_TYPES, OLD_BLOCK_TYPES } from '../../constants';
const getBlockTypeForTag = (
tagName: string,
lastList: ?string,
element: ?HTMLElement
): DraftBlockType => {
switch (tagName) {
case 'h1':
return BLOCK_TYPES.... | JavaScript | src/encoding/convertHTMLToContentState/getBlockTypeForTag.js | oneteam-dev/draft-js-oneteam-rte-plugin | mit | 1,408 | 52 | codeparrot/github-code |
0a51bfc189f24983d4bd3e3c2e20fd7f9616b2f0c8c268ccd2d01650a7b69516 | #!/usr/bin/env python
#
# This code is a part of `ardrone_autopilot` project
# which is distributed under the MIT license.
# See `LICENSE` file for details.
#
"""
This node is based on `base.py`. See there a documentation.
Inputs
------
* in/image -- main picture stream.
Outputs
-------
* out/image -- result imag... | Python | nodes_opencv/frame.py | AmatanHead/ardrone-autopilot | mit | 1,941 | 81 | codeparrot/github-code |
c2ac2b3f02b285c67421f0deadea0180a61101b8fb3ca34148afd929bfba70e2 | import { expect } from "chai";
import { Formatter } from "export/formatter";
import { MathRun } from "../../math-run";
import { MathSubSuperScript } from "./math-sub-super-script-function";
describe("MathSubScript", () => {
describe("#constructor()", () => {
it("should create a MathSubScript with correct... | TypeScript | src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.spec.ts | dolanmiu/docx | mit | 1,964 | 61 | codeparrot/github-code |
87f76a25a948164f9dcf2d3142f6e3752b7720158b613a62367420f677aceae9 | #--
# Ruby Whois
#
# An intelligent pure Ruby WHOIS client and parser.
#
# Copyright (c) 2009-2013 Simone Carletti <weppos@weppos.net>
#++
require 'whois/record/parser/base'
module Whois
class Record
class Parser
#
# = whois.nic.mx parser
#
# Parser for the whois.nic.mx server.
... | Ruby | lib/whois/record/parser/whois.nic.mx.rb | opensrs-pso/whois | mit | 1,987 | 82 | codeparrot/github-code |
5d2151799044d1960129f66e60dd46013544b1d3ec221db02c8d4cbcc1f67981 | require 'bh/classes/stack'
require 'ostruct'
module Bh
module Classes
class Base
def initialize(app = nil, *args, &block)
@app = app
@concat = block_given? && @app.respond_to?(:concat_content)
@options = extract_options_from(*args, &block).dup
@content = extract_content_fro... | Ruby | lib/bh/classes/base.rb | buren/bh | mit | 2,243 | 91 | codeparrot/github-code |
833617dfae5e97740570359867692287ada82ade9b7ae74953599585daae15c6 | PLUGIN.name = "Doors"
PLUGIN.author = "Chessnut"
PLUGIN.desc = "A simple door system."
DOOR_OWNER = 3
DOOR_TENANT = 2
DOOR_GUEST = 1
DOOR_NONE = 0
nut.util.include("sv_plugin.lua")
nut.util.include("cl_plugin.lua")
nut.util.include("sh_commands.lua")
do
local entityMeta = FindMetaTable("Entity")
function entityMe... | Lua | plugins/doors/sh_plugin.lua | Cyumus/NutScript | mit | 1,489 | 67 | codeparrot/github-code |
7fcdeb103c27797028cc64a2d3426f4750ce0dceb8a47d433dddb71e641d0f1d | package org.robolectric.shadows;
import android.app.Application;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.appwidget.AppWidgetProviderInfo;
import android.content.ComponentName;
import android.content.Context;
import android.view.View;
import android.widget.R... | Java | shadows/framework/src/main/java/org/robolectric/shadows/ShadowAppWidgetManager.java | ChengCorp/robolectric | mit | 10,104 | 283 | codeparrot/github-code |
2f75b0dafbe48bc063a6bb10a06d252018cba840cedfd9acdec5a17a7812ac3c |
<!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/st/storm.mvvm.1.2.9/Storm.Mvvm-portable-net45%2Bwin%2Bwpa81%2Bwp80%2BMonoAndroid10%2Bxamarinios10%2BMonoTouch10.html | kuhlenh/port-to-core | mit | 9,635 | 240 | codeparrot/github-code |
06227ef10ad799dcad7611fc0ab2342b019fc393db5c59c14dfb39e246b1e28c | local oop = medialib.load("oop")
medialib.load("timekeeper")
local HTMLService = oop.class("HTMLService", "Service")
function HTMLService:load(url, opts)
local media = oop.class("HTMLMedia")()
self:loadMediaObject(media, url, opts)
return media
end
-- Whether or not we can trust that the HTML panel will send 'play... | Lua | lua/medialib/service_html.lua | wyozi/gmod-medialib | mit | 8,599 | 320 | codeparrot/github-code |
2896e4d8fed401a3be944f313377df9f12222f8b007a70e31ad499883255799e | using Bittrex.Helpers;
using Bittrex.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Bittrex.Api
{
public static class PublicApi
{
public static async Task<IList<MarketModel>> GetMarketsAsync()
{
... | C# | src/BittrexApi/Api/PublicApi.cs | raghupallavi/Bittrex-CSharp-Api | mit | 4,392 | 91 | codeparrot/github-code |
0e24055bb715f5321ffe76bd27dfb7bd40de1a5a57efe6c7185ed91fd1727431 | #ifndef MATCHESTREEMODEL_H
#define MATCHESTREEMODEL_H
#include <QVariant>
#include <QModelIndex>
#include <QStringList>
#include <QAbstractItemModel>
#include "treeitem.h"
#include "Utils/util.hpp"
class MatchesTreeModel : public QAbstractItemModel
{
Q_OBJECT
public:
explicit MatchesTreeModel(QObject *parent =... | C | Matches/matchestreemodel.h | alesapin/LSPL-IDE | mit | 1,627 | 46 | codeparrot/github-code |
b15f7d487078a5d2f1b43d2750eda7145f86e3b2443f644bbb633b6fa0b23eff | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "main.h"
#include "db.h"
#include "txdb.h"
#include "init.h"
#include "miner.h... | C++ | src/rpcmining.cpp | translationcoin/master | mit | 19,506 | 543 | codeparrot/github-code |
b90242661c2dbcfd05198b23adca0afe6be8f39d9be986f9458be7a0d9aa4eca | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Graphics.Textures;
using osuTK.Graphics.ES30;
using osuTK;
using System;
using osu.Framework.Graphics.Batches;
using osu.Framework.Graphics.Primitive... | C# | osu.Framework/Graphics/UserInterface/CircularProgressDrawNode.cs | smoogipooo/osu-framework | mit | 6,540 | 170 | codeparrot/github-code |
b9cea7c842d662443ae39e394f1429bdc1dd08ed01f232dd3c6421c2464bb514 | /*
* Copyright (c) 2017. Jamie Thompson <bishbashboshjt@gmail.com>
*/
package com.bishabosha.caffeine.json;
import com.bishabosha.caffeine.functional.Library;
import com.bishabosha.caffeine.functional.Option;
import com.bishabosha.caffeine.functional.tuples.*;
import com.bishabosha.caffeine.hashtables.HashMap;
impo... | Java | com/bishabosha/caffeine/json/JSONSchema.java | bishabosha/caffeine | mit | 10,852 | 322 | codeparrot/github-code |
4693315264956a987846f9650d37cc90ddacdbaba5f604236be8da7b3a273733 | /*
The MIT License (MIT)
Copyright (c) 2015 Bluewolf Team
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,... | Java | makecups-backend/app/domain/models/campeonato/Partida.java | Bluewolfbr/makecups | mit | 1,542 | 53 | codeparrot/github-code |
b23a89a3a7f065f559f8095dc805cf93f5ad116d5de491ffbc5e1ac037c45335 | import os
import time
import datetime
import logging
import gzip
from hardware.channel import Channel
"""
Sensor Class
- ggf. Logfile als Datasource per Parameter
- Logging in eigene Klasse oder Scheduler
"""
class Sensor:
def __init__(self, device):
self.initialized = False
self.device = device
self.in... | Python | hardware/sensors.py | Psychedelic-Engineering/sleep-machine | mit | 2,531 | 108 | codeparrot/github-code |
731d3d91a90ac9ebae3398463bd0b20075a2b79b897a06a156e6136f6d6343c9 | // Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparamsbase.h"
#include "tinyformat.h"
#include "util.h"
#include <ass... | C++ | src/chainparamsbase.cpp | unitusdev/unitus | mit | 2,736 | 111 | codeparrot/github-code |
72afa39216898a127b8a8e562d7b0dbcf7063f5ba8caa33a3022491311a284a4 | <?php
namespace Orchestra\Testbench\Concerns;
use InvalidArgumentException;
use Orchestra\Testbench\Database\MigrateProcessor;
trait WithLoadMigrationsFrom
{
/**
* Define hooks to migrate the database before and after each test.
*
* @param string|array<string, mixed> $paths
*
* @throws... | PHP | src/Concerns/WithLoadMigrationsFrom.php | orchestral/testbench-core | mit | 964 | 37 | codeparrot/github-code |
a0e5c26844fe8440579e8c03e51e4442e9aeb00ebe5e8f4fe0c3cdb318c45bca |
#include <string.h>
#include <beam/types.h>
#include <beam/errno.h>
#include <beam/atom_table.h>
#include <beam/iff.h>
#define CHUNK_MAGIC_LENGTH 4
static const byte CHUNK_MAGIC_TABLE[CHUNKS_TOTAL][CHUNK_MAGIC_LENGTH] = {
[CHUNK_ATOM] = {'A','t','o','m'},
[CHUNK_CODE] = {'C','o','d','e'},
[CHUNK_STR] = {'S',... | C | src/iff.c | mura1/beam-loader | mit | 2,866 | 119 | codeparrot/github-code |
c1becd1adb451ac88f3bd2e99fd31f1ebd0a018208a781db9ca72721eac3ed4b | import { Document } from "mongoose";
abstract class BaseModel implements Document {
public abstract increment;
public abstract model;
public abstract remove;
public abstract save;
public abstract $isDefault;
public abstract depopulate;
public abstract equals;
public abstract execPopulat... | TypeScript | src/BaseModel.ts | pskd73/typemongoose | mit | 1,723 | 61 | codeparrot/github-code |
e63163995e20cf4edd843633bb66372dcb0cf281c95da91223e1262487cdf95d | import { RemoteAPIService } from './RemoteAPIService';
/**
* Wikipedia retrieval service
*/
export class WikipediaService extends RemoteAPIService {
private static jobName = 'Wikipedia';
/**
* Init the queue with the number of workers and a specific job
*/
public static init() {
super... | TypeScript | src/services/WikipediaService.ts | alcappello/music-api | mit | 1,155 | 40 | codeparrot/github-code |
ea73714802d6cdfe98dc73a8cab36b688e253ef82632f0dff115e8cab0595902 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html><head><title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="search.css"/>
<script type="text/javascript" src="search... | HTML | SDKs/VST3 SDK/doc/vstexamples/search/variables_64.html | rcgilbert/csc344-wi14 | mit | 39,208 | 409 | codeparrot/github-code |
b1193f9470a3cca6a2a2be0e433b0ea517aa7ab9988368c1677518b2556a1648 | package cptt.lexer;
import java.util.ArrayList;
import java.util.List;
public class KMP{
public static int[] next(String pattern){
int length = pattern.length();
if (length == 0) {
throw new IllegalArgumentException("Pattern should not be an empty string.");
}
int next[] = new int[length];
ne... | Java | compilers/book_compilers/src/cptt/lexer/KMP.java | larryjiang/cs_study | mit | 2,529 | 122 | codeparrot/github-code |
7528267679fb7022c16c4f95464578250cbf3d38061df62573996d3a9a31fed9 |
var Webcall = function (settings) {
var options = settings || {};
var key = options['key'] || null;
var baseUrl = options['baseUrl'] || 'http://call.mobilon.ru/';
var prepareOrderUrl = function (opts) {
var qs = '';
for (var prop in opts) {
if (opts.hasOwnProperty(prop)) {... | JavaScript | js/webcall.js | antirek/webcall-mobilon.js | mit | 1,455 | 65 | codeparrot/github-code |
ef1e54c9ee85a5c3ed3d016310464409336d78a699097a126957c31750566af1 | <?php
namespace Admin\AdmBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Admin\AdmBundle\Entity\Games;
use Symfony\Component\HttpFoundation\Response;
class GamesController extends Controller{
public function indexAction(){
$em = $this->getDoctrine();
$data = $e... | PHP | src/Admin/AdmBundle/Controller/GamesController.php | sergmsa/avrora | mit | 3,680 | 125 | codeparrot/github-code |
5224b2a2544fa16b9b229121ca94b699bea5e4fbf58d9c641069608662ce8e6d | namespace TDDMicroExercises.TirePressureMonitoringSystem
{
public class Alarm
{
private const double LowPressureThreshold = 17;
private const double HighPressureThreshold = 21;
Sensor _sensor = new Sensor();
bool _alarmOn = false;
private long _alarmCount = 0;... | C# | CSharp/TirePressureMonitoringSystem/Alarm.cs | TheoCadoret/racing | mit | 757 | 32 | codeparrot/github-code |
6c2f9eb6b4b64f6b8b56fd889a1afafa30ac8766fa8e29ebdac2609e64803434 | 'use strict';
angular.module('contacts').controller('ContactsController', ['$scope', '$stateParams', '$location', 'Contacts',
function($scope, $stateParams, $location, Contacts) {
$scope.langs = [{'code': 'en', 'name': 'English'},{'code': 'es', 'name': 'Spanish'}];
$scope.lang_model = $scope.langs[0];
$scop... | JavaScript | public/modules/contacts/controllers/contacts.client.controller.js | rogelio-meza-t/fast_agenda | mit | 1,497 | 64 | codeparrot/github-code |
2b42f18eeaff793af487ac87280a5013e219c04d2d1a5f3a548037e07602317c | using System;
using System.Reflection;
using System.Text.RegularExpressions;
namespace DotJEM.Reflection.Descriptors.Descriptors.Loading
{
public static class DescriptorUriFactory
{
public static string CreateReference(this AssemblyName name)
{
return CreateReference(Assembly.Load(... | C# | DotJEM.Reflection.Descriptors/Descriptors/Loading/DescriptorUriFactory.cs | dotJEM/reflection-descriptors | mit | 10,370 | 289 | codeparrot/github-code |
682ba64c1f993c946b3a9a53df10155f2c9aecb7007bb31c9a848e5a06cbd465 | import PropTypes from 'prop-types';
import React, { Component } from 'react';
import {
ActivityIndicator,
View,
StyleSheet,
TextInput,
Platform,
Text as NativeText,
} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
import colors from '../config/colors';
import normalize from... | JavaScript | src/input/Search.js | kosiakMD/react-native-elements | mit | 5,256 | 219 | codeparrot/github-code |
21f6e0531ed564b943ab2698ee4a6ae0e5c1f5cf0e0a0fc42a826c9f6282f4fc | import * as utils from 'utils'
export default (
room,
adjudicatorsById,
teamsById
) => {
if (room.chair) {
const chairConflict = utils.conflict.adjudicatorToRoom(
room.chair,
room,
adjudicatorsById,
teamsById
)
if (chairConflict) return true
}
let panelConflict = false... | JavaScript | src/utils/conflict/room/index.js | westoncolemanl/tabbr-web | mit | 592 | 38 | codeparrot/github-code |
ed3fd00e20fbd55f287e8d39340466b655b5949ffdf9f27cc17990761d43843b | # -*- coding: utf-8 -*-
"""Module providing views for the site navigation root"""
from Acquisition import aq_inner
from Products.Five.browser import BrowserView
from Products.ZCatalog.interfaces import ICatalogBrain
from plone import api
from plone.app.contentlisting.interfaces import IContentListing
from plone.app.con... | Python | src/dpf.sitecontent/dpf/sitecontent/browser/frontpage.py | a25kk/dpf | mit | 3,589 | 109 | codeparrot/github-code |
c1fb7903350823d3644c52bba171af3b13176709e901166cc05937d663997c0d | #ifndef GUARD_H_
#define GUARD_H_
#include <functional>
#include <type_traits>
#include <mutex>
namespace Guard {
template<class T>
class Guard {
public:
Guard(T t) {
this->t_ = t;
}
~Guard() {}
Guard(const Guard& g) = delete;
Guard& operator=(Guard const&) = delete;
// Allows access to the guarded ... | C++ | src/guard.hh | nathantypanski/tendril | mit | 875 | 38 | codeparrot/github-code |
22d37eaed340adb273c90af921178f3c2bac516c8b4a44711f6f31e8aa64c709 | using System;
using UnityEngine;
namespace BriLib
{
/// <summary>
/// A form of singleton where we expect some prefab or game object to exist in world. If the game object does not yet exist,
/// we automatically make it. If the game object DOES exist on create, we bail out,
/// as we should not attempt to crea... | C# | BriLib/Scripts/Singleton/Singleton.cs | cybergen/bri-lib | mit | 1,831 | 71 | codeparrot/github-code |
49d9f74d3d3de40c27f108f35d4e9abf9fad38cfd0589018434dcf0a097a23df | import string
import csv
import os
from abaqusConstants import *
from part import *
from material import *
from section import *
from assembly import *
from load import *
from mesh import *
from visualization import *
def importEBSD(inpFileName):
while True:
fileName, file_extension = os.path.splitext... | Python | MTEX2abaqus/AbaqusImport.py | DorianDepriester/mtex2abaqus | mit | 2,602 | 77 | codeparrot/github-code |
59f4e3e0c468e9ca3794c0f47853d3c3a763a297b02e5c8488016135ad5b24d5 | #include "jsmgr.h"
namespace ion
{
void jsmgr::addScript(const std::string& fn, bool monitor)
{
EnterCriticalSection(&criticalSection);
contexts.push_back(new jsctx_wrapper(fn));
jsctx_wrapper* cur = contexts.back();
LeaveCriticalSection(&criticalSection);
}
void jsmgr::startWaitForRefresh()
{
CreateT... | C++ | src/js/jsmgr.cpp | scen/ionlib | mit | 1,937 | 79 | codeparrot/github-code |
319f47956555765cb780f2e4cfba504e43c0102c5c363a479002d542a9cc23e3 | /**************************************************************
* Copyright (c) Stéphane Bégaudeau
*
* This source code is licensed under the MIT license found in
* the LICENSE file in the root directory of this source tree.
***************************************************************/
import React from 'react'... | JavaScript | frontend/src/headers/UnauthenticatedHeader.js | svalyn/svalyn | mit | 1,108 | 36 | codeparrot/github-code |
9e7f74e048b7a9abf033d27ee6e9f187ae0fb69c2592e8b2d17ac32ef918e7ec | # Add it up!
# Complete each step below according to the challenge directions and
# include it in this file. Also make sure everything that isn't code
# is commented in the file.
# I worked on this challenge [by myself, with: ].
# 0. total Pseudocode
# make sure all pseudocode is commented out!
# Input: list of num... | Ruby | week-4/add-it-up/my_solution.rb | Maximillini/phase-0 | mit | 2,108 | 92 | codeparrot/github-code |
96dc65d916484445486444b94286c8f0b61bca9cb6e09bc22e54a34bc7b82ada | # Laser Generator Library
# Part of the Glitch_Heaven Project
# Copyright 2015-2016 Penaz <penazarea@altervista.org>
import pygame
from os.path import join as pjoin
def generate(size, vertical=False, image=None):
if image is None:
graphics = pygame.image.load(pjoin("resources", "sprites", "laser.png")).c... | Python | Game/libs/lasergen.py | Penaz91/Glitch_Heaven | mit | 1,000 | 32 | codeparrot/github-code |
521bc9acbc0c7630c246d7388d46500c89c688742ecb98df015510cbed6a1deb | using System.Diagnostics;
using System;
using System.Text;
using System.IO;
using System.Buffers;
namespace SsdeepNET
{
public sealed class Hasher
{
/// <summary>
/// Computes the fuzzy hash of the buffer.
/// </summary>
public static string HashBuffer(byte[] buffer) =>
... | C# | Source/SsdeepNET/Hasher.cs | kolos450/SsdeepNET | mit | 11,283 | 302 | codeparrot/github-code |
b6e92c750cac046d9c2bc3e10f09abc085f1f9807dfe86776d93370886db332e | class SessionsController < Clearance::SessionsController
skip_before_filter :authorize, only: [:create, :new, :destroy]
protect_from_forgery except: :create
def create
@user = authenticate(params)
sign_in(@user) do |status|
if status.success?
render :json =>{:status => :ok,:message => "Succ... | Ruby | app/controllers/sessions_controller.rb | nikhilvallishayee/idea_portal_web_app | mit | 673 | 33 | codeparrot/github-code |
d0670c16c0cf1f59a8d93c4411b7f7b34f4c6d3851b52a38649b8ecfd29bd811 | 'use strict';
var fs = require('fs'),
npm = require('npm'),
path = require('path'),
request = require('request'),
shell = require('shelljs');
function getPackage(name, callback) {
var options = {
uri: 'https://network.mean.io/api/v0.1/packages/' + name,
method: 'GET'
};
request(optio... | JavaScript | tools/scripts/postinstall.js | dantepsychedelico/erp-tiny-system | mit | 4,767 | 191 | codeparrot/github-code |
e37d08a8887e11bbe2bca0a4da6480423e8ec149a573a3a8b86a0f563a9204b4 | Pond.Game = function(game){
// define needed variables for Pond.Game
this._player = null;
this._PondGroup = null;
Pond._families = [];
};
Pond.Game.prototype = {
create: function(){
// start the physics engine
this.physics.startSystem(Phaser.Physics.ARCADE);
// set the global gravity
this.physics.arcade.g... | JavaScript | src/Game.js | hasanhameed07/frogworld | mit | 1,600 | 57 | codeparrot/github-code |
ac19dc8eed743313021b4373f983014b5748e48c51168b4f9d69d084f93496bf | <!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>CTEGaussExplosion | demofile</title>
<meta name="description" content="Documentation for demofile">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel... | HTML | docs/interfaces/_sendtabletypes_.ctegaussexplosion.html | saul/demofile | mit | 7,829 | 184 | codeparrot/github-code |
0ed6bf03c35d9eabc87cb1a781005da1c6daceaebad69234f9baf05dd79ed501 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Copyright (c) 2011-2014 The PeerCoin developers
// Copyright (c) 2011-2014 The NovaCoin developers
// Copyright (c) 2014-2016 The FriendshipCoin2 developers
// Copyright (c) 2016 The ArtBoomerangCoin developers
// Distribut... | C++ | src/qt/qrcodedialog.cpp | artboomerangwin/artboomerang | mit | 11,576 | 365 | codeparrot/github-code |
8f762d016a31765703b78712b63418c1189ec30b4970f3418dad1ca8afdcfbef | using System;
using System.Threading.Tasks;
using SecureUWPChannel.Interfaces;
using SecureUWPChannel.Serialization;
using SecureUWPChannel.Prooperties;
using SecureUWPClient.Configuration;
using SecureUWPClient.KeyManager;
using SecureUWPClient.Ciphers.RSA;
using System.Diagnostics;
using SecureUWPClient.Ciphers.AES;... | C# | SecureUWPClient/SecureUWPClient/Handshake/DHkeyExchange.cs | PanagiotisDrakatos/Light_IoT_CryptoDevice | mit | 6,482 | 169 | codeparrot/github-code |
0a0348d3ab1945ad3fa0462fe98cde401756e21b8fbb38109c13fcf12b68ac0b | import useStyles from 'isomorphic-style-loader/useStyles';
import React from 'react';
import { Button } from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faHome, faBook } from '@fortawesome/free-solid-svg-icons';
import Link from '../Link';
import s from './Header.css';
... | JavaScript | src/components/Header/Header.js | 0xcdc/rfb-client-app | mit | 837 | 34 | codeparrot/github-code |
5e636588941051482798a8b8dff03e088b521eb44ecf667e4a30f0086e001a72 | // o2client.c - part of performance benchmark
//
// see o2server.c for details
#include "o2.h"
#include "stdio.h"
#include "string.h"
#include "assert.h"
#include "o2base.h" // to get o2_sleep
int max_msg_count = 50000;
char **server_addresses;
int n_addrs = 20;
int msg_count = 0;
bool running = TRUE;
void cl... | C++ | test/o2udptcp.cpp | rbdannenberg/o2 | mit | 2,927 | 110 | codeparrot/github-code |
2b1416e0706d060dedb9b2854da487a17628e534fa1387652e308563fb9b4198 | using System;
using System.Collections.Generic;
using System.Web;
using System.Linq;
using System.Web.UI.WebControls;
using System.Web.UI;
using System.Text;
namespace Error_Handler_Control
{
public enum MessageType
{
Success,
Info,
Warning,
Error
}
public class NotificationMessage
{
public string Tex... | C# | BooksLibrary/BooksLibrary.Web/Controls/ErrorSuccessNotifier/ErrorSuccessNotifier.ascx.cs | BooksLibrary/BooksLibrary | mit | 5,288 | 196 | codeparrot/github-code |
98e76c037a9a3816af7dbf0e98b5bc8be0af1e2251fa0a9f95147e66ad3a780a | 'use strict';
// Contracts controller
angular.module('contracts').controller('ContractsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Contracts',
function($scope, $stateParams, $location, Authentication, Contracts) {
$scope.authentication = Authentication;
this.contracts= Contracts.query(... | JavaScript | public/modules/contracts/controllers/contracts.client.controller.js | giangnguyen00/Areacom | mit | 3,290 | 134 | codeparrot/github-code |
6acdae709204a853d1cdd5175ee55055b80e7fe2899a15d0187bdd8c76377c6b | namespace android.text.style
{
[global::MonoJavaBridge.JavaInterface(typeof(global::android.text.style.LeadingMarginSpan_LeadingMarginSpan2_))]
public interface LeadingMarginSpan_LeadingMarginSpan2 : LeadingMarginSpan, WrapTogetherSpan
{
int getLeadingMarginLineCount();
}
[global::MonoJavaBridge.JavaProxy(typeo... | C# | jni/MonoJavaBridge/android/generated/android/text/style/LeadingMarginSpan_LeadingMarginSpan2.cs | koush/androidmono | mit | 5,443 | 57 | codeparrot/github-code |
3f7f17d5fec869cfdbb28ddcac03967aa1ffa618c832ed09706d3a5fbeee073c | /**
*
* @authors leomYili
* @date 2016-04-14 09:24:44
* @version v1.0
*/
(function() {
var source1 = '<div class="page-header">' +
'<h1 class="text-center"><%=#name%><small><%=#small%><i class="glyphicon glyphicon-bookmark"></i></small></h1>' +
'</div>' +
'<p class="lead"><... | JavaScript | javaScript高级程序设计(感悟)/概括(html版本)/z_chapter/11_chapter.js | leomYili/my-learning-notes | mit | 3,508 | 86 | codeparrot/github-code |
9df28c189a09501252f6cf04bb56db17feba42d65dfb14a4c46273b77e63ba7c | function Tree(root){
this.root = root;
this.isAnimating = false;
this.traQueue = [];
}
Tree.prototype.traverseDF = function(callback){
(async function recurse(currentNode){
var children = Array.from(currentNode.childNodes).filter((item)=>item.nodeType===1);
for (var i = 0; i < children.length; i++) {
await ... | JavaScript | jstask/task8/task8.js | zhx111/ife2017 | mit | 3,173 | 130 | codeparrot/github-code |
69c20e8b104853cd302b7fb1b42f1d3da2e022bd75b2693dcb8d71408c0ee1ad | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | TypeScript | src/vs/base/node/ports.ts | eamodio/vscode | mit | 6,105 | 204 | codeparrot/github-code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.