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
39a67cea5402a0a83da01807062a17ff1641746f2c9c16c633672146a849d9ad
package com.dozenx.game.engine.item.parser; import cola.machine.game.myblocks.engine.Constants; import cola.machine.game.myblocks.engine.modes.GamingState; import cola.machine.game.myblocks.manager.TextureManager; import cola.machine.game.myblocks.model.base.BaseBlock; import com.dozenx.game.engine.command.EquipPartTy...
Java
src/main/java/com/dozenx/game/engine/item/parser/ItemEquipParser.java
ColaMachine/MyBlock
bsd-2-clause
3,780
104
codeparrot/github-code
6ef92a8db7caf81247ca2e88aecd5461b22ba0bc9f6e6c73c3d213987473b734
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #ifndef _NGX_ARRAY_H_INCLUDED_ #define _NGX_ARRAY_H_INCLUDED_ #include <ngx_config.h> #include <ngx_core.h> typedef struct { void *elts; //元素集合 ngx_uint_t nelts; //当前元素个数 size_t size; //元素大小 ngx_uint_t nalloc; //数组大...
C
src/core/ngx_array.h
zhao-mj/nginx-1.9.15
bsd-2-clause
1,105
54
codeparrot/github-code
8100e3c7166f589cd6173f48a192c7c3f9af352ce40439f9ad6cdbac06c573e1
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Media; namespace CoderOffice.Windows.Document { /// <summary> /// The text style class. /// All of the styles are represented by this class /// </summary> public class T...
C#
CoderOffice/CoderOffice.Core/Windows/Document/TextStyle.cs
snowdreamist/CoderOffice
bsd-2-clause
1,462
56
codeparrot/github-code
54ac52894c8c3d622a309fd1365232a8c9d869e2715b26521385739cb4cfe654
package com.omegaup.runner import com.omegaup._ import com.omegaup.data._ import com.omegaup.data.OmegaUpProtocol._ import java.io._ import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream import org.apache.commons.compress.archivers.tar.{TarArchiveOutputStream, TarArchiveEntry} class OmegaUpR...
Scala
grader/src/main/scala/com/omegaup/runner/RunnerProxy.scala
omegaup/backend
bsd-2-clause
3,175
113
codeparrot/github-code
c241bc8c8359bb1d0ac42c18b64d338f708201ff0cbd0b3d5757e6c2ba19cbea
// Copyright (C) 2010, Kyle Lemons <kyle@kylelemons.net>. All rights reserved. package log4go import ( "fmt" "io/ioutil" "os" "path/filepath" "sort" "strings" "time" ) // This log writer sends output to a file type FileLogWriter struct { rec chan *LogRecord rot chan bool // The opened file filename stri...
GO
filelog.go
dhx71/log4go
bsd-2-clause
7,587
291
codeparrot/github-code
a5129a5a4fefde1c4fbe87c42c8d0b06a1c4a3a2617a2d7f8a2ed9be445a68e0
/* global define */ define([ 'jquery', 'marionette' ], function($, Marionette) { var CountItem = Marionette.ItemView.extend({ tagName: 'tr', template: 'stats/count-item' }); var CountList = Marionette.CompositeView.extend({ template: 'stats/count-list', itemView:...
JavaScript
varify/static/cilantro/js/cilantro/ui/stats.js.src.js
chop-dbhi/varify
bsd-2-clause
2,255
92
codeparrot/github-code
5ea6960447f65d3cf640f149bc9b51838de696338b93f27dd0120638a9a86f6e
package setting import ( "github.com/insionng/makross" "github.com/insionng/makross/cache" "runtime" "time" "github.com/insionng/yougam/helper" "github.com/insionng/yougam/models" ) func BaseMiddler() makross.Handler { return func(self *makross.Context) error { tm := time.Now().UTC() self.Set("PageStartT...
GO
modules/setting/base.go
insionng/yougam
bsd-2-clause
3,641
125
codeparrot/github-code
0a5dad3ef6ebe313173d01c1df658159b76255dbc07d1f4999f018dc7b8d6971
var proj4 = require('proj4'); var transformCoordinates = function transformCoordinates(fromProjection, toProjection, coordinates) { proj4.defs([ [ 'EPSG:3006', '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs' ], [ 'EPSG:3007', '+proj=tmerc +lat_0=0 +lon_0...
JavaScript
lib/utils/transformcoordinates.js
origo-map/origo-server
bsd-2-clause
2,452
73
codeparrot/github-code
279adc329749717a6cecbf23323a590d980beb9e7bd5a3f8c41b94a60b8b6a0e
using UnityEngine; /// <summary> /// Base class for decorations /// </summary> public abstract class Decoration : IDecoration { private readonly WorldData m_WorldData; public Decoration(WorldData worldData) { m_WorldData = worldData; } public WorldData WorldData { ...
C#
Assets/Scripts/WorldDecorations/Decoration.cs
kldavis4/MinePackage
bsd-2-clause
4,426
130
codeparrot/github-code
3938c94375db24e2c284382c25c4159400ebeffe25b200e67119e0dc2d2cf21a
class Ballerina < Formula desc "Programming Language for Network Distributed Applications" homepage "https://ballerina.io" url "https://dist.ballerina.io/downloads/1.2.7/ballerina-1.2.7.zip" sha256 "4fefd5a38432b8b6abc68ea9f9211ade9b174f415586320ed7c5b227042c7e9c" bottle :unneeded depends_on java: "1.8" ...
Ruby
Formula/ballerina.rb
rwhogg/homebrew-core
bsd-2-clause
856
33
codeparrot/github-code
b7c269ae4ca77f7fdca8f982e3214f78c8feaa8756a74a55b5b2d49cfdec6f2e
/********************************************************************** * * StackWalker.h * * * History: * 2005-07-27 v1 - First public release on http://www.codeproject.com/ * (for additional changes see History in 'StackWalker.cpp'! * ******************************************************************...
C
cplusplus/RCF/include/RCF/test/StackWalker.h
ASMlover/study
bsd-2-clause
6,712
230
codeparrot/github-code
1102cccf01a21e860cc06d25e6b2b724f132299ae728b8a034d5b855da2e8a69
#ifndef _SDD_DD_TOP_HH_ #define _SDD_DD_TOP_HH_ #include <exception> #include <memory> // make_shared, shared_ptr #include <sstream> #include <string> #include <vector> #include "sdd/dd/definition_fwd.hh" namespace sdd { /*---------------------------------------------------------------------------------------------...
C++
sdd/dd/top.hh
ahamez/proto-dd
bsd-2-clause
3,697
162
codeparrot/github-code
e65082d4929ee853a0393e294b90160fb2453551c600d7601ac390b4a2a85f42
-- database version 3.1.73 (don't forget to update insert statement at the end of file) -- VOS - virtual organizations create table vos ( id integer not null, name varchar not null, -- full name of VO short_name varchar not null, -- commonly used name created_at timestamp default statement_timestamp() not null, ...
SQL
perun-db/postgres.sql
balcirakpeter/perun
bsd-2-clause
82,727
1,762
codeparrot/github-code
46a7925ee25503ab95d683f5ecd6a6c8e569686099747458207efac167670454
// Copyright (c) 2022, WNProject Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "WNContainers/inc/WNHashSet.h" #include "executable_test/inc/WNTestHarness.h" template <typename _Type> struct hash_set : ::testing::Test {}; ...
C++
Libraries/WNContainers/test/src/WNHashSetTests.cpp
WNProject/WNFramework
bsd-2-clause
4,247
193
codeparrot/github-code
1473ec3712f1ae72e2182671623f611a980c08105653dee2d1020c64dca5a3ac
import sys import itertools from functools import reduce from operator import iadd import numpy from PyQt4.QtGui import ( QFormLayout, QGraphicsRectItem, QGraphicsGridLayout, QFontMetrics, QPen, QIcon, QPixmap, QLinearGradient, QPainter, QColor, QBrush, QTransform, QGraphicsWidget, QApplication ) from Py...
Python
Orange/widgets/unsupervised/owdistancemap.py
kwikadi/orange3
bsd-2-clause
26,035
760
codeparrot/github-code
76a68f423e159e8aea7baaf8dab5430f2ff08a88b63e444ad0413c322dd83454
import React from "react" import ServerError from "./ServerError" import NotFoundError from "./NotFoundError" import OtherError from "./OtherError" import { ApolloError } from "@apollo/client" type Props = { /** GraphQL error object */ error: ApolloError } /** * Displays any errors found when issuing a GraphQL q...
TypeScript
components/errors/GraphQLErrorPage.tsx
dictyBase/genomepage
bsd-2-clause
1,151
52
codeparrot/github-code
c13c752ac8ba7a5eabd0aaaaf95f795ee8d8008233b7d92c7301a3ba2fa65de7
local function getenv(k, p) if string63(k) then local __i = edge(environment) while __i >= 0 do local __b = environment[__i + 1][k] if is63(__b) then local __e21 = nil if p then __e21 = __b[p] else __e21 = __b end return __e21 else ...
Lua
bin/compiler.lua
sctb/lumen
bsd-2-clause
35,215
1,305
codeparrot/github-code
5cf3184e98ece752963d6d7cdd0c242ec0340fce7c91165d7147114162c5b482
#include "pthread.h" #include "util/memory.h" struct thread_info { void *(*entry)(void *); void *param; }; static DWORD WINAPI entry_point(void *parameter) { struct thread_info *ti = (struct thread_info *) parameter; ti->entry(ti->param); free(ti); return 0; } int pthread_attr_init(pthread_attr_t *attr) { /* ...
C
win32/pthread.c
Adam-/bedrock
bsd-2-clause
2,020
113
codeparrot/github-code
de13bac2ee6d398f38772865ba96949b2bab8fad17d9edba5646c8150e03a896
#ifndef __MONO_NATIVE_MSCORLIB_SYSTEM_REFLECTION_TARGETEXCEPTION_H #define __MONO_NATIVE_MSCORLIB_SYSTEM_REFLECTION_TARGETEXCEPTION_H #include <mscorlib/System/mscorlib_System_ApplicationException.h> #include <mscorlib/System/mscorlib_System_String.h> #include <mscorlib/System/mscorlib_System_Exception.h> #include <ms...
C
MonoNative/mscorlib/System/Reflection/mscorlib_System_Reflection_TargetException.h
brunolauze/MonoNative
bsd-2-clause
5,874
176
codeparrot/github-code
049671ff93fbe627eb6b837afc7990cd7a93f598388173e7dc88c26ebbbb5529
/* * This source file is part of praetor, a free and open-source IRC bot, * designed to be robust, portable, and easily extensible. * * Copyright (c) 2015-2018 David Zero * All rights reserved. * * The following code is licensed for use, modification, and redistribution * according to the terms of the Revised BSD Licen...
C
src/ircmsg.c
Zer0-One/praetor
bsd-2-clause
17,971
631
codeparrot/github-code
22fbbc058c9305d35303668be7e0621138c7a5f6257ce98f84ab35151cf6a619
// RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-version=45 -fopenmp %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-version=50 -fopenmp %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp45 -fopenmp-version=45 -fopenmp-simd %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,omp50 -f...
C++
clang/test/OpenMP/master_taskloop_simd_lastprivate_messages.cpp
epiqc/ScaffCC
bsd-2-clause
11,739
306
codeparrot/github-code
37d41ee778e047a67c51b7358fdc07c5e39cde5ee529dbb28b7e3ae6760b1ac8
# frozen_string_literal: true require 'json' require 'faraday' require 'addressable' require_relative 'response' require_relative '../defs/version' require_relative '../support/mixins' require_relative '../stdlib/time' module Wavefront # # Constructs and makes API calls to Wavefront. # class ApiCaller inc...
Ruby
lib/wavefront-sdk/core/api_caller.rb
snltd/wavefront-sdk
bsd-2-clause
8,830
289
codeparrot/github-code
dda5eb8704ca1fce10d0cb6ab9bf41bd2c0cbd21260311d10c90ea9135634c9c
<?php require_once __DIR__ . '/vendor/autoload.php'; use Goutte\Client; $BASE_URL = 'https://vertretungsplan.leiningergymnasium.de'; $INDEX_URL = $BASE_URL . '/index'; $TOMORROW_URL = $BASE_URL . '/morgen'; date_default_timezone_set('Europe/Berlin'); $URL = $INDEX_URL; if (isset($_GET['type'])) { if ($_GET['type...
PHP
index.php
vertretungen/api
bsd-2-clause
2,700
104
codeparrot/github-code
c8b8adb13b8f3af70ec54bd718065a9896214d0b40f333aebfcbff1e3258cd97
/* * Copyright (C) 2008 Apple 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: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions a...
C
Storage/StorageThread.h
applesrc/WebKit
bsd-2-clause
2,180
67
codeparrot/github-code
4af0de17d5d0ae748bec6f87b72343ef06e69aa7d8e722688cf7fd6ae77644e0
""" Commands for X-ray Diffraction Note that an XRD camera must be installed! """ def setup_epics_shutter(prefix='13MARCCD4:'): """ Setup Epics shutter for CCD camera open /close pv = 13IDA:m70.VAL (SSA H WID) open val = 0.080, close val = -0.020 """ caput(prefix+'cam1:ShutterOpenEPICS....
Python
doc/macros/xrd.py
newville/microprobe_docs
bsd-2-clause
7,656
269
codeparrot/github-code
a69f4b41168a75f1cc78ff4647fbc302aea3e725223c0d2f64506eeab86ffbf6
/* * Copyright (C) Igor Sysoev * Copyright (C) Nginx, Inc. */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_event.h> #define DEFAULT_CONNECTIONS 512 extern ngx_module_t ngx_kqueue_module; extern ngx_module_t ngx_eventport_module; extern ngx_module_t ngx_devpoll_module; extern ngx_module_t ngx_e...
C
src/event/ngx_event.c
steveh/nginx-ppa
bsd-2-clause
31,285
1,277
codeparrot/github-code
ea0fd7da19b6604976373014d7514c1085ae8a8fa122dfa871794af5d06e901f
package demo.inpro.system.pento.nlu; import inpro.incremental.processor.RMRSComposer.Resolver; import inpro.irmrsc.rmrs.Formula; import inpro.irmrsc.rmrs.SimpleAssertion; import inpro.irmrsc.rmrs.SimpleAssertion.Type; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java....
Java
src/demo/inpro/system/pento/nlu/PentoRMRSResolver.java
ONatalia/Masterarbeit
bsd-2-clause
12,472
352
codeparrot/github-code
d84b747757fc457d635f041d59333dddaf602f6c5e300b439c736513142bd4af
package org.fxmisc.richtext.demo; import java.util.Collection; import java.util.Collections; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.fxmisc.flowless.VirtualizedScrollPane; import org.fxmisc.richtext.CodeArea; import org.fxmisc.richtext.LineNumberFactory; import org.fxmisc.richtext.m...
Java
richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/XMLEditor.java
cemartins/RichTextFX
bsd-2-clause
5,270
136
codeparrot/github-code
db05f37bfa2352a7233c34dd01c59548a3ae334b61bc1fbbe98657bbbc571ee1
// Copyright (c) 2012, Susumu Yata // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions...
C++
test/header-test.cc
s-yata/madoka
bsd-2-clause
2,453
60
codeparrot/github-code
4f4d7d775a5e3e3ced2696266364293948a710becdd9419f24c6b431bdd14ad0
package storage import ( "fmt" "io" "path" "github.com/goamz/goamz/aws" "github.com/goamz/goamz/s3" ) /* Repository data is stored in Amazon S3. Valid Params for KST_S3: * "awsregion" The code for the AWS Region, for example "us-east-1" * "bucket" The name of the AWS bucket * "prefix" An option...
GO
storage/s3.go
mredivo/pulldeploy
bsd-2-clause
2,946
120
codeparrot/github-code
15096764a008004ceb94bb5e17fd6a4ecd3b80ad54b11b164999d00362d89b1e
/*- * #%L * High-level BoneJ2 commands. * %% * Copyright (C) 2015 - 2020 Michael Doube, BoneJ developers * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the...
Java
Modern/wrapperPlugins/src/main/java/org/bonej/wrapperPlugins/wrapperUtils/ResultUtils.java
bonej-org/BoneJ2
bsd-2-clause
6,865
207
codeparrot/github-code
ba125e974e8879c82097c6526bf344a425091ee0a517a4e51c46cbbf297bbcfc
/*----------------------------------------------------------------------------*/ /* Copyright (c) FIRST 2011. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ /*---------------------...
C++
third_party/allwpilib_2016/wpilibc/shared/src/Commands/WaitUntilCommand.cpp
FRC1296/CheezyDriver2016
bsd-2-clause
1,164
39
codeparrot/github-code
71bf0a7ea0775101f8fdd4b77f7551dc11d2d79e722f9e25caea9d7e2dd15807
using System; using TTengine.Core; using TTengine.Util; using Microsoft.Xna.Framework; using Game1; using Game1.Behaviors; namespace Game1.Actors { /** * companion of the hero that helps him */ public class Companion: ThingComp { public ChaseBehavior ChasingRedGuard, ChasingHero; ...
C#
Game1/Game1/Actors/Companion.cs
IndiegameGarden/Quest
bsd-2-clause
1,987
67
codeparrot/github-code
16a15698ba6a60913c5e3bbb96c58439065827ce4b39c36ede010235a62d90ae
/* * RudePhysics.cpp * golf * * Created by Robert Rose on 9/8/08. * Copyright 2008 Bork 3D LLC. All rights reserved. * */ #include "Rude.h" #include "RudePhysics.h" #include "RudePhysicsObject.h" #include "RudeDebug.h" inline btScalar calculateCombinedFriction(float friction0,float friction1) { btScalar f...
C++
code/preview/Classes/RudePhysics.cpp
moof2k/golf
bsd-2-clause
4,146
179
codeparrot/github-code
b6b9abe636e8b014497c7958b54586528ee252c473975cfe789b3dd6a089e689
#ifndef _MAINFRAME_H_ #define _MAINFRAME_H_ /* ---------------------------------------------------------------------------- * Copyright (C) 2009-2011 by egnite GmbH * Copyright (C) 2005-2006 by egnite Software GmbH * * This program is free software; you can redistribute it and/or modify it * under the terms of th...
C
nut/tools/nutdisc/src/mainframe.h
Astralix/ethernut32
bsd-2-clause
2,305
91
codeparrot/github-code
bcef1cacd1c2b73881b7fd8d5b48905aa830e053337ec7d523e4ed4afeb762c5
package com.jme3.glhelper; import java.nio.ByteBuffer; import java.nio.FloatBuffer; import com.jme3.math.ColorRGBA; import com.jme3.shader.Shader; /** * OpenGL helper that does not rely on a specific binding. Its main purpose is to allow * to move the binding-agnostic OpenGL logic from the source code of the both...
Java
engine/src/jogl2/com/jme3/glhelper/Helper.java
chototsu/MikuMikuStudio
bsd-2-clause
1,955
86
codeparrot/github-code
0a1b6f01cd0230c99f351fbedfa34fe4399f3253932e8c82aaac8b14bfdeb507
/* * Copyright (c) 2016, JInterval Project. * 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 o...
Java
jinterval-expression/src/main/java/net/java/jinterval/expression/example/FireRisk.java
jinterval/jinterval
bsd-2-clause
12,448
357
codeparrot/github-code
1d1fa1d8db8a4eb3a82dcb21503bf76c1311811ba5bb2b02b2ba5383768764ac
// This file was procedurally generated from the following sources: // - src/dstr-binding/ary-ptrn-elem-obj-val-undef.case // - src/dstr-binding/error/cls-expr-meth.template /*--- description: Nested object destructuring with a value of `undefined` (class expression method) esid: sec-class-definitions-runtime-semantics...
JavaScript
Jint.Tests.Test262/test/language/expressions/class/dstr-meth-ary-ptrn-elem-obj-val-undef.js
sebastienros/jint
bsd-2-clause
2,782
90
codeparrot/github-code
1170ff77d1238efd725e959a19dc736e7d0aab8f8c34de303770654933068728
"""Widget for creating classes from non-numeric attribute by substrings""" import re from itertools import count import numpy as np from AnyQt.QtWidgets import QGridLayout, QLabel, QLineEdit, QSizePolicy from AnyQt.QtCore import QSize, Qt from Orange.data import StringVariable, DiscreteVariable, Domain from Orange.d...
Python
Orange/widgets/data/owcreateclass.py
cheral/orange3
bsd-2-clause
20,685
523
codeparrot/github-code
eda5a9300ad18d40154dc26bbfdab555e61fc732bb185dcc33cd764516e261b4
<?php class Owlcarousel_Kwc_Carousel_Component extends Kwc_Abstract_List_Component { public static function getSettings() { $ret = parent::getSettings(); $ret['componentName'] = trlKwfStatic('List Carousel'); $ret['componentCategory'] = 'media'; $ret['generators']['child']['compo...
PHP
Owlcarousel/Kwc/Carousel/Component.php
koala-framework/kwf-owlcarousel
bsd-2-clause
1,236
42
codeparrot/github-code
cd1f9d1fbf25af94bb237391a11f0a5e3156e005beb64d8db9bbead4f64a3711
""" This is a subfile for IsyClass.py These funtions are accessable via the Isy class opj """ __author__ = 'Peter Shipley <peter.shipley@gmail.com>' __copyright__ = "Copyright (C) 2013 Peter Shipley" __license__ = "BSD" import time ## ## Climate funtions ## def load_clim(self): """ Load climate data from ISY ...
Python
ISY/_isyclimate.py
fxstein/ISYlib-python
bsd-2-clause
1,533
82
codeparrot/github-code
95e417da2ee1bb58755260f07b0473e8d3e20653af79efd3a2626dae00b10e5c
/* * Copyright 2010-2016, Tarantool AUTHORS, please see AUTHORS file. * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * 1. Redistributions of source code must retain the above * copyright notice, this lis...
C
src/say.c
rtsisyk/tarantool
bsd-2-clause
12,526
527
codeparrot/github-code
b6c7408e68925d41ce1374d59ed1ba38e01d200c2ad60c16f235275533e377cb
module GeneralizedMaps using Compat using Docile export OrientedDart, Dart, id, ids, GeneralizedMap, sew, collectcelldarts, collectkcells, countkcells, Orbit, OrbitBut type OrientedDart{T, S} index::T # involutions or references to other darts in the GeneralizedMap phi::Vector{Nullable{OrientedDart{T,S}}}...
Julia
src/GeneralizedMaps.jl
goldnd/GeneralizedMaps
bsd-2-clause
13,264
474
codeparrot/github-code
f8ee2063353fe68c13633b6e8a836c7b75a617a71b93e87a2498ef06dce06c34
--- layout: post title: "Refactoring Rails" date: 2014-03-24 17:40:41 comments: true --- Recently at the Flatiron School we were tasked with creating a simplified eBay clone using our newfound knowledge of Ruby on Rails. My team and I diligently worked through the test spec provided to create a fully functioning auc...
Markdown
_posts/2014-03-24-refactoring-rails.markdown
danielspector/danielspector.github.io
bsd-2-clause
6,912
133
codeparrot/github-code
555dbe2c2b286b9786e826bd359c04ed352d8c52fc8b07b9efdf087a882174fb
class Simgrid < Formula desc "Studies behavior of large-scale distributed systems" homepage "http://simgrid.gforge.inria.fr" url "https://gforge.inria.fr/frs/download.php/file/37148/SimGrid-3.17.tar.gz" sha256 "f5e44f41983e83f65261598ab0de1909d3a8a3feb77f28e37d38f04631dbb908" bottle do sha256 "25156b23d0...
Ruby
Formula/simgrid.rb
bfontaine/homebrew-core
bsd-2-clause
1,280
44
codeparrot/github-code
3ddfaea00f990b3d3a1fce21859417d43314b2a6942b20e006217c90edd779fb
/** @file fragmentShader.h @author Andrew Krause - contact@alienbug.net @date 07.12.12 Wrapper for GLSL fragment shader */ #ifndef VISAGE_FRAGMENT_SHADER_H #define VISAGE_FRAGMENT_SHADER_H #include <glee.h> #include <SFML/System.hpp> #include <SFML/Window.hpp> #include "resourceManager.h" namesp...
C
include/fragmentShader.h
scgrn/Visage
bsd-2-clause
618
38
codeparrot/github-code
763eccde4b4a57db3b4d13329743eed0bf750ae73e97ce9c5d0f2a09c22332e9
from __future__ import print_function import re from streamlink.plugin import Plugin from streamlink.plugin.api import http, useragents from streamlink.stream import HDSStream from streamlink.stream import HLSStream class TF1(Plugin): url_re = re.compile(r"https?://(?:www\.)?(?:tf1\.fr/(\w+)/direct|(lci).fr/dire...
Python
src/streamlink/plugins/tf1.py
mmetak/streamlink
bsd-2-clause
2,485
65
codeparrot/github-code
02a0bfec8e7028a8714b52efe8dd6bb046fb52bfc3969fd27818ae6ef0860f18
extern crate redis; use std::sync::{Arc, Mutex}; use std::thread; use backend::{RoundRobinBackend, GetBackend}; pub fn create_sync_thread(backend: Arc<Mutex<RoundRobinBackend>>, redis_url: String) { thread::spawn(move || { let pubsub = subscribe_to_redis(&redis_url).unwrap(); loop { l...
Rust
src/sync.rs
NicolasLM/nucleon
bsd-2-clause
1,678
53
codeparrot/github-code
a126d3679e4d0f7ec9a437c7e964aee8462c2ba7d18f8d5b0d7d99ba9102a9b0
class Heartbeat < Formula desc "Lightweight Shipper for Uptime Monitoring" homepage "https://www.elastic.co/beats/heartbeat" url "https://github.com/elastic/beats.git", tag: "v8.1.0", revision: "da4d9c00179e062b6d88c9dbe07d89b3d195d9d0" license "Apache-2.0" head "https://github.com/elastic/be...
Ruby
Formula/heartbeat.rb
Homebrew/homebrew-core
bsd-2-clause
3,199
96
codeparrot/github-code
d05970acfc53c195aefe3bf3b163674e9283fa0b69aca1599f1a2eaaa3745329
<!DOCTYPE html> <head> <title>CASH Music - Zen CSS</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="icon" type="image/x-icon" href="https://91ee07a61ca29df61569-b2dba7dce06e8a9c0977ad3a8844e9c8.ssl.cf2.rackcdn.com/v3/ui/default/assets/images/favicon.ico" /> <link href='//fon...
HTML
zen/index.html
cashmusic/labs
bsd-2-clause
6,508
229
codeparrot/github-code
68706affc067fa5e5dd481b6fdf9569d4f26db88b436513e52d84afc9c628c81
// Copyright (c) 2019 ASMlover. 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 ofconditions and...
C++
cplusplus/lvmpp-learn/lvmpp16/object.cc
ASMlover/study
bsd-2-clause
5,997
236
codeparrot/github-code
fbc152c10c1f3d42d222eb5604df12e56e8aad1aa37936092bab41188fb97968
#include <string> #include <vector> #include <TH/TH.h> #include "caffe/caffe.hpp" extern "C" { void init(void* handle[1], const char* param_file, const char* model_file, const char* phase); void do_forward(void* handle[1], THFloatTensor* bottom, THFloatTensor* output); void do_backward(void* handle[1], THFloatTensor...
C++
caffe.cpp
szagoruyko/torch-caffe-binding
bsd-2-clause
5,255
158
codeparrot/github-code
6d756a3150d5fe5fd4d8253a480401516a216aea71629457f0ef085a2c4a55c2
package ChanteySongs.Data; import java.io.*; import java.util.*; import java.text.*; import com.thoughtworks.xstream.*; public class DataUtil { public static final DateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); public static String getData(Scanner in, PrintWriter out, String name) { ...
Java
source/java/ChanteySongs/Data/DataUtil.java
wingerjc/ChanteySongs
bsd-2-clause
2,472
95
codeparrot/github-code
9d33296ce526beb2b5b506b4e4cef061f6245b01722060f276536506e653b2f2
This module allows for simulation and analysis of 2 choice accumulated category experimental designs. # Preliminaries We assume there are two categories, A and B and that there are some (unknown and irrelevant, from the perspective of this model) number of exemplars for each category. We further assume that the exem...
Markdown
README.markdown
parenthetical-e/accumulate
bsd-2-clause
6,840
197
codeparrot/github-code
b288be1dec31d9faa883bb15fbade390ecb4fe3014ea4e6314a3eb64de3f34e5
// -*- mode: C++ -*- // // Copyright (c) 2007, 2008, 2009, 2010, 2011 The University of Utah // All rights reserved. // // This file is part of `csmith', a random generator of C programs. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following ...
C++
src/CVQualifiers.cpp
ChrisLidbury/CLSmith
bsd-2-clause
19,286
734
codeparrot/github-code
f2e8eb45d75f58a4f1949759c8ac9c2bc400e5d57b9b452f78a7f4ce59ba9e80
/*****************************************************************************/ /* */ /* RobotIRC 0.1.2 */ /* Copyright (c) 2013-2017, Frederic Cambus */ ...
JavaScript
lib/robotirc.js
fcambus/robotirc
bsd-2-clause
6,242
170
codeparrot/github-code
3d8bcddb650289a5440cd55fb0c9b68703d24904e41b568bf2f66742a2fcec51
/* * This file is released under terms of BSD license * See LICENSE file for more information * @author Mikhail Zhigun */ package clawfc.depscan; import java.io.InputStream; import javax.xml.XMLConstants; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.Schema; import javax.xml.validati...
Java
driver/src/clawfc/depscan/FortranFileProgramUnitInfoDeserializer.java
clementval/claw-compiler
bsd-2-clause
1,597
47
codeparrot/github-code
cae398ff8d22adbcd1f738ab46e82d55bc39df28f5bbd8f992f6c4ab7a56e401
<?php class Kwf_Assets_Provider_Components extends Kwf_Assets_Provider_Abstract { private $_rootComponentClass; private $_componentFiles = array(); public function __construct($rootComponentClass) { $this->_rootComponentClass = $rootComponentClass; } private function _createDependencyF...
PHP
Kwf/Assets/Provider/Components.php
nsams/koala-framework
bsd-2-clause
6,173
152
codeparrot/github-code
3f386932dc1ad97cfcf6bceebdc5a08bbbc9924a72727e7e754f95be97b1b01b
# -*- coding: utf-8 -*- import os import requests import time import math import datetime import random import envoy import jsonfield import logging import urllib from collections import defaultdict from magic_repr import make_repr from hashlib import md5, sha1 from django.db import models from django.db.models import...
Python
allmychanges/models.py
AllMyChanges/allmychanges.com
bsd-2-clause
55,439
1,435
codeparrot/github-code
48210fc9cdaddb115bf24d17d860550a011074671b9a52cd3a0bd70d46cacb12
'use strict' class ScheduleEvents { constructor (aws) { // Authenticated `aws` object in `lib/main.js` this.lambda = new aws.Lambda({ apiVersion: '2015-03-31' }) this.cloudwatchevents = new aws.CloudWatchEvents({ apiVersion: '2015-10-07' }) } _ruleDescription (params) { if ('...
JavaScript
lib/schedule_events.js
teebu/node-lambda
bsd-2-clause
2,692
103
codeparrot/github-code
5098b69a4d1caacbdb9766ca4bebd0cc2e4502c54dda0fc4ad83c8b6e841b84f
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com using System; using System.CodeDom; using System.CodeDom.Compiler; using System.Diagnostics; using System.Globalization; using System.IO; using System.Text; u...
C#
src/ITCC.Logging.Reader.Core/Utils/EntryTokenizer.cs
OPEXGroup/ITCC.Library
bsd-2-clause
6,970
214
codeparrot/github-code
de2da4018380c48172a34a1c3f8017d8eb6ff01f098b3d11d2cdefc076c65b93
#pragma once #include "Iop_Module.h" #include "../ISO9660/ISO9660.h" #include "zip/ZipArchiveWriter.h" #include "zip/ZipArchiveReader.h" class CIopBios; namespace Iop { class CCdvdman : public CModule { public: enum CDVD_STATUS { CDVD_STATUS_STOPPED = 0, CDVD_STATUS_SPINNING = 2, C...
C
Source/iop/Iop_Cdvdman.h
AbandonedCart/Play-
bsd-2-clause
1,653
65
codeparrot/github-code
5757d9080b8e5c268c3ac6db93240bde626280723563242cf3d46bc57ffd73bb
package org.oors; import java.util.Date; import javax.persistence.TypedQuery; import javax.swing.text.html.HTMLDocument; public abstract class Base extends OorsEventGenerator { private static final String NULL_ATTRIBUTE = "Null attribute parameter"; private static final String INVALID_VALUE_TYPE = "Attr...
Java
oors/src/org/oors/Base.java
belteshazzar/oors
bsd-2-clause
12,619
320
codeparrot/github-code
894d55d10b8c1c8e064fc7167864d1fe23c26cc66ac573d02ed42252cb1543ab
# Copyright (c) 2012-2021, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from .aws import Action as BaseAction from .aws import BaseARN service_name = "AWS Shield" prefix = "shield" class Action(BaseAction): def __init__(self, action: str = None) -> None: super(...
Python
awacs/shield.py
cloudtools/awacs
bsd-2-clause
2,682
67
codeparrot/github-code
69eeeb387d4b7235fb54487237515e334c0e047e647409da69e6b2bac9838c59
package cn.xz.study.design.pattern.singleton; public class LazySingleton { /** * volatile 确保线程改变了变量的值时 会立刻同步改变量的值 以保证改变量的值是最新的 */ private volatile static LazySingleton singleton = null; private LazySingleton(){ } public static LazySingleton getInstance(){ if(singleton == null){ synchronized (LazySi...
Java
study-design-pattern/src/main/java/cn/xz/study/design/pattern/singleton/LazySingleton.java
xyz327/studyResource
bsd-2-clause
533
31
codeparrot/github-code
5760081cd80145d26555fafe9f90800a4572e13a71247fd8e160f3e8af19919a
/* * Copyright (c) 2010, Joshua Lackey * 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 lis...
C++
src/bladeRF_source.cc
Nuand/kalibrate-bladeRF
bsd-2-clause
7,808
345
codeparrot/github-code
2678f4286d9c6f66791401889991e76e0ac5327215b1f299de1666d2230fc172
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UserVoice.Voice { /// <summary> /// ユーザークラスです。184とそれ以外を区別するために使います。 /// </summary> [Serializable()] public class UserInfo : IEquatable<UserInfo>, IComparable<UserInfo>, IComparable { ...
C#
UserVoice/Voice/UserInfo.cs
ebifrier/UserVoice
bsd-2-clause
2,896
130
codeparrot/github-code
f3d06f227d6e93a41e49d9c3d15a1a511c882b06e2ed45f2bb5cb02c94d1672a
/* This file is part of VROOM. Copyright (c) 2015-2021, Julien Coupey. All rights reserved (see LICENSE). */ #include "problems/vrptw/operators/intra_mixed_exchange.h" namespace vroom { namespace vrptw { IntraMixedExchange::IntraMixedExchange(const Input& input, const utils:...
C++
src/problems/vrptw/operators/intra_mixed_exchange.cpp
jcoupey/vroom
bsd-2-clause
2,717
87
codeparrot/github-code
45d3159302ab828ac29a9f685a48f710a6c49dafce7b7da42c6a87f04c1c68f9
<?php namespace Prajna\Components; use \Prajna\Traits\XmlRpcHelper; class Secret { use XmlRpcHelper; protected $session_id; public function __construct($client){ $this->client = $client; $this->session_id = $this->client->session_id; } public function get_all(){ return $this->doCall('secret.get_all',ar...
PHP
src/Prajna/Components/Secret.php
cameronjacobson/Prajna
bsd-2-clause
2,237
112
codeparrot/github-code
e022603be446c21628210bf3bc4a49fc944bea60b886b517835c09f0bf43fbc2
package main import ( "fmt" "log" "os" "reflect" "github.com/davidscholberg/go-i3barjson" "github.com/davidscholberg/goblocks/lib/modules" ) func main() { errLogger := log.New(os.Stderr, "error: ", 0) gb, err := modules.NewGoblocks() if err != nil { errLogger.Fatalln(err) } h := i3barjson.Header{Versi...
GO
goblocks.go
davidscholberg/goblocks
bsd-2-clause
1,443
73
codeparrot/github-code
02ce8576f132f5575f44a7f0e722d588f9e50f0963f90be600e93cb637f41bba
var middleware = require('../../middleware') ; function handler (req, res, next) { var profile = { }; res.send(200, res.profile); next( ); return; } var endpoint = { path: '/users/:user/create' , method: 'get' , handler: handler }; module.exports = function configure (opts, server) { function mount ...
JavaScript
lib/handlers/users/create.js
bewest/restify-git-json
bsd-2-clause
976
39
codeparrot/github-code
9186ce2b3f05fbae190b43d16e3152c4ab16ea4491ca498c58ad814e05abb6f4
package org.javafunk.matchbox.implementations; import org.hamcrest.Description; import org.hamcrest.StringDescription; import org.junit.Test; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.is; import static org.javafunk.matchbox.Matchers.successfullyMatches; import static org...
Java
src/test/java/org/javafunk/matchbox/implementations/BetweenMatcherTest.java
javafunk/matchbox
bsd-2-clause
2,115
62
codeparrot/github-code
41a35fd68e9cf2d47555e64c01b2768fffac8c018806f3e2e5f9ab307b246c82
/*********************************************************************** Copyright (c) 2014, Carnegie Mellon University All rights reserved. Authors: Jennifer King <jeking04@gmail.com> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following condition...
C++
src/TSRRobot.cpp
personalrobotics/or_ompl
bsd-2-clause
12,546
316
codeparrot/github-code
c8647120bde895e7543b9321dd0d49fd17e3d365c0e27bcc321a310ddf9b12d8
#!/usr/bin/env python """ LeBLEU - Letter-edit / Levenshtein BLEU """ import logging #__all__ = [] __version__ = '0.0.1' __author__ = 'Stig-Arne Gronroos' __author_email__ = "stig-arne.gronroos@aalto.fi" _logger = logging.getLogger(__name__) def get_version(): return __version__ # The public api imports nee...
Python
lebleu/__init__.py
Waino/LeBLEU
bsd-2-clause
670
37
codeparrot/github-code
2454e4698375b059dc25e710323f892679bba9561dcf253a24d6b9f6fc6752e0
<? # $Id: new-user.php,v 1.1.2.7 2002-05-18 08:25:09 dan Exp $ # # Copyright (c) 1998-2002 DVL Software Limited $origin = $_GET["origin"]; ?> <form action="<?php echo $_SERVER["PHP_SELF"] . "?origin=" . $origin ?>" method="POST" NAME=f> <TABLE width="*" border="0" cellpadding="1"> <TR> <TD ...
PHP
include/tags/FreshPorts2_Launch/new-user.php
lattera/freshports
bsd-2-clause
3,014
59
codeparrot/github-code
b32e8b4baa42fca724daeba4d596ecfd12eb865cb93e8684055f33ae155bdfd1
<? # $Id: confirmation.php,v 1.1.2.4 2002-05-22 04:30:21 dan Exp $ # # Copyright (c) 1998-2002 DVL Software Limited require($_SERVER['DOCUMENT_ROOT'] . "/include/common.php"); require($_SERVER['DOCUMENT_ROOT'] . "/include/freshports.php"); require($_SERVER['DOCUMENT_ROOT'] . "/include/databaselogin.php"...
PHP
www/tags/FreshPorts2_Launch/confirmation.php
lattera/freshports
bsd-2-clause
2,095
93
codeparrot/github-code
45723042dd5bd53c68db0ce80dac6db5114f0323133482e0b05fe3f053a07c52
<?php namespace hlin\tools; /** * @copyright (c) 2014, freia Team * @license BSD-2 <http://freialib.github.io/license.txt> * @package freia Library */ class HoneypotCommand implements \hlin\archetype\Command { use \hlin\CommandTrait; /** * @return int */ function main(array $args = null) { $cli = $this...
PHP
src/Command/Honeypot.php
freialib/hlin.tools
bsd-2-clause
3,593
134
codeparrot/github-code
7776d43e45c3102aead4b7ced8a45ab2ad4a4d795563ae98e34de2967525df07
package stallone.mc.pcca; import static stallone.api.API.*; import stallone.api.IAlgorithm; import stallone.api.algebra.Algebra; import stallone.api.algebra.IEigenvalueDecomposition; import stallone.api.cluster.IClustering; import stallone.api.doubles.Doubles; import stallone.api.doubles.IDoubleArray; import stallone....
Java
src/stallone/mc/pcca/PCCA.java
markovmodel/stallone
bsd-2-clause
11,313
302
codeparrot/github-code
6f02f9667a0cc8d2ba7ff93da888fb40b13b471a1c5c61eadd4ce505bf4c55db
using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Composition; using System.Linq; using System.Threading; using System.Threading.Tasks; using FlubuCore.Analyzers; using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CodeActions; using Microsoft.CodeAnalysis.CodeFixes...
C#
src/FlubuCore.Analyzers/FlubuCloreAnalyzerCodeFixProvider.cs
flubu-core/flubu.core
bsd-2-clause
3,365
76
codeparrot/github-code
1d3431bcf21d217ca884e0552990590f431c70ca63ef4b7d01c8ca61d5db1815
/* * Copyright (c) 2010-2011 Juli Mallett. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of cond...
C
io/pipe/pipe_pair_simple.h
diegows/wanproxy
bsd-2-clause
2,520
75
codeparrot/github-code
c9b41f656142225427e2e458d3bc790e275ea7ec97c5864f7cf5a31a42ddac8d
import cStringIO import zlib import wx #---------------------------------------------------------------------- def getMailData(): return zlib.decompress( "x\xda\x01M\x01\xb2\xfe\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00 \x00\ \x00\x00 \x08\x06\x00\x00\x00szz\xf4\x00\x00\x00\x04sBIT\x08\x08\x08\x08|\...
Python
icon.py
doudz/checkfeedmail
bsd-2-clause
9,632
162
codeparrot/github-code
761ad5d918d5c3a92e3e918f38b7f58f28b8c20ec3cdc5b43a1572319e1d2ac6
<?php namespace Entities; use KAGClient\Client as Client; /** * Description of Player * * @author William Schaller * @Entity @Table(name="sb_player") * @HasLifecycleCallbacks */ class Player { /** * * @var type * @Id @Column(type="integer") * @GeneratedValue */ protected $id; /** * ...
PHP
Model/Entities/Player.php
wschalle/kagsb
bsd-2-clause
5,073
267
codeparrot/github-code
4563b6c74613d85a2314a319b0d822cb6d3705bd4512b18a57e329d373ee4d8f
/* * This file is part of GPaste. * * Copyright (c) 2010-2018, Marc-Antoine Perennou <Marc-Antoine@Perennou.com> */ #if !defined (__G_PASTE_H_INSIDE__) && !defined (G_PASTE_COMPILATION) #error "Only <gpaste.h> can be included directly." #endif #ifndef __G_PASTE_CLIPBOARD_H__ #define __G_PASTE_CLIPBOARD_H__ #incl...
C
src/daemon/tmp/gpaste-clipboard.h
Keruspe/GPaste
bsd-2-clause
2,850
61
codeparrot/github-code
d977ed579d9fa1ab78f5b4c87320de15f9a013b49b6f63049dc65172fc980792
package com.typesafe.sbt package packager package rpm import Keys._ import linux._ import sbt._ /** Plugin trait containing all generic values used for packaging linux software. */ trait RpmPlugin extends Plugin with LinuxPlugin { val Rpm = config("rpm") extend Linux def rpmSettings: Seq[Setting[_]] = Seq( ...
Scala
src/main/scala/com/typesafe/sbt/packager/rpm/RpmPlugin.scala
yanns/sbt-native-packager
bsd-2-clause
2,276
63
codeparrot/github-code
98e3b06b596abc60f37ead28251b92c4f7b873eed401abc48f651f237ebb5987
#include <sol/compatibility/compat-5.3.h> #include <stddef.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <errno.h> #include <stdio.h> /* don't compile it again if it already is included via compat53.h */ #ifndef KEPLER_PROJECT_COMPAT53_C_ #define KEPLER_PROJECT_COMPAT53_C_ /* definitions f...
C
DESIRE-Modules/Script-Lua/Externals/sol/include/sol/compatibility/compat-5.3.c.h
nyaki-HUN/DESIRE
bsd-2-clause
26,566
901
codeparrot/github-code
270a2309242d844043b9a3e273c913f3cc77d536985491aa0c4cc47b4aa47d0c
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. P...
C
code/lib/bullet/Demos/Benchmarks/BenchmarkDemo.h
moof2k/golf
bsd-2-clause
4,592
215
codeparrot/github-code
afccfc51d4fcd595262693683107a1275783e888a40384e7043991cb94b101dc
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved. #pragma once #include "MovieSceneObjectManager.h" #include "SequencerPossessedObject.h" #include "SequencerMovieSceneObjectManager.generated.h" /** * Movie scene object manager used by Sequencer. */ UCLASS(BlueprintType, MinimalAPI) class USequencerMovi...
C
Engine/Source/Editor/Sequencer/Private/SequencerMovieSceneObjectManager.h
PopCap/GameIdea
bsd-2-clause
2,416
76
codeparrot/github-code
20f68fcbed4c7c143efa902d84381855215fd1233a5af2955b503c4148c2536a
import flask; from flask import request import os import urllib.parse from voussoirkit import flasktools from voussoirkit import gentools from voussoirkit import stringtools import etiquette from .. import common site = common.site session_manager = common.session_manager # Individual albums ######################...
Python
frontends/etiquette_flask/backend/endpoints/album_endpoints.py
voussoir/etiquette
bsd-2-clause
9,106
250
codeparrot/github-code
e3e2daa8e999cb95bdecd2321665652dc9a6b5a333454575405263b5ef3a5ad6
/* $Id: proto_push_configure.c 24217 2013-05-31 03:51:24Z yamazaki $ */ /* * Copyright (c) 2012, Internet Initiative Japan, 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: * * 1. R...
C
protocol/proto_push_configure.c
seil-smf/libarms
bsd-2-clause
13,901
613
codeparrot/github-code
ab60471433d27ba4e6ba2f0461b0d2ca64e9375f6db9402c3988857e3b8b3338
#!/usr/bin/env python import sys def ip2str(ip): l = [ (ip >> (3*8)) & 0xFF, (ip >> (2*8)) & 0xFF, (ip >> (1*8)) & 0xFF, (ip >> (0*8)) & 0xFF, ] return '.'.join([str(i) for i in l]) def str2ip(line): a, b, c, d = [int(s) for s in line.split('.')] ip = 0 ip +...
Python
linux/config/scripts/ipblock.py
owalch/oliver
bsd-2-clause
870
40
codeparrot/github-code
fb8c0a1d2501c2fc7d2cef39fbf5997abe454cfdc471cfe69c6501057cee37cb
/** * RInterpreter.c * A ray of light in the realm of darkness. * Interpreter of Ray language to pure C. * Author Kucheruavyu Ilya (kojiba@protonmail.com) * 12.11.2014 Ukraine Kharkiv * _ _ _ _ * | | (_|_) | * | | _____ _ _| |__ __ _ * | |/ / _ \| | | '_ \ / _` | * | < (_) | | | |_) | (_| ...
C
Classes/RInterpreter/RInterpreter.c
kojiba/RayLanguage
bsd-2-clause
11,280
291
codeparrot/github-code
ccc984fffe69bb486cdeeb3ac13a912827187927e5c34e210c5ed6e02b581328
package com.blazeloader.api.recipe; import com.google.common.collect.Lists; import net.minecraft.block.Block; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.IRe...
Java
src/com/blazeloader/api/recipe/ApiCrafting.java
warriordog/BlazeLoader
bsd-2-clause
12,203
367
codeparrot/github-code
93b801f9afe226b748b4a299bd8e136b9205951dd9461a78361a3a307efe9ce7
""" Workaround for a conda-build bug where failing to compile some Python files results in a build failure. See https://github.com/conda/conda-build/issues/1001 """ import os import sys py2_only_files = [] py3_only_files = [ 'numba/tests/annotation_usecases.py', ] def remove_files(basedir): """ R...
Python
buildscripts/remove_unwanted_files.py
stefanseefeld/numba
bsd-2-clause
764
37
codeparrot/github-code
b81649dc14f2d27ecca6622ee480b12cbb8b7e3465f349115c3830f28305fc90
<!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/html; charset=utf-8" /> <title>arms_get_rsinfo() &mdash; libarms 5.33 documentati...
HTML
doc/api/arms_get_rsinfo.html
seil-smf/libarms
bsd-2-clause
8,885
212
codeparrot/github-code
40bb74332c4d14213859937a38f6935250c9023c7deafb03a382c7402c7ac854
/* * Copyright (C) Yichun Zhang (agentzh) */ #ifndef DDEBUG #define DDEBUG 0 #endif #include "ddebug.h" #include <ngx_core.h> #include <ngx_http.h> #include "ngx_http_drizzle_quoting.h" ngx_int_t ngx_http_drizzle_check_int(ngx_str_t *value, void *data) { /* TODO */ return NGX_OK; ...
C
drizzle-nginx-module-0.1.7/src/ngx_http_drizzle_checker.c
caidongyun/nginx-openresty-windows
bsd-2-clause
907
64
codeparrot/github-code
6d0b396e3a457073b80fdb8250aebe924fcfb257fa9c1884911d489302f32422
/** * Copyright (c) 2007-2012, Timothy Stack * * 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 ...
C++
src/top_status_source.hh
sureshsundriyal/lnav
bsd-2-clause
6,788
183
codeparrot/github-code
457dd37e1f2a099c563d0e778f6a1174234fa2740204e76195c3ea07b5979eda
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import random import sys class DayLife: """Life in a day.""" def __init__(self, date, life): """Set birth datetime and life.""" self.birthdate = date self.life = life finalyear = self.birthdate.year + self.life ...
Python
1/1-2.py
wakamori/GoForIt
bsd-2-clause
1,719
53
codeparrot/github-code
d9825b4bd4e4fd61a1318fa5447f97d49e43582027ae7573e67c32aeaad1a019
/* * Copyright (c) 2013 Ambroz Bizjak * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditio...
C
aprinter/printer/transform/DistanceSplitter.h
ambrop72/aprinter
bsd-2-clause
4,306
114
codeparrot/github-code
e1c44c13092b16e300f1df69d3252adbe2bfa6c8942f134365951f1cbf6dc563
#include <vector> #include <iostream> #include <SDL/SDL.h> #include <SDL/SDL_gfxPrimitives.h> #include <SDL/SDL_image.h> #include <SDL/SDL_mixer.h> #include "base.h" #include "game.h" #include "video.h" void draw3DLine( SDL_Surface *video, Vec3 &camera, Vec3 &p0, Vec3 &p1, int r, int g, int b ) { float x0 = ( XRE...
C++
video.cpp
TheFakeMontyOnTheRun/island-domination
bsd-2-clause
4,922
167
codeparrot/github-code
6b6a9b50eefe3bde717bc975f57dd424e259fa1d7277d92d106f417fd3b18b3a
// Copyright (c) 2014, Andre Caron (andre.l.caron@gmail.com) // 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 // no...
C++
test/test-hub-shutdown.cpp
AndreLouisCaron/comfort-zone
bsd-2-clause
3,915
136
codeparrot/github-code