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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/tests/groupby/test_categorical.py | 1 | 39673 | from collections import OrderedDict
from datetime import datetime
import numpy as np
import pytest
from pandas.compat import PY37
import pandas as pd
from pandas import (
Categorical,
CategoricalIndex,
DataFrame,
Index,
MultiIndex,
Series,
qcut,
)
import pandas.util.testing as tm
from pan... | apache-2.0 | 5,703,122,923,592,596,000 | 32.422915 | 111 | 0.56149 | false | 3.309117 | true | false | false |
Rhoana/membrane_cnn | assess_offset_smooth_average_ws.py | 1 | 4006 | import mahotas
import scipy.ndimage
import scipy.misc
import numpy as np
import gzip
import cPickle
import glob
import os
import h5py
import partition_comparison
#param_path = 'D:/dev/Rhoana/membrane_cnn/results/good3/'
param_path = 'D:/dev/Rhoana/membrane_cnn/results/stumpin/'
param_files = glob.glob(param_path + "*.... | bsd-3-clause | -5,099,422,390,217,684,000 | 26.627586 | 130 | 0.656515 | false | 2.896602 | false | false | false |
Aziiri-dev/kivychat | chatbox.py | 1 | 3631 | from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.textinput import TextInput
from tabbox import TabBox
from utils import TextBoxLabel
# ============================================================================
class MessageTextInput(TextInpu... | mit | -6,658,644,810,960,035,000 | 33.254717 | 78 | 0.593776 | false | 3.686294 | false | false | false |
ProgVal/PyCorewar | setup.py | 1 | 3375 | #!/usr/bin/env python
#
# Copyright (C) 2006 Jens Gutzeit <jens@jgutzeit.de>
#
# 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 2 of the License, or
# (at your option) any later ve... | gpl-2.0 | 3,067,631,760,320,872 | 38.705882 | 77 | 0.589037 | false | 4.081016 | false | false | false |
EmadMokhtar/Django | django/http/request.py | 11 | 21619 | import copy
import re
from io import BytesIO
from itertools import chain
from urllib.parse import quote, urlencode, urljoin, urlsplit
from django.conf import settings
from django.core import signing
from django.core.exceptions import (
DisallowedHost, ImproperlyConfigured, RequestDataTooBig,
)
from django.core.fil... | mit | 8,745,942,704,095,478,000 | 35.456998 | 110 | 0.596882 | false | 4.24318 | false | false | false |
boundary/ZenPacks.boundary.EventAdapter | setup.py | 1 | 2248 | NAME = "ZenPacks.boundary.EventAdapter"
VERSION = "1.0.0"
AUTHOR = "Boundary"
LICENSE = "Apache v2"
NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.boundary']
PACKAGES = ['ZenPacks', 'ZenPacks.boundary', 'ZenPacks.boundary.EventAdapter']
INSTALL_REQUIRES = []
COMPAT_ZENOSS_VERS = ">=4.2"
PREV_ZENPACK_NAME = ""
from setupt... | apache-2.0 | 9,127,007,901,335,010,000 | 35.274194 | 78 | 0.714858 | false | 3.66721 | false | false | false |
jayme-github/headphones | headphones/__init__.py | 1 | 22431 | # This file is part of Headphones.
#
# Headphones 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.
#
# Headphones is distributed i... | gpl-3.0 | -4,735,171,405,905,738,000 | 34.158307 | 340 | 0.652044 | false | 4.003391 | true | false | false |
mardiros/apium | test.py | 1 | 1324 | import sys
import traceback
import asyncio
from apium.registry import get_driver
from apium.config import Configurator
from apium.proxy import apium
@asyncio.coroutine
def routine(future, config):
try:
Configurator.from_yaml(config)
yield from get_driver().connect_broker()
get_driver().at... | bsd-3-clause | -5,135,659,628,212,368,000 | 25.48 | 73 | 0.619335 | false | 3.66759 | false | false | false |
teythoon/Insekta | insekta/network/models.py | 1 | 2172 | import random
from django.db import models, transaction, IntegrityError
from django.conf import settings
from insekta.common.dblock import dblock
from insekta.network.utils import iterate_nets, int_to_ip
LOCK_NETWORK_ADDRESS = 947295
class NetworkError(Exception):
pass
class AddressManager(models.Manager):
... | mit | 4,215,938,950,256,456,700 | 30.478261 | 78 | 0.601289 | false | 3.892473 | false | false | false |
datapackages/tabulator-py | tests/formats/test_datapackage.py | 1 | 2251 | # -*- coding: utf-8 -*-
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import json
import pytest
from mock import Mock
from tabulator import Stream
from tabulator.parsers.datapackage import DataPackageParser... | mit | 4,696,167,510,624,650,000 | 24.528736 | 84 | 0.568663 | false | 3.542265 | true | false | false |
coreymcdermott/artbot | artbot_scraper/spiders/verge_gallery.py | 1 | 1562 | # -*- coding: utf-8 -*-
import re
from dateutil import parser
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from artbot_scraper.items import EventItem
from pytz import timezone
class VergeGallerySpider(CrawlSpider):
name ... | mit | -6,156,051,172,381,962,000 | 49.322581 | 152 | 0.58141 | false | 3.545455 | false | false | false |
romses/LXC-Web-Panel | tests/browser.py | 1 | 4844 | import subprocess
import mechanize
import cookielib
import unittest
import shutil
import os
from flask import Flask
from flask.ext.testing import LiveServerTestCase
from lwp.app import app
from lwp.utils import connect_db
class TestWebBrowser(LiveServerTestCase):
"""
These tests are made using a statefu... | mit | 4,193,830,475,493,360,000 | 29.275 | 92 | 0.586705 | false | 3.669697 | true | false | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/pyshared/usbcreator/backends/udisks/backend.py | 1 | 15116 | import dbus
import logging
from dbus.mainloop.glib import DBusGMainLoop
from usbcreator.backends.base import Backend
from usbcreator.misc import *
DISKS_IFACE = 'org.freedesktop.UDisks'
DEVICE_IFACE = 'org.freedesktop.UDisks.Device'
PROPS_IFACE = 'org.freedesktop.DBus.Properties'
import time
class UDisksBackend(Back... | gpl-3.0 | -237,449,567,481,498,020 | 39.309333 | 86 | 0.538833 | false | 3.996827 | false | false | false |
jesusaurus/openstack-tests | nova/tests/10ssh.py | 1 | 3384 | # Copyright 2012-2013 Hewlett-Packard Development Company, L.P.
# 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/LICE... | apache-2.0 | -2,958,073,583,366,884,000 | 32.84 | 99 | 0.5526 | false | 4.019002 | false | false | false |
bistromath/gr-air-modes | python/html_template.py | 1 | 6101 | #!/usr/bin/env python
#HTML template for Mode S map display
#Nick Foster, 2013
def html_template(my_apikey, my_position, json_file):
if my_position is None:
my_position = [37, -122]
return """
<html>
<head>
<title>ADS-B Aircraft Map</title>
<meta name="viewport" content="initial-sc... | gpl-3.0 | -5,583,018,547,611,028,000 | 38.36129 | 155 | 0.431733 | false | 4.542815 | false | false | false |
petrutlucian94/nova_dev | nova/virt/hyperv/volumeops.py | 1 | 14466 | # Copyright 2012 Pedro Navarro Perez
# Copyright 2013 Cloudbase Solutions Srl
# 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... | apache-2.0 | -8,743,473,869,114,289,000 | 40.688761 | 79 | 0.564427 | false | 4.183343 | false | false | false |
openslack/openslack-crawler | scripts/stackoverflow.py | 1 | 2266 | import datetime
import time, pymongo
from elasticsearch import Elasticsearch
from django.utils.html import strip_tags
es = Elasticsearch([{'host': "192.168.0.107"}])
conn = pymongo.MongoClient("192.168.0.107", 27017)
stackoverflowdb = conn.stackoverflow
def save_es(items):
index = "it"
_type = "stackoverflow_... | apache-2.0 | 6,205,382,843,209,666,000 | 32.820896 | 115 | 0.44925 | false | 4.082883 | false | false | false |
crsmithdev/arrow | arrow/locales.py | 1 | 115090 | """Provides internationalization for arrow in over 60 languages and dialects."""
import sys
from math import trunc
from typing import (
Any,
ClassVar,
Dict,
List,
Mapping,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)
if sys.version_info < (3, 8): # pragma: no cover
... | apache-2.0 | 4,858,773,953,756,141,000 | 20.314819 | 123 | 0.399362 | false | 2.573715 | false | false | false |
thehub/hubspace | md5crypt.py | 1 | 4201 | #########################################################
# md5crypt.py
#
# 0423.2000 by michal wallace http://www.sabren.com/
# based on perl's Crypt::PasswdMD5 by Luis Munoz (lem@cantv.net)
# based on /usr/src/libcrypt/crypt.c from FreeBSD 2.2.5-RELEASE
#
# MANY THANKS TO
#
# Carey Evans - http://home.clear.net.nz/p... | gpl-2.0 | 6,348,591,184,580,210,000 | 25.25625 | 77 | 0.517972 | false | 3.307874 | false | false | false |
mathcamp/pypicloud | pypicloud/access/remote.py | 1 | 3575 | """ Backend that defers to another server for access control """
from .base import IAccessBackend
class RemoteAccessBackend(IAccessBackend):
"""
This backend allows you to defer all user auth and permissions to a remote
server. It requires the ``requests`` package.
"""
def __init__(self, reques... | mit | 267,732,761,425,824,900 | 34.75 | 86 | 0.604196 | false | 4.210836 | false | false | false |
PanDAWMS/panda-bigmon-atlas | atlas/auth/shibsso/tests/test_middleware.py | 1 | 2267 | #
# Copyright 2010 CERN
#
# 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, softw... | apache-2.0 | 826,428,175,119,717,400 | 29.648649 | 76 | 0.659903 | false | 4.048214 | true | false | false |
AstroTech/workshop-python | django/solution/untitled/ksiazkaadresowa/forms.py | 1 | 1084 | import re
from django.core.exceptions import ValidationError
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import Person
class ContactUsForm(forms.Form):
sender = forms.EmailField()
subject = forms.CharField()
body = forms.CharField(widget=forms.Textarea)
... | mit | -2,301,036,317,023,659,800 | 23.636364 | 58 | 0.606089 | false | 3.871429 | false | false | false |
CORE-GATECH-GROUP/serpent-tools | serpentTools/parsers/history.py | 1 | 5348 | """
Parser that reads history files
Files can be generated by adding ``set his 1`` to the input file
"""
from numpy import empty, asfortranarray, array
from serpentTools.utils import convertVariableName, deconvertVariableName
from serpentTools.parsers.base import BaseReader
from serpentTools.messages import warning,... | mit | -5,972,619,038,542,608,000 | 30.093023 | 78 | 0.556283 | false | 4.412541 | false | false | false |
drewhutchison/socketIO-client | socketIO_client/__init__.py | 1 | 18081 | import logging
import json
import requests
import time
from collections import namedtuple
try:
from urllib.parse import urlparse as parse_url
except ImportError:
from urlparse import urlparse as parse_url
from .exceptions import (
SocketIOError, ConnectionError, TimeoutError, PacketError)
from .symmetries ... | mit | 4,741,928,711,429,100,000 | 33.571702 | 79 | 0.586417 | false | 4.074132 | false | false | false |
iw3hxn/LibrERP | sale_order_requirement/wizard/order_requirement_line_add.py | 1 | 6310 | import datetime
import netsvc
from openerp.osv import orm, fields
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
from tools.translate import _
class OrderRequirementLineAdd(orm.TransientModel):
_name = "order.requirement.line.add"
_description = "Add sale Order to line"
def default_get(self, cr, u... | agpl-3.0 | 6,181,661,718,559,501,000 | 46.443609 | 117 | 0.538669 | false | 3.936369 | false | false | false |
prkumar/uplink | tests/integration/test_extend.py | 1 | 2479 | # Third-party imports
import pytest
# Local imports
import uplink
# Constants
BASE_URL = "https://api.github.com"
class GitHubError(Exception):
pass
@uplink.response_handler
def github_error(response):
if "errors" in response.json():
raise GitHubError()
return response
@uplink.timeout(10)
cl... | mit | -3,548,034,276,720,475,000 | 25.37234 | 88 | 0.61315 | false | 3.688988 | false | false | false |
baylee/django | django/db/models/signals.py | 1 | 2515 | import warnings
from functools import partial
from django.db.models.utils import make_model_tuple
from django.dispatch import Signal
from django.utils.deprecation import RemovedInDjango20Warning
class_prepared = Signal(providing_args=["class"])
class ModelSignal(Signal):
"""
Signal subclass that allows the... | bsd-3-clause | 8,754,010,135,598,167,000 | 44.727273 | 114 | 0.694235 | false | 3.828006 | false | false | false |
keiserlab/e3fp-paper | project/parameter_optimization/1_chembl20_opt/config/wrapper.py | 1 | 10710 | """Cross-validation wrapper to be run with Spearmint.
Author: Seth Axen
E-mail: seth.axen@gmail.com
"""
import os
import glob
import re
import logging
import csv
from python_utilities.scripting import setup_logging
from python_utilities.io_tools import touch_dir, smart_open
from python_utilities.parallel import Paral... | lgpl-3.0 | -577,514,957,864,930,300 | 40.351351 | 78 | 0.61634 | false | 3.52883 | false | false | false |
PyIran/website | project/apps/user/views/login.py | 1 | 2555 | # flask import
from flask import Blueprint, abort, request, current_app, session,\
g, redirect, url_for, send_from_directory, make_response, jsonify, flash
from flask.ext.babel import lazy_gettext as _
from werkzeug.security import check_password_hash, generate_password_hash
# project import
from project.utils.au... | gpl-3.0 | -6,441,913,961,556,251,000 | 32.631579 | 97 | 0.626223 | false | 3.859517 | false | false | false |
evenmarbles/rlglued | rlglued/network/network.py | 1 | 8219 | #
# Copyright (C) 2007, Mark Lee
#
# http://rl-glue-ext.googlecode.com/
#
# 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 require... | bsd-3-clause | 7,160,002,725,044,621,000 | 30.980545 | 111 | 0.608103 | false | 3.59222 | false | false | false |
SimonKohl/lasagne_visualizer | lasagne_visualizer/lasagne_visualizer.py | 1 | 6662 | # -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from copy import deepcopy
def get_currently_trainable_layers(net):
layers = [l for l in net.keys() if hasattr(net[l], 'W') if 'trainable' in list(net[l].params[net[l].W])]
return layers
def get_all_trainable_layer... | mit | 247,173,798,034,820,320 | 37.287356 | 177 | 0.606575 | false | 3.553067 | false | false | false |
spivachuk/sovrin-node | indy_node/test/anon_creds/test_get_revoc_reg_delta_with_none_results.py | 1 | 1588 | import copy
import json
from indy_common.constants import REVOC_REG_DEF_ID, TO, CRED_DEF_ID, REVOC_TYPE, TAG, VALUE
from indy_common.state import domain
from plenum.common.constants import DATA, STATE_PROOF
from plenum.common.types import f, OPERATION
from plenum.common.util import get_utc_epoch
from plenum.test.helpe... | apache-2.0 | 550,678,674,313,616,640 | 51.933333 | 145 | 0.588791 | false | 3.459695 | false | false | false |
aktiur/votes | votes/spiders/votes_spider.py | 1 | 7106 | # -*- coding: utf-8 -*-
import logging
import re
import scrapy
from votes import items
__author__ = 'Arthur Cheysson <arthur.cheysson@opusline.fr>'
logger = logging.getLogger(__file__)
RE_VOTE = r'([0-9]+)(\*?)'
RE_SCRUTIN_URL = r'\(legislature\)/(?P<legislature>[0-9]+)/\(num\)/(?P<scrutin>[0-9]+)$'
RE_SCRUTIN_DA... | gpl-3.0 | 5,991,381,271,288,323,000 | 39.959538 | 129 | 0.548123 | false | 3.288167 | false | false | false |
higebu/pyvmomi | pyVim/connect.py | 1 | 29200 | # VMware vSphere Python SDK
# Copyright (c) 2008-2015 VMware, Inc. 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
#
# ... | apache-2.0 | 266,203,138,452,200,600 | 34.784314 | 91 | 0.637637 | false | 4.342007 | false | false | false |
pombredanne/bioneb | bioneb/sequence/data.py | 1 | 3729 | # Copyright 2009 New England Biolabs <davisp@neb.com>
#
# This file is part of the BioNEB package released
# under the MIT license.
#
import string
DEGENERATES = {
"A": "A", "C": "C", "G": "G", "T": "T", "U": "U",
"W": "AT", "S": "CG", "M": "AC", "K": "GT", "R": "AG", "Y": "CT",
"B": "AGT", "D... | mit | 3,675,023,044,940,320,300 | 33.859813 | 74 | 0.44221 | false | 2.872881 | false | false | false |
Hammerite/LPPGP | lex.py | 1 | 8816 | import ply
import re
from .customised_lexer import CustomisedLexer
from ._lex_utilities import *
maximum_identifier_length = 99
states = (
('singleQuotedString', 'exclusive'),
('doubleQuotedString', 'exclusive'),
)
reserved_words = (
'boolean', 'number', 'vector', 'point', 'line', 'plane',
'horizonta... | mit | -6,751,100,139,000,333,000 | 31.531365 | 87 | 0.626928 | false | 3.449139 | false | false | false |
bmedx/modulestore | xmodule/modulestore/xml_importer.py | 1 | 47786 | """
Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft
but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state.
Split mongo has a physical for every unit in every state.
Given that, here's a table of semantics... | apache-2.0 | -6,630,822,637,302,118,000 | 39.223906 | 120 | 0.602227 | false | 4.305045 | false | false | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/separate_multiple_signal_identifiers_into_individual_statements.py | 1 | 3128 |
import copy
from vsg import parser
from vsg import rule
from vsg import token
from vsg import violation
from vsg.vhdlFile import utils
class separate_multiple_signal_identifiers_into_individual_statements(rule.Rule):
'''
Checks the case for words.
Parameters
----------
name : string
Th... | gpl-3.0 | -6,016,345,232,679,527,000 | 32.634409 | 119 | 0.58344 | false | 4.25 | false | false | false |
lino-framework/book | lino_book/projects/noi1e/maketour.py | 1 | 4300 | # -*- coding: UTF-8 -*-
# Copyright 2015-2021 Rumma & Ko Ltd
# License: BSD, see LICENSE for more details.
# Usage:
# $ go noi1e
# $ python manage.py run tours/make.py
# import time
from pathlib import Path
# from os.path import dirname
# import traceback
from django.conf import settings
from django.utils import trans... | bsd-2-clause | 9,220,006,689,325,919,000 | 34.53719 | 276 | 0.669535 | false | 3.592314 | false | false | false |
satishgoda/rbhus | rbhusUI/lib/selectRadioBoxMod.py | 1 | 6508 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'selectRadioBoxMod.ui'
#
# Created: Mon Mar 24 15:23:01 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
excep... | gpl-3.0 | -2,923,608,831,434,736,000 | 51.910569 | 106 | 0.782883 | false | 3.906363 | false | false | false |
TwoUnderscorez/DuckOS | filesystem/src/manualelf/createx.py | 1 | 2290 | # This script will create an ELF file
### SECTION .TEXT
# mov ebx, 1 ; prints hello
# mov eax, 4
# mov ecx, HWADDR
# mov edx, HWLEN
# int 0x80
# mov eax, 1 ; exits
# mov ebx, 0x5D
# int 0x80
### SECTION .DATA
# HWADDR db "Hello World!", 0x0A
out = ''
... | bsd-3-clause | -8,952,335,182,506,612,000 | 26.939024 | 73 | 0.626638 | false | 2.089416 | false | true | false |
rekka/intro-fortran-2016 | web/python/instability_euler.py | 1 | 1073 | import math
import numpy as np
import matplotlib
matplotlib.use('SVG')
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
x1 = 2.
x = np.linspace(0, x1, 100)
ax.plot(x, np.exp(-5. * x), linewidth=2, label = '$x(t)$')
N = 4
h = x1 / N
sx = np.linspace(0, x1, N + 1)
sy = [(1 - 5. * h)**n for n in range(N + 1)... | mit | -9,033,655,638,325,829,000 | 21.829787 | 69 | 0.60671 | false | 2.379157 | false | false | false |
google/material-design-icons | update/venv/lib/python3.9/site-packages/fontTools/ttLib/tables/G_P_K_G_.py | 5 | 3677 | from fontTools.misc.py23 import bytesjoin
from fontTools.misc import sstruct
from fontTools.misc.textTools import safeEval, readHex
from . import DefaultTable
import sys
import array
GPKGFormat = """
> # big endian
version: H
flags: H
numGMAPs: H
numGlyplets: H
"""
# psFontName is a byte string which follo... | apache-2.0 | 5,304,961,493,776,114,000 | 28.653226 | 81 | 0.697852 | false | 2.828462 | false | false | false |
m85091081/hakureshop | muMDAU_app/index.py | 1 | 3441 | # -*- coding: utf-8 -*-
# muMDAU_app main / first page
from muMDAU_app import app, socketio
from flask import make_response, request, render_template, Blueprint, url_for, redirect, session
import dbmongo, hashlib
from dbmongo import User, Data, Bid , Item
import subprocess, os
from subprocess import PIPE
from time imp... | gpl-3.0 | -3,453,045,532,743,228,000 | 34.71875 | 96 | 0.5366 | false | 3.805771 | false | false | false |
nathanhilbert/flaskboiler | flaskboiler/lib/util.py | 1 | 4805 | import types
from hashlib import sha1
def flatten(data, sep='.'):
out = {}
for k, v in data.items():
ksep = k + sep
if isinstance(v, dict):
for ik, iv in flatten(v, sep).items():
out[ksep + ik] = iv
else:
out[k] = v
return out
def nestify(d... | agpl-3.0 | 3,051,748,131,206,881,300 | 32.838028 | 83 | 0.559417 | false | 3.997504 | false | false | false |
google/autocjk | src/utils/decomposer.py | 1 | 13949 | # Copyright 2021 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, ... | apache-2.0 | 3,975,600,111,754,819,600 | 37.264463 | 87 | 0.6 | false | 4.046024 | false | false | false |
doganulus/montre | montre/algebra.py | 1 | 4581 | import os
import sys
from ctypes import *
from distutils.sysconfig import get_python_lib
# if os.name == 'nt':
# libmontre = windll.LoadLibrary(os.path.join(get_python_lib(), "libmontre"))
# else:
# libmontre = cdll.LoadLibrary(os.path.join(get_python_lib(), "libmontre.so"))
if os.name == 'nt':
... | gpl-3.0 | -8,366,900,255,173,163,000 | 30.721429 | 146 | 0.577385 | false | 2.786496 | false | false | false |
petchat/senz.dev.dashboard | templates/other/models.py | 1 | 33627 | # -*- coding: utf-8 -*-
import leancloud
from leancloud import Object
from leancloud import LeanCloudError
from leancloud import Query
from leancloud import User
from wsgi import signer
not_binary_label_dict = {'field':['field__manufacture', 'field__financial', 'field__infotech', 'field__law', 'field__agriculture'... | mit | -1,799,050,062,595,747,000 | 38.51976 | 860 | 0.555532 | false | 3.561684 | false | false | false |
Lartza/mumble | scripts/transtate.py | 1 | 1997 | #!/usr/bin/env python
#
# Copyright 2005-2019 The Mumble Developers. All rights reserved.
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file at the root of the
# Mumble source tree or at <https://www.mumble.info/LICENSE>.
# Extracts the progress of translations from th... | bsd-3-clause | -5,393,092,225,324,176,000 | 31.754098 | 181 | 0.58688 | false | 3.485166 | false | false | false |
dwavesystems/dimod | dimod/decorators.py | 1 | 17667 | # Copyright 2018 D-Wave Systems 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... | apache-2.0 | -5,030,165,640,508,756,000 | 33.304854 | 104 | 0.568744 | false | 4.235675 | false | false | false |
ZellMechanik-Dresden/dclab | dclab/rtdc_dataset/fmt_tdms/event_contour.py | 1 | 8965 | """Class for efficiently handling contour data"""
import sys
import warnings
import numpy as np
from ...features import inert_ratio
from .exc import ContourIndexingError
class ContourVerificationWarning(UserWarning):
pass
class ContourColumn(object):
def __init__(self, rtdc_dataset):
"""A wrappe... | gpl-2.0 | -762,820,162,700,823,400 | 35.443089 | 79 | 0.521695 | false | 4.073149 | false | false | false |
RayRuizhiLiao/ITK_4D | Utilities/Maintenance/ArchiveTestingDataOnGirder.py | 1 | 8696 | #!/usr/bin/env python
import argparse
import girder_client
from girder_client import GirderClient
import os
import fnmatch
import json
import mimetypes
from distutils.version import StrictVersion
if StrictVersion(girder_client.__version__) < StrictVersion("2.0.0"):
raise Exception("Girder 2.0.0 or new... | apache-2.0 | -2,546,963,650,112,851,000 | 43.528796 | 79 | 0.576587 | false | 4.655246 | false | false | false |
d2emon/newspaperizer | src/people/migrations/0006_auto_20160913_0914.py | 1 | 3605 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-13 09:14
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('people', '0005_auto_20160913_0556'),
]
operations = ... | gpl-3.0 | 7,657,601,287,248,645,000 | 37.763441 | 153 | 0.563107 | false | 4.186992 | false | false | false |
ez-p/madness | tournament/engine/algorithms/fiftyfifty.py | 1 | 1144 | """
Copyright 2016, Paul Powell, All rights reserved.
"""
import random
from matchup import Matchup
#
# Implement a matchup between two teams
# This is an example of implementing Matchup, which determines
# the winner when two teams play in the tournament.
#
class FiftyFifty(Matchup):
# teams: tuple of Team object... | gpl-3.0 | 6,270,458,487,347,824,000 | 29.105263 | 79 | 0.604895 | false | 3.477204 | false | false | false |
KarolBedkowski/photomagic | photomagick/lib/logging_setup.py | 1 | 1737 | #!/usr/bin/python2.4
# -*- coding: utf-8 -*-
"""
Logging setup.
2008-04-17 [k]: umieszczanie loga w tempie jeżeli jest frozen lub wybrany
katalog jest ro.
"""
__author__ = "Karol Będkowski"
__copyright__ = "Copyright (c) Karol Będkowski, 2006-2010"
__version__ = "2011-04-24"
__all__ = ['logging_setup']
import os.pa... | gpl-2.0 | -6,666,117,779,018,797,000 | 23.771429 | 73 | 0.703576 | false | 2.943973 | false | false | false |
repotvsupertuga/tvsupertuga.repository | script.module.openscrapers/lib/openscrapers/sources_openscrapers/en/freefmovies.py | 1 | 5118 | # -*- coding: UTF-8 -*-
# ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######.
# .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....##
# .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#.... | gpl-2.0 | 7,994,238,289,006,390,000 | 42.74359 | 120 | 0.446854 | false | 3.39165 | false | false | false |
fendouai/FaceRank | find_faces_in_picture.py | 1 | 1236 | from PIL import Image
import face_recognition
import os
print("h")
def find_and_save_face(web_file,face_file):
# Load the jpg file into a numpy array
image = face_recognition.load_image_file(web_file)
print(image.dtype)
# Find all the faces in the image
face_locations = face_recognition.face_locatio... | gpl-3.0 | -5,268,368,286,697,568,000 | 29.9 | 126 | 0.642395 | false | 3.423823 | false | false | false |
jimsize/PySolFC | pysollib/games/numerica.py | 1 | 33879 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free software... | gpl-3.0 | -6,632,628,231,658,330,000 | 31.670203 | 79 | 0.526108 | false | 3.320169 | false | false | false |
ccrisan/motioneye | motioneye/utils.py | 1 | 28442 |
# Copyright (c) 2013 Calin Crisan
# This file is part of motionEye.
#
# motionEye 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.
#
# ... | gpl-3.0 | -5,104,830,186,163,047,000 | 26.50677 | 117 | 0.551965 | false | 3.631048 | false | false | false |
cassinius/pyNLPGraphs | genSimWord2Vec/someModelCalcs.py | 1 | 1241 | import gensim
import logging
import os
W2V = gensim.models.Word2Vec
SHAKY_MODEL = '../Models_Shakespeare/'
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
categories = ['comedies', 'histories', 'poetry', 'tragedies']
for category in categories:
model = W2V.load_word2... | apache-2.0 | -6,932,447,444,441,028,000 | 41.827586 | 123 | 0.666398 | false | 3.133838 | false | false | false |
spandanb/horizon | horizon/tables/actions.py | 1 | 30386 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | -5,626,407,117,300,322,000 | 38.824377 | 79 | 0.608339 | false | 4.406323 | false | false | false |
bartvbl/pixeltoy | Python-Powered-Pixels/src/init.py | 1 | 1603 | from graphics import GraphicsController
from graphics import Colour
from core import GameController
from core import Input
from java.util import Random
#internal variables. Please do not use them; they can change name and function at any time.
sys_gameController = GameController()
sys_inputController = Input()
s... | gpl-2.0 | 1,318,768,260,145,429,000 | 24.0625 | 91 | 0.753587 | false | 3.136986 | false | false | false |
zillolo/vsut-python | vsut/assertion.py | 1 | 6816 | """Assertions for testing of conditions.
This module contains assertions that can be used in unit testing.
"""
def assertEqual(expected, actual, message=""):
"""Checks whether expected is equal to actual.
Args:
expected (object): The expected object.
actual (object): The actual o... | mit | 5,127,995,970,307,482,000 | 31 | 82 | 0.58304 | false | 5.045152 | false | false | false |
kubevirt/vAdvisor | tests/store/test_event.py | 1 | 1720 | from vadvisor.store.event import InMemoryStore
import pytest
from freezegun import freeze_time
from datetime import datetime, timedelta
@pytest.fixture
@freeze_time("2012-01-14 03:00:00")
def expired_store():
store = InMemoryStore(60)
# Insert old data
store.put('old')
store.put('old')
store.put('... | gpl-3.0 | 427,733,841,917,092,160 | 22.243243 | 60 | 0.651163 | false | 3.006993 | true | false | false |
plxaye/chromium | src/tools/perf/perf_tools/startup_benchmark.py | 1 | 1518 | # Copyright (c) 2013 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.
import json
from telemetry.page import page_benchmark
# Test how long Chrome takes to load when warm.
class PerfWarm(page_benchmark.PageBenchmark):
d... | apache-2.0 | 1,906,674,738,062,525,000 | 37.923077 | 79 | 0.68643 | false | 4.113821 | false | false | false |
ianfab/variantfishtest | chess/syzygy.py | 1 | 53977 | # -*- coding: utf-8 -*-
#
# This file is part of the python-chess library.
# Copyright (C) 2012-2015 Niklas Fiekas <niklas.fiekas@tu-clausthal.de>
#
# 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 Foundatio... | gpl-3.0 | -9,177,441,311,323,495,000 | 31.892748 | 155 | 0.465624 | false | 3.071238 | false | false | false |
tatumdmortimer/popgen-stats | siteFrequencySpectra.py | 1 | 3044 | #!/usr/bin/env python
import sys
import getopt
# This script reads in a vcf that has been processed with snpEff.
# Outgroup should be the reference sequence in the vcf.
# The script outputs the synonymous, nonsynonymous, and combined SFS.
def get_arguments(argv):
if len(argv) == 0:
usage()
sys.e... | mit | 2,309,766,632,523,727,400 | 30.381443 | 92 | 0.532194 | false | 3.401117 | false | false | false |
moralrecordings/mrcrowbar | mrcrowbar/transforms.py | 1 | 1107 | """Definition classes for transformations."""
import collections
import logging
logger = logging.getLogger( __name__ )
TransformResult = collections.namedtuple( 'TransformResult', ['payload', 'end_offset'] )
TransformResult.__new__.__defaults__ = (b'', 0)
class Transform( object ):
"""Base class for defining tra... | bsd-3-clause | 8,728,127,484,805,005,000 | 29.75 | 88 | 0.62692 | false | 4.670886 | false | false | false |
reinaldomaslim/Singaboat_RobotX2016 | robotx_nav/nodes/mc_deliver.py | 1 | 8296 | #!/usr/bin/env python
""" Mission 7-Detect and Deliver
1. Random walk with gaussian at center of map until station position is acquired
2. loiter around until correct face seen
3. if symbol seen, move towards symbol perpendicularly
4. if close enough, do move_base aiming
task 7:
-----------------
Created by ... | gpl-3.0 | -5,319,351,150,915,771,000 | 29.955224 | 186 | 0.699253 | false | 2.791386 | false | false | false |
stevec7/gpfs | contrib/mmpmon/gpfs_mmpmon.py | 1 | 5992 | #!/usr/bin/env python
import argparse
import datetime
import matplotlib
import matplotlib.pyplot as pyp
import os
import subprocess
import sys
from collections import defaultdict
def yodict():
return defaultdict(yodict)
def main(args):
# from cmdline args
inputfile = args.inputfile
if args.hostfile:... | mit | -3,272,287,698,081,385,000 | 31.565217 | 89 | 0.47213 | false | 4.149584 | false | false | false |
erdc/proteus | proteus/mprans/MCorr.py | 1 | 80203 | from __future__ import division
from builtins import zip
from builtins import range
from past.utils import old_div
import proteus
from proteus import cfemIntegrals, Norms, Quadrature
from proteus.Comm import globalSum
from proteus.mprans.cMCorr import *
import numpy as np
from proteus.Transport import OneLevelTransport... | mit | 3,438,568,843,681,131,000 | 53.301286 | 245 | 0.592035 | false | 3.700424 | true | false | false |
SlugocM/bayesfit | bayesfit/calc_integral.py | 1 | 1738 | """
*******************************************************
*
* calc_integral - APPROXIMATE INTEGRAL OF POSTERIOR
*
* License: Apache 2.0
* Written by: Michael Slugocki
* Created on: September 17, 2018
* Last updated: September 17, 2018
*
*******************************************************
"""
######... | apache-2.0 | 4,034,504,746,930,823,000 | 27.983333 | 131 | 0.447641 | false | 4.388889 | false | false | false |
wail007/ml_playground | test_olivettifaces.py | 1 | 2438 | import numpy as np
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_olivetti_faces
from sklearn.utils.validation import check_random_state
from linear_regression import *
from knn import *
def main():
# Load the faces datasets
data = fetch_olivetti_faces()
targets = data.target
da... | apache-2.0 | 6,522,751,880,474,785,000 | 28.385542 | 75 | 0.558655 | false | 3.395543 | true | false | false |
wettenhj/mytardis | docs/conf.py | 1 | 4933 | """
Sphinxdoc configuration. Defines how documentation is built on
readthedocs.org or manually
"""
import os
import sys
import django
import sphinx_rtd_theme
sys.path.append(os.path.abspath('..'))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tardis.test_settings")
django.setup()
# General configuration
# -----... | gpl-3.0 | -17,518,657,977,065,484 | 27.680233 | 114 | 0.713967 | false | 3.637906 | false | false | false |
UASLab/ImageAnalysis | scripts/archive/3a-detect-features.py | 1 | 4175 | #!/usr/bin/python3
import argparse
import fnmatch
import numpy as np
import os.path
from props import getNode
from lib import project
# for all the images in the project image_dir, detect features using the
# specified method and parameters
#
# Suggests censure/star has good stability between images (highest
# like... | mit | -2,305,476,880,242,524,400 | 43.892473 | 173 | 0.707784 | false | 3.592943 | false | false | false |
jelly/calibre | src/calibre/ebooks/metadata/book/serialize.py | 2 | 2011 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2017, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
import base64
from calibre.constants import preferred_encoding
from calibre.ebooks.metadata.book import SERIALIZAB... | gpl-3.0 | -1,328,223,682,139,849,500 | 29.469697 | 102 | 0.624565 | false | 3.47323 | false | false | false |
avanov/solo | solo/server/runtime/dependencies.py | 1 | 1516 | import asyncio
from typing import Callable, Mapping, Any, get_type_hints, NamedTuple, Type, TypeVar, Awaitable, Tuple
from pyrsistent import pmap
from solo.configurator.registry import Registry
from solo.server.db.types import SQLEngine
from solo.server.request import Request
from solo.types import IO
from solo.vendo... | mit | -574,166,168,978,581,570 | 31.255319 | 102 | 0.701847 | false | 3.575472 | false | false | false |
mbrucher/ATK-plugins | Dynamics/ATKColoredExpander/update_version.py | 1 | 2105 | #!/usr/bin/python
# this script will update the versions in plist and installer files to match that in resource.h
import plistlib, os, datetime, fileinput, glob, sys, string
scriptpath = os.path.dirname(os.path.realpath(__file__))
def replacestrs(filename, s, r):
files = glob.glob(filename)
for line in filein... | bsd-3-clause | -541,562,276,718,384,260 | 34.083333 | 95 | 0.71924 | false | 3.654514 | false | false | false |
Azure/azure-sdk-for-python | sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/periodic_timer_event_trigger.py | 1 | 2668 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,387,058,255,938,999,000 | 39.424242 | 91 | 0.610945 | false | 4.073282 | false | false | false |
zbigniewwojna/text-rcnn | core/preprocessor.py | 1 | 77352 | # Copyright 2017 The TensorFlow 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/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -9,116,560,995,851,932,000 | 38.995863 | 81 | 0.640526 | false | 3.8806 | false | false | false |
Alidron/demo-nao | alidron-env/lib/python2.7/site-packages/netcall/threading/client.py | 1 | 9962 | # vim: fileencoding=utf-8 et ts=4 sts=4 sw=4 tw=0
"""
An RPC client class using ZeroMQ as a transport and
the standard Python threading API for concurrency.
Authors
-------
* Alexander Glyzov
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2012-2014. Brian Granger,... | mpl-2.0 | 7,783,787,698,816,321,000 | 34.201413 | 105 | 0.502108 | false | 4.519964 | false | false | false |
liyatanggithub/futures | python/six2.py | 1 | 3160 | #!/usr/bin/python
#coding=utf-8
#from urllib import urlopen
import urllib2
import socket
#from numpy import *
import string
import time
import matplotlib.pyplot as plt
TIMEVALUE=6.0
URL="http://hq.sinajs.cn/list=AG1512"
xMax=100
yMin=10000
yMax=0
socket.setdefaulttimeout(4)
NowTime=float(int(time.time()))
LastTime=N... | gpl-2.0 | 7,798,025,000,891,313,000 | 32.978495 | 131 | 0.526899 | false | 2.864914 | false | false | false |
hagne/atm-py | atmPy/aerosols/instruments/UHSAS/UHSAS.py | 1 | 8187 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 10 11:43:10 2014
@author: htelg
"""
import datetime
import warnings
from io import StringIO as io
import numpy as np
import pandas as pd
import pylab as plt
from scipy.interpolate import UnivariateSpline
from atmPy.general import timeseries
from atmPy.aerosols.size_dis... | mit | 7,834,313,386,625,078,000 | 29.552239 | 134 | 0.577379 | false | 3.363599 | false | false | false |
Togethere-com/togethere | articles/migrations/0009_auto_20160816_1201.py | 1 | 1035 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-16 10:01
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependenc... | gpl-3.0 | 1,260,396,241,466,786,300 | 32.387097 | 121 | 0.624155 | false | 4.123506 | false | false | false |
duaneloh/Dragonfly | utils/py_src/detector.py | 1 | 12507 | '''Module containing detector class'''
import sys
import os
import numpy as np
from numpy import ma
import pandas
try:
import h5py
HDF5_MODE = True
except ImportError:
HDF5_MODE = False
class Detector(object):
"""Dragonfly detector
The detector file format is specified in github.com/duaneloh/Drag... | gpl-3.0 | -6,666,683,929,173,246,000 | 40.006557 | 100 | 0.557368 | false | 3.30873 | false | false | false |
henrysher/opslib | opslib/icsr53.py | 1 | 12439 | """
IcsR53: Library for Route53
---------------------------
+--------------------+------------+--+
| This is the IcsR53 common library. |
+--------------------+------------+--+
"""
import time
import string
from boto.route53 import Route53Connection
#from boto.route53.zone import Zone
from boto.route53.record import... | apache-2.0 | 7,279,076,845,178,610,000 | 33.649025 | 79 | 0.561942 | false | 4.335657 | false | false | false |
SebWouters/PyDMET | oldstuff/GroundState1D.py | 1 | 1418 | '''
PyDMET: a python implementation of density matrix embedding theory
Copyright (C) 2014, 2015 Sebastian Wouters
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 versio... | gpl-2.0 | -3,204,541,395,736,918,500 | 35.358974 | 91 | 0.720028 | false | 3.664083 | false | false | false |
slackhappy/graphite-web | webapp/graphite/render/views.py | 1 | 13462 | """Copyright 2008 Orbitz WorldWide
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... | apache-2.0 | 2,105,081,150,524,075,300 | 34.898667 | 125 | 0.676943 | false | 3.964075 | false | false | false |
TetraAsh/baruwa2 | baruwa/config/middleware.py | 1 | 3543 | # -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
# Baruwa - Web 2.0 MailScanner front-end.
# Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.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 S... | gpl-3.0 | -2,069,630,663,363,078,400 | 37.096774 | 76 | 0.709004 | false | 3.989865 | true | false | false |
voc/voctomix | voctogui/lib/toolbar/blinder.py | 1 | 4053 | #!/usr/bin/env python3
import logging
import os
import time
from gi.repository import Gtk, GLib
import lib.connection as Connection
from lib.config import Config
class BlinderToolbarController(object):
"""Manages Accelerators and Clicks on the Composition Toolbar-Buttons"""
# set resolution of the blink t... | mit | -8,651,226,816,891,558,000 | 34.243478 | 87 | 0.595361 | false | 3.867366 | false | false | false |
Lochlan/LochlanAndCatherine.com | lochlanandcatherinecom/settings.py | 1 | 5538 | """
Django settings for lochlanandcatherinecom project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
""... | mit | -980,325,389,961,318,300 | 30.11236 | 93 | 0.628025 | false | 3.617244 | false | false | false |
koverholt/bayes-fire | Example_Cases/Evac_Stairs/Scripts/evac_flow_occupants_models.py | 1 | 1805 | #!/usr/bin/env python
"""Module for setting up statistical models"""
from __future__ import division
import numpy as np
import pymc as mc
import evac_flow_occupants_graphics as graphics
import data_evac
def linear():
"""
PyMC configuration with a linear model.
This is an example of the Bayes MCMC mode... | bsd-3-clause | -6,766,210,754,383,178,000 | 25.544118 | 68 | 0.578947 | false | 3.752599 | false | false | false |
fidothe/rgf | spec/rgf/dsl_spec.py | 1 | 1149 | from rgf.dsl import *
from rgf.core.examples import ExampleGroup, ExampleSuite
def first_test_function(world):
world.has_been_run = True
def before_func(world):
world.before_was_run = True
with subject('DSL'):
@it('provides subject helper context to create and set current ExampleGroup')
def spec(wor... | mit | -3,633,537,729,751,433,700 | 37.3 | 121 | 0.678851 | false | 4.319549 | false | false | false |
joberreiter/pyload | module/plugins/internal/MultiHoster.py | 1 | 4606 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.Plugin import Fail, encode
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns, set_cookie, set_cookies
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
__version... | gpl-3.0 | 4,138,684,023,256,754,700 | 33.118519 | 120 | 0.534954 | false | 4.119857 | false | false | false |
robbie/anthill | anthill/people/models.py | 1 | 1958 | import datetime
from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from tagging.fields import TagField
from markupfield.fields import MarkupField
from anthill.models import LocationModel
ROLES = (
('other', 'Commu... | bsd-3-clause | 3,611,347,824,985,564,000 | 35.259259 | 88 | 0.703269 | false | 3.729524 | false | false | false |
chromium/chromium | components/autofill/PRESUBMIT.py | 4 | 3207 | # Copyright 2020 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.
"""Chromium presubmit script for src/components/autofill.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on th... | bsd-3-clause | 2,318,194,266,867,851,000 | 36.729412 | 79 | 0.67758 | false | 3.836124 | false | false | false |
itamaro/home-control-web | HomeControlWeb/HomeControlWeb/settings.py | 1 | 4959 | # Django settings for HomeControlWeb project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'home_control.db',
# The following settings are not used with sqlite3:
'USER': '',
'PASSWORD': '',
'HOST': ''... | apache-2.0 | -3,709,662,254,056,702,000 | 29.801242 | 127 | 0.660617 | false | 3.731377 | false | false | false |
cmollet/edifice | nyc/db_import_scripts/dcaScraper.py | 1 | 1325 | import urllib, urllib2
import os
from bs4 import BeautifulSoup as soup
import psycopg2
import time
from random import random
from math import ceil
TOP_URL = 'https://a866-bcportal.nyc.gov/BCPortals/LicenseCheckResults.aspx?'
spanid = 'ctl00_Content_lblTotalTop'
conn = psycopg2.connect(dbname='nyc')
cur = conn.cursor... | mit | -6,664,058,214,418,876,000 | 23.090909 | 77 | 0.598491 | false | 3.081395 | false | false | false |
nanalelfe/fofe-ner | LinkingUtil.py | 1 | 10706 | #!/eecs/research/asr/mingbin/python-workspace/hopeless/bin/python
import numpy, os, codecs, itertools, logging
from gigaword2feature import *
from scipy.sparse import csr_matrix
from sklearn import preprocessing
logger = logging.getLogger( __name__ )
def LoadED( rspecifier, language = 'eng' ):
entity2cls = { ... | mit | -8,459,524,670,432,376,000 | 41.149606 | 104 | 0.48272 | false | 3.527512 | false | false | false |
5-star/plugin.video.last_played | default.py | 1 | 11689 | # -*- coding: utf-8 -*-
import os, time
import json
import ssl
import xbmc
import xbmcaddon
import xbmcvfs
try:
from urllib.parse import quote, unquote
import urllib.request
python="3"
except ImportError:
from urllib import quote, unquote
import urllib2
python="2"
addon = xbmcaddon.Addon()
ena... | gpl-3.0 | 7,753,852,709,783,120,000 | 37.32459 | 296 | 0.581915 | false | 3.543195 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.