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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f72d0628837767bf0423dbc36d367e46cce6f424
3,323
py
Python
src/logistic_regression.py
MehdiAbbanaBennani/statistical-optimisation
0de96661ca7ab857639ad14127b97af39321762e
[ "MIT" ]
null
null
null
src/logistic_regression.py
MehdiAbbanaBennani/statistical-optimisation
0de96661ca7ab857639ad14127b97af39321762e
[ "MIT" ]
null
null
null
src/logistic_regression.py
MehdiAbbanaBennani/statistical-optimisation
0de96661ca7ab857639ad14127b97af39321762e
[ "MIT" ]
null
null
null
import numpy as np from tqdm import tqdm from gradient import Gradient class LogisticRegression: def __init__(self, type, mu, gradient_param, data, d=100, theta=None): if theta is None: self.theta = np.random.rand(d) * 2 - 1 else: self.theta = theta self.type = ty...
33.908163
82
0.520012
import numpy as np from tqdm import tqdm from gradient import Gradient class LogisticRegression: def __init__(self, type, mu, gradient_param, data, d=100, theta=None): if theta is None: self.theta = np.random.rand(d) * 2 - 1 else: self.theta = theta self.type = ty...
true
true
f72d0638d4148f7ac1513563b596e331e42a1b8a
1,461
py
Python
Advance_Python/Linked_List/Search_Ele_In_SLL.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
Advance_Python/Linked_List/Search_Ele_In_SLL.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
Advance_Python/Linked_List/Search_Ele_In_SLL.py
siddharth-143/Python
293f4643a3a13e3b82d23fd8922db54dbb0f12bc
[ "MIT" ]
null
null
null
""" Python program to search for an element in the linked list using recursion """ class Node: def __init__(self, data): self.data = data self.next = None class Linked_list: def __init__(self): self.head = None self.last_node = None def append(self, data): if s...
26.563636
78
0.590691
class Node: def __init__(self, data): self.data = data self.next = None class Linked_list: def __init__(self): self.head = None self.last_node = None def append(self, data): if self.last_node is None: self.head = Node(data) self.last_node = ...
true
true
f72d0862c33d21e1bd9da9c2c2fa5d10f09f06f4
4,140
py
Python
pystratis/api/federation/tests/test_federation.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
pystratis/api/federation/tests/test_federation.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
pystratis/api/federation/tests/test_federation.py
madrazzl3/pystratis
8b78552e753ae1d12f2afb39e9a322a270fbb7b3
[ "MIT" ]
null
null
null
import pytest from pytest_mock import MockerFixture from pystratis.api.federation.responsemodels import * from pystratis.api.federation import Federation from pystratis.core.networks import StraxMain, CirrusMain def test_all_strax_endpoints_implemented(strax_swagger_json): paths = [key.lower() for key in strax_sw...
38.333333
100
0.700966
import pytest from pytest_mock import MockerFixture from pystratis.api.federation.responsemodels import * from pystratis.api.federation import Federation from pystratis.core.networks import StraxMain, CirrusMain def test_all_strax_endpoints_implemented(strax_swagger_json): paths = [key.lower() for key in strax_sw...
true
true
f72d089f873a7c0b075b4dd30a15b63980100580
20,269
py
Python
tools/ami-creator/scripts/win2019_cuda11_installer.py
mseth10/incubator-mxnet-ci
36a5050b9c7bd720a4aa87d225738400083d611d
[ "Apache-2.0" ]
10
2019-08-19T17:12:52.000Z
2021-11-07T21:25:32.000Z
tools/ami-creator/scripts/win2019_cuda11_installer.py
mseth10/incubator-mxnet-ci
36a5050b9c7bd720a4aa87d225738400083d611d
[ "Apache-2.0" ]
16
2019-10-22T17:07:40.000Z
2022-02-08T23:33:27.000Z
tools/ami-creator/scripts/win2019_cuda11_installer.py
mseth10/incubator-mxnet-ci
36a5050b9c7bd720a4aa87d225738400083d611d
[ "Apache-2.0" ]
15
2019-08-25T18:44:54.000Z
2021-11-07T21:25:25.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
42.852008
227
0.660763
__author__ = 'Pedro Larroy, Chance Bair, Joe Evans' __version__ = '0.4' import argparse import errno import logging import os import psutil import shutil import subprocess import urllib import stat import tempfile import zipfile from time import sleep from urllib.error import HTTPError import logging from subproces...
true
true
f72d09e2fff6278a2ca4a3ec916f0240a3598469
2,143
py
Python
tests/examples/test_examples.py
ibraheemmmoosa/lightning-flash
c60fef81b27174543d7ad3a4d841faf71ad8536c
[ "Apache-2.0" ]
2
2021-06-25T08:42:36.000Z
2021-06-25T08:49:29.000Z
tests/examples/test_examples.py
edenlightning/lightning-flash
841986aa0081bdeaf785d1ed4c48dd108fa69a78
[ "Apache-2.0" ]
null
null
null
tests/examples/test_examples.py
edenlightning/lightning-flash
841986aa0081bdeaf785d1ed4c48dd108fa69a78
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning 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 agreed to i...
31.514706
81
0.674755
import subprocess import sys from pathlib import Path from typing import List, Optional, Tuple import pytest root = Path(__file__).parent.parent.parent def call_script(filepath: str, args: Optional[List[str]] = None, timeout: Optional[int] = 60 * 5) -> Tuple[int, str, str]: if ar...
true
true
f72d0a505a4a11b305a59432ae84c13cac527366
1,848
py
Python
tests/functional/tests/rbd-mirror/test_rbd_mirror.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
1,570
2015-01-03T08:38:22.000Z
2022-03-31T09:24:37.000Z
tests/functional/tests/rbd-mirror/test_rbd_mirror.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
4,964
2015-01-05T10:41:44.000Z
2022-03-31T07:59:49.000Z
tests/functional/tests/rbd-mirror/test_rbd_mirror.py
u-kosmonaft-u/ceph-ansible
14c472707c165f77def05826b22885480af3e8f9
[ "Apache-2.0" ]
1,231
2015-01-04T11:48:16.000Z
2022-03-31T12:15:28.000Z
import pytest import json class TestRbdMirrors(object): @pytest.mark.no_docker def test_rbd_mirror_is_installed(self, node, host): assert host.package("rbd-mirror").is_installed def test_rbd_mirror_service_enabled_and_running(self, node, host): service_name = "ceph-rbd-mirror@rbd-mirror....
42
216
0.62987
import pytest import json class TestRbdMirrors(object): @pytest.mark.no_docker def test_rbd_mirror_is_installed(self, node, host): assert host.package("rbd-mirror").is_installed def test_rbd_mirror_service_enabled_and_running(self, node, host): service_name = "ceph-rbd-mirror@rbd-mirror....
true
true
f72d0b8d703a8988d4c6fdaaab16ad16480f62ab
10,785
py
Python
src/summarycode/summarizer.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
src/summarycode/summarizer.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
src/summarycode/summarizer.py
sthagen/nexB-scancode-toolkit
12cc1286df78af898fae76fa339da2bb50ad51b9
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# # Copyright (c) nexB Inc. and others. All rights reserved. # ScanCode is a trademark of nexB Inc. # SPDX-License-Identifier: Apache-2.0 # See http://www.apache.org/licenses/LICENSE-2.0 for the license text. # See https://github.com/nexB/scancode-toolkit for support or download. # See https://aboutcode.org for more in...
33.915094
99
0.697636
from collections import defaultdict import attr import fingerprints from commoncode.cliutils import POST_SCAN_GROUP, PluggableCommandLineOption from license_expression import Licensing from plugincode.post_scan import PostScanPlugin, post_scan_impl from cluecode.copyrights import CopyrightDetector from packagedcode....
true
true
f72d0b98b7272d4c524f74d442bb17b81bda3d2a
1,257
py
Python
salt/pillar/varstack_pillar.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
3
2015-04-16T18:42:35.000Z
2017-10-30T16:57:49.000Z
salt/pillar/varstack_pillar.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
16
2015-11-18T00:44:03.000Z
2018-10-29T20:48:27.000Z
salt/pillar/varstack_pillar.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
4
2020-11-04T06:28:05.000Z
2022-02-09T10:54:49.000Z
# -*- coding: utf-8 -*- ''' Use `Varstack <https://github.com/conversis/varstack>`_ data as a Pillar source Configuring Varstack ==================== Using varstack in Salt is fairly simple. Just put the following into the config file of your master: .. code-block:: yaml ext_pillar: - varstack: /etc/varst...
22.854545
79
0.703262
from __future__ import absolute_import import logging HAS_VARSTACK = False try: import varstack HAS_VARSTACK = True except ImportError: pass log = logging.getLogger(__name__) __virtualname__ = 'varstack' def __virtual__(): if not HAS_VARSTACK: return False return __virtualname__ def...
true
true
f72d0c4a82e81d1e634b40b84dd34a80b3db88c1
113
py
Python
Codeforces/637B Nastya and Door.py
a3X3k/Competitive-programing-hacktoberfest-2021
bc3997997318af4c5eafad7348abdd9bf5067b4f
[ "Unlicense" ]
12
2021-06-05T09:40:10.000Z
2021-10-07T17:59:51.000Z
Codeforces/637B Nastya and Door.py
a3X3k/Competitive-programing-hacktoberfest-2021
bc3997997318af4c5eafad7348abdd9bf5067b4f
[ "Unlicense" ]
21
2020-10-10T10:41:03.000Z
2020-10-31T10:41:23.000Z
Codeforces/637B Nastya and Door.py
a3X3k/Competitive-programing-hacktoberfest-2021
bc3997997318af4c5eafad7348abdd9bf5067b4f
[ "Unlicense" ]
67
2021-08-01T10:04:52.000Z
2021-10-10T00:25:04.000Z
t = int(input()) for t in range(t): m,d=map(int,input().split()) l = list(map(int,input().split()))
22.6
38
0.530973
t = int(input()) for t in range(t): m,d=map(int,input().split()) l = list(map(int,input().split()))
true
true
f72d0cd7918505dd6a72b02b05dfa02f870e64c9
710
py
Python
News163_Spider/News163_Spider/pipelines.py
a904919863/Spiders_Collection
970aef563971eba5c9dca5dfe1cd8790561941be
[ "MIT" ]
3
2022-02-23T02:44:47.000Z
2022-02-28T06:41:26.000Z
News163_Spider/News163_Spider/pipelines.py
a904919863/Spiders_Collection
970aef563971eba5c9dca5dfe1cd8790561941be
[ "MIT" ]
null
null
null
News163_Spider/News163_Spider/pipelines.py
a904919863/Spiders_Collection
970aef563971eba5c9dca5dfe1cd8790561941be
[ "MIT" ]
null
null
null
# Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class News163SpiderPipeline: fp = None ...
25.357143
66
0.64507
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html # useful for handling different item types with a single interface from itemadapter import ItemAdapter class News163SpiderPipeline: fp = None def open_spider(self,spider): print('开始爬虫......') self.fp = open('./news163.txt','w...
true
true
f72d0f27a1d1b5199bb5a8833ffec4a28cd377c8
2,104
py
Python
PasswordManager/LoginDialog.py
whymatter/PasswordManager
86070a1f998362cfa026e6e6e9b820a2d7ad5f06
[ "MIT" ]
null
null
null
PasswordManager/LoginDialog.py
whymatter/PasswordManager
86070a1f998362cfa026e6e6e9b820a2d7ad5f06
[ "MIT" ]
null
null
null
PasswordManager/LoginDialog.py
whymatter/PasswordManager
86070a1f998362cfa026e6e6e9b820a2d7ad5f06
[ "MIT" ]
null
null
null
import sys import os.path from PyQt5 import QtWidgets, uic from PyQt5.QtWidgets import QApplication, QTableWidgetItem from Crypto.Cipher import AES import json from constants import FILE_NAME, KEY_ENCODING from PwWindow import PwWindow # -*- coding: utf-8 -*- """ Created on Fri Nov 17 13:53:56 2017 @au...
30.492754
93
0.586502
import sys import os.path from PyQt5 import QtWidgets, uic from PyQt5.QtWidgets import QApplication, QTableWidgetItem from Crypto.Cipher import AES import json from constants import FILE_NAME, KEY_ENCODING from PwWindow import PwWindow class LoginDialog(QtWidgets.QDialog): def __init__(self, parent...
true
true
f72d0f3414639adbfb45b04d9d66268327301c51
380
py
Python
apps/db_data/migrations/0018_auto_20200723_2120.py
rhu2001/csua-backend
d2464c7eacfd1d675e0cc08f93f3b5083fa591dc
[ "MIT" ]
null
null
null
apps/db_data/migrations/0018_auto_20200723_2120.py
rhu2001/csua-backend
d2464c7eacfd1d675e0cc08f93f3b5083fa591dc
[ "MIT" ]
null
null
null
apps/db_data/migrations/0018_auto_20200723_2120.py
rhu2001/csua-backend
d2464c7eacfd1d675e0cc08f93f3b5083fa591dc
[ "MIT" ]
null
null
null
# Generated by Django 2.2.12 on 2020-07-24 04:20 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('db_data', '0017_notice'), ] operations = [ migrations.AlterField( model_name='officer', name='officer_since', ...
20
48
0.592105
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('db_data', '0017_notice'), ] operations = [ migrations.AlterField( model_name='officer', name='officer_since', field=models.DateField(blank=True), ...
true
true
f72d0f3e5dbf9fe0132a52a219eaa07ffb21b9cc
4,297
py
Python
npy_append_array/npy_append_array.py
synapticarbors/npy-append-array
bf33483e7c2c50e13c9e55940878ca8217f4d4ad
[ "MIT" ]
null
null
null
npy_append_array/npy_append_array.py
synapticarbors/npy-append-array
bf33483e7c2c50e13c9e55940878ca8217f4d4ad
[ "MIT" ]
null
null
null
npy_append_array/npy_append_array.py
synapticarbors/npy-append-array
bf33483e7c2c50e13c9e55940878ca8217f4d4ad
[ "MIT" ]
null
null
null
import numpy as np import os.path from struct import pack, unpack from io import BytesIO def header_tuple_dict(tuple_in): return { 'shape': tuple_in[0], 'fortran_order': tuple_in[1], 'descr': np.lib.format.dtype_to_descr(tuple_in[2]) } def has_fortran_order(arr): return not arr.fla...
29.431507
78
0.573191
import numpy as np import os.path from struct import pack, unpack from io import BytesIO def header_tuple_dict(tuple_in): return { 'shape': tuple_in[0], 'fortran_order': tuple_in[1], 'descr': np.lib.format.dtype_to_descr(tuple_in[2]) } def has_fortran_order(arr): return not arr.fla...
true
true
f72d0fdb931b1dcc84a293aeef05fc7e649e1c49
23
py
Python
prepack/__init__.py
CargoCodes/PreparePack
3d1d3623c0c86ab02a92a567ed954fb37e18b8fa
[ "MIT" ]
null
null
null
prepack/__init__.py
CargoCodes/PreparePack
3d1d3623c0c86ab02a92a567ed954fb37e18b8fa
[ "MIT" ]
null
null
null
prepack/__init__.py
CargoCodes/PreparePack
3d1d3623c0c86ab02a92a567ed954fb37e18b8fa
[ "MIT" ]
null
null
null
from .prepack import *
11.5
22
0.73913
from .prepack import *
true
true
f72d1029095787de77bafa202e5314c2ea6e90db
262
py
Python
examples/client.py
Scauting-Burgum/RemoteVar
bc3b1ffaace5defed1cd3a3e7042002717a3e44a
[ "MIT" ]
1
2018-06-14T14:59:56.000Z
2018-06-14T14:59:56.000Z
examples/client.py
Scauting-Burgum/ScautEvent-python
bc3b1ffaace5defed1cd3a3e7042002717a3e44a
[ "MIT" ]
null
null
null
examples/client.py
Scauting-Burgum/ScautEvent-python
bc3b1ffaace5defed1cd3a3e7042002717a3e44a
[ "MIT" ]
null
null
null
from ScautEvent.client import EventClient from ScautEvent.common import Event client = EventClient("localhost", 5000) client.listeners["message"] = print client.start() while True: message = input() event = Event("message", message) client.push(event)
18.714286
41
0.748092
from ScautEvent.client import EventClient from ScautEvent.common import Event client = EventClient("localhost", 5000) client.listeners["message"] = print client.start() while True: message = input() event = Event("message", message) client.push(event)
true
true
f72d105dd8903c3509596490416a261c9efa1878
7,239
py
Python
tests/gold_tests/tls/tls_tunnel_forward.test.py
masaori335/trafficserver
58e7e8675c96a5a4eb958a442942892f6e2a0ef4
[ "Apache-2.0" ]
1
2019-10-28T04:36:50.000Z
2019-10-28T04:36:50.000Z
tests/gold_tests/tls/tls_tunnel_forward.test.py
masaori335/trafficserver
58e7e8675c96a5a4eb958a442942892f6e2a0ef4
[ "Apache-2.0" ]
1
2021-06-27T23:06:33.000Z
2021-06-27T23:06:33.000Z
tests/gold_tests/tls/tls_tunnel_forward.test.py
masaori335/trafficserver
58e7e8675c96a5a4eb958a442942892f6e2a0ef4
[ "Apache-2.0" ]
null
null
null
''' ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
60.325
332
0.754524
import os Test.Summary = ''' Test tunneling and forwarding based on SNI ''' ts = Test.MakeATSProcess("ts", select_ports=False) server_foo = Test.MakeOriginServer("server_foo", ssl=True) server_bar = Test.MakeOriginServer("server_bar", ssl=False) server_random = Test.MakeOriginServer("server_random", ssl=False) reque...
true
true
f72d1174e70c56ea9c0c9a435927929db9497bbd
1,820
py
Python
resources/WPy32/python-3.10.2/Lib/distutils/tests/test_bdist.py
eladkarako/yt-dlp_kit
6365651111ef4d2f94335cf38bf4d9b0136d42d2
[ "Unlicense" ]
1
2022-03-26T15:43:50.000Z
2022-03-26T15:43:50.000Z
resources/WPy32/python-3.10.2/Lib/distutils/tests/test_bdist.py
eladkarako/yt-dlp_kit
6365651111ef4d2f94335cf38bf4d9b0136d42d2
[ "Unlicense" ]
null
null
null
resources/WPy32/python-3.10.2/Lib/distutils/tests/test_bdist.py
eladkarako/yt-dlp_kit
6365651111ef4d2f94335cf38bf4d9b0136d42d2
[ "Unlicense" ]
1
2022-03-28T19:28:45.000Z
2022-03-28T19:28:45.000Z
"""Tests for distutils.command.bdist.""" import os import unittest from test.support import run_unittest import warnings with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) from distutils.command.bdist import bdist from distutils.tests import support class Buil...
31.929825
77
0.591209
import os import unittest from test.support import run_unittest import warnings with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) from distutils.command.bdist import bdist from distutils.tests import support class BuildTestCase(support.TempdirManager, ...
true
true
f72d1185c8f7b68defcc43981f991746536dc0b5
484
py
Python
speedysvc/toolkit/py_ini/write/conv_to_str.py
mcyph/shmrpc
4e0e972657f677a845eb6e7acbf788535c07117a
[ "Unlicense", "MIT" ]
4
2020-02-11T04:20:57.000Z
2021-06-20T10:03:52.000Z
speedysvc/toolkit/py_ini/write/conv_to_str.py
mcyph/shmrpc
4e0e972657f677a845eb6e7acbf788535c07117a
[ "Unlicense", "MIT" ]
1
2020-09-16T23:18:30.000Z
2020-09-21T10:07:22.000Z
speedysvc/toolkit/py_ini/write/conv_to_str.py
mcyph/shmrpc
4e0e972657f677a845eb6e7acbf788535c07117a
[ "Unlicense", "MIT" ]
null
null
null
def conv_to_str(o): if isinstance(o, str): # Remove initial "u" chars before strings # if no Unicode in them if possible try: o = str(o) except: o = str(o) elif isinstance(o, (list, tuple)): is_tuple = isinstance(o, tuple) o = [conv_to_str...
23.047619
49
0.5
def conv_to_str(o): if isinstance(o, str): try: o = str(o) except: o = str(o) elif isinstance(o, (list, tuple)): is_tuple = isinstance(o, tuple) o = [conv_to_str(i) for i in o] if is_tuple: o = tuple(o) elif isins...
true
true
f72d11981b4d9f232355f2e60ad86e0a43b91b4f
11,383
py
Python
tests/v16/test_enums.py
Jonas628/discovere_ocpp
6456e72a9d6725634725756e67fcfd5be007de79
[ "MIT" ]
null
null
null
tests/v16/test_enums.py
Jonas628/discovere_ocpp
6456e72a9d6725634725756e67fcfd5be007de79
[ "MIT" ]
null
null
null
tests/v16/test_enums.py
Jonas628/discovere_ocpp
6456e72a9d6725634725756e67fcfd5be007de79
[ "MIT" ]
null
null
null
# flake8: noqa from ocpp_d.v16.enums import * def test_authorization_status(): assert AuthorizationStatus.accepted == "Accepted" assert AuthorizationStatus.blocked == "Blocked" assert AuthorizationStatus.expired == "Expired" assert AuthorizationStatus.invalid == "Invalid" assert AuthorizationStatu...
36.136508
68
0.734516
from ocpp_d.v16.enums import * def test_authorization_status(): assert AuthorizationStatus.accepted == "Accepted" assert AuthorizationStatus.blocked == "Blocked" assert AuthorizationStatus.expired == "Expired" assert AuthorizationStatus.invalid == "Invalid" assert AuthorizationStatus.concurrent_tx...
true
true
f72d122ad8ca0a487720f9630a8a2086444e3a23
384
py
Python
1stRound/Easy/819 Most Common Word/RegexCounter1.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
2
2020-04-24T18:36:52.000Z
2020-04-25T00:15:57.000Z
1stRound/Easy/819 Most Common Word/RegexCounter1.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
1stRound/Easy/819 Most Common Word/RegexCounter1.py
ericchen12377/Leetcode-Algorithm-Python
eb58cd4f01d9b8006b7d1a725fc48910aad7f192
[ "MIT" ]
null
null
null
import collections import re class Solution(object): def mostCommonWord(self, paragraph, banned): """ :type paragraph: str :type banned: List[str] :rtype: str """ paragraph = re.findall(r"\w+", paragraph.lower()) count = collections.Counter(x for x in paragrap...
29.538462
76
0.606771
import collections import re class Solution(object): def mostCommonWord(self, paragraph, banned): paragraph = re.findall(r"\w+", paragraph.lower()) count = collections.Counter(x for x in paragraph if x not in banned) return count.most_common(1)[0][0]
true
true
f72d12744056fae45f212a2dfb4d1368b26b9baf
15,546
py
Python
test/tools.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
null
null
null
test/tools.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
3
2018-07-26T17:56:30.000Z
2018-07-27T20:23:27.000Z
test/tools.py
jni/asv
f1ec1c157d52c77a799853062dac3468fab3e2ab
[ "BSD-3-Clause" ]
3
2018-07-25T22:53:31.000Z
2018-09-16T06:14:43.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals, print_function """ This file contains utilities to generate test repositories. """ import datetime import io import os import threading import time import six im...
29.724665
95
0.607487
from __future__ import absolute_import, division, unicode_literals, print_function import datetime import io import os import threading import time import six import tempfile import textwrap import sys from os.path import abspath, join, dirname, relpath, isdir from contextlib import contextmanager from hashlib impor...
true
true
f72d15f5ed33a0c85d9606f64c9acb94edfbe6d1
16,313
py
Python
synapse/storage/receipts.py
xsteadfastx/synapse
9a8ae6f1bf833b58416fae1add1972ac3e9d2d59
[ "Apache-2.0" ]
1
2017-02-03T18:58:29.000Z
2017-02-03T18:58:29.000Z
synapse/storage/receipts.py
xsteadfastx/synapse
9a8ae6f1bf833b58416fae1add1972ac3e9d2d59
[ "Apache-2.0" ]
null
null
null
synapse/storage/receipts.py
xsteadfastx/synapse
9a8ae6f1bf833b58416fae1add1972ac3e9d2d59
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket 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 applicab...
34.199161
89
0.554343
from ._base import SQLBaseStore from synapse.util.caches.descriptors import cachedInlineCallbacks, cachedList, cached from synapse.util.caches.stream_change_cache import StreamChangeCache from twisted.internet import defer import logging import ujson as json logger = logging.getLogger(__name__) class ReceiptsSto...
true
true
f72d160fcdb7089f1134d2d7d9f76d09c9f85a8c
2,166
py
Python
services/getSearchResults.py
r0uxt1/falcon
852774e3628fcc08209f34a69bcae4e0d903d408
[ "Unlicense" ]
null
null
null
services/getSearchResults.py
r0uxt1/falcon
852774e3628fcc08209f34a69bcae4e0d903d408
[ "Unlicense" ]
null
null
null
services/getSearchResults.py
r0uxt1/falcon
852774e3628fcc08209f34a69bcae4e0d903d408
[ "Unlicense" ]
null
null
null
import pickle import collections import json import sys import argparse import pathlib import time ROOT_PATH = pathlib.Path(__file__).parents[1].as_posix() trie = pickle.load(open( ROOT_PATH + "/dumps/trie.p", "rb")) catMap = pickle.load(open(ROOT_PATH + "/dumps/catMap.p", "rb")) category = json.load(open(ROOT_PATH +...
30.942857
72
0.607572
import pickle import collections import json import sys import argparse import pathlib import time ROOT_PATH = pathlib.Path(__file__).parents[1].as_posix() trie = pickle.load(open( ROOT_PATH + "/dumps/trie.p", "rb")) catMap = pickle.load(open(ROOT_PATH + "/dumps/catMap.p", "rb")) category = json.load(open(ROOT_PATH +...
true
true
f72d16e50aee7d691584f49425e40834f26ba2c2
2,098
py
Python
__init__.py
CraftYun83/Survery
bdd80186f5d0e22407c5a22cdf3c80edd50276de
[ "MIT" ]
null
null
null
__init__.py
CraftYun83/Survery
bdd80186f5d0e22407c5a22cdf3c80edd50276de
[ "MIT" ]
null
null
null
__init__.py
CraftYun83/Survery
bdd80186f5d0e22407c5a22cdf3c80edd50276de
[ "MIT" ]
null
null
null
questions = [] Answers = [] ending = "Thank you for taking this quiz!" def help(): print("SubCommands:") print("-----------------------------------------") print("help - shows this help page") print("addQuestion - adds a question") print("deleteQuestion - removes a questi...
36.172414
84
0.522402
questions = [] Answers = [] ending = "Thank you for taking this quiz!" def help(): print("SubCommands:") print("-----------------------------------------") print("help - shows this help page") print("addQuestion - adds a question") print("deleteQuestion - removes a questi...
true
true
f72d187a0bb36150ddc8d414250d5ed8a96e26c9
48,395
py
Python
gilbert.py
Erebyel/Gilbert
b7206278cae8c4686de9b87f042fbda42b5fe324
[ "MIT" ]
null
null
null
gilbert.py
Erebyel/Gilbert
b7206278cae8c4686de9b87f042fbda42b5fe324
[ "MIT" ]
null
null
null
gilbert.py
Erebyel/Gilbert
b7206278cae8c4686de9b87f042fbda42b5fe324
[ "MIT" ]
null
null
null
##---------------------- Carga de bibliotecas from pandas import DataFrame import streamlit as st import numpy as np ##---------------------- Base de datos frase = DataFrame({'artículo': ['El', 'El', 'El', 'La', 'El', 'La', 'El', 'El', 'La', 'El', 'La', 'El', 'La', 'La', 'El', 'La', 'La', 'El', 'La', 'El', 'El', 'El'...
439.954545
39,817
0.638351
from pandas import DataFrame import streamlit as st import numpy as np frase = DataFrame({'artículo': ['El', 'El', 'El', 'La', 'El', 'La', 'El', 'El', 'La', 'El', 'La', 'El', 'La', 'La', 'El', 'La', 'La', 'El', 'La', 'El', 'El', 'El', 'La', 'El', 'El', 'El', 'La', 'La', 'El', 'El', 'El', 'El', 'El', 'El', 'El', 'La',...
true
true
f72d191576e71f07bf2745d08e2318b97ae476f0
52,444
py
Python
mne/viz/misc.py
GanshengT/mne-python
49253e74308137e14187561a204d784ea28f12a7
[ "BSD-3-Clause" ]
null
null
null
mne/viz/misc.py
GanshengT/mne-python
49253e74308137e14187561a204d784ea28f12a7
[ "BSD-3-Clause" ]
null
null
null
mne/viz/misc.py
GanshengT/mne-python
49253e74308137e14187561a204d784ea28f12a7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Functions to make simple plots with M/EEG data.""" # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Cathy Nangini...
37.783862
79
0.574556
import base64 import copy from glob import glob from io import BytesIO from itertools import cycle import os.path as op import warnings from distutils.version import LooseVersion from collections import defaultdict import numpy as np from ..defaults import DEFAULTS from ..fixes import _get_img_fdata from ..rank imp...
true
true
f72d193485085f4417f86600a03b9ba6200ca275
3,529
py
Python
bindings/python/ensmallen/datasets/string/alteromonadaceaebacteriumbs31.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/alteromonadaceaebacteriumbs31.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/alteromonadaceaebacteriumbs31.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Alteromonadaceae bacterium Bs31. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein...
33.609524
223
0.682063
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def AlteromonadaceaeBacteriumBs31( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "gra...
true
true
f72d19bd7e21d68363282be4231a798cef9d93e4
716
py
Python
venv/Lib/site-packages/marshmallow/__init__.py
kakinpe1u/Riki
2812ce3279aacbd759fcaa096bb2cf2658195b7b
[ "BSD-3-Clause" ]
null
null
null
venv/Lib/site-packages/marshmallow/__init__.py
kakinpe1u/Riki
2812ce3279aacbd759fcaa096bb2cf2658195b7b
[ "BSD-3-Clause" ]
1
2021-06-02T01:17:03.000Z
2021-06-02T01:17:03.000Z
venv/Lib/site-packages/marshmallow/__init__.py
kakinpe1u/Riki
2812ce3279aacbd759fcaa096bb2cf2658195b7b
[ "BSD-3-Clause" ]
null
null
null
from marshmallow.schema import Schema, SchemaOpts from . import fields from marshmallow.decorators import ( pre_dump, post_dump, pre_load, post_load, validates, validates_schema, ) from marshmallow.utils import EXCLUDE, INCLUDE, RAISE, pprint, missing from marshmallow.exceptions import Validati...
20.457143
70
0.685754
from marshmallow.schema import Schema, SchemaOpts from . import fields from marshmallow.decorators import ( pre_dump, post_dump, pre_load, post_load, validates, validates_schema, ) from marshmallow.utils import EXCLUDE, INCLUDE, RAISE, pprint, missing from marshmallow.exceptions import Validati...
true
true
f72d19fb07ebb13290b184d52af272ca902172d8
3,406
py
Python
python/generic/parallel-processes.py
lotharwissler/bioinformatics
83a53771222ecb0759e3b4bfa2018d2cd7647643
[ "MIT" ]
10
2016-01-13T00:39:30.000Z
2020-11-30T05:56:19.000Z
python/generic/parallel-processes.py
lotharwissler/bioinformatics
83a53771222ecb0759e3b4bfa2018d2cd7647643
[ "MIT" ]
1
2017-02-09T22:46:49.000Z
2017-02-09T22:46:49.000Z
python/generic/parallel-processes.py
lotharwissler/bioinformatics
83a53771222ecb0759e3b4bfa2018d2cd7647643
[ "MIT" ]
10
2015-10-09T00:29:16.000Z
2019-06-09T05:32:15.000Z
#!/usr/bin/python import sys, os import math, time import threading import getopt # comand line argument handling from low import * # ============================================================================= def show_help(): """ displays the program parameter list and usage information """ stdout( "usa...
31.831776
231
0.490018
import sys, os import math, time import threading import getopt from low import * def show_help(): stdout( "usage: " + sys.argv[0] + " -f <path> -n " ) stdout( " " ) stdout( " option description" ) stdout( " -h help (this text here)" ) stdout( " -f file that contains all system calls...
true
true
f72d1b20c6a6249fbd56850720d0cd584b7fb599
2,809
py
Python
env/lib/python3.6/site-packages/torch/optim/asgd.py
bopopescu/smart_contracts7
40a487cb3843e86ab5e4cb50b1aafa2095f648cd
[ "Apache-2.0" ]
null
null
null
env/lib/python3.6/site-packages/torch/optim/asgd.py
bopopescu/smart_contracts7
40a487cb3843e86ab5e4cb50b1aafa2095f648cd
[ "Apache-2.0" ]
null
null
null
env/lib/python3.6/site-packages/torch/optim/asgd.py
bopopescu/smart_contracts7
40a487cb3843e86ab5e4cb50b1aafa2095f648cd
[ "Apache-2.0" ]
1
2020-07-24T17:53:25.000Z
2020-07-24T17:53:25.000Z
import math import torch from .optimizer import Optimizer class ASGD(Optimizer): """Implements Averaged Stochastic Gradient Descent. It has been proposed in `Acceleration of stochastic approximation by averaging`_. Arguments: params (iterable): iterable of parameters to optimize or dicts def...
35.1125
109
0.521538
import math import torch from .optimizer import Optimizer class ASGD(Optimizer): def __init__(self, params, lr=1e-2, lambd=1e-4, alpha=0.75, t0=1e6, weight_decay=0): defaults = dict(lr=lr, lambd=lambd, alpha=alpha, t0=t0, weight_decay=weight_decay) super(ASGD, self).__init...
true
true
f72d1b37a5cef82cf5cf152d89c95f2474d1e422
14,941
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/asymmetricthroughput_b9e3c6717e2faf761c693cccff9c71b8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/asymmetricthroughput_b9e3c6717e2faf761c693cccff9c71b8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/asymmetricthroughput_b9e3c6717e2faf761c693cccff9c71b8.py
rfrye-github/ixnetwork_restpy
23eeb24b21568a23d3f31bbd72814ff55eb1af44
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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 limitation # the rights to use, copy, ...
39.318421
191
0.647212
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files class AsymmetricThroughput(Base): __slots__ = () _SDM_NAME = 'asymmetricThroughput' _SDM_ATT_MAP = { 'ForceApplyQTConfig': 'forceApplyQTConfig', 'InputParameters': 'inputParameters', 'Mode':...
true
true
f72d1dd9c1044400d4f9011000b5c29914781ea4
1,959
py
Python
activemq/setup.py
kzap/integrations-core
88c3a72dbf5223b496be1c549ca2857d8489c491
[ "BSD-3-Clause" ]
1
2021-01-28T01:45:37.000Z
2021-01-28T01:45:37.000Z
activemq/setup.py
kzap/integrations-core
88c3a72dbf5223b496be1c549ca2857d8489c491
[ "BSD-3-Clause" ]
3
2021-01-27T04:56:40.000Z
2021-02-26T06:29:22.000Z
activemq/setup.py
kzap/integrations-core
88c3a72dbf5223b496be1c549ca2857d8489c491
[ "BSD-3-Clause" ]
1
2021-04-07T16:58:27.000Z
2021-04-07T16:58:27.000Z
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from codecs import open # To use a consistent encoding from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) # Get version info ABOUT = {} with open(path.join(HER...
30.138462
78
0.678918
from codecs import open from os import path from setuptools import setup HERE = path.dirname(path.abspath(__file__)) ABOUT = {} with open(path.join(HERE, 'datadog_checks', 'activemq', '__about__.py')) as f: exec(f.read(), ABOUT) with open(path.join(HERE, 'README.md'), encoding='utf-8') as f: long_descripti...
true
true
f72d1df9ba0d4ece4941df1261e9df055c7d4e59
1,480
py
Python
pyblas/level1/cswap.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
null
null
null
pyblas/level1/cswap.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
1
2020-10-10T23:23:06.000Z
2020-10-10T23:23:06.000Z
pyblas/level1/cswap.py
timleslie/pyblas
9109f2cc24e674cf59a3b39f95c2d7b8116ae884
[ "BSD-3-Clause" ]
null
null
null
from ..util import slice_ def cswap(N, CX, INCX, CY, INCY): """Swaps the contents of a vector x with a vector y Parameters ---------- N : int Number of elements in input vector CX : numpy.ndarray A single precision complex array, dimension (1 + (`N` - 1)*abs(`INCX`)) INCX : in...
27.407407
112
0.584459
from ..util import slice_ def cswap(N, CX, INCX, CY, INCY): if N <= 0: return x_slice = slice_(N, INCX) y_slice = slice_(N, INCY) X_TEMP = CX[x_slice].copy() CX[x_slice] = CY[y_slice] CY[x_slice] = X_TEMP
true
true
f72d1e7058caff6214e3cbcab08ed3706f8ab834
996
py
Python
wwpdb/utils/tests_wf/WfDataObjectImportTests.py
epeisach/py-wwpdb_utils_wf
4069bcc6236c99f99a78f2e0dd681d7971df97f8
[ "Apache-2.0" ]
null
null
null
wwpdb/utils/tests_wf/WfDataObjectImportTests.py
epeisach/py-wwpdb_utils_wf
4069bcc6236c99f99a78f2e0dd681d7971df97f8
[ "Apache-2.0" ]
1
2021-07-06T16:38:16.000Z
2021-07-06T16:38:16.000Z
wwpdb/utils/tests_wf/WfDataObjectImportTests.py
epeisach/py-wwpdb_utils_wf
4069bcc6236c99f99a78f2e0dd681d7971df97f8
[ "Apache-2.0" ]
1
2021-05-25T15:42:51.000Z
2021-05-25T15:42:51.000Z
## # File: WfDataObjectImportTests.py # Date: 10-Oct-2018 E. Peisach # # Updates: ## """Test cases for wwpdb.utils.wf - simply import everything to ensure imports work""" __docformat__ = "restructuredtext en" __author__ = "Ezra Peisach" __email__ = "peisach@rcsb.rutgers.edu" __license__ = "Creative Commons Attributi...
23.714286
85
0.699799
__docformat__ = "restructuredtext en" __author__ = "Ezra Peisach" __email__ = "peisach@rcsb.rutgers.edu" __license__ = "Creative Commons Attribution 3.0 Unported" __version__ = "V0.01" import unittest if __package__ is None or __package__ == "": import sys from os import path sys.path.append(path.dirnam...
true
true
f72d1ee40a4fb822de765b3f6b614cbf451598f5
2,569
py
Python
misc/ig/ig/yahoo.py
all3g/pieces
bc378fd22ddc700891fe7f34ab0d5b341141e434
[ "CNRI-Python" ]
34
2016-10-31T02:05:24.000Z
2018-11-08T14:33:13.000Z
misc/ig/ig/yahoo.py
join-us/python-programming
bc378fd22ddc700891fe7f34ab0d5b341141e434
[ "CNRI-Python" ]
2
2017-05-11T03:00:31.000Z
2017-11-01T23:37:37.000Z
misc/ig/ig/yahoo.py
join-us/python-programming
bc378fd22ddc700891fe7f34ab0d5b341141e434
[ "CNRI-Python" ]
21
2016-08-19T09:05:45.000Z
2018-11-08T14:33:16.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- import requests import time import lxml.etree import randoms import re from searchengine import searchengine class yahoo(searchengine): """Search resources from yahoo searchengine, include titles/urls.""" def __init__(self): super(yahoo, self).__init__() ...
33.363636
78
0.525886
import requests import time import lxml.etree import randoms import re from searchengine import searchengine class yahoo(searchengine): def __init__(self): super(yahoo, self).__init__() def yahoo_dork_search(self, dork, page=0, random_sleep=True): resources = [] indexs = range(page +...
true
true
f72d1f45574ed5c7672e07db524c2cc553117bc4
1,883
py
Python
api/allennlp_demo/ccg_supertagging/test_api.py
jakpra/allennlp-demo
d9fa5203d2e500499cbd55c244454bed7b68e1f8
[ "Apache-2.0" ]
null
null
null
api/allennlp_demo/ccg_supertagging/test_api.py
jakpra/allennlp-demo
d9fa5203d2e500499cbd55c244454bed7b68e1f8
[ "Apache-2.0" ]
null
null
null
api/allennlp_demo/ccg_supertagging/test_api.py
jakpra/allennlp-demo
d9fa5203d2e500499cbd55c244454bed7b68e1f8
[ "Apache-2.0" ]
null
null
null
from allennlp_demo.common.testing import ModelEndpointTestCase from allennlp_demo.ccg_supertagging.api import CCGSupertaggingModelEndpoint class TestCCGSupertaggingModelEndpoint(ModelEndpointTestCase): endpoint = CCGSupertaggingModelEndpoint() predict_input = { "sentence": "Did Uriah honestly think he...
36.211538
109
0.627722
from allennlp_demo.common.testing import ModelEndpointTestCase from allennlp_demo.ccg_supertagging.api import CCGSupertaggingModelEndpoint class TestCCGSupertaggingModelEndpoint(ModelEndpointTestCase): endpoint = CCGSupertaggingModelEndpoint() predict_input = { "sentence": "Did Uriah honestly think he...
true
true
f72d203b944c8b07115f5722c5e0681ea802674a
53,500
py
Python
qa/rpc-tests/p2p-fullblocktest.py
Kimax89/wallet-official
e2e804daa66aa82dd85a4e8a0c3f6662d03429ca
[ "MIT" ]
24
2018-05-21T02:53:18.000Z
2021-12-31T07:03:51.000Z
qa/rpc-tests/p2p-fullblocktest.py
Kimax89/wallet-official
e2e804daa66aa82dd85a4e8a0c3f6662d03429ca
[ "MIT" ]
8
2018-05-28T20:48:26.000Z
2019-11-26T18:45:00.000Z
qa/rpc-tests/p2p-fullblocktest.py
Kimax89/wallet-official
e2e804daa66aa82dd85a4e8a0c3f6662d03429ca
[ "MIT" ]
16
2018-05-21T02:53:23.000Z
2020-10-07T16:21:57.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Copyright (c) 2017 The Bitcoin developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import ComparisonTestFrame...
40.622627
131
0.539813
from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.comptool import TestManager, TestInstance, RejectResult from test_framework.blocktools import * import time from test_framework.key import CECKey from test_framework.script import * import struct fro...
true
true
f72d220cd721047c490c67e94323bd45ebdd24c5
6,988
py
Python
ca/1d-life.py
pghrogue/Sprint-Challenge-BC-Cellular-Automata
0165bfaf0032de63d244793c069efc7bdb734912
[ "MIT" ]
null
null
null
ca/1d-life.py
pghrogue/Sprint-Challenge-BC-Cellular-Automata
0165bfaf0032de63d244793c069efc7bdb734912
[ "MIT" ]
null
null
null
ca/1d-life.py
pghrogue/Sprint-Challenge-BC-Cellular-Automata
0165bfaf0032de63d244793c069efc7bdb734912
[ "MIT" ]
null
null
null
import pygame, random def get_new_value(old_gen, old_automata): # TBC - add code to generate the next row of cells, # then replace the return statement below to # return the updated automata # automata = get_new_value(generations-1, automata) # If each row = 50 cells (0-49) and generations start a...
35.472081
133
0.608042
import pygame, random def get_new_value(old_gen, old_automata): automata = old_automata.copy() new_automata = [] for i in range(old_gen + 1): working_row = automata[0:SQ_NUM] new_automata += working_row if i == old_gen: ...
true
true
f72d22c9e5b0c4a483dbc497494b6ab24aa21494
13,242
py
Python
pandas/tests/io/parser/test_python_parser_only.py
luftwurzel/pandas
8980af7ce9d98713b0f8792e38f0fe43088e8780
[ "BSD-3-Clause" ]
1
2022-03-29T01:38:03.000Z
2022-03-29T01:38:03.000Z
pandas/tests/io/parser/test_python_parser_only.py
luftwurzel/pandas
8980af7ce9d98713b0f8792e38f0fe43088e8780
[ "BSD-3-Clause" ]
1
2022-03-18T01:26:58.000Z
2022-03-18T01:26:58.000Z
pandas/tests/io/parser/test_python_parser_only.py
luftwurzel/pandas
8980af7ce9d98713b0f8792e38f0fe43088e8780
[ "BSD-3-Clause" ]
1
2022-03-22T11:50:25.000Z
2022-03-22T11:50:25.000Z
""" Tests that apply specifically to the Python parser. Unless specifically stated as a Python-specific issue, the goal is to eventually move as many of these tests out of this module as soon as the C parser can accept further arguments when parsing. """ from __future__ import annotations import csv from io import ( ...
28.786957
88
0.633515
from __future__ import annotations import csv from io import ( BytesIO, StringIO, ) import pytest from pandas.errors import ( ParserError, ParserWarning, ) from pandas import ( DataFrame, Index, MultiIndex, ) import pandas._testing as tm def test_default_separator(python_parser_only): ...
true
true
f72d26ac34029c16b97220fe6f4e82f84591a1ca
867
py
Python
zulip_bots/zulip_bots/bots/tyro/fb_login.py
tuhinspatra/tyro-zulip-bot
29c149af1b01955e50564e31cff03331fa723880
[ "MIT" ]
1
2020-05-25T11:52:31.000Z
2020-05-25T11:52:31.000Z
zulip_bots/zulip_bots/bots/tyro/fb_login.py
armag-pro/tyro-zulip-bot
29c149af1b01955e50564e31cff03331fa723880
[ "MIT" ]
6
2020-03-24T16:39:54.000Z
2021-04-30T20:46:43.000Z
zulip_bots/zulip_bots/bots/tyro/fb_login.py
tuhinspatra/tyro-zulip-bot
29c149af1b01955e50564e31cff03331fa723880
[ "MIT" ]
3
2019-01-26T21:40:16.000Z
2019-02-24T20:16:26.000Z
import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys def fblogin(bot_handler,message): if len(message)>=2: e=message[0] p=message[1] driver = webdriver.Chrome('/home/jugtaram/Downloads/chromedriver/chromedriver') driver.get('http://www.google.com/xhtml') time.slee...
27.967742
83
0.739331
import requests from selenium import webdriver from selenium.webdriver.common.keys import Keys def fblogin(bot_handler,message): if len(message)>=2: e=message[0] p=message[1] driver = webdriver.Chrome('/home/jugtaram/Downloads/chromedriver/chromedriver') driver.get('http://www.google.com/xhtml') time.slee...
true
true
f72d27381ef9a8326bf0fa9c73f1a02d54aac435
51
py
Python
recognition/learning_error_exception.py
SubmergedTree/SmartMirror
c822469f0d4340a31873fe623290cf4bcd745b5f
[ "MIT" ]
null
null
null
recognition/learning_error_exception.py
SubmergedTree/SmartMirror
c822469f0d4340a31873fe623290cf4bcd745b5f
[ "MIT" ]
1
2021-10-12T22:04:20.000Z
2021-10-12T22:04:20.000Z
recognition/learning_error_exception.py
SubmergedTree/SmartMirror
c822469f0d4340a31873fe623290cf4bcd745b5f
[ "MIT" ]
null
null
null
class LearningErrorException(Exception): pass
12.75
40
0.784314
class LearningErrorException(Exception): pass
true
true
f72d2884a4c116033ae93117d3448f7e063ac329
323
py
Python
tests/PartitionerTest/test_geom.py
stu314159/tLBM
1256c5b12fc315d59e08d704c6cef72200e9f01c
[ "MIT" ]
null
null
null
tests/PartitionerTest/test_geom.py
stu314159/tLBM
1256c5b12fc315d59e08d704c6cef72200e9f01c
[ "MIT" ]
null
null
null
tests/PartitionerTest/test_geom.py
stu314159/tLBM
1256c5b12fc315d59e08d704c6cef72200e9f01c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys sys.path.insert(1,'../../python') import FluidChannel as fc import numpy as np aLx_p = 1.0; aLy_p = 1.0; aLz_p = 5.0; aNdivs = 11; emptyChan = fc.FluidChannel(Lx_p = aLx_p,Ly_p = aLy_p, Lz_p = aLz_p, N_divs = aNdivs); emptyChan.write_mat_file('test_geom'...
17.944444
58
0.634675
import sys sys.path.insert(1,'../../python') import FluidChannel as fc import numpy as np aLx_p = 1.0; aLy_p = 1.0; aLz_p = 5.0; aNdivs = 11; emptyChan = fc.FluidChannel(Lx_p = aLx_p,Ly_p = aLy_p, Lz_p = aLz_p, N_divs = aNdivs); emptyChan.write_mat_file('test_geom');
true
true
f72d28af1ec1193a05b944fcc0ecd4e67dee8ef2
3,876
py
Python
lib/bx/align/tools/thread.py
mr-c/bx-python
0b2b766eee008d1f7a2814be4ddd2c5dc3787537
[ "MIT" ]
null
null
null
lib/bx/align/tools/thread.py
mr-c/bx-python
0b2b766eee008d1f7a2814be4ddd2c5dc3787537
[ "MIT" ]
null
null
null
lib/bx/align/tools/thread.py
mr-c/bx-python
0b2b766eee008d1f7a2814be4ddd2c5dc3787537
[ "MIT" ]
null
null
null
""" Tools for "threading" out specific species from alignments (removing other species and fixing alignment text). """ from copy import deepcopy def thread(mafs, species): """ Restrict an list of alignments to a given list of species by: 1) Removing components for any other species 2) Remove...
36.914286
130
0.663829
from copy import deepcopy def thread(mafs, species): for m in mafs: new_maf = deepcopy(m) new_components = get_components_for_species(new_maf, species) if new_components: remove_all_gap_columns(new_components) new_maf.components = new_components new_maf...
true
true
f72d28c7ae1172bb24daa73c1333bd9c22f501e4
662
py
Python
hospital/migrations/0014_auto_20180727_1635.py
mohitkyadav/calldoc
ebdcdcfac346e995c44cbf94a3c87c25ba594ee1
[ "MIT" ]
9
2019-05-19T14:00:03.000Z
2019-05-21T14:19:56.000Z
hospital/migrations/0014_auto_20180727_1635.py
mohitkyadav/calldoc
ebdcdcfac346e995c44cbf94a3c87c25ba594ee1
[ "MIT" ]
8
2019-05-20T12:29:08.000Z
2022-02-10T11:06:55.000Z
hospital/migrations/0014_auto_20180727_1635.py
mohitkyadav/calldoc
ebdcdcfac346e995c44cbf94a3c87c25ba594ee1
[ "MIT" ]
1
2019-05-20T07:04:20.000Z
2019-05-20T07:04:20.000Z
# Generated by Django 2.0.5 on 2018-07-27 11:05 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hospital', '0013_hospital_verified'), ] operations = [ migrations.AlterField( model_name='hospital...
33.1
288
0.663142
import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('hospital', '0013_hospital_verified'), ] operations = [ migrations.AlterField( model_name='hospital', name='phone_number', ...
true
true
f72d2969cb4da475bd90bb46276e9d83169e8b9f
3,113
py
Python
preprocessing/GTEx/filter_by_tissue.py
arnegebert/splicing
3e19ce83a9f6d98bc6c2d8b653660d22e453ca77
[ "MIT" ]
1
2021-05-13T15:30:39.000Z
2021-05-13T15:30:39.000Z
preprocessing/GTEx/filter_by_tissue.py
arnegebert/splicing
3e19ce83a9f6d98bc6c2d8b653660d22e453ca77
[ "MIT" ]
null
null
null
preprocessing/GTEx/filter_by_tissue.py
arnegebert/splicing
3e19ce83a9f6d98bc6c2d8b653660d22e453ca77
[ "MIT" ]
null
null
null
import csv import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('--tissue', type=str, default='Brain - Cortex', metavar='tissue', help='type of tissue filtered for') parser.add_argument('--save-to', type=str, default='../../data/gtex_processe...
39.910256
107
0.686476
import csv import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('--tissue', type=str, default='Brain - Cortex', metavar='tissue', help='type of tissue filtered for') parser.add_argument('--save-to', type=str, default='../../data/gtex_processe...
true
true
f72d29bb6e25f40a831066ee40a2b39e46a84b2d
14,911
py
Python
indicator_opt.py
jkterry1/parameter-sharing-paper
cb26ad195b580006f66fd8a60973408d5657b209
[ "MIT" ]
1
2022-01-28T00:01:44.000Z
2022-01-28T00:01:44.000Z
indicator_opt.py
jkterry1/parameter-sharing-paper
cb26ad195b580006f66fd8a60973408d5657b209
[ "MIT" ]
null
null
null
indicator_opt.py
jkterry1/parameter-sharing-paper
cb26ad195b580006f66fd8a60973408d5657b209
[ "MIT" ]
null
null
null
import sys import json import numpy as np import os import pickle as pkl import time from pprint import pprint from stable_baselines3 import PPO, DQN from stable_baselines3.common.utils import set_random_seed from pettingzoo.butterfly import cooperative_pong_v3, prospector_v4, knights_archers_zombies_v7 from pettingz...
40.852055
148
0.66622
import sys import json import numpy as np import os import pickle as pkl import time from pprint import pprint from stable_baselines3 import PPO, DQN from stable_baselines3.common.utils import set_random_seed from pettingzoo.butterfly import cooperative_pong_v3, prospector_v4, knights_archers_zombies_v7 from pettingz...
true
true
f72d29c30cce97f016e99c825381c00e3af87148
3,105
py
Python
enhancitizer/tasks/duplication.py
cherusker/enhancitizer
1f1516f0aeb61262f2de9767a5f4f17cb62bcb26
[ "MIT" ]
null
null
null
enhancitizer/tasks/duplication.py
cherusker/enhancitizer
1f1516f0aeb61262f2de9767a5f4f17cb62bcb26
[ "MIT" ]
null
null
null
enhancitizer/tasks/duplication.py
cherusker/enhancitizer
1f1516f0aeb61262f2de9767a5f4f17cb62bcb26
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------------ # # Author: # Armin Hasitzka (enhancitizer@hasitzka.com) # # Licensed under the MIT license. # See LICENSE in the project root for license information. # # ------------------------------------------------------------------------------ ...
40.324675
105
0.579066
from utils.printer import Printer class TaskEliminateDuplicateReports(object): description = 'Eliminating duplicate reports ...' __tsan_data_race_max_stack_frames = 3 def __init__(self, bank): self.__bank = bank def setup(self, options): self.__printer = Printer(options) se...
true
true
f72d2a82d4064325d5026f24287d9cbfc1f2c3ae
15,055
py
Python
tensorflow_probability/python/distributions/beta.py
sanket-kamthe/probability
c22b6201155c2e58d08a4ad30641d1aff59fbe7c
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/beta.py
sanket-kamthe/probability
c22b6201155c2e58d08a4ad30641d1aff59fbe7c
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/beta.py
sanket-kamthe/probability
c22b6201155c2e58d08a4ad30641d1aff59fbe7c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability 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 o...
39.308094
100
0.69897
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python.distributions import distribution from tensorflow_probability.python.distributions import kullback_leibler from tensorfl...
true
true
f72d2c7e7a339b176c424997056def39dbb232ca
476
py
Python
data/scripts/templates/object/mobile/shared_dressed_binayre_ruffian_trandoshan_female_01.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_dressed_binayre_ruffian_trandoshan_female_01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_dressed_binayre_ruffian_trandoshan_female_01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_binayre_ruffian_trandoshan_female_01.iff" result.attri...
28
90
0.747899
from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_binayre_ruffian_trandoshan_female_01.iff" result.attribute_template_id = 9 result.stfName("npc_name","trandoshan_base_female") return result
true
true
f72d2d7694c02f9baefa28ab714fa7d648759fe9
8,778
py
Python
groupbunk.py
shine-jayakumar/groupbunk-fb
ddf3d66cd902343e419dd2cf0c86f42850315f08
[ "MIT" ]
1
2022-02-11T05:31:48.000Z
2022-02-11T05:31:48.000Z
groupbunk.py
shine-jayakumar/groupbunk-fb
ddf3d66cd902343e419dd2cf0c86f42850315f08
[ "MIT" ]
null
null
null
groupbunk.py
shine-jayakumar/groupbunk-fb
ddf3d66cd902343e419dd2cf0c86f42850315f08
[ "MIT" ]
null
null
null
""" GroupBunk v.1.2 Leave your Facebook groups quietly Author: Shine Jayakumar Github: https://github.com/shine-jayakumar LICENSE: MIT """ from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.chrome.options import Options from selenium.common.exceptions imp...
35.97541
127
0.670084
from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.chrome.options import Options from selenium.common.exceptions import StaleElementReferenceException from webdriver_manager.chrome import ChromeDriverManager import argparse import logging import sys from date...
true
true
f72d2dffe680e5fa8e448bd4483a994fa75b8c69
631
py
Python
python/24_swap_nodes_in_pairs.py
dchapp/blind75
aaa409cf2db4ef6d0f86177f4217eceeb391caa8
[ "MIT" ]
null
null
null
python/24_swap_nodes_in_pairs.py
dchapp/blind75
aaa409cf2db4ef6d0f86177f4217eceeb391caa8
[ "MIT" ]
null
null
null
python/24_swap_nodes_in_pairs.py
dchapp/blind75
aaa409cf2db4ef6d0f86177f4217eceeb391caa8
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def swapPairs(self, head: Optional[ListNode]) -> Optional[ListNode]: return self.recursive(head) def recursive(self, head): ...
28.681818
72
0.600634
class Solution: def swapPairs(self, head: Optional[ListNode]) -> Optional[ListNode]: return self.recursive(head) def recursive(self, head): if head is None or head.next is None: return head current = head successor = head.next subproblem = head.next....
true
true
f72d2e556f8e1a61daf19ae049a8aca684ccd0aa
4,594
py
Python
axelrod/tests/strategies/test_human.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
null
null
null
axelrod/tests/strategies/test_human.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
null
null
null
axelrod/tests/strategies/test_human.py
danilobellini/Axelrod
2c9212553e06095c24adcb82a5979279cbdf45fb
[ "MIT" ]
null
null
null
from os import linesep from unittest import TestCase from unittest.mock import patch from axelrod import Action, Cooperator, Player from axelrod.strategies.human import ActionValidator, Human from prompt_toolkit.validation import ValidationError from .test_player import TestPlayer C, D = Action.C, Action.D class T...
34.80303
86
0.622987
from os import linesep from unittest import TestCase from unittest.mock import patch from axelrod import Action, Cooperator, Player from axelrod.strategies.human import ActionValidator, Human from prompt_toolkit.validation import ValidationError from .test_player import TestPlayer C, D = Action.C, Action.D class T...
true
true
f72d30c55d3dd51166d633ec61c36e24eaf973af
4,841
py
Python
stepper.py
mechkro/Linux_Repo
f71e71814a5496470b731bb32b3be67ab8085f7a
[ "MIT" ]
null
null
null
stepper.py
mechkro/Linux_Repo
f71e71814a5496470b731bb32b3be67ab8085f7a
[ "MIT" ]
null
null
null
stepper.py
mechkro/Linux_Repo
f71e71814a5496470b731bb32b3be67ab8085f7a
[ "MIT" ]
null
null
null
from time import sleep import RPi.GPIO as GPIO ######################################################################## #SOURCE - https://www.rototron.info/raspberry-pi-stepper-motor-tutorial/ ######################################################################## """ As always I recommend you start with a freshly w...
32.059603
92
0.677959
from time import sleep import RPi.GPIO as GPIO DIR = 20 STEP = 21 CW = 1 CCW = 0 SPR = 48 GPIO.setmode(GPIO.BCM) GPIO.setup(DIR, GPIO.OUT) GPIO.setup(STEP, GPIO.OUT) GPIO.output(DIR, CW) step_count = SPR delay = .0208 for x in range(step_count): GPIO.output(STEP, GPIO.HIGH) sleep(delay) GP...
true
true
f72d310e84eaa324a5380b4aaf86a7da4b908cd0
682
py
Python
spacy/tests/lang/nb/test_tokenizer.py
cedar101/spaCy
66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95
[ "MIT" ]
12
2019-03-20T20:43:47.000Z
2020-04-13T11:10:52.000Z
spacy/tests/lang/nb/test_tokenizer.py
cedar101/spaCy
66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95
[ "MIT" ]
13
2018-06-05T11:54:40.000Z
2019-07-02T11:33:14.000Z
spacy/tests/lang/nb/test_tokenizer.py
cedar101/spaCy
66e22098a8bb77cbe527b1a4a3c69ec1cfb56f95
[ "MIT" ]
2
2020-02-15T18:33:35.000Z
2022-02-13T14:11:41.000Z
# coding: utf8 from __future__ import unicode_literals import pytest NB_TOKEN_EXCEPTION_TESTS = [ ( "Smørsausen brukes bl.a. til fisk", ["Smørsausen", "brukes", "bl.a.", "til", "fisk"], ), ( "Jeg kommer først kl. 13 pga. diverse forsinkelser", ["Jeg", "kommer", "først", "k...
28.416667
83
0.673021
from __future__ import unicode_literals import pytest NB_TOKEN_EXCEPTION_TESTS = [ ( "Smørsausen brukes bl.a. til fisk", ["Smørsausen", "brukes", "bl.a.", "til", "fisk"], ), ( "Jeg kommer først kl. 13 pga. diverse forsinkelser", ["Jeg", "kommer", "først", "kl.", "13", "pga...
true
true
f72d313ae90abc9a33fbbe8f201a19f2c2f9ceb1
2,825
py
Python
irobot/openinterface/constants.py
bhargav-nunna/irobot
9251f71267fa8cf5e9620f70aa892ae1b7a182f9
[ "Unlicense" ]
13
2018-08-19T07:09:36.000Z
2021-08-10T22:52:31.000Z
irobot/openinterface/constants.py
bhargav-nunna/irobot
9251f71267fa8cf5e9620f70aa892ae1b7a182f9
[ "Unlicense" ]
null
null
null
irobot/openinterface/constants.py
bhargav-nunna/irobot
9251f71267fa8cf5e9620f70aa892ae1b7a182f9
[ "Unlicense" ]
4
2019-01-21T20:03:36.000Z
2021-01-26T23:59:00.000Z
__author__ = 'Matthew Witherwax (lemoneer)' class Constant(object): def __init__(self, **kwds): self.__dict__.update(kwds) BAUD_RATE = Constant(BAUD_300=0, BAUD_600=1, BAUD_1200=2, BAUD_2400=3, BAUD_4800=4, BAUD_9600=5, BAUD_14400=6, BAUD_19200=7, BAUD_2...
65.697674
121
0.578761
__author__ = 'Matthew Witherwax (lemoneer)' class Constant(object): def __init__(self, **kwds): self.__dict__.update(kwds) BAUD_RATE = Constant(BAUD_300=0, BAUD_600=1, BAUD_1200=2, BAUD_2400=3, BAUD_4800=4, BAUD_9600=5, BAUD_14400=6, BAUD_19200=7, BAUD_2...
true
true
f72d313fd14aa573c97358c7fd15134cb132ca43
79
py
Python
part1/settings.py
codingfever-anishmishra/Warrior-Game-developement-in-python
ff9bb627251f6b82a08f3bc7d84fb72068fea3db
[ "Apache-2.0" ]
null
null
null
part1/settings.py
codingfever-anishmishra/Warrior-Game-developement-in-python
ff9bb627251f6b82a08f3bc7d84fb72068fea3db
[ "Apache-2.0" ]
null
null
null
part1/settings.py
codingfever-anishmishra/Warrior-Game-developement-in-python
ff9bb627251f6b82a08f3bc7d84fb72068fea3db
[ "Apache-2.0" ]
null
null
null
WIDTH = 1024 HEIGHT = 768 #colours WHITE = (255,255,255) RED = (255,0,0)
9.875
21
0.594937
WIDTH = 1024 HEIGHT = 768 WHITE = (255,255,255) RED = (255,0,0)
true
true
f72d316388cae4d3fa92f9185ec7e2b07efe7778
24,267
py
Python
source/spktype21.py
whiskie14142/spktype21
7ed22365fe92cdb74c416d27634df96a45712953
[ "MIT" ]
1
2021-10-21T20:07:04.000Z
2021-10-21T20:07:04.000Z
source/spktype21.py
whiskie14142/spktype21
7ed22365fe92cdb74c416d27634df96a45712953
[ "MIT" ]
1
2020-05-20T05:54:34.000Z
2020-05-20T05:54:34.000Z
source/spktype21.py
whiskie14142/spktype21
7ed22365fe92cdb74c416d27634df96a45712953
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """A supporting module for jplephem to handle data type 21 (Version 0.1.0) This module computes position and velocity of a celestial small body, from a NASA SPICE SPK ephemeris kernel file of data type 21 (Extended Modified Difference Arrays). http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/FO...
36.712557
108
0.588536
from numpy import array, zeros, reshape from jplephem.daf import DAF from jplephem.names import target_names T0 = 2451545.0 S_PER_DAY = 86400.0 MAXTRM = 25 def jd(seconds): return T0 + seconds / S_PER_DAY class SPKType21(object): def __init__(self, daf): self.daf = daf self.segments = [Segm...
true
true
f72d3177ad5efc5cf08c928ba31c9ec1b2799491
119,007
py
Python
cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py
yachika-ralhan/cinder
9d4fd16bcd8eca930910798cc519cb5bc5846c59
[ "Apache-2.0" ]
1
2018-10-23T17:00:53.000Z
2018-10-23T17:00:53.000Z
cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/ibm/ibm_storage/xiv_proxy.py
vexata/cinder
7b84c0842b685de7ee012acec40fb4064edde5e9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 IBM Corporation # 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 req...
42.38141
79
0.561345
import datetime import re import six import socket from oslo_log import log as logging from oslo_utils import importutils pyxcli = importutils.try_import("pyxcli") if pyxcli: from pyxcli import client from pyxcli import errors from pyxcli.events import events from pyxcli.mirroring import mirrored_ent...
true
true
f72d3224b042c8c5cc09ea30e0b80e5291a743e2
283
py
Python
source.py
kingsam91/Habari-zote
ab6e41bc37cfa86d319c1fd26e868c32e3712a26
[ "Unlicense" ]
null
null
null
source.py
kingsam91/Habari-zote
ab6e41bc37cfa86d319c1fd26e868c32e3712a26
[ "Unlicense" ]
null
null
null
source.py
kingsam91/Habari-zote
ab6e41bc37cfa86d319c1fd26e868c32e3712a26
[ "Unlicense" ]
null
null
null
class Source: """ Class that generates new instances of news api source results """ def __init__(self,id,name,category): ''' define properties for our objects ''' self.id = id self.name = name self.category = category
21.769231
65
0.568905
class Source: def __init__(self,id,name,category): self.id = id self.name = name self.category = category
true
true
f72d3258acf4addc09946484e264cdf03539e560
441
py
Python
Mundo_1/Ex012.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
Mundo_1/Ex012.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
Mundo_1/Ex012.py
alinenog/Mundo_Python-1-2-3
2cfda105eec436ae32394e01c011342515fceff5
[ "MIT" ]
null
null
null
# Exercício Python 12: # Faça um algoritmo que leia o preço de um produto e mostre seu novo preço, com 5% de desconto. print('----------------------------') print(' LEITOR DE PREÇO ') print('----------------------------') print() vl = float(input('Digite o valor do produto? R$')) d = (vl * 5) /100 ...
40.090909
96
0.548753
print('----------------------------') print(' LEITOR DE PREÇO ') print('----------------------------') print() vl = float(input('Digite o valor do produto? R$')) d = (vl * 5) /100 print('Preço do produto atual R$ {}'.format(vl)) print('|Preço do produto com 5% de desconto é R$ {:.2f}|'.format(vl-d))
true
true
f72d32a6cc1842bfd53c17bfe61d760812d0fc52
3,981
py
Python
sina_spider/sina_spider/spiders/SinaSpider.py
lj28478416/Sina_News
13ef1d52ba5c81021cdf73370e12ec84777741e0
[ "Apache-2.0" ]
null
null
null
sina_spider/sina_spider/spiders/SinaSpider.py
lj28478416/Sina_News
13ef1d52ba5c81021cdf73370e12ec84777741e0
[ "Apache-2.0" ]
null
null
null
sina_spider/sina_spider/spiders/SinaSpider.py
lj28478416/Sina_News
13ef1d52ba5c81021cdf73370e12ec84777741e0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import scrapy import os from ..items import SinaSpiderItem from ..settings import COOKIES import re class SinaspiderSpider(scrapy.Spider): name = 'SinaSpider' allowed_domains = ["sina.com",'sina.com.cn'] start_urls = ['http://www.sina.com.cn/'] def parse(self, response): ...
47.963855
147
0.544587
import scrapy import os from ..items import SinaSpiderItem from ..settings import COOKIES import re class SinaspiderSpider(scrapy.Spider): name = 'SinaSpider' allowed_domains = ["sina.com",'sina.com.cn'] start_urls = ['http://www.sina.com.cn/'] def parse(self, response): first_lev_node_list =...
true
true
f72d3365da66cf6a696526d674b481da1da66e77
22,009
py
Python
LibBookbuilder/chapter.py
Siyavula/bookbuilder
484f344a6b536d01ed51ea719f47c68aae654d5d
[ "MIT" ]
1
2015-07-18T16:24:36.000Z
2015-07-18T16:24:36.000Z
LibBookbuilder/chapter.py
Siyavula/bookbuilder
484f344a6b536d01ed51ea719f47c68aae654d5d
[ "MIT" ]
2
2016-02-04T18:26:39.000Z
2019-05-09T12:23:16.000Z
LibBookbuilder/chapter.py
Siyavula/bookbuilder
484f344a6b536d01ed51ea719f47c68aae654d5d
[ "MIT" ]
1
2016-01-31T22:26:27.000Z
2016-01-31T22:26:27.000Z
"""Class to handle chapter processing for books.""" from __future__ import print_function import os import logging import hashlib import subprocess import inspect import copy import lxml from lxml import etree try: from termcolor import colored except ImportError: logging.error("Please install termcolor:\n s...
38.612281
105
0.509383
from __future__ import print_function import os import logging import hashlib import subprocess import inspect import copy import lxml from lxml import etree try: from termcolor import colored except ImportError: logging.error("Please install termcolor:\n sudo pip install termcolor") from XmlValidator impor...
true
true
f72d33747d7c9c8e08cd2921f18bbde62bc85b8d
16,578
py
Python
azure-mgmt-network/azure/mgmt/network/operations/security_rules_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:16:34.000Z
2018-11-09T06:16:34.000Z
azure-mgmt-network/azure/mgmt/network/operations/security_rules_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/operations/security_rules_operations.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:17:41.000Z
2018-11-09T06:17:41.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 ...
46.830508
192
0.670829
from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller import uuid from .. import models class SecurityRulesOperations(object): def __init__(self, client, config, serializer, deserializer): self._cl...
true
true
f72d34add56f4240517a10872e4332cb3d2bd4f6
907
py
Python
start_sample.py
ina-foss/stream-index-massive-tweets
63e6919fa441a24d12f90f42d3045b45a356f6dd
[ "MIT" ]
4
2020-04-10T16:25:19.000Z
2021-06-26T16:06:57.000Z
start_sample.py
ina-foss/stream-index-massive-tweets
63e6919fa441a24d12f90f42d3045b45a356f6dd
[ "MIT" ]
null
null
null
start_sample.py
ina-foss/stream-index-massive-tweets
63e6919fa441a24d12f90f42d3045b45a356f6dd
[ "MIT" ]
1
2020-10-07T16:36:22.000Z
2020-10-07T16:36:22.000Z
import requests import logging import time logging.basicConfig(format='%(asctime)s - %(levelname)s : %(message)s', level=logging.INFO) def stream(): """ Send stream instructions to streamer servers in the form of HTTP POST requests. The streamer_0 is dedicated to the Twitter sample API, so we don't send ...
29.258065
109
0.631753
import requests import logging import time logging.basicConfig(format='%(asctime)s - %(levelname)s : %(message)s', level=logging.INFO) def stream(): while True: try: r = requests.post("http://streamer_0:5000/stream", json={}) break except requests.exceptions.ConnectionErro...
true
true
f72d35520a9df35cca1aca5514b7eef3d130635f
1,121
py
Python
tests/test_dipdup/models.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
tests/test_dipdup/models.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
tests/test_dipdup/models.py
spruceid/dipdup-py
adc904196cfd66563938feec0f0afcc5f3df03e3
[ "MIT" ]
null
null
null
# generated by datamodel-codegen: # filename: storage.json from __future__ import annotations from typing import Dict, List, Optional from pydantic import BaseModel, Extra class ResourceMap(BaseModel): class Config: extra = Extra.forbid id: str rate: str class ResourceCollectorStorage(Bas...
23.354167
117
0.613738
from __future__ import annotations from typing import Dict, List, Optional from pydantic import BaseModel, Extra class ResourceMap(BaseModel): class Config: extra = Extra.forbid id: str rate: str class ResourceCollectorStorage(BaseModel): class Config: extra = Extra.forbid a...
true
true
f72d35e8cf56ef9f7fbf1705d18d66a60efa75a9
4,831
py
Python
test/functional/mempool_reorg.py
arock121/pocketnet.core
bc08bf9dc565c60d7e7d53e3cc615408b76f9bde
[ "ECL-2.0", "Apache-2.0" ]
72
2019-06-23T07:48:03.000Z
2022-03-31T03:47:04.000Z
test/functional/mempool_reorg.py
arock121/pocketnet.core
bc08bf9dc565c60d7e7d53e3cc615408b76f9bde
[ "ECL-2.0", "Apache-2.0" ]
153
2021-01-20T08:10:23.000Z
2022-03-31T23:30:50.000Z
test/functional/mempool_reorg.py
arock121/pocketnet.core
bc08bf9dc565c60d7e7d53e3cc615408b76f9bde
[ "ECL-2.0", "Apache-2.0" ]
20
2019-10-10T22:18:25.000Z
2022-02-12T01:08:29.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Pocketcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool re-org scenarios. Test re-org scenarios with a mempool that contains transactions that...
47.831683
122
0.703788
from test_framework.blocktools import create_raw_transaction from test_framework.test_framework import PocketcoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error class MempoolCoinbaseTest(PocketcoinTestFramework): def set_test_params(self): self.num_nodes = 2 def s...
true
true
f72d363eb6000b6d71778b49bc3242e3155db73d
1,224
py
Python
main.py
kchandra423/JPEG-Reader
8298e715dfba338ca6d17e6d9769cdba82256466
[ "MIT" ]
null
null
null
main.py
kchandra423/JPEG-Reader
8298e715dfba338ca6d17e6d9769cdba82256466
[ "MIT" ]
null
null
null
main.py
kchandra423/JPEG-Reader
8298e715dfba338ca6d17e6d9769cdba82256466
[ "MIT" ]
null
null
null
import os from fractions import Fraction from PIL import Image from PIL.ExifTags import TAGS def get_exif(fn): ret = {} i = Image.open(fn) info = i._getexif() decoded_dict = {} for tag, value in info.items(): decoded = TAGS.get(tag, tag) decoded_dict[decoded] = value ret['ISO'...
26.042553
77
0.609477
import os from fractions import Fraction from PIL import Image from PIL.ExifTags import TAGS def get_exif(fn): ret = {} i = Image.open(fn) info = i._getexif() decoded_dict = {} for tag, value in info.items(): decoded = TAGS.get(tag, tag) decoded_dict[decoded] = value ret['ISO'...
true
true
f72d36baefbadb9b5e6e7da71a7053953f8e03d6
245
py
Python
benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_1.py
dlshriver/dnnv-benchmarks
84b5bf1e046226d269da1cdbd7a7690fd90d024b
[ "MIT" ]
1
2022-03-01T08:59:32.000Z
2022-03-01T08:59:32.000Z
benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_1.py
dlshriver/dnnv-benchmarks
84b5bf1e046226d269da1cdbd7a7690fd90d024b
[ "MIT" ]
null
null
null
benchmarks/DNNF-CIFAR-EQ/properties/global_targeted_diff_8_1.py
dlshriver/dnnv-benchmarks
84b5bf1e046226d269da1cdbd7a7690fd90d024b
[ "MIT" ]
null
null
null
from dnnv.properties import * import numpy as np N1 = Network("N1") N2 = Network("N2") class_1 = 8 class_2 = 1 Forall( x, Implies( (0 <= x <= 1), (np.argmax(N1(x)) != class_1) | (np.argmax(N2(x)) != class_2), ), )
14.411765
70
0.530612
from dnnv.properties import * import numpy as np N1 = Network("N1") N2 = Network("N2") class_1 = 8 class_2 = 1 Forall( x, Implies( (0 <= x <= 1), (np.argmax(N1(x)) != class_1) | (np.argmax(N2(x)) != class_2), ), )
true
true
f72d376d64716f4e1292cdae5c874f29c229dbed
1,022
py
Python
GeeksForGeeks/SumOfPairs/solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
165
2020-10-03T08:01:11.000Z
2022-03-31T02:42:08.000Z
GeeksForGeeks/SumOfPairs/solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
383
2020-10-03T07:39:11.000Z
2021-11-20T07:06:35.000Z
GeeksForGeeks/SumOfPairs/solution2.py
gbrls/CompetitiveCode
b6f1b817a655635c3c843d40bd05793406fea9c6
[ "MIT" ]
380
2020-10-03T08:05:04.000Z
2022-03-19T06:56:59.000Z
# Map Approach [O(n)] : # Idea is to create a hashmap to store freq of the elements, and lookup those elements while traversing the array to check if their sum is equal to the given sum or not # GeeksforGeeks Explanation: https://youtu.be/bvKMZXc0jQU def getPairsCount(arr, n, sum): m = [0] * 1000 # Store count...
31.9375
168
0.671233
def getPairsCount(arr, n, sum): m = [0] * 1000 for i in range(0, n): m[arr[i]] m[arr[i]] += 1 twice_count = 0 for i in range(0, n): twice_count += m[sum - arr[i]] if (sum - arr[i] == arr[i]): twice_count -= 1 return int(twice_count / 2) n = int(input()) arr = list(map(i...
true
true
f72d384225a2566b1d26d248db3515c9b6c34c12
746
py
Python
run.py
raeyoungii/KJ_Emergency
cb044b8b93f80df6e953bd9f298b7c73bac4a8ed
[ "MIT" ]
1
2020-12-30T15:59:23.000Z
2020-12-30T15:59:23.000Z
run.py
raeyoungii/KJ_Emergency
cb044b8b93f80df6e953bd9f298b7c73bac4a8ed
[ "MIT" ]
null
null
null
run.py
raeyoungii/KJ_Emergency
cb044b8b93f80df6e953bd9f298b7c73bac4a8ed
[ "MIT" ]
1
2020-12-19T06:55:45.000Z
2020-12-19T06:55:45.000Z
# -*- encoding: utf-8 -*- """ Copyright (c) 2019 - present AppSeed.us """ from flask_migrate import Migrate from os import environ from sys import exit from decouple import config from config import config_dict from app import create_app, db # WARNING: Don't run with debug turned on in production! DEBUG = config('DE...
22.606061
78
0.733244
from flask_migrate import Migrate from os import environ from sys import exit from decouple import config from config import config_dict from app import create_app, db DEBUG = config('DEBUG', default=True) # The configuration get_config_mode = 'Debug' if DEBUG else 'Production' try: # Load the configuration u...
true
true
f72d38578c529760cc3eebfa7307b5a6fa0eef3a
19,861
py
Python
parcels/kernel/basekernel.py
nvogtvincent/parcels
6f6dbadacaae54949ade9acd4e4a57dd8b5af398
[ "MIT" ]
null
null
null
parcels/kernel/basekernel.py
nvogtvincent/parcels
6f6dbadacaae54949ade9acd4e4a57dd8b5af398
[ "MIT" ]
null
null
null
parcels/kernel/basekernel.py
nvogtvincent/parcels
6f6dbadacaae54949ade9acd4e4a57dd8b5af398
[ "MIT" ]
null
null
null
import re import _ctypes import inspect import numpy.ctypeslib as npct from time import time as ostime from os import path from os import remove from sys import platform from sys import version_info from ast import FunctionDef from hashlib import md5 from parcels.tools.loggers import logger import numpy as np from nump...
42.803879
170
0.601682
import re import _ctypes import inspect import numpy.ctypeslib as npct from time import time as ostime from os import path from os import remove from sys import platform from sys import version_info from ast import FunctionDef from hashlib import md5 from parcels.tools.loggers import logger import numpy as np from nump...
true
true
f72d390cbcef3353b659e18c1886e17ecd60788c
5,876
py
Python
MachikoroSimulator/MachikoroSimulator/Game/Game.py
djscheuf/Machikoro-Simulator
e479ef8d27b0396e2f182537926321689c160f7a
[ "MIT" ]
null
null
null
MachikoroSimulator/MachikoroSimulator/Game/Game.py
djscheuf/Machikoro-Simulator
e479ef8d27b0396e2f182537926321689c160f7a
[ "MIT" ]
null
null
null
MachikoroSimulator/MachikoroSimulator/Game/Game.py
djscheuf/Machikoro-Simulator
e479ef8d27b0396e2f182537926321689c160f7a
[ "MIT" ]
null
null
null
import random from ..CardEnum import * from copy import deepcopy class GameResult: def __init__(self,winner,turns): self.winner = winner self.turns = turns class Game: def __init__(self, players, engine, deck, logger): random.seed() self.winner = None self.total_turns...
33.770115
109
0.607897
import random from ..CardEnum import * from copy import deepcopy class GameResult: def __init__(self,winner,turns): self.winner = winner self.turns = turns class Game: def __init__(self, players, engine, deck, logger): random.seed() self.winner = None self.total_turns...
true
true
f72d3911465af80a203ccedab020f7e0013fa7da
6,068
py
Python
mcdp/mcstring.py
HWServer/Mcdp
5877d371ffb6ff3ddc13312d65902707e378d026
[ "Apache-2.0" ]
null
null
null
mcdp/mcstring.py
HWServer/Mcdp
5877d371ffb6ff3ddc13312d65902707e378d026
[ "Apache-2.0" ]
null
null
null
mcdp/mcstring.py
HWServer/Mcdp
5877d371ffb6ff3ddc13312d65902707e378d026
[ "Apache-2.0" ]
null
null
null
from pydantic import validator, Field from typing import Dict, List, Any, Literal, Tuple, Union, Optional from .typings import McdpBaseModel from .config import check_mc_version, MinecraftVersionError class MCStringObj(McdpBaseModel): def json(self, **kw) -> str: data = self.dict(**kw) return se...
28.223256
101
0.593276
from pydantic import validator, Field from typing import Dict, List, Any, Literal, Tuple, Union, Optional from .typings import McdpBaseModel from .config import check_mc_version, MinecraftVersionError class MCStringObj(McdpBaseModel): def json(self, **kw) -> str: data = self.dict(**kw) return se...
true
true
f72d3a61f612d2a23374b9374aeaf98f51986974
680
py
Python
migrations/versions/bcb4dc0e73e2_lower_activites.py
betagouv/ecosante
cc7dd76bb65405ba44f432197de851dc7e22ed38
[ "MIT" ]
3
2021-09-24T14:07:51.000Z
2021-12-14T13:48:34.000Z
migrations/versions/bcb4dc0e73e2_lower_activites.py
betagouv/recosante-api
4560b2cf2ff4dc19597792fe15a3805f6259201d
[ "MIT" ]
187
2021-03-25T16:43:49.000Z
2022-03-23T14:40:31.000Z
migrations/versions/bcb4dc0e73e2_lower_activites.py
betagouv/recosante-api
4560b2cf2ff4dc19597792fe15a3805f6259201d
[ "MIT" ]
2
2020-04-08T11:56:17.000Z
2020-04-09T14:04:15.000Z
"""lower activites Revision ID: bcb4dc0e73e2 Revises: 25116bbd585c Create Date: 2020-10-06 11:34:47.860748 """ from alembic import op import sqlalchemy as sa from sqlalchemy.sql import text # revision identifiers, used by Alembic. revision = 'bcb4dc0e73e2' down_revision = '25116bbd585c' branch_labels = None depends...
18.888889
93
0.667647
from alembic import op import sqlalchemy as sa from sqlalchemy.sql import text revision = 'bcb4dc0e73e2' down_revision = '25116bbd585c' branch_labels = None depends_on = None def upgrade(): conn = op.get_bind() conn.execute( text( """ UPDATE inscription SET activites...
true
true
f72d3bd5c2745fd8a21e158ba4e738b50066729f
1,529
py
Python
Artsy.py
pde-bakk/Artsy
f7c7a9d019b16d193d0418ddd7728ad9026f21e9
[ "MIT" ]
1
2020-12-22T06:13:52.000Z
2020-12-22T06:13:52.000Z
Artsy.py
pde-bakk/Artsy
f7c7a9d019b16d193d0418ddd7728ad9026f21e9
[ "MIT" ]
null
null
null
Artsy.py
pde-bakk/Artsy
f7c7a9d019b16d193d0418ddd7728ad9026f21e9
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # **************************************************************************** # # # # :::::::: # # Artsy.py :+...
40.236842
83
0.335513
import sys, time, random, os from PIL import Image from GenerateASCII import generate_ascii if len(sys.argv) >= 2: imageName = sys.argv[1] + ".gif" else: imageName = "thor.gif" try: if '../' in imageName: print('Please only supply images in the "imgs/" folder') raise FileNotFoundError ...
true
true
f72d3cd8fc9fdc84dd4cdf801ecc7d6a16740ea9
5,233
py
Python
axelerate/networks/common_utils/callbacks.py
joaopdss/aXeleRate
791c8b29056ed11bd0ed306e620664577ec9724c
[ "MIT" ]
148
2020-03-18T01:36:20.000Z
2022-03-24T08:56:45.000Z
axelerate/networks/common_utils/callbacks.py
joaopdss/aXeleRate
791c8b29056ed11bd0ed306e620664577ec9724c
[ "MIT" ]
55
2020-03-29T14:36:44.000Z
2022-02-17T22:35:03.000Z
axelerate/networks/common_utils/callbacks.py
joaopdss/aXeleRate
791c8b29056ed11bd0ed306e620664577ec9724c
[ "MIT" ]
57
2020-04-01T14:22:53.000Z
2022-01-31T13:09:49.000Z
import numpy as np from tensorflow import keras from tensorflow.keras import backend as K def cosine_decay_with_warmup(global_step, learning_rate_base, total_steps, warmup_learning_rate=0.0, warmup_steps...
47.144144
105
0.620868
import numpy as np from tensorflow import keras from tensorflow.keras import backend as K def cosine_decay_with_warmup(global_step, learning_rate_base, total_steps, warmup_learning_rate=0.0, warmup_steps...
true
true
f72d3d948483dbe026cf497504af1a8d42844da7
14,549
py
Python
grr/core/grr_response_core/lib/rdfvalues/protodict.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
1
2019-08-17T14:02:44.000Z
2019-08-17T14:02:44.000Z
grr/core/grr_response_core/lib/rdfvalues/protodict.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
null
null
null
grr/core/grr_response_core/lib/rdfvalues/protodict.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """A generic serializer for python dictionaries.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections from future.builtins import str from future.utils import iteritems from future.utils import itervalues from futur...
30.310417
83
0.679909
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections from future.builtins import str from future.utils import iteritems from future.utils import itervalues from future.utils import python_2_unicode_compatible from past.builtins import long ...
true
true
f72d3e3660c3afa145347ee9328b2093b79c0d7d
8,025
py
Python
Truth-and-Dare.py
sayantan-kuila/Truth-and-Dare_BOT
bf4306e4d526cb33af5ee7003ddc2c809aa7f8a5
[ "MIT" ]
null
null
null
Truth-and-Dare.py
sayantan-kuila/Truth-and-Dare_BOT
bf4306e4d526cb33af5ee7003ddc2c809aa7f8a5
[ "MIT" ]
null
null
null
Truth-and-Dare.py
sayantan-kuila/Truth-and-Dare_BOT
bf4306e4d526cb33af5ee7003ddc2c809aa7f8a5
[ "MIT" ]
null
null
null
from keep_alive import keep_alive import discord from discord.ext import commands,tasks from itertools import cycle import random intents = discord.Intents(messages = True , guilds = True , reactions = True , members = True , presences = True) client = commands.Bot(command_prefix = '.', intents = intents) ...
29.076087
147
0.701807
from keep_alive import keep_alive import discord from discord.ext import commands,tasks from itertools import cycle import random intents = discord.Intents(messages = True , guilds = True , reactions = True , members = True , presences = True) client = commands.Bot(command_prefix = '.', intents = intents) ...
true
true
f72d3e497e472525f055e00a6ef6329de6c33abd
3,605
py
Python
model-optimizer/unit_tests/extensions/front/div_test.py
monroid/openvino
8272b3857ef5be0aaa8abbf7bd0d5d5615dc40b6
[ "Apache-2.0" ]
2,406
2020-04-22T15:47:54.000Z
2022-03-31T10:27:37.000Z
model-optimizer/unit_tests/extensions/front/div_test.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
4,948
2020-04-22T15:12:39.000Z
2022-03-31T18:45:42.000Z
model-optimizer/unit_tests/extensions/front/div_test.py
thomas-yanxin/openvino
031e998a15ec738c64cc2379d7f30fb73087c272
[ "Apache-2.0" ]
991
2020-04-23T18:21:09.000Z
2022-03-31T18:40:57.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import unittest import numpy as np from extensions.front.div import Div from mo.utils.ir_engine.compare_graphs import compare_graphs from unit_tests.utils.graph import build_graph, result, regular_op_with_shaped_data, valued_const_with...
41.918605
119
0.615257
import unittest import numpy as np from extensions.front.div import Div from mo.utils.ir_engine.compare_graphs import compare_graphs from unit_tests.utils.graph import build_graph, result, regular_op_with_shaped_data, valued_const_with_data, connect, \ connect_data nodes = { **regular_op_with_shaped_data('p...
true
true
f72d3eb7ca0c3e84b7139eab0d79d7cc70f487df
1,158
py
Python
oss/ossimport/PUTCONFIGTOOSS.py
yibozhang/aliyunproduct
770205029c7bf3a0913c08a0e8bed2e0953579f1
[ "MIT" ]
null
null
null
oss/ossimport/PUTCONFIGTOOSS.py
yibozhang/aliyunproduct
770205029c7bf3a0913c08a0e8bed2e0953579f1
[ "MIT" ]
null
null
null
oss/ossimport/PUTCONFIGTOOSS.py
yibozhang/aliyunproduct
770205029c7bf3a0913c08a0e8bed2e0953579f1
[ "MIT" ]
1
2020-08-08T01:57:21.000Z
2020-08-08T01:57:21.000Z
#!/usr/bin/env python import oss2 class PUTCONFIGTOOSS(object): def __init__(self,DEST,STORESIZE): self.AK = '' self.SK = '' self.ENDPOINT = 'http://oss-cn-hangzhou.aliyuncs.com' self.BUCKET = 'ali-hangzhou' self.DEST = DEST self.STORESIZE = STORESIZE def INITIAL(self): try: A...
28.243902
89
0.630397
import oss2 class PUTCONFIGTOOSS(object): def __init__(self,DEST,STORESIZE): self.AK = '' self.SK = '' self.ENDPOINT = 'http://oss-cn-hangzhou.aliyuncs.com' self.BUCKET = 'ali-hangzhou' self.DEST = DEST self.STORESIZE = STORESIZE def INITIAL(self): try: AUTH = oss2.Auth(self.A...
true
true
f72d3ee94c4789ef5592f0a51b0087799e26cbd9
859
py
Python
src/djangoreactredux/djrenv/lib/python3.5/site-packages/setoptconf/source/yamlfile.py
m2jobe/c_x
ba914449a9a85d82703895fc884733ca20454034
[ "MIT" ]
4
2016-08-11T20:00:07.000Z
2020-08-09T01:33:22.000Z
src/djangoreactredux/djrenv/lib/python3.5/site-packages/setoptconf/source/yamlfile.py
m2jobe/c_x
ba914449a9a85d82703895fc884733ca20454034
[ "MIT" ]
7
2020-02-12T03:06:52.000Z
2021-06-10T19:33:14.000Z
src/djangoreactredux/djrenv/lib/python3.5/site-packages/setoptconf/source/yamlfile.py
m2jobe/c_x
ba914449a9a85d82703895fc884733ca20454034
[ "MIT" ]
2
2015-01-27T10:42:03.000Z
2021-09-09T07:17:52.000Z
import codecs import yaml from .filebased import FileBasedSource __all__ = ( 'YamlFileSource', ) class YamlFileSource(FileBasedSource): def __init__(self, *args, **kwargs): self.encoding = kwargs.pop('encoding', 'utf-8') super(YamlFileSource, self).__init__(*args, **kwargs) def get_se...
24.542857
75
0.633295
import codecs import yaml from .filebased import FileBasedSource __all__ = ( 'YamlFileSource', ) class YamlFileSource(FileBasedSource): def __init__(self, *args, **kwargs): self.encoding = kwargs.pop('encoding', 'utf-8') super(YamlFileSource, self).__init__(*args, **kwargs) def get_se...
true
true
f72d408bda5345b17a849e6391721b7debb832c5
7,477
py
Python
sme_financing/main/apis/funding_project_api.py
BuildForSDG/team-214-backend
f1aff9c27d7b7588b4bbb2bc68956b35051d4506
[ "MIT" ]
1
2020-05-20T16:32:33.000Z
2020-05-20T16:32:33.000Z
sme_financing/main/apis/funding_project_api.py
BuildForSDG/team-214-backend
f1aff9c27d7b7588b4bbb2bc68956b35051d4506
[ "MIT" ]
23
2020-05-19T07:12:53.000Z
2020-06-21T03:57:54.000Z
sme_financing/main/apis/funding_project_api.py
BuildForSDG/team-214-backend
f1aff9c27d7b7588b4bbb2bc68956b35051d4506
[ "MIT" ]
1
2020-05-18T14:18:12.000Z
2020-05-18T14:18:12.000Z
from flask import request from flask_restx import Resource, reqparse from flask_restx._http import HTTPStatus from werkzeug.datastructures import FileStorage from ..service import funding_detail_service as fd_service from ..service import funding_project_service as fp_service from .dto import FundingDetailDTO, Funding...
40.857923
82
0.700816
from flask import request from flask_restx import Resource, reqparse from flask_restx._http import HTTPStatus from werkzeug.datastructures import FileStorage from ..service import funding_detail_service as fd_service from ..service import funding_project_service as fp_service from .dto import FundingDetailDTO, Funding...
true
true
f72d41922e895ee0d677b880780e2a005c5d83b5
1,847
py
Python
aardvark/conf/nova_conf.py
ttsiouts/aardvark
cbf29f332df86814dd581152faf863c0d29ae41c
[ "Apache-2.0" ]
null
null
null
aardvark/conf/nova_conf.py
ttsiouts/aardvark
cbf29f332df86814dd581152faf863c0d29ae41c
[ "Apache-2.0" ]
null
null
null
aardvark/conf/nova_conf.py
ttsiouts/aardvark
cbf29f332df86814dd581152faf863c0d29ae41c
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 European Organization for Nuclear Research. # 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/LIC...
29.31746
78
0.728749
from keystoneauth1 import loading as ks_loading from oslo_config import cfg SERVICE_TYPE = 'compute' compute_group = cfg.OptGroup( 'compute', title='Compute Service Options', help="Configuration options for connecting to the Nova API service" ) compute_opts = [ cfg.StrOpt("client_version", ...
true
true
f72d41a3123aa80a954c0db94bd894fab5e71a21
285
py
Python
exercicios-projetos-python/verificador-numero.py
lucaspalmanew/exercicios-projetos-python
fae75ee8f038811d5d869ba16d412ca726d848dc
[ "MIT" ]
null
null
null
exercicios-projetos-python/verificador-numero.py
lucaspalmanew/exercicios-projetos-python
fae75ee8f038811d5d869ba16d412ca726d848dc
[ "MIT" ]
null
null
null
exercicios-projetos-python/verificador-numero.py
lucaspalmanew/exercicios-projetos-python
fae75ee8f038811d5d869ba16d412ca726d848dc
[ "MIT" ]
null
null
null
n1 = int(input('Digite um número: ')) n2 = int(input('Digite outro número: ')) s = n1 + n2 m = n1 * n2 d = n1 / n2 di = n1 // n2 e = n1 ** n2 print(' A soma é {},\n o produto é {},\n a divisão é {:.3f}'.format(s, m, d)) print(' A divisão inteira é {}\n a potencia é {}'.format(di, e))
28.5
77
0.561404
n1 = int(input('Digite um número: ')) n2 = int(input('Digite outro número: ')) s = n1 + n2 m = n1 * n2 d = n1 / n2 di = n1 // n2 e = n1 ** n2 print(' A soma é {},\n o produto é {},\n a divisão é {:.3f}'.format(s, m, d)) print(' A divisão inteira é {}\n a potencia é {}'.format(di, e))
true
true
f72d4226675eac016336d700e165472ce8673a76
1,393
py
Python
speedcord/exceptions.py
MM-coder/speedcord
9b216a950f9766646bc54ce1cf85a7f11499c076
[ "MIT" ]
null
null
null
speedcord/exceptions.py
MM-coder/speedcord
9b216a950f9766646bc54ce1cf85a7f11499c076
[ "MIT" ]
null
null
null
speedcord/exceptions.py
MM-coder/speedcord
9b216a950f9766646bc54ce1cf85a7f11499c076
[ "MIT" ]
null
null
null
""" Created by Epic at 9/1/20 """ class HTTPException(Exception): def __init__(self, request, data): self.request = request self.data = data super().__init__(data) class Forbidden(HTTPException): pass class NotFound(HTTPException): def __init__(self, request): self.requ...
23.216667
99
0.700646
class HTTPException(Exception): def __init__(self, request, data): self.request = request self.data = data super().__init__(data) class Forbidden(HTTPException): pass class NotFound(HTTPException): def __init__(self, request): self.request = request Exception.__...
true
true
f72d422cd4575a6baaf77c2ff39a10a79d61fedc
2,219
py
Python
ServerComponent/Analysers/SubjectRelevance.py
CDU55/FakeNews
707bd48dd78851081d98ad21bbdadfc2720bd644
[ "MIT" ]
null
null
null
ServerComponent/Analysers/SubjectRelevance.py
CDU55/FakeNews
707bd48dd78851081d98ad21bbdadfc2720bd644
[ "MIT" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
ServerComponent/Analysers/SubjectRelevance.py
CDU55/FakeNews
707bd48dd78851081d98ad21bbdadfc2720bd644
[ "MIT" ]
1
2020-10-19T14:55:23.000Z
2020-10-19T14:55:23.000Z
import os import time from dask import dataframe as dd import jellyfish from TextExtraction.APIs.TextAPI import getListOfSentences csv_path = os.path.join(os.path.dirname(__file__), "india-news-headlines.csv") headlines = dd.read_csv(csv_path).headline_text def get_mean(sentances_scores): return sum(sentances_sc...
37.610169
120
0.706625
import os import time from dask import dataframe as dd import jellyfish from TextExtraction.APIs.TextAPI import getListOfSentences csv_path = os.path.join(os.path.dirname(__file__), "india-news-headlines.csv") headlines = dd.read_csv(csv_path).headline_text def get_mean(sentances_scores): return sum(sentances_sc...
true
true
f72d425cc6b91707415be9dbb32383c596d493c2
646
py
Python
Code/GUI/config.py
boydj9/CRDB-Project
4c5612ea50d299bb0fd76947ce18f925c6d03cae
[ "MIT" ]
null
null
null
Code/GUI/config.py
boydj9/CRDB-Project
4c5612ea50d299bb0fd76947ce18f925c6d03cae
[ "MIT" ]
null
null
null
Code/GUI/config.py
boydj9/CRDB-Project
4c5612ea50d299bb0fd76947ce18f925c6d03cae
[ "MIT" ]
null
null
null
#!/usr/bin/python """ CSC 315 Spring 2020 John DeGood This code is from: https://www.postgresqltutorial.com/postgresql-python/ """ from ConfigParser import ConfigParser def config(filename='database.ini', section='postgresql'): # create a parser parser = ConfigParser() # read config file parser.r...
20.83871
90
0.654799
from ConfigParser import ConfigParser def config(filename='database.ini', section='postgresql'): parser = ConfigParser() parser.read(filename) db = {} if parser.has_section(section): params = parser.items(section) for param in params: db[param[0]] = param[...
true
true
f72d4281dc07073a8e5737e6290b89c1dbc6f12d
769
py
Python
viadot/tasks/__init__.py
PanczykowskiK/viadot
44e269790b3debb02318ff4c4f07638b3a37d800
[ "MIT" ]
null
null
null
viadot/tasks/__init__.py
PanczykowskiK/viadot
44e269790b3debb02318ff4c4f07638b3a37d800
[ "MIT" ]
null
null
null
viadot/tasks/__init__.py
PanczykowskiK/viadot
44e269790b3debb02318ff4c4f07638b3a37d800
[ "MIT" ]
null
null
null
from .azure_blob_storage import BlobFromCSV from .azure_data_lake import ( AzureDataLakeCopy, AzureDataLakeDownload, AzureDataLakeList, AzureDataLakeToDF, AzureDataLakeUpload, ) from .azure_key_vault import ( AzureKeyVaultSecret, CreateAzureKeyVaultSecret, DeleteAzureKeyVaultSecret, ) fr...
29.576923
78
0.819246
from .azure_blob_storage import BlobFromCSV from .azure_data_lake import ( AzureDataLakeCopy, AzureDataLakeDownload, AzureDataLakeList, AzureDataLakeToDF, AzureDataLakeUpload, ) from .azure_key_vault import ( AzureKeyVaultSecret, CreateAzureKeyVaultSecret, DeleteAzureKeyVaultSecret, ) fr...
true
true
f72d4377f739886a09d9defd618c46e865d276c5
9,276
py
Python
example.py
genesiscloud/py-genesiscloud
8fb1dd1884768d8245a1903a6a8042c650788309
[ "MIT" ]
6
2020-06-16T15:38:11.000Z
2021-04-20T20:39:19.000Z
example.py
genesiscloud/py-genesiscloud
8fb1dd1884768d8245a1903a6a8042c650788309
[ "MIT" ]
3
2020-06-16T15:38:07.000Z
2021-04-21T09:50:12.000Z
example.py
genesiscloud/py-genesiscloud
8fb1dd1884768d8245a1903a6a8042c650788309
[ "MIT" ]
1
2020-06-20T05:05:04.000Z
2020-06-20T05:05:04.000Z
# MIT License # # Copyright (c) 2020 Genesis Cloud Ltd. <opensource@genesiscloud.com> # # 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 limitation the r...
38.65
221
0.691785
import os import textwrap import time import subprocess as sp from genesiscloud.client import Client, INSTANCE_TYPES def simple_startup_script(): return textwrap.dedent(""" #cloud-config hostname: mytestubuntu runcmd: - [ "apt", "install", "-y", "vim" ] """) def get_startup_script(): return """#...
true
true
f72d43e040d4b3be6767b65283613caed41078b8
32,888
py
Python
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service_parameter.py
riddopic/config
59f027fc42e2b34d9609c5fd6ec956b46a480235
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service_parameter.py
riddopic/config
59f027fc42e2b34d9609c5fd6ec956b46a480235
[ "Apache-2.0" ]
null
null
null
sysinv/sysinv/sysinv/sysinv/api/controllers/v1/service_parameter.py
riddopic/config
59f027fc42e2b34d9609c5fd6ec956b46a480235
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015-2018 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # # vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # import copy import pecan from pecan import rest import six import wsme from wsme import types as wtypes import wsmeext.pecan as wsme_pecan from fm_api import const...
41.736041
97
0.608429
import copy import pecan from pecan import rest import six import wsme from wsme import types as wtypes import wsmeext.pecan as wsme_pecan from fm_api import constants as fm_constants from fm_api import fm_api from oslo_log import log from oslo_utils import excutils from sysinv._i18n import _ from sysinv.api.contro...
true
true
f72d454abe47a21d4da45346d8bde4ef78bc13d9
5,237
py
Python
src/Python/sirf/contrib/kcl/Prior.py
SyneRBI/SIRF-Contribs
130223d9bc11991eadcd11f9b715aea34c4842fd
[ "Apache-2.0" ]
1
2019-04-18T08:54:12.000Z
2019-04-18T08:54:12.000Z
src/Python/sirf/contrib/kcl/Prior.py
CCPPETMR/SIRF-Contribs
3298c1519b3c7d7f0794306061c08dccf339199b
[ "Apache-2.0" ]
5
2018-12-18T10:13:02.000Z
2018-12-19T16:49:07.000Z
src/Python/sirf/contrib/kcl/Prior.py
SyneRBI/SIRF-Contribs
130223d9bc11991eadcd11f9b715aea34c4842fd
[ "Apache-2.0" ]
1
2019-09-26T11:48:39.000Z
2019-09-26T11:48:39.000Z
import numpy as np class Prior(object): def __init__(self,imageSize, sWindowSize=3, imageCropFactor=[0]): self.imageSize = imageSize if len(imageSize)==3 else imageSize.append(1) self.imageCropFactor = imageCropFactor if np.mod(sWindowSize,2): se...
37.141844
118
0.504105
import numpy as np class Prior(object): def __init__(self,imageSize, sWindowSize=3, imageCropFactor=[0]): self.imageSize = imageSize if len(imageSize)==3 else imageSize.append(1) self.imageCropFactor = imageCropFactor if np.mod(sWindowSize,2): se...
true
true
f72d459899b797331f8484c4f146860d8d0ebd33
108
py
Python
server/__init__.py
enotnadoske/JointPython
e335fbf8eba41cf3a29601d0578ff37964b3b8d4
[ "Apache-2.0" ]
null
null
null
server/__init__.py
enotnadoske/JointPython
e335fbf8eba41cf3a29601d0578ff37964b3b8d4
[ "Apache-2.0" ]
27
2020-04-07T22:59:39.000Z
2022-02-23T09:03:13.000Z
server/__init__.py
enotnadoske/JointPython
e335fbf8eba41cf3a29601d0578ff37964b3b8d4
[ "Apache-2.0" ]
4
2020-03-17T10:53:07.000Z
2020-04-26T11:29:50.000Z
"""A package for http server""" # pylint: skip-file __all__ = [ 'demo_server', 'http_server', ]
15.428571
31
0.592593
__all__ = [ 'demo_server', 'http_server', ]
true
true
f72d467797d7f4e6a5ea93e34366cacd30a1c9eb
702
py
Python
var/spack/repos/builtin/packages/glproto/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2,360
2017-11-06T08:47:01.000Z
2022-03-31T14:45:33.000Z
var/spack/repos/builtin/packages/glproto/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
13,838
2017-11-04T07:49:45.000Z
2022-03-31T23:38:39.000Z
var/spack/repos/builtin/packages/glproto/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1,793
2017-11-04T07:45:50.000Z
2022-03-30T14:31:53.000Z
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Glproto(AutotoolsPackage, XorgPackage): """OpenGL Extension to the X Window System. T...
31.909091
96
0.737892
from spack import * class Glproto(AutotoolsPackage, XorgPackage): homepage = "https://www.x.org/wiki/" xorg_mirror_path = "proto/glproto-1.4.17.tar.gz" version('1.4.17', sha256='9d8130fec2b98bd032db7730fa092dd9dec39f3de34f4bb03ceb43b9903dbc96') depends_on('pkgconfig', type='build') depends_on(...
true
true
f72d47de2913cc5694788e68cb664a1c6f4860a0
4,356
py
Python
codestosort/NaturalLanguage/module/bestmodel.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
2
2019-09-30T04:57:11.000Z
2020-04-06T04:27:46.000Z
codestosort/NaturalLanguage/module/bestmodel.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
null
null
null
codestosort/NaturalLanguage/module/bestmodel.py
jimmy-academia/Deeper-Learnings
ac363efe5450dd2751c0c1bea0ee7af457f7ac24
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class BestNet(torch.nn.Module): def __init__(self, embedding_dim): super(BestNet, self).__init__() self.embedding_dim = embedding_dim self.hidden_dim = 256 self.embedding_dropout=...
36.3
89
0.61685
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable class BestNet(torch.nn.Module): def __init__(self, embedding_dim): super(BestNet, self).__init__() self.embedding_dim = embedding_dim self.hidden_dim = 256 self.embedding_dropout=...
true
true
f72d4958dd28a6e9ba69d6907852444ec2ed532f
6,624
py
Python
indico/modules/events/papers/models/call_for_papers.py
tobiashuste/indico
c1e6ec0c8c84745988e38c9b1768142a6feb9e0e
[ "MIT" ]
null
null
null
indico/modules/events/papers/models/call_for_papers.py
tobiashuste/indico
c1e6ec0c8c84745988e38c9b1768142a6feb9e0e
[ "MIT" ]
null
null
null
indico/modules/events/papers/models/call_for_papers.py
tobiashuste/indico
c1e6ec0c8c84745988e38c9b1768142a6feb9e0e
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from indico.modules.events.papers.models.competences import Paper...
39.664671
110
0.696256
from __future__ import unicode_literals from indico.modules.events.papers.models.competences import PaperCompetence from indico.modules.events.papers.models.reviews import PaperReviewType from indico.modules.events.papers.settings import PaperReviewingRole, paper_reviewing_settings from indico.modules.events.settings...
true
true
f72d4a199674fe45edb35fd243b59bbb77a4e1f8
2,592
py
Python
examples/ppo/agent.py
jaehlee/flax
e01e2bcb012211d48e4c75e78297b8e15d742a37
[ "Apache-2.0" ]
2,249
2020-03-08T12:13:08.000Z
2022-03-31T10:25:13.000Z
examples/ppo/agent.py
jaehlee/flax
e01e2bcb012211d48e4c75e78297b8e15d742a37
[ "Apache-2.0" ]
1,338
2020-03-06T16:56:34.000Z
2022-03-31T13:46:49.000Z
examples/ppo/agent.py
jaehlee/flax
e01e2bcb012211d48e4c75e78297b8e15d742a37
[ "Apache-2.0" ]
343
2020-03-06T16:35:39.000Z
2022-03-27T17:31:45.000Z
# Copyright 2021 The Flax 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 wri...
29.123596
79
0.707948
import functools import multiprocessing import collections from typing import Any, Callable import numpy as np import jax import flax import env_utils @functools.partial(jax.jit, static_argnums=0) def policy_action( apply_fn: Callable[..., Any], params: flax.core.frozen_dict.FrozenDict, state: np.ndarray): ...
true
true
f72d4ac16b95c592bb8e27f024b8fa3fe860340e
542
py
Python
slot_machine/output_literals.py
gorbulus/Slot_Machine
9bb3a93d4a3948b92a77c13a6a4ce5026b214ee4
[ "MIT" ]
null
null
null
slot_machine/output_literals.py
gorbulus/Slot_Machine
9bb3a93d4a3948b92a77c13a6a4ce5026b214ee4
[ "MIT" ]
null
null
null
slot_machine/output_literals.py
gorbulus/Slot_Machine
9bb3a93d4a3948b92a77c13a6a4ce5026b214ee4
[ "MIT" ]
null
null
null
# output_literals.py # William Ponton # 2.10.19 # Import modules import slot_machine.data_structures # Constants WELCOME = "\tWelcome to the Slot Machine!" RULES = "\tMatch 2 of any kind to win $5\n\tMatch 3 of any fruit to win $10\n\tMatch 3 BELLS to win $50!\n" ENGAGE = "Do you want to play? (y or n): " LEVER = "\t...
28.526316
107
0.651292
import slot_machine.data_structures WELCOME = "\tWelcome to the Slot Machine!" RULES = "\tMatch 2 of any kind to win $5\n\tMatch 3 of any fruit to win $10\n\tMatch 3 BELLS to win $50!\n" ENGAGE = "Do you want to play? (y or n): " LEVER = "\t OK, pulling the lever!" DRAW = "\t{} | {} | {}" DRAW_MAX = 5 EARNED = "You e...
true
true
f72d4b6995f7533f7aca12a0af1e7b0c0dacd90c
2,458
py
Python
handling-program-flow/code.py
krishnakammari/greyatom-python-for-data-science
8beab2a5f70304916d2d018c2283bf953db0b503
[ "MIT" ]
null
null
null
handling-program-flow/code.py
krishnakammari/greyatom-python-for-data-science
8beab2a5f70304916d2d018c2283bf953db0b503
[ "MIT" ]
null
null
null
handling-program-flow/code.py
krishnakammari/greyatom-python-for-data-science
8beab2a5f70304916d2d018c2283bf953db0b503
[ "MIT" ]
null
null
null
# -------------- ##File path for the file file_path #Code starts here def read_file(path): file1=open(path,"r") sentence=file1.readline() return sentence sample_message=read_file(file_path) # -------------- #Code starts here def read_file(path): fp=open(path,"r") return fp.readli...
19.054264
71
0.663141
file_path def read_file(path): file1=open(path,"r") sentence=file1.readline() return sentence sample_message=read_file(file_path) def read_file(path): fp=open(path,"r") return fp.readline() def fuse_msg(message_a,message_b): quotient=int(int(message_b)/int(message_a)) retu...
true
true
f72d4bb42b3c82dbcde9ccb416274b8896683766
16,657
py
Python
plotly_study/validators/table/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/validators/table/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
plotly_study/validators/table/__init__.py
lucasiscovici/plotly_py
42ab769febb45fbbe0a3c677dc4306a4f59cea36
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="table", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
35.067368
84
0.58642
import _plotly_utils.basevalidators class VisibleValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="visible", parent_name="table", **kwargs): super(VisibleValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
true
true
f72d4ca040a06d403beb425e327eeba6d1205c6a
26,527
py
Python
py/legacypipe/unwise.py
ameisner/legacypipe
5ffe6fb2458618b68653580badc4a94e1ecb4f04
[ "BSD-3-Clause" ]
null
null
null
py/legacypipe/unwise.py
ameisner/legacypipe
5ffe6fb2458618b68653580badc4a94e1ecb4f04
[ "BSD-3-Clause" ]
null
null
null
py/legacypipe/unwise.py
ameisner/legacypipe
5ffe6fb2458618b68653580badc4a94e1ecb4f04
[ "BSD-3-Clause" ]
null
null
null
import os import numpy as np import fitsio from astrometry.util.fits import fits_table from astrometry.util.ttime import Time from wise.unwise import get_unwise_tractor_image import logging logger = logging.getLogger('legacypipe.unwise') def info(*args): from legacypipe.utils import log_info log_info(logger, ...
39.183161
123
0.529121
import os import numpy as np import fitsio from astrometry.util.fits import fits_table from astrometry.util.ttime import Time from wise.unwise import get_unwise_tractor_image import logging logger = logging.getLogger('legacypipe.unwise') def info(*args): from legacypipe.utils import log_info log_info(logger, ...
true
true