repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
d1b/python-nmap-xml-output-parser
nmap_xml_to_sqlite.py
1
4251
#!/usr/bin/env python from lxml import etree import sqlite3 import os import datetime from shows_hosts_with_open_port_and_service_desc import parse_opts __program__ = 'python_convert_nmap_xml_to_sqlite_db' ___author__ = 'dave b. <db@d1b.org>' __license__ = 'GPL v2' class nmap_xml_to_sqlite: def __init__(self, filen...
bsd-2-clause
-8,696,299,061,923,030,000
35.025424
97
0.669019
false
mne-tools/mne-python
mne/inverse_sparse/tests/test_mxne_inverse.py
1
18421
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # # License: Simplified BSD import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_array_less, assert_array_...
bsd-3-clause
22,355,592,693,327,612
43.17506
79
0.588079
false
hyphaltip/cndtools
util/genbank2fa.py
1
1140
#!/usr/bin/env python # Copyright (c) 2006 # Colin Dewey (University of Wisconsin-Madison) # cdewey@biostat.wisc.edu # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Li...
gpl-2.0
-2,270,592,912,808,029,700
26.142857
75
0.742982
false
cgrebeld/pymel
maya/app/startup/basic.py
1
4322
""" This module is always imported during Maya's startup. It is imported from both the maya.app.startup.batch and maya.app.startup.gui scripts """ import atexit import os.path import sys import traceback import maya import maya.app import maya.app.commands from maya import cmds, utils def setupScriptPaths(): """ ...
bsd-3-clause
1,507,193,115,536,711,700
36.912281
101
0.696668
false
loxodes/fairbanks_hackathon_landsat_viewer
landsat_theater.py
1
6073
# jon klein, jtklein@alaska.edu # utility to display landsat-8 images for the decision theater north # created during fairbanks 2015 hackathon # mit license import datetime import time import subprocess import pdb import re import ast import os import argparse from PIL import Image, ImageDraw, ImageFont from geopy.g...
mit
6,940,265,505,476,265,000
33.117978
135
0.65503
false
SweetPalma/Perver
perver.py
1
18147
#!/usr/bin/python # coding: utf-8 # Perver - tiny Python 3 server for perverts. # Check README and LICENSE for details. from sys import platform as os_platform from hashlib import sha1 as hash_id from urllib.parse import unquote from mimetypes import guess_type from traceback import format_exc from functools import wra...
mit
1,527,089,193,175,442,400
25.686765
87
0.639885
false
sigven/pcgr
src/pcgr/pcgr_vcfanno.py
1
17190
#!/usr/bin/env python import argparse import subprocess from cyvcf2 import VCF import random import annoutils import os import re import sys logger = annoutils.getlogger('pcgr-vcfanno') global debug def __main__(): parser = argparse.ArgumentParser(description='Run brentp/vcfanno - annotate a VCF file against mu...
mit
3,088,626,634,943,032,300
60.834532
204
0.676905
false
maku77/contest
codejam/2014_Round1A/A-ChargingChaos.py
1
2170
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Contest: Google Code Jam - 2014 Round A [2014-04-26] # Problem: A. Charging Chaos # URL: https://code.google.com/codejam/contest/2984486/dashboard # Author: Masatoshi Ohta # Strategy: # 2 つのビット列の xor を取ると、異なる部分が分かることを利用する。 # 初期配置のリスト init[] の 1 つ目 init[0] のビット...
mit
-1,554,268,937,330,754,300
28.37931
70
0.589202
false
MSeifert04/nddata
nddata/nddata/mixins/ndreduce.py
1
16463
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from ...utils.copyutils import do_copy import numpy as np from ..nduncertainty_stddev import StdDevUncertainty from ..nduncertainty_var import ...
bsd-3-clause
6,610,416,277,689,173,000
42.323684
79
0.586892
false
diophantus7/plugin.video.romwod
resources/lib/wistia.py
1
1879
import re import requests import xbmc import json try: from BeautifulSoup import BeautifulSoup except ImportError: from bs4 import BeautifulSoup _JSON_URL = "http://fast.wistia.com/embed/medias/%s.json" _IFRAME_URL = "http://fast.wistia.net/embed/iframe/%s" class ResolveError(Exception): def _...
gpl-3.0
3,844,811,310,062,879,000
31.396552
102
0.548164
false
geobricks/geobricks_data_manager
geobricks_data_manager/config/config.py
1
1641
import logging config = { "settings": { # To be used by Flask: DEVELOPMENT ONLY "debug": True, # Flask host: DEVELOPMENT ONLY "host": "localhost", # Flask port: DEVELOPMENT ONLY "port": 5904, # Logging configurations "logging": { "leve...
gpl-2.0
2,782,221,596,152,575,500
31.82
116
0.540524
false
open-io/oio-swift
tests/unit/common/middleware/test_hashedcontainer.py
1
2935
# Copyright (C) 2016-2020 OpenIO SAS # # 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 writi...
apache-2.0
5,798,349,336,250,656,000
32.352273
85
0.643271
false
andreas-h/pybtex
pybtex/style/sorting/invyear_author_title.py
1
2418
# Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Andrey Golovizin # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to ...
mit
2,218,421,661,150,355,000
41.421053
88
0.674938
false
borntyping/python-colorlog
colorlog/tests/test_escape_codes.py
1
1571
"""Test the colorlog.escape_codes module.""" from colorlog.escape_codes import escape_codes, esc, parse_colors import pytest def test_esc(): assert esc(1, 2, 3) == "\033[1;2;3m" def test_reset(): assert escape_codes["reset"] == "\033[0m" def test_bold_color(): assert escape_codes["bold_red"] == "\03...
mit
564,843,401,368,212,200
26.086207
76
0.60471
false
sdiehl/rpygtk
rpygtk/lib/rsession.py
1
16192
# Copyright 2009-2010 Stephen Diehl # # This file is part of RPyGTK and distributed under the terms # of the GPLv3 license. See the file LICENSE in the RPyGTK # distribution for full details. import rpy2.robjects as robjects from rpy2 import rinterface import time import numpy from ui import prefs import threading im...
gpl-3.0
519,104,289,013,916,160
27.862745
112
0.573617
false
cechrist/cardoon
cardoon/devices/memductor.py
1
6848
""" :mod:`memductor` -- Basic (nonlinear) memductor ----------------------------------------------- .. module:: memductor .. moduleauthor:: Carlos Christoffersen """ import numpy as np from cardoon.globalVars import const, glVar import cardoon.circuit as cir import cppaddev as ad class Device(cir.Element): r""" ...
gpl-3.0
7,188,436,473,438,162,000
32.242718
79
0.475905
false
Tomographer/tomographer
test/pytest_t_tools_densedm.py
1
1933
#!/usr/bin/env python from __future__ import print_function import re import numpy as np import numpy.testing as npt import logging logging.basicConfig(level=logging.DEBUG) import unittest # import the module import tomographer.tools.densedm import tomographer.tools.densedm.mle import tomographer import tomographe...
mit
5,261,438,763,180,251,000
27.426471
84
0.606829
false
unball/strategy
simple_strategy/potential_fields.py
1
3902
#!/usr/bin/env python import numpy as np #Convert vector from cartesian to polar coordinate #@vector = [x, y] def cart2polar(vector): x = vector[0] y = vector[1] r = np.sqrt(x*x + y*y) th = np.arctan2(y, x) return np.array([r, th]) #Convert vector from polar to cartesian coordinate #@vector = [r, ...
mit
-7,559,067,572,238,686,000
32.350427
117
0.644541
false
cmpitg/blutkit
blutkit/gui/keycombination.py
1
8206
# # Copyright 2013 © Nguyễn Hà Dương (cmpitgATgmailDOTcom) # # This file is part of Blutkit. # # Blutkit 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) a...
gpl-3.0
-4,797,116,071,737,052,000
30.417625
77
0.602073
false
mazi-project/back-end
lib/sht11.py
1
1426
#!/usr/bin/pytho import sys import warnings def help_message(): print ' ' print 'sht11' print ' --help Displays this usage message ' print ' --detect Displays if the sensor is connected on Raspberry Pi' print ' -h , --humidity Displ...
mit
-2,510,886,870,512,368,600
26.960784
97
0.570827
false
syuu1228/seastar
test.py
1
6467
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
apache-2.0
4,200,851,341,556,707,000
33.036842
116
0.570898
false
dvu4/Data-Wrangling-with-MongoDB
Lesson_4_Working_with_MongoDB/23-Using_$in_Operator/find_cars.py
1
1106
#!/usr/bin/env python """ Your task is to write a query that will return all cars manufactured by "Ford Motor Company" that are assembled in Germany, United Kingdom, or Japan. Please modify only 'in_query' function, as only that will be taken into account. Your code will be run against a MongoDB instance that we have ...
agpl-3.0
656,383,715,339,374,500
30.6
113
0.679928
false
cerndb/wls-cli
wls_rest/src/wlscli/service/security/data/netrc.py
1
1165
#******************************************************************************* # Copyright (C) 2015, CERN # This software is distributed under the terms of the GNU General Public # License version 3 (GPL Version 3), copied verbatim in the file "LICENSE". # In applying this license, CERN does not waive the privileges ...
gpl-3.0
2,624,321,533,661,844,500
32.285714
80
0.583691
false
TartuNLP/nazgul
nmtnazgul.py
1
6225
#!/usr/bin/python3 import sock import translator import sys import html import json from time import time from nltk import sent_tokenize from constraints import getPolitenessConstraints as getCnstrs from log import log # IP and port for the server MY_IP = '172.17.66.215' MY_PORT = 12346 supportedStyles = { 'fml'...
mit
-6,915,478,788,811,677,000
29.970149
145
0.667952
false
ctalbert/mozharness
test/test_base_config.py
1
7710
import os import subprocess import sys import unittest JSON_TYPE = None try: import simplejson as json except ImportError: import json JSON_TYPE = 'json' else: JSON_TYPE = 'simplejson' import mozharness.base.config as config class TestParseConfigFile(unittest.TestCase): def _get_json_config(self...
mpl-2.0
-1,693,769,947,599,084,000
33.72973
113
0.563165
false
Flamacue/pretix
src/tests/multidomain/test_urlreverse.py
2
3969
import pytest from django.conf import settings from django.test import override_settings from django.utils.timezone import now from tests import assert_num_queries from pretix.base.models import Event, Organizer from pretix.multidomain.models import KnownDomain from pretix.multidomain.urlreverse import build_absolute_...
apache-2.0
7,996,995,170,991,871,000
32.635593
120
0.693878
false
xaedes/canopen_301_402
src/canopen_301_402/datatypes.py
1
7126
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import struct from canopen_301_402.utils import collect_all_leaf_subclasses from canopen_301_402.utils import parseIntAutoBase from canopen_301_402.constants import CanOpenBasicDatatypes class CanDatatype(object): def __init__(self): ''' @summary: a...
mit
-3,884,830,007,540,805,600
30.396476
90
0.621807
false
ccxt/ccxt
examples/py/kraken-fetch-my-trades-pagination.py
1
1540
# -*- coding: utf-8 -*- import os import sys root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) sys.path.append(root + '/python') import ccxt # noqa: E402 exchange = ccxt.kraken({ 'apiKey': 'YOUR_API_KEY', 'secret': 'YOUR_API_SECRET', 'enableRateLimit': True, # requir...
mit
-830,446,503,497,661,400
31.765957
106
0.596104
false
lindong28/kafka
tests/kafkatest/services/security/security_config.py
1
20652
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
4,421,555,070,726,050,300
48.171429
274
0.649816
false
MadMac/PyTetris
src/main/main.py
1
1650
import pygame, sys, os, random from classes import * from pygame.locals import * blocksFile = "blocks.txt" thisBlock = "" allBlocks = [] boardWidth = 15 boardHeight = 20 gameOver = False # Make all the blocks which are in file "blocks.txt" file = open(blocksFile, "r") while file: line = file.readline() if l...
mit
-2,331,694,246,887,766,000
23.626866
111
0.664242
false
OpenNews/opennews-source
source/base/feeds.py
1
7562
from datetime import datetime, timedelta from django.conf import settings from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse from django.db.models import Q from django.http import Http404 from django.shortcuts import get_object_or_404 from source.articles.models import Arti...
mit
-2,670,830,463,679,315,500
32.758929
98
0.618752
false
openslack/openslack-web
openslack/apps/company/views.py
1
1072
# encoding:utf-8 from django.shortcuts import render_to_response from django.template.context import RequestContext from apps.company.models import Company, Comment from django.shortcuts import get_object_or_404 from utils.page import paginator_objects def index(request): return render_to_response('index.html', {...
apache-2.0
-7,157,730,011,399,489,000
29.285714
90
0.701887
false
localhuman/neo-python
examples/json-rpc-api-server.py
1
2783
#!/usr/bin/env python3 """ This example provides a JSON-RPC API to query blockchain data, implementing `neo.api.JSONRPC.JsonRpcApi` """ import argparse import os from logzero import logger from twisted.internet import reactor, task from neo import __version__ from neo.Core.Blockchain import Blockchain from neo.Imple...
mit
3,520,455,970,852,346,400
34.227848
104
0.701761
false
ehua7365/RibbonOperators
TEBD/mpstest8.py
1
5968
""" mpstest8.py A test of manipulating matrix product states with numpy. 2014-08-25 """ import numpy as np import matplotlib.pyplot as plt from cmath import * from mpl_toolkits.mplot3d import Axes3D from matplotlib import cm def main(): #test3() getMPS(randomState(2,5),3).shape def test3(): """ Test MPS ...
mit
-5,615,611,594,896,353,000
31.972376
88
0.575737
false
PolyCortex/pyMuse
pymuse/signal.py
1
1235
from dataclasses import dataclass from threading import Event from pymuse.utils.stoppablequeue import StoppableQueue @dataclass class SignalData(): """ Dataclass for a signal data point. Event_marker attribute is optional """ time: float values: list event_marker: list = None class Signal():...
mit
1,287,241,640,009,721,900
31.5
101
0.670445
false
p-hofmann/ConfigParserWrapper
configparserwrapper.py
1
10557
__author__ = 'Peter Hofmann' __version__ = '0.1.3' import os import sys from collections import Iterable from io import StringIO if sys.version_info < (3,): from ConfigParser import SafeConfigParser as ConfigParser else: from configparser import ConfigParser from scripts.loggingwrapper import DefaultLogging ...
gpl-2.0
-7,490,994,053,260,148,000
35.912587
133
0.575637
false
abcdef123/stem
stem/response/events.py
1
30484
import datetime import re import StringIO import stem import stem.control import stem.descriptor.router_status_entry import stem.response import stem.version from stem.util import connection, log, str_tools, tor_tools # Matches keyword=value arguments. This can't be a simple "(.*)=(.*)" pattern # because some positi...
lgpl-3.0
-4,938,717,986,826,051,000
34.653801
164
0.673468
false
caseyc37/pygame_cffi
conformance/conf_tests/test_shapes.py
1
4836
# Test lines from pygame import draw, rect def test_rect(test_surf): """Draw several rectangles.""" for y in range(10, 200, 45): x = 10 for width in range(10, 30, 3): for height in range(10, 40, 7): r = rect.Rect(x, y, width, height) x += width + 2 ...
lgpl-2.1
2,379,209,523,506,091,500
39.983051
80
0.400744
false
henriquebastos/fixofx
bin/ofxfix.py
1
9764
#!/usr/bin/env python # Copyright 2005-2010 Wesabe, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
-8,566,761,918,685,850,000
38.530364
87
0.643589
false
gostevehoward/absimulation
simulation_test.py
1
4663
#!/usr/bin/env python import unittest import simulation def state(visitors_per_bucket, baseline_conversions, treatment_conversions): return simulation.ExperimentState( baseline_conversions, visitors_per_bucket - baseline_conversions, treatment_conversions, visitors_per_bucket - tr...
mit
8,198,010,060,414,050,000
33.540741
98
0.596826
false
samdroid-apps/browse
pdfviewer.py
1
21028
# Copyright (C) 2012, One Laptop Per Child # # 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-2.0
9,211,314,109,004,162,000
33.872305
81
0.606097
false
web-masons/pyramid-zappa-api-boilerplate
PyZAPI/pyzapi/tests.py
1
1710
import unittest import transaction from pyramid import testing def dummy_request(dbsession): return testing.DummyRequest(dbsession=dbsession) class BaseTest(unittest.TestCase): def setUp(self): self.config = testing.setUp(settings={ 'sqlalchemy.url': 'sqlite:///:memory:' }) ...
mit
183,657,782,567,541,060
25.307692
75
0.638596
false
gamechanger/dusty
tests/unit/systems/known_hosts/init_test.py
1
2430
import os import tempfile from mock import patch import dusty.constants from dusty.systems.known_hosts import ensure_known_hosts from ....testcases import DustyTestCase @patch('dusty.systems.known_hosts._get_known_hosts_path') @patch('dusty.systems.known_hosts.check_output') class TestKnownHostsSystem(DustyTestCase)...
mit
-5,612,656,755,419,461,000
41.631579
108
0.677366
false
mucow24/statusboard
darksky.py
1
1582
import time import urllib2 import json import sys Default_Lat = 40.697017 Default_Lon = -73.995267 Request_Url = "https://api.forecast.io/forecast" def getWeather(key, lat = Default_Lat, lon = Default_Lon): request = "%s/%s/%s,%s" % (Request_Url, key, lat, lon) u = urllib2.urlopen(request) return json.loads(u....
gpl-2.0
5,671,711,468,693,888,000
25.366667
68
0.600506
false
PaddlePaddle/models
PaddleAudio/examples/panns/parse_result.py
1
2990
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
3,274,352,965,856,468,500
34.595238
118
0.652508
false
zsiki/realcentroid
realcentroid_dialog.py
1
4135
# -*- coding: utf-8 -*- """ /*************************************************************************** RealCentroidDialog A QGIS plugin Create internal point for a polygon layer Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ ...
gpl-2.0
-666,068,943,287,623,000
39.539216
78
0.536397
false
morucci/repoxplorer
repoxplorer/index/__init__.py
1
4623
# Copyright 2016, Fabien Boucher # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
8,594,167,975,764,877,000
34.561538
77
0.567597
false
maczniak/emberjs
website_rebase.py
1
3151
#!/usr/bin/python # # The original Ember.js website is under http://emberjs.com/. And translation # website is under http://maczniak.github.io/emberjs/. Then all absolute urls # were broken. I failed to search generic html rebase tools, made a simple # script in Python. It is a specific solution to this problem. # ...
mit
-3,186,537,805,941,783,600
29.892157
109
0.675341
false
google/glazier
glazier/lib/actions/domain.py
1
1479
# 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 ag...
apache-2.0
2,751,999,170,932,907,000
35.073171
74
0.721433
false
markgw/jazzparser
lib/nltk/parse/earleychart.py
1
18301
# -*- coding: utf-8 -*- # Natural Language Toolkit: An Incremental Earley Chart Parser # # Copyright (C) 2001-2010 NLTK Project # Author: Peter Ljunglöf <peter.ljunglof@heatherleaf.se> # Rob Speer <rspeer@mit.edu> # Edward Loper <edloper@gradient.cis.upenn.edu> # Steven Bird <sb@csse.unimelb.edu...
gpl-3.0
8,186,104,699,162,732,000
39.939597
112
0.575847
false
sassoftware/rpath-product-definition
doc/example.py
1
5275
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
2,042,442,910,359,023,400
42.595041
87
0.647583
false
sunny94/temp
sympy/functions/combinatorial/tests/test_comb_factorials.py
1
8372
from sympy import (Symbol, symbols, factorial, factorial2, binomial, rf, ff, gamma, polygamma, EulerGamma, O, pi, nan, oo, zoo, simplify, expand_func) from sympy.functions.combinatorial.factorials import subfactorial from sympy.utilities.pytest import XFAIL, raises def test_rf_ev...
bsd-3-clause
5,140,877,816,998,110,000
30.954198
79
0.588629
false
janmtl/drift_qec
drift_qec/A_old.py
1
4165
""" Exposes the 5 parameter unital channel. """ import numpy as np import scipy as sp from scipy.linalg import polar PDIAG = np.zeros((9, 9)) for esi in np.eye(3): one = np.kron(esi, esi) PDIAG = PDIAG + np.outer(one, one) PDIAG = PDIAG.astype(np.int) FIXEDQ = np.array([[-0.1911, 0.3136, -0.9301], ...
isc
7,062,491,971,050,405,000
29.625
76
0.507803
false
IECS/MansOS
tools/IDE/src/upload_module.py
1
5090
# -*- coding: utf-8 -*- # # Copyright (c) 2008-2012 the MansOS team. 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, # ...
mit
1,440,115,819,273,884,700
39.07874
77
0.654813
false
ajing/clusterVis
LigandsPlot.py
1
2385
""" Display a list of ligand structures in file """ import os import matplotlib.image as mpimg import matplotlib.pyplot as plt from TreeParser import * from NodeReference import * IMAGE_DIR = "./Image" def ReturnFileDir(ligandname): return os.path.join(IMAGE_DIR, ligandname) def IndexOfLigands(): infile...
apache-2.0
2,718,396,933,683,163,000
32.591549
115
0.630608
false
CiscoSystems/nova-solver-scheduler
nova/tests/scheduler/test_solver_scheduler_host_manager.py
1
7720
# Copyright (c) 2011 OpenStack Foundation # 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 ...
apache-2.0
-4,972,781,149,865,470,000
41.888889
78
0.587565
false
waaaaargh/katzenblog
katzenblog/model.py
1
2234
from datetime import datetime from werkzeug.security import generate_password_hash, check_password_hash from katzenblog import db from katzenblog.util import slugify class User(db.Model): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String) passwordhash = db.Column(db.String) ...
gpl-3.0
453,065,405,940,258,600
30.464789
78
0.601164
false
Kwentar/ImageDownloader
Internet.py
1
4529
import os import shutil from threading import Thread import urllib import requests from tqdm import tqdm class Internet: @staticmethod def write_to_failed_image_urls_file(file_name, image_url, failed_image_urls_file): """ Check image in file and write it if need :param file_name: image...
mit
-2,301,983,070,617,782,500
38.043103
105
0.539633
false
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/safety_check_wrapper.py
1
1297
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
7,484,912,101,823,494,000
39.53125
78
0.642251
false
annahs/atmos_research
util_migrate_sqlite_table_to_mysql.py
1
2193
import sys import os import numpy as np import sqlite3 import mysql.connector #connect to sqlite database conn = sqlite3.connect('C:/projects/dbs/SP2_data.db') c = conn.cursor() #connect to mysql database cnx = mysql.connector.connect(user='root', password='Suresh15', host='localhost', database='black_carbon') curs...
mit
8,911,286,735,066,189,000
25.433735
338
0.670315
false
yeraydiazdiaz/nonrel-blog
django_mongodb_engine/base.py
1
8661
import copy import datetime import decimal import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.signals import connection_created from django.db.utils import DatabaseError from pymongo.collection import Collection from pymongo.connection import Co...
bsd-3-clause
-4,339,837,880,499,807,000
32.700389
78
0.608013
false
seppi91/CouchPotatoServer
couchpotato/core/media/movie/providers/info/themoviedb.py
1
11383
import random import traceback import itertools from base64 import b64decode as bd from couchpotato.core.event import addEvent, fireEvent from couchpotato.core.helpers.encoding import toUnicode, ss, tryUrlencode from couchpotato.core.helpers.variable import tryInt, splitString from couchpotato.core.logger import CPLog...
gpl-3.0
-8,751,652,352,963,587,000
33.917178
140
0.53615
false
jmesteve/saas3
openerp/addons_extra/l10n_es_payment_order/remesas.py
1
6715
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2006 ACYSOS S.L.. (http://acysos.com) All Rights Reserved. # Pedro Tarrafeta <pedro@acysos.com> # # Corregido para instalación TinyERP estándar 4.2....
agpl-3.0
5,191,690,641,885,414,000
53.422764
282
0.626681
false
tomasdubec/openstack-cinder
cinder/tests/test_volume_configuration.py
1
2385
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (c) 2012 Rackspace Hosting # 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 # # ...
apache-2.0
942,622,923,200,035,300
32.125
78
0.706918
false
fieldOfView/pyQNodesEditor
qneport.py
1
4898
# Copyright (c) 2014, ALDO HOEBEN # Copyright (c) 2012, STANISLAW ADASZEWSKI #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 # ...
bsd-3-clause
2,503,830,618,461,107,700
28.154762
94
0.652511
false
norling/metlab
metlab/external.py
1
2186
#!/usr/bin/env python2.7 import os import time import logging import threading from subprocess import Popen, PIPE class External(threading.Thread): def __init__(self, name="", args = [], log_name = "external", pid = 0, log_level = logging.INFO, wd=None): threading.Thread.__init__(self) self.n...
gpl-3.0
-6,979,680,684,814,166,000
35.433333
133
0.521043
false
kelceydamage/raspi
raspi/sensors/grove/i2c/color.py
1
15702
import smbus2 as smbus import time import math import RPi.GPIO """ ## License The MIT License (MIT) Copyright (c) 2016 Frederic Aguiard Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without re...
apache-2.0
6,583,448,653,865,636,000
44.648256
120
0.626735
false
gbolet/BlenderCacheManager
clearCache.py
1
4262
bl_info = { "name": "BVH Cache Manager", "category": "Render", "description":"Easily delete cached BVH data!", "location":"Properties Editor > Render > BVH Cache Manager", "author":"Gregory Bolet", "version":"001", "warning":"Alpha Version" } import bpy import os import shutil cacheDirec...
mit
-270,100,889,357,932,200
29.442857
122
0.591272
false
simudream/GeoIP2-python
setup.py
1
1626
#!/usr/bin/env python import codecs import os import sys import geoip2 try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = ['geoip2'] requirements = [i.strip() for i in ...
apache-2.0
-3,090,010,712,760,477,700
28.563636
72
0.619311
false
itpubs/reflecting
apps/users/models.py
1
1816
from django.contrib.auth.models import AbstractUser from django.db import models from utils.default_model import random_nick_name from blog.models import Article __all__ = [ 'UserProfile', 'EmailVerifyCode', 'Message', 'Comment', 'Reply' ] # Create your models here. class UserProfile(AbstractUse...
mit
-6,211,186,313,144,723,000
28.639344
100
0.69635
false
dhocker/athomepowerlineserver
commands/delete_device_program.py
1
1356
# # Delete a device program # Copyright © 2020 Dave Hocker # # 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, version 3 of the License. # # See the LICENSE file for more details. # from command...
gpl-3.0
-1,568,335,787,459,006,700
30.511628
70
0.631734
false
pkleimert/hrpt
urls.py
1
3670
from django.conf.urls.defaults import * from django.conf import settings from django.views.generic.simple import redirect_to from haystack.views import SearchView, search_view_factory from haystack.forms import SearchForm from apps.ew_contact_form.forms import ContactForm from views import LatestEntriesFeed from dja...
agpl-3.0
-3,252,625,988,242,738,000
46.051282
178
0.648774
false
vsoch/docfish
scripts/import/upload_storage.py
1
5156
#!/usr/bin/env python # This is an example script to upload data (images, text, metadata) to # google cloud storage and datastore (for general data) # Preparation of Pubmed Open Access Data ftp_base = "ftp://ftp.ncbi.nlm.nih.gov/pub/pmc" file_list = "ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/oa_file_list.txt" from glob im...
mit
-8,730,548,330,262,620,000
31.427673
81
0.579519
false
aleroddepaz/python-samples
justanotherchat/chat.py
1
1885
import os import json import random import logging import urlparse import webapp2 from google.appengine.api import channel from google.appengine.ext import db from google.appengine.ext.webapp import template class Client(db.Model): username = db.StringProperty(required=True) token = db.StringProperty(require...
mit
-4,153,536,256,127,778,000
28.920635
69
0.632361
false
obulpathi/poppy
tests/api/admin/test_get_service_by_domain.py
1
18720
# coding= utf-8 # Copyright (c) 2015 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
5,607,592,291,727,860,000
33.788104
77
0.527944
false
deapplegate/wtgpipeline
skewsurface_plots.py
1
4060
####################### # Plot results of skew surface tests ####################### import os, re, glob import numpy as np import pylab import scipy.spatial as spatial import ldac ####################### def loadCats(cluster, lensfilter, image, filter): clusterdir = '/u/ki/dapple/subaru/%s/' % cluster pho...
mit
-6,138,162,053,475,650,000
26.432432
130
0.600246
false
beeftornado/plex-custom-media-scanner
Scanners/Movies/Tivo Movie Scanner.py
1
5478
#!/usr/bin/env python # Copyright (C) 2013 Casey Duquette # # 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 late...
gpl-2.0
-1,551,859,463,111,051,500
37.577465
180
0.529755
false
gorbyo/admin_couchdb
admin_couchdb/couch_set_repl.py
1
2231
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # couch_set_repl.py # # Copyright 2013 Oleh Horbachov <gorbyo@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; either versio...
gpl-3.0
-5,853,721,085,586,909,000
32.298507
105
0.670551
false
Azure/azure-sdk-for-python
sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/operations/_incident_comments_operations.py
1
15014
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
5,687,567,949,912,011,000
50.068027
279
0.638338
false
kjedruczyk/phabricator-tools
py/abd/abdi_processrepoarglist.py
1
16178
"""Process a list of repository arguments.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # abdi_processrepoarglist # # Public Functions: # do # determine_max_workers_default # fetch_if_n...
apache-2.0
-3,659,248,281,344,877,600
31.949084
79
0.580232
false
LarryHillyer/PoolHost
PoolHost/pool/urls.py
1
2770
from django.conf.urls import url from . import views app_name = 'pool' urlpatterns = [ url(r'^transfer/(?P<pool_id>[0-9]+)/(?P<poolowner_id>[0-9]+)/(?P<poolgroup_id>[0-9]+)/(?P<groupowner_id>[0-9]+)/(?P<filter>[0-9]+)/(?P<modelstate>.*)/$', views.transfer.as_view(), name = 'transfer'), url(r'^transfer/(?P<po...
gpl-3.0
1,132,929,921,290,102,000
82.969697
203
0.584116
false
dmsovetov/pygling
Pygling/Target/Executable.py
1
1531
# # The MIT License (MIT) # # Copyright (c) 2015 Dmitry Sovetov # # https://github.com/dmsovetov # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limit...
mit
8,647,078,688,976,270,000
41.555556
125
0.755715
false
malja/cvut-python
cviceni08/01_trideni_karet.py
1
1202
import copy cards = [[0, 'Q'], [2, '6'], [1, 'K'], [1, '8'], [2, '10'], [2, '4'], [3, '4'], [0, '4'], [1, '3'], [2, '5'], [0, 'K'], [3, 'A'], [1, 'J'], [0, '3'], [0, '9']] def cardTypeAsInt( card ): if card[1].isdigit(): return int(card[1]) if card[1] == "J": ...
mit
-2,594,362,512,075,148,000
20.818182
63
0.446667
false
tswicegood/Dolt
dolt/__init__.py
1
8781
import httplib2 import urllib try: import json except ImportError: import simplejson as json try: from decorator import decorator except ImportError: # No decorator package available. Create a no-op "decorator". def decorator(f): def decorate(_func): def inner(*args, **kwargs):...
bsd-3-clause
-1,242,726,497,648,566,800
27.237942
102
0.512015
false
nitheesh/AutoMoveMouse
appind.py
1
6321
#!/usr/bin/env python import os import os.path import pygtk pygtk.require('2.0') import gtk import time import subprocess import threading import atexit import commands import appindicator from Xlib import display MaxIdle = 10 lockFile = "/tmp/automouse.lck" appFile = "/tmp/appfile.lck" # Touch the signal file on sc...
gpl-2.0
8,106,481,789,371,758,000
28.820755
129
0.615567
false
EduPepperPDTesting/pepper2013-testing
lms/djangoapps/sso/sp_metadata.py
1
7015
from mitxmako.shortcuts import render_to_response import xmltodict from django.http import HttpResponse import json from django.conf import settings from collections import defaultdict import os from OpenSSL import crypto import re from path import path from permissions.decorators import user_has_perms BASEDIR = setti...
agpl-3.0
8,215,661,476,016,799,000
30.886364
147
0.566358
false
memsharded/conan
.ci/jenkins/pr_tags.py
1
2199
import argparse import json import os from github import Github def _get_value(body, tag): pos = body.lower().find(tag.lower()) if pos != -1: cl = body[pos + len(tag):].splitlines()[0] return cl.strip() return None def get_tag_from_pr(pr_number, tag): """Given a PR number and a tag...
mit
-1,919,777,983,848,685,300
27.192308
88
0.56935
false
yandy/sea
setup.py
1
2143
import os import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') _root = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(_root, 'sea/__init__.py')) as f: version = str(ast.literal_eval(_version_re.search( f.read()).group(1)))...
mit
-2,994,986,565,607,564,000
28.763889
70
0.597294
false
moden-py/pywinauto
examples/get_winrar_info.py
1
4298
"""Automate WinRAR evaluation copy We hit a few dialogs and save XML dump and screenshot from each dialog. Specify a language at the command line: 0 Czech 1 German 2 French More then likely you will need to modify the apppath entry in the 't' dictionary to where you have extracted the WinRAR ...
lgpl-2.1
-5,219,329,673,420,885,000
25.538462
79
0.617784
false
dragoon/edX-AI-course
search/util.py
1
29256
# util.py # ------- # Licensing Information: You are free to use or extend these projects for # educational purposes provided that (1) you do not distribute or publish # solutions, (2) you retain this notice, and (3) you provide clear # attribution to UC Berkeley, including a link to http://ai.berkeley.edu. # # Attrib...
mit
-1,549,650,670,089,234,400
36.945525
100
0.556262
false
MrHamdulay/myjvm
defaultclassloader.py
1
1741
from __future__ import absolute_import import os.path try: # let's not use rzipfile for now (it's really really slow in python) raise Exception from rpython.rlib.rzipfile import RZipFile ZipFile = RZipFile except: RZipFile = None from zipfile import ZipFile from classreader import ClassReader f...
mit
1,773,738,263,681,068,000
30.089286
84
0.608271
false
Murali-group/GraphSpace
graphspace/authorization.py
1
3499
import applications.users as users import applications.graphs as graphs from graphspace.exceptions import UserNotAuthorized from graphspace.utils import get_request_user class UserRole: ADMIN = 3 LOGGED_IN = 2 LOGGED_OFF = 1 # When user is not logged in to GraphSpace. def user_role(request): """ Returns the us...
gpl-2.0
5,456,867,437,812,151,000
44.454545
166
0.76136
false
moagstar/python-uncompyle6
uncompyle6/parsers/astnode.py
1
1501
import sys from uncompyle6 import PYTHON3 from uncompyle6.scanners.tok import NoneToken from spark_parser.ast import AST as spark_AST if PYTHON3: intern = sys.intern class AST(spark_AST): def isNone(self): """An AST None token. We can't use regular list comparisons because AST token offsets mi...
mit
-742,535,194,500,020,400
30.93617
67
0.476349
false
miqui/python-hpOneView
examples/scripts/get-network-set.py
1
3747
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limita...
mit
5,146,794,782,429,188,000
31.582609
79
0.655991
false
Renmusxd/RSwarm
bot.py
1
8829
import numpy from collections import OrderedDict class Bot: ID_NUM = 0 # Populated by GET_NINPUTS VISION = None INPUTS = None NINPUTS = None # Populated by GET_NACTIONS ACTIONS = None NACTIONS = None VIEW_DIST = 100.0 FOV = 60 # Angular distance from center VISION_BINS = ...
mit
7,979,461,654,846,873,000
29.236301
119
0.562691
false
mvaled/sentry
src/sentry/api/endpoints/organization_eventid.py
1
2224
from __future__ import absolute_import import six from rest_framework.response import Response from sentry import eventstore from sentry.api.base import DocSection from sentry.api.bases.organization import OrganizationEndpoint from sentry.api.exceptions import ResourceDoesNotExist from sentry.api.serializers import ...
bsd-3-clause
-6,328,588,570,410,256,000
33.75
97
0.61241
false
unomena/tunobase
tunobase/corporate/company_info/contact/models.py
1
1349
""" CONTACT APP This modules sets up the database structure for the contact app. Classes: ContactMessage Functions: n/a Created on 23 Oct 2013 @author: michael """ from django.db import models from django.contrib.sites.models import Site from django.conf import settings from tunobase.corporate.company_in...
bsd-3-clause
9,177,308,814,407,269,000
23.981481
77
0.656783
false
sebastienhupin/qxrad
qooxdoo/tool/pylib/ecmascript/frontend/tree.py
1
24785
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2006-2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
lgpl-3.0
-3,710,500,687,276,511,700
30.775641
186
0.553319
false
emc-openstack/storops
storops_test/unity/jh_mock.py
1
1253
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # 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 # #...
apache-2.0
-8,038,427,901,715,396,000
35.852941
78
0.667997
false
mdehus/goose-IEC61850-scapy
goose.py
1
5622
import struct import binascii from scapy.all import * import BER class ASNType(object): tag = '' def __init__(self, data='', length=0): pass def unpack(self, data): raise NotImplemented() def pack(self, data): raise NotImplemented() def __str__(self): return str...
gpl-2.0
-9,140,397,460,529,846,000
28.129534
71
0.505692
false