hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
6982eb014cddfb256c18bfdc6bcd8c2bd2f4ff0d
284
py
Python
tests/test_init.py
toaomatis/greenchoice-variable-tariffs
4dad9374a84f13a68d867e84944c577e7104ca8b
[ "MIT" ]
2
2021-12-30T16:41:29.000Z
2022-01-03T13:04:44.000Z
tests/test_init.py
toaomatis/greenchoice-variable-tariffs
4dad9374a84f13a68d867e84944c577e7104ca8b
[ "MIT" ]
5
2021-12-29T14:07:28.000Z
2022-01-02T13:34:39.000Z
tests/test_init.py
toaomatis/greenchoice-variable-tariffs
4dad9374a84f13a68d867e84944c577e7104ca8b
[ "MIT" ]
null
null
null
"""Test component setup.""" from homeassistant.core import HomeAssistant from custom_components.greenchoice_variable_tariffs import async_setup async def test_async_setup(hass: HomeAssistant): """Test the component gets setup.""" assert await async_setup(hass, {}) is True
28.4
70
0.78169
f4e36c2dabcbb012720ba1acaccc21ad439344aa
71
py
Python
src/1sem/pow.py
freepvps/hsesamples
adbf35c1c94521d78fb75f72287512a37e49bdc8
[ "MIT" ]
2
2019-10-19T22:29:50.000Z
2019-10-19T22:29:52.000Z
src/1sem/pow.py
freepvps/hsesamples
adbf35c1c94521d78fb75f72287512a37e49bdc8
[ "MIT" ]
null
null
null
src/1sem/pow.py
freepvps/hsesamples
adbf35c1c94521d78fb75f72287512a37e49bdc8
[ "MIT" ]
null
null
null
a = float(input('value: ')) b = float(input('power: ')) print(a ** b)
14.2
27
0.549296
c993f152165c570f8cb0a4e6d87e27fbb10f2748
1,608
py
Python
uvicorn/protocols/utils.py
victoraugustolls/uvicorn
9cd575daca0d0d3d4e2208b2934eee809fc3299c
[ "BSD-3-Clause" ]
2
2020-02-20T15:15:59.000Z
2021-03-28T02:47:08.000Z
uvicorn/protocols/utils.py
victoraugustolls/uvicorn
9cd575daca0d0d3d4e2208b2934eee809fc3299c
[ "BSD-3-Clause" ]
9
2021-04-12T13:44:34.000Z
2021-04-13T16:50:08.000Z
env/lib/python3.9/site-packages/uvicorn/protocols/utils.py
simotwo/AbileneParadox-ddd
c85961efb37aba43c0d99ed1c36d083507e2b2d3
[ "MIT" ]
1
2020-12-29T04:28:49.000Z
2020-12-29T04:28:49.000Z
import urllib def get_remote_addr(transport): socket_info = transport.get_extra_info("socket") if socket_info is not None: try: info = socket_info.getpeername() return (str(info[0]), int(info[1])) if isinstance(info, tuple) else None except OSError: # This c...
30.339623
84
0.643657
83e966da7265badb242e64dcbf1e374e961ebd20
5,369
py
Python
napari/utils/theme.py
10XGenomics/napari
2c7ce0ecbf66185b6984b1b36ebaa38672ab450b
[ "BSD-3-Clause" ]
null
null
null
napari/utils/theme.py
10XGenomics/napari
2c7ce0ecbf66185b6984b1b36ebaa38672ab450b
[ "BSD-3-Clause" ]
null
null
null
napari/utils/theme.py
10XGenomics/napari
2c7ce0ecbf66185b6984b1b36ebaa38672ab450b
[ "BSD-3-Clause" ]
null
null
null
# syntax_style for the console must be one of the supported styles from # pygments - see here for examples https://help.farbox.com/pygments.html import re import warnings from ast import literal_eval try: from qtpy import QT_VERSION major, minor, *rest = QT_VERSION.split('.') use_gradients = (int(major) >...
29.179348
82
0.568449
8e97a27ed5493db015de8ae532e72ba660d6140a
1,589
py
Python
src3/binancedex/cli.py
unification-com/binancedex-leaderboard
1e06857093cef8fa27784bca8e28a356dda27db7
[ "MIT" ]
null
null
null
src3/binancedex/cli.py
unification-com/binancedex-leaderboard
1e06857093cef8fa27784bca8e28a356dda27db7
[ "MIT" ]
null
null
null
src3/binancedex/cli.py
unification-com/binancedex-leaderboard
1e06857093cef8fa27784bca8e28a356dda27db7
[ "MIT" ]
1
2019-07-02T09:47:00.000Z
2019-07-02T09:47:00.000Z
import logging import os from time import sleep, time import click from binancedex.api import get_trades from binancedex.models import Session, Trade from binancedex.stats import BASE_ASSET, render log = logging.getLogger(__name__) @click.group() def main(): logging.basicConfig(level=os.environ.get("LOGLEVEL",...
20.636364
66
0.614852
d44d4328cabfed2868ee2cd07502d3bbcd0c1b5e
7,354
py
Python
bikesanity/output_transformers/pdf_templates/base_pdf_template.py
JohnHenrySplitMyHeart/bikesanity
bf27f162017fdc919534e16ac12b940e1b873e93
[ "Apache-2.0" ]
4
2021-01-22T14:13:25.000Z
2021-05-04T16:59:35.000Z
bikesanity/output_transformers/pdf_templates/base_pdf_template.py
JohnHenrySplitMyHeart/bikesanity
bf27f162017fdc919534e16ac12b940e1b873e93
[ "Apache-2.0" ]
null
null
null
bikesanity/output_transformers/pdf_templates/base_pdf_template.py
JohnHenrySplitMyHeart/bikesanity
bf27f162017fdc919534e16ac12b940e1b873e93
[ "Apache-2.0" ]
null
null
null
import os import shutil from fpdf import FPDF from bikesanity.io_utils.resources import create_temp_from_resource class BasePdfTemplate(FPDF): DEJAVU_FONT = 'DejaVu' A4_WIDTH = 210 A4_HEIGHT = 297 MARGIN = 20 TOP_MARGIN = 10 PAGE_WIDTH = A4_WIDTH - (MARGIN*2) IMAGE_DPI = 200 MM_PER...
31.698276
160
0.575333
9152aa1296200d3213ad597ceca10904a367689b
3,087
py
Python
tests/integration/cloudformation/test_connection.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
1
2015-10-15T12:55:01.000Z
2015-10-15T12:55:01.000Z
tests/integration/cloudformation/test_connection.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
1
2021-04-30T21:19:53.000Z
2021-04-30T21:19:53.000Z
tests/integration/cloudformation/test_connection.py
adastreamer/boto
ce472cbbcffd06298fdd0c980d5bfcdcee875498
[ "MIT" ]
1
2020-07-25T22:31:28.000Z
2020-07-25T22:31:28.000Z
#!/usr/bin/env python import time import json from tests.unit import unittest from boto.cloudformation.connection import CloudFormationConnection BASIC_EC2_TEMPLATE = { "AWSTemplateFormatVersion": "2010-09-09", "Description": "AWS CloudFormation Sample Template EC2InstanceSample", "Parameters": { },...
27.810811
82
0.435374
516e4fe1ab14e43309bc43c2592ec12e9937772c
2,347
py
Python
src/simulator/services/persistent_state/persistent_state_view.py
ed741/PathBench
50fe138eb1f824f49fe1a862705e435a1c3ec3ae
[ "BSD-3-Clause" ]
46
2020-12-25T04:09:15.000Z
2022-03-25T12:32:42.000Z
src/simulator/services/persistent_state/persistent_state_view.py
ed741/PathBench
50fe138eb1f824f49fe1a862705e435a1c3ec3ae
[ "BSD-3-Clause" ]
36
2020-12-21T16:10:02.000Z
2022-01-03T01:42:01.000Z
src/simulator/services/persistent_state/persistent_state_view.py
judicaelclair/PathBenchURO
101e67674efdfa8e27e1cf7787dac9fdf99552fe
[ "BSD-3-Clause" ]
11
2021-01-06T23:34:12.000Z
2022-03-21T17:21:47.000Z
from structures import DynamicColour, Colour from simulator.services.event_manager.events.colour_update_event import ColourUpdateEvent from simulator.services.persistent_state.persistent_state_object import PersistentStateObject from simulator.services.persistent_state.persistent_state import PersistentState from utili...
39.116667
104
0.654879
907ae397f1a294417ce823957536e9d4a7f785cd
15,025
py
Python
aries_cloudagent/storage/tests/test_indy_storage.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-07-02T12:36:32.000Z
2020-07-02T12:36:32.000Z
aries_cloudagent/storage/tests/test_indy_storage.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-03-06T12:11:29.000Z
2020-03-06T12:11:29.000Z
aries_cloudagent/storage/tests/test_indy_storage.py
msembinelli/aries-cloudagent-python
a5a29dab30238f52dcfb6645aab115d01720a5c7
[ "Apache-2.0" ]
1
2020-08-07T08:03:17.000Z
2020-08-07T08:03:17.000Z
import json import pytest import os import indy.anoncreds import indy.crypto import indy.did import indy.wallet from asynctest import mock as async_mock from aries_cloudagent.wallet import indy as test_wallet from aries_cloudagent.wallet.indy import IndyWallet from aries_cloudagent.storage.error import StorageError,...
42.205056
151
0.519201
a4f58c6c79925b02838db6e27714fc9c2504b1ee
2,572
py
Python
old/examples/exchangeMethods/TempEx.py
radical-cybertools/radical.repex
6fea43716c1f3ee9c83211d31e7f85cbc677c0c6
[ "MIT" ]
3
2015-10-21T14:19:01.000Z
2017-07-11T22:51:58.000Z
old/examples/exchangeMethods/TempEx.py
radical-cybertools/radical.repex
6fea43716c1f3ee9c83211d31e7f85cbc677c0c6
[ "MIT" ]
77
2015-10-14T21:47:04.000Z
2021-11-21T15:16:57.000Z
old/examples/exchangeMethods/TempEx.py
radical-cybertools/radical.repex
6fea43716c1f3ee9c83211d31e7f85cbc677c0c6
[ "MIT" ]
1
2016-06-22T14:31:40.000Z
2016-06-22T14:31:40.000Z
#!/usr/bin/env python import os import sys import math import numpy as np import random ####------------ Replicas = int(sys.argv[1]) Cycle = int(sys.argv[2]) def TemperatureExchange(Replicas): exchangeList = range(Replicas) #random.shuffle(exchangeList) #####Read the mdinfo files###### Temp = 0.0 ...
29.563218
116
0.541602
7277a16dbd17781ff085c9861b0c0bce95d85e4b
18,717
py
Python
bootstrapped/bootstrap.py
shyla-kupis/bootstrapped
59d0cea9d701e41b1b58ed68ab125243d5d791f0
[ "BSD-3-Clause" ]
578
2017-02-22T18:18:20.000Z
2020-12-27T18:49:25.000Z
bootstrapped/bootstrap.py
shyla-kupis/bootstrapped
59d0cea9d701e41b1b58ed68ab125243d5d791f0
[ "BSD-3-Clause" ]
29
2017-02-23T02:22:24.000Z
2020-11-17T04:59:27.000Z
bootstrapped/bootstrap.py
shyla-kupis/bootstrapped
59d0cea9d701e41b1b58ed68ab125243d5d791f0
[ "BSD-3-Clause" ]
86
2017-02-22T20:32:37.000Z
2020-12-29T04:32:45.000Z
# Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. '''Functions that allow o...
40.512987
99
0.630763
8cb553ea9bcf31cdcc9905b1c19bf4a0cbfdc70b
6,023
py
Python
Crawlers/scripts/parse_movie.py
Co1lin/iMovies
76cdab1f42f08fc855bf19f8a8f4650e163bcc3e
[ "MIT" ]
3
2020-09-12T15:37:03.000Z
2021-08-30T11:11:09.000Z
Crawlers/scripts/parse_movie.py
Co1lin/iMovies
76cdab1f42f08fc855bf19f8a8f4650e163bcc3e
[ "MIT" ]
null
null
null
Crawlers/scripts/parse_movie.py
Co1lin/iMovies
76cdab1f42f08fc855bf19f8a8f4650e163bcc3e
[ "MIT" ]
1
2020-11-13T06:56:27.000Z
2020-11-13T06:56:27.000Z
import os import re import json import traceback from lxml import etree ''' from HTML: 导演 编剧 剧情简介 短评 [{ 'writer': , 'date': , 'content': , },] ''' def list_to_string_sep(list): res = ' / '.join( [ item.strip() for item in list ] ) return res def list_t...
37.409938
144
0.463722
1b4610a1a14fd1b2dbafb304bd5fe42316019af7
44
py
Python
gocats/_version.py
rmflight/GOcats
fc7b367583a5a579a76c58a83a37fe13c69ebccc
[ "Unlicense" ]
10
2017-03-31T19:12:22.000Z
2021-09-28T01:29:38.000Z
gocats/_version.py
rmflight/GOcats
fc7b367583a5a579a76c58a83a37fe13c69ebccc
[ "Unlicense" ]
8
2018-04-23T15:40:56.000Z
2021-03-31T14:22:06.000Z
gocats/_version.py
rmflight/GOcats
fc7b367583a5a579a76c58a83a37fe13c69ebccc
[ "Unlicense" ]
3
2017-04-23T14:15:41.000Z
2021-06-20T18:38:01.000Z
__version__ = "1.1.7" short_version = "1.1"
14.666667
21
0.659091
bf029d98fa968b2d91edc255ea433f20574322b2
787
py
Python
tests/filtering/test_filter_against_latest_blocks.py
bellaj/web3py
882335941a0781a3a3a14b7616f727005e88d88d
[ "MIT" ]
null
null
null
tests/filtering/test_filter_against_latest_blocks.py
bellaj/web3py
882335941a0781a3a3a14b7616f727005e88d88d
[ "MIT" ]
null
null
null
tests/filtering/test_filter_against_latest_blocks.py
bellaj/web3py
882335941a0781a3a3a14b7616f727005e88d88d
[ "MIT" ]
null
null
null
import random from flaky import flaky from web3.utils.compat import ( Timeout, ) @flaky(max_runs=3) def test_filter_against_latest_blocks(web3, sleep_interval, wait_for_block, skip_if_testrpc): skip_if_testrpc(web3) seen_blocks = [] txn_filter = web3.eth.filter("latest") txn_filter.watch(seen_bl...
23.848485
93
0.70648
981e8059150a4872d9bd36c1947ed7e5189880c8
945
py
Python
showyourwork/workflow/scripts/tectonic.py
rodluger/showyourwork-sandbox
4ee993b433ab6d3e35e2bd652c6b3c21601fe468
[ "MIT" ]
1
2021-08-03T17:10:39.000Z
2021-08-03T17:10:39.000Z
showyourwork/workflow/scripts/tectonic.py
rodluger/showyourwork-sandbox
4ee993b433ab6d3e35e2bd652c6b3c21601fe468
[ "MIT" ]
null
null
null
showyourwork/workflow/scripts/tectonic.py
rodluger/showyourwork-sandbox
4ee993b433ab6d3e35e2bd652c6b3c21601fe468
[ "MIT" ]
null
null
null
import json import urllib import urllib.request import tarfile TEMP = snakemake.params["TEMP"] OS = snakemake.params["OS"] def get_tectonic_link(): """ Get the download link for the latest Linux release of tectonic on GitHub. """ link = None with urllib.request.urlopen( "https://api.git...
25.540541
77
0.608466
be3391dab5a0852d5f54d0c699ca9b308167e8e1
2,799
py
Python
pithy/py/lex.py
gwk/pithy
a48fabe9b4724c5005a034bd18b2e70d10617a78
[ "CC0-1.0" ]
7
2019-05-04T00:51:38.000Z
2021-12-10T15:36:31.000Z
pithy/py/lex.py
gwk/pithy
a48fabe9b4724c5005a034bd18b2e70d10617a78
[ "CC0-1.0" ]
null
null
null
pithy/py/lex.py
gwk/pithy
a48fabe9b4724c5005a034bd18b2e70d10617a78
[ "CC0-1.0" ]
1
2016-07-30T22:38:08.000Z
2016-07-30T22:38:08.000Z
# Dedicated to the public domain under CC0: https://creativecommons.org/publicdomain/zero/1.0/. from typing import Dict, List from ..lex import Lexer, LexMode, c_like_punctuation_patterns, whitespace_patterns patterns=dict( # These are ordered roughly to improve matching speed on a sample (all .py files in the re...
33.722892
118
0.608432
64950c22a032f92fdc7ad605c93b1b857290eca5
18,270
py
Python
extensions/groupchats.py
yanislavb/vk4xmpp
88989d2a63b597cb78f030e8aab7c9bf39096628
[ "MIT" ]
null
null
null
extensions/groupchats.py
yanislavb/vk4xmpp
88989d2a63b597cb78f030e8aab7c9bf39096628
[ "MIT" ]
null
null
null
extensions/groupchats.py
yanislavb/vk4xmpp
88989d2a63b597cb78f030e8aab7c9bf39096628
[ "MIT" ]
null
null
null
# coding: utf-8 # This file is a part of VK4XMPP transport # © simpleApps, 2013 — 2015. # File contains parts of code from # BlackSmith mark.1 XMPP Bot, © simpleApps 2011 — 2014. # Installation: # The extension requires up to 2 fields in the main config: # 1. ConferenceServer - the address of your (or not yours?) conf...
32.451155
124
0.696333
6bcc5c65d2f7bcb1904ea5d40e1809602569a763
392
py
Python
python/cursoemvideo/076.py
Gustavo-Martins/learning
a2167b894ab3a4bac5e3d7d4ac6671e1ee89e155
[ "Unlicense" ]
null
null
null
python/cursoemvideo/076.py
Gustavo-Martins/learning
a2167b894ab3a4bac5e3d7d4ac6671e1ee89e155
[ "Unlicense" ]
null
null
null
python/cursoemvideo/076.py
Gustavo-Martins/learning
a2167b894ab3a4bac5e3d7d4ac6671e1ee89e155
[ "Unlicense" ]
null
null
null
# Items list flourish = ('-' * 39) items = ('Papel A4', 0.25, 'Papel A3', 0.40, 'Caderno', 14.00, 'Livro de Português', 300.00, 'Caneta', 3.50, 'Lapiseira', 23.75, 'Grafite', 2.00) print(flourish) print('LISTAGEM DE PREÇOS') print(flourish) for pos in range(0, len(items)): if pos % 2 == 0: print(f'{items[pos]:...
20.631579
36
0.607143
00286c09a762ac964e03feee6170042aa1d043b5
11,548
py
Python
neutron/agent/l2/extensions/qos.py
2020human/neutron
1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f
[ "Apache-2.0" ]
null
null
null
neutron/agent/l2/extensions/qos.py
2020human/neutron
1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f
[ "Apache-2.0" ]
null
null
null
neutron/agent/l2/extensions/qos.py
2020human/neutron
1e2cfe8c06fcc2df52daa77b2b767ed6ffc2b19f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Mellanox Technologies, Ltd # 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 # # U...
39.278912
79
0.64955
c22a0079b4310d03d28d44b6a3b1150969262225
159
py
Python
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_PolyTrend_Seasonal_DayOfWeek_LSTM.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_PolyTrend_Seasonal_DayOfWeek_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_PolyTrend_Seasonal_DayOfWeek_LSTM.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['PolyTrend'] , ['Seasonal_DayOfWeek'] , ['LSTM'] );
39.75
86
0.754717
19bc9e8e0d2fbf7aca26cb829017c7ae3a9ff7c8
77
py
Python
test/tk/listTK/wrap/test_2.py
yuhangwang/plot
4f81dab2e6e3dc384c370f8dc0a00e8df29770fb
[ "MIT" ]
1
2020-04-10T08:14:43.000Z
2020-04-10T08:14:43.000Z
test/tk/listTK/wrap/test_2.py
yuhangwang/plot
4f81dab2e6e3dc384c370f8dc0a00e8df29770fb
[ "MIT" ]
1
2016-11-30T20:37:27.000Z
2016-12-12T11:55:50.000Z
test/tk/listTK/wrap/test_2.py
yuhangwang/plot
4f81dab2e6e3dc384c370f8dc0a00e8df29770fb
[ "MIT" ]
1
2019-12-18T07:56:00.000Z
2019-12-18T07:56:00.000Z
from plot.tk.listTK import wrap def test(): assert wrap(1, 2) == [[1]]
12.833333
31
0.597403
69c69a156fcdbaa5b1ee9cc3000008f2478e363e
2,746
py
Python
spectral_parser/preprocessing/mappings.py
GavinPHR/Spectral-Parser
4d1f071f29ac158e67f32a105aa6483c6479fae8
[ "MIT" ]
4
2021-03-18T10:03:14.000Z
2021-05-05T21:37:59.000Z
spectral_parser/preprocessing/mappings.py
GavinPHR/Spectral-Parser
4d1f071f29ac158e67f32a105aa6483c6479fae8
[ "MIT" ]
null
null
null
spectral_parser/preprocessing/mappings.py
GavinPHR/Spectral-Parser
4d1f071f29ac158e67f32a105aa6483c6479fae8
[ "MIT" ]
1
2021-03-18T10:03:18.000Z
2021-03-18T10:03:18.000Z
""" Nonterminal and terminal mappings as described in section 3.2.1 in my dissertation. These data structures are two-way mappings: you can index from integers to strings and vice versa. """ import collections from tqdm import tqdm import config __author__ = 'Haoran Peng' __email__ = 'gavinsweden@gmail.com' __licens...
28.020408
61
0.577567
a0399e7f59548c668df697941efb3ec61dba6bfa
1,883
py
Python
backend/producer.py
maneeshd/stock-market-sim
0ce6311e4a9e71737b48bc5c1f2d503d0a2f737f
[ "MIT" ]
1
2020-10-22T22:47:44.000Z
2020-10-22T22:47:44.000Z
backend/producer.py
maneeshd/kafka-stock
0ce6311e4a9e71737b48bc5c1f2d503d0a2f737f
[ "MIT" ]
null
null
null
backend/producer.py
maneeshd/kafka-stock
0ce6311e4a9e71737b48bc5c1f2d503d0a2f737f
[ "MIT" ]
1
2021-02-17T05:40:28.000Z
2021-02-17T05:40:28.000Z
""" Author: Maneesh Divana <maneeshd77@gmail.com> Date: 2020-12-03 Python: 3.7.9 Reads stock data from CSV files and simulates stock streaming into AWS Kinesis Data Stream """ from os import path from datetime import datetime from time import sleep import pandas as pd from kinesis_api import KinesisAPI CUR_DIR = pat...
26.9
90
0.62666
b3d1e0e0e59dca5f038c79138d472a0a98611fcc
137
py
Python
chapter2-variable/exercise3.py
MyLanPangzi/py4e
af5cd5fa63956ff237f880a1f9dd0bfdd6b28930
[ "Apache-2.0" ]
null
null
null
chapter2-variable/exercise3.py
MyLanPangzi/py4e
af5cd5fa63956ff237f880a1f9dd0bfdd6b28930
[ "Apache-2.0" ]
null
null
null
chapter2-variable/exercise3.py
MyLanPangzi/py4e
af5cd5fa63956ff237f880a1f9dd0bfdd6b28930
[ "Apache-2.0" ]
null
null
null
# Enter Hours: 35 # Enter Rate: 2.75 # Pay: 96.25 h = input('Enter Hours: ') r = input('Enter Rate: ') print('Pay', float(h) * float(r))
19.571429
33
0.59854
8b3e382fbbb650eb2bb68ac7a82844f965e4ff97
3,393
py
Python
rowad/hooks.py
ashish-greycube/rowad
f69ebcbb2b50aa96fc78f6b9e7d2272215c00bb3
[ "MIT" ]
null
null
null
rowad/hooks.py
ashish-greycube/rowad
f69ebcbb2b50aa96fc78f6b9e7d2272215c00bb3
[ "MIT" ]
null
null
null
rowad/hooks.py
ashish-greycube/rowad
f69ebcbb2b50aa96fc78f6b9e7d2272215c00bb3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version app_name = "rowad" app_title = "Rowad" app_publisher = "GreyCube Technologies" app_description = "customization for Rowad" app_icon = "octicon octicon-home-fill" app_color = "green" app_email = "admin@greycube.in" ...
24.410072
86
0.682582
43b21a299222f66dad9afd63b1244cf0b26bdfda
71
py
Python
Feature Dev Scripts/listMacros.py
RealIndrit/JsMacros-Examples
b04de1231bacdb72d81c7301ab6a47474bc4d5be
[ "MIT" ]
2
2021-07-03T21:50:05.000Z
2021-10-31T13:14:57.000Z
Feature Dev Scripts/listMacros.py
RealIndrit/JsMacros-Examples
b04de1231bacdb72d81c7301ab6a47474bc4d5be
[ "MIT" ]
1
2021-03-17T11:20:16.000Z
2021-03-17T11:21:48.000Z
Feature Dev Scripts/listMacros.py
RealIndrit/JsMacros-Examples
b04de1231bacdb72d81c7301ab6a47474bc4d5be
[ "MIT" ]
4
2020-08-04T14:15:54.000Z
2021-12-10T09:45:12.000Z
m = jsmacros.getProfile().getRegistry().getListeners("KEY") chat.log(m)
35.5
59
0.746479
52a8944f877cc393109e1387545c12e3288a2dc7
2,734
py
Python
tests/test_initialization.py
priyashengole/Chatterbot
49708c479226d6650a4cadf33a1bacd233c2ca0c
[ "BSD-3-Clause" ]
5
2021-03-21T06:26:02.000Z
2021-08-11T09:58:44.000Z
tests/test_initialization.py
priyashengole/Chatterbot
49708c479226d6650a4cadf33a1bacd233c2ca0c
[ "BSD-3-Clause" ]
null
null
null
tests/test_initialization.py
priyashengole/Chatterbot
49708c479226d6650a4cadf33a1bacd233c2ca0c
[ "BSD-3-Clause" ]
1
2020-05-23T09:51:30.000Z
2020-05-23T09:51:30.000Z
from .base_case import ChatBotTestCase class StringInitializationTestCase(ChatBotTestCase): def get_kwargs(self): return { 'input_adapter': 'chatterbot.input.VariableInputTypeAdapter', 'output_adapter': 'chatterbot.output.OutputAdapter', 'database_uri': None } ...
37.452055
91
0.66752
f6ff5dd94bb11f5f8940fb7a0d992b35d8e31ba4
713
py
Python
Hackerrank/Python/default-arguments.py
PROxZIMA/Competitive-Coding
ba6b365ea130b6fcaa15c5537b530ed363bab793
[ "MIT" ]
1
2021-01-10T13:29:21.000Z
2021-01-10T13:29:21.000Z
Hackerrank/Python/default-arguments.py
PROxZIMA/Competitive-Coding
ba6b365ea130b6fcaa15c5537b530ed363bab793
[ "MIT" ]
null
null
null
Hackerrank/Python/default-arguments.py
PROxZIMA/Competitive-Coding
ba6b365ea130b6fcaa15c5537b530ed363bab793
[ "MIT" ]
null
null
null
class EvenStream(object): def __init__(self): self.current = 0 def get_next(self): to_return = self.current self.current += 2 return to_return class OddStream(object): def __init__(self): self.current = 1 def get_next(self): to_return = self.current ...
21.606061
41
0.604488
d7af9081da8f9fa063ea1c2e223e27e9b771f764
2,209
py
Python
LPC.py
shun60s/Vocal-Tube-Estimation
fa5e11db95905c008acbf72ee46afa16c7f4502a
[ "MIT" ]
3
2021-12-20T23:34:16.000Z
2022-03-05T22:53:30.000Z
LPC.py
shun60s/Vocal-Tube-Estimation
fa5e11db95905c008acbf72ee46afa16c7f4502a
[ "MIT" ]
null
null
null
LPC.py
shun60s/Vocal-Tube-Estimation
fa5e11db95905c008acbf72ee46afa16c7f4502a
[ "MIT" ]
null
null
null
#coding:utf-8 ########################################################### # Levinson-DurbinのアルゴリズムにてLPC係数を求める # # autocorr and LevinsonDurbin is baed on # <http://aidiary.hatenablog.com/entry/20120415/1334458954> # ########################################################### import numpy as np #Check vers...
20.081818
60
0.460842
5616a09b5ffe75f040149140d2efe284d200ca79
1,603
py
Python
modules/preprocessing/text/NeMo/nemo_text_processing/text_normalization/ar/verbalizers/abbreviation.py
serkhanekarim/AI
0a13880ae8e608cd00fa819dc590097abdb7ae6e
[ "Apache-2.0" ]
null
null
null
modules/preprocessing/text/NeMo/nemo_text_processing/text_normalization/ar/verbalizers/abbreviation.py
serkhanekarim/AI
0a13880ae8e608cd00fa819dc590097abdb7ae6e
[ "Apache-2.0" ]
null
null
null
modules/preprocessing/text/NeMo/nemo_text_processing/text_normalization/ar/verbalizers/abbreviation.py
serkhanekarim/AI
0a13880ae8e608cd00fa819dc590097abdb7ae6e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # Copyright 2015 and onwards Google, 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/license...
37.27907
102
0.726138
e705f3d027b0ee0a0b908c368decb9ed49ac8464
368
py
Python
table2ascii/alignment.py
sairamkiran9/table2ascii
9829e77c2e7ce7ff764cb80dd1d7775a28fc2f16
[ "MIT" ]
24
2021-04-27T07:10:32.000Z
2022-03-13T04:32:22.000Z
table2ascii/alignment.py
sairamkiran9/table2ascii
9829e77c2e7ce7ff764cb80dd1d7775a28fc2f16
[ "MIT" ]
11
2021-04-27T07:49:28.000Z
2022-02-27T12:46:56.000Z
table2ascii/alignment.py
sairamkiran9/table2ascii
9829e77c2e7ce7ff764cb80dd1d7775a28fc2f16
[ "MIT" ]
5
2021-07-30T00:19:29.000Z
2022-02-01T07:39:50.000Z
from enum import Enum class Alignment(Enum): """ Enum for text alignment types within a table cell Example:: from table2ascii import Alignment output = table2ascii( ... alignments=[Alignment.LEFT, Alignment.RIGHT, Alignment.CENTER, Alignment.CENTER] ) ...
17.52381
92
0.586957
54bdee0bb0208229a0627d700b5665e3513b2b78
13,355
py
Python
pandas/core/indexers/objects.py
aa-182758/pandas
53b3dd53c7f2c3d24aa77d5a1bc531b1fcd45d70
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexers/objects.py
aa-182758/pandas
53b3dd53c7f2c3d24aa77d5a1bc531b1fcd45d70
[ "BSD-3-Clause" ]
null
null
null
pandas/core/indexers/objects.py
aa-182758/pandas
53b3dd53c7f2c3d24aa77d5a1bc531b1fcd45d70
[ "BSD-3-Clause" ]
null
null
null
"""Indexer objects for computing start/end window bounds for rolling operations""" from __future__ import annotations from datetime import timedelta import numpy as np from pandas._libs.window.indexers import calculate_variable_window_bounds from pandas.util._decorators import Appender from pandas.core.dtypes.commo...
32.180723
88
0.590565
72c8f20ed1050e942337f10d9f953dc81a99f1b7
575
py
Python
mpids/MPInumpy/errors.py
edgargabriel/mpids
170f402ecea5af0db4eee39e8d426884dce12ad6
[ "BSD-2-Clause" ]
1
2020-01-22T03:27:31.000Z
2020-01-22T03:27:31.000Z
mpids/MPInumpy/errors.py
jrodgers01d/mpids
f771b1d25eba5f5dc8e30e5d86ee0251775b9da1
[ "BSD-2-Clause" ]
1
2020-05-04T20:25:55.000Z
2020-05-04T20:25:55.000Z
mpids/MPInumpy/errors.py
jrodgers01d/mpids
f771b1d25eba5f5dc8e30e5d86ee0251775b9da1
[ "BSD-2-Clause" ]
2
2019-04-08T03:01:31.000Z
2020-04-27T15:56:28.000Z
class MPInumpyError(Exception): """ Base exception class for MPInumpy errors. """ pass class InvalidDistributionError(MPInumpyError): """ Exception class for when a unsupported distribution is encountered. """ pass class ValueError(MPInumpyError): """ Exception class for when a invalid value is en...
28.75
79
0.718261
cb7003b489f2ecbff4b6b229d094593b21eff17a
2,751
py
Python
examples/01-filter/glyphs.py
ssg-aero/pyvista
5150b062cf835c6c6a44f6aefa4d53a1ad832ba3
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
examples/01-filter/glyphs.py
ssg-aero/pyvista
5150b062cf835c6c6a44f6aefa4d53a1ad832ba3
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
examples/01-filter/glyphs.py
ssg-aero/pyvista
5150b062cf835c6c6a44f6aefa4d53a1ad832ba3
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
""" .. _glyph_example: Plotting Glyphs (Vectors or PolyData) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use vectors in a dataset to plot and orient glyphs/geometric objects. """ # sphinx_gallery_thumbnail_number = 4 import pyvista as pv from pyvista import examples import numpy as np ####################################...
31.261364
83
0.610687
5870b59aa8db0ed10de96551d7529cd93ae39241
6,452
py
Python
src/deepqmc/extra/cli.py
rickyHong/deepqmc
529018964898e391f989acb03cc50da74538ac95
[ "MIT" ]
null
null
null
src/deepqmc/extra/cli.py
rickyHong/deepqmc
529018964898e391f989acb03cc50da74538ac95
[ "MIT" ]
null
null
null
src/deepqmc/extra/cli.py
rickyHong/deepqmc
529018964898e391f989acb03cc50da74538ac95
[ "MIT" ]
null
null
null
import logging import sys import time import traceback from itertools import count from math import inf from pathlib import Path import click import torch from torch.utils.tensorboard import SummaryWriter from ..errors import TrainingCrash from ..io import wf_from_file from ..train import train __all__ = () log = l...
35.844444
86
0.550372
8e08fef2dc462def0cec124000388df8542902d7
3,757
py
Python
tests/df_test.py
UKHomeOffice/dq-tf-datafeeds
dac0b6081d32f2c9f8c6f5d47d8ed2b85e78b526
[ "MIT" ]
null
null
null
tests/df_test.py
UKHomeOffice/dq-tf-datafeeds
dac0b6081d32f2c9f8c6f5d47d8ed2b85e78b526
[ "MIT" ]
2
2019-02-18T12:45:15.000Z
2019-10-30T14:31:24.000Z
tests/df_test.py
UKHomeOffice/dq-tf-datafeeds
dac0b6081d32f2c9f8c6f5d47d8ed2b85e78b526
[ "MIT" ]
1
2021-04-11T09:09:09.000Z
2021-04-11T09:09:09.000Z
# pylint: disable=missing-docstring, line-too-long, protected-access, E1101, C0202, E0602, W0109 import unittest from runner import Runner class TestE2E(unittest.TestCase): @classmethod def setUpClass(self): self.snippet = """ provider "aws" { region = "eu-west-2" ...
46.9625
156
0.652116
c0bc7be0dc00e8821faf91f1d05dfc8b7e2192b5
1,169
py
Python
__openerp__.py
lbk0116/Inventory
ad9ff0b5ddf8550a0375971a34d6c820252121fd
[ "Apache-2.0" ]
3
2018-11-22T11:38:56.000Z
2022-03-22T03:55:57.000Z
__openerp__.py
lbk0116/Inventory
ad9ff0b5ddf8550a0375971a34d6c820252121fd
[ "Apache-2.0" ]
null
null
null
__openerp__.py
lbk0116/Inventory
ad9ff0b5ddf8550a0375971a34d6c820252121fd
[ "Apache-2.0" ]
3
2016-11-14T06:58:15.000Z
2020-03-12T12:49:06.000Z
{ # The human-readable name of your module, displayed in the interface 'name' : "Asset_management" , # A more extensive description 'description' : """ """, # Which modules must be installed for this one to work 'depends' : ['base'], 'category': 'assetmanagement', # data files wh...
34.382353
68
0.54491
2be4fd3e7d4a1269774d7424225af2166308ac99
66,222
py
Python
empyrical/stats.py
RichardDale/empyrical-reloaded
ffb97de63acef5030bcf8f26f70be08208094ba5
[ "Apache-2.0" ]
9
2021-04-23T04:07:10.000Z
2022-02-16T07:49:15.000Z
empyrical/stats.py
RichardDale/empyrical-reloaded
ffb97de63acef5030bcf8f26f70be08208094ba5
[ "Apache-2.0" ]
3
2021-08-23T07:09:59.000Z
2022-01-31T07:24:17.000Z
empyrical/stats.py
RichardDale/empyrical-reloaded
ffb97de63acef5030bcf8f26f70be08208094ba5
[ "Apache-2.0" ]
4
2021-04-27T07:18:54.000Z
2022-02-12T15:55:18.000Z
# # Copyright 2016 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
30.114598
96
0.632494
bf4ea5ed2a4b09a9b25ac8969cbbc5233900e25f
1,429
py
Python
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/effective_network_security_group_list_result_py3.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/effective_network_security_group_list_result_py3.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/express-route-cross-connection/azext_expressroutecrossconnection/vendored_sdks/v2018_04_01/models/effective_network_security_group_list_result_py3.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # 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 ...
34.853659
79
0.622113
7832a261a1a2a87a65f61f49b1c810cbf356ca6a
584
py
Python
tools/__init__.py
openeuler-mirror/A-Tune
7479b30e4ab688cf2ca53235d9fd72fc22f332bd
[ "MulanPSL-1.0" ]
5
2020-03-09T12:03:57.000Z
2022-03-05T06:38:40.000Z
tools/__init__.py
openeuler-mirror/A-Tune
7479b30e4ab688cf2ca53235d9fd72fc22f332bd
[ "MulanPSL-1.0" ]
null
null
null
tools/__init__.py
openeuler-mirror/A-Tune
7479b30e4ab688cf2ca53235d9fd72fc22f332bd
[ "MulanPSL-1.0" ]
1
2020-10-14T02:35:56.000Z
2020-10-14T02:35:56.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Copyright (c) 2019 Huawei Technologies Co., Ltd. # A-Tune is licensed under the Mulan PSL v2. # You can use this software according to the terms and conditions of the Mulan PSL v2. # You may obtain a copy of Mulan PSL v2 at: # http://license.coscl.org.cn/MulanPSL2 # THIS...
44.923077
98
0.734589
61ed71f23b5e4153f770933f63e0a29aefe4dbb4
154
py
Python
pymapf/decentralized/position.py
APLA-Toolbox/pymapf
255df006925401e5ccdf82afc7dac339221574ba
[ "MIT" ]
25
2021-01-17T01:02:25.000Z
2022-02-13T09:20:59.000Z
pymapf/decentralized/position.py
APLA-Toolbox/pymapf
255df006925401e5ccdf82afc7dac339221574ba
[ "MIT" ]
37
2021-01-16T22:36:32.000Z
2021-11-15T11:51:59.000Z
pymapf/decentralized/position.py
APLA-Toolbox/pymapf
255df006925401e5ccdf82afc7dac339221574ba
[ "MIT" ]
5
2021-04-02T08:27:52.000Z
2021-11-17T12:43:52.000Z
class Position: def __init__(self, x, y): self.x = x self.y = y def __str__(self): return "[%d ; %d]" % (self.x, self.y)
19.25
45
0.480519
d5f76489f430b8620c46c46d94531997c8859130
11,732
py
Python
category_encoders/m_estimate.py
mcassuranceiq/categorical-encoding-public-old
0d62c77a645bba308cb1bfda3e3bd41665a37a5e
[ "BSD-3-Clause" ]
null
null
null
category_encoders/m_estimate.py
mcassuranceiq/categorical-encoding-public-old
0d62c77a645bba308cb1bfda3e3bd41665a37a5e
[ "BSD-3-Clause" ]
null
null
null
category_encoders/m_estimate.py
mcassuranceiq/categorical-encoding-public-old
0d62c77a645bba308cb1bfda3e3bd41665a37a5e
[ "BSD-3-Clause" ]
null
null
null
"""M-probability estimate""" import numpy as np import pandas as pd from sklearn.base import BaseEstimator, TransformerMixin from category_encoders.ordinal import OrdinalEncoder import category_encoders.utils as util from sklearn.utils.random import check_random_state __author__ = 'Jan Motl' class MEstimateEncoder(B...
36.434783
137
0.611149
8bc1a27251f561ea437d4bec772a488d498b6b14
2,769
py
Python
datasets/init_dataset.py
hzh8311/2nd-Solution-for-CVPR2020-face-anti-spoofing-challenge
5c21d934904bbcfc9b373da3f578d03ede842b06
[ "MIT" ]
3
2021-02-11T07:59:34.000Z
2021-05-19T02:28:27.000Z
datasets/init_dataset.py
hzh8311/2nd-Solution-for-CVPR2020-face-anti-spoofing-challenge
5c21d934904bbcfc9b373da3f578d03ede842b06
[ "MIT" ]
null
null
null
datasets/init_dataset.py
hzh8311/2nd-Solution-for-CVPR2020-face-anti-spoofing-challenge
5c21d934904bbcfc9b373da3f578d03ede842b06
[ "MIT" ]
null
null
null
import torch.utils.data as data import torch from PIL import Image import pandas as pd import numpy as np import os import torch.utils.data as data def rgb_loader(path): return Image.open(path) def rgb_prune_loader(path, pad=5): im = Image.open(path) im = np.asarray(im) im_ = np.sum(im, -1) row_...
27.69
107
0.574215
0df62aaf2bc00e46d7f927bc25d7ab62841e0447
976
py
Python
api/tests/test_investments.py
Siecje/debt
86786479a1bc3384c115f145b60ebebce0cba468
[ "MIT" ]
5
2017-04-06T13:20:20.000Z
2022-02-12T18:12:27.000Z
api/tests/test_investments.py
Siecje/debt
86786479a1bc3384c115f145b60ebebce0cba468
[ "MIT" ]
6
2015-04-25T16:43:36.000Z
2022-02-12T16:35:45.000Z
api/tests/test_investments.py
Siecje/debt
86786479a1bc3384c115f145b60ebebce0cba468
[ "MIT" ]
1
2018-04-12T09:35:03.000Z
2018-04-12T09:35:03.000Z
from django.core.urlresolvers import reverse from rest_framework.authtoken.models import Token from rest_framework.test import APITestCase from api.models import Investment, User class InvestmentTests(APITestCase): def setUp(self): self.user = User.objects.create_user( username='one', email='...
37.538462
74
0.703893
d57c4fe36207c587e36e86ff283f3785aa054372
348
py
Python
setup.py
mahyar-osn/seir
fef0d07b618535f4fcb69359d13b98fc8b8c6eaa
[ "Apache-2.0" ]
null
null
null
setup.py
mahyar-osn/seir
fef0d07b618535f4fcb69359d13b98fc8b8c6eaa
[ "Apache-2.0" ]
null
null
null
setup.py
mahyar-osn/seir
fef0d07b618535f4fcb69359d13b98fc8b8c6eaa
[ "Apache-2.0" ]
null
null
null
import setuptools setuptools.setup( author='Alan Garny', author_email='a.garny@auckland.ac.nz', description='OpenCOR-based Python script to model Covid-19 using the SEIR model', scripts=[ 'src/seir.py' ], license='Apache 2.0', name='seir', url='https://github.com/ABI-Covid-19/se...
23.2
85
0.637931
7b5c1052e9a1b46864098e18665da77cee9410ed
558
py
Python
channelchat/manage.py
olufekosamuel/django-chat
a0172726d1d6dba9ae47d8f49de21b2fbb102d6d
[ "Apache-2.0" ]
null
null
null
channelchat/manage.py
olufekosamuel/django-chat
a0172726d1d6dba9ae47d8f49de21b2fbb102d6d
[ "Apache-2.0" ]
null
null
null
channelchat/manage.py
olufekosamuel/django-chat
a0172726d1d6dba9ae47d8f49de21b2fbb102d6d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "channelchat.settings") try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't impor...
34.875
76
0.670251
5bb08ec23f3e4e50705be9a191cde126d421fbfd
6,060
py
Python
pymongo/periodic_executor.py
Namyalg/mongo-python-driver
fc85a24888e3c1fe556eb8f755aeecb053b5815e
[ "Apache-2.0" ]
null
null
null
pymongo/periodic_executor.py
Namyalg/mongo-python-driver
fc85a24888e3c1fe556eb8f755aeecb053b5815e
[ "Apache-2.0" ]
null
null
null
pymongo/periodic_executor.py
Namyalg/mongo-python-driver
fc85a24888e3c1fe556eb8f755aeecb053b5815e
[ "Apache-2.0" ]
null
null
null
# Copyright 2014-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you # may not use this file except in compliance with the License. You # may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
32.934783
95
0.60462
7418abe9a8ec90cddbdfef0322c2e9512c5e825b
20,198
py
Python
src/aihwkit/nn/modules/base.py
JongchanRyu/aihwkit
fb95cd417c5ab70d78db0b8a3912932aebb53f3b
[ "Apache-2.0" ]
1
2021-12-01T21:46:49.000Z
2021-12-01T21:46:49.000Z
src/aihwkit/nn/modules/base.py
JongchanRyu/aihwkit
fb95cd417c5ab70d78db0b8a3912932aebb53f3b
[ "Apache-2.0" ]
null
null
null
src/aihwkit/nn/modules/base.py
JongchanRyu/aihwkit
fb95cd417c5ab70d78db0b8a3912932aebb53f3b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # (C) Copyright 2020, 2021 IBM. All Rights Reserved. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificatio...
40.23506
98
0.634073
3357dbe6d5f9dadcf2709381305214a63c482dd9
7,019
py
Python
authtools/forms.py
kanymanyman/django-authtools
3529efbff6f2255dfe3cc945a1981c6fc939d0ce
[ "BSD-2-Clause" ]
288
2015-01-11T14:24:03.000Z
2022-03-25T16:11:32.000Z
authtools/forms.py
kanymanyman/django-authtools
3529efbff6f2255dfe3cc945a1981c6fc939d0ce
[ "BSD-2-Clause" ]
86
2015-02-23T21:08:45.000Z
2021-10-17T18:51:02.000Z
authtools/forms.py
kanymanyman/django-authtools
3529efbff6f2255dfe3cc945a1981c6fc939d0ce
[ "BSD-2-Clause" ]
113
2015-01-08T03:54:41.000Z
2022-03-08T18:37:12.000Z
from __future__ import unicode_literals from django import forms, VERSION as DJANGO_VERSION from django.forms.utils import flatatt from django.contrib.auth.forms import ( ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, PasswordResetForm as OldPasswordResetForm, UserChangeForm as DjangoUserChangeForm...
38.994444
97
0.674455
cbb6abc569d39daec6ca2b337778345decc7a455
8,270
py
Python
onlinecourse/views.py
sabinamp/django-cloud-app
a837d15205a01937724a266e930c77536b8bf512
[ "Apache-2.0" ]
null
null
null
onlinecourse/views.py
sabinamp/django-cloud-app
a837d15205a01937724a266e930c77536b8bf512
[ "Apache-2.0" ]
null
null
null
onlinecourse/views.py
sabinamp/django-cloud-app
a837d15205a01937724a266e930c77536b8bf512
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponseRedirect # <HINT> Import any new Models here from .models import Course, Enrollment, Question, Choice, Submission, Lesson from django.contrib.auth.models import User from django.shortcuts import get_object_or_404, render, redirect from django.urls ...
39.009434
129
0.703023
f4c4cad53fb5c0dd517616007a0f660128f91004
1,076
py
Python
zadanka/l5zad1.py
wrutkowski1000/wizualizacja-danych
aacbe2e25e8a5624a3585958aa6a3a6512f1fac7
[ "MIT" ]
null
null
null
zadanka/l5zad1.py
wrutkowski1000/wizualizacja-danych
aacbe2e25e8a5624a3585958aa6a3a6512f1fac7
[ "MIT" ]
null
null
null
zadanka/l5zad1.py
wrutkowski1000/wizualizacja-danych
aacbe2e25e8a5624a3585958aa6a3a6512f1fac7
[ "MIT" ]
null
null
null
class Material: def __init__(self, r, d, s): self.rodzaj = r self.dlugosc = d self.szerokosc = s def wyswietl_nazwe(self): print(self.rodzaj) class Ubrania(Material): def __init__(self, r, d, s, roz, kolo, dla): self.rodzaj = r self.dlugosc = d sel...
26.9
134
0.581784
a0df8c179bd7f25690b81ffd50b53aa36c0038b8
958
py
Python
cacao_app/contrib/sites/migrations/0002_set_site_domain_and_name.py
CacaoMovil/guia-de-cacao-django
14d18edb76502736f6f31955509c3b413f1f91fc
[ "BSD-3-Clause" ]
1
2016-03-07T17:03:45.000Z
2016-03-07T17:03:45.000Z
cacao_app/contrib/sites/migrations/0002_set_site_domain_and_name.py
CacaoMovil/guia-de-cacao-django
14d18edb76502736f6f31955509c3b413f1f91fc
[ "BSD-3-Clause" ]
4
2016-04-29T20:48:31.000Z
2021-06-10T20:39:26.000Z
cacao_app/contrib/sites/migrations/0002_set_site_domain_and_name.py
CacaoMovil/guia-de-cacao-django
14d18edb76502736f6f31955509c3b413f1f91fc
[ "BSD-3-Clause" ]
3
2016-03-04T19:46:45.000Z
2016-05-11T19:46:00.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import models, migrations def update_site_forward(apps, schema_editor): """Set site domain and name.""" Site = apps.get_model("sites", "Site") Site.objects.update_or_create( id=settings...
23.365854
72
0.617954
8b770eaa17430f1e47fc01e5f334632a176f1989
23,541
py
Python
nlpml/dataset.py
johann-petrak/nlp-ml
86e1e86b8b2fa915cacd2ca8a39635ce982d9f4e
[ "Apache-2.0" ]
null
null
null
nlpml/dataset.py
johann-petrak/nlp-ml
86e1e86b8b2fa915cacd2ca8a39635ce982d9f4e
[ "Apache-2.0" ]
null
null
null
nlpml/dataset.py
johann-petrak/nlp-ml
86e1e86b8b2fa915cacd2ca8a39635ce982d9f4e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ''' Temporary implementation of the Dataset interface without dependency on pytorch to make accessing the data file in a sorted way possible. A Dataset is something that allows direct acces to every item using bracket-notation, e.g myds[22]. There is no initial assumption about how a dataset is r...
41.739362
119
0.616244
f0cdb65b37cae1c5c7dd55bf8f2dcde6df5a6929
4,764
py
Python
exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/encoder/v2/protobuf/__init__.py
dmolenda-sumo/opentelemetry-python
f92431e90d258ad6f0f4f496b2e9b778bcb1f627
[ "Apache-2.0" ]
1
2021-02-26T02:37:54.000Z
2021-02-26T02:37:54.000Z
exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/encoder/v2/protobuf/__init__.py
dmolenda-sumo/opentelemetry-python
f92431e90d258ad6f0f4f496b2e9b778bcb1f627
[ "Apache-2.0" ]
null
null
null
exporter/opentelemetry-exporter-zipkin/src/opentelemetry/exporter/zipkin/encoder/v2/protobuf/__init__.py
dmolenda-sumo/opentelemetry-python
f92431e90d258ad6f0f4f496b2e9b778bcb1f627
[ "Apache-2.0" ]
null
null
null
# Copyright The OpenTelemetry Authors # # 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 ...
36.646154
79
0.680521
8586d9288fff4ba1b595adf12403a797941e90a2
220
py
Python
lab_4.py
eyal21-meet/meet2019y1lab4
68d609325ab138d79034aa5ced0275b3fda13b70
[ "MIT" ]
null
null
null
lab_4.py
eyal21-meet/meet2019y1lab4
68d609325ab138d79034aa5ced0275b3fda13b70
[ "MIT" ]
null
null
null
lab_4.py
eyal21-meet/meet2019y1lab4
68d609325ab138d79034aa5ced0275b3fda13b70
[ "MIT" ]
null
null
null
fruit = input("choose a fruit: ") if fruit == "apples": print("bin 1") elif fruit == "oranges": print("bin 2") elif fruit == "bananas": print("bin 3") else: print("Error! I do not recognize this fruit!")
22
50
0.6
be4dde1e15942f9051340e750bcea4f4c9d42132
2,260
py
Python
barcode/itf.py
Azd325/python-barcode
b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9
[ "MIT" ]
null
null
null
barcode/itf.py
Azd325/python-barcode
b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9
[ "MIT" ]
null
null
null
barcode/itf.py
Azd325/python-barcode
b41b1d5d479fb0ad3290a0a6235a8d3203d34ee9
[ "MIT" ]
null
null
null
"""Module: barcode.itf :Provided barcodes: Interleaved 2 of 5 """ __docformat__ = 'restructuredtext en' from barcode.base import Barcode from barcode.charsets import itf from barcode.errors import ( IllegalCharacterError, ) MIN_SIZE = 0.2 MIN_QUIET_ZONE = 6.4 class ITF(Barcode): """Initializes a new ITF in...
27.901235
77
0.548673
766baed969cb779a65a871f013ec1be92ec34f70
942
py
Python
example/home/test/test_subscriptions.py
kbayliss/wagtail-grapple
1e322780cdaaa658bd30b1338599fb44c8806e74
[ "BSD-3-Clause" ]
59
2019-07-11T15:24:17.000Z
2020-07-13T01:17:28.000Z
example/home/test/test_subscriptions.py
kbayliss/wagtail-grapple
1e322780cdaaa658bd30b1338599fb44c8806e74
[ "BSD-3-Clause" ]
54
2019-07-09T16:29:55.000Z
2020-07-05T23:13:36.000Z
example/home/test/test_subscriptions.py
kbayliss/wagtail-grapple
1e322780cdaaa658bd30b1338599fb44c8806e74
[ "BSD-3-Clause" ]
23
2019-07-23T19:07:49.000Z
2020-06-26T22:56:14.000Z
from example.tests.test_grapple import BaseGrappleTest from grapple.settings import has_channels if has_channels: class TestRegisterSubscription(BaseGrappleTest): def test_subscription(self): query = """ { __schema { subscriptionType { ...
34.888889
99
0.571125
56849d5529a94e8c2a21dc2d52bdc8e0c883f7d9
853
py
Python
passport/rwts/d5timing.py
jepler/passport.py
88c3224f7299320c129d9a63253aaf195c4c48db
[ "MIT" ]
8
2018-07-18T20:06:03.000Z
2020-11-13T04:53:34.000Z
passport/rwts/d5timing.py
jepler/passport.py
88c3224f7299320c129d9a63253aaf195c4c48db
[ "MIT" ]
4
2021-04-07T09:26:51.000Z
2022-03-23T19:00:12.000Z
passport/rwts/d5timing.py
jepler/passport.py
88c3224f7299320c129d9a63253aaf195c4c48db
[ "MIT" ]
1
2022-03-23T13:59:50.000Z
2022-03-23T13:59:50.000Z
from passport.rwts.dos33 import DOS33RWTS class D5TimingBitRWTS(DOS33RWTS): def reset(self, logical_sectors): DOS33RWTS.reset(self, logical_sectors) self.data_prologue = (logical_sectors[2][0xE7], 0xAA, logical_sectors[2][0xFC]) se...
37.086957
94
0.589683
c62960791ab83d9289c6625322e918002a0c619c
5,326
py
Python
openaerostruct/structures/vonmises_wingbox.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/vonmises_wingbox.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
null
null
null
openaerostruct/structures/vonmises_wingbox.py
fkopsaf/OpenAeroStruct
414bd76a7f14f1bd52d6dacc6694382d52e5fabc
[ "Apache-2.0" ]
1
2018-09-24T04:58:37.000Z
2018-09-24T04:58:37.000Z
from __future__ import print_function, division import numpy as np from openmdao.api import ExplicitComponent from openaerostruct.structures.utils import norm, unit class VonMisesWingbox(ExplicitComponent): """ Compute the von Mises stress in each element. Parameters ---------- nodes[ny, 3] : numpy...
41.937008
212
0.562336
89e00288263365f51922344ba26f7a4510e3e429
1,000
py
Python
mysettings.py
gentrio/kotlin-web-site-cn
61cdd680160948207dc1f54eda966f37d8f54481
[ "Apache-2.0" ]
8
2020-10-27T23:14:10.000Z
2021-05-21T10:01:49.000Z
mysettings.py
angeloko23/kotlin-web-site
73d8e2f3c78eb0f3962d76306ea49dd14d78454f
[ "Apache-2.0" ]
13
2020-09-08T14:04:14.000Z
2022-03-08T23:29:41.000Z
mysettings.py
angeloko23/kotlin-web-site
73d8e2f3c78eb0f3962d76306ea49dd14d78454f
[ "Apache-2.0" ]
1
2020-09-20T16:59:51.000Z
2020-09-20T16:59:51.000Z
from src.markdown.makrdown import jinja_aware_markdown CACHE_TYPE = "null" PREFERRED_URL_SCHEME = 'http' SERVER_NAME = 'localhost:5000' FLATPAGES_EXTENSION = '.md' FLATPAGES_HTML_RENDERER = jinja_aware_markdown FREEZER_IGNORE_404_NOT_FOUND = True FLATPAGES_AUTO_RELOAD = True FREEZER_STATIC_IGNORE = ["*"] ERROR_404_HEL...
50
267
0.795
4b260d90887db9f32400e48b7cb524813e0f2cfc
4,665
py
Python
tests/utils/test_qos.py
ovh/depc
ce428b6ba790ee4a2e7150b4cb68fdcbfdfae2f4
[ "BSD-3-Clause" ]
77
2019-01-30T10:12:36.000Z
2021-10-19T16:25:53.000Z
tests/utils/test_qos.py
ovh/depc
ce428b6ba790ee4a2e7150b4cb68fdcbfdfae2f4
[ "BSD-3-Clause" ]
13
2019-02-20T16:57:57.000Z
2022-03-01T23:10:26.000Z
tests/utils/test_qos.py
ovh/depc
ce428b6ba790ee4a2e7150b4cb68fdcbfdfae2f4
[ "BSD-3-Clause" ]
10
2019-01-30T13:30:39.000Z
2021-08-02T05:55:18.000Z
import pandas as pd from deepdiff import DeepDiff from depc.utils.qos import OperationTypes from depc.utils.qos import _compute_qos DEFAULT_ARGS = {"agg_op": OperationTypes.AND, "auto_fill": True, "float_decimal": 3} def test_compute_qos_empty(): expected = { "qos": None, "bools_dps": {}, ...
32.395833
85
0.615863
b5b8e0602ea278d799853c3864dda1b72766c073
1,274
py
Python
laws/tests/test_bill_stream.py
MeirKriheli/Open-Knesset
0e1de0b0c47ae3fb341bd3afc6030d532fff6945
[ "BSD-3-Clause" ]
69
2015-02-03T12:02:56.000Z
2022-02-16T13:08:01.000Z
laws/tests/test_bill_stream.py
OriHoch/Open-Knesset
538bcdc2632d8d17a8ddddbc4567106684b9996b
[ "BSD-3-Clause" ]
446
2015-01-01T11:10:33.000Z
2021-11-01T08:15:39.000Z
laws/tests/test_bill_stream.py
OriHoch/Open-Knesset
538bcdc2632d8d17a8ddddbc4567106684b9996b
[ "BSD-3-Clause" ]
67
2015-01-01T09:13:58.000Z
2021-11-01T07:51:08.000Z
# encoding: utf-8 # from datetime import datetime from actstream import Action from django.test import TestCase from laws.models import Vote, Bill, KnessetProposal just_id = lambda x: x.id APP = 'laws' class BillStreamTest(TestCase): def setUp(self): super(BillStreamTest, self).setUp() self.vo...
31.073171
112
0.624019
fd20c12a6ad1a213c90cfae6c67902fb4d3a50f6
20,965
py
Python
functionApproximation/cpd/myALSOptimiser.py
FlorianThaler/masterThesis_codes
1f1dd1d929bd9b752105f6cfa2a3b6d9c575a8d3
[ "MIT" ]
null
null
null
functionApproximation/cpd/myALSOptimiser.py
FlorianThaler/masterThesis_codes
1f1dd1d929bd9b752105f6cfa2a3b6d9c575a8d3
[ "MIT" ]
null
null
null
functionApproximation/cpd/myALSOptimiser.py
FlorianThaler/masterThesis_codes
1f1dd1d929bd9b752105f6cfa2a3b6d9c575a8d3
[ "MIT" ]
null
null
null
""" Author: Florian Thaler Email: florian.thaler@edu.uni-graz.at Description: Part of the code package corresponding to my master thesis. This file implements the optimiser used for the update process in the context of function approximation. Year: 2019 """ #############################################...
38.752311
126
0.567851
f7ce7827627ec1926ce18a91606df13796bfbc43
42,760
py
Python
sim/lib/plot.py
j-groeneveld/covid
a8d993c866dcd56bf1c5f6f0a2120eae883aa029
[ "MIT" ]
null
null
null
sim/lib/plot.py
j-groeneveld/covid
a8d993c866dcd56bf1c5f6f0a2120eae883aa029
[ "MIT" ]
null
null
null
sim/lib/plot.py
j-groeneveld/covid
a8d993c866dcd56bf1c5f6f0a2120eae883aa029
[ "MIT" ]
1
2021-07-28T13:52:58.000Z
2021-07-28T13:52:58.000Z
import time import bisect import numpy as np import pandas as pd import networkx as nx import scipy import scipy.optimize from scipy.interpolate import interp1d import scipy as sp import random as rd import os, math from datetime import datetime import matplotlib import matplotlib.pyplot as plt import matplotlib.dates ...
40
146
0.592961
399442d93edce3347d3065d8ba6f924ec8c3e447
1,960
py
Python
developer_tools/dymola_python_testing/ModelicaPy/buildingspy/development/__init__.py
klfrick2/HYBRID
d8a82bcdb9d0516a22205eed0de75f63764fa004
[ "ECL-2.0", "Apache-2.0" ]
16
2021-02-10T21:37:01.000Z
2022-02-20T13:25:11.000Z
developer_tools/dymola_python_testing/ModelicaPy/buildingspy/development/__init__.py
klfrick2/HYBRID
d8a82bcdb9d0516a22205eed0de75f63764fa004
[ "ECL-2.0", "Apache-2.0" ]
11
2021-03-16T14:33:34.000Z
2022-02-15T19:05:55.000Z
developer_tools/dymola_python_testing/ModelicaPy/buildingspy/development/__init__.py
klfrick2/HYBRID
d8a82bcdb9d0516a22205eed0de75f63764fa004
[ "ECL-2.0", "Apache-2.0" ]
8
2021-06-03T00:22:26.000Z
2022-03-14T21:47:39.000Z
#Licensed under Apache 2.0 License. #© 2020 Battelle Energy Alliance, LLC #ALL RIGHTS RESERVED #. #Prepared by Battelle Energy Alliance, LLC #Under Contract No. DE-AC07-05ID14517 #With the U. S. Department of Energy #. #NOTICE: This computer software was prepared by Battelle Energy #Alliance, LLC, hereinafter the Cont...
51.578947
86
0.787755
f1424bf14c2d8e8c60b521fda0f3280404ddf9b1
78
py
Python
cursoemvideo/python/aula/aula8.1.py
mateusjustino/cursos
10927bf62f89b5847bb0acd998e9e9191472d0f4
[ "MIT" ]
null
null
null
cursoemvideo/python/aula/aula8.1.py
mateusjustino/cursos
10927bf62f89b5847bb0acd998e9e9191472d0f4
[ "MIT" ]
null
null
null
cursoemvideo/python/aula/aula8.1.py
mateusjustino/cursos
10927bf62f89b5847bb0acd998e9e9191472d0f4
[ "MIT" ]
null
null
null
import emoji print(emoji.emojize('Olá mundo :sunglasses:', use_aliases=True))
26
64
0.782051
76df6755811c487e4318fee01ddb65c72ba8c0bf
467
py
Python
equipment/serializers.py
WesGtoX/fpso-management
a6e07fdd921f58f82db5f488f33b120306ab2ce9
[ "MIT" ]
null
null
null
equipment/serializers.py
WesGtoX/fpso-management
a6e07fdd921f58f82db5f488f33b120306ab2ce9
[ "MIT" ]
null
null
null
equipment/serializers.py
WesGtoX/fpso-management
a6e07fdd921f58f82db5f488f33b120306ab2ce9
[ "MIT" ]
null
null
null
from rest_framework import serializers from equipment.models import Equipment class EquipmentCreateSerializer(serializers.ModelSerializer): class Meta: model = Equipment fields = ('id', 'name', 'code', 'location', 'status', 'vessel') read_only_fields = ('status',) class EquipmentRetriev...
25.944444
71
0.678801
6fd2c4b42a54f1727ef3049e4f7689e0a4251bf1
3,873
py
Python
queue-health/poll/poller.py
nikhiljindal/test-infra
3b7081b1d4eceffb74a31f50b6b84cfc19c45f98
[ "Apache-2.0" ]
null
null
null
queue-health/poll/poller.py
nikhiljindal/test-infra
3b7081b1d4eceffb74a31f50b6b84cfc19c45f98
[ "Apache-2.0" ]
null
null
null
queue-health/poll/poller.py
nikhiljindal/test-infra
3b7081b1d4eceffb74a31f50b6b84cfc19c45f98
[ "Apache-2.0" ]
2
2018-06-05T08:43:58.000Z
2019-08-24T22:11:19.000Z
#!/usr/bin/env python # Copyright 2016 The Kubernetes 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 # # Unle...
31.745902
106
0.619158
3da27b512d225a819bc690c4bae0e888ceb16a2f
726
py
Python
labs/models.py
babraham123/mysite
76a792b18bc6404bec1281bc7c2d69b738aa03d1
[ "MIT" ]
null
null
null
labs/models.py
babraham123/mysite
76a792b18bc6404bec1281bc7c2d69b738aa03d1
[ "MIT" ]
null
null
null
labs/models.py
babraham123/mysite
76a792b18bc6404bec1281bc7c2d69b738aa03d1
[ "MIT" ]
null
null
null
from django.db import models from django import forms class Table(models.Model): title = models.CharField(max_length=200) key = models.CharField(max_length=100) ip = models.GenericIPAddressField() port = models.PositiveIntegerField() def __unicode__(self): return self.title class KeyForm(f...
33
71
0.731405
5e180aabe0f96b08c70d947e664dd2ab473bf1da
6,582
py
Python
models/GRCN.py
STK101/GRCN
7389000a13d5969bcc77dc4cf73a4107acc68403
[ "MIT" ]
null
null
null
models/GRCN.py
STK101/GRCN
7389000a13d5969bcc77dc4cf73a4107acc68403
[ "MIT" ]
null
null
null
models/GRCN.py
STK101/GRCN
7389000a13d5969bcc77dc4cf73a4107acc68403
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch_geometric.nn import GCNConv, SGConv, GATConv, knn_graph from sklearn.neighbors import kneighbors_graph from sklearn.metrics.pairwise import rbf_kernel import numpy as np from .model_utils import GCNConv_diag, GCNConv_dense, EOS import...
47.014286
142
0.601945
65495a4374c18884d615339f62d7198fbf2ebd26
3,480
py
Python
nwd/trie.py
taiyingchen/new-word-detection
9ab95cffccdf79c93d134b27340559773093df3b
[ "BSD-3-Clause" ]
3
2020-05-02T09:20:46.000Z
2021-04-14T15:21:38.000Z
nwd/trie.py
dying1020/new-word-detection
9ab95cffccdf79c93d134b27340559773093df3b
[ "BSD-3-Clause" ]
null
null
null
nwd/trie.py
dying1020/new-word-detection
9ab95cffccdf79c93d134b27340559773093df3b
[ "BSD-3-Clause" ]
null
null
null
import os import pickle from queue import Queue from collections import defaultdict from marisa_trie import BytesTrie INT_BYTES = 4 BYTEORDER = 'big' class Trie(object): def __init__(self): self.root = {'children': {}, 'depth': 0} self.total = 0 self.trie_file_path = os.path.join( ...
30
126
0.528448
583762d4041d52849230cbf4c0fa934ee926a9e7
776
py
Python
qiniu4tornado/main.py
EnjoyOnlineLtd/qiniu4tornado
b02a3f964c8857050ab1ea7f9705b61631e28d76
[ "MIT" ]
null
null
null
qiniu4tornado/main.py
EnjoyOnlineLtd/qiniu4tornado
b02a3f964c8857050ab1ea7f9705b61631e28d76
[ "MIT" ]
null
null
null
qiniu4tornado/main.py
EnjoyOnlineLtd/qiniu4tornado
b02a3f964c8857050ab1ea7f9705b61631e28d76
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- import argparse from qiniu4tornado import etag def main(): parser = argparse.ArgumentParser(prog='qiniu') sub_parsers = parser.add_subparsers() parser_etag = sub_parsers.add_parser( 'etag', description='calculate the etag of the file', help='etag [...
22.171429
84
0.604381
f23ba00a7274a2ae568b51f01cd834aa488cbead
30,115
py
Python
tensor2tensor/layers/latent_layers.py
vishwas1234567/tensor2tensor
d62e2ee1b069d3d9b327d4d2dd6f9e50b7e62bb3
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/latent_layers.py
vishwas1234567/tensor2tensor
d62e2ee1b069d3d9b327d4d2dd6f9e50b7e62bb3
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/latent_layers.py
vishwas1234567/tensor2tensor
d62e2ee1b069d3d9b327d4d2dd6f9e50b7e62bb3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # 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...
39.677207
80
0.649743
cd36d5703e99df029a12169db4668bf17d868c92
2,088
py
Python
benchmark/openweathermap/thrift/run.py
jviotti/binary-json-size-benchmark
a515dfd05736204fb36d3571a6a6b17e5f6e4916
[ "Apache-2.0" ]
2
2022-01-14T06:09:26.000Z
2022-02-04T02:13:03.000Z
benchmark/openweathermap/thrift/run.py
jviotti/binary-json-size-benchmark
a515dfd05736204fb36d3571a6a6b17e5f6e4916
[ "Apache-2.0" ]
null
null
null
benchmark/openweathermap/thrift/run.py
jviotti/binary-json-size-benchmark
a515dfd05736204fb36d3571a6a6b17e5f6e4916
[ "Apache-2.0" ]
null
null
null
def encode(json, schema): payload = schema.Main() payload.coord = schema.Coord() payload.coord.lon = json['coord']['lon'] payload.coord.lat = json['coord']['lat'] payload.weather = [ schema.Weather() ] payload.weather[0].id = json['weather'][0]['id'] payload.weather[0].main = json['weather'...
31.636364
70
0.613506
69e008dddf3b9176d3b4d9ed04bc12d731d81137
1,514
py
Python
application.py
sumandari/gis0
2a61d1e7cf506c3f31c49b2d5b075669a88e2248
[ "MIT" ]
null
null
null
application.py
sumandari/gis0
2a61d1e7cf506c3f31c49b2d5b075669a88e2248
[ "MIT" ]
null
null
null
application.py
sumandari/gis0
2a61d1e7cf506c3f31c49b2d5b075669a88e2248
[ "MIT" ]
null
null
null
from flask import Flask, render_template, url_for, jsonify, request from pymongo import MongoClient import datetime from pprint import pprint import re app = Flask(__name__) client = MongoClient() db = client.gis0 @app.route('/') def index(): return render_template("leaflet2.html") @app.route('/search', method...
33.644444
106
0.641347
39d2e46e36d7d83d004db5a80a84576875227f85
2,248
py
Python
Toolkits/VCS/repology__repology-api/repology/parser/freebsd.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/VCS/repology__repology-api/repology/parser/freebsd.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/VCS/repology__repology-api/repology/parser/freebsd.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
# Copyright (C) 2016-2017 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your optio...
29.973333
128
0.612544
137973efc174b12637828d333ad0a95ee7a97135
30,823
py
Python
implementation/baseline.py
JoshuaW1990/bus_arrival_prediction
ee7aa06d849d4ea5307b5c650fed6d468d95f02e
[ "MIT" ]
12
2017-02-01T15:09:23.000Z
2022-01-03T03:27:26.000Z
implementation/baseline.py
JoshuaW1990/bus_arrival_prediction
ee7aa06d849d4ea5307b5c650fed6d468d95f02e
[ "MIT" ]
1
2019-11-28T14:09:09.000Z
2019-11-28T14:09:09.000Z
implementation/baseline.py
JoshuaW1990/bus_arrival_prediction
ee7aa06d849d4ea5307b5c650fed6d468d95f02e
[ "MIT" ]
3
2018-07-25T15:52:25.000Z
2021-05-10T12:07:27.000Z
""" Calculate and assess the estimated arrival time with different baseline algorithm """ # import modules import pandas as pd import os from datetime import timedelta, datetime ################################################################################################################# # help...
51.200997
207
0.677838
011e9c301cc6770e6993ce5dbd8345fccf99482a
213
py
Python
Python/100Excersises/76 to 100/85/.history/85_20201119144236.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
Python/100Excersises/76 to 100/85/.history/85_20201119144236.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
1
2021-07-24T03:18:30.000Z
2021-07-24T12:45:07.000Z
Python/100Excersises/76 to 100/85/.history/85_20201119144236.py
sugamkarki/NAMI-Year-II-TERM-I-Group_Project
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
myFile=open("c.txt","r") countriesRaw=myFile.read() countriesNeat='' countriesRaw.split() list1=list(map(list,countriesRaw)) # print(countriesRaw) print(type(list1)) for country in countriesRaw: print(country)
23.666667
34
0.760563
ec2173f389509fb8f8ae98e5bcd56ad6546a29a1
10,844
py
Python
models/dataloader/transform/wav.py
ZhangYikaii/Proto-CAT
57bb2c7fd88a9489faa88e3b904218bf5fb01b4e
[ "MIT" ]
2
2021-10-03T02:31:22.000Z
2021-10-09T01:31:50.000Z
models/dataloader/transform/wav.py
ZhangYikaii/Proto-CAT
57bb2c7fd88a9489faa88e3b904218bf5fb01b4e
[ "MIT" ]
null
null
null
models/dataloader/transform/wav.py
ZhangYikaii/Proto-CAT
57bb2c7fd88a9489faa88e3b904218bf5fb01b4e
[ "MIT" ]
null
null
null
# import numpy as np # import torch # import torchvision as tv # import librosa # import random # def scale(old_value, old_min, old_max, new_min, new_max): # old_range = (old_max - old_min) # new_range = (new_max - new_min) # new_value = (((old_value - old_min) * new_range) / old_range) + new_min # ...
30.038781
120
0.573312
002328c71992cb6f88a78aacd6d4ce3836f825ab
912
py
Python
BayesMadeSimple/dice_soln.py
sunny2309/scipy_conf_notebooks
30a85d5137db95e01461ad21519bc1bdf294044b
[ "MIT" ]
2
2021-01-09T15:57:26.000Z
2021-11-29T01:44:21.000Z
BayesMadeSimple/dice_soln.py
sunny2309/scipy_conf_notebooks
30a85d5137db95e01461ad21519bc1bdf294044b
[ "MIT" ]
5
2019-11-15T02:00:26.000Z
2021-01-06T04:26:40.000Z
BayesMadeSimple/dice_soln.py
sunny2309/scipy_conf_notebooks
30a85d5137db95e01461ad21519bc1bdf294044b
[ "MIT" ]
null
null
null
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division from thinkbayes import Suite class Dice(Suite): """Represents hy...
20.727273
68
0.623904
2c1727b6b32a8cd31b8a4f335cf3ac62c55c77fe
71,850
py
Python
mesonbuild/mesonlib.py
MisterDA/meson
e6a167ce092a36017a4ff56b3fb045be62377a25
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
MisterDA/meson
e6a167ce092a36017a4ff56b3fb045be62377a25
[ "Apache-2.0" ]
null
null
null
mesonbuild/mesonlib.py
MisterDA/meson
e6a167ce092a36017a4ff56b3fb045be62377a25
[ "Apache-2.0" ]
null
null
null
# Copyright 2012-2020 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agree...
35.446473
152
0.603869
430d09e89786800d541f740a7e6fa36a94ed5494
2,226
py
Python
weapon.py
cheramilm/qieziparty
350825576f40736f13ab61109692185771996071
[ "CC0-1.0" ]
null
null
null
weapon.py
cheramilm/qieziparty
350825576f40736f13ab61109692185771996071
[ "CC0-1.0" ]
null
null
null
weapon.py
cheramilm/qieziparty
350825576f40736f13ab61109692185771996071
[ "CC0-1.0" ]
null
null
null
from constants import * from random import * class Weapon: name = '' attackValue = 0 leftTimes = 0 totalTimes = 0 position = 0 def __init__(self, name, attack_value, left_times): self.name = name self.attackValue = attack_value self.leftTimes = left_times self....
30.916667
110
0.552561
46902cc7f49c279a1df1d19fbaafb982eda9d750
19,445
py
Python
other_models/sonet/layers.py
ZJUCAGD/GTS-CNN
a329f314b795f0dea0f46db623ac955a47619e7d
[ "MIT" ]
null
null
null
other_models/sonet/layers.py
ZJUCAGD/GTS-CNN
a329f314b795f0dea0f46db623ac955a47619e7d
[ "MIT" ]
null
null
null
other_models/sonet/layers.py
ZJUCAGD/GTS-CNN
a329f314b795f0dea0f46db623ac955a47619e7d
[ "MIT" ]
null
null
null
import os, sys DIR = os.path.dirname(__file__) ROOT_DIR = os.path.abspath(os.path.join(DIR, '../../')) sys.path.append(ROOT_DIR) import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from torch.nn.modules.batchnorm import _BatchNorm import numpy as np import math import...
42.736264
196
0.627822
f2858ccc56fa4e71e5e6887a1d916b7576ea8994
4,915
py
Python
src/oci/cims/models/update_activity_item_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/cims/models/update_activity_item_details.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/cims/models/update_activity_item_details.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...
35.615942
245
0.6706
3781b415c2b371e29e099dc93269c12029822659
23,629
py
Python
pageObjects/common_functions/common_methods.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
pageObjects/common_functions/common_methods.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
pageObjects/common_functions/common_methods.py
harry-100/qa-automation-framework
5fbe03e930820537e53f2d26b1c2b2bd2b222bf5
[ "MIT" ]
null
null
null
from time import sleep from selenium.webdriver.support.ui import WebDriverWait from pageObjects.client.contact_clinical.pharma_data_page import PharmaDataPage from utilities.BasePage import BasePage from pageObjects.calendar.full_calendar.calender_page import CalendarPage from pageObjects.calendar.full_calendar.client_...
41.969805
109
0.659359
434a3dbb80ac0282e2672f51f9e479af14b08308
968
py
Python
scripts/insert_sims.py
jennhsiao/ideotype
26406ddc66e091e918ceff212638a02e9cfbdb46
[ "MIT" ]
2
2021-01-08T03:21:48.000Z
2021-04-08T00:21:32.000Z
scripts/insert_sims.py
jennhsiao/ideotype
26406ddc66e091e918ceff212638a02e9cfbdb46
[ "MIT" ]
null
null
null
scripts/insert_sims.py
jennhsiao/ideotype
26406ddc66e091e918ceff212638a02e9cfbdb46
[ "MIT" ]
null
null
null
""" Debug error when inserting simulation outputs into DB. - Leveraging options in insert_sims to batch save records to DB at a smaller number, making it easier to debug errors. - Also starting import from specified year & cultivar to narrow down search range. """ from ideotype import insert_sims fpath_db = '/home/d...
37.230769
74
0.765496
fc2d047df1b2882e1247fb23d0489648fff60f4f
1,116
py
Python
dependencies/ui/tab2/parameter_setter.py
statisticalbiotechnology/quandenser-pipeline
4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3
[ "Apache-2.0" ]
8
2019-05-17T14:45:30.000Z
2021-06-24T15:53:34.000Z
dependencies/ui/tab2/parameter_setter.py
statisticalbiotechnology/quandenser-pipeline
4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3
[ "Apache-2.0" ]
33
2019-03-07T09:00:11.000Z
2021-09-07T07:47:18.000Z
dependencies/ui/tab2/parameter_setter.py
statisticalbiotechnology/quandenser-pipeline
4175f7d3de29d08dbb53e0e4f1b0f2fba8147df3
[ "Apache-2.0" ]
1
2019-11-21T12:32:07.000Z
2019-11-21T12:32:07.000Z
import sys from PySide2.QtWidgets import QDoubleSpinBox, QSpinBox # Custom parser for both sh files and nf configs from custom_config_parser import custom_config_parser class parameter_setter_single(QSpinBox): def __init__(self, parameter, nf_settings_path): super(parameter_setter_single,self).__init__(pa...
34.875
71
0.65233
d5eb53c21890feffde8916104737c3ca7186f63c
30,377
py
Python
jams/kriging.py
mcuntz/jams_python
41b4504d2f55a77a7876fc6d146e4eb91dd8b2b9
[ "MIT" ]
9
2019-06-03T03:24:16.000Z
2021-12-03T07:14:00.000Z
jams/kriging.py
mcuntz/jams_python
41b4504d2f55a77a7876fc6d146e4eb91dd8b2b9
[ "MIT" ]
6
2020-03-25T21:56:59.000Z
2021-11-08T14:58:27.000Z
jams/kriging.py
mcuntz/jams_python
41b4504d2f55a77a7876fc6d146e4eb91dd8b2b9
[ "MIT" ]
5
2019-10-17T12:04:33.000Z
2021-09-28T07:45:07.000Z
#!/usr/bin/env python from __future__ import division, absolute_import, print_function import numpy as np from scipy.spatial.distance import pdist, squareform __all__ = ['kriging'] def kriging(x, y, z, semi_mod, semi_popt, xnew=None, ynew=None, plot=False, masked=False, silent=True, eop=None, block=Fals...
42.307799
85
0.512822
ce52f2ad6413db99635437824abb70faba999862
2,756
py
Python
dreg_client/registry.py
djmattyg007/dreg-client
4f5c4c427d2ee721e68a63df1b8c5c7ded8361c6
[ "Apache-2.0" ]
3
2021-09-05T14:35:43.000Z
2022-03-04T16:16:43.000Z
dreg_client/registry.py
djmattyg007/dreg-client
4f5c4c427d2ee721e68a63df1b8c5c7ded8361c6
[ "Apache-2.0" ]
2
2022-01-17T15:05:28.000Z
2022-03-09T13:14:25.000Z
dreg_client/registry.py
djmattyg007/dreg-client
4f5c4c427d2ee721e68a63df1b8c5c7ded8361c6
[ "Apache-2.0" ]
1
2022-03-08T08:58:59.000Z
2022-03-08T08:58:59.000Z
from __future__ import annotations from typing import TYPE_CHECKING, Dict, Mapping, Optional, Sequence from .client import Client from .repository import Repository if TYPE_CHECKING: from requests_toolbelt.sessions import BaseUrlSession from ._types import RequestsAuth from .auth_service import AuthSer...
29.956522
93
0.616836
9f94a28d8d4b5df6edfc6cf0a105408beb0f57a8
1,515
py
Python
tests/scenes/test_threepointlighting.py
patrickkesper/amira_blender_rendering
acea7b1727e5eb93998cb3154fb2080122962505
[ "ECL-2.0", "Apache-2.0" ]
26
2020-11-13T18:57:40.000Z
2022-03-08T18:54:02.000Z
tests/scenes/test_threepointlighting.py
patrickkesper/amira_blender_rendering
acea7b1727e5eb93998cb3154fb2080122962505
[ "ECL-2.0", "Apache-2.0" ]
7
2021-01-21T11:56:46.000Z
2021-09-22T08:39:10.000Z
tests/scenes/test_threepointlighting.py
patrickkesper/amira_blender_rendering
acea7b1727e5eb93998cb3154fb2080122962505
[ "ECL-2.0", "Apache-2.0" ]
6
2020-11-19T15:46:33.000Z
2021-03-26T05:42:44.000Z
#!/usr/bin/env python # Copyright (c) 2020 - for information on the respective copyright owner # see the NOTICE file and/or the repository # <https://github.com/boschresearch/amira-blender-rendering>. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance w...
30.3
92
0.745215
61f3e1de78a84cce507bc846c5e873674a6a9c45
523
py
Python
test/rdb_workloads/insert_many.py
zadcha/rethinkdb
bb4f5cc28242dc1e29e9a46a8a931ec54420070c
[ "Apache-2.0" ]
21,684
2015-01-01T03:42:20.000Z
2022-03-30T13:32:44.000Z
test/rdb_workloads/insert_many.py
RethonkDB/rethonkdb
8c9c1ddc71b1b891fdb8aad7ca5891fc036b80ee
[ "Apache-2.0" ]
4,067
2015-01-01T00:04:51.000Z
2022-03-30T13:42:56.000Z
test/rdb_workloads/insert_many.py
RethonkDB/rethonkdb
8c9c1ddc71b1b891fdb8aad7ca5891fc036b80ee
[ "Apache-2.0" ]
1,901
2015-01-01T21:05:59.000Z
2022-03-21T08:14:25.000Z
#!/usr/bin/env python import sys, socket, random, time, os sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import rdb_workload_common from vcoptparse import * op = rdb_workload_common.option_parser_for_connect() op["count"] = IntFlag("--count", 10000) opts = op.parse...
37.357143
99
0.751434
ee314e42bd11e45bf26f53de99e02541b6d61d4d
989
py
Python
leetcode/337_house_robber_III/337_house_robber_III.py
ryangillard/misc
d1f9919400636e6b988fa933493b94829a73331e
[ "Apache-2.0" ]
null
null
null
leetcode/337_house_robber_III/337_house_robber_III.py
ryangillard/misc
d1f9919400636e6b988fa933493b94829a73331e
[ "Apache-2.0" ]
null
null
null
leetcode/337_house_robber_III/337_house_robber_III.py
ryangillard/misc
d1f9919400636e6b988fa933493b94829a73331e
[ "Apache-2.0" ]
null
null
null
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def rob(self, root): """ :type root: TreeNode :rtype: int """ return max(self.dfs...
29.969697
106
0.604651
f7f418828c250c2b31f208cd61683f6e653e9bf9
1,780
py
Python
h2o-py/tests/testdir_misc/pyunit_xgboost_gbm_monotone.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
6,098
2015-05-22T02:46:12.000Z
2022-03-31T16:54:51.000Z
h2o-py/tests/testdir_misc/pyunit_xgboost_gbm_monotone.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2,517
2015-05-23T02:10:54.000Z
2022-03-30T17:03:39.000Z
h2o-py/tests/testdir_misc/pyunit_xgboost_gbm_monotone.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2,199
2015-05-22T04:09:55.000Z
2022-03-28T22:20:45.000Z
from h2o.estimators.xgboost import * from h2o.estimators.gbm import * from tests import pyunit_utils def xgboost_vs_gbm_monotone_test(): assert H2OXGBoostEstimator.available() is True monotone_constraints = { "AGE": 1 } xgboost_params = { "tree_method": "exact", "seed": 123, ...
34.901961
101
0.710674
a4ceee23ae123a5c0e16835dba2b4fd9c8f8e29e
2,108
py
Python
simple_Keras_Model.py
shlpu/Statlie-Image-Processor
e40355f43f344fd02041bdc8ce57b0ee101c6cdb
[ "Apache-2.0" ]
1
2019-11-23T12:58:09.000Z
2019-11-23T12:58:09.000Z
simple_Keras_Model.py
shlpu/Statlie-Image-Processor
e40355f43f344fd02041bdc8ce57b0ee101c6cdb
[ "Apache-2.0" ]
null
null
null
simple_Keras_Model.py
shlpu/Statlie-Image-Processor
e40355f43f344fd02041bdc8ce57b0ee101c6cdb
[ "Apache-2.0" ]
3
2019-03-27T00:47:08.000Z
2022-02-05T04:52:48.000Z
from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import MaxPooling2D, Conv2D from keras.utils import to_categorical from keras.optimizers import rmsprop from keras.preprocessing.image import ImageDataGenerator import os save_dir = os.path.join(os.getcw...
28.876712
85
0.739089
dffc7d0930e0f07ea5b31049ff101c62dd05c5f4
2,111
py
Python
raiden/tests/integration/cli/conftest.py
konradkonrad/raiden
b2fe21eb20cd34a689b8449488f4dc52dbe93069
[ "MIT" ]
null
null
null
raiden/tests/integration/cli/conftest.py
konradkonrad/raiden
b2fe21eb20cd34a689b8449488f4dc52dbe93069
[ "MIT" ]
null
null
null
raiden/tests/integration/cli/conftest.py
konradkonrad/raiden
b2fe21eb20cd34a689b8449488f4dc52dbe93069
[ "MIT" ]
null
null
null
import pytest from raiden.settings import RED_EYES_CONTRACT_VERSION from raiden.tests.utils.smoketest import setup_testchain_and_raiden def append_arg_if_existing(argname, initial_args, new_args): cliname = '--' + argname.replace('_', '-') if argname in initial_args: new_args.extend([cliname, initial...
30.157143
67
0.705827
63901bb5ba904e022f6823a15cbbcc0adc356fca
2,448
py
Python
Algorithms_and_Data_Structure/Implementing_Queue_in_Python.py
nyangweso-rodgers/Computer_Science_Concepts
94e4d4fe7c892b6e1f3684250c540463c83a7b10
[ "Apache-2.0" ]
null
null
null
Algorithms_and_Data_Structure/Implementing_Queue_in_Python.py
nyangweso-rodgers/Computer_Science_Concepts
94e4d4fe7c892b6e1f3684250c540463c83a7b10
[ "Apache-2.0" ]
null
null
null
Algorithms_and_Data_Structure/Implementing_Queue_in_Python.py
nyangweso-rodgers/Computer_Science_Concepts
94e4d4fe7c892b6e1f3684250c540463c83a7b10
[ "Apache-2.0" ]
null
null
null
# Implementing Queue Data Structure ''' For Implementing a Queue in Python we will make use of List First ''' price = [] price.insert(0,100) # whenever we insert element at 0th position the older element is pushed forward price.insert(0,200) price.insert(0,300) print(price) # output will be [300,200,100] ''' So what...
33.081081
275
0.707925
69e41b4844537d2e20df69dc44bf3d6b310d81b4
127
py
Python
app_settings.py
mysiar/seismic-offset-check
b1a0fab8799dc56b156d759015cebbe8c705f739
[ "MIT" ]
null
null
null
app_settings.py
mysiar/seismic-offset-check
b1a0fab8799dc56b156d759015cebbe8c705f739
[ "MIT" ]
null
null
null
app_settings.py
mysiar/seismic-offset-check
b1a0fab8799dc56b156d759015cebbe8c705f739
[ "MIT" ]
null
null
null
""" App Settings """ ORG = 'mysiar' APP = 'SeismicOffsetCheck' LIMIT_X = 'limit_x' LIMIT_Y = 'limit_y' DB_PATH = 'db_path'
14.111111
26
0.653543
e522a840605dddbd552dc6400a994f3a0132896d
1,037
py
Python
tests/test_scheduler_cancel.py
mpi-sws-rse/antevents-python
5b9226813583141986014fc83f6f74342a5f271e
[ "Apache-2.0" ]
7
2016-09-27T00:21:46.000Z
2017-03-18T20:04:29.000Z
tests/test_scheduler_cancel.py
mpi-sws-rse/antevents-python
5b9226813583141986014fc83f6f74342a5f271e
[ "Apache-2.0" ]
null
null
null
tests/test_scheduler_cancel.py
mpi-sws-rse/antevents-python
5b9226813583141986014fc83f6f74342a5f271e
[ "Apache-2.0" ]
2
2017-03-16T21:47:43.000Z
2020-10-20T22:58:03.000Z
# Copyright 2016 by MPI-SWS and Data-Ken Research. # Licensed under the Apache 2.0 License. """Cancel an active schedule. Since this is the last active schedule, it should cleanly stop the scheduler. """ from antevents.base import * from utils import make_test_publisher import asyncio import unittest class CallAfter(...
28.027027
72
0.671167
841e4642ffa496d6fa3d86792df80918d5884e53
1,266
py
Python
test/test_operations.py
azavea/tr-55
654b1ef65b031f87dbe5715934b4a3547c3c0c85
[ "Apache-2.0" ]
8
2016-10-06T07:03:52.000Z
2022-01-01T08:01:11.000Z
test/test_operations.py
azavea/tr-55
654b1ef65b031f87dbe5715934b4a3547c3c0c85
[ "Apache-2.0" ]
54
2015-05-01T15:02:20.000Z
2021-09-23T22:08:57.000Z
test/test_operations.py
azavea/tr-55
654b1ef65b031f87dbe5715934b4a3547c3c0c85
[ "Apache-2.0" ]
10
2015-04-30T20:00:55.000Z
2021-09-17T15:13:56.000Z
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division """ Operation tests. """ import unittest from tr55.operations import dict_plus class TestOperations(unittest.TestCase): """ Dictionary operation test set. """ def te...
26.93617
78
0.458926
2070ea9c3fe97292077255bf1ea72f799a5b415c
4,168
py
Python
discord/types/channel.py
ryry013/pycord
6a9ea97d12b919cf4cc55dc46edace9629997c14
[ "MIT" ]
null
null
null
discord/types/channel.py
ryry013/pycord
6a9ea97d12b919cf4cc55dc46edace9629997c14
[ "MIT" ]
null
null
null
discord/types/channel.py
ryry013/pycord
6a9ea97d12b919cf4cc55dc46edace9629997c14
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Pycord Development Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limit...
24.232558
75
0.759837