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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6683d7523bb35e6eea7af58dcc94e299c8b5221f | 523 | py | Python | patterns/adapter/app.py | mattskone/head-first-design-patterns | 3f0d3a5c39475b418f09e2c45505f88fa673dd41 | [
"MIT"
] | null | null | null | patterns/adapter/app.py | mattskone/head-first-design-patterns | 3f0d3a5c39475b418f09e2c45505f88fa673dd41 | [
"MIT"
] | 1 | 2015-01-13T17:19:19.000Z | 2015-03-11T16:02:28.000Z | patterns/adapter/app.py | mattskone/head-first-design-patterns | 3f0d3a5c39475b418f09e2c45505f88fa673dd41 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from implementations import MallardDuck, WildTurkey, TurkeyAdapter
if __name__ == '__main__':
d = MallardDuck()
print '\nThe Duck says...'
d.quack()
d.fly()
t = WildTurkey()
print '\nThe Turkey says...'
t.gobble()
t.fly()
# Now we use the adapter to show how... | 23.772727 | 67 | 0.625239 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 237 | 0.453155 |
66849fe8ffb1c558532c4307c57805110b8abc4c | 134 | py | Python | app/config/task.py | atulmishra-one/dairy_management_portal | a07320dc0f4419d4c78f7d2453c63b1c9544aba8 | [
"MIT"
] | 2 | 2020-08-02T10:06:19.000Z | 2022-03-29T06:10:57.000Z | app/config/task.py | atulmishra-one/dairy_management_portal | a07320dc0f4419d4c78f7d2453c63b1c9544aba8 | [
"MIT"
] | null | null | null | app/config/task.py | atulmishra-one/dairy_management_portal | a07320dc0f4419d4c78f7d2453c63b1c9544aba8 | [
"MIT"
] | 2 | 2019-02-03T15:44:02.000Z | 2021-03-09T07:30:28.000Z | CELERY_BROKER_URL = 'redis://localhost:6379/0'
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
CELERY_IMPORTS=('app.users.tasks') | 26.8 | 50 | 0.768657 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.514925 |
6684d6354c57bdba0d562fbf5c959a7bb01edb22 | 5,697 | py | Python | GCR.py | goodot/character-recognition | 71cd3664670ec2d672d344e8b1842ce3c3ff47d5 | [
"Apache-2.0"
] | 1 | 2019-04-25T10:34:21.000Z | 2019-04-25T10:34:21.000Z | GCR.py | goodot/character-recognition | 71cd3664670ec2d672d344e8b1842ce3c3ff47d5 | [
"Apache-2.0"
] | null | null | null | GCR.py | goodot/character-recognition | 71cd3664670ec2d672d344e8b1842ce3c3ff47d5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from PIL import Image
from numpy import array
import sqlite3
import tkMessageBox
import matplotlib.pyplot as plt
from pybrain.tools.shortcuts import buildNetwork
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import BackpropTrainer
from pybrain.structure.module... | 22.429134 | 110 | 0.566438 | 951 | 0.16693 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.091803 |
6686b772848e4502d8bad3bd405870762f442216 | 2,966 | py | Python | grano/logic/projects.py | ANCIR/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | 30 | 2018-08-23T15:42:17.000Z | 2021-11-16T13:11:36.000Z | grano/logic/projects.py | ANCIR/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | null | null | null | grano/logic/projects.py | ANCIR/grano | cee2ec1974df5df2bc6ed5e214f6bd5d201397a4 | [
"MIT"
] | 5 | 2019-05-30T11:36:53.000Z | 2021-08-11T16:17:14.000Z | import colander
from datetime import datetime
from grano.core import app, db, celery
from grano.logic.validation import database_name
from grano.logic.references import AccountRef
from grano.plugins import notify_plugins
from grano.model import Project
def validate(data, project):
same_project = lambda s: Projec... | 31.892473 | 76 | 0.650371 | 644 | 0.217127 | 0 | 0 | 242 | 0.081591 | 0 | 0 | 467 | 0.157451 |
6686c68bcf9dc01f99b52c42230df5b834e570c1 | 63 | py | Python | code/yahoo_procon2019_qual_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/yahoo_procon2019_qual_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/yahoo_procon2019_qual_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | N,K=map(int,input().split())
print("YES" if N>=2*K-1 else "NO") | 31.5 | 34 | 0.603175 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.142857 |
668a69950d894c5be476b21543db749add8b52d5 | 180 | py | Python | allauth/socialaccount/providers/pivotaltracker/urls.py | rawjam/django-allauth | 2daa33178aa1ab749581c494f4c39e1c72ad5c7b | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/pivotaltracker/urls.py | rawjam/django-allauth | 2daa33178aa1ab749581c494f4c39e1c72ad5c7b | [
"MIT"
] | null | null | null | allauth/socialaccount/providers/pivotaltracker/urls.py | rawjam/django-allauth | 2daa33178aa1ab749581c494f4c39e1c72ad5c7b | [
"MIT"
] | null | null | null | from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns
from provider import PivotalTrackerProvider
urlpatterns = default_urlpatterns(PivotalTrackerProvider)
| 30 | 75 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
668cea27bdbc4f6209d2380260dbf5312ca4bad1 | 2,944 | py | Python | Dorta/sales_modification/wizard/sale_order_popup.py | aaparicio87/Odoo12 | 25cfc349b2e85fa1b5f5846ffe693029f77b3b7d | [
"MIT"
] | null | null | null | Dorta/sales_modification/wizard/sale_order_popup.py | aaparicio87/Odoo12 | 25cfc349b2e85fa1b5f5846ffe693029f77b3b7d | [
"MIT"
] | null | null | null | Dorta/sales_modification/wizard/sale_order_popup.py | aaparicio87/Odoo12 | 25cfc349b2e85fa1b5f5846ffe693029f77b3b7d | [
"MIT"
] | null | null | null | from odoo import fields, models, api, _
from odoo.exceptions import UserError
class SaleOrderPopup(models.TransientModel):
_name = 'sale.order.popup'
@api.multi
def popup_button(self):
for rec in self.env['sale.order'].browse(self._context.get('active_id')):
if rec._get_forbidden_stat... | 42.057143 | 116 | 0.567935 | 2,862 | 0.972147 | 0 | 0 | 2,690 | 0.913723 | 0 | 0 | 737 | 0.25034 |
668da6a3dfe98b38ca927b8c9945a7980761c6b8 | 830 | py | Python | tyson-py/udp-echo.py | asheraryam/tyson | 44317a4e3367ef4958c3bb8d3ad538a3908a4566 | [
"MIT"
] | null | null | null | tyson-py/udp-echo.py | asheraryam/tyson | 44317a4e3367ef4958c3bb8d3ad538a3908a4566 | [
"MIT"
] | null | null | null | tyson-py/udp-echo.py | asheraryam/tyson | 44317a4e3367ef4958c3bb8d3ad538a3908a4566 | [
"MIT"
] | null | null | null | """UDP hole punching server."""
from twisted.internet.protocol import DatagramProtocol
from twisted.internet import reactor
import sys
DEFAULT_PORT = 4000
class ServerProtocol(DatagramProtocol):
def datagramReceived(self, datagram, address):
"""Handle incoming datagram messages."""
print(datagram... | 28.62069 | 73 | 0.631325 | 381 | 0.459036 | 0 | 0 | 0 | 0 | 0 | 0 | 206 | 0.248193 |
668e417b3a6306ecd6bbd0fcf013eefd855c3921 | 12,972 | py | Python | src/fhir_types/FHIR_StructureMap_Source.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | 2 | 2022-02-03T00:51:30.000Z | 2022-02-03T18:42:43.000Z | src/fhir_types/FHIR_StructureMap_Source.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | src/fhir_types/FHIR_StructureMap_Source.py | anthem-ai/fhir-types | 42348655fb3a9b3f131b911d6bc0782da8c14ce4 | [
"Apache-2.0"
] | null | null | null | from typing import Any, List, Literal, TypedDict
from .FHIR_Address import FHIR_Address
from .FHIR_Age import FHIR_Age
from .FHIR_Annotation import FHIR_Annotation
from .FHIR_Attachment import FHIR_Attachment
from .FHIR_CodeableConcept import FHIR_CodeableConcept
from .FHIR_Coding import FHIR_Coding
from .FHIR_Contact... | 56.4 | 836 | 0.712458 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8,419 | 0.649013 |
668f3e390bdd48e5a8dc955598a92ec70a35392d | 2,484 | py | Python | ip/ip/ecommerce/views.py | SuryaVamsiKrishna/Inner-Pieces | deb9e83af891dac58966230446a5a32fe10e86f2 | [
"MIT"
] | 1 | 2021-02-17T06:06:50.000Z | 2021-02-17T06:06:50.000Z | ip/ip/ecommerce/views.py | SuryaVamsiKrishna/Inner-Pieces | deb9e83af891dac58966230446a5a32fe10e86f2 | [
"MIT"
] | null | null | null | ip/ip/ecommerce/views.py | SuryaVamsiKrishna/Inner-Pieces | deb9e83af891dac58966230446a5a32fe10e86f2 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.decorators import login_required
from .models import *
from .forms import address_form
from django.http import JsonResponse
from .utils import cartData,guestobj
import json,datetime
def store(request):
items = item.objects.all()
data = cartData(reque... | 28.883721 | 84 | 0.67029 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 339 | 0.136473 |
6690a37ed9d0e2c4e7eeabdedc6f1bdca84bc1a4 | 2,899 | py | Python | ecogdata/expconfig/config_decode.py | miketrumpis/ecogdata | ff65820198e69608634c12686a86b97ac3a77558 | [
"BSD-3-Clause"
] | null | null | null | ecogdata/expconfig/config_decode.py | miketrumpis/ecogdata | ff65820198e69608634c12686a86b97ac3a77558 | [
"BSD-3-Clause"
] | null | null | null | ecogdata/expconfig/config_decode.py | miketrumpis/ecogdata | ff65820198e69608634c12686a86b97ac3a77558 | [
"BSD-3-Clause"
] | null | null | null | import os
from ecogdata.util import Bunch
__all__ = ['Parameter', 'TypedParam', 'BoolOrNum', 'NSequence', 'NoneOrStr', 'Path', 'parse_param',
'uniform_bunch_case']
class Parameter:
"A pass-thru parameter whose value is the command (a string)"
def __init__(self, command, default=''):
self... | 25.883929 | 99 | 0.58089 | 2,386 | 0.823042 | 0 | 0 | 340 | 0.117282 | 0 | 0 | 577 | 0.199034 |
66941e3ed65b1efe5312473285b552d665a56ecc | 29,897 | py | Python | lpjguesstools/lgt_createinput/main.py | lukasbaumbach/lpjguesstools | f7cc14c2931b4ac9a3b8dddc89c469b8fedd42e3 | [
"BSD-3-Clause"
] | 2 | 2020-08-03T11:33:00.000Z | 2021-07-05T21:00:46.000Z | lpjguesstools/lgt_createinput/main.py | lukasbaumbach/lpjguesstools | f7cc14c2931b4ac9a3b8dddc89c469b8fedd42e3 | [
"BSD-3-Clause"
] | 8 | 2020-08-03T12:45:31.000Z | 2021-02-23T19:51:32.000Z | lpjguesstools/lgt_createinput/main.py | lukasbaumbach/lpjguesstools | f7cc14c2931b4ac9a3b8dddc89c469b8fedd42e3 | [
"BSD-3-Clause"
] | 2 | 2020-08-03T12:11:43.000Z | 2022-01-29T10:59:00.000Z | """FILE lgt_createinput.main.py
This script creates condensed LPJ netcdf files
for landforms and soil properties
landforms.nc:
- lfcnt (landid) number of landforms in cell
- frac (landid, lfid/ standid) area fraction this landform represents
- slope (landid, lfid/ standid)
- elevation (landid, lfid/ standid) avg... | 36.282767 | 135 | 0.596247 | 0 | 0 | 0 | 0 | 8,770 | 0.29334 | 0 | 0 | 8,034 | 0.268723 |
66942000229050463aff5906c4c70265c74740a1 | 4,379 | py | Python | html_parsing/www_dns_shop_ru/check_update_price_date__QWebEnginePage_bs4.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 117 | 2015-12-18T07:18:27.000Z | 2022-03-28T00:25:54.000Z | html_parsing/www_dns_shop_ru/check_update_price_date__QWebEnginePage_bs4.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 8 | 2018-10-03T09:38:46.000Z | 2021-12-13T19:51:09.000Z | html_parsing/www_dns_shop_ru/check_update_price_date__QWebEnginePage_bs4.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | 28 | 2016-08-02T17:43:47.000Z | 2022-03-21T08:31:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
"""Скрипт проверяет дату обновления прайса на сайте http://www.dns-shop.ru/"""
# # Основа взята из http://stackoverflow.com/a/37755811/5909792
# def get_html(url, check_content_func=None):
# # from PyQt5.QtCore import QUrl
# # from PyQt... | 26.70122 | 78 | 0.58575 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,278 | 0.718544 |
6696f698bff747564601f269987739a28d5abfe1 | 12,918 | py | Python | tests/test_adapters.py | Shelestova-Anastasia/cutadapt | 6e239b3b8e20d17fdec041dc1d967ec2a3cfe770 | [
"MIT"
] | null | null | null | tests/test_adapters.py | Shelestova-Anastasia/cutadapt | 6e239b3b8e20d17fdec041dc1d967ec2a3cfe770 | [
"MIT"
] | null | null | null | tests/test_adapters.py | Shelestova-Anastasia/cutadapt | 6e239b3b8e20d17fdec041dc1d967ec2a3cfe770 | [
"MIT"
] | null | null | null | import pytest
from dnaio import Sequence
from cutadapt.adapters import (
RemoveAfterMatch,
RemoveBeforeMatch,
FrontAdapter,
BackAdapter,
PrefixAdapter,
SuffixAdapter,
LinkedAdapter,
MultipleAdapters,
IndexedPrefixAdapters,
IndexedSuffixAdapters,
)
def test_back_adapter_absolut... | 27.780645 | 88 | 0.618517 | 0 | 0 | 0 | 0 | 211 | 0.016334 | 0 | 0 | 2,150 | 0.166434 |
66992cf30daf9b3de5a678f20db0b9dc5b3fafdf | 7,561 | py | Python | archABM/event_model.py | vishalbelsare/ArchABM | 4a5ed9506ba96c38e1f3d7f53d6e469f28fe6873 | [
"MIT"
] | 8 | 2021-07-19T11:54:00.000Z | 2022-03-29T01:45:07.000Z | archABM/event_model.py | vishalbelsare/ArchABM | 4a5ed9506ba96c38e1f3d7f53d6e469f28fe6873 | [
"MIT"
] | null | null | null | archABM/event_model.py | vishalbelsare/ArchABM | 4a5ed9506ba96c38e1f3d7f53d6e469f28fe6873 | [
"MIT"
] | 1 | 2021-08-19T23:56:56.000Z | 2021-08-19T23:56:56.000Z | import copy
import random
from .parameters import Parameters
class EventModel:
"""Defines an event model, also called "activity"
An event model is defined by these parameters:
* Activity name: :obj:`str`
* Schedule: :obj:`list` of :obj:`tuple` (in minutes :obj:`int`)
* Repetitions range: min... | 33.455752 | 112 | 0.547943 | 7,497 | 0.991536 | 0 | 0 | 280 | 0.037032 | 0 | 0 | 5,067 | 0.670149 |
669c0767b2a56157d94adbe410e078a0a3045bd9 | 13,297 | py | Python | tests/test_photokit.py | oPromessa/osxphotos | 0d7e324f0262093727147b9f22ed275e962e8725 | [
"MIT"
] | 656 | 2019-08-14T14:10:44.000Z | 2022-03-28T15:25:42.000Z | tests/test_photokit.py | oPromessa/osxphotos | 0d7e324f0262093727147b9f22ed275e962e8725 | [
"MIT"
] | 557 | 2019-10-14T19:00:02.000Z | 2022-03-28T00:48:30.000Z | tests/test_photokit.py | oPromessa/osxphotos | 0d7e324f0262093727147b9f22ed275e962e8725 | [
"MIT"
] | 58 | 2019-12-27T01:39:33.000Z | 2022-02-26T22:18:49.000Z | """ test photokit.py methods """
import os
import pathlib
import tempfile
import pytest
from osxphotos.photokit import (
LivePhotoAsset,
PhotoAsset,
PhotoLibrary,
VideoAsset,
PHOTOS_VERSION_CURRENT,
PHOTOS_VERSION_ORIGINAL,
PHOTOS_VERSION_UNADJUSTED,
)
skip_test = "OSXPHOTOS_TEST_EXPORT"... | 31.360849 | 88 | 0.670828 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,035 | 0.228247 |
669c4ded1d39066ae7e38bea807e79c4ad3272ab | 2,764 | py | Python | parse_json_script/lib_parse_json.py | amane-uehara/fitbit-fetcher | 2a949016933dbcac5f949c8b552c7998b2aadd8c | [
"MIT"
] | null | null | null | parse_json_script/lib_parse_json.py | amane-uehara/fitbit-fetcher | 2a949016933dbcac5f949c8b552c7998b2aadd8c | [
"MIT"
] | null | null | null | parse_json_script/lib_parse_json.py | amane-uehara/fitbit-fetcher | 2a949016933dbcac5f949c8b552c7998b2aadd8c | [
"MIT"
] | null | null | null | import os
import sys
import json
def detail_base_item_list():
return [
'distance',
'elevation',
'floors',
'heart',
'minutesFairlyActive',
'minutesLightlyActive',
'minutesSedentary',
'minutesVeryActive',
'steps'
]
def read_json_file(filename):
if not os.path.isfile(filename):... | 23.827586 | 102 | 0.599132 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.220333 |
669d3d5f4966f2fc9848beb0d7bd023a928904e0 | 4,251 | py | Python | utils/tfds_preprocess.py | chansoopark98/tf_keras-Unknown-grasping | be0f68280ba0b293940a08732fd4a31e89a272cd | [
"MIT"
] | null | null | null | utils/tfds_preprocess.py | chansoopark98/tf_keras-Unknown-grasping | be0f68280ba0b293940a08732fd4a31e89a272cd | [
"MIT"
] | null | null | null | utils/tfds_preprocess.py | chansoopark98/tf_keras-Unknown-grasping | be0f68280ba0b293940a08732fd4a31e89a272cd | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow_datasets as tfds
import numpy as np
import random
from utils.dataset_processing import grasp, image
import matplotlib.pyplot as plt
dataset_path = './tfds/'
train_data, meta = tfds.load('Jacquard', split='train', with_info=True, shuffle_files=False)
BATCH_SIZE = 1
number_trai... | 26.735849 | 139 | 0.604799 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,252 | 0.294519 |
669f60ed987d448932641383a9784e17ffb52883 | 836 | py | Python | tests/scheduler_test.py | peng4217/scylla | aa5133d7c6d565c95651fc75b26ad605da0982cd | [
"Apache-2.0"
] | 3,556 | 2018-04-28T22:59:40.000Z | 2022-03-28T22:20:07.000Z | tests/scheduler_test.py | peng4217/scylla | aa5133d7c6d565c95651fc75b26ad605da0982cd | [
"Apache-2.0"
] | 120 | 2018-05-20T11:49:00.000Z | 2022-03-07T00:08:55.000Z | tests/scheduler_test.py | peng4217/scylla | aa5133d7c6d565c95651fc75b26ad605da0982cd | [
"Apache-2.0"
] | 518 | 2018-05-27T01:42:25.000Z | 2022-03-25T12:38:32.000Z | import pytest
from scylla.scheduler import Scheduler, cron_schedule
@pytest.fixture
def scheduler():
return Scheduler()
def test_start(mocker, scheduler):
process_start = mocker.patch('multiprocessing.Process.start')
thread_start = mocker.patch('threading.Thread.start')
scheduler.start()
proc... | 23.885714 | 78 | 0.744019 | 0 | 0 | 0 | 0 | 55 | 0.065789 | 0 | 0 | 256 | 0.30622 |
669ffe2b5e6215275de00b66a4a28e352cc9a091 | 2,063 | py | Python | ch16_ex.py | DexHunter/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | 24 | 2019-05-07T15:11:28.000Z | 2022-03-02T04:50:28.000Z | ch16_ex.py | Dekzu/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | null | null | null | ch16_ex.py | Dekzu/Think-Python-book-exercise-solutions | d0abae261eda1dca99043e17e8a1e614caad2140 | [
"CC-BY-4.0"
] | 19 | 2019-08-05T20:59:04.000Z | 2022-03-07T05:13:32.000Z | class Time:
'''Represents the time of day.
attributes: hour, minute, second
'''
def print_time(t):
print ('(%.2d:%.2d:%.2d)' % (t.hour, t.minute, t.second))
def is_after(t1, t2):
return (t1.hour, t1.minute, t1.second) > (t2.hour, t2.minute, t2.second)
def mul_time(t, n):
'''Multiple time t by n
n: int
... | 20.838384 | 248 | 0.652448 | 84 | 0.040717 | 0 | 0 | 0 | 0 | 0 | 0 | 663 | 0.321377 |
66a0075c55665ddddee62ce3c5592465d9e8004b | 200 | py | Python | knowit/providers/__init__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | knowit/providers/__init__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | knowit/providers/__init__.py | labrys/knowit | eea9ac18e38c930230cf81b5dca4a9af9fb10d4e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Provider package."""
from __future__ import unicode_literals
from .enzyme import EnzymeProvider
from .ffmpeg import FFmpegProvider
from .mediainfo import MediaInfoProvider
| 25 | 40 | 0.785 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.23 |
66a03a53035c1596664c882408ebdf47aa3afc54 | 304 | py | Python | python-mundo3/ex077.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | 1 | 2021-08-15T18:18:43.000Z | 2021-08-15T18:18:43.000Z | python-mundo3/ex077.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | python-mundo3/ex077.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | list = ('APRENDER', 'PROGRAMAR', 'LINGUAGEM', 'PYTHON', 'CURSO', 'GRATIS', 'ESTUDAR',
'PRATICAR', 'TRABALHAR', 'MERCADO', 'PROGRAMADOR', 'FUTURO')
for p in list:
print(f'\nNa palavra {p} temos: ', end='')
for l in p:
if l.lower() in 'aeiou':
print(l.lower(), end=' ')
| 38 | 85 | 0.546053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 154 | 0.506579 |
66a1405cb275e20463fb6f972194333959f1c8d7 | 1,449 | py | Python | src/DataParser/odmdata/variable.py | UCHIC/iUTAHData | 4ffab29ad6b3313416bb2a8b98acf0b2e02c8cab | [
"Unlicense"
] | 2 | 2015-02-25T01:12:51.000Z | 2017-02-08T22:54:41.000Z | src/DataParser/odmdata/variable.py | UCHIC/iUTAHData | 4ffab29ad6b3313416bb2a8b98acf0b2e02c8cab | [
"Unlicense"
] | 48 | 2015-01-12T18:01:56.000Z | 2021-06-10T20:05:26.000Z | src/DataParser/odmdata/variable.py | UCHIC/iUTAHData | 4ffab29ad6b3313416bb2a8b98acf0b2e02c8cab | [
"Unlicense"
] | null | null | null | from sqlalchemy import *
from sqlalchemy.orm import relationship
from base import Base
from unit import Unit
class Variable(Base):
__tablename__ = 'Variables'
id = Column('VariableID', Integer, primary_key=True)
code = Column('VariableCode', String(255), nullable=False)
name = Column('VariableName',... | 45.28125 | 102 | 0.718427 | 1,336 | 0.922015 | 0 | 0 | 0 | 0 | 0 | 0 | 381 | 0.26294 |
66a4535ff16536c58c62bd0252d04c6087d6613d | 7,751 | py | Python | pandas/pandastypes.py | pyxll/pyxll-examples | e8a1cba1ffdb346191f0c80bea6877cbe0291957 | [
"Unlicense"
] | 93 | 2015-04-27T14:44:02.000Z | 2022-03-03T13:14:49.000Z | pandas/pandastypes.py | samuelpedrini/pyxll-examples | ce7f839b4ff4f4032b78dffff2357f3feaadc3a1 | [
"Unlicense"
] | 4 | 2019-12-13T11:32:17.000Z | 2022-03-03T14:07:02.000Z | pandas/pandastypes.py | samuelpedrini/pyxll-examples | ce7f839b4ff4f4032b78dffff2357f3feaadc3a1 | [
"Unlicense"
] | 53 | 2015-04-27T14:44:14.000Z | 2022-01-23T05:26:52.000Z | """
Custom excel types for pandas objects (eg dataframes).
For information about custom types in PyXLL see:
https://www.pyxll.com/docs/udfs.html#custom-types
For information about pandas see:
http://pandas.pydata.org/
Including this module in your pyxll config adds the following custom types that can
be used as retu... | 31.897119 | 95 | 0.632047 | 0 | 0 | 0 | 0 | 4,592 | 0.59244 | 0 | 0 | 3,083 | 0.397755 |
66a463bd296e2375b0d9a6abd3ff5e747d929dcd | 10,912 | py | Python | liveDataApp/views.py | subahanii/COVID19-tracker | b7d30ff996974755e78393f0777d6cf623c4d654 | [
"MIT"
] | 7 | 2020-04-28T12:34:42.000Z | 2021-05-17T06:20:51.000Z | liveDataApp/views.py | subahanii/COVID19-tracker | b7d30ff996974755e78393f0777d6cf623c4d654 | [
"MIT"
] | 1 | 2020-07-09T18:17:32.000Z | 2020-07-10T13:56:01.000Z | liveDataApp/views.py | subahanii/COVID19-tracker | b7d30ff996974755e78393f0777d6cf623c4d654 | [
"MIT"
] | null | null | null | from django.shortcuts import render
import requests
from bs4 import BeautifulSoup
import re
from collections import defaultdict as dfd
from .models import *
from datetime import date
from datetime import timedelta
from django.db.models import Sum
from django.db.models import Count
from django.db.models.functions impor... | 26.421308 | 129 | 0.640121 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,009 | 0.367394 |
66a65924a1e2768d7469c1f8356205da9b3cbe9a | 89 | py | Python | project/healthcheck.py | permallotment/allotment3 | 0eb390086cc8f48ba6817541c6c70c06dfc83058 | [
"CC0-1.0"
] | null | null | null | project/healthcheck.py | permallotment/allotment3 | 0eb390086cc8f48ba6817541c6c70c06dfc83058 | [
"CC0-1.0"
] | null | null | null | project/healthcheck.py | permallotment/allotment3 | 0eb390086cc8f48ba6817541c6c70c06dfc83058 | [
"CC0-1.0"
] | null | null | null | from django.http import HttpResponse
def health(request):
return HttpResponse("OK")
| 17.8 | 36 | 0.764045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.044944 |
66a6d482011b0d35775a7523319647c543ff9fb5 | 11,829 | py | Python | src/algo/baselines/randomP/randomP.py | Lukeeeeee/CE7490-Group-Project-Python | 840a655bcb8cebbe3d39e5d3f3d68a01936a6283 | [
"MIT"
] | null | null | null | src/algo/baselines/randomP/randomP.py | Lukeeeeee/CE7490-Group-Project-Python | 840a655bcb8cebbe3d39e5d3f3d68a01936a6283 | [
"MIT"
] | null | null | null | src/algo/baselines/randomP/randomP.py | Lukeeeeee/CE7490-Group-Project-Python | 840a655bcb8cebbe3d39e5d3f3d68a01936a6283 | [
"MIT"
] | 1 | 2020-10-20T07:06:18.000Z | 2020-10-20T07:06:18.000Z | from src.core import Basic
import networkx as nx
class RandomP(Basic):
def __init__(self, server_list, network_dataset, node_list):
super().__init__()
self.server_list = server_list
self.network_dataset = network_dataset
self.node_list = node_list
def add_new_primary_node(self... | 37.792332 | 95 | 0.481951 | 11,777 | 0.995604 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.017668 |
66a846d0d120e378d227803f5adec0334b4d67ff | 1,336 | py | Python | stations/heathen/migrations/0003_auto_20161128_0519.py | boyombo/django-stations | 93a70be7eb8268f9d48f6e3cf9a532bcb27ff895 | [
"MIT"
] | null | null | null | stations/heathen/migrations/0003_auto_20161128_0519.py | boyombo/django-stations | 93a70be7eb8268f9d48f6e3cf9a532bcb27ff895 | [
"MIT"
] | null | null | null | stations/heathen/migrations/0003_auto_20161128_0519.py | boyombo/django-stations | 93a70be7eb8268f9d48f6e3cf9a532bcb27ff895 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-11-28 05:19
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('heathen', '0002_member_gender'),
]
operations = [
... | 30.363636 | 115 | 0.577844 | 1,146 | 0.857784 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.160928 |
66aa16869b2a00e5d9cde4a253891d698c5527b2 | 2,437 | py | Python | src/observers/simple_observer.py | ChenyangTang/bark-ml | 1d2ab1957bf49929e27d718dd4bd3912162197b8 | [
"MIT"
] | null | null | null | src/observers/simple_observer.py | ChenyangTang/bark-ml | 1d2ab1957bf49929e27d718dd4bd3912162197b8 | [
"MIT"
] | null | null | null | src/observers/simple_observer.py | ChenyangTang/bark-ml | 1d2ab1957bf49929e27d718dd4bd3912162197b8 | [
"MIT"
] | null | null | null |
from gym import spaces
import numpy as np
from bark.models.dynamic import StateDefinition
from modules.runtime.commons.parameters import ParameterServer
import math
import operator
from src.commons.spaces import BoundedContinuous, Discrete
from src.observers.observer import StateObserver
class SimpleObserver(StateO... | 30.848101 | 77 | 0.672959 | 2,141 | 0.878539 | 0 | 0 | 221 | 0.090685 | 0 | 0 | 25 | 0.010259 |
66aa1e9b55b1f6a0fc3a8c730d67ac565985ed59 | 9,610 | py | Python | cosilico/base/scatter.py | cosilico/cosilico | 983373139aeaf459271c559a47a6439939ec93a5 | [
"MIT"
] | null | null | null | cosilico/base/scatter.py | cosilico/cosilico | 983373139aeaf459271c559a47a6439939ec93a5 | [
"MIT"
] | null | null | null | cosilico/base/scatter.py | cosilico/cosilico | 983373139aeaf459271c559a47a6439939ec93a5 | [
"MIT"
] | null | null | null | import altair as alt
import pandas as pd
def scatterplot(x, y, data, hue=None, color=None, opacity=1.,
x_autoscale=True, y_autoscale=True):
"""Display a basic scatterplot.
Parameters
----------
x : str
Column in data to be used for x-axis
y : str
Column in data to be used ... | 29.478528 | 87 | 0.591467 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,501 | 0.468366 |
66abb66cbd60706f6fbdf7789edf198d10295b85 | 12,103 | py | Python | flappy_env.py | timlaroche/FlapPyBird | cffc7bb76daad67957a8b5778c1f2c7d82da1514 | [
"MIT"
] | null | null | null | flappy_env.py | timlaroche/FlapPyBird | cffc7bb76daad67957a8b5778c1f2c7d82da1514 | [
"MIT"
] | null | null | null | flappy_env.py | timlaroche/FlapPyBird | cffc7bb76daad67957a8b5778c1f2c7d82da1514 | [
"MIT"
] | null | null | null | import gym
from gym import spaces
from itertools import cycle
import random
import sys
import os
import pygame
from pygame.locals import *
import flappy
import numpy as np
import cv2
# GLOBALS
FPS = 30
SCREENWIDTH = 288
SCREENHEIGHT = 512
PIPEGAPSIZE = 100 # gap between upper and lower part of pipe
BASEY ... | 32.799458 | 130 | 0.673635 | 11,445 | 0.945633 | 0 | 0 | 0 | 0 | 0 | 0 | 2,954 | 0.244072 |
66aded0365be403ed572fa925d74446e3fe43e79 | 4,587 | py | Python | vkmini/group/group_longpoll.py | Elchinchel/vkmini | 378ee3893c5826563a19198fd532df47aaa03350 | [
"MIT"
] | 2 | 2021-08-12T20:22:40.000Z | 2022-02-06T18:13:38.000Z | vkmini/group/group_longpoll.py | Elchinchel/vkmini | 378ee3893c5826563a19198fd532df47aaa03350 | [
"MIT"
] | null | null | null | vkmini/group/group_longpoll.py | Elchinchel/vkmini | 378ee3893c5826563a19198fd532df47aaa03350 | [
"MIT"
] | 3 | 2020-07-31T17:19:20.000Z | 2021-12-11T11:38:23.000Z | from typing import AsyncGenerator, List, Union, Any
from aiohttp.client import ClientSession
from vkmini.utils import AbstractLogger
from vkmini.request import longpoll_get, default_session
from vkmini.exceptions import TokenInvalid
from vkmini import VkApi
class Update:
# TODO ну тут без комментариев
class... | 28.849057 | 79 | 0.58535 | 4,761 | 0.947086 | 148 | 0.029441 | 813 | 0.161727 | 1,913 | 0.380545 | 1,812 | 0.360454 |
66af18eea69ccb8397ca09f7ca83656cd98f0584 | 1,162 | py | Python | aswan/tests/unit/test_migrations.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 1 | 2021-04-28T23:08:07.000Z | 2021-04-28T23:08:07.000Z | aswan/tests/unit/test_migrations.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 1 | 2022-01-22T22:02:55.000Z | 2022-01-22T22:02:55.000Z | aswan/tests/unit/test_migrations.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 2 | 2022-01-05T10:01:22.000Z | 2022-02-16T10:58:46.000Z | import tarfile
import pandas as pd
import sqlalchemy as db
from aswan import AswanConfig, ProdConfig, Project
from aswan.migrate import pull, push
from aswan.models import Base
from aswan.object_store import get_object_store
def test_push_pull(tmp_path):
conf = ProdConfig.from_dir(tmp_path / "cfg")
Base.me... | 24.723404 | 62 | 0.683305 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.061962 |
66b02efea9465e74c9e2945b8ff0942e0ed6931f | 82 | py | Python | backend/src/apps/test/apps.py | LucienLuc/project-sts | 02ad13b515bcefe1c1ef30f0c06104359bff613e | [
"MIT"
] | null | null | null | backend/src/apps/test/apps.py | LucienLuc/project-sts | 02ad13b515bcefe1c1ef30f0c06104359bff613e | [
"MIT"
] | null | null | null | backend/src/apps/test/apps.py | LucienLuc/project-sts | 02ad13b515bcefe1c1ef30f0c06104359bff613e | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TestConfig(AppConfig):
name = 'test'
| 16.4 | 33 | 0.743902 | 46 | 0.560976 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.073171 |
66b23735ac5dd60f24c047d430921a774e2c8f6b | 1,055 | py | Python | booking.py | kurkurzz/AdminDashboard-BookingWithTimeslot | aa34fef7bc0e1f8cabb602adc6d69af925436e5d | [
"MIT"
] | null | null | null | booking.py | kurkurzz/AdminDashboard-BookingWithTimeslot | aa34fef7bc0e1f8cabb602adc6d69af925436e5d | [
"MIT"
] | null | null | null | booking.py | kurkurzz/AdminDashboard-BookingWithTimeslot | aa34fef7bc0e1f8cabb602adc6d69af925436e5d | [
"MIT"
] | null | null | null | import datetime as dt
class Booking:
def __init__(self):
self.user_id = ''
self.name =''
self.pet_name = ''
self.time_slot = 0
self.id = ''
self.phone_number = ''
def to_dict(self):
return {
'name' : self.name,
'petname' : self.pe... | 31.029412 | 118 | 0.559242 | 1,032 | 0.978199 | 0 | 0 | 0 | 0 | 0 | 0 | 245 | 0.232227 |
66b3e370acc80eb4f8fc537add6850404fc19250 | 148 | py | Python | problems/incorrect_division_method.py | stereoabuse/codewars | d6437afaef38c3601903891b8b9cb0f84c108c54 | [
"MIT"
] | null | null | null | problems/incorrect_division_method.py | stereoabuse/codewars | d6437afaef38c3601903891b8b9cb0f84c108c54 | [
"MIT"
] | null | null | null | problems/incorrect_division_method.py | stereoabuse/codewars | d6437afaef38c3601903891b8b9cb0f84c108c54 | [
"MIT"
] | null | null | null | ## Incorrect division method
## 8 kyu
## https://www.codewars.com/kata/54d1c59aba326343c80000e7
def divide_numbers(x,y):
return x / y | 21.142857 | 59 | 0.682432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.668919 |
66b517ab0ecf7dee82c7b5fd1f3ac99536fb011e | 1,927 | py | Python | launch_notebooks.py | srivnamrata/openvino | aea76984a731fa3e81be9633dc8ffc702fb4e207 | [
"Apache-2.0"
] | null | null | null | launch_notebooks.py | srivnamrata/openvino | aea76984a731fa3e81be9633dc8ffc702fb4e207 | [
"Apache-2.0"
] | null | null | null | launch_notebooks.py | srivnamrata/openvino | aea76984a731fa3e81be9633dc8ffc702fb4e207 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import subprocess
import sys
from pathlib import Path
import os
pythonpath = sys.executable
curdir = Path(__file__).parent.resolve()
parentdir = curdir.parent
# If openvino_env is already activated, launch jupyter lab
# This will also start if openvino_env_2 is activated instead of openvino_env... | 39.326531 | 82 | 0.632071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,050 | 0.544888 |
66b64a14727f525c1e5bbd7f0c1785592ad8eed7 | 1,143 | py | Python | update_last_date.py | ankschoubey/testblog | f74e93f0f85edaee9c5adbe402e8e4a5252cc64d | [
"Apache-2.0"
] | 1 | 2021-07-26T00:58:53.000Z | 2021-07-26T00:58:53.000Z | update_last_date.py | ankschoubey/testblog | f74e93f0f85edaee9c5adbe402e8e4a5252cc64d | [
"Apache-2.0"
] | 15 | 2020-03-28T05:27:53.000Z | 2022-01-07T17:44:08.000Z | update_last_date.py | ankschoubey/testblog | f74e93f0f85edaee9c5adbe402e8e4a5252cc64d | [
"Apache-2.0"
] | 3 | 2021-05-08T19:59:02.000Z | 2021-05-11T17:14:45.000Z |
import os.path, os, time
from datetime import datetime
def getLastUpdatedTime(file: str):
return datetime.fromtimestamp(os.path.getmtime(file)).isoformat()
def updatePost(postUrl: str) -> None:
lastUpdatedTime = getLastUpdatedTime(postUrl)
prefix = "last_modified_at"
string = f"{prefix}: {lastUpdated... | 30.078947 | 69 | 0.601925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.137358 |
66b70f0759d9cb9c2433981c7b3e962dee37c367 | 4,032 | py | Python | basic/19-brownie/brownie_test/tests/exchange/test_eth_to_token.py | xiangzhengfeng/Dapp-Learning | 813fe6e52898206046842d10ecf9eb68b7f336a1 | [
"MIT"
] | 987 | 2021-12-19T09:57:18.000Z | 2022-03-31T15:39:45.000Z | basic/19-brownie/brownie_test/tests/exchange/test_eth_to_token.py | xiangzhengfeng/Dapp-Learning | 813fe6e52898206046842d10ecf9eb68b7f336a1 | [
"MIT"
] | 30 | 2021-12-20T03:13:29.000Z | 2022-03-31T15:00:23.000Z | basic/19-brownie/brownie_test/tests/exchange/test_eth_to_token.py | xiangzhengfeng/Dapp-Learning | 813fe6e52898206046842d10ecf9eb68b7f336a1 | [
"MIT"
] | 207 | 2021-12-19T08:40:38.000Z | 2022-03-31T13:10:02.000Z | from brownie import (accounts, web3)
def test_eth_to_token_swap(HAY_token, hay_token_exchange):
HAY_token.approve(hay_token_exchange, 10 * 10**18, {"from": accounts[0]})
# step 1: initialize exchange
hay_token_exchange.initializeExchange(10 * 10**18, {"from": accounts[0], "amount": 5 * 10**18})
# th... | 51.692308 | 117 | 0.705109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,565 | 0.360101 |
66b7938b4ce230cf1fa2893cf38e7f737bacfde6 | 49 | py | Python | hello.py | Lifereborn/cs3240-labdemo | 20db420273e78b4a905ec7e3a21fc717d71dc301 | [
"MIT"
] | null | null | null | hello.py | Lifereborn/cs3240-labdemo | 20db420273e78b4a905ec7e3a21fc717d71dc301 | [
"MIT"
] | null | null | null | hello.py | Lifereborn/cs3240-labdemo | 20db420273e78b4a905ec7e3a21fc717d71dc301 | [
"MIT"
] | null | null | null | from helper import greetings
greetings("hi!")
| 8.166667 | 28 | 0.734694 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0.102041 |
66b88bc537b297b0b6ea48d2a39575fd0626f252 | 232 | py | Python | setup.py | h-rub/manzip | 875e4ed75e08bd06b0d50698ecf1744ab3723e4c | [
"MIT"
] | null | null | null | setup.py | h-rub/manzip | 875e4ed75e08bd06b0d50698ecf1744ab3723e4c | [
"MIT"
] | null | null | null | setup.py | h-rub/manzip | 875e4ed75e08bd06b0d50698ecf1744ab3723e4c | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="manzip",
version='1.0.0',
py_modules=['manzip'],
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
manzip=app:main
''',
) | 16.571429 | 28 | 0.547414 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.392241 |
66b95f7f1063980cc02f05f543cab0abf0bce28b | 199 | py | Python | tests/test_mmhelloworld.py | manasm11/mmhelloworld | 2e6907ac0962de90764a036d14046861b5f47521 | [
"MIT"
] | null | null | null | tests/test_mmhelloworld.py | manasm11/mmhelloworld | 2e6907ac0962de90764a036d14046861b5f47521 | [
"MIT"
] | null | null | null | tests/test_mmhelloworld.py | manasm11/mmhelloworld | 2e6907ac0962de90764a036d14046861b5f47521 | [
"MIT"
] | null | null | null | from mmhelloworld import say_hello
def test_say_hello_no_params():
assert say_hello() == "Hello! World"
def test_say_hello_with_param():
assert say_hello("Everyone") == "Hello! Everyone"
| 19.9 | 53 | 0.738693 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 0.20603 |
66b9ec6f54ec8e5b78556e4fbb86bde48b9e1d35 | 1,167 | py | Python | bann/b_container/functions/print_init_net_state.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | bann/b_container/functions/print_init_net_state.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | bann/b_container/functions/print_init_net_state.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""".. moduleauthor:: Artur Lissin"""
from typing import TypeVar
from bann.b_container.states.general.interface.init_state import InitState
from bann.b_container.states.general.interface.net_state import NetState
from bann.b_container.functions.dict_str_repr import dict_string_repr
from rewowr.p... | 44.884615 | 99 | 0.77892 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 212 | 0.181662 |
66baa831bc3a0b5f4c002eec9ab7e86c9dd317b9 | 4,578 | py | Python | PythonCodes/ScientificPlotting/FigGen_Py_wolfel/Fig3.py | Nicolucas/C-Scripts | 2608df5c2e635ad16f422877ff440af69f98f960 | [
"MIT"
] | null | null | null | PythonCodes/ScientificPlotting/FigGen_Py_wolfel/Fig3.py | Nicolucas/C-Scripts | 2608df5c2e635ad16f422877ff440af69f98f960 | [
"MIT"
] | null | null | null | PythonCodes/ScientificPlotting/FigGen_Py_wolfel/Fig3.py | Nicolucas/C-Scripts | 2608df5c2e635ad16f422877ff440af69f98f960 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
plt.style.use('science')
import os, sys, time
sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/petsc-3.12.5/lib/petsc/bin/")
sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/TEAR/se2wave/utils/python")
sys.path.insert(0,"/import/freenas-m-03-geod... | 41.243243 | 159 | 0.68851 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,017 | 0.440585 |
66bba8495cc9b2de4fa5d89e4f271bf43563f4b0 | 3,560 | py | Python | setup.py | fkie/rosrepo | 13cdf89e32f0c370d106a61540b0cd102675daf9 | [
"Apache-2.0"
] | 5 | 2016-09-06T08:02:10.000Z | 2018-06-10T20:45:21.000Z | setup.py | fkie/rosrepo | 13cdf89e32f0c370d106a61540b0cd102675daf9 | [
"Apache-2.0"
] | 2 | 2019-03-11T21:44:50.000Z | 2020-03-17T09:20:47.000Z | setup.py | fkie/rosrepo | 13cdf89e32f0c370d106a61540b0cd102675daf9 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
#
# ROSREPO
# Manage ROS workspaces with multiple Gitlab repositories
#
# Author: Timo Röhling
#
# Copyright 2016 Fraunhofer FKIE
#
# 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 a... | 40 | 129 | 0.692416 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,094 | 0.587872 |
66bcb0ae9b3366b6b0c297fee8c32430261239e3 | 2,948 | py | Python | structural/decorator_and_proxy/example/proxy.py | BruceWW/python_designer_pattern | c5f8b5ee32c8984401b4a217fa35364170331063 | [
"Apache-2.0"
] | 1 | 2020-08-29T09:17:12.000Z | 2020-08-29T09:17:12.000Z | structural/decorator_and_proxy/example/proxy.py | BruceWW/python_design_pattern | c5f8b5ee32c8984401b4a217fa35364170331063 | [
"Apache-2.0"
] | null | null | null | structural/decorator_and_proxy/example/proxy.py | BruceWW/python_design_pattern | c5f8b5ee32c8984401b4a217fa35364170331063 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# @Date : 2020/8/30
# @Author : Bruce Liu /Lin Luo
# @Mail : 15869300264@163.com
class Card(object):
"""
卡片类
"""
def __init__(self, name: str, limited: bool = False, limited_num: int = 100000, surplus: int = 0):
"""
初始化一张卡
:param li... | 27.045872 | 129 | 0.587517 | 1,700 | 0.508373 | 0 | 0 | 0 | 0 | 0 | 0 | 1,597 | 0.477572 |
66bccd1b00412b945cbbdb0f6a0be3ab3a3ef37f | 158 | py | Python | tests/cli.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 9,908 | 2020-06-06T01:06:50.000Z | 2022-03-31T21:22:57.000Z | tests/cli.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 423 | 2020-05-30T11:44:37.000Z | 2022-03-18T03:15:30.000Z | tests/cli.py | joesitton/Ciphey | 862555f13e3915428a2f4ada5538fdf0be77ffcd | [
"MIT"
] | 714 | 2020-06-09T20:24:41.000Z | 2022-03-29T15:28:53.000Z | import subprocess
from sys import exit
result = subprocess.check_output(["ciphey", "-q", "-t 'hello'"])
if "hello" in result:
exit(0)
else:
exit(1)
| 15.8 | 64 | 0.651899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.196203 |
66bd2091216a58b01f3847f7b8145c69c89e49b7 | 13,057 | py | Python | macro_benchmark/SegLink/seglink/unit_tests.py | songhappy/ai-matrix | 901078e480c094235c721c49f8141aec7a84e70e | [
"Apache-2.0"
] | 180 | 2018-09-20T07:27:40.000Z | 2022-03-19T07:55:42.000Z | macro_benchmark/SegLink/seglink/unit_tests.py | songhappy/ai-matrix | 901078e480c094235c721c49f8141aec7a84e70e | [
"Apache-2.0"
] | 80 | 2018-09-26T18:55:56.000Z | 2022-02-10T02:03:26.000Z | macro_benchmark/SegLink/seglink/unit_tests.py | songhappy/ai-matrix | 901078e480c094235c721c49f8141aec7a84e70e | [
"Apache-2.0"
] | 72 | 2018-08-30T00:49:15.000Z | 2022-02-15T23:22:40.000Z | import math
import os
import tensorflow as tf
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import ops
import utils
import model_fctd
import data
import config
import visualizations as vis
FLAGS = tf.app.flags.FLAGS
def test_encode_decode_synth_data():
batch_size = 50... | 34.726064 | 103 | 0.635138 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,383 | 0.182507 |
66bdffeb1d31a5333d1015ec0693dc331a8aaed7 | 1,432 | py | Python | setup.py | thefossgeek/packer.py | deda7a708e1968f6a206a939e97149c7aefc1c02 | [
"Apache-2.0"
] | 24 | 2018-03-24T00:06:04.000Z | 2022-01-29T19:25:32.000Z | setup.py | thefossgeek/packer.py | deda7a708e1968f6a206a939e97149c7aefc1c02 | [
"Apache-2.0"
] | 7 | 2018-03-24T00:12:06.000Z | 2021-07-01T23:29:28.000Z | setup.py | thefossgeek/packer.py | deda7a708e1968f6a206a939e97149c7aefc1c02 | [
"Apache-2.0"
] | 7 | 2018-10-10T00:36:25.000Z | 2022-01-27T15:02:17.000Z | """
Copyright 2018 Matthew Aynalem
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... | 34.095238 | 82 | 0.692039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,059 | 0.739525 |
66be0ddd5abfb03dffd9214bd347839460bf60b7 | 39,732 | py | Python | pyreach/impl/logs_directory_client_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | 13 | 2021-09-01T01:10:22.000Z | 2022-03-05T10:01:52.000Z | pyreach/impl/logs_directory_client_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | null | null | null | pyreach/impl/logs_directory_client_test.py | google-research/pyreach | f91753ce7a26e77e122eb02a9fdd5a1ce3ce0159 | [
"Apache-2.0"
] | 6 | 2021-09-20T21:17:53.000Z | 2022-03-14T18:42:48.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, ... | 39.652695 | 80 | 0.55892 | 38,674 | 0.973372 | 0 | 0 | 0 | 0 | 0 | 0 | 4,463 | 0.112328 |
66bff38e64bc42b7572591b13e17cd3a431e4073 | 1,007 | py | Python | SoftLayer/CLI/file/duplicate_convert_status.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | SoftLayer/CLI/file/duplicate_convert_status.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | SoftLayer/CLI/file/duplicate_convert_status.py | ko101/softlayer-python | f4cc9fa2eb01d97c0e890907ef6735390f1a5b10 | [
"MIT"
] | null | null | null | """Get status for split or move completed percentage of a given file duplicate volume."""
# :license: MIT, see LICENSE for more details.
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
@click.command(cls=SoftLayer.CLI.command.SLCommand,
epilog="... | 32.483871 | 112 | 0.713009 | 0 | 0 | 0 | 0 | 761 | 0.75571 | 0 | 0 | 467 | 0.463754 |
66c4abe639069bea0f557f4dba81d69a1839cf18 | 392 | py | Python | apps/saas/forms.py | lucaslucyk/sigec | cdf65868e2f8ead35b005603611fcd20446633c7 | [
"MIT"
] | null | null | null | apps/saas/forms.py | lucaslucyk/sigec | cdf65868e2f8ead35b005603611fcd20446633c7 | [
"MIT"
] | 7 | 2020-02-12T03:10:01.000Z | 2021-06-10T19:30:50.000Z | apps/saas/forms.py | lucaslucyk/sigec | cdf65868e2f8ead35b005603611fcd20446633c7 | [
"MIT"
] | null | null | null | from django import forms
#from pagedown.widgets import PagedownWidget
from apps.saas.models import Offer
class OfferForm(forms.ModelForm):
#content= forms.CharField(widget=PagedownWidget(show_preview=False))
#publish= forms.DateField(widget=forms.SelectDateWidget)
class Meta:
model = Offer
fields= [
"tipo_... | 21.777778 | 69 | 0.742347 | 286 | 0.729592 | 0 | 0 | 0 | 0 | 0 | 0 | 221 | 0.563776 |
66c4c0ab19cb9fa1cb71b15b0da8a32e24b51bb6 | 5,491 | py | Python | Linuxu.py | Jefferson-Hsu/Linuxu-shell | 2bbc42248e05ac01f8d3466479bb8106833c7ab1 | [
"MIT"
] | 1 | 2022-03-04T05:53:33.000Z | 2022-03-04T05:53:33.000Z | Linuxu.py | Jefferson-Hsu/Linuxu-shell | 2bbc42248e05ac01f8d3466479bb8106833c7ab1 | [
"MIT"
] | null | null | null | Linuxu.py | Jefferson-Hsu/Linuxu-shell | 2bbc42248e05ac01f8d3466479bb8106833c7ab1 | [
"MIT"
] | null | null | null | #library
import os
#string aphoto
print(" _ _ _ _ __ __ _ _ .____ .__ ")
print("| | | | ___| | | __\\ \\ / /__ _ __| | __| | | | |__| ____ __ _____ _____ __ ")
print("| |_| |/ _ \\ | |/ _ \\ \\ /\\ / / _ \\|... | 44.282258 | 152 | 0.24094 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,628 | 0.660718 |
66c7e494275971e9a3a3aa777ced7402edea752a | 1,237 | py | Python | src/test.py | williamyang1991/TET-GAN | bdfca141fc14c5917fd9be8d2bc23870f9ad3288 | [
"MIT"
] | 86 | 2019-01-02T06:20:09.000Z | 2022-03-23T01:16:32.000Z | src/test.py | williamyang1991/TET-GAN | bdfca141fc14c5917fd9be8d2bc23870f9ad3288 | [
"MIT"
] | 5 | 2019-01-22T06:18:26.000Z | 2021-12-16T02:01:34.000Z | src/test.py | williamyang1991/TET-GAN | bdfca141fc14c5917fd9be8d2bc23870f9ad3288 | [
"MIT"
] | 24 | 2019-01-03T09:36:54.000Z | 2021-12-14T10:04:11.000Z | from options import TestOptions
import torch
from models import TETGAN
from utils import load_image, to_data, to_var, visualize, save_image
import os
#os.environ["CUDA_VISIBLE_DEVICES"] = "0"
def main():
# parse options
parser = TestOptions()
opts = parser.parse()
# data loader
print('--- load dat... | 25.770833 | 68 | 0.609539 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.135004 |
66cc342e6fa18c2dd06d530c8ed54f8e34f04274 | 1,853 | py | Python | scripts/bulkLoadUrls.py | conveyal/gtfs-data-manager | e7269fc1660f1816da269b1c116b43bdf758900b | [
"MIT"
] | 25 | 2015-02-11T19:20:07.000Z | 2021-03-10T07:53:29.000Z | scripts/bulkLoadUrls.py | conveyal/gtfs-data-manager | e7269fc1660f1816da269b1c116b43bdf758900b | [
"MIT"
] | 53 | 2015-01-07T20:30:56.000Z | 2016-10-10T12:47:22.000Z | scripts/bulkLoadUrls.py | conveyal/gtfs-data-manager | e7269fc1660f1816da269b1c116b43bdf758900b | [
"MIT"
] | 3 | 2015-01-03T10:17:34.000Z | 2015-11-10T10:44:27.000Z | #!/usr/bin/python
# load many feeds to the GTFS data manager, from a csv with fields name and url
# usage: bulkLoadFeeds.py file.csv http://server.example.com/
import csv
from getpass import getpass
from sys import argv
import json
from cookielib import CookieJar
import urllib2
from urllib import urlencode
if len(arg... | 25.736111 | 115 | 0.611981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 646 | 0.348624 |
66ce81273371c8d4fdeb7dac39c7d81c55ecac89 | 5,962 | py | Python | EQUATIONS/FOR_RESOLUTION_STUDY/BuoyancyResolutionStudy.py | mmicromegas/ransX | 2faaa786e00cfd14dce0e18f0793cd0252428d2a | [
"BSD-2-Clause"
] | 4 | 2019-04-22T11:43:47.000Z | 2020-09-16T00:28:15.000Z | EQUATIONS/FOR_RESOLUTION_STUDY/BuoyancyResolutionStudy.py | mmicromegas/ransX | 2faaa786e00cfd14dce0e18f0793cd0252428d2a | [
"BSD-2-Clause"
] | 34 | 2019-07-01T09:11:00.000Z | 2022-03-30T13:35:43.000Z | EQUATIONS/FOR_RESOLUTION_STUDY/BuoyancyResolutionStudy.py | mmicromegas/ransX | 2faaa786e00cfd14dce0e18f0793cd0252428d2a | [
"BSD-2-Clause"
] | 1 | 2020-09-16T00:28:17.000Z | 2020-09-16T00:28:17.000Z | import numpy as np
from scipy import integrate
import matplotlib.pyplot as plt
from UTILS.Calculus import Calculus
from UTILS.SetAxisLimit import SetAxisLimit
from UTILS.Tools import Tools
from UTILS.Errors import Errors
import sys
# Theoretical background https://arxiv.org/abs/1401.5176
# Mocak, Meakin, Viallet, Ar... | 32.939227 | 122 | 0.548306 | 5,490 | 0.920832 | 0 | 0 | 0 | 0 | 0 | 0 | 1,442 | 0.241865 |
66d0333de9cb88854cae7ea5468d3e9e83ace47c | 953 | py | Python | quokka/ext/weasyprint.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | 1 | 2020-10-31T03:57:07.000Z | 2020-10-31T03:57:07.000Z | quokka/ext/weasyprint.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | null | null | null | quokka/ext/weasyprint.py | yencchen/quokka_epus | d64aeb9c5ca59ee4bdcd84381f9bb0504680f5f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function
import logging
from flask import url_for
logger = logging.getLogger()
try:
from flask_weasyprint import render_pdf
import_error = False
except (ImportError, OSError) as e:
# print("""
# Error importing flask-weasyprint!
# PDF support... | 25.756757 | 74 | 0.684155 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 424 | 0.444911 |
66d0fa4f73c90e59d6dc87d8a6c39b035c3b58f1 | 392 | py | Python | jupyter_server_terminals/__init__.py | blink1073/jupyter_server_terminals | cc0363421ab50fded26c8519ea4694bf1a391fce | [
"BSD-3-Clause-Clear"
] | 3 | 2021-12-30T23:55:47.000Z | 2022-02-18T01:14:54.000Z | jupyter_server_terminals/__init__.py | blink1073/jupyter_server_terminals | cc0363421ab50fded26c8519ea4694bf1a391fce | [
"BSD-3-Clause-Clear"
] | 5 | 2021-12-26T21:27:11.000Z | 2022-03-03T11:37:04.000Z | jupyter_server_terminals/__init__.py | blink1073/jupyter_server_terminals | cc0363421ab50fded26c8519ea4694bf1a391fce | [
"BSD-3-Clause-Clear"
] | 4 | 2021-12-26T21:25:45.000Z | 2022-01-27T02:47:10.000Z | from ._version import __version__ # noqa:F401
try:
from .app import TerminalsExtensionApp
except ModuleNotFoundError:
import warnings
warnings.warn("Could not import submodules")
def _jupyter_server_extension_points(): # pragma: no cover
return [
{
"module": "jupyter_server_ter... | 21.777778 | 59 | 0.663265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.257653 |
66d19b6566c778e3d204fad20cbbd324cf9a6a61 | 5,256 | py | Python | CommandsToFunction.py | destruc7i0n/CommandsToFunction | f1c29c6280524c54cc5876b966c1ff36ab1c2d27 | [
"MIT"
] | 1 | 2018-03-10T21:09:04.000Z | 2018-03-10T21:09:04.000Z | CommandsToFunction.py | destruc7i0n/CommandsToFunction | f1c29c6280524c54cc5876b966c1ff36ab1c2d27 | [
"MIT"
] | null | null | null | CommandsToFunction.py | destruc7i0n/CommandsToFunction | f1c29c6280524c54cc5876b966c1ff36ab1c2d27 | [
"MIT"
] | null | null | null | # By TheDestruc7i0n https://thedestruc7i0n.ca
# MrGarretto for the code for traversing the command block chain https://mrgarretto.com
import mcplatform
import codecs
__version__ = "V1.4.1"
displayName = "Commands to Function"
inputs = (
("Converts a command block chain into a function.", "label"),
("The fil... | 39.818182 | 180 | 0.562976 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,105 | 0.400495 |
66d1a62152bf00302159e841b40dff724b8f0c6c | 420 | py | Python | shopping_cart/exc.py | godfrey-leung/shopping | e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a | [
"MIT"
] | null | null | null | shopping_cart/exc.py | godfrey-leung/shopping | e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a | [
"MIT"
] | null | null | null | shopping_cart/exc.py | godfrey-leung/shopping | e57c8246961fc3bd5dbffd05e7ffd2ed43a8867a | [
"MIT"
] | null | null | null |
class InstanceNotFound(Exception):
"""
Raise if an instance is not found in
the database
"""
class InvalidValue(Exception):
"""
Raise if an invalid value is given
"""
class OverDemand(Exception):
"""
Raise if excess demand is requested
"""
class InvalidAmount(Exception):
... | 16.153846 | 49 | 0.638095 | 409 | 0.97381 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.633333 |
66d42f1fdcd91d122cd938babcc3fe924510d04e | 2,147 | py | Python | src/admin/godmode/actions/base.py | aimanow/sft | dce87ffe395ae4bd08b47f28e07594e1889da819 | [
"Apache-2.0"
] | 280 | 2016-07-19T09:59:02.000Z | 2022-03-05T19:02:48.000Z | godmode/actions/base.py | YAR-SEN/GodMode2 | d8a79b45c6d8b94f3d2af3113428a87d148d20d0 | [
"WTFPL"
] | 3 | 2016-07-20T05:36:49.000Z | 2018-12-10T16:16:19.000Z | godmode/actions/base.py | YAR-SEN/GodMode2 | d8a79b45c6d8b94f3d2af3113428a87d148d20d0 | [
"WTFPL"
] | 20 | 2016-07-20T10:51:34.000Z | 2022-01-12T23:15:22.000Z | import json
from flask import g, request, render_template
from flask.views import View
from godmode import logging
from godmode.acl import ACL
from godmode.audit_log import audit_log
from godmode.exceptions import AccessDenied
log = logging.getLogger(__name__)
class BaseAction(View):
name = None
title = No... | 26.182927 | 98 | 0.583605 | 1,880 | 0.87564 | 0 | 0 | 0 | 0 | 0 | 0 | 153 | 0.071262 |
66d880a9b64fd73b407a720c9fa6817d2609e5bf | 16,001 | py | Python | forever/Warframe.py | dss285/4ever | bd6f70f92d76d43342da401562f2c504adaf3867 | [
"MIT"
] | null | null | null | forever/Warframe.py | dss285/4ever | bd6f70f92d76d43342da401562f2c504adaf3867 | [
"MIT"
] | null | null | null | forever/Warframe.py | dss285/4ever | bd6f70f92d76d43342da401562f2c504adaf3867 | [
"MIT"
] | null | null | null | import discord
import asyncio
import time
import aiohttp
import re
import pathlib
import os
import json
from bs4 import BeautifulSoup
from datetime import datetime
from models.UpdatedMessage import UpdatedMessage
from models.EmbedTemplate import EmbedTemplate
from models.BotMention import BotMention
from f... | 41.778068 | 159 | 0.645272 | 15,628 | 0.976689 | 0 | 0 | 0 | 0 | 6,812 | 0.425723 | 3,523 | 0.220174 |
66d8ba6f365049a80533d4986a5c2cf0bb77bfb0 | 2,561 | py | Python | config/jupyter/jupyterhub_config.py | mhwasil/jupyterhub-on-gcloud | 9cfe935772d7599fa36c5b998cebb87c17e24277 | [
"MIT"
] | 3 | 2018-10-06T20:35:08.000Z | 2019-03-02T08:04:52.000Z | config/jupyter/jupyterhub_config.py | mhwasil/jupyterhub-on-gcloud | 9cfe935772d7599fa36c5b998cebb87c17e24277 | [
"MIT"
] | 4 | 2019-05-15T11:36:43.000Z | 2019-07-23T09:34:45.000Z | config/jupyter/jupyterhub_config.py | mhwasil/jupyterhub-on-gcloud | 9cfe935772d7599fa36c5b998cebb87c17e24277 | [
"MIT"
] | 2 | 2020-01-09T21:03:44.000Z | 2020-11-22T16:47:00.000Z | c = get_config()
c.JupyterHub.ip = u'127.0.0.1'
c.JupyterHub.port = 8000
c.JupyterHub.cookie_secret_file = u'/srv/jupyterhub/jupyterhub_cookie_secret'
c.JupyterHub.db_url = u'/srv/jupyterhub/jupyterhub.sqlite'
#c.JupyterHub.proxy_auth_token = u'/srv/jupyterhub/proxy_auth_token'
c.ConfigurableHTTPProxy.auth_token = u'/s... | 31.617284 | 78 | 0.643108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,449 | 0.565795 |
66d95353965e38496015e85b754a89803b392d87 | 11,908 | py | Python | legacy/Environment.py | LaoKpa/reinforcement_trader | 1465731269e6d58900a28a040346bf45ffb5cf97 | [
"MIT"
] | 7 | 2020-09-28T23:36:40.000Z | 2022-02-22T02:00:32.000Z | legacy/Environment.py | LaoKpa/reinforcement_trader | 1465731269e6d58900a28a040346bf45ffb5cf97 | [
"MIT"
] | 4 | 2020-11-13T18:48:52.000Z | 2022-02-10T01:29:47.000Z | legacy/Environment.py | lzcaisg/reinforcement_trader | 1465731269e6d58900a28a040346bf45ffb5cf97 | [
"MIT"
] | 3 | 2020-11-23T17:31:59.000Z | 2021-04-08T10:55:03.000Z | import datetime
import warnings
import pandas as pd
import numpy as np
from MongoDBUtils import *
from scipy.optimize import fsolve
import pymongo
TRADING_FEE = 0.008
EARLIEST_DATE = datetime.datetime(2014, 10, 17)
LATEST_DATE = datetime.datetime(2019, 10, 17)
# In any cases, we shouldn't know today's and future val... | 36.527607 | 141 | 0.570037 | 11,508 | 0.966409 | 0 | 0 | 0 | 0 | 0 | 0 | 4,562 | 0.383104 |
66d9e2205d4a01f644f0a6147e2760e0d6b2de38 | 579 | py | Python | examples/Titanic/titanic.py | mlflow/mlflow-torchserve | 91663b630ef12313da3ad821767faf3fc409345b | [
"Apache-2.0"
] | 40 | 2020-11-13T02:08:10.000Z | 2022-03-27T07:41:57.000Z | examples/Titanic/titanic.py | Ideas2IT/mlflow-torchserve | d6300fb73f16d74ee2c7718c249faf485c4f3b62 | [
"Apache-2.0"
] | 23 | 2020-11-16T11:28:01.000Z | 2021-09-23T11:28:24.000Z | examples/Titanic/titanic.py | Ideas2IT/mlflow-torchserve | d6300fb73f16d74ee2c7718c249faf485c4f3b62 | [
"Apache-2.0"
] | 15 | 2020-11-13T10:25:25.000Z | 2022-02-01T10:13:20.000Z | import torch.nn as nn
class TitanicSimpleNNModel(nn.Module):
def __init__(self):
super().__init__()
self.linear1 = nn.Linear(12, 12)
self.sigmoid1 = nn.Sigmoid()
self.linear2 = nn.Linear(12, 8)
self.sigmoid2 = nn.Sigmoid()
self.linear3 = nn.Linear(8, 2)
self... | 30.473684 | 64 | 0.62867 | 554 | 0.956822 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
66db0c7061bb9a75d8373490465f8ef60bcc3200 | 426 | py | Python | api/tacticalrmm/agents/migrations/0049_agent_agents_agen_monitor_df8816_idx.py | v2cloud/tacticalrmm | 12f599f9749985f66ff9b559c5e5abd36064b182 | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/migrations/0049_agent_agents_agen_monitor_df8816_idx.py | v2cloud/tacticalrmm | 12f599f9749985f66ff9b559c5e5abd36064b182 | [
"MIT"
] | null | null | null | api/tacticalrmm/agents/migrations/0049_agent_agents_agen_monitor_df8816_idx.py | v2cloud/tacticalrmm | 12f599f9749985f66ff9b559c5e5abd36064b182 | [
"MIT"
] | null | null | null | # Generated by Django 4.0.3 on 2022-04-18 14:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('agents', '0048_remove_agent_has_patches_pending_and_more'),
]
operations = [
migrations.AddIndex(
model_name='agent',
... | 23.666667 | 98 | 0.65493 | 333 | 0.78169 | 0 | 0 | 0 | 0 | 0 | 0 | 159 | 0.373239 |
66dcca39ba0172f5d72111b99f2df6a26ed3cb02 | 6,431 | py | Python | src/Datasets.py | fauxneticien/bnf_cnn_qbe-std | ab7dcb9c9d3d8969f1f17aaa87b7337d3ccfcc30 | [
"MIT"
] | 4 | 2021-03-26T17:18:59.000Z | 2022-03-21T18:28:56.000Z | src/Datasets.py | fauxneticien/bnf_cnn_qbe-std | ab7dcb9c9d3d8969f1f17aaa87b7337d3ccfcc30 | [
"MIT"
] | 1 | 2021-11-02T17:29:46.000Z | 2021-11-02T17:29:46.000Z | src/Datasets.py | fauxneticien/bnf_cnn_qbe-std | ab7dcb9c9d3d8969f1f17aaa87b7337d3ccfcc30 | [
"MIT"
] | 1 | 2020-11-11T05:04:55.000Z | 2020-11-11T05:04:55.000Z | import os
import torch
import numpy as np
import pandas as pd
from torch.utils.data import Dataset, DataLoader
from scipy.spatial.distance import cdist
import logging
class STD_Dataset(Dataset):
"""Spoken Term Detection dataset."""
def __init__(self, root_dir, labels_csv, query_dir, audio_dir, apply_vad = Fal... | 51.448 | 133 | 0.640647 | 6,262 | 0.973721 | 0 | 0 | 0 | 0 | 0 | 0 | 2,118 | 0.329342 |
66de338a8afcfc34368f70df12c0187b512a7430 | 3,209 | py | Python | dmz/store.py | yuvipanda/edit-stats | fb096715f18df999b4af4fb116e6c4130f24c2ec | [
"MIT"
] | null | null | null | dmz/store.py | yuvipanda/edit-stats | fb096715f18df999b4af4fb116e6c4130f24c2ec | [
"MIT"
] | null | null | null | dmz/store.py | yuvipanda/edit-stats | fb096715f18df999b4af4fb116e6c4130f24c2ec | [
"MIT"
] | null | null | null | """Implements a db backed storage area for intermediate results"""
import sqlite3
class Store(object):
"""
Represents an sqlite3 backed storage area that's vaguely key value
modeled for intermediate storage about metadata / data for metrics
about multiple wikis that have some underlying country relate... | 38.662651 | 111 | 0.600499 | 3,124 | 0.973512 | 0 | 0 | 0 | 0 | 0 | 0 | 1,602 | 0.499221 |
66e230d59002f2287f49fdc67f96ab043ceba837 | 316 | py | Python | static/code/loc/attn.py | navivokaj/deepcourse | c5385e7a7b8417fe1017f1057e8e5d32b4a24bb5 | [
"Apache-2.0"
] | 91 | 2021-08-28T05:03:36.000Z | 2022-01-27T09:46:36.000Z | static/code/loc/attn.py | faisalbi/deepcourse | fe26314e43896013d195955d16fc4f215e39a53a | [
"Apache-2.0"
] | 8 | 2021-09-14T13:21:56.000Z | 2021-12-28T19:45:51.000Z | static/code/loc/attn.py | faisalbi/deepcourse | fe26314e43896013d195955d16fc4f215e39a53a | [
"Apache-2.0"
] | 10 | 2021-08-28T22:32:19.000Z | 2022-03-16T11:13:02.000Z | def generate_attention(path, size=(224, 224)):
image = Image.open(path)
image.thumbnail(size, Image.ANTIALIAS)
tensor = transform(image)[None]
with torch.no_grad():
logits = net(tensor)[0]
probs = torch.softmax(logits, dim=0)
attention_map = probs[indexes].sum(dim=0)
return image, attention_map
| 26.333333 | 46 | 0.708861 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
66e356546289b5293424a7a6ad3ffb4afce031ec | 7,074 | py | Python | main.py | usdot-its-jpo-data-portal/metadata-query-function | 589e5df691fab82e264ce74196dd797b9eb17f5e | [
"Apache-2.0"
] | null | null | null | main.py | usdot-its-jpo-data-portal/metadata-query-function | 589e5df691fab82e264ce74196dd797b9eb17f5e | [
"Apache-2.0"
] | null | null | null | main.py | usdot-its-jpo-data-portal/metadata-query-function | 589e5df691fab82e264ce74196dd797b9eb17f5e | [
"Apache-2.0"
] | 1 | 2021-12-14T18:00:20.000Z | 2021-12-14T18:00:20.000Z | import boto3
import dateutil
import glob
import json
import logging
import os
import queue
import time
from queries import MetadataQueries
USE_LOCAL_DATA = True # whether to load data from S3 (false) or locally (true)
LOCAL_DATA_REPOSITORY = "s3data/usdot-its-cvpilot-public-data" # path to local directory containing s... | 46.235294 | 227 | 0.669918 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,217 | 0.313401 |
66e36f3c188b5158455460f11322fdc4021ffe06 | 1,070 | py | Python | example_config/SecretConfig.py | axiegamingph-dev/discordaxieqrbot | fac9b3f325b98d21ece12445ec798c125d06f788 | [
"MIT"
] | null | null | null | example_config/SecretConfig.py | axiegamingph-dev/discordaxieqrbot | fac9b3f325b98d21ece12445ec798c125d06f788 | [
"MIT"
] | null | null | null | example_config/SecretConfig.py | axiegamingph-dev/discordaxieqrbot | fac9b3f325b98d21ece12445ec798c125d06f788 | [
"MIT"
] | 2 | 2022-01-13T18:45:26.000Z | 2022-03-03T11:50:43.000Z | Managers = ['Shim', 'Mike', 'Ryan', 'Kevin', 'Wessa', 'ser0wl']
# google spreedsheet id
ISKO_SPREADSHEET_ID = ''
# the list of names with discord ID
ISKO_DiscordAccount = 'DiscordAccount!A2:B100'
# the list of Names, ronin address, ronin private keys
# eg:
# Name | Address | Privat... | 33.4375 | 94 | 0.699065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 850 | 0.794393 |
66e44acc59d85966cbb8120b35805a421dccdbf1 | 566 | py | Python | world/dominion/migrations/0011_organization_theories.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 5 | 2019-03-16T08:26:53.000Z | 2019-11-27T15:42:16.000Z | world/dominion/migrations/0011_organization_theories.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-29T05:08:15.000Z | 2021-06-10T21:35:32.000Z | world/dominion/migrations/0011_organization_theories.py | stesla/arxcode | a0ebf7c4d310de8c1980a8ba2a48948a68bb5a0a | [
"MIT"
] | 7 | 2018-09-19T21:11:29.000Z | 2019-11-19T12:46:14.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-19 03:52
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('character', '0015_auto_20170605_2252'),
('dominion', '0010_auto_20170511_0645'),
... | 25.727273 | 108 | 0.637809 | 408 | 0.720848 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.335689 |
66e492eef799f5d354e84f2867ee89f9c4cd7b7a | 200 | py | Python | tests/button_test.py | almasgai/Drone | 1223375976baf79d0f4362d42287d1a4039ba1e9 | [
"MIT"
] | null | null | null | tests/button_test.py | almasgai/Drone | 1223375976baf79d0f4362d42287d1a4039ba1e9 | [
"MIT"
] | null | null | null | tests/button_test.py | almasgai/Drone | 1223375976baf79d0f4362d42287d1a4039ba1e9 | [
"MIT"
] | null | null | null | from gpiozero import Button
import os
from time import sleep
button = Button(2)
i = 0
while True:
if button.is_pressed:
print(i, ". I've been pressed")
i += 1
sleep(0.1)
| 15.384615 | 39 | 0.61 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.105 |
66e5419754e56410c068112926f27e01cdae86bb | 820 | py | Python | reprojection.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | reprojection.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | reprojection.py | ekrell/nir2watermap | 5253f2cde142a62103eb06fb2931c9aed6431211 | [
"MIT"
] | null | null | null | import rasterio
from rasterio.plot import show, reshape_as_raster, reshape_as_image, adjust_band
from rasterio import warp
import numpy as np
def reprojectio(img, bounds, transform, projection = "epsg:4326", resolution = 0.00001):
# Reproject
transform, width, height = warp.calculate_default_transform( \
... | 37.272727 | 91 | 0.680488 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.054878 |
66e80248874252f8ee1fc31cfa1763523a5f99eb | 4,034 | py | Python | opentsdb/push_thread.py | razvandimescu/opentsdb-py | 61c15302468769121f94323493e88cb51efcea15 | [
"MIT"
] | 48 | 2016-12-27T10:11:41.000Z | 2021-11-15T16:05:24.000Z | opentsdb/push_thread.py | razvandimescu/opentsdb-py | 61c15302468769121f94323493e88cb51efcea15 | [
"MIT"
] | 8 | 2017-10-08T16:20:30.000Z | 2022-02-23T08:36:52.000Z | opentsdb/push_thread.py | razvandimescu/opentsdb-py | 61c15302468769121f94323493e88cb51efcea15 | [
"MIT"
] | 17 | 2017-10-01T01:14:55.000Z | 2021-11-15T16:05:24.000Z | from logging import getLogger
from queue import Empty
import threading
import random
import time
logger = getLogger('opentsdb-py')
class PushThread(threading.Thread):
WAIT_NEXT_METRIC_TIMEOUT = 3
def __init__(self, tsdb_connect, metrics_queue, close_client,
send_metrics_limit, send_metrics... | 32.015873 | 119 | 0.617005 | 3,893 | 0.965047 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.038423 |
66e8dfd4ed77fb442ea81a851f7a9c4e599b1de3 | 465 | py | Python | projects/generate_pdf/main.py | parth-patel-samarthview/batch_201901 | f407c1bf9575a01e8ddc507adb6f0574f8d2bc09 | [
"MIT"
] | 2 | 2019-03-17T07:20:24.000Z | 2019-03-31T05:47:09.000Z | projects/generate_pdf/main.py | parth-patel-samarthview/batch_201901 | f407c1bf9575a01e8ddc507adb6f0574f8d2bc09 | [
"MIT"
] | null | null | null | projects/generate_pdf/main.py | parth-patel-samarthview/batch_201901 | f407c1bf9575a01e8ddc507adb6f0574f8d2bc09 | [
"MIT"
] | 2 | 2019-01-28T13:09:48.000Z | 2019-03-17T07:20:37.000Z | from xlrd import open_workbook
wb = open_workbook(r"C:\Users\Lenovo\Documents\excel converter.xlsx")
for s in wb.sheets():
#print 'Sheet:',s.name
values = []
for row in range(s.nrows):
col_value = []
for col in range(s.ncols):
value = (s.cell(row,col).value)
... | 31 | 70 | 0.572043 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.154839 |
66ebd223e34af9e0e97db29c5f0febdca09f52fb | 3,068 | py | Python | apitaxdrivers/Openstack.py | Apitax/Drivers | 35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe | [
"Apache-2.0"
] | null | null | null | apitaxdrivers/Openstack.py | Apitax/Drivers | 35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe | [
"Apache-2.0"
] | 4 | 2018-08-03T20:01:57.000Z | 2018-10-22T15:32:27.000Z | apitaxdrivers/Openstack.py | Apitax/Drivers | 35b2c2f4c8ce8b98615f42fc30f04111d7b9bffe | [
"Apache-2.0"
] | null | null | null | from apitax.drivers.Driver import Driver
from apitax.utilities.Files import getAllFiles
from apitax.ah.Options import Options
from pathlib import Path
from apitax.ah.Credentials import Credentials
from apitax.utilities.Json import read
from apitax.ah.State import State
from apitax.utilities.Files import getPath
class... | 35.264368 | 118 | 0.601695 | 2,752 | 0.897001 | 0 | 0 | 0 | 0 | 0 | 0 | 527 | 0.171773 |
66edc872f39ffc8e4f5e60f1aba0149f68247a58 | 220 | py | Python | my_lambdata/my_script.py | TheLadyJack/lambdata-pt5 | 0ff4a86f3cd35e502c0a8a1c704e7944298840f2 | [
"MIT"
] | null | null | null | my_lambdata/my_script.py | TheLadyJack/lambdata-pt5 | 0ff4a86f3cd35e502c0a8a1c704e7944298840f2 | [
"MIT"
] | null | null | null | my_lambdata/my_script.py | TheLadyJack/lambdata-pt5 | 0ff4a86f3cd35e502c0a8a1c704e7944298840f2 | [
"MIT"
] | 1 | 2020-05-11T02:49:28.000Z | 2020-05-11T02:49:28.000Z |
# my_script.py
import pandas
from my_lambdata.my_mod import enlarge
print('HAPPY TUESDAY NIGHT')
df = pandas.DataFrame({'x': [1, 2, 3], 'y': [4, 5, 6]})
print(df.head())
x = 5
print("ENLARGE", x, "TO", enlarge(x)) | 14.666667 | 55 | 0.636364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.245455 |
66ee56f212ce0df2c239268cabb21b8541c895a2 | 1,063 | py | Python | Week02/Assignment/jstoppelman_01.py | nkruyer/SkillsWorkshop2018 | 2201255ff63eca111635789267d0600a95854c38 | [
"BSD-3-Clause"
] | 1 | 2020-04-18T03:30:46.000Z | 2020-04-18T03:30:46.000Z | Week02/Assignment/jstoppelman_01.py | nkruyer/SkillsWorkshop2018 | 2201255ff63eca111635789267d0600a95854c38 | [
"BSD-3-Clause"
] | 21 | 2018-07-12T19:12:23.000Z | 2018-08-10T13:52:45.000Z | Week02/Assignment/jstoppelman_01.py | nkruyer/SkillsWorkshop2018 | 2201255ff63eca111635789267d0600a95854c38 | [
"BSD-3-Clause"
] | 60 | 2018-05-08T16:59:20.000Z | 2018-08-01T14:28:28.000Z | #!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
from scipy.integrate import simps
from scipy.optimize import curve_fit
def curve3(x,a,b,c,d):
return a*x**3+b*x**2+c*x+d
def BIC(y, yhat, k, weight = 1):
err = y - yhat
sigma = np.std(np.real(err))
n = len(y)
B = n*np.log(sigm... | 26.575 | 125 | 0.590781 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.099718 |
66eed650aab89b6bac9cd47794d827289659357d | 1,225 | py | Python | apps/wordcount.py | marsupialtail/quokka | 9dfffaf8499a27f121eb5007db5371934ab9fda5 | [
"Apache-2.0"
] | 4 | 2022-03-09T19:51:02.000Z | 2022-03-24T22:00:18.000Z | apps/wordcount.py | marsupialtail/quokka | 9dfffaf8499a27f121eb5007db5371934ab9fda5 | [
"Apache-2.0"
] | null | null | null | apps/wordcount.py | marsupialtail/quokka | 9dfffaf8499a27f121eb5007db5371934ab9fda5 | [
"Apache-2.0"
] | 1 | 2022-02-10T04:38:24.000Z | 2022-02-10T04:38:24.000Z | import time
import sys
sys.path.append("/home/ubuntu/quokka/pyquokka")
import pyarrow.compute as compute
import pyarrow as pa
import pandas as pd
from pyquokka.quokka_runtime import TaskGraph
from pyquokka.dataset import InputS3CSVDataset
from pyquokka.executors import UDFExecutor, AggExecutor
import ray
from pyquokka.... | 36.029412 | 143 | 0.777959 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.076735 |
66f14722457fd9966ac9b7749eb637bceaf702bb | 5,464 | py | Python | websauna/system/devop/cmdline.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | websauna/system/devop/cmdline.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | websauna/system/devop/cmdline.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | """Helper functions to initializer Websauna framework for command line applications."""
# Standard Library
import logging
import os
import sys
import typing as t
# Pyramid
import plaster
from pyramid import router
from pyramid import scripting
from rainbow_logging_handler import RainbowLoggingHandler
# Websauna
from... | 31.583815 | 124 | 0.731149 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,558 | 0.468155 |
dd0515ae81e31b3081572aafa51d5253637ae85f | 2,010 | py | Python | src/apd/aggregation/actions/base.py | MatthewWilkes/apd.aggregation | 427fa908f45332d623295f92e1ccfdaf545d6997 | [
"BSD-3-Clause"
] | null | null | null | src/apd/aggregation/actions/base.py | MatthewWilkes/apd.aggregation | 427fa908f45332d623295f92e1ccfdaf545d6997 | [
"BSD-3-Clause"
] | 11 | 2020-11-23T21:36:48.000Z | 2022-03-12T00:48:58.000Z | src/apd/aggregation/actions/base.py | MatthewWilkes/apd.aggregation | 427fa908f45332d623295f92e1ccfdaf545d6997 | [
"BSD-3-Clause"
] | 1 | 2020-08-09T01:47:59.000Z | 2020-08-09T01:47:59.000Z | import typing as t
from ..typing import T_value
from ..database import DataPoint
from ..exceptions import NoDataForTrigger
class Trigger(t.Generic[T_value]):
name: str
async def start(self) -> None:
"""Coroutine to do any initial setup"""
return
async def match(self, datapoint: DataPoin... | 31.904762 | 77 | 0.636816 | 1,880 | 0.935323 | 0 | 0 | 0 | 0 | 1,784 | 0.887562 | 895 | 0.445274 |
dd05c5af3b4de9bb3a156483a19f52a9e8f9c454 | 1,056 | py | Python | scripts/32_Model_Parse_SPRING/24_Collect_Test_Gold_Graphs.py | MeghaTiya/amrlib | 61febbd1ed15d64e3f01126eaeea46211d42e738 | [
"MIT"
] | null | null | null | scripts/32_Model_Parse_SPRING/24_Collect_Test_Gold_Graphs.py | MeghaTiya/amrlib | 61febbd1ed15d64e3f01126eaeea46211d42e738 | [
"MIT"
] | null | null | null | scripts/32_Model_Parse_SPRING/24_Collect_Test_Gold_Graphs.py | MeghaTiya/amrlib | 61febbd1ed15d64e3f01126eaeea46211d42e738 | [
"MIT"
] | 1 | 2022-02-09T16:20:42.000Z | 2022-02-09T16:20:42.000Z | #!/usr/bin/python3
import setup_run_dir # Set the working directory and python sys.path to 2 levels above
import os
from glob import glob
from amrlib.graph_processing.amr_loading_raw import load_raw_amr
# Collect all the amr graphs from multiple files and create a gold test file.
# This simply concatenates fil... | 37.714286 | 94 | 0.705492 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 566 | 0.535985 |
dd0710c4323697be4edfde027a5e9419170be224 | 1,818 | py | Python | migrations/versions/281362c70f34_.py | TobiasPrt/Smartphoniker-shop | 6b74a3cc1c81db7a56d70609dbca29ddeec3053f | [
"MIT"
] | 2 | 2020-05-11T08:46:45.000Z | 2020-05-11T09:09:57.000Z | migrations/versions/281362c70f34_.py | TobiasPrt/Smartphoniker-shop | 6b74a3cc1c81db7a56d70609dbca29ddeec3053f | [
"MIT"
] | 4 | 2021-02-19T13:31:53.000Z | 2022-02-20T13:34:10.000Z | migrations/versions/281362c70f34_.py | TobiasPrt/Smartphoniker-shop | 6b74a3cc1c81db7a56d70609dbca29ddeec3053f | [
"MIT"
] | 5 | 2020-04-27T16:25:39.000Z | 2020-06-07T16:03:15.000Z | """empty message
Revision ID: 281362c70f34
Revises: acff3391146d
Create Date: 2020-05-27 16:58:11.029790
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '281362c70f34'
down_revision = 'acff3391146d'
branch_labels = None
depends_on = None
def... | 31.894737 | 65 | 0.60011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 559 | 0.307481 |
dd07924629dd0724abf147fb5de6f38d430e1d51 | 136 | py | Python | ui/widgets/histogram/__init__.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 25 | 2015-11-08T16:36:54.000Z | 2022-01-20T16:03:28.000Z | ui/widgets/histogram/__init__.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 2 | 2016-12-01T23:13:08.000Z | 2017-07-25T02:40:49.000Z | ui/widgets/histogram/__init__.py | berendkleinhaneveld/Registrationshop | 0d6f3ee5324865cdcb419369139f37c39dfe9a1c | [
"MIT"
] | 10 | 2016-07-05T14:39:16.000Z | 2022-01-01T02:05:55.000Z | from Histogram import Histogram
from HistogramWidget import HistogramWidget
from TrackingHistogramWidget import TrackingHistogramWidget
| 34 | 59 | 0.911765 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dd083d9565ab68711f5686f12e467a2276370bf5 | 188 | py | Python | python_module/numpy_module/numpy_test.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | 1 | 2021-09-17T09:32:56.000Z | 2021-09-17T09:32:56.000Z | python_module/numpy_module/numpy_test.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | 2 | 2021-05-11T05:47:13.000Z | 2021-05-11T05:48:10.000Z | python_module/numpy_module/numpy_test.py | panc-test/python-study | fb172ed4a4f7fb521de9a005cd55115ad63a5b6d | [
"MIT"
] | null | null | null | """
numpy模块 —— 数据分析
"""
import numpy
#创建矩阵
array = numpy.array([[1,2,3],[4,5,6]])
print(array,'\n',type(array))
#矩阵维度
print(array.ndim)
#行数和列数
print(array.shape)
#元素个数
print(array.size) | 11.75 | 38 | 0.654255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.415966 |
dd093842c9dc2bff582de0e411627f80f0d5bed5 | 305 | py | Python | flask_config.py | khanshifaul/Flask_Template_Skeleton | 951ccb9fc73ff5a2d501f2bc6a742553b8177fc5 | [
"Apache-2.0"
] | null | null | null | flask_config.py | khanshifaul/Flask_Template_Skeleton | 951ccb9fc73ff5a2d501f2bc6a742553b8177fc5 | [
"Apache-2.0"
] | null | null | null | flask_config.py | khanshifaul/Flask_Template_Skeleton | 951ccb9fc73ff5a2d501f2bc6a742553b8177fc5 | [
"Apache-2.0"
] | null | null | null | class Base(object):
DEBUG = False
TESTING = False
class Production(Base):
DEBUG = False
TESTING = False
class Staging(Base):
DEBUG = True
TESTING = False
class Development(Base):
DEBUG = True
TESTING = True
class Testing(Base):
DEBUG = False
TESTING = True
| 12.708333 | 24 | 0.629508 | 292 | 0.957377 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dd0944f2e40b50921bc2a055a4736363525bffe8 | 395 | py | Python | mellophone/mellophone/settings_production.py | nchlswhttkr/mellophone | c454c26d06a0cdebabc7b9ec5fef22c9c48d6ea6 | [
"MIT"
] | 9 | 2019-02-11T03:35:18.000Z | 2019-07-17T07:51:44.000Z | mellophone/mellophone/settings_production.py | nchlswhttkr/mellophone | c454c26d06a0cdebabc7b9ec5fef22c9c48d6ea6 | [
"MIT"
] | 26 | 2019-03-13T05:11:08.000Z | 2020-04-21T03:53:10.000Z | mellophone/mellophone/settings_production.py | nchlswhttkr/mellophone | c454c26d06a0cdebabc7b9ec5fef22c9c48d6ea6 | [
"MIT"
] | 2 | 2019-07-19T05:24:58.000Z | 2019-09-20T06:36:44.000Z | # pylint: disable=unused-wildcard-import,wildcard-import
"""
Please try and avoid modifying this file where possible, doing so may cause
different behaviours between local (development) and production environments.
Instead consider modifying the base (default) config. This way, the production
config is effectively th... | 32.916667 | 78 | 0.807595 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 349 | 0.883544 |
dd0a966e3c92349746b727ce42ffb0efe29eb341 | 232 | py | Python | pythonProject/051.py | MontanhaRio/python | 43ad6173d692ebeb153c23c893e4b8f0bf07afcc | [
"MIT"
] | null | null | null | pythonProject/051.py | MontanhaRio/python | 43ad6173d692ebeb153c23c893e4b8f0bf07afcc | [
"MIT"
] | null | null | null | pythonProject/051.py | MontanhaRio/python | 43ad6173d692ebeb153c23c893e4b8f0bf07afcc | [
"MIT"
] | null | null | null | #051 - Progressão Aritmética
primeiro = int(input('primeiro termo: '))
razao = int(input('razao: '))
decimo = primeiro + (10 - 1) * razao
for c in range(primeiro, decimo + razao, razao):
print(f'{c}', end=' - ')
print('acabou')
| 29 | 48 | 0.637931 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.324786 |
dd0b8f696341df5e31ece62f9a50dbeb45afc875 | 5,175 | py | Python | ProxyCrawl/ProxyCrawl/rules.py | Time1ess/ProxyPool | c44e74e8045fc560e5fe905aa41135ecb3e6da98 | [
"MIT"
] | 18 | 2017-04-25T09:39:08.000Z | 2022-03-09T08:07:28.000Z | ProxyCrawl/ProxyCrawl/rules.py | ghosttyq/ProxyPool | c44e74e8045fc560e5fe905aa41135ecb3e6da98 | [
"MIT"
] | null | null | null | ProxyCrawl/ProxyCrawl/rules.py | ghosttyq/ProxyPool | c44e74e8045fc560e5fe905aa41135ecb3e6da98 | [
"MIT"
] | 10 | 2017-05-29T00:53:41.000Z | 2021-05-08T09:07:52.000Z | #!/usr/local/bin/python3
# coding: UTF-8
# Author: David
# Email: youchen.du@gmail.com
# Created: 2017-04-26 11:14
# Last modified: 2017-04-30 15:55
# Filename: rules.py
# Description:
import os
import redis
from scrapy.utils.conf import init_env
from ProxyCrawl.settings import PROJECT_ROOT
conn = redis.Redis(decod... | 26.813472 | 79 | 0.565217 | 4,493 | 0.868213 | 0 | 0 | 3,104 | 0.599807 | 0 | 0 | 1,693 | 0.32715 |
dd0c981b401b14bcc898b39cf9bb3a7382b0f82e | 1,299 | py | Python | bcs-ui/backend/helm/authtoken/views.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | 1 | 2021-11-16T08:15:13.000Z | 2021-11-16T08:15:13.000Z | bcs-ui/backend/helm/authtoken/views.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | null | null | null | bcs-ui/backend/helm/authtoken/views.py | kayinli/bk-bcs | 93a0856175f7b066ef835921572c1cac590dbd8e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 34.184211 | 115 | 0.779831 | 298 | 0.226272 | 0 | 0 | 317 | 0.240699 | 0 | 0 | 772 | 0.586181 |
dd114daf874a5113511e683f27e7e520b01176b1 | 3,469 | py | Python | backend/workspaces/Users/actions/login.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | null | null | null | backend/workspaces/Users/actions/login.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 50 | 2021-03-28T03:06:19.000Z | 2021-10-18T12:36:16.000Z | backend/workspaces/Users/actions/login.py | makakken/roseguarden | 9a867f3d5e979b990bf474dcba81e5e9d0814c6a | [
"MIT"
] | 1 | 2021-07-30T07:12:46.000Z | 2021-07-30T07:12:46.000Z | """
The roseguarden project
Copyright (C) 2018-2020 Marcus Drobisch,
This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation, either version 3 of the License, or (at your option) any later
version.
This pr... | 45.051948 | 118 | 0.63563 | 2,539 | 0.731911 | 0 | 0 | 0 | 0 | 0 | 0 | 1,216 | 0.350533 |
dd118309b83096677693134bb6b0d70a964e1ab7 | 1,157 | py | Python | fastquotes/fund/__init__.py | YangzhenZhao/fastquotes | 1faba9f7fc7801a11359001e08cefa9cfbc41d64 | [
"MIT"
] | 4 | 2020-11-18T11:25:00.000Z | 2021-04-08T01:02:49.000Z | fastquotes/fund/__init__.py | YangzhenZhao/fastquotes | 1faba9f7fc7801a11359001e08cefa9cfbc41d64 | [
"MIT"
] | null | null | null | fastquotes/fund/__init__.py | YangzhenZhao/fastquotes | 1faba9f7fc7801a11359001e08cefa9cfbc41d64 | [
"MIT"
] | 1 | 2020-11-18T11:25:01.000Z | 2020-11-18T11:25:01.000Z | import json
import requests
def fund_intro_dict() -> dict:
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"
}
url = "http://fund.eastmoney.com/js/fundcode_search.js"
res = requests.get(ur... | 29.666667 | 83 | 0.586863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 485 | 0.410669 |
dd13e1b360546b453646ec337688f0743f83b569 | 3,374 | py | Python | pyrentals/test_pyrentals.py | asm128/pyrentals | 862a0f78d93b18499555dd3c8c1effb7cae9f99b | [
"MIT"
] | null | null | null | pyrentals/test_pyrentals.py | asm128/pyrentals | 862a0f78d93b18499555dd3c8c1effb7cae9f99b | [
"MIT"
] | null | null | null | pyrentals/test_pyrentals.py | asm128/pyrentals | 862a0f78d93b18499555dd3c8c1effb7cae9f99b | [
"MIT"
] | null | null | null | from pyrentals import Cart
import unittest
class Test_test_pyrentals(unittest.TestCase):
def test_method_empty(self):
test_cart_instance = Cart()
test_cart_instance.Rentals = {}
return self.assertTrue(test_cart_instance.empty(), "Cart should be empty when it's just created.")
def test_... | 43.25641 | 116 | 0.648488 | 3,281 | 0.972436 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.104327 |
dd173340b0cceb447e4578760ece3ab7a5d8df8b | 63,514 | py | Python | src/simple_tools/p4a_processor.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | src/simple_tools/p4a_processor.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | src/simple_tools/p4a_processor.py | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Authors:
# - Grégoire Péan <gregoire.pean@hpc-project.com>
# - Ronan Keryell <ronan.keryell@hpc-project.com>
# + Many others...
# Beware: class p4a_scmp_compiler declared in ../scmp/p4a_scmp_compiler.py
# inherits from class p4a_processor.
# Maybe a common parent class... | 43.592313 | 283 | 0.616211 | 58,867 | 0.926762 | 0 | 0 | 0 | 0 | 0 | 0 | 23,015 | 0.362333 |
dd173502c78ac900cdc7ccca958ee936158c16b0 | 4,790 | py | Python | hivwholeseq/cross_sectional/get_subtype_entropy_synonymous.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | 3 | 2016-12-01T03:12:06.000Z | 2021-07-03T01:29:26.000Z | hivwholeseq/cross_sectional/get_subtype_entropy_synonymous.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | null | null | null | hivwholeseq/cross_sectional/get_subtype_entropy_synonymous.py | iosonofabio/hivwholeseq | d504c63b446c3a0308aad6d6e484ea1666bbe6df | [
"MIT"
] | 3 | 2016-01-17T03:43:46.000Z | 2020-03-25T07:00:11.000Z | # vim: fdm=marker
'''
author: Fabio Zanini
date: 12/01/15
content: Get subtype entropy from alignments, since it's used so often.
'''
# Modules
import os
import argparse
import cPickle as pickle
import numpy as np
from hivwholeseq.utils.miseq import alpha
from hivwholeseq.utils.one_site_statistics import ... | 33.971631 | 103 | 0.524426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 779 | 0.16263 |
dd17680bbd248da6c5086919dd5e04da84e0dd2e | 15,119 | py | Python | udebs/interpret.py | recrm/Udebs | d7e8e248e7afaf6559f2a96ce5dd6e2698d65af7 | [
"MIT"
] | 6 | 2017-08-20T02:48:12.000Z | 2020-09-04T21:46:35.000Z | udebs/interpret.py | recrm/Udebs | d7e8e248e7afaf6559f2a96ce5dd6e2698d65af7 | [
"MIT"
] | null | null | null | udebs/interpret.py | recrm/Udebs | d7e8e248e7afaf6559f2a96ce5dd6e2698d65af7 | [
"MIT"
] | 1 | 2019-08-28T00:48:43.000Z | 2019-08-28T00:48:43.000Z | import copy
import json
import itertools
import os
import operator
from .errors import *
# ---------------------------------------------------
# Imports and Variables -
# ---------------------------------------------------
class Standard:
"""
Basic functionality wrappers.
Do ... | 25.031457 | 102 | 0.511674 | 7,232 | 0.478339 | 0 | 0 | 5,858 | 0.387459 | 0 | 0 | 5,614 | 0.371321 |
dd19eb06c6b535902edc1e166510cf7dc3e3ac06 | 425 | py | Python | src/aequitas/plot/__init__.py | antoinelb/aequitas | 5a912a3c1751b04c8688ad9e0c09ed87a6c48870 | [
"MIT"
] | 469 | 2018-04-24T23:11:45.000Z | 2022-03-29T07:54:07.000Z | src/aequitas/plot/__init__.py | antoinelb/aequitas | 5a912a3c1751b04c8688ad9e0c09ed87a6c48870 | [
"MIT"
] | 62 | 2018-04-16T00:14:56.000Z | 2021-11-12T10:35:01.000Z | src/aequitas/plot/__init__.py | antoinelb/aequitas | 5a912a3c1751b04c8688ad9e0c09ed87a6c48870 | [
"MIT"
] | 94 | 2018-05-21T16:13:57.000Z | 2022-03-25T20:07:25.000Z | from aequitas.plot.summary_chart import plot_summary_chart as summary
from aequitas.plot.bubble_disparity_chart import plot_disparity_bubble_chart as disparity
from aequitas.plot.bubble_metric_chart import plot_metric_bubble_chart as absolute
from aequitas.plot.bubble_concatenation_chart import plot_concatenated_bubble... | 85 | 106 | 0.908235 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
dd1a3f013274c36a04a9e56b4c6a20cb322ded06 | 287 | py | Python | python-safety/predict.py | alexeyinkin/geonames-to-json | 6055d4f3484f859a784aa8b9bfd96682a74fcd1b | [
"MIT"
] | null | null | null | python-safety/predict.py | alexeyinkin/geonames-to-json | 6055d4f3484f859a784aa8b9bfd96682a74fcd1b | [
"MIT"
] | null | null | null | python-safety/predict.py | alexeyinkin/geonames-to-json | 6055d4f3484f859a784aa8b9bfd96682a74fcd1b | [
"MIT"
] | null | null | null | import numpy as np
from model import get_model
def get_trained_model():
model = get_model()
model.load_weights('weights.ckpt')
return model
#model = get_fit_model('random.tsv')
#inputs_raw = [[0,0,0,0,0]]
#inputs_np = np.array(inputs_raw)
#print(model.predict(inputs_np))
| 20.5 | 38 | 0.71777 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 142 | 0.494774 |
dd1a79c02a429daf639fa22cee8d29423011e935 | 12,150 | py | Python | src/predict.py | yzhhome/JDProductSummaryGeneration | 4939f061ca90ad7ddd69b5a1794735f962e45bc0 | [
"MIT"
] | 1 | 2021-09-18T07:42:36.000Z | 2021-09-18T07:42:36.000Z | src/predict.py | yzhhome/JDProductSummaryGeneration | 4939f061ca90ad7ddd69b5a1794735f962e45bc0 | [
"MIT"
] | null | null | null | src/predict.py | yzhhome/JDProductSummaryGeneration | 4939f061ca90ad7ddd69b5a1794735f962e45bc0 | [
"MIT"
] | null | null | null | '''
@Author: dzy
@Date: 2021-09-13 11:07:48
@LastEditTime: 2021-09-26 20:25:17
@LastEditors: dzy
@Description: Helper functions or classes used for the model.
@FilePath: /JDProductSummaryGeneration/src/predict.py
'''
import random
import os
import sys
import pathlib
import torch
import jieba
import config
from model i... | 38.087774 | 85 | 0.535885 | 11,307 | 0.910533 | 0 | 0 | 2,390 | 0.192463 | 0 | 0 | 4,370 | 0.351909 |