repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
looker/sentry
src/sentry/models/file.py
1
14550
""" sentry.models.file ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os import six import mmap import tempfile from hashlib import sha1 from uuid import uuid4 from concurre...
bsd-3-clause
-434,740,297,523,743,400
29
95
0.564948
false
google/makani
avionics/bootloader/program.py
1
27768
#!/usr/bin/python # Copyright 2020 Makani Technologies 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 applicabl...
apache-2.0
-7,311,248,603,513,480,000
40.693694
80
0.639081
false
jopohl/urh
src/urh/plugins/ZeroHide/ZeroHideAction.py
1
2253
from PyQt5.QtWidgets import QUndoCommand from urh.signalprocessing.ProtocolAnalyzer import ProtocolAnalyzer class ZeroHideAction(QUndoCommand): def __init__(self, protocol: ProtocolAnalyzer, following_zeros: int, view: int, zero_hide_offsets: dict): super().__init__() self.protocol = protocol ...
gpl-3.0
585,459,217,494,885,800
31.666667
109
0.556147
false
WilsonKiggundu/HospitalManagement_InformationSystem
hospitalmanager/app/migrations/0001_initial.py
1
1041
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-16 16:26 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
gpl-3.0
8,859,425,243,024,919,000
33.7
121
0.614793
false
aminotti/yameo
lib/httpmethod.py
1
11707
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Anthony Minotti <anthony@minotti.cool>. # # # This file is part of Yameo framework. # # Yameo framework is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
7,189,659,849,950,701,000
39.50519
158
0.594396
false
eayunstack/oslo.messaging
tests/test_opts.py
1
1740
# Copyright 2014 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
-172,664,514,099,144,160
31.222222
78
0.644828
false
alexei-matveev/ccp1gui
interfaces/cmlatominfo.py
1
4268
# # This file is part of the CCP1 Graphical User Interface (ccp1gui) # # (C) 2002-2007 CCLRC Daresbury Laboratory # # 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 ...
gpl-2.0
4,901,287,225,231,356,000
38.88785
85
0.6209
false
dyf102/Gomoku-online
server/model/game.py
1
4356
import uuid EMPTY = 0 BLACK = 1 WHITE = -1 STATUS_EMPTY = 11 STATUS_WAITING = 12 STATUS_FIGHTING = 13 STATUS_SET = (STATUS_EMPTY, STATUS_WAITING, STATUS_FIGHTING) class Game(object): def __init__(self, host_id, host_name, guest_id=None, guest_name=None): self.host_id = host_id self.host_name = ...
apache-2.0
-2,934,371,076,088,916,500
29.25
76
0.463728
false
FluentTradeTechnologies/netconfigit
modules/devices/fortinet.py
1
4074
# -*- coding: utf-8 -*- """ Netconfigit Fortinet device class """ __license__ = "MIT License" __author__ = "Eric Griffin" __copyright__ = "Copyright (C) 2014, Fluent Trade Technologies" __version__ = "1.1" import logging import os import time logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class...
mit
-1,249,435,471,950,509,800
33.243697
104
0.583702
false
ajmarks/gymnast
gymnast/pdf_elements/pdf_page.py
1
6340
""" PDF Document Page and Page Node elements """ import six from .pdf_element import PdfElement from ..exc import PdfParseError, PdfError from ..pdf_types import PdfType, PdfRaw, PdfArray from ..pdf_parser import PdfParser from ..pdf_operation import PdfOperation def parse_page(obj): """Parse...
mit
-6,712,480,742,190,932,000
35.647399
84
0.594322
false
gutow/sagenb_slickgrid
sagenb/notebook/cell.py
1
82283
# -*- coding: utf-8 -*- """ A Cell A cell is a single input/output block. Worksheets are built out of a list of cells. """ ########################################################################### # Copyright (C) 2006 William Stein <wstein@gmail.com> # # Distributed under the terms of the GNU General Public ...
gpl-3.0
-4,787,506,408,650,216,000
30.904152
153
0.513361
false
nestauk/gtr
tests/test_publications.py
1
1385
import responses import gtr @responses.activate def test_publication(): "Searching for publications by id works" with open("tests/results.json") as results: body = results.read() responses.add( responses.GET, "http://gtr.rcuk.ac.uk/gtr/api/outcomes/publications/glaciers", ...
apache-2.0
6,634,522,533,200,286,000
27.265306
77
0.510469
false
JulyKikuAkita/PythonPrac
cs15211/Subsets.py
1
7010
__source__ = 'https://leetcode.com/problems/subsets/' # https://github.com/kamyu104/LeetCode/blob/master/Python/subsets.py # Time: O(n * 2^n) # Space: O(1) # Brute Force Search # # Description: Leetcode # 78. Subsets # # Given a set of distinct integers, S, return all possible subsets. # # Note: # Elements in a subset...
apache-2.0
-4,645,692,306,403,418,000
26.598425
154
0.506705
false
debalance/hp
hp/core/urls.py
1
1430
# -*- coding: utf-8 -*- # # This file is part of the jabber.at homepage (https://github.com/jabber-at/hp). # # This project 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-3.0
-8,019,578,557,664,934,000
35.666667
99
0.732867
false
bbulkow/MagnusFlora
rest/sound.py
1
17580
#!/usr/bin/env python3 ### VERY MUCH PYTHON 3 !!! """ Example for aiohttp.web basic async service Uses a background timer to print to a logger exposes an obvious REST endpoint It's a template! Made available under the MIT license as follows: Copyright 2017 Brian Bulkowski brian@bulkowski.org Permission is hereby ...
mit
8,676,575,164,180,900,000
31.615955
118
0.638168
false
adazey/Muzez
libs/nltk/corpus/reader/wordnet.py
1
78713
# -*- coding: utf-8 -*- # Natural Language Toolkit: WordNet # # Copyright (C) 2001-2016 NLTK Project # Author: Steven Bethard <Steven.Bethard@colorado.edu> # Steven Bird <stevenbird1@gmail.com> # Edward Loper <edloper@gmail.com> # Nitin Madnani <nmadnani@ets.org> # Nasruddin A’ai...
gpl-3.0
-5,074,483,420,740,756,000
36.658644
137
0.549353
false
jecr/tesis-caja
recovering/recover_cyclops.py
1
1648
# -*- coding: UTF-8 -*- # Búsqueda de tweets por término import tweepy import time import sys # import os consumer_key = 'e2C0wlpcDF2HFRZ1isnWXvdTm' consumer_secret = 'muqOqWH1KByuC9ARZy006P8wclAryQcUgIsa1kcEzgXuUPw1aH' access_token = '108874877-nLkeHo0WRx6Nsz9uctXFVtt9F2oam2Y8E5UfEZjt' access_token_secret = '7puoG65...
apache-2.0
3,659,899,803,650,555,000
33.270833
78
0.648024
false
rgodinez/PencilCode-Work
EtSheet.py
1
3672
''' This file is part of the EdTech library project at Full Sail University. Foobar 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 v...
bsd-3-clause
-7,684,717,401,141,878,000
28.142857
72
0.644336
false
BorgERP/borg-erp-6of3
verticals/garage61/acy_purchase_3_discounts/__openerp__.py
1
1782
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2012 Acysos S.L. (http://acysos.com) All Rights Reserved. # Ignacio Ibeas <ignacio@acysos.com> # $Id$ # # This program i...
agpl-3.0
-3,177,755,475,523,380,700
36.914894
85
0.574635
false
nicogid/apiTwitchStats
TwitchStats/config/urls.py
1
1047
"""api 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-based ...
mit
7,464,930,889,878,722,000
31.71875
79
0.706781
false
jeffmarcom/checkbox
plainbox/plainbox/impl/commands/run.py
1
13956
# This file is part of Checkbox. # # Copyright 2012-2013 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # # Checkbox 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 v...
gpl-3.0
-2,891,184,283,134,012,400
41.809816
79
0.58491
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/effective_network_security_group_py3.py
1
1806
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
5,913,976,556,918,401,000
44.15
122
0.665559
false
twz915/django
tests/managers_regress/tests.py
1
10954
from django.db import models from django.template import Context, Template from django.test import TestCase, override_settings from django.test.utils import isolate_apps from django.utils.encoding import force_text from .models import ( AbstractBase1, AbstractBase2, AbstractBase3, Child1, Child2, Child3, Child...
bsd-3-clause
-2,848,459,864,198,546,400
37.034722
112
0.639675
false
pbryzek/Freedom
api_client.py
1
1099
import requests import consts.paths as paths import common.globals as globals class APIClient(object): """Creates an API client object """ def __init__(self, path, params, method="GET"): #Zillow specific key self.zws_id = "X1-ZWz19tezrsrabv_5qhl2" #Specific endpoint self.p...
mit
1,373,440,640,780,670,200
23.977273
69
0.583258
false
jeffreylu9/django-cms
cms/models/pagemodel.py
1
61624
# -*- coding: utf-8 -*- from logging import getLogger from os.path import join from django.conf import settings from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.core.urlresolvers import reverse from djang...
bsd-3-clause
-2,983,917,024,553,889,000
40.498316
171
0.59162
false
huggingface/pytorch-transformers
src/transformers/models/roberta/modeling_roberta.py
1
65213
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
apache-2.0
8,092,571,453,882,208,000
41.875082
213
0.633601
false
alimanfoo/numcodecs
numcodecs/bz2.py
1
1266
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division import bz2 as _bz2 from numcodecs.abc import Codec from numcodecs.compat import ndarray_copy, ensure_contiguous_ndarray class BZ2(Codec): """Codec providing compression using bzip2 via the Python standard library. Para...
mit
-6,111,709,686,307,507,000
24.32
82
0.634281
false
tvm1/yamlif
yamlif.py
1
29488
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module loads YAML configuration, presents UI to user and allows him to set and save values to another YAML file. """ import sys import os import curses import curses.textpad import textwrap import re from editor import Editor try: import yaml except ImportEr...
mit
326,057,240,882,830,200
26.905303
79
0.518087
false
CaptainDesAstres/Frames-Animated-By-Curve
multi_track/TracksList.py
1
7394
import bpy from functions import * class Track(bpy.types.PropertyGroup): '''object use to be listed as track in tracks list''' def set_end_frame(self, context): '''check that start and end frame are valid when changing end frame settings''' size = self.get(True).curve_to_frame.size # check end isn't ov...
gpl-3.0
-3,735,279,142,487,749,000
23.389439
178
0.63613
false
perkinslr/pyHorde3D
pyHorde3D/horde3d_h.py
1
1776
# horde3d_h.py # # Copyright 2014 Logan Perkins <perkins@lp-programming.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the Eclipse Public License 1.0 # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without...
epl-1.0
541,706,671,798,995,260
24.73913
223
0.643018
false
siliconsmiley/QGIS
python/plugins/processing/algs/otb/maintenance/parsing.py
1
6131
# -*- coding: utf-8 -*- """ *************************************************************************** parsing.py --------------------- Copyright : (C) 2013 by CS Systemes d'information (CS SI) Email : otb at c-s dot fr (CS SI) Contributors : Julien Malik (CS SI) ...
gpl-2.0
-1,898,056,095,687,286,800
35.064706
81
0.550481
false
gem/sidd
sidd/operator/loaders/survey.py
1
17568
# Copyright (c) 2011-2013, ImageCat Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is...
agpl-3.0
2,007,593,762,775,590,700
44.007833
133
0.55288
false
zaproxy/zap-api-python
src/zapv2/users.py
1
7216
# Zed Attack Proxy (ZAP) and its related class files. # # ZAP is an HTTP/HTTPS proxy for assessing web application security. # # Copyright 2017 the ZAP development team # # 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...
apache-2.0
8,769,476,478,485,714,000
52.058824
202
0.676136
false
ajerneck/thatsfordinner
canonical.py
1
1153
"Use a canonical list of ingredients or foods to match." import nltk import pandas as pd import functions as f import common ## exploiting that ingredients are mentioned in instructions as well. con = common.make_engine() dfe = pd.read_sql_table('recipes_recipe', con) x = dfe.head() ## intersection of ingredients...
bsd-3-clause
7,886,874,209,994,783,000
22.06
151
0.718127
false
yaybu/touchdown
touchdown/aws/apigateway/method_response.py
1
2446
# Copyright 2015 Isotoma Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
5,690,618,798,359,818,000
30.766234
86
0.701962
false
js850/pele
examples/new_potential/mypotential.py
1
3624
""" an example of how to create a new potential. """ from pele.potentials import BasePotential class MyPot(BasePotential): """a Lennard Jones potential with altered exponents V(r) = 4. * (r**-24 - r**-12) """ def __init__(self, natoms): self.natoms = natoms #number of atoms def g...
gpl-3.0
-772,127,674,280,667,800
30.789474
81
0.613962
false
liampauling/flumine
examples/middleware/orders.py
1
3222
import logging from flumine import config from flumine.utils import STRATEGY_NAME_HASH_LENGTH from flumine.markets.middleware import Middleware from flumine.order.trade import Trade logger = logging.getLogger(__name__) class OrdersMiddleware(Middleware): """ Middleware to add execution complete orders to...
mit
-2,638,615,105,914,977,300
37.819277
86
0.574798
false
shizhz/tutu
tests/modules/command/test_parser.py
1
1192
# -*- coding: utf-8 -*- import unittest from nose.tools import raises from modules.command.cmd import validator from modules.command.parser import CommandParser from modules.command.exceptions import UnknownCommandException, InvalidCommandException class MockParser(object): @validator def is_valid(self, cmd):...
mit
-1,355,294,728,687,652,600
28.8
87
0.692953
false
boegel/easybuild-easyblocks
easybuild/easyblocks/generic/rubygem.py
1
4937
## # Copyright 2015-2020 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
2,007,238,328,556,488,700
38.814516
115
0.648167
false
sukenda/django-api-tutorial
blog/settings.py
1
5512
""" Django settings for blog project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os # Buil...
mit
5,082,875,815,669,808,000
28.956522
360
0.695573
false
vianuevm/cppStyle
comment_checks.py
1
2368
import re from pyparsing import Word, Literal, alphanums def check_line_width(self, line): max_length = self.max_line_length current_length = len(line) if current_length > max_length: self.add_error(label="LINE_WIDTH", data={'length': current_length}) def check_missing_rme(self, lines): functi...
mit
1,191,410,062,008,988,000
45.45098
121
0.625845
false
hyc/HyperDex
test/python/RegexSearch.py
1
2310
#!/usr/bin/env python import sys import hyperdex.client from hyperdex.client import LessEqual, GreaterEqual, Range, Regex, LengthEquals, LengthLessEqual, LengthGreaterEqual c = hyperdex.client.Client(sys.argv[1], int(sys.argv[2])) def to_objectset(xs): return set([frozenset(x.items()) for x in xs]) assert c.put('kv...
bsd-3-clause
2,271,529,638,827,483,000
61.432432
273
0.55671
false
jamespcole/home-assistant
homeassistant/components/yi/camera.py
1
5262
""" This component provides support for Xiaomi Cameras (HiSilicon Hi3518e V200). For more details about this platform, please refer to the documentation at https://home-assistant.io/components/camera.yi/ """ import asyncio import logging import voluptuous as vol from homeassistant.components.camera import Camera, PL...
apache-2.0
-6,223,721,790,184,453,000
33.168831
79
0.615735
false
GoranLundberg/RPLCD
RPLCD/i2c.py
1
11253
# -*- coding: utf-8 -*- """ Copyright (C) 2013-2017 Danilo Bargen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,...
mit
4,186,489,563,130,845,700
41.460377
151
0.594383
false
pienkowb/omelette
omelette/compiler/parser.py
1
4614
from pyparsing import * from omelette.compiler.lexer import Lexer from omelette.compiler.uml import * from omelette.compiler import logging def callback(handler): def wrapper(self, s, l, t): handler(self, t) return wrapper class Parser(object): """A class translating code to UMLObjects.""" d...
gpl-3.0
2,444,114,487,353,214,500
32.194245
80
0.597529
false
lauregonnord/cap-labs
TP02/ariteval/check_ariteval.py
1
6487
import re import os import sys import subprocess PRINT_DEBUG = True def debug(*args): """Like print(), but on stderr.""" if PRINT_DEBUG: print(*args, file=sys.stderr) def parse_specifications(): """Parse the LaTeX file of the course to use as an example input and output.""" tex = os.path....
gpl-3.0
-1,084,461,821,032,549,800
31.928934
97
0.579929
false
qilicun/python
python3/src/oo/vehicle0.py
1
3006
from pysketcher import * R = 1 # radius of wheel L = 4 # distance between wheels H = 2 # height of vehicle body w_1 = 5 # position of front wheel xmax = w_1 + 2*L + 3*R drawing_tool.set_coordinate_system(xmin=0, xmax=xmax, ymin=-1, ymax=2*R + 3*H, ...
gpl-3.0
-143,500,134,917,915,000
29.363636
101
0.644378
false
DemocracyLab/CivicTechExchange
civictechprojects/migrations/0009_auto_20180403_1604.py
1
1786
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-04-03 16:04 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'),...
mit
4,902,892,915,200,710,000
41.52381
181
0.620941
false
nanophotonics/nplab
nplab/instrument/monochromator/bentham_DTMc300.py
1
2962
from __future__ import print_function import ctypes from nplab.instrument import Instrument from ctypes import CDLL, c_char_p,byref,c_char, POINTER, ARRAY, WinDLL import os import numpy as np import time FILEPATH = os.path.realpath(__file__) DIRPATH = os.path.dirname(FILEPATH) ATTRS_PATH = "{0}\\{1}".format(DIRPATH,"...
gpl-3.0
-9,105,023,763,205,697,000
31.56044
159
0.698177
false
mylene-campana/hpp-rbprm-corba
script/scenarios/demos/darpa_hyq_path.py
1
3581
# Importing helper class for setting up a reachability planning problem from hpp.corbaserver.rbprm.rbprmbuilder import Builder # Importing Gepetto viewer helper class from hpp.gepetto import Viewer rootJointType = 'freeflyer' packageName = 'hpp-rbprm-corba' meshPackageName = 'hpp-rbprm-corba' # URDF file describing t...
lgpl-3.0
-931,012,746,437,607,700
34.81
114
0.743926
false
adamcharnock/lightbus
lightbus/config/config.py
1
5716
import json as jsonlib import os from pathlib import Path from typing import Dict, NamedTuple, Union, TYPE_CHECKING import urllib.request import jsonschema import yaml as yamllib from lightbus.exceptions import UnexpectedConfigurationFormat from lightbus.schema.hints_to_schema import python_type_to_json_schemas, SCHE...
apache-2.0
-4,224,342,558,960,254,500
34.503106
93
0.650105
false
trdarr/apk2
import/import.py
1
1792
import urllib from io import BytesIO from xml.etree import ElementTree import psycopg2 import requests from entity import Product, Store def create_sql(table, entity): entity_dict = entity.to_dict() columns = ', '.join(entity_dict.keys()) placeholders = ', '.join(f'%({k})s' for k in entity_dict.keys()) inse...
apache-2.0
6,123,053,057,215,423,000
34.137255
78
0.68471
false
dineshsonachalam/ocr
setup.py
1
1380
from setuptools import setup, find_packages import requests import semantic_version install_requires = [ 'boto3>=1.17.78', 'botocore>=1.20.78', 'simplejson==3.17.2' ] def get_LucidDynamodb_version(): url = "https://pypi.org/pypi/LucidDynamodb/json" response = requests.request("GET", url, headers={...
mit
6,862,585,355,070,034,000
33.525
69
0.635507
false
matrix-org/sygnal
tests/test_concurrency_limit.py
1
3238
# -*- coding: utf-8 -*- # Copyright 2019–2020 The Matrix.org Foundation C.I.C. # # 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 re...
apache-2.0
4,043,498,856,687,162,400
33.063158
86
0.64246
false
gdm/skew
skew/resources/aws/s3.py
1
1420
# Copyright (c) 2014 Scopely, Inc. # # 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 accompanying this file. This file is # distrib...
apache-2.0
7,790,654,558,427,385,000
32.023256
72
0.628873
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/mail/imap4.py
1
185338
# -*- test-case-name: twisted.mail.test.test_imap -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ An IMAP4 protocol implementation API Stability: Semi-stable @author: U{Jp Calderone<mailto:exarkun@twistedmatrix.com>} To do:: Suspend idle timeout while server is processin...
bsd-3-clause
-8,669,594,478,378,295,000
33.044453
125
0.570752
false
BeetleChunks/redsails
rsCrypto/rsCrypto.py
1
2008
import base64 import ctypes import sys from Crypto.Cipher import AES from Crypto import Random from pbkdf2 import PBKDF2 class iv: def __init__(self, bs): self.bs = bs self.usedIVs = set() self.initializeIV() def initializeIV(self): self.value = Random.new().read(self.bs) self.usedIVs....
gpl-3.0
5,536,739,678,931,007,000
24.8
108
0.693227
false
riccardofreixo/ansible_ec2_elb_healthcheck
ec2_elb_healthcheck/ec2_elb_healthcheck.py
1
4619
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Riccardo Freixo """ Simple Ansible module to health check instances in an ELB """ DOCUMENTATION = ''' --- module: ec2_elb_healthcheck version_added: "1.8" short_description: Get instance Health Check state from ELBs description: - Gets instance Heal...
gpl-3.0
7,849,643,962,396,327,000
27.337423
119
0.658584
false
nsdont/gogs_ci_demo
superlists/superlists/settings.py
1
2664
""" Django settings for superlists project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build p...
mit
6,567,312,469,750,804,000
24.615385
71
0.691066
false
pchmieli/h2o-3
h2o-py/tests/testdir_jira/pyunit_hexdev_296_confusion_matrices.py
1
1271
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def confusion_matrices_check(): local_data = [[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[1, 'a'],[0, 'b'], [0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0, 'b'],[0...
apache-2.0
-4,116,032,665,391,225,000
36.382353
119
0.543666
false
apache/airflow
airflow/hooks/http_hook.py
2
1096
# # 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
-6,505,298,985,341,999,000
38.142857
85
0.762774
false
Der-Eddy/pyepvp
pyepvp/session.py
1
4903
import requests import cfscrape import xmlrpc.client import hashlib import time import platform import json import os import sys import logging from .regexp import * from .exceptions import * from .parser import * from .tapatalk import * from .user import * from . import __version__, __title__, __author__ class sessio...
mit
-5,756,216,365,573,822,000
33.286713
130
0.570671
false
aio-libs/aiobotocore
docs/conf.py
1
5964
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aiobotocore documentation build configuration file, created by # sphinx-quickstart on Sun Dec 11 17:08:38 2016. # # 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 ...
apache-2.0
4,489,589,714,667,007,500
30.723404
79
0.651408
false
rschnapka/odoo
addons/purchase/purchase.py
1
70094
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
903,126,199,072,234,500
51.622372
545
0.596122
false
Thermondo/viewflow-extensions
docs/conf.py
1
2916
# -*- coding: utf-8 -*- import datetime import importlib import inspect import sys import os import django year = datetime.datetime.now().strftime("%Y") sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir)) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.testapp.settings") dja...
apache-2.0
-8,658,033,130,985,556,000
26.252336
84
0.653292
false
chfw/pyexcel-ods3
tests/test_multiple_sheets.py
2
7687
import os from collections import OrderedDict import pyexcel from base import PyexcelMultipleSheetBase from nose.tools import raises class TestOdsNxlsMultipleSheets(PyexcelMultipleSheetBase): def setUp(self): self.testfile = "multiple1.ods" self.testfile2 = "multiple1.xls" self.content =...
bsd-3-clause
368,446,140,860,946,300
30.896266
76
0.55015
false
PrincipiaCollege/RouteCalculator
Test/TestIssue03.py
1
3873
""" Title: Read in CSV data of the route """ """ Description: Read in and store the CSV data into usable Python structures. This will include the following info from the CSV: Step Information Approx. Kms from start: distance of step Feature: name of landmark on step Action/Remark: road info and traveling instructions ...
mit
7,383,761,783,303,239,000
39.768421
80
0.646269
false
ckrooss/shortpath
shortpath/astar.py
1
1996
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from random import randint if __name__ == "__main__": from node import Node from nodelist import Nodelist else: from .node import Node from .nodelist import Nodelist Node.xmax = 30 Node.ymax = 15 def gen_obstacles(xmax: int, ymax: int) -> Nodelist: o...
mit
4,708,236,576,825,571,000
24.589744
97
0.602204
false
SyllogismRXS/misc
gui/widget-test/graveyard/mycustomwidgetplugin.py
1
3624
#!/usr/bin/env python """ helloglwidgetplugin.py A simple OpenGL custom widget plugin for Qt Designer. Copyright (C) 2006 David Boddie <david@boddie.org.uk> Copyright (C) 2005-2006 Trolltech ASA. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gen...
mit
8,384,229,615,302,424,000
35.606061
78
0.721578
false
dafrito/trac-mirror
trac/ticket/tests/conversion.py
1
4457
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2013 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://trac.edgewall.org/wiki/TracLicense. # # This software consi...
bsd-3-clause
-1,433,409,218,591,650,600
38.442478
80
0.554184
false
Cqfuj/disco-cake
disco_cake/link/mp3_track_number_album_linker.py
1
1939
# Disco-cake # Copyright (C) 2017 Maugere Lucas # 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 dist...
gpl-3.0
2,301,692,807,720,406,000
35.584906
71
0.645694
false
lucadt/memoizeit
memoizeit/python/experiment.py
1
8785
#!/usr/bin/env python # encoding: utf-8 import sys import os import tempfile import tarfile import shutil import shlex import datetime import subprocess import time import copy import csv # import options import commons import config # class Experiment(object): @property def program(self): return self...
apache-2.0
2,114,208,309,911,349,500
39.298165
195
0.588845
false
bpsmith/tia
tia/analysis/model/interface.py
1
3276
__all__ = ['CostCalculator', 'EodMarketData', 'MarketDataColumns', 'TxnColumns', 'PositionColumns', 'PlColumns', 'TxnPlColumns'] class CostCalculator(object): """Define the methods necessary to be able to calculator the premium for a trade.""" def get_premium(self, qty, px, ts=None): raise...
bsd-3-clause
-7,107,958,425,368,233,000
23.825758
112
0.548535
false
vgripon/PyRat
imports/display.py
1
22177
# Copyright © 2017 Vincent Gripon (vincent.gripon@imt-atlatique.fr) and IMT Atlantique # # This file is part of PyRat. # # PyRat 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 ...
gpl-3.0
-2,253,685,481,212,059,100
55.861538
353
0.584055
false
AmatanHead/collective-blog
user/tests.py
1
10954
"""Tests for user profile""" from django import test from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission from django.utils.translation import ugettext as __ from .models import Profile User = get_user_model() class TestProfileModel(test.TransactionTestCase): def se...
mit
-8,111,463,802,058,949,000
49.712963
146
0.681851
false
Acehaidrey/incubator-airflow
airflow/www/views.py
1
135065
# # 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
6,772,566,299,823,838,000
35.249329
110
0.57077
false
neuronalmotion/plasmoid-amixer
src/contents/code/main.py
1
3785
# -*- coding: utf-8 -*- # -----------------------# # License: GPL # # Author: NeuronalMotion # # -----------------------# from PyQt4.QtCore import Qt from PyQt4.QtGui import QGraphicsLinearLayout from PyKDE4.plasma import Plasma from PyKDE4 import plasmascript from PyKDE4 import kdecore import subprocess im...
gpl-2.0
-2,672,511,067,184,466,000
30.541667
125
0.643329
false
bl4de/irc-client
irc_client.py
1
3291
#!/usr/bin/env python # by bl4de | github.com/bl4de | twitter.com/_bl4de | hackerone.com/bl4de import socket import sys import threading def usage(): print "IRC simple Python client | by bl4de | github.com/bl4de | twitter.com/_bl4de | hackerone.com/bl4de\n" print "$ ./irc_client.py USERNAME CHANNEL\n" prin...
mit
8,789,912,966,740,696,000
28.657658
115
0.553327
false
CroceRossaItaliana/jorvik
api/v1/views.py
1
4044
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import permissions from oauth2_provider.ext.rest_framework import TokenHasScope from api.settings import SCOPE_ANAGRAFICA_LETTURA_BASE, SCOPE_ANAGRAFICA_LETTURA_COMPLETA, SCOPE_APPARTENENZE_LETTURA from api.v1 im...
gpl-3.0
1,223,268,520,127,786,500
29.171642
117
0.606728
false
vertelab/odoo-smart
smart_salary_simulator_se/models/hr_payroll.py
1
1318
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution, third party addon # Copyright (C) 2004-2015 Vertel AB (<http://vertel.se>). # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
6,327,244,166,136,757,000
42.933333
83
0.637329
false
susca/funge
minibefu93.py
1
1657
#!/usr/bin/python3 # minibefu93.py -- a minimal Befunge93 interpreter written in Python # usage: minibefu93.py <prog.fu> import sys,random o=sys.stdout q=0,0 d=1,0 m=80,25 def k(x,y):return x+m[0]*y+y def g(s,p=None): x,y=q if p is None else p return s[k(x,y)] def p(s,p,v): o=k(*p) return s[:o]+chr(v)+s[o+1:] d...
mit
7,724,251,767,620,839,000
28.070175
68
0.493663
false
DanielJDufour/person-extractor
person_extractor/__init__.py
1
2950
from nltk.chunk import _MULTICLASS_NE_CHUNKER from nltk.data import load from nltk.tag.perceptron import PerceptronTagger from nltk import ne_chunk, word_tokenize from os import listdir from os.path import dirname, realpath from re import findall, finditer, MULTILINE, UNICODE from re import compile as re_compile flags ...
apache-2.0
3,573,599,924,659,248,000
27.095238
92
0.654237
false
gschizas/praw
praw/models/reddit/redditor.py
1
13544
"""Provide the Redditor class.""" from json import dumps from typing import Any, Dict, Generator, List, Optional, TypeVar, Union from ...const import API_PATH from ...util.cache import cachedproperty from ..listing.mixins import RedditorListingMixin from ..util import stream_generator from .base import RedditBase from...
bsd-2-clause
-3,467,038,217,675,936,000
32.691542
79
0.551831
false
glennhickey/hal
assemblyHub/wigTrack.py
1
7699
#!/usr/bin/env python3 #Copyright (C) 2013 by Ngan Nguyen # Copyright (C) 2012-2019 by UCSC Computational Genomics Lab # #Released under the MIT license, see LICENSE.txt """Creating wiggle (annotation) tracks and lifted-over wiggle tracks for the hubs """ import os, re, time from sonLib.bioio import system from toi...
mit
-1,007,999,811,680,412,400
47.727848
477
0.636446
false
drabastomek/practicalDataAnalysisCookbook
Codes/Chapter07/ts_timeSeriesFunctions.py
1
1760
import pandas as pd import matplotlib import matplotlib.pyplot as plt # change the font size matplotlib.rc('xtick', labelsize=9) matplotlib.rc('ytick', labelsize=9) matplotlib.rc('font', size=14) # time series tools import statsmodels.api as sm # folder with data data_folder = '../../Data/Chapter07/' # colors colo...
gpl-2.0
3,228,647,342,116,916,700
24.142857
60
0.688636
false
Ictp/indico
indico/MaKaC/plugins/Collaboration/Vidyo/api/api.py
1
4270
# -*- coding: utf-8 -*- ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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 ...
gpl-3.0
1,933,884,575,633,309,700
32.359375
86
0.679625
false
jon-jacky/PyModel
samples/Marquee/fsmpy/PeriodFiveFSM1.py
1
1330
# pma.py --maxTransitions 100 --output PeriodFiveFSM1 LoadFirst Marquee DisplayFive # 6 states, 6 transitions, 6 accepting states, 0 unsafe states, 0 finished and 0 deadend states # actions here are just labels, but must be symbols with __name__ attribute def Load(): pass def Shift(): pass # states, key of each sta...
bsd-3-clause
97,296,459,689,789,100
32.25
95
0.581955
false
isb-cgc/ISB-CGC-Webapp
bq_data_access/v2/seqpeek/seqpeek_view.py
1
7709
# # Copyright 2015-2019, Institute for Systems Biology # # 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
-1,271,494,110,282,073,900
27.764925
138
0.634064
false
marcosbontempo/inatelos
poky-daisy/bitbake/lib/bb/server/process.py
1
7728
# # BitBake Process based server. # # Copyright (C) 2010 Bob Foerster <robert@erafx.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope t...
mit
239,827,762,069,532,380
31.745763
108
0.618659
false
demelin/learning_reinforcement_learning
recurrent_deep_q_network/training_session.py
1
8324
import os import tensorflow as tf import numpy as np from tensorflow.contrib.rnn import LSTMCell from q_learning.q_network import MentorAgent, ExperienceBuffer, update_target_graph, perform_update, process_capture import gym import universe tf.reset_default_graph() env = gym.make('Pong-v0') # Network constants FILT...
mit
-2,580,441,314,753,550,300
43.042328
118
0.575925
false
qsantos/crpyt
digests/md2.py
1
3065
# crpyt: toy cryptographic python library # Copyright (C) 2014 Quentin SANTOS # # 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 v...
gpl-3.0
9,166,256,507,868,525,000
42.169014
98
0.651876
false
Applied-GeoSolutions/gips
gips/test/sys/expected/landsat_export.py
1
15384
from collections import OrderedDict expectations = OrderedDict([ # t_project[landsat-cloudmask] recording: ('cloudmask', [('0/2017213_LC8_cloudmask.tif', 'raster', 'gdalinfo-stats', ['Driver: GTiff/GeoTIFF', 'Size is 474, 657', 'Coordinate System is:', 'PROJCS["WGS 84 / UTM zone 16N",', ...
gpl-3.0
-7,747,350,162,968,871,000
40.691057
81
0.564808
false
rsampaio/cobbler
cobbler/remote.py
1
100114
""" Code for Cobbler's XMLRPC API Copyright 2007-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your ...
gpl-2.0
8,993,004,671,744,371,000
38.306635
181
0.599856
false
matslindh/codingchallenges
knowit2019/16.py
1
1520
def fjordify(f): lines = [line.strip() for line in open(f).readlines()] width = len(lines[0]) fjord = { 'map': [], 'boat': None, } for y, line in enumerate(lines): row = [' '] * width for x in range(0, len(line)): if line[x] == '#': row[...
mit
-2,061,431,919,864,742,100
19
59
0.404605
false
capitalone/cloud-custodian
tests/test_cwa.py
1
1155
# Copyright 2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from .common import BaseTest class AlarmTest(BaseTest): def test_delete(self): alarm_name = "c7n-test-alarm-delete" factory = self.replay_flight_data("test_alarm_delete") ...
apache-2.0
-5,600,428,226,361,943,000
29.394737
79
0.550649
false
streed/PyEndicia
endicia/builders/ChangePassPhraseXmlBuilder.py
1
1454
from EndiciaXmlBuilder import EndiciaXmlBuilder from EndiciaXmlBuilder import ValueToLongError from lxml.builder import E class ChangePassPhraseXmlBuilder( EndiciaXmlBuilder ): xml = {} def __init__( self ): EndiciaXmlBuilder.__init__( self ) def setPartnerID( self, __id ): if len( __id ) <= 50: self.xml[...
gpl-3.0
-5,050,795,239,346,306,000
25.436364
66
0.658184
false
rafaelolg/visiondataset
visiondataset/datasets/util.py
1
1040
#!/usr/bin/env python # -*- coding: utf-8 -*- import re def base_name(filename): """ return the string filename without extensions nor directory path >>> base_name('asdf.tar.gz') 'asdf' >>> base_name('/root/ver_strange.dir/asdf.tar.gz') 'asdf' >>> base_name(r'c:\Windows With Space\sdf.tar...
gpl-3.0
8,852,463,943,848,875,000
20.666667
68
0.528846
false
stvoutsin/pyrothorn
pyrothorn/pyroquery/atpy/votable.py
1
9010
import os from distutils import version import numpy as np import warnings from exceptions import TableException import atpy from helpers import smart_dtype from decorators import auto_download_to_file, auto_decompress_to_fileobj, auto_fileobj_to_file vo_minimum_version = version.LooseVersion('0.3') try: from ...
gpl-3.0
-2,821,985,157,562,026,000
26.723077
108
0.595117
false
hecate-xw/Miscellaneous
TsinghuaCSLT/audioEmbedded/Mission/develop/MCLT.py
1
4754
#!usr/bin/env python #coding=utf-8 import numpy as np import math import disposeWav pi = math.pi def MCLT(x): ''' Written by the MCLT definition, and it is slow. ''' M = len(x)/2 #M = 8192 h = (2*M)*[0] for n in range(M): h[n] = -math.sin((2.0*n+1.0)*math.pi/(4.0*M)) ...
mit
5,250,337,636,828,632,000
26.174419
113
0.482028
false
socolofs/tamoc
bin/dbm/gas_bubbles.py
1
3178
""" Gas fluid particles =================== Use the ``TAMOC`` ``DBM`` to specify a natural gas bubble that can dissolve and calculate all of its properties in deepwater conditions. In particular, this script demonstrates the methods: * `dbm.FluidParticle.mass_frac` * `dbm.FluidParticle.density` * `dbm.FluidParticle...
mit
8,101,110,010,766,100,000
33.923077
76
0.568911
false