repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
HRODEV/Frequency | Frequency/GameLogic/GameLogic.py | 1 | 2226 | from GameLogic import BarrackFactory
from GameLogic import UnitFactory
from GameLogic.Player import Player
class GameLogic:
def __init__(self, players, _turn=0):
self.Players = players
self._turn = _turn
from GameLogic.Map import Map
self._map = Map(self)
@property
def Map... | mit | -8,867,589,860,559,513,000 | 27.538462 | 87 | 0.615903 | false | 4.010811 | false | false | false |
BoPeng/simuPOP | docs/mutatorVSP.py | 1 | 3347 | #!/usr/bin/env python
#
# $File: mutatorVSP.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redistribute... | gpl-2.0 | 4,371,186,255,659,703,300 | 35.380435 | 97 | 0.647445 | false | 3.310584 | false | false | false |
crask/redisproxy | test/test.py | 1 | 6318 | #!/usr/bin/env python
import memcache as mc
import redis
import time
import unittest2 as unittest
import yaml
import string
import random
def id_generator(size=8, chars=string.ascii_letters + string.digits):
return ''.join(random.choice(chars) for x in range(size))
def load_conf(filename):
return yaml.load(o... | apache-2.0 | 4,395,494,815,288,156,000 | 29.819512 | 86 | 0.581671 | false | 3.469522 | true | false | false |
lnussel/osc | osc/core.py | 1 | 309117 | # Copyright (C) 2006 Novell Inc. All rights reserved.
# This program is free software; it may be used, copied, modified
# and distributed under the terms of the GNU General Public Licence,
# either version 2, or version 3 (at your option).
from __future__ import print_function
__version__ = '0.171.git'
# __store_ve... | gpl-2.0 | -5,444,135,780,350,646,000 | 37.760752 | 364 | 0.551626 | false | 3.823671 | false | false | false |
fhcflx/alt-pub | fabfile.py | 1 | 2473 | from fabric.api import *
import fabric.contrib.project as project
import os
import shutil
import sys
import SocketServer
from pelican.server import ComplexHTTPRequestHandler
# Local path configuration (can be absolute or relative to fabfile)
env.deploy_path = 'public'
DEPLOY_PATH = env.deploy_path
# Remote server co... | cc0-1.0 | -720,392,187,051,187,200 | 25.308511 | 76 | 0.657905 | false | 3.604956 | false | false | false |
gregpechiro/dndtools | dndtools/dnd/filters.py | 1 | 14072 | # -*- coding: utf-8 -*-
from dndtools import django_filters2
from dndtools.dnd.models import (
Spell, DndEdition, SpellSchool, SpellSubSchool, SpellDescriptor, FeatCategory,
CharacterClass, Rulebook, Domain, Feat, Skill, Item, Language, RaceType, ItemSlot,
ItemProperty, Deity, Rule)
from dndtools.dnd.filte... | mit | -1,290,737,780,061,080,600 | 30.342984 | 114 | 0.63438 | false | 3.743549 | false | false | false |
sealcode/gpandoc | table_widget.py | 1 | 1780 | import PyQt5
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QLabel
from PyQt5.QtWidgets import QLineEdit
from PyQt5.QtWidgets import QListView
from PyQt5.QtWidgets import QPushButton
from PyQt5.QtWidgets import QTableWidget
from PyQt5.QtWidgets import QPlainTextEdit
from PyQt5.QtWidgets import QTableWidgetIte... | lgpl-3.0 | 1,876,793,916,902,599,400 | 31.944444 | 73 | 0.658797 | false | 3.761099 | false | false | false |
erigones/esdc-ce | core/urls.py | 1 | 1161 | from django.conf.urls import url, include, patterns
from django.contrib import admin
from django.conf import settings
handler403 = 'core.views.forbidden'
handler404 = 'core.views.page_not_found'
handler500 = 'core.views.server_error'
urlpatterns = patterns(
'core.views',
# api urls - WARNING: Do NOT change t... | apache-2.0 | 2,942,097,458,302,777,300 | 33.147059 | 104 | 0.615848 | false | 3.781759 | false | false | false |
jaumemarti/l10n-spain-txerpa | l10n_es_payment_order/wizard/csb58.py | 1 | 15333 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2006 ACYSOS S.L. (http://acysos.com)
# Pedro Tarrafeta <pedro@acysos.com>
# Copyright (c) 2008 Pablo Rocandio. All Rights Res... | agpl-3.0 | 8,593,853,676,416,834,000 | 44.900901 | 79 | 0.52352 | false | 3.364517 | true | false | false |
cmu-delphi/delphi-epidata | src/server/endpoints/ght.py | 1 | 1031 | from flask import Blueprint, request
from .._config import AUTH
from .._query import execute_query, QueryBuilder
from .._validate import check_auth_token, extract_integers, extract_strings, require_all
# first argument is the endpoint name
bp = Blueprint("ght", __name__)
alias = None
@bp.route("/", methods=("GET", ... | mit | -3,238,699,512,166,556,000 | 26.864865 | 88 | 0.670223 | false | 3.506803 | false | false | false |
ichuang/sympy | sympy/series/order.py | 1 | 7958 | from sympy.core import Basic, S, sympify, Expr, Rational, Symbol
from sympy.core import Add, Mul
from sympy.core.cache import cacheit
from sympy.core.compatibility import cmp_to_key
class Order(Expr):
""" Represents the limiting behavior of some function
The order of a function characterizes the function base... | bsd-3-clause | 521,524,758,839,641,860 | 30.330709 | 106 | 0.54197 | false | 3.746704 | false | false | false |
FederatedAI/FATE | python/federatedml/feature/feature_selection/model_adapter/statistic_adapter.py | 1 | 1585 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE Authors. 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/lic... | apache-2.0 | -1,514,203,313,510,065,000 | 40.710526 | 88 | 0.68959 | false | 3.903941 | false | false | false |
mirestrepo/voxels-at-lems | registration_eval/multimodal_vishal/random_transform.py | 1 | 1537 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: Maria Isabel Restrepo
# @Date: 2014-01-08 14:34:42
# @Last Modified by: Maria Isabel Restrepo
# @Last Modified time: 2014-01-15 10:20:14
#
# A file to generate rigid transformations
import rotations
import transformations as tf
import numpy as np
for trial... | bsd-2-clause | -5,758,851,073,942,741,000 | 26.446429 | 97 | 0.607027 | false | 2.933206 | false | false | false |
lcoandrade/DsgTools | core/DSGToolsProcessingAlgs/Algs/OtherAlgs/raiseFlagsAlgorithm.py | 1 | 9424 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
DsgTools
A QGIS plugin
Brazilian Army Cartographic Production Tools
-------------------
begin : 2019-01-04
git sha ... | gpl-2.0 | -7,668,695,703,256,355,000 | 41.075893 | 156 | 0.567593 | false | 5.530516 | false | false | false |
marcelotrevisani/vtky | setup.py | 1 | 1633 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
setup(
name='vtky',
packages=['vtky'],
version='0.1.0',
autho... | mit | 2,189,444,242,208,070,400 | 31.68 | 76 | 0.611145 | false | 3.916067 | false | false | false |
triveous/PyMovieCount | moviecount.py | 1 | 2333 | __author__ = 'sohammondal'
import sys
import urllib
import re
def sortFunc(tuple):
'''
simple key comparison method for sorting
:param tuple:
:return:
'''
return tuple[-1]
def openAndCount(url):
'''
opens a site and finds the following movie pattern
serial number: 1.
movie na... | apache-2.0 | 5,050,906,400,376,594,000 | 26.447059 | 87 | 0.559794 | false | 4.249545 | false | false | false |
rerb/tripping-sansa-harness | tripping_sansa_harness/settings.py | 1 | 2069 | """
Django settings for tripping_sansa_harness project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BA... | gpl-2.0 | 6,975,749,084,224,183,000 | 23.927711 | 71 | 0.727405 | false | 3.217729 | false | false | false |
chirpradio/chirpradio-volunteers | site-packages/migrate/versioning/pathed.py | 1 | 2019 | """
A path/directory class.
"""
from migrate.versioning.base import *
from migrate.versioning.util import KeyedInstance
from migrate.versioning import exceptions
import os
import shutil
class Pathed(KeyedInstance):
"""
A class associated with a path/directory tree.
Only one instance of this class may... | mit | 6,190,412,673,342,063,000 | 27.041667 | 79 | 0.605745 | false | 4.154321 | false | false | false |
kernevil/samba | source4/torture/drs/python/drs_base.py | 1 | 24898 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Unix SMB/CIFS implementation.
# Copyright (C) Kamen Mazdrashki <kamenim@samba.org> 2011
# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2016
# Copyright (C) Catalyst IT Ltd. 2016
#
# This program is free software; you can redistribute it and/or modify
# it under t... | gpl-3.0 | 7,851,796,401,282,473,000 | 39.418831 | 109 | 0.57587 | false | 3.633684 | true | false | false |
sverros/MMCP | realizations.py | 1 | 6392 | import numpy as np
import copy
import os
import h5py
from mapio.shake import ShakeGrid
from openquake.hazardlib.geo.geodetic import distance
from readstation import readStation
from init_grid import initialize
def realizations(total_real, my_reals, radius, variables, grid_arr, mu_arr, sigma_arr, list_sizes_grid, list... | unlicense | -7,121,845,106,338,485,000 | 39.201258 | 136 | 0.618116 | false | 3.310202 | false | false | false |
thuykn/GUI-nlu-pyflask | welcome.py | 1 | 3906 | # Copyright 2015 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | 363,654,631,083,258,300 | 33.875 | 131 | 0.654634 | false | 3.759384 | false | false | false |
awirbel/debadvect | 2D_btest/read_inputfiles.py | 1 | 3281 | """
This function just reads all the required input files for the 2D three body rotation test
Copyright 2017 Anna Wirbel
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 ve... | gpl-3.0 | 5,247,983,543,264,705,000 | 32.824742 | 93 | 0.703444 | false | 2.773457 | false | false | false |
Suwmlee/XX-Net | gae_proxy/server/lib/google/appengine/api/prospective_search/error_pb.py | 1 | 2614 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | bsd-2-clause | -8,065,221,845,336,901,000 | 21.730435 | 74 | 0.688217 | false | 3.640669 | false | false | false |
EdwardJKim/nbgrader | nbgrader/tests/nbextensions/test_assignment_list.py | 1 | 13603 | import pytest
import os
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException, NoSuchElementException
from .. import run_nbgrader
from .conftest import... | bsd-3-clause | 5,221,054,896,851,864,000 | 44.192691 | 138 | 0.699919 | false | 3.472811 | true | false | false |
RamonGuiuGou/l10n-spain | l10n_es_aeat/wizard/export_to_boe.py | 1 | 8986 | # -*- coding: utf-8 -*-
# Copyright 2004-2011 Luis Manuel Angueira Blanco (http://pexego.es)
# Copyright 2013 Ignacio Ibeas (http://acysos.com)
# Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com>
# Copyright 2016 Angel Moya <odoo@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agp... | agpl-3.0 | 7,501,633,384,687,510,000 | 39 | 81 | 0.550781 | false | 3.783784 | true | false | false |
Ektorus/bohrium | bridge/npbackend/target/__init__.py | 1 | 1226 | """
Initialization of npbackend target.
The target chosen is controlled by setting one of the following
environment vars:
* BHPY_BACKEND
* BHPY_TARGET
* NPBE_TARGET
The envvars are searched in the order above, first match wins.
The envvar can be one of the following:
* bhc
* numpy
* numexp... | lgpl-3.0 | 9,086,665,649,205,932,000 | 24.541667 | 80 | 0.645188 | false | 3.37741 | false | false | false |
asyncee/home-bookkeeping-sample | src/expenses/queries/base.py | 1 | 1649 | from collections import namedtuple
from expenses.queries.cache import KeyedCache
class QueryParams:
"""Holder for query parameters."""
@classmethod
def from_dict(cls, dct):
return cls._make([dct[p] for p in cls._fields])
def to_string(self):
values = [getattr(self, param) for param ... | mit | -1,456,603,283,349,878,800 | 28.981818 | 102 | 0.60946 | false | 4.031785 | false | false | false |
goldshtn/linux-tracing-workshop | setuidsnoop.py | 1 | 3030 | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# setuidsnoop Trace uid changes issued by the setuid() syscall.
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: setuidsnoop [-h] [-p PID]
#
# Copyright (c) 2016 Brendan Gregg, Sasha Goldshtein.
# Licensed under the Apache License, Version ... | mit | -6,281,888,384,061,737,000 | 22.671875 | 67 | 0.620462 | false | 2.853107 | false | false | false |
nugget/home-assistant | homeassistant/helpers/template.py | 1 | 21972 | """Template helper methods for rendering strings with Home Assistant data."""
from datetime import datetime
import json
import logging
import math
import random
import base64
import re
import jinja2
from jinja2 import contextfilter
from jinja2.sandbox import ImmutableSandboxedEnvironment
from jinja2.utils import Names... | apache-2.0 | 7,250,586,668,098,213,000 | 30.843478 | 79 | 0.605816 | false | 4.153497 | false | false | false |
SophieTh/und_Sophie_2016 | pySRU/tests/RadiationFactorytest.py | 1 | 3999 | # coding: utf-8
# /*##########################################################################
#
# Copyright (c) 2016 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
#... | mit | 4,673,161,436,286,058,000 | 47.180723 | 123 | 0.715429 | false | 3.625567 | true | false | false |
stvstnfrd/edx-platform | cms/djangoapps/contentstore/views/public.py | 1 | 2210 | """
Public views
"""
from django.conf import settings
from django.shortcuts import redirect
from django.utils.http import urlquote_plus
from waffle.decorators import waffle_switch
from common.djangoapps.edxmako.shortcuts import render_to_response
from ..config import waffle
__all__ = ['register_redirect_to_lms', '... | agpl-3.0 | -2,873,853,984,906,249,700 | 30.571429 | 110 | 0.690498 | false | 3.701843 | false | false | false |
stianaske/pybotvac | pybotvac/account.py | 1 | 7761 | """Account access and data handling for beehive endpoint."""
import logging
import os
import shutil
import requests
from voluptuous import (
ALLOW_EXTRA,
All,
Any,
Extra,
MultipleInvalid,
Optional,
Range,
Required,
Schema,
Url,
)
from .exceptions import NeatoRobotException, Ne... | mit | 9,026,604,313,120,005,000 | 29.081395 | 82 | 0.536786 | false | 4.056979 | false | false | false |
grahamking/goodenergy | action/models.py | 1 | 6331 | """Business objects for Action
"""
# Copyright 2010,2011 Good Energy Research Inc. <graham@goodenergy.ca>, <jeremy@goodenergy.ca>
#
# This file is part of Good Energy.
#
# Good Energy is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Licen... | agpl-3.0 | -4,513,062,788,204,360,000 | 32.675532 | 99 | 0.653293 | false | 3.934742 | false | false | false |
egbertbouman/tribler-g | Tribler/Core/ProxyService/Proxy.py | 1 | 29071 | # Written by George Milescu
# see LICENSE.txt for license information
import sys
import time
from traceback import print_exc
from collections import deque
from threading import Lock
from Tribler.Core.BitTornado.bencode import bencode
from Tribler.Core.BitTornado.BT1.MessageID import *
from Tribler.Core.simpledefs imp... | lgpl-2.1 | 787,331,529,277,729,300 | 40.708752 | 152 | 0.631248 | false | 4.219916 | false | false | false |
edeposit/edeposit.amqp.storage | src/edeposit/amqp/storage/structures/comm/archive.py | 1 | 1705 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# !!! DO NOT EDIT THIS FILE - THIS IS GENERATED FILE !!!
# Imports =====================================================================
from collections import namedtuple
# Functions and classes =====================================... | mit | 6,806,873,049,090,487,000 | 28.912281 | 79 | 0.538416 | false | 3.892694 | false | false | false |
lucatoscano/ErlangTW | tests/test_speedup.py | 1 | 2330 | #
# This file is part of ErlangTW. ErlangTW 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without e... | gpl-2.0 | 1,035,627,493,117,002,000 | 39.877193 | 149 | 0.697854 | false | 3.090186 | true | false | false |
spectrumone/websockets-autobahn-python | server.py | 1 | 3254 | import sys
import random
from twisted.web.static import File
from twisted.python import log
from twisted.web.server import Site
from twisted.internet import reactor
from autobahn.twisted.websocket import WebSocketServerFactory, \
WebSocketServerProtocol
from autobahn.twisted.resource import WebSocketResource
... | mit | -2,763,003,658,071,677,000 | 32.214286 | 109 | 0.643208 | false | 4.367785 | false | false | false |
chris-belcher/joinmarket-clientserver | scripts/obwatch/ob-watcher.py | 1 | 18029 | from __future__ import absolute_import, print_function
import BaseHTTPServer
import SimpleHTTPServer
import base64
import io
import json
import threading
import time
import hashlib
import os
import sys
import urllib2
from decimal import Decimal
from optparse import OptionParser
from twisted.internet import reactor
... | gpl-3.0 | 1,969,615,938,244,902,000 | 38.193478 | 146 | 0.569527 | false | 3.668905 | false | false | false |
shanot/imp | modules/pmi/test/test_nuisance_mover.py | 2 | 1205 | from __future__ import print_function
import IMP
import IMP.core
import IMP.test
import IMP.algebra
import IMP.atom
import IMP.container
import IMP.pmi.tools as tools
import IMP.pmi.samplers as samplers
class XTransRestraint(IMP.Restraint):
def __init__(self, m):
IMP.Restraint.__init__(self, m, "XTransR... | gpl-3.0 | 2,099,798,847,107,410,400 | 24.104167 | 69 | 0.613278 | false | 3.221925 | true | false | false |
gghezzo/prettypython | PythonEveryDay2015/MyTinker.py | 1 | 1323 | # Adding Random things to a Tkinter window
# From my brain
# Typer: Ginny C Ghezzo
# What I learned:
# TODO: Need to figure out the localip return (ARG ARG)
from tkinter import *
import time
import urllib # opening and reading URLs
import urllib.request # why do I need this
import re # regular exp... | mit | 1,217,881,998,857,131,800 | 26.5625 | 86 | 0.683296 | false | 2.869848 | false | false | false |
WilliamRy/python_ex | tollstation_problem/ex_tollstation.py | 1 | 2556 | # -*- coding: utf-8 -*-
"""
the classical toll station problem:
given the distance between all toll stations on a long road,
find the location of them.
"""
import random
def points_generator(number, rangee):
lst = range(1,rangee+1)
random.shuffle(lst)
f =lst[0:number-1]
f.sort()
result = [0] + f
... | mit | -2,947,788,969,308,378,000 | 23.815534 | 70 | 0.471049 | false | 3.80924 | false | false | false |
DayGitH/Python-Challenges | DailyProgrammer/DP20160325C.py | 1 | 2529 | """
[2016-03-25] Challenge #259 [Hard] Operator number system
https://www.reddit.com/r/dailyprogrammer/comments/4bwibm/20160325_challenge_259_hard_operator_number_system/
In most cases, humans use a decimal system. Scientists have suggested that this way to count things has been defined by
our hands with 5 fingers ea... | mit | -7,154,210,822,800,282,000 | 48.54902 | 119 | 0.738821 | false | 3.599715 | false | false | false |
dparaujo/projeto | app_administrativo/cronograma/urls.py | 1 | 1064 | # -*- coding: utf-8 -*-
"""
Desenvolvedor: David Pereira de Araújo
Projeto: credenciamento
E-mail: daraujo@tins.com.br
Mês: 01
Ano: 2017
Empresa: TINS - Soluções Corporativas
"""
__author__ = u'daraujo'
from django.conf.urls import url
from app_a... | gpl-3.0 | -8,930,559,119,983,043,000 | 43.208333 | 115 | 0.523585 | false | 2.936288 | false | true | false |
jolyonb/edx-platform | lms/djangoapps/grades/management/commands/tests/test_recalculate_subsection_grades.py | 1 | 3744 | """
Tests for reset_grades management command.
"""
from __future__ import absolute_import
from datetime import datetime
import ddt
import six
from django.conf import settings
from mock import MagicMock, patch
from pytz import utc
from lms.djangoapps.grades.constants import ScoreDatabaseTableEnum
from lms.djangoapps... | agpl-3.0 | 6,049,054,167,248,438,000 | 44.108434 | 117 | 0.701656 | false | 3.634951 | true | false | false |
samba-team/samba | source4/torture/drs/python/replica_sync.py | 1 | 37375 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Tests various schema replication scenarios
#
# Copyright (C) Kamen Mazdrashki <kamenim@samba.org> 2011
#
# 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 Fo... | gpl-3.0 | -6,257,371,183,514,169,000 | 49.033467 | 126 | 0.619318 | false | 3.119523 | true | false | false |
yuraic/koza4ok | skTMVA/sci_bdt_electron_BDT_structure.py | 1 | 4530 | from array import array
import numpy as np
import matplotlib.pyplot as plt
from sklearn import datasets
from sklearn.tree import DecisionTreeClassifier
from sklearn.ensemble import AdaBoostClassifier
from sklearn.metrics import classification_report, roc_auc_score, roc_curve
from sklearn import tree
import cPickle
... | mit | 513,559,341,317,220,600 | 32.813433 | 124 | 0.648124 | false | 3.090041 | false | false | false |
openstack/networking-l2gw | networking_l2gw/db/migration/alembic_migrations/versions/queens/contract/0fb45e525aa9_add_standard_attribute_id_for_l2gw.py | 1 | 2830 | # Copyright 2017 <PUT YOUR NAME/COMPANY HERE>
#
# 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 applica... | apache-2.0 | 6,316,439,713,957,126,000 | 35.282051 | 78 | 0.637102 | false | 3.814016 | false | false | false |
GoogleCloudPlatform/sap-deployment-automation | third_party/github.com/ansible/awx/awx_collection/plugins/modules/tower_group.py | 1 | 4756 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1... | apache-2.0 | -5,066,718,106,858,290,000 | 29.487179 | 117 | 0.618377 | false | 4.020287 | false | false | false |
ReactiveX/RxPY | rx/core/operators/elementatordefault.py | 1 | 1151 | from typing import Any, Callable
from rx.core import Observable
from rx.internal.exceptions import ArgumentOutOfRangeException
def _element_at_or_default(index, has_default=False, default_value=None):
if index < 0:
raise ArgumentOutOfRangeException()
def element_at_or_default(source: Observable) -> O... | mit | 8,960,340,141,025,708,000 | 31.885714 | 89 | 0.537793 | false | 4.736626 | false | false | false |
JamesLinEngineer/RKMC | addons/plugin.video.salts/scrapers/flixanity_scraper.py | 1 | 9447 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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 the License, or
(at your option) any later version.
T... | gpl-2.0 | 4,361,609,295,338,535,000 | 43.352113 | 190 | 0.558696 | false | 3.72957 | false | false | false |
yanbober/SmallReptileTraining | DistributedBaseSpider/SpiderWork.py | 1 | 3406 | import re
from urllib.parse import urljoin
import requests
from bs4 import BeautifulSoup
from multiprocessing.managers import BaseManager
'''
[分布式爬取解析工作端,可台机器分别运行]
简单主从模式的分布式爬虫,支持多节点管理
Ubuntu OSError: [Errno 98] Address already in use
$ sudo netstat -tlnp|grep 8001
tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 24314/... | mit | -1,597,223,114,124,105,200 | 32.389474 | 134 | 0.555485 | false | 2.902104 | false | false | false |
taikoa/wevolver-server | wevolve/users/migrations/0003_auto__chg_field_profile_city__chg_field_profile_picture_original_name_.py | 1 | 11634 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Profile.city'
db.alter_column(u'user_profile', 'city', self.gf('django.db.models.fields.C... | agpl-3.0 | -5,579,581,137,125,957,000 | 66.254335 | 226 | 0.588362 | false | 3.549115 | false | false | false |
ThreatResponse/margaritashotgun | margaritashotgun/remote_shell.py | 1 | 9147 | import paramiko
from paramiko import AuthenticationException, SSHException, ChannelException
from enum import Enum
from concurrent.futures import ThreadPoolExecutor
from socket import error as SocketError
from margaritashotgun.auth import AuthMethods
from margaritashotgun.exceptions import *
import logging
logger = lo... | mit | 1,033,756,631,633,732,900 | 39.118421 | 88 | 0.538865 | false | 4.695585 | false | false | false |
alpine9000/amiga_examples | tools/external/amitools/amitools/fs/ADFSNode.py | 1 | 5378 | from FileName import FileName
from MetaInfo import MetaInfo
from ProtectFlags import ProtectFlags
from TimeStamp import TimeStamp
from FSError import *
from FSString import FSString
import amitools.util.ByteSize as ByteSize
class ADFSNode:
def __init__(self, volume, parent):
self.volume = volume
self.blkdev ... | bsd-2-clause | 8,015,660,144,196,338,000 | 28.07027 | 117 | 0.624396 | false | 3.165391 | false | false | false |
dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/Sequencing/Ace.py | 1 | 20376 | """
Parser for (new) ACE files output by PHRAP.
version 1.3, 05/06/2004
Written by Frank Kauff (fkauff@duke.edu) and
Cymon J. Cox (cymon@duke.edu)
Uses the Biopython Parser interface: ParserSupport.py
Usage:
There are two ways of reading an ace file: The ACEParser() reads
the whole file at once and the RecordParser... | apache-2.0 | 6,913,604,128,323,306,000 | 33.477157 | 115 | 0.554623 | false | 3.715536 | false | false | false |
NotSoSuper/NotSoBot | mods/Verification.py | 1 | 20486 | import discord
import asyncio
import random
import steam
from steam.steamid import SteamId
from steam.steamprofile import SteamProfile
from steam.steamaccountuniverse import SteamAccountUniverse
from steam.steamaccounttype import SteamAccountType
from discord.ext import commands
from utils import checks
from mods.cog i... | mit | -4,955,574,702,958,139,000 | 44.125551 | 380 | 0.690716 | false | 3.185012 | false | false | false |
schnapptack/gskompetenzen | features/gsaudit/migrations/0025_auto__add_field_skill_author.py | 1 | 15198 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Skill.author'
db.add_column(u'gsaudit_skill', 'author',
self.gf('djang... | agpl-3.0 | -2,912,736,705,076,302,300 | 75.762626 | 215 | 0.544085 | false | 3.612551 | false | false | false |
gajim/gajim | gajim/common/const.py | 1 | 28447 | from enum import IntEnum, Enum, unique
from collections import namedtuple
from gi.repository import Gio
from nbxmpp.namespaces import Namespace
from gajim.common.i18n import _
from gajim.common.i18n import Q_
EncryptionData = namedtuple('EncryptionData', 'additional_data')
EncryptionData.__new__.__defaults__ = (Non... | gpl-3.0 | -1,480,373,902,542,022,700 | 24.495964 | 112 | 0.561348 | false | 2.931326 | false | false | false |
pombredanne/metamorphosys-desktop | metamorphosys/META/analysis_tools/PYTHON_RICARDO/rpl/tools/geometry/read_cad_metrics.py | 1 | 3907 | """ Read in parts from a cad metrics file. """
import numpy as np
from lxml import etree
import re
from geom_utils import matrix_from_nx_ny_ro
conv_dict = {"inch" : 0.0254, "millimeter" : 0.001, "mm" : 0.001, "m" : 1.0}
def get_parts(cad_metric_xml_file):
"""
Return a list of part information.
... | mit | -7,735,941,924,765,311,000 | 30.831933 | 93 | 0.499616 | false | 3.191993 | false | false | false |
Radagast-red/golem | golem/model.py | 1 | 6698 | import datetime
import jsonpickle as json
import logging
from enum import Enum
from os import path
from peewee import (SqliteDatabase, Model, CharField, IntegerField, FloatField,
DateTimeField, TextField, CompositeKey, BooleanField)
log = logging.getLogger('golem.db')
NEUTRAL_TRUST = 0.0
# Indi... | gpl-3.0 | 7,036,831,455,788,716,000 | 27.623932 | 105 | 0.641236 | false | 3.944641 | false | false | false |
gviejo/ThalamusPhysio | python/figure_article_v2/main_article_fig_supp_6.py | 1 | 6938 | import numpy as np
import pandas as pd
# from matplotlib.pyplot import plot,show,draw
import scipy.io
import sys
sys.path.append("../")
from functions import *
from pylab import *
from sklearn.decomposition import PCA
import _pickle as cPickle
import matplotlib.cm as cm
import os
#####################################... | gpl-3.0 | -2,075,857,534,753,483,000 | 34.040404 | 115 | 0.573796 | false | 2.942324 | false | false | false |
RandomKori/Forex | ForexNNClass/ForexNNClass/ForexNNClassB.py | 1 | 3694 | from __future__ import print_function
import numpy as np
import cntk
from cntk.ops.functions import load_model
def LoadData(fn,is_training):
n=".\\Data\\"+fn
datainp=cntk.io.StreamDef("features",30)
dataout=cntk.io.StreamDef("labels",4)
dataall=cntk.io.StreamDefs(features=datainp,labels=dataout)
st... | gpl-3.0 | -3,863,880,155,538,661,400 | 36.5 | 131 | 0.685442 | false | 2.921304 | true | false | false |
albireox/marvin | python/marvin/tools/rss.py | 1 | 19904 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @Author: Brian Cherinka, José Sánchez-Gallego, and Brett Andrews
# @Date: 2016-04-11
# @Filename: rss.py
# @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause)
#
# @Last modified by: José Sánchez-Gallego (gallegoj@uw.edu)
# @Last modified time: 2018-... | bsd-3-clause | 2,139,113,228,908,923,600 | 35.988848 | 99 | 0.592462 | false | 3.831344 | false | false | false |
jakubbrindza/gtg | GTG/gtk/browser/browser.py | 1 | 61395 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Getting Things GNOME! - a personal organizer for the GNOME desktop
# Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau
#
# This program is free software: you can redistribute it and/or modify it under
# t... | gpl-3.0 | 19,767,875,418,420,108 | 40.094378 | 79 | 0.572685 | false | 3.946962 | true | false | false |
rcpedersen/stl-to-voxel | perimeter.py | 1 | 1874 | import math
from collections import defaultdict
import numpy as np
def linesToVoxels(lineList, pixels):
for x in range(len(pixels)):
isBlack = False
lines = list(filter(lambda line: isRelevantLines(line, x, pixels), lineList))
targetYs = list(map(lambda line:int(generateY(line, x)),lines))
... | mit | 3,278,711,420,019,987,000 | 31.310345 | 126 | 0.527215 | false | 3.082237 | false | false | false |
papallas/baxter_cashier | scripts/baxter_cashier_manipulation/src/baxter_pose.py | 1 | 3209 | #!/usr/bin/env python
"""
Copyright (C) 2016/2017 The University of Leeds and Rafael Papallas.
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 the License, or
(at your option... | gpl-3.0 | -3,485,173,546,208,582,700 | 35.05618 | 73 | 0.571829 | false | 4.377899 | false | false | false |
ghclara/ProgScripts | tekton-master/backend/appengine/routes/lingAngulars/admin/edit.py | 1 | 1105 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from config.template_middleware import TemplateResponse
from gaebusiness.business import CommandExecutionException
from tekton import router
from gaecookie.decorator import no_csrf
from lingAngular_app import facade
from routes.lingAngular... | mit | 4,886,881,965,354,895,000 | 37.103448 | 125 | 0.729412 | false | 3.541667 | false | false | false |
mruwek/topydo | topydo/lib/PrettyPrinterFilter.py | 1 | 3423 | # Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 - 2015 Bram Schoenmakers <me@bramschoenmakers.nl>
#
# 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 the L... | gpl-3.0 | -3,183,096,127,573,630,000 | 31.913462 | 76 | 0.623138 | false | 3.7369 | false | false | false |
Juicechuan/AMR_graph | camr_conversion/on/common/log.py | 1 | 23072 |
# COPYRIGHT 2007 BY BBN TECHNOLOGIES CORP.
# BY USING THIS SOFTWARE THE USER EXPRESSLY AGREES: (1) TO BE BOUND BY
# THE TERMS OF THIS AGREEMENT; (2) THAT YOU ARE AUTHORIZED TO AGREE TO
# THESE TERMS ON BEHALF OF YOURSELF AND YOUR ORGANIZATION; (3) IF YOU OR
# YOUR ORGANIZATION DO NOT AGREE WITH THE TERMS OF THIS AGR... | mit | -937,953,334,212,389,200 | 44.328094 | 169 | 0.550191 | false | 4.030044 | false | false | false |
mwcraig/vpython-jupyter | vpython/shapespaths.py | 1 | 46092 | from math import sqrt, sin, cos, tan, asin, acos, atan, floor, pi
from ._vector_import_helper import vec, vector, mag, norm
# List of names that are imported from this module with import *
__all__ = ['RackOutline', 'ToothOutline', 'addpos', 'convert', 'path_object',
'paths', 'rotatecp', 'roundc', 'scalecp'... | mit | -8,041,384,325,000,247,000 | 41.441989 | 128 | 0.505229 | false | 3.132527 | false | false | false |
miguelalba89/hfdp-python | command/simpleremote.py | 1 | 1687 | """
Simple Remote Control
Author: m1ge7
Date: 2014/03/28
"""
from abc import ABCMeta, abstractmethod
class Light:
def on(self):
print "Light is on"
def off(self):
print "Light is off"
class GarageDoor:
def up(self):
print "Garage Door is Open"
def down(self):
p... | gpl-3.0 | 1,548,103,661,872,656,000 | 16.572917 | 52 | 0.605809 | false | 3.507277 | false | false | false |
skibblenybbles/django-commando | commando/contrib/south/management/migrationcheck.py | 1 | 1346 | from commando import management
BaseMigrationCheckCommand = management.get_command_class(
"migrationcheck", exclude_packages=("commando",))
if BaseMigrationCheckCommand is not None:
base = BaseMigrationCheckCommand()
class MigrationCheckCommandOptions(management.CommandOptions):
"""
... | mit | -4,172,246,087,825,936,000 | 30.302326 | 90 | 0.625557 | false | 5.098485 | false | false | false |
dom96/MDSBot | IRCLibrary/events.py | 1 | 2834 | #!/usr/bin/env python
"""
MDS IRC Lib
Copyright (C) 2009 Mad Dog Software
http://maddogsoftware.co.uk - morfeusz8@yahoo.co.uk
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 the ... | gpl-2.0 | 4,904,286,630,722,609,000 | 35.805195 | 123 | 0.589273 | false | 4.229851 | false | false | false |
innerr/stars | core/client.py | 1 | 2555 | #coding:utf-8
#nature@20100725
from rpc import *
class RpcApiNotFound(Exception): pass
class RpcBadParams(Exception): pass
class Client:
def __init__(self, url, keyFile, apis='*', value='60', mode='minu', caller='anonymous'):
self._auth = AutoAuth(caller, url, keyFile, apis, value, mode)
... | mit | 1,409,873,323,210,285,300 | 32.066667 | 92 | 0.514286 | false | 3.740849 | false | false | false |
Aravinthu/odoo | addons/mrp/models/mrp_workorder.py | 1 | 25017 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools import float_compare, float_round
from odoo.ad... | agpl-3.0 | 4,003,067,619,791,761,000 | 49.134269 | 311 | 0.574529 | false | 3.916862 | false | false | false |
ianbro/ezi | ezi/views.py | 1 | 10098 | from django.shortcuts import render, get_object_or_404
from django.views.generic import View
from utils import (IanmannJsonResponse,
respond_bad_request_verb,
get_params_to_queryset_kwargs,
valid_method,
respond_list_deleted,
... | gpl-3.0 | -8,600,552,650,146,367,000 | 38.291829 | 96 | 0.653793 | false | 4.462218 | false | false | false |
Jonathan-Z/PowerShellMusic | MusicCompiler.py | 1 | 2279 | usr_input = input("Welcome to the Single Voice Sinusoidal Music Compiler:\n"
"The full file path should be specified with the file extension (preferably .csv)\n"
"Music Should in the format of:\n"
"Notes,AN4,BN2,0,CN4...\n"
"Time(S or MS),1000,... | mit | -8,116,043,457,267,480,000 | 40.203704 | 125 | 0.46731 | false | 3.437406 | false | false | false |
civilwargeeky/MusicDownloader | MusicDisplay.py | 1 | 2895 | #Display library for the MusicDownloader program
#Has text boxes and display boxes and what have you
import tkinter as tk
from tkinter import ttk
root = None #Global root (only supports one window)
class MainBox(tk.Tk):
def __init__(self, title = "Window", *args, **kwargs):
global root
root = self #Set glo... | mit | -1,315,857,887,776,140,500 | 33.47619 | 102 | 0.641796 | false | 3.560886 | false | false | false |
ironbox360/PyCV-time | projects/laser_drawing/laser_drawing.py | 1 | 2073 | import cv2
import numpy as np
from screen_finder.screen_finder import ScreenFinder
from cam import OpenCV_Cam
def draw_burning(canvas, location):
cv2.circle(canvas, (lx, ly), 5, (255, 0, 0, 255))
return canvas
def find_laser_loc(img, threshold):
red_part = img[:,:,2]
max_pos = red_part.arg... | mit | 1,642,613,113,042,792,200 | 24.925 | 74 | 0.612639 | false | 3.098655 | false | false | false |
DaveMDS/epymc | epymc/mainmenu.py | 1 | 5021 | #!/usr/bin/env python
# This Python file uses the following encoding: utf-8
#
# Copyright (C) 2010-2018 Davide Andreoli <dave@gurumeditation.it>
#
# This file is part of EpyMC, an EFL based Media Center written in Python.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 | -5,937,809,567,591,448,000 | 29.803681 | 100 | 0.637522 | false | 3.596705 | false | false | false |
tellapart/taba | src/taba/server/model/name_storage.py | 1 | 7524 | # Copyright 2014 TellApart, 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 writi... | apache-2.0 | -6,117,197,468,502,839,000 | 30.090909 | 80 | 0.660819 | false | 3.525773 | false | false | false |
hivesolutions/netius | examples/basic/loop_old.py | 1 | 1779 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Hive Netius System
# Copyright (c) 2008-2020 Hive Solutions Lda.
#
# This file is part of Hive Netius System.
#
# Hive Netius System is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by the Apache
# Foun... | apache-2.0 | 4,439,356,071,074,577,000 | 29.175439 | 76 | 0.660101 | false | 3.156306 | false | false | false |
uw-it-aca/canvas-sis-provisioner | sis_provisioner/pidfile.py | 1 | 2900 | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from logging import getLogger
from inspect import stack, getmodule
import errno
import os
# modified from:
# http://stackoverflow.com/questions/1444790/python-module-for-creating-pid-
# based-lockfile
class Pidfile():
def __in... | apache-2.0 | 2,368,466,773,915,116,000 | 29.851064 | 76 | 0.516897 | false | 4.503106 | false | false | false |
swayf/pyLoad | module/plugins/addons/RehostTo.py | 1 | 1153 | # -*- coding: utf-8 -*-
from module.network.RequestFactory import getURL
from module.plugins.internal.MultiHoster import MultiHoster
class RehostTo(MultiHoster):
__name__ = "RehostTo"
__version__ = "0.41"
__type__ = "hook"
__config__ = [("activated", "bool", "Activated", "False")]
__description_... | agpl-3.0 | -5,902,631,902,444,201,000 | 28.564103 | 106 | 0.607979 | false | 3.411243 | false | false | false |
teitei-tk/Marguerite | marguerite/accessors/abstract.py | 1 | 1266 | # -*- coding: utf-8 -*-
class AbstractAccessor(object):
def __init__(self, driver, structure):
self.driver = driver
self.structure = structure
self.is_valid()
self.initialize()
def is_valid(self):
pass
def initialize(self):
pass
def reload(self, drive... | apache-2.0 | -1,005,140,712,225,125,200 | 25.93617 | 70 | 0.617694 | false | 4.426573 | false | false | false |
ucsb-ilabs/shapematching | src/main/python/edu/ucsb/ilab/shapematching/pt2graph.py | 1 | 5365 | #!/home/longbin/install/apps/Python-2.5_gcc/bin/python
import sys
import math
import getopt
import string
import fileinput
clrs = ['ff0000', '00ff00', '0000ff']
def printheader(n):
print '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
print ' <graphml xmlns="http://graphml.graphdrawing.org/xmln... | gpl-2.0 | 8,524,151,017,851,959,000 | 45.25 | 362 | 0.541845 | false | 3.126457 | false | false | false |
muraliselva10/designate | designate/tests/test_api/test_v1/test_records.py | 1 | 31830 | # coding=utf-8
# Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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... | apache-2.0 | -5,751,548,821,920,280,000 | 37.130695 | 79 | 0.571146 | false | 3.778636 | true | false | false |
kevinjqiu/jirafs | jirafs/commands/search_users.py | 1 | 1455 | from __future__ import print_function
import json
from prettytable import PrettyTable
from jirafs import utils
from jirafs.plugin import CommandPlugin
from jirafs.ticketfolder import TicketFolder
class Command(CommandPlugin):
"""Search for users matching the specified search term"""
MIN_VERSION = '1.0a1'
... | mit | -1,741,878,178,660,959,500 | 25.944444 | 79 | 0.535395 | false | 4.181034 | false | false | false |
eLRuLL/scrapy | scrapy/pipelines/media.py | 1 | 7888 | import functools
import logging
from collections import defaultdict
from twisted.internet.defer import Deferred, DeferredList, _DefGen_Return
from twisted.python.failure import Failure
from scrapy.settings import Settings
from scrapy.utils.datatypes import SequenceExclude
from scrapy.utils.defer import mustbe_deferred... | bsd-3-clause | -8,840,855,166,129,957,000 | 39.040609 | 84 | 0.610167 | false | 4.365246 | false | false | false |
ActiveState/code | recipes/Python/310320_webcounter/recipe-310320.py | 1 | 3389 | #!/usr/bin/python -u
# 2004/10/15
#v1.0.0
# webcounter.py
# A very simple webcounter.
# Copyright Michael Foord
# You are free to modify, use and relicense this code.
# No warranty express or implied for the accuracy, fitness to purpose or otherwise for this code....
# Use at your own risk !!!
# For information abo... | mit | -237,837,532,002,947,260 | 27.008264 | 126 | 0.598112 | false | 3.904378 | false | false | false |
dangunter/smoqe | smoqe/query.py | 1 | 26384 | """
Parse and transform a simplified query syntax into
MongoDB queries.
"""
__author__ = "Dan Gunter"
## Imports
# Standard library
import copy
from numbers import Number
import re
class BadExpression(Exception):
"""Raised by `query()` if the input is not understood.
"""
def __init__(self, expr, details=... | lgpl-3.0 | -81,702,735,445,841,360 | 32.912596 | 96 | 0.543587 | false | 4.041667 | false | false | false |
googleapis/googleapis-gen | google/cloud/aiplatform/v1/aiplatform-v1-py/google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_text_sentiment.py | 1 | 2042 | # -*- coding: utf-8 -*-
# Copyright 2020 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... | apache-2.0 | 5,663,014,639,283,729,000 | 29.939394 | 109 | 0.671401 | false | 3.988281 | false | false | false |
wx-ast/django-seo | rollyourown/seo/backends.py | 1 | 13884 | #!/usr/bin/env python
from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db import models
from django.contrib.sites.models import Site
from django.contrib.contenttypes.models import ContentType
try:
from django.contrib.contenttyp... | bsd-3-clause | 145,235,732,500,074,240 | 38.555556 | 176 | 0.607894 | false | 4.359184 | false | false | false |
MicrosoftGenomics/PySnpTools | pysnptools/pstreader/psthdf5.py | 1 | 11817 | try:
import h5py
except:
pass
import logging
import scipy as np
from pysnptools.pstreader import PstReader
from pysnptools.pstreader.pstdata import PstData
import warnings
try:
from builtins import range
except:
pass
class PstHdf5(PstReader):
'''
A :class:`.PstReader` for reading \*.pst.hdf5 f... | apache-2.0 | 7,312,811,661,821,912,000 | 40.609155 | 209 | 0.601845 | false | 3.413345 | true | false | false |
drewhutchison/coolerofdoom | data.py | 1 | 3415 | import sqlite3
TWITTER_CONSUMER_KEY = 'twitter_consumer_key'
TWITTER_CONSUMER_SECRET = 'twitter_consumer_secret'
TWITTER_ACCESS_TOKEN = 'twitter_access_token'
TWITTER_ACCESS_TOKEN_SECRET = 'twitter_access_token_secret'
LAST_LATITUDE = 'last_latitude'
LAST_LONGITUDE = 'last_longitude'
UPC_DATABASE_KEY = 'upc_database_k... | mit | 2,877,343,525,712,414,000 | 31.226415 | 90 | 0.533236 | false | 3.952546 | false | false | false |
vaurele/plugin.video.freplay | resources/lib/channels/cplus.py | 1 | 3181 | #-*- coding: utf-8 -*-
import urllib,urllib2
import xml.dom.minidom
from resources.lib import utils
import json
title=['Canal +']
img=['cplus']
readyForUse=True
def get_token():
filePath=utils.downloadCatalog('http://service.mycanal.fr/authenticate.json/Android_Tab/1.1?highResolution=1','TokenCPlus.json',False,{}... | gpl-2.0 | -2,913,353,975,952,722,000 | 36.869048 | 184 | 0.594153 | false | 3.46892 | false | false | false |
asciimoo/searx | searx/engines/__init__.py | 1 | 9783 |
'''
searx is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY W... | agpl-3.0 | 7,912,578,631,774,074,000 | 34.574545 | 109 | 0.60186 | false | 4.072856 | false | false | false |
amjames/psi4 | psi4/share/psi4/databases/HTBH.py | 1 | 38462 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 6,250,482,744,679,843,000 | 46.601485 | 123 | 0.451771 | false | 2.517311 | false | false | false |
openhealthcare/randomise.me | rm/trials/migrations/0047_auto__add_field_trial_parent.py | 1 | 8423 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Trial.parent'
db.add_column(u'trials_trial', 'parent',
self.gf('django... | agpl-3.0 | -8,153,389,739,321,435,000 | 72.894737 | 165 | 0.543749 | false | 3.605736 | false | false | false |
kgullikson88/General | PrepareChorizos.py | 1 | 3376 | """
This script reads in BVJHK photometry from Kharchenko et al 2009,
and measured E(B-V) from my spectra. It then prepares the
Chorizos input file
"""
import os
class StarInfo:
def __init__(self):
self.name = "" # Star designation
self.EBV = 0.0 # E(B-V)
self.B = 0.0 # B mag
... | gpl-3.0 | -9,037,810,208,541,535,000 | 34.166667 | 113 | 0.408175 | false | 3.985832 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.