hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c2177ce1a22de76b6127f9d11af4a546ec95d00
23,106
py
Python
src/mem/slicc/symbols/Type.py
joerocklin/gem5
bc199672491f16e678c35d2187917738c24d6628
[ "BSD-3-Clause" ]
null
null
null
src/mem/slicc/symbols/Type.py
joerocklin/gem5
bc199672491f16e678c35d2187917738c24d6628
[ "BSD-3-Clause" ]
null
null
null
src/mem/slicc/symbols/Type.py
joerocklin/gem5
bc199672491f16e678c35d2187917738c24d6628
[ "BSD-3-Clause" ]
2
2018-11-06T18:41:38.000Z
2019-01-30T00:51:40.000Z
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
28.420664
88
0.563014
from m5.util import orderdict from slicc.util import PairContainer from slicc.symbols.Symbol import Symbol from slicc.symbols.Var import Var class DataMember(PairContainer): def __init__(self, ident, type, pairs, init_code): super(DataMember, self).__init__(pairs) self.i...
true
true
1c21793a1c671bf8dcddea69e18a91cd7a248113
5,120
py
Python
ludwig/features/date_feature.py
Yard1/ludwig
510455f8d4fcd6b66e76d2c906d2c600fe724093
[ "Apache-2.0" ]
1
2021-06-26T07:52:12.000Z
2021-06-26T07:52:12.000Z
ludwig/features/date_feature.py
Yard1/ludwig
510455f8d4fcd6b66e76d2c906d2c600fe724093
[ "Apache-2.0" ]
null
null
null
ludwig/features/date_feature.py
Yard1/ludwig
510455f8d4fcd6b66e76d2c906d2c600fe724093
[ "Apache-2.0" ]
1
2019-09-05T09:19:39.000Z
2019-09-05T09:19:39.000Z
#! /usr/bin/env python # coding=utf-8 # Copyright (c) 2019 Uber Technologies, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
30.47619
93
0.61543
import logging from datetime import date from datetime import datetime import numpy as np import tensorflow as tf from dateutil.parser import parse from ludwig.constants import * from ludwig.encoders.date_encoders import ENCODER_REGISTRY from ludwig.features.base_feature import InputFeature from ludwi...
true
true
1c21793d3012b2d9d2105cc165e4f9f4ffec8721
5,935
py
Python
joels_scripts/dewpointTemperature.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
joels_scripts/dewpointTemperature.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
joels_scripts/dewpointTemperature.py
DelparteLabs/WCWAVE_ClimateInterp
dce7ddf4f6025ae96b864767c198af78f4ee3c0a
[ "MIT" ]
null
null
null
#Import necessary modules import arcpy from arcpy.sa import * import numpy #Check-out necessary extensions arcpy.CheckOutExtension('Spatial') #Set input parameters elevation_raster = arcpy.GetParameterAsText(0) station_locations = arcpy.GetParameterAsText(1) data_table = arcpy.GetParameterAsText(2) outDPRaster = arcp...
57.621359
168
0.679697
import arcpy from arcpy.sa import * import numpy arcpy.CheckOutExtension('Spatial') elevation_raster = arcpy.GetParameterAsText(0) station_locations = arcpy.GetParameterAsText(1) data_table = arcpy.GetParameterAsText(2) outDPRaster = arcpy.GetParameterAsText(3) outPercent = arcpy.GetParameterAsText(4) outDensity =...
true
true
1c2179b0512a854412710c7135b27cf57b469d52
396
py
Python
anonramblings/ramblings/migrations/0004_post_is_approved.py
emre/anonramblings
d759529ced9e6431ab133b1a5a156d0791499948
[ "MIT" ]
2
2021-05-05T13:57:16.000Z
2022-01-31T23:27:01.000Z
anonramblings/ramblings/migrations/0004_post_is_approved.py
emre/anonramblings
d759529ced9e6431ab133b1a5a156d0791499948
[ "MIT" ]
8
2021-03-19T03:25:40.000Z
2022-03-12T00:29:41.000Z
anonramblings/ramblings/migrations/0004_post_is_approved.py
emre/anonramblings
d759529ced9e6431ab133b1a5a156d0791499948
[ "MIT" ]
1
2021-07-28T20:42:51.000Z
2021-07-28T20:42:51.000Z
# Generated by Django 3.0.6 on 2020-05-15 20:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ramblings', '0003_post_sent_to_blockchain'), ] operations = [ migrations.AddField( model_name='post', name='is_appro...
20.842105
54
0.608586
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ramblings', '0003_post_sent_to_blockchain'), ] operations = [ migrations.AddField( model_name='post', name='is_approved', field=models.BooleanField(def...
true
true
1c217a1a2f7d02d8d2bd674fc62dd0014efbbdd7
3,903
py
Python
django-mkdocs/config/settings.py
masa1203/django_mypractice
c3ffef6f19a4dd16e2947f36c88f1f5773b427ce
[ "MIT" ]
null
null
null
django-mkdocs/config/settings.py
masa1203/django_mypractice
c3ffef6f19a4dd16e2947f36c88f1f5773b427ce
[ "MIT" ]
26
2019-12-25T19:26:23.000Z
2021-09-22T19:11:28.000Z
django-mkdocs/config/settings.py
sawady1203/django_mypractice
c3ffef6f19a4dd16e2947f36c88f1f5773b427ce
[ "MIT" ]
1
2021-06-10T05:14:02.000Z
2021-06-10T05:14:02.000Z
""" Django settings for config project. Generated by 'django-admin startproject' using Django 3.0.7. For more information on this file, see https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.0/ref/settings/ """ i...
26.732877
92
0.656931
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_NAME = os.path.basename(BASE_DIR) SECRET_KEY = 'n!35b0gsekwdr9q-my!#s+8y3s-6-g0=sr!m5=io$*%tmj2q$5' DEBUG = True # DEBUG = False ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ '...
true
true
1c217c3ed08ea4a8a652bede55ed82ddc917a80f
2,841
py
Python
lib-python/2.7/ctypes/test/test_random_things.py
jeff5/jython-whinchat
65d8e5268189f8197295ff2d91be3decb1ee0081
[ "CNRI-Jython" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
BitmessageKit/Vendor/static-python/Lib/ctypes/test/test_random_things.py
VoluntaryLabs/BitmessageKit
dd634977a629ab4dec184e12bb6324cc01149ba3
[ "MIT" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
BitmessageKit/Vendor/static-python/Lib/ctypes/test/test_random_things.py
VoluntaryLabs/BitmessageKit
dd634977a629ab4dec184e12bb6324cc01149ba3
[ "MIT" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
from ctypes import * import unittest, sys def callback_func(arg): 42 // arg raise ValueError(arg) if sys.platform == "win32": class call_function_TestCase(unittest.TestCase): # _ctypes.call_function is deprecated and private, but used by # Gary Bishp's readline module. If we have it, we ...
37.381579
83
0.620204
from ctypes import * import unittest, sys def callback_func(arg): 42 // arg raise ValueError(arg) if sys.platform == "win32": class call_function_TestCase(unittest.TestCase): def test(self): from _ctypes import call_function windll.kernel32.LoadLibraryA....
true
true
1c217cfedb4586850711308cf698176554ee17cf
1,509
py
Python
oo/pessoa.py
vitorpvcampos/pythonbirds
aac8204701289e2d709433c5511f975ef8a735b8
[ "MIT" ]
null
null
null
oo/pessoa.py
vitorpvcampos/pythonbirds
aac8204701289e2d709433c5511f975ef8a735b8
[ "MIT" ]
null
null
null
oo/pessoa.py
vitorpvcampos/pythonbirds
aac8204701289e2d709433c5511f975ef8a735b8
[ "MIT" ]
null
null
null
class Pessoa: olhos = 2 def __init__(self, *filhos, nome=None, idade=35): self.idade = idade self.nome = nome self.filhos = list(filhos) def cumprimentar(self): return f'Olá, meu nome é {self.nome}.' @staticmethod def metodo_estatico(): return 42 @class...
27.944444
77
0.66998
class Pessoa: olhos = 2 def __init__(self, *filhos, nome=None, idade=35): self.idade = idade self.nome = nome self.filhos = list(filhos) def cumprimentar(self): return f'Olá, meu nome é {self.nome}.' @staticmethod def metodo_estatico(): return 42 @class...
true
true
1c217d628720da1e32b3be584ef2c447fa90bf25
4,792
py
Python
tungsten_tempest_plugin/tests/api/contrail/test_policy_management.py
tungstenfabric/tungsten-tempest
ba5653dfcbb7106fcebe5685b26fbf1ed6b7d89e
[ "Apache-2.0" ]
1
2019-04-29T09:00:16.000Z
2019-04-29T09:00:16.000Z
tungsten_tempest_plugin/tests/api/contrail/test_policy_management.py
tungstenfabric/tungsten-tempest
ba5653dfcbb7106fcebe5685b26fbf1ed6b7d89e
[ "Apache-2.0" ]
11
2018-12-04T14:20:27.000Z
2019-05-30T14:37:13.000Z
tungsten_tempest_plugin/tests/api/contrail/test_policy_management.py
tungstenfabric/tungsten-tempest
ba5653dfcbb7106fcebe5685b26fbf1ed6b7d89e
[ "Apache-2.0" ]
9
2018-07-26T18:20:45.000Z
2020-03-27T17:40:56.000Z
"""Tempest Suite for Policy Management of Contrail.""" # Copyright 2018 AT&T Corp # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
39.278689
78
0.675918
from patrole_tempest_plugin import rbac_rule_validation from tempest import config from tempest.lib.common.utils import data_utils from tempest.lib import decorators from tungsten_tempest_plugin.tests.api.contrail import rbac_base CONF = config.CONF class PolicyManagementTest(rbac_base.BaseContrailTe...
true
true
1c217f92742816b25a60916da009c44dad298687
57
py
Python
odoo-13.0/addons/event_sms/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/event_sms/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/event_sms/tests/__init__.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from . import test_sms_schedule
14.25
31
0.649123
from . import test_sms_schedule
true
true
1c217fa598adf6b2e40101373955641370c96357
17,975
py
Python
pysymoro/robotf.py
songhongxiang/symoro
3db657778337e89c63d383789df5e4d2994bd542
[ "MIT" ]
109
2015-01-19T11:17:11.000Z
2022-03-19T13:24:02.000Z
pysymoro/robotf.py
songhongxiang/symoro
3db657778337e89c63d383789df5e4d2994bd542
[ "MIT" ]
21
2015-04-17T11:19:57.000Z
2021-11-30T03:21:49.000Z
pysymoro/robotf.py
songhongxiang/symoro
3db657778337e89c63d383789df5e4d2994bd542
[ "MIT" ]
50
2015-08-27T06:32:54.000Z
2022-03-16T03:35:13.000Z
# -*- coding: utf-8 -*- """ This module contains the FloatingRobot data structure. Additionally as a temporary measure some other data structures are included in this module as well. """ from sympy import eye, var from sympy import Matrix from pysymoro.screw import Screw from pysymoro.dynparams import DynParams fr...
35.878244
78
0.528512
from sympy import eye, var from sympy import Matrix from pysymoro.screw import Screw from pysymoro.dynparams import DynParams from pysymoro.geoparams import GeoParams from pysymoro import dynmodel from symoroutils import filemgr from symoroutils import tools class FloatingRobot(object): def __init__( ...
true
true
1c21801d88bcdb61b0580639a71f2035cb428aa9
3,255
py
Python
kochira/services/web/accuweather.py
gnowxilef/kochira
817b82ad0f0893a58e8d44f8db79ddd6fc0eae77
[ "MS-PL" ]
null
null
null
kochira/services/web/accuweather.py
gnowxilef/kochira
817b82ad0f0893a58e8d44f8db79ddd6fc0eae77
[ "MS-PL" ]
null
null
null
kochira/services/web/accuweather.py
gnowxilef/kochira
817b82ad0f0893a58e8d44f8db79ddd6fc0eae77
[ "MS-PL" ]
null
null
null
""" Accuweather forecast. Get weather data from Accuweather. """ import requests from kochira import config from kochira.service import Service, background, Config, coroutine from kochira.userdata import UserData service = Service(__name__, __doc__) @service.config class Config(Config): api_key = config.Fiel...
27.820513
213
0.600307
import requests from kochira import config from kochira.service import Service, background, Config, coroutine from kochira.userdata import UserData service = Service(__name__, __doc__) @service.config class Config(Config): api_key = config.Field(doc="Accuweather API key.") @service.command(r"!weather(?: (?P...
true
true
1c2181b02c074f8a63f882f35c5c2dc511ad28c0
12,310
py
Python
lbry/wallet/bip32.py
defendercrypt/lbry-sdk
6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528
[ "MIT" ]
4,703
2015-09-10T20:49:05.000Z
2019-06-20T01:34:38.000Z
lbry/wallet/bip32.py
defendercrypt/lbry-sdk
6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528
[ "MIT" ]
1,934
2015-11-25T20:40:45.000Z
2019-06-21T00:50:03.000Z
lbry/wallet/bip32.py
defendercrypt/lbry-sdk
6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528
[ "MIT" ]
369
2015-12-05T21:18:07.000Z
2019-06-10T12:40:50.000Z
from asn1crypto.keys import PrivateKeyInfo, ECPrivateKey from coincurve import PublicKey as cPublicKey, PrivateKey as cPrivateKey from coincurve.utils import ( pem_to_der, lib as libsecp256k1, ffi as libsecp256k1_ffi ) from coincurve.ecdsa import CDATA_SIG_LENGTH from lbry.crypto.hash import hmac_sha512, hash160, ...
35.889213
100
0.644192
from asn1crypto.keys import PrivateKeyInfo, ECPrivateKey from coincurve import PublicKey as cPublicKey, PrivateKey as cPrivateKey from coincurve.utils import ( pem_to_der, lib as libsecp256k1, ffi as libsecp256k1_ffi ) from coincurve.ecdsa import CDATA_SIG_LENGTH from lbry.crypto.hash import hmac_sha512, hash160, ...
true
true
1c2182c6f091dd5d3601a0ba48dee7821b034bd9
4,815
py
Python
test/functional/wallet_reorgsrestore.py
btcavenue/btcavenue
63c135c40dbb1aef3078abb4dffefa04b8ef8217
[ "MIT" ]
null
null
null
test/functional/wallet_reorgsrestore.py
btcavenue/btcavenue
63c135c40dbb1aef3078abb4dffefa04b8ef8217
[ "MIT" ]
null
null
null
test/functional/wallet_reorgsrestore.py
btcavenue/btcavenue
63c135c40dbb1aef3078abb4dffefa04b8ef8217
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2019 The Btcavenue Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test tx status in case of reorgs while wallet being shutdown. Wallet txn status rely on block connection...
45.424528
144
0.700519
from decimal import Decimal import os import shutil from test_framework.test_framework import BtcavenueTestFramework from test_framework.util import ( assert_equal, connect_nodes, disconnect_nodes, ) class ReorgsRestoreTest(BtcavenueTestFramework): def set_test_params(self): ...
true
true
1c2184704597635899fd52cc8ae4446d8e0d936c
1,011
py
Python
setup.py
josephcslater/PySFG
6883d3a9a200f0e8c21c3be2f20134688a5b8d32
[ "MIT" ]
null
null
null
setup.py
josephcslater/PySFG
6883d3a9a200f0e8c21c3be2f20134688a5b8d32
[ "MIT" ]
null
null
null
setup.py
josephcslater/PySFG
6883d3a9a200f0e8c21c3be2f20134688a5b8d32
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Symbolic Transfer Function Solver for Signal Flow Graphs # # Author: 秋纫 import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pysfg", version="0.1.2", author="秋纫", author_email="qrqiuren@users.noreply.github.com", ...
30.636364
79
0.665678
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="pysfg", version="0.1.2", author="秋纫", author_email="qrqiuren@users.noreply.github.com", description="A Python package for symbolic signal flow graph analysis.", long_description=...
true
true
1c2184a99ff878ae6575de9d42a42d196c352e05
69
py
Python
pt/vmz/common/__init__.py
ankitshah009/R2Plus1D
b8557da892884382ec07590e9370d81e923a2d66
[ "Apache-2.0" ]
752
2018-10-30T23:43:03.000Z
2022-03-31T05:43:19.000Z
pt/vmz/common/__init__.py
Dimbinantenaina/VMZ
45b04d6b7cd51baf81c144df56369b7521334cc6
[ "Apache-2.0" ]
94
2018-10-30T17:02:31.000Z
2021-12-10T07:28:20.000Z
pt/vmz/common/__init__.py
Dimbinantenaina/VMZ
45b04d6b7cd51baf81c144df56369b7521334cc6
[ "Apache-2.0" ]
140
2018-10-30T12:42:16.000Z
2022-03-12T00:10:21.000Z
from .log import * from .utils import * # TODO: cleand this mess up
13.8
27
0.695652
from .log import * from .utils import *
true
true
1c21865e6a327fe942f56c3202a4c661e01c5bb7
3,101
py
Python
core/widgets.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
922
2017-10-26T13:15:40.000Z
2020-02-05T19:06:13.000Z
core/widgets.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
109
2017-10-26T14:00:30.000Z
2020-02-05T23:37:11.000Z
core/widgets.py
Alberdi/babybuddy
b2c228fac9d8a7d3abfaf284b37174594493a185
[ "BSD-2-Clause" ]
87
2017-10-26T13:15:54.000Z
2020-01-25T12:49:46.000Z
from django.forms import Media from typing import Any, Dict, Optional from django.forms import Widget from . import models class TagsEditor(Widget): """ Custom widget that provides an alternative editor for tags provided by the taggit library. The widget makes use of bootstrap v4 and its badge/pill ...
36.916667
85
0.627862
from django.forms import Media from typing import Any, Dict, Optional from django.forms import Widget from . import models class TagsEditor(Widget): class Media: js = ("babybuddy/js/tags_editor.js",) input_type = "hidden" template_name = "core/widget_tag_editor.html" @staticmethod def ...
true
true
1c2186612d273899fe24826020a24fc13788e301
11,841
py
Python
clarifai/rest/grpc/proto/clarifai/api/concept_reference_pb2.py
Taik/clarifai-python
c3b66b84cb348d3cb1edff958f561a4734b78650
[ "Apache-2.0" ]
322
2015-08-25T03:16:11.000Z
2021-11-08T09:36:50.000Z
clarifai/rest/grpc/proto/clarifai/api/concept_reference_pb2.py
Taik/clarifai-python
c3b66b84cb348d3cb1edff958f561a4734b78650
[ "Apache-2.0" ]
76
2015-10-25T13:03:47.000Z
2022-02-19T09:36:10.000Z
clarifai/rest/grpc/proto/clarifai/api/concept_reference_pb2.py
Taik/clarifai-python
c3b66b84cb348d3cb1edff958f561a4734b78650
[ "Apache-2.0" ]
136
2015-09-04T13:48:27.000Z
2021-06-12T16:48:36.000Z
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: proto/clarifai/api/concept_reference.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobu...
46.253906
1,213
0.781522
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google...
true
true
1c2186c56874b53c1e71518ccb2833da4ab6c88e
10,018
py
Python
flexget/plugins/list/sonarr_list.py
viggy96/Flexget
464becced8f0e0e6c94b8a2f865c50f0305d2b81
[ "MIT" ]
null
null
null
flexget/plugins/list/sonarr_list.py
viggy96/Flexget
464becced8f0e0e6c94b8a2f865c50f0305d2b81
[ "MIT" ]
null
null
null
flexget/plugins/list/sonarr_list.py
viggy96/Flexget
464becced8f0e0e6c94b8a2f865c50f0305d2b81
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from collections import MutableSet from requests import RequestException from flexget import plugin from flexget.entry import Entry from flexget.event impo...
38.980545
119
0.592533
from __future__ import unicode_literals, division, absolute_import from builtins import * import logging from collections import MutableSet from requests import RequestException from flexget import plugin from flexget.entry import Entry from flexget.event import event from flexget.utils import requests log = logg...
true
true
1c2187d82d6f473c78de39246fe94ffa2720c91c
951
py
Python
taskcamp/views.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
4
2021-11-30T10:28:17.000Z
2022-01-31T07:44:08.000Z
taskcamp/views.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
66
2021-08-17T08:20:20.000Z
2022-03-31T02:20:53.000Z
taskcamp/views.py
iliadmitriev/taskcamp
f0da4aa5694bd1f2235cddcf0e3026b07d957e2d
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse from django.db import router, connections from psycopg2 import OperationalError as pgOperationalError from django.db import OperationalError as dbOperationalError def http_404(request, exception): data = {} return render(request, 'handle...
29.71875
64
0.727655
from django.shortcuts import render from django.http import HttpResponse from django.db import router, connections from psycopg2 import OperationalError as pgOperationalError from django.db import OperationalError as dbOperationalError def http_404(request, exception): data = {} return render(request, 'handle...
true
true
1c21888eda243f94eeb8897b612967728dd5e4bd
215,668
py
Python
src/azure-cli/azure/cli/command_modules/vm/custom.py
idear1203/azure-cli
eedd4dc63e0cef6e5aed60340cdaeb63c935f0a6
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/vm/custom.py
idear1203/azure-cli
eedd4dc63e0cef6e5aed60340cdaeb63c935f0a6
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/vm/custom.py
idear1203/azure-cli
eedd4dc63e0cef6e5aed60340cdaeb63c935f0a6
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
52.08114
250
0.698277
import json import os import requests from urllib.parse import urlparse from urllib.request import urlopen from knack.log import get_logger from knack.util import CLIError from azure.cli.core.azclierror import CLIInternalError, ValidationError, RequiredArgumentMissingError from azure.cli.command_mod...
true
true
1c2188b054b4861dd7d615f91c8e821b46cb9cc6
468
py
Python
django/fsviewer/management/commands/add_user.py
FireEmblemUniverse/LibraryOfBelhalla
6508e2be08c36bfa0a61e12e7bcb202912cc4891
[ "MIT" ]
null
null
null
django/fsviewer/management/commands/add_user.py
FireEmblemUniverse/LibraryOfBelhalla
6508e2be08c36bfa0a61e12e7bcb202912cc4891
[ "MIT" ]
null
null
null
django/fsviewer/management/commands/add_user.py
FireEmblemUniverse/LibraryOfBelhalla
6508e2be08c36bfa0a61e12e7bcb202912cc4891
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError from fsviewer.models import DocOwner class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('name', type=str, help='User to add.') parser.add_argument('dir', type=str, help='Path for user.') def handl...
29.25
77
0.673077
from django.core.management.base import BaseCommand, CommandError from fsviewer.models import DocOwner class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('name', type=str, help='User to add.') parser.add_argument('dir', type=str, help='Path for user.') def handl...
true
true
1c2188cbce0f7637e999361c3280557c47cac5e2
2,997
py
Python
scripts/check_matches.py
TVlaic/Mozgalo
842df60f9650405d6506f8a9934dcbb1d5f751da
[ "MIT" ]
1
2021-04-20T07:58:26.000Z
2021-04-20T07:58:26.000Z
scripts/check_matches.py
Mungosin/Mozgalo
842df60f9650405d6506f8a9934dcbb1d5f751da
[ "MIT" ]
null
null
null
scripts/check_matches.py
Mungosin/Mozgalo
842df60f9650405d6506f8a9934dcbb1d5f751da
[ "MIT" ]
null
null
null
import os import pandas as pd import numpy as np num = 4 first = ['/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidenceCenterLoss0.901_score_0.5.csv', '/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidence_center_loss1.0.csv', '/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidence_third.csv...
46.107692
103
0.63964
import os import pandas as pd import numpy as np num = 4 first = ['/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidenceCenterLoss0.901_score_0.5.csv', '/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidence_center_loss1.0.csv', '/home/user/Mozgalo/outputs/0.94685Max/SubmissionWithConfidence_third.csv...
true
true
1c2188cfb34da36b27e192570741b82d31ac76da
2,383
py
Python
optimize/test/draw_random.py
joel-simon/Antimander
ec2058a76f172e0941d5e4558776831050a00c2a
[ "BSD-3-Clause" ]
64
2020-06-13T19:21:01.000Z
2022-03-27T09:21:35.000Z
optimize/test/draw_random.py
joel-simon/Antimander
ec2058a76f172e0941d5e4558776831050a00c2a
[ "BSD-3-Clause" ]
null
null
null
optimize/test/draw_random.py
joel-simon/Antimander
ec2058a76f172e0941d5e4558776831050a00c2a
[ "BSD-3-Clause" ]
5
2020-06-23T18:42:50.000Z
2020-08-05T06:10:36.000Z
import os, sys, random, time import pygame from pygame import gfxdraw import numpy as np sys.path.append(os.path.abspath('.')) from src.state import State from src import districts, mutation, metrics from src.connectivity import can_lose from src.constraints import fix_pop_equality from src.draw import draw_districts ...
29.7875
93
0.65086
import os, sys, random, time import pygame from pygame import gfxdraw import numpy as np sys.path.append(os.path.abspath('.')) from src.state import State from src import districts, mutation, metrics from src.connectivity import can_lose from src.constraints import fix_pop_equality from src.draw import draw_districts ...
true
true
1c2188e22d90977584c31845041612a6708fdb4a
91,752
py
Python
gluon/html.py
RekGRpth/web2py-src
bdbe5234e8deea265d8167c50175799776b67082
[ "BSD-3-Clause" ]
null
null
null
gluon/html.py
RekGRpth/web2py-src
bdbe5234e8deea265d8167c50175799776b67082
[ "BSD-3-Clause" ]
null
null
null
gluon/html.py
RekGRpth/web2py-src
bdbe5234e8deea265d8167c50175799776b67082
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ | This file is part of the web2py Web Framework | Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> | License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Template helpers -------------------------------------------- """ import cgi import os import re imp...
31.759086
267
0.536108
import cgi import os import re import copy import types import urllib import base64 import itertools from pydal._compat import PY2, reduce, pickle, copyreg, HTMLParser, name2codepoint, iteritems, unichr, unicodeT, \ urllib_quote, to_bytes, to_native, to_unicode, basestring, urlencode, implements_bool, text_type...
true
true
1c21891f28b7d9754551ef35c1445ae898bf07b0
7,566
py
Python
src/oci/ons/models/confirmation_result.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/ons/models/confirmation_result.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/ons/models/confirmation_result.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
31.525
245
0.647766
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ConfirmationResult(object): def __init__(self, **kwargs): self.swagger_types = { 'topic_name': 'str',...
true
true
1c218a10b8e2e47e2d6e4bb749001ed4460bc4c1
9,138
py
Python
ext/pybind11/tests/test_numpy_array.py
chohy/cho_gem5
1207718477576053ee6222faff03dd888a90dbcf
[ "BSD-3-Clause" ]
null
null
null
ext/pybind11/tests/test_numpy_array.py
chohy/cho_gem5
1207718477576053ee6222faff03dd888a90dbcf
[ "BSD-3-Clause" ]
null
null
null
ext/pybind11/tests/test_numpy_array.py
chohy/cho_gem5
1207718477576053ee6222faff03dd888a90dbcf
[ "BSD-3-Clause" ]
null
null
null
import pytest import gc with pytest.suppress(ImportError): import numpy as np @pytest.fixture(scope='function') def arr(): return np.array([[1, 2, 3], [4, 5, 6]], '<u2') @pytest.requires_numpy def test_array_attributes(): from pybind11_tests.array import ( ndim, shape, strides, writeable, size,...
33.350365
97
0.622456
import pytest import gc with pytest.suppress(ImportError): import numpy as np @pytest.fixture(scope='function') def arr(): return np.array([[1, 2, 3], [4, 5, 6]], '<u2') @pytest.requires_numpy def test_array_attributes(): from pybind11_tests.array import ( ndim, shape, strides, writeable, size,...
true
true
1c218ad45a9beca74aa2febf3e66a579040bf9f9
27
py
Python
mpp/options/__init__.py
brett-fitz/pyMalleableProfileParser
e0fde63b74c6a058d1b270e69ac6b9e698c89937
[ "MIT" ]
3
2021-09-07T04:38:27.000Z
2022-03-28T06:33:01.000Z
mpp/options/__init__.py
brett-fitz/pyMalleableProfileParser
e0fde63b74c6a058d1b270e69ac6b9e698c89937
[ "MIT" ]
1
2022-03-27T09:11:01.000Z
2022-03-27T09:11:01.000Z
mpp/options/__init__.py
brett-fitz/pyMalleableProfileParser
e0fde63b74c6a058d1b270e69ac6b9e698c89937
[ "MIT" ]
2
2021-09-13T02:14:48.000Z
2022-03-28T06:33:06.000Z
from .option import Option
13.5
26
0.814815
from .option import Option
true
true
1c218bafa5d73d14eb8c5cdf87546caf31dbd500
15,505
py
Python
mechanisms/adaptive_grid.py
LukeHartmanTmlt/private-pgm
8d57504ae076ae1cb54f7a1c1f2a0815a696ae77
[ "Apache-2.0" ]
25
2019-04-22T16:03:33.000Z
2022-03-30T12:49:26.000Z
mechanisms/adaptive_grid.py
LukeHartmanTmlt/private-pgm
8d57504ae076ae1cb54f7a1c1f2a0815a696ae77
[ "Apache-2.0" ]
2
2019-11-09T22:11:05.000Z
2022-02-04T15:59:29.000Z
mechanisms/adaptive_grid.py
LukeHartmanTmlt/private-pgm
8d57504ae076ae1cb54f7a1c1f2a0815a696ae77
[ "Apache-2.0" ]
19
2019-06-28T13:54:12.000Z
2021-12-08T16:50:31.000Z
import numpy as np import pandas as pd import json from mbi import FactoredInference, Factor, Dataset, Domain from scipy import sparse from scipy.special import logsumexp import itertools import networkx as nx from disjoint_set import DisjointSet from cdp2adp import cdp_rho import argparse def powerset(iterable): ...
37.361446
126
0.611158
import numpy as np import pandas as pd import json from mbi import FactoredInference, Factor, Dataset, Domain from scipy import sparse from scipy.special import logsumexp import itertools import networkx as nx from disjoint_set import DisjointSet from cdp2adp import cdp_rho import argparse def powerset(iterable): ...
true
true
1c218c1bc32d22ac34a6f8b9d30ab367d7674f00
203
py
Python
models/enums.py
li195111/FastAPI-Authentication
b31d49bc7cf413a2f899faed5afc14171ff79887
[ "Apache-2.0" ]
null
null
null
models/enums.py
li195111/FastAPI-Authentication
b31d49bc7cf413a2f899faed5afc14171ff79887
[ "Apache-2.0" ]
null
null
null
models/enums.py
li195111/FastAPI-Authentication
b31d49bc7cf413a2f899faed5afc14171ff79887
[ "Apache-2.0" ]
null
null
null
''' Enum Models © 2022 - 酷喬伊科技有限公司 QChoice Tech, Ltd. All rights reserved. ''' import enum class Status(enum.Enum): FAILED = 0 SUCCESS = 1 def __repr__(self) -> str: return self.name.lower()
15.615385
58
0.665025
import enum class Status(enum.Enum): FAILED = 0 SUCCESS = 1 def __repr__(self) -> str: return self.name.lower()
true
true
1c218c83a93a1f0592c2518bfc5cf1b72ffdb6cf
1,839
py
Python
encounterapp/models/history.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
1
2021-04-03T19:57:32.000Z
2021-04-03T19:57:32.000Z
encounterapp/models/history.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
encounterapp/models/history.py
AbhiyantrikTechnology/DentalHub-Backend
89802b3e7671ffe8b3d287a998c3c4f375b58f03
[ "MIT" ]
null
null
null
from django.db import models from django.utils.translation import ugettext_lazy as _ from uuid import uuid4 from .encounter import Encounter from userapp.models import User import datetime def keygenerator(): uid = uuid4() return uid.hex.upper() class History(models.Model): id = models.CharField(max_len...
49.702703
110
0.777597
from django.db import models from django.utils.translation import ugettext_lazy as _ from uuid import uuid4 from .encounter import Encounter from userapp.models import User import datetime def keygenerator(): uid = uuid4() return uid.hex.upper() class History(models.Model): id = models.CharField(max_len...
true
true
1c218cc007591b60973c5648abb488165081035b
1,806
py
Python
tests/configuration/test_default_configuration.py
max-pfeiffer/uvicorn-poetry
e33856f886a8521a3411b89af3adfb5125d76588
[ "MIT" ]
7
2021-12-02T18:12:33.000Z
2022-03-25T04:10:28.000Z
tests/configuration/test_default_configuration.py
max-pfeiffer/uvicorn-poetry
e33856f886a8521a3411b89af3adfb5125d76588
[ "MIT" ]
1
2022-03-19T17:57:25.000Z
2022-03-21T22:07:37.000Z
tests/configuration/test_default_configuration.py
max-pfeiffer/uvicorn-poetry
e33856f886a8521a3411b89af3adfb5125d76588
[ "MIT" ]
null
null
null
import json import time import pytest import requests from docker.models.containers import Container from docker.models.images import Image from build.constants import TARGET_ARCHITECTURES from build.images import UvicornGunicornPoetryImage, FastApiMultistageImage from tests.constants import ( TEST_CONTAINER_NAM...
32.836364
78
0.769103
import json import time import pytest import requests from docker.models.containers import Container from docker.models.images import Image from build.constants import TARGET_ARCHITECTURES from build.images import UvicornGunicornPoetryImage, FastApiMultistageImage from tests.constants import ( TEST_CONTAINER_NAM...
true
true
1c218d613616e4fc03a2d491683e1ff3b9942d4e
1,435
py
Python
pytorch/LogUtility.py
TianyuDu/AnnEconForecast
648bb05498f333811021c07b04000d5f81ddc7f8
[ "MIT" ]
7
2018-12-26T07:54:43.000Z
2020-03-27T04:35:48.000Z
pytorch/LogUtility.py
TianyuDu/EFANN
648bb05498f333811021c07b04000d5f81ddc7f8
[ "MIT" ]
null
null
null
pytorch/LogUtility.py
TianyuDu/EFANN
648bb05498f333811021c07b04000d5f81ddc7f8
[ "MIT" ]
2
2019-06-09T21:10:56.000Z
2021-03-20T13:13:48.000Z
""" May 19 2019 """ import numpy as np import pandas as pd class Logger(): """ The logger object is used to store metrics on training and validation set during the training process. """ def __init__(self): self.t, self.v = [], [] def __repr__(self): return f"Log with:\n\ttime...
23.52459
63
0.548432
import numpy as np import pandas as pd class Logger(): def __init__(self): self.t, self.v = [], [] def __repr__(self): return f"Log with:\n\ttime={self.t}\n\tvalue={self.v}" def add(self, time, value): self.t.append(time) self.v.append(value) def clear(self): ...
true
true
1c218d9a1249a8c2c20ffb879fbdd0532e2816a4
1,992
py
Python
src/tespy/components/deprecated.py
govind-menon110/tespy
69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae
[ "MIT" ]
null
null
null
src/tespy/components/deprecated.py
govind-menon110/tespy
69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae
[ "MIT" ]
null
null
null
src/tespy/components/deprecated.py
govind-menon110/tespy
69f00d6e8fa3d9ecc329e71ac9c53f1276fd06ae
[ "MIT" ]
null
null
null
# -*- coding: utf-8 import logging from tespy.tools.helpers import TESPyComponentError # %% class PlaceHolderForError: r"""Throw errors for deprecated classes.""" def __init__(self, *args, **kwargs): msg = ( 'Version 0.4.x introduced PEP 8 conform class names for all ' 'clas...
15.323077
76
0.722892
import logging from tespy.tools.helpers import TESPyComponentError class PlaceHolderForError: def __init__(self, *args, **kwargs): msg = ( 'Version 0.4.x introduced PEP 8 conform class names for all ' 'classes used in TESPy. Please refer to ' 'https://tespy.readthe...
true
true
1c218e58a81bb844dd2da83f3735cdefc133463a
432
py
Python
post/migrations/0003_post_music.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
null
null
null
post/migrations/0003_post_music.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
15
2020-06-07T07:58:05.000Z
2022-01-19T16:53:47.000Z
post/migrations/0003_post_music.py
PickBas/meta-social
f6fb0a50c30e240086a75917b705dfdc71dbebf9
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-05-27 09:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('music', '0002_remove_music_user'), ('post', '0002_auto_20200520_1448'), ] operations = [ migrations.AddField( model_name...
21.6
59
0.592593
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('music', '0002_remove_music_user'), ('post', '0002_auto_20200520_1448'), ] operations = [ migrations.AddField( model_name='post', name='music', ...
true
true
1c218f38c67febea0df8340601206a46f5986f2b
409
py
Python
grr/server/grr_response_server/databases/mysql_flows_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
4,238
2015-01-01T15:34:50.000Z
2022-03-31T08:18:05.000Z
grr/server/grr_response_server/databases/mysql_flows_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
787
2015-01-02T21:34:24.000Z
2022-03-02T13:26:38.000Z
grr/server/grr_response_server/databases/mysql_flows_test.py
khanhgithead/grr
8ad8a4d2c5a93c92729206b7771af19d92d4f915
[ "Apache-2.0" ]
856
2015-01-02T02:50:11.000Z
2022-03-31T11:11:53.000Z
#!/usr/bin/env python from absl import app from absl.testing import absltest from grr_response_server.databases import db_flows_test from grr_response_server.databases import mysql_test from grr.test_lib import test_lib class MysqlFlowTest(db_flows_test.DatabaseTestFlowMixin, mysql_test.MysqlTes...
21.526316
65
0.782396
from absl import app from absl.testing import absltest from grr_response_server.databases import db_flows_test from grr_response_server.databases import mysql_test from grr.test_lib import test_lib class MysqlFlowTest(db_flows_test.DatabaseTestFlowMixin, mysql_test.MysqlTestBase, absltest.TestC...
true
true
1c218ffb238f60e6a7f637f95a9bb8f5f61bcfc9
6,885
py
Python
tests/unit_tests/test_profile_helpers.py
gberaudo/service-alti
ec1af969ce42e0a18e45072db281f6361b009c41
[ "BSD-3-Clause" ]
null
null
null
tests/unit_tests/test_profile_helpers.py
gberaudo/service-alti
ec1af969ce42e0a18e45072db281f6361b009c41
[ "BSD-3-Clause" ]
null
null
null
tests/unit_tests/test_profile_helpers.py
gberaudo/service-alti
ec1af969ce42e0a18e45072db281f6361b009c41
[ "BSD-3-Clause" ]
null
null
null
import unittest import logging from mock import patch, Mock from app.helpers.profile_helpers import get_profile, PROFILE_DEFAULT_AMOUNT_POINTS from tests.unit_tests import VALUES_FOR_EACH_2M_STEP, FAKE_RESOLUTION, FAKE_GEOM_2_POINTS, \ FAKE_GEOM_3_POINTS, MIDDLE_POINT logger = logging.getLogger(__name__) def ...
41.981707
100
0.627596
import unittest import logging from mock import patch, Mock from app.helpers.profile_helpers import get_profile, PROFILE_DEFAULT_AMOUNT_POINTS from tests.unit_tests import VALUES_FOR_EACH_2M_STEP, FAKE_RESOLUTION, FAKE_GEOM_2_POINTS, \ FAKE_GEOM_3_POINTS, MIDDLE_POINT logger = logging.getLogger(__name__) def ...
true
true
1c219047e9b287faf4bbb5b2d452670aee15a98f
5,334
py
Python
HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py
HsinYiHung/HARK_HY
086c46af5bd037fe1ced6906c6ea917ed58b134f
[ "Apache-2.0" ]
null
null
null
HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py
HsinYiHung/HARK_HY
086c46af5bd037fe1ced6906c6ea917ed58b134f
[ "Apache-2.0" ]
null
null
null
HARK/ConsumptionSaving/tests/test_ConsGenIncProcessModel.py
HsinYiHung/HARK_HY
086c46af5bd037fe1ced6906c6ea917ed58b134f
[ "Apache-2.0" ]
null
null
null
from copy import copy from HARK.ConsumptionSaving.ConsGenIncProcessModel import \ IndShockExplicitPermIncConsumerType, IndShockConsumerType, PersistentShockConsumerType import numpy as np import unittest GenIncDictionary = { "CRRA": 2.0, # Coefficient of relative risk aversion "R...
54.989691
131
0.601612
from copy import copy from HARK.ConsumptionSaving.ConsGenIncProcessModel import \ IndShockExplicitPermIncConsumerType, IndShockConsumerType, PersistentShockConsumerType import numpy as np import unittest GenIncDictionary = { "CRRA": 2.0, "Rfree": 1.03, ...
true
true
1c2190fcc7d2934e69c9a2ac7fc623e78bdec83c
58,934
py
Python
sdk/python/pulumi_azure_native/storagecache/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagecache/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storagecache/outputs.py
sebtelko/pulumi-azure-native
711ec021b5c73da05611c56c8a35adb0ce3244e4
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from...
38.418514
407
0.646028
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import _utilities from . import outputs from ._enums import * __all__ = [ 'BlobNfsTargetResponse', 'CacheActiveDirectorySettingsResponse', 'CacheActiveDirectorySettingsRespon...
true
true
1c219124e6e9d143f05808682437eb6766510dd0
545
py
Python
unscript/committee/urls.py
mozillacampuscrce/unscript2k18-35
5b5032e33ab205dd9daedb0a62ad2411e763f320
[ "MIT" ]
null
null
null
unscript/committee/urls.py
mozillacampuscrce/unscript2k18-35
5b5032e33ab205dd9daedb0a62ad2411e763f320
[ "MIT" ]
null
null
null
unscript/committee/urls.py
mozillacampuscrce/unscript2k18-35
5b5032e33ab205dd9daedb0a62ad2411e763f320
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path,include from committee import views urlpatterns = [ path(r'viewEvents/', views.viewEvents, name='viewEvent'), path(r'AddEvent/', views.addEvent, name='AddEvent'), path(r'EditEvent/', views.EditEvent, name='EditEvent'), path(r'editEvent/', vie...
41.923077
77
0.717431
from django.contrib import admin from django.urls import path,include from committee import views urlpatterns = [ path(r'viewEvents/', views.viewEvents, name='viewEvent'), path(r'AddEvent/', views.addEvent, name='AddEvent'), path(r'EditEvent/', views.EditEvent, name='EditEvent'), path(r'editEvent/', vie...
true
true
1c21917a8c56ea98340e9f8cc84cfa20feabf5d0
17,014
py
Python
django/contrib/auth/models.py
kix/django
5262a288df07daa050a0e17669c3f103f47a8640
[ "BSD-3-Clause" ]
1
2021-11-20T21:14:15.000Z
2021-11-20T21:14:15.000Z
django/contrib/auth/models.py
kix/django
5262a288df07daa050a0e17669c3f103f47a8640
[ "BSD-3-Clause" ]
null
null
null
django/contrib/auth/models.py
kix/django
5262a288df07daa050a0e17669c3f103f47a8640
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.mail import send_mail from django.db import models from django.db.models.manager import EmptyManager from django.utils.crypto import get_random_string from django.utils.http import urlquote from django.util...
35.519833
79
0.643411
from __future__ import unicode_literals from django.core.exceptions import ImproperlyConfigured from django.core.mail import send_mail from django.db import models from django.db.models.manager import EmptyManager from django.utils.crypto import get_random_string from django.utils.http import urlquote from django.util...
true
true
1c21930bcb054395df9d89a8b6d702a9c6f9e418
2,380
py
Python
python/pyEngine_problem.py
nbons/baseclasses
25a7feef901f7bb73696a1b2860a1e83d467d883
[ "Apache-2.0" ]
null
null
null
python/pyEngine_problem.py
nbons/baseclasses
25a7feef901f7bb73696a1b2860a1e83d467d883
[ "Apache-2.0" ]
null
null
null
python/pyEngine_problem.py
nbons/baseclasses
25a7feef901f7bb73696a1b2860a1e83d467d883
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function """ pyEngine_problem Developers: ----------- - Dr. Gaetan K. W. Kenway (GKWK) - Nicolas Bons (NB) History ------- v. 0.1 - Complete overall of AeroProblem (GKWK, 2014) v. 0.2 - Now inherits from AeroProblem (NB, 2017) """ # ========================================...
30.126582
79
0.567227
from __future__ import print_function import numpy from baseclasses import AeroProblem class Error(Exception): def __init__(self, message): msg = '\n+'+'-'*78+'+'+'\n' + '| AeroProblem Error: ' i = 20 for word in message.split(): if len(word) + i + 1 > 78: ...
true
true
1c2193326ce8b1bc04402f159b4b908fb0f46f34
839
py
Python
setup.py
ken-santous/tutorial
c1c37f15e99dbc577b36fb9cbcd8677d4e765866
[ "MIT" ]
null
null
null
setup.py
ken-santous/tutorial
c1c37f15e99dbc577b36fb9cbcd8677d4e765866
[ "MIT" ]
null
null
null
setup.py
ken-santous/tutorial
c1c37f15e99dbc577b36fb9cbcd8677d4e765866
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages DEPENDENCIES = open('requirements.txt', 'r').read().split('\n') README = open('README.md', 'r').read() setup( name='cti_injection', version='0.1.0', description='Setting up a python package', long_description=README, long_description_content_type='text/x...
32.269231
71
0.680572
from setuptools import setup, find_packages DEPENDENCIES = open('requirements.txt', 'r').read().split('\n') README = open('README.md', 'r').read() setup( name='cti_injection', version='0.1.0', description='Setting up a python package', long_description=README, long_description_content_type='text/x...
true
true
1c2193c5d6c13ad1eb3c356881f709a32e0b8571
302
py
Python
commonmark/__init__.py
phst/commonmark.py
d031003aa23cfce1787cfb29c1eb109b369ca5b7
[ "BSD-3-Clause" ]
154
2015-12-10T23:17:28.000Z
2019-04-04T06:49:36.000Z
commonmark/__init__.py
phst/commonmark.py
d031003aa23cfce1787cfb29c1eb109b369ca5b7
[ "BSD-3-Clause" ]
131
2019-07-02T15:56:33.000Z
2022-03-25T19:54:02.000Z
commonmark/__init__.py
phst/commonmark.py
d031003aa23cfce1787cfb29c1eb109b369ca5b7
[ "BSD-3-Clause" ]
53
2015-12-08T18:06:51.000Z
2019-05-02T18:08:10.000Z
# flake8: noqa from __future__ import unicode_literals, absolute_import from commonmark.main import commonmark from commonmark.dump import dumpAST, dumpJSON from commonmark.blocks import Parser from commonmark.render.html import HtmlRenderer from commonmark.render.rst import ReStructuredTextRenderer
33.555556
58
0.864238
from __future__ import unicode_literals, absolute_import from commonmark.main import commonmark from commonmark.dump import dumpAST, dumpJSON from commonmark.blocks import Parser from commonmark.render.html import HtmlRenderer from commonmark.render.rst import ReStructuredTextRenderer
true
true
1c2194237948d9b352faa04fa4bc37e0b6980ae4
1,226
py
Python
wormpose/commands/utils/results_saver.py
AntonioCCosta/wormpose
ebd0acf39b92072f00008731e77c5ac2b8ea4406
[ "BSD-3-Clause" ]
29
2020-05-14T02:58:59.000Z
2022-03-16T10:06:36.000Z
wormpose/commands/utils/results_saver.py
Tubbz-alt/wormpose
a92c0459f940d6e1f517b90d3a445ad3c0689ed8
[ "BSD-3-Clause" ]
8
2020-08-14T06:23:14.000Z
2022-01-03T04:28:58.000Z
wormpose/commands/utils/results_saver.py
Tubbz-alt/wormpose
a92c0459f940d6e1f517b90d3a445ad3c0689ed8
[ "BSD-3-Clause" ]
11
2020-07-18T20:43:00.000Z
2022-03-17T18:27:57.000Z
""" Save results to a H5 file """ import os import shutil from typing import Optional import h5py class ResultsSaver(object): def __init__(self, temp_dir: str, results_root_dir: str, results_filename: str): self.temp_dir = temp_dir self.results_root_dir = results_root_dir self.results_fi...
33.135135
95
0.644372
import os import shutil from typing import Optional import h5py class ResultsSaver(object): def __init__(self, temp_dir: str, results_root_dir: str, results_filename: str): self.temp_dir = temp_dir self.results_root_dir = results_root_dir self.results_filename = results_filename def...
true
true
1c2195af67ebab46a8de09529c52cec188e31daf
105
py
Python
Oracle/scheduleTask.py
ars-1/Modular
00dff069b28cfd356b7db661852cc89122101738
[ "Unlicense" ]
null
null
null
Oracle/scheduleTask.py
ars-1/Modular
00dff069b28cfd356b7db661852cc89122101738
[ "Unlicense" ]
null
null
null
Oracle/scheduleTask.py
ars-1/Modular
00dff069b28cfd356b7db661852cc89122101738
[ "Unlicense" ]
null
null
null
import datetime from .models import * from .forms import DueForm Client.due + Client.bill Client.save()
15
26
0.771429
import datetime from .models import * from .forms import DueForm Client.due + Client.bill Client.save()
true
true
1c21961d3aa5e48d2e2c8360714472ed512b3806
980
py
Python
playground/python/deja_vu.py
Chris1320/LostLittleScripts
a282a708937631c0ef6c5bab52c7b58cfbae2d3b
[ "Unlicense" ]
null
null
null
playground/python/deja_vu.py
Chris1320/LostLittleScripts
a282a708937631c0ef6c5bab52c7b58cfbae2d3b
[ "Unlicense" ]
null
null
null
playground/python/deja_vu.py
Chris1320/LostLittleScripts
a282a708937631c0ef6c5bab52c7b58cfbae2d3b
[ "Unlicense" ]
null
null
null
""" Deja Vu You aren't paying attention and you accidentally type a bunch of random letters on your keyboard. You want to know if you ever typed the same letter twice, or if they are all unique letters. Task: If you are given a string of random letters, your task is to evaluate whether any letter is repeated in the s...
27.222222
190
0.719388
string = str(input("Enter string: ")) chars = set(()) unique = True for char in string: if char in chars: print("Deja Vu") unique = False break chars.add(char) if unique: print("Unique")
true
true
1c2196e73020d171db8d13a78305a4eb1fe56589
1,193
py
Python
app/core/models.py
ShehabAhmedSayem/recipe-app-api
44535e527d87f9a8ffdc2d5305557f31355cc2da
[ "MIT" ]
null
null
null
app/core/models.py
ShehabAhmedSayem/recipe-app-api
44535e527d87f9a8ffdc2d5305557f31355cc2da
[ "MIT" ]
null
null
null
app/core/models.py
ShehabAhmedSayem/recipe-app-api
44535e527d87f9a8ffdc2d5305557f31355cc2da
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password, **extra_fields): """Creates and saves a new user""" if not e...
31.394737
76
0.664711
from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \ PermissionsMixin class UserManager(BaseUserManager): def create_user(self, email, password, **extra_fields): if not email: raise ValueError('User mu...
true
true
1c2197cad5b31c2160b9a79642638dfed51f0008
4,297
py
Python
softwares/substance_painter_wizard/export_ui.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
1
2021-10-13T15:07:32.000Z
2021-10-13T15:07:32.000Z
softwares/substance_painter_wizard/export_ui.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
null
null
null
softwares/substance_painter_wizard/export_ui.py
Wizard-collab/wizard_2
a2cb23362e178a0205f6dd0b9b4328c329b5b142
[ "MIT" ]
null
null
null
# coding: utf-8 # Author: Leo BRUNEL # Contact: contact@leobrunel.com # Python modules from PySide2 import QtWidgets, QtGui import os import json # Substance Painter modules import substance_painter.logging as logging # Wizard modules import wizard_communicate image_sizes = ['128', '256', ...
34.934959
75
0.614149
from PySide2 import QtWidgets, QtGui import os import json import substance_painter.logging as logging import wizard_communicate image_sizes = ['128', '256', '512', '1024', '2048', '4096', '8192'] file_types = ...
true
true
1c21981906bbddea6e0de860b96d5d4f0f70a145
1,321
py
Python
setup.py
hpi-dhc/robotehr
5b33dd3be68824e7f2f483fc20018d36d1dffef3
[ "MIT" ]
null
null
null
setup.py
hpi-dhc/robotehr
5b33dd3be68824e7f2f483fc20018d36d1dffef3
[ "MIT" ]
null
null
null
setup.py
hpi-dhc/robotehr
5b33dd3be68824e7f2f483fc20018d36d1dffef3
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- "The setup script." from setuptools import find_packages, setup with open("README.md") as readme_file: readme = readme_file.read() with open("requirements.txt") as requirements_file: requirements = requirements_file.read().split("\n") setup_requirements = [ ...
25.901961
64
0.654807
from setuptools import find_packages, setup with open("README.md") as readme_file: readme = readme_file.read() with open("requirements.txt") as requirements_file: requirements = requirements_file.read().split("\n") setup_requirements = [ "pytest-runner", ] test_requirements = [ "pytest", ] setu...
true
true
1c219888920e1a8bc93025db5532422bfc527d70
543
py
Python
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
splitData.py
csortu/drugMLPytorch
7ea6ef8c46dc3027a7ebd21836b7b12c23659db8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 13 13:32:14 2019 @author: ortutay """ import pandas as pd import numpy as np link = 'http://bit.ly/uforeports' ufo = pd.read_csv(link) # We split 60-20-20% tran-validation-test sets train, validate, test = np.split(ufo.sample(frac=1), ...
23.608696
88
0.598527
import pandas as pd import numpy as np link = 'http://bit.ly/uforeports' ufo = pd.read_csv(link) train, validate, test = np.split(ufo.sample(frac=1), [int(.6*len(ufo)),int(.8*len(ufo))]) a = pd.DataFrame({'col1': np.arange(1, 21),'col2': np.arange(21,41)}) train, validate, t...
true
true
1c219a0e71f41e6f51732c916b43d013358c5a38
411
py
Python
clothing_exchange/clothing_exchange/wsgi.py
GALesniak/clothing_exchange
71c62be8017d5be9380a60051f42420d66b23b6a
[ "Unlicense" ]
null
null
null
clothing_exchange/clothing_exchange/wsgi.py
GALesniak/clothing_exchange
71c62be8017d5be9380a60051f42420d66b23b6a
[ "Unlicense" ]
null
null
null
clothing_exchange/clothing_exchange/wsgi.py
GALesniak/clothing_exchange
71c62be8017d5be9380a60051f42420d66b23b6a
[ "Unlicense" ]
null
null
null
""" WSGI config for clothing_exchange project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJ...
24.176471
78
0.79562
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'clothing_exchange.settings') application = get_wsgi_application()
true
true
1c219b8f105edd9c3c7ce8c3d4fc661c3cb954ca
1,811
py
Python
tests/models/DeepFM_test.py
HCMY/DeepCTR
0950dbabba21821d5ff71fdbc643e958dfc1153b
[ "Apache-2.0" ]
6,192
2017-12-05T03:02:35.000Z
2022-03-31T20:59:30.000Z
tests/models/DeepFM_test.py
HCMY/DeepCTR
0950dbabba21821d5ff71fdbc643e958dfc1153b
[ "Apache-2.0" ]
362
2018-04-15T06:53:20.000Z
2022-03-21T15:03:02.000Z
tests/models/DeepFM_test.py
HCMY/DeepCTR
0950dbabba21821d5ff71fdbc643e958dfc1153b
[ "Apache-2.0" ]
1,960
2017-12-05T03:16:04.000Z
2022-03-31T06:37:00.000Z
import pytest import tensorflow as tf from deepctr.estimator import DeepFMEstimator from deepctr.models import DeepFM from ..utils import check_model, get_test_data, SAMPLE_SIZE, get_test_data_estimator, check_estimator, \ Estimator_TEST_TF1 @pytest.mark.parametrize( 'hidden_size,sparse_feature_num', [((...
36.22
122
0.610712
import pytest import tensorflow as tf from deepctr.estimator import DeepFMEstimator from deepctr.models import DeepFM from ..utils import check_model, get_test_data, SAMPLE_SIZE, get_test_data_estimator, check_estimator, \ Estimator_TEST_TF1 @pytest.mark.parametrize( 'hidden_size,sparse_feature_num', [((...
true
true
1c219d3edb4437899a0ce80d4d03758f07d23f93
7,541
py
Python
tests/test_write.py
872409/biplist
290571c37efc1f98fd8e2e4c4b81546f5e0dd5ed
[ "BSD-3-Clause" ]
1
2019-05-14T11:40:02.000Z
2019-05-14T11:40:02.000Z
tests/test_write.py
872409/biplist
290571c37efc1f98fd8e2e4c4b81546f5e0dd5ed
[ "BSD-3-Clause" ]
null
null
null
tests/test_write.py
872409/biplist
290571c37efc1f98fd8e2e4c4b81546f5e0dd5ed
[ "BSD-3-Clause" ]
null
null
null
from biplist import * from biplist import PlistWriter import datetime import os #from cStringIO import StringIO import subprocess import tempfile from test_utils import * import unittest import six class TestWritePlist(unittest.TestCase): def setUp(self): pass def roundTrip(self, root, xml=False, ...
36.965686
134
0.559077
from biplist import * from biplist import PlistWriter import datetime import os import subprocess import tempfile from test_utils import * import unittest import six class TestWritePlist(unittest.TestCase): def setUp(self): pass def roundTrip(self, root, xml=False, expected=None): ...
true
true
1c219e0eed56fbd8a5948a4838cf1d6d612356d9
125
py
Python
setup.py
i4Ds/Karabo-Pipeline
c9a7f120b08b56af93bb953e284b33c107fd865c
[ "MIT" ]
null
null
null
setup.py
i4Ds/Karabo-Pipeline
c9a7f120b08b56af93bb953e284b33c107fd865c
[ "MIT" ]
42
2022-01-27T14:12:46.000Z
2022-03-31T14:21:26.000Z
setup.py
i4Ds/Karabo-Pipeline
c9a7f120b08b56af93bb953e284b33c107fd865c
[ "MIT" ]
null
null
null
from distutils.core import setup # implicitly takes config from setup.cfg (used by conda build load_setup_py_data()) setup()
31.25
83
0.8
from distutils.core import setup setup()
true
true
1c219f1403ec76a3dfd7ec3415216afb620977b8
10,036
py
Python
cde/density_estimator/MDN.py
tobikuhlmann/Conditional_Density_Estimation
5e64fca31e0f8aafac43cfca7a37f70edb4d90fe
[ "MIT" ]
null
null
null
cde/density_estimator/MDN.py
tobikuhlmann/Conditional_Density_Estimation
5e64fca31e0f8aafac43cfca7a37f70edb4d90fe
[ "MIT" ]
null
null
null
cde/density_estimator/MDN.py
tobikuhlmann/Conditional_Density_Estimation
5e64fca31e0f8aafac43cfca7a37f70edb4d90fe
[ "MIT" ]
null
null
null
import numpy as np import sklearn import tensorflow as tf import edward as ed from edward.models import Categorical, Mixture, MultivariateNormalDiag from cde.utils.tf_utils.network import MLP import cde.utils.tf_utils.layers as L from cde.utils.tf_utils.layers_powered import LayersPowered from cde.utils.serializable im...
45.207207
161
0.708051
import numpy as np import sklearn import tensorflow as tf import edward as ed from edward.models import Categorical, Mixture, MultivariateNormalDiag from cde.utils.tf_utils.network import MLP import cde.utils.tf_utils.layers as L from cde.utils.tf_utils.layers_powered import LayersPowered from cde.utils.serializable im...
true
true
1c219f9f6f19db413406189923faa772fc08763f
350
py
Python
Unit_A/chapter05/infiniteRecursion.py
noynaert/csc184Handouts
c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de
[ "Unlicense" ]
2
2021-04-27T09:18:46.000Z
2021-10-17T03:58:53.000Z
Unit_A/chapter05/infiniteRecursion.py
noynaert/csc184Handouts
c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de
[ "Unlicense" ]
null
null
null
Unit_A/chapter05/infiniteRecursion.py
noynaert/csc184Handouts
c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de
[ "Unlicense" ]
null
null
null
# infiniteRecursion.py # Demonstrates what happens when there is no way to stop recursion # badCounter() is a function that counts. It has no way to stop itself. def badCounter(number): print("The count is now", number) next = number + 1 badCounter(next) # The main program starts here print("Begin..."...
21.875
72
0.708571
def badCounter(number): print("The count is now", number) next = number + 1 badCounter(next) print("Begin...") badCounter(1) print("Done!")
true
true
1c21a0b26d423a557b8a82e1073510407fa42971
5,257
py
Python
dvc/remote/azure.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
dvc/remote/azure.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
dvc/remote/azure.py
dchichkov/dvc
907853b98598094caef4d0c45c4f0f54573af6e4
[ "Apache-2.0" ]
null
null
null
import logging import os import posixpath import re from datetime import datetime, timedelta from urllib.parse import urlparse import threading from funcy import cached_property, wrap_prop from dvc.path_info import CloudURLInfo from dvc.progress import Tqdm from dvc.remote.base import BaseRemote from dvc.scheme impor...
32.450617
77
0.623169
import logging import os import posixpath import re from datetime import datetime, timedelta from urllib.parse import urlparse import threading from funcy import cached_property, wrap_prop from dvc.path_info import CloudURLInfo from dvc.progress import Tqdm from dvc.remote.base import BaseRemote from dvc.scheme impor...
true
true
1c21a169d0166a537ee23e5f06403551209ece7c
4,182
py
Python
code_triage.py
jmdearman/code_triage
67626b40429365370b5bec11efa29b7ee8a1983e
[ "MIT" ]
null
null
null
code_triage.py
jmdearman/code_triage
67626b40429365370b5bec11efa29b7ee8a1983e
[ "MIT" ]
null
null
null
code_triage.py
jmdearman/code_triage
67626b40429365370b5bec11efa29b7ee8a1983e
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 from __future__ import division, print_function import collections import os import numpy as np import h5py header_text = """ INTRO TO ANTIPATTERNS IN SCIENTIFIC COMPUTING PART I: CODE TRIAGE ----------------------------------------------------------------- Instructions to follow along: >>> gi...
28.44898
81
0.614778
from __future__ import division, print_function import collections import os import numpy as np import h5py header_text = """ INTRO TO ANTIPATTERNS IN SCIENTIFIC COMPUTING PART I: CODE TRIAGE ----------------------------------------------------------------- Instructions to follow along: >>> git clone https://github...
true
true
1c21a1f5dc3e5665318e48e5cebb2f15632057aa
3,637
py
Python
gan/main.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
2
2020-04-07T17:08:45.000Z
2020-12-29T20:37:41.000Z
gan/main.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
null
null
null
gan/main.py
dendisuhubdy/code-snippets
12b99ac102f16a011f30bd94b4e42789225eaf7d
[ "MIT" ]
1
2020-04-07T17:08:46.000Z
2020-04-07T17:08:46.000Z
import os import numpy as np from matplotlib import pyplot as plt from time import time from foxhound import activations from foxhound import updates from foxhound import inits from foxhound.theano_utils import floatX, sharedX import theano import theano.tensor as T from scipy.stats import gaussian_kde from scipy.mi...
25.433566
74
0.634039
import os import numpy as np from matplotlib import pyplot as plt from time import time from foxhound import activations from foxhound import updates from foxhound import inits from foxhound.theano_utils import floatX, sharedX import theano import theano.tensor as T from scipy.stats import gaussian_kde from scipy.mi...
false
true
1c21a28e5f45bc54a6d966e5ed9a95cf3834eeb0
4,189
py
Python
runnerreads/settings.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
runnerreads/settings.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
runnerreads/settings.py
mguarascio/runnerreads-com
3bc877cf24370cf881a98a1c5915693464bc69e8
[ "MIT" ]
null
null
null
""" Django settings for runnerreads project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ impor...
28.304054
91
0.716639
import os import dj_database_url BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) SECRET_KEY = '*n^9kvgsf!bej+znd@fleewok6l9868rc7k(0$ubbd90psb6^2' DEBUG = False # Allow all host headers ALLOWED_HOSTS = ['*'] # Application defi...
true
true
1c21a2b0ba647b279767584b5db7addc8235a94d
12,233
py
Python
hisaab.py
Jugalcody/hisaab_gui_database
a0c6320279676ce3f50037147d9e8b81f60bbb76
[ "Apache-2.0" ]
null
null
null
hisaab.py
Jugalcody/hisaab_gui_database
a0c6320279676ce3f50037147d9e8b81f60bbb76
[ "Apache-2.0" ]
null
null
null
hisaab.py
Jugalcody/hisaab_gui_database
a0c6320279676ce3f50037147d9e8b81f60bbb76
[ "Apache-2.0" ]
null
null
null
import tkinter as tk,mysql.connector as con class a(tk.Frame): def info1(self,p,c): tk.Frame.__init__(self,p) self.configure(bg="green") n=tk.Label(self,text="Database",font=("Arial",25,"bold"),bd=2,bg="cyan") n.place(x=530,y=0) item=tk.Label(self,te...
40.372937
131
0.418622
import tkinter as tk,mysql.connector as con class a(tk.Frame): def info1(self,p,c): tk.Frame.__init__(self,p) self.configure(bg="green") n=tk.Label(self,text="Database",font=("Arial",25,"bold"),bd=2,bg="cyan") n.place(x=530,y=0) item=tk.Label(self,te...
true
true
1c21a36f9705e6dc13de05444cdab0ca8e74090e
8,786
py
Python
blueprints/user_tasks.py
Wilidon/mpetsbot
14f3d7b81f0439fd3585a466fe68d327bdbfcd56
[ "MIT" ]
null
null
null
blueprints/user_tasks.py
Wilidon/mpetsbot
14f3d7b81f0439fd3585a466fe68d327bdbfcd56
[ "MIT" ]
null
null
null
blueprints/user_tasks.py
Wilidon/mpetsbot
14f3d7b81f0439fd3585a466fe68d327bdbfcd56
[ "MIT" ]
null
null
null
from datetime import datetime from vkwave.bots import ( DefaultRouter, SimpleBotEvent, simple_bot_message_handler, PayloadFilter, ) from sql import crud from utils import functions from keyboards.kb import menu, profile_kb from utils.constants import user_tasks_list, avatar_name, user_completed_tasks_...
42.650485
95
0.583656
from datetime import datetime from vkwave.bots import ( DefaultRouter, SimpleBotEvent, simple_bot_message_handler, PayloadFilter, ) from sql import crud from utils import functions from keyboards.kb import menu, profile_kb from utils.constants import user_tasks_list, avatar_name, user_completed_tasks_...
true
true
1c21a3c3d2e0b8781bb69ca75cc08156ee1d4c22
23,482
py
Python
tethysext/atcore/tests/integrated_tests/controllers/resource_workflows/results_views/plot_workflow_results_view_tests.py
Aquaveo/tethysext-atcore
7a83ccea24fdbbe806f12154f938554dd6c8015f
[ "BSD-3-Clause" ]
3
2020-11-05T23:50:47.000Z
2021-02-26T21:43:29.000Z
tethysext/atcore/tests/integrated_tests/controllers/resource_workflows/results_views/plot_workflow_results_view_tests.py
Aquaveo/tethysext-atcore
7a83ccea24fdbbe806f12154f938554dd6c8015f
[ "BSD-3-Clause" ]
7
2020-10-29T16:53:49.000Z
2021-05-07T19:46:47.000Z
tethysext/atcore/tests/integrated_tests/controllers/resource_workflows/results_views/plot_workflow_results_view_tests.py
Aquaveo/tethysext-atcore
7a83ccea24fdbbe806f12154f938554dd6c8015f
[ "BSD-3-Clause" ]
null
null
null
from unittest import mock import pandas as pd from tethysext.atcore.controllers.resource_workflows.results_views.plot_workflow_results_view import PlotWorkflowResultView # noqa: E501 from tethysext.atcore.tests.utilities.sqlalchemy_helpers import SqlAlchemyTestCase from tethysext.atcore.tests.utilities.sqlalchemy_help...
42.386282
155
0.650072
from unittest import mock import pandas as pd from tethysext.atcore.controllers.resource_workflows.results_views.plot_workflow_results_view import PlotWorkflowResultView from tethysext.atcore.tests.utilities.sqlalchemy_helpers import SqlAlchemyTestCase from tethysext.atcore.tests.utilities.sqlalchemy_helpers import s...
true
true
1c21a44abb655594e6de47e90ab2af3cf8815c9c
4,055
py
Python
habitat_baselines/slambased/mappers.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
1
2020-03-04T12:28:31.000Z
2020-03-04T12:28:31.000Z
habitat_baselines/slambased/mappers.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
null
null
null
habitat_baselines/slambased/mappers.py
oawiles/habitat-api
b6a08dac1b9e92e6ad0d66d75cf9cee0ee1ebaef
[ "MIT" ]
1
2019-06-10T14:44:40.000Z
2019-06-10T14:44:40.000Z
import numpy as np import torch import torch.nn as nn from habitat_baselines.slambased.reprojection import ( get_map_size_in_cells, project2d_pcl_into_worldmap, reproject_local_to_global, ) def depth2local3d(depth, fx, fy, cx, cy): r"""Projects depth map to 3d point cloud with origin in the camer...
33.237705
114
0.598767
import numpy as np import torch import torch.nn as nn from habitat_baselines.slambased.reprojection import ( get_map_size_in_cells, project2d_pcl_into_worldmap, reproject_local_to_global, ) def depth2local3d(depth, fx, fy, cx, cy): device = depth.device h, w = depth.squeeze().size() x = torch...
true
true
1c21a599a0cc986268b715d6e7ee1e25142e2219
487
py
Python
materials/migrations/0113_auto_20220428_0940.py
HybriD3-database/matd3
a4610e926f7f43dcd10f8580490ae478a98efcdf
[ "BSD-2-Clause" ]
1
2019-09-13T19:58:05.000Z
2019-09-13T19:58:05.000Z
materials/migrations/0113_auto_20220428_0940.py
HybriD3-database/matd3
a4610e926f7f43dcd10f8580490ae478a98efcdf
[ "BSD-2-Clause" ]
null
null
null
materials/migrations/0113_auto_20220428_0940.py
HybriD3-database/matd3
a4610e926f7f43dcd10f8580490ae478a98efcdf
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 3.1.14 on 2022-04-28 13:40 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('materials', '0112_note'), ] operations = [ migrations.AlterField( model_name='dataset', ...
24.35
128
0.640657
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('materials', '0112_note'), ] operations = [ migrations.AlterField( model_name='dataset', name='system', field=models.Fo...
true
true
1c21a6d74d92c0f7b1fcef8475bf78400c82ff37
671
py
Python
corehq/messaging/smsbackends/telerivet/admin.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
corehq/messaging/smsbackends/telerivet/admin.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
corehq/messaging/smsbackends/telerivet/admin.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
from __future__ import absolute_import from __future__ import unicode_literals from django.contrib import admin from corehq.messaging.smsbackends.telerivet.models import IncomingRequest class IncomingRequestAdmin(admin.ModelAdmin): list_display = [ 'event', 'message_id', 'message_type', ...
21.645161
73
0.645306
from __future__ import absolute_import from __future__ import unicode_literals from django.contrib import admin from corehq.messaging.smsbackends.telerivet.models import IncomingRequest class IncomingRequestAdmin(admin.ModelAdmin): list_display = [ 'event', 'message_id', 'message_type', ...
true
true
1c21a705e5da80949bf851b0dc04d6780d81ee76
897
py
Python
deepclaw/dcp/utils/VISPEstimator.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
5
2020-06-24T03:47:00.000Z
2021-10-13T03:35:38.000Z
deepclaw/dcp/utils/VISPEstimator.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
null
null
null
deepclaw/dcp/utils/VISPEstimator.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
3
2020-06-18T09:25:39.000Z
2021-04-18T03:51:08.000Z
# -*- encoding: utf-8 -*- ''' @File : VISPEstimator.py @Time : 2020/05/19 09:44:49 @Author : Haokun Wang @Version : 1.0 @Contact : wanghk@mail.sustech.edu.cn @License : (C)Copyright 2020 @Desc : None ''' import os import cv2 import numpy as np from .Detector import AprilTagDetector class VI...
26.382353
73
0.683389
import os import cv2 import numpy as np from .Detector import AprilTagDetector class VISPEstimator(object): def __init__(self, length=0.02): self.detector = AprilTagDetector(length, 1.0) def loadYAML(self, path: str): self.detector.LoadCameraParametersYAML(path) def saveYAML(self,...
true
true
1c21a8362b04896b466ca075066a10350927295f
97,330
py
Python
gym_minigrid/envs/multi_hiprlgrid_short_pose.py
Wonseok-Oh/gym_hiprlgrid
7a67ef8f3f6cf50062be76e909bfc6ac6de568c9
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/multi_hiprlgrid_short_pose.py
Wonseok-Oh/gym_hiprlgrid
7a67ef8f3f6cf50062be76e909bfc6ac6de568c9
[ "Apache-2.0" ]
null
null
null
gym_minigrid/envs/multi_hiprlgrid_short_pose.py
Wonseok-Oh/gym_hiprlgrid
7a67ef8f3f6cf50062be76e909bfc6ac6de568c9
[ "Apache-2.0" ]
null
null
null
from gym_minigrid.minigrid import * from gym_minigrid.register import register from gym_minigrid.envs.empty import EmptyEnv import numpy as np from SpatialMap import SpatialMap, ObjectMap, BinaryMap, BinaryMap_MLP, ObjectMap_MLP import rospy from std_srvs.srv import Empty from rosplan_dispatch_msgs.srv import DispatchS...
48.183168
185
0.579205
from gym_minigrid.minigrid import * from gym_minigrid.register import register from gym_minigrid.envs.empty import EmptyEnv import numpy as np from SpatialMap import SpatialMap, ObjectMap, BinaryMap, BinaryMap_MLP, ObjectMap_MLP import rospy from std_srvs.srv import Empty from rosplan_dispatch_msgs.srv import DispatchS...
true
true
1c21a8cd6c8e8a01e2d81063d2059168e7265a36
3,747
py
Python
chapter_8/figure_8.3/Dyna_Q_agent.py
Raymundo1/Reinforcement_Learning_An_Introduction
f65e885c699c66e0eda80e54265cbd40953dab32
[ "MIT" ]
null
null
null
chapter_8/figure_8.3/Dyna_Q_agent.py
Raymundo1/Reinforcement_Learning_An_Introduction
f65e885c699c66e0eda80e54265cbd40953dab32
[ "MIT" ]
null
null
null
chapter_8/figure_8.3/Dyna_Q_agent.py
Raymundo1/Reinforcement_Learning_An_Introduction
f65e885c699c66e0eda80e54265cbd40953dab32
[ "MIT" ]
null
null
null
""" Author: Xinlei Chen Dyna-Q agent [4 actions] """ import numpy as np num_actions = 4 last_action = None last_state = None # this rand seed for model choice rand = np.random.RandomState(0) # Basic arguments epsilon = 0.1 alpha = 0.1 gamma = 0.95 # number of model update times [default] n = 50 # value functio...
21.289773
132
0.656792
""" Author: Xinlei Chen Dyna-Q agent [4 actions] """ import numpy as np num_actions = 4 last_action = None last_state = None rand = np.random.RandomState(0) epsilon = 0.1 alpha = 0.1 gamma = 0.95 n = 50 Q = None Model = None def agent_init(): global last_action, last_state, Q, Model last_state = np.a...
false
true
1c21a9cdfb480ac1d8419c543e02797bc1a91505
1,305
py
Python
thonny/plugins/backend/birdseye_backend.py
aroberge/thonny
919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28
[ "MIT" ]
null
null
null
thonny/plugins/backend/birdseye_backend.py
aroberge/thonny
919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28
[ "MIT" ]
null
null
null
thonny/plugins/backend/birdseye_backend.py
aroberge/thonny
919769139c9cbfdfa2b78f6a6f0a3d9ecee56e28
[ "MIT" ]
null
null
null
import os from thonny.backend import get_vm, Executor, prepare_hooks, return_execution_result import webbrowser def _cmd_Birdseye(cmd): vm = get_vm() vm.switch_env_to_script_mode(cmd) return vm._execute_file(cmd, BirdsEyeRunner) class BirdsEyeRunner(Executor): @return_execution_result @prepare_h...
31.071429
88
0.688123
import os from thonny.backend import get_vm, Executor, prepare_hooks, return_execution_result import webbrowser def _cmd_Birdseye(cmd): vm = get_vm() vm.switch_env_to_script_mode(cmd) return vm._execute_file(cmd, BirdsEyeRunner) class BirdsEyeRunner(Executor): @return_execution_result @prepare_h...
true
true
1c21a9d1eef8dd5429185b87f8d87816688f860e
335
py
Python
text-processing/1_reverse_strings.py
Minkov/python-fundamentals-sept-2019
4a68eb20e8663ccdea377f3b6f0ab3bff2717797
[ "MIT" ]
3
2019-10-18T09:28:24.000Z
2020-01-18T14:45:50.000Z
text-processing/1_reverse_strings.py
Minkov/python-fundamentals-sept-2019
4a68eb20e8663ccdea377f3b6f0ab3bff2717797
[ "MIT" ]
null
null
null
text-processing/1_reverse_strings.py
Minkov/python-fundamentals-sept-2019
4a68eb20e8663ccdea377f3b6f0ab3bff2717797
[ "MIT" ]
null
null
null
def read_until_command(end_command): lines = [] while True: line = input() if line == end_command: break lines.append(line) return lines def reverse_strings(lines): for line in lines: print(f'{line} - {line[::-1]}') reverse_strings(read_until_...
22.333333
42
0.570149
def read_until_command(end_command): lines = [] while True: line = input() if line == end_command: break lines.append(line) return lines def reverse_strings(lines): for line in lines: print(f'{line} - {line[::-1]}') reverse_strings(read_until_...
true
true
1c21aa37245f9b937788188f1971032f18aeaea9
497
py
Python
BMSS/models/model_functions/TestModel_Monod_Constitutive_Double.py
EngBioNUS/BMSS2
41163c61a4e0ef3c6430e5954d81a77832e49a9d
[ "Apache-2.0" ]
null
null
null
BMSS/models/model_functions/TestModel_Monod_Constitutive_Double.py
EngBioNUS/BMSS2
41163c61a4e0ef3c6430e5954d81a77832e49a9d
[ "Apache-2.0" ]
null
null
null
BMSS/models/model_functions/TestModel_Monod_Constitutive_Double.py
EngBioNUS/BMSS2
41163c61a4e0ef3c6430e5954d81a77832e49a9d
[ "Apache-2.0" ]
4
2020-08-24T13:35:55.000Z
2022-03-07T16:48:12.000Z
import numpy as np from numpy import log as ln from numpy import log10 as log from numpy import exp from numba import jit @jit(nopython=True) def model_TestModel_Monod_Constitutive_Double(y, t, params): x = y[0] s = y[1] mh = y[2] h = y[3] mu_max = params[0] Ks = params[1] Y = params[2] synm =...
18.407407
60
0.62173
import numpy as np from numpy import log as ln from numpy import log10 as log from numpy import exp from numba import jit @jit(nopython=True) def model_TestModel_Monod_Constitutive_Double(y, t, params): x = y[0] s = y[1] mh = y[2] h = y[3] mu_max = params[0] Ks = params[1] Y = params[2] synm =...
true
true
1c21aa68e37e5f30fc420c70aa50cf64a4160db1
18,232
py
Python
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/director.py
mikkowus/BESSPIN-Tool-Suite
e87e9abb1156a8627aacc3272f1925b034129146
[ "Apache-2.0" ]
null
null
null
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/director.py
mikkowus/BESSPIN-Tool-Suite
e87e9abb1156a8627aacc3272f1925b034129146
[ "Apache-2.0" ]
null
null
null
besspin/cyberPhys/cyberphyslib/cyberphyslib/demonstrator/director.py
mikkowus/BESSPIN-Tool-Suite
e87e9abb1156a8627aacc3272f1925b034129146
[ "Apache-2.0" ]
null
null
null
""" Project: SSITH CyberPhysical Demonstrator director.py Author: Ethan Lew <elew@galois.com> Date: 04/05/2021 Python 3.8.3 O/S: Windows 10 Interface to manage ignition components """ import cyberphyslib.demonstrator.can as ccan import cyberphyslib.demonstrator.simulator as simulator import cyberphyslib.demonstrator.s...
43.101655
127
0.63224
import cyberphyslib.demonstrator.can as ccan import cyberphyslib.demonstrator.simulator as simulator import cyberphyslib.demonstrator.speedometer as speedo import cyberphyslib.demonstrator.leds_manage as ledm import cyberphyslib.demonstrator.infotainment as infotain import cyberphyslib.demonstrator.can_out as ccout imp...
true
true
1c21acddaf78b7c28f65eec46450d340d05c2cf6
1,309
py
Python
covid/covidtracking.py
aleccrowell/covid
1ee264d64ac81cf1f8a2bbcf24832541e1b7574d
[ "MIT" ]
null
null
null
covid/covidtracking.py
aleccrowell/covid
1ee264d64ac81cf1f8a2bbcf24832541e1b7574d
[ "MIT" ]
null
null
null
covid/covidtracking.py
aleccrowell/covid
1ee264d64ac81cf1f8a2bbcf24832541e1b7574d
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd import itertools import cachetools.func import requests import io @cachetools.func.ttl_cache(ttl=3600) def load_us(): s=requests.get('https://covidtracking.com/api/states/daily.csv',verify=False).content df = pd.read_csv(io.StringIO(s.decode('utf-8'))) df.date = pd.t...
29.75
89
0.666921
import numpy as np import pandas as pd import itertools import cachetools.func import requests import io @cachetools.func.ttl_cache(ttl=3600) def load_us(): s=requests.get('https://covidtracking.com/api/states/daily.csv',verify=False).content df = pd.read_csv(io.StringIO(s.decode('utf-8'))) df.date = pd.t...
true
true
1c21ad645ca15a8dc1b4b03470057475fc9712cd
5,851
py
Python
plugins/twitch.py
Jeglerjeg/pcbot
3cf1f6c7bce71600ca4078ff9539f1586250c044
[ "MIT" ]
null
null
null
plugins/twitch.py
Jeglerjeg/pcbot
3cf1f6c7bce71600ca4078ff9539f1586250c044
[ "MIT" ]
null
null
null
plugins/twitch.py
Jeglerjeg/pcbot
3cf1f6c7bce71600ca4078ff9539f1586250c044
[ "MIT" ]
null
null
null
""" Twitch plugin for twitch notifications. More to come? Commands: twitch """ import logging from datetime import datetime, timedelta import discord import twitchio.models import bot import plugins from pcbot import utils, Config from plugins.twitchlib import twitch client = plugins.client # type: bot.Clien...
36.117284
117
0.690138
import logging from datetime import datetime, timedelta import discord import twitchio.models import bot import plugins from pcbot import utils, Config from plugins.twitchlib import twitch client = plugins.client twitch_config = Config("twitch-config", data=dict(guilds={})) stream_history = {} repeat_notifica...
true
true
1c21ae91750389fde1292abd8d48be12900c4c25
2,875
py
Python
basecaller-modules/lr_scheduler2.py
monikaheinzl/basecalling-Hopfield
2993231e539ba9ccc2ea811122419c0e92d6f2cc
[ "BSD-2-Clause" ]
null
null
null
basecaller-modules/lr_scheduler2.py
monikaheinzl/basecalling-Hopfield
2993231e539ba9ccc2ea811122419c0e92d6f2cc
[ "BSD-2-Clause" ]
null
null
null
basecaller-modules/lr_scheduler2.py
monikaheinzl/basecalling-Hopfield
2993231e539ba9ccc2ea811122419c0e92d6f2cc
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python """ BSD 2-Clause License Copyright (c) 2021 (monika.heinzl@edumail.at) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copy...
33.045977
78
0.739478
import numpy as np import os import sys import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import torchvision import pickle import random import time import matplotlib.pyplot as plt import matplotlib.ticker as ticker from matplotlib.backends.backend_pdf import PdfP...
true
true
1c21aeb0d8a5b4aa0b80d78ad8e417d1b1efa164
1,242
py
Python
kNNClassification.py
lcreyes/PULearningSelfTutorial
a9a34da83033ca5205871a9c4e2fda4db650d4ef
[ "MIT" ]
null
null
null
kNNClassification.py
lcreyes/PULearningSelfTutorial
a9a34da83033ca5205871a9c4e2fda4db650d4ef
[ "MIT" ]
null
null
null
kNNClassification.py
lcreyes/PULearningSelfTutorial
a9a34da83033ca5205871a9c4e2fda4db650d4ef
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from sklearn import neighbors from matplotlib.colors import ListedColormap #define constants n_l = 500 #number of labeled positive points n_p = 500 #number of positive points n_n = 1000 # number of negative points #define Gaussians mean and covariance matrices mean...
24.352941
75
0.704509
import numpy as np import matplotlib.pyplot as plt from sklearn import neighbors from matplotlib.colors import ListedColormap n_l = 500 n_p = 500 n_n = 1000 mean1 = [0,0] mean2 = [4,3] cov1 = [[1, 0.5], [0.5, 1]] cov2 = [[1, -0.5], [-0.5, 1]] positive = np.transpose(np.random.multivariate_normal(mean1,cov1...
true
true
1c21aed4da420f1cf20e6a2f20030d0b3cd22258
2,493
py
Python
MyMariadb_api.py
251871553/ansible_api
f37f76907a5ca3913c85196ede656e3fa65589d1
[ "Apache-2.0" ]
null
null
null
MyMariadb_api.py
251871553/ansible_api
f37f76907a5ca3913c85196ede656e3fa65589d1
[ "Apache-2.0" ]
null
null
null
MyMariadb_api.py
251871553/ansible_api
f37f76907a5ca3913c85196ede656e3fa65589d1
[ "Apache-2.0" ]
null
null
null
import pymysql class Mariadb_api(object): def __init__(self): try: self.conn = pymysql.connect(host='192.168.3.131', user='root', passwd='', db='cmdb', port=3306, charset="utf8") except pymysql.Error as e: print("Mysql Error %d: %s" % (e.args[0], e.args[1])) def select...
29.329412
123
0.535901
import pymysql class Mariadb_api(object): def __init__(self): try: self.conn = pymysql.connect(host='192.168.3.131', user='root', passwd='', db='cmdb', port=3306, charset="utf8") except pymysql.Error as e: print("Mysql Error %d: %s" % (e.args[0], e.args[1])) def select...
true
true
1c21af54707d35f0961da7956f74be24bbe2af32
3,095
py
Python
src/detect_and_predict_mask.py
dipesg/Face-Mask-Detector
81ef0f52752f8f1034a35c932289fe62a6787a93
[ "MIT" ]
null
null
null
src/detect_and_predict_mask.py
dipesg/Face-Mask-Detector
81ef0f52752f8f1034a35c932289fe62a6787a93
[ "MIT" ]
null
null
null
src/detect_and_predict_mask.py
dipesg/Face-Mask-Detector
81ef0f52752f8f1034a35c932289fe62a6787a93
[ "MIT" ]
null
null
null
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessing.image import img_to_array import numpy as np import cv2 from src import logger class Mask: def __init__(self): self.log_writer = logger.App_Logger() self.file_object = open("../logs/Detect_an...
40.723684
79
0.578029
from tensorflow.keras.applications.mobilenet_v2 import preprocess_input from tensorflow.keras.preprocessing.image import img_to_array import numpy as np import cv2 from src import logger class Mask: def __init__(self): self.log_writer = logger.App_Logger() self.file_object = open("../logs/Detect_an...
true
true
1c21af5500d04fd35cc2c8a23bd8a01d0cad461e
6,674
py
Python
nxnewick.py
zegheim/sonLib
1d8a2a959c034cd3fa42ddcaaac053f83185531e
[ "MIT" ]
null
null
null
nxnewick.py
zegheim/sonLib
1d8a2a959c034cd3fa42ddcaaac053f83185531e
[ "MIT" ]
null
null
null
nxnewick.py
zegheim/sonLib
1d8a2a959c034cd3fa42ddcaaac053f83185531e
[ "MIT" ]
null
null
null
#!/usr/bin/env python #Copyright (C) 2006-2012 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt #!/usr/bin/env python """read and write newick trees to and from networkx graphs (as wrapped by nxtree). """ import sys import os import re import math import random from string import whitespace as ws f...
32.876847
85
0.550944
import sys import os import re import math import random from string import whitespace as ws from sonLib.misc import close from . import bioio import networkx as NX from optparse import OptionParser from sonLib.nxtree import NXTree class NXNewick(object): def __init__(self, nxTree = None): self.nxT...
true
true
1c21b01ce34d30c5e9d6a9fef9b5f6c9609b9513
1,812
py
Python
mumol/mumol.py
stevenshave/MuMol
c68443836f65bc476967fa60c728b599460fd49d
[ "MIT" ]
1
2022-01-11T13:16:42.000Z
2022-01-11T13:16:42.000Z
mumol/mumol.py
stevenshave/MuMol
c68443836f65bc476967fa60c728b599460fd49d
[ "MIT" ]
null
null
null
mumol/mumol.py
stevenshave/MuMol
c68443836f65bc476967fa60c728b599460fd49d
[ "MIT" ]
null
null
null
import struct import zlib atom_type_dict={"H":0, "C":1, "N":2 ,"O":3, "S":4, "F":5, "Cl":6, "Br":7, "I":8, "B":9, "P":10, "Si":11} #Title length (max 255) chars #Title chars of length "title length" #UnsignedCharNumAtoms #UnsignedCharNumBonds #Floats, (x,y,z)*numatoms #unsigned chars bond_from,bond_to,bond_order def sd...
34.846154
104
0.647903
import struct import zlib atom_type_dict={"H":0, "C":1, "N":2 ,"O":3, "S":4, "F":5, "Cl":6, "Br":7, "I":8, "B":9, "P":10, "Si":11} def sdf_text_to_bytes(sdf_text:str, compress:bool=False): fmt="B" sdf_lines=sdf_text.splitlines() title=sdf_lines[0] fmt+=str(len(title))+"s" num_atoms=int(sdf_lin...
true
true
1c21b1398e3fa6cfb76d75a4902c94a23f3daaea
12,297
py
Python
rpython/memory/gctransform/refcounting.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
34
2015-07-09T04:53:27.000Z
2021-07-19T05:22:27.000Z
rpython/memory/gctransform/refcounting.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
6
2015-05-30T17:20:45.000Z
2017-06-12T14:29:23.000Z
rpython/memory/gctransform/refcounting.py
jptomo/pypy-lang-scheme
55edb2cec69d78f86793282a4566fcbc1ef9fcac
[ "MIT" ]
11
2015-09-07T14:26:08.000Z
2020-04-10T07:20:41.000Z
from rpython.memory.gctransform.transform import GCTransformer, mallocHelpers from rpython.memory.gctransform.support import find_gc_ptrs_in_type, \ get_rtti, _static_deallocator_body_for_type, LLTransformerOp, ll_call_destructor from rpython.rtyper.lltypesystem import lltype, llmemory from rpython.rtyper.lltypesy...
42.697917
97
0.626006
from rpython.memory.gctransform.transform import GCTransformer, mallocHelpers from rpython.memory.gctransform.support import find_gc_ptrs_in_type, \ get_rtti, _static_deallocator_body_for_type, LLTransformerOp, ll_call_destructor from rpython.rtyper.lltypesystem import lltype, llmemory from rpython.rtyper.lltypesy...
false
true
1c21b1a1b4d462d29e7c0de21c07d3fe7f79fb92
757
py
Python
aggregator/__init__.py
wikimedia/analytics-aggregator
e07c0dc2d3102a591e5e968a7e4c49499770fe39
[ "Apache-2.0" ]
1
2018-01-09T07:49:21.000Z
2018-01-09T07:49:21.000Z
aggregator/__init__.py
wikimedia/analytics-aggregator
e07c0dc2d3102a591e5e968a7e4c49499770fe39
[ "Apache-2.0" ]
null
null
null
aggregator/__init__.py
wikimedia/analytics-aggregator
e07c0dc2d3102a591e5e968a7e4c49499770fe39
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 #...
27.035714
74
0.72391
from .projectcounts import * from .util import * __version__ = '0.1'
true
true
1c21b1cfcc37110e45cf5e38f507ec22a33cb746
6,269
py
Python
venv/Lib/site-packages/tensorflow/contrib/seq2seq/ops/gen_beam_search_ops.py
golam-shovon/Targated_Advertising
903b42ec04c98e10fcacd126eb8ba52720ac3cc5
[ "BSD-4-Clause-UC" ]
1
2019-04-11T13:23:09.000Z
2019-04-11T13:23:09.000Z
Lib/site-packages/tensorflow/contrib/seq2seq/ops/gen_beam_search_ops.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/tensorflow/contrib/seq2seq/ops/gen_beam_search_ops.py
caiyongji/Anaconda-py36.5-tensorflow-built-env
f4eb40b5ca3f49dfc929ff3ad2b4bb877e9663e2
[ "PSF-2.0" ]
null
null
null
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _c...
37.538922
248
0.711278
import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from tensorflow.python.eager import core as _core from tensorflow.python.eager import execute as _execute from tensorflow.python.framework...
true
true
1c21b217e2c71095b6a3e196c7aabb797fa57dae
8,020
py
Python
IPython/core/logger.py
damianavila/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
2
2020-11-30T14:04:30.000Z
2021-11-08T11:29:05.000Z
IPython/core/logger.py
RuSHi2381/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/logger.py
RuSHi2381/ipython
4481c323e0d261685ad350fc6f437494b889ab12
[ "BSD-3-Clause-Clear" ]
1
2020-11-19T05:18:41.000Z
2020-11-19T05:18:41.000Z
"""Logger class for IPython's logging facilities. """ #***************************************************************************** # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> # # Distributed under the terms of the BSD License. ...
36.289593
83
0.558603
"""Logger class for IPython's logging facilities. """ #***************************************************************************** # Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and # Copyright (C) 2001-2006 Fernando Perez <fperez@colorado.edu> # # Distributed under the terms of the BSD License. ...
false
true
1c21b2da66bb11fb81c22ee2c3c26a4216598955
3,780
py
Python
horvord/example_keras.py
AlexRogalskiy/spark-ecosystem
ea4804ee04e5f108195b81e77e7444be632fb466
[ "Apache-2.0" ]
null
null
null
horvord/example_keras.py
AlexRogalskiy/spark-ecosystem
ea4804ee04e5f108195b81e77e7444be632fb466
[ "Apache-2.0" ]
1
2021-12-12T16:35:59.000Z
2021-12-12T16:36:11.000Z
horvord/example_keras.py
AlexRogalskiy/spark-ecosystem
ea4804ee04e5f108195b81e77e7444be632fb466
[ "Apache-2.0" ]
null
null
null
import os import shutil import uuid from distutils.version import LooseVersion import numpy as np import pyspark.sql.types as T from pyspark.ml.evaluation import MulticlassClassificationEvaluator from pyspark.ml.feature import OneHotEncoder from pyspark.sql.functions import udf import tensorflow as tf from tensorflo...
38.969072
175
0.751323
import os import shutil import uuid from distutils.version import LooseVersion import numpy as np import pyspark.sql.types as T from pyspark.ml.evaluation import MulticlassClassificationEvaluator from pyspark.ml.feature import OneHotEncoder from pyspark.sql.functions import udf import tensorflow as tf from tensorflo...
false
true
1c21b2eb506db72fb168827bd08f32b279d1e932
86
py
Python
app/db.py
arpitbbhayani/jesse
4fc11b0d93fb77d88fd5abb0d278ed4ef2277725
[ "MIT" ]
2
2015-10-28T10:41:19.000Z
2015-12-26T11:12:47.000Z
app/db.py
arpitbbhayani/jesse
4fc11b0d93fb77d88fd5abb0d278ed4ef2277725
[ "MIT" ]
null
null
null
app/db.py
arpitbbhayani/jesse
4fc11b0d93fb77d88fd5abb0d278ed4ef2277725
[ "MIT" ]
null
null
null
from app import app from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy(app)
17.2
43
0.802326
from app import app from flask.ext.sqlalchemy import SQLAlchemy db = SQLAlchemy(app)
true
true
1c21b32bef64d8cf377847342714e3d664d65310
2,945
py
Python
src/DQN.py
viktorvesely/Agent01
b5a16e68dd97e8a75db7699af336650f5a863138
[ "MIT" ]
null
null
null
src/DQN.py
viktorvesely/Agent01
b5a16e68dd97e8a75db7699af336650f5a863138
[ "MIT" ]
null
null
null
src/DQN.py
viktorvesely/Agent01
b5a16e68dd97e8a75db7699af336650f5a863138
[ "MIT" ]
null
null
null
import model as md import numpy as np import tensorflow as tf class DQN: def __init__(self, num_states, num_actions, hidden_units, gamma, max_experiences, min_experiences, batch_size ): self.num_actions = num_actions self.batch_size = batch_size self.optimize...
38.75
92
0.62343
import model as md import numpy as np import tensorflow as tf class DQN: def __init__(self, num_states, num_actions, hidden_units, gamma, max_experiences, min_experiences, batch_size ): self.num_actions = num_actions self.batch_size = batch_size self.optimize...
true
true
1c21b35a04fc73154ba03ad866c50f5aa6768fa0
23,680
py
Python
scripts/master/factory/dart/dart_factory.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/master/factory/dart/dart_factory.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/master/factory/dart/dart_factory.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
1
2020-07-22T09:16:32.000Z
2020-07-22T09:16:32.000Z
#!/usr/bin/python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility class to generate a Dart-specific BuildFactory. Based on gclient_factory.py. """ import random from buildbot.changes import g...
38.947368
80
0.635895
import random from buildbot.changes import gitpoller from buildbot.process.buildstep import RemoteShellCommand from buildbot.status.mail import MailNotifier from buildbot.steps import trigger from master.factory.dart import dart_commands from master.factory.dart.channels import CHANNELS, CHANNELS_BY_NAME from m...
true
true
1c21b3a3b28ddddecb3eefb2a105cee0257525ca
1,211
py
Python
fobi_custom/plugins/form_elements/fields/metadata/time_stop/forms.py
jeancochrane/just-spaces
f7e8f710c3ab2db5f8a87a533547c5176a2d1e83
[ "MIT" ]
null
null
null
fobi_custom/plugins/form_elements/fields/metadata/time_stop/forms.py
jeancochrane/just-spaces
f7e8f710c3ab2db5f8a87a533547c5176a2d1e83
[ "MIT" ]
null
null
null
fobi_custom/plugins/form_elements/fields/metadata/time_stop/forms.py
jeancochrane/just-spaces
f7e8f710c3ab2db5f8a87a533547c5176a2d1e83
[ "MIT" ]
null
null
null
from django import forms from django.utils.translation import ugettext_lazy as _ from fobi.base import BaseFormFieldPluginForm, get_theme theme = get_theme(request=None, as_instance=True) class TimeStopForm(forms.Form, BaseFormFieldPluginForm): """TimeStopForm.""" plugin_data_fields = [ ("label", "...
34.6
79
0.547481
from django import forms from django.utils.translation import ugettext_lazy as _ from fobi.base import BaseFormFieldPluginForm, get_theme theme = get_theme(request=None, as_instance=True) class TimeStopForm(forms.Form, BaseFormFieldPluginForm): plugin_data_fields = [ ("label", "What is the stop time of...
true
true
1c21b449b935b161d209c4ab7c2fe76ea175ddfc
704
py
Python
rossmann_toolbox/utils/bio_params.py
jludwiczak/rossmann-toolbox
b3d38983f4d52eed970af2a6153697a0f26bcde4
[ "MIT" ]
null
null
null
rossmann_toolbox/utils/bio_params.py
jludwiczak/rossmann-toolbox
b3d38983f4d52eed970af2a6153697a0f26bcde4
[ "MIT" ]
null
null
null
rossmann_toolbox/utils/bio_params.py
jludwiczak/rossmann-toolbox
b3d38983f4d52eed970af2a6153697a0f26bcde4
[ "MIT" ]
null
null
null
''' storage for dictionaris and other variable that may cause potential problems ''' LABEL_DICT = {'NAD' : 0, 'NADP' : 1, 'SAM' : 2, 'FAD' : 3} LABEL_DICT_R = {0 :'NAD', 1 :'NADP', 2 :'SAM', 3:'FAD' } SS_MAP_EXT = { 'H' : 0, 'H2' : 0, 'B' : 1, 'G' : 2, 'I' : 3, 'T' : 4, 'S' : 5, '-'...
19.027027
67
0.534091
LABEL_DICT = {'NAD' : 0, 'NADP' : 1, 'SAM' : 2, 'FAD' : 3} LABEL_DICT_R = {0 :'NAD', 1 :'NADP', 2 :'SAM', 3:'FAD' } SS_MAP_EXT = { 'H' : 0, 'H2' : 0, 'B' : 1, 'G' : 2, 'I' : 3, 'T' : 4, 'S' : 5, '-' : 6, 'C' : 6, ' ' : 6, 'E1' : 7, 'E2' : 8, '?' : 6, 'H1' : 9,...
true
true
1c21b4620cbc7bed0b7a6f433f12a82c9b7f952e
785
py
Python
examples/demo/carts/listeners.py
bartels/satchless
4d333014333dc4fd5815f9e0bbea565959919a30
[ "BSD-4-Clause" ]
1
2015-11-05T10:26:46.000Z
2015-11-05T10:26:46.000Z
examples/demo/carts/listeners.py
bartels/satchless
4d333014333dc4fd5815f9e0bbea565959919a30
[ "BSD-4-Clause" ]
null
null
null
examples/demo/carts/listeners.py
bartels/satchless
4d333014333dc4fd5815f9e0bbea565959919a30
[ "BSD-4-Clause" ]
null
null
null
from django.contrib import messages from django.utils.translation import ugettext from satchless.cart import signals def add_to_cart_listener(sender, instance, request, result, **kwargs): real_variant = instance.variant.get_subtype_instance() if result.quantity_delta > 0: if instance.cart.typ == 'satc...
41.315789
92
0.640764
from django.contrib import messages from django.utils.translation import ugettext from satchless.cart import signals def add_to_cart_listener(sender, instance, request, result, **kwargs): real_variant = instance.variant.get_subtype_instance() if result.quantity_delta > 0: if instance.cart.typ == 'satc...
true
true
1c21b47040a5b56c394cbd41a3f15df30eccc00c
9,268
py
Python
netket/operator/_local_operator_helpers.py
pascal-vecsei/netket
3985355234183e3f5a5a97d542a6240d490dcda2
[ "Apache-2.0" ]
null
null
null
netket/operator/_local_operator_helpers.py
pascal-vecsei/netket
3985355234183e3f5a5a97d542a6240d490dcda2
[ "Apache-2.0" ]
null
null
null
netket/operator/_local_operator_helpers.py
pascal-vecsei/netket
3985355234183e3f5a5a97d542a6240d490dcda2
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 The NetKet Authors - All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
35.239544
86
0.663466
from typing import Tuple, Union import functools import numbers import numpy as np from scipy.sparse import spmatrix from netket.hilbert import AbstractHilbert, Fock from netket.utils.types import DType, Array from ._abstract_operator import AbstractOperator from ._discrete_operator import DiscreteOp...
true
true
1c21b498e5ea911eac04119716684f8df3f58888
14,121
py
Python
training/test/test_train.py
chenw23/open_lth
2ce732fe48abd5a80c10a153c45d397b048e980c
[ "MIT" ]
509
2020-05-07T16:45:46.000Z
2022-03-28T13:41:36.000Z
training/test/test_train.py
chenw23/open_lth
2ce732fe48abd5a80c10a153c45d397b048e980c
[ "MIT" ]
12
2020-06-10T10:07:09.000Z
2022-02-03T01:57:32.000Z
training/test/test_train.py
chenw23/open_lth
2ce732fe48abd5a80c10a153c45d397b048e980c
[ "MIT" ]
103
2020-05-07T21:40:06.000Z
2022-03-11T19:07:55.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import numpy as np import datasets.registry from foundations.step import Step import models.registry from training import train from testing i...
43.718266
89
0.636145
import numpy as np import datasets.registry from foundations.step import Step import models.registry from training import train from testing import test_case class TestTrain(test_case.TestCase): def setUp(self): super(TestTrain, self).setUp() self.hparams = models.registry.get_default_hparam...
true
true
1c21b570ee024d3126626a4cc2a86b2c5fb46b22
9,421
py
Python
helper_test.py
benharold/hardforkhelp
5300f68847a56451a7272dc345e3c9a3109170c7
[ "MIT" ]
null
null
null
helper_test.py
benharold/hardforkhelp
5300f68847a56451a7272dc345e3c9a3109170c7
[ "MIT" ]
null
null
null
helper_test.py
benharold/hardforkhelp
5300f68847a56451a7272dc345e3c9a3109170c7
[ "MIT" ]
null
null
null
from binascii import unhexlify from io import BytesIO from unittest import TestCase from helper import ( decode_base58, encode_base58_checksum, encode_varint, flip_endian, little_endian_to_int, int_to_little_endian, h160_to_p2pkh_address, h160_to_p2sh_address, merkle_parent, mer...
48.813472
96
0.735591
from binascii import unhexlify from io import BytesIO from unittest import TestCase from helper import ( decode_base58, encode_base58_checksum, encode_varint, flip_endian, little_endian_to_int, int_to_little_endian, h160_to_p2pkh_address, h160_to_p2sh_address, merkle_parent, mer...
true
true
1c21b58098330652b92df789e5ac0474f1414644
9,162
py
Python
tests/app/v2_statistics_token_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
6
2021-06-16T02:06:21.000Z
2021-09-20T09:50:56.000Z
tests/app/v2_statistics_token_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
68
2021-04-06T03:44:54.000Z
2022-03-29T02:00:02.000Z
tests/app/v2_statistics_token_test.py
BoostryJP/ibet-Wallet-API
da7323a298bdb746e93da8a9b57a5da1dd6f14ac
[ "Apache-2.0" ]
null
null
null
""" Copyright BOOSTRY Co., Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distr...
33.437956
107
0.613512
from typing import Optional from eth_utils import to_checksum_address from app.model.db import ( IDXPosition, Listing ) from tests.account_config import eth_account from tests.contract_modules import issue_coupon_token class TestV2StatisticsToken: apiurl_base = "/v2/Statistics/Token/" @stat...
true
true
1c21b66ed67a681f250a9fc88bd561c3a0e1a108
291
py
Python
ServerPython/protocol/dump.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
ServerPython/protocol/dump.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
ServerPython/protocol/dump.py
zzragida/PythonExamples
ed94ae2773a580a42e158ebdc7321a89ca4e991b
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import gateway_pb2 import common_pb2 import logging logger = logging.getLogger('M3ARPG') logger.setLevel(logging.DEBUG) def dump_request(request): logger.debug("request: \n%s" % request) def dump_response(response): logger.debug("response: \n%s" % response)
17.117647
43
0.728522
import gateway_pb2 import common_pb2 import logging logger = logging.getLogger('M3ARPG') logger.setLevel(logging.DEBUG) def dump_request(request): logger.debug("request: \n%s" % request) def dump_response(response): logger.debug("response: \n%s" % response)
true
true
1c21b786f741b211850172ba5616db3de9109c5a
16,134
py
Python
tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_graph_test.py
andres-fm/tensorflow-clone
bd9db7eb5dc589a620999800ba96a8182c6b624a
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_graph_test.py
andres-fm/tensorflow-clone
bd9db7eb5dc589a620999800ba96a8182c6b624a
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_graph_test.py
andres-fm/tensorflow-clone
bd9db7eb5dc589a620999800ba96a8182c6b624a
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
40.234414
80
0.658671
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf sg = tf.contrib.bayesflow.stochastic_graph sge = tf.contrib.bayesflow.stochastic_gradient_estimators distributions = tf.contrib.distributions class N...
true
true
1c21b7c52e058b8604ee21128a4206494c8da977
1,314
py
Python
pypowerlawnoise/pypowerlawnoise/tests/test_power_law_noise.py
sternarubra/powerlawnoise
4e03aae66a8379b4b755a39b9cf0df2c1b85c0d4
[ "MIT" ]
null
null
null
pypowerlawnoise/pypowerlawnoise/tests/test_power_law_noise.py
sternarubra/powerlawnoise
4e03aae66a8379b4b755a39b9cf0df2c1b85c0d4
[ "MIT" ]
null
null
null
pypowerlawnoise/pypowerlawnoise/tests/test_power_law_noise.py
sternarubra/powerlawnoise
4e03aae66a8379b4b755a39b9cf0df2c1b85c0d4
[ "MIT" ]
null
null
null
# Copyright (C) 2020 by Landmark Acoustics LLC import pytest import numpy as np from pypowerlawnoise import PowerLawNoise ALPHAS = [-2, -1, 0, 1, 2] COLOR_NAMES = ['red', 'pink', 'white', 'blue', 'violet'] N = 5 EQUIS = np.linspace(1, 0, N, dtype=float) def pytest_generate_tests(metafunc): if metafunc.cls is ...
29.863636
71
0.575342
import pytest import numpy as np from pypowerlawnoise import PowerLawNoise ALPHAS = [-2, -1, 0, 1, 2] COLOR_NAMES = ['red', 'pink', 'white', 'blue', 'violet'] N = 5 EQUIS = np.linspace(1, 0, N, dtype=float) def pytest_generate_tests(metafunc): if metafunc.cls is not None and 'Trivial' in metafunc.cls.__name_...
true
true
1c21b7d3d6db64363eb45f4259d8fb7211d80f75
4,583
py
Python
picodaqa/animHists.py
markomanninen/picoDAQ
a07be1c9018577b1b5671fd3a184148a4fac337b
[ "BSD-2-Clause" ]
null
null
null
picodaqa/animHists.py
markomanninen/picoDAQ
a07be1c9018577b1b5671fd3a184148a4fac337b
[ "BSD-2-Clause" ]
null
null
null
picodaqa/animHists.py
markomanninen/picoDAQ
a07be1c9018577b1b5671fd3a184148a4fac337b
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import time, numpy as np import matplotlib.pyplot as plt import itertools class animHists(object): ''' display histogram, as normalised frequen...
34.719697
87
0.591534
from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import time, numpy as np import matplotlib.pyplot as plt import itertools class animHists(object): def __init__(self, Hdescr, name='Histograms'): self.nHist = l...
true
true