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
midokura/python-midonetclient
src/midonetclient/neutron/port.py
1
3343
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2014 Midokura Europe SARL, All Rights Reserved. # 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://w...
apache-2.0
-2,826,083,030,494,583,300
32.43
75
0.642537
false
3.649563
false
false
false
Fxrh/tispa-wm
libqtile/dgroups.py
1
6283
import itertools import gobject import libqtile.hook from libqtile.config import Key from libqtile.command import lazy def simple_key_binder(mod, keynames=None): """ Bind keys to mod+group position or to the keys specified as second argument. """ def func(dgroup): # unbind all ...
gpl-3.0
-4,683,357,861,695,413,000
31.554404
84
0.512017
false
4.248141
false
false
false
jboissard/mathExperiments
fractals/timetables.py
1
2204
""" Generate timetable https://www.youtube.com/watch?v=qhbuKbxJsk8 """ import svgwrite import numpy as np (h,w) = (700, 1500) svg = svgwrite.Drawing(filename = "timetable.svg", size = (str(w)+"px", str(h)+"px")) def coordFromAngle(alpha): x = cr*np.cos(alpha) + cx y = cr*np.sin(alpha) + cy return (x,y) ...
apache-2.0
6,018,870,589,145,324,000
17.529412
85
0.624773
false
2.589894
false
false
false
centrumholdings/buildbot
buildbot/steps/transfer.py
1
16507
# -*- test-case-name: buildbot.test.test_transfer -*- import os.path, tarfile, tempfile from twisted.internet import reactor from twisted.spread import pb from twisted.python import log from buildbot.process.buildstep import RemoteCommand, BuildStep from buildbot.process.buildstep import SUCCESS, FAILURE, SKIPPED from...
gpl-2.0
-1,128,012,311,006,084,400
34.121277
83
0.585691
false
4.462557
false
false
false
psi29a/django-authopenid
django_authopenid/urls.py
1
3016
# -*- coding: utf-8 -*- # Copyright 2007, 2008,2009 by Benoît Chesneau <benoitc@e-engura.org> # # 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...
apache-2.0
6,625,465,566,086,668,000
42.071429
96
0.688557
false
3.726823
false
false
false
go-hep/hep
hbook/rootcnv/testdata/make-root-h1.py
1
1188
# Copyright ©2017 The go-hep Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from array import array as carray import ROOT f = ROOT.TFile.Open("gauss-h1.root","RECREATE") histos = [] for t in [ (ROOT.TH1D, "h1d", (10,-4,4)), ...
bsd-3-clause
9,136,496,270,084,065,000
28.675
70
0.493682
false
2.580435
false
false
false
mjirik/lisa
lisa/virtual_resection.py
1
29738
#! /usr/bin/python # -*- coding: utf-8 -*- # import funkcí z jiného adresáře import os.path import sys path_to_script = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(path_to_script, "../extern/sed3/")) # from ..extern.sed3 import sed3 # import featurevector from loguru import logger # logge...
bsd-3-clause
-7,583,558,748,580,240,000
34.361905
157
0.601737
false
3.331165
false
false
false
metabrainz/listenbrainz-server
listenbrainz/db/user.py
1
19931
import logging from typing import List import sqlalchemy import uuid import ujson from datetime import datetime from listenbrainz import db from listenbrainz.db.exceptions import DatabaseException from data.model.similar_user_model import SimilarUsers from typing import Tuple, List logger = logging.getLogger(__name...
gpl-2.0
-7,587,009,513,787,705,000
33.905429
123
0.58261
false
3.842491
true
false
false
i-namekawa/TopSideMonitor
topsidecameras.py
1
11038
import datetime, os, subprocess, sys from time import time, sleep import cv2 import numpy as np cwd = os.getcwd() try: import motmot.cam_iface.cam_iface_ctypes as cam_iface if not cam_iface.get_num_cameras(): print 'No IEEE1394 camera found' cam_iface = None except ImportError: cam_iface =...
bsd-3-clause
-5,700,741,396,932,234,000
35.916388
101
0.453887
false
4.238863
false
false
false
waynegm/OpendTect-External-Attributes
Python_3/Jupyter/pwc_tvdip.py
1
7391
""" Ported by Massimo Vassalli [http://mv.nanoscopy.eu massimo.vassalli@gmail.com] """ import scipy.sparse as sparse import scipy.sparse.linalg as splin import numpy.linalg as linalg import numpy as np def pwc_tvdip(y, lamb=[1.0], display=True, stoptol=1e-3, maxiter=60, full=False): # Performs discrete total varia...
mit
3,905,015,046,271,806,500
36.902564
132
0.526045
false
3.240246
false
false
false
gauravssnl/python3-network-programming
big_udp_sender.py
1
1217
#!/usr/bin/env python3 # Send a big UDP datagram to learn the MTU of the network path. try: import IN except: import sys # change this path as required. I am using virtualenv sys.path.append('/usr/lib/python3.5/plat-x86_64-linux-gnu/' ) import IN import socket if not hasattr(IN, 'IP_MTU'): raise RuntimeError(...
mit
-1,474,168,285,964,429,300
30.230769
99
0.716516
false
2.911483
false
false
false
cassiopaixao/simmycloud
simmycloud/strategies/prediction/last_five_measurements_prediction.py
1
2109
############################################################################### # The MIT License (MIT) # # Copyright (c) 2013 Cassio Paixao # # 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 ...
mit
-4,115,986,671,792,250,400
44.847826
93
0.671882
false
4.412134
false
false
false
rhinstaller/python-simpleline
simpleline/input/input_threading.py
1
7915
# # This file is part of Simpleline Text UI library. # # Copyright (C) 2020 Red Hat, Inc. # # Simpleline is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gpl-2.0
-6,910,217,499,271,234,000
32.256303
97
0.626027
false
4.446629
false
false
false
bruecksen/isimip
isi_mip/climatemodels/migrations/0057_sector_class_name.py
1
2105
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-19 13:23 from __future__ import unicode_literals from django.db import migrations, models SECTOR_MAPPING = { 'Agriculture': 'Agriculture', 'Energy': 'Energy', 'Water (global)': 'WaterGlobal', 'Water (regional)': 'WaterRegional', 'Bio...
mit
3,835,449,880,308,503,600
42.854167
725
0.676485
false
3.346582
false
false
false
Kudae/SR_Parser
html_test.py
1
1134
from bs4 import BeautifulSoup as bs import sys htmlfile = sys.argv[1] htmlfile = open(htmlfile,'r', encoding="utf-8") bs_html = bs(htmlfile, 'lxml') table = bs_html.find('table') headings = [] for th in table.find('tr').find_all('th'): headings.append(th.get_text()) datasets = [] for row in table.find_all("t...
mit
7,239,021,722,167,248,000
22.142857
73
0.564374
false
2.92268
false
false
false
embedded2015/visualizer
log2grasp.py
1
7397
#!/usr/bin/env python # Copyright (C) 2013 National Cheng Kung University, Taiwan # All rights reserved. # Configure wether to trace these feature # Warning : Too many contents may freeze Grasp TRACE_QUEUE = True TRACE_MUTEX = True TRACE_BINARY_SEMAPHORE = False TRACE_INTERRUPT = False log = open('log', 'r') lines =...
bsd-2-clause
3,598,301,657,431,681,000
28.706827
136
0.592943
false
2.75186
false
false
false
abrt/faf
src/pyfaf/storage/migrations/versions/133991a89da4_build_to_opsysrelease.py
1
1720
# Copyright (C) 2014 ABRT Team # Copyright (C) 2014 Red Hat, Inc. # # This file is part of faf. # # faf 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) ...
gpl-3.0
1,110,659,406,465,646,700
34.102041
86
0.676163
false
3.683084
false
false
false
google-research/motion_imitation
motion_imitation/examples/whole_body_controller_example.py
1
8007
"""Example of whole body controller on A1 robot.""" import os import inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) from absl import app from absl import flags from absl import logg...
apache-2.0
2,522,982,932,441,971,700
32.224066
96
0.67978
false
3.252234
false
false
false
tpltnt/SimpleCV
SimpleCV/Camera.py
1
131888
from __future__ import print_function # SimpleCV Cameras & Devices #load system libraries from SimpleCV.base import * from SimpleCV.ImageClass import Image, ImageSet, ColorSpace from SimpleCV.Display import Display from SimpleCV.Color import Color from collections import deque import time import ctypes as ct import su...
bsd-3-clause
-3,045,522,090,509,219,300
33.480523
271
0.561234
false
3.86825
false
false
false
webvalley2013/nanothings
process/models.py
1
2097
# This file is part of nanothings. # # nanothings is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero GPL as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # nanothings is distributed...
agpl-3.0
-6,324,198,666,409,698,000
27.337838
73
0.66619
false
3.876155
false
false
false
openfisca/openfisca-tunisia
openfisca_tunisia/reforms/de_net_a_imposable.py
1
2513
from __future__ import division from openfisca_tunisia.model.base import * from openfisca_tunisia import entities from numpy.ma.testutils import assert_not_equal from urllib.request import Request try: from scipy.optimize import fsolve except ImportError: fsolve = None def calculate_net_from(salaire_imposa...
agpl-3.0
3,613,771,849,119,785,000
32.039474
108
0.680207
false
3.623377
false
false
false
SUSE/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/log_profile_resource_patch.py
1
2775
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-8,665,037,862,880,395,000
43.758065
126
0.63964
false
4.256135
false
false
false
unreal666/outwiker
plugins/diagrammer/diagrammer/libs/blockdiag/noderenderer/dots.py
2
1737
# -*- coding: utf-8 -*- # Copyright 2011 Takeshi KOMIYA # # 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...
gpl-3.0
-4,966,972,733,427,709,000
31.773585
75
0.617732
false
3.537678
false
false
false
houssine78/addons
website_product_subscription/controllers/main.py
1
8581
# -*- coding: utf-8 -*- from openerp import http from openerp.http import request from openerp.tools.translate import _ from openerp.exceptions import ValidationError class WebsiteProductSubscription(http.Controller): @http.route(['/page/login_subscriber', '/login_subscriber'], ...
agpl-3.0
5,936,635,877,928,867,000
39.65534
120
0.53735
false
4.530623
false
false
false
cloudify-cosmo/cloudify-jboss-plugin
jboss/utils.py
1
3159
############################################################################### # 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 # # ...
apache-2.0
-1,661,285,359,231,721,700
30.277228
79
0.563153
false
4.436798
false
false
false
probml/pyprobml
scripts/linreg_contours_sse_plot.py
1
1204
# Plot error surface for linear regression model. # Based on https://github.com/probml/pmtk3/blob/master/demos/contoursSSEdemo.m import numpy as np import matplotlib.pyplot as plt import os figdir = os.path.join(os.environ["PYPROBML"], "figures") def save_fig(fname): plt.savefig(os.path.join(figdir, fname)) from mpl_...
mit
2,998,280,091,559,601,000
26.386364
98
0.665282
false
2.237918
false
false
false
HAZARDU5/sgdialer
src/nz/co/hazardmedia/sgdialer/controllers/SoundController.py
1
5593
__author__ = 'Michael Andrew michael@hazardmedia.co.nz' import random import pygame from pygame import mixer from pygame.mixer import Sound from nz.co.hazardmedia.sgdialer.config.Config import Config from nz.co.hazardmedia.sgdialer.models.SoundModel import SoundModel from nz.co.hazardmedia.sgdialer.events.EventType im...
mit
-3,581,254,749,395,123,000
32.698795
118
0.550867
false
4.006447
false
false
false
openstack/monasca-ui
monitoring/config/local_settings.py
1
4631
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
apache-2.0
3,803,075,964,564,306,000
37.272727
91
0.684086
false
3.385234
false
false
false
shbhrsaha/rondo
rondo/rondo.py
1
3666
""" Record and replay mouse and keyboard actions in VirtualBox sessions Usage: python rondo.py [--r record_log_file] [--p replay_log_file] virtual_machine_name """ import time import datetime import logging import argparse import virtualbox logging.basicConfig(level=logging.INFO) f = None last_reco...
mit
83,888,517,469,684,080
32.642202
142
0.603382
false
3.78719
false
false
false
appop/bitcoin
contrib/seeds/makeseeds.py
1
5719
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The nealcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 ...
mit
-6,261,724,423,219,290,000
32.25
186
0.561287
false
3.118321
false
false
false
mamrhein/identifiers
src/identifiers/finance.py
1
6972
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # Name: finance # Purpose: International identifiers for tradable financial assets # # Author: Michael Amrhein (mamrhein@users.sourceforge.net) # # Copyright: (c) 2016 Michael Amrhein # License: T...
bsd-2-clause
1,852,831,554,744,964,400
32.681159
78
0.562966
false
4.446429
false
false
false
vesellov/bitdust.devel
blockchain/pybc/token.py
1
13459
#!/usr/bin/env python2.7 # token.py: a digital token implemented on top of pybc.coin # #------------------------------------------------------------------------------ from __future__ import absolute_import import logging #------------------------------------------------------------------------------ from . import j...
agpl-3.0
-8,504,476,359,857,393,000
36.80618
124
0.526042
false
4.441914
false
false
false
Suwings/Suwings.github.io
mine/parallel time/Oftenscript/EVE 爬虫/People.py
1
1818
#!/usr/bin/python # -*- coding: UTF-8 -*- import pymysql global DB try: DB = pymysql.connect("localhost", "root", "toortoor", "EVE_coll") except: print("数据库连接失败,程序停止.") exit(0) def insert_now_data(id, now_time, players, typeof): """ 插入数据 1 代表国服 """ cursor = DB.cursor() # SQL 插入语句 if typ...
mit
7,974,478,577,590,120,000
23.169014
98
0.544872
false
2.794788
false
false
false
mpatacchiola/deepgaze
examples/ex_cnn_head_pose_estimation_images/ex_cnn_head_pose_estimation_images.py
1
1832
#!/usr/bin/env python #The MIT License (MIT) #Copyright (c) 2016 Massimiliano Patacchiola # #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 ...
mit
4,694,986,519,245,700,000
54.515152
141
0.728166
false
3.259786
false
false
false
Maigard/coopshop
models.py
1
15696
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.core.exceptions import ValidationError from django.contrib.localflavor.us.models import PhoneNumberField,USStateField from sorl.thumbnail import ImageField from decimal import * import dat...
bsd-2-clause
8,777,920,392,437,705,000
36.460621
370
0.716998
false
3.231624
false
false
false
ctuning/ck
ck/repo/module/experiment.tune.opencl.clblast/module.py
2
31659
# # Collective Knowledge: CK-powered CLBlast crowd-tuning # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net # cfg={} # Will be updated by CK (meta description of this module) work={} # Will be updated ...
bsd-3-clause
-4,807,519,586,556,307,000
27.49595
159
0.479642
false
3.208899
false
false
false
tchaikov/teuthology
teuthology/task/internal.py
1
23513
""" Internal tasks are tasks that are started from the teuthology infrastructure. Note that there is no corresponding task defined for this module. All of the calls are made from other modules, most notably teuthology/run.py """ from cStringIO import StringIO import contextlib import logging import os import time impo...
mit
1,406,336,745,813,012,200
33.375731
121
0.493046
false
4.205509
true
false
false
ddsc/ddsc-core
ddsc_core/management/commands/import_source.py
1
1972
# (c) Fugro GeoServices. MIT licensed, see LICENSE.rst. from django.core.management.base import BaseCommand from ddsc_core.models.models import Source, Manufacturer from django.utils import timezone import csv import string class Command(BaseCommand): args = '<CSV file>' help = 'Imports a CSV file...
mit
-5,022,244,595,836,610,000
38.244898
79
0.411765
false
5.286863
false
false
false
kalhartt/python-groove
examples/replaygain.py
1
1911
#!/usr/bin/env python # -*- coding: utf-8 -*- """replaygain Calculate replaygain values for a set of files Usage: replaygain [-v...] FILE... Options: -v --verbose Set logging level, repeat to increase verbosity """ from __future__ import print_function, unicode_literals import logging import sys from ...
mit
-4,648,362,452,070,011,000
23.818182
72
0.63056
false
3.461957
false
false
false
indigo-dc/im
IM/VirtualMachine.py
1
46072
# IM - Infrastructure Manager # Copyright (C) 2011 - GRyCAP - Universitat Politecnica de Valencia # # 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...
gpl-3.0
-3,530,185,177,929,877,000
39.952889
120
0.525352
false
4.314262
true
false
false
SirCmpwn/hooks
hooks.py
1
2560
from flask import Flask, request, abort from configparser import ConfigParser import sys import os from subprocess import Popen, PIPE, STDOUT import urllib import json import logging config_paths = ["./config.ini", "/etc/hooks.conf"] config = ConfigParser() for p in config_paths: try: config.readfp(open(p...
mit
2,155,854,252,527,766,500
27.764045
98
0.610156
false
3.56546
true
false
false
labyrinth-team/labyrinth
labyrinth_lib/MMapArea.py
1
54708
#! /usr/bin/env python # MMapArea.py # This file is part of Labyrinth # # Copyright (C) 2006 - Don Scorgie <Don@Scorgie.org> # # Labyrinth 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 th...
gpl-2.0
3,068,028,678,891,089,000
37.855114
175
0.542224
false
3.862196
false
false
false
morgangalpin/binly
pavement.py
1
7389
# -*- coding: utf-8 -*- from __future__ import print_function import os import sys import time import subprocess # Import parameters from the setup file. sys.path.append('.') from setup import ( # noqa setup_dict, get_project_files, print_success_message, print_failure_message, _lint, _test, _test_all, ...
gpl-3.0
5,098,610,376,485,017,000
27.528958
79
0.599946
false
3.800926
true
false
false
PyCQA/astroid
astroid/node_classes.py
1
162275
# Copyright (c) 2009-2011, 2013-2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2010 Daniel Harding <dharding@gmail.com> # Copyright (c) 2012 FELD Boris <lothiraldan@gmail.com> # Copyright (c) 2013-2014 Google, Inc. # Copyright (c) 2014-2021 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 20...
lgpl-2.1
-2,911,324,988,074,595,000
29.885611
108
0.582056
false
4.075982
false
false
false
developerworks/horizon
horizon/dashboards/nova/instances_and_volumes/instances/views.py
1
4753
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-8,869,323,412,014,233,000
37.642276
78
0.632443
false
4.324841
false
false
false
dr-prodigy/python-holidays
holidays/countries/spain.py
1
6751
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
mit
-6,767,827,126,775,115,000
32.919192
78
0.470518
false
3.331349
false
false
false
koniiiik/ksp_login
ksp_login/context_processors.py
1
1967
from social_core.backends.base import BaseAuth from social_core.utils import module_member from .utils import setting DEFAULT_AUTHENTICATION_PROVIDERS_BRIEF = 3 def get_login_providers(request, short=False): """ Returns a list of available login providers based on the AUTHENTICATION_BACKENDS setting. Ea...
bsd-3-clause
3,773,942,804,654,436,400
32.338983
104
0.68124
false
4.43018
false
false
false
andredalton/bcc
2014/MAC0242/miniep3/miniep3.py
1
5396
#! /usr/bin/env python3 import sys import re def uso(): """Imprime instruções de uso do programa.""" uso = """ Este programa gera a ordem correta de inclusão em um banco de dados. Passe o nome dos arquivos na linha de comando. Caso queira imprimir ocorrências de referência circular ou inexistente ...
apache-2.0
-7,787,084,893,410,947,000
34.825503
101
0.565111
false
3.197723
false
false
false
chaincoin/chaincoin
contrib/gitian-build.py
1
13919
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget'] if args.kvm: programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker: dockers = ['docker.io',...
mit
-7,426,322,469,110,016,000
58.738197
233
0.648969
false
3.31958
false
false
false
edx/edx-notifications
edx_notifications/channels/urban_airship.py
1
7474
""" NotificationChannelProvider to integrate with the Urban Airship mobile push notification services """ import json import logging import six import requests from requests.auth import HTTPBasicAuth from requests.exceptions import RequestException from edx_notifications.channels.channel import BaseNotificationChan...
agpl-3.0
-3,941,502,762,100,949,000
31.354978
103
0.563821
false
4.388726
false
false
false
glenngillen/dotfiles
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/debugpy/common/stacks.py
1
1686
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals """Provides facilities to dump all stacks of all threads in the process. ""...
mit
3,639,968,426,756,852,700
23.545455
82
0.559312
false
4.183623
false
false
false
saurabh6790/ON-RISAPP
clinical/doctype/patient_report/patient_report.py
1
4942
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr import os, json from webnotes.utils import get_base_path from install_erpnext...
agpl-3.0
6,853,336,334,213,661,000
43.522523
230
0.701335
false
3.155811
false
false
false
astuanax/stopwords
setup.py
1
1758
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
isc
5,546,850,083,140,206,000
26.904762
103
0.612059
false
3.863736
true
false
false
sdkyoku/FetchImg
logger.py
1
2812
#!/usr/bin/env python # -*- coding: utf-8 -*- # Contributor: # sdkyoku <chiey.qs@gmail.com> # Specially thanks: # GoAgent Team __version__ = '0.1.01' import sys import os import time class MyLogger(type(sys)): CRITICAL = 50 FATAL = CRITICAL ERROR = 40 WARNING = 30 INFO = 20 ...
lgpl-3.0
-5,334,778,995,574,390,000
32.082353
99
0.55192
false
3.371703
false
false
false
hwmay/pordb3
pordb_bilddatei_umbenennen.py
1
4294
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pordb_bilddatei_umbenennen.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_Dialog(object): def setupUi(self, Dialog): ...
gpl-3.0
852,912,724,824,715,000
50.73494
114
0.71728
false
4.152805
false
false
false
brchiu/tensorflow
tensorflow/python/ops/parsing_ops.py
1
82440
# 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
-5,291,462,859,335,343,000
44.197368
119
0.660929
false
3.9428
false
false
false
ActiveState/code
recipes/Python/579027_Publish_SQLite_datPDF_using_named/recipe-579027.py
1
2776
# SQLiteToPDFWithNamedTuples.py # Author: Vasudev Ram - http://www.dancingbison.com # SQLiteToPDFWithNamedTuples.py is a program to demonstrate how to read # SQLite database data and convert it to PDF. It uses the Python # data structure called namedtuple from the collections module of # the Python standard library. ...
mit
-1,415,191,299,276,203,300
36.013333
87
0.662104
false
3.389499
false
false
false
HuangFJ/pyeth
app.py
1
2580
# -*- coding: utf8 -*- from gevent import monkey; monkey.patch_all() from pyeth.discovery import EndPoint, Server, Node import binascii from urlparse import urlparse test_boots = [ # "enode://561ab5a08c6f2e486059f2add5d08932e4f0ebbc6c2a2ba5e0f930a5441e65ec59f5b6684b3e75bed380109135d089e56380dad83357f5fda2122fdbdb...
bsd-3-clause
6,300,188,362,417,611,000
55.086957
167
0.837984
false
1.944235
false
false
false
centaurialpha/edis
src/ui/dialogs/preferences/preferences.py
1
4181
# -*- coding: utf-8 -*- # EDIS - a simple cross-platform IDE for C # # This file is part of Edis # Copyright 2014-2015 - Gabriel Acosta <acostadariogabriel at gmail> # License: GPLv3 (see http://www.gnu.org/licenses/gpl.html) from PyQt4.QtGui import ( QDialog, QVBoxLayout, QHBoxLayout, QIcon, QTool...
gpl-3.0
6,063,191,720,508,532,000
30.208955
71
0.615881
false
3.94434
false
false
false
cscorley/mud2014-modeling-changeset-topics
src/corpora.py
1
8562
#!/usr/bin/env python # -*- coding: utf-8 -*- # # [The "New BSD" license] # Copyright (c) 2014 The Board of Trustees of The University of Alabama # All rights reserved. # # See LICENSE for details. """ Code for generating the corpora. """ from StringIO import StringIO import re import gensim import dulwich import du...
bsd-3-clause
-8,410,882,084,569,625,000
31.309434
80
0.560266
false
4.306841
false
false
false
psigen/miridan
pddlpy/predicate.py
1
2501
""" Module that defines all predicates in this world. """ import inspect from pddlpy.scope import Scope class BasePredicate(object): """ Represents a predicate that already has grounded atoms. """ def __init__(self, *args, **kwargs): argnames, _, _, _ = inspect.getargspec(self.__call__) ...
bsd-2-clause
-1,814,435,613,284,187,400
24.520408
70
0.541783
false
4.410935
false
false
false
cstipkovic/spidermonkey-research
testing/mozbase/mozlog/mozlog/scripts/unstable.py
1
3593
import argparse from collections import defaultdict import json from mozlog import reader class StatusHandler(reader.LogHandler): def __init__(self): self.run_info = None self.statuses = defaultdict(lambda:defaultdict(lambda:defaultdict(lambda: defaultdict(int)))) def test_id(self, test): ...
mpl-2.0
7,686,368,141,913,607,000
32.268519
139
0.588088
false
3.905435
true
false
false
gaolingyun/eps-reconfig
time_next_best_action_1_simple.py
1
2121
from greedy import * import time filename = 'circuit_sensor_1_Simplified.net' G = nx.DiGraph() G = read_netlist(filename) uncon_comp_tups = [] contactor_tups = [] declaration = init(G, uncon_comp_tups, contactor_tups) sensors = ['S1', 'S2'] con_conts = ['C1', 'C3', 'C4', 'C6'] result = generate_database(G, sensors, c...
bsd-3-clause
1,155,626,011,497,945,000
30.671642
95
0.668081
false
2.843164
false
false
false
rwl/PyCIM
CIM15/IEC61970/Generation/Production/ShutdownCurve.py
1
3108
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
mit
2,589,421,699,765,079,000
45.38806
293
0.723295
false
4.352941
false
false
false
jml/flocker
flocker/provision/_rackspace.py
1
2979
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Rackspace provisioner. """ from ._libcloud import monkeypatch, LibcloudProvisioner from ._install import ( provision, task_open_control_firewall, ) from ._ssh import run_remotely from ._effect import sequence def get_default_username(distribu...
apache-2.0
4,473,445,723,125,299,000
29.71134
78
0.663981
false
4.069672
false
false
false
tunnell/wax
wax/EventBuilder/Tasks.py
1
1508
"""Celery tasks""" import numpy as np from celery import Celery import pymongo from wax import Configuration import ebcore # Specify mongodb host and datababse to connect to BROKER_URL = 'mongodb://xedaqtest2:27017/jobs' celery = Celery('EOD_TASKS', broker=BROKER_URL, backend=BROKER_U...
bsd-3-clause
2,997,668,039,803,772,000
34.069767
100
0.466844
false
4.668731
false
false
false
userzimmermann/robotframework-python3
src/robot/running/signalhandler.py
1
3717
# Copyright 2008-2014 Nokia Solutions and Networks # # 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 l...
apache-2.0
1,963,857,764,741,282,800
36.928571
75
0.649179
false
4.05786
false
false
false
holinnn/lupin
lupin/schema.py
1
4807
from copy import copy from . import bind from .validators_combination import ValidatorsNullCombination from .errors import ValidationError, InvalidDocument, MissingKey # compatibility : used to generate schema names if not provided (2018-07-04) _globals = { "schemas_count": 0 } def _generate_name(): """Gene...
mit
584,183,981,520,573,300
29.814103
106
0.558144
false
4.698925
false
false
false
bmatejek/ibex
utilities/dataIO.py
1
6563
import os import h5py import imageio import tifffile import struct import numpy as np from PIL import Image from ibex.data_structures import meta_data, skeleton_points from ibex.utilities.constants import * def GetWorldBBox(prefix): # return the bounding box for this segment return meta_data.MetaData(prefix...
mit
-6,225,843,316,542,372,000
29.672897
217
0.651227
false
3.388229
false
false
false
agesmundo/IDParser
scripts/SharedTaskCommon.py
1
16955
#!/usr/bin/python import sys import string rootDeprel = u'ROOT' # the dependency relation for the root emptyFeatsString = u'_' # if no morphological features exist (only PoS) featsJoiner = u'|' # to join morphological features into one string emptyProjColumnString = u'_' # if no PHEAD or PDEPREL available class...
gpl-3.0
-345,788,771,460,872,700
41.176617
94
0.47744
false
4.56393
false
false
false
ArnaudKOPP/BioREST
BioREST/Fasta.py
1
8602
# coding=utf-8 __author__ = "Arnaud KOPP" __copyright__ = "© 2015-2016 KOPP Arnaud All Rights Reserved" __credits__ = ["KOPP Arnaud"] __license__ = "GNU GPL V3.0" __maintainer__ = "Arnaud KOPP" __email__ = "kopp.arnaud@gmail.com" __status__ = "Production" from collections import OrderedDict import logging import panda...
gpl-3.0
-5,907,526,804,875,600,000
27.2
120
0.540402
false
3.923814
false
false
false
DataViva/dataviva-site
dataviva/utils/jinja_helpers.py
1
4548
# -​*- coding: utf-8 -*​- from re import sub from jinja2 import Markup from dataviva.translations.dictionary import dictionary from dataviva.utils.num_format import num_format from dataviva.utils.title_case import title_case from decimal import * from flask import g import locale from flask.ext.babel import gettext ''...
mit
5,653,166,006,842,362,000
29.28
139
0.559665
false
3.778702
false
false
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons/add_mesh_extra_objects/mesh_discombobulator.py
2
27573
# GPL # Original Authors: Evan J. Rosky (syrux), Chichiri, Jace Priester # import bpy import random import math from bpy.types import ( Operator, Menu, ) from mathutils import ( Vector, Quaternion, ) # ################### ...
gpl-3.0
-2,927,640,118,018,320,000
35.137615
119
0.626265
false
3.365434
false
false
false
c17r/TagTrain
src/tagtrain/migrations/002_add_table_member.py
1
1628
"""Peewee migrations -- 002_add_table_member.py. Some examples (model - class or model name):: > Model = migrator.orm['model_name'] # Return model in current state by name > migrator.sql(sql) # Run custom SQL > migrator.python(func, *args, **kwargs) # Run pyt...
mit
-8,744,574,383,846,106,000
36
97
0.646806
false
3.486081
false
false
false
bitmazk/django-account-keeping
account_keeping/freckle_api.py
1
1583
"""API calls against letsfreckle.com""" from django.conf import settings from django.utils.translation import ugettext_lazy as _ try: from freckle_client.client import FreckleClientV2 client = FreckleClientV2(settings.ACCOUNT_KEEPING_FRECKLE_ACCESS_TOKEN) except ImportError: # pragma: nocover client = Non...
mit
-6,213,594,721,971,263,000
34.977273
78
0.660771
false
4.255376
false
false
false
talon-one/talon_one.py
talon_one/models/new_coupons.py
1
15073
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
mit
-7,932,817,323,509,143,000
37.256345
647
0.625423
false
3.978094
true
false
false
agx/calypso
setup.py
1
3533
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is part of Calypso Server - Calendar Server # Copyright © 2009-2011 Guillaume Ayoub # # This library 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, eith...
gpl-3.0
-6,134,075,689,661,929,000
35.402062
79
0.682243
false
3.732558
false
false
false
kivy/plyer
examples/gps/main.py
1
3054
from kivy.lang import Builder from plyer import gps from kivy.app import App from kivy.properties import StringProperty from kivy.clock import mainthread from kivy.utils import platform kv = ''' BoxLayout: orientation: 'vertical' Label: text: app.gps_location Label: text: app.gps_status ...
mit
2,254,386,045,913,796,900
28.365385
77
0.592993
false
4.394245
false
false
false
agermanidis/Pattern
en/parser/__init__.py
1
26069
#### PATTERN | EN | RULE-BASED SHALLOW PARSER ######################################################## # Copyright (c) 2010 University of Antwerp, Belgium # Author: Tom De Smedt <tom@organisms.be> # License: BSD (see LICENSE.txt for details). # http://www.clips.ua.ac.be/pages/pattern ##################################...
bsd-3-clause
-2,130,800,496,313,446,000
43.336735
129
0.533354
false
3.481902
false
false
false
gph82/PyEMMA
pyemma/__init__.py
1
1495
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either vers...
lgpl-3.0
-7,400,841,693,377,844,000
31.5
97
0.698328
false
4.051491
false
false
false
cgarciae/tfinterface
tfinterface/supervised/supervised_model.py
1
7005
#!/usr/bin/env python # -*- coding: utf-8 -*- # __coconut_hash__ = 0xe7f49d48 # Compiled with Coconut version 1.2.3-post_dev1 [Colonel] # Coconut Header: -------------------------------------------------------- from __future__ import print_function, absolute_import, unicode_literals, division import sys as _coconut...
mit
-4,977,267,530,083,282,000
32.199052
285
0.646395
false
3.566701
false
false
false
pymedusa/Medusa
medusa/providers/torrent/html/anidex.py
1
5788
# coding=utf-8 """Provider code for AniDex.""" from __future__ import unicode_literals import logging import random import string from medusa import tv from medusa.bs4_parser import BS4Parser from medusa.helper.common import convert_size, try_int from medusa.logger.adapters.style import BraceAdapter from medusa.pro...
gpl-3.0
-6,090,695,897,899,882,000
32.074286
92
0.527125
false
4.303346
false
false
false
julianpeeters/avro
lang/py/src/avro/datafile.py
1
11950
# 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 u...
apache-2.0
1,734,923,212,509,811,200
31.472826
78
0.663096
false
3.654434
false
false
false
madgik/exareme
Exareme-Docker/src/mip-algorithms/THREE_C/threec.py
1
44722
#!/usr/bin/env python from __future__ import print_function from __future__ import division import rpy2.robjects as robjects from rpy2.robjects import pandas2ri import pandas as pd import numpy as np from mipframework import Algorithm, AlgorithmResult, TabularDataResource class ThreeC(Algorithm): def __init__...
mit
6,020,439,716,612,034,000
34.63506
179
0.55087
false
3.596751
false
false
false
WaveBlocks/WaveBlocks
src/WaveBlocks/SimulationLoopFourier.py
1
6326
"""The WaveBlocks Project This file contains the main simulation loop for the Fourier propagator. @author: R. Bourquin @copyright: Copyright (C) 2010, 2011 R. Bourquin @license: Modified BSD License """ import numpy as np import scipy as sp from PotentialFactory import PotentialFactory as PF from WaveFunction impor...
bsd-3-clause
8,183,372,517,161,207,000
37.339394
127
0.64638
false
4.396108
false
false
false
dshean/pygeotools
pygeotools/replace_ndv.py
1
1731
#! /usr/bin/env python #David Shean #dshean@gmail.com import sys import os import argparse import numpy as np from osgeo import gdal from pygeotools.lib import iolib #Can use ASP image_calc for multithreaded ndv replacement of huge images #image_calc -o ${1%.*}_ndv.tif -c 'var_0' --output-nodata-value $2 $1 def g...
mit
-3,940,889,173,752,229,400
25.227273
90
0.644714
false
2.974227
false
false
false
xhair/TopOdoo_Addons
ToproERP_Wechat_Enterprises/models/wechat_enterprise_basic.py
1
29875
# -*- coding:utf-8 -*- import json import requests import urllib import hashlib from json import * from xml.dom import minidom, Node import WXBizMsgCrypt from openerp.http import request from wechat_sdk.messages import MESSAGE_TYPES, UnknownMessage from wechat_sdk.exceptions import ParseError, NeedParseError, NeedParam...
agpl-3.0
-5,521,188,693,000,287,000
32.457181
143
0.53436
false
2.608691
false
false
false
JaspervanBlokland/SandyApp
src/Toon/SlowFashionCover.py
1
15210
# ----------------------------------------------------------------------------- # Copyright (c) 2016+ Buro Petr van Blokland + Claudia Mens & Font Bureau # www.pagebot.io # # P A G E B O T # # Licensed under MIT conditions # Made for usage in DrawBot, www.drawbot.com # ------------------------------...
mit
3,673,058,861,442,119,000
48.543974
152
0.678961
false
3.230671
false
false
false
philrosenfield/TPAGB-calib
model_plots.py
1
26550
import sfh_tests_multi_proc as sfh_tests import os import numpy as np import matplotlib.pylab as plt from TPAGBparams import snap_src, research_path import brewer2mpl import ResolvedStellarPops as rsp import fileIO import galaxy_tests color_scheme = ['#d73027', '#fc8d59', '#fee090', '#669966', '#e0f3f8', '#4575b4'] f...
bsd-3-clause
-6,129,775,246,758,989,000
40.099071
102
0.530132
false
3.055236
true
false
false
prov-suite/interop-test-harness
prov_interop/provtranslator/converter.py
1
4897
"""Manages invocation of ProvTranslator service. """ # Copyright (c) 2015 University of Southampton # # 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
-2,496,572,172,419,691,000
39.808333
80
0.69757
false
4.004088
true
false
false
kdiduk/pytoons
pytoons/states/level_state.py
1
1073
#!/usr/bin/env python3 # vim:fileencoding=utf-8 from pytoons.camera import Camera from pytoons.common import Size from pytoons.controls import Key from pytoons.level import Level from pytoons.states import BouncingBallState from pytoons.states import State import logging from pytmx import load_pygame from pygame impo...
mit
8,656,680,493,530,159,000
26.512821
78
0.665424
false
3.674658
false
false
false
lovelydev/django-yabackup
YaBackup/models.py
1
1634
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ class Backup(models.Model): title = models.CharField(blank=True, max_length=128, verbose_name=_('Title'), help_text=_('Just a title')) file_name = models.CharField(max_length=64, verbose_name=_('File n...
mit
-3,670,743,920,608,373,000
45.685714
172
0.684823
false
3.899761
false
false
false
clark800/pystarch
backend/type_objects.py
1
4330
class EqualityMixin(object): def __eq__(self, other): return (isinstance(other, self.__class__) and self.__dict__ == other.__dict__) def __ne__(self, other): return not self.__eq__(other) def __hash__(self): return hash(str(self)) class BasicMixin(object): de...
mit
-5,775,183,472,630,599,000
24.621302
78
0.598845
false
3.990783
false
false
false
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_firewall_ssh_local_key.py
1
10210
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
2,207,557,786,850,089,500
29.029412
105
0.59001
false
4.160554
false
false
false
margamanterola/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/modules/cs_user.py
1
17256
#!/usr/bin/env python2 from SettingsWidgets import * import gi gi.require_version('AccountsService', '1.0') from gi.repository import AccountsService, GLib try: import PAM except: import pam as PAM import pexpect import time from random import randint import shutil import PIL import os import subprocess class...
gpl-2.0
1,584,468,635,814,905,300
38.577982
160
0.598343
false
3.726998
false
false
false
SophieIPP/openfisca-france
openfisca_france/model/prestations/prestations_familiales/af.py
1
15020
# -*- coding: utf-8 -*- from __future__ import division from numpy import round, maximum as max_, logical_not as not_, logical_or as or_, vectorize, where from ...base import * # noqa analysis:ignore from .base_ressource import nb_enf class af_enfant_a_charge(Variable): column = BoolCol entity_class = In...
agpl-3.0
-1,809,114,468,212,156,400
39.612466
137
0.658882
false
2.967525
false
false
false
mendrugory/reactive-architecture-python
resources-analyzer/resources-analyzer/analyzer.py
1
1567
#!/usr/bin/python3 import pika import json import settings import time time.sleep(20) connection = pika.BlockingConnection(pika.ConnectionParameters(host=settings.RABBITMQ_HOST)) channel = connection.channel() channel.exchange_declare(exchange=settings.RABBITMQ_EXCHANGE, exchange_type=se...
mit
-5,733,706,653,143,237,000
30.34
92
0.672623
false
3.71327
false
false
false
jeremi/couchdbkit
couchdbkit/loaders.py
1
19439
# -*- coding: utf-8 -*- # # Copyright (c) 2008-2009 Benoit Chesneau <benoitc@e-engura.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTW...
isc
-4,943,099,272,784,033,000
39.413721
112
0.519111
false
4.593336
false
false
false
gralog/gralog
gralog-fx/src/main/java/gralog/gralogfx/piping/scripts/Gralog.py
1
47242
#!/usr/bin/env python3 import sys from random import randint import os try: import networkx as nx except: print("gPrint#-1#" + "netwrokx not installed for " + sys.executable) sys.stdout.flush() try: import igraph as ig except: print("gPrint#-1#" + "igraph not installed for " + ...
gpl-3.0
-6,769,466,513,858,263,000
34.898176
203
0.458914
false
4.696491
false
false
false
balghane/py4frc
py4frc.py
1
21828
#------------------------------------------------------------------------------- # Name: FRC # Purpose: Module to simplify getting standings, match results, and OPRs # from the FIRST web pages # Author: BaselA #-------------------------------------------------------------------------------...
mit
4,354,438,116,930,774,500
47.941704
169
0.573255
false
2.731915
false
false
false