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
transientlunatic/minke
minke/mdctools.py
1
34706
""" 88b d88 88 88 888b d888 "" 88 88`8b d8'88 88 88 `8b d8' 88 88 8b,dPPYba, 88 ,d8 ,adPPYba, 88 `8b d8' 88 88 88P' `"8a 88 ,a8" a8P_____88 88 `8b d8' 88 88...
isc
-1,914,375,457,587,391,000
35.687104
291
0.54953
false
3.95555
false
false
false
niutool/niuforum
forum/utils.py
1
3033
import re from PIL import Image, ImageOps from io import BytesIO from django.contrib.auth.models import User from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import HttpResponseForbidden from django.shortcuts import get_object_or_404 from django.core.files.uploadedfile import Si...
mit
2,211,155,211,056,811,500
32.7
94
0.667326
false
3.430995
false
false
false
rodrigorm/golimar
plugin/python/golimar/ui/vimui.py
1
8614
#!/usr/bin/env python # # vimui.py # # User Interface for Vim import functools import vim class Ui: def __init__(self, skype): self.skype = skype self.is_open = False self.tabnr = None def open(self): if self.is_open: return # try: self.messages =...
gpl-2.0
-7,399,287,538,600,110,000
25.262195
84
0.565823
false
3.714532
false
false
false
DmitriySalnikov/godot
modules/mono/build_scripts/godot_net_sdk_build.py
11
1755
# Build Godot.NET.Sdk solution import os from SCons.Script import Dir def build_godot_net_sdk(source, target, env): # source and target elements are of type SCons.Node.FS.File, hence why we convert them to str module_dir = env["module_dir"] solution_path = os.path.join(module_dir, "editor/Godot.NET.Sd...
mit
5,912,477,984,069,791,000
30.909091
114
0.688889
false
3.095238
false
false
false
epam/DLab
infrastructure-provisioning/src/general/scripts/aws/edge_start.py
1
3048
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS INC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #...
apache-2.0
-5,064,682,080,044,262,000
39.64
110
0.580052
false
4.02642
false
false
false
njwilson23/rasterio
rasterio/tool.py
1
5429
""" Implementations of various common operations, like `show()` for displaying an array or with matplotlib, and `stats()` for computing min/max/avg. Most can handle a numpy array or `rasterio.Band()`. Primarily supports `$ rio insp`. """ from __future__ import absolute_import import code import collections import ...
bsd-3-clause
3,904,077,660,816,779,300
30.201149
78
0.63695
false
3.988979
false
false
false
MixedEmotions/27_emotion_video_dcu
emotionService/emotionService.py
1
5891
# coding: utf-8 # In[ ]: from __future__ import division import logging import os import xml.etree.ElementTree as ET from senpy.plugins import EmotionPlugin, SenpyPlugin from senpy.models import Results, EmotionSet, Entry, Emotion, Error logger = logging.getLogger(__name__) import numpy as np import math, itertoo...
apache-2.0
-8,383,515,891,701,562,000
32.282486
137
0.55101
false
4.029412
false
false
false
muccc/luftschleuse2
software/lockd/announce.py
1
1588
# This file is part of lockd, the daemon of the luftschleuse2 project. # # See https://github.com/muccc/luftschleuse2 for more information. # # Copyright (C) 2013 Tobias Schneider <schneider@muc.ccc.de> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
gpl-3.0
6,334,732,133,319,795,000
35.930233
74
0.65869
false
3.544643
false
false
false
Harhoy/transport
transport.py
1
9259
from __future__ import division import numpy as np import math as m from easygui import multenterbox import pandas as pd import matplotlib.pyplot as plt import math as m def import_xl(file_path): df = pd.read_excel(file_path,header = None) df = df.values return df def export_xl(file_path,sheets): writ...
mit
-5,535,627,304,960,529,000
26.804805
97
0.550491
false
2.888924
false
false
false
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/cert_schema/model.py
1
12691
""" class ProofType(Enum): merkle_proof_2017 = 0 class SignatureType(Enum): signed_content = 0, signed_transaction = 1 Signature --------- | |-- EmbeddedSignature: signs "contents" directly | |-- TransactionSignature: "contents" are embedded in transaction. Merkle proof for multiple """ import...
gpl-3.0
154,558,770,172,818,700
33.961433
116
0.60405
false
4.265882
false
false
false
smurfix/HomEvenT
modules/path.py
1
1945
# -*- coding: utf-8 -*- ## ## Copyright © 2007, Matthias Urlichs <matthias@urlichs.de> ## ## 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
-2,167,329,687,825,755,100
28.454545
72
0.738169
false
3.521739
false
false
false
mohd-akram/item.tf
tf2api.py
1
15632
"""This module is based on the Steam WebAPI and can be used to get information about items in TF2. Using this module, you can obtain the item schema, store prices, bundles, item sets and attributes for TF2. You can also obtain market prices from backpack.tf and trade.tf. There are also functions for parsing the inform...
mit
3,765,730,247,329,332,700
32.18896
80
0.5625
false
4.146419
false
false
false
WDavidX/pipy
v3dht22.py
1
20163
#!/usr/bin/env python # 2014-07-11 DHT22.py import time import atexit import pigpio import smbus import subprocess import os import signal import RPi.GPIO as GPIO import psutil import json import socket import math import datetime import urllib2 class i2c_device: def __init__(self, addr, port=1): self.a...
mit
-1,763,873,955,601,170,400
30.802839
118
0.560581
false
3.379651
false
false
false
VanceKingSaxbeA/MarketsEngine
src/googlequotemachine.py
1
3986
/*Owner & Copyrights: Vance King Saxbe. A.*/""" Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxb...
mit
-2,020,211,338,537,667,600
38.87
530
0.466633
false
4.346783
false
false
false
w4nderlust/lingua-politicae
scraping/scrape_facebook.py
1
1718
import os import facebook import json import requests # get temporary access token here: https://developers.facebook.com/tools/explorer/ from globals import POLITICIANS_INFO_FILE_PATH, FACEBOOK_POSTS_DIRECTORY access_token = 'EAACEdEose0cBAAKiNQ3ZB3kpnGu7GqkWq4mUHQBb4BuKmae6FHH3jSTIqZBeuqU7hhVv3WiAdxWMLbwx1h9ptmzRWM...
apache-2.0
-5,462,487,004,753,837,000
29.678571
213
0.672293
false
3.140768
false
false
false
tulip-control/tulip-control
contrib/fmu/robotfmu.py
1
3360
#!/usr/bin/env python """Demonstration of FMU export from a controller synthesized using TuLiP This is a modified copy from the TuLiP sources of examples/robot_planning/continuous.py that exports an FMU. The key changes are * caching of the abstraction and controller in AbstractPwa.p and FSM.p, and * calling exportF...
bsd-3-clause
7,800,883,244,847,692,000
29
76
0.622917
false
3.149016
false
false
false
pyfa-org/Pyfa
service/port/eft.py
1
34060
# ============================================================================= # Copyright (C) 2014 Ryan Holmes # # 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 v...
gpl-3.0
3,213,832,208,081,448,000
34.113402
154
0.555255
false
4.148094
false
false
false
lexxito/monitoring
ceilometer/tests/api/v2/test_app.py
1
10718
# -*- encoding: utf-8 -*- # # Copyright 2013 IBM Corp. # Copyright © 2013 Julien Danjou # # Author: Julien Danjou <julien@danjou.info> # # 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 # # ...
apache-2.0
-7,755,225,670,747,542,000
46.211454
78
0.547355
false
4.637386
true
false
false
danforthcenter/plantcv
plantcv/plantcv/visualize/obj_size_ecdf.py
1
1554
# Plot Empirical Cumulative Distribution Function for Object Size import os import cv2 import pandas as pd from plantcv.plantcv import params from plantcv.plantcv._debug import _debug from statsmodels.distributions.empirical_distribution import ECDF from plotnine import ggplot, aes, geom_point, labels, scale_x_log10 ...
mit
-1,732,821,960,471,904,500
33.533333
94
0.677606
false
3.313433
false
false
false
shoopio/shoop
shuup_tests/browser/admin/test_picotable.py
2
6430
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import os import time import pytest from django.core.urlresolvers...
agpl-3.0
-8,168,418,631,158,132,000
33.756757
118
0.655832
false
3.324716
true
false
false
blab/nextstrain-augur
tests/python2/test_fitness_model.py
1
10095
""" Tests for the `fitness_model` module. """ import Bio.Align.AlignInfo import Bio.Phylo import Bio.SeqIO import datetime import numpy as np import pytest import sys import os # we assume (and assert) that this script is running from the tests/ directory sys.path.append(os.path.join(os.path.dirname(__file__), '..', '...
agpl-3.0
-5,951,141,255,891,297,000
35.709091
106
0.665478
false
3.517422
true
false
false
lalitkumarj/NEXT-psych
next/apps/TupleBanditsPureExploration/Dashboard.py
1
3313
""" TupleBanditsPureExplorationDashboard author: Nick Glattard, n.glattard@gmail.com last updated: 4/24/2015 ###################################### TupleBanditsPureExplorationDashboard """ import json import numpy import numpy.random import matplotlib.pyplot as plt from datetime import datetime from datetime impor...
apache-2.0
-895,578,038,832,103,800
37.976471
278
0.635376
false
3.981971
false
false
false
clubcapra/Ibex
src/capra_ui/GpsPointManager/controllers/DialogAddPoint.py
1
1045
__author__ = 'jstcyr' from PyQt4 import QtGui, QtCore from ..views import DialogAddPointUi from ..models.Coordinates import Coordinates from ..utilities import CoordinatesUtils class DialogAddPoint(QtGui.QDialog, DialogAddPointUi.Ui_Dialog_add_point): def __init__(self, parent=None): super(DialogAddPoint...
gpl-3.0
5,127,037,757,480,092,000
39.230769
96
0.686124
false
4.066148
false
false
false
genialis/resolwe
resolwe/flow/migrations/0023_process_entity_2.py
1
1150
# -*- coding: utf-8 -*- # Generated by Django 1.11.14 on 2018-10-01 03:15 from __future__ import unicode_literals from django.db import migrations def migrate_flow_collection(apps, schema_editor): """Migrate 'flow_collection' field to 'entity_type'.""" Process = apps.get_model("flow", "Process") Descript...
apache-2.0
5,028,491,642,079,892,000
30.081081
86
0.633913
false
4.307116
false
false
false
pitunti/alfaPitunti
plugin.video.alfa/channels/peliculashindu.py
1
5105
# -*- coding: utf-8 -*- import re import urlparse from core import httptools from core import scrapertools from core import servertools from core.item import Item from platformcode import config, logger host = "http://www.peliculashindu.com/" def mainlist(item): logger.info() itemlist = list() iteml...
gpl-3.0
7,154,396,034,331,516,000
39.704
128
0.630896
false
3.301752
false
false
false
NCI-GDC/gdcdatamodel
docs/bin/schemata_to_graphviz.py
1
1305
import os from gdcdatamodel import models as m from graphviz import Digraph def build_visualization(): print('Building schema documentation...') # Load directory tree info bin_dir = os.path.dirname(os.path.realpath(__file__)) root_dir = os.path.join(os.path.abspath( os.path.join(bin_dir, os.p...
apache-2.0
-1,928,741,707,726,198,000
29.348837
82
0.613027
false
3.425197
false
false
false
Diacamma2/asso
diacamma/member/migrations/0002_change_activity.py
1
1810
# -*- coding: utf-8 -*- ''' Initial django functions @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License ...
gpl-3.0
-43,555,210,291,383,250
29.677966
112
0.695028
false
4.022222
false
false
false
bintoro/schematics
schematics/types/base.py
1
27989
import uuid import re import datetime import decimal import itertools import functools import random import string import six from six import iteritems from ..exceptions import ( StopValidation, ValidationError, ConversionError, MockCreationError ) try: from string import ascii_letters # PY3 except ImportErr...
bsd-3-clause
-4,595,678,198,879,457,300
30.342665
95
0.586016
false
4.09855
false
false
false
dblN/misc
utils.py
1
3046
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf from keras.layers import Dense from keras.preprocessing.image import apply_transform import matplotlib.pyplot as plt def take_glimpses(image, location, sizes): ...
mit
-7,068,430,309,194,083,000
34.418605
109
0.602101
false
3.332604
false
false
false
banacer/lab221
building_control/Python/Pubsub.py
1
1316
import pika import logging import sys __mqtt_host = '172.26.50.120' __mqtt_port = 1883 def printit(ch, method, properties, body): """ prints the body message. It's the default callback method :param ch: keep null :param method: keep null :param properties: keep null :param body: the message ...
mit
2,891,826,054,302,727,000
28.931818
85
0.681611
false
3.615385
false
false
false
BL-Labs/jokedbapp
jokedbapp/tests/test_load_omeka.py
1
1534
import unittest from models import * from utils.handle_transcript import TranscriptionParser, OmekaXML, om from test_data import TRANSCRIPTIONS OMEKA_COLLECTION = "test_omeka_collection.xml" # User, Transcription, Joke, Picture class TestUserClass(unittest.TestCase): def setUp(self): self.TP = Transcription...
mit
3,395,962,392,050,536,000
29.078431
77
0.690352
false
3.175983
true
false
false
pobear/django-xadmin
xadmin/plugins/actions.py
1
10988
from django import forms from django.core.exceptions import PermissionDenied from django.db import router from django.http import HttpResponse, HttpResponseRedirect from django.template import loader from django.template.response import TemplateResponse # from django.utils.datastructures import SortedDict from collecti...
bsd-3-clause
-8,988,290,766,967,416,000
36.630137
142
0.608664
false
4.337939
false
false
false
Ichimonji10/robottelo
tests/foreman/ui/test_discoveryrule.py
1
22334
# -*- encoding: utf-8 -*- """Test class for Foreman Discovery Rules @Requirement: Discoveryrule @CaseAutomation: Automated @CaseLevel: Acceptance @CaseComponent: UI @TestType: Functional @CaseImportance: High @Upstream: No """ from fauxfactory import gen_integer, gen_ipaddr, gen_string from nailgun import entiti...
gpl-3.0
5,553,202,389,800,551,000
34.116352
79
0.563849
false
4.19812
true
false
false
phwallen/smrc
heSensor.py
1
4357
''' Simimple Model Railway Automation Hall-effect Sensor Support Module Author : Peter Wallen Created : 21/1/13 Version 1.0 This code encapulates hardware associated with sensors used to detect the location of trains. The hardware supported comprises of : One or more Microchip MCP2301...
mit
5,683,908,779,810,081,000
32.775194
103
0.684416
false
3.300758
false
false
false
hazelnusse/pydy
examples/pointfootwalker/GarciasPFW_eoms.py
1
2122
# Sun Aug 23 13:12:56 2009 from numpy import sin, cos, tan, vectorize def f(x, t, parameter_list): # Unpacking the parameters Mh, mf, g, L, q3 = parameter_list # Unpacking the states (q's and u's) q1, q2, u1, u2 = x s1 = sin(q1) cos(q3) = cos(q3) c2 = cos(q2) sin(q3) = sin(q3) s2 = ...
bsd-3-clause
-8,282,384,684,407,211,000
54.868421
747
0.49623
false
1.698959
false
false
false
pyxll/pyxll-examples
matplotlib/interactiveplot.py
1
3441
""" Example code showing how to draw an interactive matplotlib figure in Excel. While the figure is displayed Excel is still useable in the background and the chart may be updated with new data by calling the same function again. """ from pyxll import xl_func from pandas.stats.moments import ewma # matplotlib imports...
unlicense
-8,776,649,208,221,896,000
30.281818
92
0.657076
false
3.892534
false
false
false
ColumbiaCMB/kid_readout
apps/data_taking_scripts/2017-05-jpl-lf-n1-optical/single-horn/sweep_and_stream_bb_4.py
1
3439
from kid_readout.interactive import * from kid_readout.equipment import hardware from kid_readout.measurement import acquire from kid_readout.roach import analog from kid_readout.equipment import agilent_33220 import time fg = agilent_33220.FunctionGenerator(addr=('192.168.1.135', 5025)) fg.set_load_ohms(1000) fg.set...
bsd-2-clause
2,862,236,436,444,174,300
39.458824
124
0.624891
false
2.885067
false
false
false
el33th4x0r/crosstex
crosstex/cmd.py
1
12121
import argparse import importlib import logging import os import os.path import sys import crosstex import crosstex.style logger = logging.getLogger('crosstex') parser = argparse.ArgumentParser(prog='crosstex', description='A modern, object-oriented bibliographic tool.') #parser.add_...
gpl-2.0
-3,937,128,750,447,653,000
51.021459
102
0.557875
false
4.040333
false
false
false
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/modules/rna_info.py
1
22978
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
-7,275,365,268,557,199,000
31.002786
179
0.556402
false
3.707923
false
false
false
natematias/pond-hopper
pond-hopper.py
1
8692
import re import json import sys import os import requests import datetime from bs4 import BeautifulSoup from feedgen.feed import FeedGenerator import dateutil.parser from pytz import timezone import pytz import flask from flask import Flask from flask import render_template from gender_detector import GenderDetector i...
mit
-5,024,372,724,159,938,000
33.220472
221
0.652094
false
3.19794
false
false
false
dc-atlas/bcml
doc/conf.py
1
7251
# # # Copyright (C) 2010 Razvan Popovici <rp@miravtech.com> # Copyright (C) 2010 Luca Beltrame <luca.beltrame@unifi.it> # Copyright (C) 2010 Enrica Calura <enrica.calura@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as p...
lgpl-2.1
9,100,167,073,289,095,000
32.109589
80
0.717005
false
3.678843
false
false
false
lmandres/MeSH-Analysis-Methodology
searchlib/helper.py
1
30718
''' Created on Jul 5, 2011 @author: Leo Andres (user) ''' from datetime import timedelta import os import re import xml.parsers.expat class TextXMLParser: element_path = '' element_dictionary = {} current_element_data = {} def __init__(self): self.element_path = '' se...
gpl-2.0
2,402,271,350,444,328,000
39.259502
209
0.521388
false
4.804191
false
false
false
grow/grow
grow/cache/object_cache.py
1
2129
""" Cache for storing and retrieving data in a pod. Supports arbitrary data based on a cache key. The contents of the cache should be raw and not internationalized as it will be shared between locales. """ import re FILE_OBJECT_CACHE = 'objectcache.json' FILE_OBJECT_SUB_CACHE = 'objectcache.{}.json' class Object...
mit
8,474,668,111,042,571,000
26.649351
88
0.592767
false
4.110039
false
false
false
rrader/Pomodoro
pomodoro/mainframe.py
1
4124
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- # mainframe.py # Pomodoro # # Created by Roman Rader on 22.06.11. # New BSD License 2011 Antigluk https://github.com/antigluk/Pomodoro """ Contains main frame of application. """ import wx from state import PomodoroStateProxy as PomodoroState from NotificationCente...
bsd-3-clause
-2,721,271,360,558,041,600
32.764706
75
0.608912
false
3.193164
false
false
false
ace-han/onedegree
admin/account/api/v1/fields.py
1
1049
from rest_framework import serializers from rest_framework.relations import RelatedField class TaggedItemRelatedField(serializers.PrimaryKeyRelatedField): """ A custom field to use for the `tagged_object` generic relationship. """ def __init__(self, **kwargs): self.pk_field = kwargs.p...
bsd-3-clause
4,808,190,821,871,013,000
38.423077
80
0.638704
false
4.212851
false
false
false
gjhiggins/electrum
lib/wallet.py
1
75104
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
gpl-3.0
9,193,974,612,486,709,000
35.142445
149
0.551622
false
3.863772
false
false
false
nextgis/nextgisweb_compulink
nextgisweb_compulink/compulink_admin/__init__.py
1
1255
# -*- coding: utf-8 -*- from __future__ import unicode_literals from os import path from nextgisweb.component import Component, require from .model import Base, PROJECT_STATUS_PROJECT from .ident import COMP_ID from nextgisweb_compulink.init_data.command import DBInit from .view import get_regions_from_resource, get_...
gpl-2.0
5,916,443,532,301,515,000
27.522727
94
0.667729
false
3.83792
false
false
false
techtonik/readthedocs.org
readthedocs/projects/tasks.py
1
31592
"""Tasks related to projects This includes fetching repository code, cleaning ``conf.py`` files, and rebuilding documentation. """ import os import shutil import json import logging import socket import requests import hashlib from collections import defaultdict from celery import task, Task from djcelery import cel...
mit
5,030,569,804,307,383,000
34.576577
99
0.584167
false
4.218454
false
false
false
XiaoJianfeng/ibl
util/txt2xlsx.py
1
1634
#!/usr/bin/env python import sys import argparse import csv import xlsxwriter ''' convert txt file[s] to .xlsx file usage: $0 [txt1 txt2 txt...] xlsx_file multiple txts will be added as separate excel sheet ''' #----------------------------------------------------------------------------- def correct_data_type(v): ...
lgpl-3.0
-6,901,755,302,760,224,000
32.346939
97
0.55814
false
3.62306
false
false
false
eResearchSA/reporting-producers
reporting/utilities.py
1
3059
#!/usr/bin/env python # pylint: disable=broad-except import logging import sys import random import string import socket import datetime import platform import time import os from reporting.exceptions import PluginInitialisationError global_vars=None def set_global(vars): global global_vars global_vars = va...
apache-2.0
-4,377,217,827,614,726,000
28.142857
100
0.61883
false
3.739609
false
false
false
nateGeorge/IDmyDog
process_ims/other/2d_haralick_map.py
1
3493
from __future__ import print_function import pandas as pd import pickle as pk import cv2 import os import re import progressbar import imutils import numpy as np import matplotlib.pyplot as plt import seaborn as sns from mahotas.features import haralick import json from sklearn.decomposition import PCA plt.style.use('s...
mit
-3,552,087,796,513,353,000
30.196429
107
0.583453
false
2.756906
false
false
false
GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/rules/d20_combat/to_hit_processing.py
1
12638
from templeplus.pymod import PythonModifier from toee import * import tpdp import logbook import roll_history debug_enabled = False def debug_print(*args): if debug_enabled: for arg in args: print arg, return def handle_sanctuary(to_hit_eo, d20a): tgt = d20a.target if tgt == OBJ_H...
mit
-2,265,534,329,201,253,600
40.032468
182
0.677006
false
3.051183
false
false
false
openbermuda/karmapi
karmapi/nzquake.py
1
1633
""" The data is available from Geonet, the official source of New Zealand earthquake hazard data: http://wfs.geonet.org.nz/geonet/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=geonet:quake_search_v1&outputFormat=csv Geonet Data policy ================== All data and images are made available free of char...
gpl-3.0
-3,375,490,667,483,754,500
29.240741
137
0.764238
false
3.346311
false
false
false
hexforge/pulp_db
utils/decoder/hkseomd_decoder.py
1
7007
import sys import struct import pprint from rosetta.common import get_spec, decode, build_standard_msg_parser, pb_parser def build_msg_parsers(spec): decoders = {} endian = spec['endian'] decoders['header'] = build_standard_msg_parser(spec['header']) decoders[100] = build_standard_msg_parser(spe...
apache-2.0
6,615,086,416,629,237,000
39.04
91
0.62095
false
3.338256
false
false
false
nathanbjenx/cairis
cairis/bin/cairisd.py
1
1541
#!/usr/bin/python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
apache-2.0
-5,118,065,886,492,460,000
29.215686
67
0.73329
false
3.550691
false
false
false
ednapiranha/snapshots-from-here
snapshots/snappy.py
1
11535
# -*- coding: utf-8 -*- import base64 import os import random import time from auto_tagify import AutoTagify from boto.s3.key import Key from PIL import Image from pymongo import DESCENDING from pymongo.objectid import ObjectId import settings CONTENT_TYPE = 'image/jpeg' ATAG = AutoTagify() ATAG.link = "/tag" RECENT...
bsd-3-clause
7,200,109,346,975,077,000
40.642599
91
0.525704
false
4.158255
false
false
false
Mikescher/Project-Euler_Befunge
compiled/Python2/Euler_Problem-046.py
1
4454
#!/usr/bin/env python2 # transpiled with BefunCompile v1.3.0 (c) 2017 import sys import zlib, base64 _g = ("AR+LCAAAAAAABADt2k1Lw0AQBuC/st20l4S4k020zVAWL5716CGkRS0LoriI7qk/3lk/oNraFooo8j6wgelMs5uZ5taYJSotY9TF48Pt4vpJnT3fLR5VmeKru8W9ak7U" + "H5cBAAAAAAAAAAAAAAAAAAAAAAAA/AO/+V88Z3cUxNViii5GFagtPLW55UDjsvM0TiFPf/Kcn84R...
mit
-5,779,677,972,069,626,000
17.032389
136
0.504939
false
1.984848
false
false
false
anantag/twitterAPIHack
twitterstream.py
1
1840
import oauth2 as oauth import urllib2 as urllib # See Assignment 1 instructions or README for how to get these credentials access_token_key = "55773725-mKHWq6Fyj2TmqR6xPiBamIw2EYb4B4O95CWXYJJZW" access_token_secret = "OAw65RNmhHsXTyFIHSZod39nFRwkTdStfTmn5YB0oM" consumer_key = "N1o286mxPcWFofmwhZqOow" consumer_secret ...
gpl-2.0
-1,027,548,437,362,856,700
29.163934
78
0.677174
false
3.274021
false
false
false
diorcety/translate
translate/convert/ical2po.py
1
4592
# -*- coding: utf-8 -*- # # Copyright 2007 Zuza Software Foundation # # This file is part of translate. # # translate is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at y...
gpl-2.0
6,030,933,143,855,780,000
34.596899
94
0.640679
false
4.133213
false
false
false
ptphp/PyLib
src/webpy1/src/borough/parseBody.py
1
4768
# coding=gbk import re import string,urlparse import os.path as osp nums = string.digits # Çå³ýhtml´úÂëÀïµÄ¶àÓà¿Õ¸ñ def clearBlank(html): if not html or html == None : return ; html = re.sub('\r|\n|\t','',html) html = html.replace('&nbsp;','').replace(' ','').replace('\'','"') return html def...
apache-2.0
-9,106,232,021,613,570,000
27.556886
153
0.490352
false
2.26186
false
false
false
tsherwen/AC_tools
Scripts/2D_GEOSChem_slice_subregion_plotter_example.py
1
2934
#!/usr/bin/python # -*- coding: utf-8 -*- """ Plotter for 2D slices of GEOS-Chem output NetCDFs files. NOTES --- - This is setup for Cly, but many other options (plot/species) are availible by just updating passed variables/plotting function called. """ import AC_tools as AC import numpy as np import matplotli...
mit
3,210,553,677,345,683,500
31.6
94
0.599864
false
3.300337
false
false
false
takluyver/xray
xray/groupby.py
1
12796
import itertools from common import ImplementsReduce from ops import inject_reduce_methods import variable import dataset import numpy as np def unique_value_groups(ar): """Group an array by its unique values. Parameters ---------- ar : array-like Input array. This will be flattened if it is...
apache-2.0
-8,291,218,335,638,136,000
37.197015
81
0.604408
false
4.500879
false
false
false
BirkbeckCTP/janeway
src/submission/urls.py
1
1920
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.conf.urls import url from submission import views urlpatterns = [ url(r'^start/$', views.start, name='su...
agpl-3.0
7,696,528,079,549,939,000
49.526316
117
0.665104
false
3.327556
false
false
false
dsoprea/RandomUtility
python/ssl_sign.py
1
3373
#!/usr/bin/env python2.7 import os.path import argparse import datetime import hashlib import random import time import M2Crypto.X509 import M2Crypto.ASN1 import M2Crypto.RSA import M2Crypto.EVP _OUTPUT_PATH = 'output' _CA_PASSPHRASE = 'test' _CA_KEY_PEM_FILENAME = 'output/ca.key.pem' _CA_CRT_PEM_FILENAME = 'output...
gpl-2.0
3,708,214,889,509,246,500
24.360902
87
0.607471
false
3.265247
false
false
false
jjmiranda/edx-platform
openedx/core/djangoapps/user_api/views.py
1
40311
"""HTTP end-points for the User API. """ import copy from opaque_keys import InvalidKeyError from django.conf import settings from django.contrib.auth.models import User from django.http import HttpResponse from django.core.urlresolvers import reverse from django.core.exceptions import ImproperlyConfigured, NON_FIELD_...
agpl-3.0
-1,252,888,636,332,038,100
36.5685
139
0.614324
false
4.655925
false
false
false
AVSystem/avs_commons
tools/rbtree_fuzz_gen_full_tree.py
1
1242
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2021 AVSystem <avsystem@avsystem.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICEN...
apache-2.0
-2,947,104,314,626,366,000
30.846154
79
0.697262
false
3.518414
false
false
false
millen1m/flask-restplus-server-example
app/modules/auth/views.py
1
4794
# coding: utf-8 """ OAuth2 provider setup. It is based on the code from the example: https://github.com/lepture/example-oauth2-server More details are available here: * http://flask-oauthlib.readthedocs.org/en/latest/oauth2.html * http://lepture.com/en/2013/create-oauth-server """ from flask import Blueprint, reques...
mit
-8,786,363,367,552,155,000
28.231707
100
0.645807
false
3.81992
false
false
false
theandrewdavis/cpplint
cpplint.py
1
262075
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
-2,675,977,740,084,183,600
36.97638
98
0.637501
false
3.797308
false
false
false
datacommonsorg/website
server/tests/i18n_test.py
1
1720
# 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 agreed to in writing, ...
apache-2.0
1,607,169,839,682,063,000
31.471698
74
0.594767
false
3.651805
true
false
false
shoopio/shoop
shuup/admin/dashboard/utils.py
2
1372
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import datetime import time from heapq import heappop, heappush fr...
agpl-3.0
5,926,010,667,520,457,000
33.3
97
0.708455
false
3.790055
false
false
false
cheminfo/RDKitjs
old/src/similarityMap_basic_functions.py
1
3270
def bivariate_normal(X, Y, sigmax=1.0, sigmay=1.0, mux=0.0, muy=0.0, sigmaxy=0.0): Xmu = X-mux Ymu = Y-muy rho = sigmaxy/(sigmax*sigmay) z = Xmu**2/sigmax**2 + Ymu**2/sigmay**2 - 2*rho*Xmu*Ymu/(sigmax*sigmay) denom = 2*np.pi*sigmax*sigmay*np.sqrt(1-rho**2) return np.exp(-z/(2*(1-rho**2))) / deno...
bsd-3-clause
-2,635,108,952,803,476,000
42.026316
240
0.666667
false
2.69802
false
false
false
jason-ni/eventlet-raft
eventlet_raft/server.py
1
3811
import sys import eventlet from eventlet import event import logging import msgpack from .settings import BUF_LEN LOG = logging.getLogger('Server') class Server(object): exit_event = event.Event() def __init__(self, conf): super(Server, self).__init__() self._node_listen_ip = conf.get('se...
apache-2.0
5,002,739,255,207,698,000
28.091603
80
0.547625
false
3.95332
false
false
false
jpadilla/django-extensions
django_extensions/templatetags/highlighting.py
1
3357
# coding=utf-8 """ Similar to syntax_color.py but this is intended more for being able to copy+paste actual code into your Django templates without needing to escape or anything crazy. http://lobstertech.com/2008/aug/30/django_syntax_highlight_template_tag/ Example: {% load highlighting %} <style> @import url("h...
mit
1,858,541,039,714,672,400
29.518182
83
0.670241
false
3.705298
false
false
false
sjdv1982/seamless
seamless/core/status.py
1
10043
class SeamlessInvalidValueError(ValueError): def __str__(self): s = type(self).__name__ if len(self.args): s += ":" + " ".join([str(a) for a in self.args]) return s class SeamlessUndefinedError(ValueError): def __str__(self): s = type(self).__name__ if len(s...
mit
4,051,852,312,388,161,000
32.476667
76
0.572339
false
4.364624
false
false
false
sjorek/geoanonymizer.py
geoanonymizer/spatial/projection.py
1
2642
# -*- coding: utf-8 -*- u""" Functions dealing with geodesic projection systems. WGS84 (EPSG 4326) projection system “OpenStreetMap uses the WGS84 spatial reference system used by the Global Positioning System (GPS). It uses geographic coordinates between -180° and 180° longitude and -90° and 90° latitu...
mit
-186,810,838,438,010,940
33.051948
79
0.692601
false
3.361538
false
false
false
alejandrorosas/ardupilot
Tools/autotest/pysim/multicopter.py
1
6720
#!/usr/bin/env python from aircraft import Aircraft import util, time, math from math import degrees, radians from rotmat import Vector3, Matrix3 class Motor(object): def __init__(self, angle, clockwise, servo): self.angle = angle # angle in degrees from front self.clockwise = clockwise # clockwis...
gpl-3.0
795,064,505,372,224,100
34.183246
98
0.524554
false
3.38539
false
false
false
Hanaasagi/Ushio
initdb.py
1
1961
#!/usr/bin/python # -*-coding:UTF-8-*- import sys import time import yaml import pymongo from hashlib import md5 zone_map = { '动漫': '一些关于动漫的事情', '音乐': '一些关于音乐的事情', '轻小说': '一些关于轻小说的事情' } def create_admin(db, setting): email = raw_input('请输入可用邮箱账号: ') username = raw_input('请输入管理员用户名: ') passwo...
mit
6,451,959,847,060,826,000
21.766234
64
0.509983
false
2.713622
false
false
false
brumar/WPsolving
lib/postEvaluation.py
1
4325
''' Created on 25 juil. 2014 @author: Nevrose ''' import csv class weightEvaluator(): def __init__(self): self.datas={} def prepareStructure(self,problemBank): for problemName in problemBank.dicPbm.iterkeys(): problem=problemBank.dicPbm[problemName] for indexInfo in ra...
mit
-129,583,702,923,696,180
56.666667
176
0.551676
false
4.449588
false
false
false
cedrick-f/pyVot
src/PyVot.py
1
5947
#!/usr/bin/env python # -*- coding: ISO-8859-1 -*- ##This file is part of PyVot ############################################################################# ############################################################################# ## ## ## ...
gpl-3.0
-7,407,038,307,259,723,000
30.802139
99
0.478056
false
4.101379
false
false
false
holocronweaver/wanikani2anki
app/widgets.py
1
2595
# This Source Code Form is subject to the terms of the Mozilla Public # License, v2.0. If a copy of the MPL was not distributed with this # file, you can obtain one at http://mozilla.org/MPL/2.0/. from kivy.base import EventLoop from kivy.graphics import Color, Rectangle from kivy.uix.button import Button from kivy.uix...
mpl-2.0
5,325,115,064,332,014,000
33.144737
74
0.597303
false
4.073783
false
false
false
EricssonResearch/calvin-base
calvin/actorstore/systemactors/net/UDPSender.py
1
3461
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
apache-2.0
5,605,926,367,011,575,000
29.359649
127
0.59896
false
3.8757
false
false
false
BrunoCaimar/ArcREST
src/arcresthelper/publishingtools.py
1
133645
from __future__ import print_function from __future__ import absolute_import from .securityhandlerhelper import securityhandlerhelper import re as re dateTimeFormat = '%Y-%m-%d %H:%M' import arcrest from . import featureservicetools as featureservicetools from arcrest.hostedservice import AdminFeatureService impor...
apache-2.0
-5,585,332,328,714,547,000
41.834936
201
0.440428
false
5.663644
true
false
false
AnhellO/DAS_Sistemas
Ene-Jun-2021/perez-sanchez-jose-jahir/Examen/Ejercicio4/chain_of_test.py
1
1251
import unittest from chain_of import * #Las pruebas del chain of responsability, como lo que devuelve al final es un print y no un return, lo que me da es un None por eso se compara con un None para que pase, #se que no esta bien, pero se que si pasaria la prueba si supiera implementar el unittest para prints con el m...
mit
4,310,769,567,808,078,300
42.172414
182
0.68745
false
3.11194
true
false
false
ktnyt/autosearch
autosearch/searcher.py
1
1549
from autosearch.form import Form from autosearch.path import Path, PathFinder from autosearch.utils import * class Searcher(object): def __init__(self, url, query): self.url = url top = addScore(parse(fetch(url)), query) forms = [] paths = [] scores = [] # Find fo...
mit
-2,114,310,529,578,682,600
29.98
97
0.53583
false
4.130667
false
false
false
PaulEcoffet/stonewallsgate
dunwallsgate/test/test_battle.py
1
5888
import unittest from collections import Counter import battle import inventory from character import Character class TestBattle(unittest.TestCase): def test_init_battle(self): char1 = Character(None, maxhealth=100, initiative=1000) char2 = Character(None, maxhealth=100, initiative=1) bat...
gpl-2.0
-6,642,242,283,896,249,000
43.606061
76
0.625849
false
3.467609
true
false
false
ndaniel/fusioncatcher
bin/build_report_fusions_psl.py
1
28831
#!/usr/bin/env python # -*- coding: utf-8 -*- """ It produces a report with the summary of the fusion genes found. Also FASTQ and FASTA files containing the supporting reads corresponding to each fusion gene is generated. Author: Daniel Nicorici, Daniel.Nicorici@gmail.com Copyright (c) 2009-2021 Daniel Nicorici Th...
gpl-3.0
-3,517,396,408,604,192,000
38.635488
249
0.512997
false
3.702776
false
false
false
keithasaurus/django_fun_views
fun_views/views/generic/form/render.py
1
1144
from fun_views.patterns.form.render import form_render_pattern from fun_views.views.utils import (get_context_base, make_base_view, not_set_get_form_class, not_set_get_template_name, prefer_func, prefer_literal, ren...
mit
-5,728,591,379,269,749,000
35.903226
74
0.578671
false
3.851852
false
false
false
mumax/2
examples/stdproblem5-am01.py
1
1828
# Micromagnetics standard proplem no. 5 # As proposed by M. Najafi et al., JAP 105, 113914 (2009). # @author Mykola Dvornik from mumax2 import * from mumax2_geom import * Nx = 32 Ny = 32 Nz = 1 setgridsize(Nx, Ny, Nz) # physical size in meters sizeX = 100e-9 sizeY = 100e-9 sizeZ = 10e-9 csX = (sizeX/Nx) csY = (size...
gpl-3.0
-2,265,707,924,753,422,800
17.464646
60
0.561269
false
2.138012
false
false
false
dseuss/pycsalgs
csalgs/lowrank/gradient.py
1
2641
# encoding: utf-8 import itertools as it import numpy as np import numpy.linalg as la from scipy.sparse.linalg import svds __all__ = ['adaptive_stepsize', 'iht_estimator', 'cgm_estimator'] def _vec(A): newshape = A.shape[:-2] newshape = newshape + (A.shape[-2] * A.shape[-1],) return A.reshape(newshape)...
gpl-3.0
84,450,061,899,274,080
27.706522
78
0.558122
false
2.950838
false
false
false
cathyyul/sumo-0.18
tests/complex/traci/busySocket/runner.py
1
1168
#!/usr/bin/env python import os, subprocess, sys, time, shutil sumoHome = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')) sys.path.append(os.path.join(sumoHome, "tools")) import traci if sys.argv[1]=="sumo": sumoBinary = os.environ.get("SUMO_BINARY", os.path.join(sumoHome, 'bin',...
gpl-3.0
-7,274,768,031,797,202,000
32.371429
121
0.662671
false
2.774347
false
false
false
javimosch/cdnsviewer
savecss.py
1
1626
#!/usr/bin/python # -*- coding: utf-8 -*- # server.py: receive CSS and JS files from Chrome extension # and save files locally # # Author: Tomi.Mickelsson@iki.fi # 30.10.2011 - Created try: # python 2.x from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler except: # python 3.x from http.se...
mit
2,339,234,633,292,802,600
25.655738
66
0.591021
false
3.880668
false
false
false
qmarlats/pyquizz
env-3/bin/rst2odt_prepstyles.py
1
1745
#!/home/qmarlats/Documents/Projets/utbm/pyquizz/env-3/bin/python3 # $Id: rst2odt_prepstyles.py 5839 2009-01-07 19:09:28Z dkuhlman $ # Author: Dave Kuhlman <dkuhlman@rexx.com> # Copyright: This module has been placed in the public domain. """ Fix a word-processor-generated styles.odt for odtwriter use: Drop page size ...
gpl-3.0
-4,412,693,940,476,137,500
25.044776
75
0.633238
false
3.013817
false
false
false
BotDevGroup/marvin
marvinbot/views.py
1
1385
import logging from flask import ( request, session, g, redirect, url_for, abort, render_template, flash, current_app, Blueprint ) from flask_login import login_user, logout_user, current_user, login_required from marvinbot.models import User from marvinbot.forms import LoginForm from marvinbot.utils.net import...
mit
-2,103,130,300,611,279,000
28.468085
77
0.658484
false
3.654354
false
false
false
rszki/Protein
PDBList.py
1
4456
# -*- coding: utf-8 -*- ''' Created on 2012/12/14 自作のPDB関連リストの操作をまとめたモジュール 対象となるものは、基本的にはリストになる。 セパレーターはデフォルトを "," とする ReadList ToInt ToStr WriteList DivideList ToDetailNum ToPDBNum MakeLinkerTupple @author: ryosuke ''' def ReadList(filename, shold_ToInt=True, sep=","): ''' Read my definition PDB list file...
gpl-2.0
-6,933,500,030,450,986,000
23.116667
69
0.571198
false
3.297872
false
false
false
noxdafox/pebble
pebble/common.py
1
5693
# This file is part of Pebble. # Copyright (c) 2013-2021, Matteo Cafasso # Pebble 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 versio...
lgpl-3.0
3,995,260,078,226,853,400
28.194872
78
0.657825
false
4.423465
false
false
false
derwentx/WooGenerator
tests/test_syncupdate.py
1
2736
import traceback import unittest from pprint import pformat from context import get_testdata, TESTS_DATA_DIR, woogenerator from woogenerator.namespace.core import (MatchNamespace, ParserNamespace, SettingsNamespaceProto, UpdateNamespace)...
gpl-2.0
173,407,668,335,882,200
37.535211
73
0.617325
false
4.065379
true
false
false
clubit/edi-workflow
edi_tools/wizard/edi_wizard_archive_incoming.py
1
1327
from openerp.osv import osv from openerp.tools.translate import _ from openerp import netsvc class edi_tools_edi_wizard_archive_incoming(osv.TransientModel): _name = 'edi.tools.edi.wizard.archive.incoming' _description = 'Archive EDI Documents' ''' edi.tools.edi.wizard.archive.incoming:archive() -...
agpl-3.0
7,202,058,422,622,266,000
44.758621
118
0.562924
false
4.365132
false
false
false
jamesroutley/formation
test/test_parameter.py
1
2073
# -*- coding: utf-8 -*- import pytest import formation.parameter from formation.parameter import Parameter @pytest.mark.parametrize("parameter,expected_output", [ ( Parameter("A"), "Parameter(title='A', param_type='String', **{})" ), ( Parameter("A", "Number"), "Parameter...
apache-2.0
6,632,965,659,923,859,000
25.576923
70
0.581766
false
3.748644
true
false
false
samuelchen/code-snippets
python/logger.py
1
1906
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Created on 2013-12-12 @author: samuelchen ''' import logging, logging.handlers import os import sys class LogLevelFilter(object): def __init__(self, level): self.__level = level def filter(self, logRecord): return logRecord...
gpl-2.0
3,733,849,311,889,806,300
23.756757
67
0.605981
false
3.665385
false
false
false
nextgis/nextgisweb
setup.py
1
4264
# -*- coding: utf-8 -*- import sys import io import os import os.path from stat import S_IXUSR, S_IXGRP, S_IXOTH from subprocess import check_output, CalledProcessError from setuptools import setup, find_packages from setuptools.command.develop import develop from setuptools.command.install import install with io.ope...
gpl-3.0
6,692,886,225,111,922,000
25.65
94
0.582552
false
3.009174
true
false
false