hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f745e39f8c9a8acb7382396a71c42853dd142c7b
6,488
py
Python
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/HBASE/package/scripts/params.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/HBASE/package/scripts/params.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/HBASE/package/scripts/params.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ 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");...
47.014493
174
0.787608
from functions import calc_xmn_from_xms from resource_management import * import status_params config = Script.get_config() exec_tmp_dir = Script.get_tmp_dir() rpm_version = default("/configurations/cluster-env/rpm_version", None) if rpm_version: hadoop_bin_dir = format("/usr/phd/current/hadoop-client/bin") ...
true
true
f745e467b76979d4b4c18e968fbc21b6d67789c2
3,657
py
Python
dump_command_args.py
bytedance/Hammer
388ed20b3d9b34f33f5357d75f8fe5d726782ec8
[ "MIT" ]
97
2022-02-08T09:00:57.000Z
2022-03-23T05:33:35.000Z
dump_command_args.py
bytedance/Hammer
388ed20b3d9b34f33f5357d75f8fe5d726782ec8
[ "MIT" ]
null
null
null
dump_command_args.py
bytedance/Hammer
388ed20b3d9b34f33f5357d75f8fe5d726782ec8
[ "MIT" ]
7
2022-02-08T15:13:02.000Z
2022-03-19T19:11:13.000Z
# python3.7 """Dumps available arguments of all commands (configurations). This file parses the arguments of all commands provided in `configs/` and dump the results as a json file. Each parsed argument includes the name, argument type, default value, and the help message (description). The dumped file looks like { ...
30.22314
80
0.456385
import sys import json from configs import CONFIG_POOL def parse_args_from_config(config): recommended_opts = config.get_recommended_options() args = dict() for opt_group, opts in config.get_options().items(): args[opt_group] = dict( type='object', properties=dict() ...
true
true
f745e4d3f50ae411320702056acb7e9294fb66fa
5,393
py
Python
openpnm/io/CSV.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
1
2021-05-01T11:10:43.000Z
2021-05-01T11:10:43.000Z
openpnm/io/CSV.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
null
null
null
openpnm/io/CSV.py
halotudio/openPNM-copy2
d400ec65e9421256a531f6d22a38255b002d5dcb
[ "MIT" ]
null
null
null
import re import numpy as np from openpnm.io.Pandas import Pandas from openpnm.io import GenericIO, Dict from openpnm.utils import logging, Workspace logger = logging.getLogger(__name__) ws = Workspace() class CSV(GenericIO): r""" Reads and writes CSV (comma-separated-value files) containing pore and thro...
36.439189
79
0.587428
import re import numpy as np from openpnm.io.Pandas import Pandas from openpnm.io import GenericIO, Dict from openpnm.utils import logging, Workspace logger = logging.getLogger(__name__) ws = Workspace() class CSV(GenericIO): @classmethod def save(cls, *args, **kwargs): cls.export_data(*args, **kwarg...
true
true
f745e4f386d7d65d542fc14f785105f1ccbc9e99
3,811
py
Python
tb_login.py
ardian-sh/simple-crud_cli
4733a09d985ea3e3328f5558889dcbf344db6aca
[ "Unlicense" ]
1
2021-12-10T18:11:28.000Z
2021-12-10T18:11:28.000Z
tb_login.py
ardian-sh/simple-crud_cli
4733a09d985ea3e3328f5558889dcbf344db6aca
[ "Unlicense" ]
null
null
null
tb_login.py
ardian-sh/simple-crud_cli
4733a09d985ea3e3328f5558889dcbf344db6aca
[ "Unlicense" ]
null
null
null
""" -import mysql.conecctor -> memanggil function conecctor dari modul mysql -from connect_Db import Connect_db -> memanggil class connect_db di file connect_Db yang telah di buat sebelumnya -from Validation import Validations-> memanggil class Validataions yang ada pada file Validation -from termcolor import color...
51.5
136
0.637366
from connect_Db import Connect_db import mysql.connector from termcolor import colored from Validation import Validations from os import system class Tb_Login: Valid = Validations() conn = Connect_db() def login (self): while True: ...
true
true
f745e5769876f89e5661629058a6671628a76722
4,087
py
Python
src/si/util/cv.py
inestm28/si
a82ba37bd628c5ebdc723f5e1a9894832c8f1a76
[ "Apache-2.0" ]
null
null
null
src/si/util/cv.py
inestm28/si
a82ba37bd628c5ebdc723f5e1a9894832c8f1a76
[ "Apache-2.0" ]
null
null
null
src/si/util/cv.py
inestm28/si
a82ba37bd628c5ebdc723f5e1a9894832c8f1a76
[ "Apache-2.0" ]
null
null
null
from .util import train_test_split import numpy as np import itertools # MODEL SELECTION class Cross_Validation: #avaliar a performance de um modelo def __init__(self, model, dataset,score=None, **kwargs): self.model=model #modelo que se quer avaliar self.dataset=dataset self.cv=kwargs...
46.977011
172
0.631515
from .util import train_test_split import numpy as np import itertools class Cross_Validation: def __init__(self, model, dataset,score=None, **kwargs): self.model=model self.dataset=dataset self.cv=kwargs.get('cv',3) self.split=kwargs.get('split', 0.8) self.train_sc...
true
true
f745e627baa4f27c556fa93c5bc6a8607a16af32
16,200
py
Python
tests/test_visualization.py
EmadAlamoudi/libpetab-python-MS
7d21d79e9c02200d361a19c737d61c0e56123ca0
[ "MIT" ]
null
null
null
tests/test_visualization.py
EmadAlamoudi/libpetab-python-MS
7d21d79e9c02200d361a19c737d61c0e56123ca0
[ "MIT" ]
null
null
null
tests/test_visualization.py
EmadAlamoudi/libpetab-python-MS
7d21d79e9c02200d361a19c737d61c0e56123ca0
[ "MIT" ]
null
null
null
import warnings from os import path from tempfile import TemporaryDirectory import pytest from petab.C import * from petab.visualize import (plot_data_and_simulation, plot_measurements_by_observable, save_vis_spec) import matplotlib.pyplot as plt @pytest.fixtu...
42.1875
79
0.614444
import warnings from os import path from tempfile import TemporaryDirectory import pytest from petab.C import * from petab.visualize import (plot_data_and_simulation, plot_measurements_by_observable, save_vis_spec) import matplotlib.pyplot as plt @pytest.fixtu...
true
true
f745e6f3a37289bf61f2bd949c9ce1767d1c69a0
665
py
Python
manage.py
KamarulAdha/DRF-ML
2036ac6b3b3eb593d28ab89c948bf4ad2a4aa6dd
[ "MIT" ]
null
null
null
manage.py
KamarulAdha/DRF-ML
2036ac6b3b3eb593d28ab89c948bf4ad2a4aa6dd
[ "MIT" ]
null
null
null
manage.py
KamarulAdha/DRF-ML
2036ac6b3b3eb593d28ab89c948bf4ad2a4aa6dd
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'deploy_ml.settings') try: from django.core.management import execute_from_command_line except Im...
28.913043
73
0.679699
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'deploy_ml.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f745e756a3c746620d8f06b21a137f14a0bd0090
8,887
py
Python
sympy/physics/quantum/tests/test_qubit.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
sympy/physics/quantum/tests/test_qubit.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
13
2020-03-24T17:53:51.000Z
2022-02-10T20:01:14.000Z
sympy/physics/quantum/tests/test_qubit.py
Corwinpro/sympy
a2efa19333fa0b3b18db872efabbb46248cde63b
[ "BSD-3-Clause" ]
11
2020-06-29T08:40:24.000Z
2022-02-24T17:39:16.000Z
import random from sympy import Integer, Matrix, Rational, sqrt, symbols from sympy.core.compatibility import range, long from sympy.physics.quantum.qubit import (measure_all, measure_partial, matrix_to_qubit, matrix_to_density, qubit_to...
35.126482
82
0.577585
import random from sympy import Integer, Matrix, Rational, sqrt, symbols from sympy.core.compatibility import range, long from sympy.physics.quantum.qubit import (measure_all, measure_partial, matrix_to_qubit, matrix_to_density, qubit_to...
true
true
f745e76cea4e9ad672f082bfa7a6f6884ed8aaa8
50,976
py
Python
tapas/utils/tf_example_utils.py
jeffersonHsieh/tapas
a2f1c8c763c08487bed6b91884dac946dd766ab9
[ "Apache-2.0" ]
null
null
null
tapas/utils/tf_example_utils.py
jeffersonHsieh/tapas
a2f1c8c763c08487bed6b91884dac946dd766ab9
[ "Apache-2.0" ]
null
null
null
tapas/utils/tf_example_utils.py
jeffersonHsieh/tapas
a2f1c8c763c08487bed6b91884dac946dd766ab9
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2019 The Google AI Language Team 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 ...
35.4246
88
0.6834
import collections import dataclasses import hashlib import random from typing import Iterable, List, Mapping, Optional, Text, Tuple from absl import logging from apache_beam import metrics as beam_metrics from tapas.protos import annotated_text_pb2 from tapas.protos import interaction_pb2 from tapas.p...
true
true
f745e793ceef9af56edbe7b18f4d314c4bdc9c93
2,269
py
Python
app/service/check_service.py
chenbocheng/fast_api_monitor
e22ab9dcc412e48bfa4728071eb7d12ff7f3e60a
[ "MIT" ]
null
null
null
app/service/check_service.py
chenbocheng/fast_api_monitor
e22ab9dcc412e48bfa4728071eb7d12ff7f3e60a
[ "MIT" ]
null
null
null
app/service/check_service.py
chenbocheng/fast_api_monitor
e22ab9dcc412e48bfa4728071eb7d12ff7f3e60a
[ "MIT" ]
null
null
null
from typing import Dict, List from model.check import Check from utils.logger import get_service_logger from utils.config import Global from utils.util import md5hash, jsondump, is_url from datetime import datetime from os import path import json LOGGER = get_service_logger('CHECK_SRV') def save_item(check: Check) -...
26.383721
108
0.677391
from typing import Dict, List from model.check import Check from utils.logger import get_service_logger from utils.config import Global from utils.util import md5hash, jsondump, is_url from datetime import datetime from os import path import json LOGGER = get_service_logger('CHECK_SRV') def save_item(check: Check) -...
true
true
f745e7d886139a51e44723e4e47a010f3bb26716
726
py
Python
objects/CSCG/_2d/mesh/trace/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
1
2020-10-14T12:48:35.000Z
2020-10-14T12:48:35.000Z
objects/CSCG/_2d/mesh/trace/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
null
null
null
objects/CSCG/_2d/mesh/trace/main.py
mathischeap/mifem
3242e253fb01ca205a76568eaac7bbdb99e3f059
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from screws.freeze.main import FrozenOnly from objects.CSCG._2d.mesh.trace.visualize import _2dCSCG_Trace_Visualize from objects.CSCG._2d.mesh.trace.elements.main import _2dCSCG_Trace_Elements class _2dCSCG_Trace(FrozenOnly): def __init__(self, mesh): self._mesh_ = mesh s...
27.923077
76
0.721763
from screws.freeze.main import FrozenOnly from objects.CSCG._2d.mesh.trace.visualize import _2dCSCG_Trace_Visualize from objects.CSCG._2d.mesh.trace.elements.main import _2dCSCG_Trace_Elements class _2dCSCG_Trace(FrozenOnly): def __init__(self, mesh): self._mesh_ = mesh self._elements_ = _2dCSC...
true
true
f745eb82b5343d2c5ba8d7af5b72c98c06d4ce98
34,522
py
Python
fa_icons.py
anowlcalledjosh/i3-workspace-names-daemon
5071193d242cef33a9130461aca88ea8eb38b266
[ "MIT" ]
1
2019-03-20T18:00:39.000Z
2019-03-20T18:00:39.000Z
fa_icons.py
anowlcalledjosh/i3-workspace-names-daemon
5071193d242cef33a9130461aca88ea8eb38b266
[ "MIT" ]
31
2019-05-09T12:23:36.000Z
2019-06-23T18:41:08.000Z
fa_icons.py
anowlcalledjosh/i3-workspace-names-daemon
5071193d242cef33a9130461aca88ea8eb38b266
[ "MIT" ]
null
null
null
# font-awesome icon-name to unicode mapping icons = { "500px": "\uf26e", "accessible-icon": "\uf368", "accusoft": "\uf369", "acquisitions-incorporated": "\uf6af", "ad": "\uf641", "address-book": "\uf2b9", "address-card": "\uf2bb", "adjust": "\uf042", "adn": "\uf170", "adversal": ...
27.354992
52
0.50394
icons = { "500px": "\uf26e", "accessible-icon": "\uf368", "accusoft": "\uf369", "acquisitions-incorporated": "\uf6af", "ad": "\uf641", "address-book": "\uf2b9", "address-card": "\uf2bb", "adjust": "\uf042", "adn": "\uf170", "adversal": "\uf36a", "affiliatetheme": "\uf36b", ...
true
true
f745eceb9817883b7b61543188f076f1f8121c7b
23,603
py
Python
src/ralph/ui/views/ventures.py
jjagodzinski/ralph
000a22bcc934dc2051e7a09ab1e84bd1c25a9e73
[ "Apache-2.0" ]
null
null
null
src/ralph/ui/views/ventures.py
jjagodzinski/ralph
000a22bcc934dc2051e7a09ab1e84bd1c25a9e73
[ "Apache-2.0" ]
null
null
null
src/ralph/ui/views/ventures.py
jjagodzinski/ralph
000a22bcc934dc2051e7a09ab1e84bd1c25a9e73
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import datetime import calendar from django.contrib import messages from django.db import models as db from django.http import HttpResp...
36.368259
96
0.56103
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import re import datetime import calendar from django.contrib import messages from django.db import models as db from django.http import HttpResponseRedirect, HttpRespo...
true
true
f745ed47fda383eb50ce5fb7c7e9fee5cb1f9693
183
py
Python
accounts/admin.py
samwel2000/STOCKMANAGER
8d350e39f106f0b46549d39486fb0e17391b2ee8
[ "MIT" ]
null
null
null
accounts/admin.py
samwel2000/STOCKMANAGER
8d350e39f106f0b46549d39486fb0e17391b2ee8
[ "MIT" ]
null
null
null
accounts/admin.py
samwel2000/STOCKMANAGER
8d350e39f106f0b46549d39486fb0e17391b2ee8
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * # Register your models here. # admin.site.register(Role) admin.site.register(Profile) # admin.site.register(UserAuthorization)
22.875
40
0.79235
from django.contrib import admin from .models import * admin.site.register(Profile)
true
true
f745ef1a23848a6b71d0b50dc07fb74b66c2bb75
269
py
Python
env/lib/python3.8/site-packages/plotly/graph_objs/layout/title/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/lib/python3.8/site-packages/plotly/graph_objs/layout/title/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/lib/python3.8/site-packages/plotly/graph_objs/layout/title/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import sys if sys.version_info < (3, 7): from ._font import Font from ._pad import Pad else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._font.Font", "._pad.Pad"] )
22.416667
55
0.665428
import sys if sys.version_info < (3, 7): from ._font import Font from ._pad import Pad else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._font.Font", "._pad.Pad"] )
true
true
f745efb7c5c8b18b3d8ea3a96bdee9c9fe30f636
9,971
py
Python
databricks_cli/oauth/oauth.py
sweisdb/databricks-cli
5444cb8b94ef481e1656845f588d8d118bc352db
[ "Apache-2.0" ]
null
null
null
databricks_cli/oauth/oauth.py
sweisdb/databricks-cli
5444cb8b94ef481e1656845f588d8d118bc352db
[ "Apache-2.0" ]
null
null
null
databricks_cli/oauth/oauth.py
sweisdb/databricks-cli
5444cb8b94ef481e1656845f588d8d118bc352db
[ "Apache-2.0" ]
null
null
null
# Databricks CLI # Copyright 2021 Databricks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"), except # that the use of services to which certain application programming # interfaces (each, an "API") connect requires that the user first obtain # a license for the use of the APIs from Databricks,...
35.610714
98
0.719988
import base64 import hashlib import json import os import webbrowser from datetime import datetime, timedelta, tzinfo import click import jwt from jwt import PyJWTError import oauthlib.oauth2 from oauthlib.oauth2.rfc6749.errors import OAuth2Error import requests from requests.exceptions imp...
true
true
f745f22aacc01962c8b3f16c0fde0a5d3abc3c83
5,765
py
Python
train/login/Login.py
hellovvorld/12306
e5224519ebb55ed971f69d4943453b099bb1d3fd
[ "MIT" ]
1
2019-02-01T11:31:04.000Z
2019-02-01T11:31:04.000Z
train/login/Login.py
youaregoo/12306
e5224519ebb55ed971f69d4943453b099bb1d3fd
[ "MIT" ]
null
null
null
train/login/Login.py
youaregoo/12306
e5224519ebb55ed971f69d4943453b099bb1d3fd
[ "MIT" ]
null
null
null
import time from conf.constant import TYPE_LOGIN_NORMAL_WAY, TYPE_LOGIN_OTHER_WAY from conf.urls_conf import loginUrls from configure import USER_PWD, USER_NAME from net.NetUtils import EasyHttp from train.login.Capthca import Captcha from utils import Utils from utils.Log import Log from conf.constant import CAPTCHA_...
35.807453
115
0.612316
import time from conf.constant import TYPE_LOGIN_NORMAL_WAY, TYPE_LOGIN_OTHER_WAY from conf.urls_conf import loginUrls from configure import USER_PWD, USER_NAME from net.NetUtils import EasyHttp from train.login.Capthca import Captcha from utils import Utils from utils.Log import Log from conf.constant import CAPTCHA_...
true
true
f745f2e26fa5e5fcfbe3f3eb18b4acecb1418df7
332
py
Python
tests/test_utils.py
arunima811/zendesk-ticket-viewer
3e567cbc6b0af29b9cb722ff1a1ac3cf73c671c1
[ "MIT" ]
null
null
null
tests/test_utils.py
arunima811/zendesk-ticket-viewer
3e567cbc6b0af29b9cb722ff1a1ac3cf73c671c1
[ "MIT" ]
null
null
null
tests/test_utils.py
arunima811/zendesk-ticket-viewer
3e567cbc6b0af29b9cb722ff1a1ac3cf73c671c1
[ "MIT" ]
null
null
null
from zendesk_viewer.utils import string_utils def test_chunkstring(): str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad" chunks = list(string_utils.chunkstring(str, 25)) assert len(chunks) == 6 assert "".join(ch...
47.428571
146
0.740964
from zendesk_viewer.utils import string_utils def test_chunkstring(): str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad" chunks = list(string_utils.chunkstring(str, 25)) assert len(chunks) == 6 assert "".join(ch...
true
true
f745f3bd599bb4ad6d277d723b26fecbee4ab636
72,272
py
Python
app/bq_service.py
s2t2/tweet-analyzer-py
0a398fc47101a2d602d8c4116c970f1076a58f27
[ "MIT" ]
5
2020-04-02T12:03:57.000Z
2020-10-18T19:29:15.000Z
app/bq_service.py
s2t2/tweet-analyzer-py
0a398fc47101a2d602d8c4116c970f1076a58f27
[ "MIT" ]
22
2020-03-31T02:00:34.000Z
2021-06-30T17:59:01.000Z
app/bq_service.py
s2t2/tweet-analyzer-py
0a398fc47101a2d602d8c4116c970f1076a58f27
[ "MIT" ]
3
2020-04-04T16:08:08.000Z
2020-10-20T01:32:46.000Z
from datetime import datetime, timedelta, timezone import os from functools import lru_cache from pprint import pprint from dotenv import load_dotenv from google.cloud import bigquery from google.cloud.bigquery import QueryJobConfig, ScalarQueryParameter from app import APP_ENV, seek_confirmation from app.decorators....
39.065946
161
0.585261
from datetime import datetime, timedelta, timezone import os from functools import lru_cache from pprint import pprint from dotenv import load_dotenv from google.cloud import bigquery from google.cloud.bigquery import QueryJobConfig, ScalarQueryParameter from app import APP_ENV, seek_confirmation from app.decorators....
true
true
f745f46df087097bb04b880ed308460064abbb8f
91
py
Python
tools/Polygraphy/polygraphy/tools/__init__.py
martellz/TensorRT
f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4
[ "Apache-2.0" ]
4
2021-04-16T13:49:38.000Z
2022-01-16T08:58:07.000Z
tools/Polygraphy/polygraphy/tools/__init__.py
martellz/TensorRT
f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4
[ "Apache-2.0" ]
null
null
null
tools/Polygraphy/polygraphy/tools/__init__.py
martellz/TensorRT
f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4
[ "Apache-2.0" ]
2
2021-02-04T14:46:10.000Z
2021-02-04T14:56:08.000Z
from polygraphy.tools.base import Tool from polygraphy.tools.registry import TOOL_REGISTRY
30.333333
51
0.868132
from polygraphy.tools.base import Tool from polygraphy.tools.registry import TOOL_REGISTRY
true
true
f745f5d61cb9a19e3065e33303a67ed5412d618b
3,463
py
Python
src/etc/mklldeps.py
tedhorst/rust
2ec3e60e4993dcfe9e5da9b3c05ebf086d2fb1e6
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2017-12-18T20:48:50.000Z
2017-12-18T20:48:51.000Z
src/etc/mklldeps.py
tedhorst/rust
2ec3e60e4993dcfe9e5da9b3c05ebf086d2fb1e6
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
src/etc/mklldeps.py
tedhorst/rust
2ec3e60e4993dcfe9e5da9b3c05ebf086d2fb1e6
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2019-11-04T23:18:22.000Z
2019-11-04T23:18:22.000Z
# Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or ht...
31.198198
81
0.586197
import os import sys import subprocess import itertools from os import path f = open(sys.argv[1], 'wb') components = sys.argv[2].split(' ') components = [i for i in components if i] enable_static = sys.argv[3] f.write("""// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-...
true
true
f745f5eb71e37d7347397f6428e66be95f8b0416
70
py
Python
demo_ServerUser.py
SunnyLi1106/Comspy
33aae6094c8ae3394173cea0354650d9e8b4d164
[ "MIT" ]
1
2022-03-03T03:28:40.000Z
2022-03-03T03:28:40.000Z
demo_ServerUser.py
SunnyLi1106/Comspy
33aae6094c8ae3394173cea0354650d9e8b4d164
[ "MIT" ]
null
null
null
demo_ServerUser.py
SunnyLi1106/Comspy
33aae6094c8ae3394173cea0354650d9e8b4d164
[ "MIT" ]
null
null
null
import comspy.user.Server_Chinese comspy.user.Server_Chinese.start(5)
35
35
0.857143
import comspy.user.Server_Chinese comspy.user.Server_Chinese.start(5)
true
true
f745f70e8b29ebb02a86bb0338082f9d9300d7ec
1,546
py
Python
Resources/books/long_short_term_memory_networks_with_python/code/lesson_12/tune_batch_size.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
Resources/books/long_short_term_memory_networks_with_python/code/lesson_12/tune_batch_size.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
Resources/books/long_short_term_memory_networks_with_python/code/lesson_12/tune_batch_size.py
gdepalma93/bright-athlete-academy
54ba0cc6633637c1bd6d90120153e04b981244bf
[ "MIT" ]
null
null
null
from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from matplotlib import pyplot from pandas import DataFrame from numpy import array # return training data def get_train(): seq = [[0.0, 0.1], [0.1, 0.2], [0.2, 0.3], [0.3, 0.4], [0.4, 0.5]] seq = array(seq) X, y = seq[:...
26.20339
74
0.670116
from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from matplotlib import pyplot from pandas import DataFrame from numpy import array def get_train(): seq = [[0.0, 0.1], [0.1, 0.2], [0.2, 0.3], [0.3, 0.4], [0.4, 0.5]] seq = array(seq) X, y = seq[:, 0], seq[:, 1] X = X...
true
true
f745f72561b7ba0fa2a85443a88e8843418632ef
699
py
Python
storage/etl_utils/__init__.py
publichealthengland/coronavirus-dashboard-pipeline-etl
efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c
[ "MIT" ]
7
2021-02-14T12:42:56.000Z
2022-03-02T09:14:22.000Z
storage/etl_utils/__init__.py
publichealthengland/coronavirus-dashboard-pipeline-etl
efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c
[ "MIT" ]
19
2021-11-03T09:21:00.000Z
2022-03-07T09:26:47.000Z
storage/etl_utils/__init__.py
publichealthengland/coronavirus-dashboard-pipeline-etl
efcf5c77091afe8a0f7edce2e5934fe8c1f6dc1c
[ "MIT" ]
2
2021-03-03T16:52:51.000Z
2022-02-28T16:22:33.000Z
#!/usr/bin python3 """ <Description of the programme> Author: Pouria Hadjibagheri <pouria.hadjibagheri@phe.gov.uk> Created: 27 Dec 2020 License: MIT Contributors: Pouria Hadjibagheri """ # Imports # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Python:...
24.964286
90
0.423462
from .utils import * __author__ = "Pouria Hadjibagheri" __copyright__ = "Copyright (c) 2020, Public Health England" __license__ = "MIT" __version__ = "0.0.1"
true
true
f745f737f3b914ae97464ff19a0901ffb3b56d9e
9,915
py
Python
env/lib/python3.7/site-packages/art/defences/preprocessor/variance_minimization.py
GU-DataLab/fairness-and-missing-values
36a900aa235d1d53bd57e11c89e3f73f9a585aca
[ "MIT" ]
1
2021-09-09T13:19:34.000Z
2021-09-09T13:19:34.000Z
env/lib/python3.7/site-packages/art/defences/preprocessor/variance_minimization.py
GU-DataLab/fairness-and-missing-values
36a900aa235d1d53bd57e11c89e3f73f9a585aca
[ "MIT" ]
10
2021-10-04T23:25:53.000Z
2022-03-24T23:20:38.000Z
art/defences/preprocessor/variance_minimization.py
guozfeng/adversarial-robustness-toolbox
4b9383d2e383ae49a0cd6c94e3c9cf7c3a584581
[ "MIT" ]
1
2021-09-09T13:19:35.000Z
2021-09-09T13:19:35.000Z
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2018 # # 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...
42.922078
120
0.628543
from __future__ import absolute_import, division, print_function, unicode_literals import logging from typing import Optional, Tuple, TYPE_CHECKING import numpy as np from scipy.optimize import minimize from tqdm import tqdm from art.config import ART_NUMPY_DTYPE from art.defences.preprocessor.prepr...
true
true
f745f74342af9ff60462a350e7498ad02eb477f2
409
py
Python
Kinect Science Fair/RemoveTrash.py
JBPrew/Konnect
02c0990aa7eb861b01c879e89d57f35c7b1db7c6
[ "MIT" ]
4
2020-11-09T20:01:27.000Z
2021-04-04T20:49:05.000Z
Kinect Science Fair/RemoveTrash.py
JBPrew/Konnect
02c0990aa7eb861b01c879e89d57f35c7b1db7c6
[ "MIT" ]
1
2021-03-03T20:01:52.000Z
2021-04-11T19:19:43.000Z
Kinect Science Fair/RemoveTrash.py
JBPrew/Konnect
02c0990aa7eb861b01c879e89d57f35c7b1db7c6
[ "MIT" ]
null
null
null
import csv with open('Depth Data/KinectDataRaw.csv', 'r', newline='') as file: reader = csv.reader(file) fileWriter = open("Depth Data/KinectData.csv", "w") for row in reader: target = row.pop(0) #Remove the target if target != "Trash": row = list(map(int, row)) fileW...
34.083333
73
0.564792
import csv with open('Depth Data/KinectDataRaw.csv', 'r', newline='') as file: reader = csv.reader(file) fileWriter = open("Depth Data/KinectData.csv", "w") for row in reader: target = row.pop(0) if target != "Trash": row = list(map(int, row)) fileWriter.write(target...
true
true
f745f775784f8c5dac50c6e623d25c608e1b5768
8,407
py
Python
opensoar/task/race_task.py
tpatja/opensoar
ab08153f3edbab94b1a024a2734162e965163b74
[ "MIT" ]
null
null
null
opensoar/task/race_task.py
tpatja/opensoar
ab08153f3edbab94b1a024a2734162e965163b74
[ "MIT" ]
null
null
null
opensoar/task/race_task.py
tpatja/opensoar
ab08153f3edbab94b1a024a2734162e965163b74
[ "MIT" ]
null
null
null
from opensoar.task.task import Task from opensoar.utilities.helper_functions import calculate_distance, double_iterator, \ seconds_time_difference_fixes, add_seconds class RaceTask(Task): """ Race task. """ def __init__(self, waypoints, timezone=None, start_opening=None, start_time_buffer=0, mult...
42.035
121
0.611276
from opensoar.task.task import Task from opensoar.utilities.helper_functions import calculate_distance, double_iterator, \ seconds_time_difference_fixes, add_seconds class RaceTask(Task): def __init__(self, waypoints, timezone=None, start_opening=None, start_time_buffer=0, multistart=False): super()....
true
true
f745f8cf0b69a004853fd4193cae1e2fca3a25ed
1,698
py
Python
function.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
function.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
function.py
anmol1455/python
8e3858bdebb21ec3c9e8147ceef17a82b4a36926
[ "bzip2-1.0.6" ]
null
null
null
x=int(input("enter the number 1")) y=int(input("enter the number 2")) def sumt(n,m):#function with argument no return print("sum operation \n") sumt=n+m print("sum is",sumt) def subs(n,m):#function with argument with return print("substraction operation \n") subs=n-m print("difference is",subs)...
42.45
130
0.673734
x=int(input("enter the number 1")) y=int(input("enter the number 2")) def sumt(n,m): print("sum operation \n") sumt=n+m print("sum is",sumt) def subs(n,m): print("substraction operation \n") subs=n-m print("difference is",subs) return subs ...
true
true
f745f90df41772dbaff857c5616dd9484690b90f
6,602
py
Python
test/util/bitcoin-util-test.py
BarrelCrudeCoin/BarrelCrudeCoin
3bef9c1419dec7da56c9a9b1b815de06a54f94ce
[ "MIT" ]
4
2021-03-15T21:33:02.000Z
2021-08-10T18:18:44.000Z
test/util/bitcoin-util-test.py
blockconsortium/BarrelCrudeCoin
6cba56f636f72c0aeba79a0ea1cb9ac71da83691
[ "MIT" ]
1
2021-11-07T20:13:31.000Z
2021-11-07T20:13:31.000Z
test/util/bitcoin-util-test.py
BarrelCrudeCoin/BarrelCrudeCoin
3bef9c1419dec7da56c9a9b1b815de06a54f94ce
[ "MIT" ]
2
2021-03-15T21:33:05.000Z
2021-03-16T03:05:47.000Z
#!/usr/bin/env python3 # Copyright 2014 BitPay Inc. # Copyright 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test framework for barrelcrudecoin utils. Runs automatically during `make che...
37.511364
125
0.633899
import argparse import binascii import configparser import difflib import json import logging import os import pprint import subprocess import sys def main(): config = configparser.ConfigParser() config.optionxform = str config.read_file(open(os.path.join(os.path.dirname(__file__), "../config.ini"), ...
true
true
f745fa450d656e747110cbb1b28870fc0bec8df8
2,588
py
Python
vital_sqi/sqi/dtw_sqi.py
meta00/vital_sqi
7e64a26c9d56af26bfbd25c3ba30211414f5f845
[ "MIT" ]
4
2021-09-30T08:18:02.000Z
2022-03-04T10:00:00.000Z
vital_sqi/sqi/dtw_sqi.py
meta00/vital_sqi
7e64a26c9d56af26bfbd25c3ba30211414f5f845
[ "MIT" ]
25
2021-05-14T06:31:44.000Z
2021-06-11T18:23:17.000Z
vital_sqi/sqi/dtw_sqi.py
meta00/vital_sqi
7e64a26c9d56af26bfbd25c3ba30211414f5f845
[ "MIT" ]
3
2021-05-30T21:19:02.000Z
2021-12-02T11:29:02.000Z
import numpy as np import sys import os if bool(getattr(sys, 'ps1', sys.flags.interactive)): old_stdout = sys.stdout sys.stdout = open(os.devnull, 'w') from dtw import dtw sys.stdout = old_stdout else: from dtw import dtw from vital_sqi.common.generate_template import ( ppg_absolute_dual_sk...
33.179487
82
0.671175
import numpy as np import sys import os if bool(getattr(sys, 'ps1', sys.flags.interactive)): old_stdout = sys.stdout sys.stdout = open(os.devnull, 'w') from dtw import dtw sys.stdout = old_stdout else: from dtw import dtw from vital_sqi.common.generate_template import ( ppg_absolute_dual_sk...
true
true
f745faf9bb9ce32693a37fc189beda37992c9c21
2,833
py
Python
visualiser/facades/ociDatabaseSystem.py
antoniogomezr/oci-designer-tookit
0f8756bf778cbbc923df2020ea11cf384e855590
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
visualiser/facades/ociDatabaseSystem.py
antoniogomezr/oci-designer-tookit
0f8756bf778cbbc923df2020ea11cf384e855590
[ "UPL-1.0", "Apache-2.0" ]
null
null
null
visualiser/facades/ociDatabaseSystem.py
antoniogomezr/oci-designer-tookit
0f8756bf778cbbc923df2020ea11cf384e855590
[ "UPL-1.0", "Apache-2.0" ]
1
2022-01-05T19:58:10.000Z
2022-01-05T19:58:10.000Z
#!/usr/bin/python # Copyright (c) 2020, Oracle and/or its affiliates. # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """Provide Module Description """ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# __author__ = ["And...
38.283784
132
0.616661
__author__ = ["Andrew Hopkinson (Oracle Cloud Solutions A-Team)"] __version__ = "1.0.0" __module__ = "ociDatabaseSystem" import oci from common.okitLogging import getLogger from common.okitCommon import logJson from facades.ociConnection import OCIDatabaseConnection logger = getLogger() class OCIDatabaseSy...
true
true
f745fd33ee13aea7516b847e8a0906cf09e91960
3,265
py
Python
PyFunceble/converter/internal_url.py
NeolithEra/PyFunceble
58db861d36224f279a460f4959aaa2e140ce749f
[ "MIT" ]
null
null
null
PyFunceble/converter/internal_url.py
NeolithEra/PyFunceble
58db861d36224f279a460f4959aaa2e140ce749f
[ "MIT" ]
null
null
null
PyFunceble/converter/internal_url.py
NeolithEra/PyFunceble
58db861d36224f279a460f4959aaa2e140ce749f
[ "MIT" ]
null
null
null
""" The tool to check the availability or syntax of domains, IPv4, IPv6 or URL. :: ██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗ ██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝ ██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ ...
33.316327
88
0.596631
from PyFunceble.abstracts import Version from PyFunceble.exceptions import WrongParameterType from .base import ConverterBase class InternalUrl(ConverterBase): def __init__(self, data_to_convert): if not isinstance(data_to_convert, str): raise WrongParameterType( f"<data_to_...
true
true
f745fd423d9e3711f50f22f4f17422842262e37f
3,574
py
Python
script_move.py
RamzeyXD/Move_Self_Bot
5589b7cde9c7ce7c024cd72b129136099f68bb4c
[ "MIT" ]
null
null
null
script_move.py
RamzeyXD/Move_Self_Bot
5589b7cde9c7ce7c024cd72b129136099f68bb4c
[ "MIT" ]
null
null
null
script_move.py
RamzeyXD/Move_Self_Bot
5589b7cde9c7ce7c024cd72b129136099f68bb4c
[ "MIT" ]
null
null
null
import discord import asyncio from discord.utils import get import time from colorama import Fore # create client object. client = discord.Client() # Main decorator for search user and give parameters to wraper function def find_member(func): async def wrap(*args, **kwargs): print(client.user) use...
25.898551
91
0.6662
import discord import asyncio from discord.utils import get import time from colorama import Fore client = discord.Client() def find_member(func): async def wrap(*args, **kwargs): print(client.user) user_id = args[0] server_name = args[1] servers = client.guilds target = [] for serve...
true
true
f745fdb651d443186157c108085b1229edb14949
2,454
py
Python
check-python27/samples/miscellaneous/sample1.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
check-python27/samples/miscellaneous/sample1.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
1
2018-01-05T20:15:40.000Z
2018-01-05T20:15:40.000Z
check-python27/samples/miscellaneous/sample1.py
DaveKaretnyk/parsing-utils2
40085bbd399fa605f2f2a4708d385a64ffc907de
[ "MIT" ]
null
null
null
def free_func_1(x=3): return x+1 def free_func_2(): return 1 def free_func_3(): def my_local_func(): return 0 return my_local_func() + 1 def free_func_4(): def my_local_func(): def another_local_func(): return 1 return another_local_func() + 1 return...
20.114754
53
0.616544
def free_func_1(x=3): return x+1 def free_func_2(): return 1 def free_func_3(): def my_local_func(): return 0 return my_local_func() + 1 def free_func_4(): def my_local_func(): def another_local_func(): return 1 return another_local_func() + 1 return...
false
true
f745fdd14a295c4e8651c7fb9d08f457f9e60559
460
py
Python
checkov/terraform/checks/provider/base_registry.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
4,013
2019-12-09T13:16:54.000Z
2022-03-31T14:31:01.000Z
checkov/terraform/checks/provider/base_registry.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
1,258
2019-12-17T09:55:51.000Z
2022-03-31T19:17:17.000Z
checkov/terraform/checks/provider/base_registry.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
638
2019-12-19T08:57:38.000Z
2022-03-30T21:38:37.000Z
from typing import Dict, Any, Tuple from checkov.common.checks.base_check_registry import BaseCheckRegistry class Registry(BaseCheckRegistry): def extract_entity_details(self, entity: Dict[str, Any]) -> Tuple[str, str, Dict[str, Any]]: provider_type = list(entity.keys())[0] provider_name = list(e...
38.333333
96
0.73913
from typing import Dict, Any, Tuple from checkov.common.checks.base_check_registry import BaseCheckRegistry class Registry(BaseCheckRegistry): def extract_entity_details(self, entity: Dict[str, Any]) -> Tuple[str, str, Dict[str, Any]]: provider_type = list(entity.keys())[0] provider_name = list(e...
true
true
f745fdd8e7b60b82211e9dc4f64b7b0ae9197b3d
8,966
py
Python
sdk/python/pulumi_azure_nextgen/documentdb/v20200601preview/mongo_db_resource_mongo_db_collection.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/documentdb/v20200601preview/mongo_db_resource_mongo_db_collection.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/documentdb/v20200601preview/mongo_db_resource_mongo_db_collection.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
53.053254
596
0.679344
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['MongoDBResourceMongoDBCollection'] class MongoDBResourceMongoDBCollection(pulumi.CustomResource): def __i...
true
true
f745fea4070433b6ecbd4ba012837496db16396c
3,537
py
Python
discord/bot2.py
Javascript-void0/FarminFarmReworked
b2e44fa88d84d48184fb10766422d4794fbdb9dd
[ "MIT" ]
1
2021-04-24T04:45:15.000Z
2021-04-24T04:45:15.000Z
discord/bot2.py
Javascript-void0/FarminFarmReworked
b2e44fa88d84d48184fb10766422d4794fbdb9dd
[ "MIT" ]
null
null
null
discord/bot2.py
Javascript-void0/FarminFarmReworked
b2e44fa88d84d48184fb10766422d4794fbdb9dd
[ "MIT" ]
null
null
null
import discord import os from discord.ext import commands from discord.utils import get client = commands.Bot(command_prefix='.') client.remove_command('help') TOKEN = os.getenv("CHAT") guild = None @client.event async def on_ready(): global guild print('[ + ] Started {0.user}'.format(client)) await client.wait_un...
66.735849
866
0.775516
import discord import os from discord.ext import commands from discord.utils import get client = commands.Bot(command_prefix='.') client.remove_command('help') TOKEN = os.getenv("CHAT") guild = None @client.event async def on_ready(): global guild print('[ + ] Started {0.user}'.format(client)) await client.wait_un...
true
true
f745ff8dd7e5cd13c76268ec00ac04d0d98b3bf5
295
py
Python
libs/imageExtensionChecker.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
null
null
null
libs/imageExtensionChecker.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
null
null
null
libs/imageExtensionChecker.py
rocketbot-cl/recognition
cca8a87070ccaca3a26e37345c36ab1bf836e258
[ "MIT" ]
null
null
null
def imageExtensionChecker(filename): filenameExtension = filename.split(".")[-1] filenameExtension = filenameExtension.lower() if (filenameExtension == "pdf"): return False # return True elif (filenameExtension in ("png", "jpg", "jpeg")): return True
32.777778
56
0.637288
def imageExtensionChecker(filename): filenameExtension = filename.split(".")[-1] filenameExtension = filenameExtension.lower() if (filenameExtension == "pdf"): return False elif (filenameExtension in ("png", "jpg", "jpeg")): return True
true
true
f74601e8c3ffcf004e89b6b1afec139899cb4c4f
253
py
Python
remove-duplicates-from-sorted-array/Solution.6597734.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
null
null
null
remove-duplicates-from-sorted-array/Solution.6597734.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
1
2016-09-11T22:26:17.000Z
2016-09-13T01:49:48.000Z
remove-duplicates-from-sorted-array/Solution.6597734.py
rahul-ramadas/leetcode
6c84c2333a613729361c5cdb63dc3fc80203b340
[ "MIT" ]
null
null
null
class Solution: def removeDuplicates(self, A): if not A: return 0 j = 0 for i in xrange(1, len(A)): if A[i] != A[j]: j += 1 A[j] = A[i] return j + 1
21.083333
36
0.351779
class Solution: def removeDuplicates(self, A): if not A: return 0 j = 0 for i in xrange(1, len(A)): if A[i] != A[j]: j += 1 A[j] = A[i] return j + 1
true
true
f74601f83296b54911b942819e6d53c8b10c0f2e
178
py
Python
python_touch/cli.py
takeshi0406/python-touch
1dde8bdfef945404f763500d4043cabd07e07546
[ "MIT" ]
null
null
null
python_touch/cli.py
takeshi0406/python-touch
1dde8bdfef945404f763500d4043cabd07e07546
[ "MIT" ]
null
null
null
python_touch/cli.py
takeshi0406/python-touch
1dde8bdfef945404f763500d4043cabd07e07546
[ "MIT" ]
null
null
null
import click from pathlib import Path from . import PythonTouch @click.command() @click.argument("directory") def main(directory): x = PythonTouch() x.touch(directory)
16.181818
28
0.730337
import click from pathlib import Path from . import PythonTouch @click.command() @click.argument("directory") def main(directory): x = PythonTouch() x.touch(directory)
true
true
f746028ed415eb45b51d72258c9ab10b0953f241
14,479
py
Python
rule_based_decision_making.py
QianLabUSC/cognitively-enhanced-decision-framework
1797ddd41edcbfbfafca5b599ff7ab70f5fdc37f
[ "MIT" ]
null
null
null
rule_based_decision_making.py
QianLabUSC/cognitively-enhanced-decision-framework
1797ddd41edcbfbfafca5b599ff7ab70f5fdc37f
[ "MIT" ]
3
2021-06-28T15:35:21.000Z
2021-07-01T06:02:57.000Z
rule_based_decision_making.py
QianLabUSC/cognitively-enhanced-decision-framework
1797ddd41edcbfbfafca5b599ff7ab70f5fdc37f
[ "MIT" ]
null
null
null
# This FILE is part of multi-legged robot field exploration model # env_wrapper.py - to obtain user interaction data from website # # This programm is explained by roboLAND in university of southern california. # Please notify the source if you use it # # Copyright(c) 2021-2025 Ryoma Liu # Email: 1196075299@qq....
41.133523
123
0.57794
from env_wrapper import * import seaborn as sns import matplotlib.pyplot as plt from scipy import optimize import random import matplotlib.pylab as pylab import numpy as np from PIL import Image from math import * class rule_state_machine: def __init__(self): self.states = ['Initial',...
true
true
f74603a9f978ff004e16048b2fa038db3b279fb5
3,471
py
Python
train.py
GT-AcerZhang/yolov3.insects_challenge
1ac6ee5a8a5c534ec11723542f4c10583935a2ad
[ "MIT" ]
1
2021-02-27T17:59:32.000Z
2021-02-27T17:59:32.000Z
train.py
GT-AcerZhang/yolov3.insects_challenge
1ac6ee5a8a5c534ec11723542f4c10583935a2ad
[ "MIT" ]
1
2020-06-12T07:29:27.000Z
2020-06-12T07:29:27.000Z
train.py
GT-AcerZhang/yolov3.insects_challenge
1ac6ee5a8a5c534ec11723542f4c10583935a2ad
[ "MIT" ]
1
2021-03-05T11:08:50.000Z
2021-03-05T11:08:50.000Z
# -*- coding: utf-8 -*- import time import os import numpy as np import paddle import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable from reader import data_loader, test_data_loader, multithread_loader from yolov3 import YOLOv3 # train.py # 提升点: 可以改变anchor的大小,注意训练和测试时要使用同样的anchor ANCHORS = [...
41.321429
115
0.537885
import time import os import numpy as np import paddle import paddle.fluid as fluid from paddle.fluid.dygraph.base import to_variable from reader import data_loader, test_data_loader, multithread_loader from yolov3 import YOLOv3 ANCHORS = [10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 3...
true
true
f74603ed1db8d4d97327c9942770f3c43726c5d3
895
py
Python
mi/dataset/driver/flord_g/ctdbp_p/dcl/test/test_flord_g_ctdbp_p_dcl_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
1
2018-09-14T23:28:29.000Z
2018-09-14T23:28:29.000Z
mi/dataset/driver/flord_g/ctdbp_p/dcl/test/test_flord_g_ctdbp_p_dcl_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
33
2017-04-25T19:53:45.000Z
2022-03-18T17:42:18.000Z
mi/dataset/driver/flord_g/ctdbp_p/dcl/test/test_flord_g_ctdbp_p_dcl_telemetered_driver.py
cdobs/mi-instrument
99f9322a4afabc5dff9b0fad12166075efce838c
[ "BSD-2-Clause" ]
31
2015-03-04T01:01:09.000Z
2020-10-28T14:42:12.000Z
import os import unittest from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.ctdbp_p.dcl.resource import RESOURCE_PATH from mi.dataset.driver.flord_g.ctdbp_p.dcl.flord_g_ctdbp_p_dcl_telemetered_driver import parse _author__ = 'jeff roy' log = get_logger...
27.96875
94
0.763128
import os import unittest from mi.core.log import get_logger from mi.dataset.dataset_driver import ParticleDataHandler from mi.dataset.driver.ctdbp_p.dcl.resource import RESOURCE_PATH from mi.dataset.driver.flord_g.ctdbp_p.dcl.flord_g_ctdbp_p_dcl_telemetered_driver import parse _author__ = 'jeff roy' log = get_logger...
true
true
f74604c957411b143ae41da8468ddf3824c353af
709
py
Python
gui.py
unchangedusername/SimpleMultithreadedDownloader
5c5d32a7247d98ab189277ed9a416b6c4b4296a4
[ "MIT" ]
null
null
null
gui.py
unchangedusername/SimpleMultithreadedDownloader
5c5d32a7247d98ab189277ed9a416b6c4b4296a4
[ "MIT" ]
null
null
null
gui.py
unchangedusername/SimpleMultithreadedDownloader
5c5d32a7247d98ab189277ed9a416b6c4b4296a4
[ "MIT" ]
null
null
null
import tkinter as tk class GUI(tk.Frame): def __init__(self,master=None): super().__init__(master) self.pack() self.create_wigets() def create_wigets(self): self.hi_there = tk.Button(self) self.hi_there["width"] = 15 self.hi_there["height"] = 10 self...
27.269231
77
0.607898
import tkinter as tk class GUI(tk.Frame): def __init__(self,master=None): super().__init__(master) self.pack() self.create_wigets() def create_wigets(self): self.hi_there = tk.Button(self) self.hi_there["width"] = 15 self.hi_there["height"] = 10 self...
true
true
f74604f3d90bd1bd6abc39c8ec84ba84fd154377
178
py
Python
mortgage_platform/mortgage/views/tests/mock_data.py
MihailButnaru/MortgageLen
e05a6a3dce7d84de7a49cd3370d67c8b92b0010f
[ "MIT" ]
2
2021-02-12T21:00:09.000Z
2022-03-12T17:39:07.000Z
mortgage_platform/mortgage/views/tests/mock_data.py
MihailButnaru/MortgageLen
e05a6a3dce7d84de7a49cd3370d67c8b92b0010f
[ "MIT" ]
null
null
null
mortgage_platform/mortgage/views/tests/mock_data.py
MihailButnaru/MortgageLen
e05a6a3dce7d84de7a49cd3370d67c8b92b0010f
[ "MIT" ]
null
null
null
def input_calculator_data() -> dict: return { "property_value": 150000, "deposit_amount": 0, "mortgage_term": 10, "interest_rate": 3.0, }
22.25
36
0.55618
def input_calculator_data() -> dict: return { "property_value": 150000, "deposit_amount": 0, "mortgage_term": 10, "interest_rate": 3.0, }
true
true
f7460650b64984787109392083038fa2a55975a4
690
py
Python
godot_tools/setup/libraries.py
WilliamTambellini/godopy
7b4142ddf7acafa66e1b2b201afa5fa37a4c7f4e
[ "MIT" ]
30
2020-02-09T22:30:06.000Z
2022-01-26T04:23:09.000Z
godot_tools/setup/libraries.py
WilliamTambellini/godopy
7b4142ddf7acafa66e1b2b201afa5fa37a4c7f4e
[ "MIT" ]
1
2020-10-12T04:12:52.000Z
2020-12-19T07:07:51.000Z
godot_tools/setup/libraries.py
WilliamTambellini/godopy
7b4142ddf7acafa66e1b2b201afa5fa37a4c7f4e
[ "MIT" ]
5
2020-02-10T02:49:13.000Z
2021-01-25T18:18:16.000Z
from setuptools import Extension from .enums import ExtType class GenericGDNativeLibrary(Extension): def __init__(self, name, **gdnative_options): self._gdnative_type = ExtType.GENERIC_LIBRARY self._gdnative_options = gdnative_options super().__init__(name, sources=[]) class GDNativeLib...
27.6
72
0.684058
from setuptools import Extension from .enums import ExtType class GenericGDNativeLibrary(Extension): def __init__(self, name, **gdnative_options): self._gdnative_type = ExtType.GENERIC_LIBRARY self._gdnative_options = gdnative_options super().__init__(name, sources=[]) class GDNativeLib...
true
true
f74606d5f3f379047f4102525ca2b1bb9deeaa69
130
py
Python
www/config_override.py
bupt075225/xilingxue
e5da770ae54de7dab0536b590775af0eee0b5ecc
[ "Apache-2.0" ]
null
null
null
www/config_override.py
bupt075225/xilingxue
e5da770ae54de7dab0536b590775af0eee0b5ecc
[ "Apache-2.0" ]
null
null
null
www/config_override.py
bupt075225/xilingxue
e5da770ae54de7dab0536b590775af0eee0b5ecc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 生产环境标准配置 ''' configs = { 'db':{ 'host':'127.0.0.1' } }
10
30
0.4
configs = { 'db':{ 'host':'127.0.0.1' } }
true
true
f746078d7acafc80ae9517248457649e8148b656
17,511
py
Python
tf_slim/nets/vgg_test.py
ShanuDey/tf-slim
19c840abfa6de567d760254c42ea68760cf5d9f0
[ "Apache-2.0" ]
1
2020-10-01T23:37:41.000Z
2020-10-01T23:37:41.000Z
tf_slim/nets/vgg_test.py
ShanuDey/tf-slim
19c840abfa6de567d760254c42ea68760cf5d9f0
[ "Apache-2.0" ]
null
null
null
tf_slim/nets/vgg_test.py
ShanuDey/tf-slim
19c840abfa6de567d760254c42ea68760cf5d9f0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
40.534722
80
0.646565
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tf_slim.nets import vgg from tf_slim.ops import variables as variables_lib from tensorflow.python.framework import ops from tensorflow.python.ops import math_ops from tensorflow.python.ops...
true
true
f74609e8ba4eb471d1ec0822212b79ef5a5be5b7
1,144
py
Python
elib_config/_validate.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
null
null
null
elib_config/_validate.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
47
2018-10-15T12:18:50.000Z
2019-11-12T12:17:06.000Z
elib_config/_validate.py
etcher-be/elib_config
ec7e06cbf53de608b4071a91de108d15a09c8cc4
[ "MIT" ]
null
null
null
# coding=utf-8 """ Verifies that all configuration values have a valid setting """ from elib_config._setup import ELIBConfig # noinspection PyProtectedMember from elib_config._value._config_value import ConfigValue # noinspection PyProtectedMember from elib_config._value._exc import DuplicateConfigValueError, MissingV...
31.777778
80
0.729021
from elib_config._setup import ELIBConfig from elib_config._value._config_value import ConfigValue from elib_config._value._exc import DuplicateConfigValueError, MissingValueError def validate_config(raise_=True): ELIBConfig.check() known_paths = set() duplicate_values = set() missing_values = set...
true
true
f7460ad72ad255d63cd25ce9599338abe8c4dfad
4,062
py
Python
plotly/validators/scattergeo/marker/_line.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
1
2018-07-16T01:51:47.000Z
2018-07-16T01:51:47.000Z
plotly/validators/scattergeo/marker/_line.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/scattergeo/marker/_line.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
47.788235
75
0.548006
import _plotly_utils.basevalidators class LineValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name='line', parent_name='scattergeo.marker', **kwargs ): super(LineValidator, self).__init__( plotly_name=plotly_name, parent_name=paren...
true
true
f7460b01267d747fa68c0e4d8d0fd1c8ba1a9185
3,303
py
Python
ponai/data/grid_dataset.py
pedrob37/PhysicsPyTorch
a892dfe89740b6fa75d3de5319f99d41bcf4ca63
[ "MIT" ]
null
null
null
ponai/data/grid_dataset.py
pedrob37/PhysicsPyTorch
a892dfe89740b6fa75d3de5319f99d41bcf4ca63
[ "MIT" ]
null
null
null
ponai/data/grid_dataset.py
pedrob37/PhysicsPyTorch
a892dfe89740b6fa75d3de5319f99d41bcf4ca63
[ "MIT" ]
1
2021-01-07T15:47:37.000Z
2021-01-07T15:47:37.000Z
# Copyright 2020 ponai Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, s...
45.875
119
0.666061
import math from typing import Union import torch from torch.utils.data import IterableDataset from ponai.data.utils import iter_patch from ponai.utils import NumpyPadMode class GridPatchDataset(IterableDataset): def __init__( self, dataset, patch_size, start_pos=(), mode: Union[NumpyPadMode...
true
true
f7460c5d27d33c92dffb5cebb5d485ba4fe6501a
54,366
py
Python
mne/channels/tests/test_montage.py
kylemath/mne-python
586c5d918a673ab5d5c92ffb4479fe57fee5559d
[ "BSD-3-Clause" ]
null
null
null
mne/channels/tests/test_montage.py
kylemath/mne-python
586c5d918a673ab5d5c92ffb4479fe57fee5559d
[ "BSD-3-Clause" ]
28
2020-05-07T00:58:34.000Z
2020-08-29T23:02:17.000Z
mne/channels/tests/test_montage.py
kylemath/mne-python
586c5d918a673ab5d5c92ffb4479fe57fee5559d
[ "BSD-3-Clause" ]
1
2020-07-29T15:48:58.000Z
2020-07-29T15:48:58.000Z
# Author: Teon Brooks <teon.brooks@gmail.com> # Stefan Appelhoff <stefan.appelhoff@mailbox.org> # # License: BSD (3-clause) from itertools import chain import os import os.path as op import pytest import numpy as np from functools import partial from string import ascii_lowercase from numpy.testing import (...
37.93859
122
0.597708
from itertools import chain import os import os.path as op import pytest import numpy as np from functools import partial from string import ascii_lowercase from numpy.testing import (assert_array_equal, assert_allclose, assert_equal) import matplotlib.pyplot as plt from mne import _...
true
true
f7460cde230285204cb0fa0def331c8e30173361
4,295
py
Python
admin/users/views.py
JonnyFunFun/pyParty
972690881c88d27139b076d2acb50b69275759b8
[ "MIT" ]
1
2017-03-23T18:07:33.000Z
2017-03-23T18:07:33.000Z
admin/users/views.py
JonnyFunFun/pyParty
972690881c88d27139b076d2acb50b69275759b8
[ "MIT" ]
null
null
null
admin/users/views.py
JonnyFunFun/pyParty
972690881c88d27139b076d2acb50b69275759b8
[ "MIT" ]
null
null
null
from global_decorators import render_to from accounts.models import UserProfile, FLAG_ADMIN, FLAG_OP, FLAG_VIP from admin.decorators import admin_only from django.contrib import messages from django.http import HttpResponseRedirect from admin.users.forms import AdminProfileForm from django.contrib.auth.models import Us...
42.524752
93
0.610943
from global_decorators import render_to from accounts.models import UserProfile, FLAG_ADMIN, FLAG_OP, FLAG_VIP from admin.decorators import admin_only from django.contrib import messages from django.http import HttpResponseRedirect from admin.users.forms import AdminProfileForm from django.contrib.auth.models import Us...
true
true
f7460eccac76e279c99d5856c0026ad549ad303c
1,217
py
Python
Secure-Password-Generator/password-gen.py
allenwest24/Ethical-Hacking-Toolbox
9003f4eb1ac1f52cc697c98223e862b8f541144e
[ "MIT" ]
null
null
null
Secure-Password-Generator/password-gen.py
allenwest24/Ethical-Hacking-Toolbox
9003f4eb1ac1f52cc697c98223e862b8f541144e
[ "MIT" ]
null
null
null
Secure-Password-Generator/password-gen.py
allenwest24/Ethical-Hacking-Toolbox
9003f4eb1ac1f52cc697c98223e862b8f541144e
[ "MIT" ]
3
2020-05-26T12:43:14.000Z
2021-09-27T00:08:32.000Z
import argparse import random parser = argparse.ArgumentParser(prog='xkcdpwgen', description='Generate a secure, memorable password using the XKCD method') parser.add_argument("-w", "--words", type=int, default=4, help='include WORDS words in the password (default=4)') parser.add_argument("-c", "--caps", type=int, def...
45.074074
134
0.72309
import argparse import random parser = argparse.ArgumentParser(prog='xkcdpwgen', description='Generate a secure, memorable password using the XKCD method') parser.add_argument("-w", "--words", type=int, default=4, help='include WORDS words in the password (default=4)') parser.add_argument("-c", "--caps", type=int, def...
true
true
f7460f10dc9527c6fca29f42128e9dc8e0daa1cb
1,367
py
Python
juriscraper/opinions/united_states/federal_appellate/ca10.py
Alex-Devoid/juriscraper
6ac2d5182dbf3aea14d918e645d582e9b42c9dd6
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states/federal_appellate/ca10.py
Alex-Devoid/juriscraper
6ac2d5182dbf3aea14d918e645d582e9b42c9dd6
[ "BSD-2-Clause" ]
null
null
null
juriscraper/opinions/united_states/federal_appellate/ca10.py
Alex-Devoid/juriscraper
6ac2d5182dbf3aea14d918e645d582e9b42c9dd6
[ "BSD-2-Clause" ]
null
null
null
from juriscraper.OpinionSite import OpinionSite import time from datetime import date from lxml import html class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.url = 'http://www.ca10.uscourts.gov/opinions/new/daily_decisions.rss' se...
37.972222
97
0.657644
from juriscraper.OpinionSite import OpinionSite import time from datetime import date from lxml import html class Site(OpinionSite): def __init__(self, *args, **kwargs): super(Site, self).__init__(*args, **kwargs) self.url = 'http://www.ca10.uscourts.gov/opinions/new/daily_decisions.rss' se...
true
true
f7460fce596d8c252c27b572138a0d488c8a0852
6,496
py
Python
pytest_django_test/db_helpers.py
bh/pytest_django
4957b6f1efd004a6591976b86bee288055118962
[ "BSD-3-Clause" ]
null
null
null
pytest_django_test/db_helpers.py
bh/pytest_django
4957b6f1efd004a6591976b86bee288055118962
[ "BSD-3-Clause" ]
null
null
null
pytest_django_test/db_helpers.py
bh/pytest_django
4957b6f1efd004a6591976b86bee288055118962
[ "BSD-3-Clause" ]
1
2020-06-12T09:56:48.000Z
2020-06-12T09:56:48.000Z
import os import subprocess import sqlite3 import pytest from django.conf import settings from django.db import connection from django.db import transaction from .compat import force_text from .app.models import Item DB_NAME = settings.DATABASES['default']['NAME'] if DB_NAME == ':memory:': TEST_DB_NAME = DB_NA...
30.213953
80
0.615764
import os import subprocess import sqlite3 import pytest from django.conf import settings from django.db import connection from django.db import transaction from .compat import force_text from .app.models import Item DB_NAME = settings.DATABASES['default']['NAME'] if DB_NAME == ':memory:': TEST_DB_NAME = DB_NA...
true
true
f7460ff3f1d7cefd6e851edf9589b94ce7760918
2,374
py
Python
src/peregrinus/world/celestial/star.py
tom65536/sabio
406ef2f680c2c7b2b075250d060e223e6b3c55a9
[ "Apache-2.0" ]
null
null
null
src/peregrinus/world/celestial/star.py
tom65536/sabio
406ef2f680c2c7b2b075250d060e223e6b3c55a9
[ "Apache-2.0" ]
null
null
null
src/peregrinus/world/celestial/star.py
tom65536/sabio
406ef2f680c2c7b2b075250d060e223e6b3c55a9
[ "Apache-2.0" ]
null
null
null
"""Data model of a star.""" import typing import pint from . import base, planet from .. import UNITS _LUM_SUN: pint.Quantity = 382.8e24 * UNITS.watt _MASS_SUN: pint.Quantity = 1988500e24 * UNITS.kg class Star(base.LuminousCelestialBody[planet.Planet]): """Class describing a star. :param luminosity: the ...
30.050633
101
0.628475
import typing import pint from . import base, planet from .. import UNITS _LUM_SUN: pint.Quantity = 382.8e24 * UNITS.watt _MASS_SUN: pint.Quantity = 1988500e24 * UNITS.kg class Star(base.LuminousCelestialBody[planet.Planet]): def __init__( self, luminosity: pint.Quantity, temperature:...
true
true
f746103c08700c089aee749e7733438ed0619383
1,197
py
Python
media.py
skehokin/gross-tomatoes
305d3d4b848a3c20653e034499152ff6ebff4ef3
[ "MIT" ]
null
null
null
media.py
skehokin/gross-tomatoes
305d3d4b848a3c20653e034499152ff6ebff4ef3
[ "MIT" ]
null
null
null
media.py
skehokin/gross-tomatoes
305d3d4b848a3c20653e034499152ff6ebff4ef3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 18 05:18:02 2017 @author: Siobhan """ import webbrowser class Movie(): """ A class which provides a way to store movie data. Attributes: title(str): value is the movie title given as the first argument. storyline (str): value is the mov...
32.351351
76
0.6533
import webbrowser class Movie(): def __init__(self, movie_title, movie_storyline, movie_image, movie_trailer): self.title = movie_title self.storyline = movie_storyline self.poster_image_url = movie_image self.trailer_youtube_url = movie_trailer def show_tr...
true
true
f746104cb692d45b351d0de5cc678fad927d158d
1,158
py
Python
module_unit_tests.py
NYC00kie/PhysWikiQuiz
4243fd6fa6f23670b9743b6a2c79339a9f3d32fc
[ "Apache-2.0" ]
5
2021-11-04T20:15:04.000Z
2022-03-03T15:03:52.000Z
module_unit_tests.py
NYC00kie/PhysWikiQuiz
4243fd6fa6f23670b9743b6a2c79339a9f3d32fc
[ "Apache-2.0" ]
6
2021-08-30T06:57:53.000Z
2021-11-16T23:25:33.000Z
module_unit_tests.py
NYC00kie/PhysWikiQuiz
4243fd6fa6f23670b9743b6a2c79339a9f3d32fc
[ "Apache-2.0" ]
1
2021-11-16T19:40:18.000Z
2021-11-16T19:40:18.000Z
import unittest from old import module0_formula_and_identifier_retrieval import pandas as pd # Python Tutorial: Unit Testing Your Code with the unittest Module: #https://www.youtube.com/watch?v=6tNS--WetLI # Retrieve sample QIDs sample_IDs_filepath = r'evaluation\sample_IDs.csv' QIDs_column_name = 'QID' def get_sa...
28.95
74
0.700345
import unittest from old import module0_formula_and_identifier_retrieval import pandas as pd sample_IDs_filepath = r'evaluation\sample_IDs.csv' QIDs_column_name = 'QID' def get_sample_QIDs(): sample_IDs_table = pd.read_csv(sample_IDs_filepath,delimiter=';') sample_QIDs = list(sample_IDs_table[QIDs_colum...
true
true
f7461078593cd80211109733e820cf140b7988a3
7,674
py
Python
preprocess_google_dataset_main.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
5
2020-05-25T23:27:42.000Z
2022-01-15T08:57:47.000Z
preprocess_google_dataset_main.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
6
2020-11-13T18:56:37.000Z
2022-02-10T02:13:31.000Z
preprocess_google_dataset_main.py
googleinterns/smart-content-summary
595c8e2cb0e160a87cacb954a2a030953fdce6c5
[ "Apache-2.0" ]
2
2020-09-02T08:06:18.000Z
2021-10-31T16:56:16.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.802956
120
0.641386
import argparse import csv import os import subprocess import preprocess_utils TEMP_FOLDER_NAME = "temp_preprocess_google_dataset" TEMP_FOLDER_DIR = "~/" + TEMP_FOLDER_NAME DATASET_NAME = "sentence-compression" DATASET_DIR = "~/" + DATASET_NAME + "/data" PREPROCESSED_FILE_PATH = "~/preprocessed_google_d...
true
true
f746108ad13e1f82ebb17b098e44a9e821d785b8
8,919
py
Python
numpy/f2py/func2subr.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
343
2015-01-07T05:58:44.000Z
2022-03-15T14:55:21.000Z
numpy/f2py/func2subr.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
61
2015-03-19T18:20:21.000Z
2019-10-23T12:58:23.000Z
numpy/f2py/func2subr.py
walshb/numpy
073bc39c58a6788ffda6aaa7549955cc3d4fdc93
[ "BSD-3-Clause" ]
66
2015-01-20T15:35:05.000Z
2021-11-25T16:49:41.000Z
#!/usr/bin/env python """ Rules for building C/API module with f2py2e. Copyright 1999,2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RIS...
30.649485
97
0.531113
__version__ = "$Revision: 1.16 $"[10:-1] f2py_version='See `f2py -v`' import pprint import copy import sys errmess=sys.stderr.write outmess=sys.stdout.write show=pprint.pprint from auxfuncs import * def var2fixfortran(vars,a,fa=None,f90mode=None): if fa is None: fa = a if a not in vars: sho...
true
true
f746109631b50a3708cfb1ee8e577900716bc42a
3,222
py
Python
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/ModifyLifecycleHookRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2019-12-23T12:36:43.000Z
2019-12-23T12:36:43.000Z
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/ModifyLifecycleHookRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-ess/aliyunsdkess/request/v20140828/ModifyLifecycleHookRequest.py
liumihust/aliyun-openapi-python-sdk
c7b5dd4befae4b9c59181654289f9272531207ef
[ "Apache-2.0" ]
1
2021-02-23T11:27:54.000Z
2021-02-23T11:27:54.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...
35.8
78
0.787089
from aliyunsdkcore.request import RpcRequest class ModifyLifecycleHookRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Ess', '2014-08-28', 'ModifyLifecycleHook','ess') def get_DefaultResult(self): return self.get_query_params().get('DefaultResult') def set_DefaultRes...
true
true
f74610e48641c26ae3888afc09900a7df6b7efa4
692
py
Python
src/libs/allauth/__init__.py
ivanjo39191/ivankao-erp
04ed4e5128b419c995dfcb57f2eead2af498b156
[ "Apache-2.0" ]
null
null
null
src/libs/allauth/__init__.py
ivanjo39191/ivankao-erp
04ed4e5128b419c995dfcb57f2eead2af498b156
[ "Apache-2.0" ]
null
null
null
src/libs/allauth/__init__.py
ivanjo39191/ivankao-erp
04ed4e5128b419c995dfcb57f2eead2af498b156
[ "Apache-2.0" ]
null
null
null
r""" _ ___ __ __ .___________. __ __ /\| |/\ / \ | | | | | || | | | \ ` ' / / ^ \ | | | | `---| |----`| |__| | |_ _| / /_\ \ | | | | | | | __ | / , . \ / _____ \ | `--' | | | | | | | \/|_|\//__/ \__\ \______/ ...
32.952381
81
0.410405
VERSION = (0, 47, 0, "final", 0) __title__ = "django-allauth" __version_info__ = VERSION __version__ = ".".join(map(str, VERSION[:3])) + ( "-{}{}".format(VERSION[3], VERSION[4] or "") if VERSION[3] != "final" else "" ) __author__ = "Raymond Penners" __license__ = "MIT" __copyright__ = "Copyright 2010-2021 Raymond...
true
true
f746111e500233142c3a5bf39faea75459aa14b6
1,111
py
Python
molsysmt/native/io/molsys/mdanalysis_Universe.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/native/io/molsys/mdanalysis_Universe.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
molsysmt/native/io/molsys/mdanalysis_Universe.py
dprada/molsysmt
83f150bfe3cfa7603566a0ed4aed79d9b0c97f5d
[ "MIT" ]
null
null
null
from molsysmt._private_tools.exceptions import * def from_mdanalysis_Universe (item, molecular_system=None, atom_indices='all', frame_indices='all'): from molsysmt.native.molsys import MolSys from molsysmt.native.io.topology import from_mdanalysis_Universe as mdanalysis_Universe_to_molsysmt_Topology from ...
46.291667
133
0.818182
from molsysmt._private_tools.exceptions import * def from_mdanalysis_Universe (item, molecular_system=None, atom_indices='all', frame_indices='all'): from molsysmt.native.molsys import MolSys from molsysmt.native.io.topology import from_mdanalysis_Universe as mdanalysis_Universe_to_molsysmt_Topology from ...
true
true
f746115ff1558ffec2e205d5842a764ab530704b
160
py
Python
program_examples/utilities_main.py
Maelstrom6/mandelpy
f5b541258fcb1518d7c46a24553bf1749ae976f3
[ "Apache-2.0" ]
null
null
null
program_examples/utilities_main.py
Maelstrom6/mandelpy
f5b541258fcb1518d7c46a24553bf1749ae976f3
[ "Apache-2.0" ]
null
null
null
program_examples/utilities_main.py
Maelstrom6/mandelpy
f5b541258fcb1518d7c46a24553bf1749ae976f3
[ "Apache-2.0" ]
null
null
null
from user_utilities import make_gif # you must create a folder `increasing_powers` in images make_gif(r"../images/increasing_powers", "test.mp4", 30)
26.666667
56
0.7375
from user_utilities import make_gif make_gif(r"../images/increasing_powers", "test.mp4", 30)
true
true
f74611d5ad44635ee5530bc0bae6b976cd814512
163
py
Python
tests/__init__.py
astanin/flickr-download
3bddf074896ea11f1468b1a1d127ef83394bb93b
[ "Apache-2.0" ]
192
2015-01-12T08:48:11.000Z
2022-02-15T11:21:00.000Z
tests/__init__.py
astanin/flickr-download
3bddf074896ea11f1468b1a1d127ef83394bb93b
[ "Apache-2.0" ]
48
2015-02-19T13:32:49.000Z
2020-10-02T14:29:10.000Z
tests/__init__.py
astanin/flickr-download
3bddf074896ea11f1468b1a1d127ef83394bb93b
[ "Apache-2.0" ]
72
2015-02-09T11:07:45.000Z
2022-01-28T06:26:02.000Z
import os.path import unittest2 def get_tests(): start_dir = os.path.dirname(__file__) return unittest2.TestLoader().discover(start_dir, pattern="*.py")
20.375
69
0.736196
import os.path import unittest2 def get_tests(): start_dir = os.path.dirname(__file__) return unittest2.TestLoader().discover(start_dir, pattern="*.py")
true
true
f74611e6bedf44f0960654e4d1d157cd604df2f0
1,847
py
Python
editor/mode.py
ChrnyaevEK/petnetsim
f7beebf4372012343a6f91be948d1d8d9b0c2b8a
[ "MIT" ]
null
null
null
editor/mode.py
ChrnyaevEK/petnetsim
f7beebf4372012343a6f91be948d1d8d9b0c2b8a
[ "MIT" ]
null
null
null
editor/mode.py
ChrnyaevEK/petnetsim
f7beebf4372012343a6f91be948d1d8d9b0c2b8a
[ "MIT" ]
null
null
null
import enum class Mode(enum.IntEnum): Normal = 0 ArcSource = 1 ArcTarget = 2 Simulation = 100 ModeStrings = {Mode.Normal: 'Editor: Normal', Mode.ArcSource: 'Editor: Arc source', Mode.ArcTarget: 'Editor: Arc target', Mode.Simulation: 'Simulation', ...
32.403509
92
0.653492
import enum class Mode(enum.IntEnum): Normal = 0 ArcSource = 1 ArcTarget = 2 Simulation = 100 ModeStrings = {Mode.Normal: 'Editor: Normal', Mode.ArcSource: 'Editor: Arc source', Mode.ArcTarget: 'Editor: Arc target', Mode.Simulation: 'Simulation', ...
true
true
f7461201509b593ef9dba7785d5fc0540de00c84
101
py
Python
python/testData/pyi/type/genericClassDefinitionInOtherFile/other.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/pyi/type/genericClassDefinitionInOtherFile/other.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/pyi/type/genericClassDefinitionInOtherFile/other.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class Holder: def __init__(self, x): self.x = x def get(self): return self.x
16.833333
26
0.534653
class Holder: def __init__(self, x): self.x = x def get(self): return self.x
true
true
f74612205c0cec901249468d28965489f75519ff
8,424
py
Python
action-philips_hue.py
fighterii/snips-skill-hue-pro
196e65a9bebc38c145d1ca89e4f4d567582098e7
[ "MIT" ]
null
null
null
action-philips_hue.py
fighterii/snips-skill-hue-pro
196e65a9bebc38c145d1ca89e4f4d567582098e7
[ "MIT" ]
null
null
null
action-philips_hue.py
fighterii/snips-skill-hue-pro
196e65a9bebc38c145d1ca89e4f4d567582098e7
[ "MIT" ]
2
2019-02-03T19:41:18.000Z
2019-11-25T15:58:35.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from hermes_python.hermes import Hermes from os.path import expanduser import os from snipshue.snipshue import SnipsHue from snipshelpers.thread_handler import ThreadHandler from snipshelpers.config_parser import SnipsConfigParser import queue CONFIGURATION_ENCODING_FORM...
38.465753
88
0.620252
from hermes_python.hermes import Hermes from os.path import expanduser import os from snipshue.snipshue import SnipsHue from snipshelpers.thread_handler import ThreadHandler from snipshelpers.config_parser import SnipsConfigParser import queue CONFIGURATION_ENCODING_FORMAT = "utf-8" CONFIG_INI = "config.ini" CACHE...
true
true
f746126b61cb0613a0142d4e5f9819ca3e84fea7
1,342
py
Python
CountryIMG.py
AGH-Narzedzia-Informatyczne/Project-Maze
61af3f79dc6e9054c5391fd11774bdafd00653c1
[ "MIT" ]
null
null
null
CountryIMG.py
AGH-Narzedzia-Informatyczne/Project-Maze
61af3f79dc6e9054c5391fd11774bdafd00653c1
[ "MIT" ]
19
2020-10-29T09:10:26.000Z
2020-12-15T14:45:58.000Z
CountryIMG.py
AGH-Narzedzia-Informatyczne/Project-Maze
61af3f79dc6e9054c5391fd11774bdafd00653c1
[ "MIT" ]
null
null
null
from tkinter import * from PIL import Image,ImageTk from resizeimage import resizeimage #import os class CountryIMG: def __init__(self): self.size = 400 self.TXT =open('CountryImages\Europ\Panstwa.txt',"r",encoding="utf-8") self.CountryName=[] self.CountryImage = [] for li...
36.27027
93
0.610283
from tkinter import * from PIL import Image,ImageTk from resizeimage import resizeimage class CountryIMG: def __init__(self): self.size = 400 self.TXT =open('CountryImages\Europ\Panstwa.txt',"r",encoding="utf-8") self.CountryName=[] self.CountryImage = [] for line in self...
true
true
f746132cbacbff59a070def448838959ca597e01
18,723
py
Python
src/sage/interfaces/scilab.py
defeo/sage
d8822036a9843bd4d75845024072515ede56bcb9
[ "BSL-1.0" ]
2
2018-06-30T01:37:35.000Z
2018-06-30T01:37:39.000Z
src/sage/interfaces/scilab.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
src/sage/interfaces/scilab.py
boothby/sage
1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f
[ "BSL-1.0" ]
null
null
null
r""" Interface to Scilab Scilab is a scientific software package for numerical computations providing a powerful open computing environment for engineering and scientific applications. Scilab includes hundreds of mathematical functions with the possibility to add interactively programs from various languages (C, C++,...
33.196809
151
0.467019
true
true
f74613d0ba96ca036bdd7a868dcaf05744bc80c0
2,040
py
Python
examples/ad_manager/v201805/product_package_item_service/get_all_product_package_items.py
beamc83/python-googleads
6039d08e2d85850a46a70f24359d362ffde2f7ed
[ "Apache-2.0" ]
2
2019-07-11T13:01:56.000Z
2019-07-11T13:01:58.000Z
examples/ad_manager/v201805/product_package_item_service/get_all_product_package_items.py
SoungMo/googleads-python-lib
fe86335c416e0571328c0a481c4b0cff863c01d9
[ "Apache-2.0" ]
null
null
null
examples/ad_manager/v201805/product_package_item_service/get_all_product_package_items.py
SoungMo/googleads-python-lib
fe86335c416e0571328c0a481c4b0cff863c01d9
[ "Apache-2.0" ]
1
2020-07-19T14:24:05.000Z
2020-07-19T14:24:05.000Z
#!/usr/bin/env python # # Copyright 2016 Google Inc. 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 requir...
37.777778
80
0.731373
"""This example gets all product package items. """ from googleads import ad_manager def main(client): product_package_item_service = client.GetService( 'ProductPackageItemService', version='v201805') statement = ad_manager.StatementBuilder(version='v201805') while True: ...
false
true
f74614cc03cef7aa19cb9fb959c10599188ac50b
12,213
py
Python
finance/WeekTest/PyAlgoFusion.py
Ernestyj/PyStudy
ee2e314eb808b0b7c4574b3061814abb81bbb7ab
[ "Apache-2.0" ]
1
2016-11-28T03:26:05.000Z
2016-11-28T03:26:05.000Z
finance/WeekTest/PyAlgoFusion.py
Ernestyj/PyStudy
ee2e314eb808b0b7c4574b3061814abb81bbb7ab
[ "Apache-2.0" ]
null
null
null
finance/WeekTest/PyAlgoFusion.py
Ernestyj/PyStudy
ee2e314eb808b0b7c4574b3061814abb81bbb7ab
[ "Apache-2.0" ]
2
2017-02-02T15:13:01.000Z
2019-05-30T01:59:17.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt import talib from pyalgotrade import strategy, plotter from pyalgotrade.broker.backtesting import TradePercentage, Broker from pyalgotrade.broker import Order from pyalgotrade.barfeed import yahoofeed ...
38.046729
147
0.641202
import numpy as np import pandas as pd import matplotlib.pyplot as plt import talib from pyalgotrade import strategy, plotter from pyalgotrade.broker.backtesting import TradePercentage, Broker from pyalgotrade.broker import Order from pyalgotrade.barfeed import yahoofeed from pyalgotrade.broker.slippage import NoSl...
false
true
f74616062fc651a30d0b5825d48b2c780d9472e8
9,993
py
Python
2_Training/Train_YOLO.py
bertelschmitt/multistreamYOLO
827a1d2ae11653fe5fde2cee3b52cda8baae9899
[ "CC-BY-4.0" ]
6
2020-10-31T15:31:59.000Z
2021-07-10T14:41:16.000Z
2_Training/Train_YOLO.py
bertelschmitt/multistreamYOLO
827a1d2ae11653fe5fde2cee3b52cda8baae9899
[ "CC-BY-4.0" ]
7
2020-11-04T07:00:24.000Z
2022-03-12T00:50:38.000Z
2_Training/Train_YOLO.py
bertelschmitt/multistreamYOLO
827a1d2ae11653fe5fde2cee3b52cda8baae9899
[ "CC-BY-4.0" ]
2
2021-04-16T09:17:55.000Z
2021-06-22T12:03:44.000Z
""" MODIFIED FROM keras-yolo3 PACKAGE, https://github.com/qqwweee/keras-yolo3 Retrain the YOLO model for your own dataset. 10-26-20 MODIFIED by bertelschmitt to use new repo name if changed to something else than "TrainYourOwnYOLO" 10-31-20 UPDATED by bertelschmitt to reflect TrainYourOwnYOLO versions as of 10-31-20...
32.444805
117
0.667567
import os import sys import argparse import warnings def get_parent_dir(n=1): current_path = os.path.dirname(os.path.abspath(__file__)) for _ in range(n): current_path = os.path.dirname(current_path) return current_path src_path = os.path.join(get_parent_dir(0), "src") sys.path.append(src_path...
true
true
f746171fb07952ebc842ee24ddbf70edf958a8d6
1,128
py
Python
main_board/models.py
ralphqq/pse-indices-scoreboard
f11a01915ac5a17b663db604afe996c5ed928fb9
[ "MIT" ]
1
2019-10-08T16:54:07.000Z
2019-10-08T16:54:07.000Z
main_board/models.py
ralphqq/pse-indices-scoreboard
f11a01915ac5a17b663db604afe996c5ed928fb9
[ "MIT" ]
8
2020-02-12T01:17:41.000Z
2021-12-13T20:06:12.000Z
main_board/models.py
ralphqq/pse-indices-scoreboard
f11a01915ac5a17b663db604afe996c5ed928fb9
[ "MIT" ]
null
null
null
from django.db import models from django.utils import timezone class MarketIndex(models.Model): ticker = models.CharField(max_length=100, unique=True) name = models.CharField(max_length=100, unique=True) class Meta: verbose_name_plural = 'market_indices' def __str__(self): ...
34.181818
76
0.703901
from django.db import models from django.utils import timezone class MarketIndex(models.Model): ticker = models.CharField(max_length=100, unique=True) name = models.CharField(max_length=100, unique=True) class Meta: verbose_name_plural = 'market_indices' def __str__(self): ...
true
true
f74617c36ee06a3cd88beaf054ab8b5f9d04ca4b
70
py
Python
netbox/tenancy/tables/__init__.py
cybarox/netbox
ea197eff5f4fe925bb354d1375912decd81752bd
[ "Apache-2.0" ]
null
null
null
netbox/tenancy/tables/__init__.py
cybarox/netbox
ea197eff5f4fe925bb354d1375912decd81752bd
[ "Apache-2.0" ]
null
null
null
netbox/tenancy/tables/__init__.py
cybarox/netbox
ea197eff5f4fe925bb354d1375912decd81752bd
[ "Apache-2.0" ]
null
null
null
from .columns import * from .contacts import * from .tenants import *
17.5
23
0.742857
from .columns import * from .contacts import * from .tenants import *
true
true
f74619f2f5f308a24da02e8ecca9fb0400626c81
6,750
py
Python
async_upnp_client/aiohttp.py
brgerig/async_upnp_client
680c4f5f7c80c417338e5c498179cb2af2f7bf1c
[ "Apache-2.0" ]
null
null
null
async_upnp_client/aiohttp.py
brgerig/async_upnp_client
680c4f5f7c80c417338e5c498179cb2af2f7bf1c
[ "Apache-2.0" ]
null
null
null
async_upnp_client/aiohttp.py
brgerig/async_upnp_client
680c4f5f7c80c417338e5c498179cb2af2f7bf1c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """aiohttp requester module.""" import asyncio import logging import socket from asyncio.events import AbstractEventLoop, AbstractServer from typing import Any, Mapping, Optional, Tuple, Union import aiohttp import aiohttp.web import async_timeout from async_upnp_client import UpnpEventHandle...
33.415842
80
0.585926
import asyncio import logging import socket from asyncio.events import AbstractEventLoop, AbstractServer from typing import Any, Mapping, Optional, Tuple, Union import aiohttp import aiohttp.web import async_timeout from async_upnp_client import UpnpEventHandler, UpnpRequester _LOGGER = logging.getLogger(__name__)...
true
true
f7461bb61959a934c4200b0be06207b207f7aa73
1,312
py
Python
assignments/05_hamming/hamming.py
cvk1988/biosystems-analytics-2020
68ef2146b3b1b38406f1452ba90c469068a663b2
[ "MIT" ]
null
null
null
assignments/05_hamming/hamming.py
cvk1988/biosystems-analytics-2020
68ef2146b3b1b38406f1452ba90c469068a663b2
[ "MIT" ]
null
null
null
assignments/05_hamming/hamming.py
cvk1988/biosystems-analytics-2020
68ef2146b3b1b38406f1452ba90c469068a663b2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Author : cory Date : 2020-03-03 Purpose: Rock the Casbah """ import argparse import os import sys # -------------------------------------------------- def get_args(): """Get command-line arguments""" parser = argparse.ArgumentParser( description='Rock the Casbah', ...
24.754717
83
0.429878
import argparse import os import sys def get_args(): parser = argparse.ArgumentParser( description='Rock the Casbah', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('file', metavar='FILE', type=argparse.FileType(...
true
true
f7461bdb7f747c444ed6138308e0b03fa72e497b
14,365
py
Python
sdk/python/pulumi_aws/sns/topic.py
dixler/pulumi-aws
88838ed6d412c092717a916b0b5b154f68226c3a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/sns/topic.py
dixler/pulumi-aws
88838ed6d412c092717a916b0b5b154f68226c3a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_aws/sns/topic.py
dixler/pulumi-aws
88838ed6d412c092717a916b0b5b154f68226c3a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Topic(...
63.844444
697
0.744379
import json import warnings import pulumi import pulumi.runtime from typing import Union from .. import utilities, tables class Topic(pulumi.CustomResource): application_failure_feedback_role_arn: pulumi.Output[str] application_success_feedback_role_arn: pulumi.Output[str] application_success_feedback_...
true
true
f7461c85d34791efa1141493be7c1611de8a761d
10,850
py
Python
dash_labs/component_plugins/datatable.py
neumann-nico/dash-labs
0bb9ef244919bf8882f97b183f0c7ab0f88762bb
[ "MIT" ]
1
2021-09-01T12:53:15.000Z
2021-09-01T12:53:15.000Z
dash_labs/component_plugins/datatable.py
neumann-nico/dash-labs
0bb9ef244919bf8882f97b183f0c7ab0f88762bb
[ "MIT" ]
null
null
null
dash_labs/component_plugins/datatable.py
neumann-nico/dash-labs
0bb9ef244919bf8882f97b183f0c7ab0f88762bb
[ "MIT" ]
null
null
null
import math from dash_labs.dependency import Output, Input from dash_labs.util import build_id, filter_kwargs from .base import ComponentPlugin from dash_labs.templates import FlatDiv from dash.development.base_component import Component operators = [ ["ge ", ">="], ["le ", "<="], ["lt ", "<"], ["gt ...
36.655405
95
0.602304
import math from dash_labs.dependency import Output, Input from dash_labs.util import build_id, filter_kwargs from .base import ComponentPlugin from dash_labs.templates import FlatDiv from dash.development.base_component import Component operators = [ ["ge ", ">="], ["le ", "<="], ["lt ", "<"], ["gt ...
true
true
f7461cc42bbeb4885cbce89eb7d38e3494246e33
74
py
Python
comic_dl/__version__.py
edimusxero/comic-dl
3aac1cbdb5d460c992dff3d125ee105d70e96119
[ "MIT" ]
null
null
null
comic_dl/__version__.py
edimusxero/comic-dl
3aac1cbdb5d460c992dff3d125ee105d70e96119
[ "MIT" ]
null
null
null
comic_dl/__version__.py
edimusxero/comic-dl
3aac1cbdb5d460c992dff3d125ee105d70e96119
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "2019.05.26"
14.8
26
0.594595
__version__ = "2019.05.26"
true
true
f7461cede0fbcf987f3ac000cc78346d2bc5178c
2,528
py
Python
tests/test_decorator_time_elapsed.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
1
2020-08-06T23:03:03.000Z
2020-08-06T23:03:03.000Z
tests/test_decorator_time_elapsed.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
16
2020-06-02T17:51:32.000Z
2020-09-02T17:59:04.000Z
tests/test_decorator_time_elapsed.py
thobiast/pcof
f94883b372a79014efdb4d28e3bde6eeb1a54d5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Test decorator time_elapsed.""" import pytest import time from pcof import decorators def myfunc(*args, **kwargs): return "{}; {}".format(args, kwargs) def myfunc_two(*args, **kwargs): time.sleep(0.1) return "{}; {}".format(args, kwargs) @pytest.mark.parametrize( "args,...
25.28
85
0.639636
import pytest import time from pcof import decorators def myfunc(*args, **kwargs): return "{}; {}".format(args, kwargs) def myfunc_two(*args, **kwargs): time.sleep(0.1) return "{}; {}".format(args, kwargs) @pytest.mark.parametrize( "args, kwargs, result", [ ([], {}, "(); {}"), ...
true
true
f7461d23f3bf96ba79249c217c42085c94e950c6
663
py
Python
neutron/agent/metadata/__init__.py
ksshanam/neutron-dvr
c0854ea0d1023ab42e1ef861f9b6ff480e985ac5
[ "Apache-2.0" ]
3
2015-02-02T02:51:39.000Z
2015-02-23T10:20:23.000Z
neutron/agent/metadata/__init__.py
ksshanam/neutron-dvr
c0854ea0d1023ab42e1ef861f9b6ff480e985ac5
[ "Apache-2.0" ]
4
2015-02-23T10:21:11.000Z
2015-03-04T09:28:20.000Z
neutron/agent/metadata/__init__.py
ksshanam/neutron-dvr
c0854ea0d1023ab42e1ef861f9b6ff480e985ac5
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 a...
41.4375
78
0.726998
true
true
f7461ecef1f4d5895c07f899a6046b97b5b0f900
2,692
py
Python
disf_gen_coarse2fine/table/ParseResult.py
GT-SALT/Disfluency-Generation-and-Detection
72126172b466aa74277f3cf0f73b915e5dbeefbb
[ "MIT" ]
11
2020-10-19T21:52:58.000Z
2022-02-23T02:28:57.000Z
disf_gen_coarse2fine/table/ParseResult.py
JingfengYang/Disfluency-Generation-and-Detection-1
72126172b466aa74277f3cf0f73b915e5dbeefbb
[ "MIT" ]
4
2021-07-09T11:59:03.000Z
2022-02-10T00:58:25.000Z
disf_gen_coarse2fine/table/ParseResult.py
JingfengYang/Disfluency-Generation-and-Detection-1
72126172b466aa74277f3cf0f73b915e5dbeefbb
[ "MIT" ]
5
2021-06-18T08:05:51.000Z
2022-02-18T04:09:17.000Z
import json from collections import defaultdict def is_eq(pred,gold): return pred==gold class GenResult(object): def __init__(self, idx, lay, tgt,disf_frags, tags): self.idx = idx self.lay = lay self.tgt = tgt #print(tags) self.tgt_tags=tags self.gold_tgt=[] ...
30.590909
142
0.51263
import json from collections import defaultdict def is_eq(pred,gold): return pred==gold class GenResult(object): def __init__(self, idx, lay, tgt,disf_frags, tags): self.idx = idx self.lay = lay self.tgt = tgt self.tgt_tags=tags self.gold_tgt=[] self.di...
true
true
f7461ee6dab699064153332116449c8e20a0bac0
4,739
py
Python
python/paddle/fluid/tests/unittests/test_bipartite_match_op.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
4
2019-04-28T13:29:41.000Z
2022-01-09T16:54:20.000Z
python/paddle/fluid/tests/unittests/test_bipartite_match_op.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
3
2018-04-11T10:25:51.000Z
2018-04-12T01:17:22.000Z
python/paddle/fluid/tests/unittests/test_bipartite_match_op.py
limeng357/Paddle
dbd25805c88c48998eb9dc0f4b2ca1fd46326482
[ "ECL-2.0", "Apache-2.0" ]
2
2020-11-04T08:01:39.000Z
2020-11-06T08:33:28.000Z
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # #Licensed under the Apache License, Version 2.0 (the "License"); #you may not use this file except in compliance with the License. #You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #Unless required by applicabl...
34.093525
80
0.612576
import unittest import numpy as np from op_test import OpTest def bipartite_match(distance, match_indices, match_dist): match_pair = [] row, col = distance.shape for i in range(row): for j in range(col): match_pair.append((i, j, distance[i][j])) match_sorted = sorted(...
true
true
f7461fba05ea797f0369ccb3dec235f7d5b0968a
1,373
py
Python
setup.py
stegm/mystrom2mqtt
eb97d17b3a02ad0884bb430d2446772d97bf30e0
[ "Apache-2.0" ]
3
2020-06-21T15:47:43.000Z
2020-12-22T19:43:20.000Z
setup.py
stegm/mystrom2mqtt
eb97d17b3a02ad0884bb430d2446772d97bf30e0
[ "Apache-2.0" ]
null
null
null
setup.py
stegm/mystrom2mqtt
eb97d17b3a02ad0884bb430d2446772d97bf30e0
[ "Apache-2.0" ]
3
2020-07-28T18:41:42.000Z
2020-11-23T17:05:01.000Z
"""Set up mystrom2mqtt gateway.""" import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "README.rst"), encoding="utf-8") as readme: long_description = readme.read() setup( name="mystrom2mqtt", version="0.1.0", descripti...
34.325
99
0.662054
import os from setuptools import find_packages, setup here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, "README.rst"), encoding="utf-8") as readme: long_description = readme.read() setup( name="mystrom2mqtt", version="0.1.0", description="Transfer HTTP requests from myS...
true
true
f7462088023877e3fa7e319347548111026590cb
2,090
py
Python
code.py
Nrico/MagTagLightSensor
0e38b52af04d3bb74c44f3b43afe3685e9ad4cb4
[ "MIT" ]
null
null
null
code.py
Nrico/MagTagLightSensor
0e38b52af04d3bb74c44f3b43afe3685e9ad4cb4
[ "MIT" ]
null
null
null
code.py
Nrico/MagTagLightSensor
0e38b52af04d3bb74c44f3b43afe3685e9ad4cb4
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries # SPDX-License-Identifier: MIT """ Basic display_text.label example script adapted for use on MagTag. """ import time import board import displayio import terminalio from adafruit_magtag.magtag import MagTag # Bit that allows the light sensor from adafru...
25.487805
98
0.751196
import time import board import displayio import terminalio from adafruit_magtag.magtag import MagTag from adafruit_display_text import label magtag = MagTag() print(magtag.peripherals.light) display = board.DISPLAY time.sleep(display.time_to_refresh) main_group = displayio.Group() bg_bitmap = displa...
true
true
f746211f667f9006fea8f6ab5626f3b922ce6c61
19,004
py
Python
SimModel_Python_API/simmodel_swig/Release/SimSpace_Occupied_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
3
2016-05-30T15:12:16.000Z
2022-03-22T08:11:13.000Z
SimModel_Python_API/simmodel_swig/Release/SimSpace_Occupied_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
21
2016-06-13T11:33:45.000Z
2017-05-23T09:46:52.000Z
SimModel_Python_API/simmodel_swig/Release/SimSpace_Occupied_Default.py
EnEff-BIM/EnEffBIM-Framework
6328d39b498dc4065a60b5cc9370b8c2a9a1cddf
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path imp...
40.868817
124
0.756051
from sys import version_info if version_info >= (2, 6, 0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_SimSpace_Occupied_Default', [dirname(__file__)]) except ImportError: ...
true
true
f7462192e6ae51d76d36442383c84bd9c97b5fb9
864
py
Python
introduction/37_people_detection.py
Tenjin0/python-opencv-base
b9732f24de688547b6d45b9d796d0ff458902874
[ "MIT" ]
null
null
null
introduction/37_people_detection.py
Tenjin0/python-opencv-base
b9732f24de688547b6d45b9d796d0ff458902874
[ "MIT" ]
null
null
null
introduction/37_people_detection.py
Tenjin0/python-opencv-base
b9732f24de688547b6d45b9d796d0ff458902874
[ "MIT" ]
null
null
null
import cv2 import numpy as np import os import sys this_dir = os.path.dirname(os.path.abspath(__file__)) needed_dir = os.path.abspath(os.path.join(this_dir, '../.')) sys.path.insert(0, needed_dir) from helpers.detect_people import Detect_people # https://www.pyimagesearch.com/2015/11/09/pedestrian-detection-opencv/ ...
29.793103
89
0.783565
import cv2 import numpy as np import os import sys this_dir = os.path.dirname(os.path.abspath(__file__)) needed_dir = os.path.abspath(os.path.join(this_dir, '../.')) sys.path.insert(0, needed_dir) from helpers.detect_people import Detect_people detector = Detect_people() currentDirectory = os.path.dirname(os.pa...
true
true
f74621fd670cc35fcb4ddce17fc87ea4ddcbe7af
180
py
Python
ABC/abc101-abc150/abc102/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc101-abc150/abc102/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc101-abc150/abc102/a.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- # AtCoder Beginner Contest if __name__ == '__main__': n = int(input()) if n % 2 == 0: print(n) else: print(n * 2)
15
27
0.45
if __name__ == '__main__': n = int(input()) if n % 2 == 0: print(n) else: print(n * 2)
true
true
f74624854dc167a03ff49486bad08da3539d17ab
2,339
py
Python
molo/surveys/migrations/0005_add_surveys_permissions_to_groups.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
null
null
null
molo/surveys/migrations/0005_add_surveys_permissions_to_groups.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
88
2016-06-14T18:36:18.000Z
2018-09-21T07:33:58.000Z
molo/surveys/migrations/0005_add_surveys_permissions_to_groups.py
praekeltfoundation/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
1
2017-10-02T09:27:45.000Z
2017-10-02T09:27:45.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-10-23 12:29 from __future__ import unicode_literals from django.db import migrations from django.core.management.sql import emit_post_migrate_signal class Migration(migrations.Migration): def add_surveys_permissions_to_groups(apps, schema_editor): ...
31.608108
79
0.6118
from __future__ import unicode_literals from django.db import migrations from django.core.management.sql import emit_post_migrate_signal class Migration(migrations.Migration): def add_surveys_permissions_to_groups(apps, schema_editor): db_alias = schema_editor.connection.alias try: ...
true
true
f74624c2e736bef6cbbf662d661e7836effdb8bc
936
py
Python
zerver/migrations/0015_attachment.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
1
2017-07-27T19:49:12.000Z
2017-07-27T19:49:12.000Z
zerver/migrations/0015_attachment.py
dehnert/zulip
f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5
[ "Apache-2.0" ]
9
2021-02-08T20:22:36.000Z
2022-03-11T23:22:45.000Z
zerver/migrations/0015_attachment.py
tobby2002/zulip
66e7c455759f9368bae16b9a604cf63f8e3524cd
[ "Apache-2.0" ]
1
2021-04-09T05:50:23.000Z
2021-04-09T05:50:23.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('zerver', '0014_realm_emoji_url_length'), ] operations = [ migr...
33.428571
114
0.621795
from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('zerver', '0014_realm_emoji_url_length'), ] operations = [ migrations.CreateModel( ...
true
true
f74624cf9f2880e4507d63f9c9676056408ad149
7,482
py
Python
catalyst/rl/scripts/run_samplers.py
Felix-neko/catalyst
df80986f1c12ef6a3776637453a0c04aaef0068c
[ "Apache-2.0" ]
1
2022-03-13T21:40:17.000Z
2022-03-13T21:40:17.000Z
catalyst/rl/scripts/run_samplers.py
Felix-neko/catalyst
df80986f1c12ef6a3776637453a0c04aaef0068c
[ "Apache-2.0" ]
null
null
null
catalyst/rl/scripts/run_samplers.py
Felix-neko/catalyst
df80986f1c12ef6a3776637453a0c04aaef0068c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" import copy # noqa E402 import time # noqa E402 import atexit # noqa E402 import argparse # noqa E402 import multiprocessing as mp # noqa E402 import torch # noqa E402 torch.set_num_threads(1) from catalyst...
27.306569
79
0.616947
import os os.environ["OMP_NUM_THREADS"] = "1" os.environ["MKL_NUM_THREADS"] = "1" import copy import time import atexit import argparse import multiprocessing as mp import torch torch.set_num_threads(1) from catalyst.rl.core import Sampler, ValidSampler, \ ExplorationHandler from catalyst.rl.regi...
true
true
f7462589684fea12426c835730418ee5e701b6ff
11,602
py
Python
tensorflow_addons/image/interpolate_spline.py
jahau/addons
11b842781b0f022830f35f2e6ee1cc93c80abe50
[ "Apache-2.0" ]
1
2020-01-20T17:48:35.000Z
2020-01-20T17:48:35.000Z
tensorflow_addons/image/interpolate_spline.py
jahau/addons
11b842781b0f022830f35f2e6ee1cc93c80abe50
[ "Apache-2.0" ]
null
null
null
tensorflow_addons/image/interpolate_spline.py
jahau/addons
11b842781b0f022830f35f2e6ee1cc93c80abe50
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.54485
80
0.640493
import tensorflow as tf EPSILON = 0.0000000001 def _cross_squared_distance_matrix(x, y): x_norm_squared = tf.reduce_sum(tf.square(x), 2) y_norm_squared = tf.reduce_sum(tf.square(y), 2) x_norm_squared_tile = tf.expand_dims(x_norm_squared, 2) y_norm_squared_tile = tf.expand_dims(y_...
true
true
f746258b5845bb207349b88e05cef01f78c54527
3,992
py
Python
pycorrector/seq2seq/infer.py
awesome-archive/pycorrector
ce4d8c5f251ee28b2f40802a08bd2697d9c8d6fc
[ "Apache-2.0" ]
1
2018-12-26T07:33:46.000Z
2018-12-26T07:33:46.000Z
pycorrector/seq2seq/infer.py
yingtingHuang/pycorrector
022da83ab794d9f9ddc40caef67b0578e7e3f513
[ "Apache-2.0" ]
null
null
null
pycorrector/seq2seq/infer.py
yingtingHuang/pycorrector
022da83ab794d9f9ddc40caef67b0578e7e3f513
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Author: XuMing <xuming624@qq.com> # Brief: import numpy as np import tensorflow as tf from keras.models import load_model from pycorrector.seq2seq import cged_config as config from pycorrector.seq2seq.corpus_reader import CGEDReader, load_word_dict from pycorrector.seq2seq.reader import EOS...
38.757282
97
0.642034
import numpy as np import tensorflow as tf from keras.models import load_model from pycorrector.seq2seq import cged_config as config from pycorrector.seq2seq.corpus_reader import CGEDReader, load_word_dict from pycorrector.seq2seq.reader import EOS_TOKEN, GO_TOKEN from pycorrector.utils.io_utils import get_logger ...
true
true
f74626165bb4f05896ccbbb932f6271770c961b7
6,040
py
Python
pybind/slxos/v17r_2_00/interface/ethernet/delay_link_event/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/interface/ethernet/delay_link_event/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v17r_2_00/interface/ethernet/delay_link_event/__init__.py
extremenetworks/pybind
44c467e71b2b425be63867aba6e6fa28b2cfe7fb
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
48.709677
502
0.713576
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f74626fa7fb341d9207dbafe1437441fe8cfb11b
41
py
Python
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/__init__.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
82
2016-06-29T17:24:43.000Z
2021-04-16T06:49:17.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/__init__.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
6
2022-01-12T18:22:08.000Z
2022-03-25T10:19:27.000Z
platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/__init__.py
PascalGuenther/gecko_sdk
2e82050dc8823c9fe0e8908c1b2666fb83056230
[ "Zlib" ]
56
2016-08-02T10:50:50.000Z
2021-07-19T08:57:34.000Z
""" Ocelot specific code lives here """
8.2
31
0.658537
true
true
f746285d3a222cd7e196f45a4e19fcec2b65d966
994
py
Python
var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
9
2018-04-18T07:51:40.000Z
2021-09-10T03:56:57.000Z
var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
907
2018-04-18T11:17:57.000Z
2022-03-31T13:20:25.000Z
var/spack/repos/builtin/packages/py-lscsoft-glue/package.py
xiki-tempula/spack
9d66c05e93ab8a933fc59915040c0e0c86a4aac4
[ "ECL-2.0", "Apache-2.0", "MIT" ]
29
2018-11-05T16:14:23.000Z
2022-02-03T16:07:09.000Z
# Copyright 2013-2020 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 PyLscsoftGlue(PythonPackage): """Glue (Grid LSC User Environment) is a suite of python mod...
41.416667
95
0.712274
from spack import * class PyLscsoftGlue(PythonPackage): homepage = "https://www.lsc-group.phys.uwm.edu/daswg/projects/glue.html" url = "https://pypi.io/packages/source/l/lscsoft-glue/lscsoft-glue-2.0.0.tar.gz" version('2.0.0', sha256='9bdfaebe4c921d83d1e3d1ca24379a644665e9d7530e7070665f387767c...
true
true
f7462905b43aeff04f1dfc251032af1507d22572
624
py
Python
Snake/Fruit.py
JaredsGames/Snake
ff0ae856455e974e891586d37361a283f1783580
[ "MIT" ]
null
null
null
Snake/Fruit.py
JaredsGames/Snake
ff0ae856455e974e891586d37361a283f1783580
[ "MIT" ]
null
null
null
Snake/Fruit.py
JaredsGames/Snake
ff0ae856455e974e891586d37361a283f1783580
[ "MIT" ]
null
null
null
# Jared Dyreson # CPSC 386-01 # 2021-11-29 # jareddyreson@csu.fullerton.edu # @JaredDyreson # # Lab 00-04 # # Some filler text # """ Simple class for the fruit """ import dataclasses import random from Snake.Cell import Cell from Snake.Point import Point @dataclasses.dataclass class Fruit: """ Represents f...
16.864865
59
0.63141
import dataclasses import random from Snake.Cell import Cell from Snake.Point import Point @dataclasses.dataclass class Fruit: value: int = 1 instance: Cell = None def __post_init__(self): self.instance = Cell( Point(random.randint(0, 16), random.randint( ...
true
true
f746298477b29fb3ed25fe995db86ae593c1ed79
269
py
Python
fbtimer/__init__.py
amcintosh/FreshBooks-Timer
72d43bc2e698113bf4682faa8e2186aff2fc2f1d
[ "MIT" ]
2
2018-07-23T13:36:05.000Z
2020-11-16T00:18:01.000Z
fbtimer/__init__.py
amcintosh/FreshBooks-Timer
72d43bc2e698113bf4682faa8e2186aff2fc2f1d
[ "MIT" ]
7
2017-11-28T02:06:50.000Z
2018-10-04T02:29:51.000Z
fbtimer/__init__.py
amcintosh/FreshBooks-Timer
72d43bc2e698113bf4682faa8e2186aff2fc2f1d
[ "MIT" ]
1
2018-04-19T12:57:34.000Z
2018-04-19T12:57:34.000Z
import os __version__ = '0.1.1' __date__ = '2017/20/10' __updated__ = '2018/27/04' __author__ = 'Andrew McIntosh' __copyright__ = 'Copyright 2017, Andrew McIntosh' __license__ = 'MIT' FRESHBOOKS_BASE_URL = os.getenv('FBTIMER_API_URL', 'https://api.freshbooks.com/')
22.416667
81
0.736059
import os __version__ = '0.1.1' __date__ = '2017/20/10' __updated__ = '2018/27/04' __author__ = 'Andrew McIntosh' __copyright__ = 'Copyright 2017, Andrew McIntosh' __license__ = 'MIT' FRESHBOOKS_BASE_URL = os.getenv('FBTIMER_API_URL', 'https://api.freshbooks.com/')
true
true