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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bddda4c040819b870403559ed00ebaab7190ea8f | 679 | py | Python | rxsci/internal/utils.py | maki-nage/rxsci | 64c9956752cbdd4c65aa9f054b6b28318a056625 | [
"MIT"
] | 3 | 2021-05-03T13:40:46.000Z | 2022-03-06T07:59:30.000Z | rxsci/internal/utils.py | maki-nage/rxsci | 64c9956752cbdd4c65aa9f054b6b28318a056625 | [
"MIT"
] | 9 | 2020-10-22T21:08:10.000Z | 2021-08-05T09:01:26.000Z | rxsci/internal/utils.py | maki-nage/rxsci | 64c9956752cbdd4c65aa9f054b6b28318a056625 | [
"MIT"
] | 2 | 2021-01-05T16:48:54.000Z | 2021-08-07T12:51:01.000Z |
class NotSet(object):
"""Sentinel value."""
def __eq__(self, other):
return self is other
def __repr__(self):
return 'NotSet'
class StateNotSet(object):
def __eq__(self, other):
return self is other
def __repr__(self):
return 'NotSet'
def value(self):
... | 15.431818 | 28 | 0.584683 | 667 | 0.982327 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.07511 |
bdde05efcf874ead71f10d44b9b94987c03fce5e | 995 | py | Python | tests/test_git.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 1 | 2021-07-22T05:25:35.000Z | 2021-07-22T05:25:35.000Z | tests/test_git.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 37 | 2017-07-27T06:07:25.000Z | 2020-12-11T12:57:31.000Z | tests/test_git.py | graycarl/hbk | d4c90807b2558a2b61fb1253d9804fbaf373443f | [
"MIT"
] | 1 | 2019-04-02T08:36:32.000Z | 2019-04-02T08:36:32.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from builtins import * # noqa
import pytest
from hbkit import libs
@pytest.fixture
def git_config():
content = \
"""
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
... | 23.690476 | 69 | 0.706533 | 0 | 0 | 0 | 0 | 570 | 0.572864 | 0 | 0 | 608 | 0.611055 |
bddf37e95b95085df635e34da4f5fe3ecddbccb0 | 1,751 | py | Python | src/richie/apps/courses/migrations/0013_migrate_data_translated_licence_fields.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 174 | 2018-04-14T23:36:01.000Z | 2022-03-10T09:27:01.000Z | src/richie/apps/courses/migrations/0013_migrate_data_translated_licence_fields.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 631 | 2018-04-04T11:28:53.000Z | 2022-03-31T11:18:31.000Z | src/richie/apps/courses/migrations/0013_migrate_data_translated_licence_fields.py | leduong/richie | bf7ed379b7e2528cd790dadcec10ac2656efd189 | [
"MIT"
] | 64 | 2018-06-27T08:35:01.000Z | 2022-03-10T09:27:43.000Z | # Generated by Django 2.2.8 on 2020-01-02 13:56
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def forwards_func(apps, schema_editor):
Licence = apps.get_model("courses", "Licence")
LicenceTranslation = apps.get_model("courses", "Licenc... | 35.02 | 88 | 0.718447 | 193 | 0.110223 | 0 | 0 | 0 | 0 | 0 | 0 | 378 | 0.215877 |
bddf54c37693012c2ebee8e890c2bc5f10dfd58d | 5,510 | py | Python | responsible_ai/gan_data_debiased/main.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | null | null | null | responsible_ai/gan_data_debiased/main.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | null | null | null | responsible_ai/gan_data_debiased/main.py | AaratiAkkapeddi/nnabla-examples | db9e5ad850303c158773aeb275e5c3821b4a3935 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022 Sony Group Corporation.
#
# 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 ... | 38.531469 | 91 | 0.580581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,124 | 0.385481 |
bde0ad9f17012d7ebc6ee66313fe41b54189ab35 | 5,109 | py | Python | hstools/utilities.py | saisiddu/pub_bandaragoda_etal_ems | d06e23c7c5dfa772d5dfe55c33bcf7abbd5e2060 | [
"MIT"
] | 1 | 2019-09-24T15:22:05.000Z | 2019-09-24T15:22:05.000Z | hstools/utilities.py | saisiddu/pub_bandaragoda_etal_ems | d06e23c7c5dfa772d5dfe55c33bcf7abbd5e2060 | [
"MIT"
] | null | null | null | hstools/utilities.py | saisiddu/pub_bandaragoda_etal_ems | d06e23c7c5dfa772d5dfe55c33bcf7abbd5e2060 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
from IPython.core.display import display, HTML
import glob
from .compat import *
def sizeof_fmt(num, suffix='B'):
for unit in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']:
if abs(num) < 1024.0:
return "%3.1f%s%s" % (num, unit, suffix)
... | 30.963636 | 247 | 0.607164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,613 | 0.315717 |
bde1d05ede2b3e57e640969726cd7f09fb8e5559 | 155 | py | Python | assignment2/earth_electrons.py | guozhonghao1994/ec602 | e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74 | [
"Unlicense"
] | 3 | 2018-11-14T16:07:31.000Z | 2018-11-15T16:44:51.000Z | assignment2/earth_electrons.py | guozhonghao1994/ec602 | e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74 | [
"Unlicense"
] | null | null | null | assignment2/earth_electrons.py | guozhonghao1994/ec602 | e8f6b61e5cdad64e9fe943fc4f61d1fc9ad85f74 | [
"Unlicense"
] | null | null | null | #Copyright 2017 Zhonghao Guo gzh1994@bu.edu
import sys
estimate=3.91*10**38
lower=3.72*10**38
upper=4.11*10**38
print(estimate)
print(lower)
print(upper)
| 17.222222 | 43 | 0.754839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 43 | 0.277419 |
bde5bd2cb3f7fdf8cc6f96a4c93e07d27f29156e | 16,286 | py | Python | activity/activity_IngestDigestToEndpoint.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 17 | 2015-02-10T07:10:29.000Z | 2021-05-14T22:24:45.000Z | activity/activity_IngestDigestToEndpoint.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 459 | 2015-03-31T18:24:23.000Z | 2022-03-30T19:44:40.000Z | activity/activity_IngestDigestToEndpoint.py | elifesciences/elife-bot | d3a102c8030e4b7ec83cbd45e5f839dba4f9ffd9 | [
"MIT"
] | 9 | 2015-04-18T16:57:31.000Z | 2020-10-30T11:49:13.000Z | import os
import time
import json
from collections import OrderedDict
from digestparser import json_output
from provider.execution_context import get_session
from provider.article_processing import download_jats
from provider import digest_provider, email_provider, lax_provider, utils
from activity.objects import Activ... | 36.191111 | 88 | 0.608805 | 12,698 | 0.779688 | 0 | 0 | 0 | 0 | 0 | 0 | 3,442 | 0.211347 |
bde6c2d4e221af5daf9ceb3a165e32e65089ccfe | 249 | py | Python | utils/forgiveness_of_the_offender.py | bbt-t/simple-bot_discord | 46fa629e8278e8e453b3c272b2e838d0762aaaf8 | [
"MIT"
] | null | null | null | utils/forgiveness_of_the_offender.py | bbt-t/simple-bot_discord | 46fa629e8278e8e453b3c272b2e838d0762aaaf8 | [
"MIT"
] | null | null | null | utils/forgiveness_of_the_offender.py | bbt-t/simple-bot_discord | 46fa629e8278e8e453b3c272b2e838d0762aaaf8 | [
"MIT"
] | null | null | null | from discord import Member, utils
async def unmute_user(member: Member):
role = utils.get(member.guild.roles, id=809817869914341396)
await member.edit(roles=())
await member.add_roles(role)
await member.send('Ты размучен! :)')
| 19.153846 | 63 | 0.706827 | 0 | 0 | 0 | 0 | 0 | 0 | 219 | 0.84556 | 27 | 0.104247 |
bde798fb51621c003debde76678c82dcde2604d3 | 443 | py | Python | mailing/urls.py | Aladom/django-mailing | aa18963b1902e4b7f066b0064a832e26e725f643 | [
"MIT"
] | null | null | null | mailing/urls.py | Aladom/django-mailing | aa18963b1902e4b7f066b0064a832e26e725f643 | [
"MIT"
] | 13 | 2016-02-04T14:56:11.000Z | 2021-06-10T20:39:51.000Z | mailing/urls.py | Aladom/django-mailing | aa18963b1902e4b7f066b0064a832e26e725f643 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import url
from .views import MirrorView, SubscriptionsManagementView
__all__ = [
'app_name', 'urlpatterns',
]
app_name = 'mailing'
urlpatterns = [
url(r'^mirror/(?P<signed_pk>[0-9]+:[a-zA-Z0-9_-]+)/$',
MirrorView.as_view(), name='mirror'),
url(r'^sub... | 26.058824 | 69 | 0.643341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 182 | 0.410835 |
bdea2dca87fdb221f4d7b5d7f20709164e7c3a60 | 1,029 | py | Python | code2/day07/demo03.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | 1 | 2019-12-31T16:44:06.000Z | 2019-12-31T16:44:06.000Z | code2/day07/demo03.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | null | null | null | code2/day07/demo03.py | picktsh/python | 0f758dcdf9eee3580d8f6e2241ef557b6320ef54 | [
"MIT"
] | 1 | 2022-01-13T10:32:22.000Z | 2022-01-13T10:32:22.000Z | # 引入requests
import requests
# 封装headers
headers = {
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36'}
# 写入网址
url = 'https://www.zhihu.com/api/v4/members/zhang-jia-wei/articles?'
# 封装参数
params = {
'include': 'data[*].commen... | 32.15625 | 292 | 0.739553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 952 | 0.763432 |
bdeb63bd228672aa0d61f1e5f7d0335e8f073585 | 12,597 | py | Python | pykit/codegen/llvm/llvm_codegen.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 9 | 2015-06-23T00:13:49.000Z | 2022-02-23T02:46:43.000Z | pykit/codegen/llvm/llvm_codegen.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 1 | 2017-08-30T08:13:12.000Z | 2017-08-31T06:36:32.000Z | pykit/codegen/llvm/llvm_codegen.py | ContinuumIO/pyk | 1730d7b831e0cf12a641ac23b5cf03e17e0dc550 | [
"BSD-3-Clause"
] | 7 | 2015-05-08T10:17:47.000Z | 2021-04-01T15:00:57.000Z | from functools import partial
from pykit.ir import vvisit, ArgLoader, verify_lowlevel
from pykit.ir import defs, opgrouper
from pykit.types import Boolean, Integral, Real, Pointer, Function, Int64
from pykit.codegen.llvm.llvm_types import llvm_type
import llvm.core as lc
from llvm.core import Type, Constant
#===----... | 32.135204 | 82 | 0.618322 | 7,720 | 0.612844 | 0 | 0 | 0 | 0 | 0 | 0 | 2,486 | 0.197349 |
bdebe8ab095dd6dc14338c32ad38db4e4ac43ada | 1,056 | py | Python | ads_dashboard/ads/models.py | vintage/ads_dashboard | 85a8540411a9af0a2e41dd3730b52e3c6b3805d4 | [
"MIT"
] | null | null | null | ads_dashboard/ads/models.py | vintage/ads_dashboard | 85a8540411a9af0a2e41dd3730b52e3c6b3805d4 | [
"MIT"
] | 5 | 2020-02-12T09:18:05.000Z | 2021-09-22T18:05:21.000Z | ads_dashboard/ads/models.py | vintage/ads_dashboard | 85a8540411a9af0a2e41dd3730b52e3c6b3805d4 | [
"MIT"
] | null | null | null | from django.db import models
class Campaign(models.Model):
name = models.CharField("name", unique=True, max_length=255)
class Meta:
verbose_name = "campaign"
verbose_name_plural = "campaigns"
def __str__(self):
return self.name
class DataSource(models.Model):
name = models.... | 26.4 | 73 | 0.673295 | 1,018 | 0.964015 | 0 | 0 | 0 | 0 | 0 | 0 | 167 | 0.158144 |
bdeef5ecb135e522f7c40abc5e24bd958b8ff052 | 1,859 | py | Python | DatabaseHandler/sqlite_operations.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | 17 | 2019-12-09T19:09:07.000Z | 2021-08-29T01:11:13.000Z | DatabaseHandler/sqlite_operations.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | 1 | 2021-04-14T15:08:18.000Z | 2021-04-14T15:08:18.000Z | DatabaseHandler/sqlite_operations.py | utkarsh7236/SCILLA | e11e4d753823ad522a1b3168283b6e6ffe3ea393 | [
"Apache-2.0"
] | 2 | 2020-06-05T03:01:06.000Z | 2020-07-09T07:13:12.000Z | #!/usr/bin/env python
__author__ = 'Florian Hase'
#========================================================================
import time
import sqlalchemy as sql
#========================================================================
class AddEntry(object):
def __init__(self, database, table, entry):
self.... | 23.833333 | 73 | 0.550834 | 1,463 | 0.786982 | 0 | 0 | 0 | 0 | 0 | 0 | 334 | 0.179666 |
bdf105752f21bbc068ce977d28dde3f6db125f50 | 8,818 | py | Python | main.py | omegaBionic/pysparkPower | 1354247e4ec085a65f288a1f31a05875f003da72 | [
"Apache-2.0"
] | null | null | null | main.py | omegaBionic/pysparkPower | 1354247e4ec085a65f288a1f31a05875f003da72 | [
"Apache-2.0"
] | null | null | null | main.py | omegaBionic/pysparkPower | 1354247e4ec085a65f288a1f31a05875f003da72 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import pylab as pl
import pandas as pd
from pyspark import SQLContext
from pyspark.ml.clustering import KMeans
from pyspark.ml.feature import VectorAssembler
from pyspark.sql import SparkSession
from pyspark.sql.types import StructType, StructField, IntegerType
from d... | 29.790541 | 109 | 0.713087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,775 | 0.314697 |
bdf19052bf08ce92ba043372f3b11061a349f71e | 408 | py | Python | app/pages/urls.py | julianpetrich/jpdotcom | ba9dac9c86f6d15374da9a37aac68963e56bcd93 | [
"MIT"
] | null | null | null | app/pages/urls.py | julianpetrich/jpdotcom | ba9dac9c86f6d15374da9a37aac68963e56bcd93 | [
"MIT"
] | null | null | null | app/pages/urls.py | julianpetrich/jpdotcom | ba9dac9c86f6d15374da9a37aac68963e56bcd93 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import AboutView, ContactView, HomePageView, PrivacyView, TermsView
urlpatterns = [
path("", HomePageView.as_view(), name="home"),
path("about", AboutView.as_view(), name="about"),
path("contact", ContactView.as_view(), name="contact"),
path("terms", TermsView.... | 34 | 79 | 0.688725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 72 | 0.176471 |
bdf4b884e53e55033540d679eaf6e95f48c085d7 | 118 | py | Python | tests/test_crawler.py | Yotamho/nba-analytics | 13174040198d44aab035de58cf785bce6926958a | [
"MIT"
] | null | null | null | tests/test_crawler.py | Yotamho/nba-analytics | 13174040198d44aab035de58cf785bce6926958a | [
"MIT"
] | null | null | null | tests/test_crawler.py | Yotamho/nba-analytics | 13174040198d44aab035de58cf785bce6926958a | [
"MIT"
] | null | null | null | from nba_analytics.crawler import pbp_for_range
def test_crawler():
assert pbp_for_range(3, 2008, 2009) != None
| 19.666667 | 47 | 0.762712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
bdf5bfe6b045a2bc243a77cfba2030c81bcde42d | 3,781 | py | Python | src/open3DTool/visualizer.py | MobileRoboticsSkoltech/plane-segmentation-research | 0627512c4cb53326de1aabf815e755d9e4484c9c | [
"Apache-2.0"
] | 1 | 2021-10-15T08:18:55.000Z | 2021-10-15T08:18:55.000Z | src/open3DTool/visualizer.py | MobileRoboticsSkoltech/plane-segmentation-research | 0627512c4cb53326de1aabf815e755d9e4484c9c | [
"Apache-2.0"
] | 1 | 2021-11-18T16:37:28.000Z | 2021-11-18T16:37:28.000Z | src/open3DTool/visualizer.py | MobileRoboticsSkoltech/plane-segmentation-research | 0627512c4cb53326de1aabf815e755d9e4484c9c | [
"Apache-2.0"
] | null | null | null | from src.open3DTool.planeUtils import (
segment_points_on_plane_by_picked_points,
pick_points_utils,
)
from src.algorithmsForPointCloud.fileUtils import (
get_point_cloud_from_bin_file,
generate_labels_and_object_files,
)
from src.open3DTool.fileUtils import update_label_files
import numpy as np
import ... | 34.372727 | 87 | 0.691351 | 3,444 | 0.91087 | 0 | 0 | 0 | 0 | 0 | 0 | 24 | 0.006348 |
bdfa7f51aa6bca9797c581b745c48d3a51fc0b8d | 8,868 | py | Python | submission_utils.py | ameyagodbole/multihop_inference_explanation_regeneration | ab742433034b251a819b6eb898686530bd055cd0 | [
"MIT"
] | 7 | 2019-08-31T22:58:41.000Z | 2021-02-06T17:41:38.000Z | submission_utils.py | ameyagodbole/multihop_inference_explanation_regeneration | ab742433034b251a819b6eb898686530bd055cd0 | [
"MIT"
] | 2 | 2020-02-19T13:32:03.000Z | 2020-07-29T09:24:53.000Z | submission_utils.py | ameyagodbole/multihop_inference_explanation_regeneration | ab742433034b251a819b6eb898686530bd055cd0 | [
"MIT"
] | 1 | 2020-10-01T09:48:07.000Z | 2020-10-01T09:48:07.000Z | import argparse
import logging
import numpy as np
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.metrics.pairwise import cosine_distances
import torch
def create_predictions_file(questions_file, facts_file, examples_file, logits_file, pred_output_file,
... | 45.948187 | 119 | 0.579725 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,463 | 0.164975 |
bdfb7f7d975d38d147cc79c67eb8466db9daf8e8 | 1,884 | py | Python | pysm/semantic_modeling/assembling/autolabel/auto_label.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | 3 | 2019-10-31T15:26:20.000Z | 2022-03-03T06:04:03.000Z | pysm/semantic_modeling/assembling/autolabel/auto_label.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | 1 | 2021-10-05T14:57:29.000Z | 2022-03-27T01:58:41.000Z | pysm/semantic_modeling/assembling/autolabel/auto_label.py | binh-vu/semantic-modeling | b387584502ba1daa6abd6b7573828416f6426b49 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from typing import Dict, Tuple, List, Set, Union, Optional
from data_structure import Graph
from semantic_modeling.assembling.autolabel.heuristic import preserved_structure_with_heuristic, get_gold_semantic_types
from semantic_modeling.assembling.autolabel.maxf1 import get_go... | 49.578947 | 120 | 0.728769 | 1,430 | 0.759023 | 0 | 0 | 1,390 | 0.737792 | 0 | 0 | 40 | 0.021231 |
bdfb84bba555606efcd2d3ca97385378284beca7 | 8,203 | py | Python | tests/test_levdistresult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | 3 | 2021-02-11T20:37:56.000Z | 2021-06-11T03:29:15.000Z | tests/test_levdistresult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | 4 | 2020-10-04T23:11:08.000Z | 2020-12-23T00:32:52.000Z | tests/test_levdistresult.py | ZenulAbidin/bip39validator | b78f2db6f46b56b408eef3a51e921e96247a9b46 | [
"MIT"
] | null | null | null | from unittest import TestCase
from bip39validator import ValidationFailed
from bip39validator.BIP39WordList import BIP39WordList
levdist_gt2 = """brown
brpyt"""
levdist_le2 = """brow
brol"""
# Expected results *must* be in word alphabetical order.
class TestLevDistResult(TestCase):
def test_getwordpairs_eq(self)... | 33.076613 | 73 | 0.536633 | 7,951 | 0.96928 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.07034 |
bdfb8afb236fa2a59d4614b476d34a5d38aae988 | 694 | py | Python | landscapes/scripts/convert_fitness_to_s.py | Peyara/Evolution-Counterdiabatic-Driving | e695fad703b2d339bed0013e5b4254ba2365c105 | [
"MIT"
] | 3 | 2020-08-24T20:24:41.000Z | 2020-08-26T02:16:16.000Z | landscapes/scripts/convert_fitness_to_s.py | hincz-lab/Evolution-Counterdiabatic-Driving | e695fad703b2d339bed0013e5b4254ba2365c105 | [
"MIT"
] | null | null | null | landscapes/scripts/convert_fitness_to_s.py | hincz-lab/Evolution-Counterdiabatic-Driving | e695fad703b2d339bed0013e5b4254ba2365c105 | [
"MIT"
] | null | null | null | import sys
import numpy as np
# This script takes in a file with fitness values separated by commas
# and converts the values to be s values (relative fitness as used in
# the model) instead.
# WARNING: Overwrites given file!
if len(sys.argv) < 2:
print("Usage: python convert_fitness_to_s.py [name of file to co... | 30.173913 | 95 | 0.695965 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.471182 |
bdfc1be607446f5c58bd0a13c161e7d2e69d78e2 | 4,629 | py | Python | test/test_ui/test_render.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 50 | 2015-02-11T12:00:25.000Z | 2022-01-18T05:26:40.000Z | test/test_ui/test_render.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 3 | 2017-11-27T20:55:42.000Z | 2020-03-20T18:05:53.000Z | test/test_ui/test_render.py | hrnciar/poezio | 12b8af11df35dda535412b0c02ba792890095a7d | [
"Zlib"
] | 15 | 2015-04-22T14:33:36.000Z | 2021-09-29T21:33:50.000Z | import pytest
from contextlib import contextmanager
from datetime import datetime
from poezio.theming import get_theme
from poezio.ui.render import build_lines, Line, write_pre
from poezio.ui.types import BaseMessage, Message, StatusMessage, XMLLog
def test_simple_build_basemsg():
msg = BaseMessage(txt='coucou')
... | 31.924138 | 76 | 0.669259 | 234 | 0.050551 | 59 | 0.012746 | 250 | 0.054007 | 0 | 0 | 533 | 0.115144 |
bdfcac80e4077fb1f2378b55cba1401431e2ffec | 1,099 | py | Python | eats/behave/driver_steps.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | null | null | null | eats/behave/driver_steps.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | 5 | 2021-03-18T21:34:44.000Z | 2022-03-11T23:35:23.000Z | eats/behave/driver_steps.py | Etiqa/eats | 8c8e2da93d0014f6fbb208185712c5526dba1174 | [
"BSD-2-Clause"
] | null | null | null | from behave import *
from hamcrest import *
from selenium.common.exceptions import RemoteDriverServerException
from eats.pyhamcrest import array_equal_to_by_key
from eats.utils.mapping import table_mapping
from ..users import Users
@when(u'I press "{key}" key')
@when(u'{user_name:Username} presses "{key}" key')
def s... | 40.703704 | 115 | 0.767971 | 0 | 0 | 0 | 0 | 862 | 0.784349 | 0 | 0 | 176 | 0.160146 |
bdfcb80abeeba8ef801afb6b8c9b9a48834e2016 | 5,526 | py | Python | homebytwo/routes/utils.py | drixselecta/homebytwo | 29d26ce9f5586943e3b64c95aa4ce9ea7263bd10 | [
"MIT"
] | 7 | 2018-03-10T20:58:59.000Z | 2021-08-22T17:18:09.000Z | homebytwo/routes/utils.py | HomebyTwo/homebytwo | 29d26ce9f5586943e3b64c95aa4ce9ea7263bd10 | [
"MIT"
] | 69 | 2017-02-01T21:15:43.000Z | 2022-02-26T09:33:27.000Z | homebytwo/routes/utils.py | drixselecta/homebytwo | 29d26ce9f5586943e3b64c95aa4ce9ea7263bd10 | [
"MIT"
] | null | null | null | from collections import namedtuple
from itertools import accumulate, chain, islice, tee
from pathlib import Path
from django.contrib.gis.db.models.functions import Distance, LineLocatePoint
from django.contrib.gis.measure import D
from .fields import LineSubstring
from .models import ActivityType, Place
# named tupl... | 31.758621 | 92 | 0.707926 | 0 | 0 | 339 | 0.061346 | 0 | 0 | 0 | 0 | 2,463 | 0.445711 |
bdfe275d909128740904498e8c3a21dcaa2bafb4 | 263 | py | Python | aureaSym.py | osmartormena/introMATLAB | 6e505a17d6666d92b4502eff746f4b4dcdcd3c1c | [
"CC0-1.0"
] | null | null | null | aureaSym.py | osmartormena/introMATLAB | 6e505a17d6666d92b4502eff746f4b4dcdcd3c1c | [
"CC0-1.0"
] | null | null | null | aureaSym.py | osmartormena/introMATLAB | 6e505a17d6666d92b4502eff746f4b4dcdcd3c1c | [
"CC0-1.0"
] | null | null | null | # Cálculo da razão áurea (phi)
import sympy
d = 20
phi = sympy.symbols('phi', nonnegative=True)
eqn = sympy.Eq(1/phi, phi - 1)
sol = sympy.solve(eqn)
sympy.pprint(sol)
phiAprox = sympy.N(sol[0], d)
print('Para ', d, ' dígitos significativos, ϕ = ', phiAprox)
| 18.785714 | 60 | 0.669202 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 78 | 0.291045 |
bdfe32d084754eda156889373513889dc3a4c1f0 | 15,732 | py | Python | core/src/structs_classes/extract_structs.py | azurlane-doujin/AzurLanePaintingExtract-v1.0 | ef4f25e70b3ca1b9df4304132cc7612c8f5efebb | [
"MIT"
] | 144 | 2019-06-13T06:43:43.000Z | 2022-03-29T15:07:57.000Z | core/src/structs_classes/extract_structs.py | Shabi1213/AzurLanePaintingExtract-v1.0 | ef4f25e70b3ca1b9df4304132cc7612c8f5efebb | [
"MIT"
] | 2 | 2020-08-02T15:08:58.000Z | 2021-11-29T02:34:18.000Z | core/src/structs_classes/extract_structs.py | Shabi1213/AzurLanePaintingExtract-v1.0 | ef4f25e70b3ca1b9df4304132cc7612c8f5efebb | [
"MIT"
] | 19 | 2020-03-01T10:06:52.000Z | 2022-02-06T13:49:26.000Z | import collections
import os
import re
import time
from itertools import filterfalse
import wx
from core.src.static_classes.static_data import GlobalData
from core.src.structs_classes.basic_class import BasicInfo, BasicInfoList
class PerInfo(BasicInfo):
def __init__(self, name, val, has_cn):
... | 33.189873 | 117 | 0.557335 | 16,312 | 0.984786 | 0 | 0 | 1,114 | 0.067254 | 0 | 0 | 2,802 | 0.169162 |
bdff65087e9d7a27500aa847fc385ea3b6c07441 | 3,950 | py | Python | scbw_mq/tournament/benchmark/storage.py | Games-and-Simulations/sc-mq | f9ae798948add7fd84b77d75ca26ade94620f84e | [
"MIT"
] | 2 | 2018-05-10T18:10:28.000Z | 2018-05-13T18:14:33.000Z | scbw_mq/tournament/benchmark/storage.py | Games-and-Simulations/sc-mq | f9ae798948add7fd84b77d75ca26ade94620f84e | [
"MIT"
] | 1 | 2019-09-20T14:14:49.000Z | 2019-09-20T14:14:49.000Z | scbw_mq/tournament/benchmark/storage.py | Games-and-Simulations/sc-mq | f9ae798948add7fd84b77d75ca26ade94620f84e | [
"MIT"
] | null | null | null | import logging
import os
import shutil
from os.path import exists
from typing import Optional
from scbw.map import check_map_exists
from scbw.player import check_bot_exists
from scbw.utils import download_extract_zip
from ...utils import read_lines
logger = logging.getLogger(__name__)
class BenchmarkException(Exce... | 31.854839 | 88 | 0.678481 | 3,538 | 0.895696 | 0 | 0 | 0 | 0 | 0 | 0 | 901 | 0.228101 |
bdff857464c359af0d0606a7da2091b6840dd15a | 21,855 | py | Python | dev-server/scripts/docker-entrypoint.py | circlenaut/docker-images | 1768222b496288b6d08a51f979ade97554648817 | [
"MIT"
] | null | null | null | dev-server/scripts/docker-entrypoint.py | circlenaut/docker-images | 1768222b496288b6d08a51f979ade97554648817 | [
"MIT"
] | null | null | null | dev-server/scripts/docker-entrypoint.py | circlenaut/docker-images | 1768222b496288b6d08a51f979ade97554648817 | [
"MIT"
] | null | null | null | #!/usr/bin/python
"""
Main Workspace Run Script
"""
import os
import sys
import logging
import coloredlogs
import json
import math
import glob
import yaml
import yamale
import scripts.functions as func
from copy import copy
from subprocess import run, call
### Enable logging
logging.basicConfig(
format="%(asct... | 39.307554 | 221 | 0.625212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,043 | 0.505285 |
da0211204f7b106ec6a65423c21ac69cd0c6c658 | 11,524 | py | Python | py/host.py | black-parrot-hdk/arty-parrot | d5d1c5859cbe6a7acad9147b0d815fe478f92ec9 | [
"BSD-3-Clause"
] | 1 | 2022-01-09T07:45:12.000Z | 2022-01-09T07:45:12.000Z | py/host.py | black-parrot-hdk/arty-parrot | d5d1c5859cbe6a7acad9147b0d815fe478f92ec9 | [
"BSD-3-Clause"
] | 2 | 2021-05-26T02:27:26.000Z | 2021-05-28T07:02:48.000Z | py/host.py | black-parrot-hdk/arty-parrot | d5d1c5859cbe6a7acad9147b0d815fe478f92ec9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import sys
import argparse
from enum import Enum
from typing import Optional
import serial
from tqdm import tqdm
from nbf import NBF_COMMAND_LENGTH_BYTES, NbfCommand, NbfFile, OPCODE_FINISH, OPCODE_PUTCH, OPCODE_READ_8, OPCODE_WRITE_8, ADDRESS_CSR_FREEZE
DRAM_REGION_START = 0x00_8000_0000
DR... | 41.602888 | 173 | 0.674505 | 7,686 | 0.666956 | 0 | 0 | 387 | 0.033582 | 0 | 0 | 2,824 | 0.245054 |
da02379e9f1f2797e8f3d2fe77571451d25da847 | 618 | py | Python | mistex/plugins/citation.py | martinosorb/mistex | 27db70a95ae4bb8bc84c17c9d59c1bef5b5e92f4 | [
"BSD-3-Clause"
] | null | null | null | mistex/plugins/citation.py | martinosorb/mistex | 27db70a95ae4bb8bc84c17c9d59c1bef5b5e92f4 | [
"BSD-3-Clause"
] | null | null | null | mistex/plugins/citation.py | martinosorb/mistex | 27db70a95ae4bb8bc84c17c9d59c1bef5b5e92f4 | [
"BSD-3-Clause"
] | null | null | null | from mistune.inline_parser import LINK_LABEL
CITATION_PATTERN = r'\[\^@(' + LINK_LABEL + r')\]'
def render_citation(text):
return '\\cite{' + text + '}'
def parse_citation(self, m, state):
text = m.group(1)
self._ensure_bib()
return 'citation', self.render(text, state)
def plugin_citation(md):
... | 22.888889 | 73 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 87 | 0.140777 |
da0300886933dfe76dadbea34ca3db3b9a2e627c | 355 | py | Python | src/sima/simo/linearization.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/linearization.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | src/sima/simo/linearization.py | SINTEF/simapy | 650b8c2f15503dad98e2bfc0d0788509593822c7 | [
"MIT"
] | null | null | null | # Generated with Linearization
#
from enum import Enum
from enum import auto
class Linearization(Enum):
""""""
STOCHASTIC = auto()
DIFFERENTIATION = auto()
def label(self):
if self == Linearization.STOCHASTIC:
return "Stochastic"
if self == Linearization.DIFFERENTIATION:
... | 23.666667 | 49 | 0.64507 | 276 | 0.777465 | 0 | 0 | 0 | 0 | 0 | 0 | 67 | 0.188732 |
da03370dc8f2f31bcdc7fd9d8a5697527015558e | 2,881 | py | Python | 2020_August_Leetcode_30_days_challenge/Week_3_Non-overlapping Intervals/by_sorting.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | 2020_August_Leetcode_30_days_challenge/Week_3_Non-overlapping Intervals/by_sorting.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | 2020_August_Leetcode_30_days_challenge/Week_3_Non-overlapping Intervals/by_sorting.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Given a collection of intervals, find the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.
Example 1:
Input: [[1,2],[2,3],[3,4],[1,3]]
Output: 1
Explanation: [1,3] can be removed and the rest of intervals are non-overlapping.
Example 2:
Input: [... | 25.052174 | 139 | 0.588684 | 1,738 | 0.603263 | 0 | 0 | 0 | 0 | 0 | 0 | 1,330 | 0.461645 |
da0469fe0ec53d36c9f4e75701bb9541ada5eeed | 1,220 | py | Python | hive_plug_play/engine/processor.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 3 | 2021-05-11T07:12:05.000Z | 2021-10-04T04:01:38.000Z | hive_plug_play/engine/processor.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 9 | 2021-06-02T03:43:01.000Z | 2021-07-23T14:52:03.000Z | hive_plug_play/engine/processor.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 1 | 2021-05-24T15:57:20.000Z | 2021-05-24T15:57:20.000Z | from os import truncate
from hive_plug_play.database.handlers import PlugPlayDb
class BlockProcessor:
@classmethod
def init(cls, config):
cls.config = config
cls.db = PlugPlayDb(config)
cls.head_block = {}
cls.block_num = 0
cls.block_time = ''
@classmethod
... | 32.105263 | 90 | 0.584426 | 1,139 | 0.933607 | 0 | 0 | 1,092 | 0.895082 | 0 | 0 | 131 | 0.107377 |
da04bc9087b18cc1593f2b126074d0370e63d6a0 | 1,040 | py | Python | tests/integration/conftest.py | gcallaghan/openapi-spec-validator | 3ab3411936faaee91246627f957ba6108cd47d44 | [
"Apache-2.0"
] | null | null | null | tests/integration/conftest.py | gcallaghan/openapi-spec-validator | 3ab3411936faaee91246627f957ba6108cd47d44 | [
"Apache-2.0"
] | null | null | null | tests/integration/conftest.py | gcallaghan/openapi-spec-validator | 3ab3411936faaee91246627f957ba6108cd47d44 | [
"Apache-2.0"
] | null | null | null | from os import path
import pytest
from six.moves.urllib import request
from six.moves.urllib.parse import urlunparse
from yaml import safe_load
from openapi_spec_validator import openapi_v3_spec_validator
def spec_url(spec_file, schema='file'):
directory = path.abspath(path.dirname(__file__))
full_path = pa... | 22.608696 | 66 | 0.742308 | 90 | 0.086538 | 0 | 0 | 228 | 0.219231 | 0 | 0 | 6 | 0.005769 |
da058a79bcff3d1633c9de586676094982ec1208 | 24,030 | py | Python | scripts/populate_conferences.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | scripts/populate_conferences.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | scripts/populate_conferences.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import os
from modularodm import Q
from modularodm.exceptions import ModularOdmException
from framework.auth.core import User
from website import settings
from website.app import init_app
from website.conferences.model import Conference
def main():
init_app(set_backends... | 32.693878 | 156 | 0.544112 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13,495 | 0.561543 |
da0602f1e855ed3a2c59e5d54ad317e3bc77bd87 | 3,563 | py | Python | clinicadl/clinicadl/subject_level/train_autoencoder.py | 921974496/AD-DL | 9a0303579a665800633024bdab1ac44f794a0c38 | [
"MIT"
] | 1 | 2020-11-30T01:39:12.000Z | 2020-11-30T01:39:12.000Z | clinicadl/clinicadl/subject_level/train_autoencoder.py | 921974496/AD-DL | 9a0303579a665800633024bdab1ac44f794a0c38 | [
"MIT"
] | null | null | null | clinicadl/clinicadl/subject_level/train_autoencoder.py | 921974496/AD-DL | 9a0303579a665800633024bdab1ac44f794a0c38 | [
"MIT"
] | null | null | null | from __future__ import print_function
import argparse
from os import path
from time import time
import sys
import torch
import torch.nn as nn
from torch.utils.data import DataLoader
from .utils import ae_finetuning
from ..tools.deep_learning.iotools import Parameters
from ..tools.deep_learning.data import MinMaxNormal... | 39.153846 | 168 | 0.63991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 771 | 0.216391 |
da08fa8384c712fcc3ccc0c8023334a1b12a22c0 | 375 | py | Python | globals/mime.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 97 | 2016-09-16T08:44:04.000Z | 2022-01-29T22:30:18.000Z | globals/mime.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 34 | 2016-09-20T00:42:45.000Z | 2021-04-16T07:21:44.000Z | globals/mime.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 24 | 2016-09-16T08:44:56.000Z | 2021-07-29T11:32:47.000Z | # -*- coding: utf-8 -*-
## \package globals.mime
# MIT licensing
# See: docs/LICENSE.txt
from globals.execute import GetCommandOutput
from globals.execute import GetExecutable
## TODO: Doxygen
def GetFileMimeType(filename):
CMD_file = GetExecutable(u'file')
if not CMD_file:
return None
return GetCommandOut... | 17.857143 | 75 | 0.728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.352 |
da09c6430f4f0663e4ddd43367f12c8087614e78 | 1,761 | py | Python | src/deployer/result.py | jbenden/deployer | b036fa3030f99ed0730bb3770cf7e01c58c257f1 | [
"Apache-2.0"
] | 2 | 2018-08-30T14:14:13.000Z | 2022-03-24T15:19:29.000Z | src/deployer/result.py | jbenden/deployer | b036fa3030f99ed0730bb3770cf7e01c58c257f1 | [
"Apache-2.0"
] | null | null | null | src/deployer/result.py | jbenden/deployer | b036fa3030f99ed0730bb3770cf7e01c58c257f1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 Joseph Benden <joe@benden.us>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 33.865385 | 83 | 0.662124 | 923 | 0.524134 | 0 | 0 | 0 | 0 | 0 | 0 | 1,305 | 0.741056 |
da0cc012c8071ddd102f587a464226bdf7578158 | 1,381 | py | Python | app.py | dhairyaostwal/bankingo | cc148940a9d4ae60d80acdc2e3c90a01a8a99c46 | [
"MIT"
] | 2 | 2021-12-11T02:32:35.000Z | 2021-12-12T08:42:41.000Z | app.py | dhairyaostwal/bankingo | cc148940a9d4ae60d80acdc2e3c90a01a8a99c46 | [
"MIT"
] | null | null | null | app.py | dhairyaostwal/bankingo | cc148940a9d4ae60d80acdc2e3c90a01a8a99c46 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
import pickle
app = Flask(__name__)
userInput = []
@app.route("/", methods=["GET", "POST"])
def hello():
userInput.clear()
if request.method == "POST":
variance = request.form.get("variance")
skewness = request.form.get("skewness")
cu... | 26.557692 | 54 | 0.620565 | 0 | 0 | 0 | 0 | 1,210 | 0.876177 | 0 | 0 | 292 | 0.211441 |
da0d025051a5ed1885fbb8e49bb40af12912744c | 3,210 | py | Python | AlarmTimer.py | amjith/PyAlarmTimer | f664daa42d9ec70fc7ac512ce71868c703e8a011 | [
"MIT"
] | 2 | 2015-01-13T00:36:29.000Z | 2015-04-12T19:17:32.000Z | AlarmTimer.py | amjith/PyAlarmTimer | f664daa42d9ec70fc7ac512ce71868c703e8a011 | [
"MIT"
] | 1 | 2015-01-12T23:02:28.000Z | 2015-01-13T00:36:26.000Z | AlarmTimer.py | amjith/PyAlarmTimer | f664daa42d9ec70fc7ac512ce71868c703e8a011 | [
"MIT"
] | null | null | null | import sys
from PyQt4 import QtCore, QtGui
from itertools import cycle
from Resources.LcdNumber_ui import Ui_Form
class AlarmTimer(QtGui.QMainWindow):
def __init__(self, timer_values, parent=None):
QtGui.QWidget.__init__(self, parent)
QtGui.QMainWindow.__init__(self, None, QtCore.Qt.WindowStaysOn... | 33.092784 | 121 | 0.610592 | 2,723 | 0.848287 | 0 | 0 | 0 | 0 | 0 | 0 | 432 | 0.134579 |
da0dfc1a5ddc1f3fd9cff38b3e12d87c2cfff865 | 3,200 | py | Python | backend/handlers/graphql/resolvers/quota.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | null | null | null | backend/handlers/graphql/resolvers/quota.py | al-indigo/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 8 | 2017-10-11T13:26:10.000Z | 2021-12-13T20:27:52.000Z | backend/handlers/graphql/resolvers/quota.py | ispras/vmemperor | 80eb6d47d839a4736eb6f9d2fcfad35f0a7b3bb1 | [
"Apache-2.0"
] | 4 | 2017-07-27T12:25:42.000Z | 2018-01-28T02:06:26.000Z | from graphql import ResolveInfo
from rethinkdb.errors import ReqlNonExistenceError
from handlers.graphql.graphql_handler import ContextProtocol
from handlers.graphql.types.pool import Quota
from handlers.graphql.utils.query import resolve_from_root
import constants.re as re
from utils.quota import check_vdi_size, chec... | 32 | 123 | 0.690938 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.119688 |
da0e334dd350b538cbe6369f8de20266f08cd7ab | 23,670 | py | Python | webapp/creators/parse_eml.py | PASTAplus/umbra | 25f179801ab86d6506759b19849de1f7a8bf9e8d | [
"Apache-2.0"
] | null | null | null | webapp/creators/parse_eml.py | PASTAplus/umbra | 25f179801ab86d6506759b19849de1f7a8bf9e8d | [
"Apache-2.0"
] | null | null | null | webapp/creators/parse_eml.py | PASTAplus/umbra | 25f179801ab86d6506759b19849de1f7a8bf9e8d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:Mod: propagate_names
:Synopsis: Parse EML files to collect information on the responsible parties, creating RESPONSIBLE_PARTIES_TEXT_FILE.
:Author:
ide
:Created:
6/1/21
"""
from enum import Enum, auto
import glob
import os
import pickle
import daiquiri
fr... | 35.170877 | 159 | 0.673722 | 372 | 0.015716 | 0 | 0 | 0 | 0 | 0 | 0 | 2,851 | 0.120448 |
da0ee8203f152fc62fcdc9038c65fc7421a7da86 | 2,399 | py | Python | pywrap.py | rosejn/pywrap | 21076e66e3ae99013524e4f391a5928193072fd6 | [
"MIT"
] | null | null | null | pywrap.py | rosejn/pywrap | 21076e66e3ae99013524e4f391a5928193072fd6 | [
"MIT"
] | null | null | null | pywrap.py | rosejn/pywrap | 21076e66e3ae99013524e4f391a5928193072fd6 | [
"MIT"
] | null | null | null | import ctypes
def _wrap(functype, name, library, restype, params, errcheck=None):
prototype = functype(restype, *(param.type for param in params))
paramflags = tuple(param.paramflags for param in params)
wrapper = prototype((name, library), paramflags)
if errcheck:
wrapper.errcheck = errcheck
... | 24.731959 | 87 | 0.615673 | 1,748 | 0.728637 | 0 | 0 | 1,470 | 0.612755 | 0 | 0 | 0 | 0 |
da0fb1e76df7bb263d04fdeb069e451fb04e547a | 2,756 | py | Python | pp/components/ring_single.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 8 | 2020-08-25T11:25:18.000Z | 2022-03-27T11:32:11.000Z | pp/components/ring_single.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | null | null | null | pp/components/ring_single.py | flaport/gdsfactory | 1f2e844c1fe27b9c6340e2d51500fd3358fa16e5 | [
"MIT"
] | 1 | 2022-03-04T07:03:29.000Z | 2022-03-04T07:03:29.000Z | from typing import Callable
from pp.cell import cell
from pp.component import Component
from pp.components.bend_circular import bend_circular
from pp.components.coupler_ring import coupler_ring
from pp.components.waveguide import waveguide as waveguide_function
from pp.config import call_if_func
from pp.drc import ass... | 27.56 | 90 | 0.645501 | 0 | 0 | 0 | 0 | 2,257 | 0.81894 | 0 | 0 | 974 | 0.353411 |
da1134de439d802fe50733f5cc4818017bddfa77 | 1,469 | py | Python | uninstall.py | Manisso/LFSET | df5f104687daf66ef4a0cb9808a0ce377415e2dc | [
"MIT"
] | 8 | 2019-05-29T22:49:04.000Z | 2021-02-28T21:05:28.000Z | uninstall.py | Manisso/LFSET | df5f104687daf66ef4a0cb9808a0ce377415e2dc | [
"MIT"
] | null | null | null | uninstall.py | Manisso/LFSET | df5f104687daf66ef4a0cb9808a0ce377415e2dc | [
"MIT"
] | 2 | 2019-06-09T17:52:31.000Z | 2019-09-09T17:14:46.000Z | #!/usr/bin/env python
# -*- codeing: UTF-8 -*-
import time
import sys
import os
print('''
____ ___ .__ __ .__ .__ .____ __________________________________________
| | \____ |__| ____ _______/ |______ | | | | ______ ___.__. | ... | 43.205882 | 136 | 0.429544 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,207 | 0.821647 |
da1152e98be68574744964ed8c665a43ee954229 | 13,297 | py | Python | src/services/db/oracle.py | daesnorey/PPRJ | f826eb194f895d13522f61a51a5100a5cdbead99 | [
"Apache-2.0"
] | null | null | null | src/services/db/oracle.py | daesnorey/PPRJ | f826eb194f895d13522f61a51a5100a5cdbead99 | [
"Apache-2.0"
] | null | null | null | src/services/db/oracle.py | daesnorey/PPRJ | f826eb194f895d13522f61a51a5100a5cdbead99 | [
"Apache-2.0"
] | null | null | null | """oracle.py.
db_connection.py file will contain the connection behaviour
to the database
"""
import traceback
import random
import copy
import cx_Oracle
import json
from src.objects.third import Third
from src.services.db.db_types import DbTypes
class Oracle(object):
"""Oracle class will handle the conection to... | 31.88729 | 137 | 0.518087 | 13,046 | 0.981124 | 0 | 0 | 0 | 0 | 0 | 0 | 2,662 | 0.200196 |
da11aa1d5d2c57b57bf78f6eb3a605f93202667a | 2,211 | py | Python | utils/utils_math.py | spisakt/PUMI | bea29696aa90e5581f08919e1a2cd9f569284984 | [
"BSD-3-Clause"
] | 5 | 2018-06-12T08:17:13.000Z | 2022-02-25T20:07:00.000Z | utils/utils_math.py | spisakt/PUMI | bea29696aa90e5581f08919e1a2cd9f569284984 | [
"BSD-3-Clause"
] | null | null | null | utils/utils_math.py | spisakt/PUMI | bea29696aa90e5581f08919e1a2cd9f569284984 | [
"BSD-3-Clause"
] | 2 | 2020-10-19T15:27:28.000Z | 2021-06-04T17:02:27.000Z | from nipype.interfaces.utility import Function
def add_two(a, b):
return float(a)+float(b)
def sum_list(in_list):
return sum(in_list)
def sub_two(a,b):
return float(a)-float(b)
def abs_val(x):
return abs(x)
def sec2sigmaV(TR, sec):
sigmaV=sec/(2*TR)
return sigmaV
# calculates colmeans,... | 27.6375 | 82 | 0.557214 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 444 | 0.200814 |
da11fc5980e78cefaeb92357886c125f256182a0 | 439 | py | Python | exercicio_py/ex0007_progressao_aritmetica/main_v1.py | danielle8farias/Exercicios-Python-3 | f2fe9b6ca63536df1d83fd10162cfc04de36b830 | [
"MIT"
] | null | null | null | exercicio_py/ex0007_progressao_aritmetica/main_v1.py | danielle8farias/Exercicios-Python-3 | f2fe9b6ca63536df1d83fd10162cfc04de36b830 | [
"MIT"
] | null | null | null | exercicio_py/ex0007_progressao_aritmetica/main_v1.py | danielle8farias/Exercicios-Python-3 | f2fe9b6ca63536df1d83fd10162cfc04de36b830 | [
"MIT"
] | null | null | null | ########
# autora: danielle8farias@gmail.com
# repositório: https://github.com/danielle8farias
# Descrição: Usuário informa o 1º termo de uma PA e sua razão. O programa retorna os 10 primeiros termos dessa PA.
########
A1 = int(input('Primeiro termo: '))
r = int(input('Razão: '))
i = 1
An = A1
while i < 11:
pri... | 23.105263 | 114 | 0.610478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 313 | 0.697105 |
da12532f996b1734f9456dcccabecc881b1e321b | 2,165 | py | Python | rns/viz.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | rns/viz.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | rns/viz.py | matwilso/relation-networks | 66c67b342a90ae3699e576dcec883c329905b2e0 | [
"MIT"
] | null | null | null | import io
import os
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
import seaborn as sns
from rns.constant import W, H
# Plotter functions
PLOT_FUNCS = {}
def register_plotter(func):
PLOT_FUNCS[func.__name__] = func
def func_wrapper(images, **conv_kwargs):
return func(images, **... | 27.0625 | 112 | 0.639261 | 0 | 0 | 0 | 0 | 1,443 | 0.666513 | 0 | 0 | 230 | 0.106236 |
da1332cc41c82ca79874cad9790e459f7a50414e | 591 | py | Python | payments/tests.py | asm3ft/cs3240-quickthooters | 53000deca2d4a4ff4244cde76f36e7adcfb52784 | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | payments/tests.py | asm3ft/cs3240-quickthooters | 53000deca2d4a4ff4244cde76f36e7adcfb52784 | [
"MIT",
"PostgreSQL",
"Unlicense"
] | 9 | 2021-04-08T21:41:10.000Z | 2022-03-12T00:26:00.000Z | payments/tests.py | asm3ft/cs3240-quickthooters | 53000deca2d4a4ff4244cde76f36e7adcfb52784 | [
"MIT",
"PostgreSQL",
"Unlicense"
] | null | null | null | from django.test import TestCase
from django.test import RequestFactory, TestCase
from .views import charge, HomePageView
from login.models import Profile
from django.contrib.auth.models import User
# class PaymentViewsTestCase(TestCase):
# def setUp(self):
# # Every test needs access to the request facto... | 26.863636 | 71 | 0.663283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 362 | 0.610455 |
da1588b9217dc470ed263275774b3681de6ca380 | 642 | py | Python | MTRF/r3l/r3l/robot/robot.py | facebookresearch/MTRF | 2fee8f3f1c2150fcecc2db2fa9e122a664a72d72 | [
"Apache-2.0"
] | 2 | 2021-11-29T10:09:56.000Z | 2022-02-01T05:48:32.000Z | MTRF/r3l/r3l/robot/robot.py | facebookresearch/MTRF | 2fee8f3f1c2150fcecc2db2fa9e122a664a72d72 | [
"Apache-2.0"
] | null | null | null | MTRF/r3l/r3l/robot/robot.py | facebookresearch/MTRF | 2fee8f3f1c2150fcecc2db2fa9e122a664a72d72 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates
# Copyright (c) MTRF authors
import abc
class Robot(metaclass=abc.ABCMeta):
def __init__(self, env=None):
self._env = env
if env:
self._sim = env.sim
else:
self._sim = None
@property
@abc.abstractmethod
... | 21.4 | 49 | 0.640187 | 549 | 0.85514 | 0 | 0 | 341 | 0.531153 | 0 | 0 | 77 | 0.119938 |
da160107a31d4d4dd133e4fba3b2b4c6286bd983 | 2,955 | py | Python | pycurb/time_rule.py | azavea/PyCurb | 9492ca40b0639680b73aa7bdfcf9f744f9e75727 | [
"Apache-2.0"
] | null | null | null | pycurb/time_rule.py | azavea/PyCurb | 9492ca40b0639680b73aa7bdfcf9f744f9e75727 | [
"Apache-2.0"
] | 8 | 2020-09-30T17:15:50.000Z | 2020-10-23T21:00:53.000Z | pycurb/time_rule.py | azavea/PyCurb | 9492ca40b0639680b73aa7bdfcf9f744f9e75727 | [
"Apache-2.0"
] | null | null | null | from abc import ABC
from pycurb.utils import (parse_date, parse_day_of_month, parse_day_of_week,
parse_occurrence, parse_time)
class TimeRule(ABC):
pass
class DaysOfWeek(TimeRule):
def __init__(self, days, occurences_in_month=None):
if isinstance(days, str):
da... | 26.863636 | 77 | 0.575973 | 2,783 | 0.941794 | 0 | 0 | 400 | 0.135364 | 0 | 0 | 187 | 0.063283 |
da170ec47cebeb13d6c068d32835dcf9ac0425e1 | 2,653 | py | Python | amrlib/models/parse_gsii/vocabs.py | plandes/amrlib | c31f92f05a265362367eea85f512e54030860147 | [
"MIT"
] | 103 | 2020-09-04T07:21:09.000Z | 2022-03-31T23:06:41.000Z | amrlib/models/parse_gsii/vocabs.py | plandes/amrlib | c31f92f05a265362367eea85f512e54030860147 | [
"MIT"
] | 39 | 2020-09-03T14:26:22.000Z | 2022-03-08T20:18:59.000Z | amrlib/models/parse_gsii/vocabs.py | plandes/amrlib | c31f92f05a265362367eea85f512e54030860147 | [
"MIT"
] | 19 | 2020-09-30T12:15:08.000Z | 2022-02-18T18:15:31.000Z | import os
PAD, UNK, DUM, NIL, END, CLS = '<PAD>', '<UNK>', '<DUMMY>', '<NULL>', '<END>', '<CLS>'
# Note: for the function that saves the vocabs, see create_vocabs.py
def get_vocabs(vocab_dir):
vocabs = dict()
vocabs['tok'] = Vocab(os.path.join(vocab_dir, 'tok_vocab'), 5, [CLS])
vocabs['l... | 37.366197 | 110 | 0.574821 | 1,545 | 0.58236 | 0 | 0 | 195 | 0.073502 | 0 | 0 | 335 | 0.126272 |
da1752aa56e3a9f32b692a7cdcc8c12c9105eaac | 1,139 | py | Python | MAR2020/MakingChange.py | dexterchan/DailyChallenge | 1f38dc3b22983835836a84d6281777d8e20fce7a | [
"Apache-2.0"
] | null | null | null | MAR2020/MakingChange.py | dexterchan/DailyChallenge | 1f38dc3b22983835836a84d6281777d8e20fce7a | [
"Apache-2.0"
] | null | null | null | MAR2020/MakingChange.py | dexterchan/DailyChallenge | 1f38dc3b22983835836a84d6281777d8e20fce7a | [
"Apache-2.0"
] | null | null | null | #Given a list of possible coins in cents, and an amount (in cents) n,
# return the minimum number of coins needed to create the amount n.
# If it is not possible to create the amount using the given coin denomination, return None.
#Here's an example and some starter code:
#ANalysis, sort the list of possible coins O(n... | 28.475 | 92 | 0.603161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 626 | 0.549605 |
da17721d993049cf0bec2f0d42ed1fdb58798fac | 951 | py | Python | lightcycle-frontend/tournament/admin.py | Onapsis/pytron | 2ed0622ae13f010bcd8fdbbd2f1e9cba3d2e3d58 | [
"MIT"
] | 1 | 2015-11-04T12:04:42.000Z | 2015-11-04T12:04:42.000Z | lightcycle-frontend/tournament/admin.py | Onapsis/pytron | 2ed0622ae13f010bcd8fdbbd2f1e9cba3d2e3d58 | [
"MIT"
] | null | null | null | lightcycle-frontend/tournament/admin.py | Onapsis/pytron | 2ed0622ae13f010bcd8fdbbd2f1e9cba3d2e3d58 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from tournament.models import Bot, Challenge, UserProfile
class UserProfileAdmin(admin.ModelAdmin):
list_display = ('user', 'score')
model = UserProfile
class UserProfileInline(admin.Ta... | 32.793103 | 84 | 0.773922 | 548 | 0.576236 | 0 | 0 | 0 | 0 | 0 | 0 | 155 | 0.162986 |
da18045dfd912105fc7a816ba7142c291b5641e5 | 358 | py | Python | scripts/plotting/utils.py | ltiao/pynance | 1f170f9d32262eacf566a8d7647be04715c47dc1 | [
"MIT"
] | 1 | 2021-04-24T09:23:35.000Z | 2021-04-24T09:23:35.000Z | scripts/plotting/utils.py | ltiao/pynance | 1f170f9d32262eacf566a8d7647be04715c47dc1 | [
"MIT"
] | null | null | null | scripts/plotting/utils.py | ltiao/pynance | 1f170f9d32262eacf566a8d7647be04715c47dc1 | [
"MIT"
] | 1 | 2021-07-14T08:55:39.000Z | 2021-07-14T08:55:39.000Z | import numpy as np
import pandas as pd
import yaml
from pynance.benchmarks import make_benchmark
from pathlib import Path
GOLDEN_RATIO = 0.5 * (1 + np.sqrt(5))
WIDTH = 397.48499
def pt_to_in(x):
pt_per_in = 72.27
return x / pt_per_in
def size(width, aspect=GOLDEN_RATIO):
width_in = pt_to_in(width)
... | 17.9 | 45 | 0.72067 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
da1abe2987395fdd9c8ec09105630f0f84d026d1 | 3,637 | py | Python | tests/test_per_sample_wrapper.py | NiWaRe/deepee | 98b5cd09f356f4a597fe204799a524c4d444dd2d | [
"Apache-2.0"
] | 16 | 2021-03-24T09:50:32.000Z | 2022-03-10T12:03:37.000Z | tests/test_per_sample_wrapper.py | NiWaRe/deepee | 98b5cd09f356f4a597fe204799a524c4d444dd2d | [
"Apache-2.0"
] | 4 | 2021-03-27T09:36:20.000Z | 2021-10-18T09:30:47.000Z | tests/test_per_sample_wrapper.py | NiWaRe/deepee | 98b5cd09f356f4a597fe204799a524c4d444dd2d | [
"Apache-2.0"
] | 4 | 2021-06-24T08:30:47.000Z | 2021-11-09T08:33:57.000Z | from deepee import PerSampleGradientWrapper
import torch
import pytest
class MiniModel(torch.nn.Module):
def __init__(self):
super().__init__()
self.lin = torch.nn.Linear(10, 1)
def forward(self, x):
return self.lin(x)
def test_wrap():
wrapped = PerSampleGradientWrapper(MiniMode... | 29.096 | 88 | 0.636239 | 445 | 0.122354 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.034644 |
da1ae3572abdad23c9e302bb355fe093cb9ac8e8 | 1,981 | py | Python | graphid/util/util_grabdata.py | Erotemic/graphid | 5d04c2eec609f135464a921ba03d9578fa6e22fd | [
"Apache-2.0"
] | 4 | 2019-03-04T02:49:26.000Z | 2021-10-06T00:51:13.000Z | graphid/util/util_grabdata.py | Erotemic/graphid | 5d04c2eec609f135464a921ba03d9578fa6e22fd | [
"Apache-2.0"
] | 1 | 2019-02-15T23:42:26.000Z | 2019-02-15T23:42:26.000Z | graphid/util/util_grabdata.py | Erotemic/graphid | 5d04c2eec609f135464a921ba03d9578fa6e22fd | [
"Apache-2.0"
] | null | null | null | import ubelt as ub
from os.path import exists # NOQA
TESTIMG_URL_DICT = {
'astro.png' : 'https://i.imgur.com/KXhKM72.png', # Use instead of
'carl.jpg' : 'http://i.imgur.com/flTHWFD.jpg',
'grace.jpg' : 'http://i.imgur.com/rgQyu7r.jpg',
'jeff.png' : 'http://i.imgur.com/l00rECD.png',
'ada2.jpg' :... | 34.754386 | 86 | 0.627461 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,192 | 0.601716 |
da1b4387561fab9dc87a8b4f0a9f01c7e63f73be | 308 | py | Python | pyschieber/deck.py | Murthy10/pyschieber | f9db28c9553b8f321f6ed71cff04eff7879af5f6 | [
"MIT"
] | 5 | 2018-01-17T08:11:14.000Z | 2018-11-27T11:37:15.000Z | pyschieber/deck.py | Murthy10/pyschieber | f9db28c9553b8f321f6ed71cff04eff7879af5f6 | [
"MIT"
] | 4 | 2018-05-09T08:41:05.000Z | 2018-11-16T08:07:39.000Z | pyschieber/deck.py | Murthy10/pyschieber | f9db28c9553b8f321f6ed71cff04eff7879af5f6 | [
"MIT"
] | 3 | 2018-04-20T07:39:30.000Z | 2018-11-10T12:44:08.000Z | from pyschieber.suit import Suit
from pyschieber.card import Card
class Deck:
def __init__(self):
self.cards = []
for suit in Suit:
self.cards += [Card(suit=suit, value=i) for i in range(6, 15)]
def __str__(self):
return str([str(card) for card in self.cards])
| 23.692308 | 74 | 0.62013 | 239 | 0.775974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
da1cd997565c598625d3fbc3be2100124fc27c2c | 21,915 | py | Python | multipy/flux.py | kamilazdybal/multipy | ebdcddb63bfb1cd647ca99bbf9002b04a9b50ed9 | [
"MIT"
] | null | null | null | multipy/flux.py | kamilazdybal/multipy | ebdcddb63bfb1cd647ca99bbf9002b04a9b50ed9 | [
"MIT"
] | null | null | null | multipy/flux.py | kamilazdybal/multipy | ebdcddb63bfb1cd647ca99bbf9002b04a9b50ed9 | [
"MIT"
] | null | null | null | """multipy: Python library for multicomponent mass transfer"""
__author__ = "James C. Sutherland, Kamila Zdybal"
__copyright__ = "Copyright (c) 2022, James C. Sutherland, Kamila Zdybal"
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = ["Kamila Zdybal"]
__email__ = ["kamilazdybal@gmail.com"]
__status__ = "Pro... | 47.745098 | 244 | 0.657906 | 21,086 | 0.962172 | 0 | 0 | 3,401 | 0.155191 | 0 | 0 | 10,503 | 0.479261 |
da1d6a02eeb844897d0b4f2d15640a391973f96d | 1,971 | py | Python | ENotePadAlgorithm/strEncrypt/Morse.py | xioacd99/EnhancedNotePad | b95da1c4d957061ad60015f3b9ab5c445b5a1bc4 | [
"MIT"
] | null | null | null | ENotePadAlgorithm/strEncrypt/Morse.py | xioacd99/EnhancedNotePad | b95da1c4d957061ad60015f3b9ab5c445b5a1bc4 | [
"MIT"
] | null | null | null | ENotePadAlgorithm/strEncrypt/Morse.py | xioacd99/EnhancedNotePad | b95da1c4d957061ad60015f3b9ab5c445b5a1bc4 | [
"MIT"
] | null | null | null | # encode时会将非ANSII字符变为空格
# decode时会跳过非ANSII字符
# 摩斯电码加密的字符只有字符,数字,标点,不区分大小写
class MorseCoder:
def __init__(self):
self.encode_alphabet = {"A": ".-", "B": "-...", "C": "-.-.", "D": "-..", # 加密对照表
"E": ".", "F": "..-.", "G": "--.", "H": "....",
"... | 41.0625 | 115 | 0.367326 | 1,789 | 0.865506 | 0 | 0 | 0 | 0 | 0 | 0 | 635 | 0.307209 |
da1fedbc0ae28396d7b17794e490d8e258826958 | 4,800 | py | Python | Yolov3_deepsort/Badminton_Service/player.py | Haosam/BadmintonAI | 4a1e837109cd279fb7480b90b31003c259e063cf | [
"Apache-2.0"
] | null | null | null | Yolov3_deepsort/Badminton_Service/player.py | Haosam/BadmintonAI | 4a1e837109cd279fb7480b90b31003c259e063cf | [
"Apache-2.0"
] | null | null | null | Yolov3_deepsort/Badminton_Service/player.py | Haosam/BadmintonAI | 4a1e837109cd279fb7480b90b31003c259e063cf | [
"Apache-2.0"
] | null | null | null | from tkinter import *
import cv2
# Global Variables, can be translated to database if it becomes production
lcw = "Lee Chong Wei"
swh = "Son Wan Ho"
lyd = "Lee Yong Dae"
kgj = "Kim Gi Jung"
ksh = "Ko Sung Hyun"
yys = "Yo Yeon Seong"
csg = "Choi Sol Gyu"
wcl = "Wang Chi-Lin"
chl = "Chen Hung-Lin"
lcw_hei... | 33.103448 | 96 | 0.660417 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,147 | 0.238958 |
da2374aced1b72eebcc58d79ed22779475feb324 | 4,749 | py | Python | scripts/install.py | discord-package-bot/discord-package-bot | 109603c57a668d75f6939e3c97aae72f2691640e | [
"MIT"
] | 1 | 2021-07-12T05:56:00.000Z | 2021-07-12T05:56:00.000Z | scripts/install.py | discord-package-bot/discord-package-bot | 109603c57a668d75f6939e3c97aae72f2691640e | [
"MIT"
] | null | null | null | scripts/install.py | discord-package-bot/discord-package-bot | 109603c57a668d75f6939e3c97aae72f2691640e | [
"MIT"
] | null | null | null | """
syntax: |
install <パッケージ>
install update:<パッケージ>
install file:<ファイル>
syntax_description: |
パッケージ: インストールするパッケージ。update:をつけると、パッケージが更新されます。
ファイル: エクスポートしたファイルのパス。
---
パッケージをインストールします。
"""
import os
import re
import requests
import shlex
import shutil
import subprocess
import sys
import yaml
import zipfile
... | 34.664234 | 116 | 0.579912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,299 | 0.431899 |
da23f0ddb62bb0c0988bd093b73535c31a660639 | 72 | py | Python | plugin/src/test/resources/refactoring/extractmethod/Comment.after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | null | null | null | plugin/src/test/resources/refactoring/extractmethod/Comment.after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | 11 | 2017-02-27T22:35:32.000Z | 2021-12-24T08:07:40.000Z | plugin/src/test/resources/refactoring/extractmethod/Comment.after.py | consulo/consulo-python | 586c3eaee3f9c2cc87fb088dc81fb12ffa4b3a9d | [
"Apache-2.0"
] | null | null | null | def bar():
print("Hello")
#Comment to method
def foo():
bar()
| 9 | 18 | 0.555556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.347222 |
da24c7b3d7ea12e45a63e2df57343289b27d952a | 1,565 | py | Python | rlkeras/utils/memory.py | will-hcau/rlkeras | 9cc36b238dae794197fcb8689a5a1ffa1c0a42c0 | [
"MIT"
] | null | null | null | rlkeras/utils/memory.py | will-hcau/rlkeras | 9cc36b238dae794197fcb8689a5a1ffa1c0a42c0 | [
"MIT"
] | null | null | null | rlkeras/utils/memory.py | will-hcau/rlkeras | 9cc36b238dae794197fcb8689a5a1ffa1c0a42c0 | [
"MIT"
] | null | null | null | from collections import deque
import numpy as np
import random
class RandomReplayBuffer(object):
"""Experience replay buffer that samples uniformly."""
def __init__(self, buffer_size):
self.buffer_size = buffer_size
self.buffer = deque(maxlen=buffer_size)
def __len__(self):
return... | 28.454545 | 102 | 0.600639 | 1,500 | 0.958466 | 0 | 0 | 0 | 0 | 0 | 0 | 387 | 0.247284 |
da24d2c86b3410255d8a070349c1d9c6e890f449 | 6,335 | py | Python | PathPlanning/RRTStar/rrt_star.py | cmuehlbacher/PythonRobotics | c66fccc71c681387ff61b59554694b25399ca790 | [
"MIT"
] | 38 | 2019-12-08T12:26:04.000Z | 2022-03-06T11:29:08.000Z | PathPlanning/RRTStar/rrt_star.py | YoungGer/PythonRobotics | 9b8f2bd88a3d516d8deb473693661c1aea59fe68 | [
"MIT"
] | null | null | null | PathPlanning/RRTStar/rrt_star.py | YoungGer/PythonRobotics | 9b8f2bd88a3d516d8deb473693661c1aea59fe68 | [
"MIT"
] | 15 | 2020-02-12T15:57:28.000Z | 2021-08-28T07:39:18.000Z | """
Path planning Sample Code with RRT*
author: Atsushi Sakai(@Atsushi_twi)
"""
import copy
import math
import os
import sys
import matplotlib.pyplot as plt
sys.path.append(os.path.dirname(os.path.abspath(__file__)) +
"/../RRT/")
try:
from rrt import RRT
except ImportError:
raise
show_an... | 30.311005 | 99 | 0.572691 | 5,106 | 0.805998 | 0 | 0 | 0 | 0 | 0 | 0 | 849 | 0.134017 |
da2640c8cad77dff99c17a878df82c7bc7beb176 | 786 | py | Python | accountlist.py | beitnes/accountlist | 5bca4960405a23b20bce0d9928536ed6db8c39d0 | [
"Apache-2.0"
] | null | null | null | accountlist.py | beitnes/accountlist | 5bca4960405a23b20bce0d9928536ed6db8c39d0 | [
"Apache-2.0"
] | null | null | null | accountlist.py | beitnes/accountlist | 5bca4960405a23b20bce0d9928536ed6db8c39d0 | [
"Apache-2.0"
] | null | null | null | import boto3
import pprint
def account_list(output_format = "json"):
#TODO: Add other output formats
client = boto3.client('organizations')
pretty_printer = pprint.PrettyPrinter(indent=4)
accounts = list()
response = client.list_accounts()
while True:
next_token = response.get('Ne... | 18.714286 | 65 | 0.625954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.215013 |
da2652bdef2ea0254c65e10f3f8343f49c9b32ff | 745 | py | Python | test/commentProcessor_test.py | ponder-lab/GitHub-Issue-Mining | 5cff97bd2322894338c71f5ba7bd743e2e204a72 | [
"MIT"
] | 3 | 2021-04-18T04:07:35.000Z | 2021-12-25T06:35:32.000Z | test/commentProcessor_test.py | ponder-lab/GitHub-Issue-Classifier | 5cff97bd2322894338c71f5ba7bd743e2e204a72 | [
"MIT"
] | 4 | 2021-04-06T01:06:36.000Z | 2021-08-06T00:34:53.000Z | test/commentProcessor_test.py | ponder-lab/GitHub-Issue-Mining | 5cff97bd2322894338c71f5ba7bd743e2e204a72 | [
"MIT"
] | null | null | null | from utils.commentProcessor import processComment
TEST_CASES = [
{
"test": "Hello this is a pre processed string",
"expected_result": "hello pre processed string"
},
{
"test": "This string contains a screen name @y3pio tag",
"expected_result": "this string contains screen na... | 31.041667 | 77 | 0.628188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 427 | 0.573154 |
da26ac275ef766fda1ea905a5a0277b1855e977b | 7,275 | py | Python | plus_reader/plus_highlighting.py | ShashkovS/plus_reader | e53a7af01ae480f7a63e33d01a0a99ea681e7fee | [
"MIT"
] | 3 | 2017-11-27T10:01:42.000Z | 2018-05-07T09:37:24.000Z | plus_reader/plus_highlighting.py | ShashkovS/plus_reader | e53a7af01ae480f7a63e33d01a0a99ea681e7fee | [
"MIT"
] | 5 | 2017-09-28T09:53:13.000Z | 2017-11-25T20:10:00.000Z | plus_reader/plus_highlighting.py | ShashkovS/plus_reader | e53a7af01ae480f7a63e33d01a0a99ea681e7fee | [
"MIT"
] | 2 | 2017-09-14T11:56:07.000Z | 2017-09-14T12:49:46.000Z | import logging
import sys
import traceback
import numpy as np
from PyQt5.QtGui import QPixmap, QPainter, QMouseEvent
from PyQt5.QtWidgets import QApplication, QWidget, QGridLayout, QMenu, QSlider, QLabel
from PyQt5.QtCore import Qt
sys._excepthook = sys.excepthook
def excepthook(excType, excValue, tracebackobj):
... | 36.742424 | 134 | 0.650034 | 6,491 | 0.875978 | 0 | 0 | 0 | 0 | 0 | 0 | 548 | 0.073954 |
da27bfe1b6414a6b5de205fb3cd12650ba9370f4 | 22,206 | py | Python | dlrnapi_client/shell.py | softwarefactory-project/dlrnapi_client | ad21fe759597968c0f691b37dc681232dcd8f2aa | [
"Apache-2.0"
] | 1 | 2017-10-02T19:36:52.000Z | 2017-10-02T19:36:52.000Z | dlrnapi_client/shell.py | softwarefactory-project/dlrnapi_client | ad21fe759597968c0f691b37dc681232dcd8f2aa | [
"Apache-2.0"
] | 4 | 2018-07-16T20:14:58.000Z | 2022-02-04T07:03:03.000Z | dlrnapi_client/shell.py | softwarefactory-project/dlrnapi_client | ad21fe759597968c0f691b37dc681232dcd8f2aa | [
"Apache-2.0"
] | 1 | 2019-12-09T14:40:47.000Z | 2019-12-09T14:40:47.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 45.880165 | 79 | 0.577141 | 318 | 0.01432 | 0 | 0 | 0 | 0 | 0 | 0 | 6,590 | 0.296767 |
da27fd506b778e15d02b14a496203d5d175a39c3 | 1,051 | py | Python | python-mundo3/ex094.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | 1 | 2021-08-15T18:18:43.000Z | 2021-08-15T18:18:43.000Z | python-mundo3/ex094.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | python-mundo3/ex094.py | abm-astro/estudos-python | c0dcd71489e528d445efa25d4986bf2fd08f8fe6 | [
"MIT"
] | null | null | null | cadastro = dict()
pessoas = list()
soma = 0
while True:
cadastro.clear()
cadastro['nome'] = str(input('Nome: ')).capitalize()
while True:
cadastro['sexo'] = str(input('Sexo [M/F]: ')).upper()
if cadastro['sexo'] in 'MF':
break
print('ERRO! Digite apenas M ou F!')
cadastro['idade'] = int(input(... | 27.657895 | 61 | 0.586108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.389943 |
da284cabcfa7c599a3b1aad0183ba6d119a7c17a | 23,536 | py | Python | vendor/packages/translate-toolkit/translate/storage/base.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T17:08:47.000Z | 2019-10-05T11:37:02.000Z | vendor/packages/translate-toolkit/translate/storage/base.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/translate-toolkit/translate/storage/base.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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; e... | 34.209302 | 97 | 0.613443 | 21,722 | 0.922927 | 223 | 0.009475 | 0 | 0 | 0 | 0 | 10,256 | 0.435758 |
da296592fb077c1bc7a27382f8604a31a8ab30e3 | 520 | py | Python | task2C.py | jfs60/Group-147-PartIA-Flood-Warning-System | 3fb52e3e028ec8e0b70ccb1cfc61bcf76b42f2c1 | [
"MIT"
] | null | null | null | task2C.py | jfs60/Group-147-PartIA-Flood-Warning-System | 3fb52e3e028ec8e0b70ccb1cfc61bcf76b42f2c1 | [
"MIT"
] | null | null | null | task2C.py | jfs60/Group-147-PartIA-Flood-Warning-System | 3fb52e3e028ec8e0b70ccb1cfc61bcf76b42f2c1 | [
"MIT"
] | 1 | 2022-02-06T06:45:15.000Z | 2022-02-06T06:45:15.000Z | from floodsystem.station import MonitoringStation
from floodsystem.stationdata import build_station_list, update_water_levels
from floodsystem.flood import stations_highest_rel_level, stations_level_over_threshold
def run ():
stations = build_station_list()
update_water_levels(stations)
list = stations_h... | 30.588235 | 87 | 0.775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.119231 |
da2e43a4657d302992b18fd2e6651b3dd93dac4f | 6,112 | py | Python | docs/examples/viz_emwave_animation.py | iamansoni/fury | 2e7971a176c2540e10a9a6da861097583d08cb4a | [
"BSD-3-Clause"
] | 149 | 2018-09-20T18:36:16.000Z | 2022-03-29T05:16:25.000Z | docs/examples/viz_emwave_animation.py | iamansoni/fury | 2e7971a176c2540e10a9a6da861097583d08cb4a | [
"BSD-3-Clause"
] | 523 | 2018-09-20T16:57:16.000Z | 2022-03-31T18:52:41.000Z | docs/examples/viz_emwave_animation.py | iamansoni/fury | 2e7971a176c2540e10a9a6da861097583d08cb4a | [
"BSD-3-Clause"
] | 150 | 2018-10-10T07:21:27.000Z | 2022-03-29T08:33:17.000Z | """
===============================================
Electromagnetic Wave Propagation Animation
===============================================
A linearly polarized sinusoidal electromagnetic wave, propagating in the
direction +x through a homogeneous, isotropic, dissipationless medium,
such as vacuum. The electric fie... | 34.925714 | 79 | 0.59375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,852 | 0.46647 |
da2f601feb319bbef64c8038bd332c6cea544cb4 | 3,243 | py | Python | report_templates.py | averlarque/l1-zabbix-reporter | 5d8ea4d432b7b518f954d806a86fe5bcafca3f9d | [
"MIT"
] | 1 | 2017-03-27T02:59:09.000Z | 2017-03-27T02:59:09.000Z | report_templates.py | averlarque/l1-zabbix-reporter | 5d8ea4d432b7b518f954d806a86fe5bcafca3f9d | [
"MIT"
] | 1 | 2018-01-16T04:56:16.000Z | 2018-01-16T04:56:16.000Z | report_templates.py | averlarque/l1-zabbix-reporter | 5d8ea4d432b7b518f954d806a86fe5bcafca3f9d | [
"MIT"
] | 2 | 2016-11-24T07:06:51.000Z | 2019-11-16T15:12:54.000Z | from report_generator import *
class PeriodReport:
"""
Parent class for time periods reports
"""
def __init__(self, since, till, report_format='count', report_type='txt'):
# Define time limits
self.since = since
self.till = till
self.report_type = report_type
self.report_format = report_format
# Gener... | 38.152941 | 102 | 0.755782 | 3,203 | 0.987666 | 0 | 0 | 0 | 0 | 0 | 0 | 612 | 0.188714 |
da32e41f6a6f935279a78a5bb3c83c1544bb8fec | 494 | py | Python | CodeWars/Python/EvenTimesLast.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null | CodeWars/Python/EvenTimesLast.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null | CodeWars/Python/EvenTimesLast.py | BobbyRobillard/CodingChallenges | 71d5ca0b7f7c470c547d858dde7a799ce7d0d1a0 | [
"MIT"
] | null | null | null | # First Correct Solution #
def even_last(numbers):
return (
0
if len(numbers) == 0
else sum(numbers[x] for x in range(0, len(numbers), 2))
* numbers[len(numbers) - 1]
)
# REFACTORED Solution #
def even_last(numbers):
return sum(numbers[::2]) * numbers[-1] if numbers else 0
... | 24.7 | 88 | 0.595142 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.279352 |
da35f10f0968905caacfa6b0d419287aa50e3f84 | 603 | py | Python | scatter.py | Deego88/pands-project | 89f0baad690b0772502d5d336c9fd56ad5470cdc | [
"MIT"
] | null | null | null | scatter.py | Deego88/pands-project | 89f0baad690b0772502d5d336c9fd56ad5470cdc | [
"MIT"
] | null | null | null | scatter.py | Deego88/pands-project | 89f0baad690b0772502d5d336c9fd56ad5470cdc | [
"MIT"
] | null | null | null | # Third output required for project- A scatter plot of the output of the variables
import seaborn as sns
import pandas as pd
import matplotlib.pyplot as plt
# First output required for project- Read iris CSV file to into DataFrame
iris = pd.read_csv("iris.csv")
sns.set_style("darkgrid")
sns.pairplot(iris, h... | 35.470588 | 99 | 0.739635 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 374 | 0.620232 |
da36cd3ef7bb152a5c978fa2a7968dad8b22592a | 28 | py | Python | image_predictor/__init__.py | shakedlokits/pyArt | ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa | [
"Unlicense"
] | 3 | 2017-03-26T16:42:18.000Z | 2021-12-30T06:28:34.000Z | image_predictor/__init__.py | shakedlokits/pyArt | ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa | [
"Unlicense"
] | null | null | null | image_predictor/__init__.py | shakedlokits/pyArt | ffac65e91b7f97f0fa95f4ee7bfffcff4f6249aa | [
"Unlicense"
] | null | null | null | __author__ = 'shakedlokits'
| 14 | 27 | 0.785714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.5 |
da378e0eafeab07a79465181d9fc51e82389ac0a | 6,674 | py | Python | officevideo/officevideo.py | introp-software/xblock-officevideo | 6e475df782a4b0a2d2d9f7e2e5b9bae441b56024 | [
"MIT"
] | 4 | 2020-02-09T09:39:06.000Z | 2021-12-30T09:50:57.000Z | officevideo/officevideo.py | acidburn0zzz/xblock-officevideo | 6e475df782a4b0a2d2d9f7e2e5b9bae441b56024 | [
"MIT"
] | null | null | null | officevideo/officevideo.py | acidburn0zzz/xblock-officevideo | 6e475df782a4b0a2d2d9f7e2e5b9bae441b56024 | [
"MIT"
] | 8 | 2019-11-02T21:34:20.000Z | 2021-12-30T09:50:59.000Z | """ Copyright (c) Microsoft Corporation. All Rights Reserved. """
""" Licensed under the MIT license. See LICENSE file on the project webpage for details. """
import textwrap
import pkg_resources
import urllib2
import mimetypes
import urlparse, requests, json
import xml.etree.ElementTree as ET
from xblock.core import... | 38.578035 | 284 | 0.657177 | 5,393 | 0.808061 | 0 | 0 | 1,223 | 0.183248 | 0 | 0 | 2,670 | 0.40006 |
da37fa1cf8aa9ced7ef291cee98575d2cbc3ace4 | 4,594 | py | Python | stn/task.py | anenriquez/STNU | a02a13730cc0f31521e01e186c158533479090f5 | [
"Unlicense"
] | null | null | null | stn/task.py | anenriquez/STNU | a02a13730cc0f31521e01e186c158533479090f5 | [
"Unlicense"
] | null | null | null | stn/task.py | anenriquez/STNU | a02a13730cc0f31521e01e186c158533479090f5 | [
"Unlicense"
] | null | null | null | from stn.utils.as_dict import AsDictMixin
class Edge(AsDictMixin):
def __init__(self, name, mean, variance, **kwargs):
self.name = name
self.mean = round(mean, 3)
self.variance = round(variance, 3)
self.standard_dev = round(variance ** 0.5, 3)
def __str__(self):
to_pri... | 34.80303 | 94 | 0.60579 | 4,543 | 0.988899 | 0 | 0 | 417 | 0.090771 | 0 | 0 | 746 | 0.162386 |
da382dde5d81096600a758eea608666b31d3c7b7 | 2,959 | py | Python | src/bxgateway/messages/btc/data_btc_message.py | blockchain-development-resources/bxgateway | 761b5085f9c7c6527f0b9aaae06d2f70f3786db2 | [
"MIT"
] | 1 | 2021-11-26T07:49:24.000Z | 2021-11-26T07:49:24.000Z | src/bxgateway/messages/btc/data_btc_message.py | beepool/bxgateway | 761b5085f9c7c6527f0b9aaae06d2f70f3786db2 | [
"MIT"
] | null | null | null | src/bxgateway/messages/btc/data_btc_message.py | beepool/bxgateway | 761b5085f9c7c6527f0b9aaae06d2f70f3786db2 | [
"MIT"
] | 1 | 2021-09-06T02:10:08.000Z | 2021-09-06T02:10:08.000Z | import struct
from bxgateway.btc_constants import BTC_HDR_COMMON_OFF, BTC_SHA_HASH_LEN
from bxgateway.messages.btc.btc_message import BtcMessage
from bxgateway.messages.btc.btc_message_type import BtcMessageType
from bxgateway.messages.btc.btc_messages_util import btc_varint_to_int, pack_int_to_btc_varint
from bxgatew... | 36.9875 | 120 | 0.657993 | 2,580 | 0.871916 | 298 | 0.10071 | 0 | 0 | 0 | 0 | 32 | 0.010814 |
da39df4b22e6c016cc25f0ba477072a025a6794f | 8,188 | py | Python | alexber/utils/_ymlparsers_extra.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | null | null | null | alexber/utils/_ymlparsers_extra.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | 8 | 2019-12-15T05:13:27.000Z | 2021-02-16T20:03:40.000Z | alexber/utils/_ymlparsers_extra.py | AndreyRub/AlexBerUtils | b2d79c98c083533534470b62632a36dfd730be48 | [
"BSD-2-Clause"
] | 2 | 2019-12-12T03:52:37.000Z | 2021-05-21T21:14:34.000Z | """
This module adopts its behavior dependent on availability of Python packages.
This module optionally depends on ymlparseser module.
Method format_template() is used in emails module.
Note: This module will work if you have only standard Python package. You just can't change delimiters values.
Note: API and implem... | 38.261682 | 120 | 0.69553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,295 | 0.524548 |
da3bd0652c70b407476c6f160e8a128d0c51ee92 | 32 | py | Python | pyglview/__init__.py | weltonrodrigo/python_glview | 6680601aea5ae67ca8c5ccbf03847e6abc6f270c | [
"MIT"
] | 6 | 2019-04-29T05:44:51.000Z | 2022-01-28T15:31:57.000Z | pyglview/__init__.py | weltonrodrigo/python_glview | 6680601aea5ae67ca8c5ccbf03847e6abc6f270c | [
"MIT"
] | 1 | 2021-06-12T01:49:10.000Z | 2021-06-12T01:49:10.000Z | pyglview/__init__.py | weltonrodrigo/python_glview | 6680601aea5ae67ca8c5ccbf03847e6abc6f270c | [
"MIT"
] | 2 | 2019-12-16T20:34:59.000Z | 2020-08-24T14:57:50.000Z | from pyglview.pyglview import *
| 16 | 31 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
da3c5141c6711e22ea8ee4bbbf6d8f4d99c372b5 | 163 | py | Python | unused_stuff/save_image.py | JDJGInc/JDJGBotSupreme | fd8a5679f05cb90ebec8dbfc297445f9773ebe5f | [
"MIT"
] | 4 | 2020-07-10T04:02:23.000Z | 2021-02-13T16:38:54.000Z | unused_stuff/save_image.py | JDJGInc/JDJGBotSupreme | fd8a5679f05cb90ebec8dbfc297445f9773ebe5f | [
"MIT"
] | 3 | 2021-07-13T15:38:39.000Z | 2022-02-15T15:17:17.000Z | unused_stuff/save_image.py | johndpope/JDJGBotSupreme | 64fde0e169811e1866eb29174ac5dd8e052d830a | [
"MIT"
] | 2 | 2020-08-01T11:15:09.000Z | 2022-02-15T11:46:22.000Z | async with aiohttp.ClientSession() as cs:
async with cs.get(url) as r:
image=await r.read()
f = open("reverse.png","wb")
f.write(image)
f.close() | 27.166667 | 41 | 0.625767 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 1 | 17 | 0.104294 |
da3cdf32ec5c491bbbd379b8659c9adccf3080ca | 2,653 | py | Python | models/house_water_drain.py | susundberg/python-freecad-3dparts | 248e6f5eb4ce3d1921b3d4875e9c1d112f7b7498 | [
"MIT"
] | null | null | null | models/house_water_drain.py | susundberg/python-freecad-3dparts | 248e6f5eb4ce3d1921b3d4875e9c1d112f7b7498 | [
"MIT"
] | null | null | null | models/house_water_drain.py | susundberg/python-freecad-3dparts | 248e6f5eb4ce3d1921b3d4875e9c1d112f7b7498 | [
"MIT"
] | null | null | null | import supalib
TOLE=0.2
OUTSIZE=60.0
SIZE_CONST=25.0
SIZE_DROP=20.0
ANGLE_DROP=45.0
BASE_THICK=5.0
BASE_WIDE=20.0
PIPE_RAD=OUTSIZE/2.0 + TOLE
hole = supalib.create_cyl( radius=PIPE_RAD , size_z = OUTSIZE, place=(0, PIPE_RAD + 1.0, -OUTSIZE/2.0) )
outer_hole = supalib.create_cyl( radius=PIPE_RAD + 5.0 , size_z = OUT... | 35.851351 | 119 | 0.710516 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 660 | 0.248775 |
da3d14bdecf4a0d019902eff7b7a5c16a38e1ceb | 2,434 | py | Python | privatebin.py | iomintz/python-snippets | 982861c173bf4bcd5d908514a9e8b1914a580a5d | [
"CC0-1.0"
] | 2 | 2020-04-10T07:29:56.000Z | 2020-05-27T03:45:21.000Z | privatebin.py | LyricLy/python-snippets | 9d868b7bbccd793ea1dc513f51290963584a1dee | [
"CC0-1.0"
] | null | null | null | privatebin.py | LyricLy/python-snippets | 9d868b7bbccd793ea1dc513f51290963584a1dee | [
"CC0-1.0"
] | 2 | 2018-11-24T08:16:59.000Z | 2019-02-24T04:41:30.000Z | #!/usr/bin/env python3
# encoding: utf-8
"""
privatebin.py: uploads text to privatebin
using code from <https://github.com/r4sas/PBinCLI/blob/master/pbincli/actions.py>,
© 2017–2018 R4SAS <r4sas@i2pmail.org>
using code from <https://github.com/khazhyk/dango.py/blob/master/dango/zerobin.py>,
© 2017 khazhyk
"""
import ... | 26.747253 | 107 | 0.711586 | 42 | 0.017227 | 0 | 0 | 0 | 0 | 864 | 0.354389 | 693 | 0.284249 |
da3d5161d87de56a9bc36edca5bba5b60b08bd39 | 6,556 | py | Python | dace/libraries/standard/nodes/gearbox.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | dace/libraries/standard/nodes/gearbox.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | dace/libraries/standard/nodes/gearbox.py | thobauma/dace | 668e4c49e476437e1ea3b272e9dbefca2b92d2e7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
import collections
import copy
import dace
@dace.library.expansion
class ExpandGearbox(dace.transformation.ExpandTransformation):
environments = []
@staticmethod
def expansion(node: "Gearbox", parent_state: dace.SDFGState,
... | 39.257485 | 80 | 0.558115 | 6,388 | 0.974375 | 0 | 0 | 6,431 | 0.980933 | 0 | 0 | 2,013 | 0.307047 |
da3fd113ae5463775113a2aa795b9fc22645ae0c | 5,662 | py | Python | reprlearn/data/samplers/kshot_sampler.py | cocoaaa/ReprLearn | 58dc682aa62dbd59201ccc55b9b26480ff3d6773 | [
"MIT"
] | null | null | null | reprlearn/data/samplers/kshot_sampler.py | cocoaaa/ReprLearn | 58dc682aa62dbd59201ccc55b9b26480ff3d6773 | [
"MIT"
] | null | null | null | reprlearn/data/samplers/kshot_sampler.py | cocoaaa/ReprLearn | 58dc682aa62dbd59201ccc55b9b26480ff3d6773 | [
"MIT"
] | null | null | null | from reprlearn.data.datasets.base import ImageDataset
from collections import defaultdict
from typing import Iterable, Optional, Callable, List, Dict, Tuple
import numpy as np
# ===============
# Returns a list of datapoints from the dataset so that
# the list contains the same number of datapoints per class (if possi... | 39.048276 | 112 | 0.598905 | 5,316 | 0.938891 | 0 | 0 | 0 | 0 | 0 | 0 | 2,354 | 0.415754 |
da40b32e1d6bf126d545d746d9c0416f4eb38e0a | 7,117 | py | Python | phaseprep/workflows/preprocess_phase_wf.py | ostanley/phaseprep | 6e721ea43755f10eb8569b1f4d4461efa3d85a1a | [
"Apache-2.0"
] | 1 | 2019-10-11T17:04:25.000Z | 2019-10-11T17:04:25.000Z | phaseprep/workflows/preprocess_phase_wf.py | ostanley/phaseprep | 6e721ea43755f10eb8569b1f4d4461efa3d85a1a | [
"Apache-2.0"
] | 2 | 2019-10-16T13:13:52.000Z | 2019-12-10T19:38:39.000Z | phaseprep/workflows/preprocess_phase_wf.py | ostanley/phaseprep | 6e721ea43755f10eb8569b1f4d4461efa3d85a1a | [
"Apache-2.0"
] | 2 | 2019-11-18T19:21:44.000Z | 2021-10-19T18:01:03.000Z | import nipype.pipeline.engine as pe
import nipype.interfaces.fsl as fsl
import nipype.interfaces.afni as afni
import phaseprep.interfaces as pp
import nipype.interfaces.utility as ul
def findscalingarg(in_file, bit_depth=12):
import nibabel as nb
import numpy as np
img = nb.load(in_file)
if img.dataob... | 53.511278 | 153 | 0.559646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,510 | 0.352677 |
da426e6fadffb074142a9d08e0b642ab357e46fc | 2,514 | py | Python | zorg/buildbot/builders/AnnotatedBuilder.py | DalavanCloud/zorg | d55f03740e589d504dbfe2d5dc9fbc5d551f31fb | [
"Apache-2.0"
] | 1 | 2019-02-10T03:05:05.000Z | 2019-02-10T03:05:05.000Z | zorg/buildbot/builders/AnnotatedBuilder.py | DalavanCloud/llvm-zorg | 14d347a312d5a19bec421f553a3c1cbe1735b273 | [
"Apache-2.0"
] | null | null | null | zorg/buildbot/builders/AnnotatedBuilder.py | DalavanCloud/llvm-zorg | 14d347a312d5a19bec421f553a3c1cbe1735b273 | [
"Apache-2.0"
] | null | null | null | import os
import buildbot
from buildbot.process.properties import WithProperties
from buildbot.steps.shell import SetProperty, ShellCommand
from buildbot.steps.source import SVN
from zorg.buildbot.commands.AnnotatedCommand import AnnotatedCommand
from zorg.buildbot.process.factory import LLVMBuildFactory
def getAnno... | 36.970588 | 78 | 0.622514 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 991 | 0.394193 |
da43c8aa3780e6b294ec06869cbcdecb77cd3961 | 196 | py | Python | ex001 a ex114/ex008.py | kesia-barros/exercicios-python | 12a019e61c4b29fa29803f394b15d0af304c2ff0 | [
"MIT"
] | null | null | null | ex001 a ex114/ex008.py | kesia-barros/exercicios-python | 12a019e61c4b29fa29803f394b15d0af304c2ff0 | [
"MIT"
] | null | null | null | ex001 a ex114/ex008.py | kesia-barros/exercicios-python | 12a019e61c4b29fa29803f394b15d0af304c2ff0 | [
"MIT"
] | null | null | null | m = float(input("Digite os metros a serem convertidos: "))
c = 100 * m
mm = 1000 * m
print("{} metros tem {:.0f} centimetros!".format(m, c))
print("{} metros tem {:.0f} milimetros!".format(m, mm)) | 39.2 | 58 | 0.632653 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 109 | 0.556122 |
da44b530cb372e0a45fbccf1c2f6a0b2f6789174 | 511 | py | Python | oscar/shared/economy.py | Xaxetrov/OSCAR | f3a264e2bc7d4253756b11b0dbaa58c4f9ea82a6 | [
"Apache-2.0"
] | 5 | 2017-10-11T18:08:13.000Z | 2018-06-11T09:23:03.000Z | oscar/shared/economy.py | Xaxetrov/OSCAR | f3a264e2bc7d4253756b11b0dbaa58c4f9ea82a6 | [
"Apache-2.0"
] | 2 | 2018-04-18T16:25:20.000Z | 2019-04-26T14:49:52.000Z | oscar/shared/economy.py | Xaxetrov/OSCAR | f3a264e2bc7d4253756b11b0dbaa58c4f9ea82a6 | [
"Apache-2.0"
] | null | null | null | class Economy:
""" Stores economic state """
def __init__(self):
self.supply_depots = []
self.command_centers = []
self.scv = 8
def add_supply_depot(self, obs, shared, location):
location.compute_minimap_loc(obs, shared)
self.supply_depots.append(location)
def ... | 26.894737 | 56 | 0.645793 | 510 | 0.998043 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.056751 |
da45407cbca582a2a771bd09b1b4379b9b0b026a | 10,818 | py | Python | tcga_encoder/analyses/old/survival_from_z_space3.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | 2 | 2017-12-19T15:32:46.000Z | 2018-01-12T11:24:24.000Z | tcga_encoder/analyses/old/survival_from_z_space3.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | null | null | null | tcga_encoder/analyses/old/survival_from_z_space3.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | null | null | null | from tcga_encoder.utils.helpers import *
from tcga_encoder.data.data import *
from tcga_encoder.definitions.tcga import *
#from tcga_encoder.definitions.nn import *
from tcga_encoder.definitions.locations import *
#from tcga_encoder.algorithms import *
import seaborn as sns
from sklearn.manifold import TSNE, locally_li... | 41.930233 | 376 | 0.68839 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,568 | 0.237382 |
da46e9da88a69412b02b4465644d5259231c811b | 274 | py | Python | genaperiodic.py | gmayankcse15/Poller-and-Deferrable-Server | 9c4c5cae670c6e97959570592135b5c22bdfa4f7 | [
"MIT"
] | null | null | null | genaperiodic.py | gmayankcse15/Poller-and-Deferrable-Server | 9c4c5cae670c6e97959570592135b5c22bdfa4f7 | [
"MIT"
] | null | null | null | genaperiodic.py | gmayankcse15/Poller-and-Deferrable-Server | 9c4c5cae670c6e97959570592135b5c22bdfa4f7 | [
"MIT"
] | null | null | null | import numpy as np
arr_time = np.random.exponential(3, 3)
print(arr_time)
Exec_Time = np.random.exponential(1, 3)
print(Exec_Time)
for i in range(0,3):
print "A(",round(arr_time[i],1),",",round(Exec_Time[i],1),")"
'''
Output
A(0.3, 1.1)
A(2.5, 2.0)
A(0.0, 4.7)
''' | 13.7 | 63 | 0.627737 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.233577 |
da4804a69488cffc401e2be47069232bee7d172a | 4,828 | py | Python | train.py | yazar1993/TextBoxes-mxnet | 89fbf4151473ab4575a032871683e76978deec0a | [
"MIT"
] | 1 | 2019-02-04T19:03:27.000Z | 2019-02-04T19:03:27.000Z | train.py | yazar1993/TextBoxes-mxnet | 89fbf4151473ab4575a032871683e76978deec0a | [
"MIT"
] | null | null | null | train.py | yazar1993/TextBoxes-mxnet | 89fbf4151473ab4575a032871683e76978deec0a | [
"MIT"
] | null | null | null | import time
from matplotlib import pyplot as plt
import numpy as np
import mxnet as mx
from mxnet import autograd, gluon
import gluoncv as gcv
from gluoncv.utils import download, viz
from model import model_zoo
import argparse
def get_dataloader(net, train_dataset, data_shape, batch_size, num_workers):
from gluon... | 37.426357 | 101 | 0.665493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 835 | 0.172949 |
da48925dd8d85e25b1591c7ad7324c1b91372e21 | 484 | py | Python | aws/build_saint_features.py | fabien-vavrand/kaggle-riiid | 3302955980e0d4bb2dbc72bcd369000b0724f1e7 | [
"MIT"
] | null | null | null | aws/build_saint_features.py | fabien-vavrand/kaggle-riiid | 3302955980e0d4bb2dbc72bcd369000b0724f1e7 | [
"MIT"
] | null | null | null | aws/build_saint_features.py | fabien-vavrand/kaggle-riiid | 3302955980e0d4bb2dbc72bcd369000b0724f1e7 | [
"MIT"
] | null | null | null | from doppel import DoppelProject
from riiid.utils import configure_console_logging
from riiid.config import SRC_PATH
from riiid.aws.config import CONTEXT, PACKAGES
configure_console_logging()
project = DoppelProject(
name='riiid-saint-features',
path=SRC_PATH,
entry_point='-m riiid.aws.build_saint_featur... | 22 | 52 | 0.743802 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.171488 |
da48982c5d0c6163ec2e9654c124d812f977e516 | 14,174 | py | Python | effects/card_draw.py | MrCoft/EngiMod | 65c90bd9231ac388d8af7849a1835914f1eefc78 | [
"MIT"
] | null | null | null | effects/card_draw.py | MrCoft/EngiMod | 65c90bd9231ac388d8af7849a1835914f1eefc78 | [
"MIT"
] | null | null | null | effects/card_draw.py | MrCoft/EngiMod | 65c90bd9231ac388d8af7849a1835914f1eefc78 | [
"MIT"
] | null | null | null | from engi_mod import *
Java(
path = "fruitymod.actions.ChooseCardActionBase",
base = "AbstractGameAction",
code = """
protected AbstractPlayer p;
private String text;
private boolean isDraw = false; // NOTE: to trigger events and disable on "No Draw"
private boolean putsInto... | 38.832877 | 182 | 0.506632 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13,886 | 0.979681 |
da49b2e919a71a34082302973c4047cd68a8918b | 2,205 | py | Python | data_structures.py | davecom/MazeSolvingGUI | 291e0dfb146d7743ecb108413f5e7422e0719019 | [
"Apache-2.0"
] | 6 | 2020-06-26T00:45:35.000Z | 2022-01-15T19:37:36.000Z | data_structures.py | davecom/MazeSolvingGUI | 291e0dfb146d7743ecb108413f5e7422e0719019 | [
"Apache-2.0"
] | null | null | null | data_structures.py | davecom/MazeSolvingGUI | 291e0dfb146d7743ecb108413f5e7422e0719019 | [
"Apache-2.0"
] | 3 | 2021-05-03T16:48:29.000Z | 2021-11-19T20:21:29.000Z | # data_structures.py
# Copyright 2020 David Kopec
#
# 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... | 29.4 | 108 | 0.65805 | 1,246 | 0.565079 | 0 | 0 | 214 | 0.097052 | 0 | 0 | 693 | 0.314286 |
da4a7e68c0832aca421b9ec0a6a9d00a1f584040 | 1,933 | py | Python | src/sentry/incidents/endpoints/organization_alert_rule_trigger_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/incidents/endpoints/organization_alert_rule_trigger_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/incidents/endpoints/organization_alert_rule_trigger_details.py | kinghuang/sentry | 5c22673994a62f54a782d1c595852986ccc51ae9 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from rest_framework import status
from rest_framework.response import Response
from sentry.api.serializers import serialize
from sentry.api.serializers.models.alert_rule_trigger import DetailedAlertRuleTriggerSerializer
from sentry.incidents.endpoints.bases import OrganizationAl... | 39.44898 | 96 | 0.702535 | 1,427 | 0.738231 | 0 | 0 | 0 | 0 | 0 | 0 | 176 | 0.09105 |
da4b5460725c138c9033a42b82f19db166cfb84d | 1,935 | py | Python | tests/test_one_of_schema.py | bwind/sticky-marshmallow | e3e7c215fe9b221164c17121197ffca1b396e81a | [
"MIT"
] | 2 | 2019-11-28T11:25:47.000Z | 2019-12-05T09:53:31.000Z | tests/test_one_of_schema.py | bwind/sticky-marshmallow | e3e7c215fe9b221164c17121197ffca1b396e81a | [
"MIT"
] | null | null | null | tests/test_one_of_schema.py | bwind/sticky-marshmallow | e3e7c215fe9b221164c17121197ffca1b396e81a | [
"MIT"
] | 1 | 2019-11-29T15:32:14.000Z | 2019-11-29T15:32:14.000Z | from dataclasses import dataclass
from typing import List
import bson
from sticky_marshmallow import Repository
from marshmallow_oneofschema import OneOfSchema
from marshmallow import fields, post_load, Schema
from tests.db import connect
@dataclass
class Foo:
id: str
foo: str
@dataclass
class A(Foo):
... | 19.744898 | 78 | 0.657364 | 1,614 | 0.834109 | 0 | 0 | 242 | 0.125065 | 0 | 0 | 29 | 0.014987 |