hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2ded8c0292eaccbc53d347d4ad5f93c342874dd3 | 10,397 | py | Python | oscar/lib/python2.7/site-packages/coverage/phystokens.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/coverage/phystokens.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/coverage/phystokens.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Better tokenizing for coverage.py."""
import codecs
import keyword
import re
import sys
import token
import tokenize
from coverage import env
from... | 34.772575 | 98 | 0.581129 |
2dedbb9bc8cf45b074be9e76b40b810632cf828b | 14,005 | py | Python | simpleference/inference/util.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | null | null | null | simpleference/inference/util.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | null | null | null | simpleference/inference/util.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | null | null | null | from __future__ import print_function
try:
import h5py
WITH_H5PY = True
except ImportError:
WITH_H5PY = False
try:
import zarr
WITH_ZARR = True
from .io import IoZarr
except ImportError:
WITH_ZARR = False
try:
import z5py
WITH_Z5PY = True
from .io import IoN5
except ImportError:
... | 37.95393 | 124 | 0.57865 |
2dedbf83347cff157acf9460e5bcc94def3b5ec0 | 616 | py | Python | random/hashGenerator.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/hashGenerator.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | random/hashGenerator.py | Dmendoza3/Phyton | e6c563609724b2dadcd767d2bfc291090ac2f58e | [
"MIT"
] | null | null | null | def genHash(inData, primeNum = 73):
pieces = [0,0,0,0]
if type(inData) == str:
for x in inData:
pass
elif type(inData) == int:
pieces[0] = (inData % primeNum) % 256
pieces[1] = (pieces[0] % inData) % 256
pieces[2] = (inData + (primeNum % 16)) % 256
pieces... | 22.814815 | 61 | 0.540584 |
2dedc9627d6c0f326003d68024908fe75fb8dcbd | 11,745 | py | Python | TAREA_FINAL_MANEJO_DE_DATOS/Poblar_Base.py | jrtorresb/TAREAS_FC | e997308468b0aea6858f285eba7d9ea607bfad00 | [
"MIT"
] | null | null | null | TAREA_FINAL_MANEJO_DE_DATOS/Poblar_Base.py | jrtorresb/TAREAS_FC | e997308468b0aea6858f285eba7d9ea607bfad00 | [
"MIT"
] | null | null | null | TAREA_FINAL_MANEJO_DE_DATOS/Poblar_Base.py | jrtorresb/TAREAS_FC | e997308468b0aea6858f285eba7d9ea607bfad00 | [
"MIT"
] | null | null | null | # Librerias a utilizar
import pandas as pd # lectura de txt
import sqlite3 # conexion a base de datos
# lectura de los datos
df = pd.read_table("mcu.txt",sep="|")
print(df.shape) # numero de filas y columnas
print(df.head()) # primeros 5 registros
# borra la columna con nan
df.drop('Unnamed: 6', axis=1, ... | 65.614525 | 192 | 0.739378 |
2dedf2b712885e8196060716a69053243ae0b530 | 625 | py | Python | zytlib/__init__.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 3 | 2021-07-03T17:27:44.000Z | 2021-09-26T20:48:19.000Z | zytlib/__init__.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | null | null | null | zytlib/__init__.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 1 | 2022-03-08T08:54:03.000Z | 2022-03-08T08:54:03.000Z | #! python3.8 -u
# -*- coding: utf-8 -*-
##############################
## Project PyCTLib
## Package <main>
##############################
import time
# start = time.time()
from .touch import touch, crash, retry
from .vector import recursive_apply, vector, generator_wrapper, ctgenerator, IndexMapping, EmptyClass, v... | 24.038462 | 119 | 0.664 |
2dee1a941f741393cbb91a33911fea22f622f00c | 1,292 | py | Python | national_memographic/_args.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | 2 | 2021-07-29T10:09:32.000Z | 2021-07-29T10:13:07.000Z | national_memographic/_args.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | 2 | 2021-08-13T19:58:35.000Z | 2021-08-13T20:00:53.000Z | national_memographic/_args.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | null | null | null | """
A utility module for working with command-line arguments.
"""
from typing import List
def parse(text: str) -> List[str]:
"""
Parse a textual arguments into a list of strings in Unix style.
This function currently supports:
* Splitting arguments by spaces, cleaning up redundant spaces
... | 24.846154 | 69 | 0.569659 |
2dee373056c124468359f462bb9950de8feec966 | 2,503 | py | Python | google-cloud-sdk/lib/surface/sql/ssl_certs/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/surface/sql/ssl_certs/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/surface/sql/ssl_certs/list.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 31.683544 | 79 | 0.725529 |
2dee4ccbec10803ac7bf0864ccada1650ab21836 | 12,556 | py | Python | src/uvm/base/coreservice.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-10-13T06:14:28.000Z | 2019-10-13T06:14:28.000Z | src/uvm/base/coreservice.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | null | null | null | src/uvm/base/coreservice.py | fvutils/uvm-py | 5e5ed203b680ead6e1b47fcff6d74fa99b5929c4 | [
"Apache-2.0"
] | 1 | 2019-12-23T06:21:49.000Z | 2019-12-23T06:21:49.000Z | #----------------------------------------------------------------------
# Copyright 2014-2018 Mentor Graphics Corporation
# Copyright 2015 Analog Devices, Inc.
# Copyright 2014 Semifore
# Copyright 2018 Intel Corporation
# Copyright 2018 Synopsys, Inc.
# Copyright 2010-2018 Cadence Design Systems, Inc.
# Copyright 2013... | 32.612987 | 148 | 0.656101 |
2dee58f510ee0f004d5bc25c9079815da328fa56 | 130 | py | Python | src/cmp/cil/utils/__init__.py | codestrange/cool-compiler-2020 | 30508965d75a1a1d1362d0b51bef8da3978fd0c2 | [
"MIT"
] | 3 | 2020-01-14T04:47:32.000Z | 2020-09-10T17:57:20.000Z | src/cmp/cil/utils/__init__.py | codestrange/cool-compiler-2020 | 30508965d75a1a1d1362d0b51bef8da3978fd0c2 | [
"MIT"
] | 5 | 2020-01-14T06:06:35.000Z | 2020-02-19T01:01:33.000Z | src/cmp/cil/utils/__init__.py | codestrange/cool-compiler-2020 | 30508965d75a1a1d1362d0b51bef8da3978fd0c2 | [
"MIT"
] | 3 | 2020-01-14T04:58:24.000Z | 2020-01-14T16:23:41.000Z | from .cil_scope import Scope # noqa:F401
from .type_data import TypeData # noqa:F401
from .visitor import on, when # noqa:F401
| 32.5 | 44 | 0.753846 |
2dee5e2a4071e03eb43b66a1ce03ed121ed11cd5 | 16,136 | py | Python | components/google-cloud/google_cloud_pipeline_components/container/experimental/gcp_launcher/bigquery_job_remote_runner.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/google_cloud_pipeline_components/container/experimental/gcp_launcher/bigquery_job_remote_runner.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | null | null | null | components/google-cloud/google_cloud_pipeline_components/container/experimental/gcp_launcher/bigquery_job_remote_runner.py | Iuiu1234/pipelines | 1e032f550ce23cd40bfb6827b995248537b07d08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Kubeflow 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 applicabl... | 42.020833 | 136 | 0.718889 |
2dee76d58fc4822d5cd7913fa872d39343776734 | 955 | py | Python | DMM/SerialConnection.py | nathanpc/dmmlog | 5b1927c0038aadd0db4a13effd8cd7a96ee31b60 | [
"MIT"
] | null | null | null | DMM/SerialConnection.py | nathanpc/dmmlog | 5b1927c0038aadd0db4a13effd8cd7a96ee31b60 | [
"MIT"
] | null | null | null | DMM/SerialConnection.py | nathanpc/dmmlog | 5b1927c0038aadd0db4a13effd8cd7a96ee31b60 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import serial
class SerialConnection:
def __init__(self, port = None):
self.ser = None
if port is not None:
# The user specified a port, so let's open it.
self.open(port)
def open(self, port, baudrate = 9600):
""" Open a connection and check ... | 27.285714 | 76 | 0.564398 |
2dee7923c86df2e1ac65d7a48ae6fc0a54e9a4d6 | 24,563 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/tests/test_rootwrap.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/tests/test_rootwrap.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/tests/test_rootwrap.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 41.916382 | 79 | 0.602003 |
2dee7d851bab00333537d0feac1769f046f083e9 | 4,604 | py | Python | samples/Windows/previewWithTk.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 5 | 2020-04-21T07:18:44.000Z | 2021-12-28T17:33:38.000Z | samples/Windows/previewWithTk.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 1 | 2020-05-19T19:08:25.000Z | 2020-05-22T10:24:11.000Z | samples/Windows/previewWithTk.py | pixelink-support/PixelinkPythonWrapper | ad7ba24c550825eb12f16e1eaf9c66f35db52a8f | [
"MIT"
] | 1 | 2021-11-16T18:55:54.000Z | 2021-11-16T18:55:54.000Z | """
previewWithTk.py
Simple sample application demostrating the use of the API Preview function,
embedded within a Tkinter window
"""
from pixelinkWrapper import*
from ctypes import*
import ctypes.wintypes
import tkinter as Tk
import threading
import time
import win32api, win32con
"""
Preview control ... | 34.878788 | 153 | 0.661381 |
2deeb938a26c5e414710f0f370c7c7232d7c042e | 4,581 | py | Python | chrome/common/extensions/docs/server2/datastore_util.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-07-15T09:50:14.000Z | 2020-07-15T09:50:14.000Z | chrome/common/extensions/docs/server2/datastore_util.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/common/extensions/docs/server2/datastore_util.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import cPickle
import googledatastore as datastore
import logging
from future import Future
# N.B.: In order to use this module you should have a working c... | 33.683824 | 80 | 0.724733 |
2deebc1aedece2a985996f2f564ebbacc13ca82a | 3,519 | py | Python | fare/grant_roles/views.py | open-education-polito/fare-invenio | 1c3498be270b7df8ab28a80c8b890e5bb8e50c3e | [
"MIT"
] | 4 | 2019-08-24T15:36:09.000Z | 2020-03-30T12:11:07.000Z | fare/grant_roles/views.py | open-education-polito/fare-invenio | 1c3498be270b7df8ab28a80c8b890e5bb8e50c3e | [
"MIT"
] | 70 | 2019-10-22T17:10:08.000Z | 2020-04-23T17:25:14.000Z | fare/grant_roles/views.py | open-education-polito/fare-invenio | 1c3498be270b7df8ab28a80c8b890e5bb8e50c3e | [
"MIT"
] | null | null | null | """Views for grant_roles permission to other users."""
from __future__ import absolute_import, print_function
from flask import Blueprint, redirect, render_template, url_for
from flask_babelex import gettext as _
from flask_login import login_required
from flask_menu import register_menu
from flask_security import cu... | 30.6 | 74 | 0.666951 |
2deecbcf4cdb7b98f36ac99b6eebc0000d9721b1 | 709 | py | Python | statey/ext/pulumi/exc.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | 4 | 2021-02-16T19:34:38.000Z | 2022-01-31T16:44:14.000Z | statey/ext/pulumi/exc.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | statey/ext/pulumi/exc.py | cfeenstra67/statey | 6d127ed48265e2e072fbb26486458a4b28a333ec | [
"MIT"
] | null | null | null | from typing import Sequence, Dict, Any
class PulumiError(Exception):
"""
Errors originating from statey.ext.pulumi
"""
class PulumiValidationError(PulumiError):
"""
Validation error originating from pulumi
"""
def __init__(self, errors: Sequence[Dict[str, Any]]) -> None:
self.er... | 25.321429 | 83 | 0.669958 |
2deecd688f70c4ddd429ff9470e016949ff42065 | 6,958 | py | Python | snakemake/satija/src/utils.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-09T17:55:04.000Z | 2022-02-25T14:54:01.000Z | snakemake/satija/src/utils.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 32 | 2020-01-09T20:40:26.000Z | 2020-12-18T16:39:41.000Z | snakemake/satija/src/utils.py | haniffalab/vitessce-data | 9f70405bae373783f9e6ca32f88b6b19b7325fea | [
"MIT"
] | 3 | 2021-06-18T14:50:11.000Z | 2021-10-06T12:49:24.000Z | import networkx
import obonet
from constants import CL_ROOT_ID
def load_cl_obo_graph(cl_obo_file):
graph = obonet.read_obo(cl_obo_file)
# Make sure there are no cycles.
assert networkx.is_directed_acyclic_graph(graph)
id_to_name = {
id_: data.get('name')
for id_, data in graph.nodes... | 30.924444 | 126 | 0.578758 |
2deeeb4f072be815f22bddbc2140042bb7b3e93e | 911 | py | Python | migrations/versions/429fbfe291d1_.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | migrations/versions/429fbfe291d1_.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | migrations/versions/429fbfe291d1_.py | wardrobe-auth/wardrobe | fd2f95e50c1d035a2a60e0fdc68685ce45b6e653 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 429fbfe291d1
Revises: 2d48e8e9835c
Create Date: 2021-02-22 18:55:10.169774
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '429fbfe291d1'
down_revision = '2d48e8e9835c'
branch_labels = None
depends_on = None
def upgrade():
# ... | 27.606061 | 86 | 0.689352 |
2def07bd95bfdb0cf31133010f8907d2e03c761a | 721 | py | Python | partools/rl/init.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/rl/init.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | partools/rl/init.py | paularnaud2/PyTools | 09accc33e1dcfdde45671ad5962727554648b30c | [
"MIT"
] | null | null | null | import partools.utils as u
from . import gl
def init(kwargs):
u.init_kwargs(gl, kwargs)
init_globals()
u.check_header(gl.IN_PATH)
u.log(f"Loading input array from '{gl.IN_PATH}'...")
gl.ar_in = u.load_csv(gl.IN_PATH)
u.log("Input array loaded")
u.log_print('|')
def init_globals():
... | 22.53125 | 66 | 0.643551 |
2def1565da5d81a6ffb380f7ba08d06ff0382b00 | 389 | py | Python | freecoinage/coins/markets/urls.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/markets/urls.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | freecoinage/coins/markets/urls.py | clifer/freecoinage | 0bc8300f09445ef6d8258b3ca782627e0d81e2f1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from django.conf.urls import url
from .views import *
urlpatterns = [
url(
regex=r'^$',
view=marketListView.as_view(),
name='marketList'
),
url(
regex=r'^markets/(?P<slug>[\w|\W]+)$',
v... | 19.45 | 56 | 0.586118 |
2def232fb79418fccb7f262569e231e0852b68cc | 7,423 | py | Python | tests/test_msm_symbolic.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 510 | 2015-01-19T16:22:25.000Z | 2022-03-30T19:02:51.000Z | tests/test_msm_symbolic.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 402 | 2015-01-22T10:57:50.000Z | 2022-03-30T15:19:23.000Z | tests/test_msm_symbolic.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 156 | 2015-01-05T14:23:38.000Z | 2022-03-22T13:08:30.000Z | from __future__ import absolute_import
from sfepy import data_dir
import six
filename_mesh = data_dir + '/meshes/2d/special/circle_in_square.mesh'
dim = 2
field_1 = {
'name' : 'a_harmonic_field',
'dtype' : 'real',
'shape' : 'scalar',
'region' : 'Omega',
'approx_order' : 1,
}
variables = {
't... | 29.692 | 80 | 0.518658 |
2def55e4b45d36d961cbea34d2fca7ceeb2249bc | 1,545 | py | Python | test/test_person.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | test/test_person.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | 14 | 2020-12-06T23:54:23.000Z | 2021-02-03T18:35:02.000Z | test/test_person.py | Sage-Bionetworks/rocc-client | 85b73afe7d4977094810c0a8094f56ebe7ed3d48 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Registry of Open Community Challenge API
The OpenAPI specification implemented by the Challenge Registries. # Introduction TBA # noqa: E501
The version of the OpenAPI document: 0.1.0
Contact: thomas.schaffter@sagebionetworks.org
Generated by: https://openapi-generator.tech
"... | 26.637931 | 104 | 0.634304 |
2def641357d8973d6f3833d55f397db6ad4cc41e | 18,627 | py | Python | osgar/drivers/realsense.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 12 | 2017-02-16T10:22:59.000Z | 2022-03-20T05:48:06.000Z | osgar/drivers/realsense.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 618 | 2016-08-30T04:46:12.000Z | 2022-03-25T16:03:10.000Z | osgar/drivers/realsense.py | robotika/osgar | 6f4f584d5553ab62c08a1c7bb493fefdc9033173 | [
"MIT"
] | 11 | 2016-08-27T20:02:55.000Z | 2022-03-07T08:53:53.000Z | """
pyrealsense2 OSGAR wrapper
"""
import math
import logging
import threading
import numpy as np
from osgar.lib.quaternion import conjugate as quaternion_inv, euler_to_quaternion, multiply as quaternion_multiply, rotate_vector
g_logger = logging.getLogger(__name__)
try:
import pyrealsense2 as rs
try:
... | 42.722477 | 129 | 0.578032 |
2def7dd5b38a151c8d31faa533302865aec7eb9d | 26,604 | py | Python | src/fsmonitor.py | paulp/unison | 1bece7bf3b8f6ee62c64a0aa4e0045a6dbdd7eb2 | [
"MIT"
] | 2 | 2016-03-17T02:42:43.000Z | 2016-03-17T13:59:31.000Z | src/fsmonitor.py | paulp/unison | 1bece7bf3b8f6ee62c64a0aa4e0045a6dbdd7eb2 | [
"MIT"
] | null | null | null | src/fsmonitor.py | paulp/unison | 1bece7bf3b8f6ee62c64a0aa4e0045a6dbdd7eb2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# a small program to test the possibilities to monitor the file system and
# log changes on Windowsm Linux, and OSX
#
# Originally written by Christoph Gohle (2010)
# Modified by Gene Horodecki for Windows
# Further modified by Benjamin Pierce
# should be distributed under GPL
import sys
import os
i... | 39.238938 | 173 | 0.523493 |
2defa66cd0299f40064c47c142afbcfec0b9e4d8 | 2,767 | py | Python | src/widgetastic_patternfly4/__init__.py | rsnyman/widgetastic.patternfly4 | 3d7c3c5921e278bf103965c7016b836844bd45ef | [
"Apache-2.0"
] | null | null | null | src/widgetastic_patternfly4/__init__.py | rsnyman/widgetastic.patternfly4 | 3d7c3c5921e278bf103965c7016b836844bd45ef | [
"Apache-2.0"
] | null | null | null | src/widgetastic_patternfly4/__init__.py | rsnyman/widgetastic.patternfly4 | 3d7c3c5921e278bf103965c7016b836844bd45ef | [
"Apache-2.0"
] | null | null | null | from .alert import Alert
from .breadcrumb import BreadCrumb
from .bulletchart import BulletChart
from .button import Button
from .card import Card
from .card import CardCheckBox
from .card import CardForCardGroup
from .card import CardGroup
from .chipgroup import CategoryChipGroup
from .chipgroup import Chip
from .chip... | 27.67 | 48 | 0.771594 |
2defe0bfe2a807dabc49d67a1ec2793a0a3764c4 | 41,912 | py | Python | oscar/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2016 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import absolute_import
import os
import re
import sys
try:
import ssl
except ImportError:
ssl = ... | 37.690647 | 102 | 0.530516 |
2deff628969bab3e23fe3c17897ef1f545f87f5c | 13,951 | py | Python | language_model/language_model.py | naderabdalghani/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | 2 | 2021-12-13T04:19:30.000Z | 2022-02-16T16:27:20.000Z | language_model/language_model.py | MuhanadAtef/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | null | null | null | language_model/language_model.py | MuhanadAtef/project-rev | 3205d42a2220372783ab49ce8c3c70a4c4b9ad7e | [
"Apache-2.0"
] | 2 | 2021-08-17T06:25:36.000Z | 2021-08-17T12:45:33.000Z | import json
import logging
import os
import pickle
import numpy as np
from app_config import MODELS_DIR
from exceptions import LanguageModelNotTrained
from .utils import parse_into_words, write_file
from .build_ngrams_dictionaries import build_dictionary
from .config import USE_TRIGRAMS, UNIGRAMS_DICT_NAME, BIGRAMS_D... | 39.298592 | 116 | 0.620959 |
2deff98c23ec79809b5bfe8a700bd6921fe9d6fb | 11,302 | py | Python | tests/test_embedding_composite.py | davage/dwave-system | b899077ce024e666fe6de6b9c4a8f2d42cc7a991 | [
"Apache-2.0"
] | 1 | 2019-11-06T19:17:46.000Z | 2019-11-06T19:17:46.000Z | tests/test_embedding_composite.py | davage/dwave-system | b899077ce024e666fe6de6b9c4a8f2d42cc7a991 | [
"Apache-2.0"
] | null | null | null | tests/test_embedding_composite.py | davage/dwave-system | b899077ce024e666fe6de6b9c4a8f2d42cc7a991 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 D-Wave Systems 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... | 37.30033 | 116 | 0.579897 |
2df03c920b0167647e602b8076c65a5188e1a48d | 150,569 | py | Python | tencentcloud/vod/v20180717/vod_client.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 465 | 2018-04-27T09:54:59.000Z | 2022-03-29T02:18:01.000Z | tencentcloud/vod/v20180717/vod_client.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 91 | 2018-04-27T09:48:11.000Z | 2022-03-12T08:04:04.000Z | tencentcloud/vod/v20180717/vod_client.py | lleiyyang/tencentcloud-sdk-python | e6e6a4ce89286673b2322ae92d3c2fbf8665aa0b | [
"Apache-2.0"
] | 232 | 2018-05-02T08:02:46.000Z | 2022-03-30T08:02:48.000Z | # -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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... | 43.007426 | 228 | 0.605756 |
2df056ebf845e2a71c57ba6b044ee54e84f4133b | 1,760 | py | Python | test/test_encoding.py | Nexuscompute/inplace | 37bc1d3b4450be91c6625910adff9f221e94e0e9 | [
"MIT"
] | 23 | 2016-12-24T03:21:16.000Z | 2021-10-03T10:38:10.000Z | test/test_encoding.py | Nexuscompute/inplace | 37bc1d3b4450be91c6625910adff9f221e94e0e9 | [
"MIT"
] | 5 | 2018-04-27T06:07:33.000Z | 2021-02-19T22:12:29.000Z | test/test_encoding.py | Nexuscompute/inplace | 37bc1d3b4450be91c6625910adff9f221e94e0e9 | [
"MIT"
] | 4 | 2017-01-20T19:39:19.000Z | 2021-12-22T22:24:47.000Z | from unicodedata import normalize
import pytest
from in_place import InPlace
from test_in_place_util import NLB, UNICODE, pylistdir
def test_utf8_nobackup(tmpdir):
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, "utf-8")
with InPlace(str(p), "t", encoding="utf-8") as f... | 33.207547 | 72 | 0.630114 |
2df0589c86fe782f37f46816246b06e9e8a0f8e0 | 2,414 | py | Python | stanCode_Projects/name_searching_system/extension.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/name_searching_system/extension.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/name_searching_system/extension.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | """
File: extension.py
--------------------------
This file collects more data from
https://www.ssa.gov/oact/babynames/decades/names2010s.html
https://www.ssa.gov/oact/babynames/decades/names2000s.html
https://www.ssa.gov/oact/babynames/decades/names1990s.html
Please print the number of top200 male and female on Consol... | 36.029851 | 119 | 0.525269 |
2df07600d883f308fd22fa34e0add96ff880628b | 2,602 | py | Python | hiicart/gateway/paypal/views.py | kbourgoin/hiicart | 151d64be60ffa5e09b4abc21bf42fd235bf87eea | [
"MIT"
] | null | null | null | hiicart/gateway/paypal/views.py | kbourgoin/hiicart | 151d64be60ffa5e09b4abc21bf42fd235bf87eea | [
"MIT"
] | 5 | 2020-10-29T01:05:05.000Z | 2020-10-29T01:05:19.000Z | hiicart/gateway/paypal/views.py | kbourgoin/hiicart | 151d64be60ffa5e09b4abc21bf42fd235bf87eea | [
"MIT"
] | null | null | null | import logging
from django.http import HttpResponse
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_view_exempt
from hiicart.gateway.base import GatewayError
from hiicart.gateway.paypal.ipn import PaypalIPN
from hiicart.utils import format_exceptions, cart_by_uuid
fro... | 35.162162 | 91 | 0.687164 |
2df080b4d81a3abb8698b1dba31e5483f814efe6 | 13,169 | py | Python | samtranslator/translator/translator.py | jmnarloch/serverless-application-model | c00b8a31d2d4dcad43e16409caa9d4d142966e43 | [
"Apache-2.0"
] | null | null | null | samtranslator/translator/translator.py | jmnarloch/serverless-application-model | c00b8a31d2d4dcad43e16409caa9d4d142966e43 | [
"Apache-2.0"
] | null | null | null | samtranslator/translator/translator.py | jmnarloch/serverless-application-model | c00b8a31d2d4dcad43e16409caa9d4d142966e43 | [
"Apache-2.0"
] | null | null | null | import copy
from samtranslator.model import ResourceTypeResolver, sam_resources
from samtranslator.translator.verify_logical_id import verify_unique_logical_id
from samtranslator.model.preferences.deployment_preference_collection import DeploymentPreferenceCollection
from samtranslator.model.exceptions import (
Inv... | 51.042636 | 120 | 0.693295 |
2df08960c3bcb56f28079a5414f690674eab2f8b | 409 | py | Python | Grace/Speaker.py | quickcodes/Grace_Personal_Assistant_-Neural_Networks- | 28ffbe40136eb9c01759b1836e1830ba5c2b66f4 | [
"MIT"
] | null | null | null | Grace/Speaker.py | quickcodes/Grace_Personal_Assistant_-Neural_Networks- | 28ffbe40136eb9c01759b1836e1830ba5c2b66f4 | [
"MIT"
] | null | null | null | Grace/Speaker.py | quickcodes/Grace_Personal_Assistant_-Neural_Networks- | 28ffbe40136eb9c01759b1836e1830ba5c2b66f4 | [
"MIT"
] | null | null | null | # --------------------------------------------------- Speak function --------------------------------------------------#
import pyttsx3 # voice setup
# # VOICE SETUP
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices') # making list of voices
engine.setProperty('voice', voices[6].id)
def s... | 29.214286 | 121 | 0.506112 |
2df08ee87a98326a4126c2facddfbe657ae0b386 | 602 | py | Python | hw3/wordcount/mapper.py | venamax/ucb-261 | 7df292668a971f49f8a099d38f899e9961432e7c | [
"MIT-0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | 1 | 2022-01-05T14:27:20.000Z | 2022-01-05T14:27:20.000Z | hw3/wordcount/mapper.py | venamax/ucb-261 | 7df292668a971f49f8a099d38f899e9961432e7c | [
"MIT-0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | hw3/wordcount/mapper.py | venamax/ucb-261 | 7df292668a971f49f8a099d38f899e9961432e7c | [
"MIT-0",
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
from csv import reader
import sys
sum_total = 0
for row in reader(iter(sys.stdin.readline, '')):
product = row[1].lower()
issue = row[3].lower()
if product:
bagofwords = issue.split(' ')
for word in bagofwords:
sum_total += 1
sys.stderr.write(... | 31.684211 | 90 | 0.574751 |
2df0b808b5df8d7f31f1b88cf6a5c45d44bb2673 | 267 | py | Python | office365/sharepoint/views/view_scope.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/views/view_scope.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/views/view_scope.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | class ViewScope:
"""Specifies the scope for returning list items and list folders in a list view."""
def __init__(self):
pass
DefaultValue = "DefaultValue"
Recursive = "Recursive"
RecursiveAll = "RecursiveAll"
FilesOnly = "FilesOnly"
| 26.7 | 87 | 0.674157 |
2df0d729f2556d294e28196ff6bfd734b9c8368b | 8,277 | py | Python | my_work/ch11_implems_apps_tools/.tutenv/lib/python3.6/site-packages/tests/test_text.py | gabrielavirna/PythonDataStructuresAndAlgorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | 1 | 2019-01-22T04:59:02.000Z | 2019-01-22T04:59:02.000Z | my_work/ch11_implems_apps_tools/.tutenv/lib/python3.6/site-packages/tests/test_text.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | my_work/ch11_implems_apps_tools/.tutenv/lib/python3.6/site-packages/tests/test_text.py | gabrielavirna/python_data_structures_and_algorithms | d406dc247a8ff2f39ee5aac2a398027298ffbf69 | [
"MIT"
] | null | null | null | '''unit tests for *text* module'''
from os import path
import sys
from unittest import TestCase
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), "..")))
import preprocessing.text as ptext
from preprocessing.text import (lowercase, remove_esc_chars, remove_unbound_punct,
... | 37.794521 | 97 | 0.703274 |
2df0e8015fca7bf4a95ac8498e2d13e31fe9c249 | 18,857 | py | Python | tests/core/util/test_keyring_wrapper.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | tests/core/util/test_keyring_wrapper.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | tests/core/util/test_keyring_wrapper.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | import logging
import unittest
from skynet.util.keyring_wrapper import KeyringWrapper, DEFAULT_PASSPHRASE_IF_NO_MASTER_PASSPHRASE
from pathlib import Path
from tests.util.keyring import using_temp_file_keyring, using_temp_file_keyring_and_cryptfilekeyring
log = logging.getLogger(__name__)
class TestKeyringWrapper(u... | 47.860406 | 120 | 0.712043 |
2df10beb176d8d734602815541f43d6fa44c398a | 7,200 | py | Python | export/models.py | Visgean/boxbox | 1c022dd76638f963ce044c5ee46896decfa5dfb9 | [
"Apache-2.0"
] | null | null | null | export/models.py | Visgean/boxbox | 1c022dd76638f963ce044c5ee46896decfa5dfb9 | [
"Apache-2.0"
] | null | null | null | export/models.py | Visgean/boxbox | 1c022dd76638f963ce044c5ee46896decfa5dfb9 | [
"Apache-2.0"
] | 1 | 2019-08-24T02:09:43.000Z | 2019-08-24T02:09:43.000Z | from peewee import *
database = MySQLDatabase('debatovani', **{'passwd': '12345', 'host': '10.0.0.100', 'port': 3306, 'user': 'debatovani'})
class BaseModel(Model):
class Meta:
database = database
class Clovek(BaseModel):
clovek = PrimaryKeyField(db_column='clovek_ID')
jmeno = CharField(max_len... | 26.765799 | 119 | 0.686944 |
2df10e084ce9833e04be3223b20c6d8d3952e203 | 3,482 | py | Python | oscar/lib/python2.7/site-packages/whitenoise/storage.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whitenoise/storage.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/whitenoise/storage.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import os
import re
import textwrap
from django.conf import settings
from django.contrib.staticfiles.storage import ManifestStaticFilesStorage
from .compress import Compressor
class CompressedStaticFilesMixin(object):
"""
Wraps a StaticFilesStorage insta... | 36.270833 | 86 | 0.636129 |
2df12fb134f419285c19ce35f13bc21e6a36fcfe | 1,870 | py | Python | pandaclient/idds_api.py | PanDAWMS/panda-client | 2e5dc7ad977934fa382c18858aad79f7dadb9f38 | [
"Apache-2.0"
] | 7 | 2016-01-26T21:37:26.000Z | 2020-09-10T07:44:54.000Z | pandaclient/idds_api.py | PanDAWMS/panda-client | 2e5dc7ad977934fa382c18858aad79f7dadb9f38 | [
"Apache-2.0"
] | 12 | 2017-10-11T09:15:01.000Z | 2021-11-17T00:23:18.000Z | pandaclient/idds_api.py | PanDAWMS/panda-client | 2e5dc7ad977934fa382c18858aad79f7dadb9f38 | [
"Apache-2.0"
] | 9 | 2017-07-20T08:06:36.000Z | 2021-11-15T04:22:06.000Z | from . import Client
# API call class
class IddsApi(object):
def __init__(self, name, dumper, verbose, idds_host, compress, manager, loader):
self.name = name
if idds_host is not None:
self.name += '+{}'.format(idds_host)
self.dumper = dumper
self.verbose = verbose
... | 30.655738 | 106 | 0.631551 |
2df135c2dd389e87d79309a8bdaeba911fcf5aa3 | 689 | py | Python | wishes/forms.py | monofox/wedding | d9c4ee1da418e4e047eb628e98a473b8c20c56d5 | [
"MIT"
] | null | null | null | wishes/forms.py | monofox/wedding | d9c4ee1da418e4e047eb628e98a473b8c20c56d5 | [
"MIT"
] | null | null | null | wishes/forms.py | monofox/wedding | d9c4ee1da418e4e047eb628e98a473b8c20c56d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from wishes.models import Wish, WishPriority
from django.utils.translation import ugettext as _
class WishForm(forms.ModelForm):
class Meta:
model = Wish
fields = ['priority', 'wishcover', 'wishisbn', 'wishtxt', 'visible']
# we have to prep... | 32.809524 | 70 | 0.71553 |
2df13c92307951060ce7d72210e68a5d58493b62 | 4,549 | py | Python | os_net_config/cli.py | fredericlepied/os-net-config | e9791d7db9bae2a19367ec69c8b0083c6aa089a4 | [
"Apache-2.0"
] | null | null | null | os_net_config/cli.py | fredericlepied/os-net-config | e9791d7db9bae2a19367ec69c8b0083c6aa089a4 | [
"Apache-2.0"
] | null | null | null | os_net_config/cli.py | fredericlepied/os-net-config | e9791d7db9bae2a19367ec69c8b0083c6aa089a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 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/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 31.811189 | 78 | 0.625192 |
2df1538eaa4cfbd416d30f2150da69d509c6dc39 | 41,098 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/calliope/arg_parsers.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/calliope/arg_parsers.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/calliope/arg_parsers.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | # Copyright 2013 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 33.036977 | 81 | 0.66047 |
2df16b0bc584fa6ec0d8a4891e01f82637554214 | 7,641 | py | Python | assignment_dashboard/models.py | osteele/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | null | null | null | assignment_dashboard/models.py | osteele/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | 12 | 2017-02-05T23:38:08.000Z | 2017-02-07T14:42:16.000Z | assignment_dashboard/models.py | olin-computing/assignment-dashboard | 4442587630cd1f55ae3302e96ddef7fd83caba16 | [
"MIT"
] | null | null | null | import os
from sqlalchemy import (Boolean, CheckConstraint, Column, DateTime, Enum, ForeignKey, Integer, String, Table, Text,
UniqueConstraint)
from sqlalchemy.orm import backref, deferred, relationship
from .database import Base
from .nb_helpers import safe_read_notebook
DATABASE_URL = os.en... | 35.211982 | 121 | 0.66863 |
2df1762e33f890dee480127d2d8acf693b07f158 | 3,260 | py | Python | ontosearch/odt/skosnavigate.py | quaat/OTD-semantic-framework | 128f11e73ac8b7e2bc038e6429b8fa01a42ae677 | [
"MIT"
] | null | null | null | ontosearch/odt/skosnavigate.py | quaat/OTD-semantic-framework | 128f11e73ac8b7e2bc038e6429b8fa01a42ae677 | [
"MIT"
] | null | null | null | ontosearch/odt/skosnavigate.py | quaat/OTD-semantic-framework | 128f11e73ac8b7e2bc038e6429b8fa01a42ae677 | [
"MIT"
] | 1 | 2018-09-06T12:13:24.000Z | 2018-09-06T12:13:24.000Z | from rdflib import Graph, URIRef, BNode, Literal
from rdflib import Namespace
from rdflib.namespace import RDF, RDFS, OWL, DC, FOAF, XSD, SKOS
ODT = Namespace('http://www.quaat.com/ontologies#')
DCAT = Namespace('http://www.w3.org/ns/dcat#')
DCT = Namespace('http://purl.org/dc/terms/')
ODTX = Namespace('http://www.qu... | 27.863248 | 98 | 0.619632 |
2df199944f3c913c911d4420397959322ecacdf7 | 535 | py | Python | week11/word_counter/test_word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week11/word_counter/test_word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | week11/word_counter/test_word_counter.py | AnaRita93/spiced_projects | 64f0caec4008cc9ccb528e71ec16afba78728b8e | [
"MIT"
] | null | null | null | """
Automated Testing
pip install pytest
"""
from word_counter import count_words
import pytest
def test_empty():
assert count_words('') == 0
def test_hello():
assert count_words('hello') == 1
def test_hello_world():
assert count_words('hello world') == 2
def test_phone():
assert count_words('... | 19.814815 | 59 | 0.699065 |
2df1bafc6b729b1c63bc1db4f9920109e72902cc | 355 | py | Python | python/phonenumbers/data/alt_format_373.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/alt_format_373.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/alt_format_373.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. 373 metadata"""
from ..phonemetadata import NumberFormat
PHONE_ALT_FORMAT_373 = [NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['22|[367]']), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3',... | 71 | 251 | 0.625352 |
2df1e3a13b3625c67a45631a86fa9d7c314da592 | 5,614 | py | Python | code/deploymenthandler/models.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 8 | 2017-03-13T16:34:28.000Z | 2021-11-16T11:35:56.000Z | code/deploymenthandler/models.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | null | null | null | code/deploymenthandler/models.py | superfluidity/RDCL3D | 3c5717941bd4046aa1be178e9004db1dc1c469a0 | [
"Apache-2.0"
] | 3 | 2017-03-28T09:26:40.000Z | 2020-12-08T14:16:12.000Z | #
# Copyright 2017 CNIT - Consorzio Nazionale Interuniversitario per le Telecomunicazioni
#
# 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/LICE... | 36.454545 | 89 | 0.659957 |
2df23a0aa49931b82f900dc19c2f4ad482e66466 | 12,531 | py | Python | modypy/model/events.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 1 | 2021-05-05T22:33:54.000Z | 2021-05-05T22:33:54.000Z | modypy/model/events.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 30 | 2021-05-12T14:13:35.000Z | 2022-01-27T21:28:10.000Z | modypy/model/events.py | modypy/modypy | 18f7bf8e56d30f4e085c89e61d258955e85fab58 | [
"BSD-2-Clause"
] | 1 | 2021-03-30T13:50:59.000Z | 2021-03-30T13:50:59.000Z | """
Events are instances in time when some specific condition about the system
changes. For example, clocks split the domain of the time variable into a
possibly infinite sequence of continuous and disjoint intervals, each as long
as a period of the clock. Whenever the continuous time variable leaves one of
these inter... | 35.398305 | 80 | 0.647674 |
2df241bf815fe275a5ab425d4f937a0e972d8f85 | 1,325 | py | Python | macOS/Xcode/Maestral/Maestral/app_packages/desktop_notifier/dummy.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 22 | 2021-01-27T21:26:17.000Z | 2021-12-07T00:22:16.000Z | macOS/Xcode/Maestral/Maestral/app_packages/desktop_notifier/dummy.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 6 | 2021-01-22T16:52:26.000Z | 2021-10-16T20:09:54.000Z | macOS/Xcode/Maestral/Maestral/app_packages/desktop_notifier/dummy.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 2 | 2021-02-12T12:38:32.000Z | 2021-07-13T18:01:13.000Z | # -*- coding: utf-8 -*-
"""
Dummy backend for unsupported platforms.
"""
# system imports
import uuid
from typing import Optional
# local imports
from .base import Notification, DesktopNotifierBase
class DummyNotificationCenter(DesktopNotifierBase):
"""A dummy backend for unsupported platforms"""
def __ini... | 24.537037 | 64 | 0.635472 |
2df24c897f5fa87198e607c89db9cf4c7a3a3dc7 | 1,108 | py | Python | postprocessing.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | postprocessing.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | postprocessing.py | maeda6uiui/BingImageDownloader | 5ccb781828633abdc8be9ec9bddfe46d99f9c6a1 | [
"MIT"
] | null | null | null | import glob
import logging
import os
from PIL import Image
default_logger=logging.getLogger(__name__)
default_logger.setLevel(level=logging.INFO)
def format_images(
target_dir:str,
image_width:int,
image_height:int,
logger:logging.Logger=default_logger):
"""
format_images resizes images and co... | 26.380952 | 66 | 0.642599 |
2df24ef5d3c327ee90e58bfe923913038f05228a | 8,820 | py | Python | custom_components/meross_lan/emulator/__init__.py | aicarmic/meross_lan | acaecd2ca2325f515638e1cefa0224125bbfa675 | [
"MIT"
] | null | null | null | custom_components/meross_lan/emulator/__init__.py | aicarmic/meross_lan | acaecd2ca2325f515638e1cefa0224125bbfa675 | [
"MIT"
] | null | null | null | custom_components/meross_lan/emulator/__init__.py | aicarmic/meross_lan | acaecd2ca2325f515638e1cefa0224125bbfa675 | [
"MIT"
] | null | null | null | from http.client import HTTPException
import os
from time import time
from urllib.error import HTTPError
from aiohttp import web
from json import (
dumps as json_dumps,
loads as json_loads,
)
from ..merossclient import (
MerossDeviceDescriptor,
build_payload,
const as mc,
get_namespacekey,
... | 39.375 | 134 | 0.542177 |
2df27987733010a119d2e913cac73ea60ab6bcba | 23,412 | py | Python | rigl/experimental/jax/pruning/symmetry_test.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 276 | 2019-11-25T22:05:45.000Z | 2022-03-30T11:55:34.000Z | rigl/experimental/jax/pruning/symmetry_test.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 10 | 2020-02-26T14:53:50.000Z | 2021-09-08T16:27:28.000Z | rigl/experimental/jax/pruning/symmetry_test.py | vishalbelsare/rigl | f18abc7d82ae3acc6736068408a0186c9efa575c | [
"Apache-2.0"
] | 54 | 2019-11-26T18:50:33.000Z | 2022-03-29T20:08:08.000Z | # coding=utf-8
# Copyright 2021 RigL 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 agree... | 37.280255 | 81 | 0.661199 |
2df2ad53afa6a15dade8a822e1e66fb39f1f2b7b | 1,725 | py | Python | alipay/aop/api/domain/DetailBean.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/DetailBean.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/DetailBean.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class DetailBean(object):
def __init__(self):
self._code = None
self._description = None
self._order = None
@property
def code(self):
return self._code
@co... | 24.295775 | 73 | 0.548986 |
2df2c2549d6326aa7f534c3dd0709e8cfd144e13 | 19,890 | py | Python | ginga/mplw/ImageViewMpl.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/mplw/ImageViewMpl.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | ginga/mplw/ImageViewMpl.py | SimonKrughoff/ginga | abcd284228400092b2d7b73bb51d30632e90ee03 | [
"BSD-3-Clause"
] | null | null | null | #
# ImageViewMpl.py -- a backend for Ginga using a Matplotlib figure
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
from __future__ import absolute_import
from io import BytesIO
# Matplotlib imports
import matplotlib
#from matplotlib.path import Path
impo... | 33.884157 | 83 | 0.573806 |
2df2c6ee39b8fd3858f8e3ba3cff837e1b4731b5 | 3,721 | py | Python | source/backend/workflow_trigger/infrastructure/stacks/chaliceapp.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 22 | 2021-11-24T01:23:07.000Z | 2022-03-26T23:24:46.000Z | source/backend/workflow_trigger/infrastructure/stacks/chaliceapp.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | null | null | null | source/backend/workflow_trigger/infrastructure/stacks/chaliceapp.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 3 | 2021-12-10T09:42:51.000Z | 2022-02-16T02:22:50.000Z | import os
import sys
from aws_cdk import (
core as cdk,
aws_iam as iam,
aws_lambda as _lambda,
aws_s3 as s3,
aws_s3_notifications as s3n
)
# Ask Python interpreter to search for modules in the topmost folder. This is required to access the shared.infrastructure.helpers module
sys.path.append('../.... | 33.827273 | 137 | 0.59097 |
2df2d050c56b63e592cc5d74b6df3d6d3407cb28 | 224 | py | Python | instructors/lessons/keywords_and_control_flow/examples/ex3.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/keywords_and_control_flow/examples/ex3.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/keywords_and_control_flow/examples/ex3.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z |
for i in range(10):
if i == 5:
break
else:
print "i = ", i
try:
for each in Cardamom:
print each
except Exception as e:
print "Exception:", e
finally:
print "And we're done"
| 11.789474 | 26 | 0.526786 |
2df2d16111de463de1bc7668adf8c2ac242b8466 | 4,350 | py | Python | python/eggroll/roll_site/proto/proxy_pb2_grpc.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | 1 | 2020-10-23T03:18:54.000Z | 2020-10-23T03:18:54.000Z | python/eggroll/roll_site/proto/proxy_pb2_grpc.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | python/eggroll/roll_site/proto/proxy_pb2_grpc.py | ZYKJShadow/eggroll | 02b845c46cfb7a67459c6d842fa9ef3a02ae60ba | [
"Apache-2.0"
] | null | null | null | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import eggroll.roll_site.api.proto.basic_meta_pb2 as basic__meta__pb2
import eggroll.roll_site.api.proto.proxy_pb2 as proxy__pb2
class DataTransferServiceStub(object):
"""data transfer service
"""
def __init__(self, channel):
... | 35.080645 | 92 | 0.741609 |
2df2d44eb6b042318640b4738bc58b85aaa3baa2 | 938 | py | Python | tests/unit/cli/test_cli_main.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | null | null | null | tests/unit/cli/test_cli_main.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | null | null | null | tests/unit/cli/test_cli_main.py | guillaumegenthial/fromconfig | 1feecb9d9a3d67f9ed94a3fe17905e6226b954c7 | [
"Apache-2.0"
] | 1 | 2021-05-25T20:11:51.000Z | 2021-05-25T20:11:51.000Z | """Tests for cli.main."""
import fromconfig
import subprocess
def capture(command):
"""Utility to execute and capture the result of a commmand."""
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = proc.communicate()
return out, err, proc.returncode
def tes... | 27.588235 | 84 | 0.667377 |
2df2f26cde04ec4b512759ba99386a5c7819891c | 1,817 | py | Python | somaticseq/utilities/bedFileHandler.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 159 | 2015-07-26T15:14:44.000Z | 2022-03-31T03:29:25.000Z | somaticseq/utilities/bedFileHandler.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 77 | 2016-06-12T21:44:43.000Z | 2022-03-31T19:33:49.000Z | somaticseq/utilities/bedFileHandler.py | bioinform/somaticseq | 71f058dcdfea78ec056aa46f96a40cc737cc559f | [
"BSD-2-Clause"
] | 64 | 2015-10-26T01:34:32.000Z | 2022-03-14T14:43:08.000Z | #!/usr/bin/env python3
class BedFile:
def __init__(self, BedFile):
'''Argument is a line in pileup file.'''
self.BedFile = BedFile
bedRegions = {}
with open(self.BedFile) as bed:
line_i = bed.readline().rstrip()
... | 30.283333 | 99 | 0.422675 |
2df3033446532192cb4865be58a999c65a6f6721 | 2,033 | py | Python | rpi-broker/data_collection.py | UCSD-SEELab/iotsim-validation | f3f560a15172624bfc7e11dd5ae1d9bc4bc2b3fb | [
"MIT"
] | null | null | null | rpi-broker/data_collection.py | UCSD-SEELab/iotsim-validation | f3f560a15172624bfc7e11dd5ae1d9bc4bc2b3fb | [
"MIT"
] | null | null | null | rpi-broker/data_collection.py | UCSD-SEELab/iotsim-validation | f3f560a15172624bfc7e11dd5ae1d9bc4bc2b3fb | [
"MIT"
] | 1 | 2020-04-08T16:52:36.000Z | 2020-04-08T16:52:36.000Z | #!/usr/bin/python3
'''
A data collection script running on RPi broker.
Save all subscribed data into certain folders.
Work on Python 3.5.3 of Raspberry Pi Zero
To run, please specify a test case. The script will create a folder in `data`
to store traces if there is no such directory.
python3 data_collect... | 29.897059 | 80 | 0.636006 |
2df30b525cee4b39bdde3612b0ad7b4caecf2f50 | 24,300 | py | Python | assets/lib/shaka-player/build/stats.py | amitrai1095/uFaberTemp | 279ba03e507ac0b4b7a87ea5c39e2c9d1fe67e29 | [
"CC0-1.0"
] | 1 | 2017-02-19T12:13:20.000Z | 2017-02-19T12:13:20.000Z | assets/lib/shaka-player/build/stats.py | amitrai1095/uFaberTemp | 279ba03e507ac0b4b7a87ea5c39e2c9d1fe67e29 | [
"CC0-1.0"
] | null | null | null | assets/lib/shaka-player/build/stats.py | amitrai1095/uFaberTemp | 279ba03e507ac0b4b7a87ea5c39e2c9d1fe67e29 | [
"CC0-1.0"
] | 1 | 2022-03-19T01:47:54.000Z | 2022-03-19T01:47:54.000Z | #!/usr/bin/python
#
# Copyright 2016 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 30.527638 | 80 | 0.652099 |
2df30e073999735c2e86dbb05a240ce0dcd25a52 | 40 | py | Python | tests/utils/__init__.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | 2 | 2022-03-28T17:27:21.000Z | 2022-03-29T22:27:15.000Z | tests/utils/__init__.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | null | null | null | tests/utils/__init__.py | SciencerIO/sciencer-toolkit | f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9 | [
"MIT"
] | 1 | 2022-03-28T14:47:53.000Z | 2022-03-28T14:47:53.000Z | from .fake_provider import FakeProvider
| 20 | 39 | 0.875 |
2df3157b3af3de8dd27bc2472945447b8427e2b4 | 15,834 | py | Python | astronomy/scidb/ref.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 3 | 2017-08-08T09:07:27.000Z | 2018-09-12T14:54:56.000Z | astronomy/scidb/ref.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 1 | 2020-10-13T04:13:10.000Z | 2020-10-13T04:13:10.000Z | astronomy/scidb/ref.py | tpawlowski/image_analytics | 60445177a45c81a2c9c389b2f85f0d49d561c211 | [
"MIT"
] | 2 | 2018-02-26T18:03:23.000Z | 2018-03-20T08:29:00.000Z | import lsst.pipe.base as pipeBase
from lsst.pipe.tasks.processCcd import ProcessCcdTask
from lsst.obs.decam.decamNullIsr import DecamNullIsrTask
from lsst.ip.isr import IsrTask
import lsst.pex.config as pexConfig
import lsst.pipe.base as pipeBase
from lsst.pipe.tasks.calibrate import CalibrateTask, CalibrateConfig
from... | 41.450262 | 298 | 0.615321 |
2df31dcbe818ba5c18630253727b1eb767549c22 | 2,428 | py | Python | pybo/third_party/__init__.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | pybo/third_party/__init__.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | pybo/third_party/__init__.py | mikkokotila/pybo | ae921861e3e8c18856f19c59fc4c7da8f2126c1c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from .cql import Query
__all__ = ['Query', 'parse_cql_query', 'replace_token_attributes']
def parse_cql_query(query, numerals=True, booleans=True):
"""
CQL parser for replacing the content of Token.attributes.
From the CQL syntax, only the attribute names and the values
are taken int... | 30.734177 | 79 | 0.598435 |
2df3210e5a1c71567b13b2f719974723dc632020 | 4,227 | py | Python | slackit/services/gdoc.py | rarescosma/slackit | ae7fad78bb8ea74b92a8f2453edade6e36f46012 | [
"MIT"
] | null | null | null | slackit/services/gdoc.py | rarescosma/slackit | ae7fad78bb8ea74b92a8f2453edade6e36f46012 | [
"MIT"
] | null | null | null | slackit/services/gdoc.py | rarescosma/slackit | ae7fad78bb8ea74b92a8f2453edade6e36f46012 | [
"MIT"
] | null | null | null | """Google Docs service."""
from dataclasses import dataclass
from functools import lru_cache
from typing import Any, List, Tuple
from google.auth import load_credentials_from_file
from googleapiclient.discovery import build
from .. import Message, Service
from .._config import Config
SCOPES = ["https://www.googleapi... | 29.978723 | 77 | 0.487107 |
2df354cc5c3a6e09181f3129c98ba6ea28a3e8a0 | 2,237 | py | Python | pyproxy/pyproxy/providers/s3.py | dburihabwa/recast | f7adbc344e174f48a919a651df54945ec9672201 | [
"MIT"
] | null | null | null | pyproxy/pyproxy/providers/s3.py | dburihabwa/recast | f7adbc344e174f48a919a651df54945ec9672201 | [
"MIT"
] | 1 | 2020-11-08T20:21:13.000Z | 2020-11-08T20:21:13.000Z | pyproxy/pyproxy/providers/s3.py | dburihabwa/recast | f7adbc344e174f48a919a651df54945ec9672201 | [
"MIT"
] | 3 | 2018-05-24T14:40:54.000Z | 2021-07-10T17:54:26.000Z | """
An S3 backend for playcloud
"""
import boto3
class S3Provider(object):
"""
A playcloud backend that talks with an S3-compatible backend
"""
def __init__(self,
bucket="playcloud",
endpoint_url="http://durable:9000",
aws_access_key_id="playcloud",
... | 32.897059 | 113 | 0.560125 |
2df39153b6e695795a06053ce62c760eb775fe48 | 3,005 | py | Python | Core/Model/FirefoxModel/Cache/__init__.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | null | null | null | Core/Model/FirefoxModel/Cache/__init__.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | 28 | 2021-06-20T17:39:00.000Z | 2021-09-04T15:03:41.000Z | Core/Model/FirefoxModel/Cache/__init__.py | UpBeatMan/Abschlussarbeit | e842df691bbfdf77cd1c41d9de00718166bb4e19 | [
"MIT"
] | null | null | null | from importlib import import_module
from Model.util import log_message
class DataSourcesCache:
def __init__(self, profile_path: str, cache_path: str):
self.sources = {}
source_names = []
source_names.append(
["Model.FirefoxModel.Cache.cache2entries", "CacheEntryHandler"]
... | 32.663043 | 102 | 0.51381 |
2df3b02a0bb1b55607996c49f4fa9b78e9cf44ad | 19,911 | py | Python | tools/vis_gradcam.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | 10 | 2020-06-15T03:03:59.000Z | 2021-08-08T23:33:04.000Z | tools/vis_gradcam.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | null | null | null | tools/vis_gradcam.py | daniel-ho/seg-nbdt | ebbe3551671fb4301b0fb32fdd665c6ed3cc3fde | [
"MIT"
] | 3 | 2020-12-19T04:22:56.000Z | 2021-01-23T14:35:06.000Z | import argparse
import os
import pprint
import shutil
import sys
import logging
import time
import timeit
from pathlib import Path
import cv2
import random
import numpy as np
import matplotlib.cm as cm
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
import _in... | 42.36383 | 164 | 0.627944 |
2df3c1e745ffd46d1b762e17a470876ca903c41b | 9,659 | py | Python | bob_white/bwhite_20.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 3 | 2020-11-16T15:20:11.000Z | 2020-12-11T17:01:42.000Z | bob_white/bwhite_20.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | null | null | null | bob_white/bwhite_20.py | techartorg/Advent_of_Code_2020 | ae21164bc126352e7a2e9c9c6a0017ccb9d946cc | [
"MIT"
] | 1 | 2020-12-13T04:42:44.000Z | 2020-12-13T04:42:44.000Z | from math import prod
from collections import defaultdict
from itertools import product
pzl_input = open("day_20.input").read().split("\n\n")
tiles: defaultdict[int, list[str]] = defaultdict(list)
for block in pzl_input:
title, *t = block.splitlines()
tiles[int(title[len("Tile ") : -1])] = t
def print_tile(... | 32.304348 | 148 | 0.620872 |
2df3f7f29c28197eee856504c81030cddf9f5ff4 | 16,860 | py | Python | tempest/api/image/v1/test_images.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/image/v1/test_images.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | tempest/api/image/v1/test_images.py | vmahuli/tempest | f70319f5eda72b8c8a913ae1002ec531324e4116 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 OpenStack Foundation
# 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 requ... | 43.230769 | 78 | 0.593891 |
2df43e1dd1ba38f533c7724864e825c28fef2b2b | 3,187 | py | Python | incasem/torch/loss/lsd_loss.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/torch/loss/lsd_loss.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | incasem/torch/loss/lsd_loss.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | import logging
import time
import torch
logger = logging.getLogger(__name__)
class LsdLoss(torch.nn.Module):
def __init__(self, weight=None, device='cuda'):
super().__init__()
self.register_buffer('weight', weight)
self.device = device
logger.debug(f'Using device {self.device}')... | 28.972727 | 73 | 0.590838 |
2df466ae215f9ee336d4cc668cdcf518408c2cb0 | 493 | py | Python | aurora/bag_transfer/migrations/0012_auto_20180917_1520.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | 19 | 2018-05-09T21:00:24.000Z | 2021-03-11T23:09:03.000Z | aurora/bag_transfer/migrations/0012_auto_20180917_1520.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | 339 | 2017-10-12T16:05:22.000Z | 2022-02-23T20:48:41.000Z | aurora/bag_transfer/migrations/0012_auto_20180917_1520.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | 3 | 2019-11-05T16:30:07.000Z | 2021-08-16T15:50:34.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-09-17 19:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bag_transfer', '0011_auto_20180731_2153'),
]
operations = [
migrations.Alt... | 23.47619 | 73 | 0.636917 |
2df46e5342ae512f3a8ce12797d8e30d60262a27 | 4,818 | py | Python | TheTrashCycle/main/TrashInference/trash/detect_multiple.py | TheRealAakash/TheLifeCycle | 288a28acf244d6edde95760c08cb1ccb7609422c | [
"MIT"
] | null | null | null | TheTrashCycle/main/TrashInference/trash/detect_multiple.py | TheRealAakash/TheLifeCycle | 288a28acf244d6edde95760c08cb1ccb7609422c | [
"MIT"
] | null | null | null | TheTrashCycle/main/TrashInference/trash/detect_multiple.py | TheRealAakash/TheLifeCycle | 288a28acf244d6edde95760c08cb1ccb7609422c | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import sys
#add this to python path, since weights are there
sys.path.append('/trash/Project_Trash_Mask_RCNN/Mask-RCNN/Mask_RCNN-master/')
print(sys.path)
def random_colors(N):
np.random.seed(1)
colors = [tuple(255 * np.random.rand(3)) for _ in range(N)]
return colors
def a... | 28.678571 | 85 | 0.588003 |
2df4860d4344dc48494ea40b8cba1b7fe16d1046 | 2,243 | py | Python | contrib/l10n_revert_lineno_conflicts.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | contrib/l10n_revert_lineno_conflicts.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | contrib/l10n_revert_lineno_conflicts.py | CoRfr/trac | 31509d77aa7cd3c6c0057a607313ceaed1f7a20b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Edgewall Software
# Copyright (C) 2013 Christian Boos <cboos@edgewall.org>
# 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:/... | 32.507246 | 80 | 0.58716 |
2df4978c421dbf9b067e72d75d957a339035d23c | 2,693 | py | Python | tests/utils/test_task_handler_with_custom_formatter.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 3 | 2015-08-25T13:56:44.000Z | 2020-03-21T10:26:58.000Z | tests/utils/test_task_handler_with_custom_formatter.py | joshowen/airflow | d0cf232919839d0e338dcc38a5c7a1841077eaae | [
"Apache-2.0"
] | 33 | 2020-06-16T15:12:33.000Z | 2021-07-23T07:04:35.000Z | tests/utils/test_task_handler_with_custom_formatter.py | santecapital/airflow | 7f02e56c9cb8b548624d13e9c2c2b89d753f996b | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 4 | 2020-07-17T14:02:28.000Z | 2022-02-23T04:29:58.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.602941 | 102 | 0.730041 |
2df4b9e21a8bb44652f40d949a16cf44fc9a1672 | 1,067 | py | Python | megdc/help_text.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | 1 | 2015-11-06T09:12:59.000Z | 2015-11-06T09:12:59.000Z | megdc/help_text.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | null | null | null | megdc/help_text.py | indykish/megdc.py | e9de7ce844889efef2ff30444bdf0e361956d7fa | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
__install_all__='''
apt-get -y install megamnilavu >> $MEGAM_LOG
echo "export MEGAM_HOME=/var/lib/megam" >> /home/cibadmin/.bashrc
source /home/cibadmin/.bashrc
sudo apt-add-repository -y ppa:openjdk-r/ppa >> $MEGAM_LOG
sudo apt-get -y update >> $MEGAM_LOG
sudo apt-get -y install openjdk-8-jdk ... | 22.229167 | 65 | 0.737582 |
2df4d4ab491a1b56a50c3c67051b6bb8772c7207 | 24,297 | py | Python | violas_client/exchange_client/client.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/exchange_client/client.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | violas_client/exchange_client/client.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | import time
from typing import Optional, Union
from violas_client.libra_client import Client as LibraClient
from violas_client.extypes.transaction.module import Module
from violas_client.extypes.transaction.script import Script
from violas_client.lbrtypes.transaction.transaction_argument import TransactionArgument
from... | 48.208333 | 169 | 0.675474 |
2df4dfcc11cf85966e02aa998a08e7f5a639288c | 19,278 | py | Python | venv/Lib/site-packages/tensorflow/python/ops/gen_audio_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/python/ops/gen_audio_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | null | null | null | venv/Lib/site-packages/tensorflow/python/ops/gen_audio_ops.py | rexliu3/StockTradingBotCloud | 46b732b9c05f73bc0e856a3c4a16854b6d12e18e | [
"MIT"
] | 1 | 2020-06-28T11:47:47.000Z | 2020-06-28T11:47:47.000Z | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
Original C++ source file: audio_ops.cc
"""
import collections
from tensorflow.python import pywrap_tfe as pywrap_tfe
from tensorflow.python.eager import context as _context
from tensorflow.python.eager import core as _core
from te... | 43.615385 | 156 | 0.73628 |
2df4e79fcc9dbecbbb145cac69d4b682efe668ec | 5,601 | py | Python | archive/gen-sim.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | archive/gen-sim.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | archive/gen-sim.py | tsherburne/ma_sim | 4082da1c80401dec4293415bc9e9239a6bb8185d | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python3
import simpy
import random
import logging
import logging.handlers
import sys
# Setup Logger
logger = logging.getLogger("SimPy")
logger.setLevel(logging.DEBUG)
ls = logging.StreamHandler(sys.stdout)
ls.setLevel(logging.INFO)
logFormat = logging.Formatter('%(asctime)s : %(name)s : %(levelname)s : %(m... | 35.226415 | 85 | 0.642921 |
2df52359956b837ce7b2556ca351527aff12436f | 4,279 | py | Python | sdk/translation/azure-ai-translation-document/samples/sample_translate_multiple_inputs.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/translation/azure-ai-translation-document/samples/sample_translate_multiple_inputs.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/translation/azure-ai-translation-document/samples/sample_translate_multiple_inputs.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
"""
FILE: sample_translate_multiple_inputs.py
DESCRIPTION:
This sample demonstrates how to begin translating with documents in multiple source containers to
mu... | 41.543689 | 116 | 0.671185 |
2df530ca44be5b8d6477cf37a5442f6473a279b6 | 573 | py | Python | blog/admin.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | null | null | null | blog/admin.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | 8 | 2021-04-28T21:02:47.000Z | 2022-03-25T20:35:57.000Z | blog/admin.py | ryanleonbutler/rbo | f51d19c5fd056ebdfba1416a9377b225eb1015e6 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from django.db import models
from blog.models import Category, Nibble, NibbleCategory, Post
class CategoryAdmin(admin.ModelAdmin):
pass
class PostAdmin(admin.ModelAdmin):
list_display = ("title", "slug", "status", "created_on", "last_modified")
list_filter = ("status",)... | 22.92 | 77 | 0.757417 |
2df53ea42aed1c3338e8b5cf86c170ffdfe06678 | 131 | py | Python | magicdice/__init__.py | emre/magicdice | 326512696b766248cfb8998aec5b0bd8bff393ba | [
"MIT"
] | 5 | 2019-02-26T21:59:21.000Z | 2019-05-28T06:32:06.000Z | magicdice/__init__.py | emre/magicdice | 326512696b766248cfb8998aec5b0bd8bff393ba | [
"MIT"
] | null | null | null | magicdice/__init__.py | emre/magicdice | 326512696b766248cfb8998aec5b0bd8bff393ba | [
"MIT"
] | null | null | null | class MagicDice:
def __init__(self, account, active_key):
self.account = account
self.active_key = active_key
| 21.833333 | 44 | 0.671756 |
2df540745dce7b5ad41f3ee095a23eb6f9520442 | 11,105 | py | Python | Python_files/INRIX_data_preprocessing_15_prepare_link_flows_for_OD_demand_estimation_Jan.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_15_prepare_link_flows_for_OD_demand_estimation_Jan.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | Python_files/INRIX_data_preprocessing_15_prepare_link_flows_for_OD_demand_estimation_Jan.py | jingzbu/InverseVITraffic | c0d33d91bdd3c014147d58866c1a2b99fb8a9608 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
__author__ = "Jing Zhang"
__email__ = "jingzbu@gmail.com"
__status__ = "Development"
from util import *
road_seg_inr_capac = zload('../temp_files/road_seg_inr_capac.pkz')
# load tmc-day-ave_speed data for AM peak of January
tmc_day_speed_dict_Jan_AM = zload('../temp_files/Jan_AM/tmc_day_spee... | 57.838542 | 117 | 0.600991 |
2df59067419ecf079e648dfe77f68ab6747326b9 | 1,442 | py | Python | wielder/util/wgit.py | hamshif/Wielder | 22af082422f2b756cf18d3813e2b4132810d83c3 | [
"Apache-2.0"
] | null | null | null | wielder/util/wgit.py | hamshif/Wielder | 22af082422f2b756cf18d3813e2b4132810d83c3 | [
"Apache-2.0"
] | 3 | 2020-05-04T12:50:35.000Z | 2021-08-20T11:53:09.000Z | wielder/util/wgit.py | hamshif/Wielder | 22af082422f2b756cf18d3813e2b4132810d83c3 | [
"Apache-2.0"
] | 1 | 2020-04-14T04:29:26.000Z | 2020-04-14T04:29:26.000Z | import logging
import git
from wielder.util.commander import subprocess_cmd
from wielder.util.log_util import setup_logging
def is_repo(path):
try:
_ = git.Repo(path).git_dir
return True
except git.exc.NoSuchPathError:
return False
except git.exc.InvalidGitRepositoryError:
... | 27.730769 | 82 | 0.68516 |
2df5abbcdf50c70d5a99f7504a28b680e3a0dd7e | 1,253 | py | Python | tools/yum-listpkgs-xml.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | tools/yum-listpkgs-xml.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | tools/yum-listpkgs-xml.py | amplify-education/bcfg2 | 02d7f574babfeb2da99e2aad3a92b4e8d6494f07 | [
"mpich2"
] | null | null | null | #!/usr/bin/python
import sys
sys.path.append('/usr/bin/')
sys.path.append('/usr/share/yum-cli')
import yummain
def mySimpleList(self, pkg):
print("<Package name='%s' version='%s'/>" % (pkg.name, pkg.printVer()))
def myListPkgs(self, lst, description, outputType):
"""outputs based on whatever outputType is.... | 27.844444 | 75 | 0.575419 |
2df5afd94f39f161c40b36da0764a5b858dd519e | 117 | py | Python | main.py | markdavidmc0/stock-picker | 227f970b83e99fbafdf3b4658f9ceb4428b699bd | [
"MIT"
] | null | null | null | main.py | markdavidmc0/stock-picker | 227f970b83e99fbafdf3b4658f9ceb4428b699bd | [
"MIT"
] | null | null | null | main.py | markdavidmc0/stock-picker | 227f970b83e99fbafdf3b4658f9ceb4428b699bd | [
"MIT"
] | null | null | null | from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root():
return {"message": "Hello World"} | 13 | 37 | 0.641026 |
2df5b6f77b6c726d5061c0807c40eafed6bc62dc | 705 | py | Python | tests/format/option-list-directive.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/format/option-list-directive.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | tests/format/option-list-directive.py | doraskayo/buildstream | 1c72d4342ae7df360808de22c5e49f55dbb6bec6 | [
"Apache-2.0"
] | null | null | null | # Pylint doesn't play well with fixtures and dependency injection from pytest
# pylint: disable=redefined-outer-name
import os
import pytest
from buildstream.testing.runcli import cli # pylint: disable=unused-import
# Project directory
DATA_DIR = os.path.dirname(os.path.realpath(__file__))
@pytest.mark.datafiles(D... | 35.25 | 90 | 0.758865 |
2df616f5f5d6d4072ae950d007cb23fc09b85564 | 1,211 | py | Python | alipay/aop/api/response/AlipayEcoMapGeocodingReverseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayEcoMapGeocodingReverseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayEcoMapGeocodingReverseResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayEcoMapGeocodingReverseResponse(AlipayResponse):
def __init__(self):
super(AlipayEcoMapGeocodingReverseResponse, self).__init__()
self._city = None
self.... | 26.326087 | 109 | 0.654831 |
2df62013ebadb957ef71856dab09f377c427eab5 | 4,181 | py | Python | chapter2/intogen-arrays/src/cnv/cnv_enrichment.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | 1 | 2015-12-22T00:53:18.000Z | 2015-12-22T00:53:18.000Z | chapter2/intogen-arrays/src/cnv/cnv_enrichment.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | chapter2/intogen-arrays/src/cnv/cnv_enrichment.py | chris-zen/phd-thesis | 1eefdff8e7ca1910304e27ae42551dc64496b101 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
"""
Calculate enrichment of the oncodrive results
* Configuration parameters:
- The ones required by intogen.data.entity.EntityManagerFactory
- repositories.data: The path to the repository where data files are written.
- overwrite: (optional) Overwrite already existing files ?. Default = no
- ... | 27.506579 | 101 | 0.697441 |
2df622957496e042a4be7e61a8ed39856e7cdb12 | 1,730 | py | Python | datasets_utils/create_FEI_csv.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | datasets_utils/create_FEI_csv.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | datasets_utils/create_FEI_csv.py | michaelStettler/BVS | 947f1e505ccc3ebcf1926c8f52924d823bd1e101 | [
"Apache-2.0"
] | null | null | null | import os
import pandas as pd
import numpy as np
np.random.seed(0)
# path = 'D:/Dataset/FEI' # windows
path = '/Users/michaelstettler/PycharmProjects/BVS/data/FEI' # personal mac
csv_name = 'FEI_face_units.csv'
df = pd.DataFrame(columns=("image", "category", "path"))
def get_files(path, folder):
# find all f... | 30.350877 | 108 | 0.691908 |
2df6685852146a751202e0be37341136df5e1181 | 30,218 | py | Python | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | app.py | 3cor/spw | c8b23ee2bc56c1390c13c1f70ae8bc769d961801 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from PyQt5 import QtCore, QtGui, QtWidgets
import modules.passgen as pg
import modules.mongodb as mg
import modules.xcrypt as xc
import hashlib
import os
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(80... | 48.117834 | 607 | 0.673109 |
2df675105d145fcb4b7f95dffd6ae5d62d36dc8a | 1,916 | py | Python | settings.py | ViliusT/django-db-mutex | f14de844a7b6c1ed93207f1bd47c7a05fba37c2f | [
"MIT"
] | 14 | 2015-08-18T07:34:24.000Z | 2021-12-10T19:12:19.000Z | settings.py | ViliusT/django-db-mutex | f14de844a7b6c1ed93207f1bd47c7a05fba37c2f | [
"MIT"
] | 11 | 2015-03-24T18:29:10.000Z | 2019-03-22T15:50:23.000Z | settings.py | ViliusT/django-db-mutex | f14de844a7b6c1ed93207f1bd47c7a05fba37c2f | [
"MIT"
] | 25 | 2015-03-24T20:15:16.000Z | 2021-12-10T19:12:21.000Z | import os
from django.conf import settings
def configure_settings():
"""
Configures settings for manage.py and for run_tests.py.
"""
if not settings.configured:
# Determine the database settings depending on if a test_db var is set in CI mode or not
test_db = os.environ.get('DB', None... | 32.474576 | 96 | 0.482255 |
2df6811fb9d47ccfbcb6b14e2a88648070c83e83 | 17,630 | py | Python | mf2cCommsLib/mf2cDemoAlice2Bob/mf2cDemoBobFromAlice.py | cketley/acsl | 42b131672e115f449aef459a17e289d4723cd395 | [
"Apache-2.0"
] | null | null | null | mf2cCommsLib/mf2cDemoAlice2Bob/mf2cDemoBobFromAlice.py | cketley/acsl | 42b131672e115f449aef459a17e289d4723cd395 | [
"Apache-2.0"
] | 1 | 2018-11-08T15:32:28.000Z | 2018-11-08T15:32:53.000Z | mf2cCommsLib/mf2cDemoAlice2Bob/mf2cDemoBobFromAlice.py | cketley/acsl | 42b131672e115f449aef459a17e289d4723cd395 | [
"Apache-2.0"
] | null | null | null | #coding=utf-8
# NB we need to declare the code format so we can use multinational characters
import logging
import time
import json
import socket
import sys
from zlib import adler32
import base64
#from mf2cComms.channel import channel
from mf2cComms.channel.channel import Channel
#from mf2cComms.channel.identity im... | 36.652807 | 133 | 0.6384 |
2df6899972d0c3dd94ca4de98864b1732f4d8b95 | 1,373 | py | Python | views.py | jbcurtin/datsu-panic | aa3706cf2c9c7b74d15e94b3ef767a67853720f9 | [
"MIT"
] | null | null | null | views.py | jbcurtin/datsu-panic | aa3706cf2c9c7b74d15e94b3ef767a67853720f9 | [
"MIT"
] | null | null | null | views.py | jbcurtin/datsu-panic | aa3706cf2c9c7b74d15e94b3ef767a67853720f9 | [
"MIT"
] | null | null | null | from .exceptions import InvalidUsage
class HTTPMethodView:
""" Simple class based implementation of view for the panic.
You should implement methods (get, post, put, patch, delete) for the class
to every HTTP method you want to support.
For example:
.. code-block:: python
class DummyVie... | 31.204545 | 78 | 0.605972 |
2df6938c6be8acdc1e0030032b5ea3b434dc62b5 | 6,099 | py | Python | xmldiff/main.py | Shoobx/xmldiff | c6f2e885fc4b67b816d6c665fa06ad06ffdf5d66 | [
"MIT"
] | 144 | 2018-04-18T17:47:24.000Z | 2022-03-24T06:02:28.000Z | xmldiff/main.py | Shoobx/xmldiff | c6f2e885fc4b67b816d6c665fa06ad06ffdf5d66 | [
"MIT"
] | 78 | 2018-05-22T11:06:59.000Z | 2022-02-11T13:13:53.000Z | xmldiff/main.py | Shoobx/xmldiff | c6f2e885fc4b67b816d6c665fa06ad06ffdf5d66 | [
"MIT"
] | 39 | 2018-09-19T02:34:21.000Z | 2022-03-31T03:45:00.000Z | """All major API points and command-line tools"""
import pkg_resources
from argparse import ArgumentParser
from lxml import etree
from xmldiff import diff, formatting, patch
__version__ = pkg_resources.require("xmldiff")[0].version
FORMATTERS = {
"diff": formatting.DiffFormatter,
"xml": formatting.XMLFormatt... | 29.181818 | 85 | 0.642236 |
2df6a591b99e20f17cca84e921fbf8447b2242c5 | 5,165 | py | Python | tests/unit/test_request_builder.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | tests/unit/test_request_builder.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | tests/unit/test_request_builder.py | barbosa/scanapi | 82def9d7c9ef19a2b658d9aa6c973790e2c16ddc | [
"MIT"
] | null | null | null | import pytest
from scanapi.requests_builder import RequestsBuilder
from scanapi.yaml_loader import load_yaml
class TestRequestBuilder:
class TestBuildAll:
@pytest.fixture
def mock_build_endpoints(self, mocker):
return mocker.patch(
"scanapi.requests_builder.RequestsBui... | 40.351563 | 88 | 0.562246 |
2df6a7b0ac47f4f904f2331bccdc317ae210e35e | 2,021 | py | Python | backend/mockdatagen/mocks/register.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/mockdatagen/mocks/register.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | backend/mockdatagen/mocks/register.py | StichtingIAPC/swipe | d1ea35a40813d2d5e9cf9edde33148c0a825efc4 | [
"BSD-3-Clause-Clear"
] | null | null | null | from decimal import Decimal
from mockdatagen.helpers import MockGen
from money.models import CurrencyData, Denomination
from register.models import PaymentType, Register, RegisterCount, SalesPeriod, DenominationCount, RegisterMaster
@MockGen.register
class PaymentTypeGen:
model = PaymentType
@staticmethod
... | 31.578125 | 115 | 0.704107 |
2df6fdc8506430c6802b518751b8d1663949f24d | 243 | py | Python | tests/megawing/papilioone/out.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 14 | 2017-10-08T09:16:10.000Z | 2021-11-27T19:12:24.000Z | tests/megawing/papilioone/out.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 7 | 2018-04-12T21:33:49.000Z | 2018-08-21T22:14:20.000Z | tests/megawing/papilioone/out.py | splhack/loam | 10b08bd622b7cfd63eabaec4729f6238e4521b30 | [
"MIT"
] | 3 | 2018-07-24T04:55:02.000Z | 2019-12-30T08:12:39.000Z | import magma as m
from loam.boards.papilioone import PapilioOne
papilio = PapilioOne()
papilio.C[8].rename('LED0').output().on()
papilio.C[9].rename('LED1').output().on()
main = papilio.main()
m.wire( 1, main.LED0 )
m.wire( 1, main.LED1 )
| 18.692308 | 45 | 0.691358 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.