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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jenshenrik/destiny-trader | destiny.py | 1 | 3112 | import sys
import re
TYPE_BATTLEFIELD = "Battlefield"
def print_usage():
print("""
Star Wars: Destiny trade list builder
Usage:
$>python destiny.py <target-file>
where <target-file> is the text-file to process.
This file should be generated by logging into swdestiny.com, going to 'My coll... | gpl-3.0 | 8,064,256,526,302,666,000 | 24.719008 | 90 | 0.593509 | false | 3.314164 | false | false | false |
bfarr/kombine | examples/kepler/correlated_likelihood.py | 1 | 2577 | import numpy as np
import numpy.linalg as nl
import numpy.random as nr
import rv_model as rv
import scipy.linalg as sl
import scipy.stats as ss
def generate_covariance(ts, sigma, tau):
r"""Generates a covariance matrix according to an
squared-exponential autocovariance
.. math::
\left\lang... | mit | -2,341,818,866,456,086,000 | 27.955056 | 212 | 0.498642 | false | 3.035336 | false | false | false |
FrancescoRizzi/AWSomesauce | articles/BAS4-pws/custauth/custauth.py | 1 | 18186 | #!/usr/bin/env python
import os
import json
import StringIO
from contextlib import closing
import re
import time
import pprint
import boto3
from boto3.session import Session
import botocore
import jwt
from cryptography.x509 import load_pem_x509_certificate
from cryptography.hazmat.backends import default_backend
#... | mit | 3,410,329,240,392,538,600 | 38.027897 | 158 | 0.600352 | false | 4.217532 | false | false | false |
omemo/python-omemo | src/omemo/liteprekeystore.py | 1 | 2577 | # -*- coding: utf-8 -*-
#
# Copyright 2015 Tarek Galal <tare2.galal@gmail.com>
#
# This file is part of Gajim-OMEMO plugin.
#
# The Gajim-OMEMO plugin 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 ver... | gpl-3.0 | 4,332,987,200,107,825,700 | 34.791667 | 80 | 0.648428 | false | 3.67094 | false | false | false |
nitmir/django-cas-server | cas_server/admin.py | 1 | 6813 | # This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License version 3 for
# more details.
#
# You should have received a copy of the GNU General Public License... | gpl-3.0 | 5,034,193,972,385,483,000 | 32.895522 | 97 | 0.693821 | false | 3.967967 | false | false | false |
classner/fertilized-devtools | binding_generator/ordered_set.py | 1 | 1936 | # See http://code.activestate.com/recipes/576694/.
import collections
class OrderedSet(collections.MutableSet):
def __init__(self, iterable=None):
self.end = end = []
end += [None, end, end] # sentinel node for doubly linked list
self.map = {} # key --> [key, pre... | bsd-2-clause | -3,656,923,377,244,034,600 | 25.520548 | 78 | 0.497934 | false | 3.639098 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/feed_item_target_service.py | 1 | 5926 | # -*- 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 | 2,457,467,938,042,463,700 | 32.862857 | 128 | 0.662842 | false | 4.241947 | false | false | false |
ifaoe/daisi-tk | daisi_images.py | 1 | 5255 | #!/usr/bin/python3
import logging
import psycopg2
from argparse import ArgumentParser
from gdal_tif2geo import process
import multiprocessing
import subprocess
from joblib import Parallel, delayed
from math import ceil
import tempfile
import os
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name... | gpl-2.0 | 3,208,551,945,965,820,400 | 52.622449 | 150 | 0.654234 | false | 3.470938 | false | false | false |
fnoorian/Free-buck-boost | drivers/json_server.py | 1 | 1329 | from werkzeug.wrappers import Request, Response
from werkzeug.serving import run_simple
# this use package json-rpc (not jsonrpc!)
from jsonrpc import JSONRPCResponseManager, dispatcher
from drivers.boost_driver import FCCBoostDriver
from drivers.buck_driver import FCCBuckDriver, FCCMPPTDriver
from drivers.mi... | bsd-2-clause | -2,386,581,520,251,007,000 | 32.973684 | 64 | 0.734387 | false | 3.339196 | false | false | false |
0sw4l/villas-de-san-pablo | apps/utils/views.py | 1 | 1899 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.views.generic import CreateView
from django.views.generic import ListView
from django.views.generic import TemplateView
from django.views.generic import UpdateView, DetailView
from apps.utils.shortcuts import get_object_or_none
class BaseListView(L... | mit | -484,693,667,937,133,630 | 27.772727 | 83 | 0.699315 | false | 3.813253 | false | false | false |
tekton/DocuCanvas | accounts/migrations/0007_auto__add_recordpermission__add_unique_recordpermission_contentType_us.py | 1 | 8125 | # -*- 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 model 'RecordPermission'
db.create_table(u'accounts_recordpermission', (
(u'id', self.g... | gpl-3.0 | -734,166,846,986,416,400 | 72.872727 | 187 | 0.571323 | false | 3.693182 | false | false | false |
Jumpscale/jumpscale_portal8 | apps/portalbase/AYS81/.macros/wiki/aysservice/3_aysservice.py | 1 | 2580 | from collections import OrderedDict
def main(j, args, params, tags, tasklet):
try:
role = args.getTag('aysrole')
name = args.getTag('aysname')
ayspath = args.getTag('ayspath') or ''
repo = j.atyourservice.repoGet(ayspath)
service = repo.serviceGet(role, name, die=False)
... | apache-2.0 | 1,651,762,895,446,285,600 | 41.295082 | 123 | 0.526357 | false | 3.944954 | false | false | false |
DailyActie/Surrogate-Model | 01-codes/scikit-learn-master/sklearn/externals/funcsigs.py | 1 | 29802 | # Copyright 2001-2013 Python Software Foundation; All Rights Reserved
"""Function signature objects for callables
Back port of Python 3.3's function signature tools from the inspect module,
modified to be compatible with Python 2.6, 2.7 and 3.2+.
"""
from __future__ import absolute_import, division, print_function
im... | mit | -1,135,423,231,880,870,100 | 35.432763 | 84 | 0.537648 | false | 4.875982 | false | false | false |
cockroachdb/examples-orms | python/django/cockroach_example/settings.py | 1 | 3362 | """
Django settings for cockroach_example project.
Generated by 'django-admin startproject' using Django 2.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
im... | apache-2.0 | -6,756,807,042,726,074,000 | 24.278195 | 91 | 0.678168 | false | 3.487552 | false | false | false |
jbzdak/data-base-checker | bazydanych2/settingsdev.py | 1 | 1181 |
from bazydanych2.settingsshared import *
DEBUG=True
TEMPLATE_DEBUG=True
STATIC_ROOT = '/tmp/staticfiles'
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
},
'require_debug_tru... | gpl-3.0 | -979,873,808,556,966,700 | 21.730769 | 66 | 0.524979 | false | 3.535928 | false | true | false |
ted-gould/nova | nova/tests/unit/compute/test_compute_mgr.py | 1 | 197801 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 3,144,236,380,760,686,000 | 47.303053 | 79 | 0.589229 | false | 4.173017 | true | false | false |
rcocetta/kano-profile | kano_profile/apps.py | 1 | 3777 | #!/usr/bin/env python
# apps.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#
import os
from kano.utils import read_json, write_json, get_date_now, ensure_dir, \
chown_path, run_print_output_error
from kano.logging import logge... | gpl-2.0 | -652,654,093,269,193,900 | 25.787234 | 80 | 0.639396 | false | 3.200847 | false | false | false |
s34rching/python_classes | tests/test_contact_data.py | 1 | 2053 | import re
import random
def test_contact_data_from_home_page(app):
r_index = random.randrange(len(app.contact.get_contact_list()))
data_from_home_page = app.contact.get_contact_list()[r_index]
data_from_edit_page = app.contact.get_contact_info_from_edit_page(r_index)
assert data_from_home_page.firstna... | apache-2.0 | 5,947,474,044,754,886,000 | 50.35 | 131 | 0.656113 | false | 3.343648 | false | false | false |
phbradley/tcr-dist | tcrdist/parse_cdr3.py | 1 | 4891 | import logging
logger = logging.getLogger('parse_cdr3.py')
from .all_genes import all_genes, gap_character
def get_cdr3_and_j_match_counts( organism, ab, qseq, j_gene, min_min_j_matchlen = 3,
extended_cdr3 = False ):
#fasta = all_fasta[organism]
jg = all_genes[organism][j_gene... | mit | -8,223,407,647,342,972,000 | 34.963235 | 114 | 0.584339 | false | 2.921744 | false | false | false |
DevangS/CoralNet | accounts/migrations/0004_create_user_called_alleviate.py | 1 | 5492 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from django.conf import settings
class Migration(DataMigration):
# Create a dummy user called "Alleviate".
# This is the user under which Alleviate-accepted annotations
# will be... | bsd-2-clause | -8,000,994,628,860,161,000 | 53.376238 | 182 | 0.545157 | false | 3.856742 | false | false | false |
tuanvu216/udacity-course | intro_to_machine_learning/lesson/lesson_14_evaluation_metrics/evaluate_poi_identifier.py | 1 | 2588 | #!/usr/bin/python
"""
starter code for the evaluation mini-project
start by copying your trained/tested POI identifier from
that you built in the validation mini-project
the second step toward building your POI identifier!
start by loading/formatting the data
"""
import pickle
import sys
sys.p... | mit | -3,788,225,604,616,323,000 | 34.260274 | 180 | 0.721445 | false | 3.413793 | true | false | false |
mitmedialab/MediaCloud-Web-Tools | server/util/request.py | 1 | 3666 | import logging
import os
from functools import wraps
from flask import jsonify, request
from mediacloud.error import MCException
logger = logging.getLogger(__name__)
def validate_params_exist(form, params):
for param in params:
if param not in form:
raise ValueError('Missing required value f... | apache-2.0 | -5,131,921,134,876,014,000 | 30.603448 | 99 | 0.621386 | false | 4.170648 | false | false | false |
iwschris/ezodf2 | tests/test_pages.py | 1 | 3894 | #!/usr/bin/env python
#coding:utf-8
# Purpose: test spreadpage body
# Created: 29.01.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT
from __future__ import unicode_literals, print_function, division
__author__ = "mozman <mozman@gmx.at>"
# Standard Library
import unittest
# trusted or separately t... | mit | -2,706,917,590,960,068,000 | 28.186047 | 79 | 0.592193 | false | 3.403846 | true | false | false |
cbrucks/Federated_Python-Swiftclient | swiftclient/contrib/federated/protocols/rax.py | 1 | 2519 | import urllib
import urllib2
import json
import getpass
import BaseHTTPServer
import os
import webbrowser
from swiftclient.contrib.federated import federated_exceptions, federated_utils
import ssl
## Sends the authentication request to the IdP along
# @param idpEndpoint The IdP address
# @param idpRequest The authenti... | apache-2.0 | 9,062,573,529,326,963,000 | 37.166667 | 137 | 0.663358 | false | 4.089286 | false | false | false |
NaturalHistoryMuseum/inselect | inselect/gui/views/boxes/box_item.py | 1 | 8872 | import sys
from itertools import chain
from PyQt5.QtCore import Qt, QRect, QRectF
from PyQt5.QtGui import QPen
from PyQt5.QtWidgets import QGraphicsItem, QGraphicsRectItem
from inselect.lib.utils import debug_print
from inselect.gui.colours import colour_scheme_choice
from inselect.gui.utils import painter_state
fr... | bsd-3-clause | -3,026,487,980,262,549,000 | 32.73384 | 118 | 0.593102 | false | 4.060412 | false | false | false |
ragupta-git/ImcSdk | imcsdk/mometa/huu/HuuFirmwareCatalogComponent.py | 1 | 4134 | """This module contains the general information for HuuFirmwareCatalogComponent ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class HuuFirmwareCatalogComponentConsts:
pass
class HuuFirmwareCatalogComponent(ManagedObject... | apache-2.0 | 3,600,132,035,256,602,000 | 50.037037 | 217 | 0.604983 | false | 3.655172 | false | false | false |
rouault/Quantum-GIS | tests/src/python/test_qgsserver_wms_getfeatureinfo.py | 1 | 17012 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsServer GetFeatureInfo WMS.
From build dir, run: ctest -R PyQgsServerWMSGetFeatureInfo -V
.. note:: 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; ... | gpl-2.0 | 1,467,075,829,748,212,500 | 57.439863 | 236 | 0.499353 | false | 3.760725 | true | false | false |
oppia/oppia-ml | core/domain/remote_access_services.py | 1 | 4226 | # coding: utf-8
#
# Copyright 2017 The Oppia 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 requi... | apache-2.0 | 7,458,767,984,366,599,000 | 30.537313 | 79 | 0.6938 | false | 3.779964 | false | false | false |
carolFrohlich/nipype | nipype/interfaces/mrtrix3/preprocess.py | 2 | 7501 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
# -*- coding: utf-8 -*-
"""
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname(os.path.realpath(__file__ ))
>>> datadir = os.path.realpath(... | bsd-3-clause | -1,332,776,987,818,199,800 | 36.318408 | 87 | 0.614985 | false | 3.713366 | true | false | false |
sam-m888/gramps | gramps/plugins/drawreport/ancestortree.py | 1 | 42337 | # Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2014 Paul Franklin
# Copyright (C) 2010-2015 Craig J. Anderson
#
# This program is free software; you can redistrib... | gpl-2.0 | 6,894,781,434,802,397,000 | 37.038634 | 79 | 0.546709 | false | 3.832096 | false | false | false |
lgfausak/sqlbridge | sqlbridge/twisted/dbengine.py | 1 | 6399 | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014 Greg Fausak
##
## 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... | apache-2.0 | 2,118,608,279,539,695,600 | 42.828767 | 135 | 0.606188 | false | 3.928177 | false | false | false |
daniel1yuan/Persist | Persist/webapp/views.py | 1 | 6162 | from django.shortcuts import redirect,render
from django.http import Http404, JsonResponse, HttpResponseForbidden, HttpResponse
from django.contrib.auth import authenticate, login, logout
from webapp.models import User, Customer, Habit
from django.core import serializers
from django.views.decorators.csrf import csrf_ex... | mit | 303,794,903,503,346,800 | 31.431579 | 188 | 0.693281 | false | 3.485294 | false | false | false |
alertedsnake/pycrust | pycrust/__init__.py | 1 | 5061 | """
Pycrust
A collection of CherryPy extensions
See also the following submodules:
pycrust.auth
pycrust.saplugin
pycrust.satool
pycrust.tools
"""
__author__ = 'Michael Stella <pycrust@thismetalsky.org>'
__version__ = '1.0.0'
import inspect, logging, os, sys
import cherrypy
import codecs
class Ba... | mit | 8,430,111,610,056,274,000 | 31.031646 | 107 | 0.610354 | false | 3.902082 | false | false | false |
ayseyo/oclapi | django-nonrel/ocl/oclapi/settings/common.py | 1 | 10523 | import os
from configurations import Configuration
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
class Common(Configuration):
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Jon Payne', 'paynejd@gmail.com'),
('PK Shiu', 'pk@pkshiu.com'),
)
MANAGERS = ADMINS
DEFAULT... | mpl-2.0 | -5,339,695,786,148,565,000 | 35.922807 | 104 | 0.615699 | false | 3.982967 | false | false | false |
stuart-knock/tvb-framework | tvb_test/adapters/visualizers/eegmonitor_test.py | 1 | 4412 | # -*- coding: utf-8 -*-
#
#
# TheVirtualBrain-Framework Package. This package holds all Data Management, and
# Web-UI helpful to run brain-simulations. To use it, you also need do download
# TheVirtualBrain-Scientific Package (for simulators). See content of the
# documentation-folder for more details. See also http:/... | gpl-2.0 | -6,400,699,188,668,995,000 | 41.028571 | 103 | 0.694923 | false | 3.707563 | true | false | false |
lilydjwg/you-get | src/you_get/extractors/netease.py | 1 | 9738 | #!/usr/bin/env python
from json import loads
import hashlib
import base64
import os
import binascii
try:
from Crypto.Cipher import AES
import xml.etree.ElementTree as ET
has_crypto = True
except ImportError:
has_crypto = False
from ..common import *
from ..extractor import VideoExtractor
from ..util ... | mit | -3,439,591,755,401,592,300 | 35.548872 | 162 | 0.518103 | false | 3.292245 | false | false | false |
jlaunonen/kirppu | kirppu/views/csv_utils.py | 1 | 1469 | # -*- coding: utf-8 -*-
import functools
import html
import io
from urllib.parse import quote
from django.conf import settings
from django.http import HttpResponse, StreamingHttpResponse
def strip_generator(fn):
@functools.wraps(fn)
def inner(output, event, generator=False):
if generator:
... | mit | 4,648,484,677,998,597,000 | 28.979592 | 105 | 0.605174 | false | 4.161473 | false | false | false |
wbrp/dnsimple-zoneimport | setup.py | 1 | 1349 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from dnsimple_zoneimport import meta
f = open('requirements.txt', 'r')
lines = f.readlines()
requirements = [l.strip().strip('\n') for l in lines if l.strip() and not l.strip().startswith('#')]
readme = open('README.rst').read()
setup(name='dnsimple... | mit | -6,276,857,376,273,034,000 | 32.725 | 100 | 0.594514 | false | 4.026866 | false | false | false |
flavour/cedarbluff | modules/eden/project.py | 1 | 132447 | # -*- coding: utf-8 -*-
""" Sahana Eden Project Model
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software witho... | mit | -1,446,498,629,031,835,600 | 40.312227 | 219 | 0.415691 | false | 5.194407 | false | false | false |
thorwhalen/ut | ml/stream/sequences.py | 1 | 6137 |
from sklearn.base import BaseEstimator
from collections import Counter
import pandas as pd
from numpy import sum, nan, isnan
from ut.util.uiter import window
class NextElementPredictor(BaseEstimator):
def predict(self, seqs):
preds = self.predict_proba(seqs)
return [max(pred, key=lambda key: pr... | mit | 5,309,313,774,185,950,000 | 37.118012 | 120 | 0.608604 | false | 3.838024 | false | false | false |
kivhift/qmk | src/commands/help.py | 1 | 1442 | #
# Copyright (c) 2009-2012 Joshua Hughes <kivhift@gmail.com>
#
import atexit
import os
import tempfile
import urllib
import webbrowser
import qmk
class HelpCommand(qmk.Command):
'''
View help for all available commands. A new tab will be opened in the
default web browser that contains the help for all o... | mit | -3,162,210,888,576,345,000 | 31.772727 | 79 | 0.576976 | false | 3.560494 | false | false | false |
demisto/content | Packs/WindowsForensics/Scripts/RegistryParse/RegistryParse_test.py | 1 | 1112 | import json
import RegistryParse as reg_parse
def util_load_json(path):
with open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_get_sub_keys():
key = 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList'
folder_output_key = 'Sid'
mo... | mit | 7,210,574,577,760,528,000 | 38.714286 | 92 | 0.670863 | false | 2.562212 | false | false | false |
KDE/twine2 | kdelibs.py | 1 | 37607 | # -*- coding: utf-8 -*-
# Copyright 2009-2010 Simon Edwards <simon@simonzone.com>
#
# 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... | lgpl-3.0 | -8,934,794,075,207,159,000 | 43.505325 | 738 | 0.658468 | false | 3.653648 | false | false | false |
josiah-wolf-oberholtzer/supriya | tests/nonrealtime/test_nonrealtime_Session_zero_duration.py | 1 | 2475 | import pytest
import supriya.assets.synthdefs
import supriya.nonrealtime
import supriya.synthdefs
import supriya.ugens
def test_manual_with_gate():
session = supriya.nonrealtime.Session(0, 2)
with session.at(0):
group = session.add_group(duration=4)
for i in range(4):
with session.at(i):
... | mit | 6,077,712,018,084,925,000 | 29.9375 | 79 | 0.486465 | false | 2.908343 | false | false | false |
pombredanne/hitch | hitch/commandline.py | 1 | 10374 | """High level command line interface to hitch."""
from subprocess import call, PIPE, STDOUT, CalledProcessError, Popen
from hitch.click import command, group, argument, option
from os import path, makedirs, listdir, kill, remove
from sys import stderr, exit, modules, argv
from functools import partial
from hitch import... | agpl-3.0 | -3,730,368,201,072,467,000 | 36.182796 | 103 | 0.613264 | false | 3.732997 | false | false | false |
locaweb/simplenet | src/simplenet/common/event.py | 1 | 4587 | # Copyright 2012 Locaweb.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | mit | 479,172,603,894,329,150 | 33.75 | 106 | 0.51755 | false | 4.699795 | false | false | false |
certik/sfepy | sfepy/base/conf.py | 1 | 10020 | import re
from base import Struct, IndexedStruct, dict_to_struct, pause, output, copy,\
import_file, assert_, get_default
from reader import Reader
_required = ['filename_mesh', 'field_[0-9]+|fields',
'ebc_[0-9]+|ebcs', 'fe', 'equations',
'region_[0-9]+|regions', 'variable_[0-9]+|variab... | bsd-3-clause | 5,469,896,234,037,747,000 | 31.960526 | 81 | 0.518762 | false | 3.724907 | false | false | false |
asposeforcloud/Aspose_Cloud_SDK_For_Python | asposecloud/email/__init__.py | 1 | 7149 | __author__ = 'assadmahmood'
import requests
import json
from asposecloud import Product
from asposecloud import AsposeApp
from asposecloud.common import Utils
# ========================================================================
# DOCUMENT CLASS
# ================================================================... | mit | -1,981,531,942,469,692,000 | 34.567164 | 118 | 0.566093 | false | 4.280838 | false | false | false |
swprojects/wxPieTool | pyimager.py | 1 | 8720 | """
wxPieTool - wxPython Image Embedding Tool
Copyright 2016 Simon Wu <swprojects@gmx.com>
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 la... | gpl-2.0 | 3,023,426,488,338,498,600 | 34.741803 | 96 | 0.607798 | false | 3.789657 | false | false | false |
pli3/e2-openwbif | plugin/controllers/views/web/powerstate.py | 1 | 5042 | #!/usr/bin/env python
##################################################
## DEPENDENCIES
import sys
import os
import os.path
try:
import builtins as builtin
except ImportError:
import __builtin__ as builtin
from os.path import getmtime, exists
import time
import types
from Cheetah.Version import MinCompatib... | gpl-2.0 | 7,429,331,706,846,930,000 | 32.838926 | 192 | 0.626934 | false | 3.674927 | false | false | false |
erigones/esdc-ce | api/mon/backends/abstract/server.py | 1 | 1705 | from django.utils.text import Truncator
from django.utils.translation import ugettext_lazy as _
# noinspection PyProtectedMember
from vms.models.base import _DummyModel, _UserTasksModel
from vms.models import Dc
class AbstractMonitoringServer(_DummyModel, _UserTasksModel):
"""
Abstract model for representing... | apache-2.0 | 4,198,058,031,038,698,500 | 24.833333 | 72 | 0.653959 | false | 3.892694 | false | false | false |
umlfri/umlfri2 | umlfri2/qtgui/canvas/scrolledcanvaswidget.py | 1 | 1410 | from PyQt5.QtCore import QPoint
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QWheelEvent
from PyQt5.QtWidgets import QScrollArea
from .canvaswidget import CanvasWidget
class ScrolledCanvasWidget(QScrollArea):
def __init__(self, main_window, drawing_area):
super().__init__()
self._... | gpl-3.0 | 4,295,992,312,250,899,000 | 34.25 | 82 | 0.52766 | false | 4.812287 | false | false | false |
carbureted/shavar-prod-lists | scripts/json_verify.py | 1 | 6963 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import glob
import json
import re
from types import DictType, ListType, UnicodeType
from urlparse import urlparse
parser = argparse.ArgumentParser(description='Verify json files for shavar.')
parser.add_argument("-f", "--file", help="filename to verify")
... | gpl-3.0 | -808,360,885,678,404,500 | 27.892116 | 78 | 0.507827 | false | 4.112817 | false | false | false |
kamalx/edx-platform | lms/djangoapps/discussion_api/tests/test_api.py | 1 | 90651 | """
Tests for Discussion API internal interface
"""
from datetime import datetime, timedelta
import itertools
from urlparse import parse_qs, urlparse, urlunparse
from urllib import urlencode
import ddt
import httpretty
import mock
from pytz import UTC
from django.core.exceptions import ValidationError
from django.htt... | agpl-3.0 | -6,897,488,860,505,443,000 | 38.259853 | 118 | 0.553916 | false | 3.988867 | true | false | false |
att-comdev/deckhand | deckhand/common/validation_message.py | 1 | 2620 | # Copyright 2018 AT&T Intellectual Property. All other 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... | apache-2.0 | 4,281,113,961,153,711,000 | 38.104478 | 118 | 0.646183 | false | 4.418212 | false | false | false |
gwct/grampa | lib/spec_tree.py | 1 | 5143 | import sys, os, reconcore as RC, recontree as RT, global_vars as globs
#############################################################################
def readSpecTree(spec_tree_input, starttime):
if os.path.isfile(spec_tree_input):
spec_tree = open(spec_tree_input, "r").read().replace("\n", "").replace("\r","");
e... | gpl-3.0 | -548,104,545,586,755,300 | 43.336207 | 145 | 0.634649 | false | 3.030642 | false | false | false |
beeftornado/sentry | src/sentry/roles/manager.py | 1 | 2011 | from __future__ import absolute_import
import six
from collections import OrderedDict
class Role(object):
def __init__(self, priority, id, name, desc="", scopes=(), is_global=False):
assert len(id) <= 32, "Role id must be no more than 32 characters"
self.priority = priority
self.id = id... | bsd-3-clause | 2,672,312,002,791,817,700 | 24.455696 | 80 | 0.567379 | false | 3.815939 | false | false | false |
akrherz/iem | htdocs/DCP/ahpsxml2wxc.py | 1 | 2188 | """Convert the AHPS XML into WXC format"""
import datetime
from paste.request import parse_formvars
from twisted.words.xish import domish, xpath
import requests
def do(nwsli):
"""work"""
res = ""
xml = requests.get(
(
"https://water.weather.gov/ahps2/"
"hydrograph_to_xml.p... | mit | -4,720,805,943,521,046,000 | 27.051282 | 69 | 0.528793 | false | 3.445669 | false | false | false |
tictail/claw | claw/utils.py | 1 | 2061 | # -*- coding: utf-8 -*-
import logging
from random import shuffle
from claw.constants import RE_DELIMITER
log = logging.getLogger(__name__)
def safe_format(format_string, *args, **kwargs):
"""
Helper: formats string with any combination of bytestrings/unicode
strings without raising exceptions
"""... | apache-2.0 | -4,425,286,584,638,680,600 | 25.802632 | 73 | 0.621993 | false | 3.536458 | false | false | false |
pjh/vm-analyze | analyze/oldscripts/gather_proc.py | 1 | 3609 | #! /usr/bin/env python3.3
# Virtual memory analysis scripts.
# Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu
# Copyright (c) 2012-2014 Peter Hornyack and University of Washington
from vm_regex import *
from pjh_utils import *
import vm_common as vm
import errno
import os
import re
import stat
import sys... | bsd-3-clause | -7,003,235,764,294,394,000 | 27.195313 | 75 | 0.688556 | false | 2.931763 | false | false | false |
andreasvc/disco-dop | web/browse.py | 1 | 12449 | """Web interface to browse a corpus with various visualizations."""
# stdlib
import os
import re
import sys
import glob
import math
import logging
from collections import OrderedDict
from functools import wraps
import matplotlib
matplotlib.use('AGG')
import matplotlib.cm as cm
import pandas
# Flask & co
from flask impo... | gpl-2.0 | -5,266,283,117,673,447,000 | 31.674541 | 79 | 0.660053 | false | 2.921615 | false | false | false |
MERegistro/meregistro | meregistro/apps/seguridad/models/Rol.py | 1 | 1354 | # -*- coding: UTF-8 -*-
from django.db import models
from apps.seguridad.models import Credencial, TipoAmbito
class Rol(models.Model):
ROL_ADMIN_NACIONAL = 'AdminNacional'
ROL_ADMIN_SEGURIDAD = 'AdminSeguridad'
ROL_REFERENTE_JURISDICCIONAL = 'ReferenteJurisdiccional'
ROL_REFERENTE_INSTITUCIONAL ... | bsd-3-clause | 5,661,577,332,660,196,000 | 31.238095 | 106 | 0.679468 | false | 3.127021 | false | false | false |
osspeak/osspeak | osspeak/recognition/commands/monitor.py | 1 | 3535 | import threading
import collections
import log
import copy
import asyncio
import settings
import clargs
from recognition.actions.library import pywindow
from recognition.commands import loader
from recognition.actions import perform
from communication import topics, pubsub
import time
def create_message_subscriptions... | mit | 532,628,761,851,594,700 | 47.438356 | 125 | 0.722772 | false | 4.067894 | false | false | false |
jamielennox/django-openstack-auth-websso | openstack_auth_websso/plugin.py | 1 | 2014 | # 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
# distributed under t... | apache-2.0 | -5,599,959,279,583,941,000 | 37.730769 | 75 | 0.644985 | false | 4.266949 | false | false | false |
0ps/wfuzz | src/wfuzz/mixins.py | 1 | 1871 | from .plugin_api.urlutils import parse_url
from .exception import FuzzExceptBadInstall
# python 2 and 3
import sys
if sys.version_info >= (3, 0):
from urllib.parse import urljoin
else:
from urlparse import urljoin
class FuzzRequestSoupMixing(object):
def get_soup(self):
try:
from bs4 ... | gpl-2.0 | 6,004,915,391,877,477,000 | 27.348485 | 100 | 0.5783 | false | 4.049784 | false | false | false |
google-research/google-research | summae/human_and_extractive.py | 1 | 8614 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# 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 applicab... | apache-2.0 | -9,174,223,925,574,483,000 | 34.01626 | 80 | 0.666241 | false | 3.016106 | false | false | false |
jpvanhal/cloudsizzle | cloudsizzle/asi/server.py | 1 | 11139 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2009-2010 CloudSizzle Team
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
#... | mit | -7,420,965,687,537,019,000 | 30.735043 | 79 | 0.573301 | false | 3.988185 | false | false | false |
diplomacy/research | diplomacy_research/__init__.py | 1 | 1696 | # ==============================================================================
# Copyright 2019 - Philip Paquette
#
# NOTICE: Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without rest... | mit | 6,087,254,447,154,937,000 | 42.487179 | 103 | 0.655071 | false | 4.229426 | false | true | false |
MiczFlor/Booktype | lib/booktype/constants.py | 1 | 22740 | # This file is part of Booktype.
# Copyright (c) 2012 Aleksandar Erkalovic <aleksandar.erkalovic@sourcefabric.org>
#
# Booktype 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 Li... | agpl-3.0 | 6,846,859,636,964,900,000 | 45.790123 | 97 | 0.497845 | false | 3.351511 | false | false | false |
pepitogithub/PythonScripts | musica/drumExFachade.py | 1 | 2964 | # import pygame
import threading
import drumExMachina
class Fasade:
"""
Matrix
-> reproducir()
-> pausar()
-> salir()
-> volumen-general()
-> tempo()
-> figura()
-> agregar-pista()
-> quitar-pi... | gpl-2.0 | 718,095,634,692,036,600 | 22.164063 | 86 | 0.430162 | false | 3.884666 | false | false | false |
stvstnfrd/edx-platform | lms/djangoapps/courseware/views/views.py | 1 | 89915 | """
Courseware views functions
"""
import json
import logging
from collections import OrderedDict, namedtuple
from datetime import datetime
import bleach
import requests
import six
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import Anonym... | agpl-3.0 | 646,148,226,935,186,800 | 41.980402 | 212 | 0.656131 | false | 4.068552 | false | false | false |
CasataliaLabs/biscuit_drishtiman | v4l_capture_example.py | 1 | 1279 | import Image
import select
import v4l2capture
import numpy
import pylab
import time
# Open the video device.
#~ video = v4l2capture.Video_device("/dev/video0")
video = v4l2capture.Video_device("http://admin:@192.168.1.105/snapshot.cgi?.mjpeg")
# Suggest an image size to the device. The device may choose and
# return ... | gpl-3.0 | 5,290,132,691,312,513,000 | 28.744186 | 83 | 0.713839 | false | 3.067146 | false | false | false |
vipod/pyzimbra | pyzimbra/soap_auth.py | 2 | 6473 | # -*- coding: utf-8 -*-
"""
################################################################################
# Copyright (c) 2010, Ilgar Mashayev
#
# E-mail: pyzimbra@lab.az
# Website: http://github.com/ilgarm/pyzimbra
################################################################################
# This file is part ... | lgpl-3.0 | -5,685,805,696,362,786,000 | 34.371585 | 81 | 0.549359 | false | 4.470304 | false | false | false |
beeftornado/sentry | src/sentry/api/endpoints/group_events.py | 1 | 5127 | from __future__ import absolute_import
import six
from datetime import timedelta
from django.utils import timezone
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
from functools import partial
from sentry import eventstore
from sentry.api.base import EnvironmentMixin
fr... | bsd-3-clause | 4,531,243,865,721,410,000 | 38.744186 | 98 | 0.634484 | false | 4.469922 | false | false | false |
vygr/Python-PCB | pcb.py | 1 | 3869 | #!/opt/local/bin/pypy -tt
# -*- coding: utf-8 -*-
#Copyright (C) 2014 Chris Hinsley All Rights Reserved
import sys, argparse, router
from copy import deepcopy
from ast import literal_eval
from mymath import *
def main():
parser = argparse.ArgumentParser(description = 'Pcb layout optimizer.', formatter_class = argpa... | gpl-2.0 | -8,110,803,568,652,330,000 | 51.283784 | 158 | 0.632722 | false | 2.711282 | false | false | false |
AntonelliLab/seqcap_processor | bin/aTRAM-master/atram.py | 1 | 8421 | #!/usr/bin/env python3
"""
Start atram.
This wrapper module parses the input arguments and passes them to the module
that does the actual processing (core_atram.py).
"""
import os
import argparse
import textwrap
import lib.db as db
import lib.log as log
import lib.bio as bio
import lib.util as util
import lib.blast a... | mit | -5,189,248,304,416,858,000 | 36.762332 | 79 | 0.624273 | false | 3.895005 | false | false | false |
AmericanResearchInstitute/poweru-server | pr_services/user_system/organization_email_domain_manager.py | 1 | 1902 | """
OrgEmailDomain manager class
@author Chris Church <cchurch@americanri.com>
@copyright Copyright 2011 American Research Institute, Inc.
"""
from pr_services.object_manager import ObjectManager
from pr_services.rpc.service import service_method
import facade
class OrgEmailDomainManager(ObjectManager):
"""
... | bsd-3-clause | 8,118,541,161,619,871,000 | 33.581818 | 128 | 0.640904 | false | 4.099138 | false | false | false |
ros2/rclpy | rclpy/rclpy/action/client.py | 1 | 22966 | # Copyright 2019 Open Source Robotics Foundation, 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... | apache-2.0 | -5,743,371,639,841,132,000 | 38.057823 | 97 | 0.613254 | false | 4.313674 | false | false | false |
mmalyska/eve-wspace | evewspace/Map/views.py | 1 | 36404 | # Eve W-Space
# Copyright (C) 2013 Andrew Austin and other contributors
#
# 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 | -173,141,384,186,333,800 | 33.150094 | 95 | 0.608779 | false | 3.938974 | false | false | false |
tedlaz/pyted | tedutil/db_context_manager.py | 1 | 5076 | '''
Module db_context_manager.py
Connect to sqlite database and perform crud functions
'''
import sqlite3
import os
PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
print(PATH)
def grup(txtv):
'''
Trasforms a string to uppercase special for Greek comparison
'''
ar1 = u"αάΆΑβγδεέΈζ... | gpl-3.0 | 2,498,087,319,140,315,600 | 30.408805 | 78 | 0.547257 | false | 3.383469 | false | false | false |
Erotemic/local | build_scripts/custom_fletch.py | 1 | 5960 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
from os.path import dirname # NOQA
import sys
def disable_packages():
if pkgname == 'OpenBLAS':
"""
PKGNAME=OpenBLAS
PKGNAME=Zlib
find build/src/ -iname CMakeCache.txt -delete
rm -rf build/src/$PKGNAME*
rm -... | gpl-3.0 | -2,039,726,112,540,294,700 | 26.850467 | 119 | 0.58104 | false | 3.344557 | false | false | false |
vidyar/testing-yml | setup.py | 1 | 1647 | # dockerpty.
#
# Copyright 2014 Chris Corbyn <chris@w3style.co.uk>
#
# 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 ap... | apache-2.0 | -6,114,690,253,438,141,000 | 33.3125 | 77 | 0.681239 | false | 3.94964 | false | false | false |
cournape/Bento | bento/commands/build.py | 1 | 2331 | import os
import os.path as op
from bento.utils.utils \
import \
subst_vars
from bento.installed_package_description \
import \
BuildManifest, build_manifest_meta_from_pkg
from bento._config \
import \
BUILD_MANIFEST_PATH
from bento.commands.core \
import \
Option
from... | bsd-3-clause | 4,304,503,386,611,436,500 | 29.272727 | 90 | 0.557701 | false | 3.911074 | false | false | false |
google-research/simclr | tf2/data_util.py | 1 | 18220 | # coding=utf-8
# Copyright 2020 The SimCLR Authors.
#
# 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 | -7,356,768,281,607,679,000 | 34.105973 | 80 | 0.644237 | false | 3.574652 | false | false | false |
Daniel-CA/odoo-addons | stock_quant_expiry/models/stock_quant.py | 1 | 1792 | # -*- coding: utf-8 -*-
# Copyright 2017 Ainara Galdona - AvanzOSC
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api
class StockQuant(models.Model):
_inherit = 'stock.quant'
@api.multi
@api.depends('lot_id.life_date', 'lot_id.mrp_date')
def _co... | agpl-3.0 | -6,778,287,636,719,805,000 | 43.8 | 79 | 0.580915 | false | 3.43295 | false | false | false |
ScanOC/trunk-player | radio/receivers.py | 1 | 1882 | # receivers.py
import json
import logging
import datetime
from django.dispatch import receiver
from django.contrib.auth.models import User
from pinax.stripe.signals import WEBHOOK_SIGNALS
from radio.models import Plan, StripePlanMatrix, Profile
from pinax.stripe.models import Plan as pinax_Plan
# Get an instance of... | mit | -176,158,808,518,551,600 | 37.408163 | 115 | 0.70457 | false | 3.749004 | false | false | false |
Grumbel/rfactorlcd | rfactorlcd/state.py | 1 | 13232 | # rFactor Remote LCD
# Copyright (C) 2014 Ingo Ruhnke <grumbel@gmail.com>
#
# 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 versi... | gpl-3.0 | -7,897,458,366,094,102,000 | 30.504762 | 78 | 0.546025 | false | 3.291542 | false | false | false |
ellisztamas/faps | faps/pr_unsampled.py | 1 | 2716 | import numpy as np
def pr_unsampled(offspring_diploid, maternal_diploid, allele_freqs, offspring_genotype, maternal_genotype, male_genotype, mu):
"""
Calculate the transitions probability for a given set of parental and offspring
alleles.
Transitipn probabilities are then weight by the probability of... | mit | 5,498,974,815,240,566,000 | 46.666667 | 126 | 0.623343 | false | 3.495495 | false | false | false |
fbradyirl/home-assistant | homeassistant/components/mochad/light.py | 1 | 4739 | """Support for X10 dimmer over Mochad."""
import logging
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
SUPPORT_BRIGHTNESS,
Light,
PLATFORM_SCHEMA,
)
from homeassistant.components import mochad
from homeassistant.const import CONF_NAME, CONF_PLATFORM, CONF_DEVIC... | apache-2.0 | 1,578,962,292,659,869,400 | 34.365672 | 84 | 0.603292 | false | 4.071306 | false | false | false |
JoErNanO/brianmodel | brianmodel/neuron/neuron.py | 1 | 5023 | #!/usr/bin/python
# coding: utf-8
# #################################################################################
# Copyright (C) 2014 Francesco Giovannini, Neurosys - INRIA CR Nancy - Grand Est
# Authors: Francesco Giovannini
# email: francesco.giovannini@inria.fr
# website: http://neurosys.loria.fr/
# Permission... | gpl-3.0 | 8,160,894,770,479,721,000 | 39.184 | 148 | 0.550468 | false | 4.570519 | false | false | false |
ronnyandersson/zignal | examples/ex_chunks.py | 1 | 2576 | '''
Created on 12 Apr 2020
@author: Ronny Andersson (ronny@andersson.tk)
@copyright: (c) 2020 Ronny Andersson
@license: MIT
Demo of how to iterate over an instance of the Audio class, for chunk-based
processing. Typically the chunks have a size that is a power of two, for
example 256, 1024 or 4096. In this example th... | mit | -1,448,987,454,992,654,300 | 32.025641 | 79 | 0.612189 | false | 3.476383 | false | false | false |
modesttree/Projeny | Source/mtm/log/LogStreamConsole.py | 1 | 4086 |
import os
import re
import sys
from mtm.ioc.Inject import Inject
import mtm.util.Util as Util
from mtm.log.Logger import LogType
import shutil
from mtm.util.Assert import *
import mtm.log.ColorConsole as ColorConsole
class AnsiiCodes:
BLACK = "\033[1;30m"
DARKBLACK = "\033[0;30m"
RED = "\033[1;31m"
D... | mit | -1,695,768,849,465,963,800 | 30.430769 | 103 | 0.638767 | false | 3.584211 | false | false | false |
51reboot/actual_09_homework | 10/jinderui/cmdb/user/dbutils.py | 1 | 1788 | # encoding: utf-8
import os,sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
import gconf
import MySQLdb
# encoding: utf-8
import os,sys
reload(sys)
sys.setdefaultencoding( "utf-8" )
import gconf
import MySQLdb
class MySQLConnection(object):
"""docstring for MySQLConnection"""
def __init__(self, host,port,user,pas... | mit | 2,713,146,756,037,389,300 | 21.64557 | 101 | 0.645973 | false | 2.798122 | false | false | false |
Itxaka/st2 | st2api/st2api/controllers/v1/executionviews.py | 1 | 3355 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 | -4,095,253,901,279,048,700 | 38.011628 | 98 | 0.66617 | false | 4.374185 | false | false | false |
JDRomano2/VenomKB | venomkb/archive/scripts/add_go_data.py | 1 | 1105 | import json
from tqdm import tqdm
from venomkb_builder import VenomKB
VKB = VenomKB()
VKB.load_database()
go_annotations_out = {}
for x in tqdm(VKB.proteins):
try:
toxprot = VKB.get_record_from_toxprot(x.venomkb_id, 'dbReference', json=False)
except:
continue
go_annotations = [y for y in... | gpl-2.0 | 178,348,791,076,406,720 | 27.333333 | 86 | 0.586425 | false | 3.184438 | false | false | false |
minhnd/youtube-subtitle-downloader | youtubesub.py | 1 | 5521 | # -*- coding: utf-8 -*-
"""
Youtube Subtitle Downloader downloads subtitles from Youtube videos
(if those are present) and convert them to SRT format.
Usage: youtubesub.py [-h] [-l] [--language LANGUAGE] [--filename FILENAME]
[--filetype {srt,xml}]
url
... | bsd-2-clause | 5,863,344,055,062,149,000 | 35.806667 | 124 | 0.58522 | false | 3.831367 | false | false | false |
thomasorb/orb | orb/utils/io.py | 1 | 33933 | #!/usr/bin/python
# *-* coding: utf-8 *-*
# Author: Thomas Martin <thomas.martin.1@ulaval.ca>
# File: io.py
## Copyright (c) 2010-2020 Thomas Martin <thomas.martin.1@ulaval.ca>
##
## This file is part of ORB
##
## ORB is free software: you can redistribute it and/or modify it
## under the terms of the GNU General Pub... | gpl-3.0 | 8,377,938,406,832,901,000 | 33.946447 | 185 | 0.581646 | false | 3.718685 | false | false | false |
quarckster/cfme_tests | cfme/test_framework/appliance_police.py | 1 | 2826 | import attr
import pytest
import requests
from cfme.utils import ports
from cfme.utils.net import net_check
from cfme.utils.wait import TimedOutError
from cfme.utils.conf import rdb
from fixtures.pytest_store import store
from cfme.fixtures.rdb import Rdb
@attr.s
class AppliancePoliceException(Exception):
me... | gpl-2.0 | -7,508,210,430,631,497,000 | 33.888889 | 97 | 0.617127 | false | 4.042918 | false | false | false |
ErasRasmuson/LA | LogAna/Taxi_LongRides_old.py | 1 | 2578 | # -*- coding: cp1252 -*-
"""
###############################################################################
HEADER: Taxi_LongRides.py
AUTHOR: Esa Heikkinen
DATE: 26.06.2018
DOCUMENT: -
VERSION: "$Id$"
REFERENCES: -
PURPOSE:
CHANGES: "$Log$"
#######################################################... | gpl-3.0 | 2,315,905,248,688,705,500 | 27.32967 | 125 | 0.556633 | false | 2.710831 | false | false | false |
FEniCS/ufl | test/test_apply_function_pullbacks.py | 1 | 12156 | #!/usr/bin/env py.test
# -*- coding: utf-8 -*-
from pytest import raises
from ufl import *
from ufl.algorithms.apply_function_pullbacks import apply_function_pullbacks, apply_single_function_pullbacks
from ufl.algorithms.renumbering import renumber_indices
from ufl.classes import Jacobian, JacobianInverse, JacobianDet... | lgpl-3.0 | 2,708,946,957,977,316,000 | 29.619647 | 109 | 0.534304 | false | 2.912314 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.