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
sergeneren/anima
anima/env/mayaEnv/plugins/closestPointOnCurve.py
1
8872
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015, Anima Istanbul # # This module is part of anima-tools and is released under the BSD 2 # License: http://www.opensource.org/licenses/BSD-2-Clause import sys import maya.OpenMaya as OpenMaya import maya.OpenMayaMPx as OpenMayaMPx kPluginNodeTypeName = "spClosestPointO...
bsd-2-clause
-1,998,576,980,713,366,500
32.228464
93
0.679554
false
ministryofjustice/manchester_traffic_offences_pleas
apps/result/tests.py
1
14800
# -*- coding: utf-8 -*- import datetime as dt import os from mock import patch from decimal import Decimal from io import StringIO from django.core import mail from django.test import TestCase from apps.plea.models import Court, Case, CaseOffenceFilter from .models import Result, ResultOffenceData, ResultOffence fr...
mit
-1,403,374,018,041,353,200
29.744283
100
0.613741
false
appknox/vendor
ak_vendor/report_sample.py
1
1164
import json from os.path import dirname, abspath from django import template from django.conf import settings from django.template import Template, Context from django.template.engine import Engine from django.core.wsgi import get_wsgi_application from ak_vendor.report import Report settings.configure() application = ...
mit
2,017,626,688,635,430,700
28.1
75
0.664089
false
pajlada/pajbot
pajbot/modules/chat_alerts/cheeralert.py
1
12111
import logging import math from pajbot.managers.handler import HandlerManager from pajbot.modules import BaseModule from pajbot.modules import ModuleSetting from pajbot.modules.chat_alerts import ChatAlertModule log = logging.getLogger(__name__) class CheerAlertModule(BaseModule): ID = __name__.split(".")[-1] ...
mit
-5,770,239,708,818,410,000
43.690037
219
0.546033
false
artemharutyunyan/copilot
src/copilot-dashboard/copilot_dashboard/dashboard/views.py
1
3545
import httplib2 import datetime from urllib import urlencode from random import random from django.http import HttpRequest, HttpResponse from django.core.serializers.json import DjangoJSONEncoder from django.utils import simplejson from django.conf import settings import bson.json_util from bson.objectid import Object...
bsd-3-clause
345,892,791,650,336,500
25.856061
108
0.667137
false
petr-devaikin/dancee
helpers/extractor.py
1
5790
# Cut the experiment session in small fragments # Input: ../bin/data/records/{session}/body.csv and skeletok.csv # Output: fragments/{fragment_number}.json and fragments/log.csv import os import numpy import json DELAY = 15 LENGTH = 30 OVERLAP = 0.719999 FREQUENCY = 60 MARGIN = 5 FREQUENCY = 60 CUTOFF_FREQUENCY = 1...
gpl-3.0
-8,201,075,262,819,803,000
25.199095
141
0.580656
false
quantumgraph/qgprofiler
qgprofiler/qg_profile_aggregator.py
1
4240
from node import Node, NodeList from .qg_profiler import QGProfiler from .helper import get_real_file_path, get_file_type, xml_scanner, read_attributes_from_xml, merge_attributes import glob import json class QGProfileAggregator(object): def __init__(self, in_file_path, out_file_path): self.root_node = Nod...
mit
7,139,093,304,680,659,000
43.631579
129
0.556132
false
henriquebastos/django-decouple
tests/test_env.py
1
1790
# coding: utf-8 import os import sys from mock import patch import pytest from decouple import Config, RepositoryEnv, UndefinedValueError # Useful for very coarse version differentiation. PY3 = sys.version_info[0] == 3 if PY3: from io import StringIO else: from StringIO import StringIO ENVFILE = ''' KeyTru...
mit
7,651,317,815,058,912,000
23.520548
77
0.703911
false
macmanes-lab/MCBS913
code/Junhong Chen/generateProtineSeq.py
1
4902
""" Author: Junhong Chen """ from Bio.Alphabet import IUPAC from Bio.Seq import Seq from Bio import SeqIO from sys import argv import os path = argv[1] class CDS: def __init__(self,gff): self.data = dict() self.fname = gff def parse(self): file = open(sel...
mit
-7,779,518,581,467,217,000
20.5
90
0.467768
false
EmanueleCannizzaro/scons
test/Scanner/Scanner.py
1
7353
#!/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
-8,465,427,710,876,790,000
29.135246
97
0.629131
false
openre/openre
openre/agent/domain/__init__.py
1
1623
# -*- coding: utf-8 -*- """ Домен. Создает один процесс для одного домена openre. Получает и передает спайки (pub), получает команды от сервера (req-rep) и пересылает результат выполнения команды. """ from openre.agent.decorators import daemonize from openre.agent.helpers import daemon_stop import logging import signal...
mit
-6,384,374,142,818,930,000
24.413793
74
0.580054
false
ttm/pingosom
pingosom2.py
1
50613
#-*- coding: utf-8 -*- import numpy as n, random, os, sys, time from scipy.io import wavfile as w tfoo=time.time() H=n.hstack V=n.vstack f_a = 44100. # Hz, frequência de amostragem ############## 2.2.1 Tabela de busca (LUT) Lambda_tilde=Lt=1024.*16 # Senoide fooXY=n.linspace(0,2*n.pi,Lt,endpoint=False) S_i=n.sin(foo...
unlicense
4,547,374,845,288,080,000
45.390826
216
0.425859
false
AkihikoITOH/capybara
capybara/capybara.py
1
1091
#!/bin/python # -*- coding: utf-8 -*- import os from amazon_wrapper import AmazonWrapper from rakuten_wrapper import RakutenWrapper class Capybara: def __init__(self, config_dir=None, tokens_dir=None): self.wrappers = {} self.wrappers['amazon'] = AmazonWrapper() self.wrappers['rakuten'] = ...
mit
-303,462,010,463,526,900
33.09375
98
0.613199
false
Wapaul1/ray
python/ray/rllib/dqn/dqn.py
1
14408
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import numpy as np import pickle import os import tensorflow as tf import ray from ray.rllib.common import Agent, TrainingResult from ray.rllib.dqn import logger, models from ray.rllib.dqn.common....
apache-2.0
-416,873,251,771,667,650
36.423377
79
0.595364
false
eoinof/stem
test/unit/exit_policy/rule.py
1
10901
""" Unit tests for the stem.exit_policy.ExitPolicyRule class. """ import unittest from stem.exit_policy import AddressType, ExitPolicyRule class TestExitPolicyRule(unittest.TestCase): def test_accept_or_reject(self): self.assertTrue(ExitPolicyRule("accept *:*").is_accept) self.assertFalse(ExitPolicyRule("r...
lgpl-3.0
8,623,108,772,148,325,000
32.336391
86
0.566278
false
mskwark/PconsC3
extra/arne/MSA/find-intradom.py
1
1381
#!/usr/bin/env perl # Find all contacts beween domains.. import sys, os, re, string import argparse from os.path import expanduser home = expanduser("~") sys.path.append(home + '/bioinfo-toolbox/parsing') sys.path.append(home + '/git/bioinfo-toolbox/parsing') import parse_contacts import numpy as np import matplotl...
gpl-2.0
-7,908,435,588,187,494,000
26.078431
81
0.631427
false
soroushmehr/sampleRNN_ICLR2017
models/three_tier/three_tier.py
1
35718
""" RNN Audio Generation Model Three-tier model, Quantized input For more info: $ python three_tier.py -h How-to-run example: sampleRNN$ pwd /u/mehris/sampleRNN sampleRNN$ \ THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python -u \ models/three_tier/three_tier.py --exp AXIS1 --seq_len 512 --big_frame_size 8 ...
mit
-2,786,688,481,508,566,500
37.406452
148
0.59379
false
RosesTheN00b/BudgetButlerWeb
butler_offline/views/einzelbuchungen/uebersicht_monat.py
1
8451
from butler_offline.viewcore.state import persisted_state from butler_offline.core import time from butler_offline.viewcore import request_handler from butler_offline.viewcore import viewcore from butler_offline.core.report import ReportGenerator from butler_offline.viewcore.converter import datum_to_string def _hand...
agpl-3.0
-3,474,251,232,784,731,600
41.437186
108
0.665483
false
Aplopio/document-converter
converters/tests/test_html_txt.py
1
1301
import sys sys.path.append('..') sys.path.append('../..') import unittest from html_txt import HtmlTxt from file_manager import FileManager class HtmlTxtTests(unittest.TestCase): def test2_htmltxt1(self): file1 = FileManager('test_files/test1.html') file2 = FileManager('test_files/test2.html') ...
mit
-8,331,685,878,504,589,000
30.731707
57
0.623367
false
schmodd/forecast.py
forecast.py
1
4251
#!/usr/bin/env python # -*- coding: utf-8 -*- # todo: add alerts, colors import requests import json import datetime import argparse import sys from prettytable import PrettyTable # surf to https://developer.forecast.io/ for an api key # use http://dbsgeo.com/latlon/ to get coordinates for your location API_KEY='' L...
mit
-898,684,992,294,098,300
40.676471
117
0.605034
false
repotvsupertuga/tvsupertuga.repository
script.module.python.koding.aio/lib/koding/tutorials.py
1
7420
# -*- coding: utf-8 -*- # script.module.python.koding.aio # Python Koding AIO (c) by TOTALREVOLUTION LTD (support@trmc.freshdesk.com) # Python Koding AIO is licensed under a # Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. # You should have received a copy of the license along w...
gpl-2.0
-4,688,523,344,214,192,000
42.893491
216
0.588434
false
zstars/weblabdeusto
experiments/managed/libs/server/python/weblab_server.py
1
2986
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005-2009 University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, ...
bsd-2-clause
3,668,985,022,238,411,000
33.709302
105
0.706198
false
juliushaertl/i3pystatus
i3pystatus/updates/__init__.py
1
3829
import threading from i3pystatus import SettingsBase, Module, formatp from i3pystatus.core.util import internet, require class Backend(SettingsBase): settings = () updates = 0 class Updates(Module): """ Generic update checker. To use select appropriate backend(s) for your system. For list o...
mit
3,242,534,360,093,105,000
30.628099
107
0.597857
false
git-pedro-77/PROYECTOFINALPYTHON
proyectoITSAE/ec/edu/itsae/dao/ventaDao.py
1
2654
# coding:utf-8 ''' Created on 27/1/2015 @author: Programacion ''' from ec.edu.itsae.conn import DBcon #from flask import redirect, url_for import json class VentaDao(DBcon.DBcon):#heredando ''' classdocs ''' def __init__(self): ''' Constructor ''' ...
gpl-2.0
-8,052,328,900,098,061,000
32.051282
187
0.558779
false
erfannoury/capgen-lasagne
another no-ft-ln-hs-largelr.py
1
13876
from __future__ import division, print_function import logging import numpy as np import scipy as sc import skimage from skimage import transform import theano import theano.tensor as T import lasagne import sys import cPickle as pickle from datetime import datetime from collections import OrderedDict from mscoco_threa...
mit
2,184,633,508,584,648,400
55.868852
179
0.652061
false
goulu/Goulib
Goulib/plot.py
1
4898
""" plotable rich object display on IPython/Jupyter notebooks """ __author__ = "Philippe Guglielmetti" __copyright__ = "Copyright 2015, Philippe Guglielmetti" __credits__ = [] __license__ = "LGPL" # import matplotlib and set backend once for all from . import itertools2 import os import io import sys i...
lgpl-3.0
139,288,707,879,006,940
29.6
161
0.611066
false
asnt/fablablux-schedule
fablab_schedule/config.py
1
2177
import logging import os from pkg_resources import resource_filename try: # Python 3 import configparser except ImportError: # Python 2 import ConfigParser as configparser logger = logging.getLogger(__name__) config_dir = "/etc/fablab_schedule/" config_filename = "fablab_schedule.cfg" example_config...
gpl-3.0
-1,449,656,808,628,135,200
29.661972
78
0.638493
false
kizbitz/tippet
docs/source/conf.py
1
8141
# -*- coding: utf-8 -*- # # tippet documentation build configuration file, created by # sphinx-quickstart on Sun Mar 23 09:56:57 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
apache-2.0
3,177,837,327,602,973,700
30.311538
79
0.706301
false
elegion/djangodash2012
fortuitus/fcore/migrations/0003_auto__add_unique_company_slug__add_unique_company_name.py
1
4714
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'Company', fields ['slug'] db.create_unique('fcore_company', ['slug']) ...
mit
963,338,552,639,445,400
60.233766
182
0.554518
false
WebAssembly/binaryen
test/unit/test_asyncify.py
2
4247
import os import subprocess import tempfile from scripts.test import shared from . import utils class AsyncifyTest(utils.BinaryenTestCase): def test_asyncify_js(self): def test(args): print(args) shared.run_process(shared.WASM_OPT + args + [self.input_path('asyncify-sleep.wat'), '...
apache-2.0
-1,870,686,835,276,587,000
46.719101
182
0.5757
false
nuxeh/morph
morphlib/plugins/deploy_plugin.py
1
29928
# Copyright (C) 2013-2015 Codethink Limited # # 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 2 of the License. # # This program is distributed in the hope that it will be useful, # but...
gpl-2.0
-7,916,551,351,011,835,000
42.882698
79
0.57351
false
pravsripad/jumeg
examples/connectivity/plot_grouped_connectivity_circle.py
2
1374
#!/usr/bin/env python ''' Example showing how to read grouped aparc labels from yaml file and plot grouped connectivity circle with these labels. Author: Praveen Sripad <pravsripad@gmail.com> ''' import numpy as np from jumeg import get_jumeg_path from jumeg.connectivity import plot_grouped_connectivity_circle impor...
bsd-3-clause
-3,088,841,760,635,333,600
35.157895
80
0.624454
false
buckets1337/UOMUMM
src/Renderer.py
1
5959
# Renderer.py # Various ways to format text output to players class Renderer(): ''' A renderer component just contains methods for formatting text output in various ways ''' def __init__(self, server): self.owner = server def formatMessage(self, message, width): ''' splits a <message> string into lines th...
apache-2.0
-8,190,471,305,137,985,000
28.8
161
0.52492
false
shvets/etvnet-plex-plugin
test/archive_service_test.py
1
7248
import test_helper import unittest import json from etvnet_service import EtvnetService from config import Config class EtvnetServiceTest(unittest.TestCase): def setUp(self): config = Config("../etvnet.config") self.service = EtvnetService(config) def test_channels(self): result = s...
mit
-6,844,560,154,461,055,000
27.652174
110
0.577401
false
tdlong/YeastRobot
UserPrograms/ASE/Rearray_day3_pilot_1.py
1
1439
import sys # where RobotControl.py, etc lives sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary') from RobotControl import * ################################# ### Define Deck Layout ################################# deck="""\ DW96W SW96P SW96P SW96P SW96P SW96P SW96P BLANK BLANK BLANK BLANK B...
gpl-3.0
-2,579,611,862,031,048,700
27.215686
84
0.603892
false
cchristelis/watchkeeper
django_project/healthsites/utils.py
1
1525
__author__ = 'Irwan Fathurrahman <irwan@kartoza.com>' __date__ = '25/04/16' __license__ = "GPL" __copyright__ = 'kartoza.com' import os import json from django.conf import settings from django.core.serializers.json import DjangoJSONEncoder from healthsites.map_clustering import cluster, parse_bbox from healthsites.mod...
bsd-2-clause
-7,391,638,456,330,655,000
34.465116
84
0.64
false
kmerenkov/clitter
setup.py
1
1981
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2008, Konstantin Merenkov <kmerenkov@gmail.com> # 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 cod...
bsd-3-clause
7,848,016,887,700,294,000
52.540541
91
0.745583
false
Debian/dak
daklib/termcolor.py
1
1725
# vim:set et sw=4: """ TermColor utils for dak @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2019 Mo Zhou <lumin@debian.org> @license: GNU General Public License version 2 or later """ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-2.0
-1,461,835,152,391,277,600
36.5
79
0.624928
false
alissonpintor/stoky
app/basemodel.py
1
1966
from flask_sqlalchemy import Model from sqlalchemy import exc as core_exc from sqlalchemy.orm import exc class Result(object): """ Classe que recebe o resultado """ def __init__(self, status, message): self.status = status self.message = message class BaseModel(Model): """ ...
gpl-3.0
-4,292,930,550,900,183,600
24.842105
96
0.545593
false
brigittebigi/proceed
proceed/src/wxgui/sp_icons.py
1
2562
import os.path from sp_glob import ICONS_PATH # Frames APP_ICON = os.path.join(ICONS_PATH, "app.ico") APP_CHECK_ICON = os.path.join(ICONS_PATH, "appcheck.ico") APP_EXPORT_PDF_ICON = os.path.join(ICONS_PATH, "appexport-pdf.ico") # For the toolbar of the main frame EXIT_ICON = os.path.join(IC...
gpl-3.0
8,382,389,665,049,526,000
46.444444
67
0.639344
false
wevoteeducation/WeVoteBase
import_export/models.py
1
38189
# import_export/models.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.contrib import messages from election_office_measure.models import Election, ContestOffice, CandidateCampaign, CandidateCampaignManager, \ BallotItem from exception.models import handle_exception, handle_record_not_...
mit
-4,914,318,572,167,736,000
49.581457
118
0.620152
false
bdang2012/taiga-back-casting
taiga/external_apps/serializers.py
1
2126
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-6,451,691,023,716,321,000
36.928571
83
0.733992
false
googleapis/python-firestore
tests/unit/v1/conformance_tests.py
1
14551
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
2,782,277,068,443,814,000
26.403013
87
0.647447
false
9wfox/mvc
utility.py
1
6713
# -*- coding:utf-8 -*- """ 工具 历史: 2011-08-03 + 重构 get_pys_members。 2011-08-15 * 修改 con_mongo_object,支持 objectid。 2011-08-20 + 增加 template_path, static_path。 2011-08-25 * 将参数检查函数从 loigc 转移过来。 2011-08-27 * 重构 get_pys_members,改名 get_members。 """ from dat...
mit
6,438,945,186,189,151,000
24.227273
142
0.507799
false
leanix/leanix-sdk-python
src/leanix/DocumentsApi.py
1
11645
#!/usr/bin/env python """ The MIT License (MIT) Copyright (c) 2017 LeanIX GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use,...
mit
-3,196,921,589,828,660,000
30.136364
162
0.575784
false
mvaled/sentry
src/sentry/south_migrations/0480_incidentactivity.py
1
136910
# -*- 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): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline ...
bsd-3-clause
6,805,013,253,530,824,000
94.341226
234
0.580177
false
AlphaSmartDog/DeepLearningNotes
Note-6 A3CNet/Note-6.4 HS300指数增强/agent/agent.py
1
6362
import numpy as np import tensorflow as tf from agent.forward import ActorCriticNet from params import * def batch_choice(a, p): action_list = [np.random.choice(a, p=i) for i in p] return np.array(action_list) # local network for advantage actor-critic which are also know as A2C class Agent(object): def...
mit
-5,111,055,656,513,035,000
37.095808
83
0.568375
false
saghul/shline
segments/hg.py
1
1578
def add_hg_segment(): import os import subprocess env = {"LANG": "C", "HOME": os.getenv("HOME")} def get_hg_status(): has_modified_files = False has_untracked_files = False has_missing_files = False try: output = subprocess.check_output(['hg', 'status'], e...
mit
-5,181,100,140,301,123,000
29.346154
80
0.529151
false
tpflueger/CSCI4900
scripts/main.py
1
1140
# SPDX-License-Identifier: MIT '''Usage: {0} scan (FILE) {0} dependencies (JARNAME) {0} (--help | --version) Arguments: scan Scan pom file for dependencies dependencies Show dependency tree for jarFile ''' import shutil import sys import os from dependency_reader import DependencyReader from doco...
mit
-7,091,659,358,233,557,000
27.5
63
0.670175
false
NoBodyCam/TftpPxeBootBareMetal
nova/api/openstack/compute/contrib/floating_ip_dns.py
1
10842
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Andrew Bogott for the Wikimedia Foundation # # 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...
apache-2.0
3,639,136,114,536,705,000
34.547541
78
0.590481
false
tensorflow/datasets
tensorflow_datasets/structured/movielens.py
1
17907
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
apache-2.0
1,772,383,642,943,722,500
37.592672
80
0.612833
false
SoMa-Project/ec_grasp_planner
ec_grasp_planner/src/tub_feasibility_check_interface.py
1
30753
import math import rospy import numpy as np from tf import transformations as tra from geometry_graph_msgs.msg import Node, geometry_msgs from tub_feasibility_check import srv as kin_check_srv from tub_feasibility_check.msg import BoundingBoxWithPose, AllowedCollision from tub_feasibility_check.srv import CheckKinemat...
bsd-3-clause
-5,692,163,671,882,151,000
48.126198
147
0.632426
false
harikvpy/django-popupcrud
test/tests.py
1
14507
# -*- coding: utf-8 -*- # pylint: skip-file import re import json from django.test import TestCase from django.http import JsonResponse try: from django.urls import reverse except expression as identifier: from django.core.urlresolvers import reverse import six from .models import Author, Book from .views im...
bsd-3-clause
748,750,833,190,306,800
43.894737
161
0.613337
false
brianwc/juriscraper
opinions/united_states/state/cal.py
1
1498
from juriscraper.OpinionSite import OpinionSite import re import time from datetime import date class Site(OpinionSite): def __init__(self): super(Site, self).__init__() self.url = 'http://www.courtinfo.ca.gov/cgi-bin/opinions-blank.cgi?Courts=S' self.court_id = self.__module__ def _g...
bsd-2-clause
7,258,131,139,515,015,000
34.666667
91
0.548732
false
Jav10/Python
C-digosPython/VarTipo1.py
1
1449
#Variables y tipos de datos #Autor: Javier Arturo Hernández Sosa #Fecha: 28/Ago/2017 #Descripcion: Curso Python FES Acatlán #Tipos de datos numero = 5 #Operador de asignación numero2 = 19 numeroFlotante = 25.0 cadena = "Hola Mundo" boleano1 = True boleano2 = False complejo1 = 5 - 3j complejo2 = 2 + 5j #...
mit
5,351,169,964,645,992,000
25.132075
92
0.716968
false
openstack/horizon
openstack_dashboard/dashboards/project/volumes/tests.py
1
96001
# Copyright 2012 Nebula, 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 agree...
apache-2.0
5,897,069,910,118,493,000
44.455019
79
0.577588
false
efimlosev/corpcolo
noc-ps/add_server.py
1
2912
from json_p_n import sendRecieve import pexpect,argparse from sys import path import subprocess path.append('/home/efim/Dropbox') from ipcalc_flask import calculateSubnet as calc def Main(): parser = argparse.ArgumentParser() parser.add_argument('subnet', help='Give me a subnet', type=str) #optinal argument ...
gpl-2.0
-1,418,926,991,163,073,500
40.6
127
0.650755
false
Dylan-halls/Network-Exploitation-Toolkit
PacketBlocker/ARP_UDP.py
1
2931
import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * import threading from termcolor import colored os.system("clear") print(""" ____ ___________ __________ | | \______ ______ ) | | /| | \| ___) ...
mit
-8,585,580,230,848,259,000
26.92381
118
0.493347
false
rgayon/plaso
plaso/parsers/czip.py
1
2615
# -*- coding: utf-8 -*- """This file contains a parser for compound ZIP files.""" from __future__ import unicode_literals import struct import zipfile from plaso.lib import errors from plaso.parsers import interface from plaso.parsers import logger from plaso.parsers import manager class CompoundZIPParser(interfac...
apache-2.0
3,504,794,705,852,098,000
33.407895
80
0.690631
false
enthought/depsolver
depsolver/solver/tests/scenarios/common.py
1
6526
import collections import glob import json import subprocess import tempfile import os.path as op import yaml from depsolver.bundled.traitlets \ import \ HasTraits, Dict, Instance, List, Long, Unicode from depsolver.constraints \ import \ Any, GEQ, LT from depsolver.package \ import \ ...
bsd-3-clause
-6,149,799,869,014,685,000
33.167539
101
0.650781
false
DolphinDream/sverchok
nodes/generators_extended/spiral_mk2.py
1
22191
# ##### 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
-9,002,781,532,965,027,000
32.879389
111
0.567437
false
simmetria/sentry
tests/sentry/web/frontend/projects/tests.py
1
1710
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging from django.contrib.auth.models import User from django.core.urlresolvers import reverse from sentry.constants import MEMBER_OWNER from sentry.models import Project, Team from sentry.testutils import fixture from sentry.testutils import T...
bsd-3-clause
2,186,302,857,400,867,300
27.5
96
0.649708
false
redhat-performance/tuned
tuned/daemon/controller.py
1
8767
from tuned import exports import tuned.logs import tuned.exceptions from tuned.exceptions import TunedException import threading import tuned.consts as consts from tuned.utils.commands import commands __all__ = ["Controller"] log = tuned.logs.get() class TimerStore(object): def __init__(self): self._timers = dict...
gpl-2.0
5,299,379,313,047,276,000
27.280645
161
0.671381
false
r8921039/bitcoin
test/functional/feature_segwit.py
1
36451
#!/usr/bin/env python3 # Copyright (c) 2016-2019 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 the SegWit changeover logic.""" from decimal import Decimal from io import BytesIO from test_fra...
mit
2,694,981,483,760,619,500
60.056951
224
0.656306
false
a10networks/acos-client
acos_client/tests/unit/v30/test_dns.py
1
3344
# Copyright (C) 2016, A10 Networks 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 requi...
apache-2.0
-3,787,857,098,440,864,300
40.283951
96
0.57506
false
EBI-Metagenomics/emgapi
emgapi/migrations/0028_auto_20200706_1823.py
1
1069
# -*- coding: utf-8 -*- # Generated by Django 1.11.25 on 2020-06-16 12:02 from __future__ import unicode_literals from django.db import migrations def add_checksum_algorithms(apps, schema_editor): """ Add hash algorithms: - SHA1 - SHA256 - MD5 """ ChecksumAlgorithms = apps.get_model("emga...
apache-2.0
3,405,595,739,773,955,600
24.452381
94
0.637979
false
itoijala/pyfeyner
examples/pyfeyn-test3.py
1
2416
#!/usr/bin/env python2 # # pyfeyner - a simple Python interface for making Feynman diagrams. # Copyright (C) 2005-2010 Andy Buckley, Georg von Hippel # Copyright (C) 2013 Ismo Toijala # # pyfeyner is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
gpl-2.0
8,639,295,022,185,520,000
36.75
99
0.678394
false
johnloucaides/chipsec
chipsec/module_common.py
1
3593
#!/usr/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #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 2. # #This program is distr...
gpl-2.0
2,244,424,559,796,795,000
27.515873
101
0.629001
false
mbollmann/perceptron
mmb_perceptron/feature_extractor/generator/generative_extractor.py
1
3342
# -*- coding: utf-8 -*- import numpy as np from .. import FeatureExtractor class GenerativeExtractor(FeatureExtractor): """Abstract base class for a generative feature extractor. Compared to simple feature extractors, generators perform the additional task of generating class label candidates. This mean...
mit
-3,316,705,741,891,611,600
44.162162
88
0.666966
false
openstack/cliff
cliff/help.py
1
4846
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed u...
apache-2.0
-4,748,475,090,079,885,000
37.768
79
0.554065
false
ApproxEng/approxeng.input
src/python/approxeng/input/selectbinder.py
1
6065
from functools import reduce from select import select from threading import Thread import approxeng.input.sys as sys from approxeng.input.controllers import * EV_KEY = 1 EV_REL = 2 EV_ABS = 3 class ControllerResource: """ General resource which binds one or more controllers on entry and unbinds the event l...
apache-2.0
-2,654,246,842,321,006,600
40.541096
118
0.591096
false
bcgov/gwells
app/backend/submissions/data_migrations.py
1
1059
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
apache-2.0
1,116,388,698,056,418,700
35.551724
85
0.738432
false
akshmakov/Dolfin-Fijee-Fork
test/unit/book/python/chapter_1_files/stationary/poisson/d2_p2D.py
1
1457
""" FEniCS tutorial demo program: Poisson equation with Dirichlet conditions. As d1_p2D.py, but chosing linear solver and preconditioner is demonstrated. -Laplace(u) = f on the unit square. u = u0 on the boundary. u0 = u = 1 + x^2 + 2y^2, f = -6. """ from dolfin import * # Create mesh and define function space mesh ...
gpl-3.0
-481,046,481,958,258,050
22.885246
75
0.663693
false
danielfaust/AutobahnPython
autobahn/autobahn/websocket.py
1
140218
############################################################################### ## ## Copyright 2011,2012 Tavendo GmbH ## ## 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
1,140,141,229,421,386,400
36.960267
212
0.603311
false
bruno-briner/plugin.video.brplay
resources/lib/hlsproxy/decrypter.py
1
16632
#!/usr/bin/env python # -*- coding: utf-8 -*- """Simple AES cipher implementation in pure Python following PEP-272 API Based on: https://bitbucket.org/intgr/pyaes/ to compatible with PEP-8. The goal of this module is to be as fast as reasonable in Python while still being Pythonic and readable/understandable. It is ...
gpl-3.0
-5,658,260,328,799,054,000
31.6778
79
0.61045
false
SaTa999/pyPanair
pyPanair/postprocess/agps_converter.py
1
10619
#!/usr/bin/env python import numpy as np import os def read_column(file, firstline): """read a column from first line (e.g. n01c001) to *eof""" column = list() line = firstline # register methods for faster evaluation f_readline = file.readline column_append = column.append # r...
mit
7,905,887,637,318,669,000
41.880165
104
0.512289
false
jarod-w/ocsetup
ocsetup/plugins/storage_tab.py
1
2968
#!/usr/bin/python # storage_tab.py - Copyright (C) 2012 CloudTimes, Inc. # Written by Jarod.W <work.iec23801@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; version 2 of the License...
gpl-2.0
-7,529,631,513,802,328,000
33.114943
78
0.627695
false
cqychen/quants
quants/loaddata/skyeye_ods_invest_refer_sh_margins_detail.py
1
2670
#coding=utf8 import tushare as ts; import pymysql; import time as dt from datashape.coretypes import string from pandas.io.sql import SQLDatabase import sqlalchemy import datetime from sqlalchemy import create_engine from pandas.io import sql import threading import pandas as pd; import sys sys.path.append('../') #添加配...
epl-1.0
-4,613,820,654,172,870,000
34.217391
98
0.577778
false
pfjel7/housing-insights
python/housinginsights/sources/cama.py
1
8713
# Script is deprecated, as of September 18, 2017. # zoneUnitCount now calculated with LoadData's _get_residential_units() # from pprint import pprint import os import sys import requests from collections import OrderedDict import csv import datetime PYTHON_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__)...
mit
-8,037,650,862,094,938,000
38.425339
177
0.553655
false
pmalczuk/python_scripts
disk.py
1
7360
#!/usr/bin/python2 import os, sys import getopt, datetime import platform #automatyczne przeliczenie wartosci od Bajtow w gore def GetHumanReadable(size,precision=2): suffixes=['B','KB','MB','GB','TB'] suffixIndex = 0 while size > 1024 and suffixIndex < 3: suffixIndex += 1 #increment the index of ...
gpl-3.0
-220,261,891,489,609,950
37.736842
170
0.56019
false
tokatikato/OIPA
OIPA/api/v3/resources/activity_view_resources.py
1
12434
# Tastypie specific from tastypie import fields from tastypie.constants import ALL, ALL_WITH_RELATIONS from tastypie.resources import ModelResource # Data specific from api.cache import NoTransformCache from iati.models import ContactInfo, Activity, Organisation, AidType, FlowType, Sector, CollaborationType, \ Tie...
agpl-3.0
9,049,514,736,130,169,000
43.24911
162
0.687309
false
garcia/simfile
simfile/timing/tests/test_engine.py
1
10046
from decimal import Decimal import unittest from .helpers import * from .. import * from ..engine import * class TestTimingEngine(unittest.TestCase): def test_init(self): timing_data = testing_timing_data() engine = TimingEngine(timing_data) self.assertEqual(timing_data, engine.timing_dat...
mit
-8,069,988,434,666,341,000
53.308108
88
0.646825
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/models/virtual_machine_scale_set_instance_view_statuses_summary.py
1
1313
# 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
-2,771,557,624,166,246,400
34.486486
98
0.633663
false
jtwhite79/pyemu
pyemu/utils/gw_utils.py
1
110032
"""MODFLOW support utilities""" import os from datetime import datetime import shutil import warnings import numpy as np import pandas as pd import re pd.options.display.max_colwidth = 100 from pyemu.pst.pst_utils import ( SFMT, IFMT, FFMT, pst_config, parse_tpl_file, try_process_output_file, )...
bsd-3-clause
1,953,825,560,543,366,700
36.248477
134
0.557838
false
PyGotham/pygotham
pygotham/manage/events.py
1
1920
"""Event-related management commands.""" import sys import arrow from flask import current_app from flask_script import Command, prompt, prompt_bool from werkzeug.datastructures import MultiDict from pygotham.core import db from pygotham.forms import EventForm from pygotham.models import Event class CreateEvent(Co...
bsd-3-clause
-2,552,559,807,039,151,000
28.538462
78
0.578125
false
SahilTikale/haas
examples/dbinit.py
2
1653
#!/usr/bin/python """ Register nodes with HIL. This is intended to be used as a template for either creating a mock HIL setup for development or to be modified to register real-life nodes that follow a particular pattern. In the example environment for which this module is written, there are 10 nodes which have IPMI ...
apache-2.0
1,030,338,861,592,609,900
29.611111
78
0.678766
false
jtushman/state_machine
tests.py
1
11684
import os import nose import functools from pymongo import MongoClient from nose.plugins.skip import SkipTest from nose.tools import * from nose.tools import assert_raises try: import mongoengine except ImportError: mongoengine = None def establish_mongo_connection(): mongo_name = os.environ.get('AASM_MO...
mit
-6,081,339,455,101,649,000
27.086538
103
0.619308
false
tobast/sysres-pikern
snake/snake_common.py
1
1643
SERVER_PORT = 31412 PSIZE = 20 WIDTH = 30 HEIGHT = 30 PERIOD = 100 def p2add(u, v): return (u[0] + v[0], u[1] + v[1]) DIRS = [(0, 1), (1, 0), (-1, 0), (0, -1)] NB_APPLES = 3 class Packet: def __init__(self, data = b''): self.start_index = 0 self.data = data def add_position(self, p): ...
gpl-3.0
71,077,579,929,375,590
20.906667
55
0.522215
false
verdurin/bcbio-nextgen
bcbio/structural/cnvkit.py
1
21743
"""Copy number detection with CNVkit with specific support for targeted sequencing. http://cnvkit.readthedocs.org """ import copy import os import shutil import sys import tempfile import pybedtools import numpy as np import toolz as tz from bcbio import install, utils from bcbio.bam import ref from bcbio.distribute...
mit
399,970,227,852,909,060
43.103448
103
0.589109
false
tietokilta-saato/tikplay
tikplay/server.py
1
5529
import json import os from hashlib import sha1 from flask import request, jsonify, current_app from flask.ext.restful import Resource import time from werkzeug.utils import secure_filename import traceback from audio import play_file from provider.provider import Provider from provider.task import TaskState from util...
mit
5,394,548,310,711,186,000
33.773585
119
0.584012
false
jolyonb/edx-platform
lms/djangoapps/course_api/blocks/tests/test_forms.py
1
8460
""" Tests for Course Blocks forms """ from urllib import urlencode import ddt from django.http import Http404, QueryDict from opaque_keys.edx.locator import CourseLocator from rest_framework.exceptions import PermissionDenied from openedx.core.djangoapps.util.test_forms import FormTestMixin from student.models import...
agpl-3.0
6,443,629,654,869,371,000
34.39749
114
0.635697
false
serika00/shadowsocks
shadowsocks/common.py
1
9079
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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 requi...
apache-2.0
8,077,218,631,892,797,000
30.524306
79
0.544223
false
encukou/freeipa
ipatests/test_ipalib/test_x509.py
2
16469
# Authors: # Rob Crittenden <rcritten@redhat.com> # # Copyright (C) 2010 Red Hat # see file 'COPYING' for use and warranty information # # 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...
gpl-3.0
-8,210,279,496,332,169,000
41.776623
79
0.744247
false
famish99/pyvisa-sim
pyvisa_sim/tcpip.py
1
2280
# -*- coding: utf-8 -*- """ pyvisa-sim.tcpip ~~~~~~~~~~~~~~~~ TCPIP simulated session class. :copyright: 2014 by PyVISA-sim Authors, see AUTHORS for more details. :license: MIT, see LICENSE for more details. """ import time from pyvisa import constants from . import sessions class BaseTCPIPSes...
mit
-8,203,132,260,625,480,000
29.4
87
0.623684
false
waynewolf/abucket
from-tf-web/quickstart/1-get-started-tf-contrib-learn-customize.py
1
1494
import numpy as np import tensorflow as tf # Declare list of features, we only have one real-valued feature def model(features, labels, mode): # Build a linear model and predict values W = tf.get_variable("W", [1], dtype=tf.float64) b = tf.get_variable("b", [1], dtype=tf.float64) y = W*features['x'] + b # Los...
mit
-8,651,862,507,716,371,000
37.307692
90
0.670683
false
MadsJensen/agency_connectivity
tf_functions.py
1
5293
""" Functions for TF analysis. @author: mje @email: mads [] cnru.dk """ import mne from mne.time_frequency import (psd_multitaper, tfr_multitaper, tfr_morlet, cwt_morlet) from mne.viz import iter_topography import matplotlib.pyplot as plt import numpy as np def calc_psd_epochs(epochs...
bsd-3-clause
6,559,354,453,207,024,000
27.005291
79
0.543737
false
termNinja/Conversion-of-Regex-into-Automatons
pyscripts/classes/resources.py
1
18835
import re, os, sys from Queue import Queue # ----------------------------------------------------------------------------- class term_colors: """ Usage: print term_colors.WARNING + "This is a msg" + term_colors.ENDC """ HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m...
gpl-3.0
-8,287,676,522,294,573,000
38.239583
109
0.45219
false
saurabh6790/frappe
frappe/core/doctype/user/user.py
1
39931
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, print_function from bs4 import BeautifulSoup import frappe import frappe.share import frappe.defaults import frappe.permissions from frappe.model.document import Document from ...
mit
-1,635,436,983,036,877,300
31.306634
213
0.69565
false
jacebrowning/dropthebeat
setup.py
1
2371
#!/usr/bin/env python """Setup script for DropTheBeat.""" import os import sys import setuptools PACKAGE_NAME = 'dtb' MINIMUM_PYTHON_VERSION = 3, 4 def check_python_version(): """Exit when the Python version is too low.""" if sys.version_info < MINIMUM_PYTHON_VERSION: sys.exit("Python {}.{}+ is r...
lgpl-3.0
5,393,324,607,916,161,000
29.397436
78
0.609869
false
MeanEYE/Sunflower
sunflower/gui/preferences/toolbar.py
1
8025
import json from gi.repository import Gtk from sunflower.widgets.settings_page import SettingsPage class Column: NAME = 0 DESCRIPTION = 1 TYPE = 2 ICON = 3 CONFIG = 4 class ToolbarOptions(SettingsPage): """Toolbar options extension class""" def __init__(self, parent, application): SettingsPage.__init__(se...
gpl-3.0
-8,279,819,229,029,512,000
30.470588
91
0.694704
false