code
stringlengths 21
499
| repo_name
stringlengths 7
81
| path
stringlengths 4
222
| language
class label 2
classes | license
stringclasses 15
values | size
int64 21
499
|
---|---|---|---|---|---|
package com.pi.xerosync.dbconnect;
/**
* User: thomas Date: 18/02/14
*/
public interface XeroCredentials {
String getXeroConsumerKey();
String getXeroConsumerSecret();
String getPrivateKeyPath();
}
|
tom-haines/patricia-xero-sync
|
patricia-xero-webapp/src/main/java/com/pi/xerosync/dbconnect/XeroCredentials.java
| 0Java
|
apache-2.0
| 207 |
def get_planet_name(id):
switch = {
1: "Mercury",
2: "Venus",
3: "Earth",
4: "Mars",
5: "Jupiter",
6: "Saturn",
7: "Uranus" ,
8: "Neptune"}
return switch[id]
|
NendoTaka/CodeForReference
|
CodeWars/8kyu/planetName.py
| 1Python
|
mit
| 231 |
package com.github.ricardobaumann.spring_blog_frontend.models;
import lombok.Data;
/**
* Created by ricardobaumann on 28/11/16.
*/
@Data
public class Comment {
private String content;
private Long id;
}
|
ricardobaumann/spring_blog_frontend
|
src/main/java/com/github/ricardobaumann/spring_blog_frontend/models/Comment.java
| 0Java
|
mit
| 218 |
package Testing;
/**
* Created by Jeff on 2016/3/6.
*/
public class test5 {
public static void main(String[] args) {
char chh = 'a' + 4;
System.out.println(chh);
}
}
|
gdefias/StudyJava
|
InitJava/base/src/main/java/Testing/test5.java
| 0Java
|
apache-2.0
| 193 |
package ru.job4j.tasksortdeparament;
import java.util.Comparator;
public class ComporatorLengtch implements Comparator<String> {
public int compare(String o1, String o2) {
int res;
if (o1.length() > o2.length()) {
res = 1;
} else if (o1.length() == o2.length()) {
res = 0;
} else {
res = -1;
}
return res;
}
}
|
ogneyar79/Sirotkin_M
|
chapter_002/src/main/java/ru/job4j/tasksortdeparament/ComporatorLengtch.java
| 0Java
|
apache-2.0
| 410 |
from xmediusmailrelayserver import *
|
xmedius/xmedius-mailrelayserver
|
xmediusmailrelayserver/__init__.py
| 1Python
|
mit
| 38 |
from django.conf import settings
def posthog_configurations(request):
return {
'POSTHOG_API_KEY': settings.POSTHOG_API_KEY,
'POSTHOG_API_URL': settings.POSTHOG_API_URL,
}
|
pythonprobr/pythonpro-website
|
pythonpro/analytics/context_processors.py
| 1Python
|
agpl-3.0
| 197 |
package org.needle4j.postconstruct.injection;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
public class ComponentWithPrivatePostConstruct {
@Inject
private DependentComponent component;
@PostConstruct
@SuppressWarnings("unused")
private void postconstruct() {
component.count();
}
}
|
needle4j/needle4j
|
src/test/java/org/needle4j/postconstruct/injection/ComponentWithPrivatePostConstruct.java
| 0Java
|
lgpl-2.1
| 326 |
package com.mangopay.core.interfaces;
/**
* Marker interface for classes with details of means of payment in PayOut entity.
*/
public interface PayOutPaymentDetails { }
|
Mangopay/mangopay2-java-sdk
|
src/main/java/com/mangopay/core/interfaces/PayOutPaymentDetails.java
| 0Java
|
mit
| 172 |
def function1():
pass
def function2():
pass
|
siosio/intellij-community
|
python/testData/refactoring/move/fromImportAliases/before/src/lib.py
| 1Python
|
apache-2.0
| 54 |
#!/usr/bin/env python
from sys import argv
from GeekToolKickassTorrentFeed import GeekToolKickassTorrentFeed
if __name__ == "__main__" and len(argv) > 1:
mode = argv[1]
print(str.format("{0}{1}", "\t" * 4, mode.capitalize()))
feed = GeekToolKickassTorrentFeed(mode)
if feed:
feed_data = feed.get_top_seeded_torrents().fetch().get_formatted_list()
print(feed_data)
else:
print("No torrents available")
|
abram777/torrents-from-xml
|
examples/geektool script/torrents.geektool.py
| 1Python
|
mit
| 449 |
''' get_snmp_name_desc.py '''
from snmp_helper import snmp_get_oid,snmp_extract
PORT=161
COMMUNITY='galileo'
rtrs={'pynet-rtr1':'184.105.247.70', 'pynet-rtr2':'184.105.247.71'}
oids={'sysName':'1.3.6.1.2.1.1.5.0', 'sysDescr':'1.3.6.1.2.1.1.1.0'}
for rtr in rtrs.keys():
print rtr
for oid in oids.keys():
print " " + oid + " = " + snmp_extract(snmp_get_oid((rtrs[rtr],COMMUNITY,PORT),oids[oid]))
|
dnsbob/pynet_testz
|
SNMP/get_snmp_name_desc.py
| 1Python
|
apache-2.0
| 418 |
from api import *
simulaUnDia()
|
juanAFernandez/project-S
|
mongoDBAPI/try.py
| 1Python
|
gpl-2.0
| 32 |
package roo.nw.application.web;
import org.springframework.roo.addon.web.mvc.thymeleaf.annotations.RooLinkFactory;
/**
* = CategoriesItemProductsThymeleafLinkFactory
*
* TODO Auto-generated class documentation
*
*/
@RooLinkFactory(controller = CategoriesItemProductsThymeleafController.class)
public class CategoriesItemProductsThymeleafLinkFactory {
}
|
kelvinyap2014/northwind-roo
|
app/application/src/main/java/roo/nw/application/web/CategoriesItemProductsThymeleafLinkFactory.java
| 0Java
|
gpl-3.0
| 359 |
from JumpScale import j
descr = """
This jumpscript returns network info
"""
category = "monitoring"
organization = "jumpscale"
author = "kristof@incubaid.com"
license = "bsd"
version = "1.0"
roles = []
def action():
return j.sal.nettools.getNetworkInfo()
if __name__ == "__main__":
print(action())
|
Jumpscale/jumpscale_core8
|
apps/agentcontroller/jumpscripts/jumpscale/network_info.py
| 1Python
|
apache-2.0
| 312 |
package fr.lelouet.rpg.model;
import fr.lelouet.rpg.model.character.CharStats;
public class Character extends CharStats {
public Character(RPGGame system) {
super(system);
}
/**
*
* @return true if this character is an avatar
*/
public boolean isPlayer() {
return true;
}
public int lvl;
}
|
glelouet/RPG
|
Model/src/main/java/fr/lelouet/rpg/model/Character.java
| 0Java
|
gpl-2.0
| 312 |
package com.ghost.json;
/**
* Jackson JSON basic View to serialize/deserialize objects
*/
public class View {
public interface Public{}
}
|
SergiyGovorukhin/nooble
|
src/main/java/com/ghost/json/View.java
| 0Java
|
mit
| 145 |
from __future__ import absolute_import
from .check_info import check_info_annotation
from .rank_scores import build_rank_score_dict
from .build_info import (build_info_string, build_info_dict)
from .build_compounds import build_compounds_dict
from .build_models import build_models_dict
from .build_vep import (build_vep_string, build_vep_annotation)
from .split_genotype import split_genotype
from .format_variant import format_variant
from .split_variants import split_variants
|
moonso/vcf_parser
|
vcf_parser/utils/__init__.py
| 1Python
|
mit
| 481 |
/*
* Created on Jun 19, 2004
*/
package net.charabia.jsmoothgen.application.swtgui;
public class NewAction extends JSmoothAction {
public NewAction(JSmoothApplication js) {
super(js);
}
public boolean run() {
System.out.println("[DEBUG] New default project.");
getApplication().newProject();
return true;
}
}
|
BisonSchweizAG/JSmooth
|
src/net/charabia/jsmoothgen/application/swtgui/NewAction.java
| 0Java
|
apache-2.0
| 366 |
# jsb socket related plugins
#
#
""" this package contains all the socket related plugins. """
import os
(f, tail) = os.path.split(__file__)
__all__ = []
for i in os.listdir(f):
if i.endswith('.py'):
__all__.append(i[:-3])
elif os.path.isdir(f + os.sep + i) and not i.startswith('.'):
__all__.append(i)
try:
__all__.remove('__init__')
except:
pass
__plugs__ = __all__
|
melmothx/jsonbot
|
jsb/plugs/socket/__init__.py
| 1Python
|
mit
| 406 |
package org.alphabet.alphabets;
import org.alphabet.Alphabet;
public class Binary extends Alphabet<Binary>{
final static String ALPHABET = "01";
public Binary() {
super(ALPHABET,"");
}
public Binary(String exclusions) {
super(ALPHABET, exclusions);
}
}
|
miguelcobain/jalphabet
|
src/main/java/org/alphabet/alphabets/Binary.java
| 0Java
|
apache-2.0
| 270 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package colonyplater.gui;
/**
*
* @author xizho3
*/
public class ColonyPlater {
/**
* @param args the command line arguments
*/
public static void main(String[] args)
{
// TODO code application logic here
ColonyPlaterGUI plater = new ColonyPlaterGUI();
}
}
|
joey0214/ColonyPlater
|
src/colonyplater/gui/ColonyPlater.java
| 0Java
|
gpl-2.0
| 496 |
package com.infonuascape.osrshelper.listeners;
import com.infonuascape.osrshelper.models.players.PlayerSkills;
/**
* Created by marc_ on 2018-01-14.
*/
public interface HiscoresFetcherListener {
void onHiscoresCacheFetched(final PlayerSkills playerSkills);
void onHiscoresFetched(final PlayerSkills playerSkills);
void onHiscoresError(final String errorMessage);
}
|
ldionmarcil/OSRSHelper
|
app/src/main/java/com/infonuascape/osrshelper/listeners/HiscoresFetcherListener.java
| 0Java
|
apache-2.0
| 382 |
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/*
* @author andreer
*/
@ExportPackage
package com.yahoo.vespa.service.monitor;
import com.yahoo.osgi.annotation.ExportPackage;
|
vespa-engine/vespa
|
service-monitor/src/main/java/com/yahoo/vespa/service/monitor/package-info.java
| 0Java
|
apache-2.0
| 236 |
package edu.iu.informatics.omics;
public enum OligosaccharideLinkageType {
LINK_2, LINK_3, LINK_4, LINK_6
}
|
shengqh/GlycanIdentification
|
src/edu/iu/informatics/omics/OligosaccharideLinkageType.java
| 0Java
|
apache-2.0
| 115 |
package nl.weeaboo.entity;
class RenderPart extends Part {
private static final long serialVersionUID = 1L;
public RenderPart() {
}
public void render(ModelPart model) {
System.out.println("[render] " + model.toDetailedString());
}
}
|
anonl/tcommon
|
entity/src/test/java/nl/weeaboo/entity/RenderPart.java
| 0Java
|
mit
| 275 |
package org.m323.cachet.api.v1.response;
import java.io.Serializable;
import org.m323.cachet.api.v1.entity.Group;
/**
* Response containing a single Cachet {@link Group}.
*
* @author Marczeeee
* @since 0.1
*/
public class GroupResponse implements Serializable {
/** {@link Group} object */
private Group data;
public Group getData() {
return data;
}
public void setData(final Group data) {
this.data = data;
}
}
|
Marczeeee/cachet-java-api
|
cachet-api/src/main/java/org/m323/cachet/api/v1/response/GroupResponse.java
| 0Java
|
apache-2.0
| 462 |
package com.yurikoster1.letsmodreboot.item;
import com.yurikoster1.letsmodreboot.item.base.ItemLMRB;
/**
* Created by Koster on 23/10/2015.
*/
public class ItemMagicHammer extends ItemLMRB {
public ItemMagicHammer(){
super();
this.setUnlocalizedName("magicHammer");
this.maxStackSize = 1;
this.setMaxDamage(128);
this.setNoRepair();
}
}
|
yurikoster1/minemod
|
src/main/java/com/yurikoster1/letsmodreboot/item/ItemMagicHammer.java
| 0Java
|
gpl-3.0
| 353 |
package sn.executor;
/**
* Created by Sumanth on 16/10/14.
*/
public class GenieHadoopTaskResponse {
}
|
sumanthn/executor
|
src/main/java/sn/executor/GenieHadoopTaskResponse.java
| 0Java
|
apache-2.0
| 108 |
package info.kisai.zds.calculator;
import java.util.Deque;
/**
* Created by spacefox on 04/10/15.
*/
public class UnknownElementException extends Exception {
public UnknownElementException(String element, Deque<Double> stack) {
super("Erreur de synaxe : l'élément \"" + element + "\" n'est ni un nombre, ni un opérateur connu.\n"
+ "État de la pile : " + stack);
}
}
|
SpaceFox/calculator
|
src/info/kisai/zds/calculator/UnknownElementException.java
| 0Java
|
mit
| 408 |
package util.events;
public class UsedReposChangedEvent extends Event {
}
|
jinified/HubTurbo
|
src/main/java/util/events/UsedReposChangedEvent.java
| 0Java
|
lgpl-3.0
| 75 |
package org.ict4h.formdefinition.model.query;
public class SelectDependentQuery extends SelectQuery {
public SelectDependentQuery(String tableName, int id) {
super(tableName,id);
}
@Override
public String asSql() {
return String.format("SELECT * FROM %s WHERE parent_id = %s;",tableName,id);
}
}
|
theghostwhoforks/metaDefinition2Table
|
src/main/java/org/ict4h/formdefinition/model/query/SelectDependentQuery.java
| 0Java
|
apache-2.0
| 334 |
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from infra_libs.infra_types.infra_types import freeze
from infra_libs.infra_types.infra_types import thaw
from infra_libs.infra_types.infra_types import FrozenDict
|
endlessm/chromium-browser
|
tools/swarming_client/third_party/infra_libs/infra_types/__init__.py
| 1Python
|
bsd-3-clause
| 327 |
package testcase;
import annotations.MUTABLE;
public class AGT011_ByteLiteral_ObjectInstanceVariable {
@MUTABLE
public Test test = new Test();
public static void main(String[] args) {
new AGT011_ByteLiteral_ObjectInstanceVariable().foo();
}
public void foo(){
System.out.println(test);
test.f = (byte) 0x01;
System.out.println(test);
}
}
class Test {
public Object f = new Object();
@Override
public String toString() {
return "Test [f=" + f + "]";
}
}
|
kcsl/immutability-benchmark
|
testcases/source/AGT/AGT011_ByteLiteral_ObjectInstanceVariable/src/testcase/AGT011_ByteLiteral_ObjectInstanceVariable.java
| 0Java
|
mit
| 483 |
import sys
tests=[
("testExecs/testFeatures.exe","",{}),
]
longTests=[
]
if __name__=='__main__':
import sys
from rdkit import TestRunner
failed,tests = TestRunner.RunScript('test_list.py',0,1)
sys.exit(len(failed))
|
soerendip42/rdkit
|
Code/Features/test_list.py
| 1Python
|
bsd-3-clause
| 233 |
package com.northernwall.hadrian.details.simple.dao;
import java.util.LinkedList;
import java.util.List;
public class VipPoolsDao {
public List<VipPoolDao> pools = new LinkedList<>();;
}
|
Jukkorsis/Hadrian
|
src/main/java/com/northernwall/hadrian/details/simple/dao/VipPoolsDao.java
| 0Java
|
apache-2.0
| 194 |
from collections import OrderedDict
def main():
net_prices = OrderedDict()
for _ in range(int(input())):
item, price = input().rsplit(maxsplit=1)
net_prices[item] = net_prices.get(item, 0) + int(price)
for item in net_prices:
print(item, net_prices[item])
if __name__ == '__main__':
main()
|
FireClaw/HackerRank
|
Python/py-collections-ordereddict.py
| 1Python
|
mit
| 342 |
from unittest import TestCase
from django.core.management import call_command
class SendAiPicsStatsTestCase(TestCase):
def test_run_command(self):
call_command('send_ai_pics_stats')
|
KlubJagiellonski/pola-backend
|
pola/tests/commands/test_send_ai_pics_stats.py
| 1Python
|
bsd-3-clause
| 197 |
import sys
import string
f = sys.stdin
g = sys.stdout
echo = 0
while 1:
l = f.readline()
if not l: break
ll=string.strip(l)
if ll=='BEGIN-LOG':
echo = 1
elif ll=='END-LOG':
echo = 0
elif echo:
l=string.replace(l,"-0.000"," 0.000") # squish annoying negative zeros
g.write(l)
|
gratefulfrog/lib
|
python/pymol/pymol_path/test/trim.py
| 1Python
|
gpl-2.0
| 319 |
package org.mocraft.command.pex;
import org.bukkit.entity.Player;
public interface PexPlayerCommand {
Player getPlayer();
}
|
jackey8616/PerMession
|
src/org/mocraft/command/pex/PexPlayerCommand.java
| 0Java
|
gpl-3.0
| 132 |
package br.com.gamemods.tutorial.ctf;
import org.bukkit.plugin.java.JavaPlugin;
public class CTFGameMods extends JavaPlugin
{
}
|
joserobjr/CTFGameMods
|
src/main/java/br/com/gamemods/tutorial/ctf/CTFGameMods.java
| 0Java
|
mit
| 131 |
from django.db import models
from django.contrib.auth.models import User
class OdooUser(models.Model):
user = models.OneToOneField(User)
odoo_id = models.BigIntegerField(primary_key=True)
username = models.CharField(max_length=256)
|
JulienDrecq/django-odoo-auth
|
odoo_auth/models.py
| 1Python
|
bsd-3-clause
| 246 |
emk.module_paths.append(emk.abspath("modules"))
c, revision = emk.module("c", "revision")
emk.depend("$:build:$/revision" + c.obj_ext, "revision.h")
|
kmackay/emk
|
tutorial/5_modules/emk_rules.py
| 1Python
|
bsd-2-clause
| 149 |
package com.gildedrose.strategy;
import com.gildedrose.Item;
public class ConjuredQuality implements UpdateQualityBehaviour {
@Override
public int update(Item item) {
NormalItemQuality normalItemQuality = new NormalItemQuality();
return normalItemQuality.update(item) * 2;
}
}
|
scmallorca/gilded-rose-dojo
|
alearnaiz_java/src/main/java/com/gildedrose/strategy/ConjuredQuality.java
| 0Java
|
mit
| 308 |
package com.paradigmkick.sample.querydsl;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
public interface CustomerRepository extends JpaRepository<Customer, Long>, QueryDslPredicateExecutor<Customer> {
List<Customer> findByLastName(String lastName);
}
|
eneveu/querydsl-sample
|
src/main/java/com/paradigmkick/sample/querydsl/CustomerRepository.java
| 0Java
|
apache-2.0
| 363 |
package com.iauto.wlink.core.exception;
@SuppressWarnings("serial")
public class InvalidMessageRouterException extends MessageProcessException {
private static final String ERROR_CODE = "INVALID_MESSAGE_ROUTER";
public InvalidMessageRouterException() {
super( ERROR_CODE );
}
}
|
xuxiaofei820825/wlink-server
|
wlink-core-integration-rabbitmq/src/main/java/com/iauto/wlink/core/exception/InvalidMessageRouterException.java
| 0Java
|
apache-2.0
| 286 |
package com.example.kg_bible.models;
import java.util.List;
public class BibleBook {
public int id;
public String name;
public List<BibleChapter> chapters;
}
|
MasterAlish/kg_bible
|
android/src/com/example/kg_bible/models/BibleBook.java
| 0Java
|
gpl-2.0
| 171 |
"""
Conversion pack for October 2021 release
"""
CONVERSIONS = {
# Renamed items
"Quafe Zero": "Quafe Zero Classic",
"Exigent Sentry Drone Navigation Mutaplasmid": "Exigent Sentry Drone Precision Mutaplasmid",
}
|
pyfa-org/Pyfa
|
service/conversions/releaseOct2021.py
| 1Python
|
gpl-3.0
| 225 |
package me.eightball.telegram.exceptions;
/**
* Created by jmalmellones on 11/5/16.
*/
public class TelegramException extends Exception {
/**
*
*/
private static final long serialVersionUID = -5212343513962004967L;
public TelegramException(String message) {
super(message);
}
public TelegramException(String message, Throwable cause) {
super(message, cause);
}
public TelegramException(Throwable cause) {
super(cause);
}
}
|
jmalmellones/alfred
|
src/main/java/me/eightball/telegram/exceptions/TelegramException.java
| 0Java
|
gpl-3.0
| 449 |
package com.codingchili.core.testing;
/**
* A mock class for the log listener.
*/
public interface MockLogListener {
void onLogged(String logged);
}
|
codingchili/chili-core
|
core/main/java/com/codingchili/core/testing/MockLogListener.java
| 0Java
|
mit
| 156 |
from django.conf.urls.defaults import *
from twistranet.core.views import AsView
from views import *
urlpatterns = patterns('sharing',
url(r'^like_toggle_by_id/(\d+)$', AsView(LikeToggleView, lookup = 'id'), name=LikeToggleView.name),
url(r'^like_toggle_by_slug/(\d+)$', AsView(LikeToggleView, lookup = 'slug'), name=LikeToggleView.name),
)
|
numericube/twistranet
|
twistranet/sharing/urls.py
| 1Python
|
agpl-3.0
| 351 |
package mx.edu.uam.practica4.familia;
/**
*
* @author jhernandezn
*/
public class Padre extends Familiar{
}
|
trainingSoapros/Java
|
Carlos/Practica3/src/mx/edu/uam/practica4/familia/Padre.java
| 0Java
|
gpl-3.0
| 138 |
default_app_config = 'journeys.apps.JourneyConfig'
|
vishalsahu5/carpool
|
journeys/__init__.py
| 1Python
|
mit
| 51 |
/**
*/
package example.components.simple.simplifiedADL;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Architecture Elements</b></em>'.
* <!-- end-user-doc -->
*
*
* @see example.components.simple.simplifiedADL.SimplifiedADLPackage#getArchitectureElements()
* @model
* @generated
*/
public interface ArchitectureElements extends EObject
{
} // ArchitectureElements
|
StephaneSeyvoz/EclipseSiriusTests
|
example.components.simple/src-gen/example/components/simple/simplifiedADL/ArchitectureElements.java
| 0Java
|
lgpl-3.0
| 464 |
# requests-oauth 0.4.0
# Hacked to support RSA-SHA1 encryption for Atlassian OAuth.
# Original author: Miguel Araujo
# Forked from https://github.com/maraujop/requests_oauth
# Original license: 3-clause BSD
from hook import OAuthHook
|
blackspiraldev/jira-python
|
jira/packages/requests_oauth/__init__.py
| 1Python
|
bsd-2-clause
| 235 |
package name.cantanima.chineseremainderclock;
/**
* Created by cantanima on 8/22/17.
*/
public interface TimeEntryDialogListener {
/**
* The user cancelled the dialog by pressing the Back button.
*/
public void cancelled();
/**
* The user entered a time.
* @param h the short_hand entered
* @param m the minute entered
*/
public void time_received(int h, int m);
}
|
johnperry-math/Chinese-Remainder-Clock
|
app/src/main/java/name/cantanima/chineseremainderclock/TimeEntryDialogListener.java
| 0Java
|
gpl-3.0
| 398 |
package com.gof.designpattern.adapter.basis;
/**
* Created by yl3 on 24.11.15.
*/
public class MacBook {
private String name;
public MacBook(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
|
osbominix/java_gof_adapter
|
src/main/java/com/gof/designpattern/adapter/basis/MacBook.java
| 0Java
|
apache-2.0
| 260 |
from HardwareInterface import *
from CameraInterface import *
#from ProtocolRunner import *
from DataInterface import *
|
kscottz/SkinnerBox
|
modules/__init__.py
| 1Python
|
mit
| 120 |
package com.example.reference;
import arez.annotations.ArezComponent;
import arez.annotations.Reference;
import arez.annotations.ReferenceId;
@ArezComponent
abstract class StaticReferenceModel
{
@Reference
static MyEntity getMyEntity()
{
return null;
}
@ReferenceId
int getMyEntityId()
{
return 0;
}
static class MyEntity
{
}
}
|
realityforge/arez
|
processor/src/test/fixtures/bad_input/com/example/reference/StaticReferenceModel.java
| 0Java
|
apache-2.0
| 362 |
package com.palmelf.eoffice.service.arch;
import com.palmelf.core.service.BaseService;
import com.palmelf.eoffice.model.arch.BorrowFileList;
public abstract interface BorrowFileListService extends
BaseService<BorrowFileList> {
}
|
jacarrichan/eoffice
|
src/main/java/com/palmelf/eoffice/service/arch/BorrowFileListService.java
| 0Java
|
apache-2.0
| 233 |
from FuXi.Horn.HornRules import HornFromN3
rules = HornFromN3(
'http://www.agfa.com/w3c/euler/rdfs-rules.n3')
for rule in rules:
print(rule)
|
mpetyx/pyrif
|
3rdPartyLibraries/FuXi-master/examples/example7.py
| 1Python
|
mit
| 149 |
package com.iluwatar.resource.acquisition.is.initialization;
import org.junit.Test;
/**
*
* Application test
*
*/
public class AppTest {
@Test
public void test() throws Exception {
String[] args = {};
App.main(args);
}
}
|
hoswey/java-design-patterns
|
resource-acquisition-is-initialization/src/test/java/com/iluwatar/resource/acquisition/is/initialization/AppTest.java
| 0Java
|
mit
| 243 |
package pk1.p8.Management;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
/**
* ApplicationExitAdapter | Condense;
* Created by markusfelix on 21/05/14.
*/
public class ApplicationExitAdapter extends WindowAdapter {
public void windowClosing(WindowEvent event) {
event.getWindow().setVisible(false);
event.getWindow().dispose();
System.exit(0);
}
}
|
MarkusFelix/PK01
|
src/pk1/p8/Management/ApplicationExitAdapter.java
| 0Java
|
mit
| 411 |
package com.nicktoony.screeps.structures;
import com.nicktoony.screeps.interfaces.DecayableStructure;
/**
* Created by nick on 10/08/15.
*/
public abstract class Wall extends DecayableStructure {
}
|
NickToony/scrAI
|
src/main/java/com/nicktoony/screeps/structures/Wall.java
| 0Java
|
mit
| 202 |
from . import ir_ui_view
|
Vauxoo/website
|
website_lazy_load_image/models/__init__.py
| 1Python
|
agpl-3.0
| 25 |
from django.contrib import admin
from modeltranslation.admin import TranslationAdmin
from .models import Campaign
class CampaignAdmin(TranslationAdmin):
list_display = ("__str__", "url", "image", "active")
admin.site.register(Campaign, CampaignAdmin)
|
erudit/eruditorg
|
eruditorg/apps/public/campaign/admin.py
| 1Python
|
gpl-3.0
| 260 |
cases = [
('pmt.py -s 1 -n 20 populations, first without state filter',
'pmt.py -s 1 -n 20 populations'),
('pmt.py -s 2 -n 20 populations filter3, state filter limits population to 3',
'pmt.py -s 2 -n 20 populations filter3')
]
|
nfredrik/pyModelStuff
|
samples/populations/test/test_filter.py
| 1Python
|
bsd-3-clause
| 247 |
from south.db import db
from django.db import models
from transifex.releases.models import *
class Migration:
def forwards(self, orm):
"Write your forwards migration here"
def backwards(self, orm):
"Write your backwards migration here"
models = {
}
complete_apps = ['releases']
|
tymofij/adofex
|
transifex/releases/migrations/0001_initial.py
| 1Python
|
gpl-3.0
| 323 |
"""
bamboo.globals
~~~~~~~~~~~~~
"""
from peak.util.proxies import CallbackProxy
from bamboo.context import context
db = CallbackProxy(lambda: context["db"])
|
hahnicity/bamboo
|
bamboo/globals.py
| 1Python
|
mit
| 159 |
from __future__ import unicode_literals
from memory.mem import _Memory
class Windows2003ServerMemory(_Memory):
def __init__(self, params):
super(Windows2003ServerMemory, self).__init__(params)
def csv_all_modules_dll(self):
super(Windows2003ServerMemory, self)._csv_all_modules_dll()
def csv_all_modules_opened_files(self):
super(Windows2003ServerMemory, self)._csv_all_modules_opened_files()
|
SeungGiJeong/SK_FastIR
|
memory/windows2003ServerMemory.py
| 1Python
|
gpl-3.0
| 432 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2021-11-10 19:21
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('osf', '0238_abstractprovider_allow_updates'),
]
operations = [
migrations.AddIndex(
model_name='schemaresponse',
index=models.Index(fields=['object_id', 'content_type'], name='osf_schemar_object__8cc95e_idx'),
),
]
|
Johnetordoff/osf.io
|
osf/migrations/0239_auto_20211110_1921.py
| 1Python
|
apache-2.0
| 497 |
package com.fireflysource.net.http.common.exception;
import java.io.IOException;
/**
* @author Pengtao Qiu
*/
public class NotSupportContentEncoding extends IOException {
public NotSupportContentEncoding(String message) {
super(message);
}
}
|
hypercube1024/firefly
|
firefly-net/src/main/java/com/fireflysource/net/http/common/exception/NotSupportContentEncoding.java
| 0Java
|
apache-2.0
| 263 |
def __load():
import imp, os, sys
try:
dirname = os.path.dirname(__loader__.archive)
except NameError:
dirname = sys.prefix
path = os.path.join(dirname, '_winreg.pyd')
#print "py2exe extension module", __name__, "->", path
mod = imp.load_dynamic(__name__, path)
## mod.frozen = 1
__load()
del __load
|
slozier/ironpython2
|
Src/StdLib/Lib/site-packages/isapi/test/build/bdist.win32/winexe/temp/_winreg.py
| 1Python
|
apache-2.0
| 344 |
from django import forms
from bands.models.billing_info import BillingInfo
class BillingForm(forms.ModelForm):
class Meta:
model = BillingInfo
exclude=[]
widgets = {
'billing_total': forms.NumberInput(attrs={'placeholder': '0,00'}),
}
|
InsulaCoworking/MusicCity
|
bands/forms/billing_info.py
| 1Python
|
gpl-2.0
| 286 |
package com.minicluster.cluster.configuration;
import org.apache.hadoop.fs.FileSystem;
/**
* Factory
*/
public class Configurations {
static public Configuration newSharedHdfsDirectory(String directory, FileSystem fs) {
return new HdfsBased(directory, fs);
}
static public Configuration newSharedLocalDirectory(String directory) {
return new LocalFsBased(directory);
}
}
|
yannstad/minicluster
|
src/main/java/com/minicluster/cluster/configuration/Configurations.java
| 0Java
|
apache-2.0
| 409 |
from graph.graph_server import GraphServer
__all__ = ['GraphServer']
|
AndreasMadsen/bachelor-code
|
visualizer/__init__.py
| 1Python
|
mit
| 71 |
/**
* @author Abhijit Sarkar
*/
module org.abhijitsarkar.java.mathtutor {
// can't use 'to' because we don't know which modules are going to implement ProblemProvider
exports org.abhijitsarkar.java.mathtutor.spi;
exports org.abhijitsarkar.java.mathtutor.model;
// tells the JVM to look for implementations of ProblemProvider
uses org.abhijitsarkar.java.mathtutor.spi.ProblemProvider;
}
|
abhijitsarkar/java
|
math-tutor/tutor/src/module-info.java
| 0Java
|
gpl-3.0
| 408 |
# Echo client demo using Unix sockets
# Piet van Oostrum
from socket import *
FILE = 'unix-socket'
s = socket(AF_UNIX, SOCK_STREAM)
s.connect(FILE)
s.send('Hello, world')
data = s.recv(1024)
s.close()
print 'Received', repr(data)
|
google/google-ctf
|
third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Demo/sockets/unixclient.py
| 1Python
|
apache-2.0
| 244 |
package edu.wright.daselab.linkgen;
public class OntologyReader {
public OntologyReader() {
}
}
|
akjoshi/linkgen
|
src/edu/wright/daselab/linkgen/OntologyReader.java
| 0Java
|
gpl-2.0
| 109 |
"""
helloworld.py
Author: Nils Kingston
Credit: none
Assignment:
Write and submit a Python program that prints the following:
Hello, world!
"""
print("Hello, world!")
|
nilskingston/Hello-world
|
helloworld.py
| 1Python
|
mit
| 170 |
package at.fhooe.mc.graphical;
import at.fhooe.mc.extern.fingerprintInformation.MeasurementPoint;
public interface ISelectionListener
{
public void notifyMpSelected(MeasurementPoint _mp);
}
|
mobilesec/sesames
|
SurveyTool/src/at/fhooe/mc/graphical/ISelectionListener.java
| 0Java
|
lgpl-3.0
| 195 |
from flask import current_app
from ..core import Service, db
from .models import Component
class ComponentsService(Service):
__model__ = Component
|
mcflugen/wmt-rest
|
wmt/flask/components/__init__.py
| 1Python
|
mit
| 155 |
callbacks = []
def startupNotification(callback):
callbacks.append(callback)
return callback
def notify():
for callback in callbacks:
callback()
|
xfire/guppy
|
guppy/startup.py
| 1Python
|
gpl-2.0
| 172 |
/*
* Carrot2 project.
*
* Copyright (C) 2002-2010, Dawid Weiss, Stanisław Osiński.
* All rights reserved.
*
* Refer to the full license file "carrot2.LICENSE"
* in the root folder of the repository checkout or at:
* http://www.carrot2.org/carrot2.LICENSE
*/
package org.carrot2.util.attribute;
import java.lang.annotation.*;
/**
* A test attribute filtering annotation.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface TestProcessing
{
}
|
arnaudsj/carrot2
|
core/carrot2-util-attribute/src-test/org/carrot2/util/attribute/TestProcessing.java
| 0Java
|
bsd-3-clause
| 490 |
package com.example.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Customer {
private Integer id;
private String firstName;
private String lastName;
}
|
nnoco/playground
|
java/spring-boot/hajiboot-layering/src/main/java/com/example/domain/Customer.java
| 0Java
|
apache-2.0
| 262 |
package cop5555sp15.ast;
import cop5555sp15.TokenStream.Token;
public class AssignmentStatement extends Statement {
LValue lvalue;
Expression expression;
@Override
public Object visit(ASTVisitor v, Object arg) throws Exception {
return v.visitAssignmentStatement(this,arg);
}
public AssignmentStatement(Token firstToken, LValue lvalue,
Expression expression) {
super(firstToken);
this.lvalue = lvalue;
this.expression = expression;
}
}
|
ice109/plp_lang
|
ast/cop5555sp15/ast/AssignmentStatement.java
| 0Java
|
mit
| 483 |
package com.github.vkorobkov.jfixtures.sql;
import com.github.vkorobkov.jfixtures.sql.dialects.MicrosoftSql;
import com.github.vkorobkov.jfixtures.sql.dialects.MySql;
import com.github.vkorobkov.jfixtures.sql.dialects.Sql99;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
public enum SqlType {
MYSQL(new MySql()),
MICROSOFT_SQL(new MicrosoftSql()),
SQL99(new Sql99());
@Getter
private final Sql sqlDialect;
}
|
vkorobkov/jfixtures
|
src/main/java/com/github/vkorobkov/jfixtures/sql/SqlType.java
| 0Java
|
mit
| 461 |
/**
* The ui package for the android-based Sequence Hunt game.
*/
package com.monead.games.android.sequence.ui;
|
DaveRead/SequenceHunt
|
src/com/monead/games/android/sequence/ui/package-info.java
| 0Java
|
agpl-3.0
| 113 |
package com.espertech.esperio.http.config;
public class Service {
private int port;
private boolean nio;
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public boolean isNio() {
return nio;
}
public void setNio(boolean nio) {
this.nio = nio;
}
}
|
b-cuts/esper
|
esperio-http/src/main/java/com/espertech/esperio/http/config/Service.java
| 0Java
|
gpl-2.0
| 365 |
public class J {
public static void main(String[] args) {
int a = 0, b = 1, c = 2;
c ^= a & b;
System.out.print(c);
}
}
|
jwren/intellij-community
|
plugins/kotlin/j2k/new/tests/testData/newJ2k/assignmentExpression/compoundAssignmentPriority2.java
| 0Java
|
apache-2.0
| 151 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package keyline.blmodel;
/**
*
* @author KMY
*/
public class ProjectManager {
}
|
kmycode/Keyline
|
src/keyline/blmodel/ProjectManager.java
| 0Java
|
mit
| 270 |
package prince.app.ccm.util;
public class Util {
public static final String SIGN_IN = "user_signed_in";
public static final String DEFAULT_URL = "default_page";
public static final String FRAGMENTS = "fragments";
public static final String USER = "username";
public static final String PASSWORD = "password";
public static final String REMIND = "remember";
}
|
Principe92/CCM_AudioVisual
|
src/prince/app/ccm/util/Util.java
| 0Java
|
apache-2.0
| 368 |
package org.psjava.ds;
import org.psjava.ds.map.MutableMap;
public class AddToMapWithSameValue {
public static <K, V> void add(MutableMap<K, V> map, Iterable<K> keys, V value) {
for (K key : keys)
map.add(key, value);
}
}
|
psjava/psjava
|
src/main/java/org/psjava/ds/AddToMapWithSameValue.java
| 0Java
|
mit
| 253 |
# -*- coding: utf-8 -*-
from exceptions import DropPage, AbortProcess
|
sunlightlabs/wikipedia-dump-tools
|
wikitools/__init__.py
| 1Python
|
gpl-3.0
| 71 |
package net.minecraftforge.client.model.animation;
import net.minecraftforge.client.model.TRSRTransformation;
/**
* Returns Local joint pose; animation clip for specific model part.
*/
public interface IJointClip
{
TRSRTransformation apply(float time);
}
|
dogjaw2233/tiu-s-mod
|
build/tmp/recompileMc/sources/net/minecraftforge/client/model/animation/IJointClip.java
| 0Java
|
lgpl-2.1
| 262 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "downloadmusic.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
irvingprog/gmusic
|
manage.py
| 1Python
|
lgpl-3.0
| 256 |
package org.hsweb.web.core.session;
import org.hsweb.web.bean.po.user.User;
import javax.servlet.http.HttpSession;
/**
* Created by zhouhao on 16-6-2.
*/
public interface HttpSessionManagerListener {
void onUserLogin(User user,HttpSession session);
void onUserLoginOut(String userId,HttpSession session);
}
|
wuliuxs/axis-framework
|
axis-web-core/src/main/java/org/hsweb/web/core/session/HttpSessionManagerListener.java
| 0Java
|
apache-2.0
| 321 |
package com.appspot.data_base_1298.database;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
super(Application.class);
}
}
|
HackeaMesta/Android-Google-Endpoint
|
app/src/androidTest/java/com/appspot/data_base_1298/database/ApplicationTest.java
| 0Java
|
gpl-3.0
| 366 |
from django.shortcuts import render
def perfeval_display_summation(request,input_dict,output_dict,widget):
if sum(input_dict['intList']) == input_dict['sum']:
check = 'The calculation appears correct.'
else:
check = 'The calculation appears incorrect!'
return render(request, 'visualizations/perfeval_display_integers.html',{'widget':widget,'input_dict':input_dict, 'output_dict':output_dict, 'check':check})
|
janezkranjc/clowdflows
|
workflows/perfeval/visualization_views.py
| 1Python
|
gpl-3.0
| 446 |
package ca.six.views.util;
import android.graphics.Color;
public class ColorsUtil {
public static boolean isLight(int color) {
return Math.sqrt(
Color.red(color) * Color.red(color) * 0.241 +
Color.green(color) * Color.green(color) * 0.691 +
Color.blue(color) * Color.blue(color) * 0.068) > 130;
}
public static int getBaseColor(int color) {
if (isLight(color)) {
return Color.BLACK;
}
return Color.WHITE;
}
}
|
songzhw/SixUiViews
|
SixUiViews/lib/src/main/java/ca/six/views/util/ColorsUtil.java
| 0Java
|
apache-2.0
| 473 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.