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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
highlanderkev/kpw.org | kpw-org/models/db_cv.py | 1 | 4052 | # coding: utf8
# database definitions for Resume/CV
import datetime
#functions
# method to format datetime (month, year)
def get_datemonthyear(datetimeobject):
if(isinstance(datetimeobject, datetime.datetime)):
datestring = datetimeobject.strftime("%b, %Y")
else:
datestring = "Present"
re... | mit | -5,319,094,602,103,853,000 | 40.773196 | 292 | 0.595015 | false | 4.101215 | false | false | false |
CospanDesign/python | image_processor/opencv_harris_test.py | 1 | 1036 | #! /usr/bin/env python
import cv2
import numpy as np
import matplotlib.pyplot as plt
from image_processor import *
print (TCOLORS.PURPLE + "OpenCV Harris Corner Detector" + TCOLORS.NORMAL)
try:
filename = FILENAME
except NameError:
#filename = 'chessboard.png'
#filename = 'chessboard.jpg'
filename ... | mit | -5,987,819,224,404,294,000 | 21.042553 | 84 | 0.659266 | false | 2.943182 | false | false | false |
lixun910/pysal | pysal/lib/weights/tests/test_adjlist.py | 1 | 3719 | import unittest as ut
import numpy as np
from .. import adjtools as adj
from ... import weights
from ... import io
from ... import examples
from ..util import lat2W
from ...common import RTOL, ATOL
from ... import io
from ...examples import get_path
try:
import pandas
import geopandas
PANDAS_MISSING = Fals... | bsd-3-clause | -988,909,902,415,660,200 | 39.868132 | 82 | 0.56655 | false | 3.449907 | true | false | false |
ldgeo/qgisws | banskel/projector.py | 1 | 1548 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function, absolute_import, division
# -----------------------------------------------------------------------------
# imports
# -----------------------------------------------------------------------------
from PyQt4.QtCore im... | gpl-3.0 | 2,188,078,431,381,308,400 | 29.352941 | 82 | 0.334625 | false | 6.046875 | false | false | false |
openstack/manila | manila/share/drivers/huawei/v3/connection.py | 1 | 77535 | # Copyright (c) 2015 Huawei Technologies Co., Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | 8,152,213,583,498,359,000 | 40.640709 | 79 | 0.528742 | false | 4.168548 | true | false | false |
sio2project/oioioi | oioioi/suspendjudge/tests.py | 1 | 3682 | from celery.exceptions import Ignore
from django.urls import reverse
from oioioi.base.tests import TestCase
from oioioi.contests.models import Contest, ProblemInstance, Submission
from oioioi.evalmgr.tasks import create_environ
from oioioi.programs.controllers import ProgrammingContestController
from oioioi.suspendjud... | gpl-3.0 | 8,485,157,674,867,102,000 | 32.779817 | 86 | 0.599674 | false | 3.925373 | true | false | false |
glastopf/conpot | conpot/helpers.py | 1 | 2420 | """
Some python3 fixtures - helper methods for handy conversions + fix ssl
"""
from datetime import datetime
from slugify import slugify
def sanitize_file_name(name, host, port):
"""
Ensure that file_name is legal. Slug the filename and store it onto the server.
This would ensure that there are no duplica... | gpl-2.0 | -1,066,616,978,170,698,500 | 33.098592 | 169 | 0.643388 | false | 3.310534 | false | false | false |
quaddra/engage | python_pkg/engage/drivers/standard/postgresql_org_apt_repository__any/driver.py | 1 | 4567 |
"""Resource manager for using the add-apt-repository command (part of the
python-software-properties package).
"""
# Common stdlib imports
import sys
import os
import os.path
import re
import glob
# fix path if necessary (if running from source or running as test)
try:
import engage.utils
except:
sys.exc... | apache-2.0 | -5,347,751,177,552,373,000 | 31.856115 | 102 | 0.657105 | false | 3.752671 | false | false | false |
CDE-UNIBE/qcat | apps/configuration/management/commands/sync_institutions.py | 1 | 2152 | from django.core.cache import cache
from django.core.management.base import BaseCommand
from accounts.client import WocatWebsiteUserClient
from configuration.models import Institution, Country
from configuration.conf import settings
class Command(BaseCommand, WocatWebsiteUserClient):
created = []
updated = ... | apache-2.0 | -2,429,032,213,433,591,300 | 29.742857 | 75 | 0.623606 | false | 4.083491 | false | false | false |
timpalpant/DJNet | process.py | 1 | 2050 | #!/usr/bin/env python
'''
Print edges in the DJ network
(DJ, artist, remixer, date)
'''
import sys, re, csv
from datetime import datetime
import cPickle as pickle
prefix_pattern = re.compile(r'\[.*\] ')
remix_pattern = re.compile(r'\(.*\)')
mix_pattern = re.compile(r'ix')
def get_mix_date(mix_name):
date_string... | gpl-3.0 | 4,746,001,673,086,992,000 | 32.080645 | 80 | 0.548293 | false | 3.510274 | false | false | false |
xaxa89/mitmproxy | mitmproxy/websocket.py | 1 | 3794 | import time
from typing import List, Optional
from mitmproxy import flow
from mitmproxy.net import websockets
from mitmproxy.types import serializable
from mitmproxy.utils import strutils
class WebSocketMessage(serializable.Serializable):
def __init__(
self, type: int, from_client: bool, content: bytes, ... | mit | 1,807,927,366,774,921,500 | 36.564356 | 101 | 0.641803 | false | 4.066452 | false | false | false |
stefanbraun-private/pyVisiToolkit | src/misc/Blinkenlights_Emulator.py | 1 | 10929 | #!/usr/bin/env python
# encoding: utf-8
"""
misc.Blinkenlights_Emulator.py
emulates display for Blinkenlights movies in Grafikeditor
(this script needs its counterparts in DMS and a special PSC file)
ideas for improvements:
-Blinkenlights file selection via dropdown GUI element in PSC file
-implement all four specifi... | gpl-3.0 | -7,716,706,849,847,070,000 | 32.839009 | 239 | 0.717815 | false | 3.000824 | false | false | false |
dachary/ceph-deploy | ceph_deploy/sudo_pushy.py | 1 | 1540 | import pushy.transport.ssh
import pushy.transport.local
import os, shutil, subprocess, sys
class Local_Popen(pushy.transport.local.Popen):
def __init__(self, command, address, **kwargs):
pushy.transport.BaseTransport.__init__(self, address)
self.__proc = subprocess.Popen(command, stdin=subpro... | mit | 1,720,801,712,168,983,000 | 29.8 | 70 | 0.599351 | false | 4.084881 | false | false | false |
mikma/tmtp | backbodice.py | 2 | 22377 | #!/usr/bin/python
#
# Back Bodice Block Pattern Inkscape extension
#
# Copyright:(C) Susan Spencer 2010
#
# 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
# (a... | gpl-3.0 | -7,184,074,290,125,142,000 | 53.980344 | 174 | 0.540421 | false | 3.13579 | false | false | false |
OnePaaS/virtdc | manager/VM_PlacementManager.py | 2 | 7586 | #!/usr/bin/python
import sys, time, math
import datetime
sys.path.append('/var/lib/virtdc/framework')
from VM_Info_Updater import addOrUpdateDictionaryOfVM
from Guest import Guest
from VM_migrateGuest import vm_migrate_guest
from VM_cpuScaling import vm_cpu_scaling
from VM_memoryScaling import vm_memory_scaling, vm_ma... | mit | 4,335,331,708,923,568,600 | 44.975758 | 261 | 0.673873 | false | 3.06134 | false | false | false |
graik/biskit | biskit/md/distanceTrajectory.py | 1 | 4837 | ## Biskit, a toolkit for the manipulation of macromolecular structures
## Copyright (C) 2004-2019 Raik Gruenberg & Johan Leckner
##
## 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 vers... | gpl-3.0 | 3,054,524,554,605,785,600 | 33.55 | 84 | 0.605954 | false | 3.726502 | false | false | false |
for-the-repose/comine | source/comine/mine/zero.py | 1 | 3021 | #__ LGPL 3.0, 2015 Alexander Soloviev (no.friday@yandex.ru)
from os import rename
from os.path import isdir, exists
from itertools import chain
from re import match
from comine.iface.world import IOwner
from comine.core.logger import log
from comine.maps.ring import Ring
from com... | lgpl-3.0 | -7,301,333,156,189,105,000 | 25.5 | 71 | 0.470374 | false | 3.558304 | false | false | false |
getninjas/adwords-client | adwords_client/internal_api/builder.py | 1 | 11854 | import logging
from .mappers import cast_to_adwords
from ..adwords_api.operations import (campaign, adgroup, keyword, ad, label, campaign_shared_set, shared_criterion,
shared_set, managed_customer, budget_order, attach_label,
campaign_extension... | apache-2.0 | -2,841,582,220,715,757,000 | 46.987854 | 118 | 0.619421 | false | 4.431028 | false | false | false |
rndusr/urwid | examples/asyncio_socket_server.py | 2 | 5471 | #!/usr/bin/env python
"""Demo of using urwid with Python 3.4's asyncio.
This code works on older Python 3.x if you install `asyncio` from PyPI, and
even Python 2 if you install `trollius`!
"""
from __future__ import print_function
import asyncio
from datetime import datetime
import sys
import weakref
import urwid
fr... | lgpl-2.1 | 1,577,030,616,930,078,700 | 28.256684 | 79 | 0.571376 | false | 4.116629 | false | false | false |
zhaohuaw/GData_OpenERP_Data_Pump | models/ResCompany.py | 2 | 1691 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on 2013-03-19
@author: Martin H. Bramwell
'''
from OErpModel import OErpModel
OPENERP_MODULE_NAME = 'res.company'
class ResCompany(OErpModel):
def __init__(self):
super(ResCompany, self).__init__()
self.methods = {
'chkTask'... | agpl-3.0 | 228,795,305,981,507,900 | 27.183333 | 79 | 0.565346 | false | 3.582627 | false | false | false |
oconnorr/nixops | nixops/ec2_utils.py | 7 | 3928 | # -*- coding: utf-8 -*-
import os
import boto.ec2
import time
import random
import nixops.util
from boto.exception import EC2ResponseError
from boto.exception import SQSError
from boto.exception import BotoServerError
def fetch_aws_secret_key(access_key_id):
"""Fetch the secret access key corresponding to the gi... | lgpl-3.0 | 3,983,065,429,108,523,500 | 32.982609 | 119 | 0.604657 | false | 3.608495 | false | false | false |
dougfelt/noto-emoji | add_glyphs.py | 6 | 13619 | #!/usr/bin/env python
"""Extend a ttx file with additional data.
Takes a ttx file and one or more directories containing image files named
after sequences of codepoints, extends the cmap, hmtx, GSUB, and GlyphOrder
tables in the source ttx file based on these sequences, and writes out a new
ttx file.
This can also a... | apache-2.0 | -5,869,405,387,752,100,000 | 32.461916 | 80 | 0.684118 | false | 3.366041 | false | false | false |
avanzosc/avanzosc6.1 | avanzosc_mrp_consum_lot_control/mrp_consum_lot_control.py | 1 | 2262 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Avanzosc - Avanced Open Source Consulting
# Copyright (C) 2011 - 2012 Avanzosc (Daniel) <http://www.avanzosc.com>
#
# This program is free software: you can redistribute it and/or modify
# it under t... | agpl-3.0 | 7,570,711,015,074,946,000 | 43.352941 | 111 | 0.629531 | false | 3.996466 | false | false | false |
BlogomaticProject/Blogomatic | opt/blog-o-matic/usr/lib/python/Bio/Motif/Parsers/MEME.py | 1 | 37144 | # Copyright 2008 by Bartek Wilczynski
# Adapted from Bio.MEME.Parser by Jason A. Hackney. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
from Bio.Alphabet import IUPAC
from Bi... | gpl-2.0 | 8,272,061,384,802,235,000 | 36.443548 | 185 | 0.570752 | false | 3.819042 | false | false | false |
tseaver/gcloud-python | bigquery_datatransfer/google/cloud/bigquery_datatransfer_v1/gapic/enums.py | 1 | 5001 | # -*- coding: utf-8 -*-
#
# Copyright 2018 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... | apache-2.0 | -6,230,860,574,262,378,000 | 31.264516 | 119 | 0.64827 | false | 4.326125 | false | false | false |
python-spain/djangocms-association | cms_association/models.py | 1 | 1901 | from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
from cms_contact.models import Address, AbstractContact
from cms_people.models import Person
EVENT_TARGET = [
('LOCAL', _... | mit | -6,927,451,820,218,426,000 | 43.209302 | 103 | 0.697002 | false | 4.002105 | false | false | false |
FescueFungiShare/hydroshare | hs_app_netCDF/models.py | 1 | 12687 | import json
from django.db import models
from django.core.exceptions import ValidationError
from django.contrib.contenttypes.fields import GenericRelation
from mezzanine.pages.page_processors import processor_for
from hs_core.models import BaseResource, ResourceManager
from hs_core.models import resource_processor, ... | bsd-3-clause | -5,132,217,639,270,517,000 | 40.325733 | 100 | 0.595097 | false | 4.200993 | false | false | false |
gnumdk/lollypop | lollypop/notification.py | 1 | 6170 | # Copyright (c) 2014-2017 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# 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 later vers... | gpl-3.0 | -2,889,124,664,995,541,000 | 31.303665 | 76 | 0.540843 | false | 4.293667 | false | false | false |
sinsai/Sahana_eden | controllers/default.py | 1 | 13802 | # -*- coding: utf-8 -*-
"""
Default Controllers
@author: Fran Boon
"""
module = "default"
# Options Menu (available in all Functions)
#response.menu_options = [
#[T("About Sahana"), False, URL(r=request, f="about")],
#]
def call():
"Call an XMLRPC, JSONRPC or RSS service"
# If webservices don't... | mit | -8,004,811,110,485,335,000 | 36.508152 | 128 | 0.540284 | false | 4.02508 | true | false | false |
karolherbst/Gamekeeper-Framework | tests/prototyping/hb1/hbprototype.py | 1 | 1079 | from GameKeeperModelPy import Game
from bs4 import BeautifulSoup
gameHTMLTree = [""]
def getEntryHTMLTag():
return gameHTMLTree[0]
def setGameHTML(htmlString):
soup = BeautifulSoup(htmlString, "html.parser")
gameHTMLTree[0] = soup.find("div", {"id" : "regular_download_list"})
def parseGameHTML(storeGame... | lgpl-2.1 | -4,635,246,416,680,105,000 | 31.69697 | 72 | 0.68304 | false | 3.403785 | false | false | false |
oudalab/phyllo | phyllo/extractors/aelredusDB.py | 1 | 2204 | import sqlite3
import urllib
from urllib.request import urlopen
from bs4 import BeautifulSoup, NavigableString
import nltk
nltk.download('punkt')
from nltk import sent_tokenize
def parseRes2(soup, title, url, cur, author, date, collectiontitle):
chapter = 1
sen = ""
[e.extract() for e in soup.find_all('... | apache-2.0 | 3,976,148,921,123,051,500 | 31.895522 | 103 | 0.560799 | false | 3.813149 | false | false | false |
lpryszcz/bin | local_assembly.py | 1 | 9041 | #!/usr/bin/env python
"""Run local assembly pipeline.
Prerequisites:
Ray
samtools
Author:
l.p.pryszcz+git@gmail.com
Barcelona, 16/05/2012
"""
import os, sys
import gzip
import subprocess
from optparse import OptionParser,OptionGroup
from datetime import datetime
from genome_annotation import get_contig2readcount
d... | gpl-3.0 | -5,385,750,766,961,687,000 | 32.238971 | 129 | 0.551266 | false | 3.546881 | false | false | false |
vdloo/raptiformica | raptiformica/shell/rsync.py | 1 | 5032 | from functools import partial
from logging import getLogger
from os.path import isdir, join
from raptiformica.settings import conf, Config
from raptiformica.shell.execute import run_command_print_ready, raise_failure_factory, log_success_factory
from raptiformica.shell.raptiformica import create_remote_raptiformica_c... | mit | -3,857,957,405,777,932,300 | 39.910569 | 106 | 0.664149 | false | 4.032051 | false | false | false |
walterbender/turtleconfusion | plugins/accelerometer/accelerometer.py | 1 | 3400 | #!/usr/bin/env python
# Copyright (c) 2011 Walter Bender
#
# 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 prog... | mit | 5,215,709,835,355,335,000 | 35.170213 | 78 | 0.561471 | false | 4.353393 | false | false | false |
tum-pbs/PhiFlow | phi/vis/_viewer.py | 1 | 9976 | import itertools
import sys
import time
import warnings
from threading import Event
from typing import Tuple
from ._log import SceneLog
from ._user_namespace import UserNamespace
from ._vis_base import VisModel, Control, Action
from .. import field
from ..field import Scene, SampledField
from ..math import batch
def... | mit | 1,152,153,395,862,202,500 | 32.589226 | 153 | 0.579992 | false | 4.228911 | false | false | false |
sprinkler/rainmachine-developer-resources | sdk-parsers/RMParserFramework/parsers/ipma-parser.py | 1 | 7227 | # coding=utf-8
# Instituto Português do Mar e da Atmosfera parser for the RainMachine sprinkler controller.
#
# This parser was created to get local forecasts in Portugal from the Instituto Português do Mar e da Atmosfera (IPMA)
# available at https://api.ipma.pt/.
#
# Author: Pedro J. Pereira <pjpeartree@gmail.c... | gpl-3.0 | -2,138,111,391,169,030,100 | 42.869565 | 118 | 0.61974 | false | 3.695141 | false | false | false |
pyGBot/pyGBot | pyGBot/Plugins/probability/Decide.py | 1 | 3068 | ##
## Decide - a plugin for pyGBot
## Copyright (C) 2008 Morgan Lokhorst-Blight, Alex Soborov
##
## 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... | gpl-3.0 | -6,394,632,716,450,507,000 | 31.638298 | 124 | 0.611473 | false | 3.938383 | false | false | false |
zhilongz/expedia | split_training.py | 1 | 2122 | # this codes splits the training data into smaller subset to work with
import numpy as np # linear algebra
import pandas as pd
from patsy import dmatrices
from sklearn.linear_model import LogisticRegression
from sklearn.cross_validation import train_test_split
from patsy import dmatrices
def gen_smaller_val(df):
#t... | mit | -8,766,365,127,375,333,000 | 33.241935 | 105 | 0.661169 | false | 2.686076 | true | false | false |
ZhukovAlexander/rafter | setup.py | 1 | 1036 | # Copyright 2017 Alexander Zhukov
#
# 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 writ... | apache-2.0 | -7,133,051,249,305,371,000 | 33.533333 | 74 | 0.723938 | false | 3.794872 | false | false | false |
rmrector/script.artwork.beef | lib/libs/iso639/__init__.py | 1 | 4143 | import os
import codecs
# https://github.com/janpipek/iso639-python
# Python 3.4+ compatibility
if 'unicode' not in dir():
unicode = str
__version__ = '0.1.4'
class NonExistentLanguageError(RuntimeError):
pass
def find(whatever=None, language=None, iso639_1=None,
iso639_2=None, native=None):
... | mit | -8,361,952,339,430,130,000 | 24.580247 | 78 | 0.578084 | false | 3.259638 | false | false | false |
frreiss/tensorflow-fred | tensorflow/python/keras/layers/preprocessing/benchmarks/category_encoding_benchmark.py | 4 | 3162 | # Copyright 2020 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 | -200,444,902,862,286,240 | 35.344828 | 80 | 0.650538 | false | 4.033163 | false | false | false |
mhorn71/StarbaseMini | data_viewer/RawDataViewer.py | 1 | 5515 | __author__ = 'mark'
# StarbaseMini Staribus/Starinet Client for the British Astronomical Association Staribus Protocol
# Copyright (C) 2015 Mark Horn
#
# This file is part of StarbaseMini.
#
# StarbaseMini is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as... | gpl-2.0 | 6,204,465,398,738,509,000 | 31.069767 | 132 | 0.63699 | false | 4.022611 | false | false | false |
praekelt/vumi-go | go/billing/migrations/0024_auto__add_field_statement_status.py | 1 | 13786 | # -*- 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 field 'Statement.status'
db.add_column(u'billing_statement', 'status',
self.g... | bsd-3-clause | -4,186,166,159,374,263,300 | 84.627329 | 212 | 0.551066 | false | 3.549434 | false | false | false |
larsendt/ooproject | server/vector.py | 1 | 1607 | import math
class Vec2(object):
def __init__(self, x, y):
self.x = x
self.y = y
def __add__(self, other):
return Vec2(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return Vec2(self.x - other.x, self.y - other.y)
def __mul__(self, other):
return... | mit | -8,128,786,750,129,864,000 | 24.507937 | 75 | 0.501556 | false | 2.874776 | false | false | false |
EBI-Metagenomics/emgapi | tests/webuploader/test_import_samples_internal.py | 1 | 1647 | import os
import pytest
from django.test import TransactionTestCase
from emgapi import models as emg_models
from emgapianns.management.commands.import_sample import Command
from test_utils.emg_fixtures import * # noqa
# Integrations tests requiring access to the ERAPRO database and emg_backlog_2 on prod database
# ... | apache-2.0 | -7,504,705,935,962,485,000 | 44.75 | 100 | 0.705525 | false | 3.59607 | true | false | false |
gregvonkuster/icqsol | bem/icqBaseSolver.py | 2 | 5012 | #!/usr/bin/env python
from __future__ import print_function
import vtk
import numpy
from icqsol.shapes.icqRefineSurface import RefineSurface
from icqsol.util.icqDataFetcher import getArrayIndexFromNameAndProjectOntoCells
class BaseSolver:
def __init__(self, pdata, max_edge_length, order=5):
"""
C... | mit | 5,514,373,147,633,266,000 | 30.721519 | 91 | 0.576417 | false | 3.946457 | false | false | false |
mour/ratfist-stm32 | utils/comm_tester.py | 1 | 1720 | #!/usr/bin/python
import serial
import sys
import threading
import readline
import re
import time
def calc_checksum(msg_string):
csum = 0
for ch in list(msg_string):
csum ^= ord(ch)
return csum
def process_msg(msg):
msg_groups = re.search("^\$(?P<payload_str>.*)*(?P<checksum_str>[0-9a-fA... | mit | -602,203,432,351,692,400 | 19 | 105 | 0.52907 | false | 3.474747 | false | false | false |
fametrano/BitcoinBlockchainTechnology | btclib/tests/test_varint.py | 1 | 1417 | #!/usr/bin/env python3
# Copyright (C) 2017-2020 The btclib developers
#
# This file is part of btclib. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution.
#
# No part of btclib including this file, may be copied, modified, propagated,
# or distributed except... | mit | -8,296,175,589,056,391,000 | 22.229508 | 82 | 0.630205 | false | 3.170022 | false | false | false |
conix-security/bl2ru | gen.py | 1 | 2788 | import sys
import socket
import re
import MySQLdb
def suricata_rule(value, sid, name="", ref_url="", vtype="DOMAIN", rule_tag=""):
rules = []
if ref_url.strip() != "":
ref_url = re.sub('http(s)?://', '', ref_url.strip())
reference = "reference:url,%s; "%ref_url
else:
reference = ""
if rule_tag.strip() !=... | gpl-3.0 | -4,218,515,469,727,786,000 | 34.75641 | 316 | 0.606887 | false | 2.730656 | false | false | false |
splotz90/urh | src/urh/controller/PluginController.py | 1 | 1986 | from PyQt5.QtCore import pyqtSlot
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtWidgets import QFrame, QVBoxLayout
from urh import constants
from urh.models.PluginListModel import PluginListModel
from urh.ui.ui_plugins import Ui_FramePlugins
class PluginController(QFrame):
def __init__(self, plugins, highligh... | gpl-3.0 | 6,580,326,605,745,554,000 | 37.941176 | 110 | 0.679758 | false | 3.924901 | false | false | false |
jsm28/matholymp-py | matholymp/datetimeutil.py | 1 | 5843 | # Date and time handling for matholymp package.
# Copyright 2017-2021 Joseph Samuel Myers.
# 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... | gpl-3.0 | -8,788,824,522,825,699,000 | 32.97093 | 79 | 0.628787 | false | 3.405012 | false | false | false |
TaiSakuma/hcaltrg-scripts | utils/framework_cmsedm.py | 1 | 4495 | # Tai Sakuma <sakuma@cern.ch>
import sys
import logging
import collections
import ROOT
import alphatwirl
ROOT.gROOT.SetBatch(1)
##__________________________________________________________________||
import logging
logger = logging.getLogger(__name__)
log_handler = logging.StreamHandler(stream=sys.stdout)
log_format... | mit | 2,794,888,795,782,048,300 | 34.117188 | 106 | 0.552169 | false | 4.181395 | true | false | false |
ingresso-group/pyticketswitch | pyticketswitch/customer.py | 1 | 8650 | from pyticketswitch.mixins import JSONMixin
from pyticketswitch import utils
class Customer (JSONMixin, object):
"""Describes a cutomer to ticketswitch.
Attributes:
first_name (str): customers first name.
last_name (str): customers last name.
address_lines (list): list of address line... | mit | -4,093,513,563,597,392,400 | 39.046296 | 79 | 0.586358 | false | 3.975184 | false | false | false |
nestukh/trash-cli | unit_tests/test_method1_security_check.py | 2 | 1265 | from mock import Mock
from integration_tests.files import require_empty_dir
from trashcli.put import TopTrashDirWriteRules
class TestMethod1VolumeTrashDirectory:
def setUp(self):
require_empty_dir('sandbox')
self.fs = Mock()
self.fs.isdir.return_value = True
self.fs.islink.return_v... | gpl-2.0 | -4,584,081,138,254,734,000 | 27.75 | 78 | 0.659289 | false | 3.277202 | true | false | false |
mancoast/CPythonPyc_test | cpython/277_test_idle.py | 1 | 1098 | import unittest
from test import test_support as support
from test.test_support import import_module
# Skip test if _thread or _tkinter wasn't built or idlelib was deleted.
import_module('threading') # imported by idlelib.PyShell, imports _thread
tk = import_module('Tkinter') # imports _tkinter
idletest = import_mod... | gpl-3.0 | -2,003,146,724,121,638,000 | 44.75 | 77 | 0.746812 | false | 3.66 | true | false | false |
timtian090/dotfiles | ranger/commands.py | 1 | 2158 | from ranger.api.commands import Command
import os
class mkcd(Command):
"""
:mkcd <dirname>
Creates a directory with the name <dirname> and enters it.
"""
def execute(self):
from os.path import join, expanduser, lexists
from os import makedirs
import re
dirname = ... | mit | -3,008,339,315,369,357,000 | 32.71875 | 96 | 0.510658 | false | 3.740035 | false | false | false |
XENON1T/pax | pax/trigger_plugins/SaveSignals.py | 1 | 3795 | import numba
import numpy as np
from pax.trigger import TriggerPlugin
from pax.exceptions import TriggerGroupSignals
class SaveSignals(TriggerPlugin):
def startup(self):
self.save_mode = self.config.get('save_signals')
self.ts_bins = self.config.get('trigger_signals_histogram_bins',
... | bsd-3-clause | 5,348,679,973,880,076,000 | 48.934211 | 115 | 0.57365 | false | 3.860631 | false | false | false |
sramana/scraperwiki-scripts | weather_aws_data.py | 1 | 1095 | """AWS Data collected from imdaws.com
"""
import sys
import scraperwiki
import lxml.html
import datetime
utils = scraperwiki.utils.swimport("utils")
utils.save.unique_keys = ['station_name', 'date', 'time_gmt_']
@utils.cache
def get_data(date):
print "Processing", date
# getting by hour because Scrperwiki i... | unlicense | -5,280,033,841,705,037,000 | 27.815789 | 107 | 0.627397 | false | 3.288288 | false | false | false |
qPCR4vir/orange | Orange/OrangeWidgets/Classify/OWNeuralNetwork.py | 6 | 3916 | """
<name>Neural Network</name>
<description>Neural network learner.</description>
<priority>20</priority>
<icon>icons/NeuralNetwork.svg</icon>
"""
import Orange
from orngWrap import PreprocessedLearner
from OWWidget import *
import OWGUI
class OWNeuralNetwork(OWWidget):
settingsList = ["name", "n_mid", "reg_fa... | gpl-3.0 | -318,665,245,069,053,700 | 30.328 | 79 | 0.542135 | false | 4.113445 | false | false | false |
borchert/metadata-tools | updateXMLTags/updateBB.py | 1 | 10734 | """
Date Created: 9/12/2014
Author: Chris Martin
Purpose: Corrects failed or incomplete bounding box tags.
def negative_BB(): Checks all <northbc>, <southbc> xml tags for accuracy (removes incorrect negative values,
incorrect values.
def failed_BB(): Runs processShapefile on the corresponding shapefile ... | mit | -407,984,737,458,466,240 | 33.187898 | 152 | 0.53978 | false | 3.936194 | false | false | false |
wholebiome/aegea | aegea/build_ami.py | 1 | 5220 | from __future__ import absolute_import, division, print_function, unicode_literals
import os, sys, json, time, base64
from io import open
from . import register_parser, logger, config, __version__
from .util.aws import locate_ami, add_tags, get_bdm, resolve_instance_id, resources, clients, ARN
from .util.crypto impor... | apache-2.0 | 1,891,007,217,668,895,700 | 49.679612 | 120 | 0.65 | false | 3.522267 | false | false | false |
lrei/irnotify | xmppnotify.py | 1 | 2260 | # Copyright (c) 2008 Luis Rei <luis.rei@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 without restriction, including without limitation the rights
# to use, copy, modify, merg... | mit | -260,299,805,010,088,740 | 35.451613 | 79 | 0.668142 | false | 4.035714 | true | false | false |
chrispaul/attracker | attracker_app/models.py | 1 | 4312 | from django.db import models
from django.conf import settings
from django.contrib.auth.models import User
import datetime
from django.db.models import Max
class Hiker(models.Model):
user = models.OneToOneField(User)
trail_name = models.CharField('Trail name', max_length=200, null=True, blank=True)
def num... | mit | -6,569,515,284,766,783,000 | 38.559633 | 135 | 0.681354 | false | 3.184638 | false | false | false |
desirable-objects/hotwire-shell | hotwire_ui/renderers/file.py | 2 | 14828 | # This file is part of the Hotwire Shell user interface.
#
# Copyright (C) 2007 Colin Walters <walters@verbum.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Li... | gpl-2.0 | -8,680,401,129,847,785,000 | 44.624615 | 144 | 0.595225 | false | 3.89493 | false | false | false |
willybh11/python | introProg/game/minesweeper.py | 1 | 9538 | import random
import time
#MAKE SURE to create a folder in the same directory as this file called "Users"
def avg(something):
total = 0
for i in something: total += int(i)
return total/len(something)
class game(object): #there will only be one instance of the class, that will be the game
def _... | gpl-3.0 | 1,270,342,945,543,803,400 | 56.113772 | 247 | 0.555148 | false | 3.686896 | false | false | false |
USGS-EROS/lcmap-pyccd-worker | pw/messaging.py | 1 | 1856 | import pika
import pw
class MessagingException(Exception):
pass
def listen(callback_handler, conn, queue):
channel = conn.channel()
# This needs to be manual ack'ing, research and make sure
# otherwise we'll get multiple deliveries.
channel.basic_qos(prefetch_count=1)
channel.basic_consume(c... | unlicense | -4,070,116,586,324,708,400 | 36.877551 | 111 | 0.568966 | false | 5.002695 | false | false | false |
moonfruit/yyfeed | lib/yyfeed/util/web.py | 1 | 2216 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
from bottle import HTTPResponse, HTTPError, PluginError
from bottle import default_app, request, template as _template
from collections import Iterable
from inspect import getargspec
class InjectPlugin(object):
api = 2
def __init__(self, keyword, ... | apache-2.0 | 5,445,650,551,408,932,000 | 24.471264 | 96 | 0.609206 | false | 4.103704 | false | false | false |
NinjaMSP/crossbar | crossbar/router/auth/anonymous.py | 3 | 3914 | #####################################################################################
#
# Copyright (c) Crossbar.io Technologies GmbH
#
# Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g.
# you have purchased a commercial license), the license terms below apply.
#
# Should you enter ... | agpl-3.0 | 8,780,525,729,850,020,000 | 34.261261 | 145 | 0.630301 | false | 4.452787 | true | false | false |
pjhwa/dumpdocker | python/dumpdocker.py | 1 | 4884 |
#!/usr/bin/python
#
#
# dumpdocker
# - creates docker image based on tar file for analysis of crash dump
#
# Requirements:
# - gdb,ldd,tar,strace
#
# Usage:
# dumpdocker [-h] -c core_file exec_bin
#
# Author: ChongHwa Lee <earthsea@gmail.com>
# Created on Mon Aug 18 11:23:32 KST 2014
# Last updated at Tue Aug 26 ... | gpl-3.0 | 5,750,417,383,226,009,000 | 30.615894 | 183 | 0.562212 | false | 3.081988 | false | false | false |
dotKom/onlineweb4 | apps/companyprofile/models.py | 1 | 1253 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from apps.gallery.models import ResponsiveImage
class Company(models.Model):
IMAGE_FOLDER = "images/companies"
IMAGE_EXTENSIONS = ['.jpg', '.jpeg', '.gif', '.png', '.tif', '.tiff']
name = models.CharField(_("bedriftsna... | mit | 5,578,338,831,182,285,000 | 36.969697 | 110 | 0.664804 | false | 3.653061 | false | false | false |
benrudolph/commcare-hq | corehq/apps/cleanup/management/commands/archive_psi_locations.py | 1 | 1466 | from django.core.management.base import BaseCommand
import time
from corehq.apps.locations.models import Location
from corehq.apps.commtrack.util import generate_code
from dimagi.utils.couch.database import iter_docs
PSI_DOMAINS = (
"drewpsi",
"psi",
"psi-ors",
"psi-test",
"psi-test2",
"psi-tes... | bsd-3-clause | -845,009,041,694,791,700 | 30.191489 | 90 | 0.572306 | false | 3.70202 | false | false | false |
wlashell/lyrical_page | site_slider/templatetags/slider_tags.py | 1 | 1313 | from django.template import Library, Node, Context
from django.template.loader import render_to_string, get_template
from site_slider.models import Slider
from site_slider.settings import SLIDER_TEMPLATE_PATH, SLIDE_TEMPLATE_PATH
register = Library()
class SliderNode(Node):
def __init__(self, code):
sel... | apache-2.0 | 2,397,022,677,376,988,700 | 25.795918 | 74 | 0.570449 | false | 4.052469 | false | false | false |
tylertian/Openstack | openstack F/horizon/horizon/dashboards/syspanel/flavors/forms.py | 3 | 3811 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | 1,098,852,627,831,502,300 | 39.115789 | 78 | 0.551299 | false | 4.704938 | false | false | false |
UstadMobile/exelearning-extjs5-mirror | tools/tinymceI18nSwitch.py | 7 | 2554 | # -- coding: utf-8 --
# ===========================================================================
# eXe
# Copyright 2013, Pedro Peña Pérez, Open Phoenix IT
#
# 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 Softwar... | gpl-2.0 | 9,149,484,015,234,343,000 | 40.836066 | 94 | 0.513323 | false | 4.325424 | false | false | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.3-py2.5.egg/sqlalchemy/orm/dynamic.py | 1 | 6357 | """'dynamic' collection API. returns Query() objects on the 'read' side, alters
a special AttributeHistory on the 'write' side."""
from sqlalchemy import exceptions, util
from sqlalchemy.orm import attributes, object_session, util as mapperutil
from sqlalchemy.orm.query import Query
from sqlalchemy.orm.mapper import ... | bsd-3-clause | -7,134,446,020,012,522,000 | 36.394118 | 255 | 0.61507 | false | 4.246493 | false | false | false |
toenuff/treadmill | lib/python/treadmill/rest/api/tenant.py | 1 | 2645 | """
Treadmill Tenant REST api.
"""
from __future__ import absolute_import
import flask
import flask_restplus as restplus
from flask_restplus import fields
# Disable E0611: No 'name' in module
from treadmill import webutils # pylint: disable=E0611
# Old style classes, no init method.
#
# pylint: disable=W0232
def i... | apache-2.0 | -570,878,820,477,718,660 | 30.488095 | 78 | 0.565217 | false | 4.019757 | false | false | false |
lino-framework/book | lino_book/projects/lydia/tests/test_makecopy.py | 1 | 3016 | # -*- coding: utf-8 -*-
# Copyright 2018-2020 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""This module contains some quick tests:
You can run only these tests by issuing::
$ go lydia
$ python manage.py test tests.test_makecopy
"""
from lino.api import rt
from lino.utils.djangotest import Rem... | bsd-2-clause | 2,003,613,280,066,962,700 | 37.177215 | 73 | 0.556698 | false | 4.026702 | true | false | false |
aristk/static-analyser | provers/cryptominisat-5.0.1/scripts/output_parser/sqlite3_checks.py | 2 | 9215 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sqlite3
import optparse
import operator
class Query:
def __init__(self):
self.conn = sqlite3.connect(dbfname)
self.c = self.conn.cursor()
def __enter__(self):
return self
def __exit__(self... | mit | -2,649,867,910,950,600,700 | 30.775862 | 234 | 0.520564 | false | 3.619403 | false | false | false |
jtesta/bitclamp | BlockClient.py | 1 | 7009 | # Bitclamp: a cryptocurrency-based publication tool
# Copyright (C) 2016 Joe Testa <jtesta@positronsecurity.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms version 3 of the GNU General Public License as
# published by the Free Software Foundation.
#
# This program is ... | gpl-3.0 | -5,078,522,972,839,003,000 | 36.886486 | 188 | 0.551149 | false | 4.297364 | false | false | false |
dealfonso/lxc-pm | jsonlib.py | 1 | 2155 | import json
import types
class ObjectSerializer(object):
def __init__(self):
self.rec_list = []
def _assign(self, d, i, v):
if not callable(v):
if v not in self.rec_list:
self.rec_list.append(v)
d[i] = self.serialize(v)
self.rec_list.... | apache-2.0 | -3,966,961,929,972,645,000 | 24.654762 | 75 | 0.44826 | false | 3.961397 | false | false | false |
mitodl/XBlock | xblock/test/test_mixins.py | 1 | 18315 | """
Tests of the XBlock-family functionality mixins
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from datetime import datetime
from unittest import TestCase
import ddt as ddt
from lxml import etree
import mock
import pytz
import six
from xblock.core import XBlock, XBlockAsi... | apache-2.0 | -4,958,231,779,673,854,000 | 37.557895 | 116 | 0.620857 | false | 4.002404 | true | false | false |
dirk-thomas/vcstool | vcstool/commands/custom.py | 1 | 3541 | import argparse
import sys
from vcstool.clients import vcstool_clients
from vcstool.crawler import find_repositories
from vcstool.executor import execute_jobs
from vcstool.executor import generate_jobs
from vcstool.executor import output_repositories
from vcstool.executor import output_results
from vcstool.streams imp... | apache-2.0 | -8,995,424,233,888,054,000 | 28.508333 | 78 | 0.646992 | false | 3.836403 | false | false | false |
deepmind/open_spiel | open_spiel/python/bots/bluechip_bridge.py | 1 | 12875 | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | apache-2.0 | -1,833,211,387,354,474,500 | 35.891117 | 82 | 0.651806 | false | 3.25455 | false | false | false |
LumPenPacK/NetworkExtractionFromImages | win_build/nefi2_win_amd64_msvc_2015/bin/nefi2/model/algorithms/med_blur.py | 4 | 2583 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from nefi2.model.algorithms._alg import Algorithm, IntegerSlider, CheckBox
import cv2
__authors__ = {"Andreas Firczynski": "andreasfir91@googlemail.com",
"Sebastian Schattner": "s9sescat@stud.uni-saarland.de"}
class AlgBody(Algorithm):
"""
Median... | bsd-2-clause | 5,417,600,415,159,179,000 | 36.985294 | 78 | 0.552071 | false | 3.919575 | false | false | false |
ryanvolz/echolect | echolect/core/calc.py | 1 | 5136 | #-----------------------------------------------------------------------------
# Copyright (c) 2014, Ryan Volz
# All rights reserved.
#
# Distributed under the terms of the BSD 3-Clause ("BSD New") license.
#
# The full license is in the LICENSE file, distributed with this software.
#-----------------------------------... | bsd-3-clause | -6,262,269,845,806,652,000 | 37.044444 | 135 | 0.574961 | false | 3.135531 | false | false | false |
tpsatish95/Topic-Modeling-Social-Network-Text-Data | client.py | 1 | 1684 | '''
Copyright 2015 Serendio Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distrib... | apache-2.0 | 233,037,726,547,383,900 | 30.773585 | 168 | 0.756532 | false | 3.792793 | false | false | false |
netvigator/myPyPacks | pyPacks/File/Split.py | 2 | 2659 | #!/usr/bin/pythonTest
# -*- coding: utf-8 -*-
#
# had huge file, too big for editors
# this breaks the file into bite-sized chunks
#
from os.path import join
from six import print_ as print3
from Dir.Get import sTempDir
from File.Get import getFileObject
from File.Spec import getFu... | gpl-2.0 | 1,727,824,863,038,965,000 | 22.539823 | 69 | 0.393381 | false | 4.468908 | false | false | false |
AungThiha/UdacitySubtitleFix | UdacitySubtitleFix.py | 1 | 1434 | # Copyright (C) 2015 AungThiha
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 361,388,335,865,637,100 | 27.117647 | 74 | 0.663877 | false | 2.932515 | false | false | false |
joergfranke/recnet | examples/numbers_recognition/train_model.py | 2 | 3224 | #!/usr/bin/env python
""" Numbers recognition """
"""____________________"""
""" TRAIN MODEL
"""
###### Set global Theano config #######
import os
t_flags = "mode=FAST_RUN,device=cpu,floatX=float32, optimizer='fast_run', allow_gc=False"
print("Theano Flags: " + t_flags)
os.environ["THEANO_FLAGS"] = t_flags
#... | mit | -6,150,550,055,449,816,000 | 34.428571 | 94 | 0.569789 | false | 2.915009 | false | false | false |
hellowebbooks/hellowebbooks-website | books/management/commands/bulk_customer_import.py | 1 | 3725 | import os
import csv
from django.conf import settings
from django.contrib.auth.models import User
from django.core.management.base import BaseCommand
from django.http import HttpRequest
from books import helpers
from books.models import Customer, Product, Membership
def import_csv(path='customers.csv'):
csv_row... | mit | -2,907,973,050,656,823,000 | 27.007519 | 70 | 0.595168 | false | 3.91693 | false | false | false |
pinobatch/thwaite-nes | tools/paginate.py | 1 | 11457 | #!/usr/bin/env python3
import sys
import os
import charset
import dtefe
charset.register() # as "thwaite"
# must match global.inc
DTE_MIN_CODEUNIT = 128
FIRST_PRINTABLE_CU = 16
def ca65_bytearray(s):
s = [' .byte ' + ','.join("%3d" % ch for ch in s[i:i + 16])
for i in range(0, len(s), 16)]
return '... | gpl-3.0 | -3,286,059,572,247,331,000 | 30.913649 | 79 | 0.544209 | false | 3.67565 | false | false | false |
horazont/aioxmpp | tests/test_errors.py | 1 | 11689 | ########################################################################
# File name: test_errors.py
# This file is part of: aioxmpp
#
# LICENSE
#
# This program 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 Foun... | lgpl-3.0 | -7,312,115,895,970,499,000 | 30.581081 | 118 | 0.572101 | false | 4.252183 | true | false | false |
ProjectQ-Framework/ProjectQ | projectq/cengines/_main.py | 1 | 13124 | # -*- coding: utf-8 -*-
# Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -1,884,230,597,654,028,500 | 40.141066 | 118 | 0.600503 | false | 4.445799 | false | false | false |
divergentdave/inspectors-general | inspectors/sigtarp.py | 2 | 5219 | #!/usr/bin/env python
import datetime
import logging
import os
import re
from utils import utils, inspector, admin
# https://www.sigtarp.gov
archive = 2009
# options:
# standard since/year options for a year range to fetch from.
#
# Notes for IG's web team:
#
AUDITS_URL = "https://www.sigtarp.gov/pages/audit.asp... | cc0-1.0 | 7,735,854,880,641,446,000 | 31.216049 | 99 | 0.683464 | false | 3.089994 | false | false | false |
SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/net.rieter.xot.smallplayer/resources/libs/addonsettings.py | 1 | 22834 | #===============================================================================
# LICENSE XOT-Framework - CC BY-NC-ND
#===============================================================================
# This work is licenced under the Creative Commons
# Attribution-Non-Commercial-No Derivative Works 3.0 Unported Lic... | gpl-2.0 | -4,665,048,464,522,075,000 | 37.989492 | 288 | 0.565516 | false | 4.4755 | true | false | false |
mattjhayes/nmeta2 | nmeta2/nmeta2.py | 1 | 29505 | #!/usr/bin/python
# 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
# di... | apache-2.0 | 7,914,209,776,357,724,000 | 41.822932 | 79 | 0.557058 | false | 3.933476 | true | false | false |
jriguera/photoplace | photoplace/lib/PhotoPlace/DataTypes/kmlData.py | 1 | 12855 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# loadPhotosAction.py
#
# Copyright 2010-2015 Jose Riguera Lopez <jriguera@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the Licens... | apache-2.0 | -1,811,864,575,855,104,800 | 37.258929 | 95 | 0.531389 | false | 4.332659 | false | false | false |
gpospelov/BornAgain | devtools/view/plot_int.py | 1 | 3843 | #!/usr/bin/env python3
"""
Plots data stored in BornAgain's .int or .int.gz format.
Can handle both 1D and 2D arrays.
"""
import argparse
import sys
import numpy as np
import bornagain as ba
from matplotlib import pyplot as plt
from matplotlib import rc, colors
rc('font', **{'family': 'sans-serif', 'sans-serif': ['Hel... | gpl-3.0 | 4,615,730,734,367,766,000 | 32.417391 | 79 | 0.57273 | false | 3.594949 | false | false | false |
aakashsinha19/Aspectus | Image Segmentation/tf-image-segmentation/tf_image_segmentation/utils/tf_records.py | 1 | 6108 | # Important: We are using PIL to read .png files later.
# This was done on purpose to read indexed png files
# in a special way -- only indexes and not map the indexes
# to actual rgb values. This is specific to PASCAL VOC
# dataset data. If you don't want thit type of behaviour
# consider using skimage.io.imread()
fro... | apache-2.0 | -6,387,489,897,512,448,000 | 35.147929 | 90 | 0.644073 | false | 4.274318 | false | false | false |
hirofumi0810/tensorflow_end2end_speech_recognition | models/recurrent/layers/batch_normalization.py | 1 | 1447 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import tensorflow as tf
def batch_norm(inputs, name_scope, is_training, epsilon=1e-3, decay=0.99):
with tf.variable_scope(name_scope):
size = inputs.get_shape().as_list()[1]
gamma = tf.get_variable(
'gamma', [size], initializer=tf.consta... | mit | 1,814,524,584,592,885,000 | 40.342857 | 101 | 0.587422 | false | 3.626566 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.