repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
arcturusannamalai/Ezhil-Lang | ezhil/ezhil_transforms.py | 2 | 7334 | #!/usr/bin/python
# -*- coding: utf-8 -*-
##
## (C) 2015 Muthiah Annamalai
## Licensed under GPL Version 3
##
## Interpreter for Ezhil language
from __future__ import print_function
import sys
PYTHON3 = (sys.version[0] == '3')
if PYTHON3:
unicode = str
## Tx
from .transform import Visitor, TransformVisitor
from .... | gpl-3.0 | 3,367,327,256,590,115,300 | 34.73399 | 128 | 0.583954 | false |
tpoy0099/option_calculator | gui_impl/position_editor.py | 1 | 4509 | #coding=utf8
from qt_ui.ui_position_editor import Ui_position_editor_dialog
from gui_impl.qt_mvc_impl import MatrixModel, AutoFormDelegate
from gui_impl.qtableview_utility import getSelectedRows
from utility.data_handler import TableHandler
from PyQt4.QtCore import *
from PyQt4.QtGui import *
########################... | gpl-2.0 | -6,616,695,230,852,411,000 | 37.211864 | 94 | 0.573963 | false |
ezekial4/atomic_neu | atomic/tests/test_atomic_data.py | 1 | 4985 | import unittest
import numpy as np
import atomic_neu as atomic
class TestAtomicData(unittest.TestCase):
def test_element_data_names_abbreviated_and_long(self):
"""This does not require that the user has downloaded data"""
data1 = atomic.atomic_data._element_data('Li')
data2 = atomic.atomic_... | mit | 245,744,006,883,106,300 | 40.541667 | 116 | 0.626078 | false |
nasa-gibs/onearth | src/empty_tile/oe_generate_empty_tile.py | 1 | 11279 | #!/usr/bin/env python3
# Copyright (c) 2002-2017, California Institute of Technology.
# All rights reserved. Based on Government Sponsored Research under contracts NAS7-1407 and/or NAS7-03001.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followi... | apache-2.0 | 599,956,554,437,236,400 | 38.855124 | 229 | 0.61282 | false |
LearnEra/LearnEraPlaftform | common/lib/xmodule/xmodule/modulestore/tests/test_publish.py | 1 | 7315 | """
Test the publish code (mostly testing that publishing doesn't result in orphans)
"""
from xmodule.modulestore.exceptions import ItemNotFoundError
from xmodule.modulestore.tests.test_split_w_old_mongo import SplitWMongoCourseBoostrapper
from xmodule.modulestore.tests.factories import check_mongo_calls
from xmodule.m... | agpl-3.0 | 2,435,826,882,299,244,500 | 52.394161 | 154 | 0.5892 | false |
eek6/squeakspace | lib/squeakspace/common/util_http.py | 1 | 14648 |
import urlparse
import json
import Cookie
import squeakspace.common.squeak_ex as ex
def json_fun(object):
#return json.dumps(object)
return json.dumps(object, indent=4) + '\n'
def respond(environ, start_response, status, content, response_headers=None):
if response_headers == None:
response_hea... | gpl-3.0 | -6,834,943,958,178,356,000 | 32.290909 | 94 | 0.608684 | false |
hajicj/safire | build/lib/test/test_utils.py | 1 | 6748 | """
Testing the utility functions.
"""
import gzip
import logging
import math
import os
import unittest
import gensim
from gensim.models import TfidfModel
import operator
from safire.data import VTextCorpus, FrequencyBasedTransformer
from safire.data.filters.positionaltagfilter import PositionalTagTokenFilter
from s... | gpl-3.0 | 4,269,886,714,641,634,300 | 33.968912 | 89 | 0.597659 | false |
T3kton/subcontractor | subcontractor/credentials.py | 1 | 1841 | import json
import ssl
from urllib import request
VAULT_TIMEOUT = 20
_handler = None
def getCredentials( value ):
if value is None:
return None
return _handler.get( value )
def setup( config ):
global _handler
vault_type = config.get( 'credentials', 'type', fallback=None )
if not vault_type: # ... | apache-2.0 | 6,615,458,542,644,797,000 | 24.219178 | 97 | 0.595872 | false |
ronas/PythonGNF | Igor/Tabuada.py | 1 | 1262 | '''
numero = int(input("Número para a tabuada: "))
for multiplicador in range(1,11):
print (numero,"x",multiplicador,"=",(numero*multiplicador))
'''
#
# Calculo de Horas trabalhadas.
# Autor: Igor Nunes
# Materia: Programa Python
# Orientador: Ronaldo
# Aula de total de horas trabalhadas
#
#Leitur... | gpl-3.0 | 7,292,178,075,437,664,000 | 23.16 | 66 | 0.68124 | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/radical.utils-0.7.7-py2.7.egg/radical/utils/__init__.py | 1 | 1700 |
__author__ = "Radical.Utils Development Team (Andre Merzky, Ole Weidner)"
__copyright__ = "Copyright 2013, RADICAL@Rutgers"
__license__ = "MIT"
# import utility classes
from object_cache import ObjectCache
from plugin_manager import PluginManager
from singleton import Singleton
from threads import... | apache-2.0 | -6,634,251,882,934,553,000 | 33 | 81 | 0.626471 | false |
Tuxemon/Tuxemon | tuxemon/event/actions/add_item.py | 1 | 1612 | #
# Tuxemon
# Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>,
# Benjamin Bean <superman2k5@gmail.com>
#
# This file is part of Tuxemon
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#... | gpl-3.0 | -5,283,441,857,624,997,000 | 31.24 | 85 | 0.71464 | false |
rjonnal/zernike | __init__.py | 1 | 20006 | """This module contains functions for Zernike calculations. Mainly the private
function _zgen, a generator function for Zernike polynomials. The public
functions make use of _zgen to create height or slope maps in a unit
pupil, corresponding to individual Zernike terms.
Author: Ravi S. Jonnal / Werner Lab, UC Davis
R... | gpl-2.0 | 5,358,316,222,424,130,000 | 33.732639 | 112 | 0.517845 | false |
dongguangming/django-books | models.py | 1 | 1560 | #import all of the things we will be using
from django.db import models
from tagging.fields import TagField
# to help with translation of field names
from django.utils.translation import ugettext_lazy as _
# to have a generic foreign key for any model
from django.cont... | bsd-3-clause | 7,885,029,974,770,089,000 | 36.04878 | 76 | 0.633974 | false |
rspavel/spack | var/spack/repos/builtin/packages/bazel/package.py | 1 | 12437 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import re
class Bazel(Package):
"""Bazel is an open-source build and test tool similar to Make, Maven, and
Gradl... | lgpl-2.1 | 6,327,231,952,113,095,000 | 56.313364 | 168 | 0.733939 | false |
taarifa/taarifa_backend | taarifa_backend/models.py | 1 | 4325 | import datetime
from flask_security import RoleMixin, UserMixin
from flask_mongoengine.wtf import model_form
from taarifa_backend import db
fieldmap = {
'BinaryField': db.BinaryField,
'BooleanField': db.BooleanField,
'ComplexDateTimeField': db.ComplexDateTimeField,
'DateTimeField': db.DateTimeField,
... | bsd-3-clause | 7,360,685,039,675,874,000 | 30.801471 | 84 | 0.672139 | false |
SureshMatsui/SaveCoin | qa/rpc-tests/skeleton.py | 1 | 2232 | #!/usr/bin/env python
# Skeleton for python-based regression tests using
# JSON-RPC
# Add python-SaveCoinrpc to module search path:
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-SaveCoinrpc"))
import json
import shutil
import subprocess
import tempfile
import ... | mit | 2,976,008,050,888,033,000 | 27.253165 | 101 | 0.638441 | false |
gochaorg/mailscripts | emailer/mailer.py | 1 | 12253 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import smtplib
import os
import re
import sys
import imaplib
import email
import tempfile
import shutil
import datetime
import quopri
import base64
import hashlib
import quopri
import base64
import hashlib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase imp... | mit | -74,163,532,198,789,380 | 26.899743 | 114 | 0.656008 | false |
noironetworks/group-based-policy | gbpservice/neutron/db/servicechain_db.py | 1 | 30032 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 4,388,496,890,389,761,000 | 46.369085 | 80 | 0.565197 | false |
nihlaeth/HorseLife | interface/cli/display.py | 1 | 7394 | """Interface to inherit from for *Display classes."""
from textwrap import fill
from core.core import Core
from core.messagecore import MessageCore
from core.stablecore import StableCore
from core.pasturecore import PastureCore
from core.towncore import TownCore
from core.contractercore import ContracterCore
from supp... | gpl-2.0 | -9,055,528,757,811,274,000 | 34.37799 | 75 | 0.545983 | false |
mturilli/aimes.emanager | doc/conf.py | 1 | 10732 | # -*- coding: utf-8 -*-
#
# aimes.emanager documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 29 01:32:22 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | mit | 1,229,454,034,939,450,600 | 30.472141 | 88 | 0.709187 | false |
terrencepreilly/darglint | darglint/parse/grammars/numpy_receives_section.py | 1 | 5642 | # Generated on 2020-04-04 11:23:51.675046
from darglint.token import (
TokenType,
)
from darglint.parse.identifiers import (
NoqaIdentifier,
)
from darglint.parse.grammar import (
BaseGrammar,
P,
)
class ReceivesGrammar(BaseGrammar):
productions = [
P("receives-section", ([], "receives-h... | mit | -349,874,506,556,953,200 | 96.293103 | 766 | 0.606523 | false |
diogopaulo/kivyconfnav | Processes/ConfNavegacaoInserts.py | 1 | 2790 | def obtem_valor_bd(valor):
if valor == None:
return 'null'
elif isinstance(valor, bool):
return 1 if valor else 0
elif isinstance(valor, int):
return valor
else:
return "'" + valor.replace("'", "''") + "'"
class ConfNavegacaoInserts:
def __init__(self, configuracoes... | lgpl-3.0 | -8,103,772,840,879,177,000 | 43.285714 | 94 | 0.62043 | false |
zojoncj/cleanthehead | nsnitro/nsresources/nssslvserver.py | 1 | 23417 | from nsbaseresource import NSBaseResource
__author__ = 'Aleksandar Topuzovic'
class NSSSLVServer(NSBaseResource):
def __init__(self, json_data=None):
"""
Supplied with json_data the object can be pre-filled
"""
super(NSSSLVServer, self).__init__(... | apache-2.0 | -8,071,013,944,966,436,000 | 41.041293 | 105 | 0.503737 | false |
benvcarr/algorithms_course | hw2/carr-hw2.py | 1 | 5854 | #!/usr/bin/python
"""
Benjamin Carr
Homework #2 - MPCS 55001
Answers:
(1) Program below.
(2) My program is correct for all cases where both the numbers and the distances from the median
are unique. I spent a lot of time (30+ hrs) trying to figure out other ways of doing this other than using a
dictio... | apache-2.0 | -1,535,948,675,559,064,000 | 32.233918 | 116 | 0.640588 | false |
alorenzo175/pvlib-python | pvlib/test/test_forecast.py | 1 | 5733 | from datetime import datetime, timedelta
from pytz import timezone
import warnings
import pandas as pd
import pytest
from numpy.testing import assert_allclose
from conftest import requires_siphon, has_siphon, skip_windows
pytestmark = pytest.mark.skipif(not has_siphon, reason='requires siphon')
if has_siphon:
... | bsd-3-clause | 4,192,149,592,717,997,000 | 30.5 | 78 | 0.618873 | false |
USGSDenverPychron/pychron | pychron/spectrometer/base_magnet.py | 1 | 12604 | # ===============================================================================
# Copyright 2014 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | apache-2.0 | 4,398,844,861,938,323,000 | 33.157182 | 118 | 0.485401 | false |
jptomo/rpython-lang-scheme | rpython/translator/test/snippet.py | 1 | 19453 | """Snippets for translation
This module holds various snippets, to be used by translator
unittests.
We define argument types as default arguments to the snippet
functions.
"""
numtype = (int, float)
anytype = (int, float, str)
seqtype = (list, tuple)
def if_then_else(cond=anytype, x=anytype, y=anytype):
if cond... | mit | 713,307,751,522,421,600 | 16.384272 | 98 | 0.522027 | false |
cu-csc/automaton | tests/deployment_tests.py | 1 | 2068 | """
Module that tests various deployment functionality
To run me from command line:
cd automaton/tests
export PYTHONPATH=$PYTHONPATH:../
python -m unittest -v deployment_tests
unset PYTHONPATH
I should have used nose but
"""
import unittest
from lib import util
from deployment import common
class test_deployment_... | mit | 3,975,989,049,178,258,000 | 32.901639 | 76 | 0.62911 | false |
agirardeaudale/nbawebstats | docs/generaterequestrst.py | 1 | 2103 | #!/usr/bin/env python
from jinja2 import Environment, FileSystemLoader
import json
import os
THIS_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_PATH = os.path.abspath(os.path.join(THIS_DIR, '../nbawebstats/requests.json'))
RST_PATH = os.path.abspath(os.path.join(THIS_DIR, 'requests.rst'))
def format_internal... | mit | -3,689,226,585,242,646,500 | 35.258621 | 83 | 0.61864 | false |
OpenAcademy-OpenStack/nova-scheduler | nova/api/openstack/compute/plugins/v3/admin_password.py | 1 | 2734 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 1,025,928,680,341,808,000 | 35.453333 | 79 | 0.696781 | false |
syrusakbary/Djinja | setup.py | 1 | 1097 | from setuptools import setup, find_packages
setup(
name='Djinja',
version=".".join(map(str, __import__("djinja").__version__)),
description='A package that makes possible the integration of Jinja2 in Django, in a clean way.',
long_description=open('README.rst').read(),
author='Syrus Akbary Nieto',
... | bsd-3-clause | 165,900,132,703,426,240 | 35.566667 | 101 | 0.631723 | false |
wpjesus/codematch | ietf/group/mails.py | 1 | 2488 | # generation of mails
import re
from django.utils.html import strip_tags
from django.utils.text import wrap
from django.conf import settings
from django.core.urlresolvers import reverse as urlreverse
from ietf.utils.mail import send_mail, send_mail_text
from ietf.mailtrigger.utils import gather_address_lists
def ... | bsd-3-clause | -7,655,907,386,327,128,000 | 41.169492 | 159 | 0.659164 | false |
amaozhao/basecms | mptt/managers.py | 1 | 46897 | """
A custom manager for working with trees of objects.
"""
from __future__ import unicode_literals
import contextlib
from django.db import models, connections, router
from django.db.models import F, ManyToManyField, Max, Q
from django.utils.translation import ugettext as _
from mptt.exceptions import CantDisableUpda... | mit | -7,849,403,533,287,064,000 | 38.376154 | 99 | 0.543766 | false |
pickettd/SerialPort-RealTime-Data-Plotter | com_monitor.py | 1 | 5133 |
import Queue, threading, timeit, serial
from globals import *
class ComMonitorThread(threading.Thread):
""" A thread for monitoring a COM port. The COM port is
opened when the thread is started.
data_q:
Queue for received data. Items in the queue are
(dat... | mit | 5,029,071,917,656,844,000 | 31.283019 | 64 | 0.447691 | false |
fintech-circle/edx-platform | lms/djangoapps/gating/api.py | 1 | 4680 | """
API for the gating djangoapp
"""
from collections import defaultdict
import json
import logging
from lms.djangoapps.courseware.entrance_exams import get_entrance_exam_content
from openedx.core.lib.gating import api as gating_api
from opaque_keys.edx.keys import UsageKey
from util import milestones_helpers
log = ... | agpl-3.0 | -109,539,272,815,895,200 | 39.344828 | 113 | 0.678846 | false |
starnose/liar | liarutils.py | 1 | 3600 | ###################################################################################
# liarutils.py, utility calls for liar
###################################################################################
#
# Copyright 2013 David Hicks (Starnose Ltd)
#
# This file is part of Liar
#
# Liar is free software: you can... | gpl-3.0 | 8,115,426,600,985,354,000 | 40.37931 | 164 | 0.553611 | false |
Pinyto/cloud | keyserver/models.py | 1 | 4666 | # coding=utf-8
"""
Pinyto cloud - A secure cloud database for your personal data
Copyright (C) 2019 Pina Merkert <pina@pinae.net>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of t... | gpl-3.0 | -5,410,453,920,801,267,000 | 39.224138 | 103 | 0.661166 | false |
digitie/magneto | core/util.py | 1 | 3603 | # -*- coding: UTF-8 -*-
from time import sleep
import logging
import serial
import sys
import binascii
from log import MainLogger
def enum(*sequential, **named):
enums = dict(zip(sequential, range(len(sequential))), **named)
reverse = dict((value, key) for key, value in enums.iteritems())
enums['reverse_m... | unlicense | -5,885,136,105,583,912,000 | 28.540984 | 72 | 0.600888 | false |
robmcmullen/pyatasm | pyatasm/assemble.py | 1 | 3007 | from .pyatasm_mac65 import mac65_assemble
class Assemble(object):
def __init__(self, source, verbose=False):
self.verbose = verbose
if isinstance(source, str):
source = source.encode("utf-8")
self.errors, text = mac65_assemble(source)
self.segments = []
self.tran... | gpl-2.0 | -70,870,082,602,270,100 | 35.228916 | 95 | 0.536748 | false |
igorcoding/asynctnt | asynctnt/_testbase.py | 1 | 8329 | import asyncio
import contextlib
import functools
import inspect
import logging
import os
import time
import unittest
import sys
import asynctnt
from asynctnt.instance import \
TarantoolSyncInstance, TarantoolSyncDockerInstance
from asynctnt import TarantoolTuple
__all__ = (
'TestCase', 'TarantoolTestCase', ... | apache-2.0 | -4,799,521,511,850,995,000 | 29.621324 | 77 | 0.559611 | false |
stcakova/Battle-city | world.py | 1 | 1375 | import pygame
from pygame import rect
from constants import *
from part import Wall, Brick
class World:
world = [[None for x in range(26)] for y in range(19)]
def __init__(self):
self.brick = pygame.image.load("pictures/brick.jpeg")
self.wall = pygame.image.load("pictures/wall.png")
... | gpl-2.0 | 8,877,047,811,533,497,000 | 33.375 | 64 | 0.555636 | false |
DTOcean/dtocean-core | test_data/inputs_wp2_wave.py | 1 | 3952 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 09 10:39:38 2015
@author: 108630
"""
import os
from datetime import datetime, timedelta
import numpy as np
dir_path = os.path.dirname(__file__)
# Setup
x = np.linspace(0.,1000.,20.)
y = np.linspace(0.,300.,20.)
nx = len(x)
ny = len(y)
# Bathymetry?
X, Y = np.meshgr... | gpl-3.0 | 6,940,826,449,139,902,000 | 27.846715 | 84 | 0.584008 | false |
qsnake/gpaw | gpaw/test/xcatom.py | 1 | 1515 | import numpy as np
import numpy.random as ra
from gpaw.setup import create_setup
from gpaw.xc import XC
from gpaw.test import equal
x = 0.000001
ra.seed(8)
for xc in ['LDA', 'PBE']:
print xc
xc = XC(xc)
s = create_setup('N', xc)
ni = s.ni
nii = ni * (ni + 1) // 2
D_p = 0.1 * ra.random(nii) + 0... | gpl-3.0 | -138,882,968,460,386,080 | 30.5625 | 77 | 0.473267 | false |
cabanm/project-euler | problem46.py | 1 | 1213 | # Project Euler - Problem 46
# --------------------------
# What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?
from myMath import isPrime
from time import time
# Find primes up to a certain number and output a list of them
def primes(top):
seive = range(2, top+1)
for... | gpl-2.0 | -4,701,724,964,660,752,000 | 29.325 | 101 | 0.663644 | false |
tdjordan/tortoisegit | gitgtk/addremove.py | 1 | 1219 | #
# Add/Remove dialog for TortoiseHg
#
# Copyright (C) 2007 TK Soh <teekaysoh@gmail.com>
#
try:
import pygtk
pygtk.require("2.0")
except:
pass
import gtk
import gobject
from mercurial import ui, util, hg
from mercurial.i18n import _
from status import GStatus
def run(hgcmd='add', root='', cwd='', files=[... | gpl-2.0 | 2,293,648,415,399,881,700 | 23.38 | 80 | 0.579984 | false |
vaimi/pydisambiguation | ui/qtgui.py | 1 | 6824 | from PyQt5.QtWidgets import (QWidget, QFrame, QLabel, QPushButton, QComboBox, QLineEdit,QTextEdit, QGridLayout, QApplication, QHBoxLayout, QRadioButton)
import logging
class AlgorithmRadioButton(QRadioButton):
def __init__(self, text, id=None, group=None):
super().__init__(text)
self.algorithmId = ... | gpl-3.0 | -1,755,694,650,714,857,700 | 36.494505 | 215 | 0.637749 | false |
armstrong/armstrong.utils.backends | armstrong/utils/backends/base.py | 1 | 2522 | from django.conf import settings as default_settings
from django.core.exceptions import ImproperlyConfigured
try:
from importlib import import_module
except ImportError: # PY26 # pragma: no cover
from django.utils.importlib import import_module
# DEPRECATED: To be removed in Backends 2.0
import warnings
DID_... | apache-2.0 | -8,133,730,749,667,820,000 | 31.753247 | 80 | 0.599524 | false |
hroncok/python-brainfuck | test.py | 1 | 5155 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
# tested modules
import brainx
import image_png
#
# Class with temporary fake output
#
import sys
class FakeStdOut:
def write(self, *args, **kwargs):
pass
def flush(self):
pass
#
# Classes with tests
#
class TestBrainfuck... | isc | 4,899,451,979,865,395,000 | 29.844311 | 179 | 0.562027 | false |
piotrmaslanka/satella | satella/configuration/schema/basic.py | 1 | 6186 | import codecs
import os
import re
import typing as tp
from satella.exceptions import ConfigurationValidationError
from .base import Descriptor, ConfigDictValue
from .registry import register_custom_descriptor
@staticmethod
def _make_boolean(v: tp.Any) -> bool:
if isinstance(v, str):
if v.upper() == 'TRUE... | bsd-3-clause | 4,943,166,276,343,785,000 | 25.435897 | 98 | 0.585031 | false |
citrix-openstack-build/python-cinderclient | cinderclient/v2/quotas.py | 1 | 1597 | # Copyright (c) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | 1,890,877,957,061,482,800 | 32.270833 | 78 | 0.647464 | false |
aaronmckinstry706/twitter-crime-prediction | src/jobs/crime_prediction/run.py | 1 | 13899 | import datetime
import logging
import operator
import os
import sys
import pyspark as pyspark
import pyspark.ml.feature as feature
import pyspark.ml.classification as classification
import pyspark.ml as ml
import pyspark.ml.clustering as clustering
import pyspark.sql as sql
import pyspark.sql.functions as functions
im... | gpl-3.0 | 3,743,084,505,325,110,000 | 38.598291 | 118 | 0.66163 | false |
RuthAngus/LSST-max | code/GP_periodogram.py | 1 | 1066 | from __future__ import print_function
import numpy as np
import matplotlib.pyplot as plt
from GProtation import make_plot, lnprob, neglnlike
import emcee
import time
import george
from george.kernels import ExpSquaredKernel, ExpSine2Kernel
import scipy.optimize as spo
def GP_periodogram(x, y, yerr, p_init, plims, N):
... | mit | -6,016,110,204,443,567,000 | 27.052632 | 77 | 0.707317 | false |
cffex/cmdb | test/project/webci_attr_type.py | 1 | 10754 | #!/usr/bin/python
#coding: utf-8
#print "Content-type: text/html\n"
#Author: LIPH
import web
import demjson
import json
import string
import time
import urlparse
import webci_attr
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
render = web.template.render('templates/')
urls = ( '/ciattrtyp... | apache-2.0 | 268,012,882,790,708,770 | 56.118919 | 407 | 0.603981 | false |
egemsoft/esef-yawd-translation | translations/utils.py | 1 | 5003 | import os
import sys
from django.conf import settings
from django.utils.encoding import smart_str
from django.utils.translation import check_for_language
from django.utils.translation.trans_real import get_language_from_path
_default = None
_supported = []
def get_default_language():
"""
Detects the default... | bsd-3-clause | -1,003,490,242,642,508,300 | 31.914474 | 105 | 0.681991 | false |
DBeath/flask-feedrsub | feedrsub/feeds/feedfinder/feedfinder4.py | 1 | 7270 | import logging
import time
from typing import Tuple
from urllib.parse import urlsplit, urljoin
from bs4 import BeautifulSoup
from feedrsub.feeds.feedfinder.feedinfo import FeedInfo
from feedrsub.utils.requests_session import RequestsSession, requests_session
logger = logging.getLogger("feedfinder4")
def coerce_url... | mit | -221,718,999,646,376,000 | 28.552846 | 88 | 0.587895 | false |
Badg/hwiopy | hwiopy/platforms/beagle.py | 1 | 6484 | ''' Beaglebone/Beagleboard/Etc hardware-specific operations.
LICENSING
-------------------------------------------------
hwiopy: A common API for hardware input/output access.
Copyright (C) 2014-2015 Nicholas Badger
badg@nickbadger.com
nickbadger.com
This library is free software; you can redistribut... | lgpl-2.1 | -8,934,214,126,180,577,000 | 34.244565 | 78 | 0.571869 | false |
TalwalkarLab/paleo | paleo/layers/conv.py | 1 | 11804 | """The module estimates 2D convolution layers."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import math
import six
from paleo.layers import base
class Deconv2D(base.BaseLayer):
"""Deconv2D"""
def __init__(self,
name,
... | apache-2.0 | 4,500,665,056,704,952,000 | 33.923077 | 119 | 0.527194 | false |
nathaliaspatricio/febracev | friends/views.py | 1 | 1329 | # -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from friends.utils import get_following_set, get_follower_set, get_mutual_set
from django.contrib.auth.decorators import login_requi... | gpl-2.0 | -6,370,096,574,285,482,000 | 38.088235 | 77 | 0.712566 | false |
cstipkovic/spidermonkey-research | testing/marionette/harness/marionette/tests/unit/test_switch_remote_frame.py | 1 | 5471 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from marionette import MarionetteTestCase
from marionette_driver.by import By
OOP_BY_DEFAULT = "dom.ipc.browser_frames... | mpl-2.0 | 5,705,097,036,018,414,000 | 45.760684 | 94 | 0.618351 | false |
stuaxo/mnd | mnd/handler.py | 1 | 6612 | """
To make callbacks work with instance methods some things need to happen.
The handler decorator attaches instances of MNDInfo to functions to enable
the dispatcher to work with classes and instances via the Handler metaclass.
At instance creation time the metaclass converts finds any handlers with
MNDFunction, rep... | mit | -7,329,817,114,201,264,000 | 27.747826 | 85 | 0.598306 | false |
ofirpicazo/solitario | bin/generate_cards.py | 1 | 8706 | #!/usr/bin/python
# coding: utf-8
import argparse
import sys
SUIT_MAP = {
'club': '♣',
'diamond': '♦',
'heart': '♥',
'spade': '♠',
}
templateA = """
<div class="card %(suit)s" id="%(id)s" data-suit="%(suit)s" data-number="%(number)s">
<div class="flipper">
<div class="front">
<div class="corner t... | mit | 7,593,103,439,347,813,000 | 30.977941 | 85 | 0.557714 | false |
Aahung/Handbook-for-Programming-Contest | source/conf.py | 1 | 9229 | # -*- coding: utf-8 -*-
#
# sphinx test documentation build configuration file, created by
# sphinx-quickstart on Sat May 9 20:23:49 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#... | cc0-1.0 | -6,724,777,362,360,831,000 | 31.269231 | 79 | 0.707661 | false |
brython-dev/brython | www/src/Lib/threading.py | 1 | 51971 | """Thread module emulating a subset of Java's threading model."""
import os as _os
import sys as _sys
import _thread
import functools
from time import monotonic as _time
from _weakrefset import WeakSet
from itertools import islice as _islice, count as _count
try:
from _collections import deque as _deque
except Im... | bsd-3-clause | -4,337,143,701,189,812,000 | 33.601198 | 92 | 0.61086 | false |
darbula/django-form-designer | form_designer/migrations/0002_auto_20160216_1527.py | 1 | 1389 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('form_designer', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='formdefinition',
... | bsd-3-clause | 1,623,216,130,215,411,700 | 52.423077 | 588 | 0.648668 | false |
schlegelp/pymaid | setup.py | 1 | 1845 | from setuptools import setup, find_packages
import re
VERSIONFILE = "pymaid/__init__.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." %... | gpl-3.0 | 5,979,263,114,792,834,000 | 33.166667 | 85 | 0.6271 | false |
Hawk94/dust | docs/conf.py | 1 | 7737 | # dust documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are com... | mit | 5,812,458,023,415,810,000 | 30.839506 | 80 | 0.693421 | false |
braddockcg/internet-in-a-box | iiab/whoosh_search.py | 1 | 3339 | import os
from whoosh.qparser import MultifieldParser
from whoosh import scoring
from .whoosh_multi_field_spelling_correction import MultiFieldQueryCorrector
import pagination_helper
def index_directory_path(base_path, zim_name):
"""Returns the directory where a ZIM file's index should be located, given
a ba... | bsd-2-clause | -3,125,193,210,656,872,000 | 43.52 | 126 | 0.712788 | false |
copotron/car-control | datacollection/prius/log.py | 1 | 1840 | # Copyright (C) 2017 Swift Navigation Inc.
# Contact: Swift Navigation <dev@swiftnav.com>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY K... | gpl-3.0 | -1,142,508,516,065,610,600 | 35.8 | 113 | 0.643478 | false |
PDXCodeCoop/account | models.py | 1 | 1688 | from django.db import models
from django import forms
from django.contrib.auth.models import User
from django.utils import timezone
from easy_thumbnails.fields import ThumbnailerImageField
#A User's Personal Info
class Profile(models.Model):
user = models.OneToOneField(User)
photo = ThumbnailerImageField(upl... | apache-2.0 | 601,757,445,029,764,600 | 33.44898 | 91 | 0.637441 | false |
Arkshine/AdminFreeLook | support/generate_headers.py | 1 | 2611 | # vim: set ts=8 sts=2 sw=2 tw=99 et:
import re
import os, sys
import subprocess
argv = sys.argv[1:]
if len(argv) < 2:
sys.stderr.write('Usage: generate_headers.py <source_path> <output_folder>\n')
sys.exit(1)
SourceFolder = os.path.abspath(os.path.normpath(argv[0]))
OutputFolder = os.path.normpath(argv[1])
class... | gpl-2.0 | -469,546,346,124,041,700 | 30.457831 | 87 | 0.654538 | false |
genonfire/bbgo | recipes/migrations/0001_initial.py | 1 | 1108 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(ver... | mit | 5,277,985,640,252,880,000 | 33.625 | 114 | 0.544224 | false |
anarcoder/google_explorer | plugins/apache_rce_struts2_cve_2017_5638.py | 1 | 3545 | import os
from lxml import html as lh
from queue import Queue
from urllib.parse import urlparse
from threading import Thread
import requests
import threading
from requests import get
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning... | mit | -3,332,205,755,041,157,000 | 29.450549 | 101 | 0.452183 | false |
ChristosChristofidis/h2o-3 | scripts/run.py | 1 | 66029 | #!/usr/bin/python
import sys
import os
import shutil
import signal
import time
import random
import getpass
import re
import subprocess
import ConfigParser
def is_python_test_file(file_name):
"""
Return True if file_name matches a regexp for a python test. False otherwise.
"""
if (file_name == "tes... | apache-2.0 | -4,628,322,847,902,796,000 | 32.517259 | 119 | 0.513729 | false |
shollingsworth/HackerRank | python/re-sub-regex-substitution/main.py | 1 | 1291 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import __future__
import sys
import json
def banner():
ban = '====' * 30
print("{}\nSAMPLE INP:\n{}\n{}".format(ban,ban,open(ip, 'r').read()))
print("{}\nSAMPLE OUT:\n{}\n{}".format(ban,ban,open(op, 'r').read()))
print("{}\nSTART:\n{}".format(ban,ban))
... | apache-2.0 | 8,672,584,622,276,070,000 | 22.907407 | 109 | 0.573974 | false |
alexholehouse/SBMLIntegrator | libsbml-5.0.0/src/bindings/python/test/sbml/TestReadFromFile5.py | 1 | 6830 | #
# @file TestReadFromFile5.py
# @brief Reads test-data/l2v1-assignment.xml into memory and tests it.
#
# @author Akiya Jouraku (Python conversion)
# @author Ben Bornstein
#
# $Id$
# $HeadURL$
#
# ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ======
#
# DO NOT EDIT THIS FILE.
#
# This f... | gpl-3.0 | 6,617,555,545,422,540,000 | 34.759162 | 79 | 0.585066 | false |
wfwei/ReadWeibo | classifier/DataProcess.py | 1 | 3547 | # !/usr/bin/python
# -*- coding: utf-8 -*-
'''
Created on 2013-9-2
@author: plex
'''
from ReadWeibo.mainapp.models import Weibo
from ReadWeibo.account.models import Account
from djangodb.WeiboDao import WeiboDao
from datetime import datetime
from sets import Set
import numpy as np
import re
import jieba
jieba.load_u... | apache-2.0 | 5,765,088,084,828,768,000 | 22.206667 | 70 | 0.670497 | false |
ewiger/decade | lib/antlr3c/genclib.py | 1 | 1592 | #!/usr/bin/python
'''
This code will automatically generate most of the ctypes from ANTLR3 C runtime
headers.
'''
import os
import sys
import ext_path
from pyclibrary import *
from glob import glob
ANTLR3C_INCLUDE = os.path.join(
os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
'libantlr3c-3.4',... | bsd-3-clause | -3,333,805,171,277,549,600 | 25.533333 | 87 | 0.627513 | false |
eunchong/build | scripts/slave/recipe_modules/archive/example.py | 1 | 3528 | # Copyright 2015 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.
DEPS = [
'archive',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/platform',
'recipe_engine/properties',
]
TEST_HASH_MAIN='5e3250aadd... | bsd-3-clause | -6,284,614,575,291,679,000 | 29.947368 | 79 | 0.642574 | false |
SteveDiamond/cvxpy | cvxpy/reductions/dcp2cone/atom_canonicalizers/__init__.py | 2 | 3720 | """
Copyright 2013 Steven Diamond
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | gpl-3.0 | -7,737,156,368,280,461,000 | 42.255814 | 87 | 0.774731 | false |
tseaver/google-cloud-python | asset/synth.py | 1 | 3228 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 1,773,273,584,265,377,000 | 35.269663 | 95 | 0.619579 | false |
karel-brinda/rnftools | rnftools/rnfformat/Validator.py | 1 | 4484 | import rnftools.rnfformat
import re
reg_lrn = re.compile(r"^([!-?A-^`-~]*)__([0-9a-f]+)__([!-?A-^`-~]+)__([!-?A-^`-~]*)$")
reg_prefix_part = re.compile(r"^[!-?A-^`-~]*$")
reg_id_part = re.compile(r"^[0-9a-f]+$")
reg_segmental_part = re.compile(r"^(?:(\([0-9FRN,]*\))(?:,(?!$)|$))+$")
reg_suffix_part = re.compile(r"^(?:... | mit | -313,604,499,112,898,240 | 37.991304 | 119 | 0.533452 | false |
mlperf/inference_results_v0.5 | closed/NVIDIA/code/common/harness.py | 1 | 13993 | # Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | -5,496,312,983,046,946,000 | 39.20977 | 186 | 0.590652 | false |
alnaav/shredNN | nn/train/gradient_descent_trainer.py | 1 | 3264 | import numpy as np
from nn.train.trainer import Trainer
class LayerData:
def __init__(self, layer):
self.z = np.zeros(layer.size)
self.a = np.zeros(layer.size)
self.neuron_error = np.zeros(layer.size)
self.grad_w = np.zeros(layer.w.shape)
self.grad_b = np.zeros(layer.b.sha... | apache-2.0 | -6,355,674,511,678,844,000 | 31.64 | 118 | 0.543811 | false |
andyvand/cygsystem-config-llvm | src/Properties_Renderer.py | 1 | 7792 | """This renderer class renders volume properties into a separate
drawing area next to the main volume rendering drawing area.
"""
import sys
import math
import operator
import types
import select
import signal
import gobject
import pango
import string
import os
from lvmui_constants import *
import stat
import gett... | gpl-2.0 | -4,781,185,715,055,585,000 | 36.104762 | 95 | 0.602156 | false |
droobey/meeseeksbox | src/action.py | 1 | 16274 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | mit | 8,872,446,751,623,612,000 | 34.924945 | 150 | 0.572508 | false |
theeluwin/textrankr | textrankr/utils.py | 1 | 2716 | from typing import (
List,
Tuple,
Callable,
)
from re import split
from itertools import combinations
from collections import Counter
from networkx import Graph
from .sentence import Sentence
__all__: Tuple[str, ...] = (
'parse_text_into_sentences',
'multiset_jaccard_index',
'build_sentence... | mit | -7,227,328,344,896,412,000 | 27.893617 | 126 | 0.647275 | false |
dc3-plaso/plaso | plaso/parsers/winreg_plugins/usbstor.py | 1 | 4441 | # -*- coding: utf-8 -*-
"""File containing a Windows Registry plugin to parse the USBStor key."""
import logging
from plaso.containers import windows_events
from plaso.parsers import winreg
from plaso.parsers.winreg_plugins import interface
__author__ = 'David Nides (david.nides@gmail.com)'
class USBStorPlugin(in... | apache-2.0 | 7,311,776,805,502,006,000 | 38.651786 | 79 | 0.665166 | false |
unreal666/outwiker | src/outwiker/gui/basepagepanel.py | 2 | 4433 | # -*- coding: utf-8 -*-
import logging
import os.path
import wx
from wx.lib.scrolledpanel import ScrolledPanel
from outwiker.core.event import Event
logger = logging.getLogger('outwiker.gui.pasepagepanel')
class BasePagePanel(ScrolledPanel):
"""
Базовый класс для панелей представления страниц
"""
... | gpl-3.0 | -5,303,935,627,709,025,000 | 25.157534 | 95 | 0.584446 | false |
mozilla-it/mozlibldap | examples/make-pubkeys-investigation.py | 1 | 3570 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2015 Mozilla Corporation
# Author: jvehent@mozilla.com
# Requires:
# mozlibldap
f... | mpl-2.0 | -8,203,583,225,681,633,000 | 35.428571 | 95 | 0.564426 | false |
BlackHole/enigma2-obh10 | lib/python/Components/TimerSanityCheck.py | 2 | 13683 | import NavigationInstance
from time import localtime, mktime, gmtime, time
from enigma import iServiceInformation, eServiceCenter, eServiceReference, getBestPlayableServiceReference
from timer import TimerEntry
import RecordTimer
from Tools.CIHelper import cihelper
from Components.config import config
class TimerSani... | gpl-2.0 | -3,732,489,084,296,369,700 | 39.602374 | 171 | 0.655631 | false |
scorpilix/Golemtest | golem/interface/client/environments.py | 1 | 1674 | from golem.core.deferred import sync_wait
from golem.interface.command import group, Argument, command, CommandResult
@group(name="envs", help="Manage environments")
class Environments(object):
name = Argument('name', help="Environment name")
table_headers = ['name', 'supported', 'active', 'performance',
... | gpl-3.0 | 2,024,806,146,087,001,300 | 30 | 75 | 0.603345 | false |
ionelmc/python-aspectlib | tests/test_aspectlib_test.py | 1 | 17683 | from __future__ import print_function
from pytest import raises
from test_pkg1.test_pkg2 import test_mod
from aspectlib import PY2
from aspectlib.test import OrderedDict
from aspectlib.test import Story
from aspectlib.test import StoryResultWrapper
from aspectlib.test import _Binds
from aspectlib.test import _format_... | bsd-2-clause | 88,641,805,288,770,620 | 30.408526 | 96 | 0.565402 | false |
pyrrho314/recipesystem | trunk/astrodata/DataSpider.py | 1 | 42351 | try:
import pyfits
except:
pass
import os
import re
from AstroData import *
ldebug = False
verbose = False
from astrodata.adutils import terminal
from ReductionContextRecords import AstroDataRecord
import subprocess
import os
from copy import copy,deepcopy
from AstroData import Errors
from astrodata import new... | mpl-2.0 | 8,175,685,783,328,367,000 | 42.48152 | 138 | 0.378928 | false |
teamclairvoyant/airflow-scheduler-failover-controller | scheduler_failover_controller/metadata/base_metadata_service.py | 1 | 1260 | import datetime
from scheduler_failover_controller.utils import date_utils
class BaseMetadataService:
def initialize_metadata_source(self):
raise NotImplementedError
def get_failover_heartbeat(self):
raise NotImplementedError
def set_failover_heartbeat(self):
raise NotImplemente... | apache-2.0 | 6,998,434,482,056,831,000 | 30.5 | 100 | 0.637302 | false |
freiheit/Bay-Oh-Woolph | cogs/basicpromotions.py | 1 | 14770 | from discord.ext import commands
from utils import *
import discord
import asyncio
from cogs.updateroster import UpdateRoster
from config import Config
import logging
logger = logging.getLogger('bayohwoolph.cogs.basicpromotions')
BASICPROMOTIONS = Config.config['BASICPROMOTIONS']
ROLE_CADET = BASICPROMOTIONS['ROLE_... | agpl-3.0 | -6,239,468,246,116,860,000 | 43.221557 | 213 | 0.673527 | false |
stvstnfrd/edx-platform | lms/djangoapps/verify_student/tasks.py | 1 | 5646 | """
Django Celery tasks for service status app
"""
import logging
from smtplib import SMTPException
import requests
import simplejson
from celery import Task, shared_task
from celery.states import FAILURE
from django.conf import settings
from django.core.mail import EmailMessage
from edx_django_utils.monitoring impor... | agpl-3.0 | -5,051,165,563,618,291,000 | 37.937931 | 106 | 0.667906 | false |
holgerd77/django-dynamic-scraper | tests/scraper/models.py | 1 | 1421 | #Stage 2 Update (Python 3)
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from builtins import str
from django.db import models
from dynamic_scraper.models import Scraper, SchedulerRuntime
from scrapy_djangoitem import DjangoItem
@python_2_unicode_compatible
clas... | bsd-3-clause | -963,004,689,120,053,800 | 33.658537 | 107 | 0.708656 | false |
mjirik/io3d | io3d/misc.py | 1 | 8466 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# import sys
import os
from loguru import logger
import sys
import os.path
import numpy as np
from io import open
from .image import DataPlus
path_to_script = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(path_to_script, "./extern/sPickle"))
... | mit | -4,283,288,989,103,422,000 | 27.505051 | 84 | 0.568037 | false |
mwatts15/YAROM | examples/adding_data.py | 1 | 1499 | import yarom as Y
import rdflib
Y.connect({'rdf.namespace': rdflib.Namespace("http://example.org/")})
def p1():
mary = Y.DataObject(key='mary')
fido = Y.DataObject(key='fido')
mary.relate('has_pet', fido)
mary.relate('age', Y.Quantity(23, 'years'))
mary.relate('email', "mary@example.org")
Y.pri... | bsd-3-clause | -940,927,674,706,282,800 | 25.298246 | 69 | 0.597065 | false |
archifix/settings | sublime/Packages/Jedi - Python autocompletion/dependencies/jedi/__init__.py | 1 | 1830 | """
Jedi is a static analysis tool for Python that can be used in IDEs/editors. Its
historic focus is autocompletion, but does static analysis for now as well.
Jedi is fast and is very well tested. It understands Python on a deeper level
than all other static analysis frameworks for Python.
Jedi has support for two di... | mit | 4,224,056,168,648,134,000 | 37.93617 | 79 | 0.737705 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.