repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
brohrer/becca_ros
nodes/agent_node.py
1
2432
#!/usr/bin/env python import numpy as np import rospy from std_msgs.msg import String from becca_ros.msg import * from becca.core.agent import Agent class AgentNode(): def __init__(self): restore = True world_initialized = False while not (world_initialized): if rospy.get_param...
mit
-8,626,491,577,455,195,000
39.533333
76
0.610609
false
4.129032
false
false
false
sissaschool/xmlschema
xmlschema/validators/notations.py
1
1526
# # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
mit
-7,948,054,479,086,276,000
28.346154
87
0.631062
false
3.815
false
false
false
isnowfy/snownlp
snownlp/sim/bm25.py
7
1443
# -*- coding: utf-8 -*- from __future__ import unicode_literals import math class BM25(object): def __init__(self, docs): self.D = len(docs) self.avgdl = sum([len(doc)+0.0 for doc in docs]) / self.D self.docs = docs self.f = [] self.df = {} self.idf = {} s...
mit
-8,927,470,298,898,820,000
27.294118
71
0.435204
false
3.562963
false
false
false
CTSRD-CHERI/u-boot
tools/binman/etype/vblock.py
5
3159
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2018 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # Support for a Chromium OS verified boot block, used to sign a read-write # section of the image. from collections import OrderedDict import os from binman.entry import Entry, EntryArg from dtoc impor...
gpl-2.0
4,337,053,200,046,043,600
38.4875
79
0.617284
false
3.993679
false
false
false
oksome/Tumulus
setup.py
1
2102
# -*- coding: utf-8 -*- # This file is part of Tumulus. # # Copyright (C) 2013 OKso (http://okso.me) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
agpl-3.0
3,843,013,790,277,440,500
41.897959
85
0.623692
false
4.379167
false
false
false
SciLifeLab/genomics-status
status/user_preferences.py
1
1433
import tornado.web import json import time import copy import base64 import requests from status.util import SafeHandler from status.projects import PresetsHandler as ph class UserPrefPageHandler(SafeHandler): """ Serves a modal with user preferences and saves them URL: /userpref """ def get(self): ...
mit
200,218,935,690,804,740
33.119048
128
0.675506
false
3.712435
false
false
false
Ircam-Web/mezzanine-organization
organization/job/migrations/0004_candidacy.py
1
3355
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-09-30 10:50 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mezzanine.core.fields class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_con...
agpl-3.0
1,642,542,477,276,891,100
70.382979
253
0.645007
false
4.157373
false
false
false
jbloomlab/dms_tools2
tests/test_dssp.py
1
1099
"""Tests `dms_tools2.dssp` module.""" import os import unittest import numpy import pandas import dms_tools2.dssp class test_processDSSP(unittest.TestCase): """Tests `dms_tools2.dssp.processDSSP`.""" def test_processDSSP(self): """Tests `dms_tools2.dssp.processDSSP`.""" testdir = os.path.jo...
gpl-3.0
-5,734,523,575,777,582,000
33.34375
81
0.604186
false
3.261128
true
false
false
dahaic/outerspace
server/lib/medusa/filesys.py
2
13242
# -*- Mode: Python; tab-width: 4 -*- # $Id$ # Author: Sam Rushing <rushing@nightmare.com> # # Generic filesystem interface. # # We want to provide a complete wrapper around any and all # filesystem operations. # this class is really just for documentation, # identifying the API for a filesystem object. # openi...
gpl-2.0
-7,760,936,704,069,886,000
27.416309
88
0.518577
false
3.653974
false
false
false
klette/pyroutes
pyroutes/http/request.py
1
5102
# encoding: utf-8 """ This module contains only the Request class, a key class in pyroutes. Request objects hold all meta about incoming requests. """ from cgi import parse_qsl, FieldStorage from pyroutes.http.cookies import RequestCookieHandler try: from cStringIO import StringIO except ImportError: from S...
gpl-2.0
-4,441,000,111,228,115,500
33.472973
77
0.558212
false
4.202636
false
false
false
tyarkoni/transitions
transitions/extensions/nesting.py
2
49675
# -*- coding: utf-8 -*- from collections import OrderedDict, defaultdict import copy from functools import partial, reduce import inspect import logging from six import string_types from ..core import State, Machine, Transition, Event, listify, MachineError, Enum, EnumMeta, EventData _LOGGER = logging.getLogger(__na...
mit
-5,864,972,012,769,849,000
47.746811
146
0.565136
false
4.422454
false
false
false
glu10/trough
mainWindow.py
1
7901
""" Trough - a GTK+ RSS news reader Copyright (C) 2015 Andrew Asp This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
gpl-3.0
-6,444,048,257,782,608,000
34.751131
87
0.619542
false
3.974346
false
false
false
openqt/algorithms
leetcode/python/ac/lc844-backspace-string-compare.py
1
1884
# coding=utf-8 import unittest """844. Backspace String Compare https://leetcode.com/problems/backspace-string-compare/description/ Given two strings `S` and `T`, return if they are equal when both are typed into empty text editors. `#` means a backspace character. **Example 1:** **Input:** S = "ab#c"...
gpl-3.0
-7,044,472,968,458,829,000
19.478261
75
0.514862
false
3.276522
false
false
false
jantman/reviewboard-scripts
submit_review.py
1
2979
#!/usr/bin/env python """ A script using the ReviewBoard API Client <https://pypi.python.org/pypi/RBTools/0.2> <http://www.reviewboard.org/docs/rbtools/dev/api/> to submit the review for a specific branch, at a specific commit. requires: rbtools GitPython """ from rbtools.api.client import RBClient import optpar...
mit
-8,580,810,473,810,728,000
32.1
101
0.634777
false
3.709838
false
false
false
rthille/silk
django_silky/silk/code_generation/django_test_client.py
8
1696
import urllib import autopep8 import jinja2 # noinspection PyUnresolvedReferences from six.moves.urllib.parse import urlencode from silk.profiling.dynamic import is_str_typ from silk.profiling.profiler import silk_profile template = """ from django.test import Client c = Client() response = c.{{ lower_case_method }}...
mit
-438,907,746,481,306,800
31.634615
119
0.589623
false
3.889908
false
false
false
beckdaniel/GPy
GPy/inference/latent_function_inference/exact_gaussian_inference.py
8
2785
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) from .posterior import Posterior from ...util.linalg import pdinv, dpotrs, tdot from ...util import diag import numpy as np from . import LatentFunctionInference log_2_pi = np.log(2*np.pi) class Exac...
bsd-3-clause
-4,712,664,156,282,809,000
33.8125
141
0.619749
false
3.197474
false
false
false
johannwalder/content-reputation
server/app/server.py
1
4154
#!flask/bin/python from flask import Flask, jsonify, abort, make_response from flask.ext.restful import Api, Resource, reqparse, fields, marshal from flask.ext.httpauth import HTTPBasicAuth from flask.ext.sqlalchemy import SQLAlchemy import sys import os sys.path.append(os.path.abspath('../models')) sys.path.append(o...
apache-2.0
5,753,444,572,748,254,000
34.20339
118
0.656716
false
3.725561
false
false
false
skidekeersmaecker/raspi-cursus
labo3/tool.py
1
1946
#!/usr/bin/python import time import datetime try: f = open('ActivatedAlarmTimes.log', 'r') lines = f.readlines() f.close() start = True while(start == True): method = raw_input("Enter what method you want to use to clean the log file. Delete line per line: 'line', or delete per date ...
mit
-5,257,493,199,664,969,000
27.202899
172
0.584789
false
3.031153
false
false
false
suzannerohrback/somaticCNVpipeline
bin/segment/segmentfile.py
1
1630
#!/usr/bin/python import sys import os import inspect import subprocess as sub import shlex currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0, parentdir) import config as cfg def writeMatlabScript(sample, species,...
mit
4,090,381,019,973,567,000
19.123457
86
0.674847
false
2.900356
false
false
false
speedyGonzales/highchart_examples
highchart_examples/highchart_examples/settings.py
1
2499
""" Django settings for highchart_examples project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_D...
gpl-2.0
4,479,322,939,957,160,000
25.03125
99
0.715486
false
3.212082
false
false
false
adamrvfisher/TechnicalAnalysisLibrary
MoveToDatabaseMod.py
1
7161
# -*- coding: utf-8 -*- """ Created on Sun Jun 11 19:26:12 2017 @author: AmatVictoriaCuramIII """ import numpy as np import pandas as pd temp = pd.read_pickle('/Users/AmatVictoriaCuramIII/Desktop/PythonFiles/QQQAGGAdvice07_50') ranger = range(0,len(temp['Adj Close'])) index = temp.index #transfer to database modifica...
apache-2.0
6,850,816,351,955,829,000
41.630952
91
0.623796
false
2.961538
false
false
false
israeleriston/scientific-week
backend/venv/lib/python3.5/site-packages/flake8/plugins/_trie.py
6
3003
"""Independent implementation of a Trie tree.""" __all__ = ('Trie', 'TrieNode') def _iterate_stringlike_objects(string): for i in range(len(string)): yield string[i:i + 1] class Trie(object): """The object that manages the trie nodes.""" def __init__(self): """Initialize an empty trie....
mit
-6,228,070,058,706,080,000
29.958763
76
0.590077
false
4.333333
false
false
false
nhicher/ansible
test/units/module_utils/test_database.py
75
4393
import pytest from ansible.module_utils.database import ( pg_quote_identifier, SQLParseError, ) # These are all valid strings # The results are based on interpreting the identifier as a table name VALID = { # User quoted '"public.table"': '"public.table"', '"public"."table"': '"public"."table"', ...
gpl-3.0
5,451,291,193,281,736,000
42.93
120
0.631004
false
3.73237
true
false
false
cmu-db/cmdbac
core/scripts/vagrant_deploy.py
2
2528
#!/usr/bin/env python import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)) os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cmudbac.settings") import django django.setup() from library.models import * from depl...
apache-2.0
-2,989,338,068,663,246,000
32.276316
132
0.658228
false
3.611429
false
false
false
rPawel/Tomboy2Evernote
Tomboy2Evernote.py
1
6982
#!/usr/bin/python # -*- coding: UTF-8 -*- import re import sys, getopt import glob import os def process_files(inputdir, outputdir): os.chdir(inputdir) enex_notes = [] output_filename = 'Tomboy2Evernote.enex' i = 0 for file in glob.glob("*.note"): note_file_path = inputdir + '/' + file ...
mit
6,535,413,119,255,935,000
33.058537
145
0.569608
false
2.926236
false
false
false
sajithshetty/SLAE32
additional/ARC4_Crypter/ARC4.py
1
1129
#!/usr/bin/python from Crypto.Cipher import ARC4 from ctypes import * # shellcode to give /bin/sh using execve sys call shell_code = ("\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80") #i want to display the encrypted and decrypted shellcode in hex format so crea...
cc0-1.0
-425,334,183,363,040,700
26.536585
117
0.671391
false
2.700957
false
false
false
Alwnikrotikz/kegbot
pykeg/src/pykeg/web/middleware.py
1
2140
# Copyright 2011 Mike Wakerly <opensource@hoho.com> # # This file is part of the Pykeg package of the Kegbot project. # For more information on Pykeg or Kegbot, see http://kegbot.org/ # # Pykeg is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
gpl-2.0
2,266,068,532,907,021,300
32.4375
72
0.713551
false
3.821429
false
false
false
roytang121/Facebook-AutoPoke
autopoke.py
1
1957
#!/usr/bin/ import urllib2, urllib from bs4 import BeautifulSoup import getpass from cookielib import CookieJar import time import re def getlsd(soup): return soup.find('input', {'name':'lsd'})['value'] def get_lgnrnd(soup): return soup.find('input', {'name':'lgnrnd'})['value'] def get_lgnjs(soup): return soup.f...
apache-2.0
369,400,945,964,829,060
22.865854
67
0.652529
false
2.783784
false
false
false
bwhite/hadoopy
tests/typedbytes_experiments/speedtest.py
1
1417
import glob import subprocess import time import typedbytes import cStringIO as StringIO import itertools def parse_tb(val): fp = StringIO.StringIO(val) for x in typedbytes.PairedInput(fp): yield x def time_script(script_name, data): st = time.time() p = subprocess.Popen(('python %s' % scrip...
gpl-3.0
-2,890,003,913,588,215,300
32.738095
86
0.468596
false
3.25
false
false
false
awdeorio/mailmerge
mailmerge/__main__.py
1
12757
""" Command line interface implementation. Andrew DeOrio <awdeorio@umich.edu> """ from __future__ import print_function import sys import time import codecs import textwrap import click from .template_message import TemplateMessage from .sendmail_client import SendmailClient from . import exceptions from . import util...
mit
-3,540,119,977,301,396,500
31.963824
79
0.583601
false
4.006595
true
false
false
ndawe/pyAMI
pyAMI/objects.py
1
2622
from string import rjust from cStringIO import StringIO class DatasetInfo(object): def __init__(self, dataset): self.dataset = dataset self.info = {} self.extra = {} self.comments = {} self.properties = {} def __repr__(self): return self.__str__() def _...
gpl-3.0
5,222,235,472,499,969,000
29.488372
106
0.455378
false
4.414141
false
false
false
heuermh/ga4gh-schemas
scripts/process_schemas.py
1
10053
""" A script to generate the schemas for the GA4GH protocol. These are generated from a copy of the Protocol Buffers schema and use it to generate the Python class definitions. These are also stored in revision control to aid Travis building. """ from __future__ import division from __future__ import print_function fro...
apache-2.0
-7,433,448,057,057,686,000
37.370229
79
0.598627
false
4.076642
false
false
false
flgiordano/netcash
+/google-cloud-sdk/lib/surface/compute/instance_groups/managed/get_named_ports.py
1
3282
# Copyright 2015 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...
bsd-3-clause
2,675,059,091,715,991,600
36.295455
78
0.73309
false
4.046856
false
false
false
aitmlouk/Mon_PFE_Resources
Ticket_module/ticket.py
1
4247
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2012-2013 Ait Mlouk Addi (<http://aitmlouk.esy.es/>). # This program is free software: y...
agpl-3.0
-4,533,865,454,226,342,400
40.194175
149
0.583549
false
3.654608
false
false
false
JianfengYao/thefuck
tests/rules/test_ssh_known_host.py
1
2591
import os import pytest from mock import Mock from thefuck.rules.ssh_known_hosts import match, get_new_command,\ remove_offending_keys from tests.utils import Command @pytest.fixture def ssh_error(tmpdir): path = os.path.join(str(tmpdir), 'known_hosts') def reset(path): with open(path, 'w') as fh...
mit
-1,090,053,225,910,422,300
36.014286
94
0.652644
false
3.283904
true
false
false
crestify/crestify
crestify/services/tab.py
1
1304
from crestify.models import Tab, db import shortuuid import json import datetime def new(user_id, tabs, title): tabs = json.loads(tabs) new_tabs = Tab() new_tabs.user = user_id new_tabs.id = shortuuid.uuid() new_tabs.title = title new_tabs.tabs = tabs new_tabs.added_on = datetime.datetime....
bsd-3-clause
-5,377,935,641,667,188,000
22.285714
95
0.553681
false
3.73639
false
false
false
ylcolala/yelp-image-classification
yelpimages/yelpimages/spiders/yelp_spider.py
2
1975
import scrapy import json from yelpimages.items import YelpimagesItem class DemoSpider(scrapy.Spider): name = "yelpdemo" allowed_domains = ["yelp.com"] base_url = "http://www.yelp.com/biz_photos/" start_urls = [] next_page = ["?start=100", "?start=200", "?start=300"] tacodeli = ["tacodeli-...
mit
-4,021,232,041,586,784,000
31.377049
127
0.560506
false
3.144904
false
false
false
wenbin5/Benson
_helper.py
1
3871
""" _helper.py helper mehtods and other stuff for modules to import. """ __all__ = [ 'QUADRANT1', 'QUADRANT2', 'QUADRANT3', 'QUADRANT4', 'QUADRANTS', 'set_quadrant', 'set_quadrants', 'speak', ] import os from gtts import gTTS from sense_hat import SenseHat ALPHANUMERICS = { '0': (2, 5, 7, 9, 11, 14), ...
mit
-2,225,324,213,157,696,300
28.557252
66
0.461121
false
2.233699
false
false
false
sonicpp/Dune-game-translations
utils/font.py
1
4878
#!/usr/bin/env python3 """ font.py - font util for DUNECHAR file (extracted from DUNECHAR.HSQ) this util can: - dump current DUNECHAR file into image - load new character font from image into DUNECHAR file """ import sys import argparse from PIL import Image __author__ = "Jan Havran" DUMP_WIDTH = 16 DUMP_HEIGHT...
gpl-2.0
-7,565,710,109,822,217,000
27.196532
126
0.651087
false
2.665574
false
false
false
mantidproject/mantid
scripts/Interface/ui/drill/presenter/DrillExportPresenter.py
3
1586
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2020 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + class DrillExportPresenter: """ Ex...
gpl-3.0
-2,078,911,663,853,081,900
28.924528
73
0.602144
false
4.035623
false
false
false
unioslo/cerebrum
Cerebrum/modules/no/uio/voip/voipService.py
1
6129
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright 2010 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
gpl-2.0
-7,525,202,465,252,237,000
31.089005
88
0.593082
false
3.951644
false
false
false
PhoenixBureau/PigeonComputer
pigeon/xerblin/world.py
1
12211
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2012 Simon Forman # # This file is part of Pigeon Computer. # # Pigeon Computer 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, eith...
gpl-3.0
9,156,978,142,784,432,000
31.473404
77
0.669451
false
4.168658
false
false
false
martazaryn/green-roofs-mappping
Green_Roof_MapPy/warsaw/migrations/0003_populate.py
1
1460
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from warsaw.models import City, District def populate(apps, schema_editor): warsaw = City.objects.create(name="Warsaw") District.objects.create(name="Wola", city=warsaw) District.objects.create(name="Śródmieś...
mit
652,288,227,889,083,900
36.973684
63
0.717949
false
2.702247
false
false
false
FrodeSolheim/fs-uae-launcher
launcher/settings/monitorbutton.py
1
2603
from fsbc.application import app from fsui import Image, ImageButton from launcher.i18n import gettext from launcher.launcher_settings import LauncherSettings class MonitorButtonBase: def __init__(self, parent, icons): super().__init__(parent, icons) self.icons = icons self.monitor = "" ...
gpl-2.0
902,271,721,908,237,000
32.805195
81
0.552824
false
4.029412
false
false
false
gdietz/OpenMEE
interaction.py
1
1181
''' Created on Jan 11, 2014 @author: George ''' class Interaction: def __init__(self, list_of_vars): self.combination = set(list_of_vars) def __str__(self): covs_in_order = sorted(self.combination, key=lambda cov: cov.get_label()) cov_labels = [cov.get_label() for cov in covs_...
gpl-3.0
-66,774,486,340,107,630
32.771429
95
0.590178
false
3.514881
false
false
false
Davenport-Physics/RelaxAuto
Src/main.py
1
9214
#!/usr/bin/env python # -*- coding: utf-8 -*- # # main.py # # Copyright 2014 Michael Davenport <Davenport.physics@gmail.com> # # 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 witho...
mit
-5,926,839,145,691,837,000
30.447099
120
0.735837
false
3.751629
true
false
false
tturowski/gwide
gwide/scripts/sam2deletions.py
1
2149
#!/usr/bin/env python import sys, re import pandas as pd filepath = sys.argv[1] df1_temp = pd.read_csv(filepath, sep="\t", names=['QNAME','FLAG','RNAME','POS','MAPQ','CIGAR','RNEXT','PNEXT','TLEN','SEQ','QUAL']) df2_comments = df1_temp[df1_temp['QNAME'].str.contains('^@')] #header line start with @ df3_deletions = df1...
apache-2.0
2,566,409,490,479,103,500
45.73913
140
0.672406
false
2.659653
false
false
false
abutcher/Taboot
taboot/util.py
1
3800
# -*- coding: utf-8 -*- # Taboot - Client utility for performing deployments with Func. # Copyright © 2009-2011, Red Hat, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
-991,396,593,952,565,100
33.536364
78
0.615162
false
4.133841
false
false
false
euripedesrocha/gizflo
gizflo/extintf/_sdram.py
2
2364
from ._clock import Clock from ._extintf import _extintf class SDRAM(_extintf): """ Define the interface to SDRAMs. This includes single and double data rate SDRAMs. """ # the timing atrribute captures all the time fields of the # SDRAM controller. These are used to setup the constrai...
lgpl-3.0
-4,910,137,506,969,989,000
32.771429
76
0.554992
false
3.560241
false
false
false
sakishinoda/tf-ssl
vat_ladder/config.py
1
1480
from argparse import Namespace p = Namespace() p.id = "full" p.logdir = "train/mlpgamma/" p.ckptdir = "train/mlpgamma/" p.write_to = "description" p.do_not_save = None p.verbose = True p.dataset = "mnist" p.input_size = 784 p....
mit
2,086,109,220,761,961,700
24.084746
54
0.477027
false
2.266462
false
true
false
jinzishuai/learn2deeplearn
deeplearning.ai/C4.CNN/week1_foundations/hw/hw1a.py
1
38303
#!/usr/bin/python3 # coding: utf-8 # # Convolutional Neural Networks: Step by Step # # Welcome to Course 4's first assignment! In this assignment, you will implement convolutional (CONV) and pooling (POOL) layers in numpy, including both forward propagation and (optionally) backward propagation. # # **Notation**: #...
gpl-3.0
8,197,801,481,799,372,000
36.275828
590
0.60285
false
3.186021
false
false
false
xz/cyber-security
api/run.py
10
1269
#!/usr/bin/python3 """ picoCTF API Startup script """ import api from argparse import ArgumentParser from api.app import app def main(): """ Runtime management of the picoCTF API """ parser = ArgumentParser(description="picoCTF API configuration") parser.add_argument("-v", "--verbose", action="...
mit
3,113,173,394,285,297,000
29.214286
121
0.675335
false
3.721408
false
false
false
astraw/mplsizer
demo/demo_gridsizer2.py
2
1658
import pylab import numpy # Demonstration of MplGridSizer use. def labelax(ax,label): ax.text(0.5,0.5,label, horizontalalignment='center', verticalalignment='center', transform = ax.transAxes, ) fig = pylab.figure(figsize=(8,6)) # Axes placement doesn't matter, but to...
mit
-2,350,235,128,957,835,300
29.703704
81
0.623643
false
3.128302
false
false
false
swegener/gruvi
tests/perf_dbus.py
2
1878
# # This file is part of Gruvi. Gruvi is free software available under the # terms of the MIT license. See the file "LICENSE" that was provided # together with this source file for the licensing terms. # # Copyright (c) 2012-2014 the Gruvi authors. See the file "AUTHORS" for a # complete list. from __future__ import a...
mit
1,150,178,752,588,408,600
30.3
73
0.613419
false
3.590822
true
false
false
ScreamingUdder/mantid
qt/python/mantidqt/widgets/algorithmselector/model.py
1
2905
from __future__ import absolute_import, print_function from mantid import AlgorithmFactory class AlgorithmSelectorModel(object): """ This is a model for the algorithm selector widget. """ algorithm_key = '_' def __init__(self, presenter, include_hidden=False): """ Initialise a ne...
gpl-3.0
-8,020,683,523,555,640,000
38.256757
85
0.546299
false
5.017271
false
false
false
bauerca/BikeShareDemand_Carl
lr.py
1
4253
import numpy import pandas import pylab import datetime import sys from sklearn import linear_model date_format = '%Y-%m-%d %H:%M:%S' train = numpy.genfromtxt('train.csv', delimiter=',') data = pandas.read_csv('train.csv') dates = [datetime.datetime.strptime(s, date_format) for s in data['datetime']] hours = [date.h...
gpl-2.0
-8,964,259,412,971,205,000
24.775758
123
0.675288
false
2.937155
false
false
false
danforthcenter/plantcv
plantcv/plantcv/crop_position_mask.py
2
6940
# Crop position mask import cv2 import numpy as np import math import os from plantcv.plantcv import print_image from plantcv.plantcv import plot_image from plantcv.plantcv import fatal_error from plantcv.plantcv import params def crop_position_mask(img, mask, x, y, v_pos="top", h_pos="right"): """Crop position ...
mit
-4,923,069,766,332,989,000
30.261261
109
0.493804
false
3.177656
false
false
false
informatics-isi-edu/volspy
volspy/data.py
1
6008
# # Copyright 2014-2017 University of Southern California # Distributed under the (new) BSD License. See LICENSE.txt for more info. # """Volume data support. Volume data is loaded as an ND-array with axes ZYXC and shape (D,H,W,C) using available volumetric image file readers. The ImageCropper class encapsulates the...
bsd-3-clause
-1,659,263,990,849,402,400
32.943503
123
0.570406
false
3.433143
false
false
false
ricardosiri68/patchcap
PatchMan/device.py
1
3252
from timeit import default_timer as timer import base64 import logging import os import stat import sys import time try: import urllib.request as urllib2 import urllib.parse as urlparse except ImportError: import urllib2 import urlparse from gi.repository import Gst, GObject logger = logging.getLogge...
gpl-2.0
-5,379,833,639,723,896,000
31.19802
88
0.588561
false
3.444915
false
false
false