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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mariusbaumann/pyload | module/plugins/accounts/PremiumTo.py | 1 | 1286 | # -*- coding: utf-8 -*-
from module.plugins.Account import Account
class PremiumTo(Account):
__name__ = "PremiumTo"
__type__ = "account"
__version__ = "0.06"
__description__ = """Premium.to account plugin"""
__license__ = "GPLv3"
__authors__ = [("RaNaN", "RaNaN@pyload.org"),
... | gpl-3.0 | 4,571,049,506,377,407,500 | 34.722222 | 90 | 0.547434 | false | 3.738372 | false | false | false |
drewmoore/python-koans | python3/koans/about_generators.py | 1 | 4571 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Written in place of AboutBlocks in the Ruby Koans
#
# Note: Both blocks and generators use a yield keyword, but they behave
# a lot differently
#
from runner.koan import *
class AboutGenerators(Koan):
def test_generating_values_on_the_fly(self):
result =... | mit | -7,604,709,203,030,380,000 | 30.308219 | 94 | 0.564209 | false | 4.006135 | true | false | false |
lkundrak/scraperwiki | uml/httpproxy/swproxy.py | 1 | 1826 | import sys
from twisted.web import proxy, http
from twisted.python import log
log.startLogging(sys.stdout)
class ScraperProxyClient(proxy.ProxyClient):
def handleHeader( self, key, value ):
proxy.ProxyClient.handleHeader(self, key, value)
def handleResponsePart(self, data):
proxy.Pr... | agpl-3.0 | -5,316,903,653,732,609,000 | 24.375 | 74 | 0.629244 | false | 4.226852 | false | false | false |
BartMassey/oregon-mileage | reduce-mileages.py | 1 | 1800 | # Copyright © 2014 Bart Massey
# [This work is licensed under the "MIT License"]
# Please see the file COPYING in the source
# distribution of this software for license terms.
# Given a mileage list, reduce it to a minimal set of edges
# that imply the same mileages.
# Strategy: Fill the whole list of edges into the
... | mit | -6,409,248,396,742,954,000 | 26.676923 | 70 | 0.473596 | false | 3.117851 | false | false | false |
eukaryote/asn1crypto | asn1crypto/tsp.py | 1 | 8059 | # coding: utf-8
"""
ASN.1 type classes for the time stamp protocol (TSP). Exports the following
items:
- TimeStampReq()
- TimeStampResp()
Also adds TimeStampedData() support to asn1crypto.cms.ContentInfo(),
TimeStampedData() and TSTInfo() support to
asn1crypto.cms.EncapsulatedContentInfo() and some oids and value ... | mit | -1,249,433,928,822,161,400 | 24.996774 | 101 | 0.617446 | false | 3.464746 | false | false | false |
zjurelinac/pyFrisc | assembler.py | 1 | 14214 | from itertools import chain
from math import ceil, log
from utils import *
import os.path
import re
import sys
import yaml
data = dict()
labels = dict()
memory = []
maxnum = 0
# Helper
def show_error( s ):
return s, False
# Helper
def round_to_word( i ):
return int( int( i/data[ 'consts' ][ 'words_per_line'... | mit | 4,892,226,237,462,093,000 | 34.358209 | 126 | 0.459195 | false | 3.228253 | false | false | false |
deontp/misc | zenoic_api/cve-search-master/sbin/db_mgmt_cwe.py | 1 | 3714 | #!/usr/bin/env python3
#
# Import script of NIST CWE Common Weakness Enumeration.
#
# Until now, the import is only import Weakness description.
#
# The format is the following:
#
# { "_id" : ObjectId("52b70521b261026f36818515"), "weaknessabs" : "Variant",
# "name" : "ASP.NET Misconfiguration: Missing Custom Error Page... | gpl-3.0 | 4,526,201,600,850,099,700 | 34.711538 | 123 | 0.686322 | false | 3.571154 | false | false | false |
mennis/oTTo | src/otto/lib/ethdrv.py | 1 | 8288 | from otto.lib.compute import average, standard_dev
from otto.lib.otypes import ReturnCode
from otto.lib.solaris import release_parse
from otto.utils import timefmt
def cmp_aoestat_devices(a, d):
# if a.device != d.device or a.size != d.size:
if a.size != d.size:
return ReturnCode(False, 'aoestat %s do... | bsd-3-clause | -7,500,629,519,187,409,000 | 33.106996 | 95 | 0.534146 | false | 3.359546 | true | false | false |
PhillsProgrammingExperiments/runtime_context | contexting_lib/decorators.py | 1 | 1661 | from contexting_lib.runtime_context import ContextDependentFunction, RuntimeContext
def default(foo):
runtime_context = RuntimeContext()
def_p_ctx = runtime_context.default_process_context
def_t_ctx = runtime_context.default_thread_context
runtime_context._contexts_to_foo_mapping \
[foo.__qualn... | mit | -6,346,212,727,357,678,000 | 35.130435 | 83 | 0.614088 | false | 4.1525 | false | false | false |
AdriaanRol/AutoDepGraph | autodepgraph/tests/test_graph.py | 1 | 7160 | from unittest import TestCase, expectedFailure
from autodepgraph import visualization as vis
import autodepgraph as adg
import networkx as nx
from autodepgraph.graph import AutoDepGraph_DAG
import yaml
import os
test_dir = os.path.join(adg.__path__[0], 'tests', 'test_data')
class Test_Graph(TestCase):
@classmeth... | mit | 1,161,567,346,362,417,000 | 40.627907 | 98 | 0.609358 | false | 3.654926 | true | false | false |
crateio/crate.web | crate/web/dashboard/modules.py | 2 | 1435 | import collections
import datetime
import redis
from django.conf import settings
from django.utils.timezone import utc
from admin_tools.dashboard.modules import DashboardModule
class StatusModule(DashboardModule):
title = "Status"
template = "admin_tools/dashboard/modules/status.html"
def init_with_c... | bsd-2-clause | 6,472,937,229,180,296,000 | 31.613636 | 132 | 0.661324 | false | 3.857527 | false | false | false |
zillians/supercell | scripts/set_xml.py | 1 | 1678 | #!/usr/bin/env python
from xml.dom.minidom import parse, parseString
import getopt
import sys
class DomHandler():
def __init__(self, file_name):
self.dom = parse(file_name)
def setValue(self, attr_name, attr_value):
result = False
for node in self.dom.getElementsByTagName('parameter'):
if node.getAttribut... | agpl-3.0 | 1,887,179,124,444,890,400 | 24.815385 | 110 | 0.662694 | false | 2.913194 | false | false | false |
ablil98/python | bhp/joomla_killer.py | 1 | 3126 | #!/usr/bin/env python3
import threading
import queue
import http.cookiejar
import urllib.request
import urllib.parse
import time
import pdb
from html.parser import HTMLParser
# general variables
threads = 1
username = 'admin'
wordlist_file = 'passwords.lst'
resume = None # password to resume from
# target variables
t... | gpl-3.0 | 1,010,688,772,363,187,200 | 24.008 | 106 | 0.680102 | false | 3.206154 | false | false | false |
slek120/phys534 | HW4/Aw.py | 1 | 1191 | from scipy import *
from scipy.integrate import simps
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
def Compute_Aw(om, DOS, Sig, ommesh, delta=0.1j):
Aw = zeros(len(om))
for i in range(len(om)):
DMFTW = DOS / (om[i] - Sig[i] - ommesh + delta)
Aw[i] = simps(-1.*DMFTW.imag/pi, omme... | gpl-3.0 | -4,123,881,550,766,441,000 | 21.903846 | 51 | 0.650714 | false | 2.465839 | false | false | false |
google/ffn | ffn/training/import_util.py | 1 | 1882 | # Copyright 2017 Google 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 2,617,406,135,293,789,000 | 35.192308 | 80 | 0.689692 | false | 4.248307 | false | false | false |
guixing/simplecmdb | hostinfo/models.py | 1 | 1100 | from django.db import models
class Host(models.Model):
"""store host information"""
hostname = models.CharField(max_length=30)
osver = models.CharField(max_length=30)
vendor = models.CharField(max_length=30)
product = models.CharField(max_length=30)
cpu_model = models.CharField(max_length=30)
... | bsd-3-clause | 6,485,501,293,390,478,000 | 32.333333 | 69 | 0.702727 | false | 3.536977 | false | false | false |
andyzsf/django | django/contrib/gis/gdal/driver.py | 1 | 3257 | from ctypes import c_void_p
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import OGRException
from django.contrib.gis.gdal.prototypes import ds as vcapi, raster as rcapi
from django.utils import six
from django.utils.encoding import force_bytes, force_text
class Driver(GDALBase... | bsd-3-clause | 3,520,037,014,693,149,700 | 32.57732 | 103 | 0.580596 | false | 4.025958 | false | false | false |
airbnb/streamalert | publishers/community/generic.py | 1 | 9345 | """
Copyright 2017-present Airbnb, 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, sof... | apache-2.0 | 7,216,611,972,438,715,000 | 33.230769 | 101 | 0.656929 | false | 4.479866 | false | false | false |
i-kiwamu/jwis | jwis/__init__.py | 1 | 1554 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import date, timedelta
import sys
import pandas as pd
import codecs
from .jwislib import JWIS
sys_encoding = sys.stdout.encoding
try:
input = raw_input
except NameError:
pass
def ask_date():
print("Beginning date")
d_start_year = int(input... | gpl-3.0 | -16,430,081,994,334,884 | 22.907692 | 61 | 0.593951 | false | 2.915572 | false | false | false |
ericmjl/influenza-reassortment-detector | second_search.py | 1 | 1571 | import networkx as nx
import numpy as np
import pickle as pkl
import sys
class SecondSearchIdentifier(object):
"""
SecondSearchIdentifier
Identifies isolates for which a source pair search will be performed.
"""
def __init__(self, handle, percentile):
super(SecondSearchIdentifier, self).__init__()
self.han... | mit | -8,981,593,487,873,865,000 | 27.071429 | 90 | 0.705283 | false | 2.82554 | false | false | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/core/ops/__init__.py | 1 | 55485 | """
Arithmetic operations for PandasObjects
This is not a public API.
"""
import datetime
import operator
import textwrap
from typing import Any, Callable
import warnings
import numpy as np
from pandas._libs import Timedelta, Timestamp, lib, ops as libops
from pandas.errors import NullFrequencyError
from pandas.util... | apache-2.0 | 6,046,639,829,361,250,000 | 30.796562 | 88 | 0.572749 | false | 3.972578 | false | false | false |
debalance/hp | hp/core/constants.py | 1 | 1561 | # -*- coding: utf-8 -*-
#
# This file is part of the jabber.at homepage (https://github.com/jabber-at/hp).
#
# This project 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 (... | gpl-3.0 | -4,503,386,072,711,604,000 | 32.934783 | 99 | 0.728379 | false | 3.572082 | false | false | false |
Masood-M/yalih | honeypot.py | 1 | 6809 | #! /usr/bin/env python
import time
import threading
import os, sys, Queue
from time import gmtime, strftime
from itertools import groupby
from operator import itemgetter
import os.path
import imapfile
import logging
import honeypotconfig
import scan
import bing
import executemechanize
import malwebsites
import normali... | apache-2.0 | 7,934,120,239,446,023,000 | 25.597656 | 322 | 0.708474 | false | 3.095 | false | false | false |
proximate/proximate | userpresence.py | 1 | 1863 | #
# Proximate - Peer-to-peer social networking
#
# Copyright (c) 2008-2011 Nokia Corporation
#
# All rights reserved.
#
# This software is licensed under The Clear BSD license.
# See the LICENSE file for more details.
#
from plugins import Plugin, get_plugin_by_type
from proximateprotocol import PLUGIN_TYPE_COMMUNITY, ... | bsd-3-clause | 5,973,490,620,666,871,000 | 27.227273 | 104 | 0.640902 | false | 3.631579 | false | false | false |
desarrollosimagos/svidb | administrativo/actores/bancoaudio.py | 1 | 5678 | # -*- coding: utf8
from gestion.models import *
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext, loader
from actores.models import *
from areas.models import *
from especies.mode... | gpl-3.0 | 5,877,501,885,763,019,000 | 36.364865 | 188 | 0.664142 | false | 3.216997 | false | false | false |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/userdata/addon_data/plugin.video.p2p-streams/acestream/ace/ACEStream/Core/APIImplementation/makeurl.py | 1 | 8330 | #Embedded file name: ACEStream\Core\APIImplementation\makeurl.pyo
import sys
import urlparse
import urllib
import math
#if sys.platform != 'win32':
# import curses.ascii
from types import IntType, LongType
from struct import pack, unpack
from base64 import b64encode, b64decode
from M2Crypto import Rand
from tracebac... | apache-2.0 | -7,401,510,805,719,010,000 | 28.964029 | 88 | 0.560624 | false | 3.550725 | false | false | false |
teknolab/teknolab-wapiti | wapiti/file/auxtext.py | 1 | 1712 | #!/usr/bin/env python
# XML Report Generator Module for Wapiti Project
# Wapiti Project (http://wapiti.sourceforge.net)
#
# David del Pozo
# Alberto Pastor
# Copyright (C) 2008 Informatica Gesfor
# ICT Romulus (http://www.ict-romulus.eu)
#
# This program is free software; you can redistribute it and/or modify
# it und... | gpl-2.0 | -7,611,681,490,759,631,000 | 31.301887 | 76 | 0.626752 | false | 3.9447 | false | false | false |
liyangbit/liyangbit.github.io | _to-ipynb.py | 1 | 4868 | import os, re
import shutil
import csv
import datetime
# Main
thepath = os.getcwd()
ipynb_path = os.path.join(thepath, 'ipynb')
yaml_csv_path = os.path.join(ipynb_path, r'_post_head.csv')
today = datetime.datetime.today()
today = '{}-{:0>2d}-{:0>2d}'.format(today.year, today.month, today.day)
# Read head string from... | mit | 7,849,797,015,370,449,000 | 37.944 | 114 | 0.604766 | false | 3.098663 | false | false | false |
gzamboni/sdnResilience | loxi/of12/action.py | 1 | 32027 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... | gpl-2.0 | 3,260,647,571,613,940,000 | 27.317418 | 88 | 0.518843 | false | 3.653131 | false | false | false |
Juanlu001/CBC.Solve | cbc/flow/saddlepointsolver.py | 1 | 7125 | __author__ = "Marie E. Rognes"
__copyright__ = "Copyright (C) 2012 Simula Research Laboratory and %s" % __author__
__license__ = "GNU GPL Version 3 or any later version"
# Last changed: 2012-05-01
__all__ = ["TaylorHoodSolver"]
from dolfin import *
from cbc.common.utils import *
from cbc.common import *
class Tayl... | gpl-3.0 | 742,052,942,741,142,500 | 30.113537 | 84 | 0.543298 | false | 3.66701 | false | false | false |
GaretJax/irco | irco/migrations/env.py | 1 | 2676 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import dictConfig
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config file for Python... | mit | 2,895,014,743,879,245,000 | 24.730769 | 69 | 0.610613 | false | 4.091743 | true | false | false |
MadsJensen/malthe_alpha_project | make_inverse_operator.py | 1 | 1501 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 31 10:00:32 2015
@author: mje
"""
import mne
from mne.minimum_norm import (make_inverse_operator, apply_inverse,
write_inverse_operator)
import socket
import numpy as np
import matplotlib.pyplot as plt
# Setup paths and prepare raw data
host... | mit | 4,213,506,564,462,215,000 | 30.93617 | 75 | 0.655563 | false | 3.146751 | false | false | false |
tyler274/Recruitment-App | recruit_app/ia/views.py | 1 | 1374 | from flask import Blueprint, render_template, flash, redirect, request, url_for, current_app
from flask_security.decorators import login_required
from flask_security import current_user
from recruit_app.ia.managers import IaManager
from recruit_app.user.eve_api_manager import EveApiManager
from recruit_app.ia.forms i... | bsd-3-clause | -1,894,737,977,002,553,900 | 40.666667 | 103 | 0.676128 | false | 3.754098 | false | false | false |
menegazzo/travispy | travispy/entities/repo.py | 2 | 2715 | from ._stateful import Stateful
class Repo(Stateful):
'''
:ivar str slug:
Repository slug.
:ivar str description:
Description on |github|.
:ivar int last_build_id:
Build ID of the last executed build.
:ivar str last_build_number:
Build number of the last executed... | gpl-3.0 | -575,740,151,106,898,900 | 24.857143 | 91 | 0.559116 | false | 4.202786 | false | false | false |
isarn/isarn-sketches-spark | python/isarnproject/sketches/spark/tdigest.py | 1 | 14993 | import sys
import random
import itertools as it
from bisect import bisect_left, bisect_right
from pyspark.sql.types import UserDefinedType, StructField, StructType, \
ArrayType, DoubleType, IntegerType
from pyspark.sql.column import Column, _to_java_column, _to_seq
from pyspark.context import SparkContext
__all__... | apache-2.0 | -8,566,851,161,304,078,000 | 38.981333 | 106 | 0.649503 | false | 3.575721 | false | false | false |
ntuecon/pubfin | economy/agents.py | 1 | 5147 | '''
Created on Apr 16, 2018
@author: Hendrik Rommeswinkel
'''
import numpy as np
from scipy.optimize import minimize
from utility import Utility,Profit,GoodFactorUtility,CESUtility
from technology import LinearTechnology
from technology import DRSTechnology
class Agent(object):
'''
An agent conta... | bsd-3-clause | 151,333,219,942,449,920 | 37.914729 | 146 | 0.608316 | false | 4.154157 | false | false | false |
otraczyk/gsevol-web | bindings/urec.py | 1 | 1651 | # -*- coding: utf-8 -*-
"""Bindings related to unrooted recocilation.
Using `fasturec` and `gsevol`.
"""
import tempfile
from collections import defaultdict
from bindings.base import launch
from bindings import gsevol as Gse
from bindings.utils import wrap_in_tempfile
def launch_fasturec(params, timeout=300, stdin=N... | mit | -6,543,209,536,789,756,000 | 38.309524 | 98 | 0.651726 | false | 3.126894 | false | false | false |
codesociety/friartuck | friartuck/Robinhood/trade_history_downloader.py | 1 | 2942 | """
MIT License
Copyright (c) 2017 Code Society
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, merge, publish, ... | mit | -2,211,343,214,784,098,300 | 35.320988 | 124 | 0.704623 | false | 3.757344 | false | false | false |
kevinjqiu/mockingjay | mockingjay/matcher.py | 1 | 2117 | import abc
import base64
import re
class StringOrPattern(object):
"""
A decorator object that wraps a string or a regex pattern so that it can
be compared against another string either literally or using the pattern.
"""
def __init__(self, subject):
self.subject = subject
def __eq__(s... | bsd-3-clause | 7,529,588,538,709,815,000 | 25.4625 | 78 | 0.629192 | false | 4.094778 | false | false | false |
dougalsutherland/py-sdm | sdm/mp_utils.py | 1 | 5214 | '''
Some convenince methods for use with multiprocessing.Pool.
'''
from __future__ import division, print_function
from contextlib import contextmanager
import itertools
import multiprocessing as mp
import os
import random
import string
from .utils import strict_map, imap, izip
def _apply(func_args):
func, args... | bsd-3-clause | 6,525,598,132,934,458,000 | 29.138728 | 79 | 0.641158 | false | 3.929164 | false | false | false |
DjangoQuilla/temii | votos/urls.py | 2 | 1862 | """votos URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based... | apache-2.0 | 9,124,189,688,081,066,000 | 37 | 77 | 0.668099 | false | 3.210345 | false | false | false |
shingonoide/odoo_ezdoo | addons/website_maintenance/controllers/main.py | 1 | 2661 | import logging
from openerp.http import request
import werkzeug
from openerp.addons.web import http
from openerp.addons.website.controllers.main import Website
logger = logging.getLogger(__name__)
class WebsiteMaintenance(Website):
def is_maintenance_mode(self):
is_on = ['on', '1', 'true', 'yes']
... | agpl-3.0 | -3,009,250,158,980,615,000 | 38.716418 | 79 | 0.550169 | false | 4.435 | false | false | false |
Belxjander/Kirito | SnowStorm/indra/fix-incredibuild.py | 1 | 2220 | #!/usr/bin/env python
##
## $LicenseInfo:firstyear=2011&license=viewerlgpl$
## Second Life Viewer Source Code
## Copyright (C) 2011, Linden Research, Inc.
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser General Public
## License as published by the Fr... | gpl-3.0 | 4,947,040,908,959,312,000 | 35.393443 | 81 | 0.651351 | false | 3.529412 | false | false | false |
pratikgujjar/DeepIntent | code/autoencoder_model/scripts/ds_autoencoder.py | 1 | 15225 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import hickle as hkl
import numpy as np
np.random.seed(2 ** 10)
from keras import backend as K
K.set_image_dim_ordering('tf')
from keras.layers import Dropout
from keras.models import Sequential
from keras.lay... | mit | 2,274,764,787,847,387,000 | 36.227384 | 116 | 0.59711 | false | 3.393136 | true | false | false |
OCA/l10n-brazil | l10n_br_nfe/models/res_company.py | 1 | 3081 | # Copyright 2019 Akretion (Raphaël Valyi <raphael.valyi@akretion.com>)
# Copyright 2019 KMEE INFORMATICA LTDA
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import api, fields
from odoo.addons.spec_driven_model.models import spec_models
from ..constants.nfe import (
NFE_ENVIRONMENT_DE... | agpl-3.0 | -1,786,924,351,013,670,700 | 35.235294 | 88 | 0.63961 | false | 3.198339 | false | false | false |
google-research/language | language/boolq/utils/best_checkpoint_exporter.py | 1 | 4132 | # coding=utf-8
# Copyright 2018 The Google AI Language Team 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 ... | apache-2.0 | -1,810,089,931,885,031,700 | 34.316239 | 76 | 0.659003 | false | 3.957854 | false | false | false |
cadencewatches/frappe | frappe/utils/email_lib/bulk.py | 1 | 4862 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
import HTMLParser
import urllib
from frappe import msgprint, throw, _
from frappe.utils.email_lib.smtp import SMTPServer
from frappe.utils.email_lib.email_body im... | mit | -8,974,642,157,343,609,000 | 32.531034 | 100 | 0.693542 | false | 3.159194 | false | false | false |
hzmangel/wp2hugo | wp_parser.py | 1 | 3688 | from lxml import etree
class WordpressXMLParser:
def __init__(self, xml_file):
self.tree = etree.parse(xml_file)
self.ns = self.tree.getroot().nsmap
def get_meta(self):
return {
"title": str(self.tree.xpath("/rss/channel/title/text()")[0]),
"baseurl": str(self.... | mit | 743,162,522,983,472,900 | 42.904762 | 124 | 0.532538 | false | 3.472693 | false | false | false |
jfunez/poliwall | poliwall/apps/polisessions/migrations/0002_auto__add_actioncategory__add_field_action_category.py | 1 | 5819 | # -*- 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 model 'ActionCategory'
db.create_table(u'polisessions_actioncategory', (
(u'id', self.g... | agpl-3.0 | 238,009,160,051,770,620 | 62.26087 | 180 | 0.558687 | false | 3.56338 | false | false | false |
rlworkgroup/metaworld | metaworld/policies/sawyer_sweep_into_v2_policy.py | 1 | 1506 | import numpy as np
from metaworld.policies.action import Action
from metaworld.policies.policy import Policy, assert_fully_parsed, move
class SawyerSweepIntoV2Policy(Policy):
@staticmethod
@assert_fully_parsed
def _parse_obs(obs):
return {
'hand_pos': obs[:3],
'unused_1':... | mit | 1,833,870,968,265,588,700 | 26.381818 | 89 | 0.508632 | false | 3.118012 | false | false | false |
grembo/ice | python/test/Ice/ami/TestI.py | 1 | 3180 | # **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# ***********************************************************... | gpl-2.0 | -1,354,653,715,512,082,000 | 29.576923 | 107 | 0.566038 | false | 4.274194 | true | false | false |
whitelizard/pytiip | pytiip/tiip.py | 1 | 13043 | """
Python implementation of the TIIP (Thin Industrial Internet Protocol) protocol.
"""
import json
from datetime import datetime as dt
from datetime import timedelta as td
import dateutil.parser as parser
# Python3 compability fixes
import sys
PY3 = sys.version_info > (3,)
if PY3:
long = int
... | mit | 1,881,399,946,409,692,700 | 30.936869 | 137 | 0.527026 | false | 4.261026 | false | false | false |
Cloud-Rush/LOL | cacheManager.py | 1 | 6523 | -import json
-import time
-import praw
-from riotwatcher import Riotwatcher
-from riotwatcher import EUROPE_WEST
-from riotwatcher import EUROPE_NORDIC_EAST
-from riotwatcher import KOREA
-from riotwatcher import OCEANIA
-from riotwatcher import BRAZIL
-from riotwatcher import LATIN_AMERICA_SOUTH
-from riotwatcher impo... | mit | 5,110,957,185,815,924,000 | 33.513228 | 87 | 0.687414 | false | 2.756974 | false | false | false |
sevenian3/ChromaStarPy | Kappas.py | 1 | 33442 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 24 17:12:02 2017
@author: ishort
"""
import math
import Planck
import Useful
def kappas2(numDeps, pe, zScale, temp, rho, numLams, lambdas, logAHe, \
logNH1, logNH2, logNHe1, logNHe2, Ne, teff, logKapFudge):
"""/* Compute opacities pr... | mit | -5,651,264,113,527,596,000 | 39.857322 | 142 | 0.555948 | false | 2.590395 | false | false | false |
Aeva/silver | obj_parser.py | 1 | 1318 |
# This file is part of Silver.
#
# Silver 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.
#
# Silver is distributed in the hope that ... | gpl-3.0 | 7,802,623,028,144,939,000 | 27.652174 | 69 | 0.636571 | false | 3.702247 | false | false | false |
pexip/os-python-suds-jurko | tests/test_date_time.py | 1 | 16814 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will b... | lgpl-3.0 | 1,870,702,405,981,344,800 | 34.622881 | 79 | 0.555073 | false | 2.976456 | true | false | false |
STIXProject/python-stix | stix/ttp/infrastructure.py | 1 | 3544 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
# mixbox
from mixbox import fields
# cybox
from cybox.core import Observables
# internal
import stix
from stix.common import StructuredTextList, VocabString
from stix.common.vocabs import AttackerInfrastructureTyp... | bsd-3-clause | -5,174,635,102,382,686,000 | 30.927928 | 99 | 0.670429 | false | 4.189125 | false | false | false |
amjames/psi4 | psi4/share/psi4/databases/S66.py | 1 | 148397 | #
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
#... | lgpl-3.0 | 3,411,172,288,187,390,000 | 54.537799 | 116 | 0.516459 | false | 2.519645 | false | false | false |
jonyroda97/redbot-amigosprovaveis | lib/youtube_dl/extractor/go.py | 1 | 9185 | # coding: utf-8
from __future__ import unicode_literals
import re
from .adobepass import AdobePassIE
from ..utils import (
int_or_none,
determine_ext,
parse_age_limit,
urlencode_postdata,
ExtractorError,
)
class GoIE(AdobePassIE):
_SITE_INFO = {
'abc': {
'brand': '001',
... | gpl-3.0 | 2,572,050,881,610,135,600 | 41.133028 | 155 | 0.470876 | false | 3.776727 | false | false | false |
SunDwarf/Kyoukai | kyoukai/app.py | 1 | 15848 | """
The core application.
"""
import asyncio
import logging
import traceback
from asphalt.core import Context, run_application
from werkzeug.exceptions import NotFound, MethodNotAllowed, HTTPException, InternalServerError, \
BadRequestKeyError
from werkzeug.routing import RequestRedirect, Map
from werkzeug.wrappe... | mit | 6,110,582,815,789,452,000 | 39.74036 | 100 | 0.585247 | false | 4.613683 | false | false | false |
RoboCupULaval/UI-Debug | Controller/DrawingObject/TextDrawing.py | 1 | 1227 | # Under MIT License, see LICENSE.txt
from Controller.DrawingObject.BaseDrawingObject import BaseDrawingObject
from Controller.QtToolBox import QtToolBox
from Model.DataObject.DrawingData.DrawTextDataIn import DrawTextDataIn
__author__ = 'RoboCupULaval'
class TextDrawing(BaseDrawingObject):
def __init__(self, da... | mit | 5,168,425,059,868,672,000 | 38.580645 | 87 | 0.564792 | false | 4.159322 | false | false | false |
anna-effeindzourou/trunk | examples/anna_scripts/triax/debug/triaxial.py | 1 | 3282 | # -*- coding: utf-8
from yade import ymport, utils,pack,export,qt
import gts,os
from yade import geom
#import matplotlib
from yade import plot
#from pylab import *
#import os.path, locale
#################################
##### FUNCTIONS ####
#################################
def writeFile():
yade.expo... | gpl-2.0 | 1,837,860,220,478,985,200 | 28.3125 | 137 | 0.650518 | false | 2.568075 | false | false | false |
mesheven/pyOCD | pyocd/target/target_MKL43Z256xxx4.py | 1 | 6800 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013,2018 ARM Limited
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 applic... | apache-2.0 | 9,023,858,836,470,273,000 | 64.384615 | 101 | 0.769559 | false | 2.073803 | false | false | false |
samdsmx/omegaup | stuff/browser_analytics.py | 2 | 7171 | #!/usr/bin/python3
"""Analyze browser usage from Google Analytics.
In order to use this tool, export a .csv report of browsers (Audience >
Technology > Browser & OS), with Secondary dimension of Browser Version.
The mappings of some browser versions to their equivalent Chromium version may
need to be maintained every... | bsd-3-clause | -5,068,709,898,575,506,000 | 32.509346 | 79 | 0.473714 | false | 4.253262 | false | false | false |
MariusCC/packstack | packstack/plugins/openstack_client_400.py | 1 | 2747 | """
Installs and configures an OpenStack Client
"""
import logging
from packstack.installer import validators
from packstack.installer import basedefs, output_messages
from packstack.installer import utils
from packstack.modules.ospluginutils import getManifestTemplate, appendManifestFile
# Controller object will b... | apache-2.0 | -7,500,177,406,174,176,000 | 37.152778 | 165 | 0.603568 | false | 4.226154 | true | false | false |
renatopp/psi-robotics | psi/engine/render_batch.py | 1 | 4484 | # =============================================================================
# Federal University of Rio Grande do Sul (UFRGS)
# Connectionist Artificial Intelligence Laboratory (LIAC)
# Renato de Pontes Pereira - renato.ppontes@gmail.com
# ============================================================================... | mit | -5,479,215,739,809,386,000 | 34.595238 | 85 | 0.622212 | false | 3.835757 | false | false | false |
hfeeki/transifex | transifex/txcommon/listeners.py | 1 | 1502 | from django.conf import settings
from django.contrib.auth.models import Group, SiteProfileNotAvailable
from django.core.exceptions import ImproperlyConfigured
from django.db import models, transaction
from transifex.txcommon.log import logger
if not settings.AUTH_PROFILE_MODULE:
raise SiteProfileNotAvailable
try:
... | gpl-2.0 | 5,225,806,281,291,356,000 | 33.136364 | 80 | 0.703728 | false | 4.34104 | false | false | false |
Esri/solutions-raster-functions | scripts/WindChillNonUV.py | 1 | 6467 | # ----------------------------------------------------------------------------------
# Copyright 2015 Esri
# 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/L... | apache-2.0 | -6,303,209,935,558,709,000 | 43.6 | 141 | 0.562394 | false | 4.158842 | false | false | false |
osroom/osroom | apps/core/flask/reqparse.py | 1 | 4656 | #!/usr/bin/env python
# -*-coding:utf-8-*-
# @Time : 2017/11/1 ~ 2019/9/1
# @Author : Allen Woo
from flask_babel import gettext
import regex as re
class ArgVerify:
def required(self, **kwargs):
for reqarg in kwargs.get("reqargs"):
if not reqarg[1]:
data = {'msg': gettext('The ... | bsd-2-clause | 7,536,587,753,218,895,000 | 34.322835 | 98 | 0.488185 | false | 3.532283 | false | false | false |
bruckhaus/challenges | python_challenges/set_game.py | 1 | 3414 | import pprint as pp
import random
class SetGame:
interactive_mode = False
NUM_CARDS_IN_DECK = 81
NUM_CARDS_IN_HAND = 12
NUM_ATTRIBUTES = 4
COUNTS = [1, 2, 3]
FILLS = ['empty', 'striped', 'full']
COLORS = ['red', 'green', 'blue']
SHAPES = ['diamond', 'squiggly', 'oval']
deck = []
... | mit | 5,268,973,161,389,575,000 | 27.940678 | 114 | 0.503222 | false | 3.451972 | false | false | false |
odoousers2014/odoo_addons-2 | clv_place/__openerp__.py | 1 | 2321 | # -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | agpl-3.0 | -8,132,136,832,875,332,000 | 42.792453 | 80 | 0.453253 | false | 4.346442 | false | false | false |
beni55/flocker | flocker/node/_deploy.py | 1 | 18591 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
# -*- test-case-name: flocker.node.test.test_deploy -*-
"""
Deploy applications on nodes.
"""
from zope.interface import Interface, implementer
from characteristic import attributes
from twisted.internet.defer import gatherResults, fail, DeferredList, suc... | apache-2.0 | 2,322,558,771,706,020,000 | 36.709939 | 79 | 0.612232 | false | 4.666416 | true | false | false |
superbob/YunoSeeMe | test_geometry.py | 1 | 1158 | """
Tests for the geometry module
"""
import geometry
EPSILON = 0.001
EPSILON_L = 0.0000001
EPSILON_H = 0.1
def test_half_central_angle():
expected = 0.0016830423969495
actual = geometry.half_central_angle(0.76029552909832, 0.0252164472196439, 0.76220881138424, 0.0213910869250003)
assert abs(expecte... | bsd-2-clause | 2,468,521,084,359,345,000 | 28.692308 | 116 | 0.729706 | false | 2.939086 | true | false | false |
Informatic/python-ddcci | qddccigui.py | 1 | 3058 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
PyQt4 DDC/CI GUI, python-ddcci example
"""
import sys
import ddcci
import os
from PyQt4 import QtGui, QtCore
from PyKDE4.kdeui import KStatusNotifierItem
script_path = os.path.dirname(os.path.realpath(os.path.abspath(__file__)))
assets_path = os.path.join(script_path, 'a... | mit | 294,655,486,794,354,240 | 27.055046 | 77 | 0.584696 | false | 3.463194 | false | false | false |
wfxiang08/Nuitka | nuitka/codegen/LoaderCodes.py | 1 | 2878 | # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | apache-2.0 | -997,178,309,059,129,200 | 35.43038 | 78 | 0.64663 | false | 3.98615 | false | false | false |
jcastillocano/python-route53 | route53/connection.py | 1 | 17310 | from lxml import etree
from route53 import xml_parsers, xml_generators
from route53.exceptions import Route53Error
from route53.transport import RequestsTransport
from route53.xml_parsers.common_change_info import parse_change_info
class Route53Connection(object):
"""
Instances of this class are instantiated b... | mit | 6,657,116,449,463,134,000 | 38.884793 | 116 | 0.602137 | false | 4.334001 | false | false | false |
scipag/btle-sniffer | src/btlesniffer/hci_constants.py | 1 | 50832 | # -*- coding: utf-8 -*-
"""
Provides constants common in the Bluetooth HCI protocol.
"""
import enum
HCI_MAX_EVENT_SIZE = 260
class Status(enum.IntEnum):
"""
Collection of HCI return states.
"""
Success = 0x00
UnknownHciCommand = 0x01
UnknownConnectionIdentifier = 0x02
HardwareFailure =... | mit | 6,484,401,005,254,201,000 | 30.06422 | 81 | 0.698386 | false | 2.615749 | false | false | false |
opennode/nodeconductor | waldur_core/logging/serializers.py | 1 | 5531 | from django.db import IntegrityError
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
from waldur_core.core.fields import MappedChoiceField, NaturalChoiceField
from waldur_core.core.serializers import GenericRelatedField
from waldur_core.logging import models, utils, logge... | mit | 1,335,064,343,548,479,000 | 36.371622 | 119 | 0.654131 | false | 4.36543 | false | false | false |
omermahgoub/MigTool | Process/ResizeWorker.py | 1 | 4412 | __author__ = 'OmerMahgoub'
#!/usr/bin/env python
import time
import ast
import random
import pika
from common.VM import OpenStackAdapterVMInstance
from settings import settings
objSettings = settings.StackSettings()
# The below settings are coming from settings/setting.py which in return getting al... | gpl-3.0 | 1,589,770,511,240,852,000 | 35.092437 | 124 | 0.644379 | false | 4.296008 | false | false | false |
n9code/calm | setup.py | 1 | 1439 | from os import path
import codecs
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
with codecs.open(path.join(here, 'requirements.txt'),
encoding='utf-8') as reqs:
requirements = reqs.read()
setup(
name='calm',
version='0.1.4',
description='It... | mit | -1,791,420,317,329,591,000 | 25.648148 | 79 | 0.624044 | false | 4.18314 | false | false | false |
sqall01/alertR | managerClientConsole/lib/manager/elementAlertLevel.py | 1 | 14639 | #!/usr/bin/env python3
# written by sqall
# twitter: https://twitter.com/sqall01
# blog: https://h4des.org
# github: https://github.com/sqall01
#
# Licensed under the GNU Affero General Public License, version 3.
import time
import urwid
from typing import List
from ..globalData import ManagerObjSensor, ManagerObjAle... | agpl-3.0 | -2,799,409,555,636,106,000 | 35.415423 | 115 | 0.644784 | false | 3.915218 | false | false | false |
sivaprakashniet/push_pull | p2p/lib/python2.7/site-packages/celery/app/defaults.py | 1 | 11107 | # -*- coding: utf-8 -*-
"""
celery.app.defaults
~~~~~~~~~~~~~~~~~~~
Configuration introspection and defaults.
"""
from __future__ import absolute_import
import sys
from collections import deque, namedtuple
from datetime import timedelta
from celery.five import items
from celery.utils import strtobool
f... | bsd-3-clause | -1,949,531,072,986,532,400 | 40.289963 | 79 | 0.570451 | false | 3.60266 | false | false | false |
peterlei/fboss | fboss/py/fboss/cli/commands/nic.py | 1 | 2427 | #!/usr/bin/env python3
#
# Copyright (c) 2004-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same direct... | bsd-3-clause | 5,845,180,241,870,015,000 | 35.772727 | 80 | 0.613103 | false | 3.532751 | false | false | false |
pythonprobr/pythonpro-website | pythonpro/cohorts/facade.py | 1 | 2292 | from functools import partial
from django.conf import settings
from django.core.cache import cache
from django.db.models import Prefetch as _Prefetch
from django.urls import reverse
from pythonpro.cohorts.models import Cohort as _Cohort, CohortStudent, LiveClass as _LiveClass, Webinar as _Webinar
__all__ = [
'ge... | agpl-3.0 | -2,346,784,259,353,792,500 | 25.045455 | 115 | 0.65445 | false | 3.385524 | false | false | false |
dukestats/gpustats | scripts/bench.py | 1 | 6208 | from pandas import *
import numpy as np
from pycuda.gpuarray import to_gpu
import gpustats
import gpustats.util as util
from scipy.stats import norm
import timeit
data = np.random.randn(1000000)
mean = 20
std = 5
univ_setup = """
import numpy as np
from pycuda.gpuarray import to_gpu
k = 8
means = np.random.randn(k)... | bsd-3-clause | 1,382,903,943,584,763,100 | 26.22807 | 74 | 0.637081 | false | 2.828246 | false | false | false |
STIXProject/stix-validator | sdv/validators/stix/best_practice.py | 1 | 42947 | # Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
# builtin
import re
import itertools
import collections
import distutils.version
# external
from lxml import etree
from mixbox.vendor.six import iteritems, itervalues, with_metaclass
from mixbox import compat
# in... | bsd-3-clause | 6,831,026,196,110,730,000 | 32.578577 | 106 | 0.583719 | false | 4.224988 | false | false | false |
Anstow/TeamAwesome | game/ext/sched.py | 1 | 23655 | """Event scheduler by Joseph Lansdowne.
Uses Pygame's wait function if available, else the less accurate time.sleep.
To use something else, do:
import sched
sched.wait = wait_function
This function should take the number of milliseconds to wait for. This will
always be an integer.
Python version: 2.
Release: 11-de... | gpl-3.0 | 7,478,932,857,420,847,000 | 33.035971 | 141 | 0.581695 | false | 3.86078 | false | false | false |
walterbender/yupana | utils.py | 1 | 1166 | #Copyright (c) 2011,12 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 3 of the License, or
# (at your option) any later version.
#
# You should have received a cop... | gpl-3.0 | 2,220,261,143,581,196,300 | 29.684211 | 70 | 0.698971 | false | 4.006873 | false | false | false |
maaaaz/fgpoliciestocsv | fggroupstocsv.py | 1 | 6311 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of fgpoliciestocsv.
#
# Copyright (C) 2014, 2020, Thomas Debize <tdebize at mail.com>
# All rights reserved.
#
# fgpoliciestocsv is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as pu... | gpl-3.0 | 8,581,508,258,251,817,000 | 34.857955 | 159 | 0.58501 | false | 3.881304 | false | false | false |
anshulkgupta/viznow | gary/mhacks/views.py | 1 | 1927 | import os
import json
from django.shortcuts import render
from django.http import HttpResponse, JsonResponse
from django.contrib.auth.decorators import login_required
from django.views.decorators.csrf import csrf_exempt
#from mhacks.equities import Field
EQUITY_MAP = {
'AAPL': 'AAPL US EQUITY'
}
def home_page(reque... | mit | -4,921,216,448,401,089,000 | 27.776119 | 72 | 0.728075 | false | 3.148693 | false | false | false |
marcela2/minhatv | plugin.video.rtpplay/resources/ondemand.py | 1 | 9380 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Author: enen92
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 version.
This p... | gpl-2.0 | 1,384,147,035,772,757,500 | 39.08547 | 181 | 0.667271 | false | 2.860628 | false | false | false |
carolFrohlich/nipype | examples/rsfmri_vol_surface_preprocessing.py | 2 | 42451 | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
====================================
rsfMRI: ANTS, FS, FSL, SPM, aCompCor
====================================
A preprocessing workflow for Siemens resting state data.
This work... | bsd-3-clause | -405,855,577,794,183,200 | 40.41561 | 139 | 0.594639 | false | 3.692997 | false | false | false |
lnielsen/invenio | invenio/legacy/bibcirculation/adminlib.py | 1 | 240137 | ## Administrator interface for Bibcirculation
##
## This file is part of Invenio.
## Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN.
##
## Invenio 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;... | gpl-2.0 | 8,329,778,068,518,806,000 | 37.514354 | 347 | 0.521028 | false | 3.899847 | false | false | false |
googleapis/python-phishingprotection | google/cloud/phishingprotection_v1beta1/services/phishing_protection_service_v1_beta1/transports/base.py | 1 | 6953 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,155,690,963,816,367,000 | 38.731429 | 103 | 0.65238 | false | 4.25 | false | false | false |
oostende/openblachole | lib/python/Components/Converter/TransponderInfo.py | 2 | 2843 | # -*- coding: utf-8 -*-
from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr, eServiceCenter
from Components.Element import cached
from ServiceReference import resolveAlternate, ServiceReference
from Tools.Transponder import ConvertToHumanRe... | gpl-2.0 | -3,631,324,653,382,697,500 | 39.042254 | 172 | 0.724938 | false | 3.392601 | false | false | false |
Maplenormandy/list-62x | python/dataProcessing/generatePlots.py | 1 | 1362 | import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from statsmodels.stats.weightstats import ttost_paired
data = pd.read_csv(open('combined_data.csv'))
for t in data.index:
if int(data.loc[t, 'Baseline']) == 0:
data.loc[t, 'STF Baseline'] = data.loc[t, 'Succesfully Tracked Features 0... | mit | 3,732,625,034,884,263,400 | 31.428571 | 93 | 0.693098 | false | 2.935345 | false | false | false |
eduble/panteda | sakura/daemon/code/git.py | 1 | 4338 | from pathlib import Path
from sakura.common.tools import yield_operator_subdirs, run_cmd
from sakura.common.errors import APIRequestError
GIT_CLONE_TIMEOUT = 60.0 # seconds
GIT_LS_REMOTE_TIMEOUT = 5.0 # seconds
def fetch_updates(code_dir, code_ref):
if code_ref.startswith('branch:'):
re... | gpl-3.0 | 5,805,838,144,312,942,000 | 41.116505 | 93 | 0.607653 | false | 3.464856 | false | false | false |
mrtazz/towbar | tests/unit/test_towbar_unit.py | 1 | 1704 | # -*- coding: utf-8 -*-
import unittest
import os
import sys
import mock
sys.path.append(os.getcwd())
import towbar
class TestTowbar(unittest.TestCase):
def setUp(self):
self.t = towbar.Towbar("foo", "bar")
def tearDown(self):
pass
@mock.patch('time.time')
@mock.patch('requests.post'... | mit | 5,397,757,464,395,163,000 | 34.5 | 88 | 0.524648 | false | 3.846501 | true | false | false |
vmuriart/sqldef | src/parsers/sql1992_grammar.py | 1 | 124558 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# CAVEAT UTILITOR
#
# This file was automatically generated by Grako.
#
# https://pypi.python.org/pypi/grako/
#
# Any changes you make to it will be overwritten the next time
# the file is generated.
from __future__ import print_function, division, absolute_import, un... | mit | 5,738,808,319,765,428,000 | 26.315351 | 93 | 0.502264 | false | 4.589293 | false | false | false |
procool/mygw | web/apps/admin/views.py | 1 | 1195 | import logging
import datetime
from sqlalchemy import func, and_, or_, not_
from flask import url_for, session
from misc.mixins import myTemplateView, JSONView
from utils.arp_list import get_mac_by_ip
from models.all_models import InetEther
from models.session import session
from utils.server.http_client import HT... | bsd-2-clause | 7,223,317,303,329,078,000 | 28.146341 | 81 | 0.706276 | false | 3.757862 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.