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
IIIT-Delhi/jobport
placement/jobport/urls.py
1
4188
# //======================================================================= # // Copyright JobPort, IIIT Delhi 2015. # // Distributed under the MIT License. # // (See accompanying file LICENSE or copy at # // http://opensource.org/licenses/MIT) # //======================================================================...
mit
-534,863,692,878,665,340
57.985915
104
0.443649
false
4.474359
false
true
false
bklang/GO2
stats.py
1
3669
# # stats class for Gig-o-Matic 2 # # Aaron Oppenheimer # 29 Jan 2014 # from google.appengine.ext import ndb from requestmodel import * import webapp2_extras.appengine.auth.models import webapp2 from debug import * import assoc import gig import band import member import logging import json def stats_key(member_n...
gpl-3.0
2,893,236,756,040,592,400
29.330579
122
0.620878
false
3.305405
false
false
false
ray-project/ray
rllib/env/wrappers/dm_control_wrapper.py
1
7328
""" DeepMind Control Suite Wrapper directly sourced from: https://github.com/denisyarats/dmc2gym MIT License Copyright (c) 2020 Denis Yarats 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 witho...
apache-2.0
-323,708,426,664,062,600
34.572816
79
0.600573
false
3.97397
false
false
false
nathanbjenx/cairis
cairis/bin/gt2pc.py
1
6864
#!/usr/bin/python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
apache-2.0
-7,310,285,682,522,548,000
43.571429
741
0.626748
false
3.141419
false
false
false
ping/instagram_private_api
instagram_web_api/http.py
1
3461
from io import BytesIO import sys import codecs import mimetypes import random import string from .compat import compat_cookiejar, compat_pickle class ClientCookieJar(compat_cookiejar.CookieJar): """Custom CookieJar that can be pickled to/from strings """ def __init__(self, cookie_string=None, policy=Non...
mit
-6,506,087,738,307,260,000
35.819149
119
0.588847
false
4.091017
false
false
false
catalpainternational/OIPA
OIPA/iati/management/commands/organisation_name_updater.py
1
1062
from __future__ import print_function from builtins import object from django.core.management.base import BaseCommand from iati.models import Organisation from iati_synchroniser.models import Publisher class Command(BaseCommand): option_list = BaseCommand.option_list counter = 0 def handle(self, *args, **...
agpl-3.0
1,909,566,768,982,811,000
32.1875
87
0.629002
false
4.481013
false
false
false
jpleger/django-analystnotes
analystnotes/migrations/0001_initial.py
1
1830
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
bsd-3-clause
8,535,255,927,093,436,000
43.634146
122
0.596721
false
4.187643
false
false
false
xissy/titanium-mobile-sdk
module/iphone/templates/build.py
1
6525
#!/usr/bin/env python # # Appcelerator Titanium Module Packager # # import os, subprocess, sys, glob, string import zipfile from datetime import date cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) os.chdir(cwd) required_module_keys = ['name','version','moduleid','description','copyright','...
apache-2.0
4,836,279,273,150,975,000
28.794521
122
0.677548
false
2.903872
true
false
false
nens/threedi-qgis-plugin
tool_commands/control_structures/create_measuring_group_dialog.py
1
14526
from pathlib import Path from qgis.PyQt import uic from qgis.PyQt.QtWidgets import QAbstractItemView from qgis.PyQt.QtWidgets import QDialog from qgis.PyQt.QtWidgets import QPushButton from qgis.PyQt.QtWidgets import QTableWidget from qgis.PyQt.QtWidgets import QTableWidgetItem from qgis.PyQt.QtWidgets import QVBoxLayo...
gpl-3.0
-5,747,395,667,659,924,000
40.741379
87
0.629423
false
3.99505
false
false
false
psychopy/versions
psychopy/visual/line.py
1
2906
#!/usr/bin/env python # -*- coding: utf-8 -*- """Creates a Line between two points as a special case of a :class:`~psychopy.visual.ShapeStim` """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public Licen...
gpl-3.0
-6,665,230,088,042,024,000
32.790698
79
0.627667
false
3.874667
false
false
false
jdweeks/screener
screener.py
1
2569
#!/usr/local/bin/python3 import os, sys, getopt import quandl as ql import pandas as pd import numpy as np from pylab import plot, figure, savefig # read Russell 3000 constituents from a csv def readRuss(): try: ticks = [] russ = open('russ3.csv', 'r').read() split = russ.split('\n') ...
mit
-2,508,157,812,468,462,600
26.042105
70
0.5652
false
3.179455
false
false
false
spesmilo/electrum
electrum/plugins/email_requests/qt.py
1
9900
#!/usr/bin/env python # # Electrum - Lightweight Bitcoin Client # Copyright (C) 2015 Thomas Voegtlin # # 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...
mit
-5,328,565,570,429,520,000
34.483871
103
0.626162
false
4.090909
true
false
false
sveetch/sveedocuments
sveedocuments/utils/rest_roles.py
1
4637
# -*- coding: utf-8 -*- """ ReSTructured additional roles """ import os, re from docutils import nodes, utils from docutils.parsers.rst import roles from django.conf import settings from django.core.urlresolvers import reverse from django.core.cache import cache from django.contrib.sites.models import Site from svee...
mit
807,631,129,012,385,500
40.774775
208
0.671339
false
3.496983
false
false
false
christiansandberg/canopen
canopen/network.py
1
12500
try: from collections.abc import MutableMapping except ImportError: from collections import MutableMapping import logging import threading import struct try: import can from can import Listener from can import CanError except ImportError: # Do not fail if python-can is not installed can = N...
mit
-5,675,439,393,431,230,000
31.552083
114
0.5908
false
4.204507
false
false
false
opreaalex/skeletout
templates/_app_name_/helpers.py
1
2399
# -*- coding: utf-8 -*- """ _app_name_.helpers ~~~~~~~~~~~~~~~~ _app_name_ helpers module """ import pkgutil import importlib from flask import Blueprint from flask.json import JSONEncoder as BaseJSONEncoder def register_blueprints(app, package_name, package_path): """Register all Blueprint instanc...
mit
7,411,269,388,410,093,000
30.155844
80
0.628178
false
4.179443
false
false
false
dabrahams/zeroinstall
zeroinstall/injector/model.py
1
45719
"""In-memory representation of interfaces and other data structures. The objects in this module are used to build a representation of an XML interface file in memory. @see: L{reader} constructs these data-structures @see: U{http://0install.net/interface-spec.html} description of the domain model @var defaults: Defau...
lgpl-2.1
-2,451,330,524,096,340,000
33.426958
177
0.683326
false
3.312971
false
false
false
lemonade512/BluebonnetsPointsApp
bluebonnetspointsapp/routes.py
1
8807
"""`main` is the top level module for your Flask application.""" import logging import json from flask import Flask, request, redirect, url_for, jsonify from flask_restful import Resource, Api from google.appengine.api import users from google.appengine.ext import deferred from datetime import datetime from models.u...
gpl-3.0
1,609,514,002,009,681,000
35.695833
97
0.622459
false
4.006824
false
false
false
evanunderscore/pygnurl
pygnurl/callback_mananger.py
1
1302
"""Callback management utilities""" import collections from ctypes import * # pylint: disable=wildcard-import,unused-wildcard-import import logging class CallbackManager(object): """Manager for ctypes DLL hooks""" def __init__(self, dll): self.dll = dll self.hooks = collections.defaultdict(di...
gpl-2.0
4,814,608,374,765,069,000
34.189189
79
0.6298
false
4.2
false
false
false
eHealthAfrica/LMIS
LMIS/inventory/api/serializers.py
1
2227
""" Serializer for Inventory App related API end-points """ #import LMIS project modules from core.api.serializers import BaseModelSerializer from inventory.models import (Inventory, InventoryLine, ConsumptionRecord, ConsumptionRecordLine, IncomingShipment, IncomingShipmentLine, Outgo...
gpl-2.0
-7,145,018,752,463,819,000
28.315789
115
0.705433
false
4.668763
false
false
false
hoto17296/flask-minitwit
server/views.py
1
3272
from flask import request, session, url_for, redirect, render_template, abort, g, flash from . import app from .lib import Auth, AuthError, User, Timeline @app.before_request def before_request(): g.auth = Auth(session, app.config.get('SECRET_KEY')) @app.route('/') def timeline(): if not g.auth.authorized()...
bsd-3-clause
-7,375,406,376,846,156,000
29.018349
94
0.61522
false
3.743707
false
false
false
snare/voltron
voltron/styles.py
1
2382
from pygments.style import Style from pygments.token import Token, Comment, Name, Keyword, Generic, Number, Operator, String, Punctuation, Error BASE03 = '#002b36' BASE02 = '#073642' BASE01 = '#586e75' BASE00 = '#657b83' BASE0 = '#839496' BASE1 = '#93a1a1' BASE2 = '#eee8d5' BASE3 = '#fdf6e3' YELLOW = '#b58900' ORANGE ...
mit
-600,035,029,460,470,800
22.82
111
0.569689
false
3.598187
false
false
false
rrafiringa/is210-week-04-synthesizing
task_01.py
1
1415
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Temperature conversion """ import decimal decimal.getcontext().prec = 5 ABSOLUTE_DIFFERENCE = decimal.Decimal('273.15') def fahrenheit_to_kelvin(degrees): """ Convert temperature from Farenheit to Kelvin units. Args: degrees (float): Farenheit tem...
mpl-2.0
3,742,161,318,189,985,000
21.109375
65
0.642403
false
3.223235
false
false
false
grbot/agd
laura/add-ANC-to-vcf.py
1
3691
#!/usr/bin/env python # Author: Jeffrey M Kidd # 2 September 2011 # add-ANC-to-vcf.py # adds ancestral annotation based on ensemble takes from genome data archive # you'll have to do your own filtering based on qual etc. import sys import os import genomedata import math from genomedata import Genome from optparse im...
mit
3,805,306,246,244,782,000
27.175573
102
0.636684
false
3.328224
false
false
false
Hillshum/gPodder-tagging
src/gpodder/gtkui/desktop/episodeselector.py
1
18139
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2010 Thomas Perl and the gPodder Team # # gPodder 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...
gpl-3.0
-1,909,551,925,635,607,300
42.085511
128
0.587739
false
4.327052
false
false
false
DerThorsten/nifty
scripts/new_plcm.py
1
19851
import nifty import numpy import nifty.segmentation import nifty.graph.rag import nifty.graph.agglo import vigra import matplotlib.pyplot as plt from random import shuffle #import fastfilters numpy.random.seed(32) Objective = nifty.graph.opt.lifted_multicut.PixelWiseLmcObjective2D class PlmcObjective2D(nifty.gr...
mit
114,205,025,194,031,790
27.480631
141
0.557705
false
3.47897
false
false
false
simonmonk/make_action
python/experiments/mixing_colors.py
2
1562
from Tkinter import * import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) # (1) GPIO.setup(18, GPIO.OUT) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.OUT) pwmRed = GPIO.PWM(18, 500) # (2) pwmRed.start(100) pwmGreen = GPIO.PWM(23, 500) pwmGreen.start(100) pwmBlue = GPIO.PWM(24, 500) pwmBlue.start(10...
mit
-5,904,124,153,999,706,000
25.05
60
0.608195
false
3.021277
false
false
false
jaracil/nxpy
pynexus/pynexus.py
1
17276
# -*- coding: utf-8 -*- ############################################################################## # # pynexus, a Python library for easy playing with Nexus # Copyright (C) 2016 by the pynexus team # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU L...
lgpl-3.0
8,857,020,541,984,786,000
29.685613
133
0.539998
false
4.142926
false
false
false
kwiecien/ppl
ppl/scripts/face_paths.py
1
2370
#!/usr/bin/env python import datetime import rospy from geometry_msgs.msg import PointStamped from people_msgs.msg import People from tf import ExtrapolationException, LookupException, TransformListener FILE = file RECORDED_PEOPLE = dict() def listener(): global transform_listener transform_listener = Tran...
gpl-3.0
6,371,509,571,875,838,000
23.6875
93
0.62616
false
3.410072
false
false
false
CICIC/gestioCIimporter
cleanCSVdata.py
1
2732
# coding: utf8 import re import logging def cleanDate(date): "Clean date format from yyyy[/]mm[/]dd" date = date.split(' ')[0] if date != '': try: query = r'([0-9]|0[1-9]|[12][0-9]|3[01])/([0-9]|0[1-9]|1[012])/((19|20)[0-9][0-9]|1[0-9])' date = re.match(query, date).group(...
agpl-3.0
-2,201,793,729,169,544,200
22.756522
102
0.514275
false
3.104545
false
false
false
DLunin/bayescraft
graphmodels/generators.py
1
4075
import networkx as nx import numpy as np import pandas as pd import scipy as sp import scipy.stats as stats from itertools import * import pytest from bayescraft.graphmodels.factors import (TableCPD, MultivariateGaussianDistribution, ParametricFunctionCPD, LinearGaussianDistr...
mit
4,763,116,395,961,582,000
31.094488
95
0.567853
false
3.031994
false
false
false
miikama/telegram-bot
bot2.py
1
4609
import urllib import urllib2 import pprint import json import datetime import time import logging from calendar_bot import CalendarClient '''returns 'TANAAN!!' if today is paapaiva and string for something else returns None if no paapaiva in next 10 days ''' def is_paapaiva(client): #the events from raati15 cal...
mit
1,012,354,969,156,449,700
34.453846
164
0.73248
false
2.66879
false
false
false
mfkaptan/biyos-app
biyos/biyos.py
1
13470
import cookielib import urllib import urllib2 import sys import biyosui import base64 as b64 import re from docx import Document from docx.shared import Inches from openpyxl import load_workbook from PyQt4 import QtGui from bs4 import BeautifulSoup from math import ceil # No, Blok, Daire kiraci = [[7710, "A", 6]] DO...
mit
9,147,751,380,979,631,000
36.313019
110
0.558129
false
3.288574
false
false
false
GoogleCloudPlatform/PerfKitBenchmarker
tests/providers/aws/aws_vpc_endpoint_test.py
1
4111
# Copyright 2019 PerfKitBenchmarker 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 appli...
apache-2.0
-2,071,237,302,103,893,000
35.705357
80
0.704208
false
3.344996
true
false
false
mvaled/sentry
src/sentry/integrations/gitlab/issues.py
2
6466
from __future__ import absolute_import import re from django.core.urlresolvers import reverse from sentry.integrations.exceptions import ApiError, IntegrationError, ApiUnauthorized from sentry.integrations.issues import IssueBasicMixin from sentry.utils.http import absolute_uri ISSUE_EXTERNAL_KEY_FORMAT = re.compile...
bsd-3-clause
5,595,595,440,710,333,000
35.122905
99
0.548871
false
4.185113
false
false
false
Alshain-Oy/Cloudsnake-Application-Server
clients/htpasswdFS.py
1
5036
#!/usr/bin/env python # Cloudsnake Application server # Licensed under Apache License, see license.txt # Author: Markus Gronholm <markus@alshain.fi> Alshain Oy import fuse import time, sys import stat, os, errno import libCloudSnakeClient as SnakeClient fuse.fuse_python_api = (0, 2) class ObjectStat(fuse.Stat)...
apache-2.0
8,844,387,426,208,073,000
20.991266
78
0.626291
false
2.804009
false
false
false
ebu/ebu-tt-live-toolkit
ebu_tt_live/node/producer.py
1
3589
import logging from .base import AbstractProducerNode from datetime import timedelta from ebu_tt_live.bindings import div_type, br_type, p_type, style_type, styling, layout, region_type, span_type from ebu_tt_live.bindings._ebuttdt import LimitedClockTimingType from ebu_tt_live.documents.ebutt3 import EBUTT3Document fr...
bsd-3-clause
-5,551,885,586,373,914,000
30.761062
111
0.575091
false
4.227326
false
false
false
googleinterns/where-is-my-watch
GpsDataAnalyzer/visualizer/visualizer.py
1
6027
""" Usage: visualizer.py Visualize the classified data as histogram and line graph with min/max/mean/std/availability information """ import matplotlib.pyplot as plt import matplotlib.dates as dates import numpy as np import pandas as pd import os from datetime import datetime from datetime import timedelta from date...
apache-2.0
8,937,705,627,102,015,000
34.040698
139
0.60959
false
3.681735
false
false
false
mskala/birdie
birdieapp/gui/statusicon.py
1
2075
# -*- coding: utf-8 -*- # Copyright (C) 2013-2014 Ivo Nunes/Vasco Nunes # 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 versio...
gpl-3.0
2,877,588,231,206,584,300
32.467742
70
0.659759
false
3.646749
false
false
false
Didacti/elixir
tests/test_dict.py
1
5070
""" test the deep-set functionality """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import six from elixir import * def setup(): metadata.bind = 'sqlite://' global Table1, Table2, Table3 class Tab...
mit
-3,058,275,147,593,896,400
26.857143
76
0.506312
false
3.003555
true
false
false
Jarvie8176/wows-noob-warning
API/makeshift/config.py
1
1407
player_search = 'http://worldofwarships.com/en/community/accounts/search/?search=%s' player_search_key_search_page = 'js-search-results' player_search_key_player_page = 'og:url' player_search_key_error_page = 'Error' player_search_id_pattern_search_page = '(?<=accounts/).*(?=-)' player_search_id_pattern_player_page = '...
mit
8,899,890,509,648,553,000
40.382353
90
0.50462
false
3.431707
false
false
false
cameronbwhite/PyOLP
PyOLP/api_objects.py
1
12957
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Copyright (C) 2013, Cameron White # # PyGithub is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # S...
gpl-3.0
-8,386,608,160,705,220,000
26.864516
92
0.561704
false
4.44037
false
false
false
schleichdi2/OPENNFR-6.1-CORE
opennfr-openembedded-core/meta/lib/oeqa/selftest/archiver.py
1
1776
from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import bitbake, get_bb_vars from oeqa.utils.decorators import testcase import glob import os import shutil class Archiver(oeSelfTest): @testcase(1345) def test_archiver_allows_to_filter_on_recipe_name(self): """ Summary: T...
gpl-2.0
-3,082,833,724,617,833,500
40.302326
95
0.63964
false
3.530815
true
false
false
phil-el/phetools
hocr/hocr.py
1
9939
# -*- coding: utf-8 -*- # # @file hocr.py # # @remark Copyright 2014 Philippe Elie # @remark Read the file COPYING # # @author Philippe Elie import sys import os from common import utils import hashlib from ocr import pdf_to_djvu from ocr import ocr_djvu from ocr import djvu_text_to_hocr from ocr import ocr from commo...
gpl-3.0
1,838,696,693,971,659,800
27.282051
297
0.586481
false
3.185815
false
false
false
dchaplinsky/garnahata.in.ua
garnahata_site/garnahata_site/urls.py
1
2269
from django.conf import settings from django.conf.urls.static import static from django.contrib import admin from django.contrib.sitemaps.views import sitemap from django.contrib.sitemaps import GenericSitemap from django.conf.urls import include, url from wagtail.core import urls as wagtail_urls from wagtail.admin i...
mit
-5,547,407,876,952,480,000
31.884058
82
0.651829
false
3.69544
false
true
false
aaltay/beam
sdks/python/apache_beam/typehints/typed_pipeline_test.py
1
19346
# # 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 us...
apache-2.0
-3,108,936,589,871,372,300
35.709677
80
0.621834
false
3.283435
true
false
false
kubeflow/katib
cmd/suggestion/nas/darts/v1beta1/main.py
1
1428
# Copyright 2021 The Kubeflow Authors. # # 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 ...
apache-2.0
558,172,976,097,228,500
31.454545
74
0.727591
false
3.552239
false
false
false
arunkgupta/gramps
gramps/plugins/lib/maps/placeselection.py
1
9938
# -*- python -*- # -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011-2012 Serge Noiraud # # 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; eithe...
gpl-2.0
-5,166,526,136,838,341,000
37.972549
89
0.543872
false
4.132225
false
false
false
zenpoy/pokerstats
app.py
1
3503
import os from flask import Flask, request, jsonify from mongoengine import * import datetime app = Flask(__name__) mongodb_uri = os.environ.get('MONGODB_URI', 'localhost:27017') connect("pokerstats", host=mongodb_uri) class Player(Document): name = StringField(required=True, unique=True, max_length=200) class R...
mit
-8,197,957,731,518,686,000
24.764706
63
0.675992
false
2.92404
false
false
false
srajag/nova
nova/objects/ec2.py
1
3208
# 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 agree...
apache-2.0
-248,260,300,879,144,450
33.12766
78
0.62687
false
3.604494
false
false
false
jbrendel/RESTx
src/python/restx/components/TwitterComponent.py
1
8443
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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...
gpl-3.0
-6,494,160,187,986,690,000
37.20362
160
0.540803
false
4.633919
false
false
false
kmackay/emk
modules/c.py
1
22769
import os import logging import shlex import re import sys import traceback log = logging.getLogger("emk.c") utils = emk.module("utils") fix_path_regex = re.compile(r'[\W]+') class _GccCompiler(object): """ Compiler class for using gcc/g++ to compile C/C++ respectively. In order for the emk c modul...
bsd-2-clause
672,571,377,680,635,400
43.998024
149
0.587421
false
4.121832
false
false
false
JFK422/Hitch
components/Menu/menuEditTab.py
1
2326
import qtawesome as qta from components.Menu import menuSeperator from PyQt5 import QtGui, QtCore, QtWidgets #Menu widget placed in the stack of vLPart class MenuEdit(QtWidgets.QWidget): def setup(self): vMenu = QtWidgets.QVBoxLayout() vMenu.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) ...
gpl-3.0
5,954,955,563,805,491,000
31.774648
115
0.674549
false
4.09507
false
false
false
dkeester/learn_python
file_read_print/file_read_print.py
1
1748
# /usr/bin/env python3 # -*- coding: utf-8 -*- # A program to figure out the basics of file I/O data = """\ I met a traveller from an antique land Who said: Two vast and trunkless legs of stone Stand in the desert. Near them, on the sand, Half sunk, a shattered visage lies, whose frown, And wrinkled lip, and sneer of c...
apache-2.0
6,787,229,724,184,578,000
29.666667
59
0.688787
false
3.11032
false
false
false
jhamman/storylines
setup.py
1
4509
#!/usr/bin/env python import os import re import sys import warnings from setuptools import setup MAJOR = 0 MINOR = 0 MICRO = 0 ISRELEASED = False VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO) QUALIFIER = '' DISTNAME = 'storylines' LICENSE = 'GNU General Public License v3.0' AUTHOR = 'Joseph Hamman' AUTHOR_EMAIL = '...
gpl-3.0
5,283,064,456,767,113,000
29.883562
79
0.642271
false
3.726446
false
false
false
apdjustino/DRCOG_Urbansim
src/opus_gui/results_manager/views/ui_results_browser.py
1
12710
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/Users/ckla/Documents/workspace/opus_trunk/opus_gui/results_manager/views/results_browser.ui' # # Created: Sun May 10 17:20:29 2009 # by: PyQt4 UI code generator 4.4.4 # # WARNING! All changes made in this file will be lost! from PyQt4...
agpl-3.0
-1,741,197,974,735,579,600
61.925743
200
0.735877
false
4.019608
true
false
false
rherlt/GoodVibrations
src/GoodVibrations.Listener/speech_recognition/examples/microphone_recognition.py
1
3228
#!/usr/bin/env python3 # NOTE: this example requires PyAudio because it uses the Microphone class import speech_recognition as sr # obtain audio from the microphone r = sr.Recognizer() with sr.Microphone() as source: print("Say something!") audio = r.listen(source) # recognize speech using Sphinx try: p...
mit
1,320,618,614,434,476,300
46.470588
148
0.757125
false
3.474704
false
false
false
ThiefMaster/jinja2
scripts/make-release.py
2
4375
#!/usr/bin/env python # -*- coding: utf-8 -*- """ make-release ~~~~~~~~~~~~ Helper script that performs a release. Does pretty much everything automatically for us. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import os import re from dat...
bsd-3-clause
-7,196,274,055,336,344,000
25.676829
87
0.573714
false
3.673384
false
false
false
Metaleer/hexchat-scripts
regexkb.py
1
2158
from __future__ import print_function __module_name__ = 'Regex Kickban' __module_version__ = '0.2' __module_description__ = 'Kickbans clients from specified channels on regex match against their message or notice to channel' __author__ = 'Daniel A. J.' # TODO: # When ChanServ-type services are available, ask for op...
mit
3,880,300,969,970,562,600
36.206897
125
0.629286
false
3.340557
false
false
false
andreimaximov/algorithms
leetcode/algorithms/wildcard-matching/solution.py
1
1743
#!/usr/bin/env python class Solution(object): def isMatch(self, s, p): """ Returns a boolean indicating if the pattern p matches string s. See LeetCode problem description for full pattern spec. """ n = len(s) m = len(p) # If the pattern has more non-star c...
mit
-6,150,173,116,118,105,000
33.176471
79
0.491681
false
3.78913
false
false
false
caspar/PhysicsLab
21_Midterm/plack2.py
1
1726
# Lab 0 # Linear Least Squares Fit # Author Caspar Lant import numpy as np from scipy.optimize import curve_fit import matplotlib.pyplot as plt # load csv file DATA = "data.csv"; frequency, voltage = np.loadtxt(DATA, skiprows=1 , unpack=True, delimiter=','); # plot temperature vs. pressure + error bars plt.ylabel("...
mit
2,794,208,592,931,171,300
30.381818
112
0.614716
false
2.7616
false
false
false
raulhigueras/LolaVA
speech/input.py
1
2363
# -*- coding: utf-8 -*- # Recoge el input, ya sea mediante el STT de Google o por el bot de Telegram import speech_recognition as sr import time, datetime, telepot, os from config import get_config bot = telepot.Bot('BOT_KEY') def ask(): modo = get_config.get_profile()["modo"] os.system("aplay resources/sound2.wa...
mit
6,502,096,092,672,122,000
27.011905
86
0.59966
false
2.828125
false
false
false
OCA/purchase-workflow
setup/_metapackage/setup.py
1
3639
import setuptools with open('VERSION.txt', 'r') as f: version = f.read().strip() setuptools.setup( name="odoo12-addons-oca-purchase-workflow", description="Meta package for oca-purchase-workflow Odoo addons", version=version, install_requires=[ 'odoo12-addon-procurement_purchase_no_groupin...
agpl-3.0
6,702,452,264,549,585,000
45.063291
76
0.677109
false
3.64995
false
false
false
Strassengezwitscher/Strassengezwitscher
crowdgezwitscher/contact/mail.py
1
5814
# pylint: disable=bad-builtin from email.utils import formatdate from tempfile import TemporaryDirectory from django.core.mail import EmailMessage, SafeMIMEText, SafeMIMEMultipart, make_msgid from django.core.mail.utils import DNS_NAME from django.core.mail.backends.locmem import EmailBackend as LocMemEmailBackend fro...
mit
-1,930,372,365,059,580,700
40.528571
116
0.642071
false
4.348542
false
false
false
MuffinMedic/CloudBot
plugins/horoscope.py
1
2411
# Plugin by Infinity - <https://github.com/infinitylabs/UguuBot> import requests from bs4 import BeautifulSoup from sqlalchemy import Table, String, Column, select from cloudbot import hook from cloudbot.util import database table = Table( 'horoscope', database.metadata, Column('nick', String, primary_ke...
gpl-3.0
-6,390,855,012,608,246,000
24.648936
98
0.591456
false
3.33011
false
false
false
alexanderad/pony-standup-bot
tests/test_tasks_send_report_summary.py
1
7806
from __future__ import absolute_import from datetime import datetime from flexmock import flexmock import pony.tasks from tests.test_base import BaseTest class SendReportSummaryTest(BaseTest): def setUp(self): super(SendReportSummaryTest, self).setUp() self.bot.storage.set('report', {}) ...
mit
8,936,455,861,183,878,000
32.646552
76
0.492954
false
4.097638
true
false
false
DirectXMan12/datanozzle
datanozzle/client.py
1
5713
# datagrepper-client -- A Python client for datagrepper # Copyright (C) 2015 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...
gpl-2.0
-5,897,578,573,471,983,000
25.821596
77
0.560126
false
3.816299
false
false
false
electricity345/Full.Text.Classification.Thesis
src/classify.phrase.match/src/text.py
1
13082
import codecs import htmlentitydefs import json import logging import nltk # Uses NLTK Version 2.0b9 import os import re import unicodedata class positive_match: def __init__(self, match, offset): self.match = match self.offset = offset def getMatch(self): return self.match def ge...
mit
-7,547,081,844,341,308,000
47.273063
154
0.515365
false
4.836229
false
false
false
dwdii/emotional-faces
src/emotion_model.py
1
20888
import csv import os import time from scipy import misc import keras.callbacks as cb import keras.utils.np_utils as np_utils from keras.models import Sequential from keras.layers.convolutional import Convolution2D from keras.layers.core import Dense, Dropout, Activation, Flatten from keras.layers import MaxPooling2D,...
apache-2.0
5,617,332,157,175,504,000
31.84434
106
0.632756
false
3.237948
true
false
false
mikesname/ehri-collections
ehriportal/portal/migrations/0014_auto__add_field_collection_notes__add_unique_collection_identifier_rep.py
1
17462
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Collection.notes' db.add_column('portal_collection', 'notes', self.gf(...
mit
374,222,808,844,784,830
82.152381
174
0.542664
false
3.655432
false
false
false
brendano/twitter_geo_preproc
geo2_pipeline/preproc8/45_make_vocab/standalone_wc.py
1
1387
import re,sys,os,itertools import ujson as json ## Umm, try to replicate config in 50_quadify ... OPTS = {} OPTS['min_date'] = '2009-08-03' OPTS['max_date'] = '2012-09-30' OPTS['msa_county_file'] = os.path.join(os.path.dirname(__file__), '../../../geo_metro/msa_counties.tsv') OPTS['num_msas'] = 200 countyfips2regioni...
mit
-2,551,247,292,016,847,400
30.522727
104
0.599856
false
3.116854
false
false
false
pierg75/pier-sosreport
sos/plugins/selinux.py
1
2104
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but...
gpl-2.0
-5,123,982,218,898,091,000
31.875
73
0.574144
false
4.241935
false
false
false
chipx86/the-cure
thecure/layers.py
1
5377
import pygame class SpriteQuadTree(object): def __init__(self, rect, depth=6, parent=None): depth -= 1 self.rect = rect self.sprites = [] self.parent = parent self.depth = depth self.cx = self.rect.centerx self.cy = self.rect.centery self._moved_cnx...
mit
5,568,242,331,991,032,000
28.222826
78
0.525386
false
3.971196
false
false
false
SnabbCo/neutron
neutron/db/l3_db.py
1
46915
# Copyright 2012 VMware, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
apache-2.0
-7,870,026,785,524,489,000
46.581136
79
0.544431
false
4.279394
false
false
false
SunPower/Carousel
simkit/contrib/readers.py
1
6137
""" Custom data readers including :class:`simkit.contrib.readers.ArgumentReader`, :class:`simkit.contrib.readers.DjangoModelReader` and :class:`simkit.contrib.readers.HDF5Reader`. """ from __future__ import ( absolute_import, division, print_function, unicode_literals) import numpy as np import h5py from simkit.co...
bsd-3-clause
-144,540,593,695,385,950
37.35625
80
0.61447
false
4.058862
false
false
false
anthonyng2/Machine-Learning-For-Finance
Regression Based Machine Learning for Algorithmic Trading/Pairs Trading scikit-learn Linear.py
1
5074
''' Anthony NG @ 2017 ## MIT License THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAI...
mit
-402,640,299,320,053,200
37.333333
460
0.58987
false
3.528512
false
false
false
ChinaMassClouds/copenstack-server
openstack/src/horizon-2014.2/openstack_dashboard/dashboards/project/access_and_security/floating_ips/workflows.py
1
6184
# Copyright 2012 Nebula, 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 agreed...
gpl-2.0
661,193,687,322,583,200
38.139241
78
0.602523
false
4.484409
false
false
false
dbarbier/privot
python/test/t_DistFunc_beta.py
1
1686
#! /usr/bin/env python from openturns import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : # Beta related functions # pBeta p1Min = 0.2 p1Max = 5.0 n1 = 5 p2Min = 0.2 p2Max = 5.0 n2 = 5 xMin = 0.1 xMax = 0.9 nX = 5 for i1 in range(n1): p1 = p1Min + (p1Max...
lgpl-3.0
495,374,394,030,962,700
26.639344
149
0.456109
false
2.358042
false
false
false
badele/home-assistant
homeassistant/components/light/tellstick.py
1
4248
""" homeassistant.components.light.tellstick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for Tellstick lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.tellstick/ """ from homeassistant.components.light import Light, ATTR_BRIGHTNESS from...
mit
1,873,232,507,389,760,800
33.819672
78
0.621469
false
4.068966
false
false
false
juliantaylor/scipy
scipy/interpolate/fitpack2.py
1
55084
""" fitpack --- curve and surface fitting with splines fitpack is based on a collection of Fortran routines DIERCKX by P. Dierckx (see http://www.netlib.org/dierckx/) transformed to double routines by Pearu Peterson. """ # Created by Pearu Peterson, June,August 2003 from __future__ import division, print_function, abs...
bsd-3-clause
-6,407,795,155,517,847,000
35.845485
81
0.563176
false
3.57851
false
false
false
apanda/modeling
tests/examples/lsrr_example.py
1
2652
import components def LSRRExample (): ctx = components.Context(['e0' , 'e1', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'], \ ['ip_e0', 'ip_e1', 'ip_a', 'ip_b', 'ip_c', 'ip_d', 'ip_e', 'ip_f', 'ip_g', 'ip_h']) net = components.Network(ctx) # Register something that tells us about LSR ...
bsd-3-clause
-5,174,499,600,245,879,000
41.774194
111
0.424962
false
3.090909
false
false
false
hjanime/VisTrails
vistrails/db/versions/v1_0_2/domain/vistrail.py
1
9546
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
bsd-3-clause
-2,098,377,584,519,645,000
42.589041
80
0.593233
false
4.154047
false
false
false
fake-name/ChromeController
ChromeController/manager.py
1
35830
import distutils.spawn import os.path import sys import subprocess import pprint import types import json import base64 import signal import pprint import time import http.cookiejar import urllib.parse import ChromeController.filter_funcs as filter_funcs from ChromeController.cr_exceptions import ChromeResponseNotRec...
bsd-3-clause
-1,907,269,585,833,294,600
31.221223
184
0.661792
false
3.491522
false
false
false
bdang2012/taiga-back-casting
taiga/projects/signals.py
1
3787
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-6,576,361,779,421,681,000
35.747573
102
0.705416
false
3.773679
false
false
false
reinvantveer/edna-ld
etl/lib/MIFparser.py
1
2473
from osgeo import gdal import signal from osgeo import ogr import json gdal.UseExceptions() """ This module has a heavy dependency on the python GDAL package, which can be a total pain in the ass to install, depending on your platform. But it is needed for parsing the Mapinfo Interchange Format (MIF) files... ...
mit
209,170,776,351,899,870
29.9125
102
0.615042
false
4.220137
false
false
false
stephanie-wang/ray
python/ray/tune/schedulers/async_hyperband.py
1
7105
import logging import numpy as np from ray.tune.schedulers.trial_scheduler import FIFOScheduler, TrialScheduler logger = logging.getLogger(__name__) class AsyncHyperBandScheduler(FIFOScheduler): """Implements the Async Successive Halving. This should provide similar theoretical performance as HyperBand but...
apache-2.0
-8,235,873,777,404,223,000
38.692737
79
0.580859
false
3.982623
false
false
false
Bjwebb/detecting-clouds
test.py
1
1519
from utils import get_sidereal_time from process import open_fits, flatten_max, DataProcessor import dateutil.parser import os, shutil dp = DataProcessor() dp.outdir = 'test/out' dp.verbose = 1 #date_obs = '2011-05-25T06:00:10' date_obs = '2012-02-29T10:37:12' name = date_obs + '.fits' path = os.path.join('sym', nam...
mit
-2,582,954,058,109,025,000
36.04878
125
0.626728
false
2.828678
false
false
false
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pandas/core/reshape.py
1
38451
# pylint: disable=E1101,E1103 # pylint: disable=W0703,W0622,W0613,W0201 from pandas.compat import range, zip from pandas import compat import itertools import numpy as np from pandas.core.series import Series from pandas.core.frame import DataFrame from pandas.core.sparse import SparseDataFrame, SparseSeries from pa...
mit
5,223,546,128,094,792,000
32.233362
88
0.565369
false
3.710054
false
false
false
projectatomic/osbs-client
tests/cli/test_capture.py
1
1660
""" Copyright (c) 2015, 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import absolute_import import json import os import pytest from osbs.constants import DEFAULT_NAMESPACE from osbs.cli...
bsd-3-clause
-4,635,834,311,523,012,000
30.320755
88
0.633133
false
3.509514
true
false
false
qPCR4vir/orange3
Orange/widgets/visualize/owboxplot.py
1
30964
# -*- coding: utf-8 -*- import sys import math import itertools import numpy as np from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4.QtGui import QSizePolicy import scipy.special import Orange.data from Orange.statistics import contingency, distribution from Orange.widgets import widget, gui from Orange.w...
bsd-2-clause
7,862,687,610,765,192,000
36.807082
93
0.536171
false
3.590445
false
false
false
beewizzard/discord-dicebot
diceroll_bot.py
1
5786
import discord import asyncio from discord.errors import HTTPException import os import random import re # Use these variable to limit overloading of the dice roller MAXIMUM_DICE_ARGS = 10 MAXIMUM_DICE_COUNT = 1000 MAXIMUM_DICE_SIDES = 1000 MAX_MESSAGE_LENGTH = 2000 class Error(Exception): """Base class for e...
gpl-3.0
5,443,215,532,587,629,000
34.496933
119
0.55859
false
3.995856
false
false
false
sachingupta006/Mezzanine
mezzanine/generic/forms.py
1
5182
from django import forms from django.contrib.comments.forms import CommentSecurityForm, CommentForm from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from mezzanine.conf import settings from mezzanine.core.forms import Html5Mixin from mezzanine.generic.models import...
bsd-2-clause
-7,536,275,535,220,474,000
38.557252
78
0.606716
false
4.455718
false
false
false
Sabayon/entropy
client/solo/commands/help.py
1
3023
# -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-2 B{Entropy Command Line Client}. """ import argparse from entropy.i18n import _ from entropy.output import teal, purple, darkgreen from _entropy.solo.c...
gpl-2.0
-6,783,595,746,927,479,000
28.349515
79
0.571948
false
4.052279
false
false
false
jriehl/numba
numba/typing/collections.py
1
4091
from __future__ import print_function, division, absolute_import from .. import types, utils, errors import operator from .templates import (AttributeTemplate, ConcreteTemplate, AbstractTemplate, infer_global, infer, infer_getattr, signature, bound_function, make_callabl...
bsd-2-clause
-9,103,186,875,090,370,000
32.260163
91
0.609875
false
4.248183
false
false
false
enixdark/im-r-e-d-i-s
flask-cook/migrations/versions/399106d8a6ad_.py
1
1071
"""empty message Revision ID: 399106d8a6ad Revises: None Create Date: 2015-03-06 03:55:19.157958 """ # revision identifiers, used by Alembic. revision = '399106d8a6ad' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ###...
mit
-4,522,302,353,539,535,000
26.461538
64
0.661998
false
3.488599
false
false
false
stonebig/bokeh
bokeh/model.py
1
29925
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
237,578,417,187,544,830
33.555427
123
0.574169
false
4.492569
false
false
false
mjamesruggiero/lily
lily/apriori.py
1
4157
from collections import defaultdict import logging logging.basicConfig(level=logging.INFO, format="%(funcName)s\t%(message)s") def createC1(dataset): C1 = [] for transaction in dataset: for item in transaction: if not [item] in C1: C1.append([item]) C1.sort() retur...
apache-2.0
2,322,242,299,370,424
30.976923
75
0.479192
false
4.035922
false
false
false
mementum/backtrader
backtrader/utils/flushfile.py
1
1588
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015, 2016, 2017 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
gpl-3.0
289,876,395,016,867,500
26.859649
79
0.588161
false
3.98995
false
false
false
exildev/webpage
exile/migrations/0007_auto_20170511_2256.py
1
2816
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-05-11 22:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('exile', '0006_seccion_posicion'), ] operations = [...
mit
-656,454,561,851,177,300
38.661972
114
0.550426
false
4.221889
false
false
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/_pytest/reports.py
1
13737
from pprint import pprint import py import six from _pytest._code.code import ExceptionInfo from _pytest._code.code import ReprEntry from _pytest._code.code import ReprEntryNative from _pytest._code.code import ReprExceptionInfo from _pytest._code.code import ReprFileLocation from _pytest._code.code import ReprFuncAr...
mit
2,341,126,185,610,534,400
31.17096
98
0.549538
false
4.490683
true
false
false
Jonahss/magnificent
neilk/monitor.py
1
2086
# # Monitor a URL continuously, providing # reports on its availability in a log file # and as a web page. # import json import logging import sys from twisted.internet import task from twisted.internet import reactor from twisted.web import server, resource import urllib2 config = {} log = logging.getLogger(__name_...
mit
-6,028,109,550,642,355,000
25.075
71
0.624161
false
3.827523
true
false
false