repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
Spoken-tutorial/spoken-website
events/notification.py
1
5034
from builtins import str from django.core.mail import EmailMultiAlternatives from django.template.loader import get_template from django.template import Context from events.models import * from django.http import HttpResponse, HttpResponseRedirect import time def nemail(request): plaintext = get_template('email-t...
gpl-3.0
6,011,057,536,180,010,000
54.318681
564
0.696464
false
sestrella/ansible
test/units/modules/network/fortios/test_fortios_firewall_profile_protocol_options.py
21
9947
# Copyright 2019 Fortinet, 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 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
8,671,566,389,978,949,000
38.947791
142
0.645622
false
sqlalchemy/sqlalchemy
test/dialect/oracle/test_reflection.py
3
27835
# coding: utf-8 from sqlalchemy import exc from sqlalchemy import FLOAT from sqlalchemy import ForeignKey from sqlalchemy import ForeignKeyConstraint from sqlalchemy import func from sqlalchemy import Identity from sqlalchemy import Index from sqlalchemy import inspect from sqlalchemy import INTEGER from sqlalchemy i...
mit
3,258,350,939,267,259,000
31.593677
79
0.53113
false
vitmod/enigma2-test
PowerTimer.py
1
37250
import os from boxbranding import getMachineBrand, getMachineName import xml.etree.cElementTree from datetime import datetime from time import ctime, time, strftime, localtime, mktime from bisect import insort from enigma import eActionMap, quitMainloop from Components.config import config from Components.TimerSanity...
gpl-2.0
4,261,229,192,709,240,300
37.010204
225
0.694013
false
bentley-historical-library/migration-tools
ead/agents/update_corpnames.py
2
1639
''' first things first, import what we need''' # lxml is a powerful xml document parser, you'll need to download it from lxml import etree # os provides a portable way of using operating system dependent functionality import os from os.path import join # tqdm adds a progress meter to loops, you'll need to install it...
cc0-1.0
-5,656,328,961,481,028,000
40
145
0.663819
false
dubourg/openturns
python/test/t_MarginalTransformationGradient_std.py
2
3551
#! /usr/bin/env python from __future__ import print_function from openturns import * from math import * TESTPREAMBLE() RandomGenerator.SetSeed(0) try: coll1 = DistributionCollection(0) coll1.add(Normal(1.0, 2.5)) coll1.add(Gamma(1.5, 3.0)) pointLow = NumericalPoint(0) pointLow.add(coll1[0].comput...
gpl-3.0
658,573,793,307,330,400
46.346667
82
0.710786
false
Architektor/PySnip
venv/lib/python2.7/site-packages/twisted/conch/test/test_window.py
50
2115
""" Tests for the insults windowing module, L{twisted.conch.insults.window}. """ from twisted.trial.unittest import TestCase from twisted.conch.insults.window import TopWindow, ScrolledArea, TextOutput class TopWindowTests(TestCase): """ Tests for L{TopWindow}, the root window container class. """ ...
gpl-3.0
-4,307,036,491,197,730,300
30.567164
79
0.643499
false
Mk555/Packet-Sniffer
main.py
1
3549
#!/usr/bin/python ##################################### # Libs ##################################### from scapy.all import * import getpass import argparse import os import sys import time import sqlite3 as sqlite ##################################### # Arguments ##################################### # Get the curr...
gpl-2.0
-1,599,799,470,134,683,600
16.745
148
0.524655
false
rubendibattista/ovh-python-email-manager
ovhem/em.py
1
5365
import ovh import ConfigParser import string import warnings from random import choice from prettytable import PrettyTable class EmailManager : ''' This class uses the ovh Python API and provide some functionalities to interact with email accounts Arguments: niceoutput Optional....
bsd-2-clause
-799,074,262,545,124,100
37.597122
103
0.522274
false
discourse-lab/pocores
src/pocores/preferences.py
1
1856
#!/usr/bin/env python # -*- coding: utf-8 -*- from discoursegraphs.readwrite.conll import traverse_dependencies_up def check_parallelism(pocores, antecedent_id, anaphora_id, deprel_attr=None): """ Checks syntactical role parallelism between two given words. Parameters ---------...
agpl-3.0
76,191,262,284,637,330
26.294118
85
0.633621
false
acabey/flash-dump-tool
lib/patcher.py
1
3173
#!/usr/bin/env python3 import struct import sys import logging logging.basicConfig() LOGGER = logging.getLogger('patcher') def patch(originaldata, patchset): """ Apply KXAM patches to a target Patch format 4 byte offset 4 byte count 4 byte * count patch payload :param originaldat...
gpl-3.0
-7,047,104,009,182,040,000
29.219048
133
0.626536
false
Swiftea/Swiftea-Crawler
crawler/crawling/searches.py
2
2692
#!/usr/bin/env python3 """Define several functions SiteInformations.""" from urllib.parse import urlparse from re import compile as compile_regex from crawler.swiftea_bot.data import BAD_EXTENTIONS, DIR_STATS regex = compile_regex(r'(\w+|\d+)') # used in site_informations.py def clean_text(text): """Clean up ...
gpl-3.0
-6,023,395,482,706,254,000
21.813559
96
0.643388
false
alishakiba/kaggle_diabetic
blend.py
4
7140
"""Blend features extracted with Conv Nets and make predictions/submissions.""" from __future__ import division, print_function from datetime import datetime from glob import glob import click import numpy as np import pandas as pd import theano from lasagne import init from lasagne.updates import adam from lasagne.no...
mit
3,866,865,463,629,590,500
35.615385
79
0.584594
false
mne-tools/mne-tools.github.io
0.21/_downloads/e9c2029d538a27854bee8b41e5e8eca3/plot_limo_data.py
3
13302
""" .. _ex-limo-data: ============================================================= Single trial linear regression analysis with the LIMO dataset ============================================================= Here we explore the structure of the data contained in the `LIMO dataset`_. This example replicates and extend...
bsd-3-clause
1,804,015,382,770,537,700
40.69906
95
0.604947
false
bhdouglass/agui
agui/backends/pyside/extras/message.py
1
1667
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2014 Brian Douglass bhdouglass@gmail.com # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Softwa...
gpl-3.0
-8,745,910,696,645,562,000
44.054054
153
0.709058
false
TsarFox/chandere2
chandere/errors.py
2
1423
# Copyright (C) 2017 Jakob Kreuze, All Rights Reserved. # # This file is part of Chandere. # # Chandere 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) an...
gpl-3.0
-8,284,206,975,727,391,000
36.447368
74
0.702038
false
mapillary/OpenSfM
opensfm/actions/export_geocoords.py
2
5081
import logging import os import numpy as np import pyproj from opensfm import io from opensfm.dataset import DataSet, UndistortedDataSet logger = logging.getLogger(__name__) def run_dataset( data: DataSet, proj, transformation, image_positions, reconstruction, dense, output ): """Export reconstructions in ...
bsd-2-clause
220,917,560,449,082,400
35.292857
89
0.596339
false
brownhead/galah
galah/base/crypto/passcrypt.py
3
2374
from collections import namedtuple import os import pbkdf2 # The known algorithms algorithms = ("pbkdf2", ) # A hash along with all the information used to create it HashSeal = namedtuple("HashSeal", ("hash", "algorithm", "salt", "cost_factor")) def hash(password, algorithm, salt, cost_factor, **kwargs): """ ...
mit
-2,179,239,984,026,829,800
27.95122
80
0.609099
false
maas/maas
src/maasserver/forms/script.py
1
24637
# Copyright 2017-2019 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Script form.""" from datetime import timedelta import json from json import JSONDecodeError import pipes import re from django.core.exceptions import ValidationError fro...
agpl-3.0
-8,405,805,228,826,134,000
35.124633
81
0.507367
false
eskwire/evesrp
evesrp/migrate/versions/5795c29b2c7a_.py
2
2180
"""Change RelativeModifier.value to a Numeric/Decimal Revision ID: 5795c29b2c7a Revises: 19506187e7aa Create Date: 2014-07-23 14:43:45.748696 """ # revision identifiers, used by Alembic. revision = '5795c29b2c7a' down_revision = '19506187e7aa' from alembic import op import sqlalchemy as sa from sqlalchemy.sql impor...
bsd-2-clause
-8,314,331,209,944,756,000
37.245614
76
0.647706
false
jakobkolb/MayaSim
Experiments/mayasim_X0_old_video.py
1
7670
""" This experiment is dedicated to look at single runs with different parameters for ecosystem and agriculture benefits and make videos from them to grasp what actually happens. In addition, I would like to plot some macro trajectories of these runs and compare them to see, if there are some more signatures, that can...
gpl-3.0
-1,500,722,050,968,249,300
29.68
79
0.580443
false
thismachinechills/cheapbook
send.py
1
1217
from email.message import EmailMessage from smtplib import SMTP from base import SENDER_EMAIL, EMAIL_USERNAME, SMTP_SERVER, EMAIL_PASSWORD, SMTP_PORT, MacBook, RECEIVER_EMAIL def create_msg(recv: str, subject: str, body: str, sender: str=SENDER_EMAIL) -> EmailMessage: msg = EmailMessage() msg['To'] = recv ...
agpl-3.0
-446,865,695,134,209,000
28.682927
110
0.64585
false
vertix/deep_rl
game2048.py
1
3288
import numpy as np import matplotlib.pyplot as plt from matplotlib import colors import random import sys import theano import base class Game2048(base.Environment): def __init__(self, seed=None): self._state = np.zeros([4, 4], dtype=theano.config.floatX) # Set up the start position self._state[1, 1] = ...
mit
-2,232,923,184,935,911,200
25.95082
78
0.545012
false
formiano/enigma2-4.4
lib/python/Components/TimerList.py
6
6715
from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_TOP, RT_VALIGN_BOTTOM, getDesktop from HTMLComponent import HTMLComponent from GUIComponent import GUIComponent from Tools.FuzzyDate import FuzzyTime from Tools.LoadPixmap import LoadPixmap from timer import Time...
gpl-2.0
-493,889,607,817,011,000
36.305556
140
0.689799
false
vityurkiv/Ox
modules/tensor_mechanics/tests/drucker_prager/small_deform3.py
23
3585
#!/usr/bin/env python import os import sys import numpy as np import matplotlib.pyplot as plt def expected(scheme, sqrtj2): cohesion = 10 friction_degrees = 35 tip_smoother = 8 friction = friction_degrees * np.pi / 180.0 if (scheme == "native"): aaa = cohesion bbb = np.tan(fricti...
lgpl-2.1
-6,270,647,653,232,130,000
33.805825
193
0.600279
false
ghickman/django
tests/model_inheritance/tests.py
19
17422
from __future__ import unicode_literals from operator import attrgetter from django.core.exceptions import FieldError, ValidationError from django.core.management import call_command from django.db import connection from django.test import TestCase, TransactionTestCase from django.test.utils import CaptureQueriesCont...
bsd-3-clause
3,465,780,177,792,821,000
37.20614
97
0.602744
false
mcmaxwell/idea_digital_agency
idea/idea/settings.py
1
6618
""" Django settings for skelet project. Generated by 'django-admin startproject' using Django 1.8.14. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build path...
mit
-6,166,163,307,230,685,000
23.879699
120
0.573738
false
lowtalker/splunk-sdk-python
tests/test_role.py
2
4105
#!/usr/bin/env python # # Copyright 2011-2014 Splunk, 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...
apache-2.0
2,148,482,591,509,390,000
35.651786
98
0.661632
false
hrayr-artunyan/shuup
shuup/campaigns/utils/sales_range.py
2
1993
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from django.db.models import Q, Sum from shuup.core.models import Payment ...
agpl-3.0
-7,999,467,114,643,379,000
34.589286
92
0.680883
false
google/rekall
rekall-core/rekall/plugins/darwin/misc.py
1
10140
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # 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 v...
gpl-2.0
2,952,863,158,964,822,500
35.344086
84
0.60286
false
ProteinDF/ProteinDF_pytools
scripts/pdf-info-orb.py
1
2823
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2014 The ProteinDF development team. # see also AUTHORS and README if provided. # # This file is a part of the ProteinDF software package. # # The ProteinDF is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-3.0
1,469,378,510,724,045,000
31.448276
71
0.563939
false
thecsapprentice/phoenix-plumage-client
RenderNode.py
1
14936
#!/usr/bin/env python import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('pika').setLevel(logging.INFO) LOG_FORMAT = ('%(levelname) -15s %(asctime)s %(name) -30s %(funcName) ' '-35s %(lineno) -5d: %(message)s') LOGGER = logging.getLogger("Manager") NODE_LOGGER = logging.getLogger("...
bsd-3-clause
4,707,114,049,887,521,000
41.674286
129
0.470809
false
axptwig/Wu-Bernstein-Distributed-Systems-Implementation
time_table.py
2
1170
import json # A class to represent the time table's held by each node class TimeTable(object): def __init__(self, dim): self.dim = dim self.init_table() def init_table(self): self.table = [] for _ in range(self.dim): self.table.append([0] * self.dim) # When syn...
gpl-2.0
-8,378,801,963,301,662,000
27.560976
75
0.563248
false
burnpanck/chaco
docs/source/sphinxext/docscrape.py
5
14245
"""Extract reference documentation from the NumPy source tree. """ import inspect import textwrap import re import pydoc from StringIO import StringIO from warnings import warn class Reader(object): """A line-based string reader. """ def __init__(self, data): """ Parameters -----...
bsd-3-clause
-3,429,747,056,001,722,400
28.677083
80
0.471955
false
scmsqhn/changhongmall
app/mylog/logtools.py
1
1872
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2017-08-21 17:03:43 # @Author : qin_hai_ning (haining.qin@changhong.com) # @Link : https://www.triboys.com/ # @Version : $Id$ import os import time import datetime import json import traceback def p(i): print "[x] ", str(i) print "\r\n"...
mit
-7,137,370,883,715,607,000
20.285714
103
0.637286
false
spapadim/OctoPrint
src/octoprint/filemanager/__init__.py
7
15591
# coding=utf-8 from __future__ import absolute_import __author__ = "Gina Häußge <osd@foosel.net>" __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" import logging import os im...
agpl-3.0
2,879,504,384,667,062,000
36.745763
189
0.718584
false
aisk/grumpy
compiler/stmt_test.py
1
19368
# coding=utf-8 # Copyright 2016 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 app...
apache-2.0
-3,171,470,073,996,481,000
29.939297
97
0.572955
false
rr-/szurubooru
server/szurubooru/tests/api/test_comment_deleting.py
1
2270
import pytest from szurubooru import api, db, errors, model from szurubooru.func import comments @pytest.fixture(autouse=True) def inject_config(config_injector): config_injector( { "privileges": { "comments:delete:own": model.User.RANK_REGULAR, "comments:delet...
gpl-3.0
2,521,386,937,692,045,300
30.971831
78
0.644934
false
khalibartan/Antidote-DM
Antidotes DM/youtube_dl/extractor/srgssr.py
7
6606
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, parse_iso8601, qualities, ) class SRGSSRIE(InfoExtractor): _VALID_URL = r'(?:https?://tp\.srgssr\.ch/p(?:/[^/]+)+\?urn=urn|srgssr):(?P<bu>srf|rts|rsi|rtr|swi):(?:...
gpl-2.0
6,193,893,812,252,663,000
40.803797
168
0.534746
false
alirizakeles/zato
code/zato-common/src/zato/common/ipc/__init__.py
1
3629
# -*- coding: utf-8 -*- """ Copyright (C) 2016, Zato Source s.r.o. https://zato.io Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import os from datetime import datetime from tempfile import gettempdir ...
gpl-3.0
-7,792,049,101,765,687,000
32.601852
130
0.542574
false
diegocortassa/TACTIC
src/context/client/tactic-api-python-4.0.api04/Lib/xmllib.py
25
35795
"""A parser for XML, using the derived class as static DTD.""" # Author: Sjoerd Mullender. import re import string import warnings warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning, 2) del warnings version = '0.3' class Error(RuntimeError): pa...
epl-1.0
-8,053,630,126,297,608,000
36.489247
109
0.471323
false
proyectofedora-infra/kickstart-fedora-online
setup.py
1
2320
#!/usr/bin/env python # -*- coding: utf-8 -*- # # setup.py # # Copyright 2014 Eduardo Echeverria <echevemaster@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either versio...
gpl-3.0
-481,605,024,021,190,140
30.351351
85
0.678879
false
Atlas-Sailed-Co/oppia
extensions/rules/music_phrase.py
20
4026
# coding: utf-8 # # Copyright 2013 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 ...
apache-2.0
2,392,818,603,576,730,000
34.946429
83
0.63388
false
Lillevik/python_irc_bot
functions.py
1
3919
import requests, json, datetime, threading from datetime import datetime import sqlite3 def get_name(msg): try: if "PRIVMSG" in msg[0]: return msg[0].split('!')[0].split(':')[1] except IndexError: return "Empty." def get_message(msg): try: if "PRIVMSG" in msg[0]: ...
gpl-3.0
1,756,707,241,105,340,000
30.055556
158
0.582673
false
reillysiemens/pianodb
pianodb/routes.py
1
1802
import falcon import msgpack from pianodb.pianodb import update_db class ValidatorComponent: def process_response(self, req, resp, resource): # Verify authentication if req.get_header('X-Auth-Token') != resource.token: raise falcon.HTTPUnauthorized( title='Authenticati...
isc
5,324,986,685,758,568,000
30.614035
80
0.588235
false
serverdensity/sd-agent-core-plugins
etcd/check.py
1
9487
# (C) Datadog, Inc. 2015-2017 # (C) Cory G Watson <gphat@keen.io> 2014-2015 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # 3rd party import requests # project from checks import AgentCheck from config import _is_affirmative from util import headers class Etcd(AgentCheck): DEFAULT...
bsd-3-clause
979,046,649,356,276,500
40.069264
124
0.578054
false
SnakeJenny/TensorFlow
tensorflow/python/ops/math_ops_test.py
24
16171
# 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
3,454,466,222,381,870,000
36.871194
80
0.617958
false
brandsoulmates/incubator-airflow
airflow/contrib/operators/dataflow_operator.py
22
9090
# -*- coding: utf-8 -*- # # 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
4,525,378,211,886,974,500
37.680851
90
0.624092
false
promptworks/keystone
keystone/common/sql/migrate_repo/versions/064_drop_user_and_group_fk.py
3
1640
# 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
-6,645,443,029,560,701,000
35.444444
75
0.685366
false
android-ia/platform_external_chromium_org
tools/perf/measurements/smoothness.py
27
1633
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from metrics import power from measurements import smoothness_controller from telemetry.page import page_test class Smoothness(page_test.PageTest): def _...
bsd-3-clause
4,294,614,156,108,376,000
34.5
78
0.746479
false
phobson/statsmodels
statsmodels/genmod/tests/results/results_glm.py
4
286016
""" Results for test_glm.py. Hard-coded from R or Stata. Note that some of the remaining discrepancy vs. Stata may be because Stata uses ML by default unless you specifically ask for IRLS. """ import numpy as np from statsmodels.compat.python import asbytes from . import glm_test_resids import os from statsmodels.api...
bsd-3-clause
4,131,202,423,416,573,400
68.522606
101
0.553892
false
lebabouin/CouchPotatoServer-develop
couchpotato/core/notifications/core/main.py
6
7961
from couchpotato import get_session from couchpotato.api import addApiView, addNonBlockApiView from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import tryInt, splitString from couchpotato.core.logger import CPLog from c...
gpl-3.0
8,934,798,980,605,338,000
28.161172
131
0.551941
false
richard-ma/search-engine-script-framework
modules/SEmojeek.py
1
1142
# -*- coding: utf-8 -*- # bing search engine import requests import re import sys import time from urllib import quote from searchEngine import SearchEngine class SEmojeek(SearchEngine): def __init__(self): super(SEmojeek, self).__init__() self.engineName = "mojeek-co-uk" # self.url = "...
mit
-1,881,975,293,416,817,200
27.606061
100
0.601695
false
gwAdvNet2015/adv-net-samples
sdn/pox/pox/lib/pxpcap/__init__.py
42
11880
# Copyright 2011,2013 James McCauley # # 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 ...
mit
4,501,091,839,821,451,300
25.756757
84
0.603704
false
kshedstrom/pyroms
pyroms/pyroms/remapping/sta2z.py
1
2284
# encoding: utf-8 import numpy as np import _interp import pdb def sta2z(var, grd, grdz, Cpos='rho', srange=None, \ spval=1e37, mode='linear'): """ varz = roms2z(var, grd, grdz) optional switch: - Cpos specify vertical grid type - srange ...
bsd-3-clause
9,219,616,154,942,931,000
27.197531
75
0.532837
false
caesar2164/edx-platform
lms/djangoapps/verify_student/views.py
9
61095
""" Views for the verification flow """ import datetime import decimal import json import logging import urllib from pytz import UTC from ipware.ip import get_ip from django.conf import settings from django.contrib.auth.decorators import login_required from django.core.mail import send_mail from django.core.urlresolv...
agpl-3.0
5,973,419,883,898,226,000
39.009823
119
0.633538
false
wooga/airflow
tests/providers/papermill/operators/test_papermill.py
5
1718
# # 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 # "License"); you may not...
apache-2.0
-3,563,179,610,061,426,700
35.553191
77
0.681607
false
sarvex/tensorflow
tensorflow/python/keras/optimizer_v2/rmsprop.py
6
12979
# Copyright 2020 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
-828,736,742,712,696,600
42.408027
80
0.648509
false
adrienverge/yamllint
tests/test_linter.py
1
2051
# -*- coding: utf-8 -*- # Copyright (C) 2016 Adrien Vergé # # 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 pro...
gpl-3.0
5,439,690,419,335,600,000
34.070175
72
0.650825
false
hasteur/edit_request_aging
families/krefeldwiki_family.py
10
1630
# -*- coding: utf-8 -*- import family # The city wiki of Krefeld, Germany, Europe. class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = 'krefeldwiki' self.langs = { 'de': 'krefeldwiki.de', } self.namespaces[4] = { ...
gpl-3.0
4,674,809,516,235,590,000
21.638889
67
0.477914
false
MiniSEC/GRR_clone
tools/config_updater.py
1
17442
#!/usr/bin/env python """Util for modifying the GRR server configuration.""" import argparse import ConfigParser import getpass import os # importing readline enables the raw_input calls to have history etc. import readline # pylint: disable=unused-import import sys # pylint: disable=unused-import,g-bad-import-ord...
apache-2.0
-6,693,416,173,666,864,000
36.189765
80
0.698486
false
HBEE/odoo-addons
sale_order_mail_product_attachment/sale.py
3
1871
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import netsvc from openerp.osv import...
agpl-3.0
-1,962,823,167,135,322,400
54.029412
142
0.572421
false
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/openstack/tests/unit/cluster/v1/test_proxy.py
3
1790
# 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...
mit
-6,791,646,774,791,227,000
37.913043
77
0.691061
false
kennedyshead/home-assistant
tests/components/homekit/test_type_remote.py
5
4403
"""Test different accessory types: Remotes.""" from homeassistant.components.homekit.const import ( ATTR_KEY_NAME, ATTR_VALUE, EVENT_HOMEKIT_TV_REMOTE_KEY_PRESSED, KEY_ARROW_RIGHT, ) from homeassistant.components.homekit.type_remotes import ActivityRemote from homeassistant.components.remote import ( ...
apache-2.0
-3,007,216,356,524,634,600
28.75
79
0.639564
false
AkademieOlympia/sympy
sympy/functions/special/tests/test_elliptic_integrals.py
97
5587
from sympy import (S, Symbol, pi, I, oo, zoo, sin, sqrt, tan, gamma, atanh, hyper, meijerg, O) from sympy.functions.special.elliptic_integrals import (elliptic_k as K, elliptic_f as F, elliptic_e as E, elliptic_pi as P) from sympy.utilities.randtest import (test_derivative_numerically as td, ...
bsd-3-clause
-7,884,247,484,898,591,000
35.756579
83
0.476642
false
ghchinoy/tensorflow
tensorflow/python/kernel_tests/reverse_sequence_op_test.py
22
6952
# 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
4,702,862,580,759,777,000
35.397906
80
0.586306
false
sebrandon1/nova
nova/tests/unit/virt/hyperv/test_driver.py
3
20257
# Copyright 2015 Cloudbase Solutions SRL # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
-5,678,939,997,001,641,000
42.75162
79
0.669349
false
drayanaindra/shoop
shoop/admin/breadcrumbs.py
6
3358
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.utils.encoding import f...
agpl-3.0
5,737,444,948,274,382,000
33.265306
106
0.612865
false
qutebrowser/qutebrowser
qutebrowser/commands/__init__.py
2
1700
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free S...
gpl-3.0
8,470,717,131,738,291,000
43.736842
79
0.734118
false
rr-/szurubooru
server/szurubooru/tests/func/test_mime.py
1
3869
import pytest from szurubooru.func import mime @pytest.mark.parametrize( "input_path,expected_mime_type", [ ("mp4.mp4", "video/mp4"), ("webm.webm", "video/webm"), ("flash.swf", "application/x-shockwave-flash"), ("png.png", "image/png"), ("jpeg.jpg", "image/jpeg"), ...
gpl-3.0
-2,750,532,537,537,543,700
27.036232
75
0.551564
false
2013Commons/HUE-SHARK
desktop/core/ext-py/Babel-0.9.6/babel/messages/tests/mofile.py
61
2585
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software cons...
apache-2.0
6,890,375,844,375,850,000
38.390625
88
0.65764
false
DavidBord/mongoengine
tests/fields/geo.py
23
16272
# -*- coding: utf-8 -*- import sys sys.path[0:0] = [""] import unittest from mongoengine import * from mongoengine.connection import get_db __all__ = ("GeoFieldTest", ) class GeoFieldTest(unittest.TestCase): def setUp(self): connect(db='mongoenginetest') self.db = get_db() def _test_for_e...
mit
-2,686,738,127,616,651,300
40.723077
152
0.596731
false
GuessWhoSamFoo/pandas
pandas/tests/generic/test_label_or_level_utils.py
2
11936
import pytest from pandas.core.dtypes.missing import array_equivalent import pandas as pd import pandas.util.testing as tm # Fixtures # ======== @pytest.fixture def df(): """DataFrame with columns 'L1', 'L2', and 'L3' """ return pd.DataFrame({'L1': [1, 2, 3], 'L2': [11, 12, 13], ...
bsd-3-clause
-540,507,303,124,389,300
28.399015
74
0.629021
false
pradeep-aradhya/security_monkey
security_monkey/alerter.py
9
3671
# Copyright 2014 Netflix, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-8,288,664,222,119,310,000
39.788889
128
0.658404
false
KendyllD/boukenda-project
makahiki/apps/widgets/resource_scoreboard/views.py
5
1858
"""Handle the rendering of the energy scoreboard widget.""" import datetime from apps.managers.challenge_mgr import challenge_mgr from apps.managers.resource_mgr import resource_mgr from apps.widgets.resource_goal import resource_goal def supply(request, page_name): """Supply the view_objects content.""" _ =...
mit
-7,291,200,034,319,812,000
37.708333
98
0.67761
false
tholoien/empiriciSN
empiriciSN/tests/test_empiriciSN.py
1
2967
""" Test code for empiriciSN class. """ import unittest import numpy as np import empiriciSN import urllib import os class EmpiricistTestCase(unittest.TestCase): "TestCase class for Empiricist class." def setUp(self): """ Set up each test with a new empiriciSN object with existing model. ...
mit
-7,696,211,258,160,001,000
34.321429
84
0.597236
false
Dave667/service
plugin.video.youtube/YouTubePlayer.py
2
22145
''' YouTube plugin for XBMC Copyright (C) 2010-2012 Tobias Ussing And Henrik Mosgaard Jensen 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 ...
gpl-2.0
-2,177,420,282,263,230,700
36.281145
152
0.53529
false
arthurprs/sucredb
scripts/sanity.py
1
4060
import subprocess import time import sys import random from itertools import chain from redis import StrictRedis from rediscluster import StrictRedisCluster from funcy import retry from collections import defaultdict import shutil VERBOSE = False class Instance(object): BIND = "127.0.0.1" PORT = 6379 FPO...
mit
-6,592,725,881,096,650,000
26.808219
79
0.543103
false
aboood40091/Miyamoto
puzzle.py
2
160869
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Puzzle NSMBU # This is Puzzle 0.6, ported to Python 3 & PyQt5, and then ported to support the New Super Mario Bros. U tileset format. # Puzzle 0.6 by Tempus; all improvements for Python 3, PyQt5 and NSMBU by RoadrunnerWMC and AboodXD import json import os import os.pat...
gpl-3.0
-3,503,609,789,299,445,000
33.373718
389
0.540328
false
nathanielvarona/airflow
airflow/contrib/operators/docker_swarm_operator.py
1
1181
# # 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 # "License"); you may not...
apache-2.0
-4,171,271,246,935,747,000
39.724138
99
0.77138
false
jsilhan/dnf
dnf/cli/completion_helper.py
3
6949
#!/usr/bin/env python # # This file is part of dnf. # # Copyright 2015 (C) Igor Gnatenko <i.gnatenko.brain@gmail.com> # Copyright 2016 (C) 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 Fou...
gpl-2.0
3,336,101,952,810,042,400
33.919598
112
0.660095
false
mishfit/ZeroNet
src/lib/websocket/_logging.py
16
1926
""" websocket - WebSocket client library for Python Copyright (C) 2010 Hiroki Ohtani(liris) 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, ...
gpl-2.0
1,187,330,186,203,141,600
25.027027
71
0.67757
false
swordmaster2k/robotics
framework/model/simulated_robot.py
1
2475
import time from .robot import Robot from framework.event.events import ScanResult from framework.event.events import OdometryReport ''' A generic Robot class which (may) represent(s) a hardware robot that implements the communications interface defined by the robonav tool. It is possible to use this class for simul...
gpl-3.0
3,415,311,852,639,462,000
21.098214
75
0.633535
false
wadadaaa/marta
docs/conf.py
1
7775
# -*- coding: utf-8 -*- # # marta documentation build configuration file, created by # sphinx-quickstart. # # 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 # autogenerated file. # # All configuration values have a d...
bsd-3-clause
2,505,709,013,565,696,500
30.734694
80
0.694662
false
jmartinm/inspire-next
inspire/dojson/hep/fields/bd3xx.py
5
1291
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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...
gpl-2.0
6,874,719,130,527,898,000
29.023256
77
0.711851
false
synctree/synctree-awsebcli
ebcli/lib/elasticbeanstalk.py
2
18489
# Copyright 2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
apache-2.0
-2,746,825,408,057,453,000
32.255396
78
0.599708
false
zurwolf/dotfiles
home/.ipython/profile_base16-railscasts-dark/ipython_notebook_config.py
1
24710
# Configuration file for ipython-notebook. c = get_config() #------------------------------------------------------------------------------ # NotebookApp configuration #------------------------------------------------------------------------------ # NotebookApp will inherit config from: BaseIPythonApplication, Appli...
mit
375,358,943,412,812,800
36.326284
411
0.695629
false
soarpenguin/ansible
lib/ansible/modules/system/beadm.py
9
11657
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Adam Števko <adam.stevko@gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.0', ...
gpl-3.0
1,704,357,489,766,518,000
26.618483
92
0.532218
false
terbolous/CouchPotatoServer
libs/tornado/web.py
12
120144
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
gpl-3.0
4,388,952,743,047,808,500
38.62533
109
0.599015
false
kierangraham/dotfiles
Sublime/Packages/SublimeCodeIntel/libs/inflector/Rules/Spanish.py
8
7629
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2006 Bermi Ferrer Martinez # info at bermi dot org # See the end of this file for the free software, open source license # (BSD-style). import re from .Base import Base class Spanish (Base): """ Inflector for pluralize and singularize Spanish nou...
bsd-2-clause
6,912,629,925,971,030,000
40.392265
118
0.520155
false
David-Amaro/bank-payment
account_banking_pain_base/models/banking_export_pain.py
11
19673
# -*- encoding: utf-8 -*- ############################################################################## # # PAIN Base module for Odoo # Copyright (C) 2013-2015 Akretion (http://www.akretion.com) # @author: Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can redistribu...
agpl-3.0
-2,970,348,099,814,226,000
45.289412
79
0.564073
false
BranislavBajuzik/1.12-to-1.13-by-TheAl_T
1_12to1_13aMCEditPlugin.py
1
4918
# MCEdit Filter by TheAl_T # planetminecraft.com/member/theal_t # Block data value -> block state database by: Onnowhere youtube.com/onnowhere2 import json from pymclevel import TAG_String try: converter = __import__("1_12to1_13") except ImportError: converter = False displayName = "1.12 to 1.13 ...
gpl-3.0
-589,329,938,607,469,300
48.183673
211
0.53172
false
mikefitz888/owtf
framework/http/wafbypasser/wafbypasser.py
3
20838
#!/bin/python from tornado.httputil import HTTPHeaders from tornado.httpclient import HTTPRequest from framework.http.wafbypasser.core.hpp_lib import asp_hpp, param_overwrite from framework.http.wafbypasser.core.placeholder_length import find_length from framework.http.wafbypasser.core.detection import * from framework...
bsd-3-clause
-6,764,156,412,355,484,000
46.795872
97
0.434591
false
gooddata/openstack-nova
nova/policies/security_groups.py
3
2297
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
apache-2.0
-8,075,100,577,388,602,000
28.831169
78
0.602525
false
chrys87/fenrir
src/fenrirscreenreader/commands/onCursorChange/25000-word_echo_type.py
3
2102
#!/bin/python # -*- coding: utf-8 -*- # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. from fenrirscreenreader.core import debug from fenrirscreenreader.utils import word_utils import string class command(): def __init__(self): pass def initialize(self, environment)...
lgpl-3.0
7,721,297,552,750,031,000
34.241379
114
0.542341
false
haizawa/odenos
src/main/python/org/o3project/odenos/core/component/logic.py
3
50794
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
apache-2.0
5,288,327,957,740,424,000
37.714939
89
0.508013
false
xoddark/libretro-arxlibertatis
scripts/cpplint.py
3
137622
#!/usr/bin/env python # # Note: this file has been adjusted to fit the Arx Libertatis project: # - adjusted include guard style # - hacked so that build/include doesn't complain about #include "Configure.h" lines # - Allow lines that are only whitespace. # - Remove 80-char line limit, keep 100 char limit. # - No s...
gpl-3.0
-4,753,485,601,099,081,000
38.70629
132
0.650187
false
hfinucane/ansible
lib/ansible/plugins/connection/ssh.py
5
28512
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2015 Abhijit Menon-Sen <ams@2ndQuadrant.com> # # This file is part of Ansible # # Ansible 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, eithe...
gpl-3.0
-6,112,751,134,697,203,000
40.867841
246
0.58435
false
jmacmahon/invenio
modules/bibauthorid/lib/bibauthorid_scheduler.py
3
5558
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012 CERN. # # Invenio 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...
gpl-2.0
5,470,678,222,827,662,000
31.502924
105
0.550558
false
dilgerma/compose
compose/service.py
4
29748
from __future__ import unicode_literals from __future__ import absolute_import from collections import namedtuple import logging import re import os import sys from operator import attrgetter import six from docker.errors import APIError from docker.utils import create_host_config, LogConfig from docker.utils.ports im...
apache-2.0
-3,282,623,253,966,092,000
31.475983
134
0.568105
false