hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a71f8d8a4438dc27df092caa2b6fafa27beb56a8 | 514 | py | Python | feedback/models.py | DisMosGit/car_library | 56adb1fb9809ba760d357599030afc2a779605eb | [
"Apache-2.0"
] | null | null | null | feedback/models.py | DisMosGit/car_library | 56adb1fb9809ba760d357599030afc2a779605eb | [
"Apache-2.0"
] | null | null | null | feedback/models.py | DisMosGit/car_library | 56adb1fb9809ba760d357599030afc2a779605eb | [
"Apache-2.0"
] | null | null | null | from django.db import models
from users.models import User
# Create your models here.
class Feedback(models.Model):
user = models.ForeignKey(User,
related_name='feedbacks',
on_delete=models.CASCADE)
title = models.CharField(max_length=255)
... | 24.47619 | 55 | 0.593385 |
f10d5262cc55206a34fe29de4a374f9c55e93263 | 432 | py | Python | TopQuarkAnalysis/TopEventProducers/python/sequences/ttSemiLepMVASelection_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | TopQuarkAnalysis/TopEventProducers/python/sequences/ttSemiLepMVASelection_cff.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | TopQuarkAnalysis/TopEventProducers/python/sequences/ttSemiLepMVASelection_cff.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
#
# make mva event selection for semileptonic events
#
## std sequence to produce an mva discriminant
from TopQuarkAnalysis.TopEventSelection.TtSemiLepSignalSelMVAComputer_cff import *
## make mva discriminant for event selection
makeTtSemiLepMVASelDiscriminantTask = cms.Task... | 33.230769 | 83 | 0.856481 |
a2c770014dbd4460a04786781c2b759e16853f42 | 364 | py | Python | test.py | VendettaMask/study_python | 3b9f94d20e46a3114fa65a6361b2438995c0679f | [
"MIT"
] | null | null | null | test.py | VendettaMask/study_python | 3b9f94d20e46a3114fa65a6361b2438995c0679f | [
"MIT"
] | null | null | null | test.py | VendettaMask/study_python | 3b9f94d20e46a3114fa65a6361b2438995c0679f | [
"MIT"
] | null | null | null | Str = input()
for i in range(0, len(Str)):
if Str[i] == ' ':
print(' ', end="")
elif Str[i] in ['x', 'y', 'z']:
# print('{}'.format(chr(ord(Str[i]) - 23)), end="") #另一种写法
print(chr(ord(Str[i])-23),end='')
else:
# print('{}'.format(chr(ord(Str[i]) + 3)), end="") #另一种写法... | 33.090909 | 67 | 0.431319 |
64d5f681346b1a94e0a8f499a2d355fb80861282 | 999 | py | Python | EtlPipeline/tests/test_get_stats.py | office-for-students/beta-data-pipelines | 36b90c7720e0be0f807d93a31cf7346522b6e1f0 | [
"MIT"
] | 2 | 2019-06-04T14:15:16.000Z | 2019-08-04T15:26:16.000Z | EtlPipeline/tests/test_get_stats.py | office-for-students/beta-data-pipelines | 36b90c7720e0be0f807d93a31cf7346522b6e1f0 | [
"MIT"
] | 3 | 2019-06-24T12:21:10.000Z | 2019-07-22T11:15:27.000Z | EtlPipeline/tests/test_get_stats.py | office-for-students/beta-data-pipelines | 36b90c7720e0be0f807d93a31cf7346522b6e1f0 | [
"MIT"
] | 1 | 2019-09-26T19:29:15.000Z | 2019-09-26T19:29:15.000Z | # import unittest
#
# import defusedxml.ElementTree as ET
# import xmltodict
#
# import course_stats
# from course_docs import get_country
# from testing_utils import get_string
#
#
# class TestGetStats(unittest.TestCase):
# def test_with_25_courses(self):
# """Initial smoke test"""
# xml_string = g... | 31.21875 | 73 | 0.620621 |
3dc2ee1bce9672d18fecb39aae75c0ac57dfeae8 | 457 | py | Python | examples/framework_ideas/dependency_injection.py | daniel-butler/python-clean-architecture | a95da91fffb1120e1e748c9ee7717a622647288e | [
"MIT"
] | null | null | null | examples/framework_ideas/dependency_injection.py | daniel-butler/python-clean-architecture | a95da91fffb1120e1e748c9ee7717a622647288e | [
"MIT"
] | null | null | null | examples/framework_ideas/dependency_injection.py | daniel-butler/python-clean-architecture | a95da91fffb1120e1e748c9ee7717a622647288e | [
"MIT"
] | 1 | 2019-12-11T01:32:08.000Z | 2019-12-11T01:32:08.000Z | from pca.utils.dependency_injection import Container as BaseContainer, Scopes
class Container(BaseContainer):
def __init__(self, default_scope=Scopes.REQUEST, request_strategy=None):
super().__init__(default_scope)
# TODO #9. implement request scope
self.request_strategy = request_strateg... | 32.642857 | 77 | 0.737418 |
3b7a53276560e95c2c241ad17537e0bbb3071af7 | 12,682 | py | Python | datasets/epa_historical_air_quality/hap_daily_summary/hap_daily_summary_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 90 | 2021-04-09T19:20:19.000Z | 2022-03-31T16:03:14.000Z | datasets/epa_historical_air_quality/hap_daily_summary/hap_daily_summary_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 125 | 2021-04-19T20:33:26.000Z | 2022-03-30T21:45:49.000Z | datasets/epa_historical_air_quality/hap_daily_summary/hap_daily_summary_dag.py | renovate-bot/public-datasets-pipelines | d2b5e527d9d2dcc8e01f5209e7b9409dfe2b62a8 | [
"Apache-2.0"
] | 54 | 2021-04-29T23:17:36.000Z | 2022-03-31T05:15:23.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 50.931727 | 752 | 0.56316 |
05d20659d1ba0fe067d10256bd34b0331ceead75 | 3,476 | py | Python | bindings/python/ensmallen/datasets/string/azonexushydrophilus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/azonexushydrophilus.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/azonexushydrophilus.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Azonexus hydrophilus.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein a... | 33.104762 | 223 | 0.678078 |
99ebacb3d0bfbf6caff9d5fef4c03f8d7b0539ac | 31,720 | py | Python | deploy/env/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/bundle2.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/env/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/bundle2.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | deploy/env/local/lib/python2.7/site-packages/mercurial-3.1-py2.7-linux-x86_64.egg/mercurial/bundle2.py | wangvictor2012/liuwei | 0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1 | [
"BSD-3-Clause"
] | null | null | null | # bundle2.py - generic container format to transmit arbitrary data.
#
# Copyright 2013 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""Handling of the new bundle2 format
The goal of bundle2 is to act as an atomic... | 35.166297 | 79 | 0.634584 |
a713d920a03af3c7aa4eefec6f59eb3ce490ab2b | 8,569 | py | Python | backend/api/tests/test_user_history.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 18 | 2017-05-10T21:55:11.000Z | 2021-03-01T16:41:32.000Z | backend/api/tests/test_user_history.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 1,167 | 2017-03-04T00:18:43.000Z | 2022-03-03T22:31:51.000Z | backend/api/tests/test_user_history.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 48 | 2017-03-09T17:19:39.000Z | 2022-02-24T16:38:17.000Z | """
REST API Documentation for the NRS TFRS Credit Trading Application
The Transportation Fuels Reporting System is being designed to streamline
compliance reporting for transportation fuel suppliers in accordance with
the Renewable & Low Carbon Fuel Requirements Regulation.
OpenAPI spec version: ... | 38.084444 | 83 | 0.596452 |
82fd227178f7b5f1b8a383637009fd8762dd98b1 | 2,359 | py | Python | docs/conf.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 1 | 2021-11-27T06:40:34.000Z | 2021-11-27T06:40:34.000Z | docs/conf.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | 2 | 2021-05-13T04:50:50.000Z | 2022-02-28T21:06:24.000Z | docs/conf.py | gfavre/invoice-manager | 2a1db22edd51b461c090282c6fc1f290f3265379 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 35.742424 | 79 | 0.668928 |
2190cd1311d488015eef0658c83fcfce6fa03413 | 195 | py | Python | 7_kyu/BAD_Hash_String_to_Int.py | UlrichBerntien/Codewars-Katas | bbd025e67aa352d313564d3862db19fffa39f552 | [
"MIT"
] | null | null | null | 7_kyu/BAD_Hash_String_to_Int.py | UlrichBerntien/Codewars-Katas | bbd025e67aa352d313564d3862db19fffa39f552 | [
"MIT"
] | null | null | null | 7_kyu/BAD_Hash_String_to_Int.py | UlrichBerntien/Codewars-Katas | bbd025e67aa352d313564d3862db19fffa39f552 | [
"MIT"
] | null | null | null | def string_hash(s: str) -> int:
a = sum( ord(c) for c in s )
n = s.count(' ')
b = ord(s[-1])-ord(s[0]) if s else 0
c = (a | b) & (~a << 2)
d = c ^ ( (n+1) << 5 )
return d | 27.857143 | 40 | 0.405128 |
7f3573eac6d6722e642804cdbf683c273d4a602b | 3,122 | py | Python | minkit/utils/splot.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | null | null | null | minkit/utils/splot.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | 5 | 2020-01-30T18:30:33.000Z | 2020-11-10T09:13:47.000Z | minkit/utils/splot.py | mramospe/minkit | fa6808a6ca8063751da92f683f2b810a0690a462 | [
"MIT-0"
] | 1 | 2020-02-03T22:59:00.000Z | 2020-02-03T22:59:00.000Z | ########################################
# MIT License
#
# Copyright (c) 2020 Miguel Ramos Pernas
########################################
'''
Functions and classes related to the s-plot technique.
More information at: https://arxiv.org/abs/physics/0402083
'''
from ..base import parameters
from ..base import data_types... | 31.535354 | 101 | 0.628764 |
fcb76a22ab95f239c1e0d0b1edfe02211aabaea2 | 490 | py | Python | src/posts/type_hinting/examples/11.py | pauleveritt/pauleveritt.github.io | 3e4707dba1f3a57297f90c10cc2da4c3075c1a69 | [
"BSD-3-Clause"
] | 8 | 2016-07-15T19:58:29.000Z | 2021-03-11T09:57:11.000Z | src/posts/type_hinting/examples/11.py | pauleveritt/pauleveritt.github.io | 3e4707dba1f3a57297f90c10cc2da4c3075c1a69 | [
"BSD-3-Clause"
] | 2 | 2015-11-26T13:54:52.000Z | 2016-03-03T13:04:17.000Z | src/posts/type_hinting/examples/11.py | pauleveritt/pauleveritt.github.io | 3e4707dba1f3a57297f90c10cc2da4c3075c1a69 | [
"BSD-3-Clause"
] | 6 | 2016-03-01T13:05:00.000Z | 2016-10-11T16:37:18.000Z | from typing import Union, List, Dict
def greeting(names: Union[List[str], Dict[int, List[str]]]) -> Union[
List[str], Dict[int, List[str]]]:
fmt = 'Hello, {}'
if isinstance(names, dict):
return [(k, fmt.format(', '.join(v))) for k, v in
names.items()]
else:
return f... | 23.333333 | 69 | 0.522449 |
1b9569af6c2978832c02a7ade6d09fafa7ec957b | 7,567 | py | Python | chrome/common/extensions/docs/server2/github_file_system.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-05-03T06:33:56.000Z | 2021-11-14T18:39:42.000Z | chrome/common/extensions/docs/server2/github_file_system.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | chrome/common/extensions/docs/server2/github_file_system.py | pozdnyakov/chromium-crosswalk | 0fb25c7278bf1d93e53a3b0bcb75aa8b99d4b26e | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 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 json
import logging
import os
from StringIO import StringIO
import appengine_blobstore as blobstore
from appengine_url_fetcher import AppEngineUr... | 36.73301 | 78 | 0.628254 |
50e3440504a52a6b67393c563ea6471a99008515 | 769 | py | Python | Blog_Yourself/Blog_Yourself/urls.py | shivansh1698/Blog_yourself | de797a4c01484fb006fddb3e213b75fad517e74b | [
"BSD-3-Clause"
] | null | null | null | Blog_Yourself/Blog_Yourself/urls.py | shivansh1698/Blog_yourself | de797a4c01484fb006fddb3e213b75fad517e74b | [
"BSD-3-Clause"
] | 5 | 2020-02-11T21:31:42.000Z | 2021-06-10T22:45:00.000Z | Blog_Yourself/Blog_Yourself/urls.py | shivansh1698/Blog_yourself | de797a4c01484fb006fddb3e213b75fad517e74b | [
"BSD-3-Clause"
] | null | null | null | """Blog_Yourself URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cla... | 34.954545 | 79 | 0.707412 |
cd7c2d38c38daafaac0a9178774c5ead84cb0bb3 | 8,510 | py | Python | nlpnet/word_dictionary.py | bgmartins/spatial-roles | bebb4d7084e75f4e7919308d0aa77544d12776a2 | [
"MIT"
] | 1 | 2020-12-14T20:58:54.000Z | 2020-12-14T20:58:54.000Z | nlpnet/word_dictionary.py | bgmartins/spatial-roles | bebb4d7084e75f4e7919308d0aa77544d12776a2 | [
"MIT"
] | null | null | null | nlpnet/word_dictionary.py | bgmartins/spatial-roles | bebb4d7084e75f4e7919308d0aa77544d12776a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import itertools
from collections import Counter, OrderedDict as OD
class WordDictionary(dict):
"""
Class to store words and their corresponding indices in
the network lookup table. Also deals with padding and
maps rare words to a special index.
"""
padding_left = ... | 36.523605 | 96 | 0.579906 |
7e204d520f74101ffa6d717419893f07a426a211 | 5,463 | py | Python | datatile/datatile/summary/df.py | mouradmourafiq/datatile | 5aa88a598049645739b5ae7500719f4addba24cb | [
"Apache-2.0"
] | 20 | 2021-12-01T11:50:37.000Z | 2022-03-28T15:06:49.000Z | datatile/datatile/summary/df.py | mouradmourafiq/datatile | 5aa88a598049645739b5ae7500719f4addba24cb | [
"Apache-2.0"
] | 2 | 2021-12-27T14:11:32.000Z | 2022-02-09T18:16:12.000Z | datatile/datatile/summary/df.py | mouradmourafiq/datatile | 5aa88a598049645739b5ae7500719f4addba24cb | [
"Apache-2.0"
] | 5 | 2021-12-01T11:51:29.000Z | 2022-03-31T05:24:40.000Z | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, 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 ... | 34.14375 | 97 | 0.592349 |
7ba4db4dbae431ad8322b58ad025ba1fbba26dc0 | 13,905 | py | Python | src/ggrc_workflows/notification/data_handler.py | kripsy/Project | 5ff892513ea74621ea5031a7d5bc7a6a614debc8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_workflows/notification/data_handler.py | kripsy/Project | 5ff892513ea74621ea5031a7d5bc7a6a614debc8 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-11-15T17:52:29.000Z | 2021-11-15T17:52:29.000Z | src/ggrc_workflows/notification/data_handler.py | gaurav46/ggrc-core | 5f4ea7173ec1da7763bd5b4fef39858c8be07df2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
import urllib
from copy import deepcopy
from datetime import date
from logging import getLogger
from urlparse import urljoin
from sqlalchemy import and_
from ggrc import db
from ggrc import utils
from ggr... | 32.039171 | 79 | 0.676088 |
f848740883ea539bed7d42344dc1382bb40b72f6 | 112 | py | Python | skabase/SKAMaster/SKAMaster/__main__.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | 1 | 2019-05-31T09:47:31.000Z | 2019-05-31T09:47:31.000Z | skabase/SKAMaster/__main__.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | null | null | null | skabase/SKAMaster/__main__.py | adityadangeska/lmc-base-classes | a3dada19b27fcc889546d754ef94986c55da5acc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of the SKAMaster project
#
#
#
from SKAMaster import main
main()
| 11.2 | 44 | 0.642857 |
c6338e0d9165ee45e24b8855d213809186fa6059 | 49 | py | Python | ansible_runner/api/__init__.py | smk4664/nautobot-plugin-ansible-runner | 14e3c57e9d4b21abe9bf81484fc3e26114fc7056 | [
"Apache-2.0"
] | null | null | null | ansible_runner/api/__init__.py | smk4664/nautobot-plugin-ansible-runner | 14e3c57e9d4b21abe9bf81484fc3e26114fc7056 | [
"Apache-2.0"
] | null | null | null | ansible_runner/api/__init__.py | smk4664/nautobot-plugin-ansible-runner | 14e3c57e9d4b21abe9bf81484fc3e26114fc7056 | [
"Apache-2.0"
] | null | null | null | """REST API module for ansible_runner plugin."""
| 24.5 | 48 | 0.734694 |
2eab85f427d9ccefdc5743e1d202c527a2afe181 | 191 | py | Python | aiocloudpayments/types/notification_info.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | aiocloudpayments/types/notification_info.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | aiocloudpayments/types/notification_info.py | drforse/aiocloudpayments | 25b8827250279335d037754dca6978bc79c9b18d | [
"MIT"
] | null | null | null | from .base import CpObject
class NotificationInfo(CpObject):
is_enabled: bool = None
address: str = None
http_method: str = None
encoding: str = None
format: str = None
| 19.1 | 33 | 0.675393 |
192dfbae50c8ec4353b51fa77a0d90d5a35b94b9 | 2,992 | py | Python | pi_cam_neopixel_control.py | nixternal/Pi-Cam-NeoPixel | fdae6f388e8432c34ae7ad6993c079a052883d23 | [
"Unlicense"
] | 1 | 2017-04-12T21:10:22.000Z | 2017-04-12T21:10:22.000Z | pi_cam_neopixel_control.py | nixternal/Pi-Cam-NeoPixel | fdae6f388e8432c34ae7ad6993c079a052883d23 | [
"Unlicense"
] | null | null | null | pi_cam_neopixel_control.py | nixternal/Pi-Cam-NeoPixel | fdae6f388e8432c34ae7ad6993c079a052883d23 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os
import time
from neopixel import Adafruit_NeoPixel, Color, ws
COUNT = 12
PIN = 18 # GPIO Pin 18 for Data In
FREQ = 800000 # LED signal frequency in hertz (usually 800khz)
DMA = 5 # DMA channel to use for generating signal
BRIGHTNESS = 255 # Set to 0 for darkest and 255 for brightes... | 30.530612 | 84 | 0.582553 |
fd8db97b580b6a1347001aa3cb2bd71edc914da9 | 3,790 | py | Python | swagger_client/models/management_persistent_workers.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | 2 | 2019-08-07T11:08:06.000Z | 2021-01-20T11:28:37.000Z | swagger_client/models/management_persistent_workers.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | null | null | null | swagger_client/models/management_persistent_workers.py | jrg1381/sm_asr_console | 47c4090075deaaa7f58e9a092423a58bc7b0a30f | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Speechmatics Management API
Speechmatics offer a secure Management REST API that enables you to programatically control the lifecycle of the appliance, including stopping and rebooting the appliance, restarting services, licensing the appliance and controlling the available resources. # n... | 27.266187 | 275 | 0.573615 |
c9000e29236a51001077c3d99256672ba661b53e | 28,117 | py | Python | invenio_files_rest/views.py | kprzerwa/invenio-files-rest | e4a30e8608cbfd2da63320638cabce60ec6ad3db | [
"MIT"
] | null | null | null | invenio_files_rest/views.py | kprzerwa/invenio-files-rest | e4a30e8608cbfd2da63320638cabce60ec6ad3db | [
"MIT"
] | null | null | null | invenio_files_rest/views.py | kprzerwa/invenio-files-rest | e4a30e8608cbfd2da63320638cabce60ec6ad3db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Files download/upload REST API similar to S3 for Invenio."""
from __future__ impo... | 31.31069 | 79 | 0.603265 |
e7ea33e18d66edba3b0a9e583c986f32cf9c67cc | 4,713 | py | Python | kinow_client/apis/genders_api.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2019-06-26T14:24:54.000Z | 2019-06-26T14:24:54.000Z | kinow_client/apis/genders_api.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | null | null | null | kinow_client/apis/genders_api.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2018-02-01T10:08:40.000Z | 2018-02-01T10:08:40.000Z | # coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.58
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six i... | 33.664286 | 100 | 0.558668 |
4f17592b252a9a0a626ff6709c78c3b04bfee74d | 515 | py | Python | handlers/users/start.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | handlers/users/start.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | handlers/users/start.py | AleksZavg/Admin-telegram-bot | c671419ba9fd5e93df742ebe9443d72afa4c99aa | [
"MIT"
] | null | null | null | from typing import Text
from aiogram import types
from aiogram.dispatcher.filters.builtin import CommandStart, Text
from aiogram.types.reply_keyboard import ReplyKeyboardRemove
from keyboards.default.after_start import after_start_kb
from loader import dp
@dp.message_handler(CommandStart())
async def bot_start(messa... | 36.785714 | 107 | 0.846602 |
1ab53055457de4506fd53fe5dcdf683f8b4b386d | 10,602 | py | Python | examples/Deeplab/experiments/deeplabv2.naked.fpn.learnable.sobel.channelwise.bilinear.py | MarcWong/tensorpack | 51ab279480dc1e3ffdc07884a9e8149dea9651e9 | [
"Apache-2.0"
] | 5 | 2018-05-04T02:04:15.000Z | 2020-04-02T05:38:48.000Z | examples/Deeplab/experiments/deeplabv2.naked.fpn.learnable.sobel.channelwise.bilinear.py | MarcWong/tensorpack | 51ab279480dc1e3ffdc07884a9e8149dea9651e9 | [
"Apache-2.0"
] | null | null | null | examples/Deeplab/experiments/deeplabv2.naked.fpn.learnable.sobel.channelwise.bilinear.py | MarcWong/tensorpack | 51ab279480dc1e3ffdc07884a9e8149dea9651e9 | [
"Apache-2.0"
] | 2 | 2018-04-23T13:43:10.000Z | 2019-10-30T09:56:54.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# File: deeplabv2.py
# Author: Tao Hu <taohu620@gmail.com>
import cv2
import tensorflow as tf
import argparse
from six.moves import zip
import os
import numpy as np
os.environ['TENSORPACK_TRAIN_API'] = 'v2' # will become default soon
from tensorpack import *
from tensor... | 36.8125 | 142 | 0.627523 |
ce4ea38224d0505ab8b7720eb4ced55d178a1768 | 72 | py | Python | follow/urls.py | Han-Joon-Hyeok/booklog | b1ce850d23242a53e8651543cfb9fe870b92b21f | [
"MIT"
] | 4 | 2021-06-30T07:14:22.000Z | 2021-08-16T04:52:35.000Z | follow/urls.py | Han-Joon-Hyeok/booklog | b1ce850d23242a53e8651543cfb9fe870b92b21f | [
"MIT"
] | null | null | null | follow/urls.py | Han-Joon-Hyeok/booklog | b1ce850d23242a53e8651543cfb9fe870b92b21f | [
"MIT"
] | 4 | 2021-06-27T04:26:21.000Z | 2021-08-13T13:00:56.000Z | from django.urls import path
from . import views
urlpatterns = [
] | 12 | 28 | 0.694444 |
2004cea83e88ef382295623b0dac17af2bc90e5c | 2,167 | py | Python | Configuration/DataProcessing/test/RunRepack.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Configuration/DataProcessing/test/RunRepack.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Configuration/DataProcessing/test/RunRepack.py | Purva-Chaudhari/cmssw | 32e5cbfe54c4d809d60022586cf200b7c3020bcf | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | #!/usr/bin/env python3
"""
_RunRepack_
Test/Debugging harness for the repack configuration builder
"""
from __future__ import print_function
import sys
import getopt
from Configuration.DataProcessing.Repack import repackProcess
class RunRepack:
def __init__(self):
self.selectEvents = None
sel... | 24.625 | 81 | 0.602677 |
c1f1c1237e48c1ccecfd0da80c53e83804d660da | 3,304 | py | Python | shop/orders/models.py | Anych/mila-iris | cbb16fc9ab2b85232e4c05446697fc82b78bc8e4 | [
"MIT"
] | null | null | null | shop/orders/models.py | Anych/mila-iris | cbb16fc9ab2b85232e4c05446697fc82b78bc8e4 | [
"MIT"
] | null | null | null | shop/orders/models.py | Anych/mila-iris | cbb16fc9ab2b85232e4c05446697fc82b78bc8e4 | [
"MIT"
] | null | null | null | from django.db import models
from django.urls import reverse
from accounts.models import Account
from products.models import Product, Size
class Order(models.Model):
"""Model for order."""
class Meta:
verbose_name = 'Заказ'
verbose_name_plural = 'Заказы'
STATUS = (
('Новый', 'Нов... | 45.888889 | 104 | 0.72609 |
f62971b52caa7cf64bb0fa1e58fd9bd467269d9c | 38 | py | Python | eddrit/const.py | corenting/eddrit | 640db842d48afa8f8b379f7412c90ad9216312df | [
"MIT"
] | 9 | 2020-10-16T20:29:05.000Z | 2022-03-06T08:07:06.000Z | eddrit/const.py | corenting/eddrit | 640db842d48afa8f8b379f7412c90ad9216312df | [
"MIT"
] | 7 | 2020-10-16T16:34:57.000Z | 2022-01-19T17:30:29.000Z | eddrit/const.py | corenting/eddrit | 640db842d48afa8f8b379f7412c90ad9216312df | [
"MIT"
] | null | null | null | IMAGE_HOSTING_DOMAINS = ["imgur.com"]
| 19 | 37 | 0.763158 |
0f7dc7fdb6694b4a902bc76b6762ba2556b4d74a | 182 | py | Python | lantern/grids/grid_phosphor.py | timkpaine/lantern | 945a26e05a7f1d7b09fde8a4da0daf6220f163f3 | [
"Apache-2.0"
] | 306 | 2017-09-28T02:30:46.000Z | 2022-03-08T10:56:58.000Z | lantern/grids/grid_phosphor.py | timkpaine/lantern | 945a26e05a7f1d7b09fde8a4da0daf6220f163f3 | [
"Apache-2.0"
] | 201 | 2017-09-27T17:49:16.000Z | 2021-06-09T00:48:55.000Z | lantern/grids/grid_phosphor.py | timkpaine/lantern | 945a26e05a7f1d7b09fde8a4da0daf6220f163f3 | [
"Apache-2.0"
] | 26 | 2017-10-08T21:12:27.000Z | 2022-02-01T08:40:32.000Z |
def phosphor_grid(data, **kwargs):
from IPython.display import display
bundle = {}
bundle['text/csv'] = data.reset_index().to_csv()
return display(bundle, raw=True)
| 26 | 52 | 0.675824 |
b994c591f532d9129f9b22751e913af4f72aa7e1 | 6,413 | py | Python | perform/visualization/probe_plot.py | wayneisaacuy/perform | 333198b538eded5c498b236cf9d598b948dbb1e3 | [
"MIT"
] | null | null | null | perform/visualization/probe_plot.py | wayneisaacuy/perform | 333198b538eded5c498b236cf9d598b948dbb1e3 | [
"MIT"
] | null | null | null | perform/visualization/probe_plot.py | wayneisaacuy/perform | 333198b538eded5c498b236cf9d598b948dbb1e3 | [
"MIT"
] | null | null | null | import os
import matplotlib.pyplot as plt
import numpy as np
from perform.visualization.visualization import Visualization
# TODO: maybe easier to make probe/residual plots under some PointPlot class
# TODO: move some of the init input arguments used for assertions outside
class ProbePlot(Visualization):
"""Cl... | 40.333333 | 115 | 0.643848 |
adf82a1ec6b819c64f1e4ca1a51923c2af26e092 | 1,002 | py | Python | Distance/getDistanceFromLatLonInKm.py | hugolouzada/UltimateMetroDistanceSP | a5c042cb53b7b0517c36ad043aee7281cb208d2d | [
"Apache-2.0"
] | null | null | null | Distance/getDistanceFromLatLonInKm.py | hugolouzada/UltimateMetroDistanceSP | a5c042cb53b7b0517c36ad043aee7281cb208d2d | [
"Apache-2.0"
] | null | null | null | Distance/getDistanceFromLatLonInKm.py | hugolouzada/UltimateMetroDistanceSP | a5c042cb53b7b0517c36ad043aee7281cb208d2d | [
"Apache-2.0"
] | null | null | null | from math import sin, cos, atan2, sqrt
from Distance.Coordinate import Coordinate
def getDistanceFromLatLonInKm(coordinate1: Coordinate, coordinate2: Coordinate):
"""
Calculates the distance between two Coordinates in km
Earth's radius from https://rechneronline.de/earth-radius/
Haversine formula fr... | 27.081081 | 119 | 0.691617 |
5c380c9e06f2a7949589bd3eb955255697e6e478 | 2,298 | py | Python | scripts/ode_scripts.py | yahmskeano/CAAM37830-Personal | 53c9ce3f24bdc6c730552d4125494d2b2bb417d1 | [
"MIT"
] | null | null | null | scripts/ode_scripts.py | yahmskeano/CAAM37830-Personal | 53c9ce3f24bdc6c730552d4125494d2b2bb417d1 | [
"MIT"
] | null | null | null | scripts/ode_scripts.py | yahmskeano/CAAM37830-Personal | 53c9ce3f24bdc6c730552d4125494d2b2bb417d1 | [
"MIT"
] | 1 | 2021-08-09T16:36:56.000Z | 2021-08-09T16:36:56.000Z | import sys
sys.path.append("../")
from sir.ode import *
# init population
N = 1_000_000
I = 5
R = 0
S = N - I - R
# init the covid class
ode_SIR = SIR(b=3, k=0.01, S=S, I=I, R=R)
# solve that class
ode_SIR.solve(t_bound=365)
# plot the numerical solution
ode_SIR.plot('../doc/checkpoint/figures/ode1.png')
# s, i, r of... | 31.479452 | 94 | 0.710183 |
dba72d12b01dfb3568db58917900b8b8181d80f3 | 7,340 | py | Python | mars/tensor/expressions/linalg/svd.py | cclauss/mars | 85decf86f6489ab1acaee6222731d66fcecd2718 | [
"Apache-2.0"
] | 1 | 2018-12-26T08:37:04.000Z | 2018-12-26T08:37:04.000Z | mars/tensor/expressions/linalg/svd.py | cclauss/mars | 85decf86f6489ab1acaee6222731d66fcecd2718 | [
"Apache-2.0"
] | null | null | null | mars/tensor/expressions/linalg/svd.py | cclauss/mars | 85decf86f6489ab1acaee6222731d66fcecd2718 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# 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-... | 40.32967 | 97 | 0.559128 |
a9ff521e7636814ac735b5ba6635f08391bb75a9 | 3,401 | py | Python | androidautotest/__main__.py | 15045120/AndroidTest | c3db39d05582c4d1c722ca2c055b1317ee6469b4 | [
"MIT"
] | 3 | 2019-12-23T13:47:38.000Z | 2019-12-24T15:57:35.000Z | androidautotest/__main__.py | 15045120/AndroidTest | c3db39d05582c4d1c722ca2c055b1317ee6469b4 | [
"MIT"
] | 2 | 2019-12-18T13:23:51.000Z | 2019-12-18T13:23:56.000Z | androidautotest/__main__.py | 15045120/AndroidTest | c3db39d05582c4d1c722ca2c055b1317ee6469b4 | [
"MIT"
] | null | null | null | import argparse
from .__init__ import MODULE,VERSION
from .tool import LINESEQ,Command
from .client import execute,create,install,startasm
def print_version():
print('androidautotest {}{}'.format(VERSION, LINESEQ))
def print_run_usage():
print('usage(run options): androidautotest --casedir <CASEDIR> --dev... | 32.390476 | 266 | 0.629521 |
52b08359d39b33797b03e98174b6448102201eb7 | 10,574 | py | Python | trio/tests/test_subprocess.py | JefffHofffman/trio | d8631117ce4ca19017bbe3850704dd5ce6cfaeb1 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/tests/test_subprocess.py | JefffHofffman/trio | d8631117ce4ca19017bbe3850704dd5ce6cfaeb1 | [
"Apache-2.0",
"MIT"
] | null | null | null | trio/tests/test_subprocess.py | JefffHofffman/trio | d8631117ce4ca19017bbe3850704dd5ce6cfaeb1 | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import signal
import subprocess
import sys
import pytest
from .. import (
_core, move_on_after, fail_after, sleep, sleep_forever, Process
)
from .._core.tests.tutil import slow
from ..testing import wait_all_tasks_blocked
posix = os.name == "posix"
if posix:
from signal import SIGKILL, SIGTERM, SIGI... | 33.251572 | 77 | 0.595612 |
ead25d247bb379f68596dcd52a6b3cc91a124456 | 22,113 | py | Python | Misc_and_Old/toil_merkel_report.py | dgaston/ddbio-variantstore | e1f33f18ff8fc2f51d1f215212e4a368eb7505e7 | [
"MIT"
] | 1 | 2021-06-28T01:27:28.000Z | 2021-06-28T01:27:28.000Z | Misc_and_Old/toil_merkel_report.py | dgaston/ddbio-variantstore | e1f33f18ff8fc2f51d1f215212e4a368eb7505e7 | [
"MIT"
] | null | null | null | Misc_and_Old/toil_merkel_report.py | dgaston/ddbio-variantstore | e1f33f18ff8fc2f51d1f215212e4a368eb7505e7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
import xlwt
import utils
import getpass
import argparse
import numpy as np
from toil.job import Job
from ddb import configuration
from ddb_ngsflow import pipeline
from variantstore import Variant
from collections import defaultdict
from variantstore import SampleVariant
from coverage... | 48.071739 | 120 | 0.557003 |
e29f3116fc74c1bbafeee96c0207030239db58a4 | 6,939 | py | Python | unit_tests/glhe/input_processor/test_plant_loop_component_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 2 | 2018-11-06T08:04:04.000Z | 2020-10-09T14:52:36.000Z | unit_tests/glhe/input_processor/test_plant_loop_component_factory.py | stianchris/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 68 | 2018-03-27T01:43:22.000Z | 2019-09-09T12:05:44.000Z | unit_tests/glhe/input_processor/test_plant_loop_component_factory.py | mitchute/GLHE | 80c3eecca81ffd50d5077f87027c9441292452f5 | [
"MIT"
] | 4 | 2018-05-24T03:02:44.000Z | 2021-08-16T13:54:09.000Z | import os
import tempfile
import unittest
from glhe.input_processor.input_processor import InputProcessor
from glhe.input_processor.plant_loop_component_factory import make_plant_loop_component
from glhe.output_processor.output_processor import OutputProcessor
from glhe.profiles.constant_flow import ConstantFlow
from ... | 36.329843 | 116 | 0.416342 |
52f75e2cf1a3bf61341c38f0c8fd09c086e065ba | 8,806 | py | Python | Athos/Networks/DenseNet/densenet.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | 221 | 2019-05-16T16:42:49.000Z | 2022-03-29T14:05:31.000Z | Athos/Networks/DenseNet/densenet.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | 63 | 2019-07-02T11:50:15.000Z | 2022-03-31T08:14:02.000Z | Athos/Networks/DenseNet/densenet.py | krantikiran68/EzPC | cacf10f31cddf55e4a06908fcfc64f8d7d0f85bd | [
"MIT"
] | 67 | 2019-08-30T08:44:47.000Z | 2022-03-23T08:08:33.000Z | # Copyright 2016 pudae. 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 agreed to ... | 28.224359 | 85 | 0.597661 |
b7503416aa58622714f6dbdfd950d0c66daa24a2 | 25 | py | Python | data/studio21_generated/introductory/3276/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3276/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3276/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def missing(nums, str):
| 12.5 | 23 | 0.68 |
483a83be43f98cdaf564eff6eb1c00ffdd2209cf | 1,408 | py | Python | pygs/graphserver/compiler/tools.py | ninowalker/graphserver | dc08070bc6e295986633cf510ca46a2f8d451b92 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-01-02T22:09:07.000Z | 2016-05-09T04:48:13.000Z | pygs/graphserver/compiler/tools.py | wlach/graphserver | 52dac7487673aa5f28bfe2342dbe93ce03880f7a | [
"BSD-3-Clause-Clear"
] | null | null | null | pygs/graphserver/compiler/tools.py | wlach/graphserver | 52dac7487673aa5f28bfe2342dbe93ce03880f7a | [
"BSD-3-Clause-Clear"
] | null | null | null | from graphserver.core import ServiceCalendar
import pytz
from datetime import timedelta, datetime, time
from graphserver.util import TimeHelpers
def iter_dates(startdate, enddate):
currdate = startdate
while currdate <= enddate:
yield currdate
currdate += timedelta(1)
def service_calendar_... | 36.102564 | 141 | 0.723722 |
ca0b0bfc8140b2ee6d07f363b7e0b0d8720ccb35 | 15,717 | py | Python | lane_detector.py | amedveczki/CarND-Advanced-Lane-Lines | f9dab1b82bc4f570a9bb880021175cec78597e4f | [
"MIT"
] | null | null | null | lane_detector.py | amedveczki/CarND-Advanced-Lane-Lines | f9dab1b82bc4f570a9bb880021175cec78597e4f | [
"MIT"
] | null | null | null | lane_detector.py | amedveczki/CarND-Advanced-Lane-Lines | f9dab1b82bc4f570a9bb880021175cec78597e4f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import cv2
import matplotlib.pyplot as plt
import collections
class lane_detector:
STATE_INIT = 0 # first start or we are completely lost
STATE_OK = 1 # continue using polynomial+epsilon for searching lane instead of boxes
STATE_UNCERTAIN = 2 # until MAX_UNCERTAI... | 47.056886 | 199 | 0.633391 |
00f611e0f25350306775531c30edc76797c4811e | 358 | py | Python | app.py | nunolima/ci-app | e6f1e922909986d08c92f704a43f892ade7d5095 | [
"MIT"
] | null | null | null | app.py | nunolima/ci-app | e6f1e922909986d08c92f704a43f892ade7d5095 | [
"MIT"
] | null | null | null | app.py | nunolima/ci-app | e6f1e922909986d08c92f704a43f892ade7d5095 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def index():
return "Index!"
@app.route("/hello")
def hello():
return "Hello World! X +++++++++"
@app.route("/members")
def members():
return "Members --X--"
@app.route("/members/<string:name>/")
def getMember(name):
return name
if ... | 16.272727 | 37 | 0.600559 |
258c658d43cf2762f5fa33ddc79906ab8c9555e0 | 1,157 | py | Python | CybORG/CybORG/Shared/Actions/ShellActionsFolder/AccountManipulationFolder/RemoveUserFromGroupWindows.py | rafvasq/cage-challenge-1 | 95affdfa38afc1124f1a1a09c92fbc0ed5b96318 | [
"MIT"
] | 18 | 2021-08-20T15:07:55.000Z | 2022-03-11T12:05:15.000Z | CybORG/CybORG/Shared/Actions/ShellActionsFolder/AccountManipulationFolder/RemoveUserFromGroupWindows.py | rafvasq/cage-challenge-1 | 95affdfa38afc1124f1a1a09c92fbc0ed5b96318 | [
"MIT"
] | 7 | 2021-11-09T06:46:58.000Z | 2022-03-31T12:35:06.000Z | CybORG/CybORG/Shared/Actions/ShellActionsFolder/AccountManipulationFolder/RemoveUserFromGroupWindows.py | rafvasq/cage-challenge-1 | 95affdfa38afc1124f1a1a09c92fbc0ed5b96318 | [
"MIT"
] | 13 | 2021-08-17T00:26:31.000Z | 2022-03-29T20:06:45.000Z | # Copyright DST Group. Licensed under the MIT license.
from CybORG.Shared.Actions.ShellActionsFolder.AccountManipulationFolder.AccountManipulation import AccountManipulation
from CybORG.Shared.Enums import OperatingSystemType
from CybORG.Shared.Observation import Observation
class RemoveUserFromGroupWindows(AccountMa... | 38.566667 | 118 | 0.67675 |
d2d35ed93957a1de1b34e91cc309ce3d9f229d03 | 4,480 | py | Python | perceptron_ch2.py | amitmeel/Machine-Learning-with-PyTorch-and-Scikit-Learn-Book | 2506730cf36f37f3bc1b611e8789bf88610db9d5 | [
"MIT"
] | null | null | null | perceptron_ch2.py | amitmeel/Machine-Learning-with-PyTorch-and-Scikit-Learn-Book | 2506730cf36f37f3bc1b611e8789bf88610db9d5 | [
"MIT"
] | null | null | null | perceptron_ch2.py | amitmeel/Machine-Learning-with-PyTorch-and-Scikit-Learn-Book | 2506730cf36f37f3bc1b611e8789bf88610db9d5 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.colors import ListedColormap
# # Implementing a perceptron learning algorithm in Python
# ## An object-oriented perceptron API
class Perceptron:
"""Perceptron classifier.
Parameters
------------
eta : float
... | 31.77305 | 89 | 0.578571 |
714631a53b815c5e60448cc560ee6ab26dfc7cb4 | 3,910 | py | Python | fuji_server/evaluators/fair_evaluator_related_resources.py | ignpelloz/fuji | 5e6fe8333c1706d1b628a84108bff7a97fdf11a7 | [
"MIT"
] | 25 | 2020-09-22T08:28:45.000Z | 2022-02-23T07:10:28.000Z | fuji_server/evaluators/fair_evaluator_related_resources.py | ignpelloz/fuji | 5e6fe8333c1706d1b628a84108bff7a97fdf11a7 | [
"MIT"
] | 188 | 2020-05-11T08:54:59.000Z | 2022-03-31T12:28:15.000Z | fuji_server/evaluators/fair_evaluator_related_resources.py | ignpelloz/fuji | 5e6fe8333c1706d1b628a84108bff7a97fdf11a7 | [
"MIT"
] | 20 | 2020-05-04T13:56:26.000Z | 2022-03-02T13:39:04.000Z | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2020 PANGAEA (https://www.pangaea.de/)
#
# 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 limita... | 46.547619 | 114 | 0.675448 |
6c8713102ff400da3ee1106c003e277d6155bc7f | 841 | py | Python | eval_secrets.py | TremoloSecurity/OpenUnisonS2IDockerRHEL | 83d95be6f4f12b24a80d74ae6a09791ba4bd3aa9 | [
"Apache-2.0"
] | null | null | null | eval_secrets.py | TremoloSecurity/OpenUnisonS2IDockerRHEL | 83d95be6f4f12b24a80d74ae6a09791ba4bd3aa9 | [
"Apache-2.0"
] | null | null | null | eval_secrets.py | TremoloSecurity/OpenUnisonS2IDockerRHEL | 83d95be6f4f12b24a80d74ae6a09791ba4bd3aa9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
env_vars = {}
content = ''
with open(sys.argv[1]) as f:
for line in f:
line = line[0:-1]
name = line[0:line.find('=')]
val = line[line.find('=') + 1:]
env_vars[name] = val
with open(sys.argv[2]) as f:
content = f.read()
#if not specified, we don'... | 21.025 | 80 | 0.604043 |
b474d1c11b625ac36fbe0b0b097ecedbae64173e | 1,146 | py | Python | gr-carrier48/python/__init__.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | 2 | 2021-11-30T02:35:48.000Z | 2021-11-30T02:53:02.000Z | gr-carrier48/python/__init__.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | null | null | null | gr-carrier48/python/__init__.py | xueyuecanfeng/C-LQI | f489c6447428d6affb2159e9d8f895caab2868c7 | [
"BSD-2-Clause"
] | null | null | null | #
# Copyright 2008,2009 Free Software Foundation, Inc.
#
# This application is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This application is di... | 32.742857 | 74 | 0.768761 |
0b778b42a1cc2866b6112aa9596e15f7b5bd9f4b | 359 | py | Python | TP_ALGO_2/saisie_liste.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | TP_ALGO_2/saisie_liste.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | TP_ALGO_2/saisie_liste.py | PierreLeGuen/ALGO_S5 | 9067e887d14fe997c6944292a0cff23ceda47b6e | [
"MIT"
] | null | null | null | def saisie_liste():
cest_un_nombre=True
liste_nombre=[]
while cest_un_nombre==True:
entree_liste=input("Entrer un nombre : ")
if entree_liste=="":
print("Ce n'est pas un nombre")
cest_un_nombre=False
print(liste_nombre)
else:
liste_nomb... | 27.615385 | 49 | 0.604457 |
39abe7ee34a3465d0107535656aebc779accfa41 | 3,347 | py | Python | common/data_refinery_common/models/__init__.py | AlexsLemonade/refinebio | 52f44947f902adedaccf270d5f9dbd56ab47e40a | [
"BSD-3-Clause"
] | 106 | 2018-03-05T16:24:47.000Z | 2022-03-19T19:12:25.000Z | common/data_refinery_common/models/__init__.py | AlexsLemonade/refinebio | 52f44947f902adedaccf270d5f9dbd56ab47e40a | [
"BSD-3-Clause"
] | 1,494 | 2018-02-27T17:02:21.000Z | 2022-03-24T15:10:30.000Z | common/data_refinery_common/models/__init__.py | AlexsLemonade/refinebio | 52f44947f902adedaccf270d5f9dbd56ab47e40a | [
"BSD-3-Clause"
] | 15 | 2019-02-03T01:34:59.000Z | 2022-03-29T01:59:13.000Z | from data_refinery_common.models.api_token import APIToken # noqa
from data_refinery_common.models.associations.compendium_result_organism_association import ( # noqa
CompendiumResultOrganismAssociation,
)
from data_refinery_common.models.associations.downloaderjob_originalfile_association import ( # noqa
Do... | 54.868852 | 101 | 0.856588 |
fa580cf6e6de3f697ee896b551ee8155d1078a87 | 11,762 | py | Python | setup.py | Whu-gaozhao/my_mmdetection3d | 798dcdb7a2358220bb588399f179cf8a98e55cf8 | [
"Apache-2.0"
] | null | null | null | setup.py | Whu-gaozhao/my_mmdetection3d | 798dcdb7a2358220bb588399f179cf8a98e55cf8 | [
"Apache-2.0"
] | null | null | null | setup.py | Whu-gaozhao/my_mmdetection3d | 798dcdb7a2358220bb588399f179cf8a98e55cf8 | [
"Apache-2.0"
] | 1 | 2022-03-03T08:32:06.000Z | 2022-03-03T08:32:06.000Z | from setuptools import find_packages, setup
import os
import platform
import shutil
import sys
import torch
import warnings
from os import path as osp
from torch.utils.cpp_extension import (BuildExtension, CppExtension,
CUDAExtension)
def readme():
with open('README.md', en... | 37.221519 | 125 | 0.529247 |
75f17e2a48d951edb8a8a95cd22d5b0498356f67 | 6,163 | py | Python | board/RFSoC2x2/packages/xrfclk/package/xrfclk/xrfclk.py | mariodruiz/RFSoC2x2-PYNQ | ab0b4f2fb2e5b2edb15a2ce89487883ecc7a73cb | [
"BSD-3-Clause"
] | null | null | null | board/RFSoC2x2/packages/xrfclk/package/xrfclk/xrfclk.py | mariodruiz/RFSoC2x2-PYNQ | ab0b4f2fb2e5b2edb15a2ce89487883ecc7a73cb | [
"BSD-3-Clause"
] | null | null | null | board/RFSoC2x2/packages/xrfclk/package/xrfclk/xrfclk.py | mariodruiz/RFSoC2x2-PYNQ | ab0b4f2fb2e5b2edb15a2ce89487883ecc7a73cb | [
"BSD-3-Clause"
] | 4 | 2021-03-02T15:35:28.000Z | 2021-09-04T05:55:40.000Z | # Copyright (c) 2021, Xilinx, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of ... | 29.347619 | 79 | 0.674996 |
3c754e36f92d4c45127fbf0cff6746f6d9671365 | 2,445 | py | Python | torch_glow/tests/functionality/blacklist_test.py | YonginKwon/glow | 7d316d028e1792534416755bf80af422adccdaa9 | [
"Apache-2.0"
] | 2 | 2020-03-23T21:04:00.000Z | 2020-04-02T22:49:49.000Z | torch_glow/tests/functionality/blacklist_test.py | YonginKwon/glow | 7d316d028e1792534416755bf80af422adccdaa9 | [
"Apache-2.0"
] | null | null | null | torch_glow/tests/functionality/blacklist_test.py | YonginKwon/glow | 7d316d028e1792534416755bf80af422adccdaa9 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import torch
from tests.utils import GLOW_NODE_NAME, SUBGRAPH_ATTR
import torch_glow
import unittest
class TestBlackList(unittest.TestCase):
def test_op_blacklist(self):
"""Test Glow fuser op kind blacklisting mechanism."... | 29.457831 | 82 | 0.537423 |
a11267bc240c1ef0c8ec6e0e89bc7cd2ac5574b1 | 1,804 | py | Python | tests/test_precise_guess_loss.py | zarebulic/neural-semigroup-experiment | c554acb17d264ba810009f8b86c35ee9f8c4d1f4 | [
"Apache-2.0"
] | 6 | 2020-04-05T23:24:54.000Z | 2021-11-15T11:17:09.000Z | tests/test_precise_guess_loss.py | zarebulic/neural-semigroup-experiment | c554acb17d264ba810009f8b86c35ee9f8c4d1f4 | [
"Apache-2.0"
] | 23 | 2020-03-15T09:09:54.000Z | 2022-03-29T22:32:23.000Z | tests/test_precise_guess_loss.py | zarebulic/neural-semigroup-experiment | c554acb17d264ba810009f8b86c35ee9f8c4d1f4 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019-2021 Boris Shminke
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 t... | 32.8 | 77 | 0.648004 |
071a89ccd973a450cb5d4ffce75e766d476d6bd4 | 2,338 | py | Python | actions/custom_attr_assign_or_create.py | lingfish/stackstorm-vsphere | 49199f5ebdc05b70b7504962e104642b0c30ba30 | [
"Apache-2.0"
] | null | null | null | actions/custom_attr_assign_or_create.py | lingfish/stackstorm-vsphere | 49199f5ebdc05b70b7504962e104642b0c30ba30 | [
"Apache-2.0"
] | 2 | 2019-03-25T18:03:02.000Z | 2019-03-26T13:13:59.000Z | actions/custom_attr_assign_or_create.py | lingfish/stackstorm-vsphere | 49199f5ebdc05b70b7504962e104642b0c30ba30 | [
"Apache-2.0"
] | 1 | 2021-03-05T10:12:21.000Z | 2021-03-05T10:12:21.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 44.113208 | 93 | 0.718135 |
2c34a0a8eb6bf8e894c181f66ed7607e5acecb2a | 8,305 | py | Python | sympy/parsing/tests/test_latex.py | Knewton/sympy | a2ce003faaa504d3ad7aa57bbc53d5c1b37812bb | [
"BSD-3-Clause"
] | null | null | null | sympy/parsing/tests/test_latex.py | Knewton/sympy | a2ce003faaa504d3ad7aa57bbc53d5c1b37812bb | [
"BSD-3-Clause"
] | null | null | null | sympy/parsing/tests/test_latex.py | Knewton/sympy | a2ce003faaa504d3ad7aa57bbc53d5c1b37812bb | [
"BSD-3-Clause"
] | null | null | null | from sympy.testing.pytest import raises, XFAIL
from sympy.external import import_module
from sympy import (
Symbol, Mul, Add, Eq, Abs, sin, asin, cos, Pow,
csc, csch, sec, Limit, oo, Derivative, Integral, factorial,
sqrt, root, StrictLessThan, LessThan, StrictGreaterThan,
GreaterThan, Sum, Product, E, ... | 30.759259 | 72 | 0.483564 |
d1609cc4bdd5e128b738b2d83a9bb141c7cdf705 | 9,076 | py | Python | learning/Ruijie/handwriting_recognization/main.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 6 | 2018-05-26T02:47:42.000Z | 2019-12-04T20:06:50.000Z | learning/Ruijie/handwriting_recognization/main.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 25 | 2017-09-19T20:37:55.000Z | 2019-04-26T21:50:46.000Z | learning/Ruijie/handwriting_recognization/main.py | ricardodxu/AutoGrading | 1469fe63a546b00bad9fda3af7a5fca499dce789 | [
"MIT"
] | 9 | 2017-09-16T05:16:00.000Z | 2021-07-17T03:17:47.000Z | # -*- coding: utf-8 -*-
import cv2
import numpy as np
# import matplotlib.pyplot as plt
from PIL import Image
from difflib import SequenceMatcher
from PIL import *
from PIL import ImageEnhance
import time
from pytesseract import image_to_string, image_to_boxes
import os
def getNameArea(imageFolderPath):
"""
... | 34.249057 | 137 | 0.58539 |
00f2e98613f19cf6896f30a6bc497fc8764a582c | 964 | py | Python | zhihu_user_info_spider/zhihu_user_info_spider/scheduler/go.py | Yourrrrlove/spider_collection | 3b9f3cc8badc01e3f3e3035c14139d4d5fd1382f | [
"MIT"
] | 178 | 2021-10-29T18:42:04.000Z | 2022-03-30T16:44:37.000Z | zhihu_user_info_spider/zhihu_user_info_spider/scheduler/go.py | xzmdc/spider_collection | af2d622a9cf9d859ef6f2a48afea346110995be6 | [
"MIT"
] | 20 | 2021-11-09T15:25:55.000Z | 2022-03-25T05:23:39.000Z | zhihu_user_info_spider/zhihu_user_info_spider/scheduler/go.py | xzmdc/spider_collection | af2d622a9cf9d859ef6f2a48afea346110995be6 | [
"MIT"
] | 40 | 2021-11-02T01:30:01.000Z | 2022-03-19T12:15:24.000Z | import os
import sys
rootPath = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(rootPath)
from zhihu_user_info_spider.scheduler.QuestionScheduler import QuestionScheduler
from zhihu_user_info_spider.scheduler.UserScheduler import UserScheduler
question_sche = QuestionSched... | 23.512195 | 87 | 0.676349 |
9a2c71d8dcdcf3105873c51bcc247465c0a421f4 | 1,251 | py | Python | speech_recognition/cmusphinx-code/sphinxtrain/python/cmusphinx/lattice_error.py | Ohara124c41/TUB-MSc_Thesis | b1a2d5dc9c0c589a39019126cf7a5cc775baa288 | [
"MIT"
] | 1 | 2016-12-05T01:29:52.000Z | 2016-12-05T01:29:52.000Z | speech_recognition/cmusphinx-code/sphinxtrain/python/cmusphinx/lattice_error.py | Ohara124c41/TUB-MSc_Thesis | b1a2d5dc9c0c589a39019126cf7a5cc775baa288 | [
"MIT"
] | null | null | null | speech_recognition/cmusphinx-code/sphinxtrain/python/cmusphinx/lattice_error.py | Ohara124c41/TUB-MSc_Thesis | b1a2d5dc9c0c589a39019126cf7a5cc775baa288 | [
"MIT"
] | 1 | 2020-04-24T17:26:59.000Z | 2020-04-24T17:26:59.000Z | #!/usr/bin/env python
import sys
import os
import lattice
from itertools import izip
ctl, ref, latdir = sys.argv[1:4]
prune = 0
if len(sys.argv) > 4:
prune = float(sys.argv[4])
ctl = open(ctl)
ref = open(ref)
wordcount = 0
errcount = 0
for c,r in izip(ctl, ref):
c = c.strip()
r = r.split()
del r[-1]
... | 26.0625 | 68 | 0.533173 |
2a6fdb9bedab1a236e7efba07b48d19bc12d4898 | 147 | py | Python | version.py | sayRequil/backBone | ca0da396f78260feaf41daae0c7aa7a685096c2d | [
"MIT"
] | 1 | 2017-07-11T09:36:26.000Z | 2017-07-11T09:36:26.000Z | version.py | sayRequil/backBone | ca0da396f78260feaf41daae0c7aa7a685096c2d | [
"MIT"
] | null | null | null | version.py | sayRequil/backBone | ca0da396f78260feaf41daae0c7aa7a685096c2d | [
"MIT"
] | null | null | null | def vers():
major = "1"
minor = "0"
release = "0"
pre = "alpha"
version = ''.join([major,".",minor,".",release,":",pre])
return version | 21 | 58 | 0.537415 |
e40e89222a205be019476a38e08c6e6cbfe4c9a8 | 1,186 | py | Python | class_lib/solids/ellipsoid.py | Tomas-Tamantini/py-cgi | 177930da87aaac721e1294211aa291b11e156ee8 | [
"MIT"
] | null | null | null | class_lib/solids/ellipsoid.py | Tomas-Tamantini/py-cgi | 177930da87aaac721e1294211aa291b11e156ee8 | [
"MIT"
] | null | null | null | class_lib/solids/ellipsoid.py | Tomas-Tamantini/py-cgi | 177930da87aaac721e1294211aa291b11e156ee8 | [
"MIT"
] | null | null | null | from basics import Vector
from class_lib.solid_objects import AbstractObject
from class_lib.useful_functions import min_pos_root
class Ellipsoid(AbstractObject):
def __init__(self, coordinate_system, material, width=1, length=1, height=1):
super().__init__(coordinate_system)
self.material = mater... | 39.533333 | 111 | 0.602867 |
6aaaaae573e4ce297592d3a5226a30811e940a6b | 3,627 | py | Python | tests/unit/modules/test_twilio_notify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_twilio_notify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_twilio_notify.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import TestCase, skipIf
from tests.support.mock import (... | 29.729508 | 80 | 0.483595 |
293f7ec8cd1669d346ac6634f935746181cfe295 | 931 | py | Python | setup.py | ArpitFalcon/clean-my-logs | ff51d06a76821d61a6c67154bb8f0315fddc10da | [
"MIT"
] | 1 | 2021-08-06T07:16:59.000Z | 2021-08-06T07:16:59.000Z | setup.py | ArpitFalcon/clean-my-logs | ff51d06a76821d61a6c67154bb8f0315fddc10da | [
"MIT"
] | null | null | null | setup.py | ArpitFalcon/clean-my-logs | ff51d06a76821d61a6c67154bb8f0315fddc10da | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open("README.md", "r", encoding='utf-8') as f:
readme = f.read()
with open("VERSION.txt", "r") as f:
version_num = f.read()
setup (
name="cleanlogs",
version = version_num.strip(),
author="Arpit",
author_email="arpitfalcon1@gmail.com",
desc... | 27.382353 | 58 | 0.635875 |
80e5637e4f67a116fbfb84f8cb9eb15d1d947621 | 118 | py | Python | src/telfit/__init__.py | Kamuish/Telluric-Fitter | 9a7dc7cd3c84929064a49293d494592326c18731 | [
"MIT"
] | 14 | 2015-02-26T20:56:42.000Z | 2021-09-21T16:09:49.000Z | src/telfit/__init__.py | gully/Telluric-Fitter | a6988feb6340e73b0fca302f17da1c15dd7de81c | [
"MIT"
] | 35 | 2015-02-26T23:00:28.000Z | 2022-03-09T20:55:56.000Z | src/telfit/__init__.py | gully/Telluric-Fitter | a6988feb6340e73b0fca302f17da1c15dd7de81c | [
"MIT"
] | 11 | 2018-05-30T21:03:48.000Z | 2021-12-04T23:27:42.000Z | from TelluricFitter import TelluricFitter
from MakeModel import Modeler
import DataStructures
import FittingUtilities
| 23.6 | 41 | 0.898305 |
57f941737ef5ca6b3c2bf48ac3d88b50cf670b89 | 4,778 | py | Python | src/NodeGenerators/distributeNodesGeneric.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 22 | 2018-07-31T21:38:22.000Z | 2020-06-29T08:58:33.000Z | src/NodeGenerators/distributeNodesGeneric.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 41 | 2020-09-28T23:14:27.000Z | 2022-03-28T17:01:33.000Z | src/NodeGenerators/distributeNodesGeneric.py | jmikeowen/Spheral | 3e1082a7aefd6b328bd3ae24ca1a477108cfc3c4 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 7 | 2019-12-01T07:00:06.000Z | 2020-09-15T21:12:39.000Z | import Spheral
import mpi
#-------------------------------------------------------------------------------
# Domain decompose using some specified domain partitioner (generic method).
#-------------------------------------------------------------------------------
def distributeNodesGeneric(listOfNodeTuples,
... | 43.436364 | 157 | 0.631436 |
252658c29bff94735fd4fd59ceaa1139cb846d50 | 16,982 | py | Python | pbr-1.0.1-py2.7.egg/pbr/tests/test_setup.py | umkcdcrg01/ryu_openflow | 37ed5b88f7d119344e07c95314a7450235c037a8 | [
"Apache-2.0"
] | null | null | null | pbr-1.0.1-py2.7.egg/pbr/tests/test_setup.py | umkcdcrg01/ryu_openflow | 37ed5b88f7d119344e07c95314a7450235c037a8 | [
"Apache-2.0"
] | null | null | null | pbr-1.0.1-py2.7.egg/pbr/tests/test_setup.py | umkcdcrg01/ryu_openflow | 37ed5b88f7d119344e07c95314a7450235c037a8 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 OpenStack Foundation
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# 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:/... | 39.957647 | 78 | 0.627017 |
073f1ee70f94f5c4c9678cd4ec9c5a2d7b4f6541 | 4,836 | py | Python | client.py | Mitshah4343/WhatsChat | e7dcb514cbe608b81a74c99b2c14f6c0a2fd0f59 | [
"MIT"
] | null | null | null | client.py | Mitshah4343/WhatsChat | e7dcb514cbe608b81a74c99b2c14f6c0a2fd0f59 | [
"MIT"
] | null | null | null | client.py | Mitshah4343/WhatsChat | e7dcb514cbe608b81a74c99b2c14f6c0a2fd0f59 | [
"MIT"
] | null | null | null | import gtk, socket, select, thread, sys, helper, pango, gobject
from random import random
gobject.threads_init()
def send_msg(text):
serv.send(text)
def recv_msg(name):
global msg, flag, client_obj
while not flag:
socket_list = [sys.stdin, serv]
read_sockets,write_sockets,error_sockets = select.select(socket_... | 30.037267 | 170 | 0.679901 |
912a58e501e985f1b12e3fb19ba3dce9cb5b90cd | 1,256 | py | Python | daterange_chunker/datetuils.py | OdinTech3/daterange-chunker | 7d601bc10ba442750678f9ad1fe78b5f2ca061c5 | [
"MIT"
] | null | null | null | daterange_chunker/datetuils.py | OdinTech3/daterange-chunker | 7d601bc10ba442750678f9ad1fe78b5f2ca061c5 | [
"MIT"
] | null | null | null | daterange_chunker/datetuils.py | OdinTech3/daterange-chunker | 7d601bc10ba442750678f9ad1fe78b5f2ca061c5 | [
"MIT"
] | null | null | null | import datetime as dt
from typing import Generator, Tuple
Chunks = Generator[Tuple[dt.datetime, dt.datetime], None, None]
def calc_delta(startdate: dt.date, enddate: dt.date, no_of_ranges: int) -> dt.timedelta:
"""Find the delta between two dates based on a desired number of ranges"""
date_diff = enddate - s... | 26.723404 | 88 | 0.679936 |
c131e7d3e9e40eb36f2c8b2168fcffdfbcc60573 | 102 | py | Python | HACKERRANK_Numpy/zeroes&one.py | StefaniaSferragatta/ADM2020-HW1 | 8f85ac1c8dd4bff52c5c17987c9e96b209a93830 | [
"MIT"
] | null | null | null | HACKERRANK_Numpy/zeroes&one.py | StefaniaSferragatta/ADM2020-HW1 | 8f85ac1c8dd4bff52c5c17987c9e96b209a93830 | [
"MIT"
] | null | null | null | HACKERRANK_Numpy/zeroes&one.py | StefaniaSferragatta/ADM2020-HW1 | 8f85ac1c8dd4bff52c5c17987c9e96b209a93830 | [
"MIT"
] | null | null | null | import numpy
x = list(map(int, input().split()))
print(numpy.zeros(x, int))
print(numpy.ones(x, int)) | 20.4 | 35 | 0.676471 |
fa0fc4aac57f47746750a5dd21b45421a8be6df5 | 4,619 | py | Python | qa327_test/test_whitebox.py | lucidorangee/CISC-327-Course-Project | b86fe58e809f10a90134cbe33202c9e68a46d13b | [
"MIT"
] | null | null | null | qa327_test/test_whitebox.py | lucidorangee/CISC-327-Course-Project | b86fe58e809f10a90134cbe33202c9e68a46d13b | [
"MIT"
] | null | null | null | qa327_test/test_whitebox.py | lucidorangee/CISC-327-Course-Project | b86fe58e809f10a90134cbe33202c9e68a46d13b | [
"MIT"
] | null | null | null | import pytest
from seleniumbase import BaseCase
from qa327_test.conftest import base_url
from unittest.mock import patch
from qa327.models import db, User, TicketInfo
from werkzeug.security import generate_password_hash, check_password_hash
"""
This file defines unit tests for the frontend homepage.
The tests will on... | 42.376147 | 117 | 0.633037 |
adad3e63f11fe9681cc109cf5e7f6fbccb7d1e1f | 3,940 | py | Python | Buffer.py | harmeeksinghbedi/rl-learning | 5e8dbf9b0b1685702444836adb2c5e6ab118984f | [
"Apache-2.0"
] | null | null | null | Buffer.py | harmeeksinghbedi/rl-learning | 5e8dbf9b0b1685702444836adb2c5e6ab118984f | [
"Apache-2.0"
] | null | null | null | Buffer.py | harmeeksinghbedi/rl-learning | 5e8dbf9b0b1685702444836adb2c5e6ab118984f | [
"Apache-2.0"
] | null | null | null | import gym
import tensorflow as tf
from tensorflow.keras import layers
import numpy as np
import matplotlib.pyplot as plt
import Actor
import Critic
class Buffer:
def __init__(self, num_states, num_actions, buffer_capacity=100000, batch_size=64):
# Number of "experiences" to store at max
self.buffer_cap... | 45.287356 | 137 | 0.726396 |
39385d79c9d6e94010a34f402587e19f5141f6b9 | 1,687 | py | Python | v1/tasks/signed_requests.py | Hristijan95/Validator | aae7d0ae8a8ed5576ff721f936c7d916d113d784 | [
"MIT"
] | null | null | null | v1/tasks/signed_requests.py | Hristijan95/Validator | aae7d0ae8a8ed5576ff721f936c7d916d113d784 | [
"MIT"
] | null | null | null | v1/tasks/signed_requests.py | Hristijan95/Validator | aae7d0ae8a8ed5576ff721f936c7d916d113d784 | [
"MIT"
] | null | null | null | import logging
from celery import shared_task
from nacl.encoding import HexEncoder
from nacl.signing import SigningKey
from thenewboston.environment.environment_variables import get_environment_variable
from thenewboston.utils.format import format_address
from thenewboston.utils.network import patch, post
from thenewb... | 29.086207 | 86 | 0.750445 |
a97f54d6cac1ea91f05cb3dc68729f5b68df7c9e | 6,979 | py | Python | python/paddle/fluid/tests/unittests/test_compare_op.py | mamingjie-China/Paddle | 91d2f1e3e6e51142a74a43d0673a8feff056c39b | [
"Apache-2.0"
] | 3 | 2021-06-11T06:48:10.000Z | 2021-09-02T10:18:06.000Z | python/paddle/fluid/tests/unittests/test_compare_op.py | Janayt/Paddle | 68c6160e639be38c57a7dd831f7b841b33e92676 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/test_compare_op.py | Janayt/Paddle | 68c6160e639be38c57a7dd831f7b841b33e92676 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 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 app... | 42.815951 | 80 | 0.576444 |
2421e2befd2ee4a74070474ea2a2e24288ef1b46 | 1,142 | py | Python | workspace/src/rqt_common_plugins/rqt_launch/src/rqt_launch/status_indicator.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | 1 | 2019-01-10T22:07:07.000Z | 2019-01-10T22:07:07.000Z | workspace/src/rqt_common_plugins/rqt_launch/src/rqt_launch/status_indicator.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | workspace/src/rqt_common_plugins/rqt_launch/src/rqt_launch/status_indicator.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from python_qt_binding.QtGui import QLabel, QStyle
import rospy
class StatusIndicator(QLabel):
def __init__(self, *args):
super(StatusIndicator, self).__init__(*args)
self.set_stopped()
def set_running(self):
self.setPixmap(
self.style().standardIcon... | 27.853659 | 79 | 0.584063 |
1bba88c73db33fe9a68126ef3f708725118029ee | 397 | py | Python | authorize/opa/exceptions.py | cedadev/django-authorizer | 88efa020defce86f50c72aab724cb5c4a34442f8 | [
"BSD-3-Clause"
] | 1 | 2021-02-03T15:40:10.000Z | 2021-02-03T15:40:10.000Z | authorize/opa/exceptions.py | cedadev/django-authorizer | 88efa020defce86f50c72aab724cb5c4a34442f8 | [
"BSD-3-Clause"
] | 10 | 2020-03-25T16:51:27.000Z | 2021-03-25T18:12:52.000Z | authorize/opa/exceptions.py | cedadev/django-authorizer | 88efa020defce86f50c72aab724cb5c4a34442f8 | [
"BSD-3-Clause"
] | 1 | 2021-07-01T09:51:19.000Z | 2021-07-01T09:51:19.000Z | """ OPA Authorization related exceptions. """
__author__ = "William Tucker"
__date__ = "2020-02-14"
__copyright__ = "Copyright 2020 United Kingdom Research and Innovation"
__license__ = "BSD - see LICENSE file in top-level package directory"
class OPAAuthorizationError(Exception):
""" Generic exception raised wh... | 30.538462 | 72 | 0.753149 |
1b7a464733ae77c7a4a2652ead1433584cca7845 | 16,634 | py | Python | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/6-sender_receiver_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 3 | 2021-04-23T23:29:26.000Z | 2022-03-23T10:00:30.000Z | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/6-sender_receiver_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | null | null | null | benchmarks/f3_wrong_hints_permutations/scaling_ltl_timed_transition_system/6-sender_receiver_2.py | EnricoMagnago/F3 | c863215c318d7d5f258eb9be38c6962cf6863b52 | [
"MIT"
] | 1 | 2021-11-17T22:02:56.000Z | 2021-11-17T22:02:56.000Z | from typing import FrozenSet
from collections import Iterable
from math import log, ceil
from mathsat import msat_term, msat_env
from mathsat import msat_make_constant, msat_declare_function
from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type
from mathsat import msat_make_and, msa... | 39.889688 | 89 | 0.569556 |
0743cc8611ecf3e3d5469693393efb392a69cd70 | 3,195 | py | Python | hublib/ui/pathselect.py | hzclarksm/hublib | e8f2168d80464b6343b980e30fdd552d1b0c2479 | [
"MIT"
] | 6 | 2017-05-23T19:17:29.000Z | 2022-02-24T00:36:46.000Z | hublib/ui/pathselect.py | hzclarksm/hublib | e8f2168d80464b6343b980e30fdd552d1b0c2479 | [
"MIT"
] | 1 | 2019-02-13T13:35:57.000Z | 2019-02-13T13:35:57.000Z | hublib/ui/pathselect.py | hzclarksm/hublib | e8f2168d80464b6343b980e30fdd552d1b0c2479 | [
"MIT"
] | 6 | 2017-09-12T19:51:12.000Z | 2021-01-13T23:43:57.000Z | # ----------------------------------------------------------------------
# A widget that allows you to choose server-side files or directories.
# ======================================================================
# AUTHOR: Rob Campbell, Purdue University
# Copyright (c) 2018 HUBzero Foundation, LLC
# See LICENS... | 32.602041 | 111 | 0.525196 |
85dc0f71df9ab0380c3dc0d57201dcac76a8121a | 6,686 | py | Python | base/models.py | felixyin/qdqtrj_website | 43ae31af887cfe537d6f0cff5329dac619190210 | [
"MIT"
] | null | null | null | base/models.py | felixyin/qdqtrj_website | 43ae31af887cfe537d6f0cff5329dac619190210 | [
"MIT"
] | null | null | null | base/models.py | felixyin/qdqtrj_website | 43ae31af887cfe537d6f0cff5329dac619190210 | [
"MIT"
] | null | null | null | from ckeditor_uploader.fields import RichTextUploadingField
from django.contrib.sites.models import Site
from django.core.exceptions import ValidationError
from django.db import models as m
from django.utils.timezone import now
from django.utils.translation import gettext_lazy as _
# Create your models here.
#
class... | 43.699346 | 118 | 0.691445 |
bdb82f5d854ed09a90d5bcf902db6e1e94968de6 | 7,028 | py | Python | sympy/assumptions/refine.py | wanglongqi/sympy | 66a37804f13e8510a35d958b2cfaef91cbb2fd7c | [
"BSD-3-Clause"
] | null | null | null | sympy/assumptions/refine.py | wanglongqi/sympy | 66a37804f13e8510a35d958b2cfaef91cbb2fd7c | [
"BSD-3-Clause"
] | null | null | null | sympy/assumptions/refine.py | wanglongqi/sympy | 66a37804f13e8510a35d958b2cfaef91cbb2fd7c | [
"BSD-3-Clause"
] | 1 | 2020-09-09T15:20:27.000Z | 2020-09-09T15:20:27.000Z | from __future__ import print_function, division
from sympy.core import S, Add, Expr, Basic
from sympy.assumptions import Q, ask
from sympy.core.logic import fuzzy_not
def refine(expr, assumptions=True):
"""
Simplify an expression using assumptions.
Gives the form of expr that would be obtained if symbol... | 32.387097 | 78 | 0.537422 |
e2f3b0b16cf65ce02ea61cb9a4a1cab5853db4d7 | 1,743 | py | Python | histdiads/utils.py | anguelos/histdiads | d1ea260b4ad1bda41169e525f5ceddcebf4447bf | [
"Apache-2.0"
] | null | null | null | histdiads/utils.py | anguelos/histdiads | d1ea260b4ad1bda41169e525f5ceddcebf4447bf | [
"Apache-2.0"
] | null | null | null | histdiads/utils.py | anguelos/histdiads | d1ea260b4ad1bda41169e525f5ceddcebf4447bf | [
"Apache-2.0"
] | null | null | null | import tqdm
import os
import requests
import pathlib
import tarfile
import zipfile
def download_url(url, filename, filesize=None, resume=True):
pathlib.Path(filename).parents[0].mkdir(parents=True, exist_ok=True)
if filesize is not None and os.path.isfile(filename) and os.path.getsize(filename) == filesize:
... | 38.733333 | 109 | 0.689042 |
9ffef65e1d93ab651bcd0204dc57dd62b305a1d1 | 1,363 | py | Python | Bot/sqlite_setup.py | MaexMaex/python_discord_bot | 8bbccbcfb6b6ae3d1ad670df03ff3c41feb65a59 | [
"MIT"
] | null | null | null | Bot/sqlite_setup.py | MaexMaex/python_discord_bot | 8bbccbcfb6b6ae3d1ad670df03ff3c41feb65a59 | [
"MIT"
] | 10 | 2018-04-05T06:16:15.000Z | 2020-02-09T08:33:13.000Z | Bot/sqlite_setup.py | MaexMaex/python_discord_bot | 8bbccbcfb6b6ae3d1ad670df03ff3c41feb65a59 | [
"MIT"
] | null | null | null | import sqlite3
class DBSetup:
def __init__(self, dbname="bttn.sqlite"):
self.dbname = dbname
self.conn = sqlite3.connect(dbname)
self.c = self.conn.cursor()
def setup(self):
with self.conn:
self.c.execute("""CREATE TABLE IF NOT EXISTS users (
disco... | 29.630435 | 79 | 0.512106 |
ee8dcd50659bb7bdfc42f17934983daa75b5f316 | 16,994 | py | Python | Barbican/barbican-kpt-server/barbican/plugin/crypto/p11_crypto.py | sdic-cloud-security-research/barbican-kpt-kms | a6fba7faa046e0dcfd76321e32914b80484ed829 | [
"Apache-2.0"
] | null | null | null | Barbican/barbican-kpt-server/barbican/plugin/crypto/p11_crypto.py | sdic-cloud-security-research/barbican-kpt-kms | a6fba7faa046e0dcfd76321e32914b80484ed829 | [
"Apache-2.0"
] | null | null | null | Barbican/barbican-kpt-server/barbican/plugin/crypto/p11_crypto.py | sdic-cloud-security-research/barbican-kpt-kms | a6fba7faa046e0dcfd76321e32914b80484ed829 | [
"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... | 38.535147 | 79 | 0.611157 |
d6f76d08aed7db93ec7b993ebf65c84f93bca2c2 | 37,528 | py | Python | core/src/autogluon/core/models/ensemble/bagged_ensemble_model.py | songqiang/autogluon | 529d7cc65fad411622072aa0349215a15e1e901c | [
"Apache-2.0"
] | 1 | 2021-03-25T09:35:02.000Z | 2021-03-25T09:35:02.000Z | core/src/autogluon/core/models/ensemble/bagged_ensemble_model.py | songqiang/autogluon | 529d7cc65fad411622072aa0349215a15e1e901c | [
"Apache-2.0"
] | null | null | null | core/src/autogluon/core/models/ensemble/bagged_ensemble_model.py | songqiang/autogluon | 529d7cc65fad411622072aa0349215a15e1e901c | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import os
import time
from collections import Counter
from statistics import mean
import numpy as np
import pandas as pd
from .fold_fitting_strategy import AbstractFoldFittingStrategy, SequentialLocalFoldFittingStrategy
from ..abstract.abstract_model import AbstractModel
from ...constants i... | 48.485788 | 216 | 0.637444 |
a4d4dd947486de0ce10c8fe0a1ece75db9081f7d | 8,723 | py | Python | rdr_service/alembic/versions/a43f72b7c848_update_code_procs.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 39 | 2017-10-13T19:16:27.000Z | 2021-09-24T16:58:21.000Z | rdr_service/alembic/versions/a43f72b7c848_update_code_procs.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 312 | 2017-09-08T15:42:13.000Z | 2022-03-23T18:21:40.000Z | rdr_service/alembic/versions/a43f72b7c848_update_code_procs.py | all-of-us/raw-data-repository | d28ad957557587b03ff9c63d55dd55e0508f91d8 | [
"BSD-3-Clause"
] | 19 | 2017-09-15T13:58:00.000Z | 2022-02-07T18:33:20.000Z | """update code procs
Revision ID: a43f72b7c848
Revises: 3adfe155c68b
Create Date: 2019-04-15 14:55:40.416929
"""
from alembic import op
from rdr_service.dao.alembic_utils import ReplaceableObject
# revision identifiers, used by Alembic.
revision = "a43f72b7c848"
down_revision = "3adfe155c68b"
branch_labels = None
d... | 37.926087 | 166 | 0.619053 |
73ae14193dde5195da2706424112e0f2e5a2135e | 1,376 | py | Python | sdk/identity/azure-identity/azure/identity/__init__.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/azure/identity/__init__.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/azure/identity/__init__.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from ._browser_auth import InteractiveBrowserCredential
from .credentials import (
CertificateCredential,
ChainedTokenCredential,
ClientSecretCredential,
... | 30.577778 | 95 | 0.713663 |
2144e60f7c4daba2c6bc964c64c9875d59413c1c | 796 | py | Python | CPAC/registration/__init__.py | chrisfoulon/C-PAC | 2746a90c39cea586aede98343c5927252bb8e81a | [
"BSD-3-Clause"
] | 1 | 2021-08-02T23:23:39.000Z | 2021-08-02T23:23:39.000Z | CPAC/registration/__init__.py | chrisfoulon/C-PAC | 2746a90c39cea586aede98343c5927252bb8e81a | [
"BSD-3-Clause"
] | null | null | null | CPAC/registration/__init__.py | chrisfoulon/C-PAC | 2746a90c39cea586aede98343c5927252bb8e81a | [
"BSD-3-Clause"
] | 2 | 2021-08-02T23:23:40.000Z | 2022-02-26T12:39:30.000Z | from registration import create_nonlinear_register, \
create_register_func_to_mni, \
create_register_func_to_anat, \
create_bbregister_func_to_anat, \
create_wf_calculate_ants_warp, \
create_wf_a... | 44.222222 | 58 | 0.579146 |
19ae649cd293a7b1313bf7ccd416314a37ba838d | 271 | py | Python | resume parser/app.py | sushant66/AI-Job-Hiring | 2bda74fa4a8485fcbe93a37445a3e4fd138655a8 | [
"MIT"
] | null | null | null | resume parser/app.py | sushant66/AI-Job-Hiring | 2bda74fa4a8485fcbe93a37445a3e4fd138655a8 | [
"MIT"
] | null | null | null | resume parser/app.py | sushant66/AI-Job-Hiring | 2bda74fa4a8485fcbe93a37445a3e4fd138655a8 | [
"MIT"
] | null | null | null | import os
from flask import Flask, flash, request, redirect, url_for
from werkzeug.utils import secure_filename
UPLOAD_FOLDER = 'uploads'
ALLOWED_EXTENSIONS = {'txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif'}
app = Flask(__name__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
| 27.1 | 64 | 0.741697 |
6db04c37affba643aa7c29f9da160d1d98c13ffd | 3,049 | py | Python | tuition/hooks.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | tuition/hooks.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | tuition/hooks.py | AlvaroMolano/tuition | d6e9b55c1cf7a297895df748c481f8bdac4f0cdf | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "tuition"
app_title = "Tuition"
app_publisher = "AlvaroMolano"
app_description = "Add flavour and utilities to education module"
app_icon = "octicon octicon-mortar-board"
app_color = "green"
app_email = ... | 23.453846 | 78 | 0.673991 |
7db7e398996a670e63f7fd4c7042f23421dab4a4 | 5,312 | py | Python | train_transmitter.py | Guaguago/Persona-Dialogue-Generation | 0d4526ec8eddff62751a70666e14d72103906f44 | [
"MIT"
] | null | null | null | train_transmitter.py | Guaguago/Persona-Dialogue-Generation | 0d4526ec8eddff62751a70666e14d72103906f44 | [
"MIT"
] | null | null | null | train_transmitter.py | Guaguago/Persona-Dialogue-Generation | 0d4526ec8eddff62751a70666e14d72103906f44 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Train model for ppl metric with pre-selected parameters.
These parameters have some variance in their final perplexity... | 29.842697 | 79 | 0.693148 |
123d994c09bcb9d3a2863ca2a52f3e89dcd03a6e | 9,561 | py | Python | pgmpy/models/ClusterGraph.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | pgmpy/models/ClusterGraph.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | pgmpy/models/ClusterGraph.py | jaidevd/pgmpy | 0a7f371f4b39ded45e48d637fa1a44b4518162da | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from collections import defaultdict
import numpy as np
from pgmpy.base import UndirectedGraph
from pgmpy.exceptions import CardinalityError
class ClusterGraph(UndirectedGraph):
r"""
Base class for representing Cluster Graph.
Cluster graph is an undirected graph which is associat... | 34.516245 | 119 | 0.528606 |
fe66d82dc76fea148ff9163e36a89ec61940870a | 17,899 | py | Python | astroquery/simbad/tests/test_simbad.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | astroquery/simbad/tests/test_simbad.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | astroquery/simbad/tests/test_simbad.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
import re
from astropy.extern import six
import pytest
import astropy.units as u
from astropy.table import Table
import numpy as np
from ... import simbad
from ...utils.testing_tools import MockResponse
from ...utils import commons
from ...exce... | 41.820093 | 89 | 0.60428 |
d11c59e0bb168ac363cd6d787e6f29ee58ab6804 | 6,723 | py | Python | odps/errors.py | hekaisheng/aliyun-odps-python-sdk | a08f5a9f006487dd3443ebe000f363e9cbee6a80 | [
"Apache-2.0"
] | null | null | null | odps/errors.py | hekaisheng/aliyun-odps-python-sdk | a08f5a9f006487dd3443ebe000f363e9cbee6a80 | [
"Apache-2.0"
] | null | null | null | odps/errors.py | hekaisheng/aliyun-odps-python-sdk | a08f5a9f006487dd3443ebe000f363e9cbee6a80 | [
"Apache-2.0"
] | 1 | 2017-06-27T08:18:29.000Z | 2017-06-27T08:18:29.000Z | # -*- coding: utf-8 -*-
# Copyright 1999-2017 Alibaba Group Holding Ltd.
#
# 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 require... | 26.159533 | 104 | 0.651346 |
ef9172673846d283ac1821ed2f76519815f94f26 | 273 | py | Python | data/config.py | Vladvlad9/moderator_bot | 080d4f60d3492514a9da52ee9787320d788b83ed | [
"MIT"
] | null | null | null | data/config.py | Vladvlad9/moderator_bot | 080d4f60d3492514a9da52ee9787320d788b83ed | [
"MIT"
] | null | null | null | data/config.py | Vladvlad9/moderator_bot | 080d4f60d3492514a9da52ee9787320d788b83ed | [
"MIT"
] | null | null | null | import os
from dotenv import load_dotenv
from os import environ
load_dotenv(".env")
BOT_TOKEN = os.environ["BOT_TOKEN"]
DATABASE = os.environ["DATABASE"]
admins = [
381252111,
]
async def load_admins() -> tuple:
return tuple(map(int, environ["ADMINS"].split(",")))
| 18.2 | 56 | 0.710623 |
53c526d548fd0c1e119b6edcf72b63360efba099 | 114 | py | Python | src/apps/core/views.py | yrrodriguezb/djangp_apps | 7a0f85f65558e02d0707525b5d7f5bfa6caacb2d | [
"MIT"
] | null | null | null | src/apps/core/views.py | yrrodriguezb/djangp_apps | 7a0f85f65558e02d0707525b5d7f5bfa6caacb2d | [
"MIT"
] | null | null | null | src/apps/core/views.py | yrrodriguezb/djangp_apps | 7a0f85f65558e02d0707525b5d7f5bfa6caacb2d | [
"MIT"
] | null | null | null | from django.views.generic import TemplateView
class HomeView(TemplateView):
template_name = "core/home.html" | 22.8 | 45 | 0.789474 |
7a75543fa812b9d723dc76c62cf9a764e67f46a6 | 857 | py | Python | avions/Vol.py | ErnestBidouille/avions_hotels_methodes_agiles | e50bb600544be0a154a8c2f7a6cbac23e2c265d5 | [
"MIT"
] | null | null | null | avions/Vol.py | ErnestBidouille/avions_hotels_methodes_agiles | e50bb600544be0a154a8c2f7a6cbac23e2c265d5 | [
"MIT"
] | null | null | null | avions/Vol.py | ErnestBidouille/avions_hotels_methodes_agiles | e50bb600544be0a154a8c2f7a6cbac23e2c265d5 | [
"MIT"
] | null | null | null | class Vol(object):
def __init__(self, ville_depart, ville_arrivee, distance, nb_max_passenger):
self._ville_depart = ville_depart
self._ville_arrivee = ville_arrivee
self._distance = float(distance)
self._nb_max_passenger = float(nb_max_passenger)
self._lst_avion = []
de... | 28.566667 | 80 | 0.631272 |
e07063fc8b1a9943d0960b6dce58ee1d5187f43c | 9,855 | py | Python | deepbeliefnetwork.py | indervirbanipal/tensorflow | 1f54174a98d5d5ce66523f1d5aec6ebd51edb320 | [
"MIT"
] | null | null | null | deepbeliefnetwork.py | indervirbanipal/tensorflow | 1f54174a98d5d5ce66523f1d5aec6ebd51edb320 | [
"MIT"
] | null | null | null | deepbeliefnetwork.py | indervirbanipal/tensorflow | 1f54174a98d5d5ce66523f1d5aec6ebd51edb320 | [
"MIT"
] | null | null | null | #urllib is used to download the utils file from deeplearning.net
import urllib.request
with urllib.request.urlopen("http://deeplearning.net/tutorial/code/utils.py") as url:
response = url.read()
target = open('utils.py', 'w')
target.write(response.decode('utf-8'))
target.close()
#Import the math function for calc... | 39.898785 | 119 | 0.623135 |
327fe85168f5a5ab64791e94a2ff4211f51c5624 | 10,931 | py | Python | core/platform/email/mailgun_email_services_test.py | tjinjoy/oppia | ed5ccbd95e42078457d40dde1dda02f1ae6a4354 | [
"Apache-2.0"
] | 2 | 2019-03-31T07:03:32.000Z | 2019-04-24T18:12:53.000Z | core/platform/email/mailgun_email_services_test.py | tjinjoy/oppia | ed5ccbd95e42078457d40dde1dda02f1ae6a4354 | [
"Apache-2.0"
] | 3 | 2020-03-16T06:40:30.000Z | 2020-03-30T12:10:20.000Z | core/platform/email/mailgun_email_services_test.py | tjinjoy/oppia | ed5ccbd95e42078457d40dde1dda02f1ae6a4354 | [
"Apache-2.0"
] | 1 | 2020-03-15T14:29:55.000Z | 2020-03-15T14:29:55.000Z | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 47.320346 | 80 | 0.646418 |
5edce819b72193509f17d7d3c3b79aedbb3d0c11 | 224 | py | Python | vb_simulation_pkgs/gazebo_ros_pkgs/gazebo_ros/setup.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | 1 | 2021-09-09T04:41:28.000Z | 2021-09-09T04:41:28.000Z | vb_simulation_pkgs/gazebo_ros_pkgs/gazebo_ros/setup.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | null | null | null | vb_simulation_pkgs/gazebo_ros_pkgs/gazebo_ros/setup.py | 1arshan/Eyantra_Virgi-bot | 30ebe99fec6a0d4767fe94468b21bc00091bc527 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2.7
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup()
d['packages'] = ['gazebo_ros']
d['package_dir'] = {'':'src'}
setup(**d)
| 22.4 | 60 | 0.741071 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.