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
tholum/PiBunny
system.d/library/tools_installer/tools_to_install/impacket/impacket/dcerpc/v5/dcom/vds.py
2
9527
# Copyright (c) 2003-2016 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # # Author: Alberto Solino (@agsolino) # # Description: # [MS-VDS]: Virtual Disk Service (VDS) Protocol...
mit
3,806,137,423,759,355,400
34.416357
161
0.605752
false
kmunve/APS
aps/util/nc_index_by_coordinate.py
1
2835
#!/usr/bin/env python # -*- coding: utf-8 -*- from numpy import pi, cos, sin, ravel, unravel_index try: from scipy.spatial import cKDTree except ImportError: print('The kdtree_fast method requires the scipy.spatial module.') print('Ignore this warning when using the tunnel_fast method.') __author__ = 'km...
mit
2,649,610,192,237,887,500
33.585366
117
0.651499
false
sss/calibre-at-bzr
src/calibre/devices/android/driver.py
2
15233
# -*- coding: utf-8 -*- __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import os import cStringIO from calibre.devices.usbms.driver import USBMS HTC_BCDS = [0x100, 0x0222, 0x0224, 0x0226, 0x227, 0x228, 0x229, 0x0231, 0x9999] class ANDROID(...
gpl-3.0
904,141,470,946,328,600
35.182898
100
0.471017
false
googleapis/python-aiplatform
samples/model-builder/conftest.py
1
10253
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-4,148,279,109,015,027,700
27.013661
86
0.671803
false
be-cloud-be/horizon-addons
horizon/school_registration/__openerp__.py
1
1665
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 be-cloud.be # Jerome Sonnet <jerome.sonnet@be-cloud.be> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
agpl-3.0
386,256,180,850,674,560
36
78
0.572973
false
grokkers/cr-async
examples/example.py
1
1824
# Inside an async function import crasync import asyncio import time profiles = [] async def main(loop): client = crasync.Client() profile = await client.get_profile('2CYUUCC8') print(profile) print('Current Trophies: ' + str(profile.current_trophies)) chest_cycle = ', '.join([profile.get_chest...
mit
-7,403,707,339,414,221,000
23.648649
72
0.61568
false
summer-liu/events_cache_scripts
report/cache07.py
1
9566
from pymongo import MongoClient import multiprocessing import threading import datetime import time cache = MongoClient(host='10.8.8.111', port=27017, connect=False)['cache25'] db30 = MongoClient(host='10.8.8.111', port=27017, connect=False)['onionsBackupOnline'] events = db30['events'] userAttr = cache['userAttr'] d...
mit
6,925,926,000,981,343,000
30.675497
141
0.402676
false
Alicimo/codon_optimality_code
legacy_code/latest_version/get_tRNA.py
1
3296
#!/usr/bin/env python import BeautifulSoup as BS import urllib2, re, os, sys, difflib def get_full_name(abrv_name): full_name = None for line in open('tRNA_species.csv'): if line.split(',')[0].strip() == abrv_name: full_name = line.split(',')[1][:-1] break return...
gpl-2.0
603,382,137,521,152,800
24.952756
98
0.599211
false
hduisa/hctf2015-all-problems
Black-Eat-Black/site/you_guest_my_name.py
1
2720
#!/usr/bin/env python #-*- coding:utf-8 -*- from flask import Flask from flask import request from flask import Response from werkzeug.routing import BaseConverter import requests import io_file import urllib import time #import sys #reload(sys) #sys.setdefaultencoding('utf8') class MyanyConverter(BaseConverter): we...
gpl-2.0
-3,154,486,464,751,355,000
22.787611
77
0.596354
false
philbinj/fastcluster
fastcluster.py
1
5823
#!/usr/bin/env python import os, sys import ctypes import tables import numpy as np import numpy.random as npr libfastann = ctypes.CDLL('libfastann.so') try: libfastcluster = ctypes.CDLL('libfastcluster.so') except OSError, e: libfastcluster = ctypes.CDLL('./libfastcluster.so') def get_suffix(dtype): re...
bsd-3-clause
-2,437,418,610,296,758,300
27.544118
95
0.559505
false
quentinlautischer/291MiniProject2
lib/python3.5/site-packages/bsddb3/dbtables.py
1
30208
#----------------------------------------------------------------------- # # Copyright (C) 2000, 2001 by Autonomous Zone Industries # Copyright (C) 2002 Gregory P. Smith # # License: This is free software. You may use this software for any # purpose including modification/redistribution, so long as ...
apache-2.0
-3,544,381,186,436,402,000
35.884005
135
0.51387
false
Samueljh/MinecraftPiMods
SimpleChat.py
1
2111
# -*- coding: utf-8 -*- import minecraft.minecraft as minecraft import minecraft.block as block import time from Tkinter import * from Tkinter import StringVar mc = minecraft.Minecraft.create() pos = mc.player.getTilePos() root = Tk() def sayhi(): mc.postToChat('[Guest] Hi') time.sleep(2) def saybye(): ...
mpl-2.0
1,882,186,573,971,093,200
23.264368
95
0.710564
false
e-q/scipy
scipy/stats/tests/test_continuous_basic.py
1
26460
import pickle import numpy as np import numpy.testing as npt import pytest from pytest import raises as assert_raises from scipy.integrate import IntegrationWarning from scipy import stats from scipy.special import betainc from. common_tests import (check_normalization, check_moment, check_mean_expect, ...
bsd-3-clause
-8,904,847,995,878,024,000
39.335366
100
0.613303
false
LabProdam/LabDiario
Prodam/Prodam.py
1
3637
#!/usr/bin/python #coding: utf-8 from Common import * from DiarioTools.Parser import * from DiarioTools.Process import * from DiarioTools.Search import * import re wordsOfInterest = ["Prodam", "Pro-dam", "EMPRESA DE TECNOLOGIA DA INFORMAÇÃO E COMUNICAÇÃO", "Emp. Tec. da Informação e Comunicação", ...
gpl-2.0
-6,001,605,457,719,008,000
26.892308
141
0.600386
false
317070/kaggle-heart
configurations/je_ss_jonisc80small_360_gauss_longer_augzoom.py
1
9591
"""Single slice vgg with normalised scale. """ import functools import lasagne as nn import numpy as np import theano import theano.tensor as T import data_loader import deep_learning_layers import image_transform import layers import preprocess import postprocess import objectives import theano_printer import update...
mit
6,066,574,913,071,198,000
41.816964
175
0.689292
false
Kate-Willett/Climate_Explorer
PYTHON/ReformatGrids.py
1
7023
#!/usr/local/sci/bin/python # PYTHON3 # # Author: Kate Willett # Created: 16 October 2015 # Last update: 20 July 2020 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # CODE PURPOSE AND OUTPUT # ---...
cc0-1.0
-2,623,122,444,399,294,000
37.587912
152
0.56258
false
yavuzhan/carPricePrediction-ML
scrapingSahibinden.py
1
8100
# -*- coding: utf-8 -*- # yavuzhan sahibinden.com Ford Focus webscrap & write to csv import urllib.parse import urllib.request from urllib.request import urlopen as uReq from bs4 import BeautifulSoup as soup import re filename1 = "S_sahibinden.csv" f = open(filename1, "w") # for write headers = "year,km,cc,f...
gpl-3.0
4,280,474,797,969,772,500
42.751381
155
0.552222
false
skirpichev/omg
diofant/tests/polys/test_factortools.py
1
30099
"""Tools for polynomial factorization routines in characteristic zero.""" import pytest from diofant import (EX, FF, QQ, RR, ZZ, DomainError, I, nextprime, pi, ring, sin, sqrt) from diofant.polys.polyconfig import using from diofant.polys.specialpolys import f_polys, w_polys __all__ = () f_0, ...
bsd-3-clause
-896,794,340,217,578,800
32.705487
82
0.413236
false
skyfallen/SecondDataScienceBowl
Code/Forum_code/Keras/models/VGG15/model.py
1
2880
from __future__ import print_function from keras.models import Sequential from keras.layers.convolutional import Convolution2D, MaxPooling2D, ZeroPadding2D from keras.layers.core import Activation, Flatten, Dense, Dropout from keras.regularizers import l2 from keras.optimizers import Adam from keras import backend as ...
mit
-6,484,837,056,140,195,000
33.285714
92
0.670486
false
mobb-io/django-erp
djangoerp/notifications/managers.py
1
3927
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals """This file is part of the django ERP project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ...
mit
3,655,872,889,356,209,700
34.378378
105
0.661828
false
BurningPixel/LispyCalculator
parser.py
1
3787
from functools import reduce class Parser(object): """ General Notes: Why Floats?: I'm using floats here because I can remove a '.0' but can't add a '.$whatever', after the calculation. """ def __init__(self, given_calc_code): self.given_calc_code = given_c...
bsd-2-clause
8,088,886,024,927,916,000
25.305556
93
0.443887
false
adampresley/trackathon
app/controllers/home.py
1
1101
from bottle import view, route, request, response from model.model import * @route("/") @view("home") def home(): viewData = {} return viewData @route("/api/ideas", method="GET") def api_listIdeas(): ideas = Idea.query.all() result = [idea.toDict() for idea in ideas] return result @route("/api/idea", method="...
mit
4,791,848,767,354,680,000
20.173077
79
0.675749
false
nguyendv/srcget
tests/test_srcget.py
1
1373
import sys import os from shutil import copyfile import unittest from click.testing import CliRunner sys.path.append("../scripts") import srcget from srcget import _make_dest class TestSrcGet(unittest.TestCase): def setUp(self): runner = CliRunner() result = runner.invoke(srcget.init) self...
mit
-496,344,662,279,134,300
30.930233
78
0.665696
false
climapulse/dj-bgfiles
bgfiles/http.py
1
2125
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, division, absolute_import from django.utils.encoding import force_bytes, force_text from django.utils.http import urlquote import unicodedata def create_content_disposition(filename, attachment=True): """Create the Content-Dispositio...
bsd-3-clause
-4,337,149,917,805,613,600
36.280702
105
0.654588
false
glenngillen/dotfiles
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/debugpy/_vendored/_util.py
1
1985
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE in the project root # for license information. from __future__ import absolute_import, division, print_function, unicode_literals import contextlib import os @contextlib.contextmanager def cwd(dirnam...
mit
-7,952,962,982,748,197,000
30.540984
82
0.623174
false
uliss/quneiform
tests/py/lpod/paragraph.py
1
14598
# -*- coding: UTF-8 -*- # # Copyright (c) 2009 Ars Aperta, Itaapy, Pierlis, Talend. # # Authors: David Versmisse <david.versmisse@itaapy.com> # Hervé Cauwelier <herve@itaapy.com> # Romain Gauthier <romain@itaapy.com> # # This file is part of Lpod (see: http://lpod-project.org). # Lpod is free software...
gpl-3.0
-793,280,292,552,058,200
34.864865
77
0.529972
false
aileisun/bubbleimg
bubbleimg/filters/getllambda.py
1
1909
# getllambda.py # ALS 2016/12/05 """ Get wavelength of line in AA (in vacuum by default). The data is read from file linelist.txt. """ import numpy as np import re import astropy.table as at from PyAstronomy import pyasl from . import filtertools def getllambda(ion='OIII', lid=0, vacuum=True): """ PURPOS...
mit
-3,167,229,642,856,302,000
26.271429
111
0.591933
false
dashimaki360/turtle_war
scripts/abstractBot.py
1
2087
#!/usr/bin/env python # -*- coding: utf-8 -*- import rospy from abc import ABCMeta, abstractmethod from geometry_msgs.msg import Twist from kobuki_msgs.msg import BumperEvent from gazebo_msgs.msg import ModelStates from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import cv2 class Abstr...
mit
7,514,601,076,950,278,000
27.202703
106
0.588884
false
SnowRomance/CMDB
app/migrations/0005_auto_20161228_1007.py
1
1083
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-12-28 02:07 from __future__ import unicode_literals import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0004_auto_20161227_1717'), ] operations = [ migration...
gpl-3.0
2,281,396,350,659,687,700
33.935484
136
0.581717
false
EuroPython/epcon
tests/test_models.py
1
3040
from unittest import mock from django.conf import settings from django.utils import timezone import pytest from p3.models import TicketConference from p3.models import P3Profile from tests.factories import ( ConferenceFactory, TicketFactory, FareFactory, TicketConferenceFactory ) pytestmark = pytest...
bsd-2-clause
-6,399,557,467,238,967,000
31.688172
87
0.718092
false
seecloud/ceagle
tests/unit/test_cmd.py
1
1156
# Copyright 2016: Mirantis 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 b...
apache-2.0
-1,091,732,237,166,051,200
34.030303
78
0.681661
false
leivaburto/stem
stem/interpreter/commands.py
1
11489
# Copyright 2014-2015, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Handles making requests and formatting the responses. """ import code import socket import stem import stem.control import stem.descriptor.remote import stem.interpreter.help import stem.util.connection import stem....
lgpl-3.0
269,877,546,550,135,360
31.454802
124
0.654278
false
jasonbunk/BunkNeuralNets
layer_conv.py
1
12441
'''Copyright (c) 2015 Jason Bunk Covered by LICENSE.txt, which contains the "MIT License (Expat)". ''' import numpy as np import activations import costfuncs import cython_convolution class convlayer(object): # inshape == (nsamples-per-batch, nchannels-in, im-dimensions...) # filtshape == (nchannels-out, nchannels...
mit
8,917,722,690,043,989,000
43.591398
232
0.666506
false
yinzishao/YPro
share/share3.py
1
4409
def get_fileinf(file): documentName = file.name isFiles =2 #默认普通文件 fileType=05 #文件类型,默认OTHER postfix = documentName.split(".")[-1] for i,v in enumerate(types): if postfix.lower() in v: fileType = i+1 break #调用云查看链接 file_url =file.absolute_url(request) ur...
gpl-2.0
7,919,961,506,551,584,000
25.212903
80
0.601526
false
Unidata/siphon
siphon/ncss_dataset.py
1
14039
# Copyright (c) 2013-2015 Siphon Contributors. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Support reading and parsing the dataset.xml documents from the netCDF Subset Service.""" from __future__ import print_function import logging import re import numpy as ...
bsd-3-clause
-1,927,453,648,561,803,800
31.955399
91
0.554384
false
akx/shoop
shoop/simple_cms/admin_module/views.py
1
5423
# This file is part of Shoop. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.core.exceptions import ValidationError from dja...
agpl-3.0
-1,292,308,328,326,264,800
36.143836
117
0.59764
false
google/starthinker
dags/dv360_api_insert_from_bigquery_dag.py
1
3986
########################################################################### # # 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 # # https://www.apache.org/l...
apache-2.0
7,627,536,034,618,030,000
28.746269
87
0.54014
false
AmandaCMS/amanda-cms
amanda/articles/migrations/0016_auto__del_field_article_content_list.py
1
7821
# -*- 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): # Deleting field 'Article.content_list' db.delete_column(u'articles_artic...
mit
-8,965,940,096,096,964,000
76.445545
194
0.553254
false
amyangfei/GorMW
tests/test_gor.py
1
5934
# coding: utf-8 import binascii import unittest from gor.base import Gor class TestCommon(unittest.TestCase): def setUp(self): self.gor = Gor() def tearDown(self): pass def test_parse_message(self): payload = binascii.hexlify(b'1 2 3\nGET / HTTP/1.1\r\n\r\n') message =...
mit
2,283,920,597,634,932,000
42.313869
125
0.602123
false
petry/django-photologue-old
photologue/tests/resize.py
1
4768
# -*- coding: utf-8 -*- from django.core.files.base import ContentFile import os from photologue.models import Photo, PhotoSizeCache from photologue.tests.helpers import PhotologueBaseTest, SQUARE_IMAGE_PATH, PORTRAIT_IMAGE_PATH class ImageResizeTest(PhotologueBaseTest): def setUp(self): super(ImageResizeT...
bsd-3-clause
6,343,927,967,132,835,000
35.96124
95
0.600042
false
DavidNorman/tensorflow
tensorflow/python/eager/core_test.py
1
37342
# 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
7,337,685,457,674,256,000
33.543941
115
0.624016
false
omaraboumrad/mastool
mastool/test.py
1
3324
"""mastool test module""" import ast import collections import os from mastool import practices Fixture = collections.namedtuple('Fixture', 'practice finds ignores') ALL_FIXTURES = [ Fixture( practice=practices.find_for_x_in_y_keys, finds=['for_in_y_keys.py'], ignores=['for_in_y.py'] ...
apache-2.0
-7,207,463,157,093,396,000
24.569231
78
0.577617
false
escapewindow/signingscript
src/signingscript/vendored/mozbuild/mozbuild/compilation/database.py
2
6931
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # This modules provides functionality for dealing with code completion. from __future__ import absolute_import, print_f...
mpl-2.0
-756,210,101,431,987,000
34.362245
96
0.550426
false
Abjad/ide
tests/test_AbjadIDE_color.py
1
10744
import ide abjad_ide = ide.AbjadIDE(test=True) scores = ide.configuration.test_scores_directory def test_AbjadIDE_color_01(): """ Colors clefs in segment directory. """ with ide.Test(): path = ide.Path( scores, "green_score", "green_score", "segments", "01", "illustration.ly" ...
gpl-2.0
-2,736,874,427,982,829,600
31.071642
85
0.542908
false
gstsistemas/passwall
telas/collect.py
1
5170
# -*- coding: utf-8 -*- from kivy.uix.screenmanager import Screen #from kivy.lang import Builder from models.senhas import Senha, Collection from kivy.uix.button import Button from kivy.uix.gridlayout import GridLayout from telas.utilities import Confirma, JanelaSettings import sys class JanelaCollect (Screen): ...
gpl-2.0
1,587,664,183,274,672,400
33.019737
91
0.615861
false
robotframework/DbBot
examples/failbot/failbot/html_writer.py
1
2345
import os from string import Template from xml.sax.saxutils import escape from dbbot import Logger class HtmlWriter(object): template_path = os.path.abspath(__file__ + '../../../templates') # escape() only takes care of &, < and > additional_html_escapes = { '"': "&quot;", "'": "&apos;" ...
apache-2.0
-8,517,836,069,135,902,000
32.985507
75
0.602132
false
liushuizijin/vastio
Algorithm/Fire/fire_risk/risk_train.py
1
2796
""" 消防单位火灾风险预测 """ import sys import fire_risk.data_utils as fr import sklearn.linear_model as lm from sklearn.externals import joblib # 读入配置参数 file_train_path, _, model_path, deadline, _, _ = fr.read_config(sys.argv[1]) # 导入数据 fire_data = fr.data_input_from_file(file_train_path) # 对数据进行转换 fire_data = fr.DataTransla...
apache-2.0
-6,975,590,051,169,167,000
59.772727
120
0.534405
false
davidedmundson/telepathy-hangups
telepathy/_generated/Channel_Interface_SASL_Authentication.py
1
8524
# -*- coding: utf-8 -*- # Generated from the Telepathy spec """ Copyright © 2010 Collabora Limited 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 2.1 of the License, or (a...
lgpl-2.1
1,913,757,949,955,048,700
41.193069
128
0.679066
false
KillersDeath/PyCrawler
spiders/deppre/fetch.py
1
6136
# -*- coding:utf-8 -*- """ 抓取主逻辑,分三个进程:解析三级目录,抓取种子,解析详情 @version: 1.0 @author: kevin @license: Apache Licence @contact: liujiezhang@bupt.edu.cn @site: @software: PyCharm Community Edition @file: fetch.py @time: 16/11/26 下午5:21 """ import sys import getopt # from dataBase.mysql import M from mysql import M from detail...
apache-2.0
5,767,791,469,894,340,000
26.266667
152
0.555711
false
tsh/Rosalind-solutions-python
algorithmic-heights/bfs.py
1
1414
""" The task is to use breadth-first search to compute single-source shortest distances in an unweighted directed graph. Given: A simple directed graph with n≤103 vertices in the edge list format. Return: An array D[1..n] where D[i] is the length of a shortest path from the vertex 1 to the vertex i (D[1]=0). If i is n...
gpl-3.0
-2,970,676,157,567,038,000
28.375
116
0.586525
false
glederrey/camogen
camogen/helpers.py
1
10145
#! /usr/bin/env python # coding=utf-8 # # Copyright © 2017 Gael Lederrey <gael.lederrey@epfl.ch> # # Distributed under terms of the MIT license. # # Based on the code of Ulf Astrom (http://www.happyponyland.net) from camogen.vertex import * import numpy as np def distort(): """ :return: random value between...
mit
-5,396,153,192,595,316,000
30.116564
120
0.589314
false
Neui/MCEdit-Unified
albow/table_view.py
1
5655
# # Albow - Table View # #-# Modified by D.C.-G. for translation purpose from pygame import Rect from layout import Column from palette_view import PaletteView from utils import blit_in_rect from translate import _ class TableView(Column): columns = [] header_font = None header_fg_color = None header_...
isc
-8,208,429,836,802,886,000
30.243094
83
0.574005
false
R-a-dio/python-audio-tools
test/test_formats.py
1
270275
#!/usr/bin/python #Audio Tools, a module and set of tools for manipulating audio data #Copyright (C) 2007-2012 Brian Langenberger #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...
gpl-2.0
-7,658,939,958,105,444,000
43.504364
151
0.454863
false
Tasignotas/topographica_mirror
topo/tests/test_map_measurement.py
1
7164
""" Functions to test that map measurements haven't changed. Use generate() to save data, and test() to check that the data is unchanged in a later version. Results from generate() are already checked into svn, so intentional changes to map measurement mean new data must be generated and committed. E.g. # ...delibera...
bsd-3-clause
-5,703,393,374,562,852,000
35.55102
121
0.605667
false
mirusresearch/staticdhcpd
staticDHCPd/staticdhcpdlib/databases/_sql.py
1
10275
# -*- encoding: utf-8 -*- """ staticdhcpdlib.databases._sql ============================= Provides a uniform datasource API, implementing multiple SQL-based backends. Legal ----- This file is part of staticDHCPd. staticDHCPd is free software; you can redistribute it and/or modify it under the terms of the GNU General...
gpl-3.0
-3,543,343,598,357,080,000
32.910891
100
0.572555
false
jlopezbi/rhinoUnfolder
rhino_unwrapper/test_net.py
1
1300
import unittest import Net import transformations as trans import Rhino.Geometry as geom import rhinoscriptsyntax as rs reload(Net) reload(trans) def setUpModule(): print("---- net ----") def tearDownModule(): print("---- module torn down ----") remove_objects() def remove_objects(): rs.DeleteObject...
gpl-3.0
-4,223,322,798,655,765,500
27.26087
70
0.656923
false
poppogbr/genropy
packages/showcase/webpages/webpage_elements/widgets/editing/grids.py
1
1773
#!/usr/bin/env pythonw # -*- coding: UTF-8 -*- # # untitled # # Created by Giovanni Porcari on 2007-03-24. # Copyright (c) 2007 Softwell. All rights reserved. # """ GnrDojo Grid Test""" from gnr.core.gnrbag import Bag class GnrCustomWebPage(object): def main(self, root, **kwargs): bc = root.borderCont...
lgpl-2.1
-7,670,070,991,870,698,000
37.543478
98
0.591089
false
ActiveState/code
recipes/Python/578867_Monte_Carlo_Engine__Stochastic_Interest_Rate/recipe-578867.py
1
7875
import unittest, datetime import numpy as np from engine.BackTest import MonteCarloModel, MonteCarloEngine, Simulation import matplotlib.pyplot as plt from matplotlib.dates import date2num, DateFormatter, DayLocator from pandas import DataFrame from numpy.random import standard_normal from numpy import array, zeros, ...
mit
-1,158,431,595,179,812,400
31.676349
153
0.634667
false
baoboa/Crystal-Space
scripts/blender/io_scene_cs/io/object.py
1
27255
import bpy from mathutils import * from .util import * from .transform import * from .renderbuffer import * from .morphtarget import * from .material import * from io_scene_cs.utilities import B2CS class Hierarchy: OBJECTS = {} exportedFactories = [] def __init__(self, anObject, anEmpty): self.object = anO...
lgpl-2.1
2,597,069,485,716,116,000
36.284542
117
0.630416
false
EmanueleCannizzaro/scons
test/Climb/option-u.py
1
5437
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 us...
mit
4,052,969,171,338,468,000
35.736486
96
0.668567
false
jubatus/jubatus-python-client
jubatus/common/types.py
1
4998
from .compat import int_types, string_types, binary_types def check_type(value, typ): if not isinstance(value, typ): raise TypeError('type %s is expected, but %s is given' % (typ, type(value))) def check_types(value, types): if isinstance(value, types): return t = ', '.join([str(t) for t i...
mit
1,280,570,525,719,842,600
25.870968
110
0.545418
false
nilouco/dpAutoRigSystem
dpAutoRigSystem/Controls/dpClipStraight.py
1
2952
# importing libraries: import maya.cmds as cmds import dpBaseControlClass as BaseControl reload(BaseControl) # global variables to this module: CLASS_NAME = "ClipStraight" TITLE = "m109_clipStraight" DESCRIPTION = "m099_cvControlDesc" ICON = "/Icons/dp_clipStraight.png" dpClipStraightVersion = 1.1 class ClipStra...
gpl-2.0
-3,002,721,589,767,636,500
51.732143
159
0.538279
false
btidor/django-serverauth
serverauth/backends.py
1
2888
from __future__ import unicode_literals from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.contrib.auth.models import Permission class ServerAuthBackend(ModelBackend): """ This backend is to be used in conjunction w...
mit
-8,094,277,368,780,972,000
37.506667
79
0.644391
false
Limafer/game
game/game.py
1
3645
#! /usr/bin/env python import pygame from pygame.locals import * from sys import exit from random import randrange pygame.init() pygame.font.init() pygame.mixer.pre_init(44100, 32, 2, 4096) font_name = pygame.font.get_default_font() game_font = pygame.font.SysFont(font_name, 72) screen = pygame.display.set_mode((956...
gpl-2.0
-1,329,957,868,505,982,500
23.802721
76
0.575034
false
scrapinghub/dateparser
dateparser/data/date_translation_data/uz-Cyrl.py
1
3917
info = { "name": "uz-Cyrl", "date_order": "DMY", "january": [ "янв", "январ" ], "february": [ "фев", "феврал" ], "march": [ "мар", "март" ], "april": [ "апр", "апрел" ], "may": [ "май" ], "june": ...
bsd-3-clause
2,009,746,384,388,688,400
15.657143
35
0.261578
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/next_hop_result.py
1
1760
# 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
-3,392,545,748,422,380,500
40.904762
90
0.623295
false
isque03/pyslicer
readStl.py
1
109129
#!/usr/bin/env pypy import sys from datetime import datetime from clipper import * from timer import Timer # import resource from multiprocessing.dummy import Pool from functools import partial import math import traceback import threading import logging from operator import itemgetter, attrgetter from copy import c...
mit
6,765,124,354,233,065,000
38.799052
162
0.547664
false
kret0s/gnuhealth-live
tryton/server/trytond-3.8.3/trytond/modules/sale_stock_quantity/setup.py
1
4009
#!/usr/bin/env python # This file is part of Tryton. The COPYRIGHT file at the top level of # this repository contains the full copyright notices and license terms. from setuptools import setup import re import os import ConfigParser def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).r...
gpl-3.0
-6,933,666,403,461,919,000
33.560345
74
0.626091
false
mgiustiniani/httpdomain
sphinxcontrib/httpdomain.py
1
16945
""" sphinxcontrib.httpdomain ~~~~~~~~~~~~~~~~~~~~~~~~ The HTTP domain for documenting RESTful HTTP APIs. :copyright: Copyright 2011 by Hong Minhee :license: BSD, see LICENSE for details. """ import re from docutils import nodes from docutils.parsers.rst.roles import set_classes from pygments.l...
bsd-2-clause
7,403,416,321,039,101,000
31.092803
93
0.56406
false
hebrinkmann/lights
leuchtturm.py
1
1357
import bibliopixel.colors as colors #Load driver for your hardware, visualizer just for example import time from bibliopixel.animation import BaseMatrixAnim class Leuchtturm(BaseMatrixAnim): def __init__(self, led, start=0, end=-1, period = 20): #The base class MUST be initialized by calling super like thi...
mit
2,326,568,015,324,156,400
37.771429
90
0.619013
false
XertroV/bitcoin-nulldata
qa/rpc-tests/wallet-hd.py
1
3260
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Hierarchical Deterministic wallet function.""" from test_framework.test_framework import BitcoinTestFr...
mit
-754,420,485,830,275,800
36.045455
91
0.612577
false
zaneb/heat-convergence-prototype
test_converge.py
1
1697
#!/usr/bin/env python import functools import logging import unittest import converge import converge.processes from converge.framework import datastore from converge.framework import scenario def with_scenarios(TestCase): loader = unittest.defaultTestLoader def create_test_func(generic_test, params): ...
apache-2.0
8,185,530,882,317,720,000
25.936508
70
0.644078
false
hagne/atm-py
atmPy/aerosols/instruments/miniSASP/miniSASP.py
1
45927
# -*- coding: utf-8 -*- """ Created on Thu Mar 19 21:23:22 2015 @author: htelg """ import warnings import numpy as np import pandas as pd import pylab as plt from scipy import stats from atmPy.tools import array_tools, plt_tools from atmPy.tools import math_linear_algebra as mla # from scipy import integrate from ...
mit
6,611,355,322,641,861,000
41.096242
184
0.580508
false
project-oak/hafnium-verification
experiments/ownership-inference/infer/infer/lib/python/inferlib/capture/gradle.py
1
8338
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import itertools import logging import os import util import tempfile MODULE_NAME = __name__ MODULE_DESCRIPTION = '''Run analysis of code bui...
apache-2.0
-2,542,931,754,572,284,400
37.423963
96
0.559367
false
picoCTF/picoCTF-web
daemons/share_instances.py
1
4805
#!/usr/bin/python3 import api import spur import json import string import random from os.path import join script = \ """ import json import os import stat import pwd import subprocess from os.path import join data = json.loads(raw_input()) for user, correct_symlinks in data.items(): try: home_dir = p...
mit
6,266,827,422,933,645,000
33.568345
126
0.571488
false
Garrappachc/tf2director
tf2server.py
1
7149
import datetime import os import time import libtmux from valve.source.a2s import ServerQuerier from subprocess import call class CorruptedTf2ServerInstanceError(Exception): """ Raised when an invalid TF2 server instance is found. """ class SteamCmdNotFoundError(Exception): """ Raised when the ...
mit
8,262,604,814,189,408,000
29.814655
127
0.552525
false
danakj/chromium
tools/perf/page_sets/mac_gpu_sites.py
1
5328
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry.page import shared_page_state from telemetry import story class _NoGpuSharedPageState(shared_p...
bsd-3-clause
-5,708,481,289,625,409,000
40.302326
80
0.723724
false
xirdneh/oposum
oPOSum/libs/migrate.py
1
12304
import MySQLdb as mdb import sys from oPOSum.apps.products.models import * import re from django.core.exceptions import ObjectDoesNotExist import re import logging from decimal import Decimal logger = logging.getLogger("oPOSum.mysql") def get_con( ): try: con = mdb.connect('joyeriasbalco.com', 'balco', 'tsm...
mit
-151,554,474,499,668,200
31.986595
225
0.4362
false
yinglanma/AI-project
tensorpack/dataflow/imgaug/paste.py
1
3017
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: paste.py # Author: Yuxin Wu <ppwwyyxxc@gmail.com> from .base import ImageAugmentor from abc import abstractmethod import numpy as np __all__ = ['CenterPaste', 'BackgroundFiller', 'ConstantBackgroundFiller', 'RandomPaste'] class BackgroundFiller(object):...
apache-2.0
5,813,919,745,948,893,000
31.44086
98
0.615844
false
klahnakoski/ActiveData
vendor/jx_base/expressions/between_op.py
1
5352
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http:# mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
mpl-2.0
4,303,102,964,235,726,000
34.210526
88
0.565583
false
reesmanp/Nao
Nao/Automation_src/planner_parser.py
1
1102
''' Created on Jul 9, 2013 Updated on Aug 5, 2013 @author: Paul Reesman @param plan: A string copied from the output of the SapaReplan planner Finds the phrase 'getready' and 'EOP' and sends their indexes to low and high respectfully Copies only the text between 'getready' and 'EOP' into instruct_plan Loop...
apache-2.0
-9,020,304,308,667,429,000
31.454545
90
0.598911
false
rogerthat-platform/rogerthat-backend
src/rogerthat/pages/admin/js_embedding.py
1
1848
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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
-818,769,668,640,334,500
36.714286
117
0.697511
false
sharoonthomas/trytond-report-html-accounts
tests/test_party.py
1
20494
# -*- coding: utf-8 -*- import sys import unittest from datetime import date from dateutil.relativedelta import relativedelta from decimal import Decimal import trytond.tests.test_tryton from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT from trytond.transaction import Transaction from trytond.pool imp...
bsd-3-clause
8,040,115,976,749,563,000
36.261818
79
0.445789
false
Skylion007/popupcad
popupcad/filetypes/genericlaminate.py
1
14057
from __future__ import division # -*- coding: utf-8 -*- """ Written by Daniel M. Aukes. Email: danaukes<at>seas.harvard.edu. Please see LICENSE.txt for full license. """ import popupcad import numpy from popupcad.filetypes.popupcad_file import popupCADFile try: import itertools.izip as zip except ImportError: ...
mit
-9,194,283,029,082,293,000
39.051282
128
0.572099
false
crckyl/pixplus
tools/changelog.py
1
3224
import sys import re import json def stable(f): def w(changelog): return f(list(filter(lambda v: v['date'], changelog))) return w def out_json(changelog): return [json.dumps(changelog, sort_keys = True, indent = 2)] def out_dev_version(changelog): return [changelog[0]['version']] @stable def out_stable_...
mit
-8,051,231,018,537,412,000
23.610687
82
0.586538
false
arenadata/ambari
ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/utils.py
1
16823
""" 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 this ...
apache-2.0
3,519,208,613,618,296,000
38.123256
169
0.679189
false
ninja777/Utils
outputFileStats.py
1
3653
import os def getIndirectCalls(filename='beanstalkd.out', verbose=False): if verbose: print "getindirectCalls :: Reading file :", filename f = open(filename, 'r') contents = f.read() f.close() indirectCalls = contents.count('========') contents = contents.split('\n') count = 0 ...
mit
2,206,708,753,596,048,400
38.706522
140
0.573227
false
turon/openthread
tests/scripts/thread-cert/Cert_5_3_02_RealmLocal.py
1
5825
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # 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 retain the above copyright # ...
bsd-3-clause
6,624,594,367,286,619,000
37.576159
79
0.655966
false
weiting-chen/manila
manila/tests/api/test_common.py
1
10096
# Copyright 2010 OpenStack LLC. # 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 b...
apache-2.0
5,109,787,621,793,541,000
40.719008
78
0.63649
false
yueyongyue/saltshaker
shaker/shaker_core.py
1
8130
#!/usr/bin/env python import urllib2,urllib from django.conf import settings from nodegroups import * try: import json except ImportError: import simplejson as json class SaltAPI(object): __token_id = '' def __init__(self): self.__url = settings.SALT_API_URL self.__user = settings.SALT_...
apache-2.0
-7,380,418,697,742,444,000
36.293578
107
0.564945
false
cbertinato/pandas
pandas/tests/io/parser/test_dtypes.py
1
16378
""" Tests dtype specification during parsing for all of the parsers defined in parsers.py """ from io import StringIO import os import numpy as np import pytest from pandas.errors import ParserWarning from pandas.core.dtypes.dtypes import CategoricalDtype import pandas as pd from pandas import ( Categorical, Da...
bsd-3-clause
8,808,121,051,328,801,000
31.050881
79
0.562462
false
yliu120/dbsystem
HW1/dbsys-hw1/Storage/Page.py
1
16371
from io import BytesIO import copy, math, struct from Catalog.Identifiers import TupleId class PageHeader: """ A base class for page headers, storing bookkeeping information on a page. Page headers implement structural equality over their component fields. This includes the page's flags (e.g., whether the p...
apache-2.0
-5,774,462,357,568,004,000
32.072727
138
0.670943
false
beeftornado/sentry
src/sentry/api/serializers/rest_framework/commit.py
1
1294
from __future__ import absolute_import from rest_framework import serializers from sentry.api.serializers.rest_framework.list import ListField from sentry.models import CommitFileChange class CommitPatchSetSerializer(serializers.Serializer): path = serializers.CharField(max_length=255) type = serializers.Cha...
bsd-3-clause
-3,367,516,665,309,448,700
38.212121
99
0.734158
false
sochka/os-lab
fifo_scheduler/scheduler.py
1
1119
#!/usr/bin/python3 from random import randint, random from operator import itemgetter minlen = 1 maxlen = 15 tasks = 1000 for intensivity in [0.1]: # for intensivity in [i/1000 for i in range(1, 100, 2)]: # print('INTENSIVITY = {}'.format(intensivity), end=' => ') ## DEBUG time = 0 waiting_sum = 0 tasks_left =...
gpl-3.0
4,588,132,833,880,194,600
26.975
75
0.590706
false
eyaler/tensorpack
tensorpack/tfutils/sessinit.py
1
9676
# -*- coding: utf-8 -*- # File: sessinit.py import os import numpy as np import tensorflow as tf import six from ..utils import logger from ..utils.develop import deprecated from .common import get_op_tensor_name from .varmanip import (SessionUpdate, get_savename_from_varname, is_training_name...
apache-2.0
2,755,535,274,946,339,300
33.557143
110
0.600765
false
heyfaraday/rustcmb
py/examples/scalar_field/image.py
1
1052
from numpy import * from pylab import * size = 64 plt.figure(figsize=(8, 8)) x, y, z = genfromtxt( "../../../../data/out/rust-examples/scalar_field/empty_field.dat").T x = x.reshape(size + 1, size + 1) y = y.reshape(size + 1, size + 1) z = z.reshape(size + 1, size + 1) pcolor(x, y, z) show() r1, number1 = genfro...
mit
-2,778,605,839,176,722,400
22.909091
87
0.60076
false
levilucio/SyVOLT
GM2AUTOSAR_MM/Properties/positive/Himesis/HP1IsolatedLHS.py
1
23687
from core.himesis import Himesis, HimesisPreConditionPatternLHS class HP1IsolatedLHS(HimesisPreConditionPatternLHS): def __init__(self): """ Creates the himesis graph representing the AToM3 model HP1IsolatedLHS. """ # Flag this instance as compiled now self.is_compiled = T...
mit
8,456,940,167,093,672,000
48.867368
192
0.509647
false
sorki/faf
src/pyfaf/problemtypes/ruby.py
1
13593
# Copyright (C) 2013 ABRT Team # Copyright (C) 2013 Red Hat, Inc. # # This file is part of faf. # # faf is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) ...
gpl-3.0
-8,794,422,266,913,718,000
38.172911
83
0.524755
false
chrisseto/waterbutler
waterbutler/core/utils.py
1
5171
import json import asyncio import logging import functools # from concurrent.futures import ProcessPoolExecutor TODO Get this working import aiohttp from raven.contrib.tornado import AsyncSentryClient from stevedore import driver from waterbutler import settings from waterbutler.core import exceptions from waterbut...
apache-2.0
-4,689,323,767,052,328,000
27.569061
167
0.611294
false
snudler6/time-travel
src/time_travel/patchers/poll_patcher.py
1
3189
"""A patch to the select.poll object.""" from .base_patcher import BasePatcher import select as select_lib class MockPollObject(object): """A mock poll object.""" def __init__(self, clock, event_pool): """Initialize the object.""" self.clock = clock self.event_pool = event_pool ...
mit
230,175,157,121,994,100
29.663462
79
0.569458
false