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
googleapis/python-aiplatform
google/cloud/aiplatform_v1/services/job_service/client.py
1
95207
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
988,844,452,061,504,900
43.53087
171
0.619902
false
4.56694
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/prompt_toolkit/layout/menus.py
1
25401
import math from itertools import zip_longest from typing import ( TYPE_CHECKING, Callable, Dict, Iterable, List, Optional, Tuple, TypeVar, Union, cast, ) from prompt_toolkit.application.current import get_app from prompt_toolkit.buffer import CompletionState from prompt_toolkit...
mit
-9,167,235,929,098,738,000
34.279167
89
0.592063
false
4.229271
false
false
false
puttarajubr/commcare-hq
corehq/apps/userreports/tests/test_data_source_repeats.py
1
4835
import json import os import datetime from django.test import SimpleTestCase, TestCase from corehq.apps.userreports.models import DataSourceConfiguration from corehq.apps.userreports.sql import IndicatorSqlAdapter, create_engine from corehq.apps.userreports.sql.connection import connection_manager DOC_ID = 'repeat-id...
bsd-3-clause
-7,507,453,100,842,215,000
36.773438
109
0.608273
false
3.621723
true
false
false
USCSoftwareEngineeringClub/pyceratOpsRecs
src/segmentation.py
1
1716
import sys import numpy as np import cv2 """ Authors: Lawton Mizell, Tyler Hall routine for image segmentation and detection of numbers and arithemic operations opencv 3.0+ """ def segment(im): """ :param im: Image to detect digits and operations in """ gray = cv2.cvtColor(im,cv2.COLOR_BG...
mit
-2,607,811,824,055,019,000
26.677419
99
0.572844
false
3.268571
false
false
false
schristakidis/p2ner
p2ner/components/plugin/upnp/upnp/mhelper.py
1
12028
from twisted.internet.protocol import DatagramProtocol # Copyright 2012 Loris Corazza, Sakis Christakidis # # 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.o...
apache-2.0
3,044,898,464,426,626,600
29.221106
216
0.639924
false
3.13965
false
false
false
tiagoprn/devops
rofi/shutdown.py
1
1278
#!/usr/bin/env python3 import glob import logging import os import sys from rofi import Rofi CURRENT_SCRIPT_NAME = os.path.splitext(os.path.basename(__file__))[0] LOG_FORMAT = ( '[%(asctime)s PID %(process)s ' '%(filename)s:%(lineno)s - %(funcName)s()] ' '%(levelname)s -> \n' '%(message)s\n' ) # Conf...
mit
-6,539,320,683,599,238,000
24.058824
69
0.630673
false
3.251908
false
false
false
mylene-campana/hpp-rbprm-corba
script/tests/spiderman_InfiniteU_interp.py
1
6725
#/usr/bin/env python # author: Mylene Campana (mcampana@laas.fr) # Script which goes with hpp-rbprm-corba package. from hpp.corbaserver.rbprm.rbprmbuilder import Builder from hpp.corbaserver.rbprm.rbprmfullbody import FullBody from hpp.corbaserver.rbprm.problem_solver import ProblemSolver from hpp.gepetto import Viewe...
lgpl-3.0
-4,048,527,675,811,533,300
34.771277
207
0.703494
false
2.365459
true
false
false
AmatsukiUrato/ArkHelper
arkHelper.py
1
10171
# -*- coding: utf-8 -*- from ctypes.util import find_library from dateutil.parser import parse import datetime import discord import sqlite3 import asyncio import time import re # version __version__ = '2.0.0' # Discord.pyの読み込み client = discord.Client() # 鍵の読み込み KEY = None with open('KEY.txt', 'r') as f: KEY...
mit
-7,638,959,006,603,030,000
32.863813
447
0.541767
false
2.568014
false
false
false
davidbrazdil/nacl
pynacl/local_storage_cache.py
1
3069
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Cache accesses to GSDStorage locally. Operations are provided to read/write whole files and to read/write strings. Read from G...
bsd-3-clause
-297,330,942,844,684,160
26.401786
74
0.666015
false
3.602113
false
false
false
ergoregion/Rota-Program
Rota_System/Reporting/LinkedBulkReport/Event.py
1
3662
__author__ = 'Neil Butcher' from Rota_System.Reporting.HTMLObjects import HTMLObjects from Abstract import event_title, person_code from Rota_System.StandardTimes import date_string, time_string class EventsReporter(object): def write_reports_about(self, a_list, a_folder): self._reporter = EventReporte...
mit
-4,241,196,320,716,281,000
34.901961
131
0.623157
false
3.600787
false
false
false
zak-k/cis
cis/plotting/heatmap.py
1
3389
import logging import numpy from cis.exceptions import UserPrintableException from cis.plotting.generic_plot import Generic_Plot class Heatmap(Generic_Plot): def __init__(self, packed_data_items, plot_args, *mplargs, **mplkwargs): # Do this here because if this is ungridded data, we won't be able to com...
gpl-3.0
3,874,571,118,185,780,700
37.511364
119
0.632045
false
3.45112
false
false
false
code-for-india/sahana_shelter_worldbank
modules/s3/s3codecs/xls.py
1
17770
# -*- coding: utf-8 -*- """ S3 Microsoft Excel codec @copyright: 2011-13 (c) Sahana Software Foundation @license: MIT 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 with...
mit
2,516,832,263,332,031,500
38.054945
103
0.488689
false
4.732357
false
false
false
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.0-py2.5.egg/sqlalchemy/ext/associationproxy.py
1
24027
"""Contain the ``AssociationProxy`` class. The ``AssociationProxy`` is a Python property object which provides transparent proxied access to the endpoint of an association object. See the example ``examples/association/proxied_association.py``. """ import weakref, itertools import sqlalchemy.exceptions as exceptions...
bsd-3-clause
2,350,939,660,483,318,000
31.868673
87
0.587755
false
4.363785
false
false
false
citrix-openstack-build/oslo.messaging
oslo/messaging/rpc/dispatcher.py
1
4776
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # Copyright 2013 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
2,670,300,130,520,903,000
34.909774
78
0.675042
false
4.596728
false
false
false
endlessm/chromium-browser
third_party/chromite/api/compile_build_api_proto.py
1
6634
# -*- coding: utf-8 -*- # Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Compile the Build API's proto. Install proto using CIPD to ensure a consistent protoc version. """ from __future__ import pri...
bsd-3-clause
-7,782,262,003,463,430,000
30.14554
80
0.669279
false
3.589827
false
false
false
damnMeddlingKid/opendoor
src/App.py
1
1523
from flask import Flask, request, render_template, Response from geojson import Feature, Point, FeatureCollection import Test """Simple flask app to display listings on a map The dwelling type is hardcoded by the coordinates are passed in from the frontend. """ app = Flask(__name__, template_folder="../templates", st...
mit
3,494,228,461,216,091,000
31.404255
84
0.645437
false
3.634845
false
false
false
jiangzhonglian/MachineLearning
src/py3.x/ml/11.Apriori/apriori.py
1
16811
#!/usr/bin/python # coding: utf8 ''' Created on Mar 24, 2011 Update on 2017-05-18 Ch 11 code Author: Peter/片刻 GitHub: https://github.com/apachecn/AiLearning''' print(__doc__) from numpy import * # 加载数据集 def loadDataSet(): return [[1, 3, 4], [2, 3, 5], [1, 2, 3, 5], [2, 5]] # 创建集合 C1。即对 dataSet 进...
gpl-3.0
7,020,035,053,039,240,000
34.756098
354
0.55209
false
2.130203
false
false
false
orchidinfosys/odoo
addons/project/project.py
1
53749
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from lxml import etree import time from openerp import api from openerp import SUPERUSER_ID from openerp import tools from openerp.osv import fields, osv from openerp.tools.safe_eval ...
gpl-3.0
-7,487,525,680,511,415,000
48.675601
215
0.583155
false
3.836474
false
false
false
alex-ip/geophys2netcdf
utils/rename_attribute.py
1
1663
''' Created on Apr 7, 2016 @author: Alex Ip, Geoscience Australia ''' import sys import netCDF4 import subprocess import re from geophys2netcdf import ERS2NetCDF def main(): assert len( sys.argv) == 5, 'Usage: %s <root_dir> <file_template> <old_attribute_name> <new_attribute_name>' % sys.argv[0] root...
apache-2.0
6,970,008,681,008,030,000
31.607843
118
0.608539
false
3.400818
false
false
false
yavorpap/snake
snake/geometry.py
1
2024
#------------------------------------------------------------------------------- # Name: geometry # Purpose: # # Author: Yavor # # Created: # Copyright: (c) Yavor # Licence: GLPv3 #------------------------------------------------------------------------------- import math class Point: """A clas...
gpl-3.0
-7,222,601,374,503,367,000
24.948718
80
0.495059
false
3.588652
false
false
false
delMar43/wcmodtoolsources
WC1_clone/room_engine/save_expander.py
1
5799
import game_structures from block_expander import conv_endian from copy import copy ##to do: ##check to see if the system correctly transforms between saving and loading class Savesystem: def __init__(self, filename = "savegame.wld"): self.saves = [] self.filename = filename # open the save file f = open(...
mit
4,359,533,154,856,677,400
27.014493
119
0.634937
false
2.57276
false
false
false
adazey/Muzez
libs/nltk/chunk/named_entity.py
1
11160
# Natural Language Toolkit: Chunk parsing API # # Copyright (C) 2001-2016 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ Named entity chunker """ from __future__ import print_function import os, re, pickle from xml.etree im...
gpl-3.0
-490,737,461,081,699,840
31.716012
74
0.523746
false
3.788187
false
false
false
Dylan-halls/Web-Stalker
urlsnuffler.py
1
8365
#!/usr/bin/env python3 from __future__ import print_function import logging, socket, gtk, webkit, gobject, multiprocessing, sys, scapy_http.http, warnings, logger logging.getLogger("scapy.runtime").setLevel(logging.ERROR) warnings.filterwarnings("ignore") from scapy.all import sniff class Sniffer(object): def _...
mit
1,510,432,372,378,413,000
41.902564
355
0.375254
false
3.97576
false
false
false
obriencj/python-sibilant
sibilant/__init__.py
1
1153
# This library 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 option) any later version. # # This library is distributed in the hope that it will be usefu...
lgpl-3.0
-4,162,881,882,859,467,300
25.813953
70
0.703382
false
3.603125
false
false
false
hadronproject/lpms
lpms/syncers/git.py
1
2845
#!/usr/bin/env python # Copyright 2009 - 2011 Burak Sezer <purak@hadronproject.org> # # This file is part of lpms # # lpms is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
gpl-3.0
659,749,943,777,660,500
39.070423
167
0.615817
false
3.803476
false
false
false
Hamuko/lovepon
lovepon/ffmpeg.py
1
9222
from math import fabs, ceil from shlex import quote from datetime import timedelta import os import re import shutil import subprocess import tempfile import click class FFmpeg(object): """Class used for video conversions to WebM. Uses the instance variables to generate ffmpeg arguments to run and matches the...
apache-2.0
7,365,530,233,980,663,000
35.164706
82
0.552809
false
4.289302
false
false
false
tic-ull/portal-del-investigador-cvn
views.py
1
10168
# -*- encoding: UTF-8 -*- # # Copyright 2014-2015 # # STIC-Investigación - Universidad de La Laguna (ULL) <gesinv@ull.edu.es> # # This file is part of CVN. # # CVN is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by # ...
agpl-3.0
-2,380,956,261,017,551,400
34.552448
79
0.58503
false
3.976144
false
false
false
MeanEYE/Sunflower
sunflower/tools/find_files.py
1
11142
from __future__ import absolute_import import os from gi.repository import Gtk, Gdk, Pango, GObject from threading import Thread, Event class Column: ICON = 0 NAME = 1 DIRECTORY = 2 class FindFiles(GObject.GObject): """Find files tool""" __gtype_name__ = 'Sunflower_FindFiles' __gsignals__ = { 'notify-s...
gpl-3.0
-3,849,536,758,069,162,500
29.032345
103
0.691438
false
3.159955
false
false
false
FabriceSalvaire/Musica
sphinx-extension/musica-figure/setup.py
1
2088
#################################################################################################### # # Musica - A Music Theory package for Python # Copyright (C) 2017 Salvaire Fabrice # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
4,596,779,369,161,779,000
36.285714
100
0.547414
false
4.723982
false
false
false
makuto/redditLikedSavedImageDownloader
downloaders/redditUserImageScraper.py
1
14172
# -*- coding: utf-8 -*- import time import os # local imports import settings import submission import LikedSavedDatabase from utils import logger, utilities from downloaders import imageSaver from downloaders import redditScraper from downloaders import tumblrScraper from downloaders import pinterestScraper from dow...
mit
8,327,915,107,425,567,000
51.880597
157
0.620449
false
4.655716
false
false
false
kionetworks/openstack-dashboard-essex
openstack_dashboard/overrides/images/images/views.py
1
6703
# 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
-1,298,537,609,217,687,600
37.085227
79
0.570789
false
4.313385
false
false
false
pbs/django-cms
cms/admin/pageadmin.py
1
70397
# -*- coding: utf-8 -*- from cms.admin.change_list import CMSChangeList from cms.admin.dialog.views import get_copy_dialog from cms.admin.forms import PageForm, PageAddForm from cms.admin.permissionadmin import (PAGE_ADMIN_INLINES, PagePermissionInlineAdmin, ViewRestrictionInlineAdmin) from cms.admin.views import r...
bsd-3-clause
-2,424,291,827,764,147,000
43.896046
160
0.594201
false
4.332656
false
false
false
BackupTheBerlios/espressopp
src/bc/OrthorhombicBC.py
1
2332
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of t...
gpl-3.0
1,707,733,058,514,005,000
34.876923
132
0.689966
false
3.229917
false
false
false
tneumann/splocs
view_splocs.py
1
3302
import argparse from itertools import count import numpy as np import h5py from traits.api import HasTraits, Range, Instance, Bool, Int, on_trait_change from traitsui.api import View, Item, HGroup, RangeEditor from tvtk.api import tvtk from tvtk.pyface.scene_editor import SceneEditor from tvtk.common import configure_i...
mit
4,805,950,588,558,271,000
34.12766
90
0.635978
false
3.632563
false
false
false
DarkFenX/Pyfa
gui/builtinStatsViews/capacitorViewFull.py
1
7227
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ...
gpl-3.0
-9,062,078,565,782,485,000
39.601124
140
0.588764
false
3.644478
false
false
false
losonczylab/Zaremba_NatNeurosci_2017
losonczy_analysis_bundle/lab/misc/data_dumper.py
1
7175
"""README for structure of the output data & how to load. The .csv output files are tab-delimited The first 3 rows contain the following information: * ROW 1: ROI ID's (there is one unique ID for each field-of-view) * ROW 2: ROI tags (e.g. 'r' indicates that the ROI was tdTomato positive) * ROW 3: ...
mit
-8,581,814,794,429,062,000
37.423077
77
0.514146
false
3.808386
false
false
false
vorburger/mcedit2
src/mceditlib/worldeditor.py
1
31141
from __future__ import absolute_import import collections import logging import time import weakref import itertools import numpy import re from mceditlib import cachefunc from mceditlib.block_copy import copyBlocksIter from mceditlib.blocktypes import BlockType from mceditlib.nbtattr import NBTListProxy from mceditl...
bsd-3-clause
7,376,605,027,935,685,000
30.647358
159
0.594104
false
3.969029
false
false
false
devlights/try-python
trypython/stdlib/dataclasses_/dataclasses01.py
1
1767
""" dataclasses パッケージに関するサンプルです. 基本的な使い方について REFERENCES:: http://bit.ly/2KTZynw http://bit.ly/2KJCnwk http://bit.ly/2KHeNA9 http://bit.ly/2KFLGxc """ import dataclasses as dc from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr @dc.data...
mit
-441,771,589,765,826,600
21.12963
65
0.650209
false
1.685472
false
false
false
open-machine-learning/mldata
repository/challenge_urls.py
1
1959
""" URL patterns for Repository """ from django.conf.urls.defaults import * import repository.views as views import repository.views.challenge urlpatterns = patterns('', url(r'^$', views.challenge.index, name='challenge_index'), url(r'^by_pub_date/$', views.challenge.index, {'order_by' : '-pub_date'}, name='c...
gpl-3.0
-869,931,197,066,796,000
66.551724
135
0.649311
false
3.149518
false
false
false
ibaidev/bolib
bolib/objective_functions/branin.py
1
1899
# -*- coding: utf-8 -*- # # Copyright 2018 Ibai Roman # # This file is part of BOlib. # # BOlib 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
809,592,971,549,454
28.215385
75
0.546077
false
3.583019
false
false
false
tsmt/j34Bot
telebot34.py
1
4185
import urllib.request import json class TeleBot34: token = None botinfo = None curroffset = 0 updateQueue = [] regClients = [] def __init__(self, token): self.token = token self.getBotInfo() pass def getBotInfo(self): # make request f = urllib.reques...
unlicense
-2,532,760,651,653,362,000
35.710526
94
0.49773
false
4.296715
false
false
false
xiaohuanshu/Video-Share-site
douban.py
1
2672
# coding: UTF-8 import urllib import urllib2 import re from pyquery import PyQuery as pq from lxml import etree import json import sys import string reload(sys) sys.setdefaultencoding("utf-8") #urllib函数,用于提交http数据 def open(aurl,post='',Referer=''): #proxy = 'http://127.0.0.1:8088' #opener = urllib2.build_opener...
apache-2.0
3,239,341,484,663,931,000
33.565789
104
0.55179
false
3.107692
false
false
false
CenterForOpenScience/lookit-api
accounts/migrations/0048_add_otp_model.py
1
1099
# Generated by Django 3.0.7 on 2020-07-21 15:51 import django.db.models.deletion import pyotp from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("accounts", "0047_remove_user_organization"), ] operations = [ ...
apache-2.0
-7,623,430,741,125,163,000
27.921053
81
0.463148
false
5.087963
false
false
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/frame/test_indexing.py
1
106857
# -*- coding: utf-8 -*- from __future__ import print_function from warnings import catch_warnings from datetime import datetime, date, timedelta, time from pandas.compat import map, zip, range, lrange, lzip, long from pandas import compat from numpy import nan from numpy.random import randn import pytest import nu...
apache-2.0
3,149,025,408,694,788,000
33.840887
79
0.509569
false
3.427211
true
false
false
francois-vincent/navitia
source/jormungandr/jormungandr/interfaces/v1/Coverage.py
1
2566
# coding=utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility a...
agpl-3.0
36,332,661,314,822,630
35.140845
109
0.724084
false
3.634561
false
false
false
aerler/GeoPy
src/plotting/archive/mapplots.py
1
3238
''' Created on 2014-03-19 some useful functions to make map and surface plots that take advantage of variable meta data @author: Andre R. Erler, GPL v3 ''' # external imports import matplotlib.pylab as pyl import matplotlib as mpl #from mpl_toolkits.axes_grid1 import ImageGrid linewidth = .75 mpl.rc('li...
gpl-3.0
-7,852,964,616,939,725,000
42.383562
118
0.656578
false
3.324435
false
false
false
bvasilis/contextual-cnn-tf
text_cnn.py
1
5498
import tensorflow as tf class TextCNN(object): """ A CNN for text classification. Uses an embedding layer, followed by a convolutional, kmax-pooling, convolutional, maxpooling and softmax layer. """ def __init__( self, sequence_length, num_classes, vocab_size, embedding_si...
gpl-3.0
5,591,796,612,416,837,000
45.201681
116
0.557112
false
3.556274
false
false
false
tensorflow/autograph
reference_tests/while_loop_function_call_mix_test.py
1
1861
# Copyright 2017 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
200,832,401,768,934,300
24.493151
80
0.663622
false
3.699801
true
false
false
KoffeinFlummi/pymoji
test.py
1
1157
#!/usr/bin python3 import sys import pymoji exitcode = 0 # This fails for every emoji not supported by program/font/OS for e, a in pymoji.codes.items(): print("# Testing: {} ( {} ) => {}".format(e.ljust(5), pymoji.Emoji(e).char, a).ljust(60), end="") if not pymoji.Emoji(e).is_supported: print(" ... not supp...
mit
6,177,820,783,708,286,000
22.612245
99
0.634399
false
2.989664
false
false
false
Br3nda/witmproxy
libmproxy/console/help.py
1
6497
# Copyright (C) 2012 Aldo Cortesi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in ...
gpl-3.0
8,788,021,373,939,527,000
35.706215
118
0.446206
false
4.316944
false
false
false
EthanChappel/Solar-System-Sequencer
solarsystemsequencer/equipment/ascom.py
1
4458
import os import json from typing import List, Union import numpy as np import appglobals import clr clr.AddReference("lib/ASCOM.DriverAccess") clr.AddReference("lib/ASCOM.Utilities") import ASCOM.DriverAccess import ASCOM.Utilities class Device: def __init__(self, device): self.device = None self...
gpl-3.0
-4,064,876,173,912,140,000
24.768786
101
0.603185
false
3.813516
false
false
false
etalab/udata
udata/core/activity/models.py
2
2070
from datetime import datetime from blinker import Signal from mongoengine.signals import post_save from udata.models import db from udata.auth import current_user from .signals import new_activity __all__ = ('Activity', ) _registered_activities = {} class EmitNewActivityMetaClass(db.BaseDocumentMetaclass): ...
agpl-3.0
-777,017,478,074,924,400
27.75
70
0.614976
false
4.011628
false
false
false
skyler/snap
lib/util.py
1
1435
import os import errno import subprocess def mkdir_p(path): '''Recursively make all directories in a path''' try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST: pass else: raise def dict_sorted(d): '''Returns dict sorted by key as a list of t...
mit
-2,426,133,641,585,020,000
36.763158
90
0.627875
false
4.220588
false
false
false
ruipgpinheiro/flac_batch_reencode
reencode.py
1
12245
#!/usr/bin/python ######################################################################## ####################### FLAC Batch Re-encode ######################### # A Python 2.7 script for batch parallel re-encoding many FLAC files. # # This is useful to make sure that your whole FLAC library is using # # the lat...
gpl-3.0
6,929,940,522,282,492,000
33.988571
349
0.628175
false
3.375138
false
false
false
mir-group/flare
flare/kernels/three_body_mc_simple.py
1
65505
import numpy as np from flare.kernels.kernels import ( force_helper, force_energy_helper, grad_helper, three_body_fe_perm, three_body_ee_perm, three_body_se_perm, three_body_ff_perm, three_body_sf_perm, three_body_ss_perm, three_body_grad_perm, grad_constants, ) from numba im...
mit
-7,268,425,266,241,828,000
36.113314
85
0.386948
false
4.225856
false
false
false
abn/python-cafe
cafeteria/datastructs/units/__init__.py
1
1183
from re import match try: long except NameError: # noinspection PyShadowingBuiltins long = int class BaseUnitClass(float): UNITS = {} # noinspection PyInitNewSignature def __new__(cls, x, unit=None): if isinstance(x, str): units_regex = "|".join(cls.UNITS.keys()) ...
apache-2.0
5,395,334,718,409,300,000
30.972973
78
0.530854
false
4.065292
false
false
false
lowks/pymr
pymr/tests/test_run.py
1
1427
import os import unittest from click.testing import CliRunner from pymr import run class TestRun(unittest.TestCase): def test_run_command_finds_default(self): runner = CliRunner() with runner.isolated_filesystem(): with open('.pymr', 'w') as f: f.write('[tags]\ntags ...
gpl-3.0
-921,202,194,637,591,300
30.711111
67
0.571829
false
3.785146
true
false
false
ECP-CANDLE/Supervisor
workflows/async-horovod/Task.py
1
1829
# TASK # This should be a user plug-in from __future__ import print_function import os class Task: def __init__(self, logger, output, script, parallelism, number, params): self.logger = logger self.process = None self.fd = None self.output = output self.script = script ...
mit
2,287,826,957,714,892,000
29.483333
76
0.492619
false
4.396635
false
false
false
JNRowe/jnrbase
jnrbase/pip_support.py
1
3011
# """pip_support - pip workarounds support.""" # Copyright © 2014-2020 James Rowe <jnrowe@gmail.com> # Nathan McGregor <nathan.mcgregor@astrium.eads.net> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of jnrbase. # # jnrbase is free software: you can redistribute it and/or m...
gpl-3.0
1,351,354,287,192,426,500
36.5375
79
0.574759
false
4.130674
false
false
false
googleads/google-ads-python
google/ads/googleads/v6/enums/types/change_event_resource_type.py
1
1494
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
517,260,311,993,465,660
27.188679
74
0.661312
false
3.860465
false
false
false
dunn/gammu
tests/gen_sms_tests.py
1
3021
#!/usr/bin/env python # -*- coding: UTF-8 -*- # vim: expandtab sw=4 ts=4 sts=4: ''' Gammu SMS backup generator. ''' __author__ = 'Michal Čihař' __email__ = 'michal@cihar.com' __license__ = ''' Copyright © 2003 - 2015 Michal Čihař This program is free software; you can redistribute it and/or modify it under the terms o...
gpl-2.0
-951,379,982,925,268,500
24.982759
184
0.582283
false
3.657767
false
false
false
poppogbr/genropy
resources/common/gnrcomponents/batch_handler/batch_handler.py
1
11655
# -*- coding: UTF-8 -*- # chat_component.py # Created by Francesco Porcari on 2010-09-08. # Copyright (c) 2010 Softwell. All rights reserved. from gnr.web.gnrwebpage import BaseComponent from gnr.core.gnrlang import gnrImport, objectExtract from gnr.core.gnrbag import Bag class BatchMonitor(BaseComponent): js_...
lgpl-2.1
4,025,233,142,404,140,000
56.418719
160
0.54955
false
4.319867
false
false
false
wieden-kennedy/django-haikus
django_haikus/migrations/0005_auto__add_field_haikumodel_full_text.py
1
3967
# encoding: 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 'HaikuModel.full_text' db.add_column('django_haikus_haikumodel', 'full_text', self.gf('djan...
bsd-3-clause
-2,514,587,213,929,043,500
58.208955
189
0.56365
false
3.662973
false
false
false
macarthur-lab/xbrowse
seqr/management/commands/add_project_tag.py
1
1307
from django.core.management.base import BaseCommand, CommandError from django.db.models.query_utils import Q from seqr.models import Project, VariantTagType from seqr.model_utils import create_seqr_model class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('--project', help='...
agpl-3.0
3,725,878,423,760,104,000
49.269231
124
0.680184
false
3.936747
false
false
false
tectronics/nyctos
src/data.res/scripts/armor/prefixes/reinforced.py
1
1483
import sim, sim_items, main from util import * import random class ReinforcedPrefix(sim_items.Prefix): """ "reinforced" prefix boosts armor by increasing its PV or EV (whichever would normally be greater) by 1-3 points. """ def __init__(self): super(ReinforcedPrefix, self).__init__( ...
gpl-2.0
-9,204,112,638,648,562,000
32.704545
80
0.581254
false
3.882199
false
false
false
jni/skan
skan/vendored/thresholding.py
1
7886
import itertools import numpy as np from skimage.transform import integral_image from skimage.util import dtype_limits import numba def broadcast_mgrid(arrays): shape = tuple(map(len, arrays)) ndim = len(shape) result = [] for i, arr in enumerate(arrays, start=1): reshaped = np.broadcast_to(ar...
bsd-3-clause
-7,008,705,273,790,303,000
33.436681
77
0.604109
false
3.773206
false
false
false
ScreamingUdder/mantid
Framework/PythonInterface/test/python/plugins/functions/MsdPetersTest.py
1
1296
from __future__ import (absolute_import, division, print_function) import unittest import numpy as np from MsdTestHelper import is_registered, check_output, create_model, create_test_workspace, create_function_string from mantid.simpleapi import Fit class MsdPetersTest(unittest.TestCase): def test_function_has_...
gpl-3.0
-4,871,528,488,213,749,000
38.272727
114
0.647377
false
3.264484
true
false
false
ampyche/ampyche
setup/defaultpaths.py
1
1620
#!/usr/bin/python3 import os import subprocess class SetupPaths(): def __init__(self): wlan0 = subprocess.getoutput('/sbin/ifconfig wlan0') h = "http://" m = "/ampyche/music" error = "wlan0: error fetching interface information: Device not found" self.wlan0 = wlan0 self.h = h self.m = m self.error...
mit
1,901,301,579,964,812,300
28.472727
78
0.608025
false
2.750424
false
false
false
eLvErDe/nicotine-plus
pynicotine/gtkgui/downloads.py
1
19108
# -*- coding: utf-8 -*- # # COPYRIGHT (C) 2016-2017 Michael Labouebe <gfarmerfr@free.fr> # COPYRIGHT (C) 2016-2018 Mutnick <mutnick@techie.com> # COPYRIGHT (C) 2013 eL_vErDe <gandalf@le-vert.net> # COPYRIGHT (C) 2008-2012 Quinox <quinox@users.sf.net> # COPYRIGHT (C) 2009 Hedonist <ak@sensi.org> # COPYRIGHT (C) 2006-200...
gpl-3.0
5,727,615,859,211,155,000
34.782772
160
0.5953
false
3.914772
true
false
false
binarytemple/haproxy-timeplotters-parser
haproxy-parser.py
1
2276
#!/usr/bin/env python import sys from dateutil import parser file=sys.argv[1:] if not file: print "please specify input file as argument to this script" exit(1) count = 0 with open(file[0], 'r') as f: for line in f: try: fields = line.split() start=parser.parse("%s %s %s...
apache-2.0
5,239,927,052,813,543,000
35.709677
91
0.459578
false
3.293777
false
false
false
openstack/heat
heat/tests/test_properties_group.py
1
4005
# # 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 # ...
apache-2.0
-1,333,225,698,116,854,500
43.010989
78
0.538826
false
4.656977
false
false
false
kgibm/problemdetermination
scripts/was/tpvlogging.py
1
8271
# Start, stop, query, or configure TPV logging on a set of servers # Example: wsadmin -username wsadmin -password wsadmin -lang jython -f tpvlogging.py -userprefs wsadmin -action start -server server1 def usage(): print "usage: wsadmin -lang jython -f tpvlogging.py -action [start|stop|list|setlevel] -userprefs USER [...
apache-2.0
-5,027,780,480,985,339,000
31.182879
170
0.671019
false
3.071296
false
false
false
AlexStarov/Shop
applications/damon/utils.py
1
3715
import asyncio import logging import multiprocessing from django.conf import settings import asterisk.manager from redis_collections import Dict logger = multiprocessing.log_to_stderr(logging.INFO) def _connect_to_ami() -> asterisk.manager.Manager: """ Connecting to asterisk(AMI) """ while True: ...
apache-2.0
1,162,429,027,114,803,000
30.218487
78
0.592194
false
4.104972
false
false
false
msyriac/orphics
orphics/maps.py
1
63177
from __future__ import print_function from pixell import enmap, utils, resample, curvedsky as cs, reproject import numpy as np from pixell.fft import fft,ifft from scipy.interpolate import interp1d import yaml,six from orphics import io,cosmology,stats import math from scipy.interpolate import RectBivariateSpline,inte...
bsd-2-clause
-5,363,611,843,508,144,000
33.541826
203
0.614543
false
2.949164
false
false
false
TomekProdevelopers/e24cli
src/func.py
1
2587
import boto3 class Cfg: ec2 = None cfg = Cfg() class check_profile(object): def __init__(self, f): self.f = f def __call__(self, *args): if cfg.ec2 is None: print("Please set up profile: e24 or aws") return self.f(*args) def set_default_profile(par...
mit
-4,472,386,874,889,252,000
34.452055
146
0.634712
false
2.994213
false
false
false
matus-stehlik/glowing-batman
competitions/migrations/0004_auto__add_field_competition_organizer_group.py
1
20964
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Competition.organizer_group' db.add_column(u'competitions...
mit
-2,907,174,913,752,145,400
87.459916
230
0.560819
false
3.590341
false
false
false
google-research/google-research
sparse_data/data/sim_test.py
1
7867
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
3,414,960,622,290,468,000
28.575188
79
0.620313
false
3.302687
true
false
false
mabaer/forensic_tools
natted_ip_detection.py
1
2784
#!/usr/bin/python # This script prints the IPs that are likely natted using the TCP timestamp option. # The script invokes tshark and gets as parameter a pcap file. # Copyright 2015 Marc-André Bär import sys import subprocess listIPs=[] listNattedIPs=[] #Returns number of frames def getFrameCount(frames): return...
gpl-2.0
-7,275,602,389,794,584,000
33.8125
177
0.663075
false
3.252336
false
false
false
vlegoff/tsunami
src/primaires/salle/commandes/etendue/cote_ajouter.py
1
3227
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this ...
bsd-3-clause
-3,525,610,655,706,161,000
44.084507
79
0.676976
false
3.704861
false
false
false
shilad/geo-provenance-viz
data/scripts/create_domains.py
1
4973
__author__ = 'shilad' import collections import io import json import marshal import os import subprocess import sys import tldextract import traceback import urllib2 def warn(message): sys.stderr.write(message + '\n') def open_bz2(path): DEVNULL = open(os.devnull, 'w') p = subprocess.Popen(["pbzcat", p...
apache-2.0
7,937,624,274,821,008,000
30.08125
103
0.556405
false
3.302125
false
false
false
dltn/tortellini
server-firmware/Processing/DataPusher/oauthlib/oauth2/rfc6749/clients/mobile_application.py
1
9156
# -*- coding: utf-8 -*- """ oauthlib.oauth2.rfc6749 ~~~~~~~~~~~~~~~~~~~~~~~ This module is an implementation of various logic needed for consuming and providing OAuth 2.0 RFC6749. """ from __future__ import absolute_import, unicode_literals from .base import Client from ..parameters import prepare_grant_uri from ..pa...
mit
-9,126,146,475,474,549,000
50.728814
137
0.6481
false
4.468521
false
false
false
jens-a-e/staalpiplayer
dmx/__init__.py
1
2151
import sys import serial import struct import numpy import time import math import random class DMXDevice(object): DEBUG = False def __init__(self, start, length): self.start, self.length = start, length if start < 1: print "DMX Channels must start at least at 1!" self.start = 1 self.blacko...
gpl-3.0
-5,255,746,908,915,081,000
25.231707
75
0.630404
false
3.200893
false
false
false
cool-RR/cute-wing-stuff
scripts/push_line_to_end.py
1
3545
# Copyright 2009-2014 Ram Rachum. # This program is distributed under the MIT license. from __future__ import with_statement import os.path, sys sys.path += [ os.path.dirname(__file__), os.path.join(os.path.dirname(__file__), 'third_party.zip'), ] from python_toolbox import string_tools import wingapi im...
mit
3,883,187,155,571,205,000
34.45
79
0.590409
false
4.088812
false
false
false
amadeusproject/amadeuslms
bulletin/serializers.py
1
12627
""" Copyright 2016, 2017 UFPE - Universidade Federal de Pernambuco Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como publicada pela ...
gpl-2.0
-7,957,297,920,854,449,000
32.068241
231
0.662407
false
3.131494
false
false
false
readdy/readdy
wrappers/python/src/python/readdy/api/trajectory.py
1
26325
# coding=utf-8 # Copyright © 2018 Computational Molecular Biology Group, # Freie Universität Berlin (GER) # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must ret...
bsd-3-clause
-4,600,007,790,698,382,300
42.581126
120
0.605706
false
4.221812
false
false
false
UnitedThruAction/PrecinctDB
src/Cousub.py
1
4545
"""Class to represent the COUSUB (COUnty SUBdivision) level of the Census, used in the naming convention for Election Districts in some counties. """ from tqdm import tqdm from couchdb.mapping import Document, TextField, IntegerField from Database import Database, QueryType class Cousub(Document): """COUnty SU...
mit
-2,888,762,316,842,533,400
37.516949
79
0.546535
false
3.665323
false
false
false
facebookresearch/fastText
python/benchmarks/get_word_vector.py
1
1502
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ ...
mit
5,576,297,108,336,475,000
29.04
78
0.641145
false
3.559242
false
false
false
dhocker/athomepowerlineserver
testclient/ahps_client.py
1
24338
# # AtHomePowerlineServer - networked server for X10 and WiFi devices # Copyright © 2014, 2020 Dave Hocker (email: AtHomeX10@gmail.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, v...
gpl-3.0
-8,405,126,692,640,701,000
28.2699
136
0.586925
false
3.919633
false
false
false
dunkhong/grr
grr/server/grr_response_server/rdfvalues/objects.py
1
21984
#!/usr/bin/env python """Top level datastore objects. This package contains the rdfvalue wrappers around the top level datastore objects defined by objects.proto. """ from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import functools import hashlib import ...
apache-2.0
6,188,827,126,327,592,000
29.789916
80
0.689183
false
3.77732
false
false
false
IvarsKarpics/mxcube
gui/widgets/routine_dc_char_widget_layout.py
1
3762
# # Project: MXCuBE # https://github.com/mxcube # # This file is part of MXCuBE software. # # MXCuBE 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...
lgpl-3.0
3,860,248,042,025,868,300
43.258824
84
0.606326
false
3.617308
false
false
false
evernote/pootle
pootle/apps/evernote_auth/migrations/0002_data__adjust_pks.py
1
7861
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Replace existing User FKs with their PootleProfile counterparts. This will...
gpl-2.0
7,213,035,376,260,031,000
67.356522
230
0.563033
false
3.619245
false
false
false
mbedmicro/pyOCD
pyocd/target/builtin/target_MKL28Z512xxx7.py
1
11291
# pyOCD debugger # Copyright (c) 2006-2013,2018 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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/LICENS...
apache-2.0
-5,302,605,662,147,541,000
49.182222
153
0.715703
false
2.381063
false
false
false
the0forge/sp
frontend/models.py
1
28529
# -*- coding: utf-8 -*- from django.contrib.auth.models import AbstractBaseUser from django.core.urlresolvers import reverse from django.db import models from django.template.defaultfilters import slugify from datetime import datetime from django.conf import settings from decimal import Decimal from colorfield....
gpl-3.0
866,189,637,661,283,300
33.134236
140
0.604122
false
3.859443
false
false
false
mfigurnov/sact
fake_cifar10.py
1
2418
# Copyright 2016 Google 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 applicable law or a...
apache-2.0
-526,887,796,072,276,860
30.402597
80
0.672457
false
3.838095
false
false
false
Tim---/scapy-tetra
scapy_tetra/mac_type.py
1
2142
#!/usr/bin/env python # Fields differentiating between several MAC PDU types from scapy.packet import Packet, bind_layers from scapy.fields import BitEnumField, ConditionalField from .gsmtap import GSMTAP # Table 321: MAC PDU types for SCH/F, SCH/HD, STCH and BSCH class MAC_DL(Packet): name = 'MAC (downlink)' ...
gpl-2.0
-8,505,794,606,212,739,000
29.6
59
0.572829
false
2.807339
false
false
false
CoPhi/wordnet-like-searchpage
parser/hrv/manageids.py
1
1702
#! /usr/bin/env pythonimport sys import collections import shutil import os import os.path import hashlib from sets import Set import string # other utils functions sep="|" def returnWN30Id(id): pos = id[0] other = id[2:] if pos == 'n': pos = '1'; elif pos == 'v': pos = '2'; elif pos == 'a': pos = ...
gpl-3.0
7,135,100,050,336,141,000
13.191667
32
0.536428
false
2.233596
false
false
false
kaushik94/sympy
sympy/geometry/point.py
1
36250
"""Geometrical Points. Contains ======== Point Point2D Point3D When methods of Point require 1 or more points as arguments, they can be passed as a sequence of coordinates or Points: >>> from sympy.geometry.point import Point >>> Point(1, 1).is_collinear((2, 2), (3, 4)) False >>> Point(1, 1).is_collinear(Point(2, 2)...
bsd-3-clause
2,243,155,447,638,387,200
25.772526
92
0.531503
false
3.950954
false
false
false
radical-software/mongrey
mongrey/ext/slugify/__init__.py
1
1063
from .main import Slugify, UniqueSlugify from .alt_translates import * slugify = Slugify() unique_slugify = UniqueSlugify() slugify_unicode = Slugify(translate=None) slugify_url = Slugify() slugify_url.to_lower = True slugify_url.stop_words = ('a', 'an', 'the') slugify_url.max_length = 200 slugify_filename = Slugi...
bsd-3-clause
-6,626,177,688,992,938,000
27.72973
96
0.685795
false
3.231003
false
false
false
CodingCrush/WeeklyReport
deploy/config.py
1
1432
#coding:utf-8 import os base_dir = os.path.dirname(os.path.realpath(__file__)) DEBUG = True SECRET_KEY = os.environ.get('SECRET_KEY') or 'nobody knows the password' PER_PAGE = 10 SQLALCHEMY_COMMIT_ON_TEARDOWN = True SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_RECORD_QUERIES = True IMAGE_UPLOAD_DIR = 'static...
mit
7,987,779,683,887,999,000
27.622222
92
0.621118
false
2.308244
false
true
false
msanatan/organise
organise/views/todos.py
1
1456
from flask import Blueprint, render_template, request, redirect, url_for, flash from organise.models import Todo from organise import db todos = Blueprint('todos', __name__, template_folder='/../templates') @todos.route('/') def index(): all_todos = Todo.query.order_by(Todo.id.desc()).all() return render_temp...
mit
-5,600,133,511,941,293,000
30.652174
79
0.674451
false
3.117773
false
false
false