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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
xfaxca/pymlkit | pymlkit/models/regressors.py | 1 | 4199 | """
Module for custom regression model classes.
"""
from sklearn.base import BaseEstimator, RegressorMixin
"""
Rolling todo:
1. For AvgReg: Modify how parameters are used. Put them all into a dict. Also change X_train, y_train to just X,y
"""
class AveragingRegressor(BaseEstimator, RegressorMixin):
"""
S... | gpl-3.0 | -5,591,416,426,703,481,000 | 43.680851 | 119 | 0.634675 | false | 4.237134 | false | false | false |
AlexeyKruglov/Skeinforge-fabmetheus | skeinforge_application/skeinforge_plugins/craft_plugins/multiply.py | 1 | 12265 | """
This page is in the table of contents.
The multiply plugin will take a single object and create an array of objects. It is used when you want to print single object multiple times in a single pass.
You can also position any object using this plugin by setting the center X and center Y to the desired coordinates (... | agpl-3.0 | 3,508,609,802,829,658,000 | 41.884615 | 368 | 0.76967 | false | 3.461756 | false | false | false |
QQuick/Transcrypt | transcrypt/development/automated_tests/transcrypt/module_itertools/__init__.py | 1 | 2899 | from itertools import *
from math import pow
def fibonacci():
a, b = 0, 1
for i in range (10):
yield a
a, b = b, a + b
squares = [i * i for i in range (10)]
chars = 'thequickbrownfoxjumpsoverthelazydog'
def run (autoTester):
autoTester.check ('islice count', list (i... | apache-2.0 | 6,306,938,173,265,230,000 | 40.043478 | 128 | 0.563643 | false | 3.455304 | true | false | false |
talha81/TACTIC-DEV | src/tactic/ui/table/sobject_detail_wdg.py | 1 | 4954 | ###########################################################
#
# Copyright (c) 2005-2008, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written ... | epl-1.0 | 6,152,893,046,757,104,000 | 26.21978 | 75 | 0.525838 | false | 3.6187 | false | false | false |
JungeAlexander/cocoscore | setup.py | 1 | 2522 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
import io
import re
from glob import glob
from os.path import basename
from os.path import dirname
from os.path import join
from os.path import splitext
from setuptools import find_packages
fro... | mit | -8,443,466,161,578,863,000 | 32.626667 | 96 | 0.599524 | false | 3.781109 | false | false | false |
MikhailMS/Final_Project | music_generation_module/output_to_input.py | 1 | 1066 | # Import packages
import theano, theano.tensor as T
import numpy as np
# Import modules
from model_data import noteStateSingleToInputForm
# Main class
class OutputFormToInputFormOp(theano.Op):
# Properties attribute
__props__ = ()
def make_node(self, state, time):
state = T.as_tensor_variable(sta... | bsd-2-clause | 1,084,220,755,746,954,400 | 34.533333 | 104 | 0.660413 | false | 3.753521 | false | false | false |
Ophiuchus1312/enigma2-master | lib/python/Components/RcModel.py | 1 | 6258 | from enigma import getBoxType
from Tools.StbHardware import getFPVersion
import os
class RcModel:
RCTYPE_DMM = 0
RCTYPE_DMM1 = 1
RCTYPE_DMM2 = 2
RCTYPE_E3HD = 3
RCTYPE_EBOX5000 = 4
RCTYPE_ET4X00 = 5
RCTYPE_ET6X00 = 6
RCTYPE_ET6500 = 7
RCTYPE_ET9X00 = 8
RCTYPE_ET9500 = 9
RCTYPE_GB = 10
RCTYPE_INI0 = 11
... | gpl-2.0 | 3,291,528,724,807,571,000 | 35.383721 | 93 | 0.683605 | false | 2.555329 | false | false | false |
jfly/libtnoodle | tools/c_to_emscripten.py | 1 | 3643 | #!/usr/bin/env python2
import json
import argparse
import collections
import clang.cindex
from clang.cindex import TypeKind
from clang.cindex import CursorKind
Function = collections.namedtuple('Function', ['name', 'returnType', 'argumentTypes'])
Constant = collections.namedtuple('Constant', ['name', 'value'])
def g... | gpl-3.0 | -3,406,530,499,207,695,000 | 36.556701 | 120 | 0.591545 | false | 3.896257 | false | false | false |
eyeseast/django-scrivo | scrivo/tests/views.py | 1 | 3316 | import datetime
import os
from django.conf import settings
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from scrivo.models import Post
from scrivo.settings import DEFAULT_PAGINATE_BY, INDEX_POST_COUNT
from scrivo.tests.base import BlogPostTest, f
class PostViewTest(BlogPos... | mit | -8,118,935,701,026,106,000 | 32.846939 | 88 | 0.587455 | false | 4.273196 | true | false | false |
theonlydude/RandomMetroidSolver | rando/ItemLocContainer.py | 1 | 10007 |
import copy, utils.log
from logic.smbool import SMBool, smboolFalse
from logic.smboolmanager import SMBoolManager
from collections import Counter
class ItemLocation(object):
__slots__ = ( 'Item', 'Location', 'Accessible' )
def __init__(self, Item=None, Location=None, accessible=True):
self.Item = It... | gpl-3.0 | 7,744,803,922,275,245,000 | 39.350806 | 218 | 0.662137 | false | 4.049777 | false | false | false |
brainwane/zulip | zerver/views/submessage.py | 2 | 1118 | import orjson
from django.http import HttpRequest, HttpResponse
from django.utils.translation import ugettext as _
from zerver.decorator import REQ, has_request_variables
from zerver.lib.actions import do_add_submessage
from zerver.lib.message import access_message
from zerver.lib.response import json_error, json_succ... | apache-2.0 | 5,286,719,226,919,771,000 | 31.882353 | 68 | 0.657424 | false | 4.234848 | false | false | false |
ox-it/moxie | moxie/places/importers/osm.py | 1 | 8808 | # -*- coding: utf-8 -*-
import logging
from xml.sax import handler
from moxie.places.importers.helpers import prepare_document, format_uk_telephone
logger = logging.getLogger(__name__)
DEFAULT_SHOP = '/amenities/shop'
SHOPS = {'supermarket': '/amenities/supermarket',
'department_store': '/amenities/superm... | apache-2.0 | -8,723,120,305,712,997,000 | 40.352113 | 126 | 0.518506 | false | 3.785131 | false | false | false |
NaohiroTamura/ironic | ironic/objects/volume_target.py | 1 | 11250 | # Copyright (c) 2016 Hitachi, Ltd.
#
# 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 | -4,377,000,555,161,214,000 | 46.669492 | 79 | 0.647289 | false | 4.430878 | false | false | false |
hhucn/netsec-uebungssystem | netsecus/student.py | 1 | 5593 | from __future__ import unicode_literals
from . import helper
from . import grading
import collections
Student = collections.namedtuple('Student', ['id'])
NamedStudent = collections.namedtuple('Student', ['student', 'aliases'])
FullStudent = collections.namedtuple('FullStudent', ['student', 'aliases', 'submissions', ... | mit | -2,899,860,098,836,917,000 | 32.291667 | 114 | 0.587878 | false | 3.892136 | false | false | false |
bitmovin/bitmovin-python | bitmovin/resources/models/encodings/encoding.py | 1 | 4786 | from bitmovin.errors import InvalidTypeError
from bitmovin.resources.enums import CloudRegion, EncoderVersion
from bitmovin.utils import Serializable
from bitmovin.resources.models import AbstractModel
from bitmovin.resources import AbstractNameDescriptionResource
from .infrastructure import Infrastructure
class Enc... | unlicense | -330,824,083,189,929,000 | 36.685039 | 118 | 0.639365 | false | 4.615236 | false | false | false |
thobbs/cassandra-dtest | upgrade_tests/cql_tests.py | 1 | 233827 | # coding: utf-8
import itertools
import math
import random
import struct
import time
from collections import OrderedDict
from distutils.version import LooseVersion
from unittest import skipUnless
from uuid import UUID, uuid4
from cassandra import ConsistencyLevel, InvalidRequest
from cassandra.concurrent import execu... | apache-2.0 | -267,808,268,547,125,220 | 43.327393 | 192 | 0.525782 | false | 3.693774 | true | false | false |
fullphat/redsquare | rs_pcd8544.py | 1 | 1295 | # RedSqaure
# pcd8544.device handler
# LCD matrix used in the original Nokia 3310 phones
# Copyright (c) 2017 full phat products
#
import threading
import sos
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# init:
#
def init():
global lcd
try:
import pcd8544lib as lcd
... | mit | -4,017,047,913,291,437,600 | 20.327586 | 73 | 0.562934 | false | 3.061466 | false | false | false |
leppa/home-assistant | homeassistant/components/ring/light.py | 1 | 2991 | """This component provides HA switch support for Ring Door Bell/Chimes."""
from datetime import timedelta
import logging
from homeassistant.components.light import Light
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
import homeassistant.util.dt as dt_util... | apache-2.0 | 2,940,559,475,843,706,400 | 29.212121 | 86 | 0.640923 | false | 3.874352 | false | false | false |
shaz13/oppia | core/domain/email_manager.py | 1 | 36969 | # coding: utf-8
#
# Copyright 2014 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,266,375,526,076,710,000 | 38.245223 | 80 | 0.651221 | false | 3.685108 | true | false | false |
bospetersen/h2o-3 | h2o-py/tests/testdir_algos/rf/pyunit_NOPASS_error_checkpointRF.py | 1 | 2494 | import sys, shutil
sys.path.insert(1, "../../../")
import h2o, tests
def cars_checkpoint(ip,port):
cars = h2o.upload_file(h2o.locate("smalldata/junit/cars_20mpg.csv"))
predictors = ["displacement","power","weight","acceleration","year"]
response_col = "economy"
# build first model
model1 = h2o.ra... | apache-2.0 | -1,062,366,960,171,115,100 | 37.369231 | 121 | 0.677626 | false | 3.402456 | false | false | false |
cmallwitz/Sunflower | application/plugins/find_file_extensions/size.py | 1 | 2603 | from gi.repository import Gtk
from plugin_base.find_extension import FindExtension
class SizeFindFiles(FindExtension):
"""Size extension for find files tool"""
def __init__(self, parent):
FindExtension.__init__(self, parent)
# create container
table = Gtk.Table(2, 4, False)
table.set_border_width(5)
ta... | gpl-3.0 | 2,342,140,416,426,739,700 | 36.724638 | 109 | 0.698425 | false | 2.8171 | false | false | false |
andrei-milea/unbiased | web/backend/urls.py | 1 | 1264 | """backend URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | gpl-3.0 | 2,791,782,861,359,301,000 | 42.586207 | 79 | 0.689082 | false | 3.407008 | false | false | false |
emory-libraries/eulcore-history | src/eulcore/django/existdb/tests.py | 1 | 7136 | # file django/existdb/tests.py
#
# Copyright 2010 Emory University General Library
#
# 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/LI... | apache-2.0 | -6,928,753,692,045,739,000 | 40.987952 | 116 | 0.663817 | false | 3.871948 | true | false | false |
gwu-libraries/launchpad | lp/ui/management/commands/make_sitemap.py | 1 | 2292 | import gzip
import os
from django.conf import settings
from django.core.management.base import BaseCommand
from django.db import connections
def _newfile(counter):
"""Generate a new sitemap filename based on count."""
name = '%s/sitemap-%s.xml.gz' % (settings.SITEMAPS_DIR,
counter)
fp = gzip.open... | mit | 98,821,271,441,966,880 | 33.208955 | 73 | 0.538394 | false | 3.493902 | false | false | false |
nurnbeck/project-2-CMPUT-291 | ret_KEY.py | 1 | 1724 | import os
import time
import bsddb3 as bsddb
'''
Retrieve records with a given key
- Modified and simplified based on the old version
- Has the same format and assumption as ret_DATA()
Tested under DB_SIZE = 10
'''
DB_FILE = "/tmp/yishuo_db/sample_db"
SDB_FILE = "/tmp/yishuo_db/IndexFile"
def ret_KEY(filetype):
... | mit | -4,234,728,709,192,996,000 | 25.9375 | 61 | 0.567285 | false | 3.448 | false | false | false |
biemond/biemond-orawls | files/wlst/utils.py | 1 | 7556 |
def create_boot_properties_file(directory_path, file_name, username, password):
server_dir = File(directory_path)
server_dir.mkdirs()
full_file_name = directory_path + '/' + file_name
file_new = open(full_file_name, 'w')
file_new.write('username=%s\n' % username)
file_new.write('password=%s\n'... | apache-2.0 | 6,416,536,408,274,387,000 | 32.286344 | 134 | 0.674034 | false | 3.569202 | false | false | false |
LukasRychtecky/django-chamber | chamber/migrations/fixtures.py | 1 | 1343 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
from six.moves import cStringIO
from django.core.management import call_command
from django.core.serializers import base, python
class MigrationLoadFixture(object):
def __init__(self, migration_file, fixture_dir=None, fixture_filename=N... | lgpl-3.0 | -2,368,341,324,001,750,500 | 37.371429 | 116 | 0.633656 | false | 3.938416 | false | false | false |
golsun/GPS | src/ck/def_cheminp.py | 1 | 2124 | from def_build_mech_dict import *
import os
import shutil
def rename_sp(sp_list):
sp_list_new = []
for s in sp_list:
sp_list_new.append(s.replace("(","-").replace(")","-").replace(",","-"))
return sp_list_new
def skeletal(detailed_folder, sk_folder, species_kept, notes=None):
if not os.path.exists(sk_folder... | mit | -1,599,475,815,948,921,600 | 19.833333 | 97 | 0.586158 | false | 2.510638 | false | false | false |
t1g0r/ramey | src/backend/libs/telepot/async/__init__.py | 1 | 18967 | import io
import json
import time
import asyncio
import aiohttp
import traceback
import re
from requests.utils import guess_filename
from concurrent.futures._base import CancelledError
import collections
import telepot
import telepot.async.helper
from ..exception import BadFlavor, BadHTTPResponse, TelegramError
def f... | gpl-3.0 | 9,221,394,431,815,405,000 | 38.597077 | 166 | 0.510782 | false | 4.634009 | false | false | false |
ibis-project/ibis | ibis/backends/impala/tests/test_parquet_ddl.py | 1 | 2838 | from posixpath import join as pjoin
import pytest
import ibis
from ibis.backends.impala.compat import HS2Error
from ibis.tests.util import assert_equal
pytestmark = pytest.mark.impala
def test_cleanup_tmp_table_on_gc(con, test_data_dir):
import gc
hdfs_path = pjoin(test_data_dir, 'parquet/tpch_region')
... | apache-2.0 | 6,085,975,110,491,497,000 | 24.339286 | 78 | 0.610641 | false | 3.146341 | true | false | false |
speed-of-light/pyslider | summ.py | 1 | 9220 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
rks = [
"lib.exp.summ.storage",
"lib.exp.summ"]
reload_mods(rks)
from lib.exp.summ import Mary
mm = Mary()
import warnings
warnings.filterwarnings('ignore')
# <codecell>
#dc = mm.df_classify_perf(key="coverages_9")
#saf = mm.df_rec_ans()
if False... | agpl-3.0 | 5,366,314,327,825,016,000 | 28.456869 | 123 | 0.62039 | false | 2.375064 | false | false | false |
rogerthat-platform/rogerthat-backend | src/mcfw/exceptions.py | 1 | 2422 | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | apache-2.0 | 3,057,799,384,206,349,300 | 30.051282 | 79 | 0.691164 | false | 3.957516 | false | false | false |
ingadhoc/odoo-infrastructure | infrastructure/models/mailserver.py | 1 | 1038 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import models, fields
class mailser... | agpl-3.0 | 4,729,004,514,452,739,000 | 31.4375 | 79 | 0.526012 | false | 4.654709 | false | false | false |
noskill/virt-manager | tests/storage.py | 1 | 8815 | # Copyright (C) 2013 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 ... | gpl-2.0 | -4,441,029,140,978,103,300 | 33.980159 | 78 | 0.59705 | false | 3.683661 | true | false | false |
jilljenn/tryalgo | tryalgo/subsetsum_divide.py | 1 | 2217 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""\
Subsetsum by splitting
christoph dürr et jill-jênn vie - 2014-2019
"""
# snip{
def part_sum(x_table, i=0):
"""All subsetsums from x_table[i:]
:param x_table: table of values
:param int i: index_table defining suffix_table of x_table to be considered
... | mit | -4,340,037,461,299,297,300 | 27.766234 | 79 | 0.575169 | false | 3.089261 | false | false | false |
plum-umd/java-sketch | jskparser/ast/body/variabledeclarator.py | 1 | 1508 | #!/usr/bin/env python
from . import _import
from ..node import Node
class VariableDeclarator(Node):
def __init__(self, kwargs={}):
if kwargs.get(u'id', ''):
super(VariableDeclarator, self).__init__(kwargs)
locs = _import()
# VariableDeclaratorId
self._id =... | mit | 4,094,312,163,630,533,000 | 25.928571 | 77 | 0.56565 | false | 3.466667 | false | false | false |
lithiumoxide/scical | astronomy.py | 1 | 1465 | # astronomy.py 12.10.3
from math import *
G = 6.673e-11
c = 2.998e8
H = 80 # km/s/Mpc
v = 0
relg = 1/(sqrt(1-((v/c)**2)))
def gforce(m1, m2, r):
''' (int, int, int) -> int
Calculates gravitational force between masses m1 and m2 (kg) at a separation of r (m).
'''
global G
return str((G*m1*m2)/(r**2)) + ' N'
... | gpl-3.0 | 8,261,305,374,650,977,000 | 20.246377 | 87 | 0.632765 | false | 2.491497 | false | false | false |
bcicen/multicrane | multicrane/crane.py | 1 | 1817 | #!/usr/bin/env python
import os, yaml, urllib2, logging, termcolor
from sh import crane
from util import randomcolor
log = logging.getLogger()
class CraneConfig(object):
def __init__(self, cranefile):
"""
CraneConfig object
"""
self.txtcolor = randomcolor()
self.cranefile... | mit | -8,861,030,407,317,800,000 | 30.877193 | 82 | 0.5377 | false | 3.754132 | false | false | false |
leshchevds/ganeti | test/py/testutils_ssh.py | 1 | 28653 | #!/usr/bin/python
#
# Copyright (C) 2010, 2013, 2015 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# ... | bsd-2-clause | 3,561,939,545,193,350,700 | 36.55308 | 80 | 0.679789 | false | 3.862111 | false | false | false |
USGSDenverPychron/pychron | pychron/experiment/image_browser.py | 1 | 9889 | # ===============================================================================
# Copyright 2012 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licens... | apache-2.0 | -8,116,230,646,335,603,000 | 34.067376 | 94 | 0.494388 | false | 4.303307 | false | false | false |
bioinformatics-IBCH/logloss-beraf | logloss_beraf/model_ops/trainer.py | 1 | 12714 | # coding=utf-8
import copy
import logging
import os
# https://github.com/matplotlib/matplotlib/issues/3466/#issuecomment-195899517
import itertools
import matplotlib
matplotlib.use('agg')
import numpy as np
import pandas
from sklearn import (
preprocessing,
model_selection,
)
from sklearn.cross_validation imp... | gpl-3.0 | -4,018,092,607,383,729,000 | 40.279221 | 125 | 0.632059 | false | 4.055502 | false | false | false |
arximboldi/pigeoncide | src/phys/geom.py | 1 | 1351 | #
# Copyright (C) 2009 Juan Pedro Bolivar Puente, Alberto Villegas Erce
#
# This file is part of Pigeoncide.
#
# Pigeoncide 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
# Lic... | gpl-3.0 | -6,525,842,370,010,480,000 | 34.552632 | 72 | 0.720207 | false | 3.303178 | false | false | false |
BevoLJ/KRPC | Lagadha/Lunar_XFer_Manager.py | 1 | 6215 | import numpy as np
import time
# from numba import jit
from Orbit_Manager import OrbitManager
class LunarXFerManager(OrbitManager):
def __init__(self):
super().__init__()
self.mode = "LEO"
self.earth = self.KSC.bodies['Earth']
self.moon = self.KSC.bodies['Moon'].orbit
# ... | mit | 5,158,009,346,149,246,000 | 40.165563 | 111 | 0.595977 | false | 3.087432 | false | false | false |
michaelsmit/openparliament | parliament/hansards/models.py | 1 | 21145 | #coding: utf-8
import gzip, os, re
from collections import defaultdict
import datetime
from django.db import models
from django.conf import settings
from django.core import urlresolvers
from django.core.files.base import ContentFile
from django.template.defaultfilters import slugify
from django.utils.datastructures i... | agpl-3.0 | -9,099,643,264,234,737,000 | 38.2282 | 126 | 0.572172 | false | 3.823508 | false | false | false |
vpelletier/neoppod | neo/scripts/simple.py | 1 | 2244 | #!/usr/bin/env python
#
# Copyright (C) 2011-2016 Nexedi SA
#
# 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 ... | gpl-2.0 | -6,943,767,685,848,343,000 | 37.033898 | 78 | 0.655526 | false | 4.10989 | false | false | false |
google/timesketch | api_client/python/timesketch_api_client/searchtemplate.py | 1 | 8044 | # Copyright 2021 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 by applicable law or a... | apache-2.0 | 374,413,808,863,143,740 | 34.59292 | 78 | 0.587892 | false | 4.271907 | false | false | false |
CuonDeveloper/cuon | cuon_server/src/cuon/Finances.py | 1 | 14964 | import random
import xmlrpclib
from twisted.web import xmlrpc
from basics import basics
import Database
class Finances(xmlrpc.XMLRPC, basics):
def __init__(self):
basics.__init__(self)
self.oDatabase = Database.Database()
self.debugFinances = 1
def getCashAccountBook(se... | gpl-3.0 | 4,789,738,053,648,609,000 | 41.754286 | 145 | 0.559276 | false | 3.497896 | false | false | false |
MapsPy/MapsPy | maps_monitor.py | 1 | 10537 | '''
Created on Jun 6, 2013
@author: Mirna Lerotic, 2nd Look Consulting
http://www.2ndlookconsulting.com/
Copyright (c) 2013, Stefan Vogt, Argonne National Laboratory
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the ... | bsd-2-clause | 696,451,433,837,313,400 | 35.102113 | 105 | 0.61564 | false | 3.146312 | false | false | false |
mhielscher/simplebot | irclib.py | 1 | 48749 | # Copyright (C) 1999--2002 Joel Rosdahl
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is ... | lgpl-2.1 | 875,220,853,920,328,000 | 30.22934 | 105 | 0.564401 | false | 3.946648 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/mobile_device_constant_service/client.py | 1 | 18151 | # -*- 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,857,676,658,100,900,000 | 44.039702 | 156 | 0.635337 | false | 4.627996 | false | false | false |
agateau/qyok | queries.py | 1 | 5142 | # -*- coding: UTF-8 -*-
from datetime import datetime
from operator import attrgetter
from PyQt4.QtCore import QCoreApplication
from sqlobject import AND, OR, LIKE, IN
from sqlobject.sqlbuilder import Select
import yaml
from yokadi.db import Task, Project
def formatDate(date):
"""
strftime may return a str... | gpl-3.0 | -5,127,149,142,014,772,000 | 28.210227 | 116 | 0.576347 | false | 3.682665 | false | false | false |
Djabx/mgd | mgdpck/mgd_main.py | 1 | 8718 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import argparse
import logging
import operator
import itertools
import webbrowser
from mgdpck import logging_util
# init logger first
logging_util.init_logger()
logging_util.add_except_name('run_script')
logger = logging.getLogger(__name__)
logger.addHan... | apache-2.0 | -7,672,336,189,648,278,000 | 28.958763 | 126 | 0.652099 | false | 3.28238 | false | false | false |
textbook/atmdb | atmdb/utils.py | 1 | 4517 | """Utilities for working with TMDb models."""
async def overlapping_movies(people, client=None):
"""Find movies that the same people have been in.
Arguments:
people (:py:class:`collections.abc.Sequence`): The
:py:class:`~.Person` objects to find overlapping movies for.
client (:py:class:`... | isc | 4,149,155,471,548,165,600 | 34.566929 | 80 | 0.654195 | false | 4.277462 | false | false | false |
landscapeio/prospector | prospector2/formatters/text.py | 1 | 3108 | from prospector2.formatters.base import Formatter
__all__ = (
'TextFormatter',
)
# pylint: disable=unnecessary-lambda
class TextFormatter(Formatter):
summary_labels = (
('started', 'Started'),
('completed', 'Finished'),
('time_taken', 'Time Taken', lambda x: '%s seconds' % x),
... | gpl-2.0 | 6,796,904,696,348,735,000 | 27.254545 | 96 | 0.47973 | false | 4.334728 | false | false | false |
google-research/episodic-curiosity | third_party/baselines/common/misc_util.py | 1 | 7608 | # coding=utf-8
import gym
import numpy as np
import os
import pickle
import random
import tempfile
import zipfile
def zipsame(*seqs):
L = len(seqs[0])
assert all(len(seq) == L for seq in seqs[1:])
return zip(*seqs)
def unpack(seq, sizes):
"""
Unpack 'seq' into a sequence of lists, with lengths s... | apache-2.0 | -6,773,599,826,624,659,000 | 28.374517 | 110 | 0.59674 | false | 4.094726 | false | false | false |
molly24Huang/Cents_trip | Recommendation/attr_food_distance.py | 1 | 2978 | import pandas as pd
from math import sin, cos, sqrt, asin, radians
#import ibm_db
def cal_dist(lon1, lat1, lon2, lat2):
lon1, lat1, lon2, lat2 = map(radians, [lon1, lat1, lon2, lat2])
dlon = lon2 - lon1
dlat = lat2 - lat1
a = sin(dlat / 2) ** 2 + cos(lat1) * cos(lat2) * sin(dlon / 2) ** 2
c = 2 * a... | apache-2.0 | 2,555,478,355,868,660,000 | 33.627907 | 140 | 0.611148 | false | 2.838894 | false | false | false |
mjhennig/dyn-python | dyn/tm/services/httpredirect.py | 1 | 5031 | # -*- coding: utf-8 -*-
"""This module contains API Wrapper implementations of the HTTP Redirect service
"""
import logging
from ..session import DynectSession
from ...compat import force_unicode
__author__ = 'xorg'
__all__ = ['HTTPRedirect']
class HTTPRedirect(object):
"""HTTPRedirect is a service which sets u... | bsd-3-clause | 8,570,874,800,027,544,000 | 33.909722 | 112 | 0.560971 | false | 4.137449 | false | false | false |
emvarun/followup-and-location | Sky_Patch.py | 1 | 4646 | #!/usr/bin/python
import os, re
import numpy as np
import healpy as hp
import astropy.units as u
from astropy.coordinates import SkyCoord, EarthLocation, AltAz, get_sun
from astropy.time import Time
from astropy.io import fits
import ephem
from ephem import *
from params import Observatory_Locations
def Patch(fitsfile... | gpl-3.0 | 6,250,973,748,818,928,000 | 38.372881 | 141 | 0.71201 | false | 2.702734 | false | false | false |
mozilla/socorro | webapp-django/crashstats/crashstats/tests/test_bugassociations.py | 1 | 4928 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import io
import requests_mock
import pytest
from django.core.management import call_command
from crashstats.crashsta... | mpl-2.0 | 2,033,320,415,098,187,800 | 32.986207 | 97 | 0.576096 | false | 3.71644 | true | false | false |
all-out/lightswitch | lightswitch/main/migrations/0002_auto__del_members__del_ships__add_ship__add_member.py | 1 | 3070 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Members'
db.delete_table(u'main_members')
# De... | mit | -8,889,125,126,581,968,000 | 38.371795 | 88 | 0.558306 | false | 3.628842 | false | false | false |
dparks1134/STAMP | stamp/plugins/samples/plots/configGUI/multCompCorrectionUI.py | 1 | 12647 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'multCompCorrection.ui'
#
# Created: Sat Apr 16 13:41:52 2011
# by: PyQt4 UI code generator 4.6.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
class Ui_MultCompCorrectionDialog(object):
d... | gpl-3.0 | -3,321,368,441,627,692,500 | 63.19797 | 172 | 0.740887 | false | 3.832424 | false | false | false |
rh-s/heat | heat/engine/resources/openstack/manila/security_service.py | 1 | 3666 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -3,208,775,644,978,497,000 | 32.027027 | 79 | 0.589198 | false | 4.5825 | false | false | false |
benletchford/stratego.io | gae/tests/FIXTURES.py | 1 | 2396 | import json
import copy
SETUP = [
[
{'rank': '1', 'side': 3},
{'rank': '2', 'side': 3},
{'rank': '3', 'side': 3},
{'rank': '3', 'side': 3},
{'rank': '4', 'side': 3},
{'rank': '4', 'side': 3},
{'rank': '4', 'side': 3},
{'rank': '5', 'side': 3},
... | mit | 1,294,217,295,813,873,200 | 17.151515 | 39 | 0.344741 | false | 2.576344 | false | false | false |
42cs/book | modules/luther/sphinx/assess/assessbase.py | 1 | 2756 | # Copyright (C) 2011 Bradley N. Miller
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distribute... | mit | -2,434,039,718,979,837,000 | 28.010526 | 87 | 0.590711 | false | 3.56533 | false | false | false |
dfalk/mezzanine-wiki | mezzanine_wiki/fields.py | 1 | 1385 | from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.utils.translation import ugettext_lazy as _
from mezzanine.utils.importing import import_dotted_path
class WikiTextField(models.TextField):
"""
TextField that stores markup text.
... | bsd-2-clause | 4,441,378,388,650,258,400 | 34.512821 | 78 | 0.638267 | false | 4.382911 | false | false | false |
gdw2/zim | zim/formats/plain.py | 1 | 4786 | # -*- coding: utf-8 -*-
# Copyright 2008 Jaap Karssenberg <jaap.karssenberg@gmail.com>
'''This module handles parsing and dumping input in plain text'''
import re
import zim.parser
from zim.parser import prepare_text, Rule
from zim.formats import *
from zim.parsing import url_re
info = {
'name': 'plain',
'desc... | gpl-2.0 | -5,482,015,731,721,429,000 | 24.322751 | 102 | 0.649812 | false | 3.058147 | false | false | false |
mswart/pyopenmensa | setup.py | 1 | 2029 | from setuptools import setup # Always prefer setuptools over distutils
from codecs import open # To use a consistent encoding
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_de... | lgpl-3.0 | 7,562,236,628,138,542,000 | 31.725806 | 83 | 0.644653 | false | 4.166324 | false | false | false |
richard-shepherd/monopyly | AIs/Stephen Chan/big_brick.py | 1 | 20396 | from monopyly import *
import random
class BigBrickAI(PlayerAIBase):
mClassDebug = True
def __init__(self):
self.p("__init__")
self.turn_count = 0
self.chance_cards_count=0
self.community_chest_cards_count=0
self.property_mortgage_cards_count=0
self.auction_spr... | mit | -4,966,430,030,353,533,000 | 33.268908 | 114 | 0.605836 | false | 4.112545 | false | false | false |
proyan/sot-torque-control | python/dynamic_graph/sot/torque_control/identification/identify_motor_acc.py | 1 | 2771 | # -*- coding: utf-8 -*-
"""
Created on Tue Sep 12 18:47:50 2017
@author: adelpret
"""
from scipy import signal
import numpy as np
from scipy import ndimage
import matplotlib.pyplot as plt
from identification_utils import solve1stOrderLeastSquare
def identify_motor_acc(dt, dq, ddq, current, tau, Kt_p, Kv_p, ZERO_VELO... | gpl-3.0 | -7,318,730,382,067,557,000 | 39.173913 | 102 | 0.591483 | false | 2.901571 | false | false | false |
hydroshare/hydroshare_temp | hs_party/forms/person.py | 1 | 3624 | __author__ = 'valentin'
#from mezzanine.forms.models import Form
from django.forms import ModelForm, Textarea
from django import forms
from django.forms.models import inlineformset_factory,modelformset_factory,BaseModelFormSet
from ..models.organization import Organization
from ..models.person import Person,PersonLoca... | bsd-3-clause | -8,476,676,534,957,222,000 | 31.079646 | 97 | 0.648179 | false | 4.288757 | false | false | false |
ivanfilippov/PowerDNS-Admin | create_db.py | 1 | 2745 | #!/usr/bin/env python
from migrate.versioning import api
from config import SQLALCHEMY_DATABASE_URI
from config import SQLALCHEMY_MIGRATE_REPO
from app import db
from app.models import Role, Setting
import os.path
import time
import sys
def start():
wait_time = get_waittime_from_env()
if not connect_db(wait_... | mit | 6,372,247,686,023,421,000 | 27.894737 | 115 | 0.647359 | false | 3.422693 | false | false | false |
RyanChinSang/ECNG3020-ORSS4SCVI | BETA/dev02/test3.py | 1 | 4947 | from __future__ import print_function
from threading import Thread
import sys
import cv2
import numpy as np
import queue
from BETA.dev02.test2 import avg_color
from BETA.dev02.test4 import t2s_say
class VideoStream:
def __init__(self, src=None, height=None, width=None, ratio=None):
cv2.setUseOptimized(Tru... | gpl-3.0 | -4,433,979,133,669,497,000 | 34.092199 | 110 | 0.538508 | false | 3.719549 | false | false | false |
wangtaoking1/hummer | backend/kubernetes/k8sclient.py | 1 | 9953 | import json
import requests
import logging
from backend.kubernetes.namespace import Namespace
from backend.kubernetes.replicationcontroller import Controller
from backend.kubernetes.service import Service
from backend.kubernetes.volume import PersistentVolume, PersistentVolumeClaim
from backend.kubernetes.autoscaler i... | apache-2.0 | -1,566,903,951,912,053,800 | 32.969283 | 80 | 0.594394 | false | 4.384581 | false | false | false |
martijnvermaat/rpclib | src/rpclib/util/etreeconv.py | 1 | 3585 |
#
# rpclib - Copyright (C) Rpclib contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This lib... | lgpl-2.1 | 138,900,269,373,878,800 | 32.194444 | 80 | 0.660251 | false | 4.005587 | false | false | false |
prymitive/upaas-admin | upaas_admin/apps/applications/models.py | 1 | 31729 | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2013-2014 by Łukasz Mierzwa
:contact: l.mierzwa@gmail.com
"""
from __future__ import unicode_literals
import os
import datetime
import logging
import tempfile
import shutil
import time
import re
from copy import deepcopy
from mongoengine import (Document, Dat... | gpl-3.0 | 8,420,968,401,472,349,000 | 36.952153 | 79 | 0.579078 | false | 4.466216 | true | false | false |
Fokko/incubator-airflow | airflow/hooks/hive_hooks.py | 1 | 39213 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) 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
#... | apache-2.0 | 80,130,069,523,703,410 | 38.291583 | 93 | 0.543468 | false | 4.272965 | false | false | false |
elego/tkobr-addons | tko_project_task_status/models/project_task.py | 1 | 5572 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# ThinkOpen Solutions Brasil
# Copyright (C) Thinkopen Solutions <http://www.tkobr.com>.
#
# This... | agpl-3.0 | 3,694,331,997,314,282,500 | 43.935484 | 170 | 0.618988 | false | 3.926709 | false | false | false |
v-legoff/accertin | lyntin/ui/message.py | 1 | 1613 | #######################################################################
# This file is part of Lyntin.
# copyright (c) Free Software Foundation 2001, 2002
#
# Lyntin is distributed under the GNU General Public License license. See the
# file LICENSE for distribution details.
# $Id: message.py,v 1.1 2003/08/01 00:14:52... | gpl-3.0 | -5,694,003,833,159,969,000 | 25.883333 | 78 | 0.578425 | false | 3.751163 | false | false | false |
rbooth200/DiscEvolution | DiscEvolution/driver.py | 1 | 12630 | # driver.py
#
# Author: R. Booth
# Date: 17 - Nov - 2016
#
# Combined model for dust, gas and chemical evolution
################################################################################
from __future__ import print_function
import numpy as np
import os
from .photoevaporation import FixedExternalEvaporation
from... | gpl-3.0 | -6,679,079,293,049,471,000 | 31.976501 | 190 | 0.553286 | false | 3.419058 | false | false | false |
ppietrasa/grpc | tools/distrib/check_copyright.py | 1 | 5538 | #!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# 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 li... | bsd-3-clause | 5,643,336,900,783,706,000 | 30.465909 | 83 | 0.631636 | false | 3.485211 | false | false | false |
foosel/OctoPrint | src/octoprint/access/users.py | 1 | 40260 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
from flask_login im... | agpl-3.0 | -4,884,698,765,578,790,000 | 30.650943 | 214 | 0.663214 | false | 3.502697 | false | false | false |
QuantEcon/QuantEcon.py | quantecon/quad.py | 1 | 31180 | """
Defining various quadrature routines.
Based on the quadrature routines found in the CompEcon toolbox by
Miranda and Fackler.
References
----------
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics
and Finance, MIT Press, 2002.
"""
import math
import numpy as np
import scipy.linalg as la
from ... | bsd-3-clause | -5,027,179,250,230,418,000 | 25.135792 | 78 | 0.56982 | false | 3.475256 | false | false | false |
mosbys/Clone | Cloning_v1/drive.py | 1 | 3838 | import argparse
import base64
import json
import numpy as np
import socketio
import eventlet
import eventlet.wsgi
import time
from PIL import Image
from PIL import ImageOps
from flask import Flask, render_template
from io import BytesIO
from random import randint
from keras.models import model_from_json
... | gpl-2.0 | 8,273,103,825,005,780,000 | 32.285714 | 112 | 0.663627 | false | 3.524334 | false | false | false |
EarthLifeConsortium/elc_api | swagger_server/elc/geog.py | 1 | 2706 | """Functions related to geographic coordinates and paleo conversions."""
def get_geog(coords, age, options):
"""Parse paleo geography parameters."""
from ..elc import ages
modern = [x.strip() for x in coords.split(',')]
if '' in modern or len(modern) != 2:
msg = 'Second parameter not found in... | apache-2.0 | -4,612,773,691,188,010,000 | 29.404494 | 74 | 0.570214 | false | 3.701778 | false | false | false |
bisguzar/lolasistan | src/lang.py | 1 | 1635 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import config
connectFailed = {
'en': 'connect failed',
'tr': 'bağlantı başarısız'
}
connected = {
'en': '[System] Connected',
'tr': '[Sistem] Bağlanıldı'
}
authFailed = {
'en': 'auth failed',
'tr': 'giriş başarısız'
}
authSucces = {
'en': '[System] auth succesf... | gpl-3.0 | -653,396,016,554,987,500 | 19.253165 | 89 | 0.61375 | false | 2.222222 | false | true | false |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/addons/plugin.video.salts/scrapers/watch8now_scraper.py | 1 | 3879 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
T... | apache-2.0 | -4,866,924,595,996,970,000 | 38.181818 | 199 | 0.601444 | false | 3.642254 | false | false | false |
jstasiak/travis-solo | setup.py | 1 | 2016 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
from setuptools import setup
from os.path import abspath, dirname, join
PROJECT_ROOT = abspath(dirname(__file__))
with open(join(PROJECT_ROOT, 'README.rst')) as f:
readme = f.read()
with open(join(PROJECT_ROOT, 'travis_solo.p... | mit | -6,734,856,298,556,025,000 | 31 | 88 | 0.613095 | false | 3.952941 | false | false | false |
SymbiFlow/edalize | edalize/yosys.py | 1 | 4456 | # Copyright edalize contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import logging
import os.path
from edalize.edatool import Edatool
logger = logging.getLogger(__name__)
class Yosys(Edatool):
argtypes = ['vlogdefine', 'vlogparam']
@... | bsd-2-clause | -3,073,453,257,561,716,000 | 41.037736 | 119 | 0.467235 | false | 4.018034 | false | false | false |
Hpower96/Power | backend/thread.py | 1 | 1338 | #!/usr/bin/env python
from multiprocessing import Process,Lock
import sys,os,time
script = sys.argv[0]
list = [1000,1200,1400,1600,1800,10000]
Proce_num_list = []
def worker(num):
try:
#print p.name, p.pid, os.getppid()
if int(num) == int(list[-1]):
print 'Check out automatically exit... | gpl-3.0 | 2,627,051,263,523,876,000 | 28.733333 | 91 | 0.480568 | false | 3.457364 | false | false | false |
johanvdw/niche_vlaanderen | niche_vlaanderen/spatial_context.py | 1 | 7681 | from affine import Affine
from textwrap import dedent
import warnings
class SpatialContextError(Exception):
"""
"""
class SpatialContext(object):
"""Stores the spatial context of the grids in niche
This class is based on the rasterio model of a grid.
Attributes
----------
transform: A... | mit | 4,143,655,543,510,224,000 | 32.395652 | 79 | 0.573102 | false | 4.231956 | false | false | false |
pdf/beets | setup.py | 1 | 2918 | #!/usr/bin/env python
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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 th... | mit | -138,347,469,473,975,420 | 30.376344 | 71 | 0.605552 | false | 3.731458 | false | false | false |
dokterbob/django-shopkit | shopkit/core/utils/fields.py | 1 | 2814 | # Copyright (C) 2010-2011 Mathijs de Bruin <mathijs@mathijsfietst.nl>
#
# This file is part of django-shopkit.
#
# django-shopkit 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 2, or (at... | agpl-3.0 | 908,442,149,540,644,500 | 32.105882 | 86 | 0.680526 | false | 4.043103 | false | false | false |
DataDog/integrations-core | nfsstat/datadog_checks/nfsstat/config_models/shared.py | 1 | 1331 | # (C) Datadog, Inc. 2021-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from __future__ import annotations
from typing import Optional
from pydantic import BaseModel, root_validator, validator
from datadog_checks.base.utils.functions import identity
from datadog_checks.base... | bsd-3-clause | 6,975,200,206,133,944,000 | 29.25 | 108 | 0.695718 | false | 3.880466 | false | false | false |
chroth/domainhog | main.py | 1 | 1860 | import sys
import logging
import data_handler
def update_data(context):
print 'Update data'
data_handler.update()
return 0, ""
def search(context):
if not data_handler.has_data():
context["logger"].debug("Data is missing")
update_data(context)
search_word = context['arguments'][1... | mit | -1,027,535,432,958,796,500 | 23.473684 | 78 | 0.585484 | false | 3.661417 | false | false | false |
Wikidata/QueryAnalysis | tools/QueryAnalysis.py | 1 | 7379 | import argparse
import calendar
from datetime import datetime
import glob
import os
import shutil
import subprocess
import sys
import gzip
import unifyQueryTypes
from utility import utility
import config
os.nice(19)
months = {'january': [1, 31],
'february': [2, 28],
'march': [3, 31],
'ap... | apache-2.0 | -7,126,092,825,844,727,000 | 40.460674 | 191 | 0.589511 | false | 3.997291 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/large_scale.py | 1 | 1436 | from __future__ import division, print_function, absolute_import
from scipy import array, arange, ones, sort, cos, pi, rand, \
set_printoptions, r_
from scipy.sparse.linalg import lobpcg
from scipy import sparse
from pylab import loglog, show, xlabel, ylabel, title
set_printoptions(precision=8,linewidth=90... | gpl-3.0 | 3,670,805,974,696,404,500 | 24.592593 | 102 | 0.627437 | false | 2.519298 | false | false | false |
MyRobotLab/pyrobotlab | home/moz4r/deprecated/Inmoov/InmoovScript_InmoovAI/INMOOV-AI_WeatherMap_Meteo.py | 1 | 2432 | global cur_temperature
global low_temperature
global high_temperature
global todayforecast
cur_temperature=0
low_temperature=0
high_temperature=0
todayforecast=0
def Meteo(Town_Parameter):
try:
if Town_Parameter=="0":
Town_Parameter=Town
print "http://api.openweathermap.org/data/2.5/weather?q=" + Town_Paramete... | apache-2.0 | 2,056,180,113,262,557,000 | 35.848485 | 292 | 0.659128 | false | 3.166667 | false | false | false |
kyprizel/certificate-transparency | python/ct/client/log_client.py | 1 | 39425 | """RFC 6962 client API."""
import base64
import json
import collections
from ct.client.db import database
from ct.crypto import verify
from ct.proto import client_pb2
import gflags
import httplib
import httplib2
import logging
import random
import urllib
import urlparse
from twisted.internet import defer
from twisted.... | apache-2.0 | -5,996,517,393,769,708,000 | 38.189861 | 98 | 0.576791 | false | 4.503655 | false | false | false |
sserrot/champion_relationships | venv/Lib/site-packages/IPython/extensions/sympyprinting.py | 1 | 1075 | """
**DEPRECATED**
A print function that pretty prints sympy Basic objects.
:moduleauthor: Brian Granger
Usage
=====
Once the extension is loaded, Sympy Basic objects are automatically
pretty-printed.
As of SymPy 0.7.2, maintenance of this extension has moved to SymPy under
sympy.interactive.ipythonprinting, any m... | mit | -2,789,169,341,588,938,000 | 32.59375 | 78 | 0.541395 | false | 5.512821 | false | false | false |
rhelmer/socorro-lib | socorro/external/postgresql/crontabber_state.py | 1 | 2109 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
import logging
from socorro.external.postgresql.base import PostgreSQLBase
from socorro.lib import datetime... | mpl-2.0 | 177,145,684,015,338,780 | 29.565217 | 78 | 0.497392 | false | 4.430672 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.