hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f775c9f689bfc087dae8bdb25d1cd48072e78520 | 1,138 | py | Python | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | 6 | 2019-11-21T10:09:49.000Z | 2021-06-19T09:52:59.000Z | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | null | null | null | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | null | null | null | """
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `development`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""
import django_heroku
from split_settings.tools import include
base_set... | 30.756757 | 62 | 0.745167 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 886 | 0.778559 |
f77623537e19394a7aca74fbc25bffc73cb1952f | 584 | py | Python | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/train/125/245.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution:
def XXX(self, s: str) -> bool:
i=0
j = len(s)-1
#lower()把所有大写字母改成小写,其余不变
s = s.lower()
while i<j:
while not(97 <= ord(s[i]) <= 122 or 48 <= ord(s[i]) <= 57):
if i == j:
return True
i += 1
... | 26.545455 | 71 | 0.332192 | 611 | 0.995114 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.087948 |
f776be33a00e9a7a7de35e919a22d945de72c2c3 | 688 | py | Python | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 11 | 2015-01-02T15:44:31.000Z | 2021-07-27T06:54:35.000Z | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 8 | 2016-02-03T07:07:04.000Z | 2022-01-13T00:42:32.000Z | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 8 | 2015-02-20T13:51:51.000Z | 2021-06-24T19:11:30.000Z | from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from .views import template_test
urlpatterns = patterns(
'',
url(r'^test/', template_test, name='template_test'),
url(r... | 23.724138 | 85 | 0.713663 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.136628 |
f7796a989bdd258bec7902dd5290b418ab45666b | 1,645 | py | Python | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | from typing import Sequence, Union
import numpy as np
from scipy.ndimage.interpolation import rotate as np_rotate
from PIL.Image import Image
from torch import Tensor, tensor
from torchvision.transforms.functional import rotate
class ImageRotation(object):
def __init__(self, degree):
self.degree = degree... | 33.571429 | 73 | 0.612766 | 1,408 | 0.855927 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.080243 |
f77bd48d7ad8370a1142d05db86188aea9cfe2af | 14,355 | py | Python | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | # Course: CS261 - Data Structures
# Author: Mohamed Al-Hussein
# Assignment: 06
# Description: Directed graph implementation.
from collections import deque
import heapq
class DirectedGraph:
"""
Class to implement directed weighted graph
- duplicate edges not allowed
- loops not allowed
- only pos... | 33.618267 | 117 | 0.585023 | 14,182 | 0.987948 | 0 | 0 | 0 | 0 | 0 | 0 | 6,213 | 0.432811 |
f77befa83cf2914313d51ff9e7931425c66499dd | 6,847 | py | Python | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-KDDCup2020 | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | 1 | 2021-12-06T14:59:55.000Z | 2021-12-06T14:59:55.000Z | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time: 2020/5/14 20:41
# @Author: Mecthew
import time
import numpy as np
import pandas as pd
import scipy
from sklearn.svm import LinearSVC
from sklearn.linear_model import logistic
from sklearn.calibration import CalibratedClassifierCV
from sklearn.metrics import ac... | 43.062893 | 117 | 0.676355 | 772 | 0.11275 | 0 | 0 | 0 | 0 | 0 | 0 | 758 | 0.110705 |
f77cba016c9db38a8357e9b79839c267bbbde362 | 4,754 | py | Python | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | null | null | null | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | 1 | 2022-03-02T14:58:21.000Z | 2022-03-02T14:58:21.000Z | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | null | null | null | import os
import scrapy
from scrapy.crawler import CrawlerProcess
import requests
from disaster_data.sources.noaa_coast.utils import get_geoinfo, get_fgdcinfo
class NoaaImageryCollections(scrapy.Spider):
name = 'noaa-coast-imagery-collections'
start_urls = [
'https://coast.noaa.gov/htdata/raster2/... | 34.955882 | 121 | 0.446782 | 4,590 | 0.965503 | 0 | 0 | 404 | 0.084981 | 0 | 0 | 1,163 | 0.244636 |
f77cc067eb5667c5dadfdaf7622c60b024ae8bc5 | 2,004 | py | Python | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 31 | 2021-09-09T16:09:55.000Z | 2022-02-20T02:15:19.000Z | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 40 | 2021-08-06T14:30:08.000Z | 2022-01-19T08:49:52.000Z | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 5 | 2021-08-06T11:20:31.000Z | 2022-01-07T19:39:40.000Z | import pytest
from rlo import factory
@pytest.mark.parametrize("use_subtree_match_edges", [True, False])
@pytest.mark.parametrize("loss", ["pinball=0.6", "huber"])
def test_torch_model_from_config(use_subtree_match_edges, loss):
# Check we can construct a Model
config = {
"num_embeddings": 3,
... | 31.809524 | 68 | 0.657685 | 0 | 0 | 0 | 0 | 1,956 | 0.976048 | 0 | 0 | 841 | 0.419661 |
f77db444ca4d359ed2a89460019181e2cac7a2bd | 1,285 | py | Python | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Dirk Dittert
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 27.340426 | 74 | 0.649805 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 821 | 0.638911 |
f77db8b6066d045b501403f79c57e6ba8e7db030 | 6,432 | py | Python | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | 2 | 2021-05-25T12:23:23.000Z | 2021-06-20T11:40:40.000Z | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | null | null | null | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | 4 | 2019-10-16T07:52:41.000Z | 2021-11-20T17:28:25.000Z | # Copyright 2019 Jeremiah Sanders.
#
# 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 wri... | 50.25 | 211 | 0.704291 | 5,786 | 0.899565 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.13324 |
f77e315e6c8b0a904e3ca8fb92860fcdc824f09d | 977 | py | Python | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | """
DATA DESCRIPTION
sentiment140 dataset. It contains 1,600,000 tweets extracted using the twitter api . The tweets have been annotated (0 = negative, 4 = positive) and they can be used to detect sentiment .
It contains the following 6 fields:
target: the polarity of the tweet (0 = negative, 2 = neutral, 4 = positi... | 32.566667 | 187 | 0.721597 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 770 | 0.788127 |
f77f2fcfbb893554c9dac95eda0dc9991fd25b40 | 1,803 | py | Python | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 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 flask import redirect, request, session
from werkzeug.except... | 31.631579 | 104 | 0.742651 | 1,093 | 0.606212 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.136994 |
f77f91aa533c688d45149adae8643805965bb2c7 | 622 | py | Python | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | from csapp.models import Kruptos
from rest_framework import viewsets, permissions
from rest_framework.response import Response
from rest_framework import status
from .serializers import KruptosSerializer
class KruptosViewSet(viewsets.ModelViewSet):
permission_classes = [
permissions.AllowAny
]... | 29.619048 | 59 | 0.726688 | 411 | 0.660772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7809285eb96f9645d677756834951e018513264 | 7,612 | py | Python | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | from os import path
import autolens as al
import autolens.plot as aplt
from test_autogalaxy.simulators.imaging import instrument_util
test_path = path.join("{}".format(path.dirname(path.realpath(__file__))), "..", "..")
def pixel_scale_from_instrument(instrument):
"""
Returns the pixel scale from... | 33.982143 | 110 | 0.633605 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,214 | 0.290857 |
f78287f3fba8bcf7a557dbad608ff12faa053899 | 687 | py | Python | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | 1 | 2019-05-06T21:48:54.000Z | 2019-05-06T21:48:54.000Z | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | null | null | null | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | null | null | null | from .conftest import GoProCameraTest
from socket import timeout
from urllib import error
class GpControlSetTest(GoProCameraTest):
def test_gp_control_set(self):
# on success, this is an empty json blob
self.responses['/gp/gpControl/setting/foo/bar'] = '{}'
assert '{}' == self.goprocam.gp... | 34.35 | 76 | 0.676856 | 593 | 0.863173 | 0 | 0 | 0 | 0 | 0 | 0 | 140 | 0.203785 |
f782e665db7375deff9d1e85d757a68033315dd2 | 1,727 | py | Python | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | from utils import CanadianScraper, CanadianPerson as Person
COUNCIL_PAGE = 'http://www.abbotsford.ca/city_hall/mayor_and_council/city_council.htm'
CONTACT_PAGE = 'http://www.abbotsford.ca/contact_us.htm'
class AbbotsfordPersonScraper(CanadianScraper):
def scrape(self):
councillor_seat_number = 1
... | 43.175 | 130 | 0.609728 | 1,519 | 0.87956 | 1,467 | 0.84945 | 0 | 0 | 0 | 0 | 430 | 0.248987 |
f783069506127a9b55df9ae0fb7a072477dcbc3b | 32 | py | Python | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 110 | 2017-09-14T02:15:15.000Z | 2022-03-30T20:14:21.000Z | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 115 | 2017-09-22T12:15:30.000Z | 2022-01-17T12:31:21.000Z | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 56 | 2017-09-22T11:26:25.000Z | 2022-03-03T14:14:58.000Z | from anchorecli.cli import repo
| 16 | 31 | 0.84375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f7836ff545709d136c298d62a1c6e262234ad38c | 2,692 | py | Python | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | '''
nome = input('Insira seu nome: ')
if nome == 'Mendes':
print('Que nome lindo você tem!')
else:
print('Seu nome é tão normal!')
print('Bom dia {}!'.format(nome))
'''
#DESAFIO_28
'''
from random import randint
from time import sleep
x = randint(0,5)
y = int(input('Digite um número de 0 à 5: '))
print('Loading... | 24.697248 | 84 | 0.643759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,676 | 0.983101 |
f78374a6b9c098ca930042e6331630796196647c | 4,902 | py | Python | temp logger complete.py | nevillethenev/Beer | a8fae43e7b2f846e208daad4a9b025703f0acb2a | [
"Unlicense"
] | null | null | null | temp logger complete.py | nevillethenev/Beer | a8fae43e7b2f846e208daad4a9b025703f0acb2a | [
"Unlicense"
] | null | null | null | temp logger complete.py | nevillethenev/Beer | a8fae43e7b2f846e208daad4a9b025703f0acb2a | [
"Unlicense"
] | null | null | null | #/usr/bin/python
import serial
import time
import matplotlib.pyplot as plt
import numpy as np
import os
"""""""""""""""""""""""""""""""""""
"""""""NEVS BEER SCRIPT""""""""""""
"""""""""""""""""""""""""""""""""""
###need to add exception handler for serial disconnection
## SETUP SERIAL PORT
try:
... | 29.178571 | 104 | 0.563035 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,821 | 0.575479 |
f78376ac5696d0e27ff83ec0f818efffebaf1f64 | 874 | py | Python | src/domain/usecases/get_all_glaucomatous_images_paths.py | OzielFilho/ProjetoFinalPdi | c9e6fe415f1a985d6eeac204580d3ab623026665 | [
"MIT"
] | null | null | null | src/domain/usecases/get_all_glaucomatous_images_paths.py | OzielFilho/ProjetoFinalPdi | c9e6fe415f1a985d6eeac204580d3ab623026665 | [
"MIT"
] | null | null | null | src/domain/usecases/get_all_glaucomatous_images_paths.py | OzielFilho/ProjetoFinalPdi | c9e6fe415f1a985d6eeac204580d3ab623026665 | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from domain.errors.failure import Failure
from domain.errors.image_failure import ImageFailure
from domain.repositories.image_repository_abstraction import ImageRepositoryAbstraction
class GetAllGlaucomatousImagesPathsAbstraction(ABC):
@abstractmethod
def __init__(self, re... | 32.37037 | 87 | 0.756293 | 648 | 0.741419 | 0 | 0 | 175 | 0.200229 | 0 | 0 | 0 | 0 |
f783bb5a51fe8b1b4c8ff1d1556d8997b3dd57bd | 944 | py | Python | numsgraph.py | FNut/PyDev | f591aa6ace1b9032e4a9159c03478571c75a38b1 | [
"MIT"
] | 2 | 2021-01-21T12:54:50.000Z | 2021-12-26T13:45:19.000Z | numsgraph.py | FNut/PyDev | f591aa6ace1b9032e4a9159c03478571c75a38b1 | [
"MIT"
] | 12 | 2021-01-21T14:12:02.000Z | 2021-02-07T06:12:44.000Z | numsgraph.py | FNut/PyDev | f591aa6ace1b9032e4a9159c03478571c75a38b1 | [
"MIT"
] | null | null | null | import pygame
import math
pygame.init()
pi = ('Pi = ' + str(math.pi))
e = ('E = ' + str(math.e))
f = ('F = 0,1,1,2,3,5,8,13...')
p = ('P = 1,2,5,12,29...')
l = ('L = 2,1,3,4,7,11,18,29...')
pl = ('P-L = 2,6,14,34,82...')
display = pygame.display.set_mode((800,600))
pygame.display.set_caption('Nums')
font = p... | 29.5 | 45 | 0.559322 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.127119 |
f783f229f95c2d9280dddc95def69a100dcd1954 | 5,980 | py | Python | scoap3/modules/tools/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 1 | 2021-08-04T09:48:38.000Z | 2021-08-04T09:48:38.000Z | scoap3/modules/tools/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 158 | 2018-09-10T07:31:14.000Z | 2022-03-30T07:18:51.000Z | scoap3/modules/tools/tasks.py | Lilykos/scoap3-next | b779b8c32504e09b2c5330aa6a18e1e1c9affd33 | [
"CC-BY-4.0"
] | 9 | 2015-04-28T11:55:04.000Z | 2021-09-28T12:14:53.000Z | import io
import csv
import logging
from StringIO import StringIO
from datetime import datetime
from gzip import GzipFile
import boto3
from celery import shared_task
from flask import current_app
from flask_mail import Attachment
from invenio_mail.api import TemplatedMessage
logger = logging.getLogger(__name__)
def... | 37.610063 | 112 | 0.678595 | 0 | 0 | 0 | 0 | 2,041 | 0.341304 | 0 | 0 | 3,051 | 0.510201 |
f78676da21ba7106ed5e99f74d32df70174e47d8 | 756 | py | Python | telegram_bot/handlers/commands/detailed_mode.py | ProgrammingLanguageLeader/MathematicianBot | a4627962a6c8bfac76013d80780997ab4b0f7952 | [
"MIT"
] | null | null | null | telegram_bot/handlers/commands/detailed_mode.py | ProgrammingLanguageLeader/MathematicianBot | a4627962a6c8bfac76013d80780997ab4b0f7952 | [
"MIT"
] | 16 | 2018-03-05T14:25:16.000Z | 2022-03-11T23:46:56.000Z | telegram_bot/handlers/commands/detailed_mode.py | ProgrammingLanguageLeader/MathematicianBot | a4627962a6c8bfac76013d80780997ab4b0f7952 | [
"MIT"
] | null | null | null | from system.db import db
from telegram_bot.handlers.utils.decorators import remember_new_user, \
send_typing, write_logs
from telegram_bot.handlers.utils.menu_entries import MenuEntry
from telegram_bot.handlers.utils.reply_markup import create_main_reply_markup
from telegram_bot.models import User
@write_logs
@se... | 30.24 | 77 | 0.756614 | 0 | 0 | 0 | 0 | 450 | 0.595238 | 0 | 0 | 40 | 0.05291 |
f788b1d1658062d96ad83c42b9cd26071a4b8418 | 374 | py | Python | my_spotless_app/migrations/0002_alter_service_picture_url.py | AntociM/Spotless | 8cd2d7f76eccee046d42f7a836cf91af04527186 | [
"ADSL"
] | null | null | null | my_spotless_app/migrations/0002_alter_service_picture_url.py | AntociM/Spotless | 8cd2d7f76eccee046d42f7a836cf91af04527186 | [
"ADSL"
] | 29 | 2022-01-22T19:05:56.000Z | 2022-03-01T08:57:14.000Z | my_spotless_app/migrations/0002_alter_service_picture_url.py | AntociM/Project-4 | 8cd2d7f76eccee046d42f7a836cf91af04527186 | [
"ADSL"
] | 1 | 2022-03-02T11:00:59.000Z | 2022-03-02T11:00:59.000Z | # Generated by Django 3.2 on 2022-02-27 11:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('my_spotless_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='service',
name='picture_url',
... | 19.684211 | 45 | 0.590909 | 283 | 0.756684 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.262032 |
f788b46ad9abee669c31dc3a176027a5ef06cdbd | 8,983 | py | Python | robot/TTS.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 8 | 2021-02-01T06:33:49.000Z | 2022-02-02T11:06:58.000Z | robot/TTS.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 1 | 2020-06-10T10:59:02.000Z | 2020-06-10T10:59:02.000Z | robot/TTS.py | mluyuchen/wukong-robot | 67f5cdb06db9e5e256017925a5efe6721cb2bd1d | [
"MIT"
] | 6 | 2021-01-20T03:22:19.000Z | 2022-03-21T14:19:32.000Z | # -*- coding: utf-8-*-
import os
import base64
import tempfile
import pypinyin
from aip import AipSpeech
from . import utils, config, constants
from robot import logging
from pathlib import Path
from pypinyin import lazy_pinyin
from pydub import AudioSegment
from abc import ABCMeta, abstractmethod
from .sdk import Tenc... | 32.665455 | 155 | 0.601247 | 8,008 | 0.826504 | 0 | 0 | 913 | 0.094231 | 0 | 0 | 3,166 | 0.326762 |
f7897d0bfd7b98594f64cf998c02d21b938fb01d | 392 | py | Python | app/utils.py | Chimmahh/StarJumper | 6003ede1de61a17f1f8302faacf5f76033f8045d | [
"MIT"
] | null | null | null | app/utils.py | Chimmahh/StarJumper | 6003ede1de61a17f1f8302faacf5f76033f8045d | [
"MIT"
] | 3 | 2020-06-05T18:39:20.000Z | 2022-02-11T03:40:48.000Z | app/utils.py | Chimmahh/StarJumper | 6003ede1de61a17f1f8302faacf5f76033f8045d | [
"MIT"
] | 1 | 2018-07-26T16:44:04.000Z | 2018-07-26T16:44:04.000Z | from channels.db import database_sync_to_async
from .exceptions import ClientError
from .models import Game
@database_sync_to_async
def get_game_or_error(game_id, user):
if not user.is_authenticated:
raise ClientError("USER_HAS_TO_LOGIN")
try:
game = Game.objects.get(pk=game_id)
except Game... | 30.153846 | 46 | 0.75 | 0 | 0 | 0 | 0 | 283 | 0.721939 | 0 | 0 | 33 | 0.084184 |
f78ade6802218bb90c0b57cf1feec7d8f2242c2e | 2,328 | py | Python | tests/utils/test_file.py | gfi-centre-ouest/docker-devbox-ddb | 1597d85ef6e9e8322cce195a454de54186ce9ec7 | [
"MIT"
] | 4 | 2020-06-11T20:54:47.000Z | 2020-09-22T13:07:17.000Z | tests/utils/test_file.py | gfi-centre-ouest/docker-devbox-ddb | 1597d85ef6e9e8322cce195a454de54186ce9ec7 | [
"MIT"
] | 113 | 2019-11-07T00:40:36.000Z | 2021-01-18T12:50:16.000Z | tests/utils/test_file.py | inetum-orleans/docker-devbox-ddb | 20c713cf7bfcaf289226a17a9648c17d16003b4d | [
"MIT"
] | null | null | null | import os
import pytest
from ddb.__main__ import load_registered_features
from ddb.config import config
from ddb.feature import features
from ddb.feature.core import CoreFeature
from ddb.utils import file
from ddb.utils.file import FileWalker, FileUtils
class TestHasSameContent:
def test_should_return_true_if_s... | 40.137931 | 139 | 0.714777 | 2,063 | 0.886168 | 0 | 0 | 0 | 0 | 0 | 0 | 536 | 0.230241 |
f78b0bc589ac5d9426f05edb7fe27d25d4add06c | 9,666 | py | Python | test/test_datasets.py | pyronear/pyro-dataset | b6445f6051058f20f2fc821040ec3705dc60464c | [
"Apache-2.0"
] | null | null | null | test/test_datasets.py | pyronear/pyro-dataset | b6445f6051058f20f2fc821040ec3705dc60464c | [
"Apache-2.0"
] | null | null | null | test/test_datasets.py | pyronear/pyro-dataset | b6445f6051058f20f2fc821040ec3705dc60464c | [
"Apache-2.0"
] | 1 | 2022-02-14T12:37:24.000Z | 2022-02-14T12:37:24.000Z | # Copyright (C) 2021, Pyronear contributors.
# This program is licensed under the GNU Affero General Public License version 3.
# See LICENSE or go to <https://www.gnu.org/licenses/agpl-3.0.txt> for full license details.
import unittest
import tempfile
from pathlib import Path
import json
from PIL.Image import Image
i... | 38.975806 | 114 | 0.658183 | 7,146 | 0.739292 | 0 | 0 | 0 | 0 | 0 | 0 | 1,278 | 0.132216 |
f78b62473ace335a7a8a2b3f902ea2441941d851 | 26,116 | py | Python | python/dgllife/model/pretrain/__init__.py | VIGNESHinZONE/dgl-lifesci | 9a892fd0935a7d8ab125530f54ce1e2a38b2377a | [
"Apache-2.0"
] | null | null | null | python/dgllife/model/pretrain/__init__.py | VIGNESHinZONE/dgl-lifesci | 9a892fd0935a7d8ab125530f54ce1e2a38b2377a | [
"Apache-2.0"
] | null | null | null | python/dgllife/model/pretrain/__init__.py | VIGNESHinZONE/dgl-lifesci | 9a892fd0935a7d8ab125530f54ce1e2a38b2377a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
# pylint: disable= no-member, arguments-differ, invalid-name
#
# Utilities for using pre-trained models.
import torch
from dgl.data.utils import _get_dgl_url, download
from .molecule... | 59.219955 | 98 | 0.689501 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 24,918 | 0.954128 |
f78b86d747c672620428e6bd3b8435d4dd3f3512 | 5,608 | py | Python | src/pyrobot/vrep_locobot/camera.py | gujralsanyam22/pyrobot | a0448714857b684d8b280f710e9304988524d2e0 | [
"MIT"
] | 2,150 | 2019-06-12T20:55:41.000Z | 2022-03-21T07:14:51.000Z | src/pyrobot/vrep_locobot/camera.py | gujralsanyam22/pyrobot | a0448714857b684d8b280f710e9304988524d2e0 | [
"MIT"
] | 124 | 2019-06-22T17:12:27.000Z | 2022-02-26T11:43:13.000Z | src/pyrobot/vrep_locobot/camera.py | gujralsanyam22/pyrobot | a0448714857b684d8b280f710e9304988524d2e0 | [
"MIT"
] | 329 | 2019-06-13T03:03:54.000Z | 2022-03-30T07:04:55.000Z | # 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.
import numpy as np
import pyrobot.utils.util as prutil
from pyrobot.core import Camera
from pyrobot.utils.util import try_cv2_import
cv2 = tr... | 26.578199 | 88 | 0.63766 | 5,066 | 0.903352 | 0 | 0 | 235 | 0.041904 | 0 | 0 | 3,479 | 0.620364 |
f78c09a2c8173da1710410d85fa882bb6b674769 | 105 | py | Python | main.py | lmkhkm/SerialMonitor | 05b00e7a05e2a71ddfc9b0e30e42a83b073f88e1 | [
"MIT"
] | null | null | null | main.py | lmkhkm/SerialMonitor | 05b00e7a05e2a71ddfc9b0e30e42a83b073f88e1 | [
"MIT"
] | 1 | 2021-05-08T20:52:27.000Z | 2021-05-08T20:52:27.000Z | main.py | lmkhkm/SerialMonitor | 05b00e7a05e2a71ddfc9b0e30e42a83b073f88e1 | [
"MIT"
] | null | null | null | import serial
ser = serial.Serial('COM7',115200, timeout=1)
while True:
print("R: ", ser.readline()) | 21 | 45 | 0.67619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11 | 0.104762 |
f78d0e1c968d2c094e91caabfbf0e1efad8f0eb3 | 1,009 | py | Python | examples/avro/py/generate_avro_users.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | examples/avro/py/generate_avro_users.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | examples/avro/py/generate_avro_users.py | kikkomep/pydoop | 4f855ef775b925b8c9f2adf1c0ef13337323ee24 | [
"Apache-2.0"
] | null | null | null | import sys
import random
import avro.schema
from avro.datafile import DataFileWriter
from avro.io import DatumWriter
NAME_POOL = ['george', 'john', 'paul', 'ringo']
OFFICE_POOL = ['office-%d' % _ for _ in xrange(4)]
COLOR_POOL = ['black', 'cyan', 'magenta', 'yellow']
def main(argv):
try:
schema_fn = arg... | 28.027778 | 69 | 0.597621 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 170 | 0.168484 |
f78d23bb7041a7dd86f556d3f4cd134329c150dd | 2,604 | py | Python | tests/utils_tests/testing_tests/assertions_tests/test_assert_is_bbox_dataset.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 1 | 2018-12-27T03:47:45.000Z | 2018-12-27T03:47:45.000Z | tests/utils_tests/testing_tests/assertions_tests/test_assert_is_bbox_dataset.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | null | null | null | tests/utils_tests/testing_tests/assertions_tests/test_assert_is_bbox_dataset.py | souravsingh/chainercv | 8f76510472bc95018c183e72f37bc6c34a89969c | [
"MIT"
] | 2 | 2019-12-16T02:20:26.000Z | 2022-01-17T02:00:49.000Z | import numpy as np
import unittest
from chainer.dataset import DatasetMixin
from chainer import testing
from chainercv.utils import assert_is_bbox_dataset
from chainercv.utils import generate_random_bbox
class BboxDataset(DatasetMixin):
def __init__(self, options=(), empty_bbox=False):
self.options = o... | 28.304348 | 78 | 0.656298 | 1,858 | 0.713518 | 0 | 0 | 770 | 0.295699 | 0 | 0 | 136 | 0.052227 |
f78da1263e700a0f21ebec44c019c94ee9c11482 | 3,002 | py | Python | seahub/utils/http.py | Xandersoft/seahub | f75f238b3e0a907e8a8003f419e367fa36e992e7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | seahub/utils/http.py | Xandersoft/seahub | f75f238b3e0a907e8a8003f419e367fa36e992e7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | seahub/utils/http.py | Xandersoft/seahub | f75f238b3e0a907e8a8003f419e367fa36e992e7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012-2016 Seafile Ltd.
from __future__ import unicode_literals
import unicodedata
import urlparse
import json
from functools import wraps
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseForbidden
class _HTTPException(Exception):
def __init__(self, message=''):
se... | 35.317647 | 103 | 0.676549 | 298 | 0.099267 | 0 | 0 | 492 | 0.163891 | 0 | 0 | 1,107 | 0.368754 |
f78df0be4fb31a9f76737c561c3fe76708dbdcd5 | 187 | py | Python | biopipen/core/defaults.py | pwwang/bioprocs | 4055a62eed8ef4fba0a5f1be430af72a9e22143d | [
"MIT"
] | 4 | 2018-01-16T08:25:53.000Z | 2019-01-03T23:41:31.000Z | biopipen/core/defaults.py | pwwang/bioprocs | 4055a62eed8ef4fba0a5f1be430af72a9e22143d | [
"MIT"
] | 3 | 2018-05-22T20:11:46.000Z | 2019-08-19T17:37:04.000Z | biopipen/core/defaults.py | pwwang/bioprocs | 4055a62eed8ef4fba0a5f1be430af72a9e22143d | [
"MIT"
] | 1 | 2019-01-14T23:14:24.000Z | 2019-01-14T23:14:24.000Z | """Provide default settgins"""
from pathlib import Path
BIOPIPEN_DIR = Path(__file__).parent.parent.resolve()
REPORT_DIR = BIOPIPEN_DIR / "reports"
SCRIPT_DIR = BIOPIPEN_DIR / "scripts"
| 26.714286 | 53 | 0.770053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.256684 |
f7904ac31330990ac63a4b3068ea84654cf9b168 | 6,172 | py | Python | pextant/sextant.py | norheim/pextant | f4235719279c0e6f178ae1e0f8b1ea3346533915 | [
"MIT"
] | null | null | null | pextant/sextant.py | norheim/pextant | f4235719279c0e6f178ae1e0f8b1ea3346533915 | [
"MIT"
] | 1 | 2019-12-03T03:52:41.000Z | 2019-12-04T14:50:36.000Z | pextant/sextant.py | norheim/pextant | f4235719279c0e6f178ae1e0f8b1ea3346533915 | [
"MIT"
] | 1 | 2019-12-03T02:37:57.000Z | 2019-12-03T02:37:57.000Z | from flask_settings import GEOTIFF_FULL_PATH
import sys
import traceback
sys.path.append('../')
import numpy as np
import json
from datetime import timedelta
from functools import update_wrapper
from pextant.EnvironmentalModel import GDALMesh
from pextant.explorers import Astronaut
from pextant.analysis.loadWaypoints... | 38.098765 | 121 | 0.638043 | 0 | 0 | 0 | 0 | 3,371 | 0.546176 | 0 | 0 | 807 | 0.130752 |
f7905a650574afa3ef5e426f0e640ab9b3607fe3 | 10,085 | py | Python | packages/gtmapi/service.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 60 | 2018-09-26T15:46:00.000Z | 2021-10-10T02:37:14.000Z | packages/gtmapi/service.py | gigabackup/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 1,706 | 2018-09-26T16:11:22.000Z | 2021-08-20T13:37:59.000Z | packages/gtmapi/service.py | griffinmilsap/gigantum-client | 70fe6b39b87b1c56351f2b4c551b6f1693813e4f | [
"MIT"
] | 11 | 2019-03-14T13:23:51.000Z | 2022-01-25T01:29:16.000Z | #!/usr/bin/python3
import shutil
import os
import base64
from time import sleep
import flask
import requests.exceptions
import blueprint
from flask_cors import CORS
from confhttpproxy import ProxyRouter, ProxyRouterException
from flask import Flask, jsonify
import rest_routes
from lmsrvcore.utilities.migrate import... | 38.938224 | 133 | 0.69529 | 0 | 0 | 0 | 0 | 535 | 0.053049 | 0 | 0 | 4,947 | 0.49053 |
f79637ff2082c4edbb504887dfd73b4aed28edc7 | 37,112 | py | Python | bitten/model.py | dokipen/bitten | d4d2829c63eec84bcfab05ec7035a23e85d90c00 | [
"BSD-3-Clause"
] | 1 | 2016-08-28T03:13:03.000Z | 2016-08-28T03:13:03.000Z | bitten/model.py | dokipen/bitten | d4d2829c63eec84bcfab05ec7035a23e85d90c00 | [
"BSD-3-Clause"
] | null | null | null | bitten/model.py | dokipen/bitten | d4d2829c63eec84bcfab05ec7035a23e85d90c00 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005-2007 Christopher Lenz <[email protected]>
# Copyright (C) 2007 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://bitte... | 37.000997 | 148 | 0.551304 | 36,309 | 0.978363 | 6,362 | 0.171427 | 0 | 0 | 0 | 0 | 9,788 | 0.263742 |
f797289b8fbe1305efddd975d80c58646d9ec219 | 2,555 | py | Python | ml_model.py | CristopherNim/student_performance | f1ec90329e91c44a8155d83c0ac1569eb038954e | [
"MIT"
] | null | null | null | ml_model.py | CristopherNim/student_performance | f1ec90329e91c44a8155d83c0ac1569eb038954e | [
"MIT"
] | null | null | null | ml_model.py | CristopherNim/student_performance | f1ec90329e91c44a8155d83c0ac1569eb038954e | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.linear_model import Ridge
from sklearn.model_selection import cross_val_score, train_test_split
from sklearn.model_selection import RepeatedKFold
from sklearn.preprocessing import OneHotEncoder
import pickle
from flask import Flask, request
np.random.seed(42... | 35.486111 | 111 | 0.720157 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 706 | 0.276321 |
f7977957e2a1122df1f177f30c24042002dc1e88 | 1,088 | py | Python | src/ralph/models/edx/enrollment/fields/contexts.py | p-bizouard/ralph | 50a37f6b070dcb4109dcc49d8d885949a0099643 | [
"MIT"
] | 5 | 2020-06-26T10:44:23.000Z | 2022-01-26T11:41:03.000Z | src/ralph/models/edx/enrollment/fields/contexts.py | p-bizouard/ralph | 50a37f6b070dcb4109dcc49d8d885949a0099643 | [
"MIT"
] | 73 | 2020-02-18T15:09:25.000Z | 2022-03-14T13:32:20.000Z | src/ralph/models/edx/enrollment/fields/contexts.py | p-bizouard/ralph | 50a37f6b070dcb4109dcc49d8d885949a0099643 | [
"MIT"
] | 4 | 2020-02-27T12:52:10.000Z | 2021-11-23T19:45:07.000Z | """Enrollment event models context fields definitions"""
from typing import Literal, Union
from ...base import BaseContextField
class EdxCourseEnrollmentUpgradeClickedContextField(BaseContextField):
"""Represents the `context` field of the `edx.course.enrollment.upgrade_clicked`
server statement.
In ad... | 31.085714 | 86 | 0.731618 | 952 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 796 | 0.731618 |
f7979a1edf5e664d9fd5011a9f7390b351722d3b | 834 | py | Python | tests/profiles/fontval_test.py | kennethormandy/fontbakery | ec569215cd7919e125089bd6f65346afa9e75546 | [
"Apache-2.0"
] | null | null | null | tests/profiles/fontval_test.py | kennethormandy/fontbakery | ec569215cd7919e125089bd6f65346afa9e75546 | [
"Apache-2.0"
] | null | null | null | tests/profiles/fontval_test.py | kennethormandy/fontbakery | ec569215cd7919e125089bd6f65346afa9e75546 | [
"Apache-2.0"
] | 1 | 2020-06-14T17:13:59.000Z | 2020-06-14T17:13:59.000Z | import os
import pytest
from fontbakery.utils import TEST_FILE
from fontbakery.checkrunner import ERROR
def test_check_fontvalidator():
""" MS Font Validator checks """
from fontbakery.profiles.fontval import com_google_fonts_check_fontvalidator as check
font = TEST_FILE("mada/Mada-Regular.ttf")
# we want t... | 28.758621 | 87 | 0.732614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.344125 |
f797a2004904bea8641ef96760d4f8b68d968963 | 3,662 | py | Python | app/views.py | sinantan/TechRSS | f07d21b5553534ef6ecb6da6dc89524a8bbdb505 | [
"MIT"
] | 3 | 2019-10-26T13:31:21.000Z | 2020-02-26T20:46:35.000Z | app/views.py | sinantan/TechRSS | f07d21b5553534ef6ecb6da6dc89524a8bbdb505 | [
"MIT"
] | null | null | null | app/views.py | sinantan/TechRSS | f07d21b5553534ef6ecb6da6dc89524a8bbdb505 | [
"MIT"
] | null | null | null | from run import app
from functools import wraps
from flask import render_template,flash,redirect,logging,session,url_for,request
from .models.database import user_register, user_login, get_feed, get_user_info, update_feed, change_password
#kullanıcı giriş decorator'u. bu yapı tüm decoratorlarda aynı.
def lo... | 34.87619 | 176 | 0.706445 | 0 | 0 | 0 | 0 | 3,118 | 0.843158 | 0 | 0 | 1,080 | 0.29205 |
f797b24b3f7362f5aa140f0cf6036ab769afd566 | 4,671 | py | Python | kubails/commands/service.py | DevinSit/kubails | b3b2f9487d815868f0fbe9fae649789a40b50ad8 | [
"MIT"
] | 2 | 2019-05-28T00:26:52.000Z | 2019-08-02T23:02:19.000Z | kubails/commands/service.py | DevinSit/kubails | b3b2f9487d815868f0fbe9fae649789a40b50ad8 | [
"MIT"
] | 51 | 2019-12-23T04:34:40.000Z | 2022-02-12T02:28:44.000Z | kubails/commands/service.py | DevinSit/kubails | b3b2f9487d815868f0fbe9fae649789a40b50ad8 | [
"MIT"
] | 1 | 2019-09-11T20:12:18.000Z | 2019-09-11T20:12:18.000Z | import click
import logging
import sys
from typing import Tuple
from kubails.commands import helpers
from kubails.services.config_store import ConfigStore
from kubails.services.service import Service
from kubails.resources.templates import SERVICE_TEMPLATES
from kubails.utils.command_helpers import log_command_args_fac... | 26.241573 | 84 | 0.676301 | 0 | 0 | 0 | 0 | 4,011 | 0.858703 | 0 | 0 | 1,587 | 0.339756 |
f797e5f31f0f4940006d8b4a1e545eb141db847d | 10,703 | py | Python | tests/sentry/integrations/cloudflare/test_webhook.py | jianyuan/sentry | ceb8389c54d29f80b27703bb76c3880d923a3a5a | [
"BSD-3-Clause"
] | 1 | 2017-10-18T19:40:14.000Z | 2017-10-18T19:40:14.000Z | tests/sentry/integrations/cloudflare/test_webhook.py | Munyola/sentry | ab8923b2801d7d72d6903e0d9180584817bb1b9a | [
"BSD-3-Clause"
] | 1 | 2021-02-24T04:32:19.000Z | 2021-02-24T04:32:19.000Z | tests/sentry/integrations/cloudflare/test_webhook.py | Munyola/sentry | ab8923b2801d7d72d6903e0d9180584817bb1b9a | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
from hashlib import sha256
import hmac
import json
import six
from sentry import options
from sentry.models import ApiToken, ProjectKey
from sentry.testutils import TestCase
UNSET = object()
class BaseWebhookTest(TestCase):
def setUp(self):
super(BaseWebhookTest, ... | 41.484496 | 98 | 0.613566 | 10,458 | 0.977109 | 0 | 0 | 0 | 0 | 0 | 0 | 2,444 | 0.228347 |
f79944d2cfc0c1247874648a3a289225bce5b0b8 | 669 | py | Python | teacher_files/ia_fopera/version sockets (unix only) d'H. Roussille/neurones.py | zomboyd/epi-ml | 383c28f27e4fdef715e94d1a0e0cd24afe368f86 | [
"MIT"
] | null | null | null | teacher_files/ia_fopera/version sockets (unix only) d'H. Roussille/neurones.py | zomboyd/epi-ml | 383c28f27e4fdef715e94d1a0e0cd24afe368f86 | [
"MIT"
] | null | null | null | teacher_files/ia_fopera/version sockets (unix only) d'H. Roussille/neurones.py | zomboyd/epi-ml | 383c28f27e4fdef715e94d1a0e0cd24afe368f86 | [
"MIT"
] | null | null | null | from math import exp,sqrt
from random import randrange
class neurone:
def __init__(self,a,b):
self.a=a
self.b=b
def proceed(self,z):
t = z[0]*self.a + z[1]*self.b
return 1/(1+exp(-t))
n = 100
X_app = [(randrange(-500,501)/1000,randrange(-500,501)/1000) for i in range(n)]
Y_app ... | 27.875 | 79 | 0.600897 | 168 | 0.251121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f799652a7ef1e45432c147799e5cb274b7f73f41 | 29,113 | py | Python | CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/apps/storymap/storymap.py | moazzamwaheed2017/carparkapi | e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a | [
"MIT"
] | null | null | null | CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/apps/storymap/storymap.py | moazzamwaheed2017/carparkapi | e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a | [
"MIT"
] | 9 | 2020-02-03T15:50:10.000Z | 2022-03-02T07:11:34.000Z | CarParkArcGisApi/CarParkArcGisApi/env/Lib/site-packages/arcgis/apps/storymap/storymap.py | moazzamwaheed2017/carparkapi | e52ae1b2aed47321ce9d22ba6cd0b85fa60a417a | [
"MIT"
] | null | null | null | import json
import datetime
import mimetypes
from urllib.parse import urlparse
from arcgis import env
from arcgis.gis import GIS
from arcgis.gis import Item
from ._ref import reference
class JournalStoryMap(object):
"""
Represents a Journal Story Map
=============== ===================================... | 44.177542 | 131 | 0.334352 | 28,921 | 0.993405 | 0 | 0 | 4,287 | 0.147254 | 0 | 0 | 16,861 | 0.579157 |
f799698de0ff8776338f8a1ec460edf6e103c58f | 703 | py | Python | tests/test_core.py | emauton/aoc2015 | f321571b623a0e7acaa173be57506e64bd32765f | [
"MIT"
] | null | null | null | tests/test_core.py | emauton/aoc2015 | f321571b623a0e7acaa173be57506e64bd32765f | [
"MIT"
] | null | null | null | tests/test_core.py | emauton/aoc2015 | f321571b623a0e7acaa173be57506e64bd32765f | [
"MIT"
] | null | null | null | from aoc2015.core import dispatch
def test_dispatch_fail(capsys):
'''Dispatch fails properly when passed a bad day'''
# capsys is a pytest fixture that allows asserts agains stdout/stderr
# https://docs.pytest.org/en/stable/capture.html
dispatch(['204'])
captured = capsys.readouterr()
assert '... | 35.15 | 73 | 0.702703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 407 | 0.578947 |
f79a3d652453d780701f42332b40981d8f1da3a1 | 2,749 | py | Python | bin/pannzer/operators/output_DE.py | nestorzaburannyi/annotate | e175226504efef811d4ac3914f2ab342968edf98 | [
"MIT"
] | 1 | 2021-11-26T17:29:56.000Z | 2021-11-26T17:29:56.000Z | bin/pannzer/operators/output_DE.py | nestorzaburannyi/annotate | e175226504efef811d4ac3914f2ab342968edf98 | [
"MIT"
] | 1 | 2020-03-19T21:12:23.000Z | 2020-03-19T21:12:23.000Z | bin/pannzer/operators/output_DE.py | nestorzaburannyi/annotate | e175226504efef811d4ac3914f2ab342968edf98 | [
"MIT"
] | null | null | null | from myoperator import BlockOperator
import re
class output_DE(BlockOperator):
"""
Select one line per DE-cluster with the best quality description.
Creates cluster_data column 'desc','genename'
Inputs: data columns 'clusid','desc','FF','status'
cluster_data column 'clu... | 45.816667 | 167 | 0.476901 | 2,699 | 0.981812 | 0 | 0 | 0 | 0 | 0 | 0 | 569 | 0.206984 |
f79b68b39e1d3fc6804f9e60df51a84aec79e5e5 | 6,016 | py | Python | Utility.py | psarkozy/HWTester | 2553398f4ac8645a897b4f41bd36a21d54d2b177 | [
"MIT"
] | null | null | null | Utility.py | psarkozy/HWTester | 2553398f4ac8645a897b4f41bd36a21d54d2b177 | [
"MIT"
] | null | null | null | Utility.py | psarkozy/HWTester | 2553398f4ac8645a897b4f41bd36a21d54d2b177 | [
"MIT"
] | 2 | 2019-11-11T12:44:17.000Z | 2020-11-20T11:08:53.000Z | import os
from StringIO import StringIO
from zipfile import ZipFile
import subprocess
import shutil
import fcntl
import time
import signal
import imp
import sys,traceback
def dir_clean_error(function,path,excinfo):
print 'WARNING: Ran into issues trying to remove directory:',path,str(function),str(excinfo)
def cle... | 39.064935 | 223 | 0.636137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,038 | 0.17254 |
f79bf4e8cdd9d2e6fe7f0243351b84e61c125647 | 1,432 | py | Python | wagtailsharing/tests/test_urls.py | mikiec84/wagtail-sharing | e3c338dae3327d955f058b5eb2f311d4dc0cbbf7 | [
"CC0-1.0"
] | 1 | 2019-02-25T21:56:56.000Z | 2019-02-25T21:56:56.000Z | wagtailsharing/tests/test_urls.py | mikiec84/wagtail-sharing | e3c338dae3327d955f058b5eb2f311d4dc0cbbf7 | [
"CC0-1.0"
] | null | null | null | wagtailsharing/tests/test_urls.py | mikiec84/wagtail-sharing | e3c338dae3327d955f058b5eb2f311d4dc0cbbf7 | [
"CC0-1.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
try:
from importlib import reload
except ImportError:
pass
from django.conf.urls import url
from django.test import TestCase
from mock import patch
try:
import wagtail.core.urls as wagtail_core_urls
except ImportError: # pragma: no cover; fallback... | 28.078431 | 76 | 0.657821 | 1,006 | 0.702514 | 0 | 0 | 0 | 0 | 0 | 0 | 175 | 0.122207 |
f79fdffacf758f6c9d435f6cbf7feae5c9594ded | 1,295 | py | Python | py2neo/timing.py | VitalyRomanov/py2neo | 2d0683cf2ab8b77b0c5bbba4eade0003c68d5905 | [
"Apache-2.0"
] | null | null | null | py2neo/timing.py | VitalyRomanov/py2neo | 2d0683cf2ab8b77b0c5bbba4eade0003c68d5905 | [
"Apache-2.0"
] | null | null | null | py2neo/timing.py | VitalyRomanov/py2neo | 2d0683cf2ab8b77b0c5bbba4eade0003c68d5905 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2021, Nigel Small
#
# 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
#
# Unle... | 27.553191 | 74 | 0.68417 | 326 | 0.251737 | 299 | 0.230888 | 0 | 0 | 0 | 0 | 743 | 0.573745 |
f7a103da5061022bae213f777c49b0abb01710f8 | 656 | py | Python | LeapYearFinderClass.py | MichaelWiciak/LeapYearFinderClass | 1bc1326f60115bddc1639ff50256888448dd9645 | [
"MIT"
] | null | null | null | LeapYearFinderClass.py | MichaelWiciak/LeapYearFinderClass | 1bc1326f60115bddc1639ff50256888448dd9645 | [
"MIT"
] | null | null | null | LeapYearFinderClass.py | MichaelWiciak/LeapYearFinderClass | 1bc1326f60115bddc1639ff50256888448dd9645 | [
"MIT"
] | null | null | null | class LeapYearFinder(object):
def __init__(self):
pass
def findLeapYear(self, startYear, endYear):
leapYearRecord = []
for i in range(int(startYear),int(endYear)):
year = i
print(year,end = "\t")
#If year is divisible by 4... | 31.238095 | 88 | 0.492378 | 663 | 0.985141 | 0 | 0 | 0 | 0 | 0 | 0 | 133 | 0.197623 |
f7a18de75e2c5d8f0a8fefb62bdf2a19e6aa2d6f | 1,662 | py | Python | versions/versions.py | juanfec/juan_rueda_test | 1e5d6bccadc24569db26b5a8b58486c8295cef12 | [
"MIT"
] | null | null | null | versions/versions.py | juanfec/juan_rueda_test | 1e5d6bccadc24569db26b5a8b58486c8295cef12 | [
"MIT"
] | null | null | null | versions/versions.py | juanfec/juan_rueda_test | 1e5d6bccadc24569db26b5a8b58486c8295cef12 | [
"MIT"
] | null | null | null | # check to strings that represent version numbers and finds the greatest,
# 'equals' if they are the same version or 'Invalid Format'
# example: “1.2” is greater than “1.1”.
# for reusability this function just returns the version number or the word equals
# if a more elaborated answer is needed an interface would be... | 42.615385 | 82 | 0.570397 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 680 | 0.407186 |
e38a4870c5f8e88d0175c33a20658010577ed3a2 | 824 | py | Python | packages/pyright-internal/src/tests/samples/match7.py | Strum355/pyright | 01f15ce31f8f6cd9a054e21fc48cb762923ae25d | [
"MIT"
] | null | null | null | packages/pyright-internal/src/tests/samples/match7.py | Strum355/pyright | 01f15ce31f8f6cd9a054e21fc48cb762923ae25d | [
"MIT"
] | null | null | null | packages/pyright-internal/src/tests/samples/match7.py | Strum355/pyright | 01f15ce31f8f6cd9a054e21fc48cb762923ae25d | [
"MIT"
] | null | null | null | # This sample tests type narrowing of subject expressions for
# match statements.
from typing import Literal
def func1(subj: int | dict[str, str] | tuple[int] | str, cond: bool):
match subj:
case (3 | "hi"):
t_v1: Literal["Literal[3, 'hi']"] = reveal_type(subj)
return
cas... | 23.542857 | 76 | 0.527913 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.18568 |
e38a5b70b844182225b5e64d4a3c3af08686053b | 1,869 | py | Python | examples/finance/stocks_baselines.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | examples/finance/stocks_baselines.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | examples/finance/stocks_baselines.py | TianhaoFu/MultiBench | b174a3187124d6f92be1ff3b487eef292f7883bb | [
"MIT"
] | null | null | null | import sys
import os
sys.path.append(os.getcwd())
import argparse
import numpy as np
import pmdarima
import torch
import torch.nn.functional as F
from torch import nn
from fusions.common_fusions import Stack
from unimodals.common_models import LSTMWithLinear
from datasets.stocks.get_data import get_dataloader
parser... | 41.533333 | 129 | 0.721776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 262 | 0.140182 |
e38a5e9b805eaee8a5ed1bb8c56f9e375e34bdfa | 3,329 | py | Python | textmate/bundles/LaTeX.tmbundle/Support/lib/Python/tmprefs.py | leo-brewin/hybrid-latex | 2debaf3f97eb551928d08dc4baded7ef7a4ab29a | [
"MIT"
] | 16 | 2018-10-12T06:31:49.000Z | 2022-03-31T23:16:08.000Z | textmate/bundles/LaTeX.tmbundle/Support/lib/Python/tmprefs.py | leo-brewin/hybrid-latex | 2debaf3f97eb551928d08dc4baded7ef7a4ab29a | [
"MIT"
] | null | null | null | textmate/bundles/LaTeX.tmbundle/Support/lib/Python/tmprefs.py | leo-brewin/hybrid-latex | 2debaf3f97eb551928d08dc4baded7ef7a4ab29a | [
"MIT"
] | 2 | 2021-06-27T03:29:40.000Z | 2022-03-30T17:17:18.000Z | # -- Imports ------------------------------------------------------------------
from __future__ import print_function
from __future__ import unicode_literals
from Foundation import CFPreferencesAppSynchronize, CFPreferencesCopyAppValue
from os import getenv
# -- Class -----------------------------------------------... | 31.11215 | 79 | 0.545209 | 2,910 | 0.874136 | 0 | 0 | 0 | 0 | 0 | 0 | 1,950 | 0.585761 |
e38ad8911f43a8dc1cf2caa5fecf9c3fdcb3062c | 1,916 | py | Python | parsetab.py | UVG-Teams/analizador-lexico-sintactico | 71ac98e11fc63c6fcba36e94d9d40f0e59b6d55f | [
"MIT"
] | null | null | null | parsetab.py | UVG-Teams/analizador-lexico-sintactico | 71ac98e11fc63c6fcba36e94d9d40f0e59b6d55f | [
"MIT"
] | null | null | null | parsetab.py | UVG-Teams/analizador-lexico-sintactico | 71ac98e11fc63c6fcba36e94d9d40f0e59b6d55f | [
"MIT"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftIMPLIESSIMPLIESleftANDORleftRPARENLPARENrightNEGATIONALPHABET AND IMPLIES LPAREN NEGATION OR PREDICATE RPAREN SIMPLIESexpr : expr AND exprexpr : ALPHABETexpr : expr... | 50.421053 | 538 | 0.601775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 804 | 0.419624 |
e38c0cf17108b05c381e4d71a5abca8083aae594 | 6,936 | py | Python | Q1_ab.py | dkilike/Image-Segmentation | 6a3ab7f96d105475051502aba8013c242eba5fcb | [
"ADSL"
] | 2 | 2019-05-05T01:52:23.000Z | 2019-05-06T22:56:54.000Z | Q1_ab.py | dkilike/Image-Segmentation | 6a3ab7f96d105475051502aba8013c242eba5fcb | [
"ADSL"
] | null | null | null | Q1_ab.py | dkilike/Image-Segmentation | 6a3ab7f96d105475051502aba8013c242eba5fcb | [
"ADSL"
] | null | null | null | '''Please write a program to read the scan and print out
The maximum voxel intensity
The mean voxel intensity
The coordinates of the centre of the image volume, in the scanner coordinate system.
'''
import pydicom
import numpy as np
import matplotlib.pyplot as plt
import cv2
import glob
import os
import image_slicer
... | 36.698413 | 131 | 0.697953 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,034 | 0.581603 |
e38c2e039b77985412d12e168040f3115a42b4f3 | 1,759 | py | Python | 12/day_twelve.py | tmay-sarsaparilla/advent-of-code-2021 | 3cd827df57d315dd96627544b9f5c31b7db1aa11 | [
"MIT"
] | null | null | null | 12/day_twelve.py | tmay-sarsaparilla/advent-of-code-2021 | 3cd827df57d315dd96627544b9f5c31b7db1aa11 | [
"MIT"
] | null | null | null | 12/day_twelve.py | tmay-sarsaparilla/advent-of-code-2021 | 3cd827df57d315dd96627544b9f5c31b7db1aa11 | [
"MIT"
] | null | null | null |
def find_paths(start, connections, visited=None, small_cave_visited_twice=False):
if visited is None:
visited = ["start"]
possible_connections = [e for s, e in connections if s == start] + [s for s, e in connections if e == start]
paths = []
if not possible_connections:
raise ValueErro... | 34.490196 | 112 | 0.604321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 240 | 0.136441 |
e38df443614ff2ea0fe09c328aa447f49ee9a8df | 146 | py | Python | pythonic_binance/__init__.py | hANSIc99/pythonic-binance | df25353cc20f545224d97a34544844029dabe4ce | [
"MIT"
] | 1 | 2020-12-23T03:20:01.000Z | 2020-12-23T03:20:01.000Z | pythonic_binance/__init__.py | hANSIc99/pythonic-binance | df25353cc20f545224d97a34544844029dabe4ce | [
"MIT"
] | null | null | null | pythonic_binance/__init__.py | hANSIc99/pythonic-binance | df25353cc20f545224d97a34544844029dabe4ce | [
"MIT"
] | null | null | null | """An unofficial Python wrapper for the Binance exchange API v3
.. moduleauthor:: Sam McHardy
.. modified by Stephan Avenwedde for Pythonic
"""
| 20.857143 | 63 | 0.753425 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.993151 |
e38e7b771230b46e0d59d9e9f903a942ff021817 | 1,643 | py | Python | tests/unit/test_question_answer.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 2 | 2019-06-11T20:46:43.000Z | 2020-08-27T22:50:32.000Z | tests/unit/test_question_answer.py | Lunga001/pmg-cms-2 | 10cea3979711716817b0ba2a41987df73f2c7642 | [
"Apache-2.0"
] | 70 | 2017-05-26T14:04:06.000Z | 2021-06-30T10:21:58.000Z | tests/unit/test_question_answer.py | OpenUpSA/pmg-cms-2 | ec5f259dae81674ac7a8cdb80f124a8b0f167780 | [
"Apache-2.0"
] | 4 | 2017-08-29T10:09:30.000Z | 2021-05-25T11:29:03.000Z | import os
from tests import PMGTestCase
from tests.fixtures import dbfixture, CommitteeQuestionData
class TestQuestionAnswer(PMGTestCase):
def setUp(self):
super(TestQuestionAnswer, self).setUp()
self.fx = dbfixture.data(CommitteeQuestionData,)
self.fx.setup()
def tearDown(self):
... | 33.530612 | 80 | 0.645161 | 1,540 | 0.93731 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.102861 |
e38eb4838b0bca24f076f914d11b9ed6e01734df | 1,470 | py | Python | Job-Interviews/Python/BinaryTrees/Problem2.py | JuanPabloMontoya271/ITC | f5899e7a8fed4e9f90e97bb3af635a276d9cf13a | [
"MIT"
] | 1 | 2020-11-02T15:18:16.000Z | 2020-11-02T15:18:16.000Z | Job-Interviews/Python/BinaryTrees/Problem2.py | JuanPabloMontoya271/ITC | f5899e7a8fed4e9f90e97bb3af635a276d9cf13a | [
"MIT"
] | null | null | null | Job-Interviews/Python/BinaryTrees/Problem2.py | JuanPabloMontoya271/ITC | f5899e7a8fed4e9f90e97bb3af635a276d9cf13a | [
"MIT"
] | 1 | 2021-10-30T14:18:29.000Z | 2021-10-30T14:18:29.000Z | class Tree:
def __init__(self, val,left = None, right = None):
self.val = val
self.left = left
self.right = right
root = Tree(4, left = Tree(3), right=Tree(5, left= Tree(4)))
#InOrderTraversal
def InOrderTraversal(root, res = []):
if root is None:
return res
... | 28.269231 | 61 | 0.614286 | 145 | 0.098639 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.080272 |
e38ef669498a375d8712d764abb891d4af6ac615 | 4,429 | py | Python | csv_analyzer/apps/dataset/api/dataset.py | saduqz/csv-analyzer-test | 732d4902aeba9278e7547ed5a83e4a482790076c | [
"MIT"
] | null | null | null | csv_analyzer/apps/dataset/api/dataset.py | saduqz/csv-analyzer-test | 732d4902aeba9278e7547ed5a83e4a482790076c | [
"MIT"
] | null | null | null | csv_analyzer/apps/dataset/api/dataset.py | saduqz/csv-analyzer-test | 732d4902aeba9278e7547ed5a83e4a482790076c | [
"MIT"
] | null | null | null | from datetime import datetime
# Rest framework
from rest_framework import status
from rest_framework.decorators import action
from rest_framework.mixins import RetrieveModelMixin, ListModelMixin, UpdateModelMixin, CreateModelMixin
from rest_framework.response import Response
from rest_framework.viewsets import Generic... | 33.300752 | 109 | 0.664484 | 3,574 | 0.806954 | 0 | 0 | 2,002 | 0.452021 | 0 | 0 | 687 | 0.155114 |
e38f3cccadcd0f9b76ee123f571fa527044e60b4 | 11,984 | py | Python | tfx_bsl/tfxio/tensor_to_arrow_test.py | brills/tfx-bsl | 089d6673a8d3cccef84ff3d6583808544d2da038 | [
"Apache-2.0"
] | null | null | null | tfx_bsl/tfxio/tensor_to_arrow_test.py | brills/tfx-bsl | 089d6673a8d3cccef84ff3d6583808544d2da038 | [
"Apache-2.0"
] | null | null | null | tfx_bsl/tfxio/tensor_to_arrow_test.py | brills/tfx-bsl | 089d6673a8d3cccef84ff3d6583808544d2da038 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.044444 | 80 | 0.550484 | 3,809 | 0.31784 | 0 | 0 | 1,714 | 0.143024 | 0 | 0 | 2,095 | 0.174816 |
e38f485bd754322f09d50cbe4ef3dae03d97f83a | 417 | py | Python | th_watchdog/failure_email.py | hwjeremy/th-watchdog | c32682f838fffa3396cabc3d83eeb4960c765fc9 | [
"MIT"
] | null | null | null | th_watchdog/failure_email.py | hwjeremy/th-watchdog | c32682f838fffa3396cabc3d83eeb4960c765fc9 | [
"MIT"
] | null | null | null | th_watchdog/failure_email.py | hwjeremy/th-watchdog | c32682f838fffa3396cabc3d83eeb4960c765fc9 | [
"MIT"
] | null | null | null | """
Thornleigh Farm - VPN Watchdog
Failure Email Module
author: [email protected]
"""
from th_watchdog.email import Email
class FailureEmail(Email):
"""
An email notifying the administrator of a failed state
"""
SUBJECT = 'Starport VPN connection lost'
BODY = 'Starport has lost connection to th... | 21.947368 | 58 | 0.690647 | 289 | 0.693046 | 0 | 0 | 0 | 0 | 0 | 0 | 229 | 0.549161 |
e390652d724f8e334ded89e33631ccb73990db8b | 2,749 | py | Python | nemo/nemo/backends/pytorch/common/data.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | 1 | 2020-03-22T11:23:11.000Z | 2020-03-22T11:23:11.000Z | nemo/nemo/backends/pytorch/common/data.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | null | null | null | nemo/nemo/backends/pytorch/common/data.py | petermartigny/NeMo | b20821e637314940e36b63d32c601c43d1b74051 | [
"Apache-2.0"
] | 1 | 2019-10-23T01:19:19.000Z | 2019-10-23T01:19:19.000Z | __all__ = ['TextDataLayer']
from functools import partial
import torch
from torch.utils.data import DataLoader, DistributedSampler
from nemo.backends.pytorch.common.parts import TextDataset
from nemo.backends.pytorch.nm import DataLayerNM
from nemo.core import DeviceType
from nemo.core.neural_types import *
from nem... | 29.244681 | 79 | 0.616588 | 2,399 | 0.872681 | 0 | 0 | 877 | 0.319025 | 0 | 0 | 722 | 0.262641 |
e39338fd7b675e7103c88c702302ca7865a71de5 | 21,161 | py | Python | bot.py | marsDurden/UnipdBot | 402b74f6bd876265b952f052e2c132f6aa3c050d | [
"Unlicense"
] | 4 | 2018-04-12T03:39:36.000Z | 2019-11-26T07:52:30.000Z | bot.py | marsDurden/UnipdBot | 402b74f6bd876265b952f052e2c132f6aa3c050d | [
"Unlicense"
] | null | null | null | bot.py | marsDurden/UnipdBot | 402b74f6bd876265b952f052e2c132f6aa3c050d | [
"Unlicense"
] | 1 | 2019-10-07T16:50:48.000Z | 2019-10-07T16:50:48.000Z | import logging
from datetime import time, timedelta
from functools import wraps
# Telegram bot libraries
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackQueryHandler
from telegram import KeyboardButton, ReplyKeyboardMarkup, ParseMode, Bot, InlineKeyboardButton, InlineKeyboardMarkup
f... | 40.460803 | 228 | 0.641038 | 0 | 0 | 0 | 0 | 9,826 | 0.464323 | 0 | 0 | 2,826 | 0.133541 |
e39343d1ccb1c9771b5f47a5eb48d8ff84409b31 | 2,591 | py | Python | server/twitter.py | abijith-kp/Emolytics | 00e94798ab20621b51f6ce2a058e0dd8dec1cdba | [
"BSD-3-Clause"
] | null | null | null | server/twitter.py | abijith-kp/Emolytics | 00e94798ab20621b51f6ce2a058e0dd8dec1cdba | [
"BSD-3-Clause"
] | null | null | null | server/twitter.py | abijith-kp/Emolytics | 00e94798ab20621b51f6ce2a058e0dd8dec1cdba | [
"BSD-3-Clause"
] | null | null | null | from server import db, auth, emolytics
from server.models import Tweet
from classifier import create_classifier
from tweepy import Stream
from tweepy.streaming import StreamListener
from flask.ext.rq import job
import json
import random
from multiprocessing import Process
from sqlalchemy.exc import IntegrityError
d... | 27.56383 | 80 | 0.580857 | 555 | 0.214203 | 0 | 0 | 971 | 0.374759 | 0 | 0 | 646 | 0.249325 |
e3946d8baaf74d520467a9069ae0fdd15f75585b | 1,340 | py | Python | misc_code/extractGridFeatures.py | Lab-Work/gpsresilience | 7c5183092013d44ce6d295469880502407c0e4ac | [
"NCSA",
"Unlicense"
] | 21 | 2015-03-10T19:13:38.000Z | 2021-06-27T06:01:00.000Z | misc_code/extractGridFeatures.py | Lab-Work/gpsresilience | 7c5183092013d44ce6d295469880502407c0e4ac | [
"NCSA",
"Unlicense"
] | null | null | null | misc_code/extractGridFeatures.py | Lab-Work/gpsresilience | 7c5183092013d44ce6d295469880502407c0e4ac | [
"NCSA",
"Unlicense"
] | 17 | 2015-03-10T19:13:39.000Z | 2020-11-14T08:30:40.000Z | import csv
import os
import shutil
from datetime import datetime
from grid import *
#from cluster import *
from regions import *
start_time = datetime.now()
print("Allocating...")
#grid2
#gridSystem = GridSystem(-74.04, -73.775, 5, 40.63, 40.835, 5)
#gridname = "grid2"
#grid3
#gridSystem = GridSystem(-74.02, -73.9... | 20 | 81 | 0.636567 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 451 | 0.336567 |
e394ba0d9db0eefab6e3defb03dc2daf2b6faade | 6,472 | py | Python | haiku/_src/stateful_test.py | madisonmay/dm-haiku | de95f6f83561edeb582d46b2e3bf135051792b91 | [
"Apache-2.0"
] | null | null | null | haiku/_src/stateful_test.py | madisonmay/dm-haiku | de95f6f83561edeb582d46b2e3bf135051792b91 | [
"Apache-2.0"
] | null | null | null | haiku/_src/stateful_test.py | madisonmay/dm-haiku | de95f6f83561edeb582d46b2e3bf135051792b91 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2019 DeepMind Technologies Limited. 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
#
# ... | 30.102326 | 80 | 0.65204 | 5,130 | 0.792645 | 0 | 0 | 2,662 | 0.41131 | 0 | 0 | 1,198 | 0.185105 |
e395c0ffd85f1bb1c10ed76e50b3673348515641 | 1,205 | py | Python | pocketbook/commands/rename.py | ejfitzgerald/tools-pocketbook | c36254f3e39e875cacf50a5e90b9723e19c1ed9b | [
"Apache-2.0"
] | 1 | 2021-09-08T05:30:11.000Z | 2021-09-08T05:30:11.000Z | pocketbook/commands/rename.py | ejfitzgerald/tools-pocketbook | c36254f3e39e875cacf50a5e90b9723e19c1ed9b | [
"Apache-2.0"
] | 14 | 2019-12-30T17:43:22.000Z | 2021-11-18T10:45:14.000Z | pocketbook/commands/rename.py | ejfitzgerald/tools-pocketbook | c36254f3e39e875cacf50a5e90b9723e19c1ed9b | [
"Apache-2.0"
] | 3 | 2019-12-24T10:50:44.000Z | 2021-11-20T21:24:32.000Z | def run_rename(args):
from pocketbook.address_book import AddressBook
from pocketbook.key_store import KeyStore
address_book = AddressBook()
key_store = KeyStore()
# make sure that the new name is not present either as a key, or as an address
new_present = args.new in address_book.keys() or ar... | 35.441176 | 114 | 0.682988 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.286307 |
e396807417ead50e7f98ae6a7599b85f383deff5 | 395 | py | Python | src/orion/algo/robo/__init__.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/robo/__init__.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/robo/__init__.py | lebrice/orion.algo.robo | f7e14e305619344ed9afd303fecbfcabda6ae7ce | [
"BSD-3-Clause"
] | 2 | 2020-09-28T15:18:19.000Z | 2021-06-29T20:27:18.000Z | # -*- coding: utf-8 -*-
"""
Wrapper for RoBO
"""
__descr__ = "TODO"
__license__ = "BSD 3-Clause"
__author__ = u"Epistímio"
__author_short__ = u"Epistímio"
__author_email__ = "[email protected]"
__copyright__ = u"2021, Epistímio"
__url__ = "https://github.com/Epistimio/orion.algo.robo"
from ._version imp... | 21.944444 | 56 | 0.741772 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 200 | 0.502513 |
e399392a521bfe1faf93a652bafa6c185ca4d8e0 | 2,343 | py | Python | minimum/minimum-function.py | gunater/Numerical-methods | 4cf676b7d3996b7e70c6f4b50b15acc330a0d763 | [
"MIT"
] | null | null | null | minimum/minimum-function.py | gunater/Numerical-methods | 4cf676b7d3996b7e70c6f4b50b15acc330a0d763 | [
"MIT"
] | null | null | null | minimum/minimum-function.py | gunater/Numerical-methods | 4cf676b7d3996b7e70c6f4b50b15acc330a0d763 | [
"MIT"
] | null | null | null | """
Znaleść kąt á, przy którym zasięg skoku z wahadła będzie maksymalny. Należy
posłużyć się metodą złotego podziału.
Mateusz Ostrowski
Index:216708
"""
import matplotlib.pyplot as plt
import numpy as np
class Zloty_podzial:
def __init__(self, h, line, a0):
tau = (np.sqrt(5) - 1) / 2
a = 0.2
... | 31.662162 | 193 | 0.521554 | 1,709 | 0.721097 | 0 | 0 | 0 | 0 | 0 | 0 | 429 | 0.181013 |
e399bf6533e93672377322199e348e30448cbeff | 3,967 | py | Python | app/products/product_info.py | Group-16-COSC-310/grocery-chat-bot | a9759dd0a6d5b91733267ec4ed156f85f45c05ff | [
"MIT"
] | null | null | null | app/products/product_info.py | Group-16-COSC-310/grocery-chat-bot | a9759dd0a6d5b91733267ec4ed156f85f45c05ff | [
"MIT"
] | 7 | 2022-03-10T00:24:51.000Z | 2022-03-19T01:37:18.000Z | app/products/product_info.py | Group-16-COSC-310/grocery-chat-bot | a9759dd0a6d5b91733267ec4ed156f85f45c05ff | [
"MIT"
] | 1 | 2022-03-31T03:28:27.000Z | 2022-03-31T03:28:27.000Z | from app.database import MOCK_PRODUCT_DATA
import re
from app.products.base_handler import BaseHandler
class ProductInfoHandler(BaseHandler):
"""
A class used to represent a mini-bot to handle product queries.
"""
def __init__(self) -> None:
super().__init__()
def create_match_paterns(se... | 36.731481 | 138 | 0.590623 | 3,862 | 0.973532 | 0 | 0 | 0 | 0 | 0 | 0 | 1,235 | 0.311318 |
e39a4f94218457c4ddd8055721b30ec15463d320 | 5,940 | py | Python | qcdb/iface_psi4/runner.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | 1 | 2019-02-20T20:18:02.000Z | 2019-02-20T20:18:02.000Z | qcdb/iface_psi4/runner.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | qcdb/iface_psi4/runner.py | vivacebelles/qcdb | 5bbdcb5c833277647a36bb0a5982abb56bf29b20 | [
"BSD-3-Clause"
] | null | null | null | import sys
import copy
import pprint
pp = pprint.PrettyPrinter(width=120)
import inspect
import numpy as np
from .. import __version__
from .. import qcvars
from ..driver.driver_helpers import print_variables
from ..exceptions import *
from ..molecule import Molecule
from ..pdict import PreservingDict
from .worker im... | 28.834951 | 102 | 0.605724 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,793 | 0.470202 |
e39aa6632ad08319c28262297573d3c36b620844 | 670 | py | Python | users/models.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 8 | 2019-03-08T10:28:38.000Z | 2019-10-17T00:04:44.000Z | users/models.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 124 | 2020-02-11T23:51:09.000Z | 2022-01-13T01:06:09.000Z | users/models.py | tanmayag8958/upes-fipi-jigyasa | e05e41e7624175ae64216a54cc546bbb74b2df61 | [
"MIT"
] | 3 | 2019-03-07T18:44:55.000Z | 2019-03-08T10:36:50.000Z | from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
from django.db.models.signals import post_save
from django.dispatch import receiver
class User_details(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
team_count = models.Intege... | 39.411765 | 81 | 0.770149 | 477 | 0.71194 | 0 | 0 | 0 | 0 | 0 | 0 | 28 | 0.041791 |
e39b51664f30f25e2e70980af59a04bbf06d0208 | 10,685 | py | Python | script/study/sedov/sedov_main_function.py | will-iam/Variant | 5b6732134fd51cf6c2b90b51b7976be0693ba28d | [
"MIT"
] | 8 | 2017-05-04T07:50:02.000Z | 2019-05-17T02:27:20.000Z | script/study/sedov/sedov_main_function.py | will-iam/Variant | 5b6732134fd51cf6c2b90b51b7976be0693ba28d | [
"MIT"
] | null | null | null | script/study/sedov/sedov_main_function.py | will-iam/Variant | 5b6732134fd51cf6c2b90b51b7976be0693ba28d | [
"MIT"
] | null | null | null | #Main Sedov Code Module
#Ported to python from fortran code written by James R Kamm and F X Timmes
#Original Paper and code found at http://cococubed.asu.edu/papers/la-ur-07-2849.pdf
import numpy as np
from globalvars import comvars as gv
from sedov_1d import sed_1d
from sedov_1d_time import sed_1d_time
... | 44.3361 | 232 | 0.467759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,254 | 0.304539 |
e39bbfc2ad38c9bcb6507c0a41b528d361682009 | 224 | py | Python | packs/hue/actions/rgb.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 164 | 2015-01-17T16:08:33.000Z | 2021-08-03T02:34:07.000Z | packs/hue/actions/rgb.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 442 | 2015-01-01T11:19:01.000Z | 2017-09-06T23:26:17.000Z | packs/hue/actions/rgb.py | jonico/st2contrib | 149c9c553f24360d91a14fef7ea6146707de75fd | [
"Apache-2.0"
] | 202 | 2015-01-13T00:37:40.000Z | 2020-11-07T11:30:10.000Z | from lib import action
class RGBAction(action.BaseAction):
def run(self, light_id, red, green, blue, transition_time):
light = self.hue.lights.get(light_id)
light.rgb(red, green, blue, transition_time)
| 28 | 63 | 0.705357 | 198 | 0.883929 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e39de89d4940f42750569f7100f7133d1493a932 | 1,755 | py | Python | test/test_math_challenge.py | nikett/math_challenge_eval | bafe9f6d30fc5ffd97492ce5e42716f839c29c4f | [
"Apache-2.0"
] | null | null | null | test/test_math_challenge.py | nikett/math_challenge_eval | bafe9f6d30fc5ffd97492ce5e42716f839c29c4f | [
"Apache-2.0"
] | null | null | null | test/test_math_challenge.py | nikett/math_challenge_eval | bafe9f6d30fc5ffd97492ce5e42716f839c29c4f | [
"Apache-2.0"
] | null | null | null | import unittest
from typing import Dict, List
from src.math_challenge import Challenge, DEFAULT_EMPTY_ANS
from src.student_info import StudentInfo
class TestChallenge(unittest.TestCase):
def test_preprocess(self):
self.assertEqual(Challenge.preprocess_ans("a. 37th floor, b. 42nd floor, c. 39th floor, d. ... | 51.617647 | 150 | 0.707123 | 1,555 | 0.88604 | 0 | 0 | 0 | 0 | 0 | 0 | 540 | 0.307692 |
e39ec861b279f059e70d4bea0eec9d21d1b19ced | 6,784 | py | Python | MyBot.py | joebieb/halite | da389aa8e9f97a0ac6a417ca53023609376c0dc6 | [
"MIT"
] | null | null | null | MyBot.py | joebieb/halite | da389aa8e9f97a0ac6a417ca53023609376c0dc6 | [
"MIT"
] | null | null | null | MyBot.py | joebieb/halite | da389aa8e9f97a0ac6a417ca53023609376c0dc6 | [
"MIT"
] | null | null | null | import hlt
import logging
from collections import OrderedDict
# GAME START
game = hlt.Game("Spoof_v7")
logging.info('Starting my %s bot!', game._name)
TURN = 0
def navigate(ship, entity, multiplier = 1):
navigate_command = ship.navigate(
ship.closest_point_to(entity),
game_map,
speed=int(h... | 48.457143 | 223 | 0.658461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,213 | 0.178803 |
e39f7df5983d058b6f0e12ddeb89dfebc298ff47 | 2,875 | py | Python | test/test_horizons.py | bluePhlavio/eph | 9ad8d753ba70d7ed147a591c4181edd56b9533cc | [
"MIT"
] | 1 | 2021-05-07T23:35:32.000Z | 2021-05-07T23:35:32.000Z | test/test_horizons.py | bluePhlavio/eph | 9ad8d753ba70d7ed147a591c4181edd56b9533cc | [
"MIT"
] | 8 | 2019-11-02T01:04:26.000Z | 2021-06-02T00:01:37.000Z | test/test_horizons.py | bluePhlavio/eph | 9ad8d753ba70d7ed147a591c4181edd56b9533cc | [
"MIT"
] | 1 | 2019-03-20T13:55:52.000Z | 2019-03-20T13:55:52.000Z | import pytest
from eph.horizons import *
@pytest.fixture(params=[
('earth', '399'),
('\'earth\'', '399'),
('Earth', '399'),
('399', '399'),
('\'399\'', '399'),
('pluto', 'pluto'),
])
def codify_obj_data(request):
return request.param
def test_codify_obj(codify_obj_data):
data, resul... | 21.455224 | 67 | 0.614261 | 0 | 0 | 0 | 0 | 1,668 | 0.580174 | 0 | 0 | 594 | 0.206609 |
e3a03a276ee7eba66fe85aa5ecec8c492d7bc5fa | 950 | py | Python | demo.py | ademilly/sqs-service | cd6cb1e7ca904472376eafb8682621675c310f2e | [
"MIT"
] | null | null | null | demo.py | ademilly/sqs-service | cd6cb1e7ca904472376eafb8682621675c310f2e | [
"MIT"
] | null | null | null | demo.py | ademilly/sqs-service | cd6cb1e7ca904472376eafb8682621675c310f2e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import sqs_service
"""Usage:
python demo.py
Expected set environment variables:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- AWS_DEFAULT_REGION
- AWS_SESSION_TOKEN for IAM roles
- AWS_SECURITY_TOKEN for IAM roles
Send 'Hello World' to queue 'TEST', listen to the queue and
print... | 22.093023 | 76 | 0.678947 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 423 | 0.445263 |
e3a0f222ef753f195c708bec4e9a91e2e4562806 | 34,106 | py | Python | web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py | chen1i/fedlearner | 981514dadbd0aa49ae87d185dd247d310e35605c | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py | chen1i/fedlearner | 981514dadbd0aa49ae87d185dd247d310e35605c | [
"Apache-2.0"
] | null | null | null | web_console_v2/api/testing/workflow_template/psi_join_tree_model_no_label.py | chen1i/fedlearner | 981514dadbd0aa49ae87d185dd247d310e35605c | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The FedLearner Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 46.592896 | 136 | 0.27306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30,407 | 0.891544 |
e3a19136ac88239183f6ccc7f508189df0b1db51 | 675 | py | Python | utils/sys_utils.py | machine2learn/galaina | 47ea16dd99687b38307674dd16ab7b7e99453910 | [
"BSD-3-Clause"
] | 3 | 2019-05-04T16:46:27.000Z | 2021-03-05T14:37:05.000Z | utils/sys_utils.py | machine2learn/galaina | 47ea16dd99687b38307674dd16ab7b7e99453910 | [
"BSD-3-Clause"
] | 2 | 2019-08-08T13:01:32.000Z | 2019-08-19T13:32:22.000Z | utils/sys_utils.py | machine2learn/galaina | 47ea16dd99687b38307674dd16ab7b7e99453910 | [
"BSD-3-Clause"
] | null | null | null | import os
import shutil
def delete_configs(config, dataset, username):
if config != 'all':
paths = [os.path.join('user_data', username, dataset, config)]
else:
paths = [os.path.join('user_data', username, dataset, d) for d in
os.listdir(os.path.join('user_data', username, data... | 33.75 | 115 | 0.631111 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 89 | 0.131852 |
e3a225a979c9b3bf4e5e8bd9eaea65a272da293b | 14,693 | py | Python | RasaMakeupRobot/script/dst/trade/utils.py | xiaobuguilaile/rasa-conversational-robot | 05f03c8e928a7c6bef284cdc18a89ef423977974 | [
"Apache-2.0"
] | 2 | 2021-01-05T08:56:54.000Z | 2021-01-22T06:05:55.000Z | script/dst/trade/utils.py | qq751220449/xbot | 557793302badfce1c0befa81de8948da99c0baae | [
"MIT"
] | null | null | null | script/dst/trade/utils.py | qq751220449/xbot | 557793302badfce1c0befa81de8948da99c0baae | [
"MIT"
] | null | null | null | import os
import bz2
import json
import random
import pickle
from collections import defaultdict, Counter
from tqdm import tqdm
import torch
from data.crosswoz.data_process.dst.trade_preprocess import (
EXPERIMENT_DOMAINS,
Lang,
get_seq,
get_slot_information,
)
class CNEmbedding:
def __init__(s... | 33.699541 | 107 | 0.562445 | 916 | 0.060418 | 0 | 0 | 0 | 0 | 0 | 0 | 3,372 | 0.222413 |
e3a3386ce9240964c1a178b8bb4fca5a690e725d | 789 | py | Python | pharmrep/reports/urls.py | boyombo/pharmrep | 2293ceb235dec949c58fa40d1ee43fce172e0ceb | [
"MIT"
] | null | null | null | pharmrep/reports/urls.py | boyombo/pharmrep | 2293ceb235dec949c58fa40d1ee43fce172e0ceb | [
"MIT"
] | null | null | null | pharmrep/reports/urls.py | boyombo/pharmrep | 2293ceb235dec949c58fa40d1ee43fce172e0ceb | [
"MIT"
] | null | null | null | from django.conf.urls import url
from django.views.generic import TemplateView
from reports import views
urlpatterns = [
url(r'balance/$', views.balance, name='report_balance'),
url(r'performance/$', views.performance, name='report_performance'),
url(r'last_activity/$', views.last_activity, name='last_ac... | 39.45 | 75 | 0.714829 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.376426 |
e3a354a397453e432d52c1cd363a4b2592457f4b | 1,150 | py | Python | pycam/pycam/Utils/progress.py | pschou/py-sdf | 0a269ed155d026e29429d76666fb63c95d2b4b2c | [
"MIT"
] | null | null | null | pycam/pycam/Utils/progress.py | pschou/py-sdf | 0a269ed155d026e29429d76666fb63c95d2b4b2c | [
"MIT"
] | null | null | null | pycam/pycam/Utils/progress.py | pschou/py-sdf | 0a269ed155d026e29429d76666fb63c95d2b4b2c | [
"MIT"
] | null | null | null | from pycam.Utils.events import get_event_handler, get_mainloop
class ProgressContext:
def __init__(self, title):
self._title = title
self._progress = get_event_handler().get("progress")
def __enter__(self):
if self._progress:
self._progress.update(text=self._title, percen... | 28.75 | 71 | 0.616522 | 1,084 | 0.942609 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.06 |
e3a40b62615cdac16bdbd6f21218bc07a791e56b | 4,030 | py | Python | validate_submission.py | ChunghyunPark/semantic-kitti-api | 8863f21cb05fd99667b4a1bb755cc432c430c9fe | [
"MIT"
] | 1 | 2019-10-18T15:12:24.000Z | 2019-10-18T15:12:24.000Z | validate_submission.py | ZiyiLiubird/semantic-kitti-api | 9a6366264b1fd95d7a84e05bd41659524fd9fd32 | [
"MIT"
] | null | null | null | validate_submission.py | ZiyiLiubird/semantic-kitti-api | 9a6366264b1fd95d7a84e05bd41659524fd9fd32 | [
"MIT"
] | 1 | 2019-10-11T22:30:53.000Z | 2019-10-11T22:30:53.000Z | #!/usr/bin/env python3
# This file is covered by the LICENSE file in the root of this project.
import zipfile
import argparse
import os
class ValidationException(Exception):
pass
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Validate a submission zip file needed to evaluate on... | 39.90099 | 390 | 0.657072 | 44 | 0.010918 | 0 | 0 | 0 | 0 | 0 | 0 | 1,376 | 0.341439 |
e3a5131242de5ad9d1dfff7bb93f08796a6b50ce | 5,231 | py | Python | sheldon_behaviors/ship_behavior/scripts/behavior_service.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | 1 | 2021-01-02T18:17:52.000Z | 2021-01-02T18:17:52.000Z | sheldon_behaviors/ship_behavior/scripts/behavior_service.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | null | null | null | sheldon_behaviors/ship_behavior/scripts/behavior_service.py | shinselrobots/sheldon | 911148cd82d28e37aebc5e083fbf830d1c9768ab | [
"Apache-2.0"
] | 4 | 2017-09-16T03:56:01.000Z | 2018-09-19T02:15:57.000Z | #! /usr/bin/env python
# License: Apache 2.0. See LICENSE file in root directory.
#
# For simple behaviors that can run syncronously, Python provides
# a simple way to implement this. Add the work of your behavior
# in the execute_cb callback
#
import rospy
import actionlib
import behavior_common.msg
import time
imp... | 36.326389 | 150 | 0.676161 | 4,180 | 0.799082 | 0 | 0 | 0 | 0 | 0 | 0 | 1,926 | 0.36819 |
e3a55d32d7c5a654a176400a4c92296634a021f4 | 7,831 | py | Python | src/core/utils/bert_utils.py | joe3d1998/GraphFlow | 8a751e4fc69a1e0c06ded23b7d1096f3161931a1 | [
"Apache-2.0"
] | 30 | 2019-08-18T21:56:20.000Z | 2022-03-18T10:04:02.000Z | src/core/utils/bert_utils.py | joe3d1998/GraphFlow | 8a751e4fc69a1e0c06ded23b7d1096f3161931a1 | [
"Apache-2.0"
] | 2 | 2019-11-12T02:28:36.000Z | 2022-03-20T05:27:05.000Z | src/core/utils/bert_utils.py | joe3d1998/GraphFlow | 8a751e4fc69a1e0c06ded23b7d1096f3161931a1 | [
"Apache-2.0"
] | 11 | 2020-02-17T02:47:26.000Z | 2021-09-05T05:37:29.000Z | from collections import defaultdict, namedtuple
import torch
# When using the sliding window trick for long sequences,
# we take the representation of each token with maximal context.
# Take average of the BERT embeddings of these BPE sub-tokens
# as the embedding for the word.
# Take *weighted* average of the word ... | 38.960199 | 99 | 0.70106 | 619 | 0.079045 | 0 | 0 | 0 | 0 | 0 | 0 | 1,984 | 0.253352 |
e3a5f11059953bb156d9e0590e2727a61cd805cc | 282 | py | Python | apps/lectures/serializers.py | csilouanos/student-management-system | 91800a1d95234918ab7e9ce5a2a017eb93e81431 | [
"MIT"
] | null | null | null | apps/lectures/serializers.py | csilouanos/student-management-system | 91800a1d95234918ab7e9ce5a2a017eb93e81431 | [
"MIT"
] | null | null | null | apps/lectures/serializers.py | csilouanos/student-management-system | 91800a1d95234918ab7e9ce5a2a017eb93e81431 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from .models import Lecture
class LectureSerializer(serializers.ModelSerializer):
class Meta:
model = Lecture
fields = ('id', 'title', 'lecturer_name', 'date', 'duration',
'slides_url', 'is_required')
| 31.333333 | 70 | 0.659574 | 213 | 0.755319 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.237589 |
e3a71e4692cca720e8c9165426c410f3c3fef261 | 396 | py | Python | OpenDataCatalog/suggestions/urls.py | timwis/Open-Data-Catalog | 0ccdc71f28773508c337875fd32478dd4324a50c | [
"MIT"
] | 3 | 2016-08-07T17:25:56.000Z | 2019-11-12T00:51:14.000Z | suggestions/urls.py | opensandiego/Open-Data-Catalog | 06f93bab36d22431ff86a87faea4e388d0491846 | [
"MIT"
] | 1 | 2021-04-17T10:52:53.000Z | 2021-04-17T10:52:53.000Z | suggestions/urls.py | opensandiego/Open-Data-Catalog | 06f93bab36d22431ff86a87faea4e388d0491846 | [
"MIT"
] | 2 | 2016-10-28T14:20:27.000Z | 2021-04-17T10:52:28.000Z | from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
(r'^$', 'suggestions.views.list_all'),
(r'^post/$', 'suggestions.views.add_suggestion'),
(r'^vote/(?P<suggestion_id>.*)/$', 'suggestions.views.add_vote'),
(r'^unvote/(?P<suggestion_id>.*)/$', 'suggestions.views.remove_v... | 39.6 | 73 | 0.659091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 262 | 0.661616 |
e3a9a5af8690681698031e1a127157f06eef690e | 3,850 | py | Python | fronteira_eficiente2.py | samuelbarrosm/Python-for-finances- | e1fd118b05f6efa2c4c72e88c5b2bf028d120c45 | [
"MIT"
] | null | null | null | fronteira_eficiente2.py | samuelbarrosm/Python-for-finances- | e1fd118b05f6efa2c4c72e88c5b2bf028d120c45 | [
"MIT"
] | null | null | null | fronteira_eficiente2.py | samuelbarrosm/Python-for-finances- | e1fd118b05f6efa2c4c72e88c5b2bf028d120c45 | [
"MIT"
] | null | null | null | #Esse codigo é utilizado para calcular a fronteira eficiente de um portfolio
#Esse codigo tem como objetivo avaliar a eficiencia das de um portfolio
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from pandas_datareader import data as wb
assets = ['PG', '^GSPC']
pf_data = pd.Dat... | 36.666667 | 127 | 0.744416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,263 | 0.587182 |
e3aa556fa11d4a3e0d7e99f07a6cd0ab4a4331f6 | 7,607 | py | Python | test/integration/test_build.py | DahlitzFlorian/wily | 069c26bff9741b49420e3cfd7b0954ac9b88cc3f | [
"Apache-2.0"
] | null | null | null | test/integration/test_build.py | DahlitzFlorian/wily | 069c26bff9741b49420e3cfd7b0954ac9b88cc3f | [
"Apache-2.0"
] | null | null | null | test/integration/test_build.py | DahlitzFlorian/wily | 069c26bff9741b49420e3cfd7b0954ac9b88cc3f | [
"Apache-2.0"
] | null | null | null | """
Tests for the wily build command.
All of the following tests will use a click CLI runner to fully simulate the CLI.
Many of the tests will depend on a "builddir" fixture which is a compiled wily cache.
TODO : Test build + build with extra operator
"""
import pathlib
import pytest
from click.testing import CliRunn... | 31.962185 | 88 | 0.625739 | 0 | 0 | 0 | 0 | 572 | 0.075194 | 0 | 0 | 2,207 | 0.290128 |
e3aa733a9aa92608aebcdce4ac3a723c8a9e99a6 | 356 | py | Python | authz/test/test_obp_helper.py | shivdeep-singh/conversational-ai-chatbot | b67802a96b3fe3d64457931a8cbf8bf03442fd0d | [
"BSD-3-Clause"
] | 11 | 2021-09-09T16:16:48.000Z | 2022-03-31T21:25:46.000Z | authz/test/test_obp_helper.py | shivdeep-singh/conversational-ai-chatbot | b67802a96b3fe3d64457931a8cbf8bf03442fd0d | [
"BSD-3-Clause"
] | 1 | 2022-02-10T06:08:11.000Z | 2022-02-10T06:08:11.000Z | authz/test/test_obp_helper.py | shivdeep-singh/conversational-ai-chatbot | b67802a96b3fe3d64457931a8cbf8bf03442fd0d | [
"BSD-3-Clause"
] | 12 | 2021-09-19T10:39:27.000Z | 2022-03-09T05:17:05.000Z | import unittest
from zmq_integration_lib import RPCClient, RPCServer
import unittest.mock as mock
class TestOBPHelper(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def logout(self, mock_zmq):
self.assertTrue(True)
def get_login_token(self, mock_zmq):... | 18.736842 | 52 | 0.676966 | 250 | 0.702247 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e3aa8e55cd8c639086caeeedaf341d4860bf12f5 | 1,657 | py | Python | cvtData.py | leduchust/ST-GCN_HAR | 778e7931b24eaa7d78b5a61216bb9a7a2ad6ab9e | [
"MIT"
] | null | null | null | cvtData.py | leduchust/ST-GCN_HAR | 778e7931b24eaa7d78b5a61216bb9a7a2ad6ab9e | [
"MIT"
] | null | null | null | cvtData.py | leduchust/ST-GCN_HAR | 778e7931b24eaa7d78b5a61216bb9a7a2ad6ab9e | [
"MIT"
] | null | null | null | import os
import numpy as np
import tqdm as tqdm
def cvt_Data():
if not os.path.exists('./fphab_data/newData'):
os.mkdir('./fphab_data/newData')
#for i in range(1,7):
# os.mkdir('./fphab_data/newData/Subject_'+str(i))
subject_list=os.listdir('./fphab_dat... | 36.021739 | 116 | 0.388654 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 421 | 0.254074 |
e3aac0da41e8ebd49fe3952b0e96fb25ef7523c4 | 2,412 | py | Python | src/zope/app/applicationcontrol/browser/runtimeinfo.py | zopefoundation/zope.app.applicationcontrol | de7b160dde9ce01f65af5412a984065c5a1a9284 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/applicationcontrol/browser/runtimeinfo.py | zopefoundation/zope.app.applicationcontrol | de7b160dde9ce01f65af5412a984065c5a1a9284 | [
"ZPL-2.1"
] | 4 | 2017-05-02T18:43:09.000Z | 2021-09-20T06:29:14.000Z | src/zope/app/applicationcontrol/browser/runtimeinfo.py | zopefoundation/zope.app.applicationcontrol | de7b160dde9ce01f65af5412a984065c5a1a9284 | [
"ZPL-2.1"
] | 1 | 2015-04-03T07:25:44.000Z | 2015-04-03T07:25:44.000Z | ##############################################################################
#
# Copyright (c) 2001, 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# TH... | 33.5 | 78 | 0.563018 | 1,524 | 0.631841 | 0 | 0 | 0 | 0 | 0 | 0 | 1,041 | 0.431592 |
e3aad4147f45eb6d3a2f6a2928f807f8445336c7 | 1,171 | py | Python | helper/storageHelper.py | LHGames-2018/DCI5espaces | 8f71ca3b6cf2bae78822d8a4a8546b5482eaa627 | [
"MIT"
] | null | null | null | helper/storageHelper.py | LHGames-2018/DCI5espaces | 8f71ca3b6cf2bae78822d8a4a8546b5482eaa627 | [
"MIT"
] | null | null | null | helper/storageHelper.py | LHGames-2018/DCI5espaces | 8f71ca3b6cf2bae78822d8a4a8546b5482eaa627 | [
"MIT"
] | 5 | 2017-10-07T14:54:28.000Z | 2018-09-27T20:16:59.000Z | import json
import os.path
class StorageHelper:
__document = None
__path = None
@staticmethod
def write(key, data):
StorageHelper.__init()
StorageHelper.__document[key] = json.dumps(data)
StorageHelper.__store()
@staticmethod
def read(key):
StorageHelper.__ini... | 27.880952 | 85 | 0.599488 | 1,141 | 0.974381 | 0 | 0 | 1,057 | 0.902647 | 0 | 0 | 71 | 0.060632 |
e3ab35bc88f90fb1279165d05f8411f9b2a64d26 | 12,383 | py | Python | ddot/cx_services_old-8-31-17/align.py | pupster90/ddot2 | 1952bff30383b35dff72b332592e1471201d40f3 | [
"MIT"
] | 1 | 2018-11-08T14:41:43.000Z | 2018-11-08T14:41:43.000Z | ddot/cx_services_old-8-31-17/align.py | pupster90/ddot2 | 1952bff30383b35dff72b332592e1471201d40f3 | [
"MIT"
] | null | null | null | ddot/cx_services_old-8-31-17/align.py | pupster90/ddot2 | 1952bff30383b35dff72b332592e1471201d40f3 | [
"MIT"
] | null | null | null | import ndex.client as nc
from ndex.networkn import NdexGraph
import io
import json
from IPython.display import HTML
from time import sleep
import os, time, tempfile
import sys
import time
import logging
import grpc
import networkx as nx
import cx_pb2
import cx_pb2_grpc
import numpy as np
import inspect
from concurre... | 36.313783 | 128 | 0.562868 | 11,022 | 0.890091 | 4,062 | 0.32803 | 0 | 0 | 0 | 0 | 2,700 | 0.218041 |
e3abcdda55715b1f38a3a0acd05e2b4c08e37048 | 3,509 | py | Python | biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py | csavur/biosignalsnotebooks | c99596741a854c58bdefb429906023ac48ddc3b7 | [
"MIT"
] | 1 | 2020-06-26T05:05:11.000Z | 2020-06-26T05:05:11.000Z | biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py | csavur/biosignalsnotebooks | c99596741a854c58bdefb429906023ac48ddc3b7 | [
"MIT"
] | null | null | null | biosignalsnotebooks/build/lib/biosignalsnotebooks/__init__.py | csavur/biosignalsnotebooks | c99596741a854c58bdefb429906023ac48ddc3b7 | [
"MIT"
] | null | null | null | """
OPENSIGNALSFACTORY PACKAGE INITIALISATION FILE (WITH IMPORT STATEMENTS)
The main purpose of biosignalsnotebooks package is to support the users of PLUX acquisition
devices, such as biosgnalsplux or bitalino, in some processing tasks that can be applied to the
acquired electrophysiological signals, namely ECG, EMG.... | 43.320988 | 103 | 0.785694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,182 | 0.906553 |