hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
68b6f3555ff0db425780047c1776e88ea79de40e | 3,478 | py | Python | src/oci/data_connectivity/models/type_summary.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_connectivity/models/type_summary.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/data_connectivity/models/type_summary.py | pabs3/oci-python-sdk | 437ba18ce39af2d1090e277c4bb8750c89f83021 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 26.150376 | 245 | 0.598907 |
1e056ae0bfa1e82a1a961d5fd716caffe3b5fa2d | 985 | py | Python | Demo.py | Saadmairaj/Tkinter-Color-Bar | 66fb719ba87283a559e84080dad5aae25a3e3a8a | [
"MIT"
] | null | null | null | Demo.py | Saadmairaj/Tkinter-Color-Bar | 66fb719ba87283a559e84080dad5aae25a3e3a8a | [
"MIT"
] | null | null | null | Demo.py | Saadmairaj/Tkinter-Color-Bar | 66fb719ba87283a559e84080dad5aae25a3e3a8a | [
"MIT"
] | null | null | null | '''
This file is just to show the demo of Color Bar widget
'''
if __name__ == "__main__":
from tkinter import *
from ColorBar import Colorscale
root = Tk()
root.config({"bg":"black"})
root.geometry("320x250+100+100")
root.title("Tkinter Color Bar")
L = Frame(root, bg="white", width=150, h... | 31.774194 | 104 | 0.496447 |
6713142c41fa032b3606e3dfcc48fa8dcc921358 | 2,919 | py | Python | tests/sparseml/sparsification/test_oracle.py | zjzh/sparseml | b92df81257d47eb5aab731bc9929da7339f34667 | [
"Apache-2.0"
] | 922 | 2021-02-04T17:51:54.000Z | 2022-03-31T20:49:26.000Z | tests/sparseml/sparsification/test_oracle.py | zjzh/sparseml | b92df81257d47eb5aab731bc9929da7339f34667 | [
"Apache-2.0"
] | 197 | 2021-02-04T22:17:21.000Z | 2022-03-31T13:58:55.000Z | tests/sparseml/sparsification/test_oracle.py | zjzh/sparseml | b92df81257d47eb5aab731bc9929da7339f34667 | [
"Apache-2.0"
] | 80 | 2021-02-04T22:20:14.000Z | 2022-03-30T19:36:15.000Z | # Copyright (c) 2021 - present / Neuralmagic, 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 b... | 33.94186 | 85 | 0.759164 |
e60ca75496e5d1426943645cd0cd20ab5aa9cc9b | 758 | py | Python | RecoTracker/TrackProducer/python/GsfTrackProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | RecoTracker/TrackProducer/python/GsfTrackProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | RecoTracker/TrackProducer/python/GsfTrackProducer_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
gsfTrackProducer = cms.EDProducer("GsfTrackProducer",
src = cms.InputTag("CkfElectronCandidates"),
beamSpot = cms.InputTag("offlineBeamSpot"),
producer = cms.string(''),
Fitter = cms.string('GsfElectronFittingSmoother'),
useHitsSplitting = cms.bool(False),
... | 37.9 | 89 | 0.692612 |
aa17e8d3ddd5cd0ff0ba8e7de15dc75e3dd16f63 | 2,973 | py | Python | datasets/titanic-dag.py | jeffrz/info4310-sp2022 | f7d665133de3b0d307342a98e3b48019d010d6ed | [
"Apache-2.0"
] | null | null | null | datasets/titanic-dag.py | jeffrz/info4310-sp2022 | f7d665133de3b0d307342a98e3b48019d010d6ed | [
"Apache-2.0"
] | null | null | null | datasets/titanic-dag.py | jeffrz/info4310-sp2022 | f7d665133de3b0d307342a98e3b48019d010d6ed | [
"Apache-2.0"
] | null | null | null | import json, sys
from pprint import pprint
# takes in titanic.json and produces a directed acyclic graph for sankey diagramming
with open('titanic.json') as f:
dat = json.loads( f.read() )
def ageQuartile( age ):
if age < 21:
return 'Age - 1st Quartile'
elif age < 28:
return 'Age - ... | 25.852174 | 84 | 0.528422 |
2a4ca862ab4a446187824a3c25cac8e5e9bba17d | 1,207 | py | Python | kunquat/tracker/audio/drivers/pushaudio.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | kunquat/tracker/audio/drivers/pushaudio.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | kunquat/tracker/audio/drivers/pushaudio.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Authors: Toni Ruottu, Finland 2013
# Tomi Jylhä-Ollila, Finland 2013-2014
#
# This file is part of Kunquat.
#
# CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, Kunquat Affirmers have waived all
# copyright and related or ne... | 23.211538 | 70 | 0.61889 |
f75ffabdd3e5904bdf3f5f71837cc50e42f504a5 | 15,928 | py | Python | solo/methods/mocov2_distillation_AT_dual_bn.py | pantheon5100/DeACL | 32cf8182f2ef271fab7453bc5cc1ddea6dfa3c22 | [
"MIT"
] | null | null | null | solo/methods/mocov2_distillation_AT_dual_bn.py | pantheon5100/DeACL | 32cf8182f2ef271fab7453bc5cc1ddea6dfa3c22 | [
"MIT"
] | null | null | null | solo/methods/mocov2_distillation_AT_dual_bn.py | pantheon5100/DeACL | 32cf8182f2ef271fab7453bc5cc1ddea6dfa3c22 | [
"MIT"
] | null | null | null | # Copyright 2021 solo-learn development team.
# 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, publ... | 38.84878 | 104 | 0.582182 |
18a404a159ccd3bc648edc7e591dfd74bf217f11 | 2,763 | py | Python | src/APCDSLink.py | IOT-DSA/dslink-python-apcups | 92682549d7ea9ed6c6711455b2ddc78dc0e0359b | [
"Apache-2.0"
] | 1 | 2016-06-14T17:42:24.000Z | 2016-06-14T17:42:24.000Z | src/APCDSLink.py | IOT-DSA/dslink-python-apcups | 92682549d7ea9ed6c6711455b2ddc78dc0e0359b | [
"Apache-2.0"
] | null | null | null | src/APCDSLink.py | IOT-DSA/dslink-python-apcups | 92682549d7ea9ed6c6711455b2ddc78dc0e0359b | [
"Apache-2.0"
] | null | null | null | import dslink
import subprocess32
from twisted.internet.task import LoopingCall
def get_key_values():
process = subprocess32.Popen(["apcaccess"], stdout=subprocess32.PIPE)
key_values = []
for i in process.stdout.read().split("\n"):
j = i.split(":", 1)
if len(j) > 1:
key_values.... | 29.084211 | 73 | 0.530583 |
e6738b7b39956385f405c730d001d2a762cd6ec4 | 16,781 | py | Python | Onkyo Network Remote.indigoPlugin/Contents/Server Plugin/onkyoNetworkRemoteDevice.py | RogueProeliator/IndigoPlugins-Onkyo-Receiver-Network-Remote | 4ddc9d5d9dacb863f83f11a46f0f10340731bf64 | [
"MIT"
] | 1 | 2017-01-22T06:05:28.000Z | 2017-01-22T06:05:28.000Z | Onkyo Network Remote.indigoPlugin/Contents/Server Plugin/onkyoNetworkRemoteDevice.py | RogueProeliator/IndigoPlugins-Onkyo-Receiver-Network-Remote | 4ddc9d5d9dacb863f83f11a46f0f10340731bf64 | [
"MIT"
] | 5 | 2017-11-27T05:08:46.000Z | 2022-01-18T22:26:48.000Z | Onkyo Network Remote.indigoPlugin/Contents/Server Plugin/onkyoNetworkRemoteDevice.py | RogueProeliator/IndigoPlugins-Onkyo-Receiver-Network-Remote | 4ddc9d5d9dacb863f83f11a46f0f10340731bf64 | [
"MIT"
] | 1 | 2017-03-06T18:11:39.000Z | 2017-03-06T18:11:39.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#/////////////////////////////////////////////////////////////////////////////////////////
#/////////////////////////////////////////////////////////////////////////////////////////
# Onkyo Network Remote Control by RogueProeliator <rp@rogueproeliator.com>
# See plugin.py... | 55.566225 | 198 | 0.524999 |
905c95c11b95dffe1e23c59605ff741a2cfcf87f | 1,300 | py | Python | greenberry/server/start_introducer.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | greenberry/server/start_introducer.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | greenberry/server/start_introducer.py | greenberrycoin/gbch-blockchain | d99843d720c6e7bd7baaf8bb4639a46dbb56caed | [
"Apache-2.0"
] | null | null | null | import pathlib
from typing import Dict
from greenberry.introducer.introducer import Introducer
from greenberry.introducer.introducer_api import IntroducerAPI
from greenberry.server.outbound_message import NodeType
from greenberry.server.start_service import run_service
from greenberry.util.config import load_config_cl... | 28.888889 | 89 | 0.746923 |
cecfea3af63da664989b9c7252acbc0ba33f1021 | 4,327 | py | Python | up/tasks/multitask/models/union_heads/union_retina_cls.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 196 | 2021-10-30T05:15:36.000Z | 2022-03-30T18:43:40.000Z | up/tasks/multitask/models/union_heads/union_retina_cls.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 12 | 2021-10-30T11:33:28.000Z | 2022-03-31T14:22:58.000Z | up/tasks/multitask/models/union_heads/union_retina_cls.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 23 | 2021-11-01T07:26:17.000Z | 2022-03-27T05:55:37.000Z | import torch.nn as nn
from up.tasks.det.models.heads.roi_head.retina_head import RetinaHeadWithBN
from up.utils.general.registry_factory import MODULE_ZOO_REGISTRY
from .utils import get_inplane
@MODULE_ZOO_REGISTRY.register('UnionRetinaHeadWithBN')
class UnionRetinaHeadWithBN(RetinaHeadWithBN):
def __init__(se... | 45.072917 | 109 | 0.572914 |
5fffa7f7ba4a196a8451adb83ab9c9962d01416b | 2,331 | py | Python | pythreshold/local_th/sauvola.py | pedrogalher/pythreshold | 135e42fb4be1ff4d4c52ea05daca84be1acaa0fc | [
"MIT"
] | null | null | null | pythreshold/local_th/sauvola.py | pedrogalher/pythreshold | 135e42fb4be1ff4d4c52ea05daca84be1acaa0fc | [
"MIT"
] | null | null | null | pythreshold/local_th/sauvola.py | pedrogalher/pythreshold | 135e42fb4be1ff4d4c52ea05daca84be1acaa0fc | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
import numpy as np
__copyright__ = 'Copyright 2017'
__author__ = u'BSc. Manuel Aguado Martínez'
def sauvola_threshold(img, w_size=15, k=0.35):
""" Runs the sauvola's thresholding algorithm.
Reference:
Sauvola, J., Seppanen, T., Haapakoski, S., and Pietikainen, M.:
‘Adapti... | 31.5 | 78 | 0.625483 |
6092274fdf05ebda6998f922ffcfe63742e14ea8 | 13,400 | py | Python | hwrt/create_ffiles.py | MartinThoma/hwrt | 7b274fa3022292bb1215eaec99f1826f64f98a07 | [
"MIT"
] | 65 | 2015-04-08T12:11:22.000Z | 2022-02-28T23:46:53.000Z | hwrt/create_ffiles.py | MartinThoma/hwrt | 7b274fa3022292bb1215eaec99f1826f64f98a07 | [
"MIT"
] | 35 | 2015-01-05T11:56:30.000Z | 2022-03-12T00:55:38.000Z | hwrt/create_ffiles.py | MartinThoma/hwrt | 7b274fa3022292bb1215eaec99f1826f64f98a07 | [
"MIT"
] | 18 | 2015-01-19T15:57:25.000Z | 2021-02-15T20:38:32.000Z | """
Create feature files.
Before this script is run, the `download.py` should get executed to generate
a handwriting_datasets.pickle with exactly those symbols that should also
be present in the feature files and only raw_data that might get used for the
test-, validation- and training set.
"""
# Core Library module... | 33.5 | 85 | 0.631791 |
0407bc1cd5d837fefc6e644664ff7eda0824452a | 613 | py | Python | indico/modules/oauth/views.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | indico/modules/oauth/views.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | indico/modules/oauth/views.py | UNOG-Indico/UNOG-Indico-v2 | 4fa4393cc1f3b453a69f5e0ea3b52c18337831a5 | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from indico.modules.admin.views import WPAdmin
from indico.module... | 24.52 | 57 | 0.781403 |
743b97c018207e2f7192ba5302e1e8c6352b08c6 | 160 | py | Python | Temp_and_humidity/variables.py | fdiazsmith/otherwise_bpi | 41a03f1c542a9aa4b174b7d29999feda07fde3ec | [
"MIT"
] | null | null | null | Temp_and_humidity/variables.py | fdiazsmith/otherwise_bpi | 41a03f1c542a9aa4b174b7d29999feda07fde3ec | [
"MIT"
] | null | null | null | Temp_and_humidity/variables.py | fdiazsmith/otherwise_bpi | 41a03f1c542a9aa4b174b7d29999feda07fde3ec | [
"MIT"
] | null | null | null | COLLECT_NUMBER = 10 # collect number, the collection range is 1-100
IIC_MODE = 0x01 # default use IIC1
ADDRESS = 0x08 | 53.333333 | 83 | 0.5625 |
9690dfada0dbc0dbc5bfb917b24e3c080a06998c | 2,557 | py | Python | compute_volatility.py | hongwilliam/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | 2 | 2020-08-17T03:31:09.000Z | 2020-08-27T01:26:53.000Z | compute_volatility.py | AaronBinChen/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | null | null | null | compute_volatility.py | AaronBinChen/Random-Walk-Down-Wall-Street | 986c773308eb238f41243554631e135232c8fa5a | [
"MIT"
] | 2 | 2020-08-17T03:31:19.000Z | 2020-08-28T19:28:08.000Z | import cgitb
cgitb.enable()
import numpy as np
import pandas as pd
import scipy.stats
import pandas_datareader as pdr
import matplotlib.pyplot as plt
from datetime import datetime, timedelta
import sys
from numpy.polynomial import Polynomial as P
import numpy.linalg as la
# Compute Volatility
def compute_volatility(co... | 33.644737 | 134 | 0.565506 |
c1cb8a17cd69322af4061d8872160a0d3f8591c4 | 807 | py | Python | userprofile/models.py | Stephen-Kamau/restauth | 2f1fe628d5cade5767ab5a5265c3cd2344acc1e2 | [
"MIT"
] | 2 | 2021-02-25T05:12:24.000Z | 2021-03-03T17:22:40.000Z | userprofile/models.py | Stephen-Kamau/restauth | 2f1fe628d5cade5767ab5a5265c3cd2344acc1e2 | [
"MIT"
] | null | null | null | userprofile/models.py | Stephen-Kamau/restauth | 2f1fe628d5cade5767ab5a5265c3cd2344acc1e2 | [
"MIT"
] | 1 | 2021-03-03T17:22:46.000Z | 2021-03-03T17:22:46.000Z | import uuid
from django.db import models
from backend.models import User
class UserProfile(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='profile')
first_name = models.CharField(max_lengt... | 32.28 | 88 | 0.687732 |
bbe3ddd6ecb2c1570b08f2ce35b503987eea4b03 | 1,267 | py | Python | Journal/auth_accounts/managers.py | NikolaKolew/Journal | 9df0e48161fe995c940181b2249d7a3681e2ce21 | [
"MIT"
] | null | null | null | Journal/auth_accounts/managers.py | NikolaKolew/Journal | 9df0e48161fe995c940181b2249d7a3681e2ce21 | [
"MIT"
] | null | null | null | Journal/auth_accounts/managers.py | NikolaKolew/Journal | 9df0e48161fe995c940181b2249d7a3681e2ce21 | [
"MIT"
] | null | null | null | from django.contrib.auth import base_user
from django.contrib.auth.hashers import make_password
from django.contrib.auth.models import User
class AppUsersManager(base_user.BaseUserManager):
def _create_user(self, email, password, **extra_fields):
if not email:
raise ValueError("The given email... | 38.393939 | 70 | 0.6985 |
c9e652f737c27779ef5c22d6c0f646ab31d43aea | 7,995 | py | Python | sample_CreateBodyGroup/BodiesGroupFactry.py | kantoku-code/sample_CreateBodyGroup | ca050f8064ed18896553ad8f726bead586bb0c1e | [
"MIT"
] | 2 | 2021-10-15T05:03:46.000Z | 2022-03-18T13:06:53.000Z | sample_CreateBodyGroup/BodiesGroupFactry.py | kantoku-code/sample_CreateBodyGroup | ca050f8064ed18896553ad8f726bead586bb0c1e | [
"MIT"
] | null | null | null | sample_CreateBodyGroup/BodiesGroupFactry.py | kantoku-code/sample_CreateBodyGroup | ca050f8064ed18896553ad8f726bead586bb0c1e | [
"MIT"
] | null | null | null | #Fusion360API Python BodiesGroupFactry ver0.0.1
#Author-kantoku
#Description-Support the creation of BodiessGroups.
import adsk.core
import adsk.fusion
import json
import neu_server
import neu_modeling
_app = adsk.core.Application.cast(None)
# component extension methods
def isRoot(self :adsk.fusion.Component) -> bo... | 28.151408 | 90 | 0.539087 |
848f84401f51248cb419d17dfb40d8ca56c89a38 | 8,032 | py | Python | modules/text/language_model/bert-large-uncased/module.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 8,360 | 2019-01-18T10:46:45.000Z | 2022-03-31T14:50:02.000Z | modules/text/language_model/bert-large-uncased/module.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 1,158 | 2019-04-11T09:22:43.000Z | 2022-03-31T12:12:09.000Z | modules/text/language_model/bert-large-uncased/module.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 1,677 | 2019-04-09T15:07:40.000Z | 2022-03-31T06:41:10.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 45.897143 | 129 | 0.645418 |
f7aac9565418539d83fdb74f6c15c0c514bc99fa | 1,220 | py | Python | mantle/common/piso.py | splhack/mantle | 42fe81df22f4556f891f77b9c9acfd7e8bbe648b | [
"MIT"
] | null | null | null | mantle/common/piso.py | splhack/mantle | 42fe81df22f4556f891f77b9c9acfd7e8bbe648b | [
"MIT"
] | null | null | null | mantle/common/piso.py | splhack/mantle | 42fe81df22f4556f891f77b9c9acfd7e8bbe648b | [
"MIT"
] | null | null | null | from magma import *
from mantle import Mux
from .register import _RegisterName, Register, FFs
__all__ = ['DefinePISO', 'PISO']
@cache_definition
def DefinePISO(n, init=0, has_ce=False, has_reset=False):
"""
Generate Parallel-In, Serial-Out shift register.
SI : In(Bit), PI : Out(Bits(n)), LOAD : In(Bit), ... | 30.5 | 71 | 0.567213 |
8cd48e918b84bebbd49456a073ada51e088fb499 | 38,825 | py | Python | tests/generic_views/test_dates.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/generic_views/test_dates.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/generic_views/test_dates.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import datetime
from unittest import mock
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings, skipUnlessDBFeature
from django.test.utils import requires_tz_support
from django.utils import timezone
from .models import Artist, Author, Book, BookSigning, ... | 50.161499 | 113 | 0.655763 |
6a6e01a7b520768a868ef6a10d7527198e6ff0a2 | 4,131 | py | Python | Savethemblobs/PythonistaKit.framework/pylib/distutils/config.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 19 | 2017-05-17T16:48:02.000Z | 2020-08-18T18:21:45.000Z | Savethemblobs/PythonistaKit.framework/pylib/distutils/config.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 2 | 2017-05-17T06:41:47.000Z | 2017-05-17T17:27:13.000Z | Savethemblobs/PythonistaKit.framework/pylib/distutils/config.py | iApeiron/Savethemblobs_app | 38184facf78b55ba89a727be7b1fc08d6085f20c | [
"MIT"
] | 4 | 2017-05-17T03:56:25.000Z | 2018-11-09T00:00:20.000Z |
"""distutils.pypirc
Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from ConfigParser import ConfigParser
from distutils.cmd import Command
DEFAULT_PYPIRC = """\
[distutils]
index-servers =
pypi
[pypi]
username:%s
passwo... | 35.008475 | 72 | 0.507625 |
7e07931cc54e7c44e58b221e669a611fc54271f7 | 1,658 | py | Python | analysis_of_pKa_predictions/20190705_typeIII_check_matching_algorithms/hungarian_function_analysis3_6fc511f.py | choderalab/sampl6-logD-compound-selection | b14d82e8d3dd1091baeeff62b3fe6f093c03e321 | [
"MIT"
] | 3 | 2020-07-13T23:48:50.000Z | 2022-02-28T23:29:39.000Z | analysis_of_pKa_predictions/20190705_typeIII_check_matching_algorithms/hungarian_function_analysis3_6fc511f.py | choderalab/sampl6-logD-compound-selection | b14d82e8d3dd1091baeeff62b3fe6f093c03e321 | [
"MIT"
] | 1 | 2018-02-16T16:24:59.000Z | 2018-02-16T17:09:09.000Z | analysis_of_pKa_predictions/20190705_typeIII_check_matching_algorithms/hungarian_function_analysis3_6fc511f.py | choderalab/sampl6-logD-compound-selection | b14d82e8d3dd1091baeeff62b3fe6f093c03e321 | [
"MIT"
] | 4 | 2019-06-28T14:11:22.000Z | 2022-01-06T13:22:16.000Z | def hungarian_matching(pred_pKas, exp_pKa_means, exp_pKa_SEMs, exp_pKa_IDs):
"""Perform Hungarian algorithm matching of pKa values.
Original source by Kiril Lanevskij (ACD Labs).
Args:
predicted : array of predicted pKas
experimental: array of experimental pKas
"""
matched = pd.Data... | 42.512821 | 143 | 0.639324 |
3e52372c0a9405d63bf3587c199943d65fe0d23e | 542 | py | Python | sequenciaFibonacci.py | delimagoncalves/pythonlearning | 255ff7ee98d2cf249525e9baba8d0a6d8959e1f6 | [
"MIT"
] | null | null | null | sequenciaFibonacci.py | delimagoncalves/pythonlearning | 255ff7ee98d2cf249525e9baba8d0a6d8959e1f6 | [
"MIT"
] | null | null | null | sequenciaFibonacci.py | delimagoncalves/pythonlearning | 255ff7ee98d2cf249525e9baba8d0a6d8959e1f6 | [
"MIT"
] | null | null | null | '''
Sequência de Fibonacci utilizando Python3
'''
n = 0
while n <2:
try:
#Defiindo um valor de entrada para determinar os termos da sequência
n = int(input("Digite um numero > 1: "))
if n < 2:
print("Digite um número >=2: ")
except:
print("O dado digitado deve ser u... | 20.846154 | 76 | 0.494465 |
61e488d6622efc71b873bf695bf42bce9960293f | 266 | py | Python | Python/Prime numbers.py | PiranavanShanmugavadivelu/Hello-world | a4198b1714b0dcf27fcc0029eb838a47e3e234f5 | [
"MIT"
] | 1 | 2018-12-25T14:02:08.000Z | 2018-12-25T14:02:08.000Z | Python/Prime numbers.py | PiranavanShanmugavadivelu/Hello-world | a4198b1714b0dcf27fcc0029eb838a47e3e234f5 | [
"MIT"
] | null | null | null | Python/Prime numbers.py | PiranavanShanmugavadivelu/Hello-world | a4198b1714b0dcf27fcc0029eb838a47e3e234f5 | [
"MIT"
] | null | null | null | num=1
numMostrato=1
while(True):
if num > 1:
for i in range(2,num):
if (num % i) == 0:
break
else:
if(num != numMostrato):
print(num)
numMostrato=num
num=num+1
| 20.461538 | 38 | 0.402256 |
ed3709a7ffc2fa409bb12d6f4561ef265e45f2fe | 4,935 | py | Python | hug/development_runner.py | Asteur/hug_api_maker | 7da43cee1d1298a25417b12770b382464a8fe389 | [
"MIT"
] | null | null | null | hug/development_runner.py | Asteur/hug_api_maker | 7da43cee1d1298a25417b12770b382464a8fe389 | [
"MIT"
] | null | null | null | hug/development_runner.py | Asteur/hug_api_maker | 7da43cee1d1298a25417b12770b382464a8fe389 | [
"MIT"
] | null | null | null | """hug/development_runner.py
Contains logic to enable execution of hug APIS locally from the command line for development use
Copyright (C) 2016 Timothy Edmund Crosley
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), t... | 42.913043 | 115 | 0.609524 |
43d72ba565caa4cc60a1d7ea2d1884bb4136019e | 33,652 | py | Python | src/mightypy/ml/_linear.py | NishantBaheti/mightypy | 8219ae5cfc462e02f04bec6bdd7e3751b57d2a25 | [
"MIT"
] | 1 | 2022-02-03T19:32:45.000Z | 2022-02-03T19:32:45.000Z | src/mightypy/ml/_linear.py | NishantBaheti/mightypy | 8219ae5cfc462e02f04bec6bdd7e3751b57d2a25 | [
"MIT"
] | null | null | null | src/mightypy/ml/_linear.py | NishantBaheti/mightypy | 8219ae5cfc462e02f04bec6bdd7e3751b57d2a25 | [
"MIT"
] | null | null | null | """
Linear Models of Machine Learning
"""
from typing import Union, Tuple
import numpy as np
from mightypy import __version__
from mightypy.ml._error_fxs import calculate_mse_cost, calculate_entropy_cost
from mightypy.ml._utils import sigmoid
__author__ = "Nishant Baheti"
__copyright__ = "Nishant Baheti"
__license__ ... | 32.895406 | 133 | 0.526923 |
f49fdd046e1bd739fe603b3b4ebdc5e664d00414 | 2,892 | py | Python | tests/test.py | dvntaka/hawaii_coronavirus_bot | 091d8f4a1f9a75250973234f0ad82807bbf2e2ae | [
"MIT"
] | null | null | null | tests/test.py | dvntaka/hawaii_coronavirus_bot | 091d8f4a1f9a75250973234f0ad82807bbf2e2ae | [
"MIT"
] | 2 | 2021-05-26T22:24:23.000Z | 2021-05-26T22:26:38.000Z | tests/test.py | dvntaka/hawaii_coronavirus_bot | 091d8f4a1f9a75250973234f0ad82807bbf2e2ae | [
"MIT"
] | null | null | null | import requests
from datetime import date
#def post():
url = 'https://health.hawaii.gov/coronavirusdisease2019/'
r = requests.get(url)
my_text = r.text
full_array = bytearray(my_text, 'utf-8')
pre_total_cases = full_array.partition(b'Total cases:</span> <span class="value">')
after_total_cases = pre_total_cases[2].p... | 33.241379 | 98 | 0.701591 |
bd89e73ff6d9af3c149da606fa5345543e20df14 | 426 | py | Python | examples/boilerplates/samples/google_objects.py | AndriiMykytiuk/SeleniumBase | d675f19ca8c8550607a0da1305704772eec34fa8 | [
"MIT"
] | 1 | 2021-02-21T18:01:54.000Z | 2021-02-21T18:01:54.000Z | examples/boilerplates/samples/google_objects.py | AndriiMykytiuk/SeleniumBase | d675f19ca8c8550607a0da1305704772eec34fa8 | [
"MIT"
] | null | null | null | examples/boilerplates/samples/google_objects.py | AndriiMykytiuk/SeleniumBase | d675f19ca8c8550607a0da1305704772eec34fa8 | [
"MIT"
] | null | null | null | """ google.com page objects """
class HomePage(object):
dialog_box = '[role="dialog"] div'
search_box = 'input[title="Search"]'
list_box = '[role="listbox"]'
search_button = 'input[value="Google Search"]'
feeling_lucky_button = '''input[value="I'm Feeling Lucky"]'''
class ResultsPage(object):
... | 26.625 | 65 | 0.65493 |
2606a7c10fd0f037b25e86d133e622e960e6b72a | 1,792 | py | Python | enaml/tests/old/components/wx/wx_test_assistant.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 11 | 2015-01-04T14:29:23.000Z | 2019-12-25T05:38:37.000Z | enaml/tests/old/components/wx/wx_test_assistant.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 36 | 2015-02-20T00:56:53.000Z | 2020-12-04T10:02:14.000Z | enaml/tests/old/components/wx/wx_test_assistant.py | mmckerns/enaml | ebf417b4dce9132bffa038a588ad90436a59d37e | [
"BSD-3-Clause"
] | 3 | 2015-11-19T15:11:37.000Z | 2019-03-11T23:45:02.000Z | #------------------------------------------------------------------------------
# Copyright (c) 2011, Enthought, Inc.
# All rights reserved.
#------------------------------------------------------------------------------
import sys
from unittest import skipUnless
import wx
from enaml import wx_toolkit
skip_nonwi... | 29.866667 | 79 | 0.600446 |
94826179d2c5f4f841e5ab592df57174e8465e3c | 16,861 | py | Python | coocur/coword/mine_wiki.py | kunlubrain/legacy | 003c7b644216a0ef704a231d7f364b1bacd97329 | [
"Apache-2.0"
] | null | null | null | coocur/coword/mine_wiki.py | kunlubrain/legacy | 003c7b644216a0ef704a231d7f364b1bacd97329 | [
"Apache-2.0"
] | null | null | null | coocur/coword/mine_wiki.py | kunlubrain/legacy | 003c7b644216a0ef704a231d7f364b1bacd97329 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import re
import kutils
import codecs
import os
import time
import lang
import lang_cleaner as cleaner
import langHardStop
HardStop = langHardStop.HardStop
Records = {}
DFDir = 'stats'
def pause(): raw_input('pause...')
def _saveDF2File(df, fname, sort=False):
pairs = sorted(df.items(),... | 32.996086 | 182 | 0.560702 |
def9f1aa3353e33f7079e77ea4c25c73bd2d4b9e | 4,004 | py | Python | sp_api/api/inventories/inventories.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 213 | 2020-12-20T09:43:47.000Z | 2022-03-30T10:00:41.000Z | sp_api/api/inventories/inventories.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 173 | 2021-01-02T10:24:27.000Z | 2022-03-31T08:27:48.000Z | sp_api/api/inventories/inventories.py | Camille-cmd/python-amazon-sp-api | 00a169a0b16700e1498550742f384de74fca4aa3 | [
"MIT"
] | 109 | 2021-01-06T03:16:47.000Z | 2022-03-24T11:41:29.000Z | import urllib
from sp_api.base import Client, Marketplaces, sp_endpoint, ApiResponse
from sp_api.base.InventoryEnums import InventoryGranularity
class Inventories(Client):
"""
:link: https://github.com/amzn/selling-partner-api-docs/blob/main/references/fba-inventory-api/fbaInventory.md#getinventorysummaries
... | 56.394366 | 412 | 0.673077 |
a44808eafc5f15b42ee9ed6b7ff5a17923598c81 | 8,672 | py | Python | dashboard/modules/job/common.py | siddgoel/ray | 7f3031f451de410b71a5fcb18e04452bfa7351d6 | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | dashboard/modules/job/common.py | siddgoel/ray | 7f3031f451de410b71a5fcb18e04452bfa7351d6 | [
"Apache-2.0"
] | 51 | 2018-05-17T05:55:28.000Z | 2020-03-18T06:49:49.000Z | dashboard/modules/job/common.py | AyushExel/ray | 46465abd6d866c3903b17c601e84e81b46c67190 | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | from dataclasses import dataclass, replace
from enum import Enum
import time
from typing import Any, Dict, Optional, Tuple
import pickle
from pathlib import Path
from ray import ray_constants
from ray.experimental.internal_kv import (
_internal_kv_initialized,
_internal_kv_get,
_internal_kv_list,
_inte... | 34.549801 | 88 | 0.633764 |
1bf4c627ef9947ee7099dcfd176af12d139a4b17 | 1,097 | py | Python | LeetCode/Session3/KthSmallestInSortedMatrixII.py | shobhitmishra/CodingProblems | 0fc8c5037eef95b3ec9826b3a6e48885fc86659e | [
"MIT"
] | null | null | null | LeetCode/Session3/KthSmallestInSortedMatrixII.py | shobhitmishra/CodingProblems | 0fc8c5037eef95b3ec9826b3a6e48885fc86659e | [
"MIT"
] | null | null | null | LeetCode/Session3/KthSmallestInSortedMatrixII.py | shobhitmishra/CodingProblems | 0fc8c5037eef95b3ec9826b3a6e48885fc86659e | [
"MIT"
] | null | null | null | from typing import List
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
size = len(matrix)
low, high = matrix[0][0], matrix[size-1][size-1]
while low < high:
mid = (low + high)/2
count, smaller, larger = self.countLessThanOrEqual(matrix,... | 31.342857 | 75 | 0.484959 |
bf0a4740b8772ee873e6ebd692ce01964e7dea7a | 14,220 | py | Python | nova/tests/baremetal/test_driver.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | 2 | 2015-11-05T04:52:34.000Z | 2016-03-07T03:00:06.000Z | nova/tests/baremetal/test_driver.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | null | null | null | nova/tests/baremetal/test_driver.py | NetApp/nova | ca490d48a762a423449c654d5a7caeadecf2f6ca | [
"Apache-2.0"
] | 1 | 2020-07-24T07:32:11.000Z | 2020-07-24T07:32:11.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright (c) 2011 University of Southern California / ISI
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | 39.72067 | 79 | 0.61097 |
a50cf7f4de33d733eed09a9eb97f1cbfd31d6bcf | 46,808 | py | Python | provisioning/roles/foldatlas/files/foldatlas/importers.py | threadmapper/foldatlas | 6532e3b781cfbcd80cc92c076c9548564a574fe5 | [
"MIT"
] | 2 | 2018-06-11T07:30:42.000Z | 2019-07-29T17:52:16.000Z | provisioning/roles/foldatlas/files/foldatlas/importers.py | threadmapper/foldatlas | 6532e3b781cfbcd80cc92c076c9548564a574fe5 | [
"MIT"
] | null | null | null | provisioning/roles/foldatlas/files/foldatlas/importers.py | threadmapper/foldatlas | 6532e3b781cfbcd80cc92c076c9548564a574fe5 | [
"MIT"
] | 1 | 2021-07-17T08:13:09.000Z | 2021-07-17T08:13:09.000Z | import math
import os
import re
from sqlalchemy import and_
from sklearn import decomposition
from Bio import SeqIO
import settings
from models import (Feature,
Gene,
GeneLocation,
NucleotideMeasurementRun,
NucleotideMeasurementSet,
... | 36.625978 | 121 | 0.549479 |
69211f72e26b3ef78f11f0d8206c853fea791c45 | 9,094 | py | Python | tests/unit_tests/test_geometry.py | MauriDeb/Desarrollo_OpenMC | 871f81af1d0bec58c0cc9873c192b321ab84414f | [
"MIT"
] | null | null | null | tests/unit_tests/test_geometry.py | MauriDeb/Desarrollo_OpenMC | 871f81af1d0bec58c0cc9873c192b321ab84414f | [
"MIT"
] | null | null | null | tests/unit_tests/test_geometry.py | MauriDeb/Desarrollo_OpenMC | 871f81af1d0bec58c0cc9873c192b321ab84414f | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
import numpy as np
import openmc
import pytest
def test_volume(run_in_tmpdir, uo2):
"""Test adding volume information from a volume calculation."""
# Create model with nested spheres
model = openmc.model.Model()
model.materials.append(uo2)
inner = openmc.Sphere(... | 32.134276 | 74 | 0.634154 |
5b35970302a4d064e9c20a51714294f1b699fecc | 2,913 | py | Python | safe_transaction_service/tokens/clients/coingecko_client.py | enyalabs/safe-transaction-service | 9532254a78b2db53a22d086da78d2930be8ea589 | [
"MIT"
] | null | null | null | safe_transaction_service/tokens/clients/coingecko_client.py | enyalabs/safe-transaction-service | 9532254a78b2db53a22d086da78d2930be8ea589 | [
"MIT"
] | 1 | 2022-02-28T21:28:09.000Z | 2022-02-28T21:28:09.000Z | safe_transaction_service/tokens/clients/coingecko_client.py | tharsis/safe-transaction-service | b699e697caaf5ecccdc5618553cecdd0e21070b7 | [
"MIT"
] | null | null | null | import logging
from typing import Optional
from urllib.parse import urljoin
import requests
from eth_typing import ChecksumAddress
from gnosis.eth import EthereumNetwork
from safe_transaction_service.tokens.clients.exceptions import CannotGetPrice
logger = logging.getLogger(__name__)
class CoingeckoClient:
ba... | 32.730337 | 116 | 0.623412 |
cfc0913dca4f156cdfa0c6ff754fd7ce2112ee8a | 14,644 | py | Python | vendor/packages/GitPython/lib/git/repo.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 16 | 2015-02-06T14:35:57.000Z | 2021-07-10T11:14:00.000Z | vendor/packages/GitPython/lib/git/repo.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 310 | 2015-01-07T14:39:35.000Z | 2016-05-02T17:41:30.000Z | vendor/packages/GitPython/lib/git/repo.py | DESHRAJ/fjord | 8899b6286b23347c9b024334e61c33fe133e836d | [
"BSD-3-Clause"
] | 22 | 2015-01-15T13:46:03.000Z | 2020-07-24T10:08:51.000Z | # repo.py
# Copyright (C) 2008-2010 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
import os
import re
import gzip
import StringIO
from errors import InvalidGitRepositoryError, NoSuchPath... | 28.27027 | 147 | 0.561595 |
91d3465ab855200a2329dea7fa70e397345f68cc | 1,466 | py | Python | davinci_crawling/models.py | brunohenriquy/django-davinci-crawling | 65152c6dec4aaf9de1d49ede7d35bbdc9139af66 | [
"MIT"
] | 1 | 2019-10-28T14:02:07.000Z | 2019-10-28T14:02:07.000Z | davinci_crawling/models.py | brunohenriquy/django-davinci-crawling | 65152c6dec4aaf9de1d49ede7d35bbdc9139af66 | [
"MIT"
] | null | null | null | davinci_crawling/models.py | brunohenriquy/django-davinci-crawling | 65152c6dec4aaf9de1d49ede7d35bbdc9139af66 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2019 BuildGroup Data Services Inc.
import json
from datetime import datetime
from django.db.models.signals import pre_save
from django.dispatch import receiver
try:
from dse.cqlengine import columns, ValidationError
except ImportError:
from cassandra.cqlengine import c... | 28.192308 | 69 | 0.736698 |
37245ab4da1aa3858da595582c702ebe5852f3fb | 6,207 | py | Python | backend/eastmoneyspider/settings.py | jingmian/EastMoneySpider | c87c143b1310c1784b0f44a4a09697c3500cc5ab | [
"Apache-2.0"
] | 1 | 2021-06-30T14:58:54.000Z | 2021-06-30T14:58:54.000Z | backend/eastmoneyspider/settings.py | jingmian/EastMoneySpider | c87c143b1310c1784b0f44a4a09697c3500cc5ab | [
"Apache-2.0"
] | null | null | null | backend/eastmoneyspider/settings.py | jingmian/EastMoneySpider | c87c143b1310c1784b0f44a4a09697c3500cc5ab | [
"Apache-2.0"
] | null | null | null | """
Django settings for eastmoneyspider project.
Generated by 'django-admin startproject' using Django 3.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.1/ref/settings/
"""
impor... | 26.75431 | 91 | 0.643467 |
a42103d53106d171106e0e3f31b21bff39d9263b | 6,435 | py | Python | apphub/image_classification/pyramidnet/pyramidnet_tf.py | purujitb/fastestimator | 32369742e58a091f83021694b91db7bb375bb088 | [
"Apache-2.0"
] | null | null | null | apphub/image_classification/pyramidnet/pyramidnet_tf.py | purujitb/fastestimator | 32369742e58a091f83021694b91db7bb375bb088 | [
"Apache-2.0"
] | null | null | null | apphub/image_classification/pyramidnet/pyramidnet_tf.py | purujitb/fastestimator | 32369742e58a091f83021694b91db7bb375bb088 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The FastEstimator 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 appl... | 42.058824 | 108 | 0.660295 |
bcedea0505a9d2565fae8ae7fed7bec0fbbd65ff | 444 | py | Python | alize/library/picture/service.py | TE-ToshiakiTanaka/alize | f211e23b7082c45969042523bf0c0250b09489a4 | [
"MIT"
] | null | null | null | alize/library/picture/service.py | TE-ToshiakiTanaka/alize | f211e23b7082c45969042523bf0c0250b09489a4 | [
"MIT"
] | 5 | 2021-03-18T20:19:15.000Z | 2022-03-11T23:15:00.000Z | alize/library/picture/service.py | TE-ToshiakiTanaka/alize | f211e23b7082c45969042523bf0c0250b09489a4 | [
"MIT"
] | null | null | null | __version__ = (0, 1, 0)
import os
import sys
LIB_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if not LIB_PATH in sys.path:
sys.path.insert(0, LIB_PATH)
from picture import module
from picture.module import Picture
class Factory(object):
def __init__(self):
pass
def version(... | 17.76 | 70 | 0.684685 |
f3341d668ad4b8c474f982fda15f60cd0578d66e | 4,939 | py | Python | shared/model_setup.py | ziwei7437/bert_on_stilts | 353fc45a2caeb9a79f8665997b8ec1de2bd71f45 | [
"Apache-2.0"
] | 105 | 2019-03-07T01:01:40.000Z | 2022-03-02T13:14:38.000Z | shared/model_setup.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 8 | 2019-03-07T17:59:46.000Z | 2020-08-07T20:58:20.000Z | shared/model_setup.py | ColeFang/CERT-1 | 58a523a14bb7fd219baedabac266e78cee1143ba | [
"Apache-2.0"
] | 28 | 2019-03-07T03:52:11.000Z | 2021-07-19T02:06:45.000Z | import os
import torch
from pytorch_pretrained_bert.optimization import BertAdam
from pytorch_pretrained_bert.tokenization import (
BertTokenizer, PRETRAINED_VOCAB_POSITIONAL_EMBEDDINGS_SIZE_MAP,
)
TF_PYTORCH_BERT_NAME_MAP = {
"bert-base-uncased": "uncased_L-12_H-768_A-12",
"bert-large-uncased": "uncase... | 35.532374 | 113 | 0.656206 |
e3c237bfa2f77e61385bdd2016f4c9419765555e | 7,506 | py | Python | references/edgeailite/scripts/test_classification_main.py | TexasInstruments/vision | abaf29de0798e8e8d3f996dc272cd3c515562695 | [
"BSD-3-Clause"
] | 21 | 2021-10-08T02:47:56.000Z | 2022-03-29T14:17:04.000Z | references/edgeailite/scripts/test_classification_main.py | TexasInstruments/vision | abaf29de0798e8e8d3f996dc272cd3c515562695 | [
"BSD-3-Clause"
] | 9 | 2021-11-15T06:43:54.000Z | 2022-03-16T04:47:52.000Z | references/edgeailite/scripts/test_classification_main.py | TexasInstruments/vision | abaf29de0798e8e8d3f996dc272cd3c515562695 | [
"BSD-3-Clause"
] | 9 | 2021-11-11T11:17:16.000Z | 2022-03-08T04:26:10.000Z | #!/usr/bin/env python
#################################################################################
# Copyright (c) 2018-2021, Texas Instruments Incorporated - http://www.ti.com
# All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that... | 49.058824 | 173 | 0.711164 |
2960a12b133d26a033530b4e6edfb1ad58e0a40b | 23,804 | py | Python | pandas/tests/dtypes/test_common.py | mrocklin/pandas | 01882ba5b4c21b0caf2e6b9279fb01967aa5d650 | [
"BSD-3-Clause"
] | 1 | 2018-03-22T16:50:07.000Z | 2018-03-22T16:50:07.000Z | pandas/tests/dtypes/test_common.py | Kaya176/pandas | 4fb963b6a3261940de5891323a8d217087a2a9a1 | [
"BSD-3-Clause"
] | 1 | 2018-03-22T16:06:03.000Z | 2018-03-22T16:06:03.000Z | pandas/tests/dtypes/test_common.py | Kaya176/pandas | 4fb963b6a3261940de5891323a8d217087a2a9a1 | [
"BSD-3-Clause"
] | 1 | 2019-12-11T07:32:28.000Z | 2019-12-11T07:32:28.000Z | # -*- coding: utf-8 -*-
import pytest
import numpy as np
import pandas as pd
from pandas.core.dtypes.dtypes import (DatetimeTZDtype, PeriodDtype,
CategoricalDtype, IntervalDtype)
import pandas.core.dtypes.common as com
import pandas.util.testing as tm
import pandas.util._test_d... | 37.724247 | 79 | 0.682448 |
644b7a2da2d3cfc41ad7871ce8198675934e0a11 | 1,505 | py | Python | src/gen_m3u.py | rlindner81/gen_m3u | d7fe5994af29506244c3875b696e4c8865271125 | [
"MIT"
] | null | null | null | src/gen_m3u.py | rlindner81/gen_m3u | d7fe5994af29506244c3875b696e4c8865271125 | [
"MIT"
] | null | null | null | src/gen_m3u.py | rlindner81/gen_m3u | d7fe5994af29506244c3875b696e4c8865271125 | [
"MIT"
] | null | null | null | #!/bin/python
import argparse
import os
import io
import sys
import fnmatch
from os.path import split, isdir, abspath
def gen_m3u_for_dir(mp3_dir, playlist_name=None):
print("processing directory {}...".format(mp3_dir))
mp3_count = 0
mp3_paths = []
if not isdir(mp3_dir):
print("error: {} is... | 25.508475 | 94 | 0.639203 |
a5c2aae2f16df584e9bffda606aa38fbfb52dca4 | 3,473 | py | Python | src/mem/cache/tags/Tags.py | abadp/gem5-NoSQL | a8372f141ba21b234b2238918512bd6ff91fa971 | [
"BSD-3-Clause"
] | 3 | 2020-04-18T07:01:12.000Z | 2021-04-11T04:14:56.000Z | src/mem/cache/tags/Tags.py | abadp/gem5-NoSQL | a8372f141ba21b234b2238918512bd6ff91fa971 | [
"BSD-3-Clause"
] | null | null | null | src/mem/cache/tags/Tags.py | abadp/gem5-NoSQL | a8372f141ba21b234b2238918512bd6ff91fa971 | [
"BSD-3-Clause"
] | 3 | 2019-02-14T13:54:31.000Z | 2021-07-09T11:06:26.000Z | # Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | 41.843373 | 73 | 0.751512 |
608f6739de7cccd20f669a342b84f514f0377577 | 4,535 | py | Python | pacman.py | Tremeschin/ardour-crosscompile-arch | 3aec43a14d899f9dafb98a4435d0a93db25ade6c | [
"MIT"
] | 6 | 2020-12-10T20:46:25.000Z | 2022-01-06T19:49:29.000Z | pacman.py | Tremeschin/ArdourCrosscompile | 3aec43a14d899f9dafb98a4435d0a93db25ade6c | [
"MIT"
] | 6 | 2020-11-07T05:47:12.000Z | 2020-12-26T22:35:07.000Z | pacman.py | Tremeschin/ArdourCrosscompile | 3aec43a14d899f9dafb98a4435d0a93db25ade6c | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 Tremeschin
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, di... | 38.109244 | 125 | 0.649394 |
1a69ab3869b0b1a026ed6862ea990cae89890f91 | 256 | py | Python | azdocli/strategies/projects_list_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | 1 | 2020-10-08T13:02:38.000Z | 2020-10-08T13:02:38.000Z | azdocli/strategies/projects_list_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | null | null | null | azdocli/strategies/projects_list_strategy.py | migzpogi/azdo-cli | a96eb516568e7ff814accf41b5511a17b5da4197 | [
"MIT"
] | null | null | null | from azdocli.strategies.strategy_context import Strategy
from azdocli.lib.core import CoreAPI
class ProjectsListStrategy(Strategy):
def run_strategy(self):
coreapi = CoreAPI(self.org_name, self.org_pat)
return coreapi.list_projects()
| 28.444444 | 56 | 0.769531 |
a18a78b77083e5e487063975523ee7c452f50f9d | 3,248 | py | Python | bump/settings.py | VasyaSmolyar/bump-or-sage | e2faade885a3070178d3561b266cbe52526ba275 | [
"MIT"
] | null | null | null | bump/settings.py | VasyaSmolyar/bump-or-sage | e2faade885a3070178d3561b266cbe52526ba275 | [
"MIT"
] | null | null | null | bump/settings.py | VasyaSmolyar/bump-or-sage | e2faade885a3070178d3561b266cbe52526ba275 | [
"MIT"
] | 1 | 2019-11-04T05:32:43.000Z | 2019-11-04T05:32:43.000Z | """
Django settings for bump project.
Generated by 'django-admin startproject' using Django 2.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
import os
# Bu... | 25.375 | 91 | 0.69766 |
38ec2e6c3ffe89937618042c04dc8912a02cdff6 | 17,155 | py | Python | polylidar_plane_benchmark/utility/helper.py | JeremyBYU/polylidar-plane-benchmark | 25e2a0d2b171dc71f22c10164b035ffd3ca493c5 | [
"RSA-MD"
] | 1 | 2021-06-07T09:58:35.000Z | 2021-06-07T09:58:35.000Z | polylidar_plane_benchmark/utility/helper.py | JeremyBYU/polylidar-plane-benchmark | 25e2a0d2b171dc71f22c10164b035ffd3ca493c5 | [
"RSA-MD"
] | null | null | null | polylidar_plane_benchmark/utility/helper.py | JeremyBYU/polylidar-plane-benchmark | 25e2a0d2b171dc71f22c10164b035ffd3ca493c5 | [
"RSA-MD"
] | null | null | null | import random
import time
import warnings
import math
import gc
import pathlib
warnings.filterwarnings("ignore", message="Optimal rotation is not uniquely or poorly defined ")
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import pypcd.pypcd as pypcd
from scipy.spatial.transform ... | 43.320707 | 157 | 0.696124 |
4b6c9a957feb0458036f58aefdd79073d9493e76 | 2,573 | py | Python | ait/core/bin/ait_table_decode.py | bruceplai/AIT-Core | 3289f48b17842c48b47cd779e3d983404f951a64 | [
"MIT"
] | null | null | null | ait/core/bin/ait_table_decode.py | bruceplai/AIT-Core | 3289f48b17842c48b47cd779e3d983404f951a64 | [
"MIT"
] | null | null | null | ait/core/bin/ait_table_decode.py | bruceplai/AIT-Core | 3289f48b17842c48b47cd779e3d983404f951a64 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Advanced Multi-Mission Operations System (AMMOS) Instrument Toolkit (AIT)
# Bespoke Link to Instruments and Small Satellites (BLISS)
#
# Copyright 2016, by the California Institute of Technology. ALL RIGHTS
# RESERVED. United States Government Sponsorship acknowledged. Any
# commercial use must... | 32.987179 | 107 | 0.710455 |
c7ef0f2a10322ebfc7ca8d00ef85a335a3eb6ace | 3,212 | py | Python | infra/libs-400rc2-20190512/examples/ra8875_bmptest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | 1 | 2020-04-13T16:10:53.000Z | 2020-04-13T16:10:53.000Z | infra/libs-400rc2-20190512/examples/ra8875_bmptest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | infra/libs-400rc2-20190512/examples/ra8875_bmptest.py | jadudm/feather-isa | b7419e6698c3f64be4d8122656eb8124631ca859 | [
"MIT"
] | null | null | null | # Quick bitmap test of RA8875 with Feather M4
import busio
import digitalio
import board
import adafruit_ra8875.ra8875 as ra8875
from adafruit_ra8875.ra8875 import color565
try:
import struct
except ImportError:
import ustruct as struct
WHITE = color565(255, 255, 255)
# Configuration for CS and... | 35.688889 | 87 | 0.568804 |
e8e2e8258a866dce6c52fa93cb998fc43f8368f1 | 27 | py | Python | g-hack.py | treasurelight/GalleryHack | 747667358d3023c504f2b34f229489b3ed7c142d | [
"Apache-2.0"
] | 1 | 2021-12-29T07:21:59.000Z | 2021-12-29T07:21:59.000Z | g-hack.py | treasurelight/Lighttech- | 747667358d3023c504f2b34f229489b3ed7c142d | [
"Apache-2.0"
] | null | null | null | g-hack.py | treasurelight/Lighttech- | 747667358d3023c504f2b34f229489b3ed7c142d | [
"Apache-2.0"
] | null | null | null |
print('test number one')
| 9 | 25 | 0.666667 |
eb8b8a046558f3e3bfc8d45df67481a9c48e8df6 | 933 | py | Python | Codechef/Long Challenge MARC 2021/Paparazzi Gennady - PAPARAZI.py | Harry-kp/Cp | 94e687a3a5256913467f50d8f757b12640529513 | [
"MIT"
] | 2 | 2020-11-19T19:21:24.000Z | 2021-04-22T10:53:16.000Z | Codechef/Long Challenge MARC 2021/Paparazzi Gennady - PAPARAZI.py | Harry-kp/Cp | 94e687a3a5256913467f50d8f757b12640529513 | [
"MIT"
] | null | null | null | Codechef/Long Challenge MARC 2021/Paparazzi Gennady - PAPARAZI.py | Harry-kp/Cp | 94e687a3a5256913467f50d8f757b12640529513 | [
"MIT"
] | 1 | 2021-12-02T06:03:17.000Z | 2021-12-02T06:03:17.000Z | from sys import stdin,stdout
import math
# from collections import deque,Counter,OrderedDict
# from itertools import permutations,combinations,combinations_with_replacement
# from operator import itemgetter
# import heapq
# from functools import reduce
import math
def ii():return int(stdin.readline())
def mi():return m... | 25.216216 | 79 | 0.594855 |
18999b6182f1570c2b30ca638cbdbed3b8a6a43e | 2,128 | py | Python | migrations/versions/ad28a44f93c4_initial_migration.py | RisperAkinyi/BlogPost | f8ee4c887fceae8e70410b66a12bc5680cf26044 | [
"MIT"
] | null | null | null | migrations/versions/ad28a44f93c4_initial_migration.py | RisperAkinyi/BlogPost | f8ee4c887fceae8e70410b66a12bc5680cf26044 | [
"MIT"
] | 1 | 2020-10-27T21:52:06.000Z | 2020-10-27T21:52:06.000Z | migrations/versions/ad28a44f93c4_initial_migration.py | RisperAkinyi/BlogPost | f8ee4c887fceae8e70410b66a12bc5680cf26044 | [
"MIT"
] | null | null | null | """Initial Migration
Revision ID: ad28a44f93c4
Revises:
Create Date: 2019-08-09 11:05:50.912878
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ad28a44f93c4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto ... | 34.885246 | 83 | 0.666823 |
92c4165b2756966d9dd83c2b7c47f3cbdcb1a2dc | 8,244 | py | Python | stochastic_depth.py | nutszebra/stochastic_depth | 8c63cbbb9964f976c52eb0d55e94cbdda22e733e | [
"MIT"
] | 1 | 2017-01-06T13:16:17.000Z | 2017-01-06T13:16:17.000Z | stochastic_depth.py | nutszebra/stochastic_depth | 8c63cbbb9964f976c52eb0d55e94cbdda22e733e | [
"MIT"
] | null | null | null | stochastic_depth.py | nutszebra/stochastic_depth | 8c63cbbb9964f976c52eb0d55e94cbdda22e733e | [
"MIT"
] | null | null | null | import six
import chainer
import numpy as np
import chainer.links as L
import chainer.functions as F
import nutszebra_chainer
import functools
from collections import defaultdict
class Conv_BN_ReLU(nutszebra_chainer.Model):
def __init__(self, in_channel, out_channel, filter_size=(3, 3), stride=(1, 1), pad=(1, 1)... | 36.96861 | 119 | 0.604197 |
894dc183fdab33b7257e470be1dfae4c25ae6ecc | 4,042 | py | Python | tests/test_upload_n_download_excel.py | softlog/Flask-Excel | cae311b069998f5c238c0c0467348bb95e4745d4 | [
"BSD-3-Clause"
] | 171 | 2017-09-12T09:17:05.000Z | 2022-03-15T07:42:00.000Z | tests/test_upload_n_download_excel.py | softlog/Flask-Excel | cae311b069998f5c238c0c0467348bb95e4745d4 | [
"BSD-3-Clause"
] | 34 | 2017-10-03T22:41:51.000Z | 2021-12-15T13:52:16.000Z | tests/test_upload_n_download_excel.py | softlog/Flask-Excel | cae311b069998f5c238c0c0467348bb95e4745d4 | [
"BSD-3-Clause"
] | 63 | 2017-09-12T17:56:56.000Z | 2022-03-15T07:03:48.000Z | # -*- coding: utf-8 -*-
try:
from urllib import quote
except ImportError:
from urllib.parse import quote
import pyexcel as pe
from _compact import PY2, BytesIO
from nose.tools import eq_
from testapp import app
_XLSM_MIME = (
"application/" + "vnd.openxmlformats-officedocument.spreadsheetml.sheet"
)
FIL... | 35.147826 | 77 | 0.559377 |
89177fb67ce5580f8994429ea725fc08176c1c68 | 8,255 | py | Python | src/sagemaker/pytorch/model.py | melty-chocolate/sagemaker-python-sdk | 62771dd1d60c4361ad5215dc8e32bf6325071aad | [
"Apache-2.0"
] | 1 | 2019-11-18T14:18:12.000Z | 2019-11-18T14:18:12.000Z | src/sagemaker/pytorch/model.py | melty-chocolate/sagemaker-python-sdk | 62771dd1d60c4361ad5215dc8e32bf6325071aad | [
"Apache-2.0"
] | null | null | null | src/sagemaker/pytorch/model.py | melty-chocolate/sagemaker-python-sdk | 62771dd1d60c4361ad5215dc8e32bf6325071aad | [
"Apache-2.0"
] | 1 | 2021-12-04T01:16:12.000Z | 2021-12-04T01:16:12.000Z | # Copyright 2018-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 41.069652 | 98 | 0.662023 |
fe4dd1d33f019a54c1aaf86ce2eff51605d450e2 | 3,329 | py | Python | tests/test_bugzilla2gitlab.py | engelben/bugzilla2gitlab | e5da34276e9efbc0273271c2a2ba139b13961049 | [
"MIT"
] | null | null | null | tests/test_bugzilla2gitlab.py | engelben/bugzilla2gitlab | e5da34276e9efbc0273271c2a2ba139b13961049 | [
"MIT"
] | null | null | null | tests/test_bugzilla2gitlab.py | engelben/bugzilla2gitlab | e5da34276e9efbc0273271c2a2ba139b13961049 | [
"MIT"
] | null | null | null | import os.path
import random
from bugzilla2gitlab import Migrator
import bugzilla2gitlab.config
import bugzilla2gitlab.utils
TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), "test_data")
def test_config(monkeypatch):
def mockreturn(username, gitlab_url, headers):
return random.randint(0, 100)
... | 36.184783 | 91 | 0.739862 |
07e23cb291dfb9d99d82b8cdd408b04d5f0e5163 | 38,969 | py | Python | smac/facade/smac_ac_facade.py | mcx/SMAC3 | 863e4290054847ba2688521b8cc2e44c15a1493a | [
"BSD-3-Clause"
] | 1 | 2017-03-30T09:46:54.000Z | 2017-03-30T09:46:54.000Z | smac/facade/smac_ac_facade.py | mcx/SMAC3 | 863e4290054847ba2688521b8cc2e44c15a1493a | [
"BSD-3-Clause"
] | null | null | null | smac/facade/smac_ac_facade.py | mcx/SMAC3 | 863e4290054847ba2688521b8cc2e44c15a1493a | [
"BSD-3-Clause"
] | null | null | null | import inspect
import logging
from typing import List, Union, Optional, Type, Callable, cast, Dict, Any
import dask.distributed
import joblib
import numpy as np
# tae
from smac.tae.base import BaseRunner
from smac.tae.execute_ta_run_old import ExecuteTARunOld
from smac.tae.execute_func import ExecuteTAFuncDict
from s... | 45.738263 | 145 | 0.636095 |
76a0e988537034fb588f1a037014dd5b2f086fad | 16,107 | py | Python | pyNastran/converters/nastran/gui/utils.py | fmamitrotta/pyNastran | 6f9592cf3a2ccb8c509918acb735282d6eef75aa | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/nastran/gui/utils.py | fmamitrotta/pyNastran | 6f9592cf3a2ccb8c509918acb735282d6eef75aa | [
"BSD-3-Clause"
] | null | null | null | pyNastran/converters/nastran/gui/utils.py | fmamitrotta/pyNastran | 6f9592cf3a2ccb8c509918acb735282d6eef75aa | [
"BSD-3-Clause"
] | null | null | null | from __future__ import annotations
from typing import Tuple, List, Dict, Any, TYPE_CHECKING
import numpy as np
from cpylog import properties as log_properties
from pyNastran.bdf.cards.elements.shell import ShellElement
if TYPE_CHECKING: # pragma: no cover
from pyNastran.bdf.bdf import BDF
def get_shell_material_... | 36.942661 | 116 | 0.515614 |
822ee616e6d984598b3386f821b08cb373fc6b76 | 10,605 | py | Python | airflow/dags/common/sps_package.py | joffilyfe/opac-airflow | 0746e649f4cf1bbe45b277cc8ec67ab27e329ba2 | [
"BSD-2-Clause"
] | null | null | null | airflow/dags/common/sps_package.py | joffilyfe/opac-airflow | 0746e649f4cf1bbe45b277cc8ec67ab27e329ba2 | [
"BSD-2-Clause"
] | null | null | null | airflow/dags/common/sps_package.py | joffilyfe/opac-airflow | 0746e649f4cf1bbe45b277cc8ec67ab27e329ba2 | [
"BSD-2-Clause"
] | null | null | null | import os
import itertools
import logging
from lxml import etree
logger = logging.getLogger(__name__)
def parse_date(_date):
def format(value):
if value and value.isdigit():
return value.zfill(2)
return value or ""
if _date is not None:
return tuple(
[format... | 30.918367 | 86 | 0.531825 |
19a0ef06a409da6e7a86e75adb23a33fd1624751 | 12,107 | py | Python | oncall_summarizer.py | FormatMemory/oncall_email_summarizer | ae13a081ded71d3052f563142f8fb8c04f64d31e | [
"MIT"
] | null | null | null | oncall_summarizer.py | FormatMemory/oncall_email_summarizer | ae13a081ded71d3052f563142f8fb8c04f64d31e | [
"MIT"
] | null | null | null | oncall_summarizer.py | FormatMemory/oncall_email_summarizer | ae13a081ded71d3052f563142f8fb8c04f64d31e | [
"MIT"
] | null | null | null | import configParser as cr
from imapclient import IMAPClient
import datetime
import time
import email
from EmailErrorMsg import EmailErrorMsg
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
def getMsgContent(client, msgid):
content = list()
fetch_data = client.... | 48.818548 | 206 | 0.58016 |
108482c58eb68ec4e54dd4f737ee215b25ef6241 | 4,580 | py | Python | tests/client/async_client/test_http_client.py | abiodunjames/python-schema-registry-client | a8fb9e2aca0bf827b71b6ac31ac7cef76ff2059b | [
"MIT"
] | 95 | 2019-05-20T06:59:06.000Z | 2022-03-01T05:30:57.000Z | tests/client/async_client/test_http_client.py | abiodunjames/python-schema-registry-client | a8fb9e2aca0bf827b71b6ac31ac7cef76ff2059b | [
"MIT"
] | 94 | 2019-05-19T18:36:29.000Z | 2022-03-30T18:54:52.000Z | tests/client/async_client/test_http_client.py | abiodunjames/python-schema-registry-client | a8fb9e2aca0bf827b71b6ac31ac7cef76ff2059b | [
"MIT"
] | 41 | 2019-05-20T06:59:33.000Z | 2022-03-06T16:09:53.000Z | # import pickle
import os
from base64 import b64encode
import httpx
import pytest
from schema_registry.client import AsyncSchemaRegistryClient, utils
def test_invalid_cert():
with pytest.raises(FileNotFoundError):
AsyncSchemaRegistryClient(url="https://127.0.0.1:65534", cert_location="/path/to/cert")
... | 32.48227 | 111 | 0.692795 |
bd7d1bfa5a03e990fdde8c9ab5453f0a0bb15d48 | 508 | py | Python | audio.py | nielsneerhoff/katalog | 67856eac6822eb5e858863d9791752501c1f25af | [
"MIT"
] | null | null | null | audio.py | nielsneerhoff/katalog | 67856eac6822eb5e858863d9791752501c1f25af | [
"MIT"
] | null | null | null | audio.py | nielsneerhoff/katalog | 67856eac6822eb5e858863d9791752501c1f25af | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import youtube_dl
from utils import BASE_DATA_DIRECTORY
download_options = {
'format': 'bestaudio/best',
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'wav',
'preferredquality': '192',
}],
'nocheckcertificate': True,... | 26.736842 | 65 | 0.67126 |
1bbfd722a2ba0dbe7aca19b784c3feac5398279d | 5,524 | py | Python | tcpp/translate/relaxed_tasks.py | Behrouz-Babaki/TCPP-chuffed | d832b44690914ef4b73d71bc7e565efb98e42937 | [
"MIT"
] | 1 | 2021-09-09T13:03:02.000Z | 2021-09-09T13:03:02.000Z | tcpp/translate/relaxed_tasks.py | Behrouz-Babaki/TCPP-chuffed | d832b44690914ef4b73d71bc7e565efb98e42937 | [
"MIT"
] | null | null | null | tcpp/translate/relaxed_tasks.py | Behrouz-Babaki/TCPP-chuffed | d832b44690914ef4b73d71bc7e565efb98e42937 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import instantiate
import pddl
class RelaxedAtom(object):
def __init__(self, name):
self.name = name
def __eq__(self, other):
return self.name == other.name
def __ne__(self, other):
return self... | 30.519337 | 83 | 0.601014 |
ed92ae026c8addd83fb1cd818acbcf6dd2dbd65a | 345 | py | Python | models/registry.py | XuanxuanGao/esvit | a8328a283dc33c7cf80f556b0112d01482c9ab2b | [
"MIT"
] | 250 | 2021-05-26T07:33:23.000Z | 2022-03-31T14:02:03.000Z | models/registry.py | XuanxuanGao/esvit | a8328a283dc33c7cf80f556b0112d01482c9ab2b | [
"MIT"
] | 18 | 2021-08-05T09:00:03.000Z | 2022-03-22T03:11:53.000Z | models/registry.py | XuanxuanGao/esvit | a8328a283dc33c7cf80f556b0112d01482c9ab2b | [
"MIT"
] | 34 | 2021-05-27T11:59:03.000Z | 2022-03-15T07:11:42.000Z | _model_entrypoints = {}
def register_model(fn):
module_name_split = fn.__module__.split('.')
model_name = module_name_split[-1]
_model_entrypoints[model_name] = fn
return fn
def model_entrypoints(model_name):
return _model_entrypoints[model_name]
def is_model(model_name):
return model_na... | 18.157895 | 48 | 0.747826 |
aadb33114ce7ce7cc37ef670ae858ae0c0be8314 | 2,502 | py | Python | b_lambda_layer_common/util/field_validator.py | simonasvaitkus/B.LambdaLayerCommon | c25ccca866ffc3e0144578fcd34bf2838ab21471 | [
"Apache-2.0"
] | null | null | null | b_lambda_layer_common/util/field_validator.py | simonasvaitkus/B.LambdaLayerCommon | c25ccca866ffc3e0144578fcd34bf2838ab21471 | [
"Apache-2.0"
] | null | null | null | b_lambda_layer_common/util/field_validator.py | simonasvaitkus/B.LambdaLayerCommon | c25ccca866ffc3e0144578fcd34bf2838ab21471 | [
"Apache-2.0"
] | null | null | null | import re
from datetime import datetime
from typing import Optional
from b_lambda_layer_common.exceptions.container.bad_request_error import BadRequestError
class FieldValidator:
"""
Validates various values.
"""
@staticmethod
def max_length(string_field: Optional[str], max_length: int, allow_nu... | 31.670886 | 107 | 0.618705 |
cf30583864795d3ef3e021edb0a67f2928e967eb | 1,095 | py | Python | tests/common.py | mikeboers/metatools | 5aa12e08f03d87c78913b354319abdefac1fe16e | [
"BSD-3-Clause"
] | 4 | 2015-03-20T23:37:40.000Z | 2021-02-05T14:52:57.000Z | tests/common.py | mikeboers/metatools | 5aa12e08f03d87c78913b354319abdefac1fe16e | [
"BSD-3-Clause"
] | null | null | null | tests/common.py | mikeboers/metatools | 5aa12e08f03d87c78913b354319abdefac1fe16e | [
"BSD-3-Clause"
] | null | null | null | from pprint import pprint, pformat
import datetime
import itertools
import os
import sys
from unittest import TestCase
# From http://stackoverflow.com/questions/2504411/proper-indentation-for-python-multiline-strings
def dedent(docstring):
if not docstring:
return ''
# Convert tabs to spaces (followin... | 31.285714 | 97 | 0.663014 |
f371aae739291aa9e510fa3911c3df784746e7a1 | 239 | py | Python | application/admin/tasks.py | oceanio/flask-boot | df115a7591218d69b4d5b71617e922a516b88df9 | [
"Apache-2.0"
] | null | null | null | application/admin/tasks.py | oceanio/flask-boot | df115a7591218d69b4d5b71617e922a516b88df9 | [
"Apache-2.0"
] | null | null | null | application/admin/tasks.py | oceanio/flask-boot | df115a7591218d69b4d5b71617e922a516b88df9 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from application import celery, mail
from . import security
@celery.task
def send_security_email(msg):
mail.send(msg)
@security.send_mail_task
def delay_security_email(msg):
send_security_email.delay(msg) | 18.384615 | 36 | 0.753138 |
283e0e577ae42e1386bcd31b1400db48bcf5d4cd | 446 | py | Python | bping.py | tanyiqu/batch-ping | 3473e362122a2dc4c28e48884ccfa8db4b68571f | [
"Apache-2.0"
] | 1 | 2021-06-13T08:19:35.000Z | 2021-06-13T08:19:35.000Z | bping.py | tanyiqu/batch-ping | 3473e362122a2dc4c28e48884ccfa8db4b68571f | [
"Apache-2.0"
] | null | null | null | bping.py | tanyiqu/batch-ping | 3473e362122a2dc4c28e48884ccfa8db4b68571f | [
"Apache-2.0"
] | null | null | null | from core.Ping import Ping
# if __name__ == '__main__':
# print('start batch ping...')
#
# fin = open('ip.txt')
#
# for ip in fin:
# Ping(ip.strip()).test_ping()
#
# fin.close()
# pass
import sys
from PyQt5.QtWidgets import QApplication
from ui.forms.MainForm import MainForm
if __name__... | 17.153846 | 40 | 0.61435 |
f5e4730097ca0f2fc23ecf81e54e49c2bc470a02 | 27,704 | py | Python | commands.py | kiranchowdary/openshiftpython | fe394f7f29abbf00e52f9cc04ef9cee74b3c6588 | [
"Apache-2.0"
] | 37 | 2015-01-30T15:25:39.000Z | 2018-06-25T07:06:55.000Z | commands.py | kiranchowdary/openshiftpython | fe394f7f29abbf00e52f9cc04ef9cee74b3c6588 | [
"Apache-2.0"
] | null | null | null | commands.py | kiranchowdary/openshiftpython | fe394f7f29abbf00e52f9cc04ef9cee74b3c6588 | [
"Apache-2.0"
] | 15 | 2015-05-22T11:32:33.000Z | 2021-01-28T22:54:16.000Z | import sys
import re
import os
import stat
import shutil
import webbrowser
import getpass
from datetime import datetime
from optparse import OptionParser
import play.commands.precompile
#add current dir to syspath to import local modules
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
#local imports
fr... | 36.356955 | 155 | 0.709176 |
0da04a361df73ab351ee74af413b64c94ed1e508 | 2,869 | py | Python | graph_traversal.py | Coin-Miner-5000/support | 3dd89e64ef85f890ec2649bc083ae2a3f6b72078 | [
"MIT"
] | null | null | null | graph_traversal.py | Coin-Miner-5000/support | 3dd89e64ef85f890ec2649bc083ae2a3f6b72078 | [
"MIT"
] | null | null | null | graph_traversal.py | Coin-Miner-5000/support | 3dd89e64ef85f890ec2649bc083ae2a3f6b72078 | [
"MIT"
] | null | null | null | import hashlib
import requests
import time
import os
import sys
from uuid import uuid4
from timeit import default_timer as timer
import random
if __name__ == '__main__':
# What node are we interacting with?
if len(sys.argv) > 1:
node = sys.argv[1]
else:
node = "https://lambda-treasure-hu... | 32.602273 | 118 | 0.524922 |
d36017992db5963878efa23dc30bd974e11c4084 | 22,476 | py | Python | lcmap_tap/UserInterface/ui_main_workshop.py | danzelenak-usgs/TAP_Tool | 4ae3f4105df47efaa57283b25019e398b32de7b9 | [
"Unlicense"
] | 2 | 2018-09-05T04:29:27.000Z | 2020-01-08T19:18:50.000Z | lcmap_tap/UserInterface/ui_main_workshop.py | danzelenak-usgs/TAP_Tool | 4ae3f4105df47efaa57283b25019e398b32de7b9 | [
"Unlicense"
] | 1 | 2018-08-10T18:32:50.000Z | 2018-08-10T18:32:50.000Z | lcmap_tap/UserInterface/ui_main_workshop.py | danzelenak-usgs/TAP_Tool | 4ae3f4105df47efaa57283b25019e398b32de7b9 | [
"Unlicense"
] | 1 | 2021-12-27T04:45:49.000Z | 2021-12-27T04:45:49.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'UI_MAIN.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import pkg_resources
class Ui_MainWindow_tap(object):
def setupUi... | 61.747253 | 121 | 0.718233 |
319d2ec3e32203e58407756d1dc0ac34cb4fe1cd | 10,925 | py | Python | model/layers/positional_encodings.py | iostermann/deeplab2 | 68822b0c76c2c757a11402ac597711f926990f04 | [
"Apache-2.0"
] | 587 | 2021-06-21T17:10:17.000Z | 2022-03-30T11:51:38.000Z | model/layers/positional_encodings.py | Niklas-AD/deeplab2 | e0f7eecfac5d35c3e9e66f061098d5f5f15a7152 | [
"Apache-2.0"
] | 73 | 2021-06-23T08:42:22.000Z | 2022-03-28T07:06:35.000Z | model/layers/positional_encodings.py | Niklas-AD/deeplab2 | e0f7eecfac5d35c3e9e66f061098d5f5f15a7152 | [
"Apache-2.0"
] | 89 | 2021-06-22T02:21:32.000Z | 2022-03-29T17:51:21.000Z | # coding=utf-8
# Copyright 2021 The Deeplab2 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 ... | 45.33195 | 138 | 0.724577 |
9a48fa25eb07e42e7ff6e77dda2088bddea173f4 | 18,938 | py | Python | warehouse/legacy/api/xmlrpc/views.py | KOSASIH/warehouse | 44df5fd5097db5462b78c8232e4564cf3e6f99fa | [
"Apache-2.0"
] | null | null | null | warehouse/legacy/api/xmlrpc/views.py | KOSASIH/warehouse | 44df5fd5097db5462b78c8232e4564cf3e6f99fa | [
"Apache-2.0"
] | 2 | 2021-03-31T20:06:37.000Z | 2021-12-13T20:51:44.000Z | warehouse/legacy/api/xmlrpc/views.py | KOSASIH/warehouse | 44df5fd5097db5462b78c8232e4564cf3e6f99fa | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 31.882155 | 88 | 0.631799 |
8b7c7948d47e0813af08b023484a2f8c4aa31779 | 7,675 | py | Python | chatterbot/adapters/storage/mongodb.py | lucasqiu/ChatterBot | e9a490e8a9d67cd7b73f23878451e8b26371b351 | [
"BSD-3-Clause"
] | 2 | 2021-04-05T03:02:50.000Z | 2021-04-05T05:00:11.000Z | chatterbot/adapters/storage/mongodb.py | mesadhan/ChatterBot | e9a490e8a9d67cd7b73f23878451e8b26371b351 | [
"BSD-3-Clause"
] | null | null | null | chatterbot/adapters/storage/mongodb.py | mesadhan/ChatterBot | e9a490e8a9d67cd7b73f23878451e8b26371b351 | [
"BSD-3-Clause"
] | null | null | null | from chatterbot.adapters.storage import StorageAdapter
from chatterbot.conversation import Statement, Response
from pymongo import MongoClient
class Query(object):
def __init__(self, query={}):
self.query = query
def value(self):
return self.query.copy()
def raw(self, data):
que... | 28.962264 | 80 | 0.612638 |
8f693637e1cd6dc6b8e5902c0998e083bfad8f2c | 688 | py | Python | main.py | SnigdhaRoy/GuessingGame | 842751d807ac707963b402161bdb86b03e9b23dd | [
"MIT"
] | null | null | null | main.py | SnigdhaRoy/GuessingGame | 842751d807ac707963b402161bdb86b03e9b23dd | [
"MIT"
] | null | null | null | main.py | SnigdhaRoy/GuessingGame | 842751d807ac707963b402161bdb86b03e9b23dd | [
"MIT"
] | null | null | null | import random
number = random.randint(1, 10)
player_name = input("Hello, what's your name?")
number_of_guesses = 0
print('Okay, '+ player_name+ ' I am guessing a number between 1 and 10. Can you guess what it is? (btw, I only accept responses in an integer form!)')
while number_of_guesses < 5:
guess = int(input()... | 32.761905 | 150 | 0.659884 |
694d9e981328142b0df271c3bf6b54ea06f477e5 | 5,599 | py | Python | examples/stuff/vec_ice.py | bilgetutak/pyroms | 3b0550f26f4ac181b7812e14a7167cd1ca0797f0 | [
"BSD-3-Clause"
] | 75 | 2016-04-05T07:15:57.000Z | 2022-03-04T22:49:54.000Z | examples/stuff/vec_ice.py | hadfieldnz/pyroms-mgh | cd0fe39075825f97a7caf64e2c4c5a19f23302fd | [
"BSD-3-Clause"
] | 27 | 2017-02-26T04:27:49.000Z | 2021-12-01T17:26:56.000Z | examples/stuff/vec_ice.py | ESMG/PyCNAL_legacy | a4f6547bce872068a5bb5751231017bc3e4a4503 | [
"BSD-3-Clause"
] | 56 | 2016-05-11T06:19:14.000Z | 2022-03-22T19:04:17.000Z | import numpy, os
import netCDF4
import Ngl
file1 = netCDF4.Dataset("grid_zhang.nc", "r")
file2 = netCDF4.Dataset("ice_1985.nc", "r")
ulat = file1.variables["ulat"][:]
ulon = file1.variables["ulon"][:]
clat = file1.variables["clat"][:]
clon = file1.variables["clon"][:]
angle = file1.variables["angle"][:]
angle = angle... | 30.933702 | 77 | 0.59207 |
264483f9bdd54fb91021150a74f41b59d34a1c9d | 4,282 | py | Python | pymc3/math.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | 1 | 2019-03-01T02:47:20.000Z | 2019-03-01T02:47:20.000Z | pymc3/math.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | 1 | 2019-08-17T06:58:38.000Z | 2019-08-17T06:58:38.000Z | pymc3/math.py | rsumner31/pymc3-23 | 539c0fc04c196679a1cdcbf4bc2dbea4dee10080 | [
"Apache-2.0"
] | null | null | null | from __future__ import division
import sys
import theano.tensor as tt
# pylint: disable=unused-import
import theano
from theano.tensor import (
constant, flatten, zeros_like, ones_like, stack, concatenate, sum, prod,
lt, gt, le, ge, eq, neq, switch, clip, where, and_, or_, abs_, exp, log,
cos, sin, tan, cos... | 30.805755 | 86 | 0.615834 |
4aa69c1306a189ac7f61a7cfe5ac2cb6cc290722 | 1,501 | py | Python | parser/fase2/team17/Traduccion/InterpreteF2/Soporte_aFun/dropfun.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team17/Traduccion/InterpreteF2/Soporte_aFun/dropfun.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team17/Traduccion/InterpreteF2/Soporte_aFun/dropfun.py | webdev188/tytus | 847071edb17b218f51bb969d335a8ec093d13f94 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from InterpreteF2.NodoAST import NodoArbol
from InterpreteF2.Tabla_de_simbolos import Tabla_de_simbolos
from InterpreteF2.Arbol import Arbol
from InterpreteF2.Valor.Valor import Valor
from InterpreteF2.Primitivos.TIPO import TIPO
from InterpreteF2.Primitivos.COMPROBADOR_deTipos import COMPROBADOR_deTipos
from Interpret... | 35.738095 | 85 | 0.726849 |
9afa60b180f2c6793fe4dcc8cad5eb1ab5bbfba4 | 72,518 | py | Python | proteus/mprans/VOF3P.py | acatwithacomputer/proteus | 80dfad95da6ab4d18a88a035f55c26b03540a864 | [
"MIT"
] | null | null | null | proteus/mprans/VOF3P.py | acatwithacomputer/proteus | 80dfad95da6ab4d18a88a035f55c26b03540a864 | [
"MIT"
] | 1 | 2020-12-19T03:29:35.000Z | 2020-12-19T03:29:35.000Z | proteus/mprans/VOF3P.py | acatwithacomputer/proteus | 80dfad95da6ab4d18a88a035f55c26b03540a864 | [
"MIT"
] | null | null | null | # A type of -*- python -*- file
"""
An optimized volume-of-fluid transport module
"""
from __future__ import absolute_import
from __future__ import division
from builtins import range
from past.utils import old_div
import numpy as np
from math import fabs
import proteus
from proteus import cfemIntegrals, Quadrature, N... | 52.397399 | 182 | 0.589509 |
f72153ee7a89b3a20eafa2cc82f8c626ef1eda68 | 688 | py | Python | uniseg/graphemeclustertest.py | olivier-compilatio/uniseg-python | 8513a59e9c701a173c8001655e592c18f8840b16 | [
"MIT"
] | 2 | 2019-12-28T09:28:43.000Z | 2021-05-11T02:01:47.000Z | uniseg/graphemeclustertest.py | olivier-compilatio/uniseg-python | 8513a59e9c701a173c8001655e592c18f8840b16 | [
"MIT"
] | null | null | null | uniseg/graphemeclustertest.py | olivier-compilatio/uniseg-python | 8513a59e9c701a173c8001655e592c18f8840b16 | [
"MIT"
] | 2 | 2019-07-23T09:11:55.000Z | 2019-10-02T17:13:53.000Z | #!/usr/bin/env python
from __future__ import (absolute_import,
division,
print_function,
unicode_literals)
import doctest
import unittest
from . import graphemecluster
from .db import iter_grapheme_cluster_break_tests
from .test import implement... | 22.933333 | 67 | 0.694767 |
48200bb89e2a556271cb0ade230ce2d5d6c72505 | 2,615 | py | Python | Templates/Python/Matplotlib/02_plot_csv_basic.py | grisu48/Templates | 5aea7903daabe34983b9970d6d8d637a0713160e | [
"WTFPL"
] | null | null | null | Templates/Python/Matplotlib/02_plot_csv_basic.py | grisu48/Templates | 5aea7903daabe34983b9970d6d8d637a0713160e | [
"WTFPL"
] | null | null | null | Templates/Python/Matplotlib/02_plot_csv_basic.py | grisu48/Templates | 5aea7903daabe34983b9970d6d8d637a0713160e | [
"WTFPL"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
## 2019, Felix Niederwanger
## My matplotlib skeleton code for a simple plot
import sys
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
import numpy as np
import re
class CSV :
'''
CSV container class
'''
def __init__(self):
self._data = []
... | 22.73913 | 70 | 0.625621 |
d28c427df3799359069f574513392f1247708006 | 847 | py | Python | python-web-programming/django-project/mysite/urls.py | DaehunGwak/study-django | b355cd76ac86068b13fcc7a362e35d98692d5816 | [
"MIT"
] | null | null | null | python-web-programming/django-project/mysite/urls.py | DaehunGwak/study-django | b355cd76ac86068b13fcc7a362e35d98692d5816 | [
"MIT"
] | 25 | 2020-03-19T08:56:48.000Z | 2022-03-12T00:22:38.000Z | python-web-programming/django-project/mysite/urls.py | DaehunGwak/study-django | b355cd76ac86068b13fcc7a362e35d98692d5816 | [
"MIT"
] | null | null | null | """mysite URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 35.291667 | 77 | 0.697757 |
f221bbb083fd3e805a8306469009a292b3ced484 | 342 | py | Python | src/privibot/__main__.py | pawamoy/privibot | 1bc7bcb0929698279c47dfd10a79644381bc1332 | [
"ISC"
] | 3 | 2019-12-09T12:56:15.000Z | 2020-06-28T22:12:37.000Z | src/privibot/__main__.py | pawamoy/privibot | 1bc7bcb0929698279c47dfd10a79644381bc1332 | [
"ISC"
] | 3 | 2019-08-12T13:53:47.000Z | 2019-08-12T13:55:11.000Z | src/privibot/__main__.py | pawamoy/privibot | 1bc7bcb0929698279c47dfd10a79644381bc1332 | [
"ISC"
] | 1 | 2020-09-18T14:10:30.000Z | 2020-09-18T14:10:30.000Z | """
Entry-point module, in case you use `python -m privibot`.
Why does this file exist, and why `__main__`? For more info, read:
- https://www.python.org/dev/peps/pep-0338/
- https://docs.python.org/3/using/cmdline.html#cmdoption-m
"""
import sys
from privibot.cli import main
if __name__ == "__main__":
sys.exi... | 21.375 | 66 | 0.69883 |
e2e8b978bc9c22181475c76219168b9439a4f929 | 636 | py | Python | settings.py | gbc1858/SPE-image-handler | 6d1e92ba4b74a6c8c44928f93bbf2f5994d34510 | [
"MIT"
] | null | null | null | settings.py | gbc1858/SPE-image-handler | 6d1e92ba4b74a6c8c44928f93bbf2f5994d34510 | [
"MIT"
] | null | null | null | settings.py | gbc1858/SPE-image-handler | 6d1e92ba4b74a6c8c44928f93bbf2f5994d34510 | [
"MIT"
] | null | null | null | import os
# Imaging SOL excel related
IMAGING_SOL_EXCEL_NAME = 'blue_center_ASTRA.xlsx'
IMAGING_SOL_EXCEL_SHEET = 'Sheet1'
IMAGING_SOL_EXCEL_Z_TEMP = 'z_off'
IMAGING_SOL_EXCEL_BZ_TEMP = 'B'
# BSOL file
BSOL_FILE_NAME = 'Blue_solenoid_calibration.xlsx'
BSOL_CURRENT_COLUMN = 'I_clamp_A'
BSOL_B_FIELD_COLUMN = 'Bz_Gauss... | 25.44 | 90 | 0.806604 |
6004e8734af0d584af3c78ced61d931a509937a8 | 11,836 | py | Python | rq/cli/helpers.py | sthagen/rq-rq | 62f04082a9add3c944dbb7919d32036c65704b39 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | rq/cli/helpers.py | sthagen/rq-rq | 62f04082a9add3c944dbb7919d32036c65704b39 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | rq/cli/helpers.py | sthagen/rq-rq | 62f04082a9add3c944dbb7919d32036c65704b39 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import sys
import importlib
import time
import os
from functools import partial
from enum import Enum
from datetime import datetime, timezone, timedelta
from json import loads, JSONDeco... | 34.307246 | 119 | 0.59488 |
0d615cacfbb11cb1437aee765c170a2cadaea7bf | 2,663 | py | Python | examples/fpn/demo.py | Asker0Lee/chainercv | ee6e4ae39596e960dbb2a0e5a4a717e3da5c4837 | [
"MIT"
] | 1 | 2019-05-14T06:27:10.000Z | 2019-05-14T06:27:10.000Z | examples/fpn/demo.py | Asker0Lee/chainercv | ee6e4ae39596e960dbb2a0e5a4a717e3da5c4837 | [
"MIT"
] | null | null | null | examples/fpn/demo.py | Asker0Lee/chainercv | ee6e4ae39596e960dbb2a0e5a4a717e3da5c4837 | [
"MIT"
] | null | null | null | import argparse
import matplotlib.pyplot as plt
import chainer
from chainercv.datasets import coco_bbox_label_names
from chainercv.datasets import coco_instance_segmentation_label_names
from chainercv.links import FasterRCNNFPNResNet101
from chainercv.links import FasterRCNNFPNResNet50
from chainercv.links import Mas... | 34.584416 | 73 | 0.692452 |
a0d4a4338d0cab305193993a8c4a8f8dae0bb57f | 25,944 | py | Python | run_experiments.py | VictorDarvariu/solving-graph-pgg | 30428dec0783aa71a8ff955862e95ae5b3cca9b4 | [
"MIT"
] | 2 | 2021-12-09T04:30:19.000Z | 2021-12-15T19:13:40.000Z | run_experiments.py | VictorDarvariu/solving-graph-pgg | 30428dec0783aa71a8ff955862e95ae5b3cca9b4 | [
"MIT"
] | null | null | null | run_experiments.py | VictorDarvariu/solving-graph-pgg | 30428dec0783aa71a8ff955862e95ae5b3cca9b4 | [
"MIT"
] | 1 | 2021-12-22T04:33:39.000Z | 2021-12-22T04:33:39.000Z | import argparse
import os
import random
import traceback
import uuid
import time
from datetime import datetime
from celery import group
from relnet.agent.baseline.baseline_agent import ExhaustiveSearchAgent, BaselineAgent
from relnet.agent.mcts.mcts_agent import *
from relnet.evaluation.experiment_conditions import... | 53.714286 | 211 | 0.568995 |
a3d9a1419278790008e7fcd50e5288c194a7ec3f | 12,186 | py | Python | conf.py | asimjahan/SecurityPrivacyReferenceArchitecture | da74341b2b3c6e9fe35fe83392ae0fe6151bf0ed | [
"CC-BY-4.0"
] | null | null | null | conf.py | asimjahan/SecurityPrivacyReferenceArchitecture | da74341b2b3c6e9fe35fe83392ae0fe6151bf0ed | [
"CC-BY-4.0"
] | null | null | null | conf.py | asimjahan/SecurityPrivacyReferenceArchitecture | da74341b2b3c6e9fe35fe83392ae0fe6151bf0ed | [
"CC-BY-4.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Open Reference Architecture for Security and Privacy documentation build configuration file, created by
# sphinx-quickstart on Tue May 3 16:10:06 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values ar... | 32.846361 | 171 | 0.728459 |
722e29891b81a1cafbc65bba11081306a51b954c | 40,806 | py | Python | pypy/interpreter/test/test_gateway.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | pypy/interpreter/test/test_gateway.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | pypy/interpreter/test/test_gateway.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | # -*- coding: utf-8 -*-
from __future__ import division, print_function # for test_app2interp_future
from pypy.interpreter import gateway, argument
from pypy.interpreter.gateway import ObjSpace, W_Root, WrappedDefault
from pypy.interpreter.signature import Signature
from pypy.interpreter.error import OperationError
i... | 38.243674 | 86 | 0.545287 |
6afbc5878d1664da98c30d157471c1e43eed9a52 | 704 | py | Python | ivy/functional/frontends/torch/core/__init__.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | 1 | 2022-02-28T03:20:54.000Z | 2022-02-28T03:20:54.000Z | ivy/functional/frontends/torch/core/__init__.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | null | null | null | ivy/functional/frontends/torch/core/__init__.py | NIkhilbadveli/ivy | 42dc66dd44417102cf0b72d4fc7aea2aaffa75bc | [
"Apache-2.0"
] | null | null | null | from . import BLAS_n_LAPACK_ops
from .BLAS_n_LAPACK_ops import *
from . import comparison_ops
from .comparison_ops import *
from . import creation_ops
from .creation_ops import *
from . import gradient_disabling
from .gradient_disabling import *
from . import index_slice_join_mutate_ops
from .index_slice_join_mutate_op... | 28.16 | 42 | 0.8125 |
4943ffe3447d3e2399bafd0e925aab8c9bb4a1e1 | 4,320 | py | Python | examples/mmp/recreation.py | kzfm/pychembldb | 0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7 | [
"CC0-1.0"
] | 8 | 2020-01-16T00:43:46.000Z | 2021-11-27T18:26:12.000Z | examples/mmp/recreation.py | iwatobipen/pychembldb | 0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7 | [
"CC0-1.0"
] | null | null | null | examples/mmp/recreation.py | iwatobipen/pychembldb | 0dde6a05b2dc138e0be7f8f27f57b5c2a42e23c7 | [
"CC0-1.0"
] | 3 | 2020-05-31T05:54:33.000Z | 2021-11-15T04:31:07.000Z | from pychembldb import *
import os
from glob import glob
# metadata
tsv_file = "metadata.tsv"
# sdf_dir
sdf_dir = "sdfs"
# activity_dir
act_dir = "activities"
def write_sdf(overwrite=False):
if not os.path.exists(sdf_dir):
os.mkdir(sdf_dir)
# Confidence score == 9
c9 = chembldb.query(ConfidenceS... | 34.83871 | 94 | 0.518519 |
526d12f19dc73ae854f3a11a4a994cb912bb4c1d | 5,430 | py | Python | config/config.py | xu-hao/pdspi-mapper-parallex-example | 8b81558213d58d5fc06e938951fde099b41b9cae | [
"MIT"
] | null | null | null | config/config.py | xu-hao/pdspi-mapper-parallex-example | 8b81558213d58d5fc06e938951fde099b41b9cae | [
"MIT"
] | null | null | null | config/config.py | xu-hao/pdspi-mapper-parallex-example | 8b81558213d58d5fc06e938951fde099b41b9cae | [
"MIT"
] | 2 | 2020-05-02T20:32:27.000Z | 2020-07-18T05:39:24.000Z | return {
"pluginDependencies": ["pdspi-fhir-example"],
"title": "tx-parallex variable mapper",
"pluginType": "m",
"pluginTypeTitle": "Mapping",
"pluginSelectors": [],
"settingsDefaults": {
"pluginSelectors": [],
"patientVariables": [
{
"id": "LOINC:216... | 28.429319 | 59 | 0.283057 |
32497997afa3e13f86757a61378ceae5cfa8833e | 15,433 | py | Python | lfd/mmqe/features.py | def670/lfd | 9fef15f556cba49dd4b42c0c29505a4137f95fc5 | [
"BSD-2-Clause"
] | 36 | 2015-05-22T14:47:18.000Z | 2021-07-27T15:30:36.000Z | lfd/mmqe/features.py | jeffmahler/lfd | ecc6b934db098c0b1af9946454917b6dc911cb74 | [
"BSD-2-Clause"
] | null | null | null | lfd/mmqe/features.py | jeffmahler/lfd | ecc6b934db098c0b1af9946454917b6dc911cb74 | [
"BSD-2-Clause"
] | 13 | 2015-05-22T15:38:07.000Z | 2021-07-28T03:20:35.000Z | """
Functions and classes for computing features
"""
import h5py
import numpy as np
from scipy.spatial.distance import cdist
import re
from lfd.tpsopt.batchtps import SrcContext, TgtContext, batch_tps_rpm_bij, GPUContext
class Feature(object):
"""
base class for computing features
"""
def __init__(s... | 38.295285 | 133 | 0.668308 |
a7031ed8ce50a24ddbdf3391ca278bd6f3c43a90 | 1,577 | py | Python | babyrobot/objectrec/client.py | babyrobot-eu/core-modules | 7e8c006c40153fb649208c9a78fc71aa70243f69 | [
"MIT"
] | 1 | 2019-02-07T15:32:06.000Z | 2019-02-07T15:32:06.000Z | babyrobot/objectrec/client.py | babyrobot-eu/core-modules | 7e8c006c40153fb649208c9a78fc71aa70243f69 | [
"MIT"
] | 9 | 2020-01-28T22:09:41.000Z | 2022-03-11T23:39:17.000Z | babyrobot/objectrec/client.py | babyrobot-eu/core-modules | 7e8c006c40153fb649208c9a78fc71aa70243f69 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import rospy
from babyrobot_msgs.msg import Frame
from babyrobot_msgs.srv import ObjectRecognition
from babyrobot.objectrec.utils import (visualize_objectrec_response,
get_labels_map)
from babyrobot.objectrec.config import OBJECTREC as CO... | 32.183673 | 74 | 0.613824 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.