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
fkie-cad/FACT_core
src/storage/db_interface_compare.py
1
4915
import logging from contextlib import suppress from time import time from typing import List, Optional from pymongo.errors import PyMongoError from helperFunctions.data_conversion import ( convert_compare_id_to_list, convert_uid_list_to_compare_id, normalize_compare_id ) from storage.db_interface_common import Mo...
gpl-3.0
2,370,626,291,600,637,000
44.091743
212
0.647202
false
GeoCat/QGIS
tests/src/python/test_qgsvectorfilewriter.py
1
30961
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsVectorFileWriter. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "...
gpl-2.0
-844,033,346,833,076,500
40.614247
126
0.627467
false
d2chau/git-demo-fizzbuzz
python-fizz-buzz/fizzbuzz.py
1
1059
def basicfizzbuzz(n): if n % 3 == 0 and n % 5 == 0: return 'FizzBuzz' elif n % 3 == 0: return 'Fizz' elif n % 5 == 0: return 'Buzz' else: return str(n) print "\n".join(basicfizzbuzz(n) for n in xrange(1, 100)) print "\n" print "*****************************************...
apache-2.0
-1,047,292,258,414,213,900
28.416667
84
0.313503
false
kawashiro/dewyatochka2
src/dewyatochka/plugins/cool_story/parser/_base.py
1
4448
# -*- coding: UTF-8 """ Common parsers logic Classes ======= AbstractParser -- Abstract parser Functions ========= parse_multiline_html -- Join html paragraphs collection into one multi line string Attributes ========== RawPost -- Raw post immutable structure """ import re from collections import named...
gpl-3.0
-971,577,892,149,413,400
26.288344
91
0.582284
false
Luxoft/SDLP2
SDL_Core/tools/InterfaceGenerator/generator/parsers/RPCBase.py
1
26596
"""RPC XML base parser. Contains base parser for SDLRPC v1/v2 and JSON RPC XML format. """ import collections import xml.etree.ElementTree from generator import Model class ParseError(Exception): """Parse error. This exception is raised when XML contains errors and can't be parsed. """ pass ...
lgpl-2.1
-8,461,146,256,486,704,000
34.795424
83
0.537487
false
valeros/platformio
platformio/builder/scripts/frameworks/energia.py
1
2038
# Copyright 2014-2016 Ivan Kravets <me@ikravets.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
4,873,976,666,905,393,000
26.540541
79
0.694799
false
mdaif/olympia
apps/compat/views.py
1
7432
import json import re from django import http from django.db.models import Count from django.shortcuts import redirect, render from django.views.decorators.csrf import csrf_exempt from tower import ugettext as _ import amo import amo.utils from addons.decorators import owner_or_unlisted_reviewer from amo.decorators ...
bsd-3-clause
887,170,371,341,290,900
37.507772
78
0.606432
false
jonnybazookatone/ADSDeploy_priv
ADSDeploy/config.py
1
2953
# Connection to the database where we save orcid-claims (this database # serves as a running log of claims and storage of author-related # information). It is not consumed by others (ie. we 'push' results) # SQLALCHEMY_URL = 'postgres://docker:docker@localhost:6432/docker' SQLALCHEMY_URL = 'sqlite:///' SQLALCHEMY_ECHO...
gpl-3.0
3,990,024,058,038,431,000
30.425532
86
0.633932
false
ajhager/copycat
copycat/workspace/bond.py
1
13667
# Copyright (c) 2007-2017 Joseph Hager. # # Copycat is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License, # as published by the Free Software Foundation. # # Copycat is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; with...
gpl-2.0
-5,235,821,656,455,039,000
42.113565
88
0.615497
false
bopen/mariobros
mariobros/mario.py
1
11792
# -*- coding: utf-8 -*- # python 2 support via python-future from __future__ import absolute_import, division, print_function, unicode_literals from builtins import bytes, dict, int, str import atexit import collections import distutils.spawn import importlib import logging import re import shlex import subprocess im...
apache-2.0
-5,749,971,859,850,435,000
34.841945
99
0.6356
false
anbangleo/NlsdeWeb
Python-3.6.0/Lib/test/test_mailbox.py
2
92803
import os import sys import time import stat import socket import email import email.message import re import io import tempfile from test import support import unittest import textwrap import mailbox import glob class TestBase: all_mailbox_types = (mailbox.Message, mailbox.MaildirMessage, ...
mit
4,246,049,689,262,483,500
39.546329
90
0.582829
false
iulian787/spack
lib/spack/spack/test/cmd/versions.py
1
1677
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import pytest from spack.main import SpackCommand versions = SpackCommand('versions') def test_safe_only_versions(): ...
lgpl-2.1
8,678,284,814,418,964,000
21.662162
75
0.694097
false
michaelhidalgo/7WCSQ
Tools/SQLMap/sqlmap/extra/shutils/regressiontest.py
1
5523
#!/usr/bin/env python # Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) # See the file 'doc/COPYING' for copying permission import codecs import inspect import os import re import smtplib import subprocess import sys import time import traceback from email.mime.multipart import MIMEMultipart from emai...
apache-2.0
-358,738,374,266,894,200
32.676829
221
0.611443
false
bitcraze/crazyflie-lib-python
cflib/__init__.py
1
2100
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
-1,534,993,565,534,744,300
37.888889
78
0.661429
false
fgaTactics/tecprog2017.1
gameEngine/Mouse.py
1
1363
import pygame # This class controls all mouse functionalities class Mouse: def __init__(self): # Array with mouse x and y positions self.position = pygame.mouse.get_pos() assert (self.position is not None), "Invalid pygame mouse position return" # Array that indicate if some mou...
gpl-3.0
-432,616,678,001,625,500
33.075
82
0.605282
false
PIVX-Project/PIVX
test/functional/sapling_wallet_nullifiers.py
1
7387
#!/usr/bin/env python3 # Copyright (c) 2016 The Zcash developers # Copyright (c) 2020 The PIVX developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . from test_framework.test_framework import PivxTestFramework from test_fram...
mit
1,046,206,625,469,703,000
42.710059
111
0.662651
false
AmatanHead/collective-blog
s_markdown/widgets.py
1
3381
"""Markdown widgets""" from django import forms from django.utils.safestring import mark_safe from django.utils.deconstruct import deconstructible from json import dumps @deconstructible class MarkdownTextarea(forms.Textarea): """Basic textarea widget for rendering Markdown objects""" pass @deconstructibl...
mit
1,420,852,129,473,943,600
36.153846
101
0.599823
false
tmfoltz/worldengine
worldengine/generation.py
1
7471
from noise import snoise2 from worldengine.world import Step from worldengine.simulations.basic import find_threshold_f from worldengine.simulations.hydrology import WatermapSimulation from worldengine.simulations.irrigation import IrrigationSimulation from worldengine.simulations.humidity import HumiditySimulation fro...
mit
62,308,796,191,271,064
32.352679
89
0.584125
false
jfterpstra/bluebottle
bluebottle/wallposts/models.py
1
8042
from django.db import models from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import fields from django_extensions.db.fields import (ModificationDateTimeField, CreationDateTimeField) from django.utils.te...
bsd-3-clause
-1,037,258,378,431,632,900
37.295238
85
0.615145
false
rootofevil/watercounter
watercounter/app/sqlmodel.py
1
4586
# -*- coding: utf-8 -*- from app import db, mail from sqlalchemy.orm import backref, relationship from datetime import datetime from sqlalchemy_utils import PasswordType from sqlalchemy.sql.schema import ForeignKey from flask_mail import Message from config import HOSTNAME class Waterhistory(db.Model): i...
gpl-3.0
-8,005,757,017,711,927,000
34.983871
104
0.589184
false
jshaffstall/PyPhysicsSandbox
py2d/Math/Transform.py
1
2380
class Transform(object): """Class for representing affine transformations""" def __init__(self, data): self.data = data @staticmethod def unit(): """Get a new unit tranformation""" return Transform([[1, 0, 0], [0, 1, 0], [0, 0, 1]]) @staticmethod def move(dx, dy): ...
mit
-787,264,642,545,114,100
26.045455
82
0.542017
false
President3D/Quality-SPC
src/Ui/InMainWindow.py
1
108855
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'InMainWindow.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_myMainWindow(object): def setupUi(self, myMainWindow): my...
gpl-3.0
1,980,948,443,473,866,500
71.64753
497
0.762483
false
itdxer/neupy
examples/competitive/sofm_compare_weight_init.py
1
1754
from itertools import product import matplotlib.pyplot as plt from neupy import algorithms, utils, init from utils import plot_2d_grid, make_circle, make_elipse, make_square plt.style.use('ggplot') utils.reproducible() if __name__ == '__main__': GRID_WIDTH = 4 GRID_HEIGHT = 4 datasets = [ mak...
mit
8,403,345,659,887,349,000
22.702703
69
0.562144
false
alphagov/stagecraft
stagecraft/libs/mass_update/copy_dataset_with_new_mapping.py
1
5218
import reversion from performanceplatform.client import DataSet as client from stagecraft.apps.datasets.models import DataGroup, DataSet, DataType from django.conf import settings INTERNAL_KEY = [ "_day_start_at", "_hour_start_at", "_week_start_at", "_month_start_at", "_quarter_start_at", "_upd...
mit
718,580,277,900,791,000
36.271429
78
0.61422
false
64studio/pdk
pdk/xml_legacy/sax/writer.py
1
18896
"""SAX document handlers that support output generation of XML, SGML, and XHTML. This module provides three different groups of objects: the actual SAX document handlers that drive the output, DTD information containers, and syntax descriptors (of limited public use in most cases). Output Drivers -------------- The...
gpl-2.0
-2,206,020,784,340,318,500
33.418944
84
0.512701
false
vkroz/kafka
tests/kafkatest/services/performance/end_to_end_latency.py
1
3028
# 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 use ...
apache-2.0
6,619,955,687,392,177,000
42.884058
126
0.637715
false
benhoff/chrome-stream-chat
CHATIMUSMAXIMUS/youtube_scrapper.py
1
3564
import sys import os #import httplib2 from time import sleep from threading import Thread from selenium import webdriver from apiclient.discovery import build from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage from oauth2client.tools import argparser, run_flow from PyQt5 i...
mit
-8,556,869,593,251,939,000
32
85
0.632155
false
ecolell/pfamserver
pfamserver/commands/unused_columns.py
1
2440
unused_columns = { 'pdb': [ 'keywords' ], 'pdb_pfamA_reg': [ 'auto_pdb_reg', 'pdb_start_icode', 'pdb_end_icode', 'seq_start', 'seq_end', 'hex_color' ], 'pfamA': [ 'previous_id', 'author', 'deposited_by', 'seed_so...
agpl-3.0
-2,147,323,191,928,900,400
20.403509
35
0.431557
false
monodokimes/pythonmon
core/scene.py
1
3014
import controller.component from util import jsonmanager, debug, configuration from view.entity import Entity class Scene: def __init__(self, name, entities_data): self.name = name self.entities = [] self.started_entities = [] self.event_input = None self.cont_input = None ...
gpl-3.0
2,675,223,090,908,184,000
31.06383
97
0.562044
false
by46/coffee
code1.py
1
2408
# -*- coding: utf-8 -*- ENCODINGS = ['utf8', 'gbk'] def decode_statement(statement, encodings): # if isinstance(statement, unicode): # return statement for encoding in encodings: try: return statement.decode(encoding) except UnicodeDecodeError: pass...
mit
5,043,973,506,449,608,000
25.563218
66
0.455379
false
jonathanslenders/python-vterm
libpymux/utils.py
1
1881
import array import asyncio import fcntl import signal import termios def get_size(stdout): # Thanks to fabric (fabfile.org), and # http://sqizit.bartletts.id.au/2011/02/14/pseudo-terminals-in-python/ """ Get the size of this pseudo terminal. :returns: A (rows, cols) tuple. """ #assert st...
bsd-2-clause
58,246,880,209,152,530
27.074627
90
0.640085
false
openstack/python-troveclient
troveclient/tests/osc/v1/test_database_configurations.py
1
14807
# 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 # distrib...
apache-2.0
-6,860,908,495,404,124,000
36.581218
79
0.61221
false
sunlightlabs/read_FEC
fecreader/api/serializers.py
1
6024
from fec_alerts.models import new_filing from summary_data.models import Committee_Overlay, Candidate_Overlay, DistrictWeekly, District from formdata.models import SkedE from rest_framework import serializers class NFSerializer(serializers.HyperlinkedModelSerializer): form_name = serializers.Field(source='get_fo...
bsd-3-clause
2,079,631,095,254,151,700
59.24
733
0.708001
false
VandroiyLabs/FaroresWind
faroreswind/server/handler_Metadata.py
1
3875
## database import psycopg2 ## system libraries import io, os import datetime, time import logging ## web libraries import tornado import tornado.auth import tornado.escape import tornado.gen import tornado.httpserver import urlparse import threading import functools from tornado.ioloop import IOLoop from tornado.web...
gpl-3.0
-8,024,903,895,091,325,000
28.135338
202
0.571871
false
aurex-linux/virt-manager
tests/capabilities.py
1
9927
# Copyright (C) 2013, 2014 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 distribut...
gpl-2.0
8,204,153,660,796,448,000
38.392857
133
0.556966
false
pamapa/callblocker
usr/share/callblocker/onlinecheck_phonespamfilter_com.py
1
2486
#!/usr/bin/env python3 # callblocker - blocking unwanted calls from your home phone # Copyright (C) 2015-2020 Patrick Ammann <pammann@gmx.net> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; ...
gpl-2.0
-8,970,024,645,685,095,000
35.558824
111
0.641593
false
miguelgrinberg/python-socketio
src/socketio/kombu_manager.py
1
5298
import pickle import uuid try: import kombu except ImportError: kombu = None from .pubsub_manager import PubSubManager class KombuManager(PubSubManager): # pragma: no cover """Client manager that uses kombu for inter-process messaging. This class implements a client manager backend for event shari...
mit
5,484,561,835,408,599,000
42.42623
78
0.58607
false
piotroxp/scibibscan
scib/lib/python3.5/site-packages/astropy/visualization/transform.py
1
1198
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import division, print_function __all__ = ['BaseTransform', 'CompositeTransform'] class BaseTransform(object): """ A transformation object. This is used to construct transformations such as scaling, stretching, and so o...
mit
-9,155,531,039,135,937,000
27.52381
79
0.647746
false
vhaupert/mitmproxy
mitmproxy/proxy/protocol/tls.py
1
20430
from typing import Optional # noqa from typing import Union from mitmproxy import exceptions from mitmproxy.net import tls as net_tls from mitmproxy.proxy.protocol import base # taken from https://testssl.sh/openssl-rfc.mapping.html CIPHER_ID_NAME_MAP = { 0x00: 'NULL-MD5', 0x01: 'NULL-MD5', 0x02: 'NULL-S...
mit
-2,940,024,410,166,875,000
39.216535
118
0.603279
false
fragaria/BorIS
boris/services/migrations/0018_delete_pregnancytest.py
1
1313
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import models, migrations def reconvert_tests(apps, schema_editor): pass def convert_tests(apps, schema_editor): # convert PregnancyTest to UrineTest.pregnancy_test ...
mit
1,142,179,289,645,332,700
30.261905
87
0.657273
false
supriyantomaftuh/zget
zget/put.py
1
7124
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, \ unicode_literals import os import sys import time import socket try: import urllib.request as urllib except ImportError: import urllib import hashlib import argparse import logging from zeroconf import ServiceInfo, Ze...
mit
-6,137,828,054,823,278,000
25.681648
79
0.580011
false
russellhadley/coreclr
src/scripts/genEventPipe.py
1
17048
from __future__ import print_function from genXplatEventing import * from genXplatLttng import * import os import xml.dom.minidom as DOM stdprolog = """// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in th...
mit
-4,561,604,318,752,009,700
33.297787
130
0.622492
false
wasserfeder/lomap
lomap/algorithms/dijkstra.py
1
12332
#! /usr/bin/python # Copyright (C) 2012-2015, Alphan Ulusoy (alphan@bu.edu) # # 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 ve...
gpl-2.0
134,945,866,439,583,540
27.948357
81
0.665504
false
jness/MTG-Toolbox
WebMTG/models.py
1
2426
from django.db import models from django.contrib.auth.models import User class MTGSet(models.Model): label = models.CharField(max_length=75, unique=True) display_name = models.CharField(max_length=75) magiccards_info = models.CharField(max_length=10, null=True) created = models.DateTimeField(auto_now_a...
gpl-2.0
-2,379,355,143,322,243,000
35.208955
64
0.694559
false
lucasdavid/grapher
grapher/repositories/graph.py
1
6676
import abc import py2neo from py2neo import Graph, Node, Relationship from . import base from .. import errors, settings class GraphRepository(base.Repository, metaclass=abc.ABCMeta): _g = None connection_string = settings.effective.DATABASES['neo4j'] @property def g(self): self._g = self._g...
mit
-8,926,344,130,431,322,000
30.342723
100
0.587627
false
ktnyt/chainer
chainer/training/extensions/variable_statistics_plot.py
1
13261
from __future__ import division import os import warnings import numpy import six import chainer from chainer import backend from chainer.backends import cuda from chainer.training import extension from chainer.training import trigger as trigger_module _available = None def _try_import_matplotlib(): global ma...
mit
-7,535,819,348,694,704,000
35.938719
79
0.544529
false
Taywee/texttables
texttables/fixed/_writer.py
1
8641
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright © 2017 Taylor C. Richberger <taywee@gmx.com> # This code is released under the license described in the LICENSE file from __future__ import division, absolute_import, print_function, unicode_literals from six.moves import zip from texttables.dialect import Dia...
mit
2,384,864,735,107,385,000
33.422311
86
0.612731
false
p99tunnel/p99tunnel
setup_database/create_tables.py
1
1180
#!/usr/bin/env python3 import db # The limits on character fields were determined by looking at a sample of logs # and figuring out how big things could be. CREATE_TABLE_STATEMENTS = [ """CREATE TABLE characters ( id SERIAL PRIMARY KEY, name varchar(16) );""", """CREATE TABLE items ( id SERIAL PRI...
apache-2.0
2,982,044,504,163,306,500
22.6
79
0.658475
false
thorfi/pass-words-py
pass-words.py
1
6672
#!/usr/bin/env python # # The MIT License (MIT) # # Copyright (c) 2014-2021 David Goh <david@goh.id.au> # # 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 withou...
mit
7,877,558,534,059,127,000
31.546341
121
0.583633
false
kickstandproject/python-ripcordclient
ripcordclient/common/utils.py
1
2525
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC. # Copyright (C) 2013 PolyBeacon, Inc. # # Author: Paul Belanger <paul.belanger@polybeacon.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obt...
apache-2.0
-3,201,683,492,522,797,600
29.421687
74
0.629703
false
carthagecollege/django-djtools
djtools/context_processors.py
1
1233
from django.conf import settings def sitevars(request): context = {} try: context['static_root'] = settings.MEDIA_ROOT context['media_root'] = settings.MEDIA_ROOT context['media_url'] = settings.MEDIA_URL context['static_url'] = settings.STATIC_URL context['se...
unlicense
4,474,720,833,405,657,600
33.228571
126
0.534469
false
anilpai/leetcode
Matrix/MatrixRotate90deg.py
1
1767
# An Inplace function to rotate a N x N matrix by 90 degrees # In both clockwise and counter clockwise direction class Solution(object): def Rotate90Clock(self, mat): N = len(mat) for x in range(int(N/2)): for y in range(x, N-x-1): temp = mat[x][y] '''...
mit
-1,409,958,039,993,768,700
26.625
60
0.449915
false
isra17/nrs
tests/test_nsisfile.py
1
2037
from nrs import nsisfile import pytest import utils import os import sys EMPTY_PATH = os.path.join(utils.SAMPLES_DIR, 'empty') EXAMPLE1_PATH = os.path.join(utils.SAMPLES_DIR, 'example1.exe') EMPTY_PATH = os.path.join(utils.SAMPLES_DIR, 'vopackage.exe') def test_non_nsis(): with pytest.raises(nsisfile.HeaderNotFou...
gpl-3.0
3,935,376,642,075,163,000
37.433962
80
0.644084
false
Guts/DicoGIS
dicogis/georeaders/Infos_Rasters.py
1
14889
#! python3 # noqa: E265 # ---------------------------------------------------------------------------- # Name: Infos Rasters # Purpose: Use GDAL library to extract informations about # geographic rasters data. It permits a more friendly use as # submodule. # # Author:...
gpl-3.0
-6,192,580,079,353,181,000
34.877108
110
0.525287
false
leiferikb/bitpop
src/tools/telemetry/telemetry/core/webpagereplay.py
1
9250
# Copyright (c) 2012 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. """Start and stop Web Page Replay. Of the public module names, the following one is key: ReplayServer: a class to start/stop Web Page Replay. """ imp...
gpl-3.0
-2,729,612,260,395,174,000
35.132813
80
0.645838
false
LibreGameArchive/silvertree
scons/gl.py
1
1408
# vi: syntax=python:et:ts=4 def CheckOpenGL(context, libs = ["gl"]): context.Message("Checking for OpenGL... ") env = context.env backup = env.Clone().Dictionary() if env["PLATFORM"] == "win32": libnames = { "gl" : "opengl32", "glu" : "glu32" } else: libnames = { "gl" : "GL", "glu" ...
gpl-3.0
-9,038,046,539,964,435,000
28.333333
67
0.551136
false
brunogamacatao/portalsaladeaula
portal/models.py
1
34418
# -*- coding: utf-8 -*- import logging from operator import attrgetter from django.db import models from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from django.contrib.auth.models import User from djangotoolbox.fields import BlobField, SetField from django.template impor...
bsd-3-clause
-775,253,353,824,724,200
40.678788
155
0.640686
false
j-i-l/cryptsypy
cryptsypy/CryptsyAccount.py
1
7173
from pyapi import Request,RequestPrivate #this is going to be it #from pyapi import AccountStructure from CryptsyInfo import Info import time # <codecell> #pur account into pyapi and inherit the specific platform account #from the general class. class Account(): #class Account(AccountStructure): #it does not make...
mit
-7,307,154,705,212,212,000
32.0553
88
0.538269
false
akretion/odoo
odoo/addons/base/tests/test_mimetypes.py
10
3575
import base64 import unittest from odoo.tests.common import BaseCase from odoo.tools.mimetypes import guess_mimetype PNG = b'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12P4//8/AAX+Av7czFnnAAAAAElFTkSuQmCC' GIF = b"R0lGODdhAQABAIAAAP///////ywAAAAAAQABAAACAkQBADs=" BMP = b"""Qk1+AAAAAAAAAHoAAABsAAAAAQAAAAE...
agpl-3.0
-6,423,755,072,895,653,000
46.666667
101
0.726434
false
gklyne/annalist
src/annalist_root/annalist_manager/tests/test_annalist_site.py
1
3181
""" Test module for annalist-manager site data management commands """ from __future__ import unicode_literals from __future__ import absolute_import, division, print_function __author__ = "Graham Klyne (GK@ACM.ORG)" __copyright__ = "Copyright 2018, G. Klyne" __license__ = "MIT (http://opensource.org/licen...
mit
-5,898,015,406,387,909,000
34.741573
103
0.582207
false
Geotab/mygeotab-python
tests/test_dates.py
1
4844
# -*- coding: utf-8 -*- from datetime import datetime import pytz from mygeotab import dates class TestGetUtcDate: def test_naive_datetime_to_utc(self): date = datetime(2015, 3, 12, 2, 45, 34) utc_date = dates.localize_datetime(date, pytz.utc) assert utc_date.tzinfo is not None ...
apache-2.0
-4,481,764,768,974,608,000
38.704918
98
0.619942
false
Micronaet/micronaet-migration
purchase_extra_field/purchase.py
1
5464
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This pro...
agpl-3.0
2,421,605,581,973,595,600
34.947368
79
0.58071
false
LinDA-tools/LindaWorkbench
linda/linda_app/urls.py
1
10160
from django.contrib import admin from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from django.views.generic import RedirectView from linda_app.forms import AutocompleteModelSearchForm from haystack.views import SearchView, search_view_factory from linda_app....
mit
8,392,267,029,180,516,000
58.415205
127
0.504528
false
drewsonne/cfn-json-to-yaml
cfnjsontoyaml/mixins/__init__.py
1
1048
from cfnjsontoyaml.yamlobject.base64 import Base64 from cfnjsontoyaml.yamlobject.equals import Equals from cfnjsontoyaml.yamlobject.findinmap import FindInMap from cfnjsontoyaml.yamlobject.fnand import And from cfnjsontoyaml.yamlobject.fnif import If from cfnjsontoyaml.yamlobject.fnnot import Not from cfnjsontoyaml.yam...
lgpl-3.0
-9,176,360,153,192,987,000
32.806452
60
0.754771
false
DantestyleXD/MVM5B_BOT
plugins/mine.py
1
2025
# -*- coding: utf-8 -*- from config import * print(Color( '{autored}[{/red}{autoyellow}+{/yellow}{autored}]{/red} {autocyan} mine.py importado.{/cyan}')) @bot.message_handler(commands=['mine']) def command_COMANDO(m): cid = m.chat.id uid = m.from_user.id try: send_udp('mine') except Exc...
gpl-2.0
7,239,661,459,171,880,000
37.188679
106
0.473814
false
fhqgfss/MoHa
moha/posthf/pt/mp.py
1
2331
import numpy as np def spinfock(eorbitals): """ """ if type(eorbitals) is np.ndarray: dim = 2*len(eorbitals) fs = np.zeros(dim) for i in range(0,dim): fs[i] = eorbitals[i//2] fs = np.diag(fs) # put MO energies in diagonal array elif type(eorbitals) is dict: ...
mit
-7,517,407,249,570,599,000
37.213115
167
0.531532
false
ppGodel/ADA2017
Tareas/tarea5.py
1
2081
#flujos y arboles de expancion Ford-fulkerson y grafos densos,grandes y normales #archivos necesarios dentro de la carpeta files # graph.py, InstanciesGenerator.py from files import graph from files import InstanciesGenerator import random import time # se genera un grafo con densidad alta y con una cantidad de vertice...
gpl-3.0
9,055,192,903,225,367,000
56.75
339
0.740741
false
gschizas/praw
praw/models/reddit/comment.py
1
12884
"""Provide the Comment class.""" from typing import Any, Dict, Optional, TypeVar, Union from ...const import API_PATH from ...exceptions import ClientException, InvalidURL from ...util.cache import cachedproperty from ..comment_forest import CommentForest from .base import RedditBase from .mixins import ( Fullname...
bsd-2-clause
8,281,210,984,734,887,000
34.888579
79
0.574589
false
DIPlib/diplib
pydip/src/__main__.py
1
1301
# PyDIP 3.0, Python bindings for DIPlib 3.0 # This file contains functionality to download bioformats # # (c)2020, Wouter Caarls # # 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://...
apache-2.0
2,904,086,616,590,238,000
39.65625
111
0.69485
false
FCP-INDI/C-PAC
CPAC/pipeline/cpac_runner.py
1
27944
import os import glob import warnings import yaml from multiprocessing import Process from time import strftime from voluptuous.error import Invalid from CPAC.utils.configuration import Configuration from CPAC.utils.ga import track_run from CPAC.longitudinal_pipeline.longitudinal_workflow import ( anat_longitudina...
bsd-3-clause
-3,887,706,195,881,829,400
45.266556
279
0.482179
false
Esri/executive-dashboard
ExecutiveReportingScript/executive_dashboard.py
1
13149
#------------------------------------------------------------------------------- # Name: executive_dashboard.py # Purpose: # # Author: Local Government # # Created: 05/06/2016 AM # Version: Python 2.7 #------------------------------------------------------------------------------- import json, ...
apache-2.0
8,910,792,757,372,526,000
39.962617
231
0.558369
false
m-ober/byceps
byceps/services/attendance/service.py
1
3675
""" byceps.services.attendance.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2020 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from collections import defaultdict from typing import Dict, Iterable, List, Optional, Set, Tuple from ...database import db, paginate, Pagination ...
bsd-3-clause
7,584,223,255,903,972,000
28.4
80
0.647891
false
adamhaney/pykell
tests.py
1
3811
from unittest import TestCase from .types import expects_type, returns_type, T @expects_type(a=T(int), b=T(str)) def example_kw_arg_function(a, b): return a, b class ExpectsTests(TestCase): def test_correct_expectations_kw(self): self.assertEqual(example_kw_arg_function(a=1, b="baz"), (1, "baz")) ...
mit
7,787,685,935,964,463,000
29.246032
92
0.635791
false
psathyrella/partis
python/treeutils.py
1
183169
import __builtin__ import operator import string import itertools import copy import collections import random import csv from cStringIO import StringIO import subprocess import tempfile import os import numpy import sys from distutils.version import StrictVersion import dendropy import time import math import json imp...
gpl-3.0
-1,847,442,446,347,377,700
71.570919
556
0.596853
false
DavidCain/mitoc-trips
ws/migrations/0020_typo_corrections.py
1
1360
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [('ws', '0019_2020_ws_application')] operations = [ migrations.AlterField( model_name='climbingleaderapplication', name='familiarity_spotting', field=models.CharField( ...
gpl-3.0
5,556,380,076,097,705,000
37.857143
114
0.546324
false
tomfa/flashcard-json-maker
simplequiz_interpreter.py
1
3968
#coding: utf-8 ''' This script reads a Q-A txt-file and generates JSON output. USAGE: Save your Q-A file FORMAT: Chapter 1 - cakes. The whole line is a part of the chapter title. Q: Question that we wonder about? A: Answer telling us what we want to know? Q: Empty ...
mit
7,440,680,661,345,437,000
27.161765
75
0.554463
false
chudaol/edx-platform
cms/envs/common.py
1
33521
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
agpl-3.0
239,010,632,844,921,660
31.200768
182
0.653113
false
openstack/python-saharaclient
saharaclient/tests/unit/test_data_sources.py
1
4609
# Copyright (c) 2014 Mirantis 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 ...
apache-2.0
7,927,911,403,367,229,000
37.731092
78
0.611195
false
dana-i2cat/felix
modules/resource/utilities/rspecs/serm/request_parser.py
1
4179
from rspecs.parser_base import ParserBase from rspecs.commons_se import SELink from rspecs.commons_tn import Node, Interface import core logger = core.log.getLogger("utility-rspec") class SERMv3RequestParser(ParserBase): def __init__(self, from_file=None, from_string=None): super(SERMv3RequestParser, sel...
apache-2.0
6,311,328,318,198,974,000
38.8
78
0.556832
false
katajakasa/utuputki2
alembic/versions/4690204e5a62_initial.py
1
5560
"""Initial Revision ID: 4690204e5a62 Revises: Create Date: 2015-10-28 18:43:54.656000 """ # revision identifiers, used by Alembic. revision = '4690204e5a62' down_revision = None branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by...
mit
-8,873,998,268,785,954,000
40.185185
80
0.648741
false
optiflows/nyuki
nyuki/workflow/tasks/trigger_workflow.py
1
7024
import json import asyncio import logging from enum import Enum from aiohttp import ClientSession from tukio.task import register from tukio.task.holder import TaskHolder from tukio.workflow import WorkflowExecState, Workflow from .utils import runtime from .utils.uri import URI log = logging.getLogger(__name__) c...
apache-2.0
5,176,207,135,158,172,000
33.431373
79
0.530325
false
petroniocandido/pyFTS
pyFTS/models/seasonal/msfts.py
1
1921
import numpy as np from pyFTS.common import FLR from pyFTS.models.seasonal import sfts class MultiSeasonalFTS(sfts.SeasonalFTS): """ Multi-Seasonal Fuzzy Time Series """ def __init__(self, name, indexer, **kwargs): super(MultiSeasonalFTS, self).__init__("MSFTS") self.name = "Multi Seas...
gpl-3.0
-2,375,264,770,700,917,000
28.106061
96
0.580947
false
bigswitch/neutron
neutron/tests/functional/pecan_wsgi/test_hooks.py
1
22434
# Copyright (c) 2015 Mirantis, 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 requir...
apache-2.0
8,203,198,585,067,558,000
44.505071
79
0.578764
false
neep305/swordfish
text_analysis/fileutil.py
1
1183
from konlpy.tag import Hannanum from collections import Counter import pandas as pd import csv import json def read_localcsv(path): result = pd.read_csv(path, encoding='UTF-8') print(result) return result def get_json_data(path): #r = requests.get(URL) #data = r.text RESULTS = {"children": []} with open(...
mit
-798,070,984,540,722,700
22.196078
45
0.667794
false
dtrodrigues/nifi-minifi-cpp
libminifi/test/script-tests/test_scripts/stateful_processor.py
2
1602
# # # 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...
apache-2.0
7,008,879,742,411,832,000
33.826087
93
0.714107
false
prymitive/upaas-admin
upaas_admin/features/cron.py
1
1583
# -*- coding: utf-8 -*- """ :copyright: Copyright 2014 by Łukasz Mierzwa :contact: l.mierzwa@gmail.com """ from __future__ import unicode_literals import logging from django.utils.translation import ugettext as _ from upaas.config.base import (Config, ConfigurationError, StringEntry, ...
gpl-3.0
2,626,893,547,294,586,400
28.296296
79
0.584071
false
Zerknechterer/pyload
module/plugins/hoster/GoogledriveCom.py
1
1839
# -*- coding: utf-8 -* # # Test links: # https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1 import re import urlparse from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo from module.utils import html_unescape class GoogledriveCom(SimpleHoster): __name__ = "Goo...
gpl-3.0
-4,720,897,857,208,252,000
29.65
105
0.559543
false
abcdef123/stem
test/integ/descriptor/server_descriptor.py
1
14214
""" Integration tests for stem.descriptor.server_descriptor. """ from __future__ import with_statement import datetime import os import unittest import stem.control import stem.descriptor.server_descriptor import stem.exit_policy import stem.version import test.integ.descriptor import test.runner class TestServerDe...
lgpl-3.0
-4,238,564,453,306,384,400
43.981013
128
0.728015
false
jgrundstad/viewer
admin.py
1
1761
from django.contrib import admin from models import Project, Bnid, Sample, Study, Caller, Report, Variant, \ Genome, Contact, SharedData class ProjectAdmin(admin.ModelAdmin): model = Project list_display = ('id', 'name', 'description', 'creation_date') filter_horizontal = ('user', ) class BnidAdmin(...
apache-2.0
-6,679,012,992,260,252,000
26.968254
85
0.693924
false
yongshengwang/builthue
apps/oozie/src/oozie/models.py
1
80907
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
4,944,804,039,425,903,000
38.640862
183
0.636088
false
d/hamster-applet
src/docky_control/2.1/hamster_control.py
1
3518
#!/usr/bin/env python # # Copyright (C) 2010 Toms Baugis # # Original code from Banshee control, # Copyright (C) 2009-2010 Jason Smith, Rico Tzschichholz # # 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 Soft...
gpl-3.0
982,473,164,084,869,900
29.591304
143
0.666003
false
JoshBorke/redline
accounts/urls.py
1
2078
from django.conf.urls.defaults import * from redline import settings urlpatterns = patterns('redline.accounts.views', url(r'^$', 'accounts_list', name='account_list'), url(r'^overview/(?P<year>\d+)/(?P<month>\d+)/$', 'accounts_detail', name='accounts_detail'), url(r'^overview/(?P<year>\d+)/(?P<month>\d+)/(...
gpl-3.0
-7,997,031,493,255,206,000
66.032258
161
0.60924
false
iirob/python-opcua
opcua/common/structures.py
1
11226
""" Support for custom structures in client and server We only support a subset of features but should be enough for custom structures """ import os import importlib import re import logging # The next two imports are for generated code from datetime import datetime import uuid from enum import Enum, IntEnum, EnumMeta...
lgpl-3.0
-3,811,595,053,384,737,300
30.622535
152
0.576786
false
albertoriva/bioscripts
simplediff.py
1
5294
#!/usr/bin/env python import sys import csv import math def parseSlice(s): if "-" in s: parts = s.split("-") return slice(int(parts[0]) - 1, int(parts[1])) else: p = int(s) return slice(p-1, p) class SimpleDiff(): filename = None outfile = "/dev/stdout" labels = No...
gpl-3.0
6,085,323,893,334,041,000
34.293333
107
0.525123
false
Erotemic/ibeis
dev/_scripts/_timeits/time_uuids.py
1
4117
# -*- coding: utf-8 -*- """ Script to help time determenistic uuid creation """ from __future__ import absolute_import, division, print_function from six.moves import range, builtins import os import multiprocessing import time from PIL import Image import hashlib import numpy as np import uuid from utool._internal.met...
apache-2.0
6,607,357,199,787,421,000
26.817568
83
0.634685
false
bjodah/chempy
benchmarks/benchmarks/equilibria.py
1
1079
import numpy as np from chempy.tests.ammonical_cupric_solution import get_ammonical_cupric_eqsys class TimeEqsys: def setup(self): self.eqsys, self.c0 = get_ammonical_cupric_eqsys() def time_roots(self): x, new_inits, success = self.eqsys.roots(self.c0, np.logspace(-3, 0, 50), "NH3") ...
bsd-2-clause
-5,027,225,692,750,565,000
23.522727
88
0.570899
false
hgamboa/novainstrumentation
novainstrumentation/peakdelta.py
1
2443
# -*- coding: utf-8 -*- """ Created on Wed Mar 20 16:20:03 2013 @author: utilizador """ import sys from numpy import NaN, Inf, arange, isscalar, array, asarray ############################################################################## ########################### Peaks Detection ###################...
mit
-1,012,318,517,677,826,700
27.792683
80
0.462137
false
google/report2bq
application/classes/report_type_test.py
1
1637
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-4,314,635,563,280,956,400
33.829787
80
0.645082
false
702nADOS/sumo
tools/xml/xml2csv.py
1
10954
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @file xml2csv.py @author Jakob Erdmann @author Michael Behrisch @author Laura Bieker @date 2013-12-08 @version $Id: xml2csv.py 22608 2017-01-17 06:28:54Z behrisch $ Convert hierarchical xml files to csv. This only makes sense if the hierarchy has low depth. S...
gpl-3.0
-2,313,956,629,142,083,600
38.545126
122
0.576228
false
joostvdg/jenkins-job-builder
jenkins_jobs/cli/subcommand/base.py
1
2294
#!/usr/bin/env python # Copyright (C) 2015 Wayne Warren # # 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
1,903,094,280,295,874,600
33.238806
79
0.649085
false