repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OpenUpgrade/OpenUpgrade | openerp/tools/convert.py | 1 | 41298 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -4,873,258,741,265,820,000 | 40.715152 | 219 | 0.529323 | false | 3.725911 | false | false | false |
luca1897/Pyfacebook | pyfacebook-lite/__init__.py | 1 | 6953 | #
# __init__.py
# Copyright (C) orion 2011 <luca.barbara@live.com>
#
# PyFbGraph 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 version.
#
# ... | gpl-3.0 | -1,004,359,864,503,552,300 | 24.468864 | 131 | 0.66892 | false | 3.056264 | false | false | false |
boundlessgeo/qgis-geogig-plugin | geogig/gui/dialogs/remotesdialog.py | 1 | 7621 | # -*- coding: utf-8 -*-
#
# (c) 2016 Boundless, http://boundlessgeo.com
# This code is licensed under the GPL 2.0 license.
#
from PyQt4 import QtCore, QtGui
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class RemotesDialog(QtGui.QDialog):
def __init__(self, parent, repo):
QtGui.QDialog.__init__(sel... | gpl-2.0 | -5,345,839,704,717,430,000 | 37.489899 | 104 | 0.656213 | false | 4.023759 | false | false | false |
lnhubbell/tweetTrack | streamScript/domain/analysis_playground.py | 1 | 1928 | """This file is intended to be used as a playground to analyze data pulled
from the database. The code below was used to analyze data from the Tweet200
database, but this is a good place for any sort of extra analysis."""
def count_unique_users(data, n=10000):
u""" Uses blocks of tweets from single users per city.... | mit | 2,655,640,619,909,532,700 | 37.58 | 83 | 0.525934 | false | 4.102128 | false | false | false |
google/adiantum | specification/python/formatperf.py | 1 | 2697 | # Copyright 2018 Google LLC
#
# Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
import re
def parseperf(fn):
rexp = re.compile(r"(\S+) (encryption|decryption|hashing) \(\S+\)\s+(\d+\.\d+) cpb")
for l in fn.open():... | mit | 1,171,430,470,028,120,300 | 28.637363 | 88 | 0.557286 | false | 3.269091 | false | false | false |
debomatic/debomatic | modules/RemovePackages.py | 1 | 2077 | # Deb-o-Matic - RemovePackages module
#
# Copyright (C) 2018-2021 Luca Falavigna
#
# Authors: Luca Falavigna <dktrkranz@debian.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; version 3 of... | gpl-3.0 | -1,570,457,130,797,838,000 | 38.942308 | 77 | 0.576793 | false | 4.345188 | false | false | false |
nicolashainaux/mathmakerlib | mathmakerlib/geometry/bipoint.py | 1 | 8954 | # -*- coding: utf-8 -*-
# Mathmaker Lib offers lualatex-printable mathematical objects.
# Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com>
# This file is part of Mathmaker Lib.
# Mathmaker Lib is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pu... | gpl-3.0 | -1,612,832,763,755,031,800 | 36.062241 | 79 | 0.562136 | false | 3.794393 | false | false | false |
SWE574-Groupago/heritago | heritago/heritages/serializers.py | 1 | 9002 | import django.dispatch
from rest_framework import serializers
from heritages.models import Heritage, BasicInformation, Origin, Tag, Multimedia, Selector, AnnotationTarget, \
AnnotationBody, Annotation, User
class BasicInformationSerializer(serializers.ModelSerializer):
class Meta:
model = BasicInform... | mit | -7,851,684,465,631,293,000 | 33.756757 | 111 | 0.56643 | false | 4.705698 | false | false | false |
svanscho/weatherlight | weatherlight-server/openweathermap.py | 1 | 5038 | import urllib2
import json
from datetime import datetime
import pytz
import logging
class Openweathermap(object):
def __init__(self, appid):
self.appid = appid #the openweathermaps application id you got when signing up for the API
#return codes according to this definition http://openweathermap.org/... | mit | 6,597,734,720,230,689,000 | 29.72561 | 134 | 0.475983 | false | 3.158621 | false | false | false |
jkliff/project_walker | project-walker-core/src/python/main/Checkers.py | 1 | 9326 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os.path
import re
import subprocess
try:
from lxml import etree
except ImportError:
try:
import xml.etree.cElementTree as etree
except:
import elementtree.ElementTree as etree
import ProjectWalker
import GlobMatch
from interpol import inter... | bsd-3-clause | 2,253,186,675,081,887,200 | 34.869231 | 134 | 0.558546 | false | 4.060078 | true | false | false |
MST-MRR/DroneKit | Flight/AirTrafficControl.py | 1 | 21189 | ############################################
# This file contains a wrapper class
# for DroneKit related operations
# for our drone.
############################################
# Multi-Rotor Robot Design Team
# Missouri University of Science Technology
# Spring 2017
# Lucas Coon, Mark Raymond Jr.
# pylint: di... | mit | -3,630,978,392,678,930,000 | 33.492462 | 232 | 0.613998 | false | 3.413177 | false | false | false |
NSLS-II-SRX/ipython_ophyd | profile_xf05id1-noX11/startup/85-bs_callbacks.py | 1 | 3670 | # -*- coding: utf-8 -*-
"""
Created on Wed Feb 24 12:30:06 2016
@author: xf05id1
"""
from bluesky.callbacks import CallbackBase,LivePlot
#import os
#import time as ttime
#from databroker import DataBroker as db, get_events
#from databroker.databroker import fill_event
import filestore.api as fsapi
#from metadatasto... | bsd-2-clause | 2,528,519,993,124,120,000 | 28.126984 | 81 | 0.589918 | false | 3.566569 | false | false | false |
erikruiter2/ipbucket | database.py | 1 | 2871 | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from ipaddr_func import long2ip
from sqlalchemy.exc import IntegrityError
engine = create_engine('sqlite:////tmp/ipbucket.db', convert_unicode=True)
db_session = scoped_s... | gpl-2.0 | -6,610,873,669,780,001,000 | 34.012195 | 123 | 0.632184 | false | 4.078125 | false | false | false |
CSD-Public/stonix | src/MacBuild/ramdisk/lib/libHelperFunctions.py | 1 | 11052 | """
Helper functions, OS agnostic
@author: Roy Nielsen
"""
#--- Native python libraries
import re
import os
import sys
import time
import ctypes
import traceback
from subprocess import Popen, STDOUT, PIPE
try:
import termios
except:
pass
#--- non-native python libraries in this source tree
from . loggers imp... | gpl-2.0 | -6,784,422,809,951,835,000 | 29.362637 | 126 | 0.537459 | false | 4.06025 | false | false | false |
JosephRedfern/dominator | dominate.py | 1 | 2057 | import cv2
import numpy as np
class Dominator(object):
def __init__(self, domino_filename):
self.domino_image = cv2.imread(domino_filename)
def detect_blobs(self, image=None):
if image is None:
image = self.domino_image
params = cv2.SimpleBlobDetector_Params()
pa... | bsd-2-clause | 5,429,924,301,556,357,000 | 28.385714 | 118 | 0.616918 | false | 3.350163 | false | false | false |
mrm-xiefan/lunania-ai | catvsdog/01_job/bottleneck.py | 1 | 4370 | import os
import utils
import config
import traceback
import logging.config
from luna import LunaExcepion
logging.config.fileConfig("logging.conf")
logger = logging.getLogger()
if __name__ == '__main__':
try:
logger.info("------ start ------")
utils.lock()
from keras.applications.vgg16... | mit | 7,097,965,483,636,756,000 | 33.188034 | 118 | 0.6145 | false | 3.079292 | true | true | false |
aimas/TuniErp-8.0 | addons/hr_contract/__openerp__.py | 1 | 1837 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -6,793,163,646,180,637,000 | 34.326923 | 78 | 0.580838 | false | 4.118834 | false | false | false |
grycap/scar | examples/mask-detector-workflow/blurry-faces/src/DetectorAPI.py | 1 | 2691 | import tensorflow as tf
import numpy as np
import time
class DetectorAPI:
def __init__(self, path_to_ckpt):
self.path_to_ckpt = path_to_ckpt
self.detection_graph = tf.Graph()
with self.detection_graph.as_default():
od_graph_def = tf.compat.v1.GraphDef()
with tf.io.g... | apache-2.0 | 8,339,100,368,514,836,000 | 41.046875 | 100 | 0.589372 | false | 3.706612 | false | false | false |
biocommons/hgvs | hgvs/alignmentmapper.py | 1 | 13454 | # -*- coding: utf-8 -*-
"""Mapping positions between pairs of sequence alignments
The AlignmentMapper class is at the heart of mapping between aligned sequences.
"""
# Implementation note re: "no-zero correction": HGVS doesn't have a
# 0. Counting is -3, -2, -1, 1, 2, 3 :-/ Coordinate calculations must
# take this d... | apache-2.0 | -8,949,463,034,163,070,000 | 44.917808 | 119 | 0.573911 | false | 3.39615 | false | false | false |
elationfoundation/rss_keyword_collector | rss_keyword_collector/feed.py | 1 | 6292 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of rss_keyword_parser, a simple term extractor from rss feeds.
# Copyright © 2015 seamus tuohy, <stuohy@internews.org>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as p... | lgpl-3.0 | 4,961,942,695,959,910,000 | 40.117647 | 105 | 0.520108 | false | 4.649667 | false | false | false |
fbradyirl/home-assistant | homeassistant/components/sytadin/sensor.py | 1 | 4655 | """Support for Sytadin Traffic, French Traffic Supervision."""
import logging
import re
from datetime import timedelta
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
LENGTH_... | apache-2.0 | -2,261,170,843,775,063,600 | 29.821192 | 92 | 0.63064 | false | 3.661684 | false | false | false |
leon-adams/datascience | algorithms/hobfield.py | 1 | 5247 | #
# Leon Adams
#
# Python Module for running a hopfield network to relocate the memory from a perturbed image.
# The raw data set is represented in png image format. This code takes the three color channels (rgb)
# Converts to a single channel gray scaled image and then transforms the output to a [-1,1] vector
# for u... | mpl-2.0 | 5,318,124,734,390,974,000 | 34.938356 | 102 | 0.68077 | false | 3.608666 | false | false | false |
kblomqvist/yasha | yasha/cmsis.py | 1 | 14079 | """
The MIT License (MIT)
Copyright (c) 2015-2021 Kim Blomqvist
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, ... | mit | 6,884,642,169,536,728,000 | 35.568831 | 84 | 0.60537 | false | 4.183952 | false | false | false |
0dadj1an/mix | mix_backup/workspace/python_bundle_1_2/add_access_rule/addAccessRule.py | 1 | 2674 | #
# addAccessRule.py
# version 1.0
#
#
# This example demonstrates communication with Check Point Management server using Management API Library in Python.
# The demonstrated commands are:
#
# 1. login
# 2. adding an access rule to the top of Network layer
# 3. publishing the changes
#
# Logout command is called ... | apache-2.0 | 4,071,396,948,720,046,000 | 35.630137 | 116 | 0.622289 | false | 4.427152 | false | false | false |
markmc/oslo.messaging | oslo/messaging/notify/_impl_messaging.py | 1 | 2131 |
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
# Copyright 2013 Red Hat, 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/licens... | apache-2.0 | 3,287,923,576,435,222,000 | 35.118644 | 79 | 0.663069 | false | 4.412008 | false | false | false |
CCI-MOC/k2k-proxy | mixmatch/services.py | 1 | 6357 | # Copyright 2016 Massachusetts Open Cloud
#
# 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... | apache-2.0 | 4,650,492,258,410,722,000 | 31.106061 | 77 | 0.521 | false | 4.35411 | false | false | false |
BL-Labs/sample_generator_datatools | sample_generator/sample_generator/settings.py | 1 | 5561 | # Django settings for sample_generator project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', ... | mit | 2,516,482,832,093,580,300 | 32.908537 | 127 | 0.690343 | false | 3.737231 | false | false | false |
ftranschel/evoMPS | evoMPS/tdvp_uniform.py | 1 | 54221 | # -*- coding: utf-8 -*-
"""
Created on Thu Oct 13 17:29:27 2011
@author: Ashley Milsted
TODO:
- Clean up CG code: Create nice interface?
- Split out excitations stuff?
"""
import numpy as np
import scipy as sp
import scipy.linalg as la
import scipy.sparse.linalg as las
import scipy.optimize as opti
import td... | bsd-3-clause | -3,848,388,600,471,098,000 | 36.680334 | 156 | 0.473912 | false | 3.278372 | false | false | false |
jason0x43/jc-nest | nest.py | 1 | 11609 | #!/usr/bin/env python
import json
import requests
import logging
import ssl
from datetime import datetime
from os.path import exists, expanduser, dirname
from os import makedirs, remove
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
LOG = logging.getLogger(__n... | mit | 3,842,743,829,573,667,300 | 30.040107 | 78 | 0.54139 | false | 4.159441 | false | false | false |
pymedusa/SickRage | medusa/providers/torrent/json/eztv.py | 1 | 4401 | # coding=utf-8
"""Provider code for EZTV."""
from __future__ import unicode_literals
import logging
from medusa import tv
from medusa.helper.common import convert_size
from medusa.indexers.utils import mappings
from medusa.logger.adapters.style import BraceAdapter
from medusa.providers.torrent.torrent_provider impo... | gpl-3.0 | 9,160,821,456,185,996,000 | 30.661871 | 93 | 0.513292 | false | 4.383466 | false | false | false |
snegovick/dswarm_simulator | localization_2d.py | 1 | 12097 | #!/usr/bin/env python
import random
import math
import collision_detection as cd
from extra import ceiling_camera, radio
import sys
write_pngs = False
if len(sys.argv)>=2:
if sys.argv[1] == "w":
write_pngs = True
bpp = 4
polygon_width = 1000
polygon_height = 500
pixel_per_mm = 1.
obstacle_color = (0,0,0... | gpl-3.0 | -1,457,287,262,825,134,600 | 29.54798 | 178 | 0.559726 | false | 3.052485 | false | false | false |
18F/rdbms-subsetter | dialects/postgres.py | 1 | 1790 | import re
import sqlalchemy as sa
from sqlalchemy import cast
from sqlalchemy.dialects.postgresql import ARRAY, ENUM
def sql_enum_to_list(value):
"""
Interprets PostgreSQL's array syntax in terms of a list
Enums come back from SQL as '{val1,val2,val3}'
"""
if value is None:
return []
... | cc0-1.0 | -7,185,028,292,799,158,000 | 29.338983 | 94 | 0.583799 | false | 3.857759 | false | false | false |
opendaylight/netvirt | resources/tools/odltools/odltools/mdsal/tests/test_neutron.py | 1 | 1436 | # Copyright 2018 Red Hat, Inc. and others. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | epl-1.0 | -144,366,441,729,684,900 | 36.789474 | 75 | 0.736769 | false | 3.419048 | true | false | false |
bd808/apache-errors | apache-errors.py | 1 | 8784 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2013 Bryan Davis and contributors
"""
Apache error log report generator
"""
import collections
import datetime
import hashlib
import re
import string
import textwrap
ERROR_FORMAT = (
r'\[(?P<datetime>[^\]]+)\] '
r'\[(?P<level>[^\]]+)\] '... | mit | 9,017,693,728,312,999,000 | 26.53605 | 89 | 0.554872 | false | 4.070436 | false | false | false |
Mozilla-TWQA/mozMinions | tests/test_kevin.py | 1 | 1799 | #!/usr/bin/python
__author__ = 'shako'
from moz_minions.kevin import MtbfToRaptorMinion
from b2g_util.util.adb_helper import AdbWrapper
testdata = {'name': "mtbf",
'path': "/home/shako/PycharmProjects/mozMinions/conf/test.json",
'output': {'dirpath': 'output',
'file': "... | mpl-2.0 | 6,925,040,400,636,357,000 | 32.314815 | 78 | 0.528071 | false | 3.534381 | true | false | false |
Carnon/nlp | TextClassify/textclassify/textdata.py | 1 | 2565 | import os
import codecs
import re
import jieba
import numpy as np
from tqdm import tqdm
from tensorflow.contrib import learn
from sklearn.preprocessing import OneHotEncoder
from sklearn.preprocessing import LabelEncoder
class TextData(object):
def __init__(self,args):
self.args = args
corpus_dir =... | apache-2.0 | 9,036,540,684,069,582,000 | 35.642857 | 114 | 0.617934 | false | 3.47561 | false | false | false |
opadron/girder | plugins/gravatar/plugin_tests/gravatar_test.py | 1 | 4046 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | 3,932,706,853,364,535,300 | 35.45045 | 79 | 0.551409 | false | 4.267932 | true | false | false |
Jmdebugger/mfbog | core/bak.py | 1 | 1748 | """
def singleton(cls, *args, **kw):
instances = {}
def _singleton():
if cls not in instances:
instances[cls] = cls(*args, **kw)
return instances[cls]
return _singleton
@singleton
"""
"""
url:http://app.50bang.org/?action=session
"""
r_app_key = "0307cafd71... | gpl-3.0 | 3,985,580,398,561,359,400 | 36.428571 | 123 | 0.651985 | false | 2.534591 | false | false | false |
loafbaker/django_matchmaker | likes/models.py | 1 | 1024 | from django.db import models
from django.conf import settings
# Create your models here.
User = settings.AUTH_USER_MODEL
class UserLikeManager(models.Manager):
def get_all_mutual_likes(self, user, number):
try:
qs = user.liker.liked_users.all().order_by('?')
except:
return []
mutual_users = []
for oth... | mit | 3,469,012,237,106,290,700 | 22.272727 | 83 | 0.698242 | false | 2.868347 | false | false | false |
googleinterns/step51-2020 | hangout_bot/clientserver.py | 1 | 14176 | from google.cloud import datastore
from campaigndata import CampaignData
from activeuser import *
from constant import *
import requests
import json as json_module
# [Datastore Interaction Functions]
def get_user_key(user_id):
return datastore.Client().key('ActiveUser', user_id)
def get_campaign_key(user_id, cam... | apache-2.0 | -8,992,728,657,377,124,000 | 32.04662 | 95 | 0.669794 | false | 3.739383 | false | false | false |
getnikola/nikola | nikola/plugins/compile/rest/post_list.py | 1 | 4278 | # -*- coding: utf-8 -*-
# Copyright © 2013-2021 Udo Spallek, Roberto Alsina and others.
# 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
#... | mit | 7,635,553,044,823,201,000 | 35.555556 | 75 | 0.631985 | false | 4.281281 | false | false | false |
google-research/batch-ppo | agents/tools/streaming_mean.py | 1 | 2386 | # Copyright 2017 The TensorFlow Agents 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 applicable law or ag... | apache-2.0 | -6,516,773,777,547,411,000 | 34.61194 | 77 | 0.695306 | false | 4.023609 | false | false | false |
fiee/croisee | tools/make-wordlist.py | 1 | 1717 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Crossword tool - wordlist
Make a wordlist from a text (in utf-8 encoding)
"""
import os, sys, locale
import re
locale.setlocale(locale.LC_ALL, 'de_DE.utf-8') # affects re's \w
reTEX = re.compile(r'\\\w+')
reNONCHARS = re.compile(r'[^\w\s]')
reSINGLECHAR = re.compile(... | bsd-3-clause | 2,071,075,215,946,813,400 | 26.174603 | 77 | 0.559579 | false | 3.0194 | false | false | false |
dead10ck/pyinvestigate | tests/test_investigate.py | 1 | 13571 | from pprint import pprint
import pytest
import datetime
def assert_keys_in(json_obj, *keys):
for key in keys:
assert key in json_obj
def test_categorization(inv):
keys = ['status', 'content_categories', 'security_categories']
# Test get with a single domain
domain = 'www.amazon.com'
resp_... | mit | 6,935,360,363,237,886,000 | 28.89207 | 106 | 0.604893 | false | 3.244322 | true | false | false |
acutesoftware/AIKIF | scripts/examples/document_AIKIF.py | 1 | 9668 | # document_AIKIF.py written by Duncan Murray 18/4/2014
# All Python Program Statistics
# 26/08/2014 : Files = 110 Bytes = 377221 Lines = 10694 Lines of Code = 8836
# 30/10/2014 : Files = 127 Bytes = 444760 Lines = 12595 Lines of Code = 10409
# 04/03/2015 : Files = 142 Bytes = 572245 Lines = 15947 Li... | gpl-3.0 | -6,544,846,566,864,444,000 | 59.43125 | 157 | 0.696835 | false | 3.478949 | true | false | false |
squeaky-pl/japronto | src/japronto/app/__init__.py | 1 | 8668 | import signal
import asyncio
import traceback
import socket
import os
import sys
import multiprocessing
import faulthandler
import uvloop
from japronto.router import Router, RouteNotFoundException
from japronto.protocol.cprotocol import Protocol
from japronto.protocol.creaper import Reaper
signames = {
int(v): ... | mit | 1,676,336,301,305,192,000 | 31.833333 | 79 | 0.571297 | false | 4.253189 | false | false | false |
JustinTulloss/harmonize.fm | masterapp/masterapp/controllers/people.py | 1 | 3444 | # Profile controller for viewing a friend's profile
from masterapp.lib.base import *
from masterapp.lib.amazon import *
from masterapp.lib.profile import Profile
from masterapp.lib.fbauth import ensure_fb_session
from masterapp.lib.snippets import get_session_user
from masterapp.model import User, Session, Spotlight, ... | mit | 7,324,781,087,550,527,000 | 37.696629 | 180 | 0.617305 | false | 3.683422 | false | false | false |
Brainiq7/Ananse | ananse_dl/extractor/generic.py | 1 | 44347 | # encoding: utf-8
from __future__ import unicode_literals
import os
import re
from .common import InfoExtractor
from .youtube import YoutubeIE
from ..compat import (
compat_urllib_parse,
compat_urlparse,
compat_xml_parse_error,
)
from ..utils import (
determine_ext,
ExtractorError,
float_or_n... | unlicense | 3,751,323,106,039,045,600 | 39.486734 | 256 | 0.485018 | false | 3.478111 | false | false | false |
fernandog/Medusa | ext/sqlalchemy/dialects/oracle/base.py | 1 | 65069 | # oracle/base.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: oracle
:name: Oracle
Oracle version 8 through current (11g ... | gpl-3.0 | 3,446,014,310,109,925,000 | 35.494111 | 105 | 0.580614 | false | 4.118031 | false | false | false |
eternnoir/VSTools | VSTools/fortify.py | 1 | 3867 | # -*- coding: utf-8 -*-
__author__ = 'eternnoir'
import os
from subprocess import Popen, PIPE
SOURCEANALYZERBIN = 'sourceanalyzer'
def __build_dll_args__(folder_path):
ret = ["-libdirs"]
dll_list = get_all_dll_path(folder_path)
if len(dll_list) == 0:
return []
dll_path_string = ""
for d... | apache-2.0 | -8,182,884,734,083,434,000 | 31.779661 | 110 | 0.551849 | false | 3.644675 | false | false | false |
mojaie/kiwiii-server | kiwiii/parser/SpectraMaxM2.py | 1 | 1126 |
import csv
def content_loader(lines):
"""Load datafile from SpectraMax M2.
TODO: multilayer
Args:
lines: lines of input file (or file object)
Returns:
parsed data
"""
bs = 20 # block_size
bo = 1 # block_offset
pr = 16 # plate_rows
ro = 2 # row_offset
pc =... | mit | 6,872,165,025,304,323,000 | 24.590909 | 72 | 0.524867 | false | 3.55205 | false | false | false |
rboyes/KerasScripts | CSVTrainer.py | 1 | 5321 | import os
import datetime
import sys
import time
import string
import random
import pandas as pd
import numpy as np
import gc
if(len(sys.argv) < 2):
print('Usage: CSVTrainer.py train.csv validation.csv model.h5 log.txt')
sys.exit(1)
trainingName = sys.argv[1]
validationName = sys.argv[2]
modelName = sys.... | apache-2.0 | -1,475,973,494,510,279,400 | 41.230159 | 169 | 0.75343 | false | 3.634563 | false | false | false |
sighingnow/Spider-Utils | get-bing-pic/get_bing_pic.py | 1 | 1193 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'He Tao'
'''
This script is used to fetch the picture of bing's mainpage.
Author: He Tao, hetao@mail.com
Date: December 13, 2014
'''
import http.client
import re
from datetime import date
def get_bing_pic():
conn = http.client.HTTP... | mit | 8,263,063,150,923,643,000 | 31.138889 | 93 | 0.58508 | false | 3.043367 | false | false | false |
dreispt/todo_app | TodoClientApp/todo_odoorpc.py | 1 | 1127 | from odoorpc import ODOO
class TodoAPI():
def __init__(self, srv, port, db, user, pwd):
self.api = ODOO(srv, port=port)
self.api.login(db, user, pwd)
self.uid = self.api.env.uid
self.model = 'todo.task'
self.Model = self.api.env[self.model]
def execute(self, method, a... | agpl-3.0 | -8,218,418,337,841,399,000 | 27.175 | 57 | 0.544809 | false | 3.295322 | false | false | false |
mgax/babel | babel/support.py | 1 | 22610 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2011 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://babel.edgewall.org/wiki/License.
#
# This software consists... | bsd-3-clause | -8,950,337,461,798,965,000 | 35.764228 | 80 | 0.601681 | false | 4.313239 | false | false | false |
wilkeraziz/notebooks | MoL_June15/parser.py | 1 | 3853 | from cfg import read_grammar_rules, WCFG
from rule import Rule
from symbol import is_terminal, is_nonterminal, make_symbol
from collections import defaultdict
from item import Item
from agenda import Agenda
def cky_axioms(cfg, sentence):
"""
Axioms for CKY.
Inference rule:
--------------------... | apache-2.0 | 5,860,028,394,567,559,000 | 32.224138 | 101 | 0.568129 | false | 3.803554 | false | false | false |
tfgraph/tfgraph | tfgraph/graph/graph.py | 1 | 12058 | import numpy as np
import tensorflow as tf
from tfgraph.utils.callbacks.update_edge_notifier import UpdateEdgeNotifier
from tfgraph.utils.tensorflow_object import TensorFlowObject, TF_type
def __str__(self) -> str:
return str(self.run_tf(self.L_tf))
class Graph(TensorFlowObject, UpdateEdgeNotifier):
""" Graph ... | apache-2.0 | -2,131,818,151,858,642,400 | 34.154519 | 81 | 0.649278 | false | 3.789441 | false | false | false |
nprapps/dailygraphics | fabfile/flat.py | 1 | 2586 | #!/usr/bin/env python
# _*_ coding:utf-8 _*_
import copy
from fnmatch import fnmatch
import hashlib
import mimetypes
import os
from boto.s3.key import Key
import app_config
import utils
def deploy_file(src, dst, headers={}):
"""
Deploy a single file to S3, if the local version is different.
"""
bucke... | mit | -9,011,076,063,537,600,000 | 24.60396 | 71 | 0.549884 | false | 3.606695 | false | false | false |
Diblo/Pikaptcha | pikaptcha/console.py | 1 | 9224 | import argparse
import sys
import pikaptcha
from pikaptcha.ptcexceptions import *
from pikaptcha.tos import *
from pikaptcha.gmailv import *
from pikaptcha.url import *
from pgoapi.exceptions import AuthException, ServerSideRequestThrottlingException, NotLoggedInException
import pprint
import threading
import getopt
... | gpl-3.0 | -3,893,772,485,044,673,500 | 44.215686 | 163 | 0.591067 | false | 4.036761 | false | false | false |
ScottBuchanan/eden | modules/s3db/deploy.py | 1 | 114755 | # -*- coding: utf-8 -*-
""" Sahana Eden Deployments Model
@copyright: 2011-2015 (c) Sahana Software Foundation
@license: MIT
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 w... | mit | -2,361,572,793,898,173,000 | 39.250789 | 140 | 0.406309 | false | 5.240672 | false | false | false |
DavidNorman/tensorflow | tensorflow/python/ops/parallel_for/array_test.py | 1 | 11942 | # Copyright 2018 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 | 4,554,197,278,193,086,500 | 29.699229 | 88 | 0.595629 | false | 2.931271 | true | false | false |
ip-tools/ip-navigator | patzilla/util/web/uwsgi/uwsgidecorators.py | 1 | 9668 | # https://github.com/unbit/uwsgi/blob/master/uwsgidecorators.py
from functools import partial
import sys
from threading import Thread
try:
import cPickle as pickle
except:
import pickle
import uwsgi
if uwsgi.masterpid() == 0:
raise Exception(
"you have to enable the uWSGI master process to use th... | agpl-3.0 | 957,391,275,148,115,200 | 23.789744 | 102 | 0.543029 | false | 3.405424 | false | false | false |
nate1001/chess_jay | gui.py | 1 | 5079 | '''
Copyright Nate Carson 2012
'''
from PyQt4 import QtCore, QtGui, QtSvg
import db
import data
def setAttackSum(self, forces):
for force in forces:
self._squares[force.tid].setAttackSum(force.c_white, force.c_black)
def setAttackSum(self, c_white, c_black):
c_white, c_black = c_white or 0, c_black o... | gpl-3.0 | -2,556,928,310,813,353,500 | 21.674107 | 97 | 0.689703 | false | 2.887436 | false | false | false |
jimsrc/seatos | mixed/figs/sheaths.paper/src/together4.py | 1 | 11024 | #!/usr/bin/env ipython
from pylab import *
import numpy as np
import console_colors as ccl
from scipy.io.netcdf import netcdf_file
import os, sys
import matplotlib.patches as patches
import matplotlib.transforms as transforms
from numpy import array
from matplotlib.gridspec import GridSpec
import matplotlib.pyplot as p... | mit | 3,020,075,155,036,923,400 | 35.026144 | 124 | 0.444757 | false | 2.583548 | false | false | false |
jenca-cloud/jenca-authentication | storage/storage.py | 1 | 6752 | """
A storage service for use by a Jenca Cloud authentication service.
"""
import os
from flask import Flask, json, jsonify, request, make_response
from flask.ext.sqlalchemy import SQLAlchemy
from flask_jsonschema import JsonSchema, ValidationError
from flask_negotiate import consumes
from requests import codes
db... | mit | -8,743,100,910,322,706,000 | 30.551402 | 79 | 0.659656 | false | 3.734513 | false | false | false |
wxwilcke/MINOS | directives/optima_D1.MP.py | 1 | 8757 | #!/usr/bin/python3
import logging
from operator import itemgetter
from multiprocessing import Process, Manager, Pool, cpu_count
from functools import partial
from math import floor
from timeit import default_timer as timer
import rdflib
from .abstract_instruction_set import AbstractInstructionSet
from readers import r... | gpl-3.0 | 6,560,480,861,544,011,000 | 35.18595 | 111 | 0.518328 | false | 4.146307 | false | false | false |
robotichead/NearBeach | tests/settings.py | 1 | 3530 | """
Django Settings for TESTING PURPOSES
Do not utilise this settings.py file for your own project. Even if it is not
a production environment.
This file is only for the automatic testing and is not build for server use.
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR ... | mit | 4,166,642,644,931,561,000 | 24.955882 | 91 | 0.665722 | false | 3.400771 | false | false | false |
CleverChuk/ices | Python/multijob_module.py | 1 | 3479 | """
Author: Chukwubuikem Ume-Ugwa
Email: chubiyke@gmail.com
MIT License
Copyright (c) 2017 CleverChuk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limit... | mit | -8,221,127,842,817,743,000 | 22.666667 | 83 | 0.716873 | false | 3.188818 | false | false | false |
rudisherry666/paigow | mainsite/settings.py | 1 | 6720 | # Django settings for paigow project.
import os
import sys
# The project starts at mainsite/ rather than top-level at the application,
# but we use a lot of things from the paigow/ folder. Create a global for
# the paigow folder as well.
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__)) # mainsite/
(PAIGO... | apache-2.0 | 5,428,095,244,374,039,000 | 32.768844 | 86 | 0.70372 | false | 3.599357 | false | false | false |
mola/qgis | python/plugins/GdalTools/tools/widgetPluginBase.py | 1 | 5107 | # -*- coding: utf-8 -*-
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from dialogBase import GdalToolsBaseDialog as BaseDialog
import GdalTools_utils as Utils
class GdalToolsBasePluginWidget:
def __init__(self, iface, commandName, helpFileBaseName = None, paren... | gpl-2.0 | 3,448,043,704,059,595,300 | 30.91875 | 118 | 0.644801 | false | 3.478883 | false | false | false |
ImpregnableProgrammer/Advent-of-Code | 2016/Day_10.py | 1 | 2375 | import re
# First Part
def First_Part(s):
Bot_Dict = {}
g=0
s=s.split('\n')
while 1:
p=re.sub('(?<=output )\d+',lambda k:str(-int(k.group(0))-1),s[g%len(s)])
G=re.findall('-?\d+',p)
if p[:3]=='bot' and G[0] in Bot_Dict.keys() and len(Bot_Dict[G[0]])>1:
if sorted(Bot_Dict[G[0]]... | gpl-3.0 | -5,439,650,238,929,213,000 | 35.538462 | 145 | 0.442526 | false | 2.37976 | false | false | false |
udrg/kalibr | aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccCalibrator.py | 4 | 9778 | import aslam_backend as aopt
import aslam_splines as asp
import IccUtil as util
import incremental_calibration as inc
import kalibr_common as kc
import sm
import gc
import numpy as np
import multiprocessing
import sys
# make numpy print prettier
np.set_printoptions(suppress=True)
CALIBRATION_GROUP_ID = 0
HELPER_GROU... | bsd-3-clause | 5,931,766,575,764,862,000 | 40.786325 | 141 | 0.614645 | false | 3.978031 | true | false | false |
bruckhaus/challenges | python_challenges/project_euler/p003_largest_prime_factor.py | 1 | 1769 | __author__ = 'tilmannbruckhaus'
# Largest prime factor
# Problem 3
# The prime factors of 13195 are 5, 7, 13 and 29.
# What is the largest prime factor of the number 600851475143 ?
class LargestPrimeFactor:
def __init__(self):
pass
@staticmethod
def is_divisible(number, divisor):
return ... | mit | 2,894,715,118,117,097,500 | 28.483333 | 70 | 0.573205 | false | 3.862445 | false | false | false |
mfriesen/tentacle | src/tentacle/dht/dht_bucket_routing_table.py | 1 | 4577 | from tentacle.dht.routing_table import DHTRoutingTable, distance
from math import pow
MAX_BUCKET_SIZE = 8
class DHTBucket(object):
def __init__(self):
self._nodes = dict()
def add_node(self, dhtNode):
self._nodes[dhtNode._id] = dhtNode
def is_bucket_full(self):
return len(self._... | apache-2.0 | 9,090,170,006,814,538,000 | 33.938931 | 136 | 0.544243 | false | 3.885399 | false | false | false |
kadaradam/ScavengeSurvive | misc/coordheatmap.py | 2 | 1715 | import timeit
import os
import copy
import io
import re
import itertools as IT
from PIL import Image, ImageDraw, ImageColor, ImageFont
import heatmap
o = re.compile(r'CreateObject\(([0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[0-9]+),\s*([\-\+]?[0-9]*\.[... | gpl-3.0 | -9,063,381,471,335,428,000 | 18.055556 | 206 | 0.579592 | false | 2.381944 | false | false | false |
lonnon/passphrase | passphrase.py | 1 | 1042 | #!/usr/bin/env python
# passphrase
#
# Generates a passphrase from random words (four by default, number may
# be specified as first argument on command line). By default, words are
# between 6 and 10 characters in length. Different minimum and maximum
# word lengths may be specified in the seconda and third command l... | mit | -5,795,021,236,046,037,000 | 27.944444 | 99 | 0.709213 | false | 3.544218 | false | false | false |
nkrim/passwordgen | src/worddict.py | 1 | 4612 | # Copyright 2017 Noah Krim
# 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, softw... | apache-2.0 | 5,221,395,958,406,475,000 | 26.458333 | 101 | 0.656982 | false | 3.078772 | false | false | false |
wavefrontHQ/python-client | wavefront_api_client/api/access_policy_api.py | 1 | 11678 | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | apache-2.0 | -3,054,239,166,946,904,600 | 36.073016 | 409 | 0.577582 | false | 4.142604 | false | false | false |
back-to/streamlink | src/streamlink/plugins/crunchyroll.py | 1 | 13696 | import argparse
import datetime
import re
import logging
from uuid import uuid4
from streamlink.plugin import Plugin, PluginError, PluginArguments, PluginArgument
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)
STREAM_WEIGHTS = {
"low": 240,
... | bsd-2-clause | -3,545,327,950,360,098,000 | 34.208226 | 120 | 0.555637 | false | 4.129032 | false | false | false |
chjost/clebsch_gordan | group/quat.py | 1 | 6929 | """Class for the quaternions with inversion."""
import numpy as np
import utils
# quaternion parameters for the group O from Table 71.1 in:
# Simon L. Altmann, Peter Herzig, "Point-Group Theory Tables",
# Second Edition (corrected), Wien (2011)
V12 = np.sqrt(0.5) # sqrt(1/2)
# [[ lambda, Lambda_1, Lambda_2, Lambd... | gpl-3.0 | 2,441,700,839,144,792,600 | 33.645 | 106 | 0.405542 | false | 2.505061 | false | false | false |
kmee/odoo-brazil-banking | l10n_br_account_banking_payment_cnab/model/payment_mode.py | 1 | 2946 | # -*- coding: utf-8 -*-
# #############################################################################
#
#
# Copyright (C) 2012 KMEE (http://www.kmee.com.br)
# @author Fernando Marcato Rodrigues
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 | -2,867,324,621,362,343,400 | 37.025974 | 79 | 0.625683 | false | 3.267857 | false | false | false |
cortesi/qtile | libqtile/widget/prompt.py | 1 | 27051 | # -*- coding: utf-8 -*-
# Copyright (c) 2010-2011 Aldo Cortesi
# Copyright (c) 2010 Philip Kranz
# Copyright (c) 2011 Mounier Florian
# Copyright (c) 2011 Paul Colomiets
# Copyright (c) 2011-2012 roger
# Copyright (c) 2011-2012, 2014 Tycho Andersen
# Copyright (c) 2012 Dustin Lacewell
# Copyright (c) 2012 Laurie Clark-... | mit | -8,826,329,168,637,638,000 | 35.548649 | 91 | 0.542742 | false | 4.223298 | false | false | false |
TheGhostHuCodes/spy_dir | spy_dir.py | 1 | 2182 | #!/usr/bin/env python
import os
import os.path as pt
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import argparse
#TODO: take decimal places as parameter for printing.
def sizeof_pp(num):
for unit in ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB']:
if abs(num) < 1024.... | apache-2.0 | -7,296,327,831,960,544,000 | 32.569231 | 73 | 0.597617 | false | 3.393468 | false | false | false |
jfunction/capetown_loadshedding_map | convert_json.py | 1 | 1792 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# convert_json.py
#
# Copyright 2014 Jared <jarednorman@hotmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 o... | gpl-2.0 | 7,618,190,367,658,015,000 | 32.185185 | 85 | 0.679129 | false | 3.089655 | false | false | false |
enthought/traitsgui | enthought/pyface/workbench/i_view.py | 1 | 4139 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions describe... | bsd-3-clause | 3,023,312,889,010,713,600 | 28.147887 | 79 | 0.525489 | false | 4.528446 | false | false | false |
gyllstar/appleseed | pox/openflow/libopenflow_01.py | 1 | 126928 | # Copyright 2011 James McCauley
#
# This file is part of POX.
#
# POX 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 version.
#
# POX is distri... | gpl-3.0 | -4,535,113,689,394,153,000 | 30.155621 | 260 | 0.603704 | false | 3.171376 | false | false | false |
alvarop/silta | sw/examples/drivers/max31855.py | 1 | 1403 | #!/usr/bin/env python
#
# SPI example (using the STM32F407 discovery board)
#
import sys
import time
import ctypes
from silta import stm32f407
def bytes_to_int(byte_list):
num = 0
for byte in range(len(byte_list)):
num += byte_list[byte] << ((len(byte_list) - 1 - byte) * 8)
return num
class MA... | bsd-2-clause | -733,949,490,846,603,800 | 22.779661 | 77 | 0.543835 | false | 3.438725 | false | false | false |
OpusVL/odoo-trading-as | trading_as/res_partner.py | 1 | 1361 | # -*- coding: utf-8 -*-
##############################################################################
#
# Trading As Brands
# Copyright (C) 2015 OpusVL (<http://opusvl.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 | -7,650,469,349,843,259,000 | 35.783784 | 82 | 0.622337 | false | 4.320635 | false | false | false |
fedebell/Laboratorio3 | Laboratorio2/GraficiBestFit/fitAnalistico.py | 1 | 1562 | import numpy
import pylab
from scipy.optimize import curve_fit
import math
import scipy.stats
V, dV, I, dI = pylab.loadtxt("data00.txt", unpack="True")
#Best fit analitico
#Dy e Dx sono le colonne di errori
x = V
Dx = dV
y = I
Dy = dI
#set error an statistical weight
sigma = Dy
w = 1/(sigma**2)
#determine the coeff... | gpl-3.0 | -3,018,592,897,091,491,300 | 20.39726 | 59 | 0.637004 | false | 2.303835 | false | false | false |
claudep/translate | translate/tools/pydiff.py | 1 | 12227 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2005, 2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 ... | gpl-2.0 | -3,536,485,142,706,997,000 | 43.300725 | 122 | 0.559254 | false | 4.157429 | false | false | false |
swiharta/radres | polls/pygooglechart.py | 1 | 22228 | """
PyGoogleChart - A complete Python wrapper for the Google Chart API
http://pygooglechart.slowchop.com/
Copyright 2007 Gerald Kaszuba
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either versio... | mit | 5,788,875,282,920,004,000 | 30.131653 | 79 | 0.549667 | false | 3.714572 | false | false | false |
marvin-jens/fast_ska | setup.py | 1 | 2027 | from setuptools import setup
from setuptools.extension import Extension
try:
from Cython.Distutils import build_ext
from Cython.Build import cythonize
except ImportError:
use_cython = False
else:
use_cython = True
cmdclass = { }
ext_modules = [ ]
if use_cython:
ext_modules += [
#Extension... | mit | 7,618,767,076,867,865,000 | 30.671875 | 153 | 0.622595 | false | 3.658845 | false | false | false |
the-virtual-brain/tvb-hpc | examples/btest.py | 1 | 1617 | import numpy as np
import loopy as lp
target = lp.CudaTarget()
kernel = lp.make_kernel(
"{ [i_node,j_node]: 0<=i_node,j_node<n_node}",
"""
<float32> coupling_value = params(1)
<float32> speed_value = params(0)
<float32> dt=0.1
<float32> M_PI_F = 2.0
<float32> rec_n = 1.0f / n_node
<float32> rec_speed_dt = 1... | apache-2.0 | 4,293,833,689,267,461,600 | 31.34 | 111 | 0.589363 | false | 2.248957 | false | false | false |
zaxliu/deepnap | experiments/kdd-exps/experiment_DynaQNN_130_Feb10_2317.py | 1 | 5180 | # System built-in modules
import time
from datetime import datetime
import sys
import os
from multiprocessing import Pool
# Project dependency modules
import pandas as pd
pd.set_option('mode.chained_assignment', None) # block warnings due to DataFrame value assignment
import lasagne
# Project modules
sys.path.append('... | bsd-3-clause | 2,491,388,140,847,407,000 | 33.304636 | 103 | 0.653089 | false | 2.915025 | false | false | false |
ebeshero/Pittsburgh_Frankenstein | collateXPrep/svg_tester_collation.py | 1 | 6475 | from typing import Pattern
from collatex import *
from xml.dom import pulldom
import string
import re
import json
import glob
regexWhitespace = re.compile(r'\s+')
regexNonWhitespace = re.compile(r'\S+')
regexEmptyTag = re.compile(r'/>$')
regexBlankLine = re.compile(r'\n{2,}')
regexLeadingBlankLine = re.compile(r'^\n'... | agpl-3.0 | 7,758,116,176,600,863,000 | 50.388889 | 119 | 0.681699 | false | 3.511388 | false | false | false |
kedz/sumpy | sumpy/io.py | 1 | 4037 | import os
import re
import pandas as pd
def load_duc_docset(input_source):
docs = DucSgmlReader().read(input_source)
return docs
def load_duc_abstractive_summaries(input_source):
models = DucAbstractSgmlReader().read(input_source)
return models
class FileInput(object):
def gather_paths(self, sou... | apache-2.0 | 687,597,557,010,788,500 | 37.447619 | 80 | 0.494179 | false | 3.81569 | false | false | false |
fabianekc/n7 | n7.py | 1 | 2906 | #!/usr/bin/python
import urllib, inflect, string, json, sys, Algorithmia
# tests
# python n7.py '{"h2t":"http://slashdot.org", "auth":"API_KEY"}'
# python n7.py '{"url":"http://derstandard.at"}'
# python n7.py '{"text":"life is a miracle"}'
# initialize
p = inflect.engine()
text = ""
offset = 7
start_line = -1
... | mit | -1,707,470,970,441,594,400 | 30.934066 | 102 | 0.569511 | false | 3.313569 | false | false | false |
mathiasertl/django-ca | ca/django_ca/management/commands/init_ca.py | 1 | 10835 | # This file is part of django-ca (https://github.com/mathiasertl/django-ca).
#
# django-ca 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 version... | gpl-3.0 | -3,941,580,537,189,006,000 | 38.115523 | 110 | 0.602492 | false | 4.292789 | false | false | false |
hipikat/django-revkom | revkom/utils/mixins.py | 1 | 4147 | """
Generic mixins for classes.
"""
from functools import partial
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
class GetSettingsMixin(object):
"""
A generic class mixin which adds a _get_settings() method, which will
return a tuple of settings or throw appropri... | bsd-2-clause | 7,571,993,220,421,842,000 | 33.558333 | 83 | 0.600434 | false | 4.073674 | false | false | false |
csirtgadgets/bearded-avenger | test/zsqlite/test_store_sqlite_tokens.py | 1 | 5082 | import logging
import os
import tempfile
from argparse import Namespace
import pytest
from cif.store import Store
from cifsdk.utils import setup_logging
import arrow
from datetime import datetime
from pprint import pprint
from cifsdk.exceptions import AuthError
args = Namespace(debug=True, verbose=None)
setup_logging(... | mpl-2.0 | 5,524,347,594,183,835,000 | 23.4375 | 87 | 0.561196 | false | 3.529167 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.