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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sam-m888/addons-source | GenealogyTree/gt_descendant.py | 1 | 6670 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2017-2018 Nick Hall
#
# 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) a... | gpl-2.0 | -2,078,282,910,186,262,800 | 38.702381 | 79 | 0.514843 | false | 4.353786 | false | false | false |
bdfoster/blumate | blumate/bootstrap.py | 1 | 15172 | """Provides methods to bootstrap a BluMate instance."""
import logging
import logging.handlers
import os
import shutil
import sys
from collections import defaultdict
from threading import RLock
import voluptuous as vol
import blumate.components as core_components
import blumate.components.group as group
import bluma... | mit | -3,504,478,529,107,360,000 | 32.345055 | 79 | 0.614026 | false | 4.135187 | true | false | false |
cheza/ActivityDynamics | data_preparation/s05_extract_binned_posts_replies.py | 1 | 4795 | from __future__ import division
from util import *
def bin_date(timestamp):
# return timestamp.replace(microsecond=0, second=0, minute=0, hour=0, day=1)
return timestamp.replace(microsecond=0, second=0, minute=0, hour=0)
def extract_binned_posts_replies(log_filename, net_filename=None, core=0, sample_size=-... | gpl-2.0 | 4,129,946,274,288,799,000 | 44.666667 | 169 | 0.605839 | false | 3.427448 | false | false | false |
andrelucas/hsync | tests/test_func02.py | 1 | 34090 | # Functional tests for hsync
#
# Call out to the script, no running main() directly.
# Copyright (c) 2015, Andre Lucas
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of s... | bsd-3-clause | 7,950,434,449,468,971,000 | 39.343195 | 81 | 0.553828 | false | 3.613143 | true | false | false |
looker/sentry | src/sentry/integrations/bitbucket/integration.py | 1 | 3354 | from __future__ import absolute_import
from sentry.integrations import Integration, IntegrationFeatures, IntegrationProvider, IntegrationMetadata
from sentry.pipeline import NestedPipelineView
from sentry.identity.pipeline import IdentityProviderPipeline
from django.utils.translation import ugettext_lazy as _
from sen... | bsd-3-clause | -157,616,090,822,679,970 | 33.22449 | 132 | 0.618068 | false | 4.532432 | false | false | false |
gramps-project/addons-source | LifeLineChartView/lifelinechartview.gpr.py | 1 | 12897 | # encoding:utf-8
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2020 Christian Schulze
#
# 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
... | gpl-2.0 | 4,616,949,033,604,824,000 | 35.329577 | 79 | 0.565713 | false | 4.415269 | false | false | false |
spicerack/sage | examples/whodat/whodat.py | 1 | 1414 | import sage
from sage.signals.gmcp import room as room_signal
from sage import player, aliases
# Create an alias group for whodat
who_aliases = aliases.create_group('whodat', app='whodat')
# store in the app what our last room id was so we know when we change rooms
last_room = None
def write_players():
if len(pl... | gpl-3.0 | -8,954,701,899,569,879,000 | 31.883721 | 100 | 0.687412 | false | 3.517413 | false | false | false |
rlindner81/pyload | module/plugins/captcha/SolveMedia.py | 1 | 3515 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.CaptchaService import CaptchaService
from module.plugins.internal.Plugin import Fail
class SolveMedia(CaptchaService):
__name__ = "SolveMedia"
__type__ = "captcha"
__version__ = "0.19"
__status__ = "testing"
__description__ = """Sol... | gpl-3.0 | -1,989,606,126,287,156,500 | 34.505051 | 121 | 0.455761 | false | 4.606815 | false | false | false |
hgqislub/hybird-orchard | code/cloudmanager/install/vcloud/vcloud_install.py | 1 | 34860 | import pdb
import sys
import os
import time
import socket
from heat.openstack.common import log as logging
from heat.engine.resources.cloudmanager.exception import *
from heat.engine.resources.cloudmanager.environmentinfo import *
import vcloud_proxy_install as proxy_installer
import vcloud_cloudinfo as data_handler... | apache-2.0 | -3,174,486,292,162,964,500 | 41.254545 | 159 | 0.550316 | false | 3.7093 | false | false | false |
pragalakis/100-python-projects | text/text-editor.py | 1 | 1046 | import tkinter as tk
import tkinter.filedialog as fdialog
def OpenFile():
global filename
text.delete(0.0, tk.END)
inputFile = fdialog.askopenfile()
filename = inputFile.name
with open(filename, 'r+') as f:
data = f.read()
text.insert(0.0,data)
def SaveFile():
global filename
... | mit | -7,093,923,416,778,187,000 | 23.904762 | 55 | 0.679732 | false | 3.085546 | false | false | false |
zepheira/freemix | freemix/views.py | 1 | 2958 | from django.utils import simplejson as json
from django.conf import settings
from django.contrib.auth.models import User
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404
from django.template.loader import render_to_string
from django.views.generic.list import ListView
from fr... | apache-2.0 | -3,786,644,813,686,053,400 | 33.406977 | 115 | 0.598039 | false | 4.225714 | false | false | false |
Locu/chronology | kronos/kronos/storage/sqlite/client.py | 1 | 3912 | import bisect
import json
import sqlite3
from collections import defaultdict
from timeuuid import TimeUUID
from kronos.conf.constants import ID_FIELD
from kronos.conf.constants import MAX_LIMIT
from kronos.conf.constants import ResultOrder
from kronos.core import marshal
from kronos.storage.base import BaseStorage
fr... | mit | 526,131,567,586,967,360 | 30.296 | 78 | 0.648262 | false | 3.669794 | false | false | false |
Opentopic/ot-api | ot_api/testcollection/models.py | 1 | 1175 | """
Test collection used only for testing purpose
"""
from booby import fields
from ot_api.base import OpentopicModel
from .parsers import test_parser
def _generate_test_object(i):
"""
:return: dist with test object
"""
return {
'id': i,
'name': 'test_name{0}'.format(str(i))
}
d... | gpl-2.0 | -2,792,725,029,806,871,600 | 18.583333 | 67 | 0.609362 | false | 3.766026 | true | false | false |
kvaps/vdsm | lib/vdsm/udevadm.py | 1 | 2035 | #
# Copyright 2015 Red Hat, Inc.
#
# 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 version.
#
# This program is distributed in th... | gpl-2.0 | 6,018,024,358,653,615,000 | 28.492754 | 78 | 0.659951 | false | 3.768519 | false | false | false |
google-research/google-research | sgk/sparse/connectors.py | 1 | 2384 | # 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 | 2,216,588,004,510,355,200 | 29.961039 | 74 | 0.690017 | false | 3.772152 | false | false | false |
ldamewood/renormalization | mcmc.py | 1 | 3564 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import numpy
from util import sigmoid
from abc import ABCMeta, abstractmethod
from graph import Bipartite
from collections import deque
class MCMethod(object):
"""Interface for Monte Carlo-like methods."""
__metaclass__ = ABC... | mit | -583,967,130,040,178,300 | 35.377551 | 102 | 0.621493 | false | 3.895082 | false | false | false |
CelineBoudier/rapid-router | game/migrations/0043_auto_20150615_1155.py | 1 | 2398 | # -*- coding: utf-8 -*-
# Code for Life
#
# Copyright (C) 2016, Ocado Innovation Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your o... | agpl-3.0 | 6,456,626,895,219,833,000 | 39.338983 | 92 | 0.728992 | false | 4.02027 | false | false | false |
googleapis/googleapis-gen | google/cloud/workflows/executions/v1beta/workflows-executions-v1beta-py/google/cloud/workflows/executions_v1beta/services/executions/pagers.py | 1 | 5899 | # -*- 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 | 3,681,031,910,051,527,700 | 41.135714 | 96 | 0.66435 | false | 4.475721 | false | false | false |
codeOfRobin/NLPStuff | complexity_metric.py | 1 | 1766 |
# Set up spaCy
from scipy.stats import norm
from spacy.en import English
import sys
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from readability.readability import Readability
# parser = English()
pipeline = English()
length_normalized_complexity = []
FKGradeLevel = []
with open('./WSJ/wsj.flat')... | bsd-2-clause | 6,674,207,427,972,589,000 | 38.244444 | 112 | 0.717441 | false | 3.071304 | false | false | false |
comodojo/rpcclient | docs/source/conf.py | 1 | 5364 | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | mit | -7,654,065,783,580,939,000 | 28.96648 | 87 | 0.655108 | false | 3.909621 | true | false | false |
jdrunner/smartee | firmware/scripts/reflash.py | 1 | 1526 | #!/usr/bin/python
"""
Reflash the wemo image using sam-ba bootloader
**requires 99-atmel_samba.rules in udev**
**requires samba_64**
John Donnal
"""
import serial
import subprocess
import time
import os
BOARD="at91sam4s4-wemo"
WEMO_DEVICE="/dev/serial/by-id/usb-MIT_WEMO_Control_Board-if00"
SAMBA_DEVICE="/dev/serial/... | gpl-2.0 | -3,885,342,695,907,465,700 | 24.864407 | 66 | 0.688073 | false | 2.691358 | false | false | false |
doerrie/anyio3 | anyio3/GPIO.py | 1 | 1774 | # Automatic GPIO library
#
# This module attempts to be as automatic as possible.
# It attempts to load RPi.GPIO to see if we are using a RaspberryPi.
# If that fails, it attempts to locate an arduino using the pymata3 library.
# TODO: fall back to a simulator instead of failing
import sys
# Prevents nesting... | mit | -8,176,560,052,973,527,000 | 25.71875 | 92 | 0.621195 | false | 3.890351 | false | false | false |
dstufft/storages | storages/utils.py | 1 | 4895 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
import os
import re
import sys
import urllib
__all__ = ("abspath", "filepath_to_uri", "get_valid_filename", "import_module", "safe_join")
def get_valid_filename(s):
"""
Returns the given string c... | bsd-2-clause | -811,453,805,945,027,700 | 32.758621 | 92 | 0.654954 | false | 4.123842 | false | false | false |
klaricch/Transposons2 | scripts/compare_kin_c.py | 1 | 1682 | #!/usr/bin/env python
import re
import sys
from collections import defaultdict
old="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results_feb/final_results/data_for_figures/T_kin_C_matrix_full.txt"
new="/lscr2/andersenlab/kml436/git_repos2/Transposons2/results/final_results/data_for_figures/T_kin_C_matrix_full.tx... | mit | -3,317,433,012,189,536,000 | 28 | 122 | 0.665279 | false | 2.491852 | false | false | false |
stormi/tsunami | src/secondaires/navigation/equipage/ordres/aborder.py | 1 | 3448 | # -*-coding:Utf-8 -*
# Copyright (c) 2015 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# lis... | bsd-3-clause | 4,399,515,991,131,739,600 | 37.266667 | 79 | 0.672184 | false | 3.687366 | false | false | false |
dcrosta/mongo-disco | app/scheme_mongodb_clean.py | 1 | 1743 | import pymongo
import bson
from bson import json_util
import warnings
from cStringIO import StringIO
from pymongo import Connection, uri_parser, ReadPreference
import bson.son as son
import json
import logging
'''
File: scheme_mongo_clean.py
Description:
'''
def open(uri, task=None):
#parses a mongodb uri and ret... | apache-2.0 | 3,129,990,308,481,176,000 | 27.57377 | 87 | 0.664372 | false | 4.081967 | false | false | false |
lucperkins/heron | heron/instance/src/python/utils/system_constants.py | 1 | 8819 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2016 Twitter. 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... | apache-2.0 | -6,027,564,421,744,129,000 | 56.640523 | 100 | 0.71516 | false | 3.727388 | false | false | false |
openstack/swift | test/unit/container/test_server.py | 1 | 248654 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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... | apache-2.0 | 339,010,256,421,222,600 | 45.655845 | 79 | 0.54482 | false | 3.850236 | true | false | false |
NVDARemote/NVDARemote | buildVars.py | 1 | 2276 | # -*- coding: UTF-8 -*-
# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.
# Full getext (please don't change)
_ = lambda x : x
# Add-on information variables
addon_info = {
# for previously unpublished addons, please follow the community guidelines at:
... | gpl-2.0 | -2,140,687,186,519,391,200 | 40.148148 | 159 | 0.717047 | false | 3.397015 | false | false | false |
Earlz/renamedcoin | contrib/devtools/fix-copyright-headers.py | 1 | 1482 | #!/usr/bin/env python
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
copyright headers, and it will fix the headers on that file using
a perl regex one liner.
For example: if it finds something like this and we're in 2014
// Copyr... | mit | 8,734,354,479,394,246,000 | 26.962264 | 81 | 0.693657 | false | 3.462617 | false | false | false |
srynot4sale/jarvis | functions/contact.py | 1 | 9791 | import data.model
import function
import kernel.action
class controller(function.function):
def list(self):
datasource = self.get_data_source()
sql = """
SELECT
*
FROM
function_contact_entities
WHERE
deleted IS NUL... | gpl-3.0 | 5,968,765,927,883,515,000 | 25.109333 | 113 | 0.490042 | false | 4.216624 | false | false | false |
gautamk/confidant | confidant/backends/dynamodb.py | 1 | 3932 | import logging
import uuid
from decimal import Decimal
import six
from boto.dynamodb2.fields import HashKey, RangeKey
from boto.dynamodb2.table import Table
from boto.exception import JSONResponseError
from confidant.backends import BaseBackend, cache_manager, BackendNotInitializedError
__author__ = 'gautam'
def _... | mit | -622,802,862,452,613,100 | 32.606838 | 115 | 0.559257 | false | 4.205348 | false | false | false |
google-research/google-research | f_net/layers_test.py | 1 | 12542 | # 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,084,852,235,498,264,000 | 34.732194 | 80 | 0.62789 | false | 3.388814 | true | false | false |
sio2project/sioworkers | twisted/plugins/sioworkers_plugin.py | 1 | 4669 | from __future__ import absolute_import
from __future__ import print_function
import importlib
import json
import logging.config
import platform
from zope.interface.declarations import implementer
import six.moves.urllib.parse
from twisted.python import usage
from twisted.plugin import IPlugin
from twisted.application ... | gpl-3.0 | -2,797,915,842,364,677,000 | 31.2 | 88 | 0.606982 | false | 4.229167 | true | false | false |
quantboxru/sbe | gen/transform.py | 1 | 11493 | import copy
import os
def jinja2_ord(ch):
return ord(ch[0])
def enum_type(t):
tmap = {"char": "byte",
"uint8": "byte",
"int16": "short",
"uint16": "ushort",
"int32": "int",
"uint32": "uint"
}
return tmap[t["encoding_type"]]
def cs... | apache-2.0 | -6,373,590,269,946,197,000 | 37.827703 | 136 | 0.48299 | false | 3.578144 | false | false | false |
nuagenetworks/vspk-python | vspk/v5_0/nuinfrastructureevdfprofile.py | 1 | 15604 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyrigh... | bsd-3-clause | 2,416,818,897,062,586,400 | 30.461694 | 233 | 0.58658 | false | 4.521588 | false | false | false |
brennentsmith/teletraan | deploy-board/deploy_board/webapp/templatetags/utils.py | 1 | 29544 | # Copyright 2016 Pinterest, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | apache-2.0 | -733,915,724,524,116,400 | 27.244742 | 109 | 0.658137 | false | 3.587614 | false | false | false |
neilhan/tensorflow | tensorflow/python/ops/nn.py | 1 | 58620 | # Copyright 2015 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 | 588,216,277,794,850,300 | 39.878661 | 90 | 0.660235 | false | 3.685402 | false | false | false |
basus/metaphor | metaphor.py | 1 | 2951 | # This file is part of Metaphor.
# Metaphor 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.
# Metaphor is distributed in the hope tha... | gpl-3.0 | -3,839,069,447,468,395,500 | 34.987805 | 86 | 0.654354 | false | 4.197724 | false | false | false |
linuxmuster-docs/howto_backupmondo | source/conf.py | 1 | 10663 | # -*- coding: utf-8 -*-
#
# Installationsleitfaden documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 7 15:29:20 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenera... | gpl-2.0 | -4,525,207,027,992,002,600 | 30.538462 | 84 | 0.709944 | false | 3.641954 | true | false | false |
bpuderer/mongodb_u | m101p/fin/blogPostDAO.py | 1 | 5582 | __author__ = 'aje'
#
# Copyright (c) 2008 - 2013 10gen, Inc. <http://10gen.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 r... | mit | -6,871,898,857,139,294,000 | 34.106918 | 116 | 0.562522 | false | 4.178144 | false | false | false |
SeptemberHX/screenshot | pyqt_screenshot/textinput.py | 1 | 1590 | from PyQt5.QtCore import pyqtSignal, Qt
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QTextEdit, QHBoxLayout, QPushButton
class TextInput(QWidget):
# used when input text
inputChanged = pyqtSignal()
okPressed = pyqtSignal()
cancelPressed = pyqtSignal()
def __init__(self, parent=None):
... | gpl-3.0 | 7,804,852,231,940,007,000 | 28.444444 | 85 | 0.677358 | false | 3.906634 | false | false | false |
Mapotempo/mapotempo-qgis-plugin | SwaggerMapo/models/v01_zoning.py | 1 | 1802 | #!/usr/bin/env python
# coding: utf-8
"""
Copyright 2015 SmartBear Software
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
Unle... | gpl-2.0 | -6,082,617,608,313,422,000 | 27.603175 | 100 | 0.574917 | false | 4.321343 | false | false | false |
dc3-plaso/plaso | plaso/lib/binary.py | 1 | 7367 | # -*- coding: utf-8 -*-
"""This file contains a helper library to read binary files."""
import binascii
import logging
import os
from plaso.lib import py2to3
def ByteArrayCopyToString(byte_array, codepage=u'utf-8'):
"""Copies a UTF-8 encoded byte array into a Unicode string.
Args:
byte_array: A byte array ... | apache-2.0 | -4,045,133,644,132,369,000 | 29.824268 | 80 | 0.684132 | false | 3.591906 | false | false | false |
volund/mango | samples_mangopy/mangopy/profusion_of_spheres.py | 1 | 1198 | import Geometry
from random import random
from demo import FpsDisplay
class ColorfulSphere(Geometry.Sphere):
def __init__(self):
Geometry.Sphere.__init__(self)
self.boundary = 5
def step(self):
if self.position[0] > self.boundary or self.position[0] < -self.boundary:
... | mit | 4,155,690,861,924,142,600 | 30.378378 | 156 | 0.594324 | false | 3.327778 | false | false | false |
tompecina/legal | legal/kos/views.py | 1 | 4776 | # -*- coding: utf-8 -*-
#
# kos/views.py
#
# Copyright (C) 2011-19 Tomáš Pecina <tomas@pecina.cz>
#
# This file is part of legal.pecina.cz, a web-based toolbox for lawyers.
#
# This application is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published ... | gpl-3.0 | -3,473,250,765,293,077,000 | 37.508197 | 116 | 0.548318 | false | 3.396963 | false | false | false |
openstack/neutron-lib | neutron_lib/api/definitions/firewall_v2.py | 1 | 10326 | # 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 | -4,656,336,125,781,740,000 | 47.252336 | 79 | 0.498547 | false | 4.230234 | false | false | false |
zrzka/blackmamba | blackmamba/script/jump_to_definition.py | 1 | 2922 | #!python3
from blackmamba.uikit.picker import PickerView, PickerItem, PickerDataSource
import editor
import console
import os
import jedi
from blackmamba.config import get_config_value
import blackmamba.log as log
import blackmamba.ide.source as source
import blackmamba.ide.tab as tab
class LocationPickerItem(Picker... | mit | 7,097,896,532,802,217,000 | 23.504202 | 98 | 0.597051 | false | 3.989056 | false | false | false |
yashpatel5400/neuropath | predictor/settings.py | 1 | 1479 | """
__name__ = settings.py
__author__ = Yash Patel
__description__ = Settings file for the accuracy predictor plot
"""
# NOTE: All the below paths are relative to the starting directory of
# gem5, since this is the default behavior for gem5 execution
# --------------------------- Sim Params -------------------------... | mit | 5,550,805,626,108,389,000 | 31.152174 | 73 | 0.542258 | false | 3.772959 | false | false | false |
yudi-matsuzake/gaal | gaal/matrizes.py | 1 | 1963 | # -*- coding: utf-8 -*-
from matriz import *
import random
#----------Auxiliares----------
def num(x):
"""Converte x para um número. Tenta pra int, se não der, float"""
try:
return int(x)
except ValueError:
return float(x)
#------------------------------
def identidade(ordem=1):
"""Cria e retorna uma matriz ... | gpl-2.0 | -2,000,609,527,368,507,000 | 20.373626 | 112 | 0.61491 | false | 2.261628 | false | false | false |
pelson/conda-build | conda_build/utils.py | 1 | 69441 | from __future__ import absolute_import, division, print_function
from collections import OrderedDict, defaultdict
import contextlib
import fnmatch
import hashlib
import json
from locale import getpreferredencoding
import libarchive
import logging
import logging.config
import mmap
import operator
import os
from os.path... | bsd-3-clause | 7,331,966,528,220,337,000 | 35.394654 | 141 | 0.570729 | false | 3.814182 | true | false | false |
Vagab0nd/SiCKRAGE | sickchill/oldbeard/dailysearcher.py | 1 | 3608 | import datetime
import threading
import sickchill.oldbeard.search_queue
from sickchill import logger, settings
from sickchill.helper.exceptions import MultipleShowObjectsException
from sickchill.show.Show import Show
from . import common, db, network_timezones
class DailySearcher(object): # pylint:disable=too-few-... | gpl-3.0 | -7,890,077,242,753,074,000 | 39.088889 | 189 | 0.60255 | false | 4.214953 | false | false | false |
ghoulmann/Jeopardy | jeopardy_quiz/jeopardy_quiz.py | 1 | 15883 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# jeopardy_quiz.py
# == Preface ==
# === Copyright ===
# Copyright 2017 Chelsea School Students and Rik Goldman <rgoldman@chelseaschool.edu>
# === License ===
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | 8,744,385,005,590,880,000 | 34.06181 | 361 | 0.648177 | false | 3.6963 | false | false | false |
Comunitea/CMNT_00098_2017_JIM_addons | sga_file/models/sga_product.py | 1 | 14465 | # -*- coding: utf-8 -*-
# © 2016 Comunitea Servicios Tecnologicos (<http://www.comunitea.com>)
# Kiko Sanchez (<kiko@comunitea.com>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models, tools, api, _
from odoo.exceptions import AccessError, UserError, ValidationError
from ... | agpl-3.0 | 769,185,610,678,970,000 | 37.75067 | 172 | 0.558738 | false | 3.568889 | false | false | false |
red-hood/calendarserver | txdav/xml/rfc5842.py | 1 | 3766 | ##
# Copyright (c) 2005-2015 Apple Inc. All rights reserved.
#
# 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, copy, mod... | apache-2.0 | -1,324,560,070,080,771,000 | 22.391304 | 96 | 0.675252 | false | 3.51306 | false | false | false |
Si-elegans/Web-based_GUI_Tools | spirit/templatetags/tags/comment.py | 1 | 1031 | #-*- coding: utf-8 -*-
from django.utils.translation import ugettext as _
from . import register
from spirit.forms.comment import CommentForm
from spirit.models.comment import Comment, MOVED, CLOSED, UNCLOSED, PINNED, UNPINNED
@register.assignment_tag()
def get_comment_list(topic):
return Comment.objects.for_to... | apache-2.0 | 3,607,046,331,011,840,000 | 29.352941 | 84 | 0.677983 | false | 3.555172 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v7/enums/types/campaign_draft_status.py | 1 | 1232 | # -*- 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 | 4,738,637,214,769,140,000 | 28.333333 | 74 | 0.684253 | false | 3.936102 | false | false | false |
geobricks/geobricks_data_scripts | geobricks_data_scripts/demo/ghg/data/process/ghg_maghg/ghg_rename_files_and_processing.py | 1 | 3106 | import os
import glob
import ntpath
import shutil
from geobricks_processing.core.processing_core import process_data
process_obj_emission_factor = [
{
# "output_path": output_path + "/gdal_translate",
# "output_file_name": "MOD13A2_3857.tif",
"process": [
{
"gd... | gpl-2.0 | 2,779,670,099,599,640,600 | 25.322034 | 86 | 0.47038 | false | 3.582468 | false | false | false |
kubeflow/fairing | tests/unit/preprocessors/test_converted_notebook_preprocessor.py | 1 | 4143 | import tarfile
import os
import posixpath
from pathlib import Path
from kubeflow.fairing.preprocessors.converted_notebook import ConvertNotebookPreprocessor
from kubeflow.fairing.preprocessors.converted_notebook import ConvertNotebookPreprocessorWithFire
from kubeflow.fairing.preprocessors.converted_notebook import Fi... | apache-2.0 | 2,819,754,830,286,382,000 | 44.527473 | 97 | 0.74125 | false | 3.915879 | true | false | false |
sam-m888/gramps | gramps/gui/editors/filtereditor.py | 1 | 50543 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2011 Tim G L Lyons
#
# 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; eith... | gpl-2.0 | -268,253,151,161,328,580 | 38.150271 | 90 | 0.525829 | false | 4.113535 | false | false | false |
SunPower/Carousel | simkit/tests/test_calcs.py | 1 | 4793 | """
test calculations
"""
from nose.tools import ok_, eq_
from simkit.core.calculations import Calc, CalcParameter
from simkit.core.calculators import Calculator
from simkit.tests import PROJ_PATH, sandia_performance_model
import os
import uncertainties
from pvlib.solarposition import get_solarposition as solpos
impor... | bsd-3-clause | -4,708,147,432,551,134,000 | 37.653226 | 79 | 0.588567 | false | 3.396882 | true | false | false |
rCorvidae/OrionPI | src/tests/Devices/Containers/TestContainersDeviceAndManager.py | 1 | 2509 | from tests.Dispatcher.DataCreator import CreateDeviceData
import json
import unittest
from bin.Devices.Containers.ContainersDevice import ContainersDevice
from bin.Devices.Containers.ContainersManager import EventlessContainersManager, NullContainersManager, \
ContainersManager
from bin.Devices.Containers.Container... | mit | 7,316,189,326,137,602,000 | 47.25 | 114 | 0.768832 | false | 4.274276 | true | false | false |
mozaik-association/mozaik | odoo_addons/mozaik_thesaurus/models/abstract_term_finder.py | 1 | 1905 | # -*- coding: utf-8 -*-
##############################################################################
#
# This file is part of mozaik_thesaurus, an Odoo module.
#
# Copyright (c) 2015 ACSONE SA/NV (<http://acsone.eu>)
#
# mozaik_thesaurus is free software:
# you can redistribute it and/or
# modify ... | agpl-3.0 | -3,060,613,305,941,491,000 | 38.6875 | 78 | 0.572178 | false | 3.985356 | false | false | false |
lsbardel/flow | flow/db/trade/aggregate/position.py | 1 | 10645 | from jflow.db.trade.models import Position
from jflow.core.finins import finins
from logger import log
from basejson import extract, listpop, positionBase
from marketrisk import MarketRiskPosition, MarketRiskPortfolio
POSITION_STATUS = 'all'
class MktPositionInterface(object):
'''
Interface fo... | bsd-3-clause | 7,140,227,440,292,197,000 | 29.587537 | 110 | 0.513199 | false | 4.053694 | false | false | false |
eustislab/horton | horton/orbital_entanglement/orbital_entanglement.py | 1 | 12871 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2015 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | gpl-3.0 | 1,987,643,376,184,136,400 | 28.054176 | 138 | 0.566079 | false | 3.68269 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/types/expanded_landing_page_view_service.py | 1 | 1338 | # -*- 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 | 8,911,319,013,502,749,000 | 29.409091 | 156 | 0.71151 | false | 3.923754 | false | false | false |
mousebrains/kayak | scripts/old2new_data.py | 1 | 2424 | #! /usr/bin/env python3
#
# Copy from old style database to new style
#
import mysql.connector
from mysql.connector.errors import Error
import MyLogger
import MyDB
import argparse
def loadDatatypes(tgt) -> dict:
a = {}
tgt.execute('SELECT name,id FROM datatype;')
for row in tgt: a[row[0]] = row[1];
re... | gpl-3.0 | 5,133,035,349,003,250,000 | 27.517647 | 95 | 0.614274 | false | 3.302452 | false | false | false |
MaxVanDeursen/tribler | Tribler/Core/Modules/tracker_manager.py | 1 | 6413 | import logging
import time
from Tribler.dispersy.util import blocking_call_on_reactor_thread, call_on_reactor_thread
from Tribler.Core.Utilities.tracker_utils import get_uniformed_tracker_url
MAX_TRACKER_FAILURES = 5
TRACKER_RETRY_INTERVAL = 60 # A "dead" tracker will be retired every 60 seconds
class TrackerMa... | lgpl-3.0 | -8,299,324,730,229,152,000 | 40.374194 | 117 | 0.603774 | false | 3.891383 | false | false | false |
kescobo/gender-comp-bio | src/arxiv_acquisition.py | 1 | 1473 | # Code modified from Tim Head - http://betatim.github.io/posts/analysing-the-arxiv/
import time
import urllib2
import datetime
import xml.etree.ElementTree as ET
OAI = "{http://www.openarchives.org/OAI/2.0/}"
ARXIV = "{http://arxiv.org/OAI/arXiv/}"
def harvest(arxiv="q-bio", out_file="arxiv-bio-data.xml"):
base_... | gpl-3.0 | -5,247,011,903,958,370,000 | 27.326923 | 83 | 0.543788 | false | 3.347727 | false | false | false |
sunlightlabs/sitegeist | sitegeist/data/schools/models.py | 1 | 2411 | from django.contrib.gis.db import models
LOCALES = (
('11', 'City, Large'),
('12', 'City, Mid-size'),
('13', 'City, Small'),
('21', 'Suburb, Large'),
('22', 'Suburb, Mid-size'),
('23', 'Suburb, Small'),
('31', 'Town, Fringe'),
('32', 'Town, Distant'),
('33', 'Town, Remote'),
('4... | bsd-3-clause | -322,837,738,237,034,500 | 26.712644 | 80 | 0.569058 | false | 3.075255 | false | false | false |
kapilt/cloud-custodian | tests/test_aws.py | 1 | 10178 | # Copyright 2017-2018 Capital One Services, 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 ... | apache-2.0 | -4,321,775,817,550,508,500 | 39.549801 | 127 | 0.623305 | false | 3.529126 | true | false | false |
amolkahat/pandas | pandas/tests/test_multilevel.py | 1 | 108622 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0612,E1101,W0141
from warnings import catch_warnings, simplefilter
import datetime
import itertools
import pytest
import pytz
from numpy.random import randn
import numpy as np
from pandas.core.index import Index, MultiIndex
from pandas import (Panel, DataFrame, Series, n... | bsd-3-clause | -1,167,614,576,860,866,300 | 37.086255 | 79 | 0.513358 | false | 3.416968 | true | false | false |
KAMI911/loec | examples/IDPhoto/idphoto/idphoto.py | 2 | 4508 | try:
# newer Pythons do not support relative imports, OOo Python does not seem to support absolute import
import idphoto.extensioncore # non-"from" import gives more relevant error message (see uno.py)
from idphoto.extensioncore import *
except ImportError:
import extensioncore # non-"from" import gives more rel... | gpl-3.0 | 6,817,947,275,192,399,000 | 36.256198 | 136 | 0.719388 | false | 3.108966 | false | false | false |
israelg99/eva | eva/util/mutil.py | 1 | 1987 | import numpy as np
from tqdm import tqdm
def generate(model, latent=None, batch=1, deterministic=False):
get_color = lambda model, pixels, cols, row, col, channel, latent=None: model.predict_on_batch(pixels if latent is None else [pixels, latent])[channel][:, row*cols+col]
normalize = lambda pixel: pixel/255
... | apache-2.0 | 2,211,545,280,533,773,300 | 35.145455 | 172 | 0.613991 | false | 3.385009 | false | false | false |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/edx_oauth2_provider/tests/test_credentials.py | 1 | 2688 | """ Test email as username authentication """
import json
from django.core.urlresolvers import reverse
import ddt
from provider.constants import CONFIDENTIAL, PUBLIC
from .base import OAuth2TestCase
from .factories import ClientFactory
USERNAME = 'some_username'
EMAIL = 'test@example.com'
PASSWORD = 'some_password... | agpl-3.0 | 4,801,156,860,747,231,000 | 24.846154 | 79 | 0.58631 | false | 3.901306 | true | false | false |
jdilallo/jdilallo-test | examples/dfp/v201311/audience_segment_service/get_first_party_audience_segments.py | 1 | 2167 | #!/usr/bin/python
#
# Copyright 2014 Google 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
#
# Unless required b... | apache-2.0 | -5,469,181,343,047,801,000 | 28.283784 | 74 | 0.682972 | false | 3.755633 | false | false | false |
nojhan/weboob-devel | modules/radiofrance/pages.py | 1 | 11028 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Bezleputh
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | agpl-3.0 | 2,183,348,173,696,557,800 | 40.145522 | 113 | 0.532511 | false | 3.910284 | false | false | false |
VCG/gp | patchgen.py | 1 | 4314 | import gp
import glob
import mahotas as mh
import numpy as np
import os
import time
def read_section(path, z, verbose=True, withNP=True):
'''
'''
image = sorted(glob.glob(os.path.join(path, 'image', '*_'+str(z).zfill(9)+'_image.png')))
mask = sorted(glob.glob(os.path.join(path, 'mask', 'z'+str(z).zfill(8)+'.pn... | mit | -918,679,671,983,775,100 | 28.547945 | 147 | 0.58994 | false | 2.987535 | false | false | false |
Rhoana/rh_aligner | old/match_layers_by_max_pmcc.py | 1 | 4902 | import sys
import os
import glob
import argparse
from subprocess import call
from bounding_box import BoundingBox
import json
import itertools
import utils
# common functions
def match_layers_by_max_pmcc(jar_file, tiles_file1, tiles_file2, models_file, image_width, image_height,
fixed_layers, out_fname, meshe... | mit | 8,168,228,408,464,496,000 | 46.134615 | 171 | 0.611791 | false | 3.710825 | false | false | false |
odtvince/APITaxi | APITaxi/backoffice/vehicle.py | 1 | 2186 | # -*- coding: utf-8 -*-
from flask.ext.security import login_required, current_user, roles_accepted
from flask import request, Blueprint
from ..models import vehicle as vehicle_models, taxis as taxis_models
from ..extensions import db
from ..api import api
from . import ns_administrative
from flask.ext.restplus import ... | agpl-3.0 | -4,835,191,982,823,931,000 | 38.745455 | 78 | 0.649131 | false | 3.705085 | false | false | false |
ghowland/gomh | _backups/gomh_018.py | 1 | 20026 | #!/usr/bin/env python
import pygame
import sys
import math
import random
SCALE = 0.5
sprite_size = [int(85*SCALE), int(112*SCALE)]
# Initialize the screen
pygame.init()
SCREEN_SIZE = (640, 480)
screen = pygame.display.set_mode(SCREEN_SIZE)
pygame.display.set_caption('Get Off My Head')
#pygame.mouse.set_visible(0)
... | mit | 4,986,678,643,915,330,000 | 29.952087 | 171 | 0.641516 | false | 3.289422 | true | false | false |
modoboa/modoboa-dmarc | modoboa_dmarc/migrations/0001_initial.py | 1 | 4148 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('admin', '0002_migrate_from_modoboa_admin'),
]
operations = [
migrations.CreateModel(
name='Record',
... | mit | 1,750,604,845,483,415,300 | 45.088889 | 256 | 0.531581 | false | 4.135593 | false | false | false |
EricssonResearch/scott-eu | simulation-ros/src/turtlebot2i/turtlebot2i_warehouse/src/task_manager.py | 1 | 4093 | #!/usr/bin/env python
"""@package Task Manager
Contains the classes to allocate PDDL plans to robots and monitor the robot task
"""
import json
import numpy as np
import rospy
import rospkg
import tf
import time
import actionlib
# TODO: Check if all these msgs are necessary
import moveit_msgs.msg
import geometry... | apache-2.0 | -34,284,259,554,832,796 | 25.406452 | 105 | 0.607867 | false | 3.803903 | false | false | false |
tommy-u/enable | enable/tools/toolbars/toolbar_buttons.py | 1 | 4366 |
from __future__ import with_statement
# Enthought library imports
from enable.api import ColorTrait, Component
from enable.font_metrics_provider import font_metrics_provider
from kiva.trait_defs.kiva_font_trait import KivaFont
from traits.api import Bool, Enum, Instance, Int, Property, Str, Tuple
class Button(Compon... | bsd-3-clause | 306,012,934,080,837,250 | 27.913907 | 79 | 0.566193 | false | 3.48722 | false | false | false |
cshallue/models | research/differential_privacy/pate/ICLR2018/utility_queries_answered.py | 1 | 2619 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from absl import flags
import matplotlib
import os
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.style.use('ggplot')
FLAGS = flags.FLAGS
flags.DEFINE_string('plot_file', ''... | apache-2.0 | 4,228,019,026,227,170,300 | 33.92 | 133 | 0.576556 | false | 2.461466 | false | false | false |
cwisecarver/osf.io | osf/models/preprint_service.py | 1 | 8377 | # -*- coding: utf-8 -*-
import urlparse
from dirtyfields import DirtyFieldsMixin
from django.db import models
from django.utils import timezone
from django.utils.functional import cached_property
from django.contrib.contenttypes.fields import GenericRelation
from framework.celery_tasks.handlers import enqueue_task
fr... | apache-2.0 | 2,774,040,169,233,115,000 | 34.95279 | 139 | 0.59926 | false | 4.175972 | false | false | false |
lituan/tools | clustal_pim.py | 1 | 2653 | """
transform percent identify matrix from clustal into other forms
"""
import os
import sys
def read_pim(pim_f):
lines = pim_f.readlines()
lines = [line.rstrip('\r\n') for line in lines]
lines = [line for line in lines if len(line) > 0]
scores = []
ids = []
ids = [line.split()[1] for line ... | cc0-1.0 | -6,033,314,312,918,804,000 | 31.753086 | 84 | 0.590275 | false | 2.960938 | false | false | false |
dsoprea/PySynchronousGlacier | sg/common.py | 1 | 1312 | import time
import datetime
import boto.glacier.exceptions
_RETRY_INTERVAL_S = 60 * 1
_ANNOUNCE_INTERVAL_S = 60 * 10
_MAX_ATTEMPTS = 0
def auto_retry(description, cb, loop_on_error_substring, retry_interval_s=_RETRY_INTERVAL_S, announce_interval_s=_ANNOUNCE_INTERVAL_S, max_attempts=_MAX_ATTEMPTS):
print("Waiting... | gpl-2.0 | 1,915,521,564,004,467,000 | 31.8 | 163 | 0.613567 | false | 3.584699 | false | false | false |
prospero78/pyPC | pak_pc/pak_gui/pak_win_idc/mod_win_idc.py | 1 | 2974 | # -*- coding: utf8 -*-
"""
Класс окна интерфейса дискового кластера.
"""
from Tkinter import Frame, Button
from pak_pc.pak_gui.pak_widgets.mod_frm_disk_select import ClsFrmDiskSelect
from pak_pc.pak_gui.pak_widgets.mod_top_win import ClsTopWin
class ClsWinIDC(ClsTopWin):
"""
Окно интерфейса дискового класте... | lgpl-3.0 | 3,585,711,003,825,822,700 | 35.051282 | 80 | 0.481508 | false | 3.371703 | false | false | false |
Vauxoo/server-tools | onchange_helper/models/base.py | 1 | 2696 | # Copyright 2016-2017 Akretion (http://www.akretion.com)
# Copyright 2016-2017 Camptocamp (http://www.camptocamp.com/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class Base(models.AbstractModel):
_inherit = 'base'
@api.model
def _get_new_values(self, re... | agpl-3.0 | -3,687,598,506,386,369,500 | 38.072464 | 78 | 0.579748 | false | 4.147692 | false | false | false |
alexliew/learn_python_the_hard_way | ex31.py | 1 | 1064 | print("You enter a dark room with two doors. Do you go through door #1 or door #2?")
door = input("> ")
if door == "1":
print("There's a giant bear here eating a cheese cake. What do you do?")
print("1. Take the cake.")
print("2. Scream at the bear.")
bear = input("> ")
if bear == "1":
p... | mit | 6,211,479,552,475,543,000 | 31.242424 | 84 | 0.614662 | false | 3.195195 | false | true | false |
CanonicalLtd/subiquity | subiquitycore/tui.py | 1 | 11563 | # Copyright 2020 Canonical, Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | agpl-3.0 | -8,812,758,819,110,156,000 | 32.909091 | 79 | 0.56603 | false | 3.99137 | false | false | false |
streamlink/streamlink | src/streamlink/plugins/cbsnews.py | 1 | 1053 | import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
from streamlink.utils import parse_json
@pluginmatcher(re.compile(
r"https?://www\.cbsnews\.com/live/"
))
class CBSNews(Plugin):
_re_default_payload = re.compile(r"... | bsd-2-clause | -1,208,471,928,750,297,300 | 29.085714 | 90 | 0.617284 | false | 3.720848 | false | false | false |
transistorfet/nerve | nerve/threads.py | 1 | 1136 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import nerve
import threading
class Thread (threading.Thread):
delay = True
threads = []
quit = False
def __init__(self, name=None, target=None):
threading.Thread.__init__(self, None, target, name)
Thread.threads.insert(0, self)
sel... | gpl-3.0 | -6,583,099,096,459,196,000 | 20.433962 | 61 | 0.536972 | false | 3.774086 | false | false | false |
Garrett-R/infections | user.py | 1 | 1713 | # -*- coding: utf-8 -*-
"""
@author: Garrett Reynolds
"""
class User:
__all_uids = set()
def __init__(self, uid):
# check for duplicate Users
if uid in User._User__all_uids:
raise RuntimeError("You tried to create more than one user with "
"uid:", ... | mit | -4,337,275,373,037,948,400 | 26.190476 | 77 | 0.559837 | false | 3.947005 | false | false | false |
felipenaselva/felipe.repository | plugin.program.Build.Tools/resources/libs/extract.py | 1 | 6113 | ################################################################################
# Copyright (C) 2015 Surfacingx #
# #
# This Program is free software; you can redistribute it and/or modify ... | gpl-2.0 | -1,820,008,557,394,159,900 | 49.95 | 237 | 0.582529 | false | 3.128454 | false | false | false |
ddzialak/boto | boto/s3/key.py | 1 | 82478 | # Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011, Nexenta Systems Inc.
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the... | mit | 4,149,464,999,439,184,400 | 41.845714 | 89 | 0.580082 | false | 4.544242 | false | false | false |
johnshiver/vote_location | voter_location/districts/management/commands/scrape_congressional_district_information.py | 1 | 10401 | import os.path
from pprint import pprint
from bs4 import BeautifulSoup
import requests
from django.core.management.base import BaseCommand, CommandError
from districts.models import DistrictDetail
class Command(BaseCommand):
def handle(self, *args, **options):
test_run = options['test_run']
sc... | mit | -4,899,914,114,722,983,000 | 39.466926 | 104 | 0.527981 | false | 3.856136 | false | false | false |
jonge-democraten/project-req | jd_projects/forms.py | 1 | 1426 | from django import forms
from django.forms.models import modelform_factory
from django.forms.formsets import formset_factory
from form_utils.forms import BetterForm, BetterModelForm
from localflavor.nl.forms import NLZipCodeField, NLPhoneNumberField
from jd_projects.models import Project, ProjectIncomeExpenses
class P... | mit | 8,706,205,441,655,577,000 | 39.742857 | 110 | 0.637447 | false | 4.051136 | false | false | false |
pcecconi/mapground | users/migrations/0001_initial.py | 1 | 3362 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-06-20 03:13
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):
initial = True
dependencies = [
('maps'... | mit | 580,808,338,526,254,700 | 43.826667 | 143 | 0.566627 | false | 3.859931 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.