repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
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
4.260536
false
false
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
4.926097
false
false
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
3.483761
false
false
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
3.659281
false
false
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
4.257632
false
false
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
4.215946
false
false
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
3.672169
true
false
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
3.828992
false
false
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
3.344226
false
false
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
4.32831
false
false
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
3.651274
false
false
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
2.986198
false
false
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
3.558731
true
false
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
3.543434
false
false
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
3.703336
false
false
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
3.975594
false
false
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
3.852417
true
false
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
3.899344
false
false
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
4.406433
false
false
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
3.700617
false
false
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
3.411099
false
false
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
3.686965
false
false
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
3.417212
true
false
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
3.677515
false
false
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
4.59497
false
false
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
4.21831
false
false
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
4.299336
false
false
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
3.947661
false
false
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
3.112569
false
false
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
3.594074
false
false
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
4.149161
false
false
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
4.193865
false
false
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
4.465116
false
false
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
3.537646
false
false
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
4.059486
false
false
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
4.055921
false
false
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
3.411197
false
false
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
2.737903
true
false
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
3.647476
false
false
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
3.425791
true
false
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
3.722126
false
false
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
3.978369
false
false
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
4.008804
false
false
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
3.776119
false
false
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
3.083333
false
false
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
3.121622
false
false
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
4.472058
false
false
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
3.450928
false
false
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
4.179593
false
false
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
3.301887
false
false
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
3.470856
true
false
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
3.465434
false
false
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
4.62585
false
false
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
3.806142
false
false
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
3.704787
false
false
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
3.442724
false
false
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
4.384519
false
false
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
3.306368
false
false
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
2.823389
false
false
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
3.945813
false
false
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
3.67907
true
false
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
3.411874
false
false
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
3.487129
false
false
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
3.82539
false
false
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
3.593463
false
false
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
3.00289
false
false
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
3.880401
false
false
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
3.696927
false
false
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
3.074074
false
false
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
4.018092
false
false
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
3.919141
false
false
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
4.769231
false
false
false
NNTin/Reply-Dota-2-Reddit
displayreddit/drmatch.py
1
5099
from steamapi.getproplayerlist import proPlayerDictionary from steamapi.getheroes import heroDictionary from steamapi.getgameitems import itemDictionary from converter import timeconverter, playerconverter def displayResult(matchJson, playerSummariesJson): introTemplate = '####&#009;\n#####&#009; ' \ ...
mit
-7,995,903,472,055,855,000
54.956044
176
0.574543
false
3.257198
false
false
false
UMDWeather/TheDisplayer
plugins/current/weather_underground.py
1
1027
import urllib, json import datetime as dt import logging log = logging.getLogger(__name__) ################################################################################ ## REQUIRED parameters: ################################################################################ ## data_url - e.g. "http://api.wundergrou...
gpl-2.0
941,463,521,244,889,000
32.129032
103
0.523856
false
4.027451
false
false
false
kkaushik24/python-design-patterns
structural/bridge_pattern.py
1
1404
from abc import ABCMeta, abstractmethod class DrawingApi: def draw_circle(self, x, y, radius): pass class DrawingApi1(DrawingApi): def draw_circle(self, x, y, radius): print "Api1 ", x, y, radius class DrawingApi2(DrawingApi): def draw_circle(self, x, y, radius): print "Api1 ...
apache-2.0
922,079,697,343,518,000
22.79661
74
0.625356
false
3.334917
false
false
false
adybbroe/atrain_match
python_edit_the_code.py
1
3570
import re, glob, os ROOT_DIR = "/home/a001865/git/rename_atrainmatch/atrain_match/" files = glob.glob(ROOT_DIR + "/*.py") files = files + glob.glob(ROOT_DIR + "/*/*.py") files = files + glob.glob(ROOT_DIR + "/*/*/*.py") var_name_dict ={ "time": "profile_time", "utc_time": "prof...
gpl-3.0
4,090,333,391,999,040,500
41
77
0.527451
false
3.198925
false
false
false
jeromecc/doctoctocbot
src/moderation/twitter/user.py
1
2364
from moderation.models import SocialUser from bot.tweepy_api import get_api as get_tweepy_api from tweepy import TweepError from tweepy.models import User as TweepyUser from community.models import Community import logging from community.helpers import get_community_twitter_tweepy_api import time logger = logging.getL...
mpl-2.0
6,726,107,315,724,089,000
30.118421
79
0.565144
false
4.402235
false
false
false
bugzPDX/airmozilla
airmozilla/manage/autocompeter.py
1
5110
import datetime import json import time import sys from pprint import pprint import requests from django.conf import settings from django.utils import timezone from django.db.models import Count from django.core.exceptions import ImproperlyConfigured from funfactory.urlresolvers import reverse from airmozilla.main....
bsd-3-clause
-4,856,101,207,579,082,000
28.709302
78
0.567515
false
3.995309
false
false
false
ufal/neuralmonkey
neuralmonkey/evaluators/chrf.py
1
3455
from typing import List, Dict from typeguard import check_argument_types import numpy as np from neuralmonkey.evaluators.evaluator import Evaluator # pylint: disable=invalid-name NGramDicts = List[Dict[str, int]] # pylint: enable=invalid-name class ChrFEvaluator(Evaluator[List[str]]): """Compute ChrF score. ...
bsd-3-clause
5,065,427,443,965,041,000
33.207921
77
0.529957
false
3.250235
false
false
false
UMONS-GFA/bdas
doc/sensors/sim_pluvio.py
1
18407
__author__ = 'kaufmanno' import numpy as np from scipy.interpolate import pchip_interpolate, interp1d import matplotlib.pyplot as plt draw_graphs = True #draw_graphs = False load_calibration = True save_calibration = False calibration_file = 'calibration.txt' single_flow = True # a varying flow otherwise a series o...
gpl-3.0
6,213,190,602,569,627,000
44.776119
194
0.574154
false
2.96934
false
false
false
public-ink/public-ink
server/appengine-staging/lib/graphene/types/generic.py
1
1233
from __future__ import unicode_literals from graphql.language.ast import (BooleanValue, FloatValue, IntValue, StringValue, ListValue, ObjectValue) from graphene.types.scalars import MIN_INT, MAX_INT from .scalars import Scalar class GenericScalar(Scalar): """ The `GenericSc...
gpl-3.0
3,297,268,475,079,431,000
30.615385
103
0.631792
false
4.419355
false
false
false
melinath/django-graph-api
django_graph_api/graphql/introspection.py
1
7781
from django_graph_api.graphql.types import ( BooleanField, CharField, Enum, ENUM, EnumField, INPUT_OBJECT, INTERFACE, List, LIST, ManyEnumField, ManyRelatedField, NON_NULL, Object, OBJECT, RelatedField, SCALAR, UNION, NonNull, ) class DirectiveLo...
mit
-8,515,198,416,324,023,000
25.198653
83
0.528081
false
4.356663
false
false
false
fsimkovic/conkit
conkit/core/struct.py
1
2751
# BSD 3-Clause License # # Copyright (c) 2016-18, University of Liverpool # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notic...
bsd-3-clause
3,594,218,753,008,442,400
39.455882
118
0.708833
false
4.010204
false
false
false
bravomikekilo/mxconsole
mxconsole/platform/flags.py
1
4765
# 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,211,316,646,001,435,600
32.321678
80
0.633998
false
4.062234
false
false
false
bundlewrap/bundlewrap
bundlewrap/utils/ui.py
1
14061
from contextlib import contextmanager, suppress from datetime import datetime from functools import wraps from os import _exit, environ, getpid, kill from os.path import join from select import select from shutil import get_terminal_size from signal import signal, SIG_DFL, SIGINT, SIGQUIT, SIGTERM from subprocess impor...
gpl-3.0
-4,341,101,949,010,468,400
31.969484
98
0.527376
false
4.03476
false
false
false
susahe/sis
sis/schedule/models.py
1
1278
from __future__ import unicode_literals from django.template.defaultfilters import slugify from django.contrib.auth.models import User from django.db import models from course.models import Activity,Course,CourseGroup from datetime import datetime # Theory Session table create # have relationship between course gro...
gpl-2.0
7,980,110,490,229,708,000
35.514286
68
0.79734
false
3.651429
false
false
false
Cinntax/home-assistant
homeassistant/components/plex/media_player.py
1
28269
"""Support to interface with the Plex API.""" from datetime import timedelta import json import logging import plexapi.exceptions import plexapi.playlist import plexapi.playqueue import requests.exceptions from homeassistant.components.media_player import MediaPlayerDevice from homeassistant.components.media_player.c...
apache-2.0
1,241,736,605,791,758,600
33.986386
88
0.564894
false
4.393007
false
false
false
djaodjin/djaodjin-pages
pages/api/sources.py
1
5950
# Copyright (c) 2021, Djaodjin Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
bsd-2-clause
5,008,858,569,694,676,000
30.989247
78
0.64084
false
4.231863
false
false
false
Zlash65/erpnext
erpnext/assets/doctype/asset/asset.py
1
23671
# -*- coding: utf-8 -*- # Copyright (c) 2016, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe, erpnext, math, json from frappe import _ from six import string_types from frappe.utils import flt, add_months, cint, now...
gpl-3.0
-5,258,987,987,461,458,000
38.320598
166
0.715137
false
3.121588
false
false
false
AISpace2/AISpace2
aispace2/jupyter/csp/csp.py
1
23307
import threading from functools import partial from time import sleep from ipywidgets import register from traitlets import Bool, Dict, Float, Instance, Unicode from aipython.cspProblem import CSP from ... import __version__ from ..stepdomwidget import ReturnableThread, StepDOMWidget from .cspjsonbridge import (csp_...
gpl-3.0
-6,535,950,557,674,089,000
38.105705
131
0.562449
false
4.249225
false
false
false
lukefrasera/cs775Homework
hw_002/scripts/gaussian_classify.py
1
9070
#!/usr/bin/env python import numpy as np from numpy import linalg as la import matplotlib.pyplot as plt import argparse import os import pdb from scipy import spatial import time import operator ''' Python Program demonstrating the use of a gaussian classifier. ''' #KNNCLassifier returns a tuple of the K closest featu...
lgpl-3.0
-3,786,826,768,799,533,600
42.605769
159
0.653032
false
3.544353
true
false
false
srowe/xen-api
scripts/examples/smapiv2.py
8
9466
#!/usr/bin/env python import os, sys, time, socket, traceback log_f = os.fdopen(os.dup(sys.stdout.fileno()), "aw") pid = None def reopenlog(log_file): global log_f if log_f: log_f.close() if log_file: log_f = open(log_file, "aw") else: log_f = os.fdopen(os.dup(sys.stdout.filen...
lgpl-2.1
-7,150,863,785,080,457,000
31.754325
105
0.570251
false
3.457268
false
false
false
Oksisane/RSS-Bot
Trolly-master/trolly/board.py
1
5227
""" Created on 8 Nov 2012 @author: plish """ from trolly.trelloobject import TrelloObject class Board(TrelloObject): """ Class representing a Trello Board """ def __init__(self, trello_client, board_id, name=''): super(Board, self).__init__(trello_client) self.id = board_id ...
gpl-3.0
-6,671,452,477,042,218,000
27.71978
79
0.579682
false
3.999235
false
false
false
zevanzhao/TCCL-Code
ADF/ADFDFTB2xyz.py
1
1334
#!/usr/bin/env python #Time-stamp: <Last updated: Zhao,Yafan zhaoyafan@mail.thu.edu.cn 2013-11-25 20:20:08> """ A script to get the optimized geometry from ADF DFTB calculation out file. """ import sys, re if (len(sys.argv) < 2): print "Usage: ADFDFTB2xyz.py [adf.out]" exit(0) ADFOUT = sys.argv[1] inp = open(AD...
gpl-3.0
2,415,750,034,143,794,000
25.68
85
0.60045
false
2.700405
false
false
false
calee0219/Course
ML/lab2/lab2_vedio.py
1
1755
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import time import pandas as pd from sklearn.preprocessing import normalize from sklearn.neighbors import KNeighborsClassifier as KNN from sklearn.metrics import confusion_matrix from sklearn.model_selection import KFold from scipy.spatial.distance import cosine as Cos d...
mit
4,068,913,304,894,074,000
30.339286
75
0.679202
false
3.128342
true
false
false
mgramsay/PlasMarkov
tweet.py
1
2137
# -*- coding: utf-8 -*- # Copyright (c) 2016 Martin Ramsay # # 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, modif...
mit
4,053,133,167,695,728,600
35.220339
79
0.680861
false
3.878403
false
false
false
dataforimpact/veliquest
scrapers/v1-plus-local-storage/jcdecaux-scraper.py
1
3422
import os import sys import requests import json import datetime as dt from boto.s3.connection import S3Connection, Location from boto.s3.key import Key def unsafe_getenviron(k): v = os.environ.get(k) if(v): return v else: raise Exception('environment variable %s not set' % k) JC_DECAUX_API_KEY = unsafe_gete...
mit
4,501,067,044,483,126,000
25.944882
119
0.697545
false
2.720191
false
false
false
gavinfish/leetcode-share
python/065 Valid Number.py
1
1907
''' Validate if a given string is numeric. Some examples: "0" => true " 0.1 " => true "abc" => false "1 a" => false "2e10" => true Note: It is intended for the problem statement to be ambiguous. You should gather all requirements up front before implementing one. ''' class Solution(object): def isNumber(self, s):...
mit
-3,100,469,301,061,550,000
32.473684
132
0.528579
false
3.956432
false
false
false
grizmio/DictQueue
DictQueue/DictQueue.py
1
4887
import asyncio import time from collections import OrderedDict class KeyNotInDictException(Exception): pass class KeyVanishedException(Exception): pass class AlreadyWaitingForItException(Exception): pass class DictContainer: def __init__(self, max_size): self.__requested_keys = set() ...
mit
1,505,946,286,195,720,000
28.089286
100
0.516268
false
4.298153
false
false
false
ucsd-ccbb/Oncolist
src/server/Louvain/cluster_analysis_module.py
1
30972
import pandas as pd import numpy as np import time, os, shutil, re, community import networkx as nx import matplotlib.pyplot as plt import scipy.spatial.distance as ssd import scipy.cluster.hierarchy as sch # import cluster_connect module import cluster_connect """ --------------------------------------------------...
mit
-3,302,082,777,373,428,000
38.912371
211
0.599348
false
3.270884
false
false
false